@farm.js/islx 0.0.6 → 0.0.8

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/vite.d.mts CHANGED
@@ -42,9 +42,24 @@ interface IslxOptions {
42
42
  client?: string | ClientHooks;
43
43
  server?: string | ServerHooks;
44
44
  };
45
+ /**
46
+ * A client module without a `hydrate` export waits for a click when its code provably does
47
+ * nothing before one (`inferStrategy` in `@farm.js/islx/compiler`): a page of such islands loads
48
+ * the runtime only when one is used. Default true; false hydrates them at load.
49
+ */
50
+ infer?: boolean;
51
+ /**
52
+ * Pages start with a small boot script (`@farm.js/islx/boot`) instead of the browser entry,
53
+ * and load the entry when the page first needs it: at once when an island hydrates at load,
54
+ * otherwise on an island's trigger or a link. Default true; false starts every page with the
55
+ * entry.
56
+ */
57
+ boot?: boolean;
45
58
  }
46
59
  /** @internal The browser entry, for a framework whose own entry imports it. */
47
60
  declare const ENTRY_ID = "virtual:islx/client-entry";
61
+ /** The boot entry: pages start with it, and it loads ENTRY_ID when the page first needs it. */
62
+ declare const BOOT_ID = "virtual:islx/boot";
48
63
  /**
49
64
  * The source of a hooks module made from callbacks. Each callback is copied as written, so it
50
65
  * must not use anything from where it was written: an outside variable, an import.
@@ -73,4 +88,4 @@ interface IslxHost {
73
88
  frameworkBuild?: boolean;
74
89
  }
75
90
  declare function islx(options?: IslxOptions, host?: IslxHost): Plugin[];
76
- export { ENTRY_ID, IslxHost, IslxOptions, islx as default, islx, resolveDirectives, serializeHooks };
91
+ export { BOOT_ID, ENTRY_ID, IslxHost, IslxOptions, islx as default, islx, resolveDirectives, serializeHooks };
package/dist/vite.mjs CHANGED
@@ -1 +1 @@
1
- export { t as ENTRY_ID, n as default, n as islx, r as resolveDirectives, i as serializeHooks } from "./_chunks/vite-BTzYlEiY.mjs";
1
+ export { t as BOOT_ID, n as ENTRY_ID, r as default, r as islx, i as resolveDirectives, a as serializeHooks } from "./_chunks/vite-0bH_ZDys.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farm.js/islx",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "A renderer-agnostic wire format for server-rendered islands: typed props, values sent once, server actions, and partial navigations.",
5
5
  "keywords": [
6
6
  "islands",
@@ -39,6 +39,10 @@
39
39
  "types": "./dist/client.d.mts",
40
40
  "default": "./dist/client.mjs"
41
41
  },
42
+ "./boot": {
43
+ "types": "./dist/boot.d.mts",
44
+ "default": "./dist/boot.mjs"
45
+ },
42
46
  "./server": {
43
47
  "types": "./dist/server.d.mts",
44
48
  "default": "./dist/server.mjs"