@thorprovider/storefront 0.6.3 → 0.9.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.
Files changed (161) hide show
  1. package/README.md +22 -2
  2. package/assets/templates/AGENTS.md +14 -2
  3. package/assets/templates/app/app/[[...slug]]/page.tsx +9 -2
  4. package/assets/templates/app/lib/__STOREFRONT__/account-address.ts +129 -0
  5. package/assets/templates/app/lib/__STOREFRONT__/account-lifecycle.client.tsx +2 -2
  6. package/assets/templates/app/lib/__STOREFRONT__/account-private.core.ts +143 -0
  7. package/assets/templates/app/lib/__STOREFRONT__/account-profile.ts +220 -0
  8. package/assets/templates/app/lib/__STOREFRONT__/actions.ts +1234 -75
  9. package/assets/templates/app/lib/__STOREFRONT__/addresses-port.ts +107 -0
  10. package/assets/templates/app/lib/__STOREFRONT__/checkout-shipping.core.ts +37 -0
  11. package/assets/templates/app/lib/__STOREFRONT__/commerce.ts +460 -35
  12. package/assets/templates/app/lib/__STOREFRONT__/confirmation.core.ts +240 -0
  13. package/assets/templates/app/lib/__STOREFRONT__/customer-profile-port.ts +103 -0
  14. package/assets/templates/app/lib/__STOREFRONT__/order-detail-port.ts +26 -0
  15. package/assets/templates/app/lib/__STOREFRONT__/orders-port.ts +30 -0
  16. package/assets/templates/app/lib/__STOREFRONT__/ports.ts +18 -0
  17. package/assets/templates/app/lib/__STOREFRONT__/projection-ownership.client.tsx +4 -4
  18. package/assets/templates/app/lib/__STOREFRONT__/session.ts +24 -6
  19. package/assets/templates/app/lib/__STOREFRONT__/state.core.ts +28 -1
  20. package/assets/templates/app/lib/__STOREFRONT__/views/sections/address-book-advanced.client.tsx +29 -0
  21. package/assets/templates/app/lib/__STOREFRONT__/views/sections/checkout-commerce-v1.client.tsx +19 -0
  22. package/assets/templates/app/lib/__STOREFRONT__/views/sections/checkout-commerce-v1.tsx +16 -0
  23. package/assets/templates/app/lib/__STOREFRONT__/views/sections/customer-profile.client.tsx +27 -0
  24. package/assets/templates/app/lib/__STOREFRONT__/views/sections/index.ts +5 -1
  25. package/assets/templates/app/lib/__STOREFRONT__/views/sections/marketplace-product-card.client.tsx +19 -0
  26. package/assets/templates/app/lib/__STOREFRONT__/views/sections/marketplace-product-card.tsx +16 -0
  27. package/assets/templates/app/lib/__STOREFRONT__/views/sections/mega-menu-universal.client.tsx +19 -0
  28. package/assets/templates/app/lib/__STOREFRONT__/views/sections/mega-menu-universal.tsx +16 -0
  29. package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.address-book-advanced.ts +437 -0
  30. package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.checkout-commerce-v1.ts +398 -0
  31. package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.customer-profile.ts +138 -0
  32. package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.marketplace-product-card.ts +67 -0
  33. package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.mega-menu-universal.ts +76 -0
  34. package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.universal-banner.ts +217 -0
  35. package/assets/templates/app/lib/__STOREFRONT__/views/sections/universal-banner.client.tsx +24 -0
  36. package/assets/templates/app/lib/__STOREFRONT__/views/sections/universal-banner.tsx +16 -0
  37. package/assets/templates/features/checkout/handlers.ts +348 -33
  38. package/assets/templates/features/checkout/state.ts +79 -3
  39. package/assets/templates/features/customer-addresses/handlers.ts +11 -0
  40. package/assets/templates/features/customer-addresses/state.ts +33 -0
  41. package/assets/templates/features/customer-auth/state.ts +10 -0
  42. package/assets/templates/features/customer-profile/handlers.ts +11 -0
  43. package/assets/templates/features/customer-profile/state.ts +18 -0
  44. package/assets/templates/views/account/address-book-advanced.defaults.ts +534 -0
  45. package/assets/templates/views/account/assembly/assembly.json +41 -0
  46. package/assets/templates/views/account/assembly/index.skeleton.tsx +229 -0
  47. package/assets/templates/views/account/assembly/registry.skeleton.tsx +1116 -0
  48. package/assets/templates/views/account/assembly/slots/addresses/AddressBookAdvanced/binding.json +5 -0
  49. package/assets/templates/views/account/assembly/slots/addresses/AddressBookAdvanced/catalog.part +4 -0
  50. package/assets/templates/views/account/assembly/slots/addresses/AddressBookAdvanced/element.part +5 -0
  51. package/assets/templates/views/account/assembly/slots/addresses/AddressBookAdvanced/registry.part +1 -0
  52. package/assets/templates/views/account/assembly/slots/addresses/cards/catalog.part +5 -0
  53. package/assets/templates/views/account/assembly/slots/addresses/cards/element.part +10 -0
  54. package/assets/templates/views/account/assembly/slots/addresses/cards/registry.part +1 -0
  55. package/assets/templates/views/account/assembly/slots/boot/AccountBoot/catalog.part +5 -0
  56. package/assets/templates/views/account/assembly/slots/boot/AccountBoot/element.part +5 -0
  57. package/assets/templates/views/account/assembly/slots/boot/AccountBoot/registry.part +1 -0
  58. package/assets/templates/views/account/assembly/slots/login/card/catalog.part +4 -0
  59. package/assets/templates/views/account/assembly/slots/login/card/element.part +13 -0
  60. package/assets/templates/views/account/assembly/slots/login/card/registry.part +1 -0
  61. package/assets/templates/views/account/assembly/slots/orders/OrderHistory/catalog.part +5 -0
  62. package/assets/templates/views/account/assembly/slots/orders/OrderHistory/element.part +5 -0
  63. package/assets/templates/views/account/assembly/slots/orders/OrderHistory/registry.part +2 -0
  64. package/assets/templates/views/account/assembly/slots/orders/OrderHistoryAdvanced/binding.json +5 -0
  65. package/assets/templates/views/account/assembly/slots/orders/OrderHistoryAdvanced/catalog.part +5 -0
  66. package/assets/templates/views/account/assembly/slots/orders/OrderHistoryAdvanced/element.part +5 -0
  67. package/assets/templates/views/account/assembly/slots/orders/OrderHistoryAdvanced/registry.part +1 -0
  68. package/assets/templates/views/account/assembly/slots/profile/CustomerProfileAdvanced/binding.json +5 -0
  69. package/assets/templates/views/account/assembly/slots/profile/CustomerProfileAdvanced/catalog.part +4 -0
  70. package/assets/templates/views/account/assembly/slots/profile/CustomerProfileAdvanced/element.part +5 -0
  71. package/assets/templates/views/account/assembly/slots/profile/CustomerProfileAdvanced/registry.part +1 -0
  72. package/assets/templates/views/account/assembly/slots/profile/form/catalog.part +5 -0
  73. package/assets/templates/views/account/assembly/slots/profile/form/element.part +10 -0
  74. package/assets/templates/views/account/assembly/slots/profile/form/registry.part +1 -0
  75. package/assets/templates/views/account/assembly/slots/register/SignUpPage1/catalog.part +4 -0
  76. package/assets/templates/views/account/assembly/slots/register/SignUpPage1/element.part +13 -0
  77. package/assets/templates/views/account/assembly/slots/register/SignUpPage1/registry.part +1 -0
  78. package/assets/templates/views/account/assembly/slots/summary/stack/catalog.part +5 -0
  79. package/assets/templates/views/account/assembly/slots/summary/stack/element.part +5 -0
  80. package/assets/templates/views/account/assembly/slots/summary/stack/registry.part +1 -0
  81. package/assets/templates/views/account/assembly/slots/summary/tabs/catalog.part +5 -0
  82. package/assets/templates/views/account/assembly/slots/summary/tabs/element.part +5 -0
  83. package/assets/templates/views/account/assembly/slots/summary/tabs/registry.part +1 -0
  84. package/assets/templates/views/account/content.ts +326 -0
  85. package/assets/templates/views/account/customer-profile.defaults.ts +136 -0
  86. package/assets/templates/views/account/index.tsx +218 -35
  87. package/assets/templates/views/account/order-detail.client.tsx +35 -0
  88. package/assets/templates/views/account/order-detail.defaults.ts +457 -0
  89. package/assets/templates/views/account/orders-advanced.client.tsx +166 -0
  90. package/assets/templates/views/account/orders-advanced.defaults.ts +230 -0
  91. package/assets/templates/views/account/registry.tsx +944 -369
  92. package/assets/templates/views/account/schema.ts +50 -0
  93. package/assets/templates/views/account/sections-data.ts +2 -0
  94. package/assets/templates/views/cart/content.ts +1 -0
  95. package/assets/templates/views/category/assembly/index.skeleton.tsx +1 -0
  96. package/assets/templates/views/category/assembly/slots/filter/CategoryListing/element.part +1 -0
  97. package/assets/templates/views/category/content.ts +2 -0
  98. package/assets/templates/views/category/index.tsx +2 -0
  99. package/assets/templates/views/category/sections-data.ts +2 -0
  100. package/assets/templates/views/checkout/checkout-commerce-hosted.tsx +1089 -0
  101. package/assets/templates/views/checkout/content.ts +114 -2
  102. package/assets/templates/views/checkout/index.tsx +7 -1
  103. package/assets/templates/views/checkout/props.ts +70 -22
  104. package/assets/templates/views/checkout/registry.tsx +400 -71
  105. package/assets/templates/views/checkout/schema.ts +260 -9
  106. package/assets/templates/views/home/assembly/assembly.json +28 -0
  107. package/assets/templates/views/home/assembly/index.skeleton.tsx +1 -0
  108. package/assets/templates/views/home/content.ts +2 -0
  109. package/assets/templates/views/home/index.tsx +1 -0
  110. package/assets/templates/views/home/sections-data.ts +2 -0
  111. package/assets/templates/views/product/content.ts +1 -0
  112. package/assets/templates/views/static/content.ts +1 -0
  113. package/bin/storefront.js +343 -13
  114. package/package.json +2 -1
  115. package/recipes/adapter-surface.json +158 -0
  116. package/recipes/archetypes.json +38 -3
  117. package/recipes/catalog.json +138 -1
  118. package/recipes/feature.schema.json +9 -0
  119. package/recipes/features.json +72 -1
  120. package/recipes/manifest.schema.json +5 -0
  121. package/recipes/recipe.schema.json +14 -2
  122. package/recipes/recipes.json +35 -5
  123. package/recipes/section.schema.json +112 -0
  124. package/recipes/sections.json +289 -3
  125. package/recipes/validate.mjs +83 -1
  126. package/scripts/adapter-surface.mjs +41 -0
  127. package/scripts/agent-blocks.mjs +700 -0
  128. package/scripts/block-validator.mjs +45 -0
  129. package/scripts/candidate.mjs +5 -4
  130. package/scripts/composers.mjs +7 -2
  131. package/scripts/default-sections.mjs +78 -0
  132. package/scripts/file-classes.mjs +15 -0
  133. package/scripts/generate-adapter-surface.mjs +148 -0
  134. package/scripts/operations.mjs +100 -0
  135. package/scripts/reconcile.mjs +67 -39
  136. package/scripts/section-configure.mjs +316 -0
  137. package/scripts/sync-assets.mjs +1 -0
  138. package/scripts/view-assembly.mjs +101 -14
  139. package/skills/sf-feature/SKILL.md +19 -0
  140. package/skills/sf-view-gen/SKILL.md +79 -7
  141. package/skills/sf-view-gen/assets/recipes/archetypes.json +38 -3
  142. package/skills/sf-view-gen/assets/recipes/catalog.json +138 -1
  143. package/skills/sf-view-gen/assets/recipes/features.json +72 -1
  144. package/skills/sf-view-gen/assets/recipes/recipes.json +35 -5
  145. package/skills/sf-view-gen/assets/recipes/section.schema.json +112 -0
  146. package/skills/sf-view-gen/assets/recipes/sections.json +289 -3
  147. package/skills/sf-view-gen/assets/templates/views/sections/checkout-commerce-v1.client.tsx +19 -0
  148. package/skills/sf-view-gen/assets/templates/views/sections/checkout-commerce-v1.tsx +16 -0
  149. package/skills/sf-view-gen/assets/templates/views/sections/marketplace-product-card.client.tsx +19 -0
  150. package/skills/sf-view-gen/assets/templates/views/sections/marketplace-product-card.tsx +16 -0
  151. package/skills/sf-view-gen/assets/templates/views/sections/mega-menu-universal.client.tsx +19 -0
  152. package/skills/sf-view-gen/assets/templates/views/sections/mega-menu-universal.tsx +16 -0
  153. package/skills/sf-view-gen/assets/templates/views/sections/schema.checkout-commerce-v1.ts +398 -0
  154. package/skills/sf-view-gen/assets/templates/views/sections/schema.marketplace-product-card.ts +67 -0
  155. package/skills/sf-view-gen/assets/templates/views/sections/schema.mega-menu-universal.ts +76 -0
  156. package/skills/sf-view-gen/assets/templates/views/sections/schema.universal-banner.ts +217 -0
  157. package/skills/sf-view-gen/assets/templates/views/sections/universal-banner.client.tsx +24 -0
  158. package/skills/sf-view-gen/assets/templates/views/sections/universal-banner.tsx +16 -0
  159. package/skills/sf-view-gen/scripts/validate.mjs +83 -1
  160. package/skills/storefront-workflow/SKILL.md +5 -0
  161. package/skills/storefront-workflow/references/mobile-responsiveness.md +1 -1
@@ -0,0 +1,5 @@
1
+ {
2
+ "module": "../sections/address-book-advanced.client",
3
+ "import": "addressBookAdvancedRegistry",
4
+ "as": "addressBookAdvancedRegistry"
5
+ }
@@ -0,0 +1,4 @@
1
+ AddressBookAdvanced: {
2
+ props: addressBookAdvancedPropsSchema,
3
+ description: "Designer address book: saved personal addresses with search, filters, default shipping/billing and a full create/edit form, supplied by the addresses host port.",
4
+ },
@@ -0,0 +1,5 @@
1
+ 'account.addresses': {
2
+ type: 'AddressBookAdvanced',
3
+ visible: {"$and":[{"$state":"/accountAuthenticated"},{"$state":"/accountAddressesAvailable","eq":true}]},
4
+ props: addressBookAdvancedDefaults,
5
+ },
@@ -0,0 +1 @@
1
+ AddressBookAdvanced: (ctx) => <addressBookAdvancedRegistry.AddressBookAdvanced {...ctx} />,
@@ -0,0 +1,5 @@
1
+ AccountAddresses: {
2
+ props: accountAddressPropsSchema,
3
+ description:
4
+ "Signed-in customer's address book rendered by the canonical `AddressBook` block, with the canonical `AddressForm` for create/edit.",
5
+ },
@@ -0,0 +1,10 @@
1
+ 'account.addresses': {
2
+ type: 'AccountAddresses',
3
+ visible: {
4
+ $and: [
5
+ { $state: '/accountAuthenticated' },
6
+ { $state: '/accountAddressesAvailable', eq: true },
7
+ ],
8
+ },
9
+ props: accountContent.addresses,
10
+ },
@@ -0,0 +1 @@
1
+ AccountAddresses: (ctx) => <AccountAddressesPanel {...ctx} />,
@@ -0,0 +1,5 @@
1
+ AccountBoot: {
2
+ props: accountEmptyPropsSchema,
3
+ description:
4
+ 'Passive account boundary: shows a retryable unavailable status when the session cannot be resolved, otherwise nothing. Never fetches identity.',
5
+ },
@@ -0,0 +1,5 @@
1
+ 'account.boot': {
2
+ type: 'AccountBoot',
3
+ props: {},
4
+ on: { retry: { action: 'retryAccountSession' } },
5
+ },
@@ -0,0 +1 @@
1
+ AccountBoot: ({ emit }) => <AccountBoundary emit={emit} />,
@@ -0,0 +1,4 @@
1
+ AccountLogin: {
2
+ props: accountLoginPropsSchema,
3
+ description: 'Sign-in page with email and password and a link to create an account.',
4
+ },
@@ -0,0 +1,13 @@
1
+ 'account.login': {
2
+ type: 'AccountLogin',
3
+ visible: {
4
+ $and: [
5
+ { $state: '/accountAuthenticated', not: true },
6
+ { $state: '/accountResolution', neq: 'unavailable' },
7
+ { $state: '/accountMode', eq: 'login' },
8
+ { $state: '/accountReconciling', not: true },
9
+ ],
10
+ },
11
+ props: accountContent.login,
12
+ on: { showRegister: { action: 'showRegister' } },
13
+ },
@@ -0,0 +1 @@
1
+ AccountLogin: (ctx) => <AccountLoginPanel {...ctx} />,
@@ -0,0 +1,5 @@
1
+ AccountOrders: {
2
+ props: accountOrdersPropsSchema,
3
+ description:
4
+ "Signed-in customer's order history rendered by the canonical `OrderHistory` block (cards) with canonical Money amounts: the block owns the empty state, the host owns loading/error and an inline order detail.",
5
+ },
@@ -0,0 +1,5 @@
1
+ 'account.orders': {
2
+ type: 'AccountOrders',
3
+ visible: { $state: '/accountAuthenticated' },
4
+ props: accountContent.orders,
5
+ },
@@ -0,0 +1,2 @@
1
+ // `AccountOrders` is bound statically in the skeleton so the canonical
2
+ // rollback surface travels with every orders variant.
@@ -0,0 +1,5 @@
1
+ {
2
+ "module": "./orders-advanced.client",
3
+ "import": "AccountOrdersAdvancedPanel",
4
+ "as": "AccountOrdersAdvancedPanel"
5
+ }
@@ -0,0 +1,5 @@
1
+ AccountOrdersAdvanced: {
2
+ props: accountOrdersAdvancedPropsSchema,
3
+ description:
4
+ "Signed-in customer's order history rendered by the default `OrderHistoryAdvanced` port block: search, quick filters, sort, counts and cards from the host `OrdersPort`. The canonical `OrderHistory` variant remains selectable as the minimal fallback.",
5
+ },
@@ -0,0 +1,5 @@
1
+ 'account.orders': {
2
+ type: 'AccountOrdersAdvanced',
3
+ visible: { $state: '/accountAuthenticated' },
4
+ props: ordersAdvancedContent,
5
+ },
@@ -0,0 +1 @@
1
+ AccountOrdersAdvanced: (ctx) => <AccountOrdersAdvancedPanel {...ctx} />,
@@ -0,0 +1,5 @@
1
+ {
2
+ "module": "../sections/customer-profile.client",
3
+ "import": "customerProfileRegistry",
4
+ "as": "customerProfileRegistry"
5
+ }
@@ -0,0 +1,4 @@
1
+ CustomerProfile: {
2
+ props: customerProfilePropsSchema,
3
+ description: "Designer customer profile surface: identity, contact, preferences, professional data and store-defined fields, supplied by the customerProfile host port.",
4
+ },
@@ -0,0 +1,5 @@
1
+ 'account.profile': {
2
+ type: 'CustomerProfile',
3
+ visible: {"$and":[{"$state":"/accountAuthenticated"},{"$state":"/accountProfileAvailable","eq":true}]},
4
+ props: customerProfileDefaults,
5
+ },
@@ -0,0 +1 @@
1
+ CustomerProfile: (ctx) => <customerProfileRegistry.CustomerProfile {...ctx} />,
@@ -0,0 +1,5 @@
1
+ AccountProfile: {
2
+ props: accountProfilePropsSchema,
3
+ description:
4
+ 'Signed-in profile editor. Renders only the host-declared fields; the email control is omitted when the backend cannot change it.',
5
+ },
@@ -0,0 +1,10 @@
1
+ 'account.profile': {
2
+ type: 'AccountProfile',
3
+ visible: {
4
+ $and: [
5
+ { $state: '/accountAuthenticated' },
6
+ { $state: '/accountProfileAvailable', eq: true },
7
+ ],
8
+ },
9
+ props: accountContent.profile,
10
+ },
@@ -0,0 +1 @@
1
+ AccountProfile: (ctx) => <AccountProfilePanel {...ctx} />,
@@ -0,0 +1,4 @@
1
+ AccountRegister: {
2
+ props: accountRegisterPropsSchema,
3
+ description: 'Registration page with name, email, and password and a link to sign in.',
4
+ },
@@ -0,0 +1,13 @@
1
+ 'account.register': {
2
+ type: 'AccountRegister',
3
+ visible: {
4
+ $and: [
5
+ { $state: '/accountAuthenticated', not: true },
6
+ { $state: '/accountResolution', neq: 'unavailable' },
7
+ { $state: '/accountMode', eq: 'register' },
8
+ { $state: '/accountReconciling', not: true },
9
+ ],
10
+ },
11
+ props: accountContent.register,
12
+ on: { showLogin: { action: 'showLogin' } },
13
+ },
@@ -0,0 +1 @@
1
+ AccountRegister: (ctx) => <AccountRegisterPanel {...ctx} />,
@@ -0,0 +1,5 @@
1
+ AccountFrame: {
2
+ props: accountFramePropsSchema,
3
+ description:
4
+ 'Signed-in account frame: identity summary plus module navigation (presentations: stack, tabs).',
5
+ },
@@ -0,0 +1,5 @@
1
+ 'account.summary': {
2
+ type: 'AccountFrame',
3
+ visible: { $state: '/accountAuthenticated' },
4
+ props: { ...accountContent.frame, presentation: 'stack' },
5
+ },
@@ -0,0 +1 @@
1
+ AccountFrame: (ctx) => <AccountFramePanel {...ctx} />,
@@ -0,0 +1,5 @@
1
+ AccountFrame: {
2
+ props: accountFramePropsSchema,
3
+ description:
4
+ 'Signed-in account frame: identity summary plus module navigation (presentations: stack, tabs).',
5
+ },
@@ -0,0 +1,5 @@
1
+ 'account.summary': {
2
+ type: 'AccountFrame',
3
+ visible: { $state: '/accountAuthenticated' },
4
+ props: { ...accountContent.frame, presentation: 'tabs' },
5
+ },
@@ -0,0 +1 @@
1
+ AccountFrame: (ctx) => <AccountFramePanel {...ctx} />,
@@ -4,8 +4,124 @@
4
4
  // view module (./index.tsx) imports it and wires it into the element tree, so
5
5
  // your edits here survive `storefront sync` and unit removal. Plain data only:
6
6
  // no React and no server imports.
7
+ // A configured `sections/<id>.json` sidecar wins over this map for that instance.
7
8
 
8
9
  export const accountContent = {
10
+ frame: {
11
+ labels: {
12
+ title: 'Mi cuenta',
13
+ navLabel: 'Secciones de la cuenta',
14
+ },
15
+ },
16
+ shell: {
17
+ loading: 'Cargando tu cuenta…',
18
+ retry: 'Reintentar',
19
+ reference: 'Referencia: {reference}',
20
+ backToAccount: 'Mi cuenta',
21
+ errorTitle: 'No pudimos cargar tu cuenta',
22
+ errorBody: 'Vuelve a intentarlo en unos segundos.',
23
+ header: {
24
+ greeting: 'Hola, {name}',
25
+ signOut: 'Cerrar sesión',
26
+ verified: 'Correo verificado',
27
+ memberSince: 'Cliente desde {date}',
28
+ },
29
+ },
30
+ overview: {
31
+ sections: 'Secciones de tu cuenta',
32
+ },
33
+ placeholder: {
34
+ badge: 'Próximamente',
35
+ upcoming: 'Qué encontrarás aquí',
36
+ },
37
+ modules: {
38
+ orders: 'Pedidos',
39
+ profile: 'Mis datos',
40
+ addresses: 'Direcciones',
41
+ },
42
+ shellModules: {
43
+ overview: {
44
+ label: 'Mi cuenta',
45
+ description: 'Todas las secciones de tu cuenta en un solo lugar.',
46
+ },
47
+ orders: {
48
+ label: 'Mis pedidos',
49
+ description: 'Consulta tus compras, entregas y devoluciones.',
50
+ },
51
+ profile: {
52
+ label: 'Mi perfil',
53
+ description: 'Administra tus datos personales y de contacto.',
54
+ },
55
+ addresses: {
56
+ label: 'Direcciones',
57
+ description: 'Administra tus direcciones de envío y facturación.',
58
+ },
59
+ favorites: {
60
+ label: 'Listas de compras',
61
+ description: 'Guarda productos para comprarlos después.',
62
+ planned: [
63
+ 'Listas con nombre y productos guardados',
64
+ 'Mover productos a la cesta',
65
+ 'Listas compartidas cuando la tienda lo permita',
66
+ ],
67
+ note: 'Se activa cuando las listas de compras están habilitadas.',
68
+ },
69
+ },
70
+ shellCards: {
71
+ orders: {
72
+ description: 'Consulta tus compras, entregas y devoluciones.',
73
+ },
74
+ profile: {
75
+ description: 'Administra tus datos personales y de contacto.',
76
+ },
77
+ addresses: {
78
+ description: 'Administra tus direcciones de envío y facturación.',
79
+ },
80
+ favorites: {
81
+ description: 'Guarda productos para comprarlos después.',
82
+ },
83
+ },
84
+ profile: {
85
+ labels: {
86
+ title: 'Datos personales',
87
+ description: 'Actualiza los datos de tu cuenta.',
88
+ submit: 'Guardar cambios',
89
+ saving: 'Guardando…',
90
+ },
91
+ },
92
+ addresses: {
93
+ loadingLabel: 'Cargando direcciones…',
94
+ retryLabel: 'Reintentar',
95
+ labels: {
96
+ title: 'Direcciones',
97
+ description: 'Direcciones guardadas para tus pedidos.',
98
+ emptyLabel: 'Aún no tienes direcciones guardadas.',
99
+ addLabel: 'Añadir dirección',
100
+ editLabel: 'Editar',
101
+ deleteLabel: 'Eliminar',
102
+ confirmDeleteLabel: '¿Eliminar esta dirección?',
103
+ cancelLabel: 'Cancelar',
104
+ defaultShippingLabel: 'Envío predeterminado',
105
+ defaultBillingLabel: 'Facturación predeterminada',
106
+ setDefaultShippingLabel: 'Usar para envío',
107
+ setDefaultBillingLabel: 'Usar para facturación',
108
+ },
109
+ },
110
+ // Declared address fields. The panel fills each value from the address being
111
+ // edited; a country select is intentionally not declared because the account
112
+ // has no region-scoped country list to offer (no invented options).
113
+ addressFields: [
114
+ { name: 'firstName', label: 'Nombre', required: true, autoComplete: 'given-name' },
115
+ { name: 'lastName', label: 'Apellidos', required: true, autoComplete: 'family-name' },
116
+ { name: 'address1', label: 'Dirección', required: true, autoComplete: 'address-line1' },
117
+ { name: 'address2', label: 'Dirección (línea 2)', autoComplete: 'address-line2' },
118
+ { name: 'city', label: 'Ciudad', required: true, autoComplete: 'address-level2' },
119
+ { name: 'province', label: 'Provincia', autoComplete: 'address-level1' },
120
+ { name: 'postalCode', label: 'Código postal', autoComplete: 'postal-code' },
121
+ { name: 'countryCode', label: 'País (código ISO)', required: true, autoComplete: 'country' },
122
+ { name: 'phone', label: 'Teléfono', type: 'tel', autoComplete: 'tel' },
123
+ { name: 'label', label: 'Nombre de la dirección' },
124
+ ] as const,
9
125
  login: {
10
126
  logoText: '__SITE_NAME__',
11
127
  welcomeTitleLabel: 'Bienvenido de nuevo',
@@ -43,4 +159,214 @@ export const accountContent = {
43
159
  errorLabel: 'No se pudieron cargar tus pedidos.',
44
160
  loadingLabel: 'Cargando pedidos…',
45
161
  },
162
+ ordersAdvanced: {
163
+ mode: 'b2c',
164
+ locale: 'es-MX',
165
+ pageSize: 10,
166
+ closeLabel: 'Cerrar',
167
+ paymentLabel: 'Pago',
168
+ fulfilmentLabel: 'Entrega',
169
+ capabilities: {
170
+ tableView: false,
171
+ shipmentTracking: false,
172
+ pickupTracking: false,
173
+ returns: false,
174
+ exchanges: false,
175
+ claims: false,
176
+ reorder: false,
177
+ invoices: false,
178
+ bulkSelection: false,
179
+ export: false,
180
+ companyOrders: false,
181
+ purchaseOrders: false,
182
+ paymentTerms: false,
183
+ approvals: false,
184
+ },
185
+ labels: {
186
+ header: {
187
+ title: 'Mis pedidos',
188
+ description:
189
+ 'Consulta tus compras, revisa su estado y encuentra rápidamente cualquier pedido.',
190
+ searchLabel:
191
+ 'Buscar por número de pedido, producto, SKU, referencia, orden de compra o comprador',
192
+ searchPlaceholder: 'Buscar',
193
+ clearSearch: 'Limpiar búsqueda',
194
+ quickFilters: 'Categorías de pedidos',
195
+ clearList: 'Limpiar búsqueda y filtros',
196
+ sortLabel: 'Ordenar por',
197
+ sort: {
198
+ newest: 'Recientes',
199
+ oldest: 'Antiguos',
200
+ 'total-desc': 'Mayor importe',
201
+ 'total-asc': 'Menor importe',
202
+ updated: 'Actualizado',
203
+ },
204
+ viewCards: 'Tarjetas',
205
+ viewTable: 'Tabla',
206
+ results: '{count} pedidos',
207
+ resultsOne: '1 pedido',
208
+ updating: 'Actualizando resultados…',
209
+ columns: 'Columnas',
210
+ },
211
+ quick: {
212
+ all: 'Todos',
213
+ 'in-progress': 'En curso',
214
+ completed: 'Completados',
215
+ cancelled: 'Cancelados',
216
+ attention: 'Requieren atención',
217
+ },
218
+ status: {
219
+ pending: 'Pendiente',
220
+ preparing: 'En preparación',
221
+ shipped: 'Enviado',
222
+ delivered: 'Entregado',
223
+ completed: 'Completado',
224
+ cancelled: 'Cancelado',
225
+ 'partially-delivered': 'Entrega parcial',
226
+ 'ready-for-pickup': 'Listo para recoger',
227
+ delayed: 'Retrasado',
228
+ refunded: 'Reembolsado',
229
+ 'partially-refunded': 'Reembolso parcial',
230
+ attention: 'Requiere atención',
231
+ },
232
+ payment: {
233
+ unpaid: 'No pagado',
234
+ authorized: 'Autorizado',
235
+ partially_paid: 'Pago parcial',
236
+ paid: 'Pagado',
237
+ },
238
+ refund: {
239
+ none: 'Sin reembolso',
240
+ partial: 'Reembolso parcial',
241
+ full: 'Reembolsado',
242
+ },
243
+ returns: {
244
+ none: 'Sin devolución',
245
+ requested: 'Devolución solicitada',
246
+ in_progress: 'Devolución en proceso',
247
+ completed: 'Devolución finalizada',
248
+ },
249
+ fulfilment: {
250
+ unfulfilled: 'Sin preparar',
251
+ preparing: 'Preparando',
252
+ shipped: 'Enviado',
253
+ partially_delivered: 'Parcialmente entregado',
254
+ delivered: 'Entregado',
255
+ delayed: 'Retrasado',
256
+ ready_for_pickup: 'Listo para recoger',
257
+ },
258
+ mode: {
259
+ shipping: 'Envío',
260
+ pickup: 'Recogida',
261
+ mixed: 'Mixto',
262
+ },
263
+ invoiceStatus: {
264
+ not_issued: 'Sin factura',
265
+ pending: 'Factura pendiente',
266
+ issued: 'Facturado',
267
+ overdue: 'Factura vencida',
268
+ },
269
+ card: {
270
+ order: 'Pedido {number}',
271
+ items: '{count} artículos',
272
+ itemsOne: '1 artículo',
273
+ total: 'Total',
274
+ viewOrder: 'Ver pedido',
275
+ moreActions: 'Más acciones',
276
+ deliveries: '{done} de {total} entregas',
277
+ readyForPickup: 'Listo para recoger',
278
+ itemImage: 'Producto sin imagen',
279
+ moreItems: '+{count}',
280
+ amountUnavailable: 'Importe no disponible',
281
+ partiallyCancelled: 'Cancelación parcial',
282
+ refundPending: 'Reembolso pendiente',
283
+ notCharged: 'Sin cobro realizado',
284
+ },
285
+ actions: {
286
+ view: 'Ver pedido',
287
+ track: 'Seguir envío',
288
+ reorder: 'Repetir compra',
289
+ invoice: 'Descargar factura',
290
+ return: 'Solicitar devolución',
291
+ exchange: 'Solicitar cambio',
292
+ problem: 'Reportar problema',
293
+ cancel: 'Solicitar cancelación',
294
+ 'pay-balance': 'Pagar saldo pendiente',
295
+ support: 'Contactar soporte',
296
+ },
297
+ bulk: {
298
+ selected: '{count} seleccionados',
299
+ selectAll: 'Seleccionar los {count} resultados',
300
+ clear: 'Limpiar selección',
301
+ export: 'Exportar selección',
302
+ documents: 'Descargar documentos',
303
+ },
304
+ pagination: {
305
+ previous: 'Anterior',
306
+ next: 'Siguiente',
307
+ pageOf: 'Página {page} de {count}',
308
+ range: '{from}–{to} de {count}',
309
+ pageSize: 'Por página',
310
+ },
311
+ states: {
312
+ loading: 'Cargando pedidos…',
313
+ emptyTitle: 'Todavía no tienes pedidos',
314
+ emptyBody: 'Cuando compres, tus pedidos aparecerán aquí.',
315
+ noResultsTitle: 'No encontramos pedidos con estos filtros',
316
+ noResultsBody: 'Prueba a cambiar la búsqueda o a limpiar los filtros.',
317
+ errorTitle: 'No pudimos cargar tus pedidos',
318
+ errorBody: 'Vuelve a intentarlo en unos segundos.',
319
+ retry: 'Reintentar',
320
+ partial: 'Algunos datos no se pudieron cargar; los pedidos que ves siguen siendo válidos.',
321
+ forbiddenTitle: 'Sin acceso a los pedidos',
322
+ forbiddenBody: 'Tu cuenta no tiene permiso para consultar este historial.',
323
+ },
324
+ table: {
325
+ caption: 'Pedidos',
326
+ columns: {
327
+ selection: 'Selección',
328
+ order: 'Pedido',
329
+ date: 'Fecha',
330
+ buyer: 'Comprador',
331
+ company: 'Empresa',
332
+ purchaseOrder: 'Orden de compra',
333
+ items: 'Artículos',
334
+ status: 'Estado',
335
+ payment: 'Pago',
336
+ fulfilment: 'Entrega',
337
+ total: 'Total',
338
+ actions: 'Acciones',
339
+ },
340
+ sortBy: 'Ordenar por {column}',
341
+ },
342
+ demo: {
343
+ title: 'Demostración',
344
+ hint: 'Los controles cambian el componente real; los datos son simulados.',
345
+ scenario: 'Escenario',
346
+ mode: 'Modo',
347
+ modeB2c: 'B2C',
348
+ modeB2b: 'B2B',
349
+ capabilities: 'Capacidades',
350
+ callback: 'Última acción delegada: {value}',
351
+ noCallback: 'Sin acciones todavía',
352
+ note: 'No se ha ejecutado ninguna operación real.',
353
+ capabilityLabels: {
354
+ tableView: 'Vista de tabla',
355
+ shipmentTracking: 'Seguimiento de envío',
356
+ pickupTracking: 'Seguimiento de recogida',
357
+ returns: 'Devoluciones',
358
+ exchanges: 'Cambios',
359
+ claims: 'Incidencias',
360
+ reorder: 'Repetir compra',
361
+ invoices: 'Facturas',
362
+ bulkSelection: 'Selección múltiple',
363
+ export: 'Exportación',
364
+ companyOrders: 'Pedidos empresa',
365
+ purchaseOrders: 'Órdenes de compra',
366
+ paymentTerms: 'Condiciones de pago',
367
+ approvals: 'Aprobaciones',
368
+ },
369
+ },
370
+ },
371
+ },
46
372
  }