@xmachines/play-dom 6.0.0 → 7.0.0

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/dist/types.d.ts CHANGED
@@ -13,9 +13,9 @@ export type { UIProviderOptions } from "@xmachines/json-render-dom";
13
13
  * The options of `PlayRenderer`.
14
14
  *
15
15
  * This type extends {@link UIProviderOptions}, which gives `functions`,
16
- * `directives`, `validationFunctions`, `navigate`, and `onRenderError`. Each render
17
- * pass puts all of them into `DomRenderContext`, and a component implementation
18
- * reads them at `ctx.ctx.*`.
16
+ * `directives`, `validationFunctions`, `navigate`, `onRenderError`, `onConfirm`, and
17
+ * `confirmDialog`. Each render pass puts them into `DomRenderContext`, and a component
18
+ * implementation reads them at `ctx.ctx.*`.
19
19
  */
20
20
  export interface PlayDomOptions extends UIProviderOptions {
21
21
  /**
@@ -48,23 +48,27 @@ export interface PlayDomOptions extends UIProviderOptions {
48
48
  */
49
49
  loading?: boolean;
50
50
  /**
51
- * The optional handler of a failure of a complete rebuild of the view.
51
+ * The optional handler of a failure of the view: a failure of the root, or of a
52
+ * complete rebuild.
52
53
  *
53
54
  * This option is NOT the same as `onRenderError`, which {@link UIProviderOptions}
54
- * gives: the inner renderer routes a render error of one component, and a rejection
55
- * of one action handler, to `onRenderError`. It contains each of them per element,
56
- * and the rebuild continues. `onError` receives the failure of the complete rebuild
57
- * that no per-element boundary caught.
58
- *
59
- * The renderer CONTAINS a rebuild that throws, with this option and without it: it
60
- * resets the state of the failed rebuild, so that the next emission makes a complete
61
- * render again, and it clears the container. `connect()` renders the first view
62
- * synchronously, so a bad initial view makes `connect()` throw no more.
63
- *
64
- * A WRITE of the store takes the same path. The renderer resolves the props of every
65
- * element that the write touched, so a `$computed` function that throws on the new
66
- * state aborts that render too. The renderer contains such a failure as well, and the
67
- * action handler that wrote the state receives no exception.
55
+ * gives: the inner renderer routes a render error of one component below the root,
56
+ * and a rejection of one action handler, to `onRenderError`. It contains each of them
57
+ * per element, and the rest of the view stays. `onError` receives a failure that
58
+ * leaves no view: the component, a prop, or the `visible` condition of the ROOT
59
+ * throws, or the resolution of the store of the view throws. The inner renderer also
60
+ * gives a failure of the root to `onRenderError`, with `info.kind` `"root"`.
61
+ *
62
+ * The renderer CONTAINS such a failure, with this option and without it: it resets
63
+ * the state of the failed rebuild, so that the next emission makes a complete render
64
+ * again, and it clears the container. `connect()` renders the first view
65
+ * synchronously, and a bad initial view does not make `connect()` throw.
66
+ *
67
+ * A WRITE of the store takes the same path. The inner renderer shows the write at its
68
+ * commit point, a microtask after the write, and it resolves the props of every
69
+ * element that the write touched there. A `$computed` function of the root that throws
70
+ * on the new state fails the root. The renderer contains such a failure as well, and
71
+ * the action handler that wrote the state receives no exception.
68
72
  *
69
73
  * This option says WHERE the report goes. Without it, the renderer writes the
70
74
  * contained failure to `console.error`.
@@ -128,9 +132,9 @@ export interface PlayDomOptions extends UIProviderOptions {
128
132
  * The options of `createPlayUI()`, the complete DOM factory.
129
133
  *
130
134
  * This type extends {@link UIProviderOptions}, which gives `functions`,
131
- * `directives`, `validationFunctions`, `navigate`, and `onRenderError`. The factory
132
- * holds all of them from the moment of its creation, and it gives them to
133
- * `PlayRenderer` on every `mount()` call.
135
+ * `directives`, `validationFunctions`, `navigate`, `onRenderError`, `onConfirm`, and
136
+ * `confirmDialog`. The factory holds all of them from the moment of its creation, and
137
+ * it gives them to `PlayRenderer` on every `mount()` call.
134
138
  *
135
139
  * It also takes {@link PlayDomOptions.onError}, which the factory forwards without a
136
140
  * change: `PlayRenderer` owns it, and it receives every failure of a rebuild that the
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE1F,YAAY,EAA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AC;IAEnB;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+CG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,QAAQ,CAAC,EAAE,WAAW,GAAG,CAAC,MAAM,WAAW,CAAC,GAAG,IAAI,CAAC;CACpD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB,EAAE,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC;IAC9F;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,QAAQ,CAAC,EAAE,WAAW,GAAG,CAAC,MAAM,WAAW,CAAC,GAAG,IAAI,CAAC;CACpD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xmachines/play-dom",
3
- "version": "6.0.0",
3
+ "version": "7.0.0",
4
4
  "description": "Vanilla DOM renderer for XMachines Play architecture with atom-driven rendering",
5
5
  "keywords": [
6
6
  "actor",
@@ -47,32 +47,32 @@
47
47
  "test:coverage": "vitest run --coverage"
48
48
  },
49
49
  "dependencies": {
50
- "@xmachines/play-view": "6.0.0"
50
+ "@xmachines/play-view": "7.0.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@testing-library/jest-dom": "^7.0.1",
54
- "@types/node": "^26.6.2",
55
- "@vitest/browser-playwright": "^5.0.1",
56
- "@xmachines/core": "6.0.0",
57
- "@xmachines/json-render-core": "^0.21.0-xm.1",
58
- "@xmachines/json-render-dom": "^0.21.0-xm.1",
59
- "@xmachines/json-render-xstate": "^0.21.0-xm.1",
60
- "@xmachines/play-actor": "6.0.0",
61
- "@xmachines/play-atom": "6.0.0",
62
- "oxfmt": "^0.70.0",
63
- "oxlint": "^1.85.0",
54
+ "@types/node": "^26.6.4",
55
+ "@vitest/browser-playwright": "^5.0.3",
56
+ "@xmachines/core": "7.0.0",
57
+ "@xmachines/json-render-core": "0.21.0-xm.6",
58
+ "@xmachines/json-render-dom": "0.21.0-xm.6",
59
+ "@xmachines/json-render-xstate": "0.21.0-xm.6",
60
+ "@xmachines/play-actor": "7.0.0",
61
+ "@xmachines/play-atom": "7.0.0",
62
+ "oxfmt": "^0.71.0",
63
+ "oxlint": "^1.86.0",
64
64
  "typescript": "^5.9.3 || ^6.0.3",
65
- "vite": "^8.3.0",
66
- "vitest": "^5.0.1",
65
+ "vite": "^8.3.2",
66
+ "vitest": "^5.0.3",
67
67
  "xstate": "^5.33.0",
68
68
  "zod": "^4.6.5"
69
69
  },
70
70
  "peerDependencies": {
71
- "@xmachines/core": "6.0.0",
72
- "@xmachines/json-render-core": "^0.21.0-xm.1",
73
- "@xmachines/json-render-dom": "^0.21.0-xm.1",
74
- "@xmachines/json-render-xstate": "^0.21.0-xm.1",
75
- "@xmachines/play-atom": "6.0.0"
71
+ "@xmachines/core": "7.0.0",
72
+ "@xmachines/json-render-core": "0.21.0-xm.6",
73
+ "@xmachines/json-render-dom": "0.21.0-xm.6",
74
+ "@xmachines/json-render-xstate": "0.21.0-xm.6",
75
+ "@xmachines/play-atom": "7.0.0"
76
76
  },
77
77
  "engines": {
78
78
  "node": ">=24.0.0"
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,qCAAqC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAMnD,4FAA4F;AAC5F,OAAO,EACN,cAAc,EACd,UAAU,EACV,MAAM,EACN,wBAAwB,GACxB,MAAM,4BAA4B,CAAC"}
package/dist/types.js DELETED
@@ -1,10 +0,0 @@
1
- /**
2
- * types.ts — the type definitions of play-dom that belong to XMachines.
3
- *
4
- * These types depend on @xmachines/play-view, and they stay in play-dom.
5
- * Each pure json-render type is in @xmachines/json-render-dom.
6
- *
7
- * @packageDocumentation
8
- */
9
- export {};
10
- //# sourceMappingURL=types.js.map
package/dist/types.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}