From 4f87f6857f200b1375915012d84f011c5a51d8a5 Mon Sep 17 00:00:00 2001 From: dswbx Date: Tue, 11 Mar 2025 09:57:05 +0100 Subject: [PATCH] upgrade liquid, fix editor themes --- app/package.json | 2 +- app/src/ui/components/code/CodeEditor.tsx | 6 ++---- app/src/ui/styles.css | 2 +- bun.lock | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/app/package.json b/app/package.json index 0493481..162b5a6 100644 --- a/app/package.json +++ b/app/package.json @@ -52,7 +52,7 @@ "json-schema-library": "^10.0.0-rc7", "json-schema-to-ts": "^3.1.1", "kysely": "^0.27.6", - "liquidjs": "^10.15.0", + "liquidjs": "^10.21.0", "lodash-es": "^4.17.21", "oauth4webapi": "^2.11.1", "object-path-immutable": "^4.1.2", diff --git a/app/src/ui/components/code/CodeEditor.tsx b/app/src/ui/components/code/CodeEditor.tsx index 095656d..480cb79 100644 --- a/app/src/ui/components/code/CodeEditor.tsx +++ b/app/src/ui/components/code/CodeEditor.tsx @@ -1,8 +1,7 @@ import { default as CodeMirror, type ReactCodeMirrorProps } from "@uiw/react-codemirror"; -import { useBknd } from "ui/client/bknd"; - import { json } from "@codemirror/lang-json"; import { type LiquidCompletionConfig, liquid } from "@codemirror/lang-liquid"; +import { useTheme } from "ui/client/use-theme"; export type CodeEditorProps = ReactCodeMirrorProps & { _extensions?: Partial<{ @@ -17,8 +16,7 @@ export default function CodeEditor({ _extensions = {}, ...props }: CodeEditorProps) { - const b = useBknd(); - const theme = b.app.getAdminConfig().color_scheme; + const { theme } = useTheme(); const _basicSetup: Partial = !editable ? { ...(typeof basicSetup === "object" ? basicSetup : {}), diff --git a/app/src/ui/styles.css b/app/src/ui/styles.css index 7dee5fb..77a0645 100644 --- a/app/src/ui/styles.css +++ b/app/src/ui/styles.css @@ -88,7 +88,7 @@ input[disabled]::placeholder { } .cm-editor { - background: transparent; + /*background: transparent;*/ } .cm-editor.cm-focused { outline: none; diff --git a/bun.lock b/bun.lock index 9a86330..1bc96ab 100644 --- a/bun.lock +++ b/bun.lock @@ -50,7 +50,7 @@ "json-schema-library": "^10.0.0-rc7", "json-schema-to-ts": "^3.1.1", "kysely": "^0.27.6", - "liquidjs": "^10.15.0", + "liquidjs": "^10.21.0", "lodash-es": "^4.17.21", "oauth4webapi": "^2.11.1", "object-path-immutable": "^4.1.2",