@ai-matrx/summon 0.1.5 → 0.1.6
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 +11 -0
- package/README.md +4 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.6
|
|
4
|
+
|
|
5
|
+
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.
|
|
6
|
+
Check the package's gitHead on npm against this version's gitHead: `git diff <previous gitHead> <this gitHead> -- apps/shared/summon/src`.
|
|
7
|
+
|
|
3
8
|
## 0.1.5
|
|
4
9
|
### Unreleased
|
|
5
10
|
|
|
@@ -8,6 +13,12 @@
|
|
|
8
13
|
- **Idle cost: the root-mounted pieces do nothing until used.** `WindowTraySync` no longer dispatches two actions on mount and on every resize of a page with no windows: it attaches its resize listener only while a window is registered or waiting to restore (one boolean selector), and `recomputeTrayPositions` writes nothing when the tray is empty (a resize with no tray hands subscribers the same state). Persistence boot is one read: a port may implement `loadAll()` (key → stored value), and when it does the controller restores the workspace and every saved component state from that single call instead of `load` + `list` + one `load` per state key; the `./persistence/data` adapter implements it (one `users.user_surface_state` select). Guards: `src/window/__tests__/windowTraySyncIdle.test.tsx`, `controller.test.ts` (boot = exactly `["loadAll"]`), `src/importCost.test.ts` (the root-mounted entries `.`, `./react`, `./window-host`, `./next` never reach WindowPanel, links, persistence, dialog/sheet/lite or testing). Consumer action: none.
|
|
9
14
|
- **New: the render map can live on the host.** `render` is now optional on `defineOverlay`, and `<SummonHost renders={…}>` takes an id → `() => import("./<id>.render")` map (`OverlayRenderMap`, data type erased, no `any`) for definitions declared without one. A definition's own `render` still wins. Why: every file that imports a definition to open it also inherited an `import()` edge to that overlay's window subtree; with ~220 overlays and ~450 opener files in AI Matrx that multiplied the build graph (a sub-app build went from ~10 s to an out-of-memory kill). An opened overlay with no render source shows its error card (`OverlayRenderMissingError`, `MISSING_RENDER_ERROR`) and logs in development. Guard: `src/react/__tests__/hostRenders.test.tsx`. Consumer action: none for existing users.
|
|
10
15
|
|
|
16
|
+
## 0.1.4
|
|
17
|
+
### Unreleased
|
|
18
|
+
|
|
19
|
+
- **New: `./dock`, the one primitive for floating chrome-less cards, pills and docks** (design R5 wave 2). `<Dock>` / `<DockHandle>` / `useDock()` / `useDockContext()` / `<DockProvider>`: pointer drag that never re-renders while moving (CSS `translate` in one animation frame, one commit on release), corner-relative positions clamped to the viewport with an optional nearest-corner snap and fixed-control avoidance, the position remembered per dock id (own store, `DockProvider`, else localStorage) or reported to a controlled host, the window manager's z-order lane on press, the design-system drag cursor hold, a click-vs-drag threshold that swallows the trailing click. Replaces the copies in AI Matrx (`useDraggableFloat`, the assists `useDockDrag`) and in `@ai-matrx/chat` (`useDraggablePanel`, the agent widget drags). Guard: `src/dock/__tests__/dock.test.tsx`. Consumer action: none.
|
|
20
|
+
- **New: the render map can live on the host.** `render` is now optional on `defineOverlay`, and `<SummonHost renders={…}>` takes an id → `() => import("./<id>.render")` map (`OverlayRenderMap`, data type erased, no `any`) for definitions declared without one. A definition's own `render` still wins. Why: every file that imports a definition to open it also inherited an `import()` edge to that overlay's window subtree; with ~220 overlays and ~450 opener files in AI Matrx that multiplied the build graph (a sub-app build went from ~10 s to an out-of-memory kill). An opened overlay with no render source shows its error card (`OverlayRenderMissingError`, `MISSING_RENDER_ERROR`) and logs in development. Guard: `src/react/__tests__/hostRenders.test.tsx`. Consumer action: none for existing users.
|
|
21
|
+
|
|
11
22
|
## 0.1.2
|
|
12
23
|
|
|
13
24
|
SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
|
package/README.md
CHANGED
|
@@ -382,9 +382,10 @@ import { Dock, DockHandle, DockProvider, useDock, useDockContext } from "@ai-mat
|
|
|
382
382
|
…
|
|
383
383
|
</Dock>
|
|
384
384
|
|
|
385
|
-
// Your own markup: spread the bindings.
|
|
386
|
-
|
|
387
|
-
|
|
385
|
+
// Your own markup: spread the bindings. Destructure them: the React compiler treats an object
|
|
386
|
+
// carrying a `ref` as a ref, so reading `dock.style` during render counts as a ref access.
|
|
387
|
+
const { ref, style, handleProps } = useDock({ id: "assists", corner: "bottom-right", position, onPositionChange: save, touch: false, clamp: { margin: 0, minVisible: { width: 120, height: 32 } } });
|
|
388
|
+
<div ref={ref} style={style}><button {...handleProps}>pill</button></div>
|
|
388
389
|
|
|
389
390
|
// Hand every dock the host's storage (declared keys, per-user sync).
|
|
390
391
|
<DockProvider store={{ read: (id) => …, write: (id, position) => … }}>…</DockProvider>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-matrx/summon",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Render any React component by dispatch and never mount it until it is needed: single or multi instance, handles for callbacks and refs beside Redux, keep-alive and saved component state, address-bar links bound to data, optional persistence, and a full windowing desktop in the browser.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -245,5 +245,5 @@
|
|
|
245
245
|
"check:package": "pnpm build && node ../scripts/check-exports-agreement.mjs && publint && pnpm verify:tarball && node ../scripts/check-tarball-relative-imports.mjs --self-test && node ../scripts/check-tarball-relative-imports.mjs --pack . && node ../scripts/check-package-rules.mjs --self-test && node ../scripts/check-package-rules.mjs .",
|
|
246
246
|
"verify:tarball": "node scripts/verify-tarball.mjs"
|
|
247
247
|
},
|
|
248
|
-
"gitHead": "
|
|
248
|
+
"gitHead": "cf8dd92752e4786c7e33ba18b1286653da430390"
|
|
249
249
|
}
|