@industry-theme/principal-view-panels 0.12.83 → 0.12.85

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.
@@ -1 +1 @@
1
- {"version":3,"file":"StoryboardListPanel.d.ts","sourceRoot":"","sources":["../../src/panels/StoryboardListPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAEjF,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AA2K9D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAivDvE,CAAC"}
1
+ {"version":3,"file":"StoryboardListPanel.d.ts","sourceRoot":"","sources":["../../src/panels/StoryboardListPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAEjF,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AA2K9D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAyxDvE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useCanvasData.d.ts","sourceRoot":"","sources":["../../../../src/panels/canvas-list/hooks/useCanvasData.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AACnF,OAAO,EACL,eAAe,EACf,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAErE,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;CACtC;AAED,UAAU,mBAAmB;IAC3B,OAAO,EAAE,oBAAoB,CAAC;IAC9B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M,GAAG,IAAI,CAAC;IACrB,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,oEAAoE;IACpE,SAAS,EAAE,eAAe,CAAC;CAC5B;AAQD;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,uBAG3B,mBAAmB,KAAG,mBAuHxB,CAAC"}
@@ -195408,6 +195408,7 @@ const useCanvasData = ({
195408
195408
  const lastLoadedSha = useRef(void 0);
195409
195409
  const discovery = useRef(new CanvasDiscovery());
195410
195410
  const loadCanvases = useCallback(async () => {
195411
+ var _a2;
195411
195412
  if (fileTreeSha === lastLoadedSha.current) {
195412
195413
  return;
195413
195414
  }
@@ -195422,6 +195423,11 @@ const useCanvasData = ({
195422
195423
  lastLoadedSha.current = fileTreeSha;
195423
195424
  return;
195424
195425
  }
195426
+ console.log("[useCanvasData] Starting discovery with fileTree:", {
195427
+ hasFileTree: !!fileTreeData,
195428
+ fileCount: (_a2 = fileTreeData == null ? void 0 : fileTreeData.allFiles) == null ? void 0 : _a2.length,
195429
+ sha: fileTreeData == null ? void 0 : fileTreeData.sha
195430
+ });
195425
195431
  const result = await discovery.current.discover(fileTreeData, {
195426
195432
  // Include content to extract markdown paths from pv.markdown field
195427
195433
  includeContent: true,
@@ -195432,6 +195438,13 @@ const useCanvasData = ({
195432
195438
  return await readFile(path2);
195433
195439
  }
195434
195440
  });
195441
+ console.log("[useCanvasData] Discovery result:", {
195442
+ canvasCount: result.canvases.length,
195443
+ storyboardCount: result.storyboards.length,
195444
+ dashboardCount: result.dashboards.length,
195445
+ testTraceCount: result.testTraces.length,
195446
+ errorCount: result.errors.length
195447
+ });
195435
195448
  if (result.errors.length > 0) {
195436
195449
  console.warn("[useCanvasData] Discovery errors:", result.errors);
195437
195450
  }
@@ -195442,6 +195455,7 @@ const useCanvasData = ({
195442
195455
  setStoryboards(result.storyboards);
195443
195456
  setTestTraces(result.testTraces);
195444
195457
  setDashboards(result.dashboards);
195458
+ console.log("[useCanvasData] Discovered dashboards:", result.dashboards.length, result.dashboards.map((d) => ({ id: d.id, name: d.name, path: d.path })));
195445
195459
  lastLoadedSha.current = fileTreeSha;
195446
195460
  } catch (err) {
195447
195461
  const errorMessage = err instanceof Error ? err.message : "Failed to load canvases";
@@ -196300,12 +196314,23 @@ const StoryboardListPanel = ({
196300
196314
  return filteredStoryboards.map((storyboard) => storyboard.canvas);
196301
196315
  }, [filteredStoryboards]);
196302
196316
  const handleTreeNodeClick = useCallback((node2, event) => {
196303
- var _a3, _b3, _c, _d, _e4, _f, _g;
196317
+ var _a3, _b3, _c, _d, _e4, _f, _g, _h, _i;
196318
+ const asCanvasListNode = node2;
196319
+ console.log("[StoryboardListPanel] Tree node clicked:", {
196320
+ nodeType: node2.type,
196321
+ nodeId: node2.id,
196322
+ nodeName: node2.name,
196323
+ hasDashboard: !!asCanvasListNode.dashboard,
196324
+ dashboardId: (_a3 = asCanvasListNode.dashboard) == null ? void 0 : _a3.id,
196325
+ hasCanvas: !!node2.canvas
196326
+ });
196304
196327
  if ((event == null ? void 0 : event.metaKey) || (event == null ? void 0 : event.ctrlKey)) {
196305
196328
  let filePath;
196306
- if (node2.type === "canvas" && ((_a3 = node2.canvas) == null ? void 0 : _a3.path)) {
196329
+ if (node2.type === "canvas" && ((_b3 = asCanvasListNode.dashboard) == null ? void 0 : _b3.path)) {
196330
+ filePath = asCanvasListNode.dashboard.path;
196331
+ } else if (node2.type === "canvas" && ((_c = node2.canvas) == null ? void 0 : _c.path)) {
196307
196332
  filePath = node2.canvas.path;
196308
- } else if (node2.type === "workflow" && "workflow" in node2 && ((_b3 = node2.workflow) == null ? void 0 : _b3.path)) {
196333
+ } else if (node2.type === "workflow" && "workflow" in node2 && ((_d = node2.workflow) == null ? void 0 : _d.path)) {
196309
196334
  filePath = node2.workflow.path;
196310
196335
  } else if (node2.markdownPath) {
196311
196336
  filePath = node2.markdownPath;
@@ -196321,7 +196346,7 @@ const StoryboardListPanel = ({
196321
196346
  }
196322
196347
  }
196323
196348
  if (node2.type === "overview" && node2.markdownPath) {
196324
- const canvasId = ((_c = node2.canvas) == null ? void 0 : _c.id) || "storyboard" in node2 && ((_e4 = (_d = node2.storyboard) == null ? void 0 : _d.canvas) == null ? void 0 : _e4.id) || "unknown";
196349
+ const canvasId = ((_e4 = node2.canvas) == null ? void 0 : _e4.id) || "storyboard" in node2 && ((_g = (_f = node2.storyboard) == null ? void 0 : _f.canvas) == null ? void 0 : _g.id) || "unknown";
196325
196350
  setSelectedNodeId(`overview:${canvasId}`);
196326
196351
  if (events) {
196327
196352
  events.emit({
@@ -196331,6 +196356,26 @@ const StoryboardListPanel = ({
196331
196356
  payload: { path: node2.markdownPath }
196332
196357
  });
196333
196358
  }
196359
+ } else if (node2.type === "canvas" && asCanvasListNode.dashboard) {
196360
+ console.log("[StoryboardListPanel] Dashboard click - emitting openDashboard event:", {
196361
+ dashboardId: asCanvasListNode.dashboard.id,
196362
+ dashboardName: asCanvasListNode.dashboard.name,
196363
+ hasEvents: !!events
196364
+ });
196365
+ setSelectedNodeId(`dashboard:${asCanvasListNode.dashboard.id}`);
196366
+ if (events) {
196367
+ events.emit({
196368
+ type: "custom",
196369
+ source: "storyboard-list-panel",
196370
+ timestamp: Date.now(),
196371
+ payload: {
196372
+ action: "openDashboard",
196373
+ dashboardId: asCanvasListNode.dashboard.id,
196374
+ dashboard: asCanvasListNode.dashboard,
196375
+ openMode: "editor"
196376
+ }
196377
+ });
196378
+ }
196334
196379
  } else if (node2.type === "canvas" && node2.canvas) {
196335
196380
  setSelectedNodeId(`canvas:${node2.canvas.id}`);
196336
196381
  telemetry.emitCanvasSelected(
@@ -196365,7 +196410,7 @@ const StoryboardListPanel = ({
196365
196410
  return wf.file.path === ((_a4 = node2.workflow) == null ? void 0 : _a4.path);
196366
196411
  });
196367
196412
  if (!fullWorkflow) {
196368
- console.warn("[StoryboardListPanel] Workflow template not loaded for:", (_f = node2.workflow) == null ? void 0 : _f.path);
196413
+ console.warn("[StoryboardListPanel] Workflow template not loaded for:", (_h = node2.workflow) == null ? void 0 : _h.path);
196369
196414
  return;
196370
196415
  }
196371
196416
  telemetry.emitWorkflowSelected(
@@ -196373,7 +196418,7 @@ const StoryboardListPanel = ({
196373
196418
  node2.workflow.name,
196374
196419
  node2.workflow.path,
196375
196420
  node2.storyboard.canvas.id,
196376
- ((_g = fullWorkflow.template.scenarios) == null ? void 0 : _g.length) ?? 0
196421
+ ((_i = fullWorkflow.template.scenarios) == null ? void 0 : _i.length) ?? 0
196377
196422
  );
196378
196423
  events.emit({
196379
196424
  type: "custom",
@@ -196395,16 +196440,19 @@ const StoryboardListPanel = ({
196395
196440
  }
196396
196441
  }, [events, getCanvasFileInfo, workflows, telemetry]);
196397
196442
  const getNodeFilePath = useCallback((node2) => {
196398
- var _a3, _b3, _c, _d, _e4;
196399
- if (node2.type === "canvas" && ((_a3 = node2.canvas) == null ? void 0 : _a3.path)) {
196443
+ var _a3, _b3, _c, _d, _e4, _f;
196444
+ const canvasNode = node2;
196445
+ if (node2.type === "canvas" && ((_a3 = canvasNode.dashboard) == null ? void 0 : _a3.path)) {
196446
+ return canvasNode.dashboard.path;
196447
+ } else if (node2.type === "canvas" && ((_b3 = node2.canvas) == null ? void 0 : _b3.path)) {
196400
196448
  return node2.canvas.path;
196401
- } else if (node2.type === "workflow" && "workflow" in node2 && ((_b3 = node2.workflow) == null ? void 0 : _b3.path)) {
196449
+ } else if (node2.type === "workflow" && "workflow" in node2 && ((_c = node2.workflow) == null ? void 0 : _c.path)) {
196402
196450
  return node2.workflow.path;
196403
196451
  } else if (node2.type === "overview" && node2.markdownPath) {
196404
196452
  return node2.markdownPath;
196405
- } else if (node2.type === "storyboard" && "storyboard" in node2 && ((_d = (_c = node2.storyboard) == null ? void 0 : _c.canvas) == null ? void 0 : _d.path)) {
196453
+ } else if (node2.type === "storyboard" && "storyboard" in node2 && ((_e4 = (_d = node2.storyboard) == null ? void 0 : _d.canvas) == null ? void 0 : _e4.path)) {
196406
196454
  return node2.storyboard.canvas.path;
196407
- } else if (node2.type === "canvas-folder" && ((_e4 = node2.canvas) == null ? void 0 : _e4.path)) {
196455
+ } else if (node2.type === "canvas-folder" && ((_f = node2.canvas) == null ? void 0 : _f.path)) {
196408
196456
  return node2.canvas.path;
196409
196457
  }
196410
196458
  return void 0;