@raqm/ui 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +87 -126
  3. package/fesm2022/raqm-ui-badge.mjs +3 -1
  4. package/fesm2022/raqm-ui-badge.mjs.map +1 -1
  5. package/fesm2022/raqm-ui-calendar.mjs +79 -12
  6. package/fesm2022/raqm-ui-calendar.mjs.map +1 -1
  7. package/fesm2022/raqm-ui-combobox.mjs +47 -23
  8. package/fesm2022/raqm-ui-combobox.mjs.map +1 -1
  9. package/fesm2022/raqm-ui-command.mjs +60 -12
  10. package/fesm2022/raqm-ui-command.mjs.map +1 -1
  11. package/fesm2022/raqm-ui-dialog.mjs +1 -3
  12. package/fesm2022/raqm-ui-dialog.mjs.map +1 -1
  13. package/fesm2022/raqm-ui-icon.mjs +160 -0
  14. package/fesm2022/raqm-ui-icon.mjs.map +1 -0
  15. package/fesm2022/raqm-ui-input-otp.mjs +7 -4
  16. package/fesm2022/raqm-ui-input-otp.mjs.map +1 -1
  17. package/fesm2022/raqm-ui-overlay-internal.mjs +15 -5
  18. package/fesm2022/raqm-ui-overlay-internal.mjs.map +1 -1
  19. package/fesm2022/raqm-ui-popover.mjs +51 -19
  20. package/fesm2022/raqm-ui-popover.mjs.map +1 -1
  21. package/fesm2022/raqm-ui-resizable.mjs +14 -4
  22. package/fesm2022/raqm-ui-resizable.mjs.map +1 -1
  23. package/fesm2022/raqm-ui-scroll-area.mjs +85 -29
  24. package/fesm2022/raqm-ui-scroll-area.mjs.map +1 -1
  25. package/fesm2022/raqm-ui-select.mjs +46 -19
  26. package/fesm2022/raqm-ui-select.mjs.map +1 -1
  27. package/fesm2022/raqm-ui-sidebar.mjs +13 -3
  28. package/fesm2022/raqm-ui-sidebar.mjs.map +1 -1
  29. package/fesm2022/raqm-ui-slider.mjs +59 -12
  30. package/fesm2022/raqm-ui-slider.mjs.map +1 -1
  31. package/fesm2022/raqm-ui-toast.mjs +60 -20
  32. package/fesm2022/raqm-ui-toast.mjs.map +1 -1
  33. package/fesm2022/raqm-ui-tooltip.mjs +28 -3
  34. package/fesm2022/raqm-ui-tooltip.mjs.map +1 -1
  35. package/fesm2022/raqm-ui.mjs +1 -0
  36. package/package.json +53 -20
  37. package/styles/accordion.css +1 -0
  38. package/styles/alert-dialog.css +1 -0
  39. package/styles/alert.css +1 -0
  40. package/styles/attachment.css +1 -0
  41. package/styles/avatar.css +1 -0
  42. package/styles/badge.css +1 -0
  43. package/styles/base.css +1 -0
  44. package/styles/button-group.css +1 -0
  45. package/styles/button.css +1 -0
  46. package/styles/checkbox.css +1 -0
  47. package/styles/combobox.css +1 -0
  48. package/styles/command.css +1 -0
  49. package/styles/common.css +17 -0
  50. package/styles/context-menu.css +1 -0
  51. package/styles/dialog.css +1 -0
  52. package/styles/drawer.css +1 -0
  53. package/styles/dropdown-menu.css +1 -0
  54. package/styles/empty.css +1 -0
  55. package/styles/field-parts.css +1 -0
  56. package/styles/field-relationships.css +1 -0
  57. package/styles/input-group-button.css +1 -0
  58. package/styles/input-group-relationships.css +1 -0
  59. package/styles/input-otp.css +1 -0
  60. package/styles/input.css +1 -0
  61. package/styles/item.css +1 -0
  62. package/styles/kbd.css +1 -0
  63. package/styles/menubar.css +1 -0
  64. package/styles/native-select.css +1 -0
  65. package/styles/navigation-menu.css +1 -0
  66. package/styles/overlay.css +1 -0
  67. package/styles/pagination.css +1 -0
  68. package/styles/popover.css +1 -0
  69. package/styles/questionnaire.css +1 -0
  70. package/styles/radio-group.css +1 -0
  71. package/styles/resizable.css +1 -0
  72. package/styles/sheet.css +1 -0
  73. package/styles/sidebar.css +1 -0
  74. package/styles/spinner.css +1 -0
  75. package/styles/switch.css +1 -0
  76. package/styles/table.css +1 -0
  77. package/styles/tabs.css +1 -0
  78. package/styles/textarea.css +1 -0
  79. package/styles/theme.css +50 -4324
  80. package/styles/toggle-group.css +1 -0
  81. package/styles/toggle.css +1 -0
  82. package/styles/tooltip.css +1 -0
  83. package/types/raqm-ui-calendar.d.ts +1 -0
  84. package/types/raqm-ui-combobox.d.ts +8 -4
  85. package/types/raqm-ui-command.d.ts +4 -0
  86. package/types/raqm-ui-dialog.d.ts +7 -1
  87. package/types/raqm-ui-icon.d.ts +65 -0
  88. package/types/raqm-ui-input-otp.d.ts +1 -0
  89. package/types/raqm-ui-resizable.d.ts +4 -0
  90. package/types/raqm-ui-scroll-area.d.ts +11 -0
  91. package/types/raqm-ui-slider.d.ts +1 -1
  92. package/types/raqm-ui-toast.d.ts +6 -0
  93. package/types/raqm-ui.d.ts +1 -0
  94. package/fesm2022/raqm-ui-carousel.mjs +0 -410
  95. package/fesm2022/raqm-ui-carousel.mjs.map +0 -1
  96. package/types/raqm-ui-carousel.d.ts +0 -81
@@ -1 +1 @@
1
- {"version":3,"file":"raqm-ui-input-otp.mjs","names":[],"sources":["../../../projects/ui/input-otp/input-otp-context.ts","../../../projects/ui/input-otp/input-otp-parts.ts","../../../projects/ui/input-otp/input-otp.ts","../../../projects/ui/input-otp/input-otp.component.html","../../../projects/ui/input-otp/public-api.ts"],"sourcesContent":["// Input OTP contract: the internal state the decorative slots mirror from the root.\r\n\r\nimport { InjectionToken, Signal } from '@angular/core';\r\n\r\n/** Internal state read by the decorative slots; only the native input is interactive. */\r\nexport interface RaqmInputOtpContext {\r\n readonly currentValue: Signal<string>;\r\n readonly invalidState: Signal<boolean>;\r\n isActive(index: number): boolean;\r\n}\r\nexport const RAQM_INPUT_OTP = new InjectionToken<RaqmInputOtpContext>('RaqmInputOtp');\r\n","// Input OTP presentation parts: the grouping, one mirrored slot and the decorative separator.\r\n// None of them is a tab stop; the root's single native `<input>` stays the only control.\r\n\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n Directive,\r\n computed,\r\n inject,\r\n input,\r\n} from '@angular/core';\r\n\r\nimport { RAQM_INPUT_OTP } from './input-otp-context';\r\n\r\n/** Visual grouping of adjoining OTP slots; never introduces another tab stop. */\r\n@Directive({\r\n selector: 'raqm-input-otp-group, [raqm-input-otp-group]',\r\n host: {\r\n class: 'raqm-input-otp-group',\r\n 'data-raqm-slot': 'input-otp-group',\r\n 'aria-hidden': 'true',\r\n },\r\n})\r\nexport class RaqmInputOtpGroupDirective {}\r\n\r\n/** One indexed presentation slot mirrored from the root's single native input. */\r\n@Component({\r\n selector: 'raqm-input-otp-slot',\r\n template: `{{ char() }}\r\n @if (active() && !char()) {\r\n <span class=\"raqm-input-otp-slot__caret\"><span></span></span>\r\n }`,\r\n styleUrl: './input-otp-slot.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'raqm-input-otp-slot',\r\n 'data-raqm-slot': 'input-otp-slot',\r\n 'aria-hidden': 'true',\r\n '[attr.data-raqm-index]': 'index()',\r\n '[attr.data-raqm-active]': 'active()',\r\n '[attr.aria-invalid]': 'invalid() ? \"true\" : null',\r\n },\r\n})\r\nexport class RaqmInputOtpSlotComponent {\r\n readonly index = input.required<number>();\r\n readonly ariaInvalid = input<string | boolean | null>(null, { alias: 'aria-invalid' });\r\n private readonly root = inject(RAQM_INPUT_OTP);\r\n protected readonly char = computed(() => this.root.currentValue()[this.index()] ?? '');\r\n protected readonly active = computed(() => this.root.isActive(this.index()));\r\n protected readonly invalid = computed(\r\n () =>\r\n this.root.invalidState() ||\r\n (this.ariaInvalid() !== null &&\r\n this.ariaInvalid() !== false &&\r\n this.ariaInvalid() !== 'false'),\r\n );\r\n}\r\n\r\n/** Decorative separator, hidden from the input's accessible value. */\r\n@Component({\r\n selector: 'raqm-input-otp-separator',\r\n template: `<svg\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n aria-hidden=\"true\"\r\n >\r\n <path d=\"M5 12h14\" />\r\n </svg>`,\r\n styleUrl: './input-otp-separator.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'raqm-input-otp-separator',\r\n 'data-raqm-slot': 'input-otp-separator',\r\n role: 'separator',\r\n 'aria-hidden': 'true',\r\n },\r\n})\r\nexport class RaqmInputOtpSeparatorComponent {}\r\n","// Input OTP root: one native text input with projected slot presentation. The grouping, slot\r\n// and separator parts live in `input-otp-parts.ts` and re-export through this module.\r\n\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n DestroyRef,\r\n ElementRef,\r\n afterEveryRender,\r\n afterRenderEffect,\r\n booleanAttribute,\r\n computed,\r\n inject,\r\n input,\r\n output,\r\n signal,\r\n viewChild,\r\n} from '@angular/core';\r\n\r\nimport { RAQM_INPUT_OTP } from './input-otp-context';\r\n\r\nexport { RAQM_INPUT_OTP } from './input-otp-context';\r\nexport type { RaqmInputOtpContext } from './input-otp-context';\r\nexport {\r\n RaqmInputOtpGroupDirective,\r\n RaqmInputOtpSeparatorComponent,\r\n RaqmInputOtpSlotComponent,\r\n} from './input-otp-parts';\r\n\r\n/**\r\n * One native text input with projected OTP slot presentation.\r\n *\r\n * @remarks\r\n * A composite widget, not a form control: no `ControlValueAccessor` ships. The projection adds no\r\n * tab stop — the single native `<input>` is the only control, and its forwarded `id` keeps\r\n * `<label for>` and the `aria-*` aliases on the real control.\r\n */\r\n@Component({\r\n selector: 'raqm-input-otp',\r\n templateUrl: './input-otp.component.html',\r\n styleUrl: './input-otp.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [{ provide: RAQM_INPUT_OTP, useExisting: RaqmInputOtpComponent }],\r\n host: {\r\n class: 'raqm-input-otp',\r\n '[attr.id]': 'null',\r\n '[attr.aria-label]': 'null',\r\n '[attr.aria-labelledby]': 'null',\r\n '[attr.aria-describedby]': 'null',\r\n '[attr.aria-invalid]': 'null',\r\n '[attr.data-raqm-disabled]': 'disabled() ? \"\" : null',\r\n '[attr.data-raqm-invalid]': 'invalidState() ? \"\" : null',\r\n translate: 'no',\r\n },\r\n})\r\nexport class RaqmInputOtpComponent {\r\n readonly maxLength = input.required<number>();\r\n readonly value = input<string | undefined>(undefined);\r\n readonly defaultValue = input('');\r\n /** Optional value pattern; pass `^\\\\d+$` to allow digits only. */\r\n readonly pattern = input<string | RegExp | undefined>(undefined);\r\n readonly disabled = input(false, { transform: booleanAttribute });\r\n readonly required = input(false, { transform: booleanAttribute });\r\n readonly readOnly = input(false, { transform: booleanAttribute });\r\n readonly invalid = input(false, { transform: booleanAttribute });\r\n readonly id = input<string | null>(null);\r\n readonly name = input<string | null>(null);\r\n readonly form = input<string | null>(null);\r\n readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\r\n readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\r\n readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\r\n readonly ariaInvalid = input<string | boolean | null>(null, { alias: 'aria-invalid' });\r\n readonly autoComplete = input('one-time-code');\r\n readonly inputMode = input('numeric');\r\n readonly pasteTransformer = input<((text: string) => string) | undefined>(undefined);\r\n readonly valueChange = output<string>();\r\n readonly complete = output<string>();\r\n\r\n private readonly localValue = signal<string | undefined>(undefined);\r\n private readonly control = viewChild.required<ElementRef<HTMLInputElement>>('control');\r\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\r\n private readonly destroyRef = inject(DestroyRef);\r\n private composing = false;\r\n private pointerStart: { x: number; y: number } | null = null;\r\n readonly focused = signal(false);\r\n readonly selectionStart = signal(0);\r\n readonly selectionEnd = signal(0);\r\n readonly length = computed(() => Math.max(1, Math.floor(this.maxLength()) || 1));\r\n readonly currentValue = computed(() =>\r\n this.clean(this.value() ?? this.localValue() ?? this.defaultValue()),\r\n );\r\n readonly patternSource = computed(() => {\r\n const pattern = this.pattern();\r\n return typeof pattern === 'string' ? pattern : (pattern?.source ?? null);\r\n });\r\n readonly invalidState = computed(\r\n () =>\r\n this.invalid() ||\r\n (this.ariaInvalid() !== null &&\r\n this.ariaInvalid() !== false &&\r\n this.ariaInvalid() !== 'false'),\r\n );\r\n\r\n constructor() {\r\n afterEveryRender(() => {\r\n const control = this.control().nativeElement;\r\n if (!this.composing && control.value !== this.currentValue()) {\r\n control.value = this.currentValue();\r\n this.syncSelection();\r\n }\r\n });\r\n afterRenderEffect((cleanup) => {\r\n const control = this.control().nativeElement;\r\n const document = control.ownerDocument;\r\n const selection = () => this.syncSelection();\r\n document.addEventListener('selectionchange', selection);\r\n const form = control.form;\r\n const reset = (event: Event) =>\r\n queueMicrotask(() => {\r\n if (!event.defaultPrevented && !this.destroyRef.destroyed) {\r\n if (this.value() === undefined) this.localValue.set(this.clean(this.defaultValue()));\r\n control.value = this.currentValue();\r\n this.syncSelection();\r\n }\r\n });\r\n form?.addEventListener('reset', reset);\r\n cleanup(() => {\r\n document.removeEventListener('selectionchange', selection);\r\n form?.removeEventListener('reset', reset);\r\n });\r\n });\r\n }\r\n\r\n private matches(value: string): boolean {\r\n // Cloned so a stateful /g or /y lastIndex cannot affect later edits.\r\n const pattern = this.pattern();\r\n if (pattern === undefined) return true;\r\n const regex =\r\n typeof pattern === 'string'\r\n ? new RegExp(pattern)\r\n : new RegExp(pattern.source, pattern.flags.replace(/[gy]/g, ''));\r\n return value === '' || regex.test(value);\r\n }\r\n\r\n private clean(value: string): string {\r\n const capped = value.slice(0, this.length());\r\n if (this.matches(capped)) return capped;\r\n const filtered = Array.from(value)\r\n .filter((char) => this.matches(char))\r\n .join('')\r\n .slice(0, this.length());\r\n return this.matches(filtered) ? filtered : '';\r\n }\r\n\r\n private commit(value: string, caret: number): void {\r\n const previous = this.currentValue();\r\n if (value !== previous) {\r\n if (this.value() === undefined) this.localValue.set(value);\r\n this.valueChange.emit(value);\r\n if (previous.length < this.length() && value.length === this.length())\r\n this.complete.emit(value);\r\n }\r\n const control = this.control().nativeElement;\r\n // Parent bindings settle on the next render; reconciliation never steals focus.\r\n control.value = value;\r\n const position = Math.min(caret, control.value.length);\r\n control.setSelectionRange(position, position);\r\n this.syncSelection();\r\n }\r\n\r\n protected onInput(event: Event): void {\r\n if (this.composing || (event as InputEvent).isComposing) return;\r\n const control = this.control().nativeElement;\r\n if (this.disabled() || this.readOnly()) {\r\n control.value = this.currentValue();\r\n return;\r\n }\r\n const raw = control.value;\r\n const caret = this.clean(raw.slice(0, control.selectionStart ?? raw.length)).length;\r\n const next = this.clean(raw);\r\n // Entirely invalid edits restore the old value rather than erasing a valid code.\r\n this.commit(raw !== '' && next === '' ? this.currentValue() : next, caret);\r\n }\r\n\r\n protected onPaste(event: ClipboardEvent): void {\r\n if (!event.clipboardData || this.disabled() || this.readOnly()) return;\r\n event.preventDefault();\r\n const control = this.control().nativeElement;\r\n const raw = event.clipboardData.getData('text/plain');\r\n const pasted = this.clean(this.pasteTransformer()?.(raw) ?? raw);\r\n // Invalid clipboard content never deletes the selected text.\r\n if (!pasted) return;\r\n const current = this.currentValue();\r\n const start = Math.min(control.selectionStart ?? current.length, current.length);\r\n const end = Math.min(control.selectionEnd ?? start, current.length);\r\n const available = this.length() - (current.length - (end - start));\r\n const inserted = pasted.slice(0, Math.max(0, available));\r\n const next = current.slice(0, start) + inserted + current.slice(end);\r\n if (this.matches(next)) this.commit(next, start + inserted.length);\r\n }\r\n\r\n protected onCompositionStart(): void {\r\n this.composing = true;\r\n }\r\n protected onCompositionEnd(event: Event): void {\r\n this.composing = false;\r\n this.onInput(event);\r\n }\r\n\r\n protected onFocus(): void {\r\n this.focused.set(true);\r\n const control = this.control().nativeElement;\r\n control.setSelectionRange(\r\n Math.min(control.value.length, this.length() - 1),\r\n control.value.length,\r\n );\r\n this.syncSelection();\r\n }\r\n\r\n protected onBlur(): void {\r\n this.focused.set(false);\r\n }\r\n\r\n protected onPointerDown(event: PointerEvent): void {\r\n this.pointerStart = { x: event.clientX, y: event.clientY };\r\n }\r\n\r\n protected onClick(event: MouseEvent): void {\r\n if (this.disabled() || event.detail === 0) return;\r\n const control = this.control().nativeElement;\r\n // Native drag and double/triple-click selections are left untouched.\r\n if (\r\n event.detail > 1 ||\r\n (this.pointerStart &&\r\n (Math.abs(event.clientX - this.pointerStart.x) > 4 ||\r\n Math.abs(event.clientY - this.pointerStart.y) > 4))\r\n )\r\n return;\r\n const slots = Array.from(\r\n this.host.nativeElement.querySelectorAll<HTMLElement>('[data-raqm-slot=\"input-otp-slot\"]'),\r\n );\r\n const target = slots.find((slot) => {\r\n const rect = slot.getBoundingClientRect();\r\n return (\r\n event.clientX >= rect.left &&\r\n event.clientX <= rect.right &&\r\n event.clientY >= rect.top &&\r\n event.clientY <= rect.bottom\r\n );\r\n });\r\n if (target) {\r\n const index = Math.min(Number(target.dataset['index']), control.value.length);\r\n control.setSelectionRange(index, Math.min(index + 1, control.value.length));\r\n this.syncSelection();\r\n }\r\n }\r\n\r\n protected syncSelection(): void {\r\n const control = this.control().nativeElement;\r\n if (control.ownerDocument.activeElement !== control || this.composing) return;\r\n let start = control.selectionStart ?? 0;\r\n let end = control.selectionEnd ?? start;\r\n // Existing characters are selected for replacement; the empty trailing slot stays in insert mode.\r\n if (\r\n start === end &&\r\n control.value.length > 0 &&\r\n !(start === control.value.length && start < this.length())\r\n ) {\r\n const backwards = start < this.selectionEnd();\r\n if (start === this.length() || (backwards && start > 0)) start -= 1;\r\n end = Math.min(start + 1, control.value.length);\r\n control.setSelectionRange(start, end, backwards ? 'backward' : 'forward');\r\n }\r\n this.selectionStart.set(start);\r\n this.selectionEnd.set(end);\r\n }\r\n\r\n isActive(index: number): boolean {\r\n return (\r\n !this.disabled() &&\r\n this.focused() &&\r\n (this.selectionStart() === this.selectionEnd()\r\n ? index === this.selectionStart()\r\n : index >= this.selectionStart() && index < this.selectionEnd())\r\n );\r\n }\r\n}\r\n","<ng-content />\r\n<input\r\n #control\r\n class=\"raqm-input-otp__input\"\r\n data-raqm-slot=\"input-otp\"\r\n type=\"text\"\r\n [id]=\"id()\"\r\n [value]=\"currentValue()\"\r\n [attr.maxlength]=\"length()\"\r\n [attr.pattern]=\"patternSource()\"\r\n [disabled]=\"disabled()\"\r\n [required]=\"required()\"\r\n [readOnly]=\"readOnly()\"\r\n [attr.name]=\"name()\"\r\n [attr.form]=\"form()\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [attr.aria-labelledby]=\"ariaLabelledby()\"\r\n [attr.aria-describedby]=\"ariaDescribedby()\"\r\n [attr.aria-invalid]=\"invalidState() ? ariaInvalid() || 'true' : null\"\r\n [attr.autocomplete]=\"autoComplete()\"\r\n [attr.inputmode]=\"inputMode()\"\r\n [spellcheck]=\"false\"\r\n autocapitalize=\"off\"\r\n (input)=\"onInput($event)\"\r\n (change)=\"onInput($event)\"\r\n (paste)=\"onPaste($event)\"\r\n (compositionstart)=\"onCompositionStart()\"\r\n (compositionend)=\"onCompositionEnd($event)\"\r\n (focus)=\"onFocus()\"\r\n (blur)=\"onBlur()\"\r\n (click)=\"onClick($event)\"\r\n (pointerdown)=\"onPointerDown($event)\"\r\n (select)=\"syncSelection()\"\r\n (keyup)=\"syncSelection()\"\r\n/>\r\n","// Public API for `@raqm/ui/input-otp`; the root entry point re-exports these symbols.\r\nimport {\r\n RaqmInputOtpComponent,\r\n RaqmInputOtpGroupDirective,\r\n RaqmInputOtpSeparatorComponent,\r\n RaqmInputOtpSlotComponent,\r\n} from './input-otp';\r\n\r\nexport {\r\n RaqmInputOtpComponent,\r\n RaqmInputOtpGroupDirective,\r\n RaqmInputOtpSeparatorComponent,\r\n RaqmInputOtpSlotComponent,\r\n};\r\n\r\n// The family imports as `imports: [RaqmInputOtp]`.\r\nexport const RaqmInputOtp = [\r\n RaqmInputOtpComponent,\r\n RaqmInputOtpGroupDirective,\r\n RaqmInputOtpSlotComponent,\r\n RaqmInputOtpSeparatorComponent,\r\n] as const;\r\n"],"mappings":";;AAUA,MAAa,iBAAiB,IAAI,eAAoC,cAAc;ACapF,IAAa,6BAAb,MAAa,2BAA0B;CAA1B,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAA0B,MAAA,C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A,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,cAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,kBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,aAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,UAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,WAAS,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA;AE/DvF,MAAa,eAAe;CAC1B;CACA;CACA;CACA;AACQ"}
1
+ {"version":3,"file":"raqm-ui-input-otp.mjs","names":[],"sources":["../../../projects/ui/input-otp/input-otp-context.ts","../../../projects/ui/input-otp/input-otp-parts.ts","../../../projects/ui/input-otp/input-otp.ts","../../../projects/ui/input-otp/input-otp.component.html","../../../projects/ui/input-otp/public-api.ts"],"sourcesContent":["// Input OTP contract: the internal state the decorative slots mirror from the root.\r\n\r\nimport { InjectionToken, Signal } from '@angular/core';\r\n\r\n/** Internal state read by the decorative slots; only the native input is interactive. */\r\nexport interface RaqmInputOtpContext {\r\n readonly currentValue: Signal<string>;\r\n readonly invalidState: Signal<boolean>;\r\n isActive(index: number): boolean;\r\n}\r\nexport const RAQM_INPUT_OTP = new InjectionToken<RaqmInputOtpContext>('RaqmInputOtp');\r\n","// Input OTP presentation parts: the grouping, one mirrored slot and the decorative separator.\r\n// None of them is a tab stop; the root's single native `<input>` stays the only control.\r\n\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n Directive,\r\n computed,\r\n inject,\r\n input,\r\n} from '@angular/core';\r\n\r\nimport { RAQM_INPUT_OTP } from './input-otp-context';\r\n\r\n/** Visual grouping of adjoining OTP slots; never introduces another tab stop. */\r\n@Directive({\r\n selector: 'raqm-input-otp-group, [raqm-input-otp-group]',\r\n host: {\r\n class: 'raqm-input-otp-group',\r\n 'data-raqm-slot': 'input-otp-group',\r\n 'aria-hidden': 'true',\r\n },\r\n})\r\nexport class RaqmInputOtpGroupDirective {}\r\n\r\n/** One indexed presentation slot mirrored from the root's single native input. */\r\n@Component({\r\n selector: 'raqm-input-otp-slot',\r\n template: `{{ char() }}\r\n @if (active() && !char()) {\r\n <span class=\"raqm-input-otp-slot__caret\"><span></span></span>\r\n }`,\r\n styleUrl: './input-otp-slot.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'raqm-input-otp-slot',\r\n 'data-raqm-slot': 'input-otp-slot',\r\n 'aria-hidden': 'true',\r\n '[attr.data-raqm-index]': 'index()',\r\n '[attr.data-raqm-active]': 'active()',\r\n '[attr.aria-invalid]': 'invalid() ? \"true\" : null',\r\n },\r\n})\r\nexport class RaqmInputOtpSlotComponent {\r\n readonly index = input.required<number>();\r\n readonly ariaInvalid = input<string | boolean | null>(null, { alias: 'aria-invalid' });\r\n private readonly root = inject(RAQM_INPUT_OTP);\r\n protected readonly char = computed(() => this.root.currentValue()[this.index()] ?? '');\r\n protected readonly active = computed(() => this.root.isActive(this.index()));\r\n protected readonly invalid = computed(\r\n () =>\r\n this.root.invalidState() ||\r\n (this.ariaInvalid() !== null &&\r\n this.ariaInvalid() !== false &&\r\n this.ariaInvalid() !== 'false'),\r\n );\r\n}\r\n\r\n/** Decorative separator, hidden from the input's accessible value. */\r\n@Component({\r\n selector: 'raqm-input-otp-separator',\r\n template: `<svg\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n aria-hidden=\"true\"\r\n >\r\n <path d=\"M5 12h14\" />\r\n </svg>`,\r\n styleUrl: './input-otp-separator.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'raqm-input-otp-separator',\r\n 'data-raqm-slot': 'input-otp-separator',\r\n role: 'separator',\r\n 'aria-hidden': 'true',\r\n },\r\n})\r\nexport class RaqmInputOtpSeparatorComponent {}\r\n","// Input OTP root: one native text input with projected slot presentation. The grouping, slot\r\n// and separator parts live in `input-otp-parts.ts` and re-export through this module.\r\n\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n DestroyRef,\r\n ElementRef,\r\n afterEveryRender,\r\n afterRenderEffect,\r\n booleanAttribute,\r\n computed,\r\n inject,\r\n input,\r\n output,\r\n signal,\r\n viewChild,\r\n} from '@angular/core';\r\n\r\nimport { RAQM_INPUT_OTP } from './input-otp-context';\r\n\r\nexport { RAQM_INPUT_OTP } from './input-otp-context';\r\nexport type { RaqmInputOtpContext } from './input-otp-context';\r\nexport {\r\n RaqmInputOtpGroupDirective,\r\n RaqmInputOtpSeparatorComponent,\r\n RaqmInputOtpSlotComponent,\r\n} from './input-otp-parts';\r\n\r\n/**\r\n * One native text input with projected OTP slot presentation.\r\n *\r\n * @remarks\r\n * A composite widget, not a form control: no `ControlValueAccessor` ships. The projection adds no\r\n * tab stop — the single native `<input>` is the only control, and its forwarded `id` keeps\r\n * `<label for>` and the `aria-*` aliases on the real control.\r\n */\r\n@Component({\r\n selector: 'raqm-input-otp',\r\n templateUrl: './input-otp.component.html',\r\n styleUrl: './input-otp.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [{ provide: RAQM_INPUT_OTP, useExisting: RaqmInputOtpComponent }],\r\n host: {\r\n class: 'raqm-input-otp',\r\n '[attr.id]': 'null',\r\n '[attr.aria-label]': 'null',\r\n '[attr.aria-labelledby]': 'null',\r\n '[attr.aria-describedby]': 'null',\r\n '[attr.aria-invalid]': 'null',\r\n '[attr.data-raqm-disabled]': 'disabled() ? \"\" : null',\r\n '[attr.data-raqm-invalid]': 'invalidState() ? \"\" : null',\r\n translate: 'no',\r\n },\r\n})\r\nexport class RaqmInputOtpComponent {\r\n readonly maxLength = input.required<number>();\r\n readonly value = input<string | undefined>(undefined);\r\n readonly defaultValue = input('');\r\n /** Optional value pattern; pass `^\\\\d+$` to allow digits only. */\r\n readonly pattern = input<string | RegExp | undefined>(undefined);\r\n readonly disabled = input(false, { transform: booleanAttribute });\r\n readonly required = input(false, { transform: booleanAttribute });\r\n readonly readOnly = input(false, { transform: booleanAttribute });\r\n readonly invalid = input(false, { transform: booleanAttribute });\r\n readonly id = input<string | null>(null);\r\n readonly name = input<string | null>(null);\r\n readonly form = input<string | null>(null);\r\n readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\r\n readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\r\n readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\r\n readonly ariaInvalid = input<string | boolean | null>(null, { alias: 'aria-invalid' });\r\n readonly autoComplete = input('one-time-code');\r\n readonly inputMode = input('numeric');\r\n readonly pasteTransformer = input<((text: string) => string) | undefined>(undefined);\r\n readonly valueChange = output<string>();\r\n readonly complete = output<string>();\r\n\r\n private readonly localValue = signal<string | undefined>(undefined);\r\n private readonly control = viewChild.required<ElementRef<HTMLInputElement>>('control');\r\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\r\n private readonly destroyRef = inject(DestroyRef);\r\n private composing = false;\r\n private pointerStart: { x: number; y: number } | null = null;\r\n readonly focused = signal(false);\r\n readonly selectionStart = signal(0);\r\n readonly selectionEnd = signal(0);\r\n readonly length = computed(() => Math.max(1, Math.floor(this.maxLength()) || 1));\r\n readonly currentValue = computed(() =>\r\n this.clean(this.value() ?? this.localValue() ?? this.defaultValue()),\r\n );\r\n readonly patternSource = computed(() => {\r\n const pattern = this.pattern();\r\n return typeof pattern === 'string' ? pattern : (pattern?.source ?? null);\r\n });\r\n // Compiled once per pattern input; a string stays raw regex source and stateful g/y\r\n // flags are dropped so repeated tests cannot skip later edits.\r\n private readonly validationRegex = computed(() => {\r\n const pattern = this.pattern();\r\n if (pattern === undefined) return null;\r\n return typeof pattern === 'string'\r\n ? new RegExp(pattern)\r\n : new RegExp(pattern.source, pattern.flags.replace(/[gy]/g, ''));\r\n });\r\n readonly invalidState = computed(\r\n () =>\r\n this.invalid() ||\r\n (this.ariaInvalid() !== null &&\r\n this.ariaInvalid() !== false &&\r\n this.ariaInvalid() !== 'false'),\r\n );\r\n\r\n constructor() {\r\n afterEveryRender(() => {\r\n const control = this.control().nativeElement;\r\n if (!this.composing && control.value !== this.currentValue()) {\r\n control.value = this.currentValue();\r\n this.syncSelection();\r\n }\r\n });\r\n afterRenderEffect((cleanup) => {\r\n const control = this.control().nativeElement;\r\n const document = control.ownerDocument;\r\n const selection = () => this.syncSelection();\r\n document.addEventListener('selectionchange', selection);\r\n const form = control.form;\r\n const reset = (event: Event) =>\r\n queueMicrotask(() => {\r\n if (!event.defaultPrevented && !this.destroyRef.destroyed) {\r\n if (this.value() === undefined) this.localValue.set(this.clean(this.defaultValue()));\r\n control.value = this.currentValue();\r\n this.syncSelection();\r\n }\r\n });\r\n form?.addEventListener('reset', reset);\r\n cleanup(() => {\r\n document.removeEventListener('selectionchange', selection);\r\n form?.removeEventListener('reset', reset);\r\n });\r\n });\r\n }\r\n\r\n private matches(value: string): boolean {\r\n const regex = this.validationRegex();\r\n return regex === null || value === '' || regex.test(value);\r\n }\r\n\r\n private clean(value: string): string {\r\n const capped = value.slice(0, this.length());\r\n if (this.matches(capped)) return capped;\r\n const filtered = Array.from(value)\r\n .filter((char) => this.matches(char))\r\n .join('')\r\n .slice(0, this.length());\r\n return this.matches(filtered) ? filtered : '';\r\n }\r\n\r\n private commit(value: string, caret: number): void {\r\n const previous = this.currentValue();\r\n if (value !== previous) {\r\n if (this.value() === undefined) this.localValue.set(value);\r\n this.valueChange.emit(value);\r\n if (previous.length < this.length() && value.length === this.length())\r\n this.complete.emit(value);\r\n }\r\n const control = this.control().nativeElement;\r\n // Parent bindings settle on the next render; reconciliation never steals focus.\r\n control.value = value;\r\n const position = Math.min(caret, control.value.length);\r\n control.setSelectionRange(position, position);\r\n this.syncSelection();\r\n }\r\n\r\n protected onInput(event: Event): void {\r\n if (this.composing || (event as InputEvent).isComposing) return;\r\n const control = this.control().nativeElement;\r\n if (this.disabled() || this.readOnly()) {\r\n control.value = this.currentValue();\r\n return;\r\n }\r\n const raw = control.value;\r\n const caret = this.clean(raw.slice(0, control.selectionStart ?? raw.length)).length;\r\n const next = this.clean(raw);\r\n // Entirely invalid edits restore the old value rather than erasing a valid code.\r\n this.commit(raw !== '' && next === '' ? this.currentValue() : next, caret);\r\n }\r\n\r\n protected onPaste(event: ClipboardEvent): void {\r\n if (!event.clipboardData || this.disabled() || this.readOnly()) return;\r\n event.preventDefault();\r\n const control = this.control().nativeElement;\r\n const raw = event.clipboardData.getData('text/plain');\r\n const pasted = this.clean(this.pasteTransformer()?.(raw) ?? raw);\r\n // Invalid clipboard content never deletes the selected text.\r\n if (!pasted) return;\r\n const current = this.currentValue();\r\n const start = Math.min(control.selectionStart ?? current.length, current.length);\r\n const end = Math.min(control.selectionEnd ?? start, current.length);\r\n const available = this.length() - (current.length - (end - start));\r\n const inserted = pasted.slice(0, Math.max(0, available));\r\n const next = current.slice(0, start) + inserted + current.slice(end);\r\n if (this.matches(next)) this.commit(next, start + inserted.length);\r\n }\r\n\r\n protected onCompositionStart(): void {\r\n this.composing = true;\r\n }\r\n protected onCompositionEnd(event: Event): void {\r\n this.composing = false;\r\n this.onInput(event);\r\n }\r\n\r\n protected onFocus(): void {\r\n this.focused.set(true);\r\n const control = this.control().nativeElement;\r\n control.setSelectionRange(\r\n Math.min(control.value.length, this.length() - 1),\r\n control.value.length,\r\n );\r\n this.syncSelection();\r\n }\r\n\r\n protected onBlur(): void {\r\n this.focused.set(false);\r\n }\r\n\r\n protected onPointerDown(event: PointerEvent): void {\r\n this.pointerStart = { x: event.clientX, y: event.clientY };\r\n }\r\n\r\n protected onClick(event: MouseEvent): void {\r\n if (this.disabled() || event.detail === 0) return;\r\n const control = this.control().nativeElement;\r\n // Native drag and double/triple-click selections are left untouched.\r\n if (\r\n event.detail > 1 ||\r\n (this.pointerStart &&\r\n (Math.abs(event.clientX - this.pointerStart.x) > 4 ||\r\n Math.abs(event.clientY - this.pointerStart.y) > 4))\r\n )\r\n return;\r\n const slots = Array.from(\r\n this.host.nativeElement.querySelectorAll<HTMLElement>('[data-raqm-slot=\"input-otp-slot\"]'),\r\n );\r\n const target = slots.find((slot) => {\r\n const rect = slot.getBoundingClientRect();\r\n return (\r\n event.clientX >= rect.left &&\r\n event.clientX <= rect.right &&\r\n event.clientY >= rect.top &&\r\n event.clientY <= rect.bottom\r\n );\r\n });\r\n if (target) {\r\n const index = Math.min(Number(target.dataset['index']), control.value.length);\r\n control.setSelectionRange(index, Math.min(index + 1, control.value.length));\r\n this.syncSelection();\r\n }\r\n }\r\n\r\n protected syncSelection(): void {\r\n const control = this.control().nativeElement;\r\n if (control.ownerDocument.activeElement !== control || this.composing) return;\r\n let start = control.selectionStart ?? 0;\r\n let end = control.selectionEnd ?? start;\r\n // Existing characters are selected for replacement; the empty trailing slot stays in insert mode.\r\n if (\r\n start === end &&\r\n control.value.length > 0 &&\r\n !(start === control.value.length && start < this.length())\r\n ) {\r\n const backwards = start < this.selectionEnd();\r\n if (start === this.length() || (backwards && start > 0)) start -= 1;\r\n end = Math.min(start + 1, control.value.length);\r\n control.setSelectionRange(start, end, backwards ? 'backward' : 'forward');\r\n }\r\n this.selectionStart.set(start);\r\n this.selectionEnd.set(end);\r\n }\r\n\r\n isActive(index: number): boolean {\r\n return (\r\n !this.disabled() &&\r\n this.focused() &&\r\n (this.selectionStart() === this.selectionEnd()\r\n ? index === this.selectionStart()\r\n : index >= this.selectionStart() && index < this.selectionEnd())\r\n );\r\n }\r\n}\r\n","<ng-content />\r\n<input\r\n #control\r\n class=\"raqm-input-otp__input\"\r\n data-raqm-slot=\"input-otp\"\r\n type=\"text\"\r\n [id]=\"id()\"\r\n [value]=\"currentValue()\"\r\n [attr.maxlength]=\"length()\"\r\n [attr.pattern]=\"patternSource()\"\r\n [disabled]=\"disabled()\"\r\n [required]=\"required()\"\r\n [readOnly]=\"readOnly()\"\r\n [attr.name]=\"name()\"\r\n [attr.form]=\"form()\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [attr.aria-labelledby]=\"ariaLabelledby()\"\r\n [attr.aria-describedby]=\"ariaDescribedby()\"\r\n [attr.aria-invalid]=\"invalidState() ? ariaInvalid() || 'true' : null\"\r\n [attr.autocomplete]=\"autoComplete()\"\r\n [attr.inputmode]=\"inputMode()\"\r\n [spellcheck]=\"false\"\r\n autocapitalize=\"off\"\r\n (input)=\"onInput($event)\"\r\n (change)=\"onInput($event)\"\r\n (paste)=\"onPaste($event)\"\r\n (compositionstart)=\"onCompositionStart()\"\r\n (compositionend)=\"onCompositionEnd($event)\"\r\n (focus)=\"onFocus()\"\r\n (blur)=\"onBlur()\"\r\n (click)=\"onClick($event)\"\r\n (pointerdown)=\"onPointerDown($event)\"\r\n (select)=\"syncSelection()\"\r\n (keyup)=\"syncSelection()\"\r\n/>\r\n","// Public API for `@raqm/ui/input-otp`; the root entry point re-exports these symbols.\r\nimport {\r\n RaqmInputOtpComponent,\r\n RaqmInputOtpGroupDirective,\r\n RaqmInputOtpSeparatorComponent,\r\n RaqmInputOtpSlotComponent,\r\n} from './input-otp';\r\n\r\nexport {\r\n RaqmInputOtpComponent,\r\n RaqmInputOtpGroupDirective,\r\n RaqmInputOtpSeparatorComponent,\r\n RaqmInputOtpSlotComponent,\r\n};\r\n\r\n// The family imports as `imports: [RaqmInputOtp]`.\r\nexport const RaqmInputOtp = [\r\n RaqmInputOtpComponent,\r\n RaqmInputOtpGroupDirective,\r\n RaqmInputOtpSlotComponent,\r\n RaqmInputOtpSeparatorComponent,\r\n] as const;\r\n"],"mappings":";;AAUA,MAAa,iBAAiB,IAAI,eAAoC,cAAc;ACapF,IAAa,6BAAb,MAAa,2BAA0B;CAA1B,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAA0B,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAA1B,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAA0B,cAAA;EAAA,UAAA;EAAA,MAAA;GAAA,YAAA;IAAA,kBAAA;IAAA,eAAA;GAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;CAAA,CAAA;;AAA1B,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA0B,YAAA,CAAA;EARtC,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,MAAM;IACJ,OAAO;IACP,kBAAkB;IAClB,eAAe;GAChB;EACF,CAAA;;;AAqBD,IAAa,4BAAb,MAAa,0BAAyB;CAC3B,QAAQ,MAAM,SAAkB,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAChC,cAAc,MAA+B,MAAI;EAAA,GAAA,YAAA,EAAA,WAAA,cAAA,+BAAA,CAAA;EAAI,OAAO;CAAc,CAAA;CAClE,OAAO,OAAO,cAAc;CAC1B,OAAO,eAAe,KAAK,KAAK,aAAY,CAAE,CAAC,KAAK,MAAK,MAAO,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CACnE,SAAS,eAAe,KAAK,KAAK,SAAS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AA,MAAA,CAAA,WAAS,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA;AE/DvF,MAAa,eAAe;CAC1B;CACA;CACA;CACA;AACQ"}
@@ -95,6 +95,7 @@ function bridgeOverlayTheme(origin, pane) {
95
95
  }));
96
96
  const previousTheme = pane.getAttribute("data-raqm-theme");
97
97
  let disposed = false;
98
+ let scheduled = false;
98
99
  const refresh = () => {
99
100
  if (disposed) return;
100
101
  const computed = view.getComputedStyle(origin);
@@ -109,8 +110,16 @@ function bridgeOverlayTheme(origin, pane) {
109
110
  if (pane.getAttribute("data-raqm-theme") !== theme) pane.setAttribute("data-raqm-theme", theme);
110
111
  } else if (pane.hasAttribute("data-raqm-theme")) pane.removeAttribute("data-raqm-theme");
111
112
  };
113
+ const schedule = () => {
114
+ if (disposed || scheduled) return;
115
+ scheduled = true;
116
+ queueMicrotask(() => {
117
+ scheduled = false;
118
+ refresh();
119
+ });
120
+ };
112
121
  refresh();
113
- const observer = typeof view.MutationObserver === "function" ? new view.MutationObserver(refresh) : null;
122
+ const observer = typeof view.MutationObserver === "function" ? new view.MutationObserver(schedule) : null;
114
123
  for (let ancestor = origin; ancestor; ancestor = ancestor.parentElement) observer?.observe(ancestor, {
115
124
  attributes: true,
116
125
  attributeFilter: [
@@ -119,15 +128,16 @@ function bridgeOverlayTheme(origin, pane) {
119
128
  "data-raqm-theme"
120
129
  ]
121
130
  });
122
- view.addEventListener("resize", refresh);
131
+ view.addEventListener("resize", schedule);
123
132
  const media = typeof view.matchMedia === "function" ? ["(prefers-color-scheme: dark)", "(prefers-reduced-motion: reduce)"].map((query) => view.matchMedia(query)) : [];
124
- for (const query of media) query.addEventListener?.("change", refresh);
133
+ for (const query of media) query.addEventListener?.("change", schedule);
125
134
  return () => {
126
135
  if (disposed) return;
127
136
  disposed = true;
137
+ scheduled = false;
128
138
  observer?.disconnect();
129
- view.removeEventListener("resize", refresh);
130
- for (const query of media) query.removeEventListener?.("change", refresh);
139
+ view.removeEventListener("resize", schedule);
140
+ for (const query of media) query.removeEventListener?.("change", schedule);
131
141
  for (const { name, value, priority } of previous) if (value) pane.style.setProperty(name, value, priority);
132
142
  else pane.style.removeProperty(name);
133
143
  if (previousTheme === null) pane.removeAttribute("data-raqm-theme");
@@ -1 +1 @@
1
- {"version":3,"file":"raqm-ui-overlay-internal.mjs","names":[],"sources":["../../../projects/ui/internal/overlay-theme.ts","../../../projects/ui/internal/overlay-ownership.ts"],"sourcesContent":["// Only stylesheet theme tokens belong here; pane-specific geometry variables\r\n// must remain under the overlay owner's control. Keep in sync with _tokens.scss.\r\nconst themeTokens = [\r\n '--raqm-spacing',\r\n '--raqm-radius',\r\n '--raqm-radius-sm',\r\n '--raqm-radius-md',\r\n '--raqm-radius-lg',\r\n '--raqm-radius-xl',\r\n '--raqm-radius-2xl',\r\n '--raqm-font-size-xs',\r\n '--raqm-font-size-sm',\r\n '--raqm-font-size-base',\r\n '--raqm-font-size-lg',\r\n '--raqm-line-height-none',\r\n '--raqm-line-height-tight',\r\n '--raqm-line-height-snug',\r\n '--raqm-line-height-normal',\r\n '--raqm-line-height-relaxed',\r\n '--raqm-font-weight-normal',\r\n '--raqm-font-weight-medium',\r\n '--raqm-shadow-sm',\r\n '--raqm-shadow-md',\r\n '--raqm-shadow-lg',\r\n '--raqm-focus-ring-width',\r\n '--raqm-disabled-opacity',\r\n '--raqm-duration-fast',\r\n '--raqm-duration-base',\r\n '--raqm-duration-slow',\r\n '--raqm-duration-slower',\r\n '--raqm-ease-standard',\r\n '--raqm-ease-in-out',\r\n '--raqm-ease-out',\r\n '--raqm-ease-linear',\r\n '--raqm-ease-emphasized',\r\n '--raqm-background',\r\n '--raqm-foreground',\r\n '--raqm-card',\r\n '--raqm-card-foreground',\r\n '--raqm-popover',\r\n '--raqm-popover-foreground',\r\n '--raqm-primary',\r\n '--raqm-primary-foreground',\r\n '--raqm-secondary',\r\n '--raqm-secondary-foreground',\r\n '--raqm-muted',\r\n '--raqm-muted-foreground',\r\n '--raqm-accent',\r\n '--raqm-accent-foreground',\r\n '--raqm-destructive',\r\n '--raqm-destructive-foreground',\r\n '--raqm-border',\r\n '--raqm-input',\r\n '--raqm-ring',\r\n '--raqm-white',\r\n '--raqm-primary-hover',\r\n '--raqm-secondary-hover',\r\n '--raqm-control-bg',\r\n '--raqm-input-disabled-bg',\r\n '--raqm-invalid-border',\r\n '--raqm-invalid-ring',\r\n '--raqm-focus-ring-color',\r\n '--raqm-outline-border',\r\n '--raqm-outline-hover',\r\n '--raqm-tooltip-kbd-bg',\r\n '--raqm-theme-light-weight',\r\n '--raqm-ghost-hover-alpha',\r\n '--raqm-destructive-bg-alpha',\r\n '--raqm-destructive-hover-alpha',\r\n '--raqm-destructive-focus-alpha',\r\n '--raqm-avatar-blend',\r\n '--raqm-control-bg-alpha',\r\n '--raqm-control-hover-alpha',\r\n '--raqm-field-checked-border-alpha',\r\n '--raqm-field-checked-bg-alpha',\r\n '--raqm-switch-unchecked-alpha',\r\n '--raqm-check-mark',\r\n '--raqm-mixed-mark',\r\n '--raqm-native-select-chevron',\r\n '--raqm-sidebar',\r\n '--raqm-sidebar-foreground',\r\n '--raqm-sidebar-primary',\r\n '--raqm-sidebar-primary-foreground',\r\n '--raqm-sidebar-accent',\r\n '--raqm-sidebar-accent-foreground',\r\n '--raqm-sidebar-border',\r\n '--raqm-sidebar-ring',\r\n] as const;\r\n\r\n/** @internal Mirror an origin's theme onto one attached pane until disposed. */\r\nexport function bridgeOverlayTheme(origin: HTMLElement, pane: HTMLElement): () => void {\r\n const view = origin.ownerDocument?.defaultView;\r\n if (!view || pane.ownerDocument !== origin.ownerDocument || !view.getComputedStyle)\r\n return () => {};\r\n\r\n const properties = [...themeTokens, 'color-scheme'];\r\n const previous = properties.map((name) => ({\r\n name,\r\n value: pane.style.getPropertyValue(name),\r\n priority: pane.style.getPropertyPriority(name),\r\n }));\r\n const previousTheme = pane.getAttribute('data-raqm-theme');\r\n let disposed = false;\r\n\r\n const refresh = () => {\r\n if (disposed) return;\r\n const computed = view.getComputedStyle(origin);\r\n for (const name of properties) {\r\n const value = computed.getPropertyValue(name).trim();\r\n if (value) {\r\n if (pane.style.getPropertyValue(name) !== value || pane.style.getPropertyPriority(name)) {\r\n pane.style.setProperty(name, value);\r\n }\r\n } else if (pane.style.getPropertyValue(name)) {\r\n pane.style.removeProperty(name);\r\n }\r\n }\r\n const theme = origin\r\n .closest('[data-raqm-theme=\"light\"], [data-raqm-theme=\"dark\"]')\r\n ?.getAttribute('data-raqm-theme');\r\n if (theme) {\r\n if (pane.getAttribute('data-raqm-theme') !== theme)\r\n pane.setAttribute('data-raqm-theme', theme);\r\n } else if (pane.hasAttribute('data-raqm-theme')) {\r\n pane.removeAttribute('data-raqm-theme');\r\n }\r\n };\r\n\r\n refresh();\r\n const observer =\r\n typeof view.MutationObserver === 'function' ? new view.MutationObserver(refresh) : null;\r\n for (let ancestor: Element | null = origin; ancestor; ancestor = ancestor.parentElement) {\r\n observer?.observe(ancestor, {\r\n attributes: true,\r\n attributeFilter: ['class', 'style', 'data-raqm-theme'],\r\n });\r\n }\r\n view.addEventListener('resize', refresh);\r\n const media =\r\n typeof view.matchMedia === 'function'\r\n ? ['(prefers-color-scheme: dark)', '(prefers-reduced-motion: reduce)'].map((query) =>\r\n view.matchMedia(query),\r\n )\r\n : [];\r\n for (const query of media) query.addEventListener?.('change', refresh);\r\n\r\n return () => {\r\n if (disposed) return;\r\n disposed = true;\r\n observer?.disconnect();\r\n view.removeEventListener('resize', refresh);\r\n for (const query of media) query.removeEventListener?.('change', refresh);\r\n for (const { name, value, priority } of previous) {\r\n if (value) pane.style.setProperty(name, value, priority);\r\n else pane.style.removeProperty(name);\r\n }\r\n if (previousTheme === null) pane.removeAttribute('data-raqm-theme');\r\n else pane.setAttribute('data-raqm-theme', previousTheme);\r\n };\r\n}\r\n","import type { OverlayRef } from '@angular/cdk/overlay';\r\nimport { bridgeOverlayTheme } from './overlay-theme';\r\n\r\n// Relationships are scoped to the origin's document, not to the global overlay\r\n// container: unrelated overlays must remain outside the owning disclosure.\r\n// Secondary entry points are independently bundled, so use a shared symbol on\r\n// each document rather than a module-local map duplicated in each bundle.\r\nconst ownershipKey = Symbol.for('raqm.ui.overlay-ownership');\r\ntype Ownership = {\r\n origin: HTMLElement;\r\n ref: OverlayRef;\r\n includeBackdrop: boolean;\r\n release: () => void;\r\n};\r\ntype OwnershipDocument = Document & { [ownershipKey]?: Map<HTMLElement, Ownership> };\r\n\r\n/** @internal Register an attached pane until its overlay detaches. */\r\nexport function registerOverlayOwnership(\r\n origin: HTMLElement,\r\n ref: OverlayRef,\r\n includeBackdrop = false,\r\n): () => void {\r\n const document = origin.ownerDocument as OwnershipDocument;\r\n let panes = document[ownershipKey];\r\n if (!panes) {\r\n panes = new Map();\r\n document[ownershipKey] = panes;\r\n }\r\n const pane = ref.overlayElement;\r\n panes.get(pane)?.release();\r\n const releaseTheme = bridgeOverlayTheme(origin, pane);\r\n let released = false;\r\n let subscription: { unsubscribe(): void } | undefined;\r\n const ownership: Ownership = { origin, ref, includeBackdrop, release: () => release() };\r\n const release = () => {\r\n if (released) return;\r\n released = true;\r\n if (panes?.get(pane) === ownership) panes.delete(pane);\r\n subscription?.unsubscribe();\r\n releaseTheme();\r\n };\r\n panes.set(pane, ownership);\r\n subscription = ref.detachments().subscribe(release);\r\n return release;\r\n}\r\n\r\n/** @internal Includes transitively owned panes whose origins remain connected. */\r\nexport function containsOwnedOverlay(root: HTMLElement, target: Node | null): boolean {\r\n if (!target || target.ownerDocument !== root.ownerDocument) return false;\r\n const panes = (root.ownerDocument as OwnershipDocument)[ownershipKey];\r\n const visited = new Set<HTMLElement>();\r\n const contains = (container: HTMLElement): boolean => {\r\n if (container.contains(target)) return true;\r\n if (visited.has(container)) return false;\r\n visited.add(container);\r\n for (const [pane, { origin, ref, includeBackdrop }] of panes ?? []) {\r\n if (origin.isConnected && container.contains(origin)) {\r\n if (includeBackdrop && ref.backdropElement?.contains(target)) return true;\r\n if (contains(pane)) return true;\r\n }\r\n }\r\n return false;\r\n };\r\n return contains(root);\r\n}\r\n"],"mappings":"AAEA,MAAM,cAAc;CAClB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACQ;AAGV,SAAgB,mBAAmB,QAAqB,MAAiB;CACvE,MAAM,OAAO,OAAO,eAAe;CACnC,IAAI,CAAC,QAAQ,KAAK,kBAAkB,OAAO,iBAAiB,CAAC,KAAK,kBAChE,aAAY,CAAE;CAEhB,MAAM,aAAa,CAAC,GAAG,aAAa,cAAc;CAClD,MAAM,WAAW,WAAW,KAAK,UAAU;EACzC;EACA,OAAO,KAAK,MAAM,iBAAiB,IAAI;EACvC,UAAU,KAAK,MAAM,oBAAoB,IAAI;CAC9C,EAAC;CACF,MAAM,gBAAgB,KAAK,aAAa,iBAAiB;CACzD,IAAI,WAAW;CAEf,MAAM,gBAAe;EACnB,IAAI,UAAU;EACd,MAAM,WAAW,KAAK,iBAAiB,MAAM;EAC7C,KAAK,MAAM,QAAQ,YAAY;GAC7B,MAAM,QAAQ,SAAS,iBAAiB,IAAI,CAAC,CAAC,KAAI;GAClD,IAAI,OACF;QAAI,KAAK,MAAM,iBAAiB,IAAI,MAAM,SAAS,KAAK,MAAM,oBAAoB,IAAI,GACpF,KAAK,MAAM,YAAY,MAAM,KAAK;GACpC,OACK,IAAI,KAAK,MAAM,iBAAiB,IAAI,GACzC,KAAK,MAAM,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AAG;EACf,SAAS,gBAAgB;CAC3B;CACA,MAAM,OAAO,IAAI;CACjB,MAAM,IAAI,IAAI,CAAC,EAAE,QAAO;CACxB,MAAM,eAAe,mBAAmB,QAAQ,IAAI;CACpD,IAAI,WAAW;CACf,IAAI;CACJ,MAAM,YAAuB;EAAE;EAAQ;EAAK;EAAiB,eAAe,QAAO;CAAE;CACrF,MAAM,gBAAe;EACnB,IAAI,UAAU;EACd,WAAW;EACX,IAAI,OAAO,IAAI,IAAI,MAAM,WAAW,MAAM,OAAO,IAAI;EACrD,cAAc,YAAW;EACzB,aAAY;CACd;CACA,MAAM,IAAI,MAAM,SAAS;CACzB,eAAe,IAAI,YAAW,CAAE,CAAC,UAAU,OAAO;CAClD,OAAO;AACT;AAGA,SAAgB,qBAAqB,MAAmB,QAAmB;CACzE,IAAI,CAAC,UAAU,OAAO,kBAAkB,KAAK,eAAe,OAAO;CACnE,MAAM,QAAS,KAAK,cAAoC;CACxD,MAAM,0BAAU,IAAI,IAAG;CACvB,MAAM,YAAY,cAAmC;EACnD,IAAI,UAAU,SAAS,MAAM,GAAG,OAAO;EACvC,IAAI,QAAQ,IAAI,SAAS,GAAG,OAAO;EACnC,QAAQ,IAAI,SAAS;EACrB,KAAK,MAAM,CAAC,MAAM,EAAE,QAAQ,KAAK,sBAAsB,SAAS,CAAA,GAC9D,IAAI,OAAO,eAAe,UAAU,SAAS,MAAM,GAAG;GACpD,IAAI,mBAAmB,IAAI,iBAAiB,SAAS,MAAM,GAAG,OAAO;GACrE,IAAI,SAAS,IAAI,GAAG,OAAO;EAC7B;EAEF,OAAO;CACT;CACA,OAAO,SAAS,IAAI;AACtB"}
1
+ {"version":3,"file":"raqm-ui-overlay-internal.mjs","names":[],"sources":["../../../projects/ui/internal/overlay-theme.ts","../../../projects/ui/internal/overlay-ownership.ts"],"sourcesContent":["// Only stylesheet theme tokens belong here; pane-specific geometry variables\r\n// must remain under the overlay owner's control. Keep in sync with _tokens.scss.\r\nconst themeTokens = [\r\n '--raqm-spacing',\r\n '--raqm-radius',\r\n '--raqm-radius-sm',\r\n '--raqm-radius-md',\r\n '--raqm-radius-lg',\r\n '--raqm-radius-xl',\r\n '--raqm-radius-2xl',\r\n '--raqm-font-size-xs',\r\n '--raqm-font-size-sm',\r\n '--raqm-font-size-base',\r\n '--raqm-font-size-lg',\r\n '--raqm-line-height-none',\r\n '--raqm-line-height-tight',\r\n '--raqm-line-height-snug',\r\n '--raqm-line-height-normal',\r\n '--raqm-line-height-relaxed',\r\n '--raqm-font-weight-normal',\r\n '--raqm-font-weight-medium',\r\n '--raqm-shadow-sm',\r\n '--raqm-shadow-md',\r\n '--raqm-shadow-lg',\r\n '--raqm-focus-ring-width',\r\n '--raqm-disabled-opacity',\r\n '--raqm-duration-fast',\r\n '--raqm-duration-base',\r\n '--raqm-duration-slow',\r\n '--raqm-duration-slower',\r\n '--raqm-ease-standard',\r\n '--raqm-ease-in-out',\r\n '--raqm-ease-out',\r\n '--raqm-ease-linear',\r\n '--raqm-ease-emphasized',\r\n '--raqm-background',\r\n '--raqm-foreground',\r\n '--raqm-card',\r\n '--raqm-card-foreground',\r\n '--raqm-popover',\r\n '--raqm-popover-foreground',\r\n '--raqm-primary',\r\n '--raqm-primary-foreground',\r\n '--raqm-secondary',\r\n '--raqm-secondary-foreground',\r\n '--raqm-muted',\r\n '--raqm-muted-foreground',\r\n '--raqm-accent',\r\n '--raqm-accent-foreground',\r\n '--raqm-destructive',\r\n '--raqm-destructive-foreground',\r\n '--raqm-border',\r\n '--raqm-input',\r\n '--raqm-ring',\r\n '--raqm-white',\r\n '--raqm-primary-hover',\r\n '--raqm-secondary-hover',\r\n '--raqm-control-bg',\r\n '--raqm-input-disabled-bg',\r\n '--raqm-invalid-border',\r\n '--raqm-invalid-ring',\r\n '--raqm-focus-ring-color',\r\n '--raqm-outline-border',\r\n '--raqm-outline-hover',\r\n '--raqm-tooltip-kbd-bg',\r\n '--raqm-theme-light-weight',\r\n '--raqm-ghost-hover-alpha',\r\n '--raqm-destructive-bg-alpha',\r\n '--raqm-destructive-hover-alpha',\r\n '--raqm-destructive-focus-alpha',\r\n '--raqm-avatar-blend',\r\n '--raqm-control-bg-alpha',\r\n '--raqm-control-hover-alpha',\r\n '--raqm-field-checked-border-alpha',\r\n '--raqm-field-checked-bg-alpha',\r\n '--raqm-switch-unchecked-alpha',\r\n '--raqm-check-mark',\r\n '--raqm-mixed-mark',\r\n '--raqm-native-select-chevron',\r\n '--raqm-sidebar',\r\n '--raqm-sidebar-foreground',\r\n '--raqm-sidebar-primary',\r\n '--raqm-sidebar-primary-foreground',\r\n '--raqm-sidebar-accent',\r\n '--raqm-sidebar-accent-foreground',\r\n '--raqm-sidebar-border',\r\n '--raqm-sidebar-ring',\r\n] as const;\r\n\r\n/** @internal Mirror an origin's theme onto one attached pane until disposed. */\r\nexport function bridgeOverlayTheme(origin: HTMLElement, pane: HTMLElement): () => void {\r\n const view = origin.ownerDocument?.defaultView;\r\n if (!view || pane.ownerDocument !== origin.ownerDocument || !view.getComputedStyle)\r\n return () => {};\r\n\r\n const properties = [...themeTokens, 'color-scheme'];\r\n const previous = properties.map((name) => ({\r\n name,\r\n value: pane.style.getPropertyValue(name),\r\n priority: pane.style.getPropertyPriority(name),\r\n }));\r\n const previousTheme = pane.getAttribute('data-raqm-theme');\r\n let disposed = false;\r\n let scheduled = false;\r\n\r\n const refresh = () => {\r\n if (disposed) return;\r\n const computed = view.getComputedStyle(origin);\r\n for (const name of properties) {\r\n const value = computed.getPropertyValue(name).trim();\r\n if (value) {\r\n if (pane.style.getPropertyValue(name) !== value || pane.style.getPropertyPriority(name)) {\r\n pane.style.setProperty(name, value);\r\n }\r\n } else if (pane.style.getPropertyValue(name)) {\r\n pane.style.removeProperty(name);\r\n }\r\n }\r\n const theme = origin\r\n .closest('[data-raqm-theme=\"light\"], [data-raqm-theme=\"dark\"]')\r\n ?.getAttribute('data-raqm-theme');\r\n if (theme) {\r\n if (pane.getAttribute('data-raqm-theme') !== theme)\r\n pane.setAttribute('data-raqm-theme', theme);\r\n } else if (pane.hasAttribute('data-raqm-theme')) {\r\n pane.removeAttribute('data-raqm-theme');\r\n }\r\n };\r\n\r\n // Ancestor mutations, resize and preference changes can arrive together; one microtask\r\n // refresh per burst keeps the theme applied before paint without repeating the reads.\r\n const schedule = () => {\r\n if (disposed || scheduled) return;\r\n scheduled = true;\r\n queueMicrotask(() => {\r\n scheduled = false;\r\n refresh();\r\n });\r\n };\r\n\r\n refresh();\r\n const observer =\r\n typeof view.MutationObserver === 'function' ? new view.MutationObserver(schedule) : null;\r\n for (let ancestor: Element | null = origin; ancestor; ancestor = ancestor.parentElement) {\r\n observer?.observe(ancestor, {\r\n attributes: true,\r\n attributeFilter: ['class', 'style', 'data-raqm-theme'],\r\n });\r\n }\r\n view.addEventListener('resize', schedule);\r\n const media =\r\n typeof view.matchMedia === 'function'\r\n ? ['(prefers-color-scheme: dark)', '(prefers-reduced-motion: reduce)'].map((query) =>\r\n view.matchMedia(query),\r\n )\r\n : [];\r\n for (const query of media) query.addEventListener?.('change', schedule);\r\n\r\n return () => {\r\n if (disposed) return;\r\n disposed = true;\r\n scheduled = false;\r\n observer?.disconnect();\r\n view.removeEventListener('resize', schedule);\r\n for (const query of media) query.removeEventListener?.('change', schedule);\r\n for (const { name, value, priority } of previous) {\r\n if (value) pane.style.setProperty(name, value, priority);\r\n else pane.style.removeProperty(name);\r\n }\r\n if (previousTheme === null) pane.removeAttribute('data-raqm-theme');\r\n else pane.setAttribute('data-raqm-theme', previousTheme);\r\n };\r\n}\r\n","import type { OverlayRef } from '@angular/cdk/overlay';\r\nimport { bridgeOverlayTheme } from './overlay-theme';\r\n\r\n// Relationships are scoped to the origin's document, not to the global overlay\r\n// container: unrelated overlays must remain outside the owning disclosure.\r\n// Secondary entry points are independently bundled, so use a shared symbol on\r\n// each document rather than a module-local map duplicated in each bundle.\r\nconst ownershipKey = Symbol.for('raqm.ui.overlay-ownership');\r\ntype Ownership = {\r\n origin: HTMLElement;\r\n ref: OverlayRef;\r\n includeBackdrop: boolean;\r\n release: () => void;\r\n};\r\ntype OwnershipDocument = Document & { [ownershipKey]?: Map<HTMLElement, Ownership> };\r\n\r\n/** @internal Register an attached pane until its overlay detaches. */\r\nexport function registerOverlayOwnership(\r\n origin: HTMLElement,\r\n ref: OverlayRef,\r\n includeBackdrop = false,\r\n): () => void {\r\n const document = origin.ownerDocument as OwnershipDocument;\r\n let panes = document[ownershipKey];\r\n if (!panes) {\r\n panes = new Map();\r\n document[ownershipKey] = panes;\r\n }\r\n const pane = ref.overlayElement;\r\n panes.get(pane)?.release();\r\n const releaseTheme = bridgeOverlayTheme(origin, pane);\r\n let released = false;\r\n let subscription: { unsubscribe(): void } | undefined;\r\n const ownership: Ownership = { origin, ref, includeBackdrop, release: () => release() };\r\n const release = () => {\r\n if (released) return;\r\n released = true;\r\n if (panes?.get(pane) === ownership) panes.delete(pane);\r\n subscription?.unsubscribe();\r\n releaseTheme();\r\n };\r\n panes.set(pane, ownership);\r\n subscription = ref.detachments().subscribe(release);\r\n return release;\r\n}\r\n\r\n/** @internal Includes transitively owned panes whose origins remain connected. */\r\nexport function containsOwnedOverlay(root: HTMLElement, target: Node | null): boolean {\r\n if (!target || target.ownerDocument !== root.ownerDocument) return false;\r\n const panes = (root.ownerDocument as OwnershipDocument)[ownershipKey];\r\n const visited = new Set<HTMLElement>();\r\n const contains = (container: HTMLElement): boolean => {\r\n if (container.contains(target)) return true;\r\n if (visited.has(container)) return false;\r\n visited.add(container);\r\n for (const [pane, { origin, ref, includeBackdrop }] of panes ?? []) {\r\n if (origin.isConnected && container.contains(origin)) {\r\n if (includeBackdrop && ref.backdropElement?.contains(target)) return true;\r\n if (contains(pane)) return true;\r\n }\r\n }\r\n return false;\r\n };\r\n return contains(root);\r\n}\r\n"],"mappings":"AAEA,MAAM,cAAc;CAClB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;C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,MAAM,OAAO,IAAI;CACjB,MAAM,IAAI,IAAI,CAAC,EAAE,QAAO;CACxB,MAAM,eAAe,mBAAmB,QAAQ,IAAI;CACpD,IAAI,WAAW;CACf,IAAI;CACJ,MAAM,YAAuB;EAAE;EAAQ;EAAK;EAAiB,eAAe,QAAO;CAAE;CACrF,MAAM,gBAAe;EACnB,IAAI,UAAU;EACd,WAAW;EACX,IAAI,OAAO,IAAI,IAAI,MAAM,WAAW,MAAM,OAAO,IAAI;EACrD,cAAc,YAAW;EACzB,aAAY;CACd;CACA,MAAM,IAAI,MAAM,SAAS;CACzB,eAAe,IAAI,YAAW,CAAE,CAAC,UAAU,OAAO;CAClD,OAAO;AACT;AAGA,SAAgB,qBAAqB,MAAmB,QAAmB;CACzE,IAAI,CAAC,UAAU,OAAO,kBAAkB,KAAK,eAAe,OAAO;CACnE,MAAM,QAAS,KAAK,cAAoC;CACxD,MAAM,0BAAU,IAAI,IAAG;CACvB,MAAM,YAAY,cAAmC;EACnD,IAAI,UAAU,SAAS,MAAM,GAAG,OAAO;EACvC,IAAI,QAAQ,IAAI,SAAS,GAAG,OAAO;EACnC,QAAQ,IAAI,SAAS;EACrB,KAAK,MAAM,CAAC,MAAM,EAAE,QAAQ,KAAK,sBAAsB,SAAS,CAAA,GAC9D,IAAI,OAAO,eAAe,UAAU,SAAS,MAAM,GAAG;GACpD,IAAI,mBAAmB,IAAI,iBAAiB,SAAS,MAAM,GAAG,OAAO;GACrE,IAAI,SAAS,IAAI,GAAG,OAAO;EAC7B;EAEF,OAAO;CACT;CACA,OAAO,SAAS,IAAI;AACtB"}
@@ -289,9 +289,9 @@ var RaqmPopoverOverlay = class {
289
289
  this.detachSubscription = overlayRef.detachments().subscribe(() => this.handleDetached());
290
290
  this.host.root.ownerDocument.addEventListener("focusout", this.ownedFocusOut, true);
291
291
  this.viewportSubscription = this.viewportRuler.change(0).subscribe(() => {
292
- this.position.reposition();
292
+ this.position.scheduleReposition();
293
293
  });
294
- this.scrollSubscription = this.scrollDispatcher.ancestorScrolled(trigger.element, 0).subscribe(() => this.position.reposition());
294
+ this.scrollSubscription = this.scrollDispatcher.ancestorScrolled(trigger.element, 0).subscribe(() => this.position.scheduleReposition());
295
295
  overlayRef.attach(new TemplatePortal(panelTemplate, this.viewContainerRef));
296
296
  overlayRef.overlayElement.style.visibility = "hidden";
297
297
  overlayRef.overlayElement.style.pointerEvents = "none";
@@ -436,6 +436,8 @@ var RaqmPopoverPosition = class {
436
436
  currentPositions = [];
437
437
  currentPositionSides = [];
438
438
  sideSubscription;
439
+ frame = 0;
440
+ frameView;
439
441
  constructor(overlay, viewportRuler, state, sizing, host) {
440
442
  this.overlay = overlay;
441
443
  this.viewportRuler = viewportRuler;
@@ -448,26 +450,33 @@ var RaqmPopoverPosition = class {
448
450
  strategy.withFlexibleDimensions(false).withGrowAfterOpen(false).withPush(true).withViewportMargin(5);
449
451
  const preferred = this.resolvePhysicalSide(this.host.side());
450
452
  this.currentPositionSides = [preferred, this.oppositeSide(preferred)];
451
- this.currentPositions = this.currentPositionSides.map((side) => this.buildPositionFor(side));
453
+ const measurement = this.measure();
454
+ this.currentPositions = this.currentPositionSides.map((side) => this.buildPositionFor(side, measurement));
452
455
  strategy.withPositions(this.currentPositions);
453
456
  this.positionStrategy = strategy;
454
457
  return strategy;
455
458
  }
456
- setPositions(sides) {
459
+ measure() {
460
+ return {
461
+ anchorRect: this.host.trigger()?.element?.getBoundingClientRect(),
462
+ viewport: this.viewportRuler.getViewportSize()
463
+ };
464
+ }
465
+ setPositions(sides, measurement = this.measure()) {
457
466
  const strategy = this.positionStrategy;
458
467
  if (!strategy) return;
459
- const positions = sides.map((side) => this.buildPositionFor(side));
468
+ const positions = sides.map((side) => this.buildPositionFor(side, measurement));
460
469
  strategy.withPositions(positions);
461
470
  this.currentPositions = positions;
462
471
  this.currentPositionSides = [...sides];
463
472
  }
464
- buildPositionFor(side) {
473
+ buildPositionFor(side, measurement) {
465
474
  const align = this.host.align();
466
- const anchorRect = this.host.trigger()?.element?.getBoundingClientRect();
467
- const viewport = this.viewportRuler.getViewportSize();
475
+ const anchorRect = measurement.anchorRect;
476
+ const viewport = measurement.viewport;
468
477
  const x = align;
469
478
  const y = this.toVerticalAlign(align);
470
- const mainOffset = this.sizing.effectiveSideOffset(side);
479
+ const mainOffset = this.sizing.effectiveSideOffset(side, anchorRect, viewport);
471
480
  const alignX = this.sizing.crossAxisGeometry("x", anchorRect, viewport.width).offset;
472
481
  const alignY = this.sizing.crossAxisGeometry("y", anchorRect, viewport.height).offset;
473
482
  switch (side) {
@@ -533,6 +542,7 @@ var RaqmPopoverPosition = class {
533
542
  return align === "start" ? "top" : align === "end" ? "bottom" : "center";
534
543
  }
535
544
  reposition() {
545
+ this.cancelScheduledReposition();
536
546
  const pane = this.host.pane();
537
547
  const strategy = this.positionStrategy;
538
548
  if (!pane || !strategy) return;
@@ -542,17 +552,32 @@ var RaqmPopoverPosition = class {
542
552
  this.state.panelDir.set(dir);
543
553
  this.host.setDirection(dir);
544
554
  }
555
+ const measurement = this.measure();
545
556
  const preferred = this.resolvePhysicalSide(this.host.side());
546
- this.setPositions([preferred, this.oppositeSide(preferred)]);
557
+ this.setPositions([preferred, this.oppositeSide(preferred)], measurement);
547
558
  this.sizing.resetAvailableSize();
548
559
  this.sizing.naturalContentSize = this.sizing.contentBoxSize();
549
560
  this.host.updatePosition();
550
561
  const applied = this.state.resolvedSide();
551
- this.sizing.applyAvailableSize();
552
- this.setPositions([applied]);
562
+ this.sizing.applyAvailableSize(measurement.anchorRect, measurement.viewport);
563
+ this.setPositions([applied], measurement);
553
564
  this.host.updatePosition();
554
565
  this.sizing.expectedContentSize = this.sizing.contentBoxSize();
555
566
  }
567
+ scheduleReposition() {
568
+ if (!this.positionStrategy || this.frame) return;
569
+ const view = this.host.trigger()?.element?.ownerDocument.defaultView;
570
+ if (!view || typeof view.requestAnimationFrame !== "function") {
571
+ this.reposition();
572
+ return;
573
+ }
574
+ this.frameView = view;
575
+ this.frame = view.requestAnimationFrame(() => {
576
+ this.frame = 0;
577
+ this.frameView = void 0;
578
+ this.reposition();
579
+ });
580
+ }
556
581
  applyPositionInputs() {
557
582
  this.reposition();
558
583
  }
@@ -561,8 +586,15 @@ var RaqmPopoverPosition = class {
561
586
  this.sideSubscription = void 0;
562
587
  }
563
588
  clearStrategy() {
589
+ this.cancelScheduledReposition();
564
590
  this.positionStrategy = void 0;
565
591
  }
592
+ cancelScheduledReposition() {
593
+ if (!this.frame) return;
594
+ this.frameView?.cancelAnimationFrame(this.frame);
595
+ this.frame = 0;
596
+ this.frameView = void 0;
597
+ }
566
598
  };
567
599
  let nextPopoverId = 0;
568
600
  var RaqmPopoverRegistration = class {
@@ -695,12 +727,12 @@ var RaqmPopoverSizing = class {
695
727
  this.resizeObserver?.disconnect();
696
728
  this.resizeObserver = void 0;
697
729
  }
698
- applyAvailableSize() {
730
+ applyAvailableSize(measuredRect, measuredViewport) {
699
731
  const pane = this.host.pane();
700
732
  const anchor = this.host.trigger()?.element;
701
733
  if (!pane || !anchor) return;
702
- const anchorRect = anchor.getBoundingClientRect();
703
- const viewport = this.viewportRuler.getViewportSize();
734
+ const anchorRect = measuredRect ?? anchor.getBoundingClientRect();
735
+ const viewport = measuredViewport ?? this.viewportRuler.getViewportSize();
704
736
  const sideOffset = this.host.sideOffset();
705
737
  const side = this.state.resolvedSide();
706
738
  const capacityWidth = this.viewportCap(viewport.width);
@@ -740,18 +772,18 @@ var RaqmPopoverSizing = class {
740
772
  this.applyAvailableDimension(pane, "--raqm-popover-available-width", widthIsCross || width > 0 ? Math.min(width, capacityWidth) : capacityWidth);
741
773
  this.applyAvailableDimension(pane, "--raqm-popover-available-height", heightIsCross || height > 0 ? Math.min(height, capacityHeight) : capacityHeight);
742
774
  }
743
- effectiveSideOffset(side) {
775
+ effectiveSideOffset(side, measuredRect, measuredViewport) {
744
776
  const authored = side === "bottom" || side === "right" ? this.host.sideOffset() : -this.host.sideOffset();
745
777
  const anchor = this.host.trigger()?.element;
746
778
  const pane = this.host.pane();
747
779
  if (!anchor || !pane) return authored;
748
780
  const horizontal = side === "left" || side === "right";
749
- const viewport = this.viewportRuler.getViewportSize();
781
+ const viewport = measuredViewport ?? this.viewportRuler.getViewportSize();
750
782
  const client = horizontal ? viewport.width : viewport.height;
751
783
  const size = horizontal ? pane.getBoundingClientRect().width : pane.getBoundingClientRect().height;
752
784
  const capacity = this.viewportCap(client);
753
785
  if (size <= 0 || size > capacity) return authored;
754
- const anchorRect = anchor.getBoundingClientRect();
786
+ const anchorRect = measuredRect ?? anchor.getBoundingClientRect();
755
787
  const base = horizontal ? side === "right" ? anchorRect.right : anchorRect.left - size : side === "bottom" ? anchorRect.bottom : anchorRect.top - size;
756
788
  const overflowNear = Math.max(5 - base, 0);
757
789
  const overflowFar = Math.max(base + size - capacity, 0);
@@ -870,7 +902,7 @@ var RaqmPopoverComponent = class RaqmPopoverComponent {
870
902
  trigger: () => this.registration.triggerRef(),
871
903
  pane: () => this.layer.element,
872
904
  content: () => this.layer.contentElement(),
873
- reposition: () => this.position.reposition()
905
+ reposition: () => this.position.scheduleReposition()
874
906
  });
875
907
  position = new RaqmPopoverPosition(this.overlay, this.viewportRuler, this.state, this.sizing, {
876
908
  side: () => this.side(),