@pihanga2/codemirror 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cards/codeMirror/codeMirror.component.js +17 -9
- package/cards/codeMirror/codeMirror.component.js.map +1 -1
- package/cards/codeMirror/codeMirror.types.d.ts +29 -8
- package/cards/codeMirror/codeMirror.types.js +11 -11
- package/cards/codeMirror/codeMirror.types.js.map +1 -1
- package/cards/codeMirror/index.js +7 -7
- package/package.json +1 -1
|
@@ -5,25 +5,33 @@ import { StreamLanguage as i } from "@codemirror/language";
|
|
|
5
5
|
import { jsx as a } from "react/jsx-runtime";
|
|
6
6
|
//#region src/cards/codeMirror/codeMirror.component.tsx
|
|
7
7
|
var o = (o) => {
|
|
8
|
-
let { value: s = "", readOnly: c = !1, streamLanguage: l, extensionsKey: u, theme: d, lineNumbers: f = !0,
|
|
8
|
+
let { value: s = "", readOnly: c = !1, streamLanguage: l, extensionsKey: u, theme: d = "light", lineNumbers: f = !0, foldGutter: p = !0, dropCursor: m = !0, allowMultipleSelections: h = !0, indentOnInput: g = !0, height: _ = "auto", minHeight: v, maxHeight: y, className: b, cardName: x, _cls: S, onChanged: C } = o, w = n(() => {
|
|
9
9
|
let n = u ? [...e(u) ?? []] : [];
|
|
10
10
|
if (l) {
|
|
11
11
|
let e = t(l);
|
|
12
12
|
e && n.push(i.define(e));
|
|
13
13
|
}
|
|
14
14
|
return n;
|
|
15
|
-
}, [l, u]);
|
|
15
|
+
}, [l, u]), T = n(() => d === "dark" ? "dark" : d === "light" ? "light" : e(d) || (console.warn(`[shad/codeMirror] Unknown theme "${d}". Register it with registerExtensions() or use "light" / "dark". Falling back to "light".`), "light"), [d]);
|
|
16
16
|
return /* @__PURE__ */ a("div", {
|
|
17
|
-
className:
|
|
18
|
-
"data-pihanga":
|
|
17
|
+
className: S("root", b),
|
|
18
|
+
"data-pihanga": x,
|
|
19
19
|
children: /* @__PURE__ */ a(r, {
|
|
20
20
|
value: s,
|
|
21
|
-
height:
|
|
21
|
+
height: _,
|
|
22
|
+
minHeight: v,
|
|
23
|
+
maxHeight: y,
|
|
22
24
|
readOnly: c,
|
|
23
|
-
theme:
|
|
24
|
-
extensions:
|
|
25
|
-
basicSetup: {
|
|
26
|
-
|
|
25
|
+
theme: T,
|
|
26
|
+
extensions: w,
|
|
27
|
+
basicSetup: {
|
|
28
|
+
lineNumbers: f,
|
|
29
|
+
foldGutter: p,
|
|
30
|
+
dropCursor: m,
|
|
31
|
+
allowMultipleSelections: h,
|
|
32
|
+
indentOnInput: g
|
|
33
|
+
},
|
|
34
|
+
onChange: (e) => C?.({ value: e })
|
|
27
35
|
})
|
|
28
36
|
});
|
|
29
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codeMirror.component.js","names":[],"sources":["../../../src/cards/codeMirror/codeMirror.component.tsx"],"sourcesContent":["import React, {useMemo} from \"react\";\nimport type {PiCardProps} from \"@pihanga2/core\";\nimport CodeMirror from \"@uiw/react-codemirror\";\nimport {StreamLanguage} from \"@codemirror/language\";\nimport type {Extension} from \"@codemirror/state\";\n\nimport type {\n CodeMirrorCardProps,\n CodeMirrorCardEvents,\n} from \"./codeMirror.types\";\nimport {resolveStreamParser, resolveExtensions} from \"./codeMirror.types\";\n\nexport const CodeMirrorComponent = (\n props: PiCardProps<CodeMirrorCardProps, CodeMirrorCardEvents>,\n): React.ReactNode => {\n const {\n value = \"\",\n readOnly = false,\n streamLanguage,\n extensionsKey,\n theme,\n lineNumbers = true,\n height = \"auto\",\n className,\n cardName,\n _cls,\n onChanged,\n } = props;\n\n /**\n * Build the effective extension list once per unique combination of keys.\n * Complex values (StreamParser, Extension[]) are looked up from the\n * module-level registries — never stored in Redux-serialised card props.\n */\n const extensions = useMemo<Extension[]>(() => {\n const ext: Extension[] = extensionsKey\n ? [...(resolveExtensions(extensionsKey) ?? [])]\n : [];\n if (streamLanguage) {\n const parser = resolveStreamParser(streamLanguage);\n if (parser) ext.push(StreamLanguage.define(parser));\n }\n return ext;\n }, [streamLanguage, extensionsKey]);\n\n return (\n <div className={_cls(\"root\", className)} data-pihanga={cardName}>\n <CodeMirror\n value={value}\n height={height}\n readOnly={readOnly}\n theme={
|
|
1
|
+
{"version":3,"file":"codeMirror.component.js","names":[],"sources":["../../../src/cards/codeMirror/codeMirror.component.tsx"],"sourcesContent":["import React, {useMemo} from \"react\";\nimport type {PiCardProps} from \"@pihanga2/core\";\nimport CodeMirror from \"@uiw/react-codemirror\";\nimport {StreamLanguage} from \"@codemirror/language\";\nimport type {Extension} from \"@codemirror/state\";\n\nimport type {\n CodeMirrorCardProps,\n CodeMirrorCardEvents,\n} from \"./codeMirror.types\";\nimport {resolveStreamParser, resolveExtensions} from \"./codeMirror.types\";\n\nexport const CodeMirrorComponent = (\n props: PiCardProps<CodeMirrorCardProps, CodeMirrorCardEvents>,\n): React.ReactNode => {\n const {\n value = \"\",\n readOnly = false,\n streamLanguage,\n extensionsKey,\n theme = \"light\",\n lineNumbers = true,\n foldGutter = true,\n dropCursor = true,\n allowMultipleSelections = true,\n indentOnInput = true,\n height = \"auto\",\n minHeight,\n maxHeight,\n className,\n cardName,\n _cls,\n onChanged,\n } = props;\n\n /**\n * Build the effective extension list once per unique combination of keys.\n * Complex values (StreamParser, Extension[]) are looked up from the\n * module-level registries — never stored in Redux-serialised card props.\n */\n const extensions = useMemo<Extension[]>(() => {\n const ext: Extension[] = extensionsKey\n ? [...(resolveExtensions(extensionsKey) ?? [])]\n : [];\n if (streamLanguage) {\n const parser = resolveStreamParser(streamLanguage);\n if (parser) ext.push(StreamLanguage.define(parser));\n }\n return ext;\n }, [streamLanguage, extensionsKey]);\n\n /**\n * \"light\" / \"dark\" are built in. Any other value must be a theme bundle\n * registered with registerExtensions(); the bundle is applied as an\n * extension and the built-in light theme is suppressed.\n */\n const themeProp = useMemo<\n \"light\" | \"dark\" | \"none\" | Extension | Extension[]\n >(() => {\n if (theme === \"dark\") return \"dark\";\n if (theme === \"light\") return \"light\";\n const themeExt = resolveExtensions(theme);\n if (themeExt) return themeExt;\n console.warn(\n `[shad/codeMirror] Unknown theme \"${theme}\". Register it with registerExtensions() or use \"light\" / \"dark\". Falling back to \"light\".`,\n );\n return \"light\";\n }, [theme]);\n\n return (\n <div className={_cls(\"root\", className)} data-pihanga={cardName}>\n <CodeMirror\n value={value}\n height={height}\n minHeight={minHeight}\n maxHeight={maxHeight}\n readOnly={readOnly}\n theme={themeProp}\n extensions={extensions}\n basicSetup={{\n lineNumbers,\n foldGutter,\n dropCursor,\n allowMultipleSelections,\n indentOnInput,\n }}\n onChange={(val: string) => onChanged?.({value: val})}\n />\n </div>\n );\n};\n"],"mappings":";;;;;;AAYA,IAAa,KACX,MACoB;CACpB,IAAM,EACJ,WAAQ,IACR,cAAW,IACX,mBACA,kBACA,WAAQ,SACR,iBAAc,IACd,gBAAa,IACb,gBAAa,IACb,6BAA0B,IAC1B,mBAAgB,IAChB,YAAS,QACT,cACA,cACA,cACA,aACA,SACA,iBACE,GAOE,IAAa,QAA2B;EAC5C,IAAM,IAAmB,IACrB,CAAC,GAAI,EAAkB,CAAa,KAAK,CAAC,CAAE,IAC5C,CAAC;EACL,IAAI,GAAgB;GAClB,IAAM,IAAS,EAAoB,CAAc;GACjD,AAAI,KAAQ,EAAI,KAAK,EAAe,OAAO,CAAM,CAAC;EACpD;EACA,OAAO;CACT,GAAG,CAAC,GAAgB,CAAa,CAAC,GAO5B,IAAY,QAGZ,MAAU,SAAe,SACzB,MAAU,UAAgB,UACb,EAAkB,CAC/B,MACJ,QAAQ,KACN,oCAAoC,EAAM,2FAC5C,GACO,UACN,CAAC,CAAK,CAAC;CAEV,OACE,kBAAC,OAAD;EAAK,WAAW,EAAK,QAAQ,CAAS;EAAG,gBAAc;YACrD,kBAAC,GAAD;GACS;GACC;GACG;GACA;GACD;GACV,OAAO;GACK;GACZ,YAAY;IACV;IACA;IACA;IACA;IACA;GACF;GACA,WAAW,MAAgB,IAAY,EAAC,OAAO,EAAG,CAAC;EACpD,CAAA;CACE,CAAA;AAET"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Extension } from '@codemirror/state';
|
|
2
2
|
import { StreamParser } from '@codemirror/language';
|
|
3
3
|
export declare const CODE_MIRROR_CARD = "code-mirror";
|
|
4
|
+
export declare const CodeMirror: <S extends import('@pihanga2/core').ReduxState>(p: import('@pihanga2/core').PiMapProps<CodeMirrorCardProps, S, CodeMirrorCardEvents>) => import('@pihanga2/core').PiCardDef;
|
|
5
|
+
/** @deprecated Use {@link CodeMirror} instead. */
|
|
4
6
|
export declare const CodeMirrorCard: <S extends import('@pihanga2/core').ReduxState>(p: import('@pihanga2/core').PiMapProps<CodeMirrorCardProps, S, CodeMirrorCardEvents>) => import('@pihanga2/core').PiCardDef;
|
|
5
7
|
export declare const CODE_MIRROR_ACTION: {
|
|
6
8
|
CHANGED: string;
|
|
@@ -14,7 +16,7 @@ export declare const onCodeMirrorChanged: <S extends import('@pihanga2/core').Re
|
|
|
14
16
|
*
|
|
15
17
|
* @example
|
|
16
18
|
* import { python } from "@codemirror/legacy-modes/mode/python";
|
|
17
|
-
* import { registerStreamParser } from "@pihanga2/
|
|
19
|
+
* import { registerStreamParser } from "@pihanga2/codemirror/cards/codeMirror";
|
|
18
20
|
* registerStreamParser("python", python);
|
|
19
21
|
*/
|
|
20
22
|
export declare function registerStreamParser(key: string, parser: StreamParser<unknown>): void;
|
|
@@ -27,7 +29,7 @@ export declare function resolveStreamParser(key: string): StreamParser<unknown>
|
|
|
27
29
|
*
|
|
28
30
|
* @example
|
|
29
31
|
* import { oneDark } from "@codemirror/theme-one-dark";
|
|
30
|
-
* import { registerExtensions } from "@pihanga2/
|
|
32
|
+
* import { registerExtensions } from "@pihanga2/codemirror/cards/codeMirror";
|
|
31
33
|
* registerExtensions("oneDark", [oneDark]);
|
|
32
34
|
*/
|
|
33
35
|
export declare function registerExtensions(key: string, exts: Extension[]): void;
|
|
@@ -45,7 +47,7 @@ export type CodeMirrorCardProps = {
|
|
|
45
47
|
* @example
|
|
46
48
|
* import { python } from "@codemirror/legacy-modes/mode/python";
|
|
47
49
|
* registerStreamParser("python", python);
|
|
48
|
-
*
|
|
50
|
+
* CodeMirror({ streamLanguage: "python", value: "print('hello')" });
|
|
49
51
|
*/
|
|
50
52
|
streamLanguage?: string;
|
|
51
53
|
/**
|
|
@@ -55,22 +57,41 @@ export type CodeMirrorCardProps = {
|
|
|
55
57
|
* @example
|
|
56
58
|
* import { oneDark } from "@codemirror/theme-one-dark";
|
|
57
59
|
* registerExtensions("oneDark", [oneDark]);
|
|
58
|
-
*
|
|
60
|
+
* CodeMirror({ extensionsKey: "oneDark", ... });
|
|
61
|
+
*
|
|
62
|
+
* Note: `theme` looks up keys in this same registry, so a bundle registered
|
|
63
|
+
* here can also be used as a theme.
|
|
59
64
|
*/
|
|
60
65
|
extensionsKey?: string;
|
|
61
66
|
/**
|
|
62
|
-
* CodeMirror editor theme
|
|
63
|
-
*
|
|
64
|
-
*
|
|
67
|
+
* CodeMirror editor theme: "light", "dark", or the key of a theme bundle
|
|
68
|
+
* registered with `registerExtensions()` (e.g. "dracula"). Default: "light".
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* import { draculaInit } from "@uiw/codemirror-theme-dracula";
|
|
72
|
+
* registerExtensions("dracula", [draculaInit()]);
|
|
73
|
+
* CodeMirror({ theme: "dracula", ... });
|
|
65
74
|
*/
|
|
66
|
-
theme?: "light" | "dark";
|
|
75
|
+
theme?: "light" | "dark" | (string & {});
|
|
67
76
|
/** Show line numbers in the gutter. Default: true. */
|
|
68
77
|
lineNumbers?: boolean;
|
|
78
|
+
/** Show the fold gutter (code folding). Default: true. */
|
|
79
|
+
foldGutter?: boolean;
|
|
80
|
+
/** Show a drop cursor while dragging text. Default: true. */
|
|
81
|
+
dropCursor?: boolean;
|
|
82
|
+
/** Allow multiple selection ranges. Default: true. */
|
|
83
|
+
allowMultipleSelections?: boolean;
|
|
84
|
+
/** Re-indent the current line as you type. Default: true. */
|
|
85
|
+
indentOnInput?: boolean;
|
|
69
86
|
/**
|
|
70
87
|
* CSS height of the editor. Use "auto" to grow with content or a fixed
|
|
71
88
|
* value such as "400px". Default: "auto".
|
|
72
89
|
*/
|
|
73
90
|
height?: string;
|
|
91
|
+
/** CSS minimum height of the editor, e.g. "120px". */
|
|
92
|
+
minHeight?: string;
|
|
93
|
+
/** CSS maximum height of the editor, e.g. "600px". Scrolls beyond this. */
|
|
94
|
+
maxHeight?: string;
|
|
74
95
|
/** Additional CSS class applied to the outer wrapper div. */
|
|
75
96
|
className?: string;
|
|
76
97
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { createCardDeclaration as e, createOnAction as t, registerActions as n } from "@pihanga2/core";
|
|
2
2
|
//#region src/cards/codeMirror/codeMirror.types.ts
|
|
3
|
-
var r = "code-mirror", i = e(r), a = n(r, ["changed"]),
|
|
4
|
-
function
|
|
5
|
-
|
|
3
|
+
var r = "code-mirror", i = e(r), a = i, o = n(r, ["changed"]), s = t(o.CHANGED), c = /* @__PURE__ */ new Map();
|
|
4
|
+
function l(e, t) {
|
|
5
|
+
c.set(e, t);
|
|
6
6
|
}
|
|
7
|
-
function
|
|
8
|
-
return
|
|
7
|
+
function u(e) {
|
|
8
|
+
return c.get(e);
|
|
9
9
|
}
|
|
10
|
-
var
|
|
11
|
-
function
|
|
12
|
-
|
|
10
|
+
var d = /* @__PURE__ */ new Map();
|
|
11
|
+
function f(e, t) {
|
|
12
|
+
d.set(e, t);
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
return
|
|
14
|
+
function p(e) {
|
|
15
|
+
return d.get(e);
|
|
16
16
|
}
|
|
17
17
|
//#endregion
|
|
18
|
-
export {
|
|
18
|
+
export { o as CODE_MIRROR_ACTION, r as CODE_MIRROR_CARD, i as CodeMirror, a as CodeMirrorCard, s as onCodeMirrorChanged, f as registerExtensions, l as registerStreamParser, p as resolveExtensions, u as resolveStreamParser };
|
|
19
19
|
|
|
20
20
|
//# sourceMappingURL=codeMirror.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codeMirror.types.js","names":[],"sources":["../../../src/cards/codeMirror/codeMirror.types.ts"],"sourcesContent":["import {\n createCardDeclaration,\n createOnAction,\n registerActions,\n} from \"@pihanga2/core\";\nimport type {Extension} from \"@codemirror/state\";\nimport type {StreamParser} from \"@codemirror/language\";\n\nexport const CODE_MIRROR_CARD = \"code-mirror\";\n\nexport const
|
|
1
|
+
{"version":3,"file":"codeMirror.types.js","names":[],"sources":["../../../src/cards/codeMirror/codeMirror.types.ts"],"sourcesContent":["import {\n createCardDeclaration,\n createOnAction,\n registerActions,\n} from \"@pihanga2/core\";\nimport type {Extension} from \"@codemirror/state\";\nimport type {StreamParser} from \"@codemirror/language\";\n\nexport const CODE_MIRROR_CARD = \"code-mirror\";\n\nexport const CodeMirror = createCardDeclaration<\n CodeMirrorCardProps,\n CodeMirrorCardEvents\n>(CODE_MIRROR_CARD);\n\n/** @deprecated Use {@link CodeMirror} instead. */\nexport const CodeMirrorCard = CodeMirror;\n\nexport const CODE_MIRROR_ACTION = registerActions(CODE_MIRROR_CARD, [\n \"changed\",\n]);\n\nexport const onCodeMirrorChanged = createOnAction<ChangedEvent>(\n CODE_MIRROR_ACTION.CHANGED,\n);\n\n// ── StreamParser registry ────────────────────────────────────────────────────\n// Props must only contain JSON-serialisable primitives. Complex third-party\n// types (StreamParser, Extension) are stored here and referenced by string key.\n\nconst _streamParserRegistry = new Map<string, StreamParser<unknown>>();\n\n/**\n * Register a StreamParser under a caller-chosen key.\n * Call this once at app initialisation time, before the card is first rendered.\n *\n * @example\n * import { python } from \"@codemirror/legacy-modes/mode/python\";\n * import { registerStreamParser } from \"@pihanga2/codemirror/cards/codeMirror\";\n * registerStreamParser(\"python\", python);\n */\nexport function registerStreamParser(\n key: string,\n parser: StreamParser<unknown>,\n): void {\n _streamParserRegistry.set(key, parser);\n}\n\n/** @internal — used by the component only. */\nexport function resolveStreamParser(\n key: string,\n): StreamParser<unknown> | undefined {\n return _streamParserRegistry.get(key);\n}\n\n// ── Extension registry ───────────────────────────────────────────────────────\n\nconst _extensionsRegistry = new Map<string, Extension[]>();\n\n/**\n * Register a bundle of CodeMirror 6 extensions (themes, linters, keymaps, …)\n * under a caller-chosen key.\n * Call this once at app initialisation time, before the card is first rendered.\n *\n * @example\n * import { oneDark } from \"@codemirror/theme-one-dark\";\n * import { registerExtensions } from \"@pihanga2/codemirror/cards/codeMirror\";\n * registerExtensions(\"oneDark\", [oneDark]);\n */\nexport function registerExtensions(key: string, exts: Extension[]): void {\n _extensionsRegistry.set(key, exts);\n}\n\n/** @internal — used by the component only. */\nexport function resolveExtensions(key: string): Extension[] | undefined {\n return _extensionsRegistry.get(key);\n}\n\n// ── Card Props ───────────────────────────────────────────────────────────────\n\nexport type CodeMirrorCardProps = {\n /** The code content to display or edit. */\n value?: string;\n\n /** When true the editor is read-only. Default: false. */\n readOnly?: boolean;\n\n /**\n * Key of a StreamParser previously registered with `registerStreamParser()`.\n * Props must be JSON-serialisable — pass the string key, not the parser itself.\n *\n * @example\n * import { python } from \"@codemirror/legacy-modes/mode/python\";\n * registerStreamParser(\"python\", python);\n * CodeMirror({ streamLanguage: \"python\", value: \"print('hello')\" });\n */\n streamLanguage?: string;\n\n /**\n * Key of an Extension bundle previously registered with `registerExtensions()`.\n * Props must be JSON-serialisable — pass the string key, not the Extension objects.\n *\n * @example\n * import { oneDark } from \"@codemirror/theme-one-dark\";\n * registerExtensions(\"oneDark\", [oneDark]);\n * CodeMirror({ extensionsKey: \"oneDark\", ... });\n *\n * Note: `theme` looks up keys in this same registry, so a bundle registered\n * here can also be used as a theme.\n */\n extensionsKey?: string;\n\n /**\n * CodeMirror editor theme: \"light\", \"dark\", or the key of a theme bundle\n * registered with `registerExtensions()` (e.g. \"dracula\"). Default: \"light\".\n *\n * @example\n * import { draculaInit } from \"@uiw/codemirror-theme-dracula\";\n * registerExtensions(\"dracula\", [draculaInit()]);\n * CodeMirror({ theme: \"dracula\", ... });\n */\n theme?: \"light\" | \"dark\" | (string & {});\n\n /** Show line numbers in the gutter. Default: true. */\n lineNumbers?: boolean;\n\n /** Show the fold gutter (code folding). Default: true. */\n foldGutter?: boolean;\n\n /** Show a drop cursor while dragging text. Default: true. */\n dropCursor?: boolean;\n\n /** Allow multiple selection ranges. Default: true. */\n allowMultipleSelections?: boolean;\n\n /** Re-indent the current line as you type. Default: true. */\n indentOnInput?: boolean;\n\n /**\n * CSS height of the editor. Use \"auto\" to grow with content or a fixed\n * value such as \"400px\". Default: \"auto\".\n */\n height?: string;\n\n /** CSS minimum height of the editor, e.g. \"120px\". */\n minHeight?: string;\n\n /** CSS maximum height of the editor, e.g. \"600px\". Scrolls beyond this. */\n maxHeight?: string;\n\n /** Additional CSS class applied to the outer wrapper div. */\n className?: string;\n};\n\nexport type ChangedEvent = {\n /** The updated editor content after each change. */\n value: string;\n};\n\nexport type CodeMirrorCardEvents = {\n onChanged: ChangedEvent;\n};\n"],"mappings":";;AAQA,IAAa,IAAmB,eAEnB,IAAa,EAGxB,CAAgB,GAGL,IAAiB,GAEjB,IAAqB,EAAgB,GAAkB,CAClE,SACF,CAAC,GAEY,IAAsB,EACjC,EAAmB,OACrB,GAMM,oBAAwB,IAAI,IAAmC;AAWrE,SAAgB,EACd,GACA,GACM;CACN,EAAsB,IAAI,GAAK,CAAM;AACvC;AAGA,SAAgB,EACd,GACmC;CACnC,OAAO,EAAsB,IAAI,CAAG;AACtC;AAIA,IAAM,oBAAsB,IAAI,IAAyB;AAYzD,SAAgB,EAAmB,GAAa,GAAyB;CACvE,EAAoB,IAAI,GAAK,CAAI;AACnC;AAGA,SAAgB,EAAkB,GAAsC;CACtE,OAAO,EAAoB,IAAI,CAAG;AACpC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { CODE_MIRROR_ACTION as e, CODE_MIRROR_CARD as t,
|
|
2
|
-
import { CodeMirrorComponent as
|
|
3
|
-
import { actionTypesToEvents as
|
|
1
|
+
import { CODE_MIRROR_ACTION as e, CODE_MIRROR_CARD as t, CodeMirror as n, CodeMirrorCard as r, onCodeMirrorChanged as i, registerExtensions as a, registerStreamParser as o, resolveExtensions as s, resolveStreamParser as c } from "./codeMirror.types.js";
|
|
2
|
+
import { CodeMirrorComponent as l } from "./codeMirror.component.js";
|
|
3
|
+
import { actionTypesToEvents as u, registerCardComponent as d } from "@pihanga2/core";
|
|
4
4
|
//#region src/cards/codeMirror/index.ts
|
|
5
|
-
|
|
5
|
+
d({
|
|
6
6
|
name: t,
|
|
7
|
-
component:
|
|
8
|
-
events:
|
|
7
|
+
component: l,
|
|
8
|
+
events: u(e)
|
|
9
9
|
});
|
|
10
10
|
//#endregion
|
|
11
|
-
export { e as CODE_MIRROR_ACTION, t as CODE_MIRROR_CARD, n as
|
|
11
|
+
export { e as CODE_MIRROR_ACTION, t as CODE_MIRROR_CARD, n as CodeMirror, r as CodeMirrorCard, i as onCodeMirrorChanged, a as registerExtensions, o as registerStreamParser, s as resolveExtensions, c as resolveStreamParser };
|
|
12
12
|
|
|
13
13
|
//# sourceMappingURL=index.js.map
|