amotify 0.3.29 → 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};
@@ -1 +1 @@
1
- import{b as f,c as m,d as N}from"../chunk-C5N2D3ZX.js";import{jsx as d,jsxs as A}from"react/jsx-runtime";import{useEffect as b}from"react";import t from"jmini";import{$$fromRoot as C,pageRouter as F}from"../@utils";import{Box as y,Flex as x,Column as W}from"../atoms";import{Button as _}from"./Button";import{LayoutClasses as w}from"../@styles/componentClasses";const e={Base:o=>{let v=o,{topNavigation:r,sideNavigation:a,footerNavigation:g,topNav:s,leftNav:h,rightNav:l,footerNav:u,children:p,className:i}=v,n=N(v,["topNavigation","sideNavigation","footerNavigation","topNav","leftNav","rightNav","footerNav","children","className"]);return b(()=>{e.fn.refresh();let c="ResizeCB";return t(window).onEvent("resize",()=>{t.interval.once(()=>{e.fn.refresh()},300,"__RVC_calcHeights")},{eventID:c}),()=>{t(window).removeEvent(c)}},[]),A(W,m(f({className:[i,w("RootViewController")].join(" "),backgroundColor:"layer.1",gap:0,minHeight:"viewHeight"},n),{children:[s||r,A(x,{flexWrap:!1,position:"relative",flexSizing:0,children:[h||a,d(y,{className:w("Content"),position:"relative",flexSizing:0,width:0,children:p}),l]}),u||g]}))},TopNav:o=>d(x,m(f({flexSizing:"none",flexType:"col",position:"sticky",top:0,backgroundColor:"layer.1",ssZIndex:5},o),{id:"__RVC_TopNavigation"})),SideNav:o=>d(y,m(f({flexSizing:"none",minHeight:"sideNavigationHeight",ssZIndex:3},o),{id:"__RVC_SideNavigation"})),FooterNav:o=>{let g=o,{baseStyles:r}=g,a=N(g,["baseStyles"]);return d(x,m(f({borderTop:!0,position:"sticky",bottom:0,overflow:"auto",backgroundColor:"layer.1",paddingBottom:"safeAreaBottom",ssZIndex:4},r),{id:"__RVC_FooterNavigation",children:d(x,f({gap:1,flexWrap:!1,padding:"2/3",margin:"auto",width:1},a))}))},Comps:{Button:o=>{let p=o,{isActive:r,path:a,pathGroup:g,currentPath:s}=p,h=N(p,["isActive","path","pathGroup","currentPath"]),l=t.Arrayify(g),u=s||location.pathname;{let i=!1;t.scope(()=>{t.isString(a)&&(t.isNullish(a)||(i=u.replace(/^\//,"").replace(/\/$/,"")==a.replace(/^\//,"").replace(/\/$/,"")))}),t.scope(()=>{if(!i&&l.length)for(let n of l){if(i)break;t.isNullish(n)||(t.isString(n)&&(n=String(n).escapeRegExChar()),u.match(new RegExp(n))&&(i=!0))}}),r=r!=null?r:i}return d(_.Clear,f({isActive:r,isActiveStyles:{fontColor:"theme",backgroundColor:"cloud"},onClick:i=>{t.isExist(a)&&t.isString(a)&&F.push(a,i.ctrlKey||i.metaKey)},color:"cloud",padding:["3/4",1],display:"flex",gap:"1/2",fontColor:"inherit",flexSizing:"none",flexWrap:!1,ssEffectsOnActive:"ripple.cloud",verticalAlign:"center",textAlign:"left",isSemiBoldFont:!0},h))},Bar:o=>d(y,f({flexSizing:"none",backgroundColor:"layer.4.opa.middle",unitHeight:"1/3",margin:["2/3",1],isRounded:!0},o)),Title:o=>d(y,f({fontSize:"3.paragraph",isSemiBoldFont:!0,padding:[0,1]},o))},fn:{refresh:()=>{let o=t(document.body),r=C("#__RVC_TopNavigation"),a=C("#__RVC_FooterNavigation"),g=C("#__RVC_SideNavigation"),s=r.position().height||0,h=s,l=a.position().height||0,u=g.position().width||0;r.getStyleProperty("position")!="sticky"&&(h=0);let p=window.innerHeight,i=window.innerWidth,n=p-s-l,v=i-u;t.scope(()=>{e.fn.viewHeight!=p&&(e.fn.viewHeight=p,o.setStyleProperty("--viewHeight",p+"px"))}),t.scope(()=>{e.fn.viewWidth!=i&&(e.fn.viewWidth=i,o.setStyleProperty("--viewWidth",i+"px"))}),t.scope(()=>{e.fn.contentHeight!=n&&(e.fn.contentHeight=n,o.setStyleProperty("--contentHeight",n+"px").setStyleProperty("--sideNavHeight",n+"px"))}),t.scope(()=>{e.fn.contentWidth!=v&&(e.fn.contentWidth=v,o.setStyleProperty("--contentWidth",v+"px"))}),t.scope(()=>{e.fn.topBase!=h&&(e.fn.topBase=h,o.setStyleProperty("--topBase",h+"px"))}),t.scope(()=>{e.fn.topNavHeight!=s&&(e.fn.topNavHeight=s,o.setStyleProperty("--topNavHeight",s+"px"))}),t.scope(()=>{e.fn.footerNavHeight!=l&&(e.fn.footerNavHeight=l,o.setStyleProperty("--footerNavHeight",l+"px"))}),t.scope(()=>{e.fn.sideNavWidth!=u&&(e.fn.sideNavWidth=u)}),t.scope(()=>{let c=getComputedStyle(document.documentElement),R=parseInt(c.getPropertyValue("--safe-area-top"),10)||0,B=parseInt(c.getPropertyValue("--safe-area-bottom"),10)||0,S=parseInt(c.getPropertyValue("--safe-area-left"),10)||0,H=parseInt(c.getPropertyValue("--safe-area-right"),10)||0;e.fn.safeAreaTop!=R&&(e.fn.safeAreaTop=R),e.fn.safeAreaBottom!=B&&(e.fn.safeAreaBottom=B),e.fn.safeAreaLeft!=S&&(e.fn.safeAreaLeft=S),e.fn.safeAreaRight!=H&&(e.fn.safeAreaRight=H)})},viewHeight:0,viewWidth:0,contentHeight:0,contentWidth:0,topBase:0,sideNavWidth:0,topNavHeight:0,footerNavHeight:0,safeAreaTop:0,safeAreaBottom:0,safeAreaLeft:0,safeAreaRight:0}};export{e as RootViewController,e as default};
1
+ import{b as f,c as m,d as N}from"../chunk-C5N2D3ZX.js";import{jsx as d,jsxs as A}from"react/jsx-runtime";import{useEffect as b}from"react";import t from"jmini";import{$$fromRoot as C,pageRouter as F}from"../@utils";import{Box as y,Flex as x,Column as W}from"../atoms";import{Button as _}from"./Button";import{LayoutClasses as w}from"../@styles/componentClasses";const e={Base:o=>{let v=o,{topNavigation:r,sideNavigation:a,footerNavigation:g,topNav:s,leftNav:h,rightNav:l,footerNav:u,children:p,className:i}=v,n=N(v,["topNavigation","sideNavigation","footerNavigation","topNav","leftNav","rightNav","footerNav","children","className"]);return b(()=>{e.fn.refresh();let c="ResizeCB";return t(window).onEvent("resize",()=>{t.interval.once(()=>{e.fn.refresh()},300,"__RVC_calcHeights")},{eventID:c}),()=>{t(window).removeEvent(c)}},[]),A(W,m(f({className:[i,w("RootViewController")].join(" "),backgroundColor:"layer.1",gap:0,minHeight:"viewHeight"},n),{children:[s||r,A(x,{flexWrap:!1,position:"relative",flexSizing:0,children:[h||a,d(y,{className:w("Content"),position:"relative",flexSizing:0,width:0,ssZIndex:2,children:p}),l]}),u||g]}))},TopNav:o=>d(x,m(f({flexSizing:"none",flexType:"col",position:"sticky",top:0,backgroundColor:"layer.1",ssZIndex:5},o),{id:"__RVC_TopNavigation"})),SideNav:o=>d(y,m(f({flexSizing:"none",minHeight:"sideNavigationHeight",ssZIndex:3},o),{id:"__RVC_SideNavigation"})),FooterNav:o=>{let g=o,{baseStyles:r}=g,a=N(g,["baseStyles"]);return d(x,m(f({borderTop:!0,position:"sticky",bottom:0,overflow:"auto",backgroundColor:"layer.1",paddingBottom:"safeAreaBottom",ssZIndex:4},r),{id:"__RVC_FooterNavigation",children:d(x,f({gap:1,flexWrap:!1,padding:"2/3",margin:"auto",width:1},a))}))},Comps:{Button:o=>{let p=o,{isActive:r,path:a,pathGroup:g,currentPath:s}=p,h=N(p,["isActive","path","pathGroup","currentPath"]),l=t.Arrayify(g),u=s||location.pathname;{let i=!1;t.scope(()=>{t.isString(a)&&(t.isNullish(a)||(i=u.replace(/^\//,"").replace(/\/$/,"")==a.replace(/^\//,"").replace(/\/$/,"")))}),t.scope(()=>{if(!i&&l.length)for(let n of l){if(i)break;t.isNullish(n)||(t.isString(n)&&(n=String(n).escapeRegExChar()),u.match(new RegExp(n))&&(i=!0))}}),r=r!=null?r:i}return d(_.Clear,f({isActive:r,isActiveStyles:{fontColor:"theme",backgroundColor:"cloud"},onClick:i=>{t.isExist(a)&&t.isString(a)&&F.push(a,i.ctrlKey||i.metaKey)},color:"cloud",padding:["3/4",1],display:"flex",gap:"1/2",fontColor:"inherit",flexSizing:"none",flexWrap:!1,ssEffectsOnActive:"ripple.cloud",verticalAlign:"center",textAlign:"left",isSemiBoldFont:!0},h))},Bar:o=>d(y,f({flexSizing:"none",backgroundColor:"layer.4.opa.middle",unitHeight:"1/3",margin:["2/3",1],isRounded:!0},o)),Title:o=>d(y,f({fontSize:"3.paragraph",isSemiBoldFont:!0,padding:[0,1]},o))},fn:{refresh:()=>{let o=t(document.body),r=C("#__RVC_TopNavigation"),a=C("#__RVC_FooterNavigation"),g=C("#__RVC_SideNavigation"),s=r.position().height||0,h=s,l=a.position().height||0,u=g.position().width||0;r.getStyleProperty("position")!="sticky"&&(h=0);let p=window.innerHeight,i=window.innerWidth,n=p-s-l,v=i-u;t.scope(()=>{e.fn.viewHeight!=p&&(e.fn.viewHeight=p,o.setStyleProperty("--viewHeight",p+"px"))}),t.scope(()=>{e.fn.viewWidth!=i&&(e.fn.viewWidth=i,o.setStyleProperty("--viewWidth",i+"px"))}),t.scope(()=>{e.fn.contentHeight!=n&&(e.fn.contentHeight=n,o.setStyleProperty("--contentHeight",n+"px").setStyleProperty("--sideNavHeight",n+"px"))}),t.scope(()=>{e.fn.contentWidth!=v&&(e.fn.contentWidth=v,o.setStyleProperty("--contentWidth",v+"px"))}),t.scope(()=>{e.fn.topBase!=h&&(e.fn.topBase=h,o.setStyleProperty("--topBase",h+"px"))}),t.scope(()=>{e.fn.topNavHeight!=s&&(e.fn.topNavHeight=s,o.setStyleProperty("--topNavHeight",s+"px"))}),t.scope(()=>{e.fn.footerNavHeight!=l&&(e.fn.footerNavHeight=l,o.setStyleProperty("--footerNavHeight",l+"px"))}),t.scope(()=>{e.fn.sideNavWidth!=u&&(e.fn.sideNavWidth=u)}),t.scope(()=>{let c=getComputedStyle(document.documentElement),R=parseInt(c.getPropertyValue("--safe-area-top"),10)||0,B=parseInt(c.getPropertyValue("--safe-area-bottom"),10)||0,S=parseInt(c.getPropertyValue("--safe-area-left"),10)||0,H=parseInt(c.getPropertyValue("--safe-area-right"),10)||0;e.fn.safeAreaTop!=R&&(e.fn.safeAreaTop=R),e.fn.safeAreaBottom!=B&&(e.fn.safeAreaBottom=B),e.fn.safeAreaLeft!=S&&(e.fn.safeAreaLeft=S),e.fn.safeAreaRight!=H&&(e.fn.safeAreaRight=H)})},viewHeight:0,viewWidth:0,contentHeight:0,contentWidth:0,topBase:0,sideNavWidth:0,topNavHeight:0,footerNavHeight:0,safeAreaTop:0,safeAreaBottom:0,safeAreaLeft:0,safeAreaRight:0}};export{e as RootViewController,e as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "amotify",
3
- "version": "0.3.29",
3
+ "version": "0.3.31",
4
4
  "description": "UI Component for React,NextJS,esbuild",
5
5
  "scripts": {
6
6
  "start": "run-p clean build:*",