@picked/client 0.0.9 → 0.0.10-next.1
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/cjs/index.js +1 -1
- package/dist/cjs/plugins/experience-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/history-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/responses-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/shopify/index.js +1 -1
- package/dist/cjs/plugins/single-page-app/index.js +1 -1
- package/dist/cjs/plugins/web-components/index.js +1 -1
- package/dist/cjs/plugins/window-object/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/esm/index.js +145 -126
- package/dist/esm/plugins/experience-browser-storage/index.js +15 -14
- package/dist/esm/plugins/history-browser-storage/index.js +1 -1
- package/dist/esm/plugins/responses-browser-storage/index.js +1 -1
- package/dist/esm/plugins/shopify/index.js +32 -33
- package/dist/esm/plugins/single-page-app/index.js +3 -3
- package/dist/esm/plugins/web-components/index.js +1 -1
- package/dist/esm/plugins/window-object/index.js +1 -1
- package/dist/esm/server/index.js +1 -1
- package/dist/{experience-instance-C1Ky25uw.js → experience-instance-BEKoIaYp.js} +156 -151
- package/dist/{experience-instance-DNI5sbjx.cjs → experience-instance-D4dHslLZ.cjs} +1 -1
- package/dist/{storage-D87xFySf.js → storage-BxBBl9Bw.js} +39 -31
- package/dist/storage-LI3UdcCr.cjs +1 -0
- package/dist/{supports-yKVnaaMQ.js → supports-BjhuLJ8z.js} +20 -12
- package/dist/supports-YvpQZxbh.cjs +1 -0
- package/dist/types/entities/experience-instance/experience-instance.d.ts +7 -7
- package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
- package/dist/types/picked.d.ts +2 -0
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/plugins/experience-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/shopify/plugin.d.ts.map +1 -1
- package/dist/types/utils/events.d.ts +23 -24
- package/dist/types/utils/events.d.ts.map +1 -1
- package/dist/types/utils/storage.d.ts +3 -0
- package/dist/types/utils/storage.d.ts.map +1 -1
- package/dist/types/utils/supports.d.ts +1 -0
- package/dist/types/utils/supports.d.ts.map +1 -1
- package/dist/types/utils/user-session.d.ts +6 -0
- package/dist/types/utils/user-session.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/storage-BPJwmlva.cjs +0 -1
- package/dist/supports-B6KShYPU.cjs +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
const
|
|
1
|
+
import { a as p } from "../../../supports-BjhuLJ8z.js";
|
|
2
|
+
const a = {
|
|
3
3
|
homepage: /^\/$/,
|
|
4
4
|
productPage: /(?:^|\/)products\/(?<productHandle>[^/]+)\/?$/,
|
|
5
5
|
collection: /^\/collections\/[^/]+\/?$/,
|
|
@@ -12,55 +12,54 @@ const t = {
|
|
|
12
12
|
accountWildcard: /^\/account\/.+/,
|
|
13
13
|
accountLogin: /^\/account\/login(?:\/|$)/,
|
|
14
14
|
accountRegister: /^\/account\/register(?:\/|$)/
|
|
15
|
-
},
|
|
16
|
-
if (
|
|
17
|
-
const c = e.exec(
|
|
15
|
+
}, n = /^\/collections\/(?<collectionHandle>[^/]+)(?:\/|$)/, t = (e, o) => o ? !!e.exec(o.pathname) : !1, i = (e, o) => {
|
|
16
|
+
if (o) {
|
|
17
|
+
const c = e.exec(o.pathname);
|
|
18
18
|
if (c)
|
|
19
19
|
return c[1];
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, s = {
|
|
22
22
|
// Pages
|
|
23
|
-
"is-page": ({ location: e }) =>
|
|
24
|
-
"get-page-handle": ({ location: e }) => i(
|
|
23
|
+
"is-page": ({ location: e }) => t(a.page, e),
|
|
24
|
+
"get-page-handle": ({ location: e }) => i(a.page, e),
|
|
25
25
|
// Products
|
|
26
|
-
"is-product-page": ({ location: e }) =>
|
|
27
|
-
"get-product-handle": ({ location: e }) => i(
|
|
26
|
+
"is-product-page": ({ location: e }) => t(a.productPage, e),
|
|
27
|
+
"get-product-handle": ({ location: e }) => i(a.productPage, e),
|
|
28
28
|
// Collections
|
|
29
|
-
"is-collection-page": ({ location: e }) =>
|
|
30
|
-
"get-collection-handle": ({ location: e }) => i(
|
|
29
|
+
"is-collection-page": ({ location: e }) => t(a.collection, e),
|
|
30
|
+
"get-collection-handle": ({ location: e }) => i(n, e),
|
|
31
31
|
// Blogs
|
|
32
|
-
"is-blog-page": ({ location: e }) =>
|
|
33
|
-
"get-blog-handle": ({ location: e }) => i(
|
|
32
|
+
"is-blog-page": ({ location: e }) => t(a.blog, e),
|
|
33
|
+
"get-blog-handle": ({ location: e }) => i(a.blog, e),
|
|
34
34
|
// Blog Articles
|
|
35
|
-
"is-article-page": ({ location: e }) =>
|
|
36
|
-
"get-article-handle": ({ location: e }) => i(
|
|
35
|
+
"is-article-page": ({ location: e }) => t(a.article, e),
|
|
36
|
+
"get-article-handle": ({ location: e }) => i(a.article, e),
|
|
37
37
|
// Apps
|
|
38
|
-
"is-app-proxy-page": ({ location: e }) =>
|
|
39
|
-
"get-app-proxy-handle": ({ location: e }) => i(
|
|
38
|
+
"is-app-proxy-page": ({ location: e }) => t(a.appProxy, e),
|
|
39
|
+
"get-app-proxy-handle": ({ location: e }) => i(a.appProxy, e),
|
|
40
40
|
// Account
|
|
41
|
-
"is-account-page": ({ location: e }) =>
|
|
42
|
-
"is-login-page": ({ location: e }) =>
|
|
43
|
-
"is-register-page": ({ location: e }) =>
|
|
41
|
+
"is-account-page": ({ location: e }) => t(a.accountWildcard, e),
|
|
42
|
+
"is-login-page": ({ location: e }) => t(a.accountLogin, e),
|
|
43
|
+
"is-register-page": ({ location: e }) => t(a.accountRegister, e),
|
|
44
44
|
// Cart
|
|
45
|
-
"is-cart-page": ({ location: e }) =>
|
|
45
|
+
"is-cart-page": ({ location: e }) => t(a.cart, e),
|
|
46
46
|
// Checkout
|
|
47
|
-
"is-checkout-page": ({ location: e }) =>
|
|
47
|
+
"is-checkout-page": ({ location: e }) => t(a.checkout, e),
|
|
48
48
|
// Homepage
|
|
49
|
-
"is-homepage": ({ location: e }) =>
|
|
49
|
+
"is-homepage": ({ location: e }) => t(a.homepage, e)
|
|
50
50
|
};
|
|
51
|
-
function
|
|
52
|
-
var
|
|
53
|
-
return typeof ((c = (
|
|
51
|
+
function r(e) {
|
|
52
|
+
var o, c;
|
|
53
|
+
return typeof ((c = (o = e.Shopify) == null ? void 0 : o.analytics) == null ? void 0 : c.publish) == "function";
|
|
54
54
|
}
|
|
55
55
|
const g = () => ({
|
|
56
56
|
name: "shopify",
|
|
57
57
|
setup: (e) => {
|
|
58
|
-
Object.entries(
|
|
59
|
-
e.registerPredicate(`shopify-${
|
|
60
|
-
}),
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
version: a.version
|
|
58
|
+
Object.entries(s).forEach(([o, c]) => {
|
|
59
|
+
e.registerPredicate(`shopify-${o}`, c);
|
|
60
|
+
}), p() && e.eventBus.watch((o) => {
|
|
61
|
+
r(window) && o.type === "session" && window.Shopify.analytics.publish("picked:session", {
|
|
62
|
+
id: o.id
|
|
64
63
|
});
|
|
65
64
|
});
|
|
66
65
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as f, G as c,
|
|
1
|
+
import { a as f, G as c, f as m } from "../../../supports-BjhuLJ8z.js";
|
|
2
2
|
import { p as a } from "../../../object-JwZ58NOH.js";
|
|
3
3
|
const o = c;
|
|
4
4
|
let s;
|
|
5
|
-
const
|
|
5
|
+
const d = (r) => ({
|
|
6
6
|
name: "single-page-app",
|
|
7
7
|
setup: (n) => {
|
|
8
8
|
r.instrumentHistory && f() && h(() => {
|
|
@@ -33,5 +33,5 @@ function h(r) {
|
|
|
33
33
|
a(o.history, "pushState", n), a(o.history, "replaceState", n);
|
|
34
34
|
}
|
|
35
35
|
export {
|
|
36
|
-
|
|
36
|
+
d as singlePageAppPlugin
|
|
37
37
|
};
|
package/dist/esm/server/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createEvent as i, createStore as v, createEffect as C, sample as n, attach as S } from "effector";
|
|
2
|
-
import { h as F } from "../../experience-instance-
|
|
2
|
+
import { h as F } from "../../experience-instance-BEKoIaYp.js";
|
|
3
3
|
function R() {
|
|
4
4
|
let c, p;
|
|
5
5
|
return {
|