@farm.js/react 0.1.0-beta.4 → 0.1.0-beta.41
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/README.md +825 -15
- package/dist/client.d.mts +1 -0
- package/dist/client.d.ts +1 -0
- package/dist/compiled-root.cjs +17 -0
- package/dist/compiled-root.cjs.map +1 -0
- package/dist/compiled-root.d.mts +12 -0
- package/dist/compiled-root.d.ts +12 -0
- package/dist/compiled-root.mjs +14 -0
- package/dist/compiled-root.mjs.map +1 -0
- package/dist/compiler-runtime.cjs +7245 -1174
- package/dist/compiler-runtime.cjs.map +1 -1
- package/dist/compiler-runtime.d.mts +275 -6
- package/dist/compiler-runtime.d.ts +275 -6
- package/dist/compiler-runtime.mjs +7124 -1175
- package/dist/compiler-runtime.mjs.map +1 -1
- package/dist/index.cjs +45 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +17 -2
- package/dist/index.d.ts +17 -2
- package/dist/index.mjs +45 -5
- package/dist/index.mjs.map +1 -1
- package/dist/list.cjs +6 -0
- package/dist/list.cjs.map +1 -1
- package/dist/list.mjs +6 -0
- package/dist/list.mjs.map +1 -1
- package/dist/server.d.mts +0 -1
- package/dist/server.d.ts +0 -1
- package/dist/vite.cjs +5298 -477
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.d.mts +10 -1
- package/dist/vite.d.ts +10 -1
- package/dist/vite.mjs +5300 -480
- package/dist/vite.mjs.map +1 -1
- package/package.json +18 -10
|
@@ -2,6 +2,68 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
type CompilerStateUpdater = unknown | ((previous: unknown) => unknown);
|
|
4
4
|
type CompilerRuntimeReactivity = "static" | "hybrid";
|
|
5
|
+
type CompilerKeyedCollectionKind = "set" | "map";
|
|
6
|
+
type CompilerKeyedCollectionMutation = "set-add" | "set-delete" | "map-set" | "map-delete";
|
|
7
|
+
/**
|
|
8
|
+
* @internal Executes a compiler-proven Array.map pipeline and records its final same-order delta.
|
|
9
|
+
* The three-argument value/index form remains accepted for older generated output.
|
|
10
|
+
*/
|
|
11
|
+
declare function createCompilerKeyedMapUpdate(previous: unknown, valueOrPipeline: unknown, changedIndices?: unknown): unknown;
|
|
12
|
+
/**
|
|
13
|
+
* @internal Executes proven native maps within a keyed reorder pipeline.
|
|
14
|
+
* The three-argument form remains accepted for older generated output.
|
|
15
|
+
*/
|
|
16
|
+
declare function createCompilerKeyedArrayMapPipeline(previous: unknown, methodOrPipeline: unknown, callback?: unknown): unknown;
|
|
17
|
+
/** @internal Executes a queued native map next to a compiler-proven keyed-array reorder. */
|
|
18
|
+
declare function createCompilerKeyedArrayQueuedMapPipeline(previous: unknown, pipeline: (...values: readonly unknown[]) => unknown): unknown;
|
|
19
|
+
/** @internal Executes a safe map inside one compiler-proven rolling-window setter chain. */
|
|
20
|
+
declare function createCompilerKeyedArrayRollingWindowMapPipeline(previous: unknown, pipeline: (...values: readonly unknown[]) => unknown): unknown;
|
|
21
|
+
/** @internal Executes a native reorder after a proven same-key map pipeline. */
|
|
22
|
+
declare function createCompilerKeyedArrayMapReorder(previous: unknown, method: unknown, ...args: readonly unknown[]): unknown;
|
|
23
|
+
/** @internal Records a compiler-proven immutable keyed-array append and returns the Array. */
|
|
24
|
+
declare function createCompilerKeyedArrayAppend(previous: unknown, value: unknown): unknown;
|
|
25
|
+
/** @internal Records an append that may follow a compiler-proven structural update. */
|
|
26
|
+
declare function createCompilerKeyedArrayStructuralAppend(previous: unknown, value: unknown): unknown;
|
|
27
|
+
/** @internal Records an append that directly follows compiler-proven mapped structural work. */
|
|
28
|
+
declare function createCompilerKeyedArrayMappedStructuralAppend(previous: unknown, value: unknown): unknown;
|
|
29
|
+
/** @internal Executes safe maps while retaining structural append lineage. */
|
|
30
|
+
declare function createCompilerKeyedArrayStructuralAppendMapPipeline(previous: unknown, pipeline: (...values: readonly unknown[]) => unknown): unknown;
|
|
31
|
+
/** @internal Records a compiler-proven immutable keyed-array prepend and returns the Array. */
|
|
32
|
+
declare function createCompilerKeyedArrayPrepend(previous: unknown, value: unknown): unknown;
|
|
33
|
+
/** @internal Records a prepend that may follow a compiler-proven structural update. */
|
|
34
|
+
declare function createCompilerKeyedArrayStructuralPrepend(previous: unknown, value: unknown): unknown;
|
|
35
|
+
/** @internal Records a prepend that directly follows compiler-proven mapped structural work. */
|
|
36
|
+
declare function createCompilerKeyedArrayMappedStructuralPrepend(previous: unknown, value: unknown): unknown;
|
|
37
|
+
/** @internal Executes safe maps while retaining structural prepend lineage. */
|
|
38
|
+
declare function createCompilerKeyedArrayStructuralPrependMapPipeline(previous: unknown, pipeline: (...values: readonly unknown[]) => unknown): unknown;
|
|
39
|
+
/** @internal Executes Array.filter while recording compiler-proven removal positions. */
|
|
40
|
+
declare function createCompilerKeyedArrayFilter(previous: unknown, method: unknown, predicate: unknown): unknown;
|
|
41
|
+
/** @internal Executes a compiler-proven native Array.slice and records its retained interval. */
|
|
42
|
+
declare function createCompilerKeyedArraySlice(previous: unknown, method: unknown, ...args: readonly number[]): unknown;
|
|
43
|
+
/** @internal Retains mapped lineage through a compiler-proven terminal filter or slice. */
|
|
44
|
+
declare function finalizeCompilerKeyedArrayMappedStructuralUpdate(value: unknown): unknown;
|
|
45
|
+
/** @internal Records a compiler-proven retained tail followed by incoming keyed rows. */
|
|
46
|
+
declare function createCompilerKeyedArrayRollingWindow(previous: unknown, retained: unknown, value: unknown): unknown;
|
|
47
|
+
/** @internal Records one rolling step inside a compiler-proven mapped window chain. */
|
|
48
|
+
declare function createCompilerKeyedArrayMappedRollingWindow(previous: unknown, retained: unknown, value: unknown): unknown;
|
|
49
|
+
/** @internal Executes a native known-position insert, removal, or replacement and records it. */
|
|
50
|
+
declare function createCompilerKeyedArrayPositionUpdate(previous: unknown, method: unknown, kind: "insert" | "remove" | "replace", position: number, ...args: readonly unknown[]): unknown;
|
|
51
|
+
/** @internal Executes a native exact-position batch insertion and records it. */
|
|
52
|
+
declare function createCompilerKeyedArrayBatchInsert(previous: unknown, method: unknown, position: number, ...items: readonly unknown[]): unknown;
|
|
53
|
+
/** @internal Executes a native exact-window replacement and records it. */
|
|
54
|
+
declare function createCompilerKeyedArrayWindowReplace(previous: unknown, method: unknown, position: number, deleteCount: number, ...items: readonly unknown[]): unknown;
|
|
55
|
+
/** @internal Executes a native reverse and records its exact keyed-row permutation. */
|
|
56
|
+
declare function createCompilerKeyedArrayReorder(previous: unknown, method: unknown): unknown;
|
|
57
|
+
/** @internal Executes a native immutable sort and records its keyed-row permutation. */
|
|
58
|
+
declare function createCompilerKeyedArraySort(previous: unknown, method: unknown, ...args: readonly unknown[]): unknown;
|
|
59
|
+
/** @internal Executes a native reverse after a compiler-proven filter or slice pipeline. */
|
|
60
|
+
declare function createCompilerKeyedArrayStructuralReorder(previous: unknown, method: unknown): unknown;
|
|
61
|
+
/** @internal Executes a native sort after a compiler-proven filter or slice pipeline. */
|
|
62
|
+
declare function createCompilerKeyedArrayStructuralSort(previous: unknown, method: unknown, ...args: readonly unknown[]): unknown;
|
|
63
|
+
/** @internal Preserves a proven native collection mutation while recording its executed key. */
|
|
64
|
+
declare function applyCompilerKeyedCollectionMutation(collection: unknown, method: unknown, operation: CompilerKeyedCollectionMutation, key: unknown, value?: unknown): unknown;
|
|
65
|
+
/** @internal Connects compiler-owned immutable Set/Map mutations to their committed source. */
|
|
66
|
+
declare function createCompilerKeyedCollectionUpdate(previous: unknown, value: unknown, kind: CompilerKeyedCollectionKind): unknown;
|
|
5
67
|
interface CompilerCell {
|
|
6
68
|
get(): unknown;
|
|
7
69
|
set(next: CompilerStateUpdater): void;
|
|
@@ -65,13 +127,18 @@ interface CompilerHostElement {
|
|
|
65
127
|
value: unknown;
|
|
66
128
|
}[];
|
|
67
129
|
children: readonly (CompilerHostElement | unknown)[];
|
|
130
|
+
/** Ids of the keyed row events this element of a host-block row handles. */
|
|
131
|
+
events?: readonly number[];
|
|
68
132
|
/** Direct-child structure owned without creating another React fiber. */
|
|
69
133
|
block?: CompilerHostBlock;
|
|
70
134
|
}
|
|
71
135
|
type CompilerKeyedRowElement = CompilerHostElement;
|
|
72
136
|
interface CompilerKeyedRowEvent {
|
|
73
137
|
name: string;
|
|
74
|
-
/**
|
|
138
|
+
/**
|
|
139
|
+
* Host-element path relative to the keyed row root. Host-block rows omit it: mounting the row
|
|
140
|
+
* records each element's events from its descriptor.
|
|
141
|
+
*/
|
|
75
142
|
path?: readonly number[];
|
|
76
143
|
invoke(item: unknown, index: number, event: React.SyntheticEvent): unknown;
|
|
77
144
|
}
|
|
@@ -165,23 +232,65 @@ interface CompilerKeyedRowBinding {
|
|
|
165
232
|
name?: string;
|
|
166
233
|
/** Component state cells read by this binding, when emitted by the compiler. */
|
|
167
234
|
dependencies?: readonly number[];
|
|
235
|
+
/** A compiler-proven primitive value compared strictly with this row's key. */
|
|
236
|
+
identityTarget?: {
|
|
237
|
+
dependency: number;
|
|
238
|
+
read(): unknown;
|
|
239
|
+
};
|
|
240
|
+
/** A compiler-proven native Set whose members are compared with this row's key. */
|
|
241
|
+
membershipTarget?: {
|
|
242
|
+
dependency: number;
|
|
243
|
+
read(): unknown;
|
|
244
|
+
};
|
|
245
|
+
/** A compiler-proven native Map whose values are read with this row's key. */
|
|
246
|
+
mapLookupTarget?: {
|
|
247
|
+
dependency: number;
|
|
248
|
+
read(): unknown;
|
|
249
|
+
};
|
|
168
250
|
read(item: unknown, index: number): unknown;
|
|
169
251
|
}
|
|
170
252
|
interface CompilerKeyedRowsBlockProps {
|
|
253
|
+
/** Receives the container when the rows block is the component's root element. */
|
|
254
|
+
rootRef?: React.RefCallback<Element>;
|
|
171
255
|
id: number;
|
|
172
256
|
render(event: (item: unknown, index: number, eventId: number) => React.EventHandler<React.SyntheticEvent>, conditional: (item: unknown, index: number, conditionalId: number, render: (item: unknown, index: number) => React.ReactNode) => React.ReactNode): React.ReactElement;
|
|
173
257
|
items(): Iterable<unknown> | null | undefined;
|
|
258
|
+
/** Complete component-state dependencies used anywhere inside this boundary. */
|
|
259
|
+
dependencies?: readonly number[];
|
|
174
260
|
/** State cells that can change the row collection or its key projection. */
|
|
175
261
|
structureDependencies?: readonly number[];
|
|
262
|
+
/** Direct state cell supplying items, eligible for compiler-emitted update hints. */
|
|
263
|
+
collectionDependency?: number;
|
|
264
|
+
/** Compiler proof that shifted row indexes are not observed by this boundary. */
|
|
265
|
+
filterIndexIndependent?: boolean;
|
|
266
|
+
/** Compiler proof that prepending cannot expose shifted indexes to existing rows. */
|
|
267
|
+
prependIndexIndependent?: boolean;
|
|
268
|
+
/** Compiler proof that a known-position insert cannot expose shifted row indexes. */
|
|
269
|
+
positionIndexIndependent?: boolean;
|
|
270
|
+
/** Compiler proof that reordering cannot expose changed row indexes. */
|
|
271
|
+
reorderIndexIndependent?: boolean;
|
|
176
272
|
rowKey(item: unknown, index: number): React.Key;
|
|
177
273
|
create(item: unknown, index: number): CompilerKeyedRowElement;
|
|
178
274
|
bindings: readonly CompilerKeyedRowBinding[];
|
|
179
275
|
events?: readonly CompilerKeyedRowEvent[];
|
|
180
276
|
/** Route compiler-proven bubbling row events through the stable React container. */
|
|
181
277
|
delegateEvents?: boolean;
|
|
278
|
+
/**
|
|
279
|
+
* Rows whose only non-delegatable event is onChange. React derives onChange from each row's
|
|
280
|
+
* own fiber, so these rows stay React-owned under React DOM; a compiled root, which maps
|
|
281
|
+
* onChange to native events itself, delegates them.
|
|
282
|
+
*/
|
|
283
|
+
delegateEventsWithoutReact?: boolean;
|
|
182
284
|
conditionals?: readonly CompilerKeyedRowConditional[];
|
|
183
285
|
/** Row descriptors contain compiler-owned nested host scopes. */
|
|
184
286
|
hostBlocks?: boolean;
|
|
287
|
+
/**
|
|
288
|
+
* Compiler proof that every value differing between rows is a binding, so a
|
|
289
|
+
* row can be cloned from one already built with its bindings reapplied.
|
|
290
|
+
*/
|
|
291
|
+
cloneRows?: boolean;
|
|
292
|
+
/** Compiler-emitted lookup sharing plain-row binding path prefixes. */
|
|
293
|
+
targets?: (root: Element) => (Element | null)[];
|
|
185
294
|
}
|
|
186
295
|
interface CompilerKeyedRange {
|
|
187
296
|
/** Number of static direct host siblings between this range and the previous range. */
|
|
@@ -190,7 +299,11 @@ interface CompilerKeyedRange {
|
|
|
190
299
|
rowKey(item: unknown, index: number): React.Key;
|
|
191
300
|
create(item: unknown, index: number): CompilerKeyedRowElement;
|
|
192
301
|
bindings: readonly CompilerKeyedRowBinding[];
|
|
302
|
+
/** Compiler-proven bubbling row events, delegated to the ranges container. */
|
|
303
|
+
events?: readonly CompilerKeyedRowEvent[];
|
|
193
304
|
}
|
|
305
|
+
/** Returns a row's React handler on React-owned paths, or nothing when the container delegates. */
|
|
306
|
+
type CompilerKeyedRangeRowEvent = (item: unknown, index: number, eventId: number, rangeIndex: number) => React.EventHandler<React.SyntheticEvent> | undefined;
|
|
194
307
|
type CompilerMixedRange = ({
|
|
195
308
|
kind: "conditional";
|
|
196
309
|
} & CompilerConditionalRange) | ({
|
|
@@ -204,7 +317,14 @@ interface CompilerMixedRangesBlockProps {
|
|
|
204
317
|
}
|
|
205
318
|
interface CompilerKeyedRangesBlockProps {
|
|
206
319
|
id: number;
|
|
207
|
-
render(): React.ReactElement;
|
|
320
|
+
render(rowEvent?: CompilerKeyedRangeRowEvent): React.ReactElement;
|
|
321
|
+
/** Route row events of every range through the stable container. */
|
|
322
|
+
delegateEvents?: boolean;
|
|
323
|
+
/**
|
|
324
|
+
* Route row events through the container only on a root without React DOM, which maps
|
|
325
|
+
* onChange to native events itself. Under React DOM, React renders the rows.
|
|
326
|
+
*/
|
|
327
|
+
delegateEventsWithoutReact?: boolean;
|
|
208
328
|
rootRef?: React.RefCallback<Element>;
|
|
209
329
|
ranges: readonly CompilerKeyedRange[];
|
|
210
330
|
/** Number of static direct host siblings after the final keyed range. */
|
|
@@ -244,13 +364,162 @@ interface CompiledComponentDefinition<Props> {
|
|
|
244
364
|
render(props: Props, state: readonly CompilerCell[], blocks: CompilerBlockRuntime): React.ReactElement;
|
|
245
365
|
bindings: readonly CompilerBinding<Props>[];
|
|
246
366
|
}
|
|
367
|
+
type CompilerBlockRefresh = (afterCommit?: () => void, dirtyState?: ReadonlySet<number>) => void;
|
|
368
|
+
interface CompilerRuntimeFeatureOwner {
|
|
369
|
+
setRoot(id: number, root: Element | null, expectedRoot?: Element | null): void;
|
|
370
|
+
subscribe(id: number, refresh: CompilerBlockRefresh): () => void;
|
|
371
|
+
/** Opaque identity used to detect compatible definition replacement. */
|
|
372
|
+
getDefinitionVersion?(): unknown;
|
|
373
|
+
}
|
|
374
|
+
interface CompilerRuntimeFeature {
|
|
375
|
+
/** Stable identity used by Fast Refresh compatibility checks. */
|
|
376
|
+
name: string;
|
|
377
|
+
create(owner: CompilerRuntimeFeatureOwner): Partial<CompilerBlockRuntime>;
|
|
378
|
+
}
|
|
379
|
+
declare const conditionalRuntimeFeature: CompilerRuntimeFeature;
|
|
380
|
+
declare const hostConditionalRuntimeFeature: CompilerRuntimeFeature;
|
|
381
|
+
declare const conditionalRangesRuntimeFeature: CompilerRuntimeFeature;
|
|
382
|
+
declare const keyedListRuntimeFeature: CompilerRuntimeFeature;
|
|
383
|
+
declare const keyedRowsRuntimeFeature: CompilerRuntimeFeature;
|
|
384
|
+
declare const keyedRowsPlainRuntimeFeature: CompilerRuntimeFeature;
|
|
385
|
+
declare const keyedRowsIdentityRuntimeFeature: CompilerRuntimeFeature;
|
|
386
|
+
declare const keyedRowsMembershipRuntimeFeature: CompilerRuntimeFeature;
|
|
387
|
+
declare const keyedRowsMapLookupRuntimeFeature: CompilerRuntimeFeature;
|
|
388
|
+
declare const keyedRowsHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
389
|
+
declare const keyedRowsAppendOnlyRuntimeFeature: CompilerRuntimeFeature;
|
|
390
|
+
declare const keyedRowsPositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
391
|
+
declare const keyedRowsPlainPositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
392
|
+
declare const keyedRowsBatchPositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
393
|
+
declare const keyedRowsWindowPositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
394
|
+
declare const keyedRowsReorderHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
395
|
+
declare const keyedRowsPlainReorderHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
396
|
+
declare const keyedRowsPlainMapReorderHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
397
|
+
declare const keyedRowsMapReorderHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
398
|
+
declare const keyedRowsAllHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
399
|
+
declare const keyedRowsMappedRollingWindowHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
400
|
+
declare const keyedRowsEveryHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
401
|
+
declare const keyedRowsBatchEveryHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
402
|
+
declare const keyedRowsWindowEveryHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
403
|
+
declare const keyedRowsFilterHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
404
|
+
declare const keyedRowsFilterOnlyRuntimeFeature: CompilerRuntimeFeature;
|
|
405
|
+
declare const keyedRowsIdentityFilterHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
406
|
+
declare const keyedRowsIdentityFilterOnlyRuntimeFeature: CompilerRuntimeFeature;
|
|
407
|
+
declare const keyedRowsStructuralAppendHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
408
|
+
declare const keyedRowsStructuralAppendMapHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
409
|
+
declare const keyedRowsStructuralPrependHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
410
|
+
declare const keyedRowsStructuralPrependMapHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
411
|
+
declare const keyedRowsPrependHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
412
|
+
declare const keyedRowsPrependOnlyRuntimeFeature: CompilerRuntimeFeature;
|
|
413
|
+
declare const keyedRowsFilterPrependHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
414
|
+
declare const keyedRowsConditionalRuntimeFeature: CompilerRuntimeFeature;
|
|
415
|
+
declare const keyedRowsConditionalHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
416
|
+
declare const keyedRowsConditionalPositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
417
|
+
declare const keyedRowsConditionalBatchPositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
418
|
+
declare const keyedRowsConditionalWindowPositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
419
|
+
declare const keyedRowsConditionalReorderHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
420
|
+
declare const keyedRowsConditionalAllHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
421
|
+
declare const keyedRowsConditionalMappedRollingWindowHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
422
|
+
declare const keyedRowsConditionalEveryHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
423
|
+
declare const keyedRowsConditionalBatchEveryHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
424
|
+
declare const keyedRowsConditionalWindowEveryHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
425
|
+
declare const keyedRowsConditionalFilterHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
426
|
+
declare const keyedRowsConditionalStructuralAppendHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
427
|
+
declare const keyedRowsConditionalStructuralAppendMapHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
428
|
+
declare const keyedRowsConditionalStructuralPrependHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
429
|
+
declare const keyedRowsConditionalStructuralPrependMapHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
430
|
+
declare const keyedRowsConditionalPrependHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
431
|
+
declare const keyedRowsConditionalFilterPrependHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
432
|
+
declare const keyedRowsHostRuntimeFeature: CompilerRuntimeFeature;
|
|
433
|
+
declare const keyedRowsHostHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
434
|
+
declare const keyedRowsHostPositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
435
|
+
declare const keyedRowsHostBatchPositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
436
|
+
declare const keyedRowsHostWindowPositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
437
|
+
declare const keyedRowsHostReorderHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
438
|
+
declare const keyedRowsHostAllHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
439
|
+
declare const keyedRowsHostMappedRollingWindowHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
440
|
+
declare const keyedRowsHostEveryHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
441
|
+
declare const keyedRowsHostBatchEveryHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
442
|
+
declare const keyedRowsHostWindowEveryHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
443
|
+
declare const keyedRowsHostFilterHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
444
|
+
declare const keyedRowsHostStructuralAppendHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
445
|
+
declare const keyedRowsHostStructuralAppendMapHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
446
|
+
declare const keyedRowsHostStructuralPrependHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
447
|
+
declare const keyedRowsHostStructuralPrependMapHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
448
|
+
declare const keyedRowsHostPrependHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
449
|
+
declare const keyedRowsHostFilterPrependHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
450
|
+
declare const keyedRowsCompleteRuntimeFeature: CompilerRuntimeFeature;
|
|
451
|
+
declare const keyedRowsCompleteHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
452
|
+
declare const keyedRowsCompletePositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
453
|
+
declare const keyedRowsCompleteBatchPositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
454
|
+
declare const keyedRowsCompleteWindowPositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
455
|
+
declare const keyedRowsCompleteReorderHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
456
|
+
declare const keyedRowsCompleteAllHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
457
|
+
declare const keyedRowsCompleteMappedRollingWindowHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
458
|
+
declare const keyedRowsCompleteEveryHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
459
|
+
declare const keyedRowsCompleteBatchEveryHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
460
|
+
declare const keyedRowsCompleteWindowEveryHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
461
|
+
declare const keyedRowsCompleteFilterHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
462
|
+
declare const keyedRowsCompleteStructuralAppendHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
463
|
+
declare const keyedRowsCompleteStructuralAppendMapHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
464
|
+
declare const keyedRowsCompleteStructuralPrependHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
465
|
+
declare const keyedRowsCompleteStructuralPrependMapHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
466
|
+
declare const keyedRowsCompletePrependHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
467
|
+
declare const keyedRowsCompleteFilterPrependHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
468
|
+
declare const keyedRangesRuntimeFeature: CompilerRuntimeFeature;
|
|
469
|
+
declare const mixedRangesRuntimeFeature: CompilerRuntimeFeature;
|
|
470
|
+
declare const componentRuntimeFeature: CompilerRuntimeFeature;
|
|
247
471
|
/**
|
|
248
|
-
*
|
|
472
|
+
* Tree-shakable runtime target emitted by the AOT transform.
|
|
249
473
|
*
|
|
250
474
|
* React owns initial placement, SSR, hydration, props, and event semantics.
|
|
251
|
-
* Compiler cells own local updates and precomputed DOM paths.
|
|
252
|
-
*
|
|
475
|
+
* Compiler cells own local updates and precomputed DOM paths. Structural
|
|
476
|
+
* helpers are installed only when the compiler emitted that boundary kind.
|
|
477
|
+
*/
|
|
478
|
+
declare function createCompiledComponentWithFeatures<Props>(definition: CompiledComponentDefinition<Props>, runtimeFeatures: readonly CompilerRuntimeFeature[]): React.ComponentType<Props>;
|
|
479
|
+
/**
|
|
480
|
+
* Compiler target when import.meta.hot is absent. The refresh-capable entry
|
|
481
|
+
* remains available for development and existing hand-authored definitions.
|
|
482
|
+
* Keeping that choice at the call site makes its registry tree-shakable.
|
|
483
|
+
* @internal
|
|
484
|
+
*/
|
|
485
|
+
declare function createCompiledComponentWithoutRefresh<Props>(definition: CompiledComponentDefinition<Props>, runtimeFeatures: readonly CompilerRuntimeFeature[]): React.ComponentType<Props>;
|
|
486
|
+
/**
|
|
487
|
+
* Compatibility entry for hand-authored runtime definitions.
|
|
488
|
+
* Compiler output uses createCompiledComponentWithFeatures so unused structural
|
|
489
|
+
* runtimes can be removed from production bundles.
|
|
253
490
|
*/
|
|
254
491
|
declare function createCompiledComponent<Props>(definition: CompiledComponentDefinition<Props>): React.ComponentType<Props>;
|
|
492
|
+
interface CompiledRoot {
|
|
493
|
+
render(element: React.ReactNode): void;
|
|
494
|
+
unmount(): void;
|
|
495
|
+
}
|
|
496
|
+
interface CompiledRootOptions {
|
|
497
|
+
/** Passed to React DOM's createRoot() if the root falls back to React DOM. */
|
|
498
|
+
reactRootOptions?: unknown;
|
|
499
|
+
/**
|
|
500
|
+
* Called with the reason when the root uses React DOM instead. The default is silent, so an
|
|
501
|
+
* app's visitors see nothing in their console; the compiler report lists uncompiled components.
|
|
502
|
+
*/
|
|
503
|
+
onFallback?(reason: string): void;
|
|
504
|
+
}
|
|
505
|
+
interface CompiledRootReactDOM {
|
|
506
|
+
createRoot(container: Element, options?: never): {
|
|
507
|
+
render(element: React.ReactNode): void;
|
|
508
|
+
unmount(): void;
|
|
509
|
+
};
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Experimental: a createRoot() that mounts a fully compiled tree without loading React DOM.
|
|
513
|
+
*
|
|
514
|
+
* It renders host elements, fragments, the compiler runtime's components and hook-free function
|
|
515
|
+
* components into a detached fragment, then commits it, runs refs and componentDidMount, and
|
|
516
|
+
* leaves updates to the compiled runtime. Anything else (hooks, context, Suspense, portals,
|
|
517
|
+
* props React renames) loads React DOM on demand and lets it render the root instead, before
|
|
518
|
+
* anything is shown. If a mounted compiler component later needs a React re-render (its
|
|
519
|
+
* fallback, error and refresh paths), React DOM takes over and renders the root again: that
|
|
520
|
+
* root's compiled state starts over. Pages with Fast Refresh installed use React DOM, which is
|
|
521
|
+
* the only renderer Fast Refresh updates.
|
|
522
|
+
*/
|
|
523
|
+
declare function createCompiledRoot(container: Element, options: CompiledRootOptions, loadReactDOM: () => Promise<CompiledRootReactDOM>): CompiledRoot;
|
|
255
524
|
|
|
256
|
-
export { type CompiledComponentDefinition, type CompilerAttributeBinding, type CompilerBinding, type CompilerBlockRuntime, type CompilerCell, type CompilerComponentBlockProps, type CompilerConditionalBlockBinding, type CompilerConditionalBlockProps, type CompilerConditionalRange, type CompilerConditionalRangesBlockProps, type CompilerHostBlock, type CompilerHostConditionalBinding, type CompilerHostConditionalBlockProps, type CompilerHostConditionalBranch, type CompilerHostConditionalRanges, type CompilerHostElement, type CompilerHostKeyedRanges, type CompilerHostMixedRanges, type CompilerKeyedListBlockProps, type CompilerKeyedRange, type CompilerKeyedRangesBlockProps, type CompilerKeyedRowBinding, type CompilerKeyedRowConditional, type CompilerKeyedRowConditionalBranch, type CompilerKeyedRowElement, type CompilerKeyedRowEvent, type CompilerKeyedRowsBlockProps, type CompilerMixedRange, type CompilerMixedRangesBlockProps, type CompilerRuntimeReactivity, type CompilerStateUpdater, type CompilerStaticRangeBinding, type CompilerStyleBinding, type CompilerTextBinding, createCompiledComponent };
|
|
525
|
+
export { type CompiledComponentDefinition, type CompiledRoot, type CompiledRootOptions, type CompilerAttributeBinding, type CompilerBinding, type CompilerBlockRuntime, type CompilerCell, type CompilerComponentBlockProps, type CompilerConditionalBlockBinding, type CompilerConditionalBlockProps, type CompilerConditionalRange, type CompilerConditionalRangesBlockProps, type CompilerHostBlock, type CompilerHostConditionalBinding, type CompilerHostConditionalBlockProps, type CompilerHostConditionalBranch, type CompilerHostConditionalRanges, type CompilerHostElement, type CompilerHostKeyedRanges, type CompilerHostMixedRanges, type CompilerKeyedListBlockProps, type CompilerKeyedRange, type CompilerKeyedRangeRowEvent, type CompilerKeyedRangesBlockProps, type CompilerKeyedRowBinding, type CompilerKeyedRowConditional, type CompilerKeyedRowConditionalBranch, type CompilerKeyedRowElement, type CompilerKeyedRowEvent, type CompilerKeyedRowsBlockProps, type CompilerMixedRange, type CompilerMixedRangesBlockProps, type CompilerRuntimeFeature, type CompilerRuntimeFeatureOwner, type CompilerRuntimeReactivity, type CompilerStateUpdater, type CompilerStaticRangeBinding, type CompilerStyleBinding, type CompilerTextBinding, applyCompilerKeyedCollectionMutation, componentRuntimeFeature, conditionalRangesRuntimeFeature, conditionalRuntimeFeature, createCompiledComponent, createCompiledComponentWithFeatures, createCompiledComponentWithoutRefresh, createCompiledRoot, createCompilerKeyedArrayAppend, createCompilerKeyedArrayBatchInsert, createCompilerKeyedArrayFilter, createCompilerKeyedArrayMapPipeline, createCompilerKeyedArrayMapReorder, createCompilerKeyedArrayMappedRollingWindow, createCompilerKeyedArrayMappedStructuralAppend, createCompilerKeyedArrayMappedStructuralPrepend, createCompilerKeyedArrayPositionUpdate, createCompilerKeyedArrayPrepend, createCompilerKeyedArrayQueuedMapPipeline, createCompilerKeyedArrayReorder, createCompilerKeyedArrayRollingWindow, createCompilerKeyedArrayRollingWindowMapPipeline, createCompilerKeyedArraySlice, createCompilerKeyedArraySort, createCompilerKeyedArrayStructuralAppend, createCompilerKeyedArrayStructuralAppendMapPipeline, createCompilerKeyedArrayStructuralPrepend, createCompilerKeyedArrayStructuralPrependMapPipeline, createCompilerKeyedArrayStructuralReorder, createCompilerKeyedArrayStructuralSort, createCompilerKeyedArrayWindowReplace, createCompilerKeyedCollectionUpdate, createCompilerKeyedMapUpdate, finalizeCompilerKeyedArrayMappedStructuralUpdate, hostConditionalRuntimeFeature, keyedListRuntimeFeature, keyedRangesRuntimeFeature, keyedRowsAllHintedRuntimeFeature, keyedRowsAppendOnlyRuntimeFeature, keyedRowsBatchEveryHintedRuntimeFeature, keyedRowsBatchPositionHintedRuntimeFeature, keyedRowsCompleteAllHintedRuntimeFeature, keyedRowsCompleteBatchEveryHintedRuntimeFeature, keyedRowsCompleteBatchPositionHintedRuntimeFeature, keyedRowsCompleteEveryHintedRuntimeFeature, keyedRowsCompleteFilterHintedRuntimeFeature, keyedRowsCompleteFilterPrependHintedRuntimeFeature, keyedRowsCompleteHintedRuntimeFeature, keyedRowsCompleteMappedRollingWindowHintedRuntimeFeature, keyedRowsCompletePositionHintedRuntimeFeature, keyedRowsCompletePrependHintedRuntimeFeature, keyedRowsCompleteReorderHintedRuntimeFeature, keyedRowsCompleteRuntimeFeature, keyedRowsCompleteStructuralAppendHintedRuntimeFeature, keyedRowsCompleteStructuralAppendMapHintedRuntimeFeature, keyedRowsCompleteStructuralPrependHintedRuntimeFeature, keyedRowsCompleteStructuralPrependMapHintedRuntimeFeature, keyedRowsCompleteWindowEveryHintedRuntimeFeature, keyedRowsCompleteWindowPositionHintedRuntimeFeature, keyedRowsConditionalAllHintedRuntimeFeature, keyedRowsConditionalBatchEveryHintedRuntimeFeature, keyedRowsConditionalBatchPositionHintedRuntimeFeature, keyedRowsConditionalEveryHintedRuntimeFeature, keyedRowsConditionalFilterHintedRuntimeFeature, keyedRowsConditionalFilterPrependHintedRuntimeFeature, keyedRowsConditionalHintedRuntimeFeature, keyedRowsConditionalMappedRollingWindowHintedRuntimeFeature, keyedRowsConditionalPositionHintedRuntimeFeature, keyedRowsConditionalPrependHintedRuntimeFeature, keyedRowsConditionalReorderHintedRuntimeFeature, keyedRowsConditionalRuntimeFeature, keyedRowsConditionalStructuralAppendHintedRuntimeFeature, keyedRowsConditionalStructuralAppendMapHintedRuntimeFeature, keyedRowsConditionalStructuralPrependHintedRuntimeFeature, keyedRowsConditionalStructuralPrependMapHintedRuntimeFeature, keyedRowsConditionalWindowEveryHintedRuntimeFeature, keyedRowsConditionalWindowPositionHintedRuntimeFeature, keyedRowsEveryHintedRuntimeFeature, keyedRowsFilterHintedRuntimeFeature, keyedRowsFilterOnlyRuntimeFeature, keyedRowsFilterPrependHintedRuntimeFeature, keyedRowsHintedRuntimeFeature, keyedRowsHostAllHintedRuntimeFeature, keyedRowsHostBatchEveryHintedRuntimeFeature, keyedRowsHostBatchPositionHintedRuntimeFeature, keyedRowsHostEveryHintedRuntimeFeature, keyedRowsHostFilterHintedRuntimeFeature, keyedRowsHostFilterPrependHintedRuntimeFeature, keyedRowsHostHintedRuntimeFeature, keyedRowsHostMappedRollingWindowHintedRuntimeFeature, keyedRowsHostPositionHintedRuntimeFeature, keyedRowsHostPrependHintedRuntimeFeature, keyedRowsHostReorderHintedRuntimeFeature, keyedRowsHostRuntimeFeature, keyedRowsHostStructuralAppendHintedRuntimeFeature, keyedRowsHostStructuralAppendMapHintedRuntimeFeature, keyedRowsHostStructuralPrependHintedRuntimeFeature, keyedRowsHostStructuralPrependMapHintedRuntimeFeature, keyedRowsHostWindowEveryHintedRuntimeFeature, keyedRowsHostWindowPositionHintedRuntimeFeature, keyedRowsIdentityFilterHintedRuntimeFeature, keyedRowsIdentityFilterOnlyRuntimeFeature, keyedRowsIdentityRuntimeFeature, keyedRowsMapLookupRuntimeFeature, keyedRowsMapReorderHintedRuntimeFeature, keyedRowsMappedRollingWindowHintedRuntimeFeature, keyedRowsMembershipRuntimeFeature, keyedRowsPlainMapReorderHintedRuntimeFeature, keyedRowsPlainPositionHintedRuntimeFeature, keyedRowsPlainReorderHintedRuntimeFeature, keyedRowsPlainRuntimeFeature, keyedRowsPositionHintedRuntimeFeature, keyedRowsPrependHintedRuntimeFeature, keyedRowsPrependOnlyRuntimeFeature, keyedRowsReorderHintedRuntimeFeature, keyedRowsRuntimeFeature, keyedRowsStructuralAppendHintedRuntimeFeature, keyedRowsStructuralAppendMapHintedRuntimeFeature, keyedRowsStructuralPrependHintedRuntimeFeature, keyedRowsStructuralPrependMapHintedRuntimeFeature, keyedRowsWindowEveryHintedRuntimeFeature, keyedRowsWindowPositionHintedRuntimeFeature, mixedRangesRuntimeFeature };
|