amotify 0.2.133 → 0.2.134
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
|
-
import"../chunk-C5N2D3ZX.js";import{Fragment as u,jsx as e,jsxs as
|
|
1
|
+
import"../chunk-C5N2D3ZX.js";import{Fragment as u,jsx as e,jsxs as i}from"react/jsx-runtime";import{Config as o}from".";import s from"./useRefresh";import{Box as c}from"../atoms";import{Sheet as m,Snackbar as l,Loader as f,Effect as r}from"../fn";const p=t=>{var a;let n=s.catch("LaunchReactApp_"+o.get().sessionUID);return i(u,{children:[e("style",{children:t.inlineCSS}),i("amotify-app",{id:"appRoot_"+o.get().sessionUID,children:[e(r.Pudding.Wrapper,{}),e(r.Ripple.Wrapper,{}),e(f.Wrapper,{}),e(l.Wrapper,{}),e(m.Wrapper,{}),e(c,{className:["AMOTIFY_be","AMOTIFY_be_root",(a=t.isRootPage)==null||a?"AMOTIFY_be_origin":"",t.originClassName||""].join(" "),children:t.children},n||"")]})]})};export{p as LaunchReactApp,p as default};
|
package/dist/@utils/config.d.ts
CHANGED
package/dist/@utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as s,c as h}from"../chunk-C5N2D3ZX.js";import d,{UUID as u}from"jmini";import{useRefresh as f,ColorObjects as b,SetThemeColorTag as p}from".";let n={sessionUID:u(),appRoot:null,darkMode:"light",themeColor:"comun",roundness:2,isSystemDarkmode:()=>window.matchMedia("(prefers-color-scheme: dark)").matches==!0,deviceIs:"",browserIs:"",isPhone:!1,isTouchDevice:!1,isIOS:!1,screen:{breakpoint:834,phonepoint:690,viewHeight:0,viewWidth:0,isBreakpoint:(e=834)=>window.innerWidth<=e,isPhonepoint:(e=690)=>window.innerWidth<=e}};const o={get:()=>n,set:e=>{n=s(s({},n),e)},update:{themeColor:e=>{if(b.find(r=>r.key==e)||(e="comun"),e==o.get().themeColor)return;o.set(h(s({},o.get()),{themeColor:e}));let t=d(document.body);t.removeClass(t.findClass(/^bdsTC/)).addClass("bdsTC_"+e).callback(()=>{p()}),o.restart()},darkMode:e=>{if(["light","dark","dim","auto"].includes(e)||(e="light"),e==o.get().darkMode)return;let t=e=="auto"?o.get().isSystemDarkmode()?"dark":"light":e;o.set(h(s({},o.get()),{darkMode:t}));let r=d(document.body);r.removeClass(r.findClass(/^bdsDM/)).addClass("bdsDM_"+t),o.restart()},roundness:e=>{e>=0&&e<=5||(e=2),e!=o.get().roundness&&(o.set(h(s({},o.get()),{roundness:e})),o.restart())},screen:e=>{o.get().screen=s(s({},o.get().screen),e)}},launch:e=>{const t=window.navigator.userAgent.toLowerCase(),r=t.indexOf("windows nt")!==-1?"windows":t.indexOf("android")!==-1?"android":t.indexOf("iphone")!==-1?"iPhone":t.indexOf("ipad")>-1?"iPad":t.indexOf("mac os x")!==-1?"macOSX":"undefined",g=t.indexOf("msie")!==-1||t.indexOf("trident")!==-1?"ie":t.indexOf("edge")!==-1?"edge":t.indexOf("chrome")!==-1?"chrome":t.indexOf("safari")!==-1?"safari":t.indexOf("firefox")!==-1?"firefox":t.indexOf("opera")!==-1||t.indexOf("opr")!==-1?"opera":"undefined";n.appRoot=e.appRoot||document.body,n.appRoot instanceof HTMLElement&&(n.appRoot.tabIndex=0),d.is.exist(e.roundness)&&o.update.roundness(e.roundness),d.is.exist(e.themeColor)&&o.update.themeColor(e.themeColor),d.is.exist(e.darkMode)&&o.update.darkMode(e.darkMode),n.deviceIs=r,n.browserIs=g,n.isPhone=["Android","iPhone"].includes(r),n.isTouchDevice=window.ontouchstart!==void 0&&0<navigator.maxTouchPoints,n.isIOS=["iPhone","iPad"].includes(r),n.isTouchDevice=window.ontouchstart!==void 0&&0<navigator.maxTouchPoints,n.isIOS=["iPhone","iPad"].includes(r),n.screen={breakpoint:834,phonepoint:690,viewHeight:window.innerHeight,viewWidth:window.innerWidth,isBreakpoint:(i=834)=>window.innerWidth<=i,isPhonepoint:(i=690)=>window.innerWidth<=i},d(document.body).addClass(["AMOTIFY_be_body","usrDevice_"+o.get().deviceIs,"bdsDM_"+o.get().darkMode,"bdsTC_"+o.get().themeColor]),d(window).addEvent({eventType:"load",eventID:"windowLoad",callback:()=>{let i=document.body.style,a=d(document.body),
|
|
1
|
+
import{b as s,c as h}from"../chunk-C5N2D3ZX.js";import d,{UUID as u}from"jmini";import{useRefresh as f,ColorObjects as b,SetThemeColorTag as p}from".";let n={sessionUID:u(),appRoot:null,darkMode:"light",themeColor:"comun",roundness:2,isSystemDarkmode:()=>window.matchMedia("(prefers-color-scheme: dark)").matches==!0,deviceIs:"",browserIs:"",isPhone:!1,isTouchDevice:!1,isIOS:!1,screen:{breakpoint:834,phonepoint:690,viewHeight:0,viewWidth:0,isBreakpoint:(e=834)=>window.innerWidth<=e,isPhonepoint:(e=690)=>window.innerWidth<=e}};const o={get:()=>n,set:e=>{n=s(s({},n),e)},update:{themeColor:e=>{if(b.find(r=>r.key==e)||(e="comun"),e==o.get().themeColor)return;o.set(h(s({},o.get()),{themeColor:e}));let t=d(document.body);t.removeClass(t.findClass(/^bdsTC/)).addClass("bdsTC_"+e).callback(()=>{p()}),o.restart()},darkMode:e=>{if(["light","dark","dim","auto"].includes(e)||(e="light"),e==o.get().darkMode)return;let t=e=="auto"?o.get().isSystemDarkmode()?"dark":"light":e;o.set(h(s({},o.get()),{darkMode:t}));let r=d(document.body);r.removeClass(r.findClass(/^bdsDM/)).addClass("bdsDM_"+t),o.restart()},roundness:e=>{e>=0&&e<=5||(e=2),e!=o.get().roundness&&(o.set(h(s({},o.get()),{roundness:e})),o.restart(u()))},screen:e=>{o.get().screen=s(s({},o.get().screen),e)}},launch:e=>{const t=window.navigator.userAgent.toLowerCase(),r=t.indexOf("windows nt")!==-1?"windows":t.indexOf("android")!==-1?"android":t.indexOf("iphone")!==-1?"iPhone":t.indexOf("ipad")>-1?"iPad":t.indexOf("mac os x")!==-1?"macOSX":"undefined",g=t.indexOf("msie")!==-1||t.indexOf("trident")!==-1?"ie":t.indexOf("edge")!==-1?"edge":t.indexOf("chrome")!==-1?"chrome":t.indexOf("safari")!==-1?"safari":t.indexOf("firefox")!==-1?"firefox":t.indexOf("opera")!==-1||t.indexOf("opr")!==-1?"opera":"undefined";n.appRoot=e.appRoot||document.body,n.appRoot instanceof HTMLElement&&(n.appRoot.tabIndex=0),d.is.exist(e.roundness)&&o.update.roundness(e.roundness),d.is.exist(e.themeColor)&&o.update.themeColor(e.themeColor),d.is.exist(e.darkMode)&&o.update.darkMode(e.darkMode),n.deviceIs=r,n.browserIs=g,n.isPhone=["Android","iPhone"].includes(r),n.isTouchDevice=window.ontouchstart!==void 0&&0<navigator.maxTouchPoints,n.isIOS=["iPhone","iPad"].includes(r),n.isTouchDevice=window.ontouchstart!==void 0&&0<navigator.maxTouchPoints,n.isIOS=["iPhone","iPad"].includes(r),n.screen={breakpoint:834,phonepoint:690,viewHeight:window.innerHeight,viewWidth:window.innerWidth,isBreakpoint:(i=834)=>window.innerWidth<=i,isPhonepoint:(i=690)=>window.innerWidth<=i},d(document.body).addClass(["AMOTIFY_be_body","usrDevice_"+o.get().deviceIs,"bdsDM_"+o.get().darkMode,"bdsTC_"+o.get().themeColor]),d(window).addEvent({eventType:"load",eventID:"windowLoad",callback:()=>{let i=document.body.style,a=d(document.body),m=Number(a.getStyleProperty("--topNavHeight").removeLetters()||0),c=Number(a.getStyleProperty("--footerNavHeight").removeLetters()||0),w=window.innerHeight-m-c;i.setProperty("--viewHeight",window.innerHeight+"px"),i.setProperty("--contentHeight",w+"px")}}).addEvent({eventType:"resize",eventID:"getDeviceInfo",callback:()=>{o.update.screen({viewHeight:window.innerHeight,viewWidth:window.innerWidth});let i=d(document.body),a=window.innerHeight,m=Number(i.getStyleProperty("--topNavHeight").removeLetters()),c=Number(i.getStyleProperty("--footerNavHeight").removeLetters()),l=a-m-c;i.setStyleProperty("--viewHeight",a+"px").setStyleProperty("--sideNavHeight",l+"px").setStyleProperty("--contentHeight",l+"px")}}),p()},restart:e=>{f.release("LaunchReactApp_"+o.get().sessionUID,e)}};export{o as Config,o as default};
|