@industry-theme/principal-view-panels 0.1.23 → 0.1.24

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":"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,cA6F9B,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,cAqLpC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,cAmH/B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,cAiKlC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,cA8HrC,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
+ {"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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,KAmEjC,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"}
@@ -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
- nodeName = node.text.split("\n")[0].replace(/^#+ /, "").substring(0, 50);
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: pv == null ? void 0 : pv.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
@@ -5510,7 +5517,6 @@ class CanvasConverter {
5510
5517
  if (node.data.nodeType || node.data.shape || ((_c = node.data.sources) == null ? void 0 : _c.length)) {
5511
5518
  canvasNode.pv = {
5512
5519
  nodeType: node.data.nodeType || node.id,
5513
- description: node.data.description || `${node.data.nodeType || node.id} node`,
5514
5520
  shape: node.data.shape,
5515
5521
  icon: node.data.icon,
5516
5522
  states: node.data.states,
@@ -5519,6 +5525,13 @@ class CanvasConverter {
5519
5525
  dataSchema: node.data.dataSchema
5520
5526
  };
5521
5527
  }
5528
+ if (node.data.canvasType === "text" || !node.data.canvasType) {
5529
+ const name = node.data.name || node.data.label || node.id;
5530
+ const description = node.data.description;
5531
+ canvasNode.text = description ? `# ${name}
5532
+
5533
+ ${description}` : `# ${name}`;
5534
+ }
5522
5535
  canvas.nodes.push(canvasNode);
5523
5536
  }
5524
5537
  for (const edge of edges) {
@@ -9201,7 +9214,6 @@ class LibraryConverter {
9201
9214
  const { id, x: x2, y: y2, label, data } = options;
9202
9215
  const pv = {
9203
9216
  nodeType: componentKey,
9204
- description: component.description,
9205
9217
  shape: component.shape,
9206
9218
  icon: component.icon,
9207
9219
  states: component.states,
@@ -9210,10 +9222,14 @@ class LibraryConverter {
9210
9222
  dataSchema: component.dataSchema,
9211
9223
  layout: component.layout
9212
9224
  };
9225
+ const nodeName = label || component.defaultLabel || componentKey;
9226
+ const nodeText = component.description ? `# ${nodeName}
9227
+
9228
+ ${component.description}` : `# ${nodeName}`;
9213
9229
  const node = {
9214
9230
  id,
9215
9231
  type: "text",
9216
- text: label || component.defaultLabel || componentKey,
9232
+ text: nodeText,
9217
9233
  x: x2,
9218
9234
  y: y2,
9219
9235
  width: ((_a = component.size) == null ? void 0 : _a.width) || 120,
@@ -9692,12 +9708,12 @@ function createRulesEngine(rules) {
9692
9708
  }
9693
9709
  return engine;
9694
9710
  }
9695
- const CONFIG_FILE_NAMES = [
9696
- ".privurc.yaml",
9697
- ".privurc.yml",
9698
- ".privurc.json"
9711
+ const CONFIG_FILE_NAMES = [".privurc.yaml", ".privurc.yml", ".privurc.json"];
9712
+ const DEFAULT_INCLUDE_PATTERNS = [
9713
+ ".principal-views/**/*.yaml",
9714
+ ".principal-views/**/*.yml",
9715
+ ".principal-views/**/*.json"
9699
9716
  ];
9700
- const DEFAULT_INCLUDE_PATTERNS = [".principal-views/**/*.yaml", ".principal-views/**/*.yml", ".principal-views/**/*.json"];
9701
9717
  const DEFAULT_EXCLUDE_PATTERNS = ["**/node_modules/**", "**/*.test.*"];
9702
9718
  const VALID_SEVERITIES = [
9703
9719
  "off",
@@ -47265,9 +47281,11 @@ function requireCustomNode() {
47265
47281
  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
47282
  width: 8,
47267
47283
  height: 8,
47268
- borderRadius: 2
47284
+ borderRadius: 2,
47285
+ zIndex: 20
47269
47286
  }, lineStyle: {
47270
- borderWidth: 1
47287
+ borderWidth: 1,
47288
+ zIndex: 20
47271
47289
  } }), (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
47290
  fontSize: "10px",
47273
47291
  backgroundColor: color,
@@ -47618,6 +47636,9 @@ function requireGraphConverter() {
47618
47636
  position: node.position || { x: 0, y: 0 },
47619
47637
  // Groups have lower zIndex to render behind edges
47620
47638
  zIndex: isGroup ? -1 : void 0,
47639
+ // Apply persisted dimensions if available
47640
+ ...node.width !== void 0 ? { width: node.width } : {},
47641
+ ...node.height !== void 0 ? { height: node.height } : {},
47621
47642
  data: {
47622
47643
  name: node.name || node.id,
47623
47644
  typeDefinition,
@@ -48880,10 +48901,6 @@ function requireGraphRenderer() {
48880
48901
  const handleNodesChange = (0, react_1.useCallback)((changes) => {
48881
48902
  if (!editable)
48882
48903
  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
48904
  setXyflowLocalNodes((nds) => (0, react_2.applyNodeChanges)(changes, nds));
48888
48905
  const positionChanges = changes.filter((change) => change.type === "position" && "position" in change && change.position !== void 0 && "dragging" in change && change.dragging === false);
48889
48906
  const dimensionChanges = changes.filter((change) => change.type === "dimensions" && "dimensions" in change && change.dimensions !== void 0 && "resizing" in change && change.resizing === false);