@eldrajs/theme-cli 0.2.4 → 0.2.6

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 (167) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +6 -0
  3. package/dist/cli.js +8 -2
  4. package/dist/index.d.ts +6 -0
  5. package/dist/index.js +1 -1
  6. package/dist/{validate-FjQ-5_ne.js → validate-CC6Mp5i_.js} +2 -1
  7. package/package.json +3 -3
  8. package/template/.eldra/block-types.d.ts +1 -1
  9. package/template/.eldra/manifest.json +30 -2
  10. package/template/.eldra/previews.json +35 -35
  11. package/template/README.md +3 -1
  12. package/template/app/app.vue +16 -3
  13. package/template/app/assets/main.css +13 -15
  14. package/template/app/components/ui/UiImage.vue +29 -17
  15. package/template/app/components/ui/__tests__/UiImage.spec.ts +24 -15
  16. package/template/app/composables/useStorefront.ts +7 -2
  17. package/template/app/pages/[...slug].vue +1 -1
  18. package/template/app/plugins/eldra-storefront.ts +9 -0
  19. package/template/app/storefront/analytics.ts +15 -7
  20. package/template/app/storefront/cart.ts +228 -51
  21. package/template/app/storefront/commerce.ts +8 -2
  22. package/template/app/storefront/currency.ts +205 -0
  23. package/template/app/storefront/demo.ts +10 -2
  24. package/template/app/storefront/feedback.ts +2 -0
  25. package/template/app/storefront/gateway.ts +153 -35
  26. package/template/app/storefront/money.ts +6 -18
  27. package/template/app/storefront/structuredData.ts +16 -5
  28. package/template/app/storefront/toProductCard.ts +14 -14
  29. package/template/app/storefront/types.ts +13 -0
  30. package/template/app/storefront/volatile.ts +4 -0
  31. package/template/app/utils/seoInput.ts +4 -3
  32. package/template/blocks/announcement-bar/Block.vue +3 -2
  33. package/template/blocks/announcement-bar/__tests__/Block.spec.ts +1 -1
  34. package/template/blocks/announcement-bar/preview.png +0 -0
  35. package/template/blocks/article/Block.vue +3 -4
  36. package/template/blocks/article/preview.png +0 -0
  37. package/template/blocks/article-list/Block.vue +18 -9
  38. package/template/blocks/article-list/preview.png +0 -0
  39. package/template/blocks/breadcrumbs/Block.vue +1 -1
  40. package/template/blocks/breadcrumbs/__tests__/Block.spec.ts +9 -9
  41. package/template/blocks/breadcrumbs/preview.png +0 -0
  42. package/template/blocks/cart/Block.vue +42 -23
  43. package/template/blocks/cart/__tests__/Block.spec.ts +2 -3
  44. package/template/blocks/cart/__tests__/loadFailed.spec.ts +135 -0
  45. package/template/blocks/cart/__tests__/notSold.spec.ts +109 -0
  46. package/template/blocks/cart/parts/CartLines.vue +16 -3
  47. package/template/blocks/cart/parts/CheckoutButton.vue +45 -0
  48. package/template/blocks/cart/parts/LoadFailed.vue +37 -0
  49. package/template/blocks/cart/parts/NotSoldNotice.vue +69 -0
  50. package/template/blocks/cart/parts/ShippingBar.vue +1 -1
  51. package/template/blocks/cart/parts/Summary.vue +14 -30
  52. package/template/blocks/cart/parts/notSold.ts +19 -0
  53. package/template/blocks/cart/preview.png +0 -0
  54. package/template/blocks/collection-grid/Block.vue +26 -16
  55. package/template/blocks/collection-grid/__tests__/Block.spec.ts +26 -14
  56. package/template/blocks/collection-grid/preview.png +0 -0
  57. package/template/blocks/collection-header/Block.vue +5 -5
  58. package/template/blocks/collection-header/preview.png +0 -0
  59. package/template/blocks/contact/Block.vue +1 -1
  60. package/template/blocks/contact/__tests__/Block.spec.ts +2 -2
  61. package/template/blocks/contact/preview.png +0 -0
  62. package/template/blocks/cta/Block.vue +16 -18
  63. package/template/blocks/cta/__tests__/Block.spec.ts +8 -12
  64. package/template/blocks/cta/preview.png +0 -0
  65. package/template/blocks/faq/Block.vue +3 -13
  66. package/template/blocks/faq/__tests__/Block.spec.ts +2 -2
  67. package/template/blocks/faq/preview.png +0 -0
  68. package/template/blocks/feature-grid/Block.vue +1 -1
  69. package/template/blocks/feature-grid/__tests__/Block.spec.ts +1 -1
  70. package/template/blocks/feature-grid/preview.png +0 -0
  71. package/template/blocks/footer/Block.vue +33 -55
  72. package/template/blocks/footer/__tests__/Block.spec.ts +5 -5
  73. package/template/blocks/footer/preview.png +0 -0
  74. package/template/blocks/form/Block.vue +1 -1
  75. package/template/blocks/form/preview.png +0 -0
  76. package/template/blocks/gallery/__tests__/Block.spec.ts +1 -1
  77. package/template/blocks/gallery/preview.png +0 -0
  78. package/template/blocks/hero/Block.vue +8 -11
  79. package/template/blocks/hero/__tests__/Block.spec.ts +9 -7
  80. package/template/blocks/hero/preview.png +0 -0
  81. package/template/blocks/image/Block.vue +4 -4
  82. package/template/blocks/image/__tests__/Block.spec.ts +5 -6
  83. package/template/blocks/image/preview.png +0 -0
  84. package/template/blocks/logo-cloud/__tests__/Block.spec.ts +1 -1
  85. package/template/blocks/logo-cloud/preview.png +0 -0
  86. package/template/blocks/navigation/Block.vue +55 -29
  87. package/template/blocks/navigation/__tests__/Block.spec.ts +22 -20
  88. package/template/blocks/navigation/preview.png +0 -0
  89. package/template/blocks/newsletter/__tests__/Block.spec.ts +1 -1
  90. package/template/blocks/newsletter/preview.png +0 -0
  91. package/template/blocks/order-status/Block.vue +23 -15
  92. package/template/blocks/order-status/__tests__/Block.spec.ts +1 -2
  93. package/template/blocks/order-status/preview.png +0 -0
  94. package/template/blocks/pricing-table/__tests__/Block.spec.ts +1 -1
  95. package/template/blocks/pricing-table/preview.png +0 -0
  96. package/template/blocks/product-carousel/Block.vue +11 -8
  97. package/template/blocks/product-carousel/__tests__/Block.spec.ts +26 -8
  98. package/template/blocks/product-carousel/preview.png +0 -0
  99. package/template/blocks/product-detail/Block.vue +54 -18
  100. package/template/blocks/product-detail/__tests__/Block.spec.ts +79 -2
  101. package/template/blocks/product-detail/parts/Gallery.vue +1 -1
  102. package/template/blocks/product-detail/preview.png +0 -0
  103. package/template/blocks/quote/Block.vue +1 -1
  104. package/template/blocks/quote/__tests__/Block.spec.ts +7 -4
  105. package/template/blocks/quote/preview.png +0 -0
  106. package/template/blocks/rich-text/preview.png +0 -0
  107. package/template/blocks/search/Block.vue +10 -4
  108. package/template/blocks/search/PopularChips.vue +1 -1
  109. package/template/blocks/search/TypeSection.vue +8 -2
  110. package/template/blocks/search/preview.png +0 -0
  111. package/template/blocks/search/results.ts +5 -2
  112. package/template/blocks/split-content/Block.vue +2 -3
  113. package/template/blocks/split-content/__tests__/Block.spec.ts +2 -2
  114. package/template/blocks/split-content/preview.png +0 -0
  115. package/template/blocks/stats/__tests__/Block.spec.ts +1 -1
  116. package/template/blocks/stats/preview.png +0 -0
  117. package/template/blocks/tabs/Block.vue +4 -5
  118. package/template/blocks/tabs/__tests__/Block.spec.ts +2 -2
  119. package/template/blocks/tabs/preview.png +0 -0
  120. package/template/blocks/team/preview.png +0 -0
  121. package/template/blocks/testimonials/Block.vue +10 -9
  122. package/template/blocks/testimonials/__tests__/Block.spec.ts +1 -1
  123. package/template/blocks/testimonials/preview.png +0 -0
  124. package/template/blocks/timeline/__tests__/Block.spec.ts +2 -2
  125. package/template/blocks/timeline/preview.png +0 -0
  126. package/template/blocks/trust-strip/Block.vue +1 -1
  127. package/template/blocks/trust-strip/__tests__/Block.spec.ts +1 -1
  128. package/template/blocks/trust-strip/preview.png +0 -0
  129. package/template/blocks/video-embed/Block.vue +3 -3
  130. package/template/blocks/video-embed/__tests__/Block.spec.ts +1 -1
  131. package/template/blocks/video-embed/preview.png +0 -0
  132. package/template/blocks/wishlist/Block.vue +6 -2
  133. package/template/blocks/wishlist/preview.png +0 -0
  134. package/template/i18n/en-US.json +19 -3
  135. package/template/i18n/is-IS.json +19 -3
  136. package/template/nuxt.config.ts +5 -4
  137. package/template/package.json +1 -0
  138. package/template/stories/pages/article.stories.ts +2 -3
  139. package/template/stories/pages/cart.stories.ts +2 -3
  140. package/template/stories/pages/category.stories.ts +2 -3
  141. package/template/stories/pages/collection.stories.ts +2 -3
  142. package/template/stories/pages/home.stories.ts +2 -3
  143. package/template/stories/pages/product.stories.ts +3 -4
  144. package/template/stories/pages/products.stories.ts +2 -3
  145. package/template/stories/pages/search.stories.ts +2 -3
  146. package/template/stories/pages/wishlist.stories.ts +2 -3
  147. package/template/test/carouselKeyboard.spec.ts +2 -2
  148. package/template/test/carouselRing.browser.spec.ts +2 -2
  149. package/template/test/carouselSlideWidth.browser.spec.ts +9 -9
  150. package/template/test/currencyPicker.spec.ts +66 -0
  151. package/template/test/eldraIcon.spec.ts +1 -1
  152. package/template/test/mainCss.spec.ts +7 -0
  153. package/template/test/pages/article.spec.ts +5 -5
  154. package/template/test/pages/collection.spec.ts +5 -5
  155. package/template/test/pages/hydration.spec.ts +10 -10
  156. package/template/test/prerenderRefresh.browser.spec.ts +1 -1
  157. package/template/test/seoInput.spec.ts +22 -0
  158. package/template/test/storefront/analytics.spec.ts +15 -0
  159. package/template/test/storefront/cart.spec.ts +4 -4
  160. package/template/test/storefront/currency.spec.ts +549 -0
  161. package/template/test/storefront/currencyStore.spec.ts +845 -0
  162. package/template/test/storefront/gateway.spec.ts +22 -0
  163. package/template/test/storefront/money.spec.ts +2 -8
  164. package/template/test/storefront/structuredData.spec.ts +45 -0
  165. package/template/test/storefront/toProductCard.spec.ts +1 -1
  166. package/template/test/storefront/volatile.spec.ts +11 -0
  167. package/template/test/support/mountPage.ts +2 -3
package/CHANGELOG.md CHANGED
@@ -5,6 +5,10 @@ Release-please writes the generated notes from commit messages and does not repl
5
5
 
6
6
  ## Unreleased
7
7
 
8
+ - `eldra-theme types` asks the gateway for the `declare module '@eldrajs/sdk'` augmentation and
9
+ writes it with the CMS types, so `product.extensions` is typed through the SDK's
10
+ `EldraProductExtensions` registry (WS-434, contract 6.1.0). It is on by default;
11
+ `--no-sdk-augmentation` leaves it out, for a project that does not depend on `@eldrajs/sdk`.
8
12
  - `eldra-theme deploy` explains a 413 whose body is not JSON instead of printing `gateway responded 413`: a proxy or CDN in front of the API may have refused the upload as too large, with the platform's own artifact limits for comparison.
9
13
  - `eldra-theme init` scaffolds a starter whose `studioOrigins` default to production Studio (`https://eldra.app`) instead of `https://localhost:4311`, so a deploy that forgets `ELDRA_STUDIO_ORIGIN` still lets production Studio connect to the preview rather than failing silently; `ELDRA_STUDIO_ORIGIN` accepts a comma-separated list.
10
14
  - `eldra-theme validate` and the plugin build fail naming `package.json: eldra.themeId` when a theme
package/README.md CHANGED
@@ -19,6 +19,12 @@ pnpm exec eldra-theme types --schemas page,hero --out generated/eldra.d.ts
19
19
  pnpm exec eldra-theme deploy
20
20
  ```
21
21
 
22
+ `eldra-theme types` writes the org's CMS schema types, including a `declare module '@eldrajs/sdk'`
23
+ block that fills the SDK's `EldraProductExtensions` registry, so `product.extensions` is typed. Pass
24
+ `--no-sdk-augmentation` in a project that does not depend on `@eldrajs/sdk`; the file then has plain
25
+ interfaces only and never names a module the project cannot resolve. `eldra-theme types --blocks`
26
+ writes only `.eldra/block-types.d.ts`, from the theme's `block.json` files, with no gateway.
27
+
22
28
  See [docs/themes.md](../../docs/themes.md) for the full theme integration guide.
23
29
 
24
30
  ## Development
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as initTheme, i as scaffoldBlock, n as generateBlockTypesFile, o as DeployError, r as generateTypes, s as deployTheme, t as validateTheme } from "./validate-FjQ-5_ne.js";
2
+ import { a as initTheme, i as scaffoldBlock, n as generateBlockTypesFile, o as DeployError, r as generateTypes, s as deployTheme, t as validateTheme } from "./validate-CC6Mp5i_.js";
3
3
  import { resolve } from "node:path";
4
4
  import { defineCommand, runMain } from "citty";
5
5
  // src/cli.ts
@@ -116,6 +116,11 @@ const main = defineCommand({
116
116
  default: false,
117
117
  description: "Write only .eldra/block-types.d.ts from blocks/*/block.json (no gateway)"
118
118
  },
119
+ "sdk-augmentation": {
120
+ type: "boolean",
121
+ default: true,
122
+ description: "Leave out the declare module '@eldrajs/sdk' block that types product extensions (for a project that does not depend on @eldrajs/sdk)"
123
+ },
119
124
  ...gatewayArgs
120
125
  },
121
126
  async run({ args }) {
@@ -139,7 +144,8 @@ const main = defineCommand({
139
144
  gatewayUrl,
140
145
  orgId,
141
146
  out: String(args.out),
142
- schemas: typeof args.schemas === "string" ? args.schemas.split(",").map((schema) => schema.trim()).filter(Boolean) : void 0
147
+ schemas: typeof args.schemas === "string" ? args.schemas.split(",").map((schema) => schema.trim()).filter(Boolean) : void 0,
148
+ sdkAugmentation: args["sdk-augmentation"] !== false
143
149
  });
144
150
  console.log(`wrote ${target}`);
145
151
  } catch (error) {
package/dist/index.d.ts CHANGED
@@ -133,6 +133,12 @@ export declare function generateTypes(opts: {
133
133
  orgId: string;
134
134
  out: string;
135
135
  schemas?: string[];
136
+ /**
137
+ * Ask for the `declare module '@eldrajs/sdk'` block that fills `EldraProductExtensions`. On by
138
+ * default, since a theme normally depends on the SDK; turn it off for a project that does not,
139
+ * which could not resolve that module.
140
+ */
141
+ sdkAugmentation?: boolean;
136
142
  fetch?: typeof globalThis.fetch;
137
143
  }): Promise<string>;
138
144
  /**
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { a as initTheme, c as detectCommitSha, i as scaffoldBlock, l as fieldMigrationLines, n as generateBlockTypesFile, o as DeployError, r as generateTypes, s as deployTheme, t as validateTheme } from "./validate-FjQ-5_ne.js";
1
+ import { a as initTheme, c as detectCommitSha, i as scaffoldBlock, l as fieldMigrationLines, n as generateBlockTypesFile, o as DeployError, r as generateTypes, s as deployTheme, t as validateTheme } from "./validate-CC6Mp5i_.js";
2
2
  import { scanTheme } from "@eldrajs/vite-plugin-theme/scan";
3
3
  export { DeployError, deployTheme, detectCommitSha, fieldMigrationLines, generateBlockTypesFile, generateTypes, initTheme, scaffoldBlock, scanTheme, validateTheme };
@@ -407,7 +407,8 @@ async function generateTypes(opts) {
407
407
  fetch: opts.fetch
408
408
  }).getTypeScriptDefinitions({
409
409
  schemas: opts.schemas,
410
- moduleName: "Eldra"
410
+ moduleName: "Eldra",
411
+ sdkAugmentation: opts.sdkAugmentation ?? true
411
412
  });
412
413
  const target = resolve(opts.themeDir, opts.out);
413
414
  mkdirSync(dirname(target), { recursive: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eldrajs/theme-cli",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "CLI for Eldra themes: init from the starter, scaffold blocks, validate, generate types, deploy a static build to Eldra.",
5
5
  "keywords": [
6
6
  "cli",
@@ -42,8 +42,8 @@
42
42
  "dependencies": {
43
43
  "citty": "^0.1.6",
44
44
  "tar": "^7.4.3",
45
- "@eldrajs/theme-core": "^0.3.3",
46
- "@eldrajs/vite-plugin-theme": "^0.3.3"
45
+ "@eldrajs/vite-plugin-theme": "^0.3.5",
46
+ "@eldrajs/theme-core": "^0.3.5"
47
47
  },
48
48
  "devDependencies": {
49
49
  "execa": "^9.5.2"
@@ -432,7 +432,7 @@ declare global {
432
432
 
433
433
  /** The theme's own message keys (`i18n/<tag>.json`'s default locale),
434
434
  * flattened to dotted paths — vue-i18n's `t()` argument. */
435
- type MessageKey = 'announcement.dismiss' | 'announcement.hintHelp' | 'announcement.hintLabel' | 'announcement.region' | 'article.authorHintHelp' | 'article.authorHintLabel' | 'article.bodyHintHelp' | 'article.bodyHintLabel' | 'article.byline' | 'article.coverHintHelp' | 'article.coverHintLabel' | 'article.dekHintLabel' | 'article.metaHintLabel' | 'article.richTextTableLabel' | 'article.titleHintLabel' | 'articleList.filterNav' | 'articleList.headingHintHelp' | 'articleList.headingHintLabel' | 'articleList.itemsHintHelp' | 'articleList.itemsHintLabel' | 'articleList.pages' | 'breadcrumbs.hintHelp' | 'breadcrumbs.hintLabel' | 'breadcrumbs.home' | 'cart.added' | 'cart.applied' | 'cart.apply' | 'cart.applyFailed' | 'cart.applyUnsupported' | 'cart.awayFromFree' | 'cart.checkout' | 'cart.columnProduct' | 'cart.columnQuantity' | 'cart.columnTotal' | 'cart.continueShopping' | 'cart.discount' | 'cart.discountCode' | 'cart.discountPlaceholder' | 'cart.drawerHintHelp' | 'cart.drawerHintHosted' | 'cart.drawerHintLabel' | 'cart.each' | 'cart.emptyFallbackTitle' | 'cart.freeUnlocked' | 'cart.invalidCode' | 'cart.itemCountMany' | 'cart.itemCountOne' | 'cart.items' | 'cart.lineTotal' | 'cart.paymentsAccepted' | 'cart.quantityFor' | 'cart.removeCode' | 'cart.removeItem' | 'cart.removeItemVariant' | 'cart.removed' | 'cart.shipping' | 'cart.shippingFree' | 'cart.shippingPending' | 'cart.subtotal' | 'cart.summary' | 'cart.title' | 'cart.total' | 'cart.undo' | 'cart.viewCart' | 'collection.countMany' | 'collection.countOne' | 'collection.readLess' | 'collection.readMore' | 'collection.subcategories' | 'collection.subcollections' | 'collection.titleHintHelp' | 'collection.titleHintLabel' | 'contact.addressLabel' | 'contact.detailsHintHelp' | 'contact.detailsHintLabel' | 'contact.emailFieldLabel' | 'contact.emailInvalidError' | 'contact.emailLabel' | 'contact.formTitleDefault' | 'contact.headingHintHelp' | 'contact.headingHintLabel' | 'contact.hoursLabel' | 'contact.introHintLabel' | 'contact.mapHintHelp' | 'contact.mapHintLabel' | 'contact.mapTitle' | 'contact.mapTitleWithAddress' | 'contact.messageLabel' | 'contact.messageRequiredError' | 'contact.nameLabel' | 'contact.nameRequiredError' | 'contact.orderNumberLabel' | 'contact.orderNumberPlaceholder' | 'contact.phoneLabel' | 'contact.replyTime' | 'contact.sendAnother' | 'contact.sendMessage' | 'contact.sending' | 'contact.serverError' | 'contact.serverErrorGeneric' | 'contact.successTextDefault' | 'contact.successTitle' | 'contact.summaryTitleMany' | 'contact.summaryTitleOne' | 'contact.topicLabel' | 'cta.buttonHintLabel' | 'cta.headingHintHelp' | 'cta.headingHintLabel' | 'cta.textHintLabel' | 'editor.addLink' | 'error' | 'faq.headingHintLabel' | 'faq.introHintLabel' | 'faq.itemHintHelp' | 'faq.itemHintLabel' | 'faq.richTextTableLabel' | 'featureGrid.fallbackLabel' | 'featureGrid.headingHintLabel' | 'featureGrid.imageHintLabel' | 'featureGrid.itemHintHelp' | 'featureGrid.itemHintLabel' | 'footer.currencyLabel' | 'footer.descriptionHintLabel' | 'footer.emailError' | 'footer.emailInvalid' | 'footer.emailLabel' | 'footer.groupsHintHelp' | 'footer.groupsHintLabel' | 'footer.localeLabel' | 'footer.nav' | 'footer.newsletterAriaLabel' | 'footer.newsletterHintLabel' | 'footer.social.facebook' | 'footer.social.instagram' | 'footer.social.pinterest' | 'footer.social.tiktok' | 'footer.social.youtube' | 'footer.socialLinkName' | 'footer.subscribe' | 'footer.subscribed' | 'footer.subscribing' | 'footer.title' | 'form.formHintHelp' | 'form.formHintLabel' | 'form.headingHintLabel' | 'form.invalidEmail' | 'form.invalidForm' | 'form.invalidFormat' | 'form.invalidNumber' | 'form.invalidUrl' | 'form.loadFailed' | 'form.loading' | 'form.rateLimited' | 'form.required' | 'form.requiredCheckbox' | 'form.richTextTableLabel' | 'form.selectPlaceholder' | 'form.sendAnother' | 'form.submit' | 'form.submitting' | 'form.successTitle' | 'form.successTitlePending' | 'form.tooLarge' | 'form.tooLong' | 'form.tooShort' | 'form.turnstileFailed' | 'form.turnstileRequired' | 'form.unavailable' | 'form.unsupported' | 'gallery.carouselFallback' | 'gallery.headingHintHelp' | 'gallery.headingHintLabel' | 'gallery.imageHintLabel' | 'gallery.itemsHintHelp' | 'gallery.itemsHintLabel' | 'gallery.viewLarger' | 'gallery.viewer' | 'gallery.viewerHeading' | 'grid.activeFilters' | 'grid.availabilityInStock' | 'grid.availabilityOutOfStock' | 'grid.clearAll' | 'grid.clearFilters' | 'grid.columns' | 'grid.filter' | 'grid.filters' | 'grid.legendAvailability' | 'grid.legendCategory' | 'grid.legendCollection' | 'grid.legendColour' | 'grid.legendSize' | 'grid.nActive' | 'grid.nProducts' | 'grid.noCategoryHelp' | 'grid.noCategoryLabel' | 'grid.noCollectionHelp' | 'grid.noCollectionLabel' | 'grid.noResultsTitle' | 'grid.nothingIn' | 'grid.oneProduct' | 'grid.pagination' | 'grid.price' | 'grid.products' | 'grid.productsNoun' | 'grid.sectionLabel' | 'grid.sortBestSelling' | 'grid.sortBy' | 'grid.sortFeatured' | 'grid.sortNewest' | 'grid.sortPriceAsc' | 'grid.sortPriceDesc' | 'grid.updating' | 'header.cartEmpty' | 'header.cartMany' | 'header.cartOne' | 'header.menu' | 'header.openMenu' | 'header.primary' | 'header.search' | 'header.searchField' | 'header.viewAll' | 'header.viewAllOf' | 'header.wishlistEmpty' | 'header.wishlistMany' | 'header.wishlistOne' | 'hero.buttonHintLabel' | 'hero.carouselFallback' | 'hero.headingHintHelp' | 'hero.headingHintLabel' | 'hero.imageHintLabel' | 'hero.subheadingHintLabel' | 'imageBlock.captionHintLabel' | 'imageBlock.hintHelp' | 'imageBlock.hintLabel' | 'loading' | 'logoCloud.headingHintHelp' | 'logoCloud.headingHintLabel' | 'logoCloud.itemHintHelp' | 'logoCloud.itemHintLabel' | 'logoCloud.linkContext' | 'nav.menu' | 'nav.skipToContent' | 'newsletter.consentCheckboxLabel' | 'newsletter.consentRequired' | 'newsletter.emailLabel' | 'newsletter.emailPlaceholder' | 'newsletter.failed' | 'newsletter.headingHintLabel' | 'newsletter.invalidEmail' | 'newsletter.richTextTableLabel' | 'newsletter.subscribe' | 'newsletter.subscribing' | 'newsletter.successTitle' | 'newsletter.textHintLabel' | 'notFound.back' | 'notFound.body' | 'notFound.eyebrow' | 'notFound.title' | 'order.cardEnding' | 'order.carrierEta' | 'order.completed' | 'order.deliveryAddress' | 'order.detailsLabel' | 'order.estimated' | 'order.inProgress' | 'order.items' | 'order.needHelp' | 'order.notYet' | 'order.number' | 'order.payment' | 'order.placedMany' | 'order.placedOne' | 'order.progress' | 'order.qty' | 'order.shipping' | 'order.shippingFree' | 'order.showAllItems' | 'order.statusPrefix' | 'order.subtotal' | 'order.tax' | 'order.total' | 'order.trackOpens' | 'order.trackPackage' | 'order.trackingNumber' | 'pricing.headingHintLabel' | 'pricing.included' | 'pricing.includedIn' | 'pricing.introHintLabel' | 'pricing.mostPopular' | 'pricing.notIncluded' | 'pricing.planHintHelp' | 'pricing.planHintLabel' | 'product.addToCart' | 'product.backorder' | 'product.backorderNote' | 'product.backorderPending' | 'product.backorderShips' | 'product.hintHelp' | 'product.hintLabel' | 'product.imageIndex' | 'product.images' | 'product.inStock' | 'product.information' | 'product.lowStockMany' | 'product.lowStockManyIn' | 'product.lowStockOne' | 'product.lowStockOneIn' | 'product.notifyEmail' | 'product.notifyInvalid' | 'product.notifyMe' | 'product.notifySubmit' | 'product.notifySuccess' | 'product.notifyTitle' | 'product.notifyUnsupported' | 'product.quantity' | 'product.quickAdd' | 'product.quickAddMeta' | 'product.removeFromWishlist' | 'product.restockNote' | 'product.saleBadge' | 'product.saveToWishlist' | 'product.saving' | 'product.showImage' | 'product.sizeGuide' | 'product.soldOut' | 'product.soldOutIn' | 'product.tabsLabel' | 'product.taxNote' | 'product.viewer' | 'product.zoom' | 'productCarousel.carouselLabel' | 'productCarousel.clearHistory' | 'productCarousel.headingHintHelp' | 'productCarousel.headingHintLabel' | 'productCarousel.viewAllContext' | 'quote.headingFor' | 'quote.nameHintLabel' | 'quote.quoteHintHelp' | 'quote.quoteHintLabel' | 'richTextBlock.bodyHintHelp' | 'richTextBlock.bodyHintLabel' | 'richTextBlock.headingHintHelp' | 'richTextBlock.headingHintLabel' | 'richTextBlock.richTextTableLabel' | 'search.all' | 'search.customersLove' | 'search.didYouMean' | 'search.headingHintHelp' | 'search.headingHintLabel' | 'search.idleTitle' | 'search.noResultsAdvice' | 'search.noResultsTitle' | 'search.pageMany' | 'search.pageOne' | 'search.popularHintHelp' | 'search.popularHintLabel' | 'search.popularSearches' | 'search.productMany' | 'search.productOne' | 'search.resultMany' | 'search.resultOne' | 'search.resultTabs' | 'search.resultsHeading' | 'search.searchLabel' | 'search.searching' | 'search.storyMany' | 'search.storyOne' | 'search.title' | 'search.typeJournal' | 'search.typePages' | 'search.typeProducts' | 'search.viewAllJournal' | 'search.viewAllPages' | 'search.viewAllProducts' | 'splitContent.headingHintHelp' | 'splitContent.headingHintLabel' | 'splitContent.imageHintLabel' | 'splitContent.label' | 'splitContent.richTextTableLabel' | 'stats.headingHintLabel' | 'stats.introHintLabel' | 'stats.itemHintHelp' | 'stats.itemHintLabel' | 'storefront.cartOutOfDate' | 'storefront.error' | 'storefront.loading' | 'storefront.mutationFailed' | 'storefront.notFound' | 'storefront.orderStatus.cancelled' | 'storefront.orderStatus.delayed' | 'storefront.orderStatus.delivered' | 'storefront.orderStatus.processing' | 'storefront.orderStatus.shipped' | 'storefront.orderSteps.delivered' | 'storefront.orderSteps.ordered' | 'storefront.orderSteps.packed' | 'storefront.orderSteps.shipped' | 'storefront.outOfStock' | 'storefront.unavailable' | 'storefront.unresolvedCollectionHelp' | 'storefront.unresolvedCollectionLabel' | 'storefront.updatingValues' | 'tabsBlock.headingHintLabel' | 'tabsBlock.introHintLabel' | 'tabsBlock.itemHintHelp' | 'tabsBlock.itemHintLabel' | 'tabsBlock.richTextTableLabel' | 'tabsBlock.tabPlaceholderLabel' | 'team.emailPerson' | 'team.headingHintHelp' | 'team.headingHintLabel' | 'team.itemHintHelp' | 'team.itemHintLabel' | 'team.onInstagram' | 'team.onPinterest' | 'team.onTiktok' | 'team.portraitOf' | 'team.website' | 'testimonials.carousel' | 'testimonials.headingHintHelp' | 'testimonials.headingHintLabel' | 'testimonials.itemHintHelp' | 'testimonials.itemHintLabel' | 'timeline.headingHintHelp' | 'timeline.headingHintLabel' | 'timeline.itemHintHelp' | 'timeline.itemHintLabel' | 'timeline.step' | 'trust.applePay' | 'trust.itemHintHelp' | 'trust.itemHintLabel' | 'trust.mastercard' | 'trust.payments' | 'trust.paypal' | 'trust.scrollRegion' | 'trust.title' | 'trust.visa' | 'ui.breadcrumbLabel' | 'ui.cancel' | 'ui.clear' | 'ui.clearRecent' | 'ui.clearSearch' | 'ui.close' | 'ui.closeLightbox' | 'ui.closeSearch' | 'ui.decrease' | 'ui.dismissNotification' | 'ui.done' | 'ui.error' | 'ui.filterPanelApplied' | 'ui.filterPanelClearAll' | 'ui.filterPanelLabel' | 'ui.filterPanelMax' | 'ui.filterPanelMin' | 'ui.filterPanelNoneAvailable' | 'ui.filterPanelOrMore' | 'ui.filterPanelShowFewer' | 'ui.filterPanelShowProducts' | 'ui.filterPanelSizeGuide' | 'ui.filterPanelTitle' | 'ui.from' | 'ui.increase' | 'ui.learnMore' | 'ui.lightboxImages' | 'ui.loadMore' | 'ui.loading' | 'ui.loadingProduct' | 'ui.maximum' | 'ui.minimum' | 'ui.multiSelectPlaceholder' | 'ui.newBadge' | 'ui.next' | 'ui.nextImage' | 'ui.nextPage' | 'ui.noImage' | 'ui.noImageAvailable' | 'ui.noResults' | 'ui.noReviews' | 'ui.noneSelected' | 'ui.notifications' | 'ui.opensInNewTab' | 'ui.optional' | 'ui.pagination' | 'ui.pause' | 'ui.play' | 'ui.popularSearches' | 'ui.previous' | 'ui.previousImage' | 'ui.previousPage' | 'ui.quantity' | 'ui.quickAddLabel' | 'ui.recentSearches' | 'ui.regularPrice' | 'ui.required' | 'ui.salePrice' | 'ui.search' | 'ui.searchAdvice' | 'ui.searchCollections' | 'ui.searchEscHint' | 'ui.searchJournal' | 'ui.searchLoading' | 'ui.searchMoveHint' | 'ui.searchOpenHint' | 'ui.searchProducts' | 'ui.searchSuggestions' | 'ui.searchTheShop' | 'ui.selectPlaceholder' | 'ui.selected' | 'ui.shortcutHint' | 'ui.slideInstructions' | 'ui.slides' | 'ui.soldOut' | 'ui.stockIn' | 'ui.stockistSite' | 'ui.to' | 'ui.tryAgain' | 'ui.updatingPrice' | 'ui.updatingStock' | 'video.errorLink' | 'video.errorText' | 'video.errorTitle' | 'video.headingHintLabel' | 'video.introHintLabel' | 'video.minuteMany' | 'video.minuteOne' | 'video.play' | 'video.playWithDuration' | 'video.privacyNoteDefault' | 'video.secondMany' | 'video.secondOne' | 'video.urlHintHelp' | 'video.urlHintLabel' | 'wishlist.continueShopping' | 'wishlist.editorHintHelp' | 'wishlist.editorHintLabel' | 'wishlist.emptyText' | 'wishlist.emptyTitle' | 'wishlist.itemCountMany' | 'wishlist.itemCountOne' | 'wishlist.items' | 'wishlist.removed' | 'wishlist.removedNamed' | 'wishlist.saved' | 'wishlist.title' | 'wishlist.view';
435
+ type MessageKey = 'announcement.dismiss' | 'announcement.hintHelp' | 'announcement.hintLabel' | 'announcement.region' | 'article.authorHintHelp' | 'article.authorHintLabel' | 'article.bodyHintHelp' | 'article.bodyHintLabel' | 'article.byline' | 'article.coverHintHelp' | 'article.coverHintLabel' | 'article.dekHintLabel' | 'article.metaHintLabel' | 'article.richTextTableLabel' | 'article.titleHintLabel' | 'articleList.filterNav' | 'articleList.headingHintHelp' | 'articleList.headingHintLabel' | 'articleList.itemsHintHelp' | 'articleList.itemsHintLabel' | 'articleList.pages' | 'breadcrumbs.hintHelp' | 'breadcrumbs.hintLabel' | 'breadcrumbs.home' | 'cart.added' | 'cart.applied' | 'cart.apply' | 'cart.applyFailed' | 'cart.applyUnsupported' | 'cart.awayFromFree' | 'cart.checkout' | 'cart.columnProduct' | 'cart.columnQuantity' | 'cart.columnTotal' | 'cart.continueShopping' | 'cart.discount' | 'cart.discountCode' | 'cart.discountPlaceholder' | 'cart.drawerHintHelp' | 'cart.drawerHintHosted' | 'cart.drawerHintLabel' | 'cart.each' | 'cart.emptyFallbackTitle' | 'cart.freeUnlocked' | 'cart.invalidCode' | 'cart.itemCountMany' | 'cart.itemCountOne' | 'cart.items' | 'cart.lineTotal' | 'cart.loadFailed' | 'cart.paymentsAccepted' | 'cart.quantityFor' | 'cart.removeCode' | 'cart.removeItem' | 'cart.removeItemVariant' | 'cart.removed' | 'cart.shipping' | 'cart.shippingFree' | 'cart.shippingPending' | 'cart.subtotal' | 'cart.summary' | 'cart.title' | 'cart.total' | 'cart.tryAgain' | 'cart.undo' | 'cart.viewCart' | 'collection.countMany' | 'collection.countOne' | 'collection.readLess' | 'collection.readMore' | 'collection.subcategories' | 'collection.subcollections' | 'collection.titleHintHelp' | 'collection.titleHintLabel' | 'contact.addressLabel' | 'contact.detailsHintHelp' | 'contact.detailsHintLabel' | 'contact.emailFieldLabel' | 'contact.emailInvalidError' | 'contact.emailLabel' | 'contact.formTitleDefault' | 'contact.headingHintHelp' | 'contact.headingHintLabel' | 'contact.hoursLabel' | 'contact.introHintLabel' | 'contact.mapHintHelp' | 'contact.mapHintLabel' | 'contact.mapTitle' | 'contact.mapTitleWithAddress' | 'contact.messageLabel' | 'contact.messageRequiredError' | 'contact.nameLabel' | 'contact.nameRequiredError' | 'contact.orderNumberLabel' | 'contact.orderNumberPlaceholder' | 'contact.phoneLabel' | 'contact.replyTime' | 'contact.sendAnother' | 'contact.sendMessage' | 'contact.sending' | 'contact.serverError' | 'contact.serverErrorGeneric' | 'contact.successTextDefault' | 'contact.successTitle' | 'contact.summaryTitleMany' | 'contact.summaryTitleOne' | 'contact.topicLabel' | 'cta.buttonHintLabel' | 'cta.headingHintHelp' | 'cta.headingHintLabel' | 'cta.textHintLabel' | 'currency.cartNotSold' | 'currency.cartWillSwitch' | 'currency.checkoutWithout' | 'currency.label' | 'currency.movedTo' | 'currency.notIncludedMany' | 'currency.notIncludedOne' | 'currency.notSoldIn' | 'currency.notSoldInLong' | 'currency.shopIn' | 'editor.addLink' | 'error' | 'faq.headingHintLabel' | 'faq.introHintLabel' | 'faq.itemHintHelp' | 'faq.itemHintLabel' | 'faq.richTextTableLabel' | 'featureGrid.fallbackLabel' | 'featureGrid.headingHintLabel' | 'featureGrid.imageHintLabel' | 'featureGrid.itemHintHelp' | 'featureGrid.itemHintLabel' | 'footer.currencyLabel' | 'footer.descriptionHintLabel' | 'footer.emailError' | 'footer.emailInvalid' | 'footer.emailLabel' | 'footer.groupsHintHelp' | 'footer.groupsHintLabel' | 'footer.localeLabel' | 'footer.nav' | 'footer.newsletterAriaLabel' | 'footer.newsletterHintLabel' | 'footer.social.facebook' | 'footer.social.instagram' | 'footer.social.pinterest' | 'footer.social.tiktok' | 'footer.social.youtube' | 'footer.socialLinkName' | 'footer.subscribe' | 'footer.subscribed' | 'footer.subscribing' | 'footer.title' | 'form.formHintHelp' | 'form.formHintLabel' | 'form.headingHintLabel' | 'form.invalidEmail' | 'form.invalidForm' | 'form.invalidFormat' | 'form.invalidNumber' | 'form.invalidUrl' | 'form.loadFailed' | 'form.loading' | 'form.rateLimited' | 'form.required' | 'form.requiredCheckbox' | 'form.richTextTableLabel' | 'form.selectPlaceholder' | 'form.sendAnother' | 'form.submit' | 'form.submitting' | 'form.successTitle' | 'form.successTitlePending' | 'form.tooLarge' | 'form.tooLong' | 'form.tooShort' | 'form.turnstileFailed' | 'form.turnstileRequired' | 'form.unavailable' | 'form.unsupported' | 'gallery.carouselFallback' | 'gallery.headingHintHelp' | 'gallery.headingHintLabel' | 'gallery.imageHintLabel' | 'gallery.itemsHintHelp' | 'gallery.itemsHintLabel' | 'gallery.viewLarger' | 'gallery.viewer' | 'gallery.viewerHeading' | 'grid.activeFilters' | 'grid.availabilityInStock' | 'grid.availabilityOutOfStock' | 'grid.clearAll' | 'grid.clearFilters' | 'grid.columns' | 'grid.filter' | 'grid.filters' | 'grid.legendAvailability' | 'grid.legendCategory' | 'grid.legendCollection' | 'grid.legendColour' | 'grid.legendSize' | 'grid.nActive' | 'grid.nProducts' | 'grid.noCategoryHelp' | 'grid.noCategoryLabel' | 'grid.noCollectionHelp' | 'grid.noCollectionLabel' | 'grid.noResultsTitle' | 'grid.nothingIn' | 'grid.oneProduct' | 'grid.pagination' | 'grid.price' | 'grid.products' | 'grid.productsNoun' | 'grid.sectionLabel' | 'grid.sortBestSelling' | 'grid.sortBy' | 'grid.sortFeatured' | 'grid.sortNewest' | 'grid.sortPriceAsc' | 'grid.sortPriceDesc' | 'grid.updating' | 'header.cart' | 'header.cartEmpty' | 'header.cartMany' | 'header.cartOne' | 'header.menu' | 'header.openMenu' | 'header.primary' | 'header.search' | 'header.searchField' | 'header.viewAll' | 'header.viewAllOf' | 'header.wishlistEmpty' | 'header.wishlistMany' | 'header.wishlistOne' | 'hero.buttonHintLabel' | 'hero.carouselFallback' | 'hero.headingHintHelp' | 'hero.headingHintLabel' | 'hero.imageHintLabel' | 'hero.subheadingHintLabel' | 'imageBlock.captionHintLabel' | 'imageBlock.hintHelp' | 'imageBlock.hintLabel' | 'loading' | 'logoCloud.headingHintHelp' | 'logoCloud.headingHintLabel' | 'logoCloud.itemHintHelp' | 'logoCloud.itemHintLabel' | 'logoCloud.linkContext' | 'nav.menu' | 'nav.skipToContent' | 'newsletter.consentCheckboxLabel' | 'newsletter.consentRequired' | 'newsletter.emailLabel' | 'newsletter.emailPlaceholder' | 'newsletter.failed' | 'newsletter.headingHintLabel' | 'newsletter.invalidEmail' | 'newsletter.richTextTableLabel' | 'newsletter.subscribe' | 'newsletter.subscribing' | 'newsletter.successTitle' | 'newsletter.textHintLabel' | 'notFound.back' | 'notFound.body' | 'notFound.eyebrow' | 'notFound.title' | 'order.cardEnding' | 'order.carrierEta' | 'order.completed' | 'order.deliveryAddress' | 'order.detailsLabel' | 'order.estimated' | 'order.inProgress' | 'order.items' | 'order.needHelp' | 'order.notYet' | 'order.number' | 'order.payment' | 'order.placedMany' | 'order.placedOne' | 'order.progress' | 'order.qty' | 'order.shipping' | 'order.shippingFree' | 'order.showAllItems' | 'order.statusPrefix' | 'order.subtotal' | 'order.tax' | 'order.total' | 'order.trackOpens' | 'order.trackPackage' | 'order.trackingNumber' | 'pricing.headingHintLabel' | 'pricing.included' | 'pricing.includedIn' | 'pricing.introHintLabel' | 'pricing.mostPopular' | 'pricing.notIncluded' | 'pricing.planHintHelp' | 'pricing.planHintLabel' | 'product.addToCart' | 'product.backorder' | 'product.backorderNote' | 'product.backorderPending' | 'product.backorderShips' | 'product.hintHelp' | 'product.hintLabel' | 'product.imageIndex' | 'product.images' | 'product.inStock' | 'product.information' | 'product.lowStockMany' | 'product.lowStockManyIn' | 'product.lowStockOne' | 'product.lowStockOneIn' | 'product.notifyEmail' | 'product.notifyInvalid' | 'product.notifyMe' | 'product.notifySubmit' | 'product.notifySuccess' | 'product.notifyTitle' | 'product.notifyUnsupported' | 'product.quantity' | 'product.quickAdd' | 'product.quickAddMeta' | 'product.removeFromWishlist' | 'product.restockNote' | 'product.saleBadge' | 'product.saveToWishlist' | 'product.saving' | 'product.showImage' | 'product.sizeGuide' | 'product.soldOut' | 'product.soldOutIn' | 'product.tabsLabel' | 'product.taxNote' | 'product.viewer' | 'product.zoom' | 'productCarousel.carouselLabel' | 'productCarousel.clearHistory' | 'productCarousel.headingHintHelp' | 'productCarousel.headingHintLabel' | 'productCarousel.viewAllContext' | 'quote.headingFor' | 'quote.nameHintLabel' | 'quote.quoteHintHelp' | 'quote.quoteHintLabel' | 'richTextBlock.bodyHintHelp' | 'richTextBlock.bodyHintLabel' | 'richTextBlock.headingHintHelp' | 'richTextBlock.headingHintLabel' | 'richTextBlock.richTextTableLabel' | 'search.all' | 'search.customersLove' | 'search.didYouMean' | 'search.headingHintHelp' | 'search.headingHintLabel' | 'search.idleTitle' | 'search.noResultsAdvice' | 'search.noResultsTitle' | 'search.pageMany' | 'search.pageOne' | 'search.popularHintHelp' | 'search.popularHintLabel' | 'search.popularSearches' | 'search.productMany' | 'search.productOne' | 'search.resultMany' | 'search.resultOne' | 'search.resultTabs' | 'search.resultsHeading' | 'search.searchLabel' | 'search.searching' | 'search.storyMany' | 'search.storyOne' | 'search.title' | 'search.typeJournal' | 'search.typePages' | 'search.typeProducts' | 'search.viewAllJournal' | 'search.viewAllPages' | 'search.viewAllProducts' | 'splitContent.headingHintHelp' | 'splitContent.headingHintLabel' | 'splitContent.imageHintLabel' | 'splitContent.label' | 'splitContent.richTextTableLabel' | 'stats.headingHintLabel' | 'stats.introHintLabel' | 'stats.itemHintHelp' | 'stats.itemHintLabel' | 'storefront.cartOutOfDate' | 'storefront.error' | 'storefront.loading' | 'storefront.mutationFailed' | 'storefront.notFound' | 'storefront.orderStatus.cancelled' | 'storefront.orderStatus.delayed' | 'storefront.orderStatus.delivered' | 'storefront.orderStatus.processing' | 'storefront.orderStatus.shipped' | 'storefront.orderSteps.delivered' | 'storefront.orderSteps.ordered' | 'storefront.orderSteps.packed' | 'storefront.orderSteps.shipped' | 'storefront.outOfStock' | 'storefront.unavailable' | 'storefront.unresolvedCollectionHelp' | 'storefront.unresolvedCollectionLabel' | 'storefront.updatingValues' | 'tabsBlock.headingHintLabel' | 'tabsBlock.introHintLabel' | 'tabsBlock.itemHintHelp' | 'tabsBlock.itemHintLabel' | 'tabsBlock.richTextTableLabel' | 'tabsBlock.tabPlaceholderLabel' | 'team.emailPerson' | 'team.headingHintHelp' | 'team.headingHintLabel' | 'team.itemHintHelp' | 'team.itemHintLabel' | 'team.onInstagram' | 'team.onPinterest' | 'team.onTiktok' | 'team.portraitOf' | 'team.website' | 'testimonials.carousel' | 'testimonials.headingHintHelp' | 'testimonials.headingHintLabel' | 'testimonials.itemHintHelp' | 'testimonials.itemHintLabel' | 'timeline.headingHintHelp' | 'timeline.headingHintLabel' | 'timeline.itemHintHelp' | 'timeline.itemHintLabel' | 'timeline.step' | 'trust.applePay' | 'trust.itemHintHelp' | 'trust.itemHintLabel' | 'trust.mastercard' | 'trust.payments' | 'trust.paypal' | 'trust.scrollRegion' | 'trust.title' | 'trust.visa' | 'ui.breadcrumbLabel' | 'ui.cancel' | 'ui.clear' | 'ui.clearRecent' | 'ui.clearSearch' | 'ui.close' | 'ui.closeLightbox' | 'ui.closeSearch' | 'ui.currencyPickerLabel' | 'ui.decrease' | 'ui.dismissNotification' | 'ui.done' | 'ui.error' | 'ui.filterPanelApplied' | 'ui.filterPanelClearAll' | 'ui.filterPanelLabel' | 'ui.filterPanelMax' | 'ui.filterPanelMin' | 'ui.filterPanelNoneAvailable' | 'ui.filterPanelOrMore' | 'ui.filterPanelShowFewer' | 'ui.filterPanelShowProducts' | 'ui.filterPanelSizeGuide' | 'ui.filterPanelTitle' | 'ui.from' | 'ui.increase' | 'ui.learnMore' | 'ui.lightboxImages' | 'ui.loadMore' | 'ui.loading' | 'ui.loadingProduct' | 'ui.maximum' | 'ui.minimum' | 'ui.multiSelectPlaceholder' | 'ui.newBadge' | 'ui.next' | 'ui.nextImage' | 'ui.nextPage' | 'ui.noImage' | 'ui.noImageAvailable' | 'ui.noResults' | 'ui.noReviews' | 'ui.noneSelected' | 'ui.notifications' | 'ui.opensInNewTab' | 'ui.optional' | 'ui.pagination' | 'ui.pause' | 'ui.play' | 'ui.popularSearches' | 'ui.previous' | 'ui.previousImage' | 'ui.previousPage' | 'ui.quantity' | 'ui.quickAddLabel' | 'ui.recentSearches' | 'ui.regularPrice' | 'ui.required' | 'ui.salePrice' | 'ui.search' | 'ui.searchAdvice' | 'ui.searchCollections' | 'ui.searchEscHint' | 'ui.searchJournal' | 'ui.searchLoading' | 'ui.searchMoveHint' | 'ui.searchOpenHint' | 'ui.searchProducts' | 'ui.searchSuggestions' | 'ui.searchTheShop' | 'ui.selectPlaceholder' | 'ui.selected' | 'ui.shortcutHint' | 'ui.slideInstructions' | 'ui.slides' | 'ui.soldOut' | 'ui.stockIn' | 'ui.stockistSite' | 'ui.to' | 'ui.tryAgain' | 'ui.updatingPrice' | 'ui.updatingStock' | 'video.errorLink' | 'video.errorText' | 'video.errorTitle' | 'video.headingHintLabel' | 'video.introHintLabel' | 'video.minuteMany' | 'video.minuteOne' | 'video.play' | 'video.playWithDuration' | 'video.privacyNoteDefault' | 'video.secondMany' | 'video.secondOne' | 'video.urlHintHelp' | 'video.urlHintLabel' | 'wishlist.continueShopping' | 'wishlist.editorHintHelp' | 'wishlist.editorHintLabel' | 'wishlist.emptyText' | 'wishlist.emptyTitle' | 'wishlist.itemCountMany' | 'wishlist.itemCountOne' | 'wishlist.items' | 'wishlist.removed' | 'wishlist.removedNamed' | 'wishlist.saved' | 'wishlist.title' | 'wishlist.view';
436
436
  }
437
437
 
438
438
  export {};
@@ -8667,6 +8667,7 @@
8667
8667
  "header.wishlistMany": "Wishlist, {count} items",
8668
8668
  "header.viewAll": "View all",
8669
8669
  "header.viewAllOf": "View all {label}",
8670
+ "header.cart": "Cart",
8670
8671
  "editor.addLink": "Add a link",
8671
8672
  "splitContent.label": "Our story",
8672
8673
  "splitContent.imageHintLabel": "Choose an image",
@@ -8995,6 +8996,8 @@
8995
8996
  "cart.drawerHintLabel": "The cart drawer opens from the header",
8996
8997
  "cart.drawerHintHelp": "Shoppers open it with the bag button; nothing shows here until they do.",
8997
8998
  "cart.drawerHintHosted": "The theme already opens one on every page, so this block adds nothing and can be removed.",
8999
+ "cart.loadFailed": "We couldn't load your cart.",
9000
+ "cart.tryAgain": "Try again",
8998
9001
  "wishlist.saved": "Saved to wishlist",
8999
9002
  "wishlist.removed": "Removed from wishlist",
9000
9003
  "wishlist.view": "View wishlist",
@@ -9034,6 +9037,16 @@
9034
9037
  "order.needHelp": "Need help?",
9035
9038
  "order.trackingNumber": "Tracking number",
9036
9039
  "order.carrierEta": "Estimated delivery {eta} with {carrier}.",
9040
+ "currency.label": "Currency",
9041
+ "currency.notSoldIn": "Not available in {currency}",
9042
+ "currency.notSoldInLong": "Not available in {currency}.",
9043
+ "currency.shopIn": "Shop in {currency}",
9044
+ "currency.cartNotSold": "{items} can't be bought in {currency}.",
9045
+ "currency.checkoutWithout": "Remove and check out",
9046
+ "currency.cartWillSwitch": "Your cart will switch to {currency}.",
9047
+ "currency.notIncludedOne": "1 item not included",
9048
+ "currency.notIncludedMany": "{count} items not included",
9049
+ "currency.movedTo": "Prices are now in {currency}.",
9037
9050
  "ui.clear": "Clear",
9038
9051
  "ui.close": "Close",
9039
9052
  "ui.closeSearch": "Close search",
@@ -9114,7 +9127,8 @@
9114
9127
  "ui.filterPanelMin": "Min",
9115
9128
  "ui.filterPanelMax": "Max",
9116
9129
  "ui.filterPanelOrMore": " or more",
9117
- "ui.filterPanelShowProducts": "Show products"
9130
+ "ui.filterPanelShowProducts": "Show products",
9131
+ "ui.currencyPickerLabel": "Currency"
9118
9132
  },
9119
9133
  "is-IS": {
9120
9134
  "notFound.eyebrow": "404",
@@ -9214,6 +9228,7 @@
9214
9228
  "header.wishlistMany": "Óskalisti, {count} vörur",
9215
9229
  "header.viewAll": "Sjá allt",
9216
9230
  "header.viewAllOf": "Sjá allt: {label}",
9231
+ "header.cart": "Karfa",
9217
9232
  "editor.addLink": "Bæta við tengli",
9218
9233
  "splitContent.label": "Sagan okkar",
9219
9234
  "splitContent.imageHintLabel": "Veldu mynd",
@@ -9542,6 +9557,8 @@
9542
9557
  "cart.drawerHintLabel": "Karfan opnast úr hausnum",
9543
9558
  "cart.drawerHintHelp": "Kaupendur opna hana með töskuhnappnum; hér sést ekkert fyrr en þeir gera það.",
9544
9559
  "cart.drawerHintHosted": "Þemað opnar hana þegar á öllum síðum, svo þessi hluti gerir ekkert og má fjarlægja.",
9560
+ "cart.loadFailed": "Ekki tókst að sækja körfuna.",
9561
+ "cart.tryAgain": "Reyna aftur",
9545
9562
  "wishlist.saved": "Vistað á óskalista",
9546
9563
  "wishlist.removed": "Fjarlægt af óskalista",
9547
9564
  "wishlist.view": "Skoða óskalista",
@@ -9581,6 +9598,16 @@
9581
9598
  "order.needHelp": "Þarftu aðstoð?",
9582
9599
  "order.trackingNumber": "Sendingarnúmer",
9583
9600
  "order.carrierEta": "Áætlaður afhendingartími {eta} með {carrier}.",
9601
+ "currency.label": "Gjaldmiðill",
9602
+ "currency.notSoldIn": "Ekki til sölu í {currency}",
9603
+ "currency.notSoldInLong": "Ekki til sölu í {currency}.",
9604
+ "currency.shopIn": "Skipta yfir í {currency}",
9605
+ "currency.cartNotSold": "Þetta fæst ekki keypt í {currency}: {items}.",
9606
+ "currency.checkoutWithout": "Fjarlægja og ganga frá kaupum",
9607
+ "currency.cartWillSwitch": "Karfan færist yfir í {currency}.",
9608
+ "currency.notIncludedOne": "1 vara ekki talin með",
9609
+ "currency.notIncludedMany": "{count} vörur ekki taldar með",
9610
+ "currency.movedTo": "Verð eru nú í {currency}.",
9584
9611
  "ui.clear": "Hreinsa",
9585
9612
  "ui.close": "Loka",
9586
9613
  "ui.closeSearch": "Loka leit",
@@ -9661,7 +9688,8 @@
9661
9688
  "ui.filterPanelMin": "Lágm.",
9662
9689
  "ui.filterPanelMax": "Hám.",
9663
9690
  "ui.filterPanelOrMore": " eða meira",
9664
- "ui.filterPanelShowProducts": "Sýna vörur"
9691
+ "ui.filterPanelShowProducts": "Sýna vörur",
9692
+ "ui.currencyPickerLabel": "Gjaldmiðill"
9665
9693
  }
9666
9694
  }
9667
9695
  }
@@ -1,37 +1,37 @@
1
1
  {
2
- "announcement-bar": "2b057546d7d017f6481e5c89e7af3ee67c1f03fc503ba29ef3485a8b3b72ca3e",
3
- "article": "0f1d1229dc640ef3580442855b1eb4be83bbad43e6d828b71edd218018581b7e",
4
- "article-list": "4132ded9bc945513dbdf0d6138c85a081aaeae65cb66f101e091acbd302c3274",
5
- "breadcrumbs": "637c19cb81ba8e5a979df0e5f7bf6444ce85feb618c8168ac76df91434e00aad",
6
- "cart": "7163dc4cdb18e2ea39b573e0e33c70c04202261266616671f06fd0837c141c70",
7
- "collection-grid": "2062ade27f90aac810114c3d9a4bbd5efddd5b74c869a2b891dc3589c149eda6",
8
- "collection-header": "cbcfacb1d8ab6638fb8094a8517baec3ff3911f9df744007babeee402e75715f",
9
- "contact": "0af119acf554c453d8f545f3cd7a37ed4f3afa9a2472e105978e4f48f7d51616",
10
- "cta": "0e3fc7d629f34d451b9f785d57fdd88c7853f737dab55136ec2e07b282cc4d81",
11
- "faq": "90baa9a0832632aa47cd9ce1fe29682c16e045ea9739464e67d7287c6b0b94c8",
12
- "feature-grid": "9bb14686453ba8ec7758442a6a55ffec797208ad02aed05d465ab384b42ff6c1",
13
- "footer": "cbf8e902d28cc54eed9b57c75f1de122bbdbbda9845097a5f751e4864f3b3b9e",
14
- "form": "55c897592a0048fb4465485d66c240084173479dad56e692608111c20f9d1a1d",
15
- "gallery": "aaaae7b8b72f8a54c96bdac673317ba260e946c52fc7a62dbc439aab87f1f5a3",
16
- "hero": "17309fd9ed6ca109725906c064c07d24187a7888175db2a1fb900966999a69f9",
17
- "image": "7e2eaff913b3daf5eb96013e4e1762400b0c1eb06ccfb51cdb4eaee39e54c4aa",
18
- "logo-cloud": "281e3cd1b8a4d3f3983623b22cfad7072aed6ab467a0d06eafcf3d884655a25a",
19
- "navigation": "6377021a405f0ced6ad0f4013a19e20f42b2f1ea0d2a35f0646d9584b0a75088",
20
- "newsletter": "fed26701771229ce4573d01ee79383ed482683bc904e225b30549d28f5b25697",
21
- "order-status": "260384a10709343107828059b42a3e1238083aae94b9bc812c6feaa999adf522",
22
- "pricing-table": "99890127509926177dc6a55b74a355577c8c8179a053290a3e866846e875be80",
23
- "product-carousel": "4f2d1269f8432e1e7ba39abc57f4bc2330efbf7db1cd473004731c066fc23cd3",
24
- "product-detail": "8e4cd802a3b0e9f7514edb4978b7dfff2fc1bd32d5fd0f7da9c041b1259b7222",
25
- "quote": "e173b6e75861006d6c9a7397f9cf7d11834a2116bff27029e8df58799143bdf4",
26
- "rich-text": "3239b3aa81b99b807409bbc5e1def629db64c8ee73140c7f6382d535c7a2ae48",
27
- "search": "d6501ae66f353842724b2dd90413d01ead20ab75f2c17722a9cd87527ccf6418",
28
- "split-content": "41b84b530d65d37777c3df6f55cf12a62a090edf938f784491641c5967b6d602",
29
- "stats": "e7bf6d2134a6f404d9e3cce87892c36838e9b4ed247f7b3e34882eca61412ad1",
30
- "tabs": "352eaed3dea3c54d7bcb7665feafb770a9977f0fa0029abf9e3fb83c23960936",
31
- "team": "52ca9e5827f11c68344593aa44508cb41f3322576a6aac3cb9454df2c381827a",
32
- "testimonials": "a4477a2a42c2634ea7180ba2801412580962661651baee2697703b1ca854dd45",
33
- "timeline": "c5ab8481388681dec370959c815f835130da75f37cbaa0745dbc39f1afc825b6",
34
- "trust-strip": "babe3d988c88a93a8452881a0d8ecc6d1872004c604d550471edcae52d565066",
35
- "video-embed": "4cd7b65b4ee6c7cc86b0dc5ef27e29c2e144afcdc9736bf6b2ac5b750ada4ce0",
36
- "wishlist": "6051e425cb5b40a638c08b86d452bbeed4cba590582ed7092f29697ea2fd1636"
2
+ "announcement-bar": "c9afe3ca53192bd788e724048eb4fa66bbff19d93f1fefbc63aa4e396b1a1f71",
3
+ "article": "46689140a4cc1e04b70bfa1c69fc8ac2ae8e5b0ce669e7a2c23157bb2ac79876",
4
+ "article-list": "c99dbf56425ed57161d348b28f67a23dcb609d9cf9b602da2995baea584070d6",
5
+ "breadcrumbs": "db7e456eec13ac6e6688fcd67b12cec63ffd876defdebd3085f28fdb5d8d6206",
6
+ "cart": "5e1e74eafc670eaa0ce39dc85bb9b9349d73a327e814fc38b45379903b2da8e3",
7
+ "collection-grid": "9c4603f5de2891b3f066c0532bbb480003f7eb2ee1834475e2bd2097f149d57d",
8
+ "collection-header": "e0f8c97068a4cfd20585d7c055244a1e078f52d9a6eef59373b09dfde7337bdc",
9
+ "contact": "c8e558e99456095a7b3a0eb6baa06aa4ba2d246839bae123d769c88b8958ada8",
10
+ "cta": "bb97e5de236bc8fb46bfd7fc8ac80a8b3167a21fa90dd2b728d843f72fc0e421",
11
+ "faq": "5f9b2fbd25c28048d2f5c36c2fd2855f76011597bf1aa75e81e1316753a7eeba",
12
+ "feature-grid": "5019b8af23b77e0cd1360dd021287923c462e26b42e065886c03fb111929dda0",
13
+ "footer": "6dcbe2f7349c0a4dd51b47746c5f69466fa17cfefa63ee92e13e06be03c2c0a4",
14
+ "form": "6ec0407c114b5de4490d9f691b13cab3657e3fcbf7e37ed20a7f86fce4c1c24e",
15
+ "gallery": "d3fa5b835a1707e607410f7ca8e245c13ba4c8bc69b4c84485cc80b6d336f921",
16
+ "hero": "62c6ad62978389ae977db134e7277b410e57f1143832013e97e1db820d114987",
17
+ "image": "4b0bc804f063d947099f950bd0c09b98a07ea63f45ddfde51c9cd356c8c09587",
18
+ "logo-cloud": "7e946206faffab98d73d692f326bc79f4100c6e4892eb63ed69ee61032545042",
19
+ "navigation": "12363a34c5fd3593d91a912ba43352edb9347b1fda7e6b903baa2c39b0470682",
20
+ "newsletter": "5718d21c8c234534ac97a911989fea31fbe7a7ffcdbf9069a290954476ecf386",
21
+ "order-status": "1a7b4d108117fe7c67789adf9b55796364c16ab9c8f5ab652ac40d6c49d6f80e",
22
+ "pricing-table": "43b16d3abea292d7878a2a2f86dc35a6a069d9fb934bdb601305ee9731afe020",
23
+ "product-carousel": "70cc990a853c3ac33394e26cf071966ce2ce2c58e7254b5650f83c25b1402fa2",
24
+ "product-detail": "7035f8f03e9e3e03e979b577e22410ec118d26a5e47d3e88d7372f46ca173589",
25
+ "quote": "d771f4097ca14d70320c90fd88c54d980a996c1fe43a4448ab10f89c2bfe6d3d",
26
+ "rich-text": "6062e831392f12e805968882a0edbfde00dfd1296d00395a3e9a27492a242118",
27
+ "search": "30c9627f44da0c88f289d63de62e639ed7553cea079dac5cbe5010acf058229a",
28
+ "split-content": "a10b26c39b12e350ac1a16521c13bdd9ec0baf7581fc7fa1e1c8263307efc2c2",
29
+ "stats": "22bbd1d98024ef1f2cf2e969fbe070bfda2b316d9319009721c6189384c7a43c",
30
+ "tabs": "3f054548e97dac4f6f69782824abb020e191e28c229ed560f366651cd55dd2cf",
31
+ "team": "532e5965c859aa33844e228f9be6329e635ecfa8cb5e1bd2af261b337377b593",
32
+ "testimonials": "ce60546dba65fefea8403ede13b9b590ebf7650976b09cb5b1d0f4ca4b365c20",
33
+ "timeline": "bfb25e247819c632e5f6e6ed79340f1ad54cd103883d0238e1ed6db94b4c5ca8",
34
+ "trust-strip": "337c79080c4af9f784e151b6221ab21e63b4324de75b266c5f6af6f15964eb5d",
35
+ "video-embed": "ff21253e4ad5abcc6d4b34ae930068f2493b1c404ab42608799dd70ce2c4481f",
36
+ "wishlist": "a5994d9744219233dfa0ab5932507bb4a57599e1113466e759661074f7c16341"
37
37
  }
@@ -239,7 +239,9 @@ true`). Each id becomes a `--eldra-color-<id>` custom property, which is the _sa
239
239
  - **`app/assets/main.css`** — `@import 'tailwindcss'` then `@import '@eldrajs/ui/tailwind.css'`,
240
240
  which brings in the `--eldra-*` variables, the Tailwind `@theme` mapping over them
241
241
  (`bg-primary`, `rounded-md`, `shadow-md`, `font-heading`, `text-body`, …) and the package's own
242
- utilities. What is left in the file is the theme's own: the section spacing scale, the container
242
+ utilities, then `@import '@eldrajs/ui/components.css'`, the package's components prebuilt (every
243
+ class `eldra:`-prefixed, below this file's utilities, so a class a block puts on a component
244
+ wins). What is left in the file is the theme's own: the section spacing scale, the container
243
245
  rules, the base layer and the rich-text typography. Edit it directly; there's no build step.
244
246
  Fonts are `--eldra-font-heading` / `--eldra-font-body` — override them here (the package names
245
247
  its two faces but never loads them).
@@ -31,6 +31,7 @@ import { Link, Toaster, useToast } from '@eldrajs/ui';
31
31
  import CartBlock from '../blocks/cart/Block.vue';
32
32
  import EldraRouterLink from './components/EldraRouterLink.vue';
33
33
  import { useStorefront } from './composables/useStorefront';
34
+ import { useStorefrontFeedback } from './composables/useStorefrontFeedback';
34
35
  import { useI18n } from 'vue-i18n';
35
36
  import { CART_ADD_TOAST_ID } from './storefront/feedback';
36
37
 
@@ -81,6 +82,20 @@ watch(
81
82
  }
82
83
  );
83
84
 
85
+ // A currency the visitor had was taken away (the shop stopped selling in it): said once, here, on any page.
86
+ const currency = useStorefront().currency;
87
+ watch(currency.movedTo, (code) => {
88
+ if (code === null) return;
89
+ toast.show({ id: 'currency-moved', title: t('currency.movedTo', { currency: code }) });
90
+ currency.movedTo.value = null;
91
+ });
92
+ const feedback = useStorefrontFeedback();
93
+ watch(currency.failure, (failure) => {
94
+ if (failure === null) return;
95
+ feedback.report(failure, { id: 'currency-move' });
96
+ currency.failure.value = null;
97
+ });
98
+
84
99
  /**
85
100
  * An `EldraBlockEntry` needs an id. This one is the theme's own, not a CMS entry id, and never
86
101
  * reaches the gateway; it is the shell's own, distinct from any cart block on a page, so the two
@@ -114,9 +129,7 @@ const drawerEntry = computed(
114
129
  href="#main"
115
130
  :as="EldraRouterLink"
116
131
  variant="standalone"
117
- :classes="{
118
- root: 'bg-primary text-primary-contrast rounded-md sr-only px-4 py-2 focus:not-sr-only focus:fixed focus:top-4 focus:left-4 focus:z-50',
119
- }"
132
+ class="bg-primary text-primary-contrast sr-only rounded-md px-4 py-2 focus:not-sr-only focus:fixed focus:top-4 focus:left-4 focus:z-50"
120
133
  >
121
134
  {{ t('nav.skipToContent') }}
122
135
  </Link>
@@ -1,21 +1,19 @@
1
1
  @import 'tailwindcss';
2
- /* `@eldrajs/ui`'s Tailwind entry: its `tokens.css` (`--eldra-*` — colours,
3
- radii, spacing, type, motion, z-index), the `@theme` block mapping those
4
- onto Tailwind's own namespaces (`--color-primary`, `--radius-md`,
5
- `--font-heading`, `--shadow-md`, …), the package's custom utilities
6
- (`eldra-focus`, `control-h`, `text-body`, …) and a `@source "./"` so this
7
- build also scans the package's compiled components — without it a class
8
- only `@eldrajs/ui`'s own `dist/*.js` uses (a Button fill, an Input border)
9
- would never be emitted here.
2
+ /* `@eldrajs/ui`'s Tailwind entry: its `tokens.css` (`--eldra-*` — colours, radii, spacing,
3
+ type, motion, z-index), the `@theme` block mapping those onto Tailwind's own namespaces
4
+ (`--color-primary`, `--radius-md`, `--font-heading`, …) and the package's custom utilities
5
+ (`eldra-focus`, `control-h`, `text-body`, …), for this theme's own markup. It builds none of the
6
+ package's components: those come prebuilt in `components.css` below, every class `eldra:`-
7
+ prefixed and in the `components` layer, so a class written here or on a component wins.
10
8
 
11
- The colour variables it declares are the *defaults*; the theme's own token
12
- CSS (`virtual:eldra/tokens.css`, generated from `tokens.json` by
13
- @eldrajs/theme-core's `generateDesignTokenCss`) declares the same
14
- `--eldra-color-<role>` names on `:root` and is what Studio edits, live
15
- (`useEldraPreview` appends its own `<style>` to `<head>`, which wins over
16
- every stylesheet). Keep `tokens.json`'s colour ids and the package's role
17
- names identical: that name match is the whole wiring. */
9
+ The colour variables it declares are the *defaults*; the theme's own token CSS
10
+ (`virtual:eldra/tokens.css`, generated from `tokens.json` by @eldrajs/theme-core's
11
+ `generateDesignTokenCss`) declares the same `--eldra-color-<role>` names on `:root` and is what
12
+ Studio edits, live (`useEldraPreview` appends its own `<style>` to `<head>`, which wins over
13
+ every stylesheet). Keep `tokens.json`'s colour ids and the package's role names identical:
14
+ that name match is the whole wiring. */
18
15
  @import '@eldrajs/ui/tailwind.css';
16
+ @import '@eldrajs/ui/components.css';
19
17
 
20
18
  /* Nuxt's Vite root is `app/`, and Tailwind's automatic source detection starts at that root, so
21
19
  `blocks/` (a sibling of `app/`) is never scanned in the site build: every class only a block
@@ -34,7 +34,7 @@
34
34
  * default `'none'`) — the two presets the design spec's frame radius actually has.
35
35
  * - **`fill`** is for a background image that has to cover its positioned ancestor (the hero
36
36
  * `image-background` variant): it sets `ratio="auto"` and adds `absolute inset-0 h-full w-full`
37
- * to `classes.root` and `h-full w-full` to `classes.frame`, so the frame's own height tracks its
37
+ * to the root and `h-full w-full` to `classes.frame`, so the frame's own height tracks its
38
38
  * *positioned ancestor* (via the `inset-0`/`h-full` chain) instead of trying to derive one from
39
39
  * `media`, which this wrapper never has `width`/`height` for. `media`'s own `object-cover`
40
40
  * (`Image`'s default) does the rest.
@@ -53,9 +53,9 @@
53
53
  * the media, so the browser's replaced-element sizing algorithm scales the image down to fit
54
54
  * inside both caps at once, the same thing the original bare `<img class="max-h-[85vh] w-auto
55
55
  * object-contain">` did by being the frame itself).
56
- * - **`classes`** is `Image`'s own `classes` prop, passed straight through and merged with
57
- * whatever `rounded`/`fill`/`fit` above already set (the caller's own value for a part always
58
- * wins) — the general escape hatch for a radius `rounded` has no preset for (`rounded-full`,
56
+ * - **`classes`** is `Image`'s own `classes` prop, passed straight through. `fill`/`fit`'s own
57
+ * classes and the caller's (`class` for the root, `classes` for a part) are all app utilities in
58
+ * one layer, so they are combined with `twMerge` and the caller's wins a conflict — the general escape hatch for a radius `rounded` has no preset for (`rounded-full`,
59
59
  * `rounded-md`) or a frame-level size constraint neither `fill` nor `fit` covers on their own
60
60
  * (the gallery lightbox's `max-h-[85vh]`).
61
61
  *
@@ -65,10 +65,13 @@
65
65
  * class landing on the `<img>` now use `rounded`/`fill`/`fit`/`classes` instead — see each block's
66
66
  * own diff and `docs/starter-kit.md`'s `UiImage` row.
67
67
  */
68
- import { computed } from 'vue';
69
- import { Image, cx, type ImagePart, type ImageRatio } from '@eldrajs/ui';
68
+ import { computed, normalizeClass, useAttrs } from 'vue';
69
+ import { twMerge } from 'tailwind-merge';
70
+ import { Image, type ImagePart, type ImageRatio } from '@eldrajs/ui';
70
71
  import { imageFramingAttrs, type ImageFraming } from '@eldrajs/theme-vue';
71
72
 
73
+ defineOptions({ inheritAttrs: false });
74
+
72
75
  const props = withDefaults(
73
76
  defineProps<{
74
77
  src: string;
@@ -98,8 +101,8 @@ const props = withDefaults(
98
101
  /** `Image`'s media covers its frame by default (`cover`); `contain` letterboxes instead, for a
99
102
  * full, uncropped view (a lightbox). */
100
103
  fit?: 'cover' | 'contain';
101
- /** Passed straight through to `Image`'s own `classes` prop, merged with whatever `rounded`/
102
- * `fill`/`fit` above already set — the caller's own value for a part always wins. */
104
+ /** Passed straight through to `Image`'s own `classes` prop, merged with whatever `fill`/`fit`
105
+ * above already set — the caller's own value for a part always wins. */
103
106
  classes?: Partial<Record<ImagePart, string>>;
104
107
  }>(),
105
108
  {
@@ -156,19 +159,27 @@ const CONTAIN_FRAME_CLASS = 'w-auto max-w-full';
156
159
  * height exceeds that cap. */
157
160
  const CONTAIN_MEDIA_CLASS = 'object-contain h-auto w-auto max-w-full max-h-[inherit]';
158
161
 
159
- /** `fill`/`fit` set `root`/`frame`/`media` first; the caller's own `classes` prop is merged on top
160
- * of each (via `cx`, so a real conflict resolves in the caller's favour) rather than replacing it
161
- * outright, and every other part passes through untouched. */
162
+ const attrs = useAttrs();
163
+ const forwardedAttrs = computed(() => {
164
+ const { class: _class, style: _style, ...rest } = attrs;
165
+ return rest;
166
+ });
167
+
168
+ /** `fill`'s root classes, then the caller's `class` on top (`twMerge`: the caller wins). */
169
+ const rootClass = computed(() =>
170
+ twMerge(props.fill ? FILL_ROOT_CLASS : '', normalizeClass(attrs.class))
171
+ );
172
+
173
+ /** `fill`/`fit` set `frame`/`media` first, the caller's `classes` on top; other parts pass through. */
162
174
  const mergedClasses = computed<Partial<Record<ImagePart, string>>>(() => {
163
175
  const base = props.classes ?? {};
164
176
  const result: Partial<Record<ImagePart, string>> = { ...base };
165
177
  if (props.fill) {
166
- result.root = cx(FILL_ROOT_CLASS, base.root);
167
- result.frame = cx(FILL_FRAME_CLASS, base.frame);
178
+ result.frame = twMerge(FILL_FRAME_CLASS, base.frame);
168
179
  }
169
180
  if (props.fit === 'contain') {
170
- result.frame = cx(CONTAIN_FRAME_CLASS, result.frame ?? base.frame);
171
- result.media = cx(CONTAIN_MEDIA_CLASS, base.media);
181
+ result.frame = twMerge(CONTAIN_FRAME_CLASS, result.frame ?? base.frame);
182
+ result.media = twMerge(CONTAIN_MEDIA_CLASS, base.media);
172
183
  }
173
184
  return result;
174
185
  });
@@ -217,8 +228,9 @@ const framingDataAttrs = computed(() => {
217
228
  :rounded="rounded"
218
229
  :sizes="sizes"
219
230
  :priority="priority"
231
+ v-bind="{ ...forwardedAttrs, ...framingDataAttrs }"
232
+ :class="rootClass || undefined"
220
233
  :classes="mergedClasses"
221
- :style="rootStyle"
222
- v-bind="framingDataAttrs"
234
+ :style="[rootStyle, attrs.style]"
223
235
  />
224
236
  </template>