amotify 0.3.30 → 0.3.31

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 i}from"react/jsx-runtime";import{Config as o}from".";import s from"./useRemote";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};
1
+ import"../chunk-C5N2D3ZX.js";import{Fragment as g,jsx as e,jsxs as i}from"react/jsx-runtime";import{Config as o}from".";import s from"./useRemote";import{Box as c}from"../atoms";import{Sheet as m,Snackbar as l,Loader as f,Effect as r,RootViewController as R}from"../fn";import{useEffect as u}from"react";const p=t=>{var a;let n=s.catch("LaunchReactApp_"+o.get().sessionUID);return u(()=>{R.fn.refresh()},[]),i(g,{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};
@@ -1 +1 @@
1
- import{b as s,c as t}from"../chunk-C5N2D3ZX.js";import r,{UUID as h}from"jmini";import{useRemote as u,ColorRecords as f,SetThemeColorTag as m}from".";let i={sessionUID:h(),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:()=>i,set:e=>{i=s(s({},i),e)},update:{themeColor:e=>{if(f.find(d=>d.key==e)||(e="comun"),e==o.get().themeColor)return;o.set(t(s({},o.get()),{themeColor:e}));let n=r(document.body);n.removeClass("",...n.findClass(/^bdsTC/)).addClass("bdsTC_"+e).callback(()=>{m()}),o.restart()},darkMode:e=>{if(r.isOneOf(e,"light","dark","dim","auto")||(e="light"),e==o.get().darkMode)return;let n=e=="auto"?o.get().isSystemDarkmode()?"dark":"light":e;o.set(t(s({},o.get()),{darkMode:n}));let d=r(document.body);d.removeClass("",...d.findClass(/^bdsDM/)).addClass("bdsDM_"+n),o.restart()},roundness:e=>{e>=0&&e<=5||(e=2),e!=o.get().roundness&&(o.set(t(s({},o.get()),{roundness:e})),o.restart(h()))},screen:e=>{o.get().screen=s(s({},o.get().screen),e)}},launch:e=>{const n=window.navigator.userAgent.toLowerCase(),d=n.indexOf("windows nt")!==-1?"windows":n.indexOf("android")!==-1?"android":n.indexOf("iphone")!==-1?"iPhone":n.indexOf("ipad")>-1?"iPad":n.indexOf("mac os x")!==-1?"macOSX":"undefined",c=n.indexOf("msie")!==-1||n.indexOf("trident")!==-1?"ie":n.indexOf("edge")!==-1?"edge":n.indexOf("chrome")!==-1?"chrome":n.indexOf("safari")!==-1?"safari":n.indexOf("firefox")!==-1?"firefox":n.indexOf("opera")!==-1||n.indexOf("opr")!==-1?"opera":"undefined";i.appRoot=e.appRoot||document.body,i.appRoot instanceof HTMLElement&&(i.appRoot.tabIndex=0),r.isExist(e.roundness)&&o.update.roundness(e.roundness),r.isExist(e.themeColor)&&o.update.themeColor(e.themeColor),r.isExist(e.darkMode)&&o.update.darkMode(e.darkMode),i.deviceIs=d,i.browserIs=c,i.isPhone=r.isOneOf(d,"android","iPhone"),i.isTouchDevice=window.ontouchstart!==void 0&&0<navigator.maxTouchPoints,i.isIOS=r.isOneOf(d,"iPhone","iPad"),i.isTouchDevice=window.ontouchstart!==void 0&&0<navigator.maxTouchPoints,i.isIOS=r.isOneOf(d,"iPhone","iPad"),i.screen={breakpoint:834,phonepoint:690,viewHeight:window.innerHeight,viewWidth:window.innerWidth,isBreakpoint:(a=834)=>window.innerWidth<=a,isPhonepoint:(a=690)=>window.innerWidth<=a},r(document.body).addClass("AMOTIFY_be_body","usrDevice_"+o.get().deviceIs,"bdsDM_"+o.get().darkMode,"bdsTC_"+o.get().themeColor),r(window).onEvent("resize",()=>{r.interval.once(()=>{o.update.screen({viewHeight:window.innerHeight,viewWidth:window.innerWidth})},100,"resizeOnUtil")}),m()},restart:e=>{u.bridge("LaunchReactApp_"+o.get().sessionUID,e)}};export{o as Config,o as default};
1
+ import{b as d,c as s}from"../chunk-C5N2D3ZX.js";import r,{UUID as m}from"jmini";import{useRemote as u,ColorRecords as f,SetThemeColorTag as h}from".";let i={sessionUID:m(),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:()=>i,set:e=>{i=d(d({},i),e)},update:{themeColor:e=>{if(f.find(t=>t.key==e)||(e="comun"),e==o.get().themeColor)return;o.set(s(d({},o.get()),{themeColor:e}));let n=r(document.body);n.removeClass("",...n.findClass(/^bdsTC/)).addClass("bdsTC_"+e).callback(()=>{h()}),o.restart()},darkMode:e=>{if(r.isOneOf(e,"light","dark","dim","auto")||(e="light"),e==o.get().darkMode)return;let n=e=="auto"?o.get().isSystemDarkmode()?"dark":"light":e;o.set(s(d({},o.get()),{darkMode:n}));let t=r(document.body);t.removeClass("",...t.findClass(/^bdsDM/)).addClass("bdsDM_"+n),o.restart()},roundness:e=>{e>=0&&e<=5||(e=2),e!=o.get().roundness&&(o.set(s(d({},o.get()),{roundness:e})),o.restart(m()))},screen:e=>{o.get().screen=d(d({},o.get().screen),e)}},launch:e=>{const n=window.navigator.userAgent.toLowerCase(),t=n.indexOf("windows nt")!==-1?"windows":n.indexOf("android")!==-1?"android":n.indexOf("iphone")!==-1?"iPhone":n.indexOf("ipad")>-1?"iPad":n.indexOf("mac os x")!==-1?"macOSX":"undefined",c=n.indexOf("msie")!==-1||n.indexOf("trident")!==-1?"ie":n.indexOf("edge")!==-1?"edge":n.indexOf("chrome")!==-1?"chrome":n.indexOf("safari")!==-1?"safari":n.indexOf("firefox")!==-1?"firefox":n.indexOf("opera")!==-1||n.indexOf("opr")!==-1?"opera":"undefined";i.appRoot=e.appRoot||document.body,i.appRoot instanceof HTMLElement&&(i.appRoot.tabIndex=0),r.isExist(e.roundness)&&o.update.roundness(e.roundness),r.isExist(e.themeColor)&&o.update.themeColor(e.themeColor),r.isExist(e.darkMode)&&o.update.darkMode(e.darkMode),i.deviceIs=t,i.browserIs=c,i.isPhone=r.isOneOf(t,"android","iPhone"),i.isTouchDevice=window.ontouchstart!==void 0&&0<navigator.maxTouchPoints,i.isIOS=r.isOneOf(t,"iPhone","iPad"),i.isTouchDevice=window.ontouchstart!==void 0&&0<navigator.maxTouchPoints,i.isIOS=r.isOneOf(t,"iPhone","iPad"),i.screen={breakpoint:834,phonepoint:690,viewHeight:window.innerHeight,viewWidth:window.innerWidth,isBreakpoint:(a=834)=>window.innerWidth<=a,isPhonepoint:(a=690)=>window.innerWidth<=a},r(document.body).addClass("AMOTIFY_be_body","usrDevice_"+o.get().deviceIs,"bdsDM_"+o.get().darkMode,"bdsTC_"+o.get().themeColor),r(window).onEvent("resize",()=>{r.interval.once(()=>{o.update.screen({viewHeight:window.innerHeight,viewWidth:window.innerWidth})},100,"resizeOnUtil")}),h()},restart:e=>{u.bridge("LaunchReactApp_"+o.get().sessionUID,e)}};export{o as Config,o as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "amotify",
3
- "version": "0.3.30",
3
+ "version": "0.3.31",
4
4
  "description": "UI Component for React,NextJS,esbuild",
5
5
  "scripts": {
6
6
  "start": "run-p clean build:*",