@flemo/core 2.2.2 → 2.3.1

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.
@@ -0,0 +1 @@
1
+ export {};
@@ -31,7 +31,29 @@ export interface CreateRouterScopeInput {
31
31
  browserDriver: HistoryDriver | null;
32
32
  hostedScope: FlemoStores | null;
33
33
  persistKey?: string;
34
+ deferEntryAdoption?: boolean;
34
35
  routerKey?: string;
35
36
  zoneEntryId?: string;
36
37
  }
37
38
  export default function createRouterScope(input: CreateRouterScopeInput): FlemoStores;
39
+ /**
40
+ * Adopt the identity of the browser entry this scope was seeded on, after the
41
+ * fact — the deferred half of `deferEntryAdoption`.
42
+ *
43
+ * A binding that hydrates calls this once hydration is over, and the store's
44
+ * root frame stops being the generic "root" and becomes the entry it is
45
+ * actually sitting on. That matters for exactly the reason the construction
46
+ * path adopts at all: a traversal back onto this entry has to match it by id
47
+ * rather than collide with every other scope's "root".
48
+ *
49
+ * Every guard below is a refusal to overwrite something real:
50
+ *
51
+ * - a scope that already navigated has a stack this is not the seed of, and
52
+ * rewriting its first frame's id would rename an entry the user has since
53
+ * left,
54
+ * - a seed that is no longer "root" was adopted already (a re-run, a strict
55
+ * mode double effect),
56
+ * - a memory scope has no browser entry to adopt, and
57
+ * - an entry with no frame of its own has no identity to take.
58
+ */
59
+ export declare function adoptEntryIdentity(scope: FlemoStores): void;
@@ -163,6 +163,22 @@ export declare const MORPH_ROLE: {
163
163
  * different morph choreography per element. Absent means the default preset.
164
164
  */
165
165
  export declare const MORPH_NAME_ATTR = "data-flemo-morph-name";
166
+ /**
167
+ * The PAIRING KEY (`layoutId`), written out so the pairing is observable.
168
+ *
169
+ * The runtime keeps the key in its own registry and never needed it in the DOM,
170
+ * which made the single most common morph failure — two ends that never paired
171
+ * — invisible to everything outside the runtime: the element simply does not
172
+ * fly, and nothing on the page says why. Four separate investigations began by
173
+ * rebuilding a private tracer to answer "did these two find each other".
174
+ *
175
+ * With the key on the element, an inspector (and `@flemo/devtools`) can group
176
+ * the ends itself and report a pairable set that never flew. Written once and
177
+ * only when it changes — a morph is re-registered on every status change, and
178
+ * an attribute write invalidates that element's style (see the ownership note
179
+ * in attachMorph, where two such writes were device-measured as judder).
180
+ */
181
+ export declare const MORPH_ID_ATTR = "data-flemo-morph-id";
166
182
  /**
167
183
  * The per-Router FLIGHT LAYER: the box a shared element is staged in while it
168
184
  * travels. Rendered by the binding (a Router knows which box bounds its
@@ -304,4 +320,4 @@ export declare const attrValueSelector: (attribute: string, value: string) => st
304
320
  * a devtools build can assert against the shipped set instead of a hand-kept
305
321
  * copy — the drift this module exists to end.
306
322
  */
307
- export declare const FLEMO_ATTRIBUTES: readonly ["data-flemo-screen", "data-flemo-status", "data-flemo-active", "data-flemo-transition", "data-flemo-router", "data-flemo-skip-animation", "data-flemo-bar", "data-flemo-bar-active", "data-flemo-bar-status", "data-flemo-bar-riding", "data-flemo-bar-id", "data-flemo-bar-id-type", "data-flemo-bar-transition", "data-flemo-bar-spacer", "data-flemo-decorator", "data-flemo-decorator-name", "data-flemo-decorator-owner", "data-flemo-layer-host", "data-flemo-layer-owner", "data-flemo-layer-slot", "data-flemo-part-name", "data-flemo-part-layer", "data-flemo-part-home", "data-flemo-part-stand-in", "data-flemo-morph", "data-flemo-morph-camera", "data-flemo-morph-ghost", "data-flemo-morph-layer", "data-flemo-morph-name", "data-flemo-morph-slot", "data-flemo-morph-stand-in", "data-flemo-morph-sheet", "data-flemo-anim-hold", "data-flemo-held-arrival", "data-flemo-img-hold", "data-flemo-governed", "data-flemo-creep", "data-flemo-desk-head", "data-flemo-park-head", "data-flemo-warm", "data-flemo-gpu-prewarm", "data-flemo-image-src", "data-flemo-devtools-panel"];
323
+ export declare const FLEMO_ATTRIBUTES: readonly ["data-flemo-screen", "data-flemo-status", "data-flemo-active", "data-flemo-transition", "data-flemo-router", "data-flemo-skip-animation", "data-flemo-bar", "data-flemo-bar-active", "data-flemo-bar-status", "data-flemo-bar-riding", "data-flemo-bar-id", "data-flemo-bar-id-type", "data-flemo-bar-transition", "data-flemo-bar-spacer", "data-flemo-decorator", "data-flemo-decorator-name", "data-flemo-decorator-owner", "data-flemo-layer-host", "data-flemo-layer-owner", "data-flemo-layer-slot", "data-flemo-part-name", "data-flemo-part-layer", "data-flemo-part-home", "data-flemo-part-stand-in", "data-flemo-morph", "data-flemo-morph-camera", "data-flemo-morph-ghost", "data-flemo-morph-id", "data-flemo-morph-layer", "data-flemo-morph-name", "data-flemo-morph-slot", "data-flemo-morph-stand-in", "data-flemo-morph-sheet", "data-flemo-anim-hold", "data-flemo-held-arrival", "data-flemo-img-hold", "data-flemo-governed", "data-flemo-creep", "data-flemo-desk-head", "data-flemo-park-head", "data-flemo-warm", "data-flemo-gpu-prewarm", "data-flemo-image-src", "data-flemo-devtools-panel"];
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { default as TaskManger, default as TaskManager } from './core/TaskManger';
1
+ export { default as TaskManger, default as TaskManager } from './core/TaskManager';
2
2
  export { default as createHistoryStore, type History, type HistoryStore, type HistoryStoreApi } from './history/store';
3
3
  export { default as seedInitialHistory } from './history/seedInitialHistory';
4
4
  export { default as ensureWindowHistoryState } from './history/ensureWindowHistoryState';
@@ -10,7 +10,7 @@ export { default as createNavigateStore, type NavigateStatus, type NavigateStore
10
10
  export { markSelfInducedPop, consumeSelfInducedPop, createSelfPopGuard, type SelfPopGuard } from './navigate/selfPopGuard';
11
11
  export { default as createNavigationController, type NavigationControllerDeps, type DistanceOptions, type NavigateOptions, type PopOptions } from './navigate/createNavigationController';
12
12
  export { default as createStepController, readStepParams, appendParamsQuery, subscribeStepParamsRestore, type StepControllerDeps } from './navigate/createStepController';
13
- export { default as createRouterScope, type FlemoStores, type CreateRouterScopeInput } from './core/createRouterScope';
13
+ export { default as createRouterScope, adoptEntryIdentity, type FlemoStores, type CreateRouterScopeInput } from './core/createRouterScope';
14
14
  export { default as createScreenStore, type ScreenStore, type ScreenStoreApi, type SharedBarPresence, type SharedBarId, type SharedBarMetadata, type SharedBarsMetadata, type ScreenSurface } from './screen/store';
15
15
  export { default as createScreenSelector, type ScreenSelection } from './screen/createScreenSelector';
16
16
  export { default as computeScreenFreeze, computeScreenFreezeMode, type ScreenFreezeInput, type ScreenFreezeMode } from './screen/computeScreenFreeze';
@@ -51,7 +51,7 @@ export { default as createTransitionEngine } from './core/engine/createTransitio
51
51
  export { governedCompiledActive } from './platform/governedCompiled';
52
52
  export { startFlemoRuntime } from './runtime/flemoRuntime';
53
53
  export { resolvePlatformProfile, type PlatformProfile, type PlatformProfileInput } from './platform/profile';
54
- export { FLEMO_ATTR_PREFIX, FLEMO_ATTRIBUTES, attrSelector, attrValueSelector, ANIM_HOLD, ANIM_HOLD_ATTR, ANIM_HOLD_PAUSED_VALUES, ACTIVE_ATTR, BAR_ACTIVE_ATTR, BAR_ATTR, BAR_ID_ATTR, BAR_ID_TYPE_ATTR, BAR_RIDING_ATTR, BAR_SPACER_ATTR, BAR_STATUS_ATTR, BAR_TRANSITION_ATTR, CREEP_ATTR, DECORATOR_ATTR, DECORATOR_NAME_ATTR, DESK_HEAD_ATTR, DEVTOOLS_PANEL_ATTR, GOVERNED_ATTR, GPU_PREWARM_ATTR, HELD_ARRIVAL_ATTR, IMAGE_HOLD_ATTR, LAYER_HOST_ATTR, LAYER_OWNER_ATTR, LAYER_SLOT_ATTR, MORPH_ATTR, MORPH_LAYER_ATTR, MORPH_NAME_ATTR, MORPH_ROLE, MORPH_SLOT_ATTR, MORPH_SHEET_ATTR, PARK_HEAD_ATTR, PART_HOME_ATTR, PART_LAYER_ATTR, PART_NAME_ATTR, ROUTER_ATTR, SCREEN_ATTR, STATUS_ATTR, TRANSITION_ATTR, WARM_ATTR } from './dom/attributes';
54
+ export { FLEMO_ATTR_PREFIX, FLEMO_ATTRIBUTES, attrSelector, attrValueSelector, ANIM_HOLD, ANIM_HOLD_ATTR, ANIM_HOLD_PAUSED_VALUES, ACTIVE_ATTR, BAR_ACTIVE_ATTR, BAR_ATTR, BAR_ID_ATTR, BAR_ID_TYPE_ATTR, BAR_RIDING_ATTR, BAR_SPACER_ATTR, BAR_STATUS_ATTR, BAR_TRANSITION_ATTR, CREEP_ATTR, DECORATOR_ATTR, DECORATOR_NAME_ATTR, DESK_HEAD_ATTR, DEVTOOLS_PANEL_ATTR, GOVERNED_ATTR, GPU_PREWARM_ATTR, HELD_ARRIVAL_ATTR, IMAGE_HOLD_ATTR, LAYER_HOST_ATTR, LAYER_OWNER_ATTR, LAYER_SLOT_ATTR, MORPH_ATTR, MORPH_CAMERA_ATTR, MORPH_GHOST_ATTR, MORPH_ID_ATTR, MORPH_LAYER_ATTR, MORPH_NAME_ATTR, MORPH_ROLE, MORPH_SLOT_ATTR, MORPH_SHEET_ATTR, MORPH_STAND_IN_ATTR, PARK_HEAD_ATTR, PART_HOME_ATTR, PART_LAYER_ATTR, PART_NAME_ATTR, ROUTER_ATTR, SCREEN_ATTR, STATUS_ATTR, TRANSITION_ATTR, WARM_ATTR } from './dom/attributes';
55
55
  export { OVERLAY_LEVEL, SCREEN_STACKING_ORDER, UNNUMBERED_LEVEL } from './dom/stacking';
56
56
  export { TRANSITIONAL_STATUS_VALUES } from './navigate/store';
57
57
  export { SKIP_ANIMATION_ATTR, type TransitionEngine, type TransitionEngineDeps, type ScreenLifecycleInput } from './core/engine/types';