@securitydept/client-angular 0.3.0-beta.3 → 0.3.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"securitydept-client-angular.mjs","sources":["../../src/lib/page-environment.ts","../../src/lib/planner-host.ts","../../src/lib/router.ts","../../src/lib/route-requirements.ts","../../src/lib/signal-bridge.ts","../../src/public-api.ts","../../src/securitydept-client-angular.ts"],"sourcesContent":["import { InjectionToken, type Provider } from \"@angular/core\";\nimport {\n\tassertResolveEnvironment,\n\ttype PageClientEnvironment,\n} from \"@securitydept/client/web\";\n\nexport type PageClientEnvironmentValue = PageClientEnvironment;\n\nexport interface PageClientEnvironmentService {\n\tresolvePageEnvironment(): Promise<PageClientEnvironmentValue>;\n}\n\nexport type PageClientEnvironmentResolver = () =>\n\t| PageClientEnvironmentValue\n\t| Promise<PageClientEnvironmentValue>;\n\nexport type PageClientEnvironmentSource =\n\t| PageClientEnvironmentValue\n\t| PageClientEnvironmentService\n\t| PageClientEnvironmentResolver;\n\nexport const PAGE_CLIENT_ENVIRONMENT = new InjectionToken<\n\tPageClientEnvironmentSource | undefined\n>(\"PAGE_CLIENT_ENVIRONMENT\", {\n\tprovidedIn: \"root\",\n\tfactory: () => undefined,\n});\n\nexport interface ProvidePageClientEnvironmentOptions {\n\t/**\n\t * Stable host-owned page environment source used by Angular page-only helpers.\n\t *\n\t * Accepts an already-materialized page environment object, a provider-scoped\n\t * `ClientEnvironmentService`, or an inject-safe stable resolver returning the\n\t * page capability synchronously or asynchronously.\n\t */\n\tenvironment: PageClientEnvironmentSource;\n}\n\nexport function providePageClientEnvironment(\n\toptions: ProvidePageClientEnvironmentOptions,\n): Provider {\n\treturn {\n\t\tprovide: PAGE_CLIENT_ENVIRONMENT,\n\t\tuseValue: options.environment,\n\t};\n}\n\nexport function resolvePageClientEnvironmentSource(\n\tsource: PageClientEnvironmentSource | undefined,\n\tonMissing: () => never,\n): Promise<PageClientEnvironmentValue> {\n\tconst resolvedSource = assertResolveEnvironment(source, onMissing);\n\n\tif (isPageClientEnvironmentResolver(resolvedSource)) {\n\t\treturn Promise.resolve(resolvedSource()).then((environment) =>\n\t\t\tassertResolveEnvironment(environment, onMissing),\n\t\t);\n\t}\n\n\tif (isPageClientEnvironmentService(resolvedSource)) {\n\t\treturn resolvedSource\n\t\t\t.resolvePageEnvironment()\n\t\t\t.then((environment) => assertResolveEnvironment(environment, onMissing));\n\t}\n\n\treturn Promise.resolve(resolvedSource);\n}\n\nfunction isPageClientEnvironmentResolver(\n\tsource: PageClientEnvironmentSource,\n): source is PageClientEnvironmentResolver {\n\treturn typeof source === \"function\";\n}\n\nfunction isPageClientEnvironmentService(\n\tsource: PageClientEnvironmentSource,\n): source is PageClientEnvironmentService {\n\treturn (\n\t\ttypeof source === \"object\" &&\n\t\tsource !== null &&\n\t\t\"resolvePageEnvironment\" in source &&\n\t\ttypeof source.resolvePageEnvironment === \"function\"\n\t);\n}\n","// Angular planner-host integration — DI-based planner provider / lookup\n//\n// Canonical import path:\n// import { AUTH_PLANNER_HOST, provideAuthPlannerHost, ... } from \"@securitydept/client-angular\"\n//\n// Provides Angular DI glue for the shared planner-host contract:\n// - InjectionToken for PlannerHost\n// - Provider helpers for app / module / route scoped planners\n// - InjectionToken + provider helpers for ScopedRequirementsClientSet\n// - injectPlannerHost() convenience function with fail-fast\n//\n// Architecture boundary:\n// - Does NOT own the planner-host contract (that lives in @securitydept/client)\n// - Does NOT carry token-set-specific mapping\n// - Provides the Angular DI wiring for the shared contract\n//\n// Stability: provisional\n\nimport {\n\ttype EnvironmentProviders,\n\tInjectionToken,\n\tinject,\n\tmakeEnvironmentProviders,\n} from \"@angular/core\";\nimport type {\n\tAuthGuardClientOption,\n\tCandidateSelector,\n\tCreatePlannerHostOptions,\n\tPlannerHost,\n\tScopedRequirementsClientSet,\n} from \"@securitydept/client/auth-coordination\";\nimport {\n\tcreatePlannerHost,\n\tresolveEffectiveClientSet,\n} from \"@securitydept/client/auth-coordination\";\n\n// ---------------------------------------------------------------------------\n// PlannerHost injection token\n// ---------------------------------------------------------------------------\n\n/**\n * DI token for the shared {@link PlannerHost}.\n *\n * Provide at the app level via {@link provideAuthPlannerHost}.\n * Guards use {@link injectPlannerHost} to look up the nearest instance.\n */\nexport const AUTH_PLANNER_HOST = new InjectionToken<PlannerHost>(\n\t\"AUTH_PLANNER_HOST\",\n);\n\n/**\n * Options for {@link provideAuthPlannerHost}.\n */\nexport interface ProvideAuthPlannerHostOptions {\n\t/**\n\t * Custom candidate selection strategy.\n\t * @see {@link CandidateSelector}\n\t */\n\tselectCandidate?: CandidateSelector;\n}\n\n/**\n * Provide an {@link AUTH_PLANNER_HOST} at the current injector level.\n *\n * Use in app config, route providers, or NgModule providers to establish\n * a planner-host scope. Child routes inherit the nearest parent's planner.\n *\n * @example\n * ```ts\n * // app.config.ts — app-level planner (default sequential strategy)\n * export const appConfig: ApplicationConfig = {\n * providers: [provideAuthPlannerHost()],\n * };\n *\n * // Feature route — override with custom async chooser strategy\n * {\n * path: \"admin\",\n * providers: [provideAuthPlannerHost({\n * selectCandidate: async (candidates) => showAdminChooser(candidates),\n * })],\n * children: [...]\n * }\n * ```\n */\nexport function provideAuthPlannerHost(\n\toptions?: ProvideAuthPlannerHostOptions,\n): EnvironmentProviders {\n\tconst plannerOptions: CreatePlannerHostOptions = {};\n\tif (options?.selectCandidate) {\n\t\tplannerOptions.selectCandidate = options.selectCandidate;\n\t}\n\treturn makeEnvironmentProviders([\n\t\t{ provide: AUTH_PLANNER_HOST, useValue: createPlannerHost(plannerOptions) },\n\t]);\n}\n\n/**\n * Inject the nearest {@link PlannerHost} from the DI hierarchy.\n *\n * Throws an explicit error if no planner-host is provided, preventing\n * silent fallback behavior.\n *\n * @example\n * ```ts\n * const plannerHost = injectPlannerHost();\n * const result = await plannerHost.evaluate(candidates);\n * ```\n */\nexport function injectPlannerHost(): PlannerHost {\n\tconst host = inject(AUTH_PLANNER_HOST, { optional: true });\n\tif (!host) {\n\t\tthrow new Error(\n\t\t\t\"[injectPlannerHost] No AUTH_PLANNER_HOST found in the injector hierarchy. \" +\n\t\t\t\t\"Use provideAuthPlannerHost() in your app config or route providers.\",\n\t\t);\n\t}\n\treturn host;\n}\n\n// ---------------------------------------------------------------------------\n// Requirements client set injection token — stores the already-resolved\n// effective options for the current scope (parent + child composed).\n// ---------------------------------------------------------------------------\n\n/**\n * DI token for the effective requirements client set at the current scope.\n *\n * The value is always the **resolved** options after composing all ancestor\n * scopes — it is NOT the raw `ScopedRequirementsClientSet` declaration.\n *\n * Provide via {@link provideRouteScopedRequirements}.\n * Guards inject this token to get the effective scope requirements and then\n * merge their own declared candidates on top.\n */\nexport const AUTH_REQUIREMENTS_CLIENT_SET = new InjectionToken<\n\treadonly AuthGuardClientOption[]\n>(\"AUTH_REQUIREMENTS_CLIENT_SET\");\n\n/**\n * Provide a {@link ScopedRequirementsClientSet} at the current route/module scope.\n *\n * Internally, the provider resolves the effective client set by composing the\n * declared `scopedSet` with the parent scope's already-resolved options\n * (injected via `skipSelf: true`). The token value stored in DI is the\n * resolved `readonly AuthGuardClientOption[]`, not the raw declaration.\n *\n * This mirrors the React `AuthRequirementsClientSetProvider` semantics:\n * each level stores its resolved effective options, so children inherit\n * the composed result without re-resolving the full ancestor chain.\n *\n * The `scopedSet` argument may also be a **factory function** — it will be\n * called inside Angular's `useFactory` context, so `inject()` is valid.\n * Use this when the requirement options need DI-resolved services (e.g. a\n * token-set registry or a redirect service).\n *\n * @example\n * ```ts\n * // routes.ts — static declaration (no DI needed)\n * {\n * path: \"\",\n * providers: [\n * provideRouteScopedRequirements({\n * composition: RequirementsClientSetComposition.Replace,\n * options: [sessionClientOption],\n * }),\n * ],\n * }\n *\n * // Feature route merges OIDC on top of the parent's session requirement\n * {\n * path: \"confluence\",\n * providers: [\n * provideRouteScopedRequirements({\n * composition: RequirementsClientSetComposition.Merge,\n * options: [confluenceOidcClientOption],\n * }),\n * ],\n * // Route-level DI scope only. Angular Router adopters should prefer\n * // secureRouteRoot()/secureRoute() over direct guard wiring.\n * }\n *\n * // Factory form — use when options depend on injected services\n * {\n * path: \"protected\",\n * providers: [\n * provideRouteScopedRequirements(() => {\n * const registry = inject(TokenSetAuthRegistry);\n * const authService = inject(AuthService);\n * return {\n * composition: RequirementsClientSetComposition.Replace,\n * options: [{\n * requirementId: \"oidc\",\n * requirementKind: \"frontend_oidc\",\n * checkAuthenticated: () => registry.require(clientKey).isAuthenticated(),\n * onUnauthenticated: () => { authService.redirectToLogin(clientKey).subscribe(); return false; },\n * }],\n * };\n * }),\n * ],\n * }\n * ```\n */\nexport function provideRouteScopedRequirements(\n\tscopedSet: ScopedRequirementsClientSet | (() => ScopedRequirementsClientSet),\n): EnvironmentProviders {\n\treturn makeEnvironmentProviders([\n\t\t{\n\t\t\tprovide: AUTH_REQUIREMENTS_CLIENT_SET,\n\t\t\tuseFactory: (): readonly AuthGuardClientOption[] => {\n\t\t\t\t// Walk up to the nearest parent scope's already-resolved effective set.\n\t\t\t\t// skipSelf: true ensures we don't read our own (not-yet-set) value.\n\t\t\t\tconst parentOptions: readonly AuthGuardClientOption[] =\n\t\t\t\t\tinject(AUTH_REQUIREMENTS_CLIENT_SET, {\n\t\t\t\t\t\toptional: true,\n\t\t\t\t\t\tskipSelf: true,\n\t\t\t\t\t}) ?? [];\n\t\t\t\t// Support factory form so callers can use inject() to resolve\n\t\t\t\t// DI services (e.g. auth registry, redirect service) inside their\n\t\t\t\t// option callbacks without bypassing this helper.\n\t\t\t\tconst resolved =\n\t\t\t\t\ttypeof scopedSet === \"function\" ? scopedSet() : scopedSet;\n\t\t\t\treturn resolveEffectiveClientSet(parentOptions, resolved);\n\t\t\t},\n\t\t},\n\t]);\n}\n\n// Re-export composition helpers so consumers don't need a second import\nexport { resolveEffectiveClientSet };\n","// Angular Router route adapter for auth-coordination\n//\n// Canonical import path:\n// import { ... } from \"@securitydept/client-angular\"\n//\n// Provides the projection layer between Angular Router's ActivatedRouteSnapshot\n// tree and the SDK's framework-agnostic RouteMatchNode[] contract.\n// Uses real @angular/router types (ActivatedRouteSnapshot) so consuming apps\n// get full type-safety and IDE autocomplete without any casting.\n//\n// Architecture boundary:\n// - Does NOT own the Angular router, guards, or navigation lifecycle.\n// - Does NOT re-export core orchestration primitives.\n// - Does NOT carry token-set-specific mapping or policy.\n// - The adopter wires this into their guards / resolvers.\n//\n// Stability: provisional\n\nimport { Injectable } from \"@angular/core\";\nimport type { ActivatedRouteSnapshot } from \"@angular/router\";\nimport type {\n\tAuthRequirement,\n\tRouteMatchNode,\n} from \"@securitydept/client/auth-coordination\";\n\n// ---------------------------------------------------------------------------\n// Projection options\n// ---------------------------------------------------------------------------\n\n/** Options for {@link AuthRouteAdapter} projection methods. */\nexport interface AuthRouteAdapterOptions {\n\t/**\n\t * Key used to read auth requirements from route `data`.\n\t *\n\t * @default \"authRequirements\"\n\t */\n\trequirementsKey?: string;\n}\n\n/** Default key for auth requirements in Angular route `data`. */\nexport const DEFAULT_ROUTE_REQUIREMENTS_KEY = \"authRequirements\";\n\n// ---------------------------------------------------------------------------\n// Guard adapter result\n// ---------------------------------------------------------------------------\n\n/** Result from {@link AuthRouteAdapter.check}. */\nexport interface RouteGuardResult {\n\t/** Whether all requirements are settled (route can activate). */\n\tcanActivate: boolean;\n\t/** The pending requirement still awaiting resolution, if any. */\n\tpendingRequirement: AuthRequirement | null;\n}\n\n// ---------------------------------------------------------------------------\n// Service\n// ---------------------------------------------------------------------------\n\n/**\n * Angular service that bridges Angular Router's `ActivatedRouteSnapshot` to\n * the SDK's framework-agnostic `RouteMatchNode[]` contract.\n *\n * Inject this into `CanActivateFn` guards or class-based guards.\n *\n * @example\n * ```ts\n * export const authGuard: CanActivateFn = (route) => {\n * const adapter = inject(AuthRouteAdapter);\n * const result = adapter.check(route, orchestrator);\n * if (!result.canActivate && result.pendingRequirement) {\n * // Trigger auth flow for the pending requirement\n * }\n * return result.canActivate;\n * };\n * ```\n */\n@Injectable({ providedIn: \"root\" })\nexport class AuthRouteAdapter {\n\t/**\n\t * Project the `pathFromRoot` of an `ActivatedRouteSnapshot` into the SDK's\n\t * `RouteMatchNode[]` chain.\n\t *\n\t * Route segments without a `routeConfig` (e.g. the root segment) are\n\t * assigned routeId `\"__root__\"`. Segments with a config use the `path`\n\t * as their routeId (or `\"__index__\"` for empty-path segments).\n\t */\n\tprojectRouteMatch(\n\t\tleafRoute: ActivatedRouteSnapshot,\n\t\toptions?: AuthRouteAdapterOptions,\n\t): RouteMatchNode[] {\n\t\tconst key = options?.requirementsKey ?? DEFAULT_ROUTE_REQUIREMENTS_KEY;\n\t\tconst chain = leafRoute.pathFromRoot ?? [leafRoute];\n\t\treturn chain.map((segment) => this.segmentToNode(segment, key));\n\t}\n\n\t/**\n\t * Project an explicit array of `ActivatedRouteSnapshot` segments into the\n\t * SDK's `RouteMatchNode[]` chain.\n\t *\n\t * Use when you already have a flattened chain (e.g. from\n\t * `ActivatedRoute.pathFromRoot`).\n\t */\n\tprojectRouteSegments(\n\t\tsegments: readonly ActivatedRouteSnapshot[],\n\t\toptions?: AuthRouteAdapterOptions,\n\t): RouteMatchNode[] {\n\t\tconst key = options?.requirementsKey ?? DEFAULT_ROUTE_REQUIREMENTS_KEY;\n\t\treturn segments.map((segment) => this.segmentToNode(segment, key));\n\t}\n\n\t/**\n\t * Project the route snapshot and check whether all requirements are settled.\n\t *\n\t * @param leafRoute - The leaf `ActivatedRouteSnapshot` from the guard call.\n\t * @param orchestrator - The SDK orchestrator managing the requirement plan.\n\t * @param options - Optional projection options.\n\t */\n\tcheck(\n\t\tleafRoute: ActivatedRouteSnapshot,\n\t\torchestrator: {\n\t\t\tactivateMatchedRoutes(chain: readonly RouteMatchNode[]): void;\n\t\t\tsnapshot(): {\n\t\t\t\tsettled: boolean;\n\t\t\t\tpendingRequirement: AuthRequirement | null;\n\t\t\t};\n\t\t},\n\t\toptions?: AuthRouteAdapterOptions,\n\t): RouteGuardResult {\n\t\tconst chain = this.projectRouteMatch(leafRoute, options);\n\t\torchestrator.activateMatchedRoutes(chain);\n\t\tconst snap = orchestrator.snapshot();\n\t\treturn {\n\t\t\tcanActivate: snap.settled,\n\t\t\tpendingRequirement: snap.pendingRequirement,\n\t\t};\n\t}\n\n\tprivate segmentToNode(\n\t\tsegment: ActivatedRouteSnapshot,\n\t\tkey: string,\n\t): RouteMatchNode {\n\t\tconst routeId = this.resolveRouteId(segment);\n\t\tconst rawRequirements =\n\t\t\tsegment.data[key] ?? segment.routeConfig?.data?.[key];\n\t\tconst requirements: AuthRequirement[] = Array.isArray(rawRequirements)\n\t\t\t? rawRequirements\n\t\t\t: [];\n\t\treturn { routeId, requirements };\n\t}\n\n\tprivate resolveRouteId(segment: ActivatedRouteSnapshot): string {\n\t\tif (!segment.routeConfig) return \"__root__\";\n\t\tconst path = segment.routeConfig.path;\n\t\tif (path === undefined || path === null || path === \"\") return \"__index__\";\n\t\treturn path;\n\t}\n}\n","// Angular route metadata requirement helper\n//\n// Canonical import path:\n// import { withRouteRequirements, extractFullRouteRequirements, ... } from \"@securitydept/client-angular\"\n//\n// Provides the canonical route-metadata layer for Angular Router auth requirement\n// declaration. Requirements are stored in route `data` rather than in DI scope,\n// enabling full-route aggregation guards to collect the complete requirement set\n// from the entire path-from-root chain in a single pass.\n//\n// Architecture boundary:\n// - Does NOT own auth enforcement or planner logic.\n// - Does NOT carry token-set-specific mapping or policy.\n// - Provides typed helpers for declaring and reading requirements from route data.\n// - framework-specific (Angular Router types) but requirement-system-agnostic.\n//\n// Relationship to provideRouteScopedRequirements():\n// - provideRouteScopedRequirements() is a lower-level DI-scope helper.\n// - This module is the canonical path for Angular Router auth requirement\n// declaration when full-route aggregation is needed.\n//\n// Key sentinel note:\n// DEFAULT_ROUTE_REQUIREMENTS_KEY is defined in router.ts (AuthRouteAdapter's\n// companion constant). ROUTE_REQUIREMENTS_DATA_KEY exported here is its\n// semantic alias — both hold the same value (\"authRequirements\").\n// Adopters may use either name; they are interchangeable.\n//\n// Stability: provisional\n\nimport type { ActivatedRouteSnapshot } from \"@angular/router\";\nimport {\n\ttype AuthRequirement,\n\tRequirementsClientSetComposition,\n} from \"@securitydept/client/auth-coordination\";\nimport { DEFAULT_ROUTE_REQUIREMENTS_KEY } from \"./router\";\n\n// ---------------------------------------------------------------------------\n// Route data key\n// ---------------------------------------------------------------------------\n\n/**\n * Default key for auth requirements in Angular route `data`.\n *\n * Semantic alias for {@link DEFAULT_ROUTE_REQUIREMENTS_KEY} (defined in\n * `router.ts`). Both hold the same value (`\"authRequirements\"`).\n * Use either name — they are interchangeable.\n *\n * Set this key in `Route.data` to declare auth requirements for a route segment:\n * ```ts\n * { path: \"dashboard\", data: withRouteRequirements([{ id: \"session\", kind: \"session\" }]) }\n * ```\n *\n * The key is also read by {@link AuthRouteAdapter} when projecting snapshots.\n *\n * @see {@link withRouteRequirements}\n * @see {@link extractFullRouteRequirements}\n */\nexport const ROUTE_REQUIREMENTS_DATA_KEY = DEFAULT_ROUTE_REQUIREMENTS_KEY;\n\n/**\n * Default key for the route-level composition strategy in Angular route `data`.\n *\n * Used together with {@link ROUTE_REQUIREMENTS_DATA_KEY}. The default\n * composition is `merge` when the key is omitted.\n */\nexport const ROUTE_REQUIREMENTS_COMPOSITION_DATA_KEY =\n\t\"authRequirementsComposition\";\n\n/**\n * Route-level auth requirement declaration stored in Angular route `data`.\n */\nexport interface RouteRequirementsDeclaration {\n\trequirements: readonly AuthRequirement[];\n\tcomposition: RequirementsClientSetComposition;\n}\n\n/**\n * Options for {@link withRouteRequirements}.\n */\nexport interface WithRouteRequirementsOptions {\n\t/**\n\t * How this route segment composes with its parent route chain.\n\t * @default RequirementsClientSetComposition.Merge\n\t */\n\tcomposition?: RequirementsClientSetComposition;\n\n\t/**\n\t * Additional route data properties to merge into the returned object.\n\t */\n\textra?: Record<string, unknown>;\n}\n\n// ---------------------------------------------------------------------------\n// Declaration helper\n// ---------------------------------------------------------------------------\n\n/**\n * Build an Angular route `data` object declaring auth requirements for a\n * single route segment.\n *\n * Use this as the `data` field in an Angular `Route` config. Nested routes\n * can declare their own requirements; a full-route aggregation guard will\n * walk the entire `pathFromRoot` chain to collect all requirements in one pass.\n *\n * @example\n * ```ts\n * // Parent route declares base requirement\n * {\n * path: \"app\",\n * data: withRouteRequirements([{ id: \"session\", kind: \"session\" }]),\n * children: [\n * // Child route adds an additional requirement\n * {\n * path: \"admin\",\n * data: withRouteRequirements([{ id: \"admin-oidc\", kind: \"backend_oidc\" }]),\n * canActivate: [createTokenSetRouteAggregationGuard(...)],\n * },\n * ],\n * }\n * ```\n *\n * @param requirements - One or more auth requirements for this route segment.\n * @param extra - Optional additional data properties to merge.\n */\nexport function withRouteRequirements(\n\trequirements: AuthRequirement[],\n\toptionsOrExtra?: WithRouteRequirementsOptions | Record<string, unknown>,\n\tmaybeExtra?: Record<string, unknown>,\n): Record<string, unknown> {\n\tconst { composition, extra } = normalizeRequirementOptions(\n\t\toptionsOrExtra,\n\t\tmaybeExtra,\n\t);\n\treturn {\n\t\t...extra,\n\t\t[ROUTE_REQUIREMENTS_DATA_KEY]: requirements,\n\t\t[ROUTE_REQUIREMENTS_COMPOSITION_DATA_KEY]: composition,\n\t};\n}\n\n// ---------------------------------------------------------------------------\n// Aggregation helper\n// ---------------------------------------------------------------------------\n\n/**\n * Extract and flatten auth requirements from a complete Angular route chain.\n *\n * Walks all segments from root to leaf (from `leafRoute.pathFromRoot`)\n * and concatenates the declared {@link AuthRequirement} arrays in order.\n * Requirements from ancestor routes appear before requirements from\n * descendant routes. Duplicate `id` values are NOT de-duplicated here —\n * the caller (guard / enforcement layer) is responsible for deduplication\n * or merge logic.\n *\n * This is the extraction counter-part to {@link withRouteRequirements}.\n * A full-route aggregation guard calls this once and hands the complete\n * flat array to the planner / enforcement layer.\n *\n * @param leafRoute - The leaf `ActivatedRouteSnapshot` from the guard call.\n * @param requirementsKey - Override the route data key (default: `\"authRequirements\"`).\n */\nexport function extractFullRouteRequirements(\n\tleafRoute: ActivatedRouteSnapshot,\n\trequirementsKey = ROUTE_REQUIREMENTS_DATA_KEY,\n\tcompositionKey = ROUTE_REQUIREMENTS_COMPOSITION_DATA_KEY,\n): AuthRequirement[] {\n\tconst chain = leafRoute.pathFromRoot ?? [leafRoute];\n\tlet result: AuthRequirement[] = [];\n\tfor (const segment of chain) {\n\t\tconst raw =\n\t\t\tsegment.data[requirementsKey] ??\n\t\t\tsegment.routeConfig?.data?.[requirementsKey];\n\t\tconst composition =\n\t\t\treadRouteComposition(segment, compositionKey) ??\n\t\t\tRequirementsClientSetComposition.Merge;\n\t\tconst requirements = Array.isArray(raw) ? (raw as AuthRequirement[]) : [];\n\t\tresult = resolveEffectiveRequirements(result, {\n\t\t\tcomposition,\n\t\t\trequirements,\n\t\t});\n\t}\n\treturn result;\n}\n\n/**\n * Resolve the effective auth requirements by composing the parent chain with a\n * child route declaration.\n *\n * Composition semantics mirror `resolveEffectiveClientSet()`:\n * - `inherit` keeps the parent requirements unchanged\n * - `merge` appends child requirements and replaces same-id parent entries\n * - `replace` discards the parent chain and uses only the child's requirements\n */\nexport function resolveEffectiveRequirements(\n\tparentRequirements: readonly AuthRequirement[],\n\tchild: RouteRequirementsDeclaration,\n): AuthRequirement[] {\n\tswitch (child.composition) {\n\t\tcase RequirementsClientSetComposition.Inherit:\n\t\t\treturn [...parentRequirements];\n\n\t\tcase RequirementsClientSetComposition.Merge: {\n\t\t\tconst merged = new Map<string, AuthRequirement>();\n\t\t\tfor (const requirement of parentRequirements) {\n\t\t\t\tmerged.set(requirement.id, requirement);\n\t\t\t}\n\t\t\tfor (const requirement of child.requirements) {\n\t\t\t\tmerged.set(requirement.id, requirement);\n\t\t\t}\n\t\t\treturn [...merged.values()];\n\t\t}\n\n\t\tcase RequirementsClientSetComposition.Replace:\n\t\t\treturn [...child.requirements];\n\n\t\tdefault: {\n\t\t\tconst _exhaustive: never = child.composition;\n\t\t\tthrow new Error(\n\t\t\t\t`[resolveEffectiveRequirements] Unknown composition: ${_exhaustive}`,\n\t\t\t);\n\t\t}\n\t}\n}\n\nfunction normalizeRequirementOptions(\n\toptionsOrExtra?: WithRouteRequirementsOptions | Record<string, unknown>,\n\tmaybeExtra?: Record<string, unknown>,\n): {\n\tcomposition: RequirementsClientSetComposition;\n\textra?: Record<string, unknown>;\n} {\n\tif (\n\t\toptionsOrExtra &&\n\t\t(\"composition\" in optionsOrExtra || \"extra\" in optionsOrExtra)\n\t) {\n\t\tconst options = optionsOrExtra as WithRouteRequirementsOptions;\n\t\treturn {\n\t\t\tcomposition:\n\t\t\t\toptions.composition ?? RequirementsClientSetComposition.Merge,\n\t\t\textra: maybeExtra ?? options.extra,\n\t\t};\n\t}\n\n\treturn {\n\t\tcomposition: RequirementsClientSetComposition.Merge,\n\t\textra: optionsOrExtra as Record<string, unknown> | undefined,\n\t};\n}\n\nfunction readRouteComposition(\n\tsegment: ActivatedRouteSnapshot,\n\tcompositionKey: string,\n): RequirementsClientSetComposition | undefined {\n\tconst raw =\n\t\tsegment.data[compositionKey] ?? segment.routeConfig?.data?.[compositionKey];\n\tif (\n\t\traw === RequirementsClientSetComposition.Inherit ||\n\t\traw === RequirementsClientSetComposition.Merge ||\n\t\traw === RequirementsClientSetComposition.Replace\n\t) {\n\t\treturn raw;\n\t}\n\treturn undefined;\n}\n","// Angular signal / Observable bridge utilities\n//\n// Canonical import path:\n// import { bridgeToAngularSignal, signalToObservable } from \"@securitydept/client-angular\"\n//\n// These utilities convert SDK-native ReadableSignalTrait values to Angular-native\n// primitives (WritableSignal, Observable) so that framework adapter packages\n// can surface reactive state using idiomatic Angular APIs.\n//\n// Owner: @securitydept/client-angular — these are generic framework bridges,\n// not token-set-specific utilities. All Angular adapters (basic-auth, session,\n// token-set, …) should import from here instead of implementing their own.\n//\n// Stability: provisional (framework adapter)\n\nimport type { WritableSignal } from \"@angular/core\";\nimport type { ReadableSignalTrait } from \"@securitydept/client\";\nimport { Observable } from \"rxjs\";\n\n/**\n * Bridge an SDK `ReadableSignalTrait` to an Angular writable signal.\n *\n * Immediately syncs the current value, then subscribes to future changes.\n *\n * @returns Cleanup function that unsubscribes from the SDK signal.\n */\nexport function bridgeToAngularSignal<T>(\n\tsource: ReadableSignalTrait<T>,\n\ttarget: WritableSignal<T>,\n): () => void {\n\ttarget.set(source.get());\n\treturn source.subscribe(() => {\n\t\ttarget.set(source.get());\n\t});\n}\n\n/**\n * Bridge an SDK `ReadableSignalTrait` to an RxJS Observable.\n *\n * The observable emits the current value immediately on subscribe, then\n * emits whenever the SDK signal value changes. Completes on unsubscribe.\n */\nexport function signalToObservable<T>(\n\tsource: ReadableSignalTrait<T>,\n): Observable<T> {\n\treturn new Observable<T>((subscriber) => {\n\t\tsubscriber.next(source.get());\n\t\tconst unsubscribe = source.subscribe(() => {\n\t\t\tsubscriber.next(source.get());\n\t\t});\n\t\treturn () => unsubscribe();\n\t});\n}\n","/*\n * Public API Surface of @securitydept/client-angular\n */\n\nexport * from \"./lib/page-environment\";\nexport * from \"./lib/planner-host\";\nexport * from \"./lib/route-requirements\";\nexport * from \"./lib/router\";\nexport * from \"./lib/signal-bridge\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAqBa,uBAAuB,GAAG,IAAI,cAAc,CAEvD,yBAAyB,EAAE;AAC5B,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,SAAS;AACxB,CAAA;AAaK,SAAU,4BAA4B,CAC3C,OAA4C,EAAA;IAE5C,OAAO;AACN,QAAA,OAAO,EAAE,uBAAuB;QAChC,QAAQ,EAAE,OAAO,CAAC,WAAW;KAC7B;AACF;AAEM,SAAU,kCAAkC,CACjD,MAA+C,EAC/C,SAAsB,EAAA;IAEtB,MAAM,cAAc,GAAG,wBAAwB,CAAC,MAAM,EAAE,SAAS,CAAC;AAElE,IAAA,IAAI,+BAA+B,CAAC,cAAc,CAAC,EAAE;QACpD,OAAO,OAAO,CAAC,OAAO,CAAC,cAAc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MAAK;QAC5B,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;AACzB,IAAA,CAAC,CAAC;AACH;AAEA;;;;;AAKG;AACG,SAAU,kBAAkB,CACjC,MAA8B,EAAA;AAE9B,IAAA,OAAO,IAAI,UAAU,CAAI,CAAC,UAAU,KAAI;QACvC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;AAC7B,QAAA,MAAM,WAAW,GAAG,MAAM,CAAC,SAAS,CAAC,MAAK;YACzC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;AAC9B,QAAA,CAAC,CAAC;AACF,QAAA,OAAO,MAAM,WAAW,EAAE;AAC3B,IAAA,CAAC,CAAC;AACH;;ACpDA;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"securitydept-client-angular.mjs","sources":["../../src/lib/injection.ts","../../src/lib/auth-coordination/route-metadata.ts","../../src/lib/auth-coordination/route-guard.ts","../../src/lib/auth-coordination/secure-routes.ts","../../src/lib/router.ts","../../src/lib/transport.ts","../../src/lib/environment.ts","../../src/lib/interop.ts","../../src/public-api.ts","../../src/securitydept-client-angular.ts"],"sourcesContent":["import {\n\tDestroyRef,\n\ttype EnvironmentProviders,\n\tInjectionToken,\n\tinject,\n\tmakeEnvironmentProviders,\n} from \"@angular/core\";\nimport {\n\tcreateSecuritydeptDestroyRef,\n\tSecuritydeptDestroyRef,\n\tSecuritydeptInjector,\n\ttype SecuritydeptProvider,\n} from \"@securitydept/client\";\n\nexport const SECURITYDEPT_INJECTOR = new InjectionToken<SecuritydeptInjector>(\n\t\"SECURITYDEPT_INJECTOR\",\n);\n\nexport interface ProvideSecuritydeptOptions {\n\treadonly providers?: readonly SecuritydeptProvider[];\n\treadonly autoCreateDestroyRef?: boolean;\n}\n\nexport function provideSecuritydept(\n\toptions: ProvideSecuritydeptOptions = {},\n): EnvironmentProviders {\n\treturn makeEnvironmentProviders([\n\t\t{\n\t\t\tprovide: SECURITYDEPT_INJECTOR,\n\t\t\tuseFactory: (): SecuritydeptInjector => {\n\t\t\t\tconst parentInjector =\n\t\t\t\t\tinject(SECURITYDEPT_INJECTOR, {\n\t\t\t\t\t\toptional: true,\n\t\t\t\t\t\tskipSelf: true,\n\t\t\t\t\t}) ?? undefined;\n\t\t\t\tconst angularDestroyRef = inject(DestroyRef);\n\t\t\t\tconst securitydeptDestroyRef =\n\t\t\t\t\toptions.autoCreateDestroyRef === false\n\t\t\t\t\t\t? null\n\t\t\t\t\t\t: createSecuritydeptDestroyRef();\n\t\t\t\tif (securitydeptDestroyRef) {\n\t\t\t\t\tangularDestroyRef.onDestroy(() => securitydeptDestroyRef.dispose());\n\t\t\t\t}\n\n\t\t\t\tconst providers = [\n\t\t\t\t\t...(options.providers ?? []),\n\t\t\t\t\t...(securitydeptDestroyRef\n\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tprovide: SecuritydeptDestroyRef,\n\t\t\t\t\t\t\t\t\tuseValue: securitydeptDestroyRef,\n\t\t\t\t\t\t\t\t} satisfies SecuritydeptProvider,\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t: []),\n\t\t\t\t];\n\t\t\t\treturn parentInjector\n\t\t\t\t\t? SecuritydeptInjector.fromParentInjector(parentInjector, providers)\n\t\t\t\t\t: SecuritydeptInjector.resolveAndCreate(providers);\n\t\t\t},\n\t\t},\n\t]);\n}\n","// Angular route metadata projection\n//\n// Canonical import path:\n// import { projectAngularRouteSegments } from \"@securitydept/client-angular\"\n//\n// Reads serializable auth requirement metadata declared in Angular route\n// `data` and projects a matched route chain (`pathFromRoot`) into the SDK's\n// framework-agnostic `RouteTreeSegment[]`. Composition folding is owned by the\n// `RouteCompositionRequirementPlanner`, so this layer only extracts per-segment\n// declarations.\n//\n// Route metadata storage is owned by `@securitydept/client`\n// ({@link readSecuritydeptRouteMetadata} / {@link writeSecuritydeptRouteMetadata}).\n//\n// Architecture boundary:\n// - Does NOT own auth enforcement, planner logic, or navigation.\n// - Does NOT carry token-set-specific mapping or policy.\n// - Framework-specific (Angular Router types) but requirement-system-agnostic.\n//\n// Stability: provisional\n\nimport { type ActivatedRouteSnapshot } from \"@angular/router\";\nimport {\n\ttype AuthRequirement,\n\ttype RouteTreeSegment,\n\treadSecuritydeptRouteMetadata,\n} from \"@securitydept/client\";\n\n/**\n * Resolved route `data` for a segment: static `routeConfig.data` merged with\n * snapshot `data` (snapshot wins on key collision).\n */\nexport function routeDataFromSegment(\n\tsegment: ActivatedRouteSnapshot,\n): Record<string, unknown> {\n\treturn {\n\t\t...(segment.routeConfig?.data ?? {}),\n\t\t...segment.data,\n\t};\n}\n\n/**\n * Project the `pathFromRoot` of an `ActivatedRouteSnapshot` into the SDK's\n * `RouteTreeSegment[]` chain (root -> leaf).\n *\n * Each segment carries its declared requirements and composition strategy;\n * inherit/merge/replace folding is applied later by the\n * `RouteCompositionRequirementPlanner`.\n *\n * Segments without a `routeConfig` (e.g. the root) get routeId `\"__root__\"`;\n * empty-path segments get `\"__index__\"`.\n */\nexport function projectAngularRouteSegments<\n\tTAuthRequirement extends AuthRequirement = AuthRequirement,\n>(leafRoute: ActivatedRouteSnapshot): RouteTreeSegment<TAuthRequirement>[] {\n\tconst chain = leafRoute.pathFromRoot ?? [leafRoute];\n\treturn chain.map((segment) => segmentToTreeNode<TAuthRequirement>(segment));\n}\n\nfunction segmentToTreeNode<TAuthRequirement extends AuthRequirement>(\n\tsegment: ActivatedRouteSnapshot,\n): RouteTreeSegment<TAuthRequirement> {\n\tconst metadata = readSecuritydeptRouteMetadata<TAuthRequirement>(\n\t\trouteDataFromSegment(segment),\n\t);\n\tconst requirements = metadata?.requirements ? [...metadata.requirements] : [];\n\tconst composition = metadata?.composition;\n\treturn composition\n\t\t? { routeId: resolveRouteId(segment), requirements, composition }\n\t\t: { routeId: resolveRouteId(segment), requirements };\n}\n\nfunction resolveRouteId(segment: ActivatedRouteSnapshot): string {\n\tif (!segment.routeConfig) {\n\t\treturn \"__root__\";\n\t}\n\tconst path = segment.routeConfig.path;\n\tif (path === undefined || path === null || path === \"\") {\n\t\treturn \"__index__\";\n\t}\n\treturn path;\n}\n","// Angular route guards — bridge to RouteCompositionRequirementPlanner\n//\n// Canonical import path:\n// import {\n// createAngularCanActivate,\n// createAngularCanActivateChild,\n// } from \"@securitydept/client-angular\"\n//\n// Produces Angular `CanActivateFn` / `CanActivateChildFn` guards that project\n// the matched route chain into `RouteTreeSegment[]`, run the SDK's\n// `RouteCompositionRequirementPlanner` against the nearest\n// `RequirementPlannerHost` resolved from the current Securitydept injector,\n// and map the pipeline result onto Angular's guard return contract (`true` /\n// `false` / `UrlTree`).\n//\n// Injection-context discipline: DI reads (host, Router) happen synchronously at\n// guard entry, before any `await`. Behaviour that needs DI services should be\n// provided through `provideSecuritydept({ providers: [...] })`, not inline\n// callbacks that call `inject()` here.\n//\n// Architecture boundary:\n// - Does NOT own behaviour (checkAuthenticated / onUnauthenticated) — that is\n// resolved through the RequirementPlannerHost chain.\n// - Does NOT carry token-set-specific mapping or policy.\n//\n// Stability: provisional\n\nimport { inject } from \"@angular/core\";\nimport {\n\ttype ActivatedRouteSnapshot,\n\ttype CanActivateChildFn,\n\ttype CanActivateFn,\n\tRouter,\n\ttype RouterStateSnapshot,\n\ttype UrlTree,\n} from \"@angular/router\";\nimport {\n\ttype AuthRequirement,\n\tENVIRONMENT_TOKEN,\n\tinjectRequirementPlannerHost,\n\tPipelineOutcome,\n\tREQUIREMENT_PLANNER_HOST,\n\ttype RequirementBehaviourWithRouteContext,\n\tRequirementPlannerHost,\n\ttype RequirementPlannerHostBehaviour,\n\ttype RouteBehaviourContextExtra,\n\tRouteCompositionRequirementPlanner,\n} from \"@securitydept/client\";\nimport { SECURITYDEPT_INJECTOR } from \"../injection\";\nimport { projectAngularRouteSegments } from \"./route-metadata\";\n\nexport interface CreateAngularGuardWithPlannerHostOptions<\n\tTAuthRequirement extends AuthRequirement = AuthRequirement,\n\tTBehaviour extends Partial<\n\t\tRequirementBehaviourWithRouteContext<TAuthRequirement>\n\t> = Partial<RequirementBehaviourWithRouteContext<TAuthRequirement>>,\n> {\n\t/**\n\t * Explicit planner host. When omitted, the guard uses the nearest\n\t * {@link REQUIREMENT_PLANNER_HOST} from the Securitydept injector, falling\n\t * back to an empty host only when no provider exists.\n\t */\n\treadonly plannerHost: RequirementPlannerHost<TBehaviour>;\n\treadonly behaviour?: never;\n}\n\nexport interface CreateAngularGuardWithBehaviourOptions<\n\tTAuthRequirement extends AuthRequirement = AuthRequirement,\n\tTBehaviour extends Partial<\n\t\tRequirementBehaviourWithRouteContext<TAuthRequirement>\n\t> = Partial<RequirementBehaviourWithRouteContext<TAuthRequirement>>,\n> {\n\treadonly plannerHost?: never;\n\treadonly behaviour?: RequirementPlannerHostBehaviour<\n\t\tTAuthRequirement,\n\t\tRouteBehaviourContextExtra,\n\t\tTBehaviour\n\t>;\n}\n\n/** Options shared by {@link createAngularCanActivate} and its child variant. */\nexport type CreateAngularGuardOptions<\n\tTAuthRequirement extends AuthRequirement = AuthRequirement,\n\tTBehaviour extends Partial<\n\t\tRequirementBehaviourWithRouteContext<TAuthRequirement>\n\t> = Partial<RequirementBehaviourWithRouteContext<TAuthRequirement>>,\n> =\n\t| CreateAngularGuardWithPlannerHostOptions<TAuthRequirement, TBehaviour>\n\t| CreateAngularGuardWithBehaviourOptions<TAuthRequirement, TBehaviour>;\n\nasync function runRouteGuard<\n\tTAuthRequirement extends AuthRequirement = AuthRequirement,\n\tTBehaviour extends Partial<\n\t\tRequirementBehaviourWithRouteContext<TAuthRequirement>\n\t> = Partial<RequirementBehaviourWithRouteContext<TAuthRequirement>>,\n>(\n\troute: ActivatedRouteSnapshot,\n\tstate: RouterStateSnapshot,\n\thost: RequirementPlannerHost<TBehaviour>,\n\trouter: Router,\n): Promise<boolean | UrlTree> {\n\tconst segments = projectAngularRouteSegments<TAuthRequirement>(route);\n\tconst planner = RouteCompositionRequirementPlanner.fromRouteSegments(\n\t\thost,\n\t\tsegments,\n\t\t{ url: state.url },\n\t);\n\tconst result = await planner.runUntilSettled();\n\tswitch (result.outcome) {\n\t\tcase PipelineOutcome.Settled:\n\t\t\treturn true;\n\t\tcase PipelineOutcome.Blocked:\n\t\t\treturn false;\n\t\tcase PipelineOutcome.Redirect:\n\t\t\treturn router.parseUrl(result.location);\n\t}\n}\n\n/**\n * Create a `CanActivateFn` bridging the route chain to the requirement\n * planner pipeline.\n */\nexport function createAngularCanActivate<\n\tTAuthRequirement extends AuthRequirement = AuthRequirement,\n\tTBehaviour extends Partial<\n\t\tRequirementBehaviourWithRouteContext<TAuthRequirement>\n\t> = Partial<RequirementBehaviourWithRouteContext<TAuthRequirement>>,\n>(\n\toptions?: CreateAngularGuardOptions<TAuthRequirement, TBehaviour>,\n): CanActivateFn {\n\treturn (route, state) => {\n\t\tconst securitydeptInjector = inject(SECURITYDEPT_INJECTOR, {\n\t\t\toptional: true,\n\t\t});\n\t\tconst parentHost = securitydeptInjector\n\t\t\t? injectRequirementPlannerHost<\n\t\t\t\t\tTAuthRequirement,\n\t\t\t\t\tRouteBehaviourContextExtra,\n\t\t\t\t\tTBehaviour\n\t\t\t\t>({ injector: securitydeptInjector })\n\t\t\t: null;\n\t\tconst host =\n\t\t\toptions?.plannerHost ??\n\t\t\t(options?.behaviour\n\t\t\t\t? RequirementPlannerHost.fromBehaviour(\n\t\t\t\t\t\ttypeof options.behaviour === \"function\"\n\t\t\t\t\t\t\t? options.behaviour()\n\t\t\t\t\t\t\t: options.behaviour,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparent: parentHost ?? undefined,\n\t\t\t\t\t\t\tenvironment:\n\t\t\t\t\t\t\t\tsecuritydeptInjector?.get(ENVIRONMENT_TOKEN, null) ?? undefined,\n\t\t\t\t\t\t},\n\t\t\t\t\t)\n\t\t\t\t: parentHost) ??\n\t\t\tRequirementPlannerHost.fromBehaviour({} as TBehaviour);\n\t\tconst router = inject(Router);\n\t\treturn runRouteGuard<TAuthRequirement, TBehaviour>(\n\t\t\troute,\n\t\t\tstate,\n\t\t\thost,\n\t\t\trouter,\n\t\t);\n\t};\n}\n\n/**\n * Create a `CanActivateChildFn` bridging the child route chain to the\n * requirement planner pipeline.\n */\nexport function createAngularCanActivateChild<\n\tTAuthRequirement extends AuthRequirement = AuthRequirement,\n\tTBehaviour extends Partial<\n\t\tRequirementBehaviourWithRouteContext<TAuthRequirement>\n\t> = Partial<RequirementBehaviourWithRouteContext<TAuthRequirement>>,\n>(\n\toptions?: CreateAngularGuardOptions<TAuthRequirement, TBehaviour>,\n): CanActivateChildFn {\n\treturn (childRoute, state) => {\n\t\tconst injector = inject(SECURITYDEPT_INJECTOR, {\n\t\t\toptional: true,\n\t\t});\n\t\tconst parentHost = injector\n\t\t\t? injectRequirementPlannerHost<\n\t\t\t\t\tTAuthRequirement,\n\t\t\t\t\tRouteBehaviourContextExtra,\n\t\t\t\t\tTBehaviour\n\t\t\t\t>({ injector })\n\t\t\t: null;\n\t\tconst host =\n\t\t\toptions?.plannerHost ??\n\t\t\t(options?.behaviour\n\t\t\t\t? RequirementPlannerHost.fromBehaviour(\n\t\t\t\t\t\ttypeof options.behaviour === \"function\"\n\t\t\t\t\t\t\t? options.behaviour()\n\t\t\t\t\t\t\t: options.behaviour,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparent: parentHost ?? undefined,\n\t\t\t\t\t\t\tenvironment: injector?.get(ENVIRONMENT_TOKEN, null) ?? undefined,\n\t\t\t\t\t\t},\n\t\t\t\t\t)\n\t\t\t\t: parentHost) ??\n\t\t\tRequirementPlannerHost.fromBehaviour({} as TBehaviour);\n\t\tconst router = inject(Router);\n\t\treturn runRouteGuard<TAuthRequirement, TBehaviour>(\n\t\t\tchildRoute,\n\t\t\tstate,\n\t\t\thost,\n\t\t\trouter,\n\t\t);\n\t};\n}\n","// Angular secure route helpers — declarative route assembly\n//\n// Canonical import path:\n// import { secureRoute, secureRouteRoot } from \"@securitydept/client-angular\"\n//\n// Two composable helpers for wiring auth requirements onto Angular routes:\n// - secureRoute: writes requirement metadata into route `data` ONLY.\n// - secureRouteRoot: writes metadata AND attaches the canActivate /\n// canActivateChild guards (and, optionally, a scoped\n// RequirementPlannerHost provider).\n//\n// The split lets a single guarded root route cover a whole subtree: child\n// segments declare their own requirements via `secureRoute`, and the root's\n// canActivateChild folds the full chain through the planner.\n//\n// Architecture boundary:\n// - Does NOT own behaviour or token-set-specific policy.\n// - Delegates enforcement to createAngularCanActivate/Child.\n//\n// Stability: provisional\n\nimport { type Route } from \"@angular/router\";\nimport {\n\ttype AuthRequirement,\n\tprovideRequirementPlannerHost,\n\ttype RequirementBehaviourWithRouteContext,\n\ttype RequirementPlannerHost,\n\ttype RequirementPlannerHostBehaviour,\n\ttype RequirementsComposition,\n\ttype RouteBehaviourContextExtra,\n\ttype SecuritydeptRouteMetadata,\n\twriteSecuritydeptRouteMetadata,\n} from \"@securitydept/client\";\nimport { provideSecuritydept } from \"../injection\";\nimport {\n\tcreateAngularCanActivate,\n\tcreateAngularCanActivateChild,\n} from \"./route-guard\";\n\nexport interface SecureRouteSecurityOptions<\n\tTAuthRequirement extends AuthRequirement = AuthRequirement,\n\tTBehaviour extends Partial<\n\t\tRequirementBehaviourWithRouteContext<TAuthRequirement>\n\t> = Partial<RequirementBehaviourWithRouteContext<TAuthRequirement>>,\n> {\n\t/** Auth requirements declared on this route segment. */\n\trequirements?: readonly TAuthRequirement[];\n\t/** Composition strategy against the inherited chain (default: `merge`). */\n\tcomposition?: RequirementsComposition;\n\t/**\n\t * Explicit planner host for the guards on a root route. When omitted, the\n\t * guard resolves the nearest host from DI (or a self-managed default).\n\t */\n\tplannerHost?: RequirementPlannerHost<TBehaviour>;\n\t/**\n\t * Behaviour to provide as a scoped {@link RequirementPlannerHost} at the\n\t * root route. Mounted via `provideSecuritydept({ providers: [...] })`.\n\t */\n\tbehaviour?: RequirementPlannerHostBehaviour<\n\t\tTAuthRequirement,\n\t\tRouteBehaviourContextExtra,\n\t\tTBehaviour\n\t>;\n}\n\n/** Additional route config merged into the produced {@link Route}. */\nexport type SecureRouteConfig = Omit<Route, \"path\">;\n\nfunction writeRequirementData<TAuthRequirement extends AuthRequirement>(\n\tsecurity: SecureRouteSecurityOptions<TAuthRequirement>,\n\tbase: Record<string, unknown> | undefined,\n): Record<string, unknown> {\n\tconst patch: SecuritydeptRouteMetadata<TAuthRequirement> = {};\n\tif (security.requirements !== undefined) {\n\t\tpatch.requirements = security.requirements;\n\t}\n\tif (security.composition !== undefined) {\n\t\tpatch.composition = security.composition;\n\t}\n\tif (Object.keys(patch).length === 0) {\n\t\treturn { ...(base ?? {}) };\n\t}\n\treturn writeSecuritydeptRouteMetadata(base, patch);\n}\n\n/**\n * Declare a secure route segment: writes requirement metadata into route\n * `data` only. No guard is attached — a guarded ancestor (see\n * {@link secureRouteRoot}) enforces the folded chain.\n */\nexport function secureRoute<\n\tTAuthRequirement extends AuthRequirement = AuthRequirement,\n\tTBehaviour extends Partial<\n\t\tRequirementBehaviourWithRouteContext<TAuthRequirement>\n\t> = Partial<RequirementBehaviourWithRouteContext<TAuthRequirement>>,\n>(\n\tpath: string,\n\tsecurity: SecureRouteSecurityOptions<TAuthRequirement, TBehaviour>,\n\trouteOptions?: SecureRouteConfig,\n): Route {\n\treturn {\n\t\t...routeOptions,\n\t\tpath,\n\t\tdata: writeRequirementData(security, routeOptions?.data),\n\t};\n}\n\n/**\n * Declare a guarded root route: writes requirement metadata AND attaches\n * `canActivate` + `canActivateChild` guards bound to the requirement planner.\n *\n * When `security.behaviour` is set, a scoped {@link RequirementPlannerHost}\n * provider is mounted so descendant guards inherit it through DI.\n */\nexport function secureRouteRoot<\n\tTAuthRequirement extends AuthRequirement = AuthRequirement,\n\tTBehaviour extends Partial<\n\t\tRequirementBehaviourWithRouteContext<TAuthRequirement>\n\t> = Partial<RequirementBehaviourWithRouteContext<TAuthRequirement>>,\n>(\n\tpath: string,\n\tsecurity: SecureRouteSecurityOptions<TAuthRequirement, TBehaviour>,\n\trouteOptions?: SecureRouteConfig,\n): Route {\n\tconst guardOptions = security.plannerHost\n\t\t? { plannerHost: security.plannerHost }\n\t\t: undefined;\n\tconst providers = security.behaviour\n\t\t? [\n\t\t\t\t...(routeOptions?.providers ?? []),\n\t\t\t\tprovideSecuritydept({\n\t\t\t\t\tproviders: [\n\t\t\t\t\t\tprovideRequirementPlannerHost<\n\t\t\t\t\t\t\tTAuthRequirement,\n\t\t\t\t\t\t\tRouteBehaviourContextExtra,\n\t\t\t\t\t\t\tTBehaviour\n\t\t\t\t\t\t>(security.behaviour),\n\t\t\t\t\t],\n\t\t\t\t}),\n\t\t\t]\n\t\t: routeOptions?.providers;\n\tconst route: Route = {\n\t\t...routeOptions,\n\t\tpath,\n\t\tdata: writeRequirementData(security, routeOptions?.data),\n\t\tcanActivate: [\n\t\t\t...(routeOptions?.canActivate ?? []),\n\t\t\tcreateAngularCanActivate<TAuthRequirement, TBehaviour>(guardOptions),\n\t\t],\n\t\tcanActivateChild: [\n\t\t\t...(routeOptions?.canActivateChild ?? []),\n\t\t\tcreateAngularCanActivateChild<TAuthRequirement, TBehaviour>(guardOptions),\n\t\t],\n\t};\n\tif (providers) {\n\t\troute.providers = providers;\n\t}\n\treturn route;\n}\n","// Angular Router trait adapter\n//\n// Canonical import path:\n// import { createRouterForAngular } from \"@securitydept/client-angular\"\n//\n// Projects an Angular `Router` (or any navigation-capable object) onto the\n// framework-agnostic `RouterTrait` (currentUrl + navigate) from\n// `@securitydept/client`. Adopters use this to give SDK primitives a way to\n// read the current URL and start navigations without depending on Angular.\n//\n// Architecture boundary:\n// - Does NOT own the Angular router, guards, or navigation lifecycle.\n// - Does NOT read auth requirements or run planners (see route-guard.ts).\n// - Does NOT carry token-set-specific mapping or policy.\n//\n// Stability: provisional\n\nimport {\n\ttype EnvironmentValidators,\n\tRouterNavigationMode,\n\ttype RouterNavigationRequest,\n\ttype RouterTrait,\n\tthrowValidationClientError,\n\tUriReferenceString,\n\tUriReferenceStringSchema,\n\tvalidateTraitInput,\n\ttype WithTraitInputValidator,\n} from \"@securitydept/client\";\nimport { type as defineType } from \"arktype\";\n\n/**\n * Minimal navigation surface required from an Angular `Router`.\n *\n * The real `@angular/router` `Router` satisfies this shape, so adopters pass\n * their injected `Router` directly.\n */\nexport interface AngularRouterNavigationLike {\n\turl?: string;\n\tnavigateByUrl(\n\t\turl: string,\n\t\toptions?: { replaceUrl?: boolean; state?: unknown },\n\t): Promise<boolean> | boolean;\n}\n\n/** Options for {@link createRouterForAngular}. */\nexport interface CreateRouterForAngularOptions {\n\t/** The Angular `Router` (or a compatible navigation object). */\n\trouter: AngularRouterNavigationLike;\n\t/** Override the current URL. Defaults to `router.url`. */\n\tcurrentUrl?: string | null;\n}\n\nexport interface ResolvedRouterForAngularCreateOptions {\n\trouter: AngularRouterNavigationLike;\n\tcurrentUrl: string | null;\n}\n\nexport const AngularRouterNavigationLikeSchema = defineType({\n\turl: \"string?\",\n\tnavigateByUrl: \"Function\",\n});\n\nconst ResolvedRouterForAngularCreateOptionsSchema = defineType({\n\trouter: AngularRouterNavigationLikeSchema,\n\tcurrentUrl: UriReferenceStringSchema.or(\"null\"),\n});\n\n/**\n * Create a {@link RouterTrait} backed by an Angular `Router`.\n *\n * @example\n * ```ts\n * const routerTrait = createRouterForAngular({ router: inject(Router) });\n * ```\n */\nexport function createRouterForAngular(\n\toptions: CreateRouterForAngularOptions &\n\t\tWithTraitInputValidator<Pick<EnvironmentValidators, \"router\">>,\n): RouterTrait {\n\tconst routerInput = options.router as\n\t\t| AngularRouterNavigationLike\n\t\t| null\n\t\t| undefined;\n\tconst resolvedCreateOptions: ResolvedRouterForAngularCreateOptions = {\n\t\trouter: options.router,\n\t\tget currentUrl() {\n\t\t\treturn Object.hasOwn(options, \"currentUrl\")\n\t\t\t\t? (options.currentUrl ?? null)\n\t\t\t\t: (routerInput?.url ?? null);\n\t\t},\n\t};\n\tvalidateTraitInput({\n\t\tvalue: resolvedCreateOptions,\n\t\tbundledSchema: ResolvedRouterForAngularCreateOptionsSchema,\n\t\tvalidator: options.validators?.router,\n\t\tonInvalid: (failure) =>\n\t\t\tthrowValidationClientError({\n\t\t\t\tcode: \"client_angular.router.invalid_router_options\",\n\t\t\t\tsource: \"client-angular\",\n\t\t\t\tmessagePrefix:\n\t\t\t\t\t\"createRouterForAngular could not validate routerForAngularCreateOptions\",\n\t\t\t\tfailure,\n\t\t\t}),\n\t});\n\tconst { router } = resolvedCreateOptions;\n\treturn {\n\t\tcurrentUrl() {\n\t\t\tconst currentUrl = resolvedCreateOptions.currentUrl;\n\t\t\treturn currentUrl == null ? null : UriReferenceString.parse(currentUrl);\n\t\t},\n\t\tasync navigate(request: RouterNavigationRequest) {\n\t\t\tawait router.navigateByUrl(request.url.toString(), {\n\t\t\t\treplaceUrl: request.mode === RouterNavigationMode.Replace,\n\t\t\t\tstate: request.state,\n\t\t\t});\n\t\t},\n\t};\n}\n","import {\n\ttype HttpResponse as AngularHttpResponse,\n\tHttpErrorResponse,\n\ttype HttpHeaders,\n} from \"@angular/common/http\";\nimport {\n\ttype BaseTransportTrait,\n\ttype CancellationTokenTrait,\n\tClientError,\n\tClientErrorKind,\n\tClientErrorSource,\n\ttype HttpRequest,\n\ttype HttpResponse,\n\ttype TraitInputValidator,\n\tTransportErrorCode,\n\tthrowValidationClientError,\n\tvalidateTraitInput,\n\ttype WithTraitInputValidator,\n} from \"@securitydept/client\";\nimport { type as defineType } from \"arktype\";\nimport { firstValueFrom, from, type Observable, takeUntil } from \"rxjs\";\n\nexport interface AngularHttpClientLike {\n\trequest(\n\t\tmethod: string,\n\t\turl: string,\n\t\toptions: {\n\t\t\tbody?: unknown;\n\t\t\theaders?: Record<string, string>;\n\t\t\tobserve: \"response\";\n\t\t\tresponseType: \"text\";\n\t\t},\n\t): Observable<AngularHttpResponse<string>>;\n}\n\nexport interface BaseTransportForAngularCreateOptions {\n\thttpClient: AngularHttpClientLike;\n\tbaseUrl?: string | URL;\n}\n\nexport const BaseTransportForAngularCreateOptionsSchema = defineType({\n\thttpClient: {\n\t\trequest: \"Function\",\n\t},\n\tbaseUrl: \"unknown\",\n});\n\nexport function createBaseTransportForAngular(\n\toptions: BaseTransportForAngularCreateOptions &\n\t\tWithTraitInputValidator<TraitInputValidator>,\n): BaseTransportTrait {\n\tconst resolvedCreateOptions = {\n\t\thttpClient: options.httpClient,\n\t\tbaseUrl: options.baseUrl,\n\t};\n\tvalidateTraitInput({\n\t\tvalue: resolvedCreateOptions,\n\t\tbundledSchema: BaseTransportForAngularCreateOptionsSchema,\n\t\tvalidator: options.validators,\n\t\tonInvalid: (failure) =>\n\t\t\tthrowValidationClientError({\n\t\t\t\tcode: TransportErrorCode.InvalidAngularOptions,\n\t\t\t\tsource: \"client-angular\",\n\t\t\t\tmessagePrefix:\n\t\t\t\t\t\"createBaseTransportForAngular could not validate transportForAngularCreateOptions\",\n\t\t\t\tfailure,\n\t\t\t}),\n\t});\n\tconst { httpClient, baseUrl } = resolvedCreateOptions;\n\n\treturn {\n\t\tasync execute(request: HttpRequest): Promise<HttpResponse> {\n\t\t\tconst requestUrl = baseUrl\n\t\t\t\t? new URL(request.url, baseUrl).toString()\n\t\t\t\t: request.url;\n\t\t\tconst requestOptions = {\n\t\t\t\theaders: request.headers,\n\t\t\t\tobserve: \"response\" as const,\n\t\t\t\tresponseType: \"text\" as const,\n\t\t\t\t...(request.body !== undefined &&\n\t\t\t\trequest.method !== \"GET\" &&\n\t\t\t\trequest.method !== \"HEAD\"\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tbody:\n\t\t\t\t\t\t\t\ttypeof request.body === \"string\"\n\t\t\t\t\t\t\t\t\t? request.body\n\t\t\t\t\t\t\t\t\t: JSON.stringify(request.body),\n\t\t\t\t\t\t}\n\t\t\t\t\t: {}),\n\t\t\t};\n\n\t\t\ttry {\n\t\t\t\tconst responseSource = request.cancellationToken\n\t\t\t\t\t? httpClient\n\t\t\t\t\t\t\t.request(request.method, requestUrl, requestOptions)\n\t\t\t\t\t\t\t.pipe(takeUntil(from(request.cancellationToken)))\n\t\t\t\t\t: httpClient.request(request.method, requestUrl, requestOptions);\n\t\t\t\tconst response = await firstValueFrom(responseSource);\n\t\t\t\ttry {\n\t\t\t\t\treturn angularResponseToHttpResponse(response);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthrow new ClientError({\n\t\t\t\t\t\tkind: ClientErrorKind.Protocol,\n\t\t\t\t\t\tmessage: \"The HTTP response body could not be decoded\",\n\t\t\t\t\t\tcode: TransportErrorCode.ResponseDecodeFailed,\n\t\t\t\t\t\tsource: ClientErrorSource.Transport,\n\t\t\t\t\t\tcause: error,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tif (error instanceof HttpErrorResponse && error.status !== 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn angularErrorResponseToHttpResponse(error);\n\t\t\t\t\t} catch (decodeError) {\n\t\t\t\t\t\tthrow new ClientError({\n\t\t\t\t\t\t\tkind: ClientErrorKind.Protocol,\n\t\t\t\t\t\t\tmessage: \"The HTTP response body could not be decoded\",\n\t\t\t\t\t\t\tcode: TransportErrorCode.ResponseDecodeFailed,\n\t\t\t\t\t\t\tsource: ClientErrorSource.Transport,\n\t\t\t\t\t\t\tcause: decodeError,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst normalized = normalizeAngularTransportError(\n\t\t\t\t\trequest.cancellationToken,\n\t\t\t\t\terror,\n\t\t\t\t);\n\t\t\t\tif (normalized instanceof ClientError) {\n\t\t\t\t\tthrow normalized;\n\t\t\t\t}\n\t\t\t\tthrow new ClientError({\n\t\t\t\t\tkind: ClientErrorKind.Transport,\n\t\t\t\t\tmessage: \"The HTTP request could not reach the remote service\",\n\t\t\t\t\tcode: TransportErrorCode.RequestFailed,\n\t\t\t\t\tsource: ClientErrorSource.Transport,\n\t\t\t\t\tretryable: true,\n\t\t\t\t\tcause: error,\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t};\n}\n\nfunction angularResponseToHttpResponse(\n\tresponse: AngularHttpResponse<string>,\n): HttpResponse {\n\treturn {\n\t\tstatus: response.status,\n\t\theaders: angularHeadersToRecord(response.headers),\n\t\tbody: parseAngularResponseBody(\n\t\t\tresponse.status,\n\t\t\tresponse.headers,\n\t\t\tresponse.body,\n\t\t),\n\t};\n}\n\nfunction angularErrorResponseToHttpResponse(\n\terror: HttpErrorResponse,\n): HttpResponse {\n\treturn {\n\t\tstatus: error.status,\n\t\theaders: angularHeadersToRecord(error.headers),\n\t\tbody: parseAngularResponseBody(error.status, error.headers, error.error),\n\t};\n}\n\nfunction angularHeadersToRecord(headers: HttpHeaders): Record<string, string> {\n\tconst responseHeaders: Record<string, string> = {};\n\tfor (const key of headers.keys()) {\n\t\tconst value = headers.get(key);\n\t\tif (value !== null) {\n\t\t\tresponseHeaders[key] = value;\n\t\t}\n\t}\n\treturn responseHeaders;\n}\n\nfunction parseAngularResponseBody(\n\tstatus: number,\n\theaders: HttpHeaders,\n\tbody: unknown,\n): unknown {\n\tconst contentType = headers.get(\"content-type\");\n\tif (contentType?.includes(\"application/json\") && typeof body === \"string\") {\n\t\treturn body.length > 0 ? JSON.parse(body) : undefined;\n\t}\n\tif (status !== 302 && status !== 303 && status !== 301) {\n\t\treturn body;\n\t}\n\treturn undefined;\n}\n\nfunction normalizeAngularTransportError(\n\ttoken: CancellationTokenTrait | undefined,\n\terror: unknown,\n): unknown {\n\tif (!token?.isCancellationRequested) {\n\t\treturn error;\n\t}\n\treturn token.cancellationError ?? error;\n}\n","import { HttpClient } from \"@angular/common/http\";\nimport {\n\tDestroyRef,\n\tInjectionToken,\n\tInjector,\n\tOptional,\n\ttype Provider,\n} from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport {\n\tcreateProviderIfTokenMissing,\n\tcreateSecuritydeptDestroyRef,\n\ttype FoundationEnvironment,\n\tgetSecuritydeptProviderToken,\n\tnotMissingProvider,\n\tROUTER_TRAIT_TOKEN,\n\tSecuritydeptDestroyRef,\n\ttype SecuritydeptProvider,\n\tTRANSPORT_TRAIT_TOKEN,\n} from \"@securitydept/client\";\nimport {\n\ttype ProvideSecuritydeptOptions,\n\tSECURITYDEPT_INJECTOR,\n} from \"./injection\";\nimport {\n\ttype CreateRouterForAngularOptions,\n\tcreateRouterForAngular,\n} from \"./router\";\nimport {\n\ttype BaseTransportForAngularCreateOptions,\n\tcreateBaseTransportForAngular,\n} from \"./transport\";\n\nexport const ENVIRONMENT = new InjectionToken<FoundationEnvironment>(\n\t\"ENVIRONMENT\",\n);\n\nexport const ENVIRONMENT_PROVIDER = new InjectionToken<SecuritydeptProvider>(\n\t\"ENVIRONMENT_PROVIDER\",\n);\n\nexport type EnvironmentCreatorOptions = {\n\tproviders?: readonly SecuritydeptProvider[];\n};\n\nexport type EnvironmentCreator<\n\tTOptions extends EnvironmentCreatorOptions,\n\tTEnvironment extends FoundationEnvironment,\n> = (options: TOptions) => TEnvironment;\n\nexport type CreateEnvironmentForAngularOptions<\n\tTBaseOptions extends EnvironmentCreatorOptions,\n\tTEnvironment extends FoundationEnvironment,\n> = Omit<\n\tTBaseOptions,\n\t| \"providers\"\n\t| \"routerForAngularCreateOptions\"\n\t| \"transportForAngularCreateOptions\"\n\t| \"injectorForAngularProvider\"\n\t| \"createBaseEnvironment\"\n> & {\n\tcreateBaseEnvironment: EnvironmentCreator<TBaseOptions, TEnvironment>;\n\trouterForAngularCreateOptions: CreateRouterForAngularOptions;\n\ttransportForAngularCreateOptions: BaseTransportForAngularCreateOptions;\n\tinjectorForAngularProvider?: Injector;\n\tproviders?: readonly SecuritydeptProvider[];\n};\n\nexport type ProvideEnvironmentOptions<\n\tTBaseOptions extends EnvironmentCreatorOptions,\n\tTEnvironment extends FoundationEnvironment,\n> = Omit<\n\tCreateEnvironmentForAngularOptions<TBaseOptions, TEnvironment>,\n\t| \"routerForAngularCreateOptions\"\n\t| \"transportForAngularCreateOptions\"\n\t| \"injectorForAngularProvider\"\n\t| \"providers\"\n> &\n\tProvideSecuritydeptOptions & {\n\t\trouterForAngularCreateOptions?: Partial<CreateRouterForAngularOptions>;\n\t\ttransportForAngularCreateOptions?: Partial<BaseTransportForAngularCreateOptions>;\n\t};\n\nexport function createEnvironmentForAngular<\n\tTBaseOptions extends EnvironmentCreatorOptions,\n\tTEnvironment extends FoundationEnvironment,\n>(\n\toptions: CreateEnvironmentForAngularOptions<TBaseOptions, TEnvironment>,\n): TEnvironment {\n\tconst {\n\t\tcreateBaseEnvironment,\n\t\trouterForAngularCreateOptions,\n\t\ttransportForAngularCreateOptions,\n\t\tinjectorForAngularProvider,\n\t\tproviders = [],\n\t\t...baseOptions\n\t} = options;\n\tconst externalProviderTokens = new Set(\n\t\tproviders.map((provider) => getSecuritydeptProviderToken(provider)),\n\t);\n\tconst angularProviders: SecuritydeptProvider[] = [\n\t\tcreateProviderIfTokenMissing(\n\t\t\texternalProviderTokens,\n\t\t\tROUTER_TRAIT_TOKEN,\n\t\t\t() => ({\n\t\t\t\tprovide: ROUTER_TRAIT_TOKEN,\n\t\t\t\tuseValue: createRouterForAngular(routerForAngularCreateOptions),\n\t\t\t}),\n\t\t),\n\t\tcreateProviderIfTokenMissing(\n\t\t\texternalProviderTokens,\n\t\t\tTRANSPORT_TRAIT_TOKEN,\n\t\t\t() => ({\n\t\t\t\tprovide: TRANSPORT_TRAIT_TOKEN,\n\t\t\t\tuseValue: createBaseTransportForAngular(\n\t\t\t\t\ttransportForAngularCreateOptions,\n\t\t\t\t),\n\t\t\t}),\n\t\t),\n\t\tinjectorForAngularProvider\n\t\t\t? createProviderIfTokenMissing(externalProviderTokens, Injector, () => ({\n\t\t\t\t\tprovide: Injector,\n\t\t\t\t\tuseValue: injectorForAngularProvider,\n\t\t\t\t}))\n\t\t\t: null,\n\t].filter(notMissingProvider) as SecuritydeptProvider[];\n\n\treturn createBaseEnvironment({\n\t\t...(baseOptions as unknown as Omit<TBaseOptions, \"providers\">),\n\t\tproviders: [...angularProviders, ...providers],\n\t} as unknown as TBaseOptions);\n}\n\nexport function provideEnvironment<\n\tTBaseOptions extends EnvironmentCreatorOptions,\n\tTEnvironment extends FoundationEnvironment,\n>(options: ProvideEnvironmentOptions<TBaseOptions, TEnvironment>): Provider[] {\n\treturn [\n\t\t{\n\t\t\tprovide: ENVIRONMENT,\n\t\t\tuseFactory: (\n\t\t\t\trouter: Router,\n\t\t\t\thttpClient: HttpClient,\n\t\t\t\tinjector: Injector,\n\t\t\t\tdestroyRef: DestroyRef,\n\t\t\t\tproviders: readonly SecuritydeptProvider[] | null,\n\t\t\t) => {\n\t\t\t\tconst {\n\t\t\t\t\tautoCreateDestroyRef,\n\t\t\t\t\tproviders: optionProviders,\n\t\t\t\t\t...environmentOptions\n\t\t\t\t} = options;\n\t\t\t\tconst securitydeptDestroyRef =\n\t\t\t\t\tautoCreateDestroyRef === false\n\t\t\t\t\t\t? null\n\t\t\t\t\t\t: createSecuritydeptDestroyRef();\n\t\t\t\tif (securitydeptDestroyRef) {\n\t\t\t\t\tdestroyRef.onDestroy(() => securitydeptDestroyRef.dispose());\n\t\t\t\t}\n\t\t\t\tconst environmentProviders = [\n\t\t\t\t\t...(optionProviders ?? []),\n\t\t\t\t\t...(providers ?? []),\n\t\t\t\t\t...(securitydeptDestroyRef\n\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tprovide: SecuritydeptDestroyRef,\n\t\t\t\t\t\t\t\t\tuseValue: securitydeptDestroyRef,\n\t\t\t\t\t\t\t\t} satisfies SecuritydeptProvider,\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t: []),\n\t\t\t\t];\n\t\t\t\treturn createEnvironmentForAngular({\n\t\t\t\t\t...environmentOptions,\n\t\t\t\t\trouterForAngularCreateOptions: {\n\t\t\t\t\t\trouter,\n\t\t\t\t\t\t...environmentOptions.routerForAngularCreateOptions,\n\t\t\t\t\t},\n\t\t\t\t\ttransportForAngularCreateOptions: {\n\t\t\t\t\t\thttpClient,\n\t\t\t\t\t\t...environmentOptions.transportForAngularCreateOptions,\n\t\t\t\t\t},\n\t\t\t\t\tinjectorForAngularProvider: injector,\n\t\t\t\t\tproviders: environmentProviders,\n\t\t\t\t} as unknown as CreateEnvironmentForAngularOptions<\n\t\t\t\t\tTBaseOptions,\n\t\t\t\t\tTEnvironment\n\t\t\t\t>);\n\t\t\t},\n\t\t\tdeps: [\n\t\t\t\tRouter,\n\t\t\t\tHttpClient,\n\t\t\t\tInjector,\n\t\t\t\tDestroyRef,\n\t\t\t\t[new Optional(), ENVIRONMENT_PROVIDER],\n\t\t\t],\n\t\t},\n\t\t{\n\t\t\tprovide: SECURITYDEPT_INJECTOR,\n\t\t\tuseFactory: (environment: FoundationEnvironment) => environment.injector,\n\t\t\tdeps: [ENVIRONMENT],\n\t\t},\n\t];\n}\n\nexport function provideEnvironmentProvider(\n\tprovider: SecuritydeptProvider,\n): Provider {\n\treturn {\n\t\tprovide: ENVIRONMENT_PROVIDER,\n\t\tuseValue: provider,\n\t\tmulti: true,\n\t};\n}\n","import { type Signal } from \"@angular/core\";\nimport {\n\trxResource,\n\ttype ToSignalOptions,\n\ttoSignal,\n} from \"@angular/core/rxjs-interop\";\nimport {\n\ttype InteropObservableTrait,\n\tSYMBOL_OBSERVABLE,\n} from \"@securitydept/client\";\n\nexport function toNgSignal<T>(\n\tsource: InteropObservableTrait<T>,\n): Signal<T | undefined>;\nexport function toNgSignal<T>(\n\tsource: InteropObservableTrait<T>,\n\toptions: NoInfer<ToSignalOptions<T | undefined>> & {\n\t\tinitialValue?: undefined;\n\t\trequireSync?: false;\n\t},\n): Signal<T | undefined>;\nexport function toNgSignal<T>(\n\tsource: InteropObservableTrait<T>,\n\toptions: NoInfer<ToSignalOptions<T | null>> & {\n\t\tinitialValue?: null;\n\t\trequireSync?: false;\n\t},\n): Signal<T | null>;\nexport function toNgSignal<T>(\n\tsource: InteropObservableTrait<T>,\n\toptions: NoInfer<ToSignalOptions<T>> & {\n\t\tinitialValue?: undefined;\n\t\trequireSync: true;\n\t},\n): Signal<T>;\nexport function toNgSignal<T, const U extends T>(\n\tsource: InteropObservableTrait<T>,\n\toptions: NoInfer<ToSignalOptions<T | U>> & {\n\t\tinitialValue: U;\n\t\trequireSync?: false;\n\t},\n): Signal<T | U>;\nexport function toNgSignal<T>(\n\tsource: InteropObservableTrait<T>,\n\toptions?: ToSignalOptions<T | undefined>,\n): Signal<T | undefined> {\n\treturn toSignal(source[SYMBOL_OBSERVABLE](), options as never) as Signal<\n\t\tT | undefined\n\t>;\n}\n\nexport const toNgResource = rxResource;\n","/*\n * Public API Surface of @securitydept/client-angular\n */\n\nexport * from \"./lib/auth-coordination\";\nexport * from \"./lib/environment\";\nexport * from \"./lib/injection\";\nexport * from \"./lib/interop\";\nexport * from \"./lib/router\";\nexport * from \"./lib/transport\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["defineType"],"mappings":";;;;;;;;MAca,qBAAqB,GAAG,IAAI,cAAc,CACtD,uBAAuB;AAQlB,SAAU,mBAAmB,CAClC,OAAA,GAAsC,EAAE,EAAA;AAExC,IAAA,OAAO,wBAAwB,CAAC;AAC/B,QAAA;AACC,YAAA,OAAO,EAAE,qBAAqB;YAC9B,UAAU,EAAE,MAA2B;AACtC,gBAAA,MAAM,cAAc,GACnB,MAAM,CAAC,qBAAqB,EAAE;AAC7B,oBAAA,QAAQ,EAAE,IAAI;AACd,oBAAA,QAAQ,EAAE,IAAI;iBACd,CAAC,IAAI,SAAS;AAChB,gBAAA,MAAM,iBAAiB,GAAG,MAAM,CAAC,UAAU,CAAC;AAC5C,gBAAA,MAAM,sBAAsB,GAC3B,OAAO,CAAC,oBAAoB,KAAK;AAChC,sBAAE;sBACA,4BAA4B,EAAE;gBAClC,IAAI,sBAAsB,EAAE;oBAC3B,iBAAiB,CAAC,SAAS,CAAC,MAAM,sBAAsB,CAAC,OAAO,EAAE,CAAC;gBACpE;AAEA,gBAAA,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A,OAAO,EAAE,sBAAsB;AAC/B,gCAAA,QAAQ,EAAE,sBAAsB;AACD,6BAAA;AAChC;0BACA,EAAE,CAAC;iBACN;AACD,gBAAA,OAAO,2BAA2B,CAAC;AAClC,oBAAA,GAAG,kBAAkB;AACrB,oBAAA,6BAA6B,EAAE;wBAC9B,MAAM;wBACN,GAAG,kBAAkB,CAAC,6BAA6B;AACnD,qBAAA;AACD,oBAAA,gCAAgC,EAAE;wBACjC,UAAU;wBACV,GAAG,kBAAkB,CAAC,gCAAgC;AACtD,qBAAA;AACD,oBAAA,0BAA0B,EAAE,QAAQ;AACpC,oBAAA,SAAS,EAAE,oBAAoB;AAI/B,iBAAA,CAAC;YACH,CAAC;AACD,YAAA,IAAI,EAAE;gBACL,MAAM;gBACN,UAAU;gBACV,QAAQ;gBACR,UAAU;AACV,gBAAA,CAAC,IAAI,QAAQ,EAAE,EAAE,oBAAoB,CAAC;AACtC,aAAA;AACD,SAAA;AACD,QAAA;AACC,YAAA,OAAO,EAAE,qBAAqB;YAC9B,UAAU,EAAE,CAAC,WAAkC,KAAK,WAAW,CAAC,QAAQ;YACxE,IAAI,EAAE,CAAC,WAAW,CAAC;AACnB,SAAA;KACD;AACF;AAEM,SAAU,0BAA0B,CACzC,QAA8B,EAAA;IAE9B,OAAO;AACN,QAAA,OAAO,EAAE,oBAAoB;AAC7B,QAAA,QAAQ,EAAE,QAAQ;AAClB,QAAA,KAAK,EAAE,IAAI;KACX;AACF;;AC1KM,SAAU,UAAU,CACzB,MAAiC,EACjC,OAAwC,EAAA;IAExC,OAAO,QAAQ,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,EAAE,OAAgB,CAE5D;AACF;AAEO,MAAM,YAAY,GAAG;;ACnD5B;;AAEG;;ACFH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@securitydept/client-angular",
3
- "version": "0.3.0-beta.3",
3
+ "version": "0.3.0-beta.5",
4
4
  "description": "Client Angular of the SecurityDept TypeScript SDK, a layered authentication and authorization toolkit built as reusable Rust crates, a TypeScript client SDK workspace, and reference server/web apps.",
5
5
  "author": "Zhou Yeheng <root@aitiotekt.com>",
6
6
  "license": "MIT",
@@ -41,10 +41,11 @@
41
41
  }
42
42
  },
43
43
  "peerDependencies": {
44
+ "@angular/common": ">=19.0.0",
44
45
  "@angular/core": ">=19.0.0",
45
46
  "@angular/router": ">=19.0.0",
46
47
  "rxjs": ">=7.0.0",
47
- "@securitydept/client": "0.3.0-beta.3"
48
+ "@securitydept/client": "0.3.0-beta.5"
48
49
  },
49
50
  "module": "fesm2022/securitydept-client-angular.mjs",
50
51
  "typings": "types/securitydept-client-angular.d.ts",