@ai-matrx/summon 0.1.6 → 0.1.8
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 +21 -2
- package/dist/gate-DUvE-Cc1.d.cts +399 -0
- package/dist/gate-DUvE-Cc1.d.ts +399 -0
- package/dist/handles.cjs +1 -0
- package/dist/handles.cjs.map +1 -1
- package/dist/handles.d.cts +3 -61
- package/dist/handles.d.ts +3 -61
- package/dist/handles.js +1 -0
- package/dist/handles.js.map +1 -1
- package/dist/helpers-2NY1ha0V.d.cts +63 -0
- package/dist/helpers-2NY1ha0V.d.ts +63 -0
- package/dist/index.cjs +194 -159
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -355
- package/dist/index.d.ts +9 -355
- package/dist/index.js +200 -165
- package/dist/index.js.map +1 -1
- package/dist/instanceBody-CgZAFnic.d.cts +23 -0
- package/dist/instanceBody-CgZAFnic.d.ts +23 -0
- package/dist/open.cjs +408 -0
- package/dist/open.cjs.map +1 -0
- package/dist/open.d.cts +22 -0
- package/dist/open.d.ts +22 -0
- package/dist/open.js +375 -0
- package/dist/open.js.map +1 -0
- package/dist/persistence.cjs +27 -2
- package/dist/persistence.cjs.map +1 -1
- package/dist/persistence.js +28 -3
- package/dist/persistence.js.map +1 -1
- package/dist/react.cjs +249 -352
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +11 -151
- package/dist/react.d.ts +11 -151
- package/dist/react.js +210 -306
- package/dist/react.js.map +1 -1
- package/dist/root.cjs +277 -0
- package/dist/root.cjs.map +1 -0
- package/dist/root.d.cts +175 -0
- package/dist/root.d.ts +175 -0
- package/dist/root.js +254 -0
- package/dist/root.js.map +1 -0
- package/dist/window-host.cjs +11 -2
- package/dist/window-host.cjs.map +1 -1
- package/dist/window-host.d.cts +1 -0
- package/dist/window-host.d.ts +1 -0
- package/dist/window-host.js +11 -2
- package/dist/window-host.js.map +1 -1
- package/dist/window.cjs +2 -1
- package/dist/window.cjs.map +1 -1
- package/dist/window.d.cts +3 -2
- package/dist/window.d.ts +3 -2
- package/dist/window.js +2 -1
- package/dist/window.js.map +1 -1
- package/package.json +26 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,305 +1,8 @@
|
|
|
1
|
+
import { R as RawOpenPayload, C as CloseOverlaysBoundToPagePayload, P as PruneStaleInstancesPayload, O as OverlayState, I as InstanceKey, S as SummonPorts, a as StateWithOverlays, b as OverlayDefinitionMeta, c as SummonCore } from './gate-DUvE-Cc1.js';
|
|
2
|
+
export { A as AnyOverlayMeta, d as CloseAllInstancesPayload, e as CloseOverlayPayload, D as DEFAULT_INSTANCE_ID, f as DEFAULT_PORTS, g as DebugPort, E as ErrorSinkPort, h as IdentityPort, i as InstanceMode, K as KeepAlive, L as LinkHydrateContext, M as MobilePresentation, N as NotifyOptions, j as NotifyPort, k as OpenInstanceView, l as OpenOverlayPayload, m as OverlayDataOf, n as OverlayHostDispatch, o as OverlayHostTypes, p as OverlayId, q as OverlayInstance, r as OverlayLinkSpec, s as OverlayPersistencePort, t as OverlayRawData, u as OverlayRegistry, v as OverlayWindowOptions, w as RouterPort, x as StoredValue, T as ToggleOverlayPayload, U as UnbiddenHomeRoute, y as Unsubscribe, W as WindowPreservation, z as allOverlayMeta, B as anonymousIdentity, F as closeAllInstancesOfOverlay, G as closeOverlay, H as closeOverlaysBoundToPage, J as consoleErrorSink, Q as consoleNotify, V as debugOff, X as defaultWindowIdFor, Y as getOverlayMeta, Z as getOverlayMetaByLinkKey, _ as instanceKey, $ as isRegisteredOverlay, a0 as listOpenInstanceKeys, a1 as locationRouter, a2 as openOverlay, a3 as overlayIdsBoundToPage, a4 as parseInstanceKey, a5 as registerOverlayMeta, a6 as resetOverlayRegistry, a7 as resolvePorts, a8 as selectIsOverlayOpen, a9 as selectOpenInstances, aa as selectOverlay, ab as selectOverlayData, ac as subscribeToOverlayRegistry, ad as toggleOverlay } from './gate-DUvE-Cc1.js';
|
|
1
3
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
2
4
|
import { PayloadAction, Reducer, UnknownAction, Middleware } from '@reduxjs/toolkit';
|
|
3
5
|
|
|
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
|
-
interface OverlayRegistry {
|
|
23
|
-
}
|
|
24
|
-
/** Every registered overlay id; plain `string` until the host augments the registry. */
|
|
25
|
-
type OverlayId = [keyof OverlayRegistry] extends [never] ? string : Extract<keyof OverlayRegistry, string>;
|
|
26
|
-
/** The open-data type declared for an overlay id. */
|
|
27
|
-
type OverlayDataOf<Id extends string> = Id extends keyof OverlayRegistry ? OverlayRegistry[Id] : Record<string, unknown>;
|
|
28
|
-
/**
|
|
29
|
-
* Data as it arrives at render time. It crossed Redux, a URL or storage, so it is NOT trusted to
|
|
30
|
-
* match the opener's type: render code narrows it (or the definition supplies `parse`).
|
|
31
|
-
*/
|
|
32
|
-
type OverlayRawData = Readonly<Record<string, unknown>> | null;
|
|
33
|
-
declare const DEFAULT_INSTANCE_ID = "default";
|
|
34
|
-
/** `single`: one instance ("default"). `multi`: any number, each with its own instanceId. */
|
|
35
|
-
type InstanceMode = "single" | "multi";
|
|
36
|
-
/**
|
|
37
|
-
* What closing does to a mounted overlay (Arman, 2026-10-16, C38 R3):
|
|
38
|
-
* none — unmount (default).
|
|
39
|
-
* hidden — stay mounted but hidden; reopening shows the same live component (LRU-capped).
|
|
40
|
-
* restore — unmount, but values saved with `useOverlayState` come back on reopen.
|
|
41
|
-
* Minimizing a window always keeps its component mounted, whatever this says.
|
|
42
|
-
*/
|
|
43
|
-
type KeepAlive = "none" | "hidden" | "restore";
|
|
44
|
-
/** `overlayId:instanceId` — the one key every subsystem uses for an open instance. */
|
|
45
|
-
type InstanceKey = `${string}:${string}`;
|
|
46
|
-
declare function instanceKey(overlayId: string, instanceId?: string): InstanceKey;
|
|
47
|
-
declare function parseInstanceKey(key: string): {
|
|
48
|
-
overlayId: string;
|
|
49
|
-
instanceId: string;
|
|
50
|
-
} | null;
|
|
51
|
-
type MobilePresentation = "fullscreen" | "drawer" | "card" | "hidden";
|
|
52
|
-
/**
|
|
53
|
-
* Default-deny allowlist of the open data a window may save and restore. A window with no
|
|
54
|
-
* preservation entry restores geometry only.
|
|
55
|
-
*/
|
|
56
|
-
interface WindowPreservation {
|
|
57
|
-
readonly dataKeys: readonly string[];
|
|
58
|
-
readonly requiredDataKeys?: readonly string[];
|
|
59
|
-
readonly allowedDataValues?: Readonly<Record<string, readonly (string | number | boolean | null)[]>>;
|
|
60
|
-
/** Default 32 KiB. */
|
|
61
|
-
readonly maxDataBytes?: number;
|
|
62
|
-
}
|
|
63
|
-
/** One declared home for an unbidden (system-raised) window: a route prefix, or one exact page. */
|
|
64
|
-
type UnbiddenHomeRoute = string | {
|
|
65
|
-
readonly route: string;
|
|
66
|
-
readonly exact: true;
|
|
67
|
-
};
|
|
68
|
-
interface OverlayWindowOptions {
|
|
69
|
-
readonly mobile?: MobilePresentation;
|
|
70
|
-
readonly mobileSidebarAs?: "drawer" | "inline";
|
|
71
|
-
/** Never saved or restored (debug panels, one-shot tools, callback-bound editors). */
|
|
72
|
-
readonly ephemeral?: boolean;
|
|
73
|
-
readonly preservation?: WindowPreservation;
|
|
74
|
-
/**
|
|
75
|
-
* Values merged under saved data when a window is RESTORED (reload, another device). Unlike the
|
|
76
|
-
* definition's `defaults`, never applied to a normal open.
|
|
77
|
-
*/
|
|
78
|
-
readonly restoreDefaults?: Readonly<Record<string, unknown>>;
|
|
79
|
-
/**
|
|
80
|
-
* The window-manager id the WindowPanel registers under for the default instance. Default: the
|
|
81
|
-
* overlay id. The render watchdog reveals and inspects this id until the panel acks its own.
|
|
82
|
-
*/
|
|
83
|
-
readonly windowId?: string;
|
|
84
|
-
readonly deprecated?: {
|
|
85
|
-
readonly replacement?: string;
|
|
86
|
-
readonly reason?: string;
|
|
87
|
-
};
|
|
88
|
-
/**
|
|
89
|
-
* Where a window nobody opened (system-raised) may raise itself. Default deny: no home → it may
|
|
90
|
-
* not raise itself anywhere (`mayRaiseUnbidden` in the window section).
|
|
91
|
-
*/
|
|
92
|
-
readonly unbiddenHome?: readonly UnbiddenHomeRoute[];
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Host-specific types the package passes through untouched. A Redux host augments `dispatch`
|
|
96
|
-
* with its thunk-aware dispatch so link hydrators can dispatch its thunks without casts:
|
|
97
|
-
*
|
|
98
|
-
* declare module "@ai-matrx/summon" { interface OverlayHostTypes { dispatch: AppDispatch } }
|
|
99
|
-
*/
|
|
100
|
-
interface OverlayHostTypes {
|
|
101
|
-
}
|
|
102
|
-
type OverlayHostDispatch = OverlayHostTypes extends {
|
|
103
|
-
dispatch: infer D;
|
|
104
|
-
} ? D : (action: unknown) => unknown;
|
|
105
|
-
interface LinkHydrateContext<Data> {
|
|
106
|
-
/** The id segment of the link token (`notes:<id>`). */
|
|
107
|
-
readonly id: string;
|
|
108
|
-
/** Decoded `k-v` arguments of the token. */
|
|
109
|
-
readonly args: Readonly<Record<string, string>>;
|
|
110
|
-
/** Open this overlay. */
|
|
111
|
-
open(options?: {
|
|
112
|
-
readonly instanceId?: string;
|
|
113
|
-
readonly data?: Data;
|
|
114
|
-
}): void;
|
|
115
|
-
/** The host store's dispatch, for thunks a hydrator needs (loading a record first). Typed by
|
|
116
|
-
* augmenting `OverlayHostTypes` with the host's dispatch type. */
|
|
117
|
-
readonly dispatch: OverlayHostDispatch;
|
|
118
|
-
}
|
|
119
|
-
interface OverlayLinkSpec<Data> {
|
|
120
|
-
/** The token type key in `?panels=key:id`. Unique across the host. */
|
|
121
|
-
readonly key: string;
|
|
122
|
-
/** Older keys that still resolve to this overlay. */
|
|
123
|
-
readonly aliases?: readonly string[];
|
|
124
|
-
/** Turn a link token into an open overlay (and its data). `"refused"` keeps the token and says why. */
|
|
125
|
-
hydrate(context: LinkHydrateContext<Data>): void | "refused" | Promise<void | "refused">;
|
|
126
|
-
}
|
|
127
|
-
interface OverlayDefinitionMeta<Id extends string = string, Data = Record<string, unknown>> {
|
|
128
|
-
readonly id: Id;
|
|
129
|
-
/** Human label: tray, menus, diagnostics. */
|
|
130
|
-
readonly label: string;
|
|
131
|
-
readonly instance?: InstanceMode;
|
|
132
|
-
readonly keepAlive?: KeepAlive;
|
|
133
|
-
/** Close when the route changes — the overlay shows a piece of the page that opened it. */
|
|
134
|
-
readonly closesOnNavigation?: boolean;
|
|
135
|
-
/** Present only for overlays that render a WindowPanel. */
|
|
136
|
-
readonly window?: OverlayWindowOptions;
|
|
137
|
-
readonly link?: OverlayLinkSpec<Data>;
|
|
138
|
-
/** Defaults merged under open data (replaces the old per-overlay schema registry). */
|
|
139
|
-
readonly defaults?: Partial<Data>;
|
|
140
|
-
}
|
|
141
|
-
/** The window-manager id a singleton window overlay registers under (`window.windowId ?? id`). */
|
|
142
|
-
declare function defaultWindowIdFor(meta: Pick<OverlayDefinitionMeta, "id" | "window">): string;
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Everything the overlays system needs from its host, as ports. Every port ships a working
|
|
146
|
-
* default, so a bare host gets a working system with zero wiring (package standard rule 8); a
|
|
147
|
-
* host overrides only what it has: identity, navigation, notifications, error sink, debug flag,
|
|
148
|
-
* persistence. Framework-free.
|
|
149
|
-
*/
|
|
150
|
-
type Unsubscribe = () => void;
|
|
151
|
-
/** Who the person is, for isolating saved state. `key` changes → everything saved is swapped. */
|
|
152
|
-
interface IdentityPort {
|
|
153
|
-
current(): {
|
|
154
|
-
readonly key: string;
|
|
155
|
-
readonly ready: boolean;
|
|
156
|
-
};
|
|
157
|
-
subscribe(listener: () => void): Unsubscribe;
|
|
158
|
-
}
|
|
159
|
-
/** The address bar: route changes (close-on-navigation) and the `?panels=` link channel. */
|
|
160
|
-
interface RouterPort {
|
|
161
|
-
pathname(): string;
|
|
162
|
-
search(): string;
|
|
163
|
-
/** Replace the query string without navigating or remounting the page. */
|
|
164
|
-
replaceSearch(nextSearch: string): void;
|
|
165
|
-
subscribe(listener: () => void): Unsubscribe;
|
|
166
|
-
}
|
|
167
|
-
interface NotifyOptions {
|
|
168
|
-
readonly id?: string;
|
|
169
|
-
readonly description?: string;
|
|
170
|
-
/** How long the notice stays up (ms). Hosts without timed notices ignore it. */
|
|
171
|
-
readonly duration?: number;
|
|
172
|
-
/** One action button (e.g. the render watchdog's "Show it"). Hosts without actions ignore it. */
|
|
173
|
-
readonly action?: {
|
|
174
|
-
readonly label: string;
|
|
175
|
-
readonly onClick: () => void;
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
interface NotifyPort {
|
|
179
|
-
info(message: string, options?: NotifyOptions): void;
|
|
180
|
-
warn(message: string, options?: NotifyOptions): void;
|
|
181
|
-
error(message: string, options?: NotifyOptions): void;
|
|
182
|
-
/** Withdraw a notice by id (optional). */
|
|
183
|
-
dismiss?(id: string): void;
|
|
184
|
-
}
|
|
185
|
-
interface ErrorSinkPort {
|
|
186
|
-
capture(error: unknown, context: Readonly<Record<string, unknown>>): void;
|
|
187
|
-
}
|
|
188
|
-
interface DebugPort {
|
|
189
|
-
enabled(): boolean;
|
|
190
|
-
subscribe?(listener: () => void): Unsubscribe;
|
|
191
|
-
}
|
|
192
|
-
/** A stored value with its optimistic-concurrency version (0 when the store has none). */
|
|
193
|
-
interface StoredValue<T = unknown> {
|
|
194
|
-
readonly value: T;
|
|
195
|
-
readonly version: number;
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* Where saved overlay state lives when persistence is on. Keys are already scoped to the
|
|
199
|
-
* identity by the caller (`<identityKey>/<key>`) for stores that are not per-person themselves.
|
|
200
|
-
* Implementations: the browser-local store (`./persistence`), `@ai-matrx/data` over
|
|
201
|
-
* `users.user_surface_state` (`./persistence/data`), or any host database.
|
|
202
|
-
*/
|
|
203
|
-
interface OverlayPersistencePort {
|
|
204
|
-
/**
|
|
205
|
-
* True when the store is per-person itself (rows scoped to the signed-in person, e.g. the
|
|
206
|
-
* `@ai-matrx/data` adapter): the persistence section then passes plain keys (`workspace`,
|
|
207
|
-
* `state:<instanceKey>`) instead of `<identityKey>/<key>`, and defaults to `scope: "person"`.
|
|
208
|
-
*/
|
|
209
|
-
readonly perPerson?: boolean;
|
|
210
|
-
load<T = unknown>(key: string): Promise<StoredValue<T> | null>;
|
|
211
|
-
save<T = unknown>(key: string, value: T, options?: {
|
|
212
|
-
readonly expectedVersion?: number;
|
|
213
|
-
}): Promise<{
|
|
214
|
-
readonly version: number;
|
|
215
|
-
}>;
|
|
216
|
-
remove(key: string): Promise<void>;
|
|
217
|
-
list?(prefix: string): Promise<readonly string[]>;
|
|
218
|
-
/**
|
|
219
|
-
* Every saved value at once (key → value), for stores where one read is cheaper than several.
|
|
220
|
-
* When present, restoring an identity costs exactly this one call: the workspace and every
|
|
221
|
-
* saved component state come out of it, and `load`/`list` are not called on boot.
|
|
222
|
-
*/
|
|
223
|
-
loadAll?(): Promise<ReadonlyMap<string, StoredValue>>;
|
|
224
|
-
}
|
|
225
|
-
interface SummonPorts {
|
|
226
|
-
readonly identity: IdentityPort;
|
|
227
|
-
readonly router: RouterPort;
|
|
228
|
-
readonly notify: NotifyPort;
|
|
229
|
-
readonly errors: ErrorSinkPort;
|
|
230
|
-
readonly debug: DebugPort;
|
|
231
|
-
/** `null` = persistence off (R6). */
|
|
232
|
-
readonly persistence: OverlayPersistencePort | null;
|
|
233
|
-
}
|
|
234
|
-
declare const anonymousIdentity: IdentityPort;
|
|
235
|
-
/** `window.location` + `history.replaceState`; inert on the server. */
|
|
236
|
-
declare const locationRouter: RouterPort;
|
|
237
|
-
declare const consoleNotify: NotifyPort;
|
|
238
|
-
declare const consoleErrorSink: ErrorSinkPort;
|
|
239
|
-
declare const debugOff: DebugPort;
|
|
240
|
-
declare const DEFAULT_PORTS: SummonPorts;
|
|
241
|
-
declare function resolvePorts(overrides: Partial<SummonPorts> | undefined): SummonPorts;
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* A definition's meta with its data type erased, so definitions of every data shape share one
|
|
245
|
-
* registry without casts. (`never` erasure made `defaults` unassignable.)
|
|
246
|
-
*/
|
|
247
|
-
interface AnyOverlayMeta extends Omit<OverlayDefinitionMeta<string, unknown>, "defaults"> {
|
|
248
|
-
readonly defaults?: object | undefined;
|
|
249
|
-
}
|
|
250
|
-
type AnyMeta = AnyOverlayMeta;
|
|
251
|
-
/**
|
|
252
|
-
* Register (or re-register) definitions. Re-registering an id replaces it (hot reload). A link
|
|
253
|
-
* key claimed by two different ids is a host bug and throws, naming both.
|
|
254
|
-
*/
|
|
255
|
-
declare function registerOverlayMeta(definitions: readonly AnyOverlayMeta[]): void;
|
|
256
|
-
declare function getOverlayMeta(overlayId: string): AnyMeta | undefined;
|
|
257
|
-
declare function getOverlayMetaByLinkKey(linkKey: string): AnyMeta | undefined;
|
|
258
|
-
declare function allOverlayMeta(): readonly AnyMeta[];
|
|
259
|
-
declare function isRegisteredOverlay(overlayId: string): boolean;
|
|
260
|
-
declare function subscribeToOverlayRegistry(listener: () => void): () => void;
|
|
261
|
-
/** Test-only. */
|
|
262
|
-
declare function resetOverlayRegistry(): void;
|
|
263
|
-
|
|
264
|
-
interface OpenOverlayPayload<Id extends OverlayId = OverlayId> {
|
|
265
|
-
overlayId: Id;
|
|
266
|
-
instanceId?: string;
|
|
267
|
-
data?: OverlayDataOf<Id> | null;
|
|
268
|
-
}
|
|
269
|
-
interface CloseOverlayPayload<Id extends OverlayId = OverlayId> {
|
|
270
|
-
overlayId: Id;
|
|
271
|
-
instanceId?: string;
|
|
272
|
-
}
|
|
273
|
-
type ToggleOverlayPayload<Id extends OverlayId = OverlayId> = OpenOverlayPayload<Id>;
|
|
274
|
-
interface CloseAllInstancesPayload<Id extends OverlayId = OverlayId> {
|
|
275
|
-
overlayId: Id;
|
|
276
|
-
}
|
|
277
|
-
interface CloseOverlaysBoundToPagePayload {
|
|
278
|
-
/** Overlay ids whose definitions say `closesOnNavigation`. */
|
|
279
|
-
overlayIds: readonly string[];
|
|
280
|
-
}
|
|
281
|
-
interface PruneStaleInstancesPayload {
|
|
282
|
-
olderThanMs: number;
|
|
283
|
-
}
|
|
284
|
-
interface OverlayInstance {
|
|
285
|
-
isOpen: boolean;
|
|
286
|
-
data: unknown;
|
|
287
|
-
/**
|
|
288
|
-
* Unix ms timestamp of the last open action. Used by `pruneStaleInstances` to GC
|
|
289
|
-
* long-forgotten closed entries. Set on every open, untouched on close.
|
|
290
|
-
*/
|
|
291
|
-
lastUsedAt?: number;
|
|
292
|
-
}
|
|
293
|
-
interface OverlayState {
|
|
294
|
-
overlays: Record<string, Record<string, OverlayInstance>>;
|
|
295
|
-
}
|
|
296
|
-
/** Raw reducer payloads: untyped ids + the registry defaults the action creator resolved. */
|
|
297
|
-
interface RawOpenPayload {
|
|
298
|
-
overlayId: string;
|
|
299
|
-
instanceId?: string;
|
|
300
|
-
data?: unknown;
|
|
301
|
-
defaults?: Readonly<Record<string, unknown>>;
|
|
302
|
-
}
|
|
303
6
|
declare const overlaysReducer: _reduxjs_toolkit.Reducer<OverlayState>;
|
|
304
7
|
/** The raw slice action creators (untyped ids). Use for `.match` / `.type`; dispatch the typed ones. */
|
|
305
8
|
declare const overlaysRawActions: _reduxjs_toolkit.CaseReducerActions<{
|
|
@@ -396,59 +99,8 @@ declare const overlaysRawActions: _reduxjs_toolkit.CaseReducerActions<{
|
|
|
396
99
|
};
|
|
397
100
|
}, action: PayloadAction<PruneStaleInstancesPayload>) => void;
|
|
398
101
|
}, "overlays">;
|
|
399
|
-
declare const openOverlay: (<Id extends OverlayId>(payload: OpenOverlayPayload<Id>) => {
|
|
400
|
-
payload: RawOpenPayload;
|
|
401
|
-
type: "overlays/openOverlay";
|
|
402
|
-
}) & Pick<_reduxjs_toolkit.ActionCreatorWithPayload<RawOpenPayload, "overlays/openOverlay">, "type" | "match">;
|
|
403
|
-
declare const closeOverlay: (<Id extends OverlayId>(payload: CloseOverlayPayload<Id>) => {
|
|
404
|
-
payload: {
|
|
405
|
-
overlayId: string;
|
|
406
|
-
instanceId?: string;
|
|
407
|
-
};
|
|
408
|
-
type: "overlays/closeOverlay";
|
|
409
|
-
}) & Pick<_reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
410
|
-
overlayId: string;
|
|
411
|
-
instanceId?: string;
|
|
412
|
-
}, "overlays/closeOverlay">, "type" | "match">;
|
|
413
|
-
declare const toggleOverlay: (<Id extends OverlayId>(payload: ToggleOverlayPayload<Id>) => {
|
|
414
|
-
payload: RawOpenPayload;
|
|
415
|
-
type: "overlays/toggleOverlay";
|
|
416
|
-
}) & Pick<_reduxjs_toolkit.ActionCreatorWithPayload<RawOpenPayload, "overlays/toggleOverlay">, "type" | "match">;
|
|
417
|
-
declare const closeAllInstancesOfOverlay: (<Id extends OverlayId>(payload: CloseAllInstancesPayload<Id>) => {
|
|
418
|
-
payload: {
|
|
419
|
-
overlayId: string;
|
|
420
|
-
};
|
|
421
|
-
type: "overlays/closeAllInstancesOfOverlay";
|
|
422
|
-
}) & Pick<_reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
423
|
-
overlayId: string;
|
|
424
|
-
}, "overlays/closeAllInstancesOfOverlay">, "type" | "match">;
|
|
425
|
-
/** Ids of every registered overlay whose definition says `closesOnNavigation`. */
|
|
426
|
-
declare function overlayIdsBoundToPage(): string[];
|
|
427
|
-
/** Close page-bound overlays. Omit the ids to use the registry's `closesOnNavigation` list. */
|
|
428
|
-
declare const closeOverlaysBoundToPage: ((payload?: Partial<CloseOverlaysBoundToPagePayload>) => {
|
|
429
|
-
payload: CloseOverlaysBoundToPagePayload;
|
|
430
|
-
type: "overlays/closeOverlaysBoundToPage";
|
|
431
|
-
}) & Pick<_reduxjs_toolkit.ActionCreatorWithPayload<CloseOverlaysBoundToPagePayload, "overlays/closeOverlaysBoundToPage">, "type" | "match">;
|
|
432
102
|
declare const closeAllOverlays: _reduxjs_toolkit.ActionCreatorWithoutPayload<"overlays/closeAllOverlays">;
|
|
433
103
|
declare const pruneStaleInstances: _reduxjs_toolkit.ActionCreatorWithPayload<PruneStaleInstancesPayload, "overlays/pruneStaleInstances">;
|
|
434
|
-
/** The slice of any store these selectors need. */
|
|
435
|
-
type StateWithOverlays = {
|
|
436
|
-
overlays: OverlayState;
|
|
437
|
-
};
|
|
438
|
-
interface OpenInstanceView {
|
|
439
|
-
instanceId: string;
|
|
440
|
-
data: unknown;
|
|
441
|
-
}
|
|
442
|
-
declare const selectOverlay: (state: StateWithOverlays, overlayId: string, instanceId?: string) => OverlayInstance;
|
|
443
|
-
declare const selectIsOverlayOpen: (state: StateWithOverlays, overlayId: string, instanceId?: string) => boolean;
|
|
444
|
-
declare const selectOverlayData: (state: StateWithOverlays, overlayId: string, instanceId?: string) => unknown;
|
|
445
|
-
/**
|
|
446
|
-
* All currently-open instances of an overlay id. Memoized per id: the array reference is stable
|
|
447
|
-
* while the open set is unchanged.
|
|
448
|
-
*/
|
|
449
|
-
declare const selectOpenInstances: (state: StateWithOverlays, overlayId: string) => readonly OpenInstanceView[];
|
|
450
|
-
/** Every open instance key (`overlayId:instanceId`) in the state. */
|
|
451
|
-
declare function listOpenInstanceKeys(state: StateWithOverlays): string[];
|
|
452
104
|
|
|
453
105
|
interface WindowRect {
|
|
454
106
|
x: number;
|
|
@@ -789,8 +441,8 @@ declare const selectTrayWindows: ((state: StateWithWM) => WindowEntry[]) & {
|
|
|
789
441
|
dependencyRecomputations: () => number;
|
|
790
442
|
resetDependencyRecomputations: () => void;
|
|
791
443
|
} & {
|
|
792
|
-
argsMemoize: typeof _reduxjs_toolkit.weakMapMemoize;
|
|
793
444
|
memoize: typeof _reduxjs_toolkit.weakMapMemoize;
|
|
445
|
+
argsMemoize: typeof _reduxjs_toolkit.weakMapMemoize;
|
|
794
446
|
};
|
|
795
447
|
/** All registered windows sorted by zIndex descending (most-recently-focused first). */
|
|
796
448
|
declare const selectAllWindows: ((state: StateWithWM) => WindowEntry[]) & {
|
|
@@ -811,8 +463,8 @@ declare const selectAllWindows: ((state: StateWithWM) => WindowEntry[]) & {
|
|
|
811
463
|
dependencyRecomputations: () => number;
|
|
812
464
|
resetDependencyRecomputations: () => void;
|
|
813
465
|
} & {
|
|
814
|
-
argsMemoize: typeof _reduxjs_toolkit.weakMapMemoize;
|
|
815
466
|
memoize: typeof _reduxjs_toolkit.weakMapMemoize;
|
|
467
|
+
argsMemoize: typeof _reduxjs_toolkit.weakMapMemoize;
|
|
816
468
|
};
|
|
817
469
|
/** True when every registered window is minimized (or there are none). */
|
|
818
470
|
declare const selectAllMinimized: ((state: StateWithWM) => boolean) & {
|
|
@@ -833,8 +485,8 @@ declare const selectAllMinimized: ((state: StateWithWM) => boolean) & {
|
|
|
833
485
|
dependencyRecomputations: () => number;
|
|
834
486
|
resetDependencyRecomputations: () => void;
|
|
835
487
|
} & {
|
|
836
|
-
argsMemoize: typeof _reduxjs_toolkit.weakMapMemoize;
|
|
837
488
|
memoize: typeof _reduxjs_toolkit.weakMapMemoize;
|
|
489
|
+
argsMemoize: typeof _reduxjs_toolkit.weakMapMemoize;
|
|
838
490
|
};
|
|
839
491
|
/** Current popout mode for a window. Returns `null` if docked or unknown id. */
|
|
840
492
|
declare const selectPopoutMode: (id: string) => (state: StateWithWM) => "pip" | "popup" | null;
|
|
@@ -873,8 +525,8 @@ declare const selectDockedWindows: ((state: StateWithWM) => WindowEntry[]) & {
|
|
|
873
525
|
dependencyRecomputations: () => number;
|
|
874
526
|
resetDependencyRecomputations: () => void;
|
|
875
527
|
} & {
|
|
876
|
-
argsMemoize: typeof _reduxjs_toolkit.weakMapMemoize;
|
|
877
528
|
memoize: typeof _reduxjs_toolkit.weakMapMemoize;
|
|
529
|
+
argsMemoize: typeof _reduxjs_toolkit.weakMapMemoize;
|
|
878
530
|
};
|
|
879
531
|
declare const windowManagerReducer: _reduxjs_toolkit.Reducer<WindowManagerState>;
|
|
880
532
|
|
|
@@ -1262,4 +914,6 @@ declare function traySlotRect(slot: number, viewportWidth: number, viewportHeigh
|
|
|
1262
914
|
height: number;
|
|
1263
915
|
};
|
|
1264
916
|
|
|
1265
|
-
|
|
917
|
+
declare const summonCore: SummonCore;
|
|
918
|
+
|
|
919
|
+
export { type CloseEvent, type CloseFlusher, CloseOverlaysBoundToPagePayload, type CreateOverlaysStoreOptions, type DockWindowPayload, type GlobalLayoutType, type HydrateOverlayStatePayload, type HydratedWindowSession, InstanceKey, LAZY_WINDOW_MOUNT_DEADLINE_MS, OverlayDefinitionMeta, OverlayState, type OverlayStateEntry, type OverlayStateState, type PersistedWindowSession, type PopoutMode, PruneStaleInstancesPayload, RENDER_WATCHDOG_SLOT, type RenderDiagnosis, type RenderFailureReason, type ReplaceOverlayStatePayload, type SetOverlayStateValuePayload, type StateWithOverlayState, StateWithOverlays, type StateWithUrlSync, type SummonDispatch, SummonPorts, type SummonRootState, type SummonStore, TRAY_CHIP_H, TRAY_CHIP_H_DESKTOP, TRAY_CHIP_H_MOBILE, TRAY_CHIP_W, TRAY_CHIP_W_DESKTOP, TRAY_CHIP_W_MOBILE_MAX, TRAY_COMPACT_GAP, TRAY_COMPACT_H, TRAY_GAP_X, TRAY_GAP_Y, TRAY_MARGIN_B, TRAY_MARGIN_L, TRAY_MARGIN_R, TRAY_MOBILE_BREAKPOINT, type UrlSyncEntry, type UrlSyncState, type ViewportDims, WINDOW_SESSION_SCHEMA_VERSION, type WindowCloseIntent, type WindowEntry, type WindowManagerState, type WindowPersistenceRegistration, type WindowPersistenceState, type WindowRect, type WindowRectLike, type WindowState, ackOverlayRender, ackOverlaySurfaceRender, arrangeActiveWindows, buildDockWindowPayload, centerRectInViewport, clampAllWindowRects, clampRectToCurrentViewport, clampRectToViewport, clampWindowRect, clearOverlayRender, clearOverlayState, clearOverlaySurfaceRender, clearWindowPersistenceState, closeAllOverlays, closeLifecycleMiddleware, computeGlobalArrangement, computeTrayChipHeight, computeTrayChipWidth, confirmWindowRestored, createOverlayRenderWatchdogMiddleware, createSummonMiddleware, createSummonStore, diagnoseOverlayRender, discardPendingWindowSession, dockWindow, focusWindow, getGrid12Rect, getGrid4Rect, getGrid6Rect, getGrid8Rect, getGrid9Rect, getStackedLeft2Rect, getStackedLeft3Rect, getStackedLeft4Rect, getStackedLeft5Rect, getStackedRight2Rect, getStackedRight3Rect, getStackedRight4Rect, getStackedRight5Rect, hydrateOverlayState, hydrateWindowSessions, linksReducer, markWindowClosing, maximizeWindow, minimizeAll, minimizeWindow, moveTraySlot, overlayStateReducer, overlaysRawActions, overlaysReducer, popOutWindow, pruneStaleInstances, raiseTransientWindow, recomputeTrayPositions, rectOnScreen, rectsEqual, registerCloseFlusher, registerSyncEntry, registerWindow, releaseOverlayInstance, releaseTransientWindow, replaceOverlayState, resetOverlayRenderWatchdog, restoreAll, restoreWindow, restoreWindowState, revealWindow, safeViewportDims, selectActivePipWindowId, selectAllMinimized, selectAllWindows, selectDockedWindows, selectIsPoppedOut, selectIsUrlHydrated, selectOverlayStateFor, selectOverlayStateValue, selectPendingWindowRestores, selectPopoutCandidateId, selectPopoutMode, selectPrePopoutRect, selectTransientZIndex, selectTraySlotWidth, selectTrayWindows, selectUrlSyncEntries, selectWindow, selectWindowPersistence, selectWindowRect, selectWindowState, selectWindowTitle, selectWindowZIndex, selectWindowsHidden, setHydrated, setOverlayStateValue, setPopoutCandidate, summonCore, summonReducers, toggleWindowsHidden, trayChipsPerRow, traySlotRect, unregisterSyncEntry, unregisterWindow, updateWindowPersistence, updateWindowRect, updateWindowTitle, watchdogTracksOpen, windowManagerReducer, windowSessionKey };
|