@industry-theme/principal-view-panels 0.1.23 → 0.1.25
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/mocks/vvfConfigs.d.ts.map +1 -1
- package/dist/panels/EventControllerPanel.stories.d.ts.map +1 -1
- package/dist/panels/PrincipalViewGraphPanel.stories.d.ts +5 -0
- package/dist/panels/PrincipalViewGraphPanel.stories.d.ts.map +1 -1
- package/dist/panels.bundle.js +37 -17
- package/dist/panels.bundle.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vvfConfigs.d.ts","sourceRoot":"","sources":["../../src/mocks/vvfConfigs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAExE;;GAEG;AAEH,eAAO,MAAM,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"vvfConfigs.d.ts","sourceRoot":"","sources":["../../src/mocks/vvfConfigs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAExE;;GAEG;AAEH,eAAO,MAAM,gBAAgB,EAAE,cAyF9B,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,cA6KpC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,cA8G/B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,cAyJlC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,cAuHrC,CAAC;AAGF,eAAO,MAAM,oBAAoB,QAA4C,CAAC;AAC9E,eAAO,MAAM,qBAAqB,QAA6C,CAAC;AAChF,eAAO,MAAM,0BAA0B,QAAkD,CAAC;AAC1F,eAAO,MAAM,wBAAwB,QAAgD,CAAC;AACtF,eAAO,MAAM,2BAA2B,QAAmD,CAAC;AAG5F,eAAO,MAAM,kBAAkB,GAAI,QAAQ,QAAQ,GAAG,SAAS,GAAG,eAAe,GAAG,aAAa,GAAG,gBAAgB,GAAG,UAAU,GAAG,MAAM;;cAC7G,MAAM;sBAAgB,MAAM;cAAQ,MAAM;kBAAY,MAAM;;CA4ExF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventControllerPanel.stories.d.ts","sourceRoot":"","sources":["../../src/panels/EventControllerPanel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAgC,MAAM,OAAO,CAAC;AAGrD,OAAO,KAAK,EAAkB,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAGpF;;;;GAIG;AACH,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;CAsBmC,CAAC;AAE9C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"EventControllerPanel.stories.d.ts","sourceRoot":"","sources":["../../src/panels/EventControllerPanel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAgC,MAAM,OAAO,CAAC;AAGrD,OAAO,KAAK,EAAkB,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAGpF;;;;GAIG;AACH,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;CAsBmC,CAAC;AAE9C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAgNnC;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAuC/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAUlC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAUxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAoBxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAmEjC,CAAC"}
|
|
@@ -80,5 +80,10 @@ export declare const MultipleConfigurations: Story;
|
|
|
80
80
|
* Empty project with workspace scope only
|
|
81
81
|
*/
|
|
82
82
|
export declare const WorkspaceScope: Story;
|
|
83
|
+
/**
|
|
84
|
+
* Node Sizing Test - demonstrates that width/height from canvas are applied
|
|
85
|
+
* All nodes are rectangles but with different explicit sizes
|
|
86
|
+
*/
|
|
87
|
+
export declare const NodeSizingTest: Story;
|
|
83
88
|
export declare const ResizablePanelLayout: Story;
|
|
84
89
|
//# sourceMappingURL=PrincipalViewGraphPanel.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrincipalViewGraphPanel.stories.d.ts","sourceRoot":"","sources":["../../src/panels/PrincipalViewGraphPanel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAmB,MAAM,OAAO,CAAC;AAQxC;;;GAGG;AACH,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;CAsBsC,CAAC;AAEjD,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAuDjC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAmDlC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,KAmDvC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KA4BrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KA4BxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KA8DzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,KAiB7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E,KAmD5B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAmD/B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,KAmDpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,KA0D5B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAkH5B,CAAC;AAqGF,eAAO,MAAM,oBAAoB,EAAE,KAYlC,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -5408,10 +5408,14 @@ class CanvasConverter {
|
|
|
5408
5408
|
for (const node of canvas.nodes) {
|
|
5409
5409
|
const pv = node.pv;
|
|
5410
5410
|
let nodeName;
|
|
5411
|
+
let nodeDescription;
|
|
5411
5412
|
switch (node.type) {
|
|
5412
|
-
case "text":
|
|
5413
|
-
|
|
5413
|
+
case "text": {
|
|
5414
|
+
const lines = node.text.split("\n");
|
|
5415
|
+
nodeName = lines[0].replace(/^#+ /, "").substring(0, 50);
|
|
5416
|
+
nodeDescription = lines.slice(1).join("\n").trim() || void 0;
|
|
5414
5417
|
break;
|
|
5418
|
+
}
|
|
5415
5419
|
case "file":
|
|
5416
5420
|
nodeName = node.file.split("/").pop() || node.file;
|
|
5417
5421
|
break;
|
|
@@ -5421,13 +5425,16 @@ class CanvasConverter {
|
|
|
5421
5425
|
case "group":
|
|
5422
5426
|
nodeName = node.label || "Group";
|
|
5423
5427
|
break;
|
|
5428
|
+
default:
|
|
5429
|
+
nodeName = (pv == null ? void 0 : pv.nodeType) || node.id;
|
|
5430
|
+
break;
|
|
5424
5431
|
}
|
|
5425
5432
|
nodes.push({
|
|
5426
5433
|
id: node.id,
|
|
5427
5434
|
type: (pv == null ? void 0 : pv.nodeType) || node.type,
|
|
5428
5435
|
name: nodeName,
|
|
5429
5436
|
data: {
|
|
5430
|
-
description:
|
|
5437
|
+
description: nodeDescription,
|
|
5431
5438
|
shape: (pv == null ? void 0 : pv.shape) || "rectangle",
|
|
5432
5439
|
icon: pv == null ? void 0 : pv.icon,
|
|
5433
5440
|
// Color priority: pv.fill > node.color
|
|
@@ -5445,6 +5452,9 @@ class CanvasConverter {
|
|
|
5445
5452
|
...node.type === "link" ? { url: node.url } : {}
|
|
5446
5453
|
},
|
|
5447
5454
|
position: { x: node.x, y: node.y },
|
|
5455
|
+
// Persist node dimensions at top level for xyflow
|
|
5456
|
+
width: node.width,
|
|
5457
|
+
height: node.height,
|
|
5448
5458
|
// Don't set a default state - only show state labels when explicitly set via events
|
|
5449
5459
|
state: void 0,
|
|
5450
5460
|
createdAt: now2,
|
|
@@ -5510,7 +5520,6 @@ class CanvasConverter {
|
|
|
5510
5520
|
if (node.data.nodeType || node.data.shape || ((_c = node.data.sources) == null ? void 0 : _c.length)) {
|
|
5511
5521
|
canvasNode.pv = {
|
|
5512
5522
|
nodeType: node.data.nodeType || node.id,
|
|
5513
|
-
description: node.data.description || `${node.data.nodeType || node.id} node`,
|
|
5514
5523
|
shape: node.data.shape,
|
|
5515
5524
|
icon: node.data.icon,
|
|
5516
5525
|
states: node.data.states,
|
|
@@ -5519,6 +5528,13 @@ class CanvasConverter {
|
|
|
5519
5528
|
dataSchema: node.data.dataSchema
|
|
5520
5529
|
};
|
|
5521
5530
|
}
|
|
5531
|
+
if (node.data.canvasType === "text" || !node.data.canvasType) {
|
|
5532
|
+
const name = node.data.name || node.data.label || node.id;
|
|
5533
|
+
const description = node.data.description;
|
|
5534
|
+
canvasNode.text = description ? `# ${name}
|
|
5535
|
+
|
|
5536
|
+
${description}` : `# ${name}`;
|
|
5537
|
+
}
|
|
5522
5538
|
canvas.nodes.push(canvasNode);
|
|
5523
5539
|
}
|
|
5524
5540
|
for (const edge of edges) {
|
|
@@ -9201,7 +9217,6 @@ class LibraryConverter {
|
|
|
9201
9217
|
const { id, x: x2, y: y2, label, data } = options;
|
|
9202
9218
|
const pv = {
|
|
9203
9219
|
nodeType: componentKey,
|
|
9204
|
-
description: component.description,
|
|
9205
9220
|
shape: component.shape,
|
|
9206
9221
|
icon: component.icon,
|
|
9207
9222
|
states: component.states,
|
|
@@ -9210,10 +9225,14 @@ class LibraryConverter {
|
|
|
9210
9225
|
dataSchema: component.dataSchema,
|
|
9211
9226
|
layout: component.layout
|
|
9212
9227
|
};
|
|
9228
|
+
const nodeName = label || component.defaultLabel || componentKey;
|
|
9229
|
+
const nodeText = component.description ? `# ${nodeName}
|
|
9230
|
+
|
|
9231
|
+
${component.description}` : `# ${nodeName}`;
|
|
9213
9232
|
const node = {
|
|
9214
9233
|
id,
|
|
9215
9234
|
type: "text",
|
|
9216
|
-
text:
|
|
9235
|
+
text: nodeText,
|
|
9217
9236
|
x: x2,
|
|
9218
9237
|
y: y2,
|
|
9219
9238
|
width: ((_a = component.size) == null ? void 0 : _a.width) || 120,
|
|
@@ -9692,12 +9711,12 @@ function createRulesEngine(rules) {
|
|
|
9692
9711
|
}
|
|
9693
9712
|
return engine;
|
|
9694
9713
|
}
|
|
9695
|
-
const CONFIG_FILE_NAMES = [
|
|
9696
|
-
|
|
9697
|
-
".
|
|
9698
|
-
".
|
|
9714
|
+
const CONFIG_FILE_NAMES = [".privurc.yaml", ".privurc.yml", ".privurc.json"];
|
|
9715
|
+
const DEFAULT_INCLUDE_PATTERNS = [
|
|
9716
|
+
".principal-views/**/*.yaml",
|
|
9717
|
+
".principal-views/**/*.yml",
|
|
9718
|
+
".principal-views/**/*.json"
|
|
9699
9719
|
];
|
|
9700
|
-
const DEFAULT_INCLUDE_PATTERNS = [".principal-views/**/*.yaml", ".principal-views/**/*.yml", ".principal-views/**/*.json"];
|
|
9701
9720
|
const DEFAULT_EXCLUDE_PATTERNS = ["**/node_modules/**", "**/*.test.*"];
|
|
9702
9721
|
const VALID_SEVERITIES = [
|
|
9703
9722
|
"off",
|
|
@@ -47265,9 +47284,11 @@ function requireCustomNode() {
|
|
|
47265
47284
|
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [editable && (0, jsx_runtime_1.jsx)(react_1.NodeResizer, { color: strokeColor, isVisible: selected, minWidth, minHeight, keepAspectRatio, handleStyle: {
|
|
47266
47285
|
width: 8,
|
|
47267
47286
|
height: 8,
|
|
47268
|
-
borderRadius: 2
|
|
47287
|
+
borderRadius: 2,
|
|
47288
|
+
zIndex: 20
|
|
47269
47289
|
}, lineStyle: {
|
|
47270
|
-
borderWidth: 1
|
|
47290
|
+
borderWidth: 1,
|
|
47291
|
+
zIndex: 20
|
|
47271
47292
|
} }), (0, jsx_runtime_1.jsx)(react_1.Handle, { type: "target", position: react_1.Position.Top, id: "top", style: getHandleStyle() }), (0, jsx_runtime_1.jsx)(react_1.Handle, { type: "target", position: react_1.Position.Bottom, id: "bottom", style: getHandleStyle() }), (0, jsx_runtime_1.jsx)(react_1.Handle, { type: "target", position: react_1.Position.Left, id: "left", style: getHandleStyle() }), (0, jsx_runtime_1.jsx)(react_1.Handle, { type: "target", position: react_1.Position.Right, id: "right", style: getHandleStyle() }), isHexagon ? (0, jsx_runtime_1.jsx)("div", { style: hexagonBorderStyle, className: animationClass, children: (0, jsx_runtime_1.jsxs)("div", { style: hexagonInnerStyle, children: [icon && (0, jsx_runtime_1.jsx)("div", { style: { display: "flex", justifyContent: "center", alignItems: "center" }, children: (0, iconResolver_1.resolveIcon)(icon, 20) }), (0, jsx_runtime_1.jsx)("div", { style: { textAlign: "center", wordBreak: "break-word" }, children: displayName }), state && (0, jsx_runtime_1.jsx)("div", { style: {
|
|
47272
47293
|
fontSize: "10px",
|
|
47273
47294
|
backgroundColor: color,
|
|
@@ -47618,6 +47639,9 @@ function requireGraphConverter() {
|
|
|
47618
47639
|
position: node.position || { x: 0, y: 0 },
|
|
47619
47640
|
// Groups have lower zIndex to render behind edges
|
|
47620
47641
|
zIndex: isGroup ? -1 : void 0,
|
|
47642
|
+
// Apply persisted dimensions if available
|
|
47643
|
+
...node.width !== void 0 ? { width: node.width } : {},
|
|
47644
|
+
...node.height !== void 0 ? { height: node.height } : {},
|
|
47621
47645
|
data: {
|
|
47622
47646
|
name: node.name || node.id,
|
|
47623
47647
|
typeDefinition,
|
|
@@ -48880,10 +48904,6 @@ function requireGraphRenderer() {
|
|
|
48880
48904
|
const handleNodesChange = (0, react_1.useCallback)((changes) => {
|
|
48881
48905
|
if (!editable)
|
|
48882
48906
|
return;
|
|
48883
|
-
const interesting = changes.filter((c2) => c2.type !== "select");
|
|
48884
|
-
if (interesting.length > 0) {
|
|
48885
|
-
console.log("[GraphRenderer DEBUG] Node changes:", interesting.map((c2) => ({ type: c2.type, id: c2.id, ...c2.type === "dimensions" ? { dimensions: c2.dimensions, resizing: c2.resizing } : {}, ...c2.type === "position" ? { dragging: c2.dragging } : {} })));
|
|
48886
|
-
}
|
|
48887
48907
|
setXyflowLocalNodes((nds) => (0, react_2.applyNodeChanges)(changes, nds));
|
|
48888
48908
|
const positionChanges = changes.filter((change) => change.type === "position" && "position" in change && change.position !== void 0 && "dragging" in change && change.dragging === false);
|
|
48889
48909
|
const dimensionChanges = changes.filter((change) => change.type === "dimensions" && "dimensions" in change && change.dimensions !== void 0 && "resizing" in change && change.resizing === false);
|