@industry-theme/principal-view-panels 0.1.54 → 0.1.56

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.
@@ -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$1 = createLucideIcon$1("circle-check", __iconNode$kG);
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$1 = createLucideIcon$1("file-text", __iconNode$gv);
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: CircleCheck$1,
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: FileText$1,
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$1,
38501
- CheckCircle2Icon: CircleCheck$1,
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: CircleCheck$1,
38601
+ CircleCheck,
38602
38602
  CircleCheckBig,
38603
38603
  CircleCheckBigIcon: CircleCheckBig,
38604
- CircleCheckIcon: CircleCheck$1,
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: FileText$1,
39217
- FileTextIcon: FileText$1,
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$1,
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$1,
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$1,
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$m);
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$l = [
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$l);
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$k = [
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$k);
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$j = [
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$j);
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$i = [
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$i);
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$h = [
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$h);
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$g = [
48438
+ const __iconNode$h = [
48450
48439
  [
48451
48440
  "path",
48452
48441
  {
48453
- d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
48454
- key: "1oefj6"
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 FileText = createLucideIcon("file-text", __iconNode$g);
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$f = [
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$f);
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$e = [
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$e);
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$d = [
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$d);
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$c = [
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$c);
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$b = [
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$b);
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$a = [
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$a);
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$9 = [
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$9);
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$8 = [
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$8);
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$7 = [
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$7);
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$6 = [
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$6);
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$5 = [
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$5);
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$4 = [
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$4);
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
  *
@@ -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.includes(" ") || /[#$]\s/.test(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
- return lines.map((line, idx) => {
50607
- var _a;
50608
- let lineStyle = {};
50609
- let content = line;
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
- lineStyle = {
50612
- fontWeight: "bold",
50613
- fontSize: "16px",
50614
- marginTop: idx > 0 ? "8px" : "0",
50615
- marginBottom: "4px"
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
- lineStyle = {
50619
- color: theme.colors.border,
50620
- opacity: 0.6
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
- lineStyle = {
50625
- color: theme.colors.text,
50626
- fontWeight: indent.length === 0 ? "bold" : "normal",
50627
- marginTop: indent.length === 0 ? "12px" : "4px"
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
- lineStyle = {
50631
- color: theme.colors.textMuted,
50632
- paddingLeft: "8px"
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
- lineStyle = {
50636
- fontWeight: "bold",
50637
- marginTop: "8px",
50638
- color: theme.colors.text
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: "20px",
50689
- fontFamily: theme.fonts.monospace,
50884
+ padding: "32px 28px",
50885
+ fontFamily: theme.fonts.body,
50690
50886
  fontSize: "14px",
50691
- lineHeight: "1.6",
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
  }
@@ -50847,8 +51041,8 @@ const TestEventPanel = ({
50847
51041
  const timeline = useMemo(() => {
50848
51042
  if (!currentSpan) return [];
50849
51043
  const items = [
50850
- // Span events
50851
- ...currentSpan.events.slice(0, currentEventIndex + 1).map((event) => ({
51044
+ // Span events - show ALL events, not just up to currentEventIndex
51045
+ ...currentSpan.events.map((event) => ({
50852
51046
  type: "event",
50853
51047
  time: event.time,
50854
51048
  name: event.name,
@@ -50865,7 +51059,7 @@ const TestEventPanel = ({
50865
51059
  }))
50866
51060
  ].sort((a, b) => a.time - b.time);
50867
51061
  return items;
50868
- }, [currentSpan, currentEventIndex, logs]);
51062
+ }, [currentSpan, logs]);
50869
51063
  return /* @__PURE__ */ jsxs(
50870
51064
  "div",
50871
51065
  {
@@ -50966,35 +51160,35 @@ const TestEventPanel = ({
50966
51160
  /* @__PURE__ */ jsx(
50967
51161
  "button",
50968
51162
  {
50969
- onClick: () => onViewModeChange("raw"),
51163
+ onClick: () => onViewModeChange("narrative"),
50970
51164
  style: {
50971
51165
  padding: "6px 12px",
50972
- background: viewMode === "raw" ? theme.colors.primary : theme.colors.surface,
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 === "raw" ? "#ffffff" : theme.colors.text,
51169
+ color: viewMode === "narrative" ? "#ffffff" : theme.colors.text,
50976
51170
  cursor: "pointer",
50977
51171
  fontSize: "13px",
50978
- fontWeight: viewMode === "raw" ? "bold" : "normal"
51172
+ fontWeight: viewMode === "narrative" ? "bold" : "normal"
50979
51173
  },
50980
- children: "Raw Events"
51174
+ children: "Narrative"
50981
51175
  }
50982
51176
  ),
50983
51177
  /* @__PURE__ */ jsx(
50984
51178
  "button",
50985
51179
  {
50986
- onClick: () => onViewModeChange("narrative"),
51180
+ onClick: () => onViewModeChange("raw"),
50987
51181
  style: {
50988
51182
  padding: "6px 12px",
50989
- background: viewMode === "narrative" ? theme.colors.primary : theme.colors.surface,
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 === "narrative" ? "#ffffff" : theme.colors.text,
51186
+ color: viewMode === "raw" ? "#ffffff" : theme.colors.text,
50993
51187
  cursor: "pointer",
50994
51188
  fontSize: "13px",
50995
- fontWeight: viewMode === "narrative" ? "bold" : "normal"
51189
+ fontWeight: viewMode === "raw" ? "bold" : "normal"
50996
51190
  },
50997
- children: "Narrative"
51191
+ children: "Raw Events"
50998
51192
  }
50999
51193
  )
51000
51194
  ] }),
@@ -51842,7 +52036,7 @@ const Step2Components = () => {
51842
52036
  /* @__PURE__ */ jsx("rect", { x: "310", y: "85", width: "240", height: "55", fill: "#1e1b4b", stroke: "#6366f1", strokeWidth: "1", rx: "3" }),
51843
52037
  /* @__PURE__ */ jsx("text", { x: "315", y: "98", fill: "#c4b5fd", fontSize: "9", fontWeight: "600", children: "Scenario: success (priority: 1)" }),
51844
52038
  /* @__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 #{{order.id}} completed"' }),
52039
+ /* @__PURE__ */ jsx("text", { x: "320", y: "122", fill: "#94a3b8", fontSize: "8", fontFamily: "monospace", children: 'template: "Order #{order.id} completed"' }),
51846
52040
  /* @__PURE__ */ jsx("text", { x: "320", y: "134", fill: "#94a3b8", fontSize: "8", fontFamily: "monospace", children: "steps: [4 narrative steps...]" })
51847
52041
  ] }),
51848
52042
  /* @__PURE__ */ jsxs("g", { children: [
@@ -51948,9 +52142,9 @@ const Step4Templates = () => {
51948
52142
  /* @__PURE__ */ jsx("rect", { x: "40", y: "45", width: "520", height: "90", fill: "#1e293b", stroke: "#475569", strokeWidth: "2", rx: "4" }),
51949
52143
  /* @__PURE__ */ jsx("text", { x: "60", y: "65", fill: "#94a3b8", fontSize: "11", fontWeight: "600", children: "TEMPLATE WITH VARIABLES:" }),
51950
52144
  /* @__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 #{{order.id}} for {{customer.name}}"' }),
52145
+ /* @__PURE__ */ jsx("text", { x: "70", y: "93", fill: "#c4b5fd", fontSize: "10", fontFamily: "monospace", children: 'summary: "Order #{order.id} for {customer.name}"' }),
51952
52146
  /* @__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: ${{order.total}} via {{payment.method}}"' })
52147
+ /* @__PURE__ */ jsx("text", { x: "80", y: "120", fill: "#c4b5fd", fontSize: "10", fontFamily: "monospace", children: '- "Payment: ${order.total} via {payment.method}"' })
51954
52148
  ] }),
51955
52149
  /* @__PURE__ */ jsx("g", { children: /* @__PURE__ */ jsx("text", { x: "300", y: "160", textAnchor: "middle", fill: "#3b82f6", fontSize: "16", fontWeight: "700", children: "+" }) }),
51956
52150
  /* @__PURE__ */ jsxs("g", { children: [
@@ -51972,7 +52166,7 @@ const Step4Templates = () => {
51972
52166
  /* @__PURE__ */ jsx("rect", { x: "40", y: "260", width: "520", height: "15", fill: "#1e3a8a", stroke: "#3b82f6", strokeWidth: "1", rx: "3" }),
51973
52167
  /* @__PURE__ */ jsxs("text", { x: "50", y: "270", fill: "#bfdbfe", fontSize: "9", children: [
51974
52168
  /* @__PURE__ */ jsx("tspan", { fontWeight: "600", children: "Syntax:" }),
51975
- " {{variable.name}} gets replaced with actual values from OTEL attributes, events, or span data"
52169
+ " {variable.name} gets replaced with actual values from OTEL attributes, events, or span data"
51976
52170
  ] })
51977
52171
  ] }),
51978
52172
  /* @__PURE__ */ jsxs("div", { style: {
@@ -51984,7 +52178,7 @@ const Step4Templates = () => {
51984
52178
  border: "1px solid #475569"
51985
52179
  }, children: [
51986
52180
  "Variables in ",
51987
- /* @__PURE__ */ jsx("code", { style: { color: "#a78bfa" }, children: "{{double.braces}}" }),
52181
+ /* @__PURE__ */ jsx("code", { style: { color: "#a78bfa" }, children: "{single.braces}" }),
51988
52182
  " are replaced with actual values from your execution data."
51989
52183
  ] })
51990
52184
  ] });
@@ -52354,7 +52548,7 @@ const NarrativeExplainerPanel = ({ className }) => {
52354
52548
  ] }),
52355
52549
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "8px" }, children: [
52356
52550
  /* @__PURE__ */ jsx("span", { style: { color: "#34d399" }, children: "4." }),
52357
- /* @__PURE__ */ jsx("span", { style: { color: theme.colors.textSecondary }, children: "View the results in ExecutionViewerPanel" })
52551
+ /* @__PURE__ */ jsx("span", { style: { color: theme.colors.textSecondary }, children: "View the results in CanvasDetailPanel" })
52358
52552
  ] })
52359
52553
  ] })
52360
52554
  ]
@@ -52372,6 +52566,27 @@ const NarrativeTemplatePanel = ({
52372
52566
  }) => {
52373
52567
  var _a, _b;
52374
52568
  const { theme } = useTheme();
52569
+ const [expandedScenarios, setExpandedScenarios] = useState(/* @__PURE__ */ new Set());
52570
+ const toggleScenario = (scenarioId) => {
52571
+ setExpandedScenarios((prev) => {
52572
+ const next = new Set(prev);
52573
+ if (next.has(scenarioId)) {
52574
+ next.delete(scenarioId);
52575
+ } else {
52576
+ next.add(scenarioId);
52577
+ }
52578
+ return next;
52579
+ });
52580
+ };
52581
+ const renderTemplateText = (text) => {
52582
+ const parts = text.split(/(\{[^}]+\})/g);
52583
+ return /* @__PURE__ */ jsx(Fragment, { children: parts.map((part, i) => {
52584
+ if (part.match(/^\{[^}]+\}$/)) {
52585
+ return /* @__PURE__ */ jsx("span", { style: { color: theme.colors.accent, fontWeight: 600 }, children: part }, i);
52586
+ }
52587
+ return part;
52588
+ }) });
52589
+ };
52375
52590
  const renderCondition = (condition, depth = 0) => {
52376
52591
  var _a2;
52377
52592
  const indent = depth * 16;
@@ -52444,10 +52659,7 @@ const NarrativeTemplatePanel = ({
52444
52659
  flexShrink: 0
52445
52660
  },
52446
52661
  children: [
52447
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
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
- ] }),
52662
+ /* @__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
52663
  narrativeTemplate.description && /* @__PURE__ */ jsx(
52452
52664
  "p",
52453
52665
  {
@@ -52480,218 +52692,252 @@ const NarrativeTemplatePanel = ({
52480
52692
  ]
52481
52693
  }
52482
52694
  ),
52483
- (_b = narrativeTemplate.scenarios) == null ? void 0 : _b.map((scenario, index2) => /* @__PURE__ */ jsxs(
52484
- "div",
52485
- {
52486
- style: {
52487
- marginBottom: "16px",
52488
- padding: "12px",
52489
- background: theme.colors.background,
52490
- border: `1px solid ${theme.colors.border}`,
52491
- borderRadius: "6px"
52492
- },
52493
- children: [
52494
- /* @__PURE__ */ jsx("div", { style: { marginBottom: "12px" }, children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
52495
- scenario.priority === 1 ? /* @__PURE__ */ jsx(CircleCheck, { size: 16, style: { color: "#22c55e" } }) : /* @__PURE__ */ jsx(CircleAlert, { size: 16, style: { color: "#f59e0b" } }),
52496
- /* @__PURE__ */ jsx("h3", { style: { margin: 0, fontSize: "14px", fontWeight: 600 }, children: scenario.description }),
52695
+ (_b = narrativeTemplate.scenarios) == null ? void 0 : _b.map((scenario, index2) => {
52696
+ const isExpanded = expandedScenarios.has(scenario.id || String(index2));
52697
+ return /* @__PURE__ */ jsxs(
52698
+ "div",
52699
+ {
52700
+ style: {
52701
+ marginBottom: "16px",
52702
+ background: theme.colors.background,
52703
+ border: `1px solid ${theme.colors.border}`,
52704
+ borderRadius: "6px",
52705
+ overflow: "hidden"
52706
+ },
52707
+ children: [
52497
52708
  /* @__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
52709
  "div",
52517
52710
  {
52711
+ onClick: () => toggleScenario(scenario.id || String(index2)),
52518
52712
  style: {
52519
- fontSize: "11px",
52520
- fontWeight: 600,
52521
- color: theme.colors.textSecondary,
52522
- marginBottom: "6px",
52523
- textTransform: "uppercase",
52524
- letterSpacing: "0.5px"
52713
+ padding: "12px",
52714
+ cursor: "pointer",
52715
+ display: "flex",
52716
+ alignItems: "center",
52717
+ gap: "8px",
52718
+ transition: "background 0.2s",
52719
+ background: isExpanded ? theme.colors.backgroundSecondary : "transparent"
52525
52720
  },
52526
- children: "Condition"
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"
52721
+ onMouseEnter: (e) => {
52722
+ e.currentTarget.style.background = theme.colors.backgroundSecondary;
52723
+ },
52724
+ onMouseLeave: (e) => {
52725
+ e.currentTarget.style.background = isExpanded ? theme.colors.backgroundSecondary : "transparent";
52542
52726
  },
52543
- children: "Template"
52727
+ children: [
52728
+ 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 } }),
52729
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
52730
+ /* @__PURE__ */ jsx("h3", { style: { margin: 0, fontSize: "14px", fontWeight: 600 }, children: scenario.name || scenario.description || scenario.id }),
52731
+ scenario.description && scenario.name && /* @__PURE__ */ jsx("p", { style: { margin: "4px 0 0 0", fontSize: "12px", color: theme.colors.textSecondary }, children: scenario.description })
52732
+ ] })
52733
+ ]
52544
52734
  }
52545
52735
  ),
52546
- scenario.template.summary && /* @__PURE__ */ jsxs("div", { style: { marginBottom: "8px" }, children: [
52547
- /* @__PURE__ */ jsx("div", { style: { fontSize: "11px", color: theme.colors.textSecondary, marginBottom: "2px" }, children: "Summary:" }),
52548
- /* @__PURE__ */ jsx(
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(
52736
+ isExpanded && /* @__PURE__ */ jsxs("div", { style: { padding: "12px", borderTop: `1px solid ${theme.colors.border}` }, children: [
52737
+ /* @__PURE__ */ jsxs("div", { style: { marginBottom: "12px" }, children: [
52738
+ /* @__PURE__ */ jsx(
52625
52739
  "div",
52626
52740
  {
52627
52741
  style: {
52628
52742
  fontSize: "11px",
52743
+ fontWeight: 600,
52629
52744
  color: theme.colors.textSecondary,
52630
- marginBottom: "4px",
52631
- display: "flex",
52632
- alignItems: "center",
52633
- gap: "6px"
52745
+ marginBottom: "6px",
52746
+ textTransform: "uppercase",
52747
+ letterSpacing: "0.5px"
52634
52748
  },
52635
- children: [
52636
- /* @__PURE__ */ jsx(Database, { size: 12 }),
52637
- /* @__PURE__ */ jsxs("span", { children: [
52638
- "Execution Files (",
52639
- matchingExecutions.length,
52640
- ")"
52641
- ] })
52642
- ]
52749
+ children: "Condition"
52643
52750
  }
52644
52751
  ),
52645
- /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: matchingExecutions.map((exec) => /* @__PURE__ */ jsxs(
52646
- "button",
52752
+ renderCondition(scenario.condition)
52753
+ ] }),
52754
+ /* @__PURE__ */ jsxs("div", { children: [
52755
+ /* @__PURE__ */ jsx(
52756
+ "div",
52647
52757
  {
52648
- onClick: () => onExecutionSelect == null ? void 0 : onExecutionSelect(exec.id),
52649
52758
  style: {
52650
- fontSize: "12px",
52651
- padding: "6px 8px",
52652
- background: theme.colors.background,
52653
- border: `1px solid ${theme.colors.border}`,
52654
- borderRadius: "3px",
52759
+ fontSize: "11px",
52760
+ fontWeight: 600,
52655
52761
  color: theme.colors.textSecondary,
52656
- fontFamily: theme.fonts.monospace,
52657
- cursor: "pointer",
52658
- display: "flex",
52659
- alignItems: "center",
52660
- justifyContent: "space-between",
52661
- transition: "all 0.2s",
52662
- textAlign: "left"
52762
+ marginBottom: "6px",
52763
+ textTransform: "uppercase",
52764
+ letterSpacing: "0.5px"
52663
52765
  },
52664
- onMouseEnter: (e) => {
52665
- e.currentTarget.style.background = theme.colors.muted;
52666
- e.currentTarget.style.borderColor = theme.colors.accent;
52667
- },
52668
- onMouseLeave: (e) => {
52669
- e.currentTarget.style.background = theme.colors.background;
52670
- e.currentTarget.style.borderColor = theme.colors.border;
52766
+ children: "Template"
52767
+ }
52768
+ ),
52769
+ scenario.template.introduction && /* @__PURE__ */ jsxs("div", { style: { marginBottom: "8px" }, children: [
52770
+ /* @__PURE__ */ jsx("div", { style: { fontSize: "11px", color: theme.colors.textSecondary, marginBottom: "2px" }, children: "Introduction:" }),
52771
+ /* @__PURE__ */ jsx(
52772
+ "div",
52773
+ {
52774
+ style: {
52775
+ fontSize: "12px",
52776
+ color: theme.colors.text,
52777
+ fontFamily: theme.fonts.monospace,
52778
+ padding: "6px 8px",
52779
+ background: theme.colors.background,
52780
+ borderRadius: "3px",
52781
+ border: `1px solid ${theme.colors.border}`
52782
+ },
52783
+ children: renderTemplateText(scenario.template.introduction)
52784
+ }
52785
+ )
52786
+ ] }),
52787
+ scenario.template.summary && /* @__PURE__ */ jsxs("div", { style: { marginBottom: "8px" }, children: [
52788
+ /* @__PURE__ */ jsx("div", { style: { fontSize: "11px", color: theme.colors.textSecondary, marginBottom: "2px" }, children: "Summary (closing):" }),
52789
+ /* @__PURE__ */ jsx(
52790
+ "div",
52791
+ {
52792
+ style: {
52793
+ fontSize: "12px",
52794
+ color: theme.colors.text,
52795
+ fontFamily: theme.fonts.monospace,
52796
+ padding: "6px 8px",
52797
+ background: theme.colors.background,
52798
+ borderRadius: "3px",
52799
+ border: `1px solid ${theme.colors.border}`
52800
+ },
52801
+ children: renderTemplateText(scenario.template.summary)
52802
+ }
52803
+ )
52804
+ ] }),
52805
+ scenario.template.flow && scenario.template.flow.length > 0 && /* @__PURE__ */ jsxs("div", { style: { marginBottom: "8px" }, children: [
52806
+ /* @__PURE__ */ jsxs("div", { style: { fontSize: "11px", color: theme.colors.textSecondary, marginBottom: "4px" }, children: [
52807
+ "Flow (",
52808
+ scenario.template.flow.length,
52809
+ "):"
52810
+ ] }),
52811
+ /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: scenario.template.flow.map((step, i) => /* @__PURE__ */ jsxs(
52812
+ "div",
52813
+ {
52814
+ style: {
52815
+ fontSize: "12px",
52816
+ color: theme.colors.textSecondary,
52817
+ fontFamily: theme.fonts.monospace,
52818
+ padding: "4px 8px",
52819
+ background: theme.colors.background,
52820
+ borderRadius: "3px",
52821
+ border: `1px solid ${theme.colors.border}`,
52822
+ display: "flex",
52823
+ gap: "8px"
52824
+ },
52825
+ children: [
52826
+ /* @__PURE__ */ jsxs("span", { style: { color: theme.colors.textSecondary, minWidth: "20px" }, children: [
52827
+ i + 1,
52828
+ "."
52829
+ ] }),
52830
+ /* @__PURE__ */ jsx("span", { style: { flex: 1 }, children: renderTemplateText(step) })
52831
+ ]
52671
52832
  },
52672
- children: [
52673
- /* @__PURE__ */ jsx("span", { children: exec.name }),
52674
- /* @__PURE__ */ jsx(ChevronRight, { size: 14, style: { color: theme.colors.accent, flexShrink: 0 } })
52675
- ]
52676
- },
52677
- exec.id
52678
- )) })
52679
- ] }) : null;
52680
- })()
52681
- ] })
52682
- ]
52683
- },
52684
- scenario.id || index2
52685
- ))
52833
+ i
52834
+ )) })
52835
+ ] }),
52836
+ scenario.template.details && Object.keys(scenario.template.details).length > 0 && /* @__PURE__ */ jsxs("div", { style: { marginBottom: "8px" }, children: [
52837
+ /* @__PURE__ */ jsx("div", { style: { fontSize: "11px", color: theme.colors.textSecondary, marginBottom: "4px" }, children: "Details:" }),
52838
+ /* @__PURE__ */ jsx(
52839
+ "div",
52840
+ {
52841
+ style: {
52842
+ fontSize: "12px",
52843
+ fontFamily: theme.fonts.monospace,
52844
+ padding: "6px 8px",
52845
+ background: theme.colors.background,
52846
+ borderRadius: "3px",
52847
+ border: `1px solid ${theme.colors.border}`
52848
+ },
52849
+ children: Object.entries(scenario.template.details).map(([key, value]) => /* @__PURE__ */ jsxs("div", { style: { marginBottom: "2px" }, children: [
52850
+ /* @__PURE__ */ jsxs("span", { style: { color: theme.colors.textSecondary }, children: [
52851
+ key,
52852
+ ":"
52853
+ ] }),
52854
+ " ",
52855
+ /* @__PURE__ */ jsx("span", { style: { color: theme.colors.text }, children: String(value) })
52856
+ ] }, key))
52857
+ }
52858
+ )
52859
+ ] }),
52860
+ (() => {
52861
+ const matchingExecutions = availableExecutions.filter(
52862
+ (exec) => executionScenarioMap[exec.id] === scenario.id
52863
+ );
52864
+ return matchingExecutions.length > 0 ? /* @__PURE__ */ jsxs("div", { children: [
52865
+ /* @__PURE__ */ jsxs(
52866
+ "div",
52867
+ {
52868
+ style: {
52869
+ fontSize: "11px",
52870
+ color: theme.colors.textSecondary,
52871
+ marginBottom: "4px",
52872
+ display: "flex",
52873
+ alignItems: "center",
52874
+ gap: "6px"
52875
+ },
52876
+ children: [
52877
+ /* @__PURE__ */ jsx(Database, { size: 12 }),
52878
+ /* @__PURE__ */ jsxs("span", { children: [
52879
+ "Execution Files (",
52880
+ matchingExecutions.length,
52881
+ ")"
52882
+ ] })
52883
+ ]
52884
+ }
52885
+ ),
52886
+ /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: matchingExecutions.map((exec) => /* @__PURE__ */ jsxs(
52887
+ "button",
52888
+ {
52889
+ onClick: () => onExecutionSelect == null ? void 0 : onExecutionSelect(exec.id),
52890
+ style: {
52891
+ fontSize: "12px",
52892
+ padding: "6px 8px",
52893
+ background: theme.colors.background,
52894
+ border: `1px solid ${theme.colors.border}`,
52895
+ borderRadius: "3px",
52896
+ color: theme.colors.textSecondary,
52897
+ fontFamily: theme.fonts.monospace,
52898
+ cursor: "pointer",
52899
+ display: "flex",
52900
+ alignItems: "center",
52901
+ justifyContent: "space-between",
52902
+ transition: "all 0.2s",
52903
+ textAlign: "left"
52904
+ },
52905
+ onMouseEnter: (e) => {
52906
+ e.currentTarget.style.background = theme.colors.muted;
52907
+ e.currentTarget.style.borderColor = theme.colors.accent;
52908
+ },
52909
+ onMouseLeave: (e) => {
52910
+ e.currentTarget.style.background = theme.colors.background;
52911
+ e.currentTarget.style.borderColor = theme.colors.border;
52912
+ },
52913
+ children: [
52914
+ /* @__PURE__ */ jsx("span", { children: exec.name }),
52915
+ /* @__PURE__ */ jsx(ChevronRight, { size: 14, style: { color: theme.colors.accent, flexShrink: 0 } })
52916
+ ]
52917
+ },
52918
+ exec.id
52919
+ )) })
52920
+ ] }) : null;
52921
+ })()
52922
+ ] })
52923
+ ] })
52924
+ ]
52925
+ },
52926
+ scenario.id || index2
52927
+ );
52928
+ })
52686
52929
  ] })
52687
52930
  ]
52688
52931
  }
52689
52932
  );
52690
52933
  };
52691
- const ExecutionViewerPanel = ({
52934
+ const CanvasDetailPanel = ({
52692
52935
  context,
52693
52936
  actions,
52694
- events
52937
+ events,
52938
+ selectedCanvasId: selectedCanvasIdProp,
52939
+ canvasPath: canvasPathProp,
52940
+ canvasName: canvasNameProp
52695
52941
  }) => {
52696
52942
  var _a, _b;
52697
52943
  const { theme } = useTheme();
@@ -52699,13 +52945,12 @@ const ExecutionViewerPanel = ({
52699
52945
  canvas: null,
52700
52946
  execution: null,
52701
52947
  metadata: null,
52702
- loading: true,
52948
+ loading: false,
52703
52949
  error: null,
52704
- availableCanvases: [],
52705
52950
  selectedCanvasId: null,
52951
+ canvasName: null,
52706
52952
  availableExecutions: [],
52707
52953
  selectedExecutionId: null,
52708
- showCanvasSelector: false,
52709
52954
  showNarrativeSelector: false,
52710
52955
  showExecutionSelector: false,
52711
52956
  showHelpModal: false,
@@ -52726,12 +52971,10 @@ const ExecutionViewerPanel = ({
52726
52971
  contextRef.current = context;
52727
52972
  actionsRef.current = actions;
52728
52973
  eventsRef.current = events;
52729
- const selectedCanvasIdRef = useRef(null);
52730
- selectedCanvasIdRef.current = state.selectedCanvasId;
52731
52974
  const playbackTimerRef = useRef(null);
52732
52975
  const eventNodeMapRef = useRef(/* @__PURE__ */ new Map());
52733
- const loadCanvas = useCallback(async (canvasId) => {
52734
- setState((prev) => ({ ...prev, loading: prev.canvas === null, error: null }));
52976
+ const loadCanvas = useCallback(async (canvasId, canvasPath) => {
52977
+ setState((prev) => ({ ...prev, loading: true, error: null }));
52735
52978
  try {
52736
52979
  const ctx = contextRef.current;
52737
52980
  const acts = actionsRef.current;
@@ -52751,46 +52994,15 @@ const ExecutionViewerPanel = ({
52751
52994
  metadata: null,
52752
52995
  loading: false,
52753
52996
  error: null,
52754
- availableCanvases: [],
52755
52997
  selectedCanvasId: null,
52998
+ canvasName: null,
52756
52999
  availableExecutions: [],
52757
53000
  selectedExecutionId: null
52758
53001
  }));
52759
53002
  return;
52760
53003
  }
52761
- const availableCanvases = await ExecutionLoader.findCanvasFiles(fileTreeData.allFiles);
52762
53004
  const executionFiles = await ExecutionLoader.findExecutionFiles(fileTreeData.allFiles);
52763
53005
  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
53006
  const readFile = acts.readFile;
52795
53007
  if (!readFile) {
52796
53008
  throw new Error("readFile action not available");
@@ -52799,7 +53011,7 @@ const ExecutionViewerPanel = ({
52799
53011
  if (!repositoryPath) {
52800
53012
  throw new Error("Repository path not available");
52801
53013
  }
52802
- const fullCanvasPath = `${repositoryPath}/${selectedCanvas2.path}`;
53014
+ const fullCanvasPath = `${repositoryPath}/${canvasPath}`;
52803
53015
  const canvasContent = await readFile(fullCanvasPath);
52804
53016
  if (!canvasContent || typeof canvasContent !== "string") {
52805
53017
  throw new Error("Failed to read canvas file");
@@ -52809,7 +53021,7 @@ const ExecutionViewerPanel = ({
52809
53021
  let narrativeTemplate = null;
52810
53022
  let selectedNarrativeId = null;
52811
53023
  const matchingNarrative = availableNarratives.find(
52812
- (n) => n.canvasPath === selectedCanvas2.path || n.path.replace(/\.narrative\.json$/, ".otel.canvas") === selectedCanvas2.path
53024
+ (n) => n.canvasPath === canvasPath || n.path.replace(/\.narrative\.json$/, ".otel.canvas") === canvasPath
52813
53025
  );
52814
53026
  const narrativeToLoad = matchingNarrative || (availableNarratives.length > 0 ? availableNarratives[0] : null);
52815
53027
  if (narrativeToLoad) {
@@ -52844,6 +53056,7 @@ const ExecutionViewerPanel = ({
52844
53056
  }
52845
53057
  }
52846
53058
  }
53059
+ const canvasName = canvasId.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
52847
53060
  setState((prev) => ({
52848
53061
  ...prev,
52849
53062
  canvas,
@@ -52851,8 +53064,8 @@ const ExecutionViewerPanel = ({
52851
53064
  metadata: null,
52852
53065
  loading: false,
52853
53066
  error: null,
52854
- availableCanvases,
52855
- selectedCanvasId: selectedCanvas2.id,
53067
+ selectedCanvasId: canvasId,
53068
+ canvasName,
52856
53069
  availableExecutions: executionFiles,
52857
53070
  selectedExecutionId: null,
52858
53071
  currentSpanIndex: 0,
@@ -52874,16 +53087,24 @@ const ExecutionViewerPanel = ({
52874
53087
  }
52875
53088
  }, []);
52876
53089
  useEffect(() => {
52877
- loadCanvas();
52878
- }, [loadCanvas]);
53090
+ if (selectedCanvasIdProp && canvasPathProp) {
53091
+ console.log("[CanvasDetailPanel] Loading canvas from props:", selectedCanvasIdProp, canvasPathProp);
53092
+ loadCanvas(selectedCanvasIdProp, canvasPathProp);
53093
+ if (canvasNameProp) {
53094
+ setState((prev) => ({ ...prev, canvasName: canvasNameProp }));
53095
+ }
53096
+ }
53097
+ }, [selectedCanvasIdProp, canvasPathProp, canvasNameProp, loadCanvas]);
52879
53098
  useEffect(() => {
53099
+ if (selectedCanvasIdProp && canvasPathProp) {
53100
+ return;
53101
+ }
52880
53102
  if (!events) return;
52881
53103
  const handleEvent = (event) => {
52882
- var _a2;
52883
- if (event.type === "custom" && event.action === "selectCanvas") {
52884
- const canvasId = (_a2 = event.payload) == null ? void 0 : _a2.canvasId;
52885
- if (canvasId) {
52886
- loadCanvas(canvasId);
53104
+ if (event.type === "custom") {
53105
+ const payload = event.payload;
53106
+ if ((payload == null ? void 0 : payload.action) === "selectCanvas" && (payload == null ? void 0 : payload.canvasId) && (payload == null ? void 0 : payload.canvas)) {
53107
+ loadCanvas(payload.canvasId, payload.canvas.path);
52887
53108
  }
52888
53109
  }
52889
53110
  };
@@ -52891,11 +53112,11 @@ const ExecutionViewerPanel = ({
52891
53112
  return () => {
52892
53113
  events.off("custom", handleEvent);
52893
53114
  };
52894
- }, [events, loadCanvas]);
52895
- const handlePlayPause = useCallback(() => {
53115
+ }, [events, loadCanvas, selectedCanvasIdProp, canvasPathProp]);
53116
+ useCallback(() => {
52896
53117
  setState((prev) => ({ ...prev, isPlaying: !prev.isPlaying }));
52897
53118
  }, []);
52898
- const handleReset = useCallback(() => {
53119
+ useCallback(() => {
52899
53120
  setState((prev) => ({
52900
53121
  ...prev,
52901
53122
  isPlaying: false,
@@ -53009,7 +53230,7 @@ const ExecutionViewerPanel = ({
53009
53230
  }
53010
53231
  };
53011
53232
  }, [state.isPlaying, state.execution]);
53012
- if (!state.loading && state.availableCanvases.length === 0) {
53233
+ if (!state.loading && !state.canvas) {
53013
53234
  return /* @__PURE__ */ jsx(
53014
53235
  "div",
53015
53236
  {
@@ -53023,40 +53244,8 @@ const ExecutionViewerPanel = ({
53023
53244
  },
53024
53245
  children: /* @__PURE__ */ jsxs("div", { style: { textAlign: "center", maxWidth: "600px", padding: "20px" }, children: [
53025
53246
  /* @__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 Files Found" }),
53027
- /* @__PURE__ */ jsxs("p", { style: { margin: "0 0 20px 0", color: theme.colors.textSecondary, lineHeight: 1.5 }, children: [
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
- )
53247
+ /* @__PURE__ */ jsx("h2", { style: { margin: "0 0 10px 0", fontSize: "18px", fontWeight: 600 }, children: "No Canvas Selected" }),
53248
+ /* @__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
53249
  ] })
53061
53250
  }
53062
53251
  );
@@ -53096,9 +53285,6 @@ const ExecutionViewerPanel = ({
53096
53285
  }
53097
53286
  );
53098
53287
  }
53099
- const selectedCanvas = state.availableCanvases.find(
53100
- (c) => c.id === state.selectedCanvasId
53101
- );
53102
53288
  return /* @__PURE__ */ jsxs(
53103
53289
  "div",
53104
53290
  {
@@ -53122,91 +53308,7 @@ const ExecutionViewerPanel = ({
53122
53308
  gap: "12px"
53123
53309
  },
53124
53310
  children: [
53125
- state.availableCanvases.length > 0 && /* @__PURE__ */ jsxs("div", { style: { position: "relative" }, children: [
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
- ] }),
53311
+ 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
53312
  state.availableNarratives.length > 0 && /* @__PURE__ */ jsxs("div", { style: { position: "relative" }, children: [
53211
53313
  /* @__PURE__ */ jsxs(
53212
53314
  "button",
@@ -53225,7 +53327,6 @@ const ExecutionViewerPanel = ({
53225
53327
  fontSize: "13px"
53226
53328
  },
53227
53329
  children: [
53228
- /* @__PURE__ */ jsx(FileText, { size: 16 }),
53229
53330
  /* @__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
53331
  /* @__PURE__ */ jsx(ChevronDown, { size: 16 })
53231
53332
  ]
@@ -53260,7 +53361,7 @@ const ExecutionViewerPanel = ({
53260
53361
  boxShadow: "0 4px 12px rgba(0,0,0,0.3)",
53261
53362
  zIndex: 1e3
53262
53363
  },
53263
- children: state.availableNarratives.map((narrative) => /* @__PURE__ */ jsxs(
53364
+ children: state.availableNarratives.map((narrative) => /* @__PURE__ */ jsx(
53264
53365
  "button",
53265
53366
  {
53266
53367
  onClick: async () => {
@@ -53297,15 +53398,9 @@ const ExecutionViewerPanel = ({
53297
53398
  color: "#fff",
53298
53399
  textAlign: "left",
53299
53400
  cursor: "pointer",
53300
- fontSize: "13px",
53301
- display: "flex",
53302
- alignItems: "center",
53303
- gap: "8px"
53401
+ fontSize: "13px"
53304
53402
  },
53305
- children: [
53306
- /* @__PURE__ */ jsx(FileText, { size: 14 }),
53307
- /* @__PURE__ */ jsx("span", { style: { flex: 1 }, children: narrative.name })
53308
- ]
53403
+ children: narrative.name
53309
53404
  },
53310
53405
  narrative.id
53311
53406
  ))
@@ -53331,7 +53426,6 @@ const ExecutionViewerPanel = ({
53331
53426
  fontSize: "13px"
53332
53427
  },
53333
53428
  children: [
53334
- /* @__PURE__ */ jsx(Database, { size: 16 }),
53335
53429
  /* @__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
53430
  /* @__PURE__ */ jsx(ChevronDown, { size: 16 })
53337
53431
  ]
@@ -53398,7 +53492,7 @@ const ExecutionViewerPanel = ({
53398
53492
  children: "None (show scenario mapping)"
53399
53493
  }
53400
53494
  ),
53401
- state.availableExecutions.map((execution) => /* @__PURE__ */ jsxs(
53495
+ state.availableExecutions.map((execution) => /* @__PURE__ */ jsx(
53402
53496
  "button",
53403
53497
  {
53404
53498
  onClick: async () => {
@@ -53440,15 +53534,9 @@ const ExecutionViewerPanel = ({
53440
53534
  color: "#fff",
53441
53535
  textAlign: "left",
53442
53536
  cursor: "pointer",
53443
- fontSize: "13px",
53444
- display: "flex",
53445
- alignItems: "center",
53446
- gap: "8px"
53537
+ fontSize: "13px"
53447
53538
  },
53448
- children: [
53449
- /* @__PURE__ */ jsx(Database, { size: 14 }),
53450
- /* @__PURE__ */ jsx("span", { style: { flex: 1 }, children: execution.name })
53451
- ]
53539
+ children: execution.name
53452
53540
  },
53453
53541
  execution.id
53454
53542
  ))
@@ -53512,49 +53600,6 @@ const ExecutionViewerPanel = ({
53512
53600
  children: /* @__PURE__ */ jsx(Grid3x3, { size: 14 })
53513
53601
  }
53514
53602
  ),
53515
- state.execution && /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "8px" }, children: [
53516
- /* @__PURE__ */ jsx(
53517
- "button",
53518
- {
53519
- onClick: handleReset,
53520
- style: {
53521
- padding: "6px 10px",
53522
- background: "#2a2a2a",
53523
- border: "1px solid #3a3a3a",
53524
- borderRadius: "4px",
53525
- color: "#fff",
53526
- cursor: "pointer",
53527
- display: "flex",
53528
- alignItems: "center",
53529
- gap: "4px"
53530
- },
53531
- title: "Reset",
53532
- children: /* @__PURE__ */ jsx(RotateCcw, { size: 14 })
53533
- }
53534
- ),
53535
- /* @__PURE__ */ jsxs(
53536
- "button",
53537
- {
53538
- onClick: handlePlayPause,
53539
- style: {
53540
- padding: "6px 10px",
53541
- background: state.isPlaying ? "#ef4444" : "#10b981",
53542
- border: "none",
53543
- borderRadius: "4px",
53544
- color: "#fff",
53545
- cursor: "pointer",
53546
- display: "flex",
53547
- alignItems: "center",
53548
- gap: "4px",
53549
- fontWeight: 600
53550
- },
53551
- children: [
53552
- state.isPlaying ? /* @__PURE__ */ jsx(Pause, { size: 14 }) : /* @__PURE__ */ jsx(Play, { size: 14 }),
53553
- state.isPlaying ? "Pause" : "Play"
53554
- ]
53555
- }
53556
- )
53557
- ] }),
53558
53603
  state.canvas && !state.execution && state.availableNarratives.length === 0 && /* @__PURE__ */ jsx("div", { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsxs(
53559
53604
  "button",
53560
53605
  {
@@ -53677,7 +53722,7 @@ const ExecutionViewerPanel = ({
53677
53722
  },
53678
53723
  children: /* @__PURE__ */ jsxs("div", { style: { textAlign: "center" }, children: [
53679
53724
  /* @__PURE__ */ jsx("p", { children: "Canvas not loaded" }),
53680
- /* @__PURE__ */ jsx("p", { style: { fontSize: "12px", marginTop: "8px" }, children: (selectedCanvas == null ? void 0 : selectedCanvas.path) || "No canvas selected" })
53725
+ /* @__PURE__ */ jsx("p", { style: { fontSize: "12px", marginTop: "8px" }, children: state.canvasName || "No canvas selected" })
53681
53726
  ] })
53682
53727
  }
53683
53728
  )
@@ -53746,6 +53791,445 @@ const ExecutionViewerPanel = ({
53746
53791
  }
53747
53792
  );
53748
53793
  };
53794
+ const EMPTY_CANVAS_ARRAY = [];
53795
+ const useCanvasData = ({
53796
+ context
53797
+ }) => {
53798
+ const [canvases, setCanvases] = useState(EMPTY_CANVAS_ARRAY);
53799
+ const [isLoading, setIsLoading] = useState(true);
53800
+ const [error, setError] = useState(null);
53801
+ const fileTreeSlice = context.getSlice("fileTree");
53802
+ const fileTreeData = fileTreeSlice == null ? void 0 : fileTreeSlice.data;
53803
+ const fileTreeSha = fileTreeData == null ? void 0 : fileTreeData.sha;
53804
+ const lastLoadedSha = useRef(void 0);
53805
+ const loadCanvases = useCallback(async () => {
53806
+ if (fileTreeSha === lastLoadedSha.current) {
53807
+ console.log("[useCanvasData] Skipping reload - data unchanged (SHA:", fileTreeSha, ")");
53808
+ return;
53809
+ }
53810
+ console.log("[useCanvasData] Loading canvases - SHA changed:", fileTreeSha !== lastLoadedSha.current);
53811
+ setIsLoading(true);
53812
+ setError(null);
53813
+ try {
53814
+ if (!(fileTreeData == null ? void 0 : fileTreeData.allFiles)) {
53815
+ setCanvases(EMPTY_CANVAS_ARRAY);
53816
+ lastLoadedSha.current = fileTreeSha;
53817
+ return;
53818
+ }
53819
+ const foundCanvases = ExecutionLoader.findCanvasFiles(fileTreeData.allFiles);
53820
+ console.log("[useCanvasData] Found canvases:", foundCanvases.length);
53821
+ setCanvases(foundCanvases);
53822
+ lastLoadedSha.current = fileTreeSha;
53823
+ } catch (err) {
53824
+ const errorMessage = err instanceof Error ? err.message : "Failed to load canvases";
53825
+ setError(errorMessage);
53826
+ console.error("Error loading canvases:", err);
53827
+ } finally {
53828
+ setIsLoading(false);
53829
+ }
53830
+ }, [fileTreeData, fileTreeSha]);
53831
+ const refreshCanvases = useCallback(async () => {
53832
+ lastLoadedSha.current = void 0;
53833
+ await loadCanvases();
53834
+ }, [loadCanvases]);
53835
+ useEffect(() => {
53836
+ loadCanvases();
53837
+ }, [loadCanvases]);
53838
+ return {
53839
+ canvases,
53840
+ isLoading,
53841
+ error,
53842
+ refreshCanvases
53843
+ };
53844
+ };
53845
+ const CanvasCard = ({
53846
+ canvas,
53847
+ onClick,
53848
+ isSelected = false
53849
+ }) => {
53850
+ const { theme } = useTheme();
53851
+ return /* @__PURE__ */ jsxs(
53852
+ "div",
53853
+ {
53854
+ onClick: () => onClick(canvas),
53855
+ style: {
53856
+ padding: "16px",
53857
+ background: isSelected ? `${theme.colors.primary}15` : theme.colors.backgroundSecondary,
53858
+ border: `1px solid ${isSelected ? theme.colors.primary : theme.colors.border}`,
53859
+ borderRadius: theme.radii[2],
53860
+ cursor: "pointer",
53861
+ transition: "all 0.2s ease",
53862
+ display: "flex",
53863
+ flexDirection: "column",
53864
+ gap: "12px",
53865
+ boxSizing: "border-box"
53866
+ },
53867
+ onMouseEnter: (e) => {
53868
+ if (!isSelected) {
53869
+ e.currentTarget.style.borderColor = theme.colors.primary;
53870
+ e.currentTarget.style.background = `${theme.colors.backgroundSecondary}cc`;
53871
+ }
53872
+ },
53873
+ onMouseLeave: (e) => {
53874
+ if (!isSelected) {
53875
+ e.currentTarget.style.borderColor = theme.colors.border;
53876
+ e.currentTarget.style.background = theme.colors.backgroundSecondary;
53877
+ }
53878
+ },
53879
+ children: [
53880
+ /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx(
53881
+ "h3",
53882
+ {
53883
+ style: {
53884
+ margin: 0,
53885
+ fontSize: theme.fontSizes[2],
53886
+ color: isSelected ? theme.colors.primary : theme.colors.text,
53887
+ fontWeight: 600,
53888
+ flex: 1
53889
+ },
53890
+ children: canvas.name
53891
+ }
53892
+ ) }),
53893
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
53894
+ /* @__PURE__ */ jsx(Folder, { size: 14, color: theme.colors.textSecondary }),
53895
+ /* @__PURE__ */ jsx(
53896
+ "span",
53897
+ {
53898
+ style: {
53899
+ fontSize: theme.fontSizes[0],
53900
+ color: theme.colors.textSecondary,
53901
+ fontFamily: "monospace"
53902
+ },
53903
+ children: canvas.source === "folder" ? ".principal-views" : "standalone"
53904
+ }
53905
+ )
53906
+ ] }),
53907
+ /* @__PURE__ */ jsx(
53908
+ "div",
53909
+ {
53910
+ style: {
53911
+ fontSize: theme.fontSizes[0],
53912
+ color: theme.colors.textSecondary,
53913
+ fontFamily: "monospace",
53914
+ overflow: "hidden",
53915
+ textOverflow: "ellipsis",
53916
+ whiteSpace: "nowrap"
53917
+ },
53918
+ title: canvas.path,
53919
+ children: canvas.path
53920
+ }
53921
+ )
53922
+ ]
53923
+ }
53924
+ );
53925
+ };
53926
+ const CanvasListPanel = ({
53927
+ context,
53928
+ events
53929
+ }) => {
53930
+ const { theme } = useTheme();
53931
+ const panelRef = useRef(null);
53932
+ const [selectedCanvasId, setSelectedCanvasId] = useState(null);
53933
+ const [searchQuery, setSearchQuery] = useState("");
53934
+ const [isRefreshing, setIsRefreshing] = useState(false);
53935
+ const { canvases, isLoading, error, refreshCanvases } = useCanvasData({ context });
53936
+ const filteredCanvases = useMemo(() => {
53937
+ if (!searchQuery.trim()) {
53938
+ return canvases;
53939
+ }
53940
+ const query = searchQuery.toLowerCase().trim();
53941
+ return canvases.filter((canvas) => {
53942
+ if (canvas.name.toLowerCase().includes(query)) return true;
53943
+ if (canvas.path.toLowerCase().includes(query)) return true;
53944
+ if (canvas.basename.toLowerCase().includes(query)) return true;
53945
+ return false;
53946
+ });
53947
+ }, [canvases, searchQuery]);
53948
+ const handleCanvasClick = (canvas) => {
53949
+ setSelectedCanvasId(canvas.id);
53950
+ if (events) {
53951
+ events.emit({
53952
+ type: "custom",
53953
+ source: "canvas-list-panel",
53954
+ timestamp: Date.now(),
53955
+ payload: { action: "selectCanvas", canvasId: canvas.id, canvas }
53956
+ });
53957
+ }
53958
+ };
53959
+ const handleRefresh = async () => {
53960
+ setIsRefreshing(true);
53961
+ if (events) {
53962
+ events.emit({
53963
+ type: "custom",
53964
+ source: "canvas-list-panel",
53965
+ timestamp: Date.now(),
53966
+ payload: { action: "refreshCanvases" }
53967
+ });
53968
+ }
53969
+ try {
53970
+ await refreshCanvases();
53971
+ } finally {
53972
+ setIsRefreshing(false);
53973
+ }
53974
+ };
53975
+ return /* @__PURE__ */ jsxs(
53976
+ "div",
53977
+ {
53978
+ ref: panelRef,
53979
+ tabIndex: -1,
53980
+ style: {
53981
+ padding: "clamp(12px, 3vw, 20px)",
53982
+ fontFamily: theme.fonts.body,
53983
+ height: "100%",
53984
+ boxSizing: "border-box",
53985
+ display: "flex",
53986
+ flexDirection: "column",
53987
+ gap: "16px",
53988
+ overflow: "hidden",
53989
+ backgroundColor: theme.colors.background,
53990
+ color: theme.colors.text,
53991
+ outline: "none"
53992
+ },
53993
+ children: [
53994
+ /* @__PURE__ */ jsxs(
53995
+ "div",
53996
+ {
53997
+ style: {
53998
+ flexShrink: 0,
53999
+ display: "flex",
54000
+ alignItems: "center",
54001
+ justifyContent: "space-between",
54002
+ gap: "12px",
54003
+ flexWrap: "wrap"
54004
+ },
54005
+ children: [
54006
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
54007
+ /* @__PURE__ */ jsx(
54008
+ "h2",
54009
+ {
54010
+ style: {
54011
+ margin: 0,
54012
+ fontSize: theme.fontSizes[4],
54013
+ color: theme.colors.text
54014
+ },
54015
+ children: "Canvas Files"
54016
+ }
54017
+ ),
54018
+ !isLoading && /* @__PURE__ */ jsxs(
54019
+ "span",
54020
+ {
54021
+ style: {
54022
+ fontSize: theme.fontSizes[1],
54023
+ color: theme.colors.textSecondary,
54024
+ background: theme.colors.backgroundSecondary,
54025
+ padding: "4px 10px",
54026
+ borderRadius: theme.radii[1]
54027
+ },
54028
+ children: [
54029
+ filteredCanvases.length,
54030
+ " ",
54031
+ filteredCanvases.length === 1 ? "canvas" : "canvases"
54032
+ ]
54033
+ }
54034
+ )
54035
+ ] }),
54036
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "12px", flex: "1 1 200px", maxWidth: "400px" }, children: [
54037
+ /* @__PURE__ */ jsxs(
54038
+ "div",
54039
+ {
54040
+ style: {
54041
+ position: "relative",
54042
+ flex: 1,
54043
+ minWidth: "150px"
54044
+ },
54045
+ children: [
54046
+ /* @__PURE__ */ jsx(
54047
+ Search,
54048
+ {
54049
+ size: 16,
54050
+ color: theme.colors.textSecondary,
54051
+ style: {
54052
+ position: "absolute",
54053
+ left: "10px",
54054
+ top: "50%",
54055
+ transform: "translateY(-50%)",
54056
+ pointerEvents: "none"
54057
+ }
54058
+ }
54059
+ ),
54060
+ /* @__PURE__ */ jsx(
54061
+ "input",
54062
+ {
54063
+ type: "text",
54064
+ placeholder: "Search canvases...",
54065
+ value: searchQuery,
54066
+ onChange: (e) => setSearchQuery(e.target.value),
54067
+ style: {
54068
+ width: "100%",
54069
+ padding: "8px 32px 8px 32px",
54070
+ fontSize: theme.fontSizes[1],
54071
+ fontFamily: theme.fonts.body,
54072
+ border: `1px solid ${theme.colors.border}`,
54073
+ borderRadius: theme.radii[2],
54074
+ background: theme.colors.backgroundSecondary,
54075
+ color: theme.colors.text,
54076
+ outline: "none",
54077
+ boxSizing: "border-box"
54078
+ }
54079
+ }
54080
+ ),
54081
+ searchQuery && /* @__PURE__ */ jsx(
54082
+ "button",
54083
+ {
54084
+ onClick: () => setSearchQuery(""),
54085
+ style: {
54086
+ position: "absolute",
54087
+ right: "6px",
54088
+ top: "50%",
54089
+ transform: "translateY(-50%)",
54090
+ background: "transparent",
54091
+ border: "none",
54092
+ padding: "4px",
54093
+ cursor: "pointer",
54094
+ display: "flex",
54095
+ alignItems: "center",
54096
+ justifyContent: "center",
54097
+ color: theme.colors.textSecondary
54098
+ },
54099
+ "aria-label": "Clear search",
54100
+ children: /* @__PURE__ */ jsx(X, { size: 14 })
54101
+ }
54102
+ )
54103
+ ]
54104
+ }
54105
+ ),
54106
+ /* @__PURE__ */ jsx(
54107
+ "button",
54108
+ {
54109
+ onClick: handleRefresh,
54110
+ disabled: isRefreshing || isLoading,
54111
+ style: {
54112
+ background: theme.colors.backgroundSecondary,
54113
+ border: `1px solid ${theme.colors.border}`,
54114
+ borderRadius: theme.radii[1],
54115
+ padding: "8px",
54116
+ cursor: isRefreshing ? "wait" : "pointer",
54117
+ display: "flex",
54118
+ alignItems: "center",
54119
+ justifyContent: "center",
54120
+ transition: "all 0.2s ease"
54121
+ },
54122
+ title: "Refresh canvases",
54123
+ children: /* @__PURE__ */ jsx(
54124
+ RefreshCw,
54125
+ {
54126
+ size: 16,
54127
+ color: theme.colors.textSecondary,
54128
+ style: {
54129
+ animation: isRefreshing ? "spin 1s linear infinite" : "none"
54130
+ }
54131
+ }
54132
+ )
54133
+ }
54134
+ )
54135
+ ] })
54136
+ ]
54137
+ }
54138
+ ),
54139
+ error && /* @__PURE__ */ jsxs(
54140
+ "div",
54141
+ {
54142
+ style: {
54143
+ flexShrink: 0,
54144
+ padding: "12px",
54145
+ background: `${theme.colors.error}20`,
54146
+ border: `1px solid ${theme.colors.error}`,
54147
+ borderRadius: theme.radii[2],
54148
+ display: "flex",
54149
+ alignItems: "center",
54150
+ gap: "8px",
54151
+ color: theme.colors.error,
54152
+ fontSize: theme.fontSizes[1]
54153
+ },
54154
+ children: [
54155
+ /* @__PURE__ */ jsx(CircleAlert, { size: 16 }),
54156
+ /* @__PURE__ */ jsx("span", { children: error })
54157
+ ]
54158
+ }
54159
+ ),
54160
+ /* @__PURE__ */ jsx(
54161
+ "div",
54162
+ {
54163
+ style: {
54164
+ flex: 1,
54165
+ overflowY: "auto",
54166
+ minHeight: 0
54167
+ },
54168
+ children: isLoading ? /* @__PURE__ */ jsx(
54169
+ "div",
54170
+ {
54171
+ style: {
54172
+ height: "100%",
54173
+ display: "flex",
54174
+ alignItems: "center",
54175
+ justifyContent: "center",
54176
+ color: theme.colors.textSecondary,
54177
+ fontSize: theme.fontSizes[2]
54178
+ },
54179
+ children: "Loading canvases..."
54180
+ }
54181
+ ) : filteredCanvases.length === 0 ? /* @__PURE__ */ jsxs(
54182
+ "div",
54183
+ {
54184
+ style: {
54185
+ height: "100%",
54186
+ display: "flex",
54187
+ flexDirection: "column",
54188
+ alignItems: "center",
54189
+ justifyContent: "center",
54190
+ gap: "16px",
54191
+ color: theme.colors.textSecondary,
54192
+ padding: "24px"
54193
+ },
54194
+ children: [
54195
+ /* @__PURE__ */ jsx(Activity, { size: 48, color: theme.colors.border }),
54196
+ /* @__PURE__ */ jsxs("div", { style: { textAlign: "center" }, children: [
54197
+ /* @__PURE__ */ jsx("p", { style: { margin: 0, fontSize: theme.fontSizes[2] }, children: searchQuery ? "No canvases match your search" : "No canvas files found" }),
54198
+ /* @__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" })
54199
+ ] })
54200
+ ]
54201
+ }
54202
+ ) : /* @__PURE__ */ jsx(
54203
+ "div",
54204
+ {
54205
+ style: {
54206
+ display: "grid",
54207
+ gridTemplateColumns: "repeat(auto-fill, minmax(250px, 1fr))",
54208
+ gap: "16px",
54209
+ padding: "4px"
54210
+ },
54211
+ children: filteredCanvases.map((canvas) => /* @__PURE__ */ jsx(
54212
+ CanvasCard,
54213
+ {
54214
+ canvas,
54215
+ onClick: handleCanvasClick,
54216
+ isSelected: selectedCanvasId === canvas.id
54217
+ },
54218
+ canvas.id
54219
+ ))
54220
+ }
54221
+ )
54222
+ }
54223
+ ),
54224
+ /* @__PURE__ */ jsx("style", { children: `
54225
+ @keyframes spin {
54226
+ to { transform: rotate(360deg); }
54227
+ }
54228
+ ` })
54229
+ ]
54230
+ }
54231
+ );
54232
+ };
53749
54233
  const focusNodeTool = {
53750
54234
  name: "focus_node",
53751
54235
  description: "Focuses the graph view on a specific node",
@@ -54549,19 +55033,44 @@ const panels = [
54549
55033
  },
54550
55034
  {
54551
55035
  metadata: {
54552
- id: "principal-ai.execution-viewer",
54553
- name: "Execution Viewer",
55036
+ id: "principal-ai.canvas-detail",
55037
+ name: "Canvas Detail",
54554
55038
  icon: "⚡",
54555
55039
  version: "0.1.0",
54556
55040
  author: "Principal AI",
54557
- description: "Visualizes execution artifacts (test runs) overlaid on canvas diagrams with playback controls",
55041
+ description: "Visualizes canvas details with execution artifacts, narrative templates, and playback controls",
55042
+ slices: ["fileTree"]
55043
+ },
55044
+ component: CanvasDetailPanel,
55045
+ onMount: async (context) => {
55046
+ var _a;
55047
+ console.log(
55048
+ "Canvas Detail Panel mounted",
55049
+ (_a = context.currentScope.repository) == null ? void 0 : _a.path
55050
+ );
55051
+ if (context.hasSlice("fileTree") && !context.isSliceLoading("fileTree")) {
55052
+ await context.refresh("repository", "fileTree");
55053
+ }
55054
+ },
55055
+ onUnmount: async (_context) => {
55056
+ console.log("Canvas Detail Panel unmounting");
55057
+ }
55058
+ },
55059
+ {
55060
+ metadata: {
55061
+ id: "principal-ai.canvas-list",
55062
+ name: "Canvas List",
55063
+ icon: "📋",
55064
+ version: "0.1.0",
55065
+ author: "Principal AI",
55066
+ description: "Lists and manages .otel.canvas files in the project with search and selection",
54558
55067
  slices: ["fileTree"]
54559
55068
  },
54560
- component: ExecutionViewerPanel,
55069
+ component: CanvasListPanel,
54561
55070
  onMount: async (context) => {
54562
55071
  var _a;
54563
55072
  console.log(
54564
- "Execution Viewer Panel mounted",
55073
+ "Canvas List Panel mounted",
54565
55074
  (_a = context.currentScope.repository) == null ? void 0 : _a.path
54566
55075
  );
54567
55076
  if (context.hasSlice("fileTree") && !context.isSliceLoading("fileTree")) {
@@ -54569,7 +55078,7 @@ const panels = [
54569
55078
  }
54570
55079
  },
54571
55080
  onUnmount: async (_context) => {
54572
- console.log("Execution Viewer Panel unmounting");
55081
+ console.log("Canvas List Panel unmounting");
54573
55082
  }
54574
55083
  }
54575
55084
  ];
@@ -54580,8 +55089,9 @@ const onPackageUnload = async () => {
54580
55089
  console.log("Panel package unloading - Principal View Graph Panel");
54581
55090
  };
54582
55091
  export {
55092
+ CanvasDetailPanel,
55093
+ CanvasListPanel,
54583
55094
  EventControllerPanel,
54584
- ExecutionViewerPanel,
54585
55095
  PanelFileSystemAdapter,
54586
55096
  TraceViewerPanel,
54587
55097
  focusNodeTool,