dishui 0.0.47 → 0.0.49
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/components/pro/CodeEditor/editors/MarkdownEditor.js +1 -2
- package/dist/components/pro/CodeEditor/editors/MarkdownEditor.js.map +1 -1
- package/dist/components/pro/CodeEditor/themes.js +0 -25
- package/dist/components/pro/CodeEditor/themes.js.map +1 -1
- package/dist/components/pro/CodeEditor/types.d.ts +1 -1
- package/dist/components/pro/Flow/Flow.js +500 -483
- package/dist/components/pro/Flow/Flow.js.map +1 -1
- package/dist/components/pro/Flow/FlowCanvas.js +526 -524
- package/dist/components/pro/Flow/FlowCanvas.js.map +1 -1
- package/dist/components/pro/Flow/canvas/GridRenderer.d.ts +3 -0
- package/dist/components/pro/Flow/canvas/GridRenderer.js +28 -23
- package/dist/components/pro/Flow/canvas/GridRenderer.js.map +1 -1
- package/dist/components/pro/Flow/canvas/MiniMapRenderer.js +18 -17
- package/dist/components/pro/Flow/canvas/MiniMapRenderer.js.map +1 -1
- package/dist/components/pro/Flow/canvas/PixiApp.d.ts +2 -0
- package/dist/components/pro/Flow/canvas/PixiApp.js +14 -11
- package/dist/components/pro/Flow/canvas/PixiApp.js.map +1 -1
- package/dist/components/pro/Flow/constants.js +7 -7
- package/dist/components/pro/Flow/constants.js.map +1 -1
- package/dist/components/pro/Flow/context/FlowAIContext.d.ts +15 -0
- package/dist/components/pro/Flow/context/FlowAIContext.js +32 -0
- package/dist/components/pro/Flow/context/FlowAIContext.js.map +1 -0
- package/dist/components/pro/Flow/context/FlowUIContext.d.ts +4 -1
- package/dist/components/pro/Flow/context/FlowUIContext.js +58 -55
- package/dist/components/pro/Flow/context/FlowUIContext.js.map +1 -1
- package/dist/components/pro/Flow/edges/EdgeRenderer.js +22 -21
- package/dist/components/pro/Flow/edges/EdgeRenderer.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useFlowImportExport.js +32 -32
- package/dist/components/pro/Flow/hooks/useFlowImportExport.js.map +1 -1
- package/dist/components/pro/Flow/hooks/usePixiApp.d.ts +6 -1
- package/dist/components/pro/Flow/hooks/usePixiApp.js +49 -30
- package/dist/components/pro/Flow/hooks/usePixiApp.js.map +1 -1
- package/dist/components/pro/Flow/index.d.ts +2 -0
- package/dist/components/pro/Flow/lines/FreehandTool.js +21 -20
- package/dist/components/pro/Flow/lines/FreehandTool.js.map +1 -1
- package/dist/components/pro/Flow/lines/GeometricLineTool.js +22 -18
- package/dist/components/pro/Flow/lines/GeometricLineTool.js.map +1 -1
- package/dist/components/pro/Flow/lines/LineRenderer.js +19 -18
- package/dist/components/pro/Flow/lines/LineRenderer.js.map +1 -1
- package/dist/components/pro/Flow/nodes/MediaContent.js +143 -124
- package/dist/components/pro/Flow/nodes/MediaContent.js.map +1 -1
- package/dist/components/pro/Flow/nodes/MediaOverlay.js +22 -17
- package/dist/components/pro/Flow/nodes/MediaOverlay.js.map +1 -1
- package/dist/components/pro/Flow/nodes/NodeRenderer.js +77 -76
- package/dist/components/pro/Flow/nodes/NodeRenderer.js.map +1 -1
- package/dist/components/pro/Flow/nodes/aiClient.d.ts +22 -0
- package/dist/components/pro/Flow/nodes/aiClient.js +107 -54
- package/dist/components/pro/Flow/nodes/aiClient.js.map +1 -1
- package/dist/components/pro/Flow/nodes/svgIcons.js +6 -6
- package/dist/components/pro/Flow/nodes/svgIcons.js.map +1 -1
- package/dist/components/pro/Flow/panels/AIPanel.d.ts +2 -0
- package/dist/components/pro/Flow/panels/AIPanel.js +498 -0
- package/dist/components/pro/Flow/panels/AIPanel.js.map +1 -0
- package/dist/components/pro/Flow/panels/FlowPanelGroup.js +51 -39
- package/dist/components/pro/Flow/panels/FlowPanelGroup.js.map +1 -1
- package/dist/components/pro/Flow/panels/FlowToolbar.js +91 -85
- package/dist/components/pro/Flow/panels/FlowToolbar.js.map +1 -1
- package/dist/components/pro/Flow/panels/InspectorPanel.js +372 -332
- package/dist/components/pro/Flow/panels/InspectorPanel.js.map +1 -1
- package/dist/components/pro/Flow/panels/OutlinePanel.js +28 -27
- package/dist/components/pro/Flow/panels/OutlinePanel.js.map +1 -1
- package/dist/components/pro/Flow/panels/ShapePalette.js +107 -104
- package/dist/components/pro/Flow/panels/ShapePalette.js.map +1 -1
- package/dist/components/pro/Flow/panels/toolbarIcons.d.ts +1 -0
- package/dist/components/pro/Flow/panels/toolbarIcons.js +25 -20
- package/dist/components/pro/Flow/panels/toolbarIcons.js.map +1 -1
- package/dist/components/pro/Flow/types.d.ts +13 -0
- package/dist/components/pro/Flow/types.js.map +1 -1
- package/dist/components/pro/Flow/utils/themeColor.d.ts +87 -0
- package/dist/components/pro/Flow/utils/themeColor.js +212 -0
- package/dist/components/pro/Flow/utils/themeColor.js.map +1 -0
- package/dist/contexts/AppContext.d.ts +1 -1
- package/dist/contexts/AppContext.js +28 -29
- package/dist/contexts/AppContext.js.map +1 -1
- package/dist/dishui.css +1 -1
- package/dist/favicon.svg +10 -0
- package/dist/flow.js +56 -51
- package/dist/styles/themeStyles.js +6 -11
- package/dist/styles/themeStyles.js.map +1 -1
- package/dist/utils/themes.js +3 -23
- package/dist/utils/themes.js.map +1 -1
- package/package.json +17 -18
|
@@ -236,10 +236,14 @@ var h = {
|
|
|
236
236
|
...h,
|
|
237
237
|
"aria-hidden": "true",
|
|
238
238
|
children: /* @__PURE__ */ r("path", { d: "M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01" })
|
|
239
|
-
}),
|
|
239
|
+
}), L = () => /* @__PURE__ */ t("svg", {
|
|
240
240
|
...h,
|
|
241
241
|
"aria-hidden": "true",
|
|
242
242
|
children: [/* @__PURE__ */ r("path", { d: "M8 4H7a2 2 0 0 0-2 2v3a2 2 0 0 1-2 2 2 2 0 0 1 2 2v3a2 2 0 0 0 2 2h1" }), /* @__PURE__ */ r("path", { d: "M16 4h1a2 2 0 0 1 2 2v3a2 2 0 0 0 2 2 2 2 0 0 0-2 2v3a2 2 0 0 1-2 2h-1" })]
|
|
243
|
+
}), V = () => /* @__PURE__ */ t("svg", {
|
|
244
|
+
...h,
|
|
245
|
+
"aria-hidden": "true",
|
|
246
|
+
children: [/* @__PURE__ */ r("path", { d: "M12 3l1.9 4.6L18.5 9.5 13.9 11.4 12 16l-1.9-4.6L5.5 9.5l4.6-1.9L12 3z" }), /* @__PURE__ */ r("path", { d: "M18 15l.9 2.1L21 18l-2.1.9L18 21l-.9-2.1L15 18l2.1-.9L18 15z" })]
|
|
243
247
|
}), H = () => /* @__PURE__ */ t("svg", {
|
|
244
248
|
...h,
|
|
245
249
|
"aria-hidden": "true",
|
|
@@ -250,7 +254,7 @@ var h = {
|
|
|
250
254
|
height: "18",
|
|
251
255
|
rx: "2"
|
|
252
256
|
}), /* @__PURE__ */ r("path", { d: "M9 3v18M15 3v18M3 9h18M3 15h18" })]
|
|
253
|
-
}),
|
|
257
|
+
}), z = () => /* @__PURE__ */ t("svg", {
|
|
254
258
|
...h,
|
|
255
259
|
"aria-hidden": "true",
|
|
256
260
|
children: [/* @__PURE__ */ r("rect", {
|
|
@@ -266,7 +270,7 @@ var h = {
|
|
|
266
270
|
height: "6",
|
|
267
271
|
rx: "1"
|
|
268
272
|
})]
|
|
269
|
-
}),
|
|
273
|
+
}), C = () => /* @__PURE__ */ t("svg", {
|
|
270
274
|
...h,
|
|
271
275
|
"aria-hidden": "true",
|
|
272
276
|
children: [
|
|
@@ -275,7 +279,7 @@ var h = {
|
|
|
275
279
|
/* @__PURE__ */ r("path", { d: "M12 18v-6" }),
|
|
276
280
|
/* @__PURE__ */ r("path", { d: "M9.5 14.5 12 12l2.5 2.5" })
|
|
277
281
|
]
|
|
278
|
-
}),
|
|
282
|
+
}), b = () => /* @__PURE__ */ t("svg", {
|
|
279
283
|
...h,
|
|
280
284
|
"aria-hidden": "true",
|
|
281
285
|
children: [/* @__PURE__ */ r("path", { d: "M22 2 11 13" }), /* @__PURE__ */ r("path", { d: "M22 2 15 22l-4-9-9-4 20-7z" })]
|
|
@@ -302,7 +306,7 @@ var h = {
|
|
|
302
306
|
opacity: "0.5"
|
|
303
307
|
})
|
|
304
308
|
]
|
|
305
|
-
}),
|
|
309
|
+
}), E = () => /* @__PURE__ */ t("svg", {
|
|
306
310
|
...h,
|
|
307
311
|
"aria-hidden": "true",
|
|
308
312
|
children: [
|
|
@@ -312,7 +316,7 @@ var h = {
|
|
|
312
316
|
/* @__PURE__ */ r("path", { d: "M17 14v6M14.5 17.5 17 20l2.5-2.5" }),
|
|
313
317
|
/* @__PURE__ */ r("path", { d: "M10 14v5h1a1.4 1.4 0 0 0 1.4-1.4v-2.2A1.4 1.4 0 0 0 11 14z" })
|
|
314
318
|
]
|
|
315
|
-
}),
|
|
319
|
+
}), G = () => /* @__PURE__ */ t("svg", {
|
|
316
320
|
...h,
|
|
317
321
|
"aria-hidden": "true",
|
|
318
322
|
children: [
|
|
@@ -326,7 +330,7 @@ var h = {
|
|
|
326
330
|
/* @__PURE__ */ r("path", { d: "M6 15V9l3 3 3-3v6" }),
|
|
327
331
|
/* @__PURE__ */ r("path", { d: "M17 9v4m0 0 2-2m-2 2-2-2" })
|
|
328
332
|
]
|
|
329
|
-
}),
|
|
333
|
+
}), P = () => /* @__PURE__ */ t("svg", {
|
|
330
334
|
...h,
|
|
331
335
|
"aria-hidden": "true",
|
|
332
336
|
children: [
|
|
@@ -338,7 +342,7 @@ var h = {
|
|
|
338
342
|
opacity: "0.5"
|
|
339
343
|
})
|
|
340
344
|
]
|
|
341
|
-
}),
|
|
345
|
+
}), j = ({ kind: e }) => {
|
|
342
346
|
switch (e) {
|
|
343
347
|
case "front":
|
|
344
348
|
return /* @__PURE__ */ t("svg", {
|
|
@@ -451,7 +455,7 @@ var h = {
|
|
|
451
455
|
]
|
|
452
456
|
});
|
|
453
457
|
}
|
|
454
|
-
},
|
|
458
|
+
}, D = ({ visible: e = !0 }) => /* @__PURE__ */ t("svg", {
|
|
455
459
|
...h,
|
|
456
460
|
"aria-hidden": "true",
|
|
457
461
|
children: [
|
|
@@ -472,7 +476,7 @@ var h = {
|
|
|
472
476
|
}),
|
|
473
477
|
e ? /* @__PURE__ */ r("path", { d: "M2 12s3.5-5 10-5 10 5 10 5-3.5 5-10 5S2 12 2 12zM12 10a2 2 0 1 0 0 4 2 2 0 0 0 0-4z" }) : /* @__PURE__ */ r("path", { d: "M3 3l18 18" })
|
|
474
478
|
]
|
|
475
|
-
}),
|
|
479
|
+
}), F = () => /* @__PURE__ */ t("svg", {
|
|
476
480
|
...h,
|
|
477
481
|
"aria-hidden": "true",
|
|
478
482
|
children: [
|
|
@@ -492,26 +496,27 @@ var h = {
|
|
|
492
496
|
]
|
|
493
497
|
});
|
|
494
498
|
export {
|
|
499
|
+
V as IconAI,
|
|
495
500
|
g as IconAlign,
|
|
496
|
-
|
|
501
|
+
D as IconAnchorVisible,
|
|
497
502
|
o as IconAutoFocus,
|
|
498
503
|
l as IconBack,
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
504
|
+
P as IconExportJson,
|
|
505
|
+
G as IconExportMarkdown,
|
|
506
|
+
E as IconExportPdf,
|
|
502
507
|
A as IconExportPng,
|
|
503
508
|
w as IconFitView,
|
|
504
509
|
s as IconGeoGroup,
|
|
505
510
|
H as IconGrid,
|
|
506
511
|
p as IconGroup,
|
|
507
|
-
|
|
512
|
+
C as IconImport,
|
|
508
513
|
f as IconInspector,
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
514
|
+
L as IconJson,
|
|
515
|
+
j as IconLayer,
|
|
516
|
+
z as IconMiniMap,
|
|
512
517
|
m as IconOutline,
|
|
513
|
-
|
|
514
|
-
|
|
518
|
+
F as IconPresent,
|
|
519
|
+
b as IconPublish,
|
|
515
520
|
M as IconRedo,
|
|
516
521
|
I as IconShapes,
|
|
517
522
|
v as IconUndo,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbarIcons.js","names":[],"sources":["../../../../../src/components/pro/Flow/panels/toolbarIcons.tsx"],"sourcesContent":["import React from 'react';\n\n/**\n * Toolbar icon set for the Flow editor.\n * Compact 20x20 stroke icons that inherit `currentColor`, so they follow the\n * button's variant (primary/ghost) automatically.\n */\n\nconst base = {\n width: 18,\n height: 18,\n viewBox: '0 0 24 24',\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: 2,\n strokeLinecap: 'round' as const,\n strokeLinejoin: 'round' as const,\n};\n\nexport const IconSelect: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M4 3l7 17 2.5-6.5L20 11 4 3z\" />\n </svg>\n);\n\n\nexport const IconAutoFocus: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"12\" r=\"6\" />\n <circle cx=\"12\" cy=\"12\" r=\"2\" />\n <path d=\"M4 12H2M22 12h-2M12 4V2M12 22v-2\" />\n <path d=\"M17.5 5.5l1-1M5.5 17.5l-1 1\" />\n </svg>\n);\n\nexport const IconBack: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M19 12H5\" />\n <path d=\"M11 18l-6-6 6-6\" />\n </svg>\n);\n\nexport const IconUndo: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M9 14L4 9l5-5\" />\n <path d=\"M4 9h11a5 5 0 0 1 0 10h-4\" />\n </svg>\n);\n\nexport const IconRedo: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M15 14l5-5-5-5\" />\n <path d=\"M20 9H9a5 5 0 0 0 0 10h4\" />\n </svg>\n);\n\nexport const IconGroup: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"3\" y=\"3\" width=\"8\" height=\"8\" rx=\"1\" />\n <rect x=\"13\" y=\"13\" width=\"8\" height=\"8\" rx=\"1\" />\n <path d=\"M13 6h4a1 1 0 0 1 1 1v4\" strokeDasharray=\"2 2\" />\n </svg>\n);\n\nexport const IconGeoGroup: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" strokeDasharray=\"3 3\" />\n <rect x=\"7\" y=\"7\" width=\"4\" height=\"4\" rx=\"0.5\" />\n <rect x=\"13\" y=\"13\" width=\"4\" height=\"4\" rx=\"0.5\" />\n </svg>\n);\n\nexport const IconUngroup: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"3\" y=\"3\" width=\"7\" height=\"7\" rx=\"1\" />\n <rect x=\"14\" y=\"14\" width=\"7\" height=\"7\" rx=\"1\" />\n <path d=\"M14 5h5M17 3v4\" />\n </svg>\n);\n\nexport type AlignIconKind = 'left' | 'center-h' | 'right' | 'top' | 'center-v' | 'bottom' | 'distribute-h' | 'distribute-v';\n\nexport const IconAlign: React.FC<{ kind: AlignIconKind }> = ({ kind }) => {\n const vertical = kind === 'left' || kind === 'center-h' || kind === 'right';\n if (vertical) {\n const x = kind === 'left' ? 5 : kind === 'right' ? 19 : 12;\n return (\n <svg {...base} aria-hidden=\"true\">\n <path d={`M${x} 3v18`} />\n <rect x={kind === 'left' ? 5 : kind === 'right' ? 10 : 7} y=\"5\" width=\"9\" height=\"4\" rx=\"0.5\" />\n <rect x={kind === 'left' ? 5 : kind === 'right' ? 5 : 4} y=\"14\" width=\"14\" height=\"4\" rx=\"0.5\" />\n </svg>\n );\n }\n if (kind === 'top' || kind === 'center-v' || kind === 'bottom') {\n const y = kind === 'top' ? 5 : kind === 'bottom' ? 19 : 12;\n return (\n <svg {...base} aria-hidden=\"true\">\n <path d={`M3 ${y}h18`} />\n <rect x=\"5\" y={kind === 'top' ? 5 : kind === 'bottom' ? 10 : 7} width=\"4\" height=\"9\" rx=\"0.5\" />\n <rect x=\"14\" y={kind === 'top' ? 5 : kind === 'bottom' ? 5 : 4} width=\"4\" height=\"14\" rx=\"0.5\" />\n </svg>\n );\n }\n return (\n <svg {...base} aria-hidden=\"true\">\n {kind === 'distribute-h' ? (\n <><path d=\"M3 3v18M21 3v18\" /><rect x=\"6\" y=\"7\" width=\"4\" height=\"10\" /><rect x=\"14\" y=\"7\" width=\"4\" height=\"10\" /></>\n ) : (\n <><path d=\"M3 3h18M3 21h18\" /><rect x=\"7\" y=\"6\" width=\"10\" height=\"4\" /><rect x=\"7\" y=\"14\" width=\"10\" height=\"4\" /></>\n )}\n </svg>\n );\n};\n\nexport const IconZoomOut: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"M21 21l-4.3-4.3M8 11h6\" />\n </svg>\n);\n\nexport const IconZoomIn: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"M21 21l-4.3-4.3M11 8v6M8 11h6\" />\n </svg>\n);\n\nexport const IconFitView: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M4 9V5a1 1 0 0 1 1-1h4M15 4h4a1 1 0 0 1 1 1v4M20 15v4a1 1 0 0 1-1 1h-4M9 20H5a1 1 0 0 1-1-1v-4\" />\n <rect x=\"9\" y=\"9\" width=\"6\" height=\"6\" rx=\"1\" />\n </svg>\n);\n\nexport const IconShapes: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"3\" y=\"13\" width=\"8\" height=\"8\" rx=\"1\" />\n <circle cx=\"17\" cy=\"7\" r=\"4\" />\n <path d=\"M13 21l4-7 4 7z\" />\n </svg>\n);\n\nexport const IconInspector: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"12\" r=\"3\" />\n <path d=\"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z\" />\n </svg>\n);\n\nexport const IconOutline: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01\" />\n </svg>\n);\n\nexport const IconJson: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M8 4H7a2 2 0 0 0-2 2v3a2 2 0 0 1-2 2 2 2 0 0 1 2 2v3a2 2 0 0 0 2 2h1\" />\n <path d=\"M16 4h1a2 2 0 0 1 2 2v3a2 2 0 0 0 2 2 2 2 0 0 0-2 2v3a2 2 0 0 1-2 2h-1\" />\n </svg>\n);\n\nexport const IconGrid: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" />\n <path d=\"M9 3v18M15 3v18M3 9h18M3 15h18\" />\n </svg>\n);\n\nexport const IconMiniMap: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"16\" rx=\"2\" />\n <rect x=\"13\" y=\"12\" width=\"6\" height=\"6\" rx=\"1\" />\n </svg>\n);\n\nexport const IconImport: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z\" />\n <path d=\"M14 3v5h5\" />\n <path d=\"M12 18v-6\" />\n <path d=\"M9.5 14.5 12 12l2.5 2.5\" />\n </svg>\n);\n\nexport const IconExport: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M12 15V3\" />\n <path d=\"M8 7l4-4 4 4\" />\n <path d=\"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2\" />\n </svg>\n);\n\nexport const IconPublish: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M22 2 11 13\" />\n <path d=\"M22 2 15 22l-4-9-9-4 20-7z\" />\n </svg>\n);\n\nexport const IconExportImage: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"16\" rx=\"2\" />\n <circle cx=\"9\" cy=\"9\" r=\"1.5\" />\n <path d=\"M4 17l5-5 3 3 2-2 6 6\" />\n <path d=\"M16 3v7m-3-3 3 3 3-3\" />\n </svg>\n);\n\n/** Export PNG: an image frame with a download arrow into a tray. */\nexport const IconExportPng: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"3\" y=\"3\" width=\"12\" height=\"10\" rx=\"1.5\" />\n <circle cx=\"6.5\" cy=\"6.5\" r=\"1\" />\n <path d=\"M3 11l3.5-3 3 2.5\" />\n <path d=\"M19 12v6M16.5 15.5 19 18l2.5-2.5\" />\n <path d=\"M14 21h10\" opacity=\"0.5\" />\n </svg>\n);\n\n/** Export PDF: a document marked \"PDF\" with a download arrow. */\nexport const IconExportPdf: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M13 3H7a2 2 0 0 0-2 2v6\" />\n <path d=\"M13 3l5 5v3\" />\n <path d=\"M4.5 14h1.6a1.4 1.4 0 0 1 0 2.8H4.5V14v5\" />\n <path d=\"M17 14v6M14.5 17.5 17 20l2.5-2.5\" />\n <path d=\"M10 14v5h1a1.4 1.4 0 0 0 1.4-1.4v-2.2A1.4 1.4 0 0 0 11 14z\" />\n </svg>\n);\n\nexport const IconExportMarkdown: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <path d=\"M6 15V9l3 3 3-3v6\" />\n <path d=\"M17 9v4m0 0 2-2m-2 2-2-2\" />\n </svg>\n);\n\n/** Export JSON: braces with a download arrow into a tray. */\nexport const IconExportJson: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M9 4c-1.5 0-2 .6-2 2s.4 2-1 2c1.4 0 1 1 1 2s.5 2 2 2\" />\n <path d=\"M15 4c1.5 0 2 .6 2 2s-.4 2 1 2c-1.4 0-1 1-1 2s-.5 2-2 2\" />\n <path d=\"M12 13v6M9 16l3 3 3-3\" />\n <path d=\"M4 20h16\" opacity=\"0.5\" />\n </svg>\n);\n\n/** Layer / z-order controls: to-front, forward, backward, to-back. */\nexport type LayerIconKind = 'front' | 'up' | 'down' | 'back';\n\nexport const IconLayer: React.FC<{ kind: LayerIconKind }> = ({ kind }) => {\n // Metaphor: a stack of layers with the *moving* layer drawn solid and an\n // arrow showing the z-order direction. Front/back push all the way; up/down\n // shift by one. Each variant is visually distinct.\n switch (kind) {\n case 'front':\n // Solid square on top of two outlined layers + up arrow.\n return (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"7\" y=\"7\" width=\"10\" height=\"10\" rx=\"1.5\" fill=\"currentColor\" stroke=\"none\" />\n <path d=\"M4 15.5l3 1.7M20 15.5l-3 1.7\" opacity=\"0.5\" />\n <path d=\"M4 18.5l8 4.5 8-4.5\" opacity=\"0.5\" />\n <path d=\"M12 5V1M9.5 3 12 .8 14.5 3\" transform=\"translate(0 1)\" />\n </svg>\n );\n case 'up':\n // Solid layer with a single up arrow.\n return (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"3\" y=\"12\" width=\"11\" height=\"8\" rx=\"1.5\" fill=\"currentColor\" stroke=\"none\" opacity=\"0.4\" />\n <rect x=\"9\" y=\"8\" width=\"11\" height=\"8\" rx=\"1.5\" fill=\"currentColor\" stroke=\"none\" />\n <path d=\"M14.5 5.5V1M12 3l2.5-2.5L17 3\" />\n </svg>\n );\n case 'down':\n // Solid layer with a single down arrow.\n return (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"9\" y=\"8\" width=\"11\" height=\"8\" rx=\"1.5\" fill=\"currentColor\" stroke=\"none\" opacity=\"0.4\" />\n <rect x=\"3\" y=\"12\" width=\"11\" height=\"8\" rx=\"1.5\" fill=\"currentColor\" stroke=\"none\" />\n <path d=\"M14.5 18.5V23M12 20.5l2.5 2.5 2.5-2.5\" />\n </svg>\n );\n case 'back':\n default:\n // Outlined top layers over a solid bottom layer + down arrow.\n return (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M4 8.5l8-4.5 8 4.5\" opacity=\"0.5\" />\n <path d=\"M4 8.5l3 1.7M20 8.5l-3 1.7\" opacity=\"0.5\" />\n <rect x=\"7\" y=\"9\" width=\"10\" height=\"10\" rx=\"1.5\" fill=\"currentColor\" stroke=\"none\" />\n <path d=\"M12 21v4M9.5 23 12 25.2 14.5 23\" transform=\"translate(0 -1)\" />\n </svg>\n );\n }\n};\n\nexport const IconAnchorVisible: React.FC<{ visible?: boolean }> = ({ visible = true }) => (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"4\" y=\"5\" width=\"16\" height=\"14\" rx=\"2\" strokeDasharray=\"3 2\" />\n <circle cx=\"4\" cy=\"5\" r=\"2\" fill=\"currentColor\" stroke=\"none\" />\n {visible ? (\n <path d=\"M2 12s3.5-5 10-5 10 5 10 5-3.5 5-10 5S2 12 2 12zM12 10a2 2 0 1 0 0 4 2 2 0 0 0 0-4z\" />\n ) : (\n <path d=\"M3 3l18 18\" />\n )}\n </svg>\n);\n\nexport const IconPresent: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"2\" y=\"4\" width=\"20\" height=\"13\" rx=\"2\" />\n <path d=\"M10 8.5l4.5 2.5L10 13.5z\" fill=\"currentColor\" stroke=\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,CAAA;AAAA,IACtE,gBAAA,EAAC,QAAD,EAAM,GAAE,kBAAmB,CAAA;AAAA,EACxB"}
|
|
1
|
+
{"version":3,"file":"toolbarIcons.js","names":[],"sources":["../../../../../src/components/pro/Flow/panels/toolbarIcons.tsx"],"sourcesContent":["import React from 'react';\n\n/**\n * Toolbar icon set for the Flow editor.\n * Compact 20x20 stroke icons that inherit `currentColor`, so they follow the\n * button's variant (primary/ghost) automatically.\n */\n\nconst base = {\n width: 18,\n height: 18,\n viewBox: '0 0 24 24',\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: 2,\n strokeLinecap: 'round' as const,\n strokeLinejoin: 'round' as const,\n};\n\nexport const IconSelect: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M4 3l7 17 2.5-6.5L20 11 4 3z\" />\n </svg>\n);\n\n\nexport const IconAutoFocus: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"12\" r=\"6\" />\n <circle cx=\"12\" cy=\"12\" r=\"2\" />\n <path d=\"M4 12H2M22 12h-2M12 4V2M12 22v-2\" />\n <path d=\"M17.5 5.5l1-1M5.5 17.5l-1 1\" />\n </svg>\n);\n\nexport const IconBack: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M19 12H5\" />\n <path d=\"M11 18l-6-6 6-6\" />\n </svg>\n);\n\nexport const IconUndo: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M9 14L4 9l5-5\" />\n <path d=\"M4 9h11a5 5 0 0 1 0 10h-4\" />\n </svg>\n);\n\nexport const IconRedo: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M15 14l5-5-5-5\" />\n <path d=\"M20 9H9a5 5 0 0 0 0 10h4\" />\n </svg>\n);\n\nexport const IconGroup: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"3\" y=\"3\" width=\"8\" height=\"8\" rx=\"1\" />\n <rect x=\"13\" y=\"13\" width=\"8\" height=\"8\" rx=\"1\" />\n <path d=\"M13 6h4a1 1 0 0 1 1 1v4\" strokeDasharray=\"2 2\" />\n </svg>\n);\n\nexport const IconGeoGroup: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" strokeDasharray=\"3 3\" />\n <rect x=\"7\" y=\"7\" width=\"4\" height=\"4\" rx=\"0.5\" />\n <rect x=\"13\" y=\"13\" width=\"4\" height=\"4\" rx=\"0.5\" />\n </svg>\n);\n\nexport const IconUngroup: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"3\" y=\"3\" width=\"7\" height=\"7\" rx=\"1\" />\n <rect x=\"14\" y=\"14\" width=\"7\" height=\"7\" rx=\"1\" />\n <path d=\"M14 5h5M17 3v4\" />\n </svg>\n);\n\nexport type AlignIconKind = 'left' | 'center-h' | 'right' | 'top' | 'center-v' | 'bottom' | 'distribute-h' | 'distribute-v';\n\nexport const IconAlign: React.FC<{ kind: AlignIconKind }> = ({ kind }) => {\n const vertical = kind === 'left' || kind === 'center-h' || kind === 'right';\n if (vertical) {\n const x = kind === 'left' ? 5 : kind === 'right' ? 19 : 12;\n return (\n <svg {...base} aria-hidden=\"true\">\n <path d={`M${x} 3v18`} />\n <rect x={kind === 'left' ? 5 : kind === 'right' ? 10 : 7} y=\"5\" width=\"9\" height=\"4\" rx=\"0.5\" />\n <rect x={kind === 'left' ? 5 : kind === 'right' ? 5 : 4} y=\"14\" width=\"14\" height=\"4\" rx=\"0.5\" />\n </svg>\n );\n }\n if (kind === 'top' || kind === 'center-v' || kind === 'bottom') {\n const y = kind === 'top' ? 5 : kind === 'bottom' ? 19 : 12;\n return (\n <svg {...base} aria-hidden=\"true\">\n <path d={`M3 ${y}h18`} />\n <rect x=\"5\" y={kind === 'top' ? 5 : kind === 'bottom' ? 10 : 7} width=\"4\" height=\"9\" rx=\"0.5\" />\n <rect x=\"14\" y={kind === 'top' ? 5 : kind === 'bottom' ? 5 : 4} width=\"4\" height=\"14\" rx=\"0.5\" />\n </svg>\n );\n }\n return (\n <svg {...base} aria-hidden=\"true\">\n {kind === 'distribute-h' ? (\n <><path d=\"M3 3v18M21 3v18\" /><rect x=\"6\" y=\"7\" width=\"4\" height=\"10\" /><rect x=\"14\" y=\"7\" width=\"4\" height=\"10\" /></>\n ) : (\n <><path d=\"M3 3h18M3 21h18\" /><rect x=\"7\" y=\"6\" width=\"10\" height=\"4\" /><rect x=\"7\" y=\"14\" width=\"10\" height=\"4\" /></>\n )}\n </svg>\n );\n};\n\nexport const IconZoomOut: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"M21 21l-4.3-4.3M8 11h6\" />\n </svg>\n);\n\nexport const IconZoomIn: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"M21 21l-4.3-4.3M11 8v6M8 11h6\" />\n </svg>\n);\n\nexport const IconFitView: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M4 9V5a1 1 0 0 1 1-1h4M15 4h4a1 1 0 0 1 1 1v4M20 15v4a1 1 0 0 1-1 1h-4M9 20H5a1 1 0 0 1-1-1v-4\" />\n <rect x=\"9\" y=\"9\" width=\"6\" height=\"6\" rx=\"1\" />\n </svg>\n);\n\nexport const IconShapes: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"3\" y=\"13\" width=\"8\" height=\"8\" rx=\"1\" />\n <circle cx=\"17\" cy=\"7\" r=\"4\" />\n <path d=\"M13 21l4-7 4 7z\" />\n </svg>\n);\n\nexport const IconInspector: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"12\" r=\"3\" />\n <path d=\"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z\" />\n </svg>\n);\n\nexport const IconOutline: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01\" />\n </svg>\n);\n\nexport const IconJson: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M8 4H7a2 2 0 0 0-2 2v3a2 2 0 0 1-2 2 2 2 0 0 1 2 2v3a2 2 0 0 0 2 2h1\" />\n <path d=\"M16 4h1a2 2 0 0 1 2 2v3a2 2 0 0 0 2 2 2 2 0 0 0-2 2v3a2 2 0 0 1-2 2h-1\" />\n </svg>\n);\n\nexport const IconAI: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M12 3l1.9 4.6L18.5 9.5 13.9 11.4 12 16l-1.9-4.6L5.5 9.5l4.6-1.9L12 3z\" />\n <path d=\"M18 15l.9 2.1L21 18l-2.1.9L18 21l-.9-2.1L15 18l2.1-.9L18 15z\" />\n </svg>\n);\n\nexport const IconGrid: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" />\n <path d=\"M9 3v18M15 3v18M3 9h18M3 15h18\" />\n </svg>\n);\n\nexport const IconMiniMap: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"16\" rx=\"2\" />\n <rect x=\"13\" y=\"12\" width=\"6\" height=\"6\" rx=\"1\" />\n </svg>\n);\n\nexport const IconImport: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z\" />\n <path d=\"M14 3v5h5\" />\n <path d=\"M12 18v-6\" />\n <path d=\"M9.5 14.5 12 12l2.5 2.5\" />\n </svg>\n);\n\nexport const IconExport: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M12 15V3\" />\n <path d=\"M8 7l4-4 4 4\" />\n <path d=\"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2\" />\n </svg>\n);\n\nexport const IconPublish: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M22 2 11 13\" />\n <path d=\"M22 2 15 22l-4-9-9-4 20-7z\" />\n </svg>\n);\n\nexport const IconExportImage: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"16\" rx=\"2\" />\n <circle cx=\"9\" cy=\"9\" r=\"1.5\" />\n <path d=\"M4 17l5-5 3 3 2-2 6 6\" />\n <path d=\"M16 3v7m-3-3 3 3 3-3\" />\n </svg>\n);\n\n/** Export PNG: an image frame with a download arrow into a tray. */\nexport const IconExportPng: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"3\" y=\"3\" width=\"12\" height=\"10\" rx=\"1.5\" />\n <circle cx=\"6.5\" cy=\"6.5\" r=\"1\" />\n <path d=\"M3 11l3.5-3 3 2.5\" />\n <path d=\"M19 12v6M16.5 15.5 19 18l2.5-2.5\" />\n <path d=\"M14 21h10\" opacity=\"0.5\" />\n </svg>\n);\n\n/** Export PDF: a document marked \"PDF\" with a download arrow. */\nexport const IconExportPdf: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M13 3H7a2 2 0 0 0-2 2v6\" />\n <path d=\"M13 3l5 5v3\" />\n <path d=\"M4.5 14h1.6a1.4 1.4 0 0 1 0 2.8H4.5V14v5\" />\n <path d=\"M17 14v6M14.5 17.5 17 20l2.5-2.5\" />\n <path d=\"M10 14v5h1a1.4 1.4 0 0 0 1.4-1.4v-2.2A1.4 1.4 0 0 0 11 14z\" />\n </svg>\n);\n\nexport const IconExportMarkdown: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <path d=\"M6 15V9l3 3 3-3v6\" />\n <path d=\"M17 9v4m0 0 2-2m-2 2-2-2\" />\n </svg>\n);\n\n/** Export JSON: braces with a download arrow into a tray. */\nexport const IconExportJson: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M9 4c-1.5 0-2 .6-2 2s.4 2-1 2c1.4 0 1 1 1 2s.5 2 2 2\" />\n <path d=\"M15 4c1.5 0 2 .6 2 2s-.4 2 1 2c-1.4 0-1 1-1 2s-.5 2-2 2\" />\n <path d=\"M12 13v6M9 16l3 3 3-3\" />\n <path d=\"M4 20h16\" opacity=\"0.5\" />\n </svg>\n);\n\n/** Layer / z-order controls: to-front, forward, backward, to-back. */\nexport type LayerIconKind = 'front' | 'up' | 'down' | 'back';\n\nexport const IconLayer: React.FC<{ kind: LayerIconKind }> = ({ kind }) => {\n // Metaphor: a stack of layers with the *moving* layer drawn solid and an\n // arrow showing the z-order direction. Front/back push all the way; up/down\n // shift by one. Each variant is visually distinct.\n switch (kind) {\n case 'front':\n // Solid square on top of two outlined layers + up arrow.\n return (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"7\" y=\"7\" width=\"10\" height=\"10\" rx=\"1.5\" fill=\"currentColor\" stroke=\"none\" />\n <path d=\"M4 15.5l3 1.7M20 15.5l-3 1.7\" opacity=\"0.5\" />\n <path d=\"M4 18.5l8 4.5 8-4.5\" opacity=\"0.5\" />\n <path d=\"M12 5V1M9.5 3 12 .8 14.5 3\" transform=\"translate(0 1)\" />\n </svg>\n );\n case 'up':\n // Solid layer with a single up arrow.\n return (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"3\" y=\"12\" width=\"11\" height=\"8\" rx=\"1.5\" fill=\"currentColor\" stroke=\"none\" opacity=\"0.4\" />\n <rect x=\"9\" y=\"8\" width=\"11\" height=\"8\" rx=\"1.5\" fill=\"currentColor\" stroke=\"none\" />\n <path d=\"M14.5 5.5V1M12 3l2.5-2.5L17 3\" />\n </svg>\n );\n case 'down':\n // Solid layer with a single down arrow.\n return (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"9\" y=\"8\" width=\"11\" height=\"8\" rx=\"1.5\" fill=\"currentColor\" stroke=\"none\" opacity=\"0.4\" />\n <rect x=\"3\" y=\"12\" width=\"11\" height=\"8\" rx=\"1.5\" fill=\"currentColor\" stroke=\"none\" />\n <path d=\"M14.5 18.5V23M12 20.5l2.5 2.5 2.5-2.5\" />\n </svg>\n );\n case 'back':\n default:\n // Outlined top layers over a solid bottom layer + down arrow.\n return (\n <svg {...base} aria-hidden=\"true\">\n <path d=\"M4 8.5l8-4.5 8 4.5\" opacity=\"0.5\" />\n <path d=\"M4 8.5l3 1.7M20 8.5l-3 1.7\" opacity=\"0.5\" />\n <rect x=\"7\" y=\"9\" width=\"10\" height=\"10\" rx=\"1.5\" fill=\"currentColor\" stroke=\"none\" />\n <path d=\"M12 21v4M9.5 23 12 25.2 14.5 23\" transform=\"translate(0 -1)\" />\n </svg>\n );\n }\n};\n\nexport const IconAnchorVisible: React.FC<{ visible?: boolean }> = ({ visible = true }) => (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"4\" y=\"5\" width=\"16\" height=\"14\" rx=\"2\" strokeDasharray=\"3 2\" />\n <circle cx=\"4\" cy=\"5\" r=\"2\" fill=\"currentColor\" stroke=\"none\" />\n {visible ? (\n <path d=\"M2 12s3.5-5 10-5 10 5 10 5-3.5 5-10 5S2 12 2 12zM12 10a2 2 0 1 0 0 4 2 2 0 0 0 0-4z\" />\n ) : (\n <path d=\"M3 3l18 18\" />\n )}\n </svg>\n);\n\nexport const IconPresent: React.FC = () => (\n <svg {...base} aria-hidden=\"true\">\n <rect x=\"2\" y=\"4\" width=\"20\" height=\"13\" rx=\"2\" />\n <path d=\"M10 8.5l4.5 2.5L10 13.5z\" fill=\"currentColor\" stroke=\"none\" />\n <path d=\"M12 17v3M8 20h8\" />\n </svg>\n);\n"],"mappings":";;AAQA,IAAM,IAAO;AAAA,EACX,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,eAAe;AAAA,EACf,gBAAgB;AAClB,GASa,IAAA,MACX,gBAAA,EAAC,OAAD;AAAA,EAAK,GAAI;AAAA,EAAM,eAAY;AAAA,YAA3B;AAAA,IACE,gBAAA,EAAC,UAAD;AAAA,MAAQ,IAAG;AAAA,MAAK,IAAG;AAAA,MAAK,GAAE;AAAA,IAAK,CAAA;AAAA,IAC/B,gBAAA,EAAC,UAAD;AAAA,MAAQ,IAAG;AAAA,MAAK,IAAG;AAAA,MAAK,GAAE;AAAA,IAAK,CAAA;AAAA,IAC/B,gBAAA,EAAC,QAAD,EAAM,GAAE,mCAAoC,CAAA;AAAA,IAC5C,gBAAA,EAAC,QAAD,EAAM,GAAE,8BAA+B,CAAA;AAAA,EACpC;IAGM,IAAA,MACX,gBAAA,EAAC,OAAD;AAAA,EAAK,GAAI;AAAA,EAAM,eAAY;AAAA,YAA3B,CACE,gBAAA,EAAC,QAAD,EAAM,GAAE,WAAY,CAAA,GACpB,gBAAA,EAAC,QAAD,EAAM,GAAE,kBAAmB,CA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AO,CAAA;AAAA,IACvE,gBAAA,EAAC,UAAD;AAAA,MAAQ,IAAG;AAAA,MAAI,IAAG;AAAA,MAAI,GAAE;AAAA,MAAI,MAAK;AAAA,MAAe,QAAO;AAAA,IAAQ,CAAA;AAAA,IAC9D,IACC,gBAAA,EAAC,QAAD,EAAM,GAAE,sFAAuF,CAAA,IAE/F,gBAAA,EAAC,QAAD,EAAM,GAAE,aAAc,CAAA;AAAA,EAErB;IAGM,IAAA,MACX,gBAAA,EAAC,OAAD;AAAA,EAAK,GAAI;AAAA,EAAM,eAAY;AAAA,YAA3B;AAAA,IACE,gBAAA,EAAC,QAAD;AAAA,MAAM,GAAE;AAAA,MAAI,GAAE;AAAA,MAAI,OAAM;AAAA,MAAK,QAAO;AAAA,MAAK,IAAG;AAAA,IAAK,CAAA;AAAA,IACjD,gBAAA,EAAC,QAAD;AAAA,MAAM,GAAE;AAAA,MAA2B,MAAK;AAAA,MAAe,QAAO;AAAA,IAAQ,CAAA;AAAA,IACtE,gBAAA,EAAC,QAAD,EAAM,GAAE,kBAAmB,CAAA;AAAA,EACxB"}
|
|
@@ -293,4 +293,17 @@ export interface FlowProps {
|
|
|
293
293
|
gridSize?: number;
|
|
294
294
|
/** CSS class for outer container */
|
|
295
295
|
className?: string;
|
|
296
|
+
/**
|
|
297
|
+
* Show the AI assistant panel (right side) that turns a text description or
|
|
298
|
+
* an uploaded image into a flow document. Defaults to true.
|
|
299
|
+
*/
|
|
300
|
+
showAI?: boolean;
|
|
301
|
+
/**
|
|
302
|
+
* Show the AI model configuration form inside the AI panel (gateway /
|
|
303
|
+
* protocol / model / api key). When false, the config is hidden and the
|
|
304
|
+
* caller is expected to supply `aiConfig`. Defaults to true.
|
|
305
|
+
*/
|
|
306
|
+
showAIConfig?: boolean;
|
|
307
|
+
/** Initial / preset AI model configuration for the AI panel. */
|
|
308
|
+
aiConfig?: FlowAIConfig;
|
|
296
309
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../../src/components/pro/Flow/types.ts"],"sourcesContent":["/** Arrow marker type for edges and lines */\nexport type FlowEdgeMarkerKind = 'none' | 'arrow' | 'arrowclosed';\n\n/** Label placement for SVG icon stamps. */\nexport type FlowIconLabelPlacement = 'top' | 'middle' | 'bottom' | 'left' | 'right';\n\n/** Media stamp kinds rendered via DOM overlay. */\nexport type FlowMediaKind = 'markdown' | 'html' | 'mermaid' | 'math' | 'image' | 'model3d' | 'ai' | 'data';\n\nexport type FlowModelFormat = 'stl' | 'obj' | '3mf';\n\n/** Logical type of a Data-node column, driving parsing/aggregation/axis scales. */\nexport type FlowDataColumnType = 'string' | 'number' | 'date' | 'boolean';\n\n/** A single column definition for a Data node. */\nexport interface FlowDataColumn {\n /** Object key used in each row record. */\n key: string;\n /** Display label; falls back to `key` when unset. */\n label?: string;\n /** Value type; numeric columns can be aggregated and used as chart measures. */\n type: FlowDataColumnType;\n}\n\n/** Which surface the Data node renders: a (pivotable) table or a chart. */\nexport type FlowDataView = 'table' | 'chart';\n\n/** Supported chart renderings for a Data node. */\nexport type FlowDataChartType =\n | 'bar'\n | 'barHorizontal'\n | 'line'\n | 'area'\n | 'scatter'\n | 'pie';\n\n/** Chart-view configuration for a Data node. */\nexport interface FlowDataChartConfig {\n type: FlowDataChartType;\n /** Category / X axis field (dimension). */\n xField?: string;\n /** One or more numeric measure fields drawn as series. */\n yFields?: string[];\n /** Per-series color overrides, keyed by measure field key (cartesian charts). */\n seriesColors?: Record<string, string>;\n /** Slice color palette for pie charts. Defaults to the built-in palette. */\n palette?: string[];\n}\n\n/** Aggregation used by the pivot table view. */\nexport type FlowDataAggFn = 'sum' | 'avg' | 'count' | 'min' | 'max';\n\n/** Pivot configuration panel placement. */\nexport type FlowDataPivotPanelPlacement = 'top' | 'bottom' | 'left' | 'right';\n\n/** Pivot-view configuration for a Data node table. */\nexport interface FlowDataPivotConfig {\n enabled: boolean;\n rowFields: string[];\n colFields: string[];\n values: Array<{ field: string; aggFn: FlowDataAggFn }>;\n /** Where the pivot config panel renders. Defaults to 'top'. */\n panelPlacement?: FlowDataPivotPanelPlacement;\n}\n\n/**\n * Persisted state for a Data node (`mediaKind: 'data'`). Holds the parsed\n * columns/rows plus how they should be visualized. Serialized with the document.\n */\nexport interface FlowDataConfig {\n columns: FlowDataColumn[];\n rows: Array<Record<string, unknown>>;\n /** Active rendering surface. Defaults to 'table'. */\n view: FlowDataView;\n /** Chart configuration (used when `view === 'chart'`). */\n chart?: FlowDataChartConfig;\n /** Pivot configuration (used when `view === 'table'`). */\n pivot?: FlowDataPivotConfig;\n /** Original uploaded file name, when imported. */\n sourceName?: string;\n}\n\n/** AI media node configuration (persisted subset). */\nexport interface FlowAIConfig {\n /** API endpoint (OpenAI-compatible chat completions or Anthropic messages). */\n gateway: string;\n protocol: 'openai' | 'anthropic';\n model: string;\n /** API key. Persisted in the document; treat exported JSON as sensitive. */\n apiKey?: string;\n systemPrompt?: string;\n /** Extra request headers. */\n headers?: Record<string, string>;\n}\n\n/** Line style */\nexport type FlowEdgeLineStyle = 'solid' | 'dashed' | 'dotted' | 'dynamic';\n\n/** Dash density for dashed/dotted lines */\nexport type FlowEdgeDashDensity = 'sparse' | 'medium' | 'dense';\n\n/** Bezier control points for simplebezier edge segments (canvas coordinates) */\nexport interface FlowBezierControl {\n c1x: number;\n c1y: number;\n c2x: number;\n c2y: number;\n}\n\n/** Persisted edge styling on edge.data */\nexport interface FlowEdgeData {\n strokeColor?: string;\n strokeWidth?: number;\n lineStyle?: FlowEdgeLineStyle;\n dashDensity?: FlowEdgeDashDensity;\n markerStart?: FlowEdgeMarkerKind;\n markerEnd?: FlowEdgeMarkerKind;\n labelText?: string;\n labelFontSize?: number;\n labelFontFamily?: string;\n /** Play a source-to-target traveling gradient while in presentation mode. */\n animated?: boolean;\n /** Waypoints; absolute canvas coords unless waypointGroupId set */\n waypoints?: Array<{ x: number; y: number }>;\n waypointGroupId?: string;\n /**\n * Per-segment bezier controls for simplebezier type;\n * null entries use default computed controls.\n */\n bezierControls?: Array<FlowBezierControl | null> | null;\n}\n\n/** Edge type names */\nexport type FlowEdgeTypeName =\n | 'smoothstep'\n | 'step'\n | 'straight'\n | 'simplebezier';\n\n/** Border line style */\nexport type FlowBorderStyle = 'none' | 'solid' | 'dashed' | 'dotted' | 'dynamic';\n\n/** Gradient direction */\nexport type GradientDirection =\n | 'to-r'\n | 'to-l'\n | 'to-b'\n | 'to-t'\n | 'to-br'\n | 'to-tl'\n | 'to-tr'\n | 'to-bl';\n\n/** Group label placement */\nexport type FlowGroupLabelPlacement = 'top' | 'bottom' | 'left' | 'right';\nexport type FlowGroupLabelAlign = 'start' | 'center' | 'end';\n\nexport const FLOW_NODE_TYPES = [\n 'shapeRect',\n 'shapeRoundRect',\n 'shapeEllipse',\n 'shapeDiamond',\n 'shapeDocument',\n 'shapeParallelogram',\n 'shapeTriangle',\n 'shapeTrapezoid',\n 'shapePentagon',\n 'shapeHexagon',\n 'shapeStar',\n 'shapeHexagram',\n 'shapeRightTriangle',\n 'shapeCorner',\n 'textLabel',\n 'flowGroup',\n 'geometryGroup',\n 'dividerNode',\n 'arrowNode',\n 'polylineNode',\n 'shapeSvg',\n 'mediaNode',\n 'animAnchor',\n] as const;\n\nexport type FlowShapeType = (typeof FLOW_NODE_TYPES)[number];\n\n/** Custom key-value attribute on a node */\nexport interface FlowNodeAttribute {\n key: string;\n value: string;\n}\n\n/** Data stored on each flow node */\nexport interface FlowNodeData {\n label: string;\n fill: string;\n stroke: string;\n strokeWidth: number;\n color: string;\n fontSize: number;\n /**\n * Label/font color. When unset, falls back to `color` (legacy behavior where\n * a single color drove both the label and the SVG icon tint).\n */\n labelColor?: string;\n borderStyle?: FlowBorderStyle;\n rotation?: number;\n flipX?: boolean;\n flipY?: boolean;\n fillGradientTo?: string;\n fillGradientDirection?: GradientDirection;\n attributes?: FlowNodeAttribute[];\n childCanvasId?: string;\n isGroup?: boolean;\n groupBorderStyle?: FlowBorderStyle;\n groupLabelPlacement?: FlowGroupLabelPlacement;\n groupLabelAlign?: FlowGroupLabelAlign;\n groupLabelFill?: string;\n groupLabelRotation?: 0 | 90 | 180 | 270;\n groupLabelBgMode?: 'text' | 'full';\n dividerOrientation?: 'horizontal' | 'vertical';\n arrowDouble?: boolean;\n arrowBent?: boolean;\n arrowBendX?: number;\n arrowBendY?: number;\n polylineWaypoints?: Array<{ x: number; y: number }>;\n /** SVG stamp icon id (for type 'shapeSvg'). */\n svgId?: string;\n /** Whether the SVG stamp draws a bordered box around the icon. */\n iconBox?: boolean;\n /** Label placement for SVG stamps. Left/right use top-to-bottom vertical text. */\n labelPlacement?: FlowIconLabelPlacement;\n /** Horizontal offset from the resolved icon label position, in canvas units. */\n labelOffsetX?: number;\n /** Vertical offset from the resolved icon label position, in canvas units. */\n labelOffsetY?: number;\n /** Media node kind (for type 'mediaNode'). */\n mediaKind?: FlowMediaKind;\n /** Source content or URL for the media node. */\n mediaContent?: string;\n /** Explicit model format for 3D media nodes. */\n modelFormat?: FlowModelFormat;\n /** AI media node configuration (serializable subset; secrets are runtime-only). */\n aiConfig?: FlowAIConfig;\n /** Data node configuration (for type 'mediaNode' with mediaKind 'data'). */\n dataConfig?: FlowDataConfig;\n /**\n * Stable creation index for `animAnchor` nodes, used to order slides. The\n * displayed sequence badge is derived from this ordering, so deleting an\n * anchor renumbers the rest automatically.\n */\n animIndex?: number;\n /** Marks nodes managed by Mindmap mode. */\n isMindMapNode?: boolean;\n /** Logical parent used by Mindmap auto-layout (separate from visual groups). */\n mindMapParentId?: string;\n}\n\n/** A flow node */\nexport interface FlowNode {\n id: string;\n type: FlowShapeType;\n position: { x: number; y: number };\n width: number;\n height: number;\n data: FlowNodeData;\n parentId?: string;\n zIndex?: number;\n}\n\n/** A flow edge (connection between nodes) */\nexport interface FlowEdge {\n id: string;\n source: string;\n target: string;\n sourceHandle?: string;\n targetHandle?: string;\n type: FlowEdgeTypeName;\n data: FlowEdgeData;\n}\n\n/** Independent line types */\nexport type FlowLineType = 'freehand' | 'straight' | 'polyline' | 'arrow';\n\n/** An independent line not attached to nodes */\nexport interface FlowLine {\n id: string;\n type: FlowLineType;\n points: Array<{ x: number; y: number }>;\n strokeColor: string;\n strokeWidth: number;\n lineStyle: FlowEdgeLineStyle;\n dashDensity?: FlowEdgeDashDensity;\n markerStart?: FlowEdgeMarkerKind;\n markerEnd?: FlowEdgeMarkerKind;\n closed?: boolean;\n zIndex?: number;\n parentId?: string;\n}\n\n/** Single canvas layer data */\nexport interface FlowCanvasData {\n nodes: FlowNode[];\n edges: FlowEdge[];\n lines: FlowLine[];\n}\n\n/** Multi-canvas document; root canvas id is 'root' */\nexport interface FlowDocument {\n canvases: Record<string, FlowCanvasData>;\n stack: string[];\n /** Project title, shown in the editable title bar and used as export filename. */\n title?: string;\n}\n\n/** Active tool modes */\nexport type FlowToolMode =\n | 'select'\n | 'pan'\n | 'connect'\n | 'freehand'\n | 'line'\n | 'polyline'\n | 'arrow';\n\n/** Viewport transform state */\nexport interface ViewportState {\n x: number;\n y: number;\n zoom: number;\n}\n\n/** Selection state */\nexport interface SelectionState {\n nodeIds: Set<string>;\n edgeIds: Set<string>;\n lineIds: Set<string>;\n}\n\n/** Props for the Flow component */\nexport interface FlowProps {\n /** Initial document; if not provided, starts with empty doc */\n initialDocument?: FlowDocument;\n /** Callback when document changes */\n onChange?: (doc: FlowDocument) => void;\n /** Width of the component (defaults to 100%) */\n width?: number | string;\n /** Height of the component (defaults to 100%) */\n height?: number | string;\n /** Whether the flow is read-only */\n readOnly?: boolean;\n /** Leave the current document from the built-in toolbar. */\n onBack?: () => void;\n /** Export the current canvas as PNG from the built-in toolbar. */\n onExportPNG?: () => void | Promise<void>;\n /** Publish or configure sharing from the built-in toolbar. */\n onPublish?: () => void;\n /** Show minimap */\n showMiniMap?: boolean;\n /** Show grid */\n showGrid?: boolean;\n /** Grid size in pixels */\n gridSize?: number;\n /** CSS class for outer container */\n className?: string;\n}\n"],"mappings":"AA6JA,IAAa,IAAkB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF"}
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../../src/components/pro/Flow/types.ts"],"sourcesContent":["/** Arrow marker type for edges and lines */\nexport type FlowEdgeMarkerKind = 'none' | 'arrow' | 'arrowclosed';\n\n/** Label placement for SVG icon stamps. */\nexport type FlowIconLabelPlacement = 'top' | 'middle' | 'bottom' | 'left' | 'right';\n\n/** Media stamp kinds rendered via DOM overlay. */\nexport type FlowMediaKind = 'markdown' | 'html' | 'mermaid' | 'math' | 'image' | 'model3d' | 'ai' | 'data';\n\nexport type FlowModelFormat = 'stl' | 'obj' | '3mf';\n\n/** Logical type of a Data-node column, driving parsing/aggregation/axis scales. */\nexport type FlowDataColumnType = 'string' | 'number' | 'date' | 'boolean';\n\n/** A single column definition for a Data node. */\nexport interface FlowDataColumn {\n /** Object key used in each row record. */\n key: string;\n /** Display label; falls back to `key` when unset. */\n label?: string;\n /** Value type; numeric columns can be aggregated and used as chart measures. */\n type: FlowDataColumnType;\n}\n\n/** Which surface the Data node renders: a (pivotable) table or a chart. */\nexport type FlowDataView = 'table' | 'chart';\n\n/** Supported chart renderings for a Data node. */\nexport type FlowDataChartType =\n | 'bar'\n | 'barHorizontal'\n | 'line'\n | 'area'\n | 'scatter'\n | 'pie';\n\n/** Chart-view configuration for a Data node. */\nexport interface FlowDataChartConfig {\n type: FlowDataChartType;\n /** Category / X axis field (dimension). */\n xField?: string;\n /** One or more numeric measure fields drawn as series. */\n yFields?: string[];\n /** Per-series color overrides, keyed by measure field key (cartesian charts). */\n seriesColors?: Record<string, string>;\n /** Slice color palette for pie charts. Defaults to the built-in palette. */\n palette?: string[];\n}\n\n/** Aggregation used by the pivot table view. */\nexport type FlowDataAggFn = 'sum' | 'avg' | 'count' | 'min' | 'max';\n\n/** Pivot configuration panel placement. */\nexport type FlowDataPivotPanelPlacement = 'top' | 'bottom' | 'left' | 'right';\n\n/** Pivot-view configuration for a Data node table. */\nexport interface FlowDataPivotConfig {\n enabled: boolean;\n rowFields: string[];\n colFields: string[];\n values: Array<{ field: string; aggFn: FlowDataAggFn }>;\n /** Where the pivot config panel renders. Defaults to 'top'. */\n panelPlacement?: FlowDataPivotPanelPlacement;\n}\n\n/**\n * Persisted state for a Data node (`mediaKind: 'data'`). Holds the parsed\n * columns/rows plus how they should be visualized. Serialized with the document.\n */\nexport interface FlowDataConfig {\n columns: FlowDataColumn[];\n rows: Array<Record<string, unknown>>;\n /** Active rendering surface. Defaults to 'table'. */\n view: FlowDataView;\n /** Chart configuration (used when `view === 'chart'`). */\n chart?: FlowDataChartConfig;\n /** Pivot configuration (used when `view === 'table'`). */\n pivot?: FlowDataPivotConfig;\n /** Original uploaded file name, when imported. */\n sourceName?: string;\n}\n\n/** AI media node configuration (persisted subset). */\nexport interface FlowAIConfig {\n /** API endpoint (OpenAI-compatible chat completions or Anthropic messages). */\n gateway: string;\n protocol: 'openai' | 'anthropic';\n model: string;\n /** API key. Persisted in the document; treat exported JSON as sensitive. */\n apiKey?: string;\n systemPrompt?: string;\n /** Extra request headers. */\n headers?: Record<string, string>;\n}\n\n/** Line style */\nexport type FlowEdgeLineStyle = 'solid' | 'dashed' | 'dotted' | 'dynamic';\n\n/** Dash density for dashed/dotted lines */\nexport type FlowEdgeDashDensity = 'sparse' | 'medium' | 'dense';\n\n/** Bezier control points for simplebezier edge segments (canvas coordinates) */\nexport interface FlowBezierControl {\n c1x: number;\n c1y: number;\n c2x: number;\n c2y: number;\n}\n\n/** Persisted edge styling on edge.data */\nexport interface FlowEdgeData {\n strokeColor?: string;\n strokeWidth?: number;\n lineStyle?: FlowEdgeLineStyle;\n dashDensity?: FlowEdgeDashDensity;\n markerStart?: FlowEdgeMarkerKind;\n markerEnd?: FlowEdgeMarkerKind;\n labelText?: string;\n labelFontSize?: number;\n labelFontFamily?: string;\n /** Play a source-to-target traveling gradient while in presentation mode. */\n animated?: boolean;\n /** Waypoints; absolute canvas coords unless waypointGroupId set */\n waypoints?: Array<{ x: number; y: number }>;\n waypointGroupId?: string;\n /**\n * Per-segment bezier controls for simplebezier type;\n * null entries use default computed controls.\n */\n bezierControls?: Array<FlowBezierControl | null> | null;\n}\n\n/** Edge type names */\nexport type FlowEdgeTypeName =\n | 'smoothstep'\n | 'step'\n | 'straight'\n | 'simplebezier';\n\n/** Border line style */\nexport type FlowBorderStyle = 'none' | 'solid' | 'dashed' | 'dotted' | 'dynamic';\n\n/** Gradient direction */\nexport type GradientDirection =\n | 'to-r'\n | 'to-l'\n | 'to-b'\n | 'to-t'\n | 'to-br'\n | 'to-tl'\n | 'to-tr'\n | 'to-bl';\n\n/** Group label placement */\nexport type FlowGroupLabelPlacement = 'top' | 'bottom' | 'left' | 'right';\nexport type FlowGroupLabelAlign = 'start' | 'center' | 'end';\n\nexport const FLOW_NODE_TYPES = [\n 'shapeRect',\n 'shapeRoundRect',\n 'shapeEllipse',\n 'shapeDiamond',\n 'shapeDocument',\n 'shapeParallelogram',\n 'shapeTriangle',\n 'shapeTrapezoid',\n 'shapePentagon',\n 'shapeHexagon',\n 'shapeStar',\n 'shapeHexagram',\n 'shapeRightTriangle',\n 'shapeCorner',\n 'textLabel',\n 'flowGroup',\n 'geometryGroup',\n 'dividerNode',\n 'arrowNode',\n 'polylineNode',\n 'shapeSvg',\n 'mediaNode',\n 'animAnchor',\n] as const;\n\nexport type FlowShapeType = (typeof FLOW_NODE_TYPES)[number];\n\n/** Custom key-value attribute on a node */\nexport interface FlowNodeAttribute {\n key: string;\n value: string;\n}\n\n/** Data stored on each flow node */\nexport interface FlowNodeData {\n label: string;\n fill: string;\n stroke: string;\n strokeWidth: number;\n color: string;\n fontSize: number;\n /**\n * Label/font color. When unset, falls back to `color` (legacy behavior where\n * a single color drove both the label and the SVG icon tint).\n */\n labelColor?: string;\n borderStyle?: FlowBorderStyle;\n rotation?: number;\n flipX?: boolean;\n flipY?: boolean;\n fillGradientTo?: string;\n fillGradientDirection?: GradientDirection;\n attributes?: FlowNodeAttribute[];\n childCanvasId?: string;\n isGroup?: boolean;\n groupBorderStyle?: FlowBorderStyle;\n groupLabelPlacement?: FlowGroupLabelPlacement;\n groupLabelAlign?: FlowGroupLabelAlign;\n groupLabelFill?: string;\n groupLabelRotation?: 0 | 90 | 180 | 270;\n groupLabelBgMode?: 'text' | 'full';\n dividerOrientation?: 'horizontal' | 'vertical';\n arrowDouble?: boolean;\n arrowBent?: boolean;\n arrowBendX?: number;\n arrowBendY?: number;\n polylineWaypoints?: Array<{ x: number; y: number }>;\n /** SVG stamp icon id (for type 'shapeSvg'). */\n svgId?: string;\n /** Whether the SVG stamp draws a bordered box around the icon. */\n iconBox?: boolean;\n /** Label placement for SVG stamps. Left/right use top-to-bottom vertical text. */\n labelPlacement?: FlowIconLabelPlacement;\n /** Horizontal offset from the resolved icon label position, in canvas units. */\n labelOffsetX?: number;\n /** Vertical offset from the resolved icon label position, in canvas units. */\n labelOffsetY?: number;\n /** Media node kind (for type 'mediaNode'). */\n mediaKind?: FlowMediaKind;\n /** Source content or URL for the media node. */\n mediaContent?: string;\n /** Explicit model format for 3D media nodes. */\n modelFormat?: FlowModelFormat;\n /** AI media node configuration (serializable subset; secrets are runtime-only). */\n aiConfig?: FlowAIConfig;\n /** Data node configuration (for type 'mediaNode' with mediaKind 'data'). */\n dataConfig?: FlowDataConfig;\n /**\n * Stable creation index for `animAnchor` nodes, used to order slides. The\n * displayed sequence badge is derived from this ordering, so deleting an\n * anchor renumbers the rest automatically.\n */\n animIndex?: number;\n /** Marks nodes managed by Mindmap mode. */\n isMindMapNode?: boolean;\n /** Logical parent used by Mindmap auto-layout (separate from visual groups). */\n mindMapParentId?: string;\n}\n\n/** A flow node */\nexport interface FlowNode {\n id: string;\n type: FlowShapeType;\n position: { x: number; y: number };\n width: number;\n height: number;\n data: FlowNodeData;\n parentId?: string;\n zIndex?: number;\n}\n\n/** A flow edge (connection between nodes) */\nexport interface FlowEdge {\n id: string;\n source: string;\n target: string;\n sourceHandle?: string;\n targetHandle?: string;\n type: FlowEdgeTypeName;\n data: FlowEdgeData;\n}\n\n/** Independent line types */\nexport type FlowLineType = 'freehand' | 'straight' | 'polyline' | 'arrow';\n\n/** An independent line not attached to nodes */\nexport interface FlowLine {\n id: string;\n type: FlowLineType;\n points: Array<{ x: number; y: number }>;\n strokeColor: string;\n strokeWidth: number;\n lineStyle: FlowEdgeLineStyle;\n dashDensity?: FlowEdgeDashDensity;\n markerStart?: FlowEdgeMarkerKind;\n markerEnd?: FlowEdgeMarkerKind;\n closed?: boolean;\n zIndex?: number;\n parentId?: string;\n}\n\n/** Single canvas layer data */\nexport interface FlowCanvasData {\n nodes: FlowNode[];\n edges: FlowEdge[];\n lines: FlowLine[];\n}\n\n/** Multi-canvas document; root canvas id is 'root' */\nexport interface FlowDocument {\n canvases: Record<string, FlowCanvasData>;\n stack: string[];\n /** Project title, shown in the editable title bar and used as export filename. */\n title?: string;\n}\n\n/** Active tool modes */\nexport type FlowToolMode =\n | 'select'\n | 'pan'\n | 'connect'\n | 'freehand'\n | 'line'\n | 'polyline'\n | 'arrow';\n\n/** Viewport transform state */\nexport interface ViewportState {\n x: number;\n y: number;\n zoom: number;\n}\n\n/** Selection state */\nexport interface SelectionState {\n nodeIds: Set<string>;\n edgeIds: Set<string>;\n lineIds: Set<string>;\n}\n\n/** Props for the Flow component */\nexport interface FlowProps {\n /** Initial document; if not provided, starts with empty doc */\n initialDocument?: FlowDocument;\n /** Callback when document changes */\n onChange?: (doc: FlowDocument) => void;\n /** Width of the component (defaults to 100%) */\n width?: number | string;\n /** Height of the component (defaults to 100%) */\n height?: number | string;\n /** Whether the flow is read-only */\n readOnly?: boolean;\n /** Leave the current document from the built-in toolbar. */\n onBack?: () => void;\n /** Export the current canvas as PNG from the built-in toolbar. */\n onExportPNG?: () => void | Promise<void>;\n /** Publish or configure sharing from the built-in toolbar. */\n onPublish?: () => void;\n /** Show minimap */\n showMiniMap?: boolean;\n /** Show grid */\n showGrid?: boolean;\n /** Grid size in pixels */\n gridSize?: number;\n /** CSS class for outer container */\n className?: string;\n /**\n * Show the AI assistant panel (right side) that turns a text description or\n * an uploaded image into a flow document. Defaults to true.\n */\n showAI?: boolean;\n /**\n * Show the AI model configuration form inside the AI panel (gateway /\n * protocol / model / api key). When false, the config is hidden and the\n * caller is expected to supply `aiConfig`. Defaults to true.\n */\n showAIConfig?: boolean;\n /** Initial / preset AI model configuration for the AI panel. */\n aiConfig?: FlowAIConfig;\n}\n"],"mappings":"AA6JA,IAAa,IAAkB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve a CSS color value (including theme custom properties like
|
|
3
|
+
* `var(--color-base-100)` that may use `oklch(...)`) into a concrete sRGB color
|
|
4
|
+
* for the WebGL canvas.
|
|
5
|
+
*
|
|
6
|
+
* PixiJS needs a numeric/hex color and cannot read CSS variables. Resolution:
|
|
7
|
+
* 1. A hidden probe element inherits the themed scope. Its `color` is set to
|
|
8
|
+
* `color-mix(in srgb, <value> 100%, transparent)`, which forces the
|
|
9
|
+
* browser to convert the color into the sRGB space at computed-value
|
|
10
|
+
* time. `getComputedStyle` then serializes it as a plain `rgb(...)` or
|
|
11
|
+
* `color(srgb ...)` string.
|
|
12
|
+
* 2. That string is parsed directly (no canvas). Canvas rasterization is
|
|
13
|
+
* only a last resort: some engines silently reject CSS Color 4 functions
|
|
14
|
+
* (`oklch()`, `lab()`, `color()`) in `fillStyle`, which previously turned
|
|
15
|
+
* every probed theme color black.
|
|
16
|
+
*/
|
|
17
|
+
/** Resolve a CSS color to a 0xRRGGBB number (for PixiJS). */
|
|
18
|
+
export declare function cssColorToNumber(host: HTMLElement | null, cssValue: string, fallback: number): number;
|
|
19
|
+
/** Resolve a CSS color to a `#rrggbb` string (for persisted node data). */
|
|
20
|
+
export declare function cssColorToHexString(host: HTMLElement | null, cssValue: string, fallback: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* The colors the Flow canvas derives from the active theme:
|
|
23
|
+
* - `background`: the canvas backdrop, follows the theme's muted background.
|
|
24
|
+
* - `gridDot`: grid dots, derived from the theme foreground color.
|
|
25
|
+
* - `nodeFill`: default fill for new shapes, follows the theme base background.
|
|
26
|
+
*/
|
|
27
|
+
export interface FlowThemeColors {
|
|
28
|
+
background: number;
|
|
29
|
+
gridDot: number;
|
|
30
|
+
nodeFill: string;
|
|
31
|
+
nodeText: string;
|
|
32
|
+
}
|
|
33
|
+
export declare function resolveFlowThemeColors(host: HTMLElement | null): FlowThemeColors;
|
|
34
|
+
export declare const THEME_COLOR_PREFIX = "theme:";
|
|
35
|
+
/** A selectable theme color, shown as a swatch in the inspector. */
|
|
36
|
+
export interface ThemeColorToken {
|
|
37
|
+
/** Stored value, e.g. `theme:base-100`. */
|
|
38
|
+
token: string;
|
|
39
|
+
/** CSS custom property backing the token. */
|
|
40
|
+
cssVar: string;
|
|
41
|
+
/** Short label for the inspector tooltip. */
|
|
42
|
+
label: string;
|
|
43
|
+
}
|
|
44
|
+
/** The theme colors offered as presets/defaults for Flow color fields. */
|
|
45
|
+
export declare const THEME_COLOR_TOKENS: ThemeColorToken[];
|
|
46
|
+
/**
|
|
47
|
+
* The "follow theme" default token for each color field type. Each field syncs
|
|
48
|
+
* to a theme role so shapes stay legible against the canvas:
|
|
49
|
+
* - `fill` -> theme background (base-100)
|
|
50
|
+
* - `stroke` -> theme font color (base-content) — a visible outline
|
|
51
|
+
* - `text` -> theme font color (base-content)
|
|
52
|
+
* - `line` -> theme font color (base-content) — lines/edges
|
|
53
|
+
*/
|
|
54
|
+
export type ThemeColorFieldKind = 'fill' | 'stroke' | 'text' | 'line';
|
|
55
|
+
export declare const THEME_SYNC_TOKEN: Record<ThemeColorFieldKind, string>;
|
|
56
|
+
/** The CSS var backing a given theme token (for live-updating DOM swatches). */
|
|
57
|
+
export declare function themeTokenCssVar(token: string): string | undefined;
|
|
58
|
+
/** Human label for a theme token (for tooltips). */
|
|
59
|
+
export declare function themeTokenLabel(token: string): string | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Common named colors offered after the theme-sync swatch: a compact rainbow
|
|
62
|
+
* plus black/white. Order follows 黑白赤橙黄绿青蓝紫粉 (black, white, red,
|
|
63
|
+
* orange, yellow, green, cyan, blue, purple, pink).
|
|
64
|
+
*/
|
|
65
|
+
export interface NamedColor {
|
|
66
|
+
value: string;
|
|
67
|
+
/** Chinese label shown on hover. */
|
|
68
|
+
label: string;
|
|
69
|
+
}
|
|
70
|
+
export declare const COMMON_COLORS: NamedColor[];
|
|
71
|
+
/** True when `value` is a `theme:*` token. */
|
|
72
|
+
export declare function isThemeToken(value: string | undefined | null): value is string;
|
|
73
|
+
/**
|
|
74
|
+
* Re-resolve every theme token against the given host's themed scope and cache
|
|
75
|
+
* the results. Call on init and whenever the active theme changes.
|
|
76
|
+
*/
|
|
77
|
+
export declare function refreshThemePalette(host: HTMLElement | null): void;
|
|
78
|
+
/**
|
|
79
|
+
* Resolve a stored color value to a concrete `#rrggbb`/literal color. Theme
|
|
80
|
+
* tokens are looked up in the cached palette; anything else is returned as-is.
|
|
81
|
+
*/
|
|
82
|
+
export declare function resolveThemeColor(value: string | undefined | null, fallback?: string): string;
|
|
83
|
+
/**
|
|
84
|
+
* Resolve a stored color to a value usable directly in the DOM. Theme tokens
|
|
85
|
+
* map to their CSS variable so the browser tracks theme changes natively.
|
|
86
|
+
*/
|
|
87
|
+
export declare function resolveThemeColorCss(value: string | undefined | null, fallback?: string): string;
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
var l = null;
|
|
2
|
+
function d() {
|
|
3
|
+
if (l) return l;
|
|
4
|
+
if (typeof document > "u") return null;
|
|
5
|
+
const e = document.createElement("canvas");
|
|
6
|
+
return e.width = 1, e.height = 1, l = e.getContext("2d", { willReadFrequently: !0 }), l;
|
|
7
|
+
}
|
|
8
|
+
function v(e) {
|
|
9
|
+
const r = d();
|
|
10
|
+
if (!r) return null;
|
|
11
|
+
try {
|
|
12
|
+
r.clearRect(0, 0, 1, 1), r.fillStyle = "#000000", r.fillStyle = e, r.fillRect(0, 0, 1, 1);
|
|
13
|
+
const { data: t } = r.getImageData(0, 0, 1, 1);
|
|
14
|
+
return [
|
|
15
|
+
t[0],
|
|
16
|
+
t[1],
|
|
17
|
+
t[2]
|
|
18
|
+
];
|
|
19
|
+
} catch {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function o(e) {
|
|
24
|
+
return Math.max(0, Math.min(255, Math.round(e)));
|
|
25
|
+
}
|
|
26
|
+
function h(e) {
|
|
27
|
+
const r = /^rgba?\(\s*([\d.eE+-]+)[\s,]+([\d.eE+-]+)[\s,]+([\d.eE+-]+)/.exec(e);
|
|
28
|
+
if (r) return [
|
|
29
|
+
o(+r[1]),
|
|
30
|
+
o(+r[2]),
|
|
31
|
+
o(+r[3])
|
|
32
|
+
];
|
|
33
|
+
const t = /^color\(\s*srgb\s+([\d.eE+-]+)\s+([\d.eE+-]+)\s+([\d.eE+-]+)/i.exec(e);
|
|
34
|
+
return t ? [
|
|
35
|
+
o(+t[1] * 255),
|
|
36
|
+
o(+t[2] * 255),
|
|
37
|
+
o(+t[3] * 255)
|
|
38
|
+
] : null;
|
|
39
|
+
}
|
|
40
|
+
var p = typeof CSS < "u" && typeof CSS.supports == "function" && CSS.supports("color", "color-mix(in srgb, red, blue)");
|
|
41
|
+
function i(e, r) {
|
|
42
|
+
if (typeof document > "u") return null;
|
|
43
|
+
try {
|
|
44
|
+
const t = document.createElement("span");
|
|
45
|
+
t.style.position = "absolute", t.style.width = "0", t.style.height = "0", t.style.overflow = "hidden", t.style.pointerEvents = "none", (e ?? document.body).appendChild(t);
|
|
46
|
+
const n = /^var\(\s*(--[\w-]+)\s*\)$/.exec(r);
|
|
47
|
+
if (n && !getComputedStyle(t).getPropertyValue(n[1]).trim())
|
|
48
|
+
return t.remove(), null;
|
|
49
|
+
t.style.color = p ? `color-mix(in srgb, ${r} 100%, transparent)` : r;
|
|
50
|
+
const a = getComputedStyle(t).color;
|
|
51
|
+
return t.remove(), h(a) ?? v(a);
|
|
52
|
+
} catch {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function u(e, r, t) {
|
|
57
|
+
const n = i(e, r);
|
|
58
|
+
return n ? n[0] << 16 | n[1] << 8 | n[2] : t;
|
|
59
|
+
}
|
|
60
|
+
function s(e, r, t) {
|
|
61
|
+
const n = i(e, r);
|
|
62
|
+
return n ? "#" + n.map((a) => a.toString(16).padStart(2, "0")).join("") : t;
|
|
63
|
+
}
|
|
64
|
+
function g(e) {
|
|
65
|
+
return {
|
|
66
|
+
background: u(e, "var(--color-base-200)", 16316922),
|
|
67
|
+
gridDot: u(e, "var(--color-base-content)", 13751771),
|
|
68
|
+
nodeFill: s(e, "var(--color-base-100)", "#ffffff"),
|
|
69
|
+
nodeText: s(e, "var(--color-base-content)", "#111827")
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
var y = "theme:", c = [
|
|
73
|
+
{
|
|
74
|
+
token: "theme:base-100",
|
|
75
|
+
cssVar: "var(--color-base-100)",
|
|
76
|
+
label: "Base 100"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
token: "theme:base-200",
|
|
80
|
+
cssVar: "var(--color-base-200)",
|
|
81
|
+
label: "Base 200"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
token: "theme:base-300",
|
|
85
|
+
cssVar: "var(--color-base-300)",
|
|
86
|
+
label: "Base 300"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
token: "theme:base-content",
|
|
90
|
+
cssVar: "var(--color-base-content)",
|
|
91
|
+
label: "Base Content"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
token: "theme:primary",
|
|
95
|
+
cssVar: "var(--color-primary)",
|
|
96
|
+
label: "Primary"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
token: "theme:secondary",
|
|
100
|
+
cssVar: "var(--color-secondary)",
|
|
101
|
+
label: "Secondary"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
token: "theme:accent",
|
|
105
|
+
cssVar: "var(--color-accent)",
|
|
106
|
+
label: "Accent"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
token: "theme:neutral",
|
|
110
|
+
cssVar: "var(--color-neutral)",
|
|
111
|
+
label: "Neutral"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
token: "theme:info",
|
|
115
|
+
cssVar: "var(--color-info)",
|
|
116
|
+
label: "Info"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
token: "theme:success",
|
|
120
|
+
cssVar: "var(--color-success)",
|
|
121
|
+
label: "Success"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
token: "theme:warning",
|
|
125
|
+
cssVar: "var(--color-warning)",
|
|
126
|
+
label: "Warning"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
token: "theme:error",
|
|
130
|
+
cssVar: "var(--color-error)",
|
|
131
|
+
label: "Error"
|
|
132
|
+
}
|
|
133
|
+
], f = new Map(c.map((e) => [e.token, e.cssVar])), C = new Map(c.map((e) => [e.token, e.label])), S = {
|
|
134
|
+
fill: "theme:base-100",
|
|
135
|
+
stroke: "theme:base-content",
|
|
136
|
+
text: "theme:base-content",
|
|
137
|
+
line: "theme:base-content"
|
|
138
|
+
};
|
|
139
|
+
function E(e) {
|
|
140
|
+
return f.get(e);
|
|
141
|
+
}
|
|
142
|
+
var T = [
|
|
143
|
+
{
|
|
144
|
+
value: "#000000",
|
|
145
|
+
label: "黑"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
value: "#ffffff",
|
|
149
|
+
label: "白"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
value: "#ef4444",
|
|
153
|
+
label: "赤"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
value: "#f97316",
|
|
157
|
+
label: "橙"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
value: "#eab308",
|
|
161
|
+
label: "黄"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
value: "#22c55e",
|
|
165
|
+
label: "绿"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
value: "#06b6d4",
|
|
169
|
+
label: "青"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
value: "#3b82f6",
|
|
173
|
+
label: "蓝"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
value: "#8b5cf6",
|
|
177
|
+
label: "紫"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
value: "#ec4899",
|
|
181
|
+
label: "粉"
|
|
182
|
+
}
|
|
183
|
+
];
|
|
184
|
+
function b(e) {
|
|
185
|
+
return typeof e == "string" && e.startsWith("theme:");
|
|
186
|
+
}
|
|
187
|
+
var m = /* @__PURE__ */ new Map();
|
|
188
|
+
function k(e) {
|
|
189
|
+
for (const { token: r, cssVar: t } of c) m.set(r, s(e, t, "#000000"));
|
|
190
|
+
}
|
|
191
|
+
function O(e, r = "#000000") {
|
|
192
|
+
return e ? b(e) ? m.get(e) ?? r : e : r;
|
|
193
|
+
}
|
|
194
|
+
function V(e, r = "#000000") {
|
|
195
|
+
return e ? b(e) ? f.get(e) ?? r : e : r;
|
|
196
|
+
}
|
|
197
|
+
export {
|
|
198
|
+
T as COMMON_COLORS,
|
|
199
|
+
y as THEME_COLOR_PREFIX,
|
|
200
|
+
c as THEME_COLOR_TOKENS,
|
|
201
|
+
S as THEME_SYNC_TOKEN,
|
|
202
|
+
s as cssColorToHexString,
|
|
203
|
+
u as cssColorToNumber,
|
|
204
|
+
b as isThemeToken,
|
|
205
|
+
k as refreshThemePalette,
|
|
206
|
+
g as resolveFlowThemeColors,
|
|
207
|
+
O as resolveThemeColor,
|
|
208
|
+
V as resolveThemeColorCss,
|
|
209
|
+
E as themeTokenCssVar
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
//# sourceMappingURL=themeColor.js.map
|