mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
upgrade liquid, fix editor themes
This commit is contained in:
@@ -52,7 +52,7 @@
|
|||||||
"json-schema-library": "^10.0.0-rc7",
|
"json-schema-library": "^10.0.0-rc7",
|
||||||
"json-schema-to-ts": "^3.1.1",
|
"json-schema-to-ts": "^3.1.1",
|
||||||
"kysely": "^0.27.6",
|
"kysely": "^0.27.6",
|
||||||
"liquidjs": "^10.15.0",
|
"liquidjs": "^10.21.0",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"oauth4webapi": "^2.11.1",
|
"oauth4webapi": "^2.11.1",
|
||||||
"object-path-immutable": "^4.1.2",
|
"object-path-immutable": "^4.1.2",
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import { default as CodeMirror, type ReactCodeMirrorProps } from "@uiw/react-codemirror";
|
import { default as CodeMirror, type ReactCodeMirrorProps } from "@uiw/react-codemirror";
|
||||||
import { useBknd } from "ui/client/bknd";
|
|
||||||
|
|
||||||
import { json } from "@codemirror/lang-json";
|
import { json } from "@codemirror/lang-json";
|
||||||
import { type LiquidCompletionConfig, liquid } from "@codemirror/lang-liquid";
|
import { type LiquidCompletionConfig, liquid } from "@codemirror/lang-liquid";
|
||||||
|
import { useTheme } from "ui/client/use-theme";
|
||||||
|
|
||||||
export type CodeEditorProps = ReactCodeMirrorProps & {
|
export type CodeEditorProps = ReactCodeMirrorProps & {
|
||||||
_extensions?: Partial<{
|
_extensions?: Partial<{
|
||||||
@@ -17,8 +16,7 @@ export default function CodeEditor({
|
|||||||
_extensions = {},
|
_extensions = {},
|
||||||
...props
|
...props
|
||||||
}: CodeEditorProps) {
|
}: CodeEditorProps) {
|
||||||
const b = useBknd();
|
const { theme } = useTheme();
|
||||||
const theme = b.app.getAdminConfig().color_scheme;
|
|
||||||
const _basicSetup: Partial<ReactCodeMirrorProps["basicSetup"]> = !editable
|
const _basicSetup: Partial<ReactCodeMirrorProps["basicSetup"]> = !editable
|
||||||
? {
|
? {
|
||||||
...(typeof basicSetup === "object" ? basicSetup : {}),
|
...(typeof basicSetup === "object" ? basicSetup : {}),
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ input[disabled]::placeholder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cm-editor {
|
.cm-editor {
|
||||||
background: transparent;
|
/*background: transparent;*/
|
||||||
}
|
}
|
||||||
.cm-editor.cm-focused {
|
.cm-editor.cm-focused {
|
||||||
outline: none;
|
outline: none;
|
||||||
|
|||||||
2
bun.lock
2
bun.lock
@@ -50,7 +50,7 @@
|
|||||||
"json-schema-library": "^10.0.0-rc7",
|
"json-schema-library": "^10.0.0-rc7",
|
||||||
"json-schema-to-ts": "^3.1.1",
|
"json-schema-to-ts": "^3.1.1",
|
||||||
"kysely": "^0.27.6",
|
"kysely": "^0.27.6",
|
||||||
"liquidjs": "^10.15.0",
|
"liquidjs": "^10.21.0",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"oauth4webapi": "^2.11.1",
|
"oauth4webapi": "^2.11.1",
|
||||||
"object-path-immutable": "^4.1.2",
|
"object-path-immutable": "^4.1.2",
|
||||||
|
|||||||
Reference in New Issue
Block a user