@nymbalhq/web-components 1.4.0 → 1.6.0
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/LICENSE +21 -0
- package/README.md +6 -0
- package/dist/{base-element-CPMgAdyQ.d.ts → base-element-4ogSONmW.d.ts} +7 -0
- package/dist/{chunk-42SSME5H.js → chunk-2NTUNK2J.js} +4 -3
- package/dist/chunk-2NTUNK2J.js.map +1 -0
- package/dist/{chunk-NW47OJVN.js → chunk-2V7AOM7N.js} +4 -3
- package/dist/chunk-2V7AOM7N.js.map +1 -0
- package/dist/{chunk-VTQVGNVC.js → chunk-2XR7RUKT.js} +8 -7
- package/dist/chunk-2XR7RUKT.js.map +1 -0
- package/dist/{chunk-EYDMJNNK.js → chunk-3FKF67SR.js} +36 -7
- package/dist/chunk-3FKF67SR.js.map +1 -0
- package/dist/{chunk-2TPQNQYO.js → chunk-42MZTEYS.js} +2 -2
- package/dist/{chunk-V55K2CS5.js → chunk-4FM5VY2H.js} +3 -3
- package/dist/{chunk-FIF6GQ6U.js → chunk-4RMETPYM.js} +2 -2
- package/dist/{chunk-YQEMZOJL.js → chunk-AIYKLHDM.js} +39 -16
- package/dist/chunk-AIYKLHDM.js.map +1 -0
- package/dist/{chunk-NE6UHTOT.js → chunk-BKV5JEQW.js} +53 -7
- package/dist/chunk-BKV5JEQW.js.map +1 -0
- package/dist/{chunk-5IO2QUHO.js → chunk-CEPSODLR.js} +4 -4
- package/dist/{chunk-RZVFA3N5.js → chunk-DAVTHZDH.js} +30 -5
- package/dist/chunk-DAVTHZDH.js.map +1 -0
- package/dist/{chunk-LHYXNQWY.js → chunk-E6YAFKQK.js} +3 -2
- package/dist/chunk-E6YAFKQK.js.map +1 -0
- package/dist/{chunk-T74ECICK.js → chunk-EF4G7CKW.js} +3 -3
- package/dist/{chunk-WTEVTCIL.js → chunk-F632HDN7.js} +4 -3
- package/dist/chunk-F632HDN7.js.map +1 -0
- package/dist/{chunk-HPBC3OG7.js → chunk-FBH6F5OP.js} +2 -2
- package/dist/{chunk-W7D3STJH.js → chunk-JKE77AO7.js} +3 -3
- package/dist/chunk-JKE77AO7.js.map +1 -0
- package/dist/{chunk-ALPHUJIM.js → chunk-KQF652FC.js} +2 -2
- package/dist/{chunk-2XXBQPDB.js → chunk-LJEICEY7.js} +17 -2
- package/dist/chunk-LJEICEY7.js.map +1 -0
- package/dist/{chunk-U2PU4CWB.js → chunk-LQF6REUD.js} +2 -2
- package/dist/chunk-LVAD3ZSM.js +22 -0
- package/dist/chunk-LVAD3ZSM.js.map +1 -0
- package/dist/{chunk-5VWZ2U5K.js → chunk-MCCN3KEH.js} +4 -3
- package/dist/chunk-MCCN3KEH.js.map +1 -0
- package/dist/{chunk-IYT7VXFS.js → chunk-N2RDYBZM.js} +2 -2
- package/dist/{chunk-DR5QB5VN.js → chunk-NOVBXNFC.js} +3 -2
- package/dist/chunk-NOVBXNFC.js.map +1 -0
- package/dist/{chunk-LSQPUZK6.js → chunk-P4ZFTB26.js} +10 -3
- package/dist/chunk-P4ZFTB26.js.map +1 -0
- package/dist/{chunk-7JAAOVCE.js → chunk-PHRUTSRA.js} +33 -13
- package/dist/chunk-PHRUTSRA.js.map +1 -0
- package/dist/{chunk-W23P7SI4.js → chunk-RHM3D26G.js} +14 -5
- package/dist/chunk-RHM3D26G.js.map +1 -0
- package/dist/{chunk-SM7TASEW.js → chunk-SPBULYIN.js} +2 -2
- package/dist/{chunk-YXAE7NDX.js → chunk-SQGHLX22.js} +58 -58
- package/dist/{chunk-O2YKCDR2.js → chunk-V2GHMLBU.js} +3 -3
- package/dist/{chunk-WEEHXWM3.js → chunk-VB5EWAYX.js} +6 -3
- package/dist/chunk-VB5EWAYX.js.map +1 -0
- package/dist/{chunk-UYSZOEOA.js → chunk-VIUAAIRP.js} +3 -2
- package/dist/chunk-VIUAAIRP.js.map +1 -0
- package/dist/{chunk-H3ZBYNHV.js → chunk-W33ITBT3.js} +3 -2
- package/dist/chunk-W33ITBT3.js.map +1 -0
- package/dist/{chunk-EBMA7JGV.js → chunk-W5CULQJJ.js} +2 -2
- package/dist/{chunk-4COVK727.js → chunk-WP3NSY4U.js} +3 -2
- package/dist/chunk-WP3NSY4U.js.map +1 -0
- package/dist/{chunk-DXWMNB5F.js → chunk-XCJQ7P33.js} +3 -3
- package/dist/{chunk-PN6QKYE4.js → chunk-XEO2OB5A.js} +22 -4
- package/dist/chunk-XEO2OB5A.js.map +1 -0
- package/dist/{chunk-N4Y5DI4X.js → chunk-YP7QYC3X.js} +2 -2
- package/dist/{chunk-B73QVSA5.js → chunk-ZD7KERAS.js} +6 -7
- package/dist/chunk-ZD7KERAS.js.map +1 -0
- package/dist/{chunk-RAOGZH3Z.js → chunk-ZZTJWDYI.js} +4 -3
- package/dist/chunk-ZZTJWDYI.js.map +1 -0
- package/dist/elements/nymbal-add-to-cart.js +2 -2
- package/dist/elements/nymbal-address-book.d.ts +2 -2
- package/dist/elements/nymbal-address-book.js +4 -4
- package/dist/elements/nymbal-address-form.js +3 -3
- package/dist/elements/nymbal-breadcrumb.d.ts +1 -1
- package/dist/elements/nymbal-breadcrumb.js +2 -2
- package/dist/elements/nymbal-cart-drawer.d.ts +2 -0
- package/dist/elements/nymbal-cart-drawer.js +3 -3
- package/dist/elements/nymbal-cart-page.js +4 -4
- package/dist/elements/nymbal-category-nav.d.ts +1 -1
- package/dist/elements/nymbal-category-nav.js +2 -2
- package/dist/elements/nymbal-checkout.d.ts +3 -0
- package/dist/elements/nymbal-checkout.js +5 -5
- package/dist/elements/nymbal-image-gallery.d.ts +1 -1
- package/dist/elements/nymbal-image-gallery.js +2 -2
- package/dist/elements/nymbal-login-form.d.ts +1 -1
- package/dist/elements/nymbal-login-form.js +3 -3
- package/dist/elements/nymbal-mini-cart.d.ts +7 -0
- package/dist/elements/nymbal-mini-cart.js +2 -2
- package/dist/elements/nymbal-notify-me.d.ts +2 -2
- package/dist/elements/nymbal-notify-me.js +4 -4
- package/dist/elements/nymbal-order-summary.js +2 -2
- package/dist/elements/nymbal-order-timeline.d.ts +1 -1
- package/dist/elements/nymbal-order-timeline.js +2 -2
- package/dist/elements/nymbal-payment-element.d.ts +3 -2
- package/dist/elements/nymbal-payment-element.js +2 -2
- package/dist/elements/nymbal-product-card.d.ts +3 -2
- package/dist/elements/nymbal-product-card.js +4 -3
- package/dist/elements/nymbal-product-filter.d.ts +2 -2
- package/dist/elements/nymbal-product-filter.js +2 -2
- package/dist/elements/nymbal-product-grid.d.ts +1 -0
- package/dist/elements/nymbal-product-grid.js +5 -4
- package/dist/elements/nymbal-product-price.d.ts +2 -2
- package/dist/elements/nymbal-product-price.js +3 -3
- package/dist/elements/nymbal-profile-form.d.ts +1 -1
- package/dist/elements/nymbal-profile-form.js +3 -3
- package/dist/elements/nymbal-quantity-selector.js +2 -2
- package/dist/elements/nymbal-recently-viewed.d.ts +2 -1
- package/dist/elements/nymbal-recently-viewed.js +5 -4
- package/dist/elements/nymbal-register-form.d.ts +1 -1
- package/dist/elements/nymbal-register-form.js +3 -3
- package/dist/elements/nymbal-review-form.d.ts +16 -4
- package/dist/elements/nymbal-review-form.js +3 -3
- package/dist/elements/nymbal-review-list.d.ts +5 -1
- package/dist/elements/nymbal-review-list.js +3 -2
- package/dist/elements/nymbal-search-bar.js +2 -2
- package/dist/elements/nymbal-search-results.d.ts +1 -0
- package/dist/elements/nymbal-search-results.js +5 -4
- package/dist/elements/nymbal-site-footer.js +2 -2
- package/dist/elements/nymbal-site-header.d.ts +2 -1
- package/dist/elements/nymbal-site-header.js +2 -2
- package/dist/elements/nymbal-sort-dropdown.js +2 -2
- package/dist/elements/nymbal-stock-badge.d.ts +2 -2
- package/dist/elements/nymbal-stock-badge.js +3 -3
- package/dist/elements/nymbal-toast.js +2 -2
- package/dist/elements/nymbal-variant-selector.js +2 -2
- package/dist/{form-element-C-qo3gpD.d.ts → form-element-DlbsUBfp.d.ts} +7 -1
- package/dist/index.d.ts +6 -5
- package/dist/index.js +65 -64
- package/dist/{nymbal-payment-element-Bt8EF42T.d.ts → nymbal-payment-element-CV5Rq8IV.d.ts} +2 -2
- package/dist/{nymbal-product-card-C8HkE_rG.d.ts → nymbal-product-card-B476jwr5.d.ts} +6 -3
- package/dist/payment-sources.d.ts +11 -0
- package/dist/payment-sources.js +12 -0
- package/dist/payment-sources.js.map +1 -0
- package/dist/register-components.d.ts +4 -3
- package/dist/register-components.js +40 -39
- package/dist/{selected-variant-Dym0shlJ.d.ts → selected-variant-CeK5_Bq1.d.ts} +1 -1
- package/dist/ssr/index.d.ts +16 -3
- package/dist/ssr/index.js +70 -42
- package/dist/ssr/index.js.map +1 -1
- package/package.json +7 -3
- package/dist/chunk-2XXBQPDB.js.map +0 -1
- package/dist/chunk-42SSME5H.js.map +0 -1
- package/dist/chunk-4COVK727.js.map +0 -1
- package/dist/chunk-5VWZ2U5K.js.map +0 -1
- package/dist/chunk-7JAAOVCE.js.map +0 -1
- package/dist/chunk-B73QVSA5.js.map +0 -1
- package/dist/chunk-DR5QB5VN.js.map +0 -1
- package/dist/chunk-EYDMJNNK.js.map +0 -1
- package/dist/chunk-H3ZBYNHV.js.map +0 -1
- package/dist/chunk-LHYXNQWY.js.map +0 -1
- package/dist/chunk-LSQPUZK6.js.map +0 -1
- package/dist/chunk-NE6UHTOT.js.map +0 -1
- package/dist/chunk-NW47OJVN.js.map +0 -1
- package/dist/chunk-PN6QKYE4.js.map +0 -1
- package/dist/chunk-RAOGZH3Z.js.map +0 -1
- package/dist/chunk-RZVFA3N5.js.map +0 -1
- package/dist/chunk-UYSZOEOA.js.map +0 -1
- package/dist/chunk-VTQVGNVC.js.map +0 -1
- package/dist/chunk-W23P7SI4.js.map +0 -1
- package/dist/chunk-W7D3STJH.js.map +0 -1
- package/dist/chunk-WEEHXWM3.js.map +0 -1
- package/dist/chunk-WTEVTCIL.js.map +0 -1
- package/dist/chunk-YQEMZOJL.js.map +0 -1
- /package/dist/{chunk-2TPQNQYO.js.map → chunk-42MZTEYS.js.map} +0 -0
- /package/dist/{chunk-V55K2CS5.js.map → chunk-4FM5VY2H.js.map} +0 -0
- /package/dist/{chunk-FIF6GQ6U.js.map → chunk-4RMETPYM.js.map} +0 -0
- /package/dist/{chunk-5IO2QUHO.js.map → chunk-CEPSODLR.js.map} +0 -0
- /package/dist/{chunk-T74ECICK.js.map → chunk-EF4G7CKW.js.map} +0 -0
- /package/dist/{chunk-HPBC3OG7.js.map → chunk-FBH6F5OP.js.map} +0 -0
- /package/dist/{chunk-ALPHUJIM.js.map → chunk-KQF652FC.js.map} +0 -0
- /package/dist/{chunk-U2PU4CWB.js.map → chunk-LQF6REUD.js.map} +0 -0
- /package/dist/{chunk-IYT7VXFS.js.map → chunk-N2RDYBZM.js.map} +0 -0
- /package/dist/{chunk-SM7TASEW.js.map → chunk-SPBULYIN.js.map} +0 -0
- /package/dist/{chunk-YXAE7NDX.js.map → chunk-SQGHLX22.js.map} +0 -0
- /package/dist/{chunk-O2YKCDR2.js.map → chunk-V2GHMLBU.js.map} +0 -0
- /package/dist/{chunk-EBMA7JGV.js.map → chunk-W5CULQJJ.js.map} +0 -0
- /package/dist/{chunk-DXWMNB5F.js.map → chunk-XCJQ7P33.js.map} +0 -0
- /package/dist/{chunk-N4Y5DI4X.js.map → chunk-YP7QYC3X.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,118 +1,119 @@
|
|
|
1
1
|
import '@lit-labs/ssr-client/lit-element-hydrate-support.js'
|
|
2
2
|
import {
|
|
3
3
|
registerComponents
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
NymbalSortDropdown
|
|
7
|
-
} from "./chunk-EBMA7JGV.js";
|
|
8
|
-
import {
|
|
9
|
-
NymbalStockBadge
|
|
10
|
-
} from "./chunk-O2YKCDR2.js";
|
|
11
|
-
import {
|
|
12
|
-
NymbalToast
|
|
13
|
-
} from "./chunk-2TPQNQYO.js";
|
|
4
|
+
} from "./chunk-SQGHLX22.js";
|
|
14
5
|
import {
|
|
15
6
|
NymbalVariantSelector
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import {
|
|
18
|
-
NymbalRecentlyViewed
|
|
19
|
-
} from "./chunk-T74ECICK.js";
|
|
20
|
-
import {
|
|
21
|
-
NymbalRegisterForm
|
|
22
|
-
} from "./chunk-NW47OJVN.js";
|
|
23
|
-
import {
|
|
24
|
-
NymbalReviewForm
|
|
25
|
-
} from "./chunk-NE6UHTOT.js";
|
|
7
|
+
} from "./chunk-W33ITBT3.js";
|
|
26
8
|
import {
|
|
27
9
|
NymbalReviewList
|
|
28
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PHRUTSRA.js";
|
|
29
11
|
import {
|
|
30
12
|
NymbalSearchBar
|
|
31
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WP3NSY4U.js";
|
|
32
14
|
import {
|
|
33
15
|
NymbalSearchResults
|
|
34
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZZTJWDYI.js";
|
|
35
17
|
import {
|
|
36
18
|
NymbalSiteFooter
|
|
37
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-4RMETPYM.js";
|
|
38
20
|
import {
|
|
39
21
|
NymbalSiteHeader
|
|
40
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-RHM3D26G.js";
|
|
41
23
|
import {
|
|
42
|
-
|
|
43
|
-
} from "./chunk-
|
|
24
|
+
NymbalSortDropdown
|
|
25
|
+
} from "./chunk-W5CULQJJ.js";
|
|
44
26
|
import {
|
|
45
|
-
|
|
46
|
-
} from "./chunk-
|
|
27
|
+
NymbalStockBadge
|
|
28
|
+
} from "./chunk-V2GHMLBU.js";
|
|
29
|
+
import {
|
|
30
|
+
NymbalToast
|
|
31
|
+
} from "./chunk-42MZTEYS.js";
|
|
47
32
|
import {
|
|
48
33
|
NymbalProductFilter
|
|
49
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-VB5EWAYX.js";
|
|
50
35
|
import {
|
|
51
36
|
NymbalProductGrid
|
|
52
|
-
} from "./chunk-
|
|
53
|
-
import {
|
|
54
|
-
NymbalProductCard
|
|
55
|
-
} from "./chunk-RZVFA3N5.js";
|
|
37
|
+
} from "./chunk-MCCN3KEH.js";
|
|
56
38
|
import {
|
|
57
39
|
NymbalProductPrice
|
|
58
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-XCJQ7P33.js";
|
|
59
41
|
import {
|
|
60
42
|
NymbalProfileForm
|
|
61
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-F632HDN7.js";
|
|
62
44
|
import {
|
|
63
|
-
|
|
64
|
-
} from "./chunk-
|
|
65
|
-
import {
|
|
66
|
-
NymbalQuantitySelector
|
|
67
|
-
} from "./chunk-HPBC3OG7.js";
|
|
45
|
+
NymbalRecentlyViewed
|
|
46
|
+
} from "./chunk-EF4G7CKW.js";
|
|
68
47
|
import {
|
|
69
|
-
|
|
70
|
-
} from "./chunk-
|
|
48
|
+
NymbalRegisterForm
|
|
49
|
+
} from "./chunk-2V7AOM7N.js";
|
|
71
50
|
import {
|
|
72
|
-
|
|
73
|
-
} from "./chunk-
|
|
51
|
+
NymbalReviewForm
|
|
52
|
+
} from "./chunk-BKV5JEQW.js";
|
|
74
53
|
import {
|
|
75
54
|
NymbalImageGallery
|
|
76
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-LQF6REUD.js";
|
|
77
56
|
import {
|
|
78
57
|
NymbalLoginForm
|
|
79
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-2NTUNK2J.js";
|
|
80
59
|
import {
|
|
81
60
|
NymbalMiniCart
|
|
82
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-LJEICEY7.js";
|
|
83
62
|
import {
|
|
84
63
|
NymbalNotifyMe
|
|
85
|
-
} from "./chunk-
|
|
86
|
-
import "./chunk-
|
|
64
|
+
} from "./chunk-CEPSODLR.js";
|
|
65
|
+
import "./chunk-VIUAAIRP.js";
|
|
87
66
|
import {
|
|
88
67
|
NymbalOrderSummary
|
|
89
|
-
} from "./chunk-
|
|
90
|
-
import
|
|
68
|
+
} from "./chunk-SPBULYIN.js";
|
|
69
|
+
import {
|
|
70
|
+
NymbalOrderTimeline
|
|
71
|
+
} from "./chunk-KQF652FC.js";
|
|
72
|
+
import {
|
|
73
|
+
NymbalPaymentElement
|
|
74
|
+
} from "./chunk-JKE77AO7.js";
|
|
75
|
+
import {
|
|
76
|
+
NymbalProductCard
|
|
77
|
+
} from "./chunk-DAVTHZDH.js";
|
|
78
|
+
import "./chunk-LVAD3ZSM.js";
|
|
91
79
|
import {
|
|
92
80
|
NymbalAddToCart
|
|
93
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-E6YAFKQK.js";
|
|
94
82
|
import {
|
|
95
83
|
NymbalAddressBook
|
|
96
|
-
} from "./chunk-
|
|
97
|
-
import {
|
|
98
|
-
NymbalAddressForm
|
|
99
|
-
} from "./chunk-V55K2CS5.js";
|
|
100
|
-
import "./chunk-PN6QKYE4.js";
|
|
101
|
-
import "./chunk-GHXTJ2CF.js";
|
|
84
|
+
} from "./chunk-ZD7KERAS.js";
|
|
102
85
|
import {
|
|
103
86
|
NymbalBreadcrumb
|
|
104
|
-
} from "./chunk-
|
|
105
|
-
import "./chunk-LO2EW5YP.js";
|
|
87
|
+
} from "./chunk-YP7QYC3X.js";
|
|
106
88
|
import {
|
|
107
89
|
NymbalCartDrawer
|
|
108
|
-
} from "./chunk-
|
|
109
|
-
import
|
|
90
|
+
} from "./chunk-P4ZFTB26.js";
|
|
91
|
+
import {
|
|
92
|
+
NymbalCartPage
|
|
93
|
+
} from "./chunk-2XR7RUKT.js";
|
|
94
|
+
import {
|
|
95
|
+
NymbalQuantitySelector
|
|
96
|
+
} from "./chunk-FBH6F5OP.js";
|
|
97
|
+
import {
|
|
98
|
+
NymbalCategoryNav
|
|
99
|
+
} from "./chunk-N2RDYBZM.js";
|
|
100
|
+
import "./chunk-LO2EW5YP.js";
|
|
101
|
+
import {
|
|
102
|
+
NymbalCheckout
|
|
103
|
+
} from "./chunk-AIYKLHDM.js";
|
|
104
|
+
import {
|
|
105
|
+
NymbalAddressForm
|
|
106
|
+
} from "./chunk-4FM5VY2H.js";
|
|
107
|
+
import "./chunk-XEO2OB5A.js";
|
|
108
|
+
import "./chunk-RVSKX2RX.js";
|
|
109
|
+
import "./chunk-GHXTJ2CF.js";
|
|
110
|
+
import "./chunk-NOVBXNFC.js";
|
|
110
111
|
import {
|
|
111
112
|
NymbalElement,
|
|
112
113
|
define,
|
|
113
114
|
getClient,
|
|
114
115
|
registerClient
|
|
115
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-3FKF67SR.js";
|
|
116
117
|
import "./chunk-UCEVCLQ7.js";
|
|
117
118
|
export {
|
|
118
119
|
NymbalAddToCart,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as lit from 'lit';
|
|
2
2
|
import { CSSResult } from 'lit';
|
|
3
|
-
import { PaymentConfirmContext, PaymentConfirmation } from '@nymbalhq/sdk';
|
|
4
|
-
import { N as NymbalElement, a as ElementSchema } from './base-element-
|
|
3
|
+
import { PaymentConfirmContext, PaymentConfirmation } from '@nymbalhq/sdk/core';
|
|
4
|
+
import { N as NymbalElement, a as ElementSchema } from './base-element-4ogSONmW.js';
|
|
5
5
|
|
|
6
6
|
/** `pending` while a driver mounts; `error` when no payment can be taken, which a checkout must not submit past. */
|
|
7
7
|
type PaymentElementStatus = 'pending' | 'ready' | 'error';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as lit from 'lit';
|
|
2
2
|
import { nothing } from 'lit';
|
|
3
|
-
import {
|
|
3
|
+
import { ProductRating } from '@nymbalhq/types';
|
|
4
|
+
import { N as NymbalElement, a as ElementSchema } from './base-element-4ogSONmW.js';
|
|
4
5
|
|
|
5
6
|
/** The fields a card reads; a search result or a listing product carries them. */
|
|
6
7
|
interface CardProduct {
|
|
@@ -17,6 +18,8 @@ interface CardProduct {
|
|
|
17
18
|
url?: string;
|
|
18
19
|
alt?: string;
|
|
19
20
|
}>;
|
|
21
|
+
/** As the product routes serve it: null when the product has no approved review. */
|
|
22
|
+
rating?: ProductRating | null;
|
|
20
23
|
}
|
|
21
24
|
/**
|
|
22
25
|
* The product's own image, else a placeholder seeded by its slug so a card without media keeps its shape. Exported so
|
|
@@ -33,14 +36,14 @@ declare function cardImageOf(p: CardProduct): {
|
|
|
33
36
|
declare function cardProductOf(p: Omit<CardProduct, 'media'> & {
|
|
34
37
|
media?: unknown;
|
|
35
38
|
}): CardProduct;
|
|
36
|
-
/** One product as a link to its page: image, name and
|
|
39
|
+
/** One product as a link to its page: image, name, price and rating. */
|
|
37
40
|
declare class NymbalProductCard extends NymbalElement {
|
|
38
41
|
static schema: ElementSchema;
|
|
39
42
|
static properties: lit.PropertyDeclarations;
|
|
40
43
|
static styles: lit.CSSResult[];
|
|
41
44
|
product: string | undefined;
|
|
42
45
|
eager: boolean | undefined;
|
|
43
|
-
protected render():
|
|
46
|
+
protected render(): lit.TemplateResult<1> | typeof nothing;
|
|
44
47
|
}
|
|
45
48
|
|
|
46
49
|
export { NymbalProductCard as N, cardProductOf as a, cardImageOf as c };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the built-in payment drivers load from outside the store, by content security policy directive. A storefront's
|
|
3
|
+
* page policy allows these, so the payment step works under it without the storefront naming a payment provider.
|
|
4
|
+
*/
|
|
5
|
+
declare const PAYMENT_SOURCES: {
|
|
6
|
+
readonly script: readonly ["https://js.stripe.com"];
|
|
7
|
+
readonly frame: readonly ["https://js.stripe.com", "https://hooks.stripe.com"];
|
|
8
|
+
readonly connect: readonly ["https://api.stripe.com"];
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export { PAYMENT_SOURCES };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import '@lit-labs/ssr-client/lit-element-hydrate-support.js'
|
|
2
|
+
|
|
3
|
+
// src/payment-sources.ts
|
|
4
|
+
var PAYMENT_SOURCES = {
|
|
5
|
+
script: ["https://js.stripe.com"],
|
|
6
|
+
frame: ["https://js.stripe.com", "https://hooks.stripe.com"],
|
|
7
|
+
connect: ["https://api.stripe.com"]
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
PAYMENT_SOURCES
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=payment-sources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/payment-sources.ts"],"sourcesContent":["/**\n * What the built-in payment drivers load from outside the store, by content security policy directive. A storefront's\n * page policy allows these, so the payment step works under it without the storefront naming a payment provider.\n */\nexport const PAYMENT_SOURCES = {\n script: ['https://js.stripe.com'],\n frame: ['https://js.stripe.com', 'https://hooks.stripe.com'],\n connect: ['https://api.stripe.com'],\n} as const\n"],"mappings":";;;AAIO,IAAM,kBAAkB;AAAA,EAC7B,QAAQ,CAAC,uBAAuB;AAAA,EAChC,OAAO,CAAC,yBAAyB,0BAA0B;AAAA,EAC3D,SAAS,CAAC,wBAAwB;AACpC;","names":[]}
|
|
@@ -33,10 +33,11 @@ import { NymbalNotifyMe } from './elements/nymbal-notify-me.js';
|
|
|
33
33
|
import { NymbalOrderTimeline } from './elements/nymbal-order-timeline.js';
|
|
34
34
|
import '@nymbalhq/sdk';
|
|
35
35
|
import 'lit';
|
|
36
|
-
import './base-element-
|
|
37
|
-
import '
|
|
36
|
+
import './base-element-4ogSONmW.js';
|
|
37
|
+
import '@nymbalhq/sdk/core';
|
|
38
38
|
import '@nymbalhq/types';
|
|
39
|
-
import './
|
|
39
|
+
import './form-element-DlbsUBfp.js';
|
|
40
|
+
import './selected-variant-CeK5_Bq1.js';
|
|
40
41
|
|
|
41
42
|
/** Every element the package defines. */
|
|
42
43
|
declare const ELEMENTS: (typeof NymbalAddToCart | typeof NymbalCartDrawer | typeof NymbalMiniCart | typeof NymbalVariantSelector | typeof NymbalQuantitySelector | typeof NymbalSearchBar | typeof NymbalProductFilter | typeof NymbalToast | typeof NymbalPaymentElement | typeof NymbalSortDropdown | typeof NymbalCartPage | typeof NymbalProductCard | typeof NymbalSearchResults | typeof NymbalLoginForm | typeof NymbalRegisterForm | typeof NymbalProfileForm | typeof NymbalAddressForm | typeof NymbalAddressBook | typeof NymbalCheckout | typeof NymbalProductGrid | typeof NymbalRecentlyViewed | typeof NymbalProductPrice | typeof NymbalStockBadge | typeof NymbalBreadcrumb | typeof NymbalImageGallery | typeof NymbalSiteHeader | typeof NymbalSiteFooter | typeof NymbalCategoryNav | typeof NymbalReviewList | typeof NymbalReviewForm | typeof NymbalOrderSummary | typeof NymbalNotifyMe | typeof NymbalOrderTimeline)[];
|
|
@@ -2,47 +2,48 @@ import '@lit-labs/ssr-client/lit-element-hydrate-support.js'
|
|
|
2
2
|
import {
|
|
3
3
|
ELEMENTS,
|
|
4
4
|
registerComponents
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-SQGHLX22.js";
|
|
6
|
+
import "./chunk-W33ITBT3.js";
|
|
7
|
+
import "./chunk-PHRUTSRA.js";
|
|
8
|
+
import "./chunk-WP3NSY4U.js";
|
|
9
|
+
import "./chunk-ZZTJWDYI.js";
|
|
10
|
+
import "./chunk-4RMETPYM.js";
|
|
11
|
+
import "./chunk-RHM3D26G.js";
|
|
12
|
+
import "./chunk-W5CULQJJ.js";
|
|
13
|
+
import "./chunk-V2GHMLBU.js";
|
|
14
|
+
import "./chunk-42MZTEYS.js";
|
|
15
|
+
import "./chunk-VB5EWAYX.js";
|
|
16
|
+
import "./chunk-MCCN3KEH.js";
|
|
17
|
+
import "./chunk-XCJQ7P33.js";
|
|
18
|
+
import "./chunk-F632HDN7.js";
|
|
19
|
+
import "./chunk-EF4G7CKW.js";
|
|
20
|
+
import "./chunk-2V7AOM7N.js";
|
|
21
|
+
import "./chunk-BKV5JEQW.js";
|
|
22
|
+
import "./chunk-LQF6REUD.js";
|
|
23
|
+
import "./chunk-2NTUNK2J.js";
|
|
24
|
+
import "./chunk-LJEICEY7.js";
|
|
25
|
+
import "./chunk-CEPSODLR.js";
|
|
26
|
+
import "./chunk-VIUAAIRP.js";
|
|
27
|
+
import "./chunk-SPBULYIN.js";
|
|
28
|
+
import "./chunk-KQF652FC.js";
|
|
29
|
+
import "./chunk-JKE77AO7.js";
|
|
30
|
+
import "./chunk-DAVTHZDH.js";
|
|
31
|
+
import "./chunk-LVAD3ZSM.js";
|
|
32
|
+
import "./chunk-E6YAFKQK.js";
|
|
33
|
+
import "./chunk-ZD7KERAS.js";
|
|
34
|
+
import "./chunk-YP7QYC3X.js";
|
|
35
|
+
import "./chunk-P4ZFTB26.js";
|
|
36
|
+
import "./chunk-2XR7RUKT.js";
|
|
37
|
+
import "./chunk-FBH6F5OP.js";
|
|
38
|
+
import "./chunk-N2RDYBZM.js";
|
|
39
|
+
import "./chunk-LO2EW5YP.js";
|
|
40
|
+
import "./chunk-AIYKLHDM.js";
|
|
41
|
+
import "./chunk-4FM5VY2H.js";
|
|
42
|
+
import "./chunk-XEO2OB5A.js";
|
|
35
43
|
import "./chunk-RVSKX2RX.js";
|
|
36
|
-
import "./chunk-LHYXNQWY.js";
|
|
37
|
-
import "./chunk-B73QVSA5.js";
|
|
38
|
-
import "./chunk-V55K2CS5.js";
|
|
39
|
-
import "./chunk-PN6QKYE4.js";
|
|
40
44
|
import "./chunk-GHXTJ2CF.js";
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-LSQPUZK6.js";
|
|
44
|
-
import "./chunk-DR5QB5VN.js";
|
|
45
|
-
import "./chunk-EYDMJNNK.js";
|
|
45
|
+
import "./chunk-NOVBXNFC.js";
|
|
46
|
+
import "./chunk-3FKF67SR.js";
|
|
46
47
|
import "./chunk-UCEVCLQ7.js";
|
|
47
48
|
export {
|
|
48
49
|
ELEMENTS,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _nymbalhq_sdk from '@nymbalhq/sdk';
|
|
2
2
|
import { DenormalisedProduct, DenormalisedVariant } from '@nymbalhq/sdk';
|
|
3
|
-
import { N as NymbalElement } from './base-element-
|
|
3
|
+
import { N as NymbalElement } from './base-element-4ogSONmW.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* An element showing one product's selected variant (its price, its stock). It renders from its attributes until the
|
package/dist/ssr/index.d.ts
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
|
-
export { C as CardProduct, c as cardImageOf, a as cardProductOf } from '../nymbal-product-card-
|
|
1
|
+
export { C as CardProduct, c as cardImageOf, a as cardProductOf } from '../nymbal-product-card-B476jwr5.js';
|
|
2
2
|
import 'lit';
|
|
3
|
-
import '
|
|
3
|
+
import '@nymbalhq/types';
|
|
4
|
+
import '../base-element-4ogSONmW.js';
|
|
4
5
|
import '@nymbalhq/sdk';
|
|
5
6
|
|
|
7
|
+
/**
|
|
8
|
+
* JSON for a `<script type="application/ld+json">` element: `JSON.stringify` with `<`, `>`, `&`, U+2028 and U+2029
|
|
9
|
+
* written as JSON escapes, so no product text can close the element (`</script>`) or open a comment, and the JSON
|
|
10
|
+
* parses to the same value.
|
|
11
|
+
*/
|
|
12
|
+
declare function serializeJsonLd(value: unknown): string;
|
|
13
|
+
/**
|
|
14
|
+
* A product description (the sanitised HTML fragment the API serves) as plain text, for a meta tag or JSON-LD: tags
|
|
15
|
+
* dropped, block boundaries made spaces, entities decoded, whitespace collapsed. None reads as ''.
|
|
16
|
+
*/
|
|
17
|
+
declare function descriptionText(html: string | undefined): string;
|
|
18
|
+
|
|
6
19
|
/** Thrown for a tag the server does not render: neither a package element nor one a project registered. */
|
|
7
20
|
declare class UnknownElement extends Error {
|
|
8
21
|
name: string;
|
|
@@ -26,5 +39,5 @@ interface RenderOptions {
|
|
|
26
39
|
*/
|
|
27
40
|
declare function renderElement(tag: string, options?: RenderOptions): string;
|
|
28
41
|
|
|
29
|
-
export { UnknownElement, registerServerElements, renderElement };
|
|
42
|
+
export { UnknownElement, descriptionText, registerServerElements, renderElement, serializeJsonLd };
|
|
30
43
|
export type { RenderOptions };
|
package/dist/ssr/index.js
CHANGED
|
@@ -1,50 +1,51 @@
|
|
|
1
1
|
import '@lit-labs/ssr-client/lit-element-hydrate-support.js'
|
|
2
2
|
import {
|
|
3
3
|
ELEMENTS
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-SQGHLX22.js";
|
|
5
|
+
import "../chunk-W33ITBT3.js";
|
|
6
|
+
import "../chunk-PHRUTSRA.js";
|
|
7
|
+
import "../chunk-WP3NSY4U.js";
|
|
8
|
+
import "../chunk-ZZTJWDYI.js";
|
|
9
|
+
import "../chunk-4RMETPYM.js";
|
|
10
|
+
import "../chunk-RHM3D26G.js";
|
|
11
|
+
import "../chunk-W5CULQJJ.js";
|
|
12
|
+
import "../chunk-V2GHMLBU.js";
|
|
13
|
+
import "../chunk-42MZTEYS.js";
|
|
14
|
+
import "../chunk-VB5EWAYX.js";
|
|
15
|
+
import "../chunk-MCCN3KEH.js";
|
|
16
|
+
import "../chunk-XCJQ7P33.js";
|
|
17
|
+
import "../chunk-F632HDN7.js";
|
|
18
|
+
import "../chunk-EF4G7CKW.js";
|
|
19
|
+
import "../chunk-2V7AOM7N.js";
|
|
20
|
+
import "../chunk-BKV5JEQW.js";
|
|
21
|
+
import "../chunk-LQF6REUD.js";
|
|
22
|
+
import "../chunk-2NTUNK2J.js";
|
|
23
|
+
import "../chunk-LJEICEY7.js";
|
|
24
|
+
import "../chunk-CEPSODLR.js";
|
|
25
|
+
import "../chunk-VIUAAIRP.js";
|
|
26
|
+
import "../chunk-SPBULYIN.js";
|
|
27
|
+
import "../chunk-KQF652FC.js";
|
|
28
|
+
import "../chunk-JKE77AO7.js";
|
|
21
29
|
import {
|
|
22
30
|
cardImageOf,
|
|
23
31
|
cardProductOf
|
|
24
|
-
} from "../chunk-
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
33
|
-
import "../chunk-
|
|
34
|
-
import "../chunk-
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
32
|
+
} from "../chunk-DAVTHZDH.js";
|
|
33
|
+
import "../chunk-LVAD3ZSM.js";
|
|
34
|
+
import "../chunk-E6YAFKQK.js";
|
|
35
|
+
import "../chunk-ZD7KERAS.js";
|
|
36
|
+
import "../chunk-YP7QYC3X.js";
|
|
37
|
+
import "../chunk-P4ZFTB26.js";
|
|
38
|
+
import "../chunk-2XR7RUKT.js";
|
|
39
|
+
import "../chunk-FBH6F5OP.js";
|
|
40
|
+
import "../chunk-N2RDYBZM.js";
|
|
41
|
+
import "../chunk-LO2EW5YP.js";
|
|
42
|
+
import "../chunk-AIYKLHDM.js";
|
|
43
|
+
import "../chunk-4FM5VY2H.js";
|
|
44
|
+
import "../chunk-XEO2OB5A.js";
|
|
37
45
|
import "../chunk-RVSKX2RX.js";
|
|
38
|
-
import "../chunk-LHYXNQWY.js";
|
|
39
|
-
import "../chunk-B73QVSA5.js";
|
|
40
|
-
import "../chunk-V55K2CS5.js";
|
|
41
|
-
import "../chunk-PN6QKYE4.js";
|
|
42
46
|
import "../chunk-GHXTJ2CF.js";
|
|
43
|
-
import "../chunk-
|
|
44
|
-
import "../chunk-
|
|
45
|
-
import "../chunk-LSQPUZK6.js";
|
|
46
|
-
import "../chunk-DR5QB5VN.js";
|
|
47
|
-
import "../chunk-EYDMJNNK.js";
|
|
47
|
+
import "../chunk-NOVBXNFC.js";
|
|
48
|
+
import "../chunk-3FKF67SR.js";
|
|
48
49
|
import "../chunk-UCEVCLQ7.js";
|
|
49
50
|
|
|
50
51
|
// src/ssr/render-root.ts
|
|
@@ -58,6 +59,20 @@ function restoreCreateRenderRoot() {
|
|
|
58
59
|
// src/ssr/index.ts
|
|
59
60
|
import { LitElementRenderer } from "@lit-labs/ssr/lib/lit-element-renderer.js";
|
|
60
61
|
import { collectResultSync } from "@lit-labs/ssr/lib/render-result.js";
|
|
62
|
+
|
|
63
|
+
// src/ssr/seo.ts
|
|
64
|
+
function serializeJsonLd(value) {
|
|
65
|
+
return JSON.stringify(value).replace(
|
|
66
|
+
/[<>&\u2028\u2029]/g,
|
|
67
|
+
(c) => `\\u${c.charCodeAt(0).toString(16).padStart(4, "0")}`
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
var ENTITIES = { "&": "&", "<": "<", ">": ">", """: '"' };
|
|
71
|
+
function descriptionText(html) {
|
|
72
|
+
return (html ?? "").replace(/<\/?(?:p|br|li|ul|ol|h\d|blockquote)\b[^>]*>/gi, " ").replace(/<[^>]*>/g, "").replace(/&(?:amp|lt|gt|quot);/g, (entity) => ENTITIES[entity]).replace(/\s+/g, " ").trim();
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// src/ssr/index.ts
|
|
61
76
|
restoreCreateRenderRoot();
|
|
62
77
|
var UnknownElement = class extends Error {
|
|
63
78
|
name = "UnknownElement";
|
|
@@ -104,10 +119,21 @@ function defineAll() {
|
|
|
104
119
|
customElements.define(`${tag}-server`, element);
|
|
105
120
|
}
|
|
106
121
|
}
|
|
122
|
+
var CSS_TOKEN = /(\/\*[\s\S]*?(?:\*\/|$))|("(?:[^"\\]|\\[\s\S])*(?:"|$)|'(?:[^'\\]|\\[\s\S])*(?:'|$))|\s+/g;
|
|
123
|
+
function compactCss(css) {
|
|
124
|
+
return css.replace(
|
|
125
|
+
CSS_TOKEN,
|
|
126
|
+
(token, comment, string, at) => {
|
|
127
|
+
if (string !== void 0) return string;
|
|
128
|
+
if (comment !== void 0) return comment.replace(/\s+/g, " ");
|
|
129
|
+
return at === 0 || at + token.length === css.length ? "" : " ";
|
|
130
|
+
}
|
|
131
|
+
);
|
|
132
|
+
}
|
|
107
133
|
function compactStyles(html) {
|
|
108
134
|
return html.replace(
|
|
109
|
-
/<style>([
|
|
110
|
-
(_, css) => `<style>${css
|
|
135
|
+
/<style>([\s\S]*?)<\/style>/g,
|
|
136
|
+
(_, css) => `<style>${compactCss(css)}</style>`
|
|
111
137
|
);
|
|
112
138
|
}
|
|
113
139
|
function renderElement(tag, options = {}) {
|
|
@@ -140,7 +166,9 @@ export {
|
|
|
140
166
|
UnknownElement,
|
|
141
167
|
cardImageOf,
|
|
142
168
|
cardProductOf,
|
|
169
|
+
descriptionText,
|
|
143
170
|
registerServerElements,
|
|
144
|
-
renderElement
|
|
171
|
+
renderElement,
|
|
172
|
+
serializeJsonLd
|
|
145
173
|
};
|
|
146
174
|
//# sourceMappingURL=index.js.map
|
package/dist/ssr/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ssr/render-root.ts","../../src/ssr/index.ts"],"sourcesContent":["import { LitElement } from 'lit'\n\ntype WithRenderRoot = { createRenderRoot: () => HTMLElement | DocumentFragment }\n\n// Lit SSR replaces LitElement's createRenderRoot when it loads, dropping the hydrate support's, which is what makes a\n// client element take over a server's shadow root. A realm that both renders on the server and runs elements (a test,\n// a DOM-shimmed server) keeps the one it had: this module is imported before Lit SSR, and the ssr entry restores it.\nconst prototype = LitElement.prototype as unknown as WithRenderRoot\nconst createRenderRoot = prototype.createRenderRoot\n\nexport function restoreCreateRenderRoot(): void {\n prototype.createRenderRoot = createRenderRoot\n}\n","import { restoreCreateRenderRoot } from './render-root.js'\nimport type { RenderInfo } from '@lit-labs/ssr'\nimport { LitElementRenderer } from '@lit-labs/ssr/lib/lit-element-renderer.js'\nimport { collectResultSync } from '@lit-labs/ssr/lib/render-result.js'\nimport type { LitElement } from 'lit'\nimport { ELEMENTS } from '../register-components.js'\n\nexport { cardImageOf, cardProductOf, type CardProduct } from '../components/product-card.js'\n\nrestoreCreateRenderRoot()\n\n/** Thrown for a tag the server does not render: neither a package element nor one a project registered. */\nexport class UnknownElement extends Error {\n override name = 'UnknownElement'\n}\n\ntype LitElementClass = (new () => LitElement) & { _$litElement$?: boolean }\n\n/** Mounted by its payment driver in the browser, in the light DOM; a checkout's server render leaves its slot. */\nconst CLIENT_MOUNTED = new Set(['nymbal-payment-element'])\n\nconst PACKAGE = new Map<string, LitElementClass>(\n ELEMENTS.filter((e) => !CLIENT_MOUNTED.has(e.schema.tag)).map((e) => [\n e.schema.tag,\n e as unknown as LitElementClass,\n ]),\n)\n\n/** The project's elements by tag (its `serverElements`), which the server renders in place of the package's. */\nconst projectElements = new Map<string, LitElementClass>()\n\n/**\n * Registers a project's own element classes by tag, as its elements entry exports them: the server renders each in\n * place of the package's element under that tag, as the browser defines it there. A tag keeps the first class it was\n * registered with; a different class under it is refused, so the server and the browser cannot disagree.\n */\nexport function registerServerElements(map: Record<string, CustomElementConstructor>): void {\n for (const [tag, element] of Object.entries(map)) {\n const lit = element as unknown as LitElementClass\n if (lit._$litElement$ !== true) {\n throw new TypeError(`${tag}: the server renders Lit elements only`)\n }\n const registered = projectElements.get(tag)\n if (registered !== undefined && registered !== lit) {\n throw new Error(`${tag} is already registered for the server with another class`)\n }\n projectElements.set(tag, lit)\n }\n}\n\n/** The class the server renders under `tag`, resolved per call, so a registration after a first render wins. */\nfunction classFor(tag: string): LitElementClass | undefined {\n return projectElements.get(tag) ?? PACKAGE.get(tag)\n}\n\n/**\n * Lit SSR finds the elements a template renders, and constructs them, through `customElements`, which defines a tag\n * once per process. This renderer constructs the class `classFor` resolves instead, so a project's element renders\n * under its tag whatever `customElements` held first.\n */\nclass ServerElementRenderer extends LitElementRenderer {\n static override matchesClass(_ctor: typeof HTMLElement, tagName?: string): boolean {\n return tagName !== undefined && classFor(tagName) !== undefined\n }\n\n constructor(tagName: string) {\n super(tagName)\n const element = classFor(tagName)!\n if (this.element.constructor !== element) this.element = new element()\n }\n}\n\n/**\n * Every tag the server may render is known to `customElements`, which is where Lit SSR finds nested elements. A DOM\n * (not Lit's server shim) constructs only the classes it defined, so a project class whose tag already holds another\n * class is defined under a name of its own.\n */\nfunction defineAll(): void {\n for (const tag of new Set([...projectElements.keys(), ...PACKAGE.keys()])) {\n const element = classFor(tag)!\n if (customElements.get(tag) === undefined) customElements.define(tag, element)\n else if (customElements.getName(element) === null)\n customElements.define(`${tag}-server`, element)\n }\n}\n\n/**\n * The elements' styles, with their indentation collapsed: written for reading, they would otherwise be bytes a page\n * downloads before its first paint, once per element.\n */\nfunction compactStyles(html: string): string {\n return html.replace(\n /<style>([^<]*)<\\/style>/g,\n (_, css: string) => `<style>${css.replace(/\\s+/g, ' ').trim()}</style>`,\n )\n}\n\nexport interface RenderOptions {\n /** The host's attributes; a JSON attribute's value is its JSON text. */\n attributes?: Record<string, string> | undefined\n /** Light-DOM HTML after the shadow root: a slotted child, as the payment element is the checkout's. */\n children?: string | undefined\n}\n\n/**\n * One element as HTML: `<tag …attributes><template shadowrootmode=\"open\">…</template>…children</tag>`, the template\n * holding the element's first render from its attributes (no client, no store) with its styles, and the markers Lit's\n * hydration reads. The browser parses the template into the element's shadow root, and the element takes it over.\n */\nexport function renderElement(tag: string, options: RenderOptions = {}): string {\n if (CLIENT_MOUNTED.has(tag)) {\n throw new UnknownElement(`${tag} is client-mounted and is not server-rendered`)\n }\n if (classFor(tag) === undefined) {\n throw new UnknownElement(`${tag} is neither a Nymbal element nor a registered server element`)\n }\n defineAll()\n\n const renderer = new ServerElementRenderer(tag)\n for (const [name, value] of Object.entries(options.attributes ?? {})) {\n renderer.setAttribute(name, value)\n }\n renderer.connectedCallback()\n const renderInfo: RenderInfo = {\n elementRenderers: [ServerElementRenderer, LitElementRenderer],\n customElementInstanceStack: [renderer],\n customElementHostStack: [renderer],\n eventTargetStack: [renderer.element],\n slotStack: [],\n deferHydration: false,\n }\n const attributes = collectResultSync(renderer.renderAttributes())\n const shadow = compactStyles(collectResultSync(renderer.renderShadow(renderInfo)))\n const { mode = 'open' } = renderer.shadowRootOptions\n return `<${tag}${attributes}><template shadowrootmode=\"${mode}\">${shadow}</template>${options.children ?? ''}</${tag}>`\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,kBAAkB;AAO3B,IAAM,YAAY,WAAW;AAC7B,IAAM,mBAAmB,UAAU;AAE5B,SAAS,0BAAgC;AAC9C,YAAU,mBAAmB;AAC/B;;;ACVA,SAAS,0BAA0B;AACnC,SAAS,yBAAyB;AAMlC,wBAAwB;AAGjB,IAAM,iBAAN,cAA6B,MAAM;AAAA,EAC/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r/render-root.ts","../../src/ssr/index.ts","../../src/ssr/seo.ts"],"sourcesContent":["import { LitElement } from 'lit'\n\ntype WithRenderRoot = { createRenderRoot: () => HTMLElement | DocumentFragment }\n\n// Lit SSR replaces LitElement's createRenderRoot when it loads, dropping the hydrate support's, which is what makes a\n// client element take over a server's shadow root. A realm that both renders on the server and runs elements (a test,\n// a DOM-shimmed server) keeps the one it had: this module is imported before Lit SSR, and the ssr entry restores it.\nconst prototype = LitElement.prototype as unknown as WithRenderRoot\nconst createRenderRoot = prototype.createRenderRoot\n\nexport function restoreCreateRenderRoot(): void {\n prototype.createRenderRoot = createRenderRoot\n}\n","import { restoreCreateRenderRoot } from './render-root.js'\nimport type { RenderInfo } from '@lit-labs/ssr'\nimport { LitElementRenderer } from '@lit-labs/ssr/lib/lit-element-renderer.js'\nimport { collectResultSync } from '@lit-labs/ssr/lib/render-result.js'\nimport type { LitElement } from 'lit'\nimport { ELEMENTS } from '../register-components.js'\n\nexport { cardImageOf, cardProductOf, type CardProduct } from '../components/product-card.js'\nexport { descriptionText, serializeJsonLd } from './seo.js'\n\nrestoreCreateRenderRoot()\n\n/** Thrown for a tag the server does not render: neither a package element nor one a project registered. */\nexport class UnknownElement extends Error {\n override name = 'UnknownElement'\n}\n\ntype LitElementClass = (new () => LitElement) & { _$litElement$?: boolean }\n\n/** Mounted by its payment driver in the browser, in the light DOM; a checkout's server render leaves its slot. */\nconst CLIENT_MOUNTED = new Set(['nymbal-payment-element'])\n\nconst PACKAGE = new Map<string, LitElementClass>(\n ELEMENTS.filter((e) => !CLIENT_MOUNTED.has(e.schema.tag)).map((e) => [\n e.schema.tag,\n e as unknown as LitElementClass,\n ]),\n)\n\n/** The project's elements by tag (its `serverElements`), which the server renders in place of the package's. */\nconst projectElements = new Map<string, LitElementClass>()\n\n/**\n * Registers a project's own element classes by tag, as its elements entry exports them: the server renders each in\n * place of the package's element under that tag, as the browser defines it there. A tag keeps the first class it was\n * registered with; a different class under it is refused, so the server and the browser cannot disagree.\n */\nexport function registerServerElements(map: Record<string, CustomElementConstructor>): void {\n for (const [tag, element] of Object.entries(map)) {\n const lit = element as unknown as LitElementClass\n if (lit._$litElement$ !== true) {\n throw new TypeError(`${tag}: the server renders Lit elements only`)\n }\n const registered = projectElements.get(tag)\n if (registered !== undefined && registered !== lit) {\n throw new Error(`${tag} is already registered for the server with another class`)\n }\n projectElements.set(tag, lit)\n }\n}\n\n/** The class the server renders under `tag`, resolved per call, so a registration after a first render wins. */\nfunction classFor(tag: string): LitElementClass | undefined {\n return projectElements.get(tag) ?? PACKAGE.get(tag)\n}\n\n/**\n * Lit SSR finds the elements a template renders, and constructs them, through `customElements`, which defines a tag\n * once per process. This renderer constructs the class `classFor` resolves instead, so a project's element renders\n * under its tag whatever `customElements` held first.\n */\nclass ServerElementRenderer extends LitElementRenderer {\n static override matchesClass(_ctor: typeof HTMLElement, tagName?: string): boolean {\n return tagName !== undefined && classFor(tagName) !== undefined\n }\n\n constructor(tagName: string) {\n super(tagName)\n const element = classFor(tagName)!\n if (this.element.constructor !== element) this.element = new element()\n }\n}\n\n/**\n * Every tag the server may render is known to `customElements`, which is where Lit SSR finds nested elements. A DOM\n * (not Lit's server shim) constructs only the classes it defined, so a project class whose tag already holds another\n * class is defined under a name of its own.\n */\nfunction defineAll(): void {\n for (const tag of new Set([...projectElements.keys(), ...PACKAGE.keys()])) {\n const element = classFor(tag)!\n if (customElements.get(tag) === undefined) customElements.define(tag, element)\n else if (customElements.getName(element) === null)\n customElements.define(`${tag}-server`, element)\n }\n}\n\n/**\n * A comment (a quote in it opens no string), a quoted string (a backslash escapes the next character), or a whitespace\n * run, as a browser tokenises CSS. An unclosed comment or string runs to the end.\n */\nconst CSS_TOKEN =\n /(\\/\\*[\\s\\S]*?(?:\\*\\/|$))|(\"(?:[^\"\\\\]|\\\\[\\s\\S])*(?:\"|$)|'(?:[^'\\\\]|\\\\[\\s\\S])*(?:'|$))|\\s+/g\n\n/** Each whitespace run outside a string made one space, none at the ends; a string is a value and stays as written. */\nfunction compactCss(css: string): string {\n return css.replace(\n CSS_TOKEN,\n (token, comment: string | undefined, string: string | undefined, at: number) => {\n if (string !== undefined) return string\n if (comment !== undefined) return comment.replace(/\\s+/g, ' ')\n return at === 0 || at + token.length === css.length ? '' : ' '\n },\n )\n}\n\n/**\n * The elements' styles, with their indentation collapsed: written for reading, they would otherwise be bytes a page\n * downloads before its first paint, once per element.\n */\nfunction compactStyles(html: string): string {\n return html.replace(\n /<style>([\\s\\S]*?)<\\/style>/g,\n (_, css: string) => `<style>${compactCss(css)}</style>`,\n )\n}\n\nexport interface RenderOptions {\n /** The host's attributes; a JSON attribute's value is its JSON text. */\n attributes?: Record<string, string> | undefined\n /** Light-DOM HTML after the shadow root: a slotted child, as the payment element is the checkout's. */\n children?: string | undefined\n}\n\n/**\n * One element as HTML: `<tag …attributes><template shadowrootmode=\"open\">…</template>…children</tag>`, the template\n * holding the element's first render from its attributes (no client, no store) with its styles, and the markers Lit's\n * hydration reads. The browser parses the template into the element's shadow root, and the element takes it over.\n */\nexport function renderElement(tag: string, options: RenderOptions = {}): string {\n if (CLIENT_MOUNTED.has(tag)) {\n throw new UnknownElement(`${tag} is client-mounted and is not server-rendered`)\n }\n if (classFor(tag) === undefined) {\n throw new UnknownElement(`${tag} is neither a Nymbal element nor a registered server element`)\n }\n defineAll()\n\n const renderer = new ServerElementRenderer(tag)\n for (const [name, value] of Object.entries(options.attributes ?? {})) {\n renderer.setAttribute(name, value)\n }\n renderer.connectedCallback()\n const renderInfo: RenderInfo = {\n elementRenderers: [ServerElementRenderer, LitElementRenderer],\n customElementInstanceStack: [renderer],\n customElementHostStack: [renderer],\n eventTargetStack: [renderer.element],\n slotStack: [],\n deferHydration: false,\n }\n const attributes = collectResultSync(renderer.renderAttributes())\n const shadow = compactStyles(collectResultSync(renderer.renderShadow(renderInfo)))\n const { mode = 'open' } = renderer.shadowRootOptions\n return `<${tag}${attributes}><template shadowrootmode=\"${mode}\">${shadow}</template>${options.children ?? ''}</${tag}>`\n}\n","/**\n * JSON for a `<script type=\"application/ld+json\">` element: `JSON.stringify` with `<`, `>`, `&`, U+2028 and U+2029\n * written as JSON escapes, so no product text can close the element (`</script>`) or open a comment, and the JSON\n * parses to the same value.\n */\nexport function serializeJsonLd(value: unknown): string {\n return JSON.stringify(value).replace(\n /[<>&\\u2028\\u2029]/g,\n (c) => `\\\\u${c.charCodeAt(0).toString(16).padStart(4, '0')}`,\n )\n}\n\n/** The entities a sanitised description holds: the API writes every other character as itself. */\nconst ENTITIES: Record<string, string> = { '&': '&', '<': '<', '>': '>', '"': '\"' }\n\n/**\n * A product description (the sanitised HTML fragment the API serves) as plain text, for a meta tag or JSON-LD: tags\n * dropped, block boundaries made spaces, entities decoded, whitespace collapsed. None reads as ''.\n */\nexport function descriptionText(html: string | undefined): string {\n return (html ?? '')\n .replace(/<\\/?(?:p|br|li|ul|ol|h\\d|blockquote)\\b[^>]*>/gi, ' ')\n .replace(/<[^>]*>/g, '')\n .replace(/&(?:amp|lt|gt|quot);/g, (entity) => ENTITIES[entity]!)\n .replace(/\\s+/g, ' ')\n .trim()\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,kBAAkB;AAO3B,IAAM,YAAY,WAAW;AAC7B,IAAM,mBAAmB,UAAU;AAE5B,SAAS,0BAAgC;AAC9C,YAAU,mBAAmB;AAC/B;;;ACVA,SAAS,0BAA0B;AACnC,SAAS,yBAAyB;;;ACE3B,SAAS,gBAAgB,OAAwB;AACtD,SAAO,KAAK,UAAU,KAAK,EAAE;AAAA,IAC3B;AAAA,IACA,CAAC,MAAM,MAAM,EAAE,WAAW,CAAC,EAAE,SAAS,EAAE,EAAE,SAAS,GAAG,GAAG,CAAC;AAAA,EAC5D;AACF;AAGA,IAAM,WAAmC,EAAE,SAAS,KAAK,QAAQ,KAAK,QAAQ,KAAK,UAAU,IAAI;AAM1F,SAAS,gBAAgB,MAAkC;AAChE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7B,kBAAkB,CAAC,uBAAuB,kBAAkB;AAAA,IAC5D,4BAA4B,CAAC,QAAQ;AAAA,IACrC,wBAAwB,CAAC,QAAQ;AAAA,IACjC,kBAAkB,CAAC,SAAS,OAAO;AAAA,IACnC,WAAW,CAAC;AAAA,IACZ,gBAAgB;AAAA,EAClB;AACA,QAAM,aAAa,kBAAkB,SAAS,iBAAiB,CAAC;AAChE,QAAM,SAAS,cAAc,kBAAkB,SAAS,aAAa,UAAU,CAAC,CAAC;AACjF,QAAM,EAAE,OAAO,OAAO,IAAI,SAAS;AACnC,SAAO,IAAI,GAAG,GAAG,UAAU,8BAA8B,IAAI,KAAK,MAAM,cAAc,QAAQ,YAAY,EAAE,KAAK,GAAG;AACtH;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nymbalhq/web-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Interactive commerce UI as native Web Components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"astro-component",
|
|
@@ -39,6 +39,10 @@
|
|
|
39
39
|
"types": "./dist/hydrate-support.d.ts",
|
|
40
40
|
"import": "./dist/hydrate-support.js"
|
|
41
41
|
},
|
|
42
|
+
"./payment-sources": {
|
|
43
|
+
"types": "./dist/payment-sources.d.ts",
|
|
44
|
+
"import": "./dist/payment-sources.js"
|
|
45
|
+
},
|
|
42
46
|
"./ssr": {
|
|
43
47
|
"types": "./dist/ssr/index.d.ts",
|
|
44
48
|
"import": "./dist/ssr/index.js"
|
|
@@ -54,8 +58,8 @@
|
|
|
54
58
|
"dependencies": {
|
|
55
59
|
"@lit-labs/ssr": "^3.3.1",
|
|
56
60
|
"@lit-labs/ssr-client": "^1.1.8",
|
|
57
|
-
"@nymbalhq/sdk": "1.
|
|
58
|
-
"@nymbalhq/types": "1.
|
|
61
|
+
"@nymbalhq/sdk": "1.6.0",
|
|
62
|
+
"@nymbalhq/types": "1.6.0",
|
|
59
63
|
"lit": "^3.3.3"
|
|
60
64
|
},
|
|
61
65
|
"devDependencies": {
|