@picked/client 0.0.8-next.1 → 0.0.9-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.
Files changed (41) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/cjs/plugins/experience-browser-storage/index.js +1 -1
  3. package/dist/cjs/plugins/history-browser-storage/index.js +1 -1
  4. package/dist/cjs/plugins/responses-browser-storage/index.js +1 -1
  5. package/dist/cjs/plugins/shopify/index.js +1 -1
  6. package/dist/cjs/plugins/single-page-app/index.js +1 -1
  7. package/dist/cjs/plugins/web-components/index.js +1 -1
  8. package/dist/cjs/plugins/window-object/index.js +1 -1
  9. package/dist/cjs/server/index.js +1 -1
  10. package/dist/esm/index.js +145 -126
  11. package/dist/esm/plugins/experience-browser-storage/index.js +15 -14
  12. package/dist/esm/plugins/history-browser-storage/index.js +1 -1
  13. package/dist/esm/plugins/responses-browser-storage/index.js +1 -1
  14. package/dist/esm/plugins/shopify/index.js +32 -33
  15. package/dist/esm/plugins/single-page-app/index.js +3 -3
  16. package/dist/esm/plugins/web-components/index.js +1 -1
  17. package/dist/esm/plugins/window-object/index.js +1 -1
  18. package/dist/esm/server/index.js +1 -1
  19. package/dist/{experience-instance-C1Ky25uw.js → experience-instance-BEKoIaYp.js} +156 -151
  20. package/dist/{experience-instance-DNI5sbjx.cjs → experience-instance-D4dHslLZ.cjs} +1 -1
  21. package/dist/{storage-D87xFySf.js → storage-BxBBl9Bw.js} +39 -31
  22. package/dist/storage-LI3UdcCr.cjs +1 -0
  23. package/dist/{supports-yKVnaaMQ.js → supports-BjhuLJ8z.js} +20 -12
  24. package/dist/supports-YvpQZxbh.cjs +1 -0
  25. package/dist/types/entities/experience-instance/experience-instance.d.ts +7 -7
  26. package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
  27. package/dist/types/picked.d.ts +2 -0
  28. package/dist/types/picked.d.ts.map +1 -1
  29. package/dist/types/plugins/experience-browser-storage/plugin.d.ts.map +1 -1
  30. package/dist/types/plugins/shopify/plugin.d.ts.map +1 -1
  31. package/dist/types/utils/events.d.ts +23 -24
  32. package/dist/types/utils/events.d.ts.map +1 -1
  33. package/dist/types/utils/storage.d.ts +3 -0
  34. package/dist/types/utils/storage.d.ts.map +1 -1
  35. package/dist/types/utils/supports.d.ts +1 -0
  36. package/dist/types/utils/supports.d.ts.map +1 -1
  37. package/dist/types/utils/user-session.d.ts +6 -0
  38. package/dist/types/utils/user-session.d.ts.map +1 -0
  39. package/package.json +1 -1
  40. package/dist/storage-BPJwmlva.cjs +0 -1
  41. package/dist/supports-B6KShYPU.cjs +0 -1
@@ -1,5 +1,5 @@
1
- import { a as n } from "../../../supports-yKVnaaMQ.js";
2
- const t = {
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
- }, p = /^\/collections\/(?<collectionHandle>[^/]+)(?:\/|$)/, o = (e, a) => a ? !!e.exec(a.pathname) : !1, i = (e, a) => {
16
- if (a) {
17
- const c = e.exec(a.pathname);
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
- }, r = {
21
+ }, s = {
22
22
  // Pages
23
- "is-page": ({ location: e }) => o(t.page, e),
24
- "get-page-handle": ({ location: e }) => i(t.page, e),
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 }) => o(t.productPage, e),
27
- "get-product-handle": ({ location: e }) => i(t.productPage, e),
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 }) => o(t.collection, e),
30
- "get-collection-handle": ({ location: e }) => i(p, e),
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 }) => o(t.blog, e),
33
- "get-blog-handle": ({ location: e }) => i(t.blog, e),
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 }) => o(t.article, e),
36
- "get-article-handle": ({ location: e }) => i(t.article, e),
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 }) => o(t.appProxy, e),
39
- "get-app-proxy-handle": ({ location: e }) => i(t.appProxy, e),
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 }) => o(t.accountWildcard, e),
42
- "is-login-page": ({ location: e }) => o(t.accountLogin, e),
43
- "is-register-page": ({ location: e }) => o(t.accountRegister, 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 }) => o(t.cart, e),
45
+ "is-cart-page": ({ location: e }) => t(a.cart, e),
46
46
  // Checkout
47
- "is-checkout-page": ({ location: e }) => o(t.checkout, e),
47
+ "is-checkout-page": ({ location: e }) => t(a.checkout, e),
48
48
  // Homepage
49
- "is-homepage": ({ location: e }) => o(t.homepage, e)
49
+ "is-homepage": ({ location: e }) => t(a.homepage, e)
50
50
  };
51
- function l(e) {
52
- var a, c;
53
- return typeof ((c = (a = e.Shopify) == null ? void 0 : a.analytics) == null ? void 0 : c.publish) == "function";
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(r).forEach(([a, c]) => {
59
- e.registerPredicate(`shopify-${a}`, c);
60
- }), n() && e.eventBus.watch((a) => {
61
- l(window) && a.type === "initialized" && window.Shopify.analytics.publish("picked:client_event", {
62
- type: "initialized",
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, d as m } from "../../../supports-yKVnaaMQ.js";
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 y = (r) => ({
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
- y as singlePageAppPlugin
36
+ d as singlePageAppPlugin
37
37
  };
@@ -1,4 +1,4 @@
1
- import { a as s, j as i } from "../../../supports-yKVnaaMQ.js";
1
+ import { a as s, k as i } from "../../../supports-BjhuLJ8z.js";
2
2
  const p = () => ({
3
3
  name: "web-components",
4
4
  setup: (e) => {
@@ -1,4 +1,4 @@
1
- import { a as i } from "../../../supports-yKVnaaMQ.js";
1
+ import { a as i } from "../../../supports-BjhuLJ8z.js";
2
2
  const t = () => ({
3
3
  name: "window",
4
4
  setup: (o) => {
@@ -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-C1Ky25uw.js";
2
+ import { h as F } from "../../experience-instance-BEKoIaYp.js";
3
3
  function R() {
4
4
  let c, p;
5
5
  return {