@kubex/zinc 1.1.79 → 1.1.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/custom-elements.json +1398 -109
  2. package/dist/vscode.html-custom-data.json +202 -3
  3. package/dist/web-types.json +478 -4
  4. package/dist/zn.d.ts +467 -8
  5. package/dist/zn.min.js +388 -316
  6. package/docs/pages/components/inline-edit.md +22 -0
  7. package/docs/pages/components/input.md +21 -0
  8. package/docs/pages/components/remarkd-editor.md +43 -0
  9. package/docs/pages/components/slash-item.md +126 -0
  10. package/docs/pages/components/slash-menu.md +161 -0
  11. package/docs/pages/components/textarea.md +148 -0
  12. package/docs/pages/components/translations.md +34 -0
  13. package/package.json +1 -1
  14. package/src/components/inline-edit/inline-edit.component.ts +36 -0
  15. package/src/components/inline-edit/inline-edit.test.ts +83 -1
  16. package/src/components/input/input.component.ts +143 -0
  17. package/src/components/input/input.test.ts +113 -1
  18. package/src/components/remarkd-editor/remarkd-editor.component.ts +157 -95
  19. package/src/components/remarkd-editor/remarkd-editor.scss +24 -36
  20. package/src/components/remarkd-editor/remarkd-editor.test.ts +110 -6
  21. package/src/components/slash-item/index.ts +12 -0
  22. package/src/components/slash-item/slash-item.component.ts +76 -0
  23. package/src/components/slash-item/slash-item.scss +5 -0
  24. package/src/components/slash-menu/index.ts +14 -0
  25. package/src/components/slash-menu/slash-menu-controller.ts +361 -0
  26. package/src/components/slash-menu/slash-menu-items.ts +122 -0
  27. package/src/components/slash-menu/slash-menu.component.ts +327 -0
  28. package/src/components/slash-menu/slash-menu.scss +120 -0
  29. package/src/components/slash-menu/slash-menu.test.ts +154 -0
  30. package/src/components/textarea/textarea.component.ts +143 -0
  31. package/src/components/textarea/textarea.test.ts +310 -2
  32. package/src/components/translations/translations.component.ts +31 -0
  33. package/src/components/translations/translations.test.ts +89 -1
  34. package/src/events/events.ts +2 -0
  35. package/src/events/zn-slash-insert.ts +9 -0
  36. package/src/events/zn-slash-select.ts +9 -0
  37. package/src/utilities/caret-position.ts +118 -0
  38. package/src/zinc.ts +3 -0
@@ -17571,6 +17571,54 @@
17571
17571
  },
17572
17572
  "attribute": "textarea-rows"
17573
17573
  },
17574
+ {
17575
+ "kind": "field",
17576
+ "name": "slashItems",
17577
+ "type": {
17578
+ "text": "SlashMenuItem[]"
17579
+ },
17580
+ "default": "[]",
17581
+ "description": "Quick insertions offered by the slash menu of a `text` or `textarea` input. Accepts a JSON array of items, or\nthe shorthand `Brand name={{BRAND_NAME}}, Support email={{SUPPORT_EMAIL}}`.",
17582
+ "attribute": "slash-items"
17583
+ },
17584
+ {
17585
+ "kind": "field",
17586
+ "name": "slashPreset",
17587
+ "type": {
17588
+ "text": "string"
17589
+ },
17590
+ "default": "''",
17591
+ "description": "Names of item sets registered with `registerSlashMenuPreset`, comma separated.",
17592
+ "attribute": "slash-preset"
17593
+ },
17594
+ {
17595
+ "kind": "field",
17596
+ "name": "slashTrigger",
17597
+ "type": {
17598
+ "text": "string"
17599
+ },
17600
+ "default": "'/'",
17601
+ "description": "The characters that open the slash menu.",
17602
+ "attribute": "slash-trigger"
17603
+ },
17604
+ {
17605
+ "kind": "field",
17606
+ "name": "slashHeading",
17607
+ "type": {
17608
+ "text": "string"
17609
+ },
17610
+ "default": "'Insert'",
17611
+ "description": "The heading shown above the slash menu's items.",
17612
+ "attribute": "slash-heading"
17613
+ },
17614
+ {
17615
+ "kind": "field",
17616
+ "name": "slashItemsProvider",
17617
+ "type": {
17618
+ "text": "(query: string) => SlashMenuItem[] | Promise<SlashMenuItem[]> | undefined"
17619
+ },
17620
+ "description": "Resolves additional slash menu items each time the menu opens. JavaScript only."
17621
+ },
17574
17622
  {
17575
17623
  "kind": "field",
17576
17624
  "name": "options",
@@ -18031,6 +18079,42 @@
18031
18079
  },
18032
18080
  "fieldName": "textareaRows"
18033
18081
  },
18082
+ {
18083
+ "name": "slash-items",
18084
+ "type": {
18085
+ "text": "SlashMenuItem[]"
18086
+ },
18087
+ "default": "[]",
18088
+ "description": "Quick insertions offered by the slash menu of a `text` or `textarea` input. Accepts a JSON array of items, or\nthe shorthand `Brand name={{BRAND_NAME}}, Support email={{SUPPORT_EMAIL}}`.",
18089
+ "fieldName": "slashItems"
18090
+ },
18091
+ {
18092
+ "name": "slash-preset",
18093
+ "type": {
18094
+ "text": "string"
18095
+ },
18096
+ "default": "''",
18097
+ "description": "Names of item sets registered with `registerSlashMenuPreset`, comma separated.",
18098
+ "fieldName": "slashPreset"
18099
+ },
18100
+ {
18101
+ "name": "slash-trigger",
18102
+ "type": {
18103
+ "text": "string"
18104
+ },
18105
+ "default": "'/'",
18106
+ "description": "The characters that open the slash menu.",
18107
+ "fieldName": "slashTrigger"
18108
+ },
18109
+ {
18110
+ "name": "slash-heading",
18111
+ "type": {
18112
+ "text": "string"
18113
+ },
18114
+ "default": "'Insert'",
18115
+ "description": "The heading shown above the slash menu's items.",
18116
+ "fieldName": "slashHeading"
18117
+ },
18034
18118
  {
18035
18119
  "name": "options",
18036
18120
  "type": {
@@ -18176,6 +18260,10 @@
18176
18260
  "description": "The form control that wraps the label, input, and help text.",
18177
18261
  "name": "form-control"
18178
18262
  },
18263
+ {
18264
+ "description": "The slash menu shown at the caret.",
18265
+ "name": "slash-menu"
18266
+ },
18179
18267
  {
18180
18268
  "description": "The label's wrapper.",
18181
18269
  "name": "form-control-label"
@@ -18249,6 +18337,14 @@
18249
18337
  {
18250
18338
  "description": "Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.",
18251
18339
  "name": "help-text"
18340
+ },
18341
+ {
18342
+ "description": "`<zn-slash-item>` elements describing the insertions offered by the slash menu. Items are picked up wherever they sit inside the input, so this slot name is optional.",
18343
+ "name": "slash-items"
18344
+ },
18345
+ {
18346
+ "description": "A `<zn-slash-menu>` to use instead of the built-in one, so its heading, sizing and styling can be set in markup. Any `<zn-slash-item>` children of it become the menu's items.",
18347
+ "name": "slash-menu"
18252
18348
  }
18253
18349
  ],
18254
18350
  "members": [
@@ -18259,7 +18355,7 @@
18259
18355
  "text": "object"
18260
18356
  },
18261
18357
  "static": true,
18262
- "default": "{ 'zn-icon': ZnIcon, 'zn-tooltip': ZnTooltip }"
18358
+ "default": "{ 'zn-icon': ZnIcon, 'zn-slash-item': ZnSlashItem, 'zn-slash-menu': ZnSlashMenu, 'zn-tooltip': ZnTooltip }"
18263
18359
  },
18264
18360
  {
18265
18361
  "kind": "field",
@@ -18282,6 +18378,13 @@
18282
18378
  "readonly": true,
18283
18379
  "default": "new LocalizeController(this)"
18284
18380
  },
18381
+ {
18382
+ "kind": "field",
18383
+ "name": "slashController",
18384
+ "privacy": "private",
18385
+ "readonly": true,
18386
+ "default": "new SlashMenuController(this, { menu: () => this.mountSlashMenu(), items: search => this.resolveSlashItems(search), trigger: () => this.slashTrigger, onSelect: (item, search) => !this.emit('zn-slash-select', { detail: {item, query: search} }).defaultPrevented, onInsert: (item, value) => this.emit('zn-slash-insert', {detail: {item, value}}) })"
18387
+ },
18285
18388
  {
18286
18389
  "kind": "field",
18287
18390
  "name": "input",
@@ -18296,6 +18399,13 @@
18296
18399
  "text": "HTMLInputElement"
18297
18400
  }
18298
18401
  },
18402
+ {
18403
+ "kind": "field",
18404
+ "name": "slashMenuElement",
18405
+ "type": {
18406
+ "text": "ZnSlashMenu | null"
18407
+ }
18408
+ },
18299
18409
  {
18300
18410
  "kind": "field",
18301
18411
  "name": "hasFocus",
@@ -18305,6 +18415,16 @@
18305
18415
  "privacy": "private",
18306
18416
  "default": "false"
18307
18417
  },
18418
+ {
18419
+ "kind": "field",
18420
+ "name": "hasSlashMenu",
18421
+ "type": {
18422
+ "text": "boolean"
18423
+ },
18424
+ "privacy": "private",
18425
+ "default": "false",
18426
+ "description": "Renders the slash menu only once it has been needed, keeping unused inputs cheap."
18427
+ },
18308
18428
  {
18309
18429
  "kind": "field",
18310
18430
  "name": "isUserTyping",
@@ -18688,6 +18808,54 @@
18688
18808
  "description": "Tells the browser what type of data will be entered by the user, allowing it to display the appropriate virtual\nkeyboard on supportive devices.",
18689
18809
  "attribute": "inputmode"
18690
18810
  },
18811
+ {
18812
+ "kind": "field",
18813
+ "name": "slashItems",
18814
+ "type": {
18815
+ "text": "SlashMenuItem[]"
18816
+ },
18817
+ "default": "[]",
18818
+ "description": "Quick insertions offered by the slash menu. Accepts a JSON array of items, or the shorthand\n`Brand name={{BRAND_NAME}}, Support email={{SUPPORT_EMAIL}}`. Can also be set as an array of\n`SlashMenuItem` objects in JavaScript.",
18819
+ "attribute": "slash-items"
18820
+ },
18821
+ {
18822
+ "kind": "field",
18823
+ "name": "slashPreset",
18824
+ "type": {
18825
+ "text": "string"
18826
+ },
18827
+ "default": "''",
18828
+ "description": "Names of item sets registered with `registerSlashMenuPreset`, comma separated.",
18829
+ "attribute": "slash-preset"
18830
+ },
18831
+ {
18832
+ "kind": "field",
18833
+ "name": "slashTrigger",
18834
+ "type": {
18835
+ "text": "string"
18836
+ },
18837
+ "default": "'/'",
18838
+ "description": "The characters that open the slash menu.",
18839
+ "attribute": "slash-trigger"
18840
+ },
18841
+ {
18842
+ "kind": "field",
18843
+ "name": "slashHeading",
18844
+ "type": {
18845
+ "text": "string"
18846
+ },
18847
+ "default": "'Insert'",
18848
+ "description": "The heading shown above the slash menu's items.",
18849
+ "attribute": "slash-heading"
18850
+ },
18851
+ {
18852
+ "kind": "field",
18853
+ "name": "slashItemsProvider",
18854
+ "type": {
18855
+ "text": "(query: string) => SlashMenuItem[] | Promise<SlashMenuItem[]> | undefined"
18856
+ },
18857
+ "description": "Resolves additional items each time the menu opens, for lists that come from elsewhere (e.g. an\nAPI). Receives the current query and may return a promise. JavaScript only."
18858
+ },
18691
18859
  {
18692
18860
  "kind": "field",
18693
18861
  "name": "triggerSubmit",
@@ -18961,6 +19129,52 @@
18961
19129
  }
18962
19130
  ]
18963
19131
  },
19132
+ {
19133
+ "kind": "method",
19134
+ "name": "resolveSlashItems",
19135
+ "return": {
19136
+ "type": {
19137
+ "text": "Promise<SlashMenuItem[]>"
19138
+ }
19139
+ },
19140
+ "parameters": [
19141
+ {
19142
+ "name": "search",
19143
+ "default": "''"
19144
+ }
19145
+ ],
19146
+ "description": "The insertions the slash menu offers, gathered from every source, in the order they were declared."
19147
+ },
19148
+ {
19149
+ "kind": "method",
19150
+ "name": "showSlashMenu",
19151
+ "description": "Opens the slash menu at the caret, inserting the trigger if it isn't already there."
19152
+ },
19153
+ {
19154
+ "kind": "method",
19155
+ "name": "hideSlashMenu",
19156
+ "description": "Closes the slash menu."
19157
+ },
19158
+ {
19159
+ "kind": "method",
19160
+ "name": "slottedSlashItems",
19161
+ "privacy": "private",
19162
+ "return": {
19163
+ "type": {
19164
+ "text": "SlashMenuItem[]"
19165
+ }
19166
+ }
19167
+ },
19168
+ {
19169
+ "kind": "method",
19170
+ "name": "mountSlashMenu",
19171
+ "privacy": "private",
19172
+ "return": {
19173
+ "type": {
19174
+ "text": "Promise<ZnSlashMenu | null>"
19175
+ }
19176
+ }
19177
+ },
18964
19178
  {
18965
19179
  "kind": "method",
18966
19180
  "name": "handleDisabledChange"
@@ -19139,6 +19353,14 @@
19139
19353
  {
19140
19354
  "description": "Emitted when the form control has been checked for validity and its constraints aren't satisfied.",
19141
19355
  "name": "zn-invalid"
19356
+ },
19357
+ {
19358
+ "description": "Emitted when a slash menu item is chosen. Cancelable — call `preventDefault()` to suppress the insertion and handle the item yourself.",
19359
+ "name": "zn-slash-select"
19360
+ },
19361
+ {
19362
+ "description": "Emitted after a slash menu item's value has been inserted.",
19363
+ "name": "zn-slash-insert"
19142
19364
  }
19143
19365
  ],
19144
19366
  "attributes": [
@@ -19452,6 +19674,42 @@
19452
19674
  "description": "Tells the browser what type of data will be entered by the user, allowing it to display the appropriate virtual\nkeyboard on supportive devices.",
19453
19675
  "fieldName": "inputmode"
19454
19676
  },
19677
+ {
19678
+ "name": "slash-items",
19679
+ "type": {
19680
+ "text": "SlashMenuItem[]"
19681
+ },
19682
+ "default": "[]",
19683
+ "description": "Quick insertions offered by the slash menu. Accepts a JSON array of items, or the shorthand\n`Brand name={{BRAND_NAME}}, Support email={{SUPPORT_EMAIL}}`. Can also be set as an array of\n`SlashMenuItem` objects in JavaScript.",
19684
+ "fieldName": "slashItems"
19685
+ },
19686
+ {
19687
+ "name": "slash-preset",
19688
+ "type": {
19689
+ "text": "string"
19690
+ },
19691
+ "default": "''",
19692
+ "description": "Names of item sets registered with `registerSlashMenuPreset`, comma separated.",
19693
+ "fieldName": "slashPreset"
19694
+ },
19695
+ {
19696
+ "name": "slash-trigger",
19697
+ "type": {
19698
+ "text": "string"
19699
+ },
19700
+ "default": "'/'",
19701
+ "description": "The characters that open the slash menu.",
19702
+ "fieldName": "slashTrigger"
19703
+ },
19704
+ {
19705
+ "name": "slash-heading",
19706
+ "type": {
19707
+ "text": "string"
19708
+ },
19709
+ "default": "'Insert'",
19710
+ "description": "The heading shown above the slash menu's items.",
19711
+ "fieldName": "slashHeading"
19712
+ },
19455
19713
  {
19456
19714
  "name": "trigger-submit",
19457
19715
  "type": {
@@ -19470,13 +19728,15 @@
19470
19728
  "tagNameWithoutPrefix": "input",
19471
19729
  "tagName": "zn-input",
19472
19730
  "customElement": true,
19473
- "jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/input\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-icon\n * @dependency zn-tooltip\n *\n * @event zn-blur - Emitted when the control loses focus.\n * @event zn-change - Emitted when an alteration to the control's value is committed by the user.\n * @event zn-clear - Emitted when the clear button is activated.\n * @event zn-focus - Emitted when the control gains focus.\n * @event zn-input - Emitted when the control receives input.\n * @event zn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @slot label - The input's label. Alternatively, you can use the `label` attribute.\n * @slot 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 * @slot context-note - Used to add contextual text that is displayed above the input, on the right. Alternatively, you can use the `context-note` attribute. Range inputs display their live value here unless this is set.\n * @slot prefix - Used to prepend a presentational icon or similar element to the input.\n * @slot suffix - Used to append a presentational icon or similar element to the input.\n * @slot clear-icon - An icon to use in lieu of the default clear icon.\n * @slot show-password-icon - An icon to use in lieu of the default show password icon.\n * @slot hide-password-icon - An icon to use in lieu of the default hide password icon.\n * @slot help-text - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.\n *\n * @csspart form-control - The form control that wraps the label, input, and help text.\n * @csspart form-control-label - The label's wrapper.\n * @csspart form-control-input - The input's wrapper.\n * @csspart form-control-help-text - The help text's wrapper.\n * @csspart base - The component's base wrapper.\n * @csspart input - The internal `<input>` control.\n * @csspart prefix - The container that wraps the prefix.\n * @csspart clear-button - The clear button.\n * @csspart password-toggle-button - The password toggle button.\n * @csspart suffix - The container that wraps the suffix.\n *\n * @cssproperty --zn-range-track-height - The height of a range input's track.\n * @cssproperty --zn-range-track-color - The color of a range input's track.\n * @cssproperty --zn-range-thumb-size - The diameter of a range input's thumb.\n * @cssproperty --zn-range-thumb-color - The color of a range input's thumb.\n * @cssproperty --zn-range-thumb-ring-width - The width of the ring drawn around a range input's thumb.\n */",
19731
+ "jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/input\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-icon\n * @dependency zn-tooltip\n *\n * @event zn-blur - Emitted when the control loses focus.\n * @event zn-change - Emitted when an alteration to the control's value is committed by the user.\n * @event zn-clear - Emitted when the clear button is activated.\n * @event zn-focus - Emitted when the control gains focus.\n * @event zn-input - Emitted when the control receives input.\n * @event zn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @slot label - The input's label. Alternatively, you can use the `label` attribute.\n * @slot 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 * @slot context-note - Used to add contextual text that is displayed above the input, on the right. Alternatively, you can use the `context-note` attribute. Range inputs display their live value here unless this is set.\n * @slot prefix - Used to prepend a presentational icon or similar element to the input.\n * @slot suffix - Used to append a presentational icon or similar element to the input.\n * @slot clear-icon - An icon to use in lieu of the default clear icon.\n * @slot show-password-icon - An icon to use in lieu of the default show password icon.\n * @slot hide-password-icon - An icon to use in lieu of the default hide password icon.\n * @slot help-text - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.\n * @slot slash-items - `<zn-slash-item>` elements describing the insertions offered by the slash menu. Items are\n * picked up wherever they sit inside the input, so this slot name is optional.\n * @slot slash-menu - A `<zn-slash-menu>` to use instead of the built-in one, so its heading, sizing and styling can\n * be set in markup. Any `<zn-slash-item>` children of it become the menu's items.\n *\n * @dependency zn-slash-item\n * @dependency zn-slash-menu\n *\n * @event zn-slash-select - Emitted when a slash menu item is chosen. Cancelable — call `preventDefault()` to\n * suppress the insertion and handle the item yourself.\n * @event zn-slash-insert - Emitted after a slash menu item's value has been inserted.\n *\n * @csspart form-control - The form control that wraps the label, input, and help text.\n * @csspart slash-menu - The slash menu shown at the caret.\n * @csspart form-control-label - The label's wrapper.\n * @csspart form-control-input - The input's wrapper.\n * @csspart form-control-help-text - The help text's wrapper.\n * @csspart base - The component's base wrapper.\n * @csspart input - The internal `<input>` control.\n * @csspart prefix - The container that wraps the prefix.\n * @csspart clear-button - The clear button.\n * @csspart password-toggle-button - The password toggle button.\n * @csspart suffix - The container that wraps the suffix.\n *\n * @cssproperty --zn-range-track-height - The height of a range input's track.\n * @cssproperty --zn-range-track-color - The color of a range input's track.\n * @cssproperty --zn-range-thumb-size - The diameter of a range input's thumb.\n * @cssproperty --zn-range-thumb-color - The color of a range input's thumb.\n * @cssproperty --zn-range-thumb-ring-width - The width of the ring drawn around a range input's thumb.\n */",
19474
19732
  "documentation": "https://zinc.style/components/input",
19475
19733
  "status": "experimental",
19476
19734
  "since": "1.0",
19477
19735
  "dependencies": [
19478
19736
  "zn-icon",
19479
- "zn-tooltip"
19737
+ "zn-tooltip",
19738
+ "zn-slash-item",
19739
+ "zn-slash-menu"
19480
19740
  ]
19481
19741
  }
19482
19742
  ],
@@ -32634,6 +32894,10 @@
32634
32894
  "description": "The always-visible block-insert toolbar.",
32635
32895
  "name": "toolbar"
32636
32896
  },
32897
+ {
32898
+ "description": "The button that switches between the block view and the raw source view.",
32899
+ "name": "raw-toggle"
32900
+ },
32637
32901
  {
32638
32902
  "description": "A rendered block wrapper.",
32639
32903
  "name": "block"
@@ -32647,7 +32911,11 @@
32647
32911
  "name": "input"
32648
32912
  },
32649
32913
  {
32650
- "description": "The context menu opened by typing \"/\" in a block.",
32914
+ "description": "The full-document textarea shown in raw source mode.",
32915
+ "name": "raw"
32916
+ },
32917
+ {
32918
+ "description": "The `zn-slash-menu` opened by typing \"/\" in an empty block.",
32651
32919
  "name": "slash-menu"
32652
32920
  },
32653
32921
  {
@@ -32656,6 +32924,15 @@
32656
32924
  }
32657
32925
  ],
32658
32926
  "members": [
32927
+ {
32928
+ "kind": "field",
32929
+ "name": "dependencies",
32930
+ "type": {
32931
+ "text": "object"
32932
+ },
32933
+ "static": true,
32934
+ "default": "{ 'zn-slash-menu': ZnSlashMenu }"
32935
+ },
32659
32936
  {
32660
32937
  "kind": "field",
32661
32938
  "name": "formControlController",
@@ -32663,6 +32940,13 @@
32663
32940
  "readonly": true,
32664
32941
  "default": "new FormControlController(this, { assumeInteractionOn: ['zn-input', 'zn-change'], })"
32665
32942
  },
32943
+ {
32944
+ "kind": "field",
32945
+ "name": "slashController",
32946
+ "privacy": "private",
32947
+ "readonly": true,
32948
+ "default": "new SlashMenuController(this, { menu: () => this.mountSlashMenu(), // The menu only belongs in a block that is nothing but the slash command — a // block prefix like \"## \" is not valid remarkd part-way through a line. items: () => this.isSlashBlock() ? SLASH_ITEMS : [], onSelect: item => this.handleSlashSelect(item) })"
32949
+ },
32666
32950
  {
32667
32951
  "kind": "field",
32668
32952
  "name": "editingDraft",
@@ -32672,6 +32956,15 @@
32672
32956
  "privacy": "private",
32673
32957
  "default": "''"
32674
32958
  },
32959
+ {
32960
+ "kind": "field",
32961
+ "name": "rawEntryValue",
32962
+ "type": {
32963
+ "text": "string"
32964
+ },
32965
+ "privacy": "private",
32966
+ "default": "''"
32967
+ },
32675
32968
  {
32676
32969
  "kind": "field",
32677
32970
  "name": "suppressValueSync",
@@ -32698,6 +32991,14 @@
32698
32991
  },
32699
32992
  "privacy": "private"
32700
32993
  },
32994
+ {
32995
+ "kind": "field",
32996
+ "name": "slashMenuElement",
32997
+ "type": {
32998
+ "text": "ZnSlashMenu | null"
32999
+ },
33000
+ "privacy": "private"
33001
+ },
32701
33002
  {
32702
33003
  "kind": "field",
32703
33004
  "name": "blocks",
@@ -32718,30 +33019,13 @@
32718
33019
  },
32719
33020
  {
32720
33021
  "kind": "field",
32721
- "name": "slashMenuOpen",
33022
+ "name": "hasSlashMenu",
32722
33023
  "type": {
32723
33024
  "text": "boolean"
32724
33025
  },
32725
33026
  "privacy": "private",
32726
- "default": "false"
32727
- },
32728
- {
32729
- "kind": "field",
32730
- "name": "slashQuery",
32731
- "type": {
32732
- "text": "string"
32733
- },
32734
- "privacy": "private",
32735
- "default": "''"
32736
- },
32737
- {
32738
- "kind": "field",
32739
- "name": "slashActiveIndex",
32740
- "type": {
32741
- "text": "number"
32742
- },
32743
- "privacy": "private",
32744
- "default": "0"
33027
+ "default": "false",
33028
+ "description": "Renders the slash menu only once it has been needed."
32745
33029
  },
32746
33030
  {
32747
33031
  "kind": "field",
@@ -32788,6 +33072,15 @@
32788
33072
  "privacy": "private",
32789
33073
  "default": "''"
32790
33074
  },
33075
+ {
33076
+ "kind": "field",
33077
+ "name": "rawMode",
33078
+ "type": {
33079
+ "text": "boolean"
33080
+ },
33081
+ "privacy": "private",
33082
+ "default": "false"
33083
+ },
32791
33084
  {
32792
33085
  "kind": "field",
32793
33086
  "name": "pendingDragHandle",
@@ -32873,6 +33166,17 @@
32873
33166
  "description": "Endpoint for image uploads — required for image support. Posting the file\nmetadata here must return `{uploadPath, uploadUrl}`; the file is then PUT\nto `uploadUrl` and the returned `uploadPath` is embedded as the image URL.",
32874
33167
  "attribute": "attachment-url"
32875
33168
  },
33169
+ {
33170
+ "kind": "field",
33171
+ "name": "allowRaw",
33172
+ "type": {
33173
+ "text": "boolean"
33174
+ },
33175
+ "default": "false",
33176
+ "description": "Adds a toolbar toggle that swaps the block view for the full remarkd source.",
33177
+ "attribute": "allow-raw",
33178
+ "reflects": true
33179
+ },
32876
33180
  {
32877
33181
  "kind": "field",
32878
33182
  "name": "required",
@@ -32974,7 +33278,7 @@
32974
33278
  {
32975
33279
  "kind": "method",
32976
33280
  "name": "blur",
32977
- "description": "Commits any in-progress block edit."
33281
+ "description": "Commits any in-progress block or raw edit."
32978
33282
  },
32979
33283
  {
32980
33284
  "kind": "method",
@@ -33273,15 +33577,6 @@
33273
33577
  "privacy": "private",
33274
33578
  "description": "Commits the in-progress edit; returns the index after the committed parts."
33275
33579
  },
33276
- {
33277
- "kind": "field",
33278
- "name": "filteredSlashItems",
33279
- "type": {
33280
- "text": "BlockType[]"
33281
- },
33282
- "privacy": "private",
33283
- "readonly": true
33284
- },
33285
33580
  {
33286
33581
  "kind": "field",
33287
33582
  "name": "handleDraftInput",
@@ -33294,21 +33589,48 @@
33294
33589
  },
33295
33590
  {
33296
33591
  "kind": "method",
33297
- "name": "applySlashItem",
33592
+ "name": "isSlashBlock",
33298
33593
  "privacy": "private",
33299
- "parameters": [
33300
- {
33301
- "name": "item",
33302
- "type": {
33303
- "text": "BlockType"
33304
- }
33594
+ "return": {
33595
+ "type": {
33596
+ "text": "boolean"
33305
33597
  }
33306
- ]
33307
- },
33308
- {
33309
- "kind": "field",
33310
- "name": "handleEditPaste",
33311
- "privacy": "private"
33598
+ },
33599
+ "description": "Whether the block being edited is nothing but the slash command."
33600
+ },
33601
+ {
33602
+ "kind": "method",
33603
+ "name": "mountSlashMenu",
33604
+ "privacy": "private",
33605
+ "return": {
33606
+ "type": {
33607
+ "text": "Promise<ZnSlashMenu | null>"
33608
+ }
33609
+ }
33610
+ },
33611
+ {
33612
+ "kind": "method",
33613
+ "name": "handleSlashSelect",
33614
+ "privacy": "private",
33615
+ "return": {
33616
+ "type": {
33617
+ "text": "boolean"
33618
+ }
33619
+ },
33620
+ "parameters": [
33621
+ {
33622
+ "name": "item",
33623
+ "type": {
33624
+ "text": "SlashMenuItem"
33625
+ }
33626
+ }
33627
+ ],
33628
+ "description": "Returns false for items the controller should not insert text for."
33629
+ },
33630
+ {
33631
+ "kind": "field",
33632
+ "name": "handleEditPaste",
33633
+ "privacy": "private"
33312
33634
  },
33313
33635
  {
33314
33636
  "kind": "field",
@@ -33464,6 +33786,28 @@
33464
33786
  }
33465
33787
  ]
33466
33788
  },
33789
+ {
33790
+ "kind": "field",
33791
+ "name": "toggleRawMode",
33792
+ "privacy": "private"
33793
+ },
33794
+ {
33795
+ "kind": "method",
33796
+ "name": "focusRaw",
33797
+ "privacy": "private"
33798
+ },
33799
+ {
33800
+ "kind": "field",
33801
+ "name": "handleRawInput",
33802
+ "privacy": "private",
33803
+ "description": "Raw mode keeps the whole document in one textarea, so the textarea — not\nthe block list — is authoritative while it is open: re-splitting on every\nkeystroke would normalise blank lines out from under the cursor."
33804
+ },
33805
+ {
33806
+ "kind": "field",
33807
+ "name": "commitRaw",
33808
+ "privacy": "private",
33809
+ "description": "Re-splits the raw source into blocks. Not `updateBlocks` — that only\nreports a change when the re-join differs from the value, and raw edits\nhave already written straight to the value."
33810
+ },
33467
33811
  {
33468
33812
  "kind": "method",
33469
33813
  "name": "handleToolbarInsert",
@@ -33477,11 +33821,6 @@
33477
33821
  }
33478
33822
  ]
33479
33823
  },
33480
- {
33481
- "kind": "method",
33482
- "name": "renderSlashMenu",
33483
- "privacy": "private"
33484
- },
33485
33824
  {
33486
33825
  "kind": "method",
33487
33826
  "name": "renderImageControls",
@@ -33506,6 +33845,11 @@
33506
33845
  }
33507
33846
  ]
33508
33847
  },
33848
+ {
33849
+ "kind": "method",
33850
+ "name": "renderRaw",
33851
+ "privacy": "private"
33852
+ },
33509
33853
  {
33510
33854
  "kind": "method",
33511
33855
  "name": "renderBody",
@@ -33565,6 +33909,15 @@
33565
33909
  "description": "Endpoint for image uploads — required for image support. Posting the file\nmetadata here must return `{uploadPath, uploadUrl}`; the file is then PUT\nto `uploadUrl` and the returned `uploadPath` is embedded as the image URL.",
33566
33910
  "fieldName": "attachmentUrl"
33567
33911
  },
33912
+ {
33913
+ "name": "allow-raw",
33914
+ "type": {
33915
+ "text": "boolean"
33916
+ },
33917
+ "default": "false",
33918
+ "description": "Adds a toolbar toggle that swaps the block view for the full remarkd source.",
33919
+ "fieldName": "allowRaw"
33920
+ },
33568
33921
  {
33569
33922
  "name": "required",
33570
33923
  "type": {
@@ -33601,7 +33954,7 @@
33601
33954
  "tagNameWithoutPrefix": "remarkd-editor",
33602
33955
  "tagName": "zn-remarkd-editor",
33603
33956
  "customElement": true,
33604
- "jsDoc": "/**\n * @summary A Notion-style block editor for remarkd content. Blocks render inline; click one to edit its source.\n * @documentation https://zinc.style/components/remarkd-editor\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-button\n * @dependency zn-button-group\n * @dependency zn-icon\n * @dependency zn-file\n *\n * @event zn-input - Emitted on each keystroke while editing a block.\n * @event zn-change - Emitted when a block edit is committed and the value changes.\n *\n * @csspart base - The component's base wrapper.\n * @csspart toolbar - The always-visible block-insert toolbar.\n * @csspart block - A rendered block wrapper.\n * @csspart rendered - The rendered remarkd output of a block.\n * @csspart input - The textarea shown while editing a block.\n * @csspart slash-menu - The context menu opened by typing \"/\" in a block.\n * @csspart image-controls - The caption / alignment / size panel shown when an image block is clicked.\n */",
33957
+ "jsDoc": "/**\n * @summary A Notion-style block editor for remarkd content. Blocks render inline; click one to edit its source.\n * @documentation https://zinc.style/components/remarkd-editor\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-button\n * @dependency zn-button-group\n * @dependency zn-icon\n * @dependency zn-file\n * @dependency zn-slash-menu\n *\n * @event zn-input - Emitted on each keystroke while editing a block.\n * @event zn-change - Emitted when a block edit is committed and the value changes.\n *\n * @csspart base - The component's base wrapper.\n * @csspart toolbar - The always-visible block-insert toolbar.\n * @csspart raw-toggle - The button that switches between the block view and the raw source view.\n * @csspart block - A rendered block wrapper.\n * @csspart rendered - The rendered remarkd output of a block.\n * @csspart input - The textarea shown while editing a block.\n * @csspart raw - The full-document textarea shown in raw source mode.\n * @csspart slash-menu - The `zn-slash-menu` opened by typing \"/\" in an empty block.\n * @csspart image-controls - The caption / alignment / size panel shown when an image block is clicked.\n */",
33605
33958
  "documentation": "https://zinc.style/components/remarkd-editor",
33606
33959
  "status": "experimental",
33607
33960
  "since": "1.0",
@@ -33609,7 +33962,8 @@
33609
33962
  "zn-button",
33610
33963
  "zn-button-group",
33611
33964
  "zn-icon",
33612
- "zn-file"
33965
+ "zn-file",
33966
+ "zn-slash-menu"
33613
33967
  ]
33614
33968
  }
33615
33969
  ],
@@ -36115,105 +36469,769 @@
36115
36469
  "name": "ZnSkeleton",
36116
36470
  "members": [
36117
36471
  {
36118
- "kind": "field",
36119
- "name": "speed",
36472
+ "kind": "field",
36473
+ "name": "speed",
36474
+ "type": {
36475
+ "text": "string"
36476
+ },
36477
+ "default": "'3s'",
36478
+ "description": "Animation speed for the shimmer effect. Default: \"3s\"",
36479
+ "attribute": "speed"
36480
+ },
36481
+ {
36482
+ "kind": "field",
36483
+ "name": "width",
36484
+ "type": {
36485
+ "text": "string"
36486
+ },
36487
+ "default": "'100%'",
36488
+ "description": "Width of the skeleton element. Default: \"100%\"",
36489
+ "attribute": "width"
36490
+ },
36491
+ {
36492
+ "kind": "field",
36493
+ "name": "height",
36494
+ "type": {
36495
+ "text": "string"
36496
+ },
36497
+ "default": "'20px'",
36498
+ "description": "Height of the skeleton element. Default: \"20px\"",
36499
+ "attribute": "height"
36500
+ },
36501
+ {
36502
+ "kind": "field",
36503
+ "name": "radius",
36504
+ "type": {
36505
+ "text": "string"
36506
+ },
36507
+ "default": "'4px'",
36508
+ "description": "Border radius of the skeleton element. Default: \"4px\"",
36509
+ "attribute": "radius"
36510
+ }
36511
+ ],
36512
+ "attributes": [
36513
+ {
36514
+ "name": "speed",
36515
+ "type": {
36516
+ "text": "string"
36517
+ },
36518
+ "default": "'3s'",
36519
+ "description": "Animation speed for the shimmer effect. Default: \"3s\"",
36520
+ "fieldName": "speed"
36521
+ },
36522
+ {
36523
+ "name": "width",
36524
+ "type": {
36525
+ "text": "string"
36526
+ },
36527
+ "default": "'100%'",
36528
+ "description": "Width of the skeleton element. Default: \"100%\"",
36529
+ "fieldName": "width"
36530
+ },
36531
+ {
36532
+ "name": "height",
36533
+ "type": {
36534
+ "text": "string"
36535
+ },
36536
+ "default": "'20px'",
36537
+ "description": "Height of the skeleton element. Default: \"20px\"",
36538
+ "fieldName": "height"
36539
+ },
36540
+ {
36541
+ "name": "radius",
36542
+ "type": {
36543
+ "text": "string"
36544
+ },
36545
+ "default": "'4px'",
36546
+ "description": "Border radius of the skeleton element. Default: \"4px\"",
36547
+ "fieldName": "radius"
36548
+ }
36549
+ ],
36550
+ "superclass": {
36551
+ "name": "ZincElement",
36552
+ "module": "/src/internal/zinc-element"
36553
+ },
36554
+ "summary": "Skeleton loaders provide visual placeholders while content is loading, improving perceived performance and user experience.",
36555
+ "tagNameWithoutPrefix": "skeleton",
36556
+ "tagName": "zn-skeleton",
36557
+ "customElement": true,
36558
+ "jsDoc": "/**\n * @summary Skeleton loaders provide visual placeholders while content is loading, improving perceived performance and user experience.\n * @documentation https://zinc.style/components/skeleton\n * @status experimental\n * @since 1.0\n *\n * @property {string} speed - Animation speed for the shimmer effect. Default: \"3s\"\n * @property {string} width - Width of the skeleton element. Default: \"100%\"\n * @property {string} height - Height of the skeleton element. Default: \"20px\"\n * @property {string} radius - Border radius of the skeleton element. Default: \"4px\"\n */",
36559
+ "documentation": "https://zinc.style/components/skeleton",
36560
+ "status": "experimental",
36561
+ "since": "1.0"
36562
+ }
36563
+ ],
36564
+ "exports": [
36565
+ {
36566
+ "kind": "js",
36567
+ "name": "default",
36568
+ "declaration": {
36569
+ "name": "ZnSkeleton",
36570
+ "module": "components/skeleton/skeleton.js"
36571
+ }
36572
+ }
36573
+ ]
36574
+ },
36575
+ {
36576
+ "kind": "javascript-module",
36577
+ "path": "components/slash-item/slash-item.js",
36578
+ "declarations": [
36579
+ {
36580
+ "kind": "class",
36581
+ "description": "",
36582
+ "name": "ZnSlashItem",
36583
+ "slots": [
36584
+ {
36585
+ "description": "The text to insert, for values that are long or span multiple lines. Ignored when the `value` attribute is set.",
36586
+ "name": ""
36587
+ }
36588
+ ],
36589
+ "members": [
36590
+ {
36591
+ "kind": "field",
36592
+ "name": "label",
36593
+ "type": {
36594
+ "text": "string"
36595
+ },
36596
+ "default": "''",
36597
+ "description": "The text shown in the menu.",
36598
+ "attribute": "label"
36599
+ },
36600
+ {
36601
+ "kind": "field",
36602
+ "name": "value",
36603
+ "type": {
36604
+ "text": "string"
36605
+ },
36606
+ "description": "The text inserted into the field. Falls back to this element's text content.",
36607
+ "attribute": "value"
36608
+ },
36609
+ {
36610
+ "kind": "field",
36611
+ "name": "icon",
36612
+ "type": {
36613
+ "text": "string"
36614
+ },
36615
+ "description": "Icon shown against the item, e.g. `tag@lu`.",
36616
+ "attribute": "icon"
36617
+ },
36618
+ {
36619
+ "kind": "field",
36620
+ "name": "description",
36621
+ "type": {
36622
+ "text": "string"
36623
+ },
36624
+ "description": "Supporting text shown under the label.",
36625
+ "attribute": "description"
36626
+ },
36627
+ {
36628
+ "kind": "field",
36629
+ "name": "keywords",
36630
+ "type": {
36631
+ "text": "string"
36632
+ },
36633
+ "description": "Extra terms the item can be found by, comma separated.",
36634
+ "attribute": "keywords"
36635
+ },
36636
+ {
36637
+ "kind": "field",
36638
+ "name": "group",
36639
+ "type": {
36640
+ "text": "string"
36641
+ },
36642
+ "description": "Heading the item is listed under.",
36643
+ "attribute": "group"
36644
+ },
36645
+ {
36646
+ "kind": "field",
36647
+ "name": "order",
36648
+ "type": {
36649
+ "text": "number"
36650
+ },
36651
+ "description": "Overrides the item's position in the menu. Lower sorts first.",
36652
+ "attribute": "order"
36653
+ },
36654
+ {
36655
+ "kind": "field",
36656
+ "name": "caretOffset",
36657
+ "type": {
36658
+ "text": "number"
36659
+ },
36660
+ "description": "Where the caret lands after insertion, as an offset into the inserted value.",
36661
+ "attribute": "caret-offset"
36662
+ },
36663
+ {
36664
+ "kind": "field",
36665
+ "name": "action",
36666
+ "type": {
36667
+ "text": "string"
36668
+ },
36669
+ "description": "Identifier passed through on `zn-slash-select`, for items that do something other than insert.",
36670
+ "attribute": "action"
36671
+ },
36672
+ {
36673
+ "kind": "field",
36674
+ "name": "disabled",
36675
+ "type": {
36676
+ "text": "boolean"
36677
+ },
36678
+ "default": "false",
36679
+ "description": "Listed, but not selectable.",
36680
+ "attribute": "disabled",
36681
+ "reflects": true
36682
+ },
36683
+ {
36684
+ "kind": "method",
36685
+ "name": "toSlashMenuItem",
36686
+ "return": {
36687
+ "type": {
36688
+ "text": "SlashMenuItem"
36689
+ }
36690
+ },
36691
+ "description": "The item as the slash menu consumes it."
36692
+ },
36693
+ {
36694
+ "kind": "field",
36695
+ "name": "insertValue",
36696
+ "type": {
36697
+ "text": "string"
36698
+ },
36699
+ "privacy": "private",
36700
+ "readonly": true
36701
+ }
36702
+ ],
36703
+ "attributes": [
36704
+ {
36705
+ "name": "label",
36706
+ "type": {
36707
+ "text": "string"
36708
+ },
36709
+ "default": "''",
36710
+ "description": "The text shown in the menu.",
36711
+ "fieldName": "label"
36712
+ },
36713
+ {
36714
+ "name": "value",
36715
+ "type": {
36716
+ "text": "string"
36717
+ },
36718
+ "description": "The text inserted into the field. Falls back to this element's text content.",
36719
+ "fieldName": "value"
36720
+ },
36721
+ {
36722
+ "name": "icon",
36723
+ "type": {
36724
+ "text": "string"
36725
+ },
36726
+ "description": "Icon shown against the item, e.g. `tag@lu`.",
36727
+ "fieldName": "icon"
36728
+ },
36729
+ {
36730
+ "name": "description",
36731
+ "type": {
36732
+ "text": "string"
36733
+ },
36734
+ "description": "Supporting text shown under the label.",
36735
+ "fieldName": "description"
36736
+ },
36737
+ {
36738
+ "name": "keywords",
36739
+ "type": {
36740
+ "text": "string"
36741
+ },
36742
+ "description": "Extra terms the item can be found by, comma separated.",
36743
+ "fieldName": "keywords"
36744
+ },
36745
+ {
36746
+ "name": "group",
36747
+ "type": {
36748
+ "text": "string"
36749
+ },
36750
+ "description": "Heading the item is listed under.",
36751
+ "fieldName": "group"
36752
+ },
36753
+ {
36754
+ "name": "order",
36755
+ "type": {
36756
+ "text": "number"
36757
+ },
36758
+ "description": "Overrides the item's position in the menu. Lower sorts first.",
36759
+ "fieldName": "order"
36760
+ },
36761
+ {
36762
+ "name": "caret-offset",
36763
+ "type": {
36764
+ "text": "number"
36765
+ },
36766
+ "description": "Where the caret lands after insertion, as an offset into the inserted value.",
36767
+ "fieldName": "caretOffset"
36768
+ },
36769
+ {
36770
+ "name": "action",
36771
+ "type": {
36772
+ "text": "string"
36773
+ },
36774
+ "description": "Identifier passed through on `zn-slash-select`, for items that do something other than insert.",
36775
+ "fieldName": "action"
36776
+ },
36777
+ {
36778
+ "name": "disabled",
36779
+ "type": {
36780
+ "text": "boolean"
36781
+ },
36782
+ "default": "false",
36783
+ "description": "Listed, but not selectable.",
36784
+ "fieldName": "disabled"
36785
+ }
36786
+ ],
36787
+ "superclass": {
36788
+ "name": "ZincElement",
36789
+ "module": "/src/internal/zinc-element"
36790
+ },
36791
+ "summary": "Declares a single insertion for a slash menu. Renders nothing itself — it describes an\nentry for the component it is slotted into, e.g. `<zn-textarea>`'s `slash-items` slot.",
36792
+ "tagNameWithoutPrefix": "slash-item",
36793
+ "tagName": "zn-slash-item",
36794
+ "customElement": true,
36795
+ "jsDoc": "/**\n * @summary Declares a single insertion for a slash menu. Renders nothing itself — it describes an\n * entry for the component it is slotted into, e.g. `<zn-textarea>`'s `slash-items` slot.\n * @documentation https://zinc.style/components/slash-item\n * @status experimental\n * @since 1.1\n *\n * @slot - The text to insert, for values that are long or span multiple lines. Ignored when the\n * `value` attribute is set.\n */",
36796
+ "documentation": "https://zinc.style/components/slash-item",
36797
+ "status": "experimental",
36798
+ "since": "1.1"
36799
+ }
36800
+ ],
36801
+ "exports": [
36802
+ {
36803
+ "kind": "js",
36804
+ "name": "default",
36805
+ "declaration": {
36806
+ "name": "ZnSlashItem",
36807
+ "module": "components/slash-item/slash-item.js"
36808
+ }
36809
+ }
36810
+ ]
36811
+ },
36812
+ {
36813
+ "kind": "javascript-module",
36814
+ "path": "components/slash-menu/slash-menu.js",
36815
+ "declarations": [
36816
+ {
36817
+ "kind": "variable",
36818
+ "name": "SLASH_ITEM_SELECT",
36819
+ "type": {
36820
+ "text": "string"
36821
+ },
36822
+ "default": "'zn-slash-item-select'"
36823
+ },
36824
+ {
36825
+ "kind": "class",
36826
+ "description": "",
36827
+ "name": "ZnSlashMenu",
36828
+ "cssProperties": [
36829
+ {
36830
+ "description": "The width of the panel.",
36831
+ "name": "--slash-menu-width"
36832
+ },
36833
+ {
36834
+ "description": "The maximum height of the panel before it scrolls.",
36835
+ "name": "--slash-menu-max-height"
36836
+ }
36837
+ ],
36838
+ "cssParts": [
36839
+ {
36840
+ "description": "The floating panel that holds the list.",
36841
+ "name": "panel"
36842
+ },
36843
+ {
36844
+ "description": "The panel's heading.",
36845
+ "name": "heading"
36846
+ },
36847
+ {
36848
+ "description": "An item in the list.",
36849
+ "name": "item"
36850
+ },
36851
+ {
36852
+ "description": "A group heading between items.",
36853
+ "name": "group-heading"
36854
+ },
36855
+ {
36856
+ "description": "The truncation footer, shown when not every match fits.",
36857
+ "name": "footer"
36858
+ }
36859
+ ],
36860
+ "members": [
36861
+ {
36862
+ "kind": "field",
36863
+ "name": "dependencies",
36864
+ "type": {
36865
+ "text": "object"
36866
+ },
36867
+ "static": true,
36868
+ "default": "{ 'zn-icon': ZnIcon }"
36869
+ },
36870
+ {
36871
+ "kind": "field",
36872
+ "name": "panel",
36873
+ "type": {
36874
+ "text": "HTMLElement"
36875
+ },
36876
+ "privacy": "private"
36877
+ },
36878
+ {
36879
+ "kind": "field",
36880
+ "name": "stopAutoUpdate",
36881
+ "type": {
36882
+ "text": "() => void | undefined"
36883
+ },
36884
+ "privacy": "private"
36885
+ },
36886
+ {
36887
+ "kind": "field",
36888
+ "name": "open",
36889
+ "type": {
36890
+ "text": "boolean"
36891
+ },
36892
+ "default": "false",
36893
+ "description": "Whether the menu is showing.",
36894
+ "attribute": "open",
36895
+ "reflects": true
36896
+ },
36897
+ {
36898
+ "kind": "field",
36899
+ "name": "items",
36900
+ "type": {
36901
+ "text": "SlashMenuItem[]"
36902
+ },
36903
+ "default": "[]",
36904
+ "description": "The items to list. Already filtered — the menu displays what it is given.",
36905
+ "attribute": "items"
36906
+ },
36907
+ {
36908
+ "kind": "field",
36909
+ "name": "query",
36910
+ "type": {
36911
+ "text": "string"
36912
+ },
36913
+ "default": "''",
36914
+ "description": "The query the items were matched against, shown in the heading.",
36915
+ "attribute": "query"
36916
+ },
36917
+ {
36918
+ "kind": "field",
36919
+ "name": "heading",
36920
+ "type": {
36921
+ "text": "string"
36922
+ },
36923
+ "default": "'Insert'",
36924
+ "description": "The heading shown when there is no query.",
36925
+ "attribute": "heading"
36926
+ },
36927
+ {
36928
+ "kind": "field",
36929
+ "name": "emptyText",
36930
+ "type": {
36931
+ "text": "string"
36932
+ },
36933
+ "default": "'No matches'",
36934
+ "description": "Shown in place of the list when there are no items.",
36935
+ "attribute": "empty-text"
36936
+ },
36937
+ {
36938
+ "kind": "field",
36939
+ "name": "maxItems",
36940
+ "type": {
36941
+ "text": "number"
36942
+ },
36943
+ "default": "25",
36944
+ "description": "The most items to render at once. Remaining matches are reported in the footer.",
36945
+ "attribute": "max-items"
36946
+ },
36947
+ {
36948
+ "kind": "field",
36949
+ "name": "anchor",
36950
+ "type": {
36951
+ "text": "Element | VirtualElement | null"
36952
+ },
36953
+ "default": "null",
36954
+ "description": "The element or caret rect the panel is positioned against."
36955
+ },
36956
+ {
36957
+ "kind": "field",
36958
+ "name": "placement",
36959
+ "type": {
36960
+ "text": "Placement"
36961
+ },
36962
+ "default": "'bottom-start'",
36963
+ "description": "The preferred placement of the panel.",
36964
+ "attribute": "placement"
36965
+ },
36966
+ {
36967
+ "kind": "field",
36968
+ "name": "distance",
36969
+ "type": {
36970
+ "text": "number"
36971
+ },
36972
+ "default": "4",
36973
+ "description": "The gap between the caret and the panel.",
36974
+ "attribute": "distance"
36975
+ },
36976
+ {
36977
+ "kind": "field",
36978
+ "name": "activeIndex",
36979
+ "type": {
36980
+ "text": "number"
36981
+ },
36982
+ "privacy": "private",
36983
+ "default": "0"
36984
+ },
36985
+ {
36986
+ "kind": "field",
36987
+ "name": "visibleItems",
36988
+ "type": {
36989
+ "text": "SlashMenuItem[]"
36990
+ },
36991
+ "privacy": "private",
36992
+ "readonly": true
36993
+ },
36994
+ {
36995
+ "kind": "field",
36996
+ "name": "activeItem",
36997
+ "type": {
36998
+ "text": "SlashMenuItem | undefined"
36999
+ },
37000
+ "description": "The item that Enter would insert.",
37001
+ "readonly": true
37002
+ },
37003
+ {
37004
+ "kind": "method",
37005
+ "name": "show"
37006
+ },
37007
+ {
37008
+ "kind": "method",
37009
+ "name": "hide"
37010
+ },
37011
+ {
37012
+ "kind": "method",
37013
+ "name": "setActiveIndex",
37014
+ "parameters": [
37015
+ {
37016
+ "name": "index",
37017
+ "type": {
37018
+ "text": "number"
37019
+ }
37020
+ }
37021
+ ],
37022
+ "description": "Sets the active item by index, wrapping at both ends and skipping disabled items."
37023
+ },
37024
+ {
37025
+ "kind": "method",
37026
+ "name": "moveActive",
37027
+ "parameters": [
37028
+ {
37029
+ "name": "delta",
37030
+ "type": {
37031
+ "text": "number"
37032
+ }
37033
+ }
37034
+ ],
37035
+ "description": "Moves the active item by `delta` places."
37036
+ },
37037
+ {
37038
+ "kind": "method",
37039
+ "name": "selectActive",
37040
+ "description": "Chooses the active item, as pressing Enter would."
37041
+ },
37042
+ {
37043
+ "kind": "method",
37044
+ "name": "reposition",
37045
+ "description": "Recalculates the panel's position against its anchor."
37046
+ },
37047
+ {
37048
+ "kind": "method",
37049
+ "name": "startPositioner",
37050
+ "privacy": "private"
37051
+ },
37052
+ {
37053
+ "kind": "method",
37054
+ "name": "stopPositioner",
37055
+ "privacy": "private"
37056
+ },
37057
+ {
37058
+ "kind": "method",
37059
+ "name": "position",
37060
+ "privacy": "private"
37061
+ },
37062
+ {
37063
+ "kind": "method",
37064
+ "name": "selectItem",
37065
+ "privacy": "private",
37066
+ "parameters": [
37067
+ {
37068
+ "name": "item",
37069
+ "type": {
37070
+ "text": "SlashMenuItem"
37071
+ }
37072
+ }
37073
+ ]
37074
+ },
37075
+ {
37076
+ "kind": "method",
37077
+ "name": "scrollActiveIntoView",
37078
+ "privacy": "private"
37079
+ },
37080
+ {
37081
+ "kind": "field",
37082
+ "name": "handleItemMouseDown",
37083
+ "privacy": "private",
37084
+ "readonly": true
37085
+ },
37086
+ {
37087
+ "kind": "method",
37088
+ "name": "renderItem",
37089
+ "privacy": "private",
37090
+ "parameters": [
37091
+ {
37092
+ "name": "item",
37093
+ "type": {
37094
+ "text": "SlashMenuItem"
37095
+ }
37096
+ },
37097
+ {
37098
+ "name": "index",
37099
+ "type": {
37100
+ "text": "number"
37101
+ }
37102
+ },
37103
+ {
37104
+ "name": "showIcons",
37105
+ "type": {
37106
+ "text": "boolean"
37107
+ }
37108
+ }
37109
+ ]
37110
+ },
37111
+ {
37112
+ "kind": "method",
37113
+ "name": "renderItems",
37114
+ "privacy": "private"
37115
+ }
37116
+ ],
37117
+ "events": [
37118
+ {
37119
+ "name": "SLASH_ITEM_SELECT",
37120
+ "type": {
37121
+ "text": "CustomEvent"
37122
+ }
37123
+ },
37124
+ {
37125
+ "description": "Emitted when an item is chosen. Does not cross shadow boundaries; the component driving the menu (e.g. `zn-textarea`) re-emits it as `zn-slash-select`.",
37126
+ "name": "zn-slash-item-select"
37127
+ }
37128
+ ],
37129
+ "attributes": [
37130
+ {
37131
+ "name": "open",
36120
37132
  "type": {
36121
- "text": "string"
37133
+ "text": "boolean"
36122
37134
  },
36123
- "default": "'3s'",
36124
- "description": "Animation speed for the shimmer effect. Default: \"3s\"",
36125
- "attribute": "speed"
37135
+ "default": "false",
37136
+ "description": "Whether the menu is showing.",
37137
+ "fieldName": "open"
36126
37138
  },
36127
37139
  {
36128
- "kind": "field",
36129
- "name": "width",
37140
+ "name": "items",
36130
37141
  "type": {
36131
- "text": "string"
37142
+ "text": "SlashMenuItem[]"
36132
37143
  },
36133
- "default": "'100%'",
36134
- "description": "Width of the skeleton element. Default: \"100%\"",
36135
- "attribute": "width"
37144
+ "default": "[]",
37145
+ "description": "The items to list. Already filtered — the menu displays what it is given.",
37146
+ "fieldName": "items"
36136
37147
  },
36137
37148
  {
36138
- "kind": "field",
36139
- "name": "height",
37149
+ "name": "query",
36140
37150
  "type": {
36141
37151
  "text": "string"
36142
37152
  },
36143
- "default": "'20px'",
36144
- "description": "Height of the skeleton element. Default: \"20px\"",
36145
- "attribute": "height"
37153
+ "default": "''",
37154
+ "description": "The query the items were matched against, shown in the heading.",
37155
+ "fieldName": "query"
36146
37156
  },
36147
37157
  {
36148
- "kind": "field",
36149
- "name": "radius",
37158
+ "name": "heading",
36150
37159
  "type": {
36151
37160
  "text": "string"
36152
37161
  },
36153
- "default": "'4px'",
36154
- "description": "Border radius of the skeleton element. Default: \"4px\"",
36155
- "attribute": "radius"
36156
- }
36157
- ],
36158
- "attributes": [
37162
+ "default": "'Insert'",
37163
+ "description": "The heading shown when there is no query.",
37164
+ "fieldName": "heading"
37165
+ },
36159
37166
  {
36160
- "name": "speed",
37167
+ "name": "empty-text",
36161
37168
  "type": {
36162
37169
  "text": "string"
36163
37170
  },
36164
- "default": "'3s'",
36165
- "description": "Animation speed for the shimmer effect. Default: \"3s\"",
36166
- "fieldName": "speed"
37171
+ "default": "'No matches'",
37172
+ "description": "Shown in place of the list when there are no items.",
37173
+ "fieldName": "emptyText"
36167
37174
  },
36168
37175
  {
36169
- "name": "width",
37176
+ "name": "max-items",
36170
37177
  "type": {
36171
- "text": "string"
37178
+ "text": "number"
36172
37179
  },
36173
- "default": "'100%'",
36174
- "description": "Width of the skeleton element. Default: \"100%\"",
36175
- "fieldName": "width"
37180
+ "default": "25",
37181
+ "description": "The most items to render at once. Remaining matches are reported in the footer.",
37182
+ "fieldName": "maxItems"
36176
37183
  },
36177
37184
  {
36178
- "name": "height",
37185
+ "name": "placement",
36179
37186
  "type": {
36180
- "text": "string"
37187
+ "text": "Placement"
36181
37188
  },
36182
- "default": "'20px'",
36183
- "description": "Height of the skeleton element. Default: \"20px\"",
36184
- "fieldName": "height"
37189
+ "default": "'bottom-start'",
37190
+ "description": "The preferred placement of the panel.",
37191
+ "fieldName": "placement"
36185
37192
  },
36186
37193
  {
36187
- "name": "radius",
37194
+ "name": "distance",
36188
37195
  "type": {
36189
- "text": "string"
37196
+ "text": "number"
36190
37197
  },
36191
- "default": "'4px'",
36192
- "description": "Border radius of the skeleton element. Default: \"4px\"",
36193
- "fieldName": "radius"
37198
+ "default": "4",
37199
+ "description": "The gap between the caret and the panel.",
37200
+ "fieldName": "distance"
36194
37201
  }
36195
37202
  ],
36196
37203
  "superclass": {
36197
37204
  "name": "ZincElement",
36198
37205
  "module": "/src/internal/zinc-element"
36199
37206
  },
36200
- "summary": "Skeleton loaders provide visual placeholders while content is loading, improving perceived performance and user experience.",
36201
- "tagNameWithoutPrefix": "skeleton",
36202
- "tagName": "zn-skeleton",
37207
+ "summary": "A keyboard-driven list of insertions, anchored to the caret of the field that opened it.",
37208
+ "tagNameWithoutPrefix": "slash-menu",
37209
+ "tagName": "zn-slash-menu",
36203
37210
  "customElement": true,
36204
- "jsDoc": "/**\n * @summary Skeleton loaders provide visual placeholders while content is loading, improving perceived performance and user experience.\n * @documentation https://zinc.style/components/skeleton\n * @status experimental\n * @since 1.0\n *\n * @property {string} speed - Animation speed for the shimmer effect. Default: \"3s\"\n * @property {string} width - Width of the skeleton element. Default: \"100%\"\n * @property {string} height - Height of the skeleton element. Default: \"20px\"\n * @property {string} radius - Border radius of the skeleton element. Default: \"4px\"\n */",
36205
- "documentation": "https://zinc.style/components/skeleton",
37211
+ "jsDoc": "/**\n * @summary A keyboard-driven list of insertions, anchored to the caret of the field that opened it.\n * @documentation https://zinc.style/components/slash-menu\n * @status experimental\n * @since 1.1\n *\n * @dependency zn-icon\n *\n * @event zn-slash-item-select - Emitted when an item is chosen. Does not cross shadow boundaries; the\n * component driving the menu (e.g. `zn-textarea`) re-emits it as `zn-slash-select`.\n *\n * @csspart panel - The floating panel that holds the list.\n * @csspart heading - The panel's heading.\n * @csspart item - An item in the list.\n * @csspart group-heading - A group heading between items.\n * @csspart footer - The truncation footer, shown when not every match fits.\n *\n * @cssproperty --slash-menu-width - The width of the panel.\n * @cssproperty --slash-menu-max-height - The maximum height of the panel before it scrolls.\n */",
37212
+ "documentation": "https://zinc.style/components/slash-menu",
36206
37213
  "status": "experimental",
36207
- "since": "1.0"
37214
+ "since": "1.1",
37215
+ "dependencies": [
37216
+ "zn-icon"
37217
+ ]
36208
37218
  }
36209
37219
  ],
36210
37220
  "exports": [
37221
+ {
37222
+ "kind": "js",
37223
+ "name": "SLASH_ITEM_SELECT",
37224
+ "declaration": {
37225
+ "name": "SLASH_ITEM_SELECT",
37226
+ "module": "components/slash-menu/slash-menu.js"
37227
+ }
37228
+ },
36211
37229
  {
36212
37230
  "kind": "js",
36213
37231
  "name": "default",
36214
37232
  "declaration": {
36215
- "name": "ZnSkeleton",
36216
- "module": "components/skeleton/skeleton.js"
37233
+ "name": "ZnSlashMenu",
37234
+ "module": "components/slash-menu/slash-menu.js"
36217
37235
  }
36218
37236
  }
36219
37237
  ]
@@ -39882,6 +40900,10 @@
39882
40900
  {
39883
40901
  "description": "The internal `<textarea>` control.",
39884
40902
  "name": "textarea"
40903
+ },
40904
+ {
40905
+ "description": "The slash menu shown at the caret.",
40906
+ "name": "slash-menu"
39885
40907
  }
39886
40908
  ],
39887
40909
  "slots": [
@@ -39900,9 +40922,26 @@
39900
40922
  {
39901
40923
  "description": "Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.",
39902
40924
  "name": "help-text"
40925
+ },
40926
+ {
40927
+ "description": "`<zn-slash-item>` elements describing the insertions offered by the slash menu. Items are picked up wherever they sit inside the textarea, so this slot name is optional.",
40928
+ "name": "slash-items"
40929
+ },
40930
+ {
40931
+ "description": "A `<zn-slash-menu>` to use instead of the built-in one, so its heading, sizing and styling can be set in markup. Any `<zn-slash-item>` children of it become the menu's items.",
40932
+ "name": "slash-menu"
39903
40933
  }
39904
40934
  ],
39905
40935
  "members": [
40936
+ {
40937
+ "kind": "field",
40938
+ "name": "dependencies",
40939
+ "type": {
40940
+ "text": "object"
40941
+ },
40942
+ "static": true,
40943
+ "default": "{ 'zn-slash-item': ZnSlashItem, 'zn-slash-menu': ZnSlashMenu }"
40944
+ },
39906
40945
  {
39907
40946
  "kind": "field",
39908
40947
  "name": "formControlController",
@@ -39934,6 +40973,13 @@
39934
40973
  "default": "false",
39935
40974
  "description": "Ensures we only attempt to derive the initial value from light DOM content once"
39936
40975
  },
40976
+ {
40977
+ "kind": "field",
40978
+ "name": "slashController",
40979
+ "privacy": "private",
40980
+ "readonly": true,
40981
+ "default": "new SlashMenuController(this, { menu: () => this.mountSlashMenu(), items: search => this.resolveSlashItems(search), trigger: () => this.slashTrigger, onSelect: (item, search) => !this.emit('zn-slash-select', { detail: {item, query: search} }).defaultPrevented, // The field's own input event has already synced `value` by this point onInsert: (item, value) => this.emit('zn-slash-insert', {detail: {item, value}}) })"
40982
+ },
39937
40983
  {
39938
40984
  "kind": "field",
39939
40985
  "name": "formControl",
@@ -39948,6 +40994,13 @@
39948
40994
  "text": "HTMLTextAreaElement"
39949
40995
  }
39950
40996
  },
40997
+ {
40998
+ "kind": "field",
40999
+ "name": "slashMenuElement",
41000
+ "type": {
41001
+ "text": "ZnSlashMenu | null"
41002
+ }
41003
+ },
39951
41004
  {
39952
41005
  "kind": "field",
39953
41006
  "name": "hasFocus",
@@ -39956,6 +41009,16 @@
39956
41009
  },
39957
41010
  "default": "false"
39958
41011
  },
41012
+ {
41013
+ "kind": "field",
41014
+ "name": "hasSlashMenu",
41015
+ "type": {
41016
+ "text": "boolean"
41017
+ },
41018
+ "privacy": "private",
41019
+ "default": "false",
41020
+ "description": "Renders the slash menu only once it has been needed, keeping unused textareas cheap."
41021
+ },
39959
41022
  {
39960
41023
  "kind": "field",
39961
41024
  "name": "title",
@@ -40202,6 +41265,54 @@
40202
41265
  "description": "Tells the browser what type of data will be entered by the user, allowing it to display the appropriate virtual\nkeyboard on supportive devices.",
40203
41266
  "attribute": "inputmode"
40204
41267
  },
41268
+ {
41269
+ "kind": "field",
41270
+ "name": "slashItems",
41271
+ "type": {
41272
+ "text": "SlashMenuItem[]"
41273
+ },
41274
+ "default": "[]",
41275
+ "description": "Quick insertions offered by the slash menu. Accepts a JSON array of items, or the shorthand\n`Brand name={{BRAND_NAME}}, Support email={{SUPPORT_EMAIL}}`. Can also be set as an array of\n`SlashMenuItem` objects in JavaScript.",
41276
+ "attribute": "slash-items"
41277
+ },
41278
+ {
41279
+ "kind": "field",
41280
+ "name": "slashPreset",
41281
+ "type": {
41282
+ "text": "string"
41283
+ },
41284
+ "default": "''",
41285
+ "description": "Names of item sets registered with `registerSlashMenuPreset`, comma separated.",
41286
+ "attribute": "slash-preset"
41287
+ },
41288
+ {
41289
+ "kind": "field",
41290
+ "name": "slashTrigger",
41291
+ "type": {
41292
+ "text": "string"
41293
+ },
41294
+ "default": "'/'",
41295
+ "description": "The characters that open the slash menu.",
41296
+ "attribute": "slash-trigger"
41297
+ },
41298
+ {
41299
+ "kind": "field",
41300
+ "name": "slashHeading",
41301
+ "type": {
41302
+ "text": "string"
41303
+ },
41304
+ "default": "'Insert'",
41305
+ "description": "The heading shown above the slash menu's items.",
41306
+ "attribute": "slash-heading"
41307
+ },
41308
+ {
41309
+ "kind": "field",
41310
+ "name": "slashItemsProvider",
41311
+ "type": {
41312
+ "text": "(query: string) => SlashMenuItem[] | Promise<SlashMenuItem[]> | undefined"
41313
+ },
41314
+ "description": "Resolves additional items each time the menu opens, for lists that come from elsewhere (e.g. an\nAPI). Receives the current query and may return a promise. JavaScript only."
41315
+ },
40205
41316
  {
40206
41317
  "kind": "field",
40207
41318
  "name": "defaultValue",
@@ -40232,6 +41343,52 @@
40232
41343
  "description": "Gets the validation message",
40233
41344
  "readonly": true
40234
41345
  },
41346
+ {
41347
+ "kind": "method",
41348
+ "name": "resolveSlashItems",
41349
+ "return": {
41350
+ "type": {
41351
+ "text": "Promise<SlashMenuItem[]>"
41352
+ }
41353
+ },
41354
+ "parameters": [
41355
+ {
41356
+ "name": "search",
41357
+ "default": "''"
41358
+ }
41359
+ ],
41360
+ "description": "The insertions the slash menu offers, gathered from every source, in the order they were declared."
41361
+ },
41362
+ {
41363
+ "kind": "method",
41364
+ "name": "showSlashMenu",
41365
+ "description": "Opens the slash menu at the caret, inserting the trigger if it isn't already there."
41366
+ },
41367
+ {
41368
+ "kind": "method",
41369
+ "name": "hideSlashMenu",
41370
+ "description": "Closes the slash menu."
41371
+ },
41372
+ {
41373
+ "kind": "method",
41374
+ "name": "slottedSlashItems",
41375
+ "privacy": "private",
41376
+ "return": {
41377
+ "type": {
41378
+ "text": "SlashMenuItem[]"
41379
+ }
41380
+ }
41381
+ },
41382
+ {
41383
+ "kind": "method",
41384
+ "name": "mountSlashMenu",
41385
+ "privacy": "private",
41386
+ "return": {
41387
+ "type": {
41388
+ "text": "Promise<ZnSlashMenu | null>"
41389
+ }
41390
+ }
41391
+ },
40235
41392
  {
40236
41393
  "kind": "method",
40237
41394
  "name": "handleBlur",
@@ -40452,6 +41609,14 @@
40452
41609
  {
40453
41610
  "description": "Emitted when the form control has been checked for validity and its constraints aren't satisfied.",
40454
41611
  "name": "zn-invalid"
41612
+ },
41613
+ {
41614
+ "description": "Emitted when a slash menu item is chosen. Cancelable — call `preventDefault()` to suppress the insertion and handle the item yourself.",
41615
+ "name": "zn-slash-select"
41616
+ },
41617
+ {
41618
+ "description": "Emitted after a slash menu item's value has been inserted.",
41619
+ "name": "zn-slash-insert"
40455
41620
  }
40456
41621
  ],
40457
41622
  "attributes": [
@@ -40670,6 +41835,42 @@
40670
41835
  "description": "Tells the browser what type of data will be entered by the user, allowing it to display the appropriate virtual\nkeyboard on supportive devices.",
40671
41836
  "fieldName": "inputmode"
40672
41837
  },
41838
+ {
41839
+ "name": "slash-items",
41840
+ "type": {
41841
+ "text": "SlashMenuItem[]"
41842
+ },
41843
+ "default": "[]",
41844
+ "description": "Quick insertions offered by the slash menu. Accepts a JSON array of items, or the shorthand\n`Brand name={{BRAND_NAME}}, Support email={{SUPPORT_EMAIL}}`. Can also be set as an array of\n`SlashMenuItem` objects in JavaScript.",
41845
+ "fieldName": "slashItems"
41846
+ },
41847
+ {
41848
+ "name": "slash-preset",
41849
+ "type": {
41850
+ "text": "string"
41851
+ },
41852
+ "default": "''",
41853
+ "description": "Names of item sets registered with `registerSlashMenuPreset`, comma separated.",
41854
+ "fieldName": "slashPreset"
41855
+ },
41856
+ {
41857
+ "name": "slash-trigger",
41858
+ "type": {
41859
+ "text": "string"
41860
+ },
41861
+ "default": "'/'",
41862
+ "description": "The characters that open the slash menu.",
41863
+ "fieldName": "slashTrigger"
41864
+ },
41865
+ {
41866
+ "name": "slash-heading",
41867
+ "type": {
41868
+ "text": "string"
41869
+ },
41870
+ "default": "'Insert'",
41871
+ "description": "The heading shown above the slash menu's items.",
41872
+ "fieldName": "slashHeading"
41873
+ },
40673
41874
  {
40674
41875
  "name": "transparent",
40675
41876
  "type": {
@@ -40687,10 +41888,14 @@
40687
41888
  "tagNameWithoutPrefix": "textarea",
40688
41889
  "tagName": "zn-textarea",
40689
41890
  "customElement": true,
40690
- "jsDoc": "/**\n * @summary Textareas collect data from the user and allow multiple lines of text.\n * @documentation https://zinc.style/components/textarea\n * @status stable\n * @since 2.0\n *\n * @slot label - The textareas label. Alternatively, you can use the `label` attribute.\n * @slot 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 * @slot context-note - Used to add contextual text that is displayed above the textarea, on the right. Alternatively, you can use the `context-note` attribute.\n * @slot help-text - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.\n *\n * @event zn-blur - Emitted when the control loses focus.\n * @event zn-change - Emitted when an alteration to the control's value is committed by the user.\n * @event zn-focus - Emitted when the control gains focus.\n * @event zn-input - Emitted when the control receives input.\n * @event zn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @csspart form-control - The form control that wraps the label, input, and help text.\n * @csspart form-control-label - The label's wrapper.\n * @csspart form-control-input - The input's wrapper.\n * @csspart form-control-help-text - The help text's wrapper.\n * @csspart base - The component's base wrapper.\n * @csspart textarea - The internal `<textarea>` control.\n */",
41891
+ "jsDoc": "/**\n * @summary Textareas collect data from the user and allow multiple lines of text.\n * @documentation https://zinc.style/components/textarea\n * @status stable\n * @since 2.0\n *\n * @slot label - The textareas label. Alternatively, you can use the `label` attribute.\n * @slot 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 * @slot context-note - Used to add contextual text that is displayed above the textarea, on the right. Alternatively, you can use the `context-note` attribute.\n * @slot help-text - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.\n * @slot slash-items - `<zn-slash-item>` elements describing the insertions offered by the slash menu. Items are\n * picked up wherever they sit inside the textarea, so this slot name is optional.\n * @slot slash-menu - A `<zn-slash-menu>` to use instead of the built-in one, so its heading, sizing and styling can\n * be set in markup. Any `<zn-slash-item>` children of it become the menu's items.\n *\n * @dependency zn-slash-item\n * @dependency zn-slash-menu\n *\n * @event zn-blur - Emitted when the control loses focus.\n * @event zn-change - Emitted when an alteration to the control's value is committed by the user.\n * @event zn-focus - Emitted when the control gains focus.\n * @event zn-input - Emitted when the control receives input.\n * @event zn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n * @event zn-slash-select - Emitted when a slash menu item is chosen. Cancelable — call `preventDefault()` to\n * suppress the insertion and handle the item yourself.\n * @event zn-slash-insert - Emitted after a slash menu item's value has been inserted.\n *\n * @csspart form-control - The form control that wraps the label, input, and help text.\n * @csspart form-control-label - The label's wrapper.\n * @csspart form-control-input - The input's wrapper.\n * @csspart form-control-help-text - The help text's wrapper.\n * @csspart base - The component's base wrapper.\n * @csspart textarea - The internal `<textarea>` control.\n * @csspart slash-menu - The slash menu shown at the caret.\n */",
40691
41892
  "documentation": "https://zinc.style/components/textarea",
40692
41893
  "status": "stable",
40693
- "since": "2.0"
41894
+ "since": "2.0",
41895
+ "dependencies": [
41896
+ "zn-slash-item",
41897
+ "zn-slash-menu"
41898
+ ]
40694
41899
  }
40695
41900
  ],
40696
41901
  "exports": [
@@ -43894,6 +45099,54 @@
43894
45099
  },
43895
45100
  "attribute": "textarea-rows"
43896
45101
  },
45102
+ {
45103
+ "kind": "field",
45104
+ "name": "slashItems",
45105
+ "type": {
45106
+ "text": "SlashMenuItem[]"
45107
+ },
45108
+ "default": "[]",
45109
+ "description": "Quick insertions offered by the slash menu on `text` and `textarea` inputs. Accepts a JSON array of items, or\nthe shorthand `Brand name={{BRAND_NAME}}, Support email={{SUPPORT_EMAIL}}`. Every language shares the list.",
45110
+ "attribute": "slash-items"
45111
+ },
45112
+ {
45113
+ "kind": "field",
45114
+ "name": "slashPreset",
45115
+ "type": {
45116
+ "text": "string"
45117
+ },
45118
+ "default": "''",
45119
+ "description": "Names of item sets registered with `registerSlashMenuPreset`, comma separated.",
45120
+ "attribute": "slash-preset"
45121
+ },
45122
+ {
45123
+ "kind": "field",
45124
+ "name": "slashTrigger",
45125
+ "type": {
45126
+ "text": "string"
45127
+ },
45128
+ "default": "'/'",
45129
+ "description": "The characters that open the slash menu.",
45130
+ "attribute": "slash-trigger"
45131
+ },
45132
+ {
45133
+ "kind": "field",
45134
+ "name": "slashHeading",
45135
+ "type": {
45136
+ "text": "string"
45137
+ },
45138
+ "default": "'Insert'",
45139
+ "description": "The heading shown above the slash menu's items.",
45140
+ "attribute": "slash-heading"
45141
+ },
45142
+ {
45143
+ "kind": "field",
45144
+ "name": "slashItemsProvider",
45145
+ "type": {
45146
+ "text": "(query: string) => SlashMenuItem[] | Promise<SlashMenuItem[]> | undefined"
45147
+ },
45148
+ "description": "Resolves additional slash menu items each time the menu opens. JavaScript only."
45149
+ },
43897
45150
  {
43898
45151
  "kind": "field",
43899
45152
  "name": "grouped",
@@ -44166,6 +45419,42 @@
44166
45419
  },
44167
45420
  "fieldName": "textareaRows"
44168
45421
  },
45422
+ {
45423
+ "name": "slash-items",
45424
+ "type": {
45425
+ "text": "SlashMenuItem[]"
45426
+ },
45427
+ "default": "[]",
45428
+ "description": "Quick insertions offered by the slash menu on `text` and `textarea` inputs. Accepts a JSON array of items, or\nthe shorthand `Brand name={{BRAND_NAME}}, Support email={{SUPPORT_EMAIL}}`. Every language shares the list.",
45429
+ "fieldName": "slashItems"
45430
+ },
45431
+ {
45432
+ "name": "slash-preset",
45433
+ "type": {
45434
+ "text": "string"
45435
+ },
45436
+ "default": "''",
45437
+ "description": "Names of item sets registered with `registerSlashMenuPreset`, comma separated.",
45438
+ "fieldName": "slashPreset"
45439
+ },
45440
+ {
45441
+ "name": "slash-trigger",
45442
+ "type": {
45443
+ "text": "string"
45444
+ },
45445
+ "default": "'/'",
45446
+ "description": "The characters that open the slash menu.",
45447
+ "fieldName": "slashTrigger"
45448
+ },
45449
+ {
45450
+ "name": "slash-heading",
45451
+ "type": {
45452
+ "text": "string"
45453
+ },
45454
+ "default": "'Insert'",
45455
+ "description": "The heading shown above the slash menu's items.",
45456
+ "fieldName": "slashHeading"
45457
+ },
44169
45458
  {
44170
45459
  "name": "grouped",
44171
45460
  "type": {
@@ -44468,7 +45757,7 @@
44468
45757
  "package": {
44469
45758
  "name": "@kubex/zinc",
44470
45759
  "description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
44471
- "version": "1.1.79",
45760
+ "version": "1.1.81",
44472
45761
  "author": "",
44473
45762
  "license": "MIT"
44474
45763
  }