@kabawat/store-themes 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/ai.js +1 -0
  2. package/dist/alternates.js +1 -0
  3. package/dist/blank.js +1 -0
  4. package/dist/constants/document.js +1 -1
  5. package/dist/constants/palettes.js +1 -1
  6. package/dist/constants/themeSettings.js +1 -1
  7. package/dist/index.js +1 -1
  8. package/dist/keys.js +1 -0
  9. package/dist/menu.js +1 -0
  10. package/dist/pages.js +1 -0
  11. package/dist/patterns.js +1 -0
  12. package/dist/themes/content.js +1 -0
  13. package/dist/themes/index.js +1 -1
  14. package/dist/themes/pages.js +1 -1
  15. package/dist/themes/shared.js +1 -1
  16. package/dist/themes/temp_A/index.js +1 -1
  17. package/dist/themes/temp_A/preset.js +1 -1
  18. package/dist/themes/temp_A/sections/catalog-explorer.js +1 -1
  19. package/dist/themes/temp_A/sections/category-list.js +1 -1
  20. package/dist/themes/temp_A/sections/featured-products.js +1 -1
  21. package/dist/themes/temp_A/sections/footer.js +1 -1
  22. package/dist/themes/temp_A/sections/header.js +1 -1
  23. package/dist/themes/temp_A/sections/hero.js +1 -1
  24. package/dist/themes/temp_A/sections/index.js +1 -1
  25. package/dist/themes/temp_A/sections/trust-banner.js +1 -1
  26. package/dist/themes/temp_B/index.js +1 -1
  27. package/dist/themes/temp_B/sections.js +1 -1
  28. package/dist/themes/temp_C/index.js +1 -1
  29. package/dist/themes/temp_D/index.js +1 -1
  30. package/dist/themes/temp_E/index.js +1 -1
  31. package/dist/themes/temp_F/index.js +1 -1
  32. package/dist/utils/blocks.js +1 -1
  33. package/dist/utils/fields.js +1 -1
  34. package/dist/utils/resolve.js +1 -1
  35. package/dist/utils/settings.js +1 -1
  36. package/dist/validators/accessibility.js +1 -1
  37. package/dist/validators/contracts.js +1 -1
  38. package/dist/validators/settings.js +1 -1
  39. package/dist/validators/validate.js +1 -1
  40. package/package.json +1 -1
@@ -1 +1 @@
1
- const _0x2fcabd=_0xf2a4;(function(_0xb87ad9,_0x2218b9){const _0x3489de=_0xf2a4,_0x4f8360=_0xb87ad9();while(!![]){try{const _0x80aca9=-parseInt(_0x3489de(0x200))/0x1*(parseInt(_0x3489de(0x1ea))/0x2)+-parseInt(_0x3489de(0x201))/0x3+-parseInt(_0x3489de(0x1f0))/0x4*(parseInt(_0x3489de(0x1fb))/0x5)+parseInt(_0x3489de(0x1ff))/0x6+-parseInt(_0x3489de(0x1ef))/0x7*(-parseInt(_0x3489de(0x1f9))/0x8)+-parseInt(_0x3489de(0x202))/0x9+-parseInt(_0x3489de(0x1f3))/0xa*(-parseInt(_0x3489de(0x1ee))/0xb);if(_0x80aca9===_0x2218b9)break;else _0x4f8360['push'](_0x4f8360['shift']());}catch(_0x47971e){_0x4f8360['push'](_0x4f8360['shift']());}}}(_0xc210,0x8e206));const SAFE_LINK=/^(\/|#|https?:\/\/|mailto:|tel:)/i,SAFE_IMAGE=/^https:\/\//i,HEX_COLOR=/^#[0-9a-f]{6}$/i,textCheck=_0x77512a=>(_0x1e050c,_0x247ad5)=>typeof _0x1e050c===_0x2fcabd(0x1fa)&&_0x1e050c[_0x2fcabd(0x1ec)]<=(_0x247ad5[_0x2fcabd(0x1fd)]??_0x77512a)?null:'must\x20be\x20text\x20up\x20to\x20'['concat'](_0x247ad5['maxLength']??_0x77512a,'\x20characters'),CHECKS={'text':textCheck(0xc8),'textarea':textCheck(0x3e8),'url':_0x49e032=>typeof _0x49e032==='string'&&_0x49e032[_0x2fcabd(0x1ec)]<=0x1f4&&(_0x49e032===''||SAFE_LINK[_0x2fcabd(0x1f4)](_0x49e032))?null:_0x2fcabd(0x1f1),'image':_0x45e0c0=>typeof _0x45e0c0==='string'&&_0x45e0c0[_0x2fcabd(0x1ec)]<=0x3e8&&(_0x45e0c0===''||SAFE_IMAGE[_0x2fcabd(0x1f4)](_0x45e0c0))?null:'must\x20be\x20an\x20https\x20image\x20URL','color':_0x4df65d=>typeof _0x4df65d==='string'&&(_0x4df65d===''||HEX_COLOR[_0x2fcabd(0x1f4)](_0x4df65d))?null:'must\x20be\x20a\x20colour\x20like\x20#1d4ed8','category':_0x50aeec=>typeof _0x50aeec===_0x2fcabd(0x1fa)&&_0x50aeec[_0x2fcabd(0x1ec)]<=0x78?null:'must\x20be\x20a\x20category','products':(_0x1f4a35,_0x9a5148)=>Array['isArray'](_0x1f4a35)&&_0x1f4a35[_0x2fcabd(0x1ec)]<=(_0x9a5148[_0x2fcabd(0x1f7)]??0xc)&&_0x1f4a35['every'](_0x23f7e3=>typeof _0x23f7e3===_0x2fcabd(0x1fa)&&/^[a-f0-9]{24}$/i[_0x2fcabd(0x1f4)](_0x23f7e3))?null:_0x2fcabd(0x1f6)['concat'](_0x9a5148[_0x2fcabd(0x1f7)]??0xc,'\x20products'),'select':(_0x3fd789,_0x4d4c02)=>_0x4d4c02[_0x2fcabd(0x1eb)]['includes'](_0x3fd789)?null:'must\x20be\x20one\x20of:\x20'[_0x2fcabd(0x1e9)](_0x4d4c02[_0x2fcabd(0x1eb)][_0x2fcabd(0x1f2)](',\x20')),'number':(_0x8f63bd,_0x2e5cf7)=>Number[_0x2fcabd(0x1f8)](_0x8f63bd)&&_0x8f63bd>=_0x2e5cf7['min']&&_0x8f63bd<=_0x2e5cf7[_0x2fcabd(0x1f7)]?null:_0x2fcabd(0x1f5)['concat'](_0x2e5cf7[_0x2fcabd(0x203)],_0x2fcabd(0x1fe))['concat'](_0x2e5cf7['max']),'checkbox':_0x1e5cb3=>typeof _0x1e5cb3==='boolean'?null:'must\x20be\x20true\x20or\x20false'};export const SETTING_TYPES=Object[_0x2fcabd(0x204)](Object[_0x2fcabd(0x1ed)](CHECKS));function _0xc210(){const _0x2cf5b0=['length','keys','77OTotYu','38381lVewdc','48cRPYmw','must\x20be\x20a\x20relative\x20path,\x20#anchor,\x20http(s),\x20mailto:\x20or\x20tel:\x20link','join','1972790oAmUqd','test','must\x20be\x20a\x20number\x20from\x20','must\x20be\x20up\x20to\x20','max','isFinite','1648Prlvog','string','423875lWwqhn','type','maxLength','\x20to\x20','2216592ipLgTe','95DFnjPd','198177ZUKPKn','6385896wmXaNJ','min','freeze','concat','10628tgmOiC','options'];_0xc210=function(){return _0x2cf5b0;};return _0xc210();}function _0xf2a4(_0x1b057a,_0x5744ab){_0x1b057a=_0x1b057a-0x1e9;const _0xc2103a=_0xc210();let _0xf2a4fc=_0xc2103a[_0x1b057a];return _0xf2a4fc;}export function checkSetting(_0xbfd9e2,_0x52d8e8){const _0x3b9dde=_0x2fcabd;return CHECKS[_0xbfd9e2[_0x3b9dde(0x1fc)]](_0x52d8e8,_0xbfd9e2);}
1
+ const _0x21b708=_0x34fd;(function(_0x3a6939,_0x473b55){const _0x38ade6=_0x34fd,_0x13a8f8=_0x3a6939();while(!![]){try{const _0x2b9329=-parseInt(_0x38ade6(0xb6))/0x1*(parseInt(_0x38ade6(0xb1))/0x2)+parseInt(_0x38ade6(0xd3))/0x3*(-parseInt(_0x38ade6(0xd0))/0x4)+-parseInt(_0x38ade6(0xcd))/0x5*(-parseInt(_0x38ade6(0xc7))/0x6)+parseInt(_0x38ade6(0xb9))/0x7*(parseInt(_0x38ade6(0xbf))/0x8)+-parseInt(_0x38ade6(0xc2))/0x9+-parseInt(_0x38ade6(0xcb))/0xa*(-parseInt(_0x38ade6(0xc0))/0xb)+-parseInt(_0x38ade6(0xb2))/0xc*(-parseInt(_0x38ade6(0xb8))/0xd);if(_0x2b9329===_0x473b55)break;else _0x13a8f8['push'](_0x13a8f8['shift']());}catch(_0x269461){_0x13a8f8['push'](_0x13a8f8['shift']());}}}(_0xf377,0x326f7));const SAFE_LINK=/^(\/|#|https?:\/\/|mailto:|tel:)/i,SAFE_IMAGE=/^https:\/\//i,HEX_COLOR=/^#[0-9a-f]{6}$/i,textCheck=_0x4f0129=>(_0x2e0a1b,_0xf07c75)=>typeof _0x2e0a1b==='string'&&_0x2e0a1b[_0x21b708(0xc6)]<=(_0xf07c75['maxLength']??_0x4f0129)?null:_0x21b708(0xc1)['concat'](_0xf07c75['maxLength']??_0x4f0129,_0x21b708(0xbc)),CSS_BLOCKED=/<|@import|expression\s*\(|javascript:|behavior\s*:|-moz-binding/i,CSS_AT_RULE=/@([a-z-]+)/gi,CSS_NESTABLE=new Set(['media',_0x21b708(0xc8),_0x21b708(0xb5)]);function checkCss(_0x4f203c,_0x3bf019){const _0x1b16e1=_0x21b708,_0x446e66=_0x3bf019[_0x1b16e1(0xbb)]??0x2710;if(typeof _0x4f203c!=='string'||_0x4f203c['length']>_0x446e66)return'must\x20be\x20CSS\x20up\x20to\x20'[_0x1b16e1(0xbd)](_0x446e66,'\x20characters');if(CSS_BLOCKED[_0x1b16e1(0xcc)](_0x4f203c))return'must\x20not\x20contain\x20<,\x20@import,\x20expression(),\x20javascript:\x20or\x20behaviours';for(const [,_0x1380b5]of _0x4f203c['matchAll'](CSS_AT_RULE)){if(!CSS_NESTABLE[_0x1b16e1(0xd2)](_0x1380b5[_0x1b16e1(0xb4)]()))return'can\x20use\x20only\x20@media,\x20@supports\x20and\x20@container';}let _0x56951a=0x0;for(const _0xbc68b3 of _0x4f203c){if(_0xbc68b3==='{')_0x56951a+=0x1;if(_0xbc68b3==='}')_0x56951a-=0x1;if(_0x56951a<0x0)break;}return _0x56951a===0x0?null:'has\x20unbalanced\x20{\x20and\x20}';}const CHECKS={'css':checkCss,'html':(_0x3f729f,_0x13eda3)=>typeof _0x3f729f===_0x21b708(0xc4)&&_0x3f729f['length']<=(_0x13eda3[_0x21b708(0xbb)]??0x4e20)?null:'must\x20be\x20HTML\x20up\x20to\x20'['concat'](_0x13eda3[_0x21b708(0xbb)]??0x4e20,'\x20characters'),'text':textCheck(0xc8),'textarea':textCheck(0x3e8),'url':_0x5d2e63=>typeof _0x5d2e63===_0x21b708(0xc4)&&_0x5d2e63['length']<=0x1f4&&(_0x5d2e63===''||SAFE_LINK['test'](_0x5d2e63))?null:_0x21b708(0xcf),'image':_0x45e95d=>typeof _0x45e95d===_0x21b708(0xc4)&&_0x45e95d['length']<=0x3e8&&(_0x45e95d===''||SAFE_IMAGE[_0x21b708(0xcc)](_0x45e95d))?null:_0x21b708(0xbe),'color':_0x3c4d25=>typeof _0x3c4d25===_0x21b708(0xc4)&&(_0x3c4d25===''||HEX_COLOR[_0x21b708(0xcc)](_0x3c4d25))?null:_0x21b708(0xc3),'category':_0x331e7b=>typeof _0x331e7b===_0x21b708(0xc4)&&_0x331e7b[_0x21b708(0xc6)]<=0x78?null:'must\x20be\x20a\x20category','products':(_0x4555fc,_0x271662)=>Array['isArray'](_0x4555fc)&&_0x4555fc['length']<=(_0x271662['max']??0xc)&&_0x4555fc['every'](_0x3dd815=>typeof _0x3dd815==='string'&&/^[a-f0-9]{24}$/i[_0x21b708(0xcc)](_0x3dd815))?null:_0x21b708(0xce)[_0x21b708(0xbd)](_0x271662['max']??0xc,'\x20products'),'select':(_0x11dcf2,_0x42bcda)=>_0x42bcda[_0x21b708(0xb7)][_0x21b708(0xd1)](_0x11dcf2)?null:'must\x20be\x20one\x20of:\x20'['concat'](_0x42bcda[_0x21b708(0xb7)]['join'](',\x20')),'number':(_0x4f4269,_0x1daca4)=>Number[_0x21b708(0xb3)](_0x4f4269)&&_0x4f4269>=_0x1daca4['min']&&_0x4f4269<=_0x1daca4[_0x21b708(0xc5)]?null:'must\x20be\x20a\x20number\x20from\x20'['concat'](_0x1daca4['min'],'\x20to\x20')[_0x21b708(0xbd)](_0x1daca4['max']),'checkbox':_0x5017ab=>typeof _0x5017ab==='boolean'?null:'must\x20be\x20true\x20or\x20false'};function _0x34fd(_0x42763d,_0x2c6891){_0x42763d=_0x42763d-0xb1;const _0xf37782=_0xf377();let _0x34fd00=_0xf37782[_0x42763d];return _0x34fd00;}export const SETTING_TYPES=Object[_0x21b708(0xca)](Object[_0x21b708(0xc9)](CHECKS));function _0xf377(){const _0x29a81a=['37028JeUOXw','includes','has','60BxtIYb','402820tROcGg','348mercPN','isFinite','toLowerCase','container','1cGzBmY','options','163306TixCbr','72723Eghjeb','type','maxLength','\x20characters','concat','must\x20be\x20an\x20https\x20image\x20URL','56LvXfrA','11QfWXUs','must\x20be\x20text\x20up\x20to\x20','1679508YkJaKr','must\x20be\x20a\x20colour\x20like\x20#1d4ed8','string','max','length','1677828GGHuXS','supports','keys','freeze','630860sgMWqa','test','5lzbsUE','must\x20be\x20up\x20to\x20','must\x20be\x20a\x20relative\x20path,\x20#anchor,\x20http(s),\x20mailto:\x20or\x20tel:\x20link'];_0xf377=function(){return _0x29a81a;};return _0xf377();}export function checkSetting(_0x526fab,_0x22be76){const _0x3116c9=_0x21b708;return CHECKS[_0x526fab[_0x3116c9(0xba)]](_0x22be76,_0x526fab);}
@@ -1 +1 @@
1
- function _0x7c99(){const _0xdfe2bd=['order','includes','length','81WGhfOw','is\x20not\x20a\x20block\x20type\x20of\x20this\x20section','cannot\x20be\x20used\x20in\x20','.settings','must\x20be\x20','must\x20be\x20an\x20object','1985OutvSy','type','377067toSgjA','map','limit','templates','579162gImcwc','allows\x20at\x20most\x20','keys','documentBytes','49420fWQZvR','77664BhkChP','.blocks.','isArray','sectionGroups','min','entries','\x20sections','order\x20must\x20list\x20every\x20item\x20exactly\x20once','\x20allows\x20at\x20most\x20','settings','.disabled','push','840576MgASzQ','concat','blockOrder','needs\x20an\x20order\x20array\x20and\x20an\x20object\x20of\x20items','.sections.','disabled','blocksPerSection','2489956tZJCmQ','schemaVersion','sectionsPerTemplate','sections','2526AUQMwE'];_0x7c99=function(){return _0xdfe2bd;};return _0x7c99();}const _0x3f2cbc=_0x5dc9;(function(_0x3fa9c5,_0x3f5634){const _0x485911=_0x5dc9,_0x355ac8=_0x3fa9c5();while(!![]){try{const _0xd709a=-parseInt(_0x485911(0x177))/0x1+parseInt(_0x485911(0x160))/0x2+-parseInt(_0x485911(0x17b))/0x3+parseInt(_0x485911(0x17f))/0x4+parseInt(_0x485911(0x175))/0x5*(parseInt(_0x485911(0x16b))/0x6)+parseInt(_0x485911(0x167))/0x7+-parseInt(_0x485911(0x180))/0x8*(-parseInt(_0x485911(0x16f))/0x9);if(_0xd709a===_0x3f5634)break;else _0x355ac8['push'](_0x355ac8['shift']());}catch(_0x501f67){_0x355ac8['push'](_0x355ac8['shift']());}}}(_0x7c99,0x736a3));import{LIMITS,SCHEMA_VERSION}from'../constants/document.js';import{checkSetting}from'./settings.js';const isObject=_0x3f2466=>_0x3f2466!==null&&typeof _0x3f2466==='object'&&!Array[_0x3f2cbc(0x182)](_0x3f2466);function checkSettings(_0x12f3bf,_0x173e4b,_0x318114,_0x44a43f){const _0x549f91=_0x3f2cbc;if(!isObject(_0x173e4b)){_0x44a43f['push']({'path':_0x318114,'message':_0x549f91(0x174)});return;}const _0x918cde=new Map(_0x12f3bf[_0x549f91(0x178)](_0x49c66f=>[_0x49c66f['id'],_0x49c66f]));for(const [_0x3accbf,_0x343b26]of Object[_0x549f91(0x185)](_0x173e4b)){const _0x3fb0e5=_0x918cde['get'](_0x3accbf),_0x533e75=_0x3fb0e5?checkSetting(_0x3fb0e5,_0x343b26):'is\x20not\x20a\x20known\x20setting';if(_0x533e75)_0x44a43f[_0x549f91(0x15f)]({'path':''[_0x549f91(0x161)](_0x318114,'.')[_0x549f91(0x161)](_0x3accbf),'message':_0x533e75});}}function checkOrder(_0x1b7133,_0x270cb5,_0xd71fcc,_0x212f8a){const _0x441fbe=_0x3f2cbc;if(!Array['isArray'](_0x1b7133)||!isObject(_0x270cb5))return _0x212f8a[_0x441fbe(0x15f)]({'path':_0xd71fcc,'message':_0x441fbe(0x163)}),![];const _0x32907d=Object[_0x441fbe(0x17d)](_0x270cb5);if(new Set(_0x1b7133)['size']!==_0x1b7133[_0x441fbe(0x16e)]||_0x1b7133[_0x441fbe(0x16e)]!==_0x32907d['length']||!_0x1b7133['every'](_0x534234=>_0x534234 in _0x270cb5))return _0x212f8a['push']({'path':_0xd71fcc,'message':_0x441fbe(0x187)}),![];return!![];}function _0x5dc9(_0x35c5f6,_0x59eb99){_0x35c5f6=_0x35c5f6-0x15d;const _0x7c99e6=_0x7c99();let _0x5dc9d6=_0x7c99e6[_0x35c5f6];return _0x5dc9d6;}function checkBlocks(_0x38d3fe,_0x187726,_0x43aa6e,_0x509a36){const _0x25f958=_0x3f2cbc,_0x5d80db=_0x187726['blocks']??{},_0x582404=_0x187726[_0x25f958(0x162)]??[];if(!checkOrder(_0x582404,_0x5d80db,''['concat'](_0x43aa6e,'.blocks'),_0x509a36))return;const _0x411542=Math[_0x25f958(0x184)](_0x38d3fe['maxBlocks']??0x0,LIMITS[_0x25f958(0x166)]);_0x582404[_0x25f958(0x16e)]>_0x411542&&_0x509a36['push']({'path':''[_0x25f958(0x161)](_0x43aa6e,'.blocks'),'message':_0x25f958(0x17c)['concat'](_0x411542,'\x20blocks')});const _0x4ae834={};for(const _0x4082e7 of _0x582404){const _0x1bc878=_0x5d80db[_0x4082e7],_0x4773c9=_0x38d3fe['blocks']?.[_0x1bc878?.[_0x25f958(0x176)]];if(!_0x4773c9){_0x509a36['push']({'path':''[_0x25f958(0x161)](_0x43aa6e,_0x25f958(0x181))[_0x25f958(0x161)](_0x4082e7,'.type'),'message':_0x25f958(0x170)});continue;}_0x4ae834[_0x1bc878['type']]=(_0x4ae834[_0x1bc878['type']]??0x0)+0x1,_0x4773c9[_0x25f958(0x179)]&&_0x4ae834[_0x1bc878['type']]>_0x4773c9['limit']&&_0x509a36['push']({'path':''['concat'](_0x43aa6e,'.blocks.')['concat'](_0x4082e7),'message':''[_0x25f958(0x161)](_0x1bc878[_0x25f958(0x176)],_0x25f958(0x188))[_0x25f958(0x161)](_0x4773c9[_0x25f958(0x179)])}),checkSettings(_0x4773c9['settings'],_0x1bc878['settings']??{},''['concat'](_0x43aa6e,_0x25f958(0x181))[_0x25f958(0x161)](_0x4082e7,_0x25f958(0x172)),_0x509a36);}}function checkGroup(_0x5b05f0,_0x581fd6,_0x2ac28a,_0x587000,_0x381b68){const _0x4bbe4c=_0x3f2cbc;if(!isObject(_0x2ac28a)||!checkOrder(_0x2ac28a[_0x4bbe4c(0x16c)],_0x2ac28a[_0x4bbe4c(0x16a)],_0x587000,_0x381b68))return;_0x2ac28a[_0x4bbe4c(0x16c)]['length']>LIMITS['sectionsPerTemplate']&&_0x381b68['push']({'path':_0x587000,'message':'allows\x20at\x20most\x20'['concat'](LIMITS[_0x4bbe4c(0x169)],_0x4bbe4c(0x186))});for(const _0x46315e of _0x2ac28a[_0x4bbe4c(0x16c)]){const _0x81b99b=_0x2ac28a['sections'][_0x46315e],_0xb2e2c=''['concat'](_0x587000,_0x4bbe4c(0x164))['concat'](_0x46315e),_0x2bd101=_0x5b05f0[_0x4bbe4c(0x16a)][_0x81b99b?.['type']];if(!_0x2bd101){_0x381b68[_0x4bbe4c(0x15f)]({'path':''[_0x4bbe4c(0x161)](_0xb2e2c,'.type'),'message':'is\x20not\x20a\x20section\x20of\x20this\x20theme'});continue;}if(!_0x2bd101['templates']['includes'](_0x581fd6)){_0x381b68[_0x4bbe4c(0x15f)]({'path':''['concat'](_0xb2e2c,'.type'),'message':_0x4bbe4c(0x171)['concat'](_0x581fd6)});continue;}_0x81b99b[_0x4bbe4c(0x165)]!==undefined&&typeof _0x81b99b[_0x4bbe4c(0x165)]!=='boolean'&&_0x381b68[_0x4bbe4c(0x15f)]({'path':''[_0x4bbe4c(0x161)](_0xb2e2c,_0x4bbe4c(0x15e)),'message':'must\x20be\x20true\x20or\x20false'}),checkSettings(_0x2bd101[_0x4bbe4c(0x15d)],_0x81b99b['settings']??{},''[_0x4bbe4c(0x161)](_0xb2e2c,'.settings'),_0x381b68),checkBlocks(_0x2bd101,_0x81b99b,_0xb2e2c,_0x381b68);}}function checkKeyed(_0x219719,_0x2d3a48,_0x2d87cb,_0x13490e,_0x500e){const _0x3e4fd5=_0x3f2cbc;if(!isObject(_0x2d87cb)){_0x500e[_0x3e4fd5(0x15f)]({'path':_0x13490e,'message':'must\x20be\x20an\x20object'});return;}for(const [_0x29b3fd,_0x901928]of Object['entries'](_0x2d87cb)){if(_0x2d3a48[_0x3e4fd5(0x16d)](_0x29b3fd))checkGroup(_0x219719,_0x29b3fd,_0x901928,''['concat'](_0x13490e,'.')[_0x3e4fd5(0x161)](_0x29b3fd),_0x500e);else _0x500e[_0x3e4fd5(0x15f)]({'path':''['concat'](_0x13490e,'.')['concat'](_0x29b3fd),'message':'is\x20not\x20supported\x20by\x20this\x20theme'});}}export function validateDocument(_0xa47194,_0x4096bb){const _0x18534e=_0x3f2cbc,_0x542f1d=[];if(!isObject(_0xa47194))return{'valid':![],'errors':[{'path':'','message':_0x18534e(0x174)}]};return _0xa47194[_0x18534e(0x168)]!==SCHEMA_VERSION&&_0x542f1d['push']({'path':_0x18534e(0x168),'message':_0x18534e(0x173)[_0x18534e(0x161)](SCHEMA_VERSION)}),_0xa47194['theme']!==_0x4096bb['id']&&_0x542f1d['push']({'path':'theme','message':'must\x20be\x20'['concat'](_0x4096bb['id'])}),JSON['stringify'](_0xa47194)['length']>LIMITS[_0x18534e(0x17e)]&&_0x542f1d['push']({'path':'','message':'must\x20be\x20smaller\x20than\x20'[_0x18534e(0x161)](LIMITS[_0x18534e(0x17e)],'\x20bytes')}),checkSettings(_0x4096bb[_0x18534e(0x15d)],_0xa47194[_0x18534e(0x15d)]??{},_0x18534e(0x15d),_0x542f1d),checkKeyed(_0x4096bb,_0x4096bb['sectionGroups'],_0xa47194['sectionGroups'],_0x18534e(0x183),_0x542f1d),checkKeyed(_0x4096bb,_0x4096bb[_0x18534e(0x17a)],_0xa47194[_0x18534e(0x17a)],_0x18534e(0x17a),_0x542f1d),{'valid':_0x542f1d['length']===0x0,'errors':_0x542f1d};}
1
+ const _0x488009=_0x279a;(function(_0x35a26c,_0x4ed3fe){const _0x4f8f60=_0x279a,_0xfc95df=_0x35a26c();while(!![]){try{const _0x3f59fa=parseInt(_0x4f8f60(0x1b0))/0x1*(parseInt(_0x4f8f60(0x19a))/0x2)+-parseInt(_0x4f8f60(0x1a7))/0x3+-parseInt(_0x4f8f60(0x1a9))/0x4+-parseInt(_0x4f8f60(0x1bb))/0x5*(-parseInt(_0x4f8f60(0x191))/0x6)+-parseInt(_0x4f8f60(0x1ac))/0x7*(-parseInt(_0x4f8f60(0x198))/0x8)+-parseInt(_0x4f8f60(0x18f))/0x9*(parseInt(_0x4f8f60(0x195))/0xa)+parseInt(_0x4f8f60(0x19c))/0xb;if(_0x3f59fa===_0x4ed3fe)break;else _0xfc95df['push'](_0xfc95df['shift']());}catch(_0x333140){_0xfc95df['push'](_0xfc95df['shift']());}}}(_0x3f43,0xa4d36));import{checkAlternates}from'../alternates.js';import{LIMITS,SCHEMA_VERSION}from'../constants/document.js';import{isAlternateKey}from'../keys.js';import{isPageKey,PAGE_FIELDS,pageKeys,templateType}from'../pages.js';function _0x279a(_0x137c95,_0x480cbb){_0x137c95=_0x137c95-0x18d;const _0x3f4375=_0x3f43();let _0x279a83=_0x3f4375[_0x137c95];return _0x279a83;}function _0x3f43(){const _0x19138f=['\x20pages','\x20sections','limit','blocks','blocksPerSection','.sections.','settings','97535JdNbVK','schemaVersion','sectionGroups','string','length','stringify','templates','sectionsPerTemplate','must\x20be\x20smaller\x20than\x20','pages','isArray','map','sections','18IyggaV','is\x20not\x20supported\x20by\x20this\x20theme','6dwNOeL','entries','is\x20not\x20a\x20known\x20setting','disabled','5473010dOKnWc','must\x20be\x20an\x20object','.blocks','1000vNDXeW','\x20allows\x20at\x20most\x20','268yKmBMc','allows\x20at\x20most\x20','12390587Xebxkh','title','needs\x20an\x20order\x20array\x20and\x20an\x20object\x20of\x20items','theme','order\x20must\x20list\x20every\x20item\x20exactly\x20once','concat','maxBlocks','must\x20be\x20text\x20of\x201\x20to\x20','order','cannot\x20be\x20used\x20in\x20','documentBytes','2609178ZMygvR','every','1565220OjalXD','must\x20be\x20','type','46907ykPRBt','push','is\x20not\x20a\x20block\x20type\x20of\x20this\x20section','\x20bytes','7815scCXPi','must\x20be\x20true\x20or\x20false','boolean','.type'];_0x3f43=function(){return _0x19138f;};return _0x3f43();}import{checkSetting}from'./settings.js';const isObject=_0x38d7fe=>_0x38d7fe!==null&&typeof _0x38d7fe==='object'&&!Array[_0x488009(0x1c5)](_0x38d7fe);function checkSettings(_0x430eff,_0x3c609d,_0x2b466d,_0xff59ef){const _0x5a1052=_0x488009;if(!isObject(_0x3c609d)){_0xff59ef['push']({'path':_0x2b466d,'message':_0x5a1052(0x196)});return;}const _0x1d185f=new Map(_0x430eff[_0x5a1052(0x18d)](_0x262496=>[_0x262496['id'],_0x262496]));for(const [_0x2d2c65,_0x297aa1]of Object[_0x5a1052(0x192)](_0x3c609d)){const _0x3e9793=_0x1d185f['get'](_0x2d2c65),_0x20d88b=_0x3e9793?checkSetting(_0x3e9793,_0x297aa1):_0x5a1052(0x193);if(_0x20d88b)_0xff59ef['push']({'path':''[_0x5a1052(0x1a1)](_0x2b466d,'.')[_0x5a1052(0x1a1)](_0x2d2c65),'message':_0x20d88b});}}function checkOrder(_0x28df59,_0x15a5a9,_0x2d6b3a,_0x4e1737){const _0x5ded8f=_0x488009;if(!Array[_0x5ded8f(0x1c5)](_0x28df59)||!isObject(_0x15a5a9))return _0x4e1737['push']({'path':_0x2d6b3a,'message':_0x5ded8f(0x19e)}),![];const _0x32c6d3=Object['keys'](_0x15a5a9);if(new Set(_0x28df59)['size']!==_0x28df59[_0x5ded8f(0x1bf)]||_0x28df59[_0x5ded8f(0x1bf)]!==_0x32c6d3['length']||!_0x28df59[_0x5ded8f(0x1a8)](_0x2d288d=>_0x2d288d in _0x15a5a9))return _0x4e1737[_0x5ded8f(0x1ad)]({'path':_0x2d6b3a,'message':_0x5ded8f(0x1a0)}),![];return!![];}function checkBlocks(_0x4bb4bd,_0x2ce2d9,_0x59bc92,_0x397968){const _0x5b73d0=_0x488009,_0xa78472=_0x2ce2d9[_0x5b73d0(0x1b7)]??{},_0x24d4ce=_0x2ce2d9['blockOrder']??[];if(!checkOrder(_0x24d4ce,_0xa78472,''['concat'](_0x59bc92,_0x5b73d0(0x197)),_0x397968))return;const _0x16e0aa=Math['min'](_0x4bb4bd[_0x5b73d0(0x1a2)]??0x0,LIMITS[_0x5b73d0(0x1b8)]);_0x24d4ce['length']>_0x16e0aa&&_0x397968['push']({'path':''[_0x5b73d0(0x1a1)](_0x59bc92,'.blocks'),'message':_0x5b73d0(0x19b)['concat'](_0x16e0aa,'\x20blocks')});const _0x3b673e={};for(const _0x1057fa of _0x24d4ce){const _0xf38096=_0xa78472[_0x1057fa],_0xa5376e=_0x4bb4bd[_0x5b73d0(0x1b7)]?.[_0xf38096?.['type']];if(!_0xa5376e){_0x397968[_0x5b73d0(0x1ad)]({'path':''[_0x5b73d0(0x1a1)](_0x59bc92,'.blocks.')['concat'](_0x1057fa,'.type'),'message':_0x5b73d0(0x1ae)});continue;}_0x3b673e[_0xf38096['type']]=(_0x3b673e[_0xf38096[_0x5b73d0(0x1ab)]]??0x0)+0x1,_0xa5376e['limit']&&_0x3b673e[_0xf38096['type']]>_0xa5376e[_0x5b73d0(0x1b6)]&&_0x397968['push']({'path':''['concat'](_0x59bc92,'.blocks.')['concat'](_0x1057fa),'message':''['concat'](_0xf38096[_0x5b73d0(0x1ab)],_0x5b73d0(0x199))['concat'](_0xa5376e[_0x5b73d0(0x1b6)])}),checkSettings(_0xa5376e['settings'],_0xf38096[_0x5b73d0(0x1ba)]??{},''['concat'](_0x59bc92,'.blocks.')[_0x5b73d0(0x1a1)](_0x1057fa,'.settings'),_0x397968);}}function checkGroup(_0x3b9407,_0x522379,_0x55d5c4,_0x3bbd0b,_0x2ce065){const _0x351ce9=_0x488009;if(!isObject(_0x55d5c4)||!checkOrder(_0x55d5c4['order'],_0x55d5c4['sections'],_0x3bbd0b,_0x2ce065))return;_0x55d5c4['order'][_0x351ce9(0x1bf)]>LIMITS[_0x351ce9(0x1c2)]&&_0x2ce065['push']({'path':_0x3bbd0b,'message':'allows\x20at\x20most\x20'[_0x351ce9(0x1a1)](LIMITS['sectionsPerTemplate'],_0x351ce9(0x1b5))});for(const _0x18ffa3 of _0x55d5c4[_0x351ce9(0x1a4)]){const _0x45bef5=_0x55d5c4[_0x351ce9(0x18e)][_0x18ffa3],_0x45a237=''['concat'](_0x3bbd0b,_0x351ce9(0x1b9))['concat'](_0x18ffa3),_0xee36d5=_0x3b9407['sections'][_0x45bef5?.['type']];if(!_0xee36d5){_0x2ce065[_0x351ce9(0x1ad)]({'path':''['concat'](_0x45a237,'.type'),'message':'is\x20not\x20a\x20section\x20of\x20this\x20theme'});continue;}if(!_0xee36d5[_0x351ce9(0x1c1)]['includes'](templateType(_0x522379))){_0x2ce065['push']({'path':''['concat'](_0x45a237,'.type'),'message':_0x351ce9(0x1a5)[_0x351ce9(0x1a1)](_0x522379)});continue;}_0x45bef5['disabled']!==undefined&&typeof _0x45bef5[_0x351ce9(0x194)]!=='boolean'&&_0x2ce065[_0x351ce9(0x1ad)]({'path':''['concat'](_0x45a237,'.disabled'),'message':'must\x20be\x20true\x20or\x20false'}),checkSettings(_0xee36d5['settings'],_0x45bef5[_0x351ce9(0x1ba)]??{},''['concat'](_0x45a237,'.settings'),_0x2ce065),checkBlocks(_0xee36d5,_0x45bef5,_0x45a237,_0x2ce065);}}export function validateSection(_0x2502d6,_0x5b01ca,_0x2f5a3d=''){const _0xd1d686=_0x488009,_0x577951=[],_0x132ae1=_0x2502d6['sections'][_0x5b01ca?.['type']];if(!isObject(_0x5b01ca)||!_0x132ae1)return[{'path':''[_0xd1d686(0x1a1)](_0x2f5a3d,_0xd1d686(0x1b3)),'message':'is\x20not\x20a\x20section\x20of\x20this\x20theme'}];return _0x5b01ca[_0xd1d686(0x194)]!==undefined&&typeof _0x5b01ca[_0xd1d686(0x194)]!==_0xd1d686(0x1b2)&&_0x577951[_0xd1d686(0x1ad)]({'path':''[_0xd1d686(0x1a1)](_0x2f5a3d,'.disabled'),'message':_0xd1d686(0x1b1)}),checkSettings(_0x132ae1['settings'],_0x5b01ca['settings']??{},''[_0xd1d686(0x1a1)](_0x2f5a3d,'.settings'),_0x577951),checkBlocks(_0x132ae1,_0x5b01ca,_0x2f5a3d,_0x577951),_0x577951;}function checkPageFields(_0x34a5f6,_0x1f6516,_0x544fd7){const _0x1c9367=_0x488009;if(!isObject(_0x34a5f6))return;for(const [_0x5c9098,_0x51b33f]of Object['entries'](PAGE_FIELDS)){const _0x293f9b=_0x34a5f6[_0x5c9098],_0x3d4818=_0x5c9098===_0x1c9367(0x19d);if(_0x293f9b===undefined&&!_0x3d4818||typeof _0x293f9b===_0x1c9367(0x1be)&&_0x293f9b[_0x1c9367(0x1bf)]<=_0x51b33f&&(!_0x3d4818||_0x293f9b['trim']()))continue;_0x544fd7[_0x1c9367(0x1ad)]({'path':''[_0x1c9367(0x1a1)](_0x1f6516,'.')['concat'](_0x5c9098),'message':_0x3d4818?_0x1c9367(0x1a3)['concat'](_0x51b33f,'\x20characters'):'must\x20be\x20text\x20up\x20to\x20'[_0x1c9367(0x1a1)](_0x51b33f,'\x20characters')});}}function checkKeyed(_0x27fea9,_0x485289,_0x42a993,_0x153fde,_0x5b9c99,_0x3605d2=![]){const _0x4fd8a5=_0x488009;if(!isObject(_0x42a993)){_0x5b9c99['push']({'path':_0x153fde,'message':_0x4fd8a5(0x196)});return;}for(const [_0x467069,_0x32f6ee]of Object['entries'](_0x42a993)){if(_0x3605d2&&isPageKey(_0x467069))checkPageFields(_0x32f6ee,''[_0x4fd8a5(0x1a1)](_0x153fde,'.')['concat'](_0x467069),_0x5b9c99),checkGroup(_0x27fea9,_0x467069,_0x32f6ee,''[_0x4fd8a5(0x1a1)](_0x153fde,'.')[_0x4fd8a5(0x1a1)](_0x467069),_0x5b9c99);else{if(_0x3605d2&&isAlternateKey(_0x467069))checkGroup(_0x27fea9,_0x467069,_0x32f6ee,''['concat'](_0x153fde,'.')[_0x4fd8a5(0x1a1)](_0x467069),_0x5b9c99);else{if(_0x485289['includes'](_0x467069))checkGroup(_0x27fea9,_0x467069,_0x32f6ee,''['concat'](_0x153fde,'.')[_0x4fd8a5(0x1a1)](_0x467069),_0x5b9c99);else _0x5b9c99[_0x4fd8a5(0x1ad)]({'path':''['concat'](_0x153fde,'.')['concat'](_0x467069),'message':_0x4fd8a5(0x190)});}}}}export function validateDocument(_0x14137b,_0x509f59){const _0x1d0227=_0x488009,_0x500494=[];if(!isObject(_0x14137b))return{'valid':![],'errors':[{'path':'','message':'must\x20be\x20an\x20object'}]};_0x14137b[_0x1d0227(0x1bc)]!==SCHEMA_VERSION&&_0x500494['push']({'path':_0x1d0227(0x1bc),'message':'must\x20be\x20'[_0x1d0227(0x1a1)](SCHEMA_VERSION)});_0x14137b['theme']!==_0x509f59['id']&&_0x500494['push']({'path':_0x1d0227(0x19f),'message':_0x1d0227(0x1aa)[_0x1d0227(0x1a1)](_0x509f59['id'])});JSON[_0x1d0227(0x1c0)](_0x14137b)['length']>LIMITS[_0x1d0227(0x1a6)]&&_0x500494[_0x1d0227(0x1ad)]({'path':'','message':_0x1d0227(0x1c3)[_0x1d0227(0x1a1)](LIMITS[_0x1d0227(0x1a6)],_0x1d0227(0x1af))});checkSettings(_0x509f59[_0x1d0227(0x1ba)],_0x14137b['settings']??{},_0x1d0227(0x1ba),_0x500494),checkKeyed(_0x509f59,_0x509f59['sectionGroups'],_0x14137b[_0x1d0227(0x1bd)],_0x1d0227(0x1bd),_0x500494),checkKeyed(_0x509f59,_0x509f59[_0x1d0227(0x1c1)],_0x14137b[_0x1d0227(0x1c1)],_0x1d0227(0x1c1),_0x500494,!![]);if(isObject(_0x14137b['templates']))_0x500494[_0x1d0227(0x1ad)](...checkAlternates(_0x14137b));return pageKeys(_0x14137b)[_0x1d0227(0x1bf)]>LIMITS[_0x1d0227(0x1c4)]&&_0x500494['push']({'path':_0x1d0227(0x1c1),'message':'allows\x20at\x20most\x20'[_0x1d0227(0x1a1)](LIMITS[_0x1d0227(0x1c4)],_0x1d0227(0x1b4))}),{'valid':_0x500494[_0x1d0227(0x1bf)]===0x0,'errors':_0x500494};}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kabawat/store-themes",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "DragBizz storefront theme documents, section schemas, presets and validation.",
5
5
  "repository": {
6
6
  "type": "git",