eclipsa 0.1.0 → 0.1.2
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/action-DstcBFEm.mjs +6188 -0
- package/action-DstcBFEm.mjs.map +1 -0
- package/client-D1zMr8hs.mjs +307 -0
- package/client-D1zMr8hs.mjs.map +1 -0
- package/component-DjUmyVqL.d.mts +8 -0
- package/core/client/mod.d.mts +3 -0
- package/core/client/mod.mjs +5 -0
- package/core/dev-client/mod.d.mts +33 -0
- package/core/dev-client/mod.mjs +82 -0
- package/core/dev-client/mod.mjs.map +1 -0
- package/core/internal.d.mts +2 -0
- package/core/internal.mjs +2 -0
- package/core/prod-client/mod.d.mts +19 -0
- package/core/prod-client/mod.mjs +44 -0
- package/core/prod-client/mod.mjs.map +1 -0
- package/internal-Dmvt_AGE.d.mts +674 -0
- package/jsx/jsx-dev-runtime.d.mts +17 -0
- package/jsx/jsx-dev-runtime.mjs +2 -0
- package/jsx/jsx-runtime.d.mts +2 -0
- package/jsx/jsx-runtime.mjs +1 -0
- package/jsx/mod.d.mts +7 -0
- package/jsx/mod.mjs +7 -0
- package/jsx/mod.mjs.map +1 -0
- package/jsx-dev-runtime-CY60yQJY.mjs +28 -0
- package/jsx-dev-runtime-CY60yQJY.mjs.map +1 -0
- package/jsx-runtime-QIK6ADiK.d.mts +1 -0
- package/loader-DDVVUXBr.mjs +2 -0
- package/mod-CaLAdQcH.d.mts +18 -0
- package/mod.d.mts +164 -0
- package/mod.mjs +289 -0
- package/mod.mjs.map +1 -0
- package/package.json +69 -3
- package/resume-hmr-BRDojQNp.mjs +6 -0
- package/resume-hmr-BRDojQNp.mjs.map +1 -0
- package/signal-CosyYdtA.d.mts +22 -0
- package/signal-D1WmFjmJ.mjs +108 -0
- package/signal-D1WmFjmJ.mjs.map +1 -0
- package/snapshot-BG0kq9wt.mjs +39 -0
- package/snapshot-BG0kq9wt.mjs.map +1 -0
- package/types-DDeNM8UH.d.mts +11 -0
- package/types-WOJV0N2h.d.mts +282 -0
- package/vite/mod.d.mts +13 -0
- package/vite/mod.mjs +150297 -0
- package/vite/mod.mjs.map +1 -0
- package/web-utils/mod.d.mts +34 -0
- package/web-utils/mod.mjs +132 -0
- package/web-utils/mod.mjs.map +1 -0
- package/core/component.ts +0 -7
- package/core/dev-client/mod.ts +0 -17
- package/core/dev-client/renderer.ts +0 -5
- package/core/dev-client/types.ts +0 -3
- package/core/mod.ts +0 -4
- package/core/signal.ts +0 -20
- package/core/types.ts +0 -6
- package/deno.json +0 -23
- package/jsx/jsx-dev-runtime.ts +0 -19
- package/jsx/jsx-runtime.ts +0 -1
- package/jsx/mod.ts +0 -34
- package/jsx/shared.ts +0 -1
- package/jsx/types.ts +0 -23
- package/mod.ts +0 -2
- package/transformers/dev-client/mod.ts +0 -39
- package/transformers/dev-ssr/mod.ts +0 -52
- package/transformers/utils/jsx.ts +0 -77
- package/utils/node-connect.ts +0 -55
- package/vite/dev-app/mod.ts +0 -88
- package/vite/mod.ts +0 -76
- package/vite/utils/routing.ts +0 -26
|
@@ -0,0 +1,674 @@
|
|
|
1
|
+
import { i as JSX } from "./types-WOJV0N2h.mjs";
|
|
2
|
+
import { n as EURL, t as Component } from "./component-DjUmyVqL.mjs";
|
|
3
|
+
import { Context } from "hono";
|
|
4
|
+
import { Env, MiddlewareHandler } from "hono/types";
|
|
5
|
+
|
|
6
|
+
//#region core/router-shared.d.ts
|
|
7
|
+
interface NavigateOptions {
|
|
8
|
+
replace?: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface Navigate {
|
|
11
|
+
(href: string, options?: NavigateOptions): Promise<void>;
|
|
12
|
+
readonly isNavigating: boolean;
|
|
13
|
+
}
|
|
14
|
+
type LinkPrefetchMode = 'focus' | 'hover' | 'intent' | 'none';
|
|
15
|
+
interface RouteLocation {
|
|
16
|
+
readonly hash: string;
|
|
17
|
+
readonly href: string;
|
|
18
|
+
readonly pathname: string;
|
|
19
|
+
readonly search: string;
|
|
20
|
+
}
|
|
21
|
+
type RouteParams = Record<string, string | string[] | undefined>;
|
|
22
|
+
interface StaticPath {
|
|
23
|
+
params: RouteParams;
|
|
24
|
+
}
|
|
25
|
+
type GetStaticPaths = () => StaticPath[] | Promise<StaticPath[]>;
|
|
26
|
+
interface RoutePathSegment {
|
|
27
|
+
kind: 'static' | 'required' | 'optional' | 'rest';
|
|
28
|
+
value: string;
|
|
29
|
+
}
|
|
30
|
+
interface RouteModuleManifest {
|
|
31
|
+
error: string | null;
|
|
32
|
+
hasMiddleware: boolean;
|
|
33
|
+
layouts: string[];
|
|
34
|
+
loading: string | null;
|
|
35
|
+
notFound: string | null;
|
|
36
|
+
page: string | null;
|
|
37
|
+
routePath: string;
|
|
38
|
+
segments: RoutePathSegment[];
|
|
39
|
+
server: string | null;
|
|
40
|
+
}
|
|
41
|
+
type RouteManifest = RouteModuleManifest[];
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region core/serialize.d.ts
|
|
44
|
+
interface SerializedUndefined {
|
|
45
|
+
__eclipsa_type: 'undefined';
|
|
46
|
+
}
|
|
47
|
+
interface SerializedObject {
|
|
48
|
+
__eclipsa_type: 'object';
|
|
49
|
+
entries: [string, SerializedValue][];
|
|
50
|
+
}
|
|
51
|
+
interface SerializedMap {
|
|
52
|
+
__eclipsa_type: 'map';
|
|
53
|
+
entries: [SerializedValue, SerializedValue][];
|
|
54
|
+
}
|
|
55
|
+
interface SerializedSet {
|
|
56
|
+
__eclipsa_type: 'set';
|
|
57
|
+
entries: SerializedValue[];
|
|
58
|
+
}
|
|
59
|
+
interface SerializedReference {
|
|
60
|
+
__eclipsa_type: 'ref';
|
|
61
|
+
data?: SerializedValue;
|
|
62
|
+
kind: string;
|
|
63
|
+
token: string;
|
|
64
|
+
}
|
|
65
|
+
type SerializedValue = SerializedUndefined | SerializedObject | SerializedMap | SerializedSet | SerializedReference | null | boolean | number | string | SerializedValue[];
|
|
66
|
+
interface SerializeValueOptions {
|
|
67
|
+
maxDepth?: number;
|
|
68
|
+
maxEntries?: number;
|
|
69
|
+
serializeReference?: (value: unknown) => SerializedReference | null;
|
|
70
|
+
}
|
|
71
|
+
interface DeserializeValueOptions {
|
|
72
|
+
deserializeReference?: (value: SerializedReference) => unknown;
|
|
73
|
+
maxDepth?: number;
|
|
74
|
+
maxEntries?: number;
|
|
75
|
+
}
|
|
76
|
+
declare const serializeValue: (value: unknown, options?: SerializeValueOptions) => SerializedValue;
|
|
77
|
+
declare const deserializeValue: (value: SerializedValue, options?: DeserializeValueOptions) => unknown;
|
|
78
|
+
declare const escapeJSONScriptText: (json: string) => string;
|
|
79
|
+
declare const escapeInlineScriptText: (script: string) => string;
|
|
80
|
+
declare const serializeJSONScriptContent: (value: unknown, options?: SerializeValueOptions) => string;
|
|
81
|
+
declare const parseSerializedJSON: (json: string) => SerializedValue;
|
|
82
|
+
//#endregion
|
|
83
|
+
//#region core/hooks.d.ts
|
|
84
|
+
declare const APP_HOOKS_ELEMENT_ID = "eclipsa-app-hooks";
|
|
85
|
+
interface AppVariables {}
|
|
86
|
+
interface PublicErrorShape {
|
|
87
|
+
message: string;
|
|
88
|
+
[key: string]: unknown;
|
|
89
|
+
}
|
|
90
|
+
interface PublicError extends PublicErrorShape {}
|
|
91
|
+
interface AppHooksManifest {
|
|
92
|
+
client: string | null;
|
|
93
|
+
}
|
|
94
|
+
type RequestFetch = typeof fetch;
|
|
95
|
+
type BaseAppVariables = AppVariables & {
|
|
96
|
+
fetch: RequestFetch;
|
|
97
|
+
};
|
|
98
|
+
interface AppEnv extends Env {
|
|
99
|
+
Variables: BaseAppVariables;
|
|
100
|
+
}
|
|
101
|
+
type EnvVariables<E extends Env> = E extends {
|
|
102
|
+
Variables: infer Variables;
|
|
103
|
+
} ? Variables : {};
|
|
104
|
+
type WithAppEnv<E extends Env = Env> = Omit<E, 'Variables'> & {
|
|
105
|
+
Variables: EnvVariables<E> & BaseAppVariables;
|
|
106
|
+
};
|
|
107
|
+
type AppContext<E extends Env = Env> = Context<WithAppEnv<E>>;
|
|
108
|
+
interface HandleResolveOptions {
|
|
109
|
+
pathname?: string;
|
|
110
|
+
}
|
|
111
|
+
type HandleResolve<E extends Env = Env> = (context?: AppContext<E>, options?: HandleResolveOptions) => Promise<Response>;
|
|
112
|
+
type Handle<E extends Env = Env> = (context: AppContext<E>, resolve: HandleResolve<E>) => Response | Promise<Response>;
|
|
113
|
+
type HandleFetch<E extends Env = Env> = (context: AppContext<E>, request: Request, fetch: RequestFetch) => Response | Promise<Response>;
|
|
114
|
+
interface HandleErrorInput<E extends Env = Env> {
|
|
115
|
+
context: AppContext<E>;
|
|
116
|
+
error: unknown;
|
|
117
|
+
event: 'action' | 'handle' | 'loader' | 'middleware' | 'page' | 'server' | 'transport';
|
|
118
|
+
}
|
|
119
|
+
type HandleError<E extends Env = Env> = (input: HandleErrorInput<E>) => PublicError | void | Promise<PublicError | void>;
|
|
120
|
+
type Reroute = (input: {
|
|
121
|
+
request: Request | null;
|
|
122
|
+
url: URL;
|
|
123
|
+
}) => string | URL | void;
|
|
124
|
+
interface TransportHook {
|
|
125
|
+
decode: (value: unknown) => unknown;
|
|
126
|
+
encode: (value: unknown) => unknown;
|
|
127
|
+
}
|
|
128
|
+
type Transport = Record<string, TransportHook>;
|
|
129
|
+
type ServerInit = () => void | Promise<void>;
|
|
130
|
+
interface ServerHooksModule<E extends Env = Env> {
|
|
131
|
+
handle?: Handle<E>;
|
|
132
|
+
handleError?: HandleError<E>;
|
|
133
|
+
handleFetch?: HandleFetch<E>;
|
|
134
|
+
init?: ServerInit;
|
|
135
|
+
}
|
|
136
|
+
interface AppHooksModule {
|
|
137
|
+
reroute?: Reroute;
|
|
138
|
+
transport?: Transport;
|
|
139
|
+
}
|
|
140
|
+
interface ResolvedHooks<E extends Env = Env> {
|
|
141
|
+
app: AppHooksModule;
|
|
142
|
+
server: ServerHooksModule<E>;
|
|
143
|
+
}
|
|
144
|
+
declare const serializePublicValue: (value: unknown, options?: SerializeValueOptions) => SerializedValue;
|
|
145
|
+
declare const deserializePublicValue: (value: SerializedValue, options?: DeserializeValueOptions) => unknown;
|
|
146
|
+
declare const withServerRequestContext: <T>(context: AppContext<any>, hooks: {
|
|
147
|
+
handleError?: HandleError<any>;
|
|
148
|
+
transport?: Transport;
|
|
149
|
+
}, fn: () => T) => T;
|
|
150
|
+
declare const getCurrentServerRequestContext: () => AppContext<any> | null;
|
|
151
|
+
declare const transformCurrentPublicError: (error: unknown, event: HandleErrorInput<any>["event"]) => Promise<unknown>;
|
|
152
|
+
declare const createRequestFetch: (context: AppContext<any>, handleFetch?: HandleFetch<any>) => RequestFetch;
|
|
153
|
+
declare const attachRequestFetch: <E extends Env>(context: AppContext<E>, fetchImpl: RequestFetch) => void;
|
|
154
|
+
declare const resolveReroute: (reroute: Reroute | undefined, request: Request | null, pathname: string, baseUrl: string) => string;
|
|
155
|
+
declare const toPublicError: (error: unknown) => PublicError;
|
|
156
|
+
declare const markPublicError: <T>(error: T, publicError: PublicError) => T;
|
|
157
|
+
declare const runHandleError: (hooks: {
|
|
158
|
+
handleError?: HandleError<any>;
|
|
159
|
+
}, input: HandleErrorInput<any>) => Promise<PublicError>;
|
|
160
|
+
declare const registerClientHooks: (hooks: AppHooksModule) => void;
|
|
161
|
+
declare const getClientHooks: () => AppHooksModule;
|
|
162
|
+
declare const resetClientHooks: () => void;
|
|
163
|
+
//#endregion
|
|
164
|
+
//#region core/metadata.d.ts
|
|
165
|
+
declare const ROUTE_METADATA_HEAD_ATTR = "data-e-metadata";
|
|
166
|
+
interface MetadataContext {
|
|
167
|
+
params: RouteParams;
|
|
168
|
+
url: URL;
|
|
169
|
+
}
|
|
170
|
+
interface OpenGraphMetadata {
|
|
171
|
+
description?: string;
|
|
172
|
+
images?: string[];
|
|
173
|
+
title?: string;
|
|
174
|
+
type?: string;
|
|
175
|
+
url?: string;
|
|
176
|
+
}
|
|
177
|
+
interface TwitterMetadata {
|
|
178
|
+
card?: string;
|
|
179
|
+
description?: string;
|
|
180
|
+
images?: string[];
|
|
181
|
+
title?: string;
|
|
182
|
+
}
|
|
183
|
+
interface RouteMetadata {
|
|
184
|
+
canonical?: string;
|
|
185
|
+
description?: string;
|
|
186
|
+
openGraph?: OpenGraphMetadata;
|
|
187
|
+
title?: string;
|
|
188
|
+
twitter?: TwitterMetadata;
|
|
189
|
+
}
|
|
190
|
+
type RouteMetadataValue = RouteMetadata | null | undefined;
|
|
191
|
+
type RouteMetadataResolver = (ctx: MetadataContext) => RouteMetadataValue;
|
|
192
|
+
type RouteMetadataExport = RouteMetadataValue | RouteMetadataResolver;
|
|
193
|
+
declare const resolveRouteMetadata: (value: RouteMetadataExport, ctx: MetadataContext) => RouteMetadata | null;
|
|
194
|
+
declare const composeRouteMetadata: (values: RouteMetadataExport[], ctx: MetadataContext) => RouteMetadata | null;
|
|
195
|
+
declare const renderRouteMetadataHead: (metadata: RouteMetadata | null) => JSX.Element[];
|
|
196
|
+
//#endregion
|
|
197
|
+
//#region core/runtime.d.ts
|
|
198
|
+
declare const RESUME_FINAL_STATE_ELEMENT_ID = "eclipsa-resume-final";
|
|
199
|
+
interface ResumeComponentPayload {
|
|
200
|
+
optimizedRoot?: boolean;
|
|
201
|
+
props: SerializedValue;
|
|
202
|
+
projectionSlots?: Record<string, number>;
|
|
203
|
+
scope: string;
|
|
204
|
+
signalIds: string[];
|
|
205
|
+
symbol: string;
|
|
206
|
+
visibleCount: number;
|
|
207
|
+
watchCount: number;
|
|
208
|
+
}
|
|
209
|
+
interface ResumeWatchPayload {
|
|
210
|
+
componentId: string;
|
|
211
|
+
mode: WatchMode;
|
|
212
|
+
scope: string;
|
|
213
|
+
signals: string[];
|
|
214
|
+
symbol: string;
|
|
215
|
+
}
|
|
216
|
+
interface ResumeActionPayload {
|
|
217
|
+
error: SerializedValue;
|
|
218
|
+
input: SerializedValue;
|
|
219
|
+
result: SerializedValue;
|
|
220
|
+
}
|
|
221
|
+
interface ResumeVisiblePayload {
|
|
222
|
+
componentId: string;
|
|
223
|
+
scope: string;
|
|
224
|
+
symbol: string;
|
|
225
|
+
}
|
|
226
|
+
interface ResumeLoaderPayload {
|
|
227
|
+
data: SerializedValue;
|
|
228
|
+
error: SerializedValue;
|
|
229
|
+
loaded: boolean;
|
|
230
|
+
}
|
|
231
|
+
interface LoaderSnapshot {
|
|
232
|
+
data: unknown;
|
|
233
|
+
error: unknown;
|
|
234
|
+
loaded: boolean;
|
|
235
|
+
}
|
|
236
|
+
interface ResumePayload {
|
|
237
|
+
actions: Record<string, ResumeActionPayload>;
|
|
238
|
+
components: Record<string, ResumeComponentPayload>;
|
|
239
|
+
loaders: Record<string, ResumeLoaderPayload>;
|
|
240
|
+
scopes: Record<string, SerializedValue[]>;
|
|
241
|
+
signals: Record<string, SerializedValue>;
|
|
242
|
+
subscriptions: Record<string, string[]>;
|
|
243
|
+
symbols: Record<string, string>;
|
|
244
|
+
visibles: Record<string, ResumeVisiblePayload>;
|
|
245
|
+
watches: Record<string, ResumeWatchPayload>;
|
|
246
|
+
}
|
|
247
|
+
interface SignalRecord<T = unknown> {
|
|
248
|
+
effects: Set<ReactiveEffect>;
|
|
249
|
+
handle: {
|
|
250
|
+
value: T;
|
|
251
|
+
};
|
|
252
|
+
id: string;
|
|
253
|
+
subscribers: Set<string>;
|
|
254
|
+
value: T;
|
|
255
|
+
}
|
|
256
|
+
type CleanupCallback = () => void;
|
|
257
|
+
type RuntimeContextToken<T = unknown> = symbol & {
|
|
258
|
+
__eclipsa_context_type__?: T;
|
|
259
|
+
};
|
|
260
|
+
interface CleanupSlot {
|
|
261
|
+
callbacks: CleanupCallback[];
|
|
262
|
+
}
|
|
263
|
+
interface ComponentState {
|
|
264
|
+
active: boolean;
|
|
265
|
+
activateModeOnFlush?: 'patch' | 'replace';
|
|
266
|
+
didMount: boolean;
|
|
267
|
+
end?: Comment;
|
|
268
|
+
id: string;
|
|
269
|
+
mountCleanupSlots: CleanupSlot[];
|
|
270
|
+
optimizedRoot?: boolean;
|
|
271
|
+
parentId: string | null;
|
|
272
|
+
prefersEffectOnlyLocalSignalWrites?: boolean;
|
|
273
|
+
props: unknown;
|
|
274
|
+
projectionSlots: Record<string, number> | null;
|
|
275
|
+
rawProps?: Record<string, unknown> | null;
|
|
276
|
+
renderEffectCleanupSlot: CleanupSlot;
|
|
277
|
+
reuseExistingDomOnActivate?: boolean;
|
|
278
|
+
reuseProjectionSlotDomOnActivate?: boolean;
|
|
279
|
+
scopeId: string;
|
|
280
|
+
signalIds: string[];
|
|
281
|
+
start?: Comment;
|
|
282
|
+
symbol: string;
|
|
283
|
+
suspensePromise?: Promise<unknown> | null;
|
|
284
|
+
visibleCount: number;
|
|
285
|
+
watchCount: number;
|
|
286
|
+
}
|
|
287
|
+
interface RouterState {
|
|
288
|
+
currentPath: {
|
|
289
|
+
value: string;
|
|
290
|
+
};
|
|
291
|
+
currentRoute: LoadedRoute | null;
|
|
292
|
+
currentUrl: {
|
|
293
|
+
value: string;
|
|
294
|
+
};
|
|
295
|
+
defaultTitle: string;
|
|
296
|
+
isNavigating: {
|
|
297
|
+
value: boolean;
|
|
298
|
+
};
|
|
299
|
+
loadedRoutes: Map<string, LoadedRoute>;
|
|
300
|
+
location: RouteLocation;
|
|
301
|
+
manifest: RouteManifest;
|
|
302
|
+
navigate: Navigate;
|
|
303
|
+
prefetchedLoaders: Map<string, Map<string, LoaderSnapshot>>;
|
|
304
|
+
routeModuleBusts: Map<string, number>;
|
|
305
|
+
routePrefetches: Map<string, Promise<RoutePrefetchResult>>;
|
|
306
|
+
sequence: number;
|
|
307
|
+
}
|
|
308
|
+
interface RuntimeContainer {
|
|
309
|
+
actions: Map<string, unknown>;
|
|
310
|
+
actionStates: Map<string, {
|
|
311
|
+
error: unknown;
|
|
312
|
+
input: unknown;
|
|
313
|
+
result: unknown;
|
|
314
|
+
}>;
|
|
315
|
+
components: Map<string, ComponentState>;
|
|
316
|
+
dirty: Set<string>;
|
|
317
|
+
dirtyFlushQueued: boolean;
|
|
318
|
+
doc?: Document;
|
|
319
|
+
eventDispatchPromise: Promise<void> | null;
|
|
320
|
+
id: string;
|
|
321
|
+
imports: Map<string, Promise<RuntimeSymbolModule>>;
|
|
322
|
+
interactivePrefetchCheckQueued: boolean;
|
|
323
|
+
loaderStates: Map<string, {
|
|
324
|
+
data: unknown;
|
|
325
|
+
error: unknown;
|
|
326
|
+
loaded: boolean;
|
|
327
|
+
}>;
|
|
328
|
+
loaders: Map<string, unknown>;
|
|
329
|
+
nextComponentId: number;
|
|
330
|
+
nextElementId: number;
|
|
331
|
+
nextScopeId: number;
|
|
332
|
+
nextSignalId: number;
|
|
333
|
+
pendingSuspensePromises: Set<Promise<unknown>>;
|
|
334
|
+
resumeReadyPromise: Promise<void> | null;
|
|
335
|
+
rootChildCursor: number;
|
|
336
|
+
rootElement?: HTMLElement;
|
|
337
|
+
router: RouterState | null;
|
|
338
|
+
asyncSignalStates: Map<string, unknown>;
|
|
339
|
+
asyncSignalSnapshotCache: Map<string, unknown>;
|
|
340
|
+
atoms: WeakMap<object, string>;
|
|
341
|
+
nextAtomId: number;
|
|
342
|
+
scopes: Map<string, SerializedValue[]>;
|
|
343
|
+
signals: Map<string, SignalRecord>;
|
|
344
|
+
symbols: Map<string, string>;
|
|
345
|
+
visibilityListenersCleanup: (() => void) | null;
|
|
346
|
+
visibilityCheckQueued: boolean;
|
|
347
|
+
visibles: Map<string, VisibleState>;
|
|
348
|
+
watches: Map<string, WatchState>;
|
|
349
|
+
}
|
|
350
|
+
interface RuntimeSymbolModule {
|
|
351
|
+
default: (scope: unknown[], propsOrArg?: unknown, ...args: unknown[]) => unknown;
|
|
352
|
+
}
|
|
353
|
+
interface ReactiveEffect {
|
|
354
|
+
fn: () => void;
|
|
355
|
+
signals: Set<SignalRecord>;
|
|
356
|
+
}
|
|
357
|
+
type WatchMode = 'dynamic' | 'explicit';
|
|
358
|
+
type RouteRenderer = (props: unknown) => unknown;
|
|
359
|
+
interface LoadedRouteModule {
|
|
360
|
+
metadata: RouteMetadataExport | null;
|
|
361
|
+
renderer: RouteRenderer;
|
|
362
|
+
symbol: string | null;
|
|
363
|
+
url: string;
|
|
364
|
+
}
|
|
365
|
+
interface LoadedRoute {
|
|
366
|
+
entry: RouteModuleManifest;
|
|
367
|
+
error: unknown;
|
|
368
|
+
layouts: LoadedRouteModule[];
|
|
369
|
+
params: RouteParams;
|
|
370
|
+
pathname: string;
|
|
371
|
+
page: LoadedRouteModule;
|
|
372
|
+
render: RouteRenderer;
|
|
373
|
+
}
|
|
374
|
+
interface RouteDataSuccess {
|
|
375
|
+
finalHref: string;
|
|
376
|
+
finalPathname: string;
|
|
377
|
+
kind: 'page' | 'not-found';
|
|
378
|
+
loaders: Record<string, ResumeLoaderPayload>;
|
|
379
|
+
ok: true;
|
|
380
|
+
}
|
|
381
|
+
interface RouteDataRedirect {
|
|
382
|
+
location: string;
|
|
383
|
+
ok: false;
|
|
384
|
+
}
|
|
385
|
+
interface RouteDataDocumentFallback {
|
|
386
|
+
document: true;
|
|
387
|
+
ok: false;
|
|
388
|
+
}
|
|
389
|
+
type RouteDataResponse = RouteDataSuccess | RouteDataRedirect | RouteDataDocumentFallback;
|
|
390
|
+
type RoutePrefetchResult = RouteDataResponse;
|
|
391
|
+
interface WatchState {
|
|
392
|
+
cleanupSlot: CleanupSlot;
|
|
393
|
+
componentId: string;
|
|
394
|
+
effect: ReactiveEffect;
|
|
395
|
+
id: string;
|
|
396
|
+
mode: WatchMode;
|
|
397
|
+
pending: Promise<void> | null;
|
|
398
|
+
run: (() => void) | null;
|
|
399
|
+
scopeId: string;
|
|
400
|
+
symbol: string;
|
|
401
|
+
track: (() => void) | null;
|
|
402
|
+
}
|
|
403
|
+
interface VisibleState {
|
|
404
|
+
cleanupSlot: CleanupSlot;
|
|
405
|
+
componentId: string;
|
|
406
|
+
done: boolean;
|
|
407
|
+
id: string;
|
|
408
|
+
pending: Promise<void> | null;
|
|
409
|
+
run: (() => void | Promise<void>) | null;
|
|
410
|
+
scopeId: string;
|
|
411
|
+
symbol: string;
|
|
412
|
+
}
|
|
413
|
+
declare const getRuntimeComponentId: () => string | null;
|
|
414
|
+
//#endregion
|
|
415
|
+
//#region core/action.d.ts
|
|
416
|
+
declare const ACTION_CONTENT_TYPE = "application/eclipsa-action+json";
|
|
417
|
+
declare const ACTION_FORM_ATTR = "data-e-action-form";
|
|
418
|
+
declare const ACTION_FORM_FIELD = "__e_action";
|
|
419
|
+
declare const ACTION_REF_BRAND: unique symbol;
|
|
420
|
+
declare const ACTION_INPUT_TYPE: unique symbol;
|
|
421
|
+
interface StandardSchemaIssue {
|
|
422
|
+
message: string;
|
|
423
|
+
path?: ReadonlyArray<PropertyKey | {
|
|
424
|
+
readonly key: PropertyKey;
|
|
425
|
+
}>;
|
|
426
|
+
}
|
|
427
|
+
type StandardSchemaResult<T> = {
|
|
428
|
+
issues: readonly StandardSchemaIssue[];
|
|
429
|
+
} | {
|
|
430
|
+
issues?: undefined;
|
|
431
|
+
value: T;
|
|
432
|
+
};
|
|
433
|
+
interface StandardSchemaV1<Input = unknown, Output = Input> {
|
|
434
|
+
readonly '~standard': {
|
|
435
|
+
readonly validate: (value: unknown, options?: {
|
|
436
|
+
readonly libraryOptions?: Record<string, unknown>;
|
|
437
|
+
}) => StandardSchemaResult<Output> | Promise<StandardSchemaResult<Output>>;
|
|
438
|
+
readonly types?: {
|
|
439
|
+
readonly input: Input;
|
|
440
|
+
readonly output: Output;
|
|
441
|
+
} | undefined;
|
|
442
|
+
readonly vendor: string;
|
|
443
|
+
readonly version: 1;
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
type InferStandardSchemaInput<Schema extends StandardSchemaV1<any, any>> = NonNullable<Schema['~standard']['types']>['input'];
|
|
447
|
+
type InferStandardSchemaOutput<Schema extends StandardSchemaV1<any, any>> = NonNullable<Schema['~standard']['types']>['output'];
|
|
448
|
+
interface OpaqueSignalRef {
|
|
449
|
+
readonly [ACTION_REF_BRAND]?: 'signal';
|
|
450
|
+
readonly containerId: string | null;
|
|
451
|
+
readonly kind: 'signal-ref';
|
|
452
|
+
readonly token: string;
|
|
453
|
+
}
|
|
454
|
+
interface OpaqueDomRef {
|
|
455
|
+
readonly [ACTION_REF_BRAND]?: 'dom';
|
|
456
|
+
readonly containerId: string | null;
|
|
457
|
+
readonly kind: 'dom-ref';
|
|
458
|
+
readonly token: string;
|
|
459
|
+
}
|
|
460
|
+
type ActionOpaqueRef = OpaqueSignalRef | OpaqueDomRef;
|
|
461
|
+
type MiddlewareEnv$1<T> = T extends {
|
|
462
|
+
readonly __eclipsa_action_env__?: infer MiddlewareEnv;
|
|
463
|
+
} ? Exclude<MiddlewareEnv$1, undefined> extends Env ? WithAppEnv<Exclude<MiddlewareEnv$1, undefined>> : {} : T extends MiddlewareHandler<infer MiddlewareEnv, any, any> ? WithAppEnv<MiddlewareEnv$1> : WithAppEnv<Env>;
|
|
464
|
+
type ActionEnv<Middlewares extends readonly ActionMiddleware<any>[]> = Middlewares extends readonly [infer Head, ...infer Tail] ? Tail extends readonly ActionMiddleware<any>[] ? MiddlewareEnv$1<Head> & ActionEnv<Tail> : MiddlewareEnv$1<Head> : WithAppEnv<Env>;
|
|
465
|
+
type MiddlewareActionInput<T> = T extends {
|
|
466
|
+
readonly [ACTION_INPUT_TYPE]?: infer Input;
|
|
467
|
+
} ? Exclude<Input, undefined> : never;
|
|
468
|
+
type ActionInput<Middlewares extends readonly ActionMiddleware<any>[]> = [MiddlewareActionInput<Middlewares[number]>] extends [never] ? unknown : MiddlewareActionInput<Middlewares[number]>;
|
|
469
|
+
type ResolvedActionOutput<Output> = Awaited<Output>;
|
|
470
|
+
type ActionStreamYield<Output> = ResolvedActionOutput<Output> extends AsyncIterable<infer Value> ? Value : ResolvedActionOutput<Output> extends ReadableStream<infer Value> ? Value : ResolvedActionOutput<Output>;
|
|
471
|
+
type ActionInvokeResult<Output> = ResolvedActionOutput<Output> extends AsyncIterable<infer Value> ? AsyncGenerator<Value, void, void> : Promise<ResolvedActionOutput<Output>>;
|
|
472
|
+
type ActionInvoker<Input, Result> = unknown extends Input ? (input?: Input | FormData) => Result : undefined extends Input ? (input?: Input | FormData) => Result : (input: Input | FormData) => Result;
|
|
473
|
+
interface ActionSubmission<Input, Output> {
|
|
474
|
+
readonly error: unknown;
|
|
475
|
+
readonly input: Input;
|
|
476
|
+
readonly result: Output | undefined;
|
|
477
|
+
}
|
|
478
|
+
interface ActionFormProps extends Record<string, unknown> {
|
|
479
|
+
children?: JSX.Element | JSX.Element[];
|
|
480
|
+
}
|
|
481
|
+
interface ActionHandle<Input, Output, InvokeResult = Promise<Output>> {
|
|
482
|
+
Form: (props: ActionFormProps) => JSX.Element;
|
|
483
|
+
action: ActionInvoker<Input, InvokeResult>;
|
|
484
|
+
readonly error: unknown;
|
|
485
|
+
readonly formActionId: string;
|
|
486
|
+
readonly isPending: boolean;
|
|
487
|
+
readonly lastSubmission: ActionSubmission<Input, Output> | undefined;
|
|
488
|
+
readonly result: Output | undefined;
|
|
489
|
+
}
|
|
490
|
+
interface ActionMiddleware<E extends Env = Env> extends MiddlewareHandler<E> {
|
|
491
|
+
readonly __eclipsa_action_env__?: E;
|
|
492
|
+
}
|
|
493
|
+
interface ActionValidatorMiddleware<Input, Output> extends ActionMiddleware<{
|
|
494
|
+
Variables: {
|
|
495
|
+
input: Output;
|
|
496
|
+
};
|
|
497
|
+
}> {
|
|
498
|
+
readonly [ACTION_INPUT_TYPE]?: Input;
|
|
499
|
+
}
|
|
500
|
+
type ActionHandler<E extends Env = Env, Output = unknown> = (c: AppContext<E>) => Output | Promise<Output>;
|
|
501
|
+
type ActionHandlerOutput<Handler extends (...args: any[]) => unknown> = Awaited<ReturnType<Handler>>;
|
|
502
|
+
type ActionUse<Middlewares extends readonly ActionMiddleware<any>[], Handler extends ActionHandler<any, any>> = () => ActionHandle<ActionInput<Middlewares>, ActionStreamYield<ActionHandlerOutput<Handler>>, ActionInvokeResult<ActionHandlerOutput<Handler>>>;
|
|
503
|
+
interface ActionFactory {
|
|
504
|
+
<Handler extends ActionHandler<{}, any>>(handler: Handler): ActionUse<[], Handler>;
|
|
505
|
+
<M1 extends ActionMiddleware<any>, Handler extends ActionHandler<ActionEnv<[M1]>, any>>(middleware1: M1, handler: Handler): ActionUse<[M1], Handler>;
|
|
506
|
+
<M1 extends ActionMiddleware<any>, M2 extends ActionMiddleware<any>, Handler extends ActionHandler<ActionEnv<[M1, M2]>, any>>(middleware1: M1, middleware2: M2, handler: Handler): ActionUse<[M1, M2], Handler>;
|
|
507
|
+
<M1 extends ActionMiddleware<any>, M2 extends ActionMiddleware<any>, M3 extends ActionMiddleware<any>, Handler extends ActionHandler<ActionEnv<[M1, M2, M3]>, any>>(middleware1: M1, middleware2: M2, middleware3: M3, handler: Handler): ActionUse<[M1, M2, M3], Handler>;
|
|
508
|
+
<M1 extends ActionMiddleware<any>, M2 extends ActionMiddleware<any>, M3 extends ActionMiddleware<any>, M4 extends ActionMiddleware<any>, Handler extends ActionHandler<ActionEnv<[M1, M2, M3, M4]>, any>>(middleware1: M1, middleware2: M2, middleware3: M3, middleware4: M4, handler: Handler): ActionUse<[M1, M2, M3, M4], Handler>;
|
|
509
|
+
<M1 extends ActionMiddleware<any>, M2 extends ActionMiddleware<any>, M3 extends ActionMiddleware<any>, M4 extends ActionMiddleware<any>, M5 extends ActionMiddleware<any>, Handler extends ActionHandler<ActionEnv<[M1, M2, M3, M4, M5]>, any>>(middleware1: M1, middleware2: M2, middleware3: M3, middleware4: M4, middleware5: M5, handler: Handler): ActionUse<[M1, M2, M3, M4, M5], Handler>;
|
|
510
|
+
}
|
|
511
|
+
interface ActionStateSnapshot {
|
|
512
|
+
error: unknown;
|
|
513
|
+
input: unknown;
|
|
514
|
+
result: unknown;
|
|
515
|
+
}
|
|
516
|
+
interface ActionExecutionValue {
|
|
517
|
+
input: unknown;
|
|
518
|
+
kind: 'value';
|
|
519
|
+
value: unknown;
|
|
520
|
+
}
|
|
521
|
+
interface ActionExecutionResponse {
|
|
522
|
+
input: unknown;
|
|
523
|
+
kind: 'response';
|
|
524
|
+
response: Response;
|
|
525
|
+
}
|
|
526
|
+
type ActionExecutionResult = ActionExecutionResponse | ActionExecutionValue;
|
|
527
|
+
declare const getNormalizedActionInput: (c: AppContext<any>) => Promise<unknown>;
|
|
528
|
+
declare const getActionFormSubmissionId: (c: AppContext<any>) => Promise<string | null>;
|
|
529
|
+
declare const executeActionSubmission: (id: string, c: AppContext<any>) => Promise<ActionExecutionResult>;
|
|
530
|
+
declare const primeActionState: (container: RuntimeContainer, id: string, snapshot: ActionStateSnapshot) => void;
|
|
531
|
+
declare const action: ActionFactory;
|
|
532
|
+
declare const validator: <Schema extends StandardSchemaV1<any, any>>(schema: Schema) => ActionValidatorMiddleware<InferStandardSchemaInput<Schema>, InferStandardSchemaOutput<Schema>>;
|
|
533
|
+
declare function registerAction<Output>(id: string, middlewares: readonly [], handler: ActionHandler<{}, Output>): void;
|
|
534
|
+
declare function registerAction<M1 extends ActionMiddleware<any>, Output>(id: string, middlewares: readonly [M1], handler: ActionHandler<ActionEnv<[M1]>, Output>): void;
|
|
535
|
+
declare function registerAction<M1 extends ActionMiddleware<any>, M2 extends ActionMiddleware<any>, Output>(id: string, middlewares: readonly [M1, M2], handler: ActionHandler<ActionEnv<[M1, M2]>, Output>): void;
|
|
536
|
+
declare function registerAction<M1 extends ActionMiddleware<any>, M2 extends ActionMiddleware<any>, M3 extends ActionMiddleware<any>, Output>(id: string, middlewares: readonly [M1, M2, M3], handler: ActionHandler<ActionEnv<[M1, M2, M3]>, Output>): void;
|
|
537
|
+
declare function registerAction<M1 extends ActionMiddleware<any>, M2 extends ActionMiddleware<any>, M3 extends ActionMiddleware<any>, M4 extends ActionMiddleware<any>, Output>(id: string, middlewares: readonly [M1, M2, M3, M4], handler: ActionHandler<ActionEnv<[M1, M2, M3, M4]>, Output>): void;
|
|
538
|
+
declare function registerAction<M1 extends ActionMiddleware<any>, M2 extends ActionMiddleware<any>, M3 extends ActionMiddleware<any>, M4 extends ActionMiddleware<any>, M5 extends ActionMiddleware<any>, Output>(id: string, middlewares: readonly [M1, M2, M3, M4, M5], handler: ActionHandler<ActionEnv<[M1, M2, M3, M4, M5]>, Output>): void;
|
|
539
|
+
declare const hasAction: (id: string) => boolean;
|
|
540
|
+
declare const executeAction: (id: string, c: AppContext<any>) => Promise<Response>;
|
|
541
|
+
declare const __eclipsaAction: <const Middlewares extends readonly ActionMiddleware<any>[], Handler extends ActionHandler<ActionEnv<Middlewares>, any>>(id: string, middlewares: readonly [...Middlewares], handler: Handler) => ActionUse<Middlewares, Handler>;
|
|
542
|
+
//#endregion
|
|
543
|
+
//#region core/loader.d.ts
|
|
544
|
+
declare const SSR_PENDING_LOADER_ERROR: unique symbol;
|
|
545
|
+
type MiddlewareEnv<T> = T extends {
|
|
546
|
+
readonly __eclipsa_loader_env__?: infer MiddlewareEnv;
|
|
547
|
+
} ? Exclude<MiddlewareEnv, undefined> extends Env ? WithAppEnv<Exclude<MiddlewareEnv, undefined>> : {} : T extends MiddlewareHandler<infer MiddlewareEnv, any, any> ? WithAppEnv<MiddlewareEnv> : WithAppEnv<Env>;
|
|
548
|
+
type LoaderEnv<Middlewares extends readonly LoaderMiddleware<any>[]> = Middlewares extends readonly [infer Head, ...infer Tail] ? Tail extends readonly LoaderMiddleware<any>[] ? MiddlewareEnv<Head> & LoaderEnv<Tail> : MiddlewareEnv<Head> : WithAppEnv<Env>;
|
|
549
|
+
interface LoaderHandle<Output> {
|
|
550
|
+
readonly data: Output | undefined;
|
|
551
|
+
readonly error: unknown;
|
|
552
|
+
readonly isLoading: boolean;
|
|
553
|
+
load: () => Promise<Output>;
|
|
554
|
+
}
|
|
555
|
+
interface LoaderMiddleware<E extends Env = Env> extends MiddlewareHandler<E> {
|
|
556
|
+
readonly __eclipsa_loader_env__?: E;
|
|
557
|
+
}
|
|
558
|
+
type LoaderHandler<E extends Env = Env, Output = unknown> = (c: AppContext<E>) => Output | Promise<Output>;
|
|
559
|
+
type LoaderUse<_Middlewares extends readonly LoaderMiddleware<any>[], Output> = () => LoaderHandle<Output>;
|
|
560
|
+
interface LoaderFactory {
|
|
561
|
+
<Output>(handler: LoaderHandler<{}, Output>): LoaderUse<[], Output>;
|
|
562
|
+
<M1 extends LoaderMiddleware<any>, Output>(middleware1: M1, handler: LoaderHandler<LoaderEnv<[M1]>, Output>): LoaderUse<[M1], Output>;
|
|
563
|
+
<M1 extends LoaderMiddleware<any>, M2 extends LoaderMiddleware<any>, Output>(middleware1: M1, middleware2: M2, handler: LoaderHandler<LoaderEnv<[M1, M2]>, Output>): LoaderUse<[M1, M2], Output>;
|
|
564
|
+
<M1 extends LoaderMiddleware<any>, M2 extends LoaderMiddleware<any>, M3 extends LoaderMiddleware<any>, Output>(middleware1: M1, middleware2: M2, middleware3: M3, handler: LoaderHandler<LoaderEnv<[M1, M2, M3]>, Output>): LoaderUse<[M1, M2, M3], Output>;
|
|
565
|
+
<M1 extends LoaderMiddleware<any>, M2 extends LoaderMiddleware<any>, M3 extends LoaderMiddleware<any>, M4 extends LoaderMiddleware<any>, Output>(middleware1: M1, middleware2: M2, middleware3: M3, middleware4: M4, handler: LoaderHandler<LoaderEnv<[M1, M2, M3, M4]>, Output>): LoaderUse<[M1, M2, M3, M4], Output>;
|
|
566
|
+
<M1 extends LoaderMiddleware<any>, M2 extends LoaderMiddleware<any>, M3 extends LoaderMiddleware<any>, M4 extends LoaderMiddleware<any>, M5 extends LoaderMiddleware<any>, Output>(middleware1: M1, middleware2: M2, middleware3: M3, middleware4: M4, middleware5: M5, handler: LoaderHandler<LoaderEnv<[M1, M2, M3, M4, M5]>, Output>): LoaderUse<[M1, M2, M3, M4, M5], Output>;
|
|
567
|
+
}
|
|
568
|
+
declare const markPendingSsrLoader: (container: RuntimeContainer, id: string) => void;
|
|
569
|
+
declare const consumePendingSsrLoaderIds: (container: RuntimeContainer) => string[];
|
|
570
|
+
declare const isPendingSsrLoaderError: (error: unknown) => error is typeof SSR_PENDING_LOADER_ERROR;
|
|
571
|
+
declare const loader: LoaderFactory;
|
|
572
|
+
declare function registerLoader<Output>(id: string, middlewares: readonly [], handler: LoaderHandler<{}, Output>): void;
|
|
573
|
+
declare function registerLoader<M1 extends LoaderMiddleware<any>, Output>(id: string, middlewares: readonly [M1], handler: LoaderHandler<LoaderEnv<[M1]>, Output>): void;
|
|
574
|
+
declare function registerLoader<M1 extends LoaderMiddleware<any>, M2 extends LoaderMiddleware<any>, Output>(id: string, middlewares: readonly [M1, M2], handler: LoaderHandler<LoaderEnv<[M1, M2]>, Output>): void;
|
|
575
|
+
declare function registerLoader<M1 extends LoaderMiddleware<any>, M2 extends LoaderMiddleware<any>, M3 extends LoaderMiddleware<any>, Output>(id: string, middlewares: readonly [M1, M2, M3], handler: LoaderHandler<LoaderEnv<[M1, M2, M3]>, Output>): void;
|
|
576
|
+
declare function registerLoader<M1 extends LoaderMiddleware<any>, M2 extends LoaderMiddleware<any>, M3 extends LoaderMiddleware<any>, M4 extends LoaderMiddleware<any>, Output>(id: string, middlewares: readonly [M1, M2, M3, M4], handler: LoaderHandler<LoaderEnv<[M1, M2, M3, M4]>, Output>): void;
|
|
577
|
+
declare function registerLoader<M1 extends LoaderMiddleware<any>, M2 extends LoaderMiddleware<any>, M3 extends LoaderMiddleware<any>, M4 extends LoaderMiddleware<any>, M5 extends LoaderMiddleware<any>, Output>(id: string, middlewares: readonly [M1, M2, M3, M4, M5], handler: LoaderHandler<LoaderEnv<[M1, M2, M3, M4, M5]>, Output>): void;
|
|
578
|
+
declare const hasLoader: (id: string) => boolean;
|
|
579
|
+
declare const executeLoader: (id: string, c: AppContext<any>) => Promise<Response>;
|
|
580
|
+
declare const primeLoaderState: (container: RuntimeContainer, id: string, c: AppContext<any>) => Promise<unknown>;
|
|
581
|
+
declare const resolvePendingLoaders: (container: RuntimeContainer, c: AppContext<any>) => Promise<boolean>;
|
|
582
|
+
declare const __eclipsaLoader: <const Middlewares extends readonly LoaderMiddleware<any>[], Output>(id: string, middlewares: readonly [...Middlewares], handler: LoaderHandler<LoaderEnv<Middlewares>, Output>) => () => LoaderHandle<Output>;
|
|
583
|
+
//#endregion
|
|
584
|
+
//#region core/internal.d.ts
|
|
585
|
+
declare const LAZY_META_KEY: unique symbol;
|
|
586
|
+
declare const WATCH_META_KEY: unique symbol;
|
|
587
|
+
interface ComponentMeta {
|
|
588
|
+
captures: () => unknown[];
|
|
589
|
+
optimizedRoot?: boolean;
|
|
590
|
+
projectionSlots?: Record<string, number>;
|
|
591
|
+
symbol: string;
|
|
592
|
+
}
|
|
593
|
+
interface ComponentOptions {
|
|
594
|
+
optimizedRoot?: boolean;
|
|
595
|
+
}
|
|
596
|
+
interface LazyMeta {
|
|
597
|
+
captures: () => unknown[];
|
|
598
|
+
eventName?: string;
|
|
599
|
+
symbol: string;
|
|
600
|
+
}
|
|
601
|
+
interface WatchMeta {
|
|
602
|
+
captures: () => unknown[];
|
|
603
|
+
symbol: string;
|
|
604
|
+
}
|
|
605
|
+
interface SignalMeta<T = unknown> {
|
|
606
|
+
get(): T;
|
|
607
|
+
id: string;
|
|
608
|
+
set(value: T): void;
|
|
609
|
+
}
|
|
610
|
+
interface NavigateMeta {
|
|
611
|
+
readonly kind: 'navigate';
|
|
612
|
+
}
|
|
613
|
+
interface ActionHandleMeta {
|
|
614
|
+
readonly id: string;
|
|
615
|
+
readonly kind: 'action';
|
|
616
|
+
}
|
|
617
|
+
interface ActionHookMeta {
|
|
618
|
+
readonly id: string;
|
|
619
|
+
readonly kind: 'action-hook';
|
|
620
|
+
}
|
|
621
|
+
interface LoaderHandleMeta {
|
|
622
|
+
readonly id: string;
|
|
623
|
+
readonly kind: 'loader';
|
|
624
|
+
}
|
|
625
|
+
interface LoaderHookMeta {
|
|
626
|
+
readonly id: string;
|
|
627
|
+
readonly kind: 'loader-hook';
|
|
628
|
+
}
|
|
629
|
+
interface EventDescriptor {
|
|
630
|
+
captures: () => unknown[];
|
|
631
|
+
eventName?: string;
|
|
632
|
+
symbol: string;
|
|
633
|
+
}
|
|
634
|
+
interface LazyReference<T extends (...args: any[]) => unknown = (...args: any[]) => unknown> extends Function {
|
|
635
|
+
(...args: Parameters<T>): ReturnType<T>;
|
|
636
|
+
[LAZY_META_KEY]?: LazyMeta;
|
|
637
|
+
}
|
|
638
|
+
interface WatchReference<T extends (...args: any[]) => unknown = (...args: any[]) => unknown> extends Function {
|
|
639
|
+
(...args: Parameters<T>): ReturnType<T>;
|
|
640
|
+
[WATCH_META_KEY]?: WatchMeta;
|
|
641
|
+
}
|
|
642
|
+
declare const __eclipsaComponent: <T>(component: Component<T>, symbol: string, captures: () => unknown[], projectionSlots?: Record<string, number>, options?: ComponentOptions) => Component<T>;
|
|
643
|
+
declare const __eclipsaLazy: <T extends (...args: any[]) => unknown>(symbol: string, fn: T, captures: () => unknown[]) => EURL<T>;
|
|
644
|
+
declare const __eclipsaWatch: <T extends (...args: any[]) => unknown>(symbol: string, fn: T, captures: () => unknown[]) => T;
|
|
645
|
+
declare const __eclipsaEvent: (eventName: string, symbol: string, captures: () => unknown[]) => EventDescriptor;
|
|
646
|
+
declare const getComponentMeta: (value: unknown) => ComponentMeta | null;
|
|
647
|
+
declare const getLazyMeta: (value: unknown) => LazyMeta | null;
|
|
648
|
+
declare const setNavigateMeta: <T extends Navigate>(target: T) => T;
|
|
649
|
+
declare const getNavigateMeta: (value: unknown) => NavigateMeta | null;
|
|
650
|
+
declare const setActionHookMeta: <T extends Function>(target: T, id: string) => T;
|
|
651
|
+
declare const getActionHookMeta: (value: unknown) => ActionHookMeta | null;
|
|
652
|
+
declare const setActionHandleMeta: <T extends object>(target: T, id: string) => T;
|
|
653
|
+
declare const getActionHandleMeta: (value: unknown) => ActionHandleMeta | null;
|
|
654
|
+
declare const setLoaderHookMeta: <T extends Function>(target: T, id: string) => T;
|
|
655
|
+
declare const getLoaderHookMeta: (value: unknown) => LoaderHookMeta | null;
|
|
656
|
+
declare const setLoaderHandleMeta: <T extends object>(target: T, id: string) => T;
|
|
657
|
+
declare const getLoaderHandleMeta: (value: unknown) => LoaderHandleMeta | null;
|
|
658
|
+
declare const registerActionHook: <T extends Function>(id: string, hook: T) => T;
|
|
659
|
+
declare const getRegisteredActionHook: <T extends Function>(id: string) => T | null;
|
|
660
|
+
declare const getRegisteredActionHookIds: () => string[];
|
|
661
|
+
declare const registerLoaderHook: <T extends Function>(id: string, hook: T) => T;
|
|
662
|
+
declare const getRegisteredLoaderHook: <T extends Function>(id: string) => T | null;
|
|
663
|
+
declare const getRegisteredLoaderHookIds: () => string[];
|
|
664
|
+
declare const getWatchMeta: (value: unknown) => WatchMeta | null;
|
|
665
|
+
declare const getEventMeta: (value: unknown) => EventDescriptor | LazyMeta | null;
|
|
666
|
+
declare const setSignalMeta: <T>(target: {
|
|
667
|
+
value: T;
|
|
668
|
+
}, meta: SignalMeta<T>) => {
|
|
669
|
+
value: T;
|
|
670
|
+
};
|
|
671
|
+
declare const getSignalMeta: <T>(value: unknown) => SignalMeta<T> | null;
|
|
672
|
+
//#endregion
|
|
673
|
+
export { resolvePendingLoaders as $, HandleErrorInput as $t, getSignalMeta as A, SerializedObject as An, RuntimeContainer as At, LoaderFactory as B, serializeValue as Bn, TwitterMetadata as Bt, getLoaderHandleMeta as C, serializePublicValue as Cn, getNormalizedActionInput as Ct, getRegisteredActionHookIds as D, DeserializeValueOptions as Dn, validator as Dt, getRegisteredActionHook as E, withServerRequestContext as En, registerAction as Et, setActionHookMeta as F, deserializeValue as Fn, ROUTE_METADATA_HEAD_ATTR as Ft, consumePendingSsrLoaderIds as G, RouteLocation as Gn, AppContext as Gt, LoaderHandler as H, LinkPrefetchMode as Hn, renderRouteMetadataHead as Ht, setLoaderHandleMeta as I, escapeInlineScriptText as In, RouteMetadata as It, isPendingSsrLoaderError as J, AppHooksModule as Jt, executeLoader as K, RouteParams as Kn, AppEnv as Kt, setLoaderHookMeta as L, escapeJSONScriptText as Ln, RouteMetadataExport as Lt, registerActionHook as M, SerializedSet as Mn, getRuntimeComponentId as Mt, registerLoaderHook as N, SerializedUndefined as Nn, MetadataContext as Nt, getRegisteredLoaderHook as O, SerializeValueOptions as On, RESUME_FINAL_STATE_ELEMENT_ID as Ot, setActionHandleMeta as P, SerializedValue as Pn, OpenGraphMetadata as Pt, registerLoader as Q, HandleError as Qt, setNavigateMeta as R, parseSerializedJSON as Rn, RouteMetadataResolver as Rt, getLazyMeta as S, runHandleError as Sn, getActionFormSubmissionId as St, getNavigateMeta as T, transformCurrentPublicError as Tn, primeActionState as Tt, LoaderMiddleware as U, Navigate as Un, resolveRouteMetadata as Ut, LoaderHandle as V, GetStaticPaths as Vn, composeRouteMetadata as Vt, __eclipsaLoader as W, NavigateOptions as Wn, APP_HOOKS_ELEMENT_ID as Wt, markPendingSsrLoader as X, BaseAppVariables as Xt, loader as Y, AppVariables as Yt, primeLoaderState as Z, Handle as Zt, __eclipsaWatch as _, getCurrentServerRequestContext as _n, StandardSchemaV1 as _t, EventDescriptor as a, RequestFetch as an, ActionHandle as at, getComponentMeta as b, resetClientHooks as bn, executeAction as bt, LoaderHandleMeta as c, ServerHooksModule as cn, ActionOpaqueRef as ct, SignalMeta as d, TransportHook as dn, InferStandardSchemaInput as dt, HandleFetch as en, ACTION_CONTENT_TYPE as et, WatchMeta as f, WithAppEnv as fn, InferStandardSchemaOutput as ft, __eclipsaLazy as g, getClientHooks as gn, StandardSchemaResult as gt, __eclipsaEvent as h, deserializePublicValue as hn, StandardSchemaIssue as ht, ComponentOptions as i, PublicErrorShape as in, ActionFormProps as it, getWatchMeta as j, SerializedReference as jn, RuntimeContextToken as jt, getRegisteredLoaderHookIds as k, SerializedMap as kn, ResumePayload as kt, LoaderHookMeta as l, ServerInit as ln, ActionSubmission as lt, __eclipsaComponent as m, createRequestFetch as mn, OpaqueSignalRef as mt, ActionHookMeta as n, HandleResolveOptions as nn, ACTION_FORM_FIELD as nt, LazyMeta as o, Reroute as on, ActionHandler as ot, WatchReference as p, attachRequestFetch as pn, OpaqueDomRef as pt, hasLoader as q, StaticPath as qn, AppHooksManifest as qt, ComponentMeta as r, PublicError as rn, ActionFactory as rt, LazyReference as s, ResolvedHooks as sn, ActionMiddleware as st, ActionHandleMeta as t, HandleResolve as tn, ACTION_FORM_ATTR as tt, NavigateMeta as u, Transport as un, ActionValidatorMiddleware as ut, getActionHandleMeta as v, markPublicError as vn, __eclipsaAction as vt, getLoaderHookMeta as w, toPublicError as wn, hasAction as wt, getEventMeta as x, resolveReroute as xn, executeActionSubmission as xt, getActionHookMeta as y, registerClientHooks as yn, action as yt, setSignalMeta as z, serializeJSONScriptContent as zn, RouteMetadataValue as zt };
|
|
674
|
+
//# sourceMappingURL=internal-Dmvt_AGE.d.mts.map
|