@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,3 +1,5 @@
|
|
|
1
|
+
import type {ReadonlySignalLike} from '../../../shared';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* @publicDocs
|
|
3
5
|
*/
|
|
@@ -17,6 +19,33 @@ export class StorageError extends Error {
|
|
|
17
19
|
export interface Storage<
|
|
18
20
|
BaseStorageTypes extends Record<string, any> = Record<string, unknown>,
|
|
19
21
|
> {
|
|
22
|
+
/**
|
|
23
|
+
* Reactive access to storage values as Subscribables.
|
|
24
|
+
*
|
|
25
|
+
* Each key is exposed as a `ReadonlySignalLike<T | undefined>`, enabling cross-target
|
|
26
|
+
* reactivity. One extension target can subscribe to a key and react when
|
|
27
|
+
* another target updates it via `set()` or `delete()`.
|
|
28
|
+
*
|
|
29
|
+
* The `value` property provides synchronous, reactive access to the current stored
|
|
30
|
+
* value. It is not preloaded: storage hydrates asynchronously, so `value` is
|
|
31
|
+
* `undefined` until the key has been loaded.
|
|
32
|
+
* The `subscribe()` method registers a callback that fires whenever the value
|
|
33
|
+
* changes, including changes made by other extension targets within the same app.
|
|
34
|
+
*
|
|
35
|
+
* @example Cross-target reactivity
|
|
36
|
+
* ```typescript
|
|
37
|
+
* // In one extension target:
|
|
38
|
+
* await shopify.storage.set('syncStatus', 'complete');
|
|
39
|
+
*
|
|
40
|
+
* // In another target:
|
|
41
|
+
* const status = shopify.storage.current.syncStatus.value; // 'complete'
|
|
42
|
+
* const unsubscribe = shopify.storage.current.syncStatus.subscribe((value) => {
|
|
43
|
+
* // Reacts when another target updates this key
|
|
44
|
+
* });
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
current: SubscribableStorage<BaseStorageTypes>;
|
|
48
|
+
|
|
20
49
|
/**
|
|
21
50
|
* 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.
|
|
22
51
|
*
|
|
@@ -77,3 +106,21 @@ export interface Storage<
|
|
|
77
106
|
Keys extends keyof StorageTypes = keyof StorageTypes,
|
|
78
107
|
>(): Promise<[Keys, StorageTypes[Keys]][]>;
|
|
79
108
|
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Provides reactive, subscribable access to individual storage keys.
|
|
112
|
+
*
|
|
113
|
+
* Each property is a `ReadonlySignalLike` that reflects the current value of the
|
|
114
|
+
* corresponding storage key. Values are `undefined` when the key does not exist
|
|
115
|
+
* or is being loaded asynchronously.
|
|
116
|
+
*
|
|
117
|
+
* Mutations are performed through the existing `Storage` methods (`set`,
|
|
118
|
+
* `delete`, `clear`, etc.) — `SubscribableStorage` is read-only and reactive.
|
|
119
|
+
*/
|
|
120
|
+
export type SubscribableStorage<
|
|
121
|
+
BaseStorageTypes extends Record<string, any> = Record<string, unknown>,
|
|
122
|
+
> = {
|
|
123
|
+
readonly [K in keyof BaseStorageTypes]: ReadonlySignalLike<
|
|
124
|
+
BaseStorageTypes[K] | undefined
|
|
125
|
+
>;
|
|
126
|
+
};
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
/** VERSION: 0.0.0 **/
|
|
2
|
-
/* eslint-disable import-x/extensions */
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-namespace */
|
|
4
|
-
/* eslint-disable @typescript-eslint/member-ordering */
|
|
5
|
-
/* eslint-disable line-comment-position */
|
|
6
|
-
/* eslint-disable @typescript-eslint/unified-signatures */
|
|
7
|
-
/* eslint-disable no-var */
|
|
8
|
-
/* eslint-disable import-x/namespace */
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
|
|
10
|
-
/// <reference lib="DOM" />
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* The base properties for elements that don't have children, providing essential attributes like keys and refs for component management.
|
|
14
|
-
*/
|
|
15
|
-
export interface BaseElementProps<TClass = HTMLElement> {
|
|
16
|
-
/**
|
|
17
|
-
* A unique identifier for this element within its parent. Used by the rendering engine for efficient reconciliation when lists change.
|
|
18
|
-
*/
|
|
19
|
-
key?: preact.Key;
|
|
20
|
-
/**
|
|
21
|
-
* A reference to the underlying DOM element, typically created using `useRef()`. This allows you to access and manipulate the DOM element directly in your component logic.
|
|
22
|
-
*/
|
|
23
|
-
ref?: preact.Ref<TClass>;
|
|
24
|
-
/**
|
|
25
|
-
* Assigns this element to a named slot in a parent component that uses slot-based composition patterns.
|
|
26
|
-
*/
|
|
27
|
-
slot?: Lowercase<string>;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* An event type that narrows the `currentTarget` to the specific HTML element associated with the custom element tag. This provides type-safe event handling in callback listeners.
|
|
31
|
-
*/
|
|
32
|
-
export type CallbackEvent<TTagName extends keyof HTMLElementTagNameMap, TEvent extends Event = Event> = TEvent & {
|
|
33
|
-
currentTarget: HTMLElementTagNameMap[TTagName];
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* A typed event listener for custom element events. The listener receives a `CallbackEvent` with the correct `currentTarget` type for the associated custom element tag.
|
|
37
|
-
*/
|
|
38
|
-
export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap, TData = object> = (EventListener & {
|
|
39
|
-
(event: CallbackEvent<TTagName, Event> & TData): void;
|
|
40
|
-
}) | null;
|
|
41
|
-
|
|
42
|
-
declare const tagName = "s-login-with-shop";
|
|
43
|
-
/** @private */
|
|
44
|
-
export interface LoginWithShopStatusChangeEvent {
|
|
45
|
-
/**
|
|
46
|
-
* The buyer's Shop Pay state in this checkout.
|
|
47
|
-
*
|
|
48
|
-
* - `shop_pay`: The buyer is signed in to Shop Pay.
|
|
49
|
-
* - `shop_pay_guest`: The buyer is in Shop Pay but isn't signed in.
|
|
50
|
-
* - `guest`: The buyer isn't using Shop Pay, so the modal can be shown.
|
|
51
|
-
* - `shop_pay_skipped`: The Shop Pay modal is suppressed for this checkout and isn't shown.
|
|
52
|
-
*/
|
|
53
|
-
status?: 'shop_pay' | 'guest' | 'shop_pay_skipped' | 'shop_pay_guest';
|
|
54
|
-
}
|
|
55
|
-
/** @private */
|
|
56
|
-
export interface LoginWithShopElementProps {
|
|
57
|
-
/**
|
|
58
|
-
* Whether the modal is visible to the buyer.
|
|
59
|
-
*
|
|
60
|
-
* The modal doesn't hide itself when the buyer dismisses it. Update this to `false` when the `closed` event fires to keep it in sync.
|
|
61
|
-
*
|
|
62
|
-
* @default false
|
|
63
|
-
*/
|
|
64
|
-
open?: boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Whether to send the buyer to Shop Pay immediately, without showing the modal.
|
|
67
|
-
*
|
|
68
|
-
* @default false
|
|
69
|
-
*/
|
|
70
|
-
doRedirect?: boolean;
|
|
71
|
-
/**
|
|
72
|
-
* The heading shown at the top of the modal.
|
|
73
|
-
*
|
|
74
|
-
* This is also the modal's accessible name and the alternative text for `modalLogoSrc`.
|
|
75
|
-
*
|
|
76
|
-
* @default ''
|
|
77
|
-
*/
|
|
78
|
-
modalTitle?: string;
|
|
79
|
-
/**
|
|
80
|
-
* The text shown below the heading, explaining what the buyer gets by continuing to Shop Pay.
|
|
81
|
-
*
|
|
82
|
-
* @default ''
|
|
83
|
-
*/
|
|
84
|
-
modalDescription?: string;
|
|
85
|
-
/**
|
|
86
|
-
* The URL of the image shown above the heading. The image is scaled to a maximum height of 64px.
|
|
87
|
-
*
|
|
88
|
-
* @default ''
|
|
89
|
-
*/
|
|
90
|
-
modalLogoSrc?: string;
|
|
91
|
-
/**
|
|
92
|
-
* The label of the primary button that continues to Shop Pay.
|
|
93
|
-
*
|
|
94
|
-
* @default 'Continue'
|
|
95
|
-
*/
|
|
96
|
-
modalContinueText?: string;
|
|
97
|
-
/**
|
|
98
|
-
* The label of the secondary button that dismisses the modal.
|
|
99
|
-
*
|
|
100
|
-
* @default ''
|
|
101
|
-
*/
|
|
102
|
-
modalCancelText?: string;
|
|
103
|
-
}
|
|
104
|
-
/** @private */
|
|
105
|
-
export interface LoginWithShopEvents {
|
|
106
|
-
/**
|
|
107
|
-
* A callback that's fired when the buyer presses the continue button.
|
|
108
|
-
*
|
|
109
|
-
* Return a promise to do work before the buyer leaves. Checkout keeps the button in its loading state and waits for the promise to settle before redirecting to Shop Pay.
|
|
110
|
-
*/
|
|
111
|
-
onComplete?(event: CallbackEvent<typeof tagName>): void | Promise<void>;
|
|
112
|
-
/**
|
|
113
|
-
* A callback that's fired when the buyer dismisses the modal, either with the cancel button or by closing it.
|
|
114
|
-
*/
|
|
115
|
-
onClosed?(event: CallbackEvent<typeof tagName>): void;
|
|
116
|
-
/**
|
|
117
|
-
* A callback that's fired when the buyer's Shop Pay state in checkout is determined or changes.
|
|
118
|
-
*
|
|
119
|
-
* Read `event.status` for the new state.
|
|
120
|
-
*/
|
|
121
|
-
onStatusChange?(event: CallbackEvent<typeof tagName> & LoginWithShopStatusChangeEvent): void;
|
|
122
|
-
}
|
|
123
|
-
/** @private */
|
|
124
|
-
export interface LoginWithShopElementEvents {
|
|
125
|
-
/**
|
|
126
|
-
* A callback that's fired when the buyer presses the continue button.
|
|
127
|
-
*
|
|
128
|
-
* Checkout redirects to Shop Pay once this event has been handled.
|
|
129
|
-
*/
|
|
130
|
-
complete?: CallbackEventListener<typeof tagName>;
|
|
131
|
-
/**
|
|
132
|
-
* A callback that's fired when the buyer dismisses the modal, either with the cancel button or by closing it.
|
|
133
|
-
*/
|
|
134
|
-
closed?: CallbackEventListener<typeof tagName>;
|
|
135
|
-
/**
|
|
136
|
-
* A callback that's fired when the buyer's Shop Pay state in checkout is determined or changes.
|
|
137
|
-
*
|
|
138
|
-
* Read `event.status` for the new state.
|
|
139
|
-
*/
|
|
140
|
-
statuschange?: CallbackEventListener<typeof tagName, LoginWithShopStatusChangeEvent>;
|
|
141
|
-
}
|
|
142
|
-
/** @private */
|
|
143
|
-
export interface LoginWithShopElement extends LoginWithShopElementProps, HTMLElement {
|
|
144
|
-
oncomplete: LoginWithShopElementEvents['complete'];
|
|
145
|
-
onclosed: LoginWithShopElementEvents['closed'];
|
|
146
|
-
onstatuschange: LoginWithShopElementEvents['statuschange'];
|
|
147
|
-
}
|
|
148
|
-
/** @private */
|
|
149
|
-
export interface LoginWithShopProps extends LoginWithShopElementProps, LoginWithShopEvents {
|
|
150
|
-
}
|
|
151
|
-
declare global {
|
|
152
|
-
interface HTMLElementTagNameMap {
|
|
153
|
-
[tagName]: LoginWithShopElement;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
declare module 'preact' {
|
|
157
|
-
namespace createElement.JSX {
|
|
158
|
-
interface IntrinsicElements {
|
|
159
|
-
[tagName]: LoginWithShopProps & BaseElementProps<LoginWithShopElement>;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export type { LoginWithShopElement, LoginWithShopElementEvents, LoginWithShopElementProps, LoginWithShopEvents, LoginWithShopProps, LoginWithShopStatusChangeEvent };
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
/** VERSION: 0.0.0 **/
|
|
2
|
-
/* eslint-disable import-x/extensions */
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-namespace */
|
|
4
|
-
/* eslint-disable @typescript-eslint/member-ordering */
|
|
5
|
-
/* eslint-disable line-comment-position */
|
|
6
|
-
/* eslint-disable @typescript-eslint/unified-signatures */
|
|
7
|
-
/* eslint-disable no-var */
|
|
8
|
-
/* eslint-disable import-x/namespace */
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
|
|
10
|
-
/// <reference lib="DOM" />
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* The base properties for elements that don't have children, providing essential attributes like keys and refs for component management.
|
|
14
|
-
*/
|
|
15
|
-
export interface BaseElementProps<TClass = HTMLElement> {
|
|
16
|
-
/**
|
|
17
|
-
* A unique identifier for this element within its parent. Used by the rendering engine for efficient reconciliation when lists change.
|
|
18
|
-
*/
|
|
19
|
-
key?: preact.Key;
|
|
20
|
-
/**
|
|
21
|
-
* A reference to the underlying DOM element, typically created using `useRef()`. This allows you to access and manipulate the DOM element directly in your component logic.
|
|
22
|
-
*/
|
|
23
|
-
ref?: preact.Ref<TClass>;
|
|
24
|
-
/**
|
|
25
|
-
* Assigns this element to a named slot in a parent component that uses slot-based composition patterns.
|
|
26
|
-
*/
|
|
27
|
-
slot?: Lowercase<string>;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* An event type that narrows the `currentTarget` to the specific HTML element associated with the custom element tag. This provides type-safe event handling in callback listeners.
|
|
31
|
-
*/
|
|
32
|
-
export type CallbackEvent<TTagName extends keyof HTMLElementTagNameMap, TEvent extends Event = Event> = TEvent & {
|
|
33
|
-
currentTarget: HTMLElementTagNameMap[TTagName];
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* A typed event listener for custom element events. The listener receives a `CallbackEvent` with the correct `currentTarget` type for the associated custom element tag.
|
|
37
|
-
*/
|
|
38
|
-
export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap, TData = object> = (EventListener & {
|
|
39
|
-
(event: CallbackEvent<TTagName, Event> & TData): void;
|
|
40
|
-
}) | null;
|
|
41
|
-
|
|
42
|
-
declare const tagName = "s-login-with-shop";
|
|
43
|
-
/** @private */
|
|
44
|
-
export interface LoginWithShopStatusChangeEvent {
|
|
45
|
-
/**
|
|
46
|
-
* The buyer's Shop Pay state in this checkout.
|
|
47
|
-
*
|
|
48
|
-
* - `shop_pay`: The buyer is signed in to Shop Pay.
|
|
49
|
-
* - `shop_pay_guest`: The buyer is in Shop Pay but isn't signed in.
|
|
50
|
-
* - `guest`: The buyer isn't using Shop Pay, so the modal can be shown.
|
|
51
|
-
* - `shop_pay_skipped`: The Shop Pay modal is suppressed for this checkout and isn't shown.
|
|
52
|
-
*/
|
|
53
|
-
status?: 'shop_pay' | 'guest' | 'shop_pay_skipped' | 'shop_pay_guest';
|
|
54
|
-
}
|
|
55
|
-
/** @private */
|
|
56
|
-
export interface LoginWithShopElementProps {
|
|
57
|
-
/**
|
|
58
|
-
* Whether the modal is visible to the buyer.
|
|
59
|
-
*
|
|
60
|
-
* The modal doesn't hide itself when the buyer dismisses it. Update this to `false` when the `closed` event fires to keep it in sync.
|
|
61
|
-
*
|
|
62
|
-
* @default false
|
|
63
|
-
*/
|
|
64
|
-
open?: boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Whether to send the buyer to Shop Pay immediately, without showing the modal.
|
|
67
|
-
*
|
|
68
|
-
* @default false
|
|
69
|
-
*/
|
|
70
|
-
doRedirect?: boolean;
|
|
71
|
-
/**
|
|
72
|
-
* The heading shown at the top of the modal.
|
|
73
|
-
*
|
|
74
|
-
* This is also the modal's accessible name and the alternative text for `modalLogoSrc`.
|
|
75
|
-
*
|
|
76
|
-
* @default ''
|
|
77
|
-
*/
|
|
78
|
-
modalTitle?: string;
|
|
79
|
-
/**
|
|
80
|
-
* The text shown below the heading, explaining what the buyer gets by continuing to Shop Pay.
|
|
81
|
-
*
|
|
82
|
-
* @default ''
|
|
83
|
-
*/
|
|
84
|
-
modalDescription?: string;
|
|
85
|
-
/**
|
|
86
|
-
* The URL of the image shown above the heading. The image is scaled to a maximum height of 64px.
|
|
87
|
-
*
|
|
88
|
-
* @default ''
|
|
89
|
-
*/
|
|
90
|
-
modalLogoSrc?: string;
|
|
91
|
-
/**
|
|
92
|
-
* The label of the primary button that continues to Shop Pay.
|
|
93
|
-
*
|
|
94
|
-
* @default 'Continue'
|
|
95
|
-
*/
|
|
96
|
-
modalContinueText?: string;
|
|
97
|
-
/**
|
|
98
|
-
* The label of the secondary button that dismisses the modal.
|
|
99
|
-
*
|
|
100
|
-
* @default ''
|
|
101
|
-
*/
|
|
102
|
-
modalCancelText?: string;
|
|
103
|
-
}
|
|
104
|
-
/** @private */
|
|
105
|
-
export interface LoginWithShopEvents {
|
|
106
|
-
/**
|
|
107
|
-
* A callback that's fired when the buyer presses the continue button.
|
|
108
|
-
*
|
|
109
|
-
* Return a promise to do work before the buyer leaves. Checkout keeps the button in its loading state and waits for the promise to settle before redirecting to Shop Pay.
|
|
110
|
-
*/
|
|
111
|
-
onComplete?(event: CallbackEvent<typeof tagName>): void | Promise<void>;
|
|
112
|
-
/**
|
|
113
|
-
* A callback that's fired when the buyer dismisses the modal, either with the cancel button or by closing it.
|
|
114
|
-
*/
|
|
115
|
-
onClosed?(event: CallbackEvent<typeof tagName>): void;
|
|
116
|
-
/**
|
|
117
|
-
* A callback that's fired when the buyer's Shop Pay state in checkout is determined or changes.
|
|
118
|
-
*
|
|
119
|
-
* Read `event.status` for the new state.
|
|
120
|
-
*/
|
|
121
|
-
onStatusChange?(event: CallbackEvent<typeof tagName> & LoginWithShopStatusChangeEvent): void;
|
|
122
|
-
}
|
|
123
|
-
/** @private */
|
|
124
|
-
export interface LoginWithShopElementEvents {
|
|
125
|
-
/**
|
|
126
|
-
* A callback that's fired when the buyer presses the continue button.
|
|
127
|
-
*
|
|
128
|
-
* Checkout redirects to Shop Pay once this event has been handled.
|
|
129
|
-
*/
|
|
130
|
-
complete?: CallbackEventListener<typeof tagName>;
|
|
131
|
-
/**
|
|
132
|
-
* A callback that's fired when the buyer dismisses the modal, either with the cancel button or by closing it.
|
|
133
|
-
*/
|
|
134
|
-
closed?: CallbackEventListener<typeof tagName>;
|
|
135
|
-
/**
|
|
136
|
-
* A callback that's fired when the buyer's Shop Pay state in checkout is determined or changes.
|
|
137
|
-
*
|
|
138
|
-
* Read `event.status` for the new state.
|
|
139
|
-
*/
|
|
140
|
-
statuschange?: CallbackEventListener<typeof tagName, LoginWithShopStatusChangeEvent>;
|
|
141
|
-
}
|
|
142
|
-
/** @private */
|
|
143
|
-
export interface LoginWithShopElement extends LoginWithShopElementProps, HTMLElement {
|
|
144
|
-
oncomplete: LoginWithShopElementEvents['complete'];
|
|
145
|
-
onclosed: LoginWithShopElementEvents['closed'];
|
|
146
|
-
onstatuschange: LoginWithShopElementEvents['statuschange'];
|
|
147
|
-
}
|
|
148
|
-
/** @private */
|
|
149
|
-
export interface LoginWithShopProps extends LoginWithShopElementProps, LoginWithShopEvents {
|
|
150
|
-
}
|
|
151
|
-
declare global {
|
|
152
|
-
interface HTMLElementTagNameMap {
|
|
153
|
-
[tagName]: LoginWithShopElement;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
declare module 'preact' {
|
|
157
|
-
namespace createElement.JSX {
|
|
158
|
-
interface IntrinsicElements {
|
|
159
|
-
[tagName]: LoginWithShopProps & BaseElementProps<LoginWithShopElement>;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export type { LoginWithShopElement, LoginWithShopElementEvents, LoginWithShopElementProps, LoginWithShopEvents, LoginWithShopProps, LoginWithShopStatusChangeEvent };
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
/** VERSION: 0.0.0 **/
|
|
2
|
-
/* eslint-disable import-x/extensions */
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-namespace */
|
|
4
|
-
/* eslint-disable @typescript-eslint/member-ordering */
|
|
5
|
-
/* eslint-disable line-comment-position */
|
|
6
|
-
/* eslint-disable @typescript-eslint/unified-signatures */
|
|
7
|
-
/* eslint-disable no-var */
|
|
8
|
-
/* eslint-disable import-x/namespace */
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
|
|
10
|
-
/// <reference lib="DOM" />
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* The base properties for elements that don't have children, providing essential attributes like keys and refs for component management.
|
|
14
|
-
*/
|
|
15
|
-
export interface BaseElementProps<TClass = HTMLElement> {
|
|
16
|
-
/**
|
|
17
|
-
* A unique identifier for this element within its parent. Used by the rendering engine for efficient reconciliation when lists change.
|
|
18
|
-
*/
|
|
19
|
-
key?: preact.Key;
|
|
20
|
-
/**
|
|
21
|
-
* A reference to the underlying DOM element, typically created using `useRef()`. This allows you to access and manipulate the DOM element directly in your component logic.
|
|
22
|
-
*/
|
|
23
|
-
ref?: preact.Ref<TClass>;
|
|
24
|
-
/**
|
|
25
|
-
* Assigns this element to a named slot in a parent component that uses slot-based composition patterns.
|
|
26
|
-
*/
|
|
27
|
-
slot?: Lowercase<string>;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* An event type that narrows the `currentTarget` to the specific HTML element associated with the custom element tag. This provides type-safe event handling in callback listeners.
|
|
31
|
-
*/
|
|
32
|
-
export type CallbackEvent<TTagName extends keyof HTMLElementTagNameMap, TEvent extends Event = Event> = TEvent & {
|
|
33
|
-
currentTarget: HTMLElementTagNameMap[TTagName];
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* A typed event listener for custom element events. The listener receives a `CallbackEvent` with the correct `currentTarget` type for the associated custom element tag.
|
|
37
|
-
*/
|
|
38
|
-
export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap, TData = object> = (EventListener & {
|
|
39
|
-
(event: CallbackEvent<TTagName, Event> & TData): void;
|
|
40
|
-
}) | null;
|
|
41
|
-
|
|
42
|
-
declare const tagName = "s-login-with-shop";
|
|
43
|
-
/** @private */
|
|
44
|
-
export interface LoginWithShopStatusChangeEvent {
|
|
45
|
-
/**
|
|
46
|
-
* The buyer's Shop Pay state in this checkout.
|
|
47
|
-
*
|
|
48
|
-
* - `shop_pay`: The buyer is signed in to Shop Pay.
|
|
49
|
-
* - `shop_pay_guest`: The buyer is in Shop Pay but isn't signed in.
|
|
50
|
-
* - `guest`: The buyer isn't using Shop Pay, so the modal can be shown.
|
|
51
|
-
* - `shop_pay_skipped`: The Shop Pay modal is suppressed for this checkout and isn't shown.
|
|
52
|
-
*/
|
|
53
|
-
status?: 'shop_pay' | 'guest' | 'shop_pay_skipped' | 'shop_pay_guest';
|
|
54
|
-
}
|
|
55
|
-
/** @private */
|
|
56
|
-
export interface LoginWithShopElementProps {
|
|
57
|
-
/**
|
|
58
|
-
* Whether the modal is visible to the buyer.
|
|
59
|
-
*
|
|
60
|
-
* The modal doesn't hide itself when the buyer dismisses it. Update this to `false` when the `closed` event fires to keep it in sync.
|
|
61
|
-
*
|
|
62
|
-
* @default false
|
|
63
|
-
*/
|
|
64
|
-
open?: boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Whether to send the buyer to Shop Pay immediately, without showing the modal.
|
|
67
|
-
*
|
|
68
|
-
* @default false
|
|
69
|
-
*/
|
|
70
|
-
doRedirect?: boolean;
|
|
71
|
-
/**
|
|
72
|
-
* The heading shown at the top of the modal.
|
|
73
|
-
*
|
|
74
|
-
* This is also the modal's accessible name and the alternative text for `modalLogoSrc`.
|
|
75
|
-
*
|
|
76
|
-
* @default ''
|
|
77
|
-
*/
|
|
78
|
-
modalTitle?: string;
|
|
79
|
-
/**
|
|
80
|
-
* The text shown below the heading, explaining what the buyer gets by continuing to Shop Pay.
|
|
81
|
-
*
|
|
82
|
-
* @default ''
|
|
83
|
-
*/
|
|
84
|
-
modalDescription?: string;
|
|
85
|
-
/**
|
|
86
|
-
* The URL of the image shown above the heading. The image is scaled to a maximum height of 64px.
|
|
87
|
-
*
|
|
88
|
-
* @default ''
|
|
89
|
-
*/
|
|
90
|
-
modalLogoSrc?: string;
|
|
91
|
-
/**
|
|
92
|
-
* The label of the primary button that continues to Shop Pay.
|
|
93
|
-
*
|
|
94
|
-
* @default 'Continue'
|
|
95
|
-
*/
|
|
96
|
-
modalContinueText?: string;
|
|
97
|
-
/**
|
|
98
|
-
* The label of the secondary button that dismisses the modal.
|
|
99
|
-
*
|
|
100
|
-
* @default ''
|
|
101
|
-
*/
|
|
102
|
-
modalCancelText?: string;
|
|
103
|
-
}
|
|
104
|
-
/** @private */
|
|
105
|
-
export interface LoginWithShopEvents {
|
|
106
|
-
/**
|
|
107
|
-
* A callback that's fired when the buyer presses the continue button.
|
|
108
|
-
*
|
|
109
|
-
* Return a promise to do work before the buyer leaves. Checkout keeps the button in its loading state and waits for the promise to settle before redirecting to Shop Pay.
|
|
110
|
-
*/
|
|
111
|
-
onComplete?(event: CallbackEvent<typeof tagName>): void | Promise<void>;
|
|
112
|
-
/**
|
|
113
|
-
* A callback that's fired when the buyer dismisses the modal, either with the cancel button or by closing it.
|
|
114
|
-
*/
|
|
115
|
-
onClosed?(event: CallbackEvent<typeof tagName>): void;
|
|
116
|
-
/**
|
|
117
|
-
* A callback that's fired when the buyer's Shop Pay state in checkout is determined or changes.
|
|
118
|
-
*
|
|
119
|
-
* Read `event.status` for the new state.
|
|
120
|
-
*/
|
|
121
|
-
onStatusChange?(event: CallbackEvent<typeof tagName> & LoginWithShopStatusChangeEvent): void;
|
|
122
|
-
}
|
|
123
|
-
/** @private */
|
|
124
|
-
export interface LoginWithShopElementEvents {
|
|
125
|
-
/**
|
|
126
|
-
* A callback that's fired when the buyer presses the continue button.
|
|
127
|
-
*
|
|
128
|
-
* Checkout redirects to Shop Pay once this event has been handled.
|
|
129
|
-
*/
|
|
130
|
-
complete?: CallbackEventListener<typeof tagName>;
|
|
131
|
-
/**
|
|
132
|
-
* A callback that's fired when the buyer dismisses the modal, either with the cancel button or by closing it.
|
|
133
|
-
*/
|
|
134
|
-
closed?: CallbackEventListener<typeof tagName>;
|
|
135
|
-
/**
|
|
136
|
-
* A callback that's fired when the buyer's Shop Pay state in checkout is determined or changes.
|
|
137
|
-
*
|
|
138
|
-
* Read `event.status` for the new state.
|
|
139
|
-
*/
|
|
140
|
-
statuschange?: CallbackEventListener<typeof tagName, LoginWithShopStatusChangeEvent>;
|
|
141
|
-
}
|
|
142
|
-
/** @private */
|
|
143
|
-
export interface LoginWithShopElement extends LoginWithShopElementProps, HTMLElement {
|
|
144
|
-
oncomplete: LoginWithShopElementEvents['complete'];
|
|
145
|
-
onclosed: LoginWithShopElementEvents['closed'];
|
|
146
|
-
onstatuschange: LoginWithShopElementEvents['statuschange'];
|
|
147
|
-
}
|
|
148
|
-
/** @private */
|
|
149
|
-
export interface LoginWithShopProps extends LoginWithShopElementProps, LoginWithShopEvents {
|
|
150
|
-
}
|
|
151
|
-
declare global {
|
|
152
|
-
interface HTMLElementTagNameMap {
|
|
153
|
-
[tagName]: LoginWithShopElement;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
declare module 'preact' {
|
|
157
|
-
namespace createElement.JSX {
|
|
158
|
-
interface IntrinsicElements {
|
|
159
|
-
[tagName]: LoginWithShopProps & BaseElementProps<LoginWithShopElement>;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export type { LoginWithShopElement, LoginWithShopElementEvents, LoginWithShopElementProps, LoginWithShopEvents, LoginWithShopProps, LoginWithShopStatusChangeEvent };
|