@mantou/gem 1.6.16 → 1.6.17

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/gem.es.js CHANGED
@@ -3236,7 +3236,7 @@ const mediaQuery = {
3236
3236
  get isWidthScreen() {
3237
3237
  return matche(this.WIDTHSCREEN);
3238
3238
  },
3239
- PHONE_LANDSCAPE: "(min-width: 479px) and (max-width: 767px) and (orientation: landscape)",
3239
+ PHONE_LANDSCAPE: "(min-width: 479px) and (max-width: 959px) and (orientation: landscape)",
3240
3240
  get isPhoneLandscape() {
3241
3241
  return matche(this.PHONE_LANDSCAPE);
3242
3242
  },
@@ -3269,7 +3269,7 @@ const mediaQuery = {
3269
3269
  return matche(this.DATA_REDUCE);
3270
3270
  }
3271
3271
  };
3272
- const version = "1.6.16";
3272
+ const version = "1.6.17";
3273
3273
  if (window.__GEM_DEVTOOLS__HOOK__) {
3274
3274
  Object.assign(window.__GEM_DEVTOOLS__HOOK__, __spreadValues({}, Gem));
3275
3275
  }
package/dist/gem.umd.js CHANGED
@@ -226,4 +226,4 @@ var ai=Object.defineProperty,ci=Object.defineProperties;var li=Object.getOwnProp
226
226
  ${this.contentcss}
227
227
  </style>
228
228
  ${this.content}
229
- `)},()=>[this.content,this.contentcss])}render(){}}is([k],ct.prototype,"content",2),is([k],ct.prototype,"contentcss",2),customElements.define("gem-unsafe",ct);var qs=Object.defineProperty,xs=Object.getOwnPropertyDescriptor,Us=(n,e,t,s)=>{for(var i=s>1?void 0:s?xs(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&qs(e,t,i),i};document.querySelectorAll("[data-reflect]").forEach(n=>n.remove());class Ft extends A{constructor(){super({isLight:!0});this.target=document.head,this.hidden=!0,this.dataset.gemreflect="",this.effect(()=>{const e=[...this.childNodes];return e.forEach(t=>{t instanceof HTMLElement&&(t.dataset.reflect=""),this.target.append(t)}),()=>{e.forEach(t=>t.remove())}},()=>[this.target])}}Us([q],Ft.prototype,"target",2),customElements.define("gem-reflect",Ft);const lt=Symbol("open mark");function Bs(n){var e;return e=class extends A{constructor(){super();this.label="",this.internals.role="alertdialog",this.internals.ariaModal="true"}static get isOpen(){return this.store[lt]}static get observedStores(){return[E.store,this.store]}static open(t){const s=new this;this.instance=s,this.inertStore=[...document.body.children].filter(r=>!r.inert),this.inertStore.forEach(r=>r.inert=!0),document.body.append(s);const i=()=>P(this.store,T({[lt]:!0},t));setTimeout(()=>{i(),E.push({title:s.label,open:i,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100)}static close(){E.back()}static closeHandle(){var t;this.inertStore.forEach(s=>s.inert=!1),(t=this.instance)==null||t.remove(),P(this.store,T({[lt]:!1},n))}static shouldClose(){return!0}},e.inertStore=[],e.instance=null,e.store=z(T({[lt]:!1},n)),e}var Ks=Object.defineProperty,zs=Object.getOwnPropertyDescriptor,Jt=(n,e,t,s)=>{for(var i=s>1?void 0:s?zs(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Ks(e,t,i),i};o.GemDialogBaseElement=(ds=class extends A{constructor(){super();M(this,_e,void 0);M(this,ve,void 0);M(this,he,void 0);this.inert=!0,G(this,he,[]),this.closeHandle=()=>{var n;this.inert=!0,g(this,he).forEach(e=>e.inert=!1),g(this,_e)?g(this,_e).before(this):g(this,ve)&&((n=g(this,ve))==null||n.appendChild(this)),this.dispatchEvent(new CustomEvent("close")),this.opened=!1},this.openHandle=()=>{this.hidden=!1,this.inert=!1,G(this,_e,this.nextSibling),G(this,ve,this.parentElement||this.getRootNode()),G(this,he,[...document.body.children].filter(n=>!n.inert)),g(this,he).forEach(n=>n.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0},this.open=()=>{this.opened||(this.openHandle(),E.push({title:this.label,open:this.openHandle,close:this.closeHandle,shouldClose:this.shouldClose}))},this.close=()=>{E.back()},this.forceClose=()=>{this.opened=!1,setTimeout(this.close,100)},this.internals.role="dialog",this.internals.ariaModal="true"}shouldClose(){return!0}},_e=new WeakMap,ve=new WeakMap,he=new WeakMap,ds),Jt([k],o.GemDialogBaseElement.prototype,"label",2),Jt([Ge],o.GemDialogBaseElement.prototype,"opened",2),o.GemDialogBaseElement=Jt([oe(E.store)],o.GemDialogBaseElement);const Qt=new WeakMap;function rs(n){return Qt.get(n)}const Yt=new WeakMap;function Fs(n){return Yt.get(n)}function Js(n,e){const t=Qt.get(e),s=Yt.get(e),i=Object.keys(t).reduce((r,a)=>t[a]?r+`${s[a]}:${t[a]};`:r,"");n.textContent=`:root, :host {${i}}`}function Qs(n){const e=Me(),t=document.createElement("style"),s=z(n),i={},r={};Yt.set(i,r),Qt.set(i,s),Object.keys(s).forEach(c=>{r[c]=`--${I(c)}-${e}`,i[c]=`var(${r[c]})`});const a=()=>Js(t,i);return se(s,a),a(),(document.head||document.documentElement).append(t),i}function Ys(n,e){const t=rs(n);P(t,e)}const Zs=/\$\d(?:<[^>]*>)?/,Xs=/\$(\d)(<([^>]*)>)?/g,ei=3;function os(n,...e){const t=n.split(Zs),s=[];let i;for(;i=Xs.exec(n);){const r=i[ei],a=Number(i[1])-1,c=e[a];s.push(typeof c=="function"?c(r):c)}return N(t,...s)}const je=new Set,Zt=class{constructor(e){M(this,be);M(this,ut);M(this,dt);M(this,ue);M(this,Pe);if(this.cachePrefix="gem-i18n",!e.resources[e.fallbackLanguage])throw new K("i18n: fallbackLanguage invalid");this.store=z(this),Object.assign(this,e);let t=g(this,ut,di)||this.currentLanguage||g(this,dt,fi);const s=document.querySelector(`[type*=${this.cachePrefix}]`);if(s)try{const i=JSON.parse(s.textContent||"");t=i.currentLanguage,this.resources[i.currentLanguage]=i.currentLanguagePack}catch{}t?(G(this,Pe,t,nn),this.setLanguage(t)):this.resetLanguage()}get(e,...t){const s=this.resources[this.currentLanguage],i=this.resources[this.fallbackLanguage],r=s[e]||i[e],a=(r==null?void 0:r.message)||r||`[${e}]`;return t.length?os(a,...t):a}detectLanguage(){const e=Object.keys(this.resources),t=navigator.languages.map(s=>s.replace(/-(.*)/,i=>i.toUpperCase()));for(const s of t){const i=e.find(r=>r===s||s.startsWith(`${r}-`));if(i)return i}return this.fallbackLanguage}async setLanguage(e){g(this,ue,mt)&&je.forEach(async i=>await i.setLanguage(e));let t;const s=this.resources[e];if(!s)return console.warn(`${this.cachePrefix}: not found \`${e}\``),this.resetLanguage();if(typeof s=="string"){const i=`${this.cachePrefix}:`,r=`${i}${s}`,a=localStorage.getItem(r),c=async()=>{const l=await(await fetch(s)).json();if(this.cache){for(let h=0;h<localStorage.length;h++){const m=localStorage.key(h);m.startsWith(i)&&localStorage.removeItem(m)}localStorage.setItem(r,JSON.stringify(l))}return l};if(a)try{t=JSON.parse(a)}catch{t=await c()}else t=await c()}else t=s;return this.resources[e]=t,P(this.store,{}),e!==this.currentLanguage&&G(this,Pe,e,nn),this.cache===!0&&this.setCache(),e}resetLanguage(){return g(this,ue,mt)&&je.forEach(e=>e.resetLanguage()),G(this,Pe,this.fallbackLanguage,nn),this.cache&&localStorage.removeItem(g(this,be,tn)),this.setLanguage(this.detectLanguage())}setCache(){g(this,ue,mt)&&je.forEach(e=>e.setCache()),localStorage.setItem(g(this,be,tn),this.currentLanguage)}createSubModule(e,t){const s=new Zt({resources:t,cachePrefix:`${this.cachePrefix}-${e}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return je.add(s),s}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}};let as=Zt;be=new WeakSet,tn=function(){return`${this.cachePrefix}:current`},ut=new WeakSet,di=function(){const{hostname:e,pathname:t,search:s}=location,i=e.split(".");switch(this.urlParamsType){case"ccTLD":return i.pop();case"gTLD":return i.shift();case"path":return t.split("/")[1];default:const r=this.urlParamsName&&new URLSearchParams(s).get(this.urlParamsName)||"";return r in this.resources?r:""}},dt=new WeakSet,fi=function(){return this.cache&&localStorage.getItem(g(this,be,tn))||""},ue=new WeakSet,mt=function(){return!je.has(this)},Pe=new WeakSet,nn=function(e){var t;g(this,ue,mt)&&(document.documentElement.lang=e),this.currentLanguage=e,(t=this.onChange)==null||t.call(this,e)};const cs={headers:{"Content-Type":"application/json"}};async function De(n,e={}){const t=await fetch(n,T(T({},cs),e));if(t.status===0)throw new Error("Request fail");if(t.status>=500)throw new Error(t.statusText);try{const s=await t.json();if(t.status>=400)throw new Error((s==null?void 0:s.message)||t.statusText,{cause:s});return s}catch{throw new Error("Server error")}}const ti=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function ls(n){return n instanceof FormData||n instanceof Blob||n instanceof ti||n instanceof URLSearchParams||n instanceof ReadableStream||n instanceof ArrayBuffer?n:typeof n=="object"?JSON.stringify(n):n}function hs(n,e){const{origin:t,pathname:s,search:i}=new URL(n,location.origin),r=new URLSearchParams(e).toString();return`${t}${s}${i?`${i}&`:r?"?":""}${r}`}function ni(n,e){return De(hs(n,e),{method:"GET"})}function si(n,e){return De(hs(n,e),{method:"DELETE"})}function ii(n,e){return De(n,{method:"PUT",body:ls(e)})}function ri(n,e){return De(n,{method:"POST",body:ls(e)})}const R=n=>window.matchMedia(n).matches,oi={PRINT:"print",get isPrint(){return R(this.PRINT)},HOVER:"(hover: hover)",get isHover(){return R(this.HOVER)},PHONE:"(min-width: 319px) and (max-width: 480px)",get isPhone(){return R(this.PHONE)},LAPTOP:"(min-width: 1023px) and (max-width: 1280px) and (orientation: landscape)",get isLaptop(){return R(this.LAPTOP)},DESKTOP:"(min-width: 1279px) and (orientation: landscape)",get isDesktop(){return R(this.DESKTOP)},WIDTHSCREEN:"(min-width: 1919px) and (orientation: landscape)",get isWidthScreen(){return R(this.WIDTHSCREEN)},PHONE_LANDSCAPE:"(min-width: 479px) and (max-width: 767px) and (orientation: landscape)",get isPhoneLandscape(){return R(this.PHONE_LANDSCAPE)},TABLET:"(min-width: 768px) and (max-width: 1024px)",get isTablet(){return R(this.TABLET)},SMALL_PHONE:"(min-width: 319px) and (max-width: 480px) and (max-height: 640px)",get isSmallPhone(){return R(this.SMALL_PHONE)},WATCH:"(max-width: 319px)",get isWatch(){return R(this.WATCH)},SHORT:"(min-width: 479px) and (max-height: 320px)",get isShort(){return R(this.SHORT)},PWA:"(display-mode: standalone)",get isPWA(){return R(this.PWA)},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return R(this.MOTION_REDUCE)},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return R(this.DATA_REDUCE)}},us="1.6.16";window.__GEM_DEVTOOLS__HOOK__&&Object.assign(window.__GEM_DEVTOOLS__HOOK__,T({},f)),o.GemElement=A,o.GemError=K,o.GemLightRouteElement=ts,o.GemReflectElement=Ft,o.GemUnsafeElement=ct,o.GemUseElement=we,o.I18n=as,o.LinkedList=_t,o.PropProxyMap=vt,o.QueryString=fe,o.SVGTemplateResult=yt,o.SheetToken=Be,o.StoreListenerMap=ne,o.TemplateResult=ke,o.absoluteLocation=Ue,o.addMicrotask=H,o.addMicrotaskToStack=wn,o.adoptedStyle=qn,o.attribute=k,o.basePathStore=Ut,o.boolattribute=In,o.camelToKebabCase=I,o.classMap=Tt,o.cleanObject=Ne,o.connect=se,o.connectStore=oe,o.createCSSSheet=En,o.createHistoryParams=es,o.createModalClass=Bs,o.createPath=zt,o.createStore=z,o.createStoreSet=Tn,o.createTheme=Qs,o.css=Sn,o.customElement=Un,o.defaultReqInit=cs,o.defineAttribute=et,o.defineCSSState=nt,o.defineProperty=ye,o.defineRef=tt,o.del=si,o.directive=J,o.disconnect=kt,o.emitter=He,o.exportPartsMap=Cn,o.get=ni,o.getThemeProp=Fs,o.getThemeStore=rs,o.globalemitter=jn,o.guard=On,o.history=E,o.html=N,o.ifDefined=Ot,o.isArrayChange=Pt,o.kebabToCamelCase=pe,o.matchPath=Kt,o.mediaQuery=oi,o.nativeDefineElement=st,o.numattribute=Vn,o.objectMapToString=Oe,o.part=Dt,o.partMap=Pn,o.post=ri,o.property=q,o.put=ii,o.randomStr=Me,o.raw=me,o.refobject=Hn,o.removeItems=Ct,o.render=xe,o.repeat=Nn,o.request=De,o.rootElement=xn,o.slot=Wn,o.splice=os,o.state=Ge,o.styleMap=bn,o.styled=vn,o.svg=yn,o.titleStore=ae,o.updateStore=P,o.updateTheme=Ys,o.version=us,Object.defineProperty(o,"__esModule",{value:!0}),o[Symbol.toStringTag]="Module"});
229
+ `)},()=>[this.content,this.contentcss])}render(){}}is([k],ct.prototype,"content",2),is([k],ct.prototype,"contentcss",2),customElements.define("gem-unsafe",ct);var qs=Object.defineProperty,xs=Object.getOwnPropertyDescriptor,Us=(n,e,t,s)=>{for(var i=s>1?void 0:s?xs(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&qs(e,t,i),i};document.querySelectorAll("[data-reflect]").forEach(n=>n.remove());class Ft extends A{constructor(){super({isLight:!0});this.target=document.head,this.hidden=!0,this.dataset.gemreflect="",this.effect(()=>{const e=[...this.childNodes];return e.forEach(t=>{t instanceof HTMLElement&&(t.dataset.reflect=""),this.target.append(t)}),()=>{e.forEach(t=>t.remove())}},()=>[this.target])}}Us([q],Ft.prototype,"target",2),customElements.define("gem-reflect",Ft);const lt=Symbol("open mark");function Bs(n){var e;return e=class extends A{constructor(){super();this.label="",this.internals.role="alertdialog",this.internals.ariaModal="true"}static get isOpen(){return this.store[lt]}static get observedStores(){return[E.store,this.store]}static open(t){const s=new this;this.instance=s,this.inertStore=[...document.body.children].filter(r=>!r.inert),this.inertStore.forEach(r=>r.inert=!0),document.body.append(s);const i=()=>P(this.store,T({[lt]:!0},t));setTimeout(()=>{i(),E.push({title:s.label,open:i,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100)}static close(){E.back()}static closeHandle(){var t;this.inertStore.forEach(s=>s.inert=!1),(t=this.instance)==null||t.remove(),P(this.store,T({[lt]:!1},n))}static shouldClose(){return!0}},e.inertStore=[],e.instance=null,e.store=z(T({[lt]:!1},n)),e}var Ks=Object.defineProperty,zs=Object.getOwnPropertyDescriptor,Jt=(n,e,t,s)=>{for(var i=s>1?void 0:s?zs(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Ks(e,t,i),i};o.GemDialogBaseElement=(ds=class extends A{constructor(){super();M(this,_e,void 0);M(this,ve,void 0);M(this,he,void 0);this.inert=!0,G(this,he,[]),this.closeHandle=()=>{var n;this.inert=!0,g(this,he).forEach(e=>e.inert=!1),g(this,_e)?g(this,_e).before(this):g(this,ve)&&((n=g(this,ve))==null||n.appendChild(this)),this.dispatchEvent(new CustomEvent("close")),this.opened=!1},this.openHandle=()=>{this.hidden=!1,this.inert=!1,G(this,_e,this.nextSibling),G(this,ve,this.parentElement||this.getRootNode()),G(this,he,[...document.body.children].filter(n=>!n.inert)),g(this,he).forEach(n=>n.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0},this.open=()=>{this.opened||(this.openHandle(),E.push({title:this.label,open:this.openHandle,close:this.closeHandle,shouldClose:this.shouldClose}))},this.close=()=>{E.back()},this.forceClose=()=>{this.opened=!1,setTimeout(this.close,100)},this.internals.role="dialog",this.internals.ariaModal="true"}shouldClose(){return!0}},_e=new WeakMap,ve=new WeakMap,he=new WeakMap,ds),Jt([k],o.GemDialogBaseElement.prototype,"label",2),Jt([Ge],o.GemDialogBaseElement.prototype,"opened",2),o.GemDialogBaseElement=Jt([oe(E.store)],o.GemDialogBaseElement);const Qt=new WeakMap;function rs(n){return Qt.get(n)}const Yt=new WeakMap;function Fs(n){return Yt.get(n)}function Js(n,e){const t=Qt.get(e),s=Yt.get(e),i=Object.keys(t).reduce((r,a)=>t[a]?r+`${s[a]}:${t[a]};`:r,"");n.textContent=`:root, :host {${i}}`}function Qs(n){const e=Me(),t=document.createElement("style"),s=z(n),i={},r={};Yt.set(i,r),Qt.set(i,s),Object.keys(s).forEach(c=>{r[c]=`--${I(c)}-${e}`,i[c]=`var(${r[c]})`});const a=()=>Js(t,i);return se(s,a),a(),(document.head||document.documentElement).append(t),i}function Ys(n,e){const t=rs(n);P(t,e)}const Zs=/\$\d(?:<[^>]*>)?/,Xs=/\$(\d)(<([^>]*)>)?/g,ei=3;function os(n,...e){const t=n.split(Zs),s=[];let i;for(;i=Xs.exec(n);){const r=i[ei],a=Number(i[1])-1,c=e[a];s.push(typeof c=="function"?c(r):c)}return N(t,...s)}const je=new Set,Zt=class{constructor(e){M(this,be);M(this,ut);M(this,dt);M(this,ue);M(this,Pe);if(this.cachePrefix="gem-i18n",!e.resources[e.fallbackLanguage])throw new K("i18n: fallbackLanguage invalid");this.store=z(this),Object.assign(this,e);let t=g(this,ut,di)||this.currentLanguage||g(this,dt,fi);const s=document.querySelector(`[type*=${this.cachePrefix}]`);if(s)try{const i=JSON.parse(s.textContent||"");t=i.currentLanguage,this.resources[i.currentLanguage]=i.currentLanguagePack}catch{}t?(G(this,Pe,t,nn),this.setLanguage(t)):this.resetLanguage()}get(e,...t){const s=this.resources[this.currentLanguage],i=this.resources[this.fallbackLanguage],r=s[e]||i[e],a=(r==null?void 0:r.message)||r||`[${e}]`;return t.length?os(a,...t):a}detectLanguage(){const e=Object.keys(this.resources),t=navigator.languages.map(s=>s.replace(/-(.*)/,i=>i.toUpperCase()));for(const s of t){const i=e.find(r=>r===s||s.startsWith(`${r}-`));if(i)return i}return this.fallbackLanguage}async setLanguage(e){g(this,ue,mt)&&je.forEach(async i=>await i.setLanguage(e));let t;const s=this.resources[e];if(!s)return console.warn(`${this.cachePrefix}: not found \`${e}\``),this.resetLanguage();if(typeof s=="string"){const i=`${this.cachePrefix}:`,r=`${i}${s}`,a=localStorage.getItem(r),c=async()=>{const l=await(await fetch(s)).json();if(this.cache){for(let h=0;h<localStorage.length;h++){const m=localStorage.key(h);m.startsWith(i)&&localStorage.removeItem(m)}localStorage.setItem(r,JSON.stringify(l))}return l};if(a)try{t=JSON.parse(a)}catch{t=await c()}else t=await c()}else t=s;return this.resources[e]=t,P(this.store,{}),e!==this.currentLanguage&&G(this,Pe,e,nn),this.cache===!0&&this.setCache(),e}resetLanguage(){return g(this,ue,mt)&&je.forEach(e=>e.resetLanguage()),G(this,Pe,this.fallbackLanguage,nn),this.cache&&localStorage.removeItem(g(this,be,tn)),this.setLanguage(this.detectLanguage())}setCache(){g(this,ue,mt)&&je.forEach(e=>e.setCache()),localStorage.setItem(g(this,be,tn),this.currentLanguage)}createSubModule(e,t){const s=new Zt({resources:t,cachePrefix:`${this.cachePrefix}-${e}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return je.add(s),s}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}};let as=Zt;be=new WeakSet,tn=function(){return`${this.cachePrefix}:current`},ut=new WeakSet,di=function(){const{hostname:e,pathname:t,search:s}=location,i=e.split(".");switch(this.urlParamsType){case"ccTLD":return i.pop();case"gTLD":return i.shift();case"path":return t.split("/")[1];default:const r=this.urlParamsName&&new URLSearchParams(s).get(this.urlParamsName)||"";return r in this.resources?r:""}},dt=new WeakSet,fi=function(){return this.cache&&localStorage.getItem(g(this,be,tn))||""},ue=new WeakSet,mt=function(){return!je.has(this)},Pe=new WeakSet,nn=function(e){var t;g(this,ue,mt)&&(document.documentElement.lang=e),this.currentLanguage=e,(t=this.onChange)==null||t.call(this,e)};const cs={headers:{"Content-Type":"application/json"}};async function De(n,e={}){const t=await fetch(n,T(T({},cs),e));if(t.status===0)throw new Error("Request fail");if(t.status>=500)throw new Error(t.statusText);try{const s=await t.json();if(t.status>=400)throw new Error((s==null?void 0:s.message)||t.statusText,{cause:s});return s}catch{throw new Error("Server error")}}const ti=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function ls(n){return n instanceof FormData||n instanceof Blob||n instanceof ti||n instanceof URLSearchParams||n instanceof ReadableStream||n instanceof ArrayBuffer?n:typeof n=="object"?JSON.stringify(n):n}function hs(n,e){const{origin:t,pathname:s,search:i}=new URL(n,location.origin),r=new URLSearchParams(e).toString();return`${t}${s}${i?`${i}&`:r?"?":""}${r}`}function ni(n,e){return De(hs(n,e),{method:"GET"})}function si(n,e){return De(hs(n,e),{method:"DELETE"})}function ii(n,e){return De(n,{method:"PUT",body:ls(e)})}function ri(n,e){return De(n,{method:"POST",body:ls(e)})}const R=n=>window.matchMedia(n).matches,oi={PRINT:"print",get isPrint(){return R(this.PRINT)},HOVER:"(hover: hover)",get isHover(){return R(this.HOVER)},PHONE:"(min-width: 319px) and (max-width: 480px)",get isPhone(){return R(this.PHONE)},LAPTOP:"(min-width: 1023px) and (max-width: 1280px) and (orientation: landscape)",get isLaptop(){return R(this.LAPTOP)},DESKTOP:"(min-width: 1279px) and (orientation: landscape)",get isDesktop(){return R(this.DESKTOP)},WIDTHSCREEN:"(min-width: 1919px) and (orientation: landscape)",get isWidthScreen(){return R(this.WIDTHSCREEN)},PHONE_LANDSCAPE:"(min-width: 479px) and (max-width: 959px) and (orientation: landscape)",get isPhoneLandscape(){return R(this.PHONE_LANDSCAPE)},TABLET:"(min-width: 768px) and (max-width: 1024px)",get isTablet(){return R(this.TABLET)},SMALL_PHONE:"(min-width: 319px) and (max-width: 480px) and (max-height: 640px)",get isSmallPhone(){return R(this.SMALL_PHONE)},WATCH:"(max-width: 319px)",get isWatch(){return R(this.WATCH)},SHORT:"(min-width: 479px) and (max-height: 320px)",get isShort(){return R(this.SHORT)},PWA:"(display-mode: standalone)",get isPWA(){return R(this.PWA)},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return R(this.MOTION_REDUCE)},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return R(this.DATA_REDUCE)}},us="1.6.17";window.__GEM_DEVTOOLS__HOOK__&&Object.assign(window.__GEM_DEVTOOLS__HOOK__,T({},f)),o.GemElement=A,o.GemError=K,o.GemLightRouteElement=ts,o.GemReflectElement=Ft,o.GemUnsafeElement=ct,o.GemUseElement=we,o.I18n=as,o.LinkedList=_t,o.PropProxyMap=vt,o.QueryString=fe,o.SVGTemplateResult=yt,o.SheetToken=Be,o.StoreListenerMap=ne,o.TemplateResult=ke,o.absoluteLocation=Ue,o.addMicrotask=H,o.addMicrotaskToStack=wn,o.adoptedStyle=qn,o.attribute=k,o.basePathStore=Ut,o.boolattribute=In,o.camelToKebabCase=I,o.classMap=Tt,o.cleanObject=Ne,o.connect=se,o.connectStore=oe,o.createCSSSheet=En,o.createHistoryParams=es,o.createModalClass=Bs,o.createPath=zt,o.createStore=z,o.createStoreSet=Tn,o.createTheme=Qs,o.css=Sn,o.customElement=Un,o.defaultReqInit=cs,o.defineAttribute=et,o.defineCSSState=nt,o.defineProperty=ye,o.defineRef=tt,o.del=si,o.directive=J,o.disconnect=kt,o.emitter=He,o.exportPartsMap=Cn,o.get=ni,o.getThemeProp=Fs,o.getThemeStore=rs,o.globalemitter=jn,o.guard=On,o.history=E,o.html=N,o.ifDefined=Ot,o.isArrayChange=Pt,o.kebabToCamelCase=pe,o.matchPath=Kt,o.mediaQuery=oi,o.nativeDefineElement=st,o.numattribute=Vn,o.objectMapToString=Oe,o.part=Dt,o.partMap=Pn,o.post=ri,o.property=q,o.put=ii,o.randomStr=Me,o.raw=me,o.refobject=Hn,o.removeItems=Ct,o.render=xe,o.repeat=Nn,o.request=De,o.rootElement=xn,o.slot=Wn,o.splice=os,o.state=Ge,o.styleMap=bn,o.styled=vn,o.svg=yn,o.titleStore=ae,o.updateStore=P,o.updateTheme=Ys,o.version=us,Object.defineProperty(o,"__esModule",{value:!0}),o[Symbol.toStringTag]="Module"});
@@ -26,8 +26,8 @@ export const mediaQuery = {
26
26
  get isWidthScreen() {
27
27
  return matche(this.WIDTHSCREEN);
28
28
  },
29
- PHONE_LANDSCAPE: '(min-width: 479px) and (max-width: 767px) and (orientation: landscape)',
30
- // PHONE_LANDSCAPE: '(min-width: 481px) and (max-width: 767px)',
29
+ PHONE_LANDSCAPE: '(min-width: 479px) and (max-width: 959px) and (orientation: landscape)',
30
+ // PHONE_LANDSCAPE: '(min-width: 481px) and (max-width: 959px)',
31
31
  get isPhoneLandscape() {
32
32
  return matche(this.PHONE_LANDSCAPE);
33
33
  },
package/lib/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const version = "1.6.16";
1
+ export declare const version = "1.6.17";
2
2
  //# sourceMappingURL=version.d.ts.map
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const version = '1.6.16';
1
+ export const version = '1.6.17';
2
2
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mantou/gem",
3
- "version": "1.6.16",
3
+ "version": "1.6.17",
4
4
  "description": "💎 使用自定义元素的轻量级 WebApp 开发框架",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -33,8 +33,8 @@ export const mediaQuery = {
33
33
  return matche(this.WIDTHSCREEN);
34
34
  },
35
35
 
36
- PHONE_LANDSCAPE: '(min-width: 479px) and (max-width: 767px) and (orientation: landscape)',
37
- // PHONE_LANDSCAPE: '(min-width: 481px) and (max-width: 767px)',
36
+ PHONE_LANDSCAPE: '(min-width: 479px) and (max-width: 959px) and (orientation: landscape)',
37
+ // PHONE_LANDSCAPE: '(min-width: 481px) and (max-width: 959px)',
38
38
  get isPhoneLandscape() {
39
39
  return matche(this.PHONE_LANDSCAPE);
40
40
  },
@@ -1 +1 @@
1
- export const version = '1.6.16';
1
+ export const version = '1.6.17';