@ai-matrx/summon 0.1.10 → 0.1.12
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/CHANGELOG.md +26 -2
- package/dist/gate-O-00kToO.d.cts +851 -0
- package/dist/gate-O-00kToO.d.ts +851 -0
- package/dist/index.cjs +16 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -431
- package/dist/index.d.ts +3 -431
- package/dist/index.js +16 -12
- package/dist/index.js.map +1 -1
- package/dist/open.cjs +66 -21
- package/dist/open.cjs.map +1 -1
- package/dist/open.d.cts +5 -2
- package/dist/open.d.ts +5 -2
- package/dist/open.js +66 -21
- package/dist/open.js.map +1 -1
- package/dist/react.cjs +3 -18
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +2 -9
- package/dist/react.d.ts +2 -9
- package/dist/react.js +2 -17
- package/dist/react.js.map +1 -1
- package/dist/root.cjs +52 -0
- package/dist/root.cjs.map +1 -1
- package/dist/root.d.cts +52 -1
- package/dist/root.d.ts +52 -1
- package/dist/root.js +52 -0
- package/dist/root.js.map +1 -1
- package/dist/window-host.cjs +6 -32
- package/dist/window-host.cjs.map +1 -1
- package/dist/window-host.d.cts +2 -45
- package/dist/window-host.d.ts +2 -45
- package/dist/window-host.js +2 -28
- package/dist/window-host.js.map +1 -1
- package/package.json +2 -2
- package/dist/gate-CfjdNWP6.d.cts +0 -397
- package/dist/gate-CfjdNWP6.d.ts +0 -397
package/dist/gate-CfjdNWP6.d.ts
DELETED
|
@@ -1,397 +0,0 @@
|
|
|
1
|
-
import { OverlayHostTypes, OverlayRegistry } from '@ai-matrx/summon';
|
|
2
|
-
import { Reducer, Middleware } from '@reduxjs/toolkit';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* The shared vocabulary of @ai-matrx/summon. Framework-free: no React, no Redux imports.
|
|
6
|
-
*
|
|
7
|
-
* An OVERLAY is any component rendered on top of the app by dispatch — a window, dialog, sheet,
|
|
8
|
-
* light floating window, toast-like card, anything. It is identified by an `OverlayId` and opened
|
|
9
|
-
* as one or more INSTANCES (`instanceId`, "default" for single-instance overlays).
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* The host's overlay registry: overlay id → the data its opener accepts. Hosts extend it by
|
|
13
|
-
* module augmentation so every open call is type-checked:
|
|
14
|
-
*
|
|
15
|
-
* declare module "@ai-matrx/summon" {
|
|
16
|
-
* interface OverlayRegistry { notesWindow: { noteId?: string } }
|
|
17
|
-
* }
|
|
18
|
-
*
|
|
19
|
-
* `defineOverlay` emits nothing at runtime for this; the augmentation is the host's one-line
|
|
20
|
-
* declaration per overlay (the converter writes it next to each definition).
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
/** Every registered overlay id; plain `string` until the host augments the registry. */
|
|
24
|
-
type OverlayId = [keyof OverlayRegistry] extends [never] ? string : Extract<keyof OverlayRegistry, string>;
|
|
25
|
-
/** The open-data type declared for an overlay id. */
|
|
26
|
-
type OverlayDataOf<Id extends string> = Id extends keyof OverlayRegistry ? OverlayRegistry[Id] : Record<string, unknown>;
|
|
27
|
-
/**
|
|
28
|
-
* Data as it arrives at render time. It crossed Redux, a URL or storage, so it is NOT trusted to
|
|
29
|
-
* match the opener's type: render code narrows it (or the definition supplies `parse`).
|
|
30
|
-
*/
|
|
31
|
-
type OverlayRawData = Readonly<Record<string, unknown>> | null;
|
|
32
|
-
declare const DEFAULT_INSTANCE_ID = "default";
|
|
33
|
-
/** `single`: one instance ("default"). `multi`: any number, each with its own instanceId. */
|
|
34
|
-
type InstanceMode = "single" | "multi";
|
|
35
|
-
/**
|
|
36
|
-
* What closing does to a mounted overlay (Arman, 2026-10-16, C38 R3):
|
|
37
|
-
* none — unmount (default).
|
|
38
|
-
* hidden — stay mounted but hidden; reopening shows the same live component (LRU-capped).
|
|
39
|
-
* restore — unmount, but values saved with `useOverlayState` come back on reopen.
|
|
40
|
-
* Minimizing a window always keeps its component mounted, whatever this says.
|
|
41
|
-
*/
|
|
42
|
-
type KeepAlive = "none" | "hidden" | "restore";
|
|
43
|
-
/** `overlayId:instanceId` — the one key every subsystem uses for an open instance. */
|
|
44
|
-
type InstanceKey = `${string}:${string}`;
|
|
45
|
-
declare function instanceKey(overlayId: string, instanceId?: string): InstanceKey;
|
|
46
|
-
declare function parseInstanceKey(key: string): {
|
|
47
|
-
overlayId: string;
|
|
48
|
-
instanceId: string;
|
|
49
|
-
} | null;
|
|
50
|
-
type MobilePresentation = "fullscreen" | "drawer" | "card" | "hidden";
|
|
51
|
-
/**
|
|
52
|
-
* Default-deny allowlist of the open data a window may save and restore. A window with no
|
|
53
|
-
* preservation entry restores geometry only.
|
|
54
|
-
*/
|
|
55
|
-
interface WindowPreservation {
|
|
56
|
-
readonly dataKeys: readonly string[];
|
|
57
|
-
readonly requiredDataKeys?: readonly string[];
|
|
58
|
-
readonly allowedDataValues?: Readonly<Record<string, readonly (string | number | boolean | null)[]>>;
|
|
59
|
-
/** Default 32 KiB. */
|
|
60
|
-
readonly maxDataBytes?: number;
|
|
61
|
-
}
|
|
62
|
-
/** One declared home for an unbidden (system-raised) window: a route prefix, or one exact page. */
|
|
63
|
-
type UnbiddenHomeRoute = string | {
|
|
64
|
-
readonly route: string;
|
|
65
|
-
readonly exact: true;
|
|
66
|
-
};
|
|
67
|
-
interface OverlayWindowOptions {
|
|
68
|
-
readonly mobile?: MobilePresentation;
|
|
69
|
-
readonly mobileSidebarAs?: "drawer" | "inline";
|
|
70
|
-
/** Never saved or restored (debug panels, one-shot tools, callback-bound editors). */
|
|
71
|
-
readonly ephemeral?: boolean;
|
|
72
|
-
readonly preservation?: WindowPreservation;
|
|
73
|
-
/**
|
|
74
|
-
* Values merged under saved data when a window is RESTORED (reload, another device). Unlike the
|
|
75
|
-
* definition's `defaults`, never applied to a normal open.
|
|
76
|
-
*/
|
|
77
|
-
readonly restoreDefaults?: Readonly<Record<string, unknown>>;
|
|
78
|
-
/**
|
|
79
|
-
* The window-manager id the WindowPanel registers under for the default instance. Default: the
|
|
80
|
-
* overlay id. The render watchdog reveals and inspects this id until the panel acks its own.
|
|
81
|
-
*/
|
|
82
|
-
readonly windowId?: string;
|
|
83
|
-
readonly deprecated?: {
|
|
84
|
-
readonly replacement?: string;
|
|
85
|
-
readonly reason?: string;
|
|
86
|
-
};
|
|
87
|
-
/**
|
|
88
|
-
* Where a window nobody opened (system-raised) may raise itself. Default deny: no home → it may
|
|
89
|
-
* not raise itself anywhere (`mayRaiseUnbidden` in the window section).
|
|
90
|
-
*/
|
|
91
|
-
readonly unbiddenHome?: readonly UnbiddenHomeRoute[];
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Host-specific types the package passes through untouched. A Redux host augments `dispatch`
|
|
95
|
-
* with its thunk-aware dispatch so link hydrators can dispatch its thunks without casts:
|
|
96
|
-
*
|
|
97
|
-
* declare module "@ai-matrx/summon" { interface OverlayHostTypes { dispatch: AppDispatch } }
|
|
98
|
-
*/
|
|
99
|
-
type OverlayHostDispatch = OverlayHostTypes extends {
|
|
100
|
-
dispatch: infer D;
|
|
101
|
-
} ? D : (action: unknown) => unknown;
|
|
102
|
-
interface LinkHydrateContext<Data> {
|
|
103
|
-
/** The id segment of the link token (`notes:<id>`). */
|
|
104
|
-
readonly id: string;
|
|
105
|
-
/** Decoded `k-v` arguments of the token. */
|
|
106
|
-
readonly args: Readonly<Record<string, string>>;
|
|
107
|
-
/** Open this overlay. */
|
|
108
|
-
open(options?: {
|
|
109
|
-
readonly instanceId?: string;
|
|
110
|
-
readonly data?: Data;
|
|
111
|
-
}): void;
|
|
112
|
-
/** The host store's dispatch, for thunks a hydrator needs (loading a record first). Typed by
|
|
113
|
-
* augmenting `OverlayHostTypes` with the host's dispatch type. */
|
|
114
|
-
readonly dispatch: OverlayHostDispatch;
|
|
115
|
-
}
|
|
116
|
-
interface OverlayLinkSpec<Data> {
|
|
117
|
-
/** The token type key in `?panels=key:id`. Unique across the host. */
|
|
118
|
-
readonly key: string;
|
|
119
|
-
/** Older keys that still resolve to this overlay. */
|
|
120
|
-
readonly aliases?: readonly string[];
|
|
121
|
-
/** Turn a link token into an open overlay (and its data). `"refused"` keeps the token and says why. */
|
|
122
|
-
hydrate(context: LinkHydrateContext<Data>): void | "refused" | Promise<void | "refused">;
|
|
123
|
-
}
|
|
124
|
-
interface OverlayDefinitionMeta<Id extends string = string, Data = Record<string, unknown>> {
|
|
125
|
-
readonly id: Id;
|
|
126
|
-
/** Human label: tray, menus, diagnostics. */
|
|
127
|
-
readonly label: string;
|
|
128
|
-
readonly instance?: InstanceMode;
|
|
129
|
-
readonly keepAlive?: KeepAlive;
|
|
130
|
-
/** Close when the route changes — the overlay shows a piece of the page that opened it. */
|
|
131
|
-
readonly closesOnNavigation?: boolean;
|
|
132
|
-
/** Present only for overlays that render a WindowPanel. */
|
|
133
|
-
readonly window?: OverlayWindowOptions;
|
|
134
|
-
readonly link?: OverlayLinkSpec<Data>;
|
|
135
|
-
/** Defaults merged under open data (replaces the old per-overlay schema registry). */
|
|
136
|
-
readonly defaults?: Partial<Data>;
|
|
137
|
-
}
|
|
138
|
-
/** The window-manager id a singleton window overlay registers under (`window.windowId ?? id`). */
|
|
139
|
-
declare function defaultWindowIdFor(meta: Pick<OverlayDefinitionMeta, "id" | "window">): string;
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Everything the overlays system needs from its host, as ports. Every port ships a working
|
|
143
|
-
* default, so a bare host gets a working system with zero wiring (package standard rule 8); a
|
|
144
|
-
* host overrides only what it has: identity, navigation, notifications, error sink, debug flag,
|
|
145
|
-
* persistence. Framework-free.
|
|
146
|
-
*/
|
|
147
|
-
type Unsubscribe = () => void;
|
|
148
|
-
/** Who the person is, for isolating saved state. `key` changes → everything saved is swapped. */
|
|
149
|
-
interface IdentityPort {
|
|
150
|
-
current(): {
|
|
151
|
-
readonly key: string;
|
|
152
|
-
readonly ready: boolean;
|
|
153
|
-
};
|
|
154
|
-
subscribe(listener: () => void): Unsubscribe;
|
|
155
|
-
}
|
|
156
|
-
/** The address bar: route changes (close-on-navigation) and the `?panels=` link channel. */
|
|
157
|
-
interface RouterPort {
|
|
158
|
-
pathname(): string;
|
|
159
|
-
search(): string;
|
|
160
|
-
/** Replace the query string without navigating or remounting the page. */
|
|
161
|
-
replaceSearch(nextSearch: string): void;
|
|
162
|
-
subscribe(listener: () => void): Unsubscribe;
|
|
163
|
-
}
|
|
164
|
-
interface NotifyOptions {
|
|
165
|
-
readonly id?: string;
|
|
166
|
-
readonly description?: string;
|
|
167
|
-
/** How long the notice stays up (ms). Hosts without timed notices ignore it. */
|
|
168
|
-
readonly duration?: number;
|
|
169
|
-
/** One action button (e.g. the render watchdog's "Show it"). Hosts without actions ignore it. */
|
|
170
|
-
readonly action?: {
|
|
171
|
-
readonly label: string;
|
|
172
|
-
readonly onClick: () => void;
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
interface NotifyPort {
|
|
176
|
-
info(message: string, options?: NotifyOptions): void;
|
|
177
|
-
warn(message: string, options?: NotifyOptions): void;
|
|
178
|
-
error(message: string, options?: NotifyOptions): void;
|
|
179
|
-
/** Withdraw a notice by id (optional). */
|
|
180
|
-
dismiss?(id: string): void;
|
|
181
|
-
}
|
|
182
|
-
interface ErrorSinkPort {
|
|
183
|
-
capture(error: unknown, context: Readonly<Record<string, unknown>>): void;
|
|
184
|
-
}
|
|
185
|
-
interface DebugPort {
|
|
186
|
-
enabled(): boolean;
|
|
187
|
-
subscribe?(listener: () => void): Unsubscribe;
|
|
188
|
-
}
|
|
189
|
-
/** A stored value with its optimistic-concurrency version (0 when the store has none). */
|
|
190
|
-
interface StoredValue<T = unknown> {
|
|
191
|
-
readonly value: T;
|
|
192
|
-
readonly version: number;
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* Where saved overlay state lives when persistence is on. Keys are already scoped to the
|
|
196
|
-
* identity by the caller (`<identityKey>/<key>`) for stores that are not per-person themselves.
|
|
197
|
-
* Implementations: the browser-local store (`./persistence`), `@ai-matrx/data` over
|
|
198
|
-
* `users.user_surface_state` (`./persistence/data`), or any host database.
|
|
199
|
-
*/
|
|
200
|
-
interface OverlayPersistencePort {
|
|
201
|
-
/**
|
|
202
|
-
* True when the store is per-person itself (rows scoped to the signed-in person, e.g. the
|
|
203
|
-
* `@ai-matrx/data` adapter): the persistence section then passes plain keys (`workspace`,
|
|
204
|
-
* `state:<instanceKey>`) instead of `<identityKey>/<key>`, and defaults to `scope: "person"`.
|
|
205
|
-
*/
|
|
206
|
-
readonly perPerson?: boolean;
|
|
207
|
-
load<T = unknown>(key: string): Promise<StoredValue<T> | null>;
|
|
208
|
-
save<T = unknown>(key: string, value: T, options?: {
|
|
209
|
-
readonly expectedVersion?: number;
|
|
210
|
-
}): Promise<{
|
|
211
|
-
readonly version: number;
|
|
212
|
-
}>;
|
|
213
|
-
remove(key: string): Promise<void>;
|
|
214
|
-
list?(prefix: string): Promise<readonly string[]>;
|
|
215
|
-
/**
|
|
216
|
-
* Every saved value at once (key → value), for stores where one read is cheaper than several.
|
|
217
|
-
* When present, restoring an identity costs exactly this one call: the workspace and every
|
|
218
|
-
* saved component state come out of it, and `load`/`list` are not called on boot.
|
|
219
|
-
*/
|
|
220
|
-
loadAll?(): Promise<ReadonlyMap<string, StoredValue>>;
|
|
221
|
-
}
|
|
222
|
-
interface SummonPorts {
|
|
223
|
-
readonly identity: IdentityPort;
|
|
224
|
-
readonly router: RouterPort;
|
|
225
|
-
readonly notify: NotifyPort;
|
|
226
|
-
readonly errors: ErrorSinkPort;
|
|
227
|
-
readonly debug: DebugPort;
|
|
228
|
-
/** `null` = persistence off (R6). */
|
|
229
|
-
readonly persistence: OverlayPersistencePort | null;
|
|
230
|
-
}
|
|
231
|
-
declare const anonymousIdentity: IdentityPort;
|
|
232
|
-
/** `window.location` + `history.replaceState`; inert on the server. */
|
|
233
|
-
declare const locationRouter: RouterPort;
|
|
234
|
-
declare const consoleNotify: NotifyPort;
|
|
235
|
-
declare const consoleErrorSink: ErrorSinkPort;
|
|
236
|
-
declare const debugOff: DebugPort;
|
|
237
|
-
declare const DEFAULT_PORTS: SummonPorts;
|
|
238
|
-
declare function resolvePorts(overrides: Partial<SummonPorts> | undefined): SummonPorts;
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* A definition's meta with its data type erased, so definitions of every data shape share one
|
|
242
|
-
* registry without casts. (`never` erasure made `defaults` unassignable.)
|
|
243
|
-
*/
|
|
244
|
-
interface AnyOverlayMeta extends Omit<OverlayDefinitionMeta<string, unknown>, "defaults"> {
|
|
245
|
-
readonly defaults?: object | undefined;
|
|
246
|
-
}
|
|
247
|
-
type AnyMeta = AnyOverlayMeta;
|
|
248
|
-
/**
|
|
249
|
-
* Register (or re-register) definitions. Re-registering an id replaces it (hot reload). A link
|
|
250
|
-
* key claimed by two different ids is a host bug and throws, naming both.
|
|
251
|
-
*/
|
|
252
|
-
declare function registerOverlayMeta(definitions: readonly AnyOverlayMeta[]): void;
|
|
253
|
-
declare function getOverlayMeta(overlayId: string): AnyMeta | undefined;
|
|
254
|
-
declare function getOverlayMetaByLinkKey(linkKey: string): AnyMeta | undefined;
|
|
255
|
-
declare function allOverlayMeta(): readonly AnyMeta[];
|
|
256
|
-
declare function isRegisteredOverlay(overlayId: string): boolean;
|
|
257
|
-
declare function subscribeToOverlayRegistry(listener: () => void): () => void;
|
|
258
|
-
/** Test-only. */
|
|
259
|
-
declare function resetOverlayRegistry(): void;
|
|
260
|
-
|
|
261
|
-
interface OpenOverlayPayload<Id extends OverlayId = OverlayId> {
|
|
262
|
-
overlayId: Id;
|
|
263
|
-
instanceId?: string;
|
|
264
|
-
data?: OverlayDataOf<Id> | null;
|
|
265
|
-
}
|
|
266
|
-
interface CloseOverlayPayload<Id extends OverlayId = OverlayId> {
|
|
267
|
-
overlayId: Id;
|
|
268
|
-
instanceId?: string;
|
|
269
|
-
}
|
|
270
|
-
type ToggleOverlayPayload<Id extends OverlayId = OverlayId> = OpenOverlayPayload<Id>;
|
|
271
|
-
interface CloseAllInstancesPayload<Id extends OverlayId = OverlayId> {
|
|
272
|
-
overlayId: Id;
|
|
273
|
-
}
|
|
274
|
-
interface CloseOverlaysBoundToPagePayload {
|
|
275
|
-
/** Overlay ids whose definitions say `closesOnNavigation`. */
|
|
276
|
-
overlayIds: readonly string[];
|
|
277
|
-
}
|
|
278
|
-
interface PruneStaleInstancesPayload {
|
|
279
|
-
olderThanMs: number;
|
|
280
|
-
}
|
|
281
|
-
/** Raw reducer payload: untyped ids + the registry defaults the creator resolved. */
|
|
282
|
-
interface RawOpenPayload {
|
|
283
|
-
overlayId: string;
|
|
284
|
-
instanceId?: string;
|
|
285
|
-
data?: unknown;
|
|
286
|
-
defaults?: Readonly<Record<string, unknown>>;
|
|
287
|
-
}
|
|
288
|
-
interface SummonAction<P> {
|
|
289
|
-
type: string;
|
|
290
|
-
payload: P;
|
|
291
|
-
/** Structurally a Redux `UnknownAction`. */
|
|
292
|
-
[extra: string]: unknown;
|
|
293
|
-
}
|
|
294
|
-
type Creator<Args extends unknown[], P> = ((...args: Args) => SummonAction<P>) & {
|
|
295
|
-
readonly type: string;
|
|
296
|
-
match(action: unknown): action is SummonAction<P>;
|
|
297
|
-
};
|
|
298
|
-
declare const openOverlay: Creator<[payload: OpenOverlayPayload<string>], RawOpenPayload>;
|
|
299
|
-
declare const closeOverlay: Creator<[payload: CloseOverlayPayload<string>], {
|
|
300
|
-
overlayId: string;
|
|
301
|
-
instanceId?: never;
|
|
302
|
-
} | {
|
|
303
|
-
overlayId: string;
|
|
304
|
-
instanceId: string;
|
|
305
|
-
}>;
|
|
306
|
-
declare const toggleOverlay: Creator<[payload: ToggleOverlayPayload<string>], RawOpenPayload>;
|
|
307
|
-
declare const closeAllInstancesOfOverlay: Creator<[payload: CloseAllInstancesPayload<string>], {
|
|
308
|
-
overlayId: string;
|
|
309
|
-
}>;
|
|
310
|
-
/** Ids of every registered overlay whose definition says `closesOnNavigation`. */
|
|
311
|
-
declare function overlayIdsBoundToPage(): string[];
|
|
312
|
-
/** Close page-bound overlays. Omit the ids to use the registry's `closesOnNavigation` list. */
|
|
313
|
-
declare const closeOverlaysBoundToPage: Creator<[payload?: Partial<CloseOverlaysBoundToPagePayload> | undefined], CloseOverlaysBoundToPagePayload>;
|
|
314
|
-
declare const closeAllOverlays: Creator<[], undefined>;
|
|
315
|
-
declare const pruneStaleInstances: Creator<[payload: PruneStaleInstancesPayload], PruneStaleInstancesPayload>;
|
|
316
|
-
declare const focusWindow: Creator<[payload: string], string>;
|
|
317
|
-
declare const restoreWindow: Creator<[payload: string], string>;
|
|
318
|
-
declare const toggleWindowsHidden: Creator<[], undefined>;
|
|
319
|
-
declare const restoreAll: Creator<[], undefined>;
|
|
320
|
-
declare const minimizeAll: Creator<[payload: {
|
|
321
|
-
viewportWidth: number;
|
|
322
|
-
viewportHeight: number;
|
|
323
|
-
}], {
|
|
324
|
-
viewportWidth: number;
|
|
325
|
-
viewportHeight: number;
|
|
326
|
-
}>;
|
|
327
|
-
/** Every slice key the summon reducers own; an action under one of them needs the runtime. */
|
|
328
|
-
declare const SUMMON_SLICE_KEYS: readonly ["overlays", "windowManager", "urlSync", "overlayState"];
|
|
329
|
-
declare function isSummonAction(action: unknown): action is {
|
|
330
|
-
type: string;
|
|
331
|
-
};
|
|
332
|
-
|
|
333
|
-
interface OverlayInstance {
|
|
334
|
-
isOpen: boolean;
|
|
335
|
-
data: unknown;
|
|
336
|
-
/** Unix ms of the last open (pruneStaleInstances reads it). */
|
|
337
|
-
lastUsedAt?: number;
|
|
338
|
-
}
|
|
339
|
-
interface OverlayState {
|
|
340
|
-
overlays: Record<string, Record<string, OverlayInstance>>;
|
|
341
|
-
}
|
|
342
|
-
/** The slice of any store these selectors need (absent until the summon runtime is installed). */
|
|
343
|
-
type StateWithOverlays = {
|
|
344
|
-
overlays?: OverlayState;
|
|
345
|
-
};
|
|
346
|
-
interface OpenInstanceView {
|
|
347
|
-
instanceId: string;
|
|
348
|
-
data: unknown;
|
|
349
|
-
}
|
|
350
|
-
declare const selectOverlay: (state: StateWithOverlays, overlayId: string, instanceId?: string) => OverlayInstance;
|
|
351
|
-
declare const selectIsOverlayOpen: (state: StateWithOverlays, overlayId: string, instanceId?: string) => boolean;
|
|
352
|
-
declare const selectOverlayData: (state: StateWithOverlays, overlayId: string, instanceId?: string) => unknown;
|
|
353
|
-
/** All open instances of an overlay id; the array reference is stable while the open set is unchanged. */
|
|
354
|
-
declare const selectOpenInstances: (state: StateWithOverlays, overlayId: string) => readonly OpenInstanceView[];
|
|
355
|
-
/** Every open instance key (`overlayId:instanceId`). */
|
|
356
|
-
declare function listOpenInstanceKeys(state: StateWithOverlays): string[];
|
|
357
|
-
/** True once anything has ever been opened in this store (a key exists in the slice). */
|
|
358
|
-
declare function selectAnyOverlayTouched(state: StateWithOverlays): boolean;
|
|
359
|
-
/** The global hide-all flag (false before the runtime is installed). */
|
|
360
|
-
declare const selectWindowsHidden: (state: {
|
|
361
|
-
windowManager?: {
|
|
362
|
-
windowsHidden: boolean;
|
|
363
|
-
};
|
|
364
|
-
}) => boolean;
|
|
365
|
-
|
|
366
|
-
/** What the core hands the gate when it loads. */
|
|
367
|
-
interface SummonCore {
|
|
368
|
-
readonly reducers: Readonly<Record<string, Reducer>>;
|
|
369
|
-
createMiddleware(ports?: Partial<SummonPorts>): Middleware[];
|
|
370
|
-
}
|
|
371
|
-
/** Dispatched once after the slices are injected into a live store, so they hold their initial state. */
|
|
372
|
-
declare const SUMMON_INSTALLED_ACTION = "@@summon/installed";
|
|
373
|
-
/** Called by the core module when it evaluates (idempotent). */
|
|
374
|
-
declare function installSummonCore(core: SummonCore): void;
|
|
375
|
-
declare function isSummonInstalled(): boolean;
|
|
376
|
-
declare function subscribeSummonInstalled(listener: () => void): () => void;
|
|
377
|
-
/** Load the summon core (one import(), shared by every caller). Resolves once it is installed. */
|
|
378
|
-
declare function ensureSummonRuntime(): Promise<void>;
|
|
379
|
-
/** Start loading the core without waiting (idle, pointer intent). Errors surface on the next real request. */
|
|
380
|
-
declare function prefetchSummonRuntime(): void;
|
|
381
|
-
interface SummonGate {
|
|
382
|
-
/** Put this in the host store's middleware chain. */
|
|
383
|
-
readonly middleware: Middleware;
|
|
384
|
-
/**
|
|
385
|
-
* Give the gate the host root reducer's inject function — before `configureStore`, so a core
|
|
386
|
-
* that is already loaded (a page that imported the window section) is injected before the
|
|
387
|
-
* store's first state exists.
|
|
388
|
-
*/
|
|
389
|
-
attachReducer(inject: (reducers: Readonly<Record<string, Reducer>>) => void): void;
|
|
390
|
-
}
|
|
391
|
-
interface CreateSummonGateOptions {
|
|
392
|
-
/** Ports for the summon middleware (render watchdog: notify, errors, debug). */
|
|
393
|
-
readonly ports?: Partial<SummonPorts>;
|
|
394
|
-
}
|
|
395
|
-
declare function createSummonGate(options?: CreateSummonGateOptions): SummonGate;
|
|
396
|
-
|
|
397
|
-
export { locationRouter as $, type AnyOverlayMeta as A, closeOverlay as B, type CloseOverlaysBoundToPagePayload as C, DEFAULT_INSTANCE_ID as D, type ErrorSinkPort as E, closeOverlaysBoundToPage as F, consoleErrorSink as G, consoleNotify as H, type InstanceKey as I, debugOff as J, type KeepAlive as K, type LinkHydrateContext as L, type MobilePresentation as M, type NotifyOptions as N, type OverlayState as O, type PruneStaleInstancesPayload as P, defaultWindowIdFor as Q, type RawOpenPayload as R, type SummonPorts as S, type ToggleOverlayPayload as T, type UnbiddenHomeRoute as U, getOverlayMeta as V, type WindowPreservation as W, getOverlayMetaByLinkKey as X, instanceKey as Y, isRegisteredOverlay as Z, listOpenInstanceKeys as _, type StateWithOverlays as a, openOverlay as a0, overlayIdsBoundToPage as a1, parseInstanceKey as a2, registerOverlayMeta as a3, resetOverlayRegistry as a4, resolvePorts as a5, selectIsOverlayOpen as a6, selectOpenInstances as a7, selectOverlay as a8, selectOverlayData as a9, subscribeToOverlayRegistry as aa, toggleOverlay as ab, type CreateSummonGateOptions as ac, SUMMON_INSTALLED_ACTION as ad, SUMMON_SLICE_KEYS as ae, type SummonAction as af, type SummonGate as ag, closeAllOverlays as ah, createSummonGate as ai, ensureSummonRuntime as aj, focusWindow as ak, installSummonCore as al, isSummonAction as am, isSummonInstalled as an, minimizeAll as ao, prefetchSummonRuntime as ap, pruneStaleInstances as aq, restoreAll as ar, restoreWindow as as, selectAnyOverlayTouched as at, selectWindowsHidden as au, subscribeSummonInstalled as av, toggleWindowsHidden as aw, type OverlayDefinitionMeta as b, type SummonCore as c, type CloseAllInstancesPayload as d, type CloseOverlayPayload as e, DEFAULT_PORTS as f, type DebugPort as g, type IdentityPort as h, type InstanceMode as i, type NotifyPort as j, type OpenInstanceView as k, type OpenOverlayPayload as l, type OverlayDataOf as m, type OverlayHostDispatch as n, type OverlayId as o, type OverlayInstance as p, type OverlayLinkSpec as q, type OverlayPersistencePort as r, type OverlayRawData as s, type OverlayWindowOptions as t, type RouterPort as u, type StoredValue as v, type Unsubscribe as w, allOverlayMeta as x, anonymousIdentity as y, closeAllInstancesOfOverlay as z };
|