@wippy-fe/types-global-proxy 0.0.31 → 0.0.32

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.
Files changed (2) hide show
  1. package/index.d.ts +40 -0
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -533,6 +533,46 @@ interface AppConfigOverrides {
533
533
  apiRoutes?: ApiRoutesOverride;
534
534
  }
535
535
 
536
+ /**
537
+ * Wippy package metadata types.
538
+ *
539
+ * **Layer boundary**: package.json is the **FE-author's view**. It is
540
+ * source-relative and BE/router/FS agnostic. It describes the build
541
+ * artifact (e.g. `browser: "dist/index.js"`, `wippy.path: "dist/app.html"`)
542
+ * without knowing where the operator will serve it.
543
+ *
544
+ * The YAML registry entry (`wippy/views`) is the **operator's view**. It
545
+ * is deployment-aware and owns paths that depend on the served layout.
546
+ * YAML's `meta.entry_point` overrides the bundled wippy.path / browser
547
+ * when the operator's serving pipeline reshapes the URL space (e.g.
548
+ * `vite --outDir <static-dir>` flattens away the `dist/` prefix).
549
+ *
550
+ * YAML wins on every field. Bundled meta is the fallback. See
551
+ * `wippy-framework/src/views/README.md` for the per-field mapping table.
552
+ *
553
+ * The consumer's `package.json` `wippy` block is the canonical FE-source
554
+ * declaration. At build time the `@wippy-fe/vite-plugin` plugins resolve
555
+ * any `file://<relative-path>` references inside the wippy block (file
556
+ * contents replace the URI string) and emit `dist/wippy-meta.json` with
557
+ * the resolved package.json.
558
+ *
559
+ * `wippy-meta.json` is the MANDATORY contract between consumers and
560
+ * `wippy/views` ≥ 0.5.0. Without it, `views` falls back to its legacy
561
+ * YAML-synthesis path (deprecated; exists only for migration). See
562
+ * `web_components.spec.md` § "Package metadata: source of truth".
563
+ *
564
+ * Convention for `file://`-referenced files: name them
565
+ * `<field-name-kebab>.do-not-link.<ext>` — the basename IS the kebab-case
566
+ * spelling of the wippy block field the file populates. Examples:
567
+ * - `wippy.configOverrides.customization.customCSS` → `custom-css.do-not-link.css`
568
+ * - `wippy.description` → `description.do-not-link.md`
569
+ * - `wippy.<future-field>` → `<future-field-kebab>.do-not-link.<ext>`
570
+ * The `.do-not-link.` infix is an imperative directive that consistently
571
+ * prevents AI agents from `<link>`/`<script>`-ing the file directly in
572
+ * app.html — empirically verified via blind tests. The proxy injects the
573
+ * file's content at runtime from the resolved package metadata.
574
+ */
575
+
536
576
  interface ProxyConfig {
537
577
  enabled: boolean;
538
578
  injections: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wippy-fe/types-global-proxy",
3
- "version": "0.0.31",
3
+ "version": "0.0.32",
4
4
  "description": "Global type declarations for Wippy iframe proxy (window.getWippyApi, $W, etc.)",
5
5
  "license": "UNLICENSED",
6
6
  "types": "index.d.ts"