@dwelle/excalidraw 0.5.0-2aec728 → 0.5.0-2dbdd6f

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.
Files changed (87) hide show
  1. package/dist/dev/{chunk-M4JV7MPJ.js → chunk-EWKWI3K7.js} +12 -4
  2. package/dist/dev/chunk-EWKWI3K7.js.map +7 -0
  3. package/dist/dev/{chunk-K532CM3P.js → chunk-JBODKHIT.js} +420 -153
  4. package/dist/dev/chunk-JBODKHIT.js.map +7 -0
  5. package/dist/dev/{chunk-M2XQF7GS.js → chunk-NYLL7DNJ.js} +2 -2
  6. package/dist/dev/components/TTDDialog/CodeMirrorEditor-PY5ZVWKQ.js +259 -0
  7. package/dist/dev/components/TTDDialog/CodeMirrorEditor-PY5ZVWKQ.js.map +7 -0
  8. package/dist/dev/data/{image-2KXEDCIH.js → image-WSL7K3G4.js} +3 -3
  9. package/dist/dev/index.css +99 -22
  10. package/dist/dev/index.css.map +2 -2
  11. package/dist/dev/index.js +1469 -408
  12. package/dist/dev/index.js.map +4 -4
  13. package/dist/dev/locales/{en-RZ6RNZOE.js → en-A3UOWEYW.js} +2 -2
  14. package/dist/dev/subset-shared.chunk.js +1 -1
  15. package/dist/dev/subset-worker.chunk.js +1 -1
  16. package/dist/prod/chunk-33L4EPXN.js +34 -0
  17. package/dist/prod/{chunk-GYMRTBHM.js → chunk-DF5Y7EC7.js} +5 -5
  18. package/dist/prod/{chunk-V7CARC7D.js → chunk-ZV7TQH6J.js} +1 -1
  19. package/dist/prod/components/TTDDialog/CodeMirrorEditor-M5ZUJBXD.js +1 -0
  20. package/dist/prod/data/image-57VVPCM3.js +1 -0
  21. package/dist/prod/index.css +1 -1
  22. package/dist/prod/index.js +32 -24
  23. package/dist/prod/locales/{en-XBJ4S4YK.js → en-QI57FMQH.js} +1 -1
  24. package/dist/prod/subset-shared.chunk.js +1 -1
  25. package/dist/prod/subset-worker.chunk.js +1 -1
  26. package/dist/types/element/src/arrowheads.d.ts +3 -0
  27. package/dist/types/element/src/bounds.d.ts +1 -1
  28. package/dist/types/element/src/index.d.ts +1 -0
  29. package/dist/types/element/src/linearElementEditor.d.ts +2 -2
  30. package/dist/types/element/src/selection.d.ts +5 -1
  31. package/dist/types/element/src/shape.d.ts +1 -1
  32. package/dist/types/element/src/textElement.d.ts +1 -1
  33. package/dist/types/element/src/textWrapping.d.ts +26 -0
  34. package/dist/types/element/src/types.d.ts +4 -1
  35. package/dist/types/element/src/utils.d.ts +1 -1
  36. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +3 -3
  37. package/dist/types/excalidraw/actions/actionBoundText.d.ts +3 -3
  38. package/dist/types/excalidraw/actions/actionCanvas.d.ts +10 -10
  39. package/dist/types/excalidraw/actions/actionClipboard.d.ts +2 -2
  40. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +1 -1
  41. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +3 -3
  42. package/dist/types/excalidraw/actions/actionElementLink.d.ts +1 -1
  43. package/dist/types/excalidraw/actions/actionElementLock.d.ts +2 -2
  44. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +1 -1
  45. package/dist/types/excalidraw/actions/actionExport.d.ts +5 -4
  46. package/dist/types/excalidraw/actions/actionFrame.d.ts +4 -4
  47. package/dist/types/excalidraw/actions/actionGroup.d.ts +3 -3
  48. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +1 -1
  49. package/dist/types/excalidraw/actions/actionLink.d.ts +1 -1
  50. package/dist/types/excalidraw/actions/actionMenu.d.ts +1 -1
  51. package/dist/types/excalidraw/actions/actionProperties.d.ts +4 -4
  52. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +1 -1
  53. package/dist/types/excalidraw/actions/actionStyles.d.ts +2 -1
  54. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
  55. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +1 -1
  56. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +1 -1
  57. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +1 -1
  58. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +1 -1
  59. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +1 -1
  60. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +1 -1
  61. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +1 -1
  62. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +1 -1
  63. package/dist/types/excalidraw/components/App.d.ts +11 -0
  64. package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
  65. package/dist/types/excalidraw/components/Range.d.ts +10 -4
  66. package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
  67. package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
  68. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +4 -1
  69. package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
  70. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
  71. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
  72. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +1 -0
  73. package/dist/types/excalidraw/components/icons.d.ts +17 -8
  74. package/dist/types/excalidraw/data/blob.d.ts +2 -2
  75. package/dist/types/excalidraw/data/json.d.ts +1 -1
  76. package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
  77. package/dist/types/excalidraw/types.d.ts +3 -2
  78. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +5 -1
  79. package/dist/types/math/src/point.d.ts +1 -1
  80. package/package.json +7 -2
  81. package/dist/dev/chunk-K532CM3P.js.map +0 -7
  82. package/dist/dev/chunk-M4JV7MPJ.js.map +0 -7
  83. package/dist/prod/chunk-FARSR7T2.js +0 -33
  84. package/dist/prod/data/image-P4TPEGR7.js +0 -1
  85. /package/dist/dev/{chunk-M2XQF7GS.js.map → chunk-NYLL7DNJ.js.map} +0 -0
  86. /package/dist/dev/data/{image-2KXEDCIH.js.map → image-WSL7K3G4.js.map} +0 -0
  87. /package/dist/dev/locales/{en-RZ6RNZOE.js.map → en-A3UOWEYW.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  // <define:import.meta.env>
2
- var define_import_meta_env_default = { MODE: "development", VITE_APP_BACKEND_V2_GET_URL: "https://json-dev.excalidraw.com/api/v2/", VITE_APP_BACKEND_V2_POST_URL: "https://json-dev.excalidraw.com/api/v2/post/", VITE_APP_LIBRARY_URL: "https://libraries.excalidraw.com", VITE_APP_LIBRARY_BACKEND: "https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries", VITE_APP_WS_SERVER_URL: "http://localhost:3002", VITE_APP_PLUS_LP: "https://plus.excalidraw.com", VITE_APP_PLUS_APP: "http://localhost:3000", VITE_APP_AI_BACKEND: "http://localhost:3016", VITE_APP_FIREBASE_CONFIG: '{"apiKey":"AIzaSyCMkxA60XIW8KbqMYL7edC4qT5l4qHX2h8","authDomain":"excalidraw-oss-dev.firebaseapp.com","projectId":"excalidraw-oss-dev","storageBucket":"excalidraw-oss-dev.appspot.com","messagingSenderId":"664559512677","appId":"1:664559512677:web:a385181f2928d328a7aa8c"}', VITE_APP_DEV_DISABLE_LIVE_RELOAD: "", VITE_APP_ENABLE_TRACKING: "true", FAST_REFRESH: "false", VITE_APP_PORT: "3001", VITE_APP_DEBUG_ENABLE_TEXT_CONTAINER_BOUNDING_BOX: "", VITE_APP_COLLAPSE_OVERLAY: "true", VITE_APP_ENABLE_ESLINT: "true", VITE_APP_ENABLE_PWA: "false", VITE_APP_PLUS_EXPORT_PUBLIC_KEY: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm2g5T+Rub6Kbf1Mf57t0\n7r2zeHuVg4dla3r5ryXMswtzz6x767octl6oLThn33mQsPSy3GKglFZoCTXJR4ij\nba8SxB04sL/N8eRrKja7TFWjCVtRwTTfyy771NYYNFVJclkxHyE5qw4m27crHF1y\nUNWEjuqNMi/lwAErS9fFa2oJlWyT8U7zzv/5kQREkxZI6y9v0AF3qcbsy2731FnD\ns9ChJvOUW9toIab2gsIdrKW8ZNpu084ZFVKb6LNjvIXI1Se4oMTHeszXzNptzlot\nkdxxjOoaQMAyfljFSot1F1FlU6MQlag7UnFGvFjRHN1JI5q4K+n3a67DX+TMyRqS\nHQIDAQAB", VITE_APP_DISABLE_PREVENT_UNLOAD: "", PKG_NAME: "@excalidraw/excalidraw", PKG_VERSION: "0.5.0-2aec728", DEV: true };
2
+ var define_import_meta_env_default = { MODE: "development", VITE_APP_BACKEND_V2_GET_URL: "https://json-dev.excalidraw.com/api/v2/", VITE_APP_BACKEND_V2_POST_URL: "https://json-dev.excalidraw.com/api/v2/post/", VITE_APP_LIBRARY_URL: "https://libraries.excalidraw.com", VITE_APP_LIBRARY_BACKEND: "https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries", VITE_APP_WS_SERVER_URL: "http://localhost:3002", VITE_APP_PLUS_LP: "https://plus.excalidraw.com", VITE_APP_PLUS_APP: "http://localhost:3000", VITE_APP_AI_BACKEND: "http://localhost:3016", VITE_APP_FIREBASE_CONFIG: '{"apiKey":"AIzaSyCMkxA60XIW8KbqMYL7edC4qT5l4qHX2h8","authDomain":"excalidraw-oss-dev.firebaseapp.com","projectId":"excalidraw-oss-dev","storageBucket":"excalidraw-oss-dev.appspot.com","messagingSenderId":"664559512677","appId":"1:664559512677:web:a385181f2928d328a7aa8c"}', VITE_APP_DEV_DISABLE_LIVE_RELOAD: "", VITE_APP_ENABLE_TRACKING: "true", FAST_REFRESH: "false", VITE_APP_PORT: "3001", VITE_APP_DEBUG_ENABLE_TEXT_CONTAINER_BOUNDING_BOX: "", VITE_APP_COLLAPSE_OVERLAY: "true", VITE_APP_ENABLE_ESLINT: "true", VITE_APP_ENABLE_PWA: "false", VITE_APP_PLUS_EXPORT_PUBLIC_KEY: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm2g5T+Rub6Kbf1Mf57t0\n7r2zeHuVg4dla3r5ryXMswtzz6x767octl6oLThn33mQsPSy3GKglFZoCTXJR4ij\nba8SxB04sL/N8eRrKja7TFWjCVtRwTTfyy771NYYNFVJclkxHyE5qw4m27crHF1y\nUNWEjuqNMi/lwAErS9fFa2oJlWyT8U7zzv/5kQREkxZI6y9v0AF3qcbsy2731FnD\ns9ChJvOUW9toIab2gsIdrKW8ZNpu084ZFVKb6LNjvIXI1Se4oMTHeszXzNptzlot\nkdxxjOoaQMAyfljFSot1F1FlU6MQlag7UnFGvFjRHN1JI5q4K+n3a67DX+TMyRqS\nHQIDAQAB", VITE_APP_DISABLE_PREVENT_UNLOAD: "", PKG_NAME: "@excalidraw/excalidraw", PKG_VERSION: "0.5.0-2dbdd6f", DEV: true };
3
3
 
4
4
  export {
5
5
  define_import_meta_env_default
6
6
  };
7
- //# sourceMappingURL=chunk-M2XQF7GS.js.map
7
+ //# sourceMappingURL=chunk-NYLL7DNJ.js.map
@@ -0,0 +1,259 @@
1
+ import "../../chunk-NYLL7DNJ.js";
2
+ import "../../chunk-XDFCUUT6.js";
3
+
4
+ // components/TTDDialog/CodeMirrorEditor.tsx
5
+ import { useEffect, useRef } from "react";
6
+ import {
7
+ Decoration,
8
+ EditorView,
9
+ keymap,
10
+ lineNumbers,
11
+ placeholder as cmPlaceholder,
12
+ drawSelection
13
+ } from "@codemirror/view";
14
+ import { Compartment, EditorState } from "@codemirror/state";
15
+ import {
16
+ defaultKeymap,
17
+ history,
18
+ historyKeymap,
19
+ redo
20
+ } from "@codemirror/commands";
21
+ import { syntaxHighlighting, HighlightStyle } from "@codemirror/language";
22
+ import { tags } from "@lezer/highlight";
23
+
24
+ // components/TTDDialog/mermaid-lang-lite.ts
25
+ import { StreamLanguage } from "@codemirror/language";
26
+ var mermaidStreamParser = StreamLanguage.define({
27
+ token(stream) {
28
+ if (stream.match(/^%%.*$/)) {
29
+ return "comment";
30
+ }
31
+ if (stream.match(/^"(?:[^"\\]|\\.)*"/)) {
32
+ return "string";
33
+ }
34
+ if (stream.match(
35
+ /^(flowchart|graph|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt|pie|mindmap|journey|gitGraph|timeline|quadrantChart|sankey|xychart)\b/i
36
+ )) {
37
+ return "keyword";
38
+ }
39
+ if (stream.match(/^(TB|TD|BT|RL|LR)\b/)) {
40
+ return "keyword";
41
+ }
42
+ if (stream.match(
43
+ /^(subgraph|end|participant|actor|loop|alt|else|opt|par|critical|break|rect|note|over|activate|deactivate|title|section|class|style|linkStyle|classDef|click)\b/i
44
+ )) {
45
+ return "keyword";
46
+ }
47
+ if (stream.match(/^[-.=<>|ox]+>/)) {
48
+ return "operator";
49
+ }
50
+ if (stream.match(/^<[-.=<>|ox]+/)) {
51
+ return "operator";
52
+ }
53
+ if (stream.match(/^--+|\.\.+|==+/)) {
54
+ return "operator";
55
+ }
56
+ if (stream.match(/^[[\](){}|<>]/)) {
57
+ return "bracket";
58
+ }
59
+ if (stream.match(/^[A-Za-z_][A-Za-z0-9_]*/)) {
60
+ return "variableName";
61
+ }
62
+ if (stream.match(/^\d+(\.\d+)?/)) {
63
+ return "number";
64
+ }
65
+ if (stream.match(/^[,:;]/)) {
66
+ return "punctuation";
67
+ }
68
+ if (stream.eatSpace()) {
69
+ return null;
70
+ }
71
+ stream.next();
72
+ return null;
73
+ }
74
+ });
75
+ function mermaidLite() {
76
+ return mermaidStreamParser;
77
+ }
78
+
79
+ // components/TTDDialog/CodeMirrorEditor.tsx
80
+ import { jsx } from "react/jsx-runtime";
81
+ var darkTheme = EditorView.theme(
82
+ {
83
+ "&": {
84
+ backgroundColor: "#1e1e1e",
85
+ color: "#d4d4d4"
86
+ },
87
+ ".cm-content": { caretColor: "#fff" },
88
+ ".cm-cursor": { borderLeftColor: "#fff" },
89
+ ".cm-gutters": {
90
+ backgroundColor: "#1e1e1e",
91
+ color: "#858585",
92
+ border: "none"
93
+ },
94
+ ".cm-activeLineGutter": { backgroundColor: "#2a2a2a" },
95
+ ".cm-activeLine": { backgroundColor: "#2a2a2a" },
96
+ ".cm-errorLine": { backgroundColor: "rgba(255, 0, 0, 0.15)" }
97
+ },
98
+ { dark: true }
99
+ );
100
+ var darkHighlight = HighlightStyle.define([
101
+ { tag: tags.keyword, color: "#569cd6" },
102
+ { tag: tags.string, color: "#ce9178" },
103
+ { tag: tags.comment, color: "#6a9955" },
104
+ { tag: tags.number, color: "#b5cea8" },
105
+ { tag: tags.operator, color: "#d4d4d4" },
106
+ { tag: tags.punctuation, color: "#d4d4d4" },
107
+ { tag: tags.variableName, color: "#9cdcfe" },
108
+ { tag: tags.bracket, color: "#ffd700" }
109
+ ]);
110
+ var lightTheme = EditorView.theme({
111
+ "&": {
112
+ backgroundColor: "#ffffff",
113
+ color: "#1e1e1e"
114
+ },
115
+ ".cm-content": { caretColor: "#000" },
116
+ ".cm-cursor": { borderLeftColor: "#000" },
117
+ ".cm-gutters": {
118
+ backgroundColor: "#fff",
119
+ color: "#999",
120
+ border: "none"
121
+ },
122
+ ".cm-activeLineGutter": { backgroundColor: "#e8e8e8" },
123
+ ".cm-activeLine": { backgroundColor: "#e8e8e8" },
124
+ ".cm-errorLine": { backgroundColor: "rgba(255, 0, 0, 0.1)" }
125
+ });
126
+ var lightHighlight = HighlightStyle.define([
127
+ { tag: tags.keyword, color: "#0000ff" },
128
+ { tag: tags.string, color: "#a31515" },
129
+ { tag: tags.comment, color: "#008000" },
130
+ { tag: tags.number, color: "#098658" },
131
+ { tag: tags.operator, color: "#1e1e1e" },
132
+ { tag: tags.punctuation, color: "#1e1e1e" },
133
+ { tag: tags.variableName, color: "#001080" },
134
+ { tag: tags.bracket, color: "#af00db" }
135
+ ]);
136
+ var errorLineDeco = Decoration.line({ class: "cm-errorLine" });
137
+ var getErrorLineExtension = (errorLine, doc) => {
138
+ if (!errorLine || errorLine < 1 || errorLine > doc.lines) {
139
+ return EditorView.decorations.of(Decoration.none);
140
+ }
141
+ const line = doc.line(errorLine);
142
+ return EditorView.decorations.of(
143
+ Decoration.set([errorLineDeco.range(line.from)])
144
+ );
145
+ };
146
+ var getThemeExtensions = (theme) => {
147
+ if (theme === "dark") {
148
+ return [darkTheme, syntaxHighlighting(darkHighlight)];
149
+ }
150
+ return [lightTheme, syntaxHighlighting(lightHighlight)];
151
+ };
152
+ var CodeMirrorEditor = ({
153
+ value,
154
+ onChange,
155
+ onKeyboardSubmit,
156
+ placeholder,
157
+ theme,
158
+ errorLine
159
+ }) => {
160
+ const containerRef = useRef(null);
161
+ const viewRef = useRef(null);
162
+ const onChangeRef = useRef(onChange);
163
+ const onKeyboardSubmitRef = useRef(onKeyboardSubmit);
164
+ const themeCompartmentRef = useRef(new Compartment());
165
+ const errorLineCompartmentRef = useRef(new Compartment());
166
+ onChangeRef.current = onChange;
167
+ onKeyboardSubmitRef.current = onKeyboardSubmit;
168
+ useEffect(() => {
169
+ if (!containerRef.current) {
170
+ return;
171
+ }
172
+ const themeCompartment = themeCompartmentRef.current;
173
+ const view = new EditorView({
174
+ state: EditorState.create({
175
+ doc: value,
176
+ extensions: [
177
+ keymap.of([
178
+ {
179
+ key: "Mod-Enter",
180
+ run: () => {
181
+ onKeyboardSubmitRef.current?.();
182
+ return true;
183
+ }
184
+ },
185
+ // historyKeymap binds Mod-Shift-z only on Mac; add it for all platforms
186
+ { key: "Mod-Shift-z", run: redo, preventDefault: true }
187
+ ]),
188
+ EditorView.updateListener.of((update) => {
189
+ if (update.docChanged) {
190
+ onChangeRef.current(update.state.doc.toString());
191
+ }
192
+ }),
193
+ history(),
194
+ keymap.of([...defaultKeymap, ...historyKeymap]),
195
+ lineNumbers(),
196
+ EditorView.lineWrapping,
197
+ themeCompartment.of(getThemeExtensions(theme)),
198
+ errorLineCompartmentRef.current.of([]),
199
+ mermaidLite(),
200
+ drawSelection({ drawRangeCursor: true }),
201
+ ...placeholder ? [cmPlaceholder(placeholder)] : []
202
+ ]
203
+ }),
204
+ parent: containerRef.current
205
+ });
206
+ viewRef.current = view;
207
+ view.focus();
208
+ return () => {
209
+ view.destroy();
210
+ viewRef.current = null;
211
+ };
212
+ }, []);
213
+ useEffect(() => {
214
+ const view = viewRef.current;
215
+ if (!view) {
216
+ return;
217
+ }
218
+ view.dispatch({
219
+ effects: themeCompartmentRef.current.reconfigure(
220
+ getThemeExtensions(theme)
221
+ )
222
+ });
223
+ }, [theme]);
224
+ useEffect(() => {
225
+ const view = viewRef.current;
226
+ if (!view) {
227
+ return;
228
+ }
229
+ view.dispatch({
230
+ effects: errorLineCompartmentRef.current.reconfigure(
231
+ getErrorLineExtension(errorLine, view.state.doc)
232
+ )
233
+ });
234
+ }, [errorLine]);
235
+ useEffect(() => {
236
+ const view = viewRef.current;
237
+ if (!view) {
238
+ return;
239
+ }
240
+ const currentDoc = view.state.doc.toString();
241
+ if (value !== currentDoc) {
242
+ view.dispatch({
243
+ changes: { from: 0, to: currentDoc.length, insert: value }
244
+ });
245
+ }
246
+ }, [value]);
247
+ return /* @__PURE__ */ jsx(
248
+ "div",
249
+ {
250
+ ref: containerRef,
251
+ className: "ttd-dialog-input ttd-dialog-input--codemirror"
252
+ }
253
+ );
254
+ };
255
+ var CodeMirrorEditor_default = CodeMirrorEditor;
256
+ export {
257
+ CodeMirrorEditor_default as default
258
+ };
259
+ //# sourceMappingURL=CodeMirrorEditor-PY5ZVWKQ.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../components/TTDDialog/CodeMirrorEditor.tsx", "../../../../components/TTDDialog/mermaid-lang-lite.ts"],
4
+ "sourcesContent": ["import { useEffect, useRef } from \"react\";\nimport {\n Decoration,\n EditorView,\n keymap,\n lineNumbers,\n placeholder as cmPlaceholder,\n drawSelection,\n} from \"@codemirror/view\";\nimport { Compartment, EditorState, type Extension } from \"@codemirror/state\";\nimport {\n defaultKeymap,\n history,\n historyKeymap,\n redo,\n} from \"@codemirror/commands\";\nimport { syntaxHighlighting, HighlightStyle } from \"@codemirror/language\";\nimport { tags } from \"@lezer/highlight\";\n\nimport type { Theme } from \"@excalidraw/element/types\";\n\nimport { mermaidLite } from \"./mermaid-lang-lite\";\n\nexport interface CodeMirrorEditorProps {\n value: string;\n onChange: (value: string) => void;\n onKeyboardSubmit?: () => void;\n placeholder?: string;\n theme: Theme;\n errorLine?: number | null;\n}\n\n// ---- Dark theme ----\n\nconst darkTheme = EditorView.theme(\n {\n \"&\": {\n backgroundColor: \"#1e1e1e\",\n color: \"#d4d4d4\",\n },\n \".cm-content\": { caretColor: \"#fff\" },\n \".cm-cursor\": { borderLeftColor: \"#fff\" },\n \".cm-gutters\": {\n backgroundColor: \"#1e1e1e\",\n color: \"#858585\",\n border: \"none\",\n },\n \".cm-activeLineGutter\": { backgroundColor: \"#2a2a2a\" },\n \".cm-activeLine\": { backgroundColor: \"#2a2a2a\" },\n \".cm-errorLine\": { backgroundColor: \"rgba(255, 0, 0, 0.15)\" },\n },\n { dark: true },\n);\n\nconst darkHighlight = HighlightStyle.define([\n { tag: tags.keyword, color: \"#569cd6\" },\n { tag: tags.string, color: \"#ce9178\" },\n { tag: tags.comment, color: \"#6a9955\" },\n { tag: tags.number, color: \"#b5cea8\" },\n { tag: tags.operator, color: \"#d4d4d4\" },\n { tag: tags.punctuation, color: \"#d4d4d4\" },\n { tag: tags.variableName, color: \"#9cdcfe\" },\n { tag: tags.bracket, color: \"#ffd700\" },\n]);\n\n// ---- Light theme ----\n\nconst lightTheme = EditorView.theme({\n \"&\": {\n backgroundColor: \"#ffffff\",\n color: \"#1e1e1e\",\n },\n \".cm-content\": { caretColor: \"#000\" },\n \".cm-cursor\": { borderLeftColor: \"#000\" },\n \".cm-gutters\": {\n backgroundColor: \"#fff\",\n color: \"#999\",\n border: \"none\",\n },\n \".cm-activeLineGutter\": { backgroundColor: \"#e8e8e8\" },\n \".cm-activeLine\": { backgroundColor: \"#e8e8e8\" },\n \".cm-errorLine\": { backgroundColor: \"rgba(255, 0, 0, 0.1)\" },\n});\n\nconst lightHighlight = HighlightStyle.define([\n { tag: tags.keyword, color: \"#0000ff\" },\n { tag: tags.string, color: \"#a31515\" },\n { tag: tags.comment, color: \"#008000\" },\n { tag: tags.number, color: \"#098658\" },\n { tag: tags.operator, color: \"#1e1e1e\" },\n { tag: tags.punctuation, color: \"#1e1e1e\" },\n { tag: tags.variableName, color: \"#001080\" },\n { tag: tags.bracket, color: \"#af00db\" },\n]);\n\n// ---- Error line decoration ----\n\nconst errorLineDeco = Decoration.line({ class: \"cm-errorLine\" });\n\nconst getErrorLineExtension = (\n errorLine: number | null | undefined,\n doc: { line(n: number): { from: number }; lines: number },\n): Extension => {\n if (!errorLine || errorLine < 1 || errorLine > doc.lines) {\n return EditorView.decorations.of(Decoration.none);\n }\n const line = doc.line(errorLine);\n return EditorView.decorations.of(\n Decoration.set([errorLineDeco.range(line.from)]),\n );\n};\n\n// ---- Helpers ----\n\nconst getThemeExtensions = (theme: Theme) => {\n if (theme === \"dark\") {\n return [darkTheme, syntaxHighlighting(darkHighlight)];\n }\n return [lightTheme, syntaxHighlighting(lightHighlight)];\n};\n\nconst CodeMirrorEditor = ({\n value,\n onChange,\n onKeyboardSubmit,\n placeholder,\n theme,\n errorLine,\n}: CodeMirrorEditorProps) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const viewRef = useRef<EditorView | null>(null);\n const onChangeRef = useRef(onChange);\n const onKeyboardSubmitRef = useRef(onKeyboardSubmit);\n const themeCompartmentRef = useRef(new Compartment());\n const errorLineCompartmentRef = useRef(new Compartment());\n\n onChangeRef.current = onChange;\n onKeyboardSubmitRef.current = onKeyboardSubmit;\n\n useEffect(() => {\n if (!containerRef.current) {\n return;\n }\n\n const themeCompartment = themeCompartmentRef.current;\n\n const view = new EditorView({\n state: EditorState.create({\n doc: value,\n extensions: [\n keymap.of([\n {\n key: \"Mod-Enter\",\n run: () => {\n onKeyboardSubmitRef.current?.();\n return true;\n },\n },\n // historyKeymap binds Mod-Shift-z only on Mac; add it for all platforms\n { key: \"Mod-Shift-z\", run: redo, preventDefault: true },\n ]),\n EditorView.updateListener.of((update) => {\n if (update.docChanged) {\n onChangeRef.current(update.state.doc.toString());\n }\n }),\n history(),\n keymap.of([...defaultKeymap, ...historyKeymap]),\n lineNumbers(),\n EditorView.lineWrapping,\n themeCompartment.of(getThemeExtensions(theme)),\n errorLineCompartmentRef.current.of([]),\n mermaidLite(),\n drawSelection({ drawRangeCursor: true }),\n ...(placeholder ? [cmPlaceholder(placeholder)] : []),\n ],\n }),\n parent: containerRef.current,\n });\n\n viewRef.current = view;\n view.focus();\n\n return () => {\n view.destroy();\n viewRef.current = null;\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // Swap theme dynamically via compartment\n useEffect(() => {\n const view = viewRef.current;\n if (!view) {\n return;\n }\n view.dispatch({\n effects: themeCompartmentRef.current.reconfigure(\n getThemeExtensions(theme),\n ),\n });\n }, [theme]);\n\n // Update error line highlight\n useEffect(() => {\n const view = viewRef.current;\n if (!view) {\n return;\n }\n view.dispatch({\n effects: errorLineCompartmentRef.current.reconfigure(\n getErrorLineExtension(errorLine, view.state.doc),\n ),\n });\n }, [errorLine]);\n\n // Sync external value changes into EditorView\n useEffect(() => {\n const view = viewRef.current;\n if (!view) {\n return;\n }\n const currentDoc = view.state.doc.toString();\n if (value !== currentDoc) {\n view.dispatch({\n changes: { from: 0, to: currentDoc.length, insert: value },\n });\n }\n }, [value]);\n\n return (\n <div\n ref={containerRef}\n className=\"ttd-dialog-input ttd-dialog-input--codemirror\"\n />\n );\n};\n\nexport default CodeMirrorEditor;\n", "import { StreamLanguage } from \"@codemirror/language\";\n\nconst mermaidStreamParser = StreamLanguage.define({\n token(stream) {\n // Comments: %%...\n if (stream.match(/^%%.*$/)) {\n return \"comment\";\n }\n\n // Strings\n if (stream.match(/^\"(?:[^\"\\\\]|\\\\.)*\"/)) {\n return \"string\";\n }\n\n // Diagram type keywords (at start of line or after whitespace)\n if (\n stream.match(\n /^(flowchart|graph|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt|pie|mindmap|journey|gitGraph|timeline|quadrantChart|sankey|xychart)\\b/i,\n )\n ) {\n return \"keyword\";\n }\n\n // Direction keywords\n if (stream.match(/^(TB|TD|BT|RL|LR)\\b/)) {\n return \"keyword\";\n }\n\n // Keywords\n if (\n stream.match(\n /^(subgraph|end|participant|actor|loop|alt|else|opt|par|critical|break|rect|note|over|activate|deactivate|title|section|class|style|linkStyle|classDef|click)\\b/i,\n )\n ) {\n return \"keyword\";\n }\n\n // Arrows: -->, ---, -.->, ===>, etc.\n if (stream.match(/^[-.=<>|ox]+>/)) {\n return \"operator\";\n }\n if (stream.match(/^<[-.=<>|ox]+/)) {\n return \"operator\";\n }\n if (stream.match(/^--+|\\.\\.+|==+/)) {\n return \"operator\";\n }\n\n // Labels in brackets/parens: [text], (text), {text}, ((text)), etc.\n if (stream.match(/^[[\\](){}|<>]/)) {\n return \"bracket\";\n }\n\n // Node IDs (alphanumeric)\n if (stream.match(/^[A-Za-z_][A-Za-z0-9_]*/)) {\n return \"variableName\";\n }\n\n // Numbers\n if (stream.match(/^\\d+(\\.\\d+)?/)) {\n return \"number\";\n }\n\n // Punctuation\n if (stream.match(/^[,:;]/)) {\n return \"punctuation\";\n }\n\n // Skip whitespace\n if (stream.eatSpace()) {\n return null;\n }\n\n // Skip any other character\n stream.next();\n return null;\n },\n});\n\nexport function mermaidLite() {\n return mermaidStreamParser;\n}\n"],
5
+ "mappings": ";;;;AAAA,SAAS,WAAW,cAAc;AAClC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf;AAAA,OACK;AACP,SAAS,aAAa,mBAAmC;AACzD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,oBAAoB,sBAAsB;AACnD,SAAS,YAAY;;;ACjBrB,SAAS,sBAAsB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AAS,wBAAwB,QAAQ;AAAA,QACvC,sBAAsB,WAAW,KAAK,MAAM,GAAG;AAAA,MACjD;AAAA,IACF,CAAC;AAAA,EACH,GAAG,CAAC,SAAS,CAAC;AAGd,YAAU,MAAM;AACd,UAAM,OAAO,QAAQ;AACrB,QAAI,CAAC,MAAM;AACT;AAAA,IACF;AACA,UAAM,aAAa,KAAK,MAAM,IAAI,SAAS;AAC3C,QAAI,UAAU,YAAY;AACxB,WAAK,SAAS;AAAA,QACZ,SAAS,EAAE,MAAM,GAAG,IAAI,WAAW,QAAQ,QAAQ,MAAM;AAAA,MAC3D,CAAC;AAAA,IACH;AAAA,EACF,GAAG,CAAC,KAAK,CAAC;AAEV,SACE;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,MACL,WAAU;AAAA;AAAA,EACZ;AAEJ;AAEA,IAAO,2BAAQ;",
6
+ "names": []
7
+ }
@@ -2,12 +2,12 @@ import {
2
2
  decodePngMetadata,
3
3
  encodePngMetadata,
4
4
  getTEXtChunk
5
- } from "../chunk-K532CM3P.js";
6
- import "../chunk-M2XQF7GS.js";
5
+ } from "../chunk-JBODKHIT.js";
6
+ import "../chunk-NYLL7DNJ.js";
7
7
  import "../chunk-XDFCUUT6.js";
8
8
  export {
9
9
  decodePngMetadata,
10
10
  encodePngMetadata,
11
11
  getTEXtChunk
12
12
  };
13
- //# sourceMappingURL=image-2KXEDCIH.js.map
13
+ //# sourceMappingURL=image-WSL7K3G4.js.map
@@ -285,9 +285,13 @@
285
285
  --popup-text-inverted-color: #fff;
286
286
  --select-highlight-color: #339af0;
287
287
  --shadow-island:
288
- 0px 0px 0.9310142993927002px 0px rgba(0, 0, 0, 0.17),
289
- 0px 0px 3.1270833015441895px 0px rgba(0, 0, 0, 0.08),
288
+ 0px 0px 1px 0px rgba(0, 0, 0, 0.17),
289
+ 0px 0px 3px 0px rgba(0, 0, 0, 0.08),
290
290
  0px 7px 14px 0px rgba(0, 0, 0, 0.05);
291
+ --shadow-island-stronger:
292
+ 0px 0px 1px 0px rgba(0, 0, 0, 0.17),
293
+ 0px 0px 3px 0px rgba(0, 0, 0, 0.08),
294
+ 0px 7px 14px 0px rgb(0 0 0 / 18%);
291
295
  --button-hover-bg: var(--color-surface-high);
292
296
  --button-active-bg: var(--color-surface-high);
293
297
  --button-active-border: var(--color-brand-active);
@@ -448,10 +452,6 @@
448
452
  --popup-text-color: #ced4da;
449
453
  --popup-text-inverted-color: #2c2c2c;
450
454
  --select-highlight-color: #4dabf7;
451
- --shadow-island:
452
- 0px 0px 0.9310142993927002px 0px rgba(0, 0, 0, 0.17),
453
- 0px 0px 3.1270833015441895px 0px rgba(0, 0, 0, 0.08),
454
- 0px 7px 14px 0px rgba(0, 0, 0, 0.05);
455
455
  --modal-shadow:
456
456
  0px 100px 80px rgba(0, 0, 0, 0.07),
457
457
  0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198),
@@ -1146,13 +1146,18 @@
1146
1146
  padding: 0.5rem;
1147
1147
  background: var(--popup-bg-color);
1148
1148
  border: 0 solid rgba(255, 255, 255, 0.25);
1149
- box-shadow: var(--shadow-island);
1149
+ box-shadow: var(--shadow-island-stronger);
1150
1150
  border-radius: 4px;
1151
- position: absolute;
1152
1151
  }
1153
1152
  :root[dir=rtl] .excalidraw .picker {
1154
1153
  padding: 0.4rem;
1155
1154
  }
1155
+ .excalidraw .picker-sections,
1156
+ .excalidraw .picker-section {
1157
+ display: flex;
1158
+ flex-direction: column;
1159
+ gap: 0.5rem;
1160
+ }
1156
1161
  .excalidraw .picker-container button,
1157
1162
  .excalidraw .picker button {
1158
1163
  position: relative;
@@ -1199,7 +1204,12 @@
1199
1204
  }
1200
1205
  .excalidraw .picker-collapsible {
1201
1206
  font-size: 0.75rem;
1202
- padding: 0.5rem 0;
1207
+ padding: 0;
1208
+ color: var(--text-primary-color);
1209
+ }
1210
+ .excalidraw .picker-section-label {
1211
+ font-size: 0.75rem;
1212
+ color: var(--text-primary-color);
1203
1213
  }
1204
1214
  .excalidraw .picker-keybinding {
1205
1215
  position: absolute;
@@ -2339,9 +2349,13 @@
2339
2349
  --popup-text-inverted-color: #fff;
2340
2350
  --select-highlight-color: #339af0;
2341
2351
  --shadow-island:
2342
- 0px 0px 0.9310142993927002px 0px rgba(0, 0, 0, 0.17),
2343
- 0px 0px 3.1270833015441895px 0px rgba(0, 0, 0, 0.08),
2352
+ 0px 0px 1px 0px rgba(0, 0, 0, 0.17),
2353
+ 0px 0px 3px 0px rgba(0, 0, 0, 0.08),
2344
2354
  0px 7px 14px 0px rgba(0, 0, 0, 0.05);
2355
+ --shadow-island-stronger:
2356
+ 0px 0px 1px 0px rgba(0, 0, 0, 0.17),
2357
+ 0px 0px 3px 0px rgba(0, 0, 0, 0.08),
2358
+ 0px 7px 14px 0px rgb(0 0 0 / 18%);
2345
2359
  --button-hover-bg: var(--color-surface-high);
2346
2360
  --button-active-bg: var(--color-surface-high);
2347
2361
  --button-active-border: var(--color-brand-active);
@@ -2502,10 +2516,6 @@
2502
2516
  --popup-text-color: #ced4da;
2503
2517
  --popup-text-inverted-color: #2c2c2c;
2504
2518
  --select-highlight-color: #4dabf7;
2505
- --shadow-island:
2506
- 0px 0px 0.9310142993927002px 0px rgba(0, 0, 0, 0.17),
2507
- 0px 0px 3.1270833015441895px 0px rgba(0, 0, 0, 0.08),
2508
- 0px 7px 14px 0px rgba(0, 0, 0, 0.05);
2509
2519
  --modal-shadow:
2510
2520
  0px 100px 80px rgba(0, 0, 0, 0.07),
2511
2521
  0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198),
@@ -5169,6 +5179,39 @@
5169
5179
  height: 100%;
5170
5180
  }
5171
5181
  }
5182
+ .excalidraw .ttd-dialog-input--loading {
5183
+ display: flex;
5184
+ align-items: center;
5185
+ justify-content: center;
5186
+ }
5187
+ .excalidraw .ttd-dialog-input--codemirror {
5188
+ padding: 0;
5189
+ overflow: hidden;
5190
+ height: 0;
5191
+ flex: 1 1 0;
5192
+ min-height: 0;
5193
+ }
5194
+ .excalidraw .ttd-dialog-input--codemirror .cm-editor {
5195
+ height: 100%;
5196
+ font-family: monospace;
5197
+ }
5198
+ .excalidraw .ttd-dialog-input--codemirror .cm-editor.cm-focused {
5199
+ outline: none;
5200
+ }
5201
+ .excalidraw .ttd-dialog-input--codemirror .cm-scroller {
5202
+ padding: 0.85rem 0;
5203
+ overflow: auto;
5204
+ }
5205
+ .excalidraw .ttd-dialog-input--codemirror .cm-gutters {
5206
+ padding-left: 0.25rem;
5207
+ }
5208
+ .excalidraw .ttd-dialog-input--codemirror .cm-content {
5209
+ padding: 0;
5210
+ }
5211
+ .excalidraw .ttd-dialog-input--codemirror .cm-placeholder {
5212
+ color: var(--color-gray-40);
5213
+ font-style: italic;
5214
+ }
5172
5215
  .excalidraw .ttd-dialog-output-wrapper {
5173
5216
  display: flex;
5174
5217
  flex-direction: column;
@@ -5269,15 +5312,49 @@
5269
5312
  text-align: center;
5270
5313
  margin-top: 0.25rem;
5271
5314
  }
5315
+ .excalidraw .ttd-dialog-output-error .ttd-dialog-output-error-summary {
5316
+ width: 100%;
5317
+ max-width: 640px;
5318
+ color: var(--color-gray-50);
5319
+ font-size: 0.9rem;
5320
+ text-align: left;
5321
+ }
5322
+ .excalidraw .ttd-dialog-output-error .ttd-dialog-output-error-summary__headline {
5323
+ font-weight: 600;
5324
+ color: var(--color-gray-60);
5325
+ }
5326
+ .excalidraw .ttd-dialog-output-error .ttd-dialog-output-error-summary__label {
5327
+ margin-top: 0.35rem;
5328
+ font-weight: 500;
5329
+ }
5330
+ .excalidraw .ttd-dialog-output-error .ttd-dialog-output-error-summary__causes {
5331
+ margin: 0.35rem 0 0;
5332
+ padding-left: 2rem;
5333
+ }
5272
5334
  .excalidraw .ttd-dialog-output-error .ttd-dialog-output-error-message {
5273
5335
  text-align: left;
5274
5336
  font-weight: 400;
5275
5337
  color: var(--color-gray-50);
5276
5338
  word-break: break-word;
5277
5339
  white-space: pre-wrap;
5278
- max-width: 100%;
5340
+ max-width: 640px;
5341
+ width: 100%;
5279
5342
  font-family: monospace;
5280
5343
  }
5344
+ .excalidraw .ttd-dialog-output-error .ttd-dialog-output-error-message__caret {
5345
+ color: var(--color-danger);
5346
+ }
5347
+ .excalidraw .ttd-dialog-output-error .ttd-dialog-output-error-autofix-slot {
5348
+ align-self: flex-start;
5349
+ margin-top: 0.35rem;
5350
+ min-height: 2.5rem;
5351
+ display: flex;
5352
+ align-items: flex-start;
5353
+ }
5354
+ .excalidraw .ttd-dialog-output-error .ttd-dialog-output-error-autofix {
5355
+ margin-top: 0;
5356
+ white-space: nowrap;
5357
+ }
5281
5358
  .excalidraw .ttd-dialog-panels {
5282
5359
  height: 100%;
5283
5360
  }
@@ -6920,9 +6997,13 @@
6920
6997
  --popup-text-inverted-color: #fff;
6921
6998
  --select-highlight-color: #339af0;
6922
6999
  --shadow-island:
6923
- 0px 0px 0.9310142993927002px 0px rgba(0, 0, 0, 0.17),
6924
- 0px 0px 3.1270833015441895px 0px rgba(0, 0, 0, 0.08),
7000
+ 0px 0px 1px 0px rgba(0, 0, 0, 0.17),
7001
+ 0px 0px 3px 0px rgba(0, 0, 0, 0.08),
6925
7002
  0px 7px 14px 0px rgba(0, 0, 0, 0.05);
7003
+ --shadow-island-stronger:
7004
+ 0px 0px 1px 0px rgba(0, 0, 0, 0.17),
7005
+ 0px 0px 3px 0px rgba(0, 0, 0, 0.08),
7006
+ 0px 7px 14px 0px rgb(0 0 0 / 18%);
6926
7007
  --button-hover-bg: var(--color-surface-high);
6927
7008
  --button-active-bg: var(--color-surface-high);
6928
7009
  --button-active-border: var(--color-brand-active);
@@ -7083,10 +7164,6 @@
7083
7164
  --popup-text-color: #ced4da;
7084
7165
  --popup-text-inverted-color: #2c2c2c;
7085
7166
  --select-highlight-color: #4dabf7;
7086
- --shadow-island:
7087
- 0px 0px 0.9310142993927002px 0px rgba(0, 0, 0, 0.17),
7088
- 0px 0px 3.1270833015441895px 0px rgba(0, 0, 0, 0.08),
7089
- 0px 7px 14px 0px rgba(0, 0, 0, 0.05);
7090
7167
  --modal-shadow:
7091
7168
  0px 100px 80px rgba(0, 0, 0, 0.07),
7092
7169
  0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198),