@moku-labs/web 1.16.0 → 1.16.1

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.
@@ -871,7 +871,7 @@ type Api$1 = {
871
871
  composeTitle(head: HeadConfig | undefined): string;
872
872
  };
873
873
  declare namespace types_d_exports$4 {
874
- export { COMPONENT_HOOK_NAMES, ComponentContext, ComponentDef, ComponentEventHandler, ComponentEvents, ComponentHooks, ComponentInstance, ComponentRender, ComponentRouteSlice, ComponentSpec, ComponentSpecExtras, ComponentStateFactory, ExtractApi, PageData, RenderResult, ResolvedSpaConfig, SpaApi, SpaConfig, SpaContext, SpaDataReader, SpaEmitFunction, SpaEvents, SpaKernel, SpaKernelDeps, SpaRequire, SpaState };
874
+ export { AnyVNode, COMPONENT_HOOK_NAMES, ComponentContext, ComponentDef, ComponentEventHandler, ComponentEvents, ComponentHooks, ComponentInstance, ComponentRender, ComponentRouteSlice, ComponentSpec, ComponentSpecExtras, ComponentStateFactory, ExtractApi, PageData, RenderResult, ResolvedSpaConfig, SpaApi, SpaConfig, SpaContext, SpaDataReader, SpaEmitFunction, SpaEvents, SpaKernel, SpaKernelDeps, SpaRequire, SpaState };
875
875
  }
876
876
  /** Payload map for the events `spa` emits, used to type the kernel's `emit` closure. */
877
877
  type SpaEvents = {
@@ -978,7 +978,13 @@ interface ResolvedSpaConfig {
978
978
  * - a `string` — set as the host's `innerHTML`;
979
979
  * - `void`/`undefined` — the render mutated the DOM itself (DOM-only islands → no Preact loaded).
980
980
  */
981
- type RenderResult = import("preact").VNode | Node | string | void;
981
+ type RenderResult = AnyVNode | Node | string | void;
982
+ /**
983
+ * A Preact `VNode` of ANY props shape. A render returns `h(Component, props)`, i.e. a
984
+ * `VNode<SomeProps>`; the props generic is invariant under `exactOptionalPropertyTypes`,
985
+ * so the only supertype that accepts every concrete `VNode<P>` is `VNode<any>`.
986
+ */
987
+ type AnyVNode = import("preact").VNode<any>;
982
988
  /**
983
989
  * Factory that builds a component's typed per-instance state (mirrors a plugin's
984
990
  * `createState`). Called ONCE at mount; the returned object is stored on the
package/dist/browser.mjs CHANGED
@@ -2518,6 +2518,13 @@ const COMPONENT_HOOK_NAMES = [
2518
2518
  ];
2519
2519
  //#endregion
2520
2520
  //#region src/plugins/spa/components.ts
2521
+ /**
2522
+ * @file spa plugin — component lifecycle, mounting, the plugin-mirror authoring
2523
+ * surface (`createComponent` with a typed `{ state, render, events, api }` spec),
2524
+ * the per-instance state + microtask-batched render scheduler, declarative
2525
+ * delegated events, and the cross-island api registry.
2526
+ * @see README.md
2527
+ */
2521
2528
  /** Error prefix for spa fail-fast failures (spec/11 Part-3). */
2522
2529
  const ERROR_PREFIX$2 = "[web]";
2523
2530
  /** The set of legal hook names, frozen for O(1) membership checks. */
package/dist/index.cjs CHANGED
@@ -9204,6 +9204,13 @@ const COMPONENT_HOOK_NAMES = [
9204
9204
  ];
9205
9205
  //#endregion
9206
9206
  //#region src/plugins/spa/components.ts
9207
+ /**
9208
+ * @file spa plugin — component lifecycle, mounting, the plugin-mirror authoring
9209
+ * surface (`createComponent` with a typed `{ state, render, events, api }` spec),
9210
+ * the per-instance state + microtask-batched render scheduler, declarative
9211
+ * delegated events, and the cross-island api registry.
9212
+ * @see README.md
9213
+ */
9207
9214
  /** Error prefix for spa fail-fast failures (spec/11 Part-3). */
9208
9215
  const ERROR_PREFIX$2 = "[web]";
9209
9216
  /** The set of legal hook names, frozen for O(1) membership checks. */
package/dist/index.d.cts CHANGED
@@ -872,7 +872,7 @@ type Api$4 = {
872
872
  composeTitle(head: HeadConfig | undefined): string;
873
873
  };
874
874
  declare namespace types_d_exports$7 {
875
- export { COMPONENT_HOOK_NAMES, ComponentContext, ComponentDef, ComponentEventHandler, ComponentEvents, ComponentHooks, ComponentInstance, ComponentRender, ComponentRouteSlice, ComponentSpec, ComponentSpecExtras, ComponentStateFactory, ExtractApi$1 as ExtractApi, PageData, RenderResult, ResolvedSpaConfig, SpaApi, SpaConfig, SpaContext, SpaDataReader, SpaEmitFunction, SpaEvents, SpaKernel, SpaKernelDeps, SpaRequire, SpaState };
875
+ export { AnyVNode, COMPONENT_HOOK_NAMES, ComponentContext, ComponentDef, ComponentEventHandler, ComponentEvents, ComponentHooks, ComponentInstance, ComponentRender, ComponentRouteSlice, ComponentSpec, ComponentSpecExtras, ComponentStateFactory, ExtractApi$1 as ExtractApi, PageData, RenderResult, ResolvedSpaConfig, SpaApi, SpaConfig, SpaContext, SpaDataReader, SpaEmitFunction, SpaEvents, SpaKernel, SpaKernelDeps, SpaRequire, SpaState };
876
876
  }
877
877
  /** Payload map for the events `spa` emits, used to type the kernel's `emit` closure. */
878
878
  type SpaEvents = {
@@ -979,7 +979,13 @@ interface ResolvedSpaConfig {
979
979
  * - a `string` — set as the host's `innerHTML`;
980
980
  * - `void`/`undefined` — the render mutated the DOM itself (DOM-only islands → no Preact loaded).
981
981
  */
982
- type RenderResult = import("preact").VNode | Node | string | void;
982
+ type RenderResult = AnyVNode | Node | string | void;
983
+ /**
984
+ * A Preact `VNode` of ANY props shape. A render returns `h(Component, props)`, i.e. a
985
+ * `VNode<SomeProps>`; the props generic is invariant under `exactOptionalPropertyTypes`,
986
+ * so the only supertype that accepts every concrete `VNode<P>` is `VNode<any>`.
987
+ */
988
+ type AnyVNode = import("preact").VNode<any>;
983
989
  /**
984
990
  * Factory that builds a component's typed per-instance state (mirrors a plugin's
985
991
  * `createState`). Called ONCE at mount; the returned object is stored on the
package/dist/index.d.mts CHANGED
@@ -870,7 +870,7 @@ type Api$4 = {
870
870
  composeTitle(head: HeadConfig | undefined): string;
871
871
  };
872
872
  declare namespace types_d_exports$7 {
873
- export { COMPONENT_HOOK_NAMES, ComponentContext, ComponentDef, ComponentEventHandler, ComponentEvents, ComponentHooks, ComponentInstance, ComponentRender, ComponentRouteSlice, ComponentSpec, ComponentSpecExtras, ComponentStateFactory, ExtractApi$1 as ExtractApi, PageData, RenderResult, ResolvedSpaConfig, SpaApi, SpaConfig, SpaContext, SpaDataReader, SpaEmitFunction, SpaEvents, SpaKernel, SpaKernelDeps, SpaRequire, SpaState };
873
+ export { AnyVNode, COMPONENT_HOOK_NAMES, ComponentContext, ComponentDef, ComponentEventHandler, ComponentEvents, ComponentHooks, ComponentInstance, ComponentRender, ComponentRouteSlice, ComponentSpec, ComponentSpecExtras, ComponentStateFactory, ExtractApi$1 as ExtractApi, PageData, RenderResult, ResolvedSpaConfig, SpaApi, SpaConfig, SpaContext, SpaDataReader, SpaEmitFunction, SpaEvents, SpaKernel, SpaKernelDeps, SpaRequire, SpaState };
874
874
  }
875
875
  /** Payload map for the events `spa` emits, used to type the kernel's `emit` closure. */
876
876
  type SpaEvents = {
@@ -977,7 +977,13 @@ interface ResolvedSpaConfig {
977
977
  * - a `string` — set as the host's `innerHTML`;
978
978
  * - `void`/`undefined` — the render mutated the DOM itself (DOM-only islands → no Preact loaded).
979
979
  */
980
- type RenderResult = import("preact").VNode | Node | string | void;
980
+ type RenderResult = AnyVNode | Node | string | void;
981
+ /**
982
+ * A Preact `VNode` of ANY props shape. A render returns `h(Component, props)`, i.e. a
983
+ * `VNode<SomeProps>`; the props generic is invariant under `exactOptionalPropertyTypes`,
984
+ * so the only supertype that accepts every concrete `VNode<P>` is `VNode<any>`.
985
+ */
986
+ type AnyVNode = import("preact").VNode<any>;
981
987
  /**
982
988
  * Factory that builds a component's typed per-instance state (mirrors a plugin's
983
989
  * `createState`). Called ONCE at mount; the returned object is stored on the
package/dist/index.mjs CHANGED
@@ -9191,6 +9191,13 @@ const COMPONENT_HOOK_NAMES = [
9191
9191
  ];
9192
9192
  //#endregion
9193
9193
  //#region src/plugins/spa/components.ts
9194
+ /**
9195
+ * @file spa plugin — component lifecycle, mounting, the plugin-mirror authoring
9196
+ * surface (`createComponent` with a typed `{ state, render, events, api }` spec),
9197
+ * the per-instance state + microtask-batched render scheduler, declarative
9198
+ * delegated events, and the cross-island api registry.
9199
+ * @see README.md
9200
+ */
9194
9201
  /** Error prefix for spa fail-fast failures (spec/11 Part-3). */
9195
9202
  const ERROR_PREFIX$2 = "[web]";
9196
9203
  /** The set of legal hook names, frozen for O(1) membership checks. */
@@ -6,7 +6,13 @@
6
6
  * - a `string` — set as the host's `innerHTML`;
7
7
  * - `void`/`undefined` — the render mutated the DOM itself (DOM-only islands → no Preact loaded).
8
8
  */
9
- type RenderResult = import("preact").VNode | Node | string | void;
9
+ type RenderResult = AnyVNode | Node | string | void;
10
+ /**
11
+ * A Preact `VNode` of ANY props shape. A render returns `h(Component, props)`, i.e. a
12
+ * `VNode<SomeProps>`; the props generic is invariant under `exactOptionalPropertyTypes`,
13
+ * so the only supertype that accepts every concrete `VNode<P>` is `VNode<any>`.
14
+ */
15
+ type AnyVNode = import("preact").VNode<any>;
10
16
  /**
11
17
  * Factory that builds a component's typed per-instance state (mirrors a plugin's
12
18
  * `createState`). Called ONCE at mount; the returned object is stored on the
package/dist/testing.mjs CHANGED
@@ -12,6 +12,13 @@ const COMPONENT_HOOK_NAMES = [
12
12
  ];
13
13
  //#endregion
14
14
  //#region src/plugins/spa/components.ts
15
+ /**
16
+ * @file spa plugin — component lifecycle, mounting, the plugin-mirror authoring
17
+ * surface (`createComponent` with a typed `{ state, render, events, api }` spec),
18
+ * the per-instance state + microtask-batched render scheduler, declarative
19
+ * delegated events, and the cross-island api registry.
20
+ * @see README.md
21
+ */
15
22
  /** Error prefix for spa fail-fast failures (spec/11 Part-3). */
16
23
  const ERROR_PREFIX = "[web]";
17
24
  new Set(COMPONENT_HOOK_NAMES);
package/package.json CHANGED
@@ -132,5 +132,5 @@
132
132
  "test:build-e2e": "bun test src/plugins/build/__tests__/e2e/",
133
133
  "test:coverage": "vitest run --project unit --project integration --coverage"
134
134
  },
135
- "version": "1.16.0"
135
+ "version": "1.16.1"
136
136
  }