@kubex/zinc 1.1.25 → 1.1.27
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/custom-elements.json +249 -249
- package/dist/vscode.html-custom-data.json +37 -37
- package/dist/web-types.json +81 -81
- package/dist/zn.d.ts +10 -0
- package/dist/zn.min.js +2 -2
- package/package.json +1 -1
- package/src/components/flow-builder/modules/flow-canvas/flow-canvas.component.ts +47 -1
- package/src/components/flow-builder/modules/flow-node/flow-node.scss +1 -1
|
@@ -47,79 +47,6 @@
|
|
|
47
47
|
}
|
|
48
48
|
]
|
|
49
49
|
},
|
|
50
|
-
{
|
|
51
|
-
"kind": "javascript-module",
|
|
52
|
-
"path": "components/action-bar/action-bar.js",
|
|
53
|
-
"declarations": [
|
|
54
|
-
{
|
|
55
|
-
"kind": "class",
|
|
56
|
-
"description": "",
|
|
57
|
-
"name": "ZnActionBar",
|
|
58
|
-
"cssProperties": [
|
|
59
|
-
{
|
|
60
|
-
"description": "An example CSS custom property.",
|
|
61
|
-
"name": "--example"
|
|
62
|
-
}
|
|
63
|
-
],
|
|
64
|
-
"cssParts": [
|
|
65
|
-
{
|
|
66
|
-
"description": "The component's base wrapper.",
|
|
67
|
-
"name": "base"
|
|
68
|
-
}
|
|
69
|
-
],
|
|
70
|
-
"slots": [
|
|
71
|
-
{
|
|
72
|
-
"description": "The default slot.",
|
|
73
|
-
"name": ""
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"description": "An example slot.",
|
|
77
|
-
"name": "example"
|
|
78
|
-
}
|
|
79
|
-
],
|
|
80
|
-
"members": [
|
|
81
|
-
{
|
|
82
|
-
"kind": "field",
|
|
83
|
-
"name": "localize",
|
|
84
|
-
"privacy": "private",
|
|
85
|
-
"readonly": true,
|
|
86
|
-
"default": "new LocalizeController(this)"
|
|
87
|
-
}
|
|
88
|
-
],
|
|
89
|
-
"events": [
|
|
90
|
-
{
|
|
91
|
-
"description": "Emitted as an example.",
|
|
92
|
-
"name": "zn-event-name"
|
|
93
|
-
}
|
|
94
|
-
],
|
|
95
|
-
"superclass": {
|
|
96
|
-
"name": "ZincElement",
|
|
97
|
-
"module": "/src/internal/zinc-element"
|
|
98
|
-
},
|
|
99
|
-
"summary": "Short summary of the component's intended use.",
|
|
100
|
-
"tagNameWithoutPrefix": "action-bar",
|
|
101
|
-
"tagName": "zn-action-bar",
|
|
102
|
-
"customElement": true,
|
|
103
|
-
"jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/action-bar\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-example\n *\n * @event zn-event-name - Emitted as an example.\n *\n * @slot - The default slot.\n * @slot example - An example slot.\n *\n * @csspart base - The component's base wrapper.\n *\n * @cssproperty --example - An example CSS custom property.\n */",
|
|
104
|
-
"documentation": "https://zinc.style/components/action-bar",
|
|
105
|
-
"status": "experimental",
|
|
106
|
-
"since": "1.0",
|
|
107
|
-
"dependencies": [
|
|
108
|
-
"zn-example"
|
|
109
|
-
]
|
|
110
|
-
}
|
|
111
|
-
],
|
|
112
|
-
"exports": [
|
|
113
|
-
{
|
|
114
|
-
"kind": "js",
|
|
115
|
-
"name": "default",
|
|
116
|
-
"declaration": {
|
|
117
|
-
"name": "ZnActionBar",
|
|
118
|
-
"module": "components/action-bar/action-bar.js"
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
]
|
|
122
|
-
},
|
|
123
50
|
{
|
|
124
51
|
"kind": "javascript-module",
|
|
125
52
|
"path": "components/alert/alert.js",
|
|
@@ -296,6 +223,79 @@
|
|
|
296
223
|
}
|
|
297
224
|
]
|
|
298
225
|
},
|
|
226
|
+
{
|
|
227
|
+
"kind": "javascript-module",
|
|
228
|
+
"path": "components/action-bar/action-bar.js",
|
|
229
|
+
"declarations": [
|
|
230
|
+
{
|
|
231
|
+
"kind": "class",
|
|
232
|
+
"description": "",
|
|
233
|
+
"name": "ZnActionBar",
|
|
234
|
+
"cssProperties": [
|
|
235
|
+
{
|
|
236
|
+
"description": "An example CSS custom property.",
|
|
237
|
+
"name": "--example"
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
"cssParts": [
|
|
241
|
+
{
|
|
242
|
+
"description": "The component's base wrapper.",
|
|
243
|
+
"name": "base"
|
|
244
|
+
}
|
|
245
|
+
],
|
|
246
|
+
"slots": [
|
|
247
|
+
{
|
|
248
|
+
"description": "The default slot.",
|
|
249
|
+
"name": ""
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"description": "An example slot.",
|
|
253
|
+
"name": "example"
|
|
254
|
+
}
|
|
255
|
+
],
|
|
256
|
+
"members": [
|
|
257
|
+
{
|
|
258
|
+
"kind": "field",
|
|
259
|
+
"name": "localize",
|
|
260
|
+
"privacy": "private",
|
|
261
|
+
"readonly": true,
|
|
262
|
+
"default": "new LocalizeController(this)"
|
|
263
|
+
}
|
|
264
|
+
],
|
|
265
|
+
"events": [
|
|
266
|
+
{
|
|
267
|
+
"description": "Emitted as an example.",
|
|
268
|
+
"name": "zn-event-name"
|
|
269
|
+
}
|
|
270
|
+
],
|
|
271
|
+
"superclass": {
|
|
272
|
+
"name": "ZincElement",
|
|
273
|
+
"module": "/src/internal/zinc-element"
|
|
274
|
+
},
|
|
275
|
+
"summary": "Short summary of the component's intended use.",
|
|
276
|
+
"tagNameWithoutPrefix": "action-bar",
|
|
277
|
+
"tagName": "zn-action-bar",
|
|
278
|
+
"customElement": true,
|
|
279
|
+
"jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/action-bar\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-example\n *\n * @event zn-event-name - Emitted as an example.\n *\n * @slot - The default slot.\n * @slot example - An example slot.\n *\n * @csspart base - The component's base wrapper.\n *\n * @cssproperty --example - An example CSS custom property.\n */",
|
|
280
|
+
"documentation": "https://zinc.style/components/action-bar",
|
|
281
|
+
"status": "experimental",
|
|
282
|
+
"since": "1.0",
|
|
283
|
+
"dependencies": [
|
|
284
|
+
"zn-example"
|
|
285
|
+
]
|
|
286
|
+
}
|
|
287
|
+
],
|
|
288
|
+
"exports": [
|
|
289
|
+
{
|
|
290
|
+
"kind": "js",
|
|
291
|
+
"name": "default",
|
|
292
|
+
"declaration": {
|
|
293
|
+
"name": "ZnActionBar",
|
|
294
|
+
"module": "components/action-bar/action-bar.js"
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
]
|
|
298
|
+
},
|
|
299
299
|
{
|
|
300
300
|
"kind": "javascript-module",
|
|
301
301
|
"path": "components/animated-button/animated-button.js",
|
|
@@ -8664,71 +8664,6 @@
|
|
|
8664
8664
|
}
|
|
8665
8665
|
]
|
|
8666
8666
|
},
|
|
8667
|
-
{
|
|
8668
|
-
"kind": "javascript-module",
|
|
8669
|
-
"path": "components/data-table-sort/data-table-sort.js",
|
|
8670
|
-
"declarations": [
|
|
8671
|
-
{
|
|
8672
|
-
"kind": "class",
|
|
8673
|
-
"description": "",
|
|
8674
|
-
"name": "ZnDataTableSort",
|
|
8675
|
-
"cssProperties": [
|
|
8676
|
-
{
|
|
8677
|
-
"description": "An example CSS custom property.",
|
|
8678
|
-
"name": "--example"
|
|
8679
|
-
}
|
|
8680
|
-
],
|
|
8681
|
-
"cssParts": [
|
|
8682
|
-
{
|
|
8683
|
-
"description": "The component's base wrapper.",
|
|
8684
|
-
"name": "base"
|
|
8685
|
-
}
|
|
8686
|
-
],
|
|
8687
|
-
"slots": [
|
|
8688
|
-
{
|
|
8689
|
-
"description": "The default slot.",
|
|
8690
|
-
"name": ""
|
|
8691
|
-
},
|
|
8692
|
-
{
|
|
8693
|
-
"description": "An example slot.",
|
|
8694
|
-
"name": "example"
|
|
8695
|
-
}
|
|
8696
|
-
],
|
|
8697
|
-
"members": [],
|
|
8698
|
-
"events": [
|
|
8699
|
-
{
|
|
8700
|
-
"description": "Emitted as an example.",
|
|
8701
|
-
"name": "zn-event-name"
|
|
8702
|
-
}
|
|
8703
|
-
],
|
|
8704
|
-
"superclass": {
|
|
8705
|
-
"name": "ZincElement",
|
|
8706
|
-
"module": "/src/internal/zinc-element"
|
|
8707
|
-
},
|
|
8708
|
-
"summary": "Short summary of the component's intended use.",
|
|
8709
|
-
"tagNameWithoutPrefix": "data-table-sort",
|
|
8710
|
-
"tagName": "zn-data-table-sort",
|
|
8711
|
-
"customElement": true,
|
|
8712
|
-
"jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/data-table-sort\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-example\n *\n * @event zn-event-name - Emitted as an example.\n *\n * @slot - The default slot.\n * @slot example - An example slot.\n *\n * @csspart base - The component's base wrapper.\n *\n * @cssproperty --example - An example CSS custom property.\n */",
|
|
8713
|
-
"documentation": "https://zinc.style/components/data-table-sort",
|
|
8714
|
-
"status": "experimental",
|
|
8715
|
-
"since": "1.0",
|
|
8716
|
-
"dependencies": [
|
|
8717
|
-
"zn-example"
|
|
8718
|
-
]
|
|
8719
|
-
}
|
|
8720
|
-
],
|
|
8721
|
-
"exports": [
|
|
8722
|
-
{
|
|
8723
|
-
"kind": "js",
|
|
8724
|
-
"name": "default",
|
|
8725
|
-
"declaration": {
|
|
8726
|
-
"name": "ZnDataTableSort",
|
|
8727
|
-
"module": "components/data-table-sort/data-table-sort.js"
|
|
8728
|
-
}
|
|
8729
|
-
}
|
|
8730
|
-
]
|
|
8731
|
-
},
|
|
8732
8667
|
{
|
|
8733
8668
|
"kind": "javascript-module",
|
|
8734
8669
|
"path": "components/data-table-search/data-table-search.js",
|
|
@@ -9001,6 +8936,71 @@
|
|
|
9001
8936
|
}
|
|
9002
8937
|
]
|
|
9003
8938
|
},
|
|
8939
|
+
{
|
|
8940
|
+
"kind": "javascript-module",
|
|
8941
|
+
"path": "components/data-table-sort/data-table-sort.js",
|
|
8942
|
+
"declarations": [
|
|
8943
|
+
{
|
|
8944
|
+
"kind": "class",
|
|
8945
|
+
"description": "",
|
|
8946
|
+
"name": "ZnDataTableSort",
|
|
8947
|
+
"cssProperties": [
|
|
8948
|
+
{
|
|
8949
|
+
"description": "An example CSS custom property.",
|
|
8950
|
+
"name": "--example"
|
|
8951
|
+
}
|
|
8952
|
+
],
|
|
8953
|
+
"cssParts": [
|
|
8954
|
+
{
|
|
8955
|
+
"description": "The component's base wrapper.",
|
|
8956
|
+
"name": "base"
|
|
8957
|
+
}
|
|
8958
|
+
],
|
|
8959
|
+
"slots": [
|
|
8960
|
+
{
|
|
8961
|
+
"description": "The default slot.",
|
|
8962
|
+
"name": ""
|
|
8963
|
+
},
|
|
8964
|
+
{
|
|
8965
|
+
"description": "An example slot.",
|
|
8966
|
+
"name": "example"
|
|
8967
|
+
}
|
|
8968
|
+
],
|
|
8969
|
+
"members": [],
|
|
8970
|
+
"events": [
|
|
8971
|
+
{
|
|
8972
|
+
"description": "Emitted as an example.",
|
|
8973
|
+
"name": "zn-event-name"
|
|
8974
|
+
}
|
|
8975
|
+
],
|
|
8976
|
+
"superclass": {
|
|
8977
|
+
"name": "ZincElement",
|
|
8978
|
+
"module": "/src/internal/zinc-element"
|
|
8979
|
+
},
|
|
8980
|
+
"summary": "Short summary of the component's intended use.",
|
|
8981
|
+
"tagNameWithoutPrefix": "data-table-sort",
|
|
8982
|
+
"tagName": "zn-data-table-sort",
|
|
8983
|
+
"customElement": true,
|
|
8984
|
+
"jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/data-table-sort\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-example\n *\n * @event zn-event-name - Emitted as an example.\n *\n * @slot - The default slot.\n * @slot example - An example slot.\n *\n * @csspart base - The component's base wrapper.\n *\n * @cssproperty --example - An example CSS custom property.\n */",
|
|
8985
|
+
"documentation": "https://zinc.style/components/data-table-sort",
|
|
8986
|
+
"status": "experimental",
|
|
8987
|
+
"since": "1.0",
|
|
8988
|
+
"dependencies": [
|
|
8989
|
+
"zn-example"
|
|
8990
|
+
]
|
|
8991
|
+
}
|
|
8992
|
+
],
|
|
8993
|
+
"exports": [
|
|
8994
|
+
{
|
|
8995
|
+
"kind": "js",
|
|
8996
|
+
"name": "default",
|
|
8997
|
+
"declaration": {
|
|
8998
|
+
"name": "ZnDataTableSort",
|
|
8999
|
+
"module": "components/data-table-sort/data-table-sort.js"
|
|
9000
|
+
}
|
|
9001
|
+
}
|
|
9002
|
+
]
|
|
9003
|
+
},
|
|
9004
9004
|
{
|
|
9005
9005
|
"kind": "javascript-module",
|
|
9006
9006
|
"path": "components/datepicker/datepicker.js",
|
|
@@ -21557,6 +21557,116 @@
|
|
|
21557
21557
|
}
|
|
21558
21558
|
]
|
|
21559
21559
|
},
|
|
21560
|
+
{
|
|
21561
|
+
"kind": "javascript-module",
|
|
21562
|
+
"path": "components/opt-group/opt-group.js",
|
|
21563
|
+
"declarations": [
|
|
21564
|
+
{
|
|
21565
|
+
"kind": "class",
|
|
21566
|
+
"description": "",
|
|
21567
|
+
"name": "ZnOptGroup",
|
|
21568
|
+
"cssParts": [
|
|
21569
|
+
{
|
|
21570
|
+
"description": "The component's base wrapper.",
|
|
21571
|
+
"name": "base"
|
|
21572
|
+
},
|
|
21573
|
+
{
|
|
21574
|
+
"description": "The group label element.",
|
|
21575
|
+
"name": "label"
|
|
21576
|
+
}
|
|
21577
|
+
],
|
|
21578
|
+
"slots": [
|
|
21579
|
+
{
|
|
21580
|
+
"description": "The default slot for `<zn-option>` elements.",
|
|
21581
|
+
"name": ""
|
|
21582
|
+
}
|
|
21583
|
+
],
|
|
21584
|
+
"members": [
|
|
21585
|
+
{
|
|
21586
|
+
"kind": "field",
|
|
21587
|
+
"name": "label",
|
|
21588
|
+
"type": {
|
|
21589
|
+
"text": "string"
|
|
21590
|
+
},
|
|
21591
|
+
"default": "''",
|
|
21592
|
+
"description": "The label for the opt-group, displayed as a non-selectable header above the grouped options.",
|
|
21593
|
+
"attribute": "label"
|
|
21594
|
+
},
|
|
21595
|
+
{
|
|
21596
|
+
"kind": "field",
|
|
21597
|
+
"name": "disabled",
|
|
21598
|
+
"type": {
|
|
21599
|
+
"text": "boolean"
|
|
21600
|
+
},
|
|
21601
|
+
"default": "false",
|
|
21602
|
+
"description": "Disables all options within the group.",
|
|
21603
|
+
"attribute": "disabled",
|
|
21604
|
+
"reflects": true
|
|
21605
|
+
},
|
|
21606
|
+
{
|
|
21607
|
+
"kind": "method",
|
|
21608
|
+
"name": "handleLabelChange"
|
|
21609
|
+
},
|
|
21610
|
+
{
|
|
21611
|
+
"kind": "method",
|
|
21612
|
+
"name": "handleDisabledChange"
|
|
21613
|
+
},
|
|
21614
|
+
{
|
|
21615
|
+
"kind": "method",
|
|
21616
|
+
"name": "handleSlotChange",
|
|
21617
|
+
"privacy": "private"
|
|
21618
|
+
},
|
|
21619
|
+
{
|
|
21620
|
+
"kind": "method",
|
|
21621
|
+
"name": "propagateDisabled",
|
|
21622
|
+
"privacy": "private"
|
|
21623
|
+
}
|
|
21624
|
+
],
|
|
21625
|
+
"attributes": [
|
|
21626
|
+
{
|
|
21627
|
+
"name": "label",
|
|
21628
|
+
"type": {
|
|
21629
|
+
"text": "string"
|
|
21630
|
+
},
|
|
21631
|
+
"default": "''",
|
|
21632
|
+
"description": "The label for the opt-group, displayed as a non-selectable header above the grouped options.",
|
|
21633
|
+
"fieldName": "label"
|
|
21634
|
+
},
|
|
21635
|
+
{
|
|
21636
|
+
"name": "disabled",
|
|
21637
|
+
"type": {
|
|
21638
|
+
"text": "boolean"
|
|
21639
|
+
},
|
|
21640
|
+
"default": "false",
|
|
21641
|
+
"description": "Disables all options within the group.",
|
|
21642
|
+
"fieldName": "disabled"
|
|
21643
|
+
}
|
|
21644
|
+
],
|
|
21645
|
+
"superclass": {
|
|
21646
|
+
"name": "ZincElement",
|
|
21647
|
+
"module": "/src/internal/zinc-element"
|
|
21648
|
+
},
|
|
21649
|
+
"summary": "Groups options within a `<zn-select>` under a labeled header, similar to `<optgroup>` in native HTML.",
|
|
21650
|
+
"tagNameWithoutPrefix": "opt-group",
|
|
21651
|
+
"tagName": "zn-opt-group",
|
|
21652
|
+
"customElement": true,
|
|
21653
|
+
"jsDoc": "/**\n * @summary Groups options within a `<zn-select>` under a labeled header, similar to `<optgroup>` in native HTML.\n * @documentation https://zinc.style/components/opt-group\n * @status experimental\n * @since 1.0\n *\n * @slot - The default slot for `<zn-option>` elements.\n *\n * @csspart base - The component's base wrapper.\n * @csspart label - The group label element.\n */",
|
|
21654
|
+
"documentation": "https://zinc.style/components/opt-group",
|
|
21655
|
+
"status": "experimental",
|
|
21656
|
+
"since": "1.0"
|
|
21657
|
+
}
|
|
21658
|
+
],
|
|
21659
|
+
"exports": [
|
|
21660
|
+
{
|
|
21661
|
+
"kind": "js",
|
|
21662
|
+
"name": "default",
|
|
21663
|
+
"declaration": {
|
|
21664
|
+
"name": "ZnOptGroup",
|
|
21665
|
+
"module": "components/opt-group/opt-group.js"
|
|
21666
|
+
}
|
|
21667
|
+
}
|
|
21668
|
+
]
|
|
21669
|
+
},
|
|
21560
21670
|
{
|
|
21561
21671
|
"kind": "javascript-module",
|
|
21562
21672
|
"path": "components/option/option.js",
|
|
@@ -21775,116 +21885,6 @@
|
|
|
21775
21885
|
}
|
|
21776
21886
|
]
|
|
21777
21887
|
},
|
|
21778
|
-
{
|
|
21779
|
-
"kind": "javascript-module",
|
|
21780
|
-
"path": "components/opt-group/opt-group.js",
|
|
21781
|
-
"declarations": [
|
|
21782
|
-
{
|
|
21783
|
-
"kind": "class",
|
|
21784
|
-
"description": "",
|
|
21785
|
-
"name": "ZnOptGroup",
|
|
21786
|
-
"cssParts": [
|
|
21787
|
-
{
|
|
21788
|
-
"description": "The component's base wrapper.",
|
|
21789
|
-
"name": "base"
|
|
21790
|
-
},
|
|
21791
|
-
{
|
|
21792
|
-
"description": "The group label element.",
|
|
21793
|
-
"name": "label"
|
|
21794
|
-
}
|
|
21795
|
-
],
|
|
21796
|
-
"slots": [
|
|
21797
|
-
{
|
|
21798
|
-
"description": "The default slot for `<zn-option>` elements.",
|
|
21799
|
-
"name": ""
|
|
21800
|
-
}
|
|
21801
|
-
],
|
|
21802
|
-
"members": [
|
|
21803
|
-
{
|
|
21804
|
-
"kind": "field",
|
|
21805
|
-
"name": "label",
|
|
21806
|
-
"type": {
|
|
21807
|
-
"text": "string"
|
|
21808
|
-
},
|
|
21809
|
-
"default": "''",
|
|
21810
|
-
"description": "The label for the opt-group, displayed as a non-selectable header above the grouped options.",
|
|
21811
|
-
"attribute": "label"
|
|
21812
|
-
},
|
|
21813
|
-
{
|
|
21814
|
-
"kind": "field",
|
|
21815
|
-
"name": "disabled",
|
|
21816
|
-
"type": {
|
|
21817
|
-
"text": "boolean"
|
|
21818
|
-
},
|
|
21819
|
-
"default": "false",
|
|
21820
|
-
"description": "Disables all options within the group.",
|
|
21821
|
-
"attribute": "disabled",
|
|
21822
|
-
"reflects": true
|
|
21823
|
-
},
|
|
21824
|
-
{
|
|
21825
|
-
"kind": "method",
|
|
21826
|
-
"name": "handleLabelChange"
|
|
21827
|
-
},
|
|
21828
|
-
{
|
|
21829
|
-
"kind": "method",
|
|
21830
|
-
"name": "handleDisabledChange"
|
|
21831
|
-
},
|
|
21832
|
-
{
|
|
21833
|
-
"kind": "method",
|
|
21834
|
-
"name": "handleSlotChange",
|
|
21835
|
-
"privacy": "private"
|
|
21836
|
-
},
|
|
21837
|
-
{
|
|
21838
|
-
"kind": "method",
|
|
21839
|
-
"name": "propagateDisabled",
|
|
21840
|
-
"privacy": "private"
|
|
21841
|
-
}
|
|
21842
|
-
],
|
|
21843
|
-
"attributes": [
|
|
21844
|
-
{
|
|
21845
|
-
"name": "label",
|
|
21846
|
-
"type": {
|
|
21847
|
-
"text": "string"
|
|
21848
|
-
},
|
|
21849
|
-
"default": "''",
|
|
21850
|
-
"description": "The label for the opt-group, displayed as a non-selectable header above the grouped options.",
|
|
21851
|
-
"fieldName": "label"
|
|
21852
|
-
},
|
|
21853
|
-
{
|
|
21854
|
-
"name": "disabled",
|
|
21855
|
-
"type": {
|
|
21856
|
-
"text": "boolean"
|
|
21857
|
-
},
|
|
21858
|
-
"default": "false",
|
|
21859
|
-
"description": "Disables all options within the group.",
|
|
21860
|
-
"fieldName": "disabled"
|
|
21861
|
-
}
|
|
21862
|
-
],
|
|
21863
|
-
"superclass": {
|
|
21864
|
-
"name": "ZincElement",
|
|
21865
|
-
"module": "/src/internal/zinc-element"
|
|
21866
|
-
},
|
|
21867
|
-
"summary": "Groups options within a `<zn-select>` under a labeled header, similar to `<optgroup>` in native HTML.",
|
|
21868
|
-
"tagNameWithoutPrefix": "opt-group",
|
|
21869
|
-
"tagName": "zn-opt-group",
|
|
21870
|
-
"customElement": true,
|
|
21871
|
-
"jsDoc": "/**\n * @summary Groups options within a `<zn-select>` under a labeled header, similar to `<optgroup>` in native HTML.\n * @documentation https://zinc.style/components/opt-group\n * @status experimental\n * @since 1.0\n *\n * @slot - The default slot for `<zn-option>` elements.\n *\n * @csspart base - The component's base wrapper.\n * @csspart label - The group label element.\n */",
|
|
21872
|
-
"documentation": "https://zinc.style/components/opt-group",
|
|
21873
|
-
"status": "experimental",
|
|
21874
|
-
"since": "1.0"
|
|
21875
|
-
}
|
|
21876
|
-
],
|
|
21877
|
-
"exports": [
|
|
21878
|
-
{
|
|
21879
|
-
"kind": "js",
|
|
21880
|
-
"name": "default",
|
|
21881
|
-
"declaration": {
|
|
21882
|
-
"name": "ZnOptGroup",
|
|
21883
|
-
"module": "components/opt-group/opt-group.js"
|
|
21884
|
-
}
|
|
21885
|
-
}
|
|
21886
|
-
]
|
|
21887
|
-
},
|
|
21888
21888
|
{
|
|
21889
21889
|
"kind": "javascript-module",
|
|
21890
21890
|
"path": "components/order-table/order-table.js",
|
|
@@ -38271,7 +38271,7 @@
|
|
|
38271
38271
|
"package": {
|
|
38272
38272
|
"name": "@kubex/zinc",
|
|
38273
38273
|
"description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
|
|
38274
|
-
"version": "1.1.
|
|
38274
|
+
"version": "1.1.27",
|
|
38275
38275
|
"author": "",
|
|
38276
38276
|
"license": "MIT"
|
|
38277
38277
|
}
|
|
@@ -13,17 +13,6 @@
|
|
|
13
13
|
}
|
|
14
14
|
]
|
|
15
15
|
},
|
|
16
|
-
{
|
|
17
|
-
"name": "zn-action-bar",
|
|
18
|
-
"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.",
|
|
19
|
-
"attributes": [],
|
|
20
|
-
"references": [
|
|
21
|
-
{
|
|
22
|
-
"name": "Documentation",
|
|
23
|
-
"url": "https://zinc.style/components/action-bar"
|
|
24
|
-
}
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
16
|
{
|
|
28
17
|
"name": "zn-alert",
|
|
29
18
|
"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.",
|
|
@@ -63,6 +52,17 @@
|
|
|
63
52
|
}
|
|
64
53
|
]
|
|
65
54
|
},
|
|
55
|
+
{
|
|
56
|
+
"name": "zn-action-bar",
|
|
57
|
+
"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.",
|
|
58
|
+
"attributes": [],
|
|
59
|
+
"references": [
|
|
60
|
+
{
|
|
61
|
+
"name": "Documentation",
|
|
62
|
+
"url": "https://zinc.style/components/action-bar"
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
66
|
{
|
|
67
67
|
"name": "zn-animated-button",
|
|
68
68
|
"description": "\n---\n\n\n### **Methods:**\n - **purchase(): _void_** - Programmatically trigger the purchase flow\n- **setSuccess(): _void_** - Set the button to success state manually\n- **setFailure(message): _void_** - Set the button to failure state manually with optional error message\n- **reset(): _void_** - Reset the button to idle state",
|
|
@@ -1073,17 +1073,6 @@
|
|
|
1073
1073
|
}
|
|
1074
1074
|
]
|
|
1075
1075
|
},
|
|
1076
|
-
{
|
|
1077
|
-
"name": "zn-data-table-sort",
|
|
1078
|
-
"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.",
|
|
1079
|
-
"attributes": [],
|
|
1080
|
-
"references": [
|
|
1081
|
-
{
|
|
1082
|
-
"name": "Documentation",
|
|
1083
|
-
"url": "https://zinc.style/components/data-table-sort"
|
|
1084
|
-
}
|
|
1085
|
-
]
|
|
1086
|
-
},
|
|
1087
1076
|
{
|
|
1088
1077
|
"name": "zn-data-table-search",
|
|
1089
1078
|
"description": "A search component for data tables.\n---\n\n\n### **Events:**\n - **zn-search-change** - Emitted when the search value changes (debounced).\n\n### **Methods:**\n - **getFormData(): _Record<string, any>_** - Collects form data from slotted input elements\n\n### **Slots:**\n - _default_ - The default slot for additional form inputs.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
@@ -1126,6 +1115,17 @@
|
|
|
1126
1115
|
}
|
|
1127
1116
|
]
|
|
1128
1117
|
},
|
|
1118
|
+
{
|
|
1119
|
+
"name": "zn-data-table-sort",
|
|
1120
|
+
"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.",
|
|
1121
|
+
"attributes": [],
|
|
1122
|
+
"references": [
|
|
1123
|
+
{
|
|
1124
|
+
"name": "Documentation",
|
|
1125
|
+
"url": "https://zinc.style/components/data-table-sort"
|
|
1126
|
+
}
|
|
1127
|
+
]
|
|
1128
|
+
},
|
|
1129
1129
|
{
|
|
1130
1130
|
"name": "zn-datepicker",
|
|
1131
1131
|
"description": "A date picker component with calendar popup and input validation.\n---\n\n\n### **Events:**\n - **zn-change** - Emitted when the date value changes.\n- **zn-input** - Emitted when the input value changes.\n- **zn-blur** - Emitted when the input loses focus.\n- **zn-focus** - Emitted when the input gains focus.\n\n### **Methods:**\n - **focus(options: _FocusOptions_)** - Sets focus on the input.\n- **blur()** - Removes focus from the input.\n- **select()** - Selects all the text in the input.\n- **checkValidity(): _boolean_** - Checks the validity but does not show a validation message. Returns `true` when valid and `false` when invalid.\n- **getForm(): _HTMLFormElement | null_** - Gets the associated form, if one exists.\n- **reportValidity()** - Checks for validity and shows the browser's validation message if the control is invalid.\n- **setCustomValidity(message: _string_)** - Sets a custom validation message. Pass an empty string to restore validity.\n\n### **Slots:**\n - **label** - The datepicker's label. Alternatively, you can use the `label` attribute.\n- **label-tooltip** - Tooltip content for the label. Alternatively, you can use the `label-tooltip` attribute.\n- **context-note** - Additional context text displayed above the input. Alternatively, you can use the `context-note` attribute.\n- **help-text** - Help text displayed below the input. Alternatively, you can use the `help-text` attribute.\n- **prefix** - Content to display before the input (in addition to the default calendar icon).\n- **suffix** - Content to display after the input.\n\n### **CSS Properties:**\n - **--zn-input-*** - Inherited input component CSS custom properties. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **form-control** - The form control wrapper.\n- **form-control-label** - The label element.\n- **form-control-input** - The input wrapper.\n- **form-control-help-text** - The help text element.",
|
|
@@ -2432,47 +2432,47 @@
|
|
|
2432
2432
|
]
|
|
2433
2433
|
},
|
|
2434
2434
|
{
|
|
2435
|
-
"name": "zn-
|
|
2436
|
-
"description": "
|
|
2435
|
+
"name": "zn-opt-group",
|
|
2436
|
+
"description": "Groups options within a `<zn-select>` under a labeled header, similar to `<optgroup>` in native HTML.\n---\n\n\n### **Slots:**\n - _default_ - The default slot for `<zn-option>` elements.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **label** - The group label element.",
|
|
2437
2437
|
"attributes": [
|
|
2438
2438
|
{
|
|
2439
|
-
"name": "
|
|
2440
|
-
"description": "The
|
|
2439
|
+
"name": "label",
|
|
2440
|
+
"description": "The label for the opt-group, displayed as a non-selectable header above the grouped options.",
|
|
2441
2441
|
"values": []
|
|
2442
2442
|
},
|
|
2443
2443
|
{
|
|
2444
2444
|
"name": "disabled",
|
|
2445
|
-
"description": "
|
|
2445
|
+
"description": "Disables all options within the group.",
|
|
2446
2446
|
"values": []
|
|
2447
|
-
}
|
|
2448
|
-
{ "name": "selected", "values": [] }
|
|
2447
|
+
}
|
|
2449
2448
|
],
|
|
2450
2449
|
"references": [
|
|
2451
2450
|
{
|
|
2452
2451
|
"name": "Documentation",
|
|
2453
|
-
"url": "https://zinc.style/components/
|
|
2452
|
+
"url": "https://zinc.style/components/opt-group"
|
|
2454
2453
|
}
|
|
2455
2454
|
]
|
|
2456
2455
|
},
|
|
2457
2456
|
{
|
|
2458
|
-
"name": "zn-
|
|
2459
|
-
"description": "
|
|
2457
|
+
"name": "zn-option",
|
|
2458
|
+
"description": "Short summary of the component's intended use.\n---\n\n\n### **Methods:**\n - **getTextLabel()** - Returns a plain text label based on the option's content.\n\n### **Slots:**\n - _default_ - The option's label.\n- **prefix** - Used to prepend an icon or similar element to the menu item.\n- **suffix** - Used to append an icon or similar element to the menu item.\n\n### **CSS Parts:**\n - **checked-option-icon** - The checked option icon, an `<zn-icon>` element.\n- **base** - The component's base wrapper.\n- **label** - The option's label.\n- **prefix** - The container that wraps the prefix.\n- **suffix** - The container that wraps the suffix.",
|
|
2460
2459
|
"attributes": [
|
|
2461
2460
|
{
|
|
2462
|
-
"name": "
|
|
2463
|
-
"description": "The
|
|
2461
|
+
"name": "value",
|
|
2462
|
+
"description": "The option's value. When selected, the containing form control will receive this value. The value must be unique\nfrom other options in the same group. Values may contain spaces when using JSON array syntax on the parent select.",
|
|
2464
2463
|
"values": []
|
|
2465
2464
|
},
|
|
2466
2465
|
{
|
|
2467
2466
|
"name": "disabled",
|
|
2468
|
-
"description": "
|
|
2467
|
+
"description": "Draws the option in a disabled state, preventing selection.",
|
|
2469
2468
|
"values": []
|
|
2470
|
-
}
|
|
2469
|
+
},
|
|
2470
|
+
{ "name": "selected", "values": [] }
|
|
2471
2471
|
],
|
|
2472
2472
|
"references": [
|
|
2473
2473
|
{
|
|
2474
2474
|
"name": "Documentation",
|
|
2475
|
-
"url": "https://zinc.style/components/
|
|
2475
|
+
"url": "https://zinc.style/components/option"
|
|
2476
2476
|
}
|
|
2477
2477
|
]
|
|
2478
2478
|
},
|
package/dist/web-types.json
CHANGED
|
@@ -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.
|
|
4
|
+
"version": "1.1.27",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -15,28 +15,6 @@
|
|
|
15
15
|
"events": [],
|
|
16
16
|
"js": { "properties": [], "events": [] }
|
|
17
17
|
},
|
|
18
|
-
{
|
|
19
|
-
"name": "zn-action-bar",
|
|
20
|
-
"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.",
|
|
21
|
-
"doc-url": "",
|
|
22
|
-
"attributes": [],
|
|
23
|
-
"slots": [
|
|
24
|
-
{ "name": "", "description": "The default slot." },
|
|
25
|
-
{ "name": "example", "description": "An example slot." }
|
|
26
|
-
],
|
|
27
|
-
"events": [
|
|
28
|
-
{ "name": "zn-event-name", "description": "Emitted as an example." }
|
|
29
|
-
],
|
|
30
|
-
"js": {
|
|
31
|
-
"properties": [],
|
|
32
|
-
"events": [
|
|
33
|
-
{
|
|
34
|
-
"name": "zn-event-name",
|
|
35
|
-
"description": "Emitted as an example."
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
18
|
{
|
|
41
19
|
"name": "zn-alert",
|
|
42
20
|
"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.",
|
|
@@ -100,6 +78,28 @@
|
|
|
100
78
|
]
|
|
101
79
|
}
|
|
102
80
|
},
|
|
81
|
+
{
|
|
82
|
+
"name": "zn-action-bar",
|
|
83
|
+
"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.",
|
|
84
|
+
"doc-url": "",
|
|
85
|
+
"attributes": [],
|
|
86
|
+
"slots": [
|
|
87
|
+
{ "name": "", "description": "The default slot." },
|
|
88
|
+
{ "name": "example", "description": "An example slot." }
|
|
89
|
+
],
|
|
90
|
+
"events": [
|
|
91
|
+
{ "name": "zn-event-name", "description": "Emitted as an example." }
|
|
92
|
+
],
|
|
93
|
+
"js": {
|
|
94
|
+
"properties": [],
|
|
95
|
+
"events": [
|
|
96
|
+
{
|
|
97
|
+
"name": "zn-event-name",
|
|
98
|
+
"description": "Emitted as an example."
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
103
|
{
|
|
104
104
|
"name": "zn-animated-button",
|
|
105
105
|
"description": "\n---\n\n\n### **Methods:**\n - **purchase(): _void_** - Programmatically trigger the purchase flow\n- **setSuccess(): _void_** - Set the button to success state manually\n- **setFailure(message): _void_** - Set the button to failure state manually with optional error message\n- **reset(): _void_** - Reset the button to idle state",
|
|
@@ -2447,28 +2447,6 @@
|
|
|
2447
2447
|
]
|
|
2448
2448
|
}
|
|
2449
2449
|
},
|
|
2450
|
-
{
|
|
2451
|
-
"name": "zn-data-table-sort",
|
|
2452
|
-
"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.",
|
|
2453
|
-
"doc-url": "",
|
|
2454
|
-
"attributes": [],
|
|
2455
|
-
"slots": [
|
|
2456
|
-
{ "name": "", "description": "The default slot." },
|
|
2457
|
-
{ "name": "example", "description": "An example slot." }
|
|
2458
|
-
],
|
|
2459
|
-
"events": [
|
|
2460
|
-
{ "name": "zn-event-name", "description": "Emitted as an example." }
|
|
2461
|
-
],
|
|
2462
|
-
"js": {
|
|
2463
|
-
"properties": [],
|
|
2464
|
-
"events": [
|
|
2465
|
-
{
|
|
2466
|
-
"name": "zn-event-name",
|
|
2467
|
-
"description": "Emitted as an example."
|
|
2468
|
-
}
|
|
2469
|
-
]
|
|
2470
|
-
}
|
|
2471
|
-
},
|
|
2472
2450
|
{
|
|
2473
2451
|
"name": "zn-data-table-search",
|
|
2474
2452
|
"description": "A search component for data tables.\n---\n\n\n### **Events:**\n - **zn-search-change** - Emitted when the search value changes (debounced).\n\n### **Methods:**\n - **getFormData(): _Record<string, any>_** - Collects form data from slotted input elements\n\n### **Slots:**\n - _default_ - The default slot for additional form inputs.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
@@ -2562,6 +2540,28 @@
|
|
|
2562
2540
|
]
|
|
2563
2541
|
}
|
|
2564
2542
|
},
|
|
2543
|
+
{
|
|
2544
|
+
"name": "zn-data-table-sort",
|
|
2545
|
+
"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.",
|
|
2546
|
+
"doc-url": "",
|
|
2547
|
+
"attributes": [],
|
|
2548
|
+
"slots": [
|
|
2549
|
+
{ "name": "", "description": "The default slot." },
|
|
2550
|
+
{ "name": "example", "description": "An example slot." }
|
|
2551
|
+
],
|
|
2552
|
+
"events": [
|
|
2553
|
+
{ "name": "zn-event-name", "description": "Emitted as an example." }
|
|
2554
|
+
],
|
|
2555
|
+
"js": {
|
|
2556
|
+
"properties": [],
|
|
2557
|
+
"events": [
|
|
2558
|
+
{
|
|
2559
|
+
"name": "zn-event-name",
|
|
2560
|
+
"description": "Emitted as an example."
|
|
2561
|
+
}
|
|
2562
|
+
]
|
|
2563
|
+
}
|
|
2564
|
+
},
|
|
2565
2565
|
{
|
|
2566
2566
|
"name": "zn-datepicker",
|
|
2567
2567
|
"description": "A date picker component with calendar popup and input validation.\n---\n\n\n### **Events:**\n - **zn-change** - Emitted when the date value changes.\n- **zn-input** - Emitted when the input value changes.\n- **zn-blur** - Emitted when the input loses focus.\n- **zn-focus** - Emitted when the input gains focus.\n\n### **Methods:**\n - **focus(options: _FocusOptions_)** - Sets focus on the input.\n- **blur()** - Removes focus from the input.\n- **select()** - Selects all the text in the input.\n- **checkValidity(): _boolean_** - Checks the validity but does not show a validation message. Returns `true` when valid and `false` when invalid.\n- **getForm(): _HTMLFormElement | null_** - Gets the associated form, if one exists.\n- **reportValidity()** - Checks for validity and shows the browser's validation message if the control is invalid.\n- **setCustomValidity(message: _string_)** - Sets a custom validation message. Pass an empty string to restore validity.\n\n### **Slots:**\n - **label** - The datepicker's label. Alternatively, you can use the `label` attribute.\n- **label-tooltip** - Tooltip content for the label. Alternatively, you can use the `label-tooltip` attribute.\n- **context-note** - Additional context text displayed above the input. Alternatively, you can use the `context-note` attribute.\n- **help-text** - Help text displayed below the input. Alternatively, you can use the `help-text` attribute.\n- **prefix** - Content to display before the input (in addition to the default calendar icon).\n- **suffix** - Content to display after the input.\n\n### **CSS Properties:**\n - **--zn-input-*** - Inherited input component CSS custom properties. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **form-control** - The form control wrapper.\n- **form-control-label** - The label element.\n- **form-control-input** - The input wrapper.\n- **form-control-help-text** - The help text element.",
|
|
@@ -5687,93 +5687,93 @@
|
|
|
5687
5687
|
}
|
|
5688
5688
|
},
|
|
5689
5689
|
{
|
|
5690
|
-
"name": "zn-
|
|
5691
|
-
"description": "
|
|
5690
|
+
"name": "zn-opt-group",
|
|
5691
|
+
"description": "Groups options within a `<zn-select>` under a labeled header, similar to `<optgroup>` in native HTML.\n---\n\n\n### **Slots:**\n - _default_ - The default slot for `<zn-option>` elements.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **label** - The group label element.",
|
|
5692
5692
|
"doc-url": "",
|
|
5693
5693
|
"attributes": [
|
|
5694
5694
|
{
|
|
5695
|
-
"name": "
|
|
5696
|
-
"description": "The
|
|
5695
|
+
"name": "label",
|
|
5696
|
+
"description": "The label for the opt-group, displayed as a non-selectable header above the grouped options.",
|
|
5697
5697
|
"value": { "type": "string", "default": "''" }
|
|
5698
5698
|
},
|
|
5699
5699
|
{
|
|
5700
5700
|
"name": "disabled",
|
|
5701
|
-
"description": "
|
|
5702
|
-
"value": { "type": "boolean", "default": "false" }
|
|
5703
|
-
},
|
|
5704
|
-
{
|
|
5705
|
-
"name": "selected",
|
|
5701
|
+
"description": "Disables all options within the group.",
|
|
5706
5702
|
"value": { "type": "boolean", "default": "false" }
|
|
5707
5703
|
}
|
|
5708
5704
|
],
|
|
5709
5705
|
"slots": [
|
|
5710
|
-
{ "name": "", "description": "The option's label." },
|
|
5711
|
-
{
|
|
5712
|
-
"name": "prefix",
|
|
5713
|
-
"description": "Used to prepend an icon or similar element to the menu item."
|
|
5714
|
-
},
|
|
5715
5706
|
{
|
|
5716
|
-
"name": "
|
|
5717
|
-
"description": "
|
|
5707
|
+
"name": "",
|
|
5708
|
+
"description": "The default slot for `<zn-option>` elements."
|
|
5718
5709
|
}
|
|
5719
5710
|
],
|
|
5720
5711
|
"events": [],
|
|
5721
5712
|
"js": {
|
|
5722
5713
|
"properties": [
|
|
5723
|
-
{ "name": "multiple", "type": "boolean" },
|
|
5724
|
-
{ "name": "defaultSlot", "type": "HTMLSlotElement" },
|
|
5725
|
-
{ "name": "current", "type": "boolean" },
|
|
5726
|
-
{ "name": "hasHover", "type": "boolean" },
|
|
5727
5714
|
{
|
|
5728
|
-
"name": "
|
|
5729
|
-
"description": "The
|
|
5715
|
+
"name": "label",
|
|
5716
|
+
"description": "The label for the opt-group, displayed as a non-selectable header above the grouped options.",
|
|
5730
5717
|
"type": "string"
|
|
5731
5718
|
},
|
|
5732
5719
|
{
|
|
5733
5720
|
"name": "disabled",
|
|
5734
|
-
"description": "
|
|
5721
|
+
"description": "Disables all options within the group.",
|
|
5735
5722
|
"type": "boolean"
|
|
5736
|
-
}
|
|
5737
|
-
{ "name": "selected", "type": "boolean" }
|
|
5723
|
+
}
|
|
5738
5724
|
],
|
|
5739
5725
|
"events": []
|
|
5740
5726
|
}
|
|
5741
5727
|
},
|
|
5742
5728
|
{
|
|
5743
|
-
"name": "zn-
|
|
5744
|
-
"description": "
|
|
5729
|
+
"name": "zn-option",
|
|
5730
|
+
"description": "Short summary of the component's intended use.\n---\n\n\n### **Methods:**\n - **getTextLabel()** - Returns a plain text label based on the option's content.\n\n### **Slots:**\n - _default_ - The option's label.\n- **prefix** - Used to prepend an icon or similar element to the menu item.\n- **suffix** - Used to append an icon or similar element to the menu item.\n\n### **CSS Parts:**\n - **checked-option-icon** - The checked option icon, an `<zn-icon>` element.\n- **base** - The component's base wrapper.\n- **label** - The option's label.\n- **prefix** - The container that wraps the prefix.\n- **suffix** - The container that wraps the suffix.",
|
|
5745
5731
|
"doc-url": "",
|
|
5746
5732
|
"attributes": [
|
|
5747
5733
|
{
|
|
5748
|
-
"name": "
|
|
5749
|
-
"description": "The
|
|
5734
|
+
"name": "value",
|
|
5735
|
+
"description": "The option's value. When selected, the containing form control will receive this value. The value must be unique\nfrom other options in the same group. Values may contain spaces when using JSON array syntax on the parent select.",
|
|
5750
5736
|
"value": { "type": "string", "default": "''" }
|
|
5751
5737
|
},
|
|
5752
5738
|
{
|
|
5753
5739
|
"name": "disabled",
|
|
5754
|
-
"description": "
|
|
5740
|
+
"description": "Draws the option in a disabled state, preventing selection.",
|
|
5741
|
+
"value": { "type": "boolean", "default": "false" }
|
|
5742
|
+
},
|
|
5743
|
+
{
|
|
5744
|
+
"name": "selected",
|
|
5755
5745
|
"value": { "type": "boolean", "default": "false" }
|
|
5756
5746
|
}
|
|
5757
5747
|
],
|
|
5758
5748
|
"slots": [
|
|
5749
|
+
{ "name": "", "description": "The option's label." },
|
|
5759
5750
|
{
|
|
5760
|
-
"name": "",
|
|
5761
|
-
"description": "
|
|
5751
|
+
"name": "prefix",
|
|
5752
|
+
"description": "Used to prepend an icon or similar element to the menu item."
|
|
5753
|
+
},
|
|
5754
|
+
{
|
|
5755
|
+
"name": "suffix",
|
|
5756
|
+
"description": "Used to append an icon or similar element to the menu item."
|
|
5762
5757
|
}
|
|
5763
5758
|
],
|
|
5764
5759
|
"events": [],
|
|
5765
5760
|
"js": {
|
|
5766
5761
|
"properties": [
|
|
5762
|
+
{ "name": "multiple", "type": "boolean" },
|
|
5763
|
+
{ "name": "defaultSlot", "type": "HTMLSlotElement" },
|
|
5764
|
+
{ "name": "current", "type": "boolean" },
|
|
5765
|
+
{ "name": "hasHover", "type": "boolean" },
|
|
5767
5766
|
{
|
|
5768
|
-
"name": "
|
|
5769
|
-
"description": "The
|
|
5767
|
+
"name": "value",
|
|
5768
|
+
"description": "The option's value. When selected, the containing form control will receive this value. The value must be unique\nfrom other options in the same group. Values may contain spaces when using JSON array syntax on the parent select.",
|
|
5770
5769
|
"type": "string"
|
|
5771
5770
|
},
|
|
5772
5771
|
{
|
|
5773
5772
|
"name": "disabled",
|
|
5774
|
-
"description": "
|
|
5773
|
+
"description": "Draws the option in a disabled state, preventing selection.",
|
|
5775
5774
|
"type": "boolean"
|
|
5776
|
-
}
|
|
5775
|
+
},
|
|
5776
|
+
{ "name": "selected", "type": "boolean" }
|
|
5777
5777
|
],
|
|
5778
5778
|
"events": []
|
|
5779
5779
|
}
|
package/dist/zn.d.ts
CHANGED
|
@@ -8774,6 +8774,9 @@ declare module "components/flow-builder/modules/flow-canvas/flow-canvas.componen
|
|
|
8774
8774
|
private _linkPos;
|
|
8775
8775
|
/** The valid node under the cursor while linking — the preview snaps to its input. */
|
|
8776
8776
|
private _linkTarget;
|
|
8777
|
+
/** Last pointer position (client coords) while linking, for edge auto-pan. */
|
|
8778
|
+
private _linkClient;
|
|
8779
|
+
private _linkScrollRaf;
|
|
8777
8780
|
private _dragMoved;
|
|
8778
8781
|
/** Centre the flow when it first arrives; any earlier user interaction opts out. */
|
|
8779
8782
|
private _viewInitialised;
|
|
@@ -8808,6 +8811,13 @@ declare module "components/flow-builder/modules/flow-canvas/flow-canvas.componen
|
|
|
8808
8811
|
private _onPortClick;
|
|
8809
8812
|
private _startLink;
|
|
8810
8813
|
private _onLinkPointerMove;
|
|
8814
|
+
private _updateLinkFromClient;
|
|
8815
|
+
/**
|
|
8816
|
+
* While a branch rides the cursor, holding the pointer near (or past) a
|
|
8817
|
+
* canvas edge auto-pans in that direction, so the target can be off-screen.
|
|
8818
|
+
* Runs per frame until the link attaches or cancels.
|
|
8819
|
+
*/
|
|
8820
|
+
private _linkEdgeScroll;
|
|
8811
8821
|
private _onLinkKeyDown;
|
|
8812
8822
|
private _cancelLink;
|
|
8813
8823
|
private _onPointerMove;
|
package/dist/zn.min.js
CHANGED
|
@@ -5086,7 +5086,7 @@ Please report this to https://github.com/markedjs/marked.`,a){let i="<p>An error
|
|
|
5086
5086
|
tooltip=${n}
|
|
5087
5087
|
aria-pressed=${o?"true":"false"}
|
|
5088
5088
|
></zn-button>
|
|
5089
|
-
`}};Ir.styles=[Er.styles,Y(P6e)],b([pe("zn-textarea")],Ir.prototype,"textarea",2),b([pe(".markdown-editor__preview")],Ir.prototype,"previewEl",2),b([w()],Ir.prototype,"name",2),b([w()],Ir.prototype,"value",2),b([ia()],Ir.prototype,"defaultValue",2),b([w()],Ir.prototype,"label",2),b([w({attribute:"help-text"})],Ir.prototype,"helpText",2),b([w()],Ir.prototype,"placeholder",2),b([w({type:Number})],Ir.prototype,"rows",2),b([w({reflect:!0,attribute:"view-mode"})],Ir.prototype,"viewMode",2),b([w({attribute:"storage-key"})],Ir.prototype,"storageKey",2),b([w({type:Boolean,reflect:!0})],Ir.prototype,"required",2),b([w({type:Boolean,reflect:!0})],Ir.prototype,"readonly",2),b([w({type:Boolean,reflect:!0})],Ir.prototype,"disabled",2),b([w({type:Boolean,reflect:!0})],Ir.prototype,"expanded",2),b([He("viewMode",{waitUntilFirstUpdate:!0})],Ir.prototype,"handleViewModeChange",1),b([He("value",{waitUntilFirstUpdate:!0})],Ir.prototype,"handleValueChange",1),b([He("markedReady",{waitUntilFirstUpdate:!0})],Ir.prototype,"handleMarkedReady",1);var tat=Ir;Ir.define("zn-markdown-editor");var rat={},VD=Kr(class extends ii{constructor(){super(...arguments),this.ot=rat}render(a,r){return r()}update(a,[r,t]){if(Array.isArray(r)){if(Array.isArray(this.ot)&&this.ot.length===r.length&&r.every((i,n)=>i===this.ot[n]))return jr}else if(this.ot===r)return jr;return this.ot=Array.isArray(r)?Array.from(r):r,this.render(r,t)}});var O6e={id:"in"},c4={id:"out"},p4="__new__",d0="application/x-zn-flow-type",d4;function u4(){return d4||(d4=new Image,d4.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"),d4}var ua=240,zi=60,f4=200,GD=40,WD=40,aat=40,q6e=240,iat=20;function jD(a){let r=a.length*7.2,t=Math.max(1,Math.ceil(r/(q6e-36)));return{w:Math.min(q6e,Math.round(36+r)),h:aat+(t-1)*iat}}var Mi=20;function bn(a){return Math.round(a/Mi)*Mi}var N6e=10,nat=4;function H6e(a,r){let t=a.m+r.m;return a.x<r.x+r.w+t&&r.x<a.x+a.w+t&&a.y<r.y+r.h+t&&r.y<a.y+a.h+t}function KD(a,r,t,i){let n=Za(a,r(a.type)),o=a.x+ua/2,s=c=>Math.round(o+(n.length===1?0:(c-(n.length-1)/2)*f4)),l=170,d=n.map((c,f)=>{let p=s(f),u=i.find(k=>k.source.node===a.id&&k.source.port===c.id),m=u?t.find(k=>k.id===u.target.node):void 0;if(!u||!m)return{x:p,aligned:!1};if(i.some(k=>k!==u&&k.target.node===u.target.node&&k.target.port===u.target.port))return{x:p,aligned:!1};let _=zc(m,r(m.type)),x=Math.max(_.findIndex(k=>k.id===u.target.port),0),y=r_(m,"in",x,_.length).x;return Math.abs(y-p)>f4?{x:p,aligned:!1}:{x:y,aligned:!0}});for(let c=0;c<d.length;c++)d[c].aligned&&d.some((f,p)=>p!==c&&Math.abs(f.x-d[c].x)<l)&&(d[c]={x:s(c),aligned:!1});return d.map(c=>c.x)}function UD(a,r,t,i){let n=[{x:a.x,y:a.y,w:ua,h:zi,m:N6e}],o=Za(a,r(a.type)),s=KD(a,r,t,i);return o.forEach((l,d)=>{if(!l.label)return;let c=jD(l.label);n.push({x:s[d]-c.w/2,y:a.y+zi+GD+WD,w:c.w,h:c.h,m:nat})}),n}function B6e(a,r,t,i,n){let o=UD(a,t,i,n);return UD(r,t,i,n).some(s=>o.some(l=>H6e(l,s)))}function F6e(a,r,t,i,n){let o={x:a.x,y:a.y,w:ua,h:zi,m:N6e};return UD(r,t,i,n).some(s=>H6e(o,s))}var YD=200,XD=120,$6e=120,V6e=80;function r_(a,r,t,i){return{x:a.x+ua*(t+1)/(i+1),y:a.y+(r==="in"?0:zi)}}function U6e(){return{nodes:[],connections:[],notes:[]}}function h4(a){var r;return a?(r=a.inputs)!=null?r:[O6e]:[O6e]}function QD(a){var r;return a?(r=a.outputs)!=null?r:[c4]:[c4]}function zc(a,r){var t;return(t=a.inputs)!=null?t:h4(r)}function Za(a,r){var t;return(t=a.outputs)!=null?t:QD(r)}function a_(a,r){var t,i;return(i=(t=zc(a,r)[0])==null?void 0:t.id)!=null?i:null}function G6e(a,r){let t=new Set,i=n=>{for(let o of a.connections)o.source.node===n&&!t.has(o.target.node)&&(t.add(o.target.node),i(o.target.node))};return i(r),t}function mp(a,r){let t=new Set(a.map(c=>c.id)),i=new Map(a.map(c=>[c.id,[]])),n=new Set;for(let c of r)!t.has(c.source.node)||!t.has(c.target.node)||(i.get(c.source.node).push(c),n.add(c.target.node));let o=new Set,s=new Set,l=new Set,d=c=>{var f;s.add(c),l.add(c);for(let p of(f=i.get(c))!=null?f:[])l.has(p.target.node)?o.add(p):s.has(p.target.node)||d(p.target.node);l.delete(c)};return a.filter(c=>!n.has(c.id)).forEach(c=>d(c.id)),a.forEach(c=>{s.has(c.id)||d(c.id)}),o}var W6e=Q`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--node-accent:rgb(var(--zn-color-primary));--port-size:11px;position:absolute;top:0;left:0;display:block;-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:none}:host([dragging]) .card{cursor:grabbing}.card{position:relative;display:flex;flex-direction:column;justify-content:center;width:100%;height:100%;padding:0 10px;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:10px;box-shadow:0 1px 2px rgba(var(--zn-shadow),0.4);cursor:grab;transition:border-color 0.12s ease,box-shadow 0.12s ease}.card:hover{border-color:rgb(var(--zn-color-border-active))}.card.selected{border-color:var(--node-accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--node-accent) 35%,transparent)}.card.link-target{border-color:rgb(var(--zn-color-primary));box-shadow:0 0 0 3px color-mix(in srgb,rgb(var(--zn-color-primary)) 30%,transparent)}.card.error{border-color:rgb(var(--zn-color-error));background:color-mix(in srgb,rgb(var(--zn-color-error)) 6%,rgb(var(--zn-panel)))}.body{display:flex;align-items:center;gap:10px}.icon-tile{display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:36px;height:36px;border-radius:8px;color:var(--node-accent);background:color-mix(in srgb,var(--node-accent) 14%,transparent)}.text{display:flex;flex-direction:column;min-width:0;flex:1 1 auto}.text .title{font-size:0.8125rem;font-weight:600;color:rgb(var(--zn-text));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text .subtitle{font-size:0.75rem;color:rgb(var(--zn-color-muted-text));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.menu{flex:0 0 auto
|
|
5089
|
+
`}};Ir.styles=[Er.styles,Y(P6e)],b([pe("zn-textarea")],Ir.prototype,"textarea",2),b([pe(".markdown-editor__preview")],Ir.prototype,"previewEl",2),b([w()],Ir.prototype,"name",2),b([w()],Ir.prototype,"value",2),b([ia()],Ir.prototype,"defaultValue",2),b([w()],Ir.prototype,"label",2),b([w({attribute:"help-text"})],Ir.prototype,"helpText",2),b([w()],Ir.prototype,"placeholder",2),b([w({type:Number})],Ir.prototype,"rows",2),b([w({reflect:!0,attribute:"view-mode"})],Ir.prototype,"viewMode",2),b([w({attribute:"storage-key"})],Ir.prototype,"storageKey",2),b([w({type:Boolean,reflect:!0})],Ir.prototype,"required",2),b([w({type:Boolean,reflect:!0})],Ir.prototype,"readonly",2),b([w({type:Boolean,reflect:!0})],Ir.prototype,"disabled",2),b([w({type:Boolean,reflect:!0})],Ir.prototype,"expanded",2),b([He("viewMode",{waitUntilFirstUpdate:!0})],Ir.prototype,"handleViewModeChange",1),b([He("value",{waitUntilFirstUpdate:!0})],Ir.prototype,"handleValueChange",1),b([He("markedReady",{waitUntilFirstUpdate:!0})],Ir.prototype,"handleMarkedReady",1);var tat=Ir;Ir.define("zn-markdown-editor");var rat={},VD=Kr(class extends ii{constructor(){super(...arguments),this.ot=rat}render(a,r){return r()}update(a,[r,t]){if(Array.isArray(r)){if(Array.isArray(this.ot)&&this.ot.length===r.length&&r.every((i,n)=>i===this.ot[n]))return jr}else if(this.ot===r)return jr;return this.ot=Array.isArray(r)?Array.from(r):r,this.render(r,t)}});var O6e={id:"in"},c4={id:"out"},p4="__new__",d0="application/x-zn-flow-type",d4;function u4(){return d4||(d4=new Image,d4.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"),d4}var ua=240,zi=60,f4=200,GD=40,WD=40,aat=40,q6e=240,iat=20;function jD(a){let r=a.length*7.2,t=Math.max(1,Math.ceil(r/(q6e-36)));return{w:Math.min(q6e,Math.round(36+r)),h:aat+(t-1)*iat}}var Mi=20;function bn(a){return Math.round(a/Mi)*Mi}var N6e=10,nat=4;function H6e(a,r){let t=a.m+r.m;return a.x<r.x+r.w+t&&r.x<a.x+a.w+t&&a.y<r.y+r.h+t&&r.y<a.y+a.h+t}function KD(a,r,t,i){let n=Za(a,r(a.type)),o=a.x+ua/2,s=c=>Math.round(o+(n.length===1?0:(c-(n.length-1)/2)*f4)),l=170,d=n.map((c,f)=>{let p=s(f),u=i.find(k=>k.source.node===a.id&&k.source.port===c.id),m=u?t.find(k=>k.id===u.target.node):void 0;if(!u||!m)return{x:p,aligned:!1};if(i.some(k=>k!==u&&k.target.node===u.target.node&&k.target.port===u.target.port))return{x:p,aligned:!1};let _=zc(m,r(m.type)),x=Math.max(_.findIndex(k=>k.id===u.target.port),0),y=r_(m,"in",x,_.length).x;return Math.abs(y-p)>f4?{x:p,aligned:!1}:{x:y,aligned:!0}});for(let c=0;c<d.length;c++)d[c].aligned&&d.some((f,p)=>p!==c&&Math.abs(f.x-d[c].x)<l)&&(d[c]={x:s(c),aligned:!1});return d.map(c=>c.x)}function UD(a,r,t,i){let n=[{x:a.x,y:a.y,w:ua,h:zi,m:N6e}],o=Za(a,r(a.type)),s=KD(a,r,t,i);return o.forEach((l,d)=>{if(!l.label)return;let c=jD(l.label);n.push({x:s[d]-c.w/2,y:a.y+zi+GD+WD,w:c.w,h:c.h,m:nat})}),n}function B6e(a,r,t,i,n){let o=UD(a,t,i,n);return UD(r,t,i,n).some(s=>o.some(l=>H6e(l,s)))}function F6e(a,r,t,i,n){let o={x:a.x,y:a.y,w:ua,h:zi,m:N6e};return UD(r,t,i,n).some(s=>H6e(o,s))}var YD=200,XD=120,$6e=120,V6e=80;function r_(a,r,t,i){return{x:a.x+ua*(t+1)/(i+1),y:a.y+(r==="in"?0:zi)}}function U6e(){return{nodes:[],connections:[],notes:[]}}function h4(a){var r;return a?(r=a.inputs)!=null?r:[O6e]:[O6e]}function QD(a){var r;return a?(r=a.outputs)!=null?r:[c4]:[c4]}function zc(a,r){var t;return(t=a.inputs)!=null?t:h4(r)}function Za(a,r){var t;return(t=a.outputs)!=null?t:QD(r)}function a_(a,r){var t,i;return(i=(t=zc(a,r)[0])==null?void 0:t.id)!=null?i:null}function G6e(a,r){let t=new Set,i=n=>{for(let o of a.connections)o.source.node===n&&!t.has(o.target.node)&&(t.add(o.target.node),i(o.target.node))};return i(r),t}function mp(a,r){let t=new Set(a.map(c=>c.id)),i=new Map(a.map(c=>[c.id,[]])),n=new Set;for(let c of r)!t.has(c.source.node)||!t.has(c.target.node)||(i.get(c.source.node).push(c),n.add(c.target.node));let o=new Set,s=new Set,l=new Set,d=c=>{var f;s.add(c),l.add(c);for(let p of(f=i.get(c))!=null?f:[])l.has(p.target.node)?o.add(p):s.has(p.target.node)||d(p.target.node);l.delete(c)};return a.filter(c=>!n.has(c.id)).forEach(c=>d(c.id)),a.forEach(c=>{s.has(c.id)||d(c.id)}),o}var W6e=Q`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--node-accent:rgb(var(--zn-color-primary));--port-size:11px;position:absolute;top:0;left:0;display:block;-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:none}:host([dragging]) .card{cursor:grabbing}.card{position:relative;display:flex;flex-direction:column;justify-content:center;width:100%;height:100%;padding:0 10px;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:10px;box-shadow:0 1px 2px rgba(var(--zn-shadow),0.4);cursor:grab;transition:border-color 0.12s ease,box-shadow 0.12s ease}.card:hover{border-color:rgb(var(--zn-color-border-active))}.card.selected{border-color:var(--node-accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--node-accent) 35%,transparent)}.card.link-target{border-color:rgb(var(--zn-color-primary));box-shadow:0 0 0 3px color-mix(in srgb,rgb(var(--zn-color-primary)) 30%,transparent)}.card.error{border-color:rgb(var(--zn-color-error));background:color-mix(in srgb,rgb(var(--zn-color-error)) 6%,rgb(var(--zn-panel)))}.body{display:flex;align-items:center;gap:10px}.icon-tile{display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:36px;height:36px;border-radius:8px;color:var(--node-accent);background:color-mix(in srgb,var(--node-accent) 14%,transparent)}.text{display:flex;flex-direction:column;min-width:0;flex:1 1 auto}.text .title{font-size:0.8125rem;font-weight:600;color:rgb(var(--zn-text));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text .subtitle{font-size:0.75rem;color:rgb(var(--zn-color-muted-text));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.menu{flex:0 0 auto}zn-menu-item.danger{color:rgb(var(--zn-color-error))}.ports{position:absolute;left:0;width:100%;height:0}.ports--in{top:0}.ports--out{bottom:0}.port-wrap{position:absolute}.port{position:absolute;left:0;top:0;transform:translate(-50%,-50%);width:var(--port-size);height:var(--port-size);border-radius:50%;background:rgb(var(--zn-panel));border:2px solid var(--node-accent);box-sizing:border-box;pointer-events:none}.port--in{transition:transform 0.12s ease,background 0.12s ease,box-shadow 0.12s ease}:host([link-target]) .port--in{transform:translate(-50%,-50%) scale(1.4);background:rgb(var(--zn-color-primary));border-color:rgb(var(--zn-color-primary));box-shadow:0 0 0 4px color-mix(in srgb,rgb(var(--zn-color-primary)) 25%,transparent)}.port--out{pointer-events:auto;cursor:pointer;transition:transform 0.12s ease,background 0.12s ease,box-shadow 0.12s ease}.port--out:hover{transform:translate(-50%,-50%) scale(1.4);background:var(--node-accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--node-accent) 25%,transparent)}.port-label{position:absolute;top:calc(var(--port-size) / 2 + 3px);left:8px;font-size:0.625rem;font-weight:600;letter-spacing:0.02em;color:rgb(var(--zn-color-muted-text));white-space:nowrap;pointer-events:none}`;var Yn=class extends K{constructor(){super(...arguments);this.selected=!1;this.error=!1;this.dragging=!1;this.linkTarget=!1;this._onBodyPointerDown=t=>{if(t.button!==0)return;let i=t.target;i.closest(".port")||i.closest("zn-dropdown")||(t.stopPropagation(),this._emit("flow-node-select",{nodeId:this.node.id}),this._emit("flow-node-grab",{nodeId:this.node.id,clientX:t.clientX,clientY:t.clientY}))}}updated(t){var i,n;super.updated(t),this.style.width=`${ua}px`,this.style.height=`${zi}px`,this.style.setProperty("--node-accent",(n=(i=this.type)==null?void 0:i.color)!=null?n:"rgb(var(--zn-color-primary))")}get nodeTitle(){var t,i,n,o,s,l;return(l=(s=(n=(t=this.node)==null?void 0:t.label)!=null?n:(i=this.type)==null?void 0:i.label)!=null?s:(o=this.node)==null?void 0:o.type)!=null?l:"Node"}get nodeSubtitle(){var i,n,o,s,l,d,c;let t=(l=(n=(i=this.node)==null?void 0:i.data)==null?void 0:n.subtitle)!=null?l:(s=(o=this.node)==null?void 0:o.data)==null?void 0:s.description;return typeof t=="string"?t:(c=(d=this.type)==null?void 0:d.description)!=null?c:""}_emit(t,i){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:i}))}_action(t){this._emit("flow-node-action",{nodeId:this.node.id,action:t})}_renderPorts(t,i){let n=t.length;return C`
|
|
5090
5090
|
<div class="ports ports--${i}">
|
|
5091
5091
|
${t.map((o,s)=>{let l=`${100*(s+1)/(n+1)}%`;return C`
|
|
5092
5092
|
<div class="port-wrap" style="left:${l}">
|
|
@@ -5135,7 +5135,7 @@ Please report this to https://github.com/markedjs/marked.`,a){let i="<p>An error
|
|
|
5135
5135
|
</div>
|
|
5136
5136
|
</div>`:""}
|
|
5137
5137
|
</div>
|
|
5138
|
-
`}};Yn.styles=Y(W6e),Yn.dependencies={"zn-icon":It,"zn-button":Tr,"zn-dropdown":Xi,"zn-menu":Rs,"zn-menu-item":Sd},b([w({attribute:!1})],Yn.prototype,"node",2),b([w({attribute:!1})],Yn.prototype,"type",2),b([w({type:Boolean,reflect:!0})],Yn.prototype,"selected",2),b([w({type:Boolean,reflect:!0})],Yn.prototype,"error",2),b([w({type:Boolean,reflect:!0})],Yn.prototype,"dragging",2),b([w({type:Boolean,reflect:!0,attribute:"link-target"})],Yn.prototype,"linkTarget",2);var j6e=Yn;Yn.define("zn-flow-node");var K6e=Q`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;position:relative;width:100%;height:100%;overflow:hidden}.viewport{position:absolute;inset:0;overflow:hidden;background-color:rgb(var(--zn-color-body));background-image:radial-gradient(rgb(var(--zn-color-border)) 1px,transparent 1px);background-size:20px 20px;cursor:grab;touch-action:none}.viewport.grabbing,.viewport.grabbing *{cursor:grabbing !important}.viewport.connecting,.viewport.connecting *{cursor:crosshair !important}.viewport.resizing,.viewport.resizing *{cursor:nwse-resize !important}.connections{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}.connections .wire{fill:none;stroke:rgb(var(--zn-color-primary));stroke-width:2}.connections .wire--stub{stroke:rgb(var(--zn-color-border-active));stroke-dasharray:4 4}.connections .wire--preview{stroke-dasharray:6 4}.connections .wire--loop{stroke:rgb(var(--zn-color-warning))}.connections marker path{fill:rgb(var(--zn-color-primary))}.connections marker#flow-arrow-loop path{fill:rgb(var(--zn-color-warning))}.viewport.linking{cursor:crosshair}.add-point{position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:center;width:24px;height:24px;margin:-12px;padding:0;border-radius:50%;color:rgb(var(--zn-color-primary));background:rgb(var(--zn-panel));border:1px dashed rgb(var(--zn-color-border-active));cursor:pointer;transition:background 0.12s ease,color 0.12s ease}.add-point:hover{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-style:solid}.add-point--target{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-style:solid;box-shadow:0 0 0 4px color-mix(in srgb,rgb(var(--zn-color-primary)) 25%,transparent)}.add-point--wire{width:20px;height:20px;margin:-10px}.viewport.step-dragging .add-point{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-style:solid;box-shadow:0 0 0 4px color-mix(in srgb,rgb(var(--zn-color-primary)) 22%,transparent)}.layer{position:absolute;top:0;left:0;transform-origin:0 0;width:0;height:0}.node-pos{position:absolute;top:0;left:0}.branch-pill-wrap{position:absolute;top:0;left:0;transform:translateX(-50%);display:flex;align-items:stretch}.branch-pill-wrap::after{content:"";position:absolute;left:100%;top:0;width:40px;height:100%}.branch-pill-wrap:hover .branch-pill-delete{opacity:1;transform:translate(0,-50%);pointer-events:auto;transition-delay:0.15s}.branch-pill{display:flex;align-items:center;justify-content:center;width:-moz-max-content;width:max-content;max-width:240px;box-sizing:border-box;text-align:center;overflow-wrap:anywhere;overflow:hidden;padding:0 18px;border-radius:10px;font:inherit;font-size:0.8125rem;font-weight:600;line-height:20px;color:rgb(var(--zn-text));background:color-mix(in srgb,rgb(var(--zn-color-primary)) 8%,rgb(var(--zn-panel)));border:1px solid color-mix(in srgb,rgb(var(--zn-color-primary)) 45%,transparent);cursor:pointer;transition:border-color 0.12s ease,box-shadow 0.12s ease}.branch-pill:hover{border-color:rgb(var(--zn-color-primary));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4)}.branch-pill--selected{border-color:rgb(var(--zn-color-primary));background:color-mix(in srgb,rgb(var(--zn-color-primary)) 16%,rgb(var(--zn-panel)))}.branch-pill--loop{background:color-mix(in srgb,rgb(var(--zn-color-warning)) 10%,rgb(var(--zn-panel)));border-color:color-mix(in srgb,rgb(var(--zn-color-warning)) 55%,transparent)}.branch-pill--loop:hover{border-color:rgb(var(--zn-color-warning))}.branch-pill--loop.branch-pill--selected{border-color:rgb(var(--zn-color-warning));background:color-mix(in srgb,rgb(var(--zn-color-warning)) 18%,rgb(var(--zn-panel)))}.branch-pill-delete{position:absolute;z-index:1;left:calc(100% + 8px);top:50%;transform:translate(-10px,-50%);display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:50%;background:rgb(var(--zn-color-error));color:white;cursor:pointer;opacity:0;pointer-events:none;transition:opacity 0.15s ease,transform 0.15s ease}.branch-pill-delete:hover{filter:brightness(1.1)}.drop-ghost{position:absolute;top:0;left:0;display:flex;align-items:center;gap:10px;padding:0 12px;border:2px dashed rgb(var(--zn-color-primary));border-radius:10px;background:color-mix(in srgb,rgb(var(--zn-color-primary)) 10%,rgb(var(--zn-panel)));opacity:0.9;pointer-events:none}.drop-ghost__icon{--node-accent:rgb(var(--zn-color-primary));display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:36px;height:36px;border-radius:8px;color:var(--node-accent);background:color-mix(in srgb,var(--node-accent) 16%,rgb(var(--zn-panel)))}.drop-ghost__label{font-size:0.8125rem;font-weight:600;color:rgb(var(--zn-text));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.toolbar{position:absolute;top:16px;display:flex;align-items:center;gap:2px;padding:3px;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);z-index:2}.toolbar--history{left:16px}.toolbar--zoom{right:16px}.note{position:absolute;display:flex;flex-direction:column;background:#fef9c3;border:1px solid #fde68a;border-radius:4px;box-shadow:0 2px 6px rgba(0,0,0,0.12)}.note__resize{position:absolute;right:0;bottom:0;width:16px;height:16px;cursor:nwse-resize;background:linear-gradient(135deg,transparent 0 50%,#d9c64a 50% 60%,transparent 60% 70%,#d9c64a 70% 80%,transparent 80%)}.note__bar{display:flex;justify-content:flex-end;height:20px;cursor:grab}.note__close{width:20px;height:20px;padding:0;font-size:14px;line-height:1;color:#92400e;background:transparent;cursor:pointer}.note__text{flex:1;margin:0;padding:0 10px 10px;resize:none;border:none;outline:none;background:transparent;font:inherit;font-size:0.8125rem;color:#713f12}`;var JD=.25,Y6e=2,X6e=.15,ZD=40,oat=20,eR=20,m4=40,sat=20,g4=d0,ha=class ha extends K{constructor(){super(...arguments);this.nodes=[];this.connections=[];this.notes=[];this.selectedNodeId=null;this.errorNodes=new Set;this.movingNodeId=null;this.dragType=null;this.selectedBranch=null;this.zoom=1;this.panX=0;this.panY=0;this.drag=null;this._dropGhost=null;this._linking=null;this._linkPos=null;this._linkTarget=null;this._dragMoved=!1;this._viewInitialised=!1;this._onWheel=t=>{if(t.composedPath().some(d=>d instanceof HTMLTextAreaElement))return;t.preventDefault(),this._viewInitialised=!0;let i=t.deltaMode===1?16:t.deltaMode===2?100:1,n=t.deltaX*i,o=t.deltaY*i;if(t.ctrlKey||t.metaKey){let d=Math.min(Y6e,Math.max(JD,this.zoom*Math.exp(-o*.0015)));if(d===this.zoom)return;let c=this.getBoundingClientRect(),f=t.clientX-c.left,p=t.clientY-c.top,u=(f-this.panX)/this.zoom,m=(p-this.panY)/this.zoom;this.zoom=+d.toFixed(3),this.panX=Math.round(f-u*this.zoom),this.panY=Math.round(p-m*this.zoom);return}let s=t.shiftKey&&!n?o:n,l=t.shiftKey&&!n?0:o;this.panX-=Math.round(s),this.panY-=Math.round(l)};this._onBackgroundPointerDown=t=>{if(t.button===1){t.preventDefault(),this._viewInitialised=!0,this.drag={kind:"pan",ox:t.clientX,oy:t.clientY,px:this.panX,py:this.panY},this._setupWindow("grabbing");return}if(t.button===0){if(this._viewInitialised=!0,this._linking){let i=this._linking,n=this._linkTarget;if(this._cancelLink(),n){this._emit("flow-link-assign",{nodeId:i.nodeId,port:i.port,targetId:n});return}}this._emit("flow-node-select",{nodeId:null}),this.drag={kind:"pan",ox:t.clientX,oy:t.clientY,px:this.panX,py:this.panY},this._setupWindow("grabbing")}};this._onNodeGrab=t=>{if(this._linking){let o=this._linking;this._cancelLink(),o.nodeId!==t.detail.nodeId&&this._emit("flow-link-assign",{nodeId:o.nodeId,port:o.port,targetId:t.detail.nodeId});return}let i=this.nodes.find(o=>o.id===t.detail.nodeId);if(!i)return;let n=this.screenToCanvas(t.detail.clientX,t.detail.clientY);this.drag={kind:"node",id:i.id,offX:n.x-i.x,offY:n.y-i.y},this._dragMoved=!1,this._setupWindow("grabbing")};this._onNodeSelect=t=>{this._linking&&t.detail.nodeId&&t.stopPropagation()};this._onPortClick=t=>{var s;let{nodeId:i}=t.detail;if(this._linking&&this._linking.nodeId!==i){let l=this._linking;this._cancelLink(),this._emit("flow-link-assign",{nodeId:l.nodeId,port:l.port,targetId:i});return}let n=this.nodes.find(l=>l.id===i);if(!n)return;let o=Za(n,this._typeFor(n)).find(l=>!this.connections.some(d=>d.source.node===i&&d.source.port===l.id));this._startLink(i,(s=o==null?void 0:o.id)!=null?s:p4)};this._onLinkPointerMove=t=>{var l;let i=this.screenToCanvas(t.clientX,t.clientY);this._linkPos=i;let n=this._linking;if(!n)return;let o=12,s=this.nodes.find(d=>d.id!==n.nodeId&&i.x>=d.x-o&&i.x<=d.x+ua+o&&i.y>=d.y-o&&i.y<=d.y+zi+o&&zc(d,this._typeFor(d)).length>0);this._linkTarget=(l=s==null?void 0:s.id)!=null?l:null};this._onLinkKeyDown=t=>{t.key==="Escape"&&this._cancelLink()};this._cancelLink=()=>{this._linking&&(this._linking=null,this._linkPos=null,this._linkTarget=null,window.removeEventListener("pointermove",this._onLinkPointerMove),window.removeEventListener("keydown",this._onLinkKeyDown),window.removeEventListener("blur",this._cancelLink))};this._onPointerMove=t=>{if(!this.drag)return;if(this.drag.kind==="pan"){this.panX=this.drag.px+(t.clientX-this.drag.ox),this.panY=this.drag.py+(t.clientY-this.drag.oy);return}let i=this.screenToCanvas(t.clientX,t.clientY);if(this.drag.kind==="node"){let n=this.nodes.find(o=>o.id===this.drag.id);if(n){let o={x:bn(i.x-this.drag.offX),y:bn(i.y-this.drag.offY)},s=this.nodes.filter(c=>c.id!==n.id),l=c=>{let f=le(le({},n),c);return!s.some(p=>B6e(f,p,u=>{var m;return(m=this.registry)==null?void 0:m.get(u)},this.nodes,this.connections))},d=l(o)?o:l({x:o.x,y:n.y})?{x:o.x,y:n.y}:l({x:n.x,y:o.y})?{x:n.x,y:o.y}:null;d&&(d.x!==n.x||d.y!==n.y)&&(this._dragMoved||this._beginMove(),n.x=d.x,n.y=d.y,this.requestUpdate())}}else if(this.drag.kind==="note"){let n=this.notes.find(o=>o.id===this.drag.id);n&&(this._dragMoved||this._beginMove(),n.x=bn(i.x-this.drag.offX),n.y=bn(i.y-this.drag.offY),this.requestUpdate())}else if(this.drag.kind==="note-resize"){let n=this.notes.find(o=>o.id===this.drag.id);n&&(this._dragMoved||this._beginMove(),n.width=Math.max($6e,bn(i.x-n.x)),n.height=Math.max(V6e,bn(i.y-n.y)),this.requestUpdate())}};this._onPointerUp=()=>{let t=this.drag;this.drag=null,this._teardownWindow(),t&&(t.kind==="node"||t.kind==="note"||t.kind==="note-resize")&&this._dragMoved&&this._emit("flow-change-commit")};this._onViewportDragOver=t=>{var o;if(!((o=t.dataTransfer)!=null&&o.types.includes(g4)))return;this._viewInitialised=!0,t.preventDefault();let i=t.composedPath().some(s=>s instanceof Element&&s.classList.contains("add-point"));t.dataTransfer.dropEffect=i?"copy":"move";let n=this.screenToCanvas(t.clientX,t.clientY);this._dropGhost={x:bn(n.x-ua/2),y:bn(n.y-zi/2)}};this._onViewportDragLeave=t=>{let i=this.getBoundingClientRect();(t.clientX<i.left||t.clientX>i.right||t.clientY<i.top||t.clientY>i.bottom)&&(this._dropGhost=null)};this._clearDropGhost=()=>{this._dropGhost=null};this._onAddPointDragOver=t=>{var i;(i=t.dataTransfer)!=null&&i.types.includes(g4)&&(t.preventDefault(),t.dataTransfer.dropEffect="copy")}}connectedCallback(){super.connectedCallback(),this.addEventListener("flow-node-grab",this._onNodeGrab),this.addEventListener("flow-node-select",this._onNodeSelect),this.addEventListener("flow-port-click",this._onPortClick),this.addEventListener("wheel",this._onWheel,{passive:!1})}disconnectedCallback(){this.removeEventListener("flow-node-grab",this._onNodeGrab),this.removeEventListener("flow-node-select",this._onNodeSelect),this.removeEventListener("flow-port-click",this._onPortClick),this.removeEventListener("wheel",this._onWheel),this._cancelLink(),this._teardownWindow(),super.disconnectedCallback()}updated(t){if(super.updated(t),this.style.setProperty("--flow-zoom",String(this.zoom)),t.has("dragType")&&!this.dragType&&(this._dropGhost=null),!this._viewInitialised&&this.nodes.length){let i=this.getBoundingClientRect();i.width&&i.height&&(this._viewInitialised=!0,this._resetView())}}_emit(t,i){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:i}))}screenToCanvas(t,i){let n=this.getBoundingClientRect();return{x:(t-n.left-this.panX)/this.zoom,y:(i-n.top-this.panY)/this.zoom}}_typeFor(t){var i;return(i=this.registry)==null?void 0:i.get(t.type)}_setupWindow(t=""){window.addEventListener("pointermove",this._onPointerMove),window.addEventListener("pointerup",this._onPointerUp),t&&(document.body.style.cursor=t)}_teardownWindow(){window.removeEventListener("pointermove",this._onPointerMove),window.removeEventListener("pointerup",this._onPointerUp),document.body.style.cursor=""}_startLink(t,i){this._linking={nodeId:t,port:i},this._linkPos=null,window.addEventListener("pointermove",this._onLinkPointerMove),window.addEventListener("keydown",this._onLinkKeyDown),window.addEventListener("blur",this._cancelLink)}_beginMove(){this._dragMoved=!0,this._emit("flow-interaction-start")}_outputLayout(t){let i=Za(t,this._typeFor(t)),n=t.x+ua/2,o=t.y+zi,s=o+GD,l=KD(t,c=>{var f;return(f=this.registry)==null?void 0:f.get(c)},this.nodes,this.connections),d=i.map((c,f)=>{let p=this.connections.find(y=>y.source.node===t.id&&y.source.port===c.id),u=p?this.nodes.find(y=>y.id===p.target.node):void 0,m=l[f],g=c.label?s+WD:null,_=c.label?jD(c.label).h:0,x=g===null?s:g+_;return{port:c,conn:p,child:u,x:m,pillTop:g,pillH:_,exitY:x}});return{cx:n,by:o,busY:s,branches:d}}_inputAnchor(t,i){let n=zc(t,this._typeFor(t)),o=Math.max(n.findIndex(s=>s.id===i),0);return{x:r_(t,"in",o,n.length).x,y:t.y}}_elbowMidOffsets(){var n,o;let t=new Map;for(let s of this.nodes){let{branches:l}=this._outputLayout(s);for(let d of l){if(!d.conn||!d.child)continue;let{x:c,y:f}=this._inputAnchor(d.child,d.conn.target.port);if(c===d.x||f-eR<d.exitY)continue;let p=bn((d.exitY+f)/2),u=`${d.conn.target.node}:${d.conn.target.port}`,m=(n=t.get(p))!=null?n:new Map;t.set(p,m),m.set(u,[...(o=m.get(u))!=null?o:[],d.conn.id])}}let i=new Map;for(let s of t.values()){if(s.size<2)continue;let l=[...s.keys()].sort();l.forEach((d,c)=>{let f=(c-Math.floor((l.length-1)/2))*sat;s.get(d).forEach(p=>i.set(p,f))})}return i}_segmentBlocked(t,i,n){let s=Math.min(t.x,i.x),l=Math.max(t.x,i.x),d=Math.min(t.y,i.y),c=Math.max(t.y,i.y);return this.nodes.some(f=>!n.has(f.id)&&s<f.x+ua+8&&l>f.x-8&&d<f.y+zi+8&&c>f.y-8)}_routeClear(t,i){for(let n=0;n<t.length-1;n++)if(this._segmentBlocked(t[n],t[n+1],i))return!1;return!0}_routePoints(t,i,n,o=0,s,l=!1){let{x:d,y:c}=this._inputAnchor(i,n),f=new Set(s?[i.id,s]:[i.id]);if(c-eR>=t.y){let x=Math.round((t.y+c)/2)+o,y=c-t.y,k=Math.min(c-12,Math.ceil((t.y+y/4)/Mi)*Mi),M=Math.max(k,Math.floor((c-y/4)/Mi)*Mi),S=I=>Math.max(k,Math.min(M,I)),T=null;if(d===t.x){let I=[t,{x:d,y:c}];if(this._routeClear(I,f))return I;T=I}else for(let I=0;I<=20;I++)for(let N of I===0?[x]:[x+I*Mi,x-I*Mi]){let B=S(N);if(B!==N&&I>0)continue;let F=[t,{x:t.x,y:B},{x:d,y:B},{x:d,y:c}];if(T!=null||(T=F),this._routeClear(F,f))return F}let E=Math.floor(y/2/10)*10,L=Math.max(10,Math.round(y/4/10)*10);for(let I=0;I<=12;I++)for(let N of I===0?[L]:[L+I*10,L-I*10]){if(N<10||N>E)continue;let B=t.y+N,F=c-N;if(!(F<B))for(let X=1;X<=14;X++)for(let V of[1,-1]){let ee=t.x+V*X*Mi,ne=[t,{x:t.x,y:B},{x:ee,y:B},{x:ee,y:F},{x:d,y:F},{x:d,y:c}];if(this._routeClear(ne,f))return ne}}return T}let p=t.y+oat,u=c-eR,m,g;if(l){let x=this.nodes.filter(T=>T.y+zi>u-Mi&&T.y<p+Mi),y=Math.max(...x.map(T=>T.x+ua))+m4,k=Math.min(...x.map(T=>T.x))-m4,M=Math.abs(y-t.x)+Math.abs(y-d),S=Math.abs(t.x-k)+Math.abs(d-k);m=M<=S,g=m?y:k}else m=t.x>=i.x+ua/2,g=m?i.x+ua+m4:i.x-m4;let _=null;for(let x=0;x<=20;x++){let y=g+(m?1:-1)*x*Mi,k=[t,{x:t.x,y:p},{x:y,y:p},{x:y,y:u},{x:d,y:u},{x:d,y:c}];if(_!=null||(_=k),this._routeClear(k,f))return k}return _}static _pathFrom(t){return t.map((i,n)=>`${n===0?"M":"L"} ${i.x} ${i.y}`).join(" ")}_addPoints(){if(!this.movingNodeId&&!this.dragType)return[];let t=[];for(let i of this.nodes){let{branches:n}=this._outputLayout(i);n.forEach(o=>{o.conn||t.push({nodeId:i.id,port:o.port.id,px:o.x,py:o.exitY+ZD})})}return t}_wirePoints(){if(this.movingNodeId)return[];let t=this._elbowMidOffsets(),i=mp(this.nodes,this.connections),n=[];for(let o of this.nodes){let{branches:s}=this._outputLayout(o);s.forEach(l=>{var u;if(!l.conn||!l.child)return;let d=(u=t.get(l.conn.id))!=null?u:0,c=this._routePoints({x:l.x,y:l.exitY},l.child,l.conn.target.port,d,o.id,i.has(l.conn)),f=0,p=-1;for(let m=0;m<c.length-1;m++){let g=Math.abs(c[m+1].x-c[m].x)+Math.abs(c[m+1].y-c[m].y);g>p&&(p=g,f=m)}n.push({connectionId:l.conn.id,px:(c[f].x+c[f+1].x)/2,py:(c[f].y+c[f+1].y)/2})})}return n}_screenFromCanvas(t,i){let n=this.getBoundingClientRect();return{clientX:n.left+this.panX+t*this.zoom,clientY:n.top+this.panY+i*this.zoom}}_onAddClick(t,i,n){if(t.stopPropagation(),this.movingNodeId){this._emit("flow-output-move-target",{nodeId:i,port:n});return}this._startLink(i,n)}_onWireAddClick(t,i,n,o){t.stopPropagation(),this._emit("flow-wire-pick",le({connectionId:i},this._screenFromCanvas(n,o)))}_onAddDrop(t,i,n){var s;let o=(s=t.dataTransfer)==null?void 0:s.getData(g4);o&&(t.preventDefault(),t.stopPropagation(),this._emit("flow-output-assign",{nodeId:i,port:n,type:o}))}_onWireDrop(t,i){var o;let n=(o=t.dataTransfer)==null?void 0:o.getData(g4);n&&(t.preventDefault(),t.stopPropagation(),this._emit("flow-wire-assign",{connectionId:i,type:n}))}_zoomBy(t){this._viewInitialised=!0,this.zoom=Math.min(Y6e,Math.max(JD,+(this.zoom+t).toFixed(2)))}_contentBounds(){var s,l;if(!this.nodes.length&&!this.notes.length)return null;let t=1/0,i=1/0,n=-1/0,o=-1/0;for(let d of this.nodes){t=Math.min(t,d.x),n=Math.max(n,d.x+ua),i=Math.min(i,d.y),o=Math.max(o,d.y+zi);for(let c of this._outputLayout(d).branches)t=Math.min(t,c.x-70),n=Math.max(n,c.x+70),o=Math.max(o,c.exitY+ZD+14)}for(let d of this.notes)t=Math.min(t,d.x),n=Math.max(n,d.x+((s=d.width)!=null?s:YD)),i=Math.min(i,d.y),o=Math.max(o,d.y+((l=d.height)!=null?l:XD));return{x:t,y:i,width:n-t,height:o-i}}_resetView(){let t=this.getBoundingClientRect(),i=this._contentBounds();if(!i||!t.width||!t.height){this.zoom=1,this.panX=0,this.panY=0;return}let n=60,o=Math.min(1,(t.width-n*2)/i.width,(t.height-n*2)/i.height);this.zoom=Math.max(JD,+o.toFixed(2)),this.panX=Math.round((t.width-i.width*this.zoom)/2-i.x*this.zoom),this.panY=Math.round((t.height-i.height*this.zoom)/2-i.y*this.zoom)}_viewportCursorClass(){return this.drag?this.drag.kind==="note-resize"?"resizing":"grabbing":""}_renderConnections(){var l;let t=`translate(${this.panX} ${this.panY}) scale(${this.zoom})`,i=this._elbowMidOffsets(),n=mp(this.nodes,this.connections),o=[],s=!!(this.movingNodeId||this.dragType);for(let d of this.nodes){let{cx:c,by:f,busY:p,branches:u}=this._outputLayout(d),m=u.filter(y=>y.conn&&y.child||y.pillTop!==null||s);if(!m.length)continue;o.push(Ss`<path class="wire" d="M ${c} ${f} L ${c} ${p}"></path>`);let g=[c,...m.map(y=>y.x)],_=Math.min(...g),x=Math.max(...g);x-_>.5&&o.push(Ss`<path class="wire" d="M ${_} ${p} L ${x} ${p}"></path>`),m.forEach(y=>{var k;if(y.pillTop!==null&&o.push(Ss`<path class="wire" d="M ${y.x} ${p} L ${y.x} ${y.pillTop}" marker-end="url(#flow-arrow)"></path>`),y.conn&&y.child){let M=(k=i.get(y.conn.id))!=null?k:0,S=n.has(y.conn),T=this._routePoints({x:y.x,y:y.exitY},y.child,y.conn.target.port,M,d.id,S);o.push(Ss`<path
|
|
5138
|
+
`}};Yn.styles=Y(W6e),Yn.dependencies={"zn-icon":It,"zn-button":Tr,"zn-dropdown":Xi,"zn-menu":Rs,"zn-menu-item":Sd},b([w({attribute:!1})],Yn.prototype,"node",2),b([w({attribute:!1})],Yn.prototype,"type",2),b([w({type:Boolean,reflect:!0})],Yn.prototype,"selected",2),b([w({type:Boolean,reflect:!0})],Yn.prototype,"error",2),b([w({type:Boolean,reflect:!0})],Yn.prototype,"dragging",2),b([w({type:Boolean,reflect:!0,attribute:"link-target"})],Yn.prototype,"linkTarget",2);var j6e=Yn;Yn.define("zn-flow-node");var K6e=Q`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;position:relative;width:100%;height:100%;overflow:hidden}.viewport{position:absolute;inset:0;overflow:hidden;background-color:rgb(var(--zn-color-body));background-image:radial-gradient(rgb(var(--zn-color-border)) 1px,transparent 1px);background-size:20px 20px;cursor:grab;touch-action:none}.viewport.grabbing,.viewport.grabbing *{cursor:grabbing !important}.viewport.connecting,.viewport.connecting *{cursor:crosshair !important}.viewport.resizing,.viewport.resizing *{cursor:nwse-resize !important}.connections{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}.connections .wire{fill:none;stroke:rgb(var(--zn-color-primary));stroke-width:2}.connections .wire--stub{stroke:rgb(var(--zn-color-border-active));stroke-dasharray:4 4}.connections .wire--preview{stroke-dasharray:6 4}.connections .wire--loop{stroke:rgb(var(--zn-color-warning))}.connections marker path{fill:rgb(var(--zn-color-primary))}.connections marker#flow-arrow-loop path{fill:rgb(var(--zn-color-warning))}.viewport.linking{cursor:crosshair}.add-point{position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:center;width:24px;height:24px;margin:-12px;padding:0;border-radius:50%;color:rgb(var(--zn-color-primary));background:rgb(var(--zn-panel));border:1px dashed rgb(var(--zn-color-border-active));cursor:pointer;transition:background 0.12s ease,color 0.12s ease}.add-point:hover{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-style:solid}.add-point--target{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-style:solid;box-shadow:0 0 0 4px color-mix(in srgb,rgb(var(--zn-color-primary)) 25%,transparent)}.add-point--wire{width:20px;height:20px;margin:-10px}.viewport.step-dragging .add-point{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-style:solid;box-shadow:0 0 0 4px color-mix(in srgb,rgb(var(--zn-color-primary)) 22%,transparent)}.layer{position:absolute;top:0;left:0;transform-origin:0 0;width:0;height:0}.node-pos{position:absolute;top:0;left:0}.branch-pill-wrap{position:absolute;top:0;left:0;transform:translateX(-50%);display:flex;align-items:stretch}.branch-pill-wrap::after{content:"";position:absolute;left:100%;top:0;width:40px;height:100%}.branch-pill-wrap:hover .branch-pill-delete{opacity:1;transform:translate(0,-50%);pointer-events:auto;transition-delay:0.15s}.branch-pill{display:flex;align-items:center;justify-content:center;width:-moz-max-content;width:max-content;max-width:240px;box-sizing:border-box;text-align:center;overflow-wrap:anywhere;overflow:hidden;padding:0 18px;border-radius:10px;font:inherit;font-size:0.8125rem;font-weight:600;line-height:20px;color:rgb(var(--zn-text));background:color-mix(in srgb,rgb(var(--zn-color-primary)) 8%,rgb(var(--zn-panel)));border:1px solid color-mix(in srgb,rgb(var(--zn-color-primary)) 45%,transparent);cursor:pointer;transition:border-color 0.12s ease,box-shadow 0.12s ease}.branch-pill:hover{border-color:rgb(var(--zn-color-primary));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4)}.branch-pill--selected{border-color:rgb(var(--zn-color-primary));background:color-mix(in srgb,rgb(var(--zn-color-primary)) 16%,rgb(var(--zn-panel)))}.branch-pill--loop{background:color-mix(in srgb,rgb(var(--zn-color-warning)) 10%,rgb(var(--zn-panel)));border-color:color-mix(in srgb,rgb(var(--zn-color-warning)) 55%,transparent)}.branch-pill--loop:hover{border-color:rgb(var(--zn-color-warning))}.branch-pill--loop.branch-pill--selected{border-color:rgb(var(--zn-color-warning));background:color-mix(in srgb,rgb(var(--zn-color-warning)) 18%,rgb(var(--zn-panel)))}.branch-pill-delete{position:absolute;z-index:1;left:calc(100% + 8px);top:50%;transform:translate(-10px,-50%);display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:50%;background:rgb(var(--zn-color-error));color:white;cursor:pointer;opacity:0;pointer-events:none;transition:opacity 0.15s ease,transform 0.15s ease}.branch-pill-delete:hover{filter:brightness(1.1)}.drop-ghost{position:absolute;top:0;left:0;display:flex;align-items:center;gap:10px;padding:0 12px;border:2px dashed rgb(var(--zn-color-primary));border-radius:10px;background:color-mix(in srgb,rgb(var(--zn-color-primary)) 10%,rgb(var(--zn-panel)));opacity:0.9;pointer-events:none}.drop-ghost__icon{--node-accent:rgb(var(--zn-color-primary));display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:36px;height:36px;border-radius:8px;color:var(--node-accent);background:color-mix(in srgb,var(--node-accent) 16%,rgb(var(--zn-panel)))}.drop-ghost__label{font-size:0.8125rem;font-weight:600;color:rgb(var(--zn-text));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.toolbar{position:absolute;top:16px;display:flex;align-items:center;gap:2px;padding:3px;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);z-index:2}.toolbar--history{left:16px}.toolbar--zoom{right:16px}.note{position:absolute;display:flex;flex-direction:column;background:#fef9c3;border:1px solid #fde68a;border-radius:4px;box-shadow:0 2px 6px rgba(0,0,0,0.12)}.note__resize{position:absolute;right:0;bottom:0;width:16px;height:16px;cursor:nwse-resize;background:linear-gradient(135deg,transparent 0 50%,#d9c64a 50% 60%,transparent 60% 70%,#d9c64a 70% 80%,transparent 80%)}.note__bar{display:flex;justify-content:flex-end;height:20px;cursor:grab}.note__close{width:20px;height:20px;padding:0;font-size:14px;line-height:1;color:#92400e;background:transparent;cursor:pointer}.note__text{flex:1;margin:0;padding:0 10px 10px;resize:none;border:none;outline:none;background:transparent;font:inherit;font-size:0.8125rem;color:#713f12}`;var JD=.25,Y6e=2,X6e=.15,ZD=40,oat=20,eR=20,m4=40,sat=20,g4=d0,ha=class ha extends K{constructor(){super(...arguments);this.nodes=[];this.connections=[];this.notes=[];this.selectedNodeId=null;this.errorNodes=new Set;this.movingNodeId=null;this.dragType=null;this.selectedBranch=null;this.zoom=1;this.panX=0;this.panY=0;this.drag=null;this._dropGhost=null;this._linking=null;this._linkPos=null;this._linkTarget=null;this._linkClient=null;this._linkScrollRaf=null;this._dragMoved=!1;this._viewInitialised=!1;this._onWheel=t=>{if(t.composedPath().some(d=>d instanceof HTMLTextAreaElement))return;t.preventDefault(),this._viewInitialised=!0;let i=t.deltaMode===1?16:t.deltaMode===2?100:1,n=t.deltaX*i,o=t.deltaY*i;if(t.ctrlKey||t.metaKey){let d=Math.min(Y6e,Math.max(JD,this.zoom*Math.exp(-o*.0015)));if(d===this.zoom)return;let c=this.getBoundingClientRect(),f=t.clientX-c.left,p=t.clientY-c.top,u=(f-this.panX)/this.zoom,m=(p-this.panY)/this.zoom;this.zoom=+d.toFixed(3),this.panX=Math.round(f-u*this.zoom),this.panY=Math.round(p-m*this.zoom);return}let s=t.shiftKey&&!n?o:n,l=t.shiftKey&&!n?0:o;this.panX-=Math.round(s),this.panY-=Math.round(l)};this._onBackgroundPointerDown=t=>{if(t.button===1){t.preventDefault(),this._viewInitialised=!0,this.drag={kind:"pan",ox:t.clientX,oy:t.clientY,px:this.panX,py:this.panY},this._setupWindow("grabbing");return}if(t.button===0){if(this._viewInitialised=!0,this._linking){let i=this._linking,n=this._linkTarget;if(this._cancelLink(),n){this._emit("flow-link-assign",{nodeId:i.nodeId,port:i.port,targetId:n});return}}this._emit("flow-node-select",{nodeId:null}),this.drag={kind:"pan",ox:t.clientX,oy:t.clientY,px:this.panX,py:this.panY},this._setupWindow("grabbing")}};this._onNodeGrab=t=>{if(this._linking){let o=this._linking;this._cancelLink(),o.nodeId!==t.detail.nodeId&&this._emit("flow-link-assign",{nodeId:o.nodeId,port:o.port,targetId:t.detail.nodeId});return}let i=this.nodes.find(o=>o.id===t.detail.nodeId);if(!i)return;let n=this.screenToCanvas(t.detail.clientX,t.detail.clientY);this.drag={kind:"node",id:i.id,offX:n.x-i.x,offY:n.y-i.y},this._dragMoved=!1,this._setupWindow("grabbing")};this._onNodeSelect=t=>{this._linking&&t.detail.nodeId&&t.stopPropagation()};this._onPortClick=t=>{var s;let{nodeId:i}=t.detail;if(this._linking&&this._linking.nodeId!==i){let l=this._linking;this._cancelLink(),this._emit("flow-link-assign",{nodeId:l.nodeId,port:l.port,targetId:i});return}let n=this.nodes.find(l=>l.id===i);if(!n)return;let o=Za(n,this._typeFor(n)).find(l=>!this.connections.some(d=>d.source.node===i&&d.source.port===l.id));this._startLink(i,(s=o==null?void 0:o.id)!=null?s:p4)};this._onLinkPointerMove=t=>{this._linkClient={x:t.clientX,y:t.clientY},this._updateLinkFromClient(t.clientX,t.clientY)};this._linkEdgeScroll=()=>{if(this._linkScrollRaf=null,!!this._linking){if(this._linkClient){let t=this.getBoundingClientRect(),i=48,n=14,o=f=>Math.min(n,Math.ceil((i-f)/i*n)),{x:s,y:l}=this._linkClient,d=0,c=0;s<t.left+i?d=o(s-t.left):s>t.right-i&&(d=-o(t.right-s)),l<t.top+i?c=o(l-t.top):l>t.bottom-i&&(c=-o(t.bottom-l)),(d||c)&&(this.panX+=d,this.panY+=c,this._updateLinkFromClient(s,l))}this._linkScrollRaf=requestAnimationFrame(this._linkEdgeScroll)}};this._onLinkKeyDown=t=>{t.key==="Escape"&&this._cancelLink()};this._cancelLink=()=>{this._linking&&(this._linking=null,this._linkPos=null,this._linkTarget=null,this._linkClient=null,this._linkScrollRaf!==null&&(cancelAnimationFrame(this._linkScrollRaf),this._linkScrollRaf=null),window.removeEventListener("pointermove",this._onLinkPointerMove),window.removeEventListener("keydown",this._onLinkKeyDown),window.removeEventListener("blur",this._cancelLink))};this._onPointerMove=t=>{if(!this.drag)return;if(this.drag.kind==="pan"){this.panX=this.drag.px+(t.clientX-this.drag.ox),this.panY=this.drag.py+(t.clientY-this.drag.oy);return}let i=this.screenToCanvas(t.clientX,t.clientY);if(this.drag.kind==="node"){let n=this.nodes.find(o=>o.id===this.drag.id);if(n){let o={x:bn(i.x-this.drag.offX),y:bn(i.y-this.drag.offY)},s=this.nodes.filter(c=>c.id!==n.id),l=c=>{let f=le(le({},n),c);return!s.some(p=>B6e(f,p,u=>{var m;return(m=this.registry)==null?void 0:m.get(u)},this.nodes,this.connections))},d=l(o)?o:l({x:o.x,y:n.y})?{x:o.x,y:n.y}:l({x:n.x,y:o.y})?{x:n.x,y:o.y}:null;d&&(d.x!==n.x||d.y!==n.y)&&(this._dragMoved||this._beginMove(),n.x=d.x,n.y=d.y,this.requestUpdate())}}else if(this.drag.kind==="note"){let n=this.notes.find(o=>o.id===this.drag.id);n&&(this._dragMoved||this._beginMove(),n.x=bn(i.x-this.drag.offX),n.y=bn(i.y-this.drag.offY),this.requestUpdate())}else if(this.drag.kind==="note-resize"){let n=this.notes.find(o=>o.id===this.drag.id);n&&(this._dragMoved||this._beginMove(),n.width=Math.max($6e,bn(i.x-n.x)),n.height=Math.max(V6e,bn(i.y-n.y)),this.requestUpdate())}};this._onPointerUp=()=>{let t=this.drag;this.drag=null,this._teardownWindow(),t&&(t.kind==="node"||t.kind==="note"||t.kind==="note-resize")&&this._dragMoved&&this._emit("flow-change-commit")};this._onViewportDragOver=t=>{var o;if(!((o=t.dataTransfer)!=null&&o.types.includes(g4)))return;this._viewInitialised=!0,t.preventDefault();let i=t.composedPath().some(s=>s instanceof Element&&s.classList.contains("add-point"));t.dataTransfer.dropEffect=i?"copy":"move";let n=this.screenToCanvas(t.clientX,t.clientY);this._dropGhost={x:bn(n.x-ua/2),y:bn(n.y-zi/2)}};this._onViewportDragLeave=t=>{let i=this.getBoundingClientRect();(t.clientX<i.left||t.clientX>i.right||t.clientY<i.top||t.clientY>i.bottom)&&(this._dropGhost=null)};this._clearDropGhost=()=>{this._dropGhost=null};this._onAddPointDragOver=t=>{var i;(i=t.dataTransfer)!=null&&i.types.includes(g4)&&(t.preventDefault(),t.dataTransfer.dropEffect="copy")}}connectedCallback(){super.connectedCallback(),this.addEventListener("flow-node-grab",this._onNodeGrab),this.addEventListener("flow-node-select",this._onNodeSelect),this.addEventListener("flow-port-click",this._onPortClick),this.addEventListener("wheel",this._onWheel,{passive:!1})}disconnectedCallback(){this.removeEventListener("flow-node-grab",this._onNodeGrab),this.removeEventListener("flow-node-select",this._onNodeSelect),this.removeEventListener("flow-port-click",this._onPortClick),this.removeEventListener("wheel",this._onWheel),this._cancelLink(),this._teardownWindow(),super.disconnectedCallback()}updated(t){if(super.updated(t),this.style.setProperty("--flow-zoom",String(this.zoom)),t.has("dragType")&&!this.dragType&&(this._dropGhost=null),!this._viewInitialised&&this.nodes.length){let i=this.getBoundingClientRect();i.width&&i.height&&(this._viewInitialised=!0,this._resetView())}}_emit(t,i){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:i}))}screenToCanvas(t,i){let n=this.getBoundingClientRect();return{x:(t-n.left-this.panX)/this.zoom,y:(i-n.top-this.panY)/this.zoom}}_typeFor(t){var i;return(i=this.registry)==null?void 0:i.get(t.type)}_setupWindow(t=""){window.addEventListener("pointermove",this._onPointerMove),window.addEventListener("pointerup",this._onPointerUp),t&&(document.body.style.cursor=t)}_teardownWindow(){window.removeEventListener("pointermove",this._onPointerMove),window.removeEventListener("pointerup",this._onPointerUp),document.body.style.cursor=""}_startLink(t,i){this._linking={nodeId:t,port:i},this._linkPos=null,this._linkClient=null,window.addEventListener("pointermove",this._onLinkPointerMove),window.addEventListener("keydown",this._onLinkKeyDown),window.addEventListener("blur",this._cancelLink),this._linkScrollRaf=requestAnimationFrame(this._linkEdgeScroll)}_updateLinkFromClient(t,i){var d;let n=this.screenToCanvas(t,i);this._linkPos=n;let o=this._linking;if(!o)return;let s=12,l=this.nodes.find(c=>c.id!==o.nodeId&&n.x>=c.x-s&&n.x<=c.x+ua+s&&n.y>=c.y-s&&n.y<=c.y+zi+s&&zc(c,this._typeFor(c)).length>0);this._linkTarget=(d=l==null?void 0:l.id)!=null?d:null}_beginMove(){this._dragMoved=!0,this._emit("flow-interaction-start")}_outputLayout(t){let i=Za(t,this._typeFor(t)),n=t.x+ua/2,o=t.y+zi,s=o+GD,l=KD(t,c=>{var f;return(f=this.registry)==null?void 0:f.get(c)},this.nodes,this.connections),d=i.map((c,f)=>{let p=this.connections.find(y=>y.source.node===t.id&&y.source.port===c.id),u=p?this.nodes.find(y=>y.id===p.target.node):void 0,m=l[f],g=c.label?s+WD:null,_=c.label?jD(c.label).h:0,x=g===null?s:g+_;return{port:c,conn:p,child:u,x:m,pillTop:g,pillH:_,exitY:x}});return{cx:n,by:o,busY:s,branches:d}}_inputAnchor(t,i){let n=zc(t,this._typeFor(t)),o=Math.max(n.findIndex(s=>s.id===i),0);return{x:r_(t,"in",o,n.length).x,y:t.y}}_elbowMidOffsets(){var n,o;let t=new Map;for(let s of this.nodes){let{branches:l}=this._outputLayout(s);for(let d of l){if(!d.conn||!d.child)continue;let{x:c,y:f}=this._inputAnchor(d.child,d.conn.target.port);if(c===d.x||f-eR<d.exitY)continue;let p=bn((d.exitY+f)/2),u=`${d.conn.target.node}:${d.conn.target.port}`,m=(n=t.get(p))!=null?n:new Map;t.set(p,m),m.set(u,[...(o=m.get(u))!=null?o:[],d.conn.id])}}let i=new Map;for(let s of t.values()){if(s.size<2)continue;let l=[...s.keys()].sort();l.forEach((d,c)=>{let f=(c-Math.floor((l.length-1)/2))*sat;s.get(d).forEach(p=>i.set(p,f))})}return i}_segmentBlocked(t,i,n){let s=Math.min(t.x,i.x),l=Math.max(t.x,i.x),d=Math.min(t.y,i.y),c=Math.max(t.y,i.y);return this.nodes.some(f=>!n.has(f.id)&&s<f.x+ua+8&&l>f.x-8&&d<f.y+zi+8&&c>f.y-8)}_routeClear(t,i){for(let n=0;n<t.length-1;n++)if(this._segmentBlocked(t[n],t[n+1],i))return!1;return!0}_routePoints(t,i,n,o=0,s,l=!1){let{x:d,y:c}=this._inputAnchor(i,n),f=new Set(s?[i.id,s]:[i.id]);if(c-eR>=t.y){let x=Math.round((t.y+c)/2)+o,y=c-t.y,k=Math.min(c-12,Math.ceil((t.y+y/4)/Mi)*Mi),M=Math.max(k,Math.floor((c-y/4)/Mi)*Mi),S=I=>Math.max(k,Math.min(M,I)),T=null;if(d===t.x){let I=[t,{x:d,y:c}];if(this._routeClear(I,f))return I;T=I}else for(let I=0;I<=20;I++)for(let N of I===0?[x]:[x+I*Mi,x-I*Mi]){let B=S(N);if(B!==N&&I>0)continue;let F=[t,{x:t.x,y:B},{x:d,y:B},{x:d,y:c}];if(T!=null||(T=F),this._routeClear(F,f))return F}let E=Math.floor(y/2/10)*10,L=Math.max(10,Math.round(y/4/10)*10);for(let I=0;I<=12;I++)for(let N of I===0?[L]:[L+I*10,L-I*10]){if(N<10||N>E)continue;let B=t.y+N,F=c-N;if(!(F<B))for(let X=1;X<=14;X++)for(let V of[1,-1]){let ee=t.x+V*X*Mi,ne=[t,{x:t.x,y:B},{x:ee,y:B},{x:ee,y:F},{x:d,y:F},{x:d,y:c}];if(this._routeClear(ne,f))return ne}}return T}let p=t.y+oat,u=c-eR,m,g;if(l){let x=this.nodes.filter(T=>T.y+zi>u-Mi&&T.y<p+Mi),y=Math.max(...x.map(T=>T.x+ua))+m4,k=Math.min(...x.map(T=>T.x))-m4,M=Math.abs(y-t.x)+Math.abs(y-d),S=Math.abs(t.x-k)+Math.abs(d-k);m=M<=S,g=m?y:k}else m=t.x>=i.x+ua/2,g=m?i.x+ua+m4:i.x-m4;let _=null;for(let x=0;x<=20;x++){let y=g+(m?1:-1)*x*Mi,k=[t,{x:t.x,y:p},{x:y,y:p},{x:y,y:u},{x:d,y:u},{x:d,y:c}];if(_!=null||(_=k),this._routeClear(k,f))return k}return _}static _pathFrom(t){return t.map((i,n)=>`${n===0?"M":"L"} ${i.x} ${i.y}`).join(" ")}_addPoints(){if(!this.movingNodeId&&!this.dragType)return[];let t=[];for(let i of this.nodes){let{branches:n}=this._outputLayout(i);n.forEach(o=>{o.conn||t.push({nodeId:i.id,port:o.port.id,px:o.x,py:o.exitY+ZD})})}return t}_wirePoints(){if(this.movingNodeId)return[];let t=this._elbowMidOffsets(),i=mp(this.nodes,this.connections),n=[];for(let o of this.nodes){let{branches:s}=this._outputLayout(o);s.forEach(l=>{var u;if(!l.conn||!l.child)return;let d=(u=t.get(l.conn.id))!=null?u:0,c=this._routePoints({x:l.x,y:l.exitY},l.child,l.conn.target.port,d,o.id,i.has(l.conn)),f=0,p=-1;for(let m=0;m<c.length-1;m++){let g=Math.abs(c[m+1].x-c[m].x)+Math.abs(c[m+1].y-c[m].y);g>p&&(p=g,f=m)}n.push({connectionId:l.conn.id,px:(c[f].x+c[f+1].x)/2,py:(c[f].y+c[f+1].y)/2})})}return n}_screenFromCanvas(t,i){let n=this.getBoundingClientRect();return{clientX:n.left+this.panX+t*this.zoom,clientY:n.top+this.panY+i*this.zoom}}_onAddClick(t,i,n){if(t.stopPropagation(),this.movingNodeId){this._emit("flow-output-move-target",{nodeId:i,port:n});return}this._startLink(i,n)}_onWireAddClick(t,i,n,o){t.stopPropagation(),this._emit("flow-wire-pick",le({connectionId:i},this._screenFromCanvas(n,o)))}_onAddDrop(t,i,n){var s;let o=(s=t.dataTransfer)==null?void 0:s.getData(g4);o&&(t.preventDefault(),t.stopPropagation(),this._emit("flow-output-assign",{nodeId:i,port:n,type:o}))}_onWireDrop(t,i){var o;let n=(o=t.dataTransfer)==null?void 0:o.getData(g4);n&&(t.preventDefault(),t.stopPropagation(),this._emit("flow-wire-assign",{connectionId:i,type:n}))}_zoomBy(t){this._viewInitialised=!0,this.zoom=Math.min(Y6e,Math.max(JD,+(this.zoom+t).toFixed(2)))}_contentBounds(){var s,l;if(!this.nodes.length&&!this.notes.length)return null;let t=1/0,i=1/0,n=-1/0,o=-1/0;for(let d of this.nodes){t=Math.min(t,d.x),n=Math.max(n,d.x+ua),i=Math.min(i,d.y),o=Math.max(o,d.y+zi);for(let c of this._outputLayout(d).branches)t=Math.min(t,c.x-70),n=Math.max(n,c.x+70),o=Math.max(o,c.exitY+ZD+14)}for(let d of this.notes)t=Math.min(t,d.x),n=Math.max(n,d.x+((s=d.width)!=null?s:YD)),i=Math.min(i,d.y),o=Math.max(o,d.y+((l=d.height)!=null?l:XD));return{x:t,y:i,width:n-t,height:o-i}}_resetView(){let t=this.getBoundingClientRect(),i=this._contentBounds();if(!i||!t.width||!t.height){this.zoom=1,this.panX=0,this.panY=0;return}let n=60,o=Math.min(1,(t.width-n*2)/i.width,(t.height-n*2)/i.height);this.zoom=Math.max(JD,+o.toFixed(2)),this.panX=Math.round((t.width-i.width*this.zoom)/2-i.x*this.zoom),this.panY=Math.round((t.height-i.height*this.zoom)/2-i.y*this.zoom)}_viewportCursorClass(){return this.drag?this.drag.kind==="note-resize"?"resizing":"grabbing":""}_renderConnections(){var l;let t=`translate(${this.panX} ${this.panY}) scale(${this.zoom})`,i=this._elbowMidOffsets(),n=mp(this.nodes,this.connections),o=[],s=!!(this.movingNodeId||this.dragType);for(let d of this.nodes){let{cx:c,by:f,busY:p,branches:u}=this._outputLayout(d),m=u.filter(y=>y.conn&&y.child||y.pillTop!==null||s);if(!m.length)continue;o.push(Ss`<path class="wire" d="M ${c} ${f} L ${c} ${p}"></path>`);let g=[c,...m.map(y=>y.x)],_=Math.min(...g),x=Math.max(...g);x-_>.5&&o.push(Ss`<path class="wire" d="M ${_} ${p} L ${x} ${p}"></path>`),m.forEach(y=>{var k;if(y.pillTop!==null&&o.push(Ss`<path class="wire" d="M ${y.x} ${p} L ${y.x} ${y.pillTop}" marker-end="url(#flow-arrow)"></path>`),y.conn&&y.child){let M=(k=i.get(y.conn.id))!=null?k:0,S=n.has(y.conn),T=this._routePoints({x:y.x,y:y.exitY},y.child,y.conn.target.port,M,d.id,S);o.push(Ss`<path
|
|
5139
5139
|
class="wire ${S?"wire--loop":""}"
|
|
5140
5140
|
d="${ha._pathFrom(T)}"
|
|
5141
5141
|
marker-end="url(#${S?"flow-arrow-loop":"flow-arrow"})"
|
package/package.json
CHANGED
|
@@ -120,6 +120,9 @@ export default class ZnFlowCanvas extends ZincElement {
|
|
|
120
120
|
@state() private _linkPos: { x: number; y: number } | null = null;
|
|
121
121
|
/** The valid node under the cursor while linking — the preview snaps to its input. */
|
|
122
122
|
@state() private _linkTarget: string | null = null;
|
|
123
|
+
/** Last pointer position (client coords) while linking, for edge auto-pan. */
|
|
124
|
+
private _linkClient: { x: number; y: number } | null = null;
|
|
125
|
+
private _linkScrollRaf: number | null = null;
|
|
123
126
|
|
|
124
127
|
private _dragMoved = false;
|
|
125
128
|
/** Centre the flow when it first arrives; any earlier user interaction opts out. */
|
|
@@ -307,13 +310,20 @@ export default class ZnFlowCanvas extends ZincElement {
|
|
|
307
310
|
private _startLink(nodeId: string, port: string) {
|
|
308
311
|
this._linking = {nodeId, port};
|
|
309
312
|
this._linkPos = null;
|
|
313
|
+
this._linkClient = null;
|
|
310
314
|
window.addEventListener('pointermove', this._onLinkPointerMove);
|
|
311
315
|
window.addEventListener('keydown', this._onLinkKeyDown);
|
|
312
316
|
window.addEventListener('blur', this._cancelLink);
|
|
317
|
+
this._linkScrollRaf = requestAnimationFrame(this._linkEdgeScroll);
|
|
313
318
|
}
|
|
314
319
|
|
|
315
320
|
private _onLinkPointerMove = (e: PointerEvent) => {
|
|
316
|
-
|
|
321
|
+
this._linkClient = {x: e.clientX, y: e.clientY};
|
|
322
|
+
this._updateLinkFromClient(e.clientX, e.clientY);
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
private _updateLinkFromClient(clientX: number, clientY: number) {
|
|
326
|
+
const p = this.screenToCanvas(clientX, clientY);
|
|
317
327
|
this._linkPos = p;
|
|
318
328
|
const linking = this._linking;
|
|
319
329
|
if (!linking) return;
|
|
@@ -327,6 +337,37 @@ export default class ZnFlowCanvas extends ZincElement {
|
|
|
327
337
|
&& nodeInputs(n, this._typeFor(n)).length > 0
|
|
328
338
|
);
|
|
329
339
|
this._linkTarget = target?.id ?? null;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* While a branch rides the cursor, holding the pointer near (or past) a
|
|
344
|
+
* canvas edge auto-pans in that direction, so the target can be off-screen.
|
|
345
|
+
* Runs per frame until the link attaches or cancels.
|
|
346
|
+
*/
|
|
347
|
+
private _linkEdgeScroll = () => {
|
|
348
|
+
this._linkScrollRaf = null;
|
|
349
|
+
if (!this._linking) return;
|
|
350
|
+
if (this._linkClient) {
|
|
351
|
+
const rect = this.getBoundingClientRect();
|
|
352
|
+
const ZONE = 48;
|
|
353
|
+
const MAX = 14;
|
|
354
|
+
const speed = (depth: number) => Math.min(MAX, Math.ceil(((ZONE - depth) / ZONE) * MAX));
|
|
355
|
+
const {x, y} = this._linkClient;
|
|
356
|
+
let dx = 0;
|
|
357
|
+
let dy = 0;
|
|
358
|
+
if (x < rect.left + ZONE) dx = speed(x - rect.left);
|
|
359
|
+
else if (x > rect.right - ZONE) dx = -speed(rect.right - x);
|
|
360
|
+
if (y < rect.top + ZONE) dy = speed(y - rect.top);
|
|
361
|
+
else if (y > rect.bottom - ZONE) dy = -speed(rect.bottom - y);
|
|
362
|
+
if (dx || dy) {
|
|
363
|
+
this.panX += dx;
|
|
364
|
+
this.panY += dy;
|
|
365
|
+
// The canvas moved under the stationary cursor — keep the preview and
|
|
366
|
+
// the snap target tracking it.
|
|
367
|
+
this._updateLinkFromClient(x, y);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
this._linkScrollRaf = requestAnimationFrame(this._linkEdgeScroll);
|
|
330
371
|
};
|
|
331
372
|
|
|
332
373
|
private _onLinkKeyDown = (e: KeyboardEvent) => {
|
|
@@ -338,6 +379,11 @@ export default class ZnFlowCanvas extends ZincElement {
|
|
|
338
379
|
this._linking = null;
|
|
339
380
|
this._linkPos = null;
|
|
340
381
|
this._linkTarget = null;
|
|
382
|
+
this._linkClient = null;
|
|
383
|
+
if (this._linkScrollRaf !== null) {
|
|
384
|
+
cancelAnimationFrame(this._linkScrollRaf);
|
|
385
|
+
this._linkScrollRaf = null;
|
|
386
|
+
}
|
|
341
387
|
window.removeEventListener('pointermove', this._onLinkPointerMove);
|
|
342
388
|
window.removeEventListener('keydown', this._onLinkKeyDown);
|
|
343
389
|
window.removeEventListener('blur', this._cancelLink);
|