@fluixi/core 1.0.0-alpha.53
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 +611 -0
- package/dist/cdn/core.global.js +3 -0
- package/dist/cli/generate.cjs +1814 -0
- package/dist/cli/generate.d.ts +7 -0
- package/dist/cli/generate.d.ts.map +1 -0
- package/dist/cli/generate.js +2580 -0
- package/dist/cli/generate.mjs +1814 -0
- package/dist/cli/index.cjs +1814 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +2580 -0
- package/dist/cli/index.mjs +1814 -0
- package/dist/cli/run.cjs +2 -0
- package/dist/cli/run.d.ts +3 -0
- package/dist/cli/run.d.ts.map +1 -0
- package/dist/cli/run.js +62 -0
- package/dist/cli/run.mjs +2 -0
- package/dist/fluixi.d.ts +5 -0
- package/dist/src/cdn/chunk-PFM5O5UE.mjs +1 -0
- package/dist/src/cdn/core.cjs +1 -0
- package/dist/src/cdn/core.d.ts +16 -0
- package/dist/src/cdn/core.d.ts.map +1 -0
- package/dist/src/cdn/core.js +15 -0
- package/dist/src/cdn/core.mjs +1 -0
- package/dist/src/cdn/router-next-WNWCFVC2.mjs +1 -0
- package/dist/src/index.cjs +1 -0
- package/dist/src/index.d.ts +7 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +26 -0
- package/dist/src/index.mjs +1 -0
- package/dist/src/jsx-dev-runtime.cjs +1 -0
- package/dist/src/jsx-dev-runtime.d.ts +2 -0
- package/dist/src/jsx-dev-runtime.d.ts.map +1 -0
- package/dist/src/jsx-dev-runtime.js +1 -0
- package/dist/src/jsx-dev-runtime.mjs +1 -0
- package/dist/src/jsx-runtime.cjs +1 -0
- package/dist/src/jsx-runtime.d.ts +7 -0
- package/dist/src/jsx-runtime.d.ts.map +1 -0
- package/dist/src/jsx-runtime.js +17 -0
- package/dist/src/jsx-runtime.mjs +1 -0
- package/dist/src/lib/client/chunk-D3VTWVNJ.mjs +1 -0
- package/dist/src/lib/client/index.cjs +1 -0
- package/dist/src/lib/client/index.d.ts +54 -0
- package/dist/src/lib/client/index.d.ts.map +1 -0
- package/dist/src/lib/client/index.js +142 -0
- package/dist/src/lib/client/index.mjs +1 -0
- package/dist/src/lib/client/router-next-UYIYMRJL.mjs +1 -0
- package/dist/src/lib/context/context.cjs +1 -0
- package/dist/src/lib/context/context.d.ts +337 -0
- package/dist/src/lib/context/context.d.ts.map +1 -0
- package/dist/src/lib/context/context.js +462 -0
- package/dist/src/lib/context/context.mjs +1 -0
- package/dist/src/lib/context/index.cjs +1 -0
- package/dist/src/lib/context/index.d.ts +3 -0
- package/dist/src/lib/context/index.d.ts.map +1 -0
- package/dist/src/lib/context/index.js +5 -0
- package/dist/src/lib/context/index.mjs +1 -0
- package/dist/src/lib/control-flow.cjs +1 -0
- package/dist/src/lib/control-flow.d.ts +4 -0
- package/dist/src/lib/control-flow.d.ts.map +1 -0
- package/dist/src/lib/control-flow.js +1 -0
- package/dist/src/lib/control-flow.mjs +1 -0
- package/dist/src/lib/core.cjs +1 -0
- package/dist/src/lib/core.d.ts +90 -0
- package/dist/src/lib/core.d.ts.map +1 -0
- package/dist/src/lib/core.js +181 -0
- package/dist/src/lib/core.mjs +1 -0
- package/dist/src/lib/directives/lit.cjs +1 -0
- package/dist/src/lib/directives/lit.d.ts +2 -0
- package/dist/src/lib/directives/lit.d.ts.map +1 -0
- package/dist/src/lib/directives/lit.js +31 -0
- package/dist/src/lib/directives/lit.mjs +0 -0
- package/dist/src/lib/env/index.cjs +1 -0
- package/dist/src/lib/env/index.d.ts +39 -0
- package/dist/src/lib/env/index.d.ts.map +1 -0
- package/dist/src/lib/env/index.js +50 -0
- package/dist/src/lib/env/index.mjs +1 -0
- package/dist/src/lib/i18n/index.cjs +1 -0
- package/dist/src/lib/i18n/index.d.ts +79 -0
- package/dist/src/lib/i18n/index.d.ts.map +1 -0
- package/dist/src/lib/i18n/index.js +127 -0
- package/dist/src/lib/i18n/index.mjs +1 -0
- package/dist/src/lib/index.cjs +1 -0
- package/dist/src/lib/index.d.ts +83 -0
- package/dist/src/lib/index.d.ts.map +1 -0
- package/dist/src/lib/index.js +147 -0
- package/dist/src/lib/index.mjs +1 -0
- package/dist/src/lib/isomorphic.cjs +1 -0
- package/dist/src/lib/isomorphic.d.ts +69 -0
- package/dist/src/lib/isomorphic.d.ts.map +1 -0
- package/dist/src/lib/isomorphic.js +92 -0
- package/dist/src/lib/isomorphic.mjs +1 -0
- package/dist/src/lib/jsx-runtime/index.cjs +1 -0
- package/dist/src/lib/jsx-runtime/index.d.ts +13 -0
- package/dist/src/lib/jsx-runtime/index.d.ts.map +1 -0
- package/dist/src/lib/jsx-runtime/index.js +23 -0
- package/dist/src/lib/jsx-runtime/index.mjs +1 -0
- package/dist/src/lib/jsx-runtime/jsx-dev-runtime.cjs +1 -0
- package/dist/src/lib/jsx-runtime/jsx-dev-runtime.d.ts +2 -0
- package/dist/src/lib/jsx-runtime/jsx-dev-runtime.d.ts.map +1 -0
- package/dist/src/lib/jsx-runtime/jsx-dev-runtime.js +1 -0
- package/dist/src/lib/jsx-runtime/jsx-dev-runtime.mjs +1 -0
- package/dist/src/lib/plugins/fluixi-routes-plugin.cjs +13 -0
- package/dist/src/lib/plugins/fluixi-routes-plugin.d.ts +21 -0
- package/dist/src/lib/plugins/fluixi-routes-plugin.d.ts.map +1 -0
- package/dist/src/lib/plugins/fluixi-routes-plugin.js +102 -0
- package/dist/src/lib/plugins/fluixi-routes-plugin.mjs +13 -0
- package/dist/src/lib/plugins/index.cjs +13 -0
- package/dist/src/lib/plugins/index.d.ts +4 -0
- package/dist/src/lib/plugins/index.d.ts.map +1 -0
- package/dist/src/lib/plugins/index.js +3 -0
- package/dist/src/lib/plugins/index.mjs +13 -0
- package/dist/src/lib/plugins/route-codegen.cjs +8 -0
- package/dist/src/lib/plugins/route-codegen.d.ts +13 -0
- package/dist/src/lib/plugins/route-codegen.d.ts.map +1 -0
- package/dist/src/lib/plugins/route-codegen.js +81 -0
- package/dist/src/lib/plugins/route-codegen.mjs +8 -0
- package/dist/src/lib/plugins/route-scanner.cjs +1 -0
- package/dist/src/lib/plugins/route-scanner.d.ts +39 -0
- package/dist/src/lib/plugins/route-scanner.d.ts.map +1 -0
- package/dist/src/lib/plugins/route-scanner.js +216 -0
- package/dist/src/lib/plugins/route-scanner.mjs +1 -0
- package/dist/src/lib/plugins/vite.cjs +1 -0
- package/dist/src/lib/plugins/vite.d.ts +3 -0
- package/dist/src/lib/plugins/vite.d.ts.map +1 -0
- package/dist/src/lib/plugins/vite.js +1 -0
- package/dist/src/lib/plugins/vite.mjs +1 -0
- package/dist/src/lib/render/component.cjs +1 -0
- package/dist/src/lib/render/component.d.ts +328 -0
- package/dist/src/lib/render/component.d.ts.map +1 -0
- package/dist/src/lib/render/component.js +520 -0
- package/dist/src/lib/render/component.mjs +1 -0
- package/dist/src/lib/render/index.cjs +1 -0
- package/dist/src/lib/render/index.d.ts +113 -0
- package/dist/src/lib/render/index.d.ts.map +1 -0
- package/dist/src/lib/render/index.js +201 -0
- package/dist/src/lib/render/index.mjs +1 -0
- package/dist/src/lib/render/lazy.cjs +1 -0
- package/dist/src/lib/render/lazy.d.ts +28 -0
- package/dist/src/lib/render/lazy.d.ts.map +1 -0
- package/dist/src/lib/render/lazy.js +62 -0
- package/dist/src/lib/render/lazy.mjs +1 -0
- package/dist/src/lib/render/suspense.cjs +1 -0
- package/dist/src/lib/render/suspense.d.ts +25 -0
- package/dist/src/lib/render/suspense.d.ts.map +1 -0
- package/dist/src/lib/render/suspense.js +139 -0
- package/dist/src/lib/render/suspense.mjs +1 -0
- package/dist/src/lib/router-next/data.cjs +1 -0
- package/dist/src/lib/router-next/data.d.ts +101 -0
- package/dist/src/lib/router-next/data.d.ts.map +1 -0
- package/dist/src/lib/router-next/data.js +179 -0
- package/dist/src/lib/router-next/data.mjs +1 -0
- package/dist/src/lib/router-next/index.cjs +1 -0
- package/dist/src/lib/router-next/index.d.ts +156 -0
- package/dist/src/lib/router-next/index.d.ts.map +1 -0
- package/dist/src/lib/router-next/index.js +464 -0
- package/dist/src/lib/router-next/index.mjs +1 -0
- package/dist/src/lib/server/hydration.cjs +1 -0
- package/dist/src/lib/server/hydration.d.ts +238 -0
- package/dist/src/lib/server/hydration.d.ts.map +1 -0
- package/dist/src/lib/server/hydration.js +384 -0
- package/dist/src/lib/server/hydration.mjs +1 -0
- package/dist/src/lib/server/index.cjs +16 -0
- package/dist/src/lib/server/index.d.ts +91 -0
- package/dist/src/lib/server/index.d.ts.map +1 -0
- package/dist/src/lib/server/index.js +141 -0
- package/dist/src/lib/server/index.mjs +16 -0
- package/dist/src/lib/server/reactive.cjs +1 -0
- package/dist/src/lib/server/reactive.d.ts +298 -0
- package/dist/src/lib/server/reactive.d.ts.map +1 -0
- package/dist/src/lib/server/reactive.js +472 -0
- package/dist/src/lib/server/reactive.mjs +1 -0
- package/dist/src/lib/theme/index.cjs +1 -0
- package/dist/src/lib/theme/index.d.ts +51 -0
- package/dist/src/lib/theme/index.d.ts.map +1 -0
- package/dist/src/lib/theme/index.js +79 -0
- package/dist/src/lib/theme/index.mjs +1 -0
- package/dist/src/lib/utils/index.cjs +1 -0
- package/dist/src/lib/utils/index.d.ts +379 -0
- package/dist/src/lib/utils/index.d.ts.map +1 -0
- package/dist/src/lib/utils/index.js +527 -0
- package/dist/src/lib/utils/index.mjs +1 -0
- package/dist/src/rx.cjs +1 -0
- package/dist/src/rx.d.ts +2 -0
- package/dist/src/rx.d.ts.map +1 -0
- package/dist/src/rx.js +101 -0
- package/dist/src/rx.mjs +0 -0
- package/dist/src/server.cjs +16 -0
- package/dist/src/server.d.ts +64 -0
- package/dist/src/server.d.ts.map +1 -0
- package/dist/src/server.js +63 -0
- package/dist/src/server.mjs +16 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -0
- package/package.json +128 -0
- package/src/index.ts +31 -0
- package/types/fluixi.d.ts +5 -0
- package/types/vinxi.d.ts +50 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Data fetching and caching primitives for Fluixi Router
|
|
3
|
+
* @module @fluixi/core/router/data
|
|
4
|
+
*/
|
|
5
|
+
import { createResource, createSignal } from '@fluixi/reactive/signal';
|
|
6
|
+
import { getHydrationData, setHydrationData, isServerEnvironment, isHydrating, } from '../server/hydration.js';
|
|
7
|
+
import { useContext, createContext } from '../context/context.js';
|
|
8
|
+
// ============================================================================
|
|
9
|
+
// CACHE (QUERY) SYSTEM
|
|
10
|
+
// ============================================================================
|
|
11
|
+
const globalCache = new Map();
|
|
12
|
+
const inflightRequests = new Map();
|
|
13
|
+
/**
|
|
14
|
+
* Cache an async function for data fetching
|
|
15
|
+
*
|
|
16
|
+
* Supports:
|
|
17
|
+
* - Deduplication
|
|
18
|
+
* - Hydration (Server -> Client)
|
|
19
|
+
* - Revalidation
|
|
20
|
+
*
|
|
21
|
+
* @param fn Async function to cache
|
|
22
|
+
* @param name Unique name for the cache key
|
|
23
|
+
*/
|
|
24
|
+
export function cache(fn, name) {
|
|
25
|
+
return async (...args) => {
|
|
26
|
+
const key = name + ':' + JSON.stringify(args);
|
|
27
|
+
// 1. Check Hydration Data (Client-side hydration)
|
|
28
|
+
if (isHydrating() || typeof window !== 'undefined') {
|
|
29
|
+
const hydrated = getHydrationData(key);
|
|
30
|
+
if (hydrated !== undefined) {
|
|
31
|
+
return hydrated;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
// 2. Check Memory Cache
|
|
35
|
+
if (globalCache.has(key)) {
|
|
36
|
+
return globalCache.get(key);
|
|
37
|
+
}
|
|
38
|
+
// 3. Request Deduplication
|
|
39
|
+
if (inflightRequests.has(key)) {
|
|
40
|
+
return inflightRequests.get(key);
|
|
41
|
+
}
|
|
42
|
+
// 4. Execute
|
|
43
|
+
const promise = Promise.resolve(fn(...args)).then((val) => {
|
|
44
|
+
globalCache.set(key, val);
|
|
45
|
+
inflightRequests.delete(key);
|
|
46
|
+
// Save for hydration if on server
|
|
47
|
+
if (isServerEnvironment()) {
|
|
48
|
+
setHydrationData(key, val);
|
|
49
|
+
}
|
|
50
|
+
return val;
|
|
51
|
+
}, (err) => {
|
|
52
|
+
inflightRequests.delete(key);
|
|
53
|
+
throw err;
|
|
54
|
+
});
|
|
55
|
+
inflightRequests.set(key, promise);
|
|
56
|
+
return promise;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Global revalidation signal. Tracked by createAsync so that
|
|
61
|
+
* when a key is revalidated, matching resources re-fetch.
|
|
62
|
+
*/
|
|
63
|
+
const [revalidationVersion, setRevalidationVersion] = createSignal(0);
|
|
64
|
+
const revalidationKeys = new Set();
|
|
65
|
+
/**
|
|
66
|
+
* Revalidate a cache key. Clears the memory cache and triggers
|
|
67
|
+
* reactive invalidation so resources using createAsync re-fetch.
|
|
68
|
+
*
|
|
69
|
+
* @param key Key prefix string or predicate function to match cache keys
|
|
70
|
+
*/
|
|
71
|
+
export function revalidate(key) {
|
|
72
|
+
const predicate = typeof key === 'string' ? (k) => k.startsWith(key) : key;
|
|
73
|
+
for (const k of globalCache.keys()) {
|
|
74
|
+
if (predicate(k)) {
|
|
75
|
+
globalCache.delete(k);
|
|
76
|
+
revalidationKeys.add(k);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
// Bump version to trigger reactive refresh in createAsync consumers
|
|
80
|
+
setRevalidationVersion((v) => v + 1);
|
|
81
|
+
}
|
|
82
|
+
// ============================================================================
|
|
83
|
+
// ASYNC DATA PRIMITIVES
|
|
84
|
+
// ============================================================================
|
|
85
|
+
/**
|
|
86
|
+
* Create an async resource from a promise or cache function
|
|
87
|
+
*
|
|
88
|
+
* @param fetcher Function that returns a promise
|
|
89
|
+
* @param source Dependency signal (optional)
|
|
90
|
+
*/
|
|
91
|
+
export function createAsync(fetcher, source) {
|
|
92
|
+
const [data] = createResource(source || (() => true), fetcher);
|
|
93
|
+
return data;
|
|
94
|
+
// return () => '' as any;
|
|
95
|
+
}
|
|
96
|
+
// ============================================================================
|
|
97
|
+
// ACTIONS
|
|
98
|
+
// ============================================================================
|
|
99
|
+
const submissionState = new Map();
|
|
100
|
+
function getSubmissionSignal(url) {
|
|
101
|
+
if (!submissionState.has(url)) {
|
|
102
|
+
submissionState.set(url, createSignal(undefined));
|
|
103
|
+
}
|
|
104
|
+
return submissionState.get(url);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Create a server action
|
|
108
|
+
*
|
|
109
|
+
* @param fn Function to execute (server-side)
|
|
110
|
+
* @param name Action name
|
|
111
|
+
*/
|
|
112
|
+
export function action(fn, name) {
|
|
113
|
+
const actionUrl = name || fn.name || 'action';
|
|
114
|
+
const submit = async (input) => {
|
|
115
|
+
const [, setSubmission] = getSubmissionSignal(actionUrl);
|
|
116
|
+
// Reset state
|
|
117
|
+
const clear = () => setSubmission(undefined);
|
|
118
|
+
const retry = () => submit(input);
|
|
119
|
+
setSubmission({
|
|
120
|
+
input: input, // Approximate type for tracking
|
|
121
|
+
pending: true,
|
|
122
|
+
clear,
|
|
123
|
+
retry,
|
|
124
|
+
});
|
|
125
|
+
try {
|
|
126
|
+
// Cast to any to handle potential argument mismatch in generic types
|
|
127
|
+
// fn expects tuple Args, input is single value or FormData
|
|
128
|
+
const result = await fn(input);
|
|
129
|
+
setSubmission({
|
|
130
|
+
input: input,
|
|
131
|
+
result,
|
|
132
|
+
pending: false,
|
|
133
|
+
clear,
|
|
134
|
+
retry,
|
|
135
|
+
});
|
|
136
|
+
return result;
|
|
137
|
+
}
|
|
138
|
+
catch (error) {
|
|
139
|
+
setSubmission({
|
|
140
|
+
input: input,
|
|
141
|
+
error,
|
|
142
|
+
pending: false,
|
|
143
|
+
clear,
|
|
144
|
+
retry,
|
|
145
|
+
});
|
|
146
|
+
throw error;
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
submit.url = actionUrl;
|
|
150
|
+
submit.with = (args) => action((...a) => fn(args, ...a), name);
|
|
151
|
+
return submit;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Hook to track action submission state
|
|
155
|
+
*/
|
|
156
|
+
export function useSubmission(actionFn) {
|
|
157
|
+
const [submission] = getSubmissionSignal(actionFn.url);
|
|
158
|
+
return submission;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Hook to get action executor
|
|
162
|
+
*/
|
|
163
|
+
export function useAction(actionFn) {
|
|
164
|
+
return actionFn;
|
|
165
|
+
}
|
|
166
|
+
export const RouteDataContext = createContext();
|
|
167
|
+
export const RouteDataProvider = RouteDataContext.Provider;
|
|
168
|
+
/**
|
|
169
|
+
* Access the data returned by the nearest ancestor route's `routeData` export.
|
|
170
|
+
*
|
|
171
|
+
* Returns a stable accessor function. Call it to get the current route data:
|
|
172
|
+
*
|
|
173
|
+
* const data = useRouteData<WorkspaceRouteData>();
|
|
174
|
+
* createEffect(() => console.log(data()?.workspace()));
|
|
175
|
+
*/
|
|
176
|
+
export function useRouteData() {
|
|
177
|
+
const ctx = useContext(RouteDataContext);
|
|
178
|
+
return typeof ctx === 'function' ? ctx : () => ctx;
|
|
179
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createResource as M,createSignal as h}from"@fluixi/reactive/signal";var A=!1,f=new Map;function p(){return A}function y(e,t){f.set(e,t)}function x(e){return f.get(e)}function S(){f.clear()}function w(){if(typeof window>"u")return;let e=document.getElementById("__FLUIXI_HYDRATION__");e&&e.remove();let t=document.createTreeWalker(document.body,NodeFilter.SHOW_COMMENT,null),n=[],r;for(;r=t.nextNode();){let i=r,o=i.nodeValue||"";(o.startsWith("#")||o.startsWith("/"))&&n.push(i)}n.forEach(i=>i.remove()),S()}typeof window<"u"&&window.addEventListener("load",()=>{setTimeout(w,100)});function T(){return typeof window>"u"}import{asProvider as _}from"@fluixi/dom";import{createContext as k,useContext as H}from"@fluixi/reactive/signal";import{readChildren as ue}from"@fluixi/reactive/signal";import{registerCreateComponent as P,asComponent as E}from"@fluixi/dom";import{untrack as R,onCleanup as $,getOwner as z,createEffect as K,createMemo as J,createSignal as X,isSignal as O,batch as Y,runWithOwner as q}from"@fluixi/reactive/signal";function g(e){P(D)}function D(e,t){return L(e,t)}function L(e,t){let n=typeof e=="function"?R(()=>e(t)):e;if(n!=null&&(typeof n=="function"||typeof n=="object")&&!O(n)){try{n.$name=e.name}catch{}return E(n)}return n}g("index");function m(e){let t=k(e),n=r=>(r.debug,t.Provider({value:r.value,get children(){return r.children},debug:r.debug}));return typeof Symbol<"u"&&Symbol.for&&(n.$$typeof=Symbol.for("react.provider")),n.$$typeof=Symbol.for("react.provider"),{id:t.id,Provider:_(n),defaultValue:e}}function v(e){let t=H(e);return t!==void 0?t:e.defaultValue}var c=new Map,a=new Map;function ge(e,t){return async(...n)=>{let r=t+":"+JSON.stringify(n);if(p()||typeof window<"u"){let o=x(r);if(o!==void 0)return o}if(c.has(r))return c.get(r);if(a.has(r))return a.get(r);let i=Promise.resolve(e(...n)).then(o=>(c.set(r,o),a.delete(r),T()&&y(r,o),o),o=>{throw a.delete(r),o});return a.set(r,i),i}}var[me,U]=h(0),j=new Set;function ve(e){let t=typeof e=="string"?n=>n.startsWith(e):e;for(let n of c.keys())t(n)&&(c.delete(n),j.add(n));U(n=>n+1)}function he(e,t){let[n]=M(t||(()=>!0),e);return n}var l=new Map;function C(e){return l.has(e)||l.set(e,h(void 0)),l.get(e)}function I(e,t){let n=t||e.name||"action",r=async i=>{let[,o]=C(n),d=()=>o(void 0),u=()=>r(i);o({input:i,pending:!0,clear:d,retry:u});try{let s=await e(i);return o({input:i,result:s,pending:!1,clear:d,retry:u}),s}catch(s){throw o({input:i,error:s,pending:!1,clear:d,retry:u}),s}};return r.url=n,r.with=i=>I((...o)=>e(i,...o),t),r}function Ce(e){let[t]=C(e.url);return t}function be(e){return e}var b=m(),Ae=b.Provider;function Se(){let e=v(b);return typeof e=="function"?e:()=>e}export{b as RouteDataContext,Ae as RouteDataProvider,I as action,ge as cache,he as createAsync,ve as revalidate,be as useAction,Se as useRouteData,Ce as useSubmission};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var w=Object.defineProperty;var re=Object.getOwnPropertyDescriptor;var oe=Object.getOwnPropertyNames;var ae=Object.prototype.hasOwnProperty;var ie=(e,n)=>{for(var t in n)w(e,t,{get:n[t],enumerable:!0})},se=(e,n,t,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of oe(n))!ae.call(e,r)&&r!==t&&w(e,r,{get:()=>n[r],enumerable:!(o=re(n,r))||o.enumerable});return e};var ce=e=>se(w({},"__esModule",{value:!0}),e);var _e={};ie(_e,{A:()=>ke,Form:()=>Me,Link:()=>Z,Outlet:()=>be,Redirect:()=>Re,Router:()=>Ce,action:()=>E,cache:()=>j,createAsync:()=>I,createBrowserHistory:()=>g.createBrowserHistory,createMemoryHistory:()=>g.createMemoryHistory,lazy:()=>$,matchPath:()=>g.matchPath,matchRoutes:()=>g.matchRoutes,preloadRoutes:()=>Ne,revalidate:()=>U,runWithOwner:()=>ee.runWithOwner,select:()=>Le,useAction:()=>W,useLevelParams:()=>we,useLocation:()=>D,useMatch:()=>Oe,useNavigate:()=>Q,useParam:()=>Ae,useParamSelector:()=>Se,useParams:()=>L,useRouteData:()=>De,useRouter:()=>P,useSearchParams:()=>Ee,useSubmission:()=>K});module.exports=ce(_e);var s=require("@fluixi/reactive/signal"),u=require("@fluixi/dom"),f=require("@fluixi/reactive/signal"),q=require("@fluixi/utils/object"),B=require("@fluixi/utils/compare"),m=require("@fluixi/router"),g=require("@fluixi/router");var T=require("@fluixi/reactive/signal");var ue=!1,A=new Map;function k(){return ue}function M(e,n){A.set(e,n)}function N(e){return A.get(e)}function de(){A.clear()}function fe(){if(typeof window>"u")return;let e=document.getElementById("__FLUIXI_HYDRATION__");e&&e.remove();let n=document.createTreeWalker(document.body,NodeFilter.SHOW_COMMENT,null),t=[],o;for(;o=n.nextNode();){let r=o,a=r.nodeValue||"";(a.startsWith("#")||a.startsWith("/"))&&t.push(r)}t.forEach(r=>r.remove()),de()}typeof window<"u"&&window.addEventListener("load",()=>{setTimeout(fe,100)});function _(){return typeof window>"u"}var V=require("@fluixi/dom"),S=require("@fluixi/reactive/signal"),ye=require("@fluixi/reactive/signal");var b=require("@fluixi/dom"),l=require("@fluixi/reactive/signal");function H(e){(0,b.registerCreateComponent)(le)}function le(e,n){return pe(e,n)}function pe(e,n){let t=typeof e=="function"?(0,l.untrack)(()=>e(n)):e;if(t!=null&&(typeof t=="function"||typeof t=="object")&&!(0,l.isSignal)(t)){try{t.$name=e.name}catch{}return(0,b.asComponent)(t)}return t}H("index");function F(e){let n=(0,S.createContext)(e),t=o=>(o.debug,n.Provider({value:o.value,get children(){return o.children},debug:o.debug}));return typeof Symbol<"u"&&Symbol.for&&(t.$$typeof=Symbol.for("react.provider")),t.$$typeof=Symbol.for("react.provider"),{id:n.id,Provider:(0,V.asProvider)(t),defaultValue:e}}var v=new Map,h=new Map;function j(e,n){return async(...t)=>{let o=n+":"+JSON.stringify(t);if(k()||typeof window<"u"){let a=N(o);if(a!==void 0)return a}if(v.has(o))return v.get(o);if(h.has(o))return h.get(o);let r=Promise.resolve(e(...t)).then(a=>(v.set(o,a),h.delete(o),_()&&M(o,a),a),a=>{throw h.delete(o),a});return h.set(o,r),r}}var[nt,me]=(0,T.createSignal)(0),ge=new Set;function U(e){let n=typeof e=="string"?t=>t.startsWith(e):e;for(let t of v.keys())n(t)&&(v.delete(t),ge.add(t));me(t=>t+1)}function I(e,n){let[t]=(0,T.createResource)(n||(()=>!0),e);return t}var O=new Map;function z(e){return O.has(e)||O.set(e,(0,T.createSignal)(void 0)),O.get(e)}function E(e,n){let t=n||e.name||"action",o=async r=>{let[,a]=z(t),i=()=>a(void 0),c=()=>o(r);a({input:r,pending:!0,clear:i,retry:c});try{let d=await e(r);return a({input:r,result:d,pending:!1,clear:i,retry:c}),d}catch(d){throw a({input:r,error:d,pending:!1,clear:i,retry:c}),d}};return o.url=t,o.with=r=>E((...a)=>e(r,...a),n),o}function K(e){let[n]=z(e.url);return n}function W(e){return e}var xe=F(),rt=xe.Provider;var x=require("@fluixi/reactive/signal");function $(e,n){let t,o,r;function a(){return o||(o=e().then(c=>t=c.default)),o}n?.preload&&a();let i=(c=>{if(t){let d=t;return(0,x.untrack)(()=>d(c))}if(!r){let[d]=(0,x.createResource)(()=>a());if(r=d,d.error)throw d.error}return(0,x.createMemo)(()=>{let d=r();return d?(0,x.untrack)(()=>d(c)):void 0},void 0,{name:"lazy"})});return i.preload=()=>a().then(()=>{}),i.$lazy=!0,i.loader=e,i}var ee=require("@fluixi/reactive/signal"),R=(0,f.createContext)(),J=(0,f.createContext)(),X=(0,f.createContext)(),Y=(0,f.createContext)();function he(e,n,t){let o,r=e.route.data;if(typeof r=="function"){let C=!1;(0,s.onCleanup)(()=>{C=!0});let te=(0,s.getOwner)(),[ne]=(0,s.createResource)(()=>r({params:t.params,location:t.location},te,()=>C));o=ne}let a=()=>Y.Provider({value:o,get children(){return X.Provider({value:e.params,get children(){return J.Provider({value:{depth:n,...t},get children(){return(0,u.createComponent)(e.component,{})}})}})}});if(!o)return a();let i=o,c=()=>i.loading,[d,p]=(0,s.createSignal)((0,s.untrack)(()=>!c()));return(0,s.createEffect)(()=>p(!c())),(0,s.createMemo)(()=>d()?a():null)}function G(e){let n=e.depth+1,[t,o]=(0,s.createSignal)((0,s.untrack)(()=>e.matched()[n]?.component));return(0,s.createEffect)(()=>{let r=e.matched()[n]?.component;o(()=>r)}),(0,s.createMemo)(()=>{if(!t())return e.notFound?e.notFound():null;let a=(0,s.untrack)(()=>e.matched())[n];return he(a,n,{matched:e.matched,params:e.params,location:e.location})})}function ve(e){return e==null?Te():typeof e=="function"?(0,u.createComponent)(e,{}):e}function Te(){let e=(0,u.createNativeElement)("div");(0,u.setAttribute)(e,"class","fx-not-found"),(0,u.setAttribute)(e,"role","main"),(0,u.setAttribute)(e,"style","min-height:60vh;display:grid;place-content:center;gap:.25rem;text-align:center;font-family:system-ui,-apple-system,sans-serif");let n=(0,u.createNativeElement)("h1");(0,u.setAttribute)(n,"style","margin:0;font-size:2.5rem;font-weight:700"),(0,u.insert)(n,"404");let t=(0,u.createNativeElement)("p");return(0,u.setAttribute)(t,"style","margin:0;opacity:.7"),(0,u.insert)(t,"This page could not be found."),e.appendChild(n),e.appendChild(t),e}function Ce(e){let n=e.history??(0,m.createBrowserHistory)(),t=(0,m.createRouter)({routes:e.routes,base:e.base,history:n}),[o,r]=(0,s.createSignal)(t.state()),a=t.subscribe(r);(0,s.onCleanup)(()=>{a(),t.destroy()});let i=(0,s.createMemo)(()=>(o().match?.matched??[]).filter(C=>C.component)),c={router:t,location:(0,s.createMemo)(()=>o().location),params:(0,s.createMemo)(()=>o().match?.params??{})},d={depth:-1,matched:i,params:c.params,location:c.location,notFound:()=>ve(e.notFound)},p;return R.Provider({value:c,get children(){return p??=G(d)}})}function be(){let e=(0,f.useContext)(J);return e?G(e):null}function Re(e){let n=(0,f.useContext)(R);if(!n||typeof window>"u")return null;let t=!1;return(0,s.onCleanup)(()=>t=!0),queueMicrotask(()=>{t||n.router.navigate(e.to,{replace:e.replace!==!1})}),null}var Pe={router:{navigate:()=>{}},location:()=>({pathname:"",search:"",hash:"",query:{}}),params:()=>({})};function P(){let e=(0,f.useContext)(R);if(e)return e;if(typeof window>"u")return Pe;throw new Error("[router-next] useRouter must be used within <Router>")}function L(){let e=P().params;return(0,s.createMemo)(()=>e(),{},{equals:(n,t)=>JSON.stringify(n)===JSON.stringify(t)})}function we(){return(0,f.useContext)(X)??{}}function Ae(e){let n=L();return(0,s.createMemo)(()=>n()[e])}function Se(e,n){let t=L();return(0,s.createMemo)(()=>e(t()),void 0,n?{equals:n}:void 0)}function Oe(e){let n=D();return(0,s.createMemo)(()=>(0,m.matchPath)(typeof e=="function"?e():e,n.pathname))}function Ee(){let e=D(),n=Q();return[(0,s.createMemo)(()=>e.query),(r,a)=>{let i=new URLSearchParams(e.search);for(let[d,p]of Object.entries(r))p===null?i.delete(d):i.set(d,p);let c=i.toString();n(e.pathname+(c?`?${c}`:""),a)}]}function Le(e,n){let t=(o,r)=>(0,B.deepEqual)(o,r);return n!==void 0?(0,s.createMemo)(()=>(0,q.get)(e(),n),void 0,{equals:t}):(0,s.createMemo)(e,void 0,{equals:t})}function D(){let{location:e}=P();return new Proxy({},{get:(n,t)=>e()[t],has:(n,t)=>t in e(),ownKeys:()=>Reflect.ownKeys(e()),getOwnPropertyDescriptor:(n,t)=>Object.getOwnPropertyDescriptor(e(),t)})}function Q(){let{router:e}=P();return(n,t)=>e.navigate(n,t)}function De(){return(0,f.useContext)(Y)??(()=>{})}var y=e=>typeof e=="function"?e():e;function Z(e){let n=(0,f.useContext)(R),t=typeof document>"u",o=()=>n?.router.navigate(y(e.href)??"",{replace:y(e.replace)}),r=(0,u.createNativeElement)("a");if((0,u.setAttribute)(r,"href",y(e.href)??""),e.slot&&(0,u.setAttribute)(r,"slot",y(e.slot)),typeof r.addEventListener=="function")r.addEventListener("click",i=>{i.metaKey||i.ctrlKey||i.shiftKey||i.altKey||(i.preventDefault(),o())});else{let i=y(e.className??e.class)??"";i&&(0,u.setAttribute)(r,"class",i)}typeof r.addEventListener=="function"&&(0,s.createEffect)(()=>{let i=y(e.href)??"";r.setAttribute("href",i);let c=y(e.className??e.class)??"",d=y(e.activeClass)??"",p=y(e.active)??n?.location().pathname===i;r.className=[c,p?d:""].filter(Boolean).join(" ")});let a=e.children;return a!=null&&(0,u.insert)(r,a),r}var ke=Z;function Me(e){let n=e.action,t=e.className??e.class,o=n.url??"",r=(0,u.createNativeElement)("form");(0,u.setAttribute)(r,"method","post"),o&&(0,u.setAttribute)(r,"action",o),t&&(0,u.setAttribute)(r,"class",t);for(let[i,c]of Object.entries(e))i==="action"||i==="children"||i==="class"||i==="className"||c!=null&&typeof c!="function"&&(0,u.setAttribute)(r,i,String(c));typeof r.addEventListener=="function"&&r.addEventListener("submit",i=>{i.preventDefault();let c={};new FormData(r).forEach((d,p)=>{c[p]=d}),Promise.resolve(n(c)).catch(()=>{})});let a=e.children;return a!=null&&(0,u.insert)(r,a),r}async function Ne(e,n){let t=(0,m.matchRoutes)(e,n);if(!t)return;let o=[];for(let r of t.matched){let a=r.component;a&&typeof a.preload=="function"&&o.push(a.preload())}await Promise.all(o)}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Fluixi adapter for the framework-agnostic @fluixi/router core.
|
|
3
|
+
*
|
|
4
|
+
* Renders the resolved match tree TOP-DOWN. Each layer's component is rendered
|
|
5
|
+
* inside the PARENT layer's <Outlet/> scope, so a child route inherits whatever
|
|
6
|
+
* context a parent layout provides. <Outlet/> is reactive but keyed on the child's
|
|
7
|
+
* component reference, so it only re-renders when the child route at that depth
|
|
8
|
+
* actually changes — sibling navigation reuses the layout, deeper navigation
|
|
9
|
+
* leaves shallower layouts untouched.
|
|
10
|
+
*
|
|
11
|
+
* No parentGate, no deferred content memo: a child is rendered straight from the
|
|
12
|
+
* matched array, never by re-entering a still-building parent, so deeply nested
|
|
13
|
+
* <Outlet/> works at any depth.
|
|
14
|
+
*/
|
|
15
|
+
import { type GetAtPath } from '@fluixi/utils/object';
|
|
16
|
+
import type { IsUndefined } from '@fluixi/utils/primitive';
|
|
17
|
+
import { type RouteDefinition, type Router as CoreRouter, type HistoryAdapter, type RouterLocation, type NavigateOptions } from '@fluixi/router';
|
|
18
|
+
interface RouterCtxValue {
|
|
19
|
+
router: CoreRouter<any>;
|
|
20
|
+
location: () => RouterLocation;
|
|
21
|
+
params: () => Record<string, string>;
|
|
22
|
+
}
|
|
23
|
+
export interface RouterProps<C = any> {
|
|
24
|
+
routes: RouteDefinition<C>[];
|
|
25
|
+
base?: string;
|
|
26
|
+
history?: HistoryAdapter;
|
|
27
|
+
/**
|
|
28
|
+
* Rendered when the current URL matches no route — a component, an element, or any renderable.
|
|
29
|
+
* Defaults to a minimal built-in 404 so an unmatched URL never renders a blank page. For a 404
|
|
30
|
+
* that keeps your layout/chrome, add a catch-all file route instead (`[...slug].tsx` → `*`).
|
|
31
|
+
*/
|
|
32
|
+
notFound?: any;
|
|
33
|
+
}
|
|
34
|
+
export declare function Router<C = any>(props: RouterProps<C>): any;
|
|
35
|
+
/** Renders this layout's child route, inside this layout's context. */
|
|
36
|
+
export declare function Outlet(): any;
|
|
37
|
+
/** Navigate to `to` on mount (replace by default). Renders nothing. */
|
|
38
|
+
export declare function Redirect(props: {
|
|
39
|
+
to: string;
|
|
40
|
+
replace?: boolean;
|
|
41
|
+
}): null;
|
|
42
|
+
export declare function useRouter(): RouterCtxValue;
|
|
43
|
+
/**
|
|
44
|
+
* Reactive merged params across all matched layers, as an accessor. Deep-equal
|
|
45
|
+
* memoized so it only notifies when a value actually changes (the underlying
|
|
46
|
+
* params object is rebuilt on every transition).
|
|
47
|
+
*/
|
|
48
|
+
export declare function useParams<T extends Record<string, string> = Record<string, string>>(): () => T;
|
|
49
|
+
/** Params introduced at the nearest matched layer. */
|
|
50
|
+
export declare function useLevelParams(): Record<string, string>;
|
|
51
|
+
/**
|
|
52
|
+
* Reactive accessor for a single route param. Default `===` equality on the
|
|
53
|
+
* string value, so it only re-triggers when THIS key changes — not when other
|
|
54
|
+
* params at the same level change.
|
|
55
|
+
*/
|
|
56
|
+
export declare function useParam(key: string): () => string | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Derive a stable value from route params. Only re-triggers when the selector's
|
|
59
|
+
* return value changes. For object returns, pass a custom `equals`.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* const ids = useParamSelector((p) => ({ wsId: p.workspaceId, chId: p.channelId }), deepEqual);
|
|
63
|
+
*/
|
|
64
|
+
export declare function useParamSelector<T>(selector: (params: Record<string, string>) => T, equals?: (a: T, b: T) => boolean): () => T;
|
|
65
|
+
/**
|
|
66
|
+
* Match a path pattern against the current pathname, reactively. Returns the
|
|
67
|
+
* matched `{ params, path }` or null.
|
|
68
|
+
*/
|
|
69
|
+
export declare function useMatch(path: (() => string) | string): () => {
|
|
70
|
+
params: Record<string, string>;
|
|
71
|
+
path: string;
|
|
72
|
+
} | null;
|
|
73
|
+
/**
|
|
74
|
+
* Read/write the current query string. Returns `[params, setParams]`: `params`
|
|
75
|
+
* is a reactive accessor of the parsed query; `setParams` merges the given keys
|
|
76
|
+
* (null deletes) and navigates. Matches the old router.
|
|
77
|
+
*/
|
|
78
|
+
export declare function useSearchParams(): readonly [
|
|
79
|
+
() => Record<string, string>,
|
|
80
|
+
(next: Record<string, string | null>, options?: NavigateOptions) => void
|
|
81
|
+
];
|
|
82
|
+
/**
|
|
83
|
+
* Stable accessor from any reactive source with deep-equal memoization. Pass a
|
|
84
|
+
* `key` to select a nested property. Only re-triggers downstream when the value
|
|
85
|
+
* (or selected field) actually changes.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* const ws = select(store.activeWorkspace); // whole object
|
|
89
|
+
* const id = select(store.activeWorkspace, 'id'); // single field
|
|
90
|
+
*/
|
|
91
|
+
export declare function select<T, K extends string = never>(source: () => T, key?: K): () => IsUndefined<K> extends true ? T : GetAtPath<T, K>;
|
|
92
|
+
/**
|
|
93
|
+
* The current location as a reactive object: reading a property (pathname, etc.)
|
|
94
|
+
* subscribes to location changes. Matches the old router's useLocation().
|
|
95
|
+
*/
|
|
96
|
+
export declare function useLocation(): RouterLocation;
|
|
97
|
+
export declare function useNavigate(): (to: string, options?: NavigateOptions) => void;
|
|
98
|
+
/**
|
|
99
|
+
* The resolved data for the nearest route that declared a `data` loader. Always
|
|
100
|
+
* returns a callable accessor (matching the old router): it suspends under
|
|
101
|
+
* <Suspense> while loading and yields undefined when no ancestor declared data.
|
|
102
|
+
*/
|
|
103
|
+
export declare function useRouteData<T = any>(): () => T | undefined;
|
|
104
|
+
type MaybeAccessor<T> = T | (() => T);
|
|
105
|
+
export interface LinkProps {
|
|
106
|
+
href: MaybeAccessor<string>;
|
|
107
|
+
replace?: MaybeAccessor<boolean>;
|
|
108
|
+
/** Override active state. Defaults to current pathname === href. */
|
|
109
|
+
active?: MaybeAccessor<boolean>;
|
|
110
|
+
class?: MaybeAccessor<string>;
|
|
111
|
+
className?: MaybeAccessor<string>;
|
|
112
|
+
/** Class added while the link is active. */
|
|
113
|
+
activeClass?: MaybeAccessor<string>;
|
|
114
|
+
slot?: string;
|
|
115
|
+
children?: any;
|
|
116
|
+
}
|
|
117
|
+
export declare function Link(props: LinkProps): any;
|
|
118
|
+
/** Alias for {@link Link}. */
|
|
119
|
+
export declare const A: typeof Link;
|
|
120
|
+
import type { Action } from './data.js';
|
|
121
|
+
export interface FormProps {
|
|
122
|
+
/** The action to run on submit (typically wrapping a `"use server"` function). */
|
|
123
|
+
action: Action<any, any>;
|
|
124
|
+
/** Extra class on the <form>. */
|
|
125
|
+
class?: string;
|
|
126
|
+
children?: any;
|
|
127
|
+
[key: string]: any;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* A `<form>` wired to an action: on submit it builds `FormData` from the form and calls
|
|
131
|
+
* `action(formData)` (which tracks submission state via `useSubmission`), without a full
|
|
132
|
+
* page navigation. The markup carries `method="post"` + `action={action.url}` so it's
|
|
133
|
+
* progressive-enhancement-ready.
|
|
134
|
+
*
|
|
135
|
+
* <Form action={save}>
|
|
136
|
+
* <input name="title" />
|
|
137
|
+
* <button>Save</button>
|
|
138
|
+
* </Form>
|
|
139
|
+
*/
|
|
140
|
+
export declare function Form(props: FormProps): any;
|
|
141
|
+
/**
|
|
142
|
+
* Download the lazy component chunks for the route(s) matching `pathname` and resolve when
|
|
143
|
+
* they're all loaded. Await this BEFORE hydrating: once each matched lazy file-route is
|
|
144
|
+
* resolved it renders synchronously on the first pass (no Suspense fallback, no late
|
|
145
|
+
* re-render), so hydration adopts the server DOM in place instead of building a duplicate
|
|
146
|
+
* subtree next to it. No-op for routes with no lazy components. Safe to call when the URL
|
|
147
|
+
* matches nothing (resolves immediately).
|
|
148
|
+
*/
|
|
149
|
+
export declare function preloadRoutes<C = any>(routes: RouteDefinition<C>[], pathname: string): Promise<void>;
|
|
150
|
+
export { createMemoryHistory, createBrowserHistory, matchRoutes, matchPath, } from '@fluixi/router';
|
|
151
|
+
export type { RouteDefinition, RouteMatch, MatchedRoute, RouterLocation, NavigateOptions, HistoryAdapter, } from '@fluixi/router';
|
|
152
|
+
export { cache, action, revalidate, createAsync, useSubmission, useAction, } from './data.js';
|
|
153
|
+
export type { RouteDataArgs, RouteLoadFunc, Action, Submission, CacheFn, } from './data.js';
|
|
154
|
+
export { lazy } from '../render/lazy.js';
|
|
155
|
+
export { runWithOwner } from '@fluixi/reactive/signal';
|
|
156
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/router-next/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAoBH,OAAO,EAAO,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAG3D,OAAO,EAKL,KAAK,eAAe,EAEpB,KAAK,MAAM,IAAI,UAAU,EACzB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,eAAe,EACrB,MAAM,gBAAgB,CAAC;AAIxB,UAAU,cAAc;IACtB,MAAM,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;IACxB,QAAQ,EAAE,MAAM,cAAc,CAAC;IAC/B,MAAM,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC;AA8JD,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,GAAG;IAClC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB;;;;OAIG;IACH,QAAQ,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