@gilav21/shadcn-angular-rte 0.2.1 → 0.2.3

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,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { isDevMode, inject, Injectable, input, computed, ChangeDetectionStrategy, Component, signal, ElementRef, DestroyRef, output, Injector, InjectionToken, effect, untracked, forwardRef, ViewChild, Directive, model, afterNextRender, Renderer2, viewChild, afterRenderEffect, ApplicationRef, EnvironmentInjector, createComponent, HostListener, ViewContainerRef, TemplateRef, PLATFORM_ID, NgZone, ViewChildren, contentChild, Pipe } from '@angular/core';
2
+ import { isDevMode, inject, Injectable, input, computed, ChangeDetectionStrategy, Component, signal, ElementRef, DestroyRef, output, Injector, InjectionToken, effect, untracked, forwardRef, ViewChild, Directive, model, afterNextRender, afterRenderEffect, Renderer2, viewChild, contentChild, ApplicationRef, EnvironmentInjector, createComponent, HostListener, ViewContainerRef, TemplateRef, PLATFORM_ID, NgZone, ViewChildren, Pipe } from '@angular/core';
3
3
  import * as i1 from '@angular/forms';
4
4
  import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
5
5
  import { DOCUMENT, NgComponentOutlet, NgTemplateOutlet, isPlatformBrowser, DatePipe } from '@angular/common';
@@ -682,8 +682,11 @@ function graphemeLength(text) {
682
682
  const segmenter = graphemeSegmenter();
683
683
  if (!segmenter)
684
684
  return text.length;
685
+ // Walk the iterator rather than Array.from: this runs on every keystroke of a length-limited field, and
686
+ // materialising a Segment object per grapheme costs memory and about a third more time on a long string.
687
+ const segments = segmenter.segment(text)[Symbol.iterator]();
685
688
  let count = 0;
686
- for (const _ of segmenter.segment(text))
689
+ while (!segments.next().done)
687
690
  count++;
688
691
  return count;
689
692
  }
@@ -1963,7 +1966,7 @@ function stripCssComments(value) {
1963
1966
  function decodeCssEscapes(value) {
1964
1967
  if (!value.includes('\\'))
1965
1968
  return value;
1966
- return value.replaceAll(/\\([0-9a-fA-F]{1,6})[ \t\n]?|\\(.)/g, (_match, hex, literal) => {
1969
+ return value.replaceAll(/\\([0-9a-fA-F]{1,6})[ \t\n]?|\\(.)/g, (...[, hex, literal]) => {
1967
1970
  if (hex !== undefined) {
1968
1971
  const code = Number.parseInt(hex, 16);
1969
1972
  return code > 0 && code <= 0x10FFFF ? String.fromCodePoint(code) : '';
@@ -3545,7 +3548,7 @@ class RichTextSanitizerService {
3545
3548
  * don't require HTML entity encoding inside double-quoted attributes.
3546
3549
  */
3547
3550
  normalizeStyleQuotes(html) {
3548
- return html.replaceAll(/style="([^"]*)"/g, (_match, styleContent) => `style="${styleContent.replaceAll('&quot;', "'")}"`);
3551
+ return html.replaceAll(/style="([^"]*)"/g, (...[, styleContent]) => `style="${styleContent.replaceAll('&quot;', "'")}"`);
3549
3552
  }
3550
3553
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextSanitizerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3551
3554
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextSanitizerService, providedIn: 'root' }); }
@@ -5500,7 +5503,7 @@ class RichTextMarkdownService {
5500
5503
  // fence before blockquote and list parsing baked those markers INTO the
5501
5504
  // code, and each round-trip added another level -- the same compounding
5502
5505
  // corruption the lift was introduced to stop, reintroduced for nesting.
5503
- return markdown.replaceAll(CODE_FENCE_OPEN, '').replaceAll(CODE_FENCE_CLOSE, '').replaceAll(FENCE_PATTERN, (_match, prefix, _fence, lang, code) => {
5506
+ return markdown.replaceAll(CODE_FENCE_OPEN, '').replaceAll(CODE_FENCE_CLOSE, '').replaceAll(FENCE_PATTERN, (...[, prefix, , lang, code]) => {
5504
5507
  const langAttr = lang ? ` data-language="${lang}" class="language-${lang}"` : '';
5505
5508
  const token = `${prefix}${CODE_FENCE_OPEN}${store.length}${CODE_FENCE_CLOSE}`;
5506
5509
  const body = stripBlockPrefix(code, prefix);
@@ -7412,7 +7415,7 @@ function trackRowspans(cells, carried) {
7412
7415
  * "&lt;code&gt;x&lt;/code&gt;".
7413
7416
  */
7414
7417
  function resolveInlineCodeText(value, store) {
7415
- return value.replaceAll(/(\d{1,9})/g, (_match, index) => {
7418
+ return value.replaceAll(/(\d{1,9})/g, (...[, index]) => {
7416
7419
  const parked = store[Number(index)] ?? '';
7417
7420
  return parked.replace(/^<code>/, '').replace(/<\/code>$/, '');
7418
7421
  });
@@ -7427,7 +7430,7 @@ function restoreParked(html, open, close, store, map = (s) => s) {
7427
7430
  if (store.length === 0)
7428
7431
  return html;
7429
7432
  const pattern = new RegExp(String.raw `${open}(\d{1,9})${close}`, 'g');
7430
- return html.replaceAll(pattern, (_match, index) => map(store[Number(index)] ?? ''));
7433
+ return html.replaceAll(pattern, (...[, index]) => map(store[Number(index)] ?? ''));
7431
7434
  }
7432
7435
 
7433
7436
  /** Word's namespaced wrapper elements, unwrapped so the text they hold stays. */
@@ -7889,7 +7892,7 @@ class RichTextPasteNormalizerService {
7889
7892
  const mapped = new Map();
7890
7893
  for (const [prop, value] of styles) {
7891
7894
  if (prop.startsWith('mso-')) {
7892
- this.mapMsoProperty(prop, value, mapped, el);
7895
+ this.mapMsoProperty(prop, value, mapped);
7893
7896
  }
7894
7897
  else if (!prop.startsWith('-')) {
7895
7898
  this.mapStandardProperty(prop, value, mapped);
@@ -7966,7 +7969,7 @@ class RichTextPasteNormalizerService {
7966
7969
  break;
7967
7970
  }
7968
7971
  }
7969
- mapMsoProperty(prop, value, mapped, _el) {
7972
+ mapMsoProperty(prop, value, mapped) {
7970
7973
  if (!value)
7971
7974
  return;
7972
7975
  this.mapMsoFontProperty(prop, value, mapped);
@@ -11181,7 +11184,7 @@ function markdownToText(value) {
11181
11184
  const fences = [];
11182
11185
  let text = value
11183
11186
  .replaceAll(/[\ue000\ue001]/g, '')
11184
- .replace(FENCE, (_match, body) => {
11187
+ .replace(FENCE, (...[, body]) => {
11185
11188
  fences.push(body);
11186
11189
  return `\ue000${fences.length - 1}\ue001`;
11187
11190
  });
@@ -11191,7 +11194,7 @@ function markdownToText(value) {
11191
11194
  for (const [pattern, replacement] of ENTITIES) {
11192
11195
  text = text.replace(pattern, replacement);
11193
11196
  }
11194
- return text.replace(FENCE_TOKEN, (_match, index) => fences[Number(index)] ?? '');
11197
+ return text.replace(FENCE_TOKEN, (...[, index]) => fences[Number(index)] ?? '');
11195
11198
  }
11196
11199
  /**
11197
11200
  * Collapse whitespace artefacts both paths can leave behind.
@@ -11589,7 +11592,7 @@ function formatRelativeTime(value, unit, locale, options) {
11589
11592
  */
11590
11593
  function localeDigits(locale) {
11591
11594
  const formatter = new Intl.NumberFormat(locale, { useGrouping: false });
11592
- return Array.from({ length: 10 }, (_, digit) => formatter.format(digit));
11595
+ return Array.from({ length: 10 }, (...[, digit]) => formatter.format(digit));
11593
11596
  }
11594
11597
  /**
11595
11598
  * Rewrite a locale's digits as ASCII so the result can be parsed as a number.
@@ -19311,15 +19314,6 @@ class RichTextEditorComponent extends RichTextEditorAddonHost {
19311
19314
  .replaceAll(/<\/(p|div|li|h[1-6]|blockquote|pre|tr)>/gi, '\n');
19312
19315
  return this.sanitizer.stripTags(blockAware);
19313
19316
  }
19314
- isSelectionInsideEditor() {
19315
- const selection = this.document.getSelection();
19316
- const editor = this.getEditorElement();
19317
- if (!selection || selection.rangeCount === 0 || !editor) {
19318
- return false;
19319
- }
19320
- const range = selection.getRangeAt(0);
19321
- return editor.contains(range.startContainer) && editor.contains(range.endContainer);
19322
- }
19323
19317
  computeDelta(prev, current) {
19324
19318
  const prevLines = prev.split('\n');
19325
19319
  const curLines = current.split('\n');
@@ -20251,7 +20245,7 @@ class DialogComponent {
20251
20245
  this.open.update(v => !v);
20252
20246
  }
20253
20247
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
20254
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: DialogComponent, isStandalone: true, selector: "ui-dialog", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { classAttribute: "contents" }, providers: [{ provide: DIALOG, useExisting: forwardRef(() => DialogComponent) }], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
20248
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: DialogComponent, isStandalone: true, selector: "ui-dialog", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { properties: { "attr.data-slot": "\"dialog\"" }, classAttribute: "contents" }, providers: [{ provide: DIALOG, useExisting: forwardRef(() => DialogComponent) }], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
20255
20249
  }
20256
20250
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogComponent, decorators: [{
20257
20251
  type: Component,
@@ -20260,7 +20254,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
20260
20254
  changeDetection: ChangeDetectionStrategy.OnPush,
20261
20255
  providers: [{ provide: DIALOG, useExisting: forwardRef(() => DialogComponent) }],
20262
20256
  template: `<ng-content />`,
20263
- host: { class: 'contents' },
20257
+ host: { class: 'contents', '[attr.data-slot]': '"dialog"' },
20264
20258
  }]
20265
20259
  }], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }] } });
20266
20260
 
@@ -20414,6 +20408,8 @@ function focusFirstTabbable(container) {
20414
20408
 
20415
20409
  class DialogTriggerComponent {
20416
20410
  constructor() {
20411
+ /** Extra classes for the element that wraps the projected trigger. */
20412
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
20417
20413
  this.dialog = inject(DIALOG, { optional: true });
20418
20414
  this.host = inject(ElementRef);
20419
20415
  /** See `lib/a11y.ts` — stays transparent when the projected content is already a control. */
@@ -20439,8 +20435,9 @@ class DialogTriggerComponent {
20439
20435
  this.onClick();
20440
20436
  }
20441
20437
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
20442
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: DialogTriggerComponent, isStandalone: true, selector: "ui-dialog-trigger", host: { classAttribute: "contents" }, ngImport: i0, template: `
20438
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: DialogTriggerComponent, isStandalone: true, selector: "ui-dialog-trigger", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: `
20443
20439
  <span
20440
+ [class]="class()"
20444
20441
  [attr.tabindex]="wrapsInteractive() ? null : 0"
20445
20442
  [attr.role]="wrapsInteractive() ? null : 'button'"
20446
20443
  [attr.data-slot]="'dialog-trigger'"
@@ -20459,6 +20456,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
20459
20456
  changeDetection: ChangeDetectionStrategy.OnPush,
20460
20457
  template: `
20461
20458
  <span
20459
+ [class]="class()"
20462
20460
  [attr.tabindex]="wrapsInteractive() ? null : 0"
20463
20461
  [attr.role]="wrapsInteractive() ? null : 'button'"
20464
20462
  [attr.data-slot]="'dialog-trigger'"
@@ -20471,7 +20469,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
20471
20469
  `,
20472
20470
  host: { class: 'contents' },
20473
20471
  }]
20474
- }], ctorParameters: () => [] });
20472
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
20475
20473
 
20476
20474
  const COMMON_LOCALES = {
20477
20475
  en: {
@@ -20679,20 +20677,30 @@ const COMMON_LOCALES = {
20679
20677
  };
20680
20678
 
20681
20679
  class DialogHeaderComponent {
20680
+ constructor() {
20681
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
20682
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
20683
+ this.classes = computed(() => cn('flex flex-col text-center sm:text-left', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
20684
+ }
20682
20685
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
20683
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: DialogHeaderComponent, isStandalone: true, selector: "ui-dialog-header", host: { properties: { "attr.data-slot": "\"dialog-header\"" }, classAttribute: "flex flex-col text-center sm:text-left" }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: [":host{--_d: var(--density-dialog, var(--density, 1))}@layer components{:host([data-slot=\"dialog-header\"]){gap:calc(.375rem * var(--_d))}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
20686
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: DialogHeaderComponent, isStandalone: true, selector: "ui-dialog-header", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"dialog-header\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: [":host{--_d: var(--density-dialog, var(--density, 1))}@layer components{:host([data-slot=\"dialog-header\"]){gap:calc(.375rem * var(--_d))}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
20684
20687
  }
20685
20688
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogHeaderComponent, decorators: [{
20686
20689
  type: Component,
20687
20690
  args: [{ selector: 'ui-dialog-header', changeDetection: ChangeDetectionStrategy.OnPush, template: `<ng-content />`, host: {
20688
- class: 'flex flex-col text-center sm:text-left',
20691
+ '[class]': 'classes()',
20689
20692
  '[attr.data-slot]': '"dialog-header"',
20690
20693
  }, styles: [":host{--_d: var(--density-dialog, var(--density, 1))}@layer components{:host([data-slot=\"dialog-header\"]){gap:calc(.375rem * var(--_d))}}\n"] }]
20691
- }] });
20694
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
20692
20695
 
20693
20696
  class DialogTitleComponent {
20697
+ constructor() {
20698
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
20699
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
20700
+ this.classes = computed(() => cn('text-lg font-semibold leading-none tracking-tight flex justify-start', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
20701
+ }
20694
20702
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
20695
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: DialogTitleComponent, isStandalone: true, selector: "ui-dialog-title", host: { properties: { "attr.data-slot": "\"dialog-title\"" }, classAttribute: "text-lg font-semibold leading-none tracking-tight flex justify-start" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
20703
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: DialogTitleComponent, isStandalone: true, selector: "ui-dialog-title", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"dialog-title\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
20696
20704
  }
20697
20705
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogTitleComponent, decorators: [{
20698
20706
  type: Component,
@@ -20701,15 +20709,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
20701
20709
  changeDetection: ChangeDetectionStrategy.OnPush,
20702
20710
  template: `<ng-content />`,
20703
20711
  host: {
20704
- class: 'text-lg font-semibold leading-none tracking-tight flex justify-start',
20712
+ '[class]': 'classes()',
20705
20713
  '[attr.data-slot]': '"dialog-title"',
20706
20714
  },
20707
20715
  }]
20708
- }] });
20716
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
20709
20717
 
20710
20718
  class DialogDescriptionComponent {
20719
+ constructor() {
20720
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
20721
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
20722
+ this.classes = computed(() => cn('text-sm text-muted-foreground flex justify-start', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
20723
+ }
20711
20724
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
20712
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: DialogDescriptionComponent, isStandalone: true, selector: "ui-dialog-description", host: { properties: { "attr.data-slot": "\"dialog-description\"" }, classAttribute: "text-sm text-muted-foreground flex justify-start" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
20725
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: DialogDescriptionComponent, isStandalone: true, selector: "ui-dialog-description", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"dialog-description\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
20713
20726
  }
20714
20727
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogDescriptionComponent, decorators: [{
20715
20728
  type: Component,
@@ -20718,13 +20731,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
20718
20731
  changeDetection: ChangeDetectionStrategy.OnPush,
20719
20732
  template: `<ng-content />`,
20720
20733
  host: {
20721
- class: 'text-sm text-muted-foreground flex justify-start',
20734
+ '[class]': 'classes()',
20722
20735
  '[attr.data-slot]': '"dialog-description"',
20723
20736
  },
20724
20737
  }]
20725
- }] });
20738
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
20726
20739
 
20727
20740
  class DialogContentComponent {
20741
+ static { this.idSeq = 0; }
20728
20742
  constructor() {
20729
20743
  this.dialog = inject(DIALOG, { optional: true });
20730
20744
  this.el = inject(ElementRef);
@@ -20749,6 +20763,14 @@ class DialogContentComponent {
20749
20763
  this.t = this.i18n.t;
20750
20764
  this.dir = this.i18n.dir;
20751
20765
  this.classes = computed(() => cn('fixed z-50 grid w-full max-w-[calc(100vw-2rem)] sm:max-w-lg border bg-background shadow-lg duration-200 sm:rounded-lg', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
20766
+ /**
20767
+ * `id` of this panel's own title, for `aria-labelledby`; null while it has none. The title is rendered
20768
+ * either from the `title` input or projected as a `<ui-dialog-title>`, so it is found in the DOM after
20769
+ * render and given an id, which covers both modes.
20770
+ */
20771
+ this.titleId = signal(null, ...(ngDevMode ? [{ debugName: "titleId" }] : /* istanbul ignore next */ []));
20772
+ /** `id` of this panel's own description, for `aria-describedby`; null while it has none. */
20773
+ this.descriptionId = signal(null, ...(ngDevMode ? [{ debugName: "descriptionId" }] : /* istanbul ignore next */ []));
20752
20774
  effect(() => {
20753
20775
  if (this.dialog?.open()) {
20754
20776
  this.previousActiveElement = this.document.activeElement;
@@ -20758,6 +20780,30 @@ class DialogContentComponent {
20758
20780
  this.previousActiveElement.focus();
20759
20781
  }
20760
20782
  });
20783
+ afterRenderEffect(() => {
20784
+ // The inputs are read so a title or description set after the dialog opened is picked up too.
20785
+ this.title();
20786
+ this.description();
20787
+ if (!this.dialog?.open())
20788
+ return;
20789
+ const panel = this.el.nativeElement.querySelector('[data-slot="dialog-content"]');
20790
+ this.titleId.set(panel ? this.ownId(panel, 'dialog-title') : null);
20791
+ this.descriptionId.set(panel ? this.ownId(panel, 'dialog-description') : null);
20792
+ });
20793
+ }
20794
+ /**
20795
+ * The id of the `slot` element that belongs to `panel` itself, giving it one if it has none. A dialog
20796
+ * nested inside this one has a title of its own that this panel must never take as its name, so only
20797
+ * elements whose nearest panel is this one count.
20798
+ */
20799
+ ownId(panel, slot) {
20800
+ // Array.from, not a spread: a consumer's `lib` may omit dom.iterable (Storybook's does), and a
20801
+ // NodeList is only iterable with it.
20802
+ const own = Array.from(panel.querySelectorAll(`[data-slot="${slot}"]`)).find(el => el.closest('[data-slot="dialog-content"]') === panel);
20803
+ if (!own)
20804
+ return null;
20805
+ own.id ||= `${slot}-${++DialogContentComponent.idSeq}`;
20806
+ return own.id;
20761
20807
  }
20762
20808
  ngAfterViewInit() {
20763
20809
  if (this.dialog?.open()) {
@@ -20797,7 +20843,7 @@ class DialogContentComponent {
20797
20843
  trapTabKey(event, this.contentEl);
20798
20844
  }
20799
20845
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
20800
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DialogContentComponent, isStandalone: true, selector: "ui-dialog-content", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: "@if (dialog?.open()) {\n <div class=\"fixed inset-0 z-50 flex items-center justify-center\" [attr.dir]=\"dir()\">\n <!-- Overlay -->\n <button\n type=\"button\"\n class=\"fixed inset-0 bg-black/80 animate-in fade-in-0\"\n [attr.data-slot]=\"'dialog-overlay'\"\n [attr.aria-label]=\"t().close\"\n (click)=\"onOverlayClick()\"\n ></button>\n <!-- Content -->\n <div\n #contentEl\n [class]=\"classes()\"\n [attr.data-slot]=\"'dialog-content'\"\n (keydown)=\"onKeydown($event)\"\n tabindex=\"-1\"\n >\n @if (title()) {\n <ui-dialog-header>\n <ui-dialog-title>{{ title() }}</ui-dialog-title>\n @if (description()) {\n <ui-dialog-description>{{ description() }}</ui-dialog-description>\n }\n </ui-dialog-header>\n }\n <ng-content />\n <!-- Close button -->\n <button\n type=\"button\"\n class=\"absolute end-4 top-4 inline-flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none pointer-coarse:end-0.5 pointer-coarse:top-0.5 pointer-coarse:size-11\"\n [attr.aria-label]=\"t().close\"\n (click)=\"close()\"\n >\n <svg class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n <span class=\"sr-only\">{{ t().close }}</span>\n </button>\n </div>\n </div>\n}\n", styles: [":host{--_d: var(--density-dialog, var(--density, 1))}@layer components{[data-slot=dialog-content]{gap:calc(.75rem * var(--_d));padding:calc(1rem * var(--_d))}@media(min-width:640px){[data-slot=dialog-content]{gap:calc(1rem * var(--_d));padding:calc(1.5rem * var(--_d))}}}\n"], dependencies: [{ kind: "component", type: DialogHeaderComponent, selector: "ui-dialog-header" }, { kind: "component", type: DialogTitleComponent, selector: "ui-dialog-title" }, { kind: "component", type: DialogDescriptionComponent, selector: "ui-dialog-description" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
20846
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DialogContentComponent, isStandalone: true, selector: "ui-dialog-content", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: "@if (dialog?.open()) {\n <div class=\"fixed inset-0 z-50 flex items-center justify-center\" [attr.dir]=\"dir()\">\n <!-- Overlay -->\n <button\n type=\"button\"\n class=\"fixed inset-0 bg-black/80 animate-in fade-in-0\"\n [attr.data-slot]=\"'dialog-overlay'\"\n [attr.aria-label]=\"t().close\"\n (click)=\"onOverlayClick()\"\n ></button>\n <!-- Content -->\n <div\n #contentEl\n [class]=\"classes()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"titleId()\"\n [attr.aria-describedby]=\"descriptionId()\"\n [attr.data-slot]=\"'dialog-content'\"\n (keydown)=\"onKeydown($event)\"\n tabindex=\"-1\"\n >\n @if (title()) {\n <ui-dialog-header>\n <ui-dialog-title>{{ title() }}</ui-dialog-title>\n @if (description()) {\n <ui-dialog-description>{{ description() }}</ui-dialog-description>\n }\n </ui-dialog-header>\n }\n <ng-content />\n <!-- Close button -->\n <button\n type=\"button\"\n class=\"absolute end-4 top-4 inline-flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none pointer-coarse:end-0.5 pointer-coarse:top-0.5 pointer-coarse:size-11\"\n [attr.aria-label]=\"t().close\"\n (click)=\"close()\"\n >\n <svg class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n <span class=\"sr-only\">{{ t().close }}</span>\n </button>\n </div>\n </div>\n}\n", styles: [":host{--_d: var(--density-dialog, var(--density, 1))}@layer components{[data-slot=dialog-content]{gap:calc(.75rem * var(--_d));padding:calc(1rem * var(--_d))}@media(min-width:640px){[data-slot=dialog-content]{gap:calc(1rem * var(--_d));padding:calc(1.5rem * var(--_d))}}}\n"], dependencies: [{ kind: "component", type: DialogHeaderComponent, selector: "ui-dialog-header", inputs: ["class"] }, { kind: "component", type: DialogTitleComponent, selector: "ui-dialog-title", inputs: ["class"] }, { kind: "component", type: DialogDescriptionComponent, selector: "ui-dialog-description", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
20801
20847
  }
20802
20848
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogContentComponent, decorators: [{
20803
20849
  type: Component,
@@ -20805,20 +20851,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
20805
20851
  DialogHeaderComponent,
20806
20852
  DialogTitleComponent,
20807
20853
  DialogDescriptionComponent,
20808
- ], host: { class: 'contents' }, template: "@if (dialog?.open()) {\n <div class=\"fixed inset-0 z-50 flex items-center justify-center\" [attr.dir]=\"dir()\">\n <!-- Overlay -->\n <button\n type=\"button\"\n class=\"fixed inset-0 bg-black/80 animate-in fade-in-0\"\n [attr.data-slot]=\"'dialog-overlay'\"\n [attr.aria-label]=\"t().close\"\n (click)=\"onOverlayClick()\"\n ></button>\n <!-- Content -->\n <div\n #contentEl\n [class]=\"classes()\"\n [attr.data-slot]=\"'dialog-content'\"\n (keydown)=\"onKeydown($event)\"\n tabindex=\"-1\"\n >\n @if (title()) {\n <ui-dialog-header>\n <ui-dialog-title>{{ title() }}</ui-dialog-title>\n @if (description()) {\n <ui-dialog-description>{{ description() }}</ui-dialog-description>\n }\n </ui-dialog-header>\n }\n <ng-content />\n <!-- Close button -->\n <button\n type=\"button\"\n class=\"absolute end-4 top-4 inline-flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none pointer-coarse:end-0.5 pointer-coarse:top-0.5 pointer-coarse:size-11\"\n [attr.aria-label]=\"t().close\"\n (click)=\"close()\"\n >\n <svg class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n <span class=\"sr-only\">{{ t().close }}</span>\n </button>\n </div>\n </div>\n}\n", styles: [":host{--_d: var(--density-dialog, var(--density, 1))}@layer components{[data-slot=dialog-content]{gap:calc(.75rem * var(--_d));padding:calc(1rem * var(--_d))}@media(min-width:640px){[data-slot=dialog-content]{gap:calc(1rem * var(--_d));padding:calc(1.5rem * var(--_d))}}}\n"] }]
20854
+ ], host: { class: 'contents' }, template: "@if (dialog?.open()) {\n <div class=\"fixed inset-0 z-50 flex items-center justify-center\" [attr.dir]=\"dir()\">\n <!-- Overlay -->\n <button\n type=\"button\"\n class=\"fixed inset-0 bg-black/80 animate-in fade-in-0\"\n [attr.data-slot]=\"'dialog-overlay'\"\n [attr.aria-label]=\"t().close\"\n (click)=\"onOverlayClick()\"\n ></button>\n <!-- Content -->\n <div\n #contentEl\n [class]=\"classes()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"titleId()\"\n [attr.aria-describedby]=\"descriptionId()\"\n [attr.data-slot]=\"'dialog-content'\"\n (keydown)=\"onKeydown($event)\"\n tabindex=\"-1\"\n >\n @if (title()) {\n <ui-dialog-header>\n <ui-dialog-title>{{ title() }}</ui-dialog-title>\n @if (description()) {\n <ui-dialog-description>{{ description() }}</ui-dialog-description>\n }\n </ui-dialog-header>\n }\n <ng-content />\n <!-- Close button -->\n <button\n type=\"button\"\n class=\"absolute end-4 top-4 inline-flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none pointer-coarse:end-0.5 pointer-coarse:top-0.5 pointer-coarse:size-11\"\n [attr.aria-label]=\"t().close\"\n (click)=\"close()\"\n >\n <svg class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n <span class=\"sr-only\">{{ t().close }}</span>\n </button>\n </div>\n </div>\n}\n", styles: [":host{--_d: var(--density-dialog, var(--density, 1))}@layer components{[data-slot=dialog-content]{gap:calc(.75rem * var(--_d));padding:calc(1rem * var(--_d))}@media(min-width:640px){[data-slot=dialog-content]{gap:calc(1rem * var(--_d));padding:calc(1.5rem * var(--_d))}}}\n"] }]
20809
20855
  }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }] } });
20810
20856
 
20811
20857
  class DialogFooterComponent {
20858
+ constructor() {
20859
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
20860
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
20861
+ this.classes = computed(() => cn('flex flex-col-reverse sm:flex-row sm:justify-end', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
20862
+ }
20812
20863
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
20813
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: DialogFooterComponent, isStandalone: true, selector: "ui-dialog-footer", host: { properties: { "attr.data-slot": "\"dialog-footer\"" }, classAttribute: "flex flex-col-reverse sm:flex-row sm:justify-end" }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: [":host{--_d: var(--density-dialog, var(--density, 1))}@layer components{:host([data-slot=\"dialog-footer\"]){gap:calc(.5rem * var(--_d))}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
20864
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: DialogFooterComponent, isStandalone: true, selector: "ui-dialog-footer", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"dialog-footer\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: [":host{--_d: var(--density-dialog, var(--density, 1))}@layer components{:host([data-slot=\"dialog-footer\"]){gap:calc(.5rem * var(--_d))}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
20814
20865
  }
20815
20866
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogFooterComponent, decorators: [{
20816
20867
  type: Component,
20817
20868
  args: [{ selector: 'ui-dialog-footer', changeDetection: ChangeDetectionStrategy.OnPush, template: `<ng-content />`, host: {
20818
- class: 'flex flex-col-reverse sm:flex-row sm:justify-end',
20869
+ '[class]': 'classes()',
20819
20870
  '[attr.data-slot]': '"dialog-footer"',
20820
20871
  }, styles: [":host{--_d: var(--density-dialog, var(--density, 1))}@layer components{:host([data-slot=\"dialog-footer\"]){gap:calc(.5rem * var(--_d))}}\n"] }]
20821
- }] });
20872
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
20822
20873
 
20823
20874
  /**
20824
20875
  * Media-query reads that degrade where `matchMedia` does not exist.
@@ -21253,7 +21304,7 @@ class AlertDialogComponent {
21253
21304
  this.open.update(v => !v);
21254
21305
  }
21255
21306
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
21256
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: AlertDialogComponent, isStandalone: true, selector: "ui-alert-dialog", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { classAttribute: "contents" }, providers: [{ provide: ALERT_DIALOG, useExisting: forwardRef(() => AlertDialogComponent) }], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
21307
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: AlertDialogComponent, isStandalone: true, selector: "ui-alert-dialog", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { properties: { "attr.data-slot": "\"alert-dialog\"" }, classAttribute: "contents" }, providers: [{ provide: ALERT_DIALOG, useExisting: forwardRef(() => AlertDialogComponent) }], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
21257
21308
  }
21258
21309
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogComponent, decorators: [{
21259
21310
  type: Component,
@@ -21262,12 +21313,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
21262
21313
  changeDetection: ChangeDetectionStrategy.OnPush,
21263
21314
  providers: [{ provide: ALERT_DIALOG, useExisting: forwardRef(() => AlertDialogComponent) }],
21264
21315
  template: `<ng-content />`,
21265
- host: { class: 'contents' },
21316
+ host: { class: 'contents', '[attr.data-slot]': '"alert-dialog"' },
21266
21317
  }]
21267
21318
  }], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }] } });
21268
21319
 
21269
21320
  class AlertDialogTriggerComponent {
21270
21321
  constructor() {
21322
+ /** Extra classes for the element that wraps the projected trigger. */
21323
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
21271
21324
  this.alertDialog = inject(ALERT_DIALOG, { optional: true });
21272
21325
  this.host = inject(ElementRef);
21273
21326
  /** See `lib/a11y.ts` — stays transparent when the projected content is already a control. */
@@ -21293,8 +21346,9 @@ class AlertDialogTriggerComponent {
21293
21346
  this.onClick();
21294
21347
  }
21295
21348
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
21296
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: AlertDialogTriggerComponent, isStandalone: true, selector: "ui-alert-dialog-trigger", host: { classAttribute: "contents" }, ngImport: i0, template: `
21349
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: AlertDialogTriggerComponent, isStandalone: true, selector: "ui-alert-dialog-trigger", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: `
21297
21350
  <span
21351
+ [class]="class()"
21298
21352
  (click)="onClick()"
21299
21353
  (keydown.enter)="onKeydown($event)"
21300
21354
  (keydown.space)="onKeydown($event)"
@@ -21313,6 +21367,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
21313
21367
  changeDetection: ChangeDetectionStrategy.OnPush,
21314
21368
  template: `
21315
21369
  <span
21370
+ [class]="class()"
21316
21371
  (click)="onClick()"
21317
21372
  (keydown.enter)="onKeydown($event)"
21318
21373
  (keydown.space)="onKeydown($event)"
@@ -21325,11 +21380,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
21325
21380
  `,
21326
21381
  host: { class: 'contents' },
21327
21382
  }]
21328
- }], ctorParameters: () => [] });
21383
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
21329
21384
 
21330
21385
  class AlertDialogHeaderComponent {
21386
+ constructor() {
21387
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
21388
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
21389
+ this.classes = computed(() => cn('flex flex-col space-y-2 text-center sm:text-left rtl:text-right', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
21390
+ }
21331
21391
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
21332
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: AlertDialogHeaderComponent, isStandalone: true, selector: "ui-alert-dialog-header", host: { properties: { "attr.data-slot": "\"alert-dialog-header\"" }, classAttribute: "flex flex-col space-y-2 text-center sm:text-left rtl:text-right" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
21392
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: AlertDialogHeaderComponent, isStandalone: true, selector: "ui-alert-dialog-header", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"alert-dialog-header\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
21333
21393
  }
21334
21394
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogHeaderComponent, decorators: [{
21335
21395
  type: Component,
@@ -21338,15 +21398,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
21338
21398
  changeDetection: ChangeDetectionStrategy.OnPush,
21339
21399
  template: `<ng-content />`,
21340
21400
  host: {
21341
- class: 'flex flex-col space-y-2 text-center sm:text-left rtl:text-right',
21401
+ '[class]': 'classes()',
21342
21402
  '[attr.data-slot]': '"alert-dialog-header"',
21343
21403
  },
21344
21404
  }]
21345
- }] });
21405
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
21346
21406
 
21347
21407
  class AlertDialogTitleComponent {
21408
+ constructor() {
21409
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
21410
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
21411
+ this.classes = computed(() => cn('text-lg font-semibold', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
21412
+ }
21348
21413
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
21349
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: AlertDialogTitleComponent, isStandalone: true, selector: "ui-alert-dialog-title", host: { properties: { "attr.data-slot": "\"alert-dialog-title\"" }, classAttribute: "text-lg font-semibold" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
21414
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: AlertDialogTitleComponent, isStandalone: true, selector: "ui-alert-dialog-title", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"alert-dialog-title\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
21350
21415
  }
21351
21416
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogTitleComponent, decorators: [{
21352
21417
  type: Component,
@@ -21355,15 +21420,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
21355
21420
  changeDetection: ChangeDetectionStrategy.OnPush,
21356
21421
  template: `<ng-content />`,
21357
21422
  host: {
21358
- class: 'text-lg font-semibold',
21423
+ '[class]': 'classes()',
21359
21424
  '[attr.data-slot]': '"alert-dialog-title"',
21360
21425
  },
21361
21426
  }]
21362
- }] });
21427
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
21363
21428
 
21364
21429
  class AlertDialogDescriptionComponent {
21430
+ constructor() {
21431
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
21432
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
21433
+ this.classes = computed(() => cn('text-sm text-muted-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
21434
+ }
21365
21435
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
21366
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: AlertDialogDescriptionComponent, isStandalone: true, selector: "ui-alert-dialog-description", host: { properties: { "attr.data-slot": "\"alert-dialog-description\"" }, classAttribute: "text-sm text-muted-foreground" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
21436
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: AlertDialogDescriptionComponent, isStandalone: true, selector: "ui-alert-dialog-description", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"alert-dialog-description\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
21367
21437
  }
21368
21438
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogDescriptionComponent, decorators: [{
21369
21439
  type: Component,
@@ -21372,15 +21442,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
21372
21442
  changeDetection: ChangeDetectionStrategy.OnPush,
21373
21443
  template: `<ng-content />`,
21374
21444
  host: {
21375
- class: 'text-sm text-muted-foreground',
21445
+ '[class]': 'classes()',
21376
21446
  '[attr.data-slot]': '"alert-dialog-description"',
21377
21447
  },
21378
21448
  }]
21379
- }] });
21449
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
21380
21450
 
21381
21451
  class AlertDialogFooterComponent {
21452
+ constructor() {
21453
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
21454
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
21455
+ this.classes = computed(() => cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 gap-[10px]', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
21456
+ }
21382
21457
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
21383
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: AlertDialogFooterComponent, isStandalone: true, selector: "ui-alert-dialog-footer", host: { properties: { "attr.data-slot": "\"alert-dialog-footer\"" }, classAttribute: "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 gap-[10px]" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
21458
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: AlertDialogFooterComponent, isStandalone: true, selector: "ui-alert-dialog-footer", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"alert-dialog-footer\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
21384
21459
  }
21385
21460
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogFooterComponent, decorators: [{
21386
21461
  type: Component,
@@ -21389,11 +21464,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
21389
21464
  changeDetection: ChangeDetectionStrategy.OnPush,
21390
21465
  template: `<ng-content />`,
21391
21466
  host: {
21392
- class: 'flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 gap-[10px]',
21467
+ '[class]': 'classes()',
21393
21468
  '[attr.data-slot]': '"alert-dialog-footer"',
21394
21469
  },
21395
21470
  }]
21396
- }] });
21471
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
21397
21472
 
21398
21473
  class AlertDialogActionComponent {
21399
21474
  constructor() {
@@ -21530,6 +21605,13 @@ class AlertDialogContentComponent {
21530
21605
  /** The cancel button was pressed. Same simple-mode-only rules as {@link actionClick}. */
21531
21606
  this.cancelClick = output();
21532
21607
  this.classes = computed(() => cn('fixed z-50 grid w-full max-w-[calc(100vw-2rem)] sm:max-w-lg gap-3 sm:gap-4 border bg-background p-4 sm:p-6 shadow-lg duration-200 sm:rounded-lg', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
21608
+ /**
21609
+ * The two places a title can come from: the one this component renders for the `title` input, and one the
21610
+ * author projects. Read by the naming effect so it runs again when either appears, which a title rendered
21611
+ * after the dialog opened (behind an `@if`, say) otherwise never triggers.
21612
+ */
21613
+ this.ownTitle = viewChild(AlertDialogTitleComponent, ...(ngDevMode ? [{ debugName: "ownTitle" }] : /* istanbul ignore next */ []));
21614
+ this.projectedTitle = contentChild(AlertDialogTitleComponent, ...(ngDevMode ? [{ debugName: "projectedTitle" }] : /* istanbul ignore next */ []));
21533
21615
  effect(() => {
21534
21616
  if (this.alertDialog?.open()) {
21535
21617
  this.previousActiveElement = this.document.activeElement;
@@ -21542,6 +21624,8 @@ class AlertDialogContentComponent {
21542
21624
  afterRenderEffect(() => {
21543
21625
  if (!this.alertDialog?.open())
21544
21626
  return;
21627
+ this.ownTitle();
21628
+ this.projectedTitle();
21545
21629
  const host = this.el.nativeElement;
21546
21630
  const titleEl = host.querySelector('[data-slot="alert-dialog-title"]');
21547
21631
  if (!titleEl)
@@ -21574,7 +21658,7 @@ class AlertDialogContentComponent {
21574
21658
  trapTabKey(event, this.contentEl);
21575
21659
  }
21576
21660
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
21577
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: AlertDialogContentComponent, isStandalone: true, selector: "ui-alert-dialog-content", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, actionText: { classPropertyName: "actionText", publicName: "actionText", isSignal: true, isRequired: false, transformFunction: null }, cancelText: { classPropertyName: "cancelText", publicName: "cancelText", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionClick: "actionClick", cancelClick: "cancelClick" }, host: { classAttribute: "contents" }, ngImport: i0, template: `
21661
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: AlertDialogContentComponent, isStandalone: true, selector: "ui-alert-dialog-content", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, actionText: { classPropertyName: "actionText", publicName: "actionText", isSignal: true, isRequired: false, transformFunction: null }, cancelText: { classPropertyName: "cancelText", publicName: "cancelText", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionClick: "actionClick", cancelClick: "cancelClick" }, host: { classAttribute: "contents" }, queries: [{ propertyName: "projectedTitle", first: true, predicate: AlertDialogTitleComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "ownTitle", first: true, predicate: AlertDialogTitleComponent, descendants: true, isSignal: true }], ngImport: i0, template: `
21578
21662
  @if (alertDialog?.open()) {
21579
21663
  <div
21580
21664
  class="fixed inset-0 z-50 flex items-center justify-center"
@@ -21611,7 +21695,7 @@ class AlertDialogContentComponent {
21611
21695
  </div>
21612
21696
  </div>
21613
21697
  }
21614
- `, isInline: true, dependencies: [{ kind: "component", type: AlertDialogHeaderComponent, selector: "ui-alert-dialog-header" }, { kind: "component", type: AlertDialogTitleComponent, selector: "ui-alert-dialog-title" }, { kind: "component", type: AlertDialogDescriptionComponent, selector: "ui-alert-dialog-description" }, { kind: "component", type: AlertDialogFooterComponent, selector: "ui-alert-dialog-footer" }, { kind: "component", type: AlertDialogActionComponent, selector: "ui-alert-dialog-action", inputs: ["class"] }, { kind: "component", type: AlertDialogCancelComponent, selector: "ui-alert-dialog-cancel", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
21698
+ `, isInline: true, dependencies: [{ kind: "component", type: AlertDialogHeaderComponent, selector: "ui-alert-dialog-header", inputs: ["class"] }, { kind: "component", type: AlertDialogTitleComponent, selector: "ui-alert-dialog-title", inputs: ["class"] }, { kind: "component", type: AlertDialogDescriptionComponent, selector: "ui-alert-dialog-description", inputs: ["class"] }, { kind: "component", type: AlertDialogFooterComponent, selector: "ui-alert-dialog-footer", inputs: ["class"] }, { kind: "component", type: AlertDialogActionComponent, selector: "ui-alert-dialog-action", inputs: ["class"] }, { kind: "component", type: AlertDialogCancelComponent, selector: "ui-alert-dialog-cancel", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
21615
21699
  }
21616
21700
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogContentComponent, decorators: [{
21617
21701
  type: Component,
@@ -21666,7 +21750,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
21666
21750
  `,
21667
21751
  host: { class: 'contents' },
21668
21752
  }]
21669
- }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], actionText: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionText", required: false }] }], cancelText: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelText", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], actionClick: [{ type: i0.Output, args: ["actionClick"] }], cancelClick: [{ type: i0.Output, args: ["cancelClick"] }] } });
21753
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], actionText: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionText", required: false }] }], cancelText: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelText", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], actionClick: [{ type: i0.Output, args: ["actionClick"] }], cancelClick: [{ type: i0.Output, args: ["cancelClick"] }], ownTitle: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AlertDialogTitleComponent), { isSignal: true }] }], projectedTitle: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AlertDialogTitleComponent), { isSignal: true }] }] } });
21670
21754
 
21671
21755
  class ConfirmDialogComponent {
21672
21756
  /**
@@ -21677,6 +21761,8 @@ class ConfirmDialogComponent {
21677
21761
  * they never double-emit through this path.
21678
21762
  */
21679
21763
  constructor() {
21764
+ /** Extra classes merged onto the dialog panel, e.g. a width utility. */
21765
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
21680
21766
  this.open = signal(false, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
21681
21767
  this.title = signal('Confirm', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
21682
21768
  this.description = signal('Are you sure?', ...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
@@ -21720,9 +21806,10 @@ class ConfirmDialogComponent {
21720
21806
  this.cancelled.emit();
21721
21807
  }
21722
21808
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ConfirmDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
21723
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: ConfirmDialogComponent, isStandalone: true, selector: "ui-confirm-dialog", outputs: { confirmed: "confirmed", cancelled: "cancelled" }, ngImport: i0, template: `
21809
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: ConfirmDialogComponent, isStandalone: true, selector: "ui-confirm-dialog", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { confirmed: "confirmed", cancelled: "cancelled" }, host: { properties: { "attr.data-slot": "\"confirm-dialog\"" }, classAttribute: "contents" }, ngImport: i0, template: `
21724
21810
  <ui-alert-dialog [open]="open()">
21725
21811
  <ui-alert-dialog-content
21812
+ [class]="class()"
21726
21813
  [title]="title()"
21727
21814
  [description]="description()"
21728
21815
  [actionText]="confirmLabel()"
@@ -21742,6 +21829,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
21742
21829
  template: `
21743
21830
  <ui-alert-dialog [open]="open()">
21744
21831
  <ui-alert-dialog-content
21832
+ [class]="class()"
21745
21833
  [title]="title()"
21746
21834
  [description]="description()"
21747
21835
  [actionText]="confirmLabel()"
@@ -21751,8 +21839,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
21751
21839
  />
21752
21840
  </ui-alert-dialog>
21753
21841
  `,
21842
+ host: { class: 'contents', '[attr.data-slot]': '"confirm-dialog"' },
21754
21843
  }]
21755
- }], ctorParameters: () => [], propDecorators: { confirmed: [{ type: i0.Output, args: ["confirmed"] }], cancelled: [{ type: i0.Output, args: ["cancelled"] }] } });
21844
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], confirmed: [{ type: i0.Output, args: ["confirmed"] }], cancelled: [{ type: i0.Output, args: ["cancelled"] }] } });
21756
21845
 
21757
21846
  class ConfirmDirective {
21758
21847
  constructor() {
@@ -21834,12 +21923,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
21834
21923
  /** Renders declarative action fields (tier 1) and emits params + validity. */
21835
21924
  class RichTextActionsFormComponent {
21836
21925
  constructor() {
21837
- /**
21838
- * Conventional style hook. The form's own markup carries fixed layout
21839
- * classes and does not consume this value, so styling it from the outside
21840
- * means targeting the `block` host element or `data-slot`.
21841
- */
21926
+ /** Extra classes merged onto the `block` host. The form's inner markup keeps its own fixed layout. */
21842
21927
  this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
21928
+ this.classes = computed(() => cn('block', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
21843
21929
  /**
21844
21930
  * The tier-1 field descriptors to render, in order — one control each,
21845
21931
  * chosen by `field.type` (textarea / checkbox / select / number / text).
@@ -21928,11 +22014,11 @@ class RichTextActionsFormComponent {
21928
22014
  this.paramsChange.emit(next);
21929
22015
  }
21930
22016
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextActionsFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
21931
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextActionsFormComponent, isStandalone: true, selector: "ui-rich-text-actions-form", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: false, transformFunction: null }, params: { classPropertyName: "params", publicName: "params", isSignal: true, isRequired: false, transformFunction: null }, requiredTemplate: { classPropertyName: "requiredTemplate", publicName: "requiredTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { paramsChange: "paramsChange", validChange: "validChange" }, host: { properties: { "attr.data-slot": "'rich-text-actions-form'" }, classAttribute: "block" }, ngImport: i0, template: "<div class=\"space-y-3\">\n @for (field of fields(); track field.key) {\n <div class=\"space-y-1\">\n <label [for]=\"'rtaf-' + field.key\" class=\"text-sm font-medium block\">\n {{ field.label }}@if (field.required) {<span class=\"text-destructive\"> *</span>}\n </label>\n\n @switch (field.type) {\n @case ('textarea') {\n <textarea\n [id]=\"'rtaf-' + field.key\" [attr.data-field]=\"field.key\"\n [value]=\"stringValue(field.key)\" [placeholder]=\"field.placeholder ?? ''\"\n (input)=\"onFieldInput(field, $any($event.target).value)\"\n class=\"flex min-h-[72px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm\"\n ></textarea>\n }\n @case ('checkbox') {\n <input\n type=\"checkbox\" [id]=\"'rtaf-' + field.key\" [attr.data-field]=\"field.key\"\n [checked]=\"boolValue(field.key)\"\n (change)=\"onFieldInput(field, $any($event.target).checked)\"\n />\n }\n @case ('select') {\n <select\n [id]=\"'rtaf-' + field.key\" [attr.data-field]=\"field.key\"\n [value]=\"stringValue(field.key)\"\n (change)=\"onFieldInput(field, $any($event.target).value)\"\n class=\"flex h-9 w-full rounded-md border border-input bg-transparent px-3 text-sm\"\n >\n <option value=\"\" disabled>{{ field.placeholder ?? 'Select\u2026' }}</option>\n @for (opt of field.options ?? []; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n }\n @default {\n <input\n [type]=\"field.type === 'number' ? 'number' : 'text'\"\n [id]=\"'rtaf-' + field.key\" [attr.data-field]=\"field.key\"\n [value]=\"stringValue(field.key)\" [placeholder]=\"field.placeholder ?? ''\"\n (input)=\"onFieldInput(field, $any($event.target).value)\"\n class=\"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm\"\n />\n }\n }\n\n @if (field.description) {\n <p class=\"text-xs text-muted-foreground\">{{ field.description }}</p>\n }\n @if (errors()[field.key]; as err) {\n <p class=\"text-xs text-destructive\">{{ err }}</p>\n }\n </div>\n }\n</div>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
22017
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextActionsFormComponent, isStandalone: true, selector: "ui-rich-text-actions-form", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: false, transformFunction: null }, params: { classPropertyName: "params", publicName: "params", isSignal: true, isRequired: false, transformFunction: null }, requiredTemplate: { classPropertyName: "requiredTemplate", publicName: "requiredTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { paramsChange: "paramsChange", validChange: "validChange" }, host: { properties: { "class": "classes()", "attr.data-slot": "'rich-text-actions-form'" } }, ngImport: i0, template: "<div class=\"space-y-3\">\n @for (field of fields(); track field.key) {\n <div class=\"space-y-1\">\n <label [for]=\"'rtaf-' + field.key\" class=\"text-sm font-medium block\">\n {{ field.label }}@if (field.required) {<span class=\"text-destructive\"> *</span>}\n </label>\n\n @switch (field.type) {\n @case ('textarea') {\n <textarea\n [id]=\"'rtaf-' + field.key\" [attr.data-field]=\"field.key\"\n [value]=\"stringValue(field.key)\" [placeholder]=\"field.placeholder ?? ''\"\n (input)=\"onFieldInput(field, $any($event.target).value)\"\n class=\"flex min-h-[72px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm\"\n ></textarea>\n }\n @case ('checkbox') {\n <input\n type=\"checkbox\" [id]=\"'rtaf-' + field.key\" [attr.data-field]=\"field.key\"\n [checked]=\"boolValue(field.key)\"\n (change)=\"onFieldInput(field, $any($event.target).checked)\"\n />\n }\n @case ('select') {\n <select\n [id]=\"'rtaf-' + field.key\" [attr.data-field]=\"field.key\"\n [value]=\"stringValue(field.key)\"\n (change)=\"onFieldInput(field, $any($event.target).value)\"\n class=\"flex h-9 w-full rounded-md border border-input bg-transparent px-3 text-sm\"\n >\n <option value=\"\" disabled>{{ field.placeholder ?? 'Select\u2026' }}</option>\n @for (opt of field.options ?? []; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n }\n @default {\n <input\n [type]=\"field.type === 'number' ? 'number' : 'text'\"\n [id]=\"'rtaf-' + field.key\" [attr.data-field]=\"field.key\"\n [value]=\"stringValue(field.key)\" [placeholder]=\"field.placeholder ?? ''\"\n (input)=\"onFieldInput(field, $any($event.target).value)\"\n class=\"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm\"\n />\n }\n }\n\n @if (field.description) {\n <p class=\"text-xs text-muted-foreground\">{{ field.description }}</p>\n }\n @if (errors()[field.key]; as err) {\n <p class=\"text-xs text-destructive\">{{ err }}</p>\n }\n </div>\n }\n</div>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
21932
22018
  }
21933
22019
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextActionsFormComponent, decorators: [{
21934
22020
  type: Component,
21935
- args: [{ selector: 'ui-rich-text-actions-form', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'block', '[attr.data-slot]': "'rich-text-actions-form'" }, template: "<div class=\"space-y-3\">\n @for (field of fields(); track field.key) {\n <div class=\"space-y-1\">\n <label [for]=\"'rtaf-' + field.key\" class=\"text-sm font-medium block\">\n {{ field.label }}@if (field.required) {<span class=\"text-destructive\"> *</span>}\n </label>\n\n @switch (field.type) {\n @case ('textarea') {\n <textarea\n [id]=\"'rtaf-' + field.key\" [attr.data-field]=\"field.key\"\n [value]=\"stringValue(field.key)\" [placeholder]=\"field.placeholder ?? ''\"\n (input)=\"onFieldInput(field, $any($event.target).value)\"\n class=\"flex min-h-[72px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm\"\n ></textarea>\n }\n @case ('checkbox') {\n <input\n type=\"checkbox\" [id]=\"'rtaf-' + field.key\" [attr.data-field]=\"field.key\"\n [checked]=\"boolValue(field.key)\"\n (change)=\"onFieldInput(field, $any($event.target).checked)\"\n />\n }\n @case ('select') {\n <select\n [id]=\"'rtaf-' + field.key\" [attr.data-field]=\"field.key\"\n [value]=\"stringValue(field.key)\"\n (change)=\"onFieldInput(field, $any($event.target).value)\"\n class=\"flex h-9 w-full rounded-md border border-input bg-transparent px-3 text-sm\"\n >\n <option value=\"\" disabled>{{ field.placeholder ?? 'Select\u2026' }}</option>\n @for (opt of field.options ?? []; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n }\n @default {\n <input\n [type]=\"field.type === 'number' ? 'number' : 'text'\"\n [id]=\"'rtaf-' + field.key\" [attr.data-field]=\"field.key\"\n [value]=\"stringValue(field.key)\" [placeholder]=\"field.placeholder ?? ''\"\n (input)=\"onFieldInput(field, $any($event.target).value)\"\n class=\"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm\"\n />\n }\n }\n\n @if (field.description) {\n <p class=\"text-xs text-muted-foreground\">{{ field.description }}</p>\n }\n @if (errors()[field.key]; as err) {\n <p class=\"text-xs text-destructive\">{{ err }}</p>\n }\n </div>\n }\n</div>\n" }]
22021
+ args: [{ selector: 'ui-rich-text-actions-form', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { '[class]': 'classes()', '[attr.data-slot]': "'rich-text-actions-form'" }, template: "<div class=\"space-y-3\">\n @for (field of fields(); track field.key) {\n <div class=\"space-y-1\">\n <label [for]=\"'rtaf-' + field.key\" class=\"text-sm font-medium block\">\n {{ field.label }}@if (field.required) {<span class=\"text-destructive\"> *</span>}\n </label>\n\n @switch (field.type) {\n @case ('textarea') {\n <textarea\n [id]=\"'rtaf-' + field.key\" [attr.data-field]=\"field.key\"\n [value]=\"stringValue(field.key)\" [placeholder]=\"field.placeholder ?? ''\"\n (input)=\"onFieldInput(field, $any($event.target).value)\"\n class=\"flex min-h-[72px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm\"\n ></textarea>\n }\n @case ('checkbox') {\n <input\n type=\"checkbox\" [id]=\"'rtaf-' + field.key\" [attr.data-field]=\"field.key\"\n [checked]=\"boolValue(field.key)\"\n (change)=\"onFieldInput(field, $any($event.target).checked)\"\n />\n }\n @case ('select') {\n <select\n [id]=\"'rtaf-' + field.key\" [attr.data-field]=\"field.key\"\n [value]=\"stringValue(field.key)\"\n (change)=\"onFieldInput(field, $any($event.target).value)\"\n class=\"flex h-9 w-full rounded-md border border-input bg-transparent px-3 text-sm\"\n >\n <option value=\"\" disabled>{{ field.placeholder ?? 'Select\u2026' }}</option>\n @for (opt of field.options ?? []; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n }\n @default {\n <input\n [type]=\"field.type === 'number' ? 'number' : 'text'\"\n [id]=\"'rtaf-' + field.key\" [attr.data-field]=\"field.key\"\n [value]=\"stringValue(field.key)\" [placeholder]=\"field.placeholder ?? ''\"\n (input)=\"onFieldInput(field, $any($event.target).value)\"\n class=\"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm\"\n />\n }\n }\n\n @if (field.description) {\n <p class=\"text-xs text-muted-foreground\">{{ field.description }}</p>\n }\n @if (errors()[field.key]; as err) {\n <p class=\"text-xs text-destructive\">{{ err }}</p>\n }\n </div>\n }\n</div>\n" }]
21936
22022
  }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], fields: [{ type: i0.Input, args: [{ isSignal: true, alias: "fields", required: false }] }], params: [{ type: i0.Input, args: [{ isSignal: true, alias: "params", required: false }] }], requiredTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "requiredTemplate", required: false }] }], paramsChange: [{ type: i0.Output, args: ["paramsChange"] }], validChange: [{ type: i0.Output, args: ["validChange"] }] } });
21937
22023
 
21938
22024
  const en = {
@@ -22000,6 +22086,9 @@ const RICH_TEXT_ACTIONS_LOCALES = { en, he };
22000
22086
  /** Attach/edit dialog: searchable action picker + generated tier-1 form. */
22001
22087
  class RichTextActionsDialogComponent {
22002
22088
  constructor() {
22089
+ /** Extra classes merged onto the dialog panel, after its bounded `sm:max-w-md` width. */
22090
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
22091
+ this.classes = computed(() => cn('max-w-[calc(100vw-2rem)] sm:max-w-md', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
22003
22092
  /**
22004
22093
  * The full catalogue of registered actions. The picker shows only those
22005
22094
  * whose `targets` include the context's `targetKind` and that match the
@@ -22284,19 +22373,22 @@ class RichTextActionsDialogComponent {
22284
22373
  this.dismiss.emit();
22285
22374
  }
22286
22375
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextActionsDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
22287
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextActionsDialogComponent, isStandalone: true, selector: "ui-rich-text-actions-dialog", inputs: { definitions: { classPropertyName: "definitions", publicName: "definitions", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: true, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { confirm: "confirm", dismiss: "dismiss", pick: "pick" }, host: { properties: { "attr.data-slot": "'rich-text-actions-dialog'" } }, viewQueries: [{ propertyName: "formHost", first: true, predicate: ["formHost"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: "<ui-dialog [open]=\"true\" (openChange)=\"onOpenChange($event)\">\n <ui-dialog-content class=\"max-w-[calc(100vw-2rem)] sm:max-w-md\" [attr.dir]=\"dir()\">\n <ui-dialog-header>\n <ui-dialog-title>\n @if (context().mode === 'edit') {\n {{ locale().dialog.editTitle }}\n } @else if (context().targetKind === 'image') {\n {{ locale().dialog.attachToImage }}\n } @else {\n {{ attachTitle() }}\n }\n </ui-dialog-title>\n </ui-dialog-header>\n\n <div class=\"space-y-4\">\n <input\n type=\"text\" [value]=\"query()\"\n [placeholder]=\"locale().dialog.searchPlaceholder\" [attr.aria-label]=\"locale().dialog.searchLabel\"\n (input)=\"query.set($any($event.target).value)\"\n class=\"flex h-9 w-full rounded-md border border-input bg-transparent px-3 text-sm\"\n />\n\n <div\n class=\"max-h-56 overflow-y-auto rounded-md border\"\n [class.pointer-events-none]=\"busy()\" [class.opacity-50]=\"busy()\"\n >\n @for (def of visibleDefs(); track def.id) {\n <button\n type=\"button\" [attr.data-action-option]=\"def.id\"\n [attr.aria-pressed]=\"selectedDef()?.id === def.id\"\n (click)=\"pickAction(def.id)\"\n class=\"flex w-full items-center justify-between gap-2 px-3 py-2 text-left text-sm hover:bg-accent\"\n [class.bg-accent]=\"selectedDef()?.id === def.id\"\n >\n <span class=\"truncate\">{{ def.label }}</span>\n <span class=\"text-xs text-muted-foreground\">{{ triggerLabels(def.triggers) }}</span>\n </button>\n } @empty {\n <p class=\"px-3 py-2 text-sm text-muted-foreground\">{{ locale().dialog.noActions }}</p>\n }\n </div>\n\n @if (selectedDef(); as def) {\n @if (!isCombined() && def.triggers.length > 1) {\n <div class=\"flex flex-wrap items-center gap-3\">\n @for (t of def.triggers; track t) {\n <label class=\"flex items-center gap-1.5 text-sm\">\n <input\n type=\"radio\" name=\"rta-trigger\" [checked]=\"selectedTrigger() === t\"\n (change)=\"selectTrigger(t)\"\n />\n {{ triggerLabel(t) }}\n @if (occupiedByTrigger().has(t)) {\n <span class=\"text-xs text-muted-foreground\">{{ locale().dialog.replacesExisting }}</span>\n }\n </label>\n }\n </div>\n }\n\n @if (isCombined()) {\n <span class=\"inline-flex rounded bg-accent px-2 py-0.5 text-xs\">{{ locale().dialog.combinedBadge }}</span>\n }\n\n @if (isCombined() && paramsMode() === 'separate') {\n <div class=\"space-y-2\">\n <p data-slot=\"rich-text-actions-dialog-section-header\" class=\"text-sm font-medium\">{{ locale().triggers.hover }}</p>\n <ui-rich-text-actions-form\n [fields]=\"def.fieldsByTrigger?.hover ?? []\" [params]=\"hoverParams()\"\n [requiredTemplate]=\"locale().form.required\"\n (paramsChange)=\"onHoverParamsChange($event)\" (validChange)=\"onHoverValidChange($event)\"\n />\n <p data-slot=\"rich-text-actions-dialog-section-header\" class=\"text-sm font-medium\">{{ locale().triggers.click }}</p>\n <ui-rich-text-actions-form\n [fields]=\"def.fieldsByTrigger?.click ?? []\" [params]=\"currentParams()\"\n [requiredTemplate]=\"locale().form.required\"\n (paramsChange)=\"onParamsChange($event)\" (validChange)=\"onValidChange($event)\"\n />\n </div>\n } @else if (def.formComponent) {\n <ng-container #formHost />\n } @else if (def.fields && def.fields.length > 0) {\n <ui-rich-text-actions-form\n [fields]=\"def.fields\" [params]=\"currentParams()\" [requiredTemplate]=\"locale().form.required\"\n (paramsChange)=\"onParamsChange($event)\" (validChange)=\"onValidChange($event)\"\n />\n }\n }\n </div>\n\n <ui-dialog-footer>\n <ui-button data-testid=\"rta-cancel\" variant=\"ghost\" (click)=\"dismiss.emit()\">{{ locale().dialog.cancel }}</ui-button>\n <ui-button data-testid=\"rta-confirm\" [disabled]=\"!canConfirm()\" (click)=\"onConfirm()\">\n {{ confirmLabel() }}\n </ui-button>\n </ui-dialog-footer>\n </ui-dialog-content>\n</ui-dialog>\n", dependencies: [{ kind: "component", type: DialogComponent, selector: "ui-dialog", inputs: ["open"], outputs: ["openChange"] }, { kind: "component", type: DialogContentComponent, selector: "ui-dialog-content", inputs: ["class", "title", "description", "locale"] }, { kind: "component", type: DialogHeaderComponent, selector: "ui-dialog-header" }, { kind: "component", type: DialogTitleComponent, selector: "ui-dialog-title" }, { kind: "component", type: DialogFooterComponent, selector: "ui-dialog-footer" }, { kind: "component", type: ButtonComponent, selector: "ui-button", inputs: ["variant", "size", "disabled", "type", "class", "ariaLabel", "aria-expanded", "aria-pressed", "aria-haspopup", "aria-controls", "label", "ripple", "rippleColor", "loading", "skeleton"], outputs: ["clicked"] }, { kind: "component", type: RichTextActionsFormComponent, selector: "ui-rich-text-actions-form", inputs: ["class", "fields", "params", "requiredTemplate"], outputs: ["paramsChange", "validChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
22376
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextActionsDialogComponent, isStandalone: true, selector: "ui-rich-text-actions-dialog", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, definitions: { classPropertyName: "definitions", publicName: "definitions", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: true, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { confirm: "confirm", dismiss: "dismiss", pick: "pick" }, host: { properties: { "attr.data-slot": "'rich-text-actions-dialog'" } }, viewQueries: [{ propertyName: "formHost", first: true, predicate: ["formHost"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: "<ui-dialog [open]=\"true\" (openChange)=\"onOpenChange($event)\">\n <ui-dialog-content [class]=\"classes()\" [attr.dir]=\"dir()\">\n <ui-dialog-header>\n <ui-dialog-title>\n @if (context().mode === 'edit') {\n {{ locale().dialog.editTitle }}\n } @else if (context().targetKind === 'image') {\n {{ locale().dialog.attachToImage }}\n } @else {\n {{ attachTitle() }}\n }\n </ui-dialog-title>\n </ui-dialog-header>\n\n <div class=\"space-y-4\">\n <input\n type=\"text\" [value]=\"query()\"\n [placeholder]=\"locale().dialog.searchPlaceholder\" [attr.aria-label]=\"locale().dialog.searchLabel\"\n (input)=\"query.set($any($event.target).value)\"\n class=\"flex h-9 w-full rounded-md border border-input bg-transparent px-3 text-sm\"\n />\n\n <div\n class=\"max-h-56 overflow-y-auto rounded-md border\"\n [class.pointer-events-none]=\"busy()\" [class.opacity-50]=\"busy()\"\n >\n @for (def of visibleDefs(); track def.id) {\n <button\n type=\"button\" [attr.data-action-option]=\"def.id\"\n [attr.aria-pressed]=\"selectedDef()?.id === def.id\"\n (click)=\"pickAction(def.id)\"\n class=\"flex w-full items-center justify-between gap-2 px-3 py-2 text-left text-sm hover:bg-accent\"\n [class.bg-accent]=\"selectedDef()?.id === def.id\"\n >\n <span class=\"truncate\">{{ def.label }}</span>\n <span class=\"text-xs text-muted-foreground\">{{ triggerLabels(def.triggers) }}</span>\n </button>\n } @empty {\n <p class=\"px-3 py-2 text-sm text-muted-foreground\">{{ locale().dialog.noActions }}</p>\n }\n </div>\n\n @if (selectedDef(); as def) {\n @if (!isCombined() && def.triggers.length > 1) {\n <div class=\"flex flex-wrap items-center gap-3\">\n @for (t of def.triggers; track t) {\n <label class=\"flex items-center gap-1.5 text-sm\">\n <input\n type=\"radio\" name=\"rta-trigger\" [checked]=\"selectedTrigger() === t\"\n (change)=\"selectTrigger(t)\"\n />\n {{ triggerLabel(t) }}\n @if (occupiedByTrigger().has(t)) {\n <span class=\"text-xs text-muted-foreground\">{{ locale().dialog.replacesExisting }}</span>\n }\n </label>\n }\n </div>\n }\n\n @if (isCombined()) {\n <span class=\"inline-flex rounded bg-accent px-2 py-0.5 text-xs\">{{ locale().dialog.combinedBadge }}</span>\n }\n\n @if (isCombined() && paramsMode() === 'separate') {\n <div class=\"space-y-2\">\n <p data-slot=\"rich-text-actions-dialog-section-header\" class=\"text-sm font-medium\">{{ locale().triggers.hover }}</p>\n <ui-rich-text-actions-form\n [fields]=\"def.fieldsByTrigger?.hover ?? []\" [params]=\"hoverParams()\"\n [requiredTemplate]=\"locale().form.required\"\n (paramsChange)=\"onHoverParamsChange($event)\" (validChange)=\"onHoverValidChange($event)\"\n />\n <p data-slot=\"rich-text-actions-dialog-section-header\" class=\"text-sm font-medium\">{{ locale().triggers.click }}</p>\n <ui-rich-text-actions-form\n [fields]=\"def.fieldsByTrigger?.click ?? []\" [params]=\"currentParams()\"\n [requiredTemplate]=\"locale().form.required\"\n (paramsChange)=\"onParamsChange($event)\" (validChange)=\"onValidChange($event)\"\n />\n </div>\n } @else if (def.formComponent) {\n <ng-container #formHost />\n } @else if (def.fields && def.fields.length > 0) {\n <ui-rich-text-actions-form\n [fields]=\"def.fields\" [params]=\"currentParams()\" [requiredTemplate]=\"locale().form.required\"\n (paramsChange)=\"onParamsChange($event)\" (validChange)=\"onValidChange($event)\"\n />\n }\n }\n </div>\n\n <ui-dialog-footer>\n <ui-button data-testid=\"rta-cancel\" variant=\"ghost\" (click)=\"dismiss.emit()\">{{ locale().dialog.cancel }}</ui-button>\n <ui-button data-testid=\"rta-confirm\" [disabled]=\"!canConfirm()\" (click)=\"onConfirm()\">\n {{ confirmLabel() }}\n </ui-button>\n </ui-dialog-footer>\n </ui-dialog-content>\n</ui-dialog>\n", dependencies: [{ kind: "component", type: DialogComponent, selector: "ui-dialog", inputs: ["open"], outputs: ["openChange"] }, { kind: "component", type: DialogContentComponent, selector: "ui-dialog-content", inputs: ["class", "title", "description", "locale"] }, { kind: "component", type: DialogHeaderComponent, selector: "ui-dialog-header", inputs: ["class"] }, { kind: "component", type: DialogTitleComponent, selector: "ui-dialog-title", inputs: ["class"] }, { kind: "component", type: DialogFooterComponent, selector: "ui-dialog-footer", inputs: ["class"] }, { kind: "component", type: ButtonComponent, selector: "ui-button", inputs: ["variant", "size", "disabled", "type", "class", "ariaLabel", "aria-expanded", "aria-pressed", "aria-haspopup", "aria-controls", "label", "ripple", "rippleColor", "loading", "skeleton"], outputs: ["clicked"] }, { kind: "component", type: RichTextActionsFormComponent, selector: "ui-rich-text-actions-form", inputs: ["class", "fields", "params", "requiredTemplate"], outputs: ["paramsChange", "validChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
22288
22377
  }
22289
22378
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextActionsDialogComponent, decorators: [{
22290
22379
  type: Component,
22291
22380
  args: [{ selector: 'ui-rich-text-actions-dialog', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
22292
22381
  DialogComponent, DialogContentComponent, DialogHeaderComponent,
22293
22382
  DialogTitleComponent, DialogFooterComponent, ButtonComponent, RichTextActionsFormComponent,
22294
- ], host: { '[attr.data-slot]': "'rich-text-actions-dialog'" }, template: "<ui-dialog [open]=\"true\" (openChange)=\"onOpenChange($event)\">\n <ui-dialog-content class=\"max-w-[calc(100vw-2rem)] sm:max-w-md\" [attr.dir]=\"dir()\">\n <ui-dialog-header>\n <ui-dialog-title>\n @if (context().mode === 'edit') {\n {{ locale().dialog.editTitle }}\n } @else if (context().targetKind === 'image') {\n {{ locale().dialog.attachToImage }}\n } @else {\n {{ attachTitle() }}\n }\n </ui-dialog-title>\n </ui-dialog-header>\n\n <div class=\"space-y-4\">\n <input\n type=\"text\" [value]=\"query()\"\n [placeholder]=\"locale().dialog.searchPlaceholder\" [attr.aria-label]=\"locale().dialog.searchLabel\"\n (input)=\"query.set($any($event.target).value)\"\n class=\"flex h-9 w-full rounded-md border border-input bg-transparent px-3 text-sm\"\n />\n\n <div\n class=\"max-h-56 overflow-y-auto rounded-md border\"\n [class.pointer-events-none]=\"busy()\" [class.opacity-50]=\"busy()\"\n >\n @for (def of visibleDefs(); track def.id) {\n <button\n type=\"button\" [attr.data-action-option]=\"def.id\"\n [attr.aria-pressed]=\"selectedDef()?.id === def.id\"\n (click)=\"pickAction(def.id)\"\n class=\"flex w-full items-center justify-between gap-2 px-3 py-2 text-left text-sm hover:bg-accent\"\n [class.bg-accent]=\"selectedDef()?.id === def.id\"\n >\n <span class=\"truncate\">{{ def.label }}</span>\n <span class=\"text-xs text-muted-foreground\">{{ triggerLabels(def.triggers) }}</span>\n </button>\n } @empty {\n <p class=\"px-3 py-2 text-sm text-muted-foreground\">{{ locale().dialog.noActions }}</p>\n }\n </div>\n\n @if (selectedDef(); as def) {\n @if (!isCombined() && def.triggers.length > 1) {\n <div class=\"flex flex-wrap items-center gap-3\">\n @for (t of def.triggers; track t) {\n <label class=\"flex items-center gap-1.5 text-sm\">\n <input\n type=\"radio\" name=\"rta-trigger\" [checked]=\"selectedTrigger() === t\"\n (change)=\"selectTrigger(t)\"\n />\n {{ triggerLabel(t) }}\n @if (occupiedByTrigger().has(t)) {\n <span class=\"text-xs text-muted-foreground\">{{ locale().dialog.replacesExisting }}</span>\n }\n </label>\n }\n </div>\n }\n\n @if (isCombined()) {\n <span class=\"inline-flex rounded bg-accent px-2 py-0.5 text-xs\">{{ locale().dialog.combinedBadge }}</span>\n }\n\n @if (isCombined() && paramsMode() === 'separate') {\n <div class=\"space-y-2\">\n <p data-slot=\"rich-text-actions-dialog-section-header\" class=\"text-sm font-medium\">{{ locale().triggers.hover }}</p>\n <ui-rich-text-actions-form\n [fields]=\"def.fieldsByTrigger?.hover ?? []\" [params]=\"hoverParams()\"\n [requiredTemplate]=\"locale().form.required\"\n (paramsChange)=\"onHoverParamsChange($event)\" (validChange)=\"onHoverValidChange($event)\"\n />\n <p data-slot=\"rich-text-actions-dialog-section-header\" class=\"text-sm font-medium\">{{ locale().triggers.click }}</p>\n <ui-rich-text-actions-form\n [fields]=\"def.fieldsByTrigger?.click ?? []\" [params]=\"currentParams()\"\n [requiredTemplate]=\"locale().form.required\"\n (paramsChange)=\"onParamsChange($event)\" (validChange)=\"onValidChange($event)\"\n />\n </div>\n } @else if (def.formComponent) {\n <ng-container #formHost />\n } @else if (def.fields && def.fields.length > 0) {\n <ui-rich-text-actions-form\n [fields]=\"def.fields\" [params]=\"currentParams()\" [requiredTemplate]=\"locale().form.required\"\n (paramsChange)=\"onParamsChange($event)\" (validChange)=\"onValidChange($event)\"\n />\n }\n }\n </div>\n\n <ui-dialog-footer>\n <ui-button data-testid=\"rta-cancel\" variant=\"ghost\" (click)=\"dismiss.emit()\">{{ locale().dialog.cancel }}</ui-button>\n <ui-button data-testid=\"rta-confirm\" [disabled]=\"!canConfirm()\" (click)=\"onConfirm()\">\n {{ confirmLabel() }}\n </ui-button>\n </ui-dialog-footer>\n </ui-dialog-content>\n</ui-dialog>\n" }]
22295
- }], ctorParameters: () => [], propDecorators: { definitions: [{ type: i0.Input, args: [{ isSignal: true, alias: "definitions", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: true }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], confirm: [{ type: i0.Output, args: ["confirm"] }], dismiss: [{ type: i0.Output, args: ["dismiss"] }], pick: [{ type: i0.Output, args: ["pick"] }], formHost: [{ type: i0.ViewChild, args: ['formHost', { ...{ read: ViewContainerRef }, isSignal: true }] }] } });
22383
+ ], host: { '[attr.data-slot]': "'rich-text-actions-dialog'" }, template: "<ui-dialog [open]=\"true\" (openChange)=\"onOpenChange($event)\">\n <ui-dialog-content [class]=\"classes()\" [attr.dir]=\"dir()\">\n <ui-dialog-header>\n <ui-dialog-title>\n @if (context().mode === 'edit') {\n {{ locale().dialog.editTitle }}\n } @else if (context().targetKind === 'image') {\n {{ locale().dialog.attachToImage }}\n } @else {\n {{ attachTitle() }}\n }\n </ui-dialog-title>\n </ui-dialog-header>\n\n <div class=\"space-y-4\">\n <input\n type=\"text\" [value]=\"query()\"\n [placeholder]=\"locale().dialog.searchPlaceholder\" [attr.aria-label]=\"locale().dialog.searchLabel\"\n (input)=\"query.set($any($event.target).value)\"\n class=\"flex h-9 w-full rounded-md border border-input bg-transparent px-3 text-sm\"\n />\n\n <div\n class=\"max-h-56 overflow-y-auto rounded-md border\"\n [class.pointer-events-none]=\"busy()\" [class.opacity-50]=\"busy()\"\n >\n @for (def of visibleDefs(); track def.id) {\n <button\n type=\"button\" [attr.data-action-option]=\"def.id\"\n [attr.aria-pressed]=\"selectedDef()?.id === def.id\"\n (click)=\"pickAction(def.id)\"\n class=\"flex w-full items-center justify-between gap-2 px-3 py-2 text-left text-sm hover:bg-accent\"\n [class.bg-accent]=\"selectedDef()?.id === def.id\"\n >\n <span class=\"truncate\">{{ def.label }}</span>\n <span class=\"text-xs text-muted-foreground\">{{ triggerLabels(def.triggers) }}</span>\n </button>\n } @empty {\n <p class=\"px-3 py-2 text-sm text-muted-foreground\">{{ locale().dialog.noActions }}</p>\n }\n </div>\n\n @if (selectedDef(); as def) {\n @if (!isCombined() && def.triggers.length > 1) {\n <div class=\"flex flex-wrap items-center gap-3\">\n @for (t of def.triggers; track t) {\n <label class=\"flex items-center gap-1.5 text-sm\">\n <input\n type=\"radio\" name=\"rta-trigger\" [checked]=\"selectedTrigger() === t\"\n (change)=\"selectTrigger(t)\"\n />\n {{ triggerLabel(t) }}\n @if (occupiedByTrigger().has(t)) {\n <span class=\"text-xs text-muted-foreground\">{{ locale().dialog.replacesExisting }}</span>\n }\n </label>\n }\n </div>\n }\n\n @if (isCombined()) {\n <span class=\"inline-flex rounded bg-accent px-2 py-0.5 text-xs\">{{ locale().dialog.combinedBadge }}</span>\n }\n\n @if (isCombined() && paramsMode() === 'separate') {\n <div class=\"space-y-2\">\n <p data-slot=\"rich-text-actions-dialog-section-header\" class=\"text-sm font-medium\">{{ locale().triggers.hover }}</p>\n <ui-rich-text-actions-form\n [fields]=\"def.fieldsByTrigger?.hover ?? []\" [params]=\"hoverParams()\"\n [requiredTemplate]=\"locale().form.required\"\n (paramsChange)=\"onHoverParamsChange($event)\" (validChange)=\"onHoverValidChange($event)\"\n />\n <p data-slot=\"rich-text-actions-dialog-section-header\" class=\"text-sm font-medium\">{{ locale().triggers.click }}</p>\n <ui-rich-text-actions-form\n [fields]=\"def.fieldsByTrigger?.click ?? []\" [params]=\"currentParams()\"\n [requiredTemplate]=\"locale().form.required\"\n (paramsChange)=\"onParamsChange($event)\" (validChange)=\"onValidChange($event)\"\n />\n </div>\n } @else if (def.formComponent) {\n <ng-container #formHost />\n } @else if (def.fields && def.fields.length > 0) {\n <ui-rich-text-actions-form\n [fields]=\"def.fields\" [params]=\"currentParams()\" [requiredTemplate]=\"locale().form.required\"\n (paramsChange)=\"onParamsChange($event)\" (validChange)=\"onValidChange($event)\"\n />\n }\n }\n </div>\n\n <ui-dialog-footer>\n <ui-button data-testid=\"rta-cancel\" variant=\"ghost\" (click)=\"dismiss.emit()\">{{ locale().dialog.cancel }}</ui-button>\n <ui-button data-testid=\"rta-confirm\" [disabled]=\"!canConfirm()\" (click)=\"onConfirm()\">\n {{ confirmLabel() }}\n </ui-button>\n </ui-dialog-footer>\n </ui-dialog-content>\n</ui-dialog>\n" }]
22384
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], definitions: [{ type: i0.Input, args: [{ isSignal: true, alias: "definitions", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: true }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], confirm: [{ type: i0.Output, args: ["confirm"] }], dismiss: [{ type: i0.Output, args: ["dismiss"] }], pick: [{ type: i0.Output, args: ["pick"] }], formHost: [{ type: i0.ViewChild, args: ['formHost', { ...{ read: ViewContainerRef }, isSignal: true }] }] } });
22296
22385
 
22297
22386
  /** Compact editor-side popover listing an element's actions with edit/remove/add. */
22298
22387
  class RichTextActionsPopoverComponent {
22299
22388
  constructor() {
22389
+ /** Extra classes merged onto the popover panel, after its bordered `min-w-56` default. */
22390
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
22391
+ this.classes = computed(() => cn('min-w-56 max-w-[calc(100vw-2rem)] rounded-md border bg-popover p-1 shadow-md', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
22300
22392
  /**
22301
22393
  * The rows to list, tracked by `trigger` — so at most one click row and one
22302
22394
  * hover row, or a single row for a combined action covering both. A row
@@ -22345,12 +22437,12 @@ class RichTextActionsPopoverComponent {
22345
22437
  return `${this.triggerLabel('click')} / ${this.triggerLabel('hover')}`;
22346
22438
  }
22347
22439
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextActionsPopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
22348
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextActionsPopoverComponent, isStandalone: true, selector: "ui-rich-text-actions-popover", inputs: { actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, canAdd: { classPropertyName: "canAdd", publicName: "canAdd", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { edit: "edit", remove: "remove", add: "add" }, host: { properties: { "attr.data-slot": "'rich-text-actions-popover'" } }, ngImport: i0, template: "<div class=\"min-w-56 max-w-[calc(100vw-2rem)] rounded-md border bg-popover p-1 shadow-md\" [attr.dir]=\"dir()\">\n @for (row of actions(); track row.trigger) {\n <div class=\"flex items-center justify-between gap-3 rounded-sm px-2 py-1.5 text-sm\">\n <span class=\"truncate\">\n {{ row.label }} \u00B7 {{ rowTriggerLabel(row) }}\n @if (!row.available) {\n <span class=\"text-xs text-muted-foreground\">{{ locale().popover.unavailable }}</span>\n }\n </span>\n <span class=\"flex shrink-0 items-center gap-3\">\n @if (row.available) {\n <button\n type=\"button\" data-testid=\"rta-edit\" class=\"text-xs underline\"\n (click)=\"edit.emit(row.trigger)\"\n >{{ locale().popover.edit }}</button>\n }\n <button\n type=\"button\" data-testid=\"rta-remove\" class=\"text-xs text-destructive underline\"\n (click)=\"remove.emit(row)\"\n >{{ locale().popover.remove }}</button>\n </span>\n </div>\n }\n @if (canAdd()) {\n <button\n type=\"button\" data-testid=\"rta-add\"\n class=\"w-full rounded-sm px-2 py-1.5 text-left text-sm hover:bg-accent\"\n (click)=\"add.emit()\"\n >{{ locale().popover.add }}</button>\n }\n</div>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
22440
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextActionsPopoverComponent, isStandalone: true, selector: "ui-rich-text-actions-popover", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, canAdd: { classPropertyName: "canAdd", publicName: "canAdd", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { edit: "edit", remove: "remove", add: "add" }, host: { properties: { "attr.data-slot": "'rich-text-actions-popover'" } }, ngImport: i0, template: "<div [class]=\"classes()\" [attr.dir]=\"dir()\">\n @for (row of actions(); track row.trigger) {\n <div class=\"flex items-center justify-between gap-3 rounded-sm px-2 py-1.5 text-sm\">\n <span class=\"truncate\">\n {{ row.label }} \u00B7 {{ rowTriggerLabel(row) }}\n @if (!row.available) {\n <span class=\"text-xs text-muted-foreground\">{{ locale().popover.unavailable }}</span>\n }\n </span>\n <span class=\"flex shrink-0 items-center gap-3\">\n @if (row.available) {\n <button\n type=\"button\" data-testid=\"rta-edit\" class=\"text-xs underline\"\n (click)=\"edit.emit(row.trigger)\"\n >{{ locale().popover.edit }}</button>\n }\n <button\n type=\"button\" data-testid=\"rta-remove\" class=\"text-xs text-destructive underline\"\n (click)=\"remove.emit(row)\"\n >{{ locale().popover.remove }}</button>\n </span>\n </div>\n }\n @if (canAdd()) {\n <button\n type=\"button\" data-testid=\"rta-add\"\n class=\"w-full rounded-sm px-2 py-1.5 text-left text-sm hover:bg-accent\"\n (click)=\"add.emit()\"\n >{{ locale().popover.add }}</button>\n }\n</div>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
22349
22441
  }
22350
22442
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextActionsPopoverComponent, decorators: [{
22351
22443
  type: Component,
22352
- args: [{ selector: 'ui-rich-text-actions-popover', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { '[attr.data-slot]': "'rich-text-actions-popover'" }, template: "<div class=\"min-w-56 max-w-[calc(100vw-2rem)] rounded-md border bg-popover p-1 shadow-md\" [attr.dir]=\"dir()\">\n @for (row of actions(); track row.trigger) {\n <div class=\"flex items-center justify-between gap-3 rounded-sm px-2 py-1.5 text-sm\">\n <span class=\"truncate\">\n {{ row.label }} \u00B7 {{ rowTriggerLabel(row) }}\n @if (!row.available) {\n <span class=\"text-xs text-muted-foreground\">{{ locale().popover.unavailable }}</span>\n }\n </span>\n <span class=\"flex shrink-0 items-center gap-3\">\n @if (row.available) {\n <button\n type=\"button\" data-testid=\"rta-edit\" class=\"text-xs underline\"\n (click)=\"edit.emit(row.trigger)\"\n >{{ locale().popover.edit }}</button>\n }\n <button\n type=\"button\" data-testid=\"rta-remove\" class=\"text-xs text-destructive underline\"\n (click)=\"remove.emit(row)\"\n >{{ locale().popover.remove }}</button>\n </span>\n </div>\n }\n @if (canAdd()) {\n <button\n type=\"button\" data-testid=\"rta-add\"\n class=\"w-full rounded-sm px-2 py-1.5 text-left text-sm hover:bg-accent\"\n (click)=\"add.emit()\"\n >{{ locale().popover.add }}</button>\n }\n</div>\n" }]
22353
- }], propDecorators: { actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], canAdd: [{ type: i0.Input, args: [{ isSignal: true, alias: "canAdd", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], edit: [{ type: i0.Output, args: ["edit"] }], remove: [{ type: i0.Output, args: ["remove"] }], add: [{ type: i0.Output, args: ["add"] }] } });
22444
+ args: [{ selector: 'ui-rich-text-actions-popover', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { '[attr.data-slot]': "'rich-text-actions-popover'" }, template: "<div [class]=\"classes()\" [attr.dir]=\"dir()\">\n @for (row of actions(); track row.trigger) {\n <div class=\"flex items-center justify-between gap-3 rounded-sm px-2 py-1.5 text-sm\">\n <span class=\"truncate\">\n {{ row.label }} \u00B7 {{ rowTriggerLabel(row) }}\n @if (!row.available) {\n <span class=\"text-xs text-muted-foreground\">{{ locale().popover.unavailable }}</span>\n }\n </span>\n <span class=\"flex shrink-0 items-center gap-3\">\n @if (row.available) {\n <button\n type=\"button\" data-testid=\"rta-edit\" class=\"text-xs underline\"\n (click)=\"edit.emit(row.trigger)\"\n >{{ locale().popover.edit }}</button>\n }\n <button\n type=\"button\" data-testid=\"rta-remove\" class=\"text-xs text-destructive underline\"\n (click)=\"remove.emit(row)\"\n >{{ locale().popover.remove }}</button>\n </span>\n </div>\n }\n @if (canAdd()) {\n <button\n type=\"button\" data-testid=\"rta-add\"\n class=\"w-full rounded-sm px-2 py-1.5 text-left text-sm hover:bg-accent\"\n (click)=\"add.emit()\"\n >{{ locale().popover.add }}</button>\n }\n</div>\n" }]
22445
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], canAdd: [{ type: i0.Input, args: [{ isSignal: true, alias: "canAdd", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], edit: [{ type: i0.Output, args: ["edit"] }], remove: [{ type: i0.Output, args: ["remove"] }], add: [{ type: i0.Output, args: ["add"] }] } });
22354
22446
 
22355
22447
  const ATTACH_ID = 'actions.attach';
22356
22448
  const ATTACH_ICON = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" ' +
@@ -23188,6 +23280,9 @@ function hoverCardAction(o = {}) {
23188
23280
  /** The card rendered on the published page for the hover-card preset. */
23189
23281
  class PresetHoverCardComponent {
23190
23282
  constructor() {
23283
+ /** Extra classes merged onto the card, after its bordered popover styling. */
23284
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
23285
+ this.classes = computed(() => cn('max-w-[calc(100vw-2rem)] sm:max-w-xs rounded-md border bg-popover p-3 text-popover-foreground shadow-md', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
23191
23286
  /** Bold heading line; omitted entirely when empty. Fed from the action's `title` param. */
23192
23287
  this.title = input('', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
23193
23288
  /** Muted card text, always rendered. Fed from the action's required `body` param. */
@@ -23196,11 +23291,8 @@ class PresetHoverCardComponent {
23196
23291
  this.dir = input('ltr', ...(ngDevMode ? [{ debugName: "dir" }] : /* istanbul ignore next */ []));
23197
23292
  }
23198
23293
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PresetHoverCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
23199
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: PresetHoverCardComponent, isStandalone: true, selector: "ui-preset-hover-card", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, body: { classPropertyName: "body", publicName: "body", isSignal: true, isRequired: false, transformFunction: null }, dir: { classPropertyName: "dir", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-slot": "'preset-hover-card'" } }, ngImport: i0, template: `
23200
- <div
23201
- class="max-w-[calc(100vw-2rem)] sm:max-w-xs rounded-md border bg-popover p-3 text-popover-foreground shadow-md"
23202
- [attr.dir]="dir()"
23203
- >
23294
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: PresetHoverCardComponent, isStandalone: true, selector: "ui-preset-hover-card", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, body: { classPropertyName: "body", publicName: "body", isSignal: true, isRequired: false, transformFunction: null }, dir: { classPropertyName: "dir", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-slot": "'preset-hover-card'" } }, ngImport: i0, template: `
23295
+ <div [class]="classes()" [attr.dir]="dir()">
23204
23296
  @if (title()) {
23205
23297
  <p class="mb-1 text-sm font-semibold">{{ title() }}</p>
23206
23298
  }
@@ -23215,10 +23307,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
23215
23307
  standalone: true,
23216
23308
  changeDetection: ChangeDetectionStrategy.OnPush,
23217
23309
  template: `
23218
- <div
23219
- class="max-w-[calc(100vw-2rem)] sm:max-w-xs rounded-md border bg-popover p-3 text-popover-foreground shadow-md"
23220
- [attr.dir]="dir()"
23221
- >
23310
+ <div [class]="classes()" [attr.dir]="dir()">
23222
23311
  @if (title()) {
23223
23312
  <p class="mb-1 text-sm font-semibold">{{ title() }}</p>
23224
23313
  }
@@ -23227,7 +23316,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
23227
23316
  `,
23228
23317
  host: { '[attr.data-slot]': "'preset-hover-card'" },
23229
23318
  }]
23230
- }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], body: [{ type: i0.Input, args: [{ isSignal: true, alias: "body", required: false }] }], dir: [{ type: i0.Input, args: [{ isSignal: true, alias: "dir", required: false }] }] } });
23319
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], body: [{ type: i0.Input, args: [{ isSignal: true, alias: "body", required: false }] }], dir: [{ type: i0.Input, args: [{ isSignal: true, alias: "dir", required: false }] }] } });
23231
23320
  /**
23232
23321
  * Handlers for the hover-card preset. Spread the returned map into your
23233
23322
  * `[uiRichTextActions]` handler object. Renders a real floating card in the
@@ -23304,6 +23393,9 @@ function openDialogAction(o = {}) {
23304
23393
  /** The modal rendered on the published page for the open-dialog preset. */
23305
23394
  class PresetDialogComponent {
23306
23395
  constructor() {
23396
+ /** Extra classes merged onto the dialog panel, after its bounded `sm:max-w-md` width. */
23397
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
23398
+ this.classes = computed(() => cn('relative max-w-[calc(100vw-2rem)] sm:max-w-md rounded-lg border bg-background p-4 shadow-xl', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
23307
23399
  /** Dialog heading; the `<h2>` is omitted entirely when empty. Fed from the action's required `title` param. */
23308
23400
  this.title = input('', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
23309
23401
  /** Body text, rendered only when {@link contentComponent} is null. Fed from the action's `body` param. */
@@ -23328,14 +23420,14 @@ class PresetDialogComponent {
23328
23420
  this.dismiss = output();
23329
23421
  }
23330
23422
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PresetDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
23331
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: PresetDialogComponent, isStandalone: true, selector: "ui-preset-dialog", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, body: { classPropertyName: "body", publicName: "body", isSignal: true, isRequired: false, transformFunction: null }, confirmLabel: { classPropertyName: "confirmLabel", publicName: "confirmLabel", isSignal: true, isRequired: false, transformFunction: null }, contentComponent: { classPropertyName: "contentComponent", publicName: "contentComponent", isSignal: true, isRequired: false, transformFunction: null }, contentInjector: { classPropertyName: "contentInjector", publicName: "contentInjector", isSignal: true, isRequired: false, transformFunction: null }, dir: { classPropertyName: "dir", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { confirm: "confirm", dismiss: "dismiss" }, host: { properties: { "attr.data-slot": "'preset-dialog'" } }, ngImport: i0, template: `
23423
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: PresetDialogComponent, isStandalone: true, selector: "ui-preset-dialog", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, body: { classPropertyName: "body", publicName: "body", isSignal: true, isRequired: false, transformFunction: null }, confirmLabel: { classPropertyName: "confirmLabel", publicName: "confirmLabel", isSignal: true, isRequired: false, transformFunction: null }, contentComponent: { classPropertyName: "contentComponent", publicName: "contentComponent", isSignal: true, isRequired: false, transformFunction: null }, contentInjector: { classPropertyName: "contentInjector", publicName: "contentInjector", isSignal: true, isRequired: false, transformFunction: null }, dir: { classPropertyName: "dir", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { confirm: "confirm", dismiss: "dismiss" }, host: { properties: { "attr.data-slot": "'preset-dialog'" } }, ngImport: i0, template: `
23332
23424
  <div class="fixed inset-0 flex items-center justify-center">
23333
23425
  <button
23334
23426
  type="button" aria-label="Close" class="fixed inset-0 bg-black/50"
23335
23427
  (click)="dismiss.emit()"
23336
23428
  ></button>
23337
23429
  <div
23338
- class="relative max-w-[calc(100vw-2rem)] sm:max-w-md rounded-lg border bg-background p-4 shadow-xl"
23430
+ [class]="classes()"
23339
23431
  role="dialog" aria-modal="true" [attr.dir]="dir()"
23340
23432
  >
23341
23433
  @if (title()) {
@@ -23370,7 +23462,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
23370
23462
  (click)="dismiss.emit()"
23371
23463
  ></button>
23372
23464
  <div
23373
- class="relative max-w-[calc(100vw-2rem)] sm:max-w-md rounded-lg border bg-background p-4 shadow-xl"
23465
+ [class]="classes()"
23374
23466
  role="dialog" aria-modal="true" [attr.dir]="dir()"
23375
23467
  >
23376
23468
  @if (title()) {
@@ -23392,7 +23484,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
23392
23484
  `,
23393
23485
  host: { '[attr.data-slot]': "'preset-dialog'" },
23394
23486
  }]
23395
- }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], body: [{ type: i0.Input, args: [{ isSignal: true, alias: "body", required: false }] }], confirmLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirmLabel", required: false }] }], contentComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentComponent", required: false }] }], contentInjector: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentInjector", required: false }] }], dir: [{ type: i0.Input, args: [{ isSignal: true, alias: "dir", required: false }] }], confirm: [{ type: i0.Output, args: ["confirm"] }], dismiss: [{ type: i0.Output, args: ["dismiss"] }] } });
23487
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], body: [{ type: i0.Input, args: [{ isSignal: true, alias: "body", required: false }] }], confirmLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirmLabel", required: false }] }], contentComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentComponent", required: false }] }], contentInjector: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentInjector", required: false }] }], dir: [{ type: i0.Input, args: [{ isSignal: true, alias: "dir", required: false }] }], confirm: [{ type: i0.Output, args: ["confirm"] }], dismiss: [{ type: i0.Output, args: ["dismiss"] }] } });
23396
23488
  /**
23397
23489
  * Handlers for the open-dialog preset. Spread the returned map into your
23398
23490
  * `[uiRichTextActions]` handler object. Opens a real modal on click, showing
@@ -23718,14 +23810,17 @@ const RICH_TEXT_AI_CONTEXT = new InjectionToken('RICH_TEXT_AI_CONTEXT');
23718
23810
  class RichTextAiChipComponent {
23719
23811
  constructor() {
23720
23812
  this.ctx = inject(RICH_TEXT_AI_CONTEXT);
23813
+ /** Extra classes merged onto the chip button, after its floating popover styling. */
23814
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
23815
+ this.classes = computed(() => cn('fixed z-[9999] inline-flex items-center gap-1 rounded-md border bg-popover px-2 py-1 text-xs font-medium shadow-lg hover:bg-accent', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
23721
23816
  }
23722
23817
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextAiChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
23723
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextAiChipComponent, isStandalone: true, selector: "ui-rte-ai-chip", host: { classAttribute: "contents" }, ngImport: i0, template: "@if (ctx.chipVisible()) {\n <button\n type=\"button\"\n data-slot=\"rich-text-ai-trigger\"\n class=\"fixed z-[9999] inline-flex items-center gap-1 rounded-md border bg-popover px-2 py-1 text-xs font-medium shadow-lg hover:bg-accent\"\n [style.left.px]=\"ctx.chipPosition().x\"\n [style.top.px]=\"ctx.chipPosition().y\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"ctx.openPanel()\"\n >\n {{ ctx.locale().trigger }}\n </button>\n}\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
23818
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextAiChipComponent, isStandalone: true, selector: "ui-rte-ai-chip", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: "@if (ctx.chipVisible()) {\n <button\n type=\"button\"\n data-slot=\"rich-text-ai-trigger\"\n [class]=\"classes()\"\n [style.left.px]=\"ctx.chipPosition().x\"\n [style.top.px]=\"ctx.chipPosition().y\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"ctx.openPanel()\"\n >\n {{ ctx.locale().trigger }}\n </button>\n}\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
23724
23819
  }
23725
23820
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextAiChipComponent, decorators: [{
23726
23821
  type: Component,
23727
- args: [{ selector: 'ui-rte-ai-chip', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'contents' }, template: "@if (ctx.chipVisible()) {\n <button\n type=\"button\"\n data-slot=\"rich-text-ai-trigger\"\n class=\"fixed z-[9999] inline-flex items-center gap-1 rounded-md border bg-popover px-2 py-1 text-xs font-medium shadow-lg hover:bg-accent\"\n [style.left.px]=\"ctx.chipPosition().x\"\n [style.top.px]=\"ctx.chipPosition().y\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"ctx.openPanel()\"\n >\n {{ ctx.locale().trigger }}\n </button>\n}\n" }]
23728
- }] });
23822
+ args: [{ selector: 'ui-rte-ai-chip', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'contents' }, template: "@if (ctx.chipVisible()) {\n <button\n type=\"button\"\n data-slot=\"rich-text-ai-trigger\"\n [class]=\"classes()\"\n [style.left.px]=\"ctx.chipPosition().x\"\n [style.top.px]=\"ctx.chipPosition().y\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"ctx.openPanel()\"\n >\n {{ ctx.locale().trigger }}\n </button>\n}\n" }]
23823
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
23729
23824
 
23730
23825
  /**
23731
23826
  * The AI addon's task panel: a fixed, viewport-clamped popover anchored under
@@ -23740,6 +23835,9 @@ class RichTextAiPanelComponent {
23740
23835
  constructor() {
23741
23836
  this.ctx = inject(RICH_TEXT_AI_CONTEXT);
23742
23837
  this.customPrompt = signal('', ...(ngDevMode ? [{ debugName: "customPrompt" }] : /* istanbul ignore next */ []));
23838
+ /** Extra classes merged onto the panel, after its bounded `w-72` popover styling. */
23839
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
23840
+ this.classes = computed(() => cn('fixed z-[9999] w-72 max-w-[calc(100vw-2rem)] rounded-lg border bg-popover p-2 shadow-xl', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
23743
23841
  effect(() => {
23744
23842
  if (this.ctx.panelOpen() && this.ctx.phase() === 'menu') {
23745
23843
  this.customPrompt.set('');
@@ -23755,12 +23853,12 @@ class RichTextAiPanelComponent {
23755
23853
  this.ctx.runCustom(prompt);
23756
23854
  }
23757
23855
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextAiPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
23758
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextAiPanelComponent, isStandalone: true, selector: "ui-rte-ai-panel", host: { classAttribute: "contents" }, ngImport: i0, template: "@if (ctx.panelOpen()) {\n <div\n data-slot=\"rich-text-ai-panel\"\n role=\"dialog\"\n [attr.aria-label]=\"ctx.locale().panelLabel\"\n class=\"fixed z-[9999] w-72 max-w-[calc(100vw-2rem)] rounded-lg border bg-popover p-2 shadow-xl\"\n [style.left.px]=\"ctx.panelPosition().x\"\n [style.top.px]=\"ctx.panelPosition().y\"\n >\n @if (ctx.phase() === 'menu') {\n <div class=\"flex flex-col gap-0.5\" data-slot=\"rich-text-ai-menu\">\n @for (t of ctx.tasks(); track t.task) {\n <button\n type=\"button\"\n class=\"flex w-full items-center rounded px-2 py-1.5 text-left text-sm hover:bg-accent\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"ctx.runTask(t.task)\"\n >\n {{ t.label }}\n </button>\n }\n <div class=\"mt-1 flex items-center gap-1 border-t pt-2\">\n <input\n type=\"text\"\n class=\"h-8 min-w-0 flex-1 rounded-md border bg-background px-2 text-sm outline-none focus:ring-1 focus:ring-ring\"\n [placeholder]=\"ctx.locale().promptPlaceholder\"\n [attr.aria-label]=\"ctx.locale().promptPlaceholder\"\n [value]=\"customPrompt()\"\n (input)=\"onCustomInput($event)\"\n (keydown.enter)=\"runCustom()\"\n (mousedown)=\"$event.stopPropagation()\"\n />\n <ui-button size=\"sm\" [disabled]=\"!customPrompt().trim()\" (click)=\"runCustom()\">{{ ctx.locale().go }}</ui-button>\n </div>\n </div>\n } @else {\n <div class=\"flex flex-col gap-2\" data-slot=\"rich-text-ai-review\">\n @if (ctx.phase() === 'loading') {\n <output\n class=\"block px-1 text-xs text-muted-foreground\"\n aria-live=\"polite\"\n data-slot=\"rich-text-ai-loading\"\n >{{ ctx.locale().generating }}</output>\n }\n @if (ctx.errorMessage()) {\n <p class=\"px-1 text-xs text-destructive\" role=\"alert\" data-slot=\"rich-text-ai-error\">{{ ctx.errorMessage() }}</p>\n }\n <div class=\"flex flex-wrap gap-1\">\n <ui-button size=\"sm\" [disabled]=\"ctx.phase() === 'loading'\" (click)=\"ctx.accept()\">{{ ctx.locale().accept }}</ui-button>\n <ui-button size=\"sm\" variant=\"outline\" (click)=\"ctx.discard()\">{{ ctx.locale().discard }}</ui-button>\n <ui-button size=\"sm\" variant=\"ghost\" [disabled]=\"ctx.phase() === 'loading'\" (click)=\"ctx.retryLast()\">{{ ctx.locale().retry }}</ui-button>\n </div>\n </div>\n }\n </div>\n}\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "ui-button", inputs: ["variant", "size", "disabled", "type", "class", "ariaLabel", "aria-expanded", "aria-pressed", "aria-haspopup", "aria-controls", "label", "ripple", "rippleColor", "loading", "skeleton"], outputs: ["clicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
23856
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextAiPanelComponent, isStandalone: true, selector: "ui-rte-ai-panel", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: "@if (ctx.panelOpen()) {\n <div\n data-slot=\"rich-text-ai-panel\"\n role=\"dialog\"\n [attr.aria-label]=\"ctx.locale().panelLabel\"\n [class]=\"classes()\"\n [style.left.px]=\"ctx.panelPosition().x\"\n [style.top.px]=\"ctx.panelPosition().y\"\n >\n @if (ctx.phase() === 'menu') {\n <div class=\"flex flex-col gap-0.5\" data-slot=\"rich-text-ai-menu\">\n @for (t of ctx.tasks(); track t.task) {\n <button\n type=\"button\"\n class=\"flex w-full items-center rounded px-2 py-1.5 text-left text-sm hover:bg-accent\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"ctx.runTask(t.task)\"\n >\n {{ t.label }}\n </button>\n }\n <div class=\"mt-1 flex items-center gap-1 border-t pt-2\">\n <input\n type=\"text\"\n class=\"h-8 min-w-0 flex-1 rounded-md border bg-background px-2 text-sm outline-none focus:ring-1 focus:ring-ring\"\n [placeholder]=\"ctx.locale().promptPlaceholder\"\n [attr.aria-label]=\"ctx.locale().promptPlaceholder\"\n [value]=\"customPrompt()\"\n (input)=\"onCustomInput($event)\"\n (keydown.enter)=\"runCustom()\"\n (mousedown)=\"$event.stopPropagation()\"\n />\n <ui-button size=\"sm\" [disabled]=\"!customPrompt().trim()\" (click)=\"runCustom()\">{{ ctx.locale().go }}</ui-button>\n </div>\n </div>\n } @else {\n <div class=\"flex flex-col gap-2\" data-slot=\"rich-text-ai-review\">\n @if (ctx.phase() === 'loading') {\n <output\n class=\"block px-1 text-xs text-muted-foreground\"\n aria-live=\"polite\"\n data-slot=\"rich-text-ai-loading\"\n >{{ ctx.locale().generating }}</output>\n }\n @if (ctx.errorMessage()) {\n <p class=\"px-1 text-xs text-destructive\" role=\"alert\" data-slot=\"rich-text-ai-error\">{{ ctx.errorMessage() }}</p>\n }\n <div class=\"flex flex-wrap gap-1\">\n <ui-button size=\"sm\" [disabled]=\"ctx.phase() === 'loading'\" (click)=\"ctx.accept()\">{{ ctx.locale().accept }}</ui-button>\n <ui-button size=\"sm\" variant=\"outline\" (click)=\"ctx.discard()\">{{ ctx.locale().discard }}</ui-button>\n <ui-button size=\"sm\" variant=\"ghost\" [disabled]=\"ctx.phase() === 'loading'\" (click)=\"ctx.retryLast()\">{{ ctx.locale().retry }}</ui-button>\n </div>\n </div>\n }\n </div>\n}\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "ui-button", inputs: ["variant", "size", "disabled", "type", "class", "ariaLabel", "aria-expanded", "aria-pressed", "aria-haspopup", "aria-controls", "label", "ripple", "rippleColor", "loading", "skeleton"], outputs: ["clicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
23759
23857
  }
23760
23858
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextAiPanelComponent, decorators: [{
23761
23859
  type: Component,
23762
- args: [{ selector: 'ui-rte-ai-panel', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [ButtonComponent], host: { class: 'contents' }, template: "@if (ctx.panelOpen()) {\n <div\n data-slot=\"rich-text-ai-panel\"\n role=\"dialog\"\n [attr.aria-label]=\"ctx.locale().panelLabel\"\n class=\"fixed z-[9999] w-72 max-w-[calc(100vw-2rem)] rounded-lg border bg-popover p-2 shadow-xl\"\n [style.left.px]=\"ctx.panelPosition().x\"\n [style.top.px]=\"ctx.panelPosition().y\"\n >\n @if (ctx.phase() === 'menu') {\n <div class=\"flex flex-col gap-0.5\" data-slot=\"rich-text-ai-menu\">\n @for (t of ctx.tasks(); track t.task) {\n <button\n type=\"button\"\n class=\"flex w-full items-center rounded px-2 py-1.5 text-left text-sm hover:bg-accent\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"ctx.runTask(t.task)\"\n >\n {{ t.label }}\n </button>\n }\n <div class=\"mt-1 flex items-center gap-1 border-t pt-2\">\n <input\n type=\"text\"\n class=\"h-8 min-w-0 flex-1 rounded-md border bg-background px-2 text-sm outline-none focus:ring-1 focus:ring-ring\"\n [placeholder]=\"ctx.locale().promptPlaceholder\"\n [attr.aria-label]=\"ctx.locale().promptPlaceholder\"\n [value]=\"customPrompt()\"\n (input)=\"onCustomInput($event)\"\n (keydown.enter)=\"runCustom()\"\n (mousedown)=\"$event.stopPropagation()\"\n />\n <ui-button size=\"sm\" [disabled]=\"!customPrompt().trim()\" (click)=\"runCustom()\">{{ ctx.locale().go }}</ui-button>\n </div>\n </div>\n } @else {\n <div class=\"flex flex-col gap-2\" data-slot=\"rich-text-ai-review\">\n @if (ctx.phase() === 'loading') {\n <output\n class=\"block px-1 text-xs text-muted-foreground\"\n aria-live=\"polite\"\n data-slot=\"rich-text-ai-loading\"\n >{{ ctx.locale().generating }}</output>\n }\n @if (ctx.errorMessage()) {\n <p class=\"px-1 text-xs text-destructive\" role=\"alert\" data-slot=\"rich-text-ai-error\">{{ ctx.errorMessage() }}</p>\n }\n <div class=\"flex flex-wrap gap-1\">\n <ui-button size=\"sm\" [disabled]=\"ctx.phase() === 'loading'\" (click)=\"ctx.accept()\">{{ ctx.locale().accept }}</ui-button>\n <ui-button size=\"sm\" variant=\"outline\" (click)=\"ctx.discard()\">{{ ctx.locale().discard }}</ui-button>\n <ui-button size=\"sm\" variant=\"ghost\" [disabled]=\"ctx.phase() === 'loading'\" (click)=\"ctx.retryLast()\">{{ ctx.locale().retry }}</ui-button>\n </div>\n </div>\n }\n </div>\n}\n" }]
23763
- }], ctorParameters: () => [] });
23860
+ args: [{ selector: 'ui-rte-ai-panel', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [ButtonComponent], host: { class: 'contents' }, template: "@if (ctx.panelOpen()) {\n <div\n data-slot=\"rich-text-ai-panel\"\n role=\"dialog\"\n [attr.aria-label]=\"ctx.locale().panelLabel\"\n [class]=\"classes()\"\n [style.left.px]=\"ctx.panelPosition().x\"\n [style.top.px]=\"ctx.panelPosition().y\"\n >\n @if (ctx.phase() === 'menu') {\n <div class=\"flex flex-col gap-0.5\" data-slot=\"rich-text-ai-menu\">\n @for (t of ctx.tasks(); track t.task) {\n <button\n type=\"button\"\n class=\"flex w-full items-center rounded px-2 py-1.5 text-left text-sm hover:bg-accent\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"ctx.runTask(t.task)\"\n >\n {{ t.label }}\n </button>\n }\n <div class=\"mt-1 flex items-center gap-1 border-t pt-2\">\n <input\n type=\"text\"\n class=\"h-8 min-w-0 flex-1 rounded-md border bg-background px-2 text-sm outline-none focus:ring-1 focus:ring-ring\"\n [placeholder]=\"ctx.locale().promptPlaceholder\"\n [attr.aria-label]=\"ctx.locale().promptPlaceholder\"\n [value]=\"customPrompt()\"\n (input)=\"onCustomInput($event)\"\n (keydown.enter)=\"runCustom()\"\n (mousedown)=\"$event.stopPropagation()\"\n />\n <ui-button size=\"sm\" [disabled]=\"!customPrompt().trim()\" (click)=\"runCustom()\">{{ ctx.locale().go }}</ui-button>\n </div>\n </div>\n } @else {\n <div class=\"flex flex-col gap-2\" data-slot=\"rich-text-ai-review\">\n @if (ctx.phase() === 'loading') {\n <output\n class=\"block px-1 text-xs text-muted-foreground\"\n aria-live=\"polite\"\n data-slot=\"rich-text-ai-loading\"\n >{{ ctx.locale().generating }}</output>\n }\n @if (ctx.errorMessage()) {\n <p class=\"px-1 text-xs text-destructive\" role=\"alert\" data-slot=\"rich-text-ai-error\">{{ ctx.errorMessage() }}</p>\n }\n <div class=\"flex flex-wrap gap-1\">\n <ui-button size=\"sm\" [disabled]=\"ctx.phase() === 'loading'\" (click)=\"ctx.accept()\">{{ ctx.locale().accept }}</ui-button>\n <ui-button size=\"sm\" variant=\"outline\" (click)=\"ctx.discard()\">{{ ctx.locale().discard }}</ui-button>\n <ui-button size=\"sm\" variant=\"ghost\" [disabled]=\"ctx.phase() === 'loading'\" (click)=\"ctx.retryLast()\">{{ ctx.locale().retry }}</ui-button>\n </div>\n </div>\n }\n </div>\n}\n" }]
23861
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
23764
23862
 
23765
23863
  const CHIP_OFFSET_Y = 40;
23766
23864
  const PANEL_OFFSET_Y = 8;
@@ -24317,8 +24415,14 @@ function parseHex(input) {
24317
24415
  }
24318
24416
  return null;
24319
24417
  }
24418
+ /**
24419
+ * `scale` is the value 100% stands for. CSS Color 4 `none` is a missing
24420
+ * component, which converts as 0.
24421
+ */
24320
24422
  function parseChannel(s, scale) {
24321
24423
  const t = s.trim();
24424
+ if (t === 'none')
24425
+ return 0;
24322
24426
  if (t.endsWith('%')) {
24323
24427
  return (Number.parseFloat(t) / 100) * scale;
24324
24428
  }
@@ -24339,6 +24443,31 @@ function parseRgbFunc(input) {
24339
24443
  return null;
24340
24444
  return { r: clamp255(r), g: clamp255(g), b: clamp255(b), a: clamp01(a) };
24341
24445
  }
24446
+ const DEGREES_PER_ANGLE_UNIT = {
24447
+ deg: 1,
24448
+ grad: 0.9,
24449
+ rad: 180 / Math.PI,
24450
+ turn: 360,
24451
+ };
24452
+ /**
24453
+ * Chroma that 100% stands for in CSS Color 4's `oklch()`; the other
24454
+ * percentage references are 100 for `hsl()` s/l and 1 for lightness/alpha.
24455
+ */
24456
+ const OKLCH_CHROMA_AT_100_PERCENT = 0.4;
24457
+ /**
24458
+ * A CSS `<hue>` in degrees: a bare number (degrees), a number with a
24459
+ * `deg` / `grad` / `rad` / `turn` unit, or `none`. NaN when it is none of those.
24460
+ */
24461
+ function parseHue(token) {
24462
+ if (token === 'none')
24463
+ return 0;
24464
+ // 'grad' is tried before its suffix 'rad'.
24465
+ const unit = Object.keys(DEGREES_PER_ANGLE_UNIT).find(u => token.endsWith(u));
24466
+ const digits = unit ? token.slice(0, -unit.length) : token;
24467
+ if (!/^[+-]?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?$/.test(digits))
24468
+ return Number.NaN;
24469
+ return Number(digits) * DEGREES_PER_ANGLE_UNIT[unit ?? 'deg'];
24470
+ }
24342
24471
  function parseHslFunc(input) {
24343
24472
  const m = /^hsla?\(([^)]+)\)$/i.exec(input.trim());
24344
24473
  if (!m)
@@ -24346,9 +24475,9 @@ function parseHslFunc(input) {
24346
24475
  const parts = m[1].split(/[\s,/]+/).filter(Boolean);
24347
24476
  if (parts.length < 3)
24348
24477
  return null;
24349
- const h = Number.parseFloat(parts[0]);
24350
- const s = Number.parseFloat(parts[1]);
24351
- const l = Number.parseFloat(parts[2]);
24478
+ const h = parseHue(parts[0]);
24479
+ const s = parseChannel(parts[1], 100);
24480
+ const l = parseChannel(parts[2], 100);
24352
24481
  const a = parts.length >= 4 ? parseChannel(parts[3], 1) : 1;
24353
24482
  if ([h, s, l, a].some(Number.isNaN))
24354
24483
  return null;
@@ -24362,10 +24491,9 @@ function parseOklchFunc(input) {
24362
24491
  const parts = m[1].split(/[\s,/]+/).filter(Boolean);
24363
24492
  if (parts.length < 3)
24364
24493
  return null;
24365
- const lStr = parts[0];
24366
- const l = lStr.endsWith('%') ? Number.parseFloat(lStr) / 100 : Number.parseFloat(lStr);
24367
- const c = Number.parseFloat(parts[1]);
24368
- const h = Number.parseFloat(parts[2]);
24494
+ const l = parseChannel(parts[0], 1);
24495
+ const c = Math.max(0, parseChannel(parts[1], OKLCH_CHROMA_AT_100_PERCENT));
24496
+ const h = parseHue(parts[2]);
24369
24497
  const a = parts.length >= 4 ? parseChannel(parts[3], 1) : 1;
24370
24498
  if ([l, c, h, a].some(Number.isNaN))
24371
24499
  return null;
@@ -24450,6 +24578,15 @@ function roundTo(v, places) {
24450
24578
  return Math.round(v * f) / f;
24451
24579
  }
24452
24580
  function rgbToHsl(c) {
24581
+ const exact = rgbToHslExact(c);
24582
+ return { h: Math.round(exact.h), s: Math.round(exact.s), l: Math.round(exact.l) };
24583
+ }
24584
+ /**
24585
+ * {@link rgbToHsl} without rounding (h in degrees, s and l in percent), for
24586
+ * callers that interpolate: rounding to whole degrees first would add up to
24587
+ * half a degree of hue error at each endpoint.
24588
+ */
24589
+ function rgbToHslExact(c) {
24453
24590
  const r = c.r / 255;
24454
24591
  const g = c.g / 255;
24455
24592
  const b = c.b / 255;
@@ -24463,7 +24600,7 @@ function rgbToHsl(c) {
24463
24600
  s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
24464
24601
  h = hueFromMaxChannel(r, g, b, max, d);
24465
24602
  }
24466
- return { h: Math.round(h * 360), s: Math.round(s * 100), l: Math.round(l * 100) };
24603
+ return { h: h * 360, s: s * 100, l: l * 100 };
24467
24604
  }
24468
24605
  function hueFromMaxChannel(r, g, b, max, d) {
24469
24606
  if (max === r)
@@ -24618,14 +24755,23 @@ const WHITE = { r: 255, g: 255, b: 255 };
24618
24755
  * `color-contrast` failure. Deriving the foreground from the background's
24619
24756
  * luminance keeps the caller's colour and makes the text legible on all of them.
24620
24757
  *
24621
- * Falls back to white when `background` cannot be parsed.
24758
+ * A translucent `background` is judged as it is seen: composited over
24759
+ * `backdrop` (assumed opaque; its own alpha is ignored). The backdrop defaults
24760
+ * to white and falls back to it when unparseable.
24761
+ *
24762
+ * Falls back to white text when `background` cannot be parsed.
24622
24763
  */
24623
- function readableForeground(background) {
24764
+ function readableForeground(background, backdrop = '#ffffff') {
24624
24765
  const bg = parseColor(background);
24625
24766
  if (!bg)
24626
24767
  return '#ffffff';
24627
- const rgb = { r: bg.r, g: bg.g, b: bg.b };
24628
- return contrastRatio(rgb, BLACK) >= contrastRatio(rgb, WHITE) ? '#000000' : '#ffffff';
24768
+ const seen = compositeOver(bg, parseColor(backdrop) ?? WHITE);
24769
+ return contrastRatio(seen, BLACK) >= contrastRatio(seen, WHITE) ? '#000000' : '#ffffff';
24770
+ }
24771
+ /** Unrounded so a near-tie contrast decision is not flipped by 8-bit rounding. */
24772
+ function compositeOver(fg, backdrop) {
24773
+ const over = (f, b) => f * fg.a + b * (1 - fg.a);
24774
+ return { r: over(fg.r, backdrop.r), g: over(fg.g, backdrop.g), b: over(fg.b, backdrop.b) };
24629
24775
  }
24630
24776
  function rotateHue(c, deltaDeg) {
24631
24777
  const hsl = rgbToHsl(c);
@@ -24662,6 +24808,9 @@ class PopoverComponent {
24662
24808
  this.portalEl = el;
24663
24809
  }
24664
24810
  constructor() {
24811
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
24812
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
24813
+ this.classes = computed(() => cn('relative inline-block', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
24665
24814
  this.el = inject(ElementRef);
24666
24815
  this.document = inject(DOCUMENT);
24667
24816
  this.destroyRef = inject(DestroyRef);
@@ -24763,7 +24912,7 @@ class PopoverComponent {
24763
24912
  return this.el.nativeElement.querySelector('[data-slot="popover-trigger"]');
24764
24913
  }
24765
24914
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
24766
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: PopoverComponent, isStandalone: true, selector: "ui-popover", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, closeOnScroll: { classPropertyName: "closeOnScroll", publicName: "closeOnScroll", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { classAttribute: "relative inline-block" }, providers: [{ provide: POPOVER, useExisting: forwardRef(() => PopoverComponent) }], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
24915
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: PopoverComponent, isStandalone: true, selector: "ui-popover", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, closeOnScroll: { classPropertyName: "closeOnScroll", publicName: "closeOnScroll", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { attributes: { "data-slot": "popover" }, properties: { "class": "classes()" } }, providers: [{ provide: POPOVER, useExisting: forwardRef(() => PopoverComponent) }], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
24767
24916
  }
24768
24917
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PopoverComponent, decorators: [{
24769
24918
  type: Component,
@@ -24772,12 +24921,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
24772
24921
  changeDetection: ChangeDetectionStrategy.OnPush,
24773
24922
  providers: [{ provide: POPOVER, useExisting: forwardRef(() => PopoverComponent) }],
24774
24923
  template: `<ng-content />`,
24775
- host: { class: 'relative inline-block' },
24924
+ // Static, not bound: a template `data-slot` (tree-select sets its own on this host) must win.
24925
+ host: { '[class]': 'classes()', 'data-slot': 'popover' },
24776
24926
  }]
24777
- }], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], closeOnScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnScroll", required: false }] }] } });
24927
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], closeOnScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnScroll", required: false }] }] } });
24778
24928
 
24779
24929
  class PopoverTriggerComponent {
24780
24930
  constructor() {
24931
+ /** Extra classes for the element that wraps the projected trigger. */
24932
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
24781
24933
  this.popover = inject(POPOVER, { optional: true });
24782
24934
  this.host = inject(ElementRef);
24783
24935
  /**
@@ -24809,8 +24961,9 @@ class PopoverTriggerComponent {
24809
24961
  this.popover?.toggle();
24810
24962
  }
24811
24963
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PopoverTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
24812
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: PopoverTriggerComponent, isStandalone: true, selector: "ui-popover-trigger", host: { classAttribute: "contents" }, ngImport: i0, template: `
24964
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: PopoverTriggerComponent, isStandalone: true, selector: "ui-popover-trigger", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: `
24813
24965
  <span
24966
+ [class]="class()"
24814
24967
  [attr.role]="wrapsInteractive() ? null : 'button'"
24815
24968
  [attr.tabindex]="wrapsInteractive() ? null : 0"
24816
24969
  (click)="onClick($event)"
@@ -24829,6 +24982,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
24829
24982
  changeDetection: ChangeDetectionStrategy.OnPush,
24830
24983
  template: `
24831
24984
  <span
24985
+ [class]="class()"
24832
24986
  [attr.role]="wrapsInteractive() ? null : 'button'"
24833
24987
  [attr.tabindex]="wrapsInteractive() ? null : 0"
24834
24988
  (click)="onClick($event)"
@@ -24841,7 +24995,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
24841
24995
  `,
24842
24996
  host: { class: 'contents' },
24843
24997
  }]
24844
- }], ctorParameters: () => [] });
24998
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
24845
24999
 
24846
25000
  class PopoverContentComponent {
24847
25001
  constructor() {
@@ -24878,6 +25032,7 @@ class PopoverContentComponent {
24878
25032
  this.portalHost = null;
24879
25033
  this.usedPopoverApi = false;
24880
25034
  this.wasOpen = false;
25035
+ this.destroyed = false;
24881
25036
  this.portalReady = signal(false, ...(ngDevMode ? [{ debugName: "portalReady" }] : /* istanbul ignore next */ []));
24882
25037
  /**
24883
25038
  * Trigger geometry captured on a settled frame. `positionStyles` reads this
@@ -24966,7 +25121,7 @@ class PopoverContentComponent {
24966
25121
  this.calculatePosition();
24967
25122
  }
24968
25123
  portalAndPosition(attempt) {
24969
- if (!this.popover?.open())
25124
+ if (this.destroyed || !this.popover?.open())
24970
25125
  return;
24971
25126
  const placed = this.placeContent();
24972
25127
  if (!placed && this.strategy() === 'fixed' && attempt < 10) {
@@ -24991,11 +25146,11 @@ class PopoverContentComponent {
24991
25146
  * adjustment runs and the content is revealed.
24992
25147
  */
24993
25148
  finalizeFixedPosition() {
24994
- if (!this.popover?.open())
25149
+ if (this.destroyed || !this.popover?.open())
24995
25150
  return;
24996
25151
  this.triggerRectSig.set(this.popover.getTriggerRect());
24997
25152
  requestAnimationFrame(() => {
24998
- if (!this.popover?.open())
25153
+ if (this.destroyed || !this.popover?.open())
24999
25154
  return;
25000
25155
  this.triggerRectSig.set(this.popover.getTriggerRect());
25001
25156
  const el = this.contentEl?.nativeElement;
@@ -25005,6 +25160,9 @@ class PopoverContentComponent {
25005
25160
  });
25006
25161
  }
25007
25162
  ngOnDestroy() {
25163
+ // Destroying the content does not close the popover, so `open()` is still true when a frame
25164
+ // scheduled at open fires; without this flag that frame portals the detached panel into <body>.
25165
+ this.destroyed = true;
25008
25166
  this.removeContent();
25009
25167
  }
25010
25168
  /**
@@ -25243,6 +25401,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
25243
25401
 
25244
25402
  class PopoverCloseComponent {
25245
25403
  constructor() {
25404
+ /** Extra classes for the element that wraps the projected trigger. */
25405
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
25246
25406
  this.popover = inject(POPOVER, { optional: true });
25247
25407
  this.host = inject(ElementRef);
25248
25408
  /** See `lib/a11y.ts` — stays transparent when the projected content is already a control. */
@@ -25267,8 +25427,9 @@ class PopoverCloseComponent {
25267
25427
  this.onClick();
25268
25428
  }
25269
25429
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PopoverCloseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
25270
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: PopoverCloseComponent, isStandalone: true, selector: "ui-popover-close", host: { classAttribute: "contents" }, ngImport: i0, template: `
25430
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: PopoverCloseComponent, isStandalone: true, selector: "ui-popover-close", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: `
25271
25431
  <span
25432
+ [class]="class()"
25272
25433
  [attr.role]="wrapsInteractive() ? null : 'button'"
25273
25434
  [attr.tabindex]="wrapsInteractive() ? null : 0"
25274
25435
  (click)="onClick()"
@@ -25287,6 +25448,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
25287
25448
  changeDetection: ChangeDetectionStrategy.OnPush,
25288
25449
  template: `
25289
25450
  <span
25451
+ [class]="class()"
25290
25452
  [attr.role]="wrapsInteractive() ? null : 'button'"
25291
25453
  [attr.tabindex]="wrapsInteractive() ? null : 0"
25292
25454
  (click)="onClick()"
@@ -25299,7 +25461,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
25299
25461
  `,
25300
25462
  host: { class: 'contents' },
25301
25463
  }]
25302
- }], ctorParameters: () => [] });
25464
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
25303
25465
 
25304
25466
  const COLOR_PICKER_LOCALES = {
25305
25467
  en: {
@@ -26071,50 +26233,58 @@ function vboxLongestAxis(box) {
26071
26233
  function vboxVolume(box) {
26072
26234
  return (box.rMax - box.rMin + 1) * (box.gMax - box.gMin + 1) * (box.bMax - box.bMin + 1);
26073
26235
  }
26236
+ /**
26237
+ * Splits along the longest axis at the median pixel (Heckbert), so both halves
26238
+ * hold about as many pixels. Pixels of one value stay together, so the cut
26239
+ * moves to the nearest change of value; null when the box is a single colour.
26240
+ */
26074
26241
  function splitVBox(box) {
26075
26242
  if (box.pixels.length < 2)
26076
26243
  return null;
26077
26244
  const axis = vboxLongestAxis(box);
26078
- const [min, max] = axisRange(box, axis);
26079
- if (max === min)
26245
+ const sorted = [...box.pixels].sort((a, b) => a[axis] - b[axis]);
26246
+ const cut = nearestValueChange(sorted, axis, sorted.length >> 1);
26247
+ if (cut === null)
26080
26248
  return null;
26081
- const midValue = (min + max) / 2;
26082
- const left = [];
26083
- const right = [];
26084
- for (const p of box.pixels) {
26085
- if (p[axis] <= midValue)
26086
- left.push(p);
26087
- else
26088
- right.push(p);
26089
- }
26090
- if (left.length === 0 || right.length === 0)
26091
- return null;
26092
- return [makeVBox(left), makeVBox(right)];
26249
+ return [makeVBox(sorted.slice(0, cut)), makeVBox(sorted.slice(cut))];
26093
26250
  }
26094
- function axisRange(box, axis) {
26095
- if (axis === 'r')
26096
- return [box.rMin, box.rMax];
26097
- if (axis === 'g')
26098
- return [box.gMin, box.gMax];
26099
- return [box.bMin, box.bMax];
26251
+ /** Index `i` closest to `target` with `sorted[i]` and `sorted[i - 1]` differing on `axis`, or null. */
26252
+ function nearestValueChange(sorted, axis, target) {
26253
+ const changesAt = (i) => i >= 1 && i < sorted.length && sorted[i][axis] !== sorted[i - 1][axis];
26254
+ for (let distance = 0; distance < sorted.length; distance++) {
26255
+ if (changesAt(target - distance))
26256
+ return target - distance;
26257
+ if (changesAt(target + distance))
26258
+ return target + distance;
26259
+ }
26260
+ return null;
26100
26261
  }
26101
26262
  function medianCutPalette(pixels, count) {
26102
26263
  if (count <= 1)
26103
26264
  return [averageColor(pixels)];
26104
- const boxes = [makeVBox(pixels)];
26105
- while (boxes.length < count) {
26106
- boxes.sort((a, b) => vboxVolume(b) * b.pixels.length - vboxVolume(a) * a.pixels.length);
26107
- const target = boxes.shift();
26108
- if (!target)
26109
- break;
26265
+ const splittable = [makeVBox(pixels)];
26266
+ const single = [];
26267
+ while (splittable.length + single.length < count && splittable.length > 0) {
26268
+ splittable.sort((a, b) => vboxVolume(b) * b.pixels.length - vboxVolume(a) * a.pixels.length);
26269
+ const [target] = splittable.splice(0, 1);
26110
26270
  const split = splitVBox(target);
26111
- if (!split) {
26112
- boxes.push(target);
26113
- break;
26271
+ if (split) {
26272
+ splittable.push(...split);
26273
+ }
26274
+ else {
26275
+ // A single flat colour must not stop the boxes that can still split.
26276
+ single.push(target);
26114
26277
  }
26115
- boxes.push(split[0], split[1]);
26116
26278
  }
26117
- return boxes.map(b => averageColor(b.pixels));
26279
+ return [...splittable, ...single].sort(byDominance).map(b => averageColor(b.pixels));
26280
+ }
26281
+ /**
26282
+ * Most pixels first, so the palette's first colour is the dominant one; equal
26283
+ * populations fall back to the box's channel minimums so the order never
26284
+ * depends on the order the splits happened in.
26285
+ */
26286
+ function byDominance(a, b) {
26287
+ return b.pixels.length - a.pixels.length || a.rMin - b.rMin || a.gMin - b.gMin || a.bMin - b.bMin;
26118
26288
  }
26119
26289
  function averageColor(pixels) {
26120
26290
  let r = 0, g = 0, b = 0;
@@ -27863,7 +28033,7 @@ class TabsListComponent {
27863
28033
  this.skeleton = input(false, ...(ngDevMode ? [{ debugName: "skeleton" }] : /* istanbul ignore next */ []));
27864
28034
  /** How many placeholder bars {@link skeleton} renders — set it to the tab count you expect so the bar doesn't resize on load. Ignored unless `skeleton` is `true`. */
27865
28035
  this.skeletonCount = input(3, ...(ngDevMode ? [{ debugName: "skeletonCount" }] : /* istanbul ignore next */ []));
27866
- this.skeletonItems = computed(() => Array.from({ length: this.skeletonCount() }, (_, i) => i), ...(ngDevMode ? [{ debugName: "skeletonItems" }] : /* istanbul ignore next */ []));
28036
+ this.skeletonItems = computed(() => Array.from({ length: this.skeletonCount() }, (...[, i]) => i), ...(ngDevMode ? [{ debugName: "skeletonItems" }] : /* istanbul ignore next */ []));
27867
28037
  this.skeletonClasses = computed(() => cn(this.classes(), 'gap-1'), ...(ngDevMode ? [{ debugName: "skeletonClasses" }] : /* istanbul ignore next */ []));
27868
28038
  this.classes = computed(() => cn('inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
27869
28039
  }
@@ -28278,7 +28448,7 @@ class TooltipContentComponent {
28278
28448
  left: 'right-full top-1/2 -translate-y-1/2 mr-2',
28279
28449
  right: 'left-full top-1/2 -translate-y-1/2 ml-2',
28280
28450
  };
28281
- return cn('absolute z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground', sideClasses[side], this.class());
28451
+ return cn('absolute z-50 w-max max-w-[calc(100vw-2rem)] break-words overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground', sideClasses[side], this.class());
28282
28452
  }, ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
28283
28453
  }
28284
28454
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: TooltipContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
@@ -28293,6 +28463,9 @@ const TOUCH_AUTO_DISMISS_MS = 2500;
28293
28463
  const TOOLTIP = new InjectionToken('TOOLTIP');
28294
28464
  class TooltipComponent {
28295
28465
  constructor() {
28466
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
28467
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
28468
+ this.classes = computed(() => cn('relative inline-block', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
28296
28469
  this.open = signal(false, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
28297
28470
  /**
28298
28471
  * Simple mode: the tooltip text. When set, a `ui-tooltip-content` is
@@ -28328,7 +28501,7 @@ class TooltipComponent {
28328
28501
  this.open.set(false);
28329
28502
  }
28330
28503
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
28331
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: TooltipComponent, isStandalone: true, selector: "ui-tooltip", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, delayDuration: { classPropertyName: "delayDuration", publicName: "delayDuration", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "relative inline-block" }, providers: [{ provide: TOOLTIP, useExisting: forwardRef(() => TooltipComponent) }], ngImport: i0, template: `
28504
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: TooltipComponent, isStandalone: true, selector: "ui-tooltip", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, delayDuration: { classPropertyName: "delayDuration", publicName: "delayDuration", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"tooltip\"" } }, providers: [{ provide: TOOLTIP, useExisting: forwardRef(() => TooltipComponent) }], ngImport: i0, template: `
28332
28505
  <ng-content />
28333
28506
  @if (content()) {
28334
28507
  <ui-tooltip-content>{{ content() }}</ui-tooltip-content>
@@ -28348,12 +28521,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
28348
28521
  <ui-tooltip-content>{{ content() }}</ui-tooltip-content>
28349
28522
  }
28350
28523
  `,
28351
- host: { class: 'relative inline-block' },
28524
+ host: { '[class]': 'classes()', '[attr.data-slot]': '"tooltip"' },
28352
28525
  }]
28353
- }], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], delayDuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "delayDuration", required: false }] }] } });
28526
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], delayDuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "delayDuration", required: false }] }] } });
28354
28527
 
28355
28528
  class TooltipTriggerComponent {
28356
28529
  constructor() {
28530
+ /** Extra classes for the element that wraps the projected trigger. */
28531
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
28357
28532
  this.tooltip = inject(TooltipComponent, { optional: true });
28358
28533
  this.zone = inject(NgZone);
28359
28534
  this.host = inject(ElementRef).nativeElement;
@@ -28448,8 +28623,9 @@ class TooltipTriggerComponent {
28448
28623
  }
28449
28624
  }
28450
28625
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: TooltipTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
28451
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: TooltipTriggerComponent, isStandalone: true, selector: "ui-tooltip-trigger", host: { classAttribute: "contents" }, ngImport: i0, template: `
28626
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: TooltipTriggerComponent, isStandalone: true, selector: "ui-tooltip-trigger", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: `
28452
28627
  <span
28628
+ [class]="class()"
28453
28629
  (mouseenter)="onMouseEnter()"
28454
28630
  (mouseleave)="onMouseLeave()"
28455
28631
  (touchstart)="onTouchStart()"
@@ -28468,6 +28644,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
28468
28644
  changeDetection: ChangeDetectionStrategy.OnPush,
28469
28645
  template: `
28470
28646
  <span
28647
+ [class]="class()"
28471
28648
  (mouseenter)="onMouseEnter()"
28472
28649
  (mouseleave)="onMouseLeave()"
28473
28650
  (touchstart)="onTouchStart()"
@@ -28480,7 +28657,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
28480
28657
  `,
28481
28658
  host: { class: 'contents' },
28482
28659
  }]
28483
- }] });
28660
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
28484
28661
 
28485
28662
  class TooltipDirective {
28486
28663
  constructor() {
@@ -28599,7 +28776,7 @@ class TooltipDirective {
28599
28776
  const tooltipEl = this.renderer.createElement('div');
28600
28777
  const text = this.renderer.createText(this.uiTooltip());
28601
28778
  this.renderer.appendChild(tooltipEl, text);
28602
- this.renderer.setAttribute(tooltipEl, 'class', 'fixed z-50 whitespace-nowrap rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground pointer-events-none');
28779
+ this.renderer.setAttribute(tooltipEl, 'class', 'fixed z-50 w-max max-w-[calc(100vw-2rem)] break-words rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground pointer-events-none');
28603
28780
  this.renderer.appendChild(document.body, tooltipEl);
28604
28781
  inheritThemeTokens(this.el.nativeElement, tooltipEl);
28605
28782
  return tooltipEl;
@@ -29076,6 +29253,14 @@ class ColorPickerComponent {
29076
29253
  this.commitHsv();
29077
29254
  this.onTouched();
29078
29255
  }
29256
+ ngOnDestroy() {
29257
+ // A drag still going when the picker is destroyed would keep listening on the window (and
29258
+ // calling into a destroyed picker) until the next pointer-up; the copy badge timer likewise.
29259
+ this.dragCleanup?.();
29260
+ this.dragCleanup = null;
29261
+ if (this.copyTimer)
29262
+ clearTimeout(this.copyTimer);
29263
+ }
29079
29264
  startAreaDrag(clientX, clientY) {
29080
29265
  this.isDragging = true;
29081
29266
  this.updateFromAreaPosition(clientX, clientY);
@@ -29332,7 +29517,7 @@ class ColorPickerComponent {
29332
29517
  useExisting: forwardRef(() => ColorPickerComponent),
29333
29518
  multi: true,
29334
29519
  },
29335
- ], viewQueries: [{ propertyName: "colorArea", first: true, predicate: ["colorArea"], descendants: true, isSignal: true }, { propertyName: "imageFile", first: true, predicate: ["imageFile"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #colorPanel>\n <div class=\"flex flex-col gap-3\">\n\n @if (enableEyedropper() || enableImagePick()) {\n <div class=\"flex items-center justify-end gap-1\">\n @if (enableEyedropper()) {\n <ui-eyedropper\n variant=\"icon\"\n [fallbackTarget]=\"fallbackTarget()\"\n (colorPick)=\"onEyedropperPick($event)\"\n uiTooltip=\"Pick color from screen\"\n />\n }\n @if (enableImagePick()) {\n <button\n type=\"button\"\n class=\"inline-flex h-9 w-9 items-center justify-center rounded-md border border-input bg-background text-sm font-medium ring-offset-background transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n (click)=\"openImagePicker()\"\n [attr.aria-label]=\"t().pickColorFromImage\"\n data-slot=\"image-pick-trigger\"\n uiTooltip=\"Pick color from image\"\n >\n <ui-icon name=\"pipette-image\" class=\"h-4 w-4\" />\n </button>\n <input\n #imageFile\n type=\"file\"\n accept=\"image/*\"\n hidden\n (change)=\"onImageSelected($event)\"\n />\n }\n </div>\n }\n\n <div\n #colorArea\n class=\"relative h-32 w-full cursor-crosshair rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n style=\"touch-action: none\"\n [style.background]=\"areaBackground()\"\n tabindex=\"0\"\n role=\"slider\"\n [attr.aria-label]=\"t().saturationValue\"\n [attr.aria-valuenow]=\"saturation()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-valuetext]=\"'S ' + saturation() + '%, V ' + hsvValue() + '%'\"\n (mousedown)=\"onAreaMouseDown($event)\"\n (touchstart)=\"onAreaTouchStart($event)\"\n (keydown)=\"onAreaKeyDown($event)\"\n >\n <div\n class=\"absolute h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-sm pointer-events-none\"\n [style.left.%]=\"saturation()\"\n [style.top.%]=\"100 - hsvValue()\"\n [style.backgroundColor]=\"currentColor()\"\n ></div>\n </div>\n\n <div class=\"space-y-1\">\n <label for=\"ui-color-picker-hue\" class=\"text-xs text-muted-foreground\">Hue</label>\n <input\n id=\"ui-color-picker-hue\"\n type=\"range\"\n min=\"0\"\n max=\"360\"\n [value]=\"hue()\"\n (input)=\"onHueChange($event)\"\n [attr.aria-label]=\"t().hue\"\n class=\"w-full h-3 rounded-md cursor-pointer appearance-none\"\n [style.background]=\"hueGradient\"\n />\n </div>\n\n @if (alpha()) {\n <div class=\"space-y-1\">\n <label for=\"ui-color-picker-alpha\" class=\"text-xs text-muted-foreground\">Alpha</label>\n <div class=\"relative h-3 w-full rounded-md ui-color-picker-checker\">\n <input\n id=\"ui-color-picker-alpha\"\n type=\"range\"\n min=\"0\"\n max=\"100\"\n step=\"1\"\n [value]=\"alphaValue() * 100\"\n (input)=\"onAlphaChange($event)\"\n [attr.aria-label]=\"t().alpha\"\n class=\"absolute inset-0 w-full h-3 rounded-md cursor-pointer appearance-none\"\n [style.background]=\"alphaGradient()\"\n />\n </div>\n </div>\n }\n\n @if (showRecent() && recents().length > 0) {\n <fieldset class=\"space-y-1 border-0 p-0 m-0\">\n <legend class=\"text-xs text-muted-foreground p-0\">{{ t().recent }}</legend>\n <ul class=\"flex flex-wrap gap-1 list-none p-0 m-0\" [attr.aria-label]=\"t().recentColors\">\n @for (color of recents(); track color) {\n <li>\n <button\n type=\"button\"\n class=\"aspect-square w-6 rounded border cursor-pointer hover:scale-110 transition-transform ui-color-picker-checker\"\n [style.backgroundColor]=\"color\"\n (click)=\"selectPreset(color)\"\n [attr.aria-label]=\"'Apply recent ' + color\"\n ></button>\n </li>\n }\n </ul>\n </fieldset>\n }\n\n @if (extractedPalette().length > 0) {\n <fieldset class=\"space-y-1 border-0 p-0 m-0\">\n <div class=\"flex items-center justify-between\">\n <legend class=\"text-xs text-muted-foreground p-0\">From image</legend>\n <button\n type=\"button\"\n class=\"text-xs text-muted-foreground hover:text-foreground\"\n (click)=\"clearExtractedPalette()\"\n >Clear</button>\n </div>\n <ul class=\"flex flex-wrap gap-1 list-none p-0 m-0\" [attr.aria-label]=\"t().extractedPalette\">\n @for (color of extractedPalette(); track color) {\n <li>\n <button\n type=\"button\"\n class=\"aspect-square w-6 rounded border cursor-pointer hover:scale-110 transition-transform\"\n [style.backgroundColor]=\"color\"\n (click)=\"applyExtracted(color)\"\n [attr.aria-label]=\"'Apply extracted ' + color\"\n ></button>\n </li>\n }\n </ul>\n </fieldset>\n }\n\n @if (presets().length > 0) {\n <fieldset class=\"space-y-1 border-0 p-0 m-0\">\n <legend class=\"text-xs text-muted-foreground p-0\">Presets</legend>\n <div class=\"flex flex-wrap gap-1\">\n @for (color of presets(); track color) {\n <button\n type=\"button\"\n data-color-btn\n class=\"aspect-square w-6 rounded border cursor-pointer hover:scale-110 transition-transform\"\n [style.backgroundColor]=\"color\"\n [class.ring-2]=\"currentColor() === color\"\n [class.ring-primary]=\"currentColor() === color\"\n (click)=\"selectPreset(color)\"\n [attr.aria-label]=\"'Select ' + color\"\n ></button>\n }\n </div>\n </fieldset>\n }\n\n @if (showHarmonies()) {\n <fieldset class=\"space-y-1 border-0 p-0 m-0\">\n <legend class=\"text-xs text-muted-foreground p-0\">Harmonies</legend>\n <div class=\"space-y-1\">\n @for (group of harmonyGroups(); track group.label) {\n <div class=\"flex items-center gap-2\">\n <span\n class=\"w-20 text-[10px] text-muted-foreground cursor-help underline decoration-dotted underline-offset-2\"\n [uiTooltip]=\"group.hint\"\n >{{ group.label }}</span>\n <div class=\"flex items-center gap-1\">\n @for (color of group.swatches; track color) {\n <button\n type=\"button\"\n class=\"relative aspect-square w-5 rounded border cursor-pointer hover:scale-110 transition-transform\"\n [style.backgroundColor]=\"color\"\n (click)=\"copyHarmony(color)\"\n [uiTooltip]=\"copiedHarmony() === color ? 'Copied ' + color : 'Click to copy ' + color\"\n [attr.aria-label]=\"'Copy ' + color\"\n >\n @if (copiedHarmony() === color) {\n <span class=\"absolute inset-0 flex items-center justify-center rounded bg-foreground/80 text-background\">\n <ui-icon name=\"check\" class=\"h-3 w-3\" />\n </span>\n }\n </button>\n }\n @if (copiedHarmony(); as copied) {\n @if (groupContains(group, copied)) {\n <span class=\"ml-1 inline-flex items-center gap-1 rounded bg-green-500/15 px-1.5 py-0.5 text-[10px] font-medium text-green-700 dark:text-green-300\">\n <ui-icon name=\"check\" class=\"h-3 w-3\" />\n {{ copied }}\n </span>\n }\n }\n </div>\n </div>\n }\n </div>\n </fieldset>\n }\n\n @if (showContrast() && contrastBadge(); as badge) {\n <div class=\"mt-3 flex items-center justify-between gap-2 rounded-md border border-input px-2 py-1.5\">\n <div class=\"flex items-center gap-2 min-w-0\">\n <button\n type=\"button\"\n class=\"flex flex-col items-center gap-0.5 rounded p-1 transition focus:outline-none\"\n [class.ring-2]=\"compareActive() === 'a'\"\n [class.ring-ring]=\"compareActive() === 'a'\"\n (click)=\"setCompareSlot('a')\"\n uiTooltip=\"Edit color A with the picker above\"\n [attr.aria-label]=\"t().editColorA\"\n >\n <span\n class=\"block h-6 w-6 rounded border\"\n [style.backgroundColor]=\"compareAHex()\"\n ></span>\n <span class=\"font-mono text-[9px] text-muted-foreground\">{{ compareAHex() }}</span>\n </button>\n <span class=\"text-xs text-muted-foreground shrink-0\">vs</span>\n <button\n type=\"button\"\n class=\"flex flex-col items-center gap-0.5 rounded p-1 transition focus:outline-none\"\n [class.ring-2]=\"compareActive() === 'b'\"\n [class.ring-ring]=\"compareActive() === 'b'\"\n (click)=\"setCompareSlot('b')\"\n uiTooltip=\"Edit color B with the picker above\"\n [attr.aria-label]=\"t().editColorB\"\n >\n <span\n class=\"block h-6 w-6 rounded border\"\n [style.backgroundColor]=\"compareBHex()\"\n ></span>\n <span class=\"font-mono text-[9px] text-muted-foreground\">{{ compareBHex() }}</span>\n </button>\n </div>\n <div class=\"flex items-center gap-2 shrink-0\">\n <span class=\"font-mono text-xs\">{{ contrastRatioDisplay() }}:1</span>\n <span\n class=\"rounded px-1.5 py-0.5 text-[10px] font-semibold\"\n [class.bg-green-500]=\"badge.pass\"\n [class.text-white]=\"badge.pass\"\n [class.bg-destructive]=\"!badge.pass\"\n [class.text-destructive-foreground]=\"!badge.pass\"\n >{{ badge.label }}</span>\n </div>\n </div>\n }\n\n <ui-tabs [defaultValue]=\"formats()[0]\">\n <ui-tabs-list class=\"flex justify-start w-full h-8 gap-1\">\n @for (fmt of formats(); track fmt) {\n <ui-tabs-trigger [value]=\"fmt\" class=\"text-xs uppercase\">{{ fmt }}</ui-tabs-trigger>\n }\n </ui-tabs-list>\n\n @if (formats().includes('hex')) {\n <ui-tabs-content value=\"hex\" class=\"mt-2\">\n <div class=\"flex items-center gap-1\">\n <ui-input\n type=\"text\"\n [ngModel]=\"formatValues().hex\"\n (ngModelChange)=\"onHexInput($event)\"\n placeholder=\"#000000\"\n class=\"h-8 text-xs font-mono flex-1\"\n />\n <button\n type=\"button\"\n class=\"inline-flex h-8 w-8 pointer-coarse:size-11 items-center justify-center rounded-md text-muted-foreground hover:text-foreground\"\n (click)=\"copy('hex')\"\n [attr.aria-label]=\"t().copyHex\"\n >\n <ui-icon [name]=\"copiedFormat() === 'hex' ? 'check' : 'copy'\" class=\"h-4 w-4\" />\n </button>\n </div>\n </ui-tabs-content>\n }\n\n @if (formats().includes('rgb')) {\n <ui-tabs-content value=\"rgb\" class=\"mt-2\">\n <div class=\"space-y-2\">\n <div class=\"grid grid-cols-3 gap-2\">\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">R</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"255\"\n [ngModel]=\"rgb().r\"\n (ngModelChange)=\"onRgbChange('r', $event)\"\n [attr.aria-label]=\"t().red\"\n class=\"h-8 text-xs\"\n />\n </div>\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">G</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"255\"\n [ngModel]=\"rgb().g\"\n (ngModelChange)=\"onRgbChange('g', $event)\"\n [attr.aria-label]=\"t().green\"\n class=\"h-8 text-xs\"\n />\n </div>\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">B</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"255\"\n [ngModel]=\"rgb().b\"\n (ngModelChange)=\"onRgbChange('b', $event)\"\n [attr.aria-label]=\"t().blue\"\n class=\"h-8 text-xs\"\n />\n </div>\n </div>\n <div class=\"flex items-center gap-1\">\n <span class=\"flex-1 truncate text-xs font-mono text-muted-foreground\">{{ formatValues().rgb }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 pointer-coarse:size-11 items-center justify-center rounded-md text-muted-foreground hover:text-foreground\"\n (click)=\"copy('rgb')\"\n [attr.aria-label]=\"t().copyRgb\"\n >\n <ui-icon [name]=\"copiedFormat() === 'rgb' ? 'check' : 'copy'\" class=\"h-4 w-4\" />\n </button>\n </div>\n </div>\n </ui-tabs-content>\n }\n\n @if (formats().includes('hsl')) {\n <ui-tabs-content value=\"hsl\" class=\"mt-2\">\n <div class=\"space-y-2\">\n <div class=\"grid grid-cols-3 gap-2\">\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">H</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"360\"\n [ngModel]=\"hsl().h\"\n (ngModelChange)=\"onHslHueChange($event)\"\n [attr.aria-label]=\"t().hue\"\n class=\"h-8 text-xs\"\n />\n </div>\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">S</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"100\"\n [ngModel]=\"hsl().s\"\n (ngModelChange)=\"onHslChange('s', $event)\"\n [attr.aria-label]=\"t().saturation\"\n class=\"h-8 text-xs\"\n />\n </div>\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">L</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"100\"\n [ngModel]=\"hsl().l\"\n (ngModelChange)=\"onHslChange('l', $event)\"\n [attr.aria-label]=\"t().lightness\"\n class=\"h-8 text-xs\"\n />\n </div>\n </div>\n <div class=\"flex items-center gap-1\">\n <span class=\"flex-1 truncate text-xs font-mono text-muted-foreground\">{{ formatValues().hsl }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 pointer-coarse:size-11 items-center justify-center rounded-md text-muted-foreground hover:text-foreground\"\n (click)=\"copy('hsl')\"\n [attr.aria-label]=\"t().copyHsl\"\n >\n <ui-icon [name]=\"copiedFormat() === 'hsl' ? 'check' : 'copy'\" class=\"h-4 w-4\" />\n </button>\n </div>\n </div>\n </ui-tabs-content>\n }\n\n @if (formats().includes('oklch')) {\n <ui-tabs-content value=\"oklch\" class=\"mt-2\">\n <div class=\"flex items-center gap-1\">\n <span class=\"flex-1 truncate text-xs font-mono text-muted-foreground\">{{ formatValues().oklch }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 pointer-coarse:size-11 items-center justify-center rounded-md text-muted-foreground hover:text-foreground\"\n (click)=\"copy('oklch')\"\n [attr.aria-label]=\"t().copyOklch\"\n >\n <ui-icon [name]=\"copiedFormat() === 'oklch' ? 'check' : 'copy'\" class=\"h-4 w-4\" />\n </button>\n </div>\n </ui-tabs-content>\n }\n </ui-tabs>\n </div>\n</ng-template>\n\n@if (inline()) {\n <ng-container [ngTemplateOutlet]=\"colorPanel\" />\n} @else {\n <ui-popover [open]=\"open()\" (openChange)=\"open.set($event)\" [attr.dir]=\"dir()\">\n <ui-popover-trigger>\n <ng-content select=\"[colorPickerTrigger]\" />\n @if (!hasTrigger()) {\n <button\n type=\"button\"\n [class]=\"triggerClasses()\"\n [disabled]=\"isDisabled()\"\n [attr.data-slot]=\"'color-picker-trigger'\"\n >\n <span\n class=\"h-6 w-6 rounded border ui-color-picker-checker\"\n [style.backgroundColor]=\"currentColor()\"\n ></span>\n <span class=\"flex-1 text-start text-sm truncate font-mono\">{{ currentColor() || 'Select color' }}</span>\n <ui-icon name=\"chevron-down\" class=\"h-4 w-4 opacity-50\" />\n </button>\n }\n </ui-popover-trigger>\n <ui-popover-content class=\"w-72 p-3\" align=\"start\" [restoreFocus]=\"false\">\n <ng-container [ngTemplateOutlet]=\"colorPanel\" />\n </ui-popover-content>\n </ui-popover>\n}\n", styles: [":host{--_d: var(--density-picker, var(--density, 1))}@layer components{[data-slot=color-picker-trigger]{height:calc(2.5rem * var(--_d));padding-inline:calc(.75rem * var(--_d));padding-block:calc(.5rem * var(--_d));gap:calc(.5rem * var(--_d))}.ui-color-picker-checker{background-image:linear-gradient(45deg,hsl(0 0% 80%) 25%,transparent 25%),linear-gradient(-45deg,hsl(0 0% 80%) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,hsl(0 0% 80%) 75%),linear-gradient(-45deg,transparent 75%,hsl(0 0% 80%) 75%);background-size:8px 8px;background-position:0 0,0 4px,4px -4px,-4px 0}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: PopoverComponent, selector: "ui-popover", inputs: ["open", "closeOnScroll"], outputs: ["openChange"] }, { kind: "component", type: PopoverTriggerComponent, selector: "ui-popover-trigger" }, { kind: "component", type: PopoverContentComponent, selector: "ui-popover-content", inputs: ["class", "align", "side", "sideOffset", "avoidCollisions", "restoreFocus", "strategy"] }, { kind: "component", type: InputComponent, selector: "ui-input", inputs: ["type", "placeholder", "disabled", "class", "elementId", "name", "ariaLabel", "ariaLabelledby", "ariaDescribedby", "variant", "loading", "skeleton", "autofocus", "clearable", "floating", "label", "labelClass", "inputMode", "lang", "prefix", "suffix", "value"], outputs: ["valueChange"] }, { kind: "component", type: TabsComponent, selector: "ui-tabs", inputs: ["defaultValue", "class", "tabs"], outputs: ["tabChange"] }, { kind: "component", type: TabsListComponent, selector: "ui-tabs-list", inputs: ["class", "ariaLabel", "skeleton", "skeletonCount"] }, { kind: "component", type: TabsTriggerComponent, selector: "ui-tabs-trigger", inputs: ["value", "class"] }, { kind: "component", type: TabsContentComponent, selector: "ui-tabs-content", inputs: ["value", "class"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["name", "class", "size", "weight", "strokeWidth", "color", "fillColor"] }, { kind: "component", type: EyedropperComponent, selector: "ui-eyedropper", inputs: ["class", "disabled", "label", "variant", "locale", "fallbackTarget"], outputs: ["colorPick", "pickStart", "pickCancel"] }, { kind: "directive", type: TooltipDirective, selector: "[uiTooltip]", inputs: ["uiTooltip", "tooltipSide", "tooltipDisabled"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
29520
+ ], viewQueries: [{ propertyName: "colorArea", first: true, predicate: ["colorArea"], descendants: true, isSignal: true }, { propertyName: "imageFile", first: true, predicate: ["imageFile"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #colorPanel>\n <div class=\"flex flex-col gap-3\">\n\n @if (enableEyedropper() || enableImagePick()) {\n <div class=\"flex items-center justify-end gap-1\">\n @if (enableEyedropper()) {\n <ui-eyedropper\n variant=\"icon\"\n [fallbackTarget]=\"fallbackTarget()\"\n (colorPick)=\"onEyedropperPick($event)\"\n uiTooltip=\"Pick color from screen\"\n />\n }\n @if (enableImagePick()) {\n <button\n type=\"button\"\n class=\"inline-flex h-9 w-9 items-center justify-center rounded-md border border-input bg-background text-sm font-medium ring-offset-background transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n (click)=\"openImagePicker()\"\n [attr.aria-label]=\"t().pickColorFromImage\"\n data-slot=\"image-pick-trigger\"\n uiTooltip=\"Pick color from image\"\n >\n <ui-icon name=\"pipette-image\" class=\"h-4 w-4\" />\n </button>\n <input\n #imageFile\n type=\"file\"\n accept=\"image/*\"\n hidden\n (change)=\"onImageSelected($event)\"\n />\n }\n </div>\n }\n\n <div\n #colorArea\n class=\"relative h-32 w-full cursor-crosshair rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n style=\"touch-action: none\"\n [style.background]=\"areaBackground()\"\n tabindex=\"0\"\n role=\"slider\"\n [attr.aria-label]=\"t().saturationValue\"\n [attr.aria-valuenow]=\"saturation()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-valuetext]=\"'S ' + saturation() + '%, V ' + hsvValue() + '%'\"\n (mousedown)=\"onAreaMouseDown($event)\"\n (touchstart)=\"onAreaTouchStart($event)\"\n (keydown)=\"onAreaKeyDown($event)\"\n >\n <div\n class=\"absolute h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-sm pointer-events-none\"\n [style.left.%]=\"saturation()\"\n [style.top.%]=\"100 - hsvValue()\"\n [style.backgroundColor]=\"currentColor()\"\n ></div>\n </div>\n\n <div class=\"space-y-1\">\n <label for=\"ui-color-picker-hue\" class=\"text-xs text-muted-foreground\">Hue</label>\n <input\n id=\"ui-color-picker-hue\"\n type=\"range\"\n min=\"0\"\n max=\"360\"\n [value]=\"hue()\"\n (input)=\"onHueChange($event)\"\n [attr.aria-label]=\"t().hue\"\n class=\"w-full h-3 rounded-md cursor-pointer appearance-none\"\n [style.background]=\"hueGradient\"\n />\n </div>\n\n @if (alpha()) {\n <div class=\"space-y-1\">\n <label for=\"ui-color-picker-alpha\" class=\"text-xs text-muted-foreground\">Alpha</label>\n <div class=\"relative h-3 w-full rounded-md ui-color-picker-checker\">\n <input\n id=\"ui-color-picker-alpha\"\n type=\"range\"\n min=\"0\"\n max=\"100\"\n step=\"1\"\n [value]=\"alphaValue() * 100\"\n (input)=\"onAlphaChange($event)\"\n [attr.aria-label]=\"t().alpha\"\n class=\"absolute inset-0 w-full h-3 rounded-md cursor-pointer appearance-none\"\n [style.background]=\"alphaGradient()\"\n />\n </div>\n </div>\n }\n\n @if (showRecent() && recents().length > 0) {\n <fieldset class=\"space-y-1 border-0 p-0 m-0\">\n <legend class=\"text-xs text-muted-foreground p-0\">{{ t().recent }}</legend>\n <ul class=\"flex flex-wrap gap-1 list-none p-0 m-0\" [attr.aria-label]=\"t().recentColors\">\n @for (color of recents(); track color) {\n <li>\n <button\n type=\"button\"\n class=\"aspect-square w-6 rounded border cursor-pointer hover:scale-110 transition-transform ui-color-picker-checker\"\n [style.backgroundColor]=\"color\"\n (click)=\"selectPreset(color)\"\n [attr.aria-label]=\"'Apply recent ' + color\"\n ></button>\n </li>\n }\n </ul>\n </fieldset>\n }\n\n @if (extractedPalette().length > 0) {\n <fieldset class=\"space-y-1 border-0 p-0 m-0\">\n <div class=\"flex items-center justify-between\">\n <legend class=\"text-xs text-muted-foreground p-0\">From image</legend>\n <button\n type=\"button\"\n class=\"text-xs text-muted-foreground hover:text-foreground\"\n (click)=\"clearExtractedPalette()\"\n >Clear</button>\n </div>\n <ul class=\"flex flex-wrap gap-1 list-none p-0 m-0\" [attr.aria-label]=\"t().extractedPalette\">\n @for (color of extractedPalette(); track color) {\n <li>\n <button\n type=\"button\"\n class=\"aspect-square w-6 rounded border cursor-pointer hover:scale-110 transition-transform\"\n [style.backgroundColor]=\"color\"\n (click)=\"applyExtracted(color)\"\n [attr.aria-label]=\"'Apply extracted ' + color\"\n ></button>\n </li>\n }\n </ul>\n </fieldset>\n }\n\n @if (presets().length > 0) {\n <fieldset class=\"space-y-1 border-0 p-0 m-0\">\n <legend class=\"text-xs text-muted-foreground p-0\">Presets</legend>\n <div class=\"flex flex-wrap gap-1\">\n @for (color of presets(); track color) {\n <button\n type=\"button\"\n data-color-btn\n class=\"aspect-square w-6 rounded border cursor-pointer hover:scale-110 transition-transform\"\n [style.backgroundColor]=\"color\"\n [class.ring-2]=\"currentColor() === color\"\n [class.ring-primary]=\"currentColor() === color\"\n (click)=\"selectPreset(color)\"\n [attr.aria-label]=\"'Select ' + color\"\n ></button>\n }\n </div>\n </fieldset>\n }\n\n @if (showHarmonies()) {\n <fieldset class=\"space-y-1 border-0 p-0 m-0\">\n <legend class=\"text-xs text-muted-foreground p-0\">Harmonies</legend>\n <div class=\"space-y-1\">\n @for (group of harmonyGroups(); track group.label) {\n <div class=\"flex items-center gap-2\">\n <span\n class=\"w-20 text-[10px] text-muted-foreground cursor-help underline decoration-dotted underline-offset-2\"\n [uiTooltip]=\"group.hint\"\n >{{ group.label }}</span>\n <div class=\"flex items-center gap-1\">\n @for (color of group.swatches; track color) {\n <button\n type=\"button\"\n class=\"relative aspect-square w-5 rounded border cursor-pointer hover:scale-110 transition-transform\"\n [style.backgroundColor]=\"color\"\n (click)=\"copyHarmony(color)\"\n [uiTooltip]=\"copiedHarmony() === color ? 'Copied ' + color : 'Click to copy ' + color\"\n [attr.aria-label]=\"'Copy ' + color\"\n >\n @if (copiedHarmony() === color) {\n <span class=\"absolute inset-0 flex items-center justify-center rounded bg-foreground/80 text-background\">\n <ui-icon name=\"check\" class=\"h-3 w-3\" />\n </span>\n }\n </button>\n }\n @if (copiedHarmony(); as copied) {\n @if (groupContains(group, copied)) {\n <span class=\"ml-1 inline-flex items-center gap-1 rounded bg-green-500/15 px-1.5 py-0.5 text-[10px] font-medium text-green-700 dark:text-green-300\">\n <ui-icon name=\"check\" class=\"h-3 w-3\" />\n {{ copied }}\n </span>\n }\n }\n </div>\n </div>\n }\n </div>\n </fieldset>\n }\n\n @if (showContrast() && contrastBadge(); as badge) {\n <div class=\"mt-3 flex items-center justify-between gap-2 rounded-md border border-input px-2 py-1.5\">\n <div class=\"flex items-center gap-2 min-w-0\">\n <button\n type=\"button\"\n class=\"flex flex-col items-center gap-0.5 rounded p-1 transition focus:outline-none\"\n [class.ring-2]=\"compareActive() === 'a'\"\n [class.ring-ring]=\"compareActive() === 'a'\"\n (click)=\"setCompareSlot('a')\"\n uiTooltip=\"Edit color A with the picker above\"\n [attr.aria-label]=\"t().editColorA\"\n >\n <span\n class=\"block h-6 w-6 rounded border\"\n [style.backgroundColor]=\"compareAHex()\"\n ></span>\n <span class=\"font-mono text-[9px] text-muted-foreground\">{{ compareAHex() }}</span>\n </button>\n <span class=\"text-xs text-muted-foreground shrink-0\">vs</span>\n <button\n type=\"button\"\n class=\"flex flex-col items-center gap-0.5 rounded p-1 transition focus:outline-none\"\n [class.ring-2]=\"compareActive() === 'b'\"\n [class.ring-ring]=\"compareActive() === 'b'\"\n (click)=\"setCompareSlot('b')\"\n uiTooltip=\"Edit color B with the picker above\"\n [attr.aria-label]=\"t().editColorB\"\n >\n <span\n class=\"block h-6 w-6 rounded border\"\n [style.backgroundColor]=\"compareBHex()\"\n ></span>\n <span class=\"font-mono text-[9px] text-muted-foreground\">{{ compareBHex() }}</span>\n </button>\n </div>\n <div class=\"flex items-center gap-2 shrink-0\">\n <span class=\"font-mono text-xs\">{{ contrastRatioDisplay() }}:1</span>\n <span\n class=\"rounded px-1.5 py-0.5 text-[10px] font-semibold\"\n [class.bg-green-500]=\"badge.pass\"\n [class.text-white]=\"badge.pass\"\n [class.bg-destructive]=\"!badge.pass\"\n [class.text-destructive-foreground]=\"!badge.pass\"\n >{{ badge.label }}</span>\n </div>\n </div>\n }\n\n <ui-tabs [defaultValue]=\"formats()[0]\">\n <ui-tabs-list class=\"flex justify-start w-full h-8 gap-1\">\n @for (fmt of formats(); track fmt) {\n <ui-tabs-trigger [value]=\"fmt\" class=\"text-xs uppercase\">{{ fmt }}</ui-tabs-trigger>\n }\n </ui-tabs-list>\n\n @if (formats().includes('hex')) {\n <ui-tabs-content value=\"hex\" class=\"mt-2\">\n <div class=\"flex items-center gap-1\">\n <ui-input\n type=\"text\"\n [ngModel]=\"formatValues().hex\"\n (ngModelChange)=\"onHexInput($event)\"\n placeholder=\"#000000\"\n class=\"h-8 text-xs font-mono flex-1\"\n />\n <button\n type=\"button\"\n class=\"inline-flex h-8 w-8 pointer-coarse:size-11 items-center justify-center rounded-md text-muted-foreground hover:text-foreground\"\n (click)=\"copy('hex')\"\n [attr.aria-label]=\"t().copyHex\"\n >\n <ui-icon [name]=\"copiedFormat() === 'hex' ? 'check' : 'copy'\" class=\"h-4 w-4\" />\n </button>\n </div>\n </ui-tabs-content>\n }\n\n @if (formats().includes('rgb')) {\n <ui-tabs-content value=\"rgb\" class=\"mt-2\">\n <div class=\"space-y-2\">\n <div class=\"grid grid-cols-3 gap-2\">\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">R</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"255\"\n [ngModel]=\"rgb().r\"\n (ngModelChange)=\"onRgbChange('r', $event)\"\n [attr.aria-label]=\"t().red\"\n class=\"h-8 text-xs\"\n />\n </div>\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">G</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"255\"\n [ngModel]=\"rgb().g\"\n (ngModelChange)=\"onRgbChange('g', $event)\"\n [attr.aria-label]=\"t().green\"\n class=\"h-8 text-xs\"\n />\n </div>\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">B</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"255\"\n [ngModel]=\"rgb().b\"\n (ngModelChange)=\"onRgbChange('b', $event)\"\n [attr.aria-label]=\"t().blue\"\n class=\"h-8 text-xs\"\n />\n </div>\n </div>\n <div class=\"flex items-center gap-1\">\n <span class=\"flex-1 truncate text-xs font-mono text-muted-foreground\">{{ formatValues().rgb }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 pointer-coarse:size-11 items-center justify-center rounded-md text-muted-foreground hover:text-foreground\"\n (click)=\"copy('rgb')\"\n [attr.aria-label]=\"t().copyRgb\"\n >\n <ui-icon [name]=\"copiedFormat() === 'rgb' ? 'check' : 'copy'\" class=\"h-4 w-4\" />\n </button>\n </div>\n </div>\n </ui-tabs-content>\n }\n\n @if (formats().includes('hsl')) {\n <ui-tabs-content value=\"hsl\" class=\"mt-2\">\n <div class=\"space-y-2\">\n <div class=\"grid grid-cols-3 gap-2\">\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">H</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"360\"\n [ngModel]=\"hsl().h\"\n (ngModelChange)=\"onHslHueChange($event)\"\n [attr.aria-label]=\"t().hue\"\n class=\"h-8 text-xs\"\n />\n </div>\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">S</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"100\"\n [ngModel]=\"hsl().s\"\n (ngModelChange)=\"onHslChange('s', $event)\"\n [attr.aria-label]=\"t().saturation\"\n class=\"h-8 text-xs\"\n />\n </div>\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">L</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"100\"\n [ngModel]=\"hsl().l\"\n (ngModelChange)=\"onHslChange('l', $event)\"\n [attr.aria-label]=\"t().lightness\"\n class=\"h-8 text-xs\"\n />\n </div>\n </div>\n <div class=\"flex items-center gap-1\">\n <span class=\"flex-1 truncate text-xs font-mono text-muted-foreground\">{{ formatValues().hsl }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 pointer-coarse:size-11 items-center justify-center rounded-md text-muted-foreground hover:text-foreground\"\n (click)=\"copy('hsl')\"\n [attr.aria-label]=\"t().copyHsl\"\n >\n <ui-icon [name]=\"copiedFormat() === 'hsl' ? 'check' : 'copy'\" class=\"h-4 w-4\" />\n </button>\n </div>\n </div>\n </ui-tabs-content>\n }\n\n @if (formats().includes('oklch')) {\n <ui-tabs-content value=\"oklch\" class=\"mt-2\">\n <div class=\"flex items-center gap-1\">\n <span class=\"flex-1 truncate text-xs font-mono text-muted-foreground\">{{ formatValues().oklch }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 pointer-coarse:size-11 items-center justify-center rounded-md text-muted-foreground hover:text-foreground\"\n (click)=\"copy('oklch')\"\n [attr.aria-label]=\"t().copyOklch\"\n >\n <ui-icon [name]=\"copiedFormat() === 'oklch' ? 'check' : 'copy'\" class=\"h-4 w-4\" />\n </button>\n </div>\n </ui-tabs-content>\n }\n </ui-tabs>\n </div>\n</ng-template>\n\n@if (inline()) {\n <ng-container [ngTemplateOutlet]=\"colorPanel\" />\n} @else {\n <ui-popover [open]=\"open()\" (openChange)=\"open.set($event)\" [attr.dir]=\"dir()\">\n <ui-popover-trigger>\n <ng-content select=\"[colorPickerTrigger]\" />\n @if (!hasTrigger()) {\n <button\n type=\"button\"\n [class]=\"triggerClasses()\"\n [disabled]=\"isDisabled()\"\n [attr.data-slot]=\"'color-picker-trigger'\"\n >\n <span\n class=\"h-6 w-6 rounded border ui-color-picker-checker\"\n [style.backgroundColor]=\"currentColor()\"\n ></span>\n <span class=\"flex-1 text-start text-sm truncate font-mono\">{{ currentColor() || 'Select color' }}</span>\n <ui-icon name=\"chevron-down\" class=\"h-4 w-4 opacity-50\" />\n </button>\n }\n </ui-popover-trigger>\n <ui-popover-content class=\"w-72 p-3\" align=\"start\" [restoreFocus]=\"false\">\n <ng-container [ngTemplateOutlet]=\"colorPanel\" />\n </ui-popover-content>\n </ui-popover>\n}\n", styles: [":host{--_d: var(--density-picker, var(--density, 1))}@layer components{[data-slot=color-picker-trigger]{height:calc(2.5rem * var(--_d));padding-inline:calc(.75rem * var(--_d));padding-block:calc(.5rem * var(--_d));gap:calc(.5rem * var(--_d))}.ui-color-picker-checker{background-image:linear-gradient(45deg,hsl(0 0% 80%) 25%,transparent 25%),linear-gradient(-45deg,hsl(0 0% 80%) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,hsl(0 0% 80%) 75%),linear-gradient(-45deg,transparent 75%,hsl(0 0% 80%) 75%);background-size:8px 8px;background-position:0 0,0 4px,4px -4px,-4px 0}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: PopoverComponent, selector: "ui-popover", inputs: ["class", "open", "closeOnScroll"], outputs: ["openChange"] }, { kind: "component", type: PopoverTriggerComponent, selector: "ui-popover-trigger", inputs: ["class"] }, { kind: "component", type: PopoverContentComponent, selector: "ui-popover-content", inputs: ["class", "align", "side", "sideOffset", "avoidCollisions", "restoreFocus", "strategy"] }, { kind: "component", type: InputComponent, selector: "ui-input", inputs: ["type", "placeholder", "disabled", "class", "elementId", "name", "ariaLabel", "ariaLabelledby", "ariaDescribedby", "variant", "loading", "skeleton", "autofocus", "clearable", "floating", "label", "labelClass", "inputMode", "lang", "prefix", "suffix", "value"], outputs: ["valueChange"] }, { kind: "component", type: TabsComponent, selector: "ui-tabs", inputs: ["defaultValue", "class", "tabs"], outputs: ["tabChange"] }, { kind: "component", type: TabsListComponent, selector: "ui-tabs-list", inputs: ["class", "ariaLabel", "skeleton", "skeletonCount"] }, { kind: "component", type: TabsTriggerComponent, selector: "ui-tabs-trigger", inputs: ["value", "class"] }, { kind: "component", type: TabsContentComponent, selector: "ui-tabs-content", inputs: ["value", "class"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["name", "class", "size", "weight", "strokeWidth", "color", "fillColor"] }, { kind: "component", type: EyedropperComponent, selector: "ui-eyedropper", inputs: ["class", "disabled", "label", "variant", "locale", "fallbackTarget"], outputs: ["colorPick", "pickStart", "pickCancel"] }, { kind: "directive", type: TooltipDirective, selector: "[uiTooltip]", inputs: ["uiTooltip", "tooltipSide", "tooltipDisabled"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
29336
29521
  }
29337
29522
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ColorPickerComponent, decorators: [{
29338
29523
  type: Component,
@@ -29409,11 +29594,13 @@ class RichTextColorsButtonComponent {
29409
29594
  */
29410
29595
  this.emptyIndicatorClass = this.context.kind === 'foreground' ? 'bg-foreground' : 'bg-muted-foreground/30';
29411
29596
  this.indicatorClasses = computed(() => cn('h-[3px] w-4 rounded-[1px] ring-1 ring-border', this.context.activeColor() ? '' : this.emptyIndicatorClass), ...(ngDevMode ? [{ debugName: "indicatorClasses" }] : /* istanbul ignore next */ []));
29597
+ /** Extra classes merged onto the toolbar button, after the built-in icon-button styling. */
29598
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
29412
29599
  this.buttonClasses = computed(() => cn('inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors', 'hover:bg-accent hover:text-accent-foreground', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', 'disabled:pointer-events-none disabled:opacity-50',
29413
29600
  // The global (pointer: coarse) floor targets `button:not([data-slot])`,
29414
29601
  // and these addon buttons carry a data-slot for testing — so they must
29415
29602
  // state the 44px touch minimum themselves rather than inherit it.
29416
- 'pointer-coarse:min-h-11 pointer-coarse:min-w-11', this.toolbarView?.compact() ? 'p-1' : 'p-1.5'), ...(ngDevMode ? [{ debugName: "buttonClasses" }] : /* istanbul ignore next */ []));
29603
+ 'pointer-coarse:min-h-11 pointer-coarse:min-w-11', this.toolbarView?.compact() ? 'p-1' : 'p-1.5', this.class()), ...(ngDevMode ? [{ debugName: "buttonClasses" }] : /* istanbul ignore next */ []));
29417
29604
  inject(DestroyRef).onDestroy(() => this.exclusive.release());
29418
29605
  }
29419
29606
  /**
@@ -29447,7 +29634,7 @@ class RichTextColorsButtonComponent {
29447
29634
  this.context.onSelect(color);
29448
29635
  }
29449
29636
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextColorsButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
29450
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextColorsButtonComponent, isStandalone: true, selector: "ui-rte-colors-button", host: { listeners: { "pointerdown": "onUserInteract()", "keydown": "onUserInteract()" }, classAttribute: "contents" }, ngImport: i0, template: "<ui-popover [open]=\"open()\" [closeOnScroll]=\"true\" (openChange)=\"onOpenChange($event)\">\n <ui-popover-trigger>\n <button\n type=\"button\"\n [class]=\"buttonClasses()\"\n [title]=\"context.tooltip()\"\n [attr.aria-label]=\"context.tooltip()\"\n [disabled]=\"interactionDisabled()\"\n >\n <span class=\"flex size-4 flex-col items-center justify-between\">\n <span class=\"flex h-[13px] w-4 items-center justify-center [&>svg]:size-[13px]\" [innerHTML]=\"icon\"></span>\n <span\n data-slot=\"rte-color-indicator\"\n [class]=\"indicatorClasses()\"\n [style.background-color]=\"indicatorColor()\"\n ></span>\n </span>\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-72 max-w-[calc(100vw-2rem)] p-3\" align=\"start\" strategy=\"fixed\">\n <div class=\"space-y-2\">\n <p class=\"text-sm font-medium block m-0\">{{ context.heading() }}</p>\n <!-- Built fresh on each open. The popover reuses its content, so a picker\n kept alive holds the colour from the previous session; seeding it with\n the caret's colour then changes nothing, and re-picking that same\n colour emits nothing at all \u2014 the pick is silently lost. -->\n @if (open()) {\n <ui-color-picker\n [inline]=\"true\"\n [presets]=\"context.presets()\"\n [showRecent]=\"context.showRecent()\"\n [alpha]=\"context.alpha()\"\n [ngModel]=\"context.seededColor()\"\n [disabled]=\"interactionDisabled()\"\n (colorChange)=\"onColorChange($event)\"\n />\n }\n </div>\n </ui-popover-content>\n</ui-popover>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: PopoverComponent, selector: "ui-popover", inputs: ["open", "closeOnScroll"], outputs: ["openChange"] }, { kind: "component", type: PopoverTriggerComponent, selector: "ui-popover-trigger" }, { kind: "component", type: PopoverContentComponent, selector: "ui-popover-content", inputs: ["class", "align", "side", "sideOffset", "avoidCollisions", "restoreFocus", "strategy"] }, { kind: "component", type: ColorPickerComponent, selector: "ui-color-picker", inputs: ["presets", "inline", "disabled", "class", "alpha", "recentColors", "showRecent", "maxRecent", "storageKey", "enableEyedropper", "fallbackTarget", "locale", "enableImagePick", "imageExtractAlgorithm", "imageExtractCount", "showHarmonies", "showContrast", "contrastBackground", "formats", "value"], outputs: ["colorChange", "valueChange", "recentColorsChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
29637
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextColorsButtonComponent, isStandalone: true, selector: "ui-rte-colors-button", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "pointerdown": "onUserInteract()", "keydown": "onUserInteract()" }, classAttribute: "contents" }, ngImport: i0, template: "<ui-popover [open]=\"open()\" [closeOnScroll]=\"true\" (openChange)=\"onOpenChange($event)\">\n <ui-popover-trigger>\n <button\n type=\"button\"\n [class]=\"buttonClasses()\"\n [title]=\"context.tooltip()\"\n [attr.aria-label]=\"context.tooltip()\"\n [disabled]=\"interactionDisabled()\"\n >\n <span class=\"flex size-4 flex-col items-center justify-between\">\n <span class=\"flex h-[13px] w-4 items-center justify-center [&>svg]:size-[13px]\" [innerHTML]=\"icon\"></span>\n <span\n data-slot=\"rte-color-indicator\"\n [class]=\"indicatorClasses()\"\n [style.background-color]=\"indicatorColor()\"\n ></span>\n </span>\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-72 max-w-[calc(100vw-2rem)] p-3\" align=\"start\" strategy=\"fixed\">\n <div class=\"space-y-2\">\n <p class=\"text-sm font-medium block m-0\">{{ context.heading() }}</p>\n <!-- Built fresh on each open. The popover reuses its content, so a picker\n kept alive holds the colour from the previous session; seeding it with\n the caret's colour then changes nothing, and re-picking that same\n colour emits nothing at all \u2014 the pick is silently lost. -->\n @if (open()) {\n <ui-color-picker\n [inline]=\"true\"\n [presets]=\"context.presets()\"\n [showRecent]=\"context.showRecent()\"\n [alpha]=\"context.alpha()\"\n [ngModel]=\"context.seededColor()\"\n [disabled]=\"interactionDisabled()\"\n (colorChange)=\"onColorChange($event)\"\n />\n }\n </div>\n </ui-popover-content>\n</ui-popover>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: PopoverComponent, selector: "ui-popover", inputs: ["class", "open", "closeOnScroll"], outputs: ["openChange"] }, { kind: "component", type: PopoverTriggerComponent, selector: "ui-popover-trigger", inputs: ["class"] }, { kind: "component", type: PopoverContentComponent, selector: "ui-popover-content", inputs: ["class", "align", "side", "sideOffset", "avoidCollisions", "restoreFocus", "strategy"] }, { kind: "component", type: ColorPickerComponent, selector: "ui-color-picker", inputs: ["presets", "inline", "disabled", "class", "alpha", "recentColors", "showRecent", "maxRecent", "storageKey", "enableEyedropper", "fallbackTarget", "locale", "enableImagePick", "imageExtractAlgorithm", "imageExtractCount", "showHarmonies", "showContrast", "contrastBackground", "formats", "value"], outputs: ["colorChange", "valueChange", "recentColorsChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
29451
29638
  }
29452
29639
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextColorsButtonComponent, decorators: [{
29453
29640
  type: Component,
@@ -29462,7 +29649,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
29462
29649
  '(pointerdown)': 'onUserInteract()',
29463
29650
  '(keydown)': 'onUserInteract()',
29464
29651
  }, template: "<ui-popover [open]=\"open()\" [closeOnScroll]=\"true\" (openChange)=\"onOpenChange($event)\">\n <ui-popover-trigger>\n <button\n type=\"button\"\n [class]=\"buttonClasses()\"\n [title]=\"context.tooltip()\"\n [attr.aria-label]=\"context.tooltip()\"\n [disabled]=\"interactionDisabled()\"\n >\n <span class=\"flex size-4 flex-col items-center justify-between\">\n <span class=\"flex h-[13px] w-4 items-center justify-center [&>svg]:size-[13px]\" [innerHTML]=\"icon\"></span>\n <span\n data-slot=\"rte-color-indicator\"\n [class]=\"indicatorClasses()\"\n [style.background-color]=\"indicatorColor()\"\n ></span>\n </span>\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-72 max-w-[calc(100vw-2rem)] p-3\" align=\"start\" strategy=\"fixed\">\n <div class=\"space-y-2\">\n <p class=\"text-sm font-medium block m-0\">{{ context.heading() }}</p>\n <!-- Built fresh on each open. The popover reuses its content, so a picker\n kept alive holds the colour from the previous session; seeding it with\n the caret's colour then changes nothing, and re-picking that same\n colour emits nothing at all \u2014 the pick is silently lost. -->\n @if (open()) {\n <ui-color-picker\n [inline]=\"true\"\n [presets]=\"context.presets()\"\n [showRecent]=\"context.showRecent()\"\n [alpha]=\"context.alpha()\"\n [ngModel]=\"context.seededColor()\"\n [disabled]=\"interactionDisabled()\"\n (colorChange)=\"onColorChange($event)\"\n />\n }\n </div>\n </ui-popover-content>\n</ui-popover>\n" }]
29465
- }], ctorParameters: () => [] });
29652
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
29466
29653
 
29467
29654
  /** Built-in locales for the colors addon. */
29468
29655
  const RICH_TEXT_COLORS_LOCALES = {
@@ -29949,6 +30136,9 @@ const EMOJI_CATEGORIES = [
29949
30136
  ];
29950
30137
  class EmojiPickerComponent {
29951
30138
  constructor() {
30139
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
30140
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
30141
+ this.classes = computed(() => cn('relative inline-block', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
29952
30142
  this.el = inject(ElementRef);
29953
30143
  this.destroyRef = inject(DestroyRef);
29954
30144
  /**
@@ -30046,8 +30236,8 @@ class EmojiPickerComponent {
30046
30236
  }
30047
30237
  }
30048
30238
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: EmojiPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
30049
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: EmojiPickerComponent, isStandalone: true, selector: "ui-emoji-picker", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, closeOnSelect: { classPropertyName: "closeOnSelect", publicName: "closeOnSelect", isSignal: true, isRequired: false, transformFunction: null }, closeOnScroll: { classPropertyName: "closeOnScroll", publicName: "closeOnScroll", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", emojiSelect: "emojiSelect" }, host: { listeners: { "document:click": "onDocumentClick($event)" }, classAttribute: "contents" }, providers: [{ provide: EMOJI_PICKER, useExisting: forwardRef(() => EmojiPickerComponent) }], ngImport: i0, template: `
30050
- <div class="relative inline-block" [attr.data-slot]="'emoji-picker'">
30239
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: EmojiPickerComponent, isStandalone: true, selector: "ui-emoji-picker", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, closeOnSelect: { classPropertyName: "closeOnSelect", publicName: "closeOnSelect", isSignal: true, isRequired: false, transformFunction: null }, closeOnScroll: { classPropertyName: "closeOnScroll", publicName: "closeOnScroll", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", emojiSelect: "emojiSelect" }, host: { listeners: { "document:click": "onDocumentClick($event)" }, classAttribute: "contents" }, providers: [{ provide: EMOJI_PICKER, useExisting: forwardRef(() => EmojiPickerComponent) }], ngImport: i0, template: `
30240
+ <div [class]="classes()" [attr.data-slot]="'emoji-picker'">
30051
30241
  <ng-content />
30052
30242
  </div>
30053
30243
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -30059,7 +30249,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
30059
30249
  changeDetection: ChangeDetectionStrategy.OnPush,
30060
30250
  providers: [{ provide: EMOJI_PICKER, useExisting: forwardRef(() => EmojiPickerComponent) }],
30061
30251
  template: `
30062
- <div class="relative inline-block" [attr.data-slot]="'emoji-picker'">
30252
+ <div [class]="classes()" [attr.data-slot]="'emoji-picker'">
30063
30253
  <ng-content />
30064
30254
  </div>
30065
30255
  `,
@@ -30068,10 +30258,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
30068
30258
  '(document:click)': 'onDocumentClick($event)',
30069
30259
  },
30070
30260
  }]
30071
- }], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], closeOnSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnSelect", required: false }] }], closeOnScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnScroll", required: false }] }], emojiSelect: [{ type: i0.Output, args: ["emojiSelect"] }] } });
30261
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], closeOnSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnSelect", required: false }] }], closeOnScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnScroll", required: false }] }], emojiSelect: [{ type: i0.Output, args: ["emojiSelect"] }] } });
30072
30262
 
30073
30263
  class EmojiPickerTriggerComponent {
30074
30264
  constructor() {
30265
+ /** Extra classes for the element that wraps the projected trigger. */
30266
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
30075
30267
  this.picker = inject(EMOJI_PICKER, { optional: true });
30076
30268
  this.host = inject(ElementRef);
30077
30269
  /** See `lib/a11y.ts` — stays transparent when the projected content is already a control. */
@@ -30101,8 +30293,9 @@ class EmojiPickerTriggerComponent {
30101
30293
  this.onClick(event);
30102
30294
  }
30103
30295
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: EmojiPickerTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
30104
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: EmojiPickerTriggerComponent, isStandalone: true, selector: "ui-emoji-picker-trigger", host: { classAttribute: "contents" }, ngImport: i0, template: `
30296
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: EmojiPickerTriggerComponent, isStandalone: true, selector: "ui-emoji-picker-trigger", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: `
30105
30297
  <span
30298
+ [class]="class()"
30106
30299
  [attr.tabindex]="wrapsInteractive() ? null : 0"
30107
30300
  [attr.role]="wrapsInteractive() ? null : 'button'"
30108
30301
  (click)="onClick($event)"
@@ -30121,6 +30314,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
30121
30314
  changeDetection: ChangeDetectionStrategy.OnPush,
30122
30315
  template: `
30123
30316
  <span
30317
+ [class]="class()"
30124
30318
  [attr.tabindex]="wrapsInteractive() ? null : 0"
30125
30319
  [attr.role]="wrapsInteractive() ? null : 'button'"
30126
30320
  (click)="onClick($event)"
@@ -30133,7 +30327,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
30133
30327
  `,
30134
30328
  host: { class: 'contents' },
30135
30329
  }]
30136
- }], ctorParameters: () => [] });
30330
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
30137
30331
 
30138
30332
  /**
30139
30333
  * Promote a popup panel into the browser's top layer so it escapes every
@@ -32644,11 +32838,13 @@ class RichTextEmojiButtonComponent {
32644
32838
  this.exclusive = this.host.registerExclusivePopover(() => this.picker().hide());
32645
32839
  this.icon = this.domSanitizer.bypassSecurityTrustHtml(EMOJI_ICON);
32646
32840
  this.interactionDisabled = computed(() => this.host.isDisabled() || this.host.readonly(), ...(ngDevMode ? [{ debugName: "interactionDisabled" }] : /* istanbul ignore next */ []));
32841
+ /** Extra classes merged onto the toolbar button, after the built-in icon-button styling. */
32842
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
32647
32843
  this.buttonClasses = computed(() => cn('inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors', 'hover:bg-accent hover:text-accent-foreground', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', 'disabled:pointer-events-none disabled:opacity-50',
32648
32844
  // The global (pointer: coarse) floor targets `button:not([data-slot])`,
32649
32845
  // and these addon buttons carry a data-slot for testing — so they must
32650
32846
  // state the 44px touch minimum themselves rather than inherit it.
32651
- 'pointer-coarse:min-h-11 pointer-coarse:min-w-11', this.toolbarView?.compact() ? 'p-1' : 'p-1.5'), ...(ngDevMode ? [{ debugName: "buttonClasses" }] : /* istanbul ignore next */ []));
32847
+ 'pointer-coarse:min-h-11 pointer-coarse:min-w-11', this.toolbarView?.compact() ? 'p-1' : 'p-1.5', this.class()), ...(ngDevMode ? [{ debugName: "buttonClasses" }] : /* istanbul ignore next */ []));
32652
32848
  inject(DestroyRef).onDestroy(() => this.exclusive.release());
32653
32849
  }
32654
32850
  onOpenChange(next) {
@@ -32662,7 +32858,7 @@ class RichTextEmojiButtonComponent {
32662
32858
  this.context.onInsert(emoji);
32663
32859
  }
32664
32860
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextEmojiButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
32665
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.22", type: RichTextEmojiButtonComponent, isStandalone: true, selector: "ui-rte-emoji-button", host: { classAttribute: "contents" }, viewQueries: [{ propertyName: "picker", first: true, predicate: EmojiPickerComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<ui-emoji-picker\n (openChange)=\"onOpenChange($event)\"\n [closeOnSelect]=\"false\"\n [closeOnScroll]=\"true\"\n (emojiSelect)=\"onEmoji($event)\"\n>\n <ui-emoji-picker-trigger>\n <button\n type=\"button\"\n [class]=\"buttonClasses()\"\n [title]=\"context.tooltip()\"\n [attr.aria-label]=\"context.tooltip()\"\n [disabled]=\"interactionDisabled()\"\n >\n <span [innerHTML]=\"icon\"></span>\n </button>\n </ui-emoji-picker-trigger>\n <ui-emoji-picker-content strategy=\"fixed\" />\n</ui-emoji-picker>\n", dependencies: [{ kind: "component", type: EmojiPickerComponent, selector: "ui-emoji-picker", inputs: ["open", "closeOnSelect", "closeOnScroll"], outputs: ["openChange", "emojiSelect"] }, { kind: "component", type: EmojiPickerTriggerComponent, selector: "ui-emoji-picker-trigger" }, { kind: "component", type: EmojiPickerContentComponent, selector: "ui-emoji-picker-content", inputs: ["class", "strategy"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
32861
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.22", type: RichTextEmojiButtonComponent, isStandalone: true, selector: "ui-rte-emoji-button", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-slot": "\"rte-emoji-host\"" }, classAttribute: "contents" }, viewQueries: [{ propertyName: "picker", first: true, predicate: EmojiPickerComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<ui-emoji-picker\n (openChange)=\"onOpenChange($event)\"\n [closeOnSelect]=\"false\"\n [closeOnScroll]=\"true\"\n (emojiSelect)=\"onEmoji($event)\"\n>\n <ui-emoji-picker-trigger>\n <button\n type=\"button\"\n [class]=\"buttonClasses()\"\n [title]=\"context.tooltip()\"\n [attr.aria-label]=\"context.tooltip()\"\n [disabled]=\"interactionDisabled()\"\n >\n <span [innerHTML]=\"icon\"></span>\n </button>\n </ui-emoji-picker-trigger>\n <ui-emoji-picker-content strategy=\"fixed\" />\n</ui-emoji-picker>\n", dependencies: [{ kind: "component", type: EmojiPickerComponent, selector: "ui-emoji-picker", inputs: ["class", "open", "closeOnSelect", "closeOnScroll"], outputs: ["openChange", "emojiSelect"] }, { kind: "component", type: EmojiPickerTriggerComponent, selector: "ui-emoji-picker-trigger", inputs: ["class"] }, { kind: "component", type: EmojiPickerContentComponent, selector: "ui-emoji-picker-content", inputs: ["class", "strategy"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
32666
32862
  }
32667
32863
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextEmojiButtonComponent, decorators: [{
32668
32864
  type: Component,
@@ -32670,8 +32866,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
32670
32866
  EmojiPickerComponent,
32671
32867
  EmojiPickerTriggerComponent,
32672
32868
  EmojiPickerContentComponent,
32673
- ], host: { class: 'contents' }, template: "<ui-emoji-picker\n (openChange)=\"onOpenChange($event)\"\n [closeOnSelect]=\"false\"\n [closeOnScroll]=\"true\"\n (emojiSelect)=\"onEmoji($event)\"\n>\n <ui-emoji-picker-trigger>\n <button\n type=\"button\"\n [class]=\"buttonClasses()\"\n [title]=\"context.tooltip()\"\n [attr.aria-label]=\"context.tooltip()\"\n [disabled]=\"interactionDisabled()\"\n >\n <span [innerHTML]=\"icon\"></span>\n </button>\n </ui-emoji-picker-trigger>\n <ui-emoji-picker-content strategy=\"fixed\" />\n</ui-emoji-picker>\n" }]
32674
- }], ctorParameters: () => [], propDecorators: { picker: [{ type: i0.ViewChild, args: [i0.forwardRef(() => EmojiPickerComponent), { isSignal: true }] }] } });
32869
+ ], host: { class: 'contents', '[attr.data-slot]': '"rte-emoji-host"' }, template: "<ui-emoji-picker\n (openChange)=\"onOpenChange($event)\"\n [closeOnSelect]=\"false\"\n [closeOnScroll]=\"true\"\n (emojiSelect)=\"onEmoji($event)\"\n>\n <ui-emoji-picker-trigger>\n <button\n type=\"button\"\n [class]=\"buttonClasses()\"\n [title]=\"context.tooltip()\"\n [attr.aria-label]=\"context.tooltip()\"\n [disabled]=\"interactionDisabled()\"\n >\n <span [innerHTML]=\"icon\"></span>\n </button>\n </ui-emoji-picker-trigger>\n <ui-emoji-picker-content strategy=\"fixed\" />\n</ui-emoji-picker>\n" }]
32870
+ }], ctorParameters: () => [], propDecorators: { picker: [{ type: i0.ViewChild, args: [i0.forwardRef(() => EmojiPickerComponent), { isSignal: true }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
32675
32871
 
32676
32872
  /**
32677
32873
  * Built-in locales for the emoji addon. Pass a key (`'en'`, `'he'`, …) or a
@@ -32868,27 +33064,29 @@ class RichTextFileImportButtonComponent {
32868
33064
  this.context = inject(RICH_TEXT_FILE_IMPORT_BUTTON_CONTEXT);
32869
33065
  this.icon = this.domSanitizer.bypassSecurityTrustHtml(IMPORT_ICON);
32870
33066
  this.interactionDisabled = computed(() => this.host.isDisabled() || this.host.readonly(), ...(ngDevMode ? [{ debugName: "interactionDisabled" }] : /* istanbul ignore next */ []));
33067
+ /** Extra classes merged onto the toolbar button, after the built-in icon-button styling. */
33068
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
32871
33069
  this.buttonClasses = computed(() => cn('inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors', 'hover:bg-accent hover:text-accent-foreground', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', 'disabled:pointer-events-none disabled:opacity-50',
32872
33070
  // The global (pointer: coarse) floor targets `button:not([data-slot])`,
32873
33071
  // and these addon buttons carry a data-slot for testing — so they must
32874
33072
  // state the 44px touch minimum themselves rather than inherit it.
32875
- 'pointer-coarse:min-h-11 pointer-coarse:min-w-11', this.toolbarView?.compact() ? 'p-1' : 'p-1.5'), ...(ngDevMode ? [{ debugName: "buttonClasses" }] : /* istanbul ignore next */ []));
33073
+ 'pointer-coarse:min-h-11 pointer-coarse:min-w-11', this.toolbarView?.compact() ? 'p-1' : 'p-1.5', this.class()), ...(ngDevMode ? [{ debugName: "buttonClasses" }] : /* istanbul ignore next */ []));
32876
33074
  }
32877
33075
  onFileSelected(event) {
32878
- const input = event.target;
32879
- const file = input.files?.[0];
32880
- input.value = '';
33076
+ const fileInput = event.target;
33077
+ const file = fileInput.files?.[0];
33078
+ fileInput.value = '';
32881
33079
  if (this.interactionDisabled() || !file)
32882
33080
  return;
32883
33081
  this.context.onImport(file);
32884
33082
  }
32885
33083
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextFileImportButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
32886
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: RichTextFileImportButtonComponent, isStandalone: true, selector: "ui-rte-file-import-button", host: { classAttribute: "contents" }, ngImport: i0, template: "<button\n type=\"button\"\n data-slot=\"rte-file-import-button\"\n [class]=\"buttonClasses()\"\n [title]=\"context.locale().tooltip\"\n [attr.aria-label]=\"context.locale().tooltip\"\n [disabled]=\"interactionDisabled()\"\n (click)=\"fileInput.click()\"\n>\n <span [innerHTML]=\"icon\"></span>\n</button>\n<!--\n Hidden by the HTML hidden attribute, not by a CSS class: the UA stylesheet\n hides it with no stylesheet of ours involved. Hiding it with a Tailwind\n class meant that, for as long as Tailwind had not been applied, the input\n was a visible, nameless file input \u2014 a critical label violation that\n surfaced at random whenever an axe scan won the race against the\n stylesheet. It is also named, so it stays correct even if a consumer\n unhides it.\n-->\n<input\n #fileInput\n type=\"file\"\n [attr.accept]=\"context.accept()\"\n hidden\n data-slot=\"rte-file-import-input\"\n [attr.aria-label]=\"context.locale().tooltip\"\n (change)=\"onFileSelected($event)\"\n/>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
33084
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: RichTextFileImportButtonComponent, isStandalone: true, selector: "ui-rte-file-import-button", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: "<button\n type=\"button\"\n data-slot=\"rte-file-import-button\"\n [class]=\"buttonClasses()\"\n [title]=\"context.locale().tooltip\"\n [attr.aria-label]=\"context.locale().tooltip\"\n [disabled]=\"interactionDisabled()\"\n (click)=\"fileInput.click()\"\n>\n <span [innerHTML]=\"icon\"></span>\n</button>\n<!--\n Hidden by the HTML hidden attribute, not by a CSS class: the UA stylesheet\n hides it with no stylesheet of ours involved. Hiding it with a Tailwind\n class meant that, for as long as Tailwind had not been applied, the input\n was a visible, nameless file input \u2014 a critical label violation that\n surfaced at random whenever an axe scan won the race against the\n stylesheet. It is also named, so it stays correct even if a consumer\n unhides it.\n-->\n<input\n #fileInput\n type=\"file\"\n [attr.accept]=\"context.accept()\"\n hidden\n data-slot=\"rte-file-import-input\"\n [attr.aria-label]=\"context.locale().tooltip\"\n (change)=\"onFileSelected($event)\"\n/>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
32887
33085
  }
32888
33086
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextFileImportButtonComponent, decorators: [{
32889
33087
  type: Component,
32890
33088
  args: [{ selector: 'ui-rte-file-import-button', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'contents' }, template: "<button\n type=\"button\"\n data-slot=\"rte-file-import-button\"\n [class]=\"buttonClasses()\"\n [title]=\"context.locale().tooltip\"\n [attr.aria-label]=\"context.locale().tooltip\"\n [disabled]=\"interactionDisabled()\"\n (click)=\"fileInput.click()\"\n>\n <span [innerHTML]=\"icon\"></span>\n</button>\n<!--\n Hidden by the HTML hidden attribute, not by a CSS class: the UA stylesheet\n hides it with no stylesheet of ours involved. Hiding it with a Tailwind\n class meant that, for as long as Tailwind had not been applied, the input\n was a visible, nameless file input \u2014 a critical label violation that\n surfaced at random whenever an axe scan won the race against the\n stylesheet. It is also named, so it stays correct even if a consumer\n unhides it.\n-->\n<input\n #fileInput\n type=\"file\"\n [attr.accept]=\"context.accept()\"\n hidden\n data-slot=\"rte-file-import-input\"\n [attr.aria-label]=\"context.locale().tooltip\"\n (change)=\"onFileSelected($event)\"\n/>\n" }]
32891
- }] });
33089
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
32892
33090
 
32893
33091
  /**
32894
33092
  * The file-import addon's editor-frame overlay: a full-editor busy layer while a
@@ -32899,6 +33097,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
32899
33097
  */
32900
33098
  class RichTextFileImportOverlayComponent {
32901
33099
  constructor() {
33100
+ /** Extra classes merged onto the busy and error layers, after the full-editor scrim styling. */
33101
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
33102
+ this.layerClasses = computed(() => cn('absolute inset-0 z-20 flex items-center justify-center bg-background/70 backdrop-blur-[1px]', this.class()), ...(ngDevMode ? [{ debugName: "layerClasses" }] : /* istanbul ignore next */ []));
32902
33103
  /**
32903
33104
  * Renders the full-editor busy layer (`data-slot="rte-file-import-busy"`)
32904
33105
  * showing {@link locale}`.importing`. The directive holds this true for the
@@ -32921,12 +33122,12 @@ class RichTextFileImportOverlayComponent {
32921
33122
  this.locale = input.required(...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
32922
33123
  }
32923
33124
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextFileImportOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
32924
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextFileImportOverlayComponent, isStandalone: true, selector: "ui-rte-file-import-overlay", inputs: { importing: { classPropertyName: "importing", publicName: "importing", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: "<!--\n The live region lives OUTSIDE the @if blocks and is always in the DOM.\n A region that is inserted already holding its text is not reliably announced\n by screen readers \u2014 the assistive tech has to be observing the node before\n the text arrives. Rendering it unconditionally and emptying it is what makes\n the busy and failure states audible at all.\n\n Busy uses polite/status (it is progress, not an interruption); failure uses\n assertive/alert, because the import silently did nothing and the user would\n otherwise wait for content that is never coming.\n-->\n<output class=\"sr-only\" aria-live=\"polite\" data-slot=\"rte-file-import-busy-status\">\n @if (importing()) {\n {{ locale().importing }}\n }\n</output>\n<div class=\"sr-only\" role=\"alert\" aria-live=\"assertive\" data-slot=\"rte-file-import-error-alert\">\n @if (errorMessage()) {\n {{ errorMessage() }}\n }\n</div>\n\n@if (importing()) {\n <div\n class=\"absolute inset-0 z-20 flex items-center justify-center bg-background/70 backdrop-blur-[1px]\"\n data-slot=\"rte-file-import-busy\"\n aria-hidden=\"true\"\n >\n <div class=\"text-sm text-muted-foreground\">{{ locale().importing }}</div>\n </div>\n}\n\n@if (errorMessage()) {\n <div\n class=\"absolute inset-0 z-20 flex items-center justify-center bg-background/70 backdrop-blur-[1px]\"\n data-slot=\"rte-file-import-error\"\n aria-hidden=\"true\"\n >\n <div class=\"text-sm text-destructive font-medium\">{{ errorMessage() }}</div>\n </div>\n}\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
33125
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextFileImportOverlayComponent, isStandalone: true, selector: "ui-rte-file-import-overlay", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, importing: { classPropertyName: "importing", publicName: "importing", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: "<!--\n The live region lives OUTSIDE the @if blocks and is always in the DOM.\n A region that is inserted already holding its text is not reliably announced\n by screen readers \u2014 the assistive tech has to be observing the node before\n the text arrives. Rendering it unconditionally and emptying it is what makes\n the busy and failure states audible at all.\n\n Busy uses polite/status (it is progress, not an interruption); failure uses\n assertive/alert, because the import silently did nothing and the user would\n otherwise wait for content that is never coming.\n-->\n<output class=\"sr-only\" aria-live=\"polite\" data-slot=\"rte-file-import-busy-status\">\n @if (importing()) {\n {{ locale().importing }}\n }\n</output>\n<div class=\"sr-only\" role=\"alert\" aria-live=\"assertive\" data-slot=\"rte-file-import-error-alert\">\n @if (errorMessage()) {\n {{ errorMessage() }}\n }\n</div>\n\n@if (importing()) {\n <div\n [class]=\"layerClasses()\"\n data-slot=\"rte-file-import-busy\"\n aria-hidden=\"true\"\n >\n <div class=\"text-sm text-muted-foreground\">{{ locale().importing }}</div>\n </div>\n}\n\n@if (errorMessage()) {\n <div\n [class]=\"layerClasses()\"\n data-slot=\"rte-file-import-error\"\n aria-hidden=\"true\"\n >\n <div class=\"text-sm text-destructive font-medium\">{{ errorMessage() }}</div>\n </div>\n}\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
32925
33126
  }
32926
33127
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextFileImportOverlayComponent, decorators: [{
32927
33128
  type: Component,
32928
- args: [{ selector: 'ui-rte-file-import-overlay', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'contents' }, template: "<!--\n The live region lives OUTSIDE the @if blocks and is always in the DOM.\n A region that is inserted already holding its text is not reliably announced\n by screen readers \u2014 the assistive tech has to be observing the node before\n the text arrives. Rendering it unconditionally and emptying it is what makes\n the busy and failure states audible at all.\n\n Busy uses polite/status (it is progress, not an interruption); failure uses\n assertive/alert, because the import silently did nothing and the user would\n otherwise wait for content that is never coming.\n-->\n<output class=\"sr-only\" aria-live=\"polite\" data-slot=\"rte-file-import-busy-status\">\n @if (importing()) {\n {{ locale().importing }}\n }\n</output>\n<div class=\"sr-only\" role=\"alert\" aria-live=\"assertive\" data-slot=\"rte-file-import-error-alert\">\n @if (errorMessage()) {\n {{ errorMessage() }}\n }\n</div>\n\n@if (importing()) {\n <div\n class=\"absolute inset-0 z-20 flex items-center justify-center bg-background/70 backdrop-blur-[1px]\"\n data-slot=\"rte-file-import-busy\"\n aria-hidden=\"true\"\n >\n <div class=\"text-sm text-muted-foreground\">{{ locale().importing }}</div>\n </div>\n}\n\n@if (errorMessage()) {\n <div\n class=\"absolute inset-0 z-20 flex items-center justify-center bg-background/70 backdrop-blur-[1px]\"\n data-slot=\"rte-file-import-error\"\n aria-hidden=\"true\"\n >\n <div class=\"text-sm text-destructive font-medium\">{{ errorMessage() }}</div>\n </div>\n}\n" }]
32929
- }], propDecorators: { importing: [{ type: i0.Input, args: [{ isSignal: true, alias: "importing", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: true }] }] } });
33129
+ args: [{ selector: 'ui-rte-file-import-overlay', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'contents' }, template: "<!--\n The live region lives OUTSIDE the @if blocks and is always in the DOM.\n A region that is inserted already holding its text is not reliably announced\n by screen readers \u2014 the assistive tech has to be observing the node before\n the text arrives. Rendering it unconditionally and emptying it is what makes\n the busy and failure states audible at all.\n\n Busy uses polite/status (it is progress, not an interruption); failure uses\n assertive/alert, because the import silently did nothing and the user would\n otherwise wait for content that is never coming.\n-->\n<output class=\"sr-only\" aria-live=\"polite\" data-slot=\"rte-file-import-busy-status\">\n @if (importing()) {\n {{ locale().importing }}\n }\n</output>\n<div class=\"sr-only\" role=\"alert\" aria-live=\"assertive\" data-slot=\"rte-file-import-error-alert\">\n @if (errorMessage()) {\n {{ errorMessage() }}\n }\n</div>\n\n@if (importing()) {\n <div\n [class]=\"layerClasses()\"\n data-slot=\"rte-file-import-busy\"\n aria-hidden=\"true\"\n >\n <div class=\"text-sm text-muted-foreground\">{{ locale().importing }}</div>\n </div>\n}\n\n@if (errorMessage()) {\n <div\n [class]=\"layerClasses()\"\n data-slot=\"rte-file-import-error\"\n aria-hidden=\"true\"\n >\n <div class=\"text-sm text-destructive font-medium\">{{ errorMessage() }}</div>\n </div>\n}\n" }]
33130
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], importing: [{ type: i0.Input, args: [{ isSignal: true, alias: "importing", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: true }] }] } });
32930
33131
 
32931
33132
  /**
32932
33133
  * The MIME types and extensions the file-import addon accepts. Kept in one place
@@ -33212,7 +33413,7 @@ class RichTextFileImportDirective {
33212
33413
  async importDocx(file) {
33213
33414
  this.assertImportableSize(file);
33214
33415
  const bytes = new Uint8Array(await file.arrayBuffer());
33215
- const { parseDocx } = await import('./gilav21-shadcn-angular-rte-docx-parser-DiBPweI4.mjs');
33416
+ const { parseDocx } = await import('./gilav21-shadcn-angular-rte-docx-parser-D_wFX3FP.mjs');
33216
33417
  const { renderDocxForEditor } = await import('./gilav21-shadcn-angular-rte-docx-to-editor-html-BreagmS_.mjs');
33217
33418
  const html = renderDocxForEditor(parseDocx(bytes));
33218
33419
  this.insertImported(html);
@@ -33220,7 +33421,7 @@ class RichTextFileImportDirective {
33220
33421
  async importPdf(file) {
33221
33422
  this.assertImportableSize(file);
33222
33423
  const buffer = await file.arrayBuffer();
33223
- const { parsePdfReadable } = await import('./gilav21-shadcn-angular-rte-pdf-readable-JvCpuNQH.mjs');
33424
+ const { parsePdfReadable } = await import('./gilav21-shadcn-angular-rte-pdf-readable-BKYRkHec.mjs');
33224
33425
  const result = await parsePdfReadable(buffer);
33225
33426
  if (result.html.trim() && result.fontFaceCss)
33226
33427
  this.injectFontCss(result.fontFaceCss);
@@ -33530,6 +33731,9 @@ const RICH_TEXT_HISTORY_LOCALES = {
33530
33731
  */
33531
33732
  class RichTextHistoryPanelComponent {
33532
33733
  constructor() {
33734
+ /** Extra classes merged onto the corner wrapper that anchors the history button over the editor. */
33735
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
33736
+ this.classes = computed(() => cn('absolute top-2 z-30 ltr:right-2 rtl:left-2', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
33533
33737
  this.host = inject(RichTextEditorAddonHost);
33534
33738
  this.contentSanitizer = inject(RichTextSanitizerService);
33535
33739
  this.domSanitizer = inject(DomSanitizer);
@@ -33761,7 +33965,7 @@ class RichTextHistoryPanelComponent {
33761
33965
  }, 0);
33762
33966
  }
33763
33967
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextHistoryPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
33764
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextHistoryPanelComponent, isStandalone: true, selector: "ui-rich-text-history-panel", inputs: { locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, showButton: { classPropertyName: "showButton", publicName: "showButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { restore: "restore" }, host: { classAttribute: "contents" }, ngImport: i0, template: "@if (!readonly() && showButton()) {\n <div class=\"absolute top-2 z-30 ltr:right-2 rtl:left-2\">\n <ui-popover\n [open]=\"historyPanelOpen()\"\n (openChange)=\"onHistoryPanelOpenChange($event)\"\n >\n <ui-popover-trigger>\n <ui-button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n class=\"h-8 px-2.5 text-xs\"\n [disabled]=\"disabled()\"\n [attr.title]=\"'Ctrl/Cmd + Shift + H'\"\n [ariaLabel]=\"locale().ariaOpen\"\n >\n {{ interpolate(locale().button, { count: historyCount() }) }}\n </ui-button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-80 max-sm:w-[calc(100vw-2rem)] p-0\" align=\"end\" side=\"bottom\" [restoreFocus]=\"false\">\n <div class=\"flex items-center justify-between border-b px-3 py-2\">\n <div class=\"text-sm font-medium\">{{ locale().title }}</div>\n <ui-button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"h-7 w-7 p-0 pointer-coarse:size-11\"\n (click)=\"closePanel()\"\n (keydown.enter)=\"closePanel()\"\n (keydown.space)=\"closePanel()\"\n [ariaLabel]=\"locale().ariaClose\"\n >\n <svg class=\"h-3.5 w-3.5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n <span class=\"sr-only\">{{ locale().close }}</span>\n </ui-button>\n </div>\n <ui-scroll-area [class]=\"'h-72 p-2'\">\n <div class=\"space-y-1 pr-2\" data-history-list=\"popover\">\n @for (entry of historyTimelineEntries(); track entry.index) {\n <div\n role=\"button\"\n tabindex=\"0\"\n class=\"w-full rounded-md border px-2 py-2 text-left transition-colors hover:bg-accent/60\"\n [class.bg-accent]=\"entry.active\"\n [class.border-primary/40]=\"entry.active\"\n [class.border-border]=\"!entry.active\"\n [attr.data-history-entry-action]=\"'true'\"\n [attr.data-history-entry-index]=\"entry.index\"\n [attr.aria-label]=\"interpolate(locale().ariaApply, { index: entry.index + 1 })\"\n (click)=\"onQuickApplyFromHistory(entry.index, $event)\"\n (keydown)=\"onHistoryEntryKeydown($event, entry.index)\"\n >\n <div class=\"flex items-center justify-between gap-2\">\n <span class=\"text-xs font-medium\">{{ interpolate(locale().revision, { index: entry.index + 1 }) }}</span>\n <div class=\"flex items-center gap-2\">\n @if (lastAppliedHistoryIndex() === entry.index) {\n <span class=\"text-[11px] text-primary/90 font-medium\">{{ locale().applied }}</span>\n }\n <span class=\"text-[11px] text-muted-foreground\">{{ entry.timestamp | date:'HH:mm:ss' }}</span>\n <ui-button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"h-6 px-2 text-[11px]\"\n (click)=\"openHistoryPreview(entry.index, $event)\"\n (keydown.enter)=\"openHistoryPreview(entry.index, $event)\"\n (keydown.space)=\"openHistoryPreview(entry.index, $event)\"\n >\n {{ locale().preview }}\n </ui-button>\n </div>\n </div>\n <div class=\"mt-1 space-y-0.5\">\n @for (line of entry.previewLines; track $index) {\n <p class=\"text-xs text-muted-foreground leading-4 truncate\">{{ line }}</p>\n }\n @if (entry.lineCount > entry.previewLines.length) {\n <p class=\"text-[11px] text-muted-foreground/80\">{{ interpolate(locale().moreLines, { count: entry.lineCount - entry.previewLines.length }) }}</p>\n }\n </div>\n </div>\n }\n </div>\n </ui-scroll-area>\n </ui-popover-content>\n </ui-popover>\n </div>\n}\n\n<ui-dialog [open]=\"historyPreviewOpen()\" (openChange)=\"historyPreviewOpen.set($event)\">\n <ui-dialog-content class=\"max-w-3xl p-0 overflow-hidden\">\n @if (selectedHistoryEntry(); as selected) {\n <ui-dialog-header class=\"px-5 pt-5 pb-3 border-b\">\n <ui-dialog-title>{{ interpolate(locale().revision, { index: selected.index + 1 }) }}</ui-dialog-title>\n <ui-dialog-description>\n {{ interpolate(locale().capturedAt, { time: (selected.timestamp | date:'MMM d, y, HH:mm:ss') ?? '' }) }}\n </ui-dialog-description>\n </ui-dialog-header>\n\n <ui-scroll-area [class]=\"'h-[70vh] px-5 py-4'\">\n <div class=\"space-y-4 pr-3\">\n <div class=\"rounded-md border bg-muted/20\">\n <div class=\"px-3 py-2 border-b text-xs font-medium text-muted-foreground\">{{ locale().renderedPreview }}</div>\n <div class=\"p-3 prose prose-sm dark:prose-invert max-w-none [&_*]:break-words\" [innerHTML]=\"previewHtml(selected.html)\"></div>\n </div>\n\n <div class=\"rounded-md border\">\n <div class=\"px-3 py-2 border-b text-xs font-medium text-muted-foreground\">{{ locale().markdownSnapshot }}</div>\n <pre class=\"p-3 text-xs whitespace-pre-wrap break-words\">{{ selected.markdown }}</pre>\n </div>\n </div>\n </ui-scroll-area>\n\n <ui-dialog-footer class=\"px-5 py-4 border-t\">\n <ui-button variant=\"outline\" (click)=\"closePreview()\" (keydown.enter)=\"closePreview()\" (keydown.space)=\"closePreview()\">{{ locale().cancel }}</ui-button>\n <ui-button (click)=\"restoreFromHistoryPreview()\" (keydown.enter)=\"restoreFromHistoryPreview()\" (keydown.space)=\"restoreFromHistoryPreview()\">{{ locale().restore }}</ui-button>\n </ui-dialog-footer>\n }\n </ui-dialog-content>\n</ui-dialog>\n\n<ui-dialog [open]=\"historyBrowserOpen()\" (openChange)=\"historyBrowserOpen.set($event)\">\n <ui-dialog-content class=\"max-w-xl p-0 overflow-hidden\">\n <ui-dialog-header class=\"px-5 pt-5 pb-3 border-b\">\n <ui-dialog-title>{{ locale().title }}</ui-dialog-title>\n <ui-dialog-description>{{ locale().browserDescription }}</ui-dialog-description>\n </ui-dialog-header>\n <ui-scroll-area [class]=\"'h-[60vh] px-4 py-3'\">\n <div class=\"space-y-2 pr-2\" data-history-list=\"dialog\">\n @for (entry of historyTimelineEntries(); track entry.index) {\n <div\n role=\"button\"\n tabindex=\"0\"\n class=\"w-full rounded-md border px-3 py-2 text-left transition-colors hover:bg-accent/60\"\n [class.bg-accent]=\"entry.active\"\n [class.border-primary/40]=\"entry.active\"\n [class.border-border]=\"!entry.active\"\n [attr.data-history-entry-action]=\"'true'\"\n [attr.data-history-entry-index]=\"entry.index\"\n [attr.aria-label]=\"interpolate(locale().ariaApply, { index: entry.index + 1 })\"\n (click)=\"onQuickApplyFromHistory(entry.index, $event)\"\n (keydown)=\"onHistoryEntryKeydown($event, entry.index)\"\n >\n <div class=\"flex items-center justify-between gap-2\">\n <span class=\"text-xs font-medium\">{{ interpolate(locale().revision, { index: entry.index + 1 }) }}</span>\n <div class=\"flex items-center gap-2\">\n @if (lastAppliedHistoryIndex() === entry.index) {\n <span class=\"text-[11px] text-primary/90 font-medium\">{{ locale().applied }}</span>\n }\n <span class=\"text-[11px] text-muted-foreground\">{{ entry.timestamp | date:'HH:mm:ss' }}</span>\n <ui-button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"h-6 px-2 text-[11px]\"\n (click)=\"openHistoryPreview(entry.index, $event)\"\n (keydown.enter)=\"openHistoryPreview(entry.index, $event)\"\n (keydown.space)=\"openHistoryPreview(entry.index, $event)\"\n >\n {{ locale().preview }}\n </ui-button>\n </div>\n </div>\n <div class=\"mt-1 space-y-0.5\">\n @for (line of entry.previewLines; track $index) {\n <p class=\"text-xs text-muted-foreground leading-4 truncate\">{{ line }}</p>\n }\n @if (entry.lineCount > entry.previewLines.length) {\n <p class=\"text-[11px] text-muted-foreground/80\">{{ interpolate(locale().moreLines, { count: entry.lineCount - entry.previewLines.length }) }}</p>\n }\n </div>\n </div>\n }\n </div>\n </ui-scroll-area>\n <ui-dialog-footer class=\"px-5 py-4 border-t\">\n <ui-button variant=\"outline\" (click)=\"closeBrowser()\" (keydown.enter)=\"closeBrowser()\" (keydown.space)=\"closeBrowser()\">{{ locale().close }}</ui-button>\n </ui-dialog-footer>\n </ui-dialog-content>\n</ui-dialog>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "ui-button", inputs: ["variant", "size", "disabled", "type", "class", "ariaLabel", "aria-expanded", "aria-pressed", "aria-haspopup", "aria-controls", "label", "ripple", "rippleColor", "loading", "skeleton"], outputs: ["clicked"] }, { kind: "component", type: PopoverComponent, selector: "ui-popover", inputs: ["open", "closeOnScroll"], outputs: ["openChange"] }, { kind: "component", type: PopoverTriggerComponent, selector: "ui-popover-trigger" }, { kind: "component", type: PopoverContentComponent, selector: "ui-popover-content", inputs: ["class", "align", "side", "sideOffset", "avoidCollisions", "restoreFocus", "strategy"] }, { kind: "component", type: DialogComponent, selector: "ui-dialog", inputs: ["open"], outputs: ["openChange"] }, { kind: "component", type: DialogContentComponent, selector: "ui-dialog-content", inputs: ["class", "title", "description", "locale"] }, { kind: "component", type: DialogHeaderComponent, selector: "ui-dialog-header" }, { kind: "component", type: DialogTitleComponent, selector: "ui-dialog-title" }, { kind: "component", type: DialogDescriptionComponent, selector: "ui-dialog-description" }, { kind: "component", type: DialogFooterComponent, selector: "ui-dialog-footer" }, { kind: "component", type: ScrollAreaComponent, selector: "ui-scroll-area", inputs: ["class", "orientation"] }, { kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
33968
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextHistoryPanelComponent, isStandalone: true, selector: "ui-rich-text-history-panel", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, showButton: { classPropertyName: "showButton", publicName: "showButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { restore: "restore" }, host: { classAttribute: "contents" }, ngImport: i0, template: "@if (!readonly() && showButton()) {\n <div [class]=\"classes()\" [attr.data-slot]=\"'rte-history-panel'\">\n <ui-popover\n [open]=\"historyPanelOpen()\"\n (openChange)=\"onHistoryPanelOpenChange($event)\"\n >\n <ui-popover-trigger>\n <ui-button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n class=\"h-8 px-2.5 text-xs\"\n [disabled]=\"disabled()\"\n [attr.title]=\"'Ctrl/Cmd + Shift + H'\"\n [ariaLabel]=\"locale().ariaOpen\"\n >\n {{ interpolate(locale().button, { count: historyCount() }) }}\n </ui-button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-80 max-sm:w-[calc(100vw-2rem)] p-0\" align=\"end\" side=\"bottom\" [restoreFocus]=\"false\">\n <div class=\"flex items-center justify-between border-b px-3 py-2\">\n <div class=\"text-sm font-medium\">{{ locale().title }}</div>\n <ui-button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"h-7 w-7 p-0 pointer-coarse:size-11\"\n (click)=\"closePanel()\"\n (keydown.enter)=\"closePanel()\"\n (keydown.space)=\"closePanel()\"\n [ariaLabel]=\"locale().ariaClose\"\n >\n <svg class=\"h-3.5 w-3.5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n <span class=\"sr-only\">{{ locale().close }}</span>\n </ui-button>\n </div>\n <ui-scroll-area [class]=\"'h-72 p-2'\">\n <div class=\"space-y-1 pr-2\" data-history-list=\"popover\">\n @for (entry of historyTimelineEntries(); track entry.index) {\n <div\n role=\"button\"\n tabindex=\"0\"\n class=\"w-full rounded-md border px-2 py-2 text-left transition-colors hover:bg-accent/60\"\n [class.bg-accent]=\"entry.active\"\n [class.border-primary/40]=\"entry.active\"\n [class.border-border]=\"!entry.active\"\n [attr.data-history-entry-action]=\"'true'\"\n [attr.data-history-entry-index]=\"entry.index\"\n [attr.aria-label]=\"interpolate(locale().ariaApply, { index: entry.index + 1 })\"\n (click)=\"onQuickApplyFromHistory(entry.index, $event)\"\n (keydown)=\"onHistoryEntryKeydown($event, entry.index)\"\n >\n <div class=\"flex items-center justify-between gap-2\">\n <span class=\"text-xs font-medium\">{{ interpolate(locale().revision, { index: entry.index + 1 }) }}</span>\n <div class=\"flex items-center gap-2\">\n @if (lastAppliedHistoryIndex() === entry.index) {\n <span class=\"text-[11px] text-primary/90 font-medium\">{{ locale().applied }}</span>\n }\n <span class=\"text-[11px] text-muted-foreground\">{{ entry.timestamp | date:'HH:mm:ss' }}</span>\n <ui-button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"h-6 px-2 text-[11px]\"\n (click)=\"openHistoryPreview(entry.index, $event)\"\n (keydown.enter)=\"openHistoryPreview(entry.index, $event)\"\n (keydown.space)=\"openHistoryPreview(entry.index, $event)\"\n >\n {{ locale().preview }}\n </ui-button>\n </div>\n </div>\n <div class=\"mt-1 space-y-0.5\">\n @for (line of entry.previewLines; track $index) {\n <p class=\"text-xs text-muted-foreground leading-4 truncate\">{{ line }}</p>\n }\n @if (entry.lineCount > entry.previewLines.length) {\n <p class=\"text-[11px] text-muted-foreground/80\">{{ interpolate(locale().moreLines, { count: entry.lineCount - entry.previewLines.length }) }}</p>\n }\n </div>\n </div>\n }\n </div>\n </ui-scroll-area>\n </ui-popover-content>\n </ui-popover>\n </div>\n}\n\n<ui-dialog [open]=\"historyPreviewOpen()\" (openChange)=\"historyPreviewOpen.set($event)\">\n <ui-dialog-content class=\"max-w-3xl p-0 overflow-hidden\">\n @if (selectedHistoryEntry(); as selected) {\n <ui-dialog-header class=\"px-5 pt-5 pb-3 border-b\">\n <ui-dialog-title>{{ interpolate(locale().revision, { index: selected.index + 1 }) }}</ui-dialog-title>\n <ui-dialog-description>\n {{ interpolate(locale().capturedAt, { time: (selected.timestamp | date:'MMM d, y, HH:mm:ss') ?? '' }) }}\n </ui-dialog-description>\n </ui-dialog-header>\n\n <ui-scroll-area [class]=\"'h-[70vh] px-5 py-4'\">\n <div class=\"space-y-4 pr-3\">\n <div class=\"rounded-md border bg-muted/20\">\n <div class=\"px-3 py-2 border-b text-xs font-medium text-muted-foreground\">{{ locale().renderedPreview }}</div>\n <div class=\"p-3 prose prose-sm dark:prose-invert max-w-none [&_*]:break-words\" [innerHTML]=\"previewHtml(selected.html)\"></div>\n </div>\n\n <div class=\"rounded-md border\">\n <div class=\"px-3 py-2 border-b text-xs font-medium text-muted-foreground\">{{ locale().markdownSnapshot }}</div>\n <pre class=\"p-3 text-xs whitespace-pre-wrap break-words\">{{ selected.markdown }}</pre>\n </div>\n </div>\n </ui-scroll-area>\n\n <ui-dialog-footer class=\"px-5 py-4 border-t\">\n <ui-button variant=\"outline\" (click)=\"closePreview()\" (keydown.enter)=\"closePreview()\" (keydown.space)=\"closePreview()\">{{ locale().cancel }}</ui-button>\n <ui-button (click)=\"restoreFromHistoryPreview()\" (keydown.enter)=\"restoreFromHistoryPreview()\" (keydown.space)=\"restoreFromHistoryPreview()\">{{ locale().restore }}</ui-button>\n </ui-dialog-footer>\n }\n </ui-dialog-content>\n</ui-dialog>\n\n<ui-dialog [open]=\"historyBrowserOpen()\" (openChange)=\"historyBrowserOpen.set($event)\">\n <ui-dialog-content class=\"max-w-xl p-0 overflow-hidden\">\n <ui-dialog-header class=\"px-5 pt-5 pb-3 border-b\">\n <ui-dialog-title>{{ locale().title }}</ui-dialog-title>\n <ui-dialog-description>{{ locale().browserDescription }}</ui-dialog-description>\n </ui-dialog-header>\n <ui-scroll-area [class]=\"'h-[60vh] px-4 py-3'\">\n <div class=\"space-y-2 pr-2\" data-history-list=\"dialog\">\n @for (entry of historyTimelineEntries(); track entry.index) {\n <div\n role=\"button\"\n tabindex=\"0\"\n class=\"w-full rounded-md border px-3 py-2 text-left transition-colors hover:bg-accent/60\"\n [class.bg-accent]=\"entry.active\"\n [class.border-primary/40]=\"entry.active\"\n [class.border-border]=\"!entry.active\"\n [attr.data-history-entry-action]=\"'true'\"\n [attr.data-history-entry-index]=\"entry.index\"\n [attr.aria-label]=\"interpolate(locale().ariaApply, { index: entry.index + 1 })\"\n (click)=\"onQuickApplyFromHistory(entry.index, $event)\"\n (keydown)=\"onHistoryEntryKeydown($event, entry.index)\"\n >\n <div class=\"flex items-center justify-between gap-2\">\n <span class=\"text-xs font-medium\">{{ interpolate(locale().revision, { index: entry.index + 1 }) }}</span>\n <div class=\"flex items-center gap-2\">\n @if (lastAppliedHistoryIndex() === entry.index) {\n <span class=\"text-[11px] text-primary/90 font-medium\">{{ locale().applied }}</span>\n }\n <span class=\"text-[11px] text-muted-foreground\">{{ entry.timestamp | date:'HH:mm:ss' }}</span>\n <ui-button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"h-6 px-2 text-[11px]\"\n (click)=\"openHistoryPreview(entry.index, $event)\"\n (keydown.enter)=\"openHistoryPreview(entry.index, $event)\"\n (keydown.space)=\"openHistoryPreview(entry.index, $event)\"\n >\n {{ locale().preview }}\n </ui-button>\n </div>\n </div>\n <div class=\"mt-1 space-y-0.5\">\n @for (line of entry.previewLines; track $index) {\n <p class=\"text-xs text-muted-foreground leading-4 truncate\">{{ line }}</p>\n }\n @if (entry.lineCount > entry.previewLines.length) {\n <p class=\"text-[11px] text-muted-foreground/80\">{{ interpolate(locale().moreLines, { count: entry.lineCount - entry.previewLines.length }) }}</p>\n }\n </div>\n </div>\n }\n </div>\n </ui-scroll-area>\n <ui-dialog-footer class=\"px-5 py-4 border-t\">\n <ui-button variant=\"outline\" (click)=\"closeBrowser()\" (keydown.enter)=\"closeBrowser()\" (keydown.space)=\"closeBrowser()\">{{ locale().close }}</ui-button>\n </ui-dialog-footer>\n </ui-dialog-content>\n</ui-dialog>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "ui-button", inputs: ["variant", "size", "disabled", "type", "class", "ariaLabel", "aria-expanded", "aria-pressed", "aria-haspopup", "aria-controls", "label", "ripple", "rippleColor", "loading", "skeleton"], outputs: ["clicked"] }, { kind: "component", type: PopoverComponent, selector: "ui-popover", inputs: ["class", "open", "closeOnScroll"], outputs: ["openChange"] }, { kind: "component", type: PopoverTriggerComponent, selector: "ui-popover-trigger", inputs: ["class"] }, { kind: "component", type: PopoverContentComponent, selector: "ui-popover-content", inputs: ["class", "align", "side", "sideOffset", "avoidCollisions", "restoreFocus", "strategy"] }, { kind: "component", type: DialogComponent, selector: "ui-dialog", inputs: ["open"], outputs: ["openChange"] }, { kind: "component", type: DialogContentComponent, selector: "ui-dialog-content", inputs: ["class", "title", "description", "locale"] }, { kind: "component", type: DialogHeaderComponent, selector: "ui-dialog-header", inputs: ["class"] }, { kind: "component", type: DialogTitleComponent, selector: "ui-dialog-title", inputs: ["class"] }, { kind: "component", type: DialogDescriptionComponent, selector: "ui-dialog-description", inputs: ["class"] }, { kind: "component", type: DialogFooterComponent, selector: "ui-dialog-footer", inputs: ["class"] }, { kind: "component", type: ScrollAreaComponent, selector: "ui-scroll-area", inputs: ["class", "orientation"] }, { kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
33765
33969
  }
33766
33970
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextHistoryPanelComponent, decorators: [{
33767
33971
  type: Component,
@@ -33778,8 +33982,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
33778
33982
  DialogDescriptionComponent,
33779
33983
  DialogFooterComponent,
33780
33984
  ScrollAreaComponent,
33781
- ], host: { class: 'contents' }, template: "@if (!readonly() && showButton()) {\n <div class=\"absolute top-2 z-30 ltr:right-2 rtl:left-2\">\n <ui-popover\n [open]=\"historyPanelOpen()\"\n (openChange)=\"onHistoryPanelOpenChange($event)\"\n >\n <ui-popover-trigger>\n <ui-button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n class=\"h-8 px-2.5 text-xs\"\n [disabled]=\"disabled()\"\n [attr.title]=\"'Ctrl/Cmd + Shift + H'\"\n [ariaLabel]=\"locale().ariaOpen\"\n >\n {{ interpolate(locale().button, { count: historyCount() }) }}\n </ui-button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-80 max-sm:w-[calc(100vw-2rem)] p-0\" align=\"end\" side=\"bottom\" [restoreFocus]=\"false\">\n <div class=\"flex items-center justify-between border-b px-3 py-2\">\n <div class=\"text-sm font-medium\">{{ locale().title }}</div>\n <ui-button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"h-7 w-7 p-0 pointer-coarse:size-11\"\n (click)=\"closePanel()\"\n (keydown.enter)=\"closePanel()\"\n (keydown.space)=\"closePanel()\"\n [ariaLabel]=\"locale().ariaClose\"\n >\n <svg class=\"h-3.5 w-3.5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n <span class=\"sr-only\">{{ locale().close }}</span>\n </ui-button>\n </div>\n <ui-scroll-area [class]=\"'h-72 p-2'\">\n <div class=\"space-y-1 pr-2\" data-history-list=\"popover\">\n @for (entry of historyTimelineEntries(); track entry.index) {\n <div\n role=\"button\"\n tabindex=\"0\"\n class=\"w-full rounded-md border px-2 py-2 text-left transition-colors hover:bg-accent/60\"\n [class.bg-accent]=\"entry.active\"\n [class.border-primary/40]=\"entry.active\"\n [class.border-border]=\"!entry.active\"\n [attr.data-history-entry-action]=\"'true'\"\n [attr.data-history-entry-index]=\"entry.index\"\n [attr.aria-label]=\"interpolate(locale().ariaApply, { index: entry.index + 1 })\"\n (click)=\"onQuickApplyFromHistory(entry.index, $event)\"\n (keydown)=\"onHistoryEntryKeydown($event, entry.index)\"\n >\n <div class=\"flex items-center justify-between gap-2\">\n <span class=\"text-xs font-medium\">{{ interpolate(locale().revision, { index: entry.index + 1 }) }}</span>\n <div class=\"flex items-center gap-2\">\n @if (lastAppliedHistoryIndex() === entry.index) {\n <span class=\"text-[11px] text-primary/90 font-medium\">{{ locale().applied }}</span>\n }\n <span class=\"text-[11px] text-muted-foreground\">{{ entry.timestamp | date:'HH:mm:ss' }}</span>\n <ui-button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"h-6 px-2 text-[11px]\"\n (click)=\"openHistoryPreview(entry.index, $event)\"\n (keydown.enter)=\"openHistoryPreview(entry.index, $event)\"\n (keydown.space)=\"openHistoryPreview(entry.index, $event)\"\n >\n {{ locale().preview }}\n </ui-button>\n </div>\n </div>\n <div class=\"mt-1 space-y-0.5\">\n @for (line of entry.previewLines; track $index) {\n <p class=\"text-xs text-muted-foreground leading-4 truncate\">{{ line }}</p>\n }\n @if (entry.lineCount > entry.previewLines.length) {\n <p class=\"text-[11px] text-muted-foreground/80\">{{ interpolate(locale().moreLines, { count: entry.lineCount - entry.previewLines.length }) }}</p>\n }\n </div>\n </div>\n }\n </div>\n </ui-scroll-area>\n </ui-popover-content>\n </ui-popover>\n </div>\n}\n\n<ui-dialog [open]=\"historyPreviewOpen()\" (openChange)=\"historyPreviewOpen.set($event)\">\n <ui-dialog-content class=\"max-w-3xl p-0 overflow-hidden\">\n @if (selectedHistoryEntry(); as selected) {\n <ui-dialog-header class=\"px-5 pt-5 pb-3 border-b\">\n <ui-dialog-title>{{ interpolate(locale().revision, { index: selected.index + 1 }) }}</ui-dialog-title>\n <ui-dialog-description>\n {{ interpolate(locale().capturedAt, { time: (selected.timestamp | date:'MMM d, y, HH:mm:ss') ?? '' }) }}\n </ui-dialog-description>\n </ui-dialog-header>\n\n <ui-scroll-area [class]=\"'h-[70vh] px-5 py-4'\">\n <div class=\"space-y-4 pr-3\">\n <div class=\"rounded-md border bg-muted/20\">\n <div class=\"px-3 py-2 border-b text-xs font-medium text-muted-foreground\">{{ locale().renderedPreview }}</div>\n <div class=\"p-3 prose prose-sm dark:prose-invert max-w-none [&_*]:break-words\" [innerHTML]=\"previewHtml(selected.html)\"></div>\n </div>\n\n <div class=\"rounded-md border\">\n <div class=\"px-3 py-2 border-b text-xs font-medium text-muted-foreground\">{{ locale().markdownSnapshot }}</div>\n <pre class=\"p-3 text-xs whitespace-pre-wrap break-words\">{{ selected.markdown }}</pre>\n </div>\n </div>\n </ui-scroll-area>\n\n <ui-dialog-footer class=\"px-5 py-4 border-t\">\n <ui-button variant=\"outline\" (click)=\"closePreview()\" (keydown.enter)=\"closePreview()\" (keydown.space)=\"closePreview()\">{{ locale().cancel }}</ui-button>\n <ui-button (click)=\"restoreFromHistoryPreview()\" (keydown.enter)=\"restoreFromHistoryPreview()\" (keydown.space)=\"restoreFromHistoryPreview()\">{{ locale().restore }}</ui-button>\n </ui-dialog-footer>\n }\n </ui-dialog-content>\n</ui-dialog>\n\n<ui-dialog [open]=\"historyBrowserOpen()\" (openChange)=\"historyBrowserOpen.set($event)\">\n <ui-dialog-content class=\"max-w-xl p-0 overflow-hidden\">\n <ui-dialog-header class=\"px-5 pt-5 pb-3 border-b\">\n <ui-dialog-title>{{ locale().title }}</ui-dialog-title>\n <ui-dialog-description>{{ locale().browserDescription }}</ui-dialog-description>\n </ui-dialog-header>\n <ui-scroll-area [class]=\"'h-[60vh] px-4 py-3'\">\n <div class=\"space-y-2 pr-2\" data-history-list=\"dialog\">\n @for (entry of historyTimelineEntries(); track entry.index) {\n <div\n role=\"button\"\n tabindex=\"0\"\n class=\"w-full rounded-md border px-3 py-2 text-left transition-colors hover:bg-accent/60\"\n [class.bg-accent]=\"entry.active\"\n [class.border-primary/40]=\"entry.active\"\n [class.border-border]=\"!entry.active\"\n [attr.data-history-entry-action]=\"'true'\"\n [attr.data-history-entry-index]=\"entry.index\"\n [attr.aria-label]=\"interpolate(locale().ariaApply, { index: entry.index + 1 })\"\n (click)=\"onQuickApplyFromHistory(entry.index, $event)\"\n (keydown)=\"onHistoryEntryKeydown($event, entry.index)\"\n >\n <div class=\"flex items-center justify-between gap-2\">\n <span class=\"text-xs font-medium\">{{ interpolate(locale().revision, { index: entry.index + 1 }) }}</span>\n <div class=\"flex items-center gap-2\">\n @if (lastAppliedHistoryIndex() === entry.index) {\n <span class=\"text-[11px] text-primary/90 font-medium\">{{ locale().applied }}</span>\n }\n <span class=\"text-[11px] text-muted-foreground\">{{ entry.timestamp | date:'HH:mm:ss' }}</span>\n <ui-button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"h-6 px-2 text-[11px]\"\n (click)=\"openHistoryPreview(entry.index, $event)\"\n (keydown.enter)=\"openHistoryPreview(entry.index, $event)\"\n (keydown.space)=\"openHistoryPreview(entry.index, $event)\"\n >\n {{ locale().preview }}\n </ui-button>\n </div>\n </div>\n <div class=\"mt-1 space-y-0.5\">\n @for (line of entry.previewLines; track $index) {\n <p class=\"text-xs text-muted-foreground leading-4 truncate\">{{ line }}</p>\n }\n @if (entry.lineCount > entry.previewLines.length) {\n <p class=\"text-[11px] text-muted-foreground/80\">{{ interpolate(locale().moreLines, { count: entry.lineCount - entry.previewLines.length }) }}</p>\n }\n </div>\n </div>\n }\n </div>\n </ui-scroll-area>\n <ui-dialog-footer class=\"px-5 py-4 border-t\">\n <ui-button variant=\"outline\" (click)=\"closeBrowser()\" (keydown.enter)=\"closeBrowser()\" (keydown.space)=\"closeBrowser()\">{{ locale().close }}</ui-button>\n </ui-dialog-footer>\n </ui-dialog-content>\n</ui-dialog>\n" }]
33782
- }], propDecorators: { locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], showButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showButton", required: false }] }], restore: [{ type: i0.Output, args: ["restore"] }] } });
33985
+ ], host: { class: 'contents' }, template: "@if (!readonly() && showButton()) {\n <div [class]=\"classes()\" [attr.data-slot]=\"'rte-history-panel'\">\n <ui-popover\n [open]=\"historyPanelOpen()\"\n (openChange)=\"onHistoryPanelOpenChange($event)\"\n >\n <ui-popover-trigger>\n <ui-button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n class=\"h-8 px-2.5 text-xs\"\n [disabled]=\"disabled()\"\n [attr.title]=\"'Ctrl/Cmd + Shift + H'\"\n [ariaLabel]=\"locale().ariaOpen\"\n >\n {{ interpolate(locale().button, { count: historyCount() }) }}\n </ui-button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-80 max-sm:w-[calc(100vw-2rem)] p-0\" align=\"end\" side=\"bottom\" [restoreFocus]=\"false\">\n <div class=\"flex items-center justify-between border-b px-3 py-2\">\n <div class=\"text-sm font-medium\">{{ locale().title }}</div>\n <ui-button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"h-7 w-7 p-0 pointer-coarse:size-11\"\n (click)=\"closePanel()\"\n (keydown.enter)=\"closePanel()\"\n (keydown.space)=\"closePanel()\"\n [ariaLabel]=\"locale().ariaClose\"\n >\n <svg class=\"h-3.5 w-3.5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n <span class=\"sr-only\">{{ locale().close }}</span>\n </ui-button>\n </div>\n <ui-scroll-area [class]=\"'h-72 p-2'\">\n <div class=\"space-y-1 pr-2\" data-history-list=\"popover\">\n @for (entry of historyTimelineEntries(); track entry.index) {\n <div\n role=\"button\"\n tabindex=\"0\"\n class=\"w-full rounded-md border px-2 py-2 text-left transition-colors hover:bg-accent/60\"\n [class.bg-accent]=\"entry.active\"\n [class.border-primary/40]=\"entry.active\"\n [class.border-border]=\"!entry.active\"\n [attr.data-history-entry-action]=\"'true'\"\n [attr.data-history-entry-index]=\"entry.index\"\n [attr.aria-label]=\"interpolate(locale().ariaApply, { index: entry.index + 1 })\"\n (click)=\"onQuickApplyFromHistory(entry.index, $event)\"\n (keydown)=\"onHistoryEntryKeydown($event, entry.index)\"\n >\n <div class=\"flex items-center justify-between gap-2\">\n <span class=\"text-xs font-medium\">{{ interpolate(locale().revision, { index: entry.index + 1 }) }}</span>\n <div class=\"flex items-center gap-2\">\n @if (lastAppliedHistoryIndex() === entry.index) {\n <span class=\"text-[11px] text-primary/90 font-medium\">{{ locale().applied }}</span>\n }\n <span class=\"text-[11px] text-muted-foreground\">{{ entry.timestamp | date:'HH:mm:ss' }}</span>\n <ui-button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"h-6 px-2 text-[11px]\"\n (click)=\"openHistoryPreview(entry.index, $event)\"\n (keydown.enter)=\"openHistoryPreview(entry.index, $event)\"\n (keydown.space)=\"openHistoryPreview(entry.index, $event)\"\n >\n {{ locale().preview }}\n </ui-button>\n </div>\n </div>\n <div class=\"mt-1 space-y-0.5\">\n @for (line of entry.previewLines; track $index) {\n <p class=\"text-xs text-muted-foreground leading-4 truncate\">{{ line }}</p>\n }\n @if (entry.lineCount > entry.previewLines.length) {\n <p class=\"text-[11px] text-muted-foreground/80\">{{ interpolate(locale().moreLines, { count: entry.lineCount - entry.previewLines.length }) }}</p>\n }\n </div>\n </div>\n }\n </div>\n </ui-scroll-area>\n </ui-popover-content>\n </ui-popover>\n </div>\n}\n\n<ui-dialog [open]=\"historyPreviewOpen()\" (openChange)=\"historyPreviewOpen.set($event)\">\n <ui-dialog-content class=\"max-w-3xl p-0 overflow-hidden\">\n @if (selectedHistoryEntry(); as selected) {\n <ui-dialog-header class=\"px-5 pt-5 pb-3 border-b\">\n <ui-dialog-title>{{ interpolate(locale().revision, { index: selected.index + 1 }) }}</ui-dialog-title>\n <ui-dialog-description>\n {{ interpolate(locale().capturedAt, { time: (selected.timestamp | date:'MMM d, y, HH:mm:ss') ?? '' }) }}\n </ui-dialog-description>\n </ui-dialog-header>\n\n <ui-scroll-area [class]=\"'h-[70vh] px-5 py-4'\">\n <div class=\"space-y-4 pr-3\">\n <div class=\"rounded-md border bg-muted/20\">\n <div class=\"px-3 py-2 border-b text-xs font-medium text-muted-foreground\">{{ locale().renderedPreview }}</div>\n <div class=\"p-3 prose prose-sm dark:prose-invert max-w-none [&_*]:break-words\" [innerHTML]=\"previewHtml(selected.html)\"></div>\n </div>\n\n <div class=\"rounded-md border\">\n <div class=\"px-3 py-2 border-b text-xs font-medium text-muted-foreground\">{{ locale().markdownSnapshot }}</div>\n <pre class=\"p-3 text-xs whitespace-pre-wrap break-words\">{{ selected.markdown }}</pre>\n </div>\n </div>\n </ui-scroll-area>\n\n <ui-dialog-footer class=\"px-5 py-4 border-t\">\n <ui-button variant=\"outline\" (click)=\"closePreview()\" (keydown.enter)=\"closePreview()\" (keydown.space)=\"closePreview()\">{{ locale().cancel }}</ui-button>\n <ui-button (click)=\"restoreFromHistoryPreview()\" (keydown.enter)=\"restoreFromHistoryPreview()\" (keydown.space)=\"restoreFromHistoryPreview()\">{{ locale().restore }}</ui-button>\n </ui-dialog-footer>\n }\n </ui-dialog-content>\n</ui-dialog>\n\n<ui-dialog [open]=\"historyBrowserOpen()\" (openChange)=\"historyBrowserOpen.set($event)\">\n <ui-dialog-content class=\"max-w-xl p-0 overflow-hidden\">\n <ui-dialog-header class=\"px-5 pt-5 pb-3 border-b\">\n <ui-dialog-title>{{ locale().title }}</ui-dialog-title>\n <ui-dialog-description>{{ locale().browserDescription }}</ui-dialog-description>\n </ui-dialog-header>\n <ui-scroll-area [class]=\"'h-[60vh] px-4 py-3'\">\n <div class=\"space-y-2 pr-2\" data-history-list=\"dialog\">\n @for (entry of historyTimelineEntries(); track entry.index) {\n <div\n role=\"button\"\n tabindex=\"0\"\n class=\"w-full rounded-md border px-3 py-2 text-left transition-colors hover:bg-accent/60\"\n [class.bg-accent]=\"entry.active\"\n [class.border-primary/40]=\"entry.active\"\n [class.border-border]=\"!entry.active\"\n [attr.data-history-entry-action]=\"'true'\"\n [attr.data-history-entry-index]=\"entry.index\"\n [attr.aria-label]=\"interpolate(locale().ariaApply, { index: entry.index + 1 })\"\n (click)=\"onQuickApplyFromHistory(entry.index, $event)\"\n (keydown)=\"onHistoryEntryKeydown($event, entry.index)\"\n >\n <div class=\"flex items-center justify-between gap-2\">\n <span class=\"text-xs font-medium\">{{ interpolate(locale().revision, { index: entry.index + 1 }) }}</span>\n <div class=\"flex items-center gap-2\">\n @if (lastAppliedHistoryIndex() === entry.index) {\n <span class=\"text-[11px] text-primary/90 font-medium\">{{ locale().applied }}</span>\n }\n <span class=\"text-[11px] text-muted-foreground\">{{ entry.timestamp | date:'HH:mm:ss' }}</span>\n <ui-button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"h-6 px-2 text-[11px]\"\n (click)=\"openHistoryPreview(entry.index, $event)\"\n (keydown.enter)=\"openHistoryPreview(entry.index, $event)\"\n (keydown.space)=\"openHistoryPreview(entry.index, $event)\"\n >\n {{ locale().preview }}\n </ui-button>\n </div>\n </div>\n <div class=\"mt-1 space-y-0.5\">\n @for (line of entry.previewLines; track $index) {\n <p class=\"text-xs text-muted-foreground leading-4 truncate\">{{ line }}</p>\n }\n @if (entry.lineCount > entry.previewLines.length) {\n <p class=\"text-[11px] text-muted-foreground/80\">{{ interpolate(locale().moreLines, { count: entry.lineCount - entry.previewLines.length }) }}</p>\n }\n </div>\n </div>\n }\n </div>\n </ui-scroll-area>\n <ui-dialog-footer class=\"px-5 py-4 border-t\">\n <ui-button variant=\"outline\" (click)=\"closeBrowser()\" (keydown.enter)=\"closeBrowser()\" (keydown.space)=\"closeBrowser()\">{{ locale().close }}</ui-button>\n </ui-dialog-footer>\n </ui-dialog-content>\n</ui-dialog>\n" }]
33986
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], showButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showButton", required: false }] }], restore: [{ type: i0.Output, args: ["restore"] }] } });
33783
33987
 
33784
33988
  const HISTORY_SHORTCUT_ACTION = 'rich-text.history';
33785
33989
  /**
@@ -33904,11 +34108,13 @@ class RichTextImagesButtonComponent {
33904
34108
  this.showUrl = computed(() => this.context.sources() !== 'upload', ...(ngDevMode ? [{ debugName: "showUrl" }] : /* istanbul ignore next */ []));
33905
34109
  this.showUpload = computed(() => this.context.sources() !== 'url', ...(ngDevMode ? [{ debugName: "showUpload" }] : /* istanbul ignore next */ []));
33906
34110
  this.interactionDisabled = computed(() => this.host.isDisabled() || this.host.readonly(), ...(ngDevMode ? [{ debugName: "interactionDisabled" }] : /* istanbul ignore next */ []));
34111
+ /** Extra classes merged onto the toolbar button, after the built-in icon-button styling. */
34112
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
33907
34113
  this.buttonClasses = computed(() => cn('inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors', 'hover:bg-accent hover:text-accent-foreground', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', 'disabled:pointer-events-none disabled:opacity-50',
33908
34114
  // The global (pointer: coarse) floor targets `button:not([data-slot])`,
33909
34115
  // and these addon buttons carry a data-slot for testing — so they must
33910
34116
  // state the 44px touch minimum themselves rather than inherit it.
33911
- 'pointer-coarse:min-h-11 pointer-coarse:min-w-11', this.toolbarView?.compact() ? 'p-1' : 'p-1.5'), ...(ngDevMode ? [{ debugName: "buttonClasses" }] : /* istanbul ignore next */ []));
34117
+ 'pointer-coarse:min-h-11 pointer-coarse:min-w-11', this.toolbarView?.compact() ? 'p-1' : 'p-1.5', this.class()), ...(ngDevMode ? [{ debugName: "buttonClasses" }] : /* istanbul ignore next */ []));
33912
34118
  inject(DestroyRef).onDestroy(() => this.exclusive.release());
33913
34119
  }
33914
34120
  onOpenChange(next) {
@@ -33936,16 +34142,16 @@ class RichTextImagesButtonComponent {
33936
34142
  this.open.set(false);
33937
34143
  }
33938
34144
  onFileSelected(event) {
33939
- const input = event.target;
33940
- const file = input.files?.[0];
33941
- input.value = '';
34145
+ const fileInput = event.target;
34146
+ const file = fileInput.files?.[0];
34147
+ fileInput.value = '';
33942
34148
  if (this.interactionDisabled() || !file)
33943
34149
  return;
33944
34150
  this.context.onUploadFile(file);
33945
34151
  this.open.set(false);
33946
34152
  }
33947
34153
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextImagesButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
33948
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextImagesButtonComponent, isStandalone: true, selector: "ui-rte-images-button", host: { classAttribute: "contents" }, ngImport: i0, template: "<ui-popover [open]=\"open()\" [closeOnScroll]=\"true\" (openChange)=\"onOpenChange($event)\">\n <ui-popover-trigger>\n <button\n type=\"button\"\n data-slot=\"rte-images-button\"\n [class]=\"buttonClasses()\"\n [title]=\"locale().tooltip\"\n [attr.aria-label]=\"locale().tooltip\"\n [disabled]=\"interactionDisabled()\"\n >\n <span [innerHTML]=\"icon\"></span>\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-80 max-w-[calc(100vw-2rem)] p-4\" align=\"start\" strategy=\"fixed\">\n <div class=\"space-y-3\">\n @if (showUrl()) {\n <div>\n <label for=\"rte-image-src\" class=\"text-sm font-medium mb-1 block\">{{ locale().url }}</label>\n <input\n #imageSrc\n id=\"rte-image-src\"\n type=\"url\"\n data-slot=\"rte-images-url\"\n [placeholder]=\"locale().urlPlaceholder\"\n class=\"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n />\n </div>\n <div>\n <label for=\"rte-image-alt\" class=\"text-sm font-medium mb-1 block\">{{ locale().altText }}</label>\n <input\n #imageAlt\n id=\"rte-image-alt\"\n type=\"text\"\n data-slot=\"rte-images-alt\"\n [placeholder]=\"locale().altTextPlaceholder\"\n class=\"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n />\n </div>\n <ui-button\n size=\"sm\"\n class=\"w-full\"\n data-slot=\"rte-images-insert\"\n [disabled]=\"interactionDisabled()\"\n (click)=\"onInsertUrl(imageSrc, imageAlt)\"\n (keydown.enter)=\"onInsertUrl(imageSrc, imageAlt)\"\n (keydown.space)=\"onInsertUrl(imageSrc, imageAlt)\"\n >\n {{ locale().insert }}\n </ui-button>\n }\n @if (showUpload()) {\n <label\n class=\"flex h-9 w-full cursor-pointer items-center justify-center rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors hover:bg-accent\"\n [class.pointer-events-none]=\"interactionDisabled()\"\n [class.opacity-50]=\"interactionDisabled()\"\n >\n <span>{{ locale().tooltip }}</span>\n <input\n type=\"file\"\n accept=\"image/*\"\n class=\"sr-only\"\n data-slot=\"rte-images-file\"\n [disabled]=\"interactionDisabled()\"\n (change)=\"onFileSelected($event)\"\n />\n </label>\n }\n </div>\n </ui-popover-content>\n</ui-popover>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "ui-button", inputs: ["variant", "size", "disabled", "type", "class", "ariaLabel", "aria-expanded", "aria-pressed", "aria-haspopup", "aria-controls", "label", "ripple", "rippleColor", "loading", "skeleton"], outputs: ["clicked"] }, { kind: "component", type: PopoverComponent, selector: "ui-popover", inputs: ["open", "closeOnScroll"], outputs: ["openChange"] }, { kind: "component", type: PopoverTriggerComponent, selector: "ui-popover-trigger" }, { kind: "component", type: PopoverContentComponent, selector: "ui-popover-content", inputs: ["class", "align", "side", "sideOffset", "avoidCollisions", "restoreFocus", "strategy"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
34154
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextImagesButtonComponent, isStandalone: true, selector: "ui-rte-images-button", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: "<ui-popover [open]=\"open()\" [closeOnScroll]=\"true\" (openChange)=\"onOpenChange($event)\">\n <ui-popover-trigger>\n <button\n type=\"button\"\n data-slot=\"rte-images-button\"\n [class]=\"buttonClasses()\"\n [title]=\"locale().tooltip\"\n [attr.aria-label]=\"locale().tooltip\"\n [disabled]=\"interactionDisabled()\"\n >\n <span [innerHTML]=\"icon\"></span>\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-80 max-w-[calc(100vw-2rem)] p-4\" align=\"start\" strategy=\"fixed\">\n <div class=\"space-y-3\">\n @if (showUrl()) {\n <div>\n <label for=\"rte-image-src\" class=\"text-sm font-medium mb-1 block\">{{ locale().url }}</label>\n <input\n #imageSrc\n id=\"rte-image-src\"\n type=\"url\"\n data-slot=\"rte-images-url\"\n [placeholder]=\"locale().urlPlaceholder\"\n class=\"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n />\n </div>\n <div>\n <label for=\"rte-image-alt\" class=\"text-sm font-medium mb-1 block\">{{ locale().altText }}</label>\n <input\n #imageAlt\n id=\"rte-image-alt\"\n type=\"text\"\n data-slot=\"rte-images-alt\"\n [placeholder]=\"locale().altTextPlaceholder\"\n class=\"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n />\n </div>\n <ui-button\n size=\"sm\"\n class=\"w-full\"\n data-slot=\"rte-images-insert\"\n [disabled]=\"interactionDisabled()\"\n (click)=\"onInsertUrl(imageSrc, imageAlt)\"\n (keydown.enter)=\"onInsertUrl(imageSrc, imageAlt)\"\n (keydown.space)=\"onInsertUrl(imageSrc, imageAlt)\"\n >\n {{ locale().insert }}\n </ui-button>\n }\n @if (showUpload()) {\n <label\n class=\"flex h-9 w-full cursor-pointer items-center justify-center rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors hover:bg-accent\"\n [class.pointer-events-none]=\"interactionDisabled()\"\n [class.opacity-50]=\"interactionDisabled()\"\n >\n <span>{{ locale().tooltip }}</span>\n <input\n type=\"file\"\n accept=\"image/*\"\n class=\"sr-only\"\n data-slot=\"rte-images-file\"\n [disabled]=\"interactionDisabled()\"\n (change)=\"onFileSelected($event)\"\n />\n </label>\n }\n </div>\n </ui-popover-content>\n</ui-popover>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "ui-button", inputs: ["variant", "size", "disabled", "type", "class", "ariaLabel", "aria-expanded", "aria-pressed", "aria-haspopup", "aria-controls", "label", "ripple", "rippleColor", "loading", "skeleton"], outputs: ["clicked"] }, { kind: "component", type: PopoverComponent, selector: "ui-popover", inputs: ["class", "open", "closeOnScroll"], outputs: ["openChange"] }, { kind: "component", type: PopoverTriggerComponent, selector: "ui-popover-trigger", inputs: ["class"] }, { kind: "component", type: PopoverContentComponent, selector: "ui-popover-content", inputs: ["class", "align", "side", "sideOffset", "avoidCollisions", "restoreFocus", "strategy"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
33949
34155
  }
33950
34156
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextImagesButtonComponent, decorators: [{
33951
34157
  type: Component,
@@ -33955,7 +34161,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
33955
34161
  PopoverTriggerComponent,
33956
34162
  PopoverContentComponent,
33957
34163
  ], host: { class: 'contents' }, template: "<ui-popover [open]=\"open()\" [closeOnScroll]=\"true\" (openChange)=\"onOpenChange($event)\">\n <ui-popover-trigger>\n <button\n type=\"button\"\n data-slot=\"rte-images-button\"\n [class]=\"buttonClasses()\"\n [title]=\"locale().tooltip\"\n [attr.aria-label]=\"locale().tooltip\"\n [disabled]=\"interactionDisabled()\"\n >\n <span [innerHTML]=\"icon\"></span>\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-80 max-w-[calc(100vw-2rem)] p-4\" align=\"start\" strategy=\"fixed\">\n <div class=\"space-y-3\">\n @if (showUrl()) {\n <div>\n <label for=\"rte-image-src\" class=\"text-sm font-medium mb-1 block\">{{ locale().url }}</label>\n <input\n #imageSrc\n id=\"rte-image-src\"\n type=\"url\"\n data-slot=\"rte-images-url\"\n [placeholder]=\"locale().urlPlaceholder\"\n class=\"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n />\n </div>\n <div>\n <label for=\"rte-image-alt\" class=\"text-sm font-medium mb-1 block\">{{ locale().altText }}</label>\n <input\n #imageAlt\n id=\"rte-image-alt\"\n type=\"text\"\n data-slot=\"rte-images-alt\"\n [placeholder]=\"locale().altTextPlaceholder\"\n class=\"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n />\n </div>\n <ui-button\n size=\"sm\"\n class=\"w-full\"\n data-slot=\"rte-images-insert\"\n [disabled]=\"interactionDisabled()\"\n (click)=\"onInsertUrl(imageSrc, imageAlt)\"\n (keydown.enter)=\"onInsertUrl(imageSrc, imageAlt)\"\n (keydown.space)=\"onInsertUrl(imageSrc, imageAlt)\"\n >\n {{ locale().insert }}\n </ui-button>\n }\n @if (showUpload()) {\n <label\n class=\"flex h-9 w-full cursor-pointer items-center justify-center rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors hover:bg-accent\"\n [class.pointer-events-none]=\"interactionDisabled()\"\n [class.opacity-50]=\"interactionDisabled()\"\n >\n <span>{{ locale().tooltip }}</span>\n <input\n type=\"file\"\n accept=\"image/*\"\n class=\"sr-only\"\n data-slot=\"rte-images-file\"\n [disabled]=\"interactionDisabled()\"\n (change)=\"onFileSelected($event)\"\n />\n </label>\n }\n </div>\n </ui-popover-content>\n</ui-popover>\n" }]
33958
- }], ctorParameters: () => [] });
34164
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
33959
34165
 
33960
34166
  /**
33961
34167
  * Apply the inline styles for a given alignment to an image element. Shared by
@@ -34128,6 +34334,9 @@ const KEYBOARD_RESIZE_COALESCE_MS = 400;
34128
34334
  const MAX_IMAGE_DIMENSION = 10000;
34129
34335
  class RichTextImageResizerComponent {
34130
34336
  constructor() {
34337
+ /** Extra classes merged onto the selection frame drawn over the image, after its primary-coloured border. */
34338
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
34339
+ this.classes = computed(() => cn('absolute border-2 border-primary pointer-events-none transition-none', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
34131
34340
  this.document = inject(DOCUMENT);
34132
34341
  this.sanitizer = inject(DomSanitizer);
34133
34342
  /**
@@ -34552,12 +34761,12 @@ class RichTextImageResizerComponent {
34552
34761
  }
34553
34762
  }
34554
34763
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextImageResizerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
34555
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextImageResizerComponent, isStandalone: true, selector: "ui-rich-text-image-resizer", inputs: { target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, container: { classPropertyName: "container", publicName: "container", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, showAlignment: { classPropertyName: "showAlignment", publicName: "showAlignment", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, lockAspectRatio: { classPropertyName: "lockAspectRatio", publicName: "lockAspectRatio", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { resizeEnd: "resizeEnd", alignmentChange: "alignmentChange", imageRemove: "imageRemove" }, ngImport: i0, template: "@if (target()) {\n <div class=\"absolute border-2 border-primary pointer-events-none transition-none\"\n [style.top.px]=\"rect().top\"\n [style.left.px]=\"rect().left\"\n [style.width.px]=\"rect().width\"\n [style.height.px]=\"rect().height\"\n [style.display]=\"visible() ? 'block' : 'none'\">\n\n @if (resizable()) {\n <button type=\"button\"\n class=\"absolute -top-1.5 -left-1.5 w-3 h-3 bg-primary border border-white rounded-sm cursor-nw-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('nw')\"\n (keydown)=\"onResizeKeydown($event, 'nw')\"\n (mousedown)=\"startResize($event, 'nw')\" (touchstart)=\"startResize($event, 'nw')\"></button>\n <button type=\"button\"\n class=\"absolute -top-1.5 -right-1.5 w-3 h-3 bg-primary border border-white rounded-sm cursor-ne-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('ne')\"\n (keydown)=\"onResizeKeydown($event, 'ne')\"\n (mousedown)=\"startResize($event, 'ne')\" (touchstart)=\"startResize($event, 'ne')\"></button>\n <button type=\"button\"\n class=\"absolute -bottom-1.5 -left-1.5 w-3 h-3 bg-primary border border-white rounded-sm cursor-sw-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('sw')\"\n (keydown)=\"onResizeKeydown($event, 'sw')\"\n (mousedown)=\"startResize($event, 'sw')\" (touchstart)=\"startResize($event, 'sw')\"></button>\n <button type=\"button\"\n class=\"absolute -bottom-1.5 -right-1.5 w-3 h-3 bg-primary border border-white rounded-sm cursor-se-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('se')\"\n (keydown)=\"onResizeKeydown($event, 'se')\"\n (mousedown)=\"startResize($event, 'se')\" (touchstart)=\"startResize($event, 'se')\"></button>\n }\n\n @if (resizable() && !lockAspectRatio()) {\n <button type=\"button\"\n class=\"absolute -top-1.5 left-1/2 -translate-x-1/2 w-3 h-3 bg-primary border border-white rounded-sm cursor-ns-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('n')\"\n (keydown)=\"onResizeKeydown($event, 'n')\"\n (mousedown)=\"startResize($event, 'n')\" (touchstart)=\"startResize($event, 'n')\"></button>\n <button type=\"button\"\n class=\"absolute -bottom-1.5 left-1/2 -translate-x-1/2 w-3 h-3 bg-primary border border-white rounded-sm cursor-ns-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('s')\"\n (keydown)=\"onResizeKeydown($event, 's')\"\n (mousedown)=\"startResize($event, 's')\" (touchstart)=\"startResize($event, 's')\"></button>\n <button type=\"button\"\n class=\"absolute -left-1.5 top-1/2 -translate-y-1/2 w-3 h-3 bg-primary border border-white rounded-sm cursor-ew-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('w')\"\n (keydown)=\"onResizeKeydown($event, 'w')\"\n (mousedown)=\"startResize($event, 'w')\" (touchstart)=\"startResize($event, 'w')\"></button>\n <button type=\"button\"\n class=\"absolute -right-1.5 top-1/2 -translate-y-1/2 w-3 h-3 bg-primary border border-white rounded-sm cursor-ew-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('e')\"\n (keydown)=\"onResizeKeydown($event, 'e')\"\n (mousedown)=\"startResize($event, 'e')\" (touchstart)=\"startResize($event, 'e')\"></button>\n }\n\n <div class=\"absolute -top-10 left-1/2 -translate-x-1/2 pointer-events-auto flex items-center gap-0.5 bg-popover border rounded-md shadow-md p-0.5\">\n @if (showAlignment()) {\n @for (align of alignments; track align) {\n <button\n type=\"button\"\n class=\"p-1.5 rounded-sm hover:bg-accent transition-colors\"\n [class.bg-accent]=\"currentAlignment() === align\"\n [class.text-accent-foreground]=\"currentAlignment() === align\"\n [title]=\"resolvedAlignmentLabels()[align]\"\n (mousedown)=\"onAlignClick($event, align)\"\n (click)=\"onAlignClick($event, align)\"\n [attr.aria-label]=\"resolvedAlignmentLabels()[align]\"\n [attr.aria-pressed]=\"currentAlignment() === align\">\n <span [innerHTML]=\"getAlignIcon(align)\"></span>\n </button>\n }\n <div class=\"w-px h-5 bg-border mx-0.5\"></div>\n }\n <button\n type=\"button\"\n class=\"p-1.5 rounded-sm hover:bg-destructive/10 hover:text-destructive transition-colors\"\n [title]=\"labels().deleteImage\"\n (mousedown)=\"onDeleteClick($event)\"\n (click)=\"onDeleteClick($event)\"\n [attr.aria-label]=\"labels().deleteImage\">\n <span [innerHTML]=\"deleteIconHtml\"></span>\n </button>\n </div>\n </div>\n}\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
34764
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextImageResizerComponent, isStandalone: true, selector: "ui-rich-text-image-resizer", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, container: { classPropertyName: "container", publicName: "container", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, showAlignment: { classPropertyName: "showAlignment", publicName: "showAlignment", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, lockAspectRatio: { classPropertyName: "lockAspectRatio", publicName: "lockAspectRatio", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { resizeEnd: "resizeEnd", alignmentChange: "alignmentChange", imageRemove: "imageRemove" }, ngImport: i0, template: "@if (target()) {\n <div [class]=\"classes()\" [attr.data-slot]=\"'rte-image-resizer'\"\n [style.top.px]=\"rect().top\"\n [style.left.px]=\"rect().left\"\n [style.width.px]=\"rect().width\"\n [style.height.px]=\"rect().height\"\n [style.display]=\"visible() ? 'block' : 'none'\">\n\n @if (resizable()) {\n <button type=\"button\"\n class=\"absolute -top-1.5 -left-1.5 w-3 h-3 bg-primary border border-white rounded-sm cursor-nw-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('nw')\"\n (keydown)=\"onResizeKeydown($event, 'nw')\"\n (mousedown)=\"startResize($event, 'nw')\" (touchstart)=\"startResize($event, 'nw')\"></button>\n <button type=\"button\"\n class=\"absolute -top-1.5 -right-1.5 w-3 h-3 bg-primary border border-white rounded-sm cursor-ne-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('ne')\"\n (keydown)=\"onResizeKeydown($event, 'ne')\"\n (mousedown)=\"startResize($event, 'ne')\" (touchstart)=\"startResize($event, 'ne')\"></button>\n <button type=\"button\"\n class=\"absolute -bottom-1.5 -left-1.5 w-3 h-3 bg-primary border border-white rounded-sm cursor-sw-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('sw')\"\n (keydown)=\"onResizeKeydown($event, 'sw')\"\n (mousedown)=\"startResize($event, 'sw')\" (touchstart)=\"startResize($event, 'sw')\"></button>\n <button type=\"button\"\n class=\"absolute -bottom-1.5 -right-1.5 w-3 h-3 bg-primary border border-white rounded-sm cursor-se-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('se')\"\n (keydown)=\"onResizeKeydown($event, 'se')\"\n (mousedown)=\"startResize($event, 'se')\" (touchstart)=\"startResize($event, 'se')\"></button>\n }\n\n @if (resizable() && !lockAspectRatio()) {\n <button type=\"button\"\n class=\"absolute -top-1.5 left-1/2 -translate-x-1/2 w-3 h-3 bg-primary border border-white rounded-sm cursor-ns-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('n')\"\n (keydown)=\"onResizeKeydown($event, 'n')\"\n (mousedown)=\"startResize($event, 'n')\" (touchstart)=\"startResize($event, 'n')\"></button>\n <button type=\"button\"\n class=\"absolute -bottom-1.5 left-1/2 -translate-x-1/2 w-3 h-3 bg-primary border border-white rounded-sm cursor-ns-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('s')\"\n (keydown)=\"onResizeKeydown($event, 's')\"\n (mousedown)=\"startResize($event, 's')\" (touchstart)=\"startResize($event, 's')\"></button>\n <button type=\"button\"\n class=\"absolute -left-1.5 top-1/2 -translate-y-1/2 w-3 h-3 bg-primary border border-white rounded-sm cursor-ew-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('w')\"\n (keydown)=\"onResizeKeydown($event, 'w')\"\n (mousedown)=\"startResize($event, 'w')\" (touchstart)=\"startResize($event, 'w')\"></button>\n <button type=\"button\"\n class=\"absolute -right-1.5 top-1/2 -translate-y-1/2 w-3 h-3 bg-primary border border-white rounded-sm cursor-ew-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('e')\"\n (keydown)=\"onResizeKeydown($event, 'e')\"\n (mousedown)=\"startResize($event, 'e')\" (touchstart)=\"startResize($event, 'e')\"></button>\n }\n\n <div class=\"absolute -top-10 left-1/2 -translate-x-1/2 pointer-events-auto flex items-center gap-0.5 bg-popover border rounded-md shadow-md p-0.5\">\n @if (showAlignment()) {\n @for (align of alignments; track align) {\n <button\n type=\"button\"\n class=\"p-1.5 rounded-sm hover:bg-accent transition-colors\"\n [class.bg-accent]=\"currentAlignment() === align\"\n [class.text-accent-foreground]=\"currentAlignment() === align\"\n [title]=\"resolvedAlignmentLabels()[align]\"\n (mousedown)=\"onAlignClick($event, align)\"\n (click)=\"onAlignClick($event, align)\"\n [attr.aria-label]=\"resolvedAlignmentLabels()[align]\"\n [attr.aria-pressed]=\"currentAlignment() === align\">\n <span [innerHTML]=\"getAlignIcon(align)\"></span>\n </button>\n }\n <div class=\"w-px h-5 bg-border mx-0.5\"></div>\n }\n <button\n type=\"button\"\n class=\"p-1.5 rounded-sm hover:bg-destructive/10 hover:text-destructive transition-colors\"\n [title]=\"labels().deleteImage\"\n (mousedown)=\"onDeleteClick($event)\"\n (click)=\"onDeleteClick($event)\"\n [attr.aria-label]=\"labels().deleteImage\">\n <span [innerHTML]=\"deleteIconHtml\"></span>\n </button>\n </div>\n </div>\n}\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
34556
34765
  }
34557
34766
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextImageResizerComponent, decorators: [{
34558
34767
  type: Component,
34559
- args: [{ selector: 'ui-rich-text-image-resizer', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (target()) {\n <div class=\"absolute border-2 border-primary pointer-events-none transition-none\"\n [style.top.px]=\"rect().top\"\n [style.left.px]=\"rect().left\"\n [style.width.px]=\"rect().width\"\n [style.height.px]=\"rect().height\"\n [style.display]=\"visible() ? 'block' : 'none'\">\n\n @if (resizable()) {\n <button type=\"button\"\n class=\"absolute -top-1.5 -left-1.5 w-3 h-3 bg-primary border border-white rounded-sm cursor-nw-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('nw')\"\n (keydown)=\"onResizeKeydown($event, 'nw')\"\n (mousedown)=\"startResize($event, 'nw')\" (touchstart)=\"startResize($event, 'nw')\"></button>\n <button type=\"button\"\n class=\"absolute -top-1.5 -right-1.5 w-3 h-3 bg-primary border border-white rounded-sm cursor-ne-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('ne')\"\n (keydown)=\"onResizeKeydown($event, 'ne')\"\n (mousedown)=\"startResize($event, 'ne')\" (touchstart)=\"startResize($event, 'ne')\"></button>\n <button type=\"button\"\n class=\"absolute -bottom-1.5 -left-1.5 w-3 h-3 bg-primary border border-white rounded-sm cursor-sw-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('sw')\"\n (keydown)=\"onResizeKeydown($event, 'sw')\"\n (mousedown)=\"startResize($event, 'sw')\" (touchstart)=\"startResize($event, 'sw')\"></button>\n <button type=\"button\"\n class=\"absolute -bottom-1.5 -right-1.5 w-3 h-3 bg-primary border border-white rounded-sm cursor-se-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('se')\"\n (keydown)=\"onResizeKeydown($event, 'se')\"\n (mousedown)=\"startResize($event, 'se')\" (touchstart)=\"startResize($event, 'se')\"></button>\n }\n\n @if (resizable() && !lockAspectRatio()) {\n <button type=\"button\"\n class=\"absolute -top-1.5 left-1/2 -translate-x-1/2 w-3 h-3 bg-primary border border-white rounded-sm cursor-ns-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('n')\"\n (keydown)=\"onResizeKeydown($event, 'n')\"\n (mousedown)=\"startResize($event, 'n')\" (touchstart)=\"startResize($event, 'n')\"></button>\n <button type=\"button\"\n class=\"absolute -bottom-1.5 left-1/2 -translate-x-1/2 w-3 h-3 bg-primary border border-white rounded-sm cursor-ns-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('s')\"\n (keydown)=\"onResizeKeydown($event, 's')\"\n (mousedown)=\"startResize($event, 's')\" (touchstart)=\"startResize($event, 's')\"></button>\n <button type=\"button\"\n class=\"absolute -left-1.5 top-1/2 -translate-y-1/2 w-3 h-3 bg-primary border border-white rounded-sm cursor-ew-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('w')\"\n (keydown)=\"onResizeKeydown($event, 'w')\"\n (mousedown)=\"startResize($event, 'w')\" (touchstart)=\"startResize($event, 'w')\"></button>\n <button type=\"button\"\n class=\"absolute -right-1.5 top-1/2 -translate-y-1/2 w-3 h-3 bg-primary border border-white rounded-sm cursor-ew-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('e')\"\n (keydown)=\"onResizeKeydown($event, 'e')\"\n (mousedown)=\"startResize($event, 'e')\" (touchstart)=\"startResize($event, 'e')\"></button>\n }\n\n <div class=\"absolute -top-10 left-1/2 -translate-x-1/2 pointer-events-auto flex items-center gap-0.5 bg-popover border rounded-md shadow-md p-0.5\">\n @if (showAlignment()) {\n @for (align of alignments; track align) {\n <button\n type=\"button\"\n class=\"p-1.5 rounded-sm hover:bg-accent transition-colors\"\n [class.bg-accent]=\"currentAlignment() === align\"\n [class.text-accent-foreground]=\"currentAlignment() === align\"\n [title]=\"resolvedAlignmentLabels()[align]\"\n (mousedown)=\"onAlignClick($event, align)\"\n (click)=\"onAlignClick($event, align)\"\n [attr.aria-label]=\"resolvedAlignmentLabels()[align]\"\n [attr.aria-pressed]=\"currentAlignment() === align\">\n <span [innerHTML]=\"getAlignIcon(align)\"></span>\n </button>\n }\n <div class=\"w-px h-5 bg-border mx-0.5\"></div>\n }\n <button\n type=\"button\"\n class=\"p-1.5 rounded-sm hover:bg-destructive/10 hover:text-destructive transition-colors\"\n [title]=\"labels().deleteImage\"\n (mousedown)=\"onDeleteClick($event)\"\n (click)=\"onDeleteClick($event)\"\n [attr.aria-label]=\"labels().deleteImage\">\n <span [innerHTML]=\"deleteIconHtml\"></span>\n </button>\n </div>\n </div>\n}\n" }]
34560
- }], ctorParameters: () => [], propDecorators: { target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }], container: [{ type: i0.Input, args: [{ isSignal: true, alias: "container", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }], resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: false }] }], showAlignment: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAlignment", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], lockAspectRatio: [{ type: i0.Input, args: [{ isSignal: true, alias: "lockAspectRatio", required: false }] }], resizeEnd: [{ type: i0.Output, args: ["resizeEnd"] }], alignmentChange: [{ type: i0.Output, args: ["alignmentChange"] }], imageRemove: [{ type: i0.Output, args: ["imageRemove"] }] } });
34768
+ args: [{ selector: 'ui-rich-text-image-resizer', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (target()) {\n <div [class]=\"classes()\" [attr.data-slot]=\"'rte-image-resizer'\"\n [style.top.px]=\"rect().top\"\n [style.left.px]=\"rect().left\"\n [style.width.px]=\"rect().width\"\n [style.height.px]=\"rect().height\"\n [style.display]=\"visible() ? 'block' : 'none'\">\n\n @if (resizable()) {\n <button type=\"button\"\n class=\"absolute -top-1.5 -left-1.5 w-3 h-3 bg-primary border border-white rounded-sm cursor-nw-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('nw')\"\n (keydown)=\"onResizeKeydown($event, 'nw')\"\n (mousedown)=\"startResize($event, 'nw')\" (touchstart)=\"startResize($event, 'nw')\"></button>\n <button type=\"button\"\n class=\"absolute -top-1.5 -right-1.5 w-3 h-3 bg-primary border border-white rounded-sm cursor-ne-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('ne')\"\n (keydown)=\"onResizeKeydown($event, 'ne')\"\n (mousedown)=\"startResize($event, 'ne')\" (touchstart)=\"startResize($event, 'ne')\"></button>\n <button type=\"button\"\n class=\"absolute -bottom-1.5 -left-1.5 w-3 h-3 bg-primary border border-white rounded-sm cursor-sw-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('sw')\"\n (keydown)=\"onResizeKeydown($event, 'sw')\"\n (mousedown)=\"startResize($event, 'sw')\" (touchstart)=\"startResize($event, 'sw')\"></button>\n <button type=\"button\"\n class=\"absolute -bottom-1.5 -right-1.5 w-3 h-3 bg-primary border border-white rounded-sm cursor-se-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('se')\"\n (keydown)=\"onResizeKeydown($event, 'se')\"\n (mousedown)=\"startResize($event, 'se')\" (touchstart)=\"startResize($event, 'se')\"></button>\n }\n\n @if (resizable() && !lockAspectRatio()) {\n <button type=\"button\"\n class=\"absolute -top-1.5 left-1/2 -translate-x-1/2 w-3 h-3 bg-primary border border-white rounded-sm cursor-ns-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('n')\"\n (keydown)=\"onResizeKeydown($event, 'n')\"\n (mousedown)=\"startResize($event, 'n')\" (touchstart)=\"startResize($event, 'n')\"></button>\n <button type=\"button\"\n class=\"absolute -bottom-1.5 left-1/2 -translate-x-1/2 w-3 h-3 bg-primary border border-white rounded-sm cursor-ns-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('s')\"\n (keydown)=\"onResizeKeydown($event, 's')\"\n (mousedown)=\"startResize($event, 's')\" (touchstart)=\"startResize($event, 's')\"></button>\n <button type=\"button\"\n class=\"absolute -left-1.5 top-1/2 -translate-y-1/2 w-3 h-3 bg-primary border border-white rounded-sm cursor-ew-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('w')\"\n (keydown)=\"onResizeKeydown($event, 'w')\"\n (mousedown)=\"startResize($event, 'w')\" (touchstart)=\"startResize($event, 'w')\"></button>\n <button type=\"button\"\n class=\"absolute -right-1.5 top-1/2 -translate-y-1/2 w-3 h-3 bg-primary border border-white rounded-sm cursor-ew-resize pointer-events-auto shadow-sm touch-none before:absolute before:-inset-4 before:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n [attr.aria-label]=\"handleLabel('e')\"\n (keydown)=\"onResizeKeydown($event, 'e')\"\n (mousedown)=\"startResize($event, 'e')\" (touchstart)=\"startResize($event, 'e')\"></button>\n }\n\n <div class=\"absolute -top-10 left-1/2 -translate-x-1/2 pointer-events-auto flex items-center gap-0.5 bg-popover border rounded-md shadow-md p-0.5\">\n @if (showAlignment()) {\n @for (align of alignments; track align) {\n <button\n type=\"button\"\n class=\"p-1.5 rounded-sm hover:bg-accent transition-colors\"\n [class.bg-accent]=\"currentAlignment() === align\"\n [class.text-accent-foreground]=\"currentAlignment() === align\"\n [title]=\"resolvedAlignmentLabels()[align]\"\n (mousedown)=\"onAlignClick($event, align)\"\n (click)=\"onAlignClick($event, align)\"\n [attr.aria-label]=\"resolvedAlignmentLabels()[align]\"\n [attr.aria-pressed]=\"currentAlignment() === align\">\n <span [innerHTML]=\"getAlignIcon(align)\"></span>\n </button>\n }\n <div class=\"w-px h-5 bg-border mx-0.5\"></div>\n }\n <button\n type=\"button\"\n class=\"p-1.5 rounded-sm hover:bg-destructive/10 hover:text-destructive transition-colors\"\n [title]=\"labels().deleteImage\"\n (mousedown)=\"onDeleteClick($event)\"\n (click)=\"onDeleteClick($event)\"\n [attr.aria-label]=\"labels().deleteImage\">\n <span [innerHTML]=\"deleteIconHtml\"></span>\n </button>\n </div>\n </div>\n}\n" }]
34769
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }], container: [{ type: i0.Input, args: [{ isSignal: true, alias: "container", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }], resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: false }] }], showAlignment: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAlignment", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], lockAspectRatio: [{ type: i0.Input, args: [{ isSignal: true, alias: "lockAspectRatio", required: false }] }], resizeEnd: [{ type: i0.Output, args: ["resizeEnd"] }], alignmentChange: [{ type: i0.Output, args: ["alignmentChange"] }], imageRemove: [{ type: i0.Output, args: ["imageRemove"] }] } });
34561
34770
 
34562
34771
  /**
34563
34772
  * The images addon's editor-frame overlay layer: the resize/align handles for
@@ -34567,6 +34776,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
34567
34776
  */
34568
34777
  class RichTextImagesOverlayComponent {
34569
34778
  constructor() {
34779
+ /** Extra classes merged onto the full-editor uploading scrim, after its default blurred backdrop. */
34780
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
34781
+ this.uploadingClasses = computed(() => cn('absolute inset-0 z-20 flex items-center justify-center bg-background/70 backdrop-blur-[1px]', this.class()), ...(ngDevMode ? [{ debugName: "uploadingClasses" }] : /* istanbul ignore next */ []));
34570
34782
  /**
34571
34783
  * The currently selected image, forwarded to the resizer. `null` (the
34572
34784
  * default, and what the directive sends while the addon is disabled) hides
@@ -34634,12 +34846,12 @@ class RichTextImagesOverlayComponent {
34634
34846
  this.removeError = output();
34635
34847
  }
34636
34848
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextImagesOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
34637
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextImagesOverlayComponent, isStandalone: true, selector: "ui-rte-images-overlay", inputs: { target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, container: { classPropertyName: "container", publicName: "container", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: true, transformFunction: null }, resizerLabels: { classPropertyName: "resizerLabels", publicName: "resizerLabels", isSignal: true, isRequired: true, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, showAlignment: { classPropertyName: "showAlignment", publicName: "showAlignment", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, lockAspectRatio: { classPropertyName: "lockAspectRatio", publicName: "lockAspectRatio", isSignal: true, isRequired: false, transformFunction: null }, uploading: { classPropertyName: "uploading", publicName: "uploading", isSignal: true, isRequired: false, transformFunction: null }, errorEntries: { classPropertyName: "errorEntries", publicName: "errorEntries", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { resizeEnd: "resizeEnd", alignmentChange: "alignmentChange", imageRemove: "imageRemove", retryError: "retryError", removeError: "removeError" }, host: { classAttribute: "contents" }, ngImport: i0, template: "@if (uploading()) {\n <div class=\"absolute inset-0 z-20 flex items-center justify-center bg-background/70 backdrop-blur-[1px]\" data-slot=\"rte-images-uploading\">\n <div class=\"text-sm text-muted-foreground\">{{ locale().uploading }}</div>\n </div>\n}\n\n@for (entry of errorEntries(); track entry.id) {\n <div\n class=\"absolute z-20 flex flex-col items-center justify-center gap-1.5 rounded bg-destructive/10 border border-destructive/30 backdrop-blur-[1px]\"\n data-slot=\"rte-images-error\"\n [style.top.px]=\"entry.top\"\n [style.left.px]=\"entry.left\"\n [style.width.px]=\"entry.width\"\n [style.height.px]=\"entry.height\"\n contenteditable=\"false\"\n >\n <svg class=\"h-5 w-5 text-destructive\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z\" />\n </svg>\n <span class=\"text-xs text-destructive font-medium\">{{ locale().uploadFailed }}</span>\n <div class=\"flex gap-1\">\n <button\n type=\"button\"\n class=\"text-xs px-2 py-0.5 rounded bg-background border border-border text-foreground hover:bg-accent transition-colors\"\n (click)=\"retryError.emit(entry.id)\"\n >\n {{ locale().uploadRetry }}\n </button>\n <button\n type=\"button\"\n class=\"text-xs px-2 py-0.5 rounded bg-background border border-border text-foreground hover:bg-accent transition-colors\"\n (click)=\"removeError.emit(entry.id)\"\n >\n {{ locale().uploadRemove }}\n </button>\n </div>\n </div>\n}\n\n<ui-rich-text-image-resizer\n [target]=\"target()\"\n [container]=\"container()\"\n [labels]=\"resizerLabels()\"\n [resizable]=\"resizable()\"\n [showAlignment]=\"showAlignment()\"\n [minWidth]=\"minWidth()\"\n [maxWidth]=\"maxWidth()\"\n [lockAspectRatio]=\"lockAspectRatio()\"\n (resizeEnd)=\"resizeEnd.emit()\"\n (alignmentChange)=\"alignmentChange.emit($event)\"\n (imageRemove)=\"imageRemove.emit($event)\"\n/>\n", dependencies: [{ kind: "component", type: RichTextImageResizerComponent, selector: "ui-rich-text-image-resizer", inputs: ["target", "container", "labels", "resizable", "showAlignment", "minWidth", "maxWidth", "lockAspectRatio"], outputs: ["resizeEnd", "alignmentChange", "imageRemove"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
34849
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextImagesOverlayComponent, isStandalone: true, selector: "ui-rte-images-overlay", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, container: { classPropertyName: "container", publicName: "container", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: true, transformFunction: null }, resizerLabels: { classPropertyName: "resizerLabels", publicName: "resizerLabels", isSignal: true, isRequired: true, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, showAlignment: { classPropertyName: "showAlignment", publicName: "showAlignment", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, lockAspectRatio: { classPropertyName: "lockAspectRatio", publicName: "lockAspectRatio", isSignal: true, isRequired: false, transformFunction: null }, uploading: { classPropertyName: "uploading", publicName: "uploading", isSignal: true, isRequired: false, transformFunction: null }, errorEntries: { classPropertyName: "errorEntries", publicName: "errorEntries", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { resizeEnd: "resizeEnd", alignmentChange: "alignmentChange", imageRemove: "imageRemove", retryError: "retryError", removeError: "removeError" }, host: { classAttribute: "contents" }, ngImport: i0, template: "@if (uploading()) {\n <div [class]=\"uploadingClasses()\" data-slot=\"rte-images-uploading\">\n <div class=\"text-sm text-muted-foreground\">{{ locale().uploading }}</div>\n </div>\n}\n\n@for (entry of errorEntries(); track entry.id) {\n <div\n class=\"absolute z-20 flex flex-col items-center justify-center gap-1.5 rounded bg-destructive/10 border border-destructive/30 backdrop-blur-[1px]\"\n data-slot=\"rte-images-error\"\n [style.top.px]=\"entry.top\"\n [style.left.px]=\"entry.left\"\n [style.width.px]=\"entry.width\"\n [style.height.px]=\"entry.height\"\n contenteditable=\"false\"\n >\n <svg class=\"h-5 w-5 text-destructive\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z\" />\n </svg>\n <span class=\"text-xs text-destructive font-medium\">{{ locale().uploadFailed }}</span>\n <div class=\"flex gap-1\">\n <button\n type=\"button\"\n class=\"text-xs px-2 py-0.5 rounded bg-background border border-border text-foreground hover:bg-accent transition-colors\"\n (click)=\"retryError.emit(entry.id)\"\n >\n {{ locale().uploadRetry }}\n </button>\n <button\n type=\"button\"\n class=\"text-xs px-2 py-0.5 rounded bg-background border border-border text-foreground hover:bg-accent transition-colors\"\n (click)=\"removeError.emit(entry.id)\"\n >\n {{ locale().uploadRemove }}\n </button>\n </div>\n </div>\n}\n\n<ui-rich-text-image-resizer\n [target]=\"target()\"\n [container]=\"container()\"\n [labels]=\"resizerLabels()\"\n [resizable]=\"resizable()\"\n [showAlignment]=\"showAlignment()\"\n [minWidth]=\"minWidth()\"\n [maxWidth]=\"maxWidth()\"\n [lockAspectRatio]=\"lockAspectRatio()\"\n (resizeEnd)=\"resizeEnd.emit()\"\n (alignmentChange)=\"alignmentChange.emit($event)\"\n (imageRemove)=\"imageRemove.emit($event)\"\n/>\n", dependencies: [{ kind: "component", type: RichTextImageResizerComponent, selector: "ui-rich-text-image-resizer", inputs: ["class", "target", "container", "labels", "resizable", "showAlignment", "minWidth", "maxWidth", "lockAspectRatio"], outputs: ["resizeEnd", "alignmentChange", "imageRemove"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
34638
34850
  }
34639
34851
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextImagesOverlayComponent, decorators: [{
34640
34852
  type: Component,
34641
- args: [{ selector: 'ui-rte-images-overlay', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [RichTextImageResizerComponent], host: { class: 'contents' }, template: "@if (uploading()) {\n <div class=\"absolute inset-0 z-20 flex items-center justify-center bg-background/70 backdrop-blur-[1px]\" data-slot=\"rte-images-uploading\">\n <div class=\"text-sm text-muted-foreground\">{{ locale().uploading }}</div>\n </div>\n}\n\n@for (entry of errorEntries(); track entry.id) {\n <div\n class=\"absolute z-20 flex flex-col items-center justify-center gap-1.5 rounded bg-destructive/10 border border-destructive/30 backdrop-blur-[1px]\"\n data-slot=\"rte-images-error\"\n [style.top.px]=\"entry.top\"\n [style.left.px]=\"entry.left\"\n [style.width.px]=\"entry.width\"\n [style.height.px]=\"entry.height\"\n contenteditable=\"false\"\n >\n <svg class=\"h-5 w-5 text-destructive\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z\" />\n </svg>\n <span class=\"text-xs text-destructive font-medium\">{{ locale().uploadFailed }}</span>\n <div class=\"flex gap-1\">\n <button\n type=\"button\"\n class=\"text-xs px-2 py-0.5 rounded bg-background border border-border text-foreground hover:bg-accent transition-colors\"\n (click)=\"retryError.emit(entry.id)\"\n >\n {{ locale().uploadRetry }}\n </button>\n <button\n type=\"button\"\n class=\"text-xs px-2 py-0.5 rounded bg-background border border-border text-foreground hover:bg-accent transition-colors\"\n (click)=\"removeError.emit(entry.id)\"\n >\n {{ locale().uploadRemove }}\n </button>\n </div>\n </div>\n}\n\n<ui-rich-text-image-resizer\n [target]=\"target()\"\n [container]=\"container()\"\n [labels]=\"resizerLabels()\"\n [resizable]=\"resizable()\"\n [showAlignment]=\"showAlignment()\"\n [minWidth]=\"minWidth()\"\n [maxWidth]=\"maxWidth()\"\n [lockAspectRatio]=\"lockAspectRatio()\"\n (resizeEnd)=\"resizeEnd.emit()\"\n (alignmentChange)=\"alignmentChange.emit($event)\"\n (imageRemove)=\"imageRemove.emit($event)\"\n/>\n" }]
34642
- }], propDecorators: { target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }], container: [{ type: i0.Input, args: [{ isSignal: true, alias: "container", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: true }] }], resizerLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizerLabels", required: true }] }], resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: false }] }], showAlignment: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAlignment", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], lockAspectRatio: [{ type: i0.Input, args: [{ isSignal: true, alias: "lockAspectRatio", required: false }] }], uploading: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploading", required: false }] }], errorEntries: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorEntries", required: false }] }], resizeEnd: [{ type: i0.Output, args: ["resizeEnd"] }], alignmentChange: [{ type: i0.Output, args: ["alignmentChange"] }], imageRemove: [{ type: i0.Output, args: ["imageRemove"] }], retryError: [{ type: i0.Output, args: ["retryError"] }], removeError: [{ type: i0.Output, args: ["removeError"] }] } });
34853
+ args: [{ selector: 'ui-rte-images-overlay', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [RichTextImageResizerComponent], host: { class: 'contents' }, template: "@if (uploading()) {\n <div [class]=\"uploadingClasses()\" data-slot=\"rte-images-uploading\">\n <div class=\"text-sm text-muted-foreground\">{{ locale().uploading }}</div>\n </div>\n}\n\n@for (entry of errorEntries(); track entry.id) {\n <div\n class=\"absolute z-20 flex flex-col items-center justify-center gap-1.5 rounded bg-destructive/10 border border-destructive/30 backdrop-blur-[1px]\"\n data-slot=\"rte-images-error\"\n [style.top.px]=\"entry.top\"\n [style.left.px]=\"entry.left\"\n [style.width.px]=\"entry.width\"\n [style.height.px]=\"entry.height\"\n contenteditable=\"false\"\n >\n <svg class=\"h-5 w-5 text-destructive\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z\" />\n </svg>\n <span class=\"text-xs text-destructive font-medium\">{{ locale().uploadFailed }}</span>\n <div class=\"flex gap-1\">\n <button\n type=\"button\"\n class=\"text-xs px-2 py-0.5 rounded bg-background border border-border text-foreground hover:bg-accent transition-colors\"\n (click)=\"retryError.emit(entry.id)\"\n >\n {{ locale().uploadRetry }}\n </button>\n <button\n type=\"button\"\n class=\"text-xs px-2 py-0.5 rounded bg-background border border-border text-foreground hover:bg-accent transition-colors\"\n (click)=\"removeError.emit(entry.id)\"\n >\n {{ locale().uploadRemove }}\n </button>\n </div>\n </div>\n}\n\n<ui-rich-text-image-resizer\n [target]=\"target()\"\n [container]=\"container()\"\n [labels]=\"resizerLabels()\"\n [resizable]=\"resizable()\"\n [showAlignment]=\"showAlignment()\"\n [minWidth]=\"minWidth()\"\n [maxWidth]=\"maxWidth()\"\n [lockAspectRatio]=\"lockAspectRatio()\"\n (resizeEnd)=\"resizeEnd.emit()\"\n (alignmentChange)=\"alignmentChange.emit($event)\"\n (imageRemove)=\"imageRemove.emit($event)\"\n/>\n" }]
34854
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }], container: [{ type: i0.Input, args: [{ isSignal: true, alias: "container", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: true }] }], resizerLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizerLabels", required: true }] }], resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: false }] }], showAlignment: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAlignment", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], lockAspectRatio: [{ type: i0.Input, args: [{ isSignal: true, alias: "lockAspectRatio", required: false }] }], uploading: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploading", required: false }] }], errorEntries: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorEntries", required: false }] }], resizeEnd: [{ type: i0.Output, args: ["resizeEnd"] }], alignmentChange: [{ type: i0.Output, args: ["alignmentChange"] }], imageRemove: [{ type: i0.Output, args: ["imageRemove"] }], retryError: [{ type: i0.Output, args: ["retryError"] }], removeError: [{ type: i0.Output, args: ["removeError"] }] } });
34643
34855
 
34644
34856
  const IMAGE_SLOT_ID = 'images.insert';
34645
34857
  const AUTO_UPLOAD_STYLE_ID = 'ui-rte-auto-upload-styles';
@@ -35254,6 +35466,9 @@ const RICH_TEXT_LINKS_LOCALES = {
35254
35466
  */
35255
35467
  class RichTextLinksFormComponent {
35256
35468
  constructor() {
35469
+ /** Extra classes merged onto the form container, after its bounded `w-72` default. */
35470
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
35471
+ this.classes = computed(() => cn('w-72 max-w-[calc(100vw-2rem)] space-y-3', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
35257
35472
  /** Resolved locale strings. */
35258
35473
  this.locale = input(RICH_TEXT_LINKS_LOCALES['en'], ...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
35259
35474
  /**
@@ -35285,12 +35500,12 @@ class RichTextLinksFormComponent {
35285
35500
  this.submitLink.emit({ text: text.trim(), url: trimmedUrl });
35286
35501
  }
35287
35502
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextLinksFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
35288
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextLinksFormComponent, isStandalone: true, selector: "ui-rich-text-links-form", inputs: { locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, showRemove: { classPropertyName: "showRemove", publicName: "showRemove", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { submitLink: "submitLink", cancelLink: "cancelLink", removeLink: "removeLink" }, host: { classAttribute: "contents" }, ngImport: i0, template: "<div\n class=\"w-72 max-w-[calc(100vw-2rem)] space-y-3\"\n [attr.dir]=\"dir()\"\n [attr.data-slot]=\"'rich-text-links-form'\"\n>\n <p class=\"text-sm font-medium m-0\">{{ locale().tooltip }}</p>\n\n <label class=\"block space-y-1\">\n <span class=\"text-xs text-muted-foreground\">{{ locale().text }}</span>\n <input\n #linkText\n type=\"text\"\n [value]=\"text()\"\n [placeholder]=\"locale().textPlaceholder\"\n class=\"border-input bg-background flex h-9 w-full rounded-md border px-3 py-1 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n (keydown.enter)=\"onSubmit(linkText.value, linkUrl.value)\"\n />\n </label>\n\n <label class=\"block space-y-1\">\n <span class=\"text-xs text-muted-foreground\">{{ locale().url }}</span>\n <input\n #linkUrl\n type=\"url\"\n [value]=\"url()\"\n [placeholder]=\"locale().urlPlaceholder\"\n class=\"border-input bg-background flex h-9 w-full rounded-md border px-3 py-1 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n [attr.aria-invalid]=\"errorMessage() ? 'true' : null\"\n [attr.aria-describedby]=\"errorMessage() ? 'rte-link-url-error' : null\"\n (keydown.enter)=\"onSubmit(linkText.value, linkUrl.value)\"\n />\n </label>\n\n @if (errorMessage()) {\n <p id=\"rte-link-url-error\" role=\"alert\" class=\"text-destructive m-0 text-xs\">\n {{ errorMessage() }}\n </p>\n }\n\n <div class=\"flex flex-wrap justify-end gap-2 pt-1\">\n @if (showRemove()) {\n <ui-button variant=\"ghost\" size=\"sm\" (click)=\"removeLink.emit()\">{{ locale().remove }}</ui-button>\n }\n <ui-button variant=\"outline\" size=\"sm\" (click)=\"cancelLink.emit()\">{{ locale().cancel }}</ui-button>\n <ui-button size=\"sm\" (click)=\"onSubmit(linkText.value, linkUrl.value)\">\n {{ showRemove() ? locale().update : locale().insert }}\n </ui-button>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "ui-button", inputs: ["variant", "size", "disabled", "type", "class", "ariaLabel", "aria-expanded", "aria-pressed", "aria-haspopup", "aria-controls", "label", "ripple", "rippleColor", "loading", "skeleton"], outputs: ["clicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
35503
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextLinksFormComponent, isStandalone: true, selector: "ui-rich-text-links-form", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, showRemove: { classPropertyName: "showRemove", publicName: "showRemove", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { submitLink: "submitLink", cancelLink: "cancelLink", removeLink: "removeLink" }, host: { classAttribute: "contents" }, ngImport: i0, template: "<div\n [class]=\"classes()\"\n [attr.dir]=\"dir()\"\n [attr.data-slot]=\"'rich-text-links-form'\"\n>\n <p class=\"text-sm font-medium m-0\">{{ locale().tooltip }}</p>\n\n <label class=\"block space-y-1\">\n <span class=\"text-xs text-muted-foreground\">{{ locale().text }}</span>\n <input\n #linkText\n type=\"text\"\n [value]=\"text()\"\n [placeholder]=\"locale().textPlaceholder\"\n class=\"border-input bg-background flex h-9 w-full rounded-md border px-3 py-1 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n (keydown.enter)=\"onSubmit(linkText.value, linkUrl.value)\"\n />\n </label>\n\n <label class=\"block space-y-1\">\n <span class=\"text-xs text-muted-foreground\">{{ locale().url }}</span>\n <input\n #linkUrl\n type=\"url\"\n [value]=\"url()\"\n [placeholder]=\"locale().urlPlaceholder\"\n class=\"border-input bg-background flex h-9 w-full rounded-md border px-3 py-1 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n [attr.aria-invalid]=\"errorMessage() ? 'true' : null\"\n [attr.aria-describedby]=\"errorMessage() ? 'rte-link-url-error' : null\"\n (keydown.enter)=\"onSubmit(linkText.value, linkUrl.value)\"\n />\n </label>\n\n @if (errorMessage()) {\n <p id=\"rte-link-url-error\" role=\"alert\" class=\"text-destructive m-0 text-xs\">\n {{ errorMessage() }}\n </p>\n }\n\n <div class=\"flex flex-wrap justify-end gap-2 pt-1\">\n @if (showRemove()) {\n <ui-button variant=\"ghost\" size=\"sm\" (click)=\"removeLink.emit()\">{{ locale().remove }}</ui-button>\n }\n <ui-button variant=\"outline\" size=\"sm\" (click)=\"cancelLink.emit()\">{{ locale().cancel }}</ui-button>\n <ui-button size=\"sm\" (click)=\"onSubmit(linkText.value, linkUrl.value)\">\n {{ showRemove() ? locale().update : locale().insert }}\n </ui-button>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "ui-button", inputs: ["variant", "size", "disabled", "type", "class", "ariaLabel", "aria-expanded", "aria-pressed", "aria-haspopup", "aria-controls", "label", "ripple", "rippleColor", "loading", "skeleton"], outputs: ["clicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
35289
35504
  }
35290
35505
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextLinksFormComponent, decorators: [{
35291
35506
  type: Component,
35292
- args: [{ selector: 'ui-rich-text-links-form', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [ButtonComponent], host: { class: 'contents' }, template: "<div\n class=\"w-72 max-w-[calc(100vw-2rem)] space-y-3\"\n [attr.dir]=\"dir()\"\n [attr.data-slot]=\"'rich-text-links-form'\"\n>\n <p class=\"text-sm font-medium m-0\">{{ locale().tooltip }}</p>\n\n <label class=\"block space-y-1\">\n <span class=\"text-xs text-muted-foreground\">{{ locale().text }}</span>\n <input\n #linkText\n type=\"text\"\n [value]=\"text()\"\n [placeholder]=\"locale().textPlaceholder\"\n class=\"border-input bg-background flex h-9 w-full rounded-md border px-3 py-1 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n (keydown.enter)=\"onSubmit(linkText.value, linkUrl.value)\"\n />\n </label>\n\n <label class=\"block space-y-1\">\n <span class=\"text-xs text-muted-foreground\">{{ locale().url }}</span>\n <input\n #linkUrl\n type=\"url\"\n [value]=\"url()\"\n [placeholder]=\"locale().urlPlaceholder\"\n class=\"border-input bg-background flex h-9 w-full rounded-md border px-3 py-1 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n [attr.aria-invalid]=\"errorMessage() ? 'true' : null\"\n [attr.aria-describedby]=\"errorMessage() ? 'rte-link-url-error' : null\"\n (keydown.enter)=\"onSubmit(linkText.value, linkUrl.value)\"\n />\n </label>\n\n @if (errorMessage()) {\n <p id=\"rte-link-url-error\" role=\"alert\" class=\"text-destructive m-0 text-xs\">\n {{ errorMessage() }}\n </p>\n }\n\n <div class=\"flex flex-wrap justify-end gap-2 pt-1\">\n @if (showRemove()) {\n <ui-button variant=\"ghost\" size=\"sm\" (click)=\"removeLink.emit()\">{{ locale().remove }}</ui-button>\n }\n <ui-button variant=\"outline\" size=\"sm\" (click)=\"cancelLink.emit()\">{{ locale().cancel }}</ui-button>\n <ui-button size=\"sm\" (click)=\"onSubmit(linkText.value, linkUrl.value)\">\n {{ showRemove() ? locale().update : locale().insert }}\n </ui-button>\n </div>\n</div>\n" }]
35293
- }], propDecorators: { locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], url: [{ type: i0.Input, args: [{ isSignal: true, alias: "url", required: false }] }], showRemove: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRemove", required: false }] }], submitLink: [{ type: i0.Output, args: ["submitLink"] }], cancelLink: [{ type: i0.Output, args: ["cancelLink"] }], removeLink: [{ type: i0.Output, args: ["removeLink"] }] } });
35507
+ args: [{ selector: 'ui-rich-text-links-form', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [ButtonComponent], host: { class: 'contents' }, template: "<div\n [class]=\"classes()\"\n [attr.dir]=\"dir()\"\n [attr.data-slot]=\"'rich-text-links-form'\"\n>\n <p class=\"text-sm font-medium m-0\">{{ locale().tooltip }}</p>\n\n <label class=\"block space-y-1\">\n <span class=\"text-xs text-muted-foreground\">{{ locale().text }}</span>\n <input\n #linkText\n type=\"text\"\n [value]=\"text()\"\n [placeholder]=\"locale().textPlaceholder\"\n class=\"border-input bg-background flex h-9 w-full rounded-md border px-3 py-1 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n (keydown.enter)=\"onSubmit(linkText.value, linkUrl.value)\"\n />\n </label>\n\n <label class=\"block space-y-1\">\n <span class=\"text-xs text-muted-foreground\">{{ locale().url }}</span>\n <input\n #linkUrl\n type=\"url\"\n [value]=\"url()\"\n [placeholder]=\"locale().urlPlaceholder\"\n class=\"border-input bg-background flex h-9 w-full rounded-md border px-3 py-1 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n [attr.aria-invalid]=\"errorMessage() ? 'true' : null\"\n [attr.aria-describedby]=\"errorMessage() ? 'rte-link-url-error' : null\"\n (keydown.enter)=\"onSubmit(linkText.value, linkUrl.value)\"\n />\n </label>\n\n @if (errorMessage()) {\n <p id=\"rte-link-url-error\" role=\"alert\" class=\"text-destructive m-0 text-xs\">\n {{ errorMessage() }}\n </p>\n }\n\n <div class=\"flex flex-wrap justify-end gap-2 pt-1\">\n @if (showRemove()) {\n <ui-button variant=\"ghost\" size=\"sm\" (click)=\"removeLink.emit()\">{{ locale().remove }}</ui-button>\n }\n <ui-button variant=\"outline\" size=\"sm\" (click)=\"cancelLink.emit()\">{{ locale().cancel }}</ui-button>\n <ui-button size=\"sm\" (click)=\"onSubmit(linkText.value, linkUrl.value)\">\n {{ showRemove() ? locale().update : locale().insert }}\n </ui-button>\n </div>\n</div>\n" }]
35508
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], url: [{ type: i0.Input, args: [{ isSignal: true, alias: "url", required: false }] }], showRemove: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRemove", required: false }] }], submitLink: [{ type: i0.Output, args: ["submitLink"] }], cancelLink: [{ type: i0.Output, args: ["cancelLink"] }], removeLink: [{ type: i0.Output, args: ["removeLink"] }] } });
35294
35509
 
35295
35510
  const RICH_TEXT_LINKS_BUTTON_CONTEXT = new InjectionToken('RICH_TEXT_LINKS_BUTTON_CONTEXT');
35296
35511
 
@@ -35315,11 +35530,13 @@ class RichTextLinksButtonComponent {
35315
35530
  this.exclusive = this.host.registerExclusivePopover(() => this.open.set(false));
35316
35531
  this.icon = this.domSanitizer.bypassSecurityTrustHtml(LINK_ICON);
35317
35532
  this.interactionDisabled = computed(() => this.host.isDisabled() || this.host.readonly(), ...(ngDevMode ? [{ debugName: "interactionDisabled" }] : /* istanbul ignore next */ []));
35533
+ /** Extra classes merged onto the toolbar button, after the built-in icon-button styling. */
35534
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
35318
35535
  this.buttonClasses = computed(() => cn('inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors', 'hover:bg-accent hover:text-accent-foreground', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', 'disabled:pointer-events-none disabled:opacity-50',
35319
35536
  // The global (pointer: coarse) floor targets `button:not([data-slot])`,
35320
35537
  // and these addon buttons carry a data-slot for testing — so they must
35321
35538
  // state the 44px touch minimum themselves rather than inherit it.
35322
- 'pointer-coarse:min-h-11 pointer-coarse:min-w-11', this.toolbarView?.compact() ? 'p-1' : 'p-1.5'), ...(ngDevMode ? [{ debugName: "buttonClasses" }] : /* istanbul ignore next */ []));
35539
+ 'pointer-coarse:min-h-11 pointer-coarse:min-w-11', this.toolbarView?.compact() ? 'p-1' : 'p-1.5', this.class()), ...(ngDevMode ? [{ debugName: "buttonClasses" }] : /* istanbul ignore next */ []));
35323
35540
  inject(DestroyRef).onDestroy(() => this.exclusive.release());
35324
35541
  }
35325
35542
  onOpenChange(next) {
@@ -35343,7 +35560,7 @@ class RichTextLinksButtonComponent {
35343
35560
  this.open.set(false);
35344
35561
  }
35345
35562
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextLinksButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
35346
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: RichTextLinksButtonComponent, isStandalone: true, selector: "ui-rte-links-button", host: { classAttribute: "contents" }, ngImport: i0, template: "<ui-popover [open]=\"open()\" [closeOnScroll]=\"true\" (openChange)=\"onOpenChange($event)\">\n <ui-popover-trigger>\n <button\n type=\"button\"\n [class]=\"buttonClasses()\"\n [title]=\"context.locale().tooltip\"\n [attr.aria-label]=\"context.locale().tooltip\"\n [disabled]=\"interactionDisabled()\"\n >\n <span [innerHTML]=\"icon\"></span>\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-auto max-w-[calc(100vw-2rem)] p-3\" align=\"start\" strategy=\"fixed\">\n <ui-rich-text-links-form\n [locale]=\"context.locale()\"\n [text]=\"context.seededText()\"\n [url]=\"context.seededUrl()\"\n [showRemove]=\"context.editing()\"\n [errorMessage]=\"context.urlError()\"\n (submitLink)=\"onSubmit($event)\"\n (cancelLink)=\"open.set(false)\"\n (removeLink)=\"onRemove()\"\n />\n </ui-popover-content>\n</ui-popover>\n", dependencies: [{ kind: "component", type: PopoverComponent, selector: "ui-popover", inputs: ["open", "closeOnScroll"], outputs: ["openChange"] }, { kind: "component", type: PopoverTriggerComponent, selector: "ui-popover-trigger" }, { kind: "component", type: PopoverContentComponent, selector: "ui-popover-content", inputs: ["class", "align", "side", "sideOffset", "avoidCollisions", "restoreFocus", "strategy"] }, { kind: "component", type: RichTextLinksFormComponent, selector: "ui-rich-text-links-form", inputs: ["locale", "errorMessage", "text", "url", "showRemove"], outputs: ["submitLink", "cancelLink", "removeLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
35563
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: RichTextLinksButtonComponent, isStandalone: true, selector: "ui-rte-links-button", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-slot": "\"rte-links-host\"" }, classAttribute: "contents" }, ngImport: i0, template: "<ui-popover [open]=\"open()\" [closeOnScroll]=\"true\" (openChange)=\"onOpenChange($event)\">\n <ui-popover-trigger>\n <button\n type=\"button\"\n [class]=\"buttonClasses()\"\n [title]=\"context.locale().tooltip\"\n [attr.aria-label]=\"context.locale().tooltip\"\n [disabled]=\"interactionDisabled()\"\n >\n <span [innerHTML]=\"icon\"></span>\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-auto max-w-[calc(100vw-2rem)] p-3\" align=\"start\" strategy=\"fixed\">\n <ui-rich-text-links-form\n [locale]=\"context.locale()\"\n [text]=\"context.seededText()\"\n [url]=\"context.seededUrl()\"\n [showRemove]=\"context.editing()\"\n [errorMessage]=\"context.urlError()\"\n (submitLink)=\"onSubmit($event)\"\n (cancelLink)=\"open.set(false)\"\n (removeLink)=\"onRemove()\"\n />\n </ui-popover-content>\n</ui-popover>\n", dependencies: [{ kind: "component", type: PopoverComponent, selector: "ui-popover", inputs: ["class", "open", "closeOnScroll"], outputs: ["openChange"] }, { kind: "component", type: PopoverTriggerComponent, selector: "ui-popover-trigger", inputs: ["class"] }, { kind: "component", type: PopoverContentComponent, selector: "ui-popover-content", inputs: ["class", "align", "side", "sideOffset", "avoidCollisions", "restoreFocus", "strategy"] }, { kind: "component", type: RichTextLinksFormComponent, selector: "ui-rich-text-links-form", inputs: ["class", "locale", "errorMessage", "text", "url", "showRemove"], outputs: ["submitLink", "cancelLink", "removeLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
35347
35564
  }
35348
35565
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextLinksButtonComponent, decorators: [{
35349
35566
  type: Component,
@@ -35352,8 +35569,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
35352
35569
  PopoverTriggerComponent,
35353
35570
  PopoverContentComponent,
35354
35571
  RichTextLinksFormComponent,
35355
- ], host: { class: 'contents' }, template: "<ui-popover [open]=\"open()\" [closeOnScroll]=\"true\" (openChange)=\"onOpenChange($event)\">\n <ui-popover-trigger>\n <button\n type=\"button\"\n [class]=\"buttonClasses()\"\n [title]=\"context.locale().tooltip\"\n [attr.aria-label]=\"context.locale().tooltip\"\n [disabled]=\"interactionDisabled()\"\n >\n <span [innerHTML]=\"icon\"></span>\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-auto max-w-[calc(100vw-2rem)] p-3\" align=\"start\" strategy=\"fixed\">\n <ui-rich-text-links-form\n [locale]=\"context.locale()\"\n [text]=\"context.seededText()\"\n [url]=\"context.seededUrl()\"\n [showRemove]=\"context.editing()\"\n [errorMessage]=\"context.urlError()\"\n (submitLink)=\"onSubmit($event)\"\n (cancelLink)=\"open.set(false)\"\n (removeLink)=\"onRemove()\"\n />\n </ui-popover-content>\n</ui-popover>\n" }]
35356
- }], ctorParameters: () => [] });
35572
+ ], host: { class: 'contents', '[attr.data-slot]': '"rte-links-host"' }, template: "<ui-popover [open]=\"open()\" [closeOnScroll]=\"true\" (openChange)=\"onOpenChange($event)\">\n <ui-popover-trigger>\n <button\n type=\"button\"\n [class]=\"buttonClasses()\"\n [title]=\"context.locale().tooltip\"\n [attr.aria-label]=\"context.locale().tooltip\"\n [disabled]=\"interactionDisabled()\"\n >\n <span [innerHTML]=\"icon\"></span>\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-auto max-w-[calc(100vw-2rem)] p-3\" align=\"start\" strategy=\"fixed\">\n <ui-rich-text-links-form\n [locale]=\"context.locale()\"\n [text]=\"context.seededText()\"\n [url]=\"context.seededUrl()\"\n [showRemove]=\"context.editing()\"\n [errorMessage]=\"context.urlError()\"\n (submitLink)=\"onSubmit($event)\"\n (cancelLink)=\"open.set(false)\"\n (removeLink)=\"onRemove()\"\n />\n </ui-popover-content>\n</ui-popover>\n" }]
35573
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
35357
35574
 
35358
35575
  const LINK_SLOT_ID = 'links.insert';
35359
35576
  const OVERLAY_WIDTH = 320;
@@ -35815,6 +36032,8 @@ class RichTextMentionPopoverComponent {
35815
36032
  * Also selects the empty-state and `aria-label` strings from {@link locale}.
35816
36033
  */
35817
36034
  this.type = input('mention', ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
36035
+ /** Extra classes merged onto the floating list, after its bordered popover styling. */
36036
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
35818
36037
  /** Translated strings for the `aria-label` and the "no results" message. Defaults to English. */
35819
36038
  this.locale = input(RICH_TEXT_MENTIONS_LOCALES['en'], ...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
35820
36039
  /**
@@ -35870,7 +36089,7 @@ class RichTextMentionPopoverComponent {
35870
36089
  this.closed.emit();
35871
36090
  }
35872
36091
  };
35873
- this.containerClasses = computed(() => cn('absolute z-50 w-64 max-w-[calc(100vw-2rem)] rounded-md border bg-popover text-popover-foreground shadow-md', 'animate-in fade-in-0 zoom-in-95'), ...(ngDevMode ? [{ debugName: "containerClasses" }] : /* istanbul ignore next */ []));
36092
+ this.containerClasses = computed(() => cn('absolute z-50 w-64 max-w-[calc(100vw-2rem)] rounded-md border bg-popover text-popover-foreground shadow-md', 'animate-in fade-in-0 zoom-in-95', this.class()), ...(ngDevMode ? [{ debugName: "containerClasses" }] : /* istanbul ignore next */ []));
35874
36093
  effect(() => {
35875
36094
  const length = this.items().length;
35876
36095
  const currentIndex = this.selectedIndex();
@@ -35968,17 +36187,17 @@ class RichTextMentionPopoverComponent {
35968
36187
  return item;
35969
36188
  }
35970
36189
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextMentionPopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
35971
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextMentionPopoverComponent, isStandalone: true, selector: "ui-rich-text-mention-popover", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemSelect: "itemSelect", closed: "closed" }, host: { classAttribute: "contents" }, viewQueries: [{ propertyName: "itemButtons", predicate: ["itemButton"], descendants: true }], ngImport: i0, template: "<div\n [class]=\"containerClasses()\"\n [style.left.px]=\"position().x\"\n [style.top.px]=\"position().y\"\n role=\"listbox\"\n [id]=\"listboxId\"\n tabindex=\"-1\"\n [attr.aria-label]=\"type() === 'mention' ? locale().selectUser : locale().selectTag\"\n (keydown)=\"onKeydown($event)\"\n>\n @if (items().length === 0) {\n <div class=\"p-3 text-sm text-muted-foreground text-center\">\n @if (type() === 'mention') {\n {{ locale().noUsersFound }}\n } @else {\n {{ locale().noTagsFound }}\n }\n </div>\n } @else {\n <ui-scroll-area class=\"max-h-48\">\n <div class=\"p-1\">\n @for (item of items(); track item.value; let i = $index) {\n <button\n #itemButton\n type=\"button\"\n [class]=\"itemClasses(i)\"\n [attr.data-index]=\"i\"\n [id]=\"optionId(i)\"\n [attr.aria-selected]=\"i === selectedIndex()\"\n role=\"option\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onItemClick(item)\"\n (mouseenter)=\"selectedIndex.set(i)\"\n >\n @if (type() === 'mention') {\n <!-- Mention item with avatar -->\n <div class=\"flex items-center gap-2\">\n @if (asMention(item).avatar) {\n <img \n [src]=\"asMention(item).avatar\" \n [alt]=\"item.label\"\n class=\"w-6 h-6 rounded-full object-cover\"\n />\n } @else {\n <div class=\"w-6 h-6 rounded-full bg-accent flex items-center justify-center text-xs font-medium\">\n {{ item.label.charAt(0).toUpperCase() }}\n </div>\n }\n <div class=\"flex flex-col items-start\">\n <span class=\"text-sm font-medium\">{{ item.label }}</span>\n @if (asMention(item).description) {\n <span class=\"text-xs text-muted-foreground\">{{ asMention(item).description }}</span>\n }\n </div>\n </div>\n } @else {\n <!-- Tag item with color -->\n <div class=\"flex items-center gap-2\">\n <div \n class=\"w-3 h-3 rounded-full\"\n [style.background-color]=\"asTag(item).color || 'var(--accent)'\"\n ></div>\n <span class=\"text-sm\">{{ item.label }}</span>\n </div>\n }\n </button>\n }\n </div>\n </ui-scroll-area>\n }\n</div>", dependencies: [{ kind: "component", type: ScrollAreaComponent, selector: "ui-scroll-area", inputs: ["class", "orientation"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
36190
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextMentionPopoverComponent, isStandalone: true, selector: "ui-rich-text-mention-popover", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemSelect: "itemSelect", closed: "closed" }, host: { classAttribute: "contents" }, viewQueries: [{ propertyName: "itemButtons", predicate: ["itemButton"], descendants: true }], ngImport: i0, template: "<div\n [class]=\"containerClasses()\"\n [attr.data-slot]=\"'rich-text-mention-popover'\"\n [style.left.px]=\"position().x\"\n [style.top.px]=\"position().y\"\n role=\"listbox\"\n [id]=\"listboxId\"\n tabindex=\"-1\"\n [attr.aria-label]=\"type() === 'mention' ? locale().selectUser : locale().selectTag\"\n (keydown)=\"onKeydown($event)\"\n>\n @if (items().length === 0) {\n <div class=\"p-3 text-sm text-muted-foreground text-center\">\n @if (type() === 'mention') {\n {{ locale().noUsersFound }}\n } @else {\n {{ locale().noTagsFound }}\n }\n </div>\n } @else {\n <ui-scroll-area class=\"max-h-48\">\n <div class=\"p-1\">\n @for (item of items(); track item.value; let i = $index) {\n <button\n #itemButton\n type=\"button\"\n [class]=\"itemClasses(i)\"\n [attr.data-index]=\"i\"\n [id]=\"optionId(i)\"\n [attr.aria-selected]=\"i === selectedIndex()\"\n role=\"option\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onItemClick(item)\"\n (mouseenter)=\"selectedIndex.set(i)\"\n >\n @if (type() === 'mention') {\n <!-- Mention item with avatar -->\n <div class=\"flex items-center gap-2\">\n @if (asMention(item).avatar) {\n <img \n [src]=\"asMention(item).avatar\" \n [alt]=\"item.label\"\n class=\"w-6 h-6 rounded-full object-cover\"\n />\n } @else {\n <div class=\"w-6 h-6 rounded-full bg-accent flex items-center justify-center text-xs font-medium\">\n {{ item.label.charAt(0).toUpperCase() }}\n </div>\n }\n <div class=\"flex flex-col items-start\">\n <span class=\"text-sm font-medium\">{{ item.label }}</span>\n @if (asMention(item).description) {\n <span class=\"text-xs text-muted-foreground\">{{ asMention(item).description }}</span>\n }\n </div>\n </div>\n } @else {\n <!-- Tag item with color -->\n <div class=\"flex items-center gap-2\">\n <div \n class=\"w-3 h-3 rounded-full\"\n [style.background-color]=\"asTag(item).color || 'var(--accent)'\"\n ></div>\n <span class=\"text-sm\">{{ item.label }}</span>\n </div>\n }\n </button>\n }\n </div>\n </ui-scroll-area>\n }\n</div>", dependencies: [{ kind: "component", type: ScrollAreaComponent, selector: "ui-scroll-area", inputs: ["class", "orientation"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
35972
36191
  }
35973
36192
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextMentionPopoverComponent, decorators: [{
35974
36193
  type: Component,
35975
36194
  args: [{ selector: 'ui-rich-text-mention-popover', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ScrollAreaComponent], host: {
35976
36195
  class: 'contents',
35977
- }, template: "<div\n [class]=\"containerClasses()\"\n [style.left.px]=\"position().x\"\n [style.top.px]=\"position().y\"\n role=\"listbox\"\n [id]=\"listboxId\"\n tabindex=\"-1\"\n [attr.aria-label]=\"type() === 'mention' ? locale().selectUser : locale().selectTag\"\n (keydown)=\"onKeydown($event)\"\n>\n @if (items().length === 0) {\n <div class=\"p-3 text-sm text-muted-foreground text-center\">\n @if (type() === 'mention') {\n {{ locale().noUsersFound }}\n } @else {\n {{ locale().noTagsFound }}\n }\n </div>\n } @else {\n <ui-scroll-area class=\"max-h-48\">\n <div class=\"p-1\">\n @for (item of items(); track item.value; let i = $index) {\n <button\n #itemButton\n type=\"button\"\n [class]=\"itemClasses(i)\"\n [attr.data-index]=\"i\"\n [id]=\"optionId(i)\"\n [attr.aria-selected]=\"i === selectedIndex()\"\n role=\"option\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onItemClick(item)\"\n (mouseenter)=\"selectedIndex.set(i)\"\n >\n @if (type() === 'mention') {\n <!-- Mention item with avatar -->\n <div class=\"flex items-center gap-2\">\n @if (asMention(item).avatar) {\n <img \n [src]=\"asMention(item).avatar\" \n [alt]=\"item.label\"\n class=\"w-6 h-6 rounded-full object-cover\"\n />\n } @else {\n <div class=\"w-6 h-6 rounded-full bg-accent flex items-center justify-center text-xs font-medium\">\n {{ item.label.charAt(0).toUpperCase() }}\n </div>\n }\n <div class=\"flex flex-col items-start\">\n <span class=\"text-sm font-medium\">{{ item.label }}</span>\n @if (asMention(item).description) {\n <span class=\"text-xs text-muted-foreground\">{{ asMention(item).description }}</span>\n }\n </div>\n </div>\n } @else {\n <!-- Tag item with color -->\n <div class=\"flex items-center gap-2\">\n <div \n class=\"w-3 h-3 rounded-full\"\n [style.background-color]=\"asTag(item).color || 'var(--accent)'\"\n ></div>\n <span class=\"text-sm\">{{ item.label }}</span>\n </div>\n }\n </button>\n }\n </div>\n </ui-scroll-area>\n }\n</div>" }]
36196
+ }, template: "<div\n [class]=\"containerClasses()\"\n [attr.data-slot]=\"'rich-text-mention-popover'\"\n [style.left.px]=\"position().x\"\n [style.top.px]=\"position().y\"\n role=\"listbox\"\n [id]=\"listboxId\"\n tabindex=\"-1\"\n [attr.aria-label]=\"type() === 'mention' ? locale().selectUser : locale().selectTag\"\n (keydown)=\"onKeydown($event)\"\n>\n @if (items().length === 0) {\n <div class=\"p-3 text-sm text-muted-foreground text-center\">\n @if (type() === 'mention') {\n {{ locale().noUsersFound }}\n } @else {\n {{ locale().noTagsFound }}\n }\n </div>\n } @else {\n <ui-scroll-area class=\"max-h-48\">\n <div class=\"p-1\">\n @for (item of items(); track item.value; let i = $index) {\n <button\n #itemButton\n type=\"button\"\n [class]=\"itemClasses(i)\"\n [attr.data-index]=\"i\"\n [id]=\"optionId(i)\"\n [attr.aria-selected]=\"i === selectedIndex()\"\n role=\"option\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onItemClick(item)\"\n (mouseenter)=\"selectedIndex.set(i)\"\n >\n @if (type() === 'mention') {\n <!-- Mention item with avatar -->\n <div class=\"flex items-center gap-2\">\n @if (asMention(item).avatar) {\n <img \n [src]=\"asMention(item).avatar\" \n [alt]=\"item.label\"\n class=\"w-6 h-6 rounded-full object-cover\"\n />\n } @else {\n <div class=\"w-6 h-6 rounded-full bg-accent flex items-center justify-center text-xs font-medium\">\n {{ item.label.charAt(0).toUpperCase() }}\n </div>\n }\n <div class=\"flex flex-col items-start\">\n <span class=\"text-sm font-medium\">{{ item.label }}</span>\n @if (asMention(item).description) {\n <span class=\"text-xs text-muted-foreground\">{{ asMention(item).description }}</span>\n }\n </div>\n </div>\n } @else {\n <!-- Tag item with color -->\n <div class=\"flex items-center gap-2\">\n <div \n class=\"w-3 h-3 rounded-full\"\n [style.background-color]=\"asTag(item).color || 'var(--accent)'\"\n ></div>\n <span class=\"text-sm\">{{ item.label }}</span>\n </div>\n }\n </button>\n }\n </div>\n </ui-scroll-area>\n }\n</div>" }]
35978
36197
  }], ctorParameters: () => [], propDecorators: { itemButtons: [{
35979
36198
  type: ViewChildren,
35980
36199
  args: ['itemButton']
35981
- }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], query: [{ type: i0.Input, args: [{ isSignal: true, alias: "query", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], itemSelect: [{ type: i0.Output, args: ["itemSelect"] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
36200
+ }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], query: [{ type: i0.Input, args: [{ isSignal: true, alias: "query", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], itemSelect: [{ type: i0.Output, args: ["itemSelect"] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
35982
36201
 
35983
36202
  /**
35984
36203
  * Where the caret is, for features that must stay quiet in some contexts.
@@ -36049,7 +36268,7 @@ function resolveEntityTemplate(template, context) {
36049
36268
  query: context.query, type: context.type, userId: context.userId, tagId: context.tagId,
36050
36269
  };
36051
36270
  return template
36052
- .replaceAll(/@@([a-zA-Z0-9_-]+)@@/g, (_m, token) => values[token] ?? '')
36271
+ .replaceAll(/@@([a-zA-Z0-9_-]+)@@/g, (...[, token]) => values[token] ?? '')
36053
36272
  .replaceAll(/:([a-zA-Z][a-zA-Z0-9_-]*)/g, (match, token) => values[token] ?? match);
36054
36273
  }
36055
36274
  function resolveEntityText(context, options) {
@@ -36191,7 +36410,6 @@ class RichTextMentionsDirective {
36191
36410
  this.sanitizer = inject(RichTextSanitizerService);
36192
36411
  this.injector = inject(Injector);
36193
36412
  this.vcr = inject(ViewContainerRef);
36194
- this.document = inject(DOCUMENT);
36195
36413
  /** Locale for the popover UI: a registry key (`'en'`/`'he'`/…) or a full dictionary. */
36196
36414
  this.uiRteMentionsLocale = input(...(ngDevMode ? [undefined, { debugName: "uiRteMentionsLocale" }] : /* istanbul ignore next */ []));
36197
36415
  /** Enable the `@mention` trigger (the bare `uiRteMentions` attribute). */
@@ -36439,6 +36657,9 @@ let outlinePanelInstances = 0;
36439
36657
  class RichTextOutlinePanelComponent {
36440
36658
  constructor() {
36441
36659
  this.ctx = inject(RICH_TEXT_OUTLINE_CONTEXT);
36660
+ /** Extra classes merged onto the docked panel, after its start-edge positioning and width steps. */
36661
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
36662
+ this.classes = computed(() => cn('absolute top-0 bottom-0 z-20 w-full md:w-64 lg:w-80 max-w-full md:max-w-[calc(100vw-2rem)] overflow-y-auto bg-popover ltr:left-0 ltr:border-r rtl:right-0 rtl:border-l', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
36442
36663
  /**
36443
36664
  * Id wiring the panel's `aria-labelledby` to its visible heading. Counted
36444
36665
  * per instance so two editors on one page do not both claim the same id,
@@ -36448,12 +36669,12 @@ class RichTextOutlinePanelComponent {
36448
36669
  this.titleId = `rte-outline-title-${++outlinePanelInstances}`;
36449
36670
  }
36450
36671
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextOutlinePanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
36451
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextOutlinePanelComponent, isStandalone: true, selector: "ui-rte-outline-panel", host: { classAttribute: "contents" }, ngImport: i0, template: "@if (ctx.isOpen()) {\n <!--\n A <nav> with an accessible name, not a bare div: this is a jump-to-section\n landmark, so screen-reader users can reach it from the landmark rotor and\n hear what it is. The name comes from the visible title via aria-labelledby,\n which keeps the two from drifting apart across locales.\n -->\n <nav\n [attr.aria-labelledby]=\"titleId\"\n class=\"absolute top-0 bottom-0 z-20 w-full md:w-64 lg:w-80 max-w-full md:max-w-[calc(100vw-2rem)] overflow-y-auto bg-popover ltr:left-0 ltr:border-r rtl:right-0 rtl:border-l\"\n [attr.data-slot]=\"'rich-text-outline-panel'\"\n >\n <div class=\"flex items-center justify-between border-b px-3 py-2\">\n <h2 [attr.id]=\"titleId\" class=\"text-sm font-medium\">{{ ctx.locale().title }}</h2>\n <ui-button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"h-7 w-7 p-0 pointer-coarse:size-11\"\n (click)=\"ctx.close()\"\n (keydown.enter)=\"ctx.close()\"\n (keydown.space)=\"ctx.close()\"\n [ariaLabel]=\"ctx.locale().ariaClose\"\n >\n <svg class=\"h-3.5 w-3.5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n </ui-button>\n </div>\n <ui-scroll-area [class]=\"'max-h-72 p-3'\">\n @if (ctx.headings().length === 0) {\n <p class=\"px-2 py-3 text-xs text-muted-foreground\" data-slot=\"rich-text-outline-empty\">\n {{ ctx.locale().empty }}\n </p>\n } @else {\n <ol class=\"space-y-0.5 pr-2\" data-slot=\"rich-text-outline-list\">\n @for (heading of ctx.headings(); track heading.index) {\n <li>\n <button\n type=\"button\"\n class=\"block w-full cursor-pointer truncate rounded-md px-2 py-1.5 text-start text-sm transition-colors hover:bg-accent/60\"\n [attr.data-outline-entry]=\"'true'\"\n [attr.data-outline-level]=\"heading.level\"\n [style.padding-inline-start.rem]=\"0.5 + (heading.level - 1) * 0.75\"\n (click)=\"ctx.scrollTo(heading.index)\"\n (keydown)=\"ctx.onEntryKeydown($event, heading.index)\"\n >\n {{ heading.text }}\n </button>\n </li>\n }\n </ol>\n }\n </ui-scroll-area>\n </nav>\n}\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "ui-button", inputs: ["variant", "size", "disabled", "type", "class", "ariaLabel", "aria-expanded", "aria-pressed", "aria-haspopup", "aria-controls", "label", "ripple", "rippleColor", "loading", "skeleton"], outputs: ["clicked"] }, { kind: "component", type: ScrollAreaComponent, selector: "ui-scroll-area", inputs: ["class", "orientation"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
36672
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextOutlinePanelComponent, isStandalone: true, selector: "ui-rte-outline-panel", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: "@if (ctx.isOpen()) {\n <!--\n A <nav> with an accessible name, not a bare div: this is a jump-to-section\n landmark, so screen-reader users can reach it from the landmark rotor and\n hear what it is. The name comes from the visible title via aria-labelledby,\n which keeps the two from drifting apart across locales.\n -->\n <nav\n [attr.aria-labelledby]=\"titleId\"\n [class]=\"classes()\"\n [attr.data-slot]=\"'rich-text-outline-panel'\"\n >\n <div class=\"flex items-center justify-between border-b px-3 py-2\">\n <h2 [attr.id]=\"titleId\" class=\"text-sm font-medium\">{{ ctx.locale().title }}</h2>\n <ui-button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"h-7 w-7 p-0 pointer-coarse:size-11\"\n (click)=\"ctx.close()\"\n (keydown.enter)=\"ctx.close()\"\n (keydown.space)=\"ctx.close()\"\n [ariaLabel]=\"ctx.locale().ariaClose\"\n >\n <svg class=\"h-3.5 w-3.5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n </ui-button>\n </div>\n <ui-scroll-area [class]=\"'max-h-72 p-3'\">\n @if (ctx.headings().length === 0) {\n <p class=\"px-2 py-3 text-xs text-muted-foreground\" data-slot=\"rich-text-outline-empty\">\n {{ ctx.locale().empty }}\n </p>\n } @else {\n <ol class=\"space-y-0.5 pr-2\" data-slot=\"rich-text-outline-list\">\n @for (heading of ctx.headings(); track heading.index) {\n <li>\n <button\n type=\"button\"\n class=\"block w-full cursor-pointer truncate rounded-md px-2 py-1.5 text-start text-sm transition-colors hover:bg-accent/60\"\n [attr.data-outline-entry]=\"'true'\"\n [attr.data-outline-level]=\"heading.level\"\n [style.padding-inline-start.rem]=\"0.5 + (heading.level - 1) * 0.75\"\n (click)=\"ctx.scrollTo(heading.index)\"\n (keydown)=\"ctx.onEntryKeydown($event, heading.index)\"\n >\n {{ heading.text }}\n </button>\n </li>\n }\n </ol>\n }\n </ui-scroll-area>\n </nav>\n}\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "ui-button", inputs: ["variant", "size", "disabled", "type", "class", "ariaLabel", "aria-expanded", "aria-pressed", "aria-haspopup", "aria-controls", "label", "ripple", "rippleColor", "loading", "skeleton"], outputs: ["clicked"] }, { kind: "component", type: ScrollAreaComponent, selector: "ui-scroll-area", inputs: ["class", "orientation"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
36452
36673
  }
36453
36674
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextOutlinePanelComponent, decorators: [{
36454
36675
  type: Component,
36455
- args: [{ selector: 'ui-rte-outline-panel', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [ButtonComponent, ScrollAreaComponent], host: { class: 'contents' }, template: "@if (ctx.isOpen()) {\n <!--\n A <nav> with an accessible name, not a bare div: this is a jump-to-section\n landmark, so screen-reader users can reach it from the landmark rotor and\n hear what it is. The name comes from the visible title via aria-labelledby,\n which keeps the two from drifting apart across locales.\n -->\n <nav\n [attr.aria-labelledby]=\"titleId\"\n class=\"absolute top-0 bottom-0 z-20 w-full md:w-64 lg:w-80 max-w-full md:max-w-[calc(100vw-2rem)] overflow-y-auto bg-popover ltr:left-0 ltr:border-r rtl:right-0 rtl:border-l\"\n [attr.data-slot]=\"'rich-text-outline-panel'\"\n >\n <div class=\"flex items-center justify-between border-b px-3 py-2\">\n <h2 [attr.id]=\"titleId\" class=\"text-sm font-medium\">{{ ctx.locale().title }}</h2>\n <ui-button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"h-7 w-7 p-0 pointer-coarse:size-11\"\n (click)=\"ctx.close()\"\n (keydown.enter)=\"ctx.close()\"\n (keydown.space)=\"ctx.close()\"\n [ariaLabel]=\"ctx.locale().ariaClose\"\n >\n <svg class=\"h-3.5 w-3.5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n </ui-button>\n </div>\n <ui-scroll-area [class]=\"'max-h-72 p-3'\">\n @if (ctx.headings().length === 0) {\n <p class=\"px-2 py-3 text-xs text-muted-foreground\" data-slot=\"rich-text-outline-empty\">\n {{ ctx.locale().empty }}\n </p>\n } @else {\n <ol class=\"space-y-0.5 pr-2\" data-slot=\"rich-text-outline-list\">\n @for (heading of ctx.headings(); track heading.index) {\n <li>\n <button\n type=\"button\"\n class=\"block w-full cursor-pointer truncate rounded-md px-2 py-1.5 text-start text-sm transition-colors hover:bg-accent/60\"\n [attr.data-outline-entry]=\"'true'\"\n [attr.data-outline-level]=\"heading.level\"\n [style.padding-inline-start.rem]=\"0.5 + (heading.level - 1) * 0.75\"\n (click)=\"ctx.scrollTo(heading.index)\"\n (keydown)=\"ctx.onEntryKeydown($event, heading.index)\"\n >\n {{ heading.text }}\n </button>\n </li>\n }\n </ol>\n }\n </ui-scroll-area>\n </nav>\n}\n" }]
36456
- }] });
36676
+ args: [{ selector: 'ui-rte-outline-panel', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [ButtonComponent, ScrollAreaComponent], host: { class: 'contents' }, template: "@if (ctx.isOpen()) {\n <!--\n A <nav> with an accessible name, not a bare div: this is a jump-to-section\n landmark, so screen-reader users can reach it from the landmark rotor and\n hear what it is. The name comes from the visible title via aria-labelledby,\n which keeps the two from drifting apart across locales.\n -->\n <nav\n [attr.aria-labelledby]=\"titleId\"\n [class]=\"classes()\"\n [attr.data-slot]=\"'rich-text-outline-panel'\"\n >\n <div class=\"flex items-center justify-between border-b px-3 py-2\">\n <h2 [attr.id]=\"titleId\" class=\"text-sm font-medium\">{{ ctx.locale().title }}</h2>\n <ui-button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"h-7 w-7 p-0 pointer-coarse:size-11\"\n (click)=\"ctx.close()\"\n (keydown.enter)=\"ctx.close()\"\n (keydown.space)=\"ctx.close()\"\n [ariaLabel]=\"ctx.locale().ariaClose\"\n >\n <svg class=\"h-3.5 w-3.5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n </ui-button>\n </div>\n <ui-scroll-area [class]=\"'max-h-72 p-3'\">\n @if (ctx.headings().length === 0) {\n <p class=\"px-2 py-3 text-xs text-muted-foreground\" data-slot=\"rich-text-outline-empty\">\n {{ ctx.locale().empty }}\n </p>\n } @else {\n <ol class=\"space-y-0.5 pr-2\" data-slot=\"rich-text-outline-list\">\n @for (heading of ctx.headings(); track heading.index) {\n <li>\n <button\n type=\"button\"\n class=\"block w-full cursor-pointer truncate rounded-md px-2 py-1.5 text-start text-sm transition-colors hover:bg-accent/60\"\n [attr.data-outline-entry]=\"'true'\"\n [attr.data-outline-level]=\"heading.level\"\n [style.padding-inline-start.rem]=\"0.5 + (heading.level - 1) * 0.75\"\n (click)=\"ctx.scrollTo(heading.index)\"\n (keydown)=\"ctx.onEntryKeydown($event, heading.index)\"\n >\n {{ heading.text }}\n </button>\n </li>\n }\n </ol>\n }\n </ui-scroll-area>\n </nav>\n}\n" }]
36677
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
36457
36678
 
36458
36679
  /** Built-in locales for the document-outline addon. */
36459
36680
  const RICH_TEXT_OUTLINE_LOCALES = {
@@ -36781,6 +37002,9 @@ class RichTextSlashCommandsMenuComponent {
36781
37002
  return `${this.listboxId}-option-${index}`;
36782
37003
  }
36783
37004
  constructor() {
37005
+ /** Extra classes merged onto the menu host, after its bordered popover styling. */
37006
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
37007
+ this.classes = computed(() => cn('block w-72 max-w-[calc(100vw-2rem)] rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
36784
37008
  /**
36785
37009
  * Stable ids so the editable can point `aria-controls` and
36786
37010
  * `aria-activedescendant` here. Focus stays in the editable while the menu is
@@ -36830,7 +37054,7 @@ class RichTextSlashCommandsMenuComponent {
36830
37054
  }
36831
37055
  }
36832
37056
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextSlashCommandsMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
36833
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextSlashCommandsMenuComponent, isStandalone: true, selector: "ui-rich-text-slash-commands-menu", inputs: { commands: { classPropertyName: "commands", publicName: "commands", isSignal: true, isRequired: false, transformFunction: null }, selectedIndex: { classPropertyName: "selectedIndex", publicName: "selectedIndex", isSignal: true, isRequired: false, transformFunction: null }, noResultsLabel: { classPropertyName: "noResultsLabel", publicName: "noResultsLabel", isSignal: true, isRequired: false, transformFunction: null }, menuAriaLabel: { classPropertyName: "menuAriaLabel", publicName: "menuAriaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { commandSelect: "commandSelect", hoverIndex: "hoverIndex" }, host: { attributes: { "role": "listbox" }, properties: { "attr.aria-label": "menuAriaLabel()", "attr.data-slot": "'rich-text-slash-commands-menu'" }, classAttribute: "block w-72 max-w-[calc(100vw-2rem)] rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95" }, viewQueries: [{ propertyName: "list", first: true, predicate: ["list"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (commands().length === 0) {\n <div class=\"px-3 py-2 text-sm text-muted-foreground\">{{ noResultsLabel() }}</div>\n} @else {\n <div #list class=\"max-h-56 overflow-y-auto p-1\">\n @for (command of commands(); track command.id; let i = $index) {\n <button\n type=\"button\"\n class=\"w-full rounded-sm px-2 py-1.5 text-left transition-colors hover:bg-accent hover:text-accent-foreground\"\n [class.bg-accent]=\"i === selectedIndex()\"\n [class.text-accent-foreground]=\"i === selectedIndex()\"\n [attr.aria-selected]=\"i === selectedIndex()\"\n [attr.data-slash-index]=\"i\"\n [id]=\"optionId(i)\"\n role=\"option\"\n (mousedown)=\"onPointerDown($event)\"\n (mouseenter)=\"hoverIndex.emit(i)\"\n (click)=\"commandSelect.emit(command)\"\n >\n <div class=\"text-sm font-medium\">{{ command.label }}</div>\n @if (command.description) {\n <div class=\"text-xs text-muted-foreground\">{{ command.description }}</div>\n }\n </button>\n }\n </div>\n}\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
37057
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextSlashCommandsMenuComponent, isStandalone: true, selector: "ui-rich-text-slash-commands-menu", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, commands: { classPropertyName: "commands", publicName: "commands", isSignal: true, isRequired: false, transformFunction: null }, selectedIndex: { classPropertyName: "selectedIndex", publicName: "selectedIndex", isSignal: true, isRequired: false, transformFunction: null }, noResultsLabel: { classPropertyName: "noResultsLabel", publicName: "noResultsLabel", isSignal: true, isRequired: false, transformFunction: null }, menuAriaLabel: { classPropertyName: "menuAriaLabel", publicName: "menuAriaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { commandSelect: "commandSelect", hoverIndex: "hoverIndex" }, host: { attributes: { "role": "listbox" }, properties: { "attr.aria-label": "menuAriaLabel()", "attr.data-slot": "'rich-text-slash-commands-menu'", "class": "classes()" } }, viewQueries: [{ propertyName: "list", first: true, predicate: ["list"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (commands().length === 0) {\n <div class=\"px-3 py-2 text-sm text-muted-foreground\">{{ noResultsLabel() }}</div>\n} @else {\n <div #list class=\"max-h-56 overflow-y-auto p-1\">\n @for (command of commands(); track command.id; let i = $index) {\n <button\n type=\"button\"\n class=\"w-full rounded-sm px-2 py-1.5 text-left transition-colors hover:bg-accent hover:text-accent-foreground\"\n [class.bg-accent]=\"i === selectedIndex()\"\n [class.text-accent-foreground]=\"i === selectedIndex()\"\n [attr.aria-selected]=\"i === selectedIndex()\"\n [attr.data-slash-index]=\"i\"\n [id]=\"optionId(i)\"\n role=\"option\"\n (mousedown)=\"onPointerDown($event)\"\n (mouseenter)=\"hoverIndex.emit(i)\"\n (click)=\"commandSelect.emit(command)\"\n >\n <div class=\"text-sm font-medium\">{{ command.label }}</div>\n @if (command.description) {\n <div class=\"text-xs text-muted-foreground\">{{ command.description }}</div>\n }\n </button>\n }\n </div>\n}\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
36834
37058
  }
36835
37059
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextSlashCommandsMenuComponent, decorators: [{
36836
37060
  type: Component,
@@ -36838,9 +37062,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
36838
37062
  role: 'listbox',
36839
37063
  '[attr.aria-label]': 'menuAriaLabel()',
36840
37064
  '[attr.data-slot]': "'rich-text-slash-commands-menu'",
36841
- class: 'block w-72 max-w-[calc(100vw-2rem)] rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95',
37065
+ '[class]': 'classes()',
36842
37066
  }, template: "@if (commands().length === 0) {\n <div class=\"px-3 py-2 text-sm text-muted-foreground\">{{ noResultsLabel() }}</div>\n} @else {\n <div #list class=\"max-h-56 overflow-y-auto p-1\">\n @for (command of commands(); track command.id; let i = $index) {\n <button\n type=\"button\"\n class=\"w-full rounded-sm px-2 py-1.5 text-left transition-colors hover:bg-accent hover:text-accent-foreground\"\n [class.bg-accent]=\"i === selectedIndex()\"\n [class.text-accent-foreground]=\"i === selectedIndex()\"\n [attr.aria-selected]=\"i === selectedIndex()\"\n [attr.data-slash-index]=\"i\"\n [id]=\"optionId(i)\"\n role=\"option\"\n (mousedown)=\"onPointerDown($event)\"\n (mouseenter)=\"hoverIndex.emit(i)\"\n (click)=\"commandSelect.emit(command)\"\n >\n <div class=\"text-sm font-medium\">{{ command.label }}</div>\n @if (command.description) {\n <div class=\"text-xs text-muted-foreground\">{{ command.description }}</div>\n }\n </button>\n }\n </div>\n}\n" }]
36843
- }], ctorParameters: () => [], propDecorators: { commands: [{ type: i0.Input, args: [{ isSignal: true, alias: "commands", required: false }] }], selectedIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedIndex", required: false }] }], noResultsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "noResultsLabel", required: false }] }], menuAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuAriaLabel", required: false }] }], commandSelect: [{ type: i0.Output, args: ["commandSelect"] }], hoverIndex: [{ type: i0.Output, args: ["hoverIndex"] }], list: [{ type: i0.ViewChild, args: ['list', { isSignal: true }] }] } });
37067
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], commands: [{ type: i0.Input, args: [{ isSignal: true, alias: "commands", required: false }] }], selectedIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedIndex", required: false }] }], noResultsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "noResultsLabel", required: false }] }], menuAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuAriaLabel", required: false }] }], commandSelect: [{ type: i0.Output, args: ["commandSelect"] }], hoverIndex: [{ type: i0.Output, args: ["hoverIndex"] }], list: [{ type: i0.ViewChild, args: ['list', { isSignal: true }] }] } });
36844
37068
 
36845
37069
  /**
36846
37070
  * Builds the addon's built-in slash commands (paragraph, headings, lists,
@@ -38133,11 +38357,13 @@ class RichTextTablesButtonComponent {
38133
38357
  this.hoverCols = signal(0, ...(ngDevMode ? [{ debugName: "hoverCols" }] : /* istanbul ignore next */ []));
38134
38358
  this.icon = this.domSanitizer.bypassSecurityTrustHtml(TABLE_ICON);
38135
38359
  this.interactionDisabled = computed(() => this.host.isDisabled() || this.host.readonly(), ...(ngDevMode ? [{ debugName: "interactionDisabled" }] : /* istanbul ignore next */ []));
38360
+ /** Extra classes merged onto the toolbar button, after the built-in icon-button styling. */
38361
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
38136
38362
  this.buttonClasses = computed(() => cn('inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors', 'hover:bg-accent hover:text-accent-foreground', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', 'disabled:pointer-events-none disabled:opacity-50',
38137
38363
  // The global (pointer: coarse) floor targets `button:not([data-slot])`,
38138
38364
  // and these addon buttons carry a data-slot for testing — so they must
38139
38365
  // state the 44px touch minimum themselves rather than inherit it.
38140
- 'pointer-coarse:min-h-11 pointer-coarse:min-w-11', this.toolbarView?.compact() ? 'p-1' : 'p-1.5'), ...(ngDevMode ? [{ debugName: "buttonClasses" }] : /* istanbul ignore next */ []));
38366
+ 'pointer-coarse:min-h-11 pointer-coarse:min-w-11', this.toolbarView?.compact() ? 'p-1' : 'p-1.5', this.class()), ...(ngDevMode ? [{ debugName: "buttonClasses" }] : /* istanbul ignore next */ []));
38141
38367
  inject(DestroyRef).onDestroy(() => this.exclusive.release());
38142
38368
  }
38143
38369
  onOpenChange(next) {
@@ -38166,7 +38392,7 @@ class RichTextTablesButtonComponent {
38166
38392
  this.hoverCols.set(0);
38167
38393
  }
38168
38394
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextTablesButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
38169
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextTablesButtonComponent, isStandalone: true, selector: "ui-rte-tables-button", host: { classAttribute: "contents" }, ngImport: i0, template: "<ui-popover [open]=\"open()\" [closeOnScroll]=\"true\" (openChange)=\"onOpenChange($event)\">\n <ui-popover-trigger>\n <button\n type=\"button\"\n [class]=\"buttonClasses()\"\n [title]=\"context.locale().tooltip\"\n [attr.aria-label]=\"context.locale().tooltip\"\n [disabled]=\"interactionDisabled()\"\n >\n <span [innerHTML]=\"icon\"></span>\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"p-3 max-sm:max-w-[calc(100vw-1rem)]\" align=\"start\" strategy=\"fixed\">\n <div class=\"space-y-2\">\n <div class=\"grid gap-0.5\" style=\"grid-template-columns: repeat(8, 1fr)\">\n @for (row of gridRange; track row) {\n @for (col of gridRange; track col) {\n <button\n type=\"button\"\n data-grid-cell\n class=\"aspect-square w-5 border rounded-sm transition-colors\"\n [class.bg-primary]=\"row <= hoverRows() && col <= hoverCols()\"\n [class.border-primary]=\"row <= hoverRows() && col <= hoverCols()\"\n [class.border-border]=\"row > hoverRows() || col > hoverCols()\"\n [class.bg-background]=\"row > hoverRows() || col > hoverCols()\"\n [attr.aria-label]=\"row + 'x' + col\"\n (mouseenter)=\"onHover(row, col)\"\n (click)=\"onSelect(row, col)\"\n ></button>\n }\n }\n </div>\n <div class=\"text-xs text-center text-muted-foreground\">\n @if (hoverRows() > 0 && hoverCols() > 0) {\n {{ hoverRows() }} x {{ hoverCols() }}\n } @else {\n {{ context.locale().insertTable }}\n }\n </div>\n </div>\n </ui-popover-content>\n</ui-popover>\n", dependencies: [{ kind: "component", type: PopoverComponent, selector: "ui-popover", inputs: ["open", "closeOnScroll"], outputs: ["openChange"] }, { kind: "component", type: PopoverTriggerComponent, selector: "ui-popover-trigger" }, { kind: "component", type: PopoverContentComponent, selector: "ui-popover-content", inputs: ["class", "align", "side", "sideOffset", "avoidCollisions", "restoreFocus", "strategy"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
38395
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RichTextTablesButtonComponent, isStandalone: true, selector: "ui-rte-tables-button", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-slot": "\"rte-tables-host\"" }, classAttribute: "contents" }, ngImport: i0, template: "<ui-popover [open]=\"open()\" [closeOnScroll]=\"true\" (openChange)=\"onOpenChange($event)\">\n <ui-popover-trigger>\n <button\n type=\"button\"\n [class]=\"buttonClasses()\"\n [title]=\"context.locale().tooltip\"\n [attr.aria-label]=\"context.locale().tooltip\"\n [disabled]=\"interactionDisabled()\"\n >\n <span [innerHTML]=\"icon\"></span>\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"p-3 max-sm:max-w-[calc(100vw-1rem)]\" align=\"start\" strategy=\"fixed\">\n <div class=\"space-y-2\">\n <div class=\"grid gap-0.5\" style=\"grid-template-columns: repeat(8, 1fr)\">\n @for (row of gridRange; track row) {\n @for (col of gridRange; track col) {\n <button\n type=\"button\"\n data-grid-cell\n class=\"aspect-square w-5 border rounded-sm transition-colors\"\n [class.bg-primary]=\"row <= hoverRows() && col <= hoverCols()\"\n [class.border-primary]=\"row <= hoverRows() && col <= hoverCols()\"\n [class.border-border]=\"row > hoverRows() || col > hoverCols()\"\n [class.bg-background]=\"row > hoverRows() || col > hoverCols()\"\n [attr.aria-label]=\"row + 'x' + col\"\n (mouseenter)=\"onHover(row, col)\"\n (click)=\"onSelect(row, col)\"\n ></button>\n }\n }\n </div>\n <div class=\"text-xs text-center text-muted-foreground\">\n @if (hoverRows() > 0 && hoverCols() > 0) {\n {{ hoverRows() }} x {{ hoverCols() }}\n } @else {\n {{ context.locale().insertTable }}\n }\n </div>\n </div>\n </ui-popover-content>\n</ui-popover>\n", dependencies: [{ kind: "component", type: PopoverComponent, selector: "ui-popover", inputs: ["class", "open", "closeOnScroll"], outputs: ["openChange"] }, { kind: "component", type: PopoverTriggerComponent, selector: "ui-popover-trigger", inputs: ["class"] }, { kind: "component", type: PopoverContentComponent, selector: "ui-popover-content", inputs: ["class", "align", "side", "sideOffset", "avoidCollisions", "restoreFocus", "strategy"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
38170
38396
  }
38171
38397
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextTablesButtonComponent, decorators: [{
38172
38398
  type: Component,
@@ -38174,8 +38400,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
38174
38400
  PopoverComponent,
38175
38401
  PopoverTriggerComponent,
38176
38402
  PopoverContentComponent,
38177
- ], host: { class: 'contents' }, template: "<ui-popover [open]=\"open()\" [closeOnScroll]=\"true\" (openChange)=\"onOpenChange($event)\">\n <ui-popover-trigger>\n <button\n type=\"button\"\n [class]=\"buttonClasses()\"\n [title]=\"context.locale().tooltip\"\n [attr.aria-label]=\"context.locale().tooltip\"\n [disabled]=\"interactionDisabled()\"\n >\n <span [innerHTML]=\"icon\"></span>\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"p-3 max-sm:max-w-[calc(100vw-1rem)]\" align=\"start\" strategy=\"fixed\">\n <div class=\"space-y-2\">\n <div class=\"grid gap-0.5\" style=\"grid-template-columns: repeat(8, 1fr)\">\n @for (row of gridRange; track row) {\n @for (col of gridRange; track col) {\n <button\n type=\"button\"\n data-grid-cell\n class=\"aspect-square w-5 border rounded-sm transition-colors\"\n [class.bg-primary]=\"row <= hoverRows() && col <= hoverCols()\"\n [class.border-primary]=\"row <= hoverRows() && col <= hoverCols()\"\n [class.border-border]=\"row > hoverRows() || col > hoverCols()\"\n [class.bg-background]=\"row > hoverRows() || col > hoverCols()\"\n [attr.aria-label]=\"row + 'x' + col\"\n (mouseenter)=\"onHover(row, col)\"\n (click)=\"onSelect(row, col)\"\n ></button>\n }\n }\n </div>\n <div class=\"text-xs text-center text-muted-foreground\">\n @if (hoverRows() > 0 && hoverCols() > 0) {\n {{ hoverRows() }} x {{ hoverCols() }}\n } @else {\n {{ context.locale().insertTable }}\n }\n </div>\n </div>\n </ui-popover-content>\n</ui-popover>\n" }]
38178
- }], ctorParameters: () => [] });
38403
+ ], host: { class: 'contents', '[attr.data-slot]': '"rte-tables-host"' }, template: "<ui-popover [open]=\"open()\" [closeOnScroll]=\"true\" (openChange)=\"onOpenChange($event)\">\n <ui-popover-trigger>\n <button\n type=\"button\"\n [class]=\"buttonClasses()\"\n [title]=\"context.locale().tooltip\"\n [attr.aria-label]=\"context.locale().tooltip\"\n [disabled]=\"interactionDisabled()\"\n >\n <span [innerHTML]=\"icon\"></span>\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"p-3 max-sm:max-w-[calc(100vw-1rem)]\" align=\"start\" strategy=\"fixed\">\n <div class=\"space-y-2\">\n <div class=\"grid gap-0.5\" style=\"grid-template-columns: repeat(8, 1fr)\">\n @for (row of gridRange; track row) {\n @for (col of gridRange; track col) {\n <button\n type=\"button\"\n data-grid-cell\n class=\"aspect-square w-5 border rounded-sm transition-colors\"\n [class.bg-primary]=\"row <= hoverRows() && col <= hoverCols()\"\n [class.border-primary]=\"row <= hoverRows() && col <= hoverCols()\"\n [class.border-border]=\"row > hoverRows() || col > hoverCols()\"\n [class.bg-background]=\"row > hoverRows() || col > hoverCols()\"\n [attr.aria-label]=\"row + 'x' + col\"\n (mouseenter)=\"onHover(row, col)\"\n (click)=\"onSelect(row, col)\"\n ></button>\n }\n }\n </div>\n <div class=\"text-xs text-center text-muted-foreground\">\n @if (hoverRows() > 0 && hoverCols() > 0) {\n {{ hoverRows() }} x {{ hoverCols() }}\n } @else {\n {{ context.locale().insertTable }}\n }\n </div>\n </div>\n </ui-popover-content>\n</ui-popover>\n" }]
38404
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
38179
38405
 
38180
38406
  /** Built-in locales for the tables addon. */
38181
38407
  const RICH_TEXT_TABLES_LOCALES = {
@@ -38739,6 +38965,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
38739
38965
  class CommandInputComponent {
38740
38966
  constructor() {
38741
38967
  this.cmdService = inject(CommandService);
38968
+ /** Extra classes merged onto the search row (icon + field), after the bordered default — the `<input>` itself is not reachable from here. */
38969
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
38970
+ this.classes = computed(() => cn('flex items-center border-b px-3', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
38742
38971
  /** Override for the placeholder. Falls back to the locale's `searchPlaceholder`. */
38743
38972
  this.placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
38744
38973
  /** Override for the aria-label. Falls back to the locale's `search`. */
@@ -38821,8 +39050,8 @@ class CommandInputComponent {
38821
39050
  this.inputEl?.nativeElement?.focus();
38822
39051
  }
38823
39052
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: CommandInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
38824
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: CommandInputComponent, isStandalone: true, selector: "ui-command-input", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true }], ngImport: i0, template: `
38825
- <div class="flex items-center border-b px-3" [attr.data-slot]="'command-input'" [attr.dir]="dir()">
39053
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: CommandInputComponent, isStandalone: true, selector: "ui-command-input", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true }], ngImport: i0, template: `
39054
+ <div [class]="classes()" [attr.data-slot]="'command-input'" [attr.dir]="dir()">
38826
39055
  <svg class="h-4 w-4 shrink-0 opacity-50 ltr:mr-2 rtl:ml-2" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
38827
39056
  <path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
38828
39057
  </svg>
@@ -38844,7 +39073,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
38844
39073
  selector: 'ui-command-input',
38845
39074
  changeDetection: ChangeDetectionStrategy.OnPush,
38846
39075
  template: `
38847
- <div class="flex items-center border-b px-3" [attr.data-slot]="'command-input'" [attr.dir]="dir()">
39076
+ <div [class]="classes()" [attr.data-slot]="'command-input'" [attr.dir]="dir()">
38848
39077
  <svg class="h-4 w-4 shrink-0 opacity-50 ltr:mr-2 rtl:ml-2" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
38849
39078
  <path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
38850
39079
  </svg>
@@ -38864,7 +39093,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
38864
39093
  }], propDecorators: { inputEl: [{
38865
39094
  type: ViewChild,
38866
39095
  args: ['inputEl']
38867
- }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }] } });
39096
+ }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }] } });
38868
39097
 
38869
39098
  class CommandListComponent {
38870
39099
  constructor() {
@@ -38909,14 +39138,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
38909
39138
  class CommandEmptyComponent {
38910
39139
  constructor() {
38911
39140
  this.cmdService = inject(CommandService);
39141
+ /** Extra classes merged onto the empty-state message, after the centred muted default. */
39142
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
39143
+ this.classes = computed(() => cn('py-6 text-center text-sm text-muted-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
38912
39144
  this.isVisible = computed(() => {
38913
39145
  return this.cmdService.filteredItemIds().size === 0;
38914
39146
  }, ...(ngDevMode ? [{ debugName: "isVisible" }] : /* istanbul ignore next */ []));
38915
39147
  }
38916
39148
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: CommandEmptyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
38917
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: CommandEmptyComponent, isStandalone: true, selector: "ui-command-empty", host: { classAttribute: "contents" }, ngImport: i0, template: `
39149
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: CommandEmptyComponent, isStandalone: true, selector: "ui-command-empty", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: `
38918
39150
  @if (isVisible()) {
38919
- <div class="py-6 text-center text-sm text-muted-foreground" [attr.data-slot]="'command-empty'">
39151
+ <div [class]="classes()" [attr.data-slot]="'command-empty'">
38920
39152
  <ng-content />
38921
39153
  </div>
38922
39154
  }
@@ -38929,14 +39161,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
38929
39161
  changeDetection: ChangeDetectionStrategy.OnPush,
38930
39162
  template: `
38931
39163
  @if (isVisible()) {
38932
- <div class="py-6 text-center text-sm text-muted-foreground" [attr.data-slot]="'command-empty'">
39164
+ <div [class]="classes()" [attr.data-slot]="'command-empty'">
38933
39165
  <ng-content />
38934
39166
  </div>
38935
39167
  }
38936
39168
  `,
38937
39169
  host: { class: 'contents' },
38938
39170
  }]
38939
- }] });
39171
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
38940
39172
 
38941
39173
  const COMMAND_GROUP = new InjectionToken('COMMAND_GROUP');
38942
39174
  class CommandGroupComponent {
@@ -39120,9 +39352,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
39120
39352
  }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], shortcut: [{ type: i0.Input, args: [{ isSignal: true, alias: "shortcut", required: false }] }], selectItem: [{ type: i0.Output, args: ["selectItem"] }], row: [{ type: i0.ViewChild, args: ['row', { isSignal: true }] }] } });
39121
39353
 
39122
39354
  class CommandSeparatorComponent {
39355
+ constructor() {
39356
+ /** Extra classes merged onto the rule, after `-mx-1 h-px bg-border`. */
39357
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
39358
+ this.classes = computed(() => cn('-mx-1 h-px bg-border', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
39359
+ }
39123
39360
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: CommandSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
39124
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: CommandSeparatorComponent, isStandalone: true, selector: "ui-command-separator", host: { classAttribute: "contents" }, ngImport: i0, template: `
39125
- <div class="-mx-1 h-px bg-border" [attr.data-slot]="'command-separator'"></div>
39361
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: CommandSeparatorComponent, isStandalone: true, selector: "ui-command-separator", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: `
39362
+ <div [class]="classes()" [attr.data-slot]="'command-separator'"></div>
39126
39363
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
39127
39364
  }
39128
39365
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: CommandSeparatorComponent, decorators: [{
@@ -39131,16 +39368,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
39131
39368
  selector: 'ui-command-separator',
39132
39369
  changeDetection: ChangeDetectionStrategy.OnPush,
39133
39370
  template: `
39134
- <div class="-mx-1 h-px bg-border" [attr.data-slot]="'command-separator'"></div>
39371
+ <div [class]="classes()" [attr.data-slot]="'command-separator'"></div>
39135
39372
  `,
39136
39373
  host: { class: 'contents' },
39137
39374
  }]
39138
- }] });
39375
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
39139
39376
 
39140
39377
  class CommandShortcutComponent {
39378
+ constructor() {
39379
+ /** Extra classes merged onto the hint, after the muted `text-xs` default — so a `text-*` here wins. */
39380
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
39381
+ this.classes = computed(() => cn('text-xs tracking-widest text-muted-foreground ltr:ml-auto rtl:mr-auto', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
39382
+ }
39141
39383
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: CommandShortcutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
39142
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: CommandShortcutComponent, isStandalone: true, selector: "ui-command-shortcut", host: { classAttribute: "contents" }, ngImport: i0, template: `
39143
- <span class="text-xs tracking-widest text-muted-foreground ltr:ml-auto rtl:mr-auto" [attr.data-slot]="'command-shortcut'">
39384
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: CommandShortcutComponent, isStandalone: true, selector: "ui-command-shortcut", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: `
39385
+ <span [class]="classes()" [attr.data-slot]="'command-shortcut'">
39144
39386
  <ng-content />
39145
39387
  </span>
39146
39388
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -39151,16 +39393,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
39151
39393
  selector: 'ui-command-shortcut',
39152
39394
  changeDetection: ChangeDetectionStrategy.OnPush,
39153
39395
  template: `
39154
- <span class="text-xs tracking-widest text-muted-foreground ltr:ml-auto rtl:mr-auto" [attr.data-slot]="'command-shortcut'">
39396
+ <span [class]="classes()" [attr.data-slot]="'command-shortcut'">
39155
39397
  <ng-content />
39156
39398
  </span>
39157
39399
  `,
39158
39400
  host: { class: 'contents' },
39159
39401
  }]
39160
- }] });
39402
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
39161
39403
 
39162
39404
  class CommandDialogComponent {
39163
39405
  constructor() {
39406
+ /** Extra classes merged onto the dialog panel, after `overflow-hidden p-0 shadow-lg` — e.g. a width utility. */
39407
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
39408
+ this.classes = computed(() => cn('overflow-hidden p-0 shadow-lg', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
39164
39409
  /**
39165
39410
  * Two-way open state of the underlying `ui-dialog`. Toggled by the global
39166
39411
  * {@link shortcut}, and each transition to open focuses the projected
@@ -39230,9 +39475,9 @@ class CommandDialogComponent {
39230
39475
  this.shortcutHandle = null;
39231
39476
  }
39232
39477
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: CommandDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
39233
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.22", type: CommandDialogComponent, isStandalone: true, selector: "ui-command-dialog", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, shortcutEnabled: { classPropertyName: "shortcutEnabled", publicName: "shortcutEnabled", isSignal: true, isRequired: false, transformFunction: null }, shortcut: { classPropertyName: "shortcut", publicName: "shortcut", isSignal: true, isRequired: false, transformFunction: null }, shortcutActionId: { classPropertyName: "shortcutActionId", publicName: "shortcutActionId", isSignal: true, isRequired: false, transformFunction: null }, shortcutCategory: { classPropertyName: "shortcutCategory", publicName: "shortcutCategory", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { classAttribute: "contents" }, queries: [{ propertyName: "commandInput", first: true, predicate: CommandInputComponent, descendants: true, isSignal: true }], ngImport: i0, template: `
39478
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.22", type: CommandDialogComponent, isStandalone: true, selector: "ui-command-dialog", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, shortcutEnabled: { classPropertyName: "shortcutEnabled", publicName: "shortcutEnabled", isSignal: true, isRequired: false, transformFunction: null }, shortcut: { classPropertyName: "shortcut", publicName: "shortcut", isSignal: true, isRequired: false, transformFunction: null }, shortcutActionId: { classPropertyName: "shortcutActionId", publicName: "shortcutActionId", isSignal: true, isRequired: false, transformFunction: null }, shortcutCategory: { classPropertyName: "shortcutCategory", publicName: "shortcutCategory", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { properties: { "attr.data-slot": "\"command-dialog\"" }, classAttribute: "contents" }, queries: [{ propertyName: "commandInput", first: true, predicate: CommandInputComponent, descendants: true, isSignal: true }], ngImport: i0, template: `
39234
39479
  <ui-dialog [(open)]="open">
39235
- <ui-dialog-content class="overflow-hidden p-0 shadow-lg">
39480
+ <ui-dialog-content [class]="classes()">
39236
39481
  <ui-command class="**:data-[slot=command-group]:px-2 **:data-[slot=command-group]:font-medium **:data-[slot=command-group]:text-muted-foreground **:data-[slot=command-item]:px-2 **:data-[slot=command-item]:py-3 [&_[data-slot=command-item]_svg]:h-5 [&_[data-slot=command-item]_svg]:w-5">
39237
39482
  <ng-content />
39238
39483
  </ui-command>
@@ -39248,16 +39493,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
39248
39493
  imports: [DialogComponent, DialogContentComponent, CommandComponent],
39249
39494
  template: `
39250
39495
  <ui-dialog [(open)]="open">
39251
- <ui-dialog-content class="overflow-hidden p-0 shadow-lg">
39496
+ <ui-dialog-content [class]="classes()">
39252
39497
  <ui-command class="**:data-[slot=command-group]:px-2 **:data-[slot=command-group]:font-medium **:data-[slot=command-group]:text-muted-foreground **:data-[slot=command-item]:px-2 **:data-[slot=command-item]:py-3 [&_[data-slot=command-item]_svg]:h-5 [&_[data-slot=command-item]_svg]:w-5">
39253
39498
  <ng-content />
39254
39499
  </ui-command>
39255
39500
  </ui-dialog-content>
39256
39501
  </ui-dialog>
39257
39502
  `,
39258
- host: { class: 'contents' },
39503
+ host: { class: 'contents', '[attr.data-slot]': '"command-dialog"' },
39259
39504
  }]
39260
- }], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], shortcutEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "shortcutEnabled", required: false }] }], shortcut: [{ type: i0.Input, args: [{ isSignal: true, alias: "shortcut", required: false }] }], shortcutActionId: [{ type: i0.Input, args: [{ isSignal: true, alias: "shortcutActionId", required: false }] }], shortcutCategory: [{ type: i0.Input, args: [{ isSignal: true, alias: "shortcutCategory", required: false }] }], commandInput: [{ type: i0.ContentChild, args: [i0.forwardRef(() => CommandInputComponent), { isSignal: true }] }] } });
39505
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], shortcutEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "shortcutEnabled", required: false }] }], shortcut: [{ type: i0.Input, args: [{ isSignal: true, alias: "shortcut", required: false }] }], shortcutActionId: [{ type: i0.Input, args: [{ isSignal: true, alias: "shortcutActionId", required: false }] }], shortcutCategory: [{ type: i0.Input, args: [{ isSignal: true, alias: "shortcutCategory", required: false }] }], commandInput: [{ type: i0.ContentChild, args: [i0.forwardRef(() => CommandInputComponent), { isSignal: true }] }] } });
39261
39506
 
39262
39507
  class HighlightPipe {
39263
39508
  /**
@@ -39909,7 +40154,7 @@ class AutocompleteComponent {
39909
40154
  useExisting: forwardRef(() => AutocompleteComponent),
39910
40155
  multi: true,
39911
40156
  },
39912
- ], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }, { propertyName: "command", first: true, predicate: CommandComponent, descendants: true, isSignal: true }, { propertyName: "commandService", first: true, predicate: CommandComponent, descendants: true, read: CommandService, isSignal: true }], ngImport: i0, template: "<ui-popover [open]=\"open()\" (openChange)=\"onOpenChange($event)\">\n <ui-popover-trigger class=\"w-full\">\n <div\n [class]=\"containerClasses()\"\n [attr.data-state]=\"open() ? 'open' : 'closed'\"\n [attr.data-disabled]=\"isDisabled() || null\"\n [attr.data-slot]=\"'autocomplete-container'\"\n [attr.dir]=\"dir()\"\n tabindex=\"-1\"\n (click)=\"onContainerClick($event)\"\n (keydown.enter)=\"onContainerClick($event)\"\n (keydown.space)=\"onContainerClick($event)\"\n >\n @if (multiple()) {\n <div class=\"flex flex-wrap items-center gap-1 w-full\">\n @for (item of selectedItems(); track item; let i = $index) {\n <ui-badge variant=\"secondary\" class=\"gap-1 pe-0.5\">\n {{ getDisplayValue(item) }}\n <button\n type=\"button\"\n class=\"cursor-pointer rounded-full p-0.5 pointer-coarse:size-11 hover:bg-secondary-foreground/20 inline-flex items-center justify-center bg-transparent border-0\"\n data-slot=\"chip-remove\"\n (click)=\"removeItem(item, $event)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"h-3 w-3\"><path d=\"M18 6 6 18\"/><path d=\"m6 6 12 12\"/></svg>\n </button>\n </ui-badge>\n }\n <input\n #inputEl\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"listId\"\n [attr.aria-activedescendant]=\"activeItemId()\"\n [class]=\"multiInputClasses()\"\n [placeholder]=\"selectedItems().length === 0 ? (placeholder() ?? t().selectPlaceholder) : ''\"\n [disabled]=\"isDisabled()\"\n [(ngModel)]=\"searchTerm\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onTouched()\"\n />\n </div>\n } @else {\n <div class=\"flex items-center w-full gap-2\">\n <input\n #inputEl\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"listId\"\n [attr.aria-activedescendant]=\"activeItemId()\"\n [class]=\"singleInputClasses()\"\n [placeholder]=\"placeholder() ?? t().selectPlaceholder\"\n [disabled]=\"isDisabled()\"\n [value]=\"inputValue()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n />\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"h-4 w-4 opacity-50 shrink-0\"><path d=\"m6 9 6 6 6-6\"/></svg>\n </div>\n }\n </div>\n </ui-popover-trigger>\n <ui-popover-content [side]=\"dropdownSide()\" class=\"w-[--radix-popover-trigger-width] p-0\" align=\"start\" [restoreFocus]=\"false\" [avoidCollisions]=\"avoidPopoverCollisions()\">\n <ui-command [shouldFilter]=\"filter()\" [search]=\"searchTerm()\" [attr.dir]=\"dir()\">\n <ui-command-list [attr.id]=\"listId\" role=\"listbox\">\n <ui-command-empty>{{ t().noResults }}</ui-command-empty>\n\n @for (option of options(); track getTrackBy(option)) {\n <ui-command-item\n [value]=\"getSearchValue(option)\"\n [selected]=\"isSelected(option)\"\n (selectItem)=\"onSelect(option)\"\n >\n <span class=\"truncate\" [innerHTML]=\"getDisplayValue(option) | highlight: searchTerm()\"></span>\n <span class=\"ms-auto flex h-3.5 w-3.5 shrink-0 items-center justify-center opacity-0\" [class.opacity-100]=\"isSelected(option)\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"h-4 w-4\"><polyline points=\"20 6 9 17 4 12\"/></svg>\n </span>\n </ui-command-item>\n }\n </ui-command-list>\n </ui-command>\n </ui-popover-content>\n</ui-popover>\n", styles: [":host{--_d: var(--density-select, var(--density, 1))}@layer components{[data-slot=autocomplete-container]{min-height:calc(2.5rem * var(--_d));padding-inline:calc(.75rem * var(--_d));padding-block:calc(.5rem * var(--_d))}}\n"], dependencies: [{ kind: "component", type: PopoverComponent, selector: "ui-popover", inputs: ["open", "closeOnScroll"], outputs: ["openChange"] }, { kind: "component", type: PopoverContentComponent, selector: "ui-popover-content", inputs: ["class", "align", "side", "sideOffset", "avoidCollisions", "restoreFocus", "strategy"] }, { kind: "component", type: PopoverTriggerComponent, selector: "ui-popover-trigger" }, { kind: "component", type: CommandComponent, selector: "ui-command", inputs: ["class", "shouldFilter", "search", "source", "debounce", "recentKey", "recentLimit"] }, { kind: "component", type: CommandListComponent, selector: "ui-command-list", inputs: ["class", "ariaLabel"] }, { kind: "component", type: CommandItemComponent, selector: "ui-command-item", inputs: ["class", "disabled", "selected", "value", "shortcut"], outputs: ["selectItem"] }, { kind: "component", type: CommandEmptyComponent, selector: "ui-command-empty" }, { kind: "component", type: BadgeComponent, selector: "ui-badge", inputs: ["variant", "label", "class", "skeleton"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: HighlightPipe, name: "highlight" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
40157
+ ], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }, { propertyName: "command", first: true, predicate: CommandComponent, descendants: true, isSignal: true }, { propertyName: "commandService", first: true, predicate: CommandComponent, descendants: true, read: CommandService, isSignal: true }], ngImport: i0, template: "<ui-popover [open]=\"open()\" (openChange)=\"onOpenChange($event)\">\n <ui-popover-trigger class=\"w-full\">\n <div\n [class]=\"containerClasses()\"\n [attr.data-state]=\"open() ? 'open' : 'closed'\"\n [attr.data-disabled]=\"isDisabled() || null\"\n [attr.data-slot]=\"'autocomplete-container'\"\n [attr.dir]=\"dir()\"\n tabindex=\"-1\"\n (click)=\"onContainerClick($event)\"\n (keydown.enter)=\"onContainerClick($event)\"\n (keydown.space)=\"onContainerClick($event)\"\n >\n @if (multiple()) {\n <div class=\"flex flex-wrap items-center gap-1 w-full\">\n @for (item of selectedItems(); track item; let i = $index) {\n <ui-badge variant=\"secondary\" class=\"gap-1 pe-0.5\">\n {{ getDisplayValue(item) }}\n <button\n type=\"button\"\n class=\"cursor-pointer rounded-full p-0.5 pointer-coarse:size-11 hover:bg-secondary-foreground/20 inline-flex items-center justify-center bg-transparent border-0\"\n data-slot=\"chip-remove\"\n (click)=\"removeItem(item, $event)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"h-3 w-3\"><path d=\"M18 6 6 18\"/><path d=\"m6 6 12 12\"/></svg>\n </button>\n </ui-badge>\n }\n <input\n #inputEl\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"listId\"\n [attr.aria-activedescendant]=\"activeItemId()\"\n [class]=\"multiInputClasses()\"\n [placeholder]=\"selectedItems().length === 0 ? (placeholder() ?? t().selectPlaceholder) : ''\"\n [disabled]=\"isDisabled()\"\n [(ngModel)]=\"searchTerm\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onTouched()\"\n />\n </div>\n } @else {\n <div class=\"flex items-center w-full gap-2\">\n <input\n #inputEl\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"listId\"\n [attr.aria-activedescendant]=\"activeItemId()\"\n [class]=\"singleInputClasses()\"\n [placeholder]=\"placeholder() ?? t().selectPlaceholder\"\n [disabled]=\"isDisabled()\"\n [value]=\"inputValue()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n />\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"h-4 w-4 opacity-50 shrink-0\"><path d=\"m6 9 6 6 6-6\"/></svg>\n </div>\n }\n </div>\n </ui-popover-trigger>\n <ui-popover-content [side]=\"dropdownSide()\" class=\"w-[--radix-popover-trigger-width] p-0\" align=\"start\" [restoreFocus]=\"false\" [avoidCollisions]=\"avoidPopoverCollisions()\">\n <ui-command [shouldFilter]=\"filter()\" [search]=\"searchTerm()\" [attr.dir]=\"dir()\">\n <ui-command-list [attr.id]=\"listId\" role=\"listbox\">\n <ui-command-empty>{{ t().noResults }}</ui-command-empty>\n\n @for (option of options(); track getTrackBy(option)) {\n <ui-command-item\n [value]=\"getSearchValue(option)\"\n [selected]=\"isSelected(option)\"\n (selectItem)=\"onSelect(option)\"\n >\n <span class=\"truncate\" [innerHTML]=\"getDisplayValue(option) | highlight: searchTerm()\"></span>\n <span class=\"ms-auto flex h-3.5 w-3.5 shrink-0 items-center justify-center opacity-0\" [class.opacity-100]=\"isSelected(option)\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"h-4 w-4\"><polyline points=\"20 6 9 17 4 12\"/></svg>\n </span>\n </ui-command-item>\n }\n </ui-command-list>\n </ui-command>\n </ui-popover-content>\n</ui-popover>\n", styles: [":host{--_d: var(--density-select, var(--density, 1))}@layer components{[data-slot=autocomplete-container]{min-height:calc(2.5rem * var(--_d));padding-inline:calc(.75rem * var(--_d));padding-block:calc(.5rem * var(--_d))}}\n"], dependencies: [{ kind: "component", type: PopoverComponent, selector: "ui-popover", inputs: ["class", "open", "closeOnScroll"], outputs: ["openChange"] }, { kind: "component", type: PopoverContentComponent, selector: "ui-popover-content", inputs: ["class", "align", "side", "sideOffset", "avoidCollisions", "restoreFocus", "strategy"] }, { kind: "component", type: PopoverTriggerComponent, selector: "ui-popover-trigger", inputs: ["class"] }, { kind: "component", type: CommandComponent, selector: "ui-command", inputs: ["class", "shouldFilter", "search", "source", "debounce", "recentKey", "recentLimit"] }, { kind: "component", type: CommandListComponent, selector: "ui-command-list", inputs: ["class", "ariaLabel"] }, { kind: "component", type: CommandItemComponent, selector: "ui-command-item", inputs: ["class", "disabled", "selected", "value", "shortcut"], outputs: ["selectItem"] }, { kind: "component", type: CommandEmptyComponent, selector: "ui-command-empty", inputs: ["class"] }, { kind: "component", type: BadgeComponent, selector: "ui-badge", inputs: ["variant", "label", "class", "skeleton"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: HighlightPipe, name: "highlight" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
39913
40158
  }
39914
40159
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AutocompleteComponent, decorators: [{
39915
40160
  type: Component,
@@ -39962,11 +40207,13 @@ class RichTextTypographyButtonComponent {
39962
40207
  this.icon = this.domSanitizer.bypassSecurityTrustHtml(this.context.kind === 'size' ? SIZE_ICON : FAMILY_ICON);
39963
40208
  this.panelClasses = this.context.kind === 'size' ? 'w-48' : 'w-56';
39964
40209
  this.interactionDisabled = computed(() => this.host.isDisabled() || this.host.readonly(), ...(ngDevMode ? [{ debugName: "interactionDisabled" }] : /* istanbul ignore next */ []));
40210
+ /** Extra classes merged onto the toolbar button, after the built-in icon-button styling. */
40211
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
39965
40212
  this.buttonClasses = computed(() => cn('inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors', 'hover:bg-accent hover:text-accent-foreground', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', 'disabled:pointer-events-none disabled:opacity-50',
39966
40213
  // The global (pointer: coarse) floor targets `button:not([data-slot])`,
39967
40214
  // and these addon buttons carry a data-slot for testing — so they must
39968
40215
  // state the 44px touch minimum themselves rather than inherit it.
39969
- 'pointer-coarse:min-h-11 pointer-coarse:min-w-11', this.toolbarView?.compact() ? 'p-1' : 'p-1.5'), ...(ngDevMode ? [{ debugName: "buttonClasses" }] : /* istanbul ignore next */ []));
40216
+ 'pointer-coarse:min-h-11 pointer-coarse:min-w-11', this.toolbarView?.compact() ? 'p-1' : 'p-1.5', this.class()), ...(ngDevMode ? [{ debugName: "buttonClasses" }] : /* istanbul ignore next */ []));
39970
40217
  inject(DestroyRef).onDestroy(() => this.exclusive.release());
39971
40218
  }
39972
40219
  onOpenChange(next) {
@@ -39986,7 +40233,7 @@ class RichTextTypographyButtonComponent {
39986
40233
  this.context.onSelect(value);
39987
40234
  }
39988
40235
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextTypographyButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
39989
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: RichTextTypographyButtonComponent, isStandalone: true, selector: "ui-rte-typography-button", host: { classAttribute: "contents" }, ngImport: i0, template: "<ui-popover [open]=\"open()\" [closeOnScroll]=\"true\" (openChange)=\"onOpenChange($event)\">\n <ui-popover-trigger>\n <button\n type=\"button\"\n [class]=\"buttonClasses()\"\n [title]=\"context.tooltip()\"\n [attr.aria-label]=\"context.tooltip()\"\n [disabled]=\"interactionDisabled()\"\n >\n <span [innerHTML]=\"icon\"></span>\n </button>\n </ui-popover-trigger>\n <ui-popover-content [class]=\"panelClasses + ' max-w-[calc(100vw-2rem)] p-3'\" align=\"start\" strategy=\"fixed\">\n <div class=\"space-y-2\">\n <p class=\"text-sm font-medium block m-0\">{{ context.heading() }}</p>\n <ui-autocomplete\n [ngModel]=\"context.seededValue()\"\n [options]=\"context.options()\"\n [placeholder]=\"context.placeholder()\"\n [disabled]=\"interactionDisabled()\"\n [filter]=\"context.filter\"\n (ngModelChange)=\"onValueChange($event)\"\n class=\"w-full\"\n />\n </div>\n </ui-popover-content>\n</ui-popover>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: PopoverComponent, selector: "ui-popover", inputs: ["open", "closeOnScroll"], outputs: ["openChange"] }, { kind: "component", type: PopoverTriggerComponent, selector: "ui-popover-trigger" }, { kind: "component", type: PopoverContentComponent, selector: "ui-popover-content", inputs: ["class", "align", "side", "sideOffset", "avoidCollisions", "restoreFocus", "strategy"] }, { kind: "component", type: AutocompleteComponent, selector: "ui-autocomplete", inputs: ["options", "displayWith", "valueAttribute", "filter", "multiple", "placeholder", "disabled", "class", "debounceTime", "value", "locale", "searchTerm"], outputs: ["valueChange", "searchChange", "searchTermChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
40236
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: RichTextTypographyButtonComponent, isStandalone: true, selector: "ui-rte-typography-button", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-slot": "\"rte-typography-host\"" }, classAttribute: "contents" }, ngImport: i0, template: "<ui-popover [open]=\"open()\" [closeOnScroll]=\"true\" (openChange)=\"onOpenChange($event)\">\n <ui-popover-trigger>\n <button\n type=\"button\"\n [class]=\"buttonClasses()\"\n [title]=\"context.tooltip()\"\n [attr.aria-label]=\"context.tooltip()\"\n [disabled]=\"interactionDisabled()\"\n >\n <span [innerHTML]=\"icon\"></span>\n </button>\n </ui-popover-trigger>\n <ui-popover-content [class]=\"panelClasses + ' max-w-[calc(100vw-2rem)] p-3'\" align=\"start\" strategy=\"fixed\">\n <div class=\"space-y-2\">\n <p class=\"text-sm font-medium block m-0\">{{ context.heading() }}</p>\n <ui-autocomplete\n [ngModel]=\"context.seededValue()\"\n [options]=\"context.options()\"\n [placeholder]=\"context.placeholder()\"\n [disabled]=\"interactionDisabled()\"\n [filter]=\"context.filter\"\n (ngModelChange)=\"onValueChange($event)\"\n class=\"w-full\"\n />\n </div>\n </ui-popover-content>\n</ui-popover>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: PopoverComponent, selector: "ui-popover", inputs: ["class", "open", "closeOnScroll"], outputs: ["openChange"] }, { kind: "component", type: PopoverTriggerComponent, selector: "ui-popover-trigger", inputs: ["class"] }, { kind: "component", type: PopoverContentComponent, selector: "ui-popover-content", inputs: ["class", "align", "side", "sideOffset", "avoidCollisions", "restoreFocus", "strategy"] }, { kind: "component", type: AutocompleteComponent, selector: "ui-autocomplete", inputs: ["options", "displayWith", "valueAttribute", "filter", "multiple", "placeholder", "disabled", "class", "debounceTime", "value", "locale", "searchTerm"], outputs: ["valueChange", "searchChange", "searchTermChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
39990
40237
  }
39991
40238
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RichTextTypographyButtonComponent, decorators: [{
39992
40239
  type: Component,
@@ -39996,8 +40243,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
39996
40243
  PopoverTriggerComponent,
39997
40244
  PopoverContentComponent,
39998
40245
  AutocompleteComponent,
39999
- ], host: { class: 'contents' }, template: "<ui-popover [open]=\"open()\" [closeOnScroll]=\"true\" (openChange)=\"onOpenChange($event)\">\n <ui-popover-trigger>\n <button\n type=\"button\"\n [class]=\"buttonClasses()\"\n [title]=\"context.tooltip()\"\n [attr.aria-label]=\"context.tooltip()\"\n [disabled]=\"interactionDisabled()\"\n >\n <span [innerHTML]=\"icon\"></span>\n </button>\n </ui-popover-trigger>\n <ui-popover-content [class]=\"panelClasses + ' max-w-[calc(100vw-2rem)] p-3'\" align=\"start\" strategy=\"fixed\">\n <div class=\"space-y-2\">\n <p class=\"text-sm font-medium block m-0\">{{ context.heading() }}</p>\n <ui-autocomplete\n [ngModel]=\"context.seededValue()\"\n [options]=\"context.options()\"\n [placeholder]=\"context.placeholder()\"\n [disabled]=\"interactionDisabled()\"\n [filter]=\"context.filter\"\n (ngModelChange)=\"onValueChange($event)\"\n class=\"w-full\"\n />\n </div>\n </ui-popover-content>\n</ui-popover>\n" }]
40000
- }], ctorParameters: () => [] });
40246
+ ], host: { class: 'contents', '[attr.data-slot]': '"rte-typography-host"' }, template: "<ui-popover [open]=\"open()\" [closeOnScroll]=\"true\" (openChange)=\"onOpenChange($event)\">\n <ui-popover-trigger>\n <button\n type=\"button\"\n [class]=\"buttonClasses()\"\n [title]=\"context.tooltip()\"\n [attr.aria-label]=\"context.tooltip()\"\n [disabled]=\"interactionDisabled()\"\n >\n <span [innerHTML]=\"icon\"></span>\n </button>\n </ui-popover-trigger>\n <ui-popover-content [class]=\"panelClasses + ' max-w-[calc(100vw-2rem)] p-3'\" align=\"start\" strategy=\"fixed\">\n <div class=\"space-y-2\">\n <p class=\"text-sm font-medium block m-0\">{{ context.heading() }}</p>\n <ui-autocomplete\n [ngModel]=\"context.seededValue()\"\n [options]=\"context.options()\"\n [placeholder]=\"context.placeholder()\"\n [disabled]=\"interactionDisabled()\"\n [filter]=\"context.filter\"\n (ngModelChange)=\"onValueChange($event)\"\n class=\"w-full\"\n />\n </div>\n </ui-popover-content>\n</ui-popover>\n" }]
40247
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
40001
40248
 
40002
40249
  /** Built-in locales for the typography addon. */
40003
40250
  const RICH_TEXT_TYPOGRAPHY_LOCALES = {
@@ -40035,7 +40282,7 @@ const DEFAULT_FONT_FAMILIES = [
40035
40282
  'Impact',
40036
40283
  ];
40037
40284
  /** Font sizes (px) offered by the font-size dropdown: 8px…72px in 2px steps. */
40038
- const FONT_SIZE_STEPS = Array.from({ length: 33 }, (_, i) => 8 + i * 2);
40285
+ const FONT_SIZE_STEPS = Array.from({ length: 33 }, (...[, i]) => 8 + i * 2);
40039
40286
  /**
40040
40287
  * Opt-in typography addon for `<ui-rich-text-editor>`. Attaches via DI to the
40041
40288
  * `RichTextEditorAddonHost` the base provides and contributes two toolbar
@@ -40205,4 +40452,4 @@ const RTE_FULL = [
40205
40452
  */
40206
40453
 
40207
40454
  export { RichTextAllowHost as $, ACTION_ATTRS as A, RICH_TEXT_LOCALES as B, RICH_TEXT_MENTIONS_LOCALES as C, DEFAULT_COLOR_PALETTE as D, EMPTINESS_FIXTURES as E, FIND_MAX_PAINTED_RECTS as F, RICH_TEXT_OUTLINE_CONTEXT as G, HEADER_BYTES as H, IMAGE_IMPORT_ACCEPT as I, RICH_TEXT_OUTLINE_LOCALES as J, RICH_TEXT_PROSE_CLASSES as K, RICH_TEXT_SHORTCUT_DEFINITIONS as L, MAX_NESTING_DEPTH as M, RICH_TEXT_SLASH_COMMANDS_LOCALES as N, RICH_TEXT_TABLES_BUTTON_CONTEXT as O, PDF_MIME as P, RICH_TEXT_TABLES_LOCALES as Q, RICH_TEXT_ACTIONS_SANITIZER_RULES as R, RICH_TEXT_TYPOGRAPHY_BUTTON_CONTEXT as S, RICH_TEXT_TYPOGRAPHY_LOCALES as T, RTE_FULL as U, RichTextActionsBindDirective as V, RichTextActionsDirective as W, RichTextAiChipComponent as X, RichTextAiDirective as Y, RichTextAiPanelComponent as Z, RichTextAllowDirective as _, ACTION_PARAMS as a, flattenIntoRowText as a$, RichTextColorsButtonComponent as a0, RichTextColorsDirective as a1, RichTextCommandRegistry as a2, RichTextEditorAddonHost as a3, RichTextEditorComponent as a4, RichTextEmojiButtonComponent as a5, RichTextEmojiDirective as a6, RichTextFileImportButtonComponent as a7, RichTextFileImportDirective as a8, RichTextFileImportOverlayComponent as a9, TRANSPARENT_PIXEL as aA, addonSetting as aB, anchorOverlay as aC, applyImageAlignment as aD, applyStarterStyle as aE, assertFlatParams as aF, bindRichTextActions as aG, blockquoteDepthOf as aH, buildDefaultSlashCommands as aI, buildEntityInsertNode as aJ, buildEntityRenderContext as aK, buildFindIndex as aL, buildLineIndex as aM, caretPosition as aN, childList as aO, classifyImport as aP, compileFindRegex as aQ, computeSeedStyleString as aR, containsCssUrl as aS, createImageElement as aT, cssFunctionCalls as aU, dataUrlToFile as aV, decodeCssEscapes as aW, detectTrigger as aX, directionOf as aY, dragHasSupportedDocument as aZ, extractCssUrls as a_, RichTextHistoryDirective as aa, RichTextHistoryPanelComponent as ab, RichTextImageResizerComponent as ac, RichTextImagesButtonComponent as ad, RichTextImagesDirective as ae, RichTextImagesOverlayComponent as af, RichTextLinksButtonComponent as ag, RichTextLinksDirective as ah, RichTextLinksFormComponent as ai, RichTextMarkdownService as aj, RichTextMentionPopoverComponent as ak, RichTextMentionsDirective as al, RichTextOutlineDirective as am, RichTextOutlinePanelComponent as an, RichTextPasteNormalizerService as ao, RichTextSanitizerService as ap, RichTextSlashCommandsDirective as aq, RichTextSlashCommandsMenuComponent as ar, RichTextTablesButtonComponent as as, RichTextTablesDirective as at, RichTextToolbarComponent as au, RichTextToolbarViewContext as av, RichTextTypographyButtonComponent as aw, RichTextTypographyDirective as ax, TEXT_STYLE_OPTIONS as ay, TOOLBAR_BUTTONS as az, AddonSlotRegistry as b, validateActionParams as b$, hasUnsafeCssFunction as b0, holdsNothing as b1, hostOf as b2, hoverCardAction as b3, hoverCardHandlers as b4, inlineElementsHoldingBlocks as b5, isCombinedOnElement as b6, isHostAllowed as b7, isHostBearingUrl as b8, isLineOwner as b9, offsetToPosition as bA, openDialogAction as bB, openDialogHandlers as bC, parseImageSize as bD, placeCaretIn as bE, placeImageAtSelection as bF, positionAfterLine as bG, rangeShowsNothing as bH, readActions as bI, readFileAsDataUrl as bJ, remoteHostOf as bK, removeAction as bL, reportResourceDecisions as bM, resolveFromPage as bN, richTextHasMedia as bO, richTextMaxLength as bP, richTextMinWords as bQ, richTextRequired as bR, richTextVisibleText as bS, rowRunsOf as bT, selectTriggerRange as bU, separateListKinds as bV, simpleHash as bW, stripCssComments as bX, stripStyleIfMatches as bY, structureAround as bZ, validateActionId as b_, isNestedList as ba, isPdfHeader as bb, isPhrasing as bc, isRichTextEmpty as bd, isSupportedDocumentFile as be, isZipHeader as bf, labelBlockedImages as bg, lastOwnInlineNode as bh, lineAbove as bi, lineBelow as bj, lineIsEmpty as bk, lineIsTextOnly as bl, lineKeepsItsElement as bm, lineOf as bn, lineOwnNodes as bo, lineTagIsFixed as bp, lineText as bq, linesBetween as br, linesMayJoin as bs, linkedPreviewDialogAction as bt, linkedPreviewDialogHandlers as bu, matchBlockInputRule as bv, matchInlineInputRule as bw, mountTopLayer as bx, nodeShowsNothing as by, normalizeHostEntry as bz, DEFAULT_FONT_FAMILIES as c, writeAction as c0, writeCombined as c1, DEFAULT_HIGHLIGHT_PALETTE as d, DEFAULT_LINK_SCHEMES as e, DEFAULT_TOOLBAR_ITEMS as f, DOCUMENT_IMPORT_ACCEPT as g, DOCX_MIME as h, isValidImageMagicBytes as i, FIND_MAX_QUERY_LENGTH as j, INLINE_RULE_LOOKBEHIND as k, PresetDialogComponent as l, PresetHoverCardComponent as m, RICH_TEXT_AI_CONTEXT as n, RICH_TEXT_AI_LOCALES as o, RICH_TEXT_COLORS_LOCALES as p, RICH_TEXT_COLOR_BUTTON_CONTEXT as q, RICH_TEXT_EMOJI_CONTEXT as r, RICH_TEXT_EMOJI_LOCALES as s, RICH_TEXT_FILE_IMPORT_BUTTON_CONTEXT as t, RICH_TEXT_FILE_IMPORT_LOCALES as u, RICH_TEXT_HISTORY_LOCALES as v, RICH_TEXT_IMAGES_BUTTON_CONTEXT as w, RICH_TEXT_IMAGES_LOCALES as x, RICH_TEXT_LINKS_BUTTON_CONTEXT as y, RICH_TEXT_LINKS_LOCALES as z };
40208
- //# sourceMappingURL=gilav21-shadcn-angular-rte-gilav21-shadcn-angular-rte-BnEAQOuU.mjs.map
40455
+ //# sourceMappingURL=gilav21-shadcn-angular-rte-gilav21-shadcn-angular-rte-CHDlfOxW.mjs.map