@kubex/zinc 1.1.87 → 1.1.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements.json +466 -466
- package/dist/vscode.html-custom-data.json +32 -32
- package/dist/web-types.json +69 -69
- package/dist/zn.d.ts +6 -32
- package/dist/zn.min.js +229 -247
- package/package.json +1 -1
- package/src/components/editor/modules/context-menu/context-menu-tool.test.ts +36 -7
- package/src/components/editor/modules/context-menu/context-menu.ts +108 -118
- package/src/components/editor/modules/toolbar/toolbar.ts +4 -1
- package/src/components/slash-menu/slash-menu.component.ts +1 -0
- package/src/components/slash-menu/slash-menu.test.ts +13 -1
- package/src/components/editor/modules/context-menu/context-menu-component.ts +0 -116
- package/src/components/editor/modules/context-menu/context-menu.scss +0 -49
|
@@ -138,6 +138,21 @@
|
|
|
138
138
|
}
|
|
139
139
|
]
|
|
140
140
|
},
|
|
141
|
+
{
|
|
142
|
+
"name": "zn-bulk-actions",
|
|
143
|
+
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
144
|
+
"attributes": [
|
|
145
|
+
{ "name": "name", "values": [] },
|
|
146
|
+
{ "name": "value", "values": [{ "name": "PropertyKey" }] },
|
|
147
|
+
{ "name": "actions", "values": [{ "name": "BulkActionData" }] }
|
|
148
|
+
],
|
|
149
|
+
"references": [
|
|
150
|
+
{
|
|
151
|
+
"name": "Documentation",
|
|
152
|
+
"url": "https://zinc.style/components/bulk-actions"
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
},
|
|
141
156
|
{
|
|
142
157
|
"name": "zn-button",
|
|
143
158
|
"description": "Buttons represent actions that are available to the user.\n---\n\n\n### **Events:**\n - **zn-blur** - Emitted when the button loses focus.\n- **zn-focus** - Emitted when the button gains focus.\n- **zn-invalid** - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\n### **Slots:**\n - _default_ - The button's label.\n- **prefix** - A presentational prefix icon or similar element.\n- **suffix** - A presentational suffix icon or similar element.\n- **cancel** - Slot for custom cancel button/content when autoClick is active.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **prefix** - The container that wraps the prefix.\n- **label** - The button's label.\n- **suffix** - The container that wraps the suffix.\n- **caret** - The button's caret icon, an `<zn-icon>` element.\n- **spinner** - The spinner that shows when the button is in the loading state.",
|
|
@@ -271,21 +286,6 @@
|
|
|
271
286
|
}
|
|
272
287
|
]
|
|
273
288
|
},
|
|
274
|
-
{
|
|
275
|
-
"name": "zn-bulk-actions",
|
|
276
|
-
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
277
|
-
"attributes": [
|
|
278
|
-
{ "name": "name", "values": [] },
|
|
279
|
-
{ "name": "value", "values": [{ "name": "PropertyKey" }] },
|
|
280
|
-
{ "name": "actions", "values": [{ "name": "BulkActionData" }] }
|
|
281
|
-
],
|
|
282
|
-
"references": [
|
|
283
|
-
{
|
|
284
|
-
"name": "Documentation",
|
|
285
|
-
"url": "https://zinc.style/components/bulk-actions"
|
|
286
|
-
}
|
|
287
|
-
]
|
|
288
|
-
},
|
|
289
289
|
{
|
|
290
290
|
"name": "zn-button-group",
|
|
291
291
|
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n\n### **CSS Properties:**\n - **--grow** - Use flex-grow to fill available space. _(default: undefined)_\n- **--start** - Justify content at the start of the flex space. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
@@ -4069,23 +4069,6 @@
|
|
|
4069
4069
|
}
|
|
4070
4070
|
]
|
|
4071
4071
|
},
|
|
4072
|
-
{
|
|
4073
|
-
"name": "zn-tab",
|
|
4074
|
-
"description": "Defines a tab panel for use inside zn-page.\n---\n\n\n### **Slots:**\n - _default_ - The tab panel content.",
|
|
4075
|
-
"attributes": [
|
|
4076
|
-
{ "name": "caption", "values": [] },
|
|
4077
|
-
{ "name": "priority", "values": [] },
|
|
4078
|
-
{ "name": "uri", "values": [] },
|
|
4079
|
-
{
|
|
4080
|
-
"name": "selected",
|
|
4081
|
-
"description": "When present, zn-page opens this tab on load instead of the first tab.",
|
|
4082
|
-
"values": []
|
|
4083
|
-
}
|
|
4084
|
-
],
|
|
4085
|
-
"references": [
|
|
4086
|
-
{ "name": "Documentation", "url": "https://zinc.style/components/tab" }
|
|
4087
|
-
]
|
|
4088
|
-
},
|
|
4089
4072
|
{
|
|
4090
4073
|
"name": "zn-style",
|
|
4091
4074
|
"description": "\n---\n",
|
|
@@ -4117,6 +4100,23 @@
|
|
|
4117
4100
|
}
|
|
4118
4101
|
]
|
|
4119
4102
|
},
|
|
4103
|
+
{
|
|
4104
|
+
"name": "zn-tab",
|
|
4105
|
+
"description": "Defines a tab panel for use inside zn-page.\n---\n\n\n### **Slots:**\n - _default_ - The tab panel content.",
|
|
4106
|
+
"attributes": [
|
|
4107
|
+
{ "name": "caption", "values": [] },
|
|
4108
|
+
{ "name": "priority", "values": [] },
|
|
4109
|
+
{ "name": "uri", "values": [] },
|
|
4110
|
+
{
|
|
4111
|
+
"name": "selected",
|
|
4112
|
+
"description": "When present, zn-page opens this tab on load instead of the first tab.",
|
|
4113
|
+
"values": []
|
|
4114
|
+
}
|
|
4115
|
+
],
|
|
4116
|
+
"references": [
|
|
4117
|
+
{ "name": "Documentation", "url": "https://zinc.style/components/tab" }
|
|
4118
|
+
]
|
|
4119
|
+
},
|
|
4120
4120
|
{
|
|
4121
4121
|
"name": "zn-table",
|
|
4122
4122
|
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@kubex/zinc",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.88",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -250,6 +250,44 @@
|
|
|
250
250
|
"events": []
|
|
251
251
|
}
|
|
252
252
|
},
|
|
253
|
+
{
|
|
254
|
+
"name": "zn-bulk-actions",
|
|
255
|
+
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
256
|
+
"doc-url": "",
|
|
257
|
+
"attributes": [
|
|
258
|
+
{ "name": "name", "value": { "type": "string" } },
|
|
259
|
+
{ "name": "value", "value": { "type": "PropertyKey" } },
|
|
260
|
+
{
|
|
261
|
+
"name": "actions",
|
|
262
|
+
"value": { "type": "BulkActionData", "default": "[]" }
|
|
263
|
+
}
|
|
264
|
+
],
|
|
265
|
+
"slots": [
|
|
266
|
+
{ "name": "", "description": "The default slot." },
|
|
267
|
+
{ "name": "example", "description": "An example slot." }
|
|
268
|
+
],
|
|
269
|
+
"events": [
|
|
270
|
+
{ "name": "zn-event-name", "description": "Emitted as an example." }
|
|
271
|
+
],
|
|
272
|
+
"js": {
|
|
273
|
+
"properties": [
|
|
274
|
+
{ "name": "container", "type": "HTMLDivElement" },
|
|
275
|
+
{ "name": "addRule", "type": "ZnSelect" },
|
|
276
|
+
{ "name": "input", "type": "HTMLInputElement" },
|
|
277
|
+
{ "name": "name", "type": "string" },
|
|
278
|
+
{ "name": "value", "type": "PropertyKey" },
|
|
279
|
+
{ "name": "actions", "type": "BulkActionData" },
|
|
280
|
+
{ "name": "validationMessage", "type": "string" },
|
|
281
|
+
{ "name": "validity", "type": "ValidityState" }
|
|
282
|
+
],
|
|
283
|
+
"events": [
|
|
284
|
+
{
|
|
285
|
+
"name": "zn-event-name",
|
|
286
|
+
"description": "Emitted as an example."
|
|
287
|
+
}
|
|
288
|
+
]
|
|
289
|
+
}
|
|
290
|
+
},
|
|
253
291
|
{
|
|
254
292
|
"name": "zn-button",
|
|
255
293
|
"description": "Buttons represent actions that are available to the user.\n---\n\n\n### **Events:**\n - **zn-blur** - Emitted when the button loses focus.\n- **zn-focus** - Emitted when the button gains focus.\n- **zn-invalid** - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\n### **Slots:**\n - _default_ - The button's label.\n- **prefix** - A presentational prefix icon or similar element.\n- **suffix** - A presentational suffix icon or similar element.\n- **cancel** - Slot for custom cancel button/content when autoClick is active.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **prefix** - The container that wraps the prefix.\n- **label** - The button's label.\n- **suffix** - The container that wraps the suffix.\n- **caret** - The button's caret icon, an `<zn-icon>` element.\n- **spinner** - The spinner that shows when the button is in the loading state.",
|
|
@@ -516,44 +554,6 @@
|
|
|
516
554
|
]
|
|
517
555
|
}
|
|
518
556
|
},
|
|
519
|
-
{
|
|
520
|
-
"name": "zn-bulk-actions",
|
|
521
|
-
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
522
|
-
"doc-url": "",
|
|
523
|
-
"attributes": [
|
|
524
|
-
{ "name": "name", "value": { "type": "string" } },
|
|
525
|
-
{ "name": "value", "value": { "type": "PropertyKey" } },
|
|
526
|
-
{
|
|
527
|
-
"name": "actions",
|
|
528
|
-
"value": { "type": "BulkActionData", "default": "[]" }
|
|
529
|
-
}
|
|
530
|
-
],
|
|
531
|
-
"slots": [
|
|
532
|
-
{ "name": "", "description": "The default slot." },
|
|
533
|
-
{ "name": "example", "description": "An example slot." }
|
|
534
|
-
],
|
|
535
|
-
"events": [
|
|
536
|
-
{ "name": "zn-event-name", "description": "Emitted as an example." }
|
|
537
|
-
],
|
|
538
|
-
"js": {
|
|
539
|
-
"properties": [
|
|
540
|
-
{ "name": "container", "type": "HTMLDivElement" },
|
|
541
|
-
{ "name": "addRule", "type": "ZnSelect" },
|
|
542
|
-
{ "name": "input", "type": "HTMLInputElement" },
|
|
543
|
-
{ "name": "name", "type": "string" },
|
|
544
|
-
{ "name": "value", "type": "PropertyKey" },
|
|
545
|
-
{ "name": "actions", "type": "BulkActionData" },
|
|
546
|
-
{ "name": "validationMessage", "type": "string" },
|
|
547
|
-
{ "name": "validity", "type": "ValidityState" }
|
|
548
|
-
],
|
|
549
|
-
"events": [
|
|
550
|
-
{
|
|
551
|
-
"name": "zn-event-name",
|
|
552
|
-
"description": "Emitted as an example."
|
|
553
|
-
}
|
|
554
|
-
]
|
|
555
|
-
}
|
|
556
|
-
},
|
|
557
557
|
{
|
|
558
558
|
"name": "zn-button-group",
|
|
559
559
|
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n\n### **CSS Properties:**\n - **--grow** - Use flex-grow to fill available space. _(default: undefined)_\n- **--start** - Justify content at the start of the flex space. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
@@ -9584,36 +9584,6 @@
|
|
|
9584
9584
|
"events": []
|
|
9585
9585
|
}
|
|
9586
9586
|
},
|
|
9587
|
-
{
|
|
9588
|
-
"name": "zn-tab",
|
|
9589
|
-
"description": "Defines a tab panel for use inside zn-page.\n---\n\n\n### **Slots:**\n - _default_ - The tab panel content.",
|
|
9590
|
-
"doc-url": "",
|
|
9591
|
-
"attributes": [
|
|
9592
|
-
{ "name": "caption", "value": { "type": "string" } },
|
|
9593
|
-
{ "name": "priority", "value": { "type": "number" } },
|
|
9594
|
-
{ "name": "uri", "value": { "type": "string" } },
|
|
9595
|
-
{
|
|
9596
|
-
"name": "selected",
|
|
9597
|
-
"description": "When present, zn-page opens this tab on load instead of the first tab.",
|
|
9598
|
-
"value": { "type": "boolean", "default": "false" }
|
|
9599
|
-
}
|
|
9600
|
-
],
|
|
9601
|
-
"slots": [{ "name": "", "description": "The tab panel content." }],
|
|
9602
|
-
"events": [],
|
|
9603
|
-
"js": {
|
|
9604
|
-
"properties": [
|
|
9605
|
-
{ "name": "caption", "type": "string" },
|
|
9606
|
-
{ "name": "priority", "type": "number" },
|
|
9607
|
-
{ "name": "uri", "type": "string" },
|
|
9608
|
-
{
|
|
9609
|
-
"name": "selected",
|
|
9610
|
-
"description": "When present, zn-page opens this tab on load instead of the first tab.",
|
|
9611
|
-
"type": "boolean"
|
|
9612
|
-
}
|
|
9613
|
-
],
|
|
9614
|
-
"events": []
|
|
9615
|
-
}
|
|
9616
|
-
},
|
|
9617
9587
|
{
|
|
9618
9588
|
"name": "zn-style",
|
|
9619
9589
|
"description": "\n---\n",
|
|
@@ -9707,6 +9677,36 @@
|
|
|
9707
9677
|
"events": []
|
|
9708
9678
|
}
|
|
9709
9679
|
},
|
|
9680
|
+
{
|
|
9681
|
+
"name": "zn-tab",
|
|
9682
|
+
"description": "Defines a tab panel for use inside zn-page.\n---\n\n\n### **Slots:**\n - _default_ - The tab panel content.",
|
|
9683
|
+
"doc-url": "",
|
|
9684
|
+
"attributes": [
|
|
9685
|
+
{ "name": "caption", "value": { "type": "string" } },
|
|
9686
|
+
{ "name": "priority", "value": { "type": "number" } },
|
|
9687
|
+
{ "name": "uri", "value": { "type": "string" } },
|
|
9688
|
+
{
|
|
9689
|
+
"name": "selected",
|
|
9690
|
+
"description": "When present, zn-page opens this tab on load instead of the first tab.",
|
|
9691
|
+
"value": { "type": "boolean", "default": "false" }
|
|
9692
|
+
}
|
|
9693
|
+
],
|
|
9694
|
+
"slots": [{ "name": "", "description": "The tab panel content." }],
|
|
9695
|
+
"events": [],
|
|
9696
|
+
"js": {
|
|
9697
|
+
"properties": [
|
|
9698
|
+
{ "name": "caption", "type": "string" },
|
|
9699
|
+
{ "name": "priority", "type": "number" },
|
|
9700
|
+
{ "name": "uri", "type": "string" },
|
|
9701
|
+
{
|
|
9702
|
+
"name": "selected",
|
|
9703
|
+
"description": "When present, zn-page opens this tab on load instead of the first tab.",
|
|
9704
|
+
"type": "boolean"
|
|
9705
|
+
}
|
|
9706
|
+
],
|
|
9707
|
+
"events": []
|
|
9708
|
+
}
|
|
9709
|
+
},
|
|
9710
9710
|
{
|
|
9711
9711
|
"name": "zn-table",
|
|
9712
9712
|
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
package/dist/zn.d.ts
CHANGED
|
@@ -6356,33 +6356,6 @@ declare module "components/editor/modules/attachment/attachment" {
|
|
|
6356
6356
|
private _uploadAttachment;
|
|
6357
6357
|
}
|
|
6358
6358
|
}
|
|
6359
|
-
declare module "components/editor/modules/context-menu/context-menu-component" {
|
|
6360
|
-
import { type CSSResultGroup, type PropertyValues } from 'lit';
|
|
6361
|
-
import ZincElement from "internal/zinc-element";
|
|
6362
|
-
export interface ResultItem {
|
|
6363
|
-
icon: string;
|
|
6364
|
-
label: string;
|
|
6365
|
-
format?: string;
|
|
6366
|
-
key?: string;
|
|
6367
|
-
value?: string | boolean;
|
|
6368
|
-
order?: number;
|
|
6369
|
-
}
|
|
6370
|
-
export default class ContextMenuComponent extends ZincElement {
|
|
6371
|
-
static styles: CSSResultGroup;
|
|
6372
|
-
open: boolean;
|
|
6373
|
-
query: string;
|
|
6374
|
-
results: ResultItem[];
|
|
6375
|
-
private _activeIndex;
|
|
6376
|
-
show(): void;
|
|
6377
|
-
hide(): void;
|
|
6378
|
-
setPosition(left: number, top: number): void;
|
|
6379
|
-
setActiveIndex(index: number): void;
|
|
6380
|
-
getActiveIndex(): number;
|
|
6381
|
-
private _onClickItem;
|
|
6382
|
-
protected willUpdate(changed: PropertyValues): void;
|
|
6383
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
6384
|
-
}
|
|
6385
|
-
}
|
|
6386
6359
|
declare module "components/editor/modules/context-menu/quick-action/quick-action.component" {
|
|
6387
6360
|
import ZincElement from "internal/zinc-element";
|
|
6388
6361
|
export default class ZnEditorQuickAction extends ZincElement {
|
|
@@ -6406,29 +6379,30 @@ declare module "components/editor/modules/context-menu/quick-action/index" {
|
|
|
6406
6379
|
}
|
|
6407
6380
|
}
|
|
6408
6381
|
declare module "components/editor/modules/context-menu/context-menu" {
|
|
6409
|
-
import "components/editor/modules/context-menu/context-menu-component";
|
|
6410
6382
|
import Quill from "quill";
|
|
6411
6383
|
import type { EditorFeatureConfig } from "components/editor/editor.component";
|
|
6412
6384
|
class ContextMenu {
|
|
6413
6385
|
private _quill;
|
|
6414
6386
|
private readonly _toolbarModule;
|
|
6415
|
-
private
|
|
6387
|
+
private _menu;
|
|
6416
6388
|
private _startIndex;
|
|
6389
|
+
/** Trigger position the user dismissed with Escape; the menu stays shut until they move off it. */
|
|
6390
|
+
private _dismissedIndex;
|
|
6417
6391
|
private _keydownHandler;
|
|
6418
6392
|
private _docClickHandler;
|
|
6419
6393
|
private _featureConfig;
|
|
6394
|
+
private readonly _caretAnchor;
|
|
6420
6395
|
constructor(quill: Quill, options: {
|
|
6421
6396
|
config: EditorFeatureConfig;
|
|
6422
6397
|
});
|
|
6423
6398
|
private initComponent;
|
|
6424
6399
|
private attachEvents;
|
|
6425
|
-
private createComponent;
|
|
6426
6400
|
private onDocumentClick;
|
|
6427
6401
|
private updateFromEditor;
|
|
6428
|
-
private
|
|
6402
|
+
private caretRect;
|
|
6429
6403
|
private getToolbarQuery;
|
|
6430
6404
|
private onKeydown;
|
|
6431
|
-
private
|
|
6405
|
+
private onItemSelect;
|
|
6432
6406
|
private _clickToolbarItem;
|
|
6433
6407
|
private _applySelectedFormat;
|
|
6434
6408
|
private deleteLastIndex;
|