@jikjo/ui-kit 0.1.0

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.
@@ -0,0 +1,95 @@
1
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+ import { Extension, SelectionFormatState, SlashMenuItem } from "@jikjo/core";
3
+ import * as react0 from "react";
4
+ import { ReactNode } from "react";
5
+ import { LexicalEditor } from "lexical";
6
+
7
+ //#region src/editor-ui.d.ts
8
+ interface EditorUIProps {
9
+ extensions?: Extension[];
10
+ namespace?: string;
11
+ /**
12
+ * undefined → default toolbar
13
+ * false → no toolbar rendered at all
14
+ * ReactNode → custom toolbar content
15
+ */
16
+ toolbarContent?: ReactNode | false;
17
+ className?: string;
18
+ /**
19
+ * 활성화할 UI 기능 목록. 기본값: 모두 활성화.
20
+ * "blockHandle" | "inlineAdd" | "slashCommand" | "bubbleMenu"
21
+ */
22
+ features?: Array<"blockHandle" | "inlineAdd" | "slashCommand" | "bubbleMenu">;
23
+ }
24
+ declare function EditorUI({
25
+ extensions,
26
+ namespace,
27
+ toolbarContent,
28
+ className,
29
+ features
30
+ }: EditorUIProps): react_jsx_runtime0.JSX.Element;
31
+ //# sourceMappingURL=editor-ui.d.ts.map
32
+ //#endregion
33
+ //#region src/components/bubble-menu.d.ts
34
+ interface BubbleMenuProps {
35
+ isVisible: boolean;
36
+ format: SelectionFormatState;
37
+ onToggleFormat: (format: keyof SelectionFormatState) => void;
38
+ editor: LexicalEditor;
39
+ }
40
+ declare function BubbleMenu({
41
+ isVisible,
42
+ format,
43
+ onToggleFormat,
44
+ editor
45
+ }: BubbleMenuProps): react0.ReactPortal | null;
46
+ //# sourceMappingURL=bubble-menu.d.ts.map
47
+ //#endregion
48
+ //#region src/components/slash-menu.d.ts
49
+ interface SlashMenuProps {
50
+ isVisible: boolean;
51
+ query: string;
52
+ items: SlashMenuItem[];
53
+ editor: LexicalEditor;
54
+ onClose: () => void;
55
+ }
56
+ declare function SlashMenu({
57
+ isVisible,
58
+ query,
59
+ items,
60
+ editor,
61
+ onClose
62
+ }: SlashMenuProps): react0.ReactPortal | null;
63
+ //# sourceMappingURL=slash-menu.d.ts.map
64
+ //#endregion
65
+ //#region src/components/block-toolbar.d.ts
66
+ interface BlockToolbarProps {
67
+ isVisible: boolean;
68
+ nodeKey: string | null;
69
+ /** 현재 커서(포커스)가 있는 블록의 nodeKey */
70
+ focusedNodeKey: string | null;
71
+ items: SlashMenuItem[];
72
+ editor: LexicalEditor;
73
+ showDragHandle?: boolean;
74
+ showAddButton?: boolean;
75
+ /** drag 시작 시 드래그 중인 블록의 nodeKey를 부모에 전달 */
76
+ onDragStarted?: (nodeKey: string) => void;
77
+ /** drag & drop 완료 후 이동된 블록의 nodeKey를 부모에 전달 */
78
+ onDropped?: (nodeKey: string) => void;
79
+ }
80
+ declare function BlockToolbar({
81
+ isVisible,
82
+ nodeKey,
83
+ focusedNodeKey,
84
+ items,
85
+ editor,
86
+ showDragHandle,
87
+ showAddButton,
88
+ onDragStarted,
89
+ onDropped
90
+ }: BlockToolbarProps): react_jsx_runtime0.JSX.Element | null;
91
+ //# sourceMappingURL=block-toolbar.d.ts.map
92
+
93
+ //#endregion
94
+ export { BlockToolbar, type BlockToolbarProps, BubbleMenu, type BubbleMenuProps, EditorUI, type EditorUIProps, SlashMenu, type SlashMenuProps };
95
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/editor-ui.tsx","../src/components/bubble-menu.tsx","../src/components/slash-menu.tsx","../src/components/block-toolbar.tsx"],"sourcesContent":[],"mappings":";;;;;;;UAqGiB,aAAA;eACF;;;;AADf;;;gBAQmB,CAAA,EAAA,SAAA,GAAA,KAAA;WAMN,CAAA,EAAA,MAAA;EAAK;AA4QlB;;;UAEE,CAAA,EA9QW,KA8QX,CAAA,aAAA,GAAA,WAAA,GAAA,cAAA,GAAA,YAAA,CAAA;;AAEA,iBAJc,QAAA,CAId;EAAA,UAAA;EAAA,SAAA;EAAA,cAAA;EAAA,SAAA;EAAA;AAAA,CAAA,EAEC,aAFD,CAAA,EAEc,kBAAA,CAAA,GAAA,CAAA,OAFd;;;;UCxXe,eAAA;;UAEP;iCACuB;UACvB;ADsFV;AAA8B,iBCpBd,UAAA,CDoBc;EAAA,SAAA;EAAA,MAAA;EAAA,cAAA;EAAA;AAAA,CAAA,ECf3B,eDe2B,CAAA,ECfZ,MAAA,CAAA,WAAA,GDeY,IAAA;;;;UEzFb,cAAA;;;SAGR;UACC;EFqFO,OAAA,EAAA,GAAA,GAAA,IAAa;;AACf,iBExCC,SAAA,CFwCD;EAAA,SAAA;EAAA,KAAA;EAAA,KAAA;EAAA,MAAA;EAAA;AAAA,CAAA,EElCZ,cFkCY,CAAA,EElCE,MAAA,CAAA,WAAA,GFkCF,IAAA;;;;UGvEE,iBAAA;;;;;EHsEA,KAAA,EGjER,aHiEqB,EAAA;EAAA,MAAA,EGhEpB,aHgEoB;gBACf,CAAA,EAAA,OAAA;eAOI,CAAA,EAAA,OAAA;;EAMD,aAAA,CAAA,EAAA,CAAA,OAAA,EAAA,MAAA,EAAA,GAAA,IAAA;EA4QF;EAAQ,SAAA,CAAA,EAAA,CAAA,OAAA,EAAA,MAAA,EAAA,GAAA,IAAA;;AAEtB,iBG/Rc,YAAA,CH+Rd;EAAA,SAAA;EAAA,OAAA;EAAA,cAAA;EAAA,KAAA;EAAA,MAAA;EAAA,cAAA;EAAA,aAAA;EAAA,aAAA;EAAA;AAAA,CAAA,EGrRC,iBHqRD,CAAA,EGrRkB,kBAAA,CAAA,GAAA,CAAA,OAAA,GHqRlB,IAAA"}
@@ -0,0 +1,95 @@
1
+ import { Extension, SelectionFormatState, SlashMenuItem } from "@jikjo/core";
2
+ import { LexicalEditor } from "lexical";
3
+ import * as react0 from "react";
4
+ import { ReactNode } from "react";
5
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
6
+
7
+ //#region src/editor-ui.d.ts
8
+ interface EditorUIProps {
9
+ extensions?: Extension[];
10
+ namespace?: string;
11
+ /**
12
+ * undefined → default toolbar
13
+ * false → no toolbar rendered at all
14
+ * ReactNode → custom toolbar content
15
+ */
16
+ toolbarContent?: ReactNode | false;
17
+ className?: string;
18
+ /**
19
+ * 활성화할 UI 기능 목록. 기본값: 모두 활성화.
20
+ * "blockHandle" | "inlineAdd" | "slashCommand" | "bubbleMenu"
21
+ */
22
+ features?: Array<"blockHandle" | "inlineAdd" | "slashCommand" | "bubbleMenu">;
23
+ }
24
+ declare function EditorUI({
25
+ extensions,
26
+ namespace,
27
+ toolbarContent,
28
+ className,
29
+ features
30
+ }: EditorUIProps): react_jsx_runtime0.JSX.Element;
31
+ //# sourceMappingURL=editor-ui.d.ts.map
32
+ //#endregion
33
+ //#region src/components/bubble-menu.d.ts
34
+ interface BubbleMenuProps {
35
+ isVisible: boolean;
36
+ format: SelectionFormatState;
37
+ onToggleFormat: (format: keyof SelectionFormatState) => void;
38
+ editor: LexicalEditor;
39
+ }
40
+ declare function BubbleMenu({
41
+ isVisible,
42
+ format,
43
+ onToggleFormat,
44
+ editor
45
+ }: BubbleMenuProps): react0.ReactPortal | null;
46
+ //# sourceMappingURL=bubble-menu.d.ts.map
47
+ //#endregion
48
+ //#region src/components/slash-menu.d.ts
49
+ interface SlashMenuProps {
50
+ isVisible: boolean;
51
+ query: string;
52
+ items: SlashMenuItem[];
53
+ editor: LexicalEditor;
54
+ onClose: () => void;
55
+ }
56
+ declare function SlashMenu({
57
+ isVisible,
58
+ query,
59
+ items,
60
+ editor,
61
+ onClose
62
+ }: SlashMenuProps): react0.ReactPortal | null;
63
+ //# sourceMappingURL=slash-menu.d.ts.map
64
+ //#endregion
65
+ //#region src/components/block-toolbar.d.ts
66
+ interface BlockToolbarProps {
67
+ isVisible: boolean;
68
+ nodeKey: string | null;
69
+ /** 현재 커서(포커스)가 있는 블록의 nodeKey */
70
+ focusedNodeKey: string | null;
71
+ items: SlashMenuItem[];
72
+ editor: LexicalEditor;
73
+ showDragHandle?: boolean;
74
+ showAddButton?: boolean;
75
+ /** drag 시작 시 드래그 중인 블록의 nodeKey를 부모에 전달 */
76
+ onDragStarted?: (nodeKey: string) => void;
77
+ /** drag & drop 완료 후 이동된 블록의 nodeKey를 부모에 전달 */
78
+ onDropped?: (nodeKey: string) => void;
79
+ }
80
+ declare function BlockToolbar({
81
+ isVisible,
82
+ nodeKey,
83
+ focusedNodeKey,
84
+ items,
85
+ editor,
86
+ showDragHandle,
87
+ showAddButton,
88
+ onDragStarted,
89
+ onDropped
90
+ }: BlockToolbarProps): react_jsx_runtime0.JSX.Element | null;
91
+ //# sourceMappingURL=block-toolbar.d.ts.map
92
+
93
+ //#endregion
94
+ export { BlockToolbar, type BlockToolbarProps, BubbleMenu, type BubbleMenuProps, EditorUI, type EditorUIProps, SlashMenu, type SlashMenuProps };
95
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/editor-ui.tsx","../src/components/bubble-menu.tsx","../src/components/slash-menu.tsx","../src/components/block-toolbar.tsx"],"sourcesContent":[],"mappings":";;;;;;;UAqGiB,aAAA;eACF;;;;AADf;;;gBAQmB,CAAA,EAAA,SAAA,GAAA,KAAA;WAMN,CAAA,EAAA,MAAA;EAAK;AA4QlB;;;UAEE,CAAA,EA9QW,KA8QX,CAAA,aAAA,GAAA,WAAA,GAAA,cAAA,GAAA,YAAA,CAAA;;AAEA,iBAJc,QAAA,CAId;EAAA,UAAA;EAAA,SAAA;EAAA,cAAA;EAAA,SAAA;EAAA;AAAA,CAAA,EAEC,aAFD,CAAA,EAEc,kBAAA,CAAA,GAAA,CAAA,OAFd;;;;UCxXe,eAAA;;UAEP;iCACuB;UACvB;ADsFV;AAA8B,iBCpBd,UAAA,CDoBc;EAAA,SAAA;EAAA,MAAA;EAAA,cAAA;EAAA;AAAA,CAAA,ECf3B,eDe2B,CAAA,ECfZ,MAAA,CAAA,WAAA,GDeY,I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