@cngx/common 0.0.1-rc.0 → 0.1.0-rc.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 (61) hide show
  1. package/a11y/README.md +13 -16
  2. package/card/README.md +2 -21
  3. package/chart/README.md +5 -8
  4. package/data/README.md +45 -47
  5. package/dialog/README.md +12 -15
  6. package/display/README.md +5 -9
  7. package/fesm2022/cngx-common-a11y.mjs +140 -40
  8. package/fesm2022/cngx-common-a11y.mjs.map +1 -1
  9. package/fesm2022/cngx-common-card.mjs +157 -69
  10. package/fesm2022/cngx-common-card.mjs.map +1 -1
  11. package/fesm2022/cngx-common-chart.mjs +389 -92
  12. package/fesm2022/cngx-common-chart.mjs.map +1 -1
  13. package/fesm2022/cngx-common-data.mjs +311 -151
  14. package/fesm2022/cngx-common-data.mjs.map +1 -1
  15. package/fesm2022/cngx-common-dialog.mjs +167 -29
  16. package/fesm2022/cngx-common-dialog.mjs.map +1 -1
  17. package/fesm2022/cngx-common-display.mjs +445 -110
  18. package/fesm2022/cngx-common-display.mjs.map +1 -1
  19. package/fesm2022/cngx-common-interactive.mjs +2025 -435
  20. package/fesm2022/cngx-common-interactive.mjs.map +1 -1
  21. package/fesm2022/cngx-common-layout.mjs +188 -31
  22. package/fesm2022/cngx-common-layout.mjs.map +1 -1
  23. package/fesm2022/cngx-common-popover.mjs +711 -90
  24. package/fesm2022/cngx-common-popover.mjs.map +1 -1
  25. package/fesm2022/cngx-common-stepper.mjs +1258 -60
  26. package/fesm2022/cngx-common-stepper.mjs.map +1 -1
  27. package/fesm2022/cngx-common-tabs.mjs +247 -41
  28. package/fesm2022/cngx-common-tabs.mjs.map +1 -1
  29. package/fesm2022/cngx-common.mjs +2 -2
  30. package/fesm2022/cngx-common.mjs.map +1 -1
  31. package/interactive/README.md +5 -5
  32. package/layout/README.md +2 -2
  33. package/package.json +5 -4
  34. package/popover/README.md +8 -34
  35. package/stepper/README.md +49 -8
  36. package/tabs/README.md +6 -6
  37. package/theming/components/cngx-async.css +74 -0
  38. package/theming/components/cngx-backdrop.css +73 -0
  39. package/theming/components/cngx-badge.css +340 -0
  40. package/theming/components/cngx-bottom-sheet.css +201 -0
  41. package/theming/components/cngx-button-toggle.css +99 -0
  42. package/theming/components/cngx-dialog.css +358 -0
  43. package/theming/components/cngx-divider.css +145 -0
  44. package/theming/components/cngx-listbox.css +220 -0
  45. package/theming/components/cngx-menu.css +371 -0
  46. package/theming/components/cngx-ripple.css +116 -0
  47. package/theming/components/cngx-tooltip.css +265 -0
  48. package/theming/system-tokens.css +24 -0
  49. package/types/cngx-common-a11y.d.ts +136 -36
  50. package/types/cngx-common-card.d.ts +137 -22
  51. package/types/cngx-common-chart.d.ts +337 -40
  52. package/types/cngx-common-data.d.ts +277 -45
  53. package/types/cngx-common-dialog.d.ts +162 -22
  54. package/types/cngx-common-display.d.ts +422 -78
  55. package/types/cngx-common-interactive.d.ts +1862 -305
  56. package/types/cngx-common-layout.d.ts +191 -28
  57. package/types/cngx-common-popover.d.ts +632 -87
  58. package/types/cngx-common-stepper.d.ts +1110 -38
  59. package/types/cngx-common-tabs.d.ts +306 -32
  60. package/types/cngx-common.d.ts +1 -1
  61. package/README.md +0 -18
@@ -1 +1 @@
1
- {"version":3,"file":"cngx-common-tabs.mjs","sources":["../../../projects/common/tabs/commit-handler.ts","../../../projects/common/tabs/tab-group-host.token.ts","../../../projects/common/tabs/presenter.directive.ts","../../../projects/common/tabs/tab-panel-host.token.ts","../../../projects/common/tabs/tab-content.directive.ts","../../../projects/common/tabs/tab-label.directive.ts","../../../projects/common/tabs/tab.directive.ts","../../../projects/common/tabs/router-sync.directive.ts","../../../projects/common/tabs/tabs-config.ts","../../../projects/common/tabs/i18n/tabs-i18n.ts","../../../projects/common/tabs/provide-cngx-tabs.ts","../../../projects/common/tabs/overflow/dom-adapter.ts","../../../projects/common/tabs/overflow/dom-anchor-retry.ts","../../../projects/common/tabs/overflow/tab-overflow-trigger.directive.ts","../../../projects/common/tabs/overflow/tab-overflow-item.directive.ts","../../../projects/common/tabs/slots/tab-error-badge.directive.ts","../../../projects/common/tabs/slots/tab-rejection-icon.directive.ts","../../../projects/common/tabs/slots/tab-busy-spinner.directive.ts","../../../projects/common/tabs/slots/tab-group-template-cascade.ts","../../../projects/common/tabs/announcements/tab-group-announcements.ts","../../../projects/common/tabs/glyphs.ts","../../../projects/common/tabs/overflow/overflow-template-cascade.ts","../../../projects/common/tabs/scroll-sync/organism-scroll-sync.ts","../../../projects/common/tabs/registry/directive-by-id-map.ts","../../../projects/common/tabs/public-api.ts","../../../projects/common/tabs/cngx-common-tabs.ts"],"sourcesContent":["import { InjectionToken, type Signal } from '@angular/core';\nimport { isObservable, type Observable, type Subscription } from 'rxjs';\n\nimport {\n type CngxCommitController,\n type CngxCommitHandle,\n} from '@cngx/common/data';\n\nimport type { CngxTabsCommitAction } from './presenter.directive';\n\n/**\n * Adapts the shared commit-controller to the tabs action shape. The\n * presenter delegates to {@link beginTransition} when `commitAction`\n * is bound.\n */\nexport interface CngxTabsCommitHandler {\n /**\n * Start a tab-transition commit. Returns synchronously — read the\n * controller's `state` signal for in-flight status. `onResolve`\n * fires once with `accept = true` on success or `false` on\n * rejection; skipped on supersede.\n */\n beginTransition(\n fromIndex: number,\n toIndex: number,\n action: CngxTabsCommitAction,\n onResolve: (accept: boolean) => void,\n ): void;\n\n /** Cancel the in-flight transition without firing callbacks. */\n cancel(): void;\n\n /** Live `pending` flag from the controller. */\n readonly isCommitting: Signal<boolean>;\n}\n\n/**\n * Options for {@link createTabsCommitHandler}.\n */\nexport interface CngxTabsCommitHandlerOptions {\n readonly controller: CngxCommitController<number>;\n}\n\n/**\n * Wraps a {@link CngxCommitController} with the action-shape adapter\n * that collapses `Observable<boolean>` / `Promise<boolean>` /\n * `boolean` returns into a single `accept: boolean` outcome.\n */\nexport function createTabsCommitHandler(\n opts: CngxTabsCommitHandlerOptions,\n): CngxTabsCommitHandler {\n const { controller } = opts;\n return {\n isCommitting: controller.isCommitting,\n\n beginTransition(fromIndex, toIndex, action, onResolve) {\n controller.begin(\n (handlers) => runTabsAction(action, fromIndex, toIndex, handlers),\n toIndex,\n fromIndex,\n {\n onSuccess: () => onResolve(true),\n onError: () => onResolve(false),\n },\n );\n },\n\n cancel() {\n controller.cancel();\n },\n };\n}\n\nfunction runTabsAction(\n action: CngxTabsCommitAction,\n fromIndex: number,\n toIndex: number,\n handlers: {\n readonly onSuccess: (committed: number | undefined) => void;\n readonly onError: (err: unknown) => void;\n },\n): CngxCommitHandle {\n let cancelled = false;\n let unsubscribe: (() => void) | null = null;\n\n const safeSuccess = (accept: boolean): void => {\n if (cancelled) {\n return;\n }\n if (accept) {\n handlers.onSuccess(toIndex);\n } else {\n handlers.onError(new Error('Tab transition refused by commitAction'));\n }\n };\n const safeError = (err: unknown): void => {\n if (cancelled) {\n return;\n }\n handlers.onError(err);\n };\n\n let result: boolean | Promise<boolean> | Observable<boolean>;\n try {\n result = action(fromIndex, toIndex);\n } catch (err: unknown) {\n safeError(err);\n return {\n cancel: () => {\n cancelled = true;\n },\n };\n }\n\n if (isObservable(result)) {\n // Synchronous Observables (`of(true)`) emit inside `.subscribe` before\n // the assignment binds — close over a pre-declared `let` to avoid TDZ.\n let sub: Subscription | null = null;\n sub = result.subscribe({\n next: (accept) => {\n safeSuccess(accept);\n sub?.unsubscribe();\n },\n error: (err: unknown) => safeError(err),\n });\n unsubscribe = () => sub?.unsubscribe();\n } else if (\n result != null &&\n typeof (result as { then?: unknown }).then === 'function'\n ) {\n (result as Promise<boolean>).then(safeSuccess, safeError);\n } else {\n safeSuccess(result as boolean);\n }\n\n return {\n cancel: () => {\n cancelled = true;\n unsubscribe?.();\n },\n };\n}\n\n/**\n * Factory signature for {@link CNGX_TABS_COMMIT_HANDLER_FACTORY}.\n * Override to wrap the default with retry-with-backoff, telemetry,\n * or offline queues.\n */\nexport type CngxTabsCommitHandlerFactory = (\n opts: CngxTabsCommitHandlerOptions,\n) => CngxTabsCommitHandler;\n\n/**\n * DI token for the commit-handler factory. Defaults to\n * {@link createTabsCommitHandler}. Sibling to\n * `CNGX_ARRAY_COMMIT_HANDLER_FACTORY` (select) and\n * `CNGX_STEPPER_COMMIT_HANDLER_FACTORY`.\n */\nexport const CNGX_TABS_COMMIT_HANDLER_FACTORY =\n new InjectionToken<CngxTabsCommitHandlerFactory>(\n 'CngxTabsCommitHandlerFactory',\n {\n providedIn: 'root',\n factory: () => createTabsCommitHandler,\n },\n );\n","import { InjectionToken, type ModelSignal, type Signal } from '@angular/core';\n\nimport type { CngxAsyncState, StatusTransition } from '@cngx/core/utils';\n\nimport type { CngxErrorAggregatorContract } from '@cngx/common/interactive';\n\n/**\n * Registration handle a `CngxTab` atom passes to its presenter via\n * {@link CngxTabGroupHost.register}. Fields are exposed by reference\n * so subsequent input changes propagate without re-registration.\n * `errorAggregator` is a `Signal<...>` slot so consumer aggregators\n * resolved via `viewChild` after first registration still bind.\n */\nexport interface CngxTabHandle {\n readonly id: string;\n readonly label: Signal<string | undefined>;\n readonly disabled: Signal<boolean>;\n readonly errorAggregator: Signal<CngxErrorAggregatorContract | undefined>;\n}\n\n/**\n * Contract atoms see when they inject the presenter via\n * {@link CNGX_TAB_GROUP_HOST}. Atoms never reach into the concrete\n * class — keeps layering cycle-free and the decompose schematic clean.\n */\nexport interface CngxTabGroupHost {\n readonly tabs: Signal<readonly CngxTabHandle[]>;\n readonly activeIndex: ModelSignal<number>;\n readonly activeId: Signal<string | null>;\n readonly orientation: Signal<'horizontal' | 'vertical'>;\n readonly loop: Signal<boolean>;\n readonly commitState: CngxAsyncState<number | undefined>;\n readonly intendedIndex: Signal<number | undefined>;\n /**\n * Reactive current/previous pair for the commit-state status. Lets\n * organisms and skin sub-components derive transition-driven\n * announcements (`pending` → `success`, `pending` → `error`, sync\n * `idle` → `error`) from a single tracker.\n */\n readonly commitTransition: StatusTransition;\n\n /**\n * Tab index of the last refused commit (both optimistic and\n * pessimistic modes). Cleared on next successful re-pick of the\n * same index or via {@link clearLastFailed}. Drives the persistent\n * rejection-icon decoration.\n *\n * @remarks\n * The `pending → error` pulse keyframe (`cngx-tab-pulse-error`)\n * does not retrigger on rapid supersede sequences — CSS animations\n * only fire on fresh class application. See `tabs-accepted-debt §3`;\n * the persistent icon plus static red outline carry the durable\n * signal in the no-pulse case.\n */\n readonly lastFailedIndex: Signal<number | undefined>;\n\n /**\n * Safe-harbour origin index captured at the start of an active\n * commit window. Written when `select()` opens a transition under\n * `commitAction`; retained on `error` so the live-region phrase\n * can resolve the origin label; cleared on `success`. Outside the\n * commit window the slot may carry a stale value — consumers must\n * gate reads by joining with `lastFailedIndex`. The origin is\n * meaningful only when `lastFailedIndex !== undefined`.\n */\n readonly originIndexDuringCommit: Signal<number | undefined>;\n\n register(handle: CngxTabHandle): void;\n unregister(id: string): void;\n\n select(index: number): void;\n selectNext(): void;\n selectPrevious(): void;\n selectById(id: string): void;\n\n /**\n * Clear {@link lastFailedIndex} without unwinding\n * {@link originIndexDuringCommit} (consumers gate reads on\n * `lastFailedIndex` anyway). Call when the bound data source\n * changes and the rollback marker is no longer meaningful.\n */\n clearLastFailed(): void;\n}\n\n/**\n * DI token for the tab presenter's contract. Presenter provides via\n * `useExisting`; `CngxTab` injects to register; the organism injects\n * to forward keyboard nav from `CngxRovingTabindex`.\n */\nexport const CNGX_TAB_GROUP_HOST = new InjectionToken<CngxTabGroupHost>(\n 'CngxTabGroupHost',\n);\n","import {\n computed,\n Directive,\n inject,\n input,\n model,\n signal,\n type Signal,\n} from '@angular/core';\n\nimport {\n CNGX_COMMIT_CONTROLLER_FACTORY,\n type CngxCommitController,\n} from '@cngx/common/data';\nimport {\n CNGX_STATEFUL,\n createTransitionTracker,\n type CngxAsyncState,\n type StatusTransition,\n} from '@cngx/core/utils';\nimport type { Observable } from 'rxjs';\n\nimport {\n CNGX_TABS_COMMIT_HANDLER_FACTORY,\n type CngxTabsCommitHandler,\n} from './commit-handler';\nimport {\n CNGX_TAB_GROUP_HOST,\n type CngxTabGroupHost,\n type CngxTabHandle,\n} from './tab-group-host.token';\n\n/**\n * Async-commit action shape for tab transitions. Receives origin\n * and target indices; resolves `true` to commit, `false` to refuse.\n * `Observable | Promise | sync` union mirrors the rest of the cngx\n * commit-action family.\n */\nexport type CngxTabsCommitAction = (\n fromIndex: number,\n toIndex: number,\n) => boolean | Promise<boolean> | Observable<boolean>;\n\n/**\n * Tab-group presenter — brain of every cngx tab flow. Owns the\n * active-index model, the tab registry, orientation, loop policy,\n * and the commit-controller lifecycle. Provides\n * {@link CNGX_TAB_GROUP_HOST} for atoms and {@link CNGX_STATEFUL}\n * so `<cngx-toast-on />` / `<cngx-banner-on />` compose without\n * `[state]` wiring.\n *\n * **Layer:** `@cngx/common/tabs` (Level 2). Directive-only —\n * organisms compose via `hostDirectives`, consumers attach\n * `[cngxTabGroup]` directly.\n */\n@Directive({\n selector: '[cngxTabGroup]',\n exportAs: 'cngxTabGroup',\n standalone: true,\n providers: [\n { provide: CNGX_TAB_GROUP_HOST, useExisting: CngxTabGroupPresenter },\n { provide: CNGX_STATEFUL, useExisting: CngxTabGroupPresenter },\n ],\n})\nexport class CngxTabGroupPresenter implements CngxTabGroupHost {\n readonly activeIndex = model<number>(0);\n readonly orientation = input<'horizontal' | 'vertical'>('horizontal');\n readonly loop = input<boolean>(true);\n\n /**\n * Async-commit action gating the transition. When non-null,\n * `select(...)` routes through {@link CngxTabsCommitHandler}; the\n * action's resolution decides whether the change lands. Supersede\n * semantics come from the commit-controller — a rapid second\n * `select(...)` cancels the in-flight runner.\n */\n readonly commitAction = input<CngxTabsCommitAction | null>(null);\n /**\n * Default `'optimistic'` — tab change is navigation, not a save,\n * so eager visual feedback matches the user's mental model.\n * Switch to `'pessimistic'` when the new tab must wait for the\n * action to confirm.\n */\n readonly commitMode = input<'optimistic' | 'pessimistic'>('optimistic');\n\n private readonly genericFactory = inject(CNGX_COMMIT_CONTROLLER_FACTORY);\n private readonly commitController: CngxCommitController<number> =\n this.genericFactory<number>();\n private readonly commitHandler: CngxTabsCommitHandler = inject(\n CNGX_TABS_COMMIT_HANDLER_FACTORY,\n )({ controller: this.commitController });\n\n /** Producer surface for the `CNGX_STATEFUL` bridge contract. */\n readonly state: CngxAsyncState<number | undefined> = this.commitController.state;\n readonly commitState: CngxAsyncState<number | undefined> =\n this.commitController.state;\n /**\n * Index the user is currently trying to commit to. Tracked\n * separately from `state.data()` (which only updates on success)\n * to drive per-tab `aria-busy`.\n */\n readonly intendedIndex: Signal<number | undefined> =\n this.commitController.intendedValue;\n\n /**\n * Current/previous pair for `commitState.status()`. Skin\n * sub-components feed `<span cngxLiveRegion>` from this tracker\n * for declarative SR announcements. Shared across consumers so\n * the tracker's `linkedSignal` is allocated once per presenter.\n */\n readonly commitTransition: StatusTransition = createTransitionTracker(\n () => this.commitController.state.status(),\n );\n\n // Persistence-of-error surface — see `CngxTabGroupHost.lastFailedIndex`\n // and `originIndexDuringCommit` for the contract.\n private readonly lastFailedIndexState = signal<number | undefined>(undefined);\n private readonly originIndexDuringCommitState = signal<number | undefined>(\n undefined,\n );\n /** {@inheritDoc CngxTabGroupHost.lastFailedIndex} */\n readonly lastFailedIndex: Signal<number | undefined> =\n this.lastFailedIndexState.asReadonly();\n /** {@inheritDoc CngxTabGroupHost.originIndexDuringCommit} */\n readonly originIndexDuringCommit: Signal<number | undefined> =\n this.originIndexDuringCommitState.asReadonly();\n\n private readonly tabsState = signal<readonly CngxTabHandle[]>([], {\n equal: tabsEqual,\n });\n readonly tabs: Signal<readonly CngxTabHandle[]> = this.tabsState.asReadonly();\n\n private readonly clampedIndex = computed(() => {\n const count = this.tabs().length;\n if (count === 0) {\n return 0;\n }\n return Math.max(0, Math.min(this.activeIndex(), count - 1));\n });\n\n readonly activeId: Signal<string | null> = computed(\n () => this.tabs()[this.clampedIndex()]?.id ?? null,\n { equal: Object.is },\n );\n\n register(handle: CngxTabHandle): void {\n const current = this.tabsState();\n const idx = current.findIndex((h) => h.id === handle.id);\n if (idx >= 0) {\n const next = current.slice();\n next[idx] = handle;\n this.tabsState.set(next);\n return;\n }\n this.tabsState.set([...current, handle]);\n }\n\n unregister(id: string): void {\n const current = this.tabsState();\n const next = current.filter((h) => h.id !== id);\n if (next.length !== current.length) {\n this.tabsState.set(next);\n }\n }\n\n /** {@inheritDoc CngxTabGroupHost.clearLastFailed} */\n clearLastFailed(): void {\n this.lastFailedIndexState.set(undefined);\n }\n\n select(index: number): void {\n const tabs = this.tabs();\n if (tabs.length === 0) {\n return;\n }\n const target = Math.max(0, Math.min(index, tabs.length - 1));\n if (tabs[target].disabled()) {\n return;\n }\n const previous = this.activeIndex();\n if (target === previous) {\n return;\n }\n\n const action = this.commitAction();\n if (!action) {\n // No-action fast path — `originIndexDuringCommit` stays\n // untouched, so a stale origin can never leak into the\n // live-region announcement.\n this.activeIndex.set(target);\n if (this.lastFailedIndexState() === target) {\n this.lastFailedIndexState.set(undefined);\n }\n return;\n }\n\n // Open the commit window — origin is captured ONLY here so a\n // stale value never lingers into a non-commit navigation.\n this.originIndexDuringCommitState.set(previous);\n const mode = this.commitMode();\n if (mode === 'optimistic') {\n this.activeIndex.set(target);\n }\n this.commitHandler.beginTransition(previous, target, action, (accept) => {\n if (accept) {\n // Window closes on success — origin label no longer needed;\n // clear the rejection flag if the user re-picked the failed\n // target successfully.\n this.originIndexDuringCommitState.set(undefined);\n if (this.lastFailedIndexState() === target) {\n this.lastFailedIndexState.set(undefined);\n }\n if (mode === 'pessimistic') {\n this.activeIndex.set(target);\n }\n } else {\n // Reject — flag the refused target; RETAIN the origin so\n // the organism's `liveAnnouncement` computed can resolve\n // the origin label for the rich rollback phrase. Optimistic\n // rolls back; pessimistic never moved.\n this.lastFailedIndexState.set(target);\n if (mode === 'optimistic') {\n this.activeIndex.set(previous);\n }\n }\n });\n }\n\n selectNext(): void {\n const tabs = this.tabs();\n if (tabs.length === 0) {\n return;\n }\n let next = this.activeIndex() + 1;\n while (next < tabs.length && tabs[next].disabled()) {\n next++;\n }\n if (next < tabs.length) {\n this.select(next);\n return;\n }\n if (this.loop()) {\n let i = 0;\n while (i < tabs.length && tabs[i].disabled()) {\n i++;\n }\n if (i < tabs.length && i !== this.activeIndex()) {\n this.select(i);\n }\n }\n }\n\n selectPrevious(): void {\n const tabs = this.tabs();\n if (tabs.length === 0) {\n return;\n }\n let prev = this.activeIndex() - 1;\n while (prev >= 0 && tabs[prev].disabled()) {\n prev--;\n }\n if (prev >= 0) {\n this.select(prev);\n return;\n }\n if (this.loop()) {\n let i = tabs.length - 1;\n while (i >= 0 && tabs[i].disabled()) {\n i--;\n }\n if (i >= 0 && i !== this.activeIndex()) {\n this.select(i);\n }\n }\n }\n\n selectById(id: string): void {\n const tabs = this.tabs();\n const idx = tabs.findIndex((h) => h.id === id);\n if (idx >= 0) {\n this.select(idx);\n }\n }\n}\n\n/**\n * Structural equality for the tab registry. Compares length and\n * per-entry `id`, `disabled()`, and `label()`.\n *\n * `errorAggregator` is left out on purpose. The handle is a stable\n * per-tab reference injected once, so comparing it would push the\n * memoisation burden onto consumers and break the structural-equal\n * contract.\n *\n * Reading `disabled()` and `label()` here doesn't subscribe — the\n * comparator runs synchronously inside `signal.set()`, outside any\n * tracking context.\n *\n * @internal\n */\nexport function tabsEqual(\n a: readonly CngxTabHandle[],\n b: readonly CngxTabHandle[],\n): boolean {\n if (a === b) {\n return true;\n }\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; i++) {\n if (\n a[i].id !== b[i].id ||\n a[i].disabled() !== b[i].disabled() ||\n a[i].label() !== b[i].label()\n ) {\n return false;\n }\n }\n return true;\n}\n","import { InjectionToken, type Signal, type TemplateRef } from '@angular/core';\n\nimport type { CngxTabHandle } from './tab-group-host.token';\n\n/**\n * Read-mostly panel-surface contract for the overflow molecule, skin\n * sub-components, and future panel-level helpers. Narrower than\n * {@link CngxTabGroupHost} — register / unregister stay on the brain.\n *\n * The single write path is `selectById`; routing back through the\n * presenter preserves clamping, disabled-skip, and commit-action\n * gating. Template resolvers let skin sub-components project the\n * `*cngxTabLabel` / `*cngxTabContent` slots without depending on the\n * concrete `CngxTabGroup` class.\n */\nexport interface CngxTabPanelHost {\n readonly tabs: Signal<readonly CngxTabHandle[]>;\n readonly activeId: Signal<string | null>;\n readonly orientation: Signal<'horizontal' | 'vertical'>;\n\n selectById(id: string): void;\n\n /** Resolves a tab id to its `*cngxTabLabel` template (consumer-supplied). */\n labelTemplateFor(id: string): TemplateRef<unknown> | null;\n /** Resolves a tab id to its `*cngxTabContent` template (consumer-supplied). */\n contentTemplateFor(id: string): TemplateRef<unknown> | null;\n}\n\n/**\n * DI token the organism provides via `useExisting`. The overflow\n * molecule and consumer-authored skin sub-components inject this\n * instead of the concrete component class.\n */\nexport const CNGX_TAB_PANEL_HOST = new InjectionToken<CngxTabPanelHost>(\n 'CngxTabPanelHost',\n);\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Structural slot directive marking the per-tab panel-body template.\n * Discovered by `<cngx-tab-group>` via `contentChild` on each\n * `CngxTab` and projected into the matching `role=\"tabpanel\"`.\n *\n * ```html\n * <div cngxTab id=\"settings\">\n * <ng-template cngxTabLabel>Settings</ng-template>\n * <ng-template cngxTabContent>\n * <p>Settings panel body…</p>\n * </ng-template>\n * </div>\n * ```\n */\n@Directive({\n selector: 'ng-template[cngxTabContent]',\n exportAs: 'cngxTabContent',\n standalone: true,\n})\nexport class CngxTabContent {\n readonly templateRef = inject(TemplateRef<unknown>);\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Structural slot directive marking the per-tab label template.\n * Discovered by `<cngx-tab-group>` via `contentChild` on each\n * `CngxTab` and projected into the tab strip.\n *\n * ```html\n * <div cngxTab id=\"settings\">\n * <ng-template cngxTabLabel>Settings</ng-template>\n * <ng-template cngxTabContent>...</ng-template>\n * </div>\n * ```\n */\n@Directive({\n selector: 'ng-template[cngxTabLabel]',\n exportAs: 'cngxTabLabel',\n standalone: true,\n})\nexport class CngxTabLabel {\n readonly templateRef = inject(TemplateRef<unknown>);\n}\n","import {\n computed,\n contentChild,\n DestroyRef,\n Directive,\n inject,\n input,\n type Signal,\n} from '@angular/core';\n\nimport { nextUid } from '@cngx/core/utils';\n\nimport type { CngxErrorAggregatorContract } from '@cngx/common/interactive';\n\nimport { CngxTabContent } from './tab-content.directive';\nimport { CngxTabLabel } from './tab-label.directive';\nimport { CNGX_TAB_GROUP_HOST } from './tab-group-host.token';\n\n/**\n * Single-tab atom. Registers with the enclosing presenter via\n * {@link CNGX_TAB_GROUP_HOST} on construction; deregisters via\n * {@link DestroyRef} on teardown. The presenter holds the atom's\n * input signals by reference, so input changes propagate without\n * re-registration. `labelTemplate` / `contentTemplate` are projected\n * by the organism — the atom carries no rendering logic.\n */\n@Directive({\n selector: '[cngxTab]',\n exportAs: 'cngxTab',\n standalone: true,\n})\nexport class CngxTab {\n readonly id = input<string>(nextUid('cngx-tab-'));\n readonly disabled = input<boolean>(false);\n readonly label = input<string | undefined>(undefined);\n readonly errorAggregator = input<CngxErrorAggregatorContract | undefined>(\n undefined,\n );\n\n readonly labelTemplate = contentChild(CngxTabLabel);\n readonly contentTemplate = contentChild(CngxTabContent);\n\n private readonly host = inject(CNGX_TAB_GROUP_HOST, { optional: true });\n\n /** `true` when the presenter's `activeId` equals this tab's id. */\n readonly selected: Signal<boolean> = computed(\n () => this.host?.activeId() === this.id(),\n { equal: Object.is },\n );\n\n constructor() {\n if (!this.host) {\n throw new Error(\n 'CngxTab: no enclosing CngxTabGroupPresenter found. Wrap the tab inside an element carrying [cngxTabGroup] (or place it inside <cngx-tab-group>).',\n );\n }\n const tabId = this.id();\n this.host.register({\n id: tabId,\n label: this.label,\n disabled: this.disabled,\n errorAggregator: this.errorAggregator,\n });\n const host = this.host;\n inject(DestroyRef).onDestroy(() => host.unregister(tabId));\n }\n}\n","import {\n afterNextRender,\n DestroyRef,\n Directive,\n effect,\n inject,\n input,\n untracked,\n} from '@angular/core';\nimport { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';\nimport { NavigationEnd, Router } from '@angular/router';\nimport { filter } from 'rxjs/operators';\n\nimport { CNGX_TAB_GROUP_HOST } from './tab-group-host.token';\n\n/**\n * URL deep-linking for tab groups. Bidirectional sync between\n * `activeId` and a URL fragment or query-param. Opt-in via\n * `[cngxTabsFragmentSync]` on the presenter element.\n *\n * - `mode = 'fragment'` (default) → `#tab=settings`\n * - `mode = 'queryParam'` with `paramName = 'tab'` → `?tab=settings`\n *\n * `Router` is optional — without it the directive logs a dev warning\n * via `afterNextRender` and becomes a no-op. Every `router.navigate`\n * and `host.selectById` inside the effects sits in `untracked()`.\n */\n@Directive({\n selector: '[cngxTabsFragmentSync]',\n exportAs: 'cngxTabsFragmentSync',\n standalone: true,\n})\nexport class CngxTabsFragmentSync {\n readonly mode = input<'fragment' | 'queryParam'>('fragment');\n readonly paramName = input<string>('tab');\n\n private readonly host = inject(CNGX_TAB_GROUP_HOST, { host: true });\n private readonly router = inject(Router, { optional: true });\n\n constructor() {\n if (!this.router) {\n afterNextRender(() => {\n console.warn(\n 'CngxTabsFragmentSync: no Router available — directive is a no-op. ' +\n 'Provide @angular/router via provideRouter(...) to enable deep-linking.',\n );\n });\n return;\n }\n const router = this.router;\n const destroyRef = inject(DestroyRef);\n\n afterNextRender(() => {\n const initial = this.readUrlValue(router);\n if (initial) {\n untracked(() => this.host.selectById(initial));\n }\n });\n\n effect(() => {\n const id = this.host.activeId();\n if (!id) {\n return;\n }\n untracked(() => {\n const navigation =\n this.mode() === 'fragment'\n ? router.navigate([], {\n fragment: `${this.paramName()}=${id}`,\n queryParamsHandling: 'merge',\n replaceUrl: true,\n })\n : router.navigate([], {\n queryParams: { [this.paramName()]: id },\n queryParamsHandling: 'merge',\n replaceUrl: true,\n });\n // Router rejection (e.g. cancelled navigation) has no recovery path.\n navigation.catch?.(() => undefined);\n });\n });\n\n const navEnd = toSignal(\n router.events.pipe(\n filter((e): e is NavigationEnd => e instanceof NavigationEnd),\n takeUntilDestroyed(destroyRef),\n ),\n { initialValue: null },\n );\n effect(() => {\n const e = navEnd();\n if (!e) {\n return;\n }\n untracked(() => {\n const next = this.readUrlValue(router);\n if (next && next !== this.host.activeId()) {\n this.host.selectById(next);\n }\n });\n });\n }\n\n private readUrlValue(router: Router): string | null {\n if (this.mode() === 'fragment') {\n const fragment = router.routerState.snapshot.root.fragment ?? '';\n return this.parseFragment(fragment);\n }\n return (\n router.routerState.snapshot.root.queryParamMap.get(this.paramName()) ??\n null\n );\n }\n\n private parseFragment(fragment: string): string | null {\n const param = this.paramName();\n const segments = fragment.split('&');\n for (const seg of segments) {\n const [key, val] = seg.split('=');\n if (key === param && val) {\n return val;\n }\n }\n return null;\n }\n}\n","import {\n type EnvironmentProviders,\n inject,\n InjectionToken,\n makeEnvironmentProviders,\n type Provider,\n type TemplateRef,\n} from '@angular/core';\n\nimport type { CngxTabOverflowItemContext } from './overflow/tab-overflow-item.directive';\nimport type { CngxTabOverflowTriggerContext } from './overflow/tab-overflow-trigger.directive';\nimport type { CngxTabBusySpinnerContext } from './slots/tab-busy-spinner.directive';\nimport type { CngxTabErrorBadgeContext } from './slots/tab-error-badge.directive';\nimport type { CngxTabRejectionIconContext } from './slots/tab-rejection-icon.directive';\n\n/**\n * Aria-label overrides for the tab-group landmark region. Library\n * defaults are English; consumers override via\n * {@link withTabsAriaLabels}.\n *\n * Per-tab nav phrasing (`previousTab`, `nextTab`) lives in\n * {@link CngxTabsI18n}, not here — landmark naming and SR phrasing\n * stay on separate override paths.\n */\nexport interface CngxTabsAriaLabels {\n readonly tabsRegion?: string;\n}\n\n/**\n * Fallback labels for derived strings (role descriptions, badge SR\n * announcements). Library defaults are English; consumers override\n * per locale.\n */\nexport interface CngxTabsFallbackLabels {\n readonly tabRoleDescription?: string;\n readonly tabPanelRoleDescription?: string;\n}\n\n/**\n * App-wide template overrides for `<cngx-tab-group>` and\n * `<cngx-tab-overflow>` skin regions. Middle tier of the 3-stage\n * cascade — per-instance directive > this field > built-in markup.\n * Apply via the matching `with*Template` builders. Shape mirrors\n * `CngxStepperTemplates` so consumer templates port across\n * families.\n */\nexport interface CngxTabsTemplates {\n readonly overflowTrigger?: TemplateRef<CngxTabOverflowTriggerContext>;\n readonly overflowItem?: TemplateRef<CngxTabOverflowItemContext>;\n readonly errorBadge?: TemplateRef<CngxTabErrorBadgeContext>;\n readonly rejectionIcon?: TemplateRef<CngxTabRejectionIconContext>;\n readonly busySpinner?: TemplateRef<CngxTabBusySpinnerContext>;\n}\n\n/**\n * Tab-group config surface. Resolution priority: per-instance Input\n * → `provideTabsConfigAt` (viewProviders) → `provideTabsConfig`\n * (root) → library default.\n */\nexport interface CngxTabsConfig {\n readonly defaultOrientation?: 'horizontal' | 'vertical';\n readonly defaultLoop?: boolean;\n readonly defaultCommitMode?: 'optimistic' | 'pessimistic';\n readonly routerSyncMode?: 'fragment' | 'queryParam';\n readonly routerSyncParam?: string;\n readonly ariaLabels?: CngxTabsAriaLabels;\n readonly fallbackLabels?: CngxTabsFallbackLabels;\n /**\n * Quiescence window (ms) for the overflow IO debounce. Burst\n * emissions during strip animations collapse to one write; the\n * More counter re-renders once IO has been quiet this long.\n * Default 100ms. Capped by {@link overflowMaxDeferMs}.\n */\n readonly overflowStabilizeMs?: number;\n /**\n * Hard ceiling (ms) on commit deferral while IO bursts keep\n * arriving — without it, sustained churn (momentum scroll,\n * continuous resize) would clear the stabilize timer forever and\n * the More counter would freeze on a stale value, breaking\n * Pillar 2. Default 250ms.\n */\n readonly overflowMaxDeferMs?: number;\n /**\n * App-wide template overrides for `<cngx-tab-overflow>` regions.\n * Middle tier of the family-standard 3-stage cascade. See\n * {@link CngxTabsTemplates}.\n */\n readonly templates?: CngxTabsTemplates;\n}\n\nconst TABS_CONFIG_DEFAULTS: Required<\n Omit<CngxTabsConfig, 'ariaLabels' | 'fallbackLabels' | 'templates'>\n> & {\n ariaLabels: CngxTabsAriaLabels;\n fallbackLabels: CngxTabsFallbackLabels;\n templates: CngxTabsTemplates;\n} = {\n defaultOrientation: 'horizontal',\n defaultLoop: true,\n defaultCommitMode: 'optimistic',\n routerSyncMode: 'fragment',\n routerSyncParam: 'tab',\n ariaLabels: {\n tabsRegion: 'Tabs',\n },\n fallbackLabels: {\n // W3C ARIA tablist convention — kept distinct from\n // `i18n.tabsLabel` so AT doesn't read the same string twice\n // back-to-back across `aria-roledescription` and `aria-label`.\n tabRoleDescription: 'tab list',\n tabPanelRoleDescription: 'tab panel',\n },\n overflowStabilizeMs: 100,\n overflowMaxDeferMs: 250,\n templates: {},\n};\n\n/**\n * DI token for the resolved tabs config. `providedIn: 'root'` with\n * the library defaults; override via {@link provideTabsConfig}\n * (root) or {@link provideTabsConfigAt} (component scope).\n */\nexport const CNGX_TABS_CONFIG = new InjectionToken<CngxTabsConfig>(\n 'CngxTabsConfig',\n { providedIn: 'root', factory: () => TABS_CONFIG_DEFAULTS },\n);\n\n/**\n * Feature signature for `with*` config builders. The hidden\n * `_target` discriminator lets {@link provideCngxTabs} dispatch\n * config features to {@link provideTabsConfig} while i18n features\n * route to {@link provideTabsI18n}.\n */\nexport type CngxTabsConfigFeature = ((\n config: CngxTabsConfig,\n) => CngxTabsConfig) & {\n readonly _target: 'config';\n};\n\n/**\n * Internal helper that brands a config-mutator function with the\n * `_target` discriminator. Every `with*` config feature returns one\n * of these.\n *\n * @internal\n */\nfunction defineTabsConfigFeature(\n fn: (config: CngxTabsConfig) => CngxTabsConfig,\n): CngxTabsConfigFeature {\n return Object.assign(fn, { _target: 'config' as const });\n}\n\n/**\n * Override the default orientation. Per-instance `[orientation]`\n * still wins; this changes the cascade default only.\n */\nexport function withTabsDefaultOrientation(\n orientation: 'horizontal' | 'vertical',\n): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({\n ...cfg,\n defaultOrientation: orientation,\n }));\n}\n\n/**\n * @deprecated Use {@link withTabsDefaultOrientation}. The unprefixed name\n * collides with the stepper family's identical symbol when both libs\n * are auto-imported. The alias stays for one minor release before\n * removal.\n */\nexport const withDefaultOrientation = withTabsDefaultOrientation;\n\n/**\n * Override whether roving-tabindex navigation loops from last back to\n * first (and vice versa). Per-instance `[loop]` Input still wins.\n */\nexport function withTabsRovingLoop(loop: boolean): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({ ...cfg, defaultLoop: loop }));\n}\n\n/**\n * Override the default commit mode for async tab transitions.\n * `'optimistic'` activates the tab on action dispatch and rolls back\n * on error; `'pessimistic'` waits for success. Per-instance\n * `[commitMode]` Input still wins.\n */\nexport function withTabsCommitMode(\n mode: 'optimistic' | 'pessimistic',\n): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({\n ...cfg,\n defaultCommitMode: mode,\n }));\n}\n\n/**\n * Configure router synchronisation for the active tab. `mode` chooses\n * the URL surface (URL fragment or query parameter); `param` names\n * the key (default `'tab'`).\n */\nexport function withTabsRouterSync(\n mode: 'fragment' | 'queryParam',\n param = 'tab',\n): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({\n ...cfg,\n routerSyncMode: mode,\n routerSyncParam: param,\n }));\n}\n\n/**\n * Merge ARIA labels into the cascade. Keys not provided keep their\n * library defaults; per-instance overrides on the tab group still win.\n */\nexport function withTabsAriaLabels(\n labels: CngxTabsAriaLabels,\n): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({\n ...cfg,\n ariaLabels: { ...cfg.ariaLabels, ...labels },\n }));\n}\n\n/**\n * Merge text fallback labels (overflow trigger, busy / rejection text)\n * into the cascade. Used when a slot directive is not present.\n */\nexport function withTabsFallbackLabels(\n labels: CngxTabsFallbackLabels,\n): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({\n ...cfg,\n fallbackLabels: { ...cfg.fallbackLabels, ...labels },\n }));\n}\n\n/**\n * Override the IO-debounce window (ms). See\n * {@link CngxTabsConfig.overflowStabilizeMs}.\n */\nexport function withTabOverflowStabilizeMs(ms: number): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({\n ...cfg,\n overflowStabilizeMs: ms,\n }));\n}\n\n/**\n * Override the worst-case staleness ceiling on the visibility-map\n * commit. See {@link CngxTabsConfig.overflowMaxDeferMs}.\n */\nexport function withTabOverflowMaxDeferMs(ms: number): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({\n ...cfg,\n overflowMaxDeferMs: ms,\n }));\n}\n\n/**\n * App-wide override for the More-button label. Middle tier;\n * per-instance `*cngxTabOverflowTrigger` still wins.\n *\n * ```ts\n * @ViewChild('moreTrigger', { static: true, read: TemplateRef })\n * moreTrigger!: TemplateRef<CngxTabOverflowTriggerContext>;\n *\n * providers: [provideTabsConfig(withTabOverflowTriggerTemplate(this.moreTrigger))]\n * ```\n */\nexport function withTabOverflowTriggerTemplate(\n template: TemplateRef<CngxTabOverflowTriggerContext>,\n): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({\n ...cfg,\n templates: { ...cfg.templates, overflowTrigger: template },\n }));\n}\n\n/**\n * App-wide override for each row inside the overflow popover.\n * Middle tier; per-instance `*cngxTabOverflowItem` still wins.\n */\nexport function withTabOverflowItemTemplate(\n template: TemplateRef<CngxTabOverflowItemContext>,\n): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({\n ...cfg,\n templates: { ...cfg.templates, overflowItem: template },\n }));\n}\n\n/**\n * App-wide override for the error-badge decoration. Middle tier;\n * per-instance `*cngxTabErrorBadge` still wins. Sibling of the\n * stepper family's `withStepBadgeTemplate`.\n */\nexport function withTabErrorBadgeTemplate(\n template: TemplateRef<CngxTabErrorBadgeContext>,\n): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({\n ...cfg,\n templates: { ...cfg.templates, errorBadge: template },\n }));\n}\n\n/**\n * App-wide override for the rejection-icon decoration. Middle\n * tier; per-instance `*cngxTabRejectionIcon` still wins. Sibling\n * of {@link withStepRejectionTemplate}.\n */\nexport function withTabRejectionIconTemplate(\n template: TemplateRef<CngxTabRejectionIconContext>,\n): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({\n ...cfg,\n templates: { ...cfg.templates, rejectionIcon: template },\n }));\n}\n\n/**\n * App-wide override for the commit-pending busy-spinner overlay.\n * Middle tier; per-instance `*cngxTabBusySpinner` still wins.\n * Sibling of {@link withStepBusySpinnerTemplate}.\n */\nexport function withTabBusySpinnerTemplate(\n template: TemplateRef<CngxTabBusySpinnerContext>,\n): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({\n ...cfg,\n templates: { ...cfg.templates, busySpinner: template },\n }));\n}\n\nfunction resolveFeatures(\n features: readonly CngxTabsConfigFeature[],\n): CngxTabsConfig {\n return features.reduce<CngxTabsConfig>(\n (cfg, feat) => feat(cfg),\n TABS_CONFIG_DEFAULTS,\n );\n}\n\n/**\n * Root-level provider. Apply once in `bootstrapApplication` /\n * `appConfig.providers`. Returns {@link EnvironmentProviders} per\n * the canonical cngx config-cascade signature.\n */\nexport function provideTabsConfig(\n ...features: readonly CngxTabsConfigFeature[]\n): EnvironmentProviders {\n return makeEnvironmentProviders([\n { provide: CNGX_TABS_CONFIG, useValue: resolveFeatures(features) },\n ]);\n}\n\n/**\n * Component-scoped override. Returns `Provider[]` (not\n * {@link EnvironmentProviders}) because `viewProviders` rejects\n * opaque environment providers. Resolution priority: per-instance\n * Input > viewProviders (`At`) > root > default.\n *\n * ```ts\n * @Component({\n * viewProviders: [...provideTabsConfigAt(withTabsDefaultOrientation('vertical'))],\n * })\n * ```\n */\nexport function provideTabsConfigAt(\n ...features: readonly CngxTabsConfigFeature[]\n): Provider[] {\n return [{ provide: CNGX_TABS_CONFIG, useValue: resolveFeatures(features) }];\n}\n\n/**\n * Inject the resolved tabs config in an injection context.\n */\nexport function injectTabsConfig(): CngxTabsConfig {\n return inject(CNGX_TABS_CONFIG);\n}\n","import { inject, InjectionToken, type Provider } from '@angular/core';\n\n/**\n * Tabs i18n surface. Library defaults are English; consumers\n * override via {@link provideTabsI18n}. Sibling to\n * `CNGX_STEPPER_I18N` and `CNGX_CHART_I18N`.\n */\nexport interface CngxTabsI18n {\n readonly tabsLabel: string;\n readonly selectedTab: (label: string, position: number, count: number) => string;\n readonly tabHasErrors: (count: number) => string;\n readonly moreTabsLabel: (count: number) => string;\n readonly previousTab: string;\n readonly nextTab: string;\n /**\n * @deprecated Superseded by {@link commitRolledBackTo}. Retained as\n * the defensive fallback in `liveAnnouncement` when the origin\n * label is unresolvable — fires for unlabeled tabs or programmatic\n * `commitState` writes that bypass `select()`. See\n * `tabs-accepted-debt §4`.\n */\n readonly commitFailedRetry: string;\n readonly commitInFlight: string;\n /**\n * Origin-aware rollback announcement. Receives the safe-harbour\n * tab label and yields the rollback phrase. Read on the\n * `pending → error` transition when both `lastFailedIndex` and\n * `originIndexDuringCommit` are set.\n */\n readonly commitRolledBackTo: (originLabel: string) => string;\n}\n\nconst TABS_I18N_DEFAULTS: CngxTabsI18n = {\n tabsLabel: 'Tabs',\n selectedTab: (label, position, count) =>\n `Tab ${position} of ${count}: ${label}`,\n tabHasErrors: (count) => `${count} error${count === 1 ? '' : 's'}`,\n moreTabsLabel: (count) => `${count} more`,\n previousTab: 'Previous tab',\n nextTab: 'Next tab',\n commitFailedRetry: 'Tab change refused — retry?',\n commitInFlight: 'Switching tab…',\n commitRolledBackTo: (originLabel) =>\n `Could not save changes — reverted to \"${originLabel}\".`,\n};\n\n/**\n * DI token for the tabs i18n bundle. `providedIn: 'root'` with\n * English defaults.\n */\nexport const CNGX_TABS_I18N = new InjectionToken<CngxTabsI18n>(\n 'CngxTabsI18n',\n { providedIn: 'root', factory: () => TABS_I18N_DEFAULTS },\n);\n\n/**\n * Branded feature-fn for {@link provideTabsI18n} and\n * {@link provideCngxTabs}. The hidden `_target` discriminator routes\n * i18n features to `provideTabsI18n` and config features to\n * `provideTabsConfig` from the unified aggregator.\n */\nexport type CngxTabsI18nFeature = ((\n bundle: CngxTabsI18n,\n) => CngxTabsI18n) & {\n readonly _target: 'i18n';\n};\n\n/**\n * Brands an i18n-mutator with the `_target` discriminator.\n *\n * @internal\n */\nfunction defineTabsI18nFeature(\n fn: (bundle: CngxTabsI18n) => CngxTabsI18n,\n): CngxTabsI18nFeature {\n return Object.assign(fn, { _target: 'i18n' as const });\n}\n\n/**\n * Override i18n labels via a partial bundle — unset keys keep the\n * English default. Same shape as `withTabsAriaLabels` /\n * `withTabsFallbackLabels` so `provideCngxTabs` composes both\n * surfaces uniformly.\n */\nexport function withTabsI18nLabels(\n overrides: Partial<CngxTabsI18n>,\n): CngxTabsI18nFeature {\n return defineTabsI18nFeature((bundle) => ({ ...bundle, ...overrides }));\n}\n\nfunction resolveI18nFeatures(\n features: readonly CngxTabsI18nFeature[],\n): CngxTabsI18n {\n return features.reduce<CngxTabsI18n>(\n (bundle, feat) => feat(bundle),\n TABS_I18N_DEFAULTS,\n );\n}\n\n/**\n * Provider for the tabs i18n bundle. Compose `withTabsI18nLabels(...)`\n * (and future i18n `with*` features); unset keys fall back to the\n * English default.\n *\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideTabsI18n(\n * withTabsI18nLabels({ tabsLabel: 'Reiter', previousTab: 'Vorheriger' }),\n * ),\n * ],\n * });\n * ```\n */\nexport function provideTabsI18n(\n ...features: readonly CngxTabsI18nFeature[]\n): Provider {\n return {\n provide: CNGX_TABS_I18N,\n useValue: resolveI18nFeatures(features),\n };\n}\n\n/**\n * Inject the resolved tabs i18n bundle.\n */\nexport function injectTabsI18n(): CngxTabsI18n {\n return inject(CNGX_TABS_I18N);\n}\n","import {\n type EnvironmentProviders,\n isDevMode,\n makeEnvironmentProviders,\n type Provider,\n} from '@angular/core';\n\nimport {\n provideTabsI18n,\n type CngxTabsI18nFeature,\n} from './i18n/tabs-i18n';\nimport {\n provideTabsConfig,\n provideTabsConfigAt,\n type CngxTabsConfigFeature,\n} from './tabs-config';\n\n/**\n * Union of feature kinds the tabs aggregator accepts. Today: config\n * + i18n; future surfaces widen the union and dispatch via the\n * hidden `_target` discriminator.\n */\nexport type CngxTabsFeature = CngxTabsConfigFeature | CngxTabsI18nFeature;\n\ninterface PartitionedFeatures {\n readonly config: CngxTabsConfigFeature[];\n readonly i18n: CngxTabsI18nFeature[];\n}\n\nfunction partitionFeatures(\n features: readonly CngxTabsFeature[],\n): PartitionedFeatures {\n const config: CngxTabsConfigFeature[] = [];\n const i18n: CngxTabsI18nFeature[] = [];\n for (const feat of features) {\n if (feat._target === 'i18n') {\n i18n.push(feat);\n continue;\n }\n if (feat._target === 'config') {\n config.push(feat);\n continue;\n }\n // Unbranded feature — runtime escape from the `_target` type.\n // Drop with dev-warn so an i18n-shaped override never lands\n // silently in `CNGX_TABS_CONFIG`.\n if (isDevMode()) {\n console.warn(\n '[provideCngxTabs] Dropped feature without a `_target` ' +\n 'discriminator. Brand config-side mutators with ' +\n '`defineTabsConfigFeature(...)` (or use a `with*` helper) ' +\n 'and i18n-side mutators with `withTabsI18nLabels(...)`.',\n );\n }\n }\n return { config, i18n };\n}\n\n/**\n * Unified aggregator for tabs configuration. Routes features by\n * `_target` to {@link provideTabsConfig} and {@link provideTabsI18n}.\n * Sibling to `provideCngxMenu` and `provideCngxSelect`; apply once in\n * the app providers array. Returns {@link EnvironmentProviders}; for\n * `viewProviders` use {@link provideCngxTabsAt} — opaque\n * `EnvironmentProviders` cannot live there.\n *\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideCngxTabs(\n * withTabsDefaultOrientation('vertical'),\n * withTabsAriaLabels({ tabsRegion: 'Bereiche' }),\n * withTabsI18nLabels({ tabsLabel: 'Bereiche', moreTabsLabel: (n) => `${n} mehr` }),\n * withTabOverflowStabilizeMs(150),\n * ),\n * ],\n * });\n * ```\n */\nexport function provideCngxTabs(\n ...features: readonly CngxTabsFeature[]\n): EnvironmentProviders {\n const { config, i18n } = partitionFeatures(features);\n return makeEnvironmentProviders([\n provideTabsConfig(...config),\n ...(i18n.length > 0 ? [provideTabsI18n(...i18n)] : []),\n ]);\n}\n\n/**\n * Component-scoped twin of {@link provideCngxTabs}. Returns\n * `Provider[]` for `viewProviders`/`providers`; same dispatch\n * semantics, different scope.\n *\n * ```ts\n * @Component({\n * viewProviders: [\n * ...provideCngxTabsAt(\n * withTabsDefaultOrientation('vertical'),\n * withTabsI18nLabels({ tabsLabel: 'Bereiche' }),\n * ),\n * ],\n * })\n * ```\n */\nexport function provideCngxTabsAt(\n ...features: readonly CngxTabsFeature[]\n): Provider[] {\n const { config, i18n } = partitionFeatures(features);\n return [\n ...provideTabsConfigAt(...config),\n ...(i18n.length > 0 ? [provideTabsI18n(...i18n)] : []),\n ];\n}\n","import { InjectionToken } from '@angular/core';\n\nimport type { CngxTabHandle } from '../tab-group-host.token';\nimport type { CngxTabPanelHost } from '../tab-panel-host.token';\n\n/**\n * Resolves the DOM elements `<cngx-tab-overflow>` observes. cngx-native\n * keys by `[id=\"${handle.id}-header\"]`; the Material twin keys by\n * positional index into `.mat-mdc-tab` (handle ids never appear on\n * Material's rendered DOM). The molecule is variant-agnostic and\n * consumes whichever adapter\n * {@link CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY} provides.\n */\nexport interface CngxTabOverflowDomAdapter {\n /**\n * Resolve the IntersectionObserver root — the scroll viewport the\n * molecule observes. Returning `null` short-circuits the attach;\n * the molecule's rAF retry loop polls again next frame.\n */\n resolveStripRoot(\n panelHost: CngxTabPanelHost,\n host: HTMLElement,\n ): HTMLElement | null;\n\n /**\n * Resolve the rendered button for `handle` inside `root`. cngx-native\n * keys by `handle.id`; Material adapters key by `idx`.\n */\n resolveTabButton(\n handle: CngxTabHandle,\n root: HTMLElement,\n idx: number,\n ): HTMLElement | null;\n}\n\n/**\n * Factory signature for {@link CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY}.\n */\nexport type CngxTabOverflowDomAdapterFactory = () => CngxTabOverflowDomAdapter;\n\n/**\n * Default adapter for the cngx-native `<cngx-tab-group>` strip:\n * walks `host.closest('.cngx-tabs__strip-wrapper')` for the IO root,\n * then `[id=\"${handle.id}-header\"]` for each button.\n */\nexport function createCngxTabOverflowDefaultDomAdapter(): CngxTabOverflowDomAdapter {\n return {\n resolveStripRoot(_panelHost, host) {\n const wrapper = host.closest<HTMLElement>('.cngx-tabs__strip-wrapper');\n return wrapper?.querySelector<HTMLElement>('.cngx-tabs__strip') ?? null;\n },\n resolveTabButton(handle, root, _idx) {\n return root.querySelector<HTMLElement>(`[id=\"${handle.id}-header\"]`);\n },\n };\n}\n\n/**\n * DI token for the overflow molecule's DOM-resolution strategy.\n * Override at directive `providers` or component `viewProviders` to\n * swap in a Material, custom-skin, or test-double adapter without\n * forking the molecule. Defaults to\n * {@link createCngxTabOverflowDefaultDomAdapter}.\n */\nexport const CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY =\n new InjectionToken<CngxTabOverflowDomAdapterFactory>(\n 'CngxTabOverflowDomAdapterFactory',\n {\n providedIn: 'root',\n factory: () => createCngxTabOverflowDefaultDomAdapter,\n },\n );\n","import { InjectionToken } from '@angular/core';\n\n/**\n * Outcome reported by an `attempt` callback. `true` halts the loop\n * (success); `false` or `null` schedules another tick.\n */\nexport type CngxDomAnchorRetryResult = true | false | null;\n\n/**\n * Configuration for {@link createDomAnchorRetry}.\n */\nexport interface CngxDomAnchorRetryOptions {\n /**\n * Per-attempt callback. `true` halts; `false`/`null` schedules\n * another attempt.\n */\n readonly attempt: () => CngxDomAnchorRetryResult;\n /**\n * Cap on unsuccessful attempts before {@link onGiveUp} fires.\n * The first synchronous call counts as attempt #1 — `5` permits\n * four scheduled retries after the initial.\n */\n readonly maxAttempts: number;\n /**\n * Schedules the next attempt (rAF / `afterNextRender` /\n * `setTimeout` / `queueMicrotask`). Returns a cancellation\n * closure — return a noop when the scheduler doesn't expose one.\n */\n readonly schedule: (cb: () => void) => () => void;\n /** Fires once after the `maxAttempts`-th unsuccessful attempt. */\n readonly onGiveUp?: () => void;\n}\n\n/**\n * Imperative handle returned by {@link createDomAnchorRetry}.\n */\nexport interface CngxDomAnchorRetryHandle {\n /** Begin (or restart) the retry loop. Resets the attempt counter. */\n start(): void;\n /** Stop the retry loop and cancel any pending scheduled attempt. */\n cancel(): void;\n}\n\n/**\n * Bounded retry loop for DOM-anchoring patterns — shared\n * attempt-counter + give-up + cancellation contract. Used by\n * `<cngx-tab-overflow>`'s rAF strip-attach loop and `[cngxMatTabs]`'s\n * `afterNextRender` header-anchor loop. Consumer-supplied scheduler\n * lets different timing primitives flow through one counter.\n *\n * ```ts\n * const retry = createDomAnchorRetry({\n * attempt: () => {\n * const root = host.closest('.strip-wrapper');\n * if (!root) return null;\n * observer.observe(root);\n * return true;\n * },\n * maxAttempts: 60,\n * schedule: (cb) => {\n * const h = requestAnimationFrame(cb);\n * return () => cancelAnimationFrame(h);\n * },\n * onGiveUp: () => console.warn('strip wrapper not found'),\n * });\n * afterNextRender(() => retry.start());\n * destroyRef.onDestroy(() => retry.cancel());\n * ```\n */\nexport function createDomAnchorRetry(\n options: CngxDomAnchorRetryOptions,\n): CngxDomAnchorRetryHandle {\n let attempts = 0;\n let cancelLast: (() => void) | null = null;\n let stopped = false;\n const tick = (): void => {\n if (stopped) {\n cancelLast = null;\n return;\n }\n cancelLast = null;\n let result: CngxDomAnchorRetryResult;\n try {\n result = options.attempt();\n } catch {\n // Swallow + terminal stop — covers the test-runner teardown\n // race where a global (e.g. IntersectionObserver) is reset\n // between schedule and fire, before consumer DestroyRef can\n // call cancel(). Production callback bugs still surface via\n // their own console.error before they throw here.\n stopped = true;\n return;\n }\n if (result === true) {\n stopped = true;\n return;\n }\n attempts++;\n if (attempts >= options.maxAttempts) {\n stopped = true;\n options.onGiveUp?.();\n return;\n }\n cancelLast = options.schedule(tick);\n };\n return {\n start: () => {\n stopped = false;\n attempts = 0;\n tick();\n },\n cancel: () => {\n stopped = true;\n cancelLast?.();\n cancelLast = null;\n },\n };\n}\n\n/**\n * Factory signature for {@link CNGX_DOM_ANCHOR_RETRY_FACTORY} —\n * matches {@link createDomAnchorRetry} for drop-in overrides.\n */\nexport type CngxDomAnchorRetryFactory = (\n options: CngxDomAnchorRetryOptions,\n) => CngxDomAnchorRetryHandle;\n\n/**\n * DI token for the DOM-anchor retry policy. Default\n * {@link createDomAnchorRetry}. Two real consumers today —\n * `<cngx-tab-overflow>`'s rAF strip-attach loop and\n * `[cngxMatTabs]`'s `afterNextRender` header-anchor loop. Override\n * via `providers` / `viewProviders` for retry-with-backoff,\n * telemetry on give-up, etc. Symmetric to\n * `CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY`,\n * `CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY`, and\n * `CNGX_TABS_COMMIT_HANDLER_FACTORY`.\n */\nexport const CNGX_DOM_ANCHOR_RETRY_FACTORY =\n new InjectionToken<CngxDomAnchorRetryFactory>(\n 'CngxDomAnchorRetryFactory',\n {\n providedIn: 'root',\n factory: () => createDomAnchorRetry,\n },\n );\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\nimport type { CngxTabHandle } from '../tab-group-host.token';\n\n/**\n * Context for the `*cngxTabOverflowTrigger` template. Replaces the\n * default `i18n.moreTabsLabel(count)` text on the More button; the\n * surrounding `<button cngxPopoverTrigger>` shell (`aria-haspopup`,\n * `aria-expanded`, click handler, hidden binding) stays library-owned.\n */\nexport interface CngxTabOverflowTriggerContext {\n /** Convenience alias for `count` — usable as `let-count` shorthand. */\n readonly $implicit: number;\n /** Number of hidden tabs currently surfaced through the overflow popover. */\n readonly count: number;\n /** Hidden tabs, in the order they appear in `presenter.tabs()`. */\n readonly hiddenTabs: readonly CngxTabHandle[];\n}\n\n/**\n * Structural slot for the More-button label. 3-stage cascade:\n * per-instance directive >\n * `CNGX_TABS_CONFIG.templates.overflowTrigger` >\n * `i18n.moreTabsLabel(count)`.\n *\n * ```html\n * <cngx-tab-overflow>\n * <ng-template cngxTabOverflowTrigger let-count>\n * <my-icon name=\"dots\" /> +{{ count }}\n * </ng-template>\n * </cngx-tab-overflow>\n * ```\n */\n@Directive({\n selector: 'ng-template[cngxTabOverflowTrigger]',\n exportAs: 'cngxTabOverflowTrigger',\n standalone: true,\n})\nexport class CngxTabOverflowTrigger {\n readonly templateRef = inject<TemplateRef<CngxTabOverflowTriggerContext>>(\n TemplateRef,\n );\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\nimport type { CngxTabHandle } from '../tab-group-host.token';\n\n/**\n * Context for the `*cngxTabOverflowItem` template. Replaces the\n * default `tab.label() ?? tab.id` text inside the More popover; the\n * surrounding `<li role=\"menuitem\">` shell (`aria-disabled`, click\n * handler, `data-tab-id`) stays library-owned.\n */\nexport interface CngxTabOverflowItemContext {\n /** Convenience alias for `tab` — usable as `let-tab` shorthand. */\n readonly $implicit: CngxTabHandle;\n /** The hidden tab the row represents. */\n readonly tab: CngxTabHandle;\n /**\n * Commit-aware select. Routes through `panelHost.selectById(tab.id)`\n * and dismisses the popover; no-op when `disabled`.\n */\n readonly pick: () => void;\n /** Mirrors `tab.disabled()` — pre-resolved for consumer convenience. */\n readonly disabled: boolean;\n /** Row index inside `hiddenTabs()`, starting at 0. */\n readonly index: number;\n}\n\n/**\n * Structural slot for the per-row body inside the More popover.\n * 3-stage cascade: per-instance directive >\n * `CNGX_TABS_CONFIG.templates.overflowItem` > built-in label text.\n *\n * ```html\n * <cngx-tab-overflow>\n * <ng-template cngxTabOverflowItem let-tab let-disabled=\"disabled\">\n * <my-icon [name]=\"tab.id\" />\n * <span class=\"row-label\" [class.is-muted]=\"disabled\">\n * {{ tab.label() }}\n * </span>\n * </ng-template>\n * </cngx-tab-overflow>\n * ```\n */\n@Directive({\n selector: 'ng-template[cngxTabOverflowItem]',\n exportAs: 'cngxTabOverflowItem',\n standalone: true,\n})\nexport class CngxTabOverflowItem {\n readonly templateRef = inject<TemplateRef<CngxTabOverflowItemContext>>(\n TemplateRef,\n );\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\nimport type { CngxTabHandle } from '../tab-group-host.token';\n\n/**\n * Context for the `*cngxTabErrorBadge` template. Renders only when\n * the tab's `errorAggregator?.shouldShow()` is `true`; the visibility\n * gate stays library-owned. Sibling shape to `CngxStepBadgeContext`.\n */\nexport interface CngxTabErrorBadgeContext {\n /** The tab handle carrying id / label / disabled / aggregator signals. */\n readonly tab: CngxTabHandle;\n}\n\n/**\n * Structural slot for the error-badge template. 3-stage cascade:\n * per-instance directive >\n * `CNGX_TABS_CONFIG.templates.errorBadge` >\n * `CNGX_TABS_GLYPHS.errorBadge`.\n *\n * ```html\n * <cngx-tab-group>\n * <ng-template cngxTabErrorBadge let-tab=\"tab\">\n * <span class=\"my-badge-pill\">\n * {{ tab.errorAggregator()?.count() }}\n * </span>\n * </ng-template>\n * </cngx-tab-group>\n * ```\n */\n@Directive({\n selector: 'ng-template[cngxTabErrorBadge]',\n exportAs: 'cngxTabErrorBadge',\n standalone: true,\n})\nexport class CngxTabErrorBadge {\n readonly templateRef = inject<TemplateRef<CngxTabErrorBadgeContext>>(\n TemplateRef,\n );\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Context for the `*cngxTabRejectionIcon` template. Renders only on\n * the tab matching `presenter.lastFailedIndex()`; the visibility\n * gate stays library-owned. `originLabel` is the safe-harbour tab,\n * derived from `presenter.originIndexDuringCommit()` — `undefined`\n * for the synchronous-rejection edge case. Sibling shape to\n * `CngxStepRejectionContext`.\n */\nexport interface CngxTabRejectionIconContext {\n /** Flat-index of the rejected tab (`presenter.lastFailedIndex()`). */\n readonly failedIndex: number;\n /** Resolved label of the safe-harbour tab, when derivable. */\n readonly originLabel: string | undefined;\n}\n\n/**\n * Structural slot for the rejection-decoration template. 3-stage\n * cascade: per-instance directive >\n * `CNGX_TABS_CONFIG.templates.rejectionIcon` >\n * `CNGX_TABS_GLYPHS.rejectionIcon`.\n *\n * ```html\n * <cngx-tab-group>\n * <ng-template\n * cngxTabRejectionIcon\n * let-failedIndex=\"failedIndex\"\n * let-originLabel=\"originLabel\"\n * >\n * <my-icon name=\"rollback\" />\n * @if (originLabel) {\n * <span class=\"cngx-sr-only\">Rolled back to {{ originLabel }}</span>\n * }\n * </ng-template>\n * </cngx-tab-group>\n * ```\n */\n@Directive({\n selector: 'ng-template[cngxTabRejectionIcon]',\n exportAs: 'cngxTabRejectionIcon',\n standalone: true,\n})\nexport class CngxTabRejectionIcon {\n readonly templateRef = inject<TemplateRef<CngxTabRejectionIconContext>>(\n TemplateRef,\n );\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\nimport type { CngxTabHandle } from '../tab-group-host.token';\n\n/**\n * Context for the `*cngxTabBusySpinner` template. Renders only on\n * the in-flight commit target (matches `presenter.intendedIndex()`\n * with `commitState.status() === 'pending'`); the visibility gate\n * stays library-owned. `intendedIndex` is exposed so positional\n * variants (progress bars, step counters) read the same source.\n */\nexport interface CngxTabBusySpinnerContext {\n /** The tab handle carrying id / label / disabled / aggregator signals. */\n readonly tab: CngxTabHandle;\n /** The flat-index of the in-flight commit target. */\n readonly intendedIndex: number;\n}\n\n/**\n * Structural slot for the busy-spinner template. 3-stage cascade:\n * per-instance directive >\n * `CNGX_TABS_CONFIG.templates.busySpinner` > built-in pulse span.\n *\n * ```html\n * <cngx-tab-group>\n * <ng-template cngxTabBusySpinner>\n * <my-spinner size=\"sm\" />\n * </ng-template>\n * </cngx-tab-group>\n * ```\n */\n@Directive({\n selector: 'ng-template[cngxTabBusySpinner]',\n exportAs: 'cngxTabBusySpinner',\n standalone: true,\n})\nexport class CngxTabBusySpinner {\n readonly templateRef = inject<TemplateRef<CngxTabBusySpinnerContext>>(\n TemplateRef,\n );\n}\n","import { computed, type Signal, type TemplateRef } from '@angular/core';\n\nimport type { CngxTabsConfig } from '../tabs-config';\nimport type {\n CngxTabBusySpinner,\n CngxTabBusySpinnerContext,\n} from './tab-busy-spinner.directive';\nimport type {\n CngxTabErrorBadge,\n CngxTabErrorBadgeContext,\n} from './tab-error-badge.directive';\nimport type {\n CngxTabRejectionIcon,\n CngxTabRejectionIconContext,\n} from './tab-rejection-icon.directive';\n\n/**\n * Inputs to {@link createTabGroupTemplateBindings}. The organism owns\n * the `contentChild()` queries (NG8110 — must run in component\n * injection context) and the resolved {@link CngxTabsConfig}; the\n * factory runs the 3-stage cascade per slot key. Sibling shape to\n * `createStepperTemplateBindings`.\n */\nexport interface CngxTabGroupTemplateBindingsOptions {\n readonly errorBadgeSlot: Signal<CngxTabErrorBadge | undefined>;\n readonly rejectionIconSlot: Signal<CngxTabRejectionIcon | undefined>;\n readonly busySpinnerSlot: Signal<CngxTabBusySpinner | undefined>;\n readonly config: CngxTabsConfig;\n}\n\n/**\n * Output of {@link createTabGroupTemplateBindings}. One resolved\n * `Signal<TemplateRef | null>` per slot; `null` means the organism\n * renders its built-in default.\n */\nexport interface CngxTabGroupTemplateBindings {\n readonly errorBadge: Signal<TemplateRef<CngxTabErrorBadgeContext> | null>;\n readonly rejectionIcon: Signal<\n TemplateRef<CngxTabRejectionIconContext> | null\n >;\n readonly busySpinner: Signal<TemplateRef<CngxTabBusySpinnerContext> | null>;\n}\n\n/**\n * Wires the 3-stage template cascade for the three `<cngx-tab-group>`\n * skin slots:\n * per-instance directive >\n * `CNGX_TABS_CONFIG.templates.<key>` >\n * `null` (built-in default).\n *\n * Pure — no DI, no side effects. Safe in field-init. Sibling to\n * `createStepperTemplateBindings` and `createTabOverflowTemplateBindings`.\n *\n * Single-consumer today: `[cngxMatTabs]` does not consume this —\n * Material owns the rendered tab-button chrome via its own MDC\n * template, leaving no DOM seam. See `tabs-accepted-debt §9`.\n */\nexport function createTabGroupTemplateBindings(\n opts: CngxTabGroupTemplateBindingsOptions,\n): CngxTabGroupTemplateBindings {\n return {\n errorBadge: computed<TemplateRef<CngxTabErrorBadgeContext> | null>(\n () =>\n opts.errorBadgeSlot()?.templateRef ??\n opts.config.templates?.errorBadge ??\n null,\n ),\n rejectionIcon: computed<TemplateRef<CngxTabRejectionIconContext> | null>(\n () =>\n opts.rejectionIconSlot()?.templateRef ??\n opts.config.templates?.rejectionIcon ??\n null,\n ),\n busySpinner: computed<TemplateRef<CngxTabBusySpinnerContext> | null>(\n () =>\n opts.busySpinnerSlot()?.templateRef ??\n opts.config.templates?.busySpinner ??\n null,\n ),\n };\n}\n","// Single-consumer factory — staged under family-uniformity\n// (tabs-accepted-debt §9, alongside `createTabGroupTemplateBindings`\n// and `CngxMatTabAggregatorContent`). Re-Eval: second consumer OR\n// sibling debt closure.\nimport { computed, linkedSignal, type Signal } from '@angular/core';\n\nimport type { CngxTabsConfig } from '../tabs-config';\nimport type { CngxTabsI18n } from '../i18n/tabs-i18n';\nimport type { CngxTabGroupHost, CngxTabHandle } from '../tab-group-host.token';\n\n/**\n * Inputs the announcements bundle reads from the host organism.\n * Passing presenter / i18n / config in (instead of re-injecting)\n * keeps the factory pure — one call returns the bundle, no\n * injection context required.\n */\nexport interface CngxTabGroupAnnouncementsOptions {\n readonly presenter: CngxTabGroupHost;\n readonly i18n: CngxTabsI18n;\n readonly config: CngxTabsConfig;\n /** Per-instance `aria-label` Input on the organism. */\n readonly ariaLabel: Signal<string | undefined>;\n /** Per-instance `aria-labelledby` Input on the organism. */\n readonly ariaLabelledBy: Signal<string | undefined>;\n}\n\n/**\n * Resolved bundle returned by {@link createTabGroupAnnouncements}.\n * Host bindings and template outlets read these directly. Owns one\n * internal `linkedSignal` slot (prior-active-index tracker driving\n * the success-arm direction prefix); consumers never touch it.\n */\nexport interface CngxTabGroupAnnouncements {\n /**\n * Tablist `aria-roledescription`. Cascades through\n * `CngxTabsFallbackLabels.tabRoleDescription` → `'tab list'`.\n * Distinct from `i18n.tabsLabel` (which feeds `aria-label`) so\n * AT does not read the same word twice.\n */\n readonly tabsRoleDescription: Signal<string>;\n\n /**\n * Tab-panel `aria-roledescription`. Cascades through\n * `CngxTabsFallbackLabels.tabPanelRoleDescription` → `'tab panel'`.\n */\n readonly tabPanelRoleDescription: Signal<string>;\n\n /**\n * Wrapper `aria-label`. Resolution: per-instance Input →\n * `ariaLabels.tabsRegion` → `i18n.tabsLabel`. Returns `null` when\n * `aria-labelledby` is bound (mutually exclusive per WAI-ARIA).\n */\n readonly resolvedAriaLabel: Signal<string | null>;\n\n /**\n * Polite live-region content — declarative, never an imperative\n * `announce()`. Empty between transitions so the region stays\n * quiet on no-op ticks.\n *\n * Error arm: `commitRolledBackTo(originLabel)` when origin\n * resolves; otherwise `commitFailedRetry`.\n *\n * Success arm: `${previousTab|nextTab}: selectedTab(...)` when\n * the index moved; bare `selectedTab(...)` when it didn't (initial\n * mount, or commit-success that lands on the same tab).\n */\n readonly liveAnnouncement: Signal<string>;\n\n /**\n * SR descriptor phrase for a tab's `cngx-sr-only` span.\n * `aggregator.announcement()` when bound + revealed; falls back\n * to `i18n.tabHasErrors(errorCount)` on empty; empty string when\n * nothing wants reveal. The span itself is always rendered (cngx\n * ARIA-by-value rule); this returns its content.\n */\n statusPhrase(tab: CngxTabHandle): string;\n\n /**\n * Verbose tab-button `aria-label` — `selectedTab(label, position,\n * count)` so AT hears \"Tab 2 of 5: Settings\" instead of inferring\n * position from tablist enumeration. The visual span keeps the\n * bare label.\n */\n tabAriaLabel(tab: CngxTabHandle, position: number): string;\n}\n\n/**\n * Pure factory bundling the `<cngx-tab-group>` AT-announcement +\n * descriptor surfaces. Owns one internal `linkedSignal`\n * (prior-active-index, drives the success-arm direction prefix) —\n * lazy by `linkedSignal` semantics, so the organism reads\n * `liveAnnouncement` once at construction to seed it.\n */\nexport function createTabGroupAnnouncements(\n options: CngxTabGroupAnnouncementsOptions,\n): CngxTabGroupAnnouncements {\n const { presenter, i18n, config, ariaLabel, ariaLabelledBy } = options;\n\n const tabsRoleDescription = computed<string>(\n () => config.fallbackLabels?.tabRoleDescription ?? 'tab list',\n );\n\n const tabPanelRoleDescription = computed<string>(\n () => config.fallbackLabels?.tabPanelRoleDescription ?? 'tab panel',\n );\n\n const resolvedAriaLabel = computed<string | null>(() => {\n if (ariaLabelledBy()) {\n return null;\n }\n return ariaLabel() ?? config.ariaLabels?.tabsRegion ?? i18n.tabsLabel;\n });\n\n // `prev?.source` gives the source value before the most recent\n // change — prior activeIndex without an `effect`-driven slot\n // (Pillar 1). Coalesce to current on first emission.\n const priorActiveIndex = linkedSignal<number, number>({\n source: () => presenter.activeIndex(),\n computation: (curr, prev) => prev?.source ?? curr,\n equal: Object.is,\n });\n\n const liveAnnouncement = computed<string>(() => {\n const current = presenter.commitTransition.current();\n if (current === 'pending') {\n return i18n.commitInFlight;\n }\n if (current === 'error') {\n // No `previous === 'pending'` guard — sync rejections collapse\n // pending → error in one flush, so the tracker captures\n // `previous = 'idle'` and an unguarded read keeps the\n // announcement reachable for `commitAction = () => false`.\n const failedIdx = presenter.lastFailedIndex();\n const originIdx = presenter.originIndexDuringCommit();\n if (failedIdx !== undefined && originIdx !== undefined) {\n const originLabel = presenter.tabs()[originIdx]?.label();\n if (originLabel) {\n return i18n.commitRolledBackTo(originLabel);\n }\n }\n return i18n.commitFailedRetry;\n }\n if (current === 'success') {\n const tabs = presenter.tabs();\n const idx = presenter.activeIndex();\n const tab = tabs[idx];\n if (!tab) {\n return '';\n }\n const label = tab.label() ?? '';\n const positionPhrase = i18n.selectedTab(label, idx + 1, tabs.length);\n const prevIdx = priorActiveIndex();\n if (idx > prevIdx) {\n return `${i18n.nextTab}: ${positionPhrase}`;\n }\n if (idx < prevIdx) {\n return `${i18n.previousTab}: ${positionPhrase}`;\n }\n return positionPhrase;\n }\n return '';\n });\n\n function statusPhrase(tab: CngxTabHandle): string {\n const aggregator = tab.errorAggregator();\n if (!aggregator?.shouldShow()) {\n return '';\n }\n const announcement = aggregator.announcement();\n if (announcement) {\n return announcement;\n }\n return i18n.tabHasErrors(aggregator.errorCount());\n }\n\n function tabAriaLabel(tab: CngxTabHandle, position: number): string {\n const tabs = presenter.tabs();\n return i18n.selectedTab(tab.label() ?? '', position, tabs.length);\n }\n\n // Eager seed — `linkedSignal` is lazy and the success arm doesn't\n // touch the tracker at construction (commitTransition is `idle`),\n // so without this read `prev?.source` is undefined on the first\n // nav and the direction prefix is silently lost.\n priorActiveIndex();\n\n return {\n tabsRoleDescription,\n tabPanelRoleDescription,\n resolvedAriaLabel,\n liveAnnouncement,\n statusPhrase,\n tabAriaLabel,\n };\n}\n","/**\n * Default glyph fallbacks for `<cngx-tab-group>` skin slots. Read by\n * the organism when neither a per-instance slot directive nor\n * `CNGX_TABS_CONFIG.templates.<key>` is bound. Sibling to\n * `CNGX_SELECT_GLYPHS` and `CNGX_STEPPER_GLYPHS`. Exported because\n * Sheriff forbids deep-relative imports across library boundaries;\n * `@internal` enforces consumer intent. Consumers customise via slot\n * directives or `withTab*Template` config features.\n *\n * @internal\n */\nexport const CNGX_TABS_GLYPHS = {\n /** Default visual for `*cngxTabErrorBadge` when no override is bound. */\n errorBadge: '!',\n /** Default visual for `*cngxTabRejectionIcon` when no override is bound. */\n rejectionIcon: '!',\n} as const;\n","import {\n effect,\n InjectionToken,\n untracked,\n type Signal,\n computed,\n type TemplateRef,\n} from '@angular/core';\n\nimport type {\n ActiveDescendantItem,\n CngxActiveDescendant,\n} from '@cngx/common/a11y';\nimport type { CngxPopover } from '@cngx/common/popover';\n\nimport type { CngxTabHandle } from '../tab-group-host.token';\nimport type { CngxTabsConfig } from '../tabs-config';\nimport type {\n CngxTabOverflowItem,\n CngxTabOverflowItemContext,\n} from './tab-overflow-item.directive';\nimport type {\n CngxTabOverflowTrigger,\n CngxTabOverflowTriggerContext,\n} from './tab-overflow-trigger.directive';\n\n/**\n * DOM `id` for a hidden-tab option row in the overflow listbox.\n * Stable across CD passes so `aria-activedescendant` resolves to\n * the same `<li>`. `-overflow-option` suffix avoids collision with\n * the strip-button (`-header`) and per-tab descriptor (`-desc`).\n */\nexport function tabOverflowOptionId(tab: CngxTabHandle): string {\n return `${tab.id}-overflow-option`;\n}\n\n/**\n * Inputs to {@link createTabOverflowTemplateBindings}. The molecule\n * runs the `contentChild()` queries (injection-context-only) and\n * supplies the reactive sources; the factory owns cascade\n * resolution and per-context builders.\n */\nexport interface CngxTabOverflowTemplateBindingsOptions {\n /** `contentChild(CngxTabOverflowTrigger)` from the molecule. */\n readonly triggerSlot: Signal<CngxTabOverflowTrigger | undefined>;\n /** `contentChild(CngxTabOverflowItem)` from the molecule. */\n readonly itemSlot: Signal<CngxTabOverflowItem | undefined>;\n /** Resolved {@link CngxTabsConfig} (the middle cascade tier). */\n readonly config: CngxTabsConfig;\n /** Live count of hidden tabs (drives `triggerContext.count`). */\n readonly hiddenCount: Signal<number>;\n /** Live hidden-tab list (drives `triggerContext.hiddenTabs`). */\n readonly hiddenTabs: Signal<readonly CngxTabHandle[]>;\n /** Commit-aware select callback — invoked from `itemContext.pick`. */\n readonly pickTab: (tab: CngxTabHandle) => void;\n}\n\n/**\n * Output of {@link createTabOverflowTemplateBindings}. Carries the two\n * resolved templates plus a stable trigger-context signal and an\n * imperative item-context builder.\n */\nexport interface CngxTabOverflowTemplateBindings {\n readonly triggerTemplate: Signal<\n TemplateRef<CngxTabOverflowTriggerContext> | null\n >;\n readonly itemTemplate: Signal<TemplateRef<CngxTabOverflowItemContext> | null>;\n readonly triggerContext: Signal<CngxTabOverflowTriggerContext>;\n readonly buildItemContext: (\n tab: CngxTabHandle,\n index: number,\n ) => CngxTabOverflowItemContext;\n /**\n * `ActiveDescendantItem[]` projection of `hiddenTabs()` for\n * `CngxActiveDescendant.items`. Each entry's `id` matches the\n * row's `<li>` (see {@link tabOverflowOptionId}); `value` carries\n * the tab handle so AD's `(activated)` payload casts back without\n * a registry lookup. Structural equal guards against no-op IO\n * cascades. Mutable array shape because\n * `CngxActiveDescendant.items` declares the input that way; the\n * array is rebuilt each computed run so callers can't mutate the\n * live source.\n */\n readonly adItems: Signal<ActiveDescendantItem[]>;\n}\n\n/**\n * Structural equal — same `count` + same `hiddenTabs` reference.\n * The upstream `hiddenTabs` signal already uses `tabIdListEqual`,\n * so this guard stops `ngTemplateOutlet` rebinding on shape-stable\n * IO emissions.\n */\nfunction triggerContextEqual(\n a: CngxTabOverflowTriggerContext,\n b: CngxTabOverflowTriggerContext,\n): boolean {\n return a.count === b.count && a.hiddenTabs === b.hiddenTabs;\n}\n\n/**\n * Structural equal — same length + per-index `id` and `disabled`.\n * Without this, every IO emission yields fresh\n * `ActiveDescendantItem[]` references and AD's `resolvedItems`\n * cascade fires for an unchanged visible-tab set.\n */\nfunction adItemsEqual(\n a: ActiveDescendantItem[],\n b: ActiveDescendantItem[],\n): boolean {\n if (a === b) {\n return true;\n }\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; i++) {\n if (a[i].id !== b[i].id || a[i].disabled !== b[i].disabled) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Wires the 3-stage template cascade for the overflow molecule's\n * two visible regions: per-instance directive >\n * `CNGX_TABS_CONFIG.templates.overflow*` > built-in markup\n * (template-outlet returns `null`).\n *\n * Pure — no DI, no side effects, no destroy hooks. Safe to call\n * from a component's field-init block. Mirrors the select-family\n * `createTemplateRegistry` pattern.\n */\nexport function createTabOverflowTemplateBindings(\n opts: CngxTabOverflowTemplateBindingsOptions,\n): CngxTabOverflowTemplateBindings {\n const triggerTemplate = computed<\n TemplateRef<CngxTabOverflowTriggerContext> | null\n >(\n () =>\n opts.triggerSlot()?.templateRef ??\n opts.config.templates?.overflowTrigger ??\n null,\n );\n const itemTemplate = computed<\n TemplateRef<CngxTabOverflowItemContext> | null\n >(\n () =>\n opts.itemSlot()?.templateRef ??\n opts.config.templates?.overflowItem ??\n null,\n );\n const triggerContext = computed<CngxTabOverflowTriggerContext>(\n () => {\n const count = opts.hiddenCount();\n const hiddenTabs = opts.hiddenTabs();\n return { $implicit: count, count, hiddenTabs };\n },\n { equal: triggerContextEqual },\n );\n // Per-row context cache — stable context + closure-captured `pick`\n // per `tab` so `ngTemplateOutlet` doesn't re-bind the embedded view\n // unless `index` or `disabled` actually changed. WeakMap so\n // detached handles GC. Mirrors `CngxTreeSelectPanel.nodeContext`.\n interface CachedRow {\n readonly context: CngxTabOverflowItemContext;\n readonly disabled: boolean;\n readonly index: number;\n }\n const itemContextCache = new WeakMap<CngxTabHandle, CachedRow>();\n const buildItemContext = (\n tab: CngxTabHandle,\n index: number,\n ): CngxTabOverflowItemContext => {\n const disabled = tab.disabled();\n const cached = itemContextCache.get(tab);\n if (cached?.disabled === disabled && cached?.index === index) {\n return cached.context;\n }\n const context: CngxTabOverflowItemContext = {\n $implicit: tab,\n tab,\n pick: () => opts.pickTab(tab),\n disabled,\n index,\n };\n itemContextCache.set(tab, { context, disabled, index });\n return context;\n };\n const adItems = computed<ActiveDescendantItem[]>(\n () =>\n opts.hiddenTabs().map((tab) => ({\n id: tabOverflowOptionId(tab),\n value: tab,\n label: tab.label() ?? tab.id,\n disabled: tab.disabled(),\n })),\n { equal: adItemsEqual },\n );\n return {\n triggerTemplate,\n itemTemplate,\n triggerContext,\n buildItemContext,\n adItems,\n };\n}\n\n/**\n * Resets the AD highlight on popover close. Keyboard-open paths\n * (ArrowDown / End / typeahead on the closed trigger) set\n * `activeIndex` via AD's own keydown listener before opening —\n * unaffected. Mouse-open leaves `activeIndex === -1` so the popover\n * renders unhighlighted. Without this reset, the next open would\n * inherit a stale index from the prior keyboard session.\n *\n * Must run in injection context.\n */\nexport function createOverflowPopoverHighlightSync(\n popover: Signal<CngxPopover>,\n ad: Signal<CngxActiveDescendant>,\n): void {\n effect(() => {\n const visible = popover().isVisible();\n untracked(() => {\n if (!visible) {\n ad().resetHighlight();\n }\n });\n });\n}\n\n/**\n * Factory signature for {@link CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY}.\n */\nexport type CngxOverflowPopoverHighlightSyncFactory = (\n popover: Signal<CngxPopover>,\n ad: Signal<CngxActiveDescendant>,\n) => void;\n\n/**\n * DI token for the overflow popover highlight-sync policy.\n * Default {@link createOverflowPopoverHighlightSync}. Override via\n * `providers` / `viewProviders` for last-index preservation,\n * telemetry on close, custom highlight rules. Symmetric to\n * `CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY` and\n * `CNGX_TABS_COMMIT_HANDLER_FACTORY`.\n */\nexport const CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY =\n new InjectionToken<CngxOverflowPopoverHighlightSyncFactory>(\n 'CngxOverflowPopoverHighlightSyncFactory',\n {\n providedIn: 'root',\n factory: () => createOverflowPopoverHighlightSync,\n },\n );\n","import {\n effect,\n InjectionToken,\n type Injector,\n runInInjectionContext,\n type Signal,\n untracked,\n} from '@angular/core';\n\n/**\n * Options for {@link createOrganismScrollSync}.\n */\nexport interface CngxOrganismScrollSyncOptions {\n /** Reactive source for the active item id; tracked by the effect. */\n readonly activeId: Signal<string | null>;\n /**\n * Host element containing the per-item buttons. Items must carry\n * `id=\"${itemId}-header\"` — the convention used by\n * `<cngx-tab-group>` and `<cngx-stepper>`.\n */\n readonly hostElement: HTMLElement;\n /**\n * Forwarded to `Element.scrollIntoView`. Default: smooth-center\n * along the inline axis. Override for vertical or instant scroll.\n */\n readonly scrollOptions?: ScrollIntoViewOptions;\n /** Injector for installing the effect. */\n readonly injector: Injector;\n}\n\nconst DEFAULT_SCROLL_OPTIONS: ScrollIntoViewOptions = {\n behavior: 'smooth',\n block: 'nearest',\n inline: 'center',\n};\n\n/**\n * Scroll-into-view effect for any strip-based organism (tabs,\n * stepper headers, future scrolling lists). Tracks `activeId` and\n * scrolls the matching `[id=\"<itemId>-header\"]` into view.\n *\n * The DOM call sits in `untracked()` (only `activeId` is tracked).\n * `scrollIntoView` is missing in jsdom — guarded with optional chain.\n */\nexport function createOrganismScrollSync(\n opts: CngxOrganismScrollSyncOptions,\n): void {\n const { activeId, hostElement, scrollOptions, injector } = opts;\n const resolvedOptions = scrollOptions ?? DEFAULT_SCROLL_OPTIONS;\n\n runInInjectionContext(injector, () => {\n effect(() => {\n const id = activeId();\n if (!id) {\n return;\n }\n untracked(() => {\n const button = hostElement.querySelector<HTMLElement>(\n `[id=\"${id}-header\"]`,\n );\n button?.scrollIntoView?.(resolvedOptions);\n });\n });\n });\n}\n\n/**\n * Factory signature for {@link CNGX_ORGANISM_SCROLL_SYNC_FACTORY}.\n */\nexport type CngxOrganismScrollSyncFactory = (\n opts: CngxOrganismScrollSyncOptions,\n) => void;\n\n/**\n * DI token for the active-item scroll-into-view policy. Defaults to\n * {@link createOrganismScrollSync}. Override for instant scroll,\n * custom selector, telemetry, or `prefers-reduced-motion` opt-out.\n * Sibling to `CNGX_DOM_ANCHOR_RETRY_FACTORY` and\n * `CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY`.\n */\nexport const CNGX_ORGANISM_SCROLL_SYNC_FACTORY =\n new InjectionToken<CngxOrganismScrollSyncFactory>(\n 'CngxOrganismScrollSyncFactory',\n {\n providedIn: 'root',\n factory: () => createOrganismScrollSync,\n },\n );\n","import { computed, InjectionToken, type Signal } from '@angular/core';\n\n/**\n * Structural equal for `Map<string, T>` (size + same value reference\n * per key, via `Object.is`).\n *\n * @internal\n */\nfunction directiveMapEqual<T>(a: Map<string, T>, b: Map<string, T>): boolean {\n if (a === b) {\n return true;\n }\n if (a.size !== b.size) {\n return false;\n }\n for (const [id, dir] of a) {\n if (b.get(id) !== dir) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Options for {@link createDirectiveByIdMap}.\n */\nexport interface CngxDirectiveByIdMapOptions<T extends { id: () => string }> {\n /** Reactive source — typically `contentChildren(...)`. */\n readonly source: Signal<readonly T[]>;\n}\n\n/**\n * Build a `Signal<Map<string, T>>` from a `Signal<readonly T[]>` of\n * directives keyed by `id()`. Structural equal prevents cascade when\n * `contentChildren` re-emits an unchanged child set. Shared by\n * `<cngx-tab-group>`, `<cngx-stepper>`, and `<cngx-mat-stepper>`.\n */\nexport function createDirectiveByIdMap<T extends { id: () => string }>(\n opts: CngxDirectiveByIdMapOptions<T>,\n): Signal<Map<string, T>> {\n return computed<Map<string, T>>(\n () => {\n const map = new Map<string, T>();\n for (const dir of opts.source()) {\n map.set(dir.id(), dir);\n }\n return map;\n },\n { equal: directiveMapEqual },\n );\n}\n\n/**\n * Factory signature for {@link CNGX_DIRECTIVE_BY_ID_MAP_FACTORY}.\n */\nexport type CngxDirectiveByIdMapFactory = <T extends { id: () => string }>(\n opts: CngxDirectiveByIdMapOptions<T>,\n) => Signal<Map<string, T>>;\n\n/**\n * DI token for the per-id directive-resolution policy. Defaults to\n * {@link createDirectiveByIdMap}. Override for WeakMap resolution,\n * telemetry, or custom equality. Sibling to\n * `CNGX_DOM_ANCHOR_RETRY_FACTORY` and\n * `CNGX_ORGANISM_SCROLL_SYNC_FACTORY`.\n */\nexport const CNGX_DIRECTIVE_BY_ID_MAP_FACTORY =\n new InjectionToken<CngxDirectiveByIdMapFactory>(\n 'CngxDirectiveByIdMapFactory',\n {\n providedIn: 'root',\n factory: () => createDirectiveByIdMap,\n },\n );\n","/**\n * @module @cngx/common/tabs\n */\nexport {\n CngxTabGroupPresenter,\n type CngxTabsCommitAction,\n} from './presenter.directive';\nexport {\n CNGX_TAB_GROUP_HOST,\n type CngxTabGroupHost,\n type CngxTabHandle,\n} from './tab-group-host.token';\nexport {\n CNGX_TAB_PANEL_HOST,\n type CngxTabPanelHost,\n} from './tab-panel-host.token';\nexport { CngxTab } from './tab.directive';\nexport { CngxTabLabel } from './tab-label.directive';\nexport { CngxTabContent } from './tab-content.directive';\nexport { CngxTabsFragmentSync } from './router-sync.directive';\nexport {\n CNGX_TABS_CONFIG,\n injectTabsConfig,\n provideTabsConfig,\n provideTabsConfigAt,\n withDefaultOrientation,\n withTabBusySpinnerTemplate,\n withTabErrorBadgeTemplate,\n withTabOverflowItemTemplate,\n withTabOverflowMaxDeferMs,\n withTabOverflowStabilizeMs,\n withTabOverflowTriggerTemplate,\n withTabRejectionIconTemplate,\n withTabsAriaLabels,\n withTabsCommitMode,\n withTabsDefaultOrientation,\n withTabsFallbackLabels,\n withTabsRouterSync,\n withTabsRovingLoop,\n type CngxTabsAriaLabels,\n type CngxTabsConfig,\n type CngxTabsConfigFeature,\n type CngxTabsFallbackLabels,\n type CngxTabsTemplates,\n} from './tabs-config';\nexport {\n provideCngxTabs,\n provideCngxTabsAt,\n type CngxTabsFeature,\n} from './provide-cngx-tabs';\nexport {\n CNGX_TABS_I18N,\n injectTabsI18n,\n provideTabsI18n,\n withTabsI18nLabels,\n type CngxTabsI18n,\n type CngxTabsI18nFeature,\n} from './i18n/tabs-i18n';\nexport {\n createTabsCommitHandler,\n CNGX_TABS_COMMIT_HANDLER_FACTORY,\n type CngxTabsCommitHandler,\n type CngxTabsCommitHandlerFactory,\n type CngxTabsCommitHandlerOptions,\n} from './commit-handler';\nexport {\n CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY,\n createCngxTabOverflowDefaultDomAdapter,\n type CngxTabOverflowDomAdapter,\n type CngxTabOverflowDomAdapterFactory,\n} from './overflow/dom-adapter';\nexport {\n CNGX_DOM_ANCHOR_RETRY_FACTORY,\n createDomAnchorRetry,\n type CngxDomAnchorRetryFactory,\n type CngxDomAnchorRetryHandle,\n type CngxDomAnchorRetryOptions,\n type CngxDomAnchorRetryResult,\n} from './overflow/dom-anchor-retry';\nexport {\n CngxTabOverflowTrigger,\n type CngxTabOverflowTriggerContext,\n} from './overflow/tab-overflow-trigger.directive';\nexport {\n CngxTabOverflowItem,\n type CngxTabOverflowItemContext,\n} from './overflow/tab-overflow-item.directive';\nexport {\n CngxTabErrorBadge,\n type CngxTabErrorBadgeContext,\n} from './slots/tab-error-badge.directive';\nexport {\n CngxTabRejectionIcon,\n type CngxTabRejectionIconContext,\n} from './slots/tab-rejection-icon.directive';\nexport {\n CngxTabBusySpinner,\n type CngxTabBusySpinnerContext,\n} from './slots/tab-busy-spinner.directive';\nexport {\n createTabGroupTemplateBindings,\n type CngxTabGroupTemplateBindings,\n type CngxTabGroupTemplateBindingsOptions,\n} from './slots/tab-group-template-cascade';\nexport {\n createTabGroupAnnouncements,\n type CngxTabGroupAnnouncements,\n type CngxTabGroupAnnouncementsOptions,\n} from './announcements/tab-group-announcements';\nexport { CNGX_TABS_GLYPHS } from './glyphs';\nexport {\n CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY,\n createOverflowPopoverHighlightSync,\n createTabOverflowTemplateBindings,\n tabOverflowOptionId,\n type CngxOverflowPopoverHighlightSyncFactory,\n type CngxTabOverflowTemplateBindings,\n type CngxTabOverflowTemplateBindingsOptions,\n} from './overflow/overflow-template-cascade';\n\nexport {\n CNGX_ORGANISM_SCROLL_SYNC_FACTORY,\n createOrganismScrollSync,\n type CngxOrganismScrollSyncFactory,\n type CngxOrganismScrollSyncOptions,\n} from './scroll-sync/organism-scroll-sync';\nexport {\n CNGX_DIRECTIVE_BY_ID_MAP_FACTORY,\n createDirectiveByIdMap,\n type CngxDirectiveByIdMapFactory,\n type CngxDirectiveByIdMapOptions,\n} from './registry/directive-by-id-map';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AA2CA;;;;AAIG;AACG,SAAU,uBAAuB,CACrC,IAAkC,EAAA;AAElC,IAAA,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI;IAC3B,OAAO;QACL,YAAY,EAAE,UAAU,CAAC,YAAY;AAErC,QAAA,eAAe,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAA;YACnD,UAAU,CAAC,KAAK,CACd,CAAC,QAAQ,KAAK,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,EACjE,OAAO,EACP,SAAS,EACT;AACE,gBAAA,SAAS,EAAE,MAAM,SAAS,CAAC,IAAI,CAAC;AAChC,gBAAA,OAAO,EAAE,MAAM,SAAS,CAAC,KAAK,CAAC;AAChC,aAAA,CACF;QACH,CAAC;QAED,MAAM,GAAA;YACJ,UAAU,CAAC,MAAM,EAAE;QACrB,CAAC;KACF;AACH;AAEA,SAAS,aAAa,CACpB,MAA4B,EAC5B,SAAiB,EACjB,OAAe,EACf,QAGC,EAAA;IAED,IAAI,SAAS,GAAG,KAAK;IACrB,IAAI,WAAW,GAAwB,IAAI;AAE3C,IAAA,MAAM,WAAW,GA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AAC,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,GAAG,EAAE;AACrB,YAAA,OAAO,KAAK;QACd;IACF;AACA,IAAA,OAAO,IAAI;AACb;AAUA;;;;;AAKG;AACG,SAAU,sBAAsB,CACpC,IAAoC,EAAA;IAEpC,OAAO,QAAQ,CACb,MAAK;AACH,QAAA,MAAM,GAAG,GAAG,IAAI,GAAG,EAAa;QAChC,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE;YAC/B,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,GAAG,CAAC;QACxB;AACA,QAAA,OAAO,GAAG;AACZ,IAAA,CAAC,EACD,EAAE,KAAK,EAAE,iBAAiB,EAAE,CAC7B;AACH;AASA;;;;;;AAMG;MACU,gCAAgC,GAC3C,IAAI,cAAc,CAChB,6BAA6B,EAC7B;AACE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,sBAAsB;AACtC,CAAA;;ACxEL;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"cngx-common-tabs.mjs","sources":["../../../projects/common/tabs/commit-handler.ts","../../../projects/common/tabs/tab-group-host.token.ts","../../../projects/common/tabs/presenter.directive.ts","../../../projects/common/tabs/tab-panel-host.token.ts","../../../projects/common/tabs/tab-content.directive.ts","../../../projects/common/tabs/tab-label.directive.ts","../../../projects/common/tabs/tab.directive.ts","../../../projects/common/tabs/router-sync.directive.ts","../../../projects/common/tabs/tabs-config.ts","../../../projects/common/tabs/i18n/tabs-i18n.ts","../../../projects/common/tabs/provide-cngx-tabs.ts","../../../projects/common/tabs/overflow/dom-adapter.ts","../../../projects/common/tabs/overflow/dom-anchor-retry.ts","../../../projects/common/tabs/overflow/tab-overflow-trigger.directive.ts","../../../projects/common/tabs/overflow/tab-overflow-item.directive.ts","../../../projects/common/tabs/slots/tab-error-badge.directive.ts","../../../projects/common/tabs/slots/tab-rejection-icon.directive.ts","../../../projects/common/tabs/slots/tab-busy-spinner.directive.ts","../../../projects/common/tabs/slots/tab-group-template-cascade.ts","../../../projects/common/tabs/announcements/tab-group-announcements.ts","../../../projects/common/tabs/glyphs.ts","../../../projects/common/tabs/overflow/overflow-template-cascade.ts","../../../projects/common/tabs/scroll-sync/organism-scroll-sync.ts","../../../projects/common/tabs/registry/directive-by-id-map.ts","../../../projects/common/tabs/public-api.ts","../../../projects/common/tabs/cngx-common-tabs.ts"],"sourcesContent":["import { InjectionToken, type Signal } from '@angular/core';\nimport { isObservable, type Observable, type Subscription } from 'rxjs';\n\nimport { type CngxCommitController, type CngxCommitHandle } from '@cngx/common/data';\n\nimport type { CngxTabsCommitAction } from './presenter.directive';\n\n/**\n * Adapts the shared commit-controller to the tabs action shape. The\n * presenter delegates to {@link beginTransition} when `commitAction`\n * is bound.\n *\n * @category common/tabs\n */\nexport interface CngxTabsCommitHandler {\n /**\n * Start a tab-transition commit. Returns synchronously - read the\n * controller's `state` signal for in-flight status. `onResolve`\n * fires once with `accept = true` on success or `false` on\n * rejection; skipped on supersede.\n */\n beginTransition(\n fromIndex: number,\n toIndex: number,\n action: CngxTabsCommitAction,\n onResolve: (accept: boolean) => void,\n ): void;\n\n /** Cancel the in-flight transition without firing callbacks. */\n cancel(): void;\n\n /** Live `pending` flag from the controller. */\n readonly isCommitting: Signal<boolean>;\n}\n\n/**\n * Options for {@link createTabsCommitHandler}.\n *\n * @category common/tabs\n */\nexport interface CngxTabsCommitHandlerOptions {\n readonly controller: CngxCommitController<number>;\n}\n\n/**\n * Wraps a {@link CngxCommitController} with the action-shape adapter\n * that collapses `Observable<boolean>` / `Promise<boolean>` /\n * `boolean` returns into a single `accept: boolean` outcome.\n *\n * @category common/tabs\n */\nexport function createTabsCommitHandler(opts: CngxTabsCommitHandlerOptions): CngxTabsCommitHandler {\n const { controller } = opts;\n return {\n isCommitting: controller.isCommitting,\n\n beginTransition(fromIndex, toIndex, action, onResolve) {\n controller.begin(\n (handlers) => runTabsAction(action, fromIndex, toIndex, handlers),\n toIndex,\n fromIndex,\n {\n onSuccess: () => onResolve(true),\n onError: () => onResolve(false),\n },\n );\n },\n\n cancel() {\n controller.cancel();\n },\n };\n}\n\nfunction runTabsAction(\n action: CngxTabsCommitAction,\n fromIndex: number,\n toIndex: number,\n handlers: {\n readonly onSuccess: (committed: number | undefined) => void;\n readonly onError: (err: unknown) => void;\n },\n): CngxCommitHandle {\n let cancelled = false;\n let unsubscribe: (() => void) | null = null;\n\n const safeSuccess = (accept: boolean): void => {\n if (cancelled) {\n return;\n }\n if (accept) {\n handlers.onSuccess(toIndex);\n } else {\n handlers.onError(new Error('Tab transition refused by commitAction'));\n }\n };\n const safeError = (err: unknown): void => {\n if (cancelled) {\n return;\n }\n handlers.onError(err);\n };\n\n let result: boolean | Promise<boolean> | Observable<boolean>;\n try {\n result = action(fromIndex, toIndex);\n } catch (err: unknown) {\n safeError(err);\n return {\n cancel: () => {\n cancelled = true;\n },\n };\n }\n\n if (isObservable(result)) {\n // Synchronous Observables (`of(true)`) emit inside `.subscribe` before\n // the assignment binds - close over a pre-declared `let` to avoid TDZ.\n let sub: Subscription | null = null;\n sub = result.subscribe({\n next: (accept) => {\n safeSuccess(accept);\n sub?.unsubscribe();\n },\n error: (err: unknown) => safeError(err),\n });\n unsubscribe = () => sub?.unsubscribe();\n } else if (result != null && typeof (result as { then?: unknown }).then === 'function') {\n (result as Promise<boolean>).then(safeSuccess, safeError);\n } else {\n safeSuccess(result as boolean);\n }\n\n return {\n cancel: () => {\n cancelled = true;\n unsubscribe?.();\n },\n };\n}\n\n/**\n * Factory signature for {@link CNGX_TABS_COMMIT_HANDLER_FACTORY}.\n * Override to wrap the default with retry-with-backoff, telemetry,\n * or offline queues.\n *\n * @category common/tabs\n */\nexport type CngxTabsCommitHandlerFactory = (\n opts: CngxTabsCommitHandlerOptions,\n) => CngxTabsCommitHandler;\n\n/**\n * DI token for the commit-handler factory. Defaults to\n * {@link createTabsCommitHandler}. Sibling to\n * `CNGX_ARRAY_COMMIT_HANDLER_FACTORY` (select) and\n * `CNGX_STEPPER_COMMIT_HANDLER_FACTORY`.\n *\n * @category common/tabs\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/commit-handler.ts\n * @since 0.1.0\n */\nexport const CNGX_TABS_COMMIT_HANDLER_FACTORY = new InjectionToken<CngxTabsCommitHandlerFactory>(\n 'CngxTabsCommitHandlerFactory',\n {\n providedIn: 'root',\n factory: () => createTabsCommitHandler,\n },\n);\n","import { InjectionToken, type ModelSignal, type Signal } from '@angular/core';\n\nimport type { CngxAsyncState, StatusTransition } from '@cngx/core/utils';\n\nimport type { CngxErrorAggregatorContract } from '@cngx/common/interactive';\n\n/**\n * Registration handle a `CngxTab` atom passes to its presenter via\n * {@link CngxTabGroupHost.register}. Fields are exposed by reference\n * so subsequent input changes propagate without re-registration.\n * `errorAggregator` is a `Signal<...>` slot so consumer aggregators\n * resolved via `viewChild` after first registration still bind.\n *\n * @category common/tabs\n */\nexport interface CngxTabHandle {\n readonly id: string;\n readonly label: Signal<string | undefined>;\n readonly disabled: Signal<boolean>;\n readonly errorAggregator: Signal<CngxErrorAggregatorContract | undefined>;\n}\n\n/**\n * Contract atoms see when they inject the presenter via\n * {@link CNGX_TAB_GROUP_HOST}. Atoms never reach into the concrete\n * class - keeps layering cycle-free and the decompose schematic clean.\n *\n * @category common/tabs\n */\nexport interface CngxTabGroupHost {\n readonly tabs: Signal<readonly CngxTabHandle[]>;\n readonly activeIndex: ModelSignal<number>;\n readonly activeId: Signal<string | null>;\n readonly orientation: Signal<'horizontal' | 'vertical'>;\n readonly loop: Signal<boolean>;\n readonly commitState: CngxAsyncState<number | undefined>;\n readonly intendedIndex: Signal<number | undefined>;\n /**\n * Reactive current/previous pair for the commit-state status. Lets\n * organisms and skin sub-components derive transition-driven\n * announcements (`pending` → `success`, `pending` → `error`, sync\n * `idle` → `error`) from a single tracker.\n */\n readonly commitTransition: StatusTransition;\n\n /**\n * Tab index of the last refused commit (both optimistic and\n * pessimistic modes). Cleared on next successful re-pick of the\n * same index or via {@link clearLastFailed}. Drives the persistent\n * rejection-icon decoration.\n *\n * @remarks\n * The `pending → error` pulse keyframe (`cngx-tab-pulse-error`)\n * does not retrigger on rapid supersede sequences - CSS animations\n * only fire on fresh class application. See `tabs-accepted-debt §3`;\n * the persistent icon plus static red outline carry the durable\n * signal in the no-pulse case.\n */\n readonly lastFailedIndex: Signal<number | undefined>;\n\n /**\n * Safe-harbour origin index captured at the start of an active\n * commit window. Written when `select()` opens a transition under\n * `commitAction`; retained on `error` so the live-region phrase\n * can resolve the origin label; cleared on `success`. Outside the\n * commit window the slot may carry a stale value - consumers must\n * gate reads by joining with `lastFailedIndex`. The origin is\n * meaningful only when `lastFailedIndex !== undefined`.\n */\n readonly originIndexDuringCommit: Signal<number | undefined>;\n\n register(handle: CngxTabHandle): void;\n unregister(id: string): void;\n\n select(index: number): void;\n selectNext(): void;\n selectPrevious(): void;\n selectById(id: string): void;\n\n /**\n * Clear {@link lastFailedIndex} without unwinding\n * {@link originIndexDuringCommit} (consumers gate reads on\n * `lastFailedIndex` anyway). Call when the bound data source\n * changes and the rollback marker is no longer meaningful.\n */\n clearLastFailed(): void;\n}\n\n/**\n * DI token for the tab presenter's contract. Presenter provides via\n * `useExisting`; `CngxTab` injects to register; the organism injects\n * to forward keyboard nav from `CngxRovingTabindex`.\n *\n * @category common/tabs\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tab-group-host.token.ts\n * @since 0.1.0\n */\nexport const CNGX_TAB_GROUP_HOST = new InjectionToken<CngxTabGroupHost>('CngxTabGroupHost');\n","import { computed, Directive, inject, input, model, signal, type Signal } from '@angular/core';\n\nimport { CNGX_COMMIT_CONTROLLER_FACTORY, type CngxCommitController } from '@cngx/common/data';\nimport {\n CNGX_STATEFUL,\n createTransitionTracker,\n type CngxAsyncState,\n type StatusTransition,\n} from '@cngx/core/utils';\nimport type { Observable } from 'rxjs';\n\nimport { CNGX_TABS_COMMIT_HANDLER_FACTORY, type CngxTabsCommitHandler } from './commit-handler';\nimport {\n CNGX_TAB_GROUP_HOST,\n type CngxTabGroupHost,\n type CngxTabHandle,\n} from './tab-group-host.token';\n\n/**\n * Async-commit action shape for tab transitions. Receives origin\n * and target indices; resolves `true` to commit, `false` to refuse.\n * `Observable | Promise | sync` union mirrors the rest of the cngx\n * commit-action family.\n *\n * @category common/tabs\n */\nexport type CngxTabsCommitAction = (\n fromIndex: number,\n toIndex: number,\n) => boolean | Promise<boolean> | Observable<boolean>;\n\n/**\n * Tab-group presenter - brain of every cngx tab flow. Owns the\n * active-index model, the tab registry, orientation, loop policy,\n * and the commit-controller lifecycle. Provides\n * {@link CNGX_TAB_GROUP_HOST} for atoms and {@link CNGX_STATEFUL}\n * so `<cngx-toast-on />` / `<cngx-banner-on />` compose without\n * `[state]` wiring.\n *\n * **Layer:** `@cngx/common/tabs` (Level 2). Directive-only -\n * organisms compose via `hostDirectives`, consumers attach\n * `[cngxTabGroup]` directly.\n *\n * @category common/tabs\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/presenter.directive.ts\n * @since 0.1.0\n * @relatedTo CngxTab, CngxTabContent, CngxTabLabel, CngxTabsFragmentSync\n * <example-url>http://localhost:4200/#/ui/tabs/tab-commit-action/optimistic-pessimistic-commits-with-bridge-directives</example-url>\n */\n@Directive({\n selector: '[cngxTabGroup]',\n exportAs: 'cngxTabGroup',\n standalone: true,\n providers: [\n { provide: CNGX_TAB_GROUP_HOST, useExisting: CngxTabGroupPresenter },\n { provide: CNGX_STATEFUL, useExisting: CngxTabGroupPresenter },\n ],\n})\nexport class CngxTabGroupPresenter implements CngxTabGroupHost {\n readonly activeIndex = model<number>(0);\n readonly orientation = input<'horizontal' | 'vertical'>('horizontal');\n readonly loop = input<boolean>(true);\n\n /**\n * Async-commit action gating the transition. When non-null,\n * `select(...)` routes through {@link CngxTabsCommitHandler}; the\n * action's resolution decides whether the change lands. Supersede\n * semantics come from the commit-controller - a rapid second\n * `select(...)` cancels the in-flight runner.\n */\n readonly commitAction = input<CngxTabsCommitAction | null>(null);\n /**\n * Default `'optimistic'` - tab change is navigation, not a save,\n * so eager visual feedback matches the user's mental model.\n * Switch to `'pessimistic'` when the new tab must wait for the\n * action to confirm.\n */\n readonly commitMode = input<'optimistic' | 'pessimistic'>('optimistic');\n\n private readonly genericFactory = inject(CNGX_COMMIT_CONTROLLER_FACTORY);\n private readonly commitController: CngxCommitController<number> = this.genericFactory<number>();\n private readonly commitHandler: CngxTabsCommitHandler = inject(CNGX_TABS_COMMIT_HANDLER_FACTORY)({\n controller: this.commitController,\n });\n\n /** Producer surface for the `CNGX_STATEFUL` bridge contract. */\n readonly state: CngxAsyncState<number | undefined> = this.commitController.state;\n readonly commitState: CngxAsyncState<number | undefined> = this.commitController.state;\n /**\n * Index the user is currently trying to commit to. Tracked\n * separately from `state.data()` (which only updates on success)\n * to drive per-tab `aria-busy`.\n */\n readonly intendedIndex: Signal<number | undefined> = this.commitController.intendedValue;\n\n /**\n * Current/previous pair for `commitState.status()`. Skin\n * sub-components feed `<span cngxLiveRegion>` from this tracker\n * for declarative SR announcements. Shared across consumers so\n * the tracker's `linkedSignal` is allocated once per presenter.\n */\n readonly commitTransition: StatusTransition = createTransitionTracker(() =>\n this.commitController.state.status(),\n );\n\n // Persistence-of-error surface - see `CngxTabGroupHost.lastFailedIndex`\n // and `originIndexDuringCommit` for the contract.\n private readonly lastFailedIndexState = signal<number | undefined>(undefined);\n private readonly originIndexDuringCommitState = signal<number | undefined>(undefined);\n /** {@inheritDoc CngxTabGroupHost.lastFailedIndex} */\n readonly lastFailedIndex: Signal<number | undefined> = this.lastFailedIndexState.asReadonly();\n /** {@inheritDoc CngxTabGroupHost.originIndexDuringCommit} */\n readonly originIndexDuringCommit: Signal<number | undefined> =\n this.originIndexDuringCommitState.asReadonly();\n\n private readonly tabsState = signal<readonly CngxTabHandle[]>([], {\n equal: tabsEqual,\n });\n readonly tabs: Signal<readonly CngxTabHandle[]> = this.tabsState.asReadonly();\n\n private readonly clampedIndex = computed(() => {\n const count = this.tabs().length;\n if (count === 0) {\n return 0;\n }\n return Math.max(0, Math.min(this.activeIndex(), count - 1));\n });\n\n readonly activeId: Signal<string | null> = computed(\n () => this.tabs()[this.clampedIndex()]?.id ?? null,\n { equal: Object.is },\n );\n\n register(handle: CngxTabHandle): void {\n const current = this.tabsState();\n const idx = current.findIndex((h) => h.id === handle.id);\n if (idx >= 0) {\n const next = current.slice();\n next[idx] = handle;\n this.tabsState.set(next);\n return;\n }\n this.tabsState.set([...current, handle]);\n }\n\n unregister(id: string): void {\n const current = this.tabsState();\n const next = current.filter((h) => h.id !== id);\n if (next.length !== current.length) {\n this.tabsState.set(next);\n }\n }\n\n /** {@inheritDoc CngxTabGroupHost.clearLastFailed} */\n clearLastFailed(): void {\n this.lastFailedIndexState.set(undefined);\n }\n\n select(index: number): void {\n const tabs = this.tabs();\n if (tabs.length === 0) {\n return;\n }\n const target = Math.max(0, Math.min(index, tabs.length - 1));\n if (tabs[target].disabled()) {\n return;\n }\n const previous = this.activeIndex();\n if (target === previous) {\n return;\n }\n\n const action = this.commitAction();\n if (!action) {\n // No-action fast path - `originIndexDuringCommit` stays\n // untouched, so a stale origin can never leak into the\n // live-region announcement.\n this.activeIndex.set(target);\n if (this.lastFailedIndexState() === target) {\n this.lastFailedIndexState.set(undefined);\n }\n return;\n }\n\n // Open the commit window - origin is captured ONLY here so a\n // stale value never lingers into a non-commit navigation.\n this.originIndexDuringCommitState.set(previous);\n const mode = this.commitMode();\n if (mode === 'optimistic') {\n this.activeIndex.set(target);\n }\n this.commitHandler.beginTransition(previous, target, action, (accept) => {\n if (accept) {\n // Window closes on success - origin label no longer needed;\n // clear the rejection flag if the user re-picked the failed\n // target successfully.\n this.originIndexDuringCommitState.set(undefined);\n if (this.lastFailedIndexState() === target) {\n this.lastFailedIndexState.set(undefined);\n }\n if (mode === 'pessimistic') {\n this.activeIndex.set(target);\n }\n } else {\n // Reject - flag the refused target; RETAIN the origin so\n // the organism's `liveAnnouncement` computed can resolve\n // the origin label for the rich rollback phrase. Optimistic\n // rolls back; pessimistic never moved.\n this.lastFailedIndexState.set(target);\n if (mode === 'optimistic') {\n this.activeIndex.set(previous);\n }\n }\n });\n }\n\n selectNext(): void {\n const tabs = this.tabs();\n if (tabs.length === 0) {\n return;\n }\n let next = this.activeIndex() + 1;\n while (next < tabs.length && tabs[next].disabled()) {\n next++;\n }\n if (next < tabs.length) {\n this.select(next);\n return;\n }\n if (this.loop()) {\n let i = 0;\n while (i < tabs.length && tabs[i].disabled()) {\n i++;\n }\n if (i < tabs.length && i !== this.activeIndex()) {\n this.select(i);\n }\n }\n }\n\n selectPrevious(): void {\n const tabs = this.tabs();\n if (tabs.length === 0) {\n return;\n }\n let prev = this.activeIndex() - 1;\n while (prev >= 0 && tabs[prev].disabled()) {\n prev--;\n }\n if (prev >= 0) {\n this.select(prev);\n return;\n }\n if (this.loop()) {\n let i = tabs.length - 1;\n while (i >= 0 && tabs[i].disabled()) {\n i--;\n }\n if (i >= 0 && i !== this.activeIndex()) {\n this.select(i);\n }\n }\n }\n\n selectById(id: string): void {\n const tabs = this.tabs();\n const idx = tabs.findIndex((h) => h.id === id);\n if (idx >= 0) {\n this.select(idx);\n }\n }\n}\n\n/**\n * Structural equality for the tab registry. Compares length and\n * per-entry `id`, `disabled()`, and `label()`.\n *\n * `errorAggregator` is left out on purpose. The handle is a stable\n * per-tab reference injected once, so comparing it would push the\n * memoisation burden onto consumers and break the structural-equal\n * contract.\n *\n * Reading `disabled()` and `label()` here doesn't subscribe - the\n * comparator runs synchronously inside `signal.set()`, outside any\n * tracking context.\n *\n * @internal\n */\nexport function tabsEqual(a: readonly CngxTabHandle[], b: readonly CngxTabHandle[]): boolean {\n if (a === b) {\n return true;\n }\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; i++) {\n if (\n a[i].id !== b[i].id ||\n a[i].disabled() !== b[i].disabled() ||\n a[i].label() !== b[i].label()\n ) {\n return false;\n }\n }\n return true;\n}\n","import { InjectionToken, type Signal, type TemplateRef } from '@angular/core';\n\nimport type { CngxTabHandle } from './tab-group-host.token';\n\n/**\n * Read-mostly panel-surface contract for the overflow molecule, skin\n * sub-components, and future panel-level helpers. Narrower than\n * {@link CngxTabGroupHost} - register / unregister stay on the brain.\n *\n * The single write path is `selectById`; routing back through the\n * presenter preserves clamping, disabled-skip, and commit-action\n * gating. Template resolvers let skin sub-components project the\n * `*cngxTabLabel` / `*cngxTabContent` slots without depending on the\n * concrete `CngxTabGroup` class.\n *\n * @category common/tabs\n */\nexport interface CngxTabPanelHost {\n readonly tabs: Signal<readonly CngxTabHandle[]>;\n readonly activeId: Signal<string | null>;\n readonly orientation: Signal<'horizontal' | 'vertical'>;\n\n selectById(id: string): void;\n\n /** Resolves a tab id to its `*cngxTabLabel` template (consumer-supplied). */\n labelTemplateFor(id: string): TemplateRef<unknown> | null;\n /** Resolves a tab id to its `*cngxTabContent` template (consumer-supplied). */\n contentTemplateFor(id: string): TemplateRef<unknown> | null;\n}\n\n/**\n * DI token the organism provides via `useExisting`. The overflow\n * molecule and consumer-authored skin sub-components inject this\n * instead of the concrete component class.\n *\n * @category common/tabs\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tab-panel-host.token.ts\n * @since 0.1.0\n */\nexport const CNGX_TAB_PANEL_HOST = new InjectionToken<CngxTabPanelHost>('CngxTabPanelHost');\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Structural slot directive marking the per-tab panel-body template.\n * Discovered by `<cngx-tab-group>` via `contentChild` on each\n * `CngxTab` and projected into the matching `role=\"tabpanel\"`.\n *\n * ```html\n * <div cngxTab id=\"settings\">\n * <ng-template cngxTabLabel>Settings</ng-template>\n * <ng-template cngxTabContent>\n * <p>Settings panel body…</p>\n * </ng-template>\n * </div>\n * ```\n *\n * @category common/tabs\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tab-content.directive.ts\n * @since 0.1.0\n * @relatedTo CngxTab, CngxTabLabel\n * <example-url>http://localhost:4200/#/ui/tabs/tab-commit-action/optimistic-pessimistic-commits-with-bridge-directives</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-error-aggregation/per-tab-error-badges</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-group-vertical/vertical-sidebar-tabs</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-group/three-tab-navigation</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-overflow/8-tabs-in-a-narrow-container</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-busy-spinner-via-code-cngxtabbusyspinner-code</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-error-badge-via-code-cngxtaberrorbadge-code</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/rejection-decoration-via-code-cngxtabrejectionicon-code</example-url>\n */\n@Directive({\n selector: 'ng-template[cngxTabContent]',\n exportAs: 'cngxTabContent',\n standalone: true,\n})\nexport class CngxTabContent {\n readonly templateRef = inject(TemplateRef<unknown>);\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Structural slot directive marking the per-tab label template.\n * Discovered by `<cngx-tab-group>` via `contentChild` on each\n * `CngxTab` and projected into the tab strip.\n *\n * ```html\n * <div cngxTab id=\"settings\">\n * <ng-template cngxTabLabel>Settings</ng-template>\n * <ng-template cngxTabContent>...</ng-template>\n * </div>\n * ```\n *\n * @category common/tabs\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tab-label.directive.ts\n * @since 0.1.0\n * @relatedTo CngxTab, CngxTabContent\n * <example-url>http://localhost:4200/#/ui/tabs/tab-group-vertical/vertical-sidebar-tabs</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-group/three-tab-navigation</example-url>\n */\n@Directive({\n selector: 'ng-template[cngxTabLabel]',\n exportAs: 'cngxTabLabel',\n standalone: true,\n})\nexport class CngxTabLabel {\n readonly templateRef = inject(TemplateRef<unknown>);\n}\n","import {\n computed,\n contentChild,\n DestroyRef,\n Directive,\n inject,\n input,\n type Signal,\n} from '@angular/core';\n\nimport { nextUid } from '@cngx/core/utils';\n\nimport type { CngxErrorAggregatorContract } from '@cngx/common/interactive';\n\nimport { CngxTabContent } from './tab-content.directive';\nimport { CngxTabLabel } from './tab-label.directive';\nimport { CNGX_TAB_GROUP_HOST } from './tab-group-host.token';\n\n/**\n * Single-tab atom. Registers with the enclosing presenter via\n * {@link CNGX_TAB_GROUP_HOST} on construction; deregisters via\n * {@link DestroyRef} on teardown. The presenter holds the atom's\n * input signals by reference, so input changes propagate without\n * re-registration. `labelTemplate` / `contentTemplate` are projected\n * by the organism - the atom carries no rendering logic.\n *\n * @category common/tabs\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tab.directive.ts\n * @since 0.1.0\n * @relatedTo CngxTabGroupPresenter, CngxTabLabel, CngxTabContent, CngxTabErrorBadge\n * <example-url>http://localhost:4200/#/ui/tabs/tab-commit-action/optimistic-pessimistic-commits-with-bridge-directives</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-error-aggregation/per-tab-error-badges</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-group-vertical/vertical-sidebar-tabs</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-group/three-tab-navigation</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-overflow/8-tabs-in-a-narrow-container</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-busy-spinner-via-code-cngxtabbusyspinner-code</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-error-badge-via-code-cngxtaberrorbadge-code</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/rejection-decoration-via-code-cngxtabrejectionicon-code</example-url>\n */\n@Directive({\n selector: '[cngxTab]',\n exportAs: 'cngxTab',\n standalone: true,\n})\nexport class CngxTab {\n readonly id = input<string>(nextUid('cngx-tab-'));\n readonly disabled = input<boolean>(false);\n readonly label = input<string | undefined>(undefined);\n readonly errorAggregator = input<CngxErrorAggregatorContract | undefined>(undefined);\n\n readonly labelTemplate = contentChild(CngxTabLabel);\n readonly contentTemplate = contentChild(CngxTabContent);\n\n private readonly host = inject(CNGX_TAB_GROUP_HOST, { optional: true });\n\n /** `true` when the presenter's `activeId` equals this tab's id. */\n readonly selected: Signal<boolean> = computed(() => this.host?.activeId() === this.id(), {\n equal: Object.is,\n });\n\n constructor() {\n if (!this.host) {\n throw new Error(\n 'CngxTab: no enclosing CngxTabGroupPresenter found. Wrap the tab inside an element carrying [cngxTabGroup] (or place it inside <cngx-tab-group>).',\n );\n }\n const tabId = this.id();\n this.host.register({\n id: tabId,\n label: this.label,\n disabled: this.disabled,\n errorAggregator: this.errorAggregator,\n });\n const host = this.host;\n inject(DestroyRef).onDestroy(() => host.unregister(tabId));\n }\n}\n","import {\n afterNextRender,\n DestroyRef,\n Directive,\n effect,\n inject,\n input,\n untracked,\n} from '@angular/core';\nimport { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';\nimport { NavigationEnd, Router } from '@angular/router';\nimport { filter } from 'rxjs/operators';\n\nimport { CNGX_TAB_GROUP_HOST } from './tab-group-host.token';\n\n/**\n * URL deep-linking for tab groups. Bidirectional sync between\n * `activeId` and a URL fragment or query-param. Opt-in via\n * `[cngxTabsFragmentSync]` on the presenter element.\n *\n * - `mode = 'fragment'` (default) → `#tab=settings`\n * - `mode = 'queryParam'` with `paramName = 'tab'` → `?tab=settings`\n *\n * `Router` is optional - without it the directive logs a dev warning\n * via `afterNextRender` and becomes a no-op. Every `router.navigate`\n * and `host.selectById` inside the effects sits in `untracked()`.\n *\n * @category common/tabs\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/router-sync.directive.ts\n * @since 0.1.0\n * @relatedTo CngxTabGroupPresenter, CngxTab\n */\n@Directive({\n selector: '[cngxTabsFragmentSync]',\n exportAs: 'cngxTabsFragmentSync',\n standalone: true,\n})\nexport class CngxTabsFragmentSync {\n readonly mode = input<'fragment' | 'queryParam'>('fragment');\n readonly paramName = input<string>('tab');\n\n private readonly host = inject(CNGX_TAB_GROUP_HOST, { host: true });\n private readonly router = inject(Router, { optional: true });\n\n constructor() {\n if (!this.router) {\n afterNextRender(() => {\n console.warn(\n 'CngxTabsFragmentSync: no Router available - directive is a no-op. ' +\n 'Provide @angular/router via provideRouter(...) to enable deep-linking.',\n );\n });\n return;\n }\n const router = this.router;\n const destroyRef = inject(DestroyRef);\n\n afterNextRender(() => {\n const initial = this.readUrlValue(router);\n if (initial) {\n untracked(() => this.host.selectById(initial));\n }\n });\n\n effect(() => {\n const id = this.host.activeId();\n if (!id) {\n return;\n }\n untracked(() => {\n const navigation =\n this.mode() === 'fragment'\n ? router.navigate([], {\n fragment: `${this.paramName()}=${id}`,\n queryParamsHandling: 'merge',\n replaceUrl: true,\n })\n : router.navigate([], {\n queryParams: { [this.paramName()]: id },\n queryParamsHandling: 'merge',\n replaceUrl: true,\n });\n // Router rejection (e.g. cancelled navigation) has no recovery path.\n navigation.catch?.(() => undefined);\n });\n });\n\n const navEnd = toSignal(\n router.events.pipe(\n filter((e): e is NavigationEnd => e instanceof NavigationEnd),\n takeUntilDestroyed(destroyRef),\n ),\n { initialValue: null },\n );\n effect(() => {\n const e = navEnd();\n if (!e) {\n return;\n }\n untracked(() => {\n const next = this.readUrlValue(router);\n if (next && next !== this.host.activeId()) {\n this.host.selectById(next);\n }\n });\n });\n }\n\n private readUrlValue(router: Router): string | null {\n if (this.mode() === 'fragment') {\n const fragment = router.routerState.snapshot.root.fragment ?? '';\n return this.parseFragment(fragment);\n }\n return router.routerState.snapshot.root.queryParamMap.get(this.paramName()) ?? null;\n }\n\n private parseFragment(fragment: string): string | null {\n const param = this.paramName();\n const segments = fragment.split('&');\n for (const seg of segments) {\n const [key, val] = seg.split('=');\n if (key === param && val) {\n return val;\n }\n }\n return null;\n }\n}\n","import {\n type EnvironmentProviders,\n inject,\n InjectionToken,\n makeEnvironmentProviders,\n type Provider,\n type TemplateRef,\n} from '@angular/core';\n\nimport type { CngxTabOverflowItemContext } from './overflow/tab-overflow-item.directive';\nimport type { CngxTabOverflowTriggerContext } from './overflow/tab-overflow-trigger.directive';\nimport type { CngxTabBusySpinnerContext } from './slots/tab-busy-spinner.directive';\nimport type { CngxTabErrorBadgeContext } from './slots/tab-error-badge.directive';\nimport type { CngxTabRejectionIconContext } from './slots/tab-rejection-icon.directive';\n\n/**\n * Aria-label overrides for the tab-group landmark region. Library\n * defaults are English; consumers override via\n * {@link withTabsAriaLabels}.\n *\n * Per-tab nav phrasing (`previousTab`, `nextTab`) lives in\n * {@link CngxTabsI18n}, not here - landmark naming and SR phrasing\n * stay on separate override paths.\n *\n * @category common/tabs\n */\nexport interface CngxTabsAriaLabels {\n readonly tabsRegion?: string;\n}\n\n/**\n * Fallback labels for derived strings (role descriptions, badge SR\n * announcements). Library defaults are English; consumers override\n * per locale.\n *\n * @category common/tabs\n */\nexport interface CngxTabsFallbackLabels {\n readonly tabRoleDescription?: string;\n readonly tabPanelRoleDescription?: string;\n}\n\n/**\n * App-wide template overrides for `<cngx-tab-group>` and\n * `<cngx-tab-overflow>` skin regions. Middle tier of the 3-stage\n * cascade - per-instance directive > this field > built-in markup.\n * Apply via the matching `with*Template` builders. Shape mirrors\n * `CngxStepperTemplates` so consumer templates port across\n * families.\n *\n * @category common/tabs\n */\nexport interface CngxTabsTemplates {\n readonly overflowTrigger?: TemplateRef<CngxTabOverflowTriggerContext>;\n readonly overflowItem?: TemplateRef<CngxTabOverflowItemContext>;\n readonly errorBadge?: TemplateRef<CngxTabErrorBadgeContext>;\n readonly rejectionIcon?: TemplateRef<CngxTabRejectionIconContext>;\n readonly busySpinner?: TemplateRef<CngxTabBusySpinnerContext>;\n}\n\n/**\n * Tab-group config surface. Resolution priority: per-instance Input\n * → `provideTabsConfigAt` (viewProviders) → `provideTabsConfig`\n * (root) → library default.\n *\n * @category common/tabs\n */\nexport interface CngxTabsConfig {\n readonly defaultOrientation?: 'horizontal' | 'vertical';\n readonly defaultLoop?: boolean;\n readonly defaultCommitMode?: 'optimistic' | 'pessimistic';\n readonly routerSyncMode?: 'fragment' | 'queryParam';\n readonly routerSyncParam?: string;\n readonly ariaLabels?: CngxTabsAriaLabels;\n readonly fallbackLabels?: CngxTabsFallbackLabels;\n /**\n * Quiescence window (ms) for the overflow IO debounce. Burst\n * emissions during strip animations collapse to one write; the\n * More counter re-renders once IO has been quiet this long.\n * Default 100ms. Capped by {@link overflowMaxDeferMs}.\n */\n readonly overflowStabilizeMs?: number;\n /**\n * Hard ceiling (ms) on commit deferral while IO bursts keep\n * arriving - without it, sustained churn (momentum scroll,\n * continuous resize) would clear the stabilize timer forever and\n * the More counter would freeze on a stale value, breaking\n * Pillar 2. Default 250ms.\n */\n readonly overflowMaxDeferMs?: number;\n /**\n * App-wide template overrides for `<cngx-tab-overflow>` regions.\n * Middle tier of the family-standard 3-stage cascade. See\n * {@link CngxTabsTemplates}.\n */\n readonly templates?: CngxTabsTemplates;\n}\n\nconst TABS_CONFIG_DEFAULTS: Required<\n Omit<CngxTabsConfig, 'ariaLabels' | 'fallbackLabels' | 'templates'>\n> & {\n ariaLabels: CngxTabsAriaLabels;\n fallbackLabels: CngxTabsFallbackLabels;\n templates: CngxTabsTemplates;\n} = {\n defaultOrientation: 'horizontal',\n defaultLoop: true,\n defaultCommitMode: 'optimistic',\n routerSyncMode: 'fragment',\n routerSyncParam: 'tab',\n ariaLabels: {\n tabsRegion: 'Tabs',\n },\n fallbackLabels: {\n // W3C ARIA tablist convention - kept distinct from\n // `i18n.tabsLabel` so AT doesn't read the same string twice\n // back-to-back across `aria-roledescription` and `aria-label`.\n tabRoleDescription: 'tab list',\n tabPanelRoleDescription: 'tab panel',\n },\n overflowStabilizeMs: 100,\n overflowMaxDeferMs: 250,\n templates: {},\n};\n\n/**\n * DI token for the resolved tabs config. `providedIn: 'root'` with\n * the library defaults; override via {@link provideTabsConfig}\n * (root) or {@link provideTabsConfigAt} (component scope).\n *\n * @category common/tabs\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tabs-config.ts\n * @since 0.1.0\n */\nexport const CNGX_TABS_CONFIG = new InjectionToken<CngxTabsConfig>('CngxTabsConfig', {\n providedIn: 'root',\n factory: () => TABS_CONFIG_DEFAULTS,\n});\n\n/**\n * Feature signature for `with*` config builders. The hidden\n * `_target` discriminator lets {@link provideCngxTabs} dispatch\n * config features to {@link provideTabsConfig} while i18n features\n * route to {@link provideTabsI18n}.\n *\n * @category common/tabs\n */\nexport type CngxTabsConfigFeature = ((config: CngxTabsConfig) => CngxTabsConfig) & {\n readonly _target: 'config';\n};\n\n/**\n * Internal helper that brands a config-mutator function with the\n * `_target` discriminator. Every `with*` config feature returns one\n * of these.\n *\n * @internal\n */\nfunction defineTabsConfigFeature(\n fn: (config: CngxTabsConfig) => CngxTabsConfig,\n): CngxTabsConfigFeature {\n return Object.assign(fn, { _target: 'config' as const });\n}\n\n/**\n * Override the default orientation. Per-instance `[orientation]`\n * still wins; this changes the cascade default only.\n *\n * @category common/tabs\n */\nexport function withTabsDefaultOrientation(\n orientation: 'horizontal' | 'vertical',\n): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({\n ...cfg,\n defaultOrientation: orientation,\n }));\n}\n\n/**\n * @deprecated Use {@link withTabsDefaultOrientation}. The unprefixed name\n * collides with the stepper family's identical symbol when both libs\n * are auto-imported. The alias stays for one minor release before\n * removal.\n *\n * @category common/tabs\n */\nexport const withDefaultOrientation = withTabsDefaultOrientation;\n\n/**\n * Override whether roving-tabindex navigation loops from last back to\n * first (and vice versa). Per-instance `[loop]` Input still wins.\n *\n * @category common/tabs\n */\nexport function withTabsRovingLoop(loop: boolean): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({ ...cfg, defaultLoop: loop }));\n}\n\n/**\n * Override the default commit mode for async tab transitions.\n * `'optimistic'` activates the tab on action dispatch and rolls back\n * on error; `'pessimistic'` waits for success. Per-instance\n * `[commitMode]` Input still wins.\n *\n * @category common/tabs\n */\nexport function withTabsCommitMode(mode: 'optimistic' | 'pessimistic'): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({\n ...cfg,\n defaultCommitMode: mode,\n }));\n}\n\n/**\n * Configure router synchronisation for the active tab. `mode` chooses\n * the URL surface (URL fragment or query parameter); `param` names\n * the key (default `'tab'`).\n *\n * @category common/tabs\n */\nexport function withTabsRouterSync(\n mode: 'fragment' | 'queryParam',\n param = 'tab',\n): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({\n ...cfg,\n routerSyncMode: mode,\n routerSyncParam: param,\n }));\n}\n\n/**\n * Merge ARIA labels into the cascade. Keys not provided keep their\n * library defaults; per-instance overrides on the tab group still win.\n *\n * @category common/tabs\n */\nexport function withTabsAriaLabels(labels: CngxTabsAriaLabels): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({\n ...cfg,\n ariaLabels: { ...cfg.ariaLabels, ...labels },\n }));\n}\n\n/**\n * Merge text fallback labels (overflow trigger, busy / rejection text)\n * into the cascade. Used when a slot directive is not present.\n *\n * @category common/tabs\n */\nexport function withTabsFallbackLabels(labels: CngxTabsFallbackLabels): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({\n ...cfg,\n fallbackLabels: { ...cfg.fallbackLabels, ...labels },\n }));\n}\n\n/**\n * Override the IO-debounce window (ms). See\n * {@link CngxTabsConfig.overflowStabilizeMs}.\n *\n * @category common/tabs\n */\nexport function withTabOverflowStabilizeMs(ms: number): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({\n ...cfg,\n overflowStabilizeMs: ms,\n }));\n}\n\n/**\n * Override the worst-case staleness ceiling on the visibility-map\n * commit. See {@link CngxTabsConfig.overflowMaxDeferMs}.\n *\n * @category common/tabs\n */\nexport function withTabOverflowMaxDeferMs(ms: number): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({\n ...cfg,\n overflowMaxDeferMs: ms,\n }));\n}\n\n/**\n * App-wide override for the More-button label. Middle tier;\n * per-instance `*cngxTabOverflowTrigger` still wins.\n *\n * ```ts\n * @ViewChild('moreTrigger', { static: true, read: TemplateRef })\n * moreTrigger!: TemplateRef<CngxTabOverflowTriggerContext>;\n *\n * providers: [provideTabsConfig(withTabOverflowTriggerTemplate(this.moreTrigger))]\n * ```\n *\n * @category common/tabs\n */\nexport function withTabOverflowTriggerTemplate(\n template: TemplateRef<CngxTabOverflowTriggerContext>,\n): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({\n ...cfg,\n templates: { ...cfg.templates, overflowTrigger: template },\n }));\n}\n\n/**\n * App-wide override for each row inside the overflow popover.\n * Middle tier; per-instance `*cngxTabOverflowItem` still wins.\n *\n * @category common/tabs\n */\nexport function withTabOverflowItemTemplate(\n template: TemplateRef<CngxTabOverflowItemContext>,\n): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({\n ...cfg,\n templates: { ...cfg.templates, overflowItem: template },\n }));\n}\n\n/**\n * App-wide override for the error-badge decoration. Middle tier;\n * per-instance `*cngxTabErrorBadge` still wins. Sibling of the\n * stepper family's `withStepBadgeTemplate`.\n *\n * @category common/tabs\n */\nexport function withTabErrorBadgeTemplate(\n template: TemplateRef<CngxTabErrorBadgeContext>,\n): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({\n ...cfg,\n templates: { ...cfg.templates, errorBadge: template },\n }));\n}\n\n/**\n * App-wide override for the rejection-icon decoration. Middle\n * tier; per-instance `*cngxTabRejectionIcon` still wins. Sibling\n * of {@link withStepRejectionTemplate}.\n *\n * @category common/tabs\n */\nexport function withTabRejectionIconTemplate(\n template: TemplateRef<CngxTabRejectionIconContext>,\n): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({\n ...cfg,\n templates: { ...cfg.templates, rejectionIcon: template },\n }));\n}\n\n/**\n * App-wide override for the commit-pending busy-spinner overlay.\n * Middle tier; per-instance `*cngxTabBusySpinner` still wins.\n * Sibling of {@link withStepBusySpinnerTemplate}.\n *\n * @category common/tabs\n */\nexport function withTabBusySpinnerTemplate(\n template: TemplateRef<CngxTabBusySpinnerContext>,\n): CngxTabsConfigFeature {\n return defineTabsConfigFeature((cfg) => ({\n ...cfg,\n templates: { ...cfg.templates, busySpinner: template },\n }));\n}\n\nfunction resolveFeatures(features: readonly CngxTabsConfigFeature[]): CngxTabsConfig {\n return features.reduce<CngxTabsConfig>((cfg, feat) => feat(cfg), TABS_CONFIG_DEFAULTS);\n}\n\n/**\n * Root-level provider. Apply once in `bootstrapApplication` /\n * `appConfig.providers`. Returns {@link EnvironmentProviders} per\n * the canonical cngx config-cascade signature.\n *\n * @category common/tabs\n */\nexport function provideTabsConfig(\n ...features: readonly CngxTabsConfigFeature[]\n): EnvironmentProviders {\n return makeEnvironmentProviders([\n { provide: CNGX_TABS_CONFIG, useValue: resolveFeatures(features) },\n ]);\n}\n\n/**\n * Component-scoped override. Returns `Provider[]` (not\n * {@link EnvironmentProviders}) because `viewProviders` rejects\n * opaque environment providers. Resolution priority: per-instance\n * Input > viewProviders (`At`) > root > default.\n *\n * ```ts\n * @Component({\n * viewProviders: [...provideTabsConfigAt(withTabsDefaultOrientation('vertical'))],\n * })\n * ```\n *\n * @category common/tabs\n */\nexport function provideTabsConfigAt(...features: readonly CngxTabsConfigFeature[]): Provider[] {\n return [{ provide: CNGX_TABS_CONFIG, useValue: resolveFeatures(features) }];\n}\n\n/**\n * Inject the resolved tabs config in an injection context.\n *\n * @category common/tabs\n */\nexport function injectTabsConfig(): CngxTabsConfig {\n return inject(CNGX_TABS_CONFIG);\n}\n","import { inject, InjectionToken, type Provider } from '@angular/core';\n\n/**\n * Tabs i18n surface. Library defaults are English; consumers\n * override via {@link provideTabsI18n}. Sibling to\n * `CNGX_STEPPER_I18N` and `CNGX_CHART_I18N`.\n *\n * @category common/tabs/i18n\n */\nexport interface CngxTabsI18n {\n readonly tabsLabel: string;\n readonly selectedTab: (label: string, position: number, count: number) => string;\n readonly tabHasErrors: (count: number) => string;\n readonly moreTabsLabel: (count: number) => string;\n readonly previousTab: string;\n readonly nextTab: string;\n /**\n * @deprecated Superseded by {@link commitRolledBackTo}. Retained as\n * the defensive fallback in `liveAnnouncement` when the origin\n * label is unresolvable - fires for unlabeled tabs or programmatic\n * `commitState` writes that bypass `select()`. See\n * `tabs-accepted-debt §4`.\n */\n readonly commitFailedRetry: string;\n readonly commitInFlight: string;\n /**\n * Origin-aware rollback announcement. Receives the safe-harbour\n * tab label and yields the rollback phrase. Read on the\n * `pending → error` transition when both `lastFailedIndex` and\n * `originIndexDuringCommit` are set.\n */\n readonly commitRolledBackTo: (originLabel: string) => string;\n}\n\nconst TABS_I18N_DEFAULTS: CngxTabsI18n = {\n tabsLabel: 'Tabs',\n selectedTab: (label, position, count) => `Tab ${position} of ${count}: ${label}`,\n tabHasErrors: (count) => `${count} error${count === 1 ? '' : 's'}`,\n moreTabsLabel: (count) => `${count} more`,\n previousTab: 'Previous tab',\n nextTab: 'Next tab',\n commitFailedRetry: 'Tab change refused — retry?',\n commitInFlight: 'Switching tab…',\n commitRolledBackTo: (originLabel) => `Could not save changes — reverted to \"${originLabel}\".`,\n};\n\n/**\n * DI token for the tabs i18n bundle. `providedIn: 'root'` with\n * English defaults.\n *\n * @category common/tabs/i18n\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/i18n/tabs-i18n.ts\n * @since 0.1.0\n */\nexport const CNGX_TABS_I18N = new InjectionToken<CngxTabsI18n>('CngxTabsI18n', {\n providedIn: 'root',\n factory: () => TABS_I18N_DEFAULTS,\n});\n\n/**\n * Branded feature-fn for {@link provideTabsI18n} and\n * {@link provideCngxTabs}. The hidden `_target` discriminator routes\n * i18n features to `provideTabsI18n` and config features to\n * `provideTabsConfig` from the unified aggregator.\n *\n * @category common/tabs/i18n\n */\nexport type CngxTabsI18nFeature = ((bundle: CngxTabsI18n) => CngxTabsI18n) & {\n readonly _target: 'i18n';\n};\n\n/**\n * Brands an i18n-mutator with the `_target` discriminator.\n *\n * @internal\n */\nfunction defineTabsI18nFeature(fn: (bundle: CngxTabsI18n) => CngxTabsI18n): CngxTabsI18nFeature {\n return Object.assign(fn, { _target: 'i18n' as const });\n}\n\n/**\n * Override i18n labels via a partial bundle - unset keys keep the\n * English default. Same shape as `withTabsAriaLabels` /\n * `withTabsFallbackLabels` so `provideCngxTabs` composes both\n * surfaces uniformly.\n *\n * @category common/tabs/i18n\n */\nexport function withTabsI18nLabels(overrides: Partial<CngxTabsI18n>): CngxTabsI18nFeature {\n return defineTabsI18nFeature((bundle) => ({ ...bundle, ...overrides }));\n}\n\nfunction resolveI18nFeatures(features: readonly CngxTabsI18nFeature[]): CngxTabsI18n {\n return features.reduce<CngxTabsI18n>((bundle, feat) => feat(bundle), TABS_I18N_DEFAULTS);\n}\n\n/**\n * Provider for the tabs i18n bundle. Compose `withTabsI18nLabels(...)`\n * (and future i18n `with*` features); unset keys fall back to the\n * English default.\n *\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideTabsI18n(\n * withTabsI18nLabels({ tabsLabel: 'Reiter', previousTab: 'Vorheriger' }),\n * ),\n * ],\n * });\n * ```\n *\n * @category common/tabs/i18n\n */\nexport function provideTabsI18n(...features: readonly CngxTabsI18nFeature[]): Provider {\n return {\n provide: CNGX_TABS_I18N,\n useValue: resolveI18nFeatures(features),\n };\n}\n\n/**\n * Inject the resolved tabs i18n bundle.\n *\n * @category common/tabs/i18n\n */\nexport function injectTabsI18n(): CngxTabsI18n {\n return inject(CNGX_TABS_I18N);\n}\n","import {\n type EnvironmentProviders,\n isDevMode,\n makeEnvironmentProviders,\n type Provider,\n} from '@angular/core';\n\nimport {\n provideTabsI18n,\n type CngxTabsI18nFeature,\n} from './i18n/tabs-i18n';\nimport {\n provideTabsConfig,\n provideTabsConfigAt,\n type CngxTabsConfigFeature,\n} from './tabs-config';\n\n/**\n * Union of feature kinds the tabs aggregator accepts. Today: config\n * + i18n; future surfaces widen the union and dispatch via the\n * hidden `_target` discriminator.\n *\n * @category common/tabs\n */\nexport type CngxTabsFeature = CngxTabsConfigFeature | CngxTabsI18nFeature;\n\n/** @internal */\ninterface PartitionedFeatures {\n readonly config: CngxTabsConfigFeature[];\n readonly i18n: CngxTabsI18nFeature[];\n}\n\nfunction partitionFeatures(\n features: readonly CngxTabsFeature[],\n): PartitionedFeatures {\n const config: CngxTabsConfigFeature[] = [];\n const i18n: CngxTabsI18nFeature[] = [];\n for (const feat of features) {\n if (feat._target === 'i18n') {\n i18n.push(feat);\n continue;\n }\n if (feat._target === 'config') {\n config.push(feat);\n continue;\n }\n // Unbranded feature — runtime escape from the `_target` type.\n // Drop with dev-warn so an i18n-shaped override never lands\n // silently in `CNGX_TABS_CONFIG`.\n if (isDevMode()) {\n console.warn(\n '[provideCngxTabs] Dropped feature without a `_target` ' +\n 'discriminator. Brand config-side mutators with ' +\n '`defineTabsConfigFeature(...)` (or use a `with*` helper) ' +\n 'and i18n-side mutators with `withTabsI18nLabels(...)`.',\n );\n }\n }\n return { config, i18n };\n}\n\n/**\n * Unified aggregator for tabs configuration. Routes features by\n * `_target` to {@link provideTabsConfig} and {@link provideTabsI18n}.\n * Sibling to `provideCngxMenu` and `provideCngxSelect`; apply once in\n * the app providers array. Returns {@link EnvironmentProviders}; for\n * `viewProviders` use {@link provideCngxTabsAt} — opaque\n * `EnvironmentProviders` cannot live there.\n *\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideCngxTabs(\n * withTabsDefaultOrientation('vertical'),\n * withTabsAriaLabels({ tabsRegion: 'Bereiche' }),\n * withTabsI18nLabels({ tabsLabel: 'Bereiche', moreTabsLabel: (n) => `${n} mehr` }),\n * withTabOverflowStabilizeMs(150),\n * ),\n * ],\n * });\n * ```\n *\n * @category common/tabs\n */\nexport function provideCngxTabs(\n ...features: readonly CngxTabsFeature[]\n): EnvironmentProviders {\n const { config, i18n } = partitionFeatures(features);\n return makeEnvironmentProviders([\n provideTabsConfig(...config),\n ...(i18n.length > 0 ? [provideTabsI18n(...i18n)] : []),\n ]);\n}\n\n/**\n * Component-scoped twin of {@link provideCngxTabs}. Returns\n * `Provider[]` for `viewProviders`/`providers`; same dispatch\n * semantics, different scope.\n *\n * ```ts\n * @Component({\n * viewProviders: [\n * ...provideCngxTabsAt(\n * withTabsDefaultOrientation('vertical'),\n * withTabsI18nLabels({ tabsLabel: 'Bereiche' }),\n * ),\n * ],\n * })\n * ```\n *\n * @category common/tabs\n */\nexport function provideCngxTabsAt(\n ...features: readonly CngxTabsFeature[]\n): Provider[] {\n const { config, i18n } = partitionFeatures(features);\n return [\n ...provideTabsConfigAt(...config),\n ...(i18n.length > 0 ? [provideTabsI18n(...i18n)] : []),\n ];\n}\n","import { InjectionToken } from '@angular/core';\n\nimport type { CngxTabHandle } from '../tab-group-host.token';\nimport type { CngxTabPanelHost } from '../tab-panel-host.token';\n\n/**\n * Resolves the DOM elements `<cngx-tab-overflow>` observes. cngx-native\n * keys by `[id=\"${handle.id}-header\"]`; the Material twin keys by\n * positional index into `.mat-mdc-tab` (handle ids never appear on\n * Material's rendered DOM). The molecule is variant-agnostic and\n * consumes whichever adapter\n * {@link CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY} provides.\n *\n * @category common/tabs/overflow\n */\nexport interface CngxTabOverflowDomAdapter {\n /**\n * Resolve the IntersectionObserver root - the scroll viewport the\n * molecule observes. Returning `null` short-circuits the attach;\n * the molecule's rAF retry loop polls again next frame.\n */\n resolveStripRoot(panelHost: CngxTabPanelHost, host: HTMLElement): HTMLElement | null;\n\n /**\n * Resolve the rendered button for `handle` inside `root`. cngx-native\n * keys by `handle.id`; Material adapters key by `idx`.\n */\n resolveTabButton(handle: CngxTabHandle, root: HTMLElement, idx: number): HTMLElement | null;\n}\n\n/**\n * Factory signature for {@link CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY}.\n *\n * @category common/tabs/overflow\n */\nexport type CngxTabOverflowDomAdapterFactory = () => CngxTabOverflowDomAdapter;\n\n/**\n * Default adapter for the cngx-native `<cngx-tab-group>` strip:\n * walks `host.closest('.cngx-tabs__strip-wrapper')` for the IO root,\n * then `[id=\"${handle.id}-header\"]` for each button.\n *\n * @category common/tabs/overflow\n */\nexport function createCngxTabOverflowDefaultDomAdapter(): CngxTabOverflowDomAdapter {\n return {\n resolveStripRoot(_panelHost, host) {\n const wrapper = host.closest<HTMLElement>('.cngx-tabs__strip-wrapper');\n return wrapper?.querySelector<HTMLElement>('.cngx-tabs__strip') ?? null;\n },\n resolveTabButton(handle, root, _idx) {\n return root.querySelector<HTMLElement>(`[id=\"${handle.id}-header\"]`);\n },\n };\n}\n\n/**\n * DI token for the overflow molecule's DOM-resolution strategy.\n * Override at directive `providers` or component `viewProviders` to\n * swap in a Material, custom-skin, or test-double adapter without\n * forking the molecule. Defaults to\n * {@link createCngxTabOverflowDefaultDomAdapter}.\n *\n * @category common/tabs/overflow\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/overflow/dom-adapter.ts\n * @since 0.1.0\n */\nexport const CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY =\n new InjectionToken<CngxTabOverflowDomAdapterFactory>('CngxTabOverflowDomAdapterFactory', {\n providedIn: 'root',\n factory: () => createCngxTabOverflowDefaultDomAdapter,\n });\n","import { InjectionToken } from '@angular/core';\n\n/**\n * Outcome reported by an `attempt` callback. `true` halts the loop\n * (success); `false` or `null` schedules another tick.\n *\n * @category common/tabs/overflow\n */\nexport type CngxDomAnchorRetryResult = true | false | null;\n\n/**\n * Configuration for {@link createDomAnchorRetry}.\n *\n * @category common/tabs/overflow\n */\nexport interface CngxDomAnchorRetryOptions {\n /**\n * Per-attempt callback. `true` halts; `false`/`null` schedules\n * another attempt.\n */\n readonly attempt: () => CngxDomAnchorRetryResult;\n /**\n * Cap on unsuccessful attempts before {@link onGiveUp} fires.\n * The first synchronous call counts as attempt #1 - `5` permits\n * four scheduled retries after the initial.\n */\n readonly maxAttempts: number;\n /**\n * Schedules the next attempt (rAF / `afterNextRender` /\n * `setTimeout` / `queueMicrotask`). Returns a cancellation\n * closure - return a noop when the scheduler doesn't expose one.\n */\n readonly schedule: (cb: () => void) => () => void;\n /** Fires once after the `maxAttempts`-th unsuccessful attempt. */\n readonly onGiveUp?: () => void;\n}\n\n/**\n * Imperative handle returned by {@link createDomAnchorRetry}.\n *\n * @category common/tabs/overflow\n */\nexport interface CngxDomAnchorRetryHandle {\n /** Begin (or restart) the retry loop. Resets the attempt counter. */\n start(): void;\n /** Stop the retry loop and cancel any pending scheduled attempt. */\n cancel(): void;\n}\n\n/**\n * Bounded retry loop for DOM-anchoring patterns - shared\n * attempt-counter + give-up + cancellation contract. Used by\n * `<cngx-tab-overflow>`'s rAF strip-attach loop and `[cngxMatTabs]`'s\n * `afterNextRender` header-anchor loop. Consumer-supplied scheduler\n * lets different timing primitives flow through one counter.\n *\n * ```ts\n * const retry = createDomAnchorRetry({\n * attempt: () => {\n * const root = host.closest('.strip-wrapper');\n * if (!root) return null;\n * observer.observe(root);\n * return true;\n * },\n * maxAttempts: 60,\n * schedule: (cb) => {\n * const h = requestAnimationFrame(cb);\n * return () => cancelAnimationFrame(h);\n * },\n * onGiveUp: () => console.warn('strip wrapper not found'),\n * });\n * afterNextRender(() => retry.start());\n * destroyRef.onDestroy(() => retry.cancel());\n * ```\n *\n * @category common/tabs/overflow\n */\nexport function createDomAnchorRetry(options: CngxDomAnchorRetryOptions): CngxDomAnchorRetryHandle {\n let attempts = 0;\n let cancelLast: (() => void) | null = null;\n let stopped = false;\n const tick = (): void => {\n if (stopped) {\n cancelLast = null;\n return;\n }\n cancelLast = null;\n let result: CngxDomAnchorRetryResult;\n try {\n result = options.attempt();\n } catch {\n // Swallow + terminal stop - covers the test-runner teardown\n // race where a global (e.g. IntersectionObserver) is reset\n // between schedule and fire, before consumer DestroyRef can\n // call cancel(). Production callback bugs still surface via\n // their own console.error before they throw here.\n stopped = true;\n return;\n }\n if (result === true) {\n stopped = true;\n return;\n }\n attempts++;\n if (attempts >= options.maxAttempts) {\n stopped = true;\n options.onGiveUp?.();\n return;\n }\n cancelLast = options.schedule(tick);\n };\n return {\n start: () => {\n stopped = false;\n attempts = 0;\n tick();\n },\n cancel: () => {\n stopped = true;\n cancelLast?.();\n cancelLast = null;\n },\n };\n}\n\n/**\n * Factory signature for {@link CNGX_DOM_ANCHOR_RETRY_FACTORY} -\n * matches {@link createDomAnchorRetry} for drop-in overrides.\n *\n * @category common/tabs/overflow\n */\nexport type CngxDomAnchorRetryFactory = (\n options: CngxDomAnchorRetryOptions,\n) => CngxDomAnchorRetryHandle;\n\n/**\n * DI token for the DOM-anchor retry policy. Default\n * {@link createDomAnchorRetry}. Two real consumers today -\n * `<cngx-tab-overflow>`'s rAF strip-attach loop and\n * `[cngxMatTabs]`'s `afterNextRender` header-anchor loop. Override\n * via `providers` / `viewProviders` for retry-with-backoff,\n * telemetry on give-up, etc. Symmetric to\n * `CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY`,\n * `CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY`, and\n * `CNGX_TABS_COMMIT_HANDLER_FACTORY`.\n *\n * @category common/tabs/overflow\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/overflow/dom-anchor-retry.ts\n * @since 0.1.0\n */\nexport const CNGX_DOM_ANCHOR_RETRY_FACTORY = new InjectionToken<CngxDomAnchorRetryFactory>(\n 'CngxDomAnchorRetryFactory',\n {\n providedIn: 'root',\n factory: () => createDomAnchorRetry,\n },\n);\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\nimport type { CngxTabHandle } from '../tab-group-host.token';\n\n/**\n * Context for the `*cngxTabOverflowTrigger` template. Replaces the\n * default `i18n.moreTabsLabel(count)` text on the More button; the\n * surrounding `<button cngxPopoverTrigger>` shell (`aria-haspopup`,\n * `aria-expanded`, click handler, hidden binding) stays library-owned.\n *\n * @category common/tabs/overflow\n */\nexport interface CngxTabOverflowTriggerContext {\n /** Convenience alias for `count` - usable as `let-count` shorthand. */\n readonly $implicit: number;\n /** Number of hidden tabs currently surfaced through the overflow popover. */\n readonly count: number;\n /** Hidden tabs, in the order they appear in `presenter.tabs()`. */\n readonly hiddenTabs: readonly CngxTabHandle[];\n}\n\n/**\n * Structural slot for the More-button label. 3-stage cascade:\n * per-instance directive >\n * `CNGX_TABS_CONFIG.templates.overflowTrigger` >\n * `i18n.moreTabsLabel(count)`.\n *\n * ```html\n * <cngx-tab-overflow>\n * <ng-template cngxTabOverflowTrigger let-count>\n * <my-icon name=\"dots\" /> +{{ count }}\n * </ng-template>\n * </cngx-tab-overflow>\n * ```\n *\n * @category common/tabs/overflow\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/overflow/tab-overflow-trigger.directive.ts\n * @since 0.1.0\n * @relatedTo CngxTabOverflowItem, CngxTab\n */\n@Directive({\n selector: 'ng-template[cngxTabOverflowTrigger]',\n exportAs: 'cngxTabOverflowTrigger',\n standalone: true,\n})\nexport class CngxTabOverflowTrigger {\n readonly templateRef = inject<TemplateRef<CngxTabOverflowTriggerContext>>(TemplateRef);\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\nimport type { CngxTabHandle } from '../tab-group-host.token';\n\n/**\n * Context for the `*cngxTabOverflowItem` template. Replaces the\n * default `tab.label() ?? tab.id` text inside the More popover; the\n * surrounding `<li role=\"menuitem\">` shell (`aria-disabled`, click\n * handler, `data-tab-id`) stays library-owned.\n *\n * @category common/tabs/overflow\n */\nexport interface CngxTabOverflowItemContext {\n /** Convenience alias for `tab` - usable as `let-tab` shorthand. */\n readonly $implicit: CngxTabHandle;\n /** The hidden tab the row represents. */\n readonly tab: CngxTabHandle;\n /**\n * Commit-aware select. Routes through `panelHost.selectById(tab.id)`\n * and dismisses the popover; no-op when `disabled`.\n */\n readonly pick: () => void;\n /** Mirrors `tab.disabled()` - pre-resolved for consumer convenience. */\n readonly disabled: boolean;\n /** Row index inside `hiddenTabs()`, starting at 0. */\n readonly index: number;\n}\n\n/**\n * Structural slot for the per-row body inside the More popover.\n * 3-stage cascade: per-instance directive >\n * `CNGX_TABS_CONFIG.templates.overflowItem` > built-in label text.\n *\n * ```html\n * <cngx-tab-overflow>\n * <ng-template cngxTabOverflowItem let-tab let-disabled=\"disabled\">\n * <my-icon [name]=\"tab.id\" />\n * <span class=\"row-label\" [class.is-muted]=\"disabled\">\n * {{ tab.label() }}\n * </span>\n * </ng-template>\n * </cngx-tab-overflow>\n * ```\n *\n * @category common/tabs/overflow\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/overflow/tab-overflow-item.directive.ts\n * @since 0.1.0\n * @relatedTo CngxTabOverflowTrigger, CngxTab\n */\n@Directive({\n selector: 'ng-template[cngxTabOverflowItem]',\n exportAs: 'cngxTabOverflowItem',\n standalone: true,\n})\nexport class CngxTabOverflowItem {\n readonly templateRef = inject<TemplateRef<CngxTabOverflowItemContext>>(TemplateRef);\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\nimport type { CngxTabHandle } from '../tab-group-host.token';\n\n/**\n * Context for the `*cngxTabErrorBadge` template. Renders only when\n * the tab's `errorAggregator?.shouldShow()` is `true`; the visibility\n * gate stays library-owned. Sibling shape to `CngxStepBadgeContext`.\n *\n * @category common/tabs/slots\n */\nexport interface CngxTabErrorBadgeContext {\n /** The tab handle carrying id / label / disabled / aggregator signals. */\n readonly tab: CngxTabHandle;\n}\n\n/**\n * Structural slot for the error-badge template. 3-stage cascade:\n * per-instance directive >\n * `CNGX_TABS_CONFIG.templates.errorBadge` >\n * `CNGX_TABS_GLYPHS.errorBadge`.\n *\n * ```html\n * <cngx-tab-group>\n * <ng-template cngxTabErrorBadge let-tab=\"tab\">\n * <span class=\"my-badge-pill\">\n * {{ tab.errorAggregator()?.count() }}\n * </span>\n * </ng-template>\n * </cngx-tab-group>\n * ```\n *\n * @category common/tabs/slots\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/slots/tab-error-badge.directive.ts\n * @since 0.1.0\n * @relatedTo CngxTabRejectionIcon, CngxTabBusySpinner, CngxTab\n * <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-busy-spinner-via-code-cngxtabbusyspinner-code</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-error-badge-via-code-cngxtaberrorbadge-code</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/rejection-decoration-via-code-cngxtabrejectionicon-code</example-url>\n */\n@Directive({\n selector: 'ng-template[cngxTabErrorBadge]',\n exportAs: 'cngxTabErrorBadge',\n standalone: true,\n})\nexport class CngxTabErrorBadge {\n readonly templateRef = inject<TemplateRef<CngxTabErrorBadgeContext>>(\n TemplateRef,\n );\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Context for the `*cngxTabRejectionIcon` template. Renders only on\n * the tab matching `presenter.lastFailedIndex()`; the visibility\n * gate stays library-owned. `originLabel` is the safe-harbour tab,\n * derived from `presenter.originIndexDuringCommit()` - `undefined`\n * for the synchronous-rejection edge case. Sibling shape to\n * `CngxStepRejectionContext`.\n *\n * @category common/tabs/slots\n */\nexport interface CngxTabRejectionIconContext {\n /** Flat-index of the rejected tab (`presenter.lastFailedIndex()`). */\n readonly failedIndex: number;\n /** Resolved label of the safe-harbour tab, when derivable. */\n readonly originLabel: string | undefined;\n}\n\n/**\n * Structural slot for the rejection-decoration template. 3-stage\n * cascade: per-instance directive >\n * `CNGX_TABS_CONFIG.templates.rejectionIcon` >\n * `CNGX_TABS_GLYPHS.rejectionIcon`.\n *\n * ```html\n * <cngx-tab-group>\n * <ng-template\n * cngxTabRejectionIcon\n * let-failedIndex=\"failedIndex\"\n * let-originLabel=\"originLabel\"\n * >\n * <my-icon name=\"rollback\" />\n * @if (originLabel) {\n * <span class=\"cngx-sr-only\">Rolled back to {{ originLabel }}</span>\n * }\n * </ng-template>\n * </cngx-tab-group>\n * ```\n *\n * @category common/tabs/slots\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/slots/tab-rejection-icon.directive.ts\n * @since 0.1.0\n * @relatedTo CngxTabErrorBadge, CngxTabBusySpinner, CngxTab\n * <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-busy-spinner-via-code-cngxtabbusyspinner-code</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-error-badge-via-code-cngxtaberrorbadge-code</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/rejection-decoration-via-code-cngxtabrejectionicon-code</example-url>\n */\n@Directive({\n selector: 'ng-template[cngxTabRejectionIcon]',\n exportAs: 'cngxTabRejectionIcon',\n standalone: true,\n})\nexport class CngxTabRejectionIcon {\n readonly templateRef = inject<TemplateRef<CngxTabRejectionIconContext>>(TemplateRef);\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\nimport type { CngxTabHandle } from '../tab-group-host.token';\n\n/**\n * Context for the `*cngxTabBusySpinner` template. Renders only on\n * the in-flight commit target (matches `presenter.intendedIndex()`\n * with `commitState.status() === 'pending'`); the visibility gate\n * stays library-owned. `intendedIndex` is exposed so positional\n * variants (progress bars, step counters) read the same source.\n *\n * @category common/tabs/slots\n */\nexport interface CngxTabBusySpinnerContext {\n /** The tab handle carrying id / label / disabled / aggregator signals. */\n readonly tab: CngxTabHandle;\n /** The flat-index of the in-flight commit target. */\n readonly intendedIndex: number;\n}\n\n/**\n * Structural slot for the busy-spinner template. 3-stage cascade:\n * per-instance directive >\n * `CNGX_TABS_CONFIG.templates.busySpinner` > built-in pulse span.\n *\n * ```html\n * <cngx-tab-group>\n * <ng-template cngxTabBusySpinner>\n * <my-spinner size=\"sm\" />\n * </ng-template>\n * </cngx-tab-group>\n * ```\n *\n * @category common/tabs/slots\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/slots/tab-busy-spinner.directive.ts\n * @since 0.1.0\n * @relatedTo CngxTabErrorBadge, CngxTabRejectionIcon, CngxTab\n * <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-busy-spinner-via-code-cngxtabbusyspinner-code</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-error-badge-via-code-cngxtaberrorbadge-code</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/rejection-decoration-via-code-cngxtabrejectionicon-code</example-url>\n */\n@Directive({\n selector: 'ng-template[cngxTabBusySpinner]',\n exportAs: 'cngxTabBusySpinner',\n standalone: true,\n})\nexport class CngxTabBusySpinner {\n readonly templateRef = inject<TemplateRef<CngxTabBusySpinnerContext>>(\n TemplateRef,\n );\n}\n","import { computed, type Signal, type TemplateRef } from '@angular/core';\n\nimport type { CngxTabsConfig } from '../tabs-config';\nimport type {\n CngxTabBusySpinner,\n CngxTabBusySpinnerContext,\n} from './tab-busy-spinner.directive';\nimport type {\n CngxTabErrorBadge,\n CngxTabErrorBadgeContext,\n} from './tab-error-badge.directive';\nimport type {\n CngxTabRejectionIcon,\n CngxTabRejectionIconContext,\n} from './tab-rejection-icon.directive';\n\n/**\n * Inputs to {@link createTabGroupTemplateBindings}. The organism owns\n * the `contentChild()` queries (NG8110 — must run in component\n * injection context) and the resolved {@link CngxTabsConfig}; the\n * factory runs the 3-stage cascade per slot key. Sibling shape to\n * `createStepperTemplateBindings`.\n *\n * @category common/tabs/slots\n */\nexport interface CngxTabGroupTemplateBindingsOptions {\n readonly errorBadgeSlot: Signal<CngxTabErrorBadge | undefined>;\n readonly rejectionIconSlot: Signal<CngxTabRejectionIcon | undefined>;\n readonly busySpinnerSlot: Signal<CngxTabBusySpinner | undefined>;\n readonly config: CngxTabsConfig;\n}\n\n/**\n * Output of {@link createTabGroupTemplateBindings}. One resolved\n * `Signal<TemplateRef | null>` per slot; `null` means the organism\n * renders its built-in default.\n *\n * @category common/tabs/slots\n */\nexport interface CngxTabGroupTemplateBindings {\n readonly errorBadge: Signal<TemplateRef<CngxTabErrorBadgeContext> | null>;\n readonly rejectionIcon: Signal<\n TemplateRef<CngxTabRejectionIconContext> | null\n >;\n readonly busySpinner: Signal<TemplateRef<CngxTabBusySpinnerContext> | null>;\n}\n\n/**\n * Wires the 3-stage template cascade for the three `<cngx-tab-group>`\n * skin slots:\n * per-instance directive >\n * `CNGX_TABS_CONFIG.templates.<key>` >\n * `null` (built-in default).\n *\n * Pure — no DI, no side effects. Safe in field-init. Sibling to\n * `createStepperTemplateBindings` and `createTabOverflowTemplateBindings`.\n *\n * Single-consumer today: `[cngxMatTabs]` does not consume this —\n * Material owns the rendered tab-button chrome via its own MDC\n * template, leaving no DOM seam. See `tabs-accepted-debt §9`.\n *\n * @category common/tabs/slots\n */\nexport function createTabGroupTemplateBindings(\n opts: CngxTabGroupTemplateBindingsOptions,\n): CngxTabGroupTemplateBindings {\n return {\n errorBadge: computed<TemplateRef<CngxTabErrorBadgeContext> | null>(\n () =>\n opts.errorBadgeSlot()?.templateRef ??\n opts.config.templates?.errorBadge ??\n null,\n ),\n rejectionIcon: computed<TemplateRef<CngxTabRejectionIconContext> | null>(\n () =>\n opts.rejectionIconSlot()?.templateRef ??\n opts.config.templates?.rejectionIcon ??\n null,\n ),\n busySpinner: computed<TemplateRef<CngxTabBusySpinnerContext> | null>(\n () =>\n opts.busySpinnerSlot()?.templateRef ??\n opts.config.templates?.busySpinner ??\n null,\n ),\n };\n}\n","// Single-consumer factory — staged under family-uniformity\n// (tabs-accepted-debt §9, alongside `createTabGroupTemplateBindings`\n// and `CngxMatTabAggregatorContent`). Re-eval on second consumer or\n// sibling debt closure.\nimport { computed, linkedSignal, type Signal } from '@angular/core';\n\nimport type { CngxTabsConfig } from '../tabs-config';\nimport type { CngxTabsI18n } from '../i18n/tabs-i18n';\nimport type { CngxTabGroupHost, CngxTabHandle } from '../tab-group-host.token';\n\n/**\n * Inputs the announcements bundle reads from the host organism.\n * Passing presenter / i18n / config in (instead of re-injecting)\n * keeps the factory pure — one call returns the bundle, no\n * injection context required.\n *\n * @category common/tabs/announcements\n */\nexport interface CngxTabGroupAnnouncementsOptions {\n readonly presenter: CngxTabGroupHost;\n readonly i18n: CngxTabsI18n;\n readonly config: CngxTabsConfig;\n /** Per-instance `aria-label` Input on the organism. */\n readonly ariaLabel: Signal<string | undefined>;\n /** Per-instance `aria-labelledby` Input on the organism. */\n readonly ariaLabelledBy: Signal<string | undefined>;\n}\n\n/**\n * Resolved bundle returned by {@link createTabGroupAnnouncements}.\n * Host bindings and template outlets read these directly. Owns one\n * internal `linkedSignal` slot (prior-active-index tracker driving\n * the success-arm direction prefix); consumers never touch it.\n *\n * @category common/tabs/announcements\n */\nexport interface CngxTabGroupAnnouncements {\n /**\n * Tablist `aria-roledescription`. Cascades through\n * `CngxTabsFallbackLabels.tabRoleDescription` → `'tab list'`.\n * Distinct from `i18n.tabsLabel` (which feeds `aria-label`) so\n * AT does not read the same word twice.\n */\n readonly tabsRoleDescription: Signal<string>;\n\n /**\n * Tab-panel `aria-roledescription`. Cascades through\n * `CngxTabsFallbackLabels.tabPanelRoleDescription` → `'tab panel'`.\n */\n readonly tabPanelRoleDescription: Signal<string>;\n\n /**\n * Wrapper `aria-label`. Resolution: per-instance Input →\n * `ariaLabels.tabsRegion` → `i18n.tabsLabel`. Returns `null` when\n * `aria-labelledby` is bound (mutually exclusive per WAI-ARIA).\n */\n readonly resolvedAriaLabel: Signal<string | null>;\n\n /**\n * Polite live-region content — declarative, never an imperative\n * `announce()`. Empty between transitions so the region stays\n * quiet on no-op ticks.\n *\n * Error arm: `commitRolledBackTo(originLabel)` when origin\n * resolves; otherwise `commitFailedRetry`.\n *\n * Success arm: `${previousTab|nextTab}: selectedTab(...)` when\n * the index moved; bare `selectedTab(...)` when it didn't (initial\n * mount, or commit-success that lands on the same tab).\n */\n readonly liveAnnouncement: Signal<string>;\n\n /**\n * SR descriptor phrase for a tab's `cngx-sr-only` span.\n * `aggregator.announcement()` when bound + revealed; falls back\n * to `i18n.tabHasErrors(errorCount)` on empty; empty string when\n * nothing wants reveal. The span itself is always rendered (cngx\n * ARIA-by-value rule); this returns its content.\n */\n statusPhrase(tab: CngxTabHandle): string;\n\n /**\n * Verbose tab-button `aria-label` — `selectedTab(label, position,\n * count)` so AT hears \"Tab 2 of 5: Settings\" instead of inferring\n * position from tablist enumeration. The visual span keeps the\n * bare label.\n */\n tabAriaLabel(tab: CngxTabHandle, position: number): string;\n}\n\n/**\n * Pure factory bundling the `<cngx-tab-group>` AT-announcement +\n * descriptor surfaces. Owns one internal `linkedSignal`\n * (prior-active-index, drives the success-arm direction prefix) —\n * lazy by `linkedSignal` semantics, so the organism reads\n * `liveAnnouncement` once at construction to seed it.\n *\n * @category common/tabs/announcements\n */\nexport function createTabGroupAnnouncements(\n options: CngxTabGroupAnnouncementsOptions,\n): CngxTabGroupAnnouncements {\n const { presenter, i18n, config, ariaLabel, ariaLabelledBy } = options;\n\n const tabsRoleDescription = computed<string>(\n () => config.fallbackLabels?.tabRoleDescription ?? 'tab list',\n );\n\n const tabPanelRoleDescription = computed<string>(\n () => config.fallbackLabels?.tabPanelRoleDescription ?? 'tab panel',\n );\n\n const resolvedAriaLabel = computed<string | null>(() => {\n if (ariaLabelledBy()) {\n return null;\n }\n return ariaLabel() ?? config.ariaLabels?.tabsRegion ?? i18n.tabsLabel;\n });\n\n // `prev?.source` = source value before the most recent change —\n // prior activeIndex without an `effect`-driven slot (Pillar 1).\n // Coalesce to current on first emission.\n const priorActiveIndex = linkedSignal<number, number>({\n source: () => presenter.activeIndex(),\n computation: (curr, prev) => prev?.source ?? curr,\n equal: Object.is,\n });\n\n const liveAnnouncement = computed<string>(() => {\n const current = presenter.commitTransition.current();\n if (current === 'pending') {\n return i18n.commitInFlight;\n }\n if (current === 'error') {\n // No `previous === 'pending'` guard — sync rejections collapse\n // pending → error in one flush, so the tracker captures\n // `previous = 'idle'` and an unguarded read keeps the\n // announcement reachable for `commitAction = () => false`.\n const failedIdx = presenter.lastFailedIndex();\n const originIdx = presenter.originIndexDuringCommit();\n if (failedIdx !== undefined && originIdx !== undefined) {\n const originLabel = presenter.tabs()[originIdx]?.label();\n if (originLabel) {\n return i18n.commitRolledBackTo(originLabel);\n }\n }\n return i18n.commitFailedRetry;\n }\n if (current === 'success') {\n const tabs = presenter.tabs();\n const idx = presenter.activeIndex();\n const tab = tabs[idx];\n if (!tab) {\n return '';\n }\n const label = tab.label() ?? '';\n const positionPhrase = i18n.selectedTab(label, idx + 1, tabs.length);\n const prevIdx = priorActiveIndex();\n if (idx > prevIdx) {\n return `${i18n.nextTab}: ${positionPhrase}`;\n }\n if (idx < prevIdx) {\n return `${i18n.previousTab}: ${positionPhrase}`;\n }\n return positionPhrase;\n }\n return '';\n });\n\n function statusPhrase(tab: CngxTabHandle): string {\n const aggregator = tab.errorAggregator();\n if (!aggregator?.shouldShow()) {\n return '';\n }\n const announcement = aggregator.announcement();\n if (announcement) {\n return announcement;\n }\n return i18n.tabHasErrors(aggregator.errorCount());\n }\n\n function tabAriaLabel(tab: CngxTabHandle, position: number): string {\n const tabs = presenter.tabs();\n return i18n.selectedTab(tab.label() ?? '', position, tabs.length);\n }\n\n // Eager seed — `linkedSignal` is lazy and the success arm doesn't\n // touch the tracker at construction (commitTransition is `idle`),\n // so without this read `prev?.source` is undefined on the first\n // nav and the direction prefix is silently lost.\n priorActiveIndex();\n\n return {\n tabsRoleDescription,\n tabPanelRoleDescription,\n resolvedAriaLabel,\n liveAnnouncement,\n statusPhrase,\n tabAriaLabel,\n };\n}\n","/**\n * Default glyph fallbacks for `<cngx-tab-group>` skin slots. Read by\n * the organism when neither a per-instance slot directive nor\n * `CNGX_TABS_CONFIG.templates.<key>` is bound. Sibling to\n * `CNGX_SELECT_GLYPHS` and `CNGX_STEPPER_GLYPHS`. Exported because\n * Sheriff forbids deep-relative imports across library boundaries;\n * `@internal` enforces consumer intent. Consumers customise via slot\n * directives or `withTab*Template` config features.\n *\n * @internal\n * @category common/tabs\n */\nexport const CNGX_TABS_GLYPHS = {\n /** Default visual for `*cngxTabErrorBadge` when no override is bound. */\n errorBadge: '!',\n /** Default visual for `*cngxTabRejectionIcon` when no override is bound. */\n rejectionIcon: '!',\n} as const;\n","import {\n effect,\n InjectionToken,\n untracked,\n type Signal,\n computed,\n type TemplateRef,\n} from '@angular/core';\n\nimport type { ActiveDescendantItem, CngxActiveDescendant } from '@cngx/common/a11y';\nimport type { CngxPopover } from '@cngx/common/popover';\n\nimport type { CngxTabHandle } from '../tab-group-host.token';\nimport type { CngxTabsConfig } from '../tabs-config';\nimport type {\n CngxTabOverflowItem,\n CngxTabOverflowItemContext,\n} from './tab-overflow-item.directive';\nimport type {\n CngxTabOverflowTrigger,\n CngxTabOverflowTriggerContext,\n} from './tab-overflow-trigger.directive';\n\n/**\n * DOM `id` for a hidden-tab option row in the overflow listbox.\n * Stable across CD passes so `aria-activedescendant` resolves to\n * the same `<li>`. `-overflow-option` suffix avoids collision with\n * the strip-button (`-header`) and per-tab descriptor (`-desc`).\n *\n * @category common/tabs/overflow\n */\nexport function tabOverflowOptionId(tab: CngxTabHandle): string {\n return `${tab.id}-overflow-option`;\n}\n\n/**\n * Inputs to {@link createTabOverflowTemplateBindings}. The molecule\n * runs the `contentChild()` queries (injection-context-only) and\n * supplies the reactive sources; the factory owns cascade\n * resolution and per-context builders.\n *\n * @category common/tabs/overflow\n */\nexport interface CngxTabOverflowTemplateBindingsOptions {\n /** `contentChild(CngxTabOverflowTrigger)` from the molecule. */\n readonly triggerSlot: Signal<CngxTabOverflowTrigger | undefined>;\n /** `contentChild(CngxTabOverflowItem)` from the molecule. */\n readonly itemSlot: Signal<CngxTabOverflowItem | undefined>;\n /** Resolved {@link CngxTabsConfig} (the middle cascade tier). */\n readonly config: CngxTabsConfig;\n /** Live count of hidden tabs (drives `triggerContext.count`). */\n readonly hiddenCount: Signal<number>;\n /** Live hidden-tab list (drives `triggerContext.hiddenTabs`). */\n readonly hiddenTabs: Signal<readonly CngxTabHandle[]>;\n /** Commit-aware select callback - invoked from `itemContext.pick`. */\n readonly pickTab: (tab: CngxTabHandle) => void;\n}\n\n/**\n * Output of {@link createTabOverflowTemplateBindings}. Carries the two\n * resolved templates plus a stable trigger-context signal and an\n * imperative item-context builder.\n *\n * @category common/tabs/overflow\n */\nexport interface CngxTabOverflowTemplateBindings {\n readonly triggerTemplate: Signal<TemplateRef<CngxTabOverflowTriggerContext> | null>;\n readonly itemTemplate: Signal<TemplateRef<CngxTabOverflowItemContext> | null>;\n readonly triggerContext: Signal<CngxTabOverflowTriggerContext>;\n readonly buildItemContext: (tab: CngxTabHandle, index: number) => CngxTabOverflowItemContext;\n /**\n * `ActiveDescendantItem[]` projection of `hiddenTabs()` for\n * `CngxActiveDescendant.items`. Each entry's `id` matches the\n * row's `<li>` (see {@link tabOverflowOptionId}); `value` carries\n * the tab handle so AD's `(activated)` payload casts back without\n * a registry lookup. Structural equal guards against no-op IO\n * cascades. Mutable array shape because\n * `CngxActiveDescendant.items` declares the input that way; the\n * array is rebuilt each computed run so callers can't mutate the\n * live source.\n */\n readonly adItems: Signal<ActiveDescendantItem[]>;\n}\n\n/**\n * Structural equal - same `count` + same `hiddenTabs` reference.\n * The upstream `hiddenTabs` signal already uses `tabIdListEqual`,\n * so this guard stops `ngTemplateOutlet` rebinding on shape-stable\n * IO emissions.\n *\n * @internal\n */\nfunction triggerContextEqual(\n a: CngxTabOverflowTriggerContext,\n b: CngxTabOverflowTriggerContext,\n): boolean {\n return a.count === b.count && a.hiddenTabs === b.hiddenTabs;\n}\n\n/**\n * Structural equal - same length + per-index `id` and `disabled`.\n * Without this, every IO emission yields fresh\n * `ActiveDescendantItem[]` references and AD's `resolvedItems`\n * cascade fires for an unchanged visible-tab set.\n *\n * @internal\n */\nfunction adItemsEqual(a: ActiveDescendantItem[], b: ActiveDescendantItem[]): boolean {\n if (a === b) {\n return true;\n }\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; i++) {\n if (a[i].id !== b[i].id || a[i].disabled !== b[i].disabled) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Wires the 3-stage template cascade for the overflow molecule's\n * two visible regions: per-instance directive >\n * `CNGX_TABS_CONFIG.templates.overflow*` > built-in markup\n * (template-outlet returns `null`).\n *\n * Pure - no DI, no side effects, no destroy hooks. Safe to call\n * from a component's field-init block. Mirrors the select-family\n * `createTemplateRegistry` pattern.\n *\n * @category common/tabs/overflow\n */\nexport function createTabOverflowTemplateBindings(\n opts: CngxTabOverflowTemplateBindingsOptions,\n): CngxTabOverflowTemplateBindings {\n const triggerTemplate = computed<TemplateRef<CngxTabOverflowTriggerContext> | null>(\n () => opts.triggerSlot()?.templateRef ?? opts.config.templates?.overflowTrigger ?? null,\n );\n const itemTemplate = computed<TemplateRef<CngxTabOverflowItemContext> | null>(\n () => opts.itemSlot()?.templateRef ?? opts.config.templates?.overflowItem ?? null,\n );\n const triggerContext = computed<CngxTabOverflowTriggerContext>(\n () => {\n const count = opts.hiddenCount();\n const hiddenTabs = opts.hiddenTabs();\n return { $implicit: count, count, hiddenTabs };\n },\n { equal: triggerContextEqual },\n );\n // Per-row context cache - stable context + closure-captured `pick`\n // per `tab` so `ngTemplateOutlet` doesn't re-bind the embedded view\n // unless `index` or `disabled` actually changed. WeakMap so\n // detached handles GC. Mirrors `CngxTreeSelectPanel.nodeContext`.\n interface CachedRow {\n readonly context: CngxTabOverflowItemContext;\n readonly disabled: boolean;\n readonly index: number;\n }\n const itemContextCache = new WeakMap<CngxTabHandle, CachedRow>();\n const buildItemContext = (tab: CngxTabHandle, index: number): CngxTabOverflowItemContext => {\n const disabled = tab.disabled();\n const cached = itemContextCache.get(tab);\n if (cached?.disabled === disabled && cached?.index === index) {\n return cached.context;\n }\n const context: CngxTabOverflowItemContext = {\n $implicit: tab,\n tab,\n pick: () => opts.pickTab(tab),\n disabled,\n index,\n };\n itemContextCache.set(tab, { context, disabled, index });\n return context;\n };\n const adItems = computed<ActiveDescendantItem[]>(\n () =>\n opts.hiddenTabs().map((tab) => ({\n id: tabOverflowOptionId(tab),\n value: tab,\n label: tab.label() ?? tab.id,\n disabled: tab.disabled(),\n })),\n { equal: adItemsEqual },\n );\n return {\n triggerTemplate,\n itemTemplate,\n triggerContext,\n buildItemContext,\n adItems,\n };\n}\n\n/**\n * Resets the AD highlight on popover close. Keyboard-open paths\n * (ArrowDown / End / typeahead on the closed trigger) set\n * `activeIndex` via AD's own keydown listener before opening -\n * unaffected. Mouse-open leaves `activeIndex === -1` so the popover\n * renders unhighlighted. Without this reset, the next open would\n * inherit a stale index from the prior keyboard session.\n *\n * Must run in injection context.\n *\n * @category common/tabs/overflow\n */\nexport function createOverflowPopoverHighlightSync(\n popover: Signal<CngxPopover>,\n ad: Signal<CngxActiveDescendant>,\n): void {\n effect(() => {\n const visible = popover().isVisible();\n untracked(() => {\n if (!visible) {\n ad().resetHighlight();\n }\n });\n });\n}\n\n/**\n * Factory signature for {@link CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY}.\n *\n * @category common/tabs/overflow\n */\nexport type CngxOverflowPopoverHighlightSyncFactory = (\n popover: Signal<CngxPopover>,\n ad: Signal<CngxActiveDescendant>,\n) => void;\n\n/**\n * DI token for the overflow popover highlight-sync policy.\n * Default {@link createOverflowPopoverHighlightSync}. Override via\n * `providers` / `viewProviders` for last-index preservation,\n * telemetry on close, custom highlight rules. Symmetric to\n * `CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY` and\n * `CNGX_TABS_COMMIT_HANDLER_FACTORY`.\n *\n * @category common/tabs/overflow\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/overflow/overflow-template-cascade.ts\n * @since 0.1.0\n */\nexport const CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY =\n new InjectionToken<CngxOverflowPopoverHighlightSyncFactory>(\n 'CngxOverflowPopoverHighlightSyncFactory',\n {\n providedIn: 'root',\n factory: () => createOverflowPopoverHighlightSync,\n },\n );\n","import {\n effect,\n InjectionToken,\n type Injector,\n runInInjectionContext,\n type Signal,\n untracked,\n} from '@angular/core';\n\n/**\n * Options for {@link createOrganismScrollSync}.\n *\n * @category common/tabs/scroll-sync\n */\nexport interface CngxOrganismScrollSyncOptions {\n /** Reactive source for the active item id; tracked by the effect. */\n readonly activeId: Signal<string | null>;\n /**\n * Host element containing the per-item buttons. Items must carry\n * `id=\"${itemId}-header\"` - the convention used by\n * `<cngx-tab-group>` and `<cngx-stepper>`.\n */\n readonly hostElement: HTMLElement;\n /**\n * Forwarded to `Element.scrollIntoView`. Default: smooth-center\n * along the inline axis. Override for vertical or instant scroll.\n */\n readonly scrollOptions?: ScrollIntoViewOptions;\n /** Injector for installing the effect. */\n readonly injector: Injector;\n}\n\nconst DEFAULT_SCROLL_OPTIONS: ScrollIntoViewOptions = {\n behavior: 'smooth',\n block: 'nearest',\n inline: 'center',\n};\n\n/**\n * Scroll-into-view effect for any strip-based organism (tabs,\n * stepper headers, future scrolling lists). Tracks `activeId` and\n * scrolls the matching `[id=\"<itemId>-header\"]` into view.\n *\n * The DOM call sits in `untracked()` (only `activeId` is tracked).\n * `scrollIntoView` is missing in jsdom - guarded with optional chain.\n *\n * @category common/tabs/scroll-sync\n */\nexport function createOrganismScrollSync(opts: CngxOrganismScrollSyncOptions): void {\n const { activeId, hostElement, scrollOptions, injector } = opts;\n const resolvedOptions = scrollOptions ?? DEFAULT_SCROLL_OPTIONS;\n\n runInInjectionContext(injector, () => {\n effect(() => {\n const id = activeId();\n if (!id) {\n return;\n }\n untracked(() => {\n const button = hostElement.querySelector<HTMLElement>(`[id=\"${id}-header\"]`);\n button?.scrollIntoView?.(resolvedOptions);\n });\n });\n });\n}\n\n/**\n * Factory signature for {@link CNGX_ORGANISM_SCROLL_SYNC_FACTORY}.\n *\n * @category common/tabs/scroll-sync\n */\nexport type CngxOrganismScrollSyncFactory = (opts: CngxOrganismScrollSyncOptions) => void;\n\n/**\n * DI token for the active-item scroll-into-view policy. Defaults to\n * {@link createOrganismScrollSync}. Override for instant scroll,\n * custom selector, telemetry, or `prefers-reduced-motion` opt-out.\n * Sibling to `CNGX_DOM_ANCHOR_RETRY_FACTORY` and\n * `CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY`.\n *\n * @category common/tabs/scroll-sync\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/scroll-sync/organism-scroll-sync.ts\n * @since 0.1.0\n */\nexport const CNGX_ORGANISM_SCROLL_SYNC_FACTORY = new InjectionToken<CngxOrganismScrollSyncFactory>(\n 'CngxOrganismScrollSyncFactory',\n {\n providedIn: 'root',\n factory: () => createOrganismScrollSync,\n },\n);\n","import { computed, InjectionToken, type Signal } from '@angular/core';\n\n/**\n * Structural equal for `Map<string, T>` (size + same value reference\n * per key, via `Object.is`).\n *\n * @internal\n */\nfunction directiveMapEqual<T>(a: Map<string, T>, b: Map<string, T>): boolean {\n if (a === b) {\n return true;\n }\n if (a.size !== b.size) {\n return false;\n }\n for (const [id, dir] of a) {\n if (b.get(id) !== dir) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Options for {@link createDirectiveByIdMap}.\n *\n * @category common/tabs/registry\n */\nexport interface CngxDirectiveByIdMapOptions<T extends { id: () => string }> {\n /** Reactive source - typically `contentChildren(...)`. */\n readonly source: Signal<readonly T[]>;\n}\n\n/**\n * Build a `Signal<Map<string, T>>` from a `Signal<readonly T[]>` of\n * directives keyed by `id()`. Structural equal prevents cascade when\n * `contentChildren` re-emits an unchanged child set. Shared by\n * `<cngx-tab-group>`, `<cngx-stepper>`, and `<cngx-mat-stepper>`.\n *\n * @category common/tabs/registry\n */\nexport function createDirectiveByIdMap<T extends { id: () => string }>(\n opts: CngxDirectiveByIdMapOptions<T>,\n): Signal<Map<string, T>> {\n return computed<Map<string, T>>(\n () => {\n const map = new Map<string, T>();\n for (const dir of opts.source()) {\n map.set(dir.id(), dir);\n }\n return map;\n },\n { equal: directiveMapEqual },\n );\n}\n\n/**\n * Factory signature for {@link CNGX_DIRECTIVE_BY_ID_MAP_FACTORY}.\n *\n * @category common/tabs/registry\n */\nexport type CngxDirectiveByIdMapFactory = <T extends { id: () => string }>(\n opts: CngxDirectiveByIdMapOptions<T>,\n) => Signal<Map<string, T>>;\n\n/**\n * DI token for the per-id directive-resolution policy. Defaults to\n * {@link createDirectiveByIdMap}. Override for WeakMap resolution,\n * telemetry, or custom equality. Sibling to\n * `CNGX_DOM_ANCHOR_RETRY_FACTORY` and\n * `CNGX_ORGANISM_SCROLL_SYNC_FACTORY`.\n *\n * @category common/tabs/registry\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/registry/directive-by-id-map.ts\n * @since 0.1.0\n */\nexport const CNGX_DIRECTIVE_BY_ID_MAP_FACTORY = new InjectionToken<CngxDirectiveByIdMapFactory>(\n 'CngxDirectiveByIdMapFactory',\n {\n providedIn: 'root',\n factory: () => createDirectiveByIdMap,\n },\n);\n","/**\n * @module @cngx/common/tabs\n */\nexport {\n CngxTabGroupPresenter,\n type CngxTabsCommitAction,\n} from './presenter.directive';\nexport {\n CNGX_TAB_GROUP_HOST,\n type CngxTabGroupHost,\n type CngxTabHandle,\n} from './tab-group-host.token';\nexport {\n CNGX_TAB_PANEL_HOST,\n type CngxTabPanelHost,\n} from './tab-panel-host.token';\nexport { CngxTab } from './tab.directive';\nexport { CngxTabLabel } from './tab-label.directive';\nexport { CngxTabContent } from './tab-content.directive';\nexport { CngxTabsFragmentSync } from './router-sync.directive';\nexport {\n CNGX_TABS_CONFIG,\n injectTabsConfig,\n provideTabsConfig,\n provideTabsConfigAt,\n withDefaultOrientation,\n withTabBusySpinnerTemplate,\n withTabErrorBadgeTemplate,\n withTabOverflowItemTemplate,\n withTabOverflowMaxDeferMs,\n withTabOverflowStabilizeMs,\n withTabOverflowTriggerTemplate,\n withTabRejectionIconTemplate,\n withTabsAriaLabels,\n withTabsCommitMode,\n withTabsDefaultOrientation,\n withTabsFallbackLabels,\n withTabsRouterSync,\n withTabsRovingLoop,\n type CngxTabsAriaLabels,\n type CngxTabsConfig,\n type CngxTabsConfigFeature,\n type CngxTabsFallbackLabels,\n type CngxTabsTemplates,\n} from './tabs-config';\nexport {\n provideCngxTabs,\n provideCngxTabsAt,\n type CngxTabsFeature,\n} from './provide-cngx-tabs';\nexport {\n CNGX_TABS_I18N,\n injectTabsI18n,\n provideTabsI18n,\n withTabsI18nLabels,\n type CngxTabsI18n,\n type CngxTabsI18nFeature,\n} from './i18n/tabs-i18n';\nexport {\n createTabsCommitHandler,\n CNGX_TABS_COMMIT_HANDLER_FACTORY,\n type CngxTabsCommitHandler,\n type CngxTabsCommitHandlerFactory,\n type CngxTabsCommitHandlerOptions,\n} from './commit-handler';\nexport {\n CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY,\n createCngxTabOverflowDefaultDomAdapter,\n type CngxTabOverflowDomAdapter,\n type CngxTabOverflowDomAdapterFactory,\n} from './overflow/dom-adapter';\nexport {\n CNGX_DOM_ANCHOR_RETRY_FACTORY,\n createDomAnchorRetry,\n type CngxDomAnchorRetryFactory,\n type CngxDomAnchorRetryHandle,\n type CngxDomAnchorRetryOptions,\n type CngxDomAnchorRetryResult,\n} from './overflow/dom-anchor-retry';\nexport {\n CngxTabOverflowTrigger,\n type CngxTabOverflowTriggerContext,\n} from './overflow/tab-overflow-trigger.directive';\nexport {\n CngxTabOverflowItem,\n type CngxTabOverflowItemContext,\n} from './overflow/tab-overflow-item.directive';\nexport {\n CngxTabErrorBadge,\n type CngxTabErrorBadgeContext,\n} from './slots/tab-error-badge.directive';\nexport {\n CngxTabRejectionIcon,\n type CngxTabRejectionIconContext,\n} from './slots/tab-rejection-icon.directive';\nexport {\n CngxTabBusySpinner,\n type CngxTabBusySpinnerContext,\n} from './slots/tab-busy-spinner.directive';\nexport {\n createTabGroupTemplateBindings,\n type CngxTabGroupTemplateBindings,\n type CngxTabGroupTemplateBindingsOptions,\n} from './slots/tab-group-template-cascade';\nexport {\n createTabGroupAnnouncements,\n type CngxTabGroupAnnouncements,\n type CngxTabGroupAnnouncementsOptions,\n} from './announcements/tab-group-announcements';\nexport { CNGX_TABS_GLYPHS } from './glyphs';\nexport {\n CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY,\n createOverflowPopoverHighlightSync,\n createTabOverflowTemplateBindings,\n tabOverflowOptionId,\n type CngxOverflowPopoverHighlightSyncFactory,\n type CngxTabOverflowTemplateBindings,\n type CngxTabOverflowTemplateBindingsOptions,\n} from './overflow/overflow-template-cascade';\n\nexport {\n CNGX_ORGANISM_SCROLL_SYNC_FACTORY,\n createOrganismScrollSync,\n type CngxOrganismScrollSyncFactory,\n type CngxOrganismScrollSyncOptions,\n} from './scroll-sync/organism-scroll-sync';\nexport {\n CNGX_DIRECTIVE_BY_ID_MAP_FACTORY,\n createDirectiveByIdMap,\n type CngxDirectiveByIdMapFactory,\n type CngxDirectiveByIdMapOptions,\n} from './registry/directive-by-id-map';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AA4CA;;;;;;AAMG;AACG,SAAU,uBAAuB,CAAC,IAAkC,EAAA;AACxE,IAAA,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI;IAC3B,OAAO;QACL,YAAY,EAAE,UAAU,CAAC,YAAY;AAErC,QAAA,eAAe,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAA;YACnD,UAAU,CAAC,KAAK,CACd,CAAC,QAAQ,KAAK,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,EACjE,OAAO,EACP,SAAS,EACT;AACE,gBAAA,SAAS,EAAE,MAAM,SAAS,CAAC,IAAI,CAAC;AAChC,gBAAA,OA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