@farm.js/react 0.1.0-beta.4 → 0.1.0-beta.40
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 +7150 -1170
- package/dist/compiler-runtime.cjs.map +1 -1
- package/dist/compiler-runtime.d.mts +267 -5
- package/dist/compiler-runtime.d.ts +267 -5
- package/dist/compiler-runtime.mjs +7029 -1171
- 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 +5181 -422
- 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 +5183 -425
- 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;
|
|
@@ -165,23 +227,63 @@ interface CompilerKeyedRowBinding {
|
|
|
165
227
|
name?: string;
|
|
166
228
|
/** Component state cells read by this binding, when emitted by the compiler. */
|
|
167
229
|
dependencies?: readonly number[];
|
|
230
|
+
/** A compiler-proven primitive value compared strictly with this row's key. */
|
|
231
|
+
identityTarget?: {
|
|
232
|
+
dependency: number;
|
|
233
|
+
read(): unknown;
|
|
234
|
+
};
|
|
235
|
+
/** A compiler-proven native Set whose members are compared with this row's key. */
|
|
236
|
+
membershipTarget?: {
|
|
237
|
+
dependency: number;
|
|
238
|
+
read(): unknown;
|
|
239
|
+
};
|
|
240
|
+
/** A compiler-proven native Map whose values are read with this row's key. */
|
|
241
|
+
mapLookupTarget?: {
|
|
242
|
+
dependency: number;
|
|
243
|
+
read(): unknown;
|
|
244
|
+
};
|
|
168
245
|
read(item: unknown, index: number): unknown;
|
|
169
246
|
}
|
|
170
247
|
interface CompilerKeyedRowsBlockProps {
|
|
171
248
|
id: number;
|
|
172
249
|
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
250
|
items(): Iterable<unknown> | null | undefined;
|
|
251
|
+
/** Complete component-state dependencies used anywhere inside this boundary. */
|
|
252
|
+
dependencies?: readonly number[];
|
|
174
253
|
/** State cells that can change the row collection or its key projection. */
|
|
175
254
|
structureDependencies?: readonly number[];
|
|
255
|
+
/** Direct state cell supplying items, eligible for compiler-emitted update hints. */
|
|
256
|
+
collectionDependency?: number;
|
|
257
|
+
/** Compiler proof that shifted row indexes are not observed by this boundary. */
|
|
258
|
+
filterIndexIndependent?: boolean;
|
|
259
|
+
/** Compiler proof that prepending cannot expose shifted indexes to existing rows. */
|
|
260
|
+
prependIndexIndependent?: boolean;
|
|
261
|
+
/** Compiler proof that a known-position insert cannot expose shifted row indexes. */
|
|
262
|
+
positionIndexIndependent?: boolean;
|
|
263
|
+
/** Compiler proof that reordering cannot expose changed row indexes. */
|
|
264
|
+
reorderIndexIndependent?: boolean;
|
|
176
265
|
rowKey(item: unknown, index: number): React.Key;
|
|
177
266
|
create(item: unknown, index: number): CompilerKeyedRowElement;
|
|
178
267
|
bindings: readonly CompilerKeyedRowBinding[];
|
|
179
268
|
events?: readonly CompilerKeyedRowEvent[];
|
|
180
269
|
/** Route compiler-proven bubbling row events through the stable React container. */
|
|
181
270
|
delegateEvents?: boolean;
|
|
271
|
+
/**
|
|
272
|
+
* Rows whose only non-delegatable event is onChange. React derives onChange from each row's
|
|
273
|
+
* own fiber, so these rows stay React-owned under React DOM; a compiled root, which maps
|
|
274
|
+
* onChange to native events itself, delegates them.
|
|
275
|
+
*/
|
|
276
|
+
delegateEventsWithoutReact?: boolean;
|
|
182
277
|
conditionals?: readonly CompilerKeyedRowConditional[];
|
|
183
278
|
/** Row descriptors contain compiler-owned nested host scopes. */
|
|
184
279
|
hostBlocks?: boolean;
|
|
280
|
+
/**
|
|
281
|
+
* Compiler proof that every value differing between rows is a binding, so a
|
|
282
|
+
* row can be cloned from one already built with its bindings reapplied.
|
|
283
|
+
*/
|
|
284
|
+
cloneRows?: boolean;
|
|
285
|
+
/** Compiler-emitted lookup sharing plain-row binding path prefixes. */
|
|
286
|
+
targets?: (root: Element) => (Element | null)[];
|
|
185
287
|
}
|
|
186
288
|
interface CompilerKeyedRange {
|
|
187
289
|
/** Number of static direct host siblings between this range and the previous range. */
|
|
@@ -190,7 +292,11 @@ interface CompilerKeyedRange {
|
|
|
190
292
|
rowKey(item: unknown, index: number): React.Key;
|
|
191
293
|
create(item: unknown, index: number): CompilerKeyedRowElement;
|
|
192
294
|
bindings: readonly CompilerKeyedRowBinding[];
|
|
295
|
+
/** Compiler-proven bubbling row events, delegated to the ranges container. */
|
|
296
|
+
events?: readonly CompilerKeyedRowEvent[];
|
|
193
297
|
}
|
|
298
|
+
/** Returns a row's React handler on React-owned paths, or nothing when the container delegates. */
|
|
299
|
+
type CompilerKeyedRangeRowEvent = (item: unknown, index: number, eventId: number, rangeIndex: number) => React.EventHandler<React.SyntheticEvent> | undefined;
|
|
194
300
|
type CompilerMixedRange = ({
|
|
195
301
|
kind: "conditional";
|
|
196
302
|
} & CompilerConditionalRange) | ({
|
|
@@ -204,7 +310,14 @@ interface CompilerMixedRangesBlockProps {
|
|
|
204
310
|
}
|
|
205
311
|
interface CompilerKeyedRangesBlockProps {
|
|
206
312
|
id: number;
|
|
207
|
-
render(): React.ReactElement;
|
|
313
|
+
render(rowEvent?: CompilerKeyedRangeRowEvent): React.ReactElement;
|
|
314
|
+
/** Route row events of every range through the stable container. */
|
|
315
|
+
delegateEvents?: boolean;
|
|
316
|
+
/**
|
|
317
|
+
* Route row events through the container only on a root without React DOM, which maps
|
|
318
|
+
* onChange to native events itself. Under React DOM, React renders the rows.
|
|
319
|
+
*/
|
|
320
|
+
delegateEventsWithoutReact?: boolean;
|
|
208
321
|
rootRef?: React.RefCallback<Element>;
|
|
209
322
|
ranges: readonly CompilerKeyedRange[];
|
|
210
323
|
/** Number of static direct host siblings after the final keyed range. */
|
|
@@ -244,13 +357,162 @@ interface CompiledComponentDefinition<Props> {
|
|
|
244
357
|
render(props: Props, state: readonly CompilerCell[], blocks: CompilerBlockRuntime): React.ReactElement;
|
|
245
358
|
bindings: readonly CompilerBinding<Props>[];
|
|
246
359
|
}
|
|
360
|
+
type CompilerBlockRefresh = (afterCommit?: () => void, dirtyState?: ReadonlySet<number>) => void;
|
|
361
|
+
interface CompilerRuntimeFeatureOwner {
|
|
362
|
+
setRoot(id: number, root: Element | null, expectedRoot?: Element | null): void;
|
|
363
|
+
subscribe(id: number, refresh: CompilerBlockRefresh): () => void;
|
|
364
|
+
/** Opaque identity used to detect compatible definition replacement. */
|
|
365
|
+
getDefinitionVersion?(): unknown;
|
|
366
|
+
}
|
|
367
|
+
interface CompilerRuntimeFeature {
|
|
368
|
+
/** Stable identity used by Fast Refresh compatibility checks. */
|
|
369
|
+
name: string;
|
|
370
|
+
create(owner: CompilerRuntimeFeatureOwner): Partial<CompilerBlockRuntime>;
|
|
371
|
+
}
|
|
372
|
+
declare const conditionalRuntimeFeature: CompilerRuntimeFeature;
|
|
373
|
+
declare const hostConditionalRuntimeFeature: CompilerRuntimeFeature;
|
|
374
|
+
declare const conditionalRangesRuntimeFeature: CompilerRuntimeFeature;
|
|
375
|
+
declare const keyedListRuntimeFeature: CompilerRuntimeFeature;
|
|
376
|
+
declare const keyedRowsRuntimeFeature: CompilerRuntimeFeature;
|
|
377
|
+
declare const keyedRowsPlainRuntimeFeature: CompilerRuntimeFeature;
|
|
378
|
+
declare const keyedRowsIdentityRuntimeFeature: CompilerRuntimeFeature;
|
|
379
|
+
declare const keyedRowsMembershipRuntimeFeature: CompilerRuntimeFeature;
|
|
380
|
+
declare const keyedRowsMapLookupRuntimeFeature: CompilerRuntimeFeature;
|
|
381
|
+
declare const keyedRowsHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
382
|
+
declare const keyedRowsAppendOnlyRuntimeFeature: CompilerRuntimeFeature;
|
|
383
|
+
declare const keyedRowsPositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
384
|
+
declare const keyedRowsPlainPositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
385
|
+
declare const keyedRowsBatchPositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
386
|
+
declare const keyedRowsWindowPositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
387
|
+
declare const keyedRowsReorderHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
388
|
+
declare const keyedRowsPlainReorderHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
389
|
+
declare const keyedRowsPlainMapReorderHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
390
|
+
declare const keyedRowsMapReorderHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
391
|
+
declare const keyedRowsAllHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
392
|
+
declare const keyedRowsMappedRollingWindowHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
393
|
+
declare const keyedRowsEveryHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
394
|
+
declare const keyedRowsBatchEveryHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
395
|
+
declare const keyedRowsWindowEveryHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
396
|
+
declare const keyedRowsFilterHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
397
|
+
declare const keyedRowsFilterOnlyRuntimeFeature: CompilerRuntimeFeature;
|
|
398
|
+
declare const keyedRowsIdentityFilterHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
399
|
+
declare const keyedRowsIdentityFilterOnlyRuntimeFeature: CompilerRuntimeFeature;
|
|
400
|
+
declare const keyedRowsStructuralAppendHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
401
|
+
declare const keyedRowsStructuralAppendMapHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
402
|
+
declare const keyedRowsStructuralPrependHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
403
|
+
declare const keyedRowsStructuralPrependMapHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
404
|
+
declare const keyedRowsPrependHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
405
|
+
declare const keyedRowsPrependOnlyRuntimeFeature: CompilerRuntimeFeature;
|
|
406
|
+
declare const keyedRowsFilterPrependHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
407
|
+
declare const keyedRowsConditionalRuntimeFeature: CompilerRuntimeFeature;
|
|
408
|
+
declare const keyedRowsConditionalHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
409
|
+
declare const keyedRowsConditionalPositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
410
|
+
declare const keyedRowsConditionalBatchPositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
411
|
+
declare const keyedRowsConditionalWindowPositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
412
|
+
declare const keyedRowsConditionalReorderHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
413
|
+
declare const keyedRowsConditionalAllHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
414
|
+
declare const keyedRowsConditionalMappedRollingWindowHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
415
|
+
declare const keyedRowsConditionalEveryHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
416
|
+
declare const keyedRowsConditionalBatchEveryHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
417
|
+
declare const keyedRowsConditionalWindowEveryHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
418
|
+
declare const keyedRowsConditionalFilterHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
419
|
+
declare const keyedRowsConditionalStructuralAppendHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
420
|
+
declare const keyedRowsConditionalStructuralAppendMapHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
421
|
+
declare const keyedRowsConditionalStructuralPrependHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
422
|
+
declare const keyedRowsConditionalStructuralPrependMapHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
423
|
+
declare const keyedRowsConditionalPrependHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
424
|
+
declare const keyedRowsConditionalFilterPrependHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
425
|
+
declare const keyedRowsHostRuntimeFeature: CompilerRuntimeFeature;
|
|
426
|
+
declare const keyedRowsHostHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
427
|
+
declare const keyedRowsHostPositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
428
|
+
declare const keyedRowsHostBatchPositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
429
|
+
declare const keyedRowsHostWindowPositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
430
|
+
declare const keyedRowsHostReorderHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
431
|
+
declare const keyedRowsHostAllHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
432
|
+
declare const keyedRowsHostMappedRollingWindowHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
433
|
+
declare const keyedRowsHostEveryHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
434
|
+
declare const keyedRowsHostBatchEveryHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
435
|
+
declare const keyedRowsHostWindowEveryHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
436
|
+
declare const keyedRowsHostFilterHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
437
|
+
declare const keyedRowsHostStructuralAppendHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
438
|
+
declare const keyedRowsHostStructuralAppendMapHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
439
|
+
declare const keyedRowsHostStructuralPrependHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
440
|
+
declare const keyedRowsHostStructuralPrependMapHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
441
|
+
declare const keyedRowsHostPrependHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
442
|
+
declare const keyedRowsHostFilterPrependHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
443
|
+
declare const keyedRowsCompleteRuntimeFeature: CompilerRuntimeFeature;
|
|
444
|
+
declare const keyedRowsCompleteHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
445
|
+
declare const keyedRowsCompletePositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
446
|
+
declare const keyedRowsCompleteBatchPositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
447
|
+
declare const keyedRowsCompleteWindowPositionHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
448
|
+
declare const keyedRowsCompleteReorderHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
449
|
+
declare const keyedRowsCompleteAllHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
450
|
+
declare const keyedRowsCompleteMappedRollingWindowHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
451
|
+
declare const keyedRowsCompleteEveryHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
452
|
+
declare const keyedRowsCompleteBatchEveryHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
453
|
+
declare const keyedRowsCompleteWindowEveryHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
454
|
+
declare const keyedRowsCompleteFilterHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
455
|
+
declare const keyedRowsCompleteStructuralAppendHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
456
|
+
declare const keyedRowsCompleteStructuralAppendMapHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
457
|
+
declare const keyedRowsCompleteStructuralPrependHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
458
|
+
declare const keyedRowsCompleteStructuralPrependMapHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
459
|
+
declare const keyedRowsCompletePrependHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
460
|
+
declare const keyedRowsCompleteFilterPrependHintedRuntimeFeature: CompilerRuntimeFeature;
|
|
461
|
+
declare const keyedRangesRuntimeFeature: CompilerRuntimeFeature;
|
|
462
|
+
declare const mixedRangesRuntimeFeature: CompilerRuntimeFeature;
|
|
463
|
+
declare const componentRuntimeFeature: CompilerRuntimeFeature;
|
|
247
464
|
/**
|
|
248
|
-
*
|
|
465
|
+
* Tree-shakable runtime target emitted by the AOT transform.
|
|
249
466
|
*
|
|
250
467
|
* React owns initial placement, SSR, hydration, props, and event semantics.
|
|
251
|
-
* Compiler cells own local updates and precomputed DOM paths.
|
|
252
|
-
*
|
|
468
|
+
* Compiler cells own local updates and precomputed DOM paths. Structural
|
|
469
|
+
* helpers are installed only when the compiler emitted that boundary kind.
|
|
470
|
+
*/
|
|
471
|
+
declare function createCompiledComponentWithFeatures<Props>(definition: CompiledComponentDefinition<Props>, runtimeFeatures: readonly CompilerRuntimeFeature[]): React.ComponentType<Props>;
|
|
472
|
+
/**
|
|
473
|
+
* Compiler target when import.meta.hot is absent. The refresh-capable entry
|
|
474
|
+
* remains available for development and existing hand-authored definitions.
|
|
475
|
+
* Keeping that choice at the call site makes its registry tree-shakable.
|
|
476
|
+
* @internal
|
|
477
|
+
*/
|
|
478
|
+
declare function createCompiledComponentWithoutRefresh<Props>(definition: CompiledComponentDefinition<Props>, runtimeFeatures: readonly CompilerRuntimeFeature[]): React.ComponentType<Props>;
|
|
479
|
+
/**
|
|
480
|
+
* Compatibility entry for hand-authored runtime definitions.
|
|
481
|
+
* Compiler output uses createCompiledComponentWithFeatures so unused structural
|
|
482
|
+
* runtimes can be removed from production bundles.
|
|
253
483
|
*/
|
|
254
484
|
declare function createCompiledComponent<Props>(definition: CompiledComponentDefinition<Props>): React.ComponentType<Props>;
|
|
485
|
+
interface CompiledRoot {
|
|
486
|
+
render(element: React.ReactNode): void;
|
|
487
|
+
unmount(): void;
|
|
488
|
+
}
|
|
489
|
+
interface CompiledRootOptions {
|
|
490
|
+
/** Passed to React DOM's createRoot() if the root falls back to React DOM. */
|
|
491
|
+
reactRootOptions?: unknown;
|
|
492
|
+
/**
|
|
493
|
+
* Called with the reason when the root uses React DOM instead. The default is silent, so an
|
|
494
|
+
* app's visitors see nothing in their console; the compiler report lists uncompiled components.
|
|
495
|
+
*/
|
|
496
|
+
onFallback?(reason: string): void;
|
|
497
|
+
}
|
|
498
|
+
interface CompiledRootReactDOM {
|
|
499
|
+
createRoot(container: Element, options?: never): {
|
|
500
|
+
render(element: React.ReactNode): void;
|
|
501
|
+
unmount(): void;
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Experimental: a createRoot() that mounts a fully compiled tree without loading React DOM.
|
|
506
|
+
*
|
|
507
|
+
* It renders host elements, fragments, the compiler runtime's components and hook-free function
|
|
508
|
+
* components into a detached fragment, then commits it, runs refs and componentDidMount, and
|
|
509
|
+
* leaves updates to the compiled runtime. Anything else (hooks, context, Suspense, portals,
|
|
510
|
+
* props React renames) loads React DOM on demand and lets it render the root instead, before
|
|
511
|
+
* anything is shown. If a mounted compiler component later needs a React re-render (its
|
|
512
|
+
* fallback, error and refresh paths), React DOM takes over and renders the root again: that
|
|
513
|
+
* root's compiled state starts over. Pages with Fast Refresh installed use React DOM, which is
|
|
514
|
+
* the only renderer Fast Refresh updates.
|
|
515
|
+
*/
|
|
516
|
+
declare function createCompiledRoot(container: Element, options: CompiledRootOptions, loadReactDOM: () => Promise<CompiledRootReactDOM>): CompiledRoot;
|
|
255
517
|
|
|
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 };
|
|
518
|
+
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 };
|