@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-"],n=["","-tablet","-mobile"],s=[{shorthand:"radius",parts:["btlr","btrr","bbrr","bblr"]},{shorthand:"p",parts:["pt","pr","pb","pl"]},{shorthand:"m",parts:["mt","mr","mb","ml"]}],i=e=>{let t={...e};for(let e of l)for(let r of n)for(let l of s){let n=`${e}${l.shorthand}${r}`;if(n in t&&!o(t[n]))continue;let s=l.parts.map(t=>`${e}${t}${r}`);if(s.every(e=>!o(t[e])))for(let e of(t[n]=s.map(e=>t[e]).join(" "),s))delete t[e]}return t},f=(e,...t)=>{let l=t[0];if(!l)return"";let n=i(l),s=[],f={},p={},a=[];for(let e in n){if(!Object.hasOwnProperty.call(n,e))continue;let t=n[e];if(o(e)||o(t))continue;let l=r.exec(e),s=l?.[1],i=l?.[2];s&&i?"tablet"===i&&(p[s]=t):f[e]=t,a.push({token:e,value:t,baseAttr:s,deviceSuffix:i})}for(let{token:e,value:t,baseAttr:r,deviceSuffix:o}of a){if(r&&"tablet"===o){if(f[r]===t)continue}else if(r&&"mobile"===o){let e=r in p?p[r]:f[r];if(e===t)continue}s.push(`${e}:${t}`)}return s.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,n)=>{l+=r,void 0!==o[n]&&(e(o[n])?/style=["|']/.test(r)?l+=f`${o[n]}`:l+=t`${o[n]}`:l+=o[n])}),l=(l=l.replaceAll('style=""',"")).replaceAll('class=""',"")};
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)$/,n=e=>null==e||""===e||!1===e||"undefined"===e||"string"==typeof e&&e?.includes("undefined"),o=["--","--hvr-","--focus-"],i=["","-tablet","-mobile"],s=[{shorthand:"radius",parts:["btlr","btrr","bbrr","bblr"]},{shorthand:"p",parts:["pt","pr","pb","pl"]},{shorthand:"m",parts:["mt","mr","mb","ml"]}],f=e=>{let t={...e};for(let e of o)for(let r of i)for(let l of s){let o=`${e}${l.shorthand}${r}`;if(o in t&&!n(t[o]))continue;let i=l.parts.map(t=>`${e}${t}${r}`);if(i.every(e=>!n(t[e])))for(let e of(t[o]=i.map(e=>t[e]).join(" "),i))delete t[e]}return t},a=(e,...t)=>{let r=t[0];if(!r)return"";let o=f(r),i=[],s={},a={},p=[];for(let e in o){if(!Object.hasOwnProperty.call(o,e))continue;let t=o[e];if(n(e)||n(t))continue;let r=l.exec(e),i=r?.[1],f=r?.[2];i&&f?"tablet"===f&&(a[i]=t):s[e]=t,p.push({token:e,value:t,baseAttr:i,deviceSuffix:f})}for(let{token:e,value:t,baseAttr:r,deviceSuffix:l}of p){if(r&&"tablet"===l){if(s[r]===t)continue}else if(r&&"mobile"===l){let e=r in a?a[r]:s[r];if(e===t)continue}i.push(`${e}:${t}`)}return i.join(";")},p=e=>JSON.stringify(e).replace(/\\"/g,'"'),u=(e,...l)=>{let n="";return e.forEach((e,o)=>{n+=e,void 0!==l[o]&&(t(l[o])?/style=["|']/.test(e)?n+=a`${l[o]}`:n+=r`${l[o]}`:n+=l[o])}),n=(n=n.replaceAll('style=""',"")).replaceAll('class=""',"")},c=(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,c as composeMemo,p as dataStringify,r as props,b as removeUndefinedValuesFromObject,d as sanitizeLiquid,a as styles,u as template};
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};
@@ -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" | "length" | "lowInventoryAmount" | "manageInventory" | "mediaId" | "platform" | "price" | "salePrice" | "soldIndividually" | "weight" | "width"> & {
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" | "length" | "lowInventoryAmount" | "manageInventory" | "mediaId" | "platform" | "price" | "salePrice" | "soldIndividually" | "weight" | "width"> & {
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"> & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "17.0.0-dev.119",
3
+ "version": "17.0.0-dev.122",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",