@ai-matrx/summon 0.1.19 → 0.1.20
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 +17 -1
- package/dist/index.cjs +11 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/dist/persistence.cjs +1 -1
- package/dist/persistence.cjs.map +1 -1
- package/dist/persistence.js +2 -2
- package/dist/persistence.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -10,11 +10,27 @@
|
|
|
10
10
|
- **`peekHandle(id)` on `./open`**: `callbackManager.get(id)` without loading the handles registry (it reads the registry's global slot; `undefined` until something registers). For boot-time code that only resolves ids. Guard: `src/open/peek.test.ts`.
|
|
11
11
|
- **The `?panels=` grammar's READ side moves to `./url`** (`parseLinkToken`, `parseLinkParam`, `decodeLinkPart`, `readPanelsParam`, `withPanelsParam`); `./open` keeps the WRITE side (`formatLinkToken`, `encodeLinkId`, `encodeLinkArg`, `LinkToken`, `LinkEntry`). Parsing happens only in the lazy link runtime. Consumer action: import parsers from `@ai-matrx/summon/url`. Guard: `src/importCost.test.ts` ("first-load entries export nothing only the lazy runtime needs").
|
|
12
12
|
|
|
13
|
-
## 0.1.
|
|
13
|
+
## 0.1.20
|
|
14
14
|
|
|
15
15
|
UNVERIFIED: this release has no Unreleased entry and the source comparison could not be made (the caller supplied no source comparison). Whether source changed is unknown; consumer action is unknown.
|
|
16
16
|
Check the package's gitHead on npm against this version's gitHead: `git diff <previous gitHead> <this gitHead> -- apps/shared/summon/src`.
|
|
17
17
|
|
|
18
|
+
## 0.1.19
|
|
19
|
+
|
|
20
|
+
SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
|
|
21
|
+
so they may include breaking API changes. Consumer action is UNKNOWN: read the diff before upgrading.
|
|
22
|
+
Diff: `git diff 95a286343b 92167249a3 -- apps/shared/summon/src`
|
|
23
|
+
|
|
24
|
+
Changed shipped source files (8):
|
|
25
|
+
- `apps/shared/summon/src/core/overlaysSlice.ts`
|
|
26
|
+
- `apps/shared/summon/src/react/fallbacks.tsx`
|
|
27
|
+
- `apps/shared/summon/src/window/WindowPanel.tsx`
|
|
28
|
+
- `apps/shared/summon/src/window/chrome/DeprecationBanner.tsx`
|
|
29
|
+
- `apps/shared/summon/src/window/chrome/MobileHeader.tsx`
|
|
30
|
+
- `apps/shared/summon/src/window/icons.tsx`
|
|
31
|
+
- `apps/shared/summon/src/window/mobile/MobileCardSurface.tsx`
|
|
32
|
+
- `apps/shared/summon/src/window/mobile/MobileDrawerSurface.tsx`
|
|
33
|
+
|
|
18
34
|
## 0.1.18
|
|
19
35
|
|
|
20
36
|
SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
|
package/dist/index.cjs
CHANGED
|
@@ -48,7 +48,7 @@ __export(src_exports, {
|
|
|
48
48
|
centerRectInViewport: () => centerRectInViewport,
|
|
49
49
|
clampAllWindowRects: () => clampAllWindowRects,
|
|
50
50
|
clampRectToCurrentViewport: () => clampRectToCurrentViewport,
|
|
51
|
-
|
|
51
|
+
clampStoredRectToViewport: () => clampStoredRectToViewport,
|
|
52
52
|
clampWindowRect: () => clampWindowRect,
|
|
53
53
|
clearOverlayRender: () => clearOverlayRender,
|
|
54
54
|
clearOverlayState: () => clearOverlayState,
|
|
@@ -707,13 +707,13 @@ function safeViewportDims() {
|
|
|
707
707
|
degenerate
|
|
708
708
|
};
|
|
709
709
|
}
|
|
710
|
-
function
|
|
710
|
+
function clampStoredRectToViewport(rect, viewport) {
|
|
711
711
|
if (!Number.isFinite(viewport.width) || !Number.isFinite(viewport.height) || viewport.width <= 0 || viewport.height <= 0) {
|
|
712
712
|
const host = globalThis;
|
|
713
713
|
if (!host[CLAMP_WARNED]) {
|
|
714
714
|
host[CLAMP_WARNED] = true;
|
|
715
715
|
console.warn(
|
|
716
|
-
"[window-panels]
|
|
716
|
+
"[window-panels] clampStoredRectToViewport received a degenerate viewport",
|
|
717
717
|
viewport,
|
|
718
718
|
"\u2014 skipping clamp so real window geometry is not destroyed."
|
|
719
719
|
);
|
|
@@ -746,7 +746,7 @@ function clampRectToViewport(rect, viewport) {
|
|
|
746
746
|
return { x, y, width, height };
|
|
747
747
|
}
|
|
748
748
|
function centerRectInViewport(rect, viewport) {
|
|
749
|
-
const sized =
|
|
749
|
+
const sized = clampStoredRectToViewport({ ...rect, x: 0, y: 0 }, viewport);
|
|
750
750
|
const x = Math.max(0, Math.round((viewport.width - sized.width) / 2));
|
|
751
751
|
const y = Math.max(0, Math.round((viewport.height - sized.height) / 2));
|
|
752
752
|
return { x, y, width: sized.width, height: sized.height };
|
|
@@ -754,7 +754,7 @@ function centerRectInViewport(rect, viewport) {
|
|
|
754
754
|
function clampRectToCurrentViewport(rect) {
|
|
755
755
|
if (typeof window === "undefined") return rect;
|
|
756
756
|
const { vw, vh } = safeViewportDims();
|
|
757
|
-
return
|
|
757
|
+
return clampStoredRectToViewport(rect, { width: vw, height: vh });
|
|
758
758
|
}
|
|
759
759
|
function rectsEqual(a, b) {
|
|
760
760
|
return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
|
|
@@ -945,14 +945,14 @@ var windowManagerSlice = (0, import_toolkit2.createSlice)({
|
|
|
945
945
|
registerWindow(state2, action) {
|
|
946
946
|
const { id, title, initial, initialState: initialState5, persistence, viewport } = action.payload;
|
|
947
947
|
if (state2.windows[id]) return;
|
|
948
|
-
const safeInitial = viewport ?
|
|
948
|
+
const safeInitial = viewport ? clampStoredRectToViewport(initial, viewport) : initial;
|
|
949
949
|
const pending2 = persistence ? state2.pendingRestores[windowSessionKey(persistence.overlayId, persistence.instanceId)] : void 0;
|
|
950
950
|
const pendingRenderRect = pending2 ? pending2.state === "minimized" && pending2.traySlot !== null && viewport ? traySlotRect(
|
|
951
951
|
pending2.traySlot,
|
|
952
952
|
viewport.width,
|
|
953
953
|
viewport.height,
|
|
954
954
|
state2.trayCount
|
|
955
|
-
) : viewport ?
|
|
955
|
+
) : viewport ? clampStoredRectToViewport(pending2.windowedRect, viewport) : pending2.renderRect : void 0;
|
|
956
956
|
const startsMinimized = !pending2 && initialState5 === "minimized" && viewport !== void 0;
|
|
957
957
|
const initialTraySlot = startsMinimized ? state2.trayCount : null;
|
|
958
958
|
state2.windows[id] = {
|
|
@@ -1024,7 +1024,7 @@ var windowManagerSlice = (0, import_toolkit2.createSlice)({
|
|
|
1024
1024
|
traySlot,
|
|
1025
1025
|
action.payload.viewportWidth,
|
|
1026
1026
|
action.payload.viewportHeight
|
|
1027
|
-
) :
|
|
1027
|
+
) : clampStoredRectToViewport(session.windowedRect, {
|
|
1028
1028
|
width: action.payload.viewportWidth,
|
|
1029
1029
|
height: action.payload.viewportHeight
|
|
1030
1030
|
})
|
|
@@ -1196,7 +1196,7 @@ var windowManagerSlice = (0, import_toolkit2.createSlice)({
|
|
|
1196
1196
|
win.state = "windowed";
|
|
1197
1197
|
}
|
|
1198
1198
|
if (win.state === "windowed") {
|
|
1199
|
-
const clamped =
|
|
1199
|
+
const clamped = clampStoredRectToViewport(win.windowed, {
|
|
1200
1200
|
width: viewportWidth,
|
|
1201
1201
|
height: viewportHeight
|
|
1202
1202
|
});
|
|
@@ -1279,7 +1279,7 @@ var windowManagerSlice = (0, import_toolkit2.createSlice)({
|
|
|
1279
1279
|
if (!win) return;
|
|
1280
1280
|
if (win.state !== "windowed") return;
|
|
1281
1281
|
if (win.popoutMode !== null) return;
|
|
1282
|
-
const clamped =
|
|
1282
|
+
const clamped = clampStoredRectToViewport(win.windowed, {
|
|
1283
1283
|
width: viewportWidth,
|
|
1284
1284
|
height: viewportHeight
|
|
1285
1285
|
});
|
|
@@ -1297,7 +1297,7 @@ var windowManagerSlice = (0, import_toolkit2.createSlice)({
|
|
|
1297
1297
|
Object.values(state2.windows).forEach((win) => {
|
|
1298
1298
|
if (win.state !== "windowed") return;
|
|
1299
1299
|
if (win.popoutMode !== null) return;
|
|
1300
|
-
const clamped =
|
|
1300
|
+
const clamped = clampStoredRectToViewport(win.windowed, {
|
|
1301
1301
|
width: viewportWidth,
|
|
1302
1302
|
height: viewportHeight
|
|
1303
1303
|
});
|