@wcstack/view-transition 1.31.0 → 1.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +169 -169
- package/README.md +169 -169
- package/dist/auto.min.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.esm.js.map +1 -1
- package/package.json +72 -72
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../src/config.ts","../src/protocol/transitionRunner.ts","../src/core/ViewTransitionCore.ts","../src/protocol/upgradeProperties.ts","../src/components/ViewTransition.ts","../src/registerComponents.ts","../src/bootstrapViewTransition.ts"],"sourcesContent":["import { IConfig, IWritableConfig } from \"./types.js\";\r\n\r\ninterface IInternalConfig extends IConfig {\r\n tagNames: {\r\n viewTransition: string;\r\n };\r\n}\r\n\r\nconst _config: IInternalConfig = {\r\n tagNames: {\r\n viewTransition: \"wcs-view-transition\",\r\n },\r\n};\r\n\r\nfunction deepFreeze<T>(obj: T): T {\r\n if (obj === null || typeof obj !== \"object\") return obj;\r\n Object.freeze(obj);\r\n for (const key of Object.keys(obj)) {\r\n deepFreeze((obj as Record<string, unknown>)[key]);\r\n }\r\n return obj;\r\n}\r\n\r\nfunction deepClone<T>(obj: T): T {\r\n if (obj === null || typeof obj !== \"object\") return obj;\r\n const clone: Record<string, unknown> = {};\r\n for (const key of Object.keys(obj)) {\r\n clone[key] = deepClone((obj as Record<string, unknown>)[key]);\r\n }\r\n return clone as T;\r\n}\r\n\r\nlet frozenConfig: IConfig | null = null;\r\n\r\n// Note: this is the live, mutable internal config. It is not part of the public\r\n// package exports (see exports.ts) — only `getConfig()` (a frozen snapshot) is\r\n// surfaced. `setConfig()` is applied internally via `bootstrapViewTransition()` and\r\n// is not re-exported from the package root, though a deep path import\r\n// (`.../src/config.js`) can still reach and mutate it. Accepted as-is for\r\n// cross-package consistency: every @wcstack package follows this same shape.\r\n// Use `getConfig()` for a frozen, safe read.\r\nexport const config: IConfig = _config as IConfig;\r\n\r\nexport function getConfig(): IConfig {\r\n if (!frozenConfig) {\r\n frozenConfig = deepFreeze(deepClone(_config));\r\n }\r\n return frozenConfig;\r\n}\r\n\r\nexport function setConfig(partialConfig: IWritableConfig): void {\r\n if (partialConfig.tagNames) {\r\n Object.assign(_config.tagNames, partialConfig.tagNames);\r\n }\r\n frozenConfig = null;\r\n}\r\n","// ===========================================================================\r\n// AUTO-GENERATED FILE - DO NOT EDIT.\r\n// Generated from /protocol/transition-runner.ts by scripts/sync-protocol-types.mjs.\r\n// Run `node scripts/sync-protocol-types.mjs` after editing the source.\r\n// ===========================================================================\r\n\r\n// transition-runner protocol — how a package that mutates the DOM hands that\r\n// mutation to whoever is arbitrating view transitions on the page.\r\n//\r\n// @wcstack/state and @wcstack/router must not depend on @wcstack/view-transition\r\n// (zero runtime dependencies, independently publishable), so the arbiter installs\r\n// itself on a well-known global symbol and the participants look it up lazily.\r\n// No arbiter installed means the mutation is invoked directly, synchronously —\r\n// byte-for-byte the behavior these packages had before the protocol existed.\r\n//\r\n// docs/view-transition-design.md §4 is the normative description.\r\n//\r\n// SINGLE SOURCE OF TRUTH: edit only this file (/protocol/transition-runner.ts), then run\r\n// `node scripts/sync-protocol-types.mjs` to regenerate the per-package copies\r\n// (packages/<pkg>/src/protocol/transitionRunner.ts). Those copies are generated — do not edit them.\r\n\r\n/**\r\n * Global key the arbiter installs itself under. `Symbol.for` so independently\r\n * loaded copies of this file (two CDN bundles on one page) still agree.\r\n */\r\nexport const TRANSITION_RUNNER_KEY = Symbol.for(\"wcstack.transition-runner\");\r\n\r\n/** Who is asking. Backs the arbiter's `for=` participant gate. */\r\nexport type TransitionSource = \"router\" | \"state\";\r\n\r\n/** `view-transition-name` assignment policy the arbiter declares for participants. */\r\nexport type TransitionNaming = \"manual\" | \"auto\";\r\n\r\nexport interface IWcsTransitionRunOptions {\r\n /** Participant id, for the `for=` gate and for diagnostics. */\r\n readonly source?: string;\r\n /** Transition types, where the environment supports `startViewTransition({ types })`. */\r\n readonly types?: readonly string[];\r\n}\r\n\r\nexport interface IWcsTransitionRunner {\r\n readonly protocol: \"wcs-transition-runner\";\r\n /** Integer protocol version. All versions >= 1 are participant-compatible. */\r\n readonly version: number;\r\n /** `\"auto\"` licenses a participant to assign `view-transition-name` itself. */\r\n readonly naming: TransitionNaming;\r\n /** Upper bound on auto-assigned names; past it a participant stops naming. */\r\n readonly namingLimit: number;\r\n /** Whether this participant animates at all. */\r\n accepts(source: string): boolean;\r\n /**\r\n * Invoke `mutate` inside a view transition when one is possible.\r\n *\r\n * Contract (docs/view-transition-design.md §4):\r\n * - `mutate` is invoked exactly once, whatever happens to the transition.\r\n * - The promise resolves once `mutate` has run — never waits for the animation.\r\n * - When no transition is started, `mutate` runs synchronously inside `run()`.\r\n * - It rejects only if `mutate` threw.\r\n */\r\n run(mutate: () => void, options?: IWcsTransitionRunOptions): Promise<void>;\r\n}\r\n\r\n/**\r\n * The installed arbiter, or null when there is none, it speaks a version this\r\n * reader does not, or it does not accept this participant.\r\n *\r\n * Looked up on every call rather than cached: the tag can be added, removed, or\r\n * reconfigured at any point in a page's life, and a stale cache would either\r\n * animate what the author just switched off or miss what they switched on.\r\n */\r\nexport function getTransitionRunner(source: string): IWcsTransitionRunner | null {\r\n const candidate = (globalThis as Record<symbol, unknown>)[TRANSITION_RUNNER_KEY] as\r\n | IWcsTransitionRunner\r\n | undefined;\r\n if (candidate === undefined || candidate === null) return null;\r\n if (candidate.protocol !== \"wcs-transition-runner\") return null;\r\n if (typeof candidate.version !== \"number\" || candidate.version < 1) return null;\r\n if (typeof candidate.run !== \"function\") return null;\r\n if (typeof candidate.accepts !== \"function\" || !candidate.accepts(source)) return null;\r\n return candidate;\r\n}\r\n\r\n/**\r\n * Run `mutate` under the installed arbiter, or directly when there is none.\r\n *\r\n * Returns `undefined` in the no-arbiter case instead of a resolved promise: the\r\n * state drain calls this on every batch, and awaiting is a caller's choice, not\r\n * an allocation the common path should pay for. `await` accepts both.\r\n */\r\nexport function runTransition(\r\n source: string,\r\n mutate: () => void,\r\n types?: readonly string[],\r\n): Promise<void> | undefined {\r\n const runner = getTransitionRunner(source);\r\n if (runner === null) {\r\n mutate();\r\n return undefined;\r\n }\r\n return runner.run(mutate, { source, types });\r\n}\r\n","import { IWcBindable, ReducedMotionPolicy, TransitionMode } from \"../types.js\";\r\nimport {\r\n IWcsTransitionRunOptions,\r\n IWcsTransitionRunner,\r\n TRANSITION_RUNNER_KEY,\r\n TransitionNaming,\r\n} from \"../protocol/transitionRunner.js\";\r\n\r\n/**\r\n * Minimal structural views of the View Transition API. Declared locally rather\r\n * than relying on `lib.dom`'s (still moving) definitions, so the package\r\n * type-checks identically across TypeScript lib versions and an environment\r\n * without the API is a value check, never a type error.\r\n */\r\ninterface IViewTransitionLike {\r\n readonly updateCallbackDone: Promise<void>;\r\n readonly finished: Promise<void>;\r\n readonly ready: Promise<void>;\r\n skipTransition(): void;\r\n}\r\n\r\ninterface IStartViewTransitionOptions {\r\n update: () => void;\r\n types?: string[];\r\n}\r\n\r\ntype StartViewTransition = (\r\n callbackOrOptions: (() => void) | IStartViewTransitionOptions,\r\n) => IViewTransitionLike;\r\n\r\ninterface IPendingEntry {\r\n readonly mutate: () => void;\r\n readonly resolve: () => void;\r\n readonly reject: (reason: unknown) => void;\r\n}\r\n\r\nconst DEFAULT_NAMING_LIMIT = 200;\r\nconst DEFAULT_PARTICIPANTS: readonly string[] = [\"router\", \"state\"];\r\n\r\nfunction toError(value: unknown): Error {\r\n return value instanceof Error ? value : new Error(String(value));\r\n}\r\n\r\n/**\r\n * Accept both the array form and the space-separated string an attribute (or a\r\n * `data-wcs` binding) produces. The Core is a public export, so `core.types = \"a b\"`\r\n * is a call an adopter can make — and without normalizing it here that string\r\n * would degrade into single characters (`new Set(\"router\")` contains no\r\n * `\"router\"`, so `accepts()` would answer false for every participant).\r\n */\r\nfunction toStringList(value: readonly string[] | string): string[] {\r\n if (typeof value === \"string\") {\r\n return value.split(/\\s+/).filter((token) => token !== \"\");\r\n }\r\n return [...value];\r\n}\r\n\r\nfunction prefersReducedMotion(): boolean {\r\n // never-throw: matchMedia is absent in happy-dom and in non-browser hosts.\r\n try {\r\n const mm = (globalThis as { matchMedia?: (q: string) => { matches: boolean } }).matchMedia;\r\n if (typeof mm !== \"function\") return false;\r\n return mm.call(globalThis, \"(prefers-reduced-motion: reduce)\").matches === true;\r\n } catch {\r\n return false;\r\n }\r\n}\r\n\r\n/**\r\n * Whether `startViewTransition({ update, types })` is understood. Detected on\r\n * `ViewTransition.prototype`, because passing the object form to an\r\n * implementation that only accepts a callback would throw at the call site —\r\n * after the browser has already decided it has no update callback to run.\r\n */\r\nfunction supportsTypes(): boolean {\r\n try {\r\n const ctor = (globalThis as { ViewTransition?: { prototype: object } }).ViewTransition;\r\n return ctor !== undefined && \"types\" in ctor.prototype;\r\n } catch {\r\n return false;\r\n }\r\n}\r\n\r\n/**\r\n * Headless view-transition arbiter — the single place on a page that decides\r\n * whether a DOM mutation animates, and what happens when two of them collide.\r\n *\r\n * It is not an I/O node: nothing is read from a device and there is no data to\r\n * bind. It is a *policy* node. Participants (`@wcstack/router`, `@wcstack/state`)\r\n * never import it; they find it through the transition-runner protocol on a\r\n * well-known global symbol and hand it a mutation to run\r\n * (docs/view-transition-design.md §4).\r\n *\r\n * The one invariant everything else is subordinate to: **a mutation handed to\r\n * `run()` is applied exactly once**, whatever is decided about animating it. An\r\n * unsupported browser, a hidden tab, reduced motion, a colliding transition and a\r\n * `startViewTransition` that throws all end in the mutation running — the page\r\n * must never be left showing stale DOM because an animation could not be played.\r\n */\r\nexport class ViewTransitionCore extends EventTarget {\r\n static wcBindable: IWcBindable = {\r\n protocol: \"wc-bindable\",\r\n version: 1,\r\n properties: [\r\n { name: \"active\", event: \"wcs-view-transition:active-changed\", semantics: \"state\" },\r\n { name: \"error\", event: \"wcs-view-transition:error\", semantics: \"state\" },\r\n ],\r\n commands: [\r\n { name: \"skip\" },\r\n ],\r\n };\r\n\r\n private _target: EventTarget;\r\n\r\n private _mode: TransitionMode = \"latest\";\r\n private _naming: TransitionNaming = \"manual\";\r\n private _namingLimit: number = DEFAULT_NAMING_LIMIT;\r\n private _reducedMotion: ReducedMotionPolicy = \"skip\";\r\n private _types: string[] = [];\r\n private _disabled: boolean = false;\r\n private _participants: Set<string> = new Set(DEFAULT_PARTICIPANTS);\r\n\r\n private _active: boolean = false;\r\n private _error: Error | null = null;\r\n\r\n /** Requests waiting for the microtask flush that starts a transition. */\r\n private _pending: IPendingEntry[] | null = null;\r\n private _flushScheduled: boolean = false;\r\n /**\r\n * The batch handed to the running transition while its update callback has not\r\n * fired yet. Non-null means \"capturing\": a request arriving now still joins this\r\n * batch, which is both the coalescing window and the only ordering guarantee\r\n * that keeps a later `exhaust`/`latest` request from applying ahead of it.\r\n */\r\n private _batch: IPendingEntry[] | null = null;\r\n private _transition: IViewTransitionLike | null = null;\r\n private _queue: IPendingEntry[][] = [];\r\n\r\n constructor(target?: EventTarget) {\r\n super();\r\n this._target = target ?? this;\r\n }\r\n\r\n // --- transition-runner protocol surface ---\r\n\r\n get protocol(): \"wcs-transition-runner\" {\r\n return \"wcs-transition-runner\";\r\n }\r\n\r\n get version(): number {\r\n return 1;\r\n }\r\n\r\n get naming(): TransitionNaming {\r\n return this._naming;\r\n }\r\n\r\n set naming(value: TransitionNaming) {\r\n this._naming = value === \"auto\" ? \"auto\" : \"manual\";\r\n }\r\n\r\n get namingLimit(): number {\r\n return this._namingLimit;\r\n }\r\n\r\n set namingLimit(value: number) {\r\n this._namingLimit = Number.isFinite(value) && value >= 0 ? Math.floor(value) : DEFAULT_NAMING_LIMIT;\r\n }\r\n\r\n accepts(source: string): boolean {\r\n return this._participants.has(source);\r\n }\r\n\r\n /**\r\n * Install this core as the page's arbiter. Returns false (and warns) when\r\n * another one already holds the slot — two arbiters would each think they own\r\n * the exclusion, which is precisely the thing an arbiter exists to prevent.\r\n */\r\n install(): boolean {\r\n const slot = globalThis as Record<symbol, unknown>;\r\n const current = slot[TRANSITION_RUNNER_KEY];\r\n if (current !== undefined && current !== null && current !== this) {\r\n console.warn(\r\n \"[@wcstack/view-transition] a transition runner is already installed; \" +\r\n \"this element is inert. Use one <wcs-view-transition> per document.\",\r\n );\r\n return false;\r\n }\r\n slot[TRANSITION_RUNNER_KEY] = this as unknown as IWcsTransitionRunner;\r\n return true;\r\n }\r\n\r\n /** Release the arbiter slot, but only if it is still ours. */\r\n uninstall(): void {\r\n const slot = globalThis as Record<symbol, unknown>;\r\n if (slot[TRANSITION_RUNNER_KEY] === (this as unknown)) {\r\n delete slot[TRANSITION_RUNNER_KEY];\r\n }\r\n }\r\n\r\n // --- configuration ---\r\n\r\n get mode(): TransitionMode {\r\n return this._mode;\r\n }\r\n\r\n set mode(value: TransitionMode) {\r\n this._mode = value === \"queue\" || value === \"exhaust\" ? value : \"latest\";\r\n }\r\n\r\n get reducedMotion(): ReducedMotionPolicy {\r\n return this._reducedMotion;\r\n }\r\n\r\n set reducedMotion(value: ReducedMotionPolicy) {\r\n this._reducedMotion = value === \"animate\" ? \"animate\" : \"skip\";\r\n }\r\n\r\n get types(): readonly string[] {\r\n return this._types;\r\n }\r\n\r\n set types(value: readonly string[] | string) {\r\n this._types = toStringList(value);\r\n }\r\n\r\n get disabled(): boolean {\r\n return this._disabled;\r\n }\r\n\r\n set disabled(value: boolean) {\r\n this._disabled = value === true;\r\n }\r\n\r\n get participants(): readonly string[] {\r\n return [...this._participants];\r\n }\r\n\r\n set participants(value: readonly string[] | string) {\r\n const list = toStringList(value);\r\n this._participants = new Set(list.length > 0 ? list : DEFAULT_PARTICIPANTS);\r\n }\r\n\r\n // --- observable outputs ---\r\n\r\n get active(): boolean {\r\n return this._active;\r\n }\r\n\r\n get error(): Error | null {\r\n return this._error;\r\n }\r\n\r\n // --- commands ---\r\n\r\n /**\r\n * Finish the running transition now. Per spec the update callback still runs if\r\n * it has not yet, so skipping loses the animation and never the DOM update.\r\n */\r\n skip(): void {\r\n this._transition?.skipTransition();\r\n }\r\n\r\n // --- the protocol entry point ---\r\n\r\n run(mutate: () => void, _options?: IWcsTransitionRunOptions): Promise<void> {\r\n if (!this._canTransition()) {\r\n return this._applyNow(mutate);\r\n }\r\n return new Promise<void>((resolve, reject) => {\r\n const entry: IPendingEntry = { mutate, resolve, reject };\r\n // Capturing: the running transition has not called its update callback yet,\r\n // so this mutation can still ride along — and must, or it would be applied\r\n // before mutations that were requested earlier.\r\n if (this._batch !== null) {\r\n this._batch.push(entry);\r\n return;\r\n }\r\n if (this._transition !== null && this._mode === \"exhaust\") {\r\n this._settle(entry);\r\n return;\r\n }\r\n (this._pending ??= []).push(entry);\r\n this._schedule();\r\n });\r\n }\r\n\r\n dispose(): void {\r\n this.uninstall();\r\n // Anything still unapplied belongs to a page that is going away; apply it so\r\n // the DOM does not stay behind the state that asked for the change.\r\n //\r\n // Order is request order, and that is why the capturing batch has to be taken\r\n // first: its mutations were requested *before* everything in _pending and\r\n // _queue, but they are the ones still waiting on a frame. Settling only the\r\n // later two would apply them out of order. Clearing _batch also turns the\r\n // running transition's update callback into a no-op, which is what keeps\r\n // \"applied exactly once\" true across a dispose.\r\n const capturing = this._batch;\r\n this._batch = null;\r\n const abandoned = [...(capturing ?? []), ...(this._pending ?? []), ...this._queue.flat()];\r\n this._pending = null;\r\n this._queue = [];\r\n for (const entry of abandoned) {\r\n this._settle(entry);\r\n }\r\n }\r\n\r\n // --- internals ---\r\n\r\n private _canTransition(): boolean {\r\n if (this._disabled) return false;\r\n const doc = (globalThis as { document?: Document }).document;\r\n if (doc === undefined || typeof (doc as { startViewTransition?: unknown }).startViewTransition !== \"function\") {\r\n return false;\r\n }\r\n // SSR: no transition is started while rendering on the server (G5). The gate\r\n // lives here rather than in each participant because the protocol is public —\r\n // a third-party participant has no reason to know wcstack's SSR marker, and\r\n // the arbiter is the one place that owns the policy. `@wcstack/server` sets\r\n // the attribute on its own document and it never reaches the client HTML.\r\n if (doc.documentElement?.hasAttribute(\"data-wcs-server\") === true) return false;\r\n // A hidden tab gets no rendering opportunities, so the update callback would\r\n // not run until the page is looked at again — the DOM would silently freeze\r\n // for as long as the tab stays in the background. Apply straight through.\r\n if (doc.hidden === true) return false;\r\n if (this._reducedMotion === \"skip\" && prefersReducedMotion()) return false;\r\n return true;\r\n }\r\n\r\n private _applyNow(mutate: () => void): Promise<void> {\r\n try {\r\n mutate();\r\n } catch (error) {\r\n return Promise.reject(error);\r\n }\r\n return Promise.resolve();\r\n }\r\n\r\n private _settle(entry: IPendingEntry): void {\r\n try {\r\n entry.mutate();\r\n entry.resolve();\r\n } catch (error) {\r\n entry.reject(error);\r\n }\r\n }\r\n\r\n private _schedule(): void {\r\n if (this._flushScheduled) return;\r\n this._flushScheduled = true;\r\n queueMicrotask(() => this._flush());\r\n }\r\n\r\n private _flush(): void {\r\n this._flushScheduled = false;\r\n const batch = this._pending;\r\n this._pending = null;\r\n if (batch === null || batch.length === 0) return;\r\n if (this._transition !== null) {\r\n if (this._mode === \"queue\") {\r\n this._queue.push(batch);\r\n return;\r\n }\r\n if (this._mode === \"exhaust\") {\r\n for (const entry of batch) {\r\n this._settle(entry);\r\n }\r\n return;\r\n }\r\n // \"latest\": starting a new transition skips the running one, and the\r\n // running one is past its update callback (a capturing batch is joined in\r\n // run(), never reaching here), so ordering holds.\r\n }\r\n this._start(batch);\r\n }\r\n\r\n private _start(batch: IPendingEntry[]): void {\r\n const doc = (globalThis as unknown as { document: Document }).document;\r\n const start = (doc as unknown as { startViewTransition: StartViewTransition }).startViewTransition;\r\n this._batch = batch;\r\n const update = (): void => {\r\n const running = this._batch;\r\n this._batch = null;\r\n if (running === null) return;\r\n for (const entry of running) {\r\n this._settle(entry);\r\n }\r\n };\r\n let transition: IViewTransitionLike;\r\n try {\r\n transition = this._types.length > 0 && supportsTypes()\r\n ? start.call(doc, { update, types: [...this._types] })\r\n : start.call(doc, update);\r\n } catch (error) {\r\n // Could not even start: apply the mutations rather than lose them.\r\n this._batch = null;\r\n this._setError(toError(error));\r\n for (const entry of batch) {\r\n this._settle(entry);\r\n }\r\n return;\r\n }\r\n this._transition = transition;\r\n this._setError(null);\r\n this._setActive(true);\r\n // `finished` rejects when the update callback throws — it cannot here, since\r\n // _settle catches per entry — and `ready` rejects whenever the transition is\r\n // skipped, which is routine. Both are attached defensively so a routine skip\r\n // never surfaces as an unhandled rejection.\r\n const done = (): void => this._onFinished(transition);\r\n transition.finished.then(done, done);\r\n transition.ready.then(undefined, () => { /* skipped: not an error */ });\r\n transition.updateCallbackDone.then(undefined, () => { /* settled per entry */ });\r\n }\r\n\r\n private _onFinished(transition: IViewTransitionLike): void {\r\n // A superseded transition (\"latest\") still settles; only the current one owns\r\n // the active flag and the queue.\r\n if (this._transition !== transition) return;\r\n this._transition = null;\r\n this._setActive(false);\r\n const next = this._queue.shift();\r\n if (next !== undefined) {\r\n this._start(next);\r\n }\r\n }\r\n\r\n private _setActive(value: boolean): void {\r\n if (this._active === value) return;\r\n this._active = value;\r\n this._dispatch(\"wcs-view-transition:active-changed\", value);\r\n }\r\n\r\n private _setError(error: Error | null): void {\r\n if (this._error === error) return;\r\n this._error = error;\r\n this._dispatch(\"wcs-view-transition:error\", error);\r\n }\r\n\r\n private _dispatch(type: string, detail: unknown): void {\r\n this._target.dispatchEvent(new CustomEvent(type, { detail, bubbles: true, composed: true }));\r\n }\r\n}\r\n","// ===========================================================================\r\n// AUTO-GENERATED FILE - DO NOT EDIT.\r\n// Generated from /protocol/upgrade-properties.ts by scripts/sync-protocol-types.mjs.\r\n// Run `node scripts/sync-protocol-types.mjs` after editing the source.\r\n// ===========================================================================\r\n\r\n// custom element の property upgrade — `static wcBindable.inputs` に宣言した入力のうち、\r\n// 要素が upgrade される前に代入された own データプロパティを取り込み直す。\r\n//\r\n// なぜ必要か:\r\n// 未定義タグの要素は素の HTMLElement なので、`el.url = \"...\"` は own データプロパティを作る。\r\n// upgrade 後にクラスの accessor が prototype へ入っても own プロパティが優先されるため、\r\n// setter は二度と呼ばれず、値は要素へ届かないまま消える(エラーも警告も出ない)。\r\n// 常にプロパティ代入を行う framework(Angular の `[prop]`、Lit の `.prop=`、\r\n// Solid の `prop:`、Vue の `.prop` 修飾子)× 遅延定義(autoloader / CDN / code-split)で\r\n// 常態的に起きる。docs/architecture-hardening/13-framework-adapter-binding-constraints.md §1.2。\r\n//\r\n// 安全側の判定:\r\n// own プロパティがあっても、prototype チェーンに accessor が無ければ「シャドウ」ではなく\r\n// その own プロパティ自体が正規の格納先なので触らない(public class field を壊さない)。\r\n//\r\n// SINGLE SOURCE OF TRUTH: edit only this file (/protocol/upgrade-properties.ts), then run\r\n// `node scripts/sync-protocol-types.mjs` to regenerate the per-package copies\r\n// (packages/<pkg>/src/protocol/upgradeProperties.ts). Those copies are generated — do not edit them.\r\nimport { IWcBindable } from \"./wcBindable.js\";\r\n\r\nfunction hasAccessorOnPrototype(target: object, name: string): boolean {\r\n let proto = Object.getPrototypeOf(target);\r\n while (proto !== null) {\r\n const descriptor = Object.getOwnPropertyDescriptor(proto, name);\r\n if (descriptor !== undefined) {\r\n return typeof descriptor.get === \"function\" || typeof descriptor.set === \"function\";\r\n }\r\n proto = Object.getPrototypeOf(proto);\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * `connectedCallback` の先頭で呼ぶ。宣言済み input のうち upgrade 前の代入で\r\n * accessor をシャドウしている own プロパティを、delete → 再代入で setter に通し直す。\r\n *\r\n * - 冪等: 再代入は accessor を通るので own プロパティは残らず、2 回目以降は no-op。\r\n * - 宣言に `inputs` が無い要素、`wcBindable` を持たない要素では何もしない。\r\n * - 値の意味は変えない。今まで捨てられていた代入が届くようになる一方向の変化。\r\n */\r\nexport function upgradeProperties(element: object): void {\r\n const declaration = (element as { constructor?: { wcBindable?: IWcBindable } }).constructor?.wcBindable;\r\n const inputs = declaration?.inputs;\r\n if (inputs === undefined) return;\r\n for (const input of inputs) {\r\n const name = input.name;\r\n if (!Object.prototype.hasOwnProperty.call(element, name)) continue;\r\n if (!hasAccessorOnPrototype(element, name)) continue;\r\n const record = element as Record<string, unknown>;\r\n const value = record[name];\r\n delete record[name];\r\n record[name] = value;\r\n }\r\n}\r\n","import { ViewTransitionCore } from \"../core/ViewTransitionCore.js\";\r\nimport { upgradeProperties } from \"../protocol/upgradeProperties.js\";\r\nimport { TransitionNaming } from \"../protocol/transitionRunner.js\";\r\nimport { IWcBindable, ReducedMotionPolicy, TransitionMode } from \"../types.js\";\r\n\r\n/**\r\n * `<wcs-view-transition>` — the page's view-transition policy node.\r\n *\r\n * It renders nothing and binds no data. It declares *how* the DOM changes that\r\n * `@wcstack/router` and `@wcstack/state` make should animate, and it is the single\r\n * arbiter that decides what happens when two of those changes collide. Dropping\r\n * the tag on a page is the opt-in; removing it restores the framework's original\r\n * synchronous behavior exactly (docs/view-transition-design.md §3, G1/G2).\r\n *\r\n * ```html\r\n * <wcs-view-transition for=\"router\" mode=\"latest\"></wcs-view-transition>\r\n * ```\r\n *\r\n * The animation itself is written in CSS against `::view-transition-*`. This tag\r\n * starts and arbitrates transitions; it never describes one.\r\n */\r\nexport class WcsViewTransition extends HTMLElement {\r\n static observedAttributes = [\r\n \"mode\", \"naming\", \"naming-limit\", \"reduced-motion\", \"types\", \"disabled\", \"for\",\r\n ];\r\n\r\n // `properties` and `commands` come from the Core through the spread, so a\r\n // member added there cannot be missed here. Only `inputs` — the attribute\r\n // surface, which exists on the element and not on the Core — is declared.\r\n static wcBindable: IWcBindable = {\r\n ...ViewTransitionCore.wcBindable,\r\n inputs: [\r\n { name: \"disabled\", attribute: \"disabled\" },\r\n { name: \"mode\", attribute: \"mode\" },\r\n { name: \"naming\", attribute: \"naming\" },\r\n { name: \"namingLimit\", attribute: \"naming-limit\" },\r\n { name: \"reducedMotion\", attribute: \"reduced-motion\" },\r\n { name: \"types\", attribute: \"types\" },\r\n { name: \"participants\", attribute: \"for\" },\r\n ],\r\n };\r\n\r\n private _core: ViewTransitionCore;\r\n private _internals: ElementInternals | null = null;\r\n private _installed: boolean = false;\r\n\r\n constructor() {\r\n super();\r\n this._core = new ViewTransitionCore(this);\r\n this._internals = this._initInternals();\r\n this._wireStates({\r\n \"wcs-view-transition:active-changed\": (d) => ({ active: d === true }),\r\n \"wcs-view-transition:error\": (d) => ({ error: d != null }),\r\n });\r\n }\r\n\r\n /** The headless arbiter, for direct (non-DOM) use. */\r\n get core(): ViewTransitionCore {\r\n return this._core;\r\n }\r\n\r\n // CSS state reflection (:state()) — debug-only snapshot getter. NOT part of\r\n // wc-bindable. MUST NOT return the live CustomStateSet.\r\n get debugStates(): string[] {\r\n return this._internals ? [...this._internals.states] : [];\r\n }\r\n\r\n private _initInternals(): ElementInternals | null {\r\n // never-throw: attachInternals is absent in happy-dom / older environments,\r\n // and pre-125 Chromium rejects non-dashed state names (probed and discarded).\r\n try {\r\n if (typeof this.attachInternals !== \"function\") return null;\r\n const internals = this.attachInternals();\r\n internals.states.add(\"wcs-probe\");\r\n internals.states.delete(\"wcs-probe\");\r\n return internals;\r\n } catch {\r\n return null;\r\n }\r\n }\r\n\r\n private _wireStates(map: Record<string, (detail: any) => Record<string, boolean>>): void {\r\n if (this._internals === null) return;\r\n const states = this._internals.states;\r\n for (const [event, toStates] of Object.entries(map)) {\r\n this.addEventListener(event, (e) => {\r\n const debug = this.hasAttribute(\"debug-states\");\r\n for (const [name, on] of Object.entries(toStates((e as CustomEvent).detail))) {\r\n try {\r\n if (on) { states.add(name); } else { states.delete(name); }\r\n } catch { /* never-throw */ }\r\n if (debug) this.toggleAttribute(`data-wcs-state-${name}`, on);\r\n }\r\n });\r\n }\r\n }\r\n\r\n // --- inputs ---\r\n\r\n get disabled(): boolean {\r\n return this._core.disabled;\r\n }\r\n\r\n set disabled(value: boolean) {\r\n this._core.disabled = value === true;\r\n this.toggleAttribute(\"disabled\", value === true);\r\n }\r\n\r\n get mode(): TransitionMode {\r\n return this._core.mode;\r\n }\r\n\r\n set mode(value: TransitionMode) {\r\n this._core.mode = value;\r\n }\r\n\r\n get naming(): TransitionNaming {\r\n return this._core.naming;\r\n }\r\n\r\n set naming(value: TransitionNaming) {\r\n this._core.naming = value;\r\n }\r\n\r\n get namingLimit(): number {\r\n return this._core.namingLimit;\r\n }\r\n\r\n set namingLimit(value: number) {\r\n this._core.namingLimit = Number(value);\r\n }\r\n\r\n get reducedMotion(): ReducedMotionPolicy {\r\n return this._core.reducedMotion;\r\n }\r\n\r\n set reducedMotion(value: ReducedMotionPolicy) {\r\n this._core.reducedMotion = value;\r\n }\r\n\r\n get types(): readonly string[] {\r\n return this._core.types;\r\n }\r\n\r\n set types(value: readonly string[] | string) {\r\n this._core.types = value;\r\n }\r\n\r\n get participants(): readonly string[] {\r\n return this._core.participants;\r\n }\r\n\r\n set participants(value: readonly string[] | string) {\r\n this._core.participants = value;\r\n }\r\n\r\n // --- observable outputs ---\r\n\r\n get active(): boolean {\r\n return this._core.active;\r\n }\r\n\r\n get error(): Error | null {\r\n return this._core.error;\r\n }\r\n\r\n // --- commands ---\r\n\r\n skip(): void {\r\n this._core.skip();\r\n }\r\n\r\n // --- lifecycle ---\r\n\r\n connectedCallback(): void {\r\n upgradeProperties(this);\r\n this._syncAllAttributes();\r\n this._installed = this._core.install();\r\n }\r\n\r\n disconnectedCallback(): void {\r\n if (this._installed) {\r\n // dispose(), not uninstall(): a mutation already handed to this arbiter must\r\n // still be applied even though the page just removed its policy tag.\r\n this._core.dispose();\r\n this._installed = false;\r\n }\r\n }\r\n\r\n attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void {\r\n if (oldValue === newValue) return;\r\n this._applyAttribute(name, newValue);\r\n }\r\n\r\n /**\r\n * Apply the attributes present at connect time. Absent ones are deliberately\r\n * skipped rather than applied as null: a property assigned before upgrade\r\n * (Angular's `[prop]`, Lit's `.prop=`, or plain `el.mode = ...`) has just been\r\n * replayed through the setter by `upgradeProperties`, and re-applying a missing\r\n * attribute would immediately reset it to the default. Removing an attribute\r\n * still resets, via `attributeChangedCallback`.\r\n */\r\n private _syncAllAttributes(): void {\r\n for (const name of WcsViewTransition.observedAttributes) {\r\n const value = this.getAttribute(name);\r\n if (value === null) continue;\r\n this._applyAttribute(name, value);\r\n }\r\n }\r\n\r\n private _applyAttribute(name: string, value: string | null): void {\r\n switch (name) {\r\n case \"mode\":\r\n this._core.mode = (value ?? \"latest\") as TransitionMode;\r\n break;\r\n case \"naming\":\r\n this._core.naming = (value ?? \"manual\") as TransitionNaming;\r\n break;\r\n case \"naming-limit\":\r\n this._core.namingLimit = value === null ? Number.NaN : Number(value);\r\n break;\r\n case \"reduced-motion\":\r\n this._core.reducedMotion = (value ?? \"skip\") as ReducedMotionPolicy;\r\n break;\r\n case \"types\":\r\n this._core.types = value ?? \"\";\r\n break;\r\n case \"disabled\":\r\n this._core.disabled = value !== null;\r\n break;\r\n case \"for\":\r\n this._core.participants = value ?? \"\";\r\n break;\r\n }\r\n }\r\n}\r\n","import { WcsViewTransition } from \"./components/ViewTransition.js\";\r\nimport { config } from \"./config.js\";\r\n\r\n/**\r\n * Register this package's tags. Pass a scoped `CustomElementRegistry` to define\r\n * them for a single shadow tree -- scoped registries do not inherit the global\r\n * one, so a tree using one needs its own definitions.\r\n */\r\nexport function registerComponents(registry: CustomElementRegistry = customElements): void {\r\n if (!registry.get(config.tagNames.viewTransition)) {\r\n registry.define(config.tagNames.viewTransition, WcsViewTransition);\r\n }\r\n}\r\n","import { setConfig } from \"./config.js\";\r\nimport { registerComponents } from \"./registerComponents.js\";\r\nimport { IWritableConfig } from \"./types.js\";\r\n\r\nexport function bootstrapViewTransition(userConfig?: IWritableConfig, registry?: CustomElementRegistry): void {\r\n if (userConfig) {\r\n setConfig(userConfig);\r\n }\r\n registerComponents(registry);\r\n}\r\n"],"names":[],"mappings":"AAQA,MAAM,OAAO,GAAoB;AAC/B,IAAA,QAAQ,EAAE;AACR,QAAA,cAAc,EAAE,qBAAqB;AACtC,KAAA;CACF;AAED,SAAS,UAAU,CAAI,GAAM,EAAA;AAC3B,IAAA,IAAI,GAAG,KAAK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vD;AACF,YAAA,KAAK,QAAQ;gBACX,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,IAAI,QAAQ,CAAqB;gBAC3D;AACF,YAAA,KAAK,cAAc;gBACjB,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,KAAK,KAAK,IAAI,GAAG,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC;gBACpE;AACF,YAAA,KAAK,gBAAgB;gBACnB,IAAI,CAAC,KAAK,CAAC,aAAa,IAAI,KAAK,IAAI,MAAM,CAAwB;gBACnE;AACF,YAAA,KAAK,OAAO;gBACV,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,IAAI,EAAE;gBAC9B;AACF,YAAA,KAAK,UAAU;gBACb,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,KAAK,KAAK,IAAI;gBACpC;AACF,YAAA,KAAK,KAAK;gBACR,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,KAAK,IAAI,EAAE;gBACrC;;IAEN;;;ACvOF;;;;AAIG;AACG,SAAU,kBAAkB,CAAC,QAAA,GAAkC,cAAc,EAAA;AACjF,IAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE;QACjD,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,EAAE,iBAAiB,CAAC;IACpE;AACF;;ACRM,SAAU,uBAAuB,CAAC,UAA4B,EAAE,QAAgC,EAAA;IACpG,IAAI,UAAU,EAAE;QACd,SAAS,CAAC,UAAU,CAAC;IACvB;IACA,kBAAkB,CAAC,QAAQ,CAAC;AAC9B;;;;"}
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/config.ts","../src/protocol/transitionRunner.ts","../src/core/ViewTransitionCore.ts","../src/protocol/upgradeProperties.ts","../src/components/ViewTransition.ts","../src/registerComponents.ts","../src/bootstrapViewTransition.ts"],"sourcesContent":["import { IConfig, IWritableConfig } from \"./types.js\";\n\ninterface IInternalConfig extends IConfig {\n tagNames: {\n viewTransition: string;\n };\n}\n\nconst _config: IInternalConfig = {\n tagNames: {\n viewTransition: \"wcs-view-transition\",\n },\n};\n\nfunction deepFreeze<T>(obj: T): T {\n if (obj === null || typeof obj !== \"object\") return obj;\n Object.freeze(obj);\n for (const key of Object.keys(obj)) {\n deepFreeze((obj as Record<string, unknown>)[key]);\n }\n return obj;\n}\n\nfunction deepClone<T>(obj: T): T {\n if (obj === null || typeof obj !== \"object\") return obj;\n const clone: Record<string, unknown> = {};\n for (const key of Object.keys(obj)) {\n clone[key] = deepClone((obj as Record<string, unknown>)[key]);\n }\n return clone as T;\n}\n\nlet frozenConfig: IConfig | null = null;\n\n// Note: this is the live, mutable internal config. It is not part of the public\n// package exports (see exports.ts) — only `getConfig()` (a frozen snapshot) is\n// surfaced. `setConfig()` is applied internally via `bootstrapViewTransition()` and\n// is not re-exported from the package root, though a deep path import\n// (`.../src/config.js`) can still reach and mutate it. Accepted as-is for\n// cross-package consistency: every @wcstack package follows this same shape.\n// Use `getConfig()` for a frozen, safe read.\nexport const config: IConfig = _config as IConfig;\n\nexport function getConfig(): IConfig {\n if (!frozenConfig) {\n frozenConfig = deepFreeze(deepClone(_config));\n }\n return frozenConfig;\n}\n\nexport function setConfig(partialConfig: IWritableConfig): void {\n if (partialConfig.tagNames) {\n Object.assign(_config.tagNames, partialConfig.tagNames);\n }\n frozenConfig = null;\n}\n","// ===========================================================================\n// AUTO-GENERATED FILE - DO NOT EDIT.\n// Generated from /protocol/transition-runner.ts by scripts/sync-protocol-types.mjs.\n// Run `node scripts/sync-protocol-types.mjs` after editing the source.\n// ===========================================================================\n\n// transition-runner protocol — how a package that mutates the DOM hands that\n// mutation to whoever is arbitrating view transitions on the page.\n//\n// @wcstack/state and @wcstack/router must not depend on @wcstack/view-transition\n// (zero runtime dependencies, independently publishable), so the arbiter installs\n// itself on a well-known global symbol and the participants look it up lazily.\n// No arbiter installed means the mutation is invoked directly, synchronously —\n// byte-for-byte the behavior these packages had before the protocol existed.\n//\n// docs/view-transition-design.md §4 is the normative description.\n//\n// SINGLE SOURCE OF TRUTH: edit only this file (/protocol/transition-runner.ts), then run\n// `node scripts/sync-protocol-types.mjs` to regenerate the per-package copies\n// (packages/<pkg>/src/protocol/transitionRunner.ts). Those copies are generated — do not edit them.\n\n/**\n * Global key the arbiter installs itself under. `Symbol.for` so independently\n * loaded copies of this file (two CDN bundles on one page) still agree.\n */\nexport const TRANSITION_RUNNER_KEY = Symbol.for(\"wcstack.transition-runner\");\n\n/** Who is asking. Backs the arbiter's `for=` participant gate. */\nexport type TransitionSource = \"router\" | \"state\";\n\n/** `view-transition-name` assignment policy the arbiter declares for participants. */\nexport type TransitionNaming = \"manual\" | \"auto\";\n\nexport interface IWcsTransitionRunOptions {\n /** Participant id, for the `for=` gate and for diagnostics. */\n readonly source?: string;\n /** Transition types, where the environment supports `startViewTransition({ types })`. */\n readonly types?: readonly string[];\n}\n\nexport interface IWcsTransitionRunner {\n readonly protocol: \"wcs-transition-runner\";\n /** Integer protocol version. All versions >= 1 are participant-compatible. */\n readonly version: number;\n /** `\"auto\"` licenses a participant to assign `view-transition-name` itself. */\n readonly naming: TransitionNaming;\n /** Upper bound on auto-assigned names; past it a participant stops naming. */\n readonly namingLimit: number;\n /** Whether this participant animates at all. */\n accepts(source: string): boolean;\n /**\n * Invoke `mutate` inside a view transition when one is possible.\n *\n * Contract (docs/view-transition-design.md §4):\n * - `mutate` is invoked exactly once, whatever happens to the transition.\n * - The promise resolves once `mutate` has run — never waits for the animation.\n * - When no transition is started, `mutate` runs synchronously inside `run()`.\n * - It rejects only if `mutate` threw.\n */\n run(mutate: () => void, options?: IWcsTransitionRunOptions): Promise<void>;\n}\n\n/**\n * The installed arbiter, or null when there is none, it speaks a version this\n * reader does not, or it does not accept this participant.\n *\n * Looked up on every call rather than cached: the tag can be added, removed, or\n * reconfigured at any point in a page's life, and a stale cache would either\n * animate what the author just switched off or miss what they switched on.\n */\nexport function getTransitionRunner(source: string): IWcsTransitionRunner | null {\n const candidate = (globalThis as Record<symbol, unknown>)[TRANSITION_RUNNER_KEY] as\n | IWcsTransitionRunner\n | undefined;\n if (candidate === undefined || candidate === null) return null;\n if (candidate.protocol !== \"wcs-transition-runner\") return null;\n if (typeof candidate.version !== \"number\" || candidate.version < 1) return null;\n if (typeof candidate.run !== \"function\") return null;\n if (typeof candidate.accepts !== \"function\" || !candidate.accepts(source)) return null;\n return candidate;\n}\n\n/**\n * Run `mutate` under the installed arbiter, or directly when there is none.\n *\n * Returns `undefined` in the no-arbiter case instead of a resolved promise: the\n * state drain calls this on every batch, and awaiting is a caller's choice, not\n * an allocation the common path should pay for. `await` accepts both.\n */\nexport function runTransition(\n source: string,\n mutate: () => void,\n types?: readonly string[],\n): Promise<void> | undefined {\n const runner = getTransitionRunner(source);\n if (runner === null) {\n mutate();\n return undefined;\n }\n return runner.run(mutate, { source, types });\n}\n","import { IWcBindable, ReducedMotionPolicy, TransitionMode } from \"../types.js\";\nimport {\n IWcsTransitionRunOptions,\n IWcsTransitionRunner,\n TRANSITION_RUNNER_KEY,\n TransitionNaming,\n} from \"../protocol/transitionRunner.js\";\n\n/**\n * Minimal structural views of the View Transition API. Declared locally rather\n * than relying on `lib.dom`'s (still moving) definitions, so the package\n * type-checks identically across TypeScript lib versions and an environment\n * without the API is a value check, never a type error.\n */\ninterface IViewTransitionLike {\n readonly updateCallbackDone: Promise<void>;\n readonly finished: Promise<void>;\n readonly ready: Promise<void>;\n skipTransition(): void;\n}\n\ninterface IStartViewTransitionOptions {\n update: () => void;\n types?: string[];\n}\n\ntype StartViewTransition = (\n callbackOrOptions: (() => void) | IStartViewTransitionOptions,\n) => IViewTransitionLike;\n\ninterface IPendingEntry {\n readonly mutate: () => void;\n readonly resolve: () => void;\n readonly reject: (reason: unknown) => void;\n}\n\nconst DEFAULT_NAMING_LIMIT = 200;\nconst DEFAULT_PARTICIPANTS: readonly string[] = [\"router\", \"state\"];\n\nfunction toError(value: unknown): Error {\n return value instanceof Error ? value : new Error(String(value));\n}\n\n/**\n * Accept both the array form and the space-separated string an attribute (or a\n * `data-wcs` binding) produces. The Core is a public export, so `core.types = \"a b\"`\n * is a call an adopter can make — and without normalizing it here that string\n * would degrade into single characters (`new Set(\"router\")` contains no\n * `\"router\"`, so `accepts()` would answer false for every participant).\n */\nfunction toStringList(value: readonly string[] | string): string[] {\n if (typeof value === \"string\") {\n return value.split(/\\s+/).filter((token) => token !== \"\");\n }\n return [...value];\n}\n\nfunction prefersReducedMotion(): boolean {\n // never-throw: matchMedia is absent in happy-dom and in non-browser hosts.\n try {\n const mm = (globalThis as { matchMedia?: (q: string) => { matches: boolean } }).matchMedia;\n if (typeof mm !== \"function\") return false;\n return mm.call(globalThis, \"(prefers-reduced-motion: reduce)\").matches === true;\n } catch {\n return false;\n }\n}\n\n/**\n * Whether `startViewTransition({ update, types })` is understood. Detected on\n * `ViewTransition.prototype`, because passing the object form to an\n * implementation that only accepts a callback would throw at the call site —\n * after the browser has already decided it has no update callback to run.\n */\nfunction supportsTypes(): boolean {\n try {\n const ctor = (globalThis as { ViewTransition?: { prototype: object } }).ViewTransition;\n return ctor !== undefined && \"types\" in ctor.prototype;\n } catch {\n return false;\n }\n}\n\n/**\n * Headless view-transition arbiter — the single place on a page that decides\n * whether a DOM mutation animates, and what happens when two of them collide.\n *\n * It is not an I/O node: nothing is read from a device and there is no data to\n * bind. It is a *policy* node. Participants (`@wcstack/router`, `@wcstack/state`)\n * never import it; they find it through the transition-runner protocol on a\n * well-known global symbol and hand it a mutation to run\n * (docs/view-transition-design.md §4).\n *\n * The one invariant everything else is subordinate to: **a mutation handed to\n * `run()` is applied exactly once**, whatever is decided about animating it. An\n * unsupported browser, a hidden tab, reduced motion, a colliding transition and a\n * `startViewTransition` that throws all end in the mutation running — the page\n * must never be left showing stale DOM because an animation could not be played.\n */\nexport class ViewTransitionCore extends EventTarget {\n static wcBindable: IWcBindable = {\n protocol: \"wc-bindable\",\n version: 1,\n properties: [\n { name: \"active\", event: \"wcs-view-transition:active-changed\", semantics: \"state\" },\n { name: \"error\", event: \"wcs-view-transition:error\", semantics: \"state\" },\n ],\n commands: [\n { name: \"skip\" },\n ],\n };\n\n private _target: EventTarget;\n\n private _mode: TransitionMode = \"latest\";\n private _naming: TransitionNaming = \"manual\";\n private _namingLimit: number = DEFAULT_NAMING_LIMIT;\n private _reducedMotion: ReducedMotionPolicy = \"skip\";\n private _types: string[] = [];\n private _disabled: boolean = false;\n private _participants: Set<string> = new Set(DEFAULT_PARTICIPANTS);\n\n private _active: boolean = false;\n private _error: Error | null = null;\n\n /** Requests waiting for the microtask flush that starts a transition. */\n private _pending: IPendingEntry[] | null = null;\n private _flushScheduled: boolean = false;\n /**\n * The batch handed to the running transition while its update callback has not\n * fired yet. Non-null means \"capturing\": a request arriving now still joins this\n * batch, which is both the coalescing window and the only ordering guarantee\n * that keeps a later `exhaust`/`latest` request from applying ahead of it.\n */\n private _batch: IPendingEntry[] | null = null;\n private _transition: IViewTransitionLike | null = null;\n private _queue: IPendingEntry[][] = [];\n\n constructor(target?: EventTarget) {\n super();\n this._target = target ?? this;\n }\n\n // --- transition-runner protocol surface ---\n\n get protocol(): \"wcs-transition-runner\" {\n return \"wcs-transition-runner\";\n }\n\n get version(): number {\n return 1;\n }\n\n get naming(): TransitionNaming {\n return this._naming;\n }\n\n set naming(value: TransitionNaming) {\n this._naming = value === \"auto\" ? \"auto\" : \"manual\";\n }\n\n get namingLimit(): number {\n return this._namingLimit;\n }\n\n set namingLimit(value: number) {\n this._namingLimit = Number.isFinite(value) && value >= 0 ? Math.floor(value) : DEFAULT_NAMING_LIMIT;\n }\n\n accepts(source: string): boolean {\n return this._participants.has(source);\n }\n\n /**\n * Install this core as the page's arbiter. Returns false (and warns) when\n * another one already holds the slot — two arbiters would each think they own\n * the exclusion, which is precisely the thing an arbiter exists to prevent.\n */\n install(): boolean {\n const slot = globalThis as Record<symbol, unknown>;\n const current = slot[TRANSITION_RUNNER_KEY];\n if (current !== undefined && current !== null && current !== this) {\n console.warn(\n \"[@wcstack/view-transition] a transition runner is already installed; \" +\n \"this element is inert. Use one <wcs-view-transition> per document.\",\n );\n return false;\n }\n slot[TRANSITION_RUNNER_KEY] = this as unknown as IWcsTransitionRunner;\n return true;\n }\n\n /** Release the arbiter slot, but only if it is still ours. */\n uninstall(): void {\n const slot = globalThis as Record<symbol, unknown>;\n if (slot[TRANSITION_RUNNER_KEY] === (this as unknown)) {\n delete slot[TRANSITION_RUNNER_KEY];\n }\n }\n\n // --- configuration ---\n\n get mode(): TransitionMode {\n return this._mode;\n }\n\n set mode(value: TransitionMode) {\n this._mode = value === \"queue\" || value === \"exhaust\" ? value : \"latest\";\n }\n\n get reducedMotion(): ReducedMotionPolicy {\n return this._reducedMotion;\n }\n\n set reducedMotion(value: ReducedMotionPolicy) {\n this._reducedMotion = value === \"animate\" ? \"animate\" : \"skip\";\n }\n\n get types(): readonly string[] {\n return this._types;\n }\n\n set types(value: readonly string[] | string) {\n this._types = toStringList(value);\n }\n\n get disabled(): boolean {\n return this._disabled;\n }\n\n set disabled(value: boolean) {\n this._disabled = value === true;\n }\n\n get participants(): readonly string[] {\n return [...this._participants];\n }\n\n set participants(value: readonly string[] | string) {\n const list = toStringList(value);\n this._participants = new Set(list.length > 0 ? list : DEFAULT_PARTICIPANTS);\n }\n\n // --- observable outputs ---\n\n get active(): boolean {\n return this._active;\n }\n\n get error(): Error | null {\n return this._error;\n }\n\n // --- commands ---\n\n /**\n * Finish the running transition now. Per spec the update callback still runs if\n * it has not yet, so skipping loses the animation and never the DOM update.\n */\n skip(): void {\n this._transition?.skipTransition();\n }\n\n // --- the protocol entry point ---\n\n run(mutate: () => void, _options?: IWcsTransitionRunOptions): Promise<void> {\n if (!this._canTransition()) {\n return this._applyNow(mutate);\n }\n return new Promise<void>((resolve, reject) => {\n const entry: IPendingEntry = { mutate, resolve, reject };\n // Capturing: the running transition has not called its update callback yet,\n // so this mutation can still ride along — and must, or it would be applied\n // before mutations that were requested earlier.\n if (this._batch !== null) {\n this._batch.push(entry);\n return;\n }\n if (this._transition !== null && this._mode === \"exhaust\") {\n this._settle(entry);\n return;\n }\n (this._pending ??= []).push(entry);\n this._schedule();\n });\n }\n\n dispose(): void {\n this.uninstall();\n // Anything still unapplied belongs to a page that is going away; apply it so\n // the DOM does not stay behind the state that asked for the change.\n //\n // Order is request order, and that is why the capturing batch has to be taken\n // first: its mutations were requested *before* everything in _pending and\n // _queue, but they are the ones still waiting on a frame. Settling only the\n // later two would apply them out of order. Clearing _batch also turns the\n // running transition's update callback into a no-op, which is what keeps\n // \"applied exactly once\" true across a dispose.\n const capturing = this._batch;\n this._batch = null;\n const abandoned = [...(capturing ?? []), ...(this._pending ?? []), ...this._queue.flat()];\n this._pending = null;\n this._queue = [];\n for (const entry of abandoned) {\n this._settle(entry);\n }\n }\n\n // --- internals ---\n\n private _canTransition(): boolean {\n if (this._disabled) return false;\n const doc = (globalThis as { document?: Document }).document;\n if (doc === undefined || typeof (doc as { startViewTransition?: unknown }).startViewTransition !== \"function\") {\n return false;\n }\n // SSR: no transition is started while rendering on the server (G5). The gate\n // lives here rather than in each participant because the protocol is public —\n // a third-party participant has no reason to know wcstack's SSR marker, and\n // the arbiter is the one place that owns the policy. `@wcstack/server` sets\n // the attribute on its own document and it never reaches the client HTML.\n if (doc.documentElement?.hasAttribute(\"data-wcs-server\") === true) return false;\n // A hidden tab gets no rendering opportunities, so the update callback would\n // not run until the page is looked at again — the DOM would silently freeze\n // for as long as the tab stays in the background. Apply straight through.\n if (doc.hidden === true) return false;\n if (this._reducedMotion === \"skip\" && prefersReducedMotion()) return false;\n return true;\n }\n\n private _applyNow(mutate: () => void): Promise<void> {\n try {\n mutate();\n } catch (error) {\n return Promise.reject(error);\n }\n return Promise.resolve();\n }\n\n private _settle(entry: IPendingEntry): void {\n try {\n entry.mutate();\n entry.resolve();\n } catch (error) {\n entry.reject(error);\n }\n }\n\n private _schedule(): void {\n if (this._flushScheduled) return;\n this._flushScheduled = true;\n queueMicrotask(() => this._flush());\n }\n\n private _flush(): void {\n this._flushScheduled = false;\n const batch = this._pending;\n this._pending = null;\n if (batch === null || batch.length === 0) return;\n if (this._transition !== null) {\n if (this._mode === \"queue\") {\n this._queue.push(batch);\n return;\n }\n if (this._mode === \"exhaust\") {\n for (const entry of batch) {\n this._settle(entry);\n }\n return;\n }\n // \"latest\": starting a new transition skips the running one, and the\n // running one is past its update callback (a capturing batch is joined in\n // run(), never reaching here), so ordering holds.\n }\n this._start(batch);\n }\n\n private _start(batch: IPendingEntry[]): void {\n const doc = (globalThis as unknown as { document: Document }).document;\n const start = (doc as unknown as { startViewTransition: StartViewTransition }).startViewTransition;\n this._batch = batch;\n const update = (): void => {\n const running = this._batch;\n this._batch = null;\n if (running === null) return;\n for (const entry of running) {\n this._settle(entry);\n }\n };\n let transition: IViewTransitionLike;\n try {\n transition = this._types.length > 0 && supportsTypes()\n ? start.call(doc, { update, types: [...this._types] })\n : start.call(doc, update);\n } catch (error) {\n // Could not even start: apply the mutations rather than lose them.\n this._batch = null;\n this._setError(toError(error));\n for (const entry of batch) {\n this._settle(entry);\n }\n return;\n }\n this._transition = transition;\n this._setError(null);\n this._setActive(true);\n // `finished` rejects when the update callback throws — it cannot here, since\n // _settle catches per entry — and `ready` rejects whenever the transition is\n // skipped, which is routine. Both are attached defensively so a routine skip\n // never surfaces as an unhandled rejection.\n const done = (): void => this._onFinished(transition);\n transition.finished.then(done, done);\n transition.ready.then(undefined, () => { /* skipped: not an error */ });\n transition.updateCallbackDone.then(undefined, () => { /* settled per entry */ });\n }\n\n private _onFinished(transition: IViewTransitionLike): void {\n // A superseded transition (\"latest\") still settles; only the current one owns\n // the active flag and the queue.\n if (this._transition !== transition) return;\n this._transition = null;\n this._setActive(false);\n const next = this._queue.shift();\n if (next !== undefined) {\n this._start(next);\n }\n }\n\n private _setActive(value: boolean): void {\n if (this._active === value) return;\n this._active = value;\n this._dispatch(\"wcs-view-transition:active-changed\", value);\n }\n\n private _setError(error: Error | null): void {\n if (this._error === error) return;\n this._error = error;\n this._dispatch(\"wcs-view-transition:error\", error);\n }\n\n private _dispatch(type: string, detail: unknown): void {\n this._target.dispatchEvent(new CustomEvent(type, { detail, bubbles: true, composed: true }));\n }\n}\n","// ===========================================================================\n// AUTO-GENERATED FILE - DO NOT EDIT.\n// Generated from /protocol/upgrade-properties.ts by scripts/sync-protocol-types.mjs.\n// Run `node scripts/sync-protocol-types.mjs` after editing the source.\n// ===========================================================================\n\n// custom element の property upgrade — `static wcBindable.inputs` に宣言した入力のうち、\n// 要素が upgrade される前に代入された own データプロパティを取り込み直す。\n//\n// なぜ必要か:\n// 未定義タグの要素は素の HTMLElement なので、`el.url = \"...\"` は own データプロパティを作る。\n// upgrade 後にクラスの accessor が prototype へ入っても own プロパティが優先されるため、\n// setter は二度と呼ばれず、値は要素へ届かないまま消える(エラーも警告も出ない)。\n// 常にプロパティ代入を行う framework(Angular の `[prop]`、Lit の `.prop=`、\n// Solid の `prop:`、Vue の `.prop` 修飾子)× 遅延定義(autoloader / CDN / code-split)で\n// 常態的に起きる。docs/architecture-hardening/13-framework-adapter-binding-constraints.md §1.2。\n//\n// 安全側の判定:\n// own プロパティがあっても、prototype チェーンに accessor が無ければ「シャドウ」ではなく\n// その own プロパティ自体が正規の格納先なので触らない(public class field を壊さない)。\n//\n// SINGLE SOURCE OF TRUTH: edit only this file (/protocol/upgrade-properties.ts), then run\n// `node scripts/sync-protocol-types.mjs` to regenerate the per-package copies\n// (packages/<pkg>/src/protocol/upgradeProperties.ts). Those copies are generated — do not edit them.\nimport { IWcBindable } from \"./wcBindable.js\";\n\nfunction hasAccessorOnPrototype(target: object, name: string): boolean {\n let proto = Object.getPrototypeOf(target);\n while (proto !== null) {\n const descriptor = Object.getOwnPropertyDescriptor(proto, name);\n if (descriptor !== undefined) {\n return typeof descriptor.get === \"function\" || typeof descriptor.set === \"function\";\n }\n proto = Object.getPrototypeOf(proto);\n }\n return false;\n}\n\n/**\n * `connectedCallback` の先頭で呼ぶ。宣言済み input のうち upgrade 前の代入で\n * accessor をシャドウしている own プロパティを、delete → 再代入で setter に通し直す。\n *\n * - 冪等: 再代入は accessor を通るので own プロパティは残らず、2 回目以降は no-op。\n * - 宣言に `inputs` が無い要素、`wcBindable` を持たない要素では何もしない。\n * - 値の意味は変えない。今まで捨てられていた代入が届くようになる一方向の変化。\n */\nexport function upgradeProperties(element: object): void {\n const declaration = (element as { constructor?: { wcBindable?: IWcBindable } }).constructor?.wcBindable;\n const inputs = declaration?.inputs;\n if (inputs === undefined) return;\n for (const input of inputs) {\n const name = input.name;\n if (!Object.prototype.hasOwnProperty.call(element, name)) continue;\n if (!hasAccessorOnPrototype(element, name)) continue;\n const record = element as Record<string, unknown>;\n const value = record[name];\n delete record[name];\n record[name] = value;\n }\n}\n","import { ViewTransitionCore } from \"../core/ViewTransitionCore.js\";\nimport { upgradeProperties } from \"../protocol/upgradeProperties.js\";\nimport { TransitionNaming } from \"../protocol/transitionRunner.js\";\nimport { IWcBindable, ReducedMotionPolicy, TransitionMode } from \"../types.js\";\n\n/**\n * `<wcs-view-transition>` — the page's view-transition policy node.\n *\n * It renders nothing and binds no data. It declares *how* the DOM changes that\n * `@wcstack/router` and `@wcstack/state` make should animate, and it is the single\n * arbiter that decides what happens when two of those changes collide. Dropping\n * the tag on a page is the opt-in; removing it restores the framework's original\n * synchronous behavior exactly (docs/view-transition-design.md §3, G1/G2).\n *\n * ```html\n * <wcs-view-transition for=\"router\" mode=\"latest\"></wcs-view-transition>\n * ```\n *\n * The animation itself is written in CSS against `::view-transition-*`. This tag\n * starts and arbitrates transitions; it never describes one.\n */\nexport class WcsViewTransition extends HTMLElement {\n static observedAttributes = [\n \"mode\", \"naming\", \"naming-limit\", \"reduced-motion\", \"types\", \"disabled\", \"for\",\n ];\n\n // `properties` and `commands` come from the Core through the spread, so a\n // member added there cannot be missed here. Only `inputs` — the attribute\n // surface, which exists on the element and not on the Core — is declared.\n static wcBindable: IWcBindable = {\n ...ViewTransitionCore.wcBindable,\n inputs: [\n { name: \"disabled\", attribute: \"disabled\" },\n { name: \"mode\", attribute: \"mode\" },\n { name: \"naming\", attribute: \"naming\" },\n { name: \"namingLimit\", attribute: \"naming-limit\" },\n { name: \"reducedMotion\", attribute: \"reduced-motion\" },\n { name: \"types\", attribute: \"types\" },\n { name: \"participants\", attribute: \"for\" },\n ],\n };\n\n private _core: ViewTransitionCore;\n private _internals: ElementInternals | null = null;\n private _installed: boolean = false;\n\n constructor() {\n super();\n this._core = new ViewTransitionCore(this);\n this._internals = this._initInternals();\n this._wireStates({\n \"wcs-view-transition:active-changed\": (d) => ({ active: d === true }),\n \"wcs-view-transition:error\": (d) => ({ error: d != null }),\n });\n }\n\n /** The headless arbiter, for direct (non-DOM) use. */\n get core(): ViewTransitionCore {\n return this._core;\n }\n\n // CSS state reflection (:state()) — debug-only snapshot getter. NOT part of\n // wc-bindable. MUST NOT return the live CustomStateSet.\n get debugStates(): string[] {\n return this._internals ? [...this._internals.states] : [];\n }\n\n private _initInternals(): ElementInternals | null {\n // never-throw: attachInternals is absent in happy-dom / older environments,\n // and pre-125 Chromium rejects non-dashed state names (probed and discarded).\n try {\n if (typeof this.attachInternals !== \"function\") return null;\n const internals = this.attachInternals();\n internals.states.add(\"wcs-probe\");\n internals.states.delete(\"wcs-probe\");\n return internals;\n } catch {\n return null;\n }\n }\n\n private _wireStates(map: Record<string, (detail: any) => Record<string, boolean>>): void {\n if (this._internals === null) return;\n const states = this._internals.states;\n for (const [event, toStates] of Object.entries(map)) {\n this.addEventListener(event, (e) => {\n const debug = this.hasAttribute(\"debug-states\");\n for (const [name, on] of Object.entries(toStates((e as CustomEvent).detail))) {\n try {\n if (on) { states.add(name); } else { states.delete(name); }\n } catch { /* never-throw */ }\n if (debug) this.toggleAttribute(`data-wcs-state-${name}`, on);\n }\n });\n }\n }\n\n // --- inputs ---\n\n get disabled(): boolean {\n return this._core.disabled;\n }\n\n set disabled(value: boolean) {\n this._core.disabled = value === true;\n this.toggleAttribute(\"disabled\", value === true);\n }\n\n get mode(): TransitionMode {\n return this._core.mode;\n }\n\n set mode(value: TransitionMode) {\n this._core.mode = value;\n }\n\n get naming(): TransitionNaming {\n return this._core.naming;\n }\n\n set naming(value: TransitionNaming) {\n this._core.naming = value;\n }\n\n get namingLimit(): number {\n return this._core.namingLimit;\n }\n\n set namingLimit(value: number) {\n this._core.namingLimit = Number(value);\n }\n\n get reducedMotion(): ReducedMotionPolicy {\n return this._core.reducedMotion;\n }\n\n set reducedMotion(value: ReducedMotionPolicy) {\n this._core.reducedMotion = value;\n }\n\n get types(): readonly string[] {\n return this._core.types;\n }\n\n set types(value: readonly string[] | string) {\n this._core.types = value;\n }\n\n get participants(): readonly string[] {\n return this._core.participants;\n }\n\n set participants(value: readonly string[] | string) {\n this._core.participants = value;\n }\n\n // --- observable outputs ---\n\n get active(): boolean {\n return this._core.active;\n }\n\n get error(): Error | null {\n return this._core.error;\n }\n\n // --- commands ---\n\n skip(): void {\n this._core.skip();\n }\n\n // --- lifecycle ---\n\n connectedCallback(): void {\n upgradeProperties(this);\n this._syncAllAttributes();\n this._installed = this._core.install();\n }\n\n disconnectedCallback(): void {\n if (this._installed) {\n // dispose(), not uninstall(): a mutation already handed to this arbiter must\n // still be applied even though the page just removed its policy tag.\n this._core.dispose();\n this._installed = false;\n }\n }\n\n attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void {\n if (oldValue === newValue) return;\n this._applyAttribute(name, newValue);\n }\n\n /**\n * Apply the attributes present at connect time. Absent ones are deliberately\n * skipped rather than applied as null: a property assigned before upgrade\n * (Angular's `[prop]`, Lit's `.prop=`, or plain `el.mode = ...`) has just been\n * replayed through the setter by `upgradeProperties`, and re-applying a missing\n * attribute would immediately reset it to the default. Removing an attribute\n * still resets, via `attributeChangedCallback`.\n */\n private _syncAllAttributes(): void {\n for (const name of WcsViewTransition.observedAttributes) {\n const value = this.getAttribute(name);\n if (value === null) continue;\n this._applyAttribute(name, value);\n }\n }\n\n private _applyAttribute(name: string, value: string | null): void {\n switch (name) {\n case \"mode\":\n this._core.mode = (value ?? \"latest\") as TransitionMode;\n break;\n case \"naming\":\n this._core.naming = (value ?? \"manual\") as TransitionNaming;\n break;\n case \"naming-limit\":\n this._core.namingLimit = value === null ? Number.NaN : Number(value);\n break;\n case \"reduced-motion\":\n this._core.reducedMotion = (value ?? \"skip\") as ReducedMotionPolicy;\n break;\n case \"types\":\n this._core.types = value ?? \"\";\n break;\n case \"disabled\":\n this._core.disabled = value !== null;\n break;\n case \"for\":\n this._core.participants = value ?? \"\";\n break;\n }\n }\n}\n","import { WcsViewTransition } from \"./components/ViewTransition.js\";\nimport { config } from \"./config.js\";\n\n/**\n * Register this package's tags. Pass a scoped `CustomElementRegistry` to define\n * them for a single shadow tree -- scoped registries do not inherit the global\n * one, so a tree using one needs its own definitions.\n */\nexport function registerComponents(registry: CustomElementRegistry = customElements): void {\n if (!registry.get(config.tagNames.viewTransition)) {\n registry.define(config.tagNames.viewTransition, WcsViewTransition);\n }\n}\n","import { setConfig } from \"./config.js\";\nimport { registerComponents } from \"./registerComponents.js\";\nimport { IWritableConfig } from \"./types.js\";\n\nexport function bootstrapViewTransition(userConfig?: IWritableConfig, registry?: CustomElementRegistry): void {\n if (userConfig) {\n setConfig(userConfig);\n }\n registerComponents(registry);\n}\n"],"names":[],"mappings":"AAQA,MAAM,OAAO,GAAoB;AAC/B,IAAA,QAAQ,EAAE;AACR,QAAA,cAAc,EAAE,qBAAqB;AACtC,KAAA;CACF;AAED,SAAS,UAAU,CAAI,GAAM,EAAA;AAC3B,IAAA,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ;AAAE,QAAA,OAAO,GAAG;AACvD,IAAA,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC;IAClB,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;AAClC,QAAA,UAAU,CAAE,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GAAG,GAAG,MAAM,CAAC,KAAK,CAAC;gBACpE;AACF,YAAA,KAAK,gBAAgB;gBACnB,IAAI,CAAC,KAAK,CAAC,aAAa,IAAI,KAAK,IAAI,MAAM,CAAwB;gBACnE;AACF,YAAA,KAAK,OAAO;gBACV,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,IAAI,EAAE;gBAC9B;AACF,YAAA,KAAK,UAAU;gBACb,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,KAAK,KAAK,IAAI;gBACpC;AACF,YAAA,KAAK,KAAK;gBACR,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,KAAK,IAAI,EAAE;gBACrC;;IAEN;;;ACvOF;;;;AAIG;AACG,SAAU,kBAAkB,CAAC,QAAA,GAAkC,cAAc,EAAA;AACjF,IAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE;QACjD,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,EAAE,iBAAiB,CAAC;IACpE;AACF;;ACRM,SAAU,uBAAuB,CAAC,UAA4B,EAAE,QAAgC,EAAA;IACpG,IAAI,UAAU,EAAE;QACd,SAAS,CAAC,UAAU,CAAC;IACvB;IACA,kBAAkB,CAAC,QAAQ,CAAC;AAC9B;;;;"}
|
package/package.json
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@wcstack/view-transition",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Declarative View Transition arbiter for Web Components. Framework-agnostic policy tag that animates @wcstack/router route swaps and @wcstack/state list/branch updates via the transition-runner protocol.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/index.esm.js",
|
|
7
|
-
"module": "./dist/index.esm.js",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"types": "./dist/index.d.ts",
|
|
12
|
-
"import": "./dist/index.esm.js"
|
|
13
|
-
},
|
|
14
|
-
"./auto": "./dist/auto.min.js"
|
|
15
|
-
},
|
|
16
|
-
"files": [
|
|
17
|
-
"dist"
|
|
18
|
-
],
|
|
19
|
-
"scripts": {
|
|
20
|
-
"clean": "rimraf dist .tsc-out",
|
|
21
|
-
"build": "rimraf dist .tsc-out && tsc && rollup -c",
|
|
22
|
-
"test": "vitest run",
|
|
23
|
-
"test:watch": "vitest",
|
|
24
|
-
"test:coverage": "vitest run --coverage",
|
|
25
|
-
"lint": "eslint src",
|
|
26
|
-
"version:patch": "npm version patch",
|
|
27
|
-
"version:minor": "npm version minor",
|
|
28
|
-
"version:major": "npm version major",
|
|
29
|
-
"prepublishOnly": "npm run build && npm run test:coverage"
|
|
30
|
-
},
|
|
31
|
-
"keywords": [
|
|
32
|
-
"web-components",
|
|
33
|
-
"view-transition",
|
|
34
|
-
"view-transitions-api",
|
|
35
|
-
"page-transition",
|
|
36
|
-
"animation",
|
|
37
|
-
"custom-elements",
|
|
38
|
-
"wc-bindable",
|
|
39
|
-
"declarative",
|
|
40
|
-
"zero-dependencies",
|
|
41
|
-
"framework-agnostic"
|
|
42
|
-
],
|
|
43
|
-
"author": "mogera551",
|
|
44
|
-
"homepage": "https://wcstack.github.io",
|
|
45
|
-
"repository": {
|
|
46
|
-
"type": "git",
|
|
47
|
-
"url": "https://github.com/wcstack/wcstack.git",
|
|
48
|
-
"directory": "packages/view-transition"
|
|
49
|
-
},
|
|
50
|
-
"bugs": {
|
|
51
|
-
"url": "https://github.com/wcstack/wcstack/issues"
|
|
52
|
-
},
|
|
53
|
-
"license": "MIT",
|
|
54
|
-
"devDependencies": {
|
|
55
|
-
"@eslint/js": "^9.39.1",
|
|
56
|
-
"@rollup/plugin-terser": "^0.4.4",
|
|
57
|
-
"@rollup/plugin-typescript": "^11.1.6",
|
|
58
|
-
"@vitest/coverage-v8": "^4.0.15",
|
|
59
|
-
"@vitest/ui": "^4.0.15",
|
|
60
|
-
"eslint": "^9.39.1",
|
|
61
|
-
"globals": "^16.5.0",
|
|
62
|
-
"happy-dom": "^20.0.11",
|
|
63
|
-
"rimraf": "^6.0.1",
|
|
64
|
-
"rollup": "^4.22.4",
|
|
65
|
-
"rollup-plugin-dts": "^6.1.1",
|
|
66
|
-
"rollup-plugin-copy": "^3.5.0",
|
|
67
|
-
"tslib": "^2.8.1",
|
|
68
|
-
"typescript": "^5.9.3",
|
|
69
|
-
"typescript-eslint": "^8.49.0",
|
|
70
|
-
"vitest": "^4.0.15"
|
|
71
|
-
}
|
|
72
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@wcstack/view-transition",
|
|
3
|
+
"version": "1.33.0",
|
|
4
|
+
"description": "Declarative View Transition arbiter for Web Components. Framework-agnostic policy tag that animates @wcstack/router route swaps and @wcstack/state list/branch updates via the transition-runner protocol.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.esm.js",
|
|
7
|
+
"module": "./dist/index.esm.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.esm.js"
|
|
13
|
+
},
|
|
14
|
+
"./auto": "./dist/auto.min.js"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"clean": "rimraf dist .tsc-out",
|
|
21
|
+
"build": "rimraf dist .tsc-out && tsc && rollup -c",
|
|
22
|
+
"test": "vitest run",
|
|
23
|
+
"test:watch": "vitest",
|
|
24
|
+
"test:coverage": "vitest run --coverage",
|
|
25
|
+
"lint": "eslint src",
|
|
26
|
+
"version:patch": "npm version patch",
|
|
27
|
+
"version:minor": "npm version minor",
|
|
28
|
+
"version:major": "npm version major",
|
|
29
|
+
"prepublishOnly": "npm run build && npm run test:coverage"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"web-components",
|
|
33
|
+
"view-transition",
|
|
34
|
+
"view-transitions-api",
|
|
35
|
+
"page-transition",
|
|
36
|
+
"animation",
|
|
37
|
+
"custom-elements",
|
|
38
|
+
"wc-bindable",
|
|
39
|
+
"declarative",
|
|
40
|
+
"zero-dependencies",
|
|
41
|
+
"framework-agnostic"
|
|
42
|
+
],
|
|
43
|
+
"author": "mogera551",
|
|
44
|
+
"homepage": "https://wcstack.github.io",
|
|
45
|
+
"repository": {
|
|
46
|
+
"type": "git",
|
|
47
|
+
"url": "https://github.com/wcstack/wcstack.git",
|
|
48
|
+
"directory": "packages/view-transition"
|
|
49
|
+
},
|
|
50
|
+
"bugs": {
|
|
51
|
+
"url": "https://github.com/wcstack/wcstack/issues"
|
|
52
|
+
},
|
|
53
|
+
"license": "MIT",
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@eslint/js": "^9.39.1",
|
|
56
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
57
|
+
"@rollup/plugin-typescript": "^11.1.6",
|
|
58
|
+
"@vitest/coverage-v8": "^4.0.15",
|
|
59
|
+
"@vitest/ui": "^4.0.15",
|
|
60
|
+
"eslint": "^9.39.1",
|
|
61
|
+
"globals": "^16.5.0",
|
|
62
|
+
"happy-dom": "^20.0.11",
|
|
63
|
+
"rimraf": "^6.0.1",
|
|
64
|
+
"rollup": "^4.22.4",
|
|
65
|
+
"rollup-plugin-dts": "^6.1.1",
|
|
66
|
+
"rollup-plugin-copy": "^3.5.0",
|
|
67
|
+
"tslib": "^2.8.1",
|
|
68
|
+
"typescript": "^5.9.3",
|
|
69
|
+
"typescript-eslint": "^8.49.0",
|
|
70
|
+
"vitest": "^4.0.15"
|
|
71
|
+
}
|
|
72
|
+
}
|