amotify 0.2.146 → 0.2.147

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