@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/core.mjs
CHANGED
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
AICommandBar,
|
|
3
3
|
AICopilot,
|
|
4
4
|
Audio,
|
|
5
|
+
BlockHandle,
|
|
5
6
|
Blockquote,
|
|
6
7
|
BlocksKit,
|
|
7
8
|
Bold,
|
|
@@ -20,16 +21,18 @@ import {
|
|
|
20
21
|
History,
|
|
21
22
|
Image,
|
|
22
23
|
Italic,
|
|
24
|
+
NodeRenderers,
|
|
23
25
|
OrderedList,
|
|
24
26
|
Paragraph,
|
|
25
27
|
Poll,
|
|
28
|
+
SlashMenu,
|
|
26
29
|
StarterKit,
|
|
27
30
|
Stepper,
|
|
28
31
|
Strike,
|
|
29
32
|
Tweet,
|
|
30
33
|
Underline,
|
|
31
34
|
YouTube
|
|
32
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-XAJ4GACN.mjs";
|
|
33
36
|
import {
|
|
34
37
|
BubbleMenu,
|
|
35
38
|
Extension,
|
|
@@ -44,48 +47,44 @@ import {
|
|
|
44
47
|
createNotiqEditor,
|
|
45
48
|
useNotiq,
|
|
46
49
|
useNotiqContext
|
|
47
|
-
} from "./chunk-
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import "./chunk-
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
55
|
-
import "./chunk-
|
|
56
|
-
import "./chunk-XYLTLGY5.mjs";
|
|
57
|
-
import "./chunk-IAFCQV3Z.mjs";
|
|
58
|
-
import "./chunk-BGV62GC2.mjs";
|
|
59
|
-
import "./chunk-K5OAFEVY.mjs";
|
|
60
|
-
import "./chunk-LVRJM45C.mjs";
|
|
50
|
+
} from "./chunk-5CJZC5IB.mjs";
|
|
51
|
+
import "./chunk-IXRA5D53.mjs";
|
|
52
|
+
import "./chunk-J2CEQXG4.mjs";
|
|
53
|
+
import "./chunk-TJPTGECP.mjs";
|
|
54
|
+
import "./chunk-BCGD2YXP.mjs";
|
|
55
|
+
import "./chunk-3JN6QEJR.mjs";
|
|
56
|
+
import "./chunk-4SYRK2NH.mjs";
|
|
57
|
+
import "./chunk-D4UBNSUW.mjs";
|
|
58
|
+
import "./chunk-JTNLN4JI.mjs";
|
|
61
59
|
import "./chunk-N3WTT2U6.mjs";
|
|
62
|
-
import "./chunk-
|
|
63
|
-
import "./chunk-
|
|
64
|
-
import "./chunk-
|
|
65
|
-
import "./chunk-
|
|
66
|
-
import "./chunk-
|
|
67
|
-
import "./chunk-
|
|
68
|
-
import "./chunk-
|
|
69
|
-
import "./chunk-XYMXGU4T.mjs";
|
|
70
|
-
import "./chunk-ZFV2HGD3.mjs";
|
|
71
|
-
import "./chunk-6D6QLRYR.mjs";
|
|
72
|
-
import "./chunk-4FFTOZGJ.mjs";
|
|
73
|
-
import "./chunk-OXWTZV3U.mjs";
|
|
74
|
-
import "./chunk-R7WFRENU.mjs";
|
|
75
|
-
import "./chunk-RJQTA6HG.mjs";
|
|
76
|
-
import "./chunk-PFH63ZU4.mjs";
|
|
77
|
-
import "./chunk-EVPWKNE4.mjs";
|
|
60
|
+
import "./chunk-6NK5DONB.mjs";
|
|
61
|
+
import "./chunk-CQCS5YPS.mjs";
|
|
62
|
+
import "./chunk-QCS57TIF.mjs";
|
|
63
|
+
import "./chunk-ACW4DLVO.mjs";
|
|
64
|
+
import "./chunk-TMYRA2W4.mjs";
|
|
65
|
+
import "./chunk-UNEFOZTS.mjs";
|
|
66
|
+
import "./chunk-GJK2L7ZM.mjs";
|
|
78
67
|
import "./chunk-NBE6FF6L.mjs";
|
|
79
|
-
import "./chunk-ELBTVBTS.mjs";
|
|
80
68
|
import "./chunk-5NRAXWYA.mjs";
|
|
69
|
+
import "./chunk-IKYVBTCJ.mjs";
|
|
81
70
|
import "./chunk-IUOUIDEQ.mjs";
|
|
82
|
-
import "./chunk-
|
|
83
|
-
import "./chunk-
|
|
84
|
-
import "./chunk-
|
|
85
|
-
import "./chunk-
|
|
86
|
-
import "./chunk-
|
|
87
|
-
import "./chunk-
|
|
71
|
+
import "./chunk-X4NI7EQS.mjs";
|
|
72
|
+
import "./chunk-BTR3TPIN.mjs";
|
|
73
|
+
import "./chunk-H3P47YXJ.mjs";
|
|
74
|
+
import "./chunk-OO42URWA.mjs";
|
|
75
|
+
import "./chunk-ONOHG5NB.mjs";
|
|
76
|
+
import "./chunk-PBVRSNGU.mjs";
|
|
77
|
+
import "./chunk-DBRZIA43.mjs";
|
|
88
78
|
import "./chunk-IIVB6JNE.mjs";
|
|
79
|
+
import "./chunk-YVUQRJVV.mjs";
|
|
80
|
+
import {
|
|
81
|
+
NodeRendererSlot,
|
|
82
|
+
NotiqNodeRendererProvider,
|
|
83
|
+
clearEditorNodeRenderers,
|
|
84
|
+
getEditorNodeRenderers,
|
|
85
|
+
setEditorNodeRenderers,
|
|
86
|
+
useNotiqNodeRenderers
|
|
87
|
+
} from "./chunk-RNEIJRUS.mjs";
|
|
89
88
|
import "./chunk-JHXDLYEV.mjs";
|
|
90
89
|
import "./chunk-WYCFGRFJ.mjs";
|
|
91
90
|
export {
|
|
@@ -93,6 +92,7 @@ export {
|
|
|
93
92
|
AICopilot,
|
|
94
93
|
AICopilot as AIKit,
|
|
95
94
|
Audio,
|
|
95
|
+
BlockHandle,
|
|
96
96
|
Blockquote,
|
|
97
97
|
BlocksKit,
|
|
98
98
|
Bold,
|
|
@@ -115,24 +115,32 @@ export {
|
|
|
115
115
|
History,
|
|
116
116
|
Image,
|
|
117
117
|
Italic,
|
|
118
|
+
NodeRendererSlot,
|
|
119
|
+
NodeRenderers,
|
|
118
120
|
NotiqContent,
|
|
119
121
|
NotiqContext,
|
|
120
122
|
NotiqEditor,
|
|
121
123
|
NotiqEditorImpl,
|
|
124
|
+
NotiqNodeRendererProvider,
|
|
122
125
|
NotiqProvider,
|
|
123
126
|
OrderedList,
|
|
124
127
|
Paragraph,
|
|
125
128
|
Poll,
|
|
129
|
+
SlashMenu,
|
|
126
130
|
StarterKit,
|
|
127
131
|
Stepper,
|
|
128
132
|
Strike,
|
|
129
133
|
Tweet,
|
|
130
134
|
Underline,
|
|
131
135
|
YouTube,
|
|
136
|
+
clearEditorNodeRenderers,
|
|
132
137
|
createCanCommands,
|
|
133
138
|
createCommandChain,
|
|
134
139
|
createNotiqEditor,
|
|
140
|
+
getEditorNodeRenderers,
|
|
141
|
+
setEditorNodeRenderers,
|
|
135
142
|
useNotiq as useEditor,
|
|
136
143
|
useNotiq,
|
|
137
|
-
useNotiqContext
|
|
144
|
+
useNotiqContext,
|
|
145
|
+
useNotiqNodeRenderers
|
|
138
146
|
};
|
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
export type AIAction = "MakeLong" | "MakeShort" | "FixSpellingGrammar" | "ImproveWriting" | "ChatWithSelectedString" | "autoComplete" | "GenerateAgain" | "SimplifyLanguage" | "WriteHint" | "Steps" | "askPageQuestion";
|
|
1
|
+
export type AIAction = "MakeLong" | "MakeShort" | "FixSpellingGrammar" | "ImproveWriting" | "ChatWithSelectedString" | "autoComplete" | "GenerateAgain" | "SimplifyLanguage" | "WriteHint" | "Steps" | "Tone" | "Translate" | "Summarize" | "askPageQuestion";
|
|
2
|
+
export type WritingStylePresetId = "balanced" | "technical" | "editorial" | "executive" | "academic";
|
|
3
|
+
export declare const WRITING_STYLE_PRESETS: Record<WritingStylePresetId, {
|
|
4
|
+
label: string;
|
|
5
|
+
instruction: string;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const NOTIQ_RICH_MARKDOWN_RULE = "\nFormatting Guidelines (Notiq Block Canvas):\n- Output clean, standard Markdown that hydrates directly into rich blocks.\n- Headings: '# ' (H1), '## ' (H2), '### ' (H3).\n- Lists: '- ' for bullets, '1. ' for numbered lists, '- [ ] ' / '- [x] ' for interactive task checklists.\n- Quotes: '> ' for blockquotes.\n- Code: Fenced code blocks with language tags (```tsx, ```ts, ```python, etc.).\n- Math: Inline '$E = mc^2$' or block '$$\n...\n$$'.\n- Tables: Standard GFM Markdown tables ('| Header | ... |') when comparing options or structured data.\n- Callouts: '> [!NOTE]', '> [!TIP]', '> [!WARNING]', or '> [!IMPORTANT]' for highlighted callout boxes.\n- Normal Images: '' on its own line for full-width/block visuals.\n- Inline Images: '' or '' for inline/floated visuals inside a paragraph.\n- Diagrams (Interactive Excalidraw): When asked to draw a diagram, flowchart, or architecture, output a fenced ```excalidraw JSON block using:\n ```excalidraw\n {\"nodes\":[{\"id\":\"a\",\"label\":\"Step A\"},{\"id\":\"b\",\"label\":\"Step B\"}],\"edges\":[{\"from\":\"a\",\"to\":\"b\",\"label\":\"next\"}]}\n ```\n- Dividers: '---' between major sections when appropriate.\n- Never wrap the entire response in an outer ```markdown code fence unless explicitly asked for raw code.";
|
|
2
8
|
declare const GenerateAgainInstruction = "\n Create a system that allows the AI to regenerate its response if the user is not satisfied with the initial answer.\n # Steps\n 1. Upon receiving a user query, generate an initial response.\n 2. Provide the option for the user to indicate whether they are satisfied with the response.\n 3. If the user indicates dissatisfaction, immediately offer to regenerate a new response.\n 4. Regenerate the response using new phrasing or additional context to better address the user's query.\n 5. Repeat the option to indicate satisfaction for the regenerated response.\n \n # Output Format\n \n - Initial response: A complete and concise answer to the user's query.\n - User satisfaction indicator: A simple prompt (e.g., \"Are you satisfied with this response? [Yes/No]\")\n - Regenerated response: A new version of the response, aimed at rectifying any deficiencies in the initial answer.\n \n # Notes\n \n - The system should ensure that regenerated responses do not simply rephrase but enhance the content or depth based on assumed user dissatisfaction causes.\n - Keep track of regenerated responses to avoid repeating the same or overly similar answers.\n - Consider limitations to the number of regenerated responses to manage system performance and user experience.";
|
|
3
|
-
declare const autoCompleteInstruction = "
|
|
4
|
-
declare const improveMesgInstruction = "
|
|
9
|
+
declare const autoCompleteInstruction = "Continue writing naturally from the cursor position based on the surrounding document context. Match the document's existing tone, tense, and formatting. Output ONLY the continuation text with no preamble, no repetition of the preceding sentence, and no commentary.";
|
|
10
|
+
declare const improveMesgInstruction = "Rewrite and polish the provided text for clarity, flow, active voice, and impact while preserving its original meaning and Markdown formatting.\n\nRules:\n- Output ONLY the rewritten replacement text.\n- Do NOT include commentary, critique, \"Strengths/Issues\", preambles (\"Here is the improved version:\"), or wrapping quotation marks.\n- Keep technical terms, names, and inline code intact.";
|
|
11
|
+
declare const ToneInstruction = "Rewrite the provided text in the requested tone while preserving its core meaning, facts, and formatting. Output ONLY the rewritten text with no preamble or wrapping quotes.";
|
|
12
|
+
declare const TranslateInstruction = "Translate the provided text accurately into the target language, preserving tone, idioms, and Markdown formatting. Output ONLY the translated text with no preamble or explanation.";
|
|
13
|
+
declare const SummarizeInstruction = "Distill the provided document or selection into a crisp, high-signal summary. Start with a 1-2 sentence synthesis, followed by 3-5 concise bullet points of the key takeaways. Output clean Markdown with no preamble.";
|
|
5
14
|
declare const FixSpellingGrammarInstruction = "Correct any spelling and grammar errors in a given text.\n\n# Steps\n\n1. Read the provided text carefully.\n2. Identify any spelling mistakes and correct them.\n3. Look for grammatical errors, such as incorrect verb tense, subject-verb agreement, punctuation errors, and incomplete sentences, and correct them.\n4. Ensure the text flows logically and coherently without altering the original meaning.\n5. Double-check the revised text for any remaining errors.\n\n# Output Format\n\nThe corrected text should be provided in a clear and readable paragraph format, preserving the original structure and meaning as much as possible. \n\n# Examples\n\n**Input:** \"i has go to the store yesterday for buy some apples\"\n\n**Output:** \"I went to the store yesterday to buy some apples.\"\n\n**Input:** \"She dont like to play soccer, she prefers basketball.\"\n\n**Output:** \"She doesn't like to play soccer; she prefers basketball.\"";
|
|
6
15
|
declare const MakeShortInstruction = " \nShorten the provided text while keeping its context intact.\n\n# Steps\n\n1. Read the provided text carefully.\n2. Identify sections that can be condensed without losing key information.\n3. Rephrase or remove redundant or non-essential parts of the text.\n4. Ensure the revised text retains its original context and meaning.\n\n# Output Format\n\nThe shortened text should be presented in a clear and concise paragraph format, preserving the original context as much as possible. \n\n# Examples\n\n**Input:** \"I had to go to the store yesterday to buy some supplies because we were running low.\"\n\n**Output:** \"I went to the store yesterday for supplies.\"\n\n**Input:** \"Although she doesn't like playing soccer, she enjoys basketball more and plays it every weekend.\"\n\n**Output:** \"She prefers basketball over soccer, playing it weekly.\"\"";
|
|
7
16
|
declare const MakeLongInstruction = " Expand the provided short text while keeping its context intact.\n\n # Steps\n\n 1. Read the provided text carefully.\n 2. Identify areas where additional details or elaborations can be added.\n 3. Expand sections with relevant information while maintaining the original context and meaning.\n 4. Ensure the expanded text preserves its original message and tone.\n\n # Output Format\n\n The expanded text should be presented in a detailed paragraph format, enriching the original content while preserving its context as much as possible. \n\n # Examples\n\n **Input:** \"I went to the store for supplies.\"\n\n **Output:** \"Yesterday, I went to the local store, which I hadn't visited in a while, to purchase a range of supplies. This included essential items we needed because we were running low, such as groceries, cleaning products, and some personal items.\"\n\n **Input:** \"She prefers basketball over soccer.\"\n\n **Output:** \"While she appreciates the dynamics of soccer, she finds basketball much more engaging and enjoyable. She actively participates in basketball games every weekend because it's her favorite sport, and she loves practicing different techniques and plays with her friends.\"";
|
|
8
17
|
declare const SimplifyLanguageInstruction = "\n Simplify the language of the provided text, ensuring it remains clear, concise, and easy to understand.\n\n# Steps\n\n1. Read the given text carefully to understand its meaning.\n2. Identify complex words or phrases that could be simplified.\n3. Replace complex words or structures with simpler alternatives while retaining the original meaning.\n4. Ensure the resulting text maintains coherence and readability.\n\n# Output Format\n\nProvide the simplified version of the text in one or more paragraphs, maintaining proper grammar and structure.\n\n# Examples\n\n**Input:** \n\"The utilization of advanced computational methodologies can facilitate the enhancement of operational efficiency in various industries.\"\n\n**Output:** \n\"Using advanced computing methods can help make different industries more efficient.\"\n\n# Notes\n\n- Avoid oversimplifying technical terms that are necessary for understanding.\n- Maintain the integrity and original intent of the text.\n- Additional context or explanation should only be added if it aids in clarity.\n";
|
|
9
18
|
declare const WriteHintInstruction = "\n Generate a concise message based on the provided context and user input, categorized by type such as error, success, info, or warning. Ensure that the message does not exceed 50 words. \n # Steps\n\n 1. **Understand Context**: Read the provided context and user input carefully to identify the nature of the message needed.\n 2. **Determine Message Type**: Classify the message type as one of the following - error, success, info, or warning.\n 3. **Compose Message**: Write a clear, concise message appropriate for the determined type, ensuring it aligns with the context provided.\n 4. **Word Count Check**: Confirm the message does not exceed 50 words.\n\n # Output Format\n\n Provide a message in plain text, not exceeding 50 words.\n\n # Examples\n\n **Example 1**\n\n - Context: User input failed due to network timeout.\n - Type: Error\n - Message: \"The operation could not be completed due to a network timeout. Please check your internet connection and try again.\"\n\n **Example 2**\n\n - Context: User successfully uploaded a file.\n - Type: Success\n - Message: \"Your file has been uploaded successfully. You can now access it from your dashboard.\"\n\n **Example 3**\n\n - Context: Upcoming system maintenance scheduled.\n - Type: Info\n - Message: \"Please note that the system will undergo maintenance on [Date] from [Start Time] to [End Time]. During this period, access may be limited.\"\n\n **Example 4**\n\n - Context: User attempting risky operation.\n - Type: Warning\n - Message: \"Are you sure you want to proceed? This action could affect your system stability. Please proceed with caution.\"\n\n # Notes\n -make sure do not Reponse with anything except the message.\n - Ensure the tone and content of the message accurately reflect the message type and context.\n - Be mindful of the word limit while maintaining clarity and precision in the message";
|
|
10
19
|
declare const StepsInstruction = "\nGenerate a structured response in the format of a JSON object, detailing the given topic as steps.\n\n- Each step should contain three elements: \"id\", \"title\", and \"content\".\n- \"id\" should be a unique identifier starting from 0 and increasing sequentially.\n- \"title\" should summarize the step in a concise manner.\n- \"content\" should provide an explanation or additional details about the step.\n\n# Steps\n\n1. Break the topic down into logical, sequential steps.\n2. Begin each step with an incrementing \"id\" starting from 0.\n3. Write a \"title\" for each step summarizing its objective.\n4. Elaborate on the details of the step in the \"content\" field.\n\n# Output Format\n\nYour response should be a JSON array where each item follows this structure:\n\n{\n \"id\": [sequential integer starting from 0],\n \"title\": \"[step title]\",\n \"content\": \"[step explanation]\"\n\n\n# Examples\n\n**Input:** \"Preparing a simple meal\"\n\n**Output:**\n\n[\n {\n \"id\": 0,\n \"title\": \"gather ingredients\",\n \"content\": \"List and assemble all the ingredients required for the recipe.\"\n },\n {\n \"id\": 1,\n \"title\": \"prepare ingredients\",\n \"content\": \"Wash, chop, and measure the ingredients as needed for the recipe.\"\n },\n {\n \"id\": 2,\n \"title\": \"begin cooking\",\n \"content\": \"Follow the recipe steps to cook the meal, starting with heating the pan.\"\n }\n]\n\n# Notes\n\n- Be concise in writing titles, yet comprehensive in content explanations.\n- Ensure the steps are logically ordered and cover the task comprehensively.\n";
|
|
11
|
-
export { GenerateAgainInstruction, autoCompleteInstruction, improveMesgInstruction, FixSpellingGrammarInstruction, MakeLongInstruction, MakeShortInstruction, SimplifyLanguageInstruction, WriteHintInstruction, StepsInstruction, };
|
|
20
|
+
export { GenerateAgainInstruction, autoCompleteInstruction, improveMesgInstruction, FixSpellingGrammarInstruction, MakeLongInstruction, MakeShortInstruction, SimplifyLanguageInstruction, WriteHintInstruction, StepsInstruction, ToneInstruction, TranslateInstruction, SummarizeInstruction, };
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Separator
|
|
3
|
-
} from "./chunk-CDAMHK63.mjs";
|
|
4
|
-
import {
|
|
2
|
+
Separator,
|
|
5
3
|
useSharedHistoryContext
|
|
6
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GJK2L7ZM.mjs";
|
|
7
5
|
import {
|
|
8
6
|
Skeleton
|
|
9
7
|
} from "./chunk-NBE6FF6L.mjs";
|
|
10
|
-
import {
|
|
11
|
-
$isImageNode
|
|
12
|
-
} from "./chunk-ELBTVBTS.mjs";
|
|
13
8
|
import {
|
|
14
9
|
Input
|
|
15
10
|
} from "./chunk-5NRAXWYA.mjs";
|
|
11
|
+
import {
|
|
12
|
+
$isImageNode
|
|
13
|
+
} from "./chunk-IKYVBTCJ.mjs";
|
|
16
14
|
import {
|
|
17
15
|
Button
|
|
18
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ONOHG5NB.mjs";
|
|
17
|
+
import "./chunk-RNEIJRUS.mjs";
|
|
19
18
|
import {
|
|
20
19
|
cn
|
|
21
20
|
} from "./chunk-JHXDLYEV.mjs";
|
|
@@ -749,6 +748,11 @@ function ImageComponent({
|
|
|
749
748
|
const activeEditorRef = useRef2(null);
|
|
750
749
|
const [isLoadError, setIsLoadError] = useState4(false);
|
|
751
750
|
const isEditable = useLexicalEditable();
|
|
751
|
+
useEffect4(() => {
|
|
752
|
+
if (caption && typeof caption.setEditable === "function") {
|
|
753
|
+
caption.setEditable(isEditable);
|
|
754
|
+
}
|
|
755
|
+
}, [caption, isEditable]);
|
|
752
756
|
const [MediaType, setMediaType] = useState4("IMAGE");
|
|
753
757
|
const $onDelete = useCallback2(
|
|
754
758
|
(payload) => {
|
|
@@ -806,8 +810,8 @@ function ImageComponent({
|
|
|
806
810
|
const onClick = useCallback2(
|
|
807
811
|
(payload) => {
|
|
808
812
|
const event = payload;
|
|
809
|
-
if (isResizing) {
|
|
810
|
-
return
|
|
813
|
+
if (!isEditable || isResizing) {
|
|
814
|
+
return false;
|
|
811
815
|
}
|
|
812
816
|
if (event.target === MediaRef.current) {
|
|
813
817
|
if (event.shiftKey) {
|
|
@@ -933,7 +937,7 @@ function ImageComponent({
|
|
|
933
937
|
setIsResizing(true);
|
|
934
938
|
};
|
|
935
939
|
const { historyState } = useSharedHistoryContext();
|
|
936
|
-
const draggable = isSelected && $isNodeSelection(selection) && !isResizing;
|
|
940
|
+
const draggable = isSelected && $isNodeSelection(selection) && !isResizing && isEditable;
|
|
937
941
|
const isFocused = (isSelected || isResizing) && isEditable;
|
|
938
942
|
return /* @__PURE__ */ jsx6(Suspense, { fallback: null, children: /* @__PURE__ */ jsxs5("div", { className: "relative inline-block group", children: [
|
|
939
943
|
/* @__PURE__ */ jsx6("div", { draggable, children: isLoadError ? /* @__PURE__ */ jsx6(ErrorImage, {}) : /* @__PURE__ */ jsx6(Fragment3, { children: MediaType === "IMAGE" ? /* @__PURE__ */ jsx6(
|
|
@@ -985,7 +989,8 @@ function ImageComponent({
|
|
|
985
989
|
contentEditable: /* @__PURE__ */ jsx6(
|
|
986
990
|
ContentEditable,
|
|
987
991
|
{
|
|
988
|
-
|
|
992
|
+
readOnly: !isEditable,
|
|
993
|
+
"aria-placeholder": isEditable ? "Enter a caption..." : "",
|
|
989
994
|
placeholder: () => /* @__PURE__ */ jsx6(
|
|
990
995
|
"span",
|
|
991
996
|
{
|