@akinon/theme-contract 2.0.39-rc.0 → 2.0.40-beta.0

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,6 +1,12 @@
1
1
  # @akinon/theme-contract
2
2
 
3
- ## 2.0.39-rc.0
3
+ ## 2.0.40-beta.0
4
+
5
+ ## 2.0.39
6
+
7
+ ### Patch Changes
8
+
9
+ - 115c5602: ZERO-4723: Resolve page-scoped commerce data bindings on every page type
4
10
 
5
11
  ## 2.0.38
6
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/theme-contract",
3
- "version": "2.0.39-rc.0",
3
+ "version": "2.0.40-beta.0",
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",
package/src/types.ts CHANGED
@@ -214,10 +214,28 @@ export interface NativeWidgetConfig {
214
214
  // Page context discovery (preview → editor)
215
215
  // ---------------------------------------------------------------------------
216
216
 
217
+ export type PageContextFieldSemantic =
218
+ | 'money'
219
+ | 'count'
220
+ | 'flag'
221
+ | 'url'
222
+ | 'image'
223
+ | 'date'
224
+ | 'list'
225
+ | 'group'
226
+ | 'text';
227
+
217
228
  export interface PageContextDiscoveryEntry {
218
229
  path: string;
219
230
  kind: 'scalar' | 'array';
220
231
  valueType: 'string' | 'number' | 'boolean' | 'null' | 'object' | 'array';
232
+ /**
233
+ * What the field means, which is what a designer picks by and what
234
+ * `valueType` cannot express: commerce publishes a total, an image URL and a
235
+ * product title as three identical strings. Optional, so a storefront on an
236
+ * older renderer still satisfies the contract.
237
+ */
238
+ semantic?: PageContextFieldSemantic;
221
239
  sample?: string;
222
240
  }
223
241