@shopify/ui-extensions 2026.7.4 → 2026.10.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/surfaces/checkout/preact/market.js +8 -2
- package/build/cjs/surfaces/checkout/shared.js +0 -2
- package/build/cjs/surfaces/customer-account/preact/market.js +8 -2
- package/build/cjs/surfaces/point-of-sale/events.js +129 -1
- package/build/cjs/surfaces/point-of-sale/types/storage.js +11 -0
- package/build/cjs/surfaces/point-of-sale.js +1 -0
- package/build/esm/surfaces/checkout/preact/market.mjs +8 -2
- package/build/esm/surfaces/checkout/shared.mjs +0 -2
- package/build/esm/surfaces/customer-account/preact/market.mjs +8 -2
- package/build/esm/surfaces/point-of-sale/events.mjs +129 -2
- package/build/esm/surfaces/point-of-sale/types/storage.mjs +11 -0
- package/build/esm/surfaces/point-of-sale.mjs +1 -1
- package/build/esnext/surfaces/checkout/preact/market.esnext +8 -2
- package/build/esnext/surfaces/checkout/shared.esnext +0 -2
- package/build/esnext/surfaces/customer-account/preact/market.esnext +8 -2
- package/build/esnext/surfaces/point-of-sale/events.esnext +129 -2
- package/build/esnext/surfaces/point-of-sale/types/storage.esnext +11 -0
- package/build/esnext/surfaces/point-of-sale.esnext +1 -1
- package/build/ts/shared.d.ts +2 -2
- package/build/ts/shared.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/AdminAction.d.ts +61 -107
- package/build/ts/surfaces/admin/components/AdminBlock.d.ts +22 -107
- package/build/ts/surfaces/admin/components/AdminPrintAction.d.ts +20 -101
- package/build/ts/surfaces/admin/components/AppNav.d.ts +38 -1
- package/build/ts/surfaces/admin/components/Avatar.d.ts +100 -139
- package/build/ts/surfaces/admin/components/Badge.d.ts +107 -156
- package/build/ts/surfaces/admin/components/Banner.d.ts +102 -127
- package/build/ts/surfaces/admin/components/Box.d.ts +145 -234
- package/build/ts/surfaces/admin/components/Button.d.ts +156 -266
- package/build/ts/surfaces/admin/components/ButtonGroup.d.ts +89 -117
- package/build/ts/surfaces/admin/components/Checkbox.d.ts +139 -174
- package/build/ts/surfaces/admin/components/Chip.d.ts +117 -15
- package/build/ts/surfaces/admin/components/Choice.d.ts +88 -113
- package/build/ts/surfaces/admin/components/ChoiceList.d.ts +120 -129
- package/build/ts/surfaces/admin/components/Clickable.d.ts +227 -209
- package/build/ts/surfaces/admin/components/ClickableChip.d.ts +117 -153
- package/build/ts/surfaces/admin/components/ColorField.d.ts +111 -215
- package/build/ts/surfaces/admin/components/ColorPicker.d.ts +82 -137
- package/build/ts/surfaces/admin/components/DateField.d.ts +140 -230
- package/build/ts/surfaces/admin/components/DatePicker.d.ts +178 -181
- package/build/ts/surfaces/admin/components/Divider.d.ts +50 -118
- package/build/ts/surfaces/admin/components/DropZone.d.ts +153 -12
- package/build/ts/surfaces/admin/components/EmailField.d.ts +100 -197
- package/build/ts/surfaces/admin/components/EmptyState.d.ts +144 -0
- package/build/ts/surfaces/admin/components/Form.d.ts +25 -118
- package/build/ts/surfaces/admin/components/FunctionSettings.d.ts +26 -132
- package/build/ts/surfaces/admin/components/Grid.d.ts +165 -299
- package/build/ts/surfaces/admin/components/GridItem.d.ts +145 -261
- package/build/ts/surfaces/admin/components/Heading.d.ts +117 -117
- package/build/ts/surfaces/admin/components/Icon.d.ts +91 -129
- package/build/ts/surfaces/admin/components/Image.d.ts +216 -251
- package/build/ts/surfaces/admin/components/Link.d.ts +125 -126
- package/build/ts/surfaces/admin/components/ListItem.d.ts +63 -102
- package/build/ts/surfaces/admin/components/Menu.d.ts +82 -150
- package/build/ts/surfaces/admin/components/Modal.d.ts +232 -26
- package/build/ts/surfaces/admin/components/MoneyField.d.ts +103 -196
- package/build/ts/surfaces/admin/components/Number.d.ts +193 -0
- package/build/ts/surfaces/admin/components/NumberField.d.ts +114 -208
- package/build/ts/surfaces/admin/components/Option.d.ts +67 -108
- package/build/ts/surfaces/admin/components/OptionGroup.d.ts +69 -105
- package/build/ts/surfaces/admin/components/OrderedList.d.ts +56 -102
- package/build/ts/surfaces/admin/components/Page.d.ts +93 -13
- package/build/ts/surfaces/admin/components/Paragraph.d.ts +126 -138
- package/build/ts/surfaces/admin/components/PasswordField.d.ts +109 -203
- package/build/ts/surfaces/admin/components/Popover.d.ts +673 -0
- package/build/ts/surfaces/admin/components/Progress.d.ts +155 -0
- package/build/ts/surfaces/admin/components/QueryContainer.d.ts +77 -116
- package/build/ts/surfaces/admin/components/SearchField.d.ts +103 -191
- package/build/ts/surfaces/admin/components/Section.d.ts +132 -128
- package/build/ts/surfaces/admin/components/Select.d.ts +144 -193
- package/build/ts/surfaces/admin/components/Spinner.d.ts +60 -113
- package/build/ts/surfaces/admin/components/Stack.d.ts +156 -282
- package/build/ts/surfaces/admin/components/StandardComponents.d.ts +1 -1
- package/build/ts/surfaces/admin/components/StandardComponents.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Switch.d.ts +75 -165
- package/build/ts/surfaces/admin/components/Table.d.ts +100 -210
- package/build/ts/surfaces/admin/components/TableBody.d.ts +70 -106
- package/build/ts/surfaces/admin/components/TableCell.d.ts +70 -107
- package/build/ts/surfaces/admin/components/TableHeader.d.ts +79 -119
- package/build/ts/surfaces/admin/components/TableHeaderRow.d.ts +71 -107
- package/build/ts/surfaces/admin/components/TableRow.d.ts +81 -109
- package/build/ts/surfaces/admin/components/Text.d.ts +123 -164
- package/build/ts/surfaces/admin/components/TextArea.d.ts +100 -195
- package/build/ts/surfaces/admin/components/TextField.d.ts +120 -204
- package/build/ts/surfaces/admin/components/Thumbnail.d.ts +83 -133
- package/build/ts/surfaces/admin/components/Tooltip.d.ts +78 -146
- package/build/ts/surfaces/admin/components/URLField.d.ts +107 -209
- package/build/ts/surfaces/admin/components/UnorderedList.d.ts +58 -110
- package/build/ts/surfaces/admin/components/shared.d.ts +4193 -1203
- package/build/ts/surfaces/admin/extension-targets.d.ts +8 -0
- package/build/ts/surfaces/admin/extension-targets.d.ts.map +1 -1
- package/build/ts/surfaces/admin/targets/admin.abandoned-checkout-details.action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.abandoned-checkout-details.block.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.abandoned-checkout-index.action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.app.home.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.app.intent.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.catalog-details.action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.catalog-details.block.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.collection-details.action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.collection-details.block.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.collection-index.action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.company-details.action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.company-details.block.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.company-location-details.block.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.customer-details.action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.customer-details.block.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.customer-index.action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.customer-index.selection-action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.customer-segment-details.action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.discount-details.action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.discount-details.function-settings.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.discount-index.action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.discount-index.selection-action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.draft-order-details.action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.draft-order-details.block.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.draft-order-index.action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.draft-order-index.selection-action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.gift-card-details.action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.gift-card-details.block.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.order-details.action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.order-details.block.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.order-details.print-action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.order-fulfilled-card.action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.order-index.action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.order-index.selection-action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.order-index.selection-print-action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.product-details.action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.product-details.block.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.product-details.configuration.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.product-details.configuration.should-render.d.ts +6 -0
- package/build/ts/surfaces/admin/targets/admin.product-details.print-action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.product-details.reorder.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.product-index.action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.product-index.selection-action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.product-index.selection-print-action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.product-purchase-option.action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.product-variant-details.action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.product-variant-details.block.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.product-variant-details.configuration.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.product-variant-details.configuration.should-render.d.ts +6 -0
- package/build/ts/surfaces/admin/targets/admin.product-variant-purchase-option.action.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.settings.internal-order-routing-rule.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.settings.order-routing-rule.render.d.ts +2 -0
- package/build/ts/surfaces/admin/targets/admin.settings.validation.render.d.ts +2 -0
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts +8 -5
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Box.d.ts +56 -1
- package/build/ts/surfaces/checkout/components/components-shared.d.ts +1 -1
- package/build/ts/surfaces/checkout/preact/market.d.ts +8 -2
- package/build/ts/surfaces/checkout/preact/market.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/shared.d.ts +1 -3
- package/build/ts/surfaces/checkout/shared.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/targets/purchase.cart-line-item.line-components.render.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.actions.render-before.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.block.render.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.cart-line-item.render-after.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.cart-line-list.render-after.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.contact.render-after.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.delivery-address.render-after.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.delivery-address.render-before.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.footer.render-after.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.gift-card.render.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.header.render-after.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.payment-method-list.render-after.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.payment-method-list.render-before.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.payment-option-item.action-required.render.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.payment-option-item.details.render.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.payment-option-item.hosted-fields.render-after.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.pickup-location-list.render-after.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.pickup-location-list.render-before.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.pickup-location-option-item.render-after.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.pickup-point-list.render-after.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.pickup-point-list.render-before.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.reductions.render-after.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.reductions.render-before.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.shipping-option-item.details.render.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.shipping-option-item.render-after.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.shipping-option-list.render-after.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.checkout.shipping-option-list.render-before.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.thank-you.block.render.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.thank-you.cart-line-item.render-after.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.thank-you.cart-line-list.render-after.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.thank-you.customer-information.render-after.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.thank-you.footer.render-after.d.ts +0 -1
- package/build/ts/surfaces/checkout/targets/purchase.thank-you.header.render-after.d.ts +0 -1
- package/build/ts/surfaces/customer-account/api/order-status/order-status.d.ts +6 -1
- package/build/ts/surfaces/customer-account/api/order-status/order-status.d.ts.map +1 -1
- package/build/ts/surfaces/customer-account/components/Box.d.ts +56 -1
- package/build/ts/surfaces/customer-account/components/components-shared.d.ts +1 -1
- package/build/ts/surfaces/customer-account/preact/market.d.ts +8 -2
- package/build/ts/surfaces/customer-account/preact/market.d.ts.map +1 -1
- package/build/ts/surfaces/customer-account/targets/customer-account.footer.render-after.d.ts +0 -1
- package/build/ts/surfaces/customer-account/targets/customer-account.order-index.announcement.render.d.ts +0 -1
- package/build/ts/surfaces/customer-account/targets/customer-account.order-index.block.render.d.ts +0 -1
- package/build/ts/surfaces/customer-account/targets/customer-account.order-status.announcement.render.d.ts +0 -1
- package/build/ts/surfaces/customer-account/targets/customer-account.order-status.block.render.d.ts +0 -1
- package/build/ts/surfaces/customer-account/targets/customer-account.order-status.cart-line-item.render-after.d.ts +0 -1
- package/build/ts/surfaces/customer-account/targets/customer-account.order-status.cart-line-list.render-after.d.ts +0 -1
- package/build/ts/surfaces/customer-account/targets/customer-account.order-status.customer-information.render-after.d.ts +0 -1
- package/build/ts/surfaces/customer-account/targets/customer-account.order-status.fulfillment-details.render-after.d.ts +0 -1
- package/build/ts/surfaces/customer-account/targets/customer-account.order-status.payment-details.render-after.d.ts +0 -1
- package/build/ts/surfaces/customer-account/targets/customer-account.order-status.return-details.render-after.d.ts +0 -1
- package/build/ts/surfaces/customer-account/targets/customer-account.order-status.unfulfilled-items.render-after.d.ts +0 -1
- package/build/ts/surfaces/customer-account/targets/customer-account.order.action.menu-item.render.d.ts +0 -1
- package/build/ts/surfaces/customer-account/targets/customer-account.order.action.render.d.ts +0 -1
- package/build/ts/surfaces/customer-account/targets/customer-account.order.page.render.d.ts +0 -1
- package/build/ts/surfaces/customer-account/targets/customer-account.page.render.d.ts +0 -1
- package/build/ts/surfaces/customer-account/targets/customer-account.profile.addresses.render-after.d.ts +0 -1
- package/build/ts/surfaces/customer-account/targets/customer-account.profile.announcement.render.d.ts +0 -1
- package/build/ts/surfaces/customer-account/targets/customer-account.profile.block.render.d.ts +0 -1
- package/build/ts/surfaces/customer-account/targets/customer-account.profile.company-details.render-after.d.ts +0 -1
- package/build/ts/surfaces/customer-account/targets/customer-account.profile.company-location-addresses.render-after.d.ts +0 -1
- package/build/ts/surfaces/customer-account/targets/customer-account.profile.company-location-payment.render-after.d.ts +0 -1
- package/build/ts/surfaces/customer-account/targets/customer-account.profile.company-location-staff.render-after.d.ts +0 -1
- package/build/ts/surfaces/customer-account/targets/customer-account.profile.payment.render-after.d.ts +0 -1
- package/build/ts/surfaces/point-of-sale/api/cart-api/cart-api.d.ts +13 -0
- package/build/ts/surfaces/point-of-sale/api/cart-api/cart-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/resolution-api/resolution-api.d.ts +23 -0
- package/build/ts/surfaces/point-of-sale/api/resolution-api/resolution-api.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/api.d.ts +3 -2
- package/build/ts/surfaces/point-of-sale/api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/targets/ResolutionComponents.d.ts +10 -0
- package/build/ts/surfaces/point-of-sale/components/targets/ResolutionComponents.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/events/scan-event.d.ts +34 -0
- package/build/ts/surfaces/point-of-sale/events/scan-event.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/events.d.ts +183 -1
- package/build/ts/surfaces/point-of-sale/events.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/extension-targets.d.ts +17 -3
- package/build/ts/surfaces/point-of-sale/extension-targets.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/globals.d.ts +8 -1
- package/build/ts/surfaces/point-of-sale/globals.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/targets/pos.cart.validations.resolution.render.d.ts +44 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.payment.validations.resolution.render.d.ts +44 -0
- package/build/ts/surfaces/point-of-sale/types/cart.d.ts +4 -0
- package/build/ts/surfaces/point-of-sale/types/cart.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/types/storage.d.ts +40 -0
- package/build/ts/surfaces/point-of-sale/types/storage.d.ts.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/shared.ts +4 -2
- package/src/surfaces/admin/components/AdminAction.d.ts +61 -107
- package/src/surfaces/admin/components/AdminBlock.d.ts +22 -107
- package/src/surfaces/admin/components/AdminPrintAction.d.ts +20 -101
- package/src/surfaces/admin/components/AppNav.d.ts +38 -1
- package/src/surfaces/admin/components/Avatar.d.ts +100 -139
- package/src/surfaces/admin/components/Badge.d.ts +107 -156
- package/src/surfaces/admin/components/Banner.d.ts +102 -127
- package/src/surfaces/admin/components/Box.d.ts +145 -234
- package/src/surfaces/admin/components/Button.d.ts +156 -266
- package/src/surfaces/admin/components/ButtonGroup.d.ts +89 -117
- package/src/surfaces/admin/components/Checkbox.d.ts +139 -174
- package/src/surfaces/admin/components/Chip.d.ts +117 -15
- package/src/surfaces/admin/components/Choice.d.ts +88 -113
- package/src/surfaces/admin/components/ChoiceList.d.ts +120 -129
- package/src/surfaces/admin/components/Clickable.d.ts +227 -209
- package/src/surfaces/admin/components/ClickableChip.d.ts +117 -153
- package/src/surfaces/admin/components/ColorField.d.ts +111 -215
- package/src/surfaces/admin/components/ColorPicker.d.ts +82 -137
- package/src/surfaces/admin/components/DateField.d.ts +140 -230
- package/src/surfaces/admin/components/DatePicker.d.ts +178 -181
- package/src/surfaces/admin/components/Divider.d.ts +50 -118
- package/src/surfaces/admin/components/DropZone.d.ts +153 -12
- package/src/surfaces/admin/components/EmailField.d.ts +100 -197
- package/src/surfaces/admin/components/EmptyState.d.ts +144 -0
- package/src/surfaces/admin/components/Form.d.ts +25 -118
- package/src/surfaces/admin/components/FunctionSettings.d.ts +26 -132
- package/src/surfaces/admin/components/Grid.d.ts +165 -299
- package/src/surfaces/admin/components/GridItem.d.ts +145 -261
- package/src/surfaces/admin/components/Heading.d.ts +117 -117
- package/src/surfaces/admin/components/Icon.d.ts +91 -129
- package/src/surfaces/admin/components/Image.d.ts +216 -251
- package/src/surfaces/admin/components/Link.d.ts +125 -126
- package/src/surfaces/admin/components/ListItem.d.ts +63 -102
- package/src/surfaces/admin/components/Menu.d.ts +82 -150
- package/src/surfaces/admin/components/Modal.d.ts +232 -26
- package/src/surfaces/admin/components/MoneyField.d.ts +103 -196
- package/src/surfaces/admin/components/Number.d.ts +193 -0
- package/src/surfaces/admin/components/NumberField.d.ts +114 -208
- package/src/surfaces/admin/components/Option.d.ts +67 -108
- package/src/surfaces/admin/components/OptionGroup.d.ts +69 -105
- package/src/surfaces/admin/components/OrderedList.d.ts +56 -102
- package/src/surfaces/admin/components/Page.d.ts +93 -13
- package/src/surfaces/admin/components/Paragraph.d.ts +126 -138
- package/src/surfaces/admin/components/PasswordField.d.ts +109 -203
- package/src/surfaces/admin/components/Popover.d.ts +673 -0
- package/src/surfaces/admin/components/Progress.d.ts +155 -0
- package/src/surfaces/admin/components/QueryContainer.d.ts +77 -116
- package/src/surfaces/admin/components/SearchField.d.ts +103 -191
- package/src/surfaces/admin/components/Section.d.ts +132 -128
- package/src/surfaces/admin/components/Select.d.ts +144 -193
- package/src/surfaces/admin/components/Spinner.d.ts +60 -113
- package/src/surfaces/admin/components/Stack.d.ts +156 -282
- package/src/surfaces/admin/components/StandardComponents.ts +2 -0
- package/src/surfaces/admin/components/Switch.d.ts +75 -165
- package/src/surfaces/admin/components/Table.d.ts +100 -210
- package/src/surfaces/admin/components/TableBody.d.ts +70 -106
- package/src/surfaces/admin/components/TableCell.d.ts +70 -107
- package/src/surfaces/admin/components/TableHeader.d.ts +79 -119
- package/src/surfaces/admin/components/TableHeaderRow.d.ts +71 -107
- package/src/surfaces/admin/components/TableRow.d.ts +81 -109
- package/src/surfaces/admin/components/Text.d.ts +123 -164
- package/src/surfaces/admin/components/TextArea.d.ts +100 -195
- package/src/surfaces/admin/components/TextField.d.ts +120 -204
- package/src/surfaces/admin/components/Thumbnail.d.ts +83 -133
- package/src/surfaces/admin/components/Tooltip.d.ts +78 -146
- package/src/surfaces/admin/components/URLField.d.ts +107 -209
- package/src/surfaces/admin/components/UnorderedList.d.ts +58 -110
- package/src/surfaces/admin/components/shared.d.ts +4193 -1203
- package/src/surfaces/admin/extension-targets.ts +18 -0
- package/src/surfaces/checkout/api/standard/standard.ts +8 -5
- package/src/surfaces/checkout/components/Box.d.ts +56 -1
- package/src/surfaces/checkout/components/components-shared.d.ts +1 -1
- package/src/surfaces/checkout/preact/market.ts +8 -2
- package/src/surfaces/checkout/shared.ts +1 -6
- package/src/surfaces/customer-account/api/order-status/order-status.ts +6 -1
- package/src/surfaces/customer-account/preact/market.ts +8 -2
- package/src/surfaces/point-of-sale/api/cart-api/cart-api.ts +14 -0
- package/src/surfaces/point-of-sale/api/resolution-api/resolution-api.ts +24 -0
- package/src/surfaces/point-of-sale/api.ts +7 -1
- package/src/surfaces/point-of-sale/components/targets/ResolutionComponents.ts +13 -0
- package/src/surfaces/point-of-sale/events/scan-event.ts +34 -0
- package/src/surfaces/point-of-sale/events.ts +215 -0
- package/src/surfaces/point-of-sale/extension-targets.ts +33 -2
- package/src/surfaces/point-of-sale/globals.ts +16 -1
- package/src/surfaces/point-of-sale/types/cart.ts +4 -0
- package/src/surfaces/point-of-sale/types/storage.ts +47 -0
- package/build/ts/surfaces/checkout/components/LoginWithShop.d.ts +0 -164
- package/build/ts/surfaces/customer-account/components/LoginWithShop.d.ts +0 -164
- package/src/surfaces/checkout/components/LoginWithShop.d.ts +0 -164
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { TransactionCompleteEvent } from './events/transaction-complete-event';
|
|
2
2
|
import type { CashTrackingSessionStartEvent, CashTrackingSessionCompleteEvent } from './events/cash-tracking-session-events';
|
|
3
|
+
import type { ScanEvent } from './events/scan-event';
|
|
4
|
+
import type { Cart } from './types/cart';
|
|
5
|
+
import type { MoneyV2 } from './types/money';
|
|
3
6
|
/**
|
|
4
7
|
* Canonical event-name constants for POS host events. Prefer these over string
|
|
5
8
|
* literals when calling `shopify.addEventListener` / `removeEventListener`.
|
|
@@ -10,6 +13,17 @@ export declare const POS_EVENT_NAMES: {
|
|
|
10
13
|
readonly TRANSACTION_COMPLETE: "transactioncomplete";
|
|
11
14
|
readonly CASH_TRACKING_SESSION_START: "cashtrackingsessionstart";
|
|
12
15
|
readonly CASH_TRACKING_SESSION_COMPLETE: "cashtrackingsessioncomplete";
|
|
16
|
+
readonly SCAN: "scan";
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Canonical workflow-name constants for POS host interceptions. Prefer these
|
|
20
|
+
* over string literals when calling `shopify.intercept`.
|
|
21
|
+
*
|
|
22
|
+
* @private
|
|
23
|
+
*/
|
|
24
|
+
export declare const POS_INTERCEPT_NAMES: {
|
|
25
|
+
readonly CART_VALIDATIONS: "cartvalidations";
|
|
26
|
+
readonly PAYMENT_VALIDATIONS: "paymentvalidations";
|
|
13
27
|
};
|
|
14
28
|
/**
|
|
15
29
|
* Maps Shopify POS event names to their corresponding payload types.
|
|
@@ -29,6 +43,174 @@ export interface ShopifyEventMap {
|
|
|
29
43
|
[POS_EVENT_NAMES.CASH_TRACKING_SESSION_START]: CashTrackingSessionStartEvent;
|
|
30
44
|
/** Dispatched when a cash tracking session closes after reconciliation. */
|
|
31
45
|
[POS_EVENT_NAMES.CASH_TRACKING_SESSION_COMPLETE]: CashTrackingSessionCompleteEvent;
|
|
46
|
+
/**
|
|
47
|
+
* Dispatched once for each successful scan captured by a camera, external,
|
|
48
|
+
* or embedded scanner, after POS has finished handling the scan itself.
|
|
49
|
+
* Every event carries decoded `data` and its `source`.
|
|
50
|
+
*/
|
|
51
|
+
[POS_EVENT_NAMES.SCAN]: ScanEvent;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Maps POS interceptable workflow names to their corresponding `Event` types.
|
|
55
|
+
*
|
|
56
|
+
* Used as the generic type parameter for `shopify.intercept`.
|
|
57
|
+
*
|
|
58
|
+
* @private
|
|
59
|
+
*/
|
|
60
|
+
export interface ShopifyInterceptMap {
|
|
61
|
+
[POS_INTERCEPT_NAMES.CART_VALIDATIONS]: CartValidationsEvent;
|
|
62
|
+
[POS_INTERCEPT_NAMES.PAYMENT_VALIDATIONS]: PaymentValidationsEvent;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The data carried by a `cartvalidations` event.
|
|
66
|
+
*
|
|
67
|
+
* @private
|
|
68
|
+
*/
|
|
69
|
+
export interface CartValidationsEventData {
|
|
70
|
+
/** A snapshot of the POS cart taken when the event was produced. */
|
|
71
|
+
readonly cart: Cart;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The event a `cartvalidations` interceptor receives. Carries a snapshot of
|
|
75
|
+
* the POS cart taken when the event was produced.
|
|
76
|
+
*
|
|
77
|
+
* @private
|
|
78
|
+
*/
|
|
79
|
+
export interface CartValidationsEvent extends CartValidationsEventData {
|
|
80
|
+
readonly type: typeof POS_INTERCEPT_NAMES.CART_VALIDATIONS;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The kind of payment method being attempted.
|
|
84
|
+
*
|
|
85
|
+
* @private
|
|
86
|
+
*/
|
|
87
|
+
export type InterceptedPaymentMethodType = 'cash';
|
|
88
|
+
/**
|
|
89
|
+
* Identifies the payment method being attempted.
|
|
90
|
+
*
|
|
91
|
+
* `type` alone identifies singleton methods (for example `cash`). `identifier`
|
|
92
|
+
* disambiguates method types a shop can have several of (for example custom
|
|
93
|
+
* payment methods) as they become interceptable.
|
|
94
|
+
*
|
|
95
|
+
* @private
|
|
96
|
+
*/
|
|
97
|
+
export interface InterceptedPaymentMethod {
|
|
98
|
+
readonly type: InterceptedPaymentMethodType;
|
|
99
|
+
/** Present when `type` alone is ambiguous. Matching is exact on the pair. */
|
|
100
|
+
readonly identifier?: string;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* The event a `paymentvalidations` interceptor receives. Carries the tender
|
|
104
|
+
* attempt's payment method and amount; split payments produce one event per
|
|
105
|
+
* tender, each with its own amount.
|
|
106
|
+
*
|
|
107
|
+
* @private
|
|
108
|
+
*/
|
|
109
|
+
export interface PaymentValidationsEvent extends PaymentValidationsEventData {
|
|
110
|
+
readonly type: typeof POS_INTERCEPT_NAMES.PAYMENT_VALIDATIONS;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* The data carried by a `paymentvalidations` event.
|
|
114
|
+
*
|
|
115
|
+
* @private
|
|
116
|
+
*/
|
|
117
|
+
export interface PaymentValidationsEventData {
|
|
118
|
+
/** The payment method staff selected. */
|
|
119
|
+
readonly paymentMethod: InterceptedPaymentMethod;
|
|
120
|
+
/** The amount this tender would charge, in presentment currency. */
|
|
121
|
+
readonly amount: MoneyV2;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Targets the whole cart rather than a specific line item.
|
|
125
|
+
*
|
|
126
|
+
* @private
|
|
127
|
+
*/
|
|
128
|
+
export type CartTarget = '$.cart';
|
|
129
|
+
/**
|
|
130
|
+
* Targets one cart line item by its `uuid` from this event's `cart` snapshot,
|
|
131
|
+
* for example `$.cart.lineItems['adfd6b06-4a24-4f5f-9f4b-ea21f4432dd4']`.
|
|
132
|
+
*
|
|
133
|
+
* @private
|
|
134
|
+
*/
|
|
135
|
+
export type CartLineItemTarget = `$.cart.lineItems['${string}']`;
|
|
136
|
+
/** @private */
|
|
137
|
+
export type CartValidationTarget = CartTarget | CartLineItemTarget;
|
|
138
|
+
/**
|
|
139
|
+
* Targets the payment attempt being intercepted.
|
|
140
|
+
*
|
|
141
|
+
* @private
|
|
142
|
+
*/
|
|
143
|
+
export type PaymentTarget = '$.payment';
|
|
144
|
+
/** @private */
|
|
145
|
+
export type PaymentValidationTarget = PaymentTarget;
|
|
146
|
+
/**
|
|
147
|
+
* Where a validation applies, as an enumerated token. Targets are matched
|
|
148
|
+
* as exact strings, never evaluated as JSON paths.
|
|
149
|
+
*
|
|
150
|
+
* @private
|
|
151
|
+
*/
|
|
152
|
+
export type ValidationTarget = CartValidationTarget | PaymentValidationTarget;
|
|
153
|
+
/**
|
|
154
|
+
* Maps POS interceptable workflow names to their valid validation targets.
|
|
155
|
+
*
|
|
156
|
+
* @private
|
|
157
|
+
*/
|
|
158
|
+
interface ValidationTargetMap {
|
|
159
|
+
[POS_INTERCEPT_NAMES.CART_VALIDATIONS]: CartValidationTarget;
|
|
160
|
+
[POS_INTERCEPT_NAMES.PAYMENT_VALIDATIONS]: PaymentValidationTarget;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* The interceptor callback for a POS interceptable workflow, keyed by the
|
|
164
|
+
* workflow name so the event and its valid validation targets stay paired.
|
|
165
|
+
*
|
|
166
|
+
* @private
|
|
167
|
+
*/
|
|
168
|
+
export type ShopifyInterceptor<K extends keyof ShopifyInterceptMap> = (event: ShopifyInterceptMap[K]) => InterceptResult<ValidationTargetMap[K]>;
|
|
169
|
+
/**
|
|
170
|
+
* The result an interceptor returns. An empty `operations` list allows the
|
|
171
|
+
* workflow; an `ERROR` validation blocks it.
|
|
172
|
+
*
|
|
173
|
+
* @private
|
|
174
|
+
*/
|
|
175
|
+
export interface InterceptResult<TTarget extends ValidationTarget = ValidationTarget> {
|
|
176
|
+
operations: Operation<TTarget>[];
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* A single host operation produced by an interceptor.
|
|
180
|
+
*
|
|
181
|
+
* @private
|
|
182
|
+
*/
|
|
183
|
+
export interface Operation<TTarget extends ValidationTarget = ValidationTarget> {
|
|
184
|
+
validationAdd?: ValidationAdd<TTarget>;
|
|
185
|
+
}
|
|
186
|
+
/** @private */
|
|
187
|
+
export type ValidationLevel = 'WARNING' | 'ERROR';
|
|
188
|
+
/**
|
|
189
|
+
* Adds a validation to the workflow being intercepted.
|
|
190
|
+
*
|
|
191
|
+
* @private
|
|
192
|
+
*/
|
|
193
|
+
export interface ValidationAdd<TTarget extends ValidationTarget = ValidationTarget> {
|
|
194
|
+
/** `ERROR` blocks the workflow. `WARNING` does not. */
|
|
195
|
+
level: ValidationLevel;
|
|
196
|
+
/**
|
|
197
|
+
* Stable identifier for this validation. Handles are namespaced per
|
|
198
|
+
* extension and may repeat across targets: the same handle on two line
|
|
199
|
+
* items is two validations.
|
|
200
|
+
*/
|
|
201
|
+
handle: string;
|
|
202
|
+
/**
|
|
203
|
+
* Locates the data the validation applies to; the host decides where it
|
|
204
|
+
* renders. Omitted or unrecognized targets fall back to the event's root
|
|
205
|
+
* scope (`$.cart` / `$.payment`) — the validation still applies, rendered
|
|
206
|
+
* less specifically.
|
|
207
|
+
*
|
|
208
|
+
* Line item uuids are only valid within the event that delivered them:
|
|
209
|
+
* use `lineItems[n].uuid` from this event's cart snapshot, don't cache
|
|
210
|
+
* uuids across events. Bundle components are not addressable; target
|
|
211
|
+
* their parent line.
|
|
212
|
+
*/
|
|
213
|
+
target?: TTarget;
|
|
32
214
|
}
|
|
33
|
-
export type { TransactionCompleteEvent, CashTrackingSessionStartEvent, CashTrackingSessionCompleteEvent, };
|
|
215
|
+
export type { TransactionCompleteEvent, CashTrackingSessionStartEvent, CashTrackingSessionCompleteEvent, ScanEvent, };
|
|
34
216
|
//# sourceMappingURL=events.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/point-of-sale/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,qCAAqC,CAAC;AAClF,OAAO,KAAK,EACV,6BAA6B,EAC7B,gCAAgC,EACjC,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/point-of-sale/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,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AEnD,UAAU,EAAE,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;CAClC;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS,CACxB,OAAO,SAAS,gBAAgB,GAAG,gBAAgB;IAEnD,aAAa,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;CACxC;AAED,eAAe;AACf,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,OAAO,CAAC;AAElD;;;;GAIG;AACH,MAAM,WAAW,aAAa,CAC5B,OAAO,SAAS,gBAAgB,GAAG,gBAAgB;IAEnD,uDAAuD;IACvD,KAAK,EAAE,eAAe,CAAC;IAEvB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,YAAY,EACV,wBAAwB,EACxB,6BAA6B,EAC7B,gCAAgC,EAChC,SAAS,GACV,CAAC"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { RenderExtension, RunnableExtension } from '../../extension';
|
|
2
2
|
import type { DataTargetApi } from './api/data-target-api/data-target-api';
|
|
3
|
-
import type { StandardApi, ActionApi, ActionTargetApi, CartApi, CartLineItemApi, CustomerApi, DraftOrderApi, ProductApi, OrderApi, StorageApi, CashDrawerApi } from './api';
|
|
3
|
+
import type { StandardApi, ActionApi, ActionTargetApi, CartApi, CartLineItemApi, CustomerApi, DraftOrderApi, ProductApi, OrderApi, StorageApi, CashDrawerApi, ReadonlyCartApi, ScannerApi, ResolutionApi } from './api';
|
|
4
|
+
import type { CartValidationsEventData, PaymentValidationsEventData } from './events';
|
|
4
5
|
import type { ActionExtensionComponents } from './components/targets/ActionExtensionComponents';
|
|
5
6
|
import type { BlockExtensionComponents } from './components/targets/BlockExtensionComponents';
|
|
6
7
|
import type { SmartGridComponents } from './components/targets/SmartGridComponents';
|
|
7
8
|
import type { ReceiptComponents } from './components/targets/ReceiptComponents';
|
|
8
9
|
import type { BasicComponents } from './components/targets/BasicComponents';
|
|
10
|
+
import type { ResolutionComponents } from './components/targets/ResolutionComponents';
|
|
9
11
|
import type { TransactionCompleteWithReprintData } from './event/data';
|
|
10
12
|
/**
|
|
11
13
|
* @publicDocs
|
|
@@ -181,9 +183,9 @@ export interface RenderExtensionTargets {
|
|
|
181
183
|
/**
|
|
182
184
|
* Renders a full-screen modal interface launched from cart line item menu items. Use this target for complex line item workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.
|
|
183
185
|
*
|
|
184
|
-
* Extensions at this target have access to detailed line item data through the Cart Line Item API and support workflows with multiple screens, navigation, and interactive components.
|
|
186
|
+
* Extensions at this target have access to detailed line item data through the Cart Line Item API and support workflows with multiple screens, navigation, and interactive components. Action render targets are themselves the modal destination, so the Action API (`shopify.action.presentModal()`) is not available here; use the Navigation API for in-workflow navigation.
|
|
185
187
|
*/
|
|
186
|
-
'pos.cart.line-item-details.action.render': RenderExtension<ActionTargetApi<'pos.cart.line-item-details.action.render'> &
|
|
188
|
+
'pos.cart.line-item-details.action.render': RenderExtension<ActionTargetApi<'pos.cart.line-item-details.action.render'> & CartApi & CartLineItemApi, BasicComponents>;
|
|
187
189
|
/**
|
|
188
190
|
* Renders a custom section in the footer of printed receipts. Use this target for adding contact details, return policies, social media links, or customer engagement elements like survey links or marketing campaigns at the bottom of receipts.
|
|
189
191
|
*
|
|
@@ -222,6 +224,18 @@ export interface RenderExtensionTargets {
|
|
|
222
224
|
* Extensions at this target appear as persistent blocks within the register details interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex register operations.
|
|
223
225
|
*/
|
|
224
226
|
'pos.register-details.block.render': RenderExtension<StandardApi<'pos.register-details.block.render'> & ActionApi & CashDrawerApi, BlockExtensionComponents>;
|
|
227
|
+
/**
|
|
228
|
+
* Renders the remediation interface when a `cartvalidations` interceptor returns a validation. Use this target to resolve all of the app's findings for the event.
|
|
229
|
+
*
|
|
230
|
+
* @private
|
|
231
|
+
*/
|
|
232
|
+
'pos.cart.validations.resolution.render': RenderExtension<StandardApi<'pos.cart.validations.resolution.render'> & ScannerApi & CartApi & ResolutionApi<CartValidationsEventData>, ResolutionComponents>;
|
|
233
|
+
/**
|
|
234
|
+
* Renders the remediation interface when a `paymentvalidations` interceptor returns a validation. Use this target to resolve all of the app's findings for the event.
|
|
235
|
+
*
|
|
236
|
+
* @private
|
|
237
|
+
*/
|
|
238
|
+
'pos.payment.validations.resolution.render': RenderExtension<StandardApi<'pos.payment.validations.resolution.render'> & ScannerApi & ReadonlyCartApi & ResolutionApi<PaymentValidationsEventData>, ResolutionComponents>;
|
|
225
239
|
}
|
|
226
240
|
/**
|
|
227
241
|
* @publicDocs
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension-targets.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/point-of-sale/extension-targets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,eAAe,EAAE,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AAExE,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,uCAAuC,CAAC;AAEzE,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACT,eAAe,EACf,OAAO,EACP,eAAe,EACf,WAAW,EACX,aAAa,EACb,UAAU,EACV,QAAQ,EACR,UAAU,EACV,aAAa,EACd,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,gDAAgD,CAAC;AAC9F,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,+CAA+C,CAAC;AAC5F,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAClF,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,wCAAwC,CAAC;AAC9E,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,sCAAsC,CAAC;AAC1E,OAAO,KAAK,EAAC,kCAAkC,EAAC,MAAM,cAAc,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;OAI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T,eAAe,CAChB,CAAC;IACF;;;;OAIG;IACH,sCAAsC,EAAE,eAAe,CACrD,WAAW,CAAC,sCAAsC,CAAC,GACjD,SAAS,GACT,OAAO,GACP,aAAa,EACf,wBAAwB,CACzB,CAAC;IACF;;;;OAIG;IACH,8CAA8C,EAAE,eAAe,CAC7D,WAAW,CAAC,8CAA8C,CAAC,GACzD,SAAS,GACT,OAAO,GACP,WAAW,EACb,yBAAyB,CAC1B,CAAC;IACF;;;;OAIG;IACH,oCAAoC,EAAE,eAAe,CACnD,eAAe,CAAC,oCAAoC,CAAC,GACnD,OAAO,GACP,WAAW,EACb,eAAe,CAChB,CAAC;IACF;;;;OAIG;IACH,mCAAmC,EAAE,eAAe,CAClD,WAAW,CAAC,mCAAmC,CAAC,GAC9C,OAAO,GACP,WAAW,GACX,SAAS,EACX,wBAAwB,CACzB,CAAC;IACF;;;;OAIG;IACH,oDAAoD,EAAE,eAAe,CACnE,WAAW,CAAC,oDAAoD,CAAC,GAC/D,SAAS,GACT,OAAO,GACP,eAAe,EACjB,yBAAyB,CAC1B,CAAC;IACF;;;;OAIG;IACH,0CAA0C,EAAE,eAAe,CACzD,eAAe,CAAC,0CAA0C,CAAC,GACzD,
|
|
1
|
+
{"version":3,"file":"extension-targets.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/point-of-sale/extension-targets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,eAAe,EAAE,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AAExE,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,uCAAuC,CAAC;AAEzE,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACT,eAAe,EACf,OAAO,EACP,eAAe,EACf,WAAW,EACX,aAAa,EACb,UAAU,EACV,QAAQ,EACR,UAAU,EACV,aAAa,EACb,eAAe,EACf,UAAU,EACV,aAAa,EACd,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EACV,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,UA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AM,MAAM,eAAe,GAAG,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Navigation } from './api/navigation-api/navigation-api';
|
|
2
|
-
import type { ShopifyEventMap } from './events';
|
|
2
|
+
import type { ShopifyEventMap, ShopifyInterceptMap, ShopifyInterceptor } from './events';
|
|
3
3
|
/**
|
|
4
4
|
* The `shopify` global provides APIs that are available to all POS extensions
|
|
5
5
|
* without needing to access them through the target's `api` argument.
|
|
@@ -28,6 +28,13 @@ export interface BackgroundShopifyGlobal extends ShopifyGlobal {
|
|
|
28
28
|
* `listener` reference must match the one used to register.
|
|
29
29
|
*/
|
|
30
30
|
removeEventListener<K extends keyof ShopifyEventMap>(type: K, listener: (event: ShopifyEventMap[K]) => void): void;
|
|
31
|
+
/**
|
|
32
|
+
* Register an interceptor for a POS host workflow that can be blocked.
|
|
33
|
+
* Returns a function that unregisters the interceptor.
|
|
34
|
+
*
|
|
35
|
+
* @private
|
|
36
|
+
*/
|
|
37
|
+
intercept<K extends keyof ShopifyInterceptMap>(type: K, interceptor: ShopifyInterceptor<K>): () => void;
|
|
31
38
|
}
|
|
32
39
|
declare global {
|
|
33
40
|
const navigation: Navigation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/point-of-sale/globals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,qCAAqC,CAAC;AACpE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/point-of-sale/globals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,qCAAqC,CAAC;AACpE,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAElB;;;;;GAKG;AACH,MAAM,WAAW,aAAa;CAAG;AAEjC;;;;;;;GAOG;AACH,MAAM,WAAW,uBAAwB,SAAQ,aAAa;IAC5D;;;;OAIG;IACH,gBAAgB,CAAC,CAAC,SAAS,MAAM,eAAe,EAC9C,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,IAAI,GAC5C,IAAI,CAAC;IAER;;;OAGG;IACH,mBAAmB,CAAC,CAAC,SAAS,MAAM,eAAe,EACjD,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,IAAI,GAC5C,IAAI,CAAC;IAER;;;;;OAKG;IACH,SAAS,CAAC,CAAC,SAAS,MAAM,mBAAmB,EAC3C,IAAI,EAAE,CAAC,EACP,WAAW,EAAE,kBAAkB,CAAC,CAAC,CAAC,GACjC,MAAM,IAAI,CAAC;CACf;AAED,OAAO,CAAC,MAAM,CAAC;IAEb,MAAM,UAAU,EAAE,UAAU,CAAC;IAO7B,MAAM,OAAO,EAAE,aAAa,CAAC;CAC9B"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import "../components/Badge.d.ts";
|
|
2
|
+
import "../components/Banner.d.ts";
|
|
3
|
+
import "../components/Box.d.ts";
|
|
4
|
+
import "../components/Button.d.ts";
|
|
5
|
+
import "../components/Choice.d.ts";
|
|
6
|
+
import "../components/ChoiceList.d.ts";
|
|
7
|
+
import "../components/Clickable.d.ts";
|
|
8
|
+
import "../components/DateField.d.ts";
|
|
9
|
+
import "../components/DatePicker.d.ts";
|
|
10
|
+
import "../components/DateSpinner.d.ts";
|
|
11
|
+
import "../components/Divider.d.ts";
|
|
12
|
+
import "../components/EmailField.d.ts";
|
|
13
|
+
import "../components/Embed.d.ts";
|
|
14
|
+
import "../components/EmptyState.d.ts";
|
|
15
|
+
import "../components/Heading.d.ts";
|
|
16
|
+
import "../components/Icon.d.ts";
|
|
17
|
+
import "../components/Image.d.ts";
|
|
18
|
+
import "../components/Link.d.ts";
|
|
19
|
+
import "../components/Modal.d.ts";
|
|
20
|
+
import "../components/NumberField.d.ts";
|
|
21
|
+
import "../components/ScrollBox.d.ts";
|
|
22
|
+
import "../components/SearchField.d.ts";
|
|
23
|
+
import "../components/Section.d.ts";
|
|
24
|
+
import "../components/Spinner.d.ts";
|
|
25
|
+
import "../components/Stack.d.ts";
|
|
26
|
+
import "../components/Switch.d.ts";
|
|
27
|
+
import "../components/Tab.d.ts";
|
|
28
|
+
import "../components/TabList.d.ts";
|
|
29
|
+
import "../components/TabPanel.d.ts";
|
|
30
|
+
import "../components/Tabs.d.ts";
|
|
31
|
+
import "../components/Text.d.ts";
|
|
32
|
+
import "../components/TextArea.d.ts";
|
|
33
|
+
import "../components/TextField.d.ts";
|
|
34
|
+
import "../components/TimeField.d.ts";
|
|
35
|
+
import "../components/TimePicker.d.ts";
|
|
36
|
+
import type { ExtensionTargets } from '../extension-targets';
|
|
37
|
+
import '../globals';
|
|
38
|
+
|
|
39
|
+
export type * from '../events';
|
|
40
|
+
|
|
41
|
+
type Target = ExtensionTargets['pos.cart.validations.resolution.render'];
|
|
42
|
+
export type Api = Target['api'];
|
|
43
|
+
export type Output = Target['output'];
|
|
44
|
+
|
package/build/ts/surfaces/point-of-sale/targets/pos.payment.validations.resolution.render.d.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import "../components/Badge.d.ts";
|
|
2
|
+
import "../components/Banner.d.ts";
|
|
3
|
+
import "../components/Box.d.ts";
|
|
4
|
+
import "../components/Button.d.ts";
|
|
5
|
+
import "../components/Choice.d.ts";
|
|
6
|
+
import "../components/ChoiceList.d.ts";
|
|
7
|
+
import "../components/Clickable.d.ts";
|
|
8
|
+
import "../components/DateField.d.ts";
|
|
9
|
+
import "../components/DatePicker.d.ts";
|
|
10
|
+
import "../components/DateSpinner.d.ts";
|
|
11
|
+
import "../components/Divider.d.ts";
|
|
12
|
+
import "../components/EmailField.d.ts";
|
|
13
|
+
import "../components/Embed.d.ts";
|
|
14
|
+
import "../components/EmptyState.d.ts";
|
|
15
|
+
import "../components/Heading.d.ts";
|
|
16
|
+
import "../components/Icon.d.ts";
|
|
17
|
+
import "../components/Image.d.ts";
|
|
18
|
+
import "../components/Link.d.ts";
|
|
19
|
+
import "../components/Modal.d.ts";
|
|
20
|
+
import "../components/NumberField.d.ts";
|
|
21
|
+
import "../components/ScrollBox.d.ts";
|
|
22
|
+
import "../components/SearchField.d.ts";
|
|
23
|
+
import "../components/Section.d.ts";
|
|
24
|
+
import "../components/Spinner.d.ts";
|
|
25
|
+
import "../components/Stack.d.ts";
|
|
26
|
+
import "../components/Switch.d.ts";
|
|
27
|
+
import "../components/Tab.d.ts";
|
|
28
|
+
import "../components/TabList.d.ts";
|
|
29
|
+
import "../components/TabPanel.d.ts";
|
|
30
|
+
import "../components/Tabs.d.ts";
|
|
31
|
+
import "../components/Text.d.ts";
|
|
32
|
+
import "../components/TextArea.d.ts";
|
|
33
|
+
import "../components/TextField.d.ts";
|
|
34
|
+
import "../components/TimeField.d.ts";
|
|
35
|
+
import "../components/TimePicker.d.ts";
|
|
36
|
+
import type { ExtensionTargets } from '../extension-targets';
|
|
37
|
+
import '../globals';
|
|
38
|
+
|
|
39
|
+
export type * from '../events';
|
|
40
|
+
|
|
41
|
+
type Target = ExtensionTargets['pos.payment.validations.resolution.render'];
|
|
42
|
+
export type Api = Target['api'];
|
|
43
|
+
export type Output = Target['output'];
|
|
44
|
+
|
|
@@ -22,6 +22,10 @@ export interface Cart {
|
|
|
22
22
|
* The final total amount including all items, taxes, and discounts, formatted as a currency string.
|
|
23
23
|
*/
|
|
24
24
|
grandTotal: string;
|
|
25
|
+
/**
|
|
26
|
+
* The ISO 4217 currency code for this cart.
|
|
27
|
+
*/
|
|
28
|
+
currency: string;
|
|
25
29
|
/**
|
|
26
30
|
* The cart note to set during bulk update. Replaces existing note or sets new note if none exists. Set to `undefined` to remove current note.
|
|
27
31
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
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YAAY,GAAG,aAAa,CAAC;IACnC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B"}
|
|
1
|
+
{"version":3,"file":"cart.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/point-of-sale/types/cart.ts"],"names":[],"mappings":"AAA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declare class StorageError extends Error {
|
|
|
11
12
|
* @publicDocs
|
|
12
13
|
*/
|
|
13
14
|
export interface Storage<BaseStorageTypes extends Record<string, any> = Record<string, unknown>> {
|
|
15
|
+
/**
|
|
16
|
+
* Reactive access to storage values as Subscribables.
|
|
17
|
+
*
|
|
18
|
+
* Each key is exposed as a `ReadonlySignalLike<T | undefined>`, enabling cross-target
|
|
19
|
+
* reactivity. One extension target can subscribe to a key and react when
|
|
20
|
+
* another target updates it via `set()` or `delete()`.
|
|
21
|
+
*
|
|
22
|
+
* The `value` property provides synchronous, reactive access to the current stored
|
|
23
|
+
* value. It is not preloaded: storage hydrates asynchronously, so `value` is
|
|
24
|
+
* `undefined` until the key has been loaded.
|
|
25
|
+
* The `subscribe()` method registers a callback that fires whenever the value
|
|
26
|
+
* changes, including changes made by other extension targets within the same app.
|
|
27
|
+
*
|
|
28
|
+
* @example Cross-target reactivity
|
|
29
|
+
* ```typescript
|
|
30
|
+
* // In one extension target:
|
|
31
|
+
* await shopify.storage.set('syncStatus', 'complete');
|
|
32
|
+
*
|
|
33
|
+
* // In another target:
|
|
34
|
+
* const status = shopify.storage.current.syncStatus.value; // 'complete'
|
|
35
|
+
* const unsubscribe = shopify.storage.current.syncStatus.subscribe((value) => {
|
|
36
|
+
* // Reacts when another target updates this key
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
current: SubscribableStorage<BaseStorageTypes>;
|
|
14
41
|
/**
|
|
15
42
|
* Stores a value under the specified key, overwriting any existing value. Values must be JSON-serializable and return `StorageError` when storage limits are exceeded. Commonly used for storing user preferences, caching API responses, or passing contextual data from tiles to modals.
|
|
16
43
|
*
|
|
@@ -48,4 +75,17 @@ export interface Storage<BaseStorageTypes extends Record<string, any> = Record<s
|
|
|
48
75
|
*/
|
|
49
76
|
entries<StorageTypes extends BaseStorageTypes = BaseStorageTypes, Keys extends keyof StorageTypes = keyof StorageTypes>(): Promise<[Keys, StorageTypes[Keys]][]>;
|
|
50
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Provides reactive, subscribable access to individual storage keys.
|
|
80
|
+
*
|
|
81
|
+
* Each property is a `ReadonlySignalLike` that reflects the current value of the
|
|
82
|
+
* corresponding storage key. Values are `undefined` when the key does not exist
|
|
83
|
+
* or is being loaded asynchronously.
|
|
84
|
+
*
|
|
85
|
+
* Mutations are performed through the existing `Storage` methods (`set`,
|
|
86
|
+
* `delete`, `clear`, etc.) — `SubscribableStorage` is read-only and reactive.
|
|
87
|
+
*/
|
|
88
|
+
export type SubscribableStorage<BaseStorageTypes extends Record<string, any> = Record<string, unknown>> = {
|
|
89
|
+
readonly [K in keyof BaseStorageTypes]: ReadonlySignalLike<BaseStorageTypes[K] | undefined>;
|
|
90
|
+
};
|
|
51
91
|
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/point-of-sale/types/storage.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,YAAa,SAAQ,KAAK;IAG5B,IAAI,EAAE,cAAc,GAAG,YAAY,GAAG,SAAS,GAAG,SAAS;IAF7D,IAAI,SAAkB;gBAEpB,IAAI,EAAE,cAAc,GAAG,YAAY,GAAG,SAAS,GAAG,SAAS,EAClE,OAAO,EAAE,MAAM;CAIlB;AACD;;;GAGG;AACH,MAAM,WAAW,OAAO,CACtB,gBAAgB,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAEtE;;;;;;;;;;OAUG;IACH,GAAG,CACD,YAAY,SAAS,gBAAgB,GAAG,gBAAgB,EACxD,IAAI,SAAS,MAAM,YAAY,GAAG,MAAM,YAAY,EAEpD,GAAG,EAAE,IAAI,EACT,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,GACxB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;;;OAMG;IAC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