@steppy/angular 0.5.0 → 0.6.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.
@@ -282,11 +282,14 @@ function applyProps(el, p) {
282
282
  el.locale = p.locale;
283
283
  el.disabled = p.disabled;
284
284
  el.strings = p.strings;
285
+ el.theme = p.theme;
285
286
  el.source = p.source;
286
287
  if (p.targetTimeout !== undefined)
287
288
  el.targetTimeout = p.targetTimeout;
288
289
  if (p.baseZIndex !== undefined)
289
290
  el.baseZIndex = p.baseZIndex;
291
+ if (p.appearance !== undefined)
292
+ el.appearance = p.appearance;
290
293
  }
291
294
 
292
295
  const PREFIX = '[steppy-tours]';
@@ -329,6 +332,8 @@ class SteppyToursComponent {
329
332
  baseZIndex = input(undefined, { ...(ngDevMode ? { debugName: "baseZIndex" } : /* istanbul ignore next */ {}), transform: optionalNumber });
330
333
  disabled = input(undefined, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: optionalBoolean });
331
334
  strings = input(...(ngDevMode ? [undefined, { debugName: "strings" }] : /* istanbul ignore next */ []));
335
+ theme = input(...(ngDevMode ? [undefined, { debugName: "theme" }] : /* istanbul ignore next */ []));
336
+ appearance = input(...(ngDevMode ? [undefined, { debugName: "appearance" }] : /* istanbul ignore next */ []));
332
337
  source = input(...(ngDevMode ? [undefined, { debugName: "source" }] : /* istanbul ignore next */ []));
333
338
  tourStart = output();
334
339
  tourStep = output();
@@ -365,9 +370,11 @@ class SteppyToursComponent {
365
370
  locale: locale ?? this.tours.ɵlocale(),
366
371
  disabled: this.disabled() ?? c.disabled ?? false,
367
372
  strings: this.strings() ?? c.strings,
373
+ theme: this.theme() ?? c.theme,
368
374
  source: source !== undefined ? source : (c.source ?? null),
369
375
  targetTimeout: this.targetTimeout() ?? c.targetTimeout,
370
376
  baseZIndex: this.baseZIndex() ?? c.baseZIndex,
377
+ appearance: this.appearance() ?? c.appearance,
371
378
  };
372
379
  }, ...(ngDevMode ? [{ debugName: "props" }] : /* istanbul ignore next */ []));
373
380
  onEvent = (event) => this.zone.run(() => {
@@ -432,7 +439,7 @@ class SteppyToursComponent {
432
439
  this.tours.ɵrelease(this);
433
440
  }
434
441
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: SteppyToursComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
435
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.25", type: SteppyToursComponent, isStandalone: true, selector: "steppy-tours", inputs: { fallbackManifest: { classPropertyName: "fallbackManifest", publicName: "fallbackManifest", isSignal: true, isRequired: false, transformFunction: null }, manifest: { classPropertyName: "manifest", publicName: "manifest", isSignal: true, isRequired: false, transformFunction: null }, buildId: { classPropertyName: "buildId", publicName: "buildId", isSignal: true, isRequired: false, transformFunction: null }, guideOrigin: { classPropertyName: "guideOrigin", publicName: "guideOrigin", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, targetTimeout: { classPropertyName: "targetTimeout", publicName: "targetTimeout", isSignal: true, isRequired: false, transformFunction: null }, baseZIndex: { classPropertyName: "baseZIndex", publicName: "baseZIndex", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, strings: { classPropertyName: "strings", publicName: "strings", isSignal: true, isRequired: false, transformFunction: null }, source: { classPropertyName: "source", publicName: "source", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tourStart: "tourStart", tourStep: "tourStep", tourComplete: "tourComplete", tourDismiss: "tourDismiss", tourOffpath: "tourOffpath", tourError: "tourError" }, host: { styleAttribute: "display: contents" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
442
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.25", type: SteppyToursComponent, isStandalone: true, selector: "steppy-tours", inputs: { fallbackManifest: { classPropertyName: "fallbackManifest", publicName: "fallbackManifest", isSignal: true, isRequired: false, transformFunction: null }, manifest: { classPropertyName: "manifest", publicName: "manifest", isSignal: true, isRequired: false, transformFunction: null }, buildId: { classPropertyName: "buildId", publicName: "buildId", isSignal: true, isRequired: false, transformFunction: null }, guideOrigin: { classPropertyName: "guideOrigin", publicName: "guideOrigin", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, targetTimeout: { classPropertyName: "targetTimeout", publicName: "targetTimeout", isSignal: true, isRequired: false, transformFunction: null }, baseZIndex: { classPropertyName: "baseZIndex", publicName: "baseZIndex", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, strings: { classPropertyName: "strings", publicName: "strings", isSignal: true, isRequired: false, transformFunction: null }, theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, source: { classPropertyName: "source", publicName: "source", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tourStart: "tourStart", tourStep: "tourStep", tourComplete: "tourComplete", tourDismiss: "tourDismiss", tourOffpath: "tourOffpath", tourError: "tourError" }, host: { styleAttribute: "display: contents" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
436
443
  }
437
444
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: SteppyToursComponent, decorators: [{
438
445
  type: Component,
@@ -442,7 +449,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
442
449
  changeDetection: ChangeDetectionStrategy.OnPush,
443
450
  host: { style: 'display: contents' },
444
451
  }]
445
- }], ctorParameters: () => [], propDecorators: { fallbackManifest: [{ type: i0.Input, args: [{ isSignal: true, alias: "fallbackManifest", required: false }] }], manifest: [{ type: i0.Input, args: [{ isSignal: true, alias: "manifest", required: false }] }], buildId: [{ type: i0.Input, args: [{ isSignal: true, alias: "buildId", required: false }] }], guideOrigin: [{ type: i0.Input, args: [{ isSignal: true, alias: "guideOrigin", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], targetTimeout: [{ type: i0.Input, args: [{ isSignal: true, alias: "targetTimeout", required: false }] }], baseZIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseZIndex", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], strings: [{ type: i0.Input, args: [{ isSignal: true, alias: "strings", required: false }] }], source: [{ type: i0.Input, args: [{ isSignal: true, alias: "source", required: false }] }], tourStart: [{ type: i0.Output, args: ["tourStart"] }], tourStep: [{ type: i0.Output, args: ["tourStep"] }], tourComplete: [{ type: i0.Output, args: ["tourComplete"] }], tourDismiss: [{ type: i0.Output, args: ["tourDismiss"] }], tourOffpath: [{ type: i0.Output, args: ["tourOffpath"] }], tourError: [{ type: i0.Output, args: ["tourError"] }] } });
452
+ }], ctorParameters: () => [], propDecorators: { fallbackManifest: [{ type: i0.Input, args: [{ isSignal: true, alias: "fallbackManifest", required: false }] }], manifest: [{ type: i0.Input, args: [{ isSignal: true, alias: "manifest", required: false }] }], buildId: [{ type: i0.Input, args: [{ isSignal: true, alias: "buildId", required: false }] }], guideOrigin: [{ type: i0.Input, args: [{ isSignal: true, alias: "guideOrigin", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], targetTimeout: [{ type: i0.Input, args: [{ isSignal: true, alias: "targetTimeout", required: false }] }], baseZIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseZIndex", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], strings: [{ type: i0.Input, args: [{ isSignal: true, alias: "strings", required: false }] }], theme: [{ type: i0.Input, args: [{ isSignal: true, alias: "theme", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], source: [{ type: i0.Input, args: [{ isSignal: true, alias: "source", required: false }] }], tourStart: [{ type: i0.Output, args: ["tourStart"] }], tourStep: [{ type: i0.Output, args: ["tourStep"] }], tourComplete: [{ type: i0.Output, args: ["tourComplete"] }], tourDismiss: [{ type: i0.Output, args: ["tourDismiss"] }], tourOffpath: [{ type: i0.Output, args: ["tourOffpath"] }], tourError: [{ type: i0.Output, args: ["tourError"] }] } });
446
453
 
447
454
  /**
448
455
  * Start a tour on click:
@@ -1 +1 @@
1
- {"version":3,"file":"steppy-angular.mjs","sources":["../../src/config.ts","../../src/tours.service.ts","../../src/provide.ts","../../src/navigate.ts","../../src/overlay.ts","../../src/tours.component.ts","../../src/tour-start.directive.ts","../../src/public-api.ts","../../src/steppy-angular.ts"],"sourcesContent":["import { InjectionToken, type Signal } from '@angular/core';\nimport type { TourNavigate, TourSource, TourStringOverrides } from '@steppy/player/tour';\n\n/**\n * Where the tours' language comes from. A string or a signal is used as is; a\n * function is called once, in the root injection context, so it may\n * ``inject()`` the app's i18n service and return a signal of its language.\n * ``null``, ``undefined`` and ``''`` all mean \"follow ``<html lang>``\".\n */\nexport type SteppyLocaleSource =\n | string\n | Signal<string | null | undefined>\n | (() => string | Signal<string | null | undefined>);\n\n/** How a tour changes route; ``(path, {appPath, tourId}) => …`` for your own. */\nexport type SteppyNavigate = TourNavigate;\n\nexport interface SteppyToursConfig {\n /** The tour manifest bundled with the app (same origin), e.g. ``tours/tours.manifest.json``. */\n fallbackManifest?: string;\n /** A remote manifest URL; may contain ``{buildId}``. */\n manifest?: string;\n /** The app's build id, for ``{buildId}``. Default: the bundled manifest's. */\n buildId?: string;\n /** The origin trusted for guide links. Default: the bundled manifest's. */\n guideOrigin?: string;\n /** Milliseconds to wait for a step's element (500–120000). Default: the overlay's 8000. */\n targetTimeout?: number;\n /** Stacking where the top layer is unavailable. Default: the overlay's. */\n baseZIndex?: number;\n /** Turns tours off; stops a running one. */\n disabled?: boolean;\n /** Chrome string overrides per locale (buttons, hints). */\n strings?: TourStringOverrides;\n /** Supply tour files yourself; see the overlay's ``source`` property. */\n source?: TourSource | null;\n /** The tours' language. Default: ``<html lang>``. */\n locale?: SteppyLocaleSource;\n /**\n * ``'router'`` (default): the Angular router, inside the zone; a refused or\n * redirected navigation fails the tour at once. ``'document'``: a full page\n * load. Or a function of your own.\n */\n navigate?: 'router' | 'document' | SteppyNavigate;\n /** How long ``start()`` waits for ``<steppy-tours>`` and the overlay to load. Default 10000 ms. */\n readyTimeout?: number;\n}\n\nexport const STEPPY_TOURS_CONFIG = new InjectionToken<SteppyToursConfig>('STEPPY_TOURS_CONFIG');\n\nexport const DEFAULT_READY_TIMEOUT_MS = 10_000;\n","import { Injectable, NgZone, PLATFORM_ID, computed, inject, isSignal, signal, type Signal } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { Observable, Subject } from 'rxjs';\nimport type { TourErrorDetail, TourEventDetailMap, TourPosition, TourStartOptions } from '@steppy/player/tour';\n\nimport { DEFAULT_READY_TIMEOUT_MS, STEPPY_TOURS_CONFIG, type SteppyLocaleSource, type SteppyToursConfig } from './config';\nimport type { TourHostElement } from './overlay';\n\n/** One overlay event, as the service and the component outputs see it. */\nexport type SteppyTourEvent = {\n [K in keyof TourEventDetailMap]: { type: K; detail: TourEventDetailMap[K] };\n}[keyof TourEventDetailMap];\n\nconst PREFIX = '[steppy-tours]';\n\n/**\n * Start and follow in-app tours from anywhere in the app.\n *\n * The overlay itself lives in ``<steppy-tours>``, placed once in the app\n * shell; ``start()`` waits for it to be mounted and loaded (up to\n * ``readyTimeout``), so a help button can call it during startup. State is\n * built from the overlay's six events and exposed as signals; on the server\n * every call is a no-op.\n */\n@Injectable({ providedIn: 'root' })\nexport class SteppyTours {\n private readonly zone = inject(NgZone);\n private readonly browser = isPlatformBrowser(inject(PLATFORM_ID));\n\n /** @internal */\n readonly ɵconfig: SteppyToursConfig = inject(STEPPY_TOURS_CONFIG, { optional: true }) ?? {};\n /** @internal The configured locale source, resolved once in the root injection context. */\n readonly ɵlocale: Signal<string> = resolveLocale(this.ɵconfig.locale);\n\n private readonly _active = signal(false);\n private readonly _current = signal<TourPosition | null>(null);\n private readonly _lastError = signal<TourErrorDetail | null>(null);\n private readonly _events = new Subject<SteppyTourEvent>();\n\n /** A tour is running (from ``tour-start`` until it completes, is dismissed or fails). */\n readonly active: Signal<boolean> = this._active.asReadonly();\n /** The step shown, or ``null`` before the first step and after the end. */\n readonly current: Signal<TourPosition | null> = this._current.asReadonly();\n /** The last ``tour-error`` since the last start (fatal or not). */\n readonly lastError: Signal<TourErrorDetail | null> = this._lastError.asReadonly();\n /** Every overlay event, in order, delivered inside the Angular zone. */\n readonly events: Observable<SteppyTourEvent> = this._events.asObservable();\n\n private owner: object | null = null;\n private host: TourHostElement | null = null;\n private failed = false;\n private waiters: ((host: TourHostElement | null) => void)[] = [];\n private seq = 0;\n\n /**\n * Start a tour. Resolves ``true`` once it started, ``false`` when it could\n * not (a ``tour-error`` says why), when no ``<steppy-tours>`` is mounted\n * in time, when a later ``start()``/``stop()`` superseded this call, or on\n * the server. Never rejects.\n */\n async start(tourId: string, options: TourStartOptions = {}): Promise<boolean> {\n if (!this.browser) return false;\n const seq = ++this.seq;\n const host = await this.whenReady();\n if (seq !== this.seq) return false;\n if (!host) {\n console.warn(\n this.failed\n ? `${PREFIX} start(\"${tourId}\"): the tour overlay failed to load`\n : `${PREFIX} start(\"${tourId}\"): no <steppy-tours> is mounted, or the overlay did not load ` +\n `within ${this.readyTimeout()} ms. Place <steppy-tours /> once in the app shell.`,\n );\n return false;\n }\n // Outside the zone: the overlay's observers, polls and frames must not\n // drive change detection.\n return this.zone.runOutsideAngular(() => host.start(tourId, options));\n }\n\n /** End the running tour (``reason`` is passed to ``tour-dismiss``); also cancels a waiting ``start()``. */\n stop(reason?: string): void {\n this.seq++;\n this.flush(null);\n const host = this.host;\n if (host) this.zone.runOutsideAngular(() => host.stop(reason));\n }\n\n /** Advance the current step, whatever its kind. */\n next(): void {\n const host = this.host;\n if (host) this.zone.runOutsideAngular(() => host.next());\n }\n\n // ── Used by <steppy-tours> ──────────────────────────────────────────────\n\n /** @internal The first component to mount owns the overlay. */\n ɵclaim(owner: object): boolean {\n if (this.owner !== null && this.owner !== owner) return false;\n this.owner = owner;\n return true;\n }\n\n /** @internal The overlay is defined (``host``) or failed to load (``null``). */\n ɵready(owner: object, host: TourHostElement | null): void {\n if (this.owner !== owner) return;\n this.host = host;\n this.failed = host === null;\n this.flush(host);\n }\n\n /** @internal The owning component was destroyed. */\n ɵrelease(owner: object): void {\n if (this.owner !== owner) return;\n this.owner = null;\n this.host = null;\n this.failed = false;\n this._active.set(false);\n this._current.set(null);\n }\n\n /** @internal One overlay event (already inside the zone). */\n ɵrecord(event: SteppyTourEvent): void {\n switch (event.type) {\n case 'tour-start':\n this._active.set(true);\n this._current.set(null);\n this._lastError.set(null);\n break;\n case 'tour-step': {\n const { tourId, stepId, index, total } = event.detail;\n this._active.set(true);\n this._current.set({ tourId, stepId, index, total });\n break;\n }\n case 'tour-complete':\n case 'tour-dismiss':\n this._active.set(false);\n this._current.set(null);\n break;\n case 'tour-error':\n this._lastError.set(event.detail);\n if (event.detail.fatal) {\n this._active.set(false);\n this._current.set(null);\n }\n break;\n case 'tour-offpath':\n break;\n }\n this._events.next(event);\n }\n\n // ── Internals ──────────────────────────────────────────────────────────────\n\n private readyTimeout(): number {\n return this.ɵconfig.readyTimeout ?? DEFAULT_READY_TIMEOUT_MS;\n }\n\n private whenReady(): Promise<TourHostElement | null> {\n if (this.host) return Promise.resolve(this.host);\n if (this.failed) return Promise.resolve(null);\n return new Promise((resolve) => {\n let timer: ReturnType<typeof setTimeout> | undefined;\n const done = (host: TourHostElement | null) => {\n clearTimeout(timer);\n this.waiters = this.waiters.filter((w) => w !== done);\n resolve(host);\n };\n this.waiters.push(done);\n // Outside the zone: a pending timer would keep a zone.js app from ever\n // becoming stable while it waits.\n timer = this.zone.runOutsideAngular(() => setTimeout(() => done(null), this.readyTimeout()));\n });\n }\n\n private flush(host: TourHostElement | null): void {\n for (const waiter of [...this.waiters]) waiter(host);\n }\n}\n\nfunction resolveLocale(source: SteppyLocaleSource | undefined): Signal<string> {\n if (source === undefined) return computed(() => '');\n if (typeof source === 'string') return computed(() => source);\n if (isSignal(source)) return computed(() => source() ?? '');\n const made = source();\n return typeof made === 'string' ? computed(() => made) : computed(() => made() ?? '');\n}\n","import { inject, isDevMode, makeEnvironmentProviders, provideEnvironmentInitializer, type EnvironmentProviders } from '@angular/core';\n\nimport { STEPPY_TOURS_CONFIG, type SteppyToursConfig } from './config';\nimport { SteppyTours } from './tours.service';\n\n/**\n * Configure in-app tours for the app, in ``app.config.ts``:\n *\n * ```ts\n * provideSteppyTours({\n * fallbackManifest: 'tours/tours.manifest.json',\n * locale: () => {\n * const translate = inject(TranslateService);\n * return toSignal(translate.onLangChange.pipe(map((e) => e.lang)), { initialValue: translate.getCurrentLang() ?? '' });\n * },\n * })\n * ```\n *\n * Then place ``<steppy-tours />`` once in the app shell.\n */\nexport function provideSteppyTours(config: SteppyToursConfig = {}): EnvironmentProviders {\n return makeEnvironmentProviders([\n { provide: STEPPY_TOURS_CONFIG, useValue: config },\n provideEnvironmentInitializer(() => {\n if (isDevMode() && inject(SteppyTours).ɵconfig !== config) {\n console.warn(\n '[steppy-tours] provideSteppyTours() has no effect here: the tours service is a root ' +\n 'singleton. Call it in the application providers (app.config.ts), not in a lazy route.',\n );\n }\n }),\n ]);\n}\n","import { inject, NgZone } from '@angular/core';\nimport { Router, ROUTES } from '@angular/router';\nimport type { TourNavigate } from '@steppy/player/tour';\n\nimport type { SteppyToursConfig } from './config';\n\n/**\n * The ``navigate`` hook the overlay calls to reach a tour's entry route (or a\n * route linked from step text). Call it in an injection context.\n *\n * The overlay calls it from outside the Angular zone; the router — and the\n * routed view it renders — must run inside it, or a zone.js app never renders\n * the page the tour waits on. Returns ``null`` for ``'document'``, and when the\n * app has no routes, so the overlay falls back to a full page load.\n */\nexport function createNavigate(option: SteppyToursConfig['navigate'] = 'router'): TourNavigate | null {\n if (option === 'document') return null;\n const zone = inject(NgZone);\n let go: TourNavigate;\n if (option === 'router') {\n if (!inject(ROUTES, { optional: true })) return null;\n go = routerNavigate(inject(Router));\n } else {\n go = option;\n }\n // ``async``: a synchronous throw becomes a rejection, which the overlay reports.\n return (path, ctx) => zone.run(async () => void (await go(path, ctx)));\n}\n\n/**\n * Navigate with the router and settle only once the router is where the tour\n * wants to be. ``navigateByUrl`` resolves ``false`` both for a refused\n * navigation and for one to the current URL, and ``true`` for one a guard\n * redirected elsewhere — so the outcome is read from ``router.url``. A\n * rejection makes the overlay fail the start at once (``entry-params``)\n * instead of waiting for a target that will never render.\n */\nexport function routerNavigate(router: Router): TourNavigate {\n const pathOf = (url: string) => router.serializeUrl(router.parseUrl(url)).split(/[?#]/, 1)[0];\n return async (_path, { appPath }) => {\n const navigated = await router.navigateByUrl(appPath);\n if (pathOf(router.url) === pathOf(appPath)) return;\n throw new Error(\n navigated\n ? `the router redirected ${appPath} to ${router.url}`\n : `the router did not navigate to ${appPath} (a guard or another navigation cancelled it)`,\n );\n };\n}\n","/**\n * The seam between the adapter and the tour overlay (``@steppy/player/tour``).\n *\n * Everything imported from the overlay at the top of this package is a *type*:\n * the overlay touches ``HTMLElement`` when its module loads, so its only\n * runtime reference is the dynamic ``import()`` in ``OVERLAY_LOADER``, which\n * runs in the browser, after the first render. Tests swap the loader for a fake\n * element on a tag of their own.\n *\n * One literal per line: ``tests/test_angular_adapter_sync.py`` reads the tag and\n * the event names with regular expressions and compares them with the overlay.\n */\n\nimport { InjectionToken } from '@angular/core';\nimport type { TourEventName, TourHostApi, TourSource, TourStringOverrides } from '@steppy/player/tour';\n\nexport const TOUR_HOST_TAG = 'steppy-tour-host';\nexport const TOUR_EVENT_NAMES = ['tour-start', 'tour-step', 'tour-complete', 'tour-dismiss', 'tour-offpath', 'tour-error'] as const;\n\n// Fails to compile when the overlay gains an event this list does not name.\ntype AssertNever<T extends never> = T;\nexport type ɵAllTourEventsListed = AssertNever<Exclude<TourEventName, (typeof TOUR_EVENT_NAMES)[number]>>;\n\n/** ``<steppy-tour-host>`` as the adapter drives it. */\nexport type TourHostElement = HTMLElement & TourHostApi;\n\nexport interface OverlayLoader {\n /** The custom element tag the loader defines. */\n readonly tag: string;\n /** Load (and so define) the element. */\n load(): Promise<unknown>;\n}\n\nexport const OVERLAY_LOADER = new InjectionToken<OverlayLoader>('steppy tour overlay', {\n providedIn: 'root',\n factory: () => ({ tag: TOUR_HOST_TAG, load: () => import('@steppy/player/tour') }),\n});\n\n/** What the adapter writes onto the element (``navigate`` is set once, at mount). */\nexport interface HostProps {\n fallbackManifest: string;\n manifest: string;\n buildId: string;\n guideOrigin: string;\n locale: string;\n disabled: boolean;\n strings: TourStringOverrides | undefined;\n source: TourSource | null;\n targetTimeout?: number;\n baseZIndex?: number;\n}\n\n/**\n * Write the props onto the element — before it is defined as well: the\n * overlay keeps properties set on the element before its upgrade.\n */\nexport function applyProps(el: TourHostElement, p: HostProps): void {\n el.fallbackManifest = p.fallbackManifest;\n el.manifest = p.manifest;\n el.buildId = p.buildId;\n el.guideOrigin = p.guideOrigin;\n el.locale = p.locale;\n el.disabled = p.disabled;\n el.strings = p.strings;\n el.source = p.source;\n if (p.targetTimeout !== undefined) el.targetTimeout = p.targetTimeout;\n if (p.baseZIndex !== undefined) el.baseZIndex = p.baseZIndex;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DOCUMENT,\n DestroyRef,\n ElementRef,\n NgZone,\n PLATFORM_ID,\n afterNextRender,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n untracked,\n type OutputEmitterRef,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport type { TourEventDetailMap, TourSource, TourStringOverrides } from '@steppy/player/tour';\n\nimport { createNavigate } from './navigate';\nimport { OVERLAY_LOADER, TOUR_EVENT_NAMES, applyProps, type HostProps, type TourHostElement } from './overlay';\nimport { SteppyTours, type SteppyTourEvent } from './tours.service';\n\nconst PREFIX = '[steppy-tours]';\n\n/** ``undefined`` stays ``undefined`` (= use the config); anything else is read as a number. */\nfunction optionalNumber(value: unknown): number | undefined {\n return value === undefined || value === null || value === '' ? undefined : Number(value);\n}\n\n/** ``undefined`` stays ``undefined``; a bare attribute (``''``) and ``'true'`` are true. */\nfunction optionalBoolean(value: unknown): boolean | undefined {\n if (value === undefined || value === null) return undefined;\n return value === '' || (value !== false && value !== 'false');\n}\n\n/**\n * The in-app tour overlay. Place it **once**, in the app shell:\n *\n * ```html\n * <router-outlet />\n * <steppy-tours />\n * ```\n *\n * It renders nothing on the server. In the browser it mounts\n * ``<steppy-tour-host>`` after the first render and loads the overlay\n * module lazily; every input overrides the matching\n * ``provideSteppyTours()`` setting. Start tours with the\n * ``SteppyTours`` service or the ``steppyTourStart`` directive.\n *\n * Destroying it suspends a running tour rather than dismissing it: the overlay\n * keeps its resume record, so a tour survives a shell swap. Call\n * ``SteppyTours.stop()`` first to end it for good.\n */\n@Component({\n selector: 'steppy-tours',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { style: 'display: contents' },\n})\nexport class SteppyToursComponent {\n readonly fallbackManifest = input<string>();\n readonly manifest = input<string>();\n readonly buildId = input<string>();\n readonly guideOrigin = input<string>();\n /** ``null``/``undefined``: the configured locale source. ``''``: follow ``<html lang>``. */\n readonly locale = input<string | null>();\n readonly targetTimeout = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly baseZIndex = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly disabled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n readonly strings = input<TourStringOverrides>();\n readonly source = input<TourSource | null>();\n\n readonly tourStart = output<TourEventDetailMap['tour-start']>();\n readonly tourStep = output<TourEventDetailMap['tour-step']>();\n readonly tourComplete = output<TourEventDetailMap['tour-complete']>();\n readonly tourDismiss = output<TourEventDetailMap['tour-dismiss']>();\n readonly tourOffpath = output<TourEventDetailMap['tour-offpath']>();\n readonly tourError = output<TourEventDetailMap['tour-error']>();\n\n private readonly tours = inject(SteppyTours);\n private readonly config = this.tours.ɵconfig;\n private readonly overlay = inject(OVERLAY_LOADER);\n private readonly zone = inject(NgZone);\n private readonly document = inject(DOCUMENT);\n private readonly hostRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly browser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly navigate = createNavigate(this.config.navigate);\n private readonly el = signal<TourHostElement | null>(null);\n\n private readonly outputs: { [K in keyof TourEventDetailMap]: OutputEmitterRef<TourEventDetailMap[K]> } = {\n 'tour-start': this.tourStart,\n 'tour-step': this.tourStep,\n 'tour-complete': this.tourComplete,\n 'tour-dismiss': this.tourDismiss,\n 'tour-offpath': this.tourOffpath,\n 'tour-error': this.tourError,\n };\n\n private readonly props = computed<HostProps>(() => {\n const c = this.config;\n const locale = this.locale();\n const source = this.source();\n return {\n fallbackManifest: this.fallbackManifest() ?? c.fallbackManifest ?? '',\n manifest: this.manifest() ?? c.manifest ?? '',\n buildId: this.buildId() ?? c.buildId ?? '',\n guideOrigin: this.guideOrigin() ?? c.guideOrigin ?? '',\n locale: locale ?? this.tours.ɵlocale(),\n disabled: this.disabled() ?? c.disabled ?? false,\n strings: this.strings() ?? c.strings,\n source: source !== undefined ? source : (c.source ?? null),\n targetTimeout: this.targetTimeout() ?? c.targetTimeout,\n baseZIndex: this.baseZIndex() ?? c.baseZIndex,\n };\n });\n\n private readonly onEvent = (event: Event): void =>\n this.zone.run(() => {\n const record = { type: event.type, detail: (event as CustomEvent).detail } as SteppyTourEvent;\n this.tours.ɵrecord(record);\n (this.outputs[record.type] as OutputEmitterRef<unknown>).emit(record.detail);\n });\n\n constructor() {\n // afterNextRender runs in the browser only, outside the Angular zone.\n afterNextRender(() => this.mount());\n effect(() => {\n const el = this.el();\n const props = this.props();\n if (el) this.zone.runOutsideAngular(() => applyProps(el, props));\n });\n inject(DestroyRef).onDestroy(() => this.unmount());\n }\n\n private mount(): void {\n if (!this.browser) return;\n if (!this.tours.ɵclaim(this)) {\n console.warn(`${PREFIX} another <steppy-tours> is already mounted; this one does nothing. Mount it once, in the app shell.`);\n return;\n }\n const props = untracked(this.props);\n if (!props.fallbackManifest && !props.manifest) {\n console.warn(`${PREFIX} no manifest: set fallbackManifest (or manifest) in provideSteppyTours() or on <steppy-tours>`);\n }\n // The element is on the page — with its properties and listeners — before\n // the overlay module defines it: the overlay keeps properties set before\n // its upgrade, a resumed tour's tour-start is not missed, and anything that\n // waits for the element to be defined finds it in the DOM.\n const el = this.document.createElement(this.overlay.tag) as TourHostElement;\n applyProps(el, props);\n el.navigate = this.navigate;\n for (const name of TOUR_EVENT_NAMES) el.addEventListener(name, this.onEvent);\n this.hostRef.nativeElement.appendChild(el);\n this.el.set(el);\n this.overlay\n .load()\n .then(() => customElements.whenDefined(this.overlay.tag))\n .then(\n () => {\n if (this.el() === el) this.tours.ɵready(this, el);\n },\n (err: unknown) => {\n if (this.el() !== el) return;\n console.error(`${PREFIX} the tour overlay failed to load`, err);\n this.tours.ɵready(this, null);\n },\n );\n }\n\n private unmount(): void {\n const el = untracked(this.el);\n if (el) {\n for (const name of TOUR_EVENT_NAMES) el.removeEventListener(name, this.onEvent);\n el.remove();\n this.el.set(null);\n }\n this.tours.ɵrelease(this);\n }\n}\n","import { Directive, inject, input } from '@angular/core';\nimport type { TourStartOptions } from '@steppy/player/tour';\n\nimport { SteppyTours } from './tours.service';\n\n/**\n * Start a tour on click:\n *\n * ```html\n * <button steppyTourStart=\"create-invoice\">Show me how</button>\n * <button [steppyTourStart]=\"'send-invoice'\" [steppyTourParams]=\"{ invoiceId: id }\">Help</button>\n * ```\n */\n@Directive({\n selector: '[steppyTourStart]',\n host: { '(click)': 'onClick()' },\n})\nexport class SteppyTourStart {\n readonly steppyTourStart = input.required<string>();\n readonly steppyTourParams = input<Record<string, string | number>>();\n readonly steppyTourStep = input<string>();\n\n private readonly tours = inject(SteppyTours);\n\n protected onClick(): void {\n const options: TourStartOptions = {};\n const params = this.steppyTourParams();\n const step = this.steppyTourStep();\n if (params) options.params = params;\n if (step) options.step = step;\n void this.tours.start(this.steppyTourStart(), options);\n }\n}\n","/*\n * @steppy/angular — the Angular adapter for the Steppy in-app tour overlay.\n */\n\nexport { provideSteppyTours } from './provide';\nexport type { SteppyLocaleSource, SteppyNavigate, SteppyToursConfig } from './config';\nexport { SteppyTours, type SteppyTourEvent } from './tours.service';\nexport { SteppyToursComponent } from './tours.component';\nexport { SteppyTourStart } from './tour-start.directive';\nexport { routerNavigate } from './navigate';\n\n// Types only: erased at build time, so nothing from the overlay loads on the server.\nexport type {\n TourErrorDetail,\n TourEventDetailMap,\n TourNavigateContext,\n TourPosition,\n TourSource,\n TourStartOptions,\n TourStringOverrides,\n} from '@steppy/player/tour';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["PREFIX"],"mappings":";;;;;;AAgDO,MAAM,mBAAmB,GAAG,IAAI,cAAc,CAAoB,qBAAqB,CAAC;AAExF,MAAM,wBAAwB,GAAG,MAAM;;ACrC9C,MAAMA,QAAM,GAAG,gBAAgB;AAE/B;;;;;;;;AAQG;MAEU,WAAW,CAAA;AACL,IAAA,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC;IACrB,OAAO,GAAG,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;;AAGxD,IAAA,OAAO,GAAsB,MAAM,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE;;IAElF,OAAO,GAAmB,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;AAEpD,IAAA,OAAO,GAAG,MAAM,CAAC,KAAK,8EAAC;AACvB,IAAA,QAAQ,GAAG,MAAM,CAAsB,IAAI,+EAAC;A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A,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,eAAA,EAAA,EAAA,iBAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,gBAAA,EAAA,EAAA,iBAAA,EAAA,kBAAA,EAAA,UAAA,EAAA,kBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,EAAA,iBAAA,EAAA,gBAAA,EAAA,UAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,WAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,IAAI,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE;AACjC,iBAAA;;;AChBD;;AAEG;;ACFH;;AAEG;;"}
1
+ {"version":3,"file":"steppy-angular.mjs","sources":["../../src/config.ts","../../src/tours.service.ts","../../src/provide.ts","../../src/navigate.ts","../../src/overlay.ts","../../src/tours.component.ts","../../src/tour-start.directive.ts","../../src/public-api.ts","../../src/steppy-angular.ts"],"sourcesContent":["import { InjectionToken, type Signal } from '@angular/core';\nimport type { TourAppearance, TourNavigate, TourSource, TourStringOverrides, TourTheme } from '@steppy/player/tour';\n\n/**\n * Where the tours' language comes from. A string or a signal is used as is; a\n * function is called once, in the root injection context, so it may\n * ``inject()`` the app's i18n service and return a signal of its language.\n * ``null``, ``undefined`` and ``''`` all mean \"follow ``<html lang>``\".\n */\nexport type SteppyLocaleSource =\n | string\n | Signal<string | null | undefined>\n | (() => string | Signal<string | null | undefined>);\n\n/** How a tour changes route; ``(path, {appPath, tourId}) => …`` for your own. */\nexport type SteppyNavigate = TourNavigate;\n\nexport interface SteppyToursConfig {\n /** The tour manifest bundled with the app (same origin), e.g. ``tours/tours.manifest.json``. */\n fallbackManifest?: string;\n /** A remote manifest URL; may contain ``{buildId}``. */\n manifest?: string;\n /** The app's build id, for ``{buildId}``. Default: the bundled manifest's. */\n buildId?: string;\n /** The origin trusted for guide links. Default: the bundled manifest's. */\n guideOrigin?: string;\n /** Milliseconds to wait for a step's element (500–120000). Default: the overlay's 8000. */\n targetTimeout?: number;\n /** Stacking where the top layer is unavailable. Default: the overlay's. */\n baseZIndex?: number;\n /** Turns tours off; stops a running one. */\n disabled?: boolean;\n /** Chrome string overrides per locale (buttons, hints). */\n strings?: TourStringOverrides;\n /** ``--steppy-tour-*`` values set on the overlay element; they win over your stylesheet. */\n theme?: TourTheme;\n /** The overlay's default palette: ``'dark'`` (the overlay's default), ``'light'`` or ``'auto'``. */\n appearance?: TourAppearance;\n /** Supply tour files yourself; see the overlay's ``source`` property. */\n source?: TourSource | null;\n /** The tours' language. Default: ``<html lang>``. */\n locale?: SteppyLocaleSource;\n /**\n * ``'router'`` (default): the Angular router, inside the zone; a refused or\n * redirected navigation fails the tour at once. ``'document'``: a full page\n * load. Or a function of your own.\n */\n navigate?: 'router' | 'document' | SteppyNavigate;\n /** How long ``start()`` waits for ``<steppy-tours>`` and the overlay to load. Default 10000 ms. */\n readyTimeout?: number;\n}\n\nexport const STEPPY_TOURS_CONFIG = new InjectionToken<SteppyToursConfig>('STEPPY_TOURS_CONFIG');\n\nexport const DEFAULT_READY_TIMEOUT_MS = 10_000;\n","import { Injectable, NgZone, PLATFORM_ID, computed, inject, isSignal, signal, type Signal } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { Observable, Subject } from 'rxjs';\nimport type { TourErrorDetail, TourEventDetailMap, TourPosition, TourStartOptions } from '@steppy/player/tour';\n\nimport { DEFAULT_READY_TIMEOUT_MS, STEPPY_TOURS_CONFIG, type SteppyLocaleSource, type SteppyToursConfig } from './config';\nimport type { TourHostElement } from './overlay';\n\n/** One overlay event, as the service and the component outputs see it. */\nexport type SteppyTourEvent = {\n [K in keyof TourEventDetailMap]: { type: K; detail: TourEventDetailMap[K] };\n}[keyof TourEventDetailMap];\n\nconst PREFIX = '[steppy-tours]';\n\n/**\n * Start and follow in-app tours from anywhere in the app.\n *\n * The overlay itself lives in ``<steppy-tours>``, placed once in the app\n * shell; ``start()`` waits for it to be mounted and loaded (up to\n * ``readyTimeout``), so a help button can call it during startup. State is\n * built from the overlay's six events and exposed as signals; on the server\n * every call is a no-op.\n */\n@Injectable({ providedIn: 'root' })\nexport class SteppyTours {\n private readonly zone = inject(NgZone);\n private readonly browser = isPlatformBrowser(inject(PLATFORM_ID));\n\n /** @internal */\n readonly ɵconfig: SteppyToursConfig = inject(STEPPY_TOURS_CONFIG, { optional: true }) ?? {};\n /** @internal The configured locale source, resolved once in the root injection context. */\n readonly ɵlocale: Signal<string> = resolveLocale(this.ɵconfig.locale);\n\n private readonly _active = signal(false);\n private readonly _current = signal<TourPosition | null>(null);\n private readonly _lastError = signal<TourErrorDetail | null>(null);\n private readonly _events = new Subject<SteppyTourEvent>();\n\n /** A tour is running (from ``tour-start`` until it completes, is dismissed or fails). */\n readonly active: Signal<boolean> = this._active.asReadonly();\n /** The step shown, or ``null`` before the first step and after the end. */\n readonly current: Signal<TourPosition | null> = this._current.asReadonly();\n /** The last ``tour-error`` since the last start (fatal or not). */\n readonly lastError: Signal<TourErrorDetail | null> = this._lastError.asReadonly();\n /** Every overlay event, in order, delivered inside the Angular zone. */\n readonly events: Observable<SteppyTourEvent> = this._events.asObservable();\n\n private owner: object | null = null;\n private host: TourHostElement | null = null;\n private failed = false;\n private waiters: ((host: TourHostElement | null) => void)[] = [];\n private seq = 0;\n\n /**\n * Start a tour. Resolves ``true`` once it started, ``false`` when it could\n * not (a ``tour-error`` says why), when no ``<steppy-tours>`` is mounted\n * in time, when a later ``start()``/``stop()`` superseded this call, or on\n * the server. Never rejects.\n */\n async start(tourId: string, options: TourStartOptions = {}): Promise<boolean> {\n if (!this.browser) return false;\n const seq = ++this.seq;\n const host = await this.whenReady();\n if (seq !== this.seq) return false;\n if (!host) {\n console.warn(\n this.failed\n ? `${PREFIX} start(\"${tourId}\"): the tour overlay failed to load`\n : `${PREFIX} start(\"${tourId}\"): no <steppy-tours> is mounted, or the overlay did not load ` +\n `within ${this.readyTimeout()} ms. Place <steppy-tours /> once in the app shell.`,\n );\n return false;\n }\n // Outside the zone: the overlay's observers, polls and frames must not\n // drive change detection.\n return this.zone.runOutsideAngular(() => host.start(tourId, options));\n }\n\n /** End the running tour (``reason`` is passed to ``tour-dismiss``); also cancels a waiting ``start()``. */\n stop(reason?: string): void {\n this.seq++;\n this.flush(null);\n const host = this.host;\n if (host) this.zone.runOutsideAngular(() => host.stop(reason));\n }\n\n /** Advance the current step, whatever its kind. */\n next(): void {\n const host = this.host;\n if (host) this.zone.runOutsideAngular(() => host.next());\n }\n\n // ── Used by <steppy-tours> ──────────────────────────────────────────────\n\n /** @internal The first component to mount owns the overlay. */\n ɵclaim(owner: object): boolean {\n if (this.owner !== null && this.owner !== owner) return false;\n this.owner = owner;\n return true;\n }\n\n /** @internal The overlay is defined (``host``) or failed to load (``null``). */\n ɵready(owner: object, host: TourHostElement | null): void {\n if (this.owner !== owner) return;\n this.host = host;\n this.failed = host === null;\n this.flush(host);\n }\n\n /** @internal The owning component was destroyed. */\n ɵrelease(owner: object): void {\n if (this.owner !== owner) return;\n this.owner = null;\n this.host = null;\n this.failed = false;\n this._active.set(false);\n this._current.set(null);\n }\n\n /** @internal One overlay event (already inside the zone). */\n ɵrecord(event: SteppyTourEvent): void {\n switch (event.type) {\n case 'tour-start':\n this._active.set(true);\n this._current.set(null);\n this._lastError.set(null);\n break;\n case 'tour-step': {\n const { tourId, stepId, index, total } = event.detail;\n this._active.set(true);\n this._current.set({ tourId, stepId, index, total });\n break;\n }\n case 'tour-complete':\n case 'tour-dismiss':\n this._active.set(false);\n this._current.set(null);\n break;\n case 'tour-error':\n this._lastError.set(event.detail);\n if (event.detail.fatal) {\n this._active.set(false);\n this._current.set(null);\n }\n break;\n case 'tour-offpath':\n break;\n }\n this._events.next(event);\n }\n\n // ── Internals ──────────────────────────────────────────────────────────────\n\n private readyTimeout(): number {\n return this.ɵconfig.readyTimeout ?? DEFAULT_READY_TIMEOUT_MS;\n }\n\n private whenReady(): Promise<TourHostElement | null> {\n if (this.host) return Promise.resolve(this.host);\n if (this.failed) return Promise.resolve(null);\n return new Promise((resolve) => {\n let timer: ReturnType<typeof setTimeout> | undefined;\n const done = (host: TourHostElement | null) => {\n clearTimeout(timer);\n this.waiters = this.waiters.filter((w) => w !== done);\n resolve(host);\n };\n this.waiters.push(done);\n // Outside the zone: a pending timer would keep a zone.js app from ever\n // becoming stable while it waits.\n timer = this.zone.runOutsideAngular(() => setTimeout(() => done(null), this.readyTimeout()));\n });\n }\n\n private flush(host: TourHostElement | null): void {\n for (const waiter of [...this.waiters]) waiter(host);\n }\n}\n\nfunction resolveLocale(source: SteppyLocaleSource | undefined): Signal<string> {\n if (source === undefined) return computed(() => '');\n if (typeof source === 'string') return computed(() => source);\n if (isSignal(source)) return computed(() => source() ?? '');\n const made = source();\n return typeof made === 'string' ? computed(() => made) : computed(() => made() ?? '');\n}\n","import { inject, isDevMode, makeEnvironmentProviders, provideEnvironmentInitializer, type EnvironmentProviders } from '@angular/core';\n\nimport { STEPPY_TOURS_CONFIG, type SteppyToursConfig } from './config';\nimport { SteppyTours } from './tours.service';\n\n/**\n * Configure in-app tours for the app, in ``app.config.ts``:\n *\n * ```ts\n * provideSteppyTours({\n * fallbackManifest: 'tours/tours.manifest.json',\n * locale: () => {\n * const translate = inject(TranslateService);\n * return toSignal(translate.onLangChange.pipe(map((e) => e.lang)), { initialValue: translate.getCurrentLang() ?? '' });\n * },\n * })\n * ```\n *\n * Then place ``<steppy-tours />`` once in the app shell.\n */\nexport function provideSteppyTours(config: SteppyToursConfig = {}): EnvironmentProviders {\n return makeEnvironmentProviders([\n { provide: STEPPY_TOURS_CONFIG, useValue: config },\n provideEnvironmentInitializer(() => {\n if (isDevMode() && inject(SteppyTours).ɵconfig !== config) {\n console.warn(\n '[steppy-tours] provideSteppyTours() has no effect here: the tours service is a root ' +\n 'singleton. Call it in the application providers (app.config.ts), not in a lazy route.',\n );\n }\n }),\n ]);\n}\n","import { inject, NgZone } from '@angular/core';\nimport { Router, ROUTES } from '@angular/router';\nimport type { TourNavigate } from '@steppy/player/tour';\n\nimport type { SteppyToursConfig } from './config';\n\n/**\n * The ``navigate`` hook the overlay calls to reach a tour's entry route (or a\n * route linked from step text). Call it in an injection context.\n *\n * The overlay calls it from outside the Angular zone; the router — and the\n * routed view it renders — must run inside it, or a zone.js app never renders\n * the page the tour waits on. Returns ``null`` for ``'document'``, and when the\n * app has no routes, so the overlay falls back to a full page load.\n */\nexport function createNavigate(option: SteppyToursConfig['navigate'] = 'router'): TourNavigate | null {\n if (option === 'document') return null;\n const zone = inject(NgZone);\n let go: TourNavigate;\n if (option === 'router') {\n if (!inject(ROUTES, { optional: true })) return null;\n go = routerNavigate(inject(Router));\n } else {\n go = option;\n }\n // ``async``: a synchronous throw becomes a rejection, which the overlay reports.\n return (path, ctx) => zone.run(async () => void (await go(path, ctx)));\n}\n\n/**\n * Navigate with the router and settle only once the router is where the tour\n * wants to be. ``navigateByUrl`` resolves ``false`` both for a refused\n * navigation and for one to the current URL, and ``true`` for one a guard\n * redirected elsewhere — so the outcome is read from ``router.url``. A\n * rejection makes the overlay fail the start at once (``entry-params``)\n * instead of waiting for a target that will never render.\n */\nexport function routerNavigate(router: Router): TourNavigate {\n const pathOf = (url: string) => router.serializeUrl(router.parseUrl(url)).split(/[?#]/, 1)[0];\n return async (_path, { appPath }) => {\n const navigated = await router.navigateByUrl(appPath);\n if (pathOf(router.url) === pathOf(appPath)) return;\n throw new Error(\n navigated\n ? `the router redirected ${appPath} to ${router.url}`\n : `the router did not navigate to ${appPath} (a guard or another navigation cancelled it)`,\n );\n };\n}\n","/**\n * The seam between the adapter and the tour overlay (``@steppy/player/tour``).\n *\n * Everything imported from the overlay at the top of this package is a *type*:\n * the overlay touches ``HTMLElement`` when its module loads, so its only\n * runtime reference is the dynamic ``import()`` in ``OVERLAY_LOADER``, which\n * runs in the browser, after the first render. Tests swap the loader for a fake\n * element on a tag of their own.\n *\n * One literal per line: ``tests/test_angular_adapter_sync.py`` reads the tag and\n * the event names with regular expressions and compares them with the overlay.\n */\n\nimport { InjectionToken } from '@angular/core';\nimport type { TourAppearance, TourEventName, TourHostApi, TourSource, TourStringOverrides, TourTheme } from '@steppy/player/tour';\n\nexport const TOUR_HOST_TAG = 'steppy-tour-host';\nexport const TOUR_EVENT_NAMES = ['tour-start', 'tour-step', 'tour-complete', 'tour-dismiss', 'tour-offpath', 'tour-error'] as const;\n\n// Fails to compile when the overlay gains an event this list does not name.\ntype AssertNever<T extends never> = T;\nexport type ɵAllTourEventsListed = AssertNever<Exclude<TourEventName, (typeof TOUR_EVENT_NAMES)[number]>>;\n\n/** ``<steppy-tour-host>`` as the adapter drives it. */\nexport type TourHostElement = HTMLElement & TourHostApi;\n\nexport interface OverlayLoader {\n /** The custom element tag the loader defines. */\n readonly tag: string;\n /** Load (and so define) the element. */\n load(): Promise<unknown>;\n}\n\nexport const OVERLAY_LOADER = new InjectionToken<OverlayLoader>('steppy tour overlay', {\n providedIn: 'root',\n factory: () => ({ tag: TOUR_HOST_TAG, load: () => import('@steppy/player/tour') }),\n});\n\n/** What the adapter writes onto the element (``navigate`` is set once, at mount). */\nexport interface HostProps {\n fallbackManifest: string;\n manifest: string;\n buildId: string;\n guideOrigin: string;\n locale: string;\n disabled: boolean;\n strings: TourStringOverrides | undefined;\n theme: TourTheme | undefined;\n source: TourSource | null;\n targetTimeout?: number;\n baseZIndex?: number;\n appearance?: TourAppearance;\n}\n\n/**\n * Write the props onto the element — before it is defined as well: the\n * overlay keeps properties set on the element before its upgrade.\n */\nexport function applyProps(el: TourHostElement, p: HostProps): void {\n el.fallbackManifest = p.fallbackManifest;\n el.manifest = p.manifest;\n el.buildId = p.buildId;\n el.guideOrigin = p.guideOrigin;\n el.locale = p.locale;\n el.disabled = p.disabled;\n el.strings = p.strings;\n el.theme = p.theme;\n el.source = p.source;\n if (p.targetTimeout !== undefined) el.targetTimeout = p.targetTimeout;\n if (p.baseZIndex !== undefined) el.baseZIndex = p.baseZIndex;\n if (p.appearance !== undefined) el.appearance = p.appearance;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DOCUMENT,\n DestroyRef,\n ElementRef,\n NgZone,\n PLATFORM_ID,\n afterNextRender,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n untracked,\n type OutputEmitterRef,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport type { TourAppearance, TourEventDetailMap, TourSource, TourStringOverrides, TourTheme } from '@steppy/player/tour';\n\nimport { createNavigate } from './navigate';\nimport { OVERLAY_LOADER, TOUR_EVENT_NAMES, applyProps, type HostProps, type TourHostElement } from './overlay';\nimport { SteppyTours, type SteppyTourEvent } from './tours.service';\n\nconst PREFIX = '[steppy-tours]';\n\n/** ``undefined`` stays ``undefined`` (= use the config); anything else is read as a number. */\nfunction optionalNumber(value: unknown): number | undefined {\n return value === undefined || value === null || value === '' ? undefined : Number(value);\n}\n\n/** ``undefined`` stays ``undefined``; a bare attribute (``''``) and ``'true'`` are true. */\nfunction optionalBoolean(value: unknown): boolean | undefined {\n if (value === undefined || value === null) return undefined;\n return value === '' || (value !== false && value !== 'false');\n}\n\n/**\n * The in-app tour overlay. Place it **once**, in the app shell:\n *\n * ```html\n * <router-outlet />\n * <steppy-tours />\n * ```\n *\n * It renders nothing on the server. In the browser it mounts\n * ``<steppy-tour-host>`` after the first render and loads the overlay\n * module lazily; every input overrides the matching\n * ``provideSteppyTours()`` setting. Start tours with the\n * ``SteppyTours`` service or the ``steppyTourStart`` directive.\n *\n * Destroying it suspends a running tour rather than dismissing it: the overlay\n * keeps its resume record, so a tour survives a shell swap. Call\n * ``SteppyTours.stop()`` first to end it for good.\n */\n@Component({\n selector: 'steppy-tours',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { style: 'display: contents' },\n})\nexport class SteppyToursComponent {\n readonly fallbackManifest = input<string>();\n readonly manifest = input<string>();\n readonly buildId = input<string>();\n readonly guideOrigin = input<string>();\n /** ``null``/``undefined``: the configured locale source. ``''``: follow ``<html lang>``. */\n readonly locale = input<string | null>();\n readonly targetTimeout = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly baseZIndex = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly disabled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n readonly strings = input<TourStringOverrides>();\n readonly theme = input<TourTheme>();\n readonly appearance = input<TourAppearance>();\n readonly source = input<TourSource | null>();\n\n readonly tourStart = output<TourEventDetailMap['tour-start']>();\n readonly tourStep = output<TourEventDetailMap['tour-step']>();\n readonly tourComplete = output<TourEventDetailMap['tour-complete']>();\n readonly tourDismiss = output<TourEventDetailMap['tour-dismiss']>();\n readonly tourOffpath = output<TourEventDetailMap['tour-offpath']>();\n readonly tourError = output<TourEventDetailMap['tour-error']>();\n\n private readonly tours = inject(SteppyTours);\n private readonly config = this.tours.ɵconfig;\n private readonly overlay = inject(OVERLAY_LOADER);\n private readonly zone = inject(NgZone);\n private readonly document = inject(DOCUMENT);\n private readonly hostRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly browser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly navigate = createNavigate(this.config.navigate);\n private readonly el = signal<TourHostElement | null>(null);\n\n private readonly outputs: { [K in keyof TourEventDetailMap]: OutputEmitterRef<TourEventDetailMap[K]> } = {\n 'tour-start': this.tourStart,\n 'tour-step': this.tourStep,\n 'tour-complete': this.tourComplete,\n 'tour-dismiss': this.tourDismiss,\n 'tour-offpath': this.tourOffpath,\n 'tour-error': this.tourError,\n };\n\n private readonly props = computed<HostProps>(() => {\n const c = this.config;\n const locale = this.locale();\n const source = this.source();\n return {\n fallbackManifest: this.fallbackManifest() ?? c.fallbackManifest ?? '',\n manifest: this.manifest() ?? c.manifest ?? '',\n buildId: this.buildId() ?? c.buildId ?? '',\n guideOrigin: this.guideOrigin() ?? c.guideOrigin ?? '',\n locale: locale ?? this.tours.ɵlocale(),\n disabled: this.disabled() ?? c.disabled ?? false,\n strings: this.strings() ?? c.strings,\n theme: this.theme() ?? c.theme,\n source: source !== undefined ? source : (c.source ?? null),\n targetTimeout: this.targetTimeout() ?? c.targetTimeout,\n baseZIndex: this.baseZIndex() ?? c.baseZIndex,\n appearance: this.appearance() ?? c.appearance,\n };\n });\n\n private readonly onEvent = (event: Event): void =>\n this.zone.run(() => {\n const record = { type: event.type, detail: (event as CustomEvent).detail } as SteppyTourEvent;\n this.tours.ɵrecord(record);\n (this.outputs[record.type] as OutputEmitterRef<unknown>).emit(record.detail);\n });\n\n constructor() {\n // afterNextRender runs in the browser only, outside the Angular zone.\n afterNextRender(() => this.mount());\n effect(() => {\n const el = this.el();\n const props = this.props();\n if (el) this.zone.runOutsideAngular(() => applyProps(el, props));\n });\n inject(DestroyRef).onDestroy(() => this.unmount());\n }\n\n private mount(): void {\n if (!this.browser) return;\n if (!this.tours.ɵclaim(this)) {\n console.warn(`${PREFIX} another <steppy-tours> is already mounted; this one does nothing. Mount it once, in the app shell.`);\n return;\n }\n const props = untracked(this.props);\n if (!props.fallbackManifest && !props.manifest) {\n console.warn(`${PREFIX} no manifest: set fallbackManifest (or manifest) in provideSteppyTours() or on <steppy-tours>`);\n }\n // The element is on the page — with its properties and listeners — before\n // the overlay module defines it: the overlay keeps properties set before\n // its upgrade, a resumed tour's tour-start is not missed, and anything that\n // waits for the element to be defined finds it in the DOM.\n const el = this.document.createElement(this.overlay.tag) as TourHostElement;\n applyProps(el, props);\n el.navigate = this.navigate;\n for (const name of TOUR_EVENT_NAMES) el.addEventListener(name, this.onEvent);\n this.hostRef.nativeElement.appendChild(el);\n this.el.set(el);\n this.overlay\n .load()\n .then(() => customElements.whenDefined(this.overlay.tag))\n .then(\n () => {\n if (this.el() === el) this.tours.ɵready(this, el);\n },\n (err: unknown) => {\n if (this.el() !== el) return;\n console.error(`${PREFIX} the tour overlay failed to load`, err);\n this.tours.ɵready(this, null);\n },\n );\n }\n\n private unmount(): void {\n const el = untracked(this.el);\n if (el) {\n for (const name of TOUR_EVENT_NAMES) el.removeEventListener(name, this.onEvent);\n el.remove();\n this.el.set(null);\n }\n this.tours.ɵrelease(this);\n }\n}\n","import { Directive, inject, input } from '@angular/core';\nimport type { TourStartOptions } from '@steppy/player/tour';\n\nimport { SteppyTours } from './tours.service';\n\n/**\n * Start a tour on click:\n *\n * ```html\n * <button steppyTourStart=\"create-invoice\">Show me how</button>\n * <button [steppyTourStart]=\"'send-invoice'\" [steppyTourParams]=\"{ invoiceId: id }\">Help</button>\n * ```\n */\n@Directive({\n selector: '[steppyTourStart]',\n host: { '(click)': 'onClick()' },\n})\nexport class SteppyTourStart {\n readonly steppyTourStart = input.required<string>();\n readonly steppyTourParams = input<Record<string, string | number>>();\n readonly steppyTourStep = input<string>();\n\n private readonly tours = inject(SteppyTours);\n\n protected onClick(): void {\n const options: TourStartOptions = {};\n const params = this.steppyTourParams();\n const step = this.steppyTourStep();\n if (params) options.params = params;\n if (step) options.step = step;\n void this.tours.start(this.steppyTourStart(), options);\n }\n}\n","/*\n * @steppy/angular — the Angular adapter for the Steppy in-app tour overlay.\n */\n\nexport { provideSteppyTours } from './provide';\nexport type { SteppyLocaleSource, SteppyNavigate, SteppyToursConfig } from './config';\nexport { SteppyTours, type SteppyTourEvent } from './tours.service';\nexport { SteppyToursComponent } from './tours.component';\nexport { SteppyTourStart } from './tour-start.directive';\nexport { routerNavigate } from './navigate';\n\n// Types only: erased at build time, so nothing from the overlay loads on the server.\nexport type {\n TourAppearance,\n TourErrorDetail,\n TourEventDetailMap,\n TourNavigateContext,\n TourPosition,\n TourSource,\n TourStartOptions,\n TourStringOverrides,\n TourTheme,\n} from '@steppy/player/tour';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["PREFIX"],"mappings":";;;;;;AAoDO,MAAM,mBAAmB,GAAG,IAAI,cAAc,CAAoB,qBAAqB,CAAC;AAExF,MAAM,wBAAwB,GAAG,MAAM;;ACzC9C,MAAMA,QAAM,GAAG,gBAAgB;AAE/B;;;;;;;;AAQG;MAEU,WAAW,CAAA;AACL,IAAA,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC;IACrB,OAAO,GAAG,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;;AAGxD,IAAA,OAAO,GAAsB,MAAM,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE;;IAElF,OAAO,GAAmB,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;AAEpD,IAAA,OAAO,GAAG,MAAM,CAAC,KAAK,8EAAC;AACvB,IAAA,QAAQ,GAAG,MAAM,CAAsB,IAAI,+EAAC;AAC5C,IAAA,UAAU,GAAG,MAAM,CAAyB,IAAI,iFAAC;AACjD,IAAA,OAAO,GAAG,IAAI,OAAO,EAAmB;;AAGhD,IAAA,MAAM,GAAoB,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;;AAEnD,IAAA,OAAO,GAAgC,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE;;AAEjE,IAAA,SAAS,GAAmC,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE;;AAExE,IAAA,MAAM,GAAgC,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;IAElE,KAAK,GAAkB,IAAI;IAC3B,IAAI,GAA2B,IAAI;IACnC,MAAM,GAAG,KAAK;IACd,OAAO,GAA+C,EAAE;I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AAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,eAAA,EAAA,EAAA,iBAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,gBAAA,EAAA,EAAA,iBAAA,EAAA,kBAAA,EAAA,UAAA,EAAA,kBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,EAAA,iBAAA,EAAA,gBAAA,EAAA,UAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,WAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,IAAI,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE;AACjC,iBAAA;;;AChBD;;AAEG;;ACFH;;AAEG;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steppy/angular",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Angular adapter for the Steppy in-app tour overlay: provideSteppyTours(), <steppy-tours> and the SteppyTours service",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -23,7 +23,7 @@
23
23
  "@angular/common": ">=20.0.0 <23.0.0",
24
24
  "@angular/core": ">=20.0.0 <23.0.0",
25
25
  "@angular/router": ">=20.0.0 <23.0.0",
26
- "@steppy/player": "0.5.0",
26
+ "@steppy/player": "0.6.0",
27
27
  "rxjs": "^7.4.0"
28
28
  },
29
29
  "dependencies": {
@@ -1,8 +1,8 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { Signal, EnvironmentProviders, OutputEmitterRef } from '@angular/core';
3
3
  import * as _steppy_player_tour from '@steppy/player/tour';
4
- import { TourNavigate, TourStringOverrides, TourSource, TourHostApi, TourEventDetailMap, TourPosition, TourErrorDetail, TourStartOptions } from '@steppy/player/tour';
5
- export { TourErrorDetail, TourEventDetailMap, TourNavigateContext, TourPosition, TourSource, TourStartOptions, TourStringOverrides } from '@steppy/player/tour';
4
+ import { TourNavigate, TourStringOverrides, TourTheme, TourAppearance, TourSource, TourHostApi, TourEventDetailMap, TourPosition, TourErrorDetail, TourStartOptions } from '@steppy/player/tour';
5
+ export { TourAppearance, TourErrorDetail, TourEventDetailMap, TourNavigateContext, TourPosition, TourSource, TourStartOptions, TourStringOverrides, TourTheme } from '@steppy/player/tour';
6
6
  import { Observable } from 'rxjs';
7
7
  import * as _steppy_angular from '@steppy/angular';
8
8
  import { Router } from '@angular/router';
@@ -33,6 +33,10 @@ interface SteppyToursConfig {
33
33
  disabled?: boolean;
34
34
  /** Chrome string overrides per locale (buttons, hints). */
35
35
  strings?: TourStringOverrides;
36
+ /** ``--steppy-tour-*`` values set on the overlay element; they win over your stylesheet. */
37
+ theme?: TourTheme;
38
+ /** The overlay's default palette: ``'dark'`` (the overlay's default), ``'light'`` or ``'auto'``. */
39
+ appearance?: TourAppearance;
36
40
  /** Supply tour files yourself; see the overlay's ``source`` property. */
37
41
  source?: TourSource | null;
38
42
  /** The tours' language. Default: ``<html lang>``. */
@@ -175,6 +179,8 @@ declare class SteppyToursComponent {
175
179
  readonly baseZIndex: _angular_core.InputSignalWithTransform<number | undefined, unknown>;
176
180
  readonly disabled: _angular_core.InputSignalWithTransform<boolean | undefined, unknown>;
177
181
  readonly strings: _angular_core.InputSignal<Partial<Record<string, Partial<_steppy_player_tour.TourStrings>>> | undefined>;
182
+ readonly theme: _angular_core.InputSignal<Partial<Record<"bubbleBg" | "bubbleFg" | "muted" | "accent" | "accentFg" | "focus" | "scrim" | "link" | "border" | "radius" | "width" | "padding" | "shadow" | "fontFamily" | "fontSize" | "lineHeight" | "titleSize" | "titleWeight" | "buttonRadius" | "buttonPadding" | "buttonWeight" | "ringWidth" | "spotlightRadius", string>> | undefined>;
183
+ readonly appearance: _angular_core.InputSignal<"dark" | "light" | "auto" | undefined>;
178
184
  readonly source: _angular_core.InputSignal<TourSource | null | undefined>;
179
185
  readonly tourStart: OutputEmitterRef<_steppy_player_tour.TourEventMeta & {
180
186
  total: number;
@@ -213,7 +219,7 @@ declare class SteppyToursComponent {
213
219
  private mount;
214
220
  private unmount;
215
221
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SteppyToursComponent, never>;
216
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SteppyToursComponent, "steppy-tours", never, { "fallbackManifest": { "alias": "fallbackManifest"; "required": false; "isSignal": true; }; "manifest": { "alias": "manifest"; "required": false; "isSignal": true; }; "buildId": { "alias": "buildId"; "required": false; "isSignal": true; }; "guideOrigin": { "alias": "guideOrigin"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "targetTimeout": { "alias": "targetTimeout"; "required": false; "isSignal": true; }; "baseZIndex": { "alias": "baseZIndex"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "strings": { "alias": "strings"; "required": false; "isSignal": true; }; "source": { "alias": "source"; "required": false; "isSignal": true; }; }, { "tourStart": "tourStart"; "tourStep": "tourStep"; "tourComplete": "tourComplete"; "tourDismiss": "tourDismiss"; "tourOffpath": "tourOffpath"; "tourError": "tourError"; }, never, never, true, never>;
222
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SteppyToursComponent, "steppy-tours", never, { "fallbackManifest": { "alias": "fallbackManifest"; "required": false; "isSignal": true; }; "manifest": { "alias": "manifest"; "required": false; "isSignal": true; }; "buildId": { "alias": "buildId"; "required": false; "isSignal": true; }; "guideOrigin": { "alias": "guideOrigin"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "targetTimeout": { "alias": "targetTimeout"; "required": false; "isSignal": true; }; "baseZIndex": { "alias": "baseZIndex"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "strings": { "alias": "strings"; "required": false; "isSignal": true; }; "theme": { "alias": "theme"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "source": { "alias": "source"; "required": false; "isSignal": true; }; }, { "tourStart": "tourStart"; "tourStep": "tourStep"; "tourComplete": "tourComplete"; "tourDismiss": "tourDismiss"; "tourOffpath": "tourOffpath"; "tourError": "tourError"; }, never, never, true, never>;
217
223
  }
218
224
 
219
225
  /**