@industry-theme/principal-view-panels 0.1.55 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/panels/CanvasDetailPanel.d.ts +31 -0
- package/dist/panels/CanvasDetailPanel.d.ts.map +1 -0
- package/dist/panels/CanvasDetailPanel.stories.d.ts +50 -0
- package/dist/panels/CanvasDetailPanel.stories.d.ts.map +1 -0
- package/dist/panels/{PrincipalViewGraphPanel.d.ts → CanvasEditorPanel.d.ts} +2 -2
- package/dist/panels/CanvasEditorPanel.d.ts.map +1 -0
- package/dist/panels/{PrincipalViewGraphPanel.stories.d.ts → CanvasEditorPanel.stories.d.ts} +2 -2
- package/dist/panels/CanvasEditorPanel.stories.d.ts.map +1 -0
- package/dist/panels/CanvasListPanel.d.ts +13 -0
- package/dist/panels/CanvasListPanel.d.ts.map +1 -0
- package/dist/panels/CanvasListPanel.stories.d.ts +47 -0
- package/dist/panels/CanvasListPanel.stories.d.ts.map +1 -0
- package/dist/panels/canvas-list/components/CanvasCard.d.ts +13 -0
- package/dist/panels/canvas-list/components/CanvasCard.d.ts.map +1 -0
- package/dist/panels/canvas-list/hooks/useCanvasData.d.ts +17 -0
- package/dist/panels/canvas-list/hooks/useCanvasData.d.ts.map +1 -0
- package/dist/panels/execution-viewer/ExecutionLoader.d.ts +3 -1
- package/dist/panels/execution-viewer/ExecutionLoader.d.ts.map +1 -1
- package/dist/panels/execution-viewer/NarrativeRenderer.d.ts.map +1 -1
- package/dist/panels/execution-viewer/NarrativeTemplatePanel.d.ts.map +1 -1
- package/dist/panels.bundle.js +1106 -541
- package/dist/panels.bundle.js.map +1 -1
- package/package.json +1 -1
- package/dist/panels/ExecutionViewerPanel.d.ts +0 -11
- package/dist/panels/ExecutionViewerPanel.d.ts.map +0 -1
- package/dist/panels/ExecutionViewerPanel.stories.d.ts +0 -77
- package/dist/panels/ExecutionViewerPanel.stories.d.ts.map +0 -1
- package/dist/panels/PrincipalViewGraphPanel.d.ts.map +0 -1
- package/dist/panels/PrincipalViewGraphPanel.stories.d.ts.map +0 -1
package/dist/panels.bundle.js
CHANGED
|
@@ -15469,7 +15469,7 @@ const __iconNode$kG = [
|
|
|
15469
15469
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
15470
15470
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
15471
15471
|
];
|
|
15472
|
-
const CircleCheck
|
|
15472
|
+
const CircleCheck = createLucideIcon$1("circle-check", __iconNode$kG);
|
|
15473
15473
|
/**
|
|
15474
15474
|
* @license lucide-react v0.554.0 - ISC
|
|
15475
15475
|
*
|
|
@@ -19639,7 +19639,7 @@ const __iconNode$gv = [
|
|
|
19639
19639
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
19640
19640
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
19641
19641
|
];
|
|
19642
|
-
const FileText
|
|
19642
|
+
const FileText = createLucideIcon$1("file-text", __iconNode$gv);
|
|
19643
19643
|
/**
|
|
19644
19644
|
* @license lucide-react v0.554.0 - ISC
|
|
19645
19645
|
*
|
|
@@ -20842,7 +20842,7 @@ const __iconNode$ft = [
|
|
|
20842
20842
|
}
|
|
20843
20843
|
]
|
|
20844
20844
|
];
|
|
20845
|
-
const Folder = createLucideIcon$1("folder", __iconNode$ft);
|
|
20845
|
+
const Folder$1 = createLucideIcon$1("folder", __iconNode$ft);
|
|
20846
20846
|
/**
|
|
20847
20847
|
* @license lucide-react v0.554.0 - ISC
|
|
20848
20848
|
*
|
|
@@ -30093,7 +30093,7 @@ const __iconNode$6w = [
|
|
|
30093
30093
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
30094
30094
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
30095
30095
|
];
|
|
30096
|
-
const Search = createLucideIcon$1("search", __iconNode$6w);
|
|
30096
|
+
const Search$1 = createLucideIcon$1("search", __iconNode$6w);
|
|
30097
30097
|
/**
|
|
30098
30098
|
* @license lucide-react v0.554.0 - ISC
|
|
30099
30099
|
*
|
|
@@ -36459,7 +36459,7 @@ const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
36459
36459
|
CircleArrowOutUpRight,
|
|
36460
36460
|
CircleArrowRight,
|
|
36461
36461
|
CircleArrowUp,
|
|
36462
|
-
CircleCheck
|
|
36462
|
+
CircleCheck,
|
|
36463
36463
|
CircleCheckBig,
|
|
36464
36464
|
CircleChevronDown,
|
|
36465
36465
|
CircleChevronLeft,
|
|
@@ -36727,7 +36727,7 @@ const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
36727
36727
|
FileStack,
|
|
36728
36728
|
FileSymlink,
|
|
36729
36729
|
FileTerminal,
|
|
36730
|
-
FileText
|
|
36730
|
+
FileText,
|
|
36731
36731
|
FileType,
|
|
36732
36732
|
FileTypeCorner,
|
|
36733
36733
|
FileUp,
|
|
@@ -36763,7 +36763,7 @@ const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
36763
36763
|
Focus,
|
|
36764
36764
|
FoldHorizontal,
|
|
36765
36765
|
FoldVertical,
|
|
36766
|
-
Folder,
|
|
36766
|
+
Folder: Folder$1,
|
|
36767
36767
|
FolderArchive,
|
|
36768
36768
|
FolderCheck,
|
|
36769
36769
|
FolderClock,
|
|
@@ -37362,7 +37362,7 @@ const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
37362
37362
|
ScreenShareOff,
|
|
37363
37363
|
Scroll,
|
|
37364
37364
|
ScrollText,
|
|
37365
|
-
Search,
|
|
37365
|
+
Search: Search$1,
|
|
37366
37366
|
SearchCheck,
|
|
37367
37367
|
SearchCode,
|
|
37368
37368
|
SearchSlash,
|
|
@@ -38497,8 +38497,8 @@ const LucideIcons = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
38497
38497
|
CheckCheck,
|
|
38498
38498
|
CheckCheckIcon: CheckCheck,
|
|
38499
38499
|
CheckCircle: CircleCheckBig,
|
|
38500
|
-
CheckCircle2: CircleCheck
|
|
38501
|
-
CheckCircle2Icon: CircleCheck
|
|
38500
|
+
CheckCircle2: CircleCheck,
|
|
38501
|
+
CheckCircle2Icon: CircleCheck,
|
|
38502
38502
|
CheckCircleIcon: CircleCheckBig,
|
|
38503
38503
|
CheckIcon: Check$1,
|
|
38504
38504
|
CheckLine,
|
|
@@ -38598,10 +38598,10 @@ const LucideIcons = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
38598
38598
|
CircleArrowRightIcon: CircleArrowRight,
|
|
38599
38599
|
CircleArrowUp,
|
|
38600
38600
|
CircleArrowUpIcon: CircleArrowUp,
|
|
38601
|
-
CircleCheck
|
|
38601
|
+
CircleCheck,
|
|
38602
38602
|
CircleCheckBig,
|
|
38603
38603
|
CircleCheckBigIcon: CircleCheckBig,
|
|
38604
|
-
CircleCheckIcon: CircleCheck
|
|
38604
|
+
CircleCheckIcon: CircleCheck,
|
|
38605
38605
|
CircleChevronDown,
|
|
38606
38606
|
CircleChevronDownIcon: CircleChevronDown,
|
|
38607
38607
|
CircleChevronLeft,
|
|
@@ -39213,8 +39213,8 @@ const LucideIcons = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
39213
39213
|
FileSymlinkIcon: FileSymlink,
|
|
39214
39214
|
FileTerminal,
|
|
39215
39215
|
FileTerminalIcon: FileTerminal,
|
|
39216
|
-
FileText
|
|
39217
|
-
FileTextIcon: FileText
|
|
39216
|
+
FileText,
|
|
39217
|
+
FileTextIcon: FileText,
|
|
39218
39218
|
FileType,
|
|
39219
39219
|
FileType2: FileTypeCorner,
|
|
39220
39220
|
FileType2Icon: FileTypeCorner,
|
|
@@ -39303,7 +39303,7 @@ const LucideIcons = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
39303
39303
|
FoldHorizontalIcon: FoldHorizontal,
|
|
39304
39304
|
FoldVertical,
|
|
39305
39305
|
FoldVerticalIcon: FoldVertical,
|
|
39306
|
-
Folder,
|
|
39306
|
+
Folder: Folder$1,
|
|
39307
39307
|
FolderArchive,
|
|
39308
39308
|
FolderArchiveIcon: FolderArchive,
|
|
39309
39309
|
FolderCheck,
|
|
@@ -39330,7 +39330,7 @@ const LucideIcons = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
39330
39330
|
FolderGitIcon: FolderGit,
|
|
39331
39331
|
FolderHeart,
|
|
39332
39332
|
FolderHeartIcon: FolderHeart,
|
|
39333
|
-
FolderIcon: Folder,
|
|
39333
|
+
FolderIcon: Folder$1,
|
|
39334
39334
|
FolderInput,
|
|
39335
39335
|
FolderInputIcon: FolderInput,
|
|
39336
39336
|
FolderKanban,
|
|
@@ -40249,7 +40249,7 @@ const LucideIcons = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
40249
40249
|
LucideCheck: Check$1,
|
|
40250
40250
|
LucideCheckCheck: CheckCheck,
|
|
40251
40251
|
LucideCheckCircle: CircleCheckBig,
|
|
40252
|
-
LucideCheckCircle2: CircleCheck
|
|
40252
|
+
LucideCheckCircle2: CircleCheck,
|
|
40253
40253
|
LucideCheckLine: CheckLine,
|
|
40254
40254
|
LucideCheckSquare: SquareCheckBig,
|
|
40255
40255
|
LucideCheckSquare2: SquareCheck,
|
|
@@ -40299,7 +40299,7 @@ const LucideIcons = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
40299
40299
|
LucideCircleArrowOutUpRight: CircleArrowOutUpRight,
|
|
40300
40300
|
LucideCircleArrowRight: CircleArrowRight,
|
|
40301
40301
|
LucideCircleArrowUp: CircleArrowUp,
|
|
40302
|
-
LucideCircleCheck: CircleCheck
|
|
40302
|
+
LucideCircleCheck: CircleCheck,
|
|
40303
40303
|
LucideCircleCheckBig: CircleCheckBig,
|
|
40304
40304
|
LucideCircleChevronDown: CircleChevronDown,
|
|
40305
40305
|
LucideCircleChevronLeft: CircleChevronLeft,
|
|
@@ -40606,7 +40606,7 @@ const LucideIcons = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
40606
40606
|
LucideFileStack: FileStack,
|
|
40607
40607
|
LucideFileSymlink: FileSymlink,
|
|
40608
40608
|
LucideFileTerminal: FileTerminal,
|
|
40609
|
-
LucideFileText: FileText
|
|
40609
|
+
LucideFileText: FileText,
|
|
40610
40610
|
LucideFileType: FileType,
|
|
40611
40611
|
LucideFileType2: FileTypeCorner,
|
|
40612
40612
|
LucideFileTypeCorner: FileTypeCorner,
|
|
@@ -40651,7 +40651,7 @@ const LucideIcons = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
40651
40651
|
LucideFocus: Focus,
|
|
40652
40652
|
LucideFoldHorizontal: FoldHorizontal,
|
|
40653
40653
|
LucideFoldVertical: FoldVertical,
|
|
40654
|
-
LucideFolder: Folder,
|
|
40654
|
+
LucideFolder: Folder$1,
|
|
40655
40655
|
LucideFolderArchive: FolderArchive,
|
|
40656
40656
|
LucideFolderCheck: FolderCheck,
|
|
40657
40657
|
LucideFolderClock: FolderClock,
|
|
@@ -41335,7 +41335,7 @@ const LucideIcons = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
41335
41335
|
LucideScreenShareOff: ScreenShareOff,
|
|
41336
41336
|
LucideScroll: Scroll,
|
|
41337
41337
|
LucideScrollText: ScrollText,
|
|
41338
|
-
LucideSearch: Search,
|
|
41338
|
+
LucideSearch: Search$1,
|
|
41339
41339
|
LucideSearchCheck: SearchCheck,
|
|
41340
41340
|
LucideSearchCode: SearchCode,
|
|
41341
41341
|
LucideSearchSlash: SearchSlash,
|
|
@@ -42562,12 +42562,12 @@ const LucideIcons = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
42562
42562
|
ScrollIcon: Scroll,
|
|
42563
42563
|
ScrollText,
|
|
42564
42564
|
ScrollTextIcon: ScrollText,
|
|
42565
|
-
Search,
|
|
42565
|
+
Search: Search$1,
|
|
42566
42566
|
SearchCheck,
|
|
42567
42567
|
SearchCheckIcon: SearchCheck,
|
|
42568
42568
|
SearchCode,
|
|
42569
42569
|
SearchCodeIcon: SearchCode,
|
|
42570
|
-
SearchIcon: Search,
|
|
42570
|
+
SearchIcon: Search$1,
|
|
42571
42571
|
SearchSlash,
|
|
42572
42572
|
SearchSlashIcon: SearchSlash,
|
|
42573
42573
|
SearchX,
|
|
@@ -48350,78 +48350,67 @@ const CircleAlert = createLucideIcon("circle-alert", __iconNode$o);
|
|
|
48350
48350
|
* See the LICENSE file in the root directory of this source tree.
|
|
48351
48351
|
*/
|
|
48352
48352
|
const __iconNode$n = [
|
|
48353
|
-
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
48354
|
-
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
48355
|
-
];
|
|
48356
|
-
const CircleCheck = createLucideIcon("circle-check", __iconNode$n);
|
|
48357
|
-
/**
|
|
48358
|
-
* @license lucide-react v0.552.0 - ISC
|
|
48359
|
-
*
|
|
48360
|
-
* This source code is licensed under the ISC license.
|
|
48361
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
48362
|
-
*/
|
|
48363
|
-
const __iconNode$m = [
|
|
48364
48353
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
48365
48354
|
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
48366
48355
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
48367
48356
|
];
|
|
48368
|
-
const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$
|
|
48357
|
+
const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$n);
|
|
48369
48358
|
/**
|
|
48370
48359
|
* @license lucide-react v0.552.0 - ISC
|
|
48371
48360
|
*
|
|
48372
48361
|
* This source code is licensed under the ISC license.
|
|
48373
48362
|
* See the LICENSE file in the root directory of this source tree.
|
|
48374
48363
|
*/
|
|
48375
|
-
const __iconNode$
|
|
48364
|
+
const __iconNode$m = [
|
|
48376
48365
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
48377
48366
|
["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
|
|
48378
48367
|
];
|
|
48379
|
-
const Copy = createLucideIcon("copy", __iconNode$
|
|
48368
|
+
const Copy = createLucideIcon("copy", __iconNode$m);
|
|
48380
48369
|
/**
|
|
48381
48370
|
* @license lucide-react v0.552.0 - ISC
|
|
48382
48371
|
*
|
|
48383
48372
|
* This source code is licensed under the ISC license.
|
|
48384
48373
|
* See the LICENSE file in the root directory of this source tree.
|
|
48385
48374
|
*/
|
|
48386
|
-
const __iconNode$
|
|
48375
|
+
const __iconNode$l = [
|
|
48387
48376
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
48388
48377
|
["line", { x1: "22", x2: "18", y1: "12", y2: "12", key: "l9bcsi" }],
|
|
48389
48378
|
["line", { x1: "6", x2: "2", y1: "12", y2: "12", key: "13hhkx" }],
|
|
48390
48379
|
["line", { x1: "12", x2: "12", y1: "6", y2: "2", key: "10w3f3" }],
|
|
48391
48380
|
["line", { x1: "12", x2: "12", y1: "22", y2: "18", key: "15g9kq" }]
|
|
48392
48381
|
];
|
|
48393
|
-
const Crosshair = createLucideIcon("crosshair", __iconNode$
|
|
48382
|
+
const Crosshair = createLucideIcon("crosshair", __iconNode$l);
|
|
48394
48383
|
/**
|
|
48395
48384
|
* @license lucide-react v0.552.0 - ISC
|
|
48396
48385
|
*
|
|
48397
48386
|
* This source code is licensed under the ISC license.
|
|
48398
48387
|
* See the LICENSE file in the root directory of this source tree.
|
|
48399
48388
|
*/
|
|
48400
|
-
const __iconNode$
|
|
48389
|
+
const __iconNode$k = [
|
|
48401
48390
|
["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
|
|
48402
48391
|
["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
|
|
48403
48392
|
["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
|
|
48404
48393
|
];
|
|
48405
|
-
const Database = createLucideIcon("database", __iconNode$
|
|
48394
|
+
const Database = createLucideIcon("database", __iconNode$k);
|
|
48406
48395
|
/**
|
|
48407
48396
|
* @license lucide-react v0.552.0 - ISC
|
|
48408
48397
|
*
|
|
48409
48398
|
* This source code is licensed under the ISC license.
|
|
48410
48399
|
* See the LICENSE file in the root directory of this source tree.
|
|
48411
48400
|
*/
|
|
48412
|
-
const __iconNode$
|
|
48401
|
+
const __iconNode$j = [
|
|
48413
48402
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
48414
48403
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
48415
48404
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
48416
48405
|
];
|
|
48417
|
-
const ExternalLink = createLucideIcon("external-link", __iconNode$
|
|
48406
|
+
const ExternalLink = createLucideIcon("external-link", __iconNode$j);
|
|
48418
48407
|
/**
|
|
48419
48408
|
* @license lucide-react v0.552.0 - ISC
|
|
48420
48409
|
*
|
|
48421
48410
|
* This source code is licensed under the ISC license.
|
|
48422
48411
|
* See the LICENSE file in the root directory of this source tree.
|
|
48423
48412
|
*/
|
|
48424
|
-
const __iconNode$
|
|
48413
|
+
const __iconNode$i = [
|
|
48425
48414
|
[
|
|
48426
48415
|
"path",
|
|
48427
48416
|
{
|
|
@@ -48439,60 +48428,56 @@ const __iconNode$h = [
|
|
|
48439
48428
|
{ d: "M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1", key: "mpwhp6" }
|
|
48440
48429
|
]
|
|
48441
48430
|
];
|
|
48442
|
-
const FileBraces = createLucideIcon("file-braces", __iconNode$
|
|
48431
|
+
const FileBraces = createLucideIcon("file-braces", __iconNode$i);
|
|
48443
48432
|
/**
|
|
48444
48433
|
* @license lucide-react v0.552.0 - ISC
|
|
48445
48434
|
*
|
|
48446
48435
|
* This source code is licensed under the ISC license.
|
|
48447
48436
|
* See the LICENSE file in the root directory of this source tree.
|
|
48448
48437
|
*/
|
|
48449
|
-
const __iconNode$
|
|
48438
|
+
const __iconNode$h = [
|
|
48450
48439
|
[
|
|
48451
48440
|
"path",
|
|
48452
48441
|
{
|
|
48453
|
-
d: "
|
|
48454
|
-
key: "
|
|
48442
|
+
d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",
|
|
48443
|
+
key: "1kt360"
|
|
48455
48444
|
}
|
|
48456
|
-
]
|
|
48457
|
-
["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
|
|
48458
|
-
["path", { d: "M10 9H8", key: "b1mrlr" }],
|
|
48459
|
-
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
48460
|
-
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
48445
|
+
]
|
|
48461
48446
|
];
|
|
48462
|
-
const
|
|
48447
|
+
const Folder = createLucideIcon("folder", __iconNode$h);
|
|
48463
48448
|
/**
|
|
48464
48449
|
* @license lucide-react v0.552.0 - ISC
|
|
48465
48450
|
*
|
|
48466
48451
|
* This source code is licensed under the ISC license.
|
|
48467
48452
|
* See the LICENSE file in the root directory of this source tree.
|
|
48468
48453
|
*/
|
|
48469
|
-
const __iconNode$
|
|
48454
|
+
const __iconNode$g = [
|
|
48470
48455
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
48471
48456
|
["path", { d: "M3 9h18", key: "1pudct" }],
|
|
48472
48457
|
["path", { d: "M3 15h18", key: "5xshup" }],
|
|
48473
48458
|
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
48474
48459
|
["path", { d: "M15 3v18", key: "14nvp0" }]
|
|
48475
48460
|
];
|
|
48476
|
-
const Grid3x3 = createLucideIcon("grid-3x3", __iconNode$
|
|
48461
|
+
const Grid3x3 = createLucideIcon("grid-3x3", __iconNode$g);
|
|
48477
48462
|
/**
|
|
48478
48463
|
* @license lucide-react v0.552.0 - ISC
|
|
48479
48464
|
*
|
|
48480
48465
|
* This source code is licensed under the ISC license.
|
|
48481
48466
|
* See the LICENSE file in the root directory of this source tree.
|
|
48482
48467
|
*/
|
|
48483
|
-
const __iconNode$
|
|
48468
|
+
const __iconNode$f = [
|
|
48484
48469
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
48485
48470
|
["path", { d: "M12 16v-4", key: "1dtifu" }],
|
|
48486
48471
|
["path", { d: "M12 8h.01", key: "e9boi3" }]
|
|
48487
48472
|
];
|
|
48488
|
-
const Info = createLucideIcon("info", __iconNode$
|
|
48473
|
+
const Info = createLucideIcon("info", __iconNode$f);
|
|
48489
48474
|
/**
|
|
48490
48475
|
* @license lucide-react v0.552.0 - ISC
|
|
48491
48476
|
*
|
|
48492
48477
|
* This source code is licensed under the ISC license.
|
|
48493
48478
|
* See the LICENSE file in the root directory of this source tree.
|
|
48494
48479
|
*/
|
|
48495
|
-
const __iconNode$
|
|
48480
|
+
const __iconNode$e = [
|
|
48496
48481
|
["path", { d: "M12 2v4", key: "3427ic" }],
|
|
48497
48482
|
["path", { d: "m16.2 7.8 2.9-2.9", key: "r700ao" }],
|
|
48498
48483
|
["path", { d: "M18 12h4", key: "wj9ykh" }],
|
|
@@ -48502,14 +48487,14 @@ const __iconNode$d = [
|
|
|
48502
48487
|
["path", { d: "M2 12h4", key: "j09sii" }],
|
|
48503
48488
|
["path", { d: "m4.9 4.9 2.9 2.9", key: "giyufr" }]
|
|
48504
48489
|
];
|
|
48505
|
-
const Loader = createLucideIcon("loader", __iconNode$
|
|
48490
|
+
const Loader = createLucideIcon("loader", __iconNode$e);
|
|
48506
48491
|
/**
|
|
48507
48492
|
* @license lucide-react v0.552.0 - ISC
|
|
48508
48493
|
*
|
|
48509
48494
|
* This source code is licensed under the ISC license.
|
|
48510
48495
|
* See the LICENSE file in the root directory of this source tree.
|
|
48511
48496
|
*/
|
|
48512
|
-
const __iconNode$
|
|
48497
|
+
const __iconNode$d = [
|
|
48513
48498
|
[
|
|
48514
48499
|
"path",
|
|
48515
48500
|
{
|
|
@@ -48520,50 +48505,50 @@ const __iconNode$c = [
|
|
|
48520
48505
|
["path", { d: "m2 2 20 20", key: "1ooewy" }],
|
|
48521
48506
|
["path", { d: "M8.656 3H20a2 2 0 0 1 2 2v11.344", key: "mhl4k6" }]
|
|
48522
48507
|
];
|
|
48523
|
-
const MessageSquareOff = createLucideIcon("message-square-off", __iconNode$
|
|
48508
|
+
const MessageSquareOff = createLucideIcon("message-square-off", __iconNode$d);
|
|
48524
48509
|
/**
|
|
48525
48510
|
* @license lucide-react v0.552.0 - ISC
|
|
48526
48511
|
*
|
|
48527
48512
|
* This source code is licensed under the ISC license.
|
|
48528
48513
|
* See the LICENSE file in the root directory of this source tree.
|
|
48529
48514
|
*/
|
|
48530
|
-
const __iconNode$
|
|
48515
|
+
const __iconNode$c = [
|
|
48531
48516
|
["rect", { x: "16", y: "16", width: "6", height: "6", rx: "1", key: "4q2zg0" }],
|
|
48532
48517
|
["rect", { x: "2", y: "16", width: "6", height: "6", rx: "1", key: "8cvhb9" }],
|
|
48533
48518
|
["rect", { x: "9", y: "2", width: "6", height: "6", rx: "1", key: "1egb70" }],
|
|
48534
48519
|
["path", { d: "M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3", key: "1jsf9p" }],
|
|
48535
48520
|
["path", { d: "M12 12V8", key: "2874zd" }]
|
|
48536
48521
|
];
|
|
48537
|
-
const Network = createLucideIcon("network", __iconNode$
|
|
48522
|
+
const Network = createLucideIcon("network", __iconNode$c);
|
|
48538
48523
|
/**
|
|
48539
48524
|
* @license lucide-react v0.552.0 - ISC
|
|
48540
48525
|
*
|
|
48541
48526
|
* This source code is licensed under the ISC license.
|
|
48542
48527
|
* See the LICENSE file in the root directory of this source tree.
|
|
48543
48528
|
*/
|
|
48544
|
-
const __iconNode$
|
|
48529
|
+
const __iconNode$b = [
|
|
48545
48530
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
48546
48531
|
["path", { d: "M9 3v18", key: "fh3hqa" }]
|
|
48547
48532
|
];
|
|
48548
|
-
const PanelLeft = createLucideIcon("panel-left", __iconNode$
|
|
48533
|
+
const PanelLeft = createLucideIcon("panel-left", __iconNode$b);
|
|
48549
48534
|
/**
|
|
48550
48535
|
* @license lucide-react v0.552.0 - ISC
|
|
48551
48536
|
*
|
|
48552
48537
|
* This source code is licensed under the ISC license.
|
|
48553
48538
|
* See the LICENSE file in the root directory of this source tree.
|
|
48554
48539
|
*/
|
|
48555
|
-
const __iconNode$
|
|
48540
|
+
const __iconNode$a = [
|
|
48556
48541
|
["rect", { x: "14", y: "3", width: "5", height: "18", rx: "1", key: "kaeet6" }],
|
|
48557
48542
|
["rect", { x: "5", y: "3", width: "5", height: "18", rx: "1", key: "1wsw3u" }]
|
|
48558
48543
|
];
|
|
48559
|
-
const Pause = createLucideIcon("pause", __iconNode$
|
|
48544
|
+
const Pause = createLucideIcon("pause", __iconNode$a);
|
|
48560
48545
|
/**
|
|
48561
48546
|
* @license lucide-react v0.552.0 - ISC
|
|
48562
48547
|
*
|
|
48563
48548
|
* This source code is licensed under the ISC license.
|
|
48564
48549
|
* See the LICENSE file in the root directory of this source tree.
|
|
48565
48550
|
*/
|
|
48566
|
-
const __iconNode$
|
|
48551
|
+
const __iconNode$9 = [
|
|
48567
48552
|
[
|
|
48568
48553
|
"path",
|
|
48569
48554
|
{
|
|
@@ -48573,14 +48558,14 @@ const __iconNode$8 = [
|
|
|
48573
48558
|
],
|
|
48574
48559
|
["path", { d: "m15 5 4 4", key: "1mk7zo" }]
|
|
48575
48560
|
];
|
|
48576
|
-
const Pencil = createLucideIcon("pencil", __iconNode$
|
|
48561
|
+
const Pencil = createLucideIcon("pencil", __iconNode$9);
|
|
48577
48562
|
/**
|
|
48578
48563
|
* @license lucide-react v0.552.0 - ISC
|
|
48579
48564
|
*
|
|
48580
48565
|
* This source code is licensed under the ISC license.
|
|
48581
48566
|
* See the LICENSE file in the root directory of this source tree.
|
|
48582
48567
|
*/
|
|
48583
|
-
const __iconNode$
|
|
48568
|
+
const __iconNode$8 = [
|
|
48584
48569
|
[
|
|
48585
48570
|
"path",
|
|
48586
48571
|
{
|
|
@@ -48589,38 +48574,38 @@ const __iconNode$7 = [
|
|
|
48589
48574
|
}
|
|
48590
48575
|
]
|
|
48591
48576
|
];
|
|
48592
|
-
const Play = createLucideIcon("play", __iconNode$
|
|
48577
|
+
const Play = createLucideIcon("play", __iconNode$8);
|
|
48593
48578
|
/**
|
|
48594
48579
|
* @license lucide-react v0.552.0 - ISC
|
|
48595
48580
|
*
|
|
48596
48581
|
* This source code is licensed under the ISC license.
|
|
48597
48582
|
* See the LICENSE file in the root directory of this source tree.
|
|
48598
48583
|
*/
|
|
48599
|
-
const __iconNode$
|
|
48584
|
+
const __iconNode$7 = [
|
|
48600
48585
|
["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
|
|
48601
48586
|
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
48602
48587
|
["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
|
|
48603
48588
|
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
48604
48589
|
];
|
|
48605
|
-
const RefreshCw = createLucideIcon("refresh-cw", __iconNode$
|
|
48590
|
+
const RefreshCw = createLucideIcon("refresh-cw", __iconNode$7);
|
|
48606
48591
|
/**
|
|
48607
48592
|
* @license lucide-react v0.552.0 - ISC
|
|
48608
48593
|
*
|
|
48609
48594
|
* This source code is licensed under the ISC license.
|
|
48610
48595
|
* See the LICENSE file in the root directory of this source tree.
|
|
48611
48596
|
*/
|
|
48612
|
-
const __iconNode$
|
|
48597
|
+
const __iconNode$6 = [
|
|
48613
48598
|
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
|
|
48614
48599
|
["path", { d: "M3 3v5h5", key: "1xhq8a" }]
|
|
48615
48600
|
];
|
|
48616
|
-
const RotateCcw = createLucideIcon("rotate-ccw", __iconNode$
|
|
48601
|
+
const RotateCcw = createLucideIcon("rotate-ccw", __iconNode$6);
|
|
48617
48602
|
/**
|
|
48618
48603
|
* @license lucide-react v0.552.0 - ISC
|
|
48619
48604
|
*
|
|
48620
48605
|
* This source code is licensed under the ISC license.
|
|
48621
48606
|
* See the LICENSE file in the root directory of this source tree.
|
|
48622
48607
|
*/
|
|
48623
|
-
const __iconNode$
|
|
48608
|
+
const __iconNode$5 = [
|
|
48624
48609
|
[
|
|
48625
48610
|
"path",
|
|
48626
48611
|
{
|
|
@@ -48631,7 +48616,18 @@ const __iconNode$4 = [
|
|
|
48631
48616
|
["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
|
|
48632
48617
|
["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
|
|
48633
48618
|
];
|
|
48634
|
-
const Save = createLucideIcon("save", __iconNode$
|
|
48619
|
+
const Save = createLucideIcon("save", __iconNode$5);
|
|
48620
|
+
/**
|
|
48621
|
+
* @license lucide-react v0.552.0 - ISC
|
|
48622
|
+
*
|
|
48623
|
+
* This source code is licensed under the ISC license.
|
|
48624
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
48625
|
+
*/
|
|
48626
|
+
const __iconNode$4 = [
|
|
48627
|
+
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
48628
|
+
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
48629
|
+
];
|
|
48630
|
+
const Search = createLucideIcon("search", __iconNode$4);
|
|
48635
48631
|
/**
|
|
48636
48632
|
* @license lucide-react v0.552.0 - ISC
|
|
48637
48633
|
*
|
|
@@ -48885,7 +48881,7 @@ const EmptyStateContent = ({ theme }) => {
|
|
|
48885
48881
|
] })
|
|
48886
48882
|
] });
|
|
48887
48883
|
};
|
|
48888
|
-
const
|
|
48884
|
+
const CanvasEditorPanel = ({
|
|
48889
48885
|
context,
|
|
48890
48886
|
actions,
|
|
48891
48887
|
events
|
|
@@ -50583,7 +50579,7 @@ const NarrativeRenderer = ({
|
|
|
50583
50579
|
const result = useMemo(() => {
|
|
50584
50580
|
try {
|
|
50585
50581
|
const rendered = renderNarrative(template, events);
|
|
50586
|
-
const hasMissingVars = rendered.text
|
|
50582
|
+
const hasMissingVars = /\{[^}]*\}/.test(rendered.text) || rendered.text.includes("{ERROR:");
|
|
50587
50583
|
return {
|
|
50588
50584
|
...rendered,
|
|
50589
50585
|
hasMissingVars
|
|
@@ -50602,44 +50598,244 @@ const NarrativeRenderer = ({
|
|
|
50602
50598
|
}
|
|
50603
50599
|
}, [template, events]);
|
|
50604
50600
|
const renderHighlightedText = (text) => {
|
|
50601
|
+
var _a;
|
|
50605
50602
|
const lines = text.split("\n");
|
|
50606
|
-
|
|
50607
|
-
|
|
50608
|
-
|
|
50609
|
-
|
|
50603
|
+
const elements = [];
|
|
50604
|
+
let stepCounter = 0;
|
|
50605
|
+
for (let idx = 0; idx < lines.length; idx++) {
|
|
50606
|
+
const line = lines[idx];
|
|
50607
|
+
if (!line.trim()) {
|
|
50608
|
+
elements.push(/* @__PURE__ */ jsx("div", { style: { height: "12px" } }, idx));
|
|
50609
|
+
continue;
|
|
50610
|
+
}
|
|
50610
50611
|
if (/^[✅❌⚠️📋]/.test(line)) {
|
|
50611
|
-
|
|
50612
|
-
|
|
50613
|
-
|
|
50614
|
-
|
|
50615
|
-
|
|
50616
|
-
|
|
50612
|
+
elements.push(
|
|
50613
|
+
/* @__PURE__ */ jsx(
|
|
50614
|
+
"div",
|
|
50615
|
+
{
|
|
50616
|
+
style: {
|
|
50617
|
+
fontSize: "18px",
|
|
50618
|
+
fontWeight: 700,
|
|
50619
|
+
marginTop: idx > 0 ? "24px" : "0",
|
|
50620
|
+
marginBottom: "16px",
|
|
50621
|
+
paddingBottom: "12px",
|
|
50622
|
+
borderBottom: `2px solid ${theme.colors.border}`,
|
|
50623
|
+
lineHeight: "1.4"
|
|
50624
|
+
},
|
|
50625
|
+
children: highlightVariables(line)
|
|
50626
|
+
},
|
|
50627
|
+
idx
|
|
50628
|
+
)
|
|
50629
|
+
);
|
|
50630
|
+
stepCounter = 0;
|
|
50617
50631
|
} else if (/^━+/.test(line)) {
|
|
50618
|
-
|
|
50619
|
-
|
|
50620
|
-
|
|
50621
|
-
|
|
50632
|
+
elements.push(
|
|
50633
|
+
/* @__PURE__ */ jsx(
|
|
50634
|
+
"div",
|
|
50635
|
+
{
|
|
50636
|
+
style: {
|
|
50637
|
+
height: "1px",
|
|
50638
|
+
backgroundColor: theme.colors.border,
|
|
50639
|
+
margin: "20px 0",
|
|
50640
|
+
opacity: 0.3
|
|
50641
|
+
}
|
|
50642
|
+
},
|
|
50643
|
+
idx
|
|
50644
|
+
)
|
|
50645
|
+
);
|
|
50622
50646
|
} else if (/^(\s*)→/.test(line)) {
|
|
50623
50647
|
const indent = ((_a = line.match(/^(\s*)/)) == null ? void 0 : _a[1]) || "";
|
|
50624
|
-
|
|
50625
|
-
|
|
50626
|
-
|
|
50627
|
-
|
|
50628
|
-
|
|
50648
|
+
const isMainStep = indent.length === 0;
|
|
50649
|
+
if (isMainStep) {
|
|
50650
|
+
stepCounter++;
|
|
50651
|
+
}
|
|
50652
|
+
const content = line.replace(/^(\s*)→\s*/, "");
|
|
50653
|
+
elements.push(
|
|
50654
|
+
/* @__PURE__ */ jsxs(
|
|
50655
|
+
"div",
|
|
50656
|
+
{
|
|
50657
|
+
style: {
|
|
50658
|
+
display: "flex",
|
|
50659
|
+
gap: "12px",
|
|
50660
|
+
marginTop: isMainStep ? "16px" : "8px",
|
|
50661
|
+
marginLeft: isMainStep ? "0" : "40px",
|
|
50662
|
+
alignItems: "flex-start"
|
|
50663
|
+
},
|
|
50664
|
+
children: [
|
|
50665
|
+
isMainStep && /* @__PURE__ */ jsx(
|
|
50666
|
+
"div",
|
|
50667
|
+
{
|
|
50668
|
+
style: {
|
|
50669
|
+
minWidth: "28px",
|
|
50670
|
+
height: "28px",
|
|
50671
|
+
borderRadius: "50%",
|
|
50672
|
+
backgroundColor: theme.colors.primary,
|
|
50673
|
+
color: "#fff",
|
|
50674
|
+
display: "flex",
|
|
50675
|
+
alignItems: "center",
|
|
50676
|
+
justifyContent: "center",
|
|
50677
|
+
fontSize: "13px",
|
|
50678
|
+
fontWeight: 700,
|
|
50679
|
+
flexShrink: 0
|
|
50680
|
+
},
|
|
50681
|
+
children: stepCounter
|
|
50682
|
+
}
|
|
50683
|
+
),
|
|
50684
|
+
!isMainStep && /* @__PURE__ */ jsx(
|
|
50685
|
+
"div",
|
|
50686
|
+
{
|
|
50687
|
+
style: {
|
|
50688
|
+
minWidth: "6px",
|
|
50689
|
+
height: "6px",
|
|
50690
|
+
borderRadius: "50%",
|
|
50691
|
+
backgroundColor: theme.colors.textSecondary,
|
|
50692
|
+
marginTop: "8px",
|
|
50693
|
+
flexShrink: 0
|
|
50694
|
+
}
|
|
50695
|
+
}
|
|
50696
|
+
),
|
|
50697
|
+
/* @__PURE__ */ jsx(
|
|
50698
|
+
"div",
|
|
50699
|
+
{
|
|
50700
|
+
style: {
|
|
50701
|
+
flex: 1,
|
|
50702
|
+
padding: isMainStep ? "12px 16px" : "8px 12px",
|
|
50703
|
+
backgroundColor: isMainStep ? theme.colors.backgroundSecondary : "transparent",
|
|
50704
|
+
border: isMainStep ? `1px solid ${theme.colors.border}` : "none",
|
|
50705
|
+
borderRadius: "6px",
|
|
50706
|
+
fontSize: isMainStep ? "15px" : "14px",
|
|
50707
|
+
lineHeight: "1.6",
|
|
50708
|
+
fontWeight: isMainStep ? 500 : 400
|
|
50709
|
+
},
|
|
50710
|
+
children: highlightVariables(content)
|
|
50711
|
+
}
|
|
50712
|
+
)
|
|
50713
|
+
]
|
|
50714
|
+
},
|
|
50715
|
+
idx
|
|
50716
|
+
)
|
|
50717
|
+
);
|
|
50629
50718
|
} else if (/^\s+•/.test(line)) {
|
|
50630
|
-
|
|
50631
|
-
|
|
50632
|
-
|
|
50633
|
-
|
|
50719
|
+
const content = line.replace(/^\s+•\s*/, "");
|
|
50720
|
+
elements.push(
|
|
50721
|
+
/* @__PURE__ */ jsxs(
|
|
50722
|
+
"div",
|
|
50723
|
+
{
|
|
50724
|
+
style: {
|
|
50725
|
+
display: "flex",
|
|
50726
|
+
gap: "8px",
|
|
50727
|
+
marginLeft: "40px",
|
|
50728
|
+
marginTop: "6px",
|
|
50729
|
+
alignItems: "flex-start"
|
|
50730
|
+
},
|
|
50731
|
+
children: [
|
|
50732
|
+
/* @__PURE__ */ jsx("span", { style: { color: theme.colors.textSecondary, marginTop: "2px" }, children: "•" }),
|
|
50733
|
+
/* @__PURE__ */ jsx("span", { style: { color: theme.colors.textSecondary, fontSize: "14px", lineHeight: "1.6" }, children: highlightVariables(content) })
|
|
50734
|
+
]
|
|
50735
|
+
},
|
|
50736
|
+
idx
|
|
50737
|
+
)
|
|
50738
|
+
);
|
|
50634
50739
|
} else if (/^[A-Z\s]+:/.test(line)) {
|
|
50635
|
-
|
|
50636
|
-
|
|
50637
|
-
|
|
50638
|
-
|
|
50639
|
-
|
|
50740
|
+
elements.push(
|
|
50741
|
+
/* @__PURE__ */ jsx(
|
|
50742
|
+
"div",
|
|
50743
|
+
{
|
|
50744
|
+
style: {
|
|
50745
|
+
fontSize: "14px",
|
|
50746
|
+
fontWeight: 700,
|
|
50747
|
+
marginTop: "24px",
|
|
50748
|
+
marginBottom: "12px",
|
|
50749
|
+
color: theme.colors.text,
|
|
50750
|
+
textTransform: "uppercase",
|
|
50751
|
+
letterSpacing: "0.5px",
|
|
50752
|
+
opacity: 0.8
|
|
50753
|
+
},
|
|
50754
|
+
children: highlightVariables(line)
|
|
50755
|
+
},
|
|
50756
|
+
idx
|
|
50757
|
+
)
|
|
50758
|
+
);
|
|
50759
|
+
} else {
|
|
50760
|
+
elements.push(
|
|
50761
|
+
/* @__PURE__ */ jsx(
|
|
50762
|
+
"div",
|
|
50763
|
+
{
|
|
50764
|
+
style: {
|
|
50765
|
+
fontSize: "14px",
|
|
50766
|
+
lineHeight: "1.7",
|
|
50767
|
+
color: theme.colors.textSecondary,
|
|
50768
|
+
marginTop: "8px"
|
|
50769
|
+
},
|
|
50770
|
+
children: highlightVariables(line)
|
|
50771
|
+
},
|
|
50772
|
+
idx
|
|
50773
|
+
)
|
|
50774
|
+
);
|
|
50775
|
+
}
|
|
50776
|
+
}
|
|
50777
|
+
return elements;
|
|
50778
|
+
};
|
|
50779
|
+
const highlightVariables = (text) => {
|
|
50780
|
+
const parts = [];
|
|
50781
|
+
let lastIndex = 0;
|
|
50782
|
+
const patterns = [
|
|
50783
|
+
// Currency ($123.45)
|
|
50784
|
+
{ regex: /\$\d+(?:\.\d{2})?/g, color: "#10b981" },
|
|
50785
|
+
// IDs and codes (ORD-12345, ABC123, etc.)
|
|
50786
|
+
{ regex: /\b[A-Z]{2,}[-_]?\d+\b/g, color: "#f59e0b" },
|
|
50787
|
+
// Plain numbers (not part of IDs)
|
|
50788
|
+
{ regex: /\b\d+(?:\.\d+)?\b/g, color: "#60a5fa" },
|
|
50789
|
+
// Email-like or capitalized names (John Doe, john@example.com)
|
|
50790
|
+
{ regex: /\b[A-Z][a-z]+(?:\s+[A-Z][a-z]+)*\b/g, color: "#a78bfa" },
|
|
50791
|
+
{ regex: /\b[\w.-]+@[\w.-]+\.\w+\b/g, color: "#ec4899" }
|
|
50792
|
+
];
|
|
50793
|
+
const allMatches = [];
|
|
50794
|
+
patterns.forEach(({ regex, color: color2 }) => {
|
|
50795
|
+
let match;
|
|
50796
|
+
const re = new RegExp(regex.source, regex.flags);
|
|
50797
|
+
while ((match = re.exec(text)) !== null) {
|
|
50798
|
+
allMatches.push({
|
|
50799
|
+
start: match.index,
|
|
50800
|
+
end: match.index + match[0].length,
|
|
50801
|
+
text: match[0],
|
|
50802
|
+
color: color2
|
|
50803
|
+
});
|
|
50640
50804
|
}
|
|
50641
|
-
return /* @__PURE__ */ jsx("div", { style: lineStyle, children: content }, idx);
|
|
50642
50805
|
});
|
|
50806
|
+
allMatches.sort((a, b) => a.start - b.start);
|
|
50807
|
+
const nonOverlapping = [];
|
|
50808
|
+
let lastEnd = 0;
|
|
50809
|
+
for (const match of allMatches) {
|
|
50810
|
+
if (match.start >= lastEnd) {
|
|
50811
|
+
nonOverlapping.push(match);
|
|
50812
|
+
lastEnd = match.end;
|
|
50813
|
+
}
|
|
50814
|
+
}
|
|
50815
|
+
nonOverlapping.forEach((match, i) => {
|
|
50816
|
+
if (match.start > lastIndex) {
|
|
50817
|
+
parts.push(text.substring(lastIndex, match.start));
|
|
50818
|
+
}
|
|
50819
|
+
parts.push(
|
|
50820
|
+
/* @__PURE__ */ jsx(
|
|
50821
|
+
"span",
|
|
50822
|
+
{
|
|
50823
|
+
style: {
|
|
50824
|
+
color: match.color,
|
|
50825
|
+
fontWeight: 600,
|
|
50826
|
+
fontFamily: theme.fonts.monospace
|
|
50827
|
+
},
|
|
50828
|
+
children: match.text
|
|
50829
|
+
},
|
|
50830
|
+
i
|
|
50831
|
+
)
|
|
50832
|
+
);
|
|
50833
|
+
lastIndex = match.end;
|
|
50834
|
+
});
|
|
50835
|
+
if (lastIndex < text.length) {
|
|
50836
|
+
parts.push(text.substring(lastIndex));
|
|
50837
|
+
}
|
|
50838
|
+
return parts.length > 0 ? /* @__PURE__ */ jsx(Fragment, { children: parts }) : text;
|
|
50643
50839
|
};
|
|
50644
50840
|
return /* @__PURE__ */ jsxs(
|
|
50645
50841
|
"div",
|
|
@@ -50685,14 +50881,12 @@ const NarrativeRenderer = ({
|
|
|
50685
50881
|
style: {
|
|
50686
50882
|
flex: 1,
|
|
50687
50883
|
overflow: "auto",
|
|
50688
|
-
padding: "
|
|
50689
|
-
fontFamily: theme.fonts.
|
|
50884
|
+
padding: "32px 28px",
|
|
50885
|
+
fontFamily: theme.fonts.body,
|
|
50690
50886
|
fontSize: "14px",
|
|
50691
|
-
lineHeight: "1.
|
|
50887
|
+
lineHeight: "1.7",
|
|
50692
50888
|
color: theme.colors.text,
|
|
50693
|
-
backgroundColor: theme.colors.background
|
|
50694
|
-
whiteSpace: "pre-wrap",
|
|
50695
|
-
wordWrap: "break-word"
|
|
50889
|
+
backgroundColor: theme.colors.background
|
|
50696
50890
|
},
|
|
50697
50891
|
children: renderHighlightedText(result.text)
|
|
50698
50892
|
}
|
|
@@ -50966,35 +51160,35 @@ const TestEventPanel = ({
|
|
|
50966
51160
|
/* @__PURE__ */ jsx(
|
|
50967
51161
|
"button",
|
|
50968
51162
|
{
|
|
50969
|
-
onClick: () => onViewModeChange("
|
|
51163
|
+
onClick: () => onViewModeChange("narrative"),
|
|
50970
51164
|
style: {
|
|
50971
51165
|
padding: "6px 12px",
|
|
50972
|
-
background: viewMode === "
|
|
51166
|
+
background: viewMode === "narrative" ? theme.colors.primary : theme.colors.surface,
|
|
50973
51167
|
border: `1px solid ${theme.colors.border}`,
|
|
50974
51168
|
borderRadius: "4px",
|
|
50975
|
-
color: viewMode === "
|
|
51169
|
+
color: viewMode === "narrative" ? "#ffffff" : theme.colors.text,
|
|
50976
51170
|
cursor: "pointer",
|
|
50977
51171
|
fontSize: "13px",
|
|
50978
|
-
fontWeight: viewMode === "
|
|
51172
|
+
fontWeight: viewMode === "narrative" ? "bold" : "normal"
|
|
50979
51173
|
},
|
|
50980
|
-
children: "
|
|
51174
|
+
children: "Narrative"
|
|
50981
51175
|
}
|
|
50982
51176
|
),
|
|
50983
51177
|
/* @__PURE__ */ jsx(
|
|
50984
51178
|
"button",
|
|
50985
51179
|
{
|
|
50986
|
-
onClick: () => onViewModeChange("
|
|
51180
|
+
onClick: () => onViewModeChange("raw"),
|
|
50987
51181
|
style: {
|
|
50988
51182
|
padding: "6px 12px",
|
|
50989
|
-
background: viewMode === "
|
|
51183
|
+
background: viewMode === "raw" ? theme.colors.primary : theme.colors.surface,
|
|
50990
51184
|
border: `1px solid ${theme.colors.border}`,
|
|
50991
51185
|
borderRadius: "4px",
|
|
50992
|
-
color: viewMode === "
|
|
51186
|
+
color: viewMode === "raw" ? "#ffffff" : theme.colors.text,
|
|
50993
51187
|
cursor: "pointer",
|
|
50994
51188
|
fontSize: "13px",
|
|
50995
|
-
fontWeight: viewMode === "
|
|
51189
|
+
fontWeight: viewMode === "raw" ? "bold" : "normal"
|
|
50996
51190
|
},
|
|
50997
|
-
children: "
|
|
51191
|
+
children: "Raw Events"
|
|
50998
51192
|
}
|
|
50999
51193
|
)
|
|
51000
51194
|
] }),
|
|
@@ -51427,7 +51621,7 @@ class ExecutionLoader {
|
|
|
51427
51621
|
});
|
|
51428
51622
|
}
|
|
51429
51623
|
/**
|
|
51430
|
-
* Find all .otel.canvas
|
|
51624
|
+
* Find all .canvas files (both .otel.canvas and regular .canvas) in the file tree
|
|
51431
51625
|
*/
|
|
51432
51626
|
static findCanvasFiles(files) {
|
|
51433
51627
|
const canvasFiles = [];
|
|
@@ -51435,16 +51629,27 @@ class ExecutionLoader {
|
|
|
51435
51629
|
for (const file of files) {
|
|
51436
51630
|
const filePath = file.relativePath || file.path || "";
|
|
51437
51631
|
const fileName = file.name || filePath.split("/").pop() || "";
|
|
51438
|
-
if (filePath.startsWith(`${VGC_FOLDER}/`)
|
|
51439
|
-
|
|
51440
|
-
|
|
51441
|
-
|
|
51442
|
-
|
|
51443
|
-
|
|
51444
|
-
|
|
51445
|
-
|
|
51446
|
-
|
|
51447
|
-
}
|
|
51632
|
+
if (filePath.startsWith(`${VGC_FOLDER}/`)) {
|
|
51633
|
+
let basename = null;
|
|
51634
|
+
let type2 = null;
|
|
51635
|
+
if (fileName.endsWith(".otel.canvas")) {
|
|
51636
|
+
basename = fileName.replace(/\.otel\.canvas$/, "");
|
|
51637
|
+
type2 = "otel";
|
|
51638
|
+
} else if (fileName.endsWith(".canvas") && !fileName.endsWith(".otel.canvas")) {
|
|
51639
|
+
basename = fileName.replace(/\.canvas$/, "");
|
|
51640
|
+
type2 = "regular";
|
|
51641
|
+
}
|
|
51642
|
+
if (basename && type2) {
|
|
51643
|
+
const displayName = basename.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
51644
|
+
canvasFiles.push({
|
|
51645
|
+
id: basename,
|
|
51646
|
+
name: displayName,
|
|
51647
|
+
path: filePath,
|
|
51648
|
+
source: "folder",
|
|
51649
|
+
basename,
|
|
51650
|
+
type: type2
|
|
51651
|
+
});
|
|
51652
|
+
}
|
|
51448
51653
|
}
|
|
51449
51654
|
}
|
|
51450
51655
|
return canvasFiles.sort((a, b) => a.name.localeCompare(b.name));
|
|
@@ -51842,7 +52047,7 @@ const Step2Components = () => {
|
|
|
51842
52047
|
/* @__PURE__ */ jsx("rect", { x: "310", y: "85", width: "240", height: "55", fill: "#1e1b4b", stroke: "#6366f1", strokeWidth: "1", rx: "3" }),
|
|
51843
52048
|
/* @__PURE__ */ jsx("text", { x: "315", y: "98", fill: "#c4b5fd", fontSize: "9", fontWeight: "600", children: "Scenario: success (priority: 1)" }),
|
|
51844
52049
|
/* @__PURE__ */ jsx("text", { x: "320", y: "110", fill: "#94a3b8", fontSize: "8", fontFamily: "monospace", children: 'condition: event = "order.completed"' }),
|
|
51845
|
-
/* @__PURE__ */ jsx("text", { x: "320", y: "122", fill: "#94a3b8", fontSize: "8", fontFamily: "monospace", children: 'template: "Order #{
|
|
52050
|
+
/* @__PURE__ */ jsx("text", { x: "320", y: "122", fill: "#94a3b8", fontSize: "8", fontFamily: "monospace", children: 'template: "Order #{order.id} completed"' }),
|
|
51846
52051
|
/* @__PURE__ */ jsx("text", { x: "320", y: "134", fill: "#94a3b8", fontSize: "8", fontFamily: "monospace", children: "steps: [4 narrative steps...]" })
|
|
51847
52052
|
] }),
|
|
51848
52053
|
/* @__PURE__ */ jsxs("g", { children: [
|
|
@@ -51948,9 +52153,9 @@ const Step4Templates = () => {
|
|
|
51948
52153
|
/* @__PURE__ */ jsx("rect", { x: "40", y: "45", width: "520", height: "90", fill: "#1e293b", stroke: "#475569", strokeWidth: "2", rx: "4" }),
|
|
51949
52154
|
/* @__PURE__ */ jsx("text", { x: "60", y: "65", fill: "#94a3b8", fontSize: "11", fontWeight: "600", children: "TEMPLATE WITH VARIABLES:" }),
|
|
51950
52155
|
/* @__PURE__ */ jsx("rect", { x: "60", y: "75", width: "500", height: "50", fill: "#0f172a", stroke: "#334155", strokeWidth: "1", rx: "3" }),
|
|
51951
|
-
/* @__PURE__ */ jsx("text", { x: "70", y: "93", fill: "#c4b5fd", fontSize: "10", fontFamily: "monospace", children: 'summary: "Order #{
|
|
52156
|
+
/* @__PURE__ */ jsx("text", { x: "70", y: "93", fill: "#c4b5fd", fontSize: "10", fontFamily: "monospace", children: 'summary: "Order #{order.id} for {customer.name}"' }),
|
|
51952
52157
|
/* @__PURE__ */ jsx("text", { x: "70", y: "108", fill: "#c4b5fd", fontSize: "10", fontFamily: "monospace", children: "steps:" }),
|
|
51953
|
-
/* @__PURE__ */ jsx("text", { x: "80", y: "120", fill: "#c4b5fd", fontSize: "10", fontFamily: "monospace", children: '- "Payment: ${
|
|
52158
|
+
/* @__PURE__ */ jsx("text", { x: "80", y: "120", fill: "#c4b5fd", fontSize: "10", fontFamily: "monospace", children: '- "Payment: ${order.total} via {payment.method}"' })
|
|
51954
52159
|
] }),
|
|
51955
52160
|
/* @__PURE__ */ jsx("g", { children: /* @__PURE__ */ jsx("text", { x: "300", y: "160", textAnchor: "middle", fill: "#3b82f6", fontSize: "16", fontWeight: "700", children: "+" }) }),
|
|
51956
52161
|
/* @__PURE__ */ jsxs("g", { children: [
|
|
@@ -51972,7 +52177,7 @@ const Step4Templates = () => {
|
|
|
51972
52177
|
/* @__PURE__ */ jsx("rect", { x: "40", y: "260", width: "520", height: "15", fill: "#1e3a8a", stroke: "#3b82f6", strokeWidth: "1", rx: "3" }),
|
|
51973
52178
|
/* @__PURE__ */ jsxs("text", { x: "50", y: "270", fill: "#bfdbfe", fontSize: "9", children: [
|
|
51974
52179
|
/* @__PURE__ */ jsx("tspan", { fontWeight: "600", children: "Syntax:" }),
|
|
51975
|
-
" {
|
|
52180
|
+
" {variable.name} gets replaced with actual values from OTEL attributes, events, or span data"
|
|
51976
52181
|
] })
|
|
51977
52182
|
] }),
|
|
51978
52183
|
/* @__PURE__ */ jsxs("div", { style: {
|
|
@@ -51984,7 +52189,7 @@ const Step4Templates = () => {
|
|
|
51984
52189
|
border: "1px solid #475569"
|
|
51985
52190
|
}, children: [
|
|
51986
52191
|
"Variables in ",
|
|
51987
|
-
/* @__PURE__ */ jsx("code", { style: { color: "#a78bfa" }, children: "{
|
|
52192
|
+
/* @__PURE__ */ jsx("code", { style: { color: "#a78bfa" }, children: "{single.braces}" }),
|
|
51988
52193
|
" are replaced with actual values from your execution data."
|
|
51989
52194
|
] })
|
|
51990
52195
|
] });
|
|
@@ -52354,7 +52559,7 @@ const NarrativeExplainerPanel = ({ className }) => {
|
|
|
52354
52559
|
] }),
|
|
52355
52560
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "8px" }, children: [
|
|
52356
52561
|
/* @__PURE__ */ jsx("span", { style: { color: "#34d399" }, children: "4." }),
|
|
52357
|
-
/* @__PURE__ */ jsx("span", { style: { color: theme.colors.textSecondary }, children: "View the results in
|
|
52562
|
+
/* @__PURE__ */ jsx("span", { style: { color: theme.colors.textSecondary }, children: "View the results in CanvasDetailPanel" })
|
|
52358
52563
|
] })
|
|
52359
52564
|
] })
|
|
52360
52565
|
]
|
|
@@ -52372,6 +52577,27 @@ const NarrativeTemplatePanel = ({
|
|
|
52372
52577
|
}) => {
|
|
52373
52578
|
var _a, _b;
|
|
52374
52579
|
const { theme } = useTheme();
|
|
52580
|
+
const [expandedScenarios, setExpandedScenarios] = useState(/* @__PURE__ */ new Set());
|
|
52581
|
+
const toggleScenario = (scenarioId) => {
|
|
52582
|
+
setExpandedScenarios((prev) => {
|
|
52583
|
+
const next = new Set(prev);
|
|
52584
|
+
if (next.has(scenarioId)) {
|
|
52585
|
+
next.delete(scenarioId);
|
|
52586
|
+
} else {
|
|
52587
|
+
next.add(scenarioId);
|
|
52588
|
+
}
|
|
52589
|
+
return next;
|
|
52590
|
+
});
|
|
52591
|
+
};
|
|
52592
|
+
const renderTemplateText = (text) => {
|
|
52593
|
+
const parts = text.split(/(\{[^}]+\})/g);
|
|
52594
|
+
return /* @__PURE__ */ jsx(Fragment, { children: parts.map((part, i) => {
|
|
52595
|
+
if (part.match(/^\{[^}]+\}$/)) {
|
|
52596
|
+
return /* @__PURE__ */ jsx("span", { style: { color: theme.colors.accent, fontWeight: 600 }, children: part }, i);
|
|
52597
|
+
}
|
|
52598
|
+
return part;
|
|
52599
|
+
}) });
|
|
52600
|
+
};
|
|
52375
52601
|
const renderCondition = (condition, depth = 0) => {
|
|
52376
52602
|
var _a2;
|
|
52377
52603
|
const indent = depth * 16;
|
|
@@ -52444,10 +52670,7 @@ const NarrativeTemplatePanel = ({
|
|
|
52444
52670
|
flexShrink: 0
|
|
52445
52671
|
},
|
|
52446
52672
|
children: [
|
|
52447
|
-
/* @__PURE__ */
|
|
52448
|
-
/* @__PURE__ */ jsx(FileText, { size: 20, style: { color: theme.colors.accent } }),
|
|
52449
|
-
/* @__PURE__ */ jsx("h2", { style: { margin: 0, fontSize: "16px", fontWeight: 600 }, children: narrativeTemplate.name || "Narrative Template" })
|
|
52450
|
-
] }),
|
|
52673
|
+
/* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx("h2", { style: { margin: 0, fontSize: "16px", fontWeight: 600 }, children: narrativeTemplate.name || "Narrative Template" }) }),
|
|
52451
52674
|
narrativeTemplate.description && /* @__PURE__ */ jsx(
|
|
52452
52675
|
"p",
|
|
52453
52676
|
{
|
|
@@ -52480,218 +52703,252 @@ const NarrativeTemplatePanel = ({
|
|
|
52480
52703
|
]
|
|
52481
52704
|
}
|
|
52482
52705
|
),
|
|
52483
|
-
(_b = narrativeTemplate.scenarios) == null ? void 0 : _b.map((scenario, index2) =>
|
|
52484
|
-
|
|
52485
|
-
|
|
52486
|
-
|
|
52487
|
-
|
|
52488
|
-
|
|
52489
|
-
|
|
52490
|
-
|
|
52491
|
-
|
|
52492
|
-
|
|
52493
|
-
|
|
52494
|
-
|
|
52495
|
-
|
|
52496
|
-
/* @__PURE__ */ jsx("h3", { style: { margin: 0, fontSize: "14px", fontWeight: 600 }, children: scenario.description }),
|
|
52706
|
+
(_b = narrativeTemplate.scenarios) == null ? void 0 : _b.map((scenario, index2) => {
|
|
52707
|
+
const isExpanded = expandedScenarios.has(scenario.id || String(index2));
|
|
52708
|
+
return /* @__PURE__ */ jsxs(
|
|
52709
|
+
"div",
|
|
52710
|
+
{
|
|
52711
|
+
style: {
|
|
52712
|
+
marginBottom: "16px",
|
|
52713
|
+
background: theme.colors.background,
|
|
52714
|
+
border: `1px solid ${theme.colors.border}`,
|
|
52715
|
+
borderRadius: "6px",
|
|
52716
|
+
overflow: "hidden"
|
|
52717
|
+
},
|
|
52718
|
+
children: [
|
|
52497
52719
|
/* @__PURE__ */ jsxs(
|
|
52498
|
-
"span",
|
|
52499
|
-
{
|
|
52500
|
-
style: {
|
|
52501
|
-
fontSize: "11px",
|
|
52502
|
-
padding: "2px 6px",
|
|
52503
|
-
background: theme.colors.background,
|
|
52504
|
-
borderRadius: "3px",
|
|
52505
|
-
color: theme.colors.textSecondary
|
|
52506
|
-
},
|
|
52507
|
-
children: [
|
|
52508
|
-
"Priority: ",
|
|
52509
|
-
scenario.priority
|
|
52510
|
-
]
|
|
52511
|
-
}
|
|
52512
|
-
)
|
|
52513
|
-
] }) }),
|
|
52514
|
-
/* @__PURE__ */ jsxs("div", { style: { marginBottom: "12px" }, children: [
|
|
52515
|
-
/* @__PURE__ */ jsx(
|
|
52516
52720
|
"div",
|
|
52517
52721
|
{
|
|
52722
|
+
onClick: () => toggleScenario(scenario.id || String(index2)),
|
|
52518
52723
|
style: {
|
|
52519
|
-
|
|
52520
|
-
|
|
52521
|
-
|
|
52522
|
-
|
|
52523
|
-
|
|
52524
|
-
|
|
52724
|
+
padding: "12px",
|
|
52725
|
+
cursor: "pointer",
|
|
52726
|
+
display: "flex",
|
|
52727
|
+
alignItems: "center",
|
|
52728
|
+
gap: "8px",
|
|
52729
|
+
transition: "background 0.2s",
|
|
52730
|
+
background: isExpanded ? theme.colors.backgroundSecondary : "transparent"
|
|
52525
52731
|
},
|
|
52526
|
-
|
|
52527
|
-
|
|
52528
|
-
),
|
|
52529
|
-
renderCondition(scenario.condition)
|
|
52530
|
-
] }),
|
|
52531
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
52532
|
-
/* @__PURE__ */ jsx(
|
|
52533
|
-
"div",
|
|
52534
|
-
{
|
|
52535
|
-
style: {
|
|
52536
|
-
fontSize: "11px",
|
|
52537
|
-
fontWeight: 600,
|
|
52538
|
-
color: theme.colors.textSecondary,
|
|
52539
|
-
marginBottom: "6px",
|
|
52540
|
-
textTransform: "uppercase",
|
|
52541
|
-
letterSpacing: "0.5px"
|
|
52732
|
+
onMouseEnter: (e) => {
|
|
52733
|
+
e.currentTarget.style.background = theme.colors.backgroundSecondary;
|
|
52542
52734
|
},
|
|
52543
|
-
|
|
52735
|
+
onMouseLeave: (e) => {
|
|
52736
|
+
e.currentTarget.style.background = isExpanded ? theme.colors.backgroundSecondary : "transparent";
|
|
52737
|
+
},
|
|
52738
|
+
children: [
|
|
52739
|
+
isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { size: 16, style: { color: theme.colors.textSecondary, flexShrink: 0 } }) : /* @__PURE__ */ jsx(ChevronRight, { size: 16, style: { color: theme.colors.textSecondary, flexShrink: 0 } }),
|
|
52740
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
|
|
52741
|
+
/* @__PURE__ */ jsx("h3", { style: { margin: 0, fontSize: "14px", fontWeight: 600 }, children: scenario.name || scenario.description || scenario.id }),
|
|
52742
|
+
scenario.description && scenario.name && /* @__PURE__ */ jsx("p", { style: { margin: "4px 0 0 0", fontSize: "12px", color: theme.colors.textSecondary }, children: scenario.description })
|
|
52743
|
+
] })
|
|
52744
|
+
]
|
|
52544
52745
|
}
|
|
52545
52746
|
),
|
|
52546
|
-
|
|
52547
|
-
/* @__PURE__ */
|
|
52548
|
-
|
|
52549
|
-
"div",
|
|
52550
|
-
{
|
|
52551
|
-
style: {
|
|
52552
|
-
fontSize: "12px",
|
|
52553
|
-
color: theme.colors.text,
|
|
52554
|
-
fontFamily: theme.fonts.monospace,
|
|
52555
|
-
padding: "6px 8px",
|
|
52556
|
-
background: theme.colors.background,
|
|
52557
|
-
borderRadius: "3px",
|
|
52558
|
-
border: `1px solid ${theme.colors.border}`
|
|
52559
|
-
},
|
|
52560
|
-
children: scenario.template.summary
|
|
52561
|
-
}
|
|
52562
|
-
)
|
|
52563
|
-
] }),
|
|
52564
|
-
scenario.template.steps && scenario.template.steps.length > 0 && /* @__PURE__ */ jsxs("div", { style: { marginBottom: "8px" }, children: [
|
|
52565
|
-
/* @__PURE__ */ jsxs("div", { style: { fontSize: "11px", color: theme.colors.textSecondary, marginBottom: "4px" }, children: [
|
|
52566
|
-
"Steps (",
|
|
52567
|
-
scenario.template.steps.length,
|
|
52568
|
-
"):"
|
|
52569
|
-
] }),
|
|
52570
|
-
/* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: scenario.template.steps.map((step, i) => /* @__PURE__ */ jsxs(
|
|
52571
|
-
"div",
|
|
52572
|
-
{
|
|
52573
|
-
style: {
|
|
52574
|
-
fontSize: "12px",
|
|
52575
|
-
color: theme.colors.textSecondary,
|
|
52576
|
-
fontFamily: theme.fonts.monospace,
|
|
52577
|
-
padding: "4px 8px",
|
|
52578
|
-
background: theme.colors.background,
|
|
52579
|
-
borderRadius: "3px",
|
|
52580
|
-
border: `1px solid ${theme.colors.border}`,
|
|
52581
|
-
display: "flex",
|
|
52582
|
-
gap: "8px"
|
|
52583
|
-
},
|
|
52584
|
-
children: [
|
|
52585
|
-
/* @__PURE__ */ jsxs("span", { style: { color: theme.colors.textSecondary, minWidth: "20px" }, children: [
|
|
52586
|
-
i + 1,
|
|
52587
|
-
"."
|
|
52588
|
-
] }),
|
|
52589
|
-
/* @__PURE__ */ jsx("span", { style: { flex: 1 }, children: step })
|
|
52590
|
-
]
|
|
52591
|
-
},
|
|
52592
|
-
i
|
|
52593
|
-
)) })
|
|
52594
|
-
] }),
|
|
52595
|
-
scenario.template.details && Object.keys(scenario.template.details).length > 0 && /* @__PURE__ */ jsxs("div", { style: { marginBottom: "8px" }, children: [
|
|
52596
|
-
/* @__PURE__ */ jsx("div", { style: { fontSize: "11px", color: theme.colors.textSecondary, marginBottom: "4px" }, children: "Details:" }),
|
|
52597
|
-
/* @__PURE__ */ jsx(
|
|
52598
|
-
"div",
|
|
52599
|
-
{
|
|
52600
|
-
style: {
|
|
52601
|
-
fontSize: "12px",
|
|
52602
|
-
fontFamily: theme.fonts.monospace,
|
|
52603
|
-
padding: "6px 8px",
|
|
52604
|
-
background: theme.colors.background,
|
|
52605
|
-
borderRadius: "3px",
|
|
52606
|
-
border: `1px solid ${theme.colors.border}`
|
|
52607
|
-
},
|
|
52608
|
-
children: Object.entries(scenario.template.details).map(([key, value]) => /* @__PURE__ */ jsxs("div", { style: { marginBottom: "2px" }, children: [
|
|
52609
|
-
/* @__PURE__ */ jsxs("span", { style: { color: theme.colors.textSecondary }, children: [
|
|
52610
|
-
key,
|
|
52611
|
-
":"
|
|
52612
|
-
] }),
|
|
52613
|
-
" ",
|
|
52614
|
-
/* @__PURE__ */ jsx("span", { style: { color: theme.colors.text }, children: String(value) })
|
|
52615
|
-
] }, key))
|
|
52616
|
-
}
|
|
52617
|
-
)
|
|
52618
|
-
] }),
|
|
52619
|
-
(() => {
|
|
52620
|
-
const matchingExecutions = availableExecutions.filter(
|
|
52621
|
-
(exec) => executionScenarioMap[exec.id] === scenario.id
|
|
52622
|
-
);
|
|
52623
|
-
return matchingExecutions.length > 0 ? /* @__PURE__ */ jsxs("div", { children: [
|
|
52624
|
-
/* @__PURE__ */ jsxs(
|
|
52747
|
+
isExpanded && /* @__PURE__ */ jsxs("div", { style: { padding: "12px", borderTop: `1px solid ${theme.colors.border}` }, children: [
|
|
52748
|
+
/* @__PURE__ */ jsxs("div", { style: { marginBottom: "12px" }, children: [
|
|
52749
|
+
/* @__PURE__ */ jsx(
|
|
52625
52750
|
"div",
|
|
52626
52751
|
{
|
|
52627
52752
|
style: {
|
|
52628
52753
|
fontSize: "11px",
|
|
52754
|
+
fontWeight: 600,
|
|
52629
52755
|
color: theme.colors.textSecondary,
|
|
52630
|
-
marginBottom: "
|
|
52631
|
-
|
|
52632
|
-
|
|
52633
|
-
gap: "6px"
|
|
52756
|
+
marginBottom: "6px",
|
|
52757
|
+
textTransform: "uppercase",
|
|
52758
|
+
letterSpacing: "0.5px"
|
|
52634
52759
|
},
|
|
52635
|
-
children:
|
|
52636
|
-
/* @__PURE__ */ jsx(Database, { size: 12 }),
|
|
52637
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
52638
|
-
"Execution Files (",
|
|
52639
|
-
matchingExecutions.length,
|
|
52640
|
-
")"
|
|
52641
|
-
] })
|
|
52642
|
-
]
|
|
52760
|
+
children: "Condition"
|
|
52643
52761
|
}
|
|
52644
52762
|
),
|
|
52645
|
-
|
|
52646
|
-
|
|
52763
|
+
renderCondition(scenario.condition)
|
|
52764
|
+
] }),
|
|
52765
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
52766
|
+
/* @__PURE__ */ jsx(
|
|
52767
|
+
"div",
|
|
52647
52768
|
{
|
|
52648
|
-
onClick: () => onExecutionSelect == null ? void 0 : onExecutionSelect(exec.id),
|
|
52649
52769
|
style: {
|
|
52650
|
-
fontSize: "
|
|
52651
|
-
|
|
52652
|
-
background: theme.colors.background,
|
|
52653
|
-
border: `1px solid ${theme.colors.border}`,
|
|
52654
|
-
borderRadius: "3px",
|
|
52770
|
+
fontSize: "11px",
|
|
52771
|
+
fontWeight: 600,
|
|
52655
52772
|
color: theme.colors.textSecondary,
|
|
52656
|
-
|
|
52657
|
-
|
|
52658
|
-
|
|
52659
|
-
alignItems: "center",
|
|
52660
|
-
justifyContent: "space-between",
|
|
52661
|
-
transition: "all 0.2s",
|
|
52662
|
-
textAlign: "left"
|
|
52663
|
-
},
|
|
52664
|
-
onMouseEnter: (e) => {
|
|
52665
|
-
e.currentTarget.style.background = theme.colors.muted;
|
|
52666
|
-
e.currentTarget.style.borderColor = theme.colors.accent;
|
|
52773
|
+
marginBottom: "6px",
|
|
52774
|
+
textTransform: "uppercase",
|
|
52775
|
+
letterSpacing: "0.5px"
|
|
52667
52776
|
},
|
|
52668
|
-
|
|
52669
|
-
|
|
52670
|
-
|
|
52777
|
+
children: "Template"
|
|
52778
|
+
}
|
|
52779
|
+
),
|
|
52780
|
+
scenario.template.introduction && /* @__PURE__ */ jsxs("div", { style: { marginBottom: "8px" }, children: [
|
|
52781
|
+
/* @__PURE__ */ jsx("div", { style: { fontSize: "11px", color: theme.colors.textSecondary, marginBottom: "2px" }, children: "Introduction:" }),
|
|
52782
|
+
/* @__PURE__ */ jsx(
|
|
52783
|
+
"div",
|
|
52784
|
+
{
|
|
52785
|
+
style: {
|
|
52786
|
+
fontSize: "12px",
|
|
52787
|
+
color: theme.colors.text,
|
|
52788
|
+
fontFamily: theme.fonts.monospace,
|
|
52789
|
+
padding: "6px 8px",
|
|
52790
|
+
background: theme.colors.background,
|
|
52791
|
+
borderRadius: "3px",
|
|
52792
|
+
border: `1px solid ${theme.colors.border}`
|
|
52793
|
+
},
|
|
52794
|
+
children: renderTemplateText(scenario.template.introduction)
|
|
52795
|
+
}
|
|
52796
|
+
)
|
|
52797
|
+
] }),
|
|
52798
|
+
scenario.template.summary && /* @__PURE__ */ jsxs("div", { style: { marginBottom: "8px" }, children: [
|
|
52799
|
+
/* @__PURE__ */ jsx("div", { style: { fontSize: "11px", color: theme.colors.textSecondary, marginBottom: "2px" }, children: "Summary (closing):" }),
|
|
52800
|
+
/* @__PURE__ */ jsx(
|
|
52801
|
+
"div",
|
|
52802
|
+
{
|
|
52803
|
+
style: {
|
|
52804
|
+
fontSize: "12px",
|
|
52805
|
+
color: theme.colors.text,
|
|
52806
|
+
fontFamily: theme.fonts.monospace,
|
|
52807
|
+
padding: "6px 8px",
|
|
52808
|
+
background: theme.colors.background,
|
|
52809
|
+
borderRadius: "3px",
|
|
52810
|
+
border: `1px solid ${theme.colors.border}`
|
|
52811
|
+
},
|
|
52812
|
+
children: renderTemplateText(scenario.template.summary)
|
|
52813
|
+
}
|
|
52814
|
+
)
|
|
52815
|
+
] }),
|
|
52816
|
+
scenario.template.flow && scenario.template.flow.length > 0 && /* @__PURE__ */ jsxs("div", { style: { marginBottom: "8px" }, children: [
|
|
52817
|
+
/* @__PURE__ */ jsxs("div", { style: { fontSize: "11px", color: theme.colors.textSecondary, marginBottom: "4px" }, children: [
|
|
52818
|
+
"Flow (",
|
|
52819
|
+
scenario.template.flow.length,
|
|
52820
|
+
"):"
|
|
52821
|
+
] }),
|
|
52822
|
+
/* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: scenario.template.flow.map((step, i) => /* @__PURE__ */ jsxs(
|
|
52823
|
+
"div",
|
|
52824
|
+
{
|
|
52825
|
+
style: {
|
|
52826
|
+
fontSize: "12px",
|
|
52827
|
+
color: theme.colors.textSecondary,
|
|
52828
|
+
fontFamily: theme.fonts.monospace,
|
|
52829
|
+
padding: "4px 8px",
|
|
52830
|
+
background: theme.colors.background,
|
|
52831
|
+
borderRadius: "3px",
|
|
52832
|
+
border: `1px solid ${theme.colors.border}`,
|
|
52833
|
+
display: "flex",
|
|
52834
|
+
gap: "8px"
|
|
52835
|
+
},
|
|
52836
|
+
children: [
|
|
52837
|
+
/* @__PURE__ */ jsxs("span", { style: { color: theme.colors.textSecondary, minWidth: "20px" }, children: [
|
|
52838
|
+
i + 1,
|
|
52839
|
+
"."
|
|
52840
|
+
] }),
|
|
52841
|
+
/* @__PURE__ */ jsx("span", { style: { flex: 1 }, children: renderTemplateText(step) })
|
|
52842
|
+
]
|
|
52671
52843
|
},
|
|
52672
|
-
|
|
52673
|
-
|
|
52674
|
-
|
|
52675
|
-
|
|
52676
|
-
},
|
|
52677
|
-
|
|
52678
|
-
|
|
52679
|
-
|
|
52680
|
-
|
|
52681
|
-
|
|
52682
|
-
|
|
52683
|
-
|
|
52684
|
-
|
|
52685
|
-
|
|
52844
|
+
i
|
|
52845
|
+
)) })
|
|
52846
|
+
] }),
|
|
52847
|
+
scenario.template.details && Object.keys(scenario.template.details).length > 0 && /* @__PURE__ */ jsxs("div", { style: { marginBottom: "8px" }, children: [
|
|
52848
|
+
/* @__PURE__ */ jsx("div", { style: { fontSize: "11px", color: theme.colors.textSecondary, marginBottom: "4px" }, children: "Details:" }),
|
|
52849
|
+
/* @__PURE__ */ jsx(
|
|
52850
|
+
"div",
|
|
52851
|
+
{
|
|
52852
|
+
style: {
|
|
52853
|
+
fontSize: "12px",
|
|
52854
|
+
fontFamily: theme.fonts.monospace,
|
|
52855
|
+
padding: "6px 8px",
|
|
52856
|
+
background: theme.colors.background,
|
|
52857
|
+
borderRadius: "3px",
|
|
52858
|
+
border: `1px solid ${theme.colors.border}`
|
|
52859
|
+
},
|
|
52860
|
+
children: Object.entries(scenario.template.details).map(([key, value]) => /* @__PURE__ */ jsxs("div", { style: { marginBottom: "2px" }, children: [
|
|
52861
|
+
/* @__PURE__ */ jsxs("span", { style: { color: theme.colors.textSecondary }, children: [
|
|
52862
|
+
key,
|
|
52863
|
+
":"
|
|
52864
|
+
] }),
|
|
52865
|
+
" ",
|
|
52866
|
+
/* @__PURE__ */ jsx("span", { style: { color: theme.colors.text }, children: String(value) })
|
|
52867
|
+
] }, key))
|
|
52868
|
+
}
|
|
52869
|
+
)
|
|
52870
|
+
] }),
|
|
52871
|
+
(() => {
|
|
52872
|
+
const matchingExecutions = availableExecutions.filter(
|
|
52873
|
+
(exec) => executionScenarioMap[exec.id] === scenario.id
|
|
52874
|
+
);
|
|
52875
|
+
return matchingExecutions.length > 0 ? /* @__PURE__ */ jsxs("div", { children: [
|
|
52876
|
+
/* @__PURE__ */ jsxs(
|
|
52877
|
+
"div",
|
|
52878
|
+
{
|
|
52879
|
+
style: {
|
|
52880
|
+
fontSize: "11px",
|
|
52881
|
+
color: theme.colors.textSecondary,
|
|
52882
|
+
marginBottom: "4px",
|
|
52883
|
+
display: "flex",
|
|
52884
|
+
alignItems: "center",
|
|
52885
|
+
gap: "6px"
|
|
52886
|
+
},
|
|
52887
|
+
children: [
|
|
52888
|
+
/* @__PURE__ */ jsx(Database, { size: 12 }),
|
|
52889
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
52890
|
+
"Execution Files (",
|
|
52891
|
+
matchingExecutions.length,
|
|
52892
|
+
")"
|
|
52893
|
+
] })
|
|
52894
|
+
]
|
|
52895
|
+
}
|
|
52896
|
+
),
|
|
52897
|
+
/* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: matchingExecutions.map((exec) => /* @__PURE__ */ jsxs(
|
|
52898
|
+
"button",
|
|
52899
|
+
{
|
|
52900
|
+
onClick: () => onExecutionSelect == null ? void 0 : onExecutionSelect(exec.id),
|
|
52901
|
+
style: {
|
|
52902
|
+
fontSize: "12px",
|
|
52903
|
+
padding: "6px 8px",
|
|
52904
|
+
background: theme.colors.background,
|
|
52905
|
+
border: `1px solid ${theme.colors.border}`,
|
|
52906
|
+
borderRadius: "3px",
|
|
52907
|
+
color: theme.colors.textSecondary,
|
|
52908
|
+
fontFamily: theme.fonts.monospace,
|
|
52909
|
+
cursor: "pointer",
|
|
52910
|
+
display: "flex",
|
|
52911
|
+
alignItems: "center",
|
|
52912
|
+
justifyContent: "space-between",
|
|
52913
|
+
transition: "all 0.2s",
|
|
52914
|
+
textAlign: "left"
|
|
52915
|
+
},
|
|
52916
|
+
onMouseEnter: (e) => {
|
|
52917
|
+
e.currentTarget.style.background = theme.colors.muted;
|
|
52918
|
+
e.currentTarget.style.borderColor = theme.colors.accent;
|
|
52919
|
+
},
|
|
52920
|
+
onMouseLeave: (e) => {
|
|
52921
|
+
e.currentTarget.style.background = theme.colors.background;
|
|
52922
|
+
e.currentTarget.style.borderColor = theme.colors.border;
|
|
52923
|
+
},
|
|
52924
|
+
children: [
|
|
52925
|
+
/* @__PURE__ */ jsx("span", { children: exec.name }),
|
|
52926
|
+
/* @__PURE__ */ jsx(ChevronRight, { size: 14, style: { color: theme.colors.accent, flexShrink: 0 } })
|
|
52927
|
+
]
|
|
52928
|
+
},
|
|
52929
|
+
exec.id
|
|
52930
|
+
)) })
|
|
52931
|
+
] }) : null;
|
|
52932
|
+
})()
|
|
52933
|
+
] })
|
|
52934
|
+
] })
|
|
52935
|
+
]
|
|
52936
|
+
},
|
|
52937
|
+
scenario.id || index2
|
|
52938
|
+
);
|
|
52939
|
+
})
|
|
52686
52940
|
] })
|
|
52687
52941
|
]
|
|
52688
52942
|
}
|
|
52689
52943
|
);
|
|
52690
52944
|
};
|
|
52691
|
-
const
|
|
52945
|
+
const CanvasDetailPanel = ({
|
|
52692
52946
|
context,
|
|
52693
52947
|
actions,
|
|
52694
|
-
events
|
|
52948
|
+
events,
|
|
52949
|
+
selectedCanvasId: selectedCanvasIdProp,
|
|
52950
|
+
canvasPath: canvasPathProp,
|
|
52951
|
+
canvasName: canvasNameProp
|
|
52695
52952
|
}) => {
|
|
52696
52953
|
var _a, _b;
|
|
52697
52954
|
const { theme } = useTheme();
|
|
@@ -52699,13 +52956,12 @@ const ExecutionViewerPanel = ({
|
|
|
52699
52956
|
canvas: null,
|
|
52700
52957
|
execution: null,
|
|
52701
52958
|
metadata: null,
|
|
52702
|
-
loading:
|
|
52959
|
+
loading: false,
|
|
52703
52960
|
error: null,
|
|
52704
|
-
availableCanvases: [],
|
|
52705
52961
|
selectedCanvasId: null,
|
|
52962
|
+
canvasName: null,
|
|
52706
52963
|
availableExecutions: [],
|
|
52707
52964
|
selectedExecutionId: null,
|
|
52708
|
-
showCanvasSelector: false,
|
|
52709
52965
|
showNarrativeSelector: false,
|
|
52710
52966
|
showExecutionSelector: false,
|
|
52711
52967
|
showHelpModal: false,
|
|
@@ -52726,12 +52982,10 @@ const ExecutionViewerPanel = ({
|
|
|
52726
52982
|
contextRef.current = context;
|
|
52727
52983
|
actionsRef.current = actions;
|
|
52728
52984
|
eventsRef.current = events;
|
|
52729
|
-
const selectedCanvasIdRef = useRef(null);
|
|
52730
|
-
selectedCanvasIdRef.current = state.selectedCanvasId;
|
|
52731
52985
|
const playbackTimerRef = useRef(null);
|
|
52732
52986
|
const eventNodeMapRef = useRef(/* @__PURE__ */ new Map());
|
|
52733
|
-
const loadCanvas = useCallback(async (canvasId) => {
|
|
52734
|
-
setState((prev) => ({ ...prev, loading:
|
|
52987
|
+
const loadCanvas = useCallback(async (canvasId, canvasPath) => {
|
|
52988
|
+
setState((prev) => ({ ...prev, loading: true, error: null }));
|
|
52735
52989
|
try {
|
|
52736
52990
|
const ctx = contextRef.current;
|
|
52737
52991
|
const acts = actionsRef.current;
|
|
@@ -52751,46 +53005,15 @@ const ExecutionViewerPanel = ({
|
|
|
52751
53005
|
metadata: null,
|
|
52752
53006
|
loading: false,
|
|
52753
53007
|
error: null,
|
|
52754
|
-
availableCanvases: [],
|
|
52755
53008
|
selectedCanvasId: null,
|
|
53009
|
+
canvasName: null,
|
|
52756
53010
|
availableExecutions: [],
|
|
52757
53011
|
selectedExecutionId: null
|
|
52758
53012
|
}));
|
|
52759
53013
|
return;
|
|
52760
53014
|
}
|
|
52761
|
-
const availableCanvases = await ExecutionLoader.findCanvasFiles(fileTreeData.allFiles);
|
|
52762
53015
|
const executionFiles = await ExecutionLoader.findExecutionFiles(fileTreeData.allFiles);
|
|
52763
53016
|
const availableNarratives = NarrativeLoader.findNarrativeFiles(fileTreeData.allFiles);
|
|
52764
|
-
if (availableCanvases.length === 0) {
|
|
52765
|
-
setState((prev) => ({
|
|
52766
|
-
...prev,
|
|
52767
|
-
canvas: null,
|
|
52768
|
-
execution: null,
|
|
52769
|
-
metadata: null,
|
|
52770
|
-
loading: false,
|
|
52771
|
-
error: null,
|
|
52772
|
-
availableCanvases: [],
|
|
52773
|
-
selectedCanvasId: null,
|
|
52774
|
-
availableExecutions: [],
|
|
52775
|
-
selectedExecutionId: null,
|
|
52776
|
-
narrativeTemplate: null,
|
|
52777
|
-
availableNarratives: []
|
|
52778
|
-
}));
|
|
52779
|
-
return;
|
|
52780
|
-
}
|
|
52781
|
-
let selectedCanvas2;
|
|
52782
|
-
if (canvasId) {
|
|
52783
|
-
const found = availableCanvases.find((c) => c.id === canvasId);
|
|
52784
|
-
if (!found) {
|
|
52785
|
-
throw new Error(`Canvas with ID '${canvasId}' not found`);
|
|
52786
|
-
}
|
|
52787
|
-
selectedCanvas2 = found;
|
|
52788
|
-
} else if (selectedCanvasIdRef.current) {
|
|
52789
|
-
const found = availableCanvases.find((c) => c.id === selectedCanvasIdRef.current);
|
|
52790
|
-
selectedCanvas2 = found || availableCanvases[0];
|
|
52791
|
-
} else {
|
|
52792
|
-
selectedCanvas2 = availableCanvases[0];
|
|
52793
|
-
}
|
|
52794
53017
|
const readFile = acts.readFile;
|
|
52795
53018
|
if (!readFile) {
|
|
52796
53019
|
throw new Error("readFile action not available");
|
|
@@ -52799,7 +53022,7 @@ const ExecutionViewerPanel = ({
|
|
|
52799
53022
|
if (!repositoryPath) {
|
|
52800
53023
|
throw new Error("Repository path not available");
|
|
52801
53024
|
}
|
|
52802
|
-
const fullCanvasPath = `${repositoryPath}/${
|
|
53025
|
+
const fullCanvasPath = `${repositoryPath}/${canvasPath}`;
|
|
52803
53026
|
const canvasContent = await readFile(fullCanvasPath);
|
|
52804
53027
|
if (!canvasContent || typeof canvasContent !== "string") {
|
|
52805
53028
|
throw new Error("Failed to read canvas file");
|
|
@@ -52809,7 +53032,7 @@ const ExecutionViewerPanel = ({
|
|
|
52809
53032
|
let narrativeTemplate = null;
|
|
52810
53033
|
let selectedNarrativeId = null;
|
|
52811
53034
|
const matchingNarrative = availableNarratives.find(
|
|
52812
|
-
(n) => n.canvasPath ===
|
|
53035
|
+
(n) => n.canvasPath === canvasPath || n.path.replace(/\.narrative\.json$/, ".otel.canvas") === canvasPath
|
|
52813
53036
|
);
|
|
52814
53037
|
const narrativeToLoad = matchingNarrative || (availableNarratives.length > 0 ? availableNarratives[0] : null);
|
|
52815
53038
|
if (narrativeToLoad) {
|
|
@@ -52844,6 +53067,7 @@ const ExecutionViewerPanel = ({
|
|
|
52844
53067
|
}
|
|
52845
53068
|
}
|
|
52846
53069
|
}
|
|
53070
|
+
const canvasName = canvasId.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
52847
53071
|
setState((prev) => ({
|
|
52848
53072
|
...prev,
|
|
52849
53073
|
canvas,
|
|
@@ -52851,8 +53075,8 @@ const ExecutionViewerPanel = ({
|
|
|
52851
53075
|
metadata: null,
|
|
52852
53076
|
loading: false,
|
|
52853
53077
|
error: null,
|
|
52854
|
-
|
|
52855
|
-
|
|
53078
|
+
selectedCanvasId: canvasId,
|
|
53079
|
+
canvasName,
|
|
52856
53080
|
availableExecutions: executionFiles,
|
|
52857
53081
|
selectedExecutionId: null,
|
|
52858
53082
|
currentSpanIndex: 0,
|
|
@@ -52874,16 +53098,24 @@ const ExecutionViewerPanel = ({
|
|
|
52874
53098
|
}
|
|
52875
53099
|
}, []);
|
|
52876
53100
|
useEffect(() => {
|
|
52877
|
-
|
|
52878
|
-
|
|
53101
|
+
if (selectedCanvasIdProp && canvasPathProp) {
|
|
53102
|
+
console.log("[CanvasDetailPanel] Loading canvas from props:", selectedCanvasIdProp, canvasPathProp);
|
|
53103
|
+
loadCanvas(selectedCanvasIdProp, canvasPathProp);
|
|
53104
|
+
if (canvasNameProp) {
|
|
53105
|
+
setState((prev) => ({ ...prev, canvasName: canvasNameProp }));
|
|
53106
|
+
}
|
|
53107
|
+
}
|
|
53108
|
+
}, [selectedCanvasIdProp, canvasPathProp, canvasNameProp, loadCanvas]);
|
|
52879
53109
|
useEffect(() => {
|
|
53110
|
+
if (selectedCanvasIdProp && canvasPathProp) {
|
|
53111
|
+
return;
|
|
53112
|
+
}
|
|
52880
53113
|
if (!events) return;
|
|
52881
53114
|
const handleEvent = (event) => {
|
|
52882
|
-
|
|
52883
|
-
|
|
52884
|
-
|
|
52885
|
-
|
|
52886
|
-
loadCanvas(canvasId);
|
|
53115
|
+
if (event.type === "custom") {
|
|
53116
|
+
const payload = event.payload;
|
|
53117
|
+
if ((payload == null ? void 0 : payload.action) === "selectCanvas" && (payload == null ? void 0 : payload.canvasId) && (payload == null ? void 0 : payload.canvas)) {
|
|
53118
|
+
loadCanvas(payload.canvasId, payload.canvas.path);
|
|
52887
53119
|
}
|
|
52888
53120
|
}
|
|
52889
53121
|
};
|
|
@@ -52891,7 +53123,7 @@ const ExecutionViewerPanel = ({
|
|
|
52891
53123
|
return () => {
|
|
52892
53124
|
events.off("custom", handleEvent);
|
|
52893
53125
|
};
|
|
52894
|
-
}, [events, loadCanvas]);
|
|
53126
|
+
}, [events, loadCanvas, selectedCanvasIdProp, canvasPathProp]);
|
|
52895
53127
|
useCallback(() => {
|
|
52896
53128
|
setState((prev) => ({ ...prev, isPlaying: !prev.isPlaying }));
|
|
52897
53129
|
}, []);
|
|
@@ -53009,7 +53241,7 @@ const ExecutionViewerPanel = ({
|
|
|
53009
53241
|
}
|
|
53010
53242
|
};
|
|
53011
53243
|
}, [state.isPlaying, state.execution]);
|
|
53012
|
-
if (!state.loading && state.
|
|
53244
|
+
if (!state.loading && !state.canvas) {
|
|
53013
53245
|
return /* @__PURE__ */ jsx(
|
|
53014
53246
|
"div",
|
|
53015
53247
|
{
|
|
@@ -53023,40 +53255,8 @@ const ExecutionViewerPanel = ({
|
|
|
53023
53255
|
},
|
|
53024
53256
|
children: /* @__PURE__ */ jsxs("div", { style: { textAlign: "center", maxWidth: "600px", padding: "20px" }, children: [
|
|
53025
53257
|
/* @__PURE__ */ jsx(Activity, { size: 48, style: { margin: "0 auto 20px", opacity: 0.3 } }),
|
|
53026
|
-
/* @__PURE__ */ jsx("h2", { style: { margin: "0 0 10px 0", fontSize: "18px", fontWeight: 600 }, children: "No Canvas
|
|
53027
|
-
/* @__PURE__ */
|
|
53028
|
-
"Execution artifacts should be saved to ",
|
|
53029
|
-
/* @__PURE__ */ jsx("code", { children: "__executions__/*.otel.json" }),
|
|
53030
|
-
" (or *.spans.json, *.execution.json, *.events.json) or",
|
|
53031
|
-
" ",
|
|
53032
|
-
/* @__PURE__ */ jsx("code", { children: "packages/*/__executions__/" })
|
|
53033
|
-
] }),
|
|
53034
|
-
/* @__PURE__ */ jsxs(
|
|
53035
|
-
"div",
|
|
53036
|
-
{
|
|
53037
|
-
style: {
|
|
53038
|
-
background: "#1e1e1e",
|
|
53039
|
-
padding: "12px",
|
|
53040
|
-
borderRadius: "4px",
|
|
53041
|
-
fontFamily: "monospace",
|
|
53042
|
-
fontSize: "12px",
|
|
53043
|
-
textAlign: "left",
|
|
53044
|
-
color: "#d4d4d4"
|
|
53045
|
-
},
|
|
53046
|
-
children: [
|
|
53047
|
-
/* @__PURE__ */ jsx("div", { children: "# Export execution data from tests" }),
|
|
53048
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
53049
|
-
"exportExecutionArtifact(canvas, spans, ",
|
|
53050
|
-
"{"
|
|
53051
|
-
] }),
|
|
53052
|
-
/* @__PURE__ */ jsx("div", { children: " outputPath: '__executions__/my-test.otel.json'" }),
|
|
53053
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
53054
|
-
"}",
|
|
53055
|
-
");"
|
|
53056
|
-
] })
|
|
53057
|
-
]
|
|
53058
|
-
}
|
|
53059
|
-
)
|
|
53258
|
+
/* @__PURE__ */ jsx("h2", { style: { margin: "0 0 10px 0", fontSize: "18px", fontWeight: 600 }, children: "No Canvas Selected" }),
|
|
53259
|
+
/* @__PURE__ */ jsx("p", { style: { margin: "0 0 20px 0", color: theme.colors.textSecondary, lineHeight: 1.5 }, children: "Select a canvas from the Canvas List panel to view execution artifacts and narratives." })
|
|
53060
53260
|
] })
|
|
53061
53261
|
}
|
|
53062
53262
|
);
|
|
@@ -53096,9 +53296,6 @@ const ExecutionViewerPanel = ({
|
|
|
53096
53296
|
}
|
|
53097
53297
|
);
|
|
53098
53298
|
}
|
|
53099
|
-
const selectedCanvas = state.availableCanvases.find(
|
|
53100
|
-
(c) => c.id === state.selectedCanvasId
|
|
53101
|
-
);
|
|
53102
53299
|
return /* @__PURE__ */ jsxs(
|
|
53103
53300
|
"div",
|
|
53104
53301
|
{
|
|
@@ -53122,91 +53319,7 @@ const ExecutionViewerPanel = ({
|
|
|
53122
53319
|
gap: "12px"
|
|
53123
53320
|
},
|
|
53124
53321
|
children: [
|
|
53125
|
-
state.
|
|
53126
|
-
/* @__PURE__ */ jsxs(
|
|
53127
|
-
"button",
|
|
53128
|
-
{
|
|
53129
|
-
onClick: () => setState((prev) => ({ ...prev, showCanvasSelector: !prev.showCanvasSelector })),
|
|
53130
|
-
style: {
|
|
53131
|
-
display: "flex",
|
|
53132
|
-
alignItems: "center",
|
|
53133
|
-
gap: "8px",
|
|
53134
|
-
padding: "6px 12px",
|
|
53135
|
-
background: "#2a2a2a",
|
|
53136
|
-
border: "1px solid #3a3a3a",
|
|
53137
|
-
borderRadius: "4px",
|
|
53138
|
-
color: "#fff",
|
|
53139
|
-
cursor: "pointer",
|
|
53140
|
-
fontSize: "13px"
|
|
53141
|
-
},
|
|
53142
|
-
children: [
|
|
53143
|
-
/* @__PURE__ */ jsx(Activity, { size: 16 }),
|
|
53144
|
-
/* @__PURE__ */ jsx("span", { children: (selectedCanvas == null ? void 0 : selectedCanvas.name) || "Select Canvas" }),
|
|
53145
|
-
/* @__PURE__ */ jsx(ChevronDown, { size: 16 })
|
|
53146
|
-
]
|
|
53147
|
-
}
|
|
53148
|
-
),
|
|
53149
|
-
state.showCanvasSelector && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
53150
|
-
/* @__PURE__ */ jsx(
|
|
53151
|
-
"div",
|
|
53152
|
-
{
|
|
53153
|
-
style: {
|
|
53154
|
-
position: "fixed",
|
|
53155
|
-
inset: 0,
|
|
53156
|
-
zIndex: 999
|
|
53157
|
-
},
|
|
53158
|
-
onClick: () => setState((prev) => ({ ...prev, showCanvasSelector: false }))
|
|
53159
|
-
}
|
|
53160
|
-
),
|
|
53161
|
-
/* @__PURE__ */ jsx(
|
|
53162
|
-
"div",
|
|
53163
|
-
{
|
|
53164
|
-
style: {
|
|
53165
|
-
position: "absolute",
|
|
53166
|
-
top: "100%",
|
|
53167
|
-
left: 0,
|
|
53168
|
-
marginTop: "4px",
|
|
53169
|
-
minWidth: "300px",
|
|
53170
|
-
maxHeight: "400px",
|
|
53171
|
-
overflowY: "auto",
|
|
53172
|
-
background: "#2a2a2a",
|
|
53173
|
-
border: "1px solid #3a3a3a",
|
|
53174
|
-
borderRadius: "4px",
|
|
53175
|
-
boxShadow: "0 4px 12px rgba(0,0,0,0.3)",
|
|
53176
|
-
zIndex: 1e3
|
|
53177
|
-
},
|
|
53178
|
-
children: state.availableCanvases.map((canvas) => /* @__PURE__ */ jsxs(
|
|
53179
|
-
"button",
|
|
53180
|
-
{
|
|
53181
|
-
onClick: () => {
|
|
53182
|
-
loadCanvas(canvas.id);
|
|
53183
|
-
setState((prev) => ({ ...prev, showCanvasSelector: false }));
|
|
53184
|
-
},
|
|
53185
|
-
style: {
|
|
53186
|
-
width: "100%",
|
|
53187
|
-
padding: "10px 16px",
|
|
53188
|
-
background: canvas.id === state.selectedCanvasId ? "#3b82f6" : "transparent",
|
|
53189
|
-
border: "none",
|
|
53190
|
-
borderBottom: "1px solid #3a3a3a",
|
|
53191
|
-
color: "#fff",
|
|
53192
|
-
textAlign: "left",
|
|
53193
|
-
cursor: "pointer",
|
|
53194
|
-
fontSize: "13px",
|
|
53195
|
-
display: "flex",
|
|
53196
|
-
alignItems: "center",
|
|
53197
|
-
gap: "8px"
|
|
53198
|
-
},
|
|
53199
|
-
children: [
|
|
53200
|
-
/* @__PURE__ */ jsx(Activity, { size: 14 }),
|
|
53201
|
-
/* @__PURE__ */ jsx("span", { style: { flex: 1 }, children: canvas.name })
|
|
53202
|
-
]
|
|
53203
|
-
},
|
|
53204
|
-
canvas.id
|
|
53205
|
-
))
|
|
53206
|
-
}
|
|
53207
|
-
)
|
|
53208
|
-
] })
|
|
53209
|
-
] }),
|
|
53322
|
+
state.canvasName && /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx("span", { style: { fontSize: "13px", fontWeight: 600, color: "#fff" }, children: state.canvasName }) }),
|
|
53210
53323
|
state.availableNarratives.length > 0 && /* @__PURE__ */ jsxs("div", { style: { position: "relative" }, children: [
|
|
53211
53324
|
/* @__PURE__ */ jsxs(
|
|
53212
53325
|
"button",
|
|
@@ -53225,7 +53338,6 @@ const ExecutionViewerPanel = ({
|
|
|
53225
53338
|
fontSize: "13px"
|
|
53226
53339
|
},
|
|
53227
53340
|
children: [
|
|
53228
|
-
/* @__PURE__ */ jsx(FileText, { size: 16 }),
|
|
53229
53341
|
/* @__PURE__ */ jsx("span", { children: state.selectedNarrativeId ? ((_a = state.availableNarratives.find((n) => n.id === state.selectedNarrativeId)) == null ? void 0 : _a.name) || "Select Narrative" : "Select Narrative" }),
|
|
53230
53342
|
/* @__PURE__ */ jsx(ChevronDown, { size: 16 })
|
|
53231
53343
|
]
|
|
@@ -53260,7 +53372,7 @@ const ExecutionViewerPanel = ({
|
|
|
53260
53372
|
boxShadow: "0 4px 12px rgba(0,0,0,0.3)",
|
|
53261
53373
|
zIndex: 1e3
|
|
53262
53374
|
},
|
|
53263
|
-
children: state.availableNarratives.map((narrative) => /* @__PURE__ */
|
|
53375
|
+
children: state.availableNarratives.map((narrative) => /* @__PURE__ */ jsx(
|
|
53264
53376
|
"button",
|
|
53265
53377
|
{
|
|
53266
53378
|
onClick: async () => {
|
|
@@ -53297,15 +53409,9 @@ const ExecutionViewerPanel = ({
|
|
|
53297
53409
|
color: "#fff",
|
|
53298
53410
|
textAlign: "left",
|
|
53299
53411
|
cursor: "pointer",
|
|
53300
|
-
fontSize: "13px"
|
|
53301
|
-
display: "flex",
|
|
53302
|
-
alignItems: "center",
|
|
53303
|
-
gap: "8px"
|
|
53412
|
+
fontSize: "13px"
|
|
53304
53413
|
},
|
|
53305
|
-
children:
|
|
53306
|
-
/* @__PURE__ */ jsx(FileText, { size: 14 }),
|
|
53307
|
-
/* @__PURE__ */ jsx("span", { style: { flex: 1 }, children: narrative.name })
|
|
53308
|
-
]
|
|
53414
|
+
children: narrative.name
|
|
53309
53415
|
},
|
|
53310
53416
|
narrative.id
|
|
53311
53417
|
))
|
|
@@ -53331,7 +53437,6 @@ const ExecutionViewerPanel = ({
|
|
|
53331
53437
|
fontSize: "13px"
|
|
53332
53438
|
},
|
|
53333
53439
|
children: [
|
|
53334
|
-
/* @__PURE__ */ jsx(Database, { size: 16 }),
|
|
53335
53440
|
/* @__PURE__ */ jsx("span", { children: state.selectedExecutionId ? ((_b = state.availableExecutions.find((e) => e.id === state.selectedExecutionId)) == null ? void 0 : _b.name) || "Select Execution" : `Execution (${state.availableExecutions.length})` }),
|
|
53336
53441
|
/* @__PURE__ */ jsx(ChevronDown, { size: 16 })
|
|
53337
53442
|
]
|
|
@@ -53398,7 +53503,7 @@ const ExecutionViewerPanel = ({
|
|
|
53398
53503
|
children: "None (show scenario mapping)"
|
|
53399
53504
|
}
|
|
53400
53505
|
),
|
|
53401
|
-
state.availableExecutions.map((execution) => /* @__PURE__ */
|
|
53506
|
+
state.availableExecutions.map((execution) => /* @__PURE__ */ jsx(
|
|
53402
53507
|
"button",
|
|
53403
53508
|
{
|
|
53404
53509
|
onClick: async () => {
|
|
@@ -53440,15 +53545,9 @@ const ExecutionViewerPanel = ({
|
|
|
53440
53545
|
color: "#fff",
|
|
53441
53546
|
textAlign: "left",
|
|
53442
53547
|
cursor: "pointer",
|
|
53443
|
-
fontSize: "13px"
|
|
53444
|
-
display: "flex",
|
|
53445
|
-
alignItems: "center",
|
|
53446
|
-
gap: "8px"
|
|
53548
|
+
fontSize: "13px"
|
|
53447
53549
|
},
|
|
53448
|
-
children:
|
|
53449
|
-
/* @__PURE__ */ jsx(Database, { size: 14 }),
|
|
53450
|
-
/* @__PURE__ */ jsx("span", { style: { flex: 1 }, children: execution.name })
|
|
53451
|
-
]
|
|
53550
|
+
children: execution.name
|
|
53452
53551
|
},
|
|
53453
53552
|
execution.id
|
|
53454
53553
|
))
|
|
@@ -53634,7 +53733,7 @@ const ExecutionViewerPanel = ({
|
|
|
53634
53733
|
},
|
|
53635
53734
|
children: /* @__PURE__ */ jsxs("div", { style: { textAlign: "center" }, children: [
|
|
53636
53735
|
/* @__PURE__ */ jsx("p", { children: "Canvas not loaded" }),
|
|
53637
|
-
/* @__PURE__ */ jsx("p", { style: { fontSize: "12px", marginTop: "8px" }, children:
|
|
53736
|
+
/* @__PURE__ */ jsx("p", { style: { fontSize: "12px", marginTop: "8px" }, children: state.canvasName || "No canvas selected" })
|
|
53638
53737
|
] })
|
|
53639
53738
|
}
|
|
53640
53739
|
)
|
|
@@ -53703,6 +53802,445 @@ const ExecutionViewerPanel = ({
|
|
|
53703
53802
|
}
|
|
53704
53803
|
);
|
|
53705
53804
|
};
|
|
53805
|
+
const EMPTY_CANVAS_ARRAY = [];
|
|
53806
|
+
const useCanvasData = ({
|
|
53807
|
+
context
|
|
53808
|
+
}) => {
|
|
53809
|
+
const [canvases, setCanvases] = useState(EMPTY_CANVAS_ARRAY);
|
|
53810
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
53811
|
+
const [error, setError] = useState(null);
|
|
53812
|
+
const fileTreeSlice = context.getSlice("fileTree");
|
|
53813
|
+
const fileTreeData = fileTreeSlice == null ? void 0 : fileTreeSlice.data;
|
|
53814
|
+
const fileTreeSha = fileTreeData == null ? void 0 : fileTreeData.sha;
|
|
53815
|
+
const lastLoadedSha = useRef(void 0);
|
|
53816
|
+
const loadCanvases = useCallback(async () => {
|
|
53817
|
+
if (fileTreeSha === lastLoadedSha.current) {
|
|
53818
|
+
console.log("[useCanvasData] Skipping reload - data unchanged (SHA:", fileTreeSha, ")");
|
|
53819
|
+
return;
|
|
53820
|
+
}
|
|
53821
|
+
console.log("[useCanvasData] Loading canvases - SHA changed:", fileTreeSha !== lastLoadedSha.current);
|
|
53822
|
+
setIsLoading(true);
|
|
53823
|
+
setError(null);
|
|
53824
|
+
try {
|
|
53825
|
+
if (!(fileTreeData == null ? void 0 : fileTreeData.allFiles)) {
|
|
53826
|
+
setCanvases(EMPTY_CANVAS_ARRAY);
|
|
53827
|
+
lastLoadedSha.current = fileTreeSha;
|
|
53828
|
+
return;
|
|
53829
|
+
}
|
|
53830
|
+
const foundCanvases = ExecutionLoader.findCanvasFiles(fileTreeData.allFiles);
|
|
53831
|
+
console.log("[useCanvasData] Found canvases:", foundCanvases.length);
|
|
53832
|
+
setCanvases(foundCanvases);
|
|
53833
|
+
lastLoadedSha.current = fileTreeSha;
|
|
53834
|
+
} catch (err) {
|
|
53835
|
+
const errorMessage = err instanceof Error ? err.message : "Failed to load canvases";
|
|
53836
|
+
setError(errorMessage);
|
|
53837
|
+
console.error("Error loading canvases:", err);
|
|
53838
|
+
} finally {
|
|
53839
|
+
setIsLoading(false);
|
|
53840
|
+
}
|
|
53841
|
+
}, [fileTreeData, fileTreeSha]);
|
|
53842
|
+
const refreshCanvases = useCallback(async () => {
|
|
53843
|
+
lastLoadedSha.current = void 0;
|
|
53844
|
+
await loadCanvases();
|
|
53845
|
+
}, [loadCanvases]);
|
|
53846
|
+
useEffect(() => {
|
|
53847
|
+
loadCanvases();
|
|
53848
|
+
}, [loadCanvases]);
|
|
53849
|
+
return {
|
|
53850
|
+
canvases,
|
|
53851
|
+
isLoading,
|
|
53852
|
+
error,
|
|
53853
|
+
refreshCanvases
|
|
53854
|
+
};
|
|
53855
|
+
};
|
|
53856
|
+
const CanvasCard = ({
|
|
53857
|
+
canvas,
|
|
53858
|
+
onClick,
|
|
53859
|
+
isSelected = false
|
|
53860
|
+
}) => {
|
|
53861
|
+
const { theme } = useTheme();
|
|
53862
|
+
return /* @__PURE__ */ jsxs(
|
|
53863
|
+
"div",
|
|
53864
|
+
{
|
|
53865
|
+
onClick: () => onClick(canvas),
|
|
53866
|
+
style: {
|
|
53867
|
+
padding: "16px",
|
|
53868
|
+
background: isSelected ? `${theme.colors.primary}15` : theme.colors.backgroundSecondary,
|
|
53869
|
+
border: `1px solid ${isSelected ? theme.colors.primary : theme.colors.border}`,
|
|
53870
|
+
borderRadius: theme.radii[2],
|
|
53871
|
+
cursor: "pointer",
|
|
53872
|
+
transition: "all 0.2s ease",
|
|
53873
|
+
display: "flex",
|
|
53874
|
+
flexDirection: "column",
|
|
53875
|
+
gap: "12px",
|
|
53876
|
+
boxSizing: "border-box"
|
|
53877
|
+
},
|
|
53878
|
+
onMouseEnter: (e) => {
|
|
53879
|
+
if (!isSelected) {
|
|
53880
|
+
e.currentTarget.style.borderColor = theme.colors.primary;
|
|
53881
|
+
e.currentTarget.style.background = `${theme.colors.backgroundSecondary}cc`;
|
|
53882
|
+
}
|
|
53883
|
+
},
|
|
53884
|
+
onMouseLeave: (e) => {
|
|
53885
|
+
if (!isSelected) {
|
|
53886
|
+
e.currentTarget.style.borderColor = theme.colors.border;
|
|
53887
|
+
e.currentTarget.style.background = theme.colors.backgroundSecondary;
|
|
53888
|
+
}
|
|
53889
|
+
},
|
|
53890
|
+
children: [
|
|
53891
|
+
/* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx(
|
|
53892
|
+
"h3",
|
|
53893
|
+
{
|
|
53894
|
+
style: {
|
|
53895
|
+
margin: 0,
|
|
53896
|
+
fontSize: theme.fontSizes[2],
|
|
53897
|
+
color: isSelected ? theme.colors.primary : theme.colors.text,
|
|
53898
|
+
fontWeight: 600,
|
|
53899
|
+
flex: 1
|
|
53900
|
+
},
|
|
53901
|
+
children: canvas.name
|
|
53902
|
+
}
|
|
53903
|
+
) }),
|
|
53904
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
|
|
53905
|
+
/* @__PURE__ */ jsx(Folder, { size: 14, color: theme.colors.textSecondary }),
|
|
53906
|
+
/* @__PURE__ */ jsx(
|
|
53907
|
+
"span",
|
|
53908
|
+
{
|
|
53909
|
+
style: {
|
|
53910
|
+
fontSize: theme.fontSizes[0],
|
|
53911
|
+
color: theme.colors.textSecondary,
|
|
53912
|
+
fontFamily: "monospace"
|
|
53913
|
+
},
|
|
53914
|
+
children: canvas.source === "folder" ? ".principal-views" : "standalone"
|
|
53915
|
+
}
|
|
53916
|
+
)
|
|
53917
|
+
] }),
|
|
53918
|
+
/* @__PURE__ */ jsx(
|
|
53919
|
+
"div",
|
|
53920
|
+
{
|
|
53921
|
+
style: {
|
|
53922
|
+
fontSize: theme.fontSizes[0],
|
|
53923
|
+
color: theme.colors.textSecondary,
|
|
53924
|
+
fontFamily: "monospace",
|
|
53925
|
+
overflow: "hidden",
|
|
53926
|
+
textOverflow: "ellipsis",
|
|
53927
|
+
whiteSpace: "nowrap"
|
|
53928
|
+
},
|
|
53929
|
+
title: canvas.path,
|
|
53930
|
+
children: canvas.path
|
|
53931
|
+
}
|
|
53932
|
+
)
|
|
53933
|
+
]
|
|
53934
|
+
}
|
|
53935
|
+
);
|
|
53936
|
+
};
|
|
53937
|
+
const CanvasListPanel = ({
|
|
53938
|
+
context,
|
|
53939
|
+
events
|
|
53940
|
+
}) => {
|
|
53941
|
+
const { theme } = useTheme();
|
|
53942
|
+
const panelRef = useRef(null);
|
|
53943
|
+
const [selectedCanvasId, setSelectedCanvasId] = useState(null);
|
|
53944
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
53945
|
+
const [isRefreshing, setIsRefreshing] = useState(false);
|
|
53946
|
+
const { canvases, isLoading, error, refreshCanvases } = useCanvasData({ context });
|
|
53947
|
+
const filteredCanvases = useMemo(() => {
|
|
53948
|
+
if (!searchQuery.trim()) {
|
|
53949
|
+
return canvases;
|
|
53950
|
+
}
|
|
53951
|
+
const query = searchQuery.toLowerCase().trim();
|
|
53952
|
+
return canvases.filter((canvas) => {
|
|
53953
|
+
if (canvas.name.toLowerCase().includes(query)) return true;
|
|
53954
|
+
if (canvas.path.toLowerCase().includes(query)) return true;
|
|
53955
|
+
if (canvas.basename.toLowerCase().includes(query)) return true;
|
|
53956
|
+
return false;
|
|
53957
|
+
});
|
|
53958
|
+
}, [canvases, searchQuery]);
|
|
53959
|
+
const handleCanvasClick = (canvas) => {
|
|
53960
|
+
setSelectedCanvasId(canvas.id);
|
|
53961
|
+
if (events) {
|
|
53962
|
+
events.emit({
|
|
53963
|
+
type: "custom",
|
|
53964
|
+
source: "canvas-list-panel",
|
|
53965
|
+
timestamp: Date.now(),
|
|
53966
|
+
payload: { action: "selectCanvas", canvasId: canvas.id, canvas }
|
|
53967
|
+
});
|
|
53968
|
+
}
|
|
53969
|
+
};
|
|
53970
|
+
const handleRefresh = async () => {
|
|
53971
|
+
setIsRefreshing(true);
|
|
53972
|
+
if (events) {
|
|
53973
|
+
events.emit({
|
|
53974
|
+
type: "custom",
|
|
53975
|
+
source: "canvas-list-panel",
|
|
53976
|
+
timestamp: Date.now(),
|
|
53977
|
+
payload: { action: "refreshCanvases" }
|
|
53978
|
+
});
|
|
53979
|
+
}
|
|
53980
|
+
try {
|
|
53981
|
+
await refreshCanvases();
|
|
53982
|
+
} finally {
|
|
53983
|
+
setIsRefreshing(false);
|
|
53984
|
+
}
|
|
53985
|
+
};
|
|
53986
|
+
return /* @__PURE__ */ jsxs(
|
|
53987
|
+
"div",
|
|
53988
|
+
{
|
|
53989
|
+
ref: panelRef,
|
|
53990
|
+
tabIndex: -1,
|
|
53991
|
+
style: {
|
|
53992
|
+
padding: "clamp(12px, 3vw, 20px)",
|
|
53993
|
+
fontFamily: theme.fonts.body,
|
|
53994
|
+
height: "100%",
|
|
53995
|
+
boxSizing: "border-box",
|
|
53996
|
+
display: "flex",
|
|
53997
|
+
flexDirection: "column",
|
|
53998
|
+
gap: "16px",
|
|
53999
|
+
overflow: "hidden",
|
|
54000
|
+
backgroundColor: theme.colors.background,
|
|
54001
|
+
color: theme.colors.text,
|
|
54002
|
+
outline: "none"
|
|
54003
|
+
},
|
|
54004
|
+
children: [
|
|
54005
|
+
/* @__PURE__ */ jsxs(
|
|
54006
|
+
"div",
|
|
54007
|
+
{
|
|
54008
|
+
style: {
|
|
54009
|
+
flexShrink: 0,
|
|
54010
|
+
display: "flex",
|
|
54011
|
+
alignItems: "center",
|
|
54012
|
+
justifyContent: "space-between",
|
|
54013
|
+
gap: "12px",
|
|
54014
|
+
flexWrap: "wrap"
|
|
54015
|
+
},
|
|
54016
|
+
children: [
|
|
54017
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
|
|
54018
|
+
/* @__PURE__ */ jsx(
|
|
54019
|
+
"h2",
|
|
54020
|
+
{
|
|
54021
|
+
style: {
|
|
54022
|
+
margin: 0,
|
|
54023
|
+
fontSize: theme.fontSizes[4],
|
|
54024
|
+
color: theme.colors.text
|
|
54025
|
+
},
|
|
54026
|
+
children: "Canvas Files"
|
|
54027
|
+
}
|
|
54028
|
+
),
|
|
54029
|
+
!isLoading && /* @__PURE__ */ jsxs(
|
|
54030
|
+
"span",
|
|
54031
|
+
{
|
|
54032
|
+
style: {
|
|
54033
|
+
fontSize: theme.fontSizes[1],
|
|
54034
|
+
color: theme.colors.textSecondary,
|
|
54035
|
+
background: theme.colors.backgroundSecondary,
|
|
54036
|
+
padding: "4px 10px",
|
|
54037
|
+
borderRadius: theme.radii[1]
|
|
54038
|
+
},
|
|
54039
|
+
children: [
|
|
54040
|
+
filteredCanvases.length,
|
|
54041
|
+
" ",
|
|
54042
|
+
filteredCanvases.length === 1 ? "canvas" : "canvases"
|
|
54043
|
+
]
|
|
54044
|
+
}
|
|
54045
|
+
)
|
|
54046
|
+
] }),
|
|
54047
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "12px", flex: "1 1 200px", maxWidth: "400px" }, children: [
|
|
54048
|
+
/* @__PURE__ */ jsxs(
|
|
54049
|
+
"div",
|
|
54050
|
+
{
|
|
54051
|
+
style: {
|
|
54052
|
+
position: "relative",
|
|
54053
|
+
flex: 1,
|
|
54054
|
+
minWidth: "150px"
|
|
54055
|
+
},
|
|
54056
|
+
children: [
|
|
54057
|
+
/* @__PURE__ */ jsx(
|
|
54058
|
+
Search,
|
|
54059
|
+
{
|
|
54060
|
+
size: 16,
|
|
54061
|
+
color: theme.colors.textSecondary,
|
|
54062
|
+
style: {
|
|
54063
|
+
position: "absolute",
|
|
54064
|
+
left: "10px",
|
|
54065
|
+
top: "50%",
|
|
54066
|
+
transform: "translateY(-50%)",
|
|
54067
|
+
pointerEvents: "none"
|
|
54068
|
+
}
|
|
54069
|
+
}
|
|
54070
|
+
),
|
|
54071
|
+
/* @__PURE__ */ jsx(
|
|
54072
|
+
"input",
|
|
54073
|
+
{
|
|
54074
|
+
type: "text",
|
|
54075
|
+
placeholder: "Search canvases...",
|
|
54076
|
+
value: searchQuery,
|
|
54077
|
+
onChange: (e) => setSearchQuery(e.target.value),
|
|
54078
|
+
style: {
|
|
54079
|
+
width: "100%",
|
|
54080
|
+
padding: "8px 32px 8px 32px",
|
|
54081
|
+
fontSize: theme.fontSizes[1],
|
|
54082
|
+
fontFamily: theme.fonts.body,
|
|
54083
|
+
border: `1px solid ${theme.colors.border}`,
|
|
54084
|
+
borderRadius: theme.radii[2],
|
|
54085
|
+
background: theme.colors.backgroundSecondary,
|
|
54086
|
+
color: theme.colors.text,
|
|
54087
|
+
outline: "none",
|
|
54088
|
+
boxSizing: "border-box"
|
|
54089
|
+
}
|
|
54090
|
+
}
|
|
54091
|
+
),
|
|
54092
|
+
searchQuery && /* @__PURE__ */ jsx(
|
|
54093
|
+
"button",
|
|
54094
|
+
{
|
|
54095
|
+
onClick: () => setSearchQuery(""),
|
|
54096
|
+
style: {
|
|
54097
|
+
position: "absolute",
|
|
54098
|
+
right: "6px",
|
|
54099
|
+
top: "50%",
|
|
54100
|
+
transform: "translateY(-50%)",
|
|
54101
|
+
background: "transparent",
|
|
54102
|
+
border: "none",
|
|
54103
|
+
padding: "4px",
|
|
54104
|
+
cursor: "pointer",
|
|
54105
|
+
display: "flex",
|
|
54106
|
+
alignItems: "center",
|
|
54107
|
+
justifyContent: "center",
|
|
54108
|
+
color: theme.colors.textSecondary
|
|
54109
|
+
},
|
|
54110
|
+
"aria-label": "Clear search",
|
|
54111
|
+
children: /* @__PURE__ */ jsx(X, { size: 14 })
|
|
54112
|
+
}
|
|
54113
|
+
)
|
|
54114
|
+
]
|
|
54115
|
+
}
|
|
54116
|
+
),
|
|
54117
|
+
/* @__PURE__ */ jsx(
|
|
54118
|
+
"button",
|
|
54119
|
+
{
|
|
54120
|
+
onClick: handleRefresh,
|
|
54121
|
+
disabled: isRefreshing || isLoading,
|
|
54122
|
+
style: {
|
|
54123
|
+
background: theme.colors.backgroundSecondary,
|
|
54124
|
+
border: `1px solid ${theme.colors.border}`,
|
|
54125
|
+
borderRadius: theme.radii[1],
|
|
54126
|
+
padding: "8px",
|
|
54127
|
+
cursor: isRefreshing ? "wait" : "pointer",
|
|
54128
|
+
display: "flex",
|
|
54129
|
+
alignItems: "center",
|
|
54130
|
+
justifyContent: "center",
|
|
54131
|
+
transition: "all 0.2s ease"
|
|
54132
|
+
},
|
|
54133
|
+
title: "Refresh canvases",
|
|
54134
|
+
children: /* @__PURE__ */ jsx(
|
|
54135
|
+
RefreshCw,
|
|
54136
|
+
{
|
|
54137
|
+
size: 16,
|
|
54138
|
+
color: theme.colors.textSecondary,
|
|
54139
|
+
style: {
|
|
54140
|
+
animation: isRefreshing ? "spin 1s linear infinite" : "none"
|
|
54141
|
+
}
|
|
54142
|
+
}
|
|
54143
|
+
)
|
|
54144
|
+
}
|
|
54145
|
+
)
|
|
54146
|
+
] })
|
|
54147
|
+
]
|
|
54148
|
+
}
|
|
54149
|
+
),
|
|
54150
|
+
error && /* @__PURE__ */ jsxs(
|
|
54151
|
+
"div",
|
|
54152
|
+
{
|
|
54153
|
+
style: {
|
|
54154
|
+
flexShrink: 0,
|
|
54155
|
+
padding: "12px",
|
|
54156
|
+
background: `${theme.colors.error}20`,
|
|
54157
|
+
border: `1px solid ${theme.colors.error}`,
|
|
54158
|
+
borderRadius: theme.radii[2],
|
|
54159
|
+
display: "flex",
|
|
54160
|
+
alignItems: "center",
|
|
54161
|
+
gap: "8px",
|
|
54162
|
+
color: theme.colors.error,
|
|
54163
|
+
fontSize: theme.fontSizes[1]
|
|
54164
|
+
},
|
|
54165
|
+
children: [
|
|
54166
|
+
/* @__PURE__ */ jsx(CircleAlert, { size: 16 }),
|
|
54167
|
+
/* @__PURE__ */ jsx("span", { children: error })
|
|
54168
|
+
]
|
|
54169
|
+
}
|
|
54170
|
+
),
|
|
54171
|
+
/* @__PURE__ */ jsx(
|
|
54172
|
+
"div",
|
|
54173
|
+
{
|
|
54174
|
+
style: {
|
|
54175
|
+
flex: 1,
|
|
54176
|
+
overflowY: "auto",
|
|
54177
|
+
minHeight: 0
|
|
54178
|
+
},
|
|
54179
|
+
children: isLoading ? /* @__PURE__ */ jsx(
|
|
54180
|
+
"div",
|
|
54181
|
+
{
|
|
54182
|
+
style: {
|
|
54183
|
+
height: "100%",
|
|
54184
|
+
display: "flex",
|
|
54185
|
+
alignItems: "center",
|
|
54186
|
+
justifyContent: "center",
|
|
54187
|
+
color: theme.colors.textSecondary,
|
|
54188
|
+
fontSize: theme.fontSizes[2]
|
|
54189
|
+
},
|
|
54190
|
+
children: "Loading canvases..."
|
|
54191
|
+
}
|
|
54192
|
+
) : filteredCanvases.length === 0 ? /* @__PURE__ */ jsxs(
|
|
54193
|
+
"div",
|
|
54194
|
+
{
|
|
54195
|
+
style: {
|
|
54196
|
+
height: "100%",
|
|
54197
|
+
display: "flex",
|
|
54198
|
+
flexDirection: "column",
|
|
54199
|
+
alignItems: "center",
|
|
54200
|
+
justifyContent: "center",
|
|
54201
|
+
gap: "16px",
|
|
54202
|
+
color: theme.colors.textSecondary,
|
|
54203
|
+
padding: "24px"
|
|
54204
|
+
},
|
|
54205
|
+
children: [
|
|
54206
|
+
/* @__PURE__ */ jsx(Activity, { size: 48, color: theme.colors.border }),
|
|
54207
|
+
/* @__PURE__ */ jsxs("div", { style: { textAlign: "center" }, children: [
|
|
54208
|
+
/* @__PURE__ */ jsx("p", { style: { margin: 0, fontSize: theme.fontSizes[2] }, children: searchQuery ? "No canvases match your search" : "No canvas files found" }),
|
|
54209
|
+
/* @__PURE__ */ jsx("p", { style: { margin: "8px 0 0 0", fontSize: theme.fontSizes[1] }, children: searchQuery ? "Try a different search term" : "Add .otel.canvas files to .principal-views/ to get started" })
|
|
54210
|
+
] })
|
|
54211
|
+
]
|
|
54212
|
+
}
|
|
54213
|
+
) : /* @__PURE__ */ jsx(
|
|
54214
|
+
"div",
|
|
54215
|
+
{
|
|
54216
|
+
style: {
|
|
54217
|
+
display: "grid",
|
|
54218
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(250px, 1fr))",
|
|
54219
|
+
gap: "16px",
|
|
54220
|
+
padding: "4px"
|
|
54221
|
+
},
|
|
54222
|
+
children: filteredCanvases.map((canvas) => /* @__PURE__ */ jsx(
|
|
54223
|
+
CanvasCard,
|
|
54224
|
+
{
|
|
54225
|
+
canvas,
|
|
54226
|
+
onClick: handleCanvasClick,
|
|
54227
|
+
isSelected: selectedCanvasId === canvas.id
|
|
54228
|
+
},
|
|
54229
|
+
canvas.id
|
|
54230
|
+
))
|
|
54231
|
+
}
|
|
54232
|
+
)
|
|
54233
|
+
}
|
|
54234
|
+
),
|
|
54235
|
+
/* @__PURE__ */ jsx("style", { children: `
|
|
54236
|
+
@keyframes spin {
|
|
54237
|
+
to { transform: rotate(360deg); }
|
|
54238
|
+
}
|
|
54239
|
+
` })
|
|
54240
|
+
]
|
|
54241
|
+
}
|
|
54242
|
+
);
|
|
54243
|
+
};
|
|
53706
54244
|
const focusNodeTool = {
|
|
53707
54245
|
name: "focus_node",
|
|
53708
54246
|
description: "Focuses the graph view on a specific node",
|
|
@@ -54451,23 +54989,23 @@ class PanelFileSystemAdapter {
|
|
|
54451
54989
|
const panels = [
|
|
54452
54990
|
{
|
|
54453
54991
|
metadata: {
|
|
54454
|
-
id: "principal-ai.
|
|
54455
|
-
name: "
|
|
54456
|
-
icon: "
|
|
54992
|
+
id: "principal-ai.canvas-editor",
|
|
54993
|
+
name: "Canvas Editor",
|
|
54994
|
+
icon: "🎨",
|
|
54457
54995
|
version: "0.1.0",
|
|
54458
54996
|
author: "Principal AI",
|
|
54459
|
-
description: "
|
|
54997
|
+
description: "Edits .canvas configuration files as interactive graph diagrams",
|
|
54460
54998
|
slices: ["fileTree"],
|
|
54461
54999
|
// Data slices this panel depends on
|
|
54462
55000
|
// UTCP-compatible tools this panel exposes
|
|
54463
55001
|
tools: principalViewPanelTools
|
|
54464
55002
|
},
|
|
54465
|
-
component:
|
|
55003
|
+
component: CanvasEditorPanel,
|
|
54466
55004
|
// Optional: Called when this specific panel is mounted
|
|
54467
55005
|
onMount: async (context) => {
|
|
54468
55006
|
var _a;
|
|
54469
55007
|
console.log(
|
|
54470
|
-
"
|
|
55008
|
+
"Canvas Editor Panel mounted",
|
|
54471
55009
|
(_a = context.currentScope.repository) == null ? void 0 : _a.path
|
|
54472
55010
|
);
|
|
54473
55011
|
if (context.hasSlice("fileTree") && !context.isSliceLoading("fileTree")) {
|
|
@@ -54476,7 +55014,7 @@ const panels = [
|
|
|
54476
55014
|
},
|
|
54477
55015
|
// Optional: Called when this specific panel is unmounted
|
|
54478
55016
|
onUnmount: async (_context) => {
|
|
54479
|
-
console.log("
|
|
55017
|
+
console.log("Canvas Editor Panel unmounting");
|
|
54480
55018
|
}
|
|
54481
55019
|
},
|
|
54482
55020
|
{
|
|
@@ -54506,19 +55044,44 @@ const panels = [
|
|
|
54506
55044
|
},
|
|
54507
55045
|
{
|
|
54508
55046
|
metadata: {
|
|
54509
|
-
id: "principal-ai.
|
|
54510
|
-
name: "
|
|
55047
|
+
id: "principal-ai.canvas-detail",
|
|
55048
|
+
name: "Canvas Detail",
|
|
54511
55049
|
icon: "⚡",
|
|
54512
55050
|
version: "0.1.0",
|
|
54513
55051
|
author: "Principal AI",
|
|
54514
|
-
description: "Visualizes
|
|
55052
|
+
description: "Visualizes canvas details with execution artifacts, narrative templates, and playback controls",
|
|
55053
|
+
slices: ["fileTree"]
|
|
55054
|
+
},
|
|
55055
|
+
component: CanvasDetailPanel,
|
|
55056
|
+
onMount: async (context) => {
|
|
55057
|
+
var _a;
|
|
55058
|
+
console.log(
|
|
55059
|
+
"Canvas Detail Panel mounted",
|
|
55060
|
+
(_a = context.currentScope.repository) == null ? void 0 : _a.path
|
|
55061
|
+
);
|
|
55062
|
+
if (context.hasSlice("fileTree") && !context.isSliceLoading("fileTree")) {
|
|
55063
|
+
await context.refresh("repository", "fileTree");
|
|
55064
|
+
}
|
|
55065
|
+
},
|
|
55066
|
+
onUnmount: async (_context) => {
|
|
55067
|
+
console.log("Canvas Detail Panel unmounting");
|
|
55068
|
+
}
|
|
55069
|
+
},
|
|
55070
|
+
{
|
|
55071
|
+
metadata: {
|
|
55072
|
+
id: "principal-ai.canvas-list",
|
|
55073
|
+
name: "Canvas List",
|
|
55074
|
+
icon: "📋",
|
|
55075
|
+
version: "0.1.0",
|
|
55076
|
+
author: "Principal AI",
|
|
55077
|
+
description: "Lists and manages .otel.canvas files in the project with search and selection",
|
|
54515
55078
|
slices: ["fileTree"]
|
|
54516
55079
|
},
|
|
54517
|
-
component:
|
|
55080
|
+
component: CanvasListPanel,
|
|
54518
55081
|
onMount: async (context) => {
|
|
54519
55082
|
var _a;
|
|
54520
55083
|
console.log(
|
|
54521
|
-
"
|
|
55084
|
+
"Canvas List Panel mounted",
|
|
54522
55085
|
(_a = context.currentScope.repository) == null ? void 0 : _a.path
|
|
54523
55086
|
);
|
|
54524
55087
|
if (context.hasSlice("fileTree") && !context.isSliceLoading("fileTree")) {
|
|
@@ -54526,19 +55089,21 @@ const panels = [
|
|
|
54526
55089
|
}
|
|
54527
55090
|
},
|
|
54528
55091
|
onUnmount: async (_context) => {
|
|
54529
|
-
console.log("
|
|
55092
|
+
console.log("Canvas List Panel unmounting");
|
|
54530
55093
|
}
|
|
54531
55094
|
}
|
|
54532
55095
|
];
|
|
54533
55096
|
const onPackageLoad = async () => {
|
|
54534
|
-
console.log("Panel package loaded - Principal View
|
|
55097
|
+
console.log("Panel package loaded - Principal View Panels");
|
|
54535
55098
|
};
|
|
54536
55099
|
const onPackageUnload = async () => {
|
|
54537
|
-
console.log("Panel package unloading - Principal View
|
|
55100
|
+
console.log("Panel package unloading - Principal View Panels");
|
|
54538
55101
|
};
|
|
54539
55102
|
export {
|
|
55103
|
+
CanvasDetailPanel,
|
|
55104
|
+
CanvasEditorPanel,
|
|
55105
|
+
CanvasListPanel,
|
|
54540
55106
|
EventControllerPanel,
|
|
54541
|
-
ExecutionViewerPanel,
|
|
54542
55107
|
PanelFileSystemAdapter,
|
|
54543
55108
|
TraceViewerPanel,
|
|
54544
55109
|
focusNodeTool,
|