@modern-js/devtools-client 2.35.0 → 2.35.1
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.
- package/.turbo/turbo-build.log +62 -63
- package/CHANGELOG.md +11 -0
- package/dist/html/main/index.html +3 -3
- package/dist/modern.config.json +10 -10
- package/dist/routes-manifest.json +66 -66
- package/dist/static/js/198.9a4a2f6b.js +1 -0
- package/dist/static/js/{vendors~node_modules_pnpm_emotion_styled_11_11_0__emotion_react_11_11_1__types_react_18_0_21_~8b4e97.a3a62da9.js.LICENSE.txt → 198.9a4a2f6b.js.LICENSE.txt} +9 -9
- package/dist/static/js/198.9a4a2f6b.js.map +1 -0
- package/dist/static/js/async/config/builder/resolved/{page.5c4715c4.js → page.83919c8c.js} +1 -1
- package/dist/static/js/async/config/builder/resolved/page.83919c8c.js.map +1 -0
- package/dist/static/js/async/config/builder/transformed/{page.a05d2c7f.js → page.cdfad512.js} +1 -1
- package/dist/static/js/async/config/builder/transformed/page.cdfad512.js.map +1 -0
- package/dist/static/js/async/config/bundler/resolved/{page.2bc07a42.js → page.c2911ed1.js} +1 -1
- package/dist/static/js/async/config/bundler/resolved/page.c2911ed1.js.map +1 -0
- package/dist/static/js/async/config/bundler/transformed/{page.704303d4.js → page.268e1037.js} +1 -1
- package/dist/static/js/async/config/bundler/transformed/page.268e1037.js.map +1 -0
- package/dist/static/js/async/config/framework/resolved/{page.c78a652b.js → page.d5729166.js} +1 -1
- package/dist/static/js/async/config/framework/resolved/page.d5729166.js.map +1 -0
- package/dist/static/js/async/config/framework/transformed/{page.acd03a20.js → page.240ab8d3.js} +1 -1
- package/dist/static/js/async/config/framework/transformed/page.240ab8d3.js.map +1 -0
- package/dist/static/js/async/config/{layout.c988e6cc.js → layout.272e8d6b.js} +1 -1
- package/dist/static/js/async/config/layout.272e8d6b.js.map +1 -0
- package/dist/static/js/async/config/{page.6183831d.js → page.40d352df.js} +1 -1
- package/dist/static/js/async/config/page.40d352df.js.map +1 -0
- package/dist/static/js/async/context/builder/{page.af1058db.js → page.62f2bc66.js} +1 -1
- package/dist/static/js/async/context/builder/page.62f2bc66.js.map +1 -0
- package/dist/static/js/async/context/framework/{page.65d0c64b.js → page.052a6c77.js} +1 -1
- package/dist/static/js/async/context/framework/page.052a6c77.js.map +1 -0
- package/dist/static/js/async/context/{layout.69e165a7.js → layout.06edb4f8.js} +1 -1
- package/dist/static/js/async/context/layout.06edb4f8.js.map +1 -0
- package/dist/static/js/async/context/{page.d7bb42e1.js → page.94cbdf00.js} +1 -1
- package/dist/static/js/async/context/page.94cbdf00.js.map +1 -0
- package/dist/static/js/async/overview/{page.d26d09d5.js → page.1d1e2eae.js} +1 -1
- package/dist/static/js/async/overview/{page.d26d09d5.js.map → page.1d1e2eae.js.map} +1 -1
- package/dist/static/js/async/{page.3a64325e.js → page.ae98c3d4.js} +1 -1
- package/dist/static/js/async/page.ae98c3d4.js.map +1 -0
- package/dist/static/js/async/pages/{layout.45470473.js → layout.27df0fc6.js} +1 -1
- package/dist/static/js/async/pages/layout.27df0fc6.js.map +1 -0
- package/dist/static/js/async/pages/page.d8425bcf.js +1 -0
- package/dist/static/js/async/pages/page.d8425bcf.js.map +1 -0
- package/dist/static/js/{lib-router.a49a7033.js → lib-router.ee136613.js} +1 -1
- package/dist/static/js/{lib-router.a49a7033.js.LICENSE.txt → lib-router.ee136613.js.LICENSE.txt} +3 -3
- package/dist/static/js/lib-router.ee136613.js.map +1 -0
- package/dist/static/js/main.7e1a3442.js +1 -0
- package/dist/static/js/main.7e1a3442.js.map +1 -0
- package/package.json +11 -11
- package/dist/static/js/async/config/builder/resolved/page.5c4715c4.js.map +0 -1
- package/dist/static/js/async/config/builder/transformed/page.a05d2c7f.js.map +0 -1
- package/dist/static/js/async/config/bundler/resolved/page.2bc07a42.js.map +0 -1
- package/dist/static/js/async/config/bundler/transformed/page.704303d4.js.map +0 -1
- package/dist/static/js/async/config/framework/resolved/page.c78a652b.js.map +0 -1
- package/dist/static/js/async/config/framework/transformed/page.acd03a20.js.map +0 -1
- package/dist/static/js/async/config/layout.c988e6cc.js.map +0 -1
- package/dist/static/js/async/config/page.6183831d.js.map +0 -1
- package/dist/static/js/async/context/builder/page.af1058db.js.map +0 -1
- package/dist/static/js/async/context/framework/page.65d0c64b.js.map +0 -1
- package/dist/static/js/async/context/layout.69e165a7.js.map +0 -1
- package/dist/static/js/async/context/page.d7bb42e1.js.map +0 -1
- package/dist/static/js/async/page.3a64325e.js.map +0 -1
- package/dist/static/js/async/pages/layout.45470473.js.map +0 -1
- package/dist/static/js/async/pages/page.27267daf.js +0 -1
- package/dist/static/js/async/pages/page.27267daf.js.map +0 -1
- package/dist/static/js/lib-router.a49a7033.js.map +0 -1
- package/dist/static/js/main.31be2b44.js +0 -1
- package/dist/static/js/main.31be2b44.js.map +0 -1
- package/dist/static/js/vendors~node_modules_pnpm_emotion_styled_11_11_0__emotion_react_11_11_1__types_react_18_0_21_~8b4e97.a3a62da9.js +0 -1
- package/dist/static/js/vendors~node_modules_pnpm_emotion_styled_11_11_0__emotion_react_11_11_1__types_react_18_0_21_~8b4e97.a3a62da9.js.map +0 -1
- /package/dist/static/css/{vendors~node_modules_pnpm_emotion_styled_11_11_0__emotion_react_11_11_1__types_react_18_0_21_~8b4e97.f2739ed5.css → 198.76c8c1d9.css} +0 -0
- /package/dist/static/css/{main.d8cf90b5.css → main.9bc38ddc.css} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"static/js/async/page.3a64325e.js","sources":["./src/routes/page.tsx"],"sourcesContent":["export default null;"],"names":[],"mappings":"8LAAA,MAAe,I"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"static/js/async/pages/layout.45470473.js","sources":["./src/routes/pages/layout.tsx"],"sourcesContent":["import{Outlet}from'@modern-js/runtime/router';import{ScrollArea}from'@radix-ui/themes';import{Suspense}from'react';export default function Layout(){return<ScrollArea scrollbars=\"both\">\n <Suspense fallback={'loading...'}>\n <Outlet/>\n </Suspense>\n </ScrollArea>;}"],"names":["Layout","ScrollArea","scrollbars","Suspense","fallback","Outlet"],"mappings":"6PAAkI,SAASA,IAAS,MAAM,UAAC,EAAAC,UAAU,EAACC,WAAW,O,SAC3K,UAAC,EAAAC,QAAQ,EAACC,SAAU,a,SAClB,UAAC,EAAAC,MAAM,I,IAEG,C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_modern_js_devtools_client=self.webpackChunk_modern_js_devtools_client||[]).push([["pages/page"],{5447:function(e,t,r){"use strict";r.r(t),r.d(t,{BaseRoute:function(){return d}});var n=r("9880"),a=r("57814"),o=r("5348"),i=r("73108"),s=r("43862"),u=r("78164"),l=r("79732"),c=r("78291"),d=e=>{var{badge:t,route:r,title:l,children:d,open:v,onOpenChange:j}=e,g=(0,a.useContext)(c.MatchUrlContext),[y,R]=(0,a.useState)(!1),C=!!g,{pathname:S}=(0,u.parseURL)(g),b=S===r.urlPath||S.startsWith("".concat(r.urlPath,"/")),B=b||(null!=v?v:y);return(0,n.jsx)(x,{children:(0,n.jsxs)(o.Root,{open:B,onOpenChange:null!=j?j:R,children:[(0,n.jsxs)(h,{children:[t,(0,n.jsx)(p,{"data-miss-matched":C&&!b,children:l}),(0,n.jsx)(i.Box,{grow:"1"}),(0,n.jsx)(m,{open:B,children:(0,n.jsx)(s.CaretSortIcon,{})})]}),(0,n.jsx)(f,{children:d})]})})},x=(0,l.default)(i.Card)({backgroundColor:"#181818"}),h=(0,l.default)(o.Trigger)({all:"unset",width:"100%",display:"flex",gap:"var(--space-2)",alignItems:"center"}),f=(0,l.default)(o.Content)({paddingTop:"var(--space-2)"}),p=(0,l.default)(i.Text)({color:"var(--gray-12)",fontSize:"var(--font-size-2)",transition:"color 200ms",'&[data-miss-matched="true"]':{color:"var(--gray-10)"}}),m=(0,l.default)(i.Box)(e=>({backgroundColor:e.open?"var(--gray-4)":"transparent",height:"var(--font-size-5)",width:"var(--font-size-5)",borderRadius:"var(--radius-2)",display:"flex",justifyContent:"center",alignItems:"center",transition:"background-color 100ms"}))},31506:function(e,t,r){"use strict";r.r(t),r.d(t,{ClientRouteStats:function(){return c}});var n=r("9880"),a=r("20918"),o=r.n(a);r("57814");var i=r("63645"),s=r("43763"),u=r("57737"),l=r("80006"),c=e=>{var{route:t}=e,r=(0,l.useStore)(),a=(0,i.useSnapshot)(r),{entrypoints:c}=a.framework.context,x=t.entryName&&o.find(c,{entryName:t.entryName});if(!x)throw Error("Can't found the entrypoint named ".concat(JSON.stringify(t.entryName)));var h=a.framework.fileSystemRoutes[x.entryName];return d(h)?(0,n.jsx)(s.LegacyRouteStats,{}):(0,n.jsx)(u.RemixRouteStats,{remixRoutes:h,route:t})},d=e=>e[0]&&!("type"in e[0])},43763:function(e,t,r){"use strict";r.r(t),r.d(t,{LegacyRouteStats:function(){return o}});var n=r("9880");r("57814");var a=r("73108"),o=()=>(0,n.jsx)(a.Text,{children:"Unimplemented."})},60561:function(e,t,r){"use strict";r.r(t),r.d(t,{RemixRoute:function(){return x}});var n=r("9880"),a=r("57814"),o=r("73108"),i=r("79732"),s=r("20918"),u=r.n(s),l=r("78164"),c=r("34104"),d=r("58550"),x=e=>{var t,r,{route:i}=e,s=u.castArray(i),m=u.last(s),v="_component"in m&&u.isString(m._component)?m._component:null,j=s.map(e=>e.path&&(0,l.withoutTrailingSlash)(e.path)).filter(u.isString).join("/"),g=null!==(r=m.index)&&void 0!==r&&r,y="/"===j,R=(0,a.useContext)(d.MatchRemixRouteContext),C=R.length>0,S=u.find(R,{route:{id:m.id}}),b=(0,a.useRef)(null),B=(0,c.useHoverDirty)(b);return(0,n.jsxs)(o.Box,{ref:b,children:[(0,n.jsxs)(o.Flex,{gap:"2",align:"center",mb:m.children&&"1",children:[(0,n.jsxs)(p,{"data-miss-matched":C&&!S,children:[!y&&(0,n.jsx)(h,{"data-compose":g&&"head",children:j}),g&&(0,n.jsx)(h,{color:"purple","data-compose":!y&&"tail",children:"/(index)"})]}),B&&v&&(0,n.jsx)(f,{children:v})]}),(0,n.jsx)(o.Flex,{direction:"column",gap:"1",children:null===(t=m.children)||void 0===t?void 0:t.map(e=>(0,n.jsx)(x,{route:s.concat(e)},e.id))})]})},h=(0,i.default)(o.Code)({fontSize:"var(--font-size-2)",'&[data-compose="head"]':{paddingRight:"0",borderTopRightRadius:"0",borderBottomRightRadius:"0"},'&[data-compose="tail"]':{paddingLeft:"0",borderTopLeftRadius:"0",borderBottomLeftRadius:"0"}}),f=(0,i.default)(o.Link)({color:"var(--gray-9)",fontSize:"var(--font-size-1)"}),p=(0,i.default)(o.Box)({display:"flex",transition:"opacity 200ms",'&[data-miss-matched="true"]':{opacity:"0.5"}})},57737:function(e,t,r){"use strict";r.r(t),r.d(t,{RemixRouteStats:function(){return x}});var n=r("15169"),a=r("43932"),o=r("9880"),i=r("71593"),s=r("73108"),u=r("57814"),l=r("78291"),c=r("58550"),d=r("60561"),x=e=>{var t,{remixRoutes:r,route:x}=e,h=(0,u.useContext)(l.MatchUrlContext),f=(0,u.useMemo)(()=>{if(!h||!r)return[];var e,t=h.replace(x.urlPath,"");return null!==(e=(0,i.matchRoutes)(r,t))&&void 0!==e?e:[]},[r,h]);return r.length?(0,o.jsx)(c.MatchRemixRouteContext.Provider,{value:f,children:(0,o.jsx)(s.Flex,{gap:"2",direction:"column",children:r.map(e=>(0,o.jsx)(d.RemixRoute,{route:(0,a._)((0,n._)({},e),{path:x.urlPath+(null!==(t=e.path)&&void 0!==t?t:"")})},e.id))})}):null}},88433:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return u}});var n=r("9880");r("57814");var a=r("73108"),o=r("5447"),i=r("32656"),s=r("96007"),u=e=>{var{route:t}=e;return(0,n.jsx)(o.BaseRoute,{badge:l,route:t,title:t.urlPath,children:(0,n.jsxs)(a.Flex,{direction:"column",gap:"2",children:[(0,n.jsx)(i.EntryStats,{route:t}),(0,n.jsx)(s.ClientRouteStats,{route:t})]})})},l=(0,n.jsx)(a.Badge,{color:"cyan",children:"Entry"})},32656:function(e,t,r){"use strict";r.r(t),r.d(t,{EntryStats:function(){return c}});var n=r("9880");r("57814");var a=r("20918"),o=r.n(a),i=r("63645"),s=r("73108"),u=r("79732"),l=r("80006"),c=e=>{var{route:t}=e,r=(0,l.useStore)(),{entrypoints:a}=(0,i.useSnapshot)(r).framework.context,u=t.entryName&&o.find(a,{entryName:t.entryName});if(!u)throw Error("Can't found the entrypoint named ".concat(JSON.stringify(t.entryName)));return(0,n.jsx)(d,{children:(0,n.jsxs)(s.Box,{children:[(0,n.jsxs)(s.Flex,{gap:"1",children:[(0,n.jsx)(s.Strong,{children:"Directory: "}),(0,n.jsx)(s.Text,{children:u.absoluteEntryDir})]}),(0,n.jsxs)(s.Flex,{gap:"1",children:[(0,n.jsx)(s.Strong,{children:"Entry:"}),(0,n.jsx)(s.Text,{children:u.entry})]})]})})},d=(0,u.default)(s.Card)({fontSize:"var(--font-size-1)"})},78291:function(e,t,r){"use strict";r.r(t),r.d(t,{MatchUrlContext:function(){return n}});var n=(0,r("57814").createContext)("")},77494:function(e,t,r){"use strict";r.r(t),r.d(t,{ServerRoute:function(){return u}});var n=r("9880");r("57814");var a=r("20918"),o=r.n(a),i=r("88433"),s=r("75044"),u=e=>{var{route:t}=e;return l(t)},l=e=>o.isString(e.entryName)?(0,n.jsx)(i.default,{route:e}):(0,n.jsx)(s.default,{route:e})},75044:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return i}});var n=r("9880");r("57814");var a=r("73108"),o=r("5447"),i=e=>{var{route:t}=e;return(0,n.jsx)(o.BaseRoute,{badge:s,route:t,title:t.urlPath,children:(0,n.jsx)(a.Card,{children:"Unknown route type."})})},s=(0,n.jsx)(a.Badge,{color:"gray",children:"Unknown"})},71252:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return d}});var n=r("9880"),a=r("79732"),o=r("73108"),i=r("57814"),s=r("63645"),u=r("78291"),l=r("77494"),c=r("80006"),d=()=>{var e=(0,c.useStore)(),{serverRoutes:t}=(0,s.useSnapshot)(e).framework.context,[r,a]=(0,i.useState)("");return(0,n.jsx)(u.MatchUrlContext.Provider,{value:r,children:(0,n.jsxs)(x,{children:[(0,n.jsx)(o.Box,{children:(0,n.jsxs)(o.TextField.Root,{children:[(0,n.jsx)(o.TextField.Slot,{children:(0,n.jsx)(o.Text,{size:"2",children:"test:"})}),(0,n.jsx)(o.TextField.Input,{placeholder:"/foo?bar#baz",onChange:e=>a(e.target.value),type:"search",autoComplete:"false",autoCapitalize:"false",autoCorrect:"false"})]})}),(0,n.jsx)(o.Box,{height:"2"}),(0,n.jsx)(h,{children:t.map(e=>(0,n.jsx)(l.ServerRoute,{route:e},e.entryPath))})]})})},x=(0,a.default)(o.Box)({}),h=(0,a.default)(o.Box)({display:"flex",flexDirection:"column",gap:"var(--space-2)",justifyContent:"space-between"})},96007:function(e,t,r){"use strict";r.r(t);var n=r("31506");r.es(n,t)},58550:function(e,t,r){"use strict";r.r(t),r.d(t,{MatchRemixRouteContext:function(){return n}});var n=(0,r("57814").createContext)([])}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"static/js/async/pages/page.27267daf.js","sources":["./src/routes/pages/BaseRoute.tsx","./src/routes/pages/EntryRoute/ClientRouteStats/ClientRouteStats.tsx","./src/routes/pages/EntryRoute/ClientRouteStats/LegacyRouteStats.tsx","./src/routes/pages/EntryRoute/ClientRouteStats/RemixRoute.tsx","./src/routes/pages/EntryRoute/ClientRouteStats/RemixRouteStats.tsx","./src/routes/pages/EntryRoute/EntryRoute.tsx","./src/routes/pages/EntryRoute/EntryStats.tsx","./src/routes/pages/MatchUrl.tsx","./src/routes/pages/ServerRoute.tsx","./src/routes/pages/UnknownRoute.tsx","./src/routes/pages/page.tsx","./src/routes/pages/EntryRoute/MatchRemixRouteContext.ts"],"sourcesContent":["import React,{useContext,useState}from'react';import*as Collapsible from'@radix-ui/react-collapsible';import{Box,Card,Text}from'@radix-ui/themes';import{CaretSortIcon}from'@radix-ui/react-icons';import{parseURL}from'ufo';import styled from'@emotion/styled';import{MatchUrlContext}from'./MatchUrl';export const BaseRoute=({badge,route,title,children,open,onOpenChange})=>{const url=useContext(MatchUrlContext);const[_open,_setOpen]=useState(false);const isMatching=Boolean(url);const{pathname}=parseURL(url);const isMatched=pathname===route.urlPath||pathname.startsWith(`${route.urlPath}/`);const isOpen=isMatched||(open??_open);return<Container>\n <Collapsible.Root open={isOpen}onOpenChange={onOpenChange??_setOpen}>\n <CollapsibleTrigger>\n {badge}\n <UrlText data-miss-matched={isMatching&&!isMatched}>\n {title}\n </UrlText>\n <Box grow=\"1\"/>\n <CollapsedMark open={isOpen}>\n <CaretSortIcon/>\n </CollapsedMark>\n </CollapsibleTrigger>\n <CollapsibleContent>{children}</CollapsibleContent>\n </Collapsible.Root>\n </Container>;};const Container=styled(Card)({backgroundColor:'#181818'});const CollapsibleTrigger=styled(Collapsible.Trigger)({all:'unset',width:'100%',display:'flex',gap:'var(--space-2)',alignItems:'center'});const CollapsibleContent=styled(Collapsible.Content)({paddingTop:'var(--space-2)'});const UrlText=styled(Text)({color:'var(--gray-12)',fontSize:'var(--font-size-2)',transition:'color 200ms','&[data-miss-matched=\"true\"]':{color:'var(--gray-10)'}});const CollapsedMark=styled(Box)(props=>({backgroundColor:props.open?'var(--gray-4)':'transparent',height:'var(--font-size-5)',width:'var(--font-size-5)',borderRadius:'var(--radius-2)',display:'flex',justifyContent:'center',alignItems:'center',transition:'background-color 100ms'}));","import _ from'lodash';import React from'react';import{useSnapshot}from'valtio';import{LegacyRouteStats}from'./LegacyRouteStats';import{RemixRouteStats}from'./RemixRouteStats';import{useStore}from'@/stores';export const ClientRouteStats=({route})=>{const $store=useStore();const store=useSnapshot($store);const{entrypoints}=store.framework.context;const entrypoint=route.entryName&&_.find(entrypoints,{entryName:route.entryName});if(!entrypoint){throw new Error(`Can't found the entrypoint named ${JSON.stringify(route.entryName)}`);}const fileSystemRoute=store.framework.fileSystemRoutes[entrypoint.entryName];if(isLegacyRoutes(fileSystemRoute)){return<LegacyRouteStats/>;}else{return<RemixRouteStats remixRoutes={fileSystemRoute}route={route}/>;}};const isLegacyRoutes=routes=>routes[0]&&!('type'in routes[0]);","import React from'react';import{Text}from'@radix-ui/themes';export const LegacyRouteStats=()=>{return<Text>Unimplemented.</Text>;};","import React,{useContext,useRef}from'react';import{Box,Flex,Link,Code}from'@radix-ui/themes';import styled from'@emotion/styled';import _ from'lodash';import{withoutTrailingSlash}from'ufo';import{useHoverDirty}from'react-use';import{MatchRemixRouteContext}from'../MatchRemixRouteContext';export const RemixRoute=({route})=>{const routes=_.castArray(route);const curr=_.last(routes);const componentFile='_component'in curr&&_.isString(curr._component)?curr._component:null;const displayPath=routes.map(r=>r.path&&withoutTrailingSlash(r.path)).filter(_.isString).join('/');const isIndex=curr.index??false;const isRoot=displayPath==='/';const matched=useContext(MatchRemixRouteContext);const isMatching=matched.length>0;const isMatched=_.find(matched,{route:{id:curr.id}});const ref=useRef(null);const hovered=useHoverDirty(ref);return<Box ref={ref}>\n <Flex gap=\"2\"align=\"center\"mb={curr.children&&'1'}>\n <EndpointContainer data-miss-matched={isMatching&&!isMatched}>\n {!isRoot&&<EndpointTag data-compose={isIndex&&'head'}>\n {displayPath}\n </EndpointTag>}\n {isIndex&&<EndpointTag color=\"purple\"data-compose={!isRoot&&'tail'}>\n /(index)\n </EndpointTag>}\n </EndpointContainer>\n {hovered&&componentFile&&<ShyLink>{componentFile}</ShyLink>}\n </Flex>\n <Flex direction=\"column\"gap=\"1\">\n {curr.children?.map(route=><RemixRoute key={route.id}route={routes.concat(route)}/>)}\n </Flex>\n </Box>;};const EndpointTag=styled(Code)({fontSize:'var(--font-size-2)','&[data-compose=\"head\"]':{paddingRight:'0',borderTopRightRadius:'0',borderBottomRightRadius:'0'},'&[data-compose=\"tail\"]':{paddingLeft:'0',borderTopLeftRadius:'0',borderBottomLeftRadius:'0'}});const ShyLink=styled(Link)({color:'var(--gray-9)',fontSize:'var(--font-size-1)'});const EndpointContainer=styled(Box)({display:'flex',transition:'opacity 200ms','&[data-miss-matched=\"true\"]':{opacity:'0.5'}});","import{matchRoutes as matchRemixRoutes}from'@modern-js/runtime/router';import{Flex}from'@radix-ui/themes';import React,{useContext,useMemo}from'react';import{MatchUrlContext}from'../../MatchUrl';import{MatchRemixRouteContext}from'../MatchRemixRouteContext';import{RemixRoute}from'./RemixRoute';export const RemixRouteStats=({remixRoutes,route})=>{const testingUrl=useContext(MatchUrlContext);const matchedRoutes=useMemo(()=>{if(!testingUrl||!remixRoutes)return[];const location=testingUrl.replace(route.urlPath,'');const matched=matchRemixRoutes(remixRoutes,location)??[];return matched;},[remixRoutes,testingUrl]);if(!remixRoutes.length)return null;return<MatchRemixRouteContext.Provider value={matchedRoutes}>\n <Flex gap=\"2\"direction=\"column\">\n {remixRoutes.map(r=><RemixRoute key={r.id}route={{...r,path:route.urlPath+(r.path??'')}}/>)}\n </Flex>\n </MatchRemixRouteContext.Provider>;};","import React from'react';import{Badge,Flex}from'@radix-ui/themes';import{BaseRoute}from'../BaseRoute';import{EntryStats}from'./EntryStats';import{ClientRouteStats}from'./ClientRouteStats';const EntryRoute=({route})=>{return<BaseRoute badge={badge}route={route}title={route.urlPath}>\n <Flex direction=\"column\"gap=\"2\">\n <EntryStats route={route}/>\n <ClientRouteStats route={route}/>\n </Flex>\n </BaseRoute>;};export default EntryRoute;const badge=<Badge color=\"cyan\">Entry</Badge>;","import React from'react';import _ from'lodash';import{useSnapshot}from'valtio';import{Box,Card,Flex,Strong,Text}from'@radix-ui/themes';import styled from'@emotion/styled';import{useStore}from'@/stores';export const EntryStats=({route})=>{const $store=useStore();const store=useSnapshot($store);const{entrypoints}=store.framework.context;const entrypoint=route.entryName&&_.find(entrypoints,{entryName:route.entryName});if(!entrypoint){throw new Error(`Can't found the entrypoint named ${JSON.stringify(route.entryName)}`);}return<Stats>\n <Box>\n <Flex gap=\"1\">\n <Strong>Directory: </Strong>\n <Text>{entrypoint.absoluteEntryDir}</Text>\n </Flex>\n <Flex gap=\"1\">\n <Strong>Entry:</Strong>\n <Text>{entrypoint.entry}</Text>\n </Flex>\n </Box>\n </Stats>;};const Stats=styled(Card)({fontSize:'var(--font-size-1)'});","import{createContext}from'react';export const MatchUrlContext=createContext('');","import React from'react';import _ from'lodash';import EntryRoute from'./EntryRoute/EntryRoute';import UnknownRoute from'./UnknownRoute';export const ServerRoute=({route})=>{return dispatchServerRoute(route);};const dispatchServerRoute=route=>{if(_.isString(route.entryName)){return<EntryRoute route={route}/>;}else{return<UnknownRoute route={route}/>;}};","import React from'react';import{Badge,Card}from'@radix-ui/themes';import{BaseRoute}from'./BaseRoute';const UnknownRoute=({route})=>{return<BaseRoute badge={badge}route={route}title={route.urlPath}>\n <Card>Unknown route type.</Card>\n </BaseRoute>;};export default UnknownRoute;const badge=<Badge color=\"gray\">Unknown</Badge>;","import styled from'@emotion/styled';import{Box,Text,TextField}from'@radix-ui/themes';import React,{useState}from'react';import{useSnapshot}from'valtio';import{MatchUrlContext}from'./MatchUrl';import{ServerRoute}from'./ServerRoute';import{useStore}from'@/stores';const Page=()=>{const $store=useStore();const store=useSnapshot($store);const{serverRoutes}=store.framework.context;const[testingUrl,setTestingUrl]=useState('');return<MatchUrlContext.Provider value={testingUrl}>\n <Container>\n <Box>\n <TextField.Root>\n <TextField.Slot>\n <Text size=\"2\">test:</Text>\n </TextField.Slot>\n <TextField.Input placeholder=\"/foo?bar#baz\"onChange={e=>setTestingUrl(e.target.value)}type=\"search\"autoComplete=\"false\"autoCapitalize=\"false\"autoCorrect=\"false\"/>\n </TextField.Root>\n </Box>\n <Box height=\"2\"/>\n <RoutesContainer>\n {serverRoutes.map(route=><ServerRoute key={route.entryPath}route={route}/>)}\n </RoutesContainer>\n </Container>\n </MatchUrlContext.Provider>;};export default Page;const Container=styled(Box)({});const RoutesContainer=styled(Box)({display:'flex',flexDirection:'column',gap:'var(--space-2)',justifyContent:'space-between'});","import{createContext}from'react';export const MatchRemixRouteContext=createContext([]);"],"names":["BaseRoute","badge","route","title","children","open","onOpenChange","url","useContext","MatchUrlContext","_open","_setOpen","useState","isMatching","Boolean","pathname","parseURL","isMatched","urlPath","startsWith","isOpen","Container","CollapsibleTrigger","UrlText","Box","grow","CollapsedMark","CaretSortIcon","CollapsibleContent","Card","backgroundColor","all","width","display","gap","alignItems","paddingTop","Text","color","fontSize","transition","props","height","borderRadius","justifyContent","ClientRouteStats","$store","useStore","store","useSnapshot","entrypoints","framework","context","entrypoint","entryName","Error","JSON","stringify","fileSystemRoute","fileSystemRoutes","isLegacyRoutes","LegacyRouteStats","RemixRouteStats","remixRoutes","routes","RemixRoute","curr","componentFile","_component","displayPath","map","r","path","withoutTrailingSlash","filter","join","isIndex","index","isRoot","matched","MatchRemixRouteContext","length","id","ref","useRef","hovered","useHoverDirty","Flex","align","mb","EndpointContainer","EndpointTag","ShyLink","direction","concat","Code","paddingRight","borderTopRightRadius","borderBottomRightRadius","paddingLeft","borderTopLeftRadius","borderBottomLeftRadius","Link","opacity","testingUrl","matchedRoutes","useMemo","location","replace","value","EntryStats","Badge","Stats","Strong","absoluteEntryDir","entry","createContext","ServerRoute","dispatchServerRoute","serverRoutes","setTestingUrl","TextField","size","placeholder","onChange","e","target","type","autoComplete","autoCapitalize","autoCorrect","RoutesContainer","entryPath","flexDirection"],"mappings":"+SAAsTA,EAAU,AAAC,I,GAAA,CAACC,MAAAA,CAAK,CAACC,MAAAA,CAAK,CAACC,MAAAA,CAAK,CAACC,SAAAA,CAAQ,CAACC,KAAAA,CAAI,CAACC,aAAAA,CAAY,CAAC,GAAUC,EAAI,KAAAC,UAAA,EAAW,EAAAC,eAAe,EAAO,CAACC,EAAMC,EAAS,CAAC,KAAAC,QAAA,EAAS,IAAaC,EAAWC,CAAAA,CAAQP,EAAU,CAACQ,SAAAA,CAAQ,CAAC,CAAC,KAAAC,QAAA,EAAST,GAAWU,EAAUF,IAAWb,EAAMgB,OAAO,EAAEH,EAASI,UAAU,CAAE,GA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