@frame-kit/ui-ng 0.0.3 → 0.0.6

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 +1 @@
1
- {"version":3,"file":"frame-kit-ui-ng-ui-drawer.mjs","sources":["../../../../packages/ui-ng/ui/drawer/drawer.component.ts","../../../../packages/ui-ng/ui/drawer/drawer.component.html","../../../../packages/ui-ng/ui/drawer/drawer.config.ts","../../../../packages/ui-ng/ui/drawer/drawer-ref.ts","../../../../packages/ui-ng/ui/drawer/drawer.service.ts","../../../../packages/ui-ng/ui/drawer/frame-kit-ui-ng-ui-drawer.ts"],"sourcesContent":["import { A11yModule } from '@angular/cdk/a11y';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n effect,\n HostBinding,\n HostListener,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\n\nimport type {\n DrawerAnimation,\n DrawerCanCloseFn,\n DrawerWidth,\n} from './drawer.types';\n\nlet nextDrawerId = 0;\n\n@Component({\n selector: 'fk-drawer',\n standalone: true,\n imports: [A11yModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './drawer.component.html',\n styleUrl: './drawer.component.scss',\n})\nexport class DrawerComponent {\n // ===== INPUTS =====\n /** Controls whether the drawer is open. */\n readonly open = input(false);\n /** When true, shows the close button in the drawer header. */\n readonly closable = input(true);\n /** When true, pressing Escape closes the drawer. */\n readonly closeOnEscape = input(true);\n /** When true, clicking the backdrop overlay closes the drawer. */\n readonly closeOnBackdrop = input(true);\n /** Width variant of the drawer panel. */\n readonly width = input<DrawerWidth>('md');\n /** Optional title text rendered in the drawer header. */\n readonly header = input<string | null>(null);\n /** When true, focus returns to the previously focused element when the drawer closes. */\n readonly restoreFocus = input(true);\n /** When true, CDK auto-focus is applied when the drawer opens. */\n readonly autoFocus = input(true);\n /** Entry/exit animation applied to the drawer panel. */\n readonly animation = input<DrawerAnimation>('slide-right');\n /** When true, all close mechanisms are blocked. */\n readonly preventClose = input(false);\n /** Async guard function called before closing; return false to cancel the close. */\n readonly canClose = input<DrawerCanCloseFn | null>(null);\n\n // ===== BASE PROPS =====\n readonly className = input<string>('');\n readonly id = input<string | null>(null);\n readonly ariaLabel = input<string | null>(null);\n\n // ===== OUTPUTS =====\n /** Fires when the drawer's open state should change, emitting the new boolean. */\n readonly openChange = output<boolean>();\n /** Fires immediately before the drawer begins its open animation. */\n readonly beforeOpen = output<void>();\n /** Fires after the drawer is fully open. */\n readonly opened = output<void>();\n /** Fires immediately before the drawer begins its close animation. */\n readonly beforeClose = output<void>();\n /** Fires after the drawer is fully closed. */\n readonly closed = output<void>();\n\n // ===== INTERNAL STATE =====\n private readonly doc = inject(DOCUMENT);\n private readonly destroyRef = inject(DestroyRef);\n readonly titleId = `fk-drawer-title-${nextDrawerId++}`;\n private previouslyFocusedElement: HTMLElement | null = null;\n private closeGuardRunning = false;\n\n readonly visible = signal(false);\n readonly animatingOut = signal(false);\n\n // ===== COMPUTED =====\n readonly classes = computed(() => {\n return ['fk-drawer', this.className()].filter(Boolean).join(' ');\n });\n\n readonly ariaLabelledBy = computed(() => {\n if (this.ariaLabel()) {\n return null;\n }\n\n return this.header() ? this.titleId : null;\n });\n\n constructor() {\n effect(() => {\n const isOpen = this.open();\n\n if (isOpen) {\n this.onDrawerOpen();\n } else {\n this.onDrawerClose();\n }\n });\n\n this.destroyRef.onDestroy(() => {\n // Placeholder for future cleanup (e.g., nested drawer teardown)\n });\n }\n\n @HostBinding('class')\n get hostClass() {\n return this.classes();\n }\n\n @HostBinding('attr.id')\n get hostId() {\n return this.id();\n }\n\n // ===== KEYBOARD =====\n @HostListener('document:keydown.escape')\n onEscapeKey() {\n if (this.open() && this.closeOnEscape()) {\n this.close();\n }\n }\n\n // ===== ACTIONS =====\n /** Closes the drawer, running any `canClose` guard first; no-ops when `preventClose` is true. */\n async close() {\n if (this.closeGuardRunning) {\n return;\n }\n\n if (this.preventClose()) {\n return;\n }\n\n const guard = this.canClose();\n\n if (guard) {\n this.closeGuardRunning = true;\n\n try {\n const allowed = await Promise.resolve(guard());\n\n if (!allowed) {\n return;\n }\n } finally {\n this.closeGuardRunning = false;\n }\n }\n\n this.beforeClose.emit();\n this.openChange.emit(false);\n this.closed.emit();\n }\n\n onOverlayClick() {\n if (this.closeOnBackdrop()) {\n this.close();\n }\n }\n\n onExitAnimationDone() {\n if (this.animatingOut()) {\n this.animatingOut.set(false);\n this.visible.set(false);\n }\n }\n\n // ===== LIFECYCLE =====\n private onDrawerOpen() {\n this.previouslyFocusedElement =\n (this.doc.activeElement as HTMLElement) ?? null;\n\n this.beforeOpen.emit();\n this.animatingOut.set(false);\n this.visible.set(true);\n this.opened.emit();\n }\n\n private onDrawerClose() {\n if (this.visible()) {\n if (this.animation() !== 'none') {\n this.animatingOut.set(true);\n } else {\n this.visible.set(false);\n }\n }\n\n if (this.restoreFocus() && this.previouslyFocusedElement) {\n this.previouslyFocusedElement.focus();\n this.previouslyFocusedElement = null;\n }\n }\n}\n","@if (visible()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"fk-drawer__overlay\"\n [class.fk-drawer__animate-overlay--in]=\"!animatingOut()\"\n [class.fk-drawer__animate-overlay--out]=\"animatingOut()\"\n [class.fk-drawer__animate-overlay--none]=\"animation() === 'none'\"\n (click)=\"onOverlayClick()\"\n (animationend)=\"onExitAnimationDone()\"\n >\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -->\n <div\n class=\"fk-drawer__panel\"\n [class.fk-drawer__panel--sm]=\"width() === 'sm'\"\n [class.fk-drawer__panel--md]=\"width() === 'md'\"\n [class.fk-drawer__panel--lg]=\"width() === 'lg'\"\n [class.fk-drawer__panel--xl]=\"width() === 'xl'\"\n [class.fk-drawer__animate-panel--slide-right]=\"\n animation() === 'slide-right' && !animatingOut()\n \"\n [class.fk-drawer__animate-panel--fade]=\"\n animation() === 'fade' && !animatingOut()\n \"\n [class.fk-drawer__animate-panel-out--slide-right]=\"\n animation() === 'slide-right' && animatingOut()\n \"\n [class.fk-drawer__animate-panel-out--fade]=\"\n animation() === 'fade' && animatingOut()\n \"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n [cdkTrapFocus]=\"true\"\n [cdkTrapFocusAutoCapture]=\"autoFocus()\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (header() || closable()) {\n <div class=\"fk-drawer__header\">\n @if (header()) {\n <span class=\"fk-drawer__title\" [id]=\"titleId\">\n {{ header() }}\n </span>\n }\n\n @if (closable()) {\n <button\n class=\"fk-drawer__close\"\n type=\"button\"\n aria-label=\"Close drawer\"\n (click)=\"close()\"\n >\n &times;\n </button>\n }\n </div>\n }\n\n <div class=\"fk-drawer__body\">\n <ng-content />\n </div>\n\n <div class=\"fk-drawer__footer\">\n <ng-content select=\"[fkDrawerFooter]\" />\n </div>\n </div>\n </div>\n}\n","import type {\n DrawerAnimation,\n DrawerCanCloseFn,\n DrawerWidth,\n} from './drawer.types';\n\nexport interface DrawerConfig<TData = unknown> {\n closable?: boolean;\n closeOnEscape?: boolean;\n closeOnBackdrop?: boolean;\n width?: DrawerWidth;\n animation?: DrawerAnimation;\n header?: string | null;\n restoreFocus?: boolean;\n autoFocus?: boolean;\n preventClose?: boolean;\n canClose?: DrawerCanCloseFn;\n className?: string;\n ariaLabel?: string | null;\n data?: TData;\n /** Element to append the drawer into. Must have `position: relative`. Defaults to `document.body`. */\n container?: HTMLElement;\n}\n\nexport const DEFAULT_DRAWER_CONFIG: DrawerConfig = {\n closable: true,\n closeOnEscape: true,\n closeOnBackdrop: true,\n width: 'md',\n animation: 'slide-right',\n header: null,\n restoreFocus: true,\n autoFocus: true,\n preventClose: false,\n className: '',\n ariaLabel: null,\n};\n","import { Observable, Subject } from 'rxjs';\nimport { take } from 'rxjs/operators';\n\nimport type { DrawerConfig } from './drawer.config';\nimport type { DrawerCanCloseFn } from './drawer.types';\n\nexport class DrawerRef<TResult = unknown, TData = unknown> {\n private readonly beforeOpenSubject = new Subject<void>();\n private readonly afterOpenedSubject = new Subject<void>();\n private readonly beforeCloseSubject = new Subject<void>();\n private readonly afterClosedSubject = new Subject<TResult | undefined>();\n private closed = false;\n private closeGuard: DrawerCanCloseFn | null = null;\n\n readonly config: DrawerConfig<TData>;\n\n constructor(config: DrawerConfig<TData> = {} as DrawerConfig<TData>) {\n this.config = config;\n\n if (config.canClose) {\n this.closeGuard = config.canClose;\n }\n }\n\n get data(): TData | undefined {\n return this.config.data;\n }\n\n setCanClose(guard: DrawerCanCloseFn | null) {\n this.closeGuard = guard;\n }\n\n async close(result?: TResult) {\n if (this.closed) {\n return;\n }\n\n if (this.config.preventClose) {\n return;\n }\n\n if (this.closeGuard) {\n const allowed = await Promise.resolve(this.closeGuard());\n\n if (!allowed) {\n return;\n }\n }\n\n this.beforeCloseSubject.next();\n this.beforeCloseSubject.complete();\n\n this.closed = true;\n this.afterClosedSubject.next(result);\n this.afterClosedSubject.complete();\n }\n\n beforeOpen(): Observable<void> {\n return this.beforeOpenSubject.asObservable().pipe(take(1));\n }\n\n afterOpened(): Observable<void> {\n return this.afterOpenedSubject.asObservable().pipe(take(1));\n }\n\n beforeClose(): Observable<void> {\n return this.beforeCloseSubject.asObservable().pipe(take(1));\n }\n\n afterClosed(): Observable<TResult | undefined> {\n return this.afterClosedSubject.asObservable().pipe(take(1));\n }\n\n /** @internal */\n markBeforeOpen() {\n this.beforeOpenSubject.next();\n this.beforeOpenSubject.complete();\n }\n\n /** @internal */\n markOpened() {\n this.afterOpenedSubject.next();\n this.afterOpenedSubject.complete();\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport {\n ApplicationRef,\n ComponentRef,\n createComponent,\n EnvironmentInjector,\n inject,\n Injectable,\n Injector,\n Type,\n} from '@angular/core';\n\nimport { OverlayOrchestrator } from '@frame-kit/ui-ng/services/overlay-orchestrator';\nimport { OVERLAY_PRIORITY } from '@frame-kit/ui-ng/services/overlay-orchestrator';\nimport { DrawerComponent } from './drawer.component';\nimport { DEFAULT_DRAWER_CONFIG, DrawerConfig } from './drawer.config';\nimport { DrawerRef } from './drawer-ref';\n\nexport const DRAWER_DATA = Symbol('DRAWER_DATA');\nexport const DRAWER_REF = Symbol('DRAWER_REF');\n\nconst BASE_Z_INDEX = 1100;\nconst Z_INDEX_STEP = 10;\n\ninterface DrawerEntry {\n ref: DrawerRef;\n hostRef: ComponentRef<DrawerComponent>;\n contentRef: ComponentRef<unknown>;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DrawerService {\n private readonly appRef = inject(ApplicationRef);\n private readonly injector = inject(EnvironmentInjector);\n private readonly doc = inject(DOCUMENT);\n private readonly orchestrator = inject(OverlayOrchestrator);\n\n private activeDrawers: DrawerEntry[] = [];\n private overlayIds = new Map<DrawerEntry, string>();\n\n get openCount(): number {\n return this.activeDrawers.length;\n }\n\n open<TResult = unknown, TData = unknown>(\n content: Type<unknown>,\n config?: DrawerConfig<TData>,\n ): DrawerRef<TResult, TData> {\n const mergedConfig = {\n ...DEFAULT_DRAWER_CONFIG,\n ...config,\n } as DrawerConfig<TData>;\n const drawerRef = new DrawerRef<TResult, TData>(mergedConfig);\n\n const childInjector = Injector.create({\n parent: this.injector,\n providers: [\n { provide: DRAWER_DATA as never, useValue: mergedConfig.data },\n { provide: DRAWER_REF as never, useValue: drawerRef },\n ],\n });\n\n const hostRef = createComponent(DrawerComponent, {\n environmentInjector: this.injector,\n elementInjector: childInjector,\n });\n\n const contentRef = createComponent(content, {\n environmentInjector: this.injector,\n elementInjector: childInjector,\n hostElement: this.doc.createElement('div'),\n });\n\n this.applyConfig(hostRef, mergedConfig);\n this.appRef.attachView(hostRef.hostView);\n this.appRef.attachView(contentRef.hostView);\n\n this.doc.body.appendChild(hostRef.location.nativeElement);\n\n const entry: DrawerEntry = {\n ref: drawerRef as DrawerRef<unknown, unknown>,\n hostRef,\n contentRef,\n };\n\n this.activeDrawers.push(entry);\n\n const overlayId = this.orchestrator.register({\n priority: OVERLAY_PRIORITY.DRAWER,\n type: 'drawer',\n close: () => drawerRef.close(),\n });\n\n this.overlayIds.set(entry, overlayId);\n\n hostRef.instance.beforeOpen.subscribe(() => {\n drawerRef.markBeforeOpen();\n });\n\n hostRef.instance.opened.subscribe(() => {\n drawerRef.markOpened();\n });\n\n hostRef.instance.closed.subscribe(() => {\n drawerRef.close();\n });\n\n drawerRef.afterClosed().subscribe(() => {\n this.destroyDrawer(entry);\n });\n\n hostRef.setInput('open', true);\n hostRef.changeDetectorRef.detectChanges();\n\n const panelBody =\n hostRef.location.nativeElement.querySelector('.fk-drawer__body');\n\n if (panelBody) {\n panelBody.appendChild(contentRef.location.nativeElement);\n }\n\n // Move [fkDrawerFooter] elements from the body into the footer wrapper\n const footerWrapper =\n hostRef.location.nativeElement.querySelector('.fk-drawer__footer');\n\n if (footerWrapper && panelBody) {\n const footerElements = panelBody.querySelectorAll('[fkDrawerFooter]');\n\n for (const el of footerElements) {\n footerWrapper.appendChild(el);\n }\n }\n\n // Position the overlay to match the container's bounds\n if (mergedConfig.container) {\n this.applyContainerBounds(entry, mergedConfig.container);\n }\n\n this.applyZIndex(entry);\n\n return drawerRef;\n }\n\n closeAll() {\n [...this.activeDrawers].forEach((entry) => entry.ref.close());\n }\n\n private applyContainerBounds(entry: DrawerEntry, container: HTMLElement) {\n const rect = container.getBoundingClientRect();\n const overlay = entry.hostRef.location.nativeElement.querySelector(\n '.fk-drawer__overlay',\n );\n\n if (overlay) {\n overlay.style.setProperty('--fk-drawer-bounds-top', `${rect.top}px`);\n\n overlay.style.setProperty(\n '--fk-drawer-bounds-right',\n `${window.innerWidth - rect.right}px`,\n );\n\n overlay.style.setProperty(\n '--fk-drawer-bounds-bottom',\n `${window.innerHeight - rect.bottom}px`,\n );\n\n overlay.style.setProperty('--fk-drawer-bounds-left', `${rect.left}px`);\n }\n }\n\n private applyZIndex(entry: DrawerEntry) {\n const index = this.activeDrawers.indexOf(entry);\n const zIndex = BASE_Z_INDEX + index * Z_INDEX_STEP;\n const overlay = entry.hostRef.location.nativeElement.querySelector(\n '.fk-drawer__overlay',\n );\n\n if (overlay) {\n overlay.style.zIndex = String(zIndex);\n }\n }\n\n private applyConfig(\n hostRef: ComponentRef<DrawerComponent>,\n config: DrawerConfig,\n ) {\n hostRef.setInput('closable', config.closable ?? true);\n hostRef.setInput('closeOnEscape', config.closeOnEscape ?? true);\n hostRef.setInput('closeOnBackdrop', config.closeOnBackdrop ?? true);\n hostRef.setInput('width', config.width ?? 'md');\n hostRef.setInput('animation', config.animation ?? 'slide-right');\n hostRef.setInput('header', config.header ?? null);\n hostRef.setInput('restoreFocus', config.restoreFocus ?? true);\n hostRef.setInput('autoFocus', config.autoFocus ?? true);\n hostRef.setInput('className', config.className ?? '');\n hostRef.setInput('preventClose', config.preventClose ?? false);\n hostRef.setInput('canClose', config.canClose ?? null);\n hostRef.setInput('ariaLabel', config.ariaLabel ?? null);\n }\n\n private destroyDrawer(entry: DrawerEntry) {\n const overlayId = this.overlayIds.get(entry);\n\n if (overlayId) {\n this.orchestrator.unregister(overlayId);\n this.overlayIds.delete(entry);\n }\n\n const idx = this.activeDrawers.indexOf(entry);\n\n if (idx > -1) {\n this.activeDrawers.splice(idx, 1);\n }\n\n entry.hostRef.setInput('open', false);\n entry.hostRef.changeDetectorRef.detectChanges();\n\n this.appRef.detachView(entry.contentRef.hostView);\n this.appRef.detachView(entry.hostRef.hostView);\n\n entry.contentRef.destroy();\n entry.hostRef.destroy();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAsBA,IAAI,YAAY,GAAG,CAAC;MAUP,eAAe,CAAA;;;AAGjB,IAAA,IAAI,GAAG,KAAK,CAAC,KAAK,2EAAC;;AAEnB,IAAA,QAAQ,GAAG,KAAK,CAAC,IAAI,+EAAC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EAAE;IACzB;uGA/LW,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAb,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,cADA,MAAM,EAAA,CAAA;;2FACnB,aAAa,EAAA,UAAA,EAAA,CAAA;kBADzB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;AC9BlC;;AAEG;;;;"}
1
+ {"version":3,"file":"frame-kit-ui-ng-ui-drawer.mjs","sources":["../../../../packages/ui-ng/ui/drawer/drawer.component.ts","../../../../packages/ui-ng/ui/drawer/drawer.component.html","../../../../packages/ui-ng/ui/drawer/drawer.config.ts","../../../../packages/ui-ng/ui/drawer/drawer-ref.ts","../../../../packages/ui-ng/ui/drawer/drawer.service.ts","../../../../packages/ui-ng/ui/drawer/frame-kit-ui-ng-ui-drawer.ts"],"sourcesContent":["import { A11yModule } from '@angular/cdk/a11y';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n HostBinding,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\n\nimport type {\n DrawerAnimation,\n DrawerCanCloseFn,\n DrawerWidth,\n} from './drawer.types';\n\nlet nextDrawerId = 0;\n\n/**\n * Drawer panel chrome.\n *\n * Hosted inside a CDK overlay by `DrawerService`, which owns the backdrop,\n * scroll blocking, positioning, stacking, and Escape / outside dispatch. This\n * component renders the sliding panel: header / body / footer projection,\n * width sizing, the slide animation, focus trapping, and the close guard.\n */\n@Component({\n selector: 'fk-drawer',\n standalone: true,\n imports: [A11yModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './drawer.component.html',\n styleUrl: './drawer.component.scss',\n})\nexport class DrawerComponent {\n // ===== INPUTS =====\n /** Controls whether the drawer is open. */\n readonly open = input(false);\n /** When true, shows the close button in the drawer header. */\n readonly closable = input(true);\n /** Width variant of the drawer panel. */\n readonly width = input<DrawerWidth>('md');\n /** Optional title text rendered in the drawer header. */\n readonly header = input<string | null>(null);\n /** When true, focus returns to the previously focused element when the drawer closes. */\n readonly restoreFocus = input(true);\n /** When true, CDK auto-focus is applied when the drawer opens. */\n readonly autoFocus = input(true);\n /** Entry/exit animation applied to the drawer panel. */\n readonly animation = input<DrawerAnimation>('slide-right');\n /** When true, all close mechanisms are blocked. */\n readonly preventClose = input(false);\n /** Async guard function called before closing; return false to cancel the close. */\n readonly canClose = input<DrawerCanCloseFn | null>(null);\n\n // ===== BASE PROPS =====\n readonly className = input<string>('');\n readonly id = input<string | null>(null);\n readonly ariaLabel = input<string | null>(null);\n\n // ===== OUTPUTS =====\n /** Fires when the drawer's open state should change, emitting the new boolean. */\n readonly openChange = output<boolean>();\n /** Fires immediately before the drawer begins its open animation. */\n readonly beforeOpen = output<void>();\n /** Fires after the drawer is fully open. */\n readonly opened = output<void>();\n /** Fires immediately before the drawer begins its close animation. */\n readonly beforeClose = output<void>();\n /** Fires after the drawer is fully closed. */\n readonly closed = output<void>();\n\n // ===== INTERNAL STATE =====\n private readonly doc = inject(DOCUMENT);\n readonly titleId = `fk-drawer-title-${nextDrawerId++}`;\n private previouslyFocusedElement: HTMLElement | null = null;\n private closeGuardRunning = false;\n\n readonly visible = signal(false);\n readonly animatingOut = signal(false);\n\n // ===== COMPUTED =====\n readonly classes = computed(() => {\n return ['fk-drawer', this.className()].filter(Boolean).join(' ');\n });\n\n readonly ariaLabelledBy = computed(() => {\n if (this.ariaLabel()) {\n return null;\n }\n\n return this.header() ? this.titleId : null;\n });\n\n constructor() {\n effect(() => {\n const isOpen = this.open();\n\n if (isOpen) {\n this.onDrawerOpen();\n } else {\n this.onDrawerClose();\n }\n });\n }\n\n @HostBinding('class')\n get hostClass() {\n return this.classes();\n }\n\n @HostBinding('attr.id')\n get hostId() {\n return this.id();\n }\n\n // ===== ACTIONS =====\n /** Closes the drawer, running any `canClose` guard first; no-ops when `preventClose` is true. */\n async close() {\n if (this.closeGuardRunning) {\n return;\n }\n\n if (this.preventClose()) {\n return;\n }\n\n const guard = this.canClose();\n\n if (guard) {\n this.closeGuardRunning = true;\n\n try {\n const allowed = await Promise.resolve(guard());\n\n if (!allowed) {\n return;\n }\n } finally {\n this.closeGuardRunning = false;\n }\n }\n\n this.beforeClose.emit();\n this.openChange.emit(false);\n this.closed.emit();\n }\n\n /** Called when the panel exit animation finishes. */\n onExitAnimationDone() {\n if (this.animatingOut()) {\n this.animatingOut.set(false);\n this.visible.set(false);\n }\n }\n\n // ===== LIFECYCLE =====\n private onDrawerOpen() {\n this.previouslyFocusedElement =\n (this.doc.activeElement as HTMLElement) ?? null;\n\n this.beforeOpen.emit();\n this.animatingOut.set(false);\n this.visible.set(true);\n this.opened.emit();\n }\n\n private onDrawerClose() {\n if (this.visible()) {\n if (this.animation() !== 'none') {\n this.animatingOut.set(true);\n } else {\n this.visible.set(false);\n }\n }\n\n if (this.restoreFocus() && this.previouslyFocusedElement) {\n this.previouslyFocusedElement.focus();\n this.previouslyFocusedElement = null;\n }\n }\n}\n","@if (visible()) {\n <div\n class=\"fk-drawer__panel\"\n [class.fk-drawer__panel--sm]=\"width() === 'sm'\"\n [class.fk-drawer__panel--md]=\"width() === 'md'\"\n [class.fk-drawer__panel--lg]=\"width() === 'lg'\"\n [class.fk-drawer__panel--xl]=\"width() === 'xl'\"\n [class.fk-drawer__animate-panel--slide-right]=\"\n animation() === 'slide-right' && !animatingOut()\n \"\n [class.fk-drawer__animate-panel--fade]=\"\n animation() === 'fade' && !animatingOut()\n \"\n [class.fk-drawer__animate-panel-out--slide-right]=\"\n animation() === 'slide-right' && animatingOut()\n \"\n [class.fk-drawer__animate-panel-out--fade]=\"\n animation() === 'fade' && animatingOut()\n \"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n [cdkTrapFocus]=\"true\"\n [cdkTrapFocusAutoCapture]=\"autoFocus()\"\n (animationend)=\"onExitAnimationDone()\"\n >\n @if (header() || closable()) {\n <div class=\"fk-drawer__header\">\n @if (header()) {\n <span class=\"fk-drawer__title\" [id]=\"titleId\">\n {{ header() }}\n </span>\n }\n\n @if (closable()) {\n <button\n class=\"fk-drawer__close\"\n type=\"button\"\n aria-label=\"Close drawer\"\n (click)=\"close()\"\n >\n &times;\n </button>\n }\n </div>\n }\n\n <div class=\"fk-drawer__body\">\n <ng-content />\n </div>\n\n <div class=\"fk-drawer__footer\">\n <ng-content select=\"[fkDrawerFooter]\" />\n </div>\n </div>\n}\n","import type {\n DrawerAnimation,\n DrawerCanCloseFn,\n DrawerWidth,\n} from './drawer.types';\n\nexport interface DrawerConfig<TData = unknown> {\n closable?: boolean;\n closeOnEscape?: boolean;\n closeOnBackdrop?: boolean;\n width?: DrawerWidth;\n animation?: DrawerAnimation;\n header?: string | null;\n restoreFocus?: boolean;\n autoFocus?: boolean;\n preventClose?: boolean;\n canClose?: DrawerCanCloseFn;\n className?: string;\n ariaLabel?: string | null;\n data?: TData;\n}\n\nexport const DEFAULT_DRAWER_CONFIG: DrawerConfig = {\n closable: true,\n closeOnEscape: true,\n closeOnBackdrop: true,\n width: 'md',\n animation: 'slide-right',\n header: null,\n restoreFocus: true,\n autoFocus: true,\n preventClose: false,\n className: '',\n ariaLabel: null,\n};\n","import { Observable, Subject } from 'rxjs';\nimport { take } from 'rxjs/operators';\n\nimport type { DrawerConfig } from './drawer.config';\nimport type { DrawerCanCloseFn } from './drawer.types';\n\nexport class DrawerRef<TResult = unknown, TData = unknown> {\n private readonly beforeOpenSubject = new Subject<void>();\n private readonly afterOpenedSubject = new Subject<void>();\n private readonly beforeCloseSubject = new Subject<void>();\n private readonly afterClosedSubject = new Subject<TResult | undefined>();\n private closed = false;\n private closeGuard: DrawerCanCloseFn | null = null;\n\n readonly config: DrawerConfig<TData>;\n\n constructor(config: DrawerConfig<TData> = {} as DrawerConfig<TData>) {\n this.config = config;\n\n if (config.canClose) {\n this.closeGuard = config.canClose;\n }\n }\n\n get data(): TData | undefined {\n return this.config.data;\n }\n\n setCanClose(guard: DrawerCanCloseFn | null) {\n this.closeGuard = guard;\n }\n\n async close(result?: TResult) {\n if (this.closed) {\n return;\n }\n\n if (this.config.preventClose) {\n return;\n }\n\n if (this.closeGuard) {\n const allowed = await Promise.resolve(this.closeGuard());\n\n if (!allowed) {\n return;\n }\n }\n\n this.beforeCloseSubject.next();\n this.beforeCloseSubject.complete();\n\n this.closed = true;\n this.afterClosedSubject.next(result);\n this.afterClosedSubject.complete();\n }\n\n beforeOpen(): Observable<void> {\n return this.beforeOpenSubject.asObservable().pipe(take(1));\n }\n\n afterOpened(): Observable<void> {\n return this.afterOpenedSubject.asObservable().pipe(take(1));\n }\n\n beforeClose(): Observable<void> {\n return this.beforeCloseSubject.asObservable().pipe(take(1));\n }\n\n afterClosed(): Observable<TResult | undefined> {\n return this.afterClosedSubject.asObservable().pipe(take(1));\n }\n\n /** @internal */\n markBeforeOpen() {\n this.beforeOpenSubject.next();\n this.beforeOpenSubject.complete();\n }\n\n /** @internal */\n markOpened() {\n this.afterOpenedSubject.next();\n this.afterOpenedSubject.complete();\n }\n}\n","import { ESCAPE } from '@angular/cdk/keycodes';\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ApplicationRef,\n ComponentRef,\n createComponent,\n EnvironmentInjector,\n inject,\n Injectable,\n Injector,\n Type,\n} from '@angular/core';\n\nimport { DrawerComponent } from './drawer.component';\nimport { DEFAULT_DRAWER_CONFIG, DrawerConfig } from './drawer.config';\nimport { DrawerRef } from './drawer-ref';\n\nexport const DRAWER_DATA = Symbol('DRAWER_DATA');\nexport const DRAWER_REF = Symbol('DRAWER_REF');\n\ninterface DrawerEntry {\n ref: DrawerRef;\n overlayRef: OverlayRef;\n hostRef: ComponentRef<DrawerComponent>;\n contentRef: ComponentRef<unknown>;\n}\n\n/**\n * Opens drawers as CDK overlays pinned to the right edge.\n *\n * CDK owns the backdrop, scroll blocking, positioning, z-index stacking, and\n * top-of-stack Escape / outside dispatch. The hosted `DrawerComponent` is the\n * panel chrome (header / body / footer, the slide animation, focus trap). A\n * drawer and a dialog opened over it coexist — the dialog stacks on top by\n * open order, and the drawer is no longer evicted.\n */\n@Injectable({ providedIn: 'root' })\nexport class DrawerService {\n private readonly overlay = inject(Overlay);\n private readonly appRef = inject(ApplicationRef);\n private readonly injector = inject(EnvironmentInjector);\n private readonly doc = inject(DOCUMENT);\n\n private activeDrawers: DrawerEntry[] = [];\n\n get openCount(): number {\n return this.activeDrawers.length;\n }\n\n open<TResult = unknown, TData = unknown>(\n content: Type<unknown>,\n config?: DrawerConfig<TData>,\n ): DrawerRef<TResult, TData> {\n const mergedConfig = {\n ...DEFAULT_DRAWER_CONFIG,\n ...config,\n } as DrawerConfig<TData>;\n const drawerRef = new DrawerRef<TResult, TData>(mergedConfig);\n\n const overlayRef = this.overlay.create({\n hasBackdrop: true,\n backdropClass: 'fk-drawer__backdrop',\n panelClass: 'fk-drawer__pane',\n scrollStrategy: this.overlay.scrollStrategies.block(),\n positionStrategy: this.overlay.position().global().right('0').top('0'),\n height: '100%',\n disposeOnNavigation: true,\n });\n\n const childInjector = Injector.create({\n parent: this.injector,\n providers: [\n { provide: DRAWER_DATA as never, useValue: mergedConfig.data },\n { provide: DRAWER_REF as never, useValue: drawerRef },\n ],\n });\n\n const hostRef = overlayRef.attach(\n new ComponentPortal(DrawerComponent, null, childInjector),\n );\n\n const contentRef = createComponent(content, {\n environmentInjector: this.injector,\n elementInjector: childInjector,\n hostElement: this.doc.createElement('div'),\n });\n\n this.appRef.attachView(contentRef.hostView);\n\n const entry: DrawerEntry = {\n ref: drawerRef as DrawerRef<unknown, unknown>,\n overlayRef,\n hostRef,\n contentRef,\n };\n\n this.activeDrawers.push(entry);\n\n this.applyConfig(hostRef, mergedConfig);\n\n overlayRef.keydownEvents().subscribe((event) => {\n if (event.keyCode === ESCAPE && mergedConfig.closeOnEscape) {\n drawerRef.close();\n }\n });\n\n overlayRef.backdropClick().subscribe(() => {\n if (mergedConfig.closeOnBackdrop) {\n drawerRef.close();\n }\n });\n\n hostRef.instance.beforeOpen.subscribe(() => {\n drawerRef.markBeforeOpen();\n });\n\n hostRef.instance.opened.subscribe(() => {\n drawerRef.markOpened();\n });\n\n hostRef.instance.closed.subscribe(() => {\n drawerRef.close();\n });\n\n drawerRef.afterClosed().subscribe(() => {\n this.destroyDrawer(entry);\n });\n\n hostRef.setInput('open', true);\n hostRef.changeDetectorRef.detectChanges();\n\n const panelBody =\n overlayRef.overlayElement.querySelector('.fk-drawer__body');\n\n if (panelBody) {\n panelBody.appendChild(contentRef.location.nativeElement);\n contentRef.changeDetectorRef.detectChanges();\n\n // Move [fkDrawerFooter] elements from the body into the footer wrapper.\n const footerWrapper =\n overlayRef.overlayElement.querySelector('.fk-drawer__footer');\n const footerElements = panelBody.querySelectorAll('[fkDrawerFooter]');\n\n if (footerWrapper) {\n footerElements.forEach((el: Element) => {\n footerWrapper.appendChild(el);\n });\n }\n }\n\n return drawerRef;\n }\n\n closeAll() {\n [...this.activeDrawers].forEach((entry) => entry.ref.close());\n }\n\n private applyConfig(\n hostRef: ComponentRef<DrawerComponent>,\n config: DrawerConfig,\n ) {\n hostRef.setInput('closable', config.closable ?? true);\n hostRef.setInput('width', config.width ?? 'md');\n hostRef.setInput('animation', config.animation ?? 'slide-right');\n hostRef.setInput('header', config.header ?? null);\n hostRef.setInput('restoreFocus', config.restoreFocus ?? true);\n hostRef.setInput('autoFocus', config.autoFocus ?? true);\n hostRef.setInput('className', config.className ?? '');\n hostRef.setInput('preventClose', config.preventClose ?? false);\n hostRef.setInput('canClose', config.canClose ?? null);\n hostRef.setInput('ariaLabel', config.ariaLabel ?? null);\n }\n\n private destroyDrawer(entry: DrawerEntry) {\n const idx = this.activeDrawers.indexOf(entry);\n\n if (idx > -1) {\n this.activeDrawers.splice(idx, 1);\n }\n\n entry.hostRef.setInput('open', false);\n entry.hostRef.changeDetectorRef.detectChanges();\n\n this.appRef.detachView(entry.contentRef.hostView);\n entry.contentRef.destroy();\n\n entry.overlayRef.dispose();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAoBA,IAAI,YAAY,GAAG,CAAC;AAEpB;;;;;;;AAOG;MASU,eAAe,CAAA;;;AAGjB,IAAA,IAAI,GAAG,KAAK,CAAC,KAAK,2EAAC;;AAEnB,IAAA,QAAQ,GAAG,KAAK,CAAC,IAAI,+EAAC;;AAEtB,IAAA,KAAK,GAAG,KAAK,CAAc,IAAI,4EAAC;;AAEhC,IAAA,MAAM,GAAG,KAAK,CAAgB,IAAI,6EAAC;;AAEnC,IAAA,YAAY,GAAG,KAAK,CAAC,IAAI,mFAAC;;AAE1B,IAAA,SAAS,GAAG,KAAK,CAAC,IAAI,gFAAC;;AAEvB,IAAA,SAAS,GAAG,KAAK,CAAkB,aAAa,gFAAC;;AAEjD,IAAA,YAAY,GAAG,KAAK,CAAC,KAAK,mFAAC;;AAE3B,IAAA,QAAQ,GAAG,KAAK,CAA0B,IAAI,+EAAC;;AAG/C,IAAA,SAAS,GAAG,KAAK,CAAS,EAAE,gFAAC;AAC7B,IAAA,EAAE,GAAG,KAAK,CAAgB,IAAI,yEAAC;AAC/B,IAAA,SAAS,GAAG,KAAK,CAAgB,IAAI,gFAAC;;;IAItC,UAAU,GAAG,MAAM,EAAW;;IAE9B,UAAU,GAAG,MAAM,EAAQ;;IAE3B,MAAM,GAAG,MAAM,EAAQ;;IAEvB,WAAW,GAAG,MAAM,EAAQ;;IAE5B,MAAM,GAAG,MAAM,EAAQ;;AAGf,IAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC9B,IAAA,OAAO,G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OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,SAAS,IAAI,IAAI,CAAC;IACzD;AAEQ,IAAA,aAAa,CAAC,KAAkB,EAAA;QACtC,MAAM,GAAG,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC;AAE7C,QAAA,IAAI,GAAG,GAAG,CAAC,CAAC,EAAE;YACZ,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC;QACnC;QAEA,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC;AACrC,QAAA,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,aAAa,EAAE;QAE/C,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC;AACjD,QAAA,KAAK,CAAC,UAAU,CAAC,OAAO,EAAE;AAE1B,QAAA,KAAK,CAAC,UAAU,CAAC,OAAO,EAAE;IAC5B;uGAtJW,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAb,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,cADA,MAAM,EAAA,CAAA;;2FACnB,aAAa,EAAA,UAAA,EAAA,CAAA;kBADzB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACtClC;;AAEG;;;;"}
@@ -10,7 +10,6 @@ export * from '@frame-kit/ui-ng/directives/tooltip';
10
10
  export * from '@frame-kit/ui-ng/forms';
11
11
  export * from '@frame-kit/ui-ng/layouts/app-shell';
12
12
  export * from '@frame-kit/ui-ng/layouts/content-split';
13
- export * from '@frame-kit/ui-ng/services/overlay-orchestrator';
14
13
  export * from '@frame-kit/ui-ng/services/spotlight';
15
14
  export * from '@frame-kit/ui-ng/services/toast';
16
15
  export * from '@frame-kit/ui-ng/ui/accordion';
@@ -1 +1 @@
1
- {"version":3,"file":"frame-kit-ui-ng.mjs","sources":["../../../../packages/ui-ng/frame-kit-ui-ng.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEG"}
1
+ {"version":3,"file":"frame-kit-ui-ng.mjs","sources":["../../../../packages/ui-ng/frame-kit-ui-ng.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frame-kit/ui-ng",
3
- "version": "0.0.3",
3
+ "version": "0.0.6",
4
4
  "description": "Style-agnostic, token-driven Angular UI component library for FrameKit.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -81,10 +81,6 @@
81
81
  "types": "./types/frame-kit-ui-ng-layouts-content-split.d.ts",
82
82
  "default": "./fesm2022/frame-kit-ui-ng-layouts-content-split.mjs"
83
83
  },
84
- "./services/overlay-orchestrator": {
85
- "types": "./types/frame-kit-ui-ng-services-overlay-orchestrator.d.ts",
86
- "default": "./fesm2022/frame-kit-ui-ng-services-overlay-orchestrator.mjs"
87
- },
88
84
  "./services/spotlight": {
89
85
  "types": "./types/frame-kit-ui-ng-services-spotlight.d.ts",
90
86
  "default": "./fesm2022/frame-kit-ui-ng-services-spotlight.mjs"
@@ -21,9 +21,6 @@ declare class AppShellComponent {
21
21
  readonly endWidth: _angular_core.InputSignal<string>;
22
22
  /** Width of the end panel when collapsed to icon-rail mode. */
23
23
  readonly endCollapsedWidth: _angular_core.InputSignal<string>;
24
- private readonly orchestrator;
25
- private navOverlayId;
26
- private endOverlayId;
27
24
  readonly stickyPreference: _angular_core.WritableSignal<"closed" | null>;
28
25
  readonly tempOpen: _angular_core.WritableSignal<boolean>;
29
26
  readonly isMobile: _angular_core.WritableSignal<boolean>;
@@ -51,21 +48,21 @@ declare class AppShellComponent {
51
48
  private readonly breakpointObserver;
52
49
  private readonly destroyRef;
53
50
  constructor();
54
- /** Open the primary sidenav, registering it with the overlay orchestrator on mobile. */
51
+ /** Open the primary sidenav (temporary overlay on mobile). */
55
52
  openSidenav(): void;
56
- /** Close the primary sidenav and unregister it from the overlay orchestrator. */
53
+ /** Close the primary sidenav. */
57
54
  closeSidenav(): void;
58
55
  /** Toggle the primary sidenav between open and closed. */
59
56
  toggleSidenav(): void;
60
57
  /** Dismiss the sidenav overlay on mobile without marking it as permanently closed. */
61
58
  dismissSidenav(): void;
62
- /** Open the end panel, registering it with the overlay orchestrator on mobile. */
59
+ /** Open the end panel (temporary overlay on mobile). */
63
60
  openEnd(): void;
64
- /** Close the end panel and unregister it from the overlay orchestrator. */
61
+ /** Close the end panel. */
65
62
  closeEnd(): void;
66
63
  /** Toggle the end panel between open and closed. */
67
64
  toggleEnd(): void;
68
- /** Dismiss the end panel overlay and unregister it from the overlay orchestrator. */
65
+ /** Dismiss the end panel overlay. */
69
66
  dismissEnd(): void;
70
67
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppShellComponent, never>;
71
68
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppShellComponent, "fk-app-shell", never, { "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "sidenavWidth": { "alias": "sidenavWidth"; "required": false; "isSignal": true; }; "collapsedWidth": { "alias": "collapsedWidth"; "required": false; "isSignal": true; }; "breakpoint": { "alias": "breakpoint"; "required": false; "isSignal": true; }; "sticky": { "alias": "sticky"; "required": false; "isSignal": true; }; "collapseOnMobile": { "alias": "collapseOnMobile"; "required": false; "isSignal": true; }; "endMode": { "alias": "endMode"; "required": false; "isSignal": true; }; "endWidth": { "alias": "endWidth"; "required": false; "isSignal": true; }; "endCollapsedWidth": { "alias": "endCollapsedWidth"; "required": false; "isSignal": true; }; }, {}, never, ["[appShellHeader]", "[appShellSidenav]", "[appShellContent]", "[appShellEnd]", "[appShellFooter]"], true, never>;
@@ -1,5 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { Type, ComponentRef } from '@angular/core';
2
+ import { Type } from '@angular/core';
3
3
  import { Observable } from 'rxjs';
4
4
 
5
5
  type DialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'fullscreen';
@@ -12,17 +12,22 @@ declare class FkDialogHeaderDirective {
12
12
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FkDialogHeaderDirective, "[fkDialogHeader]", never, {}, {}, never, never, true, never>;
13
13
  }
14
14
 
15
+ /**
16
+ * Dialog panel chrome.
17
+ *
18
+ * Hosted inside a CDK overlay by `DialogService`, so the overlay layer owns
19
+ * the backdrop, scroll blocking, positioning, stacking, and Escape / outside
20
+ * dispatch. This component renders the panel itself: header / body / footer
21
+ * projection, sizing, the enter animation, focus trapping, and the close
22
+ * guard.
23
+ */
15
24
  declare class DialogComponent {
16
25
  /** Controls whether the dialog is open. */
17
26
  readonly open: _angular_core.InputSignal<boolean>;
18
- /** When true, renders a backdrop overlay behind the dialog. */
27
+ /** When true, marks the panel `aria-modal` and traps focus. */
19
28
  readonly modal: _angular_core.InputSignal<boolean>;
20
29
  /** When true, shows the close button in the dialog header. */
21
30
  readonly closable: _angular_core.InputSignal<boolean>;
22
- /** When true, pressing Escape closes the dialog. */
23
- readonly closeOnEscape: _angular_core.InputSignal<boolean>;
24
- /** When true, clicking the backdrop overlay closes the dialog. */
25
- readonly closeOnBackdrop: _angular_core.InputSignal<boolean>;
26
31
  /** Size variant that controls the dialog's max-width. */
27
32
  readonly size: _angular_core.InputSignal<DialogSize>;
28
33
  /** Where the dialog is anchored on screen. */
@@ -59,10 +64,8 @@ declare class DialogComponent {
59
64
  /** Fires after the dialog is fully closed. */
60
65
  readonly closed: _angular_core.OutputEmitterRef<void>;
61
66
  private readonly doc;
62
- private readonly destroyRef;
63
67
  readonly titleId: string;
64
68
  private previouslyFocusedElement;
65
- private bodyScrollLocked;
66
69
  private closeGuardRunning;
67
70
  /** Whether the dialog DOM is rendered (stays true during exit animation). */
68
71
  readonly visible: _angular_core.WritableSignal<boolean>;
@@ -73,18 +76,14 @@ declare class DialogComponent {
73
76
  constructor();
74
77
  get hostClass(): string;
75
78
  get hostId(): string | null;
76
- onEscapeKey(): void;
77
79
  /** Closes the dialog, running any `canClose` guard first; no-ops when `preventClose` is true. */
78
80
  close(): Promise<void>;
79
- onOverlayClick(): void;
80
- /** Called when the overlay exit animation finishes. */
81
+ /** Called when the panel exit animation finishes. */
81
82
  onExitAnimationDone(): void;
82
83
  private onDialogOpen;
83
84
  private onDialogClose;
84
- private lockBodyScroll;
85
- private unlockBodyScroll;
86
85
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DialogComponent, never>;
87
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DialogComponent, "fk-dialog", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "modal": { "alias": "modal"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "closeOnBackdrop": { "alias": "closeOnBackdrop"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "header": { "alias": "header"; "required": false; "isSignal": true; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "animation": { "alias": "animation"; "required": false; "isSignal": true; }; "preventClose": { "alias": "preventClose"; "required": false; "isSignal": true; }; "canClose": { "alias": "canClose"; "required": false; "isSignal": true; }; "fullscreenMobile": { "alias": "fullscreenMobile"; "required": false; "isSignal": true; }; "flexBody": { "alias": "flexBody"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "required": false; "isSignal": true; }; }, { "openChange": "openChange"; "beforeOpen": "beforeOpen"; "opened": "opened"; "beforeClose": "beforeClose"; "closed": "closed"; }, ["customHeader"], ["[fkDialogHeader]", "*", "[libDialogFooter]"], true, never>;
86
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DialogComponent, "fk-dialog", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "modal": { "alias": "modal"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "header": { "alias": "header"; "required": false; "isSignal": true; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "animation": { "alias": "animation"; "required": false; "isSignal": true; }; "preventClose": { "alias": "preventClose"; "required": false; "isSignal": true; }; "canClose": { "alias": "canClose"; "required": false; "isSignal": true; }; "fullscreenMobile": { "alias": "fullscreenMobile"; "required": false; "isSignal": true; }; "flexBody": { "alias": "flexBody"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "required": false; "isSignal": true; }; }, { "openChange": "openChange"; "beforeOpen": "beforeOpen"; "opened": "opened"; "beforeClose": "beforeClose"; "closed": "closed"; }, ["customHeader"], ["[fkDialogHeader]", "*", "[libDialogFooter]"], true, never>;
88
87
  }
89
88
 
90
89
  interface DialogConfig<TData = unknown> {
@@ -133,24 +132,26 @@ declare class DialogRef<TResult = unknown, TData = unknown> {
133
132
 
134
133
  declare const DIALOG_DATA: unique symbol;
135
134
  declare const DIALOG_REF: unique symbol;
136
- interface DialogEntry {
137
- ref: DialogRef;
138
- hostRef: ComponentRef<DialogComponent>;
139
- contentRef: ComponentRef<unknown>;
140
- }
135
+ /**
136
+ * Opens dialogs as CDK overlays.
137
+ *
138
+ * CDK owns the cross-cutting overlay concerns — backdrop, scroll blocking,
139
+ * centered positioning, z-index stacking (overlays layer by open order), and
140
+ * top-of-stack dispatch of Escape / outside clicks. The `DialogComponent` it
141
+ * hosts is just the panel chrome (header / body / footer, sizing, enter
142
+ * animation, focus trap). There is no global "opening X closes lower overlays"
143
+ * rule: a dialog opened over a drawer stacks on top of it, and Escape / an
144
+ * outside press dismisses whichever overlay is on top.
145
+ */
141
146
  declare class DialogService {
147
+ private readonly overlay;
142
148
  private readonly appRef;
143
149
  private readonly injector;
144
150
  private readonly doc;
145
- private readonly orchestrator;
146
151
  private activeDialogs;
147
- private overlayIds;
148
152
  get openCount(): number;
149
153
  open<TResult = unknown, TData = unknown>(content: Type<unknown>, config?: DialogConfig<TData>): DialogRef<TResult, TData>;
150
154
  closeAll(): void;
151
- /** Returns true if the given entry is the topmost (last) active dialog. */
152
- isTopmost(entry: DialogEntry): boolean;
153
- private applyZIndex;
154
155
  private applyConfig;
155
156
  private destroyDialog;
156
157
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DialogService, never>;
@@ -6,15 +6,19 @@ type DrawerWidth = 'sm' | 'md' | 'lg' | 'xl';
6
6
  type DrawerAnimation = 'slide-right' | 'fade' | 'none';
7
7
  type DrawerCanCloseFn = () => boolean | Promise<boolean>;
8
8
 
9
+ /**
10
+ * Drawer panel chrome.
11
+ *
12
+ * Hosted inside a CDK overlay by `DrawerService`, which owns the backdrop,
13
+ * scroll blocking, positioning, stacking, and Escape / outside dispatch. This
14
+ * component renders the sliding panel: header / body / footer projection,
15
+ * width sizing, the slide animation, focus trapping, and the close guard.
16
+ */
9
17
  declare class DrawerComponent {
10
18
  /** Controls whether the drawer is open. */
11
19
  readonly open: _angular_core.InputSignal<boolean>;
12
20
  /** When true, shows the close button in the drawer header. */
13
21
  readonly closable: _angular_core.InputSignal<boolean>;
14
- /** When true, pressing Escape closes the drawer. */
15
- readonly closeOnEscape: _angular_core.InputSignal<boolean>;
16
- /** When true, clicking the backdrop overlay closes the drawer. */
17
- readonly closeOnBackdrop: _angular_core.InputSignal<boolean>;
18
22
  /** Width variant of the drawer panel. */
19
23
  readonly width: _angular_core.InputSignal<DrawerWidth>;
20
24
  /** Optional title text rendered in the drawer header. */
@@ -43,7 +47,6 @@ declare class DrawerComponent {
43
47
  /** Fires after the drawer is fully closed. */
44
48
  readonly closed: _angular_core.OutputEmitterRef<void>;
45
49
  private readonly doc;
46
- private readonly destroyRef;
47
50
  readonly titleId: string;
48
51
  private previouslyFocusedElement;
49
52
  private closeGuardRunning;
@@ -54,15 +57,14 @@ declare class DrawerComponent {
54
57
  constructor();
55
58
  get hostClass(): string;
56
59
  get hostId(): string | null;
57
- onEscapeKey(): void;
58
60
  /** Closes the drawer, running any `canClose` guard first; no-ops when `preventClose` is true. */
59
61
  close(): Promise<void>;
60
- onOverlayClick(): void;
62
+ /** Called when the panel exit animation finishes. */
61
63
  onExitAnimationDone(): void;
62
64
  private onDrawerOpen;
63
65
  private onDrawerClose;
64
66
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DrawerComponent, never>;
65
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DrawerComponent, "fk-drawer", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "closeOnBackdrop": { "alias": "closeOnBackdrop"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "header": { "alias": "header"; "required": false; "isSignal": true; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "animation": { "alias": "animation"; "required": false; "isSignal": true; }; "preventClose": { "alias": "preventClose"; "required": false; "isSignal": true; }; "canClose": { "alias": "canClose"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "openChange": "openChange"; "beforeOpen": "beforeOpen"; "opened": "opened"; "beforeClose": "beforeClose"; "closed": "closed"; }, never, ["*", "[fkDrawerFooter]"], true, never>;
67
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DrawerComponent, "fk-drawer", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "header": { "alias": "header"; "required": false; "isSignal": true; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "animation": { "alias": "animation"; "required": false; "isSignal": true; }; "preventClose": { "alias": "preventClose"; "required": false; "isSignal": true; }; "canClose": { "alias": "canClose"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "openChange": "openChange"; "beforeOpen": "beforeOpen"; "opened": "opened"; "beforeClose": "beforeClose"; "closed": "closed"; }, never, ["*", "[fkDrawerFooter]"], true, never>;
66
68
  }
67
69
 
68
70
  interface DrawerConfig<TData = unknown> {
@@ -79,8 +81,6 @@ interface DrawerConfig<TData = unknown> {
79
81
  className?: string;
80
82
  ariaLabel?: string | null;
81
83
  data?: TData;
82
- /** Element to append the drawer into. Must have `position: relative`. Defaults to `document.body`. */
83
- container?: HTMLElement;
84
84
  }
85
85
  declare const DEFAULT_DRAWER_CONFIG: DrawerConfig;
86
86
 
@@ -108,18 +108,24 @@ declare class DrawerRef<TResult = unknown, TData = unknown> {
108
108
 
109
109
  declare const DRAWER_DATA: unique symbol;
110
110
  declare const DRAWER_REF: unique symbol;
111
+ /**
112
+ * Opens drawers as CDK overlays pinned to the right edge.
113
+ *
114
+ * CDK owns the backdrop, scroll blocking, positioning, z-index stacking, and
115
+ * top-of-stack Escape / outside dispatch. The hosted `DrawerComponent` is the
116
+ * panel chrome (header / body / footer, the slide animation, focus trap). A
117
+ * drawer and a dialog opened over it coexist — the dialog stacks on top by
118
+ * open order, and the drawer is no longer evicted.
119
+ */
111
120
  declare class DrawerService {
121
+ private readonly overlay;
112
122
  private readonly appRef;
113
123
  private readonly injector;
114
124
  private readonly doc;
115
- private readonly orchestrator;
116
125
  private activeDrawers;
117
- private overlayIds;
118
126
  get openCount(): number;
119
127
  open<TResult = unknown, TData = unknown>(content: Type<unknown>, config?: DrawerConfig<TData>): DrawerRef<TResult, TData>;
120
128
  closeAll(): void;
121
- private applyContainerBounds;
122
- private applyZIndex;
123
129
  private applyConfig;
124
130
  private destroyDrawer;
125
131
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DrawerService, never>;
@@ -10,7 +10,6 @@ export * from '@frame-kit/ui-ng/directives/tooltip';
10
10
  export * from '@frame-kit/ui-ng/forms';
11
11
  export * from '@frame-kit/ui-ng/layouts/app-shell';
12
12
  export * from '@frame-kit/ui-ng/layouts/content-split';
13
- export * from '@frame-kit/ui-ng/services/overlay-orchestrator';
14
13
  export * from '@frame-kit/ui-ng/services/spotlight';
15
14
  export * from '@frame-kit/ui-ng/services/toast';
16
15
  export * from '@frame-kit/ui-ng/ui/accordion';
@@ -178,10 +178,6 @@ canClose = async () => {
178
178
  `fk-dialog` uses the following design tokens:
179
179
 
180
180
  ```scss
181
- // Overlay
182
- --fk-dialog-overlay-bg
183
- --fk-dialog-overlay-z-index
184
-
185
181
  // Panel
186
182
  --fk-dialog-panel-bg
187
183
  --fk-dialog-panel-border-radius
@@ -224,10 +224,6 @@ canClose = async () => {
224
224
  `fk-drawer` uses the following design tokens:
225
225
 
226
226
  ```scss
227
- // Overlay
228
- --fk-drawer-overlay-bg
229
- --fk-drawer-overlay-z-index
230
-
231
227
  // Panel
232
228
  --fk-drawer-bg
233
229
  --fk-drawer-border-color
@@ -1,133 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { signal, computed, Injectable } from '@angular/core';
3
-
4
- let nextOverlayId = 0;
5
- /**
6
- * Centralized overlay orchestrator.
7
- *
8
- * Tracks all open overlays (dialogs, drawers, popovers, navigation, tooltips)
9
- * in a priority-based stack. When a new overlay opens:
10
- *
11
- * - All overlays with LOWER priority are closed automatically.
12
- * - Overlays with EQUAL or HIGHER priority are left open.
13
- *
14
- * This prevents UI conflicts like drawers staying open behind dialogs,
15
- * or kebab menus persisting when a modal pops up.
16
- *
17
- * @example
18
- * ```ts
19
- * const id = orchestrator.register({
20
- * priority: OVERLAY_PRIORITY.DRAWER,
21
- * type: 'drawer',
22
- * close: () => drawerRef.close(),
23
- * });
24
- *
25
- * // Later, when the overlay closes:
26
- * orchestrator.unregister(id);
27
- * ```
28
- */
29
- class OverlayOrchestrator {
30
- entries = signal([], ...(ngDevMode ? [{ debugName: "entries" }] : /* istanbul ignore next */ []));
31
- /** Whether any overlay is currently open. */
32
- hasActiveOverlay = computed(() => this.entries().length > 0, ...(ngDevMode ? [{ debugName: "hasActiveOverlay" }] : /* istanbul ignore next */ []));
33
- /** The topmost (highest priority) overlay. */
34
- topOverlay = computed(() => {
35
- const all = this.entries();
36
- if (all.length === 0) {
37
- return null;
38
- }
39
- return all.reduce((top, entry) => entry.priority >= top.priority ? entry : top);
40
- }, ...(ngDevMode ? [{ debugName: "topOverlay" }] : /* istanbul ignore next */ []));
41
- /** Current number of active overlays. */
42
- count = computed(() => this.entries().length, ...(ngDevMode ? [{ debugName: "count" }] : /* istanbul ignore next */ []));
43
- /**
44
- * Register an overlay and close all overlays with lower priority.
45
- *
46
- * @returns The unique overlay ID — pass this to `unregister()` when closing.
47
- */
48
- register(entry) {
49
- const id = `overlay-${nextOverlayId++}`;
50
- // Close all overlays with strictly lower priority
51
- const current = this.entries();
52
- const toClose = current.filter((e) => e.priority < entry.priority);
53
- for (const overlay of toClose) {
54
- overlay.close();
55
- }
56
- // Remove closed overlays and add the new one
57
- const remaining = current.filter((e) => e.priority >= entry.priority);
58
- this.entries.set([...remaining, { ...entry, id }]);
59
- return id;
60
- }
61
- /**
62
- * Unregister an overlay by ID. Call this when the overlay closes.
63
- */
64
- unregister(id) {
65
- this.entries.update((entries) => entries.filter((e) => e.id !== id));
66
- }
67
- /**
68
- * Check if an overlay with the given priority or higher is currently open.
69
- * Useful for guards that want to prevent opening lower-priority overlays.
70
- */
71
- hasOverlayAtOrAbove(priority) {
72
- return this.entries().some((e) => e.priority >= priority);
73
- }
74
- /**
75
- * Check if any overlay of a specific type is open.
76
- */
77
- hasOverlayOfType(type) {
78
- return this.entries().some((e) => e.type === type);
79
- }
80
- /**
81
- * Close all overlays. Closes from lowest to highest priority.
82
- */
83
- closeAll() {
84
- const sorted = [...this.entries()].sort((a, b) => a.priority - b.priority);
85
- for (const entry of sorted) {
86
- entry.close();
87
- }
88
- this.entries.set([]);
89
- }
90
- /**
91
- * Close all overlays at or below the given priority.
92
- */
93
- closeAtOrBelow(priority) {
94
- const current = this.entries();
95
- const toClose = current.filter((e) => e.priority <= priority);
96
- for (const overlay of toClose) {
97
- overlay.close();
98
- }
99
- this.entries.update((entries) => entries.filter((e) => e.priority > priority));
100
- }
101
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OverlayOrchestrator, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
102
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OverlayOrchestrator, providedIn: 'root' });
103
- }
104
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OverlayOrchestrator, decorators: [{
105
- type: Injectable,
106
- args: [{ providedIn: 'root' }]
107
- }] });
108
-
109
- /**
110
- * Default priority levels for common overlay types.
111
- * Higher number = higher priority = stays open when lower-priority overlays open.
112
- *
113
- * Consumers can use any number — these are conventions, not constraints.
114
- */
115
- const OVERLAY_PRIORITY = {
116
- /** Tooltips, inline popovers */
117
- TOOLTIP: 0,
118
- /** Dropdown menus, kebab menus, popovers */
119
- POPOVER: 10,
120
- /** Side panels, detail drawers */
121
- DRAWER: 20,
122
- /** Modal dialogs, confirmations */
123
- DIALOG: 30,
124
- /** App-level navigation (sidebar, mobile nav) */
125
- NAVIGATION: 40,
126
- };
127
-
128
- /**
129
- * Generated bundle index. Do not edit.
130
- */
131
-
132
- export { OVERLAY_PRIORITY, OverlayOrchestrator };
133
- //# sourceMappingURL=frame-kit-ui-ng-services-overlay-orchestrator.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"frame-kit-ui-ng-services-overlay-orchestrator.mjs","sources":["../../../../packages/ui-ng/services/overlay-orchestrator/overlay-orchestrator.service.ts","../../../../packages/ui-ng/services/overlay-orchestrator/overlay-orchestrator.types.ts","../../../../packages/ui-ng/services/overlay-orchestrator/frame-kit-ui-ng-services-overlay-orchestrator.ts"],"sourcesContent":["import { computed, Injectable, signal } from '@angular/core';\n\nimport type { OverlayEntry } from './overlay-orchestrator.types';\n\nlet nextOverlayId = 0;\n\n/**\n * Centralized overlay orchestrator.\n *\n * Tracks all open overlays (dialogs, drawers, popovers, navigation, tooltips)\n * in a priority-based stack. When a new overlay opens:\n *\n * - All overlays with LOWER priority are closed automatically.\n * - Overlays with EQUAL or HIGHER priority are left open.\n *\n * This prevents UI conflicts like drawers staying open behind dialogs,\n * or kebab menus persisting when a modal pops up.\n *\n * @example\n * ```ts\n * const id = orchestrator.register({\n * priority: OVERLAY_PRIORITY.DRAWER,\n * type: 'drawer',\n * close: () => drawerRef.close(),\n * });\n *\n * // Later, when the overlay closes:\n * orchestrator.unregister(id);\n * ```\n */\n@Injectable({ providedIn: 'root' })\nexport class OverlayOrchestrator {\n private readonly entries = signal<OverlayEntry[]>([]);\n\n /** Whether any overlay is currently open. */\n readonly hasActiveOverlay = computed(() => this.entries().length > 0);\n\n /** The topmost (highest priority) overlay. */\n readonly topOverlay = computed<OverlayEntry | null>(() => {\n const all = this.entries();\n\n if (all.length === 0) {\n return null;\n }\n\n return all.reduce((top, entry) =>\n entry.priority >= top.priority ? entry : top,\n );\n });\n\n /** Current number of active overlays. */\n readonly count = computed(() => this.entries().length);\n\n /**\n * Register an overlay and close all overlays with lower priority.\n *\n * @returns The unique overlay ID — pass this to `unregister()` when closing.\n */\n register(entry: Omit<OverlayEntry, 'id'>): string {\n const id = `overlay-${nextOverlayId++}`;\n\n // Close all overlays with strictly lower priority\n const current = this.entries();\n const toClose = current.filter((e) => e.priority < entry.priority);\n\n for (const overlay of toClose) {\n overlay.close();\n }\n\n // Remove closed overlays and add the new one\n const remaining = current.filter((e) => e.priority >= entry.priority);\n\n this.entries.set([...remaining, { ...entry, id }]);\n\n return id;\n }\n\n /**\n * Unregister an overlay by ID. Call this when the overlay closes.\n */\n unregister(id: string): void {\n this.entries.update((entries) => entries.filter((e) => e.id !== id));\n }\n\n /**\n * Check if an overlay with the given priority or higher is currently open.\n * Useful for guards that want to prevent opening lower-priority overlays.\n */\n hasOverlayAtOrAbove(priority: number): boolean {\n return this.entries().some((e) => e.priority >= priority);\n }\n\n /**\n * Check if any overlay of a specific type is open.\n */\n hasOverlayOfType(type: string): boolean {\n return this.entries().some((e) => e.type === type);\n }\n\n /**\n * Close all overlays. Closes from lowest to highest priority.\n */\n closeAll(): void {\n const sorted = [...this.entries()].sort((a, b) => a.priority - b.priority);\n\n for (const entry of sorted) {\n entry.close();\n }\n\n this.entries.set([]);\n }\n\n /**\n * Close all overlays at or below the given priority.\n */\n closeAtOrBelow(priority: number): void {\n const current = this.entries();\n const toClose = current.filter((e) => e.priority <= priority);\n\n for (const overlay of toClose) {\n overlay.close();\n }\n\n this.entries.update((entries) =>\n entries.filter((e) => e.priority > priority),\n );\n }\n}\n","/**\n * Default priority levels for common overlay types.\n * Higher number = higher priority = stays open when lower-priority overlays open.\n *\n * Consumers can use any number — these are conventions, not constraints.\n */\nexport const OVERLAY_PRIORITY = {\n /** Tooltips, inline popovers */\n TOOLTIP: 0,\n\n /** Dropdown menus, kebab menus, popovers */\n POPOVER: 10,\n\n /** Side panels, detail drawers */\n DRAWER: 20,\n\n /** Modal dialogs, confirmations */\n DIALOG: 30,\n\n /** App-level navigation (sidebar, mobile nav) */\n NAVIGATION: 40,\n} as const;\n\nexport interface OverlayEntry {\n /** Unique identifier for this overlay instance */\n id: string;\n\n /** Priority level — higher stays open, lower gets closed */\n priority: number;\n\n /** Overlay type label (for debugging/logging) */\n type: string;\n\n /** Called by the orchestrator to close this overlay */\n close: () => void;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAIA,IAAI,aAAa,GAAG,CAAC;AAErB;;;;;;;;;;;;;;;;;;;;;;;AAuBG;MAEU,mBAAmB,CAAA;AACb,IAAA,OAAO,GAAG,MAAM,CAAiB,EAAE,8EAAC;;AAG5C,IAAA,gBAAgB,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,GAAG,CAAC,uFAAC;;AAG5D,IAAA,UAAU,GAAG,QAAQ,CAAsB,MAAK;AACvD,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE;AAE1B,QAAA,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;AACpB,YAAA,OAAO,IAAI;QACb;QAEA,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,KAC3B,KAAK,CAAC,QAAQ,IAAI,GAAG,CAAC,QAAQ,GAAG,KAAK,GAAG,GAAG,CAC7C;AACH,IAAA,CAAC,iFAAC;;AAGO,IA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