@ai-matrx/summon 0.1.8 → 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 +1 -1
- package/dist/{gate-DUvE-Cc1.d.cts → gate-CfjdNWP6.d.cts} +3 -5
- package/dist/{gate-DUvE-Cc1.d.ts → gate-CfjdNWP6.d.ts} +3 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -3
- package/dist/index.d.ts +11 -3
- package/dist/index.js.map +1 -1
- package/dist/open.cjs.map +1 -1
- package/dist/open.d.cts +2 -1
- package/dist/open.d.ts +2 -1
- package/dist/open.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.1.
|
|
3
|
+
## 0.1.9
|
|
4
4
|
### Unreleased
|
|
5
5
|
|
|
6
6
|
- **New: `./open` and `./root` — a page pays next to nothing until something opens.** `./open` (framework-free) holds the action creators (plain objects carrying the slices' own type strings: `openOverlay`, `closeOverlay`, `toggleOverlay`, `closeAllInstancesOfOverlay`, `closeOverlaysBoundToPage`, `closeAllOverlays`, `pruneStaleInstances`, `focusWindow`, `restoreWindow`, `toggleWindowsHidden`, `restoreAll`, `minimizeAll`), selectors that read "closed" while the slices are absent, the registry, ports, and `createSummonGate()`. `./root` holds `<SummonRoot store runtime …settings>`, the store hooks, `defineOverlay` and the instance context. The gate is one middleware in a host store: the store carries no summon slice or middleware; the first summon action queues and starts ONE `import()` of the core, which installs itself on evaluation (injects the slices through the host's `attachReducer` inject, adds the close lifecycle + render watchdog, replays the queue). Any module that imports the core statically (the window section, links, persistence) installs it before it renders. `<SummonRoot>` records the host settings (ports, renderWrapper, errorReportExtras, windows) once; `useSummonPorts`, `useSummonConfig` and `useWindowConfig` fall back to them when no provider is above, so a page's own WindowPanel and the lazily loaded host need no provider. Callback-aware opens reserve their event channel id and the handles registry arrives with that first open (`openPendingEventChannel`). Measured in AI Matrx: summon first load per route 73 KB min / 23 KB gz before. Guards: `src/importCost.test.ts` (`./open`/`./root` reach no slice, middleware, react section, window or handles), `src/open/gate.test.ts`, `src/open/actions.parity.test.ts`, `src/root/summonRoot.test.tsx`. Consumer action: none for hosts that mount `summonReducers` or use `<SummonProvider>`; to drop summon from first load, mount `createSummonGate()` + `<SummonRoot>` instead and import openers/selectors from `./open`, `defineOverlay` from `./root`.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { OverlayHostTypes, OverlayRegistry } from '@ai-matrx/summon';
|
|
1
2
|
import { Reducer, Middleware } from '@reduxjs/toolkit';
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -18,8 +19,7 @@ import { Reducer, Middleware } from '@reduxjs/toolkit';
|
|
|
18
19
|
* `defineOverlay` emits nothing at runtime for this; the augmentation is the host's one-line
|
|
19
20
|
* declaration per overlay (the converter writes it next to each definition).
|
|
20
21
|
*/
|
|
21
|
-
|
|
22
|
-
}
|
|
22
|
+
|
|
23
23
|
/** Every registered overlay id; plain `string` until the host augments the registry. */
|
|
24
24
|
type OverlayId = [keyof OverlayRegistry] extends [never] ? string : Extract<keyof OverlayRegistry, string>;
|
|
25
25
|
/** The open-data type declared for an overlay id. */
|
|
@@ -96,8 +96,6 @@ interface OverlayWindowOptions {
|
|
|
96
96
|
*
|
|
97
97
|
* declare module "@ai-matrx/summon" { interface OverlayHostTypes { dispatch: AppDispatch } }
|
|
98
98
|
*/
|
|
99
|
-
interface OverlayHostTypes {
|
|
100
|
-
}
|
|
101
99
|
type OverlayHostDispatch = OverlayHostTypes extends {
|
|
102
100
|
dispatch: infer D;
|
|
103
101
|
} ? D : (action: unknown) => unknown;
|
|
@@ -396,4 +394,4 @@ interface CreateSummonGateOptions {
|
|
|
396
394
|
}
|
|
397
395
|
declare function createSummonGate(options?: CreateSummonGateOptions): SummonGate;
|
|
398
396
|
|
|
399
|
-
export {
|
|
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 };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { OverlayHostTypes, OverlayRegistry } from '@ai-matrx/summon';
|
|
1
2
|
import { Reducer, Middleware } from '@reduxjs/toolkit';
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -18,8 +19,7 @@ import { Reducer, Middleware } from '@reduxjs/toolkit';
|
|
|
18
19
|
* `defineOverlay` emits nothing at runtime for this; the augmentation is the host's one-line
|
|
19
20
|
* declaration per overlay (the converter writes it next to each definition).
|
|
20
21
|
*/
|
|
21
|
-
|
|
22
|
-
}
|
|
22
|
+
|
|
23
23
|
/** Every registered overlay id; plain `string` until the host augments the registry. */
|
|
24
24
|
type OverlayId = [keyof OverlayRegistry] extends [never] ? string : Extract<keyof OverlayRegistry, string>;
|
|
25
25
|
/** The open-data type declared for an overlay id. */
|
|
@@ -96,8 +96,6 @@ interface OverlayWindowOptions {
|
|
|
96
96
|
*
|
|
97
97
|
* declare module "@ai-matrx/summon" { interface OverlayHostTypes { dispatch: AppDispatch } }
|
|
98
98
|
*/
|
|
99
|
-
interface OverlayHostTypes {
|
|
100
|
-
}
|
|
101
99
|
type OverlayHostDispatch = OverlayHostTypes extends {
|
|
102
100
|
dispatch: infer D;
|
|
103
101
|
} ? D : (action: unknown) => unknown;
|
|
@@ -396,4 +394,4 @@ interface CreateSummonGateOptions {
|
|
|
396
394
|
}
|
|
397
395
|
declare function createSummonGate(options?: CreateSummonGateOptions): SummonGate;
|
|
398
396
|
|
|
399
|
-
export {
|
|
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 };
|