@kubex/zinc 1.1.80 → 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.
@@ -47,79 +47,6 @@
47
47
  }
48
48
  ]
49
49
  },
50
- {
51
- "kind": "javascript-module",
52
- "path": "components/action-bar/action-bar.js",
53
- "declarations": [
54
- {
55
- "kind": "class",
56
- "description": "",
57
- "name": "ZnActionBar",
58
- "cssProperties": [
59
- {
60
- "description": "An example CSS custom property.",
61
- "name": "--example"
62
- }
63
- ],
64
- "cssParts": [
65
- {
66
- "description": "The component's base wrapper.",
67
- "name": "base"
68
- }
69
- ],
70
- "slots": [
71
- {
72
- "description": "The default slot.",
73
- "name": ""
74
- },
75
- {
76
- "description": "An example slot.",
77
- "name": "example"
78
- }
79
- ],
80
- "members": [
81
- {
82
- "kind": "field",
83
- "name": "localize",
84
- "privacy": "private",
85
- "readonly": true,
86
- "default": "new LocalizeController(this)"
87
- }
88
- ],
89
- "events": [
90
- {
91
- "description": "Emitted as an example.",
92
- "name": "zn-event-name"
93
- }
94
- ],
95
- "superclass": {
96
- "name": "ZincElement",
97
- "module": "/src/internal/zinc-element"
98
- },
99
- "summary": "Short summary of the component's intended use.",
100
- "tagNameWithoutPrefix": "action-bar",
101
- "tagName": "zn-action-bar",
102
- "customElement": true,
103
- "jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/action-bar\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-example\n *\n * @event zn-event-name - Emitted as an example.\n *\n * @slot - The default slot.\n * @slot example - An example slot.\n *\n * @csspart base - The component's base wrapper.\n *\n * @cssproperty --example - An example CSS custom property.\n */",
104
- "documentation": "https://zinc.style/components/action-bar",
105
- "status": "experimental",
106
- "since": "1.0",
107
- "dependencies": [
108
- "zn-example"
109
- ]
110
- }
111
- ],
112
- "exports": [
113
- {
114
- "kind": "js",
115
- "name": "default",
116
- "declaration": {
117
- "name": "ZnActionBar",
118
- "module": "components/action-bar/action-bar.js"
119
- }
120
- }
121
- ]
122
- },
123
50
  {
124
51
  "kind": "javascript-module",
125
52
  "path": "components/alert/alert.js",
@@ -314,6 +241,79 @@
314
241
  }
315
242
  ]
316
243
  },
244
+ {
245
+ "kind": "javascript-module",
246
+ "path": "components/action-bar/action-bar.js",
247
+ "declarations": [
248
+ {
249
+ "kind": "class",
250
+ "description": "",
251
+ "name": "ZnActionBar",
252
+ "cssProperties": [
253
+ {
254
+ "description": "An example CSS custom property.",
255
+ "name": "--example"
256
+ }
257
+ ],
258
+ "cssParts": [
259
+ {
260
+ "description": "The component's base wrapper.",
261
+ "name": "base"
262
+ }
263
+ ],
264
+ "slots": [
265
+ {
266
+ "description": "The default slot.",
267
+ "name": ""
268
+ },
269
+ {
270
+ "description": "An example slot.",
271
+ "name": "example"
272
+ }
273
+ ],
274
+ "members": [
275
+ {
276
+ "kind": "field",
277
+ "name": "localize",
278
+ "privacy": "private",
279
+ "readonly": true,
280
+ "default": "new LocalizeController(this)"
281
+ }
282
+ ],
283
+ "events": [
284
+ {
285
+ "description": "Emitted as an example.",
286
+ "name": "zn-event-name"
287
+ }
288
+ ],
289
+ "superclass": {
290
+ "name": "ZincElement",
291
+ "module": "/src/internal/zinc-element"
292
+ },
293
+ "summary": "Short summary of the component's intended use.",
294
+ "tagNameWithoutPrefix": "action-bar",
295
+ "tagName": "zn-action-bar",
296
+ "customElement": true,
297
+ "jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/action-bar\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-example\n *\n * @event zn-event-name - Emitted as an example.\n *\n * @slot - The default slot.\n * @slot example - An example slot.\n *\n * @csspart base - The component's base wrapper.\n *\n * @cssproperty --example - An example CSS custom property.\n */",
298
+ "documentation": "https://zinc.style/components/action-bar",
299
+ "status": "experimental",
300
+ "since": "1.0",
301
+ "dependencies": [
302
+ "zn-example"
303
+ ]
304
+ }
305
+ ],
306
+ "exports": [
307
+ {
308
+ "kind": "js",
309
+ "name": "default",
310
+ "declaration": {
311
+ "name": "ZnActionBar",
312
+ "module": "components/action-bar/action-bar.js"
313
+ }
314
+ }
315
+ ]
316
+ },
317
317
  {
318
318
  "kind": "javascript-module",
319
319
  "path": "components/animated-button/animated-button.js",
@@ -17578,7 +17578,7 @@
17578
17578
  "text": "SlashMenuItem[]"
17579
17579
  },
17580
17580
  "default": "[]",
17581
- "description": "Quick insertions offered by the slash menu of a `textarea` input. Accepts a JSON array of items, or the\nshorthand `Brand name={{BRAND_NAME}}, Support email={{SUPPORT_EMAIL}}`. Forwarded to the inner `zn-textarea`.",
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
17582
  "attribute": "slash-items"
17583
17583
  },
17584
17584
  {
@@ -18085,7 +18085,7 @@
18085
18085
  "text": "SlashMenuItem[]"
18086
18086
  },
18087
18087
  "default": "[]",
18088
- "description": "Quick insertions offered by the slash menu of a `textarea` input. Accepts a JSON array of items, or the\nshorthand `Brand name={{BRAND_NAME}}, Support email={{SUPPORT_EMAIL}}`. Forwarded to the inner `zn-textarea`.",
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
18089
  "fieldName": "slashItems"
18090
18090
  },
18091
18091
  {
@@ -18260,6 +18260,10 @@
18260
18260
  "description": "The form control that wraps the label, input, and help text.",
18261
18261
  "name": "form-control"
18262
18262
  },
18263
+ {
18264
+ "description": "The slash menu shown at the caret.",
18265
+ "name": "slash-menu"
18266
+ },
18263
18267
  {
18264
18268
  "description": "The label's wrapper.",
18265
18269
  "name": "form-control-label"
@@ -18333,6 +18337,14 @@
18333
18337
  {
18334
18338
  "description": "Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.",
18335
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"
18336
18348
  }
18337
18349
  ],
18338
18350
  "members": [
@@ -18343,7 +18355,7 @@
18343
18355
  "text": "object"
18344
18356
  },
18345
18357
  "static": true,
18346
- "default": "{ 'zn-icon': ZnIcon, 'zn-tooltip': ZnTooltip }"
18358
+ "default": "{ 'zn-icon': ZnIcon, 'zn-slash-item': ZnSlashItem, 'zn-slash-menu': ZnSlashMenu, 'zn-tooltip': ZnTooltip }"
18347
18359
  },
18348
18360
  {
18349
18361
  "kind": "field",
@@ -18366,6 +18378,13 @@
18366
18378
  "readonly": true,
18367
18379
  "default": "new LocalizeController(this)"
18368
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
+ },
18369
18388
  {
18370
18389
  "kind": "field",
18371
18390
  "name": "input",
@@ -18380,6 +18399,13 @@
18380
18399
  "text": "HTMLInputElement"
18381
18400
  }
18382
18401
  },
18402
+ {
18403
+ "kind": "field",
18404
+ "name": "slashMenuElement",
18405
+ "type": {
18406
+ "text": "ZnSlashMenu | null"
18407
+ }
18408
+ },
18383
18409
  {
18384
18410
  "kind": "field",
18385
18411
  "name": "hasFocus",
@@ -18389,6 +18415,16 @@
18389
18415
  "privacy": "private",
18390
18416
  "default": "false"
18391
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
+ },
18392
18428
  {
18393
18429
  "kind": "field",
18394
18430
  "name": "isUserTyping",
@@ -18772,6 +18808,54 @@
18772
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.",
18773
18809
  "attribute": "inputmode"
18774
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
+ },
18775
18859
  {
18776
18860
  "kind": "field",
18777
18861
  "name": "triggerSubmit",
@@ -19045,6 +19129,52 @@
19045
19129
  }
19046
19130
  ]
19047
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
+ },
19048
19178
  {
19049
19179
  "kind": "method",
19050
19180
  "name": "handleDisabledChange"
@@ -19223,6 +19353,14 @@
19223
19353
  {
19224
19354
  "description": "Emitted when the form control has been checked for validity and its constraints aren't satisfied.",
19225
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"
19226
19364
  }
19227
19365
  ],
19228
19366
  "attributes": [
@@ -19536,6 +19674,42 @@
19536
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.",
19537
19675
  "fieldName": "inputmode"
19538
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
+ },
19539
19713
  {
19540
19714
  "name": "trigger-submit",
19541
19715
  "type": {
@@ -19554,13 +19728,15 @@
19554
19728
  "tagNameWithoutPrefix": "input",
19555
19729
  "tagName": "zn-input",
19556
19730
  "customElement": true,
19557
- "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 */",
19558
19732
  "documentation": "https://zinc.style/components/input",
19559
19733
  "status": "experimental",
19560
19734
  "since": "1.0",
19561
19735
  "dependencies": [
19562
19736
  "zn-icon",
19563
- "zn-tooltip"
19737
+ "zn-tooltip",
19738
+ "zn-slash-item",
19739
+ "zn-slash-menu"
19564
19740
  ]
19565
19741
  }
19566
19742
  ],
@@ -32718,6 +32894,10 @@
32718
32894
  "description": "The always-visible block-insert toolbar.",
32719
32895
  "name": "toolbar"
32720
32896
  },
32897
+ {
32898
+ "description": "The button that switches between the block view and the raw source view.",
32899
+ "name": "raw-toggle"
32900
+ },
32721
32901
  {
32722
32902
  "description": "A rendered block wrapper.",
32723
32903
  "name": "block"
@@ -32731,7 +32911,11 @@
32731
32911
  "name": "input"
32732
32912
  },
32733
32913
  {
32734
- "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.",
32735
32919
  "name": "slash-menu"
32736
32920
  },
32737
32921
  {
@@ -32740,6 +32924,15 @@
32740
32924
  }
32741
32925
  ],
32742
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
+ },
32743
32936
  {
32744
32937
  "kind": "field",
32745
32938
  "name": "formControlController",
@@ -32747,6 +32940,13 @@
32747
32940
  "readonly": true,
32748
32941
  "default": "new FormControlController(this, { assumeInteractionOn: ['zn-input', 'zn-change'], })"
32749
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
+ },
32750
32950
  {
32751
32951
  "kind": "field",
32752
32952
  "name": "editingDraft",
@@ -32756,6 +32956,15 @@
32756
32956
  "privacy": "private",
32757
32957
  "default": "''"
32758
32958
  },
32959
+ {
32960
+ "kind": "field",
32961
+ "name": "rawEntryValue",
32962
+ "type": {
32963
+ "text": "string"
32964
+ },
32965
+ "privacy": "private",
32966
+ "default": "''"
32967
+ },
32759
32968
  {
32760
32969
  "kind": "field",
32761
32970
  "name": "suppressValueSync",
@@ -32782,6 +32991,14 @@
32782
32991
  },
32783
32992
  "privacy": "private"
32784
32993
  },
32994
+ {
32995
+ "kind": "field",
32996
+ "name": "slashMenuElement",
32997
+ "type": {
32998
+ "text": "ZnSlashMenu | null"
32999
+ },
33000
+ "privacy": "private"
33001
+ },
32785
33002
  {
32786
33003
  "kind": "field",
32787
33004
  "name": "blocks",
@@ -32802,30 +33019,13 @@
32802
33019
  },
32803
33020
  {
32804
33021
  "kind": "field",
32805
- "name": "slashMenuOpen",
33022
+ "name": "hasSlashMenu",
32806
33023
  "type": {
32807
33024
  "text": "boolean"
32808
33025
  },
32809
33026
  "privacy": "private",
32810
- "default": "false"
32811
- },
32812
- {
32813
- "kind": "field",
32814
- "name": "slashQuery",
32815
- "type": {
32816
- "text": "string"
32817
- },
32818
- "privacy": "private",
32819
- "default": "''"
32820
- },
32821
- {
32822
- "kind": "field",
32823
- "name": "slashActiveIndex",
32824
- "type": {
32825
- "text": "number"
32826
- },
32827
- "privacy": "private",
32828
- "default": "0"
33027
+ "default": "false",
33028
+ "description": "Renders the slash menu only once it has been needed."
32829
33029
  },
32830
33030
  {
32831
33031
  "kind": "field",
@@ -32872,6 +33072,15 @@
32872
33072
  "privacy": "private",
32873
33073
  "default": "''"
32874
33074
  },
33075
+ {
33076
+ "kind": "field",
33077
+ "name": "rawMode",
33078
+ "type": {
33079
+ "text": "boolean"
33080
+ },
33081
+ "privacy": "private",
33082
+ "default": "false"
33083
+ },
32875
33084
  {
32876
33085
  "kind": "field",
32877
33086
  "name": "pendingDragHandle",
@@ -32957,6 +33166,17 @@
32957
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.",
32958
33167
  "attribute": "attachment-url"
32959
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
+ },
32960
33180
  {
32961
33181
  "kind": "field",
32962
33182
  "name": "required",
@@ -33058,7 +33278,7 @@
33058
33278
  {
33059
33279
  "kind": "method",
33060
33280
  "name": "blur",
33061
- "description": "Commits any in-progress block edit."
33281
+ "description": "Commits any in-progress block or raw edit."
33062
33282
  },
33063
33283
  {
33064
33284
  "kind": "method",
@@ -33357,15 +33577,6 @@
33357
33577
  "privacy": "private",
33358
33578
  "description": "Commits the in-progress edit; returns the index after the committed parts."
33359
33579
  },
33360
- {
33361
- "kind": "field",
33362
- "name": "filteredSlashItems",
33363
- "type": {
33364
- "text": "BlockType[]"
33365
- },
33366
- "privacy": "private",
33367
- "readonly": true
33368
- },
33369
33580
  {
33370
33581
  "kind": "field",
33371
33582
  "name": "handleDraftInput",
@@ -33378,16 +33589,43 @@
33378
33589
  },
33379
33590
  {
33380
33591
  "kind": "method",
33381
- "name": "applySlashItem",
33592
+ "name": "isSlashBlock",
33593
+ "privacy": "private",
33594
+ "return": {
33595
+ "type": {
33596
+ "text": "boolean"
33597
+ }
33598
+ },
33599
+ "description": "Whether the block being edited is nothing but the slash command."
33600
+ },
33601
+ {
33602
+ "kind": "method",
33603
+ "name": "mountSlashMenu",
33382
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
+ },
33383
33620
  "parameters": [
33384
33621
  {
33385
33622
  "name": "item",
33386
33623
  "type": {
33387
- "text": "BlockType"
33624
+ "text": "SlashMenuItem"
33388
33625
  }
33389
33626
  }
33390
- ]
33627
+ ],
33628
+ "description": "Returns false for items the controller should not insert text for."
33391
33629
  },
33392
33630
  {
33393
33631
  "kind": "field",
@@ -33548,6 +33786,28 @@
33548
33786
  }
33549
33787
  ]
33550
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
+ },
33551
33811
  {
33552
33812
  "kind": "method",
33553
33813
  "name": "handleToolbarInsert",
@@ -33561,11 +33821,6 @@
33561
33821
  }
33562
33822
  ]
33563
33823
  },
33564
- {
33565
- "kind": "method",
33566
- "name": "renderSlashMenu",
33567
- "privacy": "private"
33568
- },
33569
33824
  {
33570
33825
  "kind": "method",
33571
33826
  "name": "renderImageControls",
@@ -33590,6 +33845,11 @@
33590
33845
  }
33591
33846
  ]
33592
33847
  },
33848
+ {
33849
+ "kind": "method",
33850
+ "name": "renderRaw",
33851
+ "privacy": "private"
33852
+ },
33593
33853
  {
33594
33854
  "kind": "method",
33595
33855
  "name": "renderBody",
@@ -33649,6 +33909,15 @@
33649
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.",
33650
33910
  "fieldName": "attachmentUrl"
33651
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
+ },
33652
33921
  {
33653
33922
  "name": "required",
33654
33923
  "type": {
@@ -33685,7 +33954,7 @@
33685
33954
  "tagNameWithoutPrefix": "remarkd-editor",
33686
33955
  "tagName": "zn-remarkd-editor",
33687
33956
  "customElement": true,
33688
- "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 */",
33689
33958
  "documentation": "https://zinc.style/components/remarkd-editor",
33690
33959
  "status": "experimental",
33691
33960
  "since": "1.0",
@@ -33693,7 +33962,8 @@
33693
33962
  "zn-button",
33694
33963
  "zn-button-group",
33695
33964
  "zn-icon",
33696
- "zn-file"
33965
+ "zn-file",
33966
+ "zn-slash-menu"
33697
33967
  ]
33698
33968
  }
33699
33969
  ],
@@ -44836,7 +45106,7 @@
44836
45106
  "text": "SlashMenuItem[]"
44837
45107
  },
44838
45108
  "default": "[]",
44839
- "description": "Quick insertions offered by the slash menu when `input-type` is `textarea`. Accepts a JSON array of items, or\nthe shorthand `Brand name={{BRAND_NAME}}, Support email={{SUPPORT_EMAIL}}`. Every language shares the list.",
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.",
44840
45110
  "attribute": "slash-items"
44841
45111
  },
44842
45112
  {
@@ -45155,7 +45425,7 @@
45155
45425
  "text": "SlashMenuItem[]"
45156
45426
  },
45157
45427
  "default": "[]",
45158
- "description": "Quick insertions offered by the slash menu when `input-type` is `textarea`. Accepts a JSON array of items, or\nthe shorthand `Brand name={{BRAND_NAME}}, Support email={{SUPPORT_EMAIL}}`. Every language shares the list.",
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.",
45159
45429
  "fieldName": "slashItems"
45160
45430
  },
45161
45431
  {
@@ -45487,7 +45757,7 @@
45487
45757
  "package": {
45488
45758
  "name": "@kubex/zinc",
45489
45759
  "description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
45490
- "version": "1.1.80",
45760
+ "version": "1.1.81",
45491
45761
  "author": "",
45492
45762
  "license": "MIT"
45493
45763
  }