@shopify/ui-extensions 2026.10.0-rc.7 → 2026.10.0-rc.9

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 (217) hide show
  1. package/build/cjs/surfaces/checkout/preact/market.js +8 -2
  2. package/build/cjs/surfaces/customer-account/preact/market.js +8 -2
  3. package/build/esm/surfaces/checkout/preact/market.mjs +8 -2
  4. package/build/esm/surfaces/customer-account/preact/market.mjs +8 -2
  5. package/build/esnext/surfaces/checkout/preact/market.esnext +8 -2
  6. package/build/esnext/surfaces/customer-account/preact/market.esnext +8 -2
  7. package/build/ts/surfaces/admin/components/AdminAction.d.ts +61 -107
  8. package/build/ts/surfaces/admin/components/AdminBlock.d.ts +22 -107
  9. package/build/ts/surfaces/admin/components/AdminPrintAction.d.ts +20 -101
  10. package/build/ts/surfaces/admin/components/AppNav.d.ts +38 -1
  11. package/build/ts/surfaces/admin/components/Avatar.d.ts +100 -139
  12. package/build/ts/surfaces/admin/components/Badge.d.ts +107 -156
  13. package/build/ts/surfaces/admin/components/Banner.d.ts +102 -127
  14. package/build/ts/surfaces/admin/components/Box.d.ts +145 -234
  15. package/build/ts/surfaces/admin/components/Button.d.ts +156 -266
  16. package/build/ts/surfaces/admin/components/ButtonGroup.d.ts +89 -117
  17. package/build/ts/surfaces/admin/components/Checkbox.d.ts +139 -174
  18. package/build/ts/surfaces/admin/components/Chip.d.ts +117 -15
  19. package/build/ts/surfaces/admin/components/Choice.d.ts +88 -113
  20. package/build/ts/surfaces/admin/components/ChoiceList.d.ts +120 -129
  21. package/build/ts/surfaces/admin/components/Clickable.d.ts +227 -209
  22. package/build/ts/surfaces/admin/components/ClickableChip.d.ts +117 -153
  23. package/build/ts/surfaces/admin/components/ColorField.d.ts +111 -215
  24. package/build/ts/surfaces/admin/components/ColorPicker.d.ts +82 -137
  25. package/build/ts/surfaces/admin/components/DateField.d.ts +140 -230
  26. package/build/ts/surfaces/admin/components/DatePicker.d.ts +178 -181
  27. package/build/ts/surfaces/admin/components/Divider.d.ts +50 -118
  28. package/build/ts/surfaces/admin/components/DropZone.d.ts +153 -12
  29. package/build/ts/surfaces/admin/components/EmailField.d.ts +100 -197
  30. package/build/ts/surfaces/admin/components/EmptyState.d.ts +144 -0
  31. package/build/ts/surfaces/admin/components/Form.d.ts +25 -118
  32. package/build/ts/surfaces/admin/components/FunctionSettings.d.ts +26 -132
  33. package/build/ts/surfaces/admin/components/Grid.d.ts +165 -299
  34. package/build/ts/surfaces/admin/components/GridItem.d.ts +145 -261
  35. package/build/ts/surfaces/admin/components/Heading.d.ts +117 -117
  36. package/build/ts/surfaces/admin/components/Icon.d.ts +91 -129
  37. package/build/ts/surfaces/admin/components/Image.d.ts +216 -251
  38. package/build/ts/surfaces/admin/components/Link.d.ts +125 -126
  39. package/build/ts/surfaces/admin/components/ListItem.d.ts +63 -102
  40. package/build/ts/surfaces/admin/components/Menu.d.ts +82 -150
  41. package/build/ts/surfaces/admin/components/Modal.d.ts +232 -26
  42. package/build/ts/surfaces/admin/components/MoneyField.d.ts +103 -196
  43. package/build/ts/surfaces/admin/components/Number.d.ts +193 -0
  44. package/build/ts/surfaces/admin/components/NumberField.d.ts +114 -208
  45. package/build/ts/surfaces/admin/components/Option.d.ts +67 -108
  46. package/build/ts/surfaces/admin/components/OptionGroup.d.ts +69 -105
  47. package/build/ts/surfaces/admin/components/OrderedList.d.ts +56 -102
  48. package/build/ts/surfaces/admin/components/Page.d.ts +93 -13
  49. package/build/ts/surfaces/admin/components/Paragraph.d.ts +126 -138
  50. package/build/ts/surfaces/admin/components/PasswordField.d.ts +109 -203
  51. package/build/ts/surfaces/admin/components/Popover.d.ts +673 -0
  52. package/build/ts/surfaces/admin/components/QueryContainer.d.ts +77 -116
  53. package/build/ts/surfaces/admin/components/SearchField.d.ts +103 -191
  54. package/build/ts/surfaces/admin/components/Section.d.ts +132 -128
  55. package/build/ts/surfaces/admin/components/Select.d.ts +144 -193
  56. package/build/ts/surfaces/admin/components/Spinner.d.ts +60 -113
  57. package/build/ts/surfaces/admin/components/Stack.d.ts +156 -282
  58. package/build/ts/surfaces/admin/components/StandardComponents.d.ts +1 -1
  59. package/build/ts/surfaces/admin/components/StandardComponents.d.ts.map +1 -1
  60. package/build/ts/surfaces/admin/components/Switch.d.ts +75 -165
  61. package/build/ts/surfaces/admin/components/Table.d.ts +100 -210
  62. package/build/ts/surfaces/admin/components/TableBody.d.ts +70 -106
  63. package/build/ts/surfaces/admin/components/TableCell.d.ts +70 -107
  64. package/build/ts/surfaces/admin/components/TableHeader.d.ts +79 -119
  65. package/build/ts/surfaces/admin/components/TableHeaderRow.d.ts +71 -107
  66. package/build/ts/surfaces/admin/components/TableRow.d.ts +81 -109
  67. package/build/ts/surfaces/admin/components/Text.d.ts +123 -164
  68. package/build/ts/surfaces/admin/components/TextArea.d.ts +100 -195
  69. package/build/ts/surfaces/admin/components/TextField.d.ts +120 -204
  70. package/build/ts/surfaces/admin/components/Thumbnail.d.ts +83 -133
  71. package/build/ts/surfaces/admin/components/Tooltip.d.ts +78 -146
  72. package/build/ts/surfaces/admin/components/URLField.d.ts +107 -209
  73. package/build/ts/surfaces/admin/components/UnorderedList.d.ts +58 -110
  74. package/build/ts/surfaces/admin/components/shared.d.ts +4193 -1203
  75. package/build/ts/surfaces/admin/extension-targets.d.ts +0 -8
  76. package/build/ts/surfaces/admin/extension-targets.d.ts.map +1 -1
  77. package/build/ts/surfaces/admin/targets/admin.abandoned-checkout-details.action.render.d.ts +1 -0
  78. package/build/ts/surfaces/admin/targets/admin.abandoned-checkout-details.block.render.d.ts +1 -0
  79. package/build/ts/surfaces/admin/targets/admin.abandoned-checkout-index.action.render.d.ts +1 -0
  80. package/build/ts/surfaces/admin/targets/admin.app.home.render.d.ts +1 -0
  81. package/build/ts/surfaces/admin/targets/admin.app.intent.render.d.ts +1 -0
  82. package/build/ts/surfaces/admin/targets/admin.catalog-details.action.render.d.ts +1 -0
  83. package/build/ts/surfaces/admin/targets/admin.catalog-details.block.render.d.ts +1 -0
  84. package/build/ts/surfaces/admin/targets/admin.collection-details.action.render.d.ts +1 -0
  85. package/build/ts/surfaces/admin/targets/admin.collection-details.block.render.d.ts +1 -0
  86. package/build/ts/surfaces/admin/targets/admin.collection-index.action.render.d.ts +1 -0
  87. package/build/ts/surfaces/admin/targets/admin.company-details.action.render.d.ts +1 -0
  88. package/build/ts/surfaces/admin/targets/admin.company-details.block.render.d.ts +1 -0
  89. package/build/ts/surfaces/admin/targets/admin.company-location-details.block.render.d.ts +1 -0
  90. package/build/ts/surfaces/admin/targets/admin.customer-details.action.render.d.ts +1 -0
  91. package/build/ts/surfaces/admin/targets/admin.customer-details.block.render.d.ts +1 -0
  92. package/build/ts/surfaces/admin/targets/admin.customer-index.action.render.d.ts +1 -0
  93. package/build/ts/surfaces/admin/targets/admin.customer-index.selection-action.render.d.ts +1 -0
  94. package/build/ts/surfaces/admin/targets/admin.customer-segment-details.action.render.d.ts +1 -0
  95. package/build/ts/surfaces/admin/targets/admin.discount-details.action.render.d.ts +1 -0
  96. package/build/ts/surfaces/admin/targets/admin.discount-details.function-settings.render.d.ts +1 -0
  97. package/build/ts/surfaces/admin/targets/admin.discount-index.action.render.d.ts +1 -0
  98. package/build/ts/surfaces/admin/targets/admin.discount-index.selection-action.render.d.ts +1 -0
  99. package/build/ts/surfaces/admin/targets/admin.draft-order-details.action.render.d.ts +1 -0
  100. package/build/ts/surfaces/admin/targets/admin.draft-order-details.block.render.d.ts +1 -0
  101. package/build/ts/surfaces/admin/targets/admin.draft-order-index.action.render.d.ts +1 -0
  102. package/build/ts/surfaces/admin/targets/admin.draft-order-index.selection-action.render.d.ts +1 -0
  103. package/build/ts/surfaces/admin/targets/admin.gift-card-details.action.render.d.ts +1 -0
  104. package/build/ts/surfaces/admin/targets/admin.gift-card-details.block.render.d.ts +1 -0
  105. package/build/ts/surfaces/admin/targets/admin.order-details.action.render.d.ts +1 -0
  106. package/build/ts/surfaces/admin/targets/admin.order-details.block.render.d.ts +1 -0
  107. package/build/ts/surfaces/admin/targets/admin.order-details.print-action.render.d.ts +1 -0
  108. package/build/ts/surfaces/admin/targets/admin.order-fulfilled-card.action.render.d.ts +1 -0
  109. package/build/ts/surfaces/admin/targets/admin.order-index.action.render.d.ts +1 -0
  110. package/build/ts/surfaces/admin/targets/admin.order-index.selection-action.render.d.ts +1 -0
  111. package/build/ts/surfaces/admin/targets/admin.order-index.selection-print-action.render.d.ts +1 -0
  112. package/build/ts/surfaces/admin/targets/admin.product-details.action.render.d.ts +1 -0
  113. package/build/ts/surfaces/admin/targets/admin.product-details.block.render.d.ts +1 -0
  114. package/build/ts/surfaces/admin/targets/admin.product-details.configuration.render.d.ts +1 -0
  115. package/build/ts/surfaces/admin/targets/admin.product-details.print-action.render.d.ts +1 -0
  116. package/build/ts/surfaces/admin/targets/admin.product-details.reorder.render.d.ts +1 -0
  117. package/build/ts/surfaces/admin/targets/admin.product-index.action.render.d.ts +1 -0
  118. package/build/ts/surfaces/admin/targets/admin.product-index.selection-action.render.d.ts +1 -0
  119. package/build/ts/surfaces/admin/targets/admin.product-index.selection-print-action.render.d.ts +1 -0
  120. package/build/ts/surfaces/admin/targets/admin.product-purchase-option.action.render.d.ts +1 -0
  121. package/build/ts/surfaces/admin/targets/admin.product-variant-details.action.render.d.ts +1 -0
  122. package/build/ts/surfaces/admin/targets/admin.product-variant-details.block.render.d.ts +1 -0
  123. package/build/ts/surfaces/admin/targets/admin.product-variant-details.configuration.render.d.ts +1 -0
  124. package/build/ts/surfaces/admin/targets/admin.product-variant-purchase-option.action.render.d.ts +1 -0
  125. package/build/ts/surfaces/admin/targets/admin.settings.internal-order-routing-rule.render.d.ts +1 -0
  126. package/build/ts/surfaces/admin/targets/admin.settings.order-routing-rule.render.d.ts +1 -0
  127. package/build/ts/surfaces/admin/targets/admin.settings.validation.render.d.ts +1 -0
  128. package/build/ts/surfaces/checkout/api/standard/standard.d.ts +8 -5
  129. package/build/ts/surfaces/checkout/api/standard/standard.d.ts.map +1 -1
  130. package/build/ts/surfaces/checkout/components/Box.d.ts +56 -1
  131. package/build/ts/surfaces/checkout/preact/market.d.ts +8 -2
  132. package/build/ts/surfaces/checkout/preact/market.d.ts.map +1 -1
  133. package/build/ts/surfaces/customer-account/api/order-status/order-status.d.ts +6 -1
  134. package/build/ts/surfaces/customer-account/api/order-status/order-status.d.ts.map +1 -1
  135. package/build/ts/surfaces/customer-account/components/Box.d.ts +56 -1
  136. package/build/ts/surfaces/customer-account/preact/market.d.ts +8 -2
  137. package/build/ts/surfaces/customer-account/preact/market.d.ts.map +1 -1
  138. package/build/ts/surfaces/point-of-sale/types/cart.d.ts +4 -0
  139. package/build/ts/surfaces/point-of-sale/types/cart.d.ts.map +1 -1
  140. package/build/tsconfig.tsbuildinfo +1 -1
  141. package/package.json +14 -13
  142. package/src/surfaces/admin/components/AdminAction.d.ts +61 -107
  143. package/src/surfaces/admin/components/AdminBlock.d.ts +22 -107
  144. package/src/surfaces/admin/components/AdminPrintAction.d.ts +20 -101
  145. package/src/surfaces/admin/components/AppNav.d.ts +38 -1
  146. package/src/surfaces/admin/components/Avatar.d.ts +100 -139
  147. package/src/surfaces/admin/components/Badge.d.ts +107 -156
  148. package/src/surfaces/admin/components/Banner.d.ts +102 -127
  149. package/src/surfaces/admin/components/Box.d.ts +145 -234
  150. package/src/surfaces/admin/components/Button.d.ts +156 -266
  151. package/src/surfaces/admin/components/ButtonGroup.d.ts +89 -117
  152. package/src/surfaces/admin/components/Checkbox.d.ts +139 -174
  153. package/src/surfaces/admin/components/Chip.d.ts +117 -15
  154. package/src/surfaces/admin/components/Choice.d.ts +88 -113
  155. package/src/surfaces/admin/components/ChoiceList.d.ts +120 -129
  156. package/src/surfaces/admin/components/Clickable.d.ts +227 -209
  157. package/src/surfaces/admin/components/ClickableChip.d.ts +117 -153
  158. package/src/surfaces/admin/components/ColorField.d.ts +111 -215
  159. package/src/surfaces/admin/components/ColorPicker.d.ts +82 -137
  160. package/src/surfaces/admin/components/DateField.d.ts +140 -230
  161. package/src/surfaces/admin/components/DatePicker.d.ts +178 -181
  162. package/src/surfaces/admin/components/Divider.d.ts +50 -118
  163. package/src/surfaces/admin/components/DropZone.d.ts +153 -12
  164. package/src/surfaces/admin/components/EmailField.d.ts +100 -197
  165. package/src/surfaces/admin/components/EmptyState.d.ts +144 -0
  166. package/src/surfaces/admin/components/Form.d.ts +25 -118
  167. package/src/surfaces/admin/components/FunctionSettings.d.ts +26 -132
  168. package/src/surfaces/admin/components/Grid.d.ts +165 -299
  169. package/src/surfaces/admin/components/GridItem.d.ts +145 -261
  170. package/src/surfaces/admin/components/Heading.d.ts +117 -117
  171. package/src/surfaces/admin/components/Icon.d.ts +91 -129
  172. package/src/surfaces/admin/components/Image.d.ts +216 -251
  173. package/src/surfaces/admin/components/Link.d.ts +125 -126
  174. package/src/surfaces/admin/components/ListItem.d.ts +63 -102
  175. package/src/surfaces/admin/components/Menu.d.ts +82 -150
  176. package/src/surfaces/admin/components/Modal.d.ts +232 -26
  177. package/src/surfaces/admin/components/MoneyField.d.ts +103 -196
  178. package/src/surfaces/admin/components/Number.d.ts +193 -0
  179. package/src/surfaces/admin/components/NumberField.d.ts +114 -208
  180. package/src/surfaces/admin/components/Option.d.ts +67 -108
  181. package/src/surfaces/admin/components/OptionGroup.d.ts +69 -105
  182. package/src/surfaces/admin/components/OrderedList.d.ts +56 -102
  183. package/src/surfaces/admin/components/Page.d.ts +93 -13
  184. package/src/surfaces/admin/components/Paragraph.d.ts +126 -138
  185. package/src/surfaces/admin/components/PasswordField.d.ts +109 -203
  186. package/src/surfaces/admin/components/Popover.d.ts +673 -0
  187. package/src/surfaces/admin/components/QueryContainer.d.ts +77 -116
  188. package/src/surfaces/admin/components/SearchField.d.ts +103 -191
  189. package/src/surfaces/admin/components/Section.d.ts +132 -128
  190. package/src/surfaces/admin/components/Select.d.ts +144 -193
  191. package/src/surfaces/admin/components/Spinner.d.ts +60 -113
  192. package/src/surfaces/admin/components/Stack.d.ts +156 -282
  193. package/src/surfaces/admin/components/StandardComponents.ts +1 -0
  194. package/src/surfaces/admin/components/Switch.d.ts +75 -165
  195. package/src/surfaces/admin/components/Table.d.ts +100 -210
  196. package/src/surfaces/admin/components/TableBody.d.ts +70 -106
  197. package/src/surfaces/admin/components/TableCell.d.ts +70 -107
  198. package/src/surfaces/admin/components/TableHeader.d.ts +79 -119
  199. package/src/surfaces/admin/components/TableHeaderRow.d.ts +71 -107
  200. package/src/surfaces/admin/components/TableRow.d.ts +81 -109
  201. package/src/surfaces/admin/components/Text.d.ts +123 -164
  202. package/src/surfaces/admin/components/TextArea.d.ts +100 -195
  203. package/src/surfaces/admin/components/TextField.d.ts +120 -204
  204. package/src/surfaces/admin/components/Thumbnail.d.ts +83 -133
  205. package/src/surfaces/admin/components/Tooltip.d.ts +78 -146
  206. package/src/surfaces/admin/components/URLField.d.ts +107 -209
  207. package/src/surfaces/admin/components/UnorderedList.d.ts +58 -110
  208. package/src/surfaces/admin/components/shared.d.ts +4193 -1203
  209. package/src/surfaces/admin/extension-targets.ts +1 -17
  210. package/src/surfaces/checkout/api/standard/standard.ts +8 -5
  211. package/src/surfaces/checkout/components/Box.d.ts +56 -1
  212. package/src/surfaces/checkout/preact/market.ts +8 -2
  213. package/src/surfaces/customer-account/api/order-status/order-status.ts +6 -1
  214. package/src/surfaces/customer-account/preact/market.ts +8 -2
  215. package/src/surfaces/point-of-sale/types/cart.ts +4 -0
  216. package/build/ts/surfaces/admin/targets/admin.order-index.selection-print-action.should-render.d.ts +0 -6
  217. package/build/ts/surfaces/admin/targets/admin.product-index.selection-print-action.should-render.d.ts +0 -6
@@ -6,8 +6,14 @@ var api = require('./api.js');
6
6
  var subscription = require('./subscription.js');
7
7
 
8
8
  /**
9
- * Returns the market of the checkout, and automatically re-renders
10
- * your component if it changes.
9
+ * Returns the market of the checkout, carried over from the cart context.
10
+ * In cases where multiple markets match, this returns the most narrowly
11
+ * scoped country region market. Automatically re-renders your component
12
+ * if it changes.
13
+ *
14
+ * > Caution: This hook is deprecated and will be removed in a future version of the API.
15
+ *
16
+ * @deprecated This hook will be removed in a future version of the API.
11
17
  * @publicDocs
12
18
  */
13
19
  function useLocalizationMarket() {
@@ -7,8 +7,14 @@ var subscription = require('./subscription.js');
7
7
  var errors = require('./errors.js');
8
8
 
9
9
  /**
10
- * Returns the market of the checkout, and automatically re-renders
11
- * your component if it changes.
10
+ * Returns the market associated with the order, carried over from the cart
11
+ * context. In cases where multiple markets match, this returns the most
12
+ * narrowly scoped country region market. Automatically re-renders your
13
+ * component if it changes.
14
+ *
15
+ * > Caution: This hook is deprecated and will be removed in a future version of the API.
16
+ *
17
+ * @deprecated This hook will be removed in a future version of the API.
12
18
  */
13
19
  function useLocalizationMarket() {
14
20
  const api$1 = api.useApi();
@@ -2,8 +2,14 @@ import { useApi } from './api.mjs';
2
2
  import { useSubscription } from './subscription.mjs';
3
3
 
4
4
  /**
5
- * Returns the market of the checkout, and automatically re-renders
6
- * your component if it changes.
5
+ * Returns the market of the checkout, carried over from the cart context.
6
+ * In cases where multiple markets match, this returns the most narrowly
7
+ * scoped country region market. Automatically re-renders your component
8
+ * if it changes.
9
+ *
10
+ * > Caution: This hook is deprecated and will be removed in a future version of the API.
11
+ *
12
+ * @deprecated This hook will be removed in a future version of the API.
7
13
  * @publicDocs
8
14
  */
9
15
  function useLocalizationMarket() {
@@ -3,8 +3,14 @@ import { useSubscription } from './subscription.mjs';
3
3
  import { ExtensionHasNoFieldError } from './errors.mjs';
4
4
 
5
5
  /**
6
- * Returns the market of the checkout, and automatically re-renders
7
- * your component if it changes.
6
+ * Returns the market associated with the order, carried over from the cart
7
+ * context. In cases where multiple markets match, this returns the most
8
+ * narrowly scoped country region market. Automatically re-renders your
9
+ * component if it changes.
10
+ *
11
+ * > Caution: This hook is deprecated and will be removed in a future version of the API.
12
+ *
13
+ * @deprecated This hook will be removed in a future version of the API.
8
14
  */
9
15
  function useLocalizationMarket() {
10
16
  const api = useApi();
@@ -2,8 +2,14 @@ import { useApi } from './api.esnext';
2
2
  import { useSubscription } from './subscription.esnext';
3
3
 
4
4
  /**
5
- * Returns the market of the checkout, and automatically re-renders
6
- * your component if it changes.
5
+ * Returns the market of the checkout, carried over from the cart context.
6
+ * In cases where multiple markets match, this returns the most narrowly
7
+ * scoped country region market. Automatically re-renders your component
8
+ * if it changes.
9
+ *
10
+ * > Caution: This hook is deprecated and will be removed in a future version of the API.
11
+ *
12
+ * @deprecated This hook will be removed in a future version of the API.
7
13
  * @publicDocs
8
14
  */
9
15
  function useLocalizationMarket() {
@@ -3,8 +3,14 @@ import { useSubscription } from './subscription.esnext';
3
3
  import { ExtensionHasNoFieldError } from './errors.esnext';
4
4
 
5
5
  /**
6
- * Returns the market of the checkout, and automatically re-renders
7
- * your component if it changes.
6
+ * Returns the market associated with the order, carried over from the cart
7
+ * context. In cases where multiple markets match, this returns the most
8
+ * narrowly scoped country region market. Automatically re-renders your
9
+ * component if it changes.
10
+ *
11
+ * > Caution: This hook is deprecated and will be removed in a future version of the API.
12
+ *
13
+ * @deprecated This hook will be removed in a future version of the API.
8
14
  */
9
15
  function useLocalizationMarket() {
10
16
  const api = useApi();
@@ -1,151 +1,105 @@
1
- /** VERSION: 1.25.0 **/
1
+ /** VERSION: 2.23.0 **/
2
2
  /* eslint-disable import/extensions */
3
3
 
4
4
  /* eslint-disable @typescript-eslint/no-namespace */
5
5
 
6
6
  // eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
7
7
  /// <reference lib="DOM" />
8
- import type {ComponentChildren, AdminActionProps$1} from './shared.d.ts';
8
+ import type {
9
+ ComponentChildren,
10
+ AdminActionProps$1,
11
+ PreactCustomElement,
12
+ RenderImpl,
13
+ } from './shared.d.ts';
14
+ import * as preact$1 from 'preact';
15
+ import {ReactNode, RefAttributes} from 'react';
9
16
 
10
17
  /**
11
- * The properties for the admin action component. These properties configure the heading and loading state of the admin action extension interface.
18
+ * Configure the following properties on the admin action component.
12
19
  * @publicDocs
13
20
  */
14
21
  export interface AdminActionProps
15
- extends Pick<AdminActionProps$1, 'heading' | 'loading'> {}
22
+ extends Pick<AdminActionProps$1, 'heading' | 'loading'> {
23
+ /**
24
+ * Whether the action is in a loading state, such as during initial page load or when the action is being opened.
25
+ * When `true`, the action is in an inert state that prevents user interaction.
26
+ *
27
+ * @default false
28
+ */
29
+ loading: AdminActionProps$1['loading'];
30
+ }
16
31
 
17
- declare const tagName = 's-admin-action';
32
+ export type ReactIntrinsicElementChildren<PreactProps extends object> =
33
+ 'children' extends keyof PreactProps
34
+ ? {
35
+ children?: ReactNode;
36
+ }
37
+ : Record<never, never>;
38
+ export type ReactIntrinsicElementProps<
39
+ PreactProps extends object,
40
+ ElementType,
41
+ > = Omit<PreactProps, 'children' | 'key' | 'ref' | 'slot'> &
42
+ ReactIntrinsicElementChildren<PreactProps> &
43
+ RefAttributes<ElementType> & {
44
+ slot?: Lowercase<string>;
45
+ };
46
+ export type ReactIntrinsicElements = {
47
+ [Tag in Exclude<
48
+ Extract<keyof preact$1.createElement.JSX.IntrinsicElements, `s-${string}`>,
49
+ `s-test-${string}`
50
+ >]: ReactIntrinsicElementProps<
51
+ preact$1.createElement.JSX.IntrinsicElements[Tag],
52
+ Tag extends keyof HTMLElementTagNameMap
53
+ ? HTMLElementTagNameMap[Tag]
54
+ : HTMLElement
55
+ >;
56
+ };
57
+ declare module 'react' {
58
+ namespace JSX {
59
+ interface IntrinsicElements extends ReactIntrinsicElements {}
60
+ }
61
+ }
18
62
 
19
- /**
20
- * The JSX props for the admin action component. These properties extend `AdminActionProps` with slots for primary and secondary action buttons that merchants can interact with.
21
- * @publicDocs
22
- */
63
+ declare const tagName = 's-admin-action';
23
64
  export interface AdminActionJSXProps
24
65
  extends Partial<AdminActionProps>,
25
66
  Pick<AdminActionProps$1, 'id'> {
26
67
  /**
27
- * The primary action button or link to display in the admin action area. This is the main call-to-action that appears prominently in the interface. Typically uses a button component with `variant="primary"` to complete or advance the workflow.
68
+ * The main action button or link displayed in the admin action modal.
69
+ * This represents the primary or most important action that users can take in this modal context, typically displayed with high visual prominence.
28
70
  */
29
71
  primaryAction: ComponentChildren;
30
72
  /**
31
- * The secondary action buttons or links to display in the admin action area. These are supporting actions like cancel, back, or alternative operations. Typically uses button components with `variant="secondary"` or `variant="tertiary"`.
73
+ * Additional action buttons or links displayed in the admin action modal.
74
+ * These provide alternative or supporting actions, visually de-emphasized compared to the primary action to establish clear hierarchy.
32
75
  */
33
76
  secondaryActions: ComponentChildren;
34
77
  }
35
78
 
36
- /**
37
- * The CSS styles as a string, used for styling web components within their shadow DOM.
38
- * @publicDocs
39
- */
40
- export type Styles = string;
41
- /**
42
- * The implementation configuration for rendering a Preact component into a shadow root. Defines the render function that returns JSX elements and optional CSS styles to apply to the component's shadow DOM.
43
- * @publicDocs
44
- */
45
- export type RenderImpl = Omit<ShadowRootInit, 'mode'> & {
46
- /**
47
- * The render function that returns Preact/JSX elements to display in the component's shadow root.
48
- */
49
- ShadowRoot: (element: any) => ComponentChildren;
50
- /**
51
- * The optional CSS styles to inject into the component's shadow DOM.
52
- */
53
- styles?: Styles;
54
- };
55
- /**
56
- * The properties of an activation event (such as a click or keyboard press) that describe which modifier keys and mouse buttons were involved. This is used to determine intended behavior like opening links in new tabs when Command/Control is pressed.
57
- * @publicDocs
58
- */
59
- export interface ActivationEventEsque {
60
- /**
61
- * Whether the Shift key was pressed during the activation event.
62
- */
63
- shiftKey: boolean;
64
- /**
65
- * Whether the Meta key (Command on Mac, Windows key on Windows) was pressed during the activation event.
66
- */
67
- metaKey: boolean;
68
- /**
69
- * Whether the Control key was pressed during the activation event.
70
- */
71
- ctrlKey: boolean;
72
- /**
73
- * The mouse button that was pressed during the activation event. `0` for primary button (left click), `1` for auxiliary button (middle click), `2` for secondary button (right click).
74
- */
75
- button: number;
76
- }
77
- /**
78
- * The options for controlling how a synthetic click behaves. Allows passing modifier key states and button information from an original event to influence link behavior such as opening in new tabs or background tabs.
79
- * @publicDocs
80
- */
81
- export interface ClickOptions {
82
- /**
83
- * The activation event (such as a click or keyboard event) whose modifier key state and button information should influence the synthetic click behavior. For example, passing an event with `metaKey: true` will cause links to open in a new tab.
84
- */
85
- sourceEvent?: ActivationEventEsque;
86
- }
87
- /**
88
- * Base class for creating custom elements with Preact.
89
- * While this class could be used in both Node and the browser, the constructor will only be used in the browser.
90
- * So we give it a type of HTMLElement to avoid typing issues later where it's used, which will only happen in the browser.
91
- */
92
- declare const BaseClass: typeof globalThis.HTMLElement;
93
- declare abstract class PreactCustomElement extends BaseClass {
94
- /** @private */
95
- static get observedAttributes(): string[];
96
- constructor({
97
- styles,
98
- ShadowRoot: renderFunction,
99
- delegatesFocus,
100
- ...options
101
- }: RenderImpl);
102
-
103
- /** @private */
104
- setAttribute(name: string, value: string): void;
105
- /** @private */
106
- attributeChangedCallback(name: string): void;
79
+ declare class PolarisCustomElement extends PreactCustomElement {
80
+ constructor(renderImpl: Omit<RenderImpl, 'globalShadowCSS'>);
107
81
  /** @private */
108
82
  connectedCallback(): void;
109
83
  /** @private */
110
- disconnectedCallback(): void;
111
- /** @private */
112
84
  adoptedCallback(): void;
113
- /**
114
- * Queue a run of the render function.
115
- * You shouldn't need to call this manually - it should be handled by changes to @property values.
116
- * @private
117
- */
118
- queueRender(): void;
119
- /**
120
- * Like the standard `element.click()`, but you can influence the behavior with a `sourceEvent`.
121
- *
122
- * For example, if the `sourceEvent` was a middle click, or has particular keys held down,
123
- * components will attempt to produce the desired behavior on links, such as opening the page in the background tab.
124
- * @private
125
- * @param options
126
- */
127
- click({sourceEvent}?: ClickOptions): void;
128
85
  }
129
86
 
130
87
  /**
131
- * The admin action custom element class that renders action controls in the Shopify admin interface. This component creates a standardized action area with a heading and slots for primary and secondary action buttons, used exclusively in admin action extensions.
88
+ * Configure the following properties on the admin action component.
89
+ * @publicDocs
132
90
  */
133
91
  declare class AdminAction
134
- extends PreactCustomElement
92
+ extends PolarisCustomElement
135
93
  implements AdminActionProps
136
94
  {
137
95
  /**
138
- * The heading text to display at the top of the action area. This title describes the action or task the merchant is performing. If not provided, the extension name is used as the heading.
96
+ * The text to use as the Action modal's title. If not provided, the name of the extension will be used.
139
97
  */
140
98
  heading: string;
141
-
142
99
  /**
143
- * Whether the action extension is currently in a loading state, such as during initial data fetching or when opening the action. When `true`, the action area might display loading indicators and prevent user interaction until loading completes.
144
- *
145
- * @default false
100
+ * Whether the action is in a loading state, such as during initial page load or when the action is being opened. When `true`, the action might be in an inert state that prevents user interaction.
146
101
  */
147
102
  loading: boolean;
148
-
149
103
  constructor();
150
104
  }
151
105
  declare global {
@@ -1,140 +1,55 @@
1
- /** VERSION: 1.25.0 **/
1
+ /** VERSION: 2.23.0 **/
2
2
  /* eslint-disable import/extensions */
3
3
 
4
4
  /* eslint-disable @typescript-eslint/no-namespace */
5
5
 
6
6
  // eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
7
7
  /// <reference lib="DOM" />
8
- import type {AdminBlockProps$1, ComponentChildren} from './shared.d.ts';
8
+ import type {
9
+ AdminBlockProps$1,
10
+ PreactCustomElement,
11
+ RenderImpl,
12
+ } from './shared.d.ts';
9
13
 
10
14
  /**
11
- * The properties for the admin block component. These properties configure the heading and collapsed summary of collapsible content blocks in the admin interface.
15
+ * Configure the following properties on the admin block component.
12
16
  * @publicDocs
13
17
  */
14
18
  export interface AdminBlockProps
15
- extends Pick<AdminBlockProps$1, 'heading' | 'collapsedSummary'> {}
16
-
17
- declare const tagName = 's-admin-block';
18
-
19
- /**
20
- * The JSX props for the admin block component. These properties extend `AdminBlockProps` with an optional `id` for element identification in JSX rendering.
21
- * @publicDocs
22
- */
23
- export interface AdminBlockJSXProps
24
- extends Partial<AdminBlockProps>,
25
- Pick<AdminBlockProps$1, 'id'> {}
26
-
27
- /**
28
- * The CSS styles as a string, used for styling web components within their shadow DOM.
29
- * @publicDocs
30
- */
31
- export type Styles = string;
32
- /**
33
- * The implementation configuration for rendering a Preact component into a shadow root. Defines the render function that returns JSX elements and optional CSS styles to apply to the component's shadow DOM.
34
- * @publicDocs
35
- */
36
- export type RenderImpl = Omit<ShadowRootInit, 'mode'> & {
37
- /**
38
- * The render function that returns Preact/JSX elements to display in the component's shadow root.
39
- */
40
- ShadowRoot: (element: any) => ComponentChildren;
41
- /**
42
- * The optional CSS styles to inject into the component's shadow DOM.
43
- */
44
- styles?: Styles;
45
- };
46
- /**
47
- * The properties of an activation event (such as a click or keyboard press) that describe which modifier keys and mouse buttons were involved. This is used to determine intended behavior like opening links in new tabs when Command/Control is pressed.
48
- * @publicDocs
49
- */
50
- export interface ActivationEventEsque {
51
- /**
52
- * Whether the Shift key was pressed during the activation event.
53
- */
54
- shiftKey: boolean;
19
+ extends Pick<AdminBlockProps$1, 'heading' | 'collapsedSummary'> {
55
20
  /**
56
- * Whether the Meta key (Command on Mac, Windows key on Windows) was pressed during the activation event.
21
+ * The text displayed as the block's title in the header. If not provided, the extension name will be used.
57
22
  */
58
- metaKey: boolean;
23
+ heading: AdminBlockProps$1['heading'];
59
24
  /**
60
- * Whether the Control key was pressed during the activation event.
25
+ * The summary text displayed when the app block is collapsed. Summaries longer than 30 characters will be truncated.
61
26
  */
62
- ctrlKey: boolean;
63
- /**
64
- * The mouse button that was pressed during the activation event. `0` for primary button (left click), `1` for auxiliary button (middle click), `2` for secondary button (right click).
65
- */
66
- button: number;
27
+ collapsedSummary: AdminBlockProps$1['collapsedSummary'];
67
28
  }
68
- /**
69
- * The options for controlling how a synthetic click behaves. Allows passing modifier key states and button information from an original event to influence link behavior such as opening in new tabs or background tabs.
70
- * @publicDocs
71
- */
72
- export interface ClickOptions {
73
- /**
74
- * The activation event (such as a click or keyboard event) whose modifier key state and button information should influence the synthetic click behavior. For example, passing an event with `metaKey: true` will cause links to open in a new tab.
75
- */
76
- sourceEvent?: ActivationEventEsque;
77
- }
78
- /**
79
- * Base class for creating custom elements with Preact.
80
- * While this class could be used in both Node and the browser, the constructor will only be used in the browser.
81
- * So we give it a type of HTMLElement to avoid typing issues later where it's used, which will only happen in the browser.
82
- */
83
- declare const BaseClass: typeof globalThis.HTMLElement;
84
- declare abstract class PreactCustomElement extends BaseClass {
85
- /** @private */
86
- static get observedAttributes(): string[];
87
- constructor({
88
- styles,
89
- ShadowRoot: renderFunction,
90
- delegatesFocus,
91
- ...options
92
- }: RenderImpl);
93
29
 
94
- /** @private */
95
- setAttribute(name: string, value: string): void;
96
- /** @private */
97
- attributeChangedCallback(name: string): void;
30
+ declare const tagName = 's-admin-block';
31
+ export interface AdminBlockJSXProps
32
+ extends Partial<AdminBlockProps>,
33
+ Pick<AdminBlockProps$1, 'id'> {}
34
+
35
+ declare class PolarisCustomElement extends PreactCustomElement {
36
+ constructor(renderImpl: Omit<RenderImpl, 'globalShadowCSS'>);
98
37
  /** @private */
99
38
  connectedCallback(): void;
100
39
  /** @private */
101
- disconnectedCallback(): void;
102
- /** @private */
103
40
  adoptedCallback(): void;
104
- /**
105
- * Queue a run of the render function.
106
- * You shouldn't need to call this manually - it should be handled by changes to @property values.
107
- * @private
108
- */
109
- queueRender(): void;
110
- /**
111
- * Like the standard `element.click()`, but you can influence the behavior with a `sourceEvent`.
112
- *
113
- * For example, if the `sourceEvent` was a middle click, or has particular keys held down,
114
- * components will attempt to produce the desired behavior on links, such as opening the page in the background tab.
115
- * @private
116
- * @param options
117
- */
118
- click({sourceEvent}?: ClickOptions): void;
119
41
  }
120
42
 
121
43
  /**
122
- * The admin block custom element class that renders a collapsible content block in the Shopify admin interface. This component organizes content into expandable sections with headings and provides a summary when collapsed.
44
+ * Configure the following properties on the admin block component.
45
+ * @publicDocs
123
46
  */
124
47
  declare class AdminBlock
125
- extends PreactCustomElement
48
+ extends PolarisCustomElement
126
49
  implements AdminBlockProps
127
50
  {
128
- /**
129
- * The heading text to display at the top of the block. This title describes the content section the merchant is viewing. If not provided, no heading is displayed.
130
- */
131
51
  heading: string;
132
-
133
- /**
134
- * The summary text to display when the block is collapsed. This provides merchants with a preview of the block's contents without expanding it. If not provided, no summary is displayed.
135
- */
136
52
  collapsedSummary: string;
137
-
138
53
  constructor();
139
54
  }
140
55
  declare global {
@@ -1,135 +1,54 @@
1
- /** VERSION: 1.25.0 **/
1
+ /** VERSION: 2.23.0 **/
2
2
  /* eslint-disable import/extensions */
3
3
 
4
4
  /* eslint-disable @typescript-eslint/no-namespace */
5
5
 
6
6
  // eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
7
7
  /// <reference lib="DOM" />
8
- import type {AdminPrintActionProps$1, ComponentChildren} from './shared.d.ts';
8
+ import type {
9
+ AdminPrintActionProps$1,
10
+ PreactCustomElement,
11
+ RenderImpl,
12
+ } from './shared.d.ts';
9
13
 
10
14
  /**
11
- * The properties for the admin print action component. These properties configure the source URL for printing content within admin extensions.
15
+ * Configure the following properties on the admin print action component.
12
16
  * @publicDocs
13
17
  */
14
18
  export interface AdminPrintActionProps
15
- extends Pick<AdminPrintActionProps$1, 'src'> {}
19
+ extends Pick<AdminPrintActionProps$1, 'src'> {
20
+ /**
21
+ * The URL of the document to preview and print. Supports HTML, PDF, and image formats.
22
+ * If not provided, the preview will show an empty state and the print button will be disabled.
23
+ */
24
+ src: AdminPrintActionProps$1['src'];
25
+ }
16
26
 
17
27
  declare const tagName = 's-admin-print-action';
18
-
19
- /**
20
- * The JSX props for the admin print action component. These properties extend `AdminPrintActionProps` with an optional `id` for element identification in JSX rendering.
21
- * @publicDocs
22
- */
23
28
  export interface AdminPrintActionJSXProps
24
29
  extends Partial<AdminPrintActionProps>,
25
30
  Pick<AdminPrintActionProps$1, 'id'> {}
26
31
 
27
- /**
28
- * The CSS styles as a string, used for styling web components within their shadow DOM.
29
- * @publicDocs
30
- */
31
- export type Styles = string;
32
- /**
33
- * The implementation configuration for rendering a Preact component into a shadow root. Defines the render function that returns JSX elements and optional CSS styles to apply to the component's shadow DOM.
34
- * @publicDocs
35
- */
36
- export type RenderImpl = Omit<ShadowRootInit, 'mode'> & {
37
- /**
38
- * The render function that returns Preact/JSX elements to display in the component's shadow root.
39
- */
40
- ShadowRoot: (element: any) => ComponentChildren;
41
- /**
42
- * The optional CSS styles to inject into the component's shadow DOM.
43
- */
44
- styles?: Styles;
45
- };
46
- /**
47
- * The properties of an activation event (such as a click or keyboard press) that describe which modifier keys and mouse buttons were involved. This is used to determine intended behavior like opening links in new tabs when Command/Control is pressed.
48
- * @publicDocs
49
- */
50
- export interface ActivationEventEsque {
51
- /**
52
- * Whether the Shift key was pressed during the activation event.
53
- */
54
- shiftKey: boolean;
55
- /**
56
- * Whether the Meta key (Command on Mac, Windows key on Windows) was pressed during the activation event.
57
- */
58
- metaKey: boolean;
59
- /**
60
- * Whether the Control key was pressed during the activation event.
61
- */
62
- ctrlKey: boolean;
63
- /**
64
- * The mouse button that was pressed during the activation event. `0` for primary button (left click), `1` for auxiliary button (middle click), `2` for secondary button (right click).
65
- */
66
- button: number;
67
- }
68
- /**
69
- * The options for controlling how a synthetic click behaves. Allows passing modifier key states and button information from an original event to influence link behavior such as opening in new tabs or background tabs.
70
- * @publicDocs
71
- */
72
- export interface ClickOptions {
73
- /**
74
- * The activation event (such as a click or keyboard event) whose modifier key state and button information should influence the synthetic click behavior. For example, passing an event with `metaKey: true` will cause links to open in a new tab.
75
- */
76
- sourceEvent?: ActivationEventEsque;
77
- }
78
- /**
79
- * Base class for creating custom elements with Preact.
80
- * While this class could be used in both Node and the browser, the constructor will only be used in the browser.
81
- * So we give it a type of HTMLElement to avoid typing issues later where it's used, which will only happen in the browser.
82
- */
83
- declare const BaseClass: typeof globalThis.HTMLElement;
84
- declare abstract class PreactCustomElement extends BaseClass {
85
- /** @private */
86
- static get observedAttributes(): string[];
87
- constructor({
88
- styles,
89
- ShadowRoot: renderFunction,
90
- delegatesFocus,
91
- ...options
92
- }: RenderImpl);
93
-
94
- /** @private */
95
- setAttribute(name: string, value: string): void;
96
- /** @private */
97
- attributeChangedCallback(name: string): void;
32
+ declare class PolarisCustomElement extends PreactCustomElement {
33
+ constructor(renderImpl: Omit<RenderImpl, 'globalShadowCSS'>);
98
34
  /** @private */
99
35
  connectedCallback(): void;
100
36
  /** @private */
101
- disconnectedCallback(): void;
102
- /** @private */
103
37
  adoptedCallback(): void;
104
- /**
105
- * Queue a run of the render function.
106
- * You shouldn't need to call this manually - it should be handled by changes to @property values.
107
- * @private
108
- */
109
- queueRender(): void;
110
- /**
111
- * Like the standard `element.click()`, but you can influence the behavior with a `sourceEvent`.
112
- *
113
- * For example, if the `sourceEvent` was a middle click, or has particular keys held down,
114
- * components will attempt to produce the desired behavior on links, such as opening the page in the background tab.
115
- * @private
116
- * @param options
117
- */
118
- click({sourceEvent}?: ClickOptions): void;
119
38
  }
120
39
 
121
40
  /**
122
- * The admin print action custom element class that renders a print interface in the Shopify admin. This component enables merchants to print content from a specified source URL using the browser's print functionality.
41
+ * Configure the following properties on the admin print action component.
42
+ * @publicDocs
123
43
  */
124
44
  declare class AdminPrintAction
125
- extends PreactCustomElement
45
+ extends PolarisCustomElement
126
46
  implements AdminPrintActionProps
127
47
  {
128
48
  /**
129
- * The source URL of the content to print. This should point to the document or page that'll be sent to the printer when the merchant initiates the print action.
49
+ * The `src` URL of the preview and the document to print. If not provided, the preview will show an empty state and the print button will be disabled. HTML, PDFs, and images are supported.
130
50
  */
131
51
  src: string;
132
-
133
52
  constructor();
134
53
  }
135
54
  declare global {