@vtex/faststore 0.0.6 → 0.0.8
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/CHANGELOG.md +99 -0
- package/dist/actions.json +152 -1
- package/dist/catalog.json +2541 -1278
- package/dist/cli/UnreachableCaseError-Crd168Vu.js +10 -0
- package/dist/cli/UnreachableCaseError-Crd168Vu.js.map +1 -0
- package/dist/cli/cacheControl-CEojH_TM.js +158 -0
- package/dist/cli/cacheControl-CEojH_TM.js.map +1 -0
- package/dist/cli/cachePolicy-m2vASMRW.js +26 -0
- package/dist/cli/cachePolicy-m2vASMRW.js.map +1 -0
- package/dist/cli/computeCoreSchemaHash-DPJZj-qJ.js +10 -0
- package/dist/cli/computeCoreSchemaHash-DPJZj-qJ.js.map +1 -0
- package/dist/cli/default-BCQHcwbL.js +253 -0
- package/dist/cli/default-BCQHcwbL.js.map +1 -0
- package/dist/cli/disableSuggestions-yO9UqiWn.js +21 -0
- package/dist/cli/disableSuggestions-yO9UqiWn.js.map +1 -0
- package/dist/cli/dist-C1JhdHfo.js +2001 -0
- package/dist/cli/dist-C1JhdHfo.js.map +1 -0
- package/dist/cli/graphql-DG9thCDG.js +14589 -0
- package/dist/cli/graphql-DG9thCDG.js.map +1 -0
- package/dist/cli/index.d.ts +799 -0
- package/dist/cli/index.js +36459 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/index.min-BsIHDfFK.js +613 -0
- package/dist/cli/index.min-BsIHDfFK.js.map +1 -0
- package/dist/cli/inlineTrace-uLgOJ3TH.js +52 -0
- package/dist/cli/inlineTrace-uLgOJ3TH.js.map +1 -0
- package/dist/cli/internalPlugin-DnuwN4_4.js +11 -0
- package/dist/cli/internalPlugin-DnuwN4_4.js.map +1 -0
- package/dist/cli/packageVersion-DQAnIEil.js +6 -0
- package/dist/cli/packageVersion-DQAnIEil.js.map +1 -0
- package/dist/cli/rolldown-runtime-BMI-E3GI.js +44 -0
- package/dist/cli/schemaIsSubgraph-DoGh3OYj.js +17 -0
- package/dist/cli/schemaIsSubgraph-DoGh3OYj.js.map +1 -0
- package/dist/cli/schemaReporting-K-me-3-v.js +199 -0
- package/dist/cli/schemaReporting-K-me-3-v.js.map +1 -0
- package/dist/cli/server-runtime.js +49879 -0
- package/dist/cli/server-runtime.js.map +1 -0
- package/dist/cli/traceTreeBuilder-BIcV2U7b.js +9118 -0
- package/dist/cli/traceTreeBuilder-BIcV2U7b.js.map +1 -0
- package/dist/cli/usageReporting-Bpl8vSZX.js +10201 -0
- package/dist/cli/usageReporting-Bpl8vSZX.js.map +1 -0
- package/dist/cli/v4-CBhFvC49.js +42 -0
- package/dist/cli/v4-CBhFvC49.js.map +1 -0
- package/dist/client.d.ts +5 -1
- package/dist/client.js +5 -1
- package/dist/components.d.ts +38 -9
- package/dist/components.js +42 -13
- package/dist/content-types.json +616 -0
- package/dist/core/dist/define-component.d.ts +43 -1
- package/dist/core/dist/index.d.ts +2 -2
- package/dist/docs/account-access-gate.md +4 -4
- package/dist/docs/account-address-book.md +519 -0
- package/dist/docs/account-entry-point.md +1 -1
- package/dist/docs/account-menu-identity.md +160 -0
- package/dist/docs/account-menu.md +107 -24
- package/dist/docs/alert-dialog.md +2 -2
- package/dist/docs/avatar.md +103 -0
- package/dist/docs/billing-address.md +17 -9
- package/dist/docs/card-entry.md +37 -6
- package/dist/docs/cardholder-document.md +16 -14
- package/dist/docs/cart-item.md +1 -1
- package/dist/docs/cart.md +8 -8
- package/dist/docs/client-profile-fieldset.md +7 -5
- package/dist/docs/copy-text.md +84 -0
- package/dist/docs/document-field.md +8 -8
- package/dist/docs/footer-link-group.md +2 -2
- package/dist/docs/header-root.md +1 -1
- package/dist/docs/incentives.md +2 -2
- package/dist/docs/logo.md +5 -5
- package/dist/docs/my-account-profile.md +5 -5
- package/dist/docs/navigation-link-list.md +2 -2
- package/dist/docs/navigation-link.md +3 -3
- package/dist/docs/order-cancel.md +52 -0
- package/dist/docs/order-delivery-address.md +63 -0
- package/dist/docs/order-delivery-group.md +83 -0
- package/dist/docs/order-details-back.md +41 -0
- package/dist/docs/order-details-header.md +48 -0
- package/dist/docs/order-list-row.md +46 -0
- package/dist/docs/order-list-search.md +101 -0
- package/dist/docs/order-list-views.md +97 -0
- package/dist/docs/order-list.md +94 -0
- package/dist/docs/order-payment.md +94 -0
- package/dist/docs/order-placed-date.md +49 -0
- package/dist/docs/order-placed-payment-summary.md +13 -15
- package/dist/docs/order-placed.md +225 -0
- package/dist/docs/order-progress.md +88 -0
- package/dist/docs/order-status-badge.md +91 -0
- package/dist/docs/order-summary.md +53 -0
- package/dist/docs/payment-method-badges.md +14 -3
- package/dist/docs/place-order.md +13 -9
- package/dist/docs/product-shelf.md +20 -13
- package/dist/docs/saved-cards.md +2 -2
- package/dist/docs/select.md +19 -6
- package/dist/docs/session.md +1 -1
- package/dist/docs/shipping-address.md +1 -1
- package/dist/docs/sign-in-redirect.md +6 -6
- package/dist/docs/toast.md +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +2 -1
- package/dist/internal/client.d.ts +6 -1
- package/dist/internal/client.js +8 -3
- package/dist/internal/content.d.ts +2 -2
- package/dist/internal/server.d.ts +8 -1
- package/dist/internal/server.js +8 -1
- package/dist/matter/account-access-gate/account-access-gate.d.ts +2 -1
- package/dist/matter/account-access-gate/account-access-gate.js +19 -16
- package/dist/matter/account-access-gate/account-access-gate.js.map +1 -1
- package/dist/matter/account-address-book/account-address-book-delete.d.ts +60 -0
- package/dist/matter/account-address-book/account-address-book-delete.js +184 -0
- package/dist/matter/account-address-book/account-address-book-delete.js.map +1 -0
- package/dist/matter/account-address-book/account-address-book-deliverability.d.ts +19 -0
- package/dist/matter/account-address-book/account-address-book-deliverability.js +50 -0
- package/dist/matter/account-address-book/account-address-book-deliverability.js.map +1 -0
- package/dist/matter/account-address-book/account-address-book-form-parts.d.ts +42 -0
- package/dist/matter/account-address-book/account-address-book-form-parts.js +146 -0
- package/dist/matter/account-address-book/account-address-book-form-parts.js.map +1 -0
- package/dist/matter/account-address-book/account-address-book-profile-notice.d.ts +25 -0
- package/dist/matter/account-address-book/account-address-book-profile-notice.js +72 -0
- package/dist/matter/account-address-book/account-address-book-profile-notice.js.map +1 -0
- package/dist/matter/account-address-book/account-address-book.d.ts +120 -0
- package/dist/matter/account-address-book/account-address-book.js +469 -0
- package/dist/matter/account-address-book/account-address-book.js.map +1 -0
- package/dist/matter/account-address-book/account-address-country-switch.js +59 -0
- package/dist/matter/account-address-book/account-address-country-switch.js.map +1 -0
- package/dist/matter/account-address-book/account-address-country.d.ts +36 -0
- package/dist/matter/account-address-book/account-address-country.js +151 -0
- package/dist/matter/account-address-book/account-address-country.js.map +1 -0
- package/dist/matter/account-address-book/account-address-first-line.js +11 -0
- package/dist/matter/account-address-book/account-address-first-line.js.map +1 -0
- package/dist/matter/account-address-book/account-address-form-context.d.ts +55 -0
- package/dist/matter/account-address-book/account-address-form-context.js +14 -0
- package/dist/matter/account-address-book/account-address-form-context.js.map +1 -0
- package/dist/matter/account-address-book/account-address-form.d.ts +85 -0
- package/dist/matter/account-address-book/account-address-form.js +946 -0
- package/dist/matter/account-address-book/account-address-form.js.map +1 -0
- package/dist/matter/account-address-book/account-address-postal-autofill.js +189 -0
- package/dist/matter/account-address-book/account-address-postal-autofill.js.map +1 -0
- package/dist/matter/account-address-book/account-address-record.d.ts +26 -0
- package/dist/matter/account-address-book/account-address-record.js +138 -0
- package/dist/matter/account-address-book/account-address-record.js.map +1 -0
- package/dist/matter/account-entry-point/account-entry-point.js +11 -11
- package/dist/matter/account-entry-point/account-entry-point.js.map +1 -1
- package/dist/matter/account-menu/account-menu.d.ts +77 -3
- package/dist/matter/account-menu/account-menu.js +252 -19
- package/dist/matter/account-menu/account-menu.js.map +1 -1
- package/dist/matter/account-menu/sign-out-failure.js +50 -0
- package/dist/matter/account-menu/sign-out-failure.js.map +1 -0
- package/dist/matter/account-menu-identity/account-menu-identity.d.ts +21 -0
- package/dist/matter/account-menu-identity/account-menu-identity.js +88 -0
- package/dist/matter/account-menu-identity/account-menu-identity.js.map +1 -0
- package/dist/matter/billing-address/billing-address.d.ts +30 -17
- package/dist/matter/billing-address/billing-address.js +128 -33
- package/dist/matter/billing-address/billing-address.js.map +1 -1
- package/dist/matter/breadcrumb/breadcrumb.js +2 -2
- package/dist/matter/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/matter/card-entry/card-capture.js +4 -3
- package/dist/matter/card-entry/card-capture.js.map +1 -1
- package/dist/matter/card-entry/card-entry.d.ts +5 -3
- package/dist/matter/card-entry/card-entry.js +78 -27
- package/dist/matter/card-entry/card-entry.js.map +1 -1
- package/dist/matter/cardholder-document/cardholder-document.d.ts +10 -9
- package/dist/matter/cardholder-document/cardholder-document.js +36 -16
- package/dist/matter/cardholder-document/cardholder-document.js.map +1 -1
- package/dist/matter/cart/cart.d.ts +7 -2
- package/dist/matter/cart/cart.js +29 -26
- package/dist/matter/cart/cart.js.map +1 -1
- package/dist/matter/cart-item/cart-item.js +2 -2
- package/dist/matter/cart-item/cart-item.js.map +1 -1
- package/dist/matter/client-preferences/client-preferences-fieldset.js +2 -2
- package/dist/matter/client-profile-form/client-profile-fieldset.js +9 -6
- package/dist/matter/client-profile-form/client-profile-fieldset.js.map +1 -1
- package/dist/matter/identity-edit/identity-edit.js +3 -3
- package/dist/matter/identity-edit/identity-edit.js.map +1 -1
- package/dist/matter/identity-summary/identity-summary.js +4 -3
- package/dist/matter/identity-summary/identity-summary.js.map +1 -1
- package/dist/matter/my-account-profile/my-account-profile.d.ts +6 -3
- package/dist/matter/my-account-profile/my-account-profile.js +6 -5
- package/dist/matter/my-account-profile/my-account-profile.js.map +1 -1
- package/dist/matter/order-cancel/order-cancel.d.ts +110 -0
- package/dist/matter/order-cancel/order-cancel.js +344 -0
- package/dist/matter/order-cancel/order-cancel.js.map +1 -0
- package/dist/matter/order-delivery-address/order-delivery-address.d.ts +73 -0
- package/dist/matter/order-delivery-address/order-delivery-address.js +172 -0
- package/dist/matter/order-delivery-address/order-delivery-address.js.map +1 -0
- package/dist/matter/order-delivery-group/order-delivery-group.d.ts +128 -0
- package/dist/matter/order-delivery-group/order-delivery-group.js +408 -0
- package/dist/matter/order-delivery-group/order-delivery-group.js.map +1 -0
- package/dist/matter/order-details-header/order-details-header.d.ts +104 -0
- package/dist/matter/order-details-header/order-details-header.js +190 -0
- package/dist/matter/order-details-header/order-details-header.js.map +1 -0
- package/dist/matter/order-list/customer-orders-filter.d.ts +12 -0
- package/dist/matter/order-list/customer-orders-filter.js +30 -0
- package/dist/matter/order-list/customer-orders-filter.js.map +1 -0
- package/dist/matter/order-list/order-list.d.ts +121 -0
- package/dist/matter/order-list/order-list.js +395 -0
- package/dist/matter/order-list/order-list.js.map +1 -0
- package/dist/matter/order-list-row/order-list-row.d.ts +44 -0
- package/dist/matter/order-list-row/order-list-row.js +127 -0
- package/dist/matter/order-list-row/order-list-row.js.map +1 -0
- package/dist/matter/order-list-search/order-list-search.d.ts +72 -0
- package/dist/matter/order-list-search/order-list-search.js +296 -0
- package/dist/matter/order-list-search/order-list-search.js.map +1 -0
- package/dist/matter/order-list-views/order-list-views.d.ts +65 -0
- package/dist/matter/order-list-views/order-list-views.js +154 -0
- package/dist/matter/order-list-views/order-list-views.js.map +1 -0
- package/dist/matter/order-payment/order-payment.d.ts +83 -0
- package/dist/matter/order-payment/order-payment.js +258 -0
- package/dist/matter/order-payment/order-payment.js.map +1 -0
- package/dist/matter/order-placed/order-placed-deliveries.d.ts +145 -0
- package/dist/matter/order-placed/order-placed-deliveries.js +380 -0
- package/dist/matter/order-placed/order-placed-deliveries.js.map +1 -0
- package/dist/matter/order-placed/order-placed.d.ts +122 -0
- package/dist/matter/order-placed/order-placed.js +452 -0
- package/dist/matter/order-placed/order-placed.js.map +1 -0
- package/dist/matter/order-placed-date/order-placed-date.d.ts +45 -0
- package/dist/matter/order-placed-date/order-placed-date.js +92 -0
- package/dist/matter/order-placed-date/order-placed-date.js.map +1 -0
- package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.d.ts +5 -8
- package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js +29 -81
- package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js.map +1 -1
- package/dist/matter/order-progress/order-progress.d.ts +85 -0
- package/dist/matter/order-progress/order-progress.js +203 -0
- package/dist/matter/order-progress/order-progress.js.map +1 -0
- package/dist/matter/order-summary/order-summary.d.ts +81 -0
- package/dist/matter/order-summary/order-summary.js +192 -0
- package/dist/matter/order-summary/order-summary.js.map +1 -0
- package/dist/matter/payment/cardholder-document-rule.d.ts +35 -0
- package/dist/matter/payment/cardholder-document-rule.js +35 -0
- package/dist/matter/payment/cardholder-document-rule.js.map +1 -0
- package/dist/matter/payment/payment-card-capture.js +38 -23
- package/dist/matter/payment/payment-card-capture.js.map +1 -1
- package/dist/matter/payment/payment-controller.js +12 -0
- package/dist/matter/payment/payment-controller.js.map +1 -1
- package/dist/matter/payment/payment-method-badges.js +4 -2
- package/dist/matter/payment/payment-method-badges.js.map +1 -1
- package/dist/matter/payment/payment.js +12 -0
- package/dist/matter/payment/payment.js.map +1 -1
- package/dist/matter/payment/use-payment-method-selection.d.ts +39 -0
- package/dist/matter/payment/use-payment-method-selection.js +30 -2
- package/dist/matter/payment/use-payment-method-selection.js.map +1 -1
- package/dist/matter/payment/use-payment-submit-gate.d.ts +16 -2
- package/dist/matter/payment/use-payment-submit-gate.js +42 -14
- package/dist/matter/payment/use-payment-submit-gate.js.map +1 -1
- package/dist/matter/place-order/place-order.d.ts +12 -7
- package/dist/matter/place-order/place-order.js +126 -103
- package/dist/matter/place-order/place-order.js.map +1 -1
- package/dist/matter/pricing/pricing.js +5 -5
- package/dist/matter/pricing/pricing.js.map +1 -1
- package/dist/matter/product-shelf/product-shelf.d.ts +61 -31
- package/dist/matter/product-shelf/product-shelf.js +157 -57
- package/dist/matter/product-shelf/product-shelf.js.map +1 -1
- package/dist/matter/region/region.js +1 -1
- package/dist/matter/saved-cards/saved-cards.js +27 -15
- package/dist/matter/saved-cards/saved-cards.js.map +1 -1
- package/dist/matter/session/session.js +2 -2
- package/dist/matter/session/session.js.map +1 -1
- package/dist/matter/shipping-address/country-descriptors.d.ts +1 -0
- package/dist/matter/shipping-address/country-descriptors.js +23 -1
- package/dist/matter/shipping-address/country-descriptors.js.map +1 -1
- package/dist/matter/shipping-address/shipping-address.js +63 -15
- package/dist/matter/shipping-address/shipping-address.js.map +1 -1
- package/dist/matter/shipping-simulator/shipping-simulator.d.ts +1 -1
- package/dist/matter/shipping-simulator/shipping-simulator.js.map +1 -1
- package/dist/matter/sign-in-redirect/sign-in-redirect.js +48 -10
- package/dist/matter/sign-in-redirect/sign-in-redirect.js.map +1 -1
- package/dist/matter/variant-selector/variant-selector.js +2 -2
- package/dist/matter/variant-selector/variant-selector.js.map +1 -1
- package/dist/particles/address-summary/address-summary.js +2 -2
- package/dist/particles/address-summary/address-summary.js.map +1 -1
- package/dist/particles/alert-dialog/alert-dialog.d.ts +5 -1
- package/dist/particles/alert-dialog/alert-dialog.js +5 -2
- package/dist/particles/alert-dialog/alert-dialog.js.map +1 -1
- package/dist/particles/avatar/avatar.d.ts +17 -0
- package/dist/particles/avatar/avatar.js +65 -0
- package/dist/particles/avatar/avatar.js.map +1 -0
- package/dist/particles/copy-text/copy-text.d.ts +28 -0
- package/dist/particles/copy-text/copy-text.js +140 -0
- package/dist/particles/copy-text/copy-text.js.map +1 -0
- package/dist/particles/document-field/document-field.d.ts +34 -5
- package/dist/particles/document-field/document-field.js +115 -19
- package/dist/particles/document-field/document-field.js.map +1 -1
- package/dist/particles/field/field.js +1 -1
- package/dist/particles/field/field.js.map +1 -1
- package/dist/particles/footer-link-group/footer-link-group.d.ts +6 -2
- package/dist/particles/footer-link-group/footer-link-group.js +18 -7
- package/dist/particles/footer-link-group/footer-link-group.js.map +1 -1
- package/dist/particles/incentives/incentives.d.ts +6 -2
- package/dist/particles/incentives/incentives.js +7 -2
- package/dist/particles/incentives/incentives.js.map +1 -1
- package/dist/particles/logo/logo.d.ts +3 -2
- package/dist/particles/logo/logo.js +20 -8
- package/dist/particles/logo/logo.js.map +1 -1
- package/dist/particles/navigation-link/navigation-link.d.ts +2 -3
- package/dist/particles/navigation-link/navigation-link.js +4 -4
- package/dist/particles/navigation-link/navigation-link.js.map +1 -1
- package/dist/particles/navigation-link-list/navigation-link-list.d.ts +6 -2
- package/dist/particles/navigation-link-list/navigation-link-list.js +18 -7
- package/dist/particles/navigation-link-list/navigation-link-list.js.map +1 -1
- package/dist/particles/order-details-back/order-details-back.d.ts +28 -0
- package/dist/particles/order-details-back/order-details-back.js +52 -0
- package/dist/particles/order-details-back/order-details-back.js.map +1 -0
- package/dist/particles/order-status-badge/order-status-badge.d.ts +19 -0
- package/dist/particles/order-status-badge/order-status-badge.js +50 -0
- package/dist/particles/order-status-badge/order-status-badge.js.map +1 -0
- package/dist/particles/phone-field/phone-field.js +2 -2
- package/dist/particles/phone-field/phone-field.js.map +1 -1
- package/dist/particles/select/select.js +6 -6
- package/dist/particles/select/select.js.map +1 -1
- package/dist/particles/toast/toast.d.ts +1 -1
- package/dist/particles/toast/toast.js +32 -6
- package/dist/particles/toast/toast.js.map +1 -1
- package/dist/schema.graphql +1079 -54
- package/dist/sdk/actions/address-action-provider.d.ts +16 -0
- package/dist/sdk/actions/address-action-provider.js +20 -0
- package/dist/sdk/actions/address-action-provider.js.map +1 -0
- package/dist/sdk/actions/analytics-action-provider.js +1 -1
- package/dist/sdk/actions/index.d.ts +3 -1
- package/dist/sdk/actions/index.js +3 -1
- package/dist/sdk/actions/order-action-provider.d.ts +12 -0
- package/dist/sdk/actions/order-action-provider.js +16 -0
- package/dist/sdk/actions/order-action-provider.js.map +1 -0
- package/dist/sdk/actions/types.d.ts +6 -2
- package/dist/sdk/address/address-fields.js +38 -0
- package/dist/sdk/address/address-fields.js.map +1 -0
- package/dist/sdk/address/checkout-readiness.js +17 -0
- package/dist/sdk/address/checkout-readiness.js.map +1 -0
- package/dist/sdk/address/constants.js +60 -0
- package/dist/sdk/address/constants.js.map +1 -0
- package/dist/sdk/address/country-display.js +19 -0
- package/dist/sdk/address/country-display.js.map +1 -0
- package/dist/sdk/address/country-rules.js +30 -0
- package/dist/sdk/address/country-rules.js.map +1 -0
- package/dist/sdk/address/format-address.js +18 -0
- package/dist/sdk/address/format-address.js.map +1 -0
- package/dist/sdk/address/iso-countries.js +262 -0
- package/dist/sdk/address/iso-countries.js.map +1 -0
- package/dist/sdk/address/layouts.js +56 -0
- package/dist/sdk/address/layouts.js.map +1 -0
- package/dist/sdk/address/messages.js +97 -0
- package/dist/sdk/address/messages.js.map +1 -0
- package/dist/sdk/address/operations.d.ts +54 -0
- package/dist/sdk/address/operations.js +83 -0
- package/dist/sdk/address/operations.js.map +1 -0
- package/dist/sdk/address/postal-code-lookup-operations.js +23 -0
- package/dist/sdk/address/postal-code-lookup-operations.js.map +1 -0
- package/dist/sdk/address/postal-code.js +11 -0
- package/dist/sdk/address/postal-code.js.map +1 -0
- package/dist/sdk/address/schema.js +14 -0
- package/dist/sdk/address/schema.js.map +1 -0
- package/dist/sdk/address/server-fields.js +25 -0
- package/dist/sdk/address/server-fields.js.map +1 -0
- package/dist/sdk/address/switch-country.js +57 -0
- package/dist/sdk/address/switch-country.js.map +1 -0
- package/dist/sdk/address/types.d.ts +26 -0
- package/dist/sdk/address/use-address-actions.d.ts +29 -0
- package/dist/sdk/address/use-address-actions.js +247 -0
- package/dist/sdk/address/use-address-actions.js.map +1 -0
- package/dist/sdk/address/use-address-by-postal-code.js +57 -0
- package/dist/sdk/address/use-address-by-postal-code.js.map +1 -0
- package/dist/sdk/address/validate-address.js +62 -0
- package/dist/sdk/address/validate-address.js.map +1 -0
- package/dist/sdk/analytics/use-analytics-actions.js +2 -1
- package/dist/sdk/analytics/use-analytics-actions.js.map +1 -1
- package/dist/sdk/cache/storefront-cache.js +29 -4
- package/dist/sdk/cache/storefront-cache.js.map +1 -1
- package/dist/sdk/cart/use-cart-actions.js +9 -8
- package/dist/sdk/cart/use-cart-actions.js.map +1 -1
- package/dist/sdk/cart/use-cart-validate-on-open.js +2 -1
- package/dist/sdk/cart/use-cart-validate-on-open.js.map +1 -1
- package/dist/sdk/client/fetch-page-data.d.ts +11 -0
- package/dist/sdk/client/fetch-page-data.js +12 -1
- package/dist/sdk/client/fetch-page-data.js.map +1 -1
- package/dist/sdk/content/create-content-runtime.d.ts +22 -1
- package/dist/sdk/content/create-content-runtime.js +90 -9
- package/dist/sdk/content/create-content-runtime.js.map +1 -1
- package/dist/sdk/data/empty-content-value.js +16 -0
- package/dist/sdk/data/empty-content-value.js.map +1 -0
- package/dist/sdk/data/failed-fields.js +23 -0
- package/dist/sdk/data/failed-fields.js.map +1 -0
- package/dist/sdk/data/hot-data-provider.js +2 -1
- package/dist/sdk/data/hot-data-provider.js.map +1 -1
- package/dist/sdk/data/index.js +1 -1
- package/dist/sdk/data/page-reactive-data-root.d.ts +45 -7
- package/dist/sdk/data/page-reactive-data-root.js +88 -12
- package/dist/sdk/data/page-reactive-data-root.js.map +1 -1
- package/dist/sdk/data/variables-from-content.d.ts +43 -0
- package/dist/sdk/data/variables-from-content.js +57 -0
- package/dist/sdk/data/variables-from-content.js.map +1 -0
- package/dist/sdk/generated/fragment-types.js +2 -0
- package/dist/sdk/generated/fragment-types.js.map +1 -1
- package/dist/sdk/generated/gql.js +4 -1
- package/dist/sdk/generated/gql.js.map +1 -1
- package/dist/sdk/generated/graphql.d.ts +8 -0
- package/dist/sdk/generated/graphql.js +296 -1
- package/dist/sdk/generated/graphql.js.map +1 -1
- package/dist/sdk/i18n/messages/en-US.js +138 -1
- package/dist/sdk/i18n/messages/en-US.json +138 -1
- package/dist/sdk/i18n/messages/en-US.json.d.ts +137 -0
- package/dist/sdk/i18n/messages/es-ES.js +138 -1
- package/dist/sdk/i18n/messages/es-ES.json +138 -1
- package/dist/sdk/i18n/messages/pt-BR.js +138 -1
- package/dist/sdk/i18n/messages/pt-BR.json +138 -1
- package/dist/sdk/identity/use-identity-actions.js +5 -4
- package/dist/sdk/identity/use-identity-actions.js.map +1 -1
- package/dist/sdk/navigation/current-page.js +30 -0
- package/dist/sdk/navigation/current-page.js.map +1 -0
- package/dist/sdk/navigation/not-found-log.d.ts +28 -0
- package/dist/sdk/navigation/not-found-log.js +133 -0
- package/dist/sdk/navigation/not-found-log.js.map +1 -0
- package/dist/sdk/navigation/path.js +25 -0
- package/dist/sdk/navigation/path.js.map +1 -0
- package/dist/sdk/navigation/redirect.d.ts +11 -0
- package/dist/sdk/navigation/redirect.js +22 -0
- package/dist/sdk/navigation/redirect.js.map +1 -0
- package/dist/sdk/navigation/report.js +70 -0
- package/dist/sdk/navigation/report.js.map +1 -0
- package/dist/sdk/navigation/resolve-storefront-href.d.ts +12 -0
- package/dist/sdk/navigation/resolve-storefront-href.js +214 -0
- package/dist/sdk/navigation/resolve-storefront-href.js.map +1 -0
- package/dist/sdk/navigation/route-identity-provider.d.ts +11 -0
- package/dist/sdk/navigation/route-identity-provider.js +20 -0
- package/dist/sdk/navigation/route-identity-provider.js.map +1 -0
- package/dist/sdk/navigation/route-map-provider.d.ts +19 -0
- package/dist/sdk/navigation/route-map-provider.js +29 -0
- package/dist/sdk/navigation/route-map-provider.js.map +1 -0
- package/dist/sdk/navigation/storefront-link.d.ts +16 -0
- package/dist/sdk/navigation/storefront-link.js +66 -0
- package/dist/sdk/navigation/storefront-link.js.map +1 -0
- package/dist/sdk/navigation/types.d.ts +45 -0
- package/dist/sdk/navigation/use-storefront-navigation.d.ts +26 -0
- package/dist/sdk/navigation/use-storefront-navigation.js +73 -0
- package/dist/sdk/navigation/use-storefront-navigation.js.map +1 -0
- package/dist/sdk/navigation/use-storefront-route.d.ts +26 -0
- package/dist/sdk/navigation/use-storefront-route.js +87 -0
- package/dist/sdk/navigation/use-storefront-route.js.map +1 -0
- package/dist/sdk/navigation/use-storefront-search-params.d.ts +11 -0
- package/dist/sdk/navigation/use-storefront-search-params.js +16 -0
- package/dist/sdk/navigation/use-storefront-search-params.js.map +1 -0
- package/dist/sdk/orders/completion-badge.d.ts +8 -0
- package/dist/sdk/orders/completion-badge.js +47 -0
- package/dist/sdk/orders/completion-badge.js.map +1 -0
- package/dist/sdk/orders/order-operations.d.ts +19 -0
- package/dist/sdk/orders/order-operations.js +21 -0
- package/dist/sdk/orders/order-operations.js.map +1 -0
- package/dist/sdk/orders/use-order-actions.d.ts +23 -0
- package/dist/sdk/orders/use-order-actions.js +62 -0
- package/dist/sdk/orders/use-order-actions.js.map +1 -0
- package/dist/sdk/payment/gateway-origin.js +26 -13
- package/dist/sdk/payment/gateway-origin.js.map +1 -1
- package/dist/sdk/payment/gateway.d.ts +14 -2
- package/dist/sdk/payment/gateway.js +32 -14
- package/dist/sdk/payment/gateway.js.map +1 -1
- package/dist/sdk/payment/operations.js +11 -0
- package/dist/sdk/payment/operations.js.map +1 -1
- package/dist/sdk/payment/submission-registry.d.ts +2 -1
- package/dist/sdk/payment/submission-registry.js +12 -8
- package/dist/sdk/payment/submission-registry.js.map +1 -1
- package/dist/sdk/payment/use-payment-actions.d.ts +5 -3
- package/dist/sdk/payment/use-payment-actions.js +6 -3
- package/dist/sdk/payment/use-payment-actions.js.map +1 -1
- package/dist/sdk/payment/use-place-order.d.ts +6 -3
- package/dist/sdk/payment/use-place-order.js +334 -144
- package/dist/sdk/payment/use-place-order.js.map +1 -1
- package/dist/sdk/region/use-region-actions.js +2 -1
- package/dist/sdk/region/use-region-actions.js.map +1 -1
- package/dist/sdk/seo/page-alternates.d.ts +55 -0
- package/dist/sdk/seo/page-alternates.js +132 -0
- package/dist/sdk/seo/page-alternates.js.map +1 -0
- package/dist/sdk/session/read-server-session.d.ts +21 -0
- package/dist/sdk/session/read-server-session.js +61 -0
- package/dist/sdk/session/read-server-session.js.map +1 -0
- package/dist/sdk/session/use-session-actions.js +5 -4
- package/dist/sdk/session/use-session-actions.js.map +1 -1
- package/dist/sdk/session/use-session-revalidation.js +2 -1
- package/dist/sdk/session/use-session-revalidation.js.map +1 -1
- package/dist/sdk/shipping/use-shipping-actions.js +3 -2
- package/dist/sdk/shipping/use-shipping-actions.js.map +1 -1
- package/dist/utils/own-value.js +19 -0
- package/dist/utils/own-value.js.map +1 -0
- package/dist/utils/safe-href.d.ts +11 -0
- package/dist/utils/safe-href.js +31 -22
- package/dist/utils/safe-href.js.map +1 -1
- package/package.json +17 -2
- package/skills/storefront-asset/SKILL.md +111 -0
- package/skills/storefront-asset/references/api-side.md +153 -0
- package/skills/storefront-asset/references/findings.md +40 -0
- package/skills/storefront-asset/references/ui-side.md +94 -0
- package/src/styles/tailwind.css +27 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# OrderStatusBadge
|
|
2
|
+
|
|
3
|
+
**Category:** content
|
|
4
|
+
**Purpose:** Shopper-facing order status sentence, with a tone the caller supplies.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Visual cues (how to identify in an image)
|
|
9
|
+
|
|
10
|
+
- A short status sentence inside a compact label, such as "Delivered" or "In progress".
|
|
11
|
+
- The label has one of four tones: neutral, progress, success, or danger.
|
|
12
|
+
- The sentence is always visible. The color does not stand alone.
|
|
13
|
+
|
|
14
|
+
The image is the source of truth for layout.
|
|
15
|
+
|
|
16
|
+
## When to use
|
|
17
|
+
|
|
18
|
+
- To show the completion label of one order, on the order page or in the order list.
|
|
19
|
+
|
|
20
|
+
## When NOT to use
|
|
21
|
+
|
|
22
|
+
- For a generic count or tag with no order label → use [[badge]] and pass the text as children.
|
|
23
|
+
- For the four-stage progress of an order → use the order progress matter when it exists. This particle is the sentence, not the stages.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Composition
|
|
28
|
+
|
|
29
|
+
`OrderStatusBadge` is a leaf. It renders one sentence and takes no children. A `messages` entry replaces the catalogue sentence for that label. The order details header fills `messages` from its content entry. The order list passes none, so it stays on the catalogue.
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
OrderStatusBadge
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Components
|
|
36
|
+
|
|
37
|
+
### OrderStatusBadge
|
|
38
|
+
|
|
39
|
+
No schema props. The caller passes these at runtime:
|
|
40
|
+
|
|
41
|
+
| Prop | Type | Default | Notes |
|
|
42
|
+
|------|------|---------|-------|
|
|
43
|
+
| `state` | `'ongoing' \| 'completed' \| 'cancelled'` | — | Completion view. Sets `data-fs-order-status-badge-state`. Does not select the sentence. |
|
|
44
|
+
| `label` | string | — | Completion label id. Selects the catalogue sentence. Any other string renders the placeholder. |
|
|
45
|
+
| `tone` | `'neutral' \| 'progress' \| 'success' \| 'danger'` | — | Sets `data-fs-order-status-badge-tone`. Does not select the sentence. |
|
|
46
|
+
|
|
47
|
+
The catalogue ids are `fs/order-status.cancelled`, `fs/order-status.cancellation-requested`, `fs/order-status.in-progress`, `fs/order-status.delivered`, `fs/order-status.shipped`, `fs/order-status.ready-for-pickup`, `fs/order-status.collected`, and `fs/order-status.placeholder`.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Canonical schema example
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"order-status": {
|
|
56
|
+
"type": "OrderStatusBadge",
|
|
57
|
+
"props": {
|
|
58
|
+
"state": "completed",
|
|
59
|
+
"label": "delivered",
|
|
60
|
+
"tone": "success"
|
|
61
|
+
},
|
|
62
|
+
"style": [
|
|
63
|
+
"inline-flex items-center rounded-full px-[8px] py-[2px] text-[12px] font-medium bg-[#DCFCE7] text-[#14532D]"
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Common mistakes
|
|
70
|
+
|
|
71
|
+
- **`StatusBadge`.** The correct name is `OrderStatusBadge`.
|
|
72
|
+
- **Passing an OMS code or `statusDescription` as the text.** Pass `label` as a completion label id. The catalogue supplies the sentence.
|
|
73
|
+
- **Nesting a label inside `OrderStatusBadge`.** It does not render children.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Styling
|
|
78
|
+
|
|
79
|
+
The particle sets `data-fs-badge`, `data-fs-order-status-badge`, `data-fs-order-status-badge-state`, and `data-fs-order-status-badge-tone`. It ships no color.
|
|
80
|
+
|
|
81
|
+
| Component | What you style | Plausible classes |
|
|
82
|
+
|---|---|---|
|
|
83
|
+
| `OrderStatusBadge` | Pill label. Pick the background and text from the tone. | `inline-flex items-center rounded-full px-[8px] py-[2px] text-[12px] font-medium bg-[#DCFCE7] text-[#14532D]` |
|
|
84
|
+
|
|
85
|
+
Tone pairs that meet WCAG AA: neutral `bg-[#F3F4F6] text-[#1F2937]`, progress `bg-[#DBEAFE] text-[#1E3A8A]`, success `bg-[#DCFCE7] text-[#14532D]`, danger `bg-[#FEE2E2] text-[#7F1D1D]`.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Related
|
|
90
|
+
|
|
91
|
+
- [[badge]] — generic label. `OrderStatusBadge` composes it and replaces children with the catalogue sentence.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# OrderSummary
|
|
2
|
+
|
|
3
|
+
**Category:** content
|
|
4
|
+
**Purpose:** The total lines of one placed order and the grand total the API returns.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Visual cues (how to identify in an image)
|
|
9
|
+
|
|
10
|
+
- A short two-column list near the bottom of an order page: a label on the left, a money amount on the right.
|
|
11
|
+
- Three or more rows such as items, shipping, and discounts, then one emphasized total row.
|
|
12
|
+
- A discount row may show a negative amount. A shipping row may show zero.
|
|
13
|
+
|
|
14
|
+
The image is the source of truth for layout.
|
|
15
|
+
|
|
16
|
+
## When to use
|
|
17
|
+
|
|
18
|
+
- On `/pvt/orders/[orderId]`, where the page query reads `customerOrder`.
|
|
19
|
+
|
|
20
|
+
## When NOT to use
|
|
21
|
+
|
|
22
|
+
- For the cart or checkout totals → use `CartTotalizerRoot` and `CartTotalizerLine`.
|
|
23
|
+
- For how the order was paid → use `OrderPayment`.
|
|
24
|
+
- For the post-checkout recap → use `OrderPlacedPaymentSummary`.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Composition
|
|
29
|
+
|
|
30
|
+
Standalone. The page places it; it has no children.
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
OrderSummary
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Components
|
|
37
|
+
|
|
38
|
+
### OrderSummary
|
|
39
|
+
|
|
40
|
+
No schema props. Every line the order carries renders, in the order the API returned them. The total row is the API's `total`; the component does not add the lines up. The heading, the grand total, and the labels for `Items`, `Shipping`, `Discounts`, `Tax`, `Change`, and `Interest` are content (`order-summary`). A blank field keeps the message catalogue. Any other id shows its upstream `name`. Interest is a total the read appends, not a line this component calculates.
|
|
41
|
+
|
|
42
|
+
## Styling
|
|
43
|
+
|
|
44
|
+
- `data-fs-order-summary` — the region. `flex flex-col gap-[8px]`.
|
|
45
|
+
- `data-fs-order-summary-heading` — the visible title. Content wins; a blank field keeps `fs/order.totals.heading`.
|
|
46
|
+
- `data-fs-order-summary-lines` — the description list.
|
|
47
|
+
- `data-fs-order-summary-line` — one total row. `flex justify-between`.
|
|
48
|
+
- `data-fs-order-summary-line-id` — the total id (`Items`, `Shipping`, `Discounts`, …), for styling one row.
|
|
49
|
+
- `data-fs-order-summary-line-sign` — `negative`, `zero`, or `positive`.
|
|
50
|
+
- `data-fs-order-summary-label`, `data-fs-order-summary-value` — the label and the amount of every row, the total included.
|
|
51
|
+
- `data-fs-order-summary-total` — the total row. `font-semibold border-t pt-[8px]`.
|
|
52
|
+
- `data-fs-order-summary-total-label`, `data-fs-order-summary-total-value` — the total row's own label and amount.
|
|
53
|
+
- `data-fs-order-summary-skeleton`, `data-fs-order-summary-skeleton-line`, `data-fs-order-summary-skeleton-total` — the loading placeholder.
|
|
@@ -94,13 +94,24 @@ compiler's prop-type-driven icon collection never sees it. Same mechanism, same
|
|
|
94
94
|
detected-network icon (see its `.md`, "Store setup: network icon declaration").
|
|
95
95
|
|
|
96
96
|
**Any store composing `PaymentMethodBadges` or `AcceptedPaymentMethodBadges` must declare every name a
|
|
97
|
-
configured method can resolve to in `global.icons.include`.** Either strip can resolve up to
|
|
98
|
-
base-dialect names — `CardEntry`'s
|
|
97
|
+
configured method can resolve to in `global.icons.include`.** Either strip can resolve up to ten
|
|
98
|
+
base-dialect names — `CardEntry`'s six networks plus four wallet glyphs this component adds:
|
|
99
99
|
|
|
100
100
|
```json
|
|
101
101
|
{
|
|
102
102
|
"icons": {
|
|
103
|
-
"include": [
|
|
103
|
+
"include": [
|
|
104
|
+
"amex",
|
|
105
|
+
"diners",
|
|
106
|
+
"discover",
|
|
107
|
+
"elo-card",
|
|
108
|
+
"mastercard",
|
|
109
|
+
"visa",
|
|
110
|
+
"paypal",
|
|
111
|
+
"google-pay",
|
|
112
|
+
"pix",
|
|
113
|
+
"stripe"
|
|
114
|
+
]
|
|
104
115
|
}
|
|
105
116
|
}
|
|
106
117
|
```
|
package/dist/docs/place-order.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# PlaceOrder
|
|
2
2
|
|
|
3
3
|
**Category:** commerce
|
|
4
|
-
**Purpose:** The checkout's place-order CTA. Runs the three-call payment sequence (start transaction, the holder's direct-to-gateway submission, gateway callback), blocks interaction while it runs, and renders one inline outcome — an error message or a success confirmation — once it settles.
|
|
4
|
+
**Purpose:** The checkout's place-order CTA. Runs the three-call payment sequence (start transaction, the holder's direct-to-gateway submission, gateway callback), blocks interaction while it runs, and renders one inline outcome — an error message or a success confirmation — once it settles, plus an optional status message while it runs.
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -51,12 +51,13 @@ Child order reflects visual order. `PlaceOrder` composes under **either** paymen
|
|
|
51
51
|
|
|
52
52
|
### PlaceOrder
|
|
53
53
|
|
|
54
|
-
No sub-components. Renders a button and, once the sequence has settled, one inline outcome region (error or success).
|
|
54
|
+
No sub-components. Renders a button, an optional status region while the sequence runs (only when `placingMessage` is authored), and, once the sequence has settled, one inline outcome region (error or success).
|
|
55
55
|
|
|
56
56
|
| Prop | Type | Default | Notes |
|
|
57
57
|
|------|------|---------|-------|
|
|
58
58
|
| `label` | string | `"Place order"` | Button label while idle. |
|
|
59
59
|
| `placingLabel` | string | `"Placing order..."` | Button label while the sequence is in flight. |
|
|
60
|
+
| `placingMessage` | string | *(none)* | Status message in its own `role="status"` region beside the button while the order is being placed. Absent or blank renders nothing. The button text while placing stays `placingLabel`. |
|
|
60
61
|
| `resumeLabel` | string | `"Complete your order"` | Button label while a surviving attempt offers a resume — the card already left the browser (or its fate is unknown) and the next click finalizes it instead of running the full sequence again. |
|
|
61
62
|
| `successMessage` | string | `"Order placed successfully."` | Shown once the sequence settles with no errors. |
|
|
62
63
|
| `missingSubmissionMessage` | string | `"Enter your payment details before placing the order."` | Shown when `placeOrder()` is invoked with no registered submission for the current path (e.g. the shopper never finished entering a card). |
|
|
@@ -68,11 +69,12 @@ No sub-components. Renders a button and, once the sequence has settled, one inli
|
|
|
68
69
|
| `unavailableMethodMessage` | string | `"Choose another payment method before placing the order."` | Shown instead of the two document messages above when the selected method calls for a cardholder document the page is not showing — a method the card form cannot pay with, or one outside the payment root's `group` — so the shopper has to choose another payment method. |
|
|
69
70
|
| `unsavedBillingAddressMessage` | string | `"Save your billing address before placing the order."` | Shown when the shopper declined "same as delivery" but never saved a custom billing address. |
|
|
70
71
|
| `invalidCardDataMessage` | string | `"Enter valid card details before placing the order."` | Shown when the new-card draft itself fails validation before ever reaching the gateway. |
|
|
72
|
+
| `unsupportedNetworkMessage` | string | `"This card is not from a network the store accepts. Use another card or choose another payment method."` | Shown when the typed card number is well-formed but no network the store accepts claims it, whether or not a payment method is selected. |
|
|
71
73
|
| `invalidSecurityCodeMessage` | string | `"Enter a valid security code before placing the order."` | Shown when a saved-card submission is refused for a missing or invalid CVV. |
|
|
72
74
|
| `gatewayErrorMessage` | string | `"Unable to complete the payment. Please try again."` | Shown when the payment gateway itself refuses the submitted card. |
|
|
73
75
|
| `inFlightMessage` | string | `"This order is already being placed. Please wait."` | Shown when a click lands on an order-placement attempt whose own sequence is still running — a transaction this instance did not open, and which nothing here may finalize or re-run. |
|
|
74
76
|
| `unconfirmedMessage` | string | `"We could not confirm your order yet. Your payment may still be processing, so please do not pay again."` | Shown when the payment was handed to the gateway but the order could not be confirmed, so it may still be processing. Renders in its own `role="status"` node, never in the error alert. |
|
|
75
|
-
| `successHref` | string |
|
|
77
|
+
| `successHref` | page reference or string | `{ "standard": "order-placed" }` | Page navigated to after a successful placement. A page reference gets the placed order's group as its `orderGroup` param, percent-encoded. A string is a logical path of this store, navigated as written under the binding's base path. **Success-gated**: the navigation is requested only once an attempt settles with no errors and a non-null order group — never on a refusal. |
|
|
76
78
|
|
|
77
79
|
Every message prop above is resolved by the `code` of the client-synthesized `PaymentUserError` this CTA renders — in its alert, or in its status node for `unconfirmedMessage` — never by which component produced the error. A `PaymentUserError` whose code this component does not author (a server-returned code) renders that error's own `message` unchanged.
|
|
78
80
|
|
|
@@ -96,13 +98,13 @@ Every message prop above is resolved by the `code` of the client-synthesized `Pa
|
|
|
96
98
|
"label": "Place order",
|
|
97
99
|
"placingLabel": "Placing order...",
|
|
98
100
|
"successMessage": "Order placed successfully.",
|
|
99
|
-
"successHref": "
|
|
101
|
+
"successHref": { "standard": "order-placed" }
|
|
100
102
|
}
|
|
101
103
|
}
|
|
102
104
|
}
|
|
103
105
|
```
|
|
104
106
|
|
|
105
|
-
`successHref` is shown here
|
|
107
|
+
`successHref` is shown here with its default value. A string must be a logical path of this store, such as `/obrigado`; an absolute URL, a protocol-relative URL, or a non-http(s) scheme is refused rather than navigated to.
|
|
106
108
|
|
|
107
109
|
---
|
|
108
110
|
|
|
@@ -118,11 +120,12 @@ Every message prop above is resolved by the `code` of the client-synthesized `Pa
|
|
|
118
120
|
## Known limitations
|
|
119
121
|
|
|
120
122
|
- **A remount reads the surviving attempt instead of losing it — but the attempt itself does not survive a page reload.** T29 (`specs/make-an-order-attempt-survive-a.md`) gave the place-order sequence an identity-and-phase record on the payment context, above this component's own mount, alongside `placing`. Closing and reopening a `Dialog`/`Drawer` popup with no `keepMounted` no longer resets it: a settled attempt renders disabled with no further calls (`succeeded` is derived from the record, not only from this instance's own `attempted`/`userErrors`), and an attempt whose card already reached the gateway before the remount offers a resume (`resumeLabel`) that finalizes the same transaction — never a fresh `startTransaction` or a second card submission. This closes the case this bullet used to attribute to "a settled-order read model that outlives the overlay (T16/T17)": both are merged, and the limitation still stood, because neither one ever touched this component's own mount-scoped guard, which is what actually caused the duplicate-order risk. What is still not covered: a full page reload loses the attempt (no `sessionStorage` or equivalent persists it today — T29's own OQ-3), and the direct-to-gateway POST's abort budget (30s, `sdk/payment/gateway.ts`) is an unconfirmed placeholder pending a number from payments (OQ-7).
|
|
123
|
+
- **A refusal raised before the card POST leaves the CTA on `label`, not `resumeLabel`.** A card form that refuses after the transaction opened but before any request was issued (a missing `sendPayments` action, an origin the gateway builder will not post to, its own draft check) reports `reachedGateway: false`, so the attempt is recorded as refused: nothing was paid, the button keeps its `label`, and the next click opens a fresh transaction. A request that reached the gateway, or that cannot be shown not to have (a rejected request, a holder that throws or resolves a malformed result), stays resume-only and reads `resumeLabel`.
|
|
124
|
+
- **A failed `gatewayCallback` stays on `resumeLabel` today; the retry rule is in place but dormant.** Once the card POST was accepted, the hook only frees the next click for a callback error whose server code is neither `REDIRECT_REQUIRED` nor `MISSING_TRANSACTION_COOKIES` and that carries no `orderId`. The server sends no such code yet (task T225 will), so every callback failure that exists today (a timeout, a network failure, an unreadable result, a bank challenge, a lapsed transaction cookie) stays on `resumeLabel` and only re-issues the callback. A shopper whose card was refused still cannot enter another card without a reload until T225 lands.
|
|
121
125
|
- **Sibling placement (never nested inside `CardEntry`/`SavedCards`) is a convention, not something the compiler enforces.** `requiresContext: 'payment'` only fails a build with no payment-providing ancestor at any depth; it cannot detect that this component was nested one level too deep. Getting this wrong compiles clean and still leaves the other entry path with no CTA at all (see `specs/place-order.md`'s Open items).
|
|
122
|
-
- **`successHref` navigates with `
|
|
123
|
-
- **A `successHref`
|
|
124
|
-
- **
|
|
125
|
-
- **`successHref` is inert until a store authors it.** As of this writing no store composes it — see `specs/navigate-the-shopper-to-the-order.md` for the follow-up that wires Reserva's payment page to it, gated on the confirmation page's read path being fixed first.
|
|
126
|
+
- **`successHref` navigates with `replace`, not `push`.** The payment step is removed from the history stack, so the Back button from the confirmation page returns to whatever preceded payment, not to the payment step itself — deliberate (placing an order is terminal, and a live place-order CTA one Back press away risks a duplicate transaction), but a divergence from this package's other redirect-on-success component, `CartRedirectOnAdd`, which uses `push`.
|
|
127
|
+
- **A string `successHref` that is not a path of this store fails closed.** An absolute URL, a protocol-relative URL (`//host/...`), or a non-http(s) scheme is refused rather than navigated to, with a dev-only `console.warn`. This keeps a store schema from turning the CTA into a redirect off the storefront right after a real purchase. A store without a confirmation page in its route map also stays on the payment page.
|
|
128
|
+
- **Focus moves on a refused click only, never for a result the gateway returned.** When a click is refused because the cardholder document is missing or malformed, or the custom billing address was never saved, `PlaceOrder` asks the payment root to move keyboard focus to that field or form. This applies to any result that did not reach the gateway (`reachedGateway: false`) whose first error carries one of those three codes, including a code a registered submission returned itself after the transaction opened. A refusal carrying any other code, and any result that reached the gateway (a decline included, whatever its code), moves nothing, and neither does a re-render or a remount. The reason stays in the existing outcome alert.
|
|
126
129
|
|
|
127
130
|
## Styling
|
|
128
131
|
|
|
@@ -130,6 +133,7 @@ Every message prop above is resolved by the `code` of the client-synthesized `Pa
|
|
|
130
133
|
|---|---|---|
|
|
131
134
|
| `PlaceOrder` (root `div`) | Layout wrapper stacking the button and the outcome region | `flex flex-col gap-[8px] items-start` |
|
|
132
135
|
| Button (`data-fs-place-order-button`) | The CTA itself — full-width pill, disabled/busy states | `inline-flex items-center justify-center w-full h-[44px] px-[20px] bg-[#C8102E] text-white rounded-[4px] text-[14px] font-bold uppercase cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed` |
|
|
136
|
+
| Placing (`data-fs-place-order-placing`) | The status region, present only while this CTA's own sequence runs and only when `placingMessage` is authored. Every payment leaf is `inert` for as long as it exists. | `text-[13px] text-[#666666]` |
|
|
133
137
|
| Error (`data-fs-place-order-error`) | Inline error line, `role="alert"` | `text-[13px] text-[#C0392B]` |
|
|
134
138
|
| Unconfirmed (`data-fs-place-order-unconfirmed`) | Inline notice that the order could not be confirmed yet, `role="status"` | `text-[13px] text-[#8A6D3B]` |
|
|
135
139
|
| Success (`data-fs-place-order-success`) | Inline success line, `role="status"` | `text-[13px] text-[#1E8E3E]` |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# ProductShelf
|
|
2
2
|
|
|
3
3
|
**Category:** commerce
|
|
4
|
-
**Purpose:** A data-owning product shelf. `ProductShelfRoot` owns a facet-filtered `products(filter:)` query from the catalog module, receives its slice as `$data`, and publishes each product through a per-item context. `ProductShelfItems` repeats those products into a `Carousel` track, one card per slide. The card parts (`ProductCard*`) read each product from context — the shelf holds the data and config, the carousel arranges the rows, the cards render one product each.
|
|
4
|
+
**Purpose:** A data-owning product shelf. `ProductShelfRoot` owns a facet-filtered `products(first:, orderBy:, filter:)` query from the catalog module whose arguments bind to this element's configuration (the merchant's CMS entry, else the props), receives its slice as `$data`, and publishes each product through a per-item context. `ProductShelfItems` repeats those products into a `Carousel` track, one card per slide. The card parts (`ProductCard*`) read each product from context — the shelf holds the data and config, the carousel arranges the rows, the cards render one product each.
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -18,7 +18,7 @@ A ProductShelf block contains any combination of:
|
|
|
18
18
|
|
|
19
19
|
If the image shows **any of the above**, use `ProductShelfRoot` composed with `CarouselRoot` and `ProductShelfItems`. When a section heading is visible, compose `ProductShelfHeading` inside `ProductShelfRoot` (above `CarouselRoot`) with the title as its `children` (like any `Text`). Pick only the card parts (`ProductCardImage`, `ProductCardName`, `ProductCardPrice`, `ProductCardListPrice`, `ProductCardDiscount`, …) that match what's visible in each card.
|
|
20
20
|
|
|
21
|
-
The image is the source of truth for the heading text, `first`/`itemsPerPage`, and which card parts to include. The **source of the shelf's products** (`categoryId` / `brandId` / `collectionId` / `searchTerm`
|
|
21
|
+
The image is the source of truth for the heading text, `first`/`itemsPerPage`, and which card parts to include. The **source of the shelf's products** (`categoryId` / `brandId` / `collectionId` / `searchTerm`) is a merchant configuration decision and cannot be read off the screenshot — leave those unset when the image gives no signal, and let the shelf fall back to catalog-wide relevance.
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
@@ -36,8 +36,9 @@ The image is the source of truth for the heading text, `first`/`itemsPerPage`, a
|
|
|
36
36
|
|
|
37
37
|
## Behavior model
|
|
38
38
|
|
|
39
|
-
- **The shelf owns the data.** `ProductShelfRoot` declares a `fragment ProductShelfData on Query` selecting `products(first: $first, orderBy: $orderBy, filter: $
|
|
40
|
-
- **
|
|
39
|
+
- **The shelf owns the data.** `ProductShelfRoot` declares a `fragment ProductShelfData on Query` selecting `products(first: $first, orderBy: $orderBy, filter: { categoryIds: $categoryId, brandIds: $brandId, collectionId: $collectionId, searchTerm: $searchTerm, availableOnly: $availableOnly })` and receives the resolved slice as `$data`. `fetchStrategy: 'lazy'` defers the load (below-the-fold), and a skeleton shows while pending.
|
|
40
|
+
- **The element's configuration feeds the query.** Every variable binds to this element: the compiler reads the field of the same name from the element's content slice (the `product-shelf` content model, in a store with a `cms` binding) and otherwise from the element's prop, then instances the fragment once per shelf on the page, so two shelves with different `first` or `sort` become two aliased `products` fields in one page query. `sort` reaches `$orderBy` (`ProductSortingInput`) through the `values` table in the definition's `variables` block, which equals `PRODUCT_SHELF_SORT_MAP`. A facet left empty is not sent, so the filter relaxes instead of sending `null`; `first` is honored by the API, never sliced on the client.
|
|
41
|
+
- **Props beside content.** Each content field is also a schema prop of the same name. The CMS value wins per field; the prop is the developer default and the only source in a store with no `cms` binding (Vivara, Storybook, tests). No field is `required`, so an unfilled entry never omits the shelf. `useProductShelf()` exposes the resolved `config` (`$content?.field ?? field`), `itemsPerPage` and `count`.
|
|
41
42
|
- **Two context boundaries.** The shelf owns product data + config; each row owns one item. Card parts read the item through a guarded hook and never take list-shaped props.
|
|
42
43
|
- **Presence is state-driven.** Empty result → the shelf renders nothing (no empty carousel). Unresolved lazy source → skeleton.
|
|
43
44
|
- **The carousel is composed, not baked.** Place `CarouselRoot` with `ProductShelfItems` inside it, plus `CarouselPrevious` / `CarouselNext` / `CarouselBullets` where you want them. `ProductShelfItems` renders the `CarouselTrack`, so the carousel counts one slide per product.
|
|
@@ -51,17 +52,23 @@ The image is the source of truth for the heading text, `first`/`itemsPerPage`, a
|
|
|
51
52
|
|
|
52
53
|
| Prop | Type | Default | Notes |
|
|
53
54
|
|------|------|---------|-------|
|
|
54
|
-
| `first` | number | `5` | Max products fetched (legacy `numberOfItems`) → `$first` |
|
|
55
55
|
| `itemsPerPage` | number | `5` | Cards per page; bind to `CarouselRoot`'s `itemsPerPage` |
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
56
|
+
| `usePriceWithTaxes` | boolean | `false` | Card prices render tax-inclusive |
|
|
57
|
+
| `taxesLabel` | string | `'Tax included'` | Text for the tax label part |
|
|
58
|
+
| `first` | number | `5` | Content field. Products fetched (legacy `numberOfItems`) → `$first` |
|
|
59
|
+
| `sort` | `relevance \| price_asc \| price_desc \| name_asc \| name_desc \| release \| orders \| discount` | `relevance` | Content field → `$orderBy` through the `values` table |
|
|
60
|
+
| `searchTerm` | string | — | Content field → `filter.searchTerm` |
|
|
61
|
+
| `categoryId` | string | — | Content field → `filter.categoryIds` |
|
|
62
|
+
| `brandId` | string | — | Content field → `filter.brandIds` |
|
|
63
|
+
| `collectionId` | string | — | Content field → `filter.collectionId` (legacy `productClusterIds`) |
|
|
64
|
+
| `availableOnly` | boolean | `false` | Content field → `filter.availableOnly` (global "hide out-of-stock") |
|
|
65
|
+
| `$content` | slice | — | Compiler-injected `product-shelf` entry; each field wins over the prop of the same name |
|
|
63
66
|
| `$data` | slice | — | Compiler-injected fragment result |
|
|
64
|
-
| `products` | `ProductShelfItem[]` | — | Pre-shaped items (stories/tests; bypasses `$data`) |
|
|
67
|
+
| `products` | `ProductShelfItem[]` | — | Pre-shaped items (stories/tests; bypasses `$data`). Rendered as given: `first` does not limit them |
|
|
68
|
+
|
|
69
|
+
### Content model `product-shelf`
|
|
70
|
+
|
|
71
|
+
`ProductShelfContent` declares the merchant-facing fields: `first` (number, minimum 1), `sort` (the eight members above), `categoryId`, `brandId`, `collectionId`, `searchTerm` (string) and `availableOnly` (boolean). None is required. In a store with a `cms` binding the merchant fills them in the Content Platform entry keyed by the element id, and the shelf re-queries on the next request with no deploy; an empty field falls to the prop, and an empty facet relaxes the filter.
|
|
65
72
|
|
|
66
73
|
### ProductShelfItems
|
|
67
74
|
|
package/dist/docs/saved-cards.md
CHANGED
|
@@ -82,7 +82,7 @@ No props beyond standard container attributes (`className`, `children`). Must be
|
|
|
82
82
|
|
|
83
83
|
### SavedCardCvvField
|
|
84
84
|
|
|
85
|
-
The CVV re-entry field for its row. Renders nothing until that specific row is selected and the card requires a CVV; then renders a numeric input (digits only, capped at 4 characters) whose digits render **obscured** (dots) via an inline `-webkit-text-security: disc` style once the code is fully typed, with a helper line underneath it (`securityCodeDescription`, defaulting to "The 3-4 digit number on your card"; an empty string renders nothing). Wires the direct-to-gateway payment submission for the saved-card path the moment it is composed — the CVV is never sent to the storefront's own backend. A blank or under-three-digit code refuses before the place-order sequence opens a transaction, moving focus back to this input; the message reaches the shopper through the place-order CTA's own alert, not an inline field error here.
|
|
85
|
+
The CVV re-entry field for its row. Renders nothing until that specific row is selected and the card requires a CVV; then renders a numeric input (digits only, capped at 4 characters) whose digits render **obscured** (dots) via an inline `-webkit-text-security: disc` style once the code is fully typed, with a helper line underneath it (`securityCodeDescription`, defaulting to "The 3-4 digit number on your card"; an empty string renders nothing). Wires the direct-to-gateway payment submission for the saved-card path the moment it is composed — the CVV is never sent to the storefront's own backend. A blank or under-three-digit code refuses before the place-order sequence opens a transaction, moving focus back to this input; the message reaches the shopper through the place-order CTA's own alert, not an inline field error here. The typed code is cleared when the submission settles, by any route except that format refusal (which keeps it for the shopper to fix).
|
|
86
86
|
|
|
87
87
|
The mask engages on the third digit and stays on for a fourth. Three, because a saved card carries no per-network security-code length — the row's data has a display network name, not a `cvvMask` — so there is no signal here that tells a 3-digit network apart from Amex's 4, and the field's own accept-either floor is the only length available. Masking at the floor never leaves a complete code legible on either kind of card; a 4-digit code is simply already masked when its last digit arrives. Below three digits the code renders in the clear, so a shopper can read back what they just typed, and backspacing below three reveals what is left. Same rule and same shared predicate as `CardEntry`'s CVV field, which resolves its length from the detected method instead.
|
|
88
88
|
|
|
@@ -162,7 +162,7 @@ Style `SavedCards` as a vertical stack of rows, each row as a horizontal line (r
|
|
|
162
162
|
| `SavedCardOption` | One row — indicator, network, last four, label in a line; muted/dashed when expired | `flex items-center gap-[8px] p-[12px] border border-[#E0E0E0] rounded-[8px] data-[fs-saved-card-option-expired]:opacity-50 data-[fs-saved-card-option-selected]:border-[#000000]` |
|
|
163
163
|
| `SavedCardCvvField` | The short CVV input | `w-[64px] text-[14px] px-[8px] py-[6px] border border-[#CCCCCC] rounded-[4px]` |
|
|
164
164
|
| CVV helper text (`data-fs-saved-card-cvv-description`) | Small muted line next to/under the CVV input | `text-[12px] text-[#666666]` |
|
|
165
|
-
| Placing (`data-fs-saved-cards-placing`) | Present on `SavedCards`' own root while an order-placement sequence is in flight (T28); the whole list — including every `SavedCardOption` row and its `SavedCardCvvField` — is `inert` and `aria-disabled` at that point, transitively, with no attribute of their own | `opacity-60 cursor-not-allowed` |
|
|
165
|
+
| Placing (`data-fs-saved-cards-placing`) | Present on `SavedCards`' own root while an order-placement sequence is in flight (T28), and while the order attempt is resume-only (its card may already have been sent, so the fields do not accept input) until the attempt is freed; the whole list — including every `SavedCardOption` row and its `SavedCardCvvField` — is `inert` and `aria-disabled` at that point, transitively, with no attribute of their own | `opacity-60 cursor-not-allowed` |
|
|
166
166
|
|
|
167
167
|
Styled example:
|
|
168
168
|
|
package/dist/docs/select.md
CHANGED
|
@@ -197,21 +197,34 @@ Positions the popup relative to the trigger.
|
|
|
197
197
|
| Prop | Type | Default | Notes |
|
|
198
198
|
|------|------|---------|-------|
|
|
199
199
|
| `side` | `'top' \| 'bottom' \| 'left' \| 'right'` | `'bottom'` | |
|
|
200
|
-
| `align` | `'start' \| 'center' \| 'end'` | `'
|
|
200
|
+
| `align` | `'start' \| 'center' \| 'end'` | `'start'` | Starts the popup at the trigger's start edge, so a popup wider than the trigger overhangs only the far side. |
|
|
201
201
|
| `sideOffset` | number | `0` | |
|
|
202
|
-
| `alignItemWithTrigger` | boolean | `
|
|
202
|
+
| `alignItemWithTrigger` | boolean | `false` | `true` makes the popup cover the trigger so the selected item sits on it. |
|
|
203
|
+
|
|
204
|
+
By default the popup opens below the trigger and leaves the trigger and its label readable. When there is no room
|
|
205
|
+
below, Base UI falls back to the top of the trigger by itself. The positioner exposes `--anchor-width`, so a popup can
|
|
206
|
+
match the trigger's width with `min-width: var(--anchor-width)`.
|
|
203
207
|
|
|
204
208
|
### SelectPopup
|
|
205
209
|
|
|
206
210
|
Visible container for the list. Style background, border, shadow here.
|
|
207
211
|
|
|
212
|
+
The base stylesheet bounds it to the viewport: `max-height: var(--available-height)` (Base UI publishes
|
|
213
|
+
`--available-height` on the positioner) and a column flex layout, so the list takes the leftover height; Tailwind's
|
|
214
|
+
preflight already makes the popup `border-box`, so its border counts inside the bound. The bound lives in the
|
|
215
|
+
stylesheet, not inline, so a utility such as `max-h-60` overrides it. `overflow-hidden` on the popup is harmless and
|
|
216
|
+
worth keeping: the list is the scroll container, so the popup only clips what pokes past its rounded corners (a
|
|
217
|
+
highlighted row's background).
|
|
218
|
+
|
|
208
219
|
### SelectArrow
|
|
209
220
|
|
|
210
221
|
Pointing arrow attached to the popup. Optional — omit when the design has no anchor arrow.
|
|
211
222
|
|
|
212
223
|
### SelectList
|
|
213
224
|
|
|
214
|
-
Scrollable container for `SelectItem`s (and, when grouped, `SelectGroup`s).
|
|
225
|
+
Scrollable container for `SelectItem`s (and, when grouped, `SelectGroup`s). It is the scroll container: the base
|
|
226
|
+
stylesheet gives it `min-height: 0` and `overflow-y: auto`, so it scrolls inside the popup's bound. A utility such as
|
|
227
|
+
`overflow-visible` overrides it.
|
|
215
228
|
|
|
216
229
|
### SelectItem
|
|
217
230
|
|
|
@@ -419,7 +432,7 @@ do.
|
|
|
419
432
|
| `SelectValue` | The chosen label / placeholder text | `flex-1 text-left` (target `data-placeholder:text-gray-400` for the empty state) |
|
|
420
433
|
| `SelectIcon` | The trailing glyph | `text-gray-400` |
|
|
421
434
|
| `SelectPopup` | The floating panel | `bg-white border border-gray-200 rounded-md shadow-lg overflow-hidden` |
|
|
422
|
-
| `SelectList` | The
|
|
435
|
+
| `SelectList` | The list (scrolls on its own) | `py-1 max-h-60` |
|
|
423
436
|
| `SelectItem` | One option row | `flex items-center gap-2 px-3 py-2 text-sm cursor-default hover:bg-blue-50 data-highlighted:bg-blue-50 data-selected:text-blue-600` |
|
|
424
437
|
| `SelectGroupLabel` | A group heading inside the list | `px-3 py-1 text-xs font-semibold text-gray-500 uppercase tracking-wide` |
|
|
425
438
|
| `SelectSeparator` | The divider between groups | `my-1 border-t border-gray-100` |
|
|
@@ -429,7 +442,7 @@ The four `FieldSelect.*` parts render alongside their generic counterpart's own
|
|
|
429
442
|
class names above; the bound `data-fs-field-select-*` attributes exist for a brand that specifically
|
|
430
443
|
needs to target *the bound select* without touching every generic select in the app.
|
|
431
444
|
|
|
432
|
-
Styled bound example (the `BoundRecomposed` story):
|
|
445
|
+
Styled bound example (the `FieldSelect.Root` of the `BoundRecomposed` story, verbatim):
|
|
433
446
|
|
|
434
447
|
```tsx
|
|
435
448
|
<FieldSelect.Root>
|
|
@@ -440,7 +453,7 @@ Styled bound example (the `BoundRecomposed` story):
|
|
|
440
453
|
<SelectPortal>
|
|
441
454
|
<SelectPositioner>
|
|
442
455
|
<SelectPopup className="bg-white border border-gray-200 rounded-md shadow-lg overflow-hidden">
|
|
443
|
-
<SelectList className="py-1 max-h-60
|
|
456
|
+
<SelectList className="py-1 max-h-60">
|
|
444
457
|
<FieldSelect.Options className="flex items-center gap-2 px-3 py-2 text-sm cursor-default hover:bg-blue-50 data-highlighted:bg-blue-50 data-selected:text-blue-600">
|
|
445
458
|
<SelectItemIndicator className="w-4 text-blue-600">✓</SelectItemIndicator>
|
|
446
459
|
</FieldSelect.Options>
|
package/dist/docs/session.md
CHANGED
|
@@ -101,7 +101,7 @@ Shared layout with `SessionRoot` as the root, above both the header and the `Slo
|
|
|
101
101
|
"props": { "when": ["identified", "loggedIn"] },
|
|
102
102
|
"children": ["orders-link"]
|
|
103
103
|
},
|
|
104
|
-
"orders-link": { "type": "NavigationLink", "props": { "href": "
|
|
104
|
+
"orders-link": { "type": "NavigationLink", "props": { "href": { "standard": "orders" }, "children": "Meus pedidos" } },
|
|
105
105
|
"slot": { "type": "Slot", "props": {}, "children": [] }
|
|
106
106
|
}
|
|
107
107
|
}
|
|
@@ -93,7 +93,7 @@ Registers under the `shippingAddress` namespace with an ancestor `FormRoot`; ren
|
|
|
93
93
|
- Compose `FormSubmit` and `FormError` as siblings, not children — the fieldset renders no submit or error part.
|
|
94
94
|
- Only one `ShippingAddressFieldset` per `FormRoot`; a second one under the same `shippingAddress` namespace throws at mount.
|
|
95
95
|
|
|
96
|
-
**Overriding a control's text:** every field Control also takes optional `label` and `placeholder` props. Absence means the platform's value — the active country descriptor's label where one exists (e.g. "cidade" for `CityControl`), the
|
|
96
|
+
**Overriding a control's text:** every field Control also takes optional `label` and `placeholder` props. Absence means the platform's value — the active country descriptor's label where one exists (e.g. "cidade" for `CityControl`), and for `CountryControl` the descriptor's `countryLabel` ("país" for Brazil, "country" for the United States). The required message follows the same rule: `<label> <requiredSuffix>` with the descriptor's suffix ("é obrigatório", "is required"), so an authored `label` renames the field in its message too. Neither has a schema default, so an author only sets one when the platform copy is wrong for their store.
|
|
97
97
|
|
|
98
98
|
**Recomposing a control's anatomy:** every field Control declares `providesContext: 'field'` (RFC:503), so a `Field.*` part composed inside one is not a context-constraint-violation. Given children, a field Control renders them in place of its default `Field.Label` / `Field.Control` / `Field.Error` (or, for `CountryControl`, `Field.Label` / `FieldSelect.Root` / `Field.Error`) — useful to reorder the label against the input or insert an icon. The binding underneath is unchanged either way.
|
|
99
99
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# SignInRedirect
|
|
2
2
|
|
|
3
3
|
**Category:** identity
|
|
4
|
-
**Purpose:** The whole of the
|
|
4
|
+
**Purpose:** The whole of the sign-in page — hands the document over to the account's platform login, carrying the shopper's way back.
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -13,7 +13,7 @@ The image is the source of truth for layout, and this component is not in any la
|
|
|
13
13
|
|
|
14
14
|
## When to use
|
|
15
15
|
|
|
16
|
-
- On the
|
|
16
|
+
- On the sign-in page (`{ standard: 'sign-in' }`), as its only element, when the store's account lives on the VTEX platform's login rather than on the storefront.
|
|
17
17
|
|
|
18
18
|
## When NOT to use
|
|
19
19
|
|
|
@@ -32,7 +32,7 @@ The image is the source of truth for layout, and this component is not in any la
|
|
|
32
32
|
SignInRedirect
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
It requires no `SessionRoot` and declares no context: it reads nothing of the shopper's.
|
|
35
|
+
It requires no `SessionRoot` and declares no context: it reads nothing of the shopper's. The sign-in page deliberately sits outside the account layout, so a shopper who is already signed in still makes the hop.
|
|
36
36
|
|
|
37
37
|
## Components
|
|
38
38
|
|
|
@@ -40,7 +40,7 @@ It requires no `SessionRoot` and declares no context: it reads nothing of the sh
|
|
|
40
40
|
|
|
41
41
|
| Prop | Type | Default | Notes |
|
|
42
42
|
|------|------|---------|-------|
|
|
43
|
-
| `platformLoginUrl` | string | — | The account's platform login. An absolute URL (`https://account.example.net/api/io/login`) or a site-relative path (`/api/io/login`). The storefront's own
|
|
43
|
+
| `platformLoginUrl` | string | — | The account's platform login. An absolute URL (`https://account.example.net/api/io/login`) or a site-relative path (`/api/io/login`). The storefront's own sign-in page is refused, whichever way it is spelled. Required in practice: with no usable value the component renders nothing. |
|
|
44
44
|
| `loadingLabel` | string | — | Text shown while the handover is pending. Absent renders the element with no text. |
|
|
45
45
|
|
|
46
46
|
### SignInRedirectLoading
|
|
@@ -57,7 +57,7 @@ Content model (`sign-in-redirect`) fields, edited in the CMS:
|
|
|
57
57
|
|
|
58
58
|
**Only the return parameter crosses.** The component reads exactly one parameter from the incoming URL, `returnUrl`, and composes the destination from the authored address. Every other parameter on the incoming URL is dropped rather than forwarded into an auth URL; every parameter already on the authored address survives, because the destination is built from it.
|
|
59
59
|
|
|
60
|
-
**The return is revalidated on arrival, not trusted.** `/
|
|
60
|
+
**The return is revalidated on arrival, not trusted.** `returnUrl` is a logical path, without the binding's base path, and this component prefixes it before the handover, so a shopper on `/pt-BR` returns to `/pt-BR/pvt/profile`. The sign-in page is reachable by a hand-crafted link, so the value is treated as shopper-supplied whoever produced it. A return that leaves the site, is protocol-relative, or points back at the sign-in page itself is dropped — never rewritten into a working one — and a bounded warning names the reason. Refusing a self-referential return is what keeps a shopper who just authenticated from being handed to the platform a second time.
|
|
61
61
|
|
|
62
62
|
**The return's form follows the address's origin.** A path alone cannot say which origin it belongs to, and the store author is the one who decides whether the receiver shares the storefront's. A same-origin address gets the site-relative path exactly as it arrived; a cross-origin one would resolve that path against its own domain, so the value is absolutized first — always against the storefront's origin, never the address's.
|
|
63
63
|
|
|
@@ -92,7 +92,7 @@ Bound to a CMS entry, the element authors no `loadingLabel` at all — the entry
|
|
|
92
92
|
- **Expecting it to skip the hop for a signed-in shopper.** It reads no session by design, so every visitor is handed over.
|
|
93
93
|
- **Authoring `$content` in the schema.** `$content` is compiler-injected from the page's content entry; naming it in `props` fails the build.
|
|
94
94
|
- **Authoring `returnUrl` on `platformLoginUrl`.** The shopper's return overwrites it; author the address's other parameters instead.
|
|
95
|
-
- **Pointing `platformLoginUrl` at the storefront's own
|
|
95
|
+
- **Pointing `platformLoginUrl` at the storefront's own sign-in page.** That is this page handed to itself, which would reload the page forever; the address is refused instead. Another host's `/login` is the platform's page and is fine.
|
|
96
96
|
- **Selecting it from a screenshot.** It has no visual identity — a sign-in screen in an image is the platform's page, not this one.
|
|
97
97
|
|
|
98
98
|
---
|
package/dist/docs/toast.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
## Composition
|
|
23
23
|
|
|
24
|
-
`Toast` is not authored as a
|
|
24
|
+
`Toast` is not authored as a per-toast PageSchema tree. Only the **stack scaffolding** is mounted once, near the layout root, and a `ToastViewport` with no children renders every toast itself:
|
|
25
25
|
|
|
26
26
|
```
|
|
27
27
|
ToastProvider
|
|
@@ -29,7 +29,7 @@ ToastProvider
|
|
|
29
29
|
└── ToastViewport
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
A `ToastViewport` with no children renders one default toast per entry of `useToast().toasts` (see below), so a page schema never lists a toast. To control the markup, pass children: map over `useToast().toasts` and render a `ToastRoot` for each. A typical per-toast render tree (authored in application code, not in a schema):
|
|
33
33
|
|
|
34
34
|
```
|
|
35
35
|
ToastRoot ← one per queued toast, keyed by toast.id
|
|
@@ -61,7 +61,11 @@ Renders `ToastViewport` into `document.body`. No props, context-only.
|
|
|
61
61
|
|
|
62
62
|
The fixed-position stack container. Renders a `<div>` — style it directly.
|
|
63
63
|
|
|
64
|
-
No
|
|
64
|
+
- **No children:** renders one default toast per active toast, in queue order: `ToastRoot` > `ToastTitle` + `ToastDescription` + `ToastAction` + `ToastClose`. Each part renders nothing when the toast has no matching text or `actionProps`, so a reversible toast shows its action between the text and the close button. The close button is named from the message catalog (`fs/toast.dismiss`); its `×` glyph is hidden from assistive technology. The default toast has no status icon and adds no `data-fs-*` hook beyond the existing ones.
|
|
65
|
+
- **With children:** renders exactly those children and no default toast. `null`, `false` and `undefined` count as no children.
|
|
66
|
+
- **Region name:** every viewport gets `aria-label` from the message catalog (`fs/toast.region`, "Notifications") unless you pass your own `aria-label`.
|
|
67
|
+
|
|
68
|
+
No props beyond standard `className`/HTML attributes. It reads the message catalog, so it needs an intl provider ancestor (a generated app's root layout provides one).
|
|
65
69
|
|
|
66
70
|
### ToastRoot
|
|
67
71
|
|
package/dist/index.d.ts
CHANGED
|
@@ -2,14 +2,17 @@ import { ActionSelector } from "./core/dist/actions/registry.js";
|
|
|
2
2
|
import { MockActions, mockAction } from "./core/dist/actions/mock-action.js";
|
|
3
3
|
import { JsonValue, StorefrontContext } from "./core/dist/schema/generated/schema.js";
|
|
4
4
|
import { ContentArraySchema, ContentNestedObjectShape, ContentObjectPropertySchema, ContentObjectSchema, ContentPropertySchema, ContentPropertyType, ContentScalarSchema, ContentScalarType, ContentTypeDefinition, ContentValue, defineContentType } from "./core/dist/define-content-type.js";
|
|
5
|
-
import { ComponentDefinition, EditorMetadata, FetchStrategy, PropSchema, PropSchemaField, PropType, defineComponent } from "./core/dist/define-component.js";
|
|
5
|
+
import { ComponentDefinition, EditorMetadata, FetchStrategy, PropSchema, PropSchemaField, PropType, VariableBinding, VariableBindings, defineComponent } from "./core/dist/define-component.js";
|
|
6
6
|
import "./core/dist/index.js";
|
|
7
|
+
import { PageRef, ResolveHrefReason, ResolveHrefResult, RouteIdentity, RouteKind, RouteMap, RouteMapEntry, StandardName } from "./sdk/navigation/types.js";
|
|
7
8
|
import { CartUserError } from "./sdk/cart/operations.js";
|
|
8
9
|
import { AddItemPayload, CartActions, CartCouponPayload, CartLinePayload, CartLinesPayload, CartQuantityPayload } from "./sdk/cart/use-cart-actions.js";
|
|
9
10
|
import { ClientPreferenceKey, ClientProfileUserError, CustomerProfileUserError } from "./sdk/identity/operations.js";
|
|
10
11
|
import { ClientPreferencesUpdatePayload, ClientProfileUpdatePayload, CustomerProfileUpdatePayload, IdentityActions } from "./sdk/identity/use-identity-actions.js";
|
|
12
|
+
import { OrderCancelOrder, OrderCancelUserError } from "./sdk/orders/order-operations.js";
|
|
13
|
+
import { OrderActions, OrderCancelInput, OrderCancelResult } from "./sdk/orders/use-order-actions.js";
|
|
11
14
|
import { PaymentBillingAddressUpdateInput, PaymentMethodSelectInput, PaymentMoney, PaymentUserError } from "./sdk/payment/operations.js";
|
|
12
|
-
import { PaymentGatewayCard, PaymentGatewayNewCard, PaymentGatewaySavedCard, PaymentGatewayTransaction, SendPaymentsRequest } from "./sdk/payment/gateway.js";
|
|
15
|
+
import { PaymentGatewayCard, PaymentGatewayNewCard, PaymentGatewayResult, PaymentGatewaySavedCard, PaymentGatewayTransaction, SendPaymentsRequest } from "./sdk/payment/gateway.js";
|
|
13
16
|
import { PaymentActions, PaymentGatewayCallbackResult, PaymentStartTransactionResult } from "./sdk/payment/use-payment-actions.js";
|
|
14
17
|
import { RegionUserError } from "./sdk/region/region-operations.js";
|
|
15
18
|
import { RegionActions } from "./sdk/region/use-region-actions.js";
|
|
@@ -19,4 +22,5 @@ import { ShippingOptionSelectUserError } from "./sdk/shipping/option-select-oper
|
|
|
19
22
|
import { ShippingAddressInput, ShippingAddressUpdateErrorEntity } from "./sdk/shipping/shipping-operations.js";
|
|
20
23
|
import { ShippingActions } from "./sdk/shipping/use-shipping-actions.js";
|
|
21
24
|
import { ComponentActions } from "./sdk/actions/types.js";
|
|
22
|
-
|
|
25
|
+
import { resolveStorefrontHref } from "./sdk/navigation/resolve-storefront-href.js";
|
|
26
|
+
export { type ActionSelector, type AddItemPayload, type CartActions, type CartCouponPayload, type CartLinePayload, type CartLinesPayload, type CartQuantityPayload, type CartUserError, type ClientPreferenceKey, type ClientPreferencesUpdatePayload, type ClientProfileUpdatePayload, type ClientProfileUserError, type ComponentActions, type ComponentDefinition, type ContentArraySchema, type ContentNestedObjectShape, type ContentObjectPropertySchema, type ContentObjectSchema, type ContentPropertySchema, type ContentPropertyType, type ContentScalarSchema, type ContentScalarType, type ContentTypeDefinition, type ContentValue, type CustomerProfileUpdatePayload, type CustomerProfileUserError, type EditorMetadata, type FetchStrategy, type IdentityActions, type JsonValue, type MockActions, type OrderActions, type OrderCancelInput, type OrderCancelOrder, type OrderCancelResult, type OrderCancelUserError, type PageRef, type PaymentActions, type PaymentBillingAddressUpdateInput, type PaymentGatewayCallbackResult, type PaymentGatewayCard, type PaymentGatewayNewCard, type PaymentGatewayResult, type PaymentGatewaySavedCard, type PaymentGatewayTransaction, type PaymentMethodSelectInput, type PaymentMoney, type PaymentStartTransactionResult, type PaymentUserError, type PropSchema, type PropSchemaField, type PropType, type RegionActions, type RegionUserError, type ResolveHrefReason, type ResolveHrefResult, type RouteIdentity, type RouteKind, type RouteMap, type RouteMapEntry, type SendPaymentsRequest, type SessionAccessCodeRequestResult, type SessionActions, type SessionPasswordLoginPayload, type SessionRequestAccessCodePayload, type SessionUserError, type SessionValidateAccessCodePayload, type ShippingActions, type ShippingAddressInput, type ShippingAddressUpdateErrorEntity, type ShippingOptionSelectUserError, type StandardName, type StorefrontContext, type VariableBinding, type VariableBindings, defineComponent, defineContentType, mockAction, resolveStorefrontHref };
|
package/dist/index.js
CHANGED
|
@@ -2,4 +2,5 @@ import { mockAction } from "./core/dist/actions/mock-action.js";
|
|
|
2
2
|
import { defineComponent } from "./core/dist/define-component.js";
|
|
3
3
|
import { defineContentType } from "./core/dist/define-content-type.js";
|
|
4
4
|
import "./core/dist/index.js";
|
|
5
|
-
|
|
5
|
+
import { resolveStorefrontHref } from "./sdk/navigation/resolve-storefront-href.js";
|
|
6
|
+
export { defineComponent, defineContentType, mockAction, resolveStorefrontHref };
|