@pithyjs/router 0.1.0-beta.0
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/LICENSE +21 -0
- package/README.md +621 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +49 -0
- package/dist/index.js.map +1 -0
- package/dist/router/core/config.d.ts +22 -0
- package/dist/router/core/config.d.ts.map +1 -0
- package/dist/router/core/config.js +54 -0
- package/dist/router/core/config.js.map +1 -0
- package/dist/router/core/constants.d.ts +89 -0
- package/dist/router/core/constants.d.ts.map +1 -0
- package/dist/router/core/constants.js +95 -0
- package/dist/router/core/constants.js.map +1 -0
- package/dist/router/core/history.d.ts +54 -0
- package/dist/router/core/history.d.ts.map +1 -0
- package/dist/router/core/history.js +89 -0
- package/dist/router/core/history.js.map +1 -0
- package/dist/router/core/matcher.d.ts +43 -0
- package/dist/router/core/matcher.d.ts.map +1 -0
- package/dist/router/core/matcher.js +242 -0
- package/dist/router/core/matcher.js.map +1 -0
- package/dist/router/core/params.d.ts +88 -0
- package/dist/router/core/params.d.ts.map +1 -0
- package/dist/router/core/params.js +150 -0
- package/dist/router/core/params.js.map +1 -0
- package/dist/router/core/pipeline.d.ts +90 -0
- package/dist/router/core/pipeline.d.ts.map +1 -0
- package/dist/router/core/pipeline.js +323 -0
- package/dist/router/core/pipeline.js.map +1 -0
- package/dist/router/core/route-tree.d.ts +76 -0
- package/dist/router/core/route-tree.d.ts.map +1 -0
- package/dist/router/core/route-tree.js +143 -0
- package/dist/router/core/route-tree.js.map +1 -0
- package/dist/router/core/router.d.ts +229 -0
- package/dist/router/core/router.d.ts.map +1 -0
- package/dist/router/core/router.js +762 -0
- package/dist/router/core/router.js.map +1 -0
- package/dist/router/core/types.d.ts +387 -0
- package/dist/router/core/types.d.ts.map +1 -0
- package/dist/router/core/types.js +22 -0
- package/dist/router/core/types.js.map +1 -0
- package/dist/router/core/utils.d.ts +66 -0
- package/dist/router/core/utils.d.ts.map +1 -0
- package/dist/router/core/utils.js +152 -0
- package/dist/router/core/utils.js.map +1 -0
- package/dist/router/features/coordinator.d.ts +75 -0
- package/dist/router/features/coordinator.d.ts.map +1 -0
- package/dist/router/features/coordinator.js +203 -0
- package/dist/router/features/coordinator.js.map +1 -0
- package/dist/router/features/errors/error-codes.d.ts +107 -0
- package/dist/router/features/errors/error-codes.d.ts.map +1 -0
- package/dist/router/features/errors/error-codes.js +247 -0
- package/dist/router/features/errors/error-codes.js.map +1 -0
- package/dist/router/features/errors/error-resolution.d.ts +31 -0
- package/dist/router/features/errors/error-resolution.d.ts.map +1 -0
- package/dist/router/features/errors/error-resolution.js +47 -0
- package/dist/router/features/errors/error-resolution.js.map +1 -0
- package/dist/router/features/errors/error-types.d.ts +60 -0
- package/dist/router/features/errors/error-types.d.ts.map +1 -0
- package/dist/router/features/errors/error-types.js +57 -0
- package/dist/router/features/errors/error-types.js.map +1 -0
- package/dist/router/features/errors/global-error-fallback.d.ts +33 -0
- package/dist/router/features/errors/global-error-fallback.d.ts.map +1 -0
- package/dist/router/features/errors/global-error-fallback.js +182 -0
- package/dist/router/features/errors/global-error-fallback.js.map +1 -0
- package/dist/router/features/errors/index.d.ts +15 -0
- package/dist/router/features/errors/index.d.ts.map +1 -0
- package/dist/router/features/errors/index.js +18 -0
- package/dist/router/features/errors/index.js.map +1 -0
- package/dist/router/features/errors/router-errors.d.ts +44 -0
- package/dist/router/features/errors/router-errors.d.ts.map +1 -0
- package/dist/router/features/errors/router-errors.js +53 -0
- package/dist/router/features/errors/router-errors.js.map +1 -0
- package/dist/router/features/guards/engine.d.ts +40 -0
- package/dist/router/features/guards/engine.d.ts.map +1 -0
- package/dist/router/features/guards/engine.js +67 -0
- package/dist/router/features/guards/engine.js.map +1 -0
- package/dist/router/features/guards/index.d.ts +52 -0
- package/dist/router/features/guards/index.d.ts.map +1 -0
- package/dist/router/features/guards/index.js +95 -0
- package/dist/router/features/guards/index.js.map +1 -0
- package/dist/router/features/loaders/cache.d.ts +60 -0
- package/dist/router/features/loaders/cache.d.ts.map +1 -0
- package/dist/router/features/loaders/cache.js +80 -0
- package/dist/router/features/loaders/cache.js.map +1 -0
- package/dist/router/features/loaders/engine.d.ts +17 -0
- package/dist/router/features/loaders/engine.d.ts.map +1 -0
- package/dist/router/features/loaders/engine.js +27 -0
- package/dist/router/features/loaders/engine.js.map +1 -0
- package/dist/router/features/loaders/index.d.ts +49 -0
- package/dist/router/features/loaders/index.d.ts.map +1 -0
- package/dist/router/features/loaders/index.js +112 -0
- package/dist/router/features/loaders/index.js.map +1 -0
- package/dist/router/features/loading-ui-manager.d.ts +69 -0
- package/dist/router/features/loading-ui-manager.d.ts.map +1 -0
- package/dist/router/features/loading-ui-manager.js +209 -0
- package/dist/router/features/loading-ui-manager.js.map +1 -0
- package/dist/router/features/module-loader.d.ts +50 -0
- package/dist/router/features/module-loader.d.ts.map +1 -0
- package/dist/router/features/module-loader.js +121 -0
- package/dist/router/features/module-loader.js.map +1 -0
- package/dist/router/features/outlet/errors.d.ts +24 -0
- package/dist/router/features/outlet/errors.d.ts.map +1 -0
- package/dist/router/features/outlet/errors.js +96 -0
- package/dist/router/features/outlet/errors.js.map +1 -0
- package/dist/router/features/outlet/index.d.ts +45 -0
- package/dist/router/features/outlet/index.d.ts.map +1 -0
- package/dist/router/features/outlet/index.js +95 -0
- package/dist/router/features/outlet/index.js.map +1 -0
- package/dist/router/features/outlet/mount.d.ts +38 -0
- package/dist/router/features/outlet/mount.d.ts.map +1 -0
- package/dist/router/features/outlet/mount.js +301 -0
- package/dist/router/features/outlet/mount.js.map +1 -0
- package/dist/router/features/outlet/segment-chain.d.ts +16 -0
- package/dist/router/features/outlet/segment-chain.d.ts.map +1 -0
- package/dist/router/features/outlet/segment-chain.js +62 -0
- package/dist/router/features/outlet/segment-chain.js.map +1 -0
- package/dist/router/features/prefetch/index.d.ts +97 -0
- package/dist/router/features/prefetch/index.d.ts.map +1 -0
- package/dist/router/features/prefetch/index.js +345 -0
- package/dist/router/features/prefetch/index.js.map +1 -0
- package/dist/router/features/ux/focus.d.ts +62 -0
- package/dist/router/features/ux/focus.d.ts.map +1 -0
- package/dist/router/features/ux/focus.js +136 -0
- package/dist/router/features/ux/focus.js.map +1 -0
- package/dist/router/features/ux/live-region.d.ts +81 -0
- package/dist/router/features/ux/live-region.d.ts.map +1 -0
- package/dist/router/features/ux/live-region.js +166 -0
- package/dist/router/features/ux/live-region.js.map +1 -0
- package/dist/router/features/ux/scroll-focus.d.ts +105 -0
- package/dist/router/features/ux/scroll-focus.d.ts.map +1 -0
- package/dist/router/features/ux/scroll-focus.js +111 -0
- package/dist/router/features/ux/scroll-focus.js.map +1 -0
- package/dist/router/features/ux/scroll.d.ts +71 -0
- package/dist/router/features/ux/scroll.d.ts.map +1 -0
- package/dist/router/features/ux/scroll.js +137 -0
- package/dist/router/features/ux/scroll.js.map +1 -0
- package/dist/router/features/ux/transitions.d.ts +120 -0
- package/dist/router/features/ux/transitions.d.ts.map +1 -0
- package/dist/router/features/ux/transitions.js +235 -0
- package/dist/router/features/ux/transitions.js.map +1 -0
- package/dist/router/integration/directive-binder.d.ts +20 -0
- package/dist/router/integration/directive-binder.d.ts.map +1 -0
- package/dist/router/integration/directive-binder.js +139 -0
- package/dist/router/integration/directive-binder.js.map +1 -0
- package/dist/router/integration/directives.d.ts +42 -0
- package/dist/router/integration/directives.d.ts.map +1 -0
- package/dist/router/integration/directives.js +109 -0
- package/dist/router/integration/directives.js.map +1 -0
- package/dist/router/integration/history-adapter.d.ts +76 -0
- package/dist/router/integration/history-adapter.d.ts.map +1 -0
- package/dist/router/integration/history-adapter.js +157 -0
- package/dist/router/integration/history-adapter.js.map +1 -0
- package/dist/router/integration/hmr.d.ts +83 -0
- package/dist/router/integration/hmr.d.ts.map +1 -0
- package/dist/router/integration/hmr.js +160 -0
- package/dist/router/integration/hmr.js.map +1 -0
- package/dist/router/integration/link-interceptor.d.ts +49 -0
- package/dist/router/integration/link-interceptor.d.ts.map +1 -0
- package/dist/router/integration/link-interceptor.js +94 -0
- package/dist/router/integration/link-interceptor.js.map +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** @codex
|
|
2
|
+
{
|
|
3
|
+
"id": "pithy.router.link-interceptor",
|
|
4
|
+
"title": "Link Interceptor",
|
|
5
|
+
"category": "runtime",
|
|
6
|
+
"description": "Intercepts anchor clicks and converts them to router navigations.",
|
|
7
|
+
"since": "0.1.0",
|
|
8
|
+
"stability": "stable",
|
|
9
|
+
"testing": {
|
|
10
|
+
"unit": { "required": true, "covered": false },
|
|
11
|
+
"integration": { "required": true, "covered": true, "file": "router-dispose.test.ts" },
|
|
12
|
+
"e2e": { "required": false, "covered": false }
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* LinkInterceptor - Intercepts anchor clicks and converts them to router navigations
|
|
18
|
+
*
|
|
19
|
+
* This module handles the global click event listener that intercepts same-origin
|
|
20
|
+
* anchor tag clicks and routes them through the router instead of triggering full
|
|
21
|
+
* page reloads.
|
|
22
|
+
*/
|
|
23
|
+
import type { RouterConfig } from '../core/types';
|
|
24
|
+
/** @codexApi {"parent":"pithy.router.link-interceptor","name":"NavigateFunction","stability":"stable","signature":"(href: string) => Promise<boolean>","description":"Function type for programmatic navigation"} */
|
|
25
|
+
export type NavigateFunction = (href: string) => Promise<boolean>;
|
|
26
|
+
/** @codexApi {"parent":"pithy.router.link-interceptor","name":"LinkInterceptor","stability":"stable","signature":"class LinkInterceptor","description":"Intercepts anchor clicks for client-side routing"} */
|
|
27
|
+
/**
|
|
28
|
+
* LinkInterceptor class
|
|
29
|
+
*
|
|
30
|
+
* Installs a global click event listener that intercepts anchor tag clicks
|
|
31
|
+
* and routes them through the router's navigate function.
|
|
32
|
+
*/
|
|
33
|
+
export declare class LinkInterceptor {
|
|
34
|
+
private installed;
|
|
35
|
+
private clickHandler;
|
|
36
|
+
/**
|
|
37
|
+
* Install the link interceptor
|
|
38
|
+
*
|
|
39
|
+
* @param navigate - Router's navigate function
|
|
40
|
+
* @param config - Router configuration (for linkIgnoreAttr, basePath, etc.)
|
|
41
|
+
*/
|
|
42
|
+
install(navigate: NavigateFunction, config: RouterConfig): void;
|
|
43
|
+
/**
|
|
44
|
+
* Uninstall the link interceptor
|
|
45
|
+
* Removes the global click event listener
|
|
46
|
+
*/
|
|
47
|
+
uninstall(): void;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=link-interceptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link-interceptor.d.ts","sourceRoot":"","sources":["../../../src/router/integration/link-interceptor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;EAcE;AACF;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAGlD,qNAAqN;AACrN,MAAM,MAAM,gBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAElE,8MAA8M;AAC9M;;;;;GAKG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,YAAY,CAA0C;IAE9D;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,EAAE,gBAAgB,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI;IA0C/D;;;OAGG;IACH,SAAS,IAAI,IAAI;CAUlB"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/** @codex
|
|
2
|
+
{
|
|
3
|
+
"id": "pithy.router.link-interceptor",
|
|
4
|
+
"title": "Link Interceptor",
|
|
5
|
+
"category": "runtime",
|
|
6
|
+
"description": "Intercepts anchor clicks and converts them to router navigations.",
|
|
7
|
+
"since": "0.1.0",
|
|
8
|
+
"stability": "stable",
|
|
9
|
+
"testing": {
|
|
10
|
+
"unit": { "required": true, "covered": false },
|
|
11
|
+
"integration": { "required": true, "covered": true, "file": "router-dispose.test.ts" },
|
|
12
|
+
"e2e": { "required": false, "covered": false }
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* LinkInterceptor - Intercepts anchor clicks and converts them to router navigations
|
|
18
|
+
*
|
|
19
|
+
* This module handles the global click event listener that intercepts same-origin
|
|
20
|
+
* anchor tag clicks and routes them through the router instead of triggering full
|
|
21
|
+
* page reloads.
|
|
22
|
+
*/
|
|
23
|
+
import { isNavigationClick, shouldInterceptLink } from '../core/utils';
|
|
24
|
+
/** @codexApi {"parent":"pithy.router.link-interceptor","name":"LinkInterceptor","stability":"stable","signature":"class LinkInterceptor","description":"Intercepts anchor clicks for client-side routing"} */
|
|
25
|
+
/**
|
|
26
|
+
* LinkInterceptor class
|
|
27
|
+
*
|
|
28
|
+
* Installs a global click event listener that intercepts anchor tag clicks
|
|
29
|
+
* and routes them through the router's navigate function.
|
|
30
|
+
*/
|
|
31
|
+
export class LinkInterceptor {
|
|
32
|
+
constructor() {
|
|
33
|
+
this.installed = false;
|
|
34
|
+
this.clickHandler = null;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Install the link interceptor
|
|
38
|
+
*
|
|
39
|
+
* @param navigate - Router's navigate function
|
|
40
|
+
* @param config - Router configuration (for linkIgnoreAttr, basePath, etc.)
|
|
41
|
+
*/
|
|
42
|
+
install(navigate, config) {
|
|
43
|
+
if (this.installed)
|
|
44
|
+
return;
|
|
45
|
+
this.installed = true;
|
|
46
|
+
const ignoreAttr = config.linkIgnoreAttr ?? 'data-router-ignore';
|
|
47
|
+
const findAnchor = (el) => {
|
|
48
|
+
let node = el;
|
|
49
|
+
while (node && node !== document.documentElement) {
|
|
50
|
+
if (node instanceof HTMLAnchorElement)
|
|
51
|
+
return node;
|
|
52
|
+
node = node.parentElement;
|
|
53
|
+
}
|
|
54
|
+
return null;
|
|
55
|
+
};
|
|
56
|
+
this.clickHandler = (e) => {
|
|
57
|
+
// Skip modified clicks
|
|
58
|
+
if (!isNavigationClick(e))
|
|
59
|
+
return;
|
|
60
|
+
const a = findAnchor(e.target);
|
|
61
|
+
if (!a)
|
|
62
|
+
return;
|
|
63
|
+
// Respect opt-out
|
|
64
|
+
if (a.hasAttribute(ignoreAttr))
|
|
65
|
+
return;
|
|
66
|
+
// Check if link should be intercepted (handles all validation)
|
|
67
|
+
const href = shouldInterceptLink(a, config.basePath);
|
|
68
|
+
if (!href)
|
|
69
|
+
return;
|
|
70
|
+
// Intercept & route (only router mutates history after guards pass)
|
|
71
|
+
e.preventDefault();
|
|
72
|
+
e.stopPropagation();
|
|
73
|
+
navigate(href).catch(err => {
|
|
74
|
+
console.warn('[Router] Navigate failed:', err);
|
|
75
|
+
// IMPORTANT: do not fallback to window.location
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
document.addEventListener('click', this.clickHandler);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Uninstall the link interceptor
|
|
82
|
+
* Removes the global click event listener
|
|
83
|
+
*/
|
|
84
|
+
uninstall() {
|
|
85
|
+
if (!this.installed)
|
|
86
|
+
return;
|
|
87
|
+
if (this.clickHandler) {
|
|
88
|
+
document.removeEventListener('click', this.clickHandler);
|
|
89
|
+
this.clickHandler = null;
|
|
90
|
+
}
|
|
91
|
+
this.installed = false;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=link-interceptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link-interceptor.js","sourceRoot":"","sources":["../../../src/router/integration/link-interceptor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;EAcE;AACF;;;;;;GAMG;AAGH,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAKvE,8MAA8M;AAC9M;;;;;GAKG;AACH,MAAM,OAAO,eAAe;IAA5B;QACU,cAAS,GAAG,KAAK,CAAC;QAClB,iBAAY,GAAqC,IAAI,CAAC;IAgEhE,CAAC;IA9DC;;;;;OAKG;IACH,OAAO,CAAC,QAA0B,EAAE,MAAoB;QACtD,IAAI,IAAI,CAAC,SAAS;YAAE,OAAO;QAC3B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QAEtB,MAAM,UAAU,GAAG,MAAM,CAAC,cAAc,IAAI,oBAAoB,CAAC;QAEjE,MAAM,UAAU,GAAG,CAAC,EAAsB,EAA4B,EAAE;YACtE,IAAI,IAAI,GAAG,EAAwB,CAAC;YACpC,OAAO,IAAI,IAAI,IAAI,KAAK,QAAQ,CAAC,eAAe,EAAE,CAAC;gBACjD,IAAI,IAAI,YAAY,iBAAiB;oBAAE,OAAO,IAAI,CAAC;gBACnD,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC;YAC5B,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC;QAEF,IAAI,CAAC,YAAY,GAAG,CAAC,CAAa,EAAE,EAAE;YACpC,uBAAuB;YACvB,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;gBAAE,OAAO;YAElC,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;YAC/B,IAAI,CAAC,CAAC;gBAAE,OAAO;YAEf,kBAAkB;YAClB,IAAI,CAAC,CAAC,YAAY,CAAC,UAAU,CAAC;gBAAE,OAAO;YAEvC,+DAA+D;YAC/D,MAAM,IAAI,GAAG,mBAAmB,CAAC,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;YACrD,IAAI,CAAC,IAAI;gBAAE,OAAO;YAElB,oEAAoE;YACpE,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,CAAC,CAAC,eAAe,EAAE,CAAC;YAEpB,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;gBACzB,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,GAAG,CAAC,CAAC;gBAC/C,gDAAgD;YAClD,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;QAEF,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IACxD,CAAC;IAED;;;OAGG;IACH,SAAS;QACP,IAAI,CAAC,IAAI,CAAC,SAAS;YAAE,OAAO;QAE5B,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,QAAQ,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;YACzD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QAC3B,CAAC;QAED,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IACzB,CAAC;CACF"}
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pithyjs/router",
|
|
3
|
+
"version": "0.1.0-beta.0",
|
|
4
|
+
"description": "File-based client router for PithyJS framework",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@pithyjs/core": "0.1.0-beta.0",
|
|
16
|
+
"@pithyjs/shared": "0.1.0-beta.0",
|
|
17
|
+
"@pithyjs/signals": "0.1.0-beta.0"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@vitest/ui": "^3.2.4",
|
|
21
|
+
"happy-dom": "^20.0.3",
|
|
22
|
+
"parse5": "^7.3.0",
|
|
23
|
+
"typescript": "^5.0.0",
|
|
24
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
25
|
+
"vitest": "^3.2.4"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist"
|
|
29
|
+
],
|
|
30
|
+
"sideEffects": false,
|
|
31
|
+
"license": "MIT",
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public",
|
|
34
|
+
"tag": "beta"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "tsc -p tsconfig.json",
|
|
38
|
+
"dev": "tsc -p tsconfig.json --watch",
|
|
39
|
+
"test": "vitest",
|
|
40
|
+
"lint": "eslint 'src/**/*.{ts,tsx}'",
|
|
41
|
+
"format": "prettier -w 'src/**/*.{ts,tsx,scss,css,html}'",
|
|
42
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
43
|
+
"prune": "ts-prune",
|
|
44
|
+
"knip": "knip",
|
|
45
|
+
"qa": "pnpm lint && pnpm typecheck && pnpm prune && pnpm knip && pnpm test"
|
|
46
|
+
}
|
|
47
|
+
}
|