@collabchron/notiq 1.1.12 → 1.2.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.
- package/dist/AICommandBarPlugin-ZEC755KY.mjs +27 -0
- package/dist/{AIDialog-RHRYHSVN.mjs → AIDialog-HJW6PQPR.mjs} +11 -12
- package/dist/{AudioComponent-CKLMLB5T.mjs → AudioComponent-W5XMZPQB.mjs} +10 -6
- package/dist/{DynamicBlockComponent-2LOADZUX.mjs → DynamicBlockComponent-CHRL2GAQ.mjs} +7 -6
- package/dist/{EquationComponent-4NFG55NQ.mjs → EquationComponent-GNQHG53L.mjs} +26 -7
- package/dist/{ExcalidrawComponent-BMSYIPP6.mjs → ExcalidrawComponent-POMYXDSG.mjs} +33 -6
- package/dist/{FileComponent-Y56MX5QD.mjs → FileComponent-EOVCH4V5.mjs} +9 -5
- package/dist/{HintComponet-ET7M2Q7S.mjs → HintComponet-QXL5ESND.mjs} +32 -8
- package/dist/{InlineImageComponent-FVTA4LXZ.mjs → InlineImageComponent-KDN3VGZC.mjs} +8 -3
- package/dist/{StoryBuilderComponent-JN4ZPZOW.mjs → StoryBuilderComponent-CBRFPFTR.mjs} +8 -9
- package/dist/{chunk-6UVNHT3T.mjs → chunk-4SYRK2NH.mjs} +23 -1
- package/dist/chunk-5CJZC5IB.mjs +9086 -0
- package/dist/{chunk-FO7M3X2B.mjs → chunk-6NK5DONB.mjs} +1 -1
- package/dist/{chunk-N6ILV6NF.mjs → chunk-ACW4DLVO.mjs} +21 -7
- package/dist/chunk-BCGD2YXP.mjs +574 -0
- package/dist/{chunk-TC3IISJZ.mjs → chunk-BTR3TPIN.mjs} +18 -5
- package/dist/{chunk-ZYJ7KABY.mjs → chunk-CQCS5YPS.mjs} +3 -5
- package/dist/{chunk-T2UBAZ66.mjs → chunk-D4UBNSUW.mjs} +1 -1
- package/dist/{chunk-KNW2CGIP.mjs → chunk-DBRZIA43.mjs} +4 -1
- package/dist/{chunk-CDAMHK63.mjs → chunk-GJK2L7ZM.mjs} +23 -2
- package/dist/{chunk-ELBTVBTS.mjs → chunk-IKYVBTCJ.mjs} +43 -20
- package/dist/chunk-IXRA5D53.mjs +10447 -0
- package/dist/{chunk-W6VQSFE5.mjs → chunk-J2CEQXG4.mjs} +1 -1
- package/dist/{chunk-43Z4Z2KD.mjs → chunk-JTNLN4JI.mjs} +1 -1
- package/dist/{chunk-OE5JRLCN.mjs → chunk-ONOHG5NB.mjs} +6 -4
- package/dist/{chunk-QNIY45SF.mjs → chunk-OO42URWA.mjs} +27 -6
- package/dist/chunk-PBVRSNGU.mjs +129 -0
- package/dist/chunk-QCS57TIF.mjs +1794 -0
- package/dist/chunk-RNEIJRUS.mjs +60 -0
- package/dist/chunk-TJPTGECP.mjs +1556 -0
- package/dist/{chunk-XYMXGU4T.mjs → chunk-TMYRA2W4.mjs} +1 -1
- package/dist/{chunk-ZFV2HGD3.mjs → chunk-UNEFOZTS.mjs} +1 -1
- package/dist/chunk-X4NI7EQS.mjs +282 -0
- package/dist/{chunk-5D4JF3ZZ.mjs → chunk-XAJ4GACN.mjs} +171 -49
- package/dist/{chunk-7QRJVZQY.mjs → chunk-YVUQRJVV.mjs} +63 -18
- package/dist/components/editor/index.d.ts +1 -1
- package/dist/components/editor/nodes/EquationNode/EquationNode.d.ts +1 -0
- package/dist/components/editor/nodes/Hint/index.d.ts +2 -1
- package/dist/components/editor/plugins/AICommandBarPlugin/index.d.ts +73 -1
- package/dist/components/editor/plugins/DraggableBlockPlugin/index.d.ts +25 -3
- package/dist/components/editor/plugins/InlineCopilotPlugin/index.d.ts +16 -3
- package/dist/components/editor/plugins/LinkWithMetaData/index.d.ts +20 -25
- package/dist/components/editor/plugins/MarkdownPastePlugin/index.d.ts +5 -0
- package/dist/components/editor/plugins/MarkdownTransformers/index.d.ts +2 -0
- package/dist/components/editor/plugins/SlashCommand/index.d.ts +18 -1
- package/dist/components/editor/plugins/SmartTypographyPlugin/index.d.ts +26 -0
- package/dist/components/editor/utils/aiStream.d.ts +27 -0
- package/dist/components/editor/utils/excalidrawDiagramBuilder.d.ts +29 -0
- package/dist/components/editor/utils/markdownTransformers.d.ts +4 -1
- package/dist/components/editor/utils/url.d.ts +16 -4
- package/dist/components/providers/AIContext.d.ts +8 -0
- package/dist/components/ui/equation/equationTypography.d.ts +23 -0
- package/dist/core/extension.d.ts +3 -1
- package/dist/core/extensions/blocks-kit.d.ts +22 -1
- package/dist/core/extensions/copilot-and-collab.d.ts +15 -1
- package/dist/core/react/NotiqContent.d.ts +4 -1
- package/dist/core/react/index.d.ts +1 -0
- package/dist/core/react/node-renderers.d.ts +73 -0
- package/dist/core.js +15429 -13116
- package/dist/core.mjs +47 -39
- package/dist/hooks/instructions-messages.d.ts +13 -4
- package/dist/{image-QPB2CVXP.mjs → image-AL6PHM2A.mjs} +17 -12
- package/dist/index.js +15526 -13194
- package/dist/index.mjs +64 -60
- package/dist/{insert-audio-I3PD6JFS.mjs → insert-audio-CRWR7EO5.mjs} +4 -6
- package/dist/{insert-file-PHR7XL4V.mjs → insert-file-I73AZW3L.mjs} +4 -6
- package/dist/{insert-gif-R5ZO4JHC.mjs → insert-gif-KWRC3ACT.mjs} +1 -1
- package/dist/{insert-image-PLBZELHK.mjs → insert-image-XIY6BGW5.mjs} +4 -3
- package/dist/{insert-poll-6BCIFY5G.mjs → insert-poll-J5YVZNZ4.mjs} +4 -3
- package/dist/{insert-table-ZRJP6X52.mjs → insert-table-OIMJRFFK.mjs} +1 -1
- package/dist/{poll-component-VHMM5KKZ.mjs → poll-component-TVHXIKGQ.mjs} +3 -2
- package/dist/react.js +14747 -12554
- package/dist/react.mjs +40 -38
- package/dist/{stepper-KNITDVLG.mjs → stepper-ILF7YXTO.mjs} +63 -73
- package/dist/styles/notiq.css +1 -1
- package/package.json +2 -2
- package/src/styles/notiq.css +20 -0
- package/dist/AICommandBarPlugin-TADJ3X2Y.mjs +0 -12
- package/dist/CodeActionMenuPlugin-FGH6HZLL.mjs +0 -14
- package/dist/CollaborationPlugin-TIZOQBUT.mjs +0 -405
- package/dist/CollaboratorsBar-AMPIAUOY.mjs +0 -20
- package/dist/CommentsPlugin-SDJJTUGK.mjs +0 -19
- package/dist/ExcalidrawPlugin-QLPGJPSX.mjs +0 -14
- package/dist/ExportPlugin-MJHYKQZJ.mjs +0 -43
- package/dist/FloatingLinkEditorPlugin-MABB34L7.mjs +0 -12
- package/dist/FloatingTextFormatToolbarPlugin-BXCPN3KD.mjs +0 -45
- package/dist/InlineCopilotPlugin-PNS5Y6OO.mjs +0 -360
- package/dist/MobileToolbar-KV5DX4ED.mjs +0 -982
- package/dist/SlashCommand-SPR7G5EI.mjs +0 -39
- package/dist/TableCellActionMenuPlugin-YWBA64J7.mjs +0 -838
- package/dist/TableHoverActionsPlugin-2EIXHEXN.mjs +0 -265
- package/dist/TemplatePlugin-HNTPEXBB.mjs +0 -9
- package/dist/ToolbarPlugin-F52PVNXU.mjs +0 -823
- package/dist/VersionHistoryPlugin-YWGCREKA.mjs +0 -371
- package/dist/background-color-RW5JYLMG.mjs +0 -425
- package/dist/block-format-TODFREE2.mjs +0 -14
- package/dist/chunk-22ZIL6NH.mjs +0 -88
- package/dist/chunk-2LNT36RL.mjs +0 -555
- package/dist/chunk-37LC44W3.mjs +0 -2677
- package/dist/chunk-3IILA3IP.mjs +0 -28
- package/dist/chunk-4DVIYZVB.mjs +0 -193
- package/dist/chunk-4FFTOZGJ.mjs +0 -103
- package/dist/chunk-4UMUPCDK.mjs +0 -68
- package/dist/chunk-6D6QLRYR.mjs +0 -238
- package/dist/chunk-6FQFPPLG.mjs +0 -785
- package/dist/chunk-ACV47ZKE.mjs +0 -201
- package/dist/chunk-BGV62GC2.mjs +0 -26
- package/dist/chunk-C4JWLBYN.mjs +0 -132
- package/dist/chunk-CLRSETYQ.mjs +0 -431
- package/dist/chunk-D3IOUQFR.mjs +0 -441
- package/dist/chunk-EEBA6OAH.mjs +0 -59
- package/dist/chunk-EIZMKFHF.mjs +0 -32
- package/dist/chunk-ENH2IOHI.mjs +0 -1828
- package/dist/chunk-EVPWKNE4.mjs +0 -27
- package/dist/chunk-HOZ4QRFV.mjs +0 -536
- package/dist/chunk-IAFCQV3Z.mjs +0 -349
- package/dist/chunk-J6ZUY5BY.mjs +0 -202
- package/dist/chunk-K5OAFEVY.mjs +0 -191
- package/dist/chunk-KXRLARGI.mjs +0 -26
- package/dist/chunk-LBGM4VVZ.mjs +0 -409
- package/dist/chunk-LLGVCM7M.mjs +0 -809
- package/dist/chunk-LU2XWLOE.mjs +0 -219
- package/dist/chunk-LVRJM45C.mjs +0 -171
- package/dist/chunk-MSAO3YFB.mjs +0 -144
- package/dist/chunk-N3KDPSRI.mjs +0 -496
- package/dist/chunk-OXWTZV3U.mjs +0 -174
- package/dist/chunk-PD5K4AGP.mjs +0 -64
- package/dist/chunk-PFH63ZU4.mjs +0 -33
- package/dist/chunk-R7WFRENU.mjs +0 -262
- package/dist/chunk-RAVYEEIC.mjs +0 -36
- package/dist/chunk-RJQTA6HG.mjs +0 -358
- package/dist/chunk-SAOJHVPE.mjs +0 -153
- package/dist/chunk-SYUCM5G5.mjs +0 -111
- package/dist/chunk-VGAX6YEY.mjs +0 -399
- package/dist/chunk-VNDDDXGH.mjs +0 -682
- package/dist/chunk-WUVIQCX7.mjs +0 -944
- package/dist/chunk-XNJNT6PC.mjs +0 -1701
- package/dist/chunk-XYLTLGY5.mjs +0 -775
- package/dist/chunk-ZKZ7MLSS.mjs +0 -165
- package/dist/color-S55XFDYQ.mjs +0 -13
- package/dist/font-IJKFR4BM.mjs +0 -12
- package/dist/font-size-3HMJHKO2.mjs +0 -15
- package/dist/insert-node-DGCZBGKG.mjs +0 -243
- package/dist/table-dropdown-4VCRSQB6.mjs +0 -391
- package/dist/text-align-TEB4S52S.mjs +0 -121
- package/dist/text-format-T3IY7FBI.mjs +0 -15
package/dist/react.mjs
CHANGED
|
@@ -8,59 +8,61 @@ import {
|
|
|
8
8
|
NotiqProvider,
|
|
9
9
|
useNotiq,
|
|
10
10
|
useNotiqContext
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-XYLTLGY5.mjs";
|
|
21
|
-
import "./chunk-IAFCQV3Z.mjs";
|
|
22
|
-
import "./chunk-BGV62GC2.mjs";
|
|
23
|
-
import "./chunk-K5OAFEVY.mjs";
|
|
24
|
-
import "./chunk-LVRJM45C.mjs";
|
|
11
|
+
} from "./chunk-5CJZC5IB.mjs";
|
|
12
|
+
import "./chunk-IXRA5D53.mjs";
|
|
13
|
+
import "./chunk-J2CEQXG4.mjs";
|
|
14
|
+
import "./chunk-TJPTGECP.mjs";
|
|
15
|
+
import "./chunk-BCGD2YXP.mjs";
|
|
16
|
+
import "./chunk-3JN6QEJR.mjs";
|
|
17
|
+
import "./chunk-4SYRK2NH.mjs";
|
|
18
|
+
import "./chunk-D4UBNSUW.mjs";
|
|
19
|
+
import "./chunk-JTNLN4JI.mjs";
|
|
25
20
|
import "./chunk-N3WTT2U6.mjs";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-XYMXGU4T.mjs";
|
|
34
|
-
import "./chunk-ZFV2HGD3.mjs";
|
|
35
|
-
import "./chunk-6D6QLRYR.mjs";
|
|
36
|
-
import "./chunk-4FFTOZGJ.mjs";
|
|
37
|
-
import "./chunk-OXWTZV3U.mjs";
|
|
38
|
-
import "./chunk-R7WFRENU.mjs";
|
|
39
|
-
import "./chunk-RJQTA6HG.mjs";
|
|
40
|
-
import "./chunk-PFH63ZU4.mjs";
|
|
41
|
-
import "./chunk-EVPWKNE4.mjs";
|
|
21
|
+
import "./chunk-6NK5DONB.mjs";
|
|
22
|
+
import "./chunk-CQCS5YPS.mjs";
|
|
23
|
+
import "./chunk-QCS57TIF.mjs";
|
|
24
|
+
import "./chunk-ACW4DLVO.mjs";
|
|
25
|
+
import "./chunk-TMYRA2W4.mjs";
|
|
26
|
+
import "./chunk-UNEFOZTS.mjs";
|
|
27
|
+
import "./chunk-GJK2L7ZM.mjs";
|
|
42
28
|
import "./chunk-NBE6FF6L.mjs";
|
|
43
|
-
import "./chunk-ELBTVBTS.mjs";
|
|
44
29
|
import "./chunk-5NRAXWYA.mjs";
|
|
30
|
+
import "./chunk-IKYVBTCJ.mjs";
|
|
45
31
|
import "./chunk-IUOUIDEQ.mjs";
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-X4NI7EQS.mjs";
|
|
33
|
+
import "./chunk-BTR3TPIN.mjs";
|
|
34
|
+
import "./chunk-H3P47YXJ.mjs";
|
|
35
|
+
import "./chunk-OO42URWA.mjs";
|
|
36
|
+
import "./chunk-ONOHG5NB.mjs";
|
|
37
|
+
import "./chunk-PBVRSNGU.mjs";
|
|
38
|
+
import "./chunk-DBRZIA43.mjs";
|
|
52
39
|
import "./chunk-IIVB6JNE.mjs";
|
|
40
|
+
import "./chunk-YVUQRJVV.mjs";
|
|
41
|
+
import {
|
|
42
|
+
NodeRendererSlot,
|
|
43
|
+
NotiqNodeRendererProvider,
|
|
44
|
+
clearEditorNodeRenderers,
|
|
45
|
+
getEditorNodeRenderers,
|
|
46
|
+
setEditorNodeRenderers,
|
|
47
|
+
useNotiqNodeRenderers
|
|
48
|
+
} from "./chunk-RNEIJRUS.mjs";
|
|
53
49
|
import "./chunk-JHXDLYEV.mjs";
|
|
54
50
|
import "./chunk-WYCFGRFJ.mjs";
|
|
55
51
|
export {
|
|
56
52
|
BubbleMenu,
|
|
57
53
|
NotiqContent as EditorContent,
|
|
58
54
|
FloatingMenu,
|
|
55
|
+
NodeRendererSlot,
|
|
59
56
|
NotiqContent,
|
|
60
57
|
NotiqContext,
|
|
61
58
|
NotiqEditor,
|
|
59
|
+
NotiqNodeRendererProvider,
|
|
62
60
|
NotiqProvider,
|
|
61
|
+
clearEditorNodeRenderers,
|
|
62
|
+
getEditorNodeRenderers,
|
|
63
|
+
setEditorNodeRenderers,
|
|
63
64
|
useNotiq as useEditor,
|
|
64
65
|
useNotiq,
|
|
65
|
-
useNotiqContext
|
|
66
|
+
useNotiqContext,
|
|
67
|
+
useNotiqNodeRenderers
|
|
66
68
|
};
|
|
@@ -1,81 +1,50 @@
|
|
|
1
1
|
import {
|
|
2
|
-
CodeActionMenuPlugin
|
|
3
|
-
} from "./chunk-N3KDPSRI.mjs";
|
|
4
|
-
import "./chunk-EEBA6OAH.mjs";
|
|
5
|
-
import "./chunk-3IILA3IP.mjs";
|
|
6
|
-
import {
|
|
7
|
-
FloatingLinkEditorPlugin
|
|
8
|
-
} from "./chunk-D3IOUQFR.mjs";
|
|
9
|
-
import {
|
|
10
|
-
SlashCommand
|
|
11
|
-
} from "./chunk-6FQFPPLG.mjs";
|
|
12
|
-
import {
|
|
13
|
-
FloatingTextFormatToolbarPlugin
|
|
14
|
-
} from "./chunk-XNJNT6PC.mjs";
|
|
15
|
-
import "./chunk-PD5K4AGP.mjs";
|
|
16
|
-
import "./chunk-KXRLARGI.mjs";
|
|
17
|
-
import "./chunk-SYUCM5G5.mjs";
|
|
18
|
-
import "./chunk-SAOJHVPE.mjs";
|
|
19
|
-
import "./chunk-C4JWLBYN.mjs";
|
|
20
|
-
import "./chunk-ENH2IOHI.mjs";
|
|
21
|
-
import "./chunk-ZYJ7KABY.mjs";
|
|
22
|
-
import "./chunk-MSAO3YFB.mjs";
|
|
23
|
-
import "./chunk-LU2XWLOE.mjs";
|
|
24
|
-
import "./chunk-WUVIQCX7.mjs";
|
|
25
|
-
import "./chunk-3JN6QEJR.mjs";
|
|
26
|
-
import "./chunk-CLRSETYQ.mjs";
|
|
27
|
-
import "./chunk-6UVNHT3T.mjs";
|
|
28
|
-
import {
|
|
2
|
+
CodeActionMenuPlugin,
|
|
29
3
|
CodeHighlightPlugin,
|
|
4
|
+
FloatingLinkEditorPlugin,
|
|
5
|
+
FloatingTextFormatToolbarPlugin,
|
|
30
6
|
LexicalAutoLinkPlugin,
|
|
7
|
+
SlashCommand
|
|
8
|
+
} from "./chunk-IXRA5D53.mjs";
|
|
9
|
+
import "./chunk-J2CEQXG4.mjs";
|
|
10
|
+
import {
|
|
31
11
|
LinkWithMetaDataPlugin,
|
|
32
12
|
nestedNodes
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-IAFCQV3Z.mjs";
|
|
39
|
-
import "./chunk-BGV62GC2.mjs";
|
|
40
|
-
import "./chunk-K5OAFEVY.mjs";
|
|
41
|
-
import "./chunk-LVRJM45C.mjs";
|
|
13
|
+
} from "./chunk-BCGD2YXP.mjs";
|
|
14
|
+
import "./chunk-3JN6QEJR.mjs";
|
|
15
|
+
import "./chunk-4SYRK2NH.mjs";
|
|
16
|
+
import "./chunk-D4UBNSUW.mjs";
|
|
17
|
+
import "./chunk-JTNLN4JI.mjs";
|
|
42
18
|
import {
|
|
43
19
|
ImagesPlugin
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-6NK5DONB.mjs";
|
|
21
|
+
import "./chunk-CQCS5YPS.mjs";
|
|
46
22
|
import {
|
|
47
23
|
$isStepperNode,
|
|
48
24
|
safelySetEditorState
|
|
49
|
-
} from "./chunk-
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import "./chunk-
|
|
53
|
-
import "./chunk-43Z4Z2KD.mjs";
|
|
54
|
-
import "./chunk-XYMXGU4T.mjs";
|
|
55
|
-
import "./chunk-ZFV2HGD3.mjs";
|
|
56
|
-
import "./chunk-6D6QLRYR.mjs";
|
|
57
|
-
import "./chunk-4FFTOZGJ.mjs";
|
|
58
|
-
import "./chunk-OXWTZV3U.mjs";
|
|
59
|
-
import "./chunk-R7WFRENU.mjs";
|
|
60
|
-
import "./chunk-RJQTA6HG.mjs";
|
|
61
|
-
import "./chunk-PFH63ZU4.mjs";
|
|
62
|
-
import "./chunk-CDAMHK63.mjs";
|
|
25
|
+
} from "./chunk-QCS57TIF.mjs";
|
|
26
|
+
import "./chunk-ACW4DLVO.mjs";
|
|
27
|
+
import "./chunk-TMYRA2W4.mjs";
|
|
28
|
+
import "./chunk-UNEFOZTS.mjs";
|
|
63
29
|
import {
|
|
64
30
|
useSharedHistoryContext
|
|
65
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-GJK2L7ZM.mjs";
|
|
66
32
|
import "./chunk-NBE6FF6L.mjs";
|
|
67
|
-
import "./chunk-ELBTVBTS.mjs";
|
|
68
33
|
import "./chunk-5NRAXWYA.mjs";
|
|
34
|
+
import "./chunk-IKYVBTCJ.mjs";
|
|
69
35
|
import "./chunk-IUOUIDEQ.mjs";
|
|
70
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-X4NI7EQS.mjs";
|
|
71
37
|
import "./chunk-H3P47YXJ.mjs";
|
|
72
|
-
import "./chunk-
|
|
73
|
-
import "./chunk-
|
|
74
|
-
import "./chunk-
|
|
75
|
-
import "./chunk-
|
|
76
|
-
import "./chunk-7QRJVZQY.mjs";
|
|
38
|
+
import "./chunk-OO42URWA.mjs";
|
|
39
|
+
import "./chunk-ONOHG5NB.mjs";
|
|
40
|
+
import "./chunk-PBVRSNGU.mjs";
|
|
41
|
+
import "./chunk-DBRZIA43.mjs";
|
|
77
42
|
import "./chunk-IIVB6JNE.mjs";
|
|
78
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-YVUQRJVV.mjs";
|
|
44
|
+
import "./chunk-RNEIJRUS.mjs";
|
|
45
|
+
import {
|
|
46
|
+
cn
|
|
47
|
+
} from "./chunk-JHXDLYEV.mjs";
|
|
79
48
|
import {
|
|
80
49
|
init_react_shim
|
|
81
50
|
} from "./chunk-WYCFGRFJ.mjs";
|
|
@@ -106,6 +75,7 @@ import {
|
|
|
106
75
|
COMMAND_PRIORITY_LOW,
|
|
107
76
|
SELECTION_CHANGE_COMMAND
|
|
108
77
|
} from "lexical";
|
|
78
|
+
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
109
79
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
110
80
|
function Step({
|
|
111
81
|
item,
|
|
@@ -114,6 +84,8 @@ function Step({
|
|
|
114
84
|
remove,
|
|
115
85
|
updateTitle
|
|
116
86
|
}) {
|
|
87
|
+
const [parentEditor] = useLexicalComposerContext();
|
|
88
|
+
const isEditable = parentEditor.isEditable();
|
|
117
89
|
if (!item || typeof item !== "object") {
|
|
118
90
|
return null;
|
|
119
91
|
}
|
|
@@ -127,11 +99,16 @@ function Step({
|
|
|
127
99
|
if ((item == null ? void 0 : item.content) && typeof item.content.isEditable === "function") {
|
|
128
100
|
return item.content;
|
|
129
101
|
}
|
|
130
|
-
const newEditor = createEditor({ nodes: [...nestedNodes] });
|
|
102
|
+
const newEditor = createEditor({ nodes: [...nestedNodes], editable: isEditable });
|
|
131
103
|
const rawContent = ((_a = item == null ? void 0 : item.content) == null ? void 0 : _a.editorState) || (item == null ? void 0 : item.content);
|
|
132
104
|
safelySetEditorState(newEditor, rawContent);
|
|
133
105
|
return newEditor;
|
|
134
|
-
}, [item == null ? void 0 : item.content]);
|
|
106
|
+
}, [item == null ? void 0 : item.content, isEditable]);
|
|
107
|
+
useEffect(() => {
|
|
108
|
+
if (editorInstance && typeof editorInstance.setEditable === "function") {
|
|
109
|
+
editorInstance.setEditable(isEditable);
|
|
110
|
+
}
|
|
111
|
+
}, [editorInstance, isEditable]);
|
|
135
112
|
const handleTitleBlur = () => {
|
|
136
113
|
if (titleRef.current) {
|
|
137
114
|
updateTitle(item.id, titleRef.current.textContent);
|
|
@@ -170,6 +147,7 @@ function Step({
|
|
|
170
147
|
{
|
|
171
148
|
value: item,
|
|
172
149
|
id: (item == null ? void 0 : item.id) ? item.id.toString() : String(numberd),
|
|
150
|
+
dragListener: isEditable,
|
|
173
151
|
initial: { opacity: 0, y: 30 },
|
|
174
152
|
animate: { opacity: 1, y: 0, transition: { duration: 0.15 } },
|
|
175
153
|
exit: { opacity: 0, y: 20, transition: { duration: 0.3 } },
|
|
@@ -178,7 +156,10 @@ function Step({
|
|
|
178
156
|
/* @__PURE__ */ jsx(
|
|
179
157
|
"div",
|
|
180
158
|
{
|
|
181
|
-
className:
|
|
159
|
+
className: cn(
|
|
160
|
+
"h-7 w-7 absolute max-sm:w-5 max-sm:h-5 max-sm:text-xs rounded-full z-50 bg-muted flex items-center justify-center",
|
|
161
|
+
isEditable ? "cursor-grab" : "cursor-default"
|
|
162
|
+
),
|
|
182
163
|
children: numberd + 1
|
|
183
164
|
}
|
|
184
165
|
),
|
|
@@ -187,16 +168,19 @@ function Step({
|
|
|
187
168
|
/* @__PURE__ */ jsx(
|
|
188
169
|
"div",
|
|
189
170
|
{
|
|
190
|
-
contentEditable:
|
|
171
|
+
contentEditable: isEditable,
|
|
191
172
|
suppressContentEditableWarning: true,
|
|
192
173
|
ref: titleRef,
|
|
193
174
|
onBlur: handleTitleBlur,
|
|
194
175
|
onKeyDown: handleTitleKeyDown,
|
|
195
|
-
className:
|
|
176
|
+
className: cn(
|
|
177
|
+
"flex-1 scroll-m-20 border-none outline-none break-words max-sm:text-lg text-2xl font-semibold tracking-tight",
|
|
178
|
+
isEditable ? "cursor-text" : "cursor-default select-text"
|
|
179
|
+
),
|
|
196
180
|
children: item.title
|
|
197
181
|
}
|
|
198
182
|
),
|
|
199
|
-
/* @__PURE__ */ jsx(
|
|
183
|
+
isEditable && /* @__PURE__ */ jsx(
|
|
200
184
|
"button",
|
|
201
185
|
{
|
|
202
186
|
type: "button",
|
|
@@ -230,11 +214,15 @@ function Step({
|
|
|
230
214
|
contentEditable: /* @__PURE__ */ jsx("div", { ref: onRef, className: "relative", children: /* @__PURE__ */ jsx(
|
|
231
215
|
ContentEditable,
|
|
232
216
|
{
|
|
233
|
-
className:
|
|
234
|
-
|
|
235
|
-
|
|
217
|
+
className: cn(
|
|
218
|
+
"h-fit w-full resize-none relative outline-none select-text whitespace-pre-wrap break-words",
|
|
219
|
+
isEditable ? "cursor-text" : "cursor-default select-text"
|
|
220
|
+
),
|
|
221
|
+
"aria-placeholder": isEditable ? "Step content" : "",
|
|
222
|
+
placeholder: (editable) => editable ? /* @__PURE__ */ jsx("div", { className: "text-base font-medium text-[#999] overflow-hidden absolute top-[2px] left-[2px] text-nowrap inline-block text-ellipsis pointer-events-none", children: "Step content" }) : null
|
|
236
223
|
}
|
|
237
224
|
) }),
|
|
225
|
+
placeholder: null,
|
|
238
226
|
ErrorBoundary: LexicalErrorBoundary
|
|
239
227
|
}
|
|
240
228
|
),
|
|
@@ -261,7 +249,7 @@ function Step({
|
|
|
261
249
|
}
|
|
262
250
|
)
|
|
263
251
|
] }),
|
|
264
|
-
/* @__PURE__ */ jsx(
|
|
252
|
+
isEditable && /* @__PURE__ */ jsx(
|
|
265
253
|
"div",
|
|
266
254
|
{
|
|
267
255
|
onClick: () => insertAt(numberd + 1),
|
|
@@ -276,14 +264,16 @@ function Step({
|
|
|
276
264
|
|
|
277
265
|
// src/components/ui/stepper/stepper.tsx
|
|
278
266
|
import { $getNodeByKey, createEditor as createEditor2 } from "lexical";
|
|
279
|
-
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
267
|
+
import { useLexicalComposerContext as useLexicalComposerContext2 } from "@lexical/react/LexicalComposerContext";
|
|
280
268
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
281
269
|
function Stepper({
|
|
282
270
|
steps,
|
|
283
271
|
nodeKey
|
|
284
272
|
}) {
|
|
285
|
-
const [editor] =
|
|
273
|
+
const [editor] = useLexicalComposerContext2();
|
|
274
|
+
const isEditable = editor.isEditable();
|
|
286
275
|
function SetSteps(steps2) {
|
|
276
|
+
if (!isEditable) return;
|
|
287
277
|
editor.update(() => {
|
|
288
278
|
const node = $getNodeByKey(nodeKey);
|
|
289
279
|
if ($isStepperNode(node)) {
|