@ai-matrx/summon 0.1.7 → 0.1.9
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 +15 -2
- package/dist/gate-CfjdNWP6.d.cts +397 -0
- package/dist/gate-CfjdNWP6.d.ts +397 -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 +12 -350
- package/dist/index.d.ts +12 -350
- 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 +23 -0
- package/dist/open.d.ts +23 -0
- package/dist/open.js +375 -0
- package/dist/open.js.map +1 -0
- 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 +28 -5
package/dist/index.d.cts
CHANGED
|
@@ -1,305 +1,16 @@
|
|
|
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-CfjdNWP6.cjs';
|
|
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 OverlayId, p as OverlayInstance, q as OverlayLinkSpec, r as OverlayPersistencePort, s as OverlayRawData, t as OverlayWindowOptions, u as RouterPort, v as StoredValue, T as ToggleOverlayPayload, U as UnbiddenHomeRoute, w as Unsubscribe, W as WindowPreservation, x as allOverlayMeta, y as anonymousIdentity, z as closeAllInstancesOfOverlay, B as closeOverlay, F as closeOverlaysBoundToPage, G as consoleErrorSink, H as consoleNotify, J as debugOff, Q as defaultWindowIdFor, V as getOverlayMeta, X as getOverlayMetaByLinkKey, Y as instanceKey, Z as isRegisteredOverlay, _ as listOpenInstanceKeys, $ as locationRouter, a0 as openOverlay, a1 as overlayIdsBoundToPage, a2 as parseInstanceKey, a3 as registerOverlayMeta, a4 as resetOverlayRegistry, a5 as resolvePorts, a6 as selectIsOverlayOpen, a7 as selectOpenInstances, a8 as selectOverlay, a9 as selectOverlayData, aa as subscribeToOverlayRegistry, ab as toggleOverlay } from './gate-CfjdNWP6.cjs';
|
|
1
3
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
2
4
|
import { PayloadAction, Reducer, UnknownAction, Middleware } from '@reduxjs/toolkit';
|
|
5
|
+
import '@ai-matrx/summon';
|
|
3
6
|
|
|
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
|
-
*/
|
|
7
|
+
/** The host's overlay registry: overlay id → the data its opener accepts. */
|
|
22
8
|
interface OverlayRegistry {
|
|
23
9
|
}
|
|
24
|
-
/**
|
|
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
|
-
*/
|
|
10
|
+
/** Host-specific types the package passes through untouched (`dispatch` for link hydrators). */
|
|
100
11
|
interface OverlayHostTypes {
|
|
101
12
|
}
|
|
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
13
|
|
|
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
14
|
declare const overlaysReducer: _reduxjs_toolkit.Reducer<OverlayState>;
|
|
304
15
|
/** The raw slice action creators (untyped ids). Use for `.match` / `.type`; dispatch the typed ones. */
|
|
305
16
|
declare const overlaysRawActions: _reduxjs_toolkit.CaseReducerActions<{
|
|
@@ -396,59 +107,8 @@ declare const overlaysRawActions: _reduxjs_toolkit.CaseReducerActions<{
|
|
|
396
107
|
};
|
|
397
108
|
}, action: PayloadAction<PruneStaleInstancesPayload>) => void;
|
|
398
109
|
}, "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
110
|
declare const closeAllOverlays: _reduxjs_toolkit.ActionCreatorWithoutPayload<"overlays/closeAllOverlays">;
|
|
433
111
|
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
112
|
|
|
453
113
|
interface WindowRect {
|
|
454
114
|
x: number;
|
|
@@ -789,8 +449,8 @@ declare const selectTrayWindows: ((state: StateWithWM) => WindowEntry[]) & {
|
|
|
789
449
|
dependencyRecomputations: () => number;
|
|
790
450
|
resetDependencyRecomputations: () => void;
|
|
791
451
|
} & {
|
|
792
|
-
argsMemoize: typeof _reduxjs_toolkit.weakMapMemoize;
|
|
793
452
|
memoize: typeof _reduxjs_toolkit.weakMapMemoize;
|
|
453
|
+
argsMemoize: typeof _reduxjs_toolkit.weakMapMemoize;
|
|
794
454
|
};
|
|
795
455
|
/** All registered windows sorted by zIndex descending (most-recently-focused first). */
|
|
796
456
|
declare const selectAllWindows: ((state: StateWithWM) => WindowEntry[]) & {
|
|
@@ -811,8 +471,8 @@ declare const selectAllWindows: ((state: StateWithWM) => WindowEntry[]) & {
|
|
|
811
471
|
dependencyRecomputations: () => number;
|
|
812
472
|
resetDependencyRecomputations: () => void;
|
|
813
473
|
} & {
|
|
814
|
-
argsMemoize: typeof _reduxjs_toolkit.weakMapMemoize;
|
|
815
474
|
memoize: typeof _reduxjs_toolkit.weakMapMemoize;
|
|
475
|
+
argsMemoize: typeof _reduxjs_toolkit.weakMapMemoize;
|
|
816
476
|
};
|
|
817
477
|
/** True when every registered window is minimized (or there are none). */
|
|
818
478
|
declare const selectAllMinimized: ((state: StateWithWM) => boolean) & {
|
|
@@ -833,8 +493,8 @@ declare const selectAllMinimized: ((state: StateWithWM) => boolean) & {
|
|
|
833
493
|
dependencyRecomputations: () => number;
|
|
834
494
|
resetDependencyRecomputations: () => void;
|
|
835
495
|
} & {
|
|
836
|
-
argsMemoize: typeof _reduxjs_toolkit.weakMapMemoize;
|
|
837
496
|
memoize: typeof _reduxjs_toolkit.weakMapMemoize;
|
|
497
|
+
argsMemoize: typeof _reduxjs_toolkit.weakMapMemoize;
|
|
838
498
|
};
|
|
839
499
|
/** Current popout mode for a window. Returns `null` if docked or unknown id. */
|
|
840
500
|
declare const selectPopoutMode: (id: string) => (state: StateWithWM) => "pip" | "popup" | null;
|
|
@@ -873,8 +533,8 @@ declare const selectDockedWindows: ((state: StateWithWM) => WindowEntry[]) & {
|
|
|
873
533
|
dependencyRecomputations: () => number;
|
|
874
534
|
resetDependencyRecomputations: () => void;
|
|
875
535
|
} & {
|
|
876
|
-
argsMemoize: typeof _reduxjs_toolkit.weakMapMemoize;
|
|
877
536
|
memoize: typeof _reduxjs_toolkit.weakMapMemoize;
|
|
537
|
+
argsMemoize: typeof _reduxjs_toolkit.weakMapMemoize;
|
|
878
538
|
};
|
|
879
539
|
declare const windowManagerReducer: _reduxjs_toolkit.Reducer<WindowManagerState>;
|
|
880
540
|
|
|
@@ -1262,4 +922,6 @@ declare function traySlotRect(slot: number, viewportWidth: number, viewportHeigh
|
|
|
1262
922
|
height: number;
|
|
1263
923
|
};
|
|
1264
924
|
|
|
1265
|
-
|
|
925
|
+
declare const summonCore: SummonCore;
|
|
926
|
+
|
|
927
|
+
export { type CloseEvent, type CloseFlusher, CloseOverlaysBoundToPagePayload, type CreateOverlaysStoreOptions, type DockWindowPayload, type GlobalLayoutType, type HydrateOverlayStatePayload, type HydratedWindowSession, InstanceKey, LAZY_WINDOW_MOUNT_DEADLINE_MS, OverlayDefinitionMeta, type OverlayHostTypes, type OverlayRegistry, 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 };
|