@zenky/storefront-vue 0.10.8 → 0.10.10

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 (76) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +4 -18
  3. package/dist/cart/index.d.ts +167 -160
  4. package/dist/cart/index.js +7 -7
  5. package/dist/catalog/index.d.ts +23 -24
  6. package/dist/catalog/index.js +2 -2
  7. package/dist/catalogEntity-DgrPsJpf.d.ts +44 -0
  8. package/dist/{chunk-RO25KNM5.js → chunk-2Y6QTHXI.js} +2 -2
  9. package/dist/chunk-2Y6QTHXI.js.map +1 -0
  10. package/dist/{chunk-3FDM6T7F.js → chunk-32SLDGE5.js} +8 -6
  11. package/dist/chunk-32SLDGE5.js.map +1 -0
  12. package/dist/{chunk-5YD4AIY2.js → chunk-46FNHMWC.js} +4 -4
  13. package/dist/chunk-46FNHMWC.js.map +1 -0
  14. package/dist/{chunk-2SMSLZ6G.js → chunk-4UMDIBW5.js} +15 -11
  15. package/dist/chunk-4UMDIBW5.js.map +1 -0
  16. package/dist/{chunk-4IFPVEO7.js → chunk-BUNI6MGH.js} +3 -3
  17. package/dist/chunk-BUNI6MGH.js.map +1 -0
  18. package/dist/{chunk-E3G7NGCH.js → chunk-FS2UNPTY.js} +2 -2
  19. package/dist/chunk-FS2UNPTY.js.map +1 -0
  20. package/dist/{chunk-PTMSPB34.js → chunk-FXKG5TFQ.js} +3 -3
  21. package/dist/chunk-FXKG5TFQ.js.map +1 -0
  22. package/dist/{chunk-MOG6UMFM.js → chunk-GILJFP55.js} +2 -2
  23. package/dist/chunk-GILJFP55.js.map +1 -0
  24. package/dist/{chunk-2CI4RW7V.js → chunk-GLQXTMVW.js} +2 -2
  25. package/dist/{chunk-2CI4RW7V.js.map → chunk-GLQXTMVW.js.map} +1 -1
  26. package/dist/{chunk-MZ66ARDL.js → chunk-GXDTRTUT.js} +2 -2
  27. package/dist/chunk-GXDTRTUT.js.map +1 -0
  28. package/dist/{chunk-Z3IW4ODZ.js → chunk-NSOIL7PW.js} +2 -2
  29. package/dist/chunk-NSOIL7PW.js.map +1 -0
  30. package/dist/{chunk-NG7RUIWW.js → chunk-OBNMXLJO.js} +19 -3
  31. package/dist/chunk-OBNMXLJO.js.map +1 -0
  32. package/dist/{chunk-VFMVQR6Y.js → chunk-QZ3S3NN3.js} +5 -3
  33. package/dist/chunk-QZ3S3NN3.js.map +1 -0
  34. package/dist/{chunk-Z247QRDJ.js → chunk-XULHV6SS.js} +3 -3
  35. package/dist/chunk-XULHV6SS.js.map +1 -0
  36. package/dist/index.d.ts +4 -3
  37. package/dist/index.js +14 -14
  38. package/dist/money/index.d.ts +8 -8
  39. package/dist/money/index.js +1 -1
  40. package/dist/order/index.d.ts +3 -3
  41. package/dist/order/index.js.map +1 -1
  42. package/dist/pagination/index.d.ts +29 -37
  43. package/dist/pagination/index.js.map +1 -1
  44. package/dist/ports/index.d.ts +23 -22
  45. package/dist/ports/index.js +1 -1
  46. package/dist/products/index.d.ts +10 -10
  47. package/dist/products/index.js +3 -3
  48. package/dist/promotions/index.d.ts +5 -5
  49. package/dist/promotions/index.js +3 -3
  50. package/dist/seo/index.d.ts +17 -17
  51. package/dist/seo/index.js +15 -9
  52. package/dist/seo/index.js.map +1 -1
  53. package/dist/snippets/index.js +1 -1
  54. package/dist/stores/index.d.ts +8 -8
  55. package/dist/stores/index.js +4 -4
  56. package/dist/theme/index.d.ts +3 -3
  57. package/dist/theme/index.js +1 -1
  58. package/dist/utils/index.d.ts +16 -16
  59. package/dist/utils/index.js +1 -1
  60. package/docs/architecture.md +85 -0
  61. package/docs/consumer-setup.md +13 -54
  62. package/docs/ports.md +12 -13
  63. package/package.json +1 -1
  64. package/dist/chunk-2SMSLZ6G.js.map +0 -1
  65. package/dist/chunk-3FDM6T7F.js.map +0 -1
  66. package/dist/chunk-4IFPVEO7.js.map +0 -1
  67. package/dist/chunk-5YD4AIY2.js.map +0 -1
  68. package/dist/chunk-E3G7NGCH.js.map +0 -1
  69. package/dist/chunk-MOG6UMFM.js.map +0 -1
  70. package/dist/chunk-MZ66ARDL.js.map +0 -1
  71. package/dist/chunk-NG7RUIWW.js.map +0 -1
  72. package/dist/chunk-PTMSPB34.js.map +0 -1
  73. package/dist/chunk-RO25KNM5.js.map +0 -1
  74. package/dist/chunk-VFMVQR6Y.js.map +0 -1
  75. package/dist/chunk-Z247QRDJ.js.map +0 -1
  76. package/dist/chunk-Z3IW4ODZ.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -8,12 +8,35 @@ All notable changes to this project are documented in this file. The format foll
8
8
 
9
9
  ### Added
10
10
 
11
+ - `catalogItemEntity` / `isRenderableCatalogItem` (`/catalog`) — resolve a static catalog
12
+ item to a discriminated `category | collection` entity, with `id` and `name` lifted out
13
+ so a consumer can key, title, and scroll-spy a section without branching. Manual
14
+ catalogs can now contain product collections, which ship a `products_collection` object
15
+ instead of `category`. The entity is resolved by which object is present rather than by
16
+ `type`, because the payload (`products_collection`) and `@zenky/storefront-api@1.0.2`
17
+ (`collection`) disagree on the discriminator; both spellings are read. Items whose
18
+ entity has no id are treated as malformed and resolve to `null`.
19
+ - `StaticCatalogItem` / `StaticRemoteCatalog` (`/catalog`) — the catalog shapes as the
20
+ payload actually ships them. The SDK types predate manual catalogs: they omit
21
+ `products_collection` and `catalog_id`, the latter already returned by the live store
22
+ profile (`null` for automatic catalogs, filled for manual ones).
23
+ - `buildCollectionSchemas` (`/seo`) — JSON-LD for a products collection page.
11
24
  - `useProductList` — fetches a page of products for a category or collection, with the
12
25
  include list that keeps per-stock pricing working (`variants.prices`). Three call sites
13
26
  in the consuming app built this fetch by hand and had drifted apart; one of them was
14
27
  missing `variants.prices` and silently showed every product's store-wide price instead
15
28
  of the price of the stock the customer was actually browsing.
16
29
 
30
+ ### Changed
31
+
32
+ - `useCatalogStore` (`catalog`, `initCatalog`), `findProductInCatalog`, and the
33
+ `catalogItem` on `CatalogProductMatch` are typed `StaticCatalogItem` instead of the
34
+ SDK's `CatalogItem`, so the collection fields are visible on what the store holds.
35
+ `CatalogItem` values remain assignable, so passing catalog data in is unaffected; a
36
+ consumer that annotates a value read back out of the store as `CatalogItem[]` needs to
37
+ widen that annotation.
38
+ - `getRemoteCatalog` returns `StaticRemoteCatalog`, so `catalog_id` is typed.
39
+
17
40
  ## 0.10.7 - 2026-08-02
18
41
 
19
42
  ### Added
package/README.md CHANGED
@@ -119,7 +119,7 @@ Pinia falls back to its module-level active instance. Under concurrent SSR that
119
119
  belongs to whichever request touched it last, so the lookup succeeds with another user's
120
120
  state instead of failing.
121
121
 
122
- Two cases behave differently, and the distinction is verified rather than assumed:
122
+ Two cases behave differently:
123
123
 
124
124
  - **Inside a store action — safe.** Pinia activates the action's own instance for the
125
125
  duration of the call, so resolving another store there returns the right one.
@@ -163,7 +163,9 @@ import {
163
163
 
164
164
  The full public contract, adapter examples, SSR lifecycle, and security boundary are in
165
165
  [Runtime Ports](docs/ports.md). For a step-by-step consumer integration and upgrade
166
- checklist, see [Consumer Setup](docs/consumer-setup.md).
166
+ checklist, see [Consumer Setup](docs/consumer-setup.md). For a map of what lives in each
167
+ domain folder and how to decide whether new logic belongs here or in the consumer app,
168
+ see [Architecture](docs/architecture.md).
167
169
 
168
170
  ## Subpath Imports
169
171
 
@@ -248,22 +250,6 @@ npm run check:runtime # import all entries in SSR + reject Node-only output
248
250
  npm run check:size # enforce gzip bundle budgets
249
251
  ```
250
252
 
251
- ### Local linking with yalc
252
-
253
- To iterate on an unreleased change without cutting a version, link the package into a
254
- consumer app with [yalc](https://github.com/wclr/yalc):
255
-
256
- ```bash
257
- # in this package, after a build:
258
- npx yalc publish
259
-
260
- # in the consumer app:
261
- npx yalc add @zenky/storefront-vue
262
-
263
- # after each change here:
264
- npm run build && npx yalc push
265
- ```
266
-
267
253
  ## Package Scripts
268
254
 
269
255
  - `build` — bundle the multi-entry ESM package with tsup.