@gem-sdk/core 17.0.0-dev.119 → 17.0.0-dev.122
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 +1 @@
|
|
|
1
|
-
"use strict";const e=e=>!("object"!=typeof e||Array.isArray(e))&&null!==e,t=(e,...t)=>{let r=t[0],o=[];for(let e in r)if(Object.hasOwnProperty.call(r,e)){let t=r[e];["symbol","object","function"].includes(typeof t)||(t?o.push(`${e}="${t}"`):o.push(`${e}`))}return o.join(" ")},r=/^(.+)-(tablet|mobile)$/,o=e=>null==e||""===e||!1===e||"undefined"===e||"string"==typeof e&&e?.includes("undefined"),l=["--","--hvr-","--focus-"],
|
|
1
|
+
"use strict";const e=e=>!("object"!=typeof e||Array.isArray(e))&&null!==e,t=(e,...t)=>{let r=t[0],o=[];for(let e in r)if(Object.hasOwnProperty.call(r,e)){let t=r[e];["symbol","object","function"].includes(typeof t)||(t?o.push(`${e}="${t}"`):o.push(`${e}`))}return o.join(" ")},r=/^(.+)-(tablet|mobile)$/,o=e=>null==e||""===e||!1===e||"undefined"===e||"string"==typeof e&&e?.includes("undefined"),l=["--","--hvr-","--focus-"],i=["","-tablet","-mobile"],n=[{shorthand:"radius",parts:["btlr","btrr","bbrr","bblr"]}],s=e=>{let t={...e};for(let e of l)for(let r of i)for(let l of n){let i=`${e}${l.shorthand}${r}`;if(i in t&&!o(t[i]))continue;let n=l.parts.map(t=>`${e}${t}${r}`);if(n.every(e=>!o(t[e])))for(let e of(t[i]=n.map(e=>t[e]).join(" "),n))delete t[e]}return t},f=(e,...t)=>{let l=t[0];if(!l)return"";let i=s(l),n=[],f={},a={},p=[];for(let e in i){if(!Object.hasOwnProperty.call(i,e))continue;let t=i[e];if(o(e)||o(t))continue;let l=r.exec(e),n=l?.[1],s=l?.[2];n&&s?"tablet"===s&&(a[n]=t):f[e]=t,p.push({token:e,value:t,baseAttr:n,deviceSuffix:s})}for(let{token:e,value:t,baseAttr:r,deviceSuffix:o}of p){if(r&&"tablet"===o){if(f[r]===t)continue}else if(r&&"mobile"===o){let e=r in a?a[r]:f[r];if(e===t)continue}n.push(`${e}:${t}`)}return n.join(";")};exports.RenderIf=(e,t,r)=>e?"string"==typeof t?t:t():("string"==typeof r?r:r?.())??"",exports.composeMemo=(e,t)=>e(),exports.dataStringify=e=>JSON.stringify(e).replace(/\\"/g,'"'),exports.props=t,exports.removeUndefinedValuesFromObject=e=>(Object.keys(e).forEach(t=>e?.[t]===void 0&&delete e[t]),e),exports.sanitizeLiquid=function(e){return e.replace(/\{\{\s*(.*?)\s*\}\}/g,(e,t)=>{let r=t.trim(),o=/^([a-zA-Z_][a-zA-Z0-9_-]*)(\.[a-zA-Z0-9_-]+)*$/i.test(r);return o?`{{ ${r} }}`:r})},exports.styles=f,exports.template=(r,...o)=>{let l="";return r.forEach((r,i)=>{l+=r,void 0!==o[i]&&(e(o[i])?/style=["|']/.test(r)?l+=f`${o[i]}`:l+=t`${o[i]}`:l+=o[i])}),l=(l=l.replaceAll('style=""',"")).replaceAll('class=""',"")};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let e=(e,t,r)=>e?"string"==typeof t?t:t():("string"==typeof r?r:r?.())??"",t=e=>!("object"!=typeof e||Array.isArray(e))&&null!==e,r=(e,...t)=>{let r=t[0],l=[];for(let e in r)if(Object.hasOwnProperty.call(r,e)){let t=r[e];["symbol","object","function"].includes(typeof t)||(t?l.push(`${e}="${t}"`):l.push(`${e}`))}return l.join(" ")},l=/^(.+)-(tablet|mobile)$/,
|
|
1
|
+
let e=(e,t,r)=>e?"string"==typeof t?t:t():("string"==typeof r?r:r?.())??"",t=e=>!("object"!=typeof e||Array.isArray(e))&&null!==e,r=(e,...t)=>{let r=t[0],l=[];for(let e in r)if(Object.hasOwnProperty.call(r,e)){let t=r[e];["symbol","object","function"].includes(typeof t)||(t?l.push(`${e}="${t}"`):l.push(`${e}`))}return l.join(" ")},l=/^(.+)-(tablet|mobile)$/,i=e=>null==e||""===e||!1===e||"undefined"===e||"string"==typeof e&&e?.includes("undefined"),n=["--","--hvr-","--focus-"],o=["","-tablet","-mobile"],f=[{shorthand:"radius",parts:["btlr","btrr","bbrr","bblr"]}],s=e=>{let t={...e};for(let e of n)for(let r of o)for(let l of f){let n=`${e}${l.shorthand}${r}`;if(n in t&&!i(t[n]))continue;let o=l.parts.map(t=>`${e}${t}${r}`);if(o.every(e=>!i(t[e])))for(let e of(t[n]=o.map(e=>t[e]).join(" "),o))delete t[e]}return t},a=(e,...t)=>{let r=t[0];if(!r)return"";let n=s(r),o=[],f={},a={},u=[];for(let e in n){if(!Object.hasOwnProperty.call(n,e))continue;let t=n[e];if(i(e)||i(t))continue;let r=l.exec(e),o=r?.[1],s=r?.[2];o&&s?"tablet"===s&&(a[o]=t):f[e]=t,u.push({token:e,value:t,baseAttr:o,deviceSuffix:s})}for(let{token:e,value:t,baseAttr:r,deviceSuffix:l}of u){if(r&&"tablet"===l){if(f[r]===t)continue}else if(r&&"mobile"===l){let e=r in a?a[r]:f[r];if(e===t)continue}o.push(`${e}:${t}`)}return o.join(";")},u=e=>JSON.stringify(e).replace(/\\"/g,'"'),c=(e,...l)=>{let i="";return e.forEach((e,n)=>{i+=e,void 0!==l[n]&&(t(l[n])?/style=["|']/.test(e)?i+=a`${l[n]}`:i+=r`${l[n]}`:i+=l[n])}),i=(i=i.replaceAll('style=""',"")).replaceAll('class=""',"")},p=(e,t)=>e(),b=e=>(Object.keys(e).forEach(t=>e?.[t]===void 0&&delete e[t]),e);function d(e){return e.replace(/\{\{\s*(.*?)\s*\}\}/g,(e,t)=>{let r=t.trim(),l=/^([a-zA-Z_][a-zA-Z0-9_-]*)(\.[a-zA-Z0-9_-]+)*$/i.test(r);return l?`{{ ${r} }}`:r})}export{e as RenderIf,p as composeMemo,u as dataStringify,r as props,b as removeUndefinedValuesFromObject,d as sanitizeLiquid,a as styles,c as template};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -55276,14 +55276,14 @@ declare const useSelectedOption: () => {
|
|
|
55276
55276
|
forceSelectedOption: (selectedOption?: Record<string, string>, productId?: Maybe$1<string>, noEmit?: boolean, isManualChange?: boolean) => void;
|
|
55277
55277
|
offerSingleVariantID: string | undefined;
|
|
55278
55278
|
};
|
|
55279
|
-
declare const useVariants: () => Maybe$1<Pick<ProductVariant$1, "id" | "title" | "baseID" | "sku" | "barcode" | "costPrice" | "height" | "inventoryPolicy" | "inventoryQuantity" | "inventoryStatus" | "isDigital" | "
|
|
55279
|
+
declare const useVariants: () => Maybe$1<Pick<ProductVariant$1, "id" | "title" | "baseID" | "sku" | "length" | "barcode" | "costPrice" | "height" | "inventoryPolicy" | "inventoryQuantity" | "inventoryStatus" | "isDigital" | "lowInventoryAmount" | "manageInventory" | "mediaId" | "platform" | "price" | "salePrice" | "soldIndividually" | "weight" | "width"> & {
|
|
55280
55280
|
selectedOptions: Array<Pick<SelectedOption$1, "name" | "value" | "optionType">>;
|
|
55281
55281
|
media?: Maybe$1<Pick<Media$1, "id" | "baseID" | "contentType" | "previewImage" | "src" | "width" | "height" | "alt">>;
|
|
55282
55282
|
sellingPlanGroups?: Maybe$1<Array<Maybe$1<Pick<SellingPlanGroup$1, "id" | "appID"> & {
|
|
55283
55283
|
sellingPlans?: Maybe$1<Array<Maybe$1<Pick<SellingPlan$1, "id" | "name" | "baseID" | "billingPolicy" | "deliveryPolicy" | "pricingPolicies" | "updatedAt">>>>;
|
|
55284
55284
|
}>>>;
|
|
55285
55285
|
}>[];
|
|
55286
|
-
declare const useVariant: (id: string) => Maybe$1<Pick<ProductVariant$1, "id" | "title" | "baseID" | "sku" | "barcode" | "costPrice" | "height" | "inventoryPolicy" | "inventoryQuantity" | "inventoryStatus" | "isDigital" | "
|
|
55286
|
+
declare const useVariant: (id: string) => Maybe$1<Pick<ProductVariant$1, "id" | "title" | "baseID" | "sku" | "length" | "barcode" | "costPrice" | "height" | "inventoryPolicy" | "inventoryQuantity" | "inventoryStatus" | "isDigital" | "lowInventoryAmount" | "manageInventory" | "mediaId" | "platform" | "price" | "salePrice" | "soldIndividually" | "weight" | "width"> & {
|
|
55287
55287
|
selectedOptions: Array<Pick<SelectedOption$1, "name" | "value" | "optionType">>;
|
|
55288
55288
|
media?: Maybe$1<Pick<Media$1, "id" | "baseID" | "contentType" | "previewImage" | "src" | "width" | "height" | "alt">>;
|
|
55289
55289
|
sellingPlanGroups?: Maybe$1<Array<Maybe$1<Pick<SellingPlanGroup$1, "id" | "appID"> & {
|