@gem-sdk/core 22.0.0-dev.54 → 22.0.0-dev.63
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/components/ComponentToolbarPreview.js +1 -1
- package/dist/cjs/components/ComponentWrapperPreview.js +1 -1
- package/dist/cjs/components/InteractionSuffix.js +1 -1
- package/dist/cjs/components/Render.liquid.js +5 -5
- package/dist/cjs/components/RenderCustomCode.js +2 -2
- package/dist/cjs/components/resize/Spacing.js +1 -1
- package/dist/cjs/components/theme-section/CreateThemeSection.js +1 -1
- package/dist/cjs/components/theme-section/ThemeSectionTooltip.js +1 -1
- package/dist/cjs/components/upgrade-element/UpgradeButton.js +1 -1
- package/dist/cjs/components/upgrade-element/UpgradeElement.js +1 -1
- package/dist/cjs/constants/plan.js +1 -0
- package/dist/cjs/contexts/ProductContext.js +1 -1
- package/dist/cjs/graphql-shopify/product-detail.generated.js +110 -0
- package/dist/cjs/graphql-shopify/product-medias.generated.js +80 -0
- package/dist/cjs/graphql-shopify/product-variants.generated.js +107 -0
- package/dist/cjs/helpers/builder-api-bridge/BridgeRequestError.js +1 -0
- package/dist/cjs/helpers/builder-api-bridge/contract.js +1 -0
- package/dist/cjs/helpers/builder-api-bridge/createBuilderApiFetcher.js +1 -0
- package/dist/cjs/helpers/builder-api-bridge/requestBridgeGraphql.js +1 -0
- package/dist/cjs/helpers/convert.js +1 -1
- package/dist/cjs/helpers/interaction/index.js +1 -1
- package/dist/cjs/helpers/queries/get-shopify-product.js +1 -0
- package/dist/cjs/hooks/useAnimations.js +1 -1
- package/dist/cjs/hooks/useInitialSwatchesOptions.js +1 -1
- package/dist/cjs/hooks/useProduct.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/esm/components/ComponentToolbarPreview.js +1 -1
- package/dist/esm/components/ComponentWrapperPreview.js +1 -1
- package/dist/esm/components/InteractionSuffix.js +1 -1
- package/dist/esm/components/Render.liquid.js +9 -9
- package/dist/esm/components/RenderCustomCode.js +3 -3
- package/dist/esm/components/resize/Spacing.js +1 -1
- package/dist/esm/components/theme-section/CreateThemeSection.js +1 -1
- package/dist/esm/components/theme-section/ThemeSectionTooltip.js +1 -1
- package/dist/esm/components/upgrade-element/UpgradeButton.js +1 -1
- package/dist/esm/components/upgrade-element/UpgradeElement.js +1 -1
- package/dist/esm/constants/plan.js +1 -0
- package/dist/esm/contexts/ProductContext.js +1 -1
- package/dist/esm/graphql-shopify/product-detail.generated.js +110 -0
- package/dist/esm/graphql-shopify/product-medias.generated.js +80 -0
- package/dist/esm/graphql-shopify/product-variants.generated.js +107 -0
- package/dist/esm/helpers/builder-api-bridge/BridgeRequestError.js +1 -0
- package/dist/esm/helpers/builder-api-bridge/contract.js +1 -0
- package/dist/esm/helpers/builder-api-bridge/createBuilderApiFetcher.js +1 -0
- package/dist/esm/helpers/builder-api-bridge/requestBridgeGraphql.js +1 -0
- package/dist/esm/helpers/convert.js +1 -1
- package/dist/esm/helpers/interaction/index.js +1 -1
- package/dist/esm/helpers/queries/get-shopify-product.js +1 -0
- package/dist/esm/hooks/useAnimations.js +1 -1
- package/dist/esm/hooks/useInitialSwatchesOptions.js +1 -1
- package/dist/esm/hooks/useProduct.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/types/index.d.ts +47 -1
- package/package.json +5 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e;import{BridgeRequestError as r}from"./BridgeRequestError.js";import{API_EVENTS as t,BRIDGE_VERSION as o}from"./contract.js";let n=new Map,i=new Map,s=r=>{e||(e=r,r.addEventListener(t.response,f),r.addEventListener(t.ready,p))},a=e=>{let r=n.delete(e.requestId)||i.delete(e.requestId);return!!r},d=(e,r)=>{a(e)&&e.resolve(r)},l=(e,t,o)=>{a(e)&&e.reject(new r(e.requestId,t,o))},u=r=>{let o=e;o&&!r.sent&&(i.set(r.requestId,r),o.dispatchEvent(new CustomEvent(t.request,{detail:r.detail})),r.sent=!0)};function p(r){let t=e;if(t&&r.detail?.version===o)for(let e of[...n.values()])n.delete(e.requestId)&&u(e)}function f(e){let r=e.detail;if(!r||"object"!=typeof r||r.version!==o||"string"!=typeof r.requestId)return;let t=i.get(r.requestId);if(!t||"boolean"!=typeof r.ok||!Object.prototype.hasOwnProperty.call(r,"data"))return;if(r.ok){d(t,r.data);return}let n=r.data;"string"==typeof n?.error?.code&&"string"==typeof n.error.message&&l(t,n.error,n.partialData)}let c=(e,r)=>{if(null===e||"object"!=typeof e)throw Error("The bridge request must be an object.");let{api:t,query:n,variables:i,operationName:s}=e;if("app"!==t)throw Error("The bridge request must target the app API.");if("string"!=typeof n||0===n.length)throw Error("The bridge request requires a nonempty query string.");if(void 0!==s&&("string"!=typeof s||!s))throw Error("operationName must be a nonempty string when supplied.");if(void 0!==i&&(null===i||"object"!=typeof i||Array.isArray(i)))throw Error("Query variables must be an object when supplied.");let a={version:o,requestId:r,api:t,query:n};return void 0!==s&&(a.operationName=s),void 0!==i&&(a.variables=i),a},w=()=>"function"==typeof window.crypto?.randomUUID?window.crypto.randomUUID():`bridge-${Date.now()}-${Math.random().toString(36).slice(2)}`;function y(e){let i;if("undefined"==typeof window)return Promise.reject(new r("server",{code:"BRIDGE_UNAVAILABLE",message:"The editor bridge requires a browser."}));let a=window,d=w();try{i=c(e,d)}catch(e){return Promise.reject(new r(d,{code:"INVALID_REQUEST",message:e instanceof Error?e.message:"The bridge request is invalid."}))}let l=a.bridgeReady;return new Promise((e,r)=>{let p={requestId:d,detail:i,resolve:r=>e(r),reject:r,sent:!1};s(a),l?u(p):(n.set(d,p),a.dispatchEvent(new CustomEvent(t.readyRequest,{detail:{version:o}})))})}export{y as requestBridgeGraphql};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let e="local"===process.env.NEXT_CONVERT_ENV,s=process.env.GP_BASE_ASSET_URL||"https://assets.gemcommerce.com";export{s as baseAssetURL,e as isLocalEnv};
|
|
1
|
+
let e="local"===process.env.NEXT_CONVERT_ENV,s=process.env.GP_BASE_ASSET_URL||"https://assets.gemcommerce.com",c="true"===process.env.IS_LIQUID;export{c as IS_LIQUID,s as baseAssetURL,e as isLocalEnv};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{useRef as e,useMemo as t,useCallback as r}from"react";import"react/jsx-runtime";import"zustand";import{usePageStore as i}from"../../contexts/PageContext.js";import"react-transition-group";import"../../components/constant.js";import"swr";import"@gem-sdk/core";import"../../graphql/queries/collection-detail-filter.generated.js";import"../../graphql/queries/collection.generated.js";import"../../graphql/queries/collections.generated.js";import"../../graphql/queries/published-theme-pages.generated.js";import"../../graphql/queries/store-property.generated.js";import"../../graphql/queries/preview-page.generated.js";import"../../graphql/queries/published-shop-metas.generated.js";import"../../graphql/queries/shop-shopify.generated.js";import"../../graphql/queries/articles.generated.js";import"../../graphql/queries/blogs.generated.js";import"../../graphql/queries/products-with-selling-plans.generated.js";import"../../graphql/queries/product-variant-with-selling-plans.generated.js";import"../../graphql/queries/product-variants.generated.js";import"../../graphql/queries/product-little-detail.generated.js";import"../../graphql/queries/product-medias.generated.js";import"../../graphql/queries/productsV2.generated.js";import"../convert.js";import"crc-32";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"swr/infinite";import"vanilla-lazyload";import"../../hooks/useCartUI.js";import"../../graphql/queries/product-value-label.generated.js";import"../../hooks/useStickyStore.js";import"../../types/builder.js";import"../../types/custom.js";import"../../types/animations.js";let
|
|
2
|
+
import{useRef as e,useMemo as t,useCallback as r}from"react";import"react/jsx-runtime";import"zustand";import{usePageStore as i}from"../../contexts/PageContext.js";import"react-transition-group";import"../../components/constant.js";import"swr";import"@gem-sdk/core";import"../../graphql/queries/collection-detail-filter.generated.js";import"../../graphql/queries/collection.generated.js";import"../../graphql/queries/collections.generated.js";import"../../graphql/queries/published-theme-pages.generated.js";import"../../graphql/queries/store-property.generated.js";import"../../graphql/queries/preview-page.generated.js";import"../../graphql/queries/published-shop-metas.generated.js";import"../../graphql/queries/shop-shopify.generated.js";import"../../graphql/queries/articles.generated.js";import"../../graphql/queries/blogs.generated.js";import"../../graphql/queries/products-with-selling-plans.generated.js";import"../../graphql/queries/product-variant-with-selling-plans.generated.js";import"../../graphql/queries/product-variants.generated.js";import"../../graphql/queries/product-little-detail.generated.js";import"../../graphql/queries/product-medias.generated.js";import"../../graphql/queries/productsV2.generated.js";import"../../graphql-shopify/product-detail.generated.js";import"../../graphql-shopify/product-medias.generated.js";import"../../graphql-shopify/product-variants.generated.js";import"../convert.js";import"crc-32";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"swr/infinite";import"vanilla-lazyload";import"../../hooks/useCartUI.js";import"../../graphql/queries/product-value-label.generated.js";import"../../hooks/useStickyStore.js";import"../../types/builder.js";import"../../types/custom.js";import"../../types/animations.js";let a=()=>{let a=e(),n=i(e=>e.setInteractionIsSelectOnPage),o=i(e=>e.sidebarMode),s=i(e=>e.interactionData?.selectType),p=i(e=>e.interactionData);function l(e,t){return!(e instanceof Document)&&e?.matches(t)?e:e?.querySelector(t)}let d=(e,t,r)=>{let i=e=>{let t=e.detail;r&&r(t)};return e.addEventListener(t,i),()=>e.removeEventListener(t,i)},c=t(()=>"interaction"===o&&(!p?.isSelectOnPage||"PAGE"===s),[o,p?.isSelectOnPage,s]),g=t(()=>p?.isSelectOnPage,[p?.isSelectOnPage]),u=r(e=>{if(window.interactionLoaded){e();return}window.addEventListener("gp:flow-actions-loaded",()=>{e()})},[]);return{onListener:({event:e,selector:t,elementRef:r},i)=>{let n=l(r?.current||a.current||document,t);if(n)return d(n,e,i)},trigger:({event:e,data:t,selector:r,element:i})=>{let a=i||document.body?.querySelector(r);if(!a)return;let n=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:{data:t}});a.dispatchEvent(n)},saveToElementInteractionData:(e,t,r)=>{if(!e)return;let i=e.getAttribute("gp-data-interaction"),a=JSON.parse(i||"{}");e.setAttribute("gp-data-interaction",JSON.stringify({...a,[t]:r}))},closeSelectOnPage:()=>{n(!1);let e=new CustomEvent("editor:interaction:change-select-on-page",{bubbles:!0,detail:!1});window.dispatchEvent(e)},ref:a,findElementIncludingSelf:l,getInteractionPreviousData:(e,t)=>{let r=e.getAttribute("gp-data-interaction"),i=JSON.parse(r||"{}");return{previousData:i[t],interactionDataJson:i}},changeSelectMode:e=>{let t=new CustomEvent("editor:interaction:change-select-mode",{bubbles:!0,detail:e});window.dispatchEvent(t)},selectInteractionElement:({componentUid:e,settingType:t,$target:r})=>{let i=new CustomEvent("editor:interaction:select-element",{bubbles:!0,detail:{componentUid:e,settingType:t,$target:r}});window.dispatchEvent(i)},isInteractionMode:c,isSelectOnPage:g,interactionListenerLoaded:u}};export{a as useInteraction};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ShopifyProductDetailDocument as e}from"../../graphql-shopify/product-detail.generated.js";import{ShopifyProductMediasDocument as t}from"../../graphql-shopify/product-medias.generated.js";import{ShopifyProductVariantsDocument as i}from"../../graphql-shopify/product-variants.generated.js";let r=e=>e.slice(e.lastIndexOf("/")+1),d=async(d,{id:o}={})=>{let n=!o||"latest"===o.toLowerCase();if(!n&&!/^(?:gid:\/\/shopify\/Product\/)?\d+$/.test(o))throw Error("Invalid Shopify product ID");let s={first:1,query:n?"status:active":`id:${r(o)}`,sortKey:"CREATED_AT",reverse:!0},p=await d([e.toString(),s]),u=p.product?.edges?.[0]?.node;if(!u)throw Error("Product not found");let[c,m]=await Promise.all([a(async e=>{let t=await d([i.toString(),{first:50,query:`product_id:${r(u.id)}`,after:e,sortKey:"POSITION",reverse:!1}]);return t.variants}),a(async e=>{let i=await d([t.toString(),{first:1,query:`id:${r(u.id)}`,afterMedia:e,sortKeyMedia:"POSITION",reverseMedia:!1}]);return i.medias?.edges?.[0]?.node?.media})]);return l({product:u,variants:c,medias:m})},a=async(e,t)=>{let i=[],r=new Set,d=async t=>{if(!t)return i;i.push(...t.edges);let{hasNextPage:a,endCursor:o}=t.pageInfo;return!a||!o||r.has(o)?i:(r.add(o),d(await e(o)))};try{return await d(t??await e())}catch(e){if(0===i.length)throw e;return i}},o=(e,t)=>({id:r(e.id??t),baseID:e.id??t,contentType:"IMAGE",src:e.url,previewImage:e.url,width:e.width??void 0,height:e.height??void 0,alt:e.altText??void 0}),n=e=>{let t=e.preview?.image,i="image"in e?e.image:void 0,d="sources"in e?e.sources.find(e=>"mp4"===e.format.toLowerCase())??e.sources[0]:void 0;return{id:r(e.id),baseID:e.id,contentType:e.mediaContentType,src:i?.url??("embedUrl"in e?e.embedUrl:d?.url),previewImage:t?.url??i?.url,width:i?.width??(d&&"width"in d&&"number"==typeof d.width?d.width:t?.width)??void 0,height:i?.height??(d&&"height"in d&&"number"==typeof d.height?d.height:t?.height)??void 0,alt:e.alt??i?.altText??t?.altText??void 0}},s=e=>{let t=e.media.nodes[0],i=t?n(t):e.image?o(e.image,e.id):void 0;return{id:r(e.id),baseID:e.id,title:e.title,barcode:e.barcode??void 0,sku:e.sku??void 0,price:String(e.price),salePrice:null==e.compareAtPrice?void 0:String(e.compareAtPrice),costPrice:e.inventoryItem.unitCost?.amount,inventoryPolicy:e.inventoryPolicy,inventoryQuantity:e.inventoryQuantity??void 0,manageInventory:e.inventoryItem.tracked,isDigital:!e.inventoryItem.requiresShipping,weight:e.inventoryItem.measurement.weight?.value,platform:"SHOPIFY",selectedOptions:e.selectedOptions.map(({name:e,value:t})=>({name:e,value:t})),mediaId:i?.id??"",media:i}},l=({product:e,variants:t,medias:i})=>({id:r(e.id),baseID:e.id,title:e.title,handle:e.handle,description:e.description,descriptionHtml:e.descriptionHtml,createdAt:e.createdAt,vendor:e.vendor,tags:e.tags,isSample:!1,sku:t[0]?.node.sku??void 0,featuredImage:e.featuredMedia?n(e.featuredMedia):void 0,options:e.options.map(e=>({id:e.id,name:e.name,values:e.optionValues.map(e=>({id:r(e.id),baseID:e.id,label:e.name}))})),variants:{edges:t.map(({cursor:e,node:t})=>({cursor:e,node:s(t)}))},medias:{edges:i.map(({cursor:e,node:t})=>({cursor:e,node:n(t)}))},collections:{edges:e.collections.edges.map(({node:e})=>({node:{id:e.id,handle:e.handle,title:e.title}}))}});export{d as getShopifyProduct};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{animations as e}from"../helpers/animations.js";import"react";import"react/jsx-runtime";import"zustand";import"swr";import"../graphql/queries/articles.generated.js";import"../graphql/queries/blogs.generated.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"../graphql/queries/collection-detail-filter.generated.js";import"../graphql/queries/collection.generated.js";import"../graphql/queries/collections.generated.js";import"../graphql/queries/published-theme-pages.generated.js";import"../graphql/queries/store-property.generated.js";import"../graphql/queries/preview-page.generated.js";import"../graphql/queries/published-shop-metas.generated.js";import"../graphql/queries/shop-shopify.generated.js";import"../graphql/queries/products-with-selling-plans.generated.js";import"../graphql/queries/product-variant-with-selling-plans.generated.js";import"../graphql/queries/product-variants.generated.js";import"../graphql/queries/product-little-detail.generated.js";import"../graphql/queries/product-medias.generated.js";import"swr/infinite";import"../graphql/queries/productsV2.generated.js";import"vanilla-lazyload";import"./useCartUI.js";import"../graphql/queries/product-value-label.generated.js";import"./useStickyStore.js";import"../types/builder.js";import"../types/custom.js";import"../types/animations.js";import"react-transition-group";import"../components/constant.js";import"@gem-sdk/core";import"../helpers/convert.js";import"crc-32";let r=()=>{let{zoom:r,shake:t,fade:i,slide:
|
|
2
|
+
import{animations as e}from"../helpers/animations.js";import"react";import"react/jsx-runtime";import"zustand";import"swr";import"../graphql/queries/articles.generated.js";import"../graphql/queries/blogs.generated.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"../graphql/queries/collection-detail-filter.generated.js";import"../graphql/queries/collection.generated.js";import"../graphql/queries/collections.generated.js";import"../graphql/queries/published-theme-pages.generated.js";import"../graphql/queries/store-property.generated.js";import"../graphql/queries/preview-page.generated.js";import"../graphql/queries/published-shop-metas.generated.js";import"../graphql/queries/shop-shopify.generated.js";import"../graphql/queries/products-with-selling-plans.generated.js";import"../graphql/queries/product-variant-with-selling-plans.generated.js";import"../graphql/queries/product-variants.generated.js";import"../graphql/queries/product-little-detail.generated.js";import"../graphql/queries/product-medias.generated.js";import"swr/infinite";import"../graphql/queries/productsV2.generated.js";import"vanilla-lazyload";import"./useCartUI.js";import"../graphql/queries/product-value-label.generated.js";import"./useStickyStore.js";import"../types/builder.js";import"../types/custom.js";import"../types/animations.js";import"react-transition-group";import"../components/constant.js";import"@gem-sdk/core";import"../graphql-shopify/product-detail.generated.js";import"../graphql-shopify/product-medias.generated.js";import"../graphql-shopify/product-variants.generated.js";import"../helpers/convert.js";import"crc-32";let r=()=>{let{zoom:r,shake:t,fade:i,slide:p}=e();return{zoom:r,shake:t,fade:i,slide:p}};export{r as useAnimations};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"swr";import{ProductOptionNameDocument as r}from"../graphql/queries/product-value-label.generated.js";import{colorPreset as t}from"../components/src/product/helpers/variant-presets.js";import{useSwatches as o}from"./shop.js";import{useFetchHandle as
|
|
1
|
+
import e from"swr";import{ProductOptionNameDocument as r}from"../graphql/queries/product-value-label.generated.js";import{colorPreset as t}from"../components/src/product/helpers/variant-presets.js";import{useSwatches as o}from"./shop.js";import{useFetchHandle as i}from"./useFetchHandle.js";import{useShopStore as s}from"../contexts/ShopContext.js";import"react";import"react/jsx-runtime";import"zustand";import"../graphql/queries/articles.generated.js";import"../graphql/queries/blogs.generated.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"../graphql/queries/collection-detail-filter.generated.js";import"../graphql/queries/collection.generated.js";import"../graphql/queries/collections.generated.js";import"../graphql/queries/published-theme-pages.generated.js";import"../graphql/queries/store-property.generated.js";import"../graphql/queries/preview-page.generated.js";import"../graphql/queries/published-shop-metas.generated.js";import"../graphql/queries/shop-shopify.generated.js";import"../graphql/queries/products-with-selling-plans.generated.js";import"../graphql/queries/product-variant-with-selling-plans.generated.js";import"../graphql/queries/product-variants.generated.js";import"../graphql/queries/product-little-detail.generated.js";import"../graphql/queries/product-medias.generated.js";import"swr/infinite";import"../graphql/queries/productsV2.generated.js";import"vanilla-lazyload";import"./useCartUI.js";import"./useStickyStore.js";import"../types/builder.js";import"../types/custom.js";import"../types/animations.js";import"react-transition-group";import"../components/constant.js";import"@gem-sdk/core";import p from"../helpers/is-browser.js";import"../graphql-shopify/product-detail.generated.js";import"../graphql-shopify/product-medias.generated.js";import"../graphql-shopify/product-variants.generated.js";import"../helpers/convert.js";import"crc-32";let a=!1,l=!1,n=r=>{let t=i(),n=s(e=>e.changeSwatches),{swatches:m}=o(),{data:u}=e(["/query/productOptionName",{productOptionName:[]}],async()=>c(t),{revalidateOnMount:!0}),d=[];if(m?.forEach(e=>{d.push(e.optionTitle)}),u?.productOptionName?.forEach(e=>{d.includes(e)||(a=!0,m?.push({optionTitle:e,optionType:"rectangle_list",optionValues:[]}))}),!r)return[];g(m,r),p()&&m?.length&&(a||l)&&(window?.parent?.postMessage?.(JSON.stringify({type:"update-swatches",swatches:m}),"*"),n(m)),a=!1},m=(e,r)=>{let o=e?t[e.toLocaleLowerCase()]:void 0,i=o?[o]:[],s=r?.[0];return!s&&i.length&&(l=!0),s?[s]:i},u=(e,r)=>{let t=[],o=e.find(e=>e.name===r);return o?.values.forEach(e=>{e.label&&!t.includes(e.label)&&t.push(e.label)}),t},d=e=>{let r=[];return e.forEach(e=>{e.label&&!r.includes(e.label)&&r.push(e.label)}),r},g=(e,r)=>(e&&e?.map(e=>{let t=u(r,e.optionTitle),o=d(e.optionValues);t.forEach(r=>{o.includes(r)||e.optionValues.push({label:r,colors:m(r),imageUrl:""})}),e.optionValues=e.optionValues.map(e=>(void 0===e.imageUrl&&(a=!0),{label:e.label??"",colors:m(e.label,e.colors),imageUrl:e.imageUrl??""}))}),e),c=async e=>{let t=async t=>{let o=await e([r.toString(),t]);return o};return t({})};export{n as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{useMemo as e,useCallback as t,useEffect as r}from"react";import{useProductStore as i}from"../contexts/ProductContext.js";import"react/jsx-runtime";import"zustand";import{usePageStore as o}from"../contexts/PageContext.js";import"swr";import"../graphql/queries/articles.generated.js";import"../graphql/queries/blogs.generated.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"../graphql/queries/collection-detail-filter.generated.js";import"../graphql/queries/collection.generated.js";import"../graphql/queries/collections.generated.js";import"../graphql/queries/published-theme-pages.generated.js";import"../graphql/queries/store-property.generated.js";import"../graphql/queries/preview-page.generated.js";import"../graphql/queries/published-shop-metas.generated.js";import"../graphql/queries/shop-shopify.generated.js";import"../graphql/queries/products-with-selling-plans.generated.js";import"../graphql/queries/product-variant-with-selling-plans.generated.js";import"../graphql/queries/product-variants.generated.js";import"../graphql/queries/product-little-detail.generated.js";import"../graphql/queries/product-medias.generated.js";import"swr/infinite";import"../graphql/queries/productsV2.generated.js";import"vanilla-lazyload";import"./useCartUI.js";import{convertDecimalToNumber as s}from"./useFormatMoney.js";import"../graphql/queries/product-value-label.generated.js";import"./useStickyStore.js";import{checkInStock as
|
|
2
|
+
import{useMemo as e,useCallback as t,useEffect as r}from"react";import{useProductStore as i}from"../contexts/ProductContext.js";import"react/jsx-runtime";import"zustand";import{usePageStore as o}from"../contexts/PageContext.js";import"swr";import"../graphql/queries/articles.generated.js";import"../graphql/queries/blogs.generated.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"../graphql/queries/collection-detail-filter.generated.js";import"../graphql/queries/collection.generated.js";import"../graphql/queries/collections.generated.js";import"../graphql/queries/published-theme-pages.generated.js";import"../graphql/queries/store-property.generated.js";import"../graphql/queries/preview-page.generated.js";import"../graphql/queries/published-shop-metas.generated.js";import"../graphql/queries/shop-shopify.generated.js";import"../graphql/queries/products-with-selling-plans.generated.js";import"../graphql/queries/product-variant-with-selling-plans.generated.js";import"../graphql/queries/product-variants.generated.js";import"../graphql/queries/product-little-detail.generated.js";import"../graphql/queries/product-medias.generated.js";import"swr/infinite";import"../graphql/queries/productsV2.generated.js";import"vanilla-lazyload";import"./useCartUI.js";import{convertDecimalToNumber as s}from"./useFormatMoney.js";import"../graphql/queries/product-value-label.generated.js";import"./useStickyStore.js";import{checkInStock as a}from"../helpers/variant.js";import{useShopifyLink as n}from"./shop/useShopifyLink.js";import"../types/builder.js";import"../types/custom.js";import"../types/animations.js";import"react-transition-group";import"../components/constant.js";import"@gem-sdk/core";import{flattenConnection as p}from"../helpers/flatten-connection.js";import"../graphql-shopify/product-detail.generated.js";import"../graphql-shopify/product-medias.generated.js";import"../graphql-shopify/product-variants.generated.js";import"../helpers/convert.js";import"crc-32";import{getSelectedVariant as u}from"../helpers/product.js";let l=()=>i(e=>e.uiqueId),d=()=>i(e=>e.product),c=()=>i(e=>e.featuredImageGlobal),m=()=>i(e=>e.properties),g=()=>i(e=>e.isSyncProduct),h=()=>{let e=i(e=>e.useProductCompareAtPrice),t=i(e=>e.setUseProductCompareAtPrice);return{useProductCompareAtPrice:e,seUseProductCompareAtPrice:t}},q=()=>{let e=i(e=>e.product),t=e?.baseID?.replace("gid://shopify/Product/",""),{linkEditProduct:r}=n({productId:t});return{linkEditProduct:r,redirectProductShopifyLink:()=>{r&&window.open(r,"_blank")}}},f=()=>{let o=i(e=>e.quantity),s=i(e=>e.updatePrice),a=i(e=>e.decrementQuantity),n=i(e=>e.incrementQuantity),p=i(e=>e.setQuantity),u=i(e=>e.setHasUpdatePriceFollowQuantity),l=i(e=>e.isSyncProduct),d=i(e=>e.product),c=d?.id,m=t(()=>{p(1)},[p]);return r(()=>{if(l){let e=new CustomEvent("set-product-quantity",{bubbles:!0,cancelable:!0,composed:!0,detail:{quantity:o,productId:c}});window.dispatchEvent(e)}},[o,l,c]),e(()=>({quantity:o,hasUpdatePrice:s,increment:n,decrement:a,reset:m,setQuantity:p,setUpdatePrice:u}),[a,n,o,m,p,u,s])},j=()=>{let t=i(e=>e.hasPreSelected),r=i(e=>e.setHasPreSelected);return e(()=>({hasPreSelected:t,setHasPreSelected:r}),[t,r])},y=()=>{let r=i(e=>e.setSelectedOption),o=i(e=>e.selectedOptions),s=i(e=>e.forceSelectedOption),a=i(e=>e.isSyncProduct),n=i(e=>e.isChangeSelectedOption),p=i(e=>e.setIsChangeSelectedOption),u=t((e,t,i,o)=>{if(!o&&a){let r=new CustomEvent("set-selected-option",{bubbles:!0,cancelable:!0,composed:!0,detail:{optionId:e,optionValue:t,productId:i,isManualChange:!0}});window.dispatchEvent(r)}r(e,t),p(!0)},[a,r,p]),l=t((e,t,r,i)=>{if(!r&&a){let r=new CustomEvent("force-selected-option",{bubbles:!0,cancelable:!0,composed:!0,detail:{selectedOption:e,productId:t,isManualChange:i}});window.dispatchEvent(r)}s(e)},[s,a]);return e(()=>({isChangeSelectedOption:n,selectedOptions:o,setSelectedOption:u,forceSelectedOption:l}),[o,u,l])},b=()=>{let e=i(e=>e.product?.variants);return p(e)},P=t=>{let r=b();return e(()=>r?.find(e=>e?.id===t),[t,r])},S=()=>{let{selectedOptions:t}=y(),r=b();return e(()=>u(r,t),[t,r])},v=()=>{let e=S(),t=d();return a(e,t)},w=(e,t,r)=>{let{selectedOptions:i}=y(),o=b(),s=r.optionNumber-1;if(r.position<s)return o.some(r=>{if(r){let{selectedOptions:i}=r,o=i?.some(r=>r?.name===e&&r.value===t),s=a(r);return o&&s}});let n=u(o,{...i,[e]:t});return a(n)},C=(e,t)=>{let r=b();return!!r&&r.some(r=>{if(r){let{selectedOptions:i}=r,o=i?.some(r=>r?.name===e&&r.value===t),s=a(r);return o&&s}return!1})},I=()=>{let e=o(e=>e.productOffers),t=d(),r=S(),i=e?.find(e=>e?.node?.objectBaseID===t?.baseID)?.node;if(!i||!i.isEnabled)return 0;let a=i?.value;if(i&&"PERCENTAGE"===i.valueType&&a){let e=s(r?.price)??0;a=a*e/100}return a||0};export{C as useCheckAvailableVariantInStock,S as useCurrentVariant,v as useCurrentVariantInStock,c as useFeaturedImageGlobal,j as useHasPreSelected,g as useIsSyncProduct,d as useProduct,h as useProductBundleDiscount,I as useProductOfferDiscount,m as useProductProperties,q as useProductShopifyEditLink,f as useQuantity,y as useSelectedOption,l as useUniqProductID,P as useVariant,w as useVariantOutStock,b as useVariants};
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{default as AddOn}from"./components/AddOn.js";export{default as Render}from"./components/Render.js";export{default as RenderPreview}from"./components/RenderPreview.js";export{RenderChildren,default as RenderLiquid,WrapRenderChildren}from"./components/Render.liquid.js";export{AddonProvider,useAddon,useAddons}from"./contexts/AddonContext.js";export{BuilderComponentProvider,useBuilderComponent}from"./contexts/BuilderComponent.js";export{BuilderProvider,useBuilderStore}from"./contexts/BuilderContext.js";export{BuilderPreviewProvider,useBuilderPreviewStore}from"./contexts/BuilderPreviewContext.js";export{CartLineProvider,useCartLineStore}from"./contexts/CartLineContext.js";export{ProductListProvider,useProductListStore}from"./contexts/ProductListContext.js";export{ProductProvider,useProductStore}from"./contexts/ProductContext.js";export{SectionProvider,useSection,useSectionStore}from"./contexts/SectionContext.js";export{ShopProvider,useShopStore}from"./contexts/ShopContext.js";export{PageProvider,usePageStore}from"./contexts/PageContext.js";export{CollectionProvider,useCollectionStore}from"./contexts/CollectionContext.js";export{ModalProvider,useModalStore}from"./contexts/ModalContext.js";export{ArticleListProvider,useArticleListStore}from"./contexts/ArticleListContext.js";export{ArticleProvider,useArticleStore}from"./contexts/ArticleContext.js";export{I18nProvider,useI18nStore}from"./contexts/I18nContext.js";export{CollectionDetailFilterDocument}from"./graphql/queries/collection-detail-filter.generated.js";export{CollectionDocument}from"./graphql/queries/collection.generated.js";export{CollectionsDocument}from"./graphql/queries/collections.generated.js";export{PublishedThemePagesDocument}from"./graphql/queries/published-theme-pages.generated.js";export{StorePropertyDocument}from"./graphql/queries/store-property.generated.js";export{PreviewThemePageDocument}from"./graphql/queries/preview-page.generated.js";export{PublishedShopMetasDocument}from"./graphql/queries/published-shop-metas.generated.js";export{ShopShopifyDocument}from"./graphql/queries/shop-shopify.generated.js";export{ArticlesDocument}from"./graphql/queries/articles.generated.js";export{BlogsDocument}from"./graphql/queries/blogs.generated.js";export{ProductWithSellingPlansSelectFragment,ProductsWithSellingPlansDocument}from"./graphql/queries/products-with-selling-plans.generated.js";export{ProductVariantsWithSellingPlansDocument}from"./graphql/queries/product-variant-with-selling-plans.generated.js";export{LibraryTemplateDocument}from"./graphql-app-api/queries/LibraryTemplate.generated.js";export{ThemePageDocument}from"./graphql-app-api/queries/ThemePage.generated.js";export{SaleFunnelDiscountsDocument}from"./graphql-app-api/queries/SaleFunnelDiscounts.generated.js";export{LibrarySaleFunnelDocument}from"./graphql-app-api/queries/LibrarySaleFunnelDiscount.generated.js";export{ShopLibraryPageDocument}from"./graphql-app-api/queries/ShopLibraryPage.generated.js";export{SaleFunnelOfferDocument}from"./graphql-app-api/queries/SaleFunnelOffer.generated.js";export{ThemePageMetaDocument}from"./graphql-app-api/queries/ThemePageMeta.generated.js";export{composeBorderCss,composeBorderResponsive,getBorderRadiusStyle,getBorderStyle,handleConvertBorderColor,handleConvertBorderStyle,handleConvertBorderWidth,handleConvertClassColor,handleConvertClassColorDynamicBtn,handleConvertInputBorderColor}from"./helpers/borders.js";export{getCarouselContainerHeight,makeContainerWidthOrHeight,makeDotGapToCarouselStyle}from"./helpers/carousel.js";export{cls}from"./helpers/cls.js";export{animations}from"./helpers/animations.js";export{default as filterToolbarPreview}from"./helpers/filter-toolbar-preview.js";export{flattenConnection}from"./helpers/flatten-connection.js";export{getResponsiveStateValue,getResponsiveValue,getResponsiveValueByScreen,isColumnDirectionExist}from"./helpers/get-resonsive-value.js";export{getShortName}from"./helpers/get-shortname.js";export{default as globalEvent}from"./helpers/GlobalEvent.js";export{default as isBrowser}from"./helpers/is-browser.js";export{default as isEmptyChildren}from"./helpers/is-empty-children.js";export{default as isSafari}from"./helpers/is-safari.js";export{normalizeBuilderData}from"./helpers/normalize-builder-data.js";export{prefetchQueries}from"./helpers/prefetch-queries.js";export{validateEmail}from"./helpers/email.js";export{loadScript}from"./helpers/load-script.js";export{composeSpacing,getSpacingVariable}from"./helpers/spacing.js";export{genVariable}from"./helpers/css-variable.js";export{getProductQueryAll,getProducts}from"./helpers/queries/get-products.js";import*as e from"./helpers/tracking/fpixel.js";import*as o from"./helpers/tracking/gtag.js";import*as t from"./helpers/tracking/tiktokpixel.js";export{GRADIENT_BGR_KEY,composeBackgroundCss,getBgByDevice,getBgImageByDevice,getBgVideoByDevice,getColor,getCombinedBackgroundImage,getGradientBgrStyleByDevice,getGradientBgrStyleForButton,getGradientImageBgrStyleByDevice,getStyleBackgroundByDevice,getStyleBgColor,makeFixedBgAttachment}from"./helpers/background.js";export{composeBackgroundImageCss,getBgImageSourceByDevice,getStyleBackgroundImage,getStyleBgImageSource}from"./helpers/backgroundImage.js";export{composeTextColorCss,getGlobalColorCSSProp,getGlobalColorClass,getGlobalColorResponsiveClass,getGlobalColorResponsiveStyle,getGlobalColorStateClass,getGlobalColorStateClassDynamicBtn,getGlobalColorStateResponsiveClass,getGlobalColorStateResponsiveClassDynamicBtn,getGlobalColorStateResponsiveStyle,getGlobalColorStateStyle,getGlobalColorStyle,getSingleColorVariable,isColor}from"./helpers/colors.js";export{composeAdvanceStyle,composeAdvanceStyleForPostPurchase,convertBoxShadowV1ToV2,filterAttrInStyle,getCornerStyle,removeAttrInStyle,removePaddingYInStyle,splitStyle}from"./helpers/compose-advance-style.js";export{composeClasses}from"./helpers/composeClasses.js";export{baseAssetURL,isLocalEnv}from"./helpers/convert.js";export{convertHTML}from"./helpers/covert-entities-html.js";export{composePositionLineHeight,composePostionIconList}from"./helpers/icon-list.js";export{isDefined}from"./helpers/is-defined.js";export{composeGridLayout,convertOldLayout,getLayoutClasses,gridToArrayRegex,optionLayoutStyle}from"./helpers/layout.js";export{makeAspectRatio,makeGlobalSizeHeightResponsive,makeGlobalSizeWidthResponsive,makeHeight,makeLineClamp,makeStyle,makeStyleKey,makeStyleResponsive,makeStyleResponsiveByScreen,makeStyleResponsiveState,makeStyleResponsiveWidth,makeStyleResponsiveWidthWithoutAuto,makeStyleState,makeWidth,removeNullUndefined}from"./helpers/make-style.js";export{convertTextAlignToJustify,getAlignmentClasses}from"./helpers/align.js";export{filterHoverVariables,filterTruthyStyles}from"./helpers/filter-styles.js";export{cloneDeep}from"./helpers/clone-deep.js";export{hasTranslatedLiquid}from"./helpers/liquid.js";export{checkInStock}from"./helpers/variant.js";export{checkHasChangeContent,createTranslateKey,extractOuterTagContent,getThemeSectionTranslateKey,getValueSettingFromSchema,replaceOuterTagContent}from"./helpers/createTranslateKey.js";export{getHashCode}from"./helpers/getHashCode.js";export{checkAvailableVariantInStock,getSelectedVariant,parseSelectedOption}from"./helpers/product.js";export{generateCollectionQueryKey,generateProductQueryKey,generateProductsQueryKey}from"./helpers/query.js";export{composeCornerCss,composeRadius,composeRadiusResponsive,getCornerCSSFromGlobal,getCustomRadius,getRadiusCSSFromGlobal,getRadiusStyleActiveState}from"./helpers/radius.js";export{RenderIf,composeMemo,dataStringify,props,removeUndefinedValuesFromObject,sanitizeLiquid,styles,template}from"./helpers/render.js";export{composeShadow,composeShadowCss,getResponsiveStyleShadow,getResponsiveStyleShadowWithoutState,getStyleShadow,getStyleShadowState,parseValueWithUnit}from"./helpers/shadow.js";export{composeSize,composeSizeCss,genSizeClass,getAspectRatioGlobalSize,getFlexGrowClassByShapeGlobalSize,getGlobalSizeGap,getHeightByShapeGlobalSize,getPaddingGlobalSize,getPaddingStyleByDevice,getResponsiveStylePadding,getValueByDevice,getWidthByShapeGlobalSize,getWidthHeightGlobalSize,makeGlobalSize,makeGlobalSizeIcon,makeStyleWithDefault}from"./helpers/size.js";export{composeFallbackTypographyStyle,composeFontFamilyTypographyV2,composeTextHoverColorCss,composeTypography,composeTypographyAttr,composeTypographyClassName,composeTypographyCss,composeTypographyStyle,composeTypographyV2,composeTypographyV2Css,genTypoClass}from"./helpers/typography.js";export{useArticlesQuery,useBlogsQuery}from"./hooks/articles/useArticlesQuery.js";export{useAddToCart}from"./hooks/cart/use-add-to-cart.js";export{useCartData}from"./hooks/cart/use-cart-data.js";export{useCartDiscountCodesUpdate}from"./hooks/cart/use-cart-discount-codes-update.js";export{useCartNoteUpdate}from"./hooks/cart/use-cart-note-update.js";export{useCreateCart}from"./hooks/cart/use-create-cart.js";export{useRemoveCartItem}from"./hooks/cart/use-remove-cart-item.js";export{useUpdateCartItem}from"./hooks/cart/use-update-cart-item.js";export{useCheckoutUrl,useConnectedShopify,useCurrency,useEditorMode,useIsSampleProduct,useIsStorefrontProduct,useLocale,useMatchMutate,useMobileOnly,useMoneyFormat,usePageType,usePluginEnable,useStoreFront,useSwatches,useTimezone}from"./hooks/shop.js";export{useCollectionQuery}from"./hooks/shop/use-collection-query.js";export{useCollectionsQuery}from"./hooks/shop/use-collections-query.js";export{useProductQuery}from"./hooks/shop/use-product-query.js";export{useProductOffersQuery}from"./hooks/shop/useProductOffersQuery.js";export{useFetchHandle}from"./hooks/useFetchHandle.js";export{useProductsQuery,useProductsQueryAll}from"./hooks/shop/use-products-query.js";export{useCurrentDevice}from"./hooks/use-current-device.js";export{useLazyVideo}from"./hooks/use-lazy-video.js";export{default as useCartId}from"./hooks/useCartId.js";export{default as useCartLine}from"./hooks/useCartLine.js";export{default as useCartUI}from"./hooks/useCartUI.js";export{useCollection}from"./hooks/useCollection.js";export{convertDecimalToNumber,formatMoney,shopifyPriceRounding,useFormatMoney}from"./hooks/useFormatMoney.js";export{useId}from"react";export{default as useInitialSwatchesOptions}from"./hooks/useInitialSwatchesOptions.js";export{default as useIsomorphicLayoutEffect}from"./hooks/useIsomorphicLayoutEffect.js";export{default as useLoadScript}from"./hooks/useLoadScript.js";export{default as useMoney}from"./hooks/useMoney.js";export{usePrevious}from"./hooks/usePrevious.js";export{tGlobal as t,useI18n}from"./hooks/useI18n.js";export{useStickyStore}from"./hooks/useStickyStore.js";export{useCheckAvailableVariantInStock,useCurrentVariant,useCurrentVariantInStock,useFeaturedImageGlobal,useHasPreSelected,useIsSyncProduct,useProduct,useProductBundleDiscount,useProductOfferDiscount,useProductProperties,useProductShopifyEditLink,useQuantity,useSelectedOption,useUniqProductID,useVariant,useVariantOutStock,useVariants}from"./hooks/useProduct.js";export{useShopifyLink}from"./hooks/shop/useShopifyLink.js";export{default as useSuspenseFetch}from"./hooks/useSuspenseFetch.js";export{default as useSwatchesOptions}from"./hooks/useSwatchesOptions.js";export{useRenderMode}from"./hooks/useRenderMode.js";export{usePreviewSharePage}from"./hooks/usePreviewSharePage.js";export{useSafeGetProductListSettings}from"./hooks/useProductList.js";export{RenderModeEnv}from"./types/builder.js";export{InteractionTargetEvent,InteractionTriggerEvent,SectionMode}from"./types/custom.js";import*as r from"./types/shop.js";import*as s from"./types/appAPI.js";export{OptionNormalStyle,OptionSpecialStyle}from"./types/global-style.js";export{AnimationDirectionType,AnimationEasingType,AnimationSetting,AnimationTriggerType,AnimationType,AnimationZoomDirectionType}from"./types/animations.js";export{calculateFirstProduct,getCollection}from"./helpers/queries/get-collection.js";export{fetchMedias,fetchVariants,getProduct}from"./helpers/queries/get-product.js";export{getProductBySlug}from"./helpers/queries/get-product-by-slug.js";export{getAppBlocks}from"./helpers/third-party/getAppBlocks.js";export{addAppBlockId}from"./helpers/third-party/addAppBlockId.js";export{useInteraction}from"./helpers/interaction/index.js";export{createStoreFrontFetcher,hasPublicStoreFrontData}from"./helpers/create-store-front-fetcher.js";export{BLACKLIST_TAGS}from"./constants/index.js";export{DEVICES,EMPTY_DEVICE_VALUE}from"./constants/device.js";export{PICKED_PRODUCT_STATUSES}from"./constants/product.js";export{e as fpixel,o as gtag,t as tiktokpixel,r as ShopType,s as AppAPIType};
|
|
1
|
+
export{default as AddOn}from"./components/AddOn.js";export{default as Render}from"./components/Render.js";export{default as RenderPreview}from"./components/RenderPreview.js";export{RenderChildren,default as RenderLiquid,WrapRenderChildren}from"./components/Render.liquid.js";export{AddonProvider,useAddon,useAddons}from"./contexts/AddonContext.js";export{BuilderComponentProvider,useBuilderComponent}from"./contexts/BuilderComponent.js";export{BuilderProvider,useBuilderStore}from"./contexts/BuilderContext.js";export{BuilderPreviewProvider,useBuilderPreviewStore}from"./contexts/BuilderPreviewContext.js";export{CartLineProvider,useCartLineStore}from"./contexts/CartLineContext.js";export{ProductListProvider,useProductListStore}from"./contexts/ProductListContext.js";export{ProductProvider,useProductStore}from"./contexts/ProductContext.js";export{SectionProvider,useSection,useSectionStore}from"./contexts/SectionContext.js";export{ShopProvider,useShopStore}from"./contexts/ShopContext.js";export{PageProvider,usePageStore}from"./contexts/PageContext.js";export{CollectionProvider,useCollectionStore}from"./contexts/CollectionContext.js";export{ModalProvider,useModalStore}from"./contexts/ModalContext.js";export{ArticleListProvider,useArticleListStore}from"./contexts/ArticleListContext.js";export{ArticleProvider,useArticleStore}from"./contexts/ArticleContext.js";export{I18nProvider,useI18nStore}from"./contexts/I18nContext.js";export{CollectionDetailFilterDocument}from"./graphql/queries/collection-detail-filter.generated.js";export{CollectionDocument}from"./graphql/queries/collection.generated.js";export{CollectionsDocument}from"./graphql/queries/collections.generated.js";export{PublishedThemePagesDocument}from"./graphql/queries/published-theme-pages.generated.js";export{StorePropertyDocument}from"./graphql/queries/store-property.generated.js";export{PreviewThemePageDocument}from"./graphql/queries/preview-page.generated.js";export{PublishedShopMetasDocument}from"./graphql/queries/published-shop-metas.generated.js";export{ShopShopifyDocument}from"./graphql/queries/shop-shopify.generated.js";export{ArticlesDocument}from"./graphql/queries/articles.generated.js";export{BlogsDocument}from"./graphql/queries/blogs.generated.js";export{ProductWithSellingPlansSelectFragment,ProductsWithSellingPlansDocument}from"./graphql/queries/products-with-selling-plans.generated.js";export{ProductVariantsWithSellingPlansDocument}from"./graphql/queries/product-variant-with-selling-plans.generated.js";export{LibraryTemplateDocument}from"./graphql-app-api/queries/LibraryTemplate.generated.js";export{ThemePageDocument}from"./graphql-app-api/queries/ThemePage.generated.js";export{SaleFunnelDiscountsDocument}from"./graphql-app-api/queries/SaleFunnelDiscounts.generated.js";export{LibrarySaleFunnelDocument}from"./graphql-app-api/queries/LibrarySaleFunnelDiscount.generated.js";export{ShopLibraryPageDocument}from"./graphql-app-api/queries/ShopLibraryPage.generated.js";export{SaleFunnelOfferDocument}from"./graphql-app-api/queries/SaleFunnelOffer.generated.js";export{ThemePageMetaDocument}from"./graphql-app-api/queries/ThemePageMeta.generated.js";export{composeBorderCss,composeBorderResponsive,getBorderRadiusStyle,getBorderStyle,handleConvertBorderColor,handleConvertBorderStyle,handleConvertBorderWidth,handleConvertClassColor,handleConvertClassColorDynamicBtn,handleConvertInputBorderColor}from"./helpers/borders.js";export{getCarouselContainerHeight,makeContainerWidthOrHeight,makeDotGapToCarouselStyle}from"./helpers/carousel.js";export{cls}from"./helpers/cls.js";export{animations}from"./helpers/animations.js";export{default as filterToolbarPreview}from"./helpers/filter-toolbar-preview.js";export{flattenConnection}from"./helpers/flatten-connection.js";export{getResponsiveStateValue,getResponsiveValue,getResponsiveValueByScreen,isColumnDirectionExist}from"./helpers/get-resonsive-value.js";export{getShortName}from"./helpers/get-shortname.js";export{default as globalEvent}from"./helpers/GlobalEvent.js";export{default as isBrowser}from"./helpers/is-browser.js";export{default as isEmptyChildren}from"./helpers/is-empty-children.js";export{default as isSafari}from"./helpers/is-safari.js";export{normalizeBuilderData}from"./helpers/normalize-builder-data.js";export{prefetchQueries}from"./helpers/prefetch-queries.js";export{validateEmail}from"./helpers/email.js";export{loadScript}from"./helpers/load-script.js";export{composeSpacing,getSpacingVariable}from"./helpers/spacing.js";export{genVariable}from"./helpers/css-variable.js";export{getProductQueryAll,getProducts}from"./helpers/queries/get-products.js";export{getShopifyProduct}from"./helpers/queries/get-shopify-product.js";import*as e from"./helpers/tracking/fpixel.js";import*as o from"./helpers/tracking/gtag.js";import*as t from"./helpers/tracking/tiktokpixel.js";export{GRADIENT_BGR_KEY,composeBackgroundCss,getBgByDevice,getBgImageByDevice,getBgVideoByDevice,getColor,getCombinedBackgroundImage,getGradientBgrStyleByDevice,getGradientBgrStyleForButton,getGradientImageBgrStyleByDevice,getStyleBackgroundByDevice,getStyleBgColor,makeFixedBgAttachment}from"./helpers/background.js";export{composeBackgroundImageCss,getBgImageSourceByDevice,getStyleBackgroundImage,getStyleBgImageSource}from"./helpers/backgroundImage.js";export{composeTextColorCss,getGlobalColorCSSProp,getGlobalColorClass,getGlobalColorResponsiveClass,getGlobalColorResponsiveStyle,getGlobalColorStateClass,getGlobalColorStateClassDynamicBtn,getGlobalColorStateResponsiveClass,getGlobalColorStateResponsiveClassDynamicBtn,getGlobalColorStateResponsiveStyle,getGlobalColorStateStyle,getGlobalColorStyle,getSingleColorVariable,isColor}from"./helpers/colors.js";export{composeAdvanceStyle,composeAdvanceStyleForPostPurchase,convertBoxShadowV1ToV2,filterAttrInStyle,getCornerStyle,removeAttrInStyle,removePaddingYInStyle,splitStyle}from"./helpers/compose-advance-style.js";export{composeClasses}from"./helpers/composeClasses.js";export{IS_LIQUID,baseAssetURL,isLocalEnv}from"./helpers/convert.js";export{convertHTML}from"./helpers/covert-entities-html.js";export{composePositionLineHeight,composePostionIconList}from"./helpers/icon-list.js";export{isDefined}from"./helpers/is-defined.js";export{composeGridLayout,convertOldLayout,getLayoutClasses,gridToArrayRegex,optionLayoutStyle}from"./helpers/layout.js";export{makeAspectRatio,makeGlobalSizeHeightResponsive,makeGlobalSizeWidthResponsive,makeHeight,makeLineClamp,makeStyle,makeStyleKey,makeStyleResponsive,makeStyleResponsiveByScreen,makeStyleResponsiveState,makeStyleResponsiveWidth,makeStyleResponsiveWidthWithoutAuto,makeStyleState,makeWidth,removeNullUndefined}from"./helpers/make-style.js";export{convertTextAlignToJustify,getAlignmentClasses}from"./helpers/align.js";export{filterHoverVariables,filterTruthyStyles}from"./helpers/filter-styles.js";export{cloneDeep}from"./helpers/clone-deep.js";export{hasTranslatedLiquid}from"./helpers/liquid.js";export{checkInStock}from"./helpers/variant.js";export{checkHasChangeContent,createTranslateKey,extractOuterTagContent,getThemeSectionTranslateKey,getValueSettingFromSchema,replaceOuterTagContent}from"./helpers/createTranslateKey.js";export{getHashCode}from"./helpers/getHashCode.js";export{checkAvailableVariantInStock,getSelectedVariant,parseSelectedOption}from"./helpers/product.js";export{generateCollectionQueryKey,generateProductQueryKey,generateProductsQueryKey}from"./helpers/query.js";export{composeCornerCss,composeRadius,composeRadiusResponsive,getCornerCSSFromGlobal,getCustomRadius,getRadiusCSSFromGlobal,getRadiusStyleActiveState}from"./helpers/radius.js";export{RenderIf,composeMemo,dataStringify,props,removeUndefinedValuesFromObject,sanitizeLiquid,styles,template}from"./helpers/render.js";export{composeShadow,composeShadowCss,getResponsiveStyleShadow,getResponsiveStyleShadowWithoutState,getStyleShadow,getStyleShadowState,parseValueWithUnit}from"./helpers/shadow.js";export{composeSize,composeSizeCss,genSizeClass,getAspectRatioGlobalSize,getFlexGrowClassByShapeGlobalSize,getGlobalSizeGap,getHeightByShapeGlobalSize,getPaddingGlobalSize,getPaddingStyleByDevice,getResponsiveStylePadding,getValueByDevice,getWidthByShapeGlobalSize,getWidthHeightGlobalSize,makeGlobalSize,makeGlobalSizeIcon,makeStyleWithDefault}from"./helpers/size.js";export{composeFallbackTypographyStyle,composeFontFamilyTypographyV2,composeTextHoverColorCss,composeTypography,composeTypographyAttr,composeTypographyClassName,composeTypographyCss,composeTypographyStyle,composeTypographyV2,composeTypographyV2Css,genTypoClass}from"./helpers/typography.js";export{useArticlesQuery,useBlogsQuery}from"./hooks/articles/useArticlesQuery.js";export{useAddToCart}from"./hooks/cart/use-add-to-cart.js";export{useCartData}from"./hooks/cart/use-cart-data.js";export{useCartDiscountCodesUpdate}from"./hooks/cart/use-cart-discount-codes-update.js";export{useCartNoteUpdate}from"./hooks/cart/use-cart-note-update.js";export{useCreateCart}from"./hooks/cart/use-create-cart.js";export{useRemoveCartItem}from"./hooks/cart/use-remove-cart-item.js";export{useUpdateCartItem}from"./hooks/cart/use-update-cart-item.js";export{useCheckoutUrl,useConnectedShopify,useCurrency,useEditorMode,useIsSampleProduct,useIsStorefrontProduct,useLocale,useMatchMutate,useMobileOnly,useMoneyFormat,usePageType,usePluginEnable,useStoreFront,useSwatches,useTimezone}from"./hooks/shop.js";export{useCollectionQuery}from"./hooks/shop/use-collection-query.js";export{useCollectionsQuery}from"./hooks/shop/use-collections-query.js";export{useProductQuery}from"./hooks/shop/use-product-query.js";export{useProductOffersQuery}from"./hooks/shop/useProductOffersQuery.js";export{useFetchHandle}from"./hooks/useFetchHandle.js";export{useProductsQuery,useProductsQueryAll}from"./hooks/shop/use-products-query.js";export{useCurrentDevice}from"./hooks/use-current-device.js";export{useLazyVideo}from"./hooks/use-lazy-video.js";export{default as useCartId}from"./hooks/useCartId.js";export{default as useCartLine}from"./hooks/useCartLine.js";export{default as useCartUI}from"./hooks/useCartUI.js";export{useCollection}from"./hooks/useCollection.js";export{convertDecimalToNumber,formatMoney,shopifyPriceRounding,useFormatMoney}from"./hooks/useFormatMoney.js";export{useId}from"react";export{default as useInitialSwatchesOptions}from"./hooks/useInitialSwatchesOptions.js";export{default as useIsomorphicLayoutEffect}from"./hooks/useIsomorphicLayoutEffect.js";export{default as useLoadScript}from"./hooks/useLoadScript.js";export{default as useMoney}from"./hooks/useMoney.js";export{usePrevious}from"./hooks/usePrevious.js";export{tGlobal as t,useI18n}from"./hooks/useI18n.js";export{useStickyStore}from"./hooks/useStickyStore.js";export{useCheckAvailableVariantInStock,useCurrentVariant,useCurrentVariantInStock,useFeaturedImageGlobal,useHasPreSelected,useIsSyncProduct,useProduct,useProductBundleDiscount,useProductOfferDiscount,useProductProperties,useProductShopifyEditLink,useQuantity,useSelectedOption,useUniqProductID,useVariant,useVariantOutStock,useVariants}from"./hooks/useProduct.js";export{useShopifyLink}from"./hooks/shop/useShopifyLink.js";export{default as useSuspenseFetch}from"./hooks/useSuspenseFetch.js";export{default as useSwatchesOptions}from"./hooks/useSwatchesOptions.js";export{useRenderMode}from"./hooks/useRenderMode.js";export{usePreviewSharePage}from"./hooks/usePreviewSharePage.js";export{useSafeGetProductListSettings}from"./hooks/useProductList.js";export{RenderModeEnv}from"./types/builder.js";export{InteractionTargetEvent,InteractionTriggerEvent,SectionMode}from"./types/custom.js";import*as r from"./types/shop.js";import*as s from"./types/appAPI.js";export{OptionNormalStyle,OptionSpecialStyle}from"./types/global-style.js";export{AnimationDirectionType,AnimationEasingType,AnimationSetting,AnimationTriggerType,AnimationType,AnimationZoomDirectionType}from"./types/animations.js";export{calculateFirstProduct,getCollection}from"./helpers/queries/get-collection.js";export{fetchMedias,fetchVariants,getProduct}from"./helpers/queries/get-product.js";export{getProductBySlug}from"./helpers/queries/get-product-by-slug.js";export{getAppBlocks}from"./helpers/third-party/getAppBlocks.js";export{addAppBlockId}from"./helpers/third-party/addAppBlockId.js";export{useInteraction}from"./helpers/interaction/index.js";export{createStoreFrontFetcher,hasPublicStoreFrontData}from"./helpers/create-store-front-fetcher.js";export{BLACKLIST_TAGS}from"./constants/index.js";export{createBuilderApiFetcher}from"./helpers/builder-api-bridge/createBuilderApiFetcher.js";export{requestBridgeGraphql}from"./helpers/builder-api-bridge/requestBridgeGraphql.js";export{DEVICES,EMPTY_DEVICE_VALUE}from"./constants/device.js";export{FREE_PLANS,isFreePlan}from"./constants/plan.js";export{PICKED_PRODUCT_STATUSES}from"./constants/product.js";export{e as fpixel,o as gtag,t as tiktokpixel,r as ShopType,s as AppAPIType};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7773,6 +7773,12 @@ type RawChild = {
|
|
|
7773
7773
|
[key: string]: any;
|
|
7774
7774
|
};
|
|
7775
7775
|
|
|
7776
|
+
declare global {
|
|
7777
|
+
interface Window {
|
|
7778
|
+
/** Set by the editor host once it has attached the API bridge. */
|
|
7779
|
+
bridgeReady?: boolean;
|
|
7780
|
+
}
|
|
7781
|
+
}
|
|
7776
7782
|
declare enum SectionMode {
|
|
7777
7783
|
GLOBAL = "GLOBAL",
|
|
7778
7784
|
PAGE = "PAGE"
|
|
@@ -44020,6 +44026,17 @@ type TFetchRelatedProductQueriesParams = ProductsQueryVariables['where'] & {
|
|
|
44020
44026
|
};
|
|
44021
44027
|
declare const getProductQueryAll: (fetcher: FetchFunc, arg: Partial<TFetchRelatedProductQueriesParams>) => Promise<ProductsQueryResponse>;
|
|
44022
44028
|
|
|
44029
|
+
type FetchShopifyProductParams = {
|
|
44030
|
+
/** A numeric Shopify product ID, a Product GID, or "latest". */
|
|
44031
|
+
id?: string;
|
|
44032
|
+
};
|
|
44033
|
+
/**
|
|
44034
|
+
* The fetcher must target Shopify Admin GraphQL and return its unwrapped data.
|
|
44035
|
+
* Shopify has no sync timestamp, so omitted IDs and "latest" use creation time.
|
|
44036
|
+
* Sample/storefront filters belong to the app API and are not supported here.
|
|
44037
|
+
*/
|
|
44038
|
+
declare const getShopifyProduct: (fetcher: FetchFunc, { id }?: FetchShopifyProductParams) => Promise<ProductSelectFragment>;
|
|
44039
|
+
|
|
44023
44040
|
declare const pageview$1: () => void;
|
|
44024
44041
|
declare const event: (name: string, options?: {}) => void;
|
|
44025
44042
|
declare const addToCart$2: (product: ProductInputAnalytic) => void;
|
|
@@ -51447,6 +51464,7 @@ declare function composeClasses(classList?: string): Record<string, boolean>;
|
|
|
51447
51464
|
|
|
51448
51465
|
declare const isLocalEnv: boolean;
|
|
51449
51466
|
declare const baseAssetURL: string;
|
|
51467
|
+
declare const IS_LIQUID: boolean;
|
|
51450
51468
|
|
|
51451
51469
|
declare const convertHTML: (str: string) => string;
|
|
51452
51470
|
|
|
@@ -55363,7 +55381,35 @@ declare const hasPublicStoreFrontData: (publicStoreFrontData: PublicStoreFrontDa
|
|
|
55363
55381
|
declare const DEVICES: NameDevices[];
|
|
55364
55382
|
declare const EMPTY_DEVICE_VALUE: undefined;
|
|
55365
55383
|
|
|
55384
|
+
declare const FREE_PLANS: string[];
|
|
55385
|
+
declare const isFreePlan: (plan?: string | null) => boolean;
|
|
55386
|
+
|
|
55366
55387
|
declare const BLACKLIST_TAGS: Set<string>;
|
|
55367
55388
|
|
|
55368
|
-
|
|
55389
|
+
declare const BRIDGE_VERSION: 1;
|
|
55390
|
+
type BridgeRequest = {
|
|
55391
|
+
version: typeof BRIDGE_VERSION;
|
|
55392
|
+
requestId: string;
|
|
55393
|
+
api: 'app';
|
|
55394
|
+
query: string;
|
|
55395
|
+
variables?: Record<string, unknown>;
|
|
55396
|
+
operationName?: string;
|
|
55397
|
+
};
|
|
55398
|
+
|
|
55399
|
+
/**
|
|
55400
|
+
* Adapts the bridge to the existing `FetchFunc` contract: SWR consumers receive
|
|
55401
|
+
* the query data on success, and a failure surfaces as the `BridgeRequestError`
|
|
55402
|
+
* the bridge rejects with.
|
|
55403
|
+
*/
|
|
55404
|
+
declare const createBuilderApiFetcher: () => FetchFunc;
|
|
55405
|
+
|
|
55406
|
+
type QueryInput = Omit<BridgeRequest, 'requestId' | 'version'>;
|
|
55407
|
+
/**
|
|
55408
|
+
* Runs a GraphQL query through the editor bridge. The promise resolves with the
|
|
55409
|
+
* query data and rejects with a {@link BridgeRequestError} for every failure,
|
|
55410
|
+
* including an unavailable bridge, a rejected request and a timeout.
|
|
55411
|
+
*/
|
|
55412
|
+
declare function requestBridgeGraphql<T>(input: QueryInput): Promise<T>;
|
|
55413
|
+
|
|
55414
|
+
export { AddOn, AddonProvider, AnimationDirectionType, AnimationEasingType, AnimationSetting, AnimationTriggerType, AnimationType, AnimationZoomDirectionType, appAPI as AppAPIType, ArticleListProvider, ArticleProvider, ArticlesDocument, BLACKLIST_TAGS, BlogsDocument, BuilderComponentProvider, BuilderPreviewProvider, BuilderProvider, CartLineProvider, CollectionDetailFilterDocument, CollectionDocument, CollectionProvider, CollectionsDocument, DEVICES, EMPTY_DEVICE_VALUE, FREE_PLANS, GRADIENT_BGR_KEY, I18nProvider, IS_LIQUID, InteractionTargetEvent, InteractionTriggerEvent, LibrarySaleFunnelDocument, LibraryTemplateDocument, ModalProvider, OptionNormalStyle, OptionSpecialStyle, PICKED_PRODUCT_STATUSES, PageProvider, PreviewThemePageDocument, ProductListProvider, ProductProvider, ProductVariantsWithSellingPlansDocument, ProductWithSellingPlansSelectFragment, ProductsWithSellingPlansDocument, PublishedShopMetasDocument, PublishedThemePagesDocument, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderModeEnv, RenderPreviewMemo as RenderPreview, SaleFunnelDiscountsDocument, SaleFunnelOfferDocument, SectionMode, SectionProvider, ShopLibraryPageDocument, ShopProvider, ShopShopifyDocument, shop as ShopType, StorePropertyDocument, ThemePageDocument, ThemePageMetaDocument, WrapRenderChildren, addAppBlockId, animations, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, checkHasChangeContent, checkInStock, cloneDeep, cls, composeAdvanceStyle, composeAdvanceStyleForPostPurchase, composeBackgroundCss, composeBackgroundImageCss, composeBorderCss, composeBorderResponsive, composeClasses, composeCornerCss, composeFallbackTypographyStyle, composeFontFamilyTypographyV2, composeGridLayout, composeMemo, composePositionLineHeight, composePostionIconList, composeRadius, composeRadiusResponsive, composeShadow, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTextHoverColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertBoxShadowV1ToV2, convertDecimalToNumber, convertHTML, convertOldLayout, convertTextAlignToJustify, createBuilderApiFetcher, createStoreFrontFetcher, createTranslateKey, dataStringify, extractOuterTagContent, fetchMedias, fetchVariants, filterAttrInStyle, filterHoverVariables, filterToolbarPreview, filterTruthyStyles, flattenConnection, formatMoney, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getAlignmentClasses, getAppBlocks, getAspectRatioGlobalSize, getBgByDevice, getBgImageByDevice, getBgImageSourceByDevice, getBgVideoByDevice, getBorderRadiusStyle, getBorderStyle, getCarouselContainerHeight, getCollection, getColor, getCombinedBackgroundImage, getCornerCSSFromGlobal, getCornerStyle, getCustomRadius, getFlexGrowClassByShapeGlobalSize, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getGlobalSizeGap, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, getGradientImageBgrStyleByDevice, getHashCode, getHeightByShapeGlobalSize, getLayoutClasses, getPaddingGlobalSize, getPaddingStyleByDevice, getProduct, getProductBySlug, getProductQueryAll, getProducts, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveStylePadding, getResponsiveStyleShadow, getResponsiveStyleShadowWithoutState, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShopifyProduct, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleBackgroundImage, getStyleBgColor, getStyleBgImageSource, getStyleShadow, getStyleShadowState, getThemeSectionTranslateKey, getValueByDevice, getValueSettingFromSchema, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, handleConvertInputBorderColor, hasPublicStoreFrontData, hasTranslatedLiquid, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isFreePlan, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeContainerWidthOrHeight, makeDotGapToCarouselStyle, makeFixedBgAttachment, makeGlobalSize, makeGlobalSizeHeightResponsive, makeGlobalSizeIcon, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveByScreen, makeStyleResponsiveState, makeStyleResponsiveWidth, makeStyleResponsiveWidthWithoutAuto, makeStyleState, makeStyleWithDefault, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeAttrInStyle, removeNullUndefined, removePaddingYInStyle, removeUndefinedValuesFromObject, replaceOuterTagContent, requestBridgeGraphql, sanitizeLiquid, shopifyPriceRounding, splitStyle, styles, tGlobal as t, template, tiktokpixel, useAddToCart, useAddon, useAddons, useArticleListStore, useArticleStore, useArticlesQuery, useBlogsQuery, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFetchHandle, useFormatMoney, useHasPreSelected, useI18n, useI18nStore, useInitialSwatchesOptions, useInteraction, useIsSampleProduct, useIsStorefrontProduct, useIsSyncProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageStore, usePageType, usePluginEnable, usePreviewSharePage, usePrevious, useProduct, useProductBundleDiscount, useProductListStore, useProductOfferDiscount, useProductOffersQuery, useProductProperties, useProductQuery, useProductShopifyEditLink, useProductStore, useProductsQuery, useProductsQueryAll, useQuantity, useRemoveCartItem, useRenderMode, useSafeGetProductListSettings, useSection, useSectionStore, useSelectedOption, useShopStore, useShopifyLink, useStickyStore, useStoreFront, useSuspenseFetch, useSwatches, useSwatchesOptions, useTimezone, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
|
|
55369
55415
|
export type { AddonProviderProps, AdvancedType, AirProductReview, AliReviewsWidgetType, AlignItemProp, AlignProp, AnimationBaseSetting, AnimationConfig, AnimationFadeSettingType, AnimationSettingType, AnimationShakeSettingType, AnimationSlideSettingType, AnimationTrigger, AnimationZoomSettingType, AppstleLoyaltyRewardProgramWidgetType, ArticleListProviderProps, ArticleProviderProps, ArticlesQueryResponse, ArticlesQueryVariables, Background, BackgroundImageValue, BackgroundMedia, BackgroundVideoValue, BaseProps, BasePropsWrap, BlockEntity, BlogsQueryResponse, BlogsQueryVariables, BogosWidgetType, BoldSubscriptionsWidgetType, Border, BorderStyle, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProviderProps, BuilderProviderProps, BuilderState, Builtin, CSSStateKey, CartLineProviderProps, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, CollectionSelectFragment, CollectionsQueryResponse, CollectionsQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentPreset, ComponentSetting, ContainerProp, ControlProp, ControlTriggerAction, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, DotStyle, Dropdown, DynamicCollection, DynamicProduct, ExtractState, FastBundleWidgetType, FeraReviewsV3WidgetType, FeraReviewsWidgetType, FetchCollectionArgs, FetchFunc, FetchProductParams, FetchProductsParams, FlexDirectionProp, FontName, FontStyleType, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, GrowaveWidgetTypeV1, GrowaveWidgetTypeV2, HSLAColorType, HSLColorType, HexColorType, I18nProviderProps, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, Interaction, InteractionCondition, InteractionElement, InteractionTarget, InteractionTargetEventObject, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsAdvancedWidgetType, LaiProductReviewsWidgetType, LibrarySaleFunnelQueryResponse, LibrarySaleFunnelQueryVariables, LibrarySection, LibraryTemplate, LibraryTemplateQueryResponse, LibraryTemplateQueryVariables, LooxReviewsWidgetType, LooxReviewsWidgetTypeV2, MediaSelectFragment, ModalProviderProps, NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OnlyOne, OpinewDesignWidgetType, OpinewWidgetType, Option$4 as Option, Options$1 as Options, PaddingType, PageContext, PageProviderProps, PageSection, PageType, PickedProductStatus, PickyStoryWidgetType, PostPurchaseTypo, PreOrderNowWodWidgetType, PreviewThemePageQueryResponse, PreviewThemePageQueryVariables, Primitive, ProductInputAnalytic, ProductListProviderProps, ProductOffer, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductVariantsWithSellingPlansQueryResponse, ProductVariantsWithSellingPlansQueryVariables, ProductVariantsWithSellingPlansSelectFragment, ProductsQueryResponse, ProductsQueryVariables, ProductsWithSellingPlansDetailFragment, ProductsWithSellingPlansQueryResponse, ProductsWithSellingPlansQueryVariables, PublicStoreFrontData, PublishErrorSectionListEventDetail, PublishedShopMetasQueryResponse, PublishedShopMetasQueryVariables, PublishedThemePageSelectFragment, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RawChild, RenderMode, ResponsiveKey, ResponsiveStateProp, ResultOldElementWithSectionId, RivyoWidgetType, RoundedSize, RyviuWidgetType, SaleFunnelDiscount$1 as SaleFunnelDiscount, SaleFunnelDiscountEdge$1 as SaleFunnelDiscountEdge, SaleFunnelDiscountObjectType$1 as SaleFunnelDiscountObjectType, SaleFunnelDiscountType$1 as SaleFunnelDiscountType, SaleFunnelDiscountValueType$1 as SaleFunnelDiscountValueType, SaleFunnelDiscountsQueryResponse, SaleFunnelDiscountsQueryVariables, SaleFunnelOffer, SaleFunnelOfferQueryResponse, SaleFunnelOfferQueryVariables, Scalars$1 as Scalars, ScaleByDirection, SectionCategory, SectionData, SectionEntity, SectionProviderProps, Setting, SettingByAnimationType, SettingByAnimationValues, SettingUIControl, SettingUIGroup, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, Shop, ShopLibraryPage, ShopLibraryPageQueryResponse, ShopLibraryPageQueryVariables, ShopLibrarySection, ShopProviderProps, ShopShopifyQueryResponse, ShopShopifyQueryVariables, SizeProps, SizeSetting$1 as SizeSetting, SizeSettingGlobal, SizeType, SpacingType, StampedWidgetType, StampedWidgetTypeV2, StateProp, StateSelector, StateType, StoreConfig, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, TFetchRelatedProductQueriesParams, TagShopWidgetType, TemplateCategory, TemplatePackage, Theme, ThemePage, ThemePageMetaQueryResponse, ThemePageMetaQueryVariables, ThemePageQueryResponse, ThemePageQueryVariables, ThemeSection, ThemeSectionStatus$1 as ThemeSectionStatus, ThemeStyle, TransformProp, TriggerConfig, TrustooWidgetType, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Family, TypographyV2FontFamilyType, TypographyV2Props, UltimateSalesBoostWidgetType, UpdatableItemAttr, ValidateType, VariantSelectFragment, VitalsWidgetType, WiserV2WidgetType, WiserWidgetType, YotpoReviewsWidgetType };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/core",
|
|
3
|
-
"version": "22.0.0-dev.
|
|
3
|
+
"version": "22.0.0-dev.63",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -19,17 +19,19 @@
|
|
|
19
19
|
"test": "jest -c ./../../helpers/jest.config.ts",
|
|
20
20
|
"format": "prettier --write \"./src/**/*.{ts,tsx}\"",
|
|
21
21
|
"schema:codegen": "gqlg --schemaFilePath ./schema/storefront.graphql --rootQuery Query --rootMutation Mutation --destDirPath ./__generated__ --depthLimit 5 && prettier --write --log-level silent __generated__/**/*.gql",
|
|
22
|
+
"schema:codegenShopifyAPI": "gqlg --schemaFilePath ./schema/shopifyAPI.graphql --rootQuery Query --rootMutation Mutation --destDirPath ./__generated__ --depthLimit 5 && prettier --write --log-level silent __generated__/**/*.gql",
|
|
22
23
|
"schema:download": "graphql-codegen --require dotenv/config --config codegen/download.yml",
|
|
23
24
|
"schema:codegenAppAPI": "gqlg --schemaFilePath ./schema/appAPI.graphql --rootQuery Query --rootMutation Mutation --destDirPath ./__generated__ --depthLimit 5 && prettier --write --log-level silent __generated__/**/*.gql",
|
|
24
25
|
"schema:downloadAppAPI": "graphql-codegen --require dotenv/config --config codegen/downloadAppAPI.yml",
|
|
25
26
|
"codegen": "yarn schema:codegen",
|
|
26
27
|
"typegen": "graphql-codegen --config codegen/typegen.yml",
|
|
27
28
|
"typegenAppAPI": "graphql-codegen --config codegen/typegenAppAPI.yml",
|
|
29
|
+
"typegenShopifyAPI": "graphql-codegen --config codegen/typegenShopifyAPI.yml",
|
|
28
30
|
"type-check": "node ../../node_modules/typescript7/bin/tsc --noEmit"
|
|
29
31
|
},
|
|
30
32
|
"devDependencies": {
|
|
31
|
-
"@gem-sdk/adapter-shopify": "22.0.0-dev.
|
|
32
|
-
"@gem-sdk/styles": "22.0.0-dev.
|
|
33
|
+
"@gem-sdk/adapter-shopify": "22.0.0-dev.63",
|
|
34
|
+
"@gem-sdk/styles": "22.0.0-dev.63",
|
|
33
35
|
"@types/classnames": "^2.3.1"
|
|
34
36
|
},
|
|
35
37
|
"dependencies": {
|