@stealthscale/vite-plugin-product 0.1.0 → 0.3.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.
package/README.md CHANGED
@@ -5,6 +5,10 @@ checks every installed plugin against the others, serves the resolved product as
5
5
  builds each plugin's lazy modules into a chunk of its own, and writes the catalogues the product's
6
6
  services read.
7
7
 
8
+ For a product whose page loads plugins at run time, `provided()` provides the product's shared
9
+ modules to those plugins. `release()` builds a plugin's web package as a release that such a page
10
+ loads.
11
+
8
12
  ## Install
9
13
 
10
14
  ```bash
@@ -20,9 +24,10 @@ beside the layers of `@stealthscale/vite-config-i18n`.
20
24
  The product states its plugins in `src/product.ts`, whose default export is the definition:
21
25
 
22
26
  ```ts
23
- import { defineProduct, installed } from "@stealthscale/sdk-core";
24
27
  import { manifest as timeOff } from "@acme/plugin-time-off";
25
28
 
29
+ import { defineProduct, installed } from "@stealthscale/sdk-core";
30
+
26
31
  export default defineProduct({
27
32
  name: "product.name",
28
33
  plugins: [installed(timeOff)],
@@ -37,15 +42,22 @@ The application reads the resolved product from `virtual:product`:
37
42
  import { product } from "virtual:product";
38
43
  ```
39
44
 
45
+ The module writes the resolved data as a literal. It reads two members from the definition module.
46
+ `manifests` contains each installed plugin's manifest, and `code` contains the importers of the
47
+ product's own frame and of its sources. The module also exports `definition`, which a page that
48
+ loads releases resolves again with them.
49
+
40
50
  Add the module's type with a triple-slash directive from a file the project compiles:
41
51
 
42
52
  ```ts
43
53
  /// <reference types="@stealthscale/vite-plugin-product/client" />
44
54
  ```
45
55
 
46
- `product({ definition })` names another module. `src/product.ts` is the default.
56
+ `product({ definition })` names another module. `src/product.ts` is the default. `product({ app })`
57
+ serves the product's page, described in [The product's page](#the-products-page).
47
58
  `product({ standalone })` serves the standalone page of a plugin, described in
48
- [The standalone page](#the-standalone-page).
59
+ [The standalone page](#the-standalone-page). `product({ runtime: true })` marks a product whose page
60
+ loads releases, described in [Releases at run time](#releases-at-run-time).
49
61
 
50
62
  ## The composition
51
63
 
@@ -65,7 +77,7 @@ When a build or a dev server starts, the plugin composes the product:
65
77
  namespace, and the packages that publish each one. The plugin's contract package and the
66
78
  application's own catalogues are left out of the publishers.
67
79
  5. It calls `resolveProduct` with the definition, the web packages, the words and the
68
- `validateHotkey` of `@tanstack/hotkeys` 0.10.0, the version `@tanstack/react-hotkeys` binds keys
80
+ `validateHotkey` of `@tanstack/hotkeys` 0.11.0, the version `@tanstack/react-hotkeys` binds keys
69
81
  with.
70
82
 
71
83
  A configuration without the `stealth:i18n` plugin fails the build and names
@@ -86,11 +98,32 @@ object as its default export fails and names the file.
86
98
 
87
99
  ## Chunks
88
100
 
89
- The plugin adds one code-splitting group, at priority 4: above the shared group and below the vendor
90
- group of `@stealthscale/vite-config`. The group assigns every module of an installed plugin's web
91
- package to the chunk `plugin-<id>`, so each plugin's pages, extensions, commands and settings
92
- sections build into one chunk. A module that an entry imports statically is left out of the group.
93
- The web package's main entry and its manifest load with the entry chunk.
101
+ The plugin adds two code-splitting groups to a build, and the first of them to a dev server.
102
+
103
+ The plugins' group, at priority 4, is above the shared group and below the vendor group of
104
+ `@stealthscale/vite-config`. It builds each plugin's pages, extensions, commands and settings
105
+ sections into one chunk, `plugin-<id>`:
106
+
107
+ - Every module of an installed plugin's web package goes into the plugin's chunk, unless an entry or
108
+ `virtual:product` imports it statically. The web package's main entry and its manifest load with
109
+ the product.
110
+ - A module outside every web package that only one plugin's modules import goes into that plugin's
111
+ chunk too.
112
+ - A module that an entry or `virtual:product` imports statically, or that the modules of two plugins
113
+ import, goes to the other groups.
114
+
115
+ The dependencies' group, at priority 1, is below every other group. It builds each module outside
116
+ the application that the other groups leave into the chunk `dependencies`, where the module's static
117
+ importers lead to an entry, to `virtual:product` or to an installed plugin's web package. A module
118
+ of the application is a file under the project root and outside its `node_modules`, and the group
119
+ leaves out virtual modules. A module that only another `import()` loads, such as a page the
120
+ application loads on demand, keeps its own chunk, so it does not load with the startup.
121
+
122
+ Groups that place a module by its path alone make rolldown 1.2 build a module the groups leave into
123
+ the chunk of a lazy module that imports it, and export the module from there. `import()` of the lazy
124
+ module then returns the other module's exports as well, and the host refuses a module that exports
125
+ more than one function. Under a dev server `import()` returns the module's own exports, so the
126
+ dependencies' group applies to a build alone.
94
127
 
95
128
  ## Catalogues
96
129
 
@@ -115,7 +148,8 @@ again:
115
148
  - Under a dev server that bundles, `watchChange` reloads the page. `virtual:product` lists every
116
149
  composition file as a watched file, so the rebuild loads it again.
117
150
  - A composition with problems shows them in the error overlay and keeps the last product that
118
- resolved.
151
+ resolved. A page that connects while the product does not resolve, such as the page a bundling
152
+ server reloads after the change, receives the problems too.
119
153
  - One composition runs at a time, in the order of the changes. The changes reported during a
120
154
  composition compose the product once more after it ends.
121
155
  - Every composition imports the definition through one environment, which the plugin closes when the
@@ -124,6 +158,30 @@ again:
124
158
 
125
159
  A watching build composes the product again at its next build start.
126
160
 
161
+ ## The product's page
162
+
163
+ `product({ app })` serves the page of a product that renders with the host's frame. A product adds
164
+ it through `product.app()` of `@stealthscale/vite-config-product`, which adds the stylesheet
165
+ compiler beside it.
166
+
167
+ - The plugin serves the page's document as `index.html` at the project root, and its entry as
168
+ `virtual:product-app`. The document's language is the product's first locale, `en-US` without one.
169
+ Its title is the product's id, which `HostProvider` replaces with the product's name.
170
+ - The entry imports `@stealthscale/theme/styles.css`. It loads `@stealthscale/sdk-host/app`,
171
+ `virtual:i18n`, `virtual:product`, `virtual:stealth-themes` and the module `glyphs` names through
172
+ `import()`, then calls `renderProduct`. The stylesheet compiler of
173
+ `@stealthscale/vite-plugin-theme` serves `virtual:stealth-themes`.
174
+ - Under `runtime`, the entry loads `@stealthscale/sdk-host/releases` in place of
175
+ `@stealthscale/sdk-host/app`, and calls `renderDeployed` with the definition beside the product.
176
+ - The configuration's `base` becomes the router's base path where it is a path other than `/`, such
177
+ as `/docs/`. A relative base and a URL give none.
178
+ - A server that bundles serves the document from its bundle at every address without a file. Under a
179
+ server that serves one module per file, a middleware of the plugin serves the document after the
180
+ server's fallback rewrites such an address to `/index.html`.
181
+ - The document and the entry watch every file the composition read, so the document follows a change
182
+ to the definition's locales.
183
+ - `product({ app, standalone })` throws, because both pages serve `index.html`.
184
+
127
185
  ## The standalone page
128
186
 
129
187
  `product({ standalone })` serves a plugin's standalone page from the plugin's own web package. The
@@ -152,6 +210,66 @@ it under a dev server alone.
152
210
  - A server that bundles serves the document at every address without a file on disk. A server that
153
211
  serves one module per file reads `index.html` from disk, so it does not serve the page.
154
212
 
213
+ ## Releases at run time
214
+
215
+ `provided()` provides a product's shared modules to the releases its page loads. A product adds it
216
+ through `product.app({ runtime: true })` or `product.layers({ runtime: true })` of
217
+ `@stealthscale/vite-config-product`. It applies to a build alone, so a dev server's page loads no
218
+ release.
219
+
220
+ - The provided packages are `react` with `react/jsx-runtime` and `react/compiler-runtime`,
221
+ `react-dom`, the SDK, the providers, `settings`, `hooks`, `theme`, every component package, the
222
+ TanStack libraries that the providers wrap, `i18next`, `react-i18next`, and five Zag modules:
223
+ `@zag-js/dismissable`, `@zag-js/focus-visible`, `@zag-js/focus-trap`, `@zag-js/aria-hidden` and
224
+ `@zag-js/remove-scroll`. A product provides each of them that is on its dependency graph.
225
+ - An `@stealthscale` package's specifiers are the subpaths of its `exports`, except `./testing`,
226
+ `./theme`, `./package.json` and the stylesheets.
227
+ - The client build emits one entry per provided specifier under `assets/provided/`, which re-exports
228
+ the package. The entry of an ES module exports `*` and its default export. The entry of a CommonJS
229
+ module exports the names that Node's `require` returns.
230
+ - The client build runs a first build of the same configuration without the entries, and records the
231
+ chunk of each module. The first build keeps every export of each module of a provided package that
232
+ states its side effects, because the entries make the second build keep them. It also records the
233
+ modules that those exports import. The second build places each recorded module in the chunk of
234
+ the same name, and each recorded CommonJS module in a chunk beside it, named with `-cjs`. Rolldown
235
+ builds the code that only the entries need into chunks that only the entries import.
236
+ - The build writes `.product/provided.json`. The file contains the URL of each provided entry and
237
+ the URLs of the chunks that the entry imports, without the chunks of the page's startup. It also
238
+ contains the installed version of each provided package and the page's fallback `language`. The
239
+ build writes the import map of the provided specifiers before the page's module scripts.
240
+ - The configuration needs the `stealth:i18n` plugin, because the build reads the page's fallback
241
+ language from it.
242
+
243
+ ## A plugin's release
244
+
245
+ `release()` builds a plugin's web package as a release that a page loads at run time. A plugin adds
246
+ it through `product.release()` of `@stealthscale/vite-config-product`, and `vite build` writes the
247
+ release into `dist-release` (`RELEASE_DIRECTORY`).
248
+
249
+ | File | Contains |
250
+ | ------------------------- | -------------------------------------------------------------------------------------------------------------------- |
251
+ | `manifest.js` | The manifest module with its export names, and the modules it shares with its lazy modules |
252
+ | `assets/*.js` | The modules the manifest imports lazily and the modules they share, each with a hash in its name |
253
+ | `locales/<language>.json` | The plugin's catalogue in each language |
254
+ | `plugin.json` | The plugin's id and version, its languages, its requirements, each file's integrity and each module's static imports |
255
+
256
+ - The release is a library build whose one entry is the manifest module, `src/manifest.ts` unless
257
+ `manifest` names another. The build defines `process.env.NODE_ENV` from its mode and minifies.
258
+ - Rolldown builds a module that the manifest shares with a lazy module into `manifest.js`, which
259
+ exports it beside `manifest`. The page then imports the manifest with one request.
260
+ - The build calls each lazy import in the release through `preloaded` of `@stealthscale/sdk-core`.
261
+ It rewrites `import("./x.js")` as `preloaded(import.meta.url, "./x.js", () => import("./x.js"))`.
262
+ The page then preloads the static imports of the module while the module loads. The build imports
263
+ `preloaded` under the name `__stealth_preloaded__`, and it fails on a module that already uses
264
+ that name.
265
+ - The build keeps every import of a provided specifier as an import by name. `requires` lists the
266
+ package of each such import, at the caret range of the installed version: `^0.2.0` for 0.2.3.
267
+ - The build reads the plugin's id from the manifest module's `manifest` export, which it evaluates
268
+ in Node.
269
+ - The build fails on an import of a provided package through a specifier that the page does not map,
270
+ on a stylesheet or any other file that is not a module, and on a preset that declares a recipe.
271
+ - The configuration needs the `stealth:i18n` plugin, whose catalogues the release contains.
272
+
155
273
  ## Licence
156
274
 
157
275
  MIT. See [LICENSE](LICENSE).
package/client.d.ts CHANGED
@@ -8,7 +8,13 @@
8
8
  */
9
9
 
10
10
  declare module "virtual:product" {
11
- import { type Product } from "@stealthscale/sdk-core";
11
+ import { type Product, type ProductDefinition } from "@stealthscale/sdk-core";
12
+
13
+ /**
14
+ * The product's definition, which a page that loads releases resolves again with the releases'
15
+ * plugins.
16
+ */
17
+ export const definition: ProductDefinition;
12
18
 
13
19
  /**
14
20
  * The product as the build resolved it, with each installed plugin's manifest.
@@ -1 +1 @@
1
- {"$schema":"http://cyclonedx.org/schema/bom-1.7.schema.json","bomFormat":"CycloneDX","specVersion":"1.7","version":1,"metadata":{"lifecycles":[{"phase":"build"}],"tools":{"components":[{"type":"application","name":"rolldown","version":"1.2.11"},{"type":"application","name":"vite","version":"8.3.1"},{"type":"library","name":"core","group":"@arethetypeswrong","version":"0.18.5","bom-ref":"pkg:npm/%40arethetypeswrong/core@0.18.5","author":"Andrew Branch","description":"The API behind arethetypeswrong.github.io","hashes":[{"alg":"SHA-512","content":"f72b63cc6c318e6f54cfb23d6af7dbb79be542deae93db914444b3263aabce797a58abc8e9dc184e8faf277534d96aeafe64778aa97f3f386f1e129d2480230d"}],"licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/%40arethetypeswrong/core@0.18.5","externalReferences":[{"url":"https://github.com/arethetypeswrong/arethetypeswrong.github.io.git#packages/core","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""}],"properties":[{"name":"cdx:npm:package:constraint:engine:node","value":">=20"}]},{"type":"library","name":"sdk-core","group":"@stealthscale","version":"0.1.0","bom-ref":"pkg:npm/%40stealthscale/sdk-core@0.1.0","description":"Declares the contracts and manifests of plugins, evaluates their conditions, and resolves a product from them, without loading another package at run time.","licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/%40stealthscale/sdk-core@0.1.0","externalReferences":[{"url":"https://github.com/stealth-scale/scale/issues","type":"issue-tracker","comment":"as detected from PackageJson property \"bugs\""},{"url":"git+https://github.com/stealth-scale/scale.git#sdk/core","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""},{"url":"https://github.com/stealth-scale/scale/tree/main/sdk/core#readme","type":"website","comment":"as detected from PackageJson property \"homepage\""}],"properties":[{"name":"cdx:npm:package:constraint:engine:node","value":">=26.0.0"}]},{"type":"library","name":"testing-config","group":"@stealthscale","version":"0.5.0","bom-ref":"pkg:npm/%40stealthscale/testing-config@0.5.0","description":"Lists every part of the house contract a config, plugin or library package breaks.","licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/%40stealthscale/testing-config@0.5.0","externalReferences":[{"url":"https://github.com/stealth-scale/scale/issues","type":"issue-tracker","comment":"as detected from PackageJson property \"bugs\""},{"url":"git+https://github.com/stealth-scale/scale.git#packages/testing-config","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""},{"url":"https://github.com/stealth-scale/scale/tree/main/packages/testing-config#readme","type":"website","comment":"as detected from PackageJson property \"homepage\""}],"properties":[{"name":"cdx:npm:package:constraint:engine:node","value":">=26.0.0"}]},{"type":"library","name":"testing","group":"@stealthscale","version":"0.3.0","bom-ref":"pkg:npm/%40stealthscale/testing@0.3.0","description":"Supplies the scratch workspaces, manifests, element measurements and plugin drivers a specification needs.","licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/%40stealthscale/testing@0.3.0","externalReferences":[{"url":"git+https://github.com/stealth-scale/scale.git#packages/testing","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""}],"properties":[{"name":"cdx:npm:package:constraint:engine:node","value":">=26.0.0"}]},{"type":"library","name":"vite-config-typescript","group":"@stealthscale","version":"0.3.0","bom-ref":"pkg:npm/%40stealthscale/vite-config-typescript@0.3.0","description":"Sets the TypeScript options every stealthscale package compiles with.","licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/%40stealthscale/vite-config-typescript@0.3.0","externalReferences":[{"url":"https://github.com/stealth-scale/scale/issues","type":"issue-tracker","comment":"as detected from PackageJson property \"bugs\""},{"url":"git+https://github.com/stealth-scale/scale.git#packages/vite-config-typescript","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""},{"url":"https://github.com/stealth-scale/scale/tree/main/packages/vite-config-typescript#readme","type":"website","comment":"as detected from PackageJson property \"homepage\""}],"properties":[{"name":"cdx:npm:package:constraint:engine:node","value":">=26.0.0"}]},{"type":"library","name":"vite-config","group":"@stealthscale","version":"0.6.0","bom-ref":"pkg:npm/%40stealthscale/vite-config@0.6.0","description":"Configures a package from five Vite+ tiers and a named layer for every block.","licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/%40stealthscale/vite-config@0.6.0","externalReferences":[{"url":"https://github.com/stealth-scale/scale/issues","type":"issue-tracker","comment":"as detected from PackageJson property \"bugs\""},{"url":"git+https://github.com/stealth-scale/scale.git#packages/vite-config","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""},{"url":"https://github.com/stealth-scale/scale/tree/main/packages/vite-config#readme","type":"website","comment":"as detected from PackageJson property \"homepage\""}],"properties":[{"name":"cdx:npm:package:constraint:engine:node","value":">=26.0.0"}]},{"type":"library","name":"vite-plugin-base","group":"@stealthscale","version":"0.2.0","bom-ref":"pkg:npm/%40stealthscale/vite-plugin-base@0.2.0","description":"Turns a name and one write step into a bundler plugin that reads the module graph.","licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/%40stealthscale/vite-plugin-base@0.2.0","externalReferences":[{"url":"https://github.com/stealth-scale/scale/issues","type":"issue-tracker","comment":"as detected from PackageJson property \"bugs\""},{"url":"git+https://github.com/stealth-scale/scale.git#packages/vite-plugin-base","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""},{"url":"https://github.com/stealth-scale/scale/tree/main/packages/vite-plugin-base#readme","type":"website","comment":"as detected from PackageJson property \"homepage\""}],"properties":[{"name":"cdx:npm:package:constraint:engine:node","value":">=26.0.0"}]},{"type":"library","name":"vite-plugin-i18n","group":"@stealthscale","version":"0.1.0","bom-ref":"pkg:npm/%40stealthscale/vite-plugin-i18n@0.1.0","description":"Finds every catalogue an application can reach, types their keys, and answers the module it loads them from.","licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/%40stealthscale/vite-plugin-i18n@0.1.0","externalReferences":[{"url":"https://github.com/stealth-scale/scale/issues","type":"issue-tracker","comment":"as detected from PackageJson property \"bugs\""},{"url":"git+https://github.com/stealth-scale/scale.git#packages/vite-plugin-i18n","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""},{"url":"https://github.com/stealth-scale/scale/tree/main/packages/vite-plugin-i18n#readme","type":"website","comment":"as detected from PackageJson property \"homepage\""}],"properties":[{"name":"cdx:npm:package:constraint:engine:node","value":">=26.0.0"}]},{"type":"library","name":"node","group":"@types","version":"26.6.3","bom-ref":"pkg:npm/%40types/node@26.6.3","description":"TypeScript definitions for node","hashes":[{"alg":"SHA-512","content":"76ca8c410a1e4cbaaef70ca70c3d34ab9ef798dceca3721d40e01f1d126a2c27260853e81a8f40d5b0e951cbfff6d9caa44ad05aff6e29e19f977ec4212d3662"}],"licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/%40types/node@26.6.3","externalReferences":[{"url":"https://github.com/DefinitelyTyped/DefinitelyTyped.git#types/node","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""},{"url":"https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node","type":"website","comment":"as detected from PackageJson property \"homepage\""}]},{"type":"library","name":"coverage-v8","group":"@vitest","version":"5.0.1","bom-ref":"pkg:npm/%40vitest/coverage-v8@5.0.1","author":"Anthony Fu <anthonyfu117@hotmail.com>","description":"V8 coverage provider for Vitest","hashes":[{"alg":"SHA-512","content":"1510bc0028ae742ddd23a313a65cd14985870d19c8bf620f7dbcece0576824db0c6a5ff7e6c595f21c087d5f1972acd23f2fae5c778c54e36df4212ab4e535ef"}],"licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/%40vitest/coverage-v8@5.0.1","externalReferences":[{"url":"https://github.com/vitest-dev/vitest/issues","type":"issue-tracker","comment":"as detected from PackageJson property \"bugs.url\""},{"url":"git+https://github.com/vitest-dev/vitest.git#packages/coverage-v8","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""},{"url":"https://vitest.dev/guide/coverage","type":"website","comment":"as detected from PackageJson property \"homepage\""}]},{"type":"library","name":"vite-plus-core","group":"@voidzero-dev","version":"1.0.0","bom-ref":"pkg:npm/%40voidzero-dev/vite-plus-core@1.0.0","author":"VoidZero Inc.","description":"The Unified Toolchain for the Web","licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/%40voidzero-dev/vite-plus-core@1.0.0","externalReferences":[{"url":"https://github.com/voidzero-dev/vite-plus/issues","type":"issue-tracker","comment":"as detected from PackageJson property \"bugs.url\""},{"url":"git+https://github.com/voidzero-dev/vite-plus.git#packages/core","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""},{"url":"https://viteplus.dev/guide","type":"website","comment":"as detected from PackageJson property \"homepage\""}],"properties":[{"name":"cdx:npm:package:constraint:engine:node","value":"^20.19.0 || ^22.18.0 || >=24.11.0"}]},{"type":"library","name":"typescript","version":"7.0.2","bom-ref":"pkg:npm/typescript@7.0.2","author":"Microsoft Corp.","description":"TypeScript is a language for application scale JavaScript development","hashes":[{"alg":"SHA-512","content":"f0561abbdea8dcd28e85b8ca8bfa8dbc6fd6e63873c646dd9b9b23f406d9ff94f9b16aa7de12602df1b1dbbb11299593bf2cc23fc74b4414dfe6d05349155434"}],"licenses":[{"license":{"id":"Apache-2.0"}}],"purl":"pkg:npm/typescript@7.0.2","externalReferences":[{"url":"https://github.com/microsoft/TypeScript/issues","type":"issue-tracker","comment":"as detected from PackageJson property \"bugs.url\""},{"url":"https://github.com/microsoft/TypeScript.git","type":"vcs","comment":"as detected from PackageJson property \"repository.url\""},{"url":"https://www.typescriptlang.org/","type":"website","comment":"as detected from PackageJson property \"homepage\""}],"properties":[{"name":"cdx:npm:package:constraint:engine:node","value":">=16.20.0"}]},{"type":"library","name":"vitest","version":"5.0.1","bom-ref":"pkg:npm/vitest@5.0.1","author":"Anthony Fu <anthonyfu117@hotmail.com>","description":"Next generation testing framework powered by Vite","hashes":[{"alg":"SHA-512","content":"880f799506ca124bebb5391d0209d66d77db8a95a28967bf8439763f9b4c8ba585c03efa1b43715c01a9fccf4439c62ea5e18946beb0a6931cec2a00e354d08e"}],"licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/vitest@5.0.1","externalReferences":[{"url":"https://github.com/vitest-dev/vitest/issues","type":"issue-tracker","comment":"as detected from PackageJson property \"bugs.url\""},{"url":"git+https://github.com/vitest-dev/vitest.git#packages/vitest","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""},{"url":"https://vitest.dev","type":"website","comment":"as detected from PackageJson property \"homepage\""}],"properties":[{"name":"cdx:npm:package:constraint:engine:node","value":"^22.12.0 || ^24.0.0 || >=26.0.0"}]}]},"component":{"type":"library","name":"vite-plugin-product","group":"@stealthscale","version":"0.1.0","bom-ref":"pkg:npm/%40stealthscale/vite-plugin-product@0.1.0","description":"Composes a product from its plugins while it builds: checks every plugin against the others, resolves the product, and serves it as virtual:product.","licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/%40stealthscale/vite-plugin-product@0.1.0","externalReferences":[{"url":"https://github.com/stealth-scale/scale/issues","type":"issue-tracker","comment":"as detected from PackageJson property \"bugs\""},{"url":"git+https://github.com/stealth-scale/scale.git#packages/vite-plugin-product","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""},{"url":"https://github.com/stealth-scale/scale/tree/main/packages/vite-plugin-product#readme","type":"website","comment":"as detected from PackageJson property \"homepage\""}],"properties":[{"name":"cdx:npm:package:constraint:engine:node","value":">=26.0.0"}],"evidence":{"licenses":[{"license":{"name":"file: LICENSE","text":{"content":"TUlUIExpY2Vuc2UKCkNvcHlyaWdodCAoYykgMjAyNiBTdGVhbHRoIFNjYWxlIEIuVi4KClBlcm1pc3Npb24gaXMgaGVyZWJ5IGdyYW50ZWQsIGZyZWUgb2YgY2hhcmdlLCB0byBhbnkgcGVyc29uIG9idGFpbmluZyBhIGNvcHkKb2YgdGhpcyBzb2Z0d2FyZSBhbmQgYXNzb2NpYXRlZCBkb2N1bWVudGF0aW9uIGZpbGVzICh0aGUgIlNvZnR3YXJlIiksIHRvIGRlYWwKaW4gdGhlIFNvZnR3YXJlIHdpdGhvdXQgcmVzdHJpY3Rpb24sIGluY2x1ZGluZyB3aXRob3V0IGxpbWl0YXRpb24gdGhlIHJpZ2h0cwp0byB1c2UsIGNvcHksIG1vZGlmeSwgbWVyZ2UsIHB1Ymxpc2gsIGRpc3RyaWJ1dGUsIHN1YmxpY2Vuc2UsIGFuZC9vciBzZWxsCmNvcGllcyBvZiB0aGUgU29mdHdhcmUsIGFuZCB0byBwZXJtaXQgcGVyc29ucyB0byB3aG9tIHRoZSBTb2Z0d2FyZSBpcwpmdXJuaXNoZWQgdG8gZG8gc28sIHN1YmplY3QgdG8gdGhlIGZvbGxvd2luZyBjb25kaXRpb25zOgoKVGhlIGFib3ZlIGNvcHlyaWdodCBub3RpY2UgYW5kIHRoaXMgcGVybWlzc2lvbiBub3RpY2Ugc2hhbGwgYmUgaW5jbHVkZWQgaW4gYWxsCmNvcGllcyBvciBzdWJzdGFudGlhbCBwb3J0aW9ucyBvZiB0aGUgU29mdHdhcmUuCgpUSEUgU09GVFdBUkUgSVMgUFJPVklERUQgIkFTIElTIiwgV0lUSE9VVCBXQVJSQU5UWSBPRiBBTlkgS0lORCwgRVhQUkVTUyBPUgpJTVBMSUVELCBJTkNMVURJTkcgQlVUIE5PVCBMSU1JVEVEIFRPIFRIRSBXQVJSQU5USUVTIE9GIE1FUkNIQU5UQUJJTElUWSwKRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UgQU5EIE5PTklORlJJTkdFTUVOVC4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFCkFVVEhPUlMgT1IgQ09QWVJJR0hUIEhPTERFUlMgQkUgTElBQkxFIEZPUiBBTlkgQ0xBSU0sIERBTUFHRVMgT1IgT1RIRVIKTElBQklMSVRZLCBXSEVUSEVSIElOIEFOIEFDVElPTiBPRiBDT05UUkFDVCwgVE9SVCBPUiBPVEhFUldJU0UsIEFSSVNJTkcgRlJPTSwKT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgU09GVFdBUkUgT1IgVEhFIFVTRSBPUiBPVEhFUiBERUFMSU5HUyBJTiBUSEUKU09GVFdBUkUuCg==","contentType":"text/plain","encoding":"base64"}}}]}},"supplier":{"name":"Stealth Scale B.V.","url":["https://stealthscale.io"]}},"components":[],"dependencies":[{"ref":"pkg:npm/%40stealthscale/vite-plugin-product@0.1.0"}]}
1
+ {"$schema":"http://cyclonedx.org/schema/bom-1.7.schema.json","bomFormat":"CycloneDX","specVersion":"1.7","version":1,"metadata":{"lifecycles":[{"phase":"build"}],"tools":{"components":[{"type":"application","name":"rolldown","version":"1.2.12"},{"type":"application","name":"vite","version":"8.3.3"},{"type":"library","name":"core","group":"@arethetypeswrong","version":"0.18.5","bom-ref":"pkg:npm/%40arethetypeswrong/core@0.18.5","author":"Andrew Branch","description":"The API behind arethetypeswrong.github.io","hashes":[{"alg":"SHA-512","content":"f72b63cc6c318e6f54cfb23d6af7dbb79be542deae93db914444b3263aabce797a58abc8e9dc184e8faf277534d96aeafe64778aa97f3f386f1e129d2480230d"}],"licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/%40arethetypeswrong/core@0.18.5","externalReferences":[{"url":"https://github.com/arethetypeswrong/arethetypeswrong.github.io.git#packages/core","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""}],"properties":[{"name":"cdx:npm:package:constraint:engine:node","value":">=20"}]},{"type":"library","name":"sdk-core","group":"@stealthscale","version":"0.3.0","bom-ref":"pkg:npm/%40stealthscale/sdk-core@0.3.0","description":"Declares the contracts and manifests of plugins, evaluates their conditions, and resolves a product from them, without loading another package at run time.","licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/%40stealthscale/sdk-core@0.3.0","externalReferences":[{"url":"https://github.com/stealth-scale/scale/issues","type":"issue-tracker","comment":"as detected from PackageJson property \"bugs\""},{"url":"git+https://github.com/stealth-scale/scale.git#sdk/core","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""},{"url":"https://github.com/stealth-scale/scale/tree/main/sdk/core#readme","type":"website","comment":"as detected from PackageJson property \"homepage\""}],"properties":[{"name":"cdx:npm:package:constraint:engine:node","value":">=26.0.0"}]},{"type":"library","name":"testing-config","group":"@stealthscale","version":"0.6.0","bom-ref":"pkg:npm/%40stealthscale/testing-config@0.6.0","description":"Lists every part of the house contract a config, plugin or library package breaks.","licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/%40stealthscale/testing-config@0.6.0","externalReferences":[{"url":"https://github.com/stealth-scale/scale/issues","type":"issue-tracker","comment":"as detected from PackageJson property \"bugs\""},{"url":"git+https://github.com/stealth-scale/scale.git#packages/testing-config","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""},{"url":"https://github.com/stealth-scale/scale/tree/main/packages/testing-config#readme","type":"website","comment":"as detected from PackageJson property \"homepage\""}],"properties":[{"name":"cdx:npm:package:constraint:engine:node","value":">=26.0.0"}]},{"type":"library","name":"testing","group":"@stealthscale","version":"0.4.0","bom-ref":"pkg:npm/%40stealthscale/testing@0.4.0","description":"Supplies the scratch workspaces, manifests, element measurements and plugin drivers a specification needs.","licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/%40stealthscale/testing@0.4.0","externalReferences":[{"url":"git+https://github.com/stealth-scale/scale.git#packages/testing","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""}],"properties":[{"name":"cdx:npm:package:constraint:engine:node","value":">=26.0.0"}]},{"type":"library","name":"vite-config-typescript","group":"@stealthscale","version":"0.3.0","bom-ref":"pkg:npm/%40stealthscale/vite-config-typescript@0.3.0","description":"Sets the TypeScript options every stealthscale package compiles with.","licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/%40stealthscale/vite-config-typescript@0.3.0","externalReferences":[{"url":"https://github.com/stealth-scale/scale/issues","type":"issue-tracker","comment":"as detected from PackageJson property \"bugs\""},{"url":"git+https://github.com/stealth-scale/scale.git#packages/vite-config-typescript","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""},{"url":"https://github.com/stealth-scale/scale/tree/main/packages/vite-config-typescript#readme","type":"website","comment":"as detected from PackageJson property \"homepage\""}],"properties":[{"name":"cdx:npm:package:constraint:engine:node","value":">=26.0.0"}]},{"type":"library","name":"vite-config","group":"@stealthscale","version":"0.8.0","bom-ref":"pkg:npm/%40stealthscale/vite-config@0.8.0","description":"Configures a package from five Vite+ tiers and a named layer for every block.","licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/%40stealthscale/vite-config@0.8.0","externalReferences":[{"url":"https://github.com/stealth-scale/scale/issues","type":"issue-tracker","comment":"as detected from PackageJson property \"bugs\""},{"url":"git+https://github.com/stealth-scale/scale.git#packages/vite-config","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""},{"url":"https://github.com/stealth-scale/scale/tree/main/packages/vite-config#readme","type":"website","comment":"as detected from PackageJson property \"homepage\""}],"properties":[{"name":"cdx:npm:package:constraint:engine:node","value":">=26.0.0"}]},{"type":"library","name":"vite-plugin-base","group":"@stealthscale","version":"0.5.0","bom-ref":"pkg:npm/%40stealthscale/vite-plugin-base@0.5.0","description":"Turns a name and one write step into a bundler plugin that reads the module graph.","licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/%40stealthscale/vite-plugin-base@0.5.0","externalReferences":[{"url":"https://github.com/stealth-scale/scale/issues","type":"issue-tracker","comment":"as detected from PackageJson property \"bugs\""},{"url":"git+https://github.com/stealth-scale/scale.git#packages/vite-plugin-base","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""},{"url":"https://github.com/stealth-scale/scale/tree/main/packages/vite-plugin-base#readme","type":"website","comment":"as detected from PackageJson property \"homepage\""}],"properties":[{"name":"cdx:npm:package:constraint:engine:node","value":">=26.0.0"}]},{"type":"library","name":"vite-plugin-i18n","group":"@stealthscale","version":"0.3.2","bom-ref":"pkg:npm/%40stealthscale/vite-plugin-i18n@0.3.2","description":"Finds every catalogue an application can reach, types their keys, and answers the module it loads them from.","licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/%40stealthscale/vite-plugin-i18n@0.3.2","externalReferences":[{"url":"https://github.com/stealth-scale/scale/issues","type":"issue-tracker","comment":"as detected from PackageJson property \"bugs\""},{"url":"git+https://github.com/stealth-scale/scale.git#packages/vite-plugin-i18n","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""},{"url":"https://github.com/stealth-scale/scale/tree/main/packages/vite-plugin-i18n#readme","type":"website","comment":"as detected from PackageJson property \"homepage\""}],"properties":[{"name":"cdx:npm:package:constraint:engine:node","value":">=26.0.0"}]},{"type":"library","name":"node","group":"@types","version":"26.6.4","bom-ref":"pkg:npm/%40types/node@26.6.4","description":"TypeScript definitions for node","hashes":[{"alg":"SHA-512","content":"95d54f0c2ce3edfb1a199acb07436e1ee4ef25cb0d6accac040a8ca25aff720c6b2ddd716eac48af75c988f9c71c9502c63e6c345d6f9d18fd6969eb561e4972"}],"licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/%40types/node@26.6.4","externalReferences":[{"url":"https://github.com/DefinitelyTyped/DefinitelyTyped.git#types/node","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""},{"url":"https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node","type":"website","comment":"as detected from PackageJson property \"homepage\""}]},{"type":"library","name":"coverage-v8","group":"@vitest","version":"5.0.3","bom-ref":"pkg:npm/%40vitest/coverage-v8@5.0.3","author":"Anthony Fu <anthonyfu117@hotmail.com>","description":"V8 coverage provider for Vitest","hashes":[{"alg":"SHA-512","content":"fa496ccb3ec1bd3d6f094dbc6647f39acd486bbf170f4578d54dc552d45a6b74bebceaff117bcad4ee81bd50fb9754731239ba48e351d9ac9b3af0c37fdbb499"}],"licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/%40vitest/coverage-v8@5.0.3","externalReferences":[{"url":"https://github.com/vitest-dev/vitest/issues","type":"issue-tracker","comment":"as detected from PackageJson property \"bugs.url\""},{"url":"git+https://github.com/vitest-dev/vitest.git#packages/coverage-v8","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""},{"url":"https://vitest.dev/guide/coverage","type":"website","comment":"as detected from PackageJson property \"homepage\""}]},{"type":"library","name":"vite-plus-core","group":"@voidzero-dev","version":"1.1.0","bom-ref":"pkg:npm/%40voidzero-dev/vite-plus-core@1.1.0","author":"VoidZero Inc.","description":"The Unified Toolchain for the Web","licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/%40voidzero-dev/vite-plus-core@1.1.0","externalReferences":[{"url":"https://github.com/voidzero-dev/vite-plus/issues","type":"issue-tracker","comment":"as detected from PackageJson property \"bugs.url\""},{"url":"git+https://github.com/voidzero-dev/vite-plus.git#packages/core","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""},{"url":"https://viteplus.dev/guide","type":"website","comment":"as detected from PackageJson property \"homepage\""}],"properties":[{"name":"cdx:npm:package:constraint:engine:node","value":"^20.19.0 || ^22.18.0 || >=24.11.0"}]},{"type":"library","name":"typescript","version":"7.0.2","bom-ref":"pkg:npm/typescript@7.0.2","author":"Microsoft Corp.","description":"TypeScript is a language for application scale JavaScript development","hashes":[{"alg":"SHA-512","content":"f0561abbdea8dcd28e85b8ca8bfa8dbc6fd6e63873c646dd9b9b23f406d9ff94f9b16aa7de12602df1b1dbbb11299593bf2cc23fc74b4414dfe6d05349155434"}],"licenses":[{"license":{"id":"Apache-2.0"}}],"purl":"pkg:npm/typescript@7.0.2","externalReferences":[{"url":"https://github.com/microsoft/TypeScript/issues","type":"issue-tracker","comment":"as detected from PackageJson property \"bugs.url\""},{"url":"https://github.com/microsoft/TypeScript.git","type":"vcs","comment":"as detected from PackageJson property \"repository.url\""},{"url":"https://www.typescriptlang.org/","type":"website","comment":"as detected from PackageJson property \"homepage\""}],"properties":[{"name":"cdx:npm:package:constraint:engine:node","value":">=16.20.0"}]},{"type":"library","name":"vitest","version":"5.0.3","bom-ref":"pkg:npm/vitest@5.0.3","author":"Anthony Fu <anthonyfu117@hotmail.com>","description":"Next generation testing framework powered by Vite","hashes":[{"alg":"SHA-512","content":"c4cc3ded2deb8ddb63e5d9156adee30aca96069bdc86cdd196941cb54ab0243d0a904464e34bf3d9f27bee50f05bf57387fa64d7c788b5803392876149eb378d"}],"licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/vitest@5.0.3","externalReferences":[{"url":"https://github.com/vitest-dev/vitest/issues","type":"issue-tracker","comment":"as detected from PackageJson property \"bugs.url\""},{"url":"git+https://github.com/vitest-dev/vitest.git#packages/vitest","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""},{"url":"https://vitest.dev","type":"website","comment":"as detected from PackageJson property \"homepage\""}],"properties":[{"name":"cdx:npm:package:constraint:engine:node","value":"^22.12.0 || ^24.0.0 || >=26.0.0"}]}]},"component":{"type":"library","name":"vite-plugin-product","group":"@stealthscale","version":"0.3.1","bom-ref":"pkg:npm/%40stealthscale/vite-plugin-product@0.3.1","description":"Composes a product from its plugins while it builds: checks every plugin against the others, resolves the product, and serves it as virtual:product.","licenses":[{"license":{"id":"MIT"}}],"purl":"pkg:npm/%40stealthscale/vite-plugin-product@0.3.1","externalReferences":[{"url":"https://github.com/stealth-scale/scale/issues","type":"issue-tracker","comment":"as detected from PackageJson property \"bugs\""},{"url":"git+https://github.com/stealth-scale/scale.git#packages/vite-plugin-product","type":"vcs","comment":"as detected from PackageJson property \"repository.url\" and \"repository.directory\""},{"url":"https://github.com/stealth-scale/scale/tree/main/packages/vite-plugin-product#readme","type":"website","comment":"as detected from PackageJson property \"homepage\""}],"properties":[{"name":"cdx:npm:package:constraint:engine:node","value":">=26.0.0"}],"evidence":{"licenses":[{"license":{"name":"file: LICENSE","text":{"content":"TUlUIExpY2Vuc2UKCkNvcHlyaWdodCAoYykgMjAyNiBTdGVhbHRoIFNjYWxlIEIuVi4KClBlcm1pc3Npb24gaXMgaGVyZWJ5IGdyYW50ZWQsIGZyZWUgb2YgY2hhcmdlLCB0byBhbnkgcGVyc29uIG9idGFpbmluZyBhIGNvcHkKb2YgdGhpcyBzb2Z0d2FyZSBhbmQgYXNzb2NpYXRlZCBkb2N1bWVudGF0aW9uIGZpbGVzICh0aGUgIlNvZnR3YXJlIiksIHRvIGRlYWwKaW4gdGhlIFNvZnR3YXJlIHdpdGhvdXQgcmVzdHJpY3Rpb24sIGluY2x1ZGluZyB3aXRob3V0IGxpbWl0YXRpb24gdGhlIHJpZ2h0cwp0byB1c2UsIGNvcHksIG1vZGlmeSwgbWVyZ2UsIHB1Ymxpc2gsIGRpc3RyaWJ1dGUsIHN1YmxpY2Vuc2UsIGFuZC9vciBzZWxsCmNvcGllcyBvZiB0aGUgU29mdHdhcmUsIGFuZCB0byBwZXJtaXQgcGVyc29ucyB0byB3aG9tIHRoZSBTb2Z0d2FyZSBpcwpmdXJuaXNoZWQgdG8gZG8gc28sIHN1YmplY3QgdG8gdGhlIGZvbGxvd2luZyBjb25kaXRpb25zOgoKVGhlIGFib3ZlIGNvcHlyaWdodCBub3RpY2UgYW5kIHRoaXMgcGVybWlzc2lvbiBub3RpY2Ugc2hhbGwgYmUgaW5jbHVkZWQgaW4gYWxsCmNvcGllcyBvciBzdWJzdGFudGlhbCBwb3J0aW9ucyBvZiB0aGUgU29mdHdhcmUuCgpUSEUgU09GVFdBUkUgSVMgUFJPVklERUQgIkFTIElTIiwgV0lUSE9VVCBXQVJSQU5UWSBPRiBBTlkgS0lORCwgRVhQUkVTUyBPUgpJTVBMSUVELCBJTkNMVURJTkcgQlVUIE5PVCBMSU1JVEVEIFRPIFRIRSBXQVJSQU5USUVTIE9GIE1FUkNIQU5UQUJJTElUWSwKRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UgQU5EIE5PTklORlJJTkdFTUVOVC4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFCkFVVEhPUlMgT1IgQ09QWVJJR0hUIEhPTERFUlMgQkUgTElBQkxFIEZPUiBBTlkgQ0xBSU0sIERBTUFHRVMgT1IgT1RIRVIKTElBQklMSVRZLCBXSEVUSEVSIElOIEFOIEFDVElPTiBPRiBDT05UUkFDVCwgVE9SVCBPUiBPVEhFUldJU0UsIEFSSVNJTkcgRlJPTSwKT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgU09GVFdBUkUgT1IgVEhFIFVTRSBPUiBPVEhFUiBERUFMSU5HUyBJTiBUSEUKU09GVFdBUkUuCg==","contentType":"text/plain","encoding":"base64"}}}]}},"supplier":{"name":"Stealth Scale B.V.","url":["https://stealthscale.io"]}},"components":[],"dependencies":[{"ref":"pkg:npm/%40stealthscale/vite-plugin-product@0.3.1"}]}
package/dist/index.d.mts CHANGED
@@ -1,5 +1,17 @@
1
1
  import { Plugin } from "vite";
2
2
  import "@stealthscale/sdk-core";
3
+ //#region src/app.d.ts
4
+ /**
5
+ * Lists what a product's page renders with beside the product, its words and its themes.
6
+ */
7
+ interface AppPage {
8
+ /**
9
+ * Path of a module, from the project root, whose `glyphs` export the forms of the product's
10
+ * settings render with. Lucide's glyphs where left out.
11
+ */
12
+ readonly glyphs?: string | undefined;
13
+ }
14
+ //#endregion
3
15
  //#region src/module.d.ts
4
16
  /**
5
17
  * The specifier an application imports the product from.
@@ -45,11 +57,22 @@ interface StandalonePage {
45
57
  * Lists the options of the product plugin.
46
58
  */
47
59
  export interface ProductOptions {
60
+ /**
61
+ * The product's page, which the plugin serves as `index.html` with an entry that renders the
62
+ * product with the host's frame. No page where left out.
63
+ */
64
+ readonly app?: AppPage | undefined;
48
65
  /**
49
66
  * Path of the module whose default export is the product's definition, from the project root.
50
67
  * `src/product.ts` by default, and the generated definition under `standalone`.
51
68
  */
52
69
  readonly definition?: string | undefined;
70
+ /**
71
+ * True for a product whose page loads plugin releases at run time. The page's entry then renders
72
+ * with `renderDeployed` and passes the definition, and the product's layers add `provided()`
73
+ * beside this plugin. False where left out.
74
+ */
75
+ readonly runtime?: boolean | undefined;
53
76
  /**
54
77
  * The standalone page of a plugin, which the plugin serves at every address without a file. No
55
78
  * page where left out.
@@ -67,12 +90,70 @@ export interface ProductOptions {
67
90
  * resolves, and `virtual:product` then fails with the problems. A change to a file the
68
91
  * composition read composes the product again: the page reloads, or shows the problems in the
69
92
  * error overlay and keeps the last product. The client build writes the catalogues under
70
- * `.product` in its output. Under `standalone`, the plugin writes the definition of the product
71
- * that runs the plugin at `node_modules/.stealth/standalone/product.ts` once the configuration
72
- * resolves, unless `definition` names one. It serves the page's document as `index.html`, its
73
- * entry as `virtual:standalone`, and the generated definition as `virtual:standalone-product`.
74
- * @param options - The definition's path, and the standalone page.
93
+ * `.product` in its output. Under `app`, the plugin serves the product's document as
94
+ * `index.html` and its entry as `virtual:product-app`, which renders the product with
95
+ * `renderProduct`. A dev server that serves one module per file receives the document from a
96
+ * middleware. Under `standalone`, the plugin writes the definition of the product that runs the
97
+ * plugin at `node_modules/.stealth/standalone/product.ts` once the configuration resolves,
98
+ * unless `definition` names one. It serves the page's document as `index.html`, its entry as
99
+ * `virtual:standalone`, and the generated definition as `virtual:standalone-product`.
100
+ * @param options - The definition's path, and the product's page or the standalone page.
101
+ * @throws {@link Error} When the options name both pages, which both serve `index.html`.
75
102
  */
76
103
  export declare function product(options?: ProductOptions): Plugin;
77
104
  //#endregion
78
- export type { StandalonePage };
105
+ //#region src/provided/plugin.d.ts
106
+ /**
107
+ * Creates the plugin that provides the product's shared modules to the releases its page loads.
108
+ *
109
+ * @remarks
110
+ * The client build first runs a build of the same configuration without the facades. The first
111
+ * build keeps every export of each module of a provided package that it includes, as the facades
112
+ * make the client build keep them. A package qualifies where it states which of its files have
113
+ * side effects. The client build then builds each module of the first build into the chunk of the
114
+ * same name, and each CommonJS module into a chunk beside it. It emits each facade as an entry
115
+ * chunk that keeps its exports.
116
+ * A facade imports its specifier, and the plugin resolves the specifier from the package that
117
+ * depends on it, so the facade and the product share one module. Rolldown builds the code that
118
+ * only the facades need into chunks that only the facades import. The plugin writes
119
+ * `.product/provided.json` beside the page. The file contains the chunks that each facade imports
120
+ * and the page's fallback language. The plugin writes the import map before the module scripts of
121
+ * every document that the build writes.
122
+ */
123
+ export declare function provided(): Plugin;
124
+ //#endregion
125
+ //#region src/release/plugin.d.ts
126
+ /**
127
+ * Lists the options of the release plugin.
128
+ */
129
+ export interface ReleaseOptions {
130
+ /**
131
+ * Path from the package's directory to the module that exports the plugin's manifest. The plugin
132
+ * reads `src/manifest.ts` when the option is left out.
133
+ */
134
+ readonly manifest?: string | undefined;
135
+ }
136
+ /**
137
+ * Path from the package's directory to the directory that the build writes a release to. The
138
+ * directory is beside `dist`, because a pack empties `dist` before it writes.
139
+ */
140
+ export declare const RELEASE_DIRECTORY = "dist-release";
141
+ /**
142
+ * Creates the plugin that builds a plugin's web package as a release.
143
+ *
144
+ * @remarks
145
+ * The build is a library build whose one entry is the module that exports the manifest. The build
146
+ * keeps every import of a provided specifier as an import by name, and the page's import map
147
+ * resolves it. It calls each lazy import of a module of the release through `preloaded` of
148
+ * `@stealthscale/sdk-core`. `preloaded` passes the module's URL to the page's preloader before
149
+ * the import. The build fails on an import of a provided package that the page does not map. It
150
+ * also fails on a stylesheet or any other file that is not a module. The plugin writes the
151
+ * catalogue of the plugin's namespace in each language as `locales/<language>.json`. It writes
152
+ * `plugin.json` with the plugin's id and version, its languages, each module's static imports,
153
+ * the caret range of each provided package it imports, and the integrity of every other file. It
154
+ * fails a package whose preset declares a recipe.
155
+ * @param options - The manifest module's path.
156
+ */
157
+ export declare function release(options?: ReleaseOptions): Plugin;
158
+ //#endregion
159
+ export type { AppPage, StandalonePage };