@cngx/common 0.0.1-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.
- package/LICENSE +21 -0
- package/README.md +18 -0
- package/a11y/README.md +77 -0
- package/card/README.md +79 -0
- package/chart/README.md +31 -0
- package/data/README.md +883 -0
- package/dialog/README.md +84 -0
- package/display/README.md +30 -0
- package/fesm2022/cngx-common-a11y.mjs +1260 -0
- package/fesm2022/cngx-common-a11y.mjs.map +1 -0
- package/fesm2022/cngx-common-card.mjs +765 -0
- package/fesm2022/cngx-common-card.mjs.map +1 -0
- package/fesm2022/cngx-common-chart.mjs +2943 -0
- package/fesm2022/cngx-common-chart.mjs.map +1 -0
- package/fesm2022/cngx-common-data.mjs +2886 -0
- package/fesm2022/cngx-common-data.mjs.map +1 -0
- package/fesm2022/cngx-common-dialog.mjs +1366 -0
- package/fesm2022/cngx-common-dialog.mjs.map +1 -0
- package/fesm2022/cngx-common-display.mjs +1603 -0
- package/fesm2022/cngx-common-display.mjs.map +1 -0
- package/fesm2022/cngx-common-interactive.mjs +8185 -0
- package/fesm2022/cngx-common-interactive.mjs.map +1 -0
- package/fesm2022/cngx-common-layout.mjs +1335 -0
- package/fesm2022/cngx-common-layout.mjs.map +1 -0
- package/fesm2022/cngx-common-popover.mjs +1200 -0
- package/fesm2022/cngx-common-popover.mjs.map +1 -0
- package/fesm2022/cngx-common-stepper.mjs +1350 -0
- package/fesm2022/cngx-common-stepper.mjs.map +1 -0
- package/fesm2022/cngx-common-tabs.mjs +1551 -0
- package/fesm2022/cngx-common-tabs.mjs.map +1 -0
- package/fesm2022/cngx-common.mjs +34 -0
- package/fesm2022/cngx-common.mjs.map +1 -0
- package/interactive/README.md +211 -0
- package/layout/README.md +117 -0
- package/package.json +100 -0
- package/popover/README.md +218 -0
- package/stepper/README.md +102 -0
- package/tabs/README.md +32 -0
- package/types/cngx-common-a11y.d.ts +616 -0
- package/types/cngx-common-card.d.ts +413 -0
- package/types/cngx-common-chart.d.ts +1081 -0
- package/types/cngx-common-data.d.ts +1460 -0
- package/types/cngx-common-dialog.d.ts +772 -0
- package/types/cngx-common-display.d.ts +1136 -0
- package/types/cngx-common-interactive.d.ts +5013 -0
- package/types/cngx-common-layout.d.ts +737 -0
- package/types/cngx-common-popover.d.ts +520 -0
- package/types/cngx-common-stepper.d.ts +982 -0
- package/types/cngx-common-tabs.d.ts +1237 -0
- package/types/cngx-common.d.ts +13 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cngx-common-stepper.mjs","sources":["../../../projects/common/stepper/commit-handler.ts","../../../projects/common/stepper/stepper-config.ts","../../../projects/common/stepper/stepper-host.token.ts","../../../projects/common/stepper/step-tree.util.ts","../../../projects/common/stepper/presenter.directive.ts","../../../projects/common/stepper/step-group-host.token.ts","../../../projects/common/stepper/step-panel-host.token.ts","../../../projects/common/stepper/step-content.directive.ts","../../../projects/common/stepper/step-label.directive.ts","../../../projects/common/stepper/step.directive.ts","../../../projects/common/stepper/step-group.directive.ts","../../../projects/common/stepper/slots/step-indicator.directive.ts","../../../projects/common/stepper/slots/step-badge.directive.ts","../../../projects/common/stepper/slots/step-busy-spinner.directive.ts","../../../projects/common/stepper/slots/step-rejection.directive.ts","../../../projects/common/stepper/slots/step-group-header.directive.ts","../../../projects/common/stepper/slots/stepper-empty.directive.ts","../../../projects/common/stepper/slots/stepper-template-cascade.ts","../../../projects/common/stepper/glyphs.ts","../../../projects/common/stepper/router-sync.directive.ts","../../../projects/common/stepper/i18n/stepper-i18n.ts","../../../projects/common/stepper/provide-cngx-stepper.ts","../../../projects/common/stepper/public-api.ts","../../../projects/common/stepper/cngx-common-stepper.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 { CngxStepperCommitAction } from './presenter.directive';\n\n/**\n * Adapter between the lifted commit-controller and the stepper's\n * action shape. The presenter delegates to `beginTransition` on\n * every step change driven by `commitAction`.\n */\nexport interface CngxStepperCommitHandler {\n /**\n * Start a transition commit. Returns synchronously; the controller's\n * `state` signal reports the in-flight status.\n *\n * @param onResolve fires `true` on accept, `false` on rejection;\n * skipped on supersede.\n */\n beginTransition(\n fromIndex: number,\n toIndex: number,\n action: CngxStepperCommitAction,\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 createStepperCommitHandler}.\n */\nexport interface CngxStepperCommitHandlerOptions {\n readonly controller: CngxCommitController<number>;\n}\n\n/**\n * Build a stepper commit handler over an existing {@link CngxCommitController}.\n * Resolves `Observable<boolean>` / `Promise<boolean>` / `boolean` returns into\n * a unified `accept: boolean` outcome.\n */\nexport function createStepperCommitHandler(\n opts: CngxStepperCommitHandlerOptions,\n): CngxStepperCommitHandler {\n const { controller } = opts;\n return {\n isCommitting: controller.isCommitting,\n\n beginTransition(fromIndex, toIndex, action, onResolve) {\n controller.begin(\n (handlers) => runStepperAction(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 runStepperAction(\n action: CngxStepperCommitAction,\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('Stepper 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 { cancel: () => { cancelled = true; } };\n }\n\n if (isObservable(result)) {\n // Synchronous Observables (`of(true)`) emit inside `.subscribe`\n // before the assignment binds — `sub` would be in TDZ. Declare\n // the handle on a `let` first.\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 CngxStepperCommitHandler}. Override\n * {@link CNGX_STEPPER_COMMIT_HANDLER_FACTORY} for retry-with-backoff,\n * telemetry, or offline queues.\n */\nexport type CngxStepperCommitHandlerFactory = (\n opts: CngxStepperCommitHandlerOptions,\n) => CngxStepperCommitHandler;\n\n/**\n * DI token carrying the factory the presenter uses to allocate its commit\n * handler. Symmetric to the select family's `CNGX_ARRAY_COMMIT_HANDLER_FACTORY`.\n */\nexport const CNGX_STEPPER_COMMIT_HANDLER_FACTORY =\n new InjectionToken<CngxStepperCommitHandlerFactory>(\n 'CngxStepperCommitHandlerFactory',\n {\n providedIn: 'root',\n factory: () => createStepperCommitHandler,\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 { CngxStepBadgeContext } from './slots/step-badge.directive';\nimport type { CngxStepBusySpinnerContext } from './slots/step-busy-spinner.directive';\nimport type { CngxStepGroupHeaderContext } from './slots/step-group-header.directive';\nimport type { CngxStepIndicatorContext } from './slots/step-indicator.directive';\nimport type { CngxStepRejectionContext } from './slots/step-rejection.directive';\n\n/**\n * Aria-label overrides for the stepper landmark region. Library\n * defaults are English; locales come from consumer overrides.\n *\n * Per-step navigation labels (`previousStep`, `nextStep`) live in\n * {@link CngxStepperI18n} — SR phrasing, not landmark naming.\n * Splitting the surfaces avoids a dual-override path for the same string.\n */\nexport interface CngxStepperAriaLabels {\n readonly stepperRegion?: string;\n}\n\n/**\n * Fallback labels for derived strings (group descriptors, badge SR\n * announcements). English defaults; consumer overrides per locale.\n */\nexport interface CngxStepperFallbackLabels {\n readonly groupRoleDescription?: string;\n readonly stepRoleDescription?: string;\n}\n\n/**\n * Per-slot template overrides for `<cngx-stepper>`. Middle tier of\n * the 3-stage cascade: per-instance directive > this field > built-in\n * markup. Apply via the `with*Template` feature builders below.\n */\nexport interface CngxStepperTemplates {\n readonly indicator?: TemplateRef<CngxStepIndicatorContext>;\n readonly badge?: TemplateRef<CngxStepBadgeContext>;\n readonly busySpinner?: TemplateRef<CngxStepBusySpinnerContext>;\n readonly rejection?: TemplateRef<CngxStepRejectionContext>;\n readonly groupHeader?: TemplateRef<CngxStepGroupHeaderContext>;\n readonly empty?: TemplateRef<void>;\n}\n\n/**\n * Stepper config surface. Resolution priority: per-instance Input\n * > `provideStepperConfigAt` (viewProviders) > `provideStepperConfig`\n * (root) > library default. Canonical cngx config shape.\n */\nexport interface CngxStepperConfig {\n readonly defaultOrientation?: 'horizontal' | 'vertical';\n readonly defaultLinear?: boolean;\n readonly defaultCommitMode?: 'optimistic' | 'pessimistic';\n readonly routerSyncMode?: 'fragment' | 'queryParam';\n readonly routerSyncParam?: string;\n readonly ariaLabels?: CngxStepperAriaLabels;\n readonly fallbackLabels?: CngxStepperFallbackLabels;\n readonly templates?: CngxStepperTemplates;\n}\n\nconst STEPPER_CONFIG_DEFAULTS: Required<\n Omit<CngxStepperConfig, 'ariaLabels' | 'fallbackLabels' | 'templates'>\n> & {\n ariaLabels: CngxStepperAriaLabels;\n fallbackLabels: CngxStepperFallbackLabels;\n templates: CngxStepperTemplates;\n} = {\n defaultOrientation: 'horizontal',\n defaultLinear: false,\n defaultCommitMode: 'pessimistic',\n routerSyncMode: 'fragment',\n routerSyncParam: 'step',\n ariaLabels: {\n stepperRegion: 'Stepper',\n },\n fallbackLabels: {\n groupRoleDescription: 'step group',\n stepRoleDescription: 'stepper',\n },\n templates: {},\n};\n\n/**\n * DI token for the resolved stepper config. `providedIn: 'root'` with\n * library defaults; override via {@link provideStepperConfig} (root)\n * or {@link provideStepperConfigAt} (component scope).\n */\nexport const CNGX_STEPPER_CONFIG = new InjectionToken<CngxStepperConfig>(\n 'CngxStepperConfig',\n { providedIn: 'root', factory: () => STEPPER_CONFIG_DEFAULTS },\n);\n\n/**\n * Feature signature — each `with*` builder reduces over the config.\n * Hidden `_target: 'config'` discriminator routes through the family\n * aggregator {@link provideCngxStepper}.\n */\nexport type CngxStepperConfigFeature = ((\n config: CngxStepperConfig,\n) => CngxStepperConfig) & {\n readonly _target: 'config';\n};\n\n/**\n * Brands a config mutator with `_target: 'config'`. Every `with*`\n * config feature returns one of these.\n *\n * @internal\n */\nfunction defineStepperConfigFeature(\n fn: (config: CngxStepperConfig) => CngxStepperConfig,\n): CngxStepperConfigFeature {\n return Object.assign(fn, { _target: 'config' as const });\n}\n\n/**\n * Override the default orientation. Per-instance `[orientation]`\n * Input still wins; this only moves the cascade default.\n */\nexport function withStepperDefaultOrientation(\n orientation: 'horizontal' | 'vertical',\n): CngxStepperConfigFeature {\n return defineStepperConfigFeature((cfg) => ({\n ...cfg,\n defaultOrientation: orientation,\n }));\n}\n\n/**\n * Override the default linear-progression setting. Per-instance\n * `[linear]` Input still wins.\n */\nexport function withStepperLinear(linear: boolean): CngxStepperConfigFeature {\n return defineStepperConfigFeature((cfg) => ({ ...cfg, defaultLinear: linear }));\n}\n\n/**\n * Override the default commit mode for async step transitions.\n * `'optimistic'` advances on action dispatch and rolls back on error;\n * `'pessimistic'` waits for success. Per-instance `[commitMode]`\n * Input still wins.\n */\nexport function withStepperCommitMode(\n mode: 'optimistic' | 'pessimistic',\n): CngxStepperConfigFeature {\n return defineStepperConfigFeature((cfg) => ({\n ...cfg,\n defaultCommitMode: mode,\n }));\n}\n\n/**\n * Configure router synchronisation for the active step. `mode` chooses\n * the URL surface (URL fragment or query parameter); `param` names the\n * key (default `'step'`).\n */\nexport function withStepperRouterSync(\n mode: 'fragment' | 'queryParam',\n param = 'step',\n): CngxStepperConfigFeature {\n return defineStepperConfigFeature((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 stepper still win.\n */\nexport function withStepperAriaLabels(\n labels: CngxStepperAriaLabels,\n): CngxStepperConfigFeature {\n return defineStepperConfigFeature((cfg) => ({\n ...cfg,\n ariaLabels: { ...cfg.ariaLabels, ...labels },\n }));\n}\n\n/**\n * Merge text fallback labels (button captions, error strings) into the\n * cascade. Used when a slot directive is not present.\n */\nexport function withStepperFallbackLabels(\n labels: CngxStepperFallbackLabels,\n): CngxStepperConfigFeature {\n return defineStepperConfigFeature((cfg) => ({\n ...cfg,\n fallbackLabels: { ...cfg.fallbackLabels, ...labels },\n }));\n}\n\n/**\n * Override the default `*cngxStepIndicator` template app-wide.\n * Per-instance directive still wins; this only moves the cascade\n * middle tier.\n */\nexport function withStepIndicatorTemplate(\n template: TemplateRef<CngxStepIndicatorContext>,\n): CngxStepperConfigFeature {\n return defineStepperConfigFeature((cfg) => ({\n ...cfg,\n templates: { ...cfg.templates, indicator: template },\n }));\n}\n\n/**\n * Override the default `*cngxStepBadge` template app-wide.\n */\nexport function withStepBadgeTemplate(\n template: TemplateRef<CngxStepBadgeContext>,\n): CngxStepperConfigFeature {\n return defineStepperConfigFeature((cfg) => ({\n ...cfg,\n templates: { ...cfg.templates, badge: template },\n }));\n}\n\n/**\n * Override the default `*cngxStepBusySpinner` template app-wide.\n */\nexport function withStepBusySpinnerTemplate(\n template: TemplateRef<CngxStepBusySpinnerContext>,\n): CngxStepperConfigFeature {\n return defineStepperConfigFeature((cfg) => ({\n ...cfg,\n templates: { ...cfg.templates, busySpinner: template },\n }));\n}\n\n/**\n * Override the default `*cngxStepRejection` template app-wide.\n * Symmetric with the upcoming tabs `cngxTabRejectionIcon` (Phase 4).\n */\nexport function withStepRejectionTemplate(\n template: TemplateRef<CngxStepRejectionContext>,\n): CngxStepperConfigFeature {\n return defineStepperConfigFeature((cfg) => ({\n ...cfg,\n templates: { ...cfg.templates, rejection: template },\n }));\n}\n\n/**\n * Override the default `*cngxStepGroupHeader` template app-wide.\n */\nexport function withStepGroupHeaderTemplate(\n template: TemplateRef<CngxStepGroupHeaderContext>,\n): CngxStepperConfigFeature {\n return defineStepperConfigFeature((cfg) => ({\n ...cfg,\n templates: { ...cfg.templates, groupHeader: template },\n }));\n}\n\n/**\n * Override the default `*cngxStepperEmpty` template app-wide.\n */\nexport function withStepperEmptyTemplate(\n template: TemplateRef<void>,\n): CngxStepperConfigFeature {\n return defineStepperConfigFeature((cfg) => ({\n ...cfg,\n templates: { ...cfg.templates, empty: template },\n }));\n}\n\nfunction resolveFeatures(\n features: readonly CngxStepperConfigFeature[],\n): CngxStepperConfig {\n return features.reduce<CngxStepperConfig>((cfg, feat) => feat(cfg), STEPPER_CONFIG_DEFAULTS);\n}\n\n/**\n * Root-level provider for the stepper config. Apply once in the\n * application providers array. Sibling of `provideTabsConfig` /\n * `provideSelectConfig`.\n */\nexport function provideStepperConfig(\n ...features: readonly CngxStepperConfigFeature[]\n): EnvironmentProviders {\n return makeEnvironmentProviders([\n { provide: CNGX_STEPPER_CONFIG, useValue: resolveFeatures(features) },\n ]);\n}\n\n/**\n * Component-scoped config override. Spread the returned `Provider[]`\n * into `providers` or `viewProviders` — `viewProviders` cannot accept\n * opaque {@link EnvironmentProviders}, so the twin returns a list.\n * Sibling of `provideTabsConfigAt`.\n *\n * Resolution priority: per-instance Input > viewProviders (`At`) >\n * root provider > library default.\n *\n * ```ts\n * @Component({\n * viewProviders: [...provideStepperConfigAt(withStepperLinear(true))],\n * })\n * ```\n */\nexport function provideStepperConfigAt(\n ...features: readonly CngxStepperConfigFeature[]\n): Provider[] {\n return [{ provide: CNGX_STEPPER_CONFIG, useValue: resolveFeatures(features) }];\n}\n\n/**\n * Inject the resolved stepper config in an injection context.\n */\nexport function injectStepperConfig(): CngxStepperConfig {\n return inject(CNGX_STEPPER_CONFIG);\n}\n","import { InjectionToken, 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 * Status enum for a single step. Driven by the presenter's commit-controller\n * lifecycle plus the optional `errorAggregator`.\n */\nexport type CngxStepStatus =\n | 'idle'\n | 'pending'\n | 'success'\n | 'error'\n | 'disabled'\n | 'busy';\n\n/**\n * Step-tree node. Either a terminal `step` (has its own panel) or a\n * `group` carrying nested children. Discriminated by `kind`.\n */\nexport interface CngxStepNode {\n readonly id: string;\n readonly kind: 'step' | 'group';\n readonly label: Signal<string>;\n readonly disabled: Signal<boolean>;\n /** Live step status. Reactive to commit-controller + aggregator. */\n readonly state: Signal<CngxStepStatus>;\n /** Optional error aggregator signal for badge / SR phrasing. */\n readonly errorAggregator?: Signal<CngxErrorAggregatorContract | undefined>;\n /** Direct children for group nodes; empty for step nodes. */\n readonly children: readonly CngxStepNode[];\n /** DFS depth (root = 0). */\n readonly depth: number;\n /** Parent group id, or `null` for root. */\n readonly parentId: string | null;\n /** Flat-projection index inside `flatSteps()`. -1 for groups. */\n readonly flatIndex: number;\n}\n\n/**\n * Handle a `CngxStep` / `CngxStepGroup` passes to its host. The host owns\n * the registry; the atom owns its own state slot.\n *\n * @internal\n */\nexport interface CngxStepRegistration {\n readonly id: string;\n readonly kind: 'step' | 'group';\n readonly label: Signal<string>;\n readonly disabled: Signal<boolean>;\n readonly state: Signal<CngxStepStatus>;\n readonly errorAggregator?: Signal<CngxErrorAggregatorContract | undefined>;\n}\n\n/**\n * Contract atoms see via {@link CNGX_STEPPER_HOST}. Mirrors the\n * directive's surface 1:1 — atoms never reach the concrete class.\n */\nexport interface CngxStepperHost {\n readonly stepTree: Signal<readonly CngxStepNode[]>;\n readonly flatSteps: Signal<readonly CngxStepNode[]>;\n readonly activeStepIndex: Signal<number>;\n readonly activeStepId: Signal<string | null>;\n readonly linear: Signal<boolean>;\n readonly orientation: Signal<'horizontal' | 'vertical'>;\n readonly commitState: CngxAsyncState<number | undefined>;\n readonly intendedStepIndex: Signal<number | undefined>;\n\n /**\n * Reactive current/previous pair for the commit-state status. The\n * organism's `<span cngxLiveRegion>` reads this tracker on every\n * `pending → success / error` transition. Allocated once per\n * presenter — consumers MUST read this rather than calling\n * `createTransitionTracker` locally so the `linkedSignal` is shared.\n */\n readonly commitTransition: StatusTransition;\n\n /**\n * Index of the most recently refused commit target, or `undefined`\n * when no rejection is pending. Set by the rejection arm of\n * `select()`; cleared by a successful re-pick of the same target\n * or via {@link clearLastFailed}. Drives strip rejection decoration\n * and the `commitRolledBackTo` chain in `liveAnnouncement`.\n */\n readonly lastFailedIndex: Signal<number | undefined>;\n\n /**\n * Origin captured at commit-window open — the safe-harbour the user\n * is returned to on optimistic rollback. Resolves the origin label\n * for the `commitRolledBackTo(originLabel)` phrase. Cleared on\n * success; retained on rejection through the persistence window.\n */\n readonly originIndexDuringCommit: Signal<number | undefined>;\n\n select(index: number): void;\n selectNext(): void;\n selectPrevious(): void;\n selectById(id: string): void;\n reset(): void;\n\n /**\n * Drop the persisted {@link lastFailedIndex} flag. Idempotent;\n * safe to wire to a Dismiss button or aggregator-cleared.\n */\n clearLastFailed(): void;\n\n register(handle: CngxStepRegistration, parentId?: string | null): void;\n unregister(id: string): void;\n}\n\n/**\n * DI token carrying the presenter's contract to atoms + organism shells.\n * Atoms inject `optional: true` and either register here or fall through\n * {@link CNGX_STEP_GROUP_HOST} when nested in a group.\n */\nexport const CNGX_STEPPER_HOST = new InjectionToken<CngxStepperHost>(\n 'CngxStepperHost',\n);\n","import type { CngxStepNode } from './stepper-host.token';\n\n/**\n * DFS-flatten a step tree. Group nodes emit before their children;\n * the consumer keys off `kind` to render a panel container vs. a\n * group header.\n */\nexport function flattenStepTree(\n nodes: readonly CngxStepNode[],\n): readonly CngxStepNode[] {\n const out: CngxStepNode[] = [];\n let flatIndex = 0;\n const visit = (list: readonly CngxStepNode[]): void => {\n for (const node of list) {\n // Re-emit with the live flatIndex; registry-builder seeds -1\n // so it doesn't need to know the final ordering.\n out.push({ ...node, flatIndex: node.kind === 'step' ? flatIndex : -1 });\n if (node.kind === 'step') {\n flatIndex++;\n }\n if (node.children.length > 0) {\n visit(node.children);\n }\n }\n };\n visit(nodes);\n return out;\n}\n\n/**\n * Structural equality for the step-tree registry signal. Shape only —\n * id, kind, depth, parentId, children length. Reactive fields\n * (`label`, `disabled`, `state`, `errorAggregator`) are signals; their\n * own subscribers track identity changes.\n */\nexport function stepTreeEqual(\n a: readonly CngxStepNode[],\n b: readonly CngxStepNode[],\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 const x = a[i];\n const y = b[i];\n if (x.id !== y.id || x.kind !== y.kind || x.depth !== y.depth || x.parentId !== y.parentId) {\n return false;\n }\n if (!stepTreeEqual(x.children, y.children)) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Structural equality for `flatSteps`. Adds `flatIndex` (shifts when\n * a sibling is inserted) on top of the {@link stepTreeEqual} fields.\n *\n * Use only on projections where every step carries a real\n * DFS-assigned `flatIndex` and `depth` — for `-1` placeholders, use\n * {@link stepNodesEqual}.\n *\n * @internal Exported from `public-api.ts` so the cngx-stepper and\n * cngx-mat-stepper organisms share the comparator across the\n * secondary-entry boundary (Sheriff forbids deep-relative imports).\n */\nexport function flatStepsEqual(\n a: readonly CngxStepNode[],\n b: readonly CngxStepNode[],\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].kind !== b[i].kind ||\n a[i].depth !== b[i].depth ||\n a[i].flatIndex !== b[i].flatIndex\n ) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Structural equality for any flat node array — `id`, `kind`,\n * `parentId` only, ignoring `flatIndex` and `depth`. Use for\n * `CngxStepGroup.children` and other `-1`-placeholder projections.\n */\nexport function stepNodesEqual(\n a: readonly CngxStepNode[],\n b: readonly CngxStepNode[],\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].kind !== b[i].kind ||\n a[i].parentId !== b[i].parentId\n ) {\n return false;\n }\n }\n return true;\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_STEPPER_COMMIT_HANDLER_FACTORY,\n type CngxStepperCommitHandler,\n} from './commit-handler';\nimport { injectStepperConfig } from './stepper-config';\nimport { CNGX_STEPPER_HOST, type CngxStepperHost, type CngxStepNode, type CngxStepRegistration, type CngxStepStatus } from './stepper-host.token';\nimport { flatStepsEqual, flattenStepTree, stepTreeEqual } from './step-tree.util';\n\n/**\n * Async-commit action for stepper transitions. Receives the origin\n * and target indices; resolves `true` to advance, `false` to refuse.\n * The `Observable | Promise | sync` union matches every cngx\n * commit-action signature.\n */\nexport type CngxStepperCommitAction = (\n fromIndex: number,\n toIndex: number,\n) => boolean | Promise<boolean> | Observable<boolean>;\n\n/**\n * Stepper presenter — the brain of every stepper / wizard flow.\n * Holds the active-step model, registry, linear policy, orientation,\n * and commit-controller lifecycle. Provides {@link CNGX_STEPPER_HOST}\n * for atom registration and {@link CNGX_STATEFUL} so transition\n * bridges (`<cngx-toast-on />`, `<cngx-banner-on />`) compose without\n * explicit `[state]` wiring.\n *\n * Sheriff: common Level 2. Pure directive — zero template, zero CSS.\n * Level-4 organisms compose this via `hostDirectives`.\n */\n@Directive({\n selector: '[cngxStepper]',\n exportAs: 'cngxStepper',\n standalone: true,\n providers: [\n { provide: CNGX_STEPPER_HOST, useExisting: CngxStepperPresenter },\n { provide: CNGX_STATEFUL, useExisting: CngxStepperPresenter },\n ],\n})\nexport class CngxStepperPresenter implements CngxStepperHost {\n private readonly config = injectStepperConfig();\n\n readonly activeStepIndex = model<number>(0);\n // Raw *Input slots default undefined so the cascade resolves through\n // CNGX_STEPPER_CONFIG. Must stay public — the template type-checker\n // rejects protected/private on hostDirective alias bindings.\n readonly linearInput = input<boolean | undefined>(undefined, {\n alias: 'linear',\n });\n readonly linear = computed<boolean>(\n () => this.linearInput() ?? this.config.defaultLinear ?? false,\n );\n\n readonly orientationInput = input<\n 'horizontal' | 'vertical' | undefined\n >(undefined, { alias: 'orientation' });\n readonly orientation = computed<'horizontal' | 'vertical'>(\n () =>\n this.orientationInput() ?? this.config.defaultOrientation ?? 'horizontal',\n );\n\n readonly commitAction = input<CngxStepperCommitAction | null>(null);\n readonly commitModeInput = input<\n 'optimistic' | 'pessimistic' | undefined\n >(undefined, { alias: 'commitMode' });\n readonly commitMode = computed<'optimistic' | 'pessimistic'>(\n () =>\n this.commitModeInput() ?? this.config.defaultCommitMode ?? 'pessimistic',\n );\n\n private readonly genericFactory = inject(CNGX_COMMIT_CONTROLLER_FACTORY);\n private readonly commitController: CngxCommitController<number> =\n this.genericFactory<number>();\n private readonly commitHandler: CngxStepperCommitHandler = inject(\n CNGX_STEPPER_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\n /**\n * Step index the user is committing to. Tracked separately from\n * `state.data()` because the AsyncState data slot only updates on\n * success. Drives per-step `aria-busy` in the organism.\n */\n readonly intendedStepIndex: Signal<number | undefined> =\n this.commitController.intendedValue;\n\n /**\n * Reactive current/previous pair for the commit-state status. Skin\n * sub-components mount a `<span cngxLiveRegion>` reading this\n * tracker. Allocated once per presenter — the underlying\n * `linkedSignal` is shared across all consumers.\n */\n readonly commitTransition: StatusTransition = createTransitionTracker(\n () => this.commitController.state.status(),\n );\n\n // Persistence-of-error surface — see CngxStepperHost.lastFailedIndex\n // / originIndexDuringCommit for the contract.\n private readonly lastFailedIndexState = signal<number | undefined>(undefined);\n private readonly originIndexDuringCommitState = signal<number | undefined>(\n undefined,\n );\n /** {@inheritDoc CngxStepperHost.lastFailedIndex} */\n readonly lastFailedIndex: Signal<number | undefined> =\n this.lastFailedIndexState.asReadonly();\n /** {@inheritDoc CngxStepperHost.originIndexDuringCommit} */\n readonly originIndexDuringCommit: Signal<number | undefined> =\n this.originIndexDuringCommitState.asReadonly();\n\n private readonly treeState = signal<readonly CngxStepNode[]>([], {\n equal: stepTreeEqual,\n });\n readonly stepTree: Signal<readonly CngxStepNode[]> = this.treeState.asReadonly();\n\n readonly flatSteps: Signal<readonly CngxStepNode[]> = computed(\n () => flattenStepTree(this.stepTree()),\n { equal: flatStepsEqual },\n );\n\n /**\n * Step-only flat projection — terminal nodes in DFS order.\n * Structural-equal via `flatStepsEqual` so downstream computeds\n * don't cascade on shape-stable re-emits. Single source for every\n * `select*` / `clamp` / `activeStepId` lookup — never re-filter\n * `flatSteps()`.\n */\n private readonly stepsOnly: Signal<readonly CngxStepNode[]> = computed(\n () => this.flatSteps().filter((n) => n.kind === 'step'),\n { equal: flatStepsEqual },\n );\n\n private readonly clampedIndex = computed(() => {\n const stepCount = this.stepsOnly().length;\n if (stepCount === 0) {\n return 0;\n }\n const i = this.activeStepIndex();\n return Math.max(0, Math.min(i, stepCount - 1));\n });\n\n readonly activeStepId: Signal<string | null> = computed(() => {\n const idx = this.clampedIndex();\n return this.stepsOnly()[idx]?.id ?? null;\n });\n\n readonly commitState = this.commitController.state;\n\n // Flat id lookup; rebuilt into the hierarchical tree on each\n // register/unregister.\n private readonly registry = new Map<\n string,\n { reg: CngxStepRegistration; parentId: string | null; childIds: string[] }\n >();\n private readonly insertionOrder: string[] = [];\n\n register(handle: CngxStepRegistration, parentId: string | null = null): void {\n if (this.registry.has(handle.id)) {\n // Idempotent re-register — replace the handle, keep the ordering slot.\n const entry = this.registry.get(handle.id)!;\n entry.reg = handle;\n entry.parentId = parentId;\n } else {\n this.registry.set(handle.id, { reg: handle, parentId, childIds: [] });\n this.insertionOrder.push(handle.id);\n if (parentId !== null) {\n const parent = this.registry.get(parentId);\n if (parent) {\n parent.childIds.push(handle.id);\n }\n }\n }\n this.rebuildTree();\n }\n\n unregister(id: string): void {\n const entry = this.registry.get(id);\n if (!entry) {\n return;\n }\n if (entry.parentId !== null) {\n const parent = this.registry.get(entry.parentId);\n if (parent) {\n parent.childIds = parent.childIds.filter((c) => c !== id);\n }\n }\n this.registry.delete(id);\n const insertIdx = this.insertionOrder.indexOf(id);\n if (insertIdx >= 0) {\n this.insertionOrder.splice(insertIdx, 1);\n }\n this.rebuildTree();\n }\n\n private rebuildTree(): void {\n const buildNode = (id: string, depth: number): CngxStepNode => {\n const entry = this.registry.get(id)!;\n const children = entry.childIds.map((cid) => buildNode(cid, depth + 1));\n return {\n id,\n kind: entry.reg.kind,\n label: entry.reg.label,\n disabled: entry.reg.disabled,\n state: entry.reg.state,\n errorAggregator: entry.reg.errorAggregator,\n children,\n depth,\n parentId: entry.parentId,\n flatIndex: -1,\n };\n };\n const rootIds = this.insertionOrder.filter(\n (id) => this.registry.get(id)!.parentId === null,\n );\n this.treeState.set(rootIds.map((id) => buildNode(id, 0)));\n }\n\n /** {@inheritDoc CngxStepperHost.clearLastFailed} */\n clearLastFailed(): void {\n this.lastFailedIndexState.set(undefined);\n }\n\n select(index: number): void {\n const stepsOnly = this.stepsOnly();\n if (stepsOnly.length === 0) {\n return;\n }\n const target = Math.max(0, Math.min(index, stepsOnly.length - 1));\n if (this.linear() && target > this.activeStepIndex()) {\n // Linear: refuse jumps that skip an incomplete step.\n const blocking = stepsOnly\n .slice(this.activeStepIndex(), target)\n .find((n) => n.state() !== 'success' && !n.disabled());\n if (blocking) {\n return;\n }\n }\n if (stepsOnly[target].disabled()) {\n return;\n }\n const previous = this.activeStepIndex();\n if (target === previous) {\n return;\n }\n\n const action = this.commitAction();\n if (!action) {\n // No-action fast path — sync move, no commit window opens, so\n // `originIndexDuringCommit` stays untouched. Clear the rejection\n // flag if the user re-picked a previously-failed target.\n this.activeStepIndex.set(target);\n if (this.lastFailedIndexState() === target) {\n this.lastFailedIndexState.set(undefined);\n }\n return;\n }\n\n // Commit-gated transition. Pessimistic holds at `previous` until\n // the action resolves; optimistic advances now and rolls back on\n // rejection. Supersede comes from the lifted commit-controller —\n // a rapid second select() cancels the in-flight runner.\n //\n // Capture the safe-harbour origin exactly once on commit-window\n // open. Written ONLY on this path so a stale origin never lingers\n // into a non-commit navigation.\n this.originIndexDuringCommitState.set(previous);\n const mode = this.commitMode();\n if (mode === 'optimistic') {\n this.activeStepIndex.set(target);\n }\n this.commitHandler.beginTransition(previous, target, action, (accept) => {\n if (accept) {\n // Success — origin no longer needed; clear the rejection\n // flag if the user re-picked the failed target.\n this.originIndexDuringCommitState.set(undefined);\n if (this.lastFailedIndexState() === target) {\n this.lastFailedIndexState.set(undefined);\n }\n if (mode === 'pessimistic') {\n this.activeStepIndex.set(target);\n }\n } else {\n // Reject — flag the target; RETAIN the origin so\n // `liveAnnouncement` can resolve the origin label for the\n // rich rollback phrase. Optimistic rolls back; pessimistic\n // never moved.\n this.lastFailedIndexState.set(target);\n if (mode === 'optimistic') {\n this.activeStepIndex.set(previous);\n }\n }\n });\n }\n\n selectNext(): void {\n const stepsOnly = this.stepsOnly();\n let next = this.activeStepIndex() + 1;\n while (next < stepsOnly.length && stepsOnly[next].disabled()) {\n next++;\n }\n if (next < stepsOnly.length) {\n this.select(next);\n }\n }\n\n selectPrevious(): void {\n const stepsOnly = this.stepsOnly();\n let prev = this.activeStepIndex() - 1;\n while (prev >= 0 && stepsOnly[prev].disabled()) {\n prev--;\n }\n if (prev >= 0) {\n this.activeStepIndex.set(prev);\n }\n }\n\n selectById(id: string): void {\n const stepsOnly = this.stepsOnly();\n const idx = stepsOnly.findIndex((n) => n.id === id);\n if (idx >= 0) {\n this.select(idx);\n }\n }\n\n reset(): void {\n this.activeStepIndex.set(0);\n this.commitController.cancel();\n }\n}\n\nexport type { CngxStepStatus };\n","import { InjectionToken } from '@angular/core';\n\nimport type { CngxStepRegistration } from './stepper-host.token';\n\n/**\n * Contract a `CngxStep` sees when it injects a parent group via\n * {@link CNGX_STEP_GROUP_HOST}. Mirrors the presenter's `register` /\n * `unregister` so atoms stay agnostic of root vs. nested host.\n *\n * Surface is registration-only — `id` and `aggregatedStatus` are\n * concrete-class details, not part of the token contract.\n */\nexport interface CngxStepGroupHost {\n register(handle: CngxStepRegistration): void;\n unregister(id: string): void;\n}\n\n/**\n * DI token providing a `CngxStepGroup`'s contract to nested `CngxStep` atoms.\n * Steps inject this `optional: true` and fall back to {@link CNGX_STEPPER_HOST}.\n */\nexport const CNGX_STEP_GROUP_HOST = new InjectionToken<CngxStepGroupHost>(\n 'CngxStepGroupHost',\n);\n","import { InjectionToken, type Signal, type TemplateRef } from '@angular/core';\n\nimport type { CngxStepNode } from './stepper-host.token';\n\n/**\n * Context delivered to `*cngxStepLabel` templates. Gives typed access\n * to live step state without reaching into the host token.\n *\n * `index` is 1-based in the step-only flat projection (groups excluded).\n * `active` reflects `presenter.activeStepId`; `busy` mirrors\n * `presenter.intendedStepIndex` matching this step; `disabled` reads\n * `node.disabled()`.\n */\nexport interface CngxStepLabelContext {\n readonly node: CngxStepNode;\n readonly index: number;\n readonly active: boolean;\n readonly busy: boolean;\n readonly disabled: boolean;\n}\n\n/**\n * Context delivered to `*cngxStepContent` templates. Mirrors\n * {@link CngxStepLabelContext} — content templates need the same\n * derivations to gate inner controls on `disabled` / `busy`.\n */\nexport interface CngxStepContentContext {\n readonly node: CngxStepNode;\n readonly index: number;\n readonly active: boolean;\n readonly busy: boolean;\n readonly disabled: boolean;\n}\n\n/**\n * Contract Level-4 organisms (and consumer-authored stepper skins)\n * consume to render the panel body. Narrower than the presenter's\n * full interface — just enough to project label / content templates\n * and react to active-step changes.\n */\nexport interface CngxStepPanelHost {\n readonly flatSteps: Signal<readonly CngxStepNode[]>;\n readonly activeStepIndex: Signal<number>;\n readonly activeStepId: Signal<string | null>;\n /** Resolves a step id to its `*cngxStepLabel` template (consumer-supplied). */\n labelTemplateFor(id: string): TemplateRef<CngxStepLabelContext> | null;\n /** Resolves a step id to its `*cngxStepContent` template (consumer-supplied). */\n contentTemplateFor(id: string): TemplateRef<CngxStepContentContext> | null;\n}\n\n/**\n * DI token providing the rendering-surface contract to organism shells\n * (`<cngx-stepper>`, `<cngx-mat-stepper>`) and consumer-authored skins.\n */\nexport const CNGX_STEP_PANEL_HOST = new InjectionToken<CngxStepPanelHost>(\n 'CngxStepPanelHost',\n);\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\nimport type { CngxStepContentContext } from './step-panel-host.token';\n\n/**\n * Marker directive carrying a `CngxStep`'s content template.\n * Discovered via `contentChild(CngxStepContent)`. Typed with\n * {@link CngxStepContentContext} so `let-busy=\"busy\"` etc. gives\n * typed access to live step state.\n *\n * ```html\n * <ng-template cngxStepContent let-busy=\"busy\">\n * <input [disabled]=\"busy\">\n * </ng-template>\n * ```\n */\n@Directive({\n selector: 'ng-template[cngxStepContent]',\n standalone: true,\n})\nexport class CngxStepContent {\n readonly templateRef = inject<TemplateRef<CngxStepContentContext>>(TemplateRef);\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\nimport type { CngxStepLabelContext } from './step-panel-host.token';\n\n/**\n * Marker directive carrying a `CngxStep`'s label template.\n * Discovered via `contentChild(CngxStepLabel)`. Typed with\n * {@link CngxStepLabelContext} for typed `let-node=\"node\"` /\n * `let-active=\"active\"` access.\n *\n * ```html\n * <ng-template cngxStepLabel let-node=\"node\">\n * {{ node.label() }}\n * </ng-template>\n * ```\n */\n@Directive({\n selector: 'ng-template[cngxStepLabel]',\n standalone: true,\n})\nexport class CngxStepLabel {\n readonly templateRef = inject<TemplateRef<CngxStepLabelContext>>(TemplateRef);\n}\n","import {\n contentChild,\n DestroyRef,\n Directive,\n inject,\n input,\n linkedSignal,\n type Signal,\n} from '@angular/core';\n\nimport { nextUid } from '@cngx/core/utils';\n\nimport type { CngxErrorAggregatorContract } from '@cngx/common/interactive';\n\nimport { CNGX_STEP_GROUP_HOST } from './step-group-host.token';\nimport { CngxStepContent } from './step-content.directive';\nimport { CngxStepLabel } from './step-label.directive';\nimport {\n CNGX_STEPPER_HOST,\n type CngxStepStatus,\n} from './stepper-host.token';\n\n/**\n * Single-step atom. Registers with the nearest host — either a\n * `CngxStepGroup` ({@link CNGX_STEP_GROUP_HOST}) or the root\n * `CngxStepperPresenter` ({@link CNGX_STEPPER_HOST}).\n *\n * `state` is a `linkedSignal` over `[disabled]`, `[completed]`, and\n * the optional `[errorAggregator]`'s `hasError()`.\n */\n@Directive({\n selector: '[cngxStep]',\n exportAs: 'cngxStep',\n standalone: true,\n})\nexport class CngxStep {\n readonly id = input<string>(nextUid('cngx-step'));\n readonly disabled = input<boolean>(false);\n readonly completed = input<boolean>(false);\n readonly label = input<string>('');\n readonly errorAggregator = input<CngxErrorAggregatorContract | undefined>(\n undefined,\n );\n\n protected readonly labelSlot = contentChild(CngxStepLabel);\n protected readonly contentSlot = contentChild(CngxStepContent);\n\n readonly labelTemplate = this.labelSlot;\n readonly contentTemplate = this.contentSlot;\n\n /**\n * Per-step status derived from inputs + aggregator. `linkedSignal`\n * with structural equal — never written via `effect`.\n */\n readonly state: Signal<CngxStepStatus> = linkedSignal({\n source: () => ({\n disabled: this.disabled(),\n completed: this.completed(),\n errored: this.errorAggregator()?.hasError?.() ?? false,\n }),\n computation: ({ disabled, completed, errored }) => {\n if (disabled) {\n return 'disabled';\n }\n if (errored) {\n return 'error';\n }\n if (completed) {\n return 'success';\n }\n return 'idle';\n },\n equal: Object.is,\n });\n\n constructor() {\n const groupHost = inject(CNGX_STEP_GROUP_HOST, { optional: true });\n const stepperHost = inject(CNGX_STEPPER_HOST, { optional: true });\n const host = groupHost ?? stepperHost;\n if (!host) {\n // No enclosing presenter or group — atom can't register. Fail loud.\n throw new Error(\n 'CngxStep: no enclosing CngxStepperPresenter or CngxStepGroup found. ' +\n 'Wrap the step inside an element carrying [cngxStepper] or [cngxStepGroup].',\n );\n }\n const stepId = this.id();\n host.register({\n id: stepId,\n kind: 'step',\n label: this.label,\n disabled: this.disabled,\n state: this.state,\n errorAggregator: this.errorAggregator,\n });\n inject(DestroyRef).onDestroy(() => host.unregister(stepId));\n }\n}\n","import {\n computed,\n DestroyRef,\n Directive,\n inject,\n input,\n signal,\n type Signal,\n} from '@angular/core';\n\nimport { nextUid } from '@cngx/core/utils';\n\nimport {\n CNGX_STEP_GROUP_HOST,\n type CngxStepGroupHost,\n} from './step-group-host.token';\nimport {\n CNGX_STEPPER_HOST,\n type CngxStepRegistration,\n type CngxStepStatus,\n} from './stepper-host.token';\n\n/**\n * Step-group atom. Registers with the root presenter as a `kind: 'group'`\n * node and provides {@link CNGX_STEP_GROUP_HOST} so nested `CngxStep`\n * atoms register with the group, not the root.\n *\n * `aggregatedStatus` rolls up child states: `error` if any errored,\n * `success` if all are success, `pending` if any is pending or busy,\n * otherwise `idle`.\n */\n@Directive({\n selector: '[cngxStepGroup]',\n exportAs: 'cngxStepGroup',\n standalone: true,\n providers: [{ provide: CNGX_STEP_GROUP_HOST, useExisting: CngxStepGroup }],\n})\nexport class CngxStepGroup implements CngxStepGroupHost {\n readonly id = input<string>(nextUid('cngx-step-group'));\n readonly disabled = input<boolean>(false);\n readonly label = input<string>('');\n\n // Local child registry — only feeds `aggregatedStatus` below.\n // The presenter owns the canonical tree.\n private readonly childRegistry = signal<readonly CngxStepRegistration[]>([]);\n\n readonly aggregatedStatus: Signal<CngxStepStatus> = computed(() => {\n const states = this.childRegistry().map((c) => c.state());\n if (states.length === 0) {\n return 'idle';\n }\n if (states.some((s) => s === 'error')) {\n return 'error';\n }\n if (states.some((s) => s === 'pending' || s === 'busy')) {\n return 'pending';\n }\n if (states.every((s) => s === 'success')) {\n return 'success';\n }\n return 'idle';\n }, { equal: Object.is });\n\n private readonly stepperHost = inject(CNGX_STEPPER_HOST, { optional: true });\n\n constructor() {\n if (!this.stepperHost) {\n throw new Error(\n 'CngxStepGroup: no enclosing CngxStepperPresenter found. ' +\n 'Wrap the group inside an element carrying [cngxStepper].',\n );\n }\n const groupId = this.id();\n this.stepperHost.register({\n id: groupId,\n kind: 'group',\n label: this.label,\n disabled: this.disabled,\n state: this.aggregatedStatus,\n });\n const stepperHost = this.stepperHost;\n inject(DestroyRef).onDestroy(() => stepperHost.unregister(groupId));\n }\n\n register(handle: CngxStepRegistration): void {\n this.childRegistry.update((cur) => [...cur, handle]);\n // Forward to the root with this group as parent so the tree shape is correct.\n this.stepperHost!.register(handle, this.id());\n }\n\n unregister(id: string): void {\n this.childRegistry.update((cur) => cur.filter((c) => c.id !== id));\n this.stepperHost!.unregister(id);\n }\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\nimport type { CngxStepNode, CngxStepStatus } from '../stepper-host.token';\n\n/**\n * Context passed to the `*cngxStepIndicator` template. Drives the\n * numbered / checkmark / error glyph inside each step button. The\n * `<button>` shell — `aria-current`, `aria-controls`, click handler —\n * stays library-owned.\n *\n * `status` mirrors `node.state()`. `busy` is the presenter-derived\n * \"this step is the in-flight commit target\" flag — independent of\n * `status === 'pending'` (which is the aggregate landmark state).\n */\nexport interface CngxStepIndicatorContext {\n /** Convenience alias for `position` — usable as `let-position` shorthand. */\n readonly $implicit: number;\n /** 1-based position of this step in the flat step-only projection. */\n readonly position: number;\n /** The step node carrying id / label / disabled / state signals. */\n readonly node: CngxStepNode;\n /** `true` when this step is the current `activeStepId`. */\n readonly active: boolean;\n /** Live step status — drives the visual variant (idle / success / error / busy). */\n readonly status: CngxStepStatus;\n /** `true` when this step is the in-flight commit target. */\n readonly busy: boolean;\n}\n\n/**\n * Slot directive for the indicator-glyph template on `<cngx-stepper>`.\n * Discovered via `contentChild`; cascades through\n * `CNGX_STEPPER_CONFIG.templates.indicator` before falling back to\n * the built-in numeric span (`{{ position }}`).\n *\n * ```html\n * <cngx-stepper>\n * <ng-template cngxStepIndicator let-position let-node=\"node\" let-status=\"status\">\n * @if (status === 'success') {\n * <my-icon name=\"check\" />\n * } @else if (status === 'error') {\n * <my-icon name=\"alert\" />\n * } @else {\n * <span class=\"my-step-num\">{{ position }}</span>\n * }\n * </ng-template>\n * </cngx-stepper>\n * ```\n */\n@Directive({\n selector: 'ng-template[cngxStepIndicator]',\n exportAs: 'cngxStepIndicator',\n standalone: true,\n})\nexport class CngxStepIndicator {\n readonly templateRef = inject<TemplateRef<CngxStepIndicatorContext>>(\n TemplateRef,\n );\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\nimport type { CngxStepNode } from '../stepper-host.token';\n\n/**\n * Context passed to the `*cngxStepBadge` template. Drives the error\n * badge inside a step button when `errorAggregator?.shouldShow()` is\n * truthy. Consumers swap the built-in `'!'` glyph for a counter pill\n * or branded marker; the visibility gate stays library-owned.\n */\nexport interface CngxStepBadgeContext {\n /** Aggregated error count for this step (≥ 1 when shown). */\n readonly count: number;\n /** The step node carrying id / label / state signals. */\n readonly node: CngxStepNode;\n}\n\n/**\n * Slot directive for the error-badge template on `<cngx-stepper>`.\n * Discovered via `contentChild`; cascades through\n * `CNGX_STEPPER_CONFIG.templates.badge` before falling back to\n * `CNGX_STEPPER_GLYPHS.errorBadge`.\n *\n * ```html\n * <cngx-stepper>\n * <ng-template cngxStepBadge let-count=\"count\">\n * <span class=\"my-badge-pill\">{{ count }}</span>\n * </ng-template>\n * </cngx-stepper>\n * ```\n */\n@Directive({\n selector: 'ng-template[cngxStepBadge]',\n exportAs: 'cngxStepBadge',\n standalone: true,\n})\nexport class CngxStepBadge {\n readonly templateRef = inject<TemplateRef<CngxStepBadgeContext>>(TemplateRef);\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\nimport type { CngxStepNode } from '../stepper-host.token';\n\n/**\n * Context passed to the `*cngxStepBusySpinner` template. Drives the\n * pending-commit overlay on the in-flight target step. Renders only\n * when the step matches `presenter.intendedStepIndex()` with\n * `commitState.status() === 'pending'`.\n */\nexport interface CngxStepBusySpinnerContext {\n /** The step node carrying id / label / state signals. */\n readonly node: CngxStepNode;\n}\n\n/**\n * Slot directive for the busy-spinner template on `<cngx-stepper>`.\n * Discovered via `contentChild`; cascades through\n * `CNGX_STEPPER_CONFIG.templates.busySpinner` before falling back to\n * the built-in pulse-animation span.\n *\n * ```html\n * <cngx-stepper>\n * <ng-template cngxStepBusySpinner>\n * <my-spinner size=\"sm\" />\n * </ng-template>\n * </cngx-stepper>\n * ```\n */\n@Directive({\n selector: 'ng-template[cngxStepBusySpinner]',\n exportAs: 'cngxStepBusySpinner',\n standalone: true,\n})\nexport class CngxStepBusySpinner {\n readonly templateRef = inject<TemplateRef<CngxStepBusySpinnerContext>>(\n TemplateRef,\n );\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\nimport type { CngxStepNode } from '../stepper-host.token';\n\n/**\n * Context passed to the `*cngxStepRejection` template. Renders on the\n * strip step the most recent commit was rolled back FROM — sibling of\n * the tabs `cngxTabRejectionIcon` slot. Renders only when\n * `presenter.lastFailedIndex()` matches the step's flat-index.\n *\n * `originLabel` is the safe-harbour step's label, derived from\n * `presenter.originIndexDuringCommit()`. May be `undefined` when the\n * origin index is out of range (synchronous-rejection edge case);\n * gate richer UI on its presence.\n */\nexport interface CngxStepRejectionContext {\n /** Flat-index of the rejected step (`presenter.lastFailedIndex()`). */\n readonly failedIndex: number;\n /** Resolved label of the safe-harbour step, when derivable. */\n readonly originLabel: string | undefined;\n /** The rejected step node carrying id / label / state signals. */\n readonly node: CngxStepNode;\n}\n\n/**\n * Slot directive for the rejection-decoration template on\n * `<cngx-stepper>`. Discovered via `contentChild`; cascades through\n * `CNGX_STEPPER_CONFIG.templates.rejection` before falling back to\n * `CNGX_STEPPER_GLYPHS.rejectionIcon`.\n *\n * Symmetric context shape with the upcoming tabs `cngxTabRejectionIcon`\n * slot so consumer templates port directly between the two families.\n *\n * ```html\n * <cngx-stepper>\n * <ng-template cngxStepRejection let-failedIndex=\"failedIndex\" let-originLabel=\"originLabel\">\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-stepper>\n * ```\n */\n@Directive({\n selector: 'ng-template[cngxStepRejection]',\n exportAs: 'cngxStepRejection',\n standalone: true,\n})\nexport class CngxStepRejection {\n readonly templateRef = inject<TemplateRef<CngxStepRejectionContext>>(\n TemplateRef,\n );\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\nimport type { CngxStepNode, CngxStepStatus } from '../stepper-host.token';\n\n/**\n * Context passed to the `*cngxStepGroupHeader` template. Drives the\n * group-row landmark for `kind === 'group'` nodes. The `role=\"group\"`\n * + `aria-roledescription` shell stays library-owned.\n *\n * `group` carries a `CngxStepNode` with the runtime guarantee\n * `kind === 'group'` (the slot only fires for group nodes).\n * `expanded` is reserved for future collapsible groups — passed `true`\n * today; declaring it now avoids a breaking change later.\n */\nexport interface CngxStepGroupHeaderContext {\n /** The group node carrying id / label / state / children signals. */\n readonly group: CngxStepNode;\n /** Reserved — `true` while the group's children are visible. */\n readonly expanded: boolean;\n /** Aggregated group status (rolls up children — drives heading variant). */\n readonly status: CngxStepStatus;\n}\n\n/**\n * Slot directive for the group-header template on `<cngx-stepper>`.\n * Discovered via `contentChild`; cascades through\n * `CNGX_STEPPER_CONFIG.templates.groupHeader` before falling back to\n * the built-in `<span class=\"cngx-stepper__group-label\">`.\n *\n * ```html\n * <cngx-stepper>\n * <ng-template cngxStepGroupHeader let-group=\"group\" let-status=\"status\">\n * <h4 [class.is-error]=\"status === 'error'\">{{ group.label() }}</h4>\n * </ng-template>\n * </cngx-stepper>\n * ```\n */\n@Directive({\n selector: 'ng-template[cngxStepGroupHeader]',\n exportAs: 'cngxStepGroupHeader',\n standalone: true,\n})\nexport class CngxStepGroupHeader {\n readonly templateRef = inject<TemplateRef<CngxStepGroupHeaderContext>>(\n TemplateRef,\n );\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Slot directive for the empty-state placeholder on `<cngx-stepper>`.\n * Rendered when `flatSteps()` is empty — async-loading or\n * server-driven step lists get a \"no steps yet\" landmark rather than\n * a collapsed strip.\n *\n * Discovered via `contentChild`; cascades through\n * `CNGX_STEPPER_CONFIG.templates.empty` before falling back to no\n * markup (Honest-Absence default).\n *\n * ```html\n * <cngx-stepper>\n * <ng-template cngxStepperEmpty>\n * <cngx-empty-state heading=\"No steps configured yet\" />\n * </ng-template>\n * </cngx-stepper>\n * ```\n */\n@Directive({\n selector: 'ng-template[cngxStepperEmpty]',\n exportAs: 'cngxStepperEmpty',\n standalone: true,\n})\nexport class CngxStepperEmpty {\n readonly templateRef = inject<TemplateRef<void>>(TemplateRef);\n}\n","import { computed, type Signal, type TemplateRef } from '@angular/core';\n\nimport type { CngxStepperConfig } from '../stepper-config';\nimport type {\n CngxStepBadge,\n CngxStepBadgeContext,\n} from './step-badge.directive';\nimport type {\n CngxStepBusySpinner,\n CngxStepBusySpinnerContext,\n} from './step-busy-spinner.directive';\nimport type {\n CngxStepGroupHeader,\n CngxStepGroupHeaderContext,\n} from './step-group-header.directive';\nimport type {\n CngxStepIndicator,\n CngxStepIndicatorContext,\n} from './step-indicator.directive';\nimport type {\n CngxStepRejection,\n CngxStepRejectionContext,\n} from './step-rejection.directive';\nimport type { CngxStepperEmpty } from './stepper-empty.directive';\n\n/**\n * Inputs to {@link createStepperTemplateBindings}. The organism owns\n * the `contentChild()` queries (NG8110 — must run in component\n * injection context) and the resolved {@link CngxStepperConfig}; this\n * factory absorbs the 3-stage cascade per slot key.\n */\nexport interface CngxStepperTemplateBindingsOptions {\n readonly indicatorSlot: Signal<CngxStepIndicator | undefined>;\n readonly badgeSlot: Signal<CngxStepBadge | undefined>;\n readonly busySpinnerSlot: Signal<CngxStepBusySpinner | undefined>;\n readonly rejectionSlot: Signal<CngxStepRejection | undefined>;\n readonly groupHeaderSlot: Signal<CngxStepGroupHeader | undefined>;\n readonly emptySlot: Signal<CngxStepperEmpty | undefined>;\n readonly config: CngxStepperConfig;\n}\n\n/**\n * Output of {@link createStepperTemplateBindings}. One resolved\n * `Signal<TemplateRef | null>` per slot — `null` falls through to the\n * organism's built-in default markup.\n */\nexport interface CngxStepperTemplateBindings {\n readonly indicator: Signal<TemplateRef<CngxStepIndicatorContext> | null>;\n readonly badge: Signal<TemplateRef<CngxStepBadgeContext> | null>;\n readonly busySpinner: Signal<TemplateRef<CngxStepBusySpinnerContext> | null>;\n readonly rejection: Signal<TemplateRef<CngxStepRejectionContext> | null>;\n readonly groupHeader: Signal<TemplateRef<CngxStepGroupHeaderContext> | null>;\n readonly empty: Signal<TemplateRef<void> | null>;\n}\n\n/**\n * Wires the 3-stage template cascade for the six `<cngx-stepper>`\n * skin slots: per-instance directive > `CNGX_STEPPER_CONFIG.templates.<key>`\n * > `null` (built-in default).\n *\n * Pure — no DI, no side effects. Safe to call from a field-init\n * block. Sibling of `createTabOverflowTemplateBindings` and the\n * family-wide `createTemplateRegistry`.\n *\n * Tabs has no parallel slot surface yet — see\n * `stepper-accepted-debt §3` for the planned Phase-4 closure.\n */\nexport function createStepperTemplateBindings(\n opts: CngxStepperTemplateBindingsOptions,\n): CngxStepperTemplateBindings {\n return {\n indicator: computed<TemplateRef<CngxStepIndicatorContext> | null>(\n () =>\n opts.indicatorSlot()?.templateRef ??\n opts.config.templates?.indicator ??\n null,\n ),\n badge: computed<TemplateRef<CngxStepBadgeContext> | null>(\n () =>\n opts.badgeSlot()?.templateRef ??\n opts.config.templates?.badge ??\n null,\n ),\n busySpinner: computed<TemplateRef<CngxStepBusySpinnerContext> | null>(\n () =>\n opts.busySpinnerSlot()?.templateRef ??\n opts.config.templates?.busySpinner ??\n null,\n ),\n rejection: computed<TemplateRef<CngxStepRejectionContext> | null>(\n () =>\n opts.rejectionSlot()?.templateRef ??\n opts.config.templates?.rejection ??\n null,\n ),\n groupHeader: computed<TemplateRef<CngxStepGroupHeaderContext> | null>(\n () =>\n opts.groupHeaderSlot()?.templateRef ??\n opts.config.templates?.groupHeader ??\n null,\n ),\n empty: computed<TemplateRef<void> | null>(\n () =>\n opts.emptySlot()?.templateRef ??\n opts.config.templates?.empty ??\n null,\n ),\n };\n}\n","/**\n * Default glyphs for `<cngx-stepper>` skin slots. Used when neither a\n * per-instance slot directive nor `CNGX_STEPPER_CONFIG.templates.<key>`\n * overrides the built-in span. Sibling of `CNGX_SELECT_GLYPHS` /\n * `CNGX_TABS_GLYPHS`.\n *\n * Exported with `@internal` so the organism (and mat-twin) can share\n * the literals across the secondary-entry boundary that Sheriff\n * forbids deep-relative imports across. Consumers customise via\n * `*cngxStep*` slots or `withStep*Template` features.\n *\n * @internal\n */\nexport const CNGX_STEPPER_GLYPHS = {\n /** Default visual for `*cngxStepBadge` when no override is bound. */\n errorBadge: '!',\n /** Default visual for `*cngxStepRejection` when no override is bound. */\n rejectionIcon: '!',\n} as const;\n","import {\n afterNextRender,\n computed,\n DestroyRef,\n Directive,\n effect,\n inject,\n input,\n output,\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 { injectStepperConfig } from './stepper-config';\nimport { CNGX_STEPPER_HOST } from './stepper-host.token';\n\n/**\n * URL deep-linking for the stepper. Bidirectional sync between\n * `activeStepId` and a URL fragment / query-param. Opt-in via\n * `[cngxStepperRouterSync]` on the presenter element.\n *\n * - `mode = 'fragment'` (default) → `#step=customer`\n * - `mode = 'queryParam'` with `paramName = 'step'` → `?step=customer`\n *\n * `Router` is optional — without `@angular/router` the directive\n * dev-warns once and becomes a no-op.\n */\n@Directive({\n selector: '[cngxStepperRouterSync]',\n exportAs: 'cngxStepperRouterSync',\n standalone: true,\n})\nexport class CngxStepperRouterSync {\n // Default undefined so the cascade resolves through CNGX_STEPPER_CONFIG.\n readonly modeInput = input<\n 'fragment' | 'queryParam' | undefined\n >(undefined, { alias: 'mode' });\n readonly paramNameInput = input<string | undefined>(undefined, {\n alias: 'paramName',\n });\n\n private readonly config = injectStepperConfig();\n\n readonly mode = computed<'fragment' | 'queryParam'>(\n () => this.modeInput() ?? this.config.routerSyncMode ?? 'fragment',\n );\n readonly paramName = computed<string>(\n () => this.paramNameInput() ?? this.config.routerSyncParam ?? 'step',\n );\n\n /** Emits when a `router.navigate` rejection is observed. */\n readonly syncError = output<unknown>();\n\n private readonly host = inject(CNGX_STEPPER_HOST, { host: true });\n private readonly router = inject(Router, { optional: true });\n\n constructor() {\n if (!this.router) {\n afterNextRender(() => {\n console.warn(\n 'CngxStepperRouterSync: 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\n afterNextRender(() => {\n const initial =\n this.mode() === 'fragment'\n ? router.routerState.snapshot.root.fragment\n : (router.routerState.snapshot.root.queryParamMap.get(this.paramName()) ?? null);\n if (initial) {\n const value = this.mode() === 'fragment' ? this.parseFragment(initial) : initial;\n if (value) {\n this.host.selectById(value);\n }\n }\n });\n\n effect(() => {\n const id = this.host.activeStepId();\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 navigation.catch?.((err: unknown) => this.syncError.emit(err));\n });\n });\n\n const navEnd = toSignal(\n router.events.pipe(\n filter((e): e is NavigationEnd => e instanceof NavigationEnd),\n takeUntilDestroyed(inject(DestroyRef)),\n ),\n { initialValue: null },\n );\n effect(() => {\n const e = navEnd();\n if (!e) {\n return;\n }\n untracked(() => {\n const next =\n this.mode() === 'fragment'\n ? this.parseFragment(router.routerState.snapshot.root.fragment ?? '')\n : (router.routerState.snapshot.root.queryParamMap.get(this.paramName()) ?? null);\n if (next && next !== this.host.activeStepId()) {\n this.host.selectById(next);\n }\n });\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 { inject, InjectionToken, type Provider } from '@angular/core';\n\n/**\n * Stepper i18n surface. Library defaults are English; locales come from\n * consumer overrides via {@link provideStepperI18n}. Sibling of\n * `CNGX_TABS_I18N` / `CNGX_CHART_I18N`.\n */\nexport interface CngxStepperI18n {\n readonly stepperLabel: string;\n readonly selectedStep: (label: string, position: number, count: number) => string;\n readonly stepCompleted: string;\n readonly stepErrored: string;\n readonly stepHasErrors: (count: number) => string;\n readonly previousStep: string;\n readonly nextStep: string;\n /**\n * @deprecated Superseded by {@link commitRolledBackTo}. Retained as\n * defensive fallback in `liveAnnouncement` when the origin label is\n * unresolvable (unlabeled step, or `commitState` driven outside `select()`).\n */\n readonly commitFailedRetry: string;\n /**\n * Polite SR announcement on `idle → pending`. Pillar 2.\n */\n readonly commitInFlight: string;\n /**\n * Origin-aware rollback phrase. Read on `pending → error` when both\n * `lastFailedIndex` and `originIndexDuringCommit` resolve. Receives\n * the safe-harbour label, yields e.g. `Reverted to step \"Customer\".`.\n */\n readonly commitRolledBackTo: (originLabel: string) => string;\n /**\n * Persistent suffix on the per-step `aria-describedby` while\n * `presenter.lastFailedIndex()` matches the step. Distinct from\n * {@link commitRolledBackTo} (transient live-region phrase) — this\n * suffix is reachable when AT users navigate back to the rejected\n * step after the announcement has faded. Pillar 2.\n */\n readonly stepRolledBackSuffix: string;\n}\n\nconst STEPPER_I18N_DEFAULTS: CngxStepperI18n = {\n stepperLabel: 'Stepper',\n selectedStep: (label, position, count) =>\n `Step ${position} of ${count}: ${label}`,\n stepCompleted: 'Completed',\n stepErrored: 'Has errors',\n stepHasErrors: (count) => `${count} error${count === 1 ? '' : 's'}`,\n previousStep: 'Previous step',\n nextStep: 'Next step',\n commitFailedRetry: 'Commit failed — retry?',\n commitInFlight: 'Committing step…',\n commitRolledBackTo: (originLabel) => `Reverted to step \"${originLabel}\".`,\n stepRolledBackSuffix: 'This step was rolled back.',\n};\n\n/**\n * DI token for the resolved stepper i18n bundle. `providedIn: 'root'`\n * with English defaults.\n */\nexport const CNGX_STEPPER_I18N = new InjectionToken<CngxStepperI18n>(\n 'CngxStepperI18n',\n { providedIn: 'root', factory: () => STEPPER_I18N_DEFAULTS },\n);\n\n/**\n * Feature shape consumed by {@link provideStepperI18n} and {@link provideCngxStepper}.\n * Hidden `_target: 'i18n'` discriminator routes through the family aggregator.\n * Sibling of `CngxTabsI18nFeature`.\n */\nexport type CngxStepperI18nFeature = ((\n bundle: CngxStepperI18n,\n) => CngxStepperI18n) & {\n readonly _target: 'i18n';\n};\n\n/**\n * Brands an i18n mutator with `_target: 'i18n'`. Every `with*` i18n\n * feature returns one of these.\n *\n * @internal\n */\nfunction defineStepperI18nFeature(\n fn: (bundle: CngxStepperI18n) => CngxStepperI18n,\n): CngxStepperI18nFeature {\n return Object.assign(fn, { _target: 'i18n' as const });\n}\n\n/**\n * Override stepper i18n labels. Partial override — unset keys keep\n * the English default. Sibling of `withStepperAriaLabels` /\n * `withStepperFallbackLabels`.\n */\nexport function withStepperI18nLabels(\n overrides: Partial<CngxStepperI18n>,\n): CngxStepperI18nFeature {\n return defineStepperI18nFeature((bundle) => ({ ...bundle, ...overrides }));\n}\n\nfunction resolveI18nFeatures(\n features: readonly CngxStepperI18nFeature[],\n): CngxStepperI18n {\n return features.reduce<CngxStepperI18n>(\n (bundle, feat) => feat(bundle),\n STEPPER_I18N_DEFAULTS,\n );\n}\n\n/**\n * Provider for the stepper i18n bundle. Compose `withStepperI18nLabels(...)`\n * (plus any future i18n `with*`) — unset keys fall back to English.\n *\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideStepperI18n(\n * withStepperI18nLabels({ stepperLabel: 'Schrittfolge', previousStep: 'Vorheriger' }),\n * ),\n * ],\n * });\n * ```\n */\nexport function provideStepperI18n(\n ...features: readonly CngxStepperI18nFeature[]\n): Provider {\n return {\n provide: CNGX_STEPPER_I18N,\n useValue: resolveI18nFeatures(features),\n };\n}\n\n/**\n * Inject the resolved stepper i18n bundle in an injection context.\n */\nexport function injectStepperI18n(): CngxStepperI18n {\n return inject(CNGX_STEPPER_I18N);\n}\n","import {\n type EnvironmentProviders,\n isDevMode,\n makeEnvironmentProviders,\n type Provider,\n} from '@angular/core';\n\nimport {\n provideStepperI18n,\n type CngxStepperI18nFeature,\n} from './i18n/stepper-i18n';\nimport {\n provideStepperConfig,\n provideStepperConfigAt,\n type CngxStepperConfigFeature,\n} from './stepper-config';\n\n/**\n * Union of every feature kind {@link provideCngxStepper} accepts. Today:\n * config (`CNGX_STEPPER_CONFIG`) and i18n (`CNGX_STEPPER_I18N`). Future\n * surfaces widen this union and dispatch via the hidden `_target`\n * discriminator.\n */\nexport type CngxStepperFeature =\n | CngxStepperConfigFeature\n | CngxStepperI18nFeature;\n\ninterface PartitionedFeatures {\n readonly config: CngxStepperConfigFeature[];\n readonly i18n: CngxStepperI18nFeature[];\n}\n\nfunction partitionFeatures(\n features: readonly CngxStepperFeature[],\n): PartitionedFeatures {\n const config: CngxStepperConfigFeature[] = [];\n const i18n: CngxStepperI18nFeature[] = [];\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 — drop + dev-warn (mirrors `provideCngxTabs`).\n if (isDevMode()) {\n console.warn(\n '[provideCngxStepper] Dropped feature without a `_target` ' +\n 'discriminator. Brand config-side mutators with ' +\n '`defineStepperConfigFeature(...)` (or use a `with*` helper) ' +\n 'and i18n-side mutators with `withStepperI18nLabels(...)`.',\n );\n }\n }\n return { config, i18n };\n}\n\n/**\n * Unified aggregator for the stepper family. Filters by `_target` and\n * forwards: config features to {@link provideStepperConfig}, i18n\n * features to {@link provideStepperI18n}. Mirrors `provideCngxTabs` /\n * `provideCngxSelect`.\n *\n * Returns {@link EnvironmentProviders} for app-root use; the\n * component-scoped twin {@link provideCngxStepperAt} returns\n * `Provider[]` because `viewProviders` cannot accept opaque\n * `EnvironmentProviders`.\n *\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideCngxStepper(\n * withStepperDefaultOrientation('vertical'),\n * withStepperLinear(true),\n * withStepperAriaLabels({ stepperRegion: 'Schrittfolge' }),\n * withStepperI18nLabels({ stepperLabel: 'Schrittfolge', previousStep: 'Vorheriger' }),\n * ),\n * ],\n * });\n * ```\n */\nexport function provideCngxStepper(\n ...features: readonly CngxStepperFeature[]\n): EnvironmentProviders {\n const { config, i18n } = partitionFeatures(features);\n // `provideStepperConfig` returns EnvironmentProviders, `provideStepperI18n`\n // returns Provider — `makeEnvironmentProviders` takes both.\n return makeEnvironmentProviders([\n provideStepperConfig(...config),\n ...(i18n.length > 0 ? [provideStepperI18n(...i18n)] : []),\n ]);\n}\n\n/**\n * Component-scoped twin of {@link provideCngxStepper}. Spread into\n * `viewProviders` or `providers`. Same dispatch semantics — only the\n * provider scope differs.\n *\n * ```ts\n * @Component({\n * viewProviders: [\n * ...provideCngxStepperAt(\n * withStepperDefaultOrientation('vertical'),\n * withStepperI18nLabels({ stepperLabel: 'Schrittfolge' }),\n * ),\n * ],\n * })\n * ```\n */\nexport function provideCngxStepperAt(\n ...features: readonly CngxStepperFeature[]\n): Provider[] {\n const { config, i18n } = partitionFeatures(features);\n return [\n ...provideStepperConfigAt(...config),\n ...(i18n.length > 0 ? [provideStepperI18n(...i18n)] : []),\n ];\n}\n","/**\n * @module @cngx/common/stepper\n *\n * Level-2 directive-only logic for stepper / wizard flows. Ships the\n * presenter brain, atom directives, host tokens, router-sync, config\n * cascade, and i18n. Zero `@Component`, zero `.html`, zero `.css` —\n * those live in `@cngx/ui/stepper` (CNGX-standard skin) and\n * `@cngx/ui/mat-stepper` (Material twin).\n */\n\nexport {\n CngxStepperPresenter,\n type CngxStepperCommitAction,\n} from './presenter.directive';\n\nexport {\n CNGX_STEPPER_HOST,\n type CngxStepperHost,\n type CngxStepNode,\n type CngxStepRegistration,\n type CngxStepStatus,\n} from './stepper-host.token';\n\nexport {\n CNGX_STEP_GROUP_HOST,\n type CngxStepGroupHost,\n} from './step-group-host.token';\n\nexport {\n CNGX_STEP_PANEL_HOST,\n type CngxStepContentContext,\n type CngxStepLabelContext,\n type CngxStepPanelHost,\n} from './step-panel-host.token';\n\nexport { flatStepsEqual } from './step-tree.util';\n\nexport { CngxStep } from './step.directive';\nexport { CngxStepGroup } from './step-group.directive';\nexport { CngxStepLabel } from './step-label.directive';\nexport { CngxStepContent } from './step-content.directive';\n\nexport {\n CngxStepIndicator,\n type CngxStepIndicatorContext,\n} from './slots/step-indicator.directive';\n\nexport {\n CngxStepBadge,\n type CngxStepBadgeContext,\n} from './slots/step-badge.directive';\n\nexport {\n CngxStepBusySpinner,\n type CngxStepBusySpinnerContext,\n} from './slots/step-busy-spinner.directive';\n\nexport {\n CngxStepRejection,\n type CngxStepRejectionContext,\n} from './slots/step-rejection.directive';\n\nexport {\n CngxStepGroupHeader,\n type CngxStepGroupHeaderContext,\n} from './slots/step-group-header.directive';\n\nexport { CngxStepperEmpty } from './slots/stepper-empty.directive';\n\nexport {\n createStepperTemplateBindings,\n type CngxStepperTemplateBindings,\n type CngxStepperTemplateBindingsOptions,\n} from './slots/stepper-template-cascade';\n\nexport { CNGX_STEPPER_GLYPHS } from './glyphs';\n\nexport { CngxStepperRouterSync } from './router-sync.directive';\n\nexport {\n CNGX_STEPPER_CONFIG,\n type CngxStepperAriaLabels,\n type CngxStepperConfig,\n type CngxStepperConfigFeature,\n type CngxStepperFallbackLabels,\n type CngxStepperTemplates,\n injectStepperConfig,\n provideStepperConfig,\n provideStepperConfigAt,\n withStepperDefaultOrientation,\n withStepperAriaLabels,\n withStepperCommitMode,\n withStepperFallbackLabels,\n withStepperLinear,\n withStepperRouterSync,\n withStepIndicatorTemplate,\n withStepBadgeTemplate,\n withStepBusySpinnerTemplate,\n withStepRejectionTemplate,\n withStepGroupHeaderTemplate,\n withStepperEmptyTemplate,\n} from './stepper-config';\n\nexport {\n CNGX_STEPPER_I18N,\n type CngxStepperI18n,\n type CngxStepperI18nFeature,\n injectStepperI18n,\n provideStepperI18n,\n withStepperI18nLabels,\n} from './i18n/stepper-i18n';\n\nexport {\n CNGX_STEPPER_COMMIT_HANDLER_FACTORY,\n type CngxStepperCommitHandler,\n type CngxStepperCommitHandlerFactory,\n type CngxStepperCommitHandlerOptions,\n createStepperCommitHandler,\n} from './commit-handler';\n\nexport {\n provideCngxStepper,\n provideCngxStepperAt,\n type CngxStepperFeature,\n} from './provide-cngx-stepper';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AA4CA;;;;AAIG;AACG,SAAU,0BAA0B,CACxC,IAAqC,EAAA;AAErC,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,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,EACpE,OAAO,EACP,SAAS,EACT;AACE,gBAAA,SAAS,EAAE,MAAM,SAAS,CAAC,IAAI,CA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