@nymbalhq/web-components 1.3.0 → 1.5.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/dist/{chunk-HPBC3OG7.js → chunk-25US4IUO.js} +2 -2
- package/dist/{chunk-XPFGMYBV.js → chunk-2VNQP4W2.js} +57 -45
- package/dist/chunk-2VNQP4W2.js.map +1 -0
- package/dist/{chunk-PN6QKYE4.js → chunk-3EZH4TZV.js} +2 -2
- package/dist/{chunk-V55K2CS5.js → chunk-3MSI45IF.js} +3 -3
- package/dist/{chunk-FIF6GQ6U.js → chunk-3PUWCZCG.js} +2 -2
- package/dist/{chunk-N4Y5DI4X.js → chunk-4VHVA4FT.js} +2 -2
- package/dist/{chunk-RAOGZH3Z.js → chunk-5QIDEZQH.js} +4 -3
- package/dist/chunk-5QIDEZQH.js.map +1 -0
- package/dist/{chunk-LHYXNQWY.js → chunk-5TGC7EYZ.js} +3 -2
- package/dist/chunk-5TGC7EYZ.js.map +1 -0
- package/dist/{chunk-DXWMNB5F.js → chunk-5UJSC3DH.js} +3 -3
- package/dist/{chunk-B73QVSA5.js → chunk-6XFKQD6Y.js} +4 -4
- package/dist/{chunk-7JAAOVCE.js → chunk-7FFUFA65.js} +2 -2
- package/dist/{chunk-WEEHXWM3.js → chunk-7SODQLPX.js} +4 -2
- package/dist/chunk-7SODQLPX.js.map +1 -0
- package/dist/{chunk-WTEVTCIL.js → chunk-APVQOQDS.js} +4 -3
- package/dist/chunk-APVQOQDS.js.map +1 -0
- package/dist/{chunk-EYDMJNNK.js → chunk-G3WFHUOD.js} +4 -7
- package/dist/chunk-G3WFHUOD.js.map +1 -0
- package/dist/{chunk-O2YKCDR2.js → chunk-GWO6DO6C.js} +3 -3
- package/dist/{chunk-RZVFA3N5.js → chunk-GXTIW3PK.js} +5 -5
- package/dist/{chunk-SM7TASEW.js → chunk-H4SPL54G.js} +2 -2
- package/dist/{chunk-U2PU4CWB.js → chunk-HEYWS3Z5.js} +2 -2
- package/dist/{chunk-NE6UHTOT.js → chunk-IDVX6NGH.js} +3 -3
- package/dist/chunk-JTQ55WSC.js +143 -0
- package/dist/chunk-JTQ55WSC.js.map +1 -0
- package/dist/{chunk-2TPQNQYO.js → chunk-KCGPC4K7.js} +2 -2
- package/dist/{chunk-5G3C53A2.js → chunk-KQFSMUA2.js} +20 -15
- package/dist/chunk-KQFSMUA2.js.map +1 -0
- package/dist/{chunk-2XXBQPDB.js → chunk-L3TN4LCU.js} +3 -2
- package/dist/chunk-L3TN4LCU.js.map +1 -0
- package/dist/chunk-LLNNHIRA.js +155 -0
- package/dist/chunk-LLNNHIRA.js.map +1 -0
- package/dist/chunk-N6IXXCBC.js +155 -0
- package/dist/chunk-N6IXXCBC.js.map +1 -0
- package/dist/{chunk-EBMA7JGV.js → chunk-P3A57IQE.js} +2 -2
- package/dist/{chunk-H3ZBYNHV.js → chunk-POU7SSHC.js} +3 -2
- package/dist/chunk-POU7SSHC.js.map +1 -0
- package/dist/{chunk-VTQVGNVC.js → chunk-PQE55QQZ.js} +5 -4
- package/dist/chunk-PQE55QQZ.js.map +1 -0
- package/dist/{chunk-42SSME5H.js → chunk-QDUKXBVC.js} +4 -3
- package/dist/chunk-QDUKXBVC.js.map +1 -0
- package/dist/{chunk-UYSZOEOA.js → chunk-SAOKRPER.js} +3 -2
- package/dist/chunk-SAOKRPER.js.map +1 -0
- package/dist/{chunk-DR5QB5VN.js → chunk-T6LO6SQC.js} +3 -2
- package/dist/chunk-T6LO6SQC.js.map +1 -0
- package/dist/{chunk-4COVK727.js → chunk-U6TEG6FR.js} +3 -2
- package/dist/chunk-U6TEG6FR.js.map +1 -0
- package/dist/{chunk-W7D3STJH.js → chunk-UW56H3FP.js} +3 -3
- package/dist/chunk-UW56H3FP.js.map +1 -0
- package/dist/{chunk-LSQPUZK6.js → chunk-UYPL76U7.js} +4 -3
- package/dist/chunk-UYPL76U7.js.map +1 -0
- package/dist/{chunk-NW47OJVN.js → chunk-VIBXNBKZ.js} +4 -3
- package/dist/chunk-VIBXNBKZ.js.map +1 -0
- package/dist/{chunk-W23P7SI4.js → chunk-YVZBQACM.js} +2 -2
- package/dist/{chunk-5VWZ2U5K.js → chunk-YWVDSV25.js} +4 -3
- package/dist/chunk-YWVDSV25.js.map +1 -0
- package/dist/{chunk-IYT7VXFS.js → chunk-Z3LUK5CH.js} +2 -2
- package/dist/elements/nymbal-add-to-cart.js +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.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 +4 -1
- 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.js +3 -3
- package/dist/elements/nymbal-mini-cart.js +2 -2
- package/dist/elements/nymbal-notify-me.d.ts +29 -0
- package/dist/elements/nymbal-notify-me.js +13 -0
- package/dist/elements/nymbal-notify-me.js.map +1 -0
- package/dist/elements/nymbal-order-summary.js +2 -2
- package/dist/elements/nymbal-order-timeline.d.ts +16 -0
- package/dist/elements/nymbal-order-timeline.js +10 -0
- package/dist/elements/nymbal-order-timeline.js.map +1 -0
- 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 +1 -1
- package/dist/elements/nymbal-product-card.js +3 -3
- package/dist/elements/nymbal-product-filter.d.ts +1 -1
- package/dist/elements/nymbal-product-filter.js +2 -2
- package/dist/elements/nymbal-product-grid.js +4 -4
- package/dist/elements/nymbal-product-price.d.ts +1 -1
- package/dist/elements/nymbal-product-price.js +3 -3
- 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 +41 -0
- package/dist/elements/nymbal-recently-viewed.js +13 -0
- package/dist/elements/nymbal-recently-viewed.js.map +1 -0
- package/dist/elements/nymbal-register-form.js +3 -3
- package/dist/elements/nymbal-review-form.js +3 -3
- package/dist/elements/nymbal-review-list.js +2 -2
- package/dist/elements/nymbal-search-bar.js +2 -2
- package/dist/elements/nymbal-search-results.js +4 -4
- package/dist/elements/nymbal-site-footer.js +2 -2
- 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 +1 -1
- 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/index.d.ts +6 -2
- package/dist/index.js +62 -50
- package/dist/{nymbal-payment-element-Bt8EF42T.d.ts → nymbal-payment-element-CqdaDwrR.d.ts} +1 -1
- package/dist/{nymbal-product-card-C8HkE_rG.d.ts → nymbal-product-card-Dv_WUQcP.d.ts} +1 -1
- package/dist/register-components.d.ts +5 -1
- package/dist/register-components.js +39 -36
- package/dist/ssr/index.d.ts +1 -1
- package/dist/ssr/index.js +39 -36
- package/dist/ssr/index.js.map +1 -1
- package/package.json +3 -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-5G3C53A2.js.map +0 -1
- package/dist/chunk-5VWZ2U5K.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-NW47OJVN.js.map +0 -1
- package/dist/chunk-RAOGZH3Z.js.map +0 -1
- package/dist/chunk-UYSZOEOA.js.map +0 -1
- package/dist/chunk-VTQVGNVC.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-XPFGMYBV.js.map +0 -1
- /package/dist/{chunk-HPBC3OG7.js.map → chunk-25US4IUO.js.map} +0 -0
- /package/dist/{chunk-PN6QKYE4.js.map → chunk-3EZH4TZV.js.map} +0 -0
- /package/dist/{chunk-V55K2CS5.js.map → chunk-3MSI45IF.js.map} +0 -0
- /package/dist/{chunk-FIF6GQ6U.js.map → chunk-3PUWCZCG.js.map} +0 -0
- /package/dist/{chunk-N4Y5DI4X.js.map → chunk-4VHVA4FT.js.map} +0 -0
- /package/dist/{chunk-DXWMNB5F.js.map → chunk-5UJSC3DH.js.map} +0 -0
- /package/dist/{chunk-B73QVSA5.js.map → chunk-6XFKQD6Y.js.map} +0 -0
- /package/dist/{chunk-7JAAOVCE.js.map → chunk-7FFUFA65.js.map} +0 -0
- /package/dist/{chunk-O2YKCDR2.js.map → chunk-GWO6DO6C.js.map} +0 -0
- /package/dist/{chunk-RZVFA3N5.js.map → chunk-GXTIW3PK.js.map} +0 -0
- /package/dist/{chunk-SM7TASEW.js.map → chunk-H4SPL54G.js.map} +0 -0
- /package/dist/{chunk-U2PU4CWB.js.map → chunk-HEYWS3Z5.js.map} +0 -0
- /package/dist/{chunk-NE6UHTOT.js.map → chunk-IDVX6NGH.js.map} +0 -0
- /package/dist/{chunk-2TPQNQYO.js.map → chunk-KCGPC4K7.js.map} +0 -0
- /package/dist/{chunk-EBMA7JGV.js.map → chunk-P3A57IQE.js.map} +0 -0
- /package/dist/{chunk-W23P7SI4.js.map → chunk-YVZBQACM.js.map} +0 -0
- /package/dist/{chunk-IYT7VXFS.js.map → chunk-Z3LUK5CH.js.map} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import '@lit-labs/ssr-client/lit-element-hydrate-support.js'
|
|
2
2
|
import {
|
|
3
3
|
NymbalSearchResults
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-5QIDEZQH.js";
|
|
5
|
+
import "../chunk-GXTIW3PK.js";
|
|
6
|
+
import "../chunk-LO2EW5YP.js";
|
|
6
7
|
import "../chunk-RVSKX2RX.js";
|
|
7
8
|
import "../chunk-GHXTJ2CF.js";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-EYDMJNNK.js";
|
|
9
|
+
import "../chunk-G3WFHUOD.js";
|
|
10
10
|
import "../chunk-UCEVCLQ7.js";
|
|
11
11
|
export {
|
|
12
12
|
NymbalSearchResults
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import '@lit-labs/ssr-client/lit-element-hydrate-support.js'
|
|
2
2
|
import {
|
|
3
3
|
NymbalSiteFooter
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-3PUWCZCG.js";
|
|
5
5
|
import "../chunk-LO2EW5YP.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-G3WFHUOD.js";
|
|
7
7
|
import "../chunk-UCEVCLQ7.js";
|
|
8
8
|
export {
|
|
9
9
|
NymbalSiteFooter
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import '@lit-labs/ssr-client/lit-element-hydrate-support.js'
|
|
2
2
|
import {
|
|
3
3
|
NymbalSiteHeader
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-YVZBQACM.js";
|
|
5
5
|
import "../chunk-LO2EW5YP.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-G3WFHUOD.js";
|
|
7
7
|
import "../chunk-UCEVCLQ7.js";
|
|
8
8
|
export {
|
|
9
9
|
NymbalSiteHeader
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '@lit-labs/ssr-client/lit-element-hydrate-support.js'
|
|
2
2
|
import {
|
|
3
3
|
NymbalSortDropdown
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-P3A57IQE.js";
|
|
5
|
+
import "../chunk-G3WFHUOD.js";
|
|
6
6
|
import "../chunk-UCEVCLQ7.js";
|
|
7
7
|
export {
|
|
8
8
|
NymbalSortDropdown
|
|
@@ -10,7 +10,7 @@ declare class NymbalStockBadge extends NymbalVariantElement {
|
|
|
10
10
|
static properties: lit.PropertyDeclarations;
|
|
11
11
|
static styles: lit.CSSResult[];
|
|
12
12
|
stock: number | undefined;
|
|
13
|
-
protected render():
|
|
13
|
+
protected render(): lit.TemplateResult<1> | typeof nothing;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export { NymbalStockBadge };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import '@lit-labs/ssr-client/lit-element-hydrate-support.js'
|
|
2
2
|
import {
|
|
3
3
|
NymbalStockBadge
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-GWO6DO6C.js";
|
|
5
|
+
import "../chunk-SAOKRPER.js";
|
|
6
|
+
import "../chunk-G3WFHUOD.js";
|
|
7
7
|
import "../chunk-UCEVCLQ7.js";
|
|
8
8
|
export {
|
|
9
9
|
NymbalStockBadge
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '@lit-labs/ssr-client/lit-element-hydrate-support.js'
|
|
2
2
|
import {
|
|
3
3
|
NymbalToast
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-KCGPC4K7.js";
|
|
5
|
+
import "../chunk-G3WFHUOD.js";
|
|
6
6
|
import "../chunk-UCEVCLQ7.js";
|
|
7
7
|
export {
|
|
8
8
|
NymbalToast
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '@lit-labs/ssr-client/lit-element-hydrate-support.js'
|
|
2
2
|
import {
|
|
3
3
|
NymbalVariantSelector
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-POU7SSHC.js";
|
|
5
|
+
import "../chunk-G3WFHUOD.js";
|
|
6
6
|
import "../chunk-UCEVCLQ7.js";
|
|
7
7
|
export {
|
|
8
8
|
NymbalVariantSelector
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NymbalClient } from '@nymbalhq/sdk';
|
|
2
2
|
export { E as ElementAttributeType, a as ElementSchema, N as NymbalElement, b as NymbalElementClass, d as define } from './base-element-CPMgAdyQ.js';
|
|
3
|
-
export { N as NymbalPaymentElement, P as PaymentElementStatus } from './nymbal-payment-element-
|
|
3
|
+
export { N as NymbalPaymentElement, P as PaymentElementStatus } from './nymbal-payment-element-CqdaDwrR.js';
|
|
4
4
|
export { registerComponents } from './register-components.js';
|
|
5
5
|
export { NymbalAddToCart } from './elements/nymbal-add-to-cart.js';
|
|
6
6
|
export { NymbalCartDrawer } from './elements/nymbal-cart-drawer.js';
|
|
@@ -12,7 +12,7 @@ export { NymbalProductFilter } from './elements/nymbal-product-filter.js';
|
|
|
12
12
|
export { NymbalToast } from './elements/nymbal-toast.js';
|
|
13
13
|
export { NymbalSortDropdown } from './elements/nymbal-sort-dropdown.js';
|
|
14
14
|
export { NymbalCartPage } from './elements/nymbal-cart-page.js';
|
|
15
|
-
export { N as NymbalProductCard } from './nymbal-product-card-
|
|
15
|
+
export { N as NymbalProductCard } from './nymbal-product-card-Dv_WUQcP.js';
|
|
16
16
|
export { NymbalSearchResults } from './elements/nymbal-search-results.js';
|
|
17
17
|
export { NymbalLoginForm } from './elements/nymbal-login-form.js';
|
|
18
18
|
export { NymbalRegisterForm } from './elements/nymbal-register-form.js';
|
|
@@ -31,7 +31,11 @@ export { NymbalCategoryNav } from './elements/nymbal-category-nav.js';
|
|
|
31
31
|
export { NymbalReviewList } from './elements/nymbal-review-list.js';
|
|
32
32
|
export { NymbalReviewForm } from './elements/nymbal-review-form.js';
|
|
33
33
|
export { NymbalOrderSummary } from './elements/nymbal-order-summary.js';
|
|
34
|
+
export { NymbalNotifyMe } from './elements/nymbal-notify-me.js';
|
|
35
|
+
export { NymbalOrderTimeline } from './elements/nymbal-order-timeline.js';
|
|
36
|
+
export { NymbalRecentlyViewed } from './elements/nymbal-recently-viewed.js';
|
|
34
37
|
import 'lit';
|
|
38
|
+
import '@nymbalhq/sdk/core';
|
|
35
39
|
import './form-element-C-qo3gpD.js';
|
|
36
40
|
import '@nymbalhq/types';
|
|
37
41
|
import './selected-variant-Dym0shlJ.js';
|
package/dist/index.js
CHANGED
|
@@ -1,109 +1,118 @@
|
|
|
1
1
|
import '@lit-labs/ssr-client/lit-element-hydrate-support.js'
|
|
2
2
|
import {
|
|
3
3
|
registerComponents
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2VNQP4W2.js";
|
|
5
5
|
import {
|
|
6
6
|
NymbalVariantSelector
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-POU7SSHC.js";
|
|
8
8
|
import {
|
|
9
9
|
NymbalReviewList
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7FFUFA65.js";
|
|
11
11
|
import {
|
|
12
12
|
NymbalSearchBar
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-U6TEG6FR.js";
|
|
14
14
|
import {
|
|
15
15
|
NymbalSearchResults
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-5QIDEZQH.js";
|
|
17
17
|
import {
|
|
18
18
|
NymbalSiteFooter
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-3PUWCZCG.js";
|
|
20
20
|
import {
|
|
21
21
|
NymbalSiteHeader
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-YVZBQACM.js";
|
|
23
23
|
import {
|
|
24
24
|
NymbalSortDropdown
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-P3A57IQE.js";
|
|
26
26
|
import {
|
|
27
27
|
NymbalStockBadge
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-GWO6DO6C.js";
|
|
29
29
|
import {
|
|
30
30
|
NymbalToast
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-KCGPC4K7.js";
|
|
32
32
|
import {
|
|
33
33
|
NymbalProductFilter
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-7SODQLPX.js";
|
|
35
35
|
import {
|
|
36
36
|
NymbalProductGrid
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import {
|
|
39
|
-
NymbalProductCard
|
|
40
|
-
} from "./chunk-RZVFA3N5.js";
|
|
37
|
+
} from "./chunk-YWVDSV25.js";
|
|
41
38
|
import {
|
|
42
39
|
NymbalProductPrice
|
|
43
|
-
} from "./chunk-
|
|
44
|
-
import "./chunk-UYSZOEOA.js";
|
|
40
|
+
} from "./chunk-5UJSC3DH.js";
|
|
45
41
|
import {
|
|
46
42
|
NymbalProfileForm
|
|
47
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-APVQOQDS.js";
|
|
44
|
+
import {
|
|
45
|
+
NymbalRecentlyViewed
|
|
46
|
+
} from "./chunk-JTQ55WSC.js";
|
|
48
47
|
import {
|
|
49
48
|
NymbalRegisterForm
|
|
50
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-VIBXNBKZ.js";
|
|
51
50
|
import {
|
|
52
51
|
NymbalReviewForm
|
|
53
|
-
} from "./chunk-
|
|
54
|
-
import {
|
|
55
|
-
NymbalCartPage
|
|
56
|
-
} from "./chunk-VTQVGNVC.js";
|
|
57
|
-
import {
|
|
58
|
-
NymbalQuantitySelector
|
|
59
|
-
} from "./chunk-HPBC3OG7.js";
|
|
60
|
-
import {
|
|
61
|
-
NymbalCategoryNav
|
|
62
|
-
} from "./chunk-IYT7VXFS.js";
|
|
63
|
-
import {
|
|
64
|
-
NymbalCheckout
|
|
65
|
-
} from "./chunk-5G3C53A2.js";
|
|
52
|
+
} from "./chunk-IDVX6NGH.js";
|
|
66
53
|
import {
|
|
67
54
|
NymbalImageGallery
|
|
68
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-HEYWS3Z5.js";
|
|
69
56
|
import {
|
|
70
57
|
NymbalLoginForm
|
|
71
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-QDUKXBVC.js";
|
|
72
59
|
import {
|
|
73
60
|
NymbalMiniCart
|
|
74
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-L3TN4LCU.js";
|
|
62
|
+
import {
|
|
63
|
+
NymbalNotifyMe
|
|
64
|
+
} from "./chunk-LLNNHIRA.js";
|
|
65
|
+
import "./chunk-SAOKRPER.js";
|
|
75
66
|
import {
|
|
76
67
|
NymbalOrderSummary
|
|
77
|
-
} from "./chunk-
|
|
78
|
-
import
|
|
68
|
+
} from "./chunk-H4SPL54G.js";
|
|
69
|
+
import {
|
|
70
|
+
NymbalOrderTimeline
|
|
71
|
+
} from "./chunk-N6IXXCBC.js";
|
|
79
72
|
import {
|
|
80
73
|
NymbalPaymentElement
|
|
81
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-UW56H3FP.js";
|
|
75
|
+
import {
|
|
76
|
+
NymbalProductCard
|
|
77
|
+
} from "./chunk-GXTIW3PK.js";
|
|
82
78
|
import {
|
|
83
79
|
NymbalAddToCart
|
|
84
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-5TGC7EYZ.js";
|
|
85
81
|
import {
|
|
86
82
|
NymbalAddressBook
|
|
87
|
-
} from "./chunk-
|
|
88
|
-
import {
|
|
89
|
-
NymbalAddressForm
|
|
90
|
-
} from "./chunk-V55K2CS5.js";
|
|
91
|
-
import "./chunk-PN6QKYE4.js";
|
|
92
|
-
import "./chunk-GHXTJ2CF.js";
|
|
83
|
+
} from "./chunk-6XFKQD6Y.js";
|
|
93
84
|
import {
|
|
94
85
|
NymbalBreadcrumb
|
|
95
|
-
} from "./chunk-
|
|
96
|
-
import "./chunk-LO2EW5YP.js";
|
|
86
|
+
} from "./chunk-4VHVA4FT.js";
|
|
97
87
|
import {
|
|
98
88
|
NymbalCartDrawer
|
|
99
|
-
} from "./chunk-
|
|
100
|
-
import
|
|
89
|
+
} from "./chunk-UYPL76U7.js";
|
|
90
|
+
import {
|
|
91
|
+
NymbalCartPage
|
|
92
|
+
} from "./chunk-PQE55QQZ.js";
|
|
93
|
+
import {
|
|
94
|
+
NymbalQuantitySelector
|
|
95
|
+
} from "./chunk-25US4IUO.js";
|
|
96
|
+
import {
|
|
97
|
+
NymbalCategoryNav
|
|
98
|
+
} from "./chunk-Z3LUK5CH.js";
|
|
99
|
+
import "./chunk-LO2EW5YP.js";
|
|
100
|
+
import {
|
|
101
|
+
NymbalCheckout
|
|
102
|
+
} from "./chunk-KQFSMUA2.js";
|
|
103
|
+
import {
|
|
104
|
+
NymbalAddressForm
|
|
105
|
+
} from "./chunk-3MSI45IF.js";
|
|
106
|
+
import "./chunk-3EZH4TZV.js";
|
|
107
|
+
import "./chunk-RVSKX2RX.js";
|
|
108
|
+
import "./chunk-GHXTJ2CF.js";
|
|
109
|
+
import "./chunk-T6LO6SQC.js";
|
|
101
110
|
import {
|
|
102
111
|
NymbalElement,
|
|
103
112
|
define,
|
|
104
113
|
getClient,
|
|
105
114
|
registerClient
|
|
106
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-G3WFHUOD.js";
|
|
107
116
|
import "./chunk-UCEVCLQ7.js";
|
|
108
117
|
export {
|
|
109
118
|
NymbalAddToCart,
|
|
@@ -118,7 +127,9 @@ export {
|
|
|
118
127
|
NymbalImageGallery,
|
|
119
128
|
NymbalLoginForm,
|
|
120
129
|
NymbalMiniCart,
|
|
130
|
+
NymbalNotifyMe,
|
|
121
131
|
NymbalOrderSummary,
|
|
132
|
+
NymbalOrderTimeline,
|
|
122
133
|
NymbalPaymentElement,
|
|
123
134
|
NymbalProductCard,
|
|
124
135
|
NymbalProductFilter,
|
|
@@ -126,6 +137,7 @@ export {
|
|
|
126
137
|
NymbalProductPrice,
|
|
127
138
|
NymbalProfileForm,
|
|
128
139
|
NymbalQuantitySelector,
|
|
140
|
+
NymbalRecentlyViewed,
|
|
129
141
|
NymbalRegisterForm,
|
|
130
142
|
NymbalReviewForm,
|
|
131
143
|
NymbalReviewList,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as lit from 'lit';
|
|
2
2
|
import { CSSResult } from 'lit';
|
|
3
|
-
import { PaymentConfirmContext, PaymentConfirmation } from '@nymbalhq/sdk';
|
|
3
|
+
import { PaymentConfirmContext, PaymentConfirmation } from '@nymbalhq/sdk/core';
|
|
4
4
|
import { N as NymbalElement, a as ElementSchema } from './base-element-CPMgAdyQ.js';
|
|
5
5
|
|
|
6
6
|
/** `pending` while a driver mounts; `error` when no payment can be taken, which a checkout must not submit past. */
|
|
@@ -40,7 +40,7 @@ declare class NymbalProductCard extends NymbalElement {
|
|
|
40
40
|
static styles: lit.CSSResult[];
|
|
41
41
|
product: string | undefined;
|
|
42
42
|
eager: boolean | undefined;
|
|
43
|
-
protected render():
|
|
43
|
+
protected render(): lit.TemplateResult<1> | typeof nothing;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
export { NymbalProductCard as N, cardProductOf as a, cardImageOf as c };
|
|
@@ -18,6 +18,7 @@ import { NymbalAddressForm } from './elements/nymbal-address-form.js';
|
|
|
18
18
|
import { NymbalAddressBook } from './elements/nymbal-address-book.js';
|
|
19
19
|
import { NymbalCheckout } from './elements/nymbal-checkout.js';
|
|
20
20
|
import { NymbalProductGrid } from './elements/nymbal-product-grid.js';
|
|
21
|
+
import { NymbalRecentlyViewed } from './elements/nymbal-recently-viewed.js';
|
|
21
22
|
import { NymbalProductPrice } from './elements/nymbal-product-price.js';
|
|
22
23
|
import { NymbalStockBadge } from './elements/nymbal-stock-badge.js';
|
|
23
24
|
import { NymbalBreadcrumb } from './elements/nymbal-breadcrumb.js';
|
|
@@ -28,15 +29,18 @@ import { NymbalCategoryNav } from './elements/nymbal-category-nav.js';
|
|
|
28
29
|
import { NymbalReviewList } from './elements/nymbal-review-list.js';
|
|
29
30
|
import { NymbalReviewForm } from './elements/nymbal-review-form.js';
|
|
30
31
|
import { NymbalOrderSummary } from './elements/nymbal-order-summary.js';
|
|
32
|
+
import { NymbalNotifyMe } from './elements/nymbal-notify-me.js';
|
|
33
|
+
import { NymbalOrderTimeline } from './elements/nymbal-order-timeline.js';
|
|
31
34
|
import '@nymbalhq/sdk';
|
|
32
35
|
import 'lit';
|
|
33
36
|
import './base-element-CPMgAdyQ.js';
|
|
37
|
+
import '@nymbalhq/sdk/core';
|
|
34
38
|
import './form-element-C-qo3gpD.js';
|
|
35
39
|
import '@nymbalhq/types';
|
|
36
40
|
import './selected-variant-Dym0shlJ.js';
|
|
37
41
|
|
|
38
42
|
/** Every element the package defines. */
|
|
39
|
-
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 NymbalProductPrice | typeof NymbalStockBadge | typeof NymbalBreadcrumb | typeof NymbalImageGallery | typeof NymbalSiteHeader | typeof NymbalSiteFooter | typeof NymbalCategoryNav | typeof NymbalReviewList | typeof NymbalReviewForm | typeof NymbalOrderSummary)[];
|
|
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)[];
|
|
40
44
|
/**
|
|
41
45
|
* Defines every element, and registers the built-in payment drivers, except a tag or driver name the project has
|
|
42
46
|
* already defined: the project's wins. A page that renders a few elements passes those to `define` instead.
|
|
@@ -2,44 +2,47 @@ 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-
|
|
5
|
+
} from "./chunk-2VNQP4W2.js";
|
|
6
|
+
import "./chunk-POU7SSHC.js";
|
|
7
|
+
import "./chunk-7FFUFA65.js";
|
|
8
|
+
import "./chunk-U6TEG6FR.js";
|
|
9
|
+
import "./chunk-5QIDEZQH.js";
|
|
10
|
+
import "./chunk-3PUWCZCG.js";
|
|
11
|
+
import "./chunk-YVZBQACM.js";
|
|
12
|
+
import "./chunk-P3A57IQE.js";
|
|
13
|
+
import "./chunk-GWO6DO6C.js";
|
|
14
|
+
import "./chunk-KCGPC4K7.js";
|
|
15
|
+
import "./chunk-7SODQLPX.js";
|
|
16
|
+
import "./chunk-YWVDSV25.js";
|
|
17
|
+
import "./chunk-5UJSC3DH.js";
|
|
18
|
+
import "./chunk-APVQOQDS.js";
|
|
19
|
+
import "./chunk-JTQ55WSC.js";
|
|
20
|
+
import "./chunk-VIBXNBKZ.js";
|
|
21
|
+
import "./chunk-IDVX6NGH.js";
|
|
22
|
+
import "./chunk-HEYWS3Z5.js";
|
|
23
|
+
import "./chunk-QDUKXBVC.js";
|
|
24
|
+
import "./chunk-L3TN4LCU.js";
|
|
25
|
+
import "./chunk-LLNNHIRA.js";
|
|
26
|
+
import "./chunk-SAOKRPER.js";
|
|
27
|
+
import "./chunk-H4SPL54G.js";
|
|
28
|
+
import "./chunk-N6IXXCBC.js";
|
|
29
|
+
import "./chunk-UW56H3FP.js";
|
|
30
|
+
import "./chunk-GXTIW3PK.js";
|
|
31
|
+
import "./chunk-5TGC7EYZ.js";
|
|
32
|
+
import "./chunk-6XFKQD6Y.js";
|
|
33
|
+
import "./chunk-4VHVA4FT.js";
|
|
34
|
+
import "./chunk-UYPL76U7.js";
|
|
35
|
+
import "./chunk-PQE55QQZ.js";
|
|
36
|
+
import "./chunk-25US4IUO.js";
|
|
37
|
+
import "./chunk-Z3LUK5CH.js";
|
|
38
|
+
import "./chunk-LO2EW5YP.js";
|
|
39
|
+
import "./chunk-KQFSMUA2.js";
|
|
40
|
+
import "./chunk-3MSI45IF.js";
|
|
41
|
+
import "./chunk-3EZH4TZV.js";
|
|
31
42
|
import "./chunk-RVSKX2RX.js";
|
|
32
|
-
import "./chunk-W7D3STJH.js";
|
|
33
|
-
import "./chunk-LHYXNQWY.js";
|
|
34
|
-
import "./chunk-B73QVSA5.js";
|
|
35
|
-
import "./chunk-V55K2CS5.js";
|
|
36
|
-
import "./chunk-PN6QKYE4.js";
|
|
37
43
|
import "./chunk-GHXTJ2CF.js";
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-LSQPUZK6.js";
|
|
41
|
-
import "./chunk-DR5QB5VN.js";
|
|
42
|
-
import "./chunk-EYDMJNNK.js";
|
|
44
|
+
import "./chunk-T6LO6SQC.js";
|
|
45
|
+
import "./chunk-G3WFHUOD.js";
|
|
43
46
|
import "./chunk-UCEVCLQ7.js";
|
|
44
47
|
export {
|
|
45
48
|
ELEMENTS,
|
package/dist/ssr/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-Dv_WUQcP.js';
|
|
2
2
|
import 'lit';
|
|
3
3
|
import '../base-element-CPMgAdyQ.js';
|
|
4
4
|
import '@nymbalhq/sdk';
|
package/dist/ssr/index.js
CHANGED
|
@@ -1,47 +1,50 @@
|
|
|
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-
|
|
4
|
+
} from "../chunk-2VNQP4W2.js";
|
|
5
|
+
import "../chunk-POU7SSHC.js";
|
|
6
|
+
import "../chunk-7FFUFA65.js";
|
|
7
|
+
import "../chunk-U6TEG6FR.js";
|
|
8
|
+
import "../chunk-5QIDEZQH.js";
|
|
9
|
+
import "../chunk-3PUWCZCG.js";
|
|
10
|
+
import "../chunk-YVZBQACM.js";
|
|
11
|
+
import "../chunk-P3A57IQE.js";
|
|
12
|
+
import "../chunk-GWO6DO6C.js";
|
|
13
|
+
import "../chunk-KCGPC4K7.js";
|
|
14
|
+
import "../chunk-7SODQLPX.js";
|
|
15
|
+
import "../chunk-YWVDSV25.js";
|
|
16
|
+
import "../chunk-5UJSC3DH.js";
|
|
17
|
+
import "../chunk-APVQOQDS.js";
|
|
18
|
+
import "../chunk-JTQ55WSC.js";
|
|
19
|
+
import "../chunk-VIBXNBKZ.js";
|
|
20
|
+
import "../chunk-IDVX6NGH.js";
|
|
21
|
+
import "../chunk-HEYWS3Z5.js";
|
|
22
|
+
import "../chunk-QDUKXBVC.js";
|
|
23
|
+
import "../chunk-L3TN4LCU.js";
|
|
24
|
+
import "../chunk-LLNNHIRA.js";
|
|
25
|
+
import "../chunk-SAOKRPER.js";
|
|
26
|
+
import "../chunk-H4SPL54G.js";
|
|
27
|
+
import "../chunk-N6IXXCBC.js";
|
|
28
|
+
import "../chunk-UW56H3FP.js";
|
|
16
29
|
import {
|
|
17
30
|
cardImageOf,
|
|
18
31
|
cardProductOf
|
|
19
|
-
} from "../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-2XXBQPDB.js";
|
|
32
|
-
import "../chunk-SM7TASEW.js";
|
|
32
|
+
} from "../chunk-GXTIW3PK.js";
|
|
33
|
+
import "../chunk-5TGC7EYZ.js";
|
|
34
|
+
import "../chunk-6XFKQD6Y.js";
|
|
35
|
+
import "../chunk-4VHVA4FT.js";
|
|
36
|
+
import "../chunk-UYPL76U7.js";
|
|
37
|
+
import "../chunk-PQE55QQZ.js";
|
|
38
|
+
import "../chunk-25US4IUO.js";
|
|
39
|
+
import "../chunk-Z3LUK5CH.js";
|
|
40
|
+
import "../chunk-LO2EW5YP.js";
|
|
41
|
+
import "../chunk-KQFSMUA2.js";
|
|
42
|
+
import "../chunk-3MSI45IF.js";
|
|
43
|
+
import "../chunk-3EZH4TZV.js";
|
|
33
44
|
import "../chunk-RVSKX2RX.js";
|
|
34
|
-
import "../chunk-W7D3STJH.js";
|
|
35
|
-
import "../chunk-LHYXNQWY.js";
|
|
36
|
-
import "../chunk-B73QVSA5.js";
|
|
37
|
-
import "../chunk-V55K2CS5.js";
|
|
38
|
-
import "../chunk-PN6QKYE4.js";
|
|
39
45
|
import "../chunk-GHXTJ2CF.js";
|
|
40
|
-
import "../chunk-
|
|
41
|
-
import "../chunk-
|
|
42
|
-
import "../chunk-LSQPUZK6.js";
|
|
43
|
-
import "../chunk-DR5QB5VN.js";
|
|
44
|
-
import "../chunk-EYDMJNNK.js";
|
|
46
|
+
import "../chunk-T6LO6SQC.js";
|
|
47
|
+
import "../chunk-G3WFHUOD.js";
|
|
45
48
|
import "../chunk-UCEVCLQ7.js";
|
|
46
49
|
|
|
47
50
|
// src/ssr/render-root.ts
|
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":"
|
|
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":"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","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nymbalhq/web-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Interactive commerce UI as native Web Components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"astro-component",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@lit-labs/ssr": "^3.3.1",
|
|
56
56
|
"@lit-labs/ssr-client": "^1.1.8",
|
|
57
|
-
"@nymbalhq/sdk": "1.
|
|
58
|
-
"@nymbalhq/types": "1.
|
|
57
|
+
"@nymbalhq/sdk": "1.5.0",
|
|
58
|
+
"@nymbalhq/types": "1.5.0",
|
|
59
59
|
"lit": "^3.3.3"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/mini-cart.ts"],"sourcesContent":["import { css, html, nothing } from 'lit'\nimport { baseStyles, NymbalElement, propertiesOf, type ElementSchema } from '../base-element.js'\n\nconst SCHEMA: ElementSchema = {\n tag: 'nymbal-mini-cart',\n reactName: 'MiniCart',\n // The cart's item count a server read, shown until the cart store settles.\n attributes: [{ name: 'count', prop: 'count', type: 'number' }],\n events: [{ name: 'nymbal:mini-cart:clicked', prop: 'onClick', detail: 'void' }],\n parts: ['button', 'icon', 'badge'],\n slots: ['icon'],\n children: false,\n}\n\nexport class NymbalMiniCart extends NymbalElement {\n static override schema = SCHEMA\n static override properties = propertiesOf(SCHEMA)\n\n static override styles = [\n baseStyles,\n css`\n :host {\n display: inline-block;\n position: relative;\n }\n [part~='button'] {\n background: none;\n border: none;\n cursor: pointer;\n position: relative;\n padding: var(--nymbal-spacing-sm, 0.5rem);\n font-family: var(--nymbal-font-family, system-ui, -apple-system, sans-serif);\n color: var(--nymbal-color-text, #18181b);\n }\n [part~='icon'] {\n display: block;\n width: 24px;\n height: 24px;\n }\n [part~='badge'] {\n position: absolute;\n top: 0;\n right: 0;\n background: var(--nymbal-color-accent, #2563eb);\n color: var(--nymbal-color-text-inverse, #ffffff);\n font-size: var(--nymbal-font-size-xs, 0.75rem);\n font-weight: var(--nymbal-font-weight-bold, 700);\n min-width: 18px;\n height: 18px;\n border-radius: var(--nymbal-radius-full, 9999px);\n display: flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n }\n [part~='badge']:empty {\n display: none;\n }\n `,\n ]\n\n declare count: number | undefined\n\n protected override stores() {\n return [this.client.cart]\n }\n\n protected override storeSettled(): void {\n this.count = undefined\n }\n\n private itemCount(): number {\n if (typeof this.count === 'number' && Number.isFinite(this.count)) return this.count\n return this.readsStores ? this.client.cart.getState().itemCount : 0\n }\n\n protected override render() {\n const itemCount = this.itemCount()\n // An empty badge is `nothing`, not '': Lit's hydration records a server-rendered '' as a committed text node the\n // server never wrote, so the first count after it (a header mounted once the cart has loaded) lands in the part's\n // end marker and the badge stays empty.\n return html`<button\n type=\"button\"\n part=\"button\"\n data-testid=\"mini-cart\"\n aria-label=\"Cart (${itemCount} items)\"\n @click=${this.handleClick}\n >\n <slot name=\"icon\"\n ><svg\n part=\"icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <circle cx=\"9\" cy=\"21\" r=\"1\" />\n <circle cx=\"20\" cy=\"21\" r=\"1\" />\n <path d=\"M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6\" /></svg\n ></slot>\n <span part=\"badge\" class=\"nymbal-mini-cart-badge\" data-testid=\"mini-cart-badge\"\n >${itemCount > 0 ? itemCount : nothing}</span\n >\n </button>`\n }\n\n private handleClick = (): void => {\n this.dispatchEvent(\n new CustomEvent('nymbal:mini-cart:clicked', { bubbles: true, composed: true }),\n )\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,KAAK,MAAM,eAAe;AAGnC,IAAM,SAAwB;AAAA,EAC5B,KAAK;AAAA,EACL,WAAW;AAAA;AAAA,EAEX,YAAY,CAAC,EAAE,MAAM,SAAS,MAAM,SAAS,MAAM,SAAS,CAAC;AAAA,EAC7D,QAAQ,CAAC,EAAE,MAAM,4BAA4B,MAAM,WAAW,QAAQ,OAAO,CAAC;AAAA,EAC9E,OAAO,CAAC,UAAU,QAAQ,OAAO;AAAA,EACjC,OAAO,CAAC,MAAM;AAAA,EACd,UAAU;AACZ;AAEO,IAAM,iBAAN,cAA6B,cAAc;AAAA,EAChD,OAAgB,SAAS;AAAA,EACzB,OAAgB,aAAa,aAAa,MAAM;AAAA,EAEhD,OAAgB,SAAS;AAAA,IACvB;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuCF;AAAA,EAImB,SAAS;AAC1B,WAAO,CAAC,KAAK,OAAO,IAAI;AAAA,EAC1B;AAAA,EAEmB,eAAqB;AACtC,SAAK,QAAQ;AAAA,EACf;AAAA,EAEQ,YAAoB;AAC1B,QAAI,OAAO,KAAK,UAAU,YAAY,OAAO,SAAS,KAAK,KAAK,EAAG,QAAO,KAAK;AAC/E,WAAO,KAAK,cAAc,KAAK,OAAO,KAAK,SAAS,EAAE,YAAY;AAAA,EACpE;AAAA,EAEmB,SAAS;AAC1B,UAAM,YAAY,KAAK,UAAU;AAIjC,WAAO;AAAA;AAAA;AAAA;AAAA,0BAIe,SAAS;AAAA,eACpB,KAAK,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAiBpB,YAAY,IAAI,YAAY,OAAO;AAAA;AAAA;AAAA,EAG5C;AAAA,EAEQ,cAAc,MAAY;AAChC,SAAK;AAAA,MACH,IAAI,YAAY,4BAA4B,EAAE,SAAS,MAAM,UAAU,KAAK,CAAC;AAAA,IAC/E;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/login-form.ts"],"sourcesContent":["import { html } from 'lit'\nimport { baseStyles, propertiesOf, type ElementSchema } from '../base-element.js'\nimport { NymbalFormElement, renderField } from '../form-element.js'\nimport { buttonStyles, fieldStyles } from '../view-styles.js'\n\nconst SCHEMA: ElementSchema = {\n tag: 'nymbal-login-form',\n reactName: 'LoginForm',\n attributes: [],\n events: [\n {\n name: 'nymbal:auth:signed-in',\n prop: 'onSignedIn',\n detail: '{ customer: unknown }',\n },\n ],\n parts: ['form', 'field', 'label', 'input', 'error', 'submit'],\n slots: ['submit-label'],\n children: false,\n}\n\n/** Signs the shopper in; the page decides where they go next (`nymbal:auth:signed-in`). */\nexport class NymbalLoginForm extends NymbalFormElement {\n static override schema = SCHEMA\n static override properties = propertiesOf(SCHEMA)\n static override styles = [baseStyles, buttonStyles, fieldStyles]\n\n // The page leaves on success; a second sign-in while it does would only race the redirect.\n protected override readonly lockOnSuccess = true\n\n protected override async send(): Promise<void> {\n await this.client.auth.login(this.value('email'), this.value('password'))\n this.emit('nymbal:auth:signed-in', { customer: this.client.auth.getState().customer })\n }\n\n protected override failureText(err: unknown): string {\n return err instanceof Error && err.message !== '' ? err.message : 'Invalid email or password.'\n }\n\n protected override render() {\n return html`\n ${this.renderError()}\n <form part=\"form\" data-testid=\"login-form\" @submit=${this.onSubmit}>\n ${renderField({\n id: 'login-email',\n name: 'email',\n label: 'Email',\n type: 'email',\n autocomplete: 'email',\n required: true,\n placeholder: 'you@example.com',\n })}\n ${renderField({\n id: 'login-password',\n name: 'password',\n label: 'Password',\n type: 'password',\n autocomplete: 'current-password',\n required: true,\n placeholder: 'Your password',\n })}\n <button\n type=\"submit\"\n part=\"submit\"\n class=\"btn btn-primary\"\n data-testid=\"login-submit\"\n ?disabled=${this.pending}\n >\n ${this.pending ? 'Signing in...' : html`<slot name=\"submit-label\">Sign In</slot>`}\n </button>\n </form>\n `\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAS,YAAY;AAKrB,IAAM,SAAwB;AAAA,EAC5B,KAAK;AAAA,EACL,WAAW;AAAA,EACX,YAAY,CAAC;AAAA,EACb,QAAQ;AAAA,IACN;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,QAAQ;AAAA,IACV;AAAA,EACF;AAAA,EACA,OAAO,CAAC,QAAQ,SAAS,SAAS,SAAS,SAAS,QAAQ;AAAA,EAC5D,OAAO,CAAC,cAAc;AAAA,EACtB,UAAU;AACZ;AAGO,IAAM,kBAAN,cAA8B,kBAAkB;AAAA,EACrD,OAAgB,SAAS;AAAA,EACzB,OAAgB,aAAa,aAAa,MAAM;AAAA,EAChD,OAAgB,SAAS,CAAC,YAAY,cAAc,WAAW;AAAA;AAAA,EAGnC,gBAAgB;AAAA,EAE5C,MAAyB,OAAsB;AAC7C,UAAM,KAAK,OAAO,KAAK,MAAM,KAAK,MAAM,OAAO,GAAG,KAAK,MAAM,UAAU,CAAC;AACxE,SAAK,KAAK,yBAAyB,EAAE,UAAU,KAAK,OAAO,KAAK,SAAS,EAAE,SAAS,CAAC;AAAA,EACvF;AAAA,EAEmB,YAAY,KAAsB;AACnD,WAAO,eAAe,SAAS,IAAI,YAAY,KAAK,IAAI,UAAU;AAAA,EACpE;AAAA,EAEmB,SAAS;AAC1B,WAAO;AAAA,QACH,KAAK,YAAY,CAAC;AAAA,2DACiC,KAAK,QAAQ;AAAA,UAC9D,YAAY;AAAA,MACZ,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,MAAM;AAAA,MACN,cAAc;AAAA,MACd,UAAU;AAAA,MACV,aAAa;AAAA,IACf,CAAC,CAAC;AAAA,UACA,YAAY;AAAA,MACZ,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,MAAM;AAAA,MACN,cAAc;AAAA,MACd,UAAU;AAAA,MACV,aAAa;AAAA,IACf,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAMY,KAAK,OAAO;AAAA;AAAA,YAEtB,KAAK,UAAU,kBAAkB,8CAA8C;AAAA;AAAA;AAAA;AAAA,EAIzF;AACF;","names":[]}
|