@kubex/zinc 1.1.86 → 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.
@@ -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.",
@@ -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.86",
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.",
package/dist/zn.d.ts CHANGED
@@ -1989,6 +1989,8 @@ declare module "components/slash-menu/slash-menu.component" {
1989
1989
  reposition(): void;
1990
1990
  connectedCallback(): void;
1991
1991
  disconnectedCallback(): void;
1992
+ private showPanelPopover;
1993
+ private hidePanelPopover;
1992
1994
  private startPositioner;
1993
1995
  private stopPositioner;
1994
1996
  private position;
@@ -6354,33 +6356,6 @@ declare module "components/editor/modules/attachment/attachment" {
6354
6356
  private _uploadAttachment;
6355
6357
  }
6356
6358
  }
6357
- declare module "components/editor/modules/context-menu/context-menu-component" {
6358
- import { type CSSResultGroup, type PropertyValues } from 'lit';
6359
- import ZincElement from "internal/zinc-element";
6360
- export interface ResultItem {
6361
- icon: string;
6362
- label: string;
6363
- format?: string;
6364
- key?: string;
6365
- value?: string | boolean;
6366
- order?: number;
6367
- }
6368
- export default class ContextMenuComponent extends ZincElement {
6369
- static styles: CSSResultGroup;
6370
- open: boolean;
6371
- query: string;
6372
- results: ResultItem[];
6373
- private _activeIndex;
6374
- show(): void;
6375
- hide(): void;
6376
- setPosition(left: number, top: number): void;
6377
- setActiveIndex(index: number): void;
6378
- getActiveIndex(): number;
6379
- private _onClickItem;
6380
- protected willUpdate(changed: PropertyValues): void;
6381
- render(): import("lit-html").TemplateResult<1>;
6382
- }
6383
- }
6384
6359
  declare module "components/editor/modules/context-menu/quick-action/quick-action.component" {
6385
6360
  import ZincElement from "internal/zinc-element";
6386
6361
  export default class ZnEditorQuickAction extends ZincElement {
@@ -6404,29 +6379,30 @@ declare module "components/editor/modules/context-menu/quick-action/index" {
6404
6379
  }
6405
6380
  }
6406
6381
  declare module "components/editor/modules/context-menu/context-menu" {
6407
- import "components/editor/modules/context-menu/context-menu-component";
6408
6382
  import Quill from "quill";
6409
6383
  import type { EditorFeatureConfig } from "components/editor/editor.component";
6410
6384
  class ContextMenu {
6411
6385
  private _quill;
6412
6386
  private readonly _toolbarModule;
6413
- private _component;
6387
+ private _menu;
6414
6388
  private _startIndex;
6389
+ /** Trigger position the user dismissed with Escape; the menu stays shut until they move off it. */
6390
+ private _dismissedIndex;
6415
6391
  private _keydownHandler;
6416
6392
  private _docClickHandler;
6417
6393
  private _featureConfig;
6394
+ private readonly _caretAnchor;
6418
6395
  constructor(quill: Quill, options: {
6419
6396
  config: EditorFeatureConfig;
6420
6397
  });
6421
6398
  private initComponent;
6422
6399
  private attachEvents;
6423
- private createComponent;
6424
6400
  private onDocumentClick;
6425
6401
  private updateFromEditor;
6426
- private positionComponent;
6402
+ private caretRect;
6427
6403
  private getToolbarQuery;
6428
6404
  private onKeydown;
6429
- private onToolbarSelect;
6405
+ private onItemSelect;
6430
6406
  private _clickToolbarItem;
6431
6407
  private _applySelectedFormat;
6432
6408
  private deleteLastIndex;