@qalma/kit 0.3.0 → 0.5.0

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.
@@ -1,41 +1,18 @@
1
- import { ClassValue } from 'clsx';
1
+ import { QalmaDragHandleView, QalmaDragDropIndicator, QalmaDragBlockHighlight, QalmaSuggestionMenu, LinkPopover, QalmaContextualToolbarPlacement } from '@qalma/kit/headless';
2
+ export * from '@qalma/kit/headless';
2
3
  import * as _angular_core from '@angular/core';
3
- import { TemplateRef, DestroyRef, ElementRef, Signal } from '@angular/core';
4
- import * as class_variance_authority_types from 'class-variance-authority/types';
5
- import { VariantProps } from 'class-variance-authority';
6
- import { DragHandleMoveCommandValue, DragHandleCommandValue, QalmaEditorController, QalmaCommandValue } from '@qalma/editor';
7
- import * as _qalma_kit from '@qalma/kit';
8
-
9
- declare function cn(...inputs: ClassValue[]): string;
10
-
11
- declare const buttonVariants: (props?: ({
12
- variant?: "default" | "secondary" | "outline" | "ghost" | "accent" | "link" | null | undefined;
13
- size?: "default" | "sm" | "lg" | "icon" | null | undefined;
14
- } & class_variance_authority_types.ClassProp) | undefined) => string;
15
- type ButtonVariant = NonNullable<VariantProps<typeof buttonVariants>['variant']>;
16
- type ButtonSize = NonNullable<VariantProps<typeof buttonVariants>['size']>;
17
- /**
18
- * Headless-styled button directive so it composes onto native `<button>` and
19
- * `<a>` elements while reading from the host's Tailwind design tokens.
20
- */
21
- declare class QalmaButton {
22
- private readonly host;
23
- private readonly initialClass;
24
- readonly variant: _angular_core.InputSignal<ButtonVariant>;
25
- readonly size: _angular_core.InputSignal<ButtonSize>;
26
- protected readonly computedClass: _angular_core.Signal<string>;
27
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<QalmaButton, never>;
28
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<QalmaButton, "button[qalmaBtn], a[qalmaBtn]", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
29
- }
4
+ import { TemplateRef } from '@angular/core';
5
+ import { QalmaEditorController, QalmaCommandValue } from '@qalma/editor';
30
6
 
31
7
  /**
32
8
  * Default styling for a toolbar command button. Icon-only, square, and driven
33
9
  * entirely by the host's shadcn-style design tokens (`text-muted-foreground`,
34
- * `bg-secondary`, `bg-accent-subtle`…) so it themes with the surrounding app.
10
+ * `bg-card`, `bg-secondary`, `bg-accent-subtle`…) so it themes with the
11
+ * surrounding app.
35
12
  * The `qalma-command-active` class is toggled by the `QalmaCommand` directive
36
13
  * when the underlying command is active.
37
14
  */
38
- declare const TOOLBAR_BUTTON_CLASS = "inline-flex h-[1.85rem] w-[1.85rem] cursor-pointer items-center justify-center rounded-[0.4rem] border border-transparent text-muted-foreground transition hover:bg-secondary hover:text-foreground disabled:cursor-not-allowed disabled:opacity-45 [&.qalma-command-active]:border-accent/40 [&.qalma-command-active]:bg-accent-subtle [&.qalma-command-active]:text-accent";
15
+ declare const TOOLBAR_BUTTON_CLASS = "inline-flex h-[1.85rem] w-[1.85rem] cursor-pointer items-center justify-center rounded-[0.4rem] border border-border bg-card text-muted-foreground transition hover:border-accent/50 hover:bg-secondary hover:text-foreground disabled:cursor-not-allowed disabled:opacity-45 [&.qalma-command-active]:border-accent/40 [&.qalma-command-active]:bg-accent-subtle [&.qalma-command-active]:text-accent";
39
16
  /**
40
17
  * Generic, declarative toolbar button for a single editor command.
41
18
  *
@@ -60,7 +37,7 @@ declare class QalmaToolbarButton {
60
37
  readonly label: _angular_core.InputSignal<string>;
61
38
  /** Optional icon-size class override (default: `text-[0.9rem]`). */
62
39
  readonly iconClass: _angular_core.InputSignal<string>;
63
- protected readonly buttonClass = "inline-flex h-[1.85rem] w-[1.85rem] cursor-pointer items-center justify-center rounded-[0.4rem] border border-transparent text-muted-foreground transition hover:bg-secondary hover:text-foreground disabled:cursor-not-allowed disabled:opacity-45 [&.qalma-command-active]:border-accent/40 [&.qalma-command-active]:bg-accent-subtle [&.qalma-command-active]:text-accent";
40
+ protected readonly buttonClass = "inline-flex h-[1.85rem] w-[1.85rem] cursor-pointer items-center justify-center rounded-[0.4rem] border border-border bg-card text-muted-foreground transition hover:border-accent/50 hover:bg-secondary hover:text-foreground disabled:cursor-not-allowed disabled:opacity-45 [&.qalma-command-active]:border-accent/40 [&.qalma-command-active]:bg-accent-subtle [&.qalma-command-active]:text-accent";
64
41
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<QalmaToolbarButton, never>;
65
42
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<QalmaToolbarButton, "qalma-toolbar-button", never, { "command": { "alias": "command"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "iconClass": { "alias": "iconClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
66
43
  }
@@ -145,152 +122,6 @@ declare class QalmaToolbarRegistry {
145
122
  */
146
123
  declare function provideQalmaToolbarIcons(): _angular_core.Provider[];
147
124
 
148
- interface AnchorRect {
149
- readonly top: number;
150
- readonly bottom: number;
151
- readonly left: number;
152
- readonly right: number;
153
- }
154
- interface AnchorSize {
155
- readonly width: number;
156
- readonly height: number;
157
- }
158
- type AnchorPlacement = 'top' | 'bottom' | 'left' | 'right';
159
- type AnchorAlign = 'start' | 'center' | 'end';
160
- interface AnchorToRectOptions {
161
- /** Which side of the anchor rect the floating element renders on. */
162
- readonly placement: AnchorPlacement;
163
- /** Rect (viewport or scroll surface) the result is clamped within. */
164
- readonly boundary: AnchorRect;
165
- /** Size of the floating element being positioned. */
166
- readonly size: AnchorSize;
167
- /** Distance between the anchor rect and the floating element. Default 8. */
168
- readonly gap?: number;
169
- /** Minimum distance kept from the boundary edges. Default 8. */
170
- readonly edgeMargin?: number;
171
- /**
172
- * Cross-axis alignment relative to the anchor rect. `start` | `center` |
173
- * `end` align to the anchor rect itself; a number instead pins the
174
- * floating element's center to that viewport coordinate (clamped within
175
- * the anchor rect), e.g. to follow a pointer's Y while hovering a tall
176
- * block. Defaults to `start`.
177
- */
178
- readonly align?: AnchorAlign | number;
179
- }
180
- interface AnchorPosition {
181
- readonly top: number;
182
- readonly left: number;
183
- }
184
- declare function anchorToRect(anchor: AnchorRect, options: AnchorToRectOptions): AnchorPosition;
185
-
186
- interface DismissibleOverlayOptions {
187
- /** Returns true when the event target is part of the overlay/trigger and should not dismiss it. */
188
- isInside: (target: EventTarget | null) => boolean;
189
- onDismiss: () => void;
190
- }
191
- /**
192
- * Shared outside-click / Escape dismiss behavior for floating overlays
193
- * (popovers, contextual menus, autocomplete lists). Generalizes the
194
- * ad-hoc click-outside/Escape handling that used to be reimplemented
195
- * separately per feature.
196
- */
197
- declare class DismissibleOverlay {
198
- private readonly options;
199
- private readonly pointerDown;
200
- private readonly keydown;
201
- constructor(options: DismissibleOverlayOptions);
202
- connect(destroyRef: DestroyRef): void;
203
- }
204
-
205
- interface KeyboardNavigableListOptions<T> {
206
- items: () => readonly T[];
207
- activeIndex: () => number;
208
- setActiveIndex: (index: number) => void;
209
- onSelect: (item: T, index: number) => void;
210
- }
211
- /**
212
- * Arrow-key navigation + Enter-to-select for autocomplete-style popovers
213
- * (mention menu, slash command menu). Shared so both features stop
214
- * reimplementing the same wrap-around index math.
215
- *
216
- * Takes a plain key string rather than a `KeyboardEvent` — some callers
217
- * relay keys through a `CustomEvent` (no real `KeyboardEvent` to read),
218
- * so preventing the default action is left to the caller.
219
- */
220
- declare class KeyboardNavigableList<T> {
221
- private readonly options;
222
- constructor(options: KeyboardNavigableListOptions<T>);
223
- /** Returns true when the key was handled (caller should stop further propagation / preventDefault). */
224
- handleKey(key: string): boolean;
225
- }
226
-
227
- interface QalmaDragHandleView {
228
- target: DragHandleCommandValue;
229
- transform: string;
230
- blockType: string;
231
- canMoveUp: boolean;
232
- canMoveDown: boolean;
233
- }
234
- interface QalmaDragDropIndicator {
235
- target: DragHandleMoveCommandValue;
236
- transform: string;
237
- width: number;
238
- }
239
- interface QalmaDragBlockHighlight {
240
- transform: string;
241
- width: number;
242
- height: number;
243
- }
244
- declare class QalmaDragHandleController {
245
- private readonly editor;
246
- private readonly handleState;
247
- private readonly dropIndicatorState;
248
- private readonly draggedBlockHighlightState;
249
- readonly handle: _angular_core.Signal<QalmaDragHandleView | null>;
250
- readonly dropIndicator: _angular_core.Signal<QalmaDragDropIndicator | null>;
251
- readonly draggedBlockHighlight: _angular_core.Signal<QalmaDragBlockHighlight | null>;
252
- private surface;
253
- private currentBlock;
254
- private pendingBlock;
255
- private lastPointerClientY;
256
- private refreshFrame;
257
- private handleKey;
258
- private dragSession;
259
- constructor(editor: () => QalmaEditorController);
260
- connect(surface: HTMLElement, destroyRef: DestroyRef): void;
261
- hide(): void;
262
- startDrag(event: PointerEvent, handle: QalmaDragHandleView): void;
263
- private handlePointerMove;
264
- private handlePointerLeave;
265
- private handleDragPointerMove;
266
- private handleDragPointerUp;
267
- private activateDragSession;
268
- private updateDropIndicator;
269
- private updateDraggedBlockHighlight;
270
- private finishDrag;
271
- private scheduleRefresh;
272
- private refresh;
273
- private updateFromBlock;
274
- private cancelScheduledRefresh;
275
- private setHandle;
276
- private setDropIndicator;
277
- }
278
-
279
- declare class QalmaDragHandleDirective {
280
- readonly editor: _angular_core.InputSignal<QalmaEditorController>;
281
- private readonly destroyRef;
282
- private readonly host;
283
- private readonly controller;
284
- readonly handle: _angular_core.Signal<QalmaDragHandleView | null>;
285
- readonly dropIndicator: _angular_core.Signal<_qalma_kit.QalmaDragDropIndicator | null>;
286
- readonly draggedBlockHighlight: _angular_core.Signal<_qalma_kit.QalmaDragBlockHighlight | null>;
287
- constructor();
288
- hide(): void;
289
- startDrag(event: PointerEvent, handle: QalmaDragHandleView): void;
290
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<QalmaDragHandleDirective, never>;
291
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<QalmaDragHandleDirective, "[qalmaDragHandle]", ["qalmaDragHandle"], { "editor": { "alias": "qalmaDragHandle"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
292
- }
293
-
294
125
  interface QalmaDragStart {
295
126
  event: PointerEvent;
296
127
  handle: QalmaDragHandleView;
@@ -315,74 +146,6 @@ declare class QalmaDragHandle {
315
146
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<QalmaDragHandle, "qalma-drag-handle", never, { "editor": { "alias": "editor"; "required": true; "isSignal": true; }; "handle": { "alias": "handle"; "required": false; "isSignal": true; }; "dropIndicator": { "alias": "dropIndicator"; "required": false; "isSignal": true; }; "draggedBlockHighlight": { "alias": "draggedBlockHighlight"; "required": false; "isSignal": true; }; }, { "dismiss": "dismiss"; "dragStart": "dragStart"; }, never, never, true, never>;
316
147
  }
317
148
 
318
- /**
319
- * Fixed-position coordinates for a suggestion menu anchored to a caret/range
320
- * rect. Exactly one of `top`/`bottom` is a number (the other is `null`): the
321
- * menu is pinned below the anchor by `top`, or above it by `bottom`.
322
- */
323
- interface SuggestionMenuPlacement {
324
- readonly left: number;
325
- readonly top: number | null;
326
- readonly bottom: number | null;
327
- readonly maxHeight: number;
328
- }
329
- interface FlipAbovePlacementOptions {
330
- /** Menu width, used to clamp `left` within the viewport. */
331
- readonly width: number;
332
- /** Ideal menu height for the current option count. */
333
- readonly desiredHeight: number;
334
- /** Floor for the computed `maxHeight` (e.g. one option / a loading row). */
335
- readonly minHeight: number;
336
- /** Viewport edge margin (default 12). */
337
- readonly margin?: number;
338
- /** Gap between the anchor and the menu (default 8). */
339
- readonly gap?: number;
340
- }
341
- /**
342
- * Positions a floating list under an anchor rect, flipping it above when there
343
- * is not enough room below, and clamping its height and horizontal position to
344
- * the viewport. Shared by the mention and slash-command menus, whose flip
345
- * behavior `anchorToRect` does not cover (it has no flip / dynamic max-height).
346
- */
347
- declare function flipAbovePlacement(rect: {
348
- readonly top: number;
349
- readonly bottom: number;
350
- readonly left: number;
351
- }, options: FlipAbovePlacementOptions): SuggestionMenuPlacement;
352
-
353
- /** Option buttons carry this attribute so the base can focus/scroll to one by index. */
354
- declare const SUGGESTION_OPTION_INDEX_ATTR = "data-suggestion-index";
355
- /** The scrollable options container carries this attribute (optional). */
356
- declare const SUGGESTION_OPTIONS_SCROLLER_ATTR = "data-suggestion-options";
357
- /**
358
- * Shared behavior for caret-anchored suggestion menus (mention, slash command):
359
- * flip-above placement input, active-option highlighting, and in-menu keyboard
360
- * handling (Escape dismisses, Arrow moves + focuses, Enter/Space picks) with
361
- * wrap-around and optional scroll-into-view. Concrete menus only supply their
362
- * own item markup and expose their option list via `optionList`.
363
- */
364
- declare abstract class QalmaSuggestionMenu<TOption extends {
365
- readonly id: string;
366
- }> {
367
- protected readonly elementRef: ElementRef<HTMLElement>;
368
- readonly placement: _angular_core.InputSignal<SuggestionMenuPlacement | null>;
369
- readonly activeIndex: _angular_core.InputSignal<number>;
370
- readonly activate: _angular_core.OutputEmitterRef<number>;
371
- readonly pick: _angular_core.OutputEmitterRef<TOption>;
372
- readonly dismiss: _angular_core.OutputEmitterRef<void>;
373
- /** The rendered options, bound by the concrete menu (`options`/`suggestions`). */
374
- protected abstract readonly optionList: Signal<readonly TOption[]>;
375
- protected preserveSelection(event: MouseEvent): void;
376
- protected handleOptionKeydown(event: KeyboardEvent, option: TOption, index: number): void;
377
- protected focusOption(index: number): void;
378
- protected scrollOptionIntoView(index: number): void;
379
- private getNextIndex;
380
- private optionElement;
381
- private optionsScroller;
382
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<QalmaSuggestionMenu<any>, never>;
383
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<QalmaSuggestionMenu<any>, never, never, { "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "activeIndex": { "alias": "activeIndex"; "required": false; "isSignal": true; }; }, { "activate": "activate"; "pick": "pick"; "dismiss": "dismiss"; }, never, never, true, never>;
384
- }
385
-
386
149
  interface QalmaMentionOption {
387
150
  readonly id: string;
388
151
  readonly label: string;
@@ -430,40 +193,6 @@ declare class QalmaSlashCommandMenu extends QalmaSuggestionMenu<QalmaSlashComman
430
193
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<QalmaSlashCommandMenu, "qalma-slash-command-menu", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
431
194
  }
432
195
 
433
- interface LinkPopover extends LinkPopoverPlacement {
434
- editing: boolean;
435
- element: HTMLAnchorElement | null;
436
- href: string;
437
- rel: string | null;
438
- target: '_blank' | null;
439
- text: string;
440
- }
441
- interface LinkPopoverPlacement {
442
- left: number;
443
- top: number;
444
- }
445
- declare function createLinkPopoverPlacement(element: HTMLElement): LinkPopoverPlacement;
446
- declare function findEditorLinkElement(target: EventTarget | null): HTMLAnchorElement | null;
447
-
448
- declare class LinkPopoverController {
449
- private readonly editor;
450
- readonly popover: _angular_core.WritableSignal<LinkPopover | null>;
451
- readonly href: _angular_core.WritableSignal<string>;
452
- private hideTimeout;
453
- constructor(editor: QalmaEditorController);
454
- showToolbarEditor(event: MouseEvent): void;
455
- showPreview(event: Event): void;
456
- scheduleHideFromEvent(event: MouseEvent | FocusEvent): void;
457
- edit(popover: LinkPopover): void;
458
- save(popover: LinkPopover): void;
459
- remove(popover: LinkPopover): void;
460
- hide(): void;
461
- keepOpen(): void;
462
- scheduleHide(): void;
463
- private selectLink;
464
- private clearHideTimeout;
465
- }
466
-
467
196
  declare class QalmaLinkPopover {
468
197
  readonly popover: _angular_core.InputSignal<LinkPopover | null>;
469
198
  readonly href: _angular_core.InputSignal<string>;
@@ -479,52 +208,40 @@ declare class QalmaLinkPopover {
479
208
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<QalmaLinkPopover, "qalma-link-popover", never, { "popover": { "alias": "popover"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": true; "isSignal": true; }; }, { "hrefChange": "hrefChange"; "edit": "edit"; "save": "save"; "remove": "remove"; "dismiss": "dismiss"; "keepOpen": "keepOpen"; "scheduleHide": "scheduleHide"; }, never, never, true, never>;
480
209
  }
481
210
 
482
- interface QalmaContextualToolbarPlacement {
483
- transform: string;
484
- }
211
+ /**
212
+ * Floating, selection-anchored toolbar container. It owns the hard parts — the
213
+ * fixed-position `transform` from a {@link QalmaContextualToolbarPlacement}
214
+ * (see `QalmaSelectionToolbarDirective`), preserving the editor selection on
215
+ * pointer-down, and Escape-to-dismiss — and projects whatever controls you put
216
+ * inside it. Nothing about the button set is baked in: compose
217
+ * `<qalma-toolbar-button>` for commands and your own buttons for app actions
218
+ * (opening a link editor, a color picker, an AI action…).
219
+ *
220
+ * The container's `mousedown` handler preserves the selection for every
221
+ * projected control via event bubbling, so inner buttons don't each need to.
222
+ *
223
+ * ```html
224
+ * <qalma-contextual-toolbar
225
+ * [placement]="selection.placement()"
226
+ * (dismiss)="selection.hide()"
227
+ * >
228
+ * <qalma-toolbar-button command="toggleBold" icon="lucideBold" label="Bold" />
229
+ * <qalma-toolbar-button command="toggleItalic" icon="lucideItalic" label="Italic" />
230
+ * <button type="button" [class]="TOOLBAR_BUTTON_CLASS" (click)="openLinkEditor()">…</button>
231
+ * </qalma-contextual-toolbar>
232
+ * ```
233
+ */
485
234
  declare class QalmaContextualToolbar {
486
- readonly editor: _angular_core.InputSignal<QalmaEditorController>;
487
235
  readonly placement: _angular_core.InputSignal<QalmaContextualToolbarPlacement | null>;
488
- readonly requestLink: _angular_core.OutputEmitterRef<MouseEvent>;
236
+ /** Accessible name for the toolbar region. */
237
+ readonly label: _angular_core.InputSignal<string>;
489
238
  readonly dismiss: _angular_core.OutputEmitterRef<void>;
490
- protected readonly canSetLink: _angular_core.Signal<boolean>;
491
- protected readonly linkActive: _angular_core.Signal<boolean>;
492
239
  protected preserveSelection(event: MouseEvent): void;
493
240
  protected dismissFromKeyboard(event: Event): void;
494
241
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<QalmaContextualToolbar, never>;
495
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<QalmaContextualToolbar, "qalma-contextual-toolbar", never, { "editor": { "alias": "editor"; "required": true; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; }, { "requestLink": "requestLink"; "dismiss": "dismiss"; }, never, never, true, never>;
496
- }
497
-
498
- declare class QalmaSelectionToolbarController {
499
- private readonly editor;
500
- private readonly placementState;
501
- readonly placement: _angular_core.Signal<QalmaContextualToolbarPlacement | null>;
502
- private surface;
503
- private refreshFrame;
504
- private placementKey;
505
- constructor(editor: () => QalmaEditorController);
506
- connect(surface: HTMLElement, destroyRef: DestroyRef): void;
507
- refresh(): void;
508
- hide(): void;
509
- handleKeydown(event: Event): void;
510
- private scheduleRefresh;
511
- private cancelScheduledRefresh;
512
- private setPlacement;
513
- }
514
-
515
- declare class QalmaSelectionToolbarDirective {
516
- readonly editor: _angular_core.InputSignal<QalmaEditorController>;
517
- private readonly destroyRef;
518
- private readonly host;
519
- private readonly controller;
520
- readonly placement: _angular_core.Signal<_qalma_kit.QalmaContextualToolbarPlacement | null>;
521
- constructor();
522
- refresh(): void;
523
- hide(): void;
524
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<QalmaSelectionToolbarDirective, never>;
525
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<QalmaSelectionToolbarDirective, "[qalmaSelectionToolbar]", ["qalmaSelectionToolbar"], { "editor": { "alias": "qalmaSelectionToolbar"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
242
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<QalmaContextualToolbar, "qalma-contextual-toolbar", never, { "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, { "dismiss": "dismiss"; }, never, ["*"], true, never>;
526
243
  }
527
244
 
528
- export { DismissibleOverlay, KeyboardNavigableList, LinkPopoverController, QALMA_TOOLBAR_ALIGN, QALMA_TOOLBAR_CLEAR_FORMATTING, QALMA_TOOLBAR_HEADINGS, QALMA_TOOLBAR_HISTORY, QALMA_TOOLBAR_INLINE_MARKS, QALMA_TOOLBAR_LISTS, QALMA_TOOLBAR_TABLE_INSERT, QALMA_TOOLBAR_TABLE_OPS, QALMA_TOOLBAR_UNSET_LINK, QalmaButton, QalmaContextualToolbar, QalmaDragHandle, QalmaDragHandleController, QalmaDragHandleDirective, QalmaLinkPopover, QalmaMentionMenu, QalmaSelectionToolbarController, QalmaSelectionToolbarDirective, QalmaSlashCommandMenu, QalmaSuggestionMenu, QalmaToolbarButton, QalmaToolbarRegistry, SUGGESTION_OPTIONS_SCROLLER_ATTR, SUGGESTION_OPTION_INDEX_ATTR, TOOLBAR_BUTTON_CLASS, TOOLBAR_SEPARATOR_CLASS, anchorToRect, buttonVariants, cn, createLinkPopoverPlacement, findEditorLinkElement, flipAbovePlacement, isToolbarCommandItem, provideQalmaToolbarIcons };
529
- export type { AnchorAlign, AnchorPlacement, AnchorPosition, AnchorRect, AnchorSize, AnchorToRectOptions, ButtonSize, ButtonVariant, DismissibleOverlayOptions, FlipAbovePlacementOptions, KeyboardNavigableListOptions, LinkPopover, LinkPopoverPlacement, QalmaContextualToolbarPlacement, QalmaDragBlockHighlight, QalmaDragDropIndicator, QalmaDragHandleView, QalmaDragStart, QalmaMentionOption, QalmaSlashCommandOption, SuggestionMenuPlacement, ToolbarCommandItem, ToolbarGroup, ToolbarItem, ToolbarTemplateItem };
245
+ export { QALMA_TOOLBAR_ALIGN, QALMA_TOOLBAR_CLEAR_FORMATTING, QALMA_TOOLBAR_HEADINGS, QALMA_TOOLBAR_HISTORY, QALMA_TOOLBAR_INLINE_MARKS, QALMA_TOOLBAR_LISTS, QALMA_TOOLBAR_TABLE_INSERT, QALMA_TOOLBAR_TABLE_OPS, QALMA_TOOLBAR_UNSET_LINK, QalmaContextualToolbar, QalmaDragHandle, QalmaLinkPopover, QalmaMentionMenu, QalmaSlashCommandMenu, QalmaToolbarButton, QalmaToolbarRegistry, TOOLBAR_BUTTON_CLASS, TOOLBAR_SEPARATOR_CLASS, isToolbarCommandItem, provideQalmaToolbarIcons };
246
+ export type { QalmaDragStart, QalmaMentionOption, QalmaSlashCommandOption, ToolbarCommandItem, ToolbarGroup, ToolbarItem, ToolbarTemplateItem };
530
247
  //# sourceMappingURL=qalma-kit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"qalma-kit.d.ts","sources":["../../../../libs/ui-kit/src/lib/cn.ts","../../../../libs/ui-kit/src/lib/button.ts","../../../../libs/ui-kit/src/lib/toolbar-button.ts","../../../../libs/ui-kit/src/lib/toolbar-commands.ts","../../../../libs/ui-kit/src/lib/toolbar-registry.ts","../../../../libs/ui-kit/src/lib/toolbar-icons.ts","../../../../libs/ui-kit/src/lib/anchor-to-rect.ts","../../../../libs/ui-kit/src/lib/dismissible-overlay.ts","../../../../libs/ui-kit/src/lib/keyboard-navigable-list.ts","../../../../libs/ui-kit/src/lib/drag-handle-controller.ts","../../../../libs/ui-kit/src/lib/drag-handle-directive.ts","../../../../libs/ui-kit/src/lib/drag-handle.ts","../../../../libs/ui-kit/src/lib/flip-above-placement.ts","../../../../libs/ui-kit/src/lib/suggestion-menu-base.ts","../../../../libs/ui-kit/src/lib/mention-menu.ts","../../../../libs/ui-kit/src/lib/slash-command-menu.ts","../../../../libs/ui-kit/src/lib/link-popover.model.ts","../../../../libs/ui-kit/src/lib/link-popover-controller.ts","../../../../libs/ui-kit/src/lib/link-popover.ts","../../../../libs/ui-kit/src/lib/contextual-toolbar.ts","../../../../libs/ui-kit/src/lib/selection-toolbar-controller.ts","../../../../libs/ui-kit/src/lib/selection-toolbar-directive.ts"],"mappings":";;;;;;;;AAGA,iBAAgB,EAAE,YAAY,UAAU;;ACExC,cAAa,cAAc;;;;AA6BrB,KAAM,aAAa,GAAG,WAAW,CACrC,YAAY,QAAQ,cAAc;AAE9B,KAAM,UAAU,GAAG,WAAW,CAClC,YAAY,QAAQ,cAAc;AAGpC;;;AAGG;AACH,cAMa,WAAW;AACtB;AACA;sBAGgB,aAAA,CAAA,WAAA,CAAA,aAAA;mBACH,aAAA,CAAA,WAAA,CAAA,U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AA,CAAA,gBAAA,CAAA,WAAA;sBACC,aAAA,CAAA,gBAAA;uBACC,aAAA,CAAA,gBAAA;2BACI,aAAA,CAAA,gBAAA;AAErB,gCAA4B,KAAK;oDAZtB,gBAAgB;sDAAhB,gBAAgB;AAmB5B;;UCnIgB,+BAA+B;;AAE/C;AAED,cA+Ga,sBAAsB;qBAClB,aAAA,CAAA,WAAA,CAAA,qBAAA;wBACG,aAAA,CAAA,WAAA,CAAA,+BAAA;0BAGE,aAAA,CAAA,gBAAA,CAAA,UAAA;sBACJ,aAAA,CAAA,gBAAA;AAEhB,mCAA6B,aAAA,CAAA,MAAA;AAG7B,mCAA6B,aAAA,CAAA,MAAA;AAI7B,uCAAmC,UAAU;AAI7C,yCAAqC,KAAK;oDAnB/B,sBAAsB;sDAAtB,sBAAsB;AAuBlC;;ACtJD,cAAa,+BAA+B;;AAC1C;wBAEkB,aAAA,CAAA,MAAA,CAAA,+BAAA;;;;8BAMyB,qBAAqB;qBAE/C,WAAW,cAAc,UAAU;AAkCpD;AAmDA;AAIA,yBAAqB,KAAK;AAa1B;AAWA;AASA;AAYD;;AChJD,cAIa,8BAA8B;qBAC1B,aAAA,CAAA,WAAA,CAAA,qBAAA;AAIf;AACA;AACA;wBAIkB,aAAA,CAAA,MAAA,CAAA,UAAA,CAAA,+BAAA;;AAQlB;AAIA;oDAvBW,8BAA8B;sDAA9B,8BAA8B;AA0B1C;;;;","names":[]}
1
+ {"version":3,"file":"qalma-kit.d.ts","sources":["../../../../libs/ui-kit/src/lib/toolbar-button.ts","../../../../libs/ui-kit/src/lib/toolbar-commands.ts","../../../../libs/ui-kit/src/lib/toolbar-registry.ts","../../../../libs/ui-kit/src/lib/toolbar-icons.ts","../../../../libs/ui-kit/src/lib/drag-handle.ts","../../../../libs/ui-kit/src/lib/mention-menu.ts","../../../../libs/ui-kit/src/lib/slash-command-menu.ts","../../../../libs/ui-kit/src/lib/link-popover.ts","../../../../libs/ui-kit/src/lib/contextual-toolbar.ts"],"mapp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