@akinon/theme-contract 2.0.135-rc.1 → 2.0.135

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/CHANGELOG.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # @akinon/theme-contract
2
2
 
3
- ## 2.0.135-rc.1
4
-
5
- ## 2.0.135-rc.0
3
+ ## 2.0.135
6
4
 
7
5
  ## 2.0.134
8
6
 
package/README.md CHANGED
@@ -55,6 +55,18 @@ const guard = createOriginGuard({
55
55
  });
56
56
  ```
57
57
 
58
+ ## Required storefront environment
59
+
60
+ A storefront edited with the theme editor needs these variables. `@akinon/next` reports them at `GET /theme-editor/health`. The report contains names only, never values. The editor asks before it relies on the preview, and while a required variable is missing it refuses to run and names the variable.
61
+
62
+ | Variable | Required | Without it |
63
+ | --- | --- | --- |
64
+ | `NEXT_PUBLIC_THEME_EDITOR_ORIGINS` | yes (production) | The preview drops every editor message: the page renders and ignores all edits. It must list the editor's origin, comma-separated, scheme included (e.g. `https://editor.example.com`). Development trusts localhost without it. It is built into the bundle, so a change needs a new build. |
65
+ | `PREVIEW_SECRET` | no | Preview links ("View on site", mobile QR) are disabled. |
66
+ | `MAIN_APP_URL` | no | Same as above: the link endpoint cannot verify the editor's Omnitron session. |
67
+
68
+ The report tells the editor apart by the request's `Origin`, with the same rule the preview applies (`createOriginGuard`): the listed origins, plus localhost outside production.
69
+
58
70
  ## Versioning
59
71
 
60
72
  `THEME_CONTRACT_PROTOCOL_VERSION` bumps ONLY on a breaking change to the envelope or an existing message's data shape. Adding a message type is not breaking — unknown types are reported and skipped. Messages from pre-contract builds (no `protocolVersion` field) are accepted as version 0.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/theme-contract",
3
- "version": "2.0.135-rc.1",
3
+ "version": "2.0.135",
4
4
  "description": "Shared wire contract between the theme editor (pz-dynamic-widget) and the storefront renderer (@akinon/pz-theme): theme types, postMessage envelope, runtime validation and origin helpers.",
5
5
  "license": "MIT",
6
6
  "main": "src/index.ts",