@kubex/zinc 1.1.26 → 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.
@@ -6492,6 +6492,224 @@
6492
6492
  }
6493
6493
  ]
6494
6494
  },
6495
+ {
6496
+ "kind": "javascript-module",
6497
+ "path": "components/copy-button/copy-button.js",
6498
+ "declarations": [
6499
+ {
6500
+ "kind": "class",
6501
+ "description": "",
6502
+ "name": "ZnCopyButton",
6503
+ "cssProperties": [
6504
+ {
6505
+ "description": "An example CSS custom property.",
6506
+ "name": "--example"
6507
+ }
6508
+ ],
6509
+ "cssParts": [
6510
+ {
6511
+ "description": "The component's base wrapper.",
6512
+ "name": "base"
6513
+ }
6514
+ ],
6515
+ "slots": [
6516
+ {
6517
+ "description": "The default slot.",
6518
+ "name": ""
6519
+ },
6520
+ {
6521
+ "description": "An example slot.",
6522
+ "name": "example"
6523
+ }
6524
+ ],
6525
+ "members": [
6526
+ {
6527
+ "kind": "field",
6528
+ "name": "copyIcon",
6529
+ "type": {
6530
+ "text": "HTMLSlotElement"
6531
+ }
6532
+ },
6533
+ {
6534
+ "kind": "field",
6535
+ "name": "successIcon",
6536
+ "type": {
6537
+ "text": "HTMLSlotElement"
6538
+ }
6539
+ },
6540
+ {
6541
+ "kind": "field",
6542
+ "name": "errorIcon",
6543
+ "type": {
6544
+ "text": "HTMLSlotElement"
6545
+ }
6546
+ },
6547
+ {
6548
+ "kind": "field",
6549
+ "name": "tooltip",
6550
+ "type": {
6551
+ "text": "ZnTooltip"
6552
+ }
6553
+ },
6554
+ {
6555
+ "kind": "field",
6556
+ "name": "isCopying",
6557
+ "type": {
6558
+ "text": "boolean"
6559
+ },
6560
+ "default": "false"
6561
+ },
6562
+ {
6563
+ "kind": "field",
6564
+ "name": "status",
6565
+ "type": {
6566
+ "text": "'rest' | 'success' | 'error'"
6567
+ },
6568
+ "default": "'rest'"
6569
+ },
6570
+ {
6571
+ "kind": "field",
6572
+ "name": "value",
6573
+ "type": {
6574
+ "text": "string"
6575
+ },
6576
+ "default": "''",
6577
+ "attribute": "value"
6578
+ },
6579
+ {
6580
+ "kind": "field",
6581
+ "name": "copyLabel",
6582
+ "type": {
6583
+ "text": "string"
6584
+ },
6585
+ "default": "''",
6586
+ "attribute": "copy-label"
6587
+ },
6588
+ {
6589
+ "kind": "field",
6590
+ "name": "src",
6591
+ "type": {
6592
+ "text": "string"
6593
+ },
6594
+ "default": "''",
6595
+ "attribute": "src"
6596
+ },
6597
+ {
6598
+ "kind": "field",
6599
+ "name": "size",
6600
+ "type": {
6601
+ "text": "number"
6602
+ },
6603
+ "default": "24",
6604
+ "attribute": "size",
6605
+ "reflects": true
6606
+ },
6607
+ {
6608
+ "kind": "field",
6609
+ "name": "from",
6610
+ "type": {
6611
+ "text": "string"
6612
+ },
6613
+ "default": "''",
6614
+ "description": "An id that references an element in the same document from which data will be copied. If both this and `value` are\npresent, this value will take precedence. By default, the target element's `textContent` will be copied. To copy an\nattribute, append the attribute name wrapped in square brackets, e.g. `from=\"el[value]\"`. To copy a property,\nappend a dot and the property name, e.g. `from=\"el.value\"`.",
6615
+ "attribute": "from"
6616
+ },
6617
+ {
6618
+ "kind": "method",
6619
+ "name": "showStatus",
6620
+ "privacy": "private",
6621
+ "parameters": [
6622
+ {
6623
+ "name": "status",
6624
+ "type": {
6625
+ "text": "'success' | 'error'"
6626
+ }
6627
+ }
6628
+ ]
6629
+ },
6630
+ {
6631
+ "kind": "method",
6632
+ "name": "handleCopy",
6633
+ "privacy": "private"
6634
+ }
6635
+ ],
6636
+ "events": [
6637
+ {
6638
+ "description": "Emitted as an example.",
6639
+ "name": "zn-event-name"
6640
+ }
6641
+ ],
6642
+ "attributes": [
6643
+ {
6644
+ "name": "value",
6645
+ "type": {
6646
+ "text": "string"
6647
+ },
6648
+ "default": "''",
6649
+ "fieldName": "value"
6650
+ },
6651
+ {
6652
+ "name": "copy-label",
6653
+ "type": {
6654
+ "text": "string"
6655
+ },
6656
+ "default": "''",
6657
+ "fieldName": "copyLabel"
6658
+ },
6659
+ {
6660
+ "name": "src",
6661
+ "type": {
6662
+ "text": "string"
6663
+ },
6664
+ "default": "''",
6665
+ "fieldName": "src"
6666
+ },
6667
+ {
6668
+ "name": "size",
6669
+ "type": {
6670
+ "text": "number"
6671
+ },
6672
+ "default": "24",
6673
+ "fieldName": "size"
6674
+ },
6675
+ {
6676
+ "name": "from",
6677
+ "type": {
6678
+ "text": "string"
6679
+ },
6680
+ "default": "''",
6681
+ "description": "An id that references an element in the same document from which data will be copied. If both this and `value` are\npresent, this value will take precedence. By default, the target element's `textContent` will be copied. To copy an\nattribute, append the attribute name wrapped in square brackets, e.g. `from=\"el[value]\"`. To copy a property,\nappend a dot and the property name, e.g. `from=\"el.value\"`.",
6682
+ "fieldName": "from"
6683
+ }
6684
+ ],
6685
+ "superclass": {
6686
+ "name": "ZincElement",
6687
+ "module": "/src/internal/zinc-element"
6688
+ },
6689
+ "summary": "Short summary of the component's intended use.",
6690
+ "tagNameWithoutPrefix": "copy-button",
6691
+ "tagName": "zn-copy-button",
6692
+ "customElement": true,
6693
+ "jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/copy-button\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 */",
6694
+ "documentation": "https://zinc.style/components/copy-button",
6695
+ "status": "experimental",
6696
+ "since": "1.0",
6697
+ "dependencies": [
6698
+ "zn-example"
6699
+ ]
6700
+ }
6701
+ ],
6702
+ "exports": [
6703
+ {
6704
+ "kind": "js",
6705
+ "name": "default",
6706
+ "declaration": {
6707
+ "name": "ZnCopyButton",
6708
+ "module": "components/copy-button/copy-button.js"
6709
+ }
6710
+ }
6711
+ ]
6712
+ },
6495
6713
  {
6496
6714
  "kind": "javascript-module",
6497
6715
  "path": "components/data-select/data-select.js",
@@ -8198,248 +8416,20 @@
8198
8416
  "fieldName": "noInitialLoad"
8199
8417
  },
8200
8418
  {
8201
- "name": "group-by",
8202
- "type": {
8203
- "text": "string"
8204
- },
8205
- "default": "''",
8206
- "fieldName": "groupBy"
8207
- },
8208
- {
8209
- "name": "groups",
8210
- "type": {
8211
- "text": "string"
8212
- },
8213
- "default": "''",
8214
- "fieldName": "groups"
8215
- }
8216
- ],
8217
- "superclass": {
8218
- "name": "ZincElement",
8219
- "module": "/src/internal/zinc-element"
8220
- },
8221
- "summary": "Short summary of the component's intended use.",
8222
- "tagNameWithoutPrefix": "data-table",
8223
- "tagName": "zn-data-table",
8224
- "customElement": true,
8225
- "jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/data-table\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-button\n * @dependency zn-empty-state\n * @dependency zn-chip\n * @dependency zn-hover-container\n * @dependency zn-dropdown\n * @dependency zn-menu\n * @dependency zn-menu-item\n * @dependency zn-button-group\n * @dependency zn-confirm\n * @dependency zn-skeleton\n * @dependency zn-data-table-search\n *\n * @slot - The default slot.\n * @slot search - Slot for search component.\n * @slot sort - Slot for sort component.\n * @slot filter - Slot for filter component.\n * @slot filter-top - Slot for top-level filter component.\n * @slot delete-action - Slot for delete action button.\n * @slot modify-action - Slot for modify action button.\n * @slot create-action - Slot for create action button.\n * @slot inputs - Slot for additional input controls.\n * @slot empty-state - Slot for custom empty state.\n *\n * @csspart base - The component's base wrapper.\n *\n * @cssproperty --example - An example CSS custom property.\n */",
8226
- "documentation": "https://zinc.style/components/data-table",
8227
- "status": "experimental",
8228
- "since": "1.0",
8229
- "dependencies": [
8230
- "zn-button",
8231
- "zn-empty-state",
8232
- "zn-chip",
8233
- "zn-hover-container",
8234
- "zn-dropdown",
8235
- "zn-menu",
8236
- "zn-menu-item",
8237
- "zn-button-group",
8238
- "zn-confirm",
8239
- "zn-skeleton",
8240
- "zn-data-table-search"
8241
- ]
8242
- }
8243
- ],
8244
- "exports": [
8245
- {
8246
- "kind": "js",
8247
- "name": "default",
8248
- "declaration": {
8249
- "name": "ZnDataTable",
8250
- "module": "components/data-table/data-table.js"
8251
- }
8252
- }
8253
- ]
8254
- },
8255
- {
8256
- "kind": "javascript-module",
8257
- "path": "components/copy-button/copy-button.js",
8258
- "declarations": [
8259
- {
8260
- "kind": "class",
8261
- "description": "",
8262
- "name": "ZnCopyButton",
8263
- "cssProperties": [
8264
- {
8265
- "description": "An example CSS custom property.",
8266
- "name": "--example"
8267
- }
8268
- ],
8269
- "cssParts": [
8270
- {
8271
- "description": "The component's base wrapper.",
8272
- "name": "base"
8273
- }
8274
- ],
8275
- "slots": [
8276
- {
8277
- "description": "The default slot.",
8278
- "name": ""
8279
- },
8280
- {
8281
- "description": "An example slot.",
8282
- "name": "example"
8283
- }
8284
- ],
8285
- "members": [
8286
- {
8287
- "kind": "field",
8288
- "name": "copyIcon",
8289
- "type": {
8290
- "text": "HTMLSlotElement"
8291
- }
8292
- },
8293
- {
8294
- "kind": "field",
8295
- "name": "successIcon",
8296
- "type": {
8297
- "text": "HTMLSlotElement"
8298
- }
8299
- },
8300
- {
8301
- "kind": "field",
8302
- "name": "errorIcon",
8303
- "type": {
8304
- "text": "HTMLSlotElement"
8305
- }
8306
- },
8307
- {
8308
- "kind": "field",
8309
- "name": "tooltip",
8310
- "type": {
8311
- "text": "ZnTooltip"
8312
- }
8313
- },
8314
- {
8315
- "kind": "field",
8316
- "name": "isCopying",
8317
- "type": {
8318
- "text": "boolean"
8319
- },
8320
- "default": "false"
8321
- },
8322
- {
8323
- "kind": "field",
8324
- "name": "status",
8325
- "type": {
8326
- "text": "'rest' | 'success' | 'error'"
8327
- },
8328
- "default": "'rest'"
8329
- },
8330
- {
8331
- "kind": "field",
8332
- "name": "value",
8333
- "type": {
8334
- "text": "string"
8335
- },
8336
- "default": "''",
8337
- "attribute": "value"
8338
- },
8339
- {
8340
- "kind": "field",
8341
- "name": "copyLabel",
8342
- "type": {
8343
- "text": "string"
8344
- },
8345
- "default": "''",
8346
- "attribute": "copy-label"
8347
- },
8348
- {
8349
- "kind": "field",
8350
- "name": "src",
8351
- "type": {
8352
- "text": "string"
8353
- },
8354
- "default": "''",
8355
- "attribute": "src"
8356
- },
8357
- {
8358
- "kind": "field",
8359
- "name": "size",
8360
- "type": {
8361
- "text": "number"
8362
- },
8363
- "default": "24",
8364
- "attribute": "size",
8365
- "reflects": true
8366
- },
8367
- {
8368
- "kind": "field",
8369
- "name": "from",
8370
- "type": {
8371
- "text": "string"
8372
- },
8373
- "default": "''",
8374
- "description": "An id that references an element in the same document from which data will be copied. If both this and `value` are\npresent, this value will take precedence. By default, the target element's `textContent` will be copied. To copy an\nattribute, append the attribute name wrapped in square brackets, e.g. `from=\"el[value]\"`. To copy a property,\nappend a dot and the property name, e.g. `from=\"el.value\"`.",
8375
- "attribute": "from"
8376
- },
8377
- {
8378
- "kind": "method",
8379
- "name": "showStatus",
8380
- "privacy": "private",
8381
- "parameters": [
8382
- {
8383
- "name": "status",
8384
- "type": {
8385
- "text": "'success' | 'error'"
8386
- }
8387
- }
8388
- ]
8389
- },
8390
- {
8391
- "kind": "method",
8392
- "name": "handleCopy",
8393
- "privacy": "private"
8394
- }
8395
- ],
8396
- "events": [
8397
- {
8398
- "description": "Emitted as an example.",
8399
- "name": "zn-event-name"
8400
- }
8401
- ],
8402
- "attributes": [
8403
- {
8404
- "name": "value",
8405
- "type": {
8406
- "text": "string"
8407
- },
8408
- "default": "''",
8409
- "fieldName": "value"
8410
- },
8411
- {
8412
- "name": "copy-label",
8413
- "type": {
8414
- "text": "string"
8415
- },
8416
- "default": "''",
8417
- "fieldName": "copyLabel"
8418
- },
8419
- {
8420
- "name": "src",
8421
- "type": {
8422
- "text": "string"
8423
- },
8424
- "default": "''",
8425
- "fieldName": "src"
8426
- },
8427
- {
8428
- "name": "size",
8419
+ "name": "group-by",
8429
8420
  "type": {
8430
- "text": "number"
8421
+ "text": "string"
8431
8422
  },
8432
- "default": "24",
8433
- "fieldName": "size"
8423
+ "default": "''",
8424
+ "fieldName": "groupBy"
8434
8425
  },
8435
8426
  {
8436
- "name": "from",
8427
+ "name": "groups",
8437
8428
  "type": {
8438
8429
  "text": "string"
8439
8430
  },
8440
8431
  "default": "''",
8441
- "description": "An id that references an element in the same document from which data will be copied. If both this and `value` are\npresent, this value will take precedence. By default, the target element's `textContent` will be copied. To copy an\nattribute, append the attribute name wrapped in square brackets, e.g. `from=\"el[value]\"`. To copy a property,\nappend a dot and the property name, e.g. `from=\"el.value\"`.",
8442
- "fieldName": "from"
8432
+ "fieldName": "groups"
8443
8433
  }
8444
8434
  ],
8445
8435
  "superclass": {
@@ -8447,15 +8437,25 @@
8447
8437
  "module": "/src/internal/zinc-element"
8448
8438
  },
8449
8439
  "summary": "Short summary of the component's intended use.",
8450
- "tagNameWithoutPrefix": "copy-button",
8451
- "tagName": "zn-copy-button",
8440
+ "tagNameWithoutPrefix": "data-table",
8441
+ "tagName": "zn-data-table",
8452
8442
  "customElement": true,
8453
- "jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/copy-button\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 */",
8454
- "documentation": "https://zinc.style/components/copy-button",
8443
+ "jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/data-table\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-button\n * @dependency zn-empty-state\n * @dependency zn-chip\n * @dependency zn-hover-container\n * @dependency zn-dropdown\n * @dependency zn-menu\n * @dependency zn-menu-item\n * @dependency zn-button-group\n * @dependency zn-confirm\n * @dependency zn-skeleton\n * @dependency zn-data-table-search\n *\n * @slot - The default slot.\n * @slot search - Slot for search component.\n * @slot sort - Slot for sort component.\n * @slot filter - Slot for filter component.\n * @slot filter-top - Slot for top-level filter component.\n * @slot delete-action - Slot for delete action button.\n * @slot modify-action - Slot for modify action button.\n * @slot create-action - Slot for create action button.\n * @slot inputs - Slot for additional input controls.\n * @slot empty-state - Slot for custom empty state.\n *\n * @csspart base - The component's base wrapper.\n *\n * @cssproperty --example - An example CSS custom property.\n */",
8444
+ "documentation": "https://zinc.style/components/data-table",
8455
8445
  "status": "experimental",
8456
8446
  "since": "1.0",
8457
8447
  "dependencies": [
8458
- "zn-example"
8448
+ "zn-button",
8449
+ "zn-empty-state",
8450
+ "zn-chip",
8451
+ "zn-hover-container",
8452
+ "zn-dropdown",
8453
+ "zn-menu",
8454
+ "zn-menu-item",
8455
+ "zn-button-group",
8456
+ "zn-confirm",
8457
+ "zn-skeleton",
8458
+ "zn-data-table-search"
8459
8459
  ]
8460
8460
  }
8461
8461
  ],
@@ -8464,8 +8464,8 @@
8464
8464
  "kind": "js",
8465
8465
  "name": "default",
8466
8466
  "declaration": {
8467
- "name": "ZnCopyButton",
8468
- "module": "components/copy-button/copy-button.js"
8467
+ "name": "ZnDataTable",
8468
+ "module": "components/data-table/data-table.js"
8469
8469
  }
8470
8470
  }
8471
8471
  ]
@@ -21389,116 +21389,6 @@
21389
21389
  }
21390
21390
  ]
21391
21391
  },
21392
- {
21393
- "kind": "javascript-module",
21394
- "path": "components/opt-group/opt-group.js",
21395
- "declarations": [
21396
- {
21397
- "kind": "class",
21398
- "description": "",
21399
- "name": "ZnOptGroup",
21400
- "cssParts": [
21401
- {
21402
- "description": "The component's base wrapper.",
21403
- "name": "base"
21404
- },
21405
- {
21406
- "description": "The group label element.",
21407
- "name": "label"
21408
- }
21409
- ],
21410
- "slots": [
21411
- {
21412
- "description": "The default slot for `<zn-option>` elements.",
21413
- "name": ""
21414
- }
21415
- ],
21416
- "members": [
21417
- {
21418
- "kind": "field",
21419
- "name": "label",
21420
- "type": {
21421
- "text": "string"
21422
- },
21423
- "default": "''",
21424
- "description": "The label for the opt-group, displayed as a non-selectable header above the grouped options.",
21425
- "attribute": "label"
21426
- },
21427
- {
21428
- "kind": "field",
21429
- "name": "disabled",
21430
- "type": {
21431
- "text": "boolean"
21432
- },
21433
- "default": "false",
21434
- "description": "Disables all options within the group.",
21435
- "attribute": "disabled",
21436
- "reflects": true
21437
- },
21438
- {
21439
- "kind": "method",
21440
- "name": "handleLabelChange"
21441
- },
21442
- {
21443
- "kind": "method",
21444
- "name": "handleDisabledChange"
21445
- },
21446
- {
21447
- "kind": "method",
21448
- "name": "handleSlotChange",
21449
- "privacy": "private"
21450
- },
21451
- {
21452
- "kind": "method",
21453
- "name": "propagateDisabled",
21454
- "privacy": "private"
21455
- }
21456
- ],
21457
- "attributes": [
21458
- {
21459
- "name": "label",
21460
- "type": {
21461
- "text": "string"
21462
- },
21463
- "default": "''",
21464
- "description": "The label for the opt-group, displayed as a non-selectable header above the grouped options.",
21465
- "fieldName": "label"
21466
- },
21467
- {
21468
- "name": "disabled",
21469
- "type": {
21470
- "text": "boolean"
21471
- },
21472
- "default": "false",
21473
- "description": "Disables all options within the group.",
21474
- "fieldName": "disabled"
21475
- }
21476
- ],
21477
- "superclass": {
21478
- "name": "ZincElement",
21479
- "module": "/src/internal/zinc-element"
21480
- },
21481
- "summary": "Groups options within a `<zn-select>` under a labeled header, similar to `<optgroup>` in native HTML.",
21482
- "tagNameWithoutPrefix": "opt-group",
21483
- "tagName": "zn-opt-group",
21484
- "customElement": true,
21485
- "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 */",
21486
- "documentation": "https://zinc.style/components/opt-group",
21487
- "status": "experimental",
21488
- "since": "1.0"
21489
- }
21490
- ],
21491
- "exports": [
21492
- {
21493
- "kind": "js",
21494
- "name": "default",
21495
- "declaration": {
21496
- "name": "ZnOptGroup",
21497
- "module": "components/opt-group/opt-group.js"
21498
- }
21499
- }
21500
- ]
21501
- },
21502
21392
  {
21503
21393
  "kind": "javascript-module",
21504
21394
  "path": "components/note/note.js",
@@ -21667,6 +21557,116 @@
21667
21557
  }
21668
21558
  ]
21669
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
+ },
21670
21670
  {
21671
21671
  "kind": "javascript-module",
21672
21672
  "path": "components/option/option.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.26",
38274
+ "version": "1.1.27",
38275
38275
  "author": "",
38276
38276
  "license": "MIT"
38277
38277
  }
@@ -890,6 +890,27 @@
890
890
  }
891
891
  ]
892
892
  },
893
+ {
894
+ "name": "zn-copy-button",
895
+ "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.",
896
+ "attributes": [
897
+ { "name": "value", "values": [] },
898
+ { "name": "copy-label", "values": [] },
899
+ { "name": "src", "values": [] },
900
+ { "name": "size", "values": [] },
901
+ {
902
+ "name": "from",
903
+ "description": "An id that references an element in the same document from which data will be copied. If both this and `value` are\npresent, this value will take precedence. By default, the target element's `textContent` will be copied. To copy an\nattribute, append the attribute name wrapped in square brackets, e.g. `from=\"el[value]\"`. To copy a property,\nappend a dot and the property name, e.g. `from=\"el.value\"`.",
904
+ "values": []
905
+ }
906
+ ],
907
+ "references": [
908
+ {
909
+ "name": "Documentation",
910
+ "url": "https://zinc.style/components/copy-button"
911
+ }
912
+ ]
913
+ },
893
914
  {
894
915
  "name": "zn-data-select",
895
916
  "description": "A select component with built-in data providers for common options like colors, currencies, and countries.\n---\n\n\n### **Events:**\n - **zn-input** - Emitted when the select's value changes.\n- **zn-clear** - Emitted when the clear button is activated.\n- **blur** - Emitted when the select loses focus.\n\n### **Slots:**\n - **label** - The select's label. Alternatively, you can use the `label` attribute.\n- **label-tooltip** - Used to add text that is displayed in a tooltip next to the label. Alternatively, you can use the `label-tooltip` attribute.\n- **context-note** - Used to add contextual text that is displayed above the select, on the right. Alternatively, you can use the `context-note` attribute.\n- **help-text** - Text that describes how to use the select. Alternatively, you can use the `help-text` attribute.\n\n### **CSS Parts:**\n - **combobox** - The container that wraps the prefix, combobox, clear icon, and expand button (forwarded from zn-select).\n- **expand-icon** - The container that wraps the expand icon (forwarded from zn-select).\n- **form-control-help-text** - The help text's wrapper (forwarded from zn-select).\n- **form-control-input** - The select's wrapper (forwarded from zn-select).\n- **display-input** - The element that displays the selected option's label (forwarded from zn-select).",
@@ -1037,27 +1058,6 @@
1037
1058
  }
1038
1059
  ]
1039
1060
  },
1040
- {
1041
- "name": "zn-copy-button",
1042
- "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.",
1043
- "attributes": [
1044
- { "name": "value", "values": [] },
1045
- { "name": "copy-label", "values": [] },
1046
- { "name": "src", "values": [] },
1047
- { "name": "size", "values": [] },
1048
- {
1049
- "name": "from",
1050
- "description": "An id that references an element in the same document from which data will be copied. If both this and `value` are\npresent, this value will take precedence. By default, the target element's `textContent` will be copied. To copy an\nattribute, append the attribute name wrapped in square brackets, e.g. `from=\"el[value]\"`. To copy a property,\nappend a dot and the property name, e.g. `from=\"el.value\"`.",
1051
- "values": []
1052
- }
1053
- ],
1054
- "references": [
1055
- {
1056
- "name": "Documentation",
1057
- "url": "https://zinc.style/components/copy-button"
1058
- }
1059
- ]
1060
- },
1061
1061
  {
1062
1062
  "name": "zn-data-table-filter",
1063
1063
  "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.",
@@ -2418,6 +2418,19 @@
2418
2418
  }
2419
2419
  ]
2420
2420
  },
2421
+ {
2422
+ "name": "zn-note",
2423
+ "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 - **caption** - The note's caption.\n- **date** - The note's date.\n- **body** - The note's body.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
2424
+ "attributes": [
2425
+ { "name": "color", "values": [{ "name": "typeof colors[number]" }] },
2426
+ { "name": "caption", "values": [] },
2427
+ { "name": "date", "values": [] },
2428
+ { "name": "body", "values": [] }
2429
+ ],
2430
+ "references": [
2431
+ { "name": "Documentation", "url": "https://zinc.style/components/note" }
2432
+ ]
2433
+ },
2421
2434
  {
2422
2435
  "name": "zn-opt-group",
2423
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.",
@@ -2440,19 +2453,6 @@
2440
2453
  }
2441
2454
  ]
2442
2455
  },
2443
- {
2444
- "name": "zn-note",
2445
- "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 - **caption** - The note's caption.\n- **date** - The note's date.\n- **body** - The note's body.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
2446
- "attributes": [
2447
- { "name": "color", "values": [{ "name": "typeof colors[number]" }] },
2448
- { "name": "caption", "values": [] },
2449
- { "name": "date", "values": [] },
2450
- { "name": "body", "values": [] }
2451
- ],
2452
- "references": [
2453
- { "name": "Documentation", "url": "https://zinc.style/components/note" }
2454
- ]
2455
- },
2456
2456
  {
2457
2457
  "name": "zn-option",
2458
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.",
@@ -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.26",
4
+ "version": "1.1.27",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1956,6 +1956,57 @@
1956
1956
  "events": []
1957
1957
  }
1958
1958
  },
1959
+ {
1960
+ "name": "zn-copy-button",
1961
+ "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.",
1962
+ "doc-url": "",
1963
+ "attributes": [
1964
+ { "name": "value", "value": { "type": "string", "default": "''" } },
1965
+ {
1966
+ "name": "copy-label",
1967
+ "value": { "type": "string", "default": "''" }
1968
+ },
1969
+ { "name": "src", "value": { "type": "string", "default": "''" } },
1970
+ { "name": "size", "value": { "type": "number", "default": "24" } },
1971
+ {
1972
+ "name": "from",
1973
+ "description": "An id that references an element in the same document from which data will be copied. If both this and `value` are\npresent, this value will take precedence. By default, the target element's `textContent` will be copied. To copy an\nattribute, append the attribute name wrapped in square brackets, e.g. `from=\"el[value]\"`. To copy a property,\nappend a dot and the property name, e.g. `from=\"el.value\"`.",
1974
+ "value": { "type": "string", "default": "''" }
1975
+ }
1976
+ ],
1977
+ "slots": [
1978
+ { "name": "", "description": "The default slot." },
1979
+ { "name": "example", "description": "An example slot." }
1980
+ ],
1981
+ "events": [
1982
+ { "name": "zn-event-name", "description": "Emitted as an example." }
1983
+ ],
1984
+ "js": {
1985
+ "properties": [
1986
+ { "name": "copyIcon", "type": "HTMLSlotElement" },
1987
+ { "name": "successIcon", "type": "HTMLSlotElement" },
1988
+ { "name": "errorIcon", "type": "HTMLSlotElement" },
1989
+ { "name": "tooltip", "type": "ZnTooltip" },
1990
+ { "name": "isCopying", "type": "boolean" },
1991
+ { "name": "status", "type": "'rest' | 'success' | 'error'" },
1992
+ { "name": "value", "type": "string" },
1993
+ { "name": "copyLabel", "type": "string" },
1994
+ { "name": "src", "type": "string" },
1995
+ { "name": "size", "type": "number" },
1996
+ {
1997
+ "name": "from",
1998
+ "description": "An id that references an element in the same document from which data will be copied. If both this and `value` are\npresent, this value will take precedence. By default, the target element's `textContent` will be copied. To copy an\nattribute, append the attribute name wrapped in square brackets, e.g. `from=\"el[value]\"`. To copy a property,\nappend a dot and the property name, e.g. `from=\"el.value\"`.",
1999
+ "type": "string"
2000
+ }
2001
+ ],
2002
+ "events": [
2003
+ {
2004
+ "name": "zn-event-name",
2005
+ "description": "Emitted as an example."
2006
+ }
2007
+ ]
2008
+ }
2009
+ },
1959
2010
  {
1960
2011
  "name": "zn-data-select",
1961
2012
  "description": "A select component with built-in data providers for common options like colors, currencies, and countries.\n---\n\n\n### **Events:**\n - **zn-input** - Emitted when the select's value changes.\n- **zn-clear** - Emitted when the clear button is activated.\n- **blur** - Emitted when the select loses focus.\n\n### **Slots:**\n - **label** - The select's label. Alternatively, you can use the `label` attribute.\n- **label-tooltip** - Used to add text that is displayed in a tooltip next to the label. Alternatively, you can use the `label-tooltip` attribute.\n- **context-note** - Used to add contextual text that is displayed above the select, on the right. Alternatively, you can use the `context-note` attribute.\n- **help-text** - Text that describes how to use the select. Alternatively, you can use the `help-text` attribute.\n\n### **CSS Parts:**\n - **combobox** - The container that wraps the prefix, combobox, clear icon, and expand button (forwarded from zn-select).\n- **expand-icon** - The container that wraps the expand icon (forwarded from zn-select).\n- **form-control-help-text** - The help text's wrapper (forwarded from zn-select).\n- **form-control-input** - The select's wrapper (forwarded from zn-select).\n- **display-input** - The element that displays the selected option's label (forwarded from zn-select).",
@@ -2355,57 +2406,6 @@
2355
2406
  "events": []
2356
2407
  }
2357
2408
  },
2358
- {
2359
- "name": "zn-copy-button",
2360
- "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.",
2361
- "doc-url": "",
2362
- "attributes": [
2363
- { "name": "value", "value": { "type": "string", "default": "''" } },
2364
- {
2365
- "name": "copy-label",
2366
- "value": { "type": "string", "default": "''" }
2367
- },
2368
- { "name": "src", "value": { "type": "string", "default": "''" } },
2369
- { "name": "size", "value": { "type": "number", "default": "24" } },
2370
- {
2371
- "name": "from",
2372
- "description": "An id that references an element in the same document from which data will be copied. If both this and `value` are\npresent, this value will take precedence. By default, the target element's `textContent` will be copied. To copy an\nattribute, append the attribute name wrapped in square brackets, e.g. `from=\"el[value]\"`. To copy a property,\nappend a dot and the property name, e.g. `from=\"el.value\"`.",
2373
- "value": { "type": "string", "default": "''" }
2374
- }
2375
- ],
2376
- "slots": [
2377
- { "name": "", "description": "The default slot." },
2378
- { "name": "example", "description": "An example slot." }
2379
- ],
2380
- "events": [
2381
- { "name": "zn-event-name", "description": "Emitted as an example." }
2382
- ],
2383
- "js": {
2384
- "properties": [
2385
- { "name": "copyIcon", "type": "HTMLSlotElement" },
2386
- { "name": "successIcon", "type": "HTMLSlotElement" },
2387
- { "name": "errorIcon", "type": "HTMLSlotElement" },
2388
- { "name": "tooltip", "type": "ZnTooltip" },
2389
- { "name": "isCopying", "type": "boolean" },
2390
- { "name": "status", "type": "'rest' | 'success' | 'error'" },
2391
- { "name": "value", "type": "string" },
2392
- { "name": "copyLabel", "type": "string" },
2393
- { "name": "src", "type": "string" },
2394
- { "name": "size", "type": "number" },
2395
- {
2396
- "name": "from",
2397
- "description": "An id that references an element in the same document from which data will be copied. If both this and `value` are\npresent, this value will take precedence. By default, the target element's `textContent` will be copied. To copy an\nattribute, append the attribute name wrapped in square brackets, e.g. `from=\"el[value]\"`. To copy a property,\nappend a dot and the property name, e.g. `from=\"el.value\"`.",
2398
- "type": "string"
2399
- }
2400
- ],
2401
- "events": [
2402
- {
2403
- "name": "zn-event-name",
2404
- "description": "Emitted as an example."
2405
- }
2406
- ]
2407
- }
2408
- },
2409
2409
  {
2410
2410
  "name": "zn-data-table-filter",
2411
2411
  "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.",
@@ -5650,6 +5650,42 @@
5650
5650
  ]
5651
5651
  }
5652
5652
  },
5653
+ {
5654
+ "name": "zn-note",
5655
+ "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 - **caption** - The note's caption.\n- **date** - The note's date.\n- **body** - The note's body.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
5656
+ "doc-url": "",
5657
+ "attributes": [
5658
+ { "name": "color", "value": { "type": "typeof colors[number]" } },
5659
+ {
5660
+ "name": "caption",
5661
+ "value": { "type": "string", "default": "''" }
5662
+ },
5663
+ { "name": "date", "value": { "type": "string", "default": "''" } },
5664
+ { "name": "body", "value": { "type": "string", "default": "''" } }
5665
+ ],
5666
+ "slots": [
5667
+ { "name": "caption", "description": "The note's caption." },
5668
+ { "name": "date", "description": "The note's date." },
5669
+ { "name": "body", "description": "The note's body." }
5670
+ ],
5671
+ "events": [
5672
+ { "name": "zn-event-name", "description": "Emitted as an example." }
5673
+ ],
5674
+ "js": {
5675
+ "properties": [
5676
+ { "name": "color", "type": "typeof colors[number]" },
5677
+ { "name": "caption", "type": "string" },
5678
+ { "name": "date", "type": "string" },
5679
+ { "name": "body", "type": "string" }
5680
+ ],
5681
+ "events": [
5682
+ {
5683
+ "name": "zn-event-name",
5684
+ "description": "Emitted as an example."
5685
+ }
5686
+ ]
5687
+ }
5688
+ },
5653
5689
  {
5654
5690
  "name": "zn-opt-group",
5655
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.",
@@ -5689,42 +5725,6 @@
5689
5725
  "events": []
5690
5726
  }
5691
5727
  },
5692
- {
5693
- "name": "zn-note",
5694
- "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 - **caption** - The note's caption.\n- **date** - The note's date.\n- **body** - The note's body.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
5695
- "doc-url": "",
5696
- "attributes": [
5697
- { "name": "color", "value": { "type": "typeof colors[number]" } },
5698
- {
5699
- "name": "caption",
5700
- "value": { "type": "string", "default": "''" }
5701
- },
5702
- { "name": "date", "value": { "type": "string", "default": "''" } },
5703
- { "name": "body", "value": { "type": "string", "default": "''" } }
5704
- ],
5705
- "slots": [
5706
- { "name": "caption", "description": "The note's caption." },
5707
- { "name": "date", "description": "The note's date." },
5708
- { "name": "body", "description": "The note's body." }
5709
- ],
5710
- "events": [
5711
- { "name": "zn-event-name", "description": "Emitted as an example." }
5712
- ],
5713
- "js": {
5714
- "properties": [
5715
- { "name": "color", "type": "typeof colors[number]" },
5716
- { "name": "caption", "type": "string" },
5717
- { "name": "date", "type": "string" },
5718
- { "name": "body", "type": "string" }
5719
- ],
5720
- "events": [
5721
- {
5722
- "name": "zn-event-name",
5723
- "description": "Emitted as an example."
5724
- }
5725
- ]
5726
- }
5727
- },
5728
5728
  {
5729
5729
  "name": "zn-option",
5730
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.",
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
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubex/zinc",
3
- "version": "1.1.26",
3
+ "version": "1.1.27",
4
4
  "description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
5
5
  "keywords": [
6
6
  "web components",
@@ -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
- const p = this.screenToCanvas(e.clientX, e.clientY);
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);