@picked/client 0.0.1-dev.1763596411740 → 0.0.1-dev.1764025609515

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.
@@ -1,8 +1,8 @@
1
- import { a as f, G as c, d as m } from "../../../supports-DBMT17KZ.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-DBMT17KZ.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-DBMT17KZ.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
- import { createEvent as i, createStore as C, createEffect as S, sample as n, attach as h } from "effector";
2
- import { a as F } from "../../experience-instance-CeuHLrdL.js";
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-QtGs0N3g.js";
3
3
  function R() {
4
4
  let c, p;
5
5
  return {
@@ -11,19 +11,19 @@ function R() {
11
11
  };
12
12
  }
13
13
  function w(c, p) {
14
- const { promise: g, resolve: t } = R(), o = i(), s = i(), l = i(), m = i(), d = i(), I = c.experiences.listStore.map((e) => e.map((r) => F({ client: c, experience: r }))), x = C({
14
+ const { promise: g, resolve: t } = R(), o = i(), s = i(), l = i(), m = i(), d = i(), I = c.experiences.listStore.map((e) => e.map((r) => F({ client: c, experience: r }))), x = v({
15
15
  currentExperienceIndex: 0,
16
16
  renderedExperiences: [],
17
17
  isComplete: !1
18
- }), f = S(
18
+ }), f = C(
19
19
  async ({
20
20
  experience: e,
21
21
  availableRenderers: r,
22
- startRendererIndex: v = 0
22
+ startRendererIndex: h = 0
23
23
  }) => {
24
24
  if (!e)
25
25
  return null;
26
- for (let a = v; a < r.length; a++) {
26
+ for (let a = h; a < r.length; a++) {
27
27
  const u = r[a], E = e.componentStore.getState();
28
28
  if (E && (u != null && u.isValidComponent(E.component)))
29
29
  return { rendered: await u.render(E.component, c, e), rendererIndex: a };
@@ -75,7 +75,7 @@ function w(c, p) {
75
75
  filter: ({ experiences: e, state: r }) => r.currentExperienceIndex >= e.length,
76
76
  target: m
77
77
  });
78
- const k = h({
78
+ const k = S({
79
79
  source: x,
80
80
  effect: (e) => {
81
81
  e.isComplete && t(e.renderedExperiences);
@@ -1,6 +1,6 @@
1
1
  import { createDomain as ht, createEvent as B, combine as C, createApi as ot, createEffect as M, attach as F, split as yt, sample as m } from "effector";
2
2
  import { createFactory as it, invoke as st } from "@withease/factories";
3
- import { h as wt, s as at, a as Nt } from "./supports-DBMT17KZ.js";
3
+ import { i as wt, s as at, a as Nt } from "./supports-BjhuLJ8z.js";
4
4
  import { l as I } from "./logger-C9a75KZn.js";
5
5
  import { i as It } from "./object-JwZ58NOH.js";
6
6
  function xt(t) {
@@ -768,14 +768,14 @@ function Yt(t) {
768
768
  return st(Gt, t);
769
769
  }
770
770
  export {
771
- jt as a,
772
- Jt as b,
773
- Yt as c,
771
+ j as a,
772
+ Yt as b,
773
+ Jt as c,
774
774
  Xt as d,
775
775
  et as e,
776
- At as f,
776
+ Ot as f,
777
777
  zt as g,
778
- j as h,
779
- Ot as i,
778
+ jt as h,
779
+ At as i,
780
780
  Qt as t
781
781
  };
@@ -81,15 +81,15 @@ function h() {
81
81
  export {
82
82
  t as G,
83
83
  l as a,
84
- r as b,
85
- e as c,
86
- s as d,
87
- a as e,
88
- c as f,
89
- u as g,
90
- i as h,
91
- f as i,
92
- y as j,
93
- h as k,
84
+ a as b,
85
+ h as c,
86
+ r as d,
87
+ e,
88
+ s as f,
89
+ c as g,
90
+ u as h,
91
+ i,
92
+ f as j,
93
+ y as k,
94
94
  p as s
95
95
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picked/client",
3
- "version": "0.0.1-dev.1763596411740",
3
+ "version": "0.0.1-dev.1764025609515",
4
4
  "dependencies": {
5
5
  "@withease/factories": "^1.0.5"
6
6
  },
@@ -45,12 +45,6 @@
45
45
  "require": "./dist/cjs/plugins/create-experience/index.js",
46
46
  "default": "./dist/esm/plugins/create-experience/index.js"
47
47
  },
48
- "./plugins/shopify": {
49
- "types": "./dist/types/plugins/shopify/index.d.ts",
50
- "import": "./dist/esm/plugins/shopify/index.js",
51
- "require": "./dist/cjs/plugins/shopify/index.js",
52
- "default": "./dist/esm/plugins/shopify/index.js"
53
- },
54
48
  "./plugins/window-object": {
55
49
  "types": "./dist/types/plugins/window-object/index.d.ts",
56
50
  "import": "./dist/esm/plugins/window-object/index.js",
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../supports-YvpQZxbh.cjs");require("../../../user-session-X9sLAm_B.cjs");require("../../../experience-instance-B2l_MG7I.cjs");require("effector");function c(){if(r.supportsWindow())return window.pickedConfig}function l(){var e;if(r.supportsWindow())return(e=c())==null?void 0:e.customer}function s(){var e;if(r.supportsWindow())return(e=c())==null?void 0:e.product}function u(){var e;if(r.supportsWindow())return(e=c())==null?void 0:e.collection}function d(){var e;if(r.supportsWindow())return(e=c())==null?void 0:e.experiments}function f(){var e,o;if(r.supportsWindow())return(o=(e=c())==null?void 0:e.storefront_api)==null?void 0:o.token}const t={homepage:/^\/$/,page:/(?:^|\/)pages\/[^/]+$/,blog:/(?:^|\/)blogs\/(?<blogHandle>[^/]+)\/?$/,article:/^\/blogs\/[^/]+\/(?<article>[^/]+)\/?$/,cart:/(?:^|\/)cart\/[^/]+$/,checkout:/^\/checkout\/.+/,appProxy:/^\/(?:a|apps|community|tools)\/(?<proxyTarget>[^/]+)/,accountWildcard:/^\/account\/.+/,accountLogin:/^\/account\/login(?:\/|$)/,accountRegister:/^\/account\/register(?:\/|$)/},n=(e,o)=>o?!!e.exec(o.pathname):!1,a=(e,o)=>{if(o){const i=e.exec(o.pathname);if(i)return i[1]}},p=e=>{var o,i;switch(e){case"product":return((o=s())==null?void 0:o.handle)??!1;case"collection":return((i=u())==null?void 0:i.handle)??!1;default:return!1}},h={"is-page":({location:e})=>n(t.page,e),"get-page-handle":({location:e})=>a(t.page,e),"is-product-page":()=>!!p("product"),"get-product-handle":()=>p("product"),"is-collection-page":()=>!!p("collection"),"get-collection-handle":()=>p("collection"),"is-blog-page":({location:e})=>n(t.blog,e),"get-blog-handle":({location:e})=>a(t.blog,e),"is-article-page":({location:e})=>n(t.article,e),"get-article-handle":({location:e})=>a(t.article,e),"is-app-proxy-page":({location:e})=>n(t.appProxy,e),"get-app-proxy-handle":({location:e})=>a(t.appProxy,e),"is-account-page":({location:e})=>n(t.accountWildcard,e),"is-login-page":({location:e})=>n(t.accountLogin,e),"is-register-page":({location:e})=>n(t.accountRegister,e),"is-cart-page":({location:e})=>n(t.cart,e),"is-checkout-page":({location:e})=>n(t.checkout,e),"is-homepage":({location:e})=>n(t.homepage,e)};function g(){if(!r.supportsWindow()||!window.Shopify)throw new Error("Shopify global object not found. This plugin must be used on a Shopify storefront page.");return window.Shopify}function y(e){var o,i;return typeof((i=(o=g())==null?void 0:o.analytics)==null?void 0:i.publish)=="function"}const P=()=>({name:"shopify",setup:e=>{Object.entries(h).forEach(([o,i])=>{e.registerPredicate(`shopify-${o}`,i)}),r.supportsWindow()&&e.eventBus.watch(o=>{y()&&o.type==="session"&&window.Shopify.analytics.publish("picked:session",{id:o.id})})}});exports.getPickedConfig=c;exports.getPickedConfigCollection=u;exports.getPickedConfigCustomer=l;exports.getPickedConfigExperiments=d;exports.getPickedConfigProduct=s;exports.getPickedConfigStorefrontApiToken=f;exports.getShopify=g;exports.shopifyPlugin=P;
@@ -1,123 +0,0 @@
1
- import { a as r } from "../../../supports-DBMT17KZ.js";
2
- import "../../../user-session-CxJHSMaR.js";
3
- import "../../../experience-instance-CeuHLrdL.js";
4
- import "effector";
5
- function a() {
6
- if (r())
7
- return window.pickedConfig;
8
- }
9
- function P() {
10
- var e;
11
- if (r())
12
- return (e = a()) == null ? void 0 : e.customer;
13
- }
14
- function s() {
15
- var e;
16
- if (r())
17
- return (e = a()) == null ? void 0 : e.product;
18
- }
19
- function u() {
20
- var e;
21
- if (r())
22
- return (e = a()) == null ? void 0 : e.collection;
23
- }
24
- function b() {
25
- var e;
26
- if (r())
27
- return (e = a()) == null ? void 0 : e.experiments;
28
- }
29
- function k() {
30
- var e, t;
31
- if (r())
32
- return (t = (e = a()) == null ? void 0 : e.storefront_api) == null ? void 0 : t.token;
33
- }
34
- const o = {
35
- homepage: /^\/$/,
36
- page: /(?:^|\/)pages\/[^/]+$/,
37
- blog: /(?:^|\/)blogs\/(?<blogHandle>[^/]+)\/?$/,
38
- article: /^\/blogs\/[^/]+\/(?<article>[^/]+)\/?$/,
39
- cart: /(?:^|\/)cart\/[^/]+$/,
40
- checkout: /^\/checkout\/.+/,
41
- appProxy: /^\/(?:a|apps|community|tools)\/(?<proxyTarget>[^/]+)/,
42
- accountWildcard: /^\/account\/.+/,
43
- accountLogin: /^\/account\/login(?:\/|$)/,
44
- accountRegister: /^\/account\/register(?:\/|$)/
45
- }, n = (e, t) => t ? !!e.exec(t.pathname) : !1, c = (e, t) => {
46
- if (t) {
47
- const i = e.exec(t.pathname);
48
- if (i)
49
- return i[1];
50
- }
51
- }, p = (e) => {
52
- var t, i;
53
- switch (e) {
54
- case "product":
55
- return ((t = s()) == null ? void 0 : t.handle) ?? !1;
56
- case "collection":
57
- return ((i = u()) == null ? void 0 : i.handle) ?? !1;
58
- default:
59
- return !1;
60
- }
61
- }, g = {
62
- // Pages
63
- "is-page": ({ location: e }) => n(o.page, e),
64
- "get-page-handle": ({ location: e }) => c(o.page, e),
65
- // Products
66
- "is-product-page": () => !!p("product"),
67
- "get-product-handle": () => p("product"),
68
- // Collections
69
- "is-collection-page": () => !!p("collection"),
70
- "get-collection-handle": () => p("collection"),
71
- // Blogs
72
- "is-blog-page": ({ location: e }) => n(o.blog, e),
73
- "get-blog-handle": ({ location: e }) => c(o.blog, e),
74
- // Blog Articles
75
- "is-article-page": ({ location: e }) => n(o.article, e),
76
- "get-article-handle": ({ location: e }) => c(o.article, e),
77
- // Apps
78
- "is-app-proxy-page": ({ location: e }) => n(o.appProxy, e),
79
- "get-app-proxy-handle": ({ location: e }) => c(o.appProxy, e),
80
- // Account
81
- "is-account-page": ({ location: e }) => n(o.accountWildcard, e),
82
- "is-login-page": ({ location: e }) => n(o.accountLogin, e),
83
- "is-register-page": ({ location: e }) => n(o.accountRegister, e),
84
- // Cart
85
- "is-cart-page": ({ location: e }) => n(o.cart, e),
86
- // Checkout
87
- "is-checkout-page": ({ location: e }) => n(o.checkout, e),
88
- // Homepage
89
- "is-homepage": ({ location: e }) => n(o.homepage, e)
90
- };
91
- function l() {
92
- if (!r() || !window.Shopify)
93
- throw new Error(
94
- "Shopify global object not found. This plugin must be used on a Shopify storefront page."
95
- );
96
- return window.Shopify;
97
- }
98
- function f(e) {
99
- var t, i;
100
- return typeof ((i = (t = l()) == null ? void 0 : t.analytics) == null ? void 0 : i.publish) == "function";
101
- }
102
- const w = () => ({
103
- name: "shopify",
104
- setup: (e) => {
105
- Object.entries(g).forEach(([t, i]) => {
106
- e.registerPredicate(`shopify-${t}`, i);
107
- }), r() && e.eventBus.watch((t) => {
108
- f() && t.type === "session" && window.Shopify.analytics.publish("picked:session", {
109
- id: t.id
110
- });
111
- });
112
- }
113
- });
114
- export {
115
- a as getPickedConfig,
116
- u as getPickedConfigCollection,
117
- P as getPickedConfigCustomer,
118
- b as getPickedConfigExperiments,
119
- s as getPickedConfigProduct,
120
- k as getPickedConfigStorefrontApiToken,
121
- l as getShopify,
122
- w as shopifyPlugin
123
- };
@@ -1,49 +0,0 @@
1
- interface EventPayload {
2
- [key: string]: string | number | boolean | null | undefined | EventPayload | Array<string | number | boolean | null | undefined | EventPayload>;
3
- }
4
- export interface Shopify {
5
- shop: string;
6
- locale: string;
7
- currency: {
8
- active: string;
9
- rate: string;
10
- };
11
- country: string;
12
- theme: {
13
- name: string;
14
- id: number;
15
- schema_name: string;
16
- schema_version: string;
17
- theme_store_id: number | null;
18
- role: string;
19
- handle: string;
20
- style: {
21
- id: number | null;
22
- handle: string | null;
23
- };
24
- };
25
- routes: {
26
- root: string;
27
- };
28
- PaymentButton: {
29
- isStorefrontPortableWallets: boolean;
30
- };
31
- analytics?: {
32
- publish?: (event: string, payload: EventPayload) => void;
33
- };
34
- }
35
- declare global {
36
- interface Window {
37
- Shopify?: Shopify;
38
- }
39
- }
40
- export declare function getShopify(): Shopify;
41
- export declare function supportsShopifyAnalytics(w: Window): w is Window & {
42
- Shopify: {
43
- analytics: {
44
- publish: (event: string, payload: EventPayload) => void;
45
- };
46
- };
47
- };
48
- export {};
49
- //# sourceMappingURL=global-obj.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"global-obj.d.ts","sourceRoot":"","sources":["../../../../src/plugins/shopify/global-obj.ts"],"names":[],"mappings":"AAEA,UAAU,YAAY;IACpB,CAAC,GAAG,EAAE,MAAM,GACR,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,GACT,YAAY,GACZ,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,YAAY,CAAC,CAAA;CACvE;AAED,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE;QACR,MAAM,EAAE,MAAM,CAAA;QACd,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IACD,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAA;QACZ,EAAE,EAAE,MAAM,CAAA;QACV,WAAW,EAAE,MAAM,CAAA;QACnB,cAAc,EAAE,MAAM,CAAA;QACtB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;QAC7B,IAAI,EAAE,MAAM,CAAA;QACZ,MAAM,EAAE,MAAM,CAAA;QACd,KAAK,EAAE;YACL,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;YACjB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;SACtB,CAAA;KACF,CAAA;IACD,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IACD,aAAa,EAAE;QACb,2BAA2B,EAAE,OAAO,CAAA;KACrC,CAAA;IACD,SAAS,CAAC,EAAE;QACV,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,KAAK,IAAI,CAAA;KACzD,CAAA;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,OAAO,CAAC,EAAE,OAAO,CAAA;KAClB;CACF;AAED,wBAAgB,UAAU,YAQzB;AAED,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,IAAI,MAAM,GAAG;IACjE,OAAO,EAAE;QAAE,SAAS,EAAE;YAAE,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,KAAK,IAAI,CAAA;SAAE,CAAA;KAAE,CAAA;CACpF,CAEA"}
@@ -1,6 +0,0 @@
1
- export { shopifyPlugin } from './plugin';
2
- export { getPickedConfig, getPickedConfigCollection, getPickedConfigCustomer, getPickedConfigExperiments, getPickedConfigProduct, getPickedConfigStorefrontApiToken, } from './picked-config';
3
- export type * from './picked-config';
4
- export { getShopify } from './global-obj';
5
- export type * from './global-obj';
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/shopify/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAGxC,OAAO,EACL,eAAe,EACf,yBAAyB,EACzB,uBAAuB,EACvB,0BAA0B,EAC1B,sBAAsB,EACtB,iCAAiC,GAClC,MAAM,iBAAiB,CAAA;AACxB,mBAAmB,iBAAiB,CAAA;AAGpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,mBAAmB,cAAc,CAAA"}
@@ -1,103 +0,0 @@
1
- import { CreateClientOptions } from '../../index';
2
- export interface PickedConfigExperiment {
3
- enabled: boolean;
4
- id: string;
5
- name: string;
6
- version: number;
7
- weight: number;
8
- }
9
- export type PickedConfigCollection = Partial<{
10
- title: string;
11
- id: number;
12
- handle: string;
13
- }>;
14
- export type PickedConfigProductVariant = Partial<{
15
- available: boolean;
16
- title: string;
17
- id: number;
18
- price: number;
19
- inventory_quantity: number;
20
- option1: string;
21
- }>;
22
- export type PickedConfigProductCollection = Partial<{
23
- id: number;
24
- }>;
25
- export type MetafieldValue = string | number | boolean | null | undefined;
26
- export interface MetafieldObject {
27
- [key: string]: MetafieldValue | MetafieldObject | MetafieldValue[] | MetafieldObject[];
28
- }
29
- export type PickedConfigProduct = Partial<{
30
- available: boolean;
31
- collections: PickedConfigProductCollection[];
32
- featured_image: string;
33
- handle: string;
34
- id: number;
35
- metafields: MetafieldObject;
36
- price: number;
37
- tags: string[];
38
- title: string;
39
- type: string;
40
- url: string;
41
- variants: PickedConfigProductVariant[];
42
- vendor: string;
43
- }>;
44
- export type PickedConfigCustomer = Partial<{
45
- accepts_marketing: boolean;
46
- email: string;
47
- first_name: string | null;
48
- has_account: boolean;
49
- id: number;
50
- last_name: string | null;
51
- orders_count: number;
52
- phone: string | null;
53
- tax_exempt: boolean;
54
- }>;
55
- export interface ShopifyPickedConfig {
56
- customer?: PickedConfigCustomer;
57
- product?: PickedConfigProduct;
58
- collection?: PickedConfigCollection;
59
- experiments?: PickedConfigExperiment[];
60
- storefront_api?: {
61
- token?: string;
62
- };
63
- }
64
- declare global {
65
- interface Window {
66
- pickedConfig?: Readonly<Partial<CreateClientOptions> & ShopifyPickedConfig>;
67
- }
68
- }
69
- export declare function getPickedConfig(): Readonly<Partial<CreateClientOptions> & ShopifyPickedConfig> | undefined;
70
- export declare function getPickedConfigCustomer(): Partial<{
71
- accepts_marketing: boolean;
72
- email: string;
73
- first_name: string | null;
74
- has_account: boolean;
75
- id: number;
76
- last_name: string | null;
77
- orders_count: number;
78
- phone: string | null;
79
- tax_exempt: boolean;
80
- }> | undefined;
81
- export declare function getPickedConfigProduct(): Partial<{
82
- available: boolean;
83
- collections: PickedConfigProductCollection[];
84
- featured_image: string;
85
- handle: string;
86
- id: number;
87
- metafields: MetafieldObject;
88
- price: number;
89
- tags: string[];
90
- title: string;
91
- type: string;
92
- url: string;
93
- variants: PickedConfigProductVariant[];
94
- vendor: string;
95
- }> | undefined;
96
- export declare function getPickedConfigCollection(): Partial<{
97
- title: string;
98
- id: number;
99
- handle: string;
100
- }> | undefined;
101
- export declare function getPickedConfigExperiments(): PickedConfigExperiment[] | undefined;
102
- export declare function getPickedConfigStorefrontApiToken(): string | undefined;
103
- //# sourceMappingURL=picked-config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"picked-config.d.ts","sourceRoot":"","sources":["../../../../src/plugins/shopify/picked-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAGtD,MAAM,WAAW,sBAAsB;IAErC,OAAO,EAAE,OAAO,CAAA;IAGhB,EAAE,EAAE,MAAM,CAAA;IAGV,IAAI,EAAE,MAAM,CAAA;IAGZ,OAAO,EAAE,MAAM,CAAA;IAGf,MAAM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gB,0BAA0B,yCAMzC;AAED,wBAAgB,iCAAiC,uBAMhD"}
@@ -1,3 +0,0 @@
1
- import { Plugin } from '../../entities/plugin/plugin';
2
- export declare const shopifyPlugin: () => Plugin;
3
- //# sourceMappingURL=plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/shopify/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAM1D,eAAO,MAAM,aAAa,QAAO,MA0BhC,CAAA"}
@@ -1,42 +0,0 @@
1
- import { StateSnapshot } from '../../utils/state-snaphot';
2
- export declare const evaluatePathname: (regexPattern: RegExp, location?: StateSnapshot["location"]) => boolean;
3
- /**
4
- * Evaluate handle from path using regex pattern
5
- *
6
- * @param regexPattern Regex pattern to extract handle
7
- * @param location Location object containing pathname
8
- * @returns handle string or undefined
9
- */
10
- export declare const evaluateHandleByPath: (regexPattern: RegExp, location?: StateSnapshot["location"]) => string | undefined;
11
- /**
12
- * Evaluate handle from pickedConfig based on type
13
- *
14
- * @param type page type: 'product' | 'collection'
15
- * @returns handle string or undefined
16
- */
17
- export declare const evaluateHandleByType: (type: "product" | "collection") => string | false;
18
- interface PredicateArgs {
19
- location?: StateSnapshot['location'];
20
- }
21
- export declare const shopifyPredicates: {
22
- 'is-page': ({ location }: PredicateArgs) => boolean;
23
- 'get-page-handle': ({ location }: PredicateArgs) => string | undefined;
24
- 'is-product-page': () => boolean;
25
- 'get-product-handle': () => string | false;
26
- 'is-collection-page': () => boolean;
27
- 'get-collection-handle': () => string | false;
28
- 'is-blog-page': ({ location }: PredicateArgs) => boolean;
29
- 'get-blog-handle': ({ location }: PredicateArgs) => string | undefined;
30
- 'is-article-page': ({ location }: PredicateArgs) => boolean;
31
- 'get-article-handle': ({ location }: PredicateArgs) => string | undefined;
32
- 'is-app-proxy-page': ({ location }: PredicateArgs) => boolean;
33
- 'get-app-proxy-handle': ({ location }: PredicateArgs) => string | undefined;
34
- 'is-account-page': ({ location }: PredicateArgs) => boolean;
35
- 'is-login-page': ({ location }: PredicateArgs) => boolean;
36
- 'is-register-page': ({ location }: PredicateArgs) => boolean;
37
- 'is-cart-page': ({ location }: PredicateArgs) => boolean;
38
- 'is-checkout-page': ({ location }: PredicateArgs) => boolean;
39
- 'is-homepage': ({ location }: PredicateArgs) => boolean;
40
- };
41
- export {};
42
- //# sourceMappingURL=predicates.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"predicates.d.ts","sourceRoot":"","sources":["../../../../src/plugins/shopify/predicates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAmB9D,eAAO,MAAM,gBAAgB,GAC3B,cAAc,MAAM,EACpB,WAAW,aAAa,CAAC,UAAU,CAAC,KACnC,OAMF,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAC/B,cAAc,MAAM,EACpB,WAAW,aAAa,CAAC,UAAU,CAAC,uBAQrC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAAI,MAAM,SAAS,GAAG,YAAY,mBASlE,CAAA;AAED,UAAU,aAAa;IACrB,QAAQ,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAA;CACrC;AAED,eAAO,MAAM,iBAAiB;8BAEF,aAAa;sCACL,aAAa;;;;;mCAQhB,aAAa;sCACV,aAAa;sCAEb,aAAa;yCACV,aAAa;wCAGd,aAAa;2CACV,aAAa;sCAGlB,aAAa;oCAEf,aAAa;uCACV,aAAa;mCAGjB,aAAa;uCAET,aAAa;kCAElB,aAAa;CAC5C,CAAA"}