@isoloop/runtime 0.1.0-next.8 → 0.1.0-next.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/dist/bootstrap.js CHANGED
@@ -1354,12 +1354,12 @@ function createKeepAwake(now = () => performance.now()) {
1354
1354
  };
1355
1355
  }
1356
1356
  var init_keep_awake = __esmMin((() => {}));
1357
- // ../dom/dist/records-wVZrPpqr.js
1357
+ // ../dom/dist/records-qo23ZEsQ.js
1358
1358
  var ISOLOOP_DOM_FMT;
1359
- var init_records_wVZrPpqr = __esmMin((() => {
1359
+ var init_records_qo23ZEsQ = __esmMin((() => {
1360
1360
  ISOLOOP_DOM_FMT = "isoloop-dom@1";
1361
1361
  }));
1362
- // ../dom/dist/dom-BHxfO_GX.js
1362
+ // ../dom/dist/dom-N7iz67ez.js
1363
1363
  function createStyle(el) {
1364
1364
  const decls = /* @__PURE__ */ new Map();
1365
1365
  const write = () => {
@@ -1573,6 +1573,7 @@ function recorder(root, onBatch, schedule) {
1573
1573
  }
1574
1574
  };
1575
1575
  }
1576
+ /** @internal */
1576
1577
  function createDom(opts) {
1577
1578
  const schedule = opts.schedule ?? ((fn) => queueMicrotask(fn));
1578
1579
  const core = {
@@ -1651,7 +1652,7 @@ function toEvent(e) {
1651
1652
  return ev;
1652
1653
  }
1653
1654
  var HTML_NS, SVG_NS, str, domError, emit, WEventTarget, WNode, WCharacterData, WText, WComment, kebab, WDOMTokenList, dataAttr, dataKey, WParentNode, WDocumentFragment, WElement, HANDLER_EVENTS, MEASURE, ANIMATE, LAYOUT_METHODS, LAYOUT_PROPERTIES, layoutError, WHTMLElement, WSVGElement, WHTMLIFrameElement, WHTMLInputElement, WHTMLTextAreaElement, WHTMLSelectElement, WHTMLOptionElement, HTML_CLASSES, WDocument, isControl;
1654
- var init_dom_BHxfO_GX = __esmMin((() => {
1655
+ var init_dom_N7iz67ez = __esmMin((() => {
1655
1656
  HTML_NS = "http://www.w3.org/1999/xhtml";
1656
1657
  SVG_NS = "http://www.w3.org/2000/svg";
1657
1658
  str = (v) => typeof v === "string" ? v : typeof v === "number" || typeof v === "boolean" || typeof v === "bigint" ? String(v) : "";
@@ -2512,11 +2513,13 @@ var init_dom_BHxfO_GX = __esmMin((() => {
2512
2513
  defineHandlers(WDocument.prototype);
2513
2514
  isControl = (node) => node instanceof WHTMLInputElement || node instanceof WHTMLTextAreaElement || node instanceof WHTMLSelectElement;
2514
2515
  }));
2515
- // ../dom/dist/install-MjRUtHp6.js
2516
+ // ../dom/dist/install-B_iVdCC4.js
2516
2517
  /**
2517
2518
  * Exposes `dom` as the worker's `document`, `window` and DOM classes, so
2518
2519
  * frameworks find them where they look. Only for isolates with a surface; a
2519
2520
  * headless isolate never calls this.
2521
+ *
2522
+ * @internal
2520
2523
  */
2521
2524
  function install(dom, scope) {
2522
2525
  const define = (name, value) => {
@@ -2535,8 +2538,8 @@ function install(dom, scope) {
2535
2538
  dom.document.defaultView = scope;
2536
2539
  }
2537
2540
  var DOM_GLOBALS;
2538
- var init_install_MjRUtHp6 = __esmMin((() => {
2539
- init_dom_BHxfO_GX();
2541
+ var init_install_B_iVdCC4 = __esmMin((() => {
2542
+ init_dom_N7iz67ez();
2540
2543
  DOM_GLOBALS = {
2541
2544
  Node: WNode,
2542
2545
  Element: WElement,
@@ -2555,9 +2558,9 @@ var init_install_MjRUtHp6 = __esmMin((() => {
2555
2558
  }));
2556
2559
  // ../dom/dist/worker.js
2557
2560
  var init_worker = __esmMin((() => {
2558
- init_records_wVZrPpqr();
2559
- init_dom_BHxfO_GX();
2560
- init_install_MjRUtHp6();
2561
+ init_records_qo23ZEsQ();
2562
+ init_dom_N7iz67ez();
2563
+ init_install_B_iVdCC4();
2561
2564
  }));
2562
2565
  // src/render/index.ts
2563
2566
  function sharedDom(scope) {
@@ -2693,7 +2696,7 @@ var init_render = __esmMin((() => {
2693
2696
  headListeners = /* @__PURE__ */ new Set();
2694
2697
  }));
2695
2698
  // package.json
2696
- var version = "0.1.0-next.8";
2699
+ var version = "0.1.0-next.9";
2697
2700
  // src/vanilla.ts
2698
2701
  var vanilla_exports = /* @__PURE__ */ __exportAll({
2699
2702
  REQUIRES: () => REQUIRES,
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { a as defineIsolate, c as ScrollIntoViewOptionsLike, d as IsolateInspector, i as REQUIRES, l as BusClient, n as IsolateDefinition, o as HostApi, r as IsolateRoot, s as HostCallError, t as IsolateContext, u as SubscribeOptions } from "./vanilla-BB6MHSfu.js";
1
+ import { a as defineIsolate, c as ScrollIntoViewOptionsLike, d as SubscribeOptions, f as IsolateInspector, i as REQUIRES, l as BusClient, n as IsolateDefinition, o as HostApi, r as IsolateRoot, s as HostCallError, t as IsolateContext, u as RequestOptions } from "./vanilla-DVmrnAWd.js";
2
2
  import { BusError } from "@isoloop/protocol";
3
- export { type BusClient, BusError, type HostApi, HostCallError, type IsolateContext, type IsolateDefinition, type IsolateInspector, type IsolateRoot, REQUIRES, type ScrollIntoViewOptionsLike, type SubscribeOptions, defineIsolate };
3
+ export { type BusClient, BusError, type HostApi, HostCallError, type IsolateContext, type IsolateDefinition, type IsolateInspector, type IsolateRoot, REQUIRES, type RequestOptions, type ScrollIntoViewOptionsLike, type SubscribeOptions, defineIsolate };
package/dist/index.js CHANGED
@@ -11,8 +11,12 @@ var HostCallError = class extends Error {
11
11
  }
12
12
  };
13
13
  // src/vanilla.ts
14
- /** This build's stamp: `major.minor` of the package version, inlined when tsdown bundles it. */
15
- const REQUIRES = majorMinor("0.1.0-next.8") ?? "0.0";
14
+ /**
15
+ * This build's stamp: `major.minor` of the package version, inlined when tsdown bundles it.
16
+ *
17
+ * @internal
18
+ */
19
+ const REQUIRES = majorMinor("0.1.0-next.9") ?? "0.0";
16
20
  /**
17
21
  * Types an isolate module's default export and stamps it with the version
18
22
  * it was built against. `Root` defaults to the structural `IsolateRoot`.
package/dist/testing.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { o as HostApi, t as IsolateContext } from "./vanilla-BB6MHSfu.js";
1
+ import { o as HostApi, t as IsolateContext } from "./vanilla-DVmrnAWd.js";
2
2
  import { ShutdownReason } from "@isoloop/protocol";
3
3
  export type TestContextOptions = {
4
4
  id?: string;
@@ -38,7 +38,7 @@ type IsolateInspector = {
38
38
  */
39
39
  restart(id: string): Promise<void>;
40
40
  /**
41
- * Ends an isolate's worker as a crash (`worker-error`), so the supervisor
41
+ * Ends an isolate's worker as a crash (`worker_error`), so the supervisor
42
42
  * restarts it. For a pooled isolate that ends the pool's worker: every
43
43
  * member crashes and restarts, and the feed shows each one. Resolves once
44
44
  * the kill is sent, not when the isolate is back.
@@ -47,6 +47,13 @@ type IsolateInspector = {
47
47
  /** Busy-loops an isolate's worker for `ms`, at most 10 s. */
48
48
  block(id: string, ms: number): Promise<void>;
49
49
  };
50
+ /** `request`'s options. @experimental */
51
+ type RequestOptions = {
52
+ /** The request record's key. */
53
+ key?: string;
54
+ /** Default 30 s: the call rejects with `BusError('timeout')` after it. */
55
+ timeoutMs?: number;
56
+ };
50
57
  type SubscribeOptions = {
51
58
  /**
52
59
  * Default `latest`. With `group`, it applies only while the group has no
@@ -55,9 +62,9 @@ type SubscribeOptions = {
55
62
  * group is (ADR 0016, point 14).
56
63
  */
57
64
  from?: StartPosition;
58
- /** Share the topic with other subscribers of the same group: each record goes to one of them. */
65
+ /** Share the topic with other subscribers of the same group: each record goes to one of them. @experimental */
59
66
  group?: string;
60
- /** Default true: commit each record once its handler settles. */
67
+ /** Default true: commit each record once its handler settles. @experimental */
61
68
  autoCommit?: boolean;
62
69
  /**
63
70
  * A bus restart lost this memory topic (ADR 0007). Clear what was built
@@ -86,16 +93,18 @@ interface BusClient {
86
93
  * `timeoutMs` (default 30 s), or with `dropped` at once when the topic's
87
94
  * retention removed the request before the bus delivered it to any
88
95
  * subscriber.
96
+ * @experimental
97
+ */
98
+ request<In, ROut>(topic: TopicRef<In, any, any, ROut>, value: In, opts?: RequestOptions): Promise<ROut>;
99
+ /**
100
+ * Answers a request record delivered to this isolate; the broker checks `value` against the topic's `reply` schema.
101
+ * @experimental
89
102
  */
90
- request<In, ROut>(topic: TopicRef<In, any, any, ROut>, value: In, opts?: {
91
- key?: string;
92
- timeoutMs?: number;
93
- }): Promise<ROut>;
94
- /** Answers a request record delivered to this isolate; the broker checks `value` against the topic's `reply` schema. */
95
103
  reply(record: TypedRecord<unknown>, value: unknown): Promise<void>;
96
104
  /**
97
105
  * Commits a record by hand, for `autoCommit: false`: that record and every
98
106
  * one delivered before it on its subscription count as settled.
107
+ * @experimental
99
108
  */
100
109
  commit(record: TypedRecord<unknown>): void;
101
110
  }
@@ -210,11 +219,15 @@ type IsolateDefinition<Root = IsolateRoot> = {
210
219
  */
211
220
  requires?: string;
212
221
  };
213
- /** This build's stamp: `major.minor` of the package version, inlined when tsdown bundles it. */
222
+ /**
223
+ * This build's stamp: `major.minor` of the package version, inlined when tsdown bundles it.
224
+ *
225
+ * @internal
226
+ */
214
227
  declare const REQUIRES: string;
215
228
  /**
216
229
  * Types an isolate module's default export and stamps it with the version
217
230
  * it was built against. `Root` defaults to the structural `IsolateRoot`.
218
231
  */
219
232
  declare function defineIsolate<Root = IsolateRoot>(def: IsolateDefinition<Root>): IsolateDefinition<Root>;
220
- export { defineIsolate as a, ScrollIntoViewOptionsLike as c, IsolateInspector as d, REQUIRES as i, BusClient as l, IsolateDefinition as n, HostApi as o, IsolateRoot as r, HostCallError as s, IsolateContext as t, SubscribeOptions as u };
233
+ export { defineIsolate as a, ScrollIntoViewOptionsLike as c, SubscribeOptions as d, IsolateInspector as f, REQUIRES as i, BusClient as l, IsolateDefinition as n, HostApi as o, IsolateRoot as r, HostCallError as s, IsolateContext as t, RequestOptions as u };
package/dist/worker.js CHANGED
@@ -1336,12 +1336,12 @@ function createKeepAwake(now = () => performance.now()) {
1336
1336
  };
1337
1337
  }
1338
1338
  var init_keep_awake = __esmMin((() => {}));
1339
- // ../dom/dist/records-wVZrPpqr.js
1339
+ // ../dom/dist/records-qo23ZEsQ.js
1340
1340
  var ISOLOOP_DOM_FMT;
1341
- var init_records_wVZrPpqr = __esmMin((() => {
1341
+ var init_records_qo23ZEsQ = __esmMin((() => {
1342
1342
  ISOLOOP_DOM_FMT = "isoloop-dom@1";
1343
1343
  }));
1344
- // ../dom/dist/dom-BHxfO_GX.js
1344
+ // ../dom/dist/dom-N7iz67ez.js
1345
1345
  function createStyle(el) {
1346
1346
  const decls = /* @__PURE__ */ new Map();
1347
1347
  const write = () => {
@@ -1555,6 +1555,7 @@ function recorder(root, onBatch, schedule) {
1555
1555
  }
1556
1556
  };
1557
1557
  }
1558
+ /** @internal */
1558
1559
  function createDom(opts) {
1559
1560
  const schedule = opts.schedule ?? ((fn) => queueMicrotask(fn));
1560
1561
  const core = {
@@ -1633,7 +1634,7 @@ function toEvent(e) {
1633
1634
  return ev;
1634
1635
  }
1635
1636
  var HTML_NS, SVG_NS, str, domError, emit, WEventTarget, WNode, WCharacterData, WText, WComment, kebab, WDOMTokenList, dataAttr, dataKey, WParentNode, WDocumentFragment, WElement, HANDLER_EVENTS, MEASURE, ANIMATE, LAYOUT_METHODS, LAYOUT_PROPERTIES, layoutError, WHTMLElement, WSVGElement, WHTMLIFrameElement, WHTMLInputElement, WHTMLTextAreaElement, WHTMLSelectElement, WHTMLOptionElement, HTML_CLASSES, WDocument, isControl;
1636
- var init_dom_BHxfO_GX = __esmMin((() => {
1637
+ var init_dom_N7iz67ez = __esmMin((() => {
1637
1638
  HTML_NS = "http://www.w3.org/1999/xhtml";
1638
1639
  SVG_NS = "http://www.w3.org/2000/svg";
1639
1640
  str = (v) => typeof v === "string" ? v : typeof v === "number" || typeof v === "boolean" || typeof v === "bigint" ? String(v) : "";
@@ -2494,11 +2495,13 @@ var init_dom_BHxfO_GX = __esmMin((() => {
2494
2495
  defineHandlers(WDocument.prototype);
2495
2496
  isControl = (node) => node instanceof WHTMLInputElement || node instanceof WHTMLTextAreaElement || node instanceof WHTMLSelectElement;
2496
2497
  }));
2497
- // ../dom/dist/install-MjRUtHp6.js
2498
+ // ../dom/dist/install-B_iVdCC4.js
2498
2499
  /**
2499
2500
  * Exposes `dom` as the worker's `document`, `window` and DOM classes, so
2500
2501
  * frameworks find them where they look. Only for isolates with a surface; a
2501
2502
  * headless isolate never calls this.
2503
+ *
2504
+ * @internal
2502
2505
  */
2503
2506
  function install(dom, scope) {
2504
2507
  const define = (name, value) => {
@@ -2517,8 +2520,8 @@ function install(dom, scope) {
2517
2520
  dom.document.defaultView = scope;
2518
2521
  }
2519
2522
  var DOM_GLOBALS;
2520
- var init_install_MjRUtHp6 = __esmMin((() => {
2521
- init_dom_BHxfO_GX();
2523
+ var init_install_B_iVdCC4 = __esmMin((() => {
2524
+ init_dom_N7iz67ez();
2522
2525
  DOM_GLOBALS = {
2523
2526
  Node: WNode,
2524
2527
  Element: WElement,
@@ -2537,9 +2540,9 @@ var init_install_MjRUtHp6 = __esmMin((() => {
2537
2540
  }));
2538
2541
  // ../dom/dist/worker.js
2539
2542
  var init_worker = __esmMin((() => {
2540
- init_records_wVZrPpqr();
2541
- init_dom_BHxfO_GX();
2542
- init_install_MjRUtHp6();
2543
+ init_records_qo23ZEsQ();
2544
+ init_dom_N7iz67ez();
2545
+ init_install_B_iVdCC4();
2543
2546
  }));
2544
2547
  // src/render/index.ts
2545
2548
  function sharedDom(scope) {
@@ -2676,7 +2679,7 @@ var init_render = __esmMin((() => {
2676
2679
  headListeners = /* @__PURE__ */ new Set();
2677
2680
  }));
2678
2681
  // package.json
2679
- var version = "0.1.0-next.8";
2682
+ var version = "0.1.0-next.9";
2680
2683
  // src/vanilla.ts
2681
2684
  var vanilla_exports = /* @__PURE__ */ __exportAll({
2682
2685
  REQUIRES: () => REQUIRES,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isoloop/runtime",
3
- "version": "0.1.0-next.8",
3
+ "version": "0.1.0-next.9",
4
4
  "description": "Isolate-side runtime that runs inside each worker.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -35,8 +35,8 @@
35
35
  }
36
36
  },
37
37
  "dependencies": {
38
- "@isoloop/dom": "0.1.0-next.8",
39
- "@isoloop/protocol": "0.1.0-next.8"
38
+ "@isoloop/dom": "0.1.0-next.9",
39
+ "@isoloop/protocol": "0.1.0-next.9"
40
40
  },
41
41
  "devDependencies": {
42
42
  "typescript": "7.0.2"