@kubex/zinc 1.1.28 → 1.1.29

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.
Files changed (46) hide show
  1. package/custom-elements-manifest.config.js +2 -2
  2. package/dist/custom-elements.json +1483 -17
  3. package/dist/vscode.html-custom-data.json +40 -1
  4. package/dist/web-types.json +124 -3
  5. package/dist/zn.d.ts +670 -14
  6. package/dist/zn.min.js +1305 -925
  7. package/docs/pages/components/flow-builder-troubleshooter-demo.njk +106 -78
  8. package/docs/pages/components/flow-builder.md +422 -66
  9. package/docs/pages/components/page-builder.md +167 -0
  10. package/package.json +1 -1
  11. package/src/components/datepicker/datepicker.scss +0 -10
  12. package/src/components/flow-builder/flow-builder.component.ts +377 -16
  13. package/src/components/flow-builder/flow-builder.scss +398 -250
  14. package/src/components/flow-builder/flow-builder.test.ts +241 -4
  15. package/src/components/flow-builder/flow-layout.ts +42 -17
  16. package/src/components/flow-builder/flow.types.ts +168 -43
  17. package/src/components/flow-builder/modules/flow-branch-conditions/flow-branch-conditions.component.ts +300 -0
  18. package/src/components/flow-builder/modules/flow-branch-conditions/flow-branch-conditions.scss +222 -0
  19. package/src/components/flow-builder/modules/flow-branch-conditions/flow-branch-conditions.test.ts +125 -0
  20. package/src/components/flow-builder/modules/flow-branch-conditions/index.ts +12 -0
  21. package/src/components/flow-builder/modules/flow-canvas/flow-canvas.component.ts +184 -26
  22. package/src/components/flow-builder/modules/flow-canvas/flow-canvas.scss +170 -120
  23. package/src/components/flow-builder/modules/flow-node/flow-node.scss +42 -42
  24. package/src/components/flow-builder/modules/flow-step/flow-step.component.ts +2 -1
  25. package/src/components/flow-builder/modules/flow-step/flow-step.scss +25 -17
  26. package/src/components/icon-picker/icon-picker.component.ts +20 -37
  27. package/src/components/icon-picker/icon-picker.scss +5 -45
  28. package/src/components/page-builder/index.ts +14 -0
  29. package/src/components/page-builder/modules/page-palette-item/index.ts +12 -0
  30. package/src/components/page-builder/modules/page-palette-item/page-palette-item.component.ts +71 -0
  31. package/src/components/page-builder/modules/page-palette-item/page-palette-item.scss +70 -0
  32. package/src/components/page-builder/modules/page-palette-item/page-palette-item.test.ts +20 -0
  33. package/src/components/page-builder/modules/page-section-card/index.ts +12 -0
  34. package/src/components/page-builder/modules/page-section-card/page-section-card.component.ts +93 -0
  35. package/src/components/page-builder/modules/page-section-card/page-section-card.scss +92 -0
  36. package/src/components/page-builder/modules/page-section-card/page-section-card.test.ts +50 -0
  37. package/src/components/page-builder/page-builder.component.ts +1053 -0
  38. package/src/components/page-builder/page-builder.scss +494 -0
  39. package/src/components/page-builder/page-builder.test.ts +464 -0
  40. package/src/components/page-builder/page-registry.ts +48 -0
  41. package/src/components/page-builder/page.types.ts +75 -0
  42. package/src/events/events.ts +2 -0
  43. package/src/events/zn-page-change.ts +9 -0
  44. package/src/events/zn-page-selection-change.ts +7 -0
  45. package/src/zinc.ts +4 -0
  46. package/web-test-runner.config.js +6 -1
@@ -1600,10 +1600,15 @@
1600
1600
  },
1601
1601
  {
1602
1602
  "name": "zn-flow-builder",
1603
- "description": "A drag-and-drop visual flow builder: steps panel, pan/zoom canvas, and a config inspector.\n---\n\n\n### **Events:**\n - **zn-flow-change** - Emitted whenever the flow state changes. `event.detail.state` is the new FlowState.\n- **zn-flow-selection-change** - Emitted when the selected node changes. `event.detail.nodeId`.\n- **zn-flow-connect** - Emitted when a connection is created. `event.detail.connection`.\n\n### **Slots:**\n - _default_ - `<zn-flow-step>` type declarations; never displayed, each `group`/`category` routes the step into the right tab and collapsible grouping of the rendered panel.\n- **header-left** - Actions shown on the left of the header bar (e.g. Close / Undo All Changes).\n- **header-right** - Actions shown on the right of the header bar (e.g. Apply Changes).\n- **sidebar** - Extra right-panel content (status, version history), below the configuration errors.\n\n### **CSS Parts:**\n - **base** - The grid wrapper.\n- **header** - The full-width header action bar (only rendered when header slots are filled).\n- **steps** - The left steps panel.\n- **inspector** - The right panel while a node or branch is selected.",
1603
+ "description": "A drag-and-drop visual flow builder: steps panel, pan/zoom canvas, and a config inspector.\n---\n\n\n### **Events:**\n - **zn-flow-change** - Emitted whenever the flow state changes. `event.detail.state` is the new FlowState.\n- **zn-flow-selection-change** - Emitted when the selected node changes. `event.detail.nodeId`.\n- **zn-flow-connect** - Emitted when a connection is created. `event.detail.connection`.\n\n### **Methods:**\n - **restoreAutoSave(): _boolean_** - Load the auto-saved flow, if one exists within the 1-day TTL.\n- **toJSON(): _FlowState_** - The full flow state — nodes with their positions, connections, branch\ndata, and notes — ready for persisting. Lets `JSON.stringify(builder)`\nserialize the flow directly, e.g. as a POST body.\n\n### **Slots:**\n - _default_ - `<zn-flow-step>` type declarations; never displayed, each `group`/`category` routes the step into the right tab and collapsible grouping of the rendered panel. A step may nest `<zn-flow-filter>` declarations (each holding `<zn-flow-filter-field>`s, whose operator / option choices are nested `<zn-flow-operator>` / `<zn-flow-option>` elements) — or set a `branch-filters` JSON attribute — to drive the built-in branch conditions editor.\n- **header-left** - Actions shown on the left of the header bar (e.g. Close / Undo All Changes).\n- **header-right** - Actions shown on the right of the header bar (e.g. Apply Changes).\n- **sidebar** - Extra right-panel content (status, version history), below the configuration errors.\n\n### **CSS Parts:**\n - **base** - The grid wrapper.\n- **header** - The full-width header action bar (only rendered when header slots are filled).\n- **steps** - The left steps panel.\n- **inspector** - The right panel while a node or branch is selected.",
1604
1604
  "attributes": [
1605
1605
  { "name": "heading", "values": [] },
1606
1606
  { "name": "subheading", "values": [] },
1607
+ {
1608
+ "name": "auto-save",
1609
+ "description": "Auto-save the flow to localStorage (1-day TTL). Omit to disable. A bare\n`auto-save` saves every 5 minutes; a numeric value sets the interval in\nminutes (`auto-save=\"5\"`). Restore with `restoreAutoSave()`.",
1610
+ "values": []
1611
+ },
1607
1612
  {
1608
1613
  "name": "entrypoints-hint",
1609
1614
  "description": "Optional hint shown beneath each steps-panel tab.",
@@ -2528,6 +2533,40 @@
2528
2533
  { "name": "Documentation", "url": "https://zinc.style/components/page" }
2529
2534
  ]
2530
2535
  },
2536
+ {
2537
+ "name": "zn-page-builder",
2538
+ "description": "A config-driven page composer: a palette of predefined section types, a linear\ncanvas of section cards, and an inspector for editing each section's content.\n---\n\n\n### **Events:**\n - **zn-page-change** - Emitted whenever the page state changes. `event.detail.state` is the new PageState.\n- **zn-page-selection-change** - Emitted when the selected section changes. `event.detail.sectionId`.\n\n### **Methods:**\n - **addSection(type: _string_, index: _number_): _PageSection | null_** - Adds a section of a registered type at `index` (default: end). Returns null for unknown types.\n- **addSectionToSlot(type: _string_, containerId: _string_, slotIndex: _number_): _PageSection | null_** - Adds a new section of a registered type into a container's slot. Returns null if not allowed.\n\n### **Slots:**\n - **config** - `<template type=\"…\">` declarations; never displayed. Each template's attributes (type, label, icon, icon-library, color, category, description, slots, accepts) declare a palette entry and its content declares the inspector form for that type. `slots` makes the section a container with that many child slots; `accepts` is a comma-separated list of the type keys its slots allow.\n- **header-left** - Actions shown on the left of the header bar.\n- **header-right** - Actions shown on the right of the header bar.\n\n### **CSS Parts:**\n - **base** - The grid wrapper.\n- **header** - The full-width header action bar (only rendered when header slots are filled).\n- **palette** - The left palette panel.\n- **canvas** - The centre section-card canvas.\n- **inspector** - The right panel while a section is selected.",
2539
+ "attributes": [
2540
+ {
2541
+ "name": "config",
2542
+ "description": "The page state as a JSON string. Parsed on set; invalid JSON is ignored with a warning.",
2543
+ "values": []
2544
+ },
2545
+ { "name": "heading", "values": [] },
2546
+ { "name": "subheading", "values": [] },
2547
+ {
2548
+ "name": "palette-collapsed",
2549
+ "description": "Collapses the left palette. Auto-set when the builder becomes narrow.",
2550
+ "values": []
2551
+ },
2552
+ {
2553
+ "name": "inspector-collapsed",
2554
+ "description": "Collapses the inspector while a section is selected.",
2555
+ "values": []
2556
+ },
2557
+ {
2558
+ "name": "auto-save",
2559
+ "description": "Auto-save the page to localStorage (1-day TTL). Omit to disable. A bare\n`auto-save` saves every 5 minutes; a numeric value sets the interval in\nminutes (`auto-save=\"2\"`). Restore with `restoreAutoSave()`.",
2560
+ "values": []
2561
+ }
2562
+ ],
2563
+ "references": [
2564
+ {
2565
+ "name": "Documentation",
2566
+ "url": "https://zinc.style/components/page-builder"
2567
+ }
2568
+ ]
2569
+ },
2531
2570
  {
2532
2571
  "name": "zn-page-nav",
2533
2572
  "description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@kubex/zinc",
4
- "version": "1.1.28",
4
+ "version": "1.1.29",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -3731,7 +3731,7 @@
3731
3731
  },
3732
3732
  {
3733
3733
  "name": "zn-flow-builder",
3734
- "description": "A drag-and-drop visual flow builder: steps panel, pan/zoom canvas, and a config inspector.\n---\n\n\n### **Events:**\n - **zn-flow-change** - Emitted whenever the flow state changes. `event.detail.state` is the new FlowState.\n- **zn-flow-selection-change** - Emitted when the selected node changes. `event.detail.nodeId`.\n- **zn-flow-connect** - Emitted when a connection is created. `event.detail.connection`.\n\n### **Slots:**\n - _default_ - `<zn-flow-step>` type declarations; never displayed, each `group`/`category` routes the step into the right tab and collapsible grouping of the rendered panel.\n- **header-left** - Actions shown on the left of the header bar (e.g. Close / Undo All Changes).\n- **header-right** - Actions shown on the right of the header bar (e.g. Apply Changes).\n- **sidebar** - Extra right-panel content (status, version history), below the configuration errors.\n\n### **CSS Parts:**\n - **base** - The grid wrapper.\n- **header** - The full-width header action bar (only rendered when header slots are filled).\n- **steps** - The left steps panel.\n- **inspector** - The right panel while a node or branch is selected.",
3734
+ "description": "A drag-and-drop visual flow builder: steps panel, pan/zoom canvas, and a config inspector.\n---\n\n\n### **Events:**\n - **zn-flow-change** - Emitted whenever the flow state changes. `event.detail.state` is the new FlowState.\n- **zn-flow-selection-change** - Emitted when the selected node changes. `event.detail.nodeId`.\n- **zn-flow-connect** - Emitted when a connection is created. `event.detail.connection`.\n\n### **Methods:**\n - **restoreAutoSave(): _boolean_** - Load the auto-saved flow, if one exists within the 1-day TTL.\n- **toJSON(): _FlowState_** - The full flow state — nodes with their positions, connections, branch\ndata, and notes — ready for persisting. Lets `JSON.stringify(builder)`\nserialize the flow directly, e.g. as a POST body.\n\n### **Slots:**\n - _default_ - `<zn-flow-step>` type declarations; never displayed, each `group`/`category` routes the step into the right tab and collapsible grouping of the rendered panel. A step may nest `<zn-flow-filter>` declarations (each holding `<zn-flow-filter-field>`s, whose operator / option choices are nested `<zn-flow-operator>` / `<zn-flow-option>` elements) — or set a `branch-filters` JSON attribute — to drive the built-in branch conditions editor.\n- **header-left** - Actions shown on the left of the header bar (e.g. Close / Undo All Changes).\n- **header-right** - Actions shown on the right of the header bar (e.g. Apply Changes).\n- **sidebar** - Extra right-panel content (status, version history), below the configuration errors.\n\n### **CSS Parts:**\n - **base** - The grid wrapper.\n- **header** - The full-width header action bar (only rendered when header slots are filled).\n- **steps** - The left steps panel.\n- **inspector** - The right panel while a node or branch is selected.",
3735
3735
  "doc-url": "",
3736
3736
  "attributes": [
3737
3737
  {
@@ -3742,6 +3742,11 @@
3742
3742
  "name": "subheading",
3743
3743
  "value": { "type": "string", "default": "''" }
3744
3744
  },
3745
+ {
3746
+ "name": "auto-save",
3747
+ "description": "Auto-save the flow to localStorage (1-day TTL). Omit to disable. A bare\n`auto-save` saves every 5 minutes; a numeric value sets the interval in\nminutes (`auto-save=\"5\"`). Restore with `restoreAutoSave()`.",
3748
+ "value": { "type": "number | null", "default": "null" }
3749
+ },
3745
3750
  {
3746
3751
  "name": "entrypoints-hint",
3747
3752
  "description": "Optional hint shown beneath each steps-panel tab.",
@@ -3763,7 +3768,7 @@
3763
3768
  "slots": [
3764
3769
  {
3765
3770
  "name": "",
3766
- "description": "`<zn-flow-step>` type declarations; never displayed, each `group`/`category` routes the step into the right tab and collapsible grouping of the rendered panel."
3771
+ "description": "`<zn-flow-step>` type declarations; never displayed, each `group`/`category` routes the step into the right tab and collapsible grouping of the rendered panel. A step may nest `<zn-flow-filter>` declarations (each holding `<zn-flow-filter-field>`s, whose operator / option choices are nested `<zn-flow-operator>` / `<zn-flow-option>` elements) — or set a `branch-filters` JSON attribute — to drive the built-in branch conditions editor."
3767
3772
  },
3768
3773
  {
3769
3774
  "name": "header-left",
@@ -3806,6 +3811,11 @@
3806
3811
  "description": "Node ids flagged as having configuration errors (drives the red node styling).",
3807
3812
  "type": "string[]"
3808
3813
  },
3814
+ {
3815
+ "name": "autoSave",
3816
+ "description": "Auto-save the flow to localStorage (1-day TTL). Omit to disable. A bare\n`auto-save` saves every 5 minutes; a numeric value sets the interval in\nminutes (`auto-save=\"5\"`). Restore with `restoreAutoSave()`.",
3817
+ "type": "number | null"
3818
+ },
3809
3819
  {
3810
3820
  "name": "entrypointsHint",
3811
3821
  "description": "Optional hint shown beneath each steps-panel tab.",
@@ -5947,6 +5957,117 @@
5947
5957
  ]
5948
5958
  }
5949
5959
  },
5960
+ {
5961
+ "name": "zn-page-builder",
5962
+ "description": "A config-driven page composer: a palette of predefined section types, a linear\ncanvas of section cards, and an inspector for editing each section's content.\n---\n\n\n### **Events:**\n - **zn-page-change** - Emitted whenever the page state changes. `event.detail.state` is the new PageState.\n- **zn-page-selection-change** - Emitted when the selected section changes. `event.detail.sectionId`.\n\n### **Methods:**\n - **addSection(type: _string_, index: _number_): _PageSection | null_** - Adds a section of a registered type at `index` (default: end). Returns null for unknown types.\n- **addSectionToSlot(type: _string_, containerId: _string_, slotIndex: _number_): _PageSection | null_** - Adds a new section of a registered type into a container's slot. Returns null if not allowed.\n\n### **Slots:**\n - **config** - `<template type=\"…\">` declarations; never displayed. Each template's attributes (type, label, icon, icon-library, color, category, description, slots, accepts) declare a palette entry and its content declares the inspector form for that type. `slots` makes the section a container with that many child slots; `accepts` is a comma-separated list of the type keys its slots allow.\n- **header-left** - Actions shown on the left of the header bar.\n- **header-right** - Actions shown on the right of the header bar.\n\n### **CSS Parts:**\n - **base** - The grid wrapper.\n- **header** - The full-width header action bar (only rendered when header slots are filled).\n- **palette** - The left palette panel.\n- **canvas** - The centre section-card canvas.\n- **inspector** - The right panel while a section is selected.",
5963
+ "doc-url": "",
5964
+ "attributes": [
5965
+ {
5966
+ "name": "config",
5967
+ "description": "The page state as a JSON string. Parsed on set; invalid JSON is ignored with a warning.",
5968
+ "value": { "type": "string", "default": "''" }
5969
+ },
5970
+ {
5971
+ "name": "heading",
5972
+ "value": { "type": "string", "default": "''" }
5973
+ },
5974
+ {
5975
+ "name": "subheading",
5976
+ "value": { "type": "string", "default": "''" }
5977
+ },
5978
+ {
5979
+ "name": "palette-collapsed",
5980
+ "description": "Collapses the left palette. Auto-set when the builder becomes narrow.",
5981
+ "value": { "type": "boolean", "default": "false" }
5982
+ },
5983
+ {
5984
+ "name": "inspector-collapsed",
5985
+ "description": "Collapses the inspector while a section is selected.",
5986
+ "value": { "type": "boolean", "default": "false" }
5987
+ },
5988
+ {
5989
+ "name": "auto-save",
5990
+ "description": "Auto-save the page to localStorage (1-day TTL). Omit to disable. A bare\n`auto-save` saves every 5 minutes; a numeric value sets the interval in\nminutes (`auto-save=\"2\"`). Restore with `restoreAutoSave()`.",
5991
+ "value": { "type": "number | null", "default": "null" }
5992
+ }
5993
+ ],
5994
+ "slots": [
5995
+ {
5996
+ "name": "config",
5997
+ "description": "`<template type=\"…\">` declarations; never displayed. Each template's attributes (type, label, icon, icon-library, color, category, description, slots, accepts) declare a palette entry and its content declares the inspector form for that type. `slots` makes the section a container with that many child slots; `accepts` is a comma-separated list of the type keys its slots allow."
5998
+ },
5999
+ {
6000
+ "name": "header-left",
6001
+ "description": "Actions shown on the left of the header bar."
6002
+ },
6003
+ {
6004
+ "name": "header-right",
6005
+ "description": "Actions shown on the right of the header bar."
6006
+ }
6007
+ ],
6008
+ "events": [
6009
+ {
6010
+ "name": "zn-page-change",
6011
+ "description": "Emitted whenever the page state changes. `event.detail.state` is the new PageState."
6012
+ },
6013
+ {
6014
+ "name": "zn-page-selection-change",
6015
+ "description": "Emitted when the selected section changes. `event.detail.sectionId`."
6016
+ }
6017
+ ],
6018
+ "js": {
6019
+ "properties": [
6020
+ {
6021
+ "name": "config",
6022
+ "description": "The page state as a JSON string. Parsed on set; invalid JSON is ignored with a warning.",
6023
+ "type": "string"
6024
+ },
6025
+ { "name": "heading", "type": "string" },
6026
+ { "name": "subheading", "type": "string" },
6027
+ {
6028
+ "name": "sectionTypes",
6029
+ "description": "Section types to make available, registered into the internal registry.",
6030
+ "type": "PageSectionType[]"
6031
+ },
6032
+ {
6033
+ "name": "paletteCollapsed",
6034
+ "description": "Collapses the left palette. Auto-set when the builder becomes narrow.",
6035
+ "type": "boolean"
6036
+ },
6037
+ {
6038
+ "name": "inspectorCollapsed",
6039
+ "description": "Collapses the inspector while a section is selected.",
6040
+ "type": "boolean"
6041
+ },
6042
+ {
6043
+ "name": "autoSave",
6044
+ "description": "Auto-save the page to localStorage (1-day TTL). Omit to disable. A bare\n`auto-save` saves every 5 minutes; a numeric value sets the interval in\nminutes (`auto-save=\"2\"`). Restore with `restoreAutoSave()`.",
6045
+ "type": "number | null"
6046
+ },
6047
+ {
6048
+ "name": "state",
6049
+ "description": "Replaces the page state wholesale (does not emit zn-page-change).",
6050
+ "type": "PageState"
6051
+ },
6052
+ {
6053
+ "name": "restoreAutoSave",
6054
+ "description": "Load the auto-saved page, if one exists within the 1-day TTL."
6055
+ },
6056
+ { "name": "undo" },
6057
+ { "name": "redo" }
6058
+ ],
6059
+ "events": [
6060
+ {
6061
+ "name": "zn-page-change",
6062
+ "description": "Emitted whenever the page state changes. `event.detail.state` is the new PageState."
6063
+ },
6064
+ {
6065
+ "name": "zn-page-selection-change",
6066
+ "description": "Emitted when the selected section changes. `event.detail.sectionId`."
6067
+ }
6068
+ ]
6069
+ }
6070
+ },
5950
6071
  {
5951
6072
  "name": "zn-page-nav",
5952
6073
  "description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",