@v-office/website-headless 0.0.1 → 0.0.2

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.
@@ -96,7 +96,10 @@ declare function buildSiteManifest(root: string): SiteManifest;
96
96
  *
97
97
  * Typed structurally so this package needs no astro or vite dependency.
98
98
  */
99
- declare function siteManifest(): {
99
+ /** Structural subset of Astro's `AstroIntegration`, so this package needs no
100
+ * astro dependency. `plugins` is `any[]`: Vite's `PluginOption` type must accept
101
+ * what we pass, and pinning Vite's types here would couple us to its versions. */
102
+ type SiteManifestIntegration = {
100
103
  name: string;
101
104
  hooks: {
102
105
  "astro:config:setup": (ctx: {
@@ -105,14 +108,15 @@ declare function siteManifest(): {
105
108
  };
106
109
  updateConfig: (cfg: {
107
110
  vite: {
108
- plugins: unknown[];
111
+ plugins: any[];
109
112
  };
110
- }) => void;
113
+ }) => unknown;
111
114
  }) => void;
112
115
  "astro:build:done": (ctx: {
113
116
  dir: URL;
114
117
  }) => void;
115
118
  };
116
119
  };
120
+ declare function siteManifest(): SiteManifestIntegration;
117
121
  //#endregion
118
- export { ComponentState, CrossCheck, ImportSets, PLATFORM_SURFACES, type PlatformSurface, SiteManifest, buildSiteManifest, collectImports, collectImportsFromCode, crossCheck, deriveComponentStates, emptyImports, renderedSurfaces, siteManifest };
122
+ export { ComponentState, CrossCheck, ImportSets, PLATFORM_SURFACES, type PlatformSurface, SiteManifest, SiteManifestIntegration, buildSiteManifest, collectImports, collectImportsFromCode, crossCheck, deriveComponentStates, emptyImports, renderedSurfaces, siteManifest };
@@ -217,14 +217,6 @@ function buildSiteManifest(root) {
217
217
  components: deriveComponentStates(collectImports(root))
218
218
  };
219
219
  }
220
- /**
221
- * The Astro integration:
222
- *
223
- * import { siteManifest } from "@v-office/website-headless/manifest";
224
- * integrations: [react(), siteManifest()]
225
- *
226
- * Typed structurally so this package needs no astro or vite dependency.
227
- */
228
220
  function siteManifest() {
229
221
  let root = process.cwd();
230
222
  const bundled = emptyImports();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@v-office/website-headless",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Framework-free behavior layer for v-office websites, never UI: the checkout flow as a subscribable store (createCheckoutFlow), validation and insurance rules, the checkout's structural requirements, the derived site-manifest Astro integration and progressive-enhancement engines for server-rendered markup",
5
5
  "files": [
6
6
  "dist",