amotify 0.2.143 → 0.2.144
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.
|
@@ -11,7 +11,9 @@ declare namespace RootViewController {
|
|
|
11
11
|
baseStyles?: StyleTags.States;
|
|
12
12
|
}>;
|
|
13
13
|
Comps: {
|
|
14
|
-
Button: React.FC<Button
|
|
14
|
+
Button: React.FC<Button & {
|
|
15
|
+
currentURL?: string;
|
|
16
|
+
}>;
|
|
15
17
|
Title: React.FC<Box.DefaultInput>;
|
|
16
18
|
Bar: React.FC<Box.DefaultInput>;
|
|
17
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as
|
|
1
|
+
import{b as p,c as m,d as y}from"../chunk-C5N2D3ZX.js";import{jsx as u,jsxs as B}from"react/jsx-runtime";import{useState as x,useEffect as N}from"react";import i,{UUID as R}from"jmini";import{$$fromRoot as f,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,c=y(d,["topNavigation","sideNavigation","footerNavigation","children","className"]);N(()=>{g.fn.updateCSSProperty.reset(),setTimeout(()=>{g.fn.updateCSSProperty.reset()},100);let r="ResizeCB",s="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(s),i(window).removeEvent(r)}},[]);let v=n;return B(P,m(p({className:[l,h("RootViewController")].join(" "),backgroundColor:"layer.1",gap:0,minHeight:"viewHeight"},c),{children:[o,B(C,{className:h("Body"),flexWrap:!1,position:"relative",flexSizing:0,children:[e,u(S,{className:h("Content"),position:"relative",flexSizing:0,width:0,children:v})]}),a]}))},TopNavigation:t=>{let l=t,{className:o,children:e}=l,a=y(l,["className","children"]),[n]=x(R());return N(()=>{g.fn.updateCSSProperty.topNav()},[]),u(C,m(p({"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=y(a,["className"]);return N(()=>{g.fn.updateCSSProperty.sideNav()},[]),u(S,m(p({className:[o,h("SideNav")].join(" "),flexSizing:"none",minHeight:"sideNavigationHeight"},e),{id:"__RVC_SideNavigation"}))},FooterNavigation:t=>{let l=t,{className:o="",baseStyles:e}=l,a=y(l,["className","baseStyles"]),[n]=x(R());return N(()=>{g.fn.updateCSSProperty.footer()},[]),u(C,m(p({"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:u(C,p({gap:1,flexWrap:!1,padding:"2/3",margin:"auto",width:1},a))}))},Comps:{Button:t=>{let d=t,{isActive:o,uri:e,uriGroup:a,currentURL:n}=d,l=y(d,["isActive","uri","uriGroup","currentURL"]),c=i.flatArray(a),v=n||location.pathname;{let r=!1;if(i.is.exist(e)&&i.is.string(e)){let s=[location.origin,e.replace(/\//,"")].join("/");r=v==new URL(s).pathname}i.scope(()=>{if(!r&&c.length)for(let s of c){if(r)break;i.is.nullish(s)||(i.is.string(s)&&(s=String(s).escapeRegExChar()),v.match(new RegExp(s))&&(r=!0))}}),o=o!=null?o:r}return u(H.Clear,p({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=>u(S,p({flexSizing:"none",backgroundColor:"layer.4.opa.middle",unitHeight:"1/3",margin:["2/3",1],isRounded:!0},t)),Title:t=>u(S,p({fontSize:"3.paragraph",isSemiBoldFont:!0,padding:[0,1]},t))},fn:{updateCSSProperty:{topNav:()=>{let t=i(document.body),o=f("#__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=f("#__RVC_FooterNavigation").position().height||0;t.setStyleProperty("--footerNavHeight",e+"px")},sideNav:()=>{let t=i(document.body),e=f("#__RVC_SideNavigation").position().width||0;t.setStyleProperty("--sideNavWidth",e+"px")},reset:()=>{let t=i(document.body),o=f("#__RVC_TopNavigation"),e=f("#__RVC_FooterNavigation"),a=f("#__RVC_SideNavigation"),n=o.position().height||0,l=n,c=e.position().height||0,v=a.position().width||0;o.getStyleProperty("position")!="sticky"&&(l=0);let d=window.innerHeight,r=window.innerWidth,s=d-n-c,_=r-v;t.setStyleProperty("--topNavHeight",n+"px").setStyleProperty("--topBase",l+"px").setStyleProperty("--footerNavHeight",c+"px").setStyleProperty("--viewHeight",d+"px").setStyleProperty("--sideNavHeight",s+"px").setStyleProperty("--contentHeight",s+"px").setStyleProperty("--contentWidth",_+"px")}}}};export{g as RootViewController,g as default};
|