@arc-js/core 0.0.1 → 0.0.11
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/auto-rooting.d.ts +10 -0
- package/{index.jsx → auto-rooting.jsx} +2 -2
- package/auto-rooting.min.jsx +1 -0
- package/auto-rooting.min.jsx.map +1 -0
- package/index.d.ts +1 -4
- package/index.js +3 -0
- package/index.min.js +2 -0
- package/package.json +1 -1
- package/index.min.jsx +0 -1
- package/index.min.jsx.map +0 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RouteObject } from 'react-router-dom';
|
|
2
|
+
export { useRootingActions } from './rooting.hooks.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Permet d'initialiser toutes les routes de l'application
|
|
6
|
+
* @returns RouteObject[]
|
|
7
|
+
*/
|
|
8
|
+
declare const _default: () => RouteObject[];
|
|
9
|
+
|
|
10
|
+
export { _default as default };
|
|
@@ -3,7 +3,7 @@ import * as routesUtils_js from './routes-utils.js';
|
|
|
3
3
|
import { routes } from './routes-utils.js';
|
|
4
4
|
export { useRootingActions } from './rooting.hooks.jsx';
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var autoRooting = () => {
|
|
7
7
|
let routes$1 = routes.map((route) => ({
|
|
8
8
|
path: route.path,
|
|
9
9
|
element: route.layout ? (jsxRuntimeExports.jsx(route.layout, { children: jsxRuntimeExports.jsx(route.component, {}) })) : (jsxRuntimeExports.jsx(route.component, {})),
|
|
@@ -30,4 +30,4 @@ var index = () => {
|
|
|
30
30
|
return routes$1;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
export {
|
|
33
|
+
export { autoRooting as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as jsxRuntimeExports}from"./_virtual/jsx-runtime";import*as routesUtils_js from"./routes-utils.js";import{routes}from"./routes-utils.js";export{useRootingActions}from"./rooting.hooks.jsx";var autoRooting=()=>{let t=routes.map(t=>({path:t.path,element:t.layout?jsxRuntimeExports.jsx(t.layout,{children:jsxRuntimeExports.jsx(t.component,{})}):jsxRuntimeExports.jsx(t.component,{}),...t.error?{errorElement:jsxRuntimeExports.jsx(t.error,{})}:{}}));var o=t.find(t=>"/"===t.path),r=t.find(t=>"*"===t.path);return t=[...o?[o]:[],...t.filter(t=>!(t.path&&["/","*"].includes(t.path))),...r?[r]:[]].filter(t=>!!t.path&&-1===t.path.indexOf("/_404")&&-1===t.path.indexOf("/_layout")),process.env?.NODE_ENV,t};export{autoRooting as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto-rooting.min.jsx","sources":["auto-rooting.jsx"],"names":["jsxRuntimeExports","routesUtils_js","routes","autoRooting","let","routes$1","map","path","route","element","layout","jsx","children","component","error","errorElement","homeRoute","find","a","notFoundRoute","filter","includes","indexOf","process","env","NODE_ENV"],"mappings":"OAAcA,sBAAiD,KAAxB,+BAC3BC,uBAAoB,2BACvBC,MAAiC,KAAnB,4CACgC,KAArB,sBAElC,IAAIC,YAAc,KACdC,IAAIC,EAAWH,OAAOI,IAAI,IAAW,CACjCC,KAAMC,EAAMD,KACZE,QAASD,EAAME,OAAUV,kBAAkBW,IAAIH,EAAME,OAAQ,CAAEE,SAAUZ,kBAAkBW,IAAIH,EAAMK,UAAW,EAAE,CAAE,CAAE,EAAKb,kBAAkBW,IAAIH,EAAMK,UAAW,EAAG,EACrK,GAAML,EAAMM,MAAQ,CAChBC,aAAcf,kBAAkBW,IAAIH,EAAMM,MAAO,EAAE,CACvD,EAAI,EACP,EAAC,EACFV,IAEAY,EAAYX,EAASY,KAAK,GAAkB,MAAXC,EAAEX,IAAY,EAC/CY,EAAgBd,EAASY,KAAK,GAAkB,MAAXC,EAAEX,IAAY,EAanD,OAZAF,EAAW,CACP,GAAMW,EAAY,CAACA,GAAa,GAChC,GAAGX,EAASe,OAAO,GAAW,EAAIZ,EAAMD,MACpC,CAAC,IAAK,KAAKc,SAASb,EAAMD,IAAI,EAAE,EACpC,GAAMY,EAAgB,CAACA,GAAiB,IAC1CC,OAAO,GAAY,CAAC,CAACZ,EAAMD,MAAyC,CAAC,IAAjCC,EAAMD,KAAKe,QAAQ,OAAO,GACzB,CAAC,IAApCd,EAAMD,KAAKe,QAAQ,UAAU,CAAU,EACvCC,QAAQC,KAAKC,SAKVpB,CACX,SAESF,sBAAwB","sourceRoot":"../core"}
|
package/index.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { RouteObject } from 'react-router-dom';
|
|
2
|
-
export { useRootingActions } from './rooting.hooks.js';
|
|
3
|
-
|
|
4
1
|
/**
|
|
5
2
|
* Permet d'initialiser toutes les routes de l'application
|
|
6
3
|
* @returns RouteObject[]
|
|
7
4
|
*/
|
|
8
|
-
declare const _default:
|
|
5
|
+
declare const _default: {};
|
|
9
6
|
|
|
10
7
|
export { _default as default };
|
package/index.js
ADDED
package/index.min.js
ADDED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.11",
|
|
7
7
|
"description": "CORE est un module de routage intelligent et auto-configuré pour les applications React avec TypeScript/Javascript. Il fournit un système de routage basé sur la structure de fichiers, des hooks de navigation avancés et une configuration minimale pour les applications modulaires.",
|
|
8
8
|
"main": "index.js",
|
|
9
9
|
"keywords": [],
|
package/index.min.jsx
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as jsxRuntimeExports}from"./_virtual/jsx-runtime";import*as routesUtils_js from"./routes-utils.js";import{routes}from"./routes-utils.js";export{useRootingActions}from"./rooting.hooks.jsx";var index=()=>{let t=routes.map(t=>({path:t.path,element:t.layout?jsxRuntimeExports.jsx(t.layout,{children:jsxRuntimeExports.jsx(t.component,{})}):jsxRuntimeExports.jsx(t.component,{}),...t.error?{errorElement:jsxRuntimeExports.jsx(t.error,{})}:{}}));var r=t.find(t=>"/"===t.path),e=t.find(t=>"*"===t.path);return t=[...r?[r]:[],...t.filter(t=>!(t.path&&["/","*"].includes(t.path))),...e?[e]:[]].filter(t=>!!t.path&&-1===t.path.indexOf("/_404")&&-1===t.path.indexOf("/_layout")),process.env?.NODE_ENV,t};export{index as default};
|
package/index.min.jsx.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.min.jsx","sources":["index.jsx"],"names":["jsxRuntimeExports","routesUtils_js","routes","index","let","routes$1","map","path","route","element","layout","jsx","children","component","error","errorElement","homeRoute","find","a","notFoundRoute","filter","includes","indexOf","process","env","NODE_ENV"],"mappings":"OAAcA,sBAAiD,KAAxB,+BAC3BC,uBAAoB,2BACvBC,MAAiC,KAAnB,4CACgC,KAArB,sBAElC,IAAIC,MAAQ,KACRC,IAAIC,EAAWH,OAAOI,IAAI,IAAW,CACjCC,KAAMC,EAAMD,KACZE,QAASD,EAAME,OAAUV,kBAAkBW,IAAIH,EAAME,OAAQ,CAAEE,SAAUZ,kBAAkBW,IAAIH,EAAMK,UAAW,EAAE,CAAE,CAAE,EAAKb,kBAAkBW,IAAIH,EAAMK,UAAW,EAAG,EACrK,GAAML,EAAMM,MAAQ,CAChBC,aAAcf,kBAAkBW,IAAIH,EAAMM,MAAO,EAAE,CACvD,EAAI,EACP,EAAC,EACFV,IAEAY,EAAYX,EAASY,KAAK,GAAkB,MAAXC,EAAEX,IAAY,EAC/CY,EAAgBd,EAASY,KAAK,GAAkB,MAAXC,EAAEX,IAAY,EAanD,OAZAF,EAAW,CACP,GAAMW,EAAY,CAACA,GAAa,GAChC,GAAGX,EAASe,OAAO,GAAW,EAAIZ,EAAMD,MACpC,CAAC,IAAK,KAAKc,SAASb,EAAMD,IAAI,EAAE,EACpC,GAAMY,EAAgB,CAACA,GAAiB,IAC1CC,OAAO,GAAY,CAAC,CAACZ,EAAMD,MAAyC,CAAC,IAAjCC,EAAMD,KAAKe,QAAQ,OAAO,GACzB,CAAC,IAApCd,EAAMD,KAAKe,QAAQ,UAAU,CAAU,EACvCC,QAAQC,KAAKC,SAKVpB,CACX,SAESF,gBAAkB","sourceRoot":"../core"}
|