juxscript 1.1.363 → 1.1.364
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/dist/components/routes.d.ts +22 -72
- package/dist/components/routes.d.ts.map +1 -1
- package/dist/components/routes.js +76 -156
- package/dist/components/routes.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,96 +1,46 @@
|
|
|
1
|
-
interface
|
|
1
|
+
export interface RouteInfo {
|
|
2
2
|
path: string;
|
|
3
3
|
name: string;
|
|
4
|
-
|
|
4
|
+
file: string;
|
|
5
5
|
}
|
|
6
6
|
declare class Router {
|
|
7
|
+
private _srcDir;
|
|
7
8
|
private _routes;
|
|
8
|
-
|
|
9
|
-
private _onNavigate;
|
|
10
|
-
private _initialized;
|
|
9
|
+
constructor();
|
|
11
10
|
/**
|
|
12
|
-
*
|
|
11
|
+
* Try juxconfig.js for srcDir, default to 'jux'
|
|
13
12
|
*/
|
|
14
|
-
|
|
13
|
+
private _resolveSrcDir;
|
|
15
14
|
/**
|
|
16
|
-
*
|
|
15
|
+
* Recursively scan srcDir for .jux files
|
|
17
16
|
*/
|
|
18
|
-
|
|
19
|
-
name?: string;
|
|
20
|
-
render?: () => void | Promise<void>;
|
|
21
|
-
}>): this;
|
|
17
|
+
private _scan;
|
|
22
18
|
/**
|
|
23
|
-
*
|
|
19
|
+
* Convert file path to route path
|
|
20
|
+
* index.jux -> /
|
|
21
|
+
* about.jux -> /about
|
|
22
|
+
* blog/post.jux -> /blog/post
|
|
23
|
+
* settings/index.jux -> /settings
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
private _fileToRoute;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Derive display name from route path
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
private _nameFromRoute;
|
|
30
30
|
/**
|
|
31
|
-
* Get the
|
|
31
|
+
* Get ALL .jux file routes from the source directory
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
all(): RouteInfo[];
|
|
34
34
|
/**
|
|
35
|
-
* Get
|
|
36
|
-
*/
|
|
37
|
-
all(): Route[];
|
|
38
|
-
/**
|
|
39
|
-
* Get all registered route paths
|
|
35
|
+
* Get just the route paths
|
|
40
36
|
*/
|
|
41
37
|
paths(): string[];
|
|
42
38
|
/**
|
|
43
|
-
*
|
|
44
|
-
*/
|
|
45
|
-
isActive(path: string): boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Get a route by path
|
|
48
|
-
*/
|
|
49
|
-
get(path: string): Route | undefined;
|
|
50
|
-
/**
|
|
51
|
-
* Listen for navigation events
|
|
52
|
-
*/
|
|
53
|
-
onNavigate(callback: (path: string, route?: Route) => void): () => void;
|
|
54
|
-
/**
|
|
55
|
-
* Initialize browser listeners — mirrors compiler4's popstate + click handlers
|
|
56
|
-
*/
|
|
57
|
-
init(): this;
|
|
58
|
-
/**
|
|
59
|
-
* Execute a route — clears containers and calls render, mirrors compiler4's `route()` function
|
|
60
|
-
*/
|
|
61
|
-
private _exec;
|
|
62
|
-
/**
|
|
63
|
-
* Normalize a path — mirrors compiler4's route path normalization
|
|
64
|
-
*/
|
|
65
|
-
private _normalize;
|
|
66
|
-
/**
|
|
67
|
-
* Derive a display name from a path
|
|
39
|
+
* Force rescan (e.g. after files change)
|
|
68
40
|
*/
|
|
69
|
-
|
|
41
|
+
refresh(): this;
|
|
70
42
|
}
|
|
71
|
-
/**
|
|
72
|
-
* Get the router singleton.
|
|
73
|
-
*
|
|
74
|
-
* @example
|
|
75
|
-
* import { routes } from 'juxscript';
|
|
76
|
-
*
|
|
77
|
-
* // Register routes
|
|
78
|
-
* routes.add('/home', 'Home');
|
|
79
|
-
* routes.add('/about', 'About');
|
|
80
|
-
*
|
|
81
|
-
* // Navigate
|
|
82
|
-
* routes.navigate('/about');
|
|
83
|
-
*
|
|
84
|
-
* // Check active
|
|
85
|
-
* routes.isActive('/about'); // true
|
|
86
|
-
*
|
|
87
|
-
* // Get all paths (for sidebar/nav)
|
|
88
|
-
* routes.paths(); // ['/home', '/about']
|
|
89
|
-
*
|
|
90
|
-
* // Listen for changes
|
|
91
|
-
* routes.onNavigate((path) => console.log('Navigated to', path));
|
|
92
|
-
*/
|
|
93
43
|
export declare function routes(): Router;
|
|
94
|
-
export { Router
|
|
44
|
+
export { Router };
|
|
95
45
|
export default routes;
|
|
96
46
|
//# sourceMappingURL=routes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../lib/components/routes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../lib/components/routes.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,SAAS;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,cAAM,MAAM;IACR,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,OAAO,CAA4B;;IAM3C;;OAEG;IACH,OAAO,CAAC,cAAc;IAiBtB;;OAEG;IACH,OAAO,CAAC,KAAK;IAsBb;;;;;;OAMG;IACH,OAAO,CAAC,YAAY;IAqBpB;;OAEG;IACH,OAAO,CAAC,cAAc;IAStB;;OAEG;IACH,GAAG,IAAI,SAAS,EAAE;IAOlB;;OAEG;IACH,KAAK,IAAI,MAAM,EAAE;IAIjB;;OAEG;IACH,OAAO,IAAI,IAAI;CAIlB;AAKD,wBAAgB,MAAM,WAErB;AAED,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,eAAe,MAAM,CAAC"}
|
|
@@ -1,193 +1,113 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
1
3
|
class Router {
|
|
2
4
|
constructor() {
|
|
3
|
-
this._routes =
|
|
4
|
-
this.
|
|
5
|
-
this._onNavigate = [];
|
|
6
|
-
this._initialized = false;
|
|
5
|
+
this._routes = null;
|
|
6
|
+
this._srcDir = this._resolveSrcDir();
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Try juxconfig.js for srcDir, default to 'jux'
|
|
10
10
|
*/
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
_resolveSrcDir() {
|
|
12
|
+
const projectRoot = process.cwd();
|
|
13
|
+
const configPath = path.resolve(projectRoot, 'juxconfig.js');
|
|
14
|
+
if (fs.existsSync(configPath)) {
|
|
15
|
+
try {
|
|
16
|
+
const configContent = fs.readFileSync(configPath, 'utf8');
|
|
17
|
+
const srcDirMatch = configContent.match(/srcDir\s*:\s*['"]([^'"]+)['"]/);
|
|
18
|
+
if (srcDirMatch) {
|
|
19
|
+
return path.resolve(projectRoot, srcDirMatch[1]);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
catch (_) { }
|
|
23
|
+
}
|
|
24
|
+
return path.resolve(projectRoot, 'jux');
|
|
19
25
|
}
|
|
20
26
|
/**
|
|
21
|
-
*
|
|
27
|
+
* Recursively scan srcDir for .jux files
|
|
22
28
|
*/
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
_scan(dir, routes = []) {
|
|
30
|
+
if (!fs.existsSync(dir))
|
|
31
|
+
return routes;
|
|
32
|
+
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
33
|
+
for (const entry of entries) {
|
|
34
|
+
const fullPath = path.join(dir, entry.name);
|
|
35
|
+
if (entry.isDirectory()) {
|
|
36
|
+
this._scan(fullPath, routes);
|
|
27
37
|
}
|
|
28
|
-
else {
|
|
29
|
-
this.
|
|
38
|
+
else if (entry.isFile() && entry.name.endsWith('.jux')) {
|
|
39
|
+
const relativePath = path.relative(this._srcDir, fullPath).replace(/\\/g, '/');
|
|
40
|
+
const routePath = this._fileToRoute(relativePath);
|
|
41
|
+
const name = this._nameFromRoute(routePath);
|
|
42
|
+
routes.push({ path: routePath, name, file: relativePath });
|
|
30
43
|
}
|
|
31
44
|
}
|
|
32
|
-
return
|
|
45
|
+
return routes;
|
|
33
46
|
}
|
|
34
47
|
/**
|
|
35
|
-
*
|
|
48
|
+
* Convert file path to route path
|
|
49
|
+
* index.jux -> /
|
|
50
|
+
* about.jux -> /about
|
|
51
|
+
* blog/post.jux -> /blog/post
|
|
52
|
+
* settings/index.jux -> /settings
|
|
36
53
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
54
|
+
_fileToRoute(filePath) {
|
|
55
|
+
let route = filePath
|
|
56
|
+
.replace(/\.jux$/, '')
|
|
57
|
+
.toLowerCase()
|
|
58
|
+
.replace(/\s+/g, '-')
|
|
59
|
+
.replace(/[^a-z0-9\/_-]/g, '')
|
|
60
|
+
.replace(/-+/g, '-')
|
|
61
|
+
.replace(/^-|-$/g, '');
|
|
62
|
+
// folder/index -> /folder
|
|
63
|
+
if (route.endsWith('/index')) {
|
|
64
|
+
route = route.slice(0, -6);
|
|
42
65
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
*/
|
|
48
|
-
current() {
|
|
49
|
-
return this._currentPath;
|
|
66
|
+
if (route === 'index' || route === '') {
|
|
67
|
+
return '/';
|
|
68
|
+
}
|
|
69
|
+
return '/' + route;
|
|
50
70
|
}
|
|
51
71
|
/**
|
|
52
|
-
*
|
|
72
|
+
* Derive display name from route path
|
|
53
73
|
*/
|
|
54
|
-
|
|
55
|
-
|
|
74
|
+
_nameFromRoute(routePath) {
|
|
75
|
+
if (routePath === '/')
|
|
76
|
+
return 'Home';
|
|
77
|
+
const seg = routePath.split('/').filter(Boolean).pop() || 'Home';
|
|
78
|
+
return seg
|
|
79
|
+
.split('-')
|
|
80
|
+
.map(s => s.charAt(0).toUpperCase() + s.slice(1))
|
|
81
|
+
.join(' ');
|
|
56
82
|
}
|
|
57
83
|
/**
|
|
58
|
-
* Get
|
|
84
|
+
* Get ALL .jux file routes from the source directory
|
|
59
85
|
*/
|
|
60
86
|
all() {
|
|
61
|
-
|
|
87
|
+
if (!this._routes) {
|
|
88
|
+
this._routes = this._scan(this._srcDir);
|
|
89
|
+
}
|
|
90
|
+
return this._routes;
|
|
62
91
|
}
|
|
63
92
|
/**
|
|
64
|
-
* Get
|
|
93
|
+
* Get just the route paths
|
|
65
94
|
*/
|
|
66
95
|
paths() {
|
|
67
|
-
return
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Check if a path matches the current route
|
|
71
|
-
*/
|
|
72
|
-
isActive(path) {
|
|
73
|
-
return this._normalize(path) === this._currentPath;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Get a route by path
|
|
77
|
-
*/
|
|
78
|
-
get(path) {
|
|
79
|
-
return this._routes.get(this._normalize(path));
|
|
96
|
+
return this.all().map(r => r.path);
|
|
80
97
|
}
|
|
81
98
|
/**
|
|
82
|
-
*
|
|
99
|
+
* Force rescan (e.g. after files change)
|
|
83
100
|
*/
|
|
84
|
-
|
|
85
|
-
this.
|
|
86
|
-
return () => {
|
|
87
|
-
this._onNavigate = this._onNavigate.filter(cb => cb !== callback);
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Initialize browser listeners — mirrors compiler4's popstate + click handlers
|
|
92
|
-
*/
|
|
93
|
-
init() {
|
|
94
|
-
if (this._initialized || typeof window === 'undefined')
|
|
95
|
-
return this;
|
|
96
|
-
this._initialized = true;
|
|
97
|
-
this._currentPath = window.location.pathname;
|
|
98
|
-
// popstate (back/forward)
|
|
99
|
-
window.addEventListener('popstate', () => {
|
|
100
|
-
this._currentPath = window.location.pathname;
|
|
101
|
-
this._exec(this._currentPath);
|
|
102
|
-
});
|
|
103
|
-
// Intercept <a> clicks — mirrors compiler4's click handler
|
|
104
|
-
document.addEventListener('click', (e) => {
|
|
105
|
-
const link = e.target.closest('a[href]');
|
|
106
|
-
if (link) {
|
|
107
|
-
const href = link.getAttribute('href');
|
|
108
|
-
if (href && href.startsWith('/') && !href.startsWith('//')) {
|
|
109
|
-
e.preventDefault();
|
|
110
|
-
this.navigate(href);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
// Expose global navigateTo — mirrors compiler4
|
|
115
|
-
window.navigateTo = (path) => {
|
|
116
|
-
this.navigate(path);
|
|
117
|
-
};
|
|
101
|
+
refresh() {
|
|
102
|
+
this._routes = null;
|
|
118
103
|
return this;
|
|
119
104
|
}
|
|
120
|
-
/**
|
|
121
|
-
* Execute a route — clears containers and calls render, mirrors compiler4's `route()` function
|
|
122
|
-
*/
|
|
123
|
-
_exec(path) {
|
|
124
|
-
const route = this._routes.get(path) || this._routes.get('/');
|
|
125
|
-
if (typeof document !== 'undefined') {
|
|
126
|
-
const appMain = document.getElementById('appmain-content');
|
|
127
|
-
if (appMain)
|
|
128
|
-
appMain.innerHTML = '';
|
|
129
|
-
const app = document.getElementById('app');
|
|
130
|
-
if (app)
|
|
131
|
-
app.innerHTML = '';
|
|
132
|
-
}
|
|
133
|
-
if (route?.render) {
|
|
134
|
-
route.render();
|
|
135
|
-
}
|
|
136
|
-
this._onNavigate.forEach(cb => cb(path, route));
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Normalize a path — mirrors compiler4's route path normalization
|
|
140
|
-
*/
|
|
141
|
-
_normalize(path) {
|
|
142
|
-
let p = path
|
|
143
|
-
.toLowerCase()
|
|
144
|
-
.replace(/\\/g, '/')
|
|
145
|
-
.replace(/\.jux$/i, '')
|
|
146
|
-
.replace(/\s+/g, '-')
|
|
147
|
-
.replace(/\/+$/g, '');
|
|
148
|
-
if (!p.startsWith('/'))
|
|
149
|
-
p = '/' + p;
|
|
150
|
-
if (p === '' || p === '/index')
|
|
151
|
-
p = '/';
|
|
152
|
-
return p;
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Derive a display name from a path
|
|
156
|
-
*/
|
|
157
|
-
_nameFromPath(path) {
|
|
158
|
-
if (path === '/')
|
|
159
|
-
return 'Home';
|
|
160
|
-
const seg = path.split('/').filter(Boolean).pop() || 'Home';
|
|
161
|
-
return seg.charAt(0).toUpperCase() + seg.slice(1).replace(/-/g, ' ');
|
|
162
|
-
}
|
|
163
105
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
*
|
|
167
|
-
* @example
|
|
168
|
-
* import { routes } from 'juxscript';
|
|
169
|
-
*
|
|
170
|
-
* // Register routes
|
|
171
|
-
* routes.add('/home', 'Home');
|
|
172
|
-
* routes.add('/about', 'About');
|
|
173
|
-
*
|
|
174
|
-
* // Navigate
|
|
175
|
-
* routes.navigate('/about');
|
|
176
|
-
*
|
|
177
|
-
* // Check active
|
|
178
|
-
* routes.isActive('/about'); // true
|
|
179
|
-
*
|
|
180
|
-
* // Get all paths (for sidebar/nav)
|
|
181
|
-
* routes.paths(); // ['/home', '/about']
|
|
182
|
-
*
|
|
183
|
-
* // Listen for changes
|
|
184
|
-
* routes.onNavigate((path) => console.log('Navigated to', path));
|
|
185
|
-
*/
|
|
106
|
+
// Singleton
|
|
107
|
+
const router = new Router();
|
|
186
108
|
export function routes() {
|
|
187
|
-
|
|
188
|
-
return n;
|
|
109
|
+
return router;
|
|
189
110
|
}
|
|
190
|
-
// Also export the class for typing
|
|
191
111
|
export { Router };
|
|
192
112
|
export default routes;
|
|
193
113
|
//# sourceMappingURL=routes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../lib/components/routes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../lib/components/routes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,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