w-flow-vue 1.0.43 → 1.0.44

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 (105) hide show
  1. package/README.md +18 -1
  2. package/dist/w-flow-vue.umd.js +3 -3
  3. package/dist/w-flow-vue.umd.js.map +1 -1
  4. package/docs/components_WFlowVue.vue.html +17 -71
  5. package/docs/components_edges_EdgeMarkerDefs.vue.html +3 -3
  6. package/docs/components_mixins_settingsForm.mjs.html +94 -6
  7. package/docs/components_nodes_Handle.vue.html +2 -2
  8. package/docs/components_nodes_NodeBody.vue.html +2 -2
  9. package/docs/components_nodes_NodePorts.vue.html +2 -2
  10. package/docs/components_ui_Controls.vue.html +2 -2
  11. package/docs/components_ui_NodeSettingsForm.vue.html +77 -47
  12. package/docs/components_ui_SettingsGroup.vue.html +257 -0
  13. package/docs/components_ui_SettingsSelect.vue.html +139 -0
  14. package/docs/components_ui_SettingsText.vue.html +125 -0
  15. package/docs/examples/app.html +1 -1
  16. package/docs/examples/app.umd.js +4 -4
  17. package/docs/examples/app.umd.js.map +1 -1
  18. package/docs/examples/ex-AppBasic.html +7 -7
  19. package/docs/examples/ex-AppConnectivity.html +1 -1
  20. package/docs/global.html +837 -122
  21. package/docs/index.html +2 -2
  22. package/docs/js_anchorPolicy.mjs.html +2 -2
  23. package/docs/js_connectPolicy.mjs.html +2 -2
  24. package/docs/js_defaults.mjs.html +15 -9
  25. package/docs/js_domGesture.mjs.html +2 -2
  26. package/docs/js_edgeMarker.mjs.html +11 -8
  27. package/docs/js_edgePath.mjs.html +5 -2
  28. package/docs/js_edgeStyle.mjs.html +2 -2
  29. package/docs/js_fixSvgNs.mjs.html +2 -2
  30. package/docs/js_geometry.mjs.html +2 -2
  31. package/docs/js_graph.mjs.html +2 -2
  32. package/docs/js_graphMutation.mjs.html +2 -2
  33. package/docs/js_handleDom.mjs.html +2 -2
  34. package/docs/js_hitTest.mjs.html +2 -2
  35. package/docs/js_icons.mjs.html +9 -3
  36. package/docs/js_nodeStyle.mjs.html +4 -4
  37. package/docs/js_popupPolicy.mjs.html +2 -2
  38. package/docs/js_resolveOpt.mjs.html +13 -8
  39. package/docs/js_settingsGroups.mjs.html +122 -0
  40. package/docs/js_shapeAnchor.mjs.html +3 -3
  41. package/docs/js_stepRouting.mjs.html +2 -2
  42. package/docs/js_viewport.mjs.html +2 -2
  43. package/docs/module-EdgeMarkerDefs.html +2 -2
  44. package/docs/module-Handle.html +2 -2
  45. package/docs/module-NodeBody.html +2 -2
  46. package/docs/module-NodePorts.html +2 -2
  47. package/docs/module-NodeSettingsForm.html +5 -5
  48. package/docs/module-SettingsGroup.html +213 -0
  49. package/docs/module-SettingsSelect.html +211 -0
  50. package/docs/module-SettingsText.html +203 -0
  51. package/jest.config.js +2 -0
  52. package/package.json +2 -2
  53. package/spec//346/265/201/347/250/213_/344/272/222/345/213/225/345/245/221/347/264/204.md +74 -13
  54. package/spec//346/265/201/347/250/213_/345/234/226/345/217/260/344/272/222/345/213/225.md +13 -4
  55. package/src/AppBasic.vue +3 -3
  56. package/src/components/WFlowVue.vue +15 -69
  57. package/src/components/edges/EdgeMarkerDefs.vue +1 -1
  58. package/src/components/edges/EdgeRenderer.vue +2 -0
  59. package/src/components/edges/EdgeWrapper.vue +12 -8
  60. package/src/components/mixins/settingsForm.mjs +92 -4
  61. package/src/components/nodes/NodeRenderer.vue +2 -0
  62. package/src/components/nodes/NodeWrapper.vue +7 -2
  63. package/src/components/ui/ConnSettingsForm.vue +139 -132
  64. package/src/components/ui/NodeSettingsForm.vue +74 -44
  65. package/src/components/ui/SettingsGroup.vue +185 -0
  66. package/src/components/ui/SettingsSelect.vue +67 -0
  67. package/src/components/ui/SettingsText.vue +53 -0
  68. package/src/components/ui/settingsForm.css +131 -0
  69. package/src/js/defaults.mjs +13 -7
  70. package/src/js/edgeMarker.mjs +9 -6
  71. package/src/js/edgePath.mjs +3 -0
  72. package/src/js/icons.mjs +6 -0
  73. package/src/js/nodeStyle.mjs +2 -2
  74. package/src/js/resolveOpt.mjs +11 -6
  75. package/src/js/settingsGroups.mjs +50 -0
  76. package/src/js/shapeAnchor.mjs +1 -1
  77. package/test/e2e-flow.test.mjs +541 -15
  78. package/test/pics/flow-E2E-011-node-settings-form.png +0 -0
  79. package/test/pics/flow-E2E-012-popup-exclusive.png +0 -0
  80. package/test/pics/flow-E2E-037-settings-trigger-edge.png +0 -0
  81. package/test/pics/flow-E2E-037-settings-trigger-node.png +0 -0
  82. package/test/pics/flow-E2E-041-settings-groups-conn-default.png +0 -0
  83. package/test/pics/flow-E2E-041-settings-groups-conn-path.png +0 -0
  84. package/test/pics/flow-E2E-041-settings-groups-node-appearance.png +0 -0
  85. package/test/pics/flow-E2E-041-settings-groups-node-default.png +0 -0
  86. package/test/pics/flow-E2E-041-settings-groups-node-expanded.png +0 -0
  87. package/test/pics/flow-E2E-042-settings-groups-dark.png +0 -0
  88. package/test/pics/flow-E2E-043-marker-face-edge-color.png +0 -0
  89. package/test/styleMock.cjs +10 -0
  90. package/test/unit-WFlowVue-features.test.mjs +71 -56
  91. package/test/unit-WFlowVue.test.mjs +1 -1
  92. package/test/unit-anchor-behavior.test.mjs +3 -3
  93. package/test/unit-components-edge.test.mjs +5 -5
  94. package/test/unit-conn-inheritance.test.mjs +4 -2
  95. package/test/unit-defaults.test.mjs +6 -6
  96. package/test/unit-direction-contract.test.mjs +4 -4
  97. package/test/unit-edge-marker.test.mjs +84 -37
  98. package/test/unit-geometry.test.mjs +5 -5
  99. package/test/unit-handle-style.test.mjs +1 -1
  100. package/test/unit-popup-policy.test.mjs +3 -3
  101. package/test/unit-port-geometry.test.mjs +3 -3
  102. package/test/unit-resolve-opt.test.mjs +1 -1
  103. package/test/unit-settings-controls.test.mjs +130 -0
  104. package/test/unit-settings-groups.test.mjs +409 -0
  105. package/test/unit-settings-text.test.mjs +48 -4
package/README.md CHANGED
@@ -33,9 +33,26 @@ Add script for vue.
33
33
 
34
34
  Add script for w-flow-vue.
35
35
  ```alias
36
- <script src="https://cdn.jsdelivr.net/npm/w-flow-vue@1.0.43/dist/w-flow-vue.umd.js"></script>
36
+ <script src="https://cdn.jsdelivr.net/npm/w-flow-vue@1.0.44/dist/w-flow-vue.umd.js"></script>
37
37
  ```
38
38
 
39
+ ## Settings form components (for advanced use)
40
+
41
+ The node / connection settings popups are built from standalone components that can be imported directly, so a host app can embed the same form in its own panel, or assemble a custom one:
42
+
43
+ ```js
44
+ import NodeSettingsForm from 'w-flow-vue/src/components/ui/NodeSettingsForm.vue'
45
+ import ConnSettingsForm from 'w-flow-vue/src/components/ui/ConnSettingsForm.vue'
46
+ import SettingsGroup from 'w-flow-vue/src/components/ui/SettingsGroup.vue'
47
+ import { NODE_SETTING_GROUPS, CONN_SETTING_GROUPS, visibleGroups } from 'w-flow-vue/src/js/settingsGroups.mjs'
48
+ ```
49
+
50
+ - `NodeSettingsForm` / `ConnSettingsForm` — the full form. Props: `node` / `conn`, `defNode` / `defConn`, `excludes` (field keys to hide), `defaultOpenGroups` (which groups start expanded, default `['basic']` — read once on create, not a controlled prop), `maxHeight` (CSS length; the form scrolls inside itself past this, `opt.settingsPopupMaxHeight` defaults to `'400px'`), `textFontSize`. Emits `update(key, value)` and `delete`. Both mount standalone — every `inject` has a default, and each form imports its own `settingsForm.css` — so they work and look right outside `WFlowVue`.
51
+ - `SettingsGroup` — one collapsible group. Props: `title`, `open`, `headingLevel` (default 3); emits `update:open` (so `:open.sync` works). The disclosure triangle points right when collapsed and down when expanded (the symbol shows the current state, as in macOS Finder), and the whole header row is clickable. Markup follows the [W3C ARIA APG accordion pattern](https://www.w3.org/WAI/ARIA/apg/patterns/accordion/): the header button is wrapped in a `role="heading"` element with `aria-level`.
52
+ - `settingsGroups.mjs` — the grouping definition (`{ key, title, fields }`, array order is display order) plus `visibleGroups(groups, excludes)`. Import it to drive your own layout, or to decide which fields to exclude.
53
+
54
+ These are `.vue` / `.mjs` sources, so your build must handle Vue 2 SFCs (the same way this package consumes `w-component-vue`). The prebuilt `dist/w-flow-vue.umd.js` bundle only exports the `WFlowVue` component itself.
55
+
39
56
  ## Required setup for Vue 2 apps
40
57
 
41
58
  Node and connection popups are rendered inside SVG `foreignObject`. Vue 2 has a known bug ([vuejs/vue#7330](https://github.com/vuejs/vue/issues/7330)) where components inside `foreignObject` inherit the SVG namespace, so their HTML content renders as `SVGElement` with zero size. Add this global mixin once in your app entry (e.g. `main.js`) before mounting: