@principal-ade/dynamic-file-tree 0.1.70 → 0.1.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +79 -27
- package/dist/src/components/CanvasListTree/CanvasListTreeCore.d.ts.map +1 -1
- package/dist/src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTree.stories.d.ts +1 -0
- package/dist/src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTree.stories.d.ts.map +1 -1
- package/dist/src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2213,41 +2213,56 @@ var buildTreeDataFromVersions = (versionSnapshots, workflowCoverageMap, filterMo
|
|
|
2213
2213
|
};
|
|
2214
2214
|
var getDefaultDragConfig = (node) => {
|
|
2215
2215
|
const DATA_TYPES = {
|
|
2216
|
-
|
|
2217
|
-
DIRECTORY_PATH: "directory-path"
|
|
2216
|
+
TEXT_SELECTION: "text-selection"
|
|
2218
2217
|
};
|
|
2219
2218
|
const DRAG_ACTIONS = {
|
|
2220
2219
|
INSERT_PATH: "insert-path",
|
|
2221
2220
|
OPEN: "open"
|
|
2222
2221
|
};
|
|
2222
|
+
const CLI = "npx @principal-ai/principal-view-cli@latest";
|
|
2223
2223
|
switch (node.type) {
|
|
2224
2224
|
case "canvas":
|
|
2225
2225
|
if (node.canvas) {
|
|
2226
|
+
const canvasType = node.canvas.type === "otel" ? "OTEL Canvas" : "Canvas";
|
|
2227
|
+
const content = [
|
|
2228
|
+
`# ${canvasType}: ${node.canvas.name}`,
|
|
2229
|
+
`# View with: ${CLI} canvas view "${node.canvas.path}"`,
|
|
2230
|
+
node.canvas.path
|
|
2231
|
+
].join(`
|
|
2232
|
+
`);
|
|
2226
2233
|
return {
|
|
2227
|
-
dataType: DATA_TYPES.
|
|
2228
|
-
primaryData:
|
|
2234
|
+
dataType: DATA_TYPES.TEXT_SELECTION,
|
|
2235
|
+
primaryData: content,
|
|
2229
2236
|
metadata: {
|
|
2230
2237
|
name: node.canvas.name,
|
|
2231
2238
|
type: "canvas",
|
|
2232
2239
|
canvasType: node.canvas.type,
|
|
2233
|
-
storyboardId: node.storyboard?.id
|
|
2240
|
+
storyboardId: node.storyboard?.id,
|
|
2241
|
+
path: node.canvas.path
|
|
2234
2242
|
},
|
|
2235
2243
|
suggestedActions: [DRAG_ACTIONS.INSERT_PATH, DRAG_ACTIONS.OPEN],
|
|
2236
2244
|
sourcePanel: "storyboard-list",
|
|
2237
|
-
dragPreview:
|
|
2245
|
+
dragPreview: `${canvasType}: ${node.canvas.name}`
|
|
2238
2246
|
};
|
|
2239
2247
|
}
|
|
2240
2248
|
break;
|
|
2241
2249
|
case "workflow":
|
|
2242
2250
|
if (node.workflow) {
|
|
2251
|
+
const content = [
|
|
2252
|
+
`# Workflow: ${node.workflow.name}`,
|
|
2253
|
+
`# Run with: ${CLI} workflow run "${node.workflow.path}"`,
|
|
2254
|
+
node.workflow.path
|
|
2255
|
+
].join(`
|
|
2256
|
+
`);
|
|
2243
2257
|
return {
|
|
2244
|
-
dataType: DATA_TYPES.
|
|
2245
|
-
primaryData:
|
|
2258
|
+
dataType: DATA_TYPES.TEXT_SELECTION,
|
|
2259
|
+
primaryData: content,
|
|
2246
2260
|
metadata: {
|
|
2247
2261
|
name: node.workflow.name,
|
|
2248
2262
|
type: "workflow",
|
|
2249
2263
|
storyboardId: node.storyboard?.id,
|
|
2250
|
-
workflowId: node.workflow.id
|
|
2264
|
+
workflowId: node.workflow.id,
|
|
2265
|
+
path: node.workflow.path
|
|
2251
2266
|
},
|
|
2252
2267
|
suggestedActions: [DRAG_ACTIONS.INSERT_PATH, DRAG_ACTIONS.OPEN],
|
|
2253
2268
|
sourcePanel: "storyboard-list",
|
|
@@ -2257,13 +2272,20 @@ var getDefaultDragConfig = (node) => {
|
|
|
2257
2272
|
break;
|
|
2258
2273
|
case "overview":
|
|
2259
2274
|
if (node.markdownPath) {
|
|
2275
|
+
const content = [
|
|
2276
|
+
`# Overview: ${node.storyboard?.name || node.name}`,
|
|
2277
|
+
`# Documentation: ${node.markdownPath}`,
|
|
2278
|
+
node.markdownPath
|
|
2279
|
+
].join(`
|
|
2280
|
+
`);
|
|
2260
2281
|
return {
|
|
2261
|
-
dataType: DATA_TYPES.
|
|
2262
|
-
primaryData:
|
|
2282
|
+
dataType: DATA_TYPES.TEXT_SELECTION,
|
|
2283
|
+
primaryData: content,
|
|
2263
2284
|
metadata: {
|
|
2264
2285
|
name: node.name,
|
|
2265
2286
|
type: "overview",
|
|
2266
|
-
storyboardId: node.storyboard?.id
|
|
2287
|
+
storyboardId: node.storyboard?.id,
|
|
2288
|
+
path: node.markdownPath
|
|
2267
2289
|
},
|
|
2268
2290
|
suggestedActions: [DRAG_ACTIONS.INSERT_PATH, DRAG_ACTIONS.OPEN],
|
|
2269
2291
|
sourcePanel: "storyboard-list",
|
|
@@ -2273,14 +2295,22 @@ var getDefaultDragConfig = (node) => {
|
|
|
2273
2295
|
break;
|
|
2274
2296
|
case "storyboard":
|
|
2275
2297
|
if (node.storyboard) {
|
|
2298
|
+
const content = [
|
|
2299
|
+
`# Storyboard: ${node.storyboard.name}`,
|
|
2300
|
+
`# Contains ${node.storyboard.workflows.length} workflow(s)`,
|
|
2301
|
+
`# Info: ${CLI} storyboard info "${node.storyboard.path}"`,
|
|
2302
|
+
node.storyboard.path
|
|
2303
|
+
].join(`
|
|
2304
|
+
`);
|
|
2276
2305
|
return {
|
|
2277
|
-
dataType: DATA_TYPES.
|
|
2278
|
-
primaryData:
|
|
2306
|
+
dataType: DATA_TYPES.TEXT_SELECTION,
|
|
2307
|
+
primaryData: content,
|
|
2279
2308
|
metadata: {
|
|
2280
2309
|
name: node.storyboard.name,
|
|
2281
2310
|
type: "storyboard",
|
|
2282
2311
|
canvasPath: node.storyboard.canvas.path,
|
|
2283
|
-
workflowCount: node.storyboard.workflows.length
|
|
2312
|
+
workflowCount: node.storyboard.workflows.length,
|
|
2313
|
+
path: node.storyboard.path
|
|
2284
2314
|
},
|
|
2285
2315
|
suggestedActions: [DRAG_ACTIONS.INSERT_PATH],
|
|
2286
2316
|
sourcePanel: "storyboard-list",
|
|
@@ -2767,39 +2797,54 @@ var buildTreeData = (canvases, gitStatusMap) => {
|
|
|
2767
2797
|
};
|
|
2768
2798
|
var getDefaultCanvasDragConfig = (node) => {
|
|
2769
2799
|
const DATA_TYPES = {
|
|
2770
|
-
|
|
2771
|
-
DIRECTORY_PATH: "directory-path"
|
|
2800
|
+
TEXT_SELECTION: "text-selection"
|
|
2772
2801
|
};
|
|
2773
2802
|
const DRAG_ACTIONS = {
|
|
2774
2803
|
INSERT_PATH: "insert-path",
|
|
2775
2804
|
OPEN: "open"
|
|
2776
2805
|
};
|
|
2806
|
+
const CLI = "npx @principal-ai/principal-view-cli@latest";
|
|
2777
2807
|
switch (node.type) {
|
|
2778
2808
|
case "canvas":
|
|
2779
2809
|
if (node.canvas) {
|
|
2810
|
+
const canvasType = node.canvas.type === "otel" ? "OTEL Canvas" : "Canvas";
|
|
2811
|
+
const content = [
|
|
2812
|
+
`# ${canvasType}: ${node.canvas.name}`,
|
|
2813
|
+
`# View with: ${CLI} canvas view "${node.canvas.path}"`,
|
|
2814
|
+
node.canvas.path
|
|
2815
|
+
].join(`
|
|
2816
|
+
`);
|
|
2780
2817
|
return {
|
|
2781
|
-
dataType: DATA_TYPES.
|
|
2782
|
-
primaryData:
|
|
2818
|
+
dataType: DATA_TYPES.TEXT_SELECTION,
|
|
2819
|
+
primaryData: content,
|
|
2783
2820
|
metadata: {
|
|
2784
2821
|
name: node.canvas.name,
|
|
2785
2822
|
type: "canvas",
|
|
2786
|
-
canvasType: node.canvas.type
|
|
2823
|
+
canvasType: node.canvas.type,
|
|
2824
|
+
path: node.canvas.path
|
|
2787
2825
|
},
|
|
2788
2826
|
suggestedActions: [DRAG_ACTIONS.INSERT_PATH, DRAG_ACTIONS.OPEN],
|
|
2789
2827
|
sourcePanel: "canvas-list",
|
|
2790
|
-
dragPreview:
|
|
2828
|
+
dragPreview: `${canvasType}: ${node.canvas.name}`
|
|
2791
2829
|
};
|
|
2792
2830
|
}
|
|
2793
2831
|
break;
|
|
2794
2832
|
case "overview":
|
|
2795
2833
|
if (node.markdownPath) {
|
|
2834
|
+
const content = [
|
|
2835
|
+
`# Overview: ${node.canvas?.name || node.name}`,
|
|
2836
|
+
`# Documentation: ${node.markdownPath}`,
|
|
2837
|
+
node.markdownPath
|
|
2838
|
+
].join(`
|
|
2839
|
+
`);
|
|
2796
2840
|
return {
|
|
2797
|
-
dataType: DATA_TYPES.
|
|
2798
|
-
primaryData:
|
|
2841
|
+
dataType: DATA_TYPES.TEXT_SELECTION,
|
|
2842
|
+
primaryData: content,
|
|
2799
2843
|
metadata: {
|
|
2800
2844
|
name: node.name,
|
|
2801
2845
|
type: "overview",
|
|
2802
|
-
canvasId: node.canvas?.id
|
|
2846
|
+
canvasId: node.canvas?.id,
|
|
2847
|
+
path: node.markdownPath
|
|
2803
2848
|
},
|
|
2804
2849
|
suggestedActions: [DRAG_ACTIONS.INSERT_PATH, DRAG_ACTIONS.OPEN],
|
|
2805
2850
|
sourcePanel: "canvas-list",
|
|
@@ -2810,13 +2855,20 @@ var getDefaultCanvasDragConfig = (node) => {
|
|
|
2810
2855
|
case "canvas-folder":
|
|
2811
2856
|
if (node.canvas) {
|
|
2812
2857
|
const folderPath = node.canvas.path.replace(/\/[^/]+$/, "");
|
|
2858
|
+
const content = [
|
|
2859
|
+
`# Canvas Folder: ${node.canvas.name}`,
|
|
2860
|
+
`# Info: ${CLI} canvas info "${node.canvas.path}"`,
|
|
2861
|
+
folderPath
|
|
2862
|
+
].join(`
|
|
2863
|
+
`);
|
|
2813
2864
|
return {
|
|
2814
|
-
dataType: DATA_TYPES.
|
|
2815
|
-
primaryData:
|
|
2865
|
+
dataType: DATA_TYPES.TEXT_SELECTION,
|
|
2866
|
+
primaryData: content,
|
|
2816
2867
|
metadata: {
|
|
2817
2868
|
name: node.canvas.name,
|
|
2818
2869
|
type: "canvas-folder",
|
|
2819
|
-
canvasPath: node.canvas.path
|
|
2870
|
+
canvasPath: node.canvas.path,
|
|
2871
|
+
path: folderPath
|
|
2820
2872
|
},
|
|
2821
2873
|
suggestedActions: [DRAG_ACTIONS.INSERT_PATH],
|
|
2822
2874
|
sourcePanel: "canvas-list",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CanvasListTreeCore.d.ts","sourceRoot":"","sources":["../../../../src/components/CanvasListTree/CanvasListTreeCore.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAQ/C,OAAO,KAAK,EAEV,mBAAmB,EAEpB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"CanvasListTreeCore.d.ts","sourceRoot":"","sources":["../../../../src/components/CanvasListTree/CanvasListTreeCore.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAQ/C,OAAO,KAAK,EAEV,mBAAmB,EAEpB,MAAM,SAAS,CAAC;AAuNjB,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAqK5D,CAAC"}
|
|
@@ -30,4 +30,5 @@ export declare const WithGitStatus: Story;
|
|
|
30
30
|
export declare const GitStatusAllTypes: Story;
|
|
31
31
|
export declare const GitStatusWithVersionGrouping: Story;
|
|
32
32
|
export declare const GitStatusMixedScenarios: Story;
|
|
33
|
+
export declare const DragAndDropTest: Story;
|
|
33
34
|
//# sourceMappingURL=StoryboardWorkflowsTree.stories.d.ts.map
|
package/dist/src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTree.stories.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StoryboardWorkflowsTree.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTree.stories.tsx"],"names":[],"mappings":"AAQA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MAAM,sBAAsB,EAAE,KAkEpC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAgE7B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAU3B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAwB/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAiBlC,CAAC;AA4CF,eAAO,MAAM,eAAe,EAAE,KAe7B,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,KAqEvC,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,KAyFvC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAiH9B,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,KA2GzC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,KAyEzC,CAAC;AAMF,eAAO,MAAM,aAAa,EAAE,KAwF3B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KA0H/B,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,KAwF1C,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,KAuIrC,CAAC;AAMF,eAAO,MAAM,eAAe,EAAE,KAqK7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StoryboardWorkflowsTreeCore.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAQ/C,OAAO,KAAK,EAEV,4BAA4B,EAK7B,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"StoryboardWorkflowsTreeCore.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAQ/C,OAAO,KAAK,EAEV,4BAA4B,EAK7B,MAAM,SAAS,CAAC;AA4XjB,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAyO9E,CAAC"}
|
package/package.json
CHANGED