{"version":3,"names":["createSignal","untrack","createEventEmitter","isClickLikeEvent","FloatingRootStore","constructor","options","syncOnly","nested","onOpenChange","triggerElements","referenceElement","floatingElement","floatingId","open","transitionStatus","_open","_setOpenSignal","name","ownedWrite","_transitionStatus","_setTransitionStatus","_referenceElement","_setReferenceElement","_floatingElement","_setFloatingElement","_positionReference","_setPositionReference","_domReferenceElement","_setDomReferenceElement","_floatingId","_setFloatingId","self","_stateProxy","positionReference","domReferenceElement","context","dataRef","current","events","_getAccessor","key","_exhaustive","Error","String","_writeKey","value","state","getSnapshot","useState","useStateAccessor","set","accessor","Object","is","sync","update","changes","changed","k","syncOpenEvent","newOpen","event","openEvent","undefined","dispatchOpenChange","eventDetails","details","reason","nativeEvent","triggerElement","trigger","emit","setOpen"],"sources":["floating-root-store.ts"],"sourcesContent":["/**\n * `FloatingRootStore` — Solid-native.\n *\n * Backed by per-key `createSignal`s exposed via a getter-bag\n * `state` proxy. Property reads on `store.state` track per-key\n * when invoked inside a reactive context; outside one, they\n * return the current value non-reactively. Writes do NOT flush:\n * they batch to the next microtask per Solid 2.0's default, and\n * every consumer reads through a reactive surface that settles on\n * that flush. Imperative call sites needing same-tick visibility\n * (chiefly tests) must call `flush()` themselves before reading\n * back. Each signal is constructed with\n * `ownedWrite: true` because writers are routinely invoked from\n * inside reactive owners (Solid 2.0 dev would otherwise raise\n * `SIGNAL_WRITE_IN_OWNED_SCOPE`).\n *\n * ### Public contract\n *\n *   - `state` — reactive proxy. Read `state.open` etc.; tracks\n *     per-key in reactive scopes.\n *   - `context` — non-reactive bag (`dataRef`, `events`, `nested`,\n *     `triggerElements`). Fields here are intentionally imperative.\n *   - `useState(key)` — convenience wrapper. Returns `state[key]`\n *     (with the `referenceElement → positionReference` fallback).\n *     Equivalent in tracking behavior to a direct `state.*` read.\n *   - `useStateAccessor(key)` — returns `() => useState(key)`.\n *   - `sync(key, value)` / `set(key, value)` — identity-compare\n *     setters. No-op on unchanged.\n *   - `update(partial)` — shallow merge; no-op if nothing changed.\n *   - `getSnapshot()` — alias for `state`. Same reference;\n *     tracking still depends on the caller's context.\n *   - `syncOpenEvent` / `dispatchOpenChange` / `setOpen` —\n *     open-change dispatch.\n */\n\nimport { type Accessor, createSignal, type Setter, untrack } from \"solid-js\";\nimport type { BaseUIChangeEventDetails } from \"../../change-event-details\";\nimport type { TransitionStatus } from \"../../use-transition-status/use-transition-status\";\nimport type { PopupTriggerMap } from \"../popup-trigger-map\";\nimport type {\n\tContextData,\n\tFloatingEvents,\n\tMutableRef,\n\tReferenceType,\n} from \"../types\";\nimport { createEventEmitter } from \"../utils/create-event-emitter\";\nimport { isClickLikeEvent } from \"../utils/event\";\n\nexport interface FloatingUIOpenChangeDetails {\n\topen: boolean;\n\treason: string;\n\tnativeEvent: Event;\n\tnested: boolean;\n\ttriggerElement?: Element | undefined;\n}\n\n// ---------------------------------------------------------------------------\n// State + context shapes\n// ---------------------------------------------------------------------------\n\nexport interface FloatingRootState {\n\topen: boolean;\n\ttransitionStatus: TransitionStatus | undefined;\n\tdomReferenceElement: Element | null;\n\treferenceElement: ReferenceType | null;\n\tfloatingElement: HTMLElement | null;\n\tpositionReference: ReferenceType | null;\n\tfloatingId: string | undefined;\n}\n\nexport interface FloatingRootStoreContext {\n\tonOpenChange:\n\t\t| ((open: boolean, eventDetails: BaseUIChangeEventDetails<string>) => void)\n\t\t| undefined;\n\treadonly dataRef: MutableRef<ContextData>;\n\treadonly events: FloatingEvents;\n\tnested: boolean;\n\treadonly triggerElements: PopupTriggerMap;\n}\n\nexport interface FloatingRootStoreOptions {\n\topen: boolean;\n\ttransitionStatus: TransitionStatus | undefined;\n\treferenceElement: ReferenceType | null;\n\tfloatingElement: HTMLElement | null;\n\ttriggerElements: PopupTriggerMap;\n\tfloatingId: string | undefined;\n\t/**\n\t * When `true`, `setOpen` only forwards to `onOpenChange` — the owning\n\t * popup store handles `dispatchOpenChange`. Matches the React source.\n\t */\n\tsyncOnly: boolean;\n\tnested: boolean;\n\tonOpenChange:\n\t\t| ((open: boolean, eventDetails: BaseUIChangeEventDetails<string>) => void)\n\t\t| undefined;\n}\n\n// ---------------------------------------------------------------------------\n// `FloatingRootStore`\n// ---------------------------------------------------------------------------\n\nexport type FloatingRootStateView = {\n\treadonly [K in keyof FloatingRootState]: FloatingRootState[K];\n};\n\nexport class FloatingRootStore {\n\t// Per-key signals. `ownedWrite: true` because writers are routinely\n\t// invoked from inside reactive owners (effects, computeds) that observe\n\t// other parts of state — Solid 2.0's dev runtime would otherwise raise\n\t// `SIGNAL_WRITE_IN_OWNED_SCOPE`.\n\tprivate readonly _open: Accessor<boolean>;\n\tprivate readonly _setOpenSignal: Setter<boolean>;\n\tprivate readonly _transitionStatus: Accessor<TransitionStatus | undefined>;\n\tprivate readonly _setTransitionStatus: Setter<TransitionStatus | undefined>;\n\tprivate readonly _referenceElement: Accessor<ReferenceType | null>;\n\tprivate readonly _setReferenceElement: Setter<ReferenceType | null>;\n\tprivate readonly _floatingElement: Accessor<HTMLElement | null>;\n\tprivate readonly _setFloatingElement: Setter<HTMLElement | null>;\n\tprivate readonly _positionReference: Accessor<ReferenceType | null>;\n\tprivate readonly _setPositionReference: Setter<ReferenceType | null>;\n\tprivate readonly _domReferenceElement: Accessor<Element | null>;\n\tprivate readonly _setDomReferenceElement: Setter<Element | null>;\n\tprivate readonly _floatingId: Accessor<string | undefined>;\n\tprivate readonly _setFloatingId: Setter<string | undefined>;\n\n\tprivate readonly _stateProxy: FloatingRootStateView;\n\n\tpublic readonly context: FloatingRootStoreContext;\n\n\tprivate readonly syncOnly: boolean;\n\n\tconstructor(options: FloatingRootStoreOptions) {\n\t\tconst {\n\t\t\tsyncOnly,\n\t\t\tnested,\n\t\t\tonOpenChange,\n\t\t\ttriggerElements,\n\t\t\treferenceElement,\n\t\t\tfloatingElement,\n\t\t\tfloatingId,\n\t\t\topen,\n\t\t\ttransitionStatus,\n\t\t} = options;\n\n\t\t[this._open, this._setOpenSignal] = createSignal<boolean>(open, {\n\t\t\tname: \"floating-root-store.open\",\n\t\t\townedWrite: true,\n\t\t});\n\t\t[this._transitionStatus, this._setTransitionStatus] = createSignal<\n\t\t\tTransitionStatus | undefined\n\t\t>(transitionStatus, {\n\t\t\tname: \"floating-root-store.transitionStatus\",\n\t\t\townedWrite: true,\n\t\t});\n\t\t[this._referenceElement, this._setReferenceElement] =\n\t\t\tcreateSignal<ReferenceType | null>(referenceElement, {\n\t\t\t\tname: \"floating-root-store.referenceElement\",\n\t\t\t\townedWrite: true,\n\t\t\t});\n\t\t[this._floatingElement, this._setFloatingElement] =\n\t\t\tcreateSignal<HTMLElement | null>(floatingElement, {\n\t\t\t\tname: \"floating-root-store.floatingElement\",\n\t\t\t\townedWrite: true,\n\t\t\t});\n\t\t[this._positionReference, this._setPositionReference] =\n\t\t\tcreateSignal<ReferenceType | null>(referenceElement, {\n\t\t\t\tname: \"floating-root-store.positionReference\",\n\t\t\t\townedWrite: true,\n\t\t\t});\n\t\t[this._domReferenceElement, this._setDomReferenceElement] =\n\t\t\tcreateSignal<Element | null>(referenceElement as Element | null, {\n\t\t\t\tname: \"floating-root-store.domReferenceElement\",\n\t\t\t\townedWrite: true,\n\t\t\t});\n\t\t[this._floatingId, this._setFloatingId] = createSignal<string | undefined>(\n\t\t\tfloatingId,\n\t\t\t{\n\t\t\t\tname: \"floating-root-store.floatingId\",\n\t\t\t\townedWrite: true,\n\t\t\t},\n\t\t);\n\n\t\tconst self = this;\n\t\tthis._stateProxy = {\n\t\t\tget open() {\n\t\t\t\treturn self._open();\n\t\t\t},\n\t\t\tget transitionStatus() {\n\t\t\t\treturn self._transitionStatus();\n\t\t\t},\n\t\t\tget referenceElement() {\n\t\t\t\treturn self._referenceElement();\n\t\t\t},\n\t\t\tget floatingElement() {\n\t\t\t\treturn self._floatingElement();\n\t\t\t},\n\t\t\tget positionReference() {\n\t\t\t\treturn self._positionReference();\n\t\t\t},\n\t\t\tget domReferenceElement() {\n\t\t\t\treturn self._domReferenceElement();\n\t\t\t},\n\t\t\tget floatingId() {\n\t\t\t\treturn self._floatingId();\n\t\t\t},\n\t\t};\n\n\t\tthis.context = {\n\t\t\tonOpenChange,\n\t\t\tdataRef: { current: {} as ContextData },\n\t\t\tevents: createEventEmitter(),\n\t\t\tnested,\n\t\t\ttriggerElements,\n\t\t};\n\n\t\tthis.syncOnly = syncOnly;\n\t}\n\n\tprivate _getAccessor<K extends keyof FloatingRootState>(\n\t\tkey: K,\n\t): Accessor<FloatingRootState[K]> {\n\t\tswitch (key) {\n\t\t\tcase \"open\":\n\t\t\t\treturn this._open as Accessor<FloatingRootState[K]>;\n\t\t\tcase \"transitionStatus\":\n\t\t\t\treturn this._transitionStatus as Accessor<FloatingRootState[K]>;\n\t\t\tcase \"referenceElement\":\n\t\t\t\treturn this._referenceElement as Accessor<FloatingRootState[K]>;\n\t\t\tcase \"floatingElement\":\n\t\t\t\treturn this._floatingElement as Accessor<FloatingRootState[K]>;\n\t\t\tcase \"positionReference\":\n\t\t\t\treturn this._positionReference as Accessor<FloatingRootState[K]>;\n\t\t\tcase \"domReferenceElement\":\n\t\t\t\treturn this._domReferenceElement as Accessor<FloatingRootState[K]>;\n\t\t\tcase \"floatingId\":\n\t\t\t\treturn this._floatingId as Accessor<FloatingRootState[K]>;\n\t\t\tdefault: {\n\t\t\t\tconst _exhaustive: never = key;\n\t\t\t\tthrow new Error(`Unknown key: ${String(_exhaustive)}`);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _writeKey<K extends keyof FloatingRootState>(\n\t\tkey: K,\n\t\tvalue: FloatingRootState[K],\n\t): void {\n\t\tswitch (key) {\n\t\t\tcase \"open\":\n\t\t\t\tthis._setOpenSignal(value as boolean);\n\t\t\t\treturn;\n\t\t\tcase \"transitionStatus\":\n\t\t\t\tthis._setTransitionStatus(value as TransitionStatus | undefined);\n\t\t\t\treturn;\n\t\t\tcase \"referenceElement\":\n\t\t\t\tthis._setReferenceElement(value as ReferenceType | null);\n\t\t\t\treturn;\n\t\t\tcase \"floatingElement\":\n\t\t\t\tthis._setFloatingElement(value as HTMLElement | null);\n\t\t\t\treturn;\n\t\t\tcase \"positionReference\":\n\t\t\t\tthis._setPositionReference(value as ReferenceType | null);\n\t\t\t\treturn;\n\t\t\tcase \"domReferenceElement\":\n\t\t\t\tthis._setDomReferenceElement(value as Element | null);\n\t\t\t\treturn;\n\t\t\tcase \"floatingId\":\n\t\t\t\tthis._setFloatingId(value as string | undefined);\n\t\t\t\treturn;\n\t\t\tdefault: {\n\t\t\t\tconst _exhaustive: never = key;\n\t\t\t\tthrow new Error(`Unknown key: ${String(_exhaustive)}`);\n\t\t\t}\n\t\t}\n\t}\n\n\t// ---------------------------------------------------------------------\n\t// Reactive access\n\t// ---------------------------------------------------------------------\n\n\t/**\n\t * Reactive store proxy. Property reads inside tracking contexts\n\t * subscribe to the specific key; reads in untracked contexts\n\t * (event handlers) return the current value without subscribing.\n\t */\n\tget state(): FloatingRootStateView {\n\t\treturn this._stateProxy;\n\t}\n\n\t/**\n\t * Current state view. Same reference as `state`. Property reads\n\t * outside tracking contexts don't subscribe — use this when the\n\t * spelling \"snapshot\" makes intent clearer at the call site.\n\t */\n\tgetSnapshot = (): FloatingRootStateView => this._stateProxy;\n\n\t/**\n\t * Returns the current value for `key`, subscribing the caller's\n\t * tracking context to updates of that specific key. The\n\t * `\"referenceElement\"` selector prefers `positionReference` over\n\t * the raw slot to match the React selector.\n\t */\n\tuseState<K extends keyof FloatingRootState>(key: K): FloatingRootState[K] {\n\t\tif (key === \"referenceElement\") {\n\t\t\treturn (this._positionReference() ??\n\t\t\t\tthis._referenceElement()) as FloatingRootState[K];\n\t\t}\n\t\treturn this._getAccessor(key)();\n\t}\n\n\t/**\n\t * Returns a live `Accessor<T>` for `key`. Equivalent to\n\t * `() => store.useState(key)` with a stable function identity.\n\t */\n\tuseStateAccessor<K extends keyof FloatingRootState>(\n\t\tkey: K,\n\t): Accessor<FloatingRootState[K]> {\n\t\treturn () => this.useState(key);\n\t}\n\n\t// ---------------------------------------------------------------------\n\t// Writers\n\t// ---------------------------------------------------------------------\n\n\t/**\n\t * Set a specific key. `createStore` handles the identity-compare\n\t * skip internally — writes equal to the current value are no-ops.\n\t */\n\tset<K extends keyof FloatingRootState>(\n\t\tkey: K,\n\t\tvalue: FloatingRootState[K],\n\t): void {\n\t\tconst accessor = this._getAccessor(key);\n\t\tif (\n\t\t\tObject.is(\n\t\t\t\tuntrack(() => accessor()),\n\t\t\t\tvalue,\n\t\t\t)\n\t\t)\n\t\t\treturn;\n\t\tthis._writeKey(key, value);\n\t\t// No per-writer flush: writes batch to the next microtask. Every\n\t\t// production consumer reads store state through a reactive surface\n\t\t// (getter prop bags, positioning/render effects) that settles on\n\t\t// that flush, so synchronous visibility was only ever needed by\n\t\t// imperative test reads — those flush() explicitly before asserting.\n\t}\n\n\t/**\n\t * Alias for `set`. Kept for the call-site spelling that the React\n\t * source uses (`useSyncedValue`).\n\t */\n\tsync<K extends keyof FloatingRootState>(\n\t\tkey: K,\n\t\tvalue: FloatingRootState[K],\n\t): void {\n\t\tthis.set(key, value);\n\t}\n\n\t/**\n\t * Merge a partial into state. Uses the draft-first setter form so\n\t * only the keys that actually changed notify subscribers.\n\t */\n\tupdate(changes: Partial<FloatingRootState>): void {\n\t\tlet changed = false;\n\t\tfor (const key in changes) {\n\t\t\tconst k = key as keyof FloatingRootState;\n\t\t\tconst accessor = this._getAccessor(k);\n\t\t\tif (\n\t\t\t\t!Object.is(\n\t\t\t\t\tuntrack(() => accessor()),\n\t\t\t\t\tchanges[k],\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tchanged = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (!changed) return;\n\t\tfor (const key in changes) {\n\t\t\tconst k = key as keyof FloatingRootState;\n\t\t\tthis.set(k, changes[k] as FloatingRootState[typeof k]);\n\t\t}\n\t}\n\n\t// ---------------------------------------------------------------------\n\t// Open-change dispatch\n\t// ---------------------------------------------------------------------\n\n\t/**\n\t * Syncs the event used by hover logic to distinguish hover-open from\n\t * click-like interaction. Click events can upgrade a hover-open, but\n\t * a pending hover-open cannot overwrite a click-open.\n\t */\n\tsyncOpenEvent = (newOpen: boolean, event: Event | undefined): void => {\n\t\tif (\n\t\t\t!newOpen ||\n\t\t\t!untrack(() => this._open()) ||\n\t\t\t(event != null && isClickLikeEvent(event))\n\t\t) {\n\t\t\tthis.context.dataRef.current.openEvent = newOpen ? event : undefined;\n\t\t}\n\t};\n\n\t/**\n\t * Runs the root-owned side effects for an open state change: syncs the\n\t * open-event bookkeeping and emits `openchange` on the events bus.\n\t */\n\tdispatchOpenChange = (\n\t\tnewOpen: boolean,\n\t\teventDetails: BaseUIChangeEventDetails<string>,\n\t): void => {\n\t\tthis.syncOpenEvent(newOpen, eventDetails.event);\n\n\t\tconst details: FloatingUIOpenChangeDetails = {\n\t\t\topen: newOpen,\n\t\t\treason: eventDetails.reason,\n\t\t\tnativeEvent: eventDetails.event,\n\t\t\tnested: this.context.nested,\n\t\t\ttriggerElement: eventDetails.trigger,\n\t\t};\n\n\t\tthis.context.events.emit(\"openchange\", details);\n\t};\n\n\t/**\n\t * Emits `openchange` and calls the context `onOpenChange` callback.\n\t * In `syncOnly` mode the dispatch step is skipped — the owning popup\n\t * store is responsible for emitting the event itself.\n\t */\n\tsetOpen = (\n\t\tnewOpen: boolean,\n\t\teventDetails: BaseUIChangeEventDetails<string>,\n\t): void => {\n\t\tif (this.syncOnly) {\n\t\t\tthis.context.onOpenChange?.(newOpen, eventDetails);\n\t\t\treturn;\n\t\t}\n\n\t\tthis.dispatchOpenChange(newOpen, eventDetails);\n\t\tthis.context.onOpenChange?.(newOpen, eventDetails);\n\t};\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAwBA,YAAY,EAA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