@shopify/ui-extensions 2025.10.0-rc.37 → 2025.10.0-rc.38

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 (209) hide show
  1. package/build/ts/shared.d.ts +24 -4
  2. package/build/ts/shared.d.ts.map +1 -1
  3. package/build/ts/surfaces/admin/components/AdminAction.d.ts +1 -1
  4. package/build/ts/surfaces/admin/components/AdminBlock.d.ts +1 -1
  5. package/build/ts/surfaces/admin/components/AdminPrintAction.d.ts +1 -1
  6. package/build/ts/surfaces/admin/components/Avatar.d.ts +1 -1
  7. package/build/ts/surfaces/admin/components/Badge.d.ts +1 -1
  8. package/build/ts/surfaces/admin/components/Banner.d.ts +1 -1
  9. package/build/ts/surfaces/admin/components/Box.d.ts +8 -1
  10. package/build/ts/surfaces/admin/components/Button.d.ts +1 -1
  11. package/build/ts/surfaces/admin/components/ButtonGroup.d.ts +14 -2
  12. package/build/ts/surfaces/admin/components/Checkbox.d.ts +1 -1
  13. package/build/ts/surfaces/admin/components/Chip.d.ts +1 -1
  14. package/build/ts/surfaces/admin/components/Choice.d.ts +1 -1
  15. package/build/ts/surfaces/admin/components/ChoiceList.d.ts +1 -1
  16. package/build/ts/surfaces/admin/components/Clickable.d.ts +8 -1
  17. package/build/ts/surfaces/admin/components/ClickableChip.d.ts +1 -1
  18. package/build/ts/surfaces/admin/components/ColorField.d.ts +3 -1
  19. package/build/ts/surfaces/admin/components/ColorPicker.d.ts +1 -1
  20. package/build/ts/surfaces/admin/components/DateField/DateField.doc.d.ts +2 -2
  21. package/build/ts/surfaces/admin/components/DateField/DateField.doc.d.ts.map +1 -1
  22. package/build/ts/surfaces/admin/components/DateField.d.ts +1 -1
  23. package/build/ts/surfaces/admin/components/DatePicker.d.ts +1 -1
  24. package/build/ts/surfaces/admin/components/Divider.d.ts +1 -1
  25. package/build/ts/surfaces/admin/components/DropZone.d.ts +1 -1
  26. package/build/ts/surfaces/admin/components/EmailField.d.ts +1 -1
  27. package/build/ts/surfaces/admin/components/Form.d.ts +1 -1
  28. package/build/ts/surfaces/admin/components/FunctionSettings.d.ts +1 -1
  29. package/build/ts/surfaces/admin/components/Grid.d.ts +20 -1
  30. package/build/ts/surfaces/admin/components/GridItem.d.ts +8 -1
  31. package/build/ts/surfaces/admin/components/Heading.d.ts +1 -1
  32. package/build/ts/surfaces/admin/components/Icon.d.ts +1 -1
  33. package/build/ts/surfaces/admin/components/Image.d.ts +8 -1
  34. package/build/ts/surfaces/admin/components/Link.d.ts +1 -1
  35. package/build/ts/surfaces/admin/components/ListItem.d.ts +1 -1
  36. package/build/ts/surfaces/admin/components/Menu.d.ts +1 -1
  37. package/build/ts/surfaces/admin/components/Modal/Modal.ab.doc.d.ts +4 -0
  38. package/build/ts/surfaces/admin/components/Modal/Modal.ab.doc.d.ts.map +1 -0
  39. package/build/ts/surfaces/admin/components/Modal.d.ts +1 -1
  40. package/build/ts/surfaces/admin/components/MoneyField.d.ts +1 -3
  41. package/build/ts/surfaces/admin/components/NumberField.d.ts +1 -3
  42. package/build/ts/surfaces/admin/components/Option.d.ts +1 -1
  43. package/build/ts/surfaces/admin/components/OptionGroup.d.ts +1 -1
  44. package/build/ts/surfaces/admin/components/OrderedList.d.ts +1 -1
  45. package/build/ts/surfaces/admin/components/Page.d.ts +1 -1
  46. package/build/ts/surfaces/admin/components/Paragraph.d.ts +1 -1
  47. package/build/ts/surfaces/admin/components/PasswordField.d.ts +1 -1
  48. package/build/ts/surfaces/admin/components/QueryContainer.d.ts +1 -1
  49. package/build/ts/surfaces/admin/components/SearchField.d.ts +1 -1
  50. package/build/ts/surfaces/admin/components/Section.d.ts +1 -1
  51. package/build/ts/surfaces/admin/components/Select.d.ts +1 -1
  52. package/build/ts/surfaces/admin/components/Spinner.d.ts +1 -1
  53. package/build/ts/surfaces/admin/components/Stack.d.ts +14 -1
  54. package/build/ts/surfaces/admin/components/Switch.d.ts +1 -1
  55. package/build/ts/surfaces/admin/components/Table.d.ts +3 -2
  56. package/build/ts/surfaces/admin/components/TableBody.d.ts +1 -1
  57. package/build/ts/surfaces/admin/components/TableCell.d.ts +1 -1
  58. package/build/ts/surfaces/admin/components/TableHeader.d.ts +3 -2
  59. package/build/ts/surfaces/admin/components/TableHeaderRow.d.ts +1 -1
  60. package/build/ts/surfaces/admin/components/TableRow.d.ts +1 -1
  61. package/build/ts/surfaces/admin/components/Text.d.ts +1 -1
  62. package/build/ts/surfaces/admin/components/TextArea.d.ts +1 -1
  63. package/build/ts/surfaces/admin/components/TextField.d.ts +1 -1
  64. package/build/ts/surfaces/admin/components/Thumbnail.d.ts +1 -1
  65. package/build/ts/surfaces/admin/components/Tooltip.d.ts +1 -1
  66. package/build/ts/surfaces/admin/components/URLField.d.ts +1 -1
  67. package/build/ts/surfaces/admin/components/UnorderedList.d.ts +1 -1
  68. package/build/ts/surfaces/admin/components/patterns/indexTable.ab.doc.d.ts.map +1 -1
  69. package/build/ts/surfaces/admin/components/shared.d.ts +245 -222
  70. package/build/ts/surfaces/admin/docs-types.d.ts +4 -0
  71. package/build/ts/surfaces/admin/docs-types.d.ts.map +1 -1
  72. package/build/ts/surfaces/customer-account/api/cart-line/cart-line-item.d.ts +2 -2
  73. package/build/ts/surfaces/customer-account/api/cart-line/cart-line-item.d.ts.map +1 -1
  74. package/build/ts/surfaces/customer-account/api/order-status/order-status.d.ts +29 -29
  75. package/build/ts/surfaces/customer-account/api/order-status/order-status.d.ts.map +1 -1
  76. package/build/ts/surfaces/customer-account/api/shared.d.ts +6 -6
  77. package/build/ts/surfaces/customer-account/api/shared.d.ts.map +1 -1
  78. package/build/ts/surfaces/customer-account/api/standard-api/standard-api.d.ts +6 -6
  79. package/build/ts/surfaces/customer-account/api/standard-api/standard-api.d.ts.map +1 -1
  80. package/build/ts/surfaces/customer-account/api.d.ts +1 -1
  81. package/build/ts/surfaces/customer-account/api.d.ts.map +1 -1
  82. package/build/ts/surfaces/customer-account/preact/subscription.d.ts +2 -2
  83. package/build/ts/surfaces/customer-account/preact/subscription.d.ts.map +1 -1
  84. package/build/ts/surfaces/point-of-sale/components/Badge.d.ts +1 -1
  85. package/build/ts/surfaces/point-of-sale/components/Box.d.ts +82 -8
  86. package/build/ts/surfaces/point-of-sale/components/Icon.d.ts +111 -30
  87. package/build/ts/surfaces/point-of-sale/components/PosBlock/PosBlock.doc.d.ts +4 -0
  88. package/build/ts/surfaces/point-of-sale/components/PosBlock/PosBlock.doc.d.ts.map +1 -0
  89. package/build/ts/surfaces/point-of-sale/components/PosBlock.d.ts +64 -0
  90. package/build/ts/surfaces/point-of-sale/components/SearchField.d.ts +1 -4
  91. package/build/ts/surfaces/point-of-sale/components/Stack.d.ts +82 -8
  92. package/build/ts/surfaces/point-of-sale/components/Tile.d.ts +1 -38
  93. package/build/ts/surfaces/point-of-sale/components/TimeField/TimeField.doc.d.ts +4 -0
  94. package/build/ts/surfaces/point-of-sale/components/TimeField/TimeField.doc.d.ts.map +1 -0
  95. package/build/ts/surfaces/point-of-sale/components/TimeField.d.ts +65 -0
  96. package/build/ts/surfaces/point-of-sale/components/components-shared.d.ts +321 -150
  97. package/build/ts/surfaces/point-of-sale/targets/pos.cart.line-item-details.action.render.d.ts +2 -0
  98. package/build/ts/surfaces/point-of-sale/targets/pos.customer-details.action.render.d.ts +2 -0
  99. package/build/ts/surfaces/point-of-sale/targets/pos.customer-details.block.render.d.ts +1 -0
  100. package/build/ts/surfaces/point-of-sale/targets/pos.draft-order-details.action.render.d.ts +2 -0
  101. package/build/ts/surfaces/point-of-sale/targets/pos.draft-order-details.block.render.d.ts +1 -0
  102. package/build/ts/surfaces/point-of-sale/targets/pos.exchange.post.action.render.d.ts +2 -0
  103. package/build/ts/surfaces/point-of-sale/targets/pos.exchange.post.block.render.d.ts +1 -0
  104. package/build/ts/surfaces/point-of-sale/targets/pos.home.modal.render.d.ts +2 -0
  105. package/build/ts/surfaces/point-of-sale/targets/pos.order-details.action.render.d.ts +2 -0
  106. package/build/ts/surfaces/point-of-sale/targets/pos.order-details.block.render.d.ts +1 -0
  107. package/build/ts/surfaces/point-of-sale/targets/pos.product-details.action.render.d.ts +2 -0
  108. package/build/ts/surfaces/point-of-sale/targets/pos.product-details.block.render.d.ts +1 -0
  109. package/build/ts/surfaces/point-of-sale/targets/pos.purchase.post.action.render.d.ts +2 -0
  110. package/build/ts/surfaces/point-of-sale/targets/pos.purchase.post.block.render.d.ts +1 -0
  111. package/build/ts/surfaces/point-of-sale/targets/pos.return.post.action.render.d.ts +2 -0
  112. package/build/ts/surfaces/point-of-sale/targets/pos.return.post.block.render.d.ts +1 -0
  113. package/build/tsconfig.tsbuildinfo +1 -1
  114. package/package.json +1 -1
  115. package/src/docs/shared/components/Modal.ts +1 -1
  116. package/src/shared.ts +25 -4
  117. package/src/surfaces/admin/components/AdminAction.d.ts +1 -1
  118. package/src/surfaces/admin/components/AdminBlock.d.ts +1 -1
  119. package/src/surfaces/admin/components/AdminPrintAction.d.ts +1 -1
  120. package/src/surfaces/admin/components/Avatar.d.ts +1 -1
  121. package/src/surfaces/admin/components/Badge.d.ts +1 -1
  122. package/src/surfaces/admin/components/Banner.d.ts +1 -1
  123. package/src/surfaces/admin/components/Box.d.ts +8 -1
  124. package/src/surfaces/admin/components/Button.d.ts +1 -1
  125. package/src/surfaces/admin/components/ButtonGroup.d.ts +14 -2
  126. package/src/surfaces/admin/components/Checkbox.d.ts +1 -1
  127. package/src/surfaces/admin/components/Chip.d.ts +1 -1
  128. package/src/surfaces/admin/components/Choice.d.ts +1 -1
  129. package/src/surfaces/admin/components/ChoiceList.d.ts +1 -1
  130. package/src/surfaces/admin/components/Clickable.d.ts +8 -1
  131. package/src/surfaces/admin/components/ClickableChip.d.ts +1 -1
  132. package/src/surfaces/admin/components/ColorField.d.ts +3 -1
  133. package/src/surfaces/admin/components/ColorPicker.d.ts +1 -1
  134. package/src/surfaces/admin/components/DateField.d.ts +1 -1
  135. package/src/surfaces/admin/components/DatePicker.d.ts +1 -1
  136. package/src/surfaces/admin/components/Divider.d.ts +1 -1
  137. package/src/surfaces/admin/components/DropZone.d.ts +1 -1
  138. package/src/surfaces/admin/components/EmailField.d.ts +1 -1
  139. package/src/surfaces/admin/components/Form.d.ts +1 -1
  140. package/src/surfaces/admin/components/FunctionSettings.d.ts +1 -1
  141. package/src/surfaces/admin/components/Grid.d.ts +20 -1
  142. package/src/surfaces/admin/components/GridItem.d.ts +8 -1
  143. package/src/surfaces/admin/components/Heading.d.ts +1 -1
  144. package/src/surfaces/admin/components/Icon.d.ts +1 -1
  145. package/src/surfaces/admin/components/Image.d.ts +8 -1
  146. package/src/surfaces/admin/components/Link.d.ts +1 -1
  147. package/src/surfaces/admin/components/ListItem.d.ts +1 -1
  148. package/src/surfaces/admin/components/Menu.d.ts +1 -1
  149. package/src/surfaces/admin/components/Modal/examples/default.html +23 -0
  150. package/src/surfaces/admin/components/Modal.d.ts +1 -1
  151. package/src/surfaces/admin/components/MoneyField.d.ts +1 -3
  152. package/src/surfaces/admin/components/NumberField.d.ts +1 -3
  153. package/src/surfaces/admin/components/Option.d.ts +1 -1
  154. package/src/surfaces/admin/components/OptionGroup.d.ts +1 -1
  155. package/src/surfaces/admin/components/OrderedList.d.ts +1 -1
  156. package/src/surfaces/admin/components/Page.d.ts +1 -1
  157. package/src/surfaces/admin/components/Paragraph.d.ts +1 -1
  158. package/src/surfaces/admin/components/PasswordField.d.ts +1 -1
  159. package/src/surfaces/admin/components/QueryContainer.d.ts +1 -1
  160. package/src/surfaces/admin/components/SearchField.d.ts +1 -1
  161. package/src/surfaces/admin/components/Section.d.ts +1 -1
  162. package/src/surfaces/admin/components/Select.d.ts +1 -1
  163. package/src/surfaces/admin/components/Spinner.d.ts +1 -1
  164. package/src/surfaces/admin/components/Stack.d.ts +14 -1
  165. package/src/surfaces/admin/components/Switch.d.ts +1 -1
  166. package/src/surfaces/admin/components/Table.d.ts +3 -2
  167. package/src/surfaces/admin/components/TableBody.d.ts +1 -1
  168. package/src/surfaces/admin/components/TableCell.d.ts +1 -1
  169. package/src/surfaces/admin/components/TableHeader.d.ts +3 -2
  170. package/src/surfaces/admin/components/TableHeaderRow.d.ts +1 -1
  171. package/src/surfaces/admin/components/TableRow.d.ts +1 -1
  172. package/src/surfaces/admin/components/Text.d.ts +1 -1
  173. package/src/surfaces/admin/components/TextArea.d.ts +1 -1
  174. package/src/surfaces/admin/components/TextField.d.ts +1 -1
  175. package/src/surfaces/admin/components/Thumbnail.d.ts +1 -1
  176. package/src/surfaces/admin/components/Tooltip.d.ts +1 -1
  177. package/src/surfaces/admin/components/URLField.d.ts +1 -1
  178. package/src/surfaces/admin/components/UnorderedList.d.ts +1 -1
  179. package/src/surfaces/admin/components/patterns/examples/details.html +5 -11
  180. package/src/surfaces/admin/components/patterns/examples/details.jsx +4 -13
  181. package/src/surfaces/admin/components/patterns/examples/homepage.html +3 -12
  182. package/src/surfaces/admin/components/patterns/examples/homepage.jsx +3 -12
  183. package/src/surfaces/admin/components/patterns/examples/index.html +4 -10
  184. package/src/surfaces/admin/components/patterns/examples/index.jsx +4 -11
  185. package/src/surfaces/admin/components/patterns/examples/indexTable.html +4 -9
  186. package/src/surfaces/admin/components/patterns/examples/mediaCard.html +1 -1
  187. package/src/surfaces/admin/components/patterns/examples/settings.html +1 -2
  188. package/src/surfaces/admin/components/patterns/examples/settings.jsx +2 -6
  189. package/src/surfaces/admin/components/shared.d.ts +245 -222
  190. package/src/surfaces/admin/components.d.ts +293 -228
  191. package/src/surfaces/admin/docs-types.ts +8 -1
  192. package/src/surfaces/customer-account/api/cart-line/cart-line-item.ts +2 -2
  193. package/src/surfaces/customer-account/api/order-status/order-status.ts +29 -29
  194. package/src/surfaces/customer-account/api/shared.ts +6 -6
  195. package/src/surfaces/customer-account/api/standard-api/standard-api.ts +6 -6
  196. package/src/surfaces/customer-account/api.ts +1 -1
  197. package/src/surfaces/customer-account/preact/subscription.ts +3 -3
  198. package/src/surfaces/point-of-sale/components/Badge.d.ts +1 -1
  199. package/src/surfaces/point-of-sale/components/Box.d.ts +82 -8
  200. package/src/surfaces/point-of-sale/components/Icon.d.ts +111 -30
  201. package/src/surfaces/point-of-sale/components/PosBlock/examples/default.html +11 -0
  202. package/src/surfaces/point-of-sale/components/PosBlock.d.ts +64 -0
  203. package/src/surfaces/point-of-sale/components/SearchField.d.ts +1 -4
  204. package/src/surfaces/point-of-sale/components/Stack.d.ts +82 -8
  205. package/src/surfaces/point-of-sale/components/Tile.d.ts +1 -38
  206. package/src/surfaces/point-of-sale/components/TimeField/examples/default.html +12 -0
  207. package/src/surfaces/point-of-sale/components/TimeField.d.ts +65 -0
  208. package/src/surfaces/point-of-sale/components/components-shared.d.ts +321 -150
  209. package/src/surfaces/point-of-sale/components.d.ts +1041 -530
@@ -1,8 +1,12 @@
1
+ import type {CSSProperties} from 'react';
1
2
  import {
2
3
  ReferenceEntityTemplateSchema,
3
4
  CodeTabType,
4
5
  } from '@shopify/generate-docs';
5
6
 
7
+ // Don't allow all CSS properties to be used in the customStyles property
8
+ type AllowedCSSProperties = Pick<CSSProperties, 'minHeight' | 'minBlockSize'>;
9
+
6
10
  export interface AdminReferenceEntityTemplateSchema
7
11
  extends Omit<ReferenceEntityTemplateSchema, 'defaultExample'> {
8
12
  defaultExample?: Omit<
@@ -11,7 +15,10 @@ export interface AdminReferenceEntityTemplateSchema
11
15
  > & {
12
16
  codeblock?: {
13
17
  title: string;
14
- tabs: (CodeTabType & {layout?: string})[];
18
+ tabs: (CodeTabType & {
19
+ layout?: string;
20
+ customStyles?: AllowedCSSProperties;
21
+ })[];
15
22
  };
16
23
  };
17
24
  }
@@ -1,9 +1,9 @@
1
1
  import {CartLine} from '../order-status/order-status';
2
- import {ReadonlySignalLike} from '../shared';
2
+ import {SubscribableSignalLike} from '../shared';
3
3
 
4
4
  export interface CartLineItemApi {
5
5
  /**
6
6
  * The cart line the extension is attached to.
7
7
  */
8
- target: ReadonlySignalLike<CartLine>;
8
+ target: SubscribableSignalLike<CartLine>;
9
9
  }
@@ -6,7 +6,7 @@ import type {
6
6
  Attribute,
7
7
  MailingAddress,
8
8
  Language,
9
- ReadonlySignalLike,
9
+ SubscribableSignalLike,
10
10
  } from '../shared';
11
11
  import type {ExtensionTarget} from '../../extension-targets';
12
12
  import {Extension} from '../shared';
@@ -137,17 +137,17 @@ export interface OrderStatusLocalization {
137
137
  /**
138
138
  * The currency that the buyer sees for money amounts in the checkout.
139
139
  */
140
- currency: ReadonlySignalLike<Currency>;
140
+ currency: SubscribableSignalLike<Currency>;
141
141
 
142
142
  /**
143
143
  * The buyer’s time zone.
144
144
  */
145
- timezone: ReadonlySignalLike<Timezone>;
145
+ timezone: SubscribableSignalLike<Timezone>;
146
146
 
147
147
  /**
148
148
  * The language the buyer sees in the checkout.
149
149
  */
150
- language: ReadonlySignalLike<Language>;
150
+ language: SubscribableSignalLike<Language>;
151
151
 
152
152
  /**
153
153
  * This is the buyer's language, as supported by the extension.
@@ -160,7 +160,7 @@ export interface OrderStatusLocalization {
160
160
  * translations at all, this value is the default locale for your
161
161
  * extension (that is, the one matching your .default.json file).
162
162
  */
163
- extensionLanguage: ReadonlySignalLike<Language>;
163
+ extensionLanguage: SubscribableSignalLike<Language>;
164
164
 
165
165
  /**
166
166
  * The country context of the checkout. This value carries over from the
@@ -168,7 +168,7 @@ export interface OrderStatusLocalization {
168
168
  * experience. It will update if the buyer changes the country of their
169
169
  * shipping address. The value is undefined if unknown.
170
170
  */
171
- country: ReadonlySignalLike<Country | undefined>;
171
+ country: SubscribableSignalLike<Country | undefined>;
172
172
 
173
173
  /**
174
174
  * The [market](https://shopify.dev/docs/apps/markets) context of the
@@ -177,7 +177,7 @@ export interface OrderStatusLocalization {
177
177
  * buyer changes the country of their shipping address. The value is undefined
178
178
  * if unknown.
179
179
  */
180
- market: ReadonlySignalLike<Market | undefined>;
180
+ market: SubscribableSignalLike<Market | undefined>;
181
181
  }
182
182
 
183
183
  export type AuthenticationState = 'fully_authenticated' | 'pre_authenticated';
@@ -186,7 +186,7 @@ export interface OrderStatusApi<Target extends ExtensionTarget> {
186
186
  /**
187
187
  * Gift Cards that have been applied to the order.
188
188
  */
189
- appliedGiftCards: ReadonlySignalLike<AppliedGiftCard[]>;
189
+ appliedGiftCards: SubscribableSignalLike<AppliedGiftCard[]>;
190
190
 
191
191
  /**
192
192
  * The metafields requested in the
@@ -196,12 +196,12 @@ export interface OrderStatusApi<Target extends ExtensionTarget> {
196
196
  *
197
197
  * {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
198
198
  */
199
- appMetafields: ReadonlySignalLike<AppMetafieldEntry[]>;
199
+ appMetafields: SubscribableSignalLike<AppMetafieldEntry[]>;
200
200
 
201
201
  /**
202
202
  * Custom attributes left by the customer to the merchant, either in their cart or during checkout.
203
203
  */
204
- attributes: ReadonlySignalLike<Attribute[] | undefined>;
204
+ attributes: SubscribableSignalLike<Attribute[] | undefined>;
205
205
 
206
206
  /**
207
207
  * Information about the buyer that is interacting with the order.
@@ -213,7 +213,7 @@ export interface OrderStatusApi<Target extends ExtensionTarget> {
213
213
  /**
214
214
  * Settings applied to the buyer's checkout.
215
215
  */
216
- checkoutSettings: ReadonlySignalLike<CheckoutSettings>;
216
+ checkoutSettings: SubscribableSignalLike<CheckoutSettings>;
217
217
 
218
218
  /**
219
219
  * Details on the costs of the purchase for the buyer.
@@ -223,12 +223,12 @@ export interface OrderStatusApi<Target extends ExtensionTarget> {
223
223
  /**
224
224
  * A list of discount codes applied to the purchase.
225
225
  */
226
- discountCodes: ReadonlySignalLike<CartDiscountCode[]>;
226
+ discountCodes: SubscribableSignalLike<CartDiscountCode[]>;
227
227
 
228
228
  /**
229
229
  * Discounts that have been applied to the entire cart.
230
230
  */
231
- discountAllocations: ReadonlySignalLike<CartDiscountAllocation[]>;
231
+ discountAllocations: SubscribableSignalLike<CartDiscountAllocation[]>;
232
232
 
233
233
  /**
234
234
  * Meta information about the extension.
@@ -251,7 +251,7 @@ export interface OrderStatusApi<Target extends ExtensionTarget> {
251
251
  /**
252
252
  * A list of lines containing information about the items the customer intends to purchase.
253
253
  */
254
- lines: ReadonlySignalLike<CartLine[]>;
254
+ lines: SubscribableSignalLike<CartLine[]>;
255
255
 
256
256
  /**
257
257
  * Details about the location, language, and currency of the buyer. For utilities to easily
@@ -281,17 +281,17 @@ export interface OrderStatusApi<Target extends ExtensionTarget> {
281
281
  * Once the order is created, you can query these metafields using the
282
282
  * [GraphQL Admin API](https://shopify.dev/docs/admin-api/graphql/reference/orders/order#metafield-2021-01)
283
283
  */
284
- metafields: ReadonlySignalLike<Metafield[]>;
284
+ metafields: SubscribableSignalLike<Metafield[]>;
285
285
 
286
286
  /**
287
287
  * A note left by the customer to the merchant, either in their cart or during checkout.
288
288
  */
289
- note: ReadonlySignalLike<string | undefined>;
289
+ note: SubscribableSignalLike<string | undefined>;
290
290
 
291
291
  /**
292
292
  * Information about the order that was placed.
293
293
  */
294
- order: ReadonlySignalLike<Order | undefined>;
294
+ order: SubscribableSignalLike<Order | undefined>;
295
295
 
296
296
  /**
297
297
  * id that represents the checkout used to create the order.
@@ -299,21 +299,21 @@ export interface OrderStatusApi<Target extends ExtensionTarget> {
299
299
  * Matches the `token` field in the [WebPixel checkout payload](https://shopify.dev/docs/api/pixels/customer-events#checkout)
300
300
  * and the `checkout_token` field in the [Admin REST API Order resource](https://shopify.dev/docs/api/admin-rest/unstable/resources/order#resource-object).
301
301
  */
302
- checkoutToken: ReadonlySignalLike<CheckoutToken | undefined>;
302
+ checkoutToken: SubscribableSignalLike<CheckoutToken | undefined>;
303
303
 
304
304
  /**
305
305
  * The buyer shipping address used for the order.
306
306
  *
307
307
  * {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
308
308
  */
309
- shippingAddress?: ReadonlySignalLike<MailingAddress | undefined>;
309
+ shippingAddress?: SubscribableSignalLike<MailingAddress | undefined>;
310
310
 
311
311
  /**
312
312
  * The buyer billing address used for the order.
313
313
  *
314
314
  * {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
315
315
  */
316
- billingAddress?: ReadonlySignalLike<MailingAddress | undefined>;
316
+ billingAddress?: SubscribableSignalLike<MailingAddress | undefined>;
317
317
 
318
318
  /** Shop where the purchase took place. */
319
319
  shop: Shop;
@@ -333,7 +333,7 @@ export interface OrderStatusApi<Target extends ExtensionTarget> {
333
333
  /**
334
334
  * The authentication state of Order status page.
335
335
  */
336
- authenticationState: ReadonlySignalLike<AuthenticationState>;
336
+ authenticationState: SubscribableSignalLike<AuthenticationState>;
337
337
  }
338
338
 
339
339
  export interface OrderStatusBuyerIdentity {
@@ -343,7 +343,7 @@ export interface OrderStatusBuyerIdentity {
343
343
  *
344
344
  * {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
345
345
  */
346
- customer: ReadonlySignalLike<OrderStatusCustomer | undefined>;
346
+ customer: SubscribableSignalLike<OrderStatusCustomer | undefined>;
347
347
 
348
348
  /**
349
349
  * The email address of the buyer that is interacting with the cart.
@@ -351,7 +351,7 @@ export interface OrderStatusBuyerIdentity {
351
351
  *
352
352
  * {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
353
353
  */
354
- email: ReadonlySignalLike<string | undefined>;
354
+ email: SubscribableSignalLike<string | undefined>;
355
355
 
356
356
  /**
357
357
  * The phone number of the buyer that is interacting with the cart.
@@ -359,7 +359,7 @@ export interface OrderStatusBuyerIdentity {
359
359
  *
360
360
  * {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
361
361
  */
362
- phone: ReadonlySignalLike<string | undefined>;
362
+ phone: SubscribableSignalLike<string | undefined>;
363
363
 
364
364
  /**
365
365
  * Provides details of the company and the company location that the business customer is purchasing on behalf of.
@@ -368,7 +368,7 @@ export interface OrderStatusBuyerIdentity {
368
368
  *
369
369
  * {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
370
370
  */
371
- purchasingCompany: ReadonlySignalLike<
371
+ purchasingCompany: SubscribableSignalLike<
372
372
  OrderStatusPurchasingCompany | undefined
373
373
  >;
374
374
  }
@@ -479,28 +479,28 @@ export interface CartCost {
479
479
  * A `Money` value representing the subtotal value of the items in the cart at the current
480
480
  * step of checkout.
481
481
  */
482
- subtotalAmount: ReadonlySignalLike<Money>;
482
+ subtotalAmount: SubscribableSignalLike<Money>;
483
483
 
484
484
  /**
485
485
  * A `Money` value representing the total shipping a buyer can expect to pay at the current
486
486
  * step of checkout. This value includes shipping discounts. Returns undefined if shipping
487
487
  * has not been negotiated yet, such as on the information step.
488
488
  */
489
- totalShippingAmount: ReadonlySignalLike<Money | undefined>;
489
+ totalShippingAmount: SubscribableSignalLike<Money | undefined>;
490
490
 
491
491
  /**
492
492
  * A `Money` value representing the total tax a buyer can expect to pay at the current
493
493
  * step of checkout or the total tax included in product and shipping prices. Returns
494
494
  * undefined if taxes are unavailable.
495
495
  */
496
- totalTaxAmount: ReadonlySignalLike<Money | undefined>;
496
+ totalTaxAmount: SubscribableSignalLike<Money | undefined>;
497
497
 
498
498
  /**
499
499
  * A `Money` value representing the minimum a buyer can expect to pay at the current
500
500
  * step of checkout. This value excludes amounts yet to be negotiated. For example,
501
501
  * the information step might not have delivery costs calculated.
502
502
  */
503
- totalAmount: ReadonlySignalLike<Money>;
503
+ totalAmount: SubscribableSignalLike<Money>;
504
504
  }
505
505
 
506
506
  export interface CartLine {
@@ -9,7 +9,7 @@ import type {
9
9
  CountryCode,
10
10
  GraphQLError,
11
11
  StorefrontApiVersion,
12
- ReadonlySignalLike,
12
+ SubscribableSignalLike,
13
13
  } from '../../../shared';
14
14
 
15
15
  export {
@@ -21,7 +21,7 @@ export {
21
21
  CountryCode,
22
22
  GraphQLError,
23
23
  StorefrontApiVersion,
24
- ReadonlySignalLike,
24
+ SubscribableSignalLike,
25
25
  };
26
26
 
27
27
  /**
@@ -163,7 +163,7 @@ export interface Extension<Target extends ExtensionTarget = ExtensionTarget> {
163
163
  *
164
164
  * * [`block_progress`](https://shopify.dev/docs/api/checkout-ui-extensions/configuration#block-progress): the extension can block a buyer's progress and the merchant has allowed this blocking behavior.
165
165
  */
166
- capabilities: ReadonlySignalLike<Capability[]>;
166
+ capabilities: SubscribableSignalLike<Capability[]>;
167
167
 
168
168
  /**
169
169
  * Information about the editor where the extension is being rendered.
@@ -183,7 +183,7 @@ export interface Extension<Target extends ExtensionTarget = ExtensionTarget> {
183
183
  * from where it was rendered. The extension continues running so that
184
184
  * your extension is immediately available to render if the buyer navigates back.
185
185
  */
186
- rendered: ReadonlySignalLike<boolean>;
186
+ rendered: SubscribableSignalLike<boolean>;
187
187
 
188
188
  /**
189
189
  * The URL to the script that started the extension target.
@@ -346,11 +346,11 @@ export interface AuthenticatedAccount {
346
346
  * Provides the company info of the authenticated business customer.
347
347
  * If the customer is not authenticated or is not a business customer, this value is `undefined`.
348
348
  */
349
- purchasingCompany: ReadonlySignalLike<PurchasingCompany | undefined>;
349
+ purchasingCompany: SubscribableSignalLike<PurchasingCompany | undefined>;
350
350
  /**
351
351
  * Provides the customer information of the authenticated customer.
352
352
  */
353
- customer: ReadonlySignalLike<Customer | undefined>;
353
+ customer: SubscribableSignalLike<Customer | undefined>;
354
354
  }
355
355
 
356
356
  /**
@@ -12,7 +12,7 @@ import {
12
12
  CustomerPrivacy,
13
13
  ApplyTrackingConsentChangeType,
14
14
  ToastApi,
15
- ReadonlySignalLike,
15
+ SubscribableSignalLike,
16
16
  } from '../shared';
17
17
 
18
18
  import type {ExtensionTarget} from '../../extension-targets';
@@ -96,7 +96,7 @@ export interface StandardApi<Target extends ExtensionTarget = ExtensionTarget> {
96
96
  * > Note: When an extension is being installed in the editor, the settings will be empty until
97
97
  * a merchant sets a value. In that case, this object will be updated in real time as a merchant fills in the settings.
98
98
  */
99
- settings: ReadonlySignalLike<ExtensionSettings>;
99
+ settings: SubscribableSignalLike<ExtensionSettings>;
100
100
 
101
101
  /**
102
102
  * The Toast API displays a non-disruptive message that displays at the bottom
@@ -128,7 +128,7 @@ export interface StandardApi<Target extends ExtensionTarget = ExtensionTarget> {
128
128
  /**
129
129
  * Customer privacy consent settings and a flag denoting if consent has previously been collected.
130
130
  */
131
- customerPrivacy: ReadonlySignalLike<CustomerPrivacy>;
131
+ customerPrivacy: SubscribableSignalLike<CustomerPrivacy>;
132
132
 
133
133
  /**
134
134
  * Allows setting and updating customer privacy consent settings and tracking consent metafields.
@@ -166,7 +166,7 @@ export interface Localization {
166
166
  /**
167
167
  * The language the buyer sees in the customer account hub.
168
168
  */
169
- language: ReadonlySignalLike<Language>;
169
+ language: SubscribableSignalLike<Language>;
170
170
 
171
171
  /**
172
172
  * This is the buyer's language, as supported by the extension.
@@ -179,14 +179,14 @@ export interface Localization {
179
179
  * translations at all, this value is the default locale for your
180
180
  * extension (that is, the one matching your .default.json file).
181
181
  */
182
- extensionLanguage: ReadonlySignalLike<Language>;
182
+ extensionLanguage: SubscribableSignalLike<Language>;
183
183
 
184
184
  /**
185
185
  * The country context of the buyer sees in the customer account.
186
186
  * It will update if the buyer changes the country in the customer account
187
187
  * If the country is unknown, then the value is undefined.
188
188
  */
189
- country: ReadonlySignalLike<Country | undefined>;
189
+ country: SubscribableSignalLike<Country | undefined>;
190
190
  }
191
191
 
192
192
  /**
@@ -78,7 +78,7 @@ export type {
78
78
  VisitorResult,
79
79
  VisitorSuccess,
80
80
  VisitorError,
81
- ReadonlySignalLike,
81
+ SubscribableSignalLike,
82
82
  } from './api/shared';
83
83
 
84
84
  export type {CartLineItemApi} from './api/cart-line/cart-line-item';
@@ -1,8 +1,8 @@
1
1
  import {useEffect, useState} from 'preact/hooks';
2
2
 
3
- import {ReadonlySignalLike} from '../api/shared';
3
+ import {SubscribableSignalLike} from '../api/shared';
4
4
 
5
- type Subscriber<T> = Parameters<ReadonlySignalLike<T>['subscribe']>[0];
5
+ type Subscriber<T> = Parameters<SubscribableSignalLike<T>['subscribe']>[0];
6
6
 
7
7
  /**
8
8
  * Subscribes to the special wrapper type that all “changeable” values in the
@@ -14,7 +14,7 @@ type Subscriber<T> = Parameters<ReadonlySignalLike<T>['subscribe']>[0];
14
14
  * > for accessing the current value of each individual resource in the checkout.
15
15
  */
16
16
  export function useSubscription<Value>(
17
- subscription: ReadonlySignalLike<Value>,
17
+ subscription: SubscribableSignalLike<Value>,
18
18
  ): Value {
19
19
  const [, setValue] = useState(subscription.value);
20
20
 
@@ -31,7 +31,7 @@ declare const tagName = 's-badge';
31
31
  export interface BadgeJSXProps extends Pick<BadgeProps, 'id'> {
32
32
  tone?: Extract<
33
33
  BadgeProps['tone'],
34
- 'auto' | 'neutral' | 'info' | 'success' | 'warning' | 'critical'
34
+ 'auto' | 'neutral' | 'info' | 'success' | 'warning' | 'critical' | 'caution'
35
35
  >;
36
36
  children?: ComponentChildren;
37
37
  }
@@ -8,7 +8,14 @@
8
8
  /* eslint-disable import-x/namespace */
9
9
  // eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
10
10
  /// <reference lib="DOM" />
11
- import type {BoxProps, Key, Ref} from './components-shared.d.ts';
11
+ import type {
12
+ BoxProps,
13
+ SizeKeyword,
14
+ MaybeAllValuesShorthandProperty,
15
+ MaybeTwoValuesShorthandProperty,
16
+ Key,
17
+ Ref,
18
+ } from './components-shared.d.ts';
12
19
 
13
20
  export type ComponentChildren = any;
14
21
  /**
@@ -28,16 +35,10 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement>
28
35
  }
29
36
 
30
37
  declare const tagName = 's-box';
38
+ export type PaddingKeyword = SizeKeyword | 'none';
31
39
  export interface BoxJSXProps
32
40
  extends Pick<
33
41
  BoxProps,
34
- | 'padding'
35
- | 'paddingBlock'
36
- | 'paddingBlockStart'
37
- | 'paddingBlockEnd'
38
- | 'paddingInline'
39
- | 'paddingInlineStart'
40
- | 'paddingInlineEnd'
41
42
  | 'blockSize'
42
43
  | 'minBlockSize'
43
44
  | 'maxBlockSize'
@@ -45,6 +46,79 @@ export interface BoxJSXProps
45
46
  | 'minInlineSize'
46
47
  | 'maxInlineSize'
47
48
  > {
49
+ /**
50
+ * Adjust the padding of all edges.
51
+ *
52
+ * [1-to-4-value syntax](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties#edges_of_a_box) is
53
+ * supported. Note that, contrary to the CSS, it uses flow-relative values and the order is:
54
+ *
55
+ * - 4 values: `block-start inline-end block-end inline-start`
56
+ * - 3 values: `block-start inline block-end`
57
+ * - 2 values: `block inline`
58
+ *
59
+ * For example:
60
+ * - `large` means block-start, inline-end, block-end and inline-start paddings are `large`.
61
+ * - `large none` means block-start and block-end paddings are `large`, inline-start and inline-end paddings are `none`.
62
+ * - `large none large` means block-start padding is `large`, inline-end padding is `none`, block-end padding is `large` and inline-start padding is `none`.
63
+ * - `large none large small` means block-start padding is `large`, inline-end padding is `none`, block-end padding is `large` and inline-start padding is `small`.
64
+ *
65
+ * A padding value of `auto` will use the default padding for the closest container that has had its usual padding removed.
66
+ *
67
+ * @default 'none'
68
+ */
69
+ padding?: MaybeAllValuesShorthandProperty<PaddingKeyword>;
70
+ /**
71
+ * Adjust the block-padding.
72
+ *
73
+ * - `large none` means block-start padding is `large`, block-end padding is `none`.
74
+ *
75
+ * This overrides the block value of `padding`.
76
+ *
77
+ * @default '' - meaning no override
78
+ */
79
+ paddingBlock?: MaybeTwoValuesShorthandProperty<PaddingKeyword | ''>;
80
+ /**
81
+ * Adjust the block-start padding.
82
+ *
83
+ * This overrides the block-start value of `paddingBlock`.
84
+ *
85
+ * @default '' - meaning no override
86
+ */
87
+ paddingBlockStart?: PaddingKeyword | '';
88
+ /**
89
+ * Adjust the block-end padding.
90
+ *
91
+ * This overrides the block-end value of `paddingBlock`.
92
+ *
93
+ * @default '' - meaning no override
94
+ */
95
+ paddingBlockEnd?: PaddingKeyword | '';
96
+ /**
97
+ * Adjust the inline padding.
98
+ *
99
+ * - `large none` means inline-start padding is `large`, inline-end padding is `none`.
100
+ *
101
+ * This overrides the inline value of `padding`.
102
+ *
103
+ * @default '' - meaning no override
104
+ */
105
+ paddingInline?: MaybeTwoValuesShorthandProperty<PaddingKeyword | ''>;
106
+ /**
107
+ * Adjust the inline-start padding.
108
+ *
109
+ * This overrides the inline-start value of `paddingInline`.
110
+ *
111
+ * @default '' - meaning no override
112
+ */
113
+ paddingInlineStart?: PaddingKeyword | '';
114
+ /**
115
+ * Adjust the inline-end padding.
116
+ *
117
+ * This overrides the inline-end value of `paddingInline`.
118
+ *
119
+ * @default '' - meaning no override
120
+ */
121
+ paddingInlineEnd?: PaddingKeyword | '';
48
122
  children?: ComponentChildren;
49
123
  }
50
124
  declare global {