@vtex/faststore 0.0.8 → 0.0.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/CHANGELOG.md +59 -0
- package/dist/actions.json +42 -0
- package/dist/catalog.json +731 -16
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/components.d.ts +9 -4
- package/dist/components.js +11 -6
- package/dist/content-types.json +300 -0
- package/dist/core/dist/define-component.d.ts +6 -1
- package/dist/docs/account-entry-point.md +4 -4
- package/dist/docs/account-menu.md +2 -2
- package/dist/docs/account-saved-cards.md +301 -0
- package/dist/docs/binding-switcher.md +154 -0
- package/dist/docs/card-entry.md +3 -3
- package/dist/docs/card-summary.md +175 -0
- package/dist/docs/cart-destination.md +238 -0
- package/dist/docs/cart-item.md +21 -3
- package/dist/docs/cart-totalizer.md +1 -1
- package/dist/docs/cart.md +118 -11
- package/dist/docs/footer-social.md +1 -1
- package/dist/docs/free-shipping-progress.md +13 -9
- package/dist/docs/incentives.md +2 -2
- package/dist/docs/logo.md +1 -1
- package/dist/docs/payment-method-badges.md +2 -2
- package/dist/docs/payment-methods.md +1 -1
- package/dist/docs/product-information.md +2 -2
- package/dist/docs/product-shelf.md +7 -0
- package/dist/docs/select.md +3 -4
- package/dist/docs/sign-in-redirect.md +1 -1
- package/dist/docs/toast.md +30 -12
- package/dist/index.d.ts +2 -1
- package/dist/internal/client.d.ts +4 -1
- package/dist/internal/client.js +4 -1
- package/dist/internal/server.d.ts +4 -2
- package/dist/internal/server.js +4 -2
- package/dist/matter/account-saved-cards/account-saved-cards.d.ts +383 -0
- package/dist/matter/account-saved-cards/account-saved-cards.js +956 -0
- package/dist/matter/account-saved-cards/account-saved-cards.js.map +1 -0
- package/dist/matter/billing-address/billing-address.js.map +1 -1
- package/dist/matter/cart/cart-namespace.d.ts +5 -1
- package/dist/matter/cart/cart-namespace.js +5 -1
- package/dist/matter/cart/cart-namespace.js.map +1 -1
- package/dist/matter/cart/cart.d.ts +34 -4
- package/dist/matter/cart/cart.js +238 -28
- package/dist/matter/cart/cart.js.map +1 -1
- package/dist/matter/cart-destination/cart-destination.d.ts +222 -0
- package/dist/matter/cart-destination/cart-destination.js +613 -0
- package/dist/matter/cart-destination/cart-destination.js.map +1 -0
- package/dist/matter/cart-item/cart-item.d.ts +4 -2
- package/dist/matter/cart-item/cart-item.js +75 -16
- package/dist/matter/cart-item/cart-item.js.map +1 -1
- package/dist/matter/cart-totalizer/cart-totalizer.js +3 -2
- package/dist/matter/cart-totalizer/cart-totalizer.js.map +1 -1
- package/dist/matter/free-shipping-progress/free-shipping-progress.d.ts +6 -3
- package/dist/matter/free-shipping-progress/free-shipping-progress.js +76 -33
- package/dist/matter/free-shipping-progress/free-shipping-progress.js.map +1 -1
- package/dist/matter/pricing/pricing.js.map +1 -1
- package/dist/matter/product-shelf/product-shelf.d.ts +7 -0
- package/dist/matter/product-shelf/product-shelf.js +115 -1
- package/dist/matter/product-shelf/product-shelf.js.map +1 -1
- 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 +6 -2
- package/dist/matter/shipping-simulator/shipping-simulator.js.map +1 -1
- package/dist/particles/binding-switcher/binding-switcher.d.ts +38 -0
- package/dist/particles/binding-switcher/binding-switcher.js +183 -0
- package/dist/particles/binding-switcher/binding-switcher.js.map +1 -0
- package/dist/particles/card-summary/card-network.d.ts +17 -0
- package/dist/particles/card-summary/card-network.js +25 -0
- package/dist/particles/card-summary/card-network.js.map +1 -0
- package/dist/particles/card-summary/card-summary.d.ts +83 -0
- package/dist/particles/card-summary/card-summary.js +188 -0
- package/dist/particles/card-summary/card-summary.js.map +1 -0
- package/dist/particles/footer-social/footer-social.d.ts +1 -1
- package/dist/particles/footer-social/footer-social.js +1 -1
- package/dist/particles/footer-social/footer-social.js.map +1 -1
- package/dist/particles/incentives/incentives.d.ts +1 -1
- package/dist/particles/incentives/incentives.js +1 -1
- package/dist/particles/incentives/incentives.js.map +1 -1
- package/dist/particles/payment-methods/payment-methods.d.ts +1 -1
- package/dist/particles/payment-methods/payment-methods.js +1 -1
- package/dist/particles/payment-methods/payment-methods.js.map +1 -1
- package/dist/particles/toast/toast.d.ts +20 -6
- package/dist/particles/toast/toast.js +49 -7
- package/dist/particles/toast/toast.js.map +1 -1
- package/dist/schema.graphql +298 -34
- package/dist/sdk/actions/index.d.ts +3 -1
- package/dist/sdk/actions/index.js +3 -1
- package/dist/sdk/actions/locale-action-provider.d.ts +16 -0
- package/dist/sdk/actions/locale-action-provider.js +20 -0
- package/dist/sdk/actions/locale-action-provider.js.map +1 -0
- package/dist/sdk/actions/saved-card-action-provider.d.ts +12 -0
- package/dist/sdk/actions/saved-card-action-provider.js +16 -0
- package/dist/sdk/actions/saved-card-action-provider.js.map +1 -0
- package/dist/sdk/actions/types.d.ts +6 -2
- package/dist/sdk/cache/storefront-cache.js +2 -1
- package/dist/sdk/cache/storefront-cache.js.map +1 -1
- package/dist/sdk/cart/operations.d.ts +2 -1
- package/dist/sdk/cart/operations.js +55 -1
- package/dist/sdk/cart/operations.js.map +1 -1
- package/dist/sdk/cart/optimistic.d.ts +30 -7
- package/dist/sdk/cart/optimistic.js +78 -41
- package/dist/sdk/cart/optimistic.js.map +1 -1
- package/dist/sdk/cart/use-cart-actions.d.ts +7 -0
- package/dist/sdk/cart/use-cart-actions.js +61 -15
- package/dist/sdk/cart/use-cart-actions.js.map +1 -1
- package/dist/sdk/cart/use-cart-sync-sales-channel.js +70 -0
- package/dist/sdk/cart/use-cart-sync-sales-channel.js.map +1 -0
- package/dist/sdk/generated/gql.js +15 -11
- package/dist/sdk/generated/gql.js.map +1 -1
- package/dist/sdk/generated/graphql.d.ts +177 -46
- package/dist/sdk/generated/graphql.js +2314 -93
- package/dist/sdk/generated/graphql.js.map +1 -1
- package/dist/sdk/i18n/messages/en-US.js +19 -0
- package/dist/sdk/i18n/messages/en-US.json +19 -0
- package/dist/sdk/i18n/messages/en-US.json.d.ts +19 -0
- package/dist/sdk/i18n/messages/es-ES.js +19 -0
- package/dist/sdk/i18n/messages/es-ES.json +19 -0
- package/dist/sdk/i18n/messages/pt-BR.js +19 -0
- package/dist/sdk/i18n/messages/pt-BR.json +19 -0
- package/dist/sdk/i18n/provider.js +1 -1
- package/dist/sdk/i18n/provider.js.map +1 -1
- package/dist/sdk/locale/binding-switch-provider.d.ts +13 -0
- package/dist/sdk/locale/binding-switch-provider.js +20 -0
- package/dist/sdk/locale/binding-switch-provider.js.map +1 -0
- package/dist/sdk/locale/use-locale-actions.d.ts +16 -0
- package/dist/sdk/locale/use-locale-actions.js +70 -0
- package/dist/sdk/locale/use-locale-actions.js.map +1 -0
- package/dist/sdk/navigation/binding-switch.d.ts +39 -0
- package/dist/sdk/navigation/binding-switch.js +129 -0
- package/dist/sdk/navigation/binding-switch.js.map +1 -0
- package/dist/sdk/navigation/decode-route-params.d.ts +11 -0
- package/dist/sdk/navigation/decode-route-params.js +32 -0
- package/dist/sdk/navigation/decode-route-params.js.map +1 -0
- package/dist/sdk/saved-cards/operations.d.ts +16 -0
- package/dist/sdk/saved-cards/operations.js +41 -0
- package/dist/sdk/saved-cards/operations.js.map +1 -0
- package/dist/sdk/saved-cards/use-saved-card-actions.d.ts +26 -0
- package/dist/sdk/saved-cards/use-saved-card-actions.js +86 -0
- package/dist/sdk/saved-cards/use-saved-card-actions.js.map +1 -0
- package/dist/sdk/seo/page-alternates.d.ts +5 -3
- package/dist/sdk/seo/page-alternates.js +7 -12
- package/dist/sdk/seo/page-alternates.js.map +1 -1
- package/dist/sdk/shipping/shipping-operations.d.ts +1 -1
- package/dist/sdk/shipping/shipping-operations.js +13 -0
- package/dist/sdk/shipping/shipping-operations.js.map +1 -1
- package/dist/sdk/state/cart.d.ts +9 -2
- package/dist/sdk/state/cart.js +9 -2
- package/dist/sdk/state/cart.js.map +1 -1
- package/package.json +2 -2
- package/src/styles/tailwind.css +1 -2
package/dist/content-types.json
CHANGED
|
@@ -591,6 +591,227 @@
|
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
593
|
},
|
|
594
|
+
"account-saved-cards-heading": {
|
|
595
|
+
"id": "account-saved-cards-heading",
|
|
596
|
+
"title": "Account Saved Cards Heading",
|
|
597
|
+
"description": "Heading of the account's saved-cards section.",
|
|
598
|
+
"schema": {
|
|
599
|
+
"type": "object",
|
|
600
|
+
"additionalProperties": false,
|
|
601
|
+
"properties": {
|
|
602
|
+
"text": {
|
|
603
|
+
"type": "string",
|
|
604
|
+
"title": "Heading",
|
|
605
|
+
"minLength": 1
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
},
|
|
610
|
+
"account-saved-card-expiry": {
|
|
611
|
+
"id": "account-saved-card-expiry",
|
|
612
|
+
"title": "Account Saved Card Expiry",
|
|
613
|
+
"description": "A saved card's expiry line. The date follows the label and is never authored.",
|
|
614
|
+
"schema": {
|
|
615
|
+
"type": "object",
|
|
616
|
+
"additionalProperties": false,
|
|
617
|
+
"properties": {
|
|
618
|
+
"expiresLabel": {
|
|
619
|
+
"type": "string",
|
|
620
|
+
"title": "Label before a working card's date",
|
|
621
|
+
"minLength": 1
|
|
622
|
+
},
|
|
623
|
+
"expiredLabel": {
|
|
624
|
+
"type": "string",
|
|
625
|
+
"title": "Label before an expired card's date",
|
|
626
|
+
"minLength": 1
|
|
627
|
+
},
|
|
628
|
+
"expiredText": {
|
|
629
|
+
"type": "string",
|
|
630
|
+
"title": "Expired card with no date",
|
|
631
|
+
"minLength": 1
|
|
632
|
+
},
|
|
633
|
+
"unusableText": {
|
|
634
|
+
"type": "string",
|
|
635
|
+
"title": "Unusable card",
|
|
636
|
+
"minLength": 1
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
},
|
|
641
|
+
"account-saved-cards-empty": {
|
|
642
|
+
"id": "account-saved-cards-empty",
|
|
643
|
+
"title": "Account Saved Cards Empty",
|
|
644
|
+
"description": "Statement shown when the shopper has no saved cards.",
|
|
645
|
+
"schema": {
|
|
646
|
+
"type": "object",
|
|
647
|
+
"additionalProperties": false,
|
|
648
|
+
"properties": {
|
|
649
|
+
"text": {
|
|
650
|
+
"type": "string",
|
|
651
|
+
"title": "Empty statement",
|
|
652
|
+
"minLength": 1
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
},
|
|
657
|
+
"account-saved-cards-loading": {
|
|
658
|
+
"id": "account-saved-cards-loading",
|
|
659
|
+
"title": "Account Saved Cards Loading",
|
|
660
|
+
"description": "Announcement read to assistive technology while the saved cards load.",
|
|
661
|
+
"schema": {
|
|
662
|
+
"type": "object",
|
|
663
|
+
"additionalProperties": false,
|
|
664
|
+
"properties": {
|
|
665
|
+
"text": {
|
|
666
|
+
"type": "string",
|
|
667
|
+
"title": "Loading announcement",
|
|
668
|
+
"minLength": 1
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
"account-saved-cards-error": {
|
|
674
|
+
"id": "account-saved-cards-error",
|
|
675
|
+
"title": "Account Saved Cards Error",
|
|
676
|
+
"description": "Messages shown when the saved cards cannot be read.",
|
|
677
|
+
"schema": {
|
|
678
|
+
"type": "object",
|
|
679
|
+
"additionalProperties": false,
|
|
680
|
+
"properties": {
|
|
681
|
+
"text": {
|
|
682
|
+
"type": "string",
|
|
683
|
+
"title": "Load failure message",
|
|
684
|
+
"minLength": 1
|
|
685
|
+
},
|
|
686
|
+
"sessionExpiredText": {
|
|
687
|
+
"type": "string",
|
|
688
|
+
"title": "Session expired message",
|
|
689
|
+
"minLength": 1
|
|
690
|
+
},
|
|
691
|
+
"signInLabel": {
|
|
692
|
+
"type": "string",
|
|
693
|
+
"title": "Sign-in link label",
|
|
694
|
+
"minLength": 1
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
},
|
|
699
|
+
"account-saved-card-remove-trigger": {
|
|
700
|
+
"id": "account-saved-card-remove-trigger",
|
|
701
|
+
"title": "Account Saved Card Remove Trigger",
|
|
702
|
+
"description": "Label of the control that opens a saved card's removal prompt.",
|
|
703
|
+
"schema": {
|
|
704
|
+
"type": "object",
|
|
705
|
+
"additionalProperties": false,
|
|
706
|
+
"properties": {
|
|
707
|
+
"text": {
|
|
708
|
+
"type": "string",
|
|
709
|
+
"title": "Trigger label",
|
|
710
|
+
"minLength": 1
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
},
|
|
715
|
+
"account-saved-card-remove-title": {
|
|
716
|
+
"id": "account-saved-card-remove-title",
|
|
717
|
+
"title": "Account Saved Card Remove Title",
|
|
718
|
+
"description": "Question that titles the removal prompt.",
|
|
719
|
+
"schema": {
|
|
720
|
+
"type": "object",
|
|
721
|
+
"additionalProperties": false,
|
|
722
|
+
"properties": {
|
|
723
|
+
"text": {
|
|
724
|
+
"type": "string",
|
|
725
|
+
"title": "Prompt title",
|
|
726
|
+
"minLength": 1
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
},
|
|
731
|
+
"account-saved-card-remove-description": {
|
|
732
|
+
"id": "account-saved-card-remove-description",
|
|
733
|
+
"title": "Account Saved Card Remove Description",
|
|
734
|
+
"description": "What removing the card means, shown after the card in the removal prompt.",
|
|
735
|
+
"schema": {
|
|
736
|
+
"type": "object",
|
|
737
|
+
"additionalProperties": false,
|
|
738
|
+
"properties": {
|
|
739
|
+
"text": {
|
|
740
|
+
"type": "string",
|
|
741
|
+
"title": "Consequence",
|
|
742
|
+
"minLength": 1
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
},
|
|
747
|
+
"account-saved-card-remove-cancel": {
|
|
748
|
+
"id": "account-saved-card-remove-cancel",
|
|
749
|
+
"title": "Account Saved Card Remove Cancel",
|
|
750
|
+
"description": "Label of the control that keeps the card.",
|
|
751
|
+
"schema": {
|
|
752
|
+
"type": "object",
|
|
753
|
+
"additionalProperties": false,
|
|
754
|
+
"properties": {
|
|
755
|
+
"text": {
|
|
756
|
+
"type": "string",
|
|
757
|
+
"title": "Cancel label",
|
|
758
|
+
"minLength": 1
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
},
|
|
763
|
+
"account-saved-card-remove-confirm": {
|
|
764
|
+
"id": "account-saved-card-remove-confirm",
|
|
765
|
+
"title": "Account Saved Card Remove Confirm",
|
|
766
|
+
"description": "Label of the control that removes the card, and its label while the removal runs.",
|
|
767
|
+
"schema": {
|
|
768
|
+
"type": "object",
|
|
769
|
+
"additionalProperties": false,
|
|
770
|
+
"properties": {
|
|
771
|
+
"text": {
|
|
772
|
+
"type": "string",
|
|
773
|
+
"title": "Confirm label",
|
|
774
|
+
"minLength": 1
|
|
775
|
+
},
|
|
776
|
+
"pendingText": {
|
|
777
|
+
"type": "string",
|
|
778
|
+
"title": "Label while removing",
|
|
779
|
+
"minLength": 1
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
},
|
|
784
|
+
"account-saved-cards-remove-feedback": {
|
|
785
|
+
"id": "account-saved-cards-remove-feedback",
|
|
786
|
+
"title": "Account Saved Cards Remove Feedback",
|
|
787
|
+
"description": "Messages that tell the shopper how a card removal ended.",
|
|
788
|
+
"schema": {
|
|
789
|
+
"type": "object",
|
|
790
|
+
"additionalProperties": false,
|
|
791
|
+
"properties": {
|
|
792
|
+
"successText": {
|
|
793
|
+
"type": "string",
|
|
794
|
+
"title": "Card removed",
|
|
795
|
+
"minLength": 1
|
|
796
|
+
},
|
|
797
|
+
"failureText": {
|
|
798
|
+
"type": "string",
|
|
799
|
+
"title": "Card not removed",
|
|
800
|
+
"minLength": 1
|
|
801
|
+
},
|
|
802
|
+
"sessionExpiredText": {
|
|
803
|
+
"type": "string",
|
|
804
|
+
"title": "Session expired message",
|
|
805
|
+
"minLength": 1
|
|
806
|
+
},
|
|
807
|
+
"signInLabel": {
|
|
808
|
+
"type": "string",
|
|
809
|
+
"title": "Sign-in link label",
|
|
810
|
+
"minLength": 1
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
},
|
|
594
815
|
"buy-button-labels": {
|
|
595
816
|
"id": "buy-button-labels",
|
|
596
817
|
"title": "Buy Button Labels",
|
|
@@ -736,6 +957,85 @@
|
|
|
736
957
|
}
|
|
737
958
|
}
|
|
738
959
|
},
|
|
960
|
+
"cart-destination-value": {
|
|
961
|
+
"id": "cart-destination-value",
|
|
962
|
+
"title": "Cart Destination Value",
|
|
963
|
+
"description": "Copy that precedes the destination in read mode.",
|
|
964
|
+
"schema": {
|
|
965
|
+
"type": "object",
|
|
966
|
+
"additionalProperties": false,
|
|
967
|
+
"properties": {
|
|
968
|
+
"prefix": {
|
|
969
|
+
"type": "string",
|
|
970
|
+
"title": "Prefix"
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
},
|
|
975
|
+
"cart-destination-change": {
|
|
976
|
+
"id": "cart-destination-change",
|
|
977
|
+
"title": "Cart Destination Change",
|
|
978
|
+
"description": "Copy for the control that opens edit mode.",
|
|
979
|
+
"schema": {
|
|
980
|
+
"type": "object",
|
|
981
|
+
"additionalProperties": false,
|
|
982
|
+
"properties": {
|
|
983
|
+
"label": {
|
|
984
|
+
"type": "string",
|
|
985
|
+
"title": "Button label"
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
},
|
|
990
|
+
"cart-destination-submit": {
|
|
991
|
+
"id": "cart-destination-submit",
|
|
992
|
+
"title": "Cart Destination Submit",
|
|
993
|
+
"description": "Copy for the control that writes the destination.",
|
|
994
|
+
"schema": {
|
|
995
|
+
"type": "object",
|
|
996
|
+
"additionalProperties": false,
|
|
997
|
+
"properties": {
|
|
998
|
+
"label": {
|
|
999
|
+
"type": "string",
|
|
1000
|
+
"title": "Button label"
|
|
1001
|
+
},
|
|
1002
|
+
"pendingLabel": {
|
|
1003
|
+
"type": "string",
|
|
1004
|
+
"title": "Pending label"
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
},
|
|
1009
|
+
"cart-destination-cancel": {
|
|
1010
|
+
"id": "cart-destination-cancel",
|
|
1011
|
+
"title": "Cart Destination Cancel",
|
|
1012
|
+
"description": "Copy for the control that closes edit mode without writing.",
|
|
1013
|
+
"schema": {
|
|
1014
|
+
"type": "object",
|
|
1015
|
+
"additionalProperties": false,
|
|
1016
|
+
"properties": {
|
|
1017
|
+
"label": {
|
|
1018
|
+
"type": "string",
|
|
1019
|
+
"title": "Button label"
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
},
|
|
1024
|
+
"cart-destination-error": {
|
|
1025
|
+
"id": "cart-destination-error",
|
|
1026
|
+
"title": "Cart Destination Error",
|
|
1027
|
+
"description": "Message shown when the destination write fails.",
|
|
1028
|
+
"schema": {
|
|
1029
|
+
"type": "object",
|
|
1030
|
+
"additionalProperties": false,
|
|
1031
|
+
"properties": {
|
|
1032
|
+
"genericMessage": {
|
|
1033
|
+
"type": "string",
|
|
1034
|
+
"title": "Failure message"
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
},
|
|
739
1039
|
"order-cancel": {
|
|
740
1040
|
"id": "order-cancel",
|
|
741
1041
|
"title": "Order Cancel",
|
|
@@ -31,7 +31,12 @@ export type PropSchemaField = {
|
|
|
31
31
|
label?: string;
|
|
32
32
|
};
|
|
33
33
|
export type PropSchema = Record<string, PropSchemaField>;
|
|
34
|
-
export type FetchStrategy = 'static' | 'lazy' | 'reactive' | 'reactive-list-item'
|
|
34
|
+
export type FetchStrategy = 'static' | 'lazy' | 'reactive' | 'reactive-list-item' |
|
|
35
|
+
/**
|
|
36
|
+
* The component's data is fetched by the client when the element mounts, in its own operation:
|
|
37
|
+
* never in the page query, and absent from the server HTML. Meant for a conditional branch.
|
|
38
|
+
*/
|
|
39
|
+
'lazy-on-mount';
|
|
35
40
|
/**
|
|
36
41
|
* How one fragment variable reads the element's configuration when the by-name convention cannot
|
|
37
42
|
* express it (config-sourced fragment variables RFC). By convention `$first` reads the content-model
|
|
@@ -53,10 +53,10 @@ Content model (`account-entry-point`) fields, edited in the CMS:
|
|
|
53
53
|
|-------|------|----------|-------|
|
|
54
54
|
| `signedOutLabel` | string | no | Cleared or absent keeps the authored prop |
|
|
55
55
|
| `signedInLabel` | string | no | Same |
|
|
56
|
-
| `icon` | string | no | Same, but the name must be listed in `
|
|
56
|
+
| `icon` | string | no | Same, but the name must be listed in `foundation.json → icons.include` — see below |
|
|
57
57
|
| `loadingLabel` | string | no | Same |
|
|
58
58
|
|
|
59
|
-
**An icon chosen in the CMS has to be declared in the store first.** Icon references resolve at compile time: the compiler collects every value of every `icon`-typed prop across the page and layout schemas and emits one sprite per route. A name that arrives at runtime from a CMS entry is never seen by that pass, so it renders a `<use>` pointing at a symbol the route's sprite does not carry — no build error, no runtime error, no glyph. For a merchant to be able to pick the icon in the Admin, the store must list the candidates under `
|
|
59
|
+
**An icon chosen in the CMS has to be declared in the store first.** Icon references resolve at compile time: the compiler collects every value of every `icon`-typed prop across the page and layout schemas and emits one sprite per route. A name that arrives at runtime from a CMS entry is never seen by that pass, so it renders a `<use>` pointing at a symbol the route's sprite does not carry — no build error, no runtime error, no glyph. For a merchant to be able to pick the icon in the Admin, the store must list the candidates under `foundation.json → icons.include`, which puts them in the root sprite regardless of what any schema references.
|
|
60
60
|
|
|
61
61
|
**One element, two links, chosen by the session.** `loggedIn` renders the signed-in link; `anonymous` and `identified` both render the signed-out one, because an identified but unauthenticated shopper cannot reach their account yet. There is no prop that selects between them — the merchant authors one element and the session decides.
|
|
62
62
|
|
|
@@ -98,7 +98,7 @@ Bound to a CMS entry, the element authors no content props at all — the entry
|
|
|
98
98
|
- **Placing it outside a `SessionRoot`.** The compiler rejects it, and the runtime throws.
|
|
99
99
|
- **Authoring `$content` in the schema.** `$content` is compiler-injected from the page's or layout's content entry; naming it in `props` fails the build.
|
|
100
100
|
- **Expecting a default glyph.** The base icon dialect has no account icon, so a store that authors no `icon` gets a label-only link. Author one from the store's own collection.
|
|
101
|
-
- **Letting a merchant pick the icon without declaring it.** An `icon` supplied by a CMS entry renders nothing at all unless the store lists the name in `
|
|
101
|
+
- **Letting a merchant pick the icon without declaring it.** An `icon` supplied by a CMS entry renders nothing at all unless the store lists the name in `foundation.json → icons.include`: the compiler builds each route's sprite from the schemas, and a runtime value never reaches that pass.
|
|
102
102
|
- **Hiding the announced text with `display:none`.** That removes it from the accessibility tree and defeats the announcement; use a clipping technique instead.
|
|
103
103
|
|
|
104
104
|
---
|
|
@@ -123,7 +123,7 @@ Bound to a CMS entry, the element authors no content props at all — the entry
|
|
|
123
123
|
```
|
|
124
124
|
|
|
125
125
|
The glyph carries a fixed intrinsic size, so reach it through the root when the header needs another.
|
|
126
|
-
Author that once per store as the `AccountEntryPoint` base swatch in `
|
|
126
|
+
Author that once per store as the `AccountEntryPoint` base swatch in `foundation.json → styles`:
|
|
127
127
|
|
|
128
128
|
```json
|
|
129
129
|
{
|
|
@@ -161,7 +161,7 @@ Returns `{ items, current }` — the resolved sections and the current one as `{
|
|
|
161
161
|
|
|
162
162
|
Bound to a CMS entry, the Root authors no `items` at all — the entry supplies the whole list.
|
|
163
163
|
|
|
164
|
-
No part carries a `style` reference: each takes its type's `base` swatch from `
|
|
164
|
+
No part carries a `style` reference: each takes its type's `base` swatch from `foundation.json → styles` on its own. Reference a named swatch only when the store defines one, since a `$name` the store does not define expands to nothing, without an error.
|
|
165
165
|
|
|
166
166
|
The account root's page, whose only content is the redirect:
|
|
167
167
|
|
|
@@ -207,7 +207,7 @@ The account root's page, whose only content is the redirect:
|
|
|
207
207
|
| Sign-out button | `data-fs-account-menu-sign-out-button` is the `<button>`; style `:disabled` for the wait | `text-left text-sm underline` |
|
|
208
208
|
| Sign-out failure | `data-fs-account-menu-sign-out-error` is the alert | `text-sm text-red-600` |
|
|
209
209
|
|
|
210
|
-
The vertical-to-horizontal switch and the scroll affordance are one DOM styled two ways, in CSS alone. A store authors them as `AccountMenuList.base` in `
|
|
210
|
+
The vertical-to-horizontal switch and the scroll affordance are one DOM styled two ways, in CSS alone. A store authors them as `AccountMenuList.base` in `foundation.json → styles`, abridged here:
|
|
211
211
|
|
|
212
212
|
```json
|
|
213
213
|
{
|