@farm.js/react 0.1.0-beta.7 → 0.1.0-beta.8
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 +53 -14
- package/dist/compiler-runtime.cjs +637 -34
- package/dist/compiler-runtime.cjs.map +1 -1
- package/dist/compiler-runtime.d.mts +21 -1
- package/dist/compiler-runtime.d.ts +21 -1
- package/dist/compiler-runtime.mjs +620 -35
- package/dist/compiler-runtime.mjs.map +1 -1
- package/dist/vite.cjs +90 -10
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.mjs +90 -10
- package/dist/vite.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -32,6 +32,8 @@ var COMPILER_KEYED_ARRAY_FILTERS = /* @__PURE__ */ new WeakMap();
|
|
|
32
32
|
var COMPILER_KEYED_ARRAY_PREPENDS = /* @__PURE__ */ new WeakMap();
|
|
33
33
|
var COMPILER_KEYED_ARRAY_ROLLING_WINDOWS = /* @__PURE__ */ new WeakMap();
|
|
34
34
|
var COMPILER_KEYED_ARRAY_POSITIONS = /* @__PURE__ */ new WeakMap();
|
|
35
|
+
var COMPILER_KEYED_ARRAY_BATCH_INSERTS = /* @__PURE__ */ new WeakMap();
|
|
36
|
+
var COMPILER_KEYED_ARRAY_WINDOW_REPLACEMENTS = /* @__PURE__ */ new WeakMap();
|
|
35
37
|
var COMPILER_KEYED_ARRAY_REORDERS = /* @__PURE__ */ new WeakMap();
|
|
36
38
|
var COMPILER_KEYED_COLLECTION_DRAFTS = /* @__PURE__ */ new WeakMap();
|
|
37
39
|
var COMPILER_KEYED_COLLECTION_UPDATES = /* @__PURE__ */ new WeakMap();
|
|
@@ -164,11 +166,40 @@ function compilerKeyedArrayPosition(value, sourceToken, expectedLength) {
|
|
|
164
166
|
const target = compilerObject(value);
|
|
165
167
|
if (!target || !sourceToken || !Array.isArray(value)) return void 0;
|
|
166
168
|
const update = COMPILER_KEYED_ARRAY_POSITIONS.get(target);
|
|
167
|
-
if (!update || update.sourceToken !== sourceToken || update.sourceLength !== expectedLength || update.resultLength !== value.length || update.position < 0 || update.position > expectedLength || update.kind === "insert" && update.resultLength !== expectedLength + 1 || update.kind === "remove" && (update.
|
|
169
|
+
if (!update || update.sourceToken !== sourceToken || update.sourceLength !== expectedLength || update.resultLength !== value.length || update.position < 0 || update.position > expectedLength || update.kind === "insert" && update.resultLength !== expectedLength + 1 || update.kind === "remove" && (update.resultLength >= expectedLength || update.position > update.resultLength) || update.kind === "replace" && (update.position >= expectedLength || update.resultLength !== expectedLength)) {
|
|
168
170
|
return void 0;
|
|
169
171
|
}
|
|
170
172
|
return update;
|
|
171
173
|
}
|
|
174
|
+
function compilerKeyedArrayBatchInsert(value, sourceToken, expectedLength) {
|
|
175
|
+
const target = compilerObject(value);
|
|
176
|
+
if (!target || !sourceToken || !Array.isArray(value)) return void 0;
|
|
177
|
+
const update = COMPILER_KEYED_ARRAY_BATCH_INSERTS.get(target);
|
|
178
|
+
if (!update || update.sourceToken !== sourceToken || update.sourceLength !== expectedLength || update.resultLength !== value.length || update.resultLength < expectedLength + 2 || update.position < 0 || update.position > expectedLength) {
|
|
179
|
+
return void 0;
|
|
180
|
+
}
|
|
181
|
+
return update;
|
|
182
|
+
}
|
|
183
|
+
function compilerKeyedArrayWindowReplacements(value, sourceToken, expectedLength) {
|
|
184
|
+
const target = compilerObject(value);
|
|
185
|
+
if (!target || !sourceToken || !Array.isArray(value)) return void 0;
|
|
186
|
+
const update = COMPILER_KEYED_ARRAY_WINDOW_REPLACEMENTS.get(target);
|
|
187
|
+
if (!update || update.sourceToken !== sourceToken) return void 0;
|
|
188
|
+
const updates = [];
|
|
189
|
+
for (let current = update; current; current = current.previous) {
|
|
190
|
+
if (current.sourceToken !== sourceToken) return void 0;
|
|
191
|
+
updates.push(current);
|
|
192
|
+
}
|
|
193
|
+
updates.reverse();
|
|
194
|
+
let length = expectedLength;
|
|
195
|
+
for (const current of updates) {
|
|
196
|
+
if (current.sourceLength !== length || current.position < 0 || current.position >= current.sourceLength || current.removedCount < 1 || current.position + current.removedCount > current.sourceLength || current.insertedCount < 0 || current.resultLength !== current.sourceLength - current.removedCount + current.insertedCount) {
|
|
197
|
+
return void 0;
|
|
198
|
+
}
|
|
199
|
+
length = current.resultLength;
|
|
200
|
+
}
|
|
201
|
+
return length === value.length ? updates : void 0;
|
|
202
|
+
}
|
|
172
203
|
function compilerKeyedArrayReorder(value, sourceToken, expectedLength) {
|
|
173
204
|
const target = compilerObject(value);
|
|
174
205
|
if (!target || !sourceToken || !Array.isArray(value)) return void 0;
|
|
@@ -380,9 +411,11 @@ function createCompilerKeyedArrayPositionUpdate(previous, method, kind, position
|
|
|
380
411
|
}
|
|
381
412
|
const sourceLength = previous.length;
|
|
382
413
|
const normalizedPosition = position < 0 ? Math.max(sourceLength + position, 0) : Math.min(position, sourceLength);
|
|
414
|
+
const deleteCount = args[0];
|
|
415
|
+
const removedCount = sourceLength - value.length;
|
|
383
416
|
const validInsert = kind === "insert" && method === NATIVE_ARRAY_TO_SPLICED && args.length === 2 && Object.is(args[0], 0) && value.length === sourceLength + 1;
|
|
384
|
-
const validRemove = kind === "remove" && method === NATIVE_ARRAY_TO_SPLICED && args.length === 1 &&
|
|
385
|
-
const validReplace = kind === "replace" && method === NATIVE_ARRAY_WITH && args.length === 1 && position >= -sourceLength && position < sourceLength &&
|
|
417
|
+
const validRemove = kind === "remove" && method === NATIVE_ARRAY_TO_SPLICED && args.length === 1 && Number.isSafeInteger(deleteCount) && deleteCount > 0 && normalizedPosition < sourceLength && removedCount === Math.min(deleteCount, sourceLength - normalizedPosition);
|
|
418
|
+
const validReplace = kind === "replace" && value.length === sourceLength && (method === NATIVE_ARRAY_WITH && args.length === 1 && position >= -sourceLength && position < sourceLength || method === NATIVE_ARRAY_TO_SPLICED && args.length === 2 && Object.is(args[0], 1) && normalizedPosition < sourceLength);
|
|
386
419
|
if (!validInsert && !validRemove && !validReplace) return value;
|
|
387
420
|
const sourceToken = compilerKeyedCollectionToken(previousTarget);
|
|
388
421
|
if (!sourceToken) return value;
|
|
@@ -397,6 +430,71 @@ function createCompilerKeyedArrayPositionUpdate(previous, method, kind, position
|
|
|
397
430
|
}
|
|
398
431
|
return value;
|
|
399
432
|
}
|
|
433
|
+
function createCompilerKeyedArrayBatchInsert(previous, method, position, ...items) {
|
|
434
|
+
const value = NATIVE_REFLECT_APPLY(
|
|
435
|
+
method,
|
|
436
|
+
previous,
|
|
437
|
+
[position, 0, ...items]
|
|
438
|
+
);
|
|
439
|
+
try {
|
|
440
|
+
const previousTarget = compilerObject(previous);
|
|
441
|
+
const valueTarget = compilerObject(value);
|
|
442
|
+
if (!previousTarget || !valueTarget || !COMPILER_KEYED_COMMITTED_COLLECTIONS.has(previousTarget) || !Array.isArray(previous) || !Array.isArray(value) || Object.getPrototypeOf(previous) !== NATIVE_ARRAY_PROTOTYPE || Object.getPrototypeOf(value) !== NATIVE_ARRAY_PROTOTYPE || method !== NATIVE_ARRAY_TO_SPLICED || !Number.isSafeInteger(position) || items.length < 2 || value.length !== previous.length + items.length) {
|
|
443
|
+
return value;
|
|
444
|
+
}
|
|
445
|
+
for (let index = 0; index < previous.length; index += 1) {
|
|
446
|
+
if (!Object.prototype.hasOwnProperty.call(previous, index)) return value;
|
|
447
|
+
}
|
|
448
|
+
const sourceToken = compilerKeyedCollectionToken(previousTarget);
|
|
449
|
+
if (!sourceToken) return value;
|
|
450
|
+
COMPILER_KEYED_ARRAY_BATCH_INSERTS.set(valueTarget, {
|
|
451
|
+
sourceToken,
|
|
452
|
+
sourceLength: previous.length,
|
|
453
|
+
resultLength: value.length,
|
|
454
|
+
position: position < 0 ? Math.max(previous.length + position, 0) : Math.min(position, previous.length)
|
|
455
|
+
});
|
|
456
|
+
} catch {
|
|
457
|
+
}
|
|
458
|
+
return value;
|
|
459
|
+
}
|
|
460
|
+
function createCompilerKeyedArrayWindowReplace(previous, method, position, deleteCount, ...items) {
|
|
461
|
+
const value = NATIVE_REFLECT_APPLY(
|
|
462
|
+
method,
|
|
463
|
+
previous,
|
|
464
|
+
[position, deleteCount, ...items]
|
|
465
|
+
);
|
|
466
|
+
try {
|
|
467
|
+
const previousTarget = compilerObject(previous);
|
|
468
|
+
const valueTarget = compilerObject(value);
|
|
469
|
+
if (!previousTarget || !valueTarget || !Array.isArray(previous) || !Array.isArray(value) || Object.getPrototypeOf(previous) !== NATIVE_ARRAY_PROTOTYPE || Object.getPrototypeOf(value) !== NATIVE_ARRAY_PROTOTYPE || method !== NATIVE_ARRAY_TO_SPLICED || !Number.isSafeInteger(position) || !Number.isSafeInteger(deleteCount) || deleteCount <= 0) {
|
|
470
|
+
return value;
|
|
471
|
+
}
|
|
472
|
+
for (let index = 0; index < previous.length; index += 1) {
|
|
473
|
+
if (!Object.prototype.hasOwnProperty.call(previous, index)) return value;
|
|
474
|
+
}
|
|
475
|
+
const normalizedPosition = position < 0 ? Math.max(previous.length + position, 0) : Math.min(position, previous.length);
|
|
476
|
+
const removedCount = Math.min(deleteCount, previous.length - normalizedPosition);
|
|
477
|
+
if (removedCount < 1 || value.length !== previous.length - removedCount + items.length) {
|
|
478
|
+
return value;
|
|
479
|
+
}
|
|
480
|
+
const committedSource = COMPILER_KEYED_COMMITTED_COLLECTIONS.has(previousTarget);
|
|
481
|
+
const previousUpdate = committedSource ? void 0 : COMPILER_KEYED_ARRAY_WINDOW_REPLACEMENTS.get(previousTarget);
|
|
482
|
+
if (!committedSource && !previousUpdate) return value;
|
|
483
|
+
const sourceToken = previousUpdate?.sourceToken || compilerKeyedCollectionToken(previousTarget);
|
|
484
|
+
if (!sourceToken) return value;
|
|
485
|
+
COMPILER_KEYED_ARRAY_WINDOW_REPLACEMENTS.set(valueTarget, {
|
|
486
|
+
sourceToken,
|
|
487
|
+
sourceLength: previous.length,
|
|
488
|
+
resultLength: value.length,
|
|
489
|
+
position: normalizedPosition,
|
|
490
|
+
removedCount,
|
|
491
|
+
insertedCount: items.length,
|
|
492
|
+
...previousUpdate ? { previous: previousUpdate } : {}
|
|
493
|
+
});
|
|
494
|
+
} catch {
|
|
495
|
+
}
|
|
496
|
+
return value;
|
|
497
|
+
}
|
|
400
498
|
function createCompilerKeyedArrayReorder(previous, method) {
|
|
401
499
|
const value = NATIVE_REFLECT_APPLY(
|
|
402
500
|
method,
|
|
@@ -1132,6 +1230,32 @@ function applyKeyedRowBinding(props, instance, item, index, bindingIndex) {
|
|
|
1132
1230
|
updateAttribute(target, binding.name, rawValue);
|
|
1133
1231
|
}
|
|
1134
1232
|
}
|
|
1233
|
+
function prepareKeyedRowBindingUpdates(props, instance, item, index) {
|
|
1234
|
+
const updates = [];
|
|
1235
|
+
for (let bindingIndex = 0; bindingIndex < props.bindings.length; bindingIndex += 1) {
|
|
1236
|
+
const binding = props.bindings[bindingIndex];
|
|
1237
|
+
const rawValue = binding.read(item, index);
|
|
1238
|
+
const value = normalizedKeyedRowBindingValue(binding, rawValue);
|
|
1239
|
+
if (Object.is(instance.values[bindingIndex], value)) continue;
|
|
1240
|
+
const target = findCompilerHostTarget(instance.element, binding.path);
|
|
1241
|
+
if (!target || binding.kind !== "text" && !binding.name) return void 0;
|
|
1242
|
+
updates.push([bindingIndex, rawValue, target, value]);
|
|
1243
|
+
}
|
|
1244
|
+
return updates;
|
|
1245
|
+
}
|
|
1246
|
+
function applyPreparedKeyedRowBindingUpdates(props, instance, updates) {
|
|
1247
|
+
for (const [bindingIndex, rawValue, target, value] of updates) {
|
|
1248
|
+
const binding = props.bindings[bindingIndex];
|
|
1249
|
+
instance.values[bindingIndex] = value;
|
|
1250
|
+
if (binding.kind === "text") {
|
|
1251
|
+
target.textContent = value;
|
|
1252
|
+
} else if (binding.kind === "style") {
|
|
1253
|
+
updateStyle(target, binding.name, rawValue);
|
|
1254
|
+
} else {
|
|
1255
|
+
updateAttribute(target, binding.name, rawValue);
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1135
1259
|
function keyedRowConditionalSnapshot(conditional, item, index) {
|
|
1136
1260
|
const test = conditional.test(item, index);
|
|
1137
1261
|
if (conditional.logical && !test) {
|
|
@@ -2574,6 +2698,33 @@ function longestIncreasingSubsequencePositions(sequence) {
|
|
|
2574
2698
|
}
|
|
2575
2699
|
return positions;
|
|
2576
2700
|
}
|
|
2701
|
+
function reorderCompilerKeyedRows(root, instances, sequence, anchor) {
|
|
2702
|
+
const activeElement = root.ownerDocument.activeElement;
|
|
2703
|
+
const restoreFocus = Boolean(activeElement && root.contains(activeElement));
|
|
2704
|
+
const stablePositions = longestIncreasingSubsequencePositions(sequence);
|
|
2705
|
+
for (let index = instances.length - 1; index >= 0; index -= 1) {
|
|
2706
|
+
const instance = instances[index];
|
|
2707
|
+
if (sequence[index] < 0) {
|
|
2708
|
+
let start = index;
|
|
2709
|
+
while (start > 0 && sequence[start - 1] < 0) start -= 1;
|
|
2710
|
+
const fragment = root.ownerDocument.createDocumentFragment();
|
|
2711
|
+
for (let itemIndex = start; itemIndex <= index; itemIndex += 1) {
|
|
2712
|
+
fragment.append(instances[itemIndex].element);
|
|
2713
|
+
}
|
|
2714
|
+
root.insertBefore(fragment, anchor);
|
|
2715
|
+
anchor = instances[start].element;
|
|
2716
|
+
index = start;
|
|
2717
|
+
} else {
|
|
2718
|
+
if (!stablePositions.has(index) && instance.element.nextSibling !== anchor) {
|
|
2719
|
+
root.insertBefore(instance.element, anchor);
|
|
2720
|
+
}
|
|
2721
|
+
anchor = instance.element;
|
|
2722
|
+
}
|
|
2723
|
+
}
|
|
2724
|
+
if (restoreFocus && activeElement?.isConnected && activeElement.ownerDocument.activeElement !== activeElement && "focus" in activeElement) {
|
|
2725
|
+
activeElement.focus({ preventScroll: true });
|
|
2726
|
+
}
|
|
2727
|
+
}
|
|
2577
2728
|
var keyedUpdateRuntime = {
|
|
2578
2729
|
append: reconcileCompilerKeyedArrayAppend,
|
|
2579
2730
|
commit: commitCompilerKeyedCollection,
|
|
@@ -2595,6 +2746,14 @@ var keyedPositionUpdateRuntime = {
|
|
|
2595
2746
|
...keyedUpdateRuntime,
|
|
2596
2747
|
position: reconcileCompilerKeyedArrayPosition
|
|
2597
2748
|
};
|
|
2749
|
+
var keyedBatchPositionUpdateRuntime = {
|
|
2750
|
+
...keyedUpdateRuntime,
|
|
2751
|
+
position: reconcileCompilerKeyedArrayPositionWithBatch
|
|
2752
|
+
};
|
|
2753
|
+
var keyedWindowPositionUpdateRuntime = {
|
|
2754
|
+
...keyedUpdateRuntime,
|
|
2755
|
+
position: reconcileCompilerKeyedArrayPositionWithWindow
|
|
2756
|
+
};
|
|
2598
2757
|
var keyedReorderUpdateRuntime = {
|
|
2599
2758
|
...keyedUpdateRuntime,
|
|
2600
2759
|
reorder: reconcileCompilerKeyedArrayReorder
|
|
@@ -2608,6 +2767,14 @@ var keyedEveryUpdateRuntime = {
|
|
|
2608
2767
|
position: reconcileCompilerKeyedArrayPosition,
|
|
2609
2768
|
reorder: reconcileCompilerKeyedArrayReorder
|
|
2610
2769
|
};
|
|
2770
|
+
var keyedBatchEveryUpdateRuntime = {
|
|
2771
|
+
...keyedEveryUpdateRuntime,
|
|
2772
|
+
position: reconcileCompilerKeyedArrayPositionWithBatch
|
|
2773
|
+
};
|
|
2774
|
+
var keyedWindowEveryUpdateRuntime = {
|
|
2775
|
+
...keyedEveryUpdateRuntime,
|
|
2776
|
+
position: reconcileCompilerKeyedArrayPositionWithWindow
|
|
2777
|
+
};
|
|
2611
2778
|
function reconcileCompilerKeyedMapUpdate(props, dirtyState, collectionToken, instances, conditionals) {
|
|
2612
2779
|
const dependency = props.collectionDependency;
|
|
2613
2780
|
if (dependency === void 0) return void 0;
|
|
@@ -2788,10 +2955,16 @@ function reconcileCompilerKeyedArrayPosition(props, dirtyState, collectionToken,
|
|
|
2788
2955
|
const previousInstances = [...instances.values()];
|
|
2789
2956
|
const previous = previousInstances[update.position];
|
|
2790
2957
|
if (update.kind === "remove") {
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2958
|
+
const count = update.sourceLength - update.resultLength;
|
|
2959
|
+
const removed = previousInstances.slice(update.position, update.position + count);
|
|
2960
|
+
if (removed.some((instance, index) => instance.index !== update.position + index)) {
|
|
2961
|
+
return void 0;
|
|
2962
|
+
}
|
|
2963
|
+
for (const instance of removed) {
|
|
2964
|
+
instance.scope?.cleanup();
|
|
2965
|
+
instance.element.remove();
|
|
2966
|
+
}
|
|
2967
|
+
previousInstances.splice(update.position, count);
|
|
2795
2968
|
for (let index = update.position; index < previousInstances.length; index += 1) {
|
|
2796
2969
|
previousInstances[index].index = index;
|
|
2797
2970
|
}
|
|
@@ -2858,6 +3031,299 @@ function reconcileCompilerKeyedArrayPosition(props, dirtyState, collectionToken,
|
|
|
2858
3031
|
previousInstances[update.position] = replacement;
|
|
2859
3032
|
return new Map(previousInstances.map((instance) => [instance.key, instance]));
|
|
2860
3033
|
}
|
|
3034
|
+
function reconcileCompilerKeyedArrayBatchInsert(props, dirtyState, collectionToken, instances, root, reactOwnedRows) {
|
|
3035
|
+
if (reactOwnedRows || props.hostBlocks || (props.conditionals?.length || 0) > 0 || !props.positionIndexIndependent || props.collectionDependency === void 0) {
|
|
3036
|
+
return void 0;
|
|
3037
|
+
}
|
|
3038
|
+
const collectionDependency = props.collectionDependency;
|
|
3039
|
+
if (props.bindings.some((binding) => binding.dependencies?.includes(collectionDependency))) {
|
|
3040
|
+
return void 0;
|
|
3041
|
+
}
|
|
3042
|
+
const dependencies = props.dependencies || props.structureDependencies;
|
|
3043
|
+
const relevantDirty = (dependencies || []).filter((index) => dirtyState.has(index));
|
|
3044
|
+
if (relevantDirty.length !== 1 || relevantDirty[0] !== collectionDependency) {
|
|
3045
|
+
return void 0;
|
|
3046
|
+
}
|
|
3047
|
+
const finalValue = props.items();
|
|
3048
|
+
const update = compilerKeyedArrayBatchInsert(finalValue, collectionToken, instances.size);
|
|
3049
|
+
if (!update || !Array.isArray(finalValue)) return void 0;
|
|
3050
|
+
const previousInstances = [...instances.values()];
|
|
3051
|
+
const insertCount = update.resultLength - update.sourceLength;
|
|
3052
|
+
for (let sourceIndex = 0; sourceIndex < update.sourceLength; sourceIndex += 1) {
|
|
3053
|
+
const instance = previousInstances[sourceIndex];
|
|
3054
|
+
const resultIndex = sourceIndex < update.position ? sourceIndex : sourceIndex + insertCount;
|
|
3055
|
+
if (!instance || instance.index !== sourceIndex || !Object.is(instance.item, finalValue[resultIndex])) {
|
|
3056
|
+
return void 0;
|
|
3057
|
+
}
|
|
3058
|
+
}
|
|
3059
|
+
const knownKeys = new Set(instances.keys());
|
|
3060
|
+
const incoming = [];
|
|
3061
|
+
try {
|
|
3062
|
+
for (let offset = 0; offset < insertCount; offset += 1) {
|
|
3063
|
+
const index = update.position + offset;
|
|
3064
|
+
const item = finalValue[index];
|
|
3065
|
+
const key = keyedRowIdentity(props.rowKey(item, index));
|
|
3066
|
+
if (knownKeys.has(key)) return void 0;
|
|
3067
|
+
knownKeys.add(key);
|
|
3068
|
+
const descriptor = props.create(item, index);
|
|
3069
|
+
incoming.push({
|
|
3070
|
+
key,
|
|
3071
|
+
element: createCompilerHostElement(root.ownerDocument, descriptor),
|
|
3072
|
+
values: readKeyedRowBindingValues(props, item, index),
|
|
3073
|
+
item,
|
|
3074
|
+
index,
|
|
3075
|
+
conditionalValues: EMPTY_KEYED_ROW_CONDITIONAL_VALUES
|
|
3076
|
+
});
|
|
3077
|
+
}
|
|
3078
|
+
} catch {
|
|
3079
|
+
return void 0;
|
|
3080
|
+
}
|
|
3081
|
+
const fragment = root.ownerDocument.createDocumentFragment();
|
|
3082
|
+
for (const instance of incoming) fragment.append(instance.element);
|
|
3083
|
+
root.insertBefore(fragment, previousInstances[update.position]?.element || null);
|
|
3084
|
+
previousInstances.splice(update.position, 0, ...incoming);
|
|
3085
|
+
for (let index = update.position + insertCount; index < previousInstances.length; index += 1) {
|
|
3086
|
+
previousInstances[index].index = index;
|
|
3087
|
+
}
|
|
3088
|
+
return new Map(previousInstances.map((instance) => [instance.key, instance]));
|
|
3089
|
+
}
|
|
3090
|
+
function reconcileCompilerKeyedArrayWindowReplace(props, dirtyState, collectionToken, instances, root, reactOwnedRows) {
|
|
3091
|
+
if (reactOwnedRows || props.hostBlocks || (props.conditionals?.length || 0) > 0 || !props.positionIndexIndependent || props.collectionDependency === void 0) {
|
|
3092
|
+
return void 0;
|
|
3093
|
+
}
|
|
3094
|
+
const collectionDependency = props.collectionDependency;
|
|
3095
|
+
if (props.bindings.some((binding) => binding.dependencies?.includes(collectionDependency))) {
|
|
3096
|
+
return void 0;
|
|
3097
|
+
}
|
|
3098
|
+
const dependencies = props.dependencies || props.structureDependencies;
|
|
3099
|
+
const relevantDirty = (dependencies || []).filter((index) => dirtyState.has(index));
|
|
3100
|
+
if (relevantDirty.length !== 1 || relevantDirty[0] !== collectionDependency) {
|
|
3101
|
+
return void 0;
|
|
3102
|
+
}
|
|
3103
|
+
const finalValue = props.items();
|
|
3104
|
+
const updates = compilerKeyedArrayWindowReplacements(finalValue, collectionToken, instances.size);
|
|
3105
|
+
if (!updates || !Array.isArray(finalValue)) return void 0;
|
|
3106
|
+
const previousInstances = [...instances.values()];
|
|
3107
|
+
if (updates.length > 1) {
|
|
3108
|
+
const touchedIndices = /* @__PURE__ */ new Set();
|
|
3109
|
+
for (const update2 of updates) {
|
|
3110
|
+
if (update2.insertedCount !== update2.removedCount) return void 0;
|
|
3111
|
+
for (let index = update2.position; index < update2.position + update2.removedCount; index += 1) {
|
|
3112
|
+
touchedIndices.add(index);
|
|
3113
|
+
}
|
|
3114
|
+
}
|
|
3115
|
+
for (let index = 0; index < previousInstances.length; index += 1) {
|
|
3116
|
+
const instance = previousInstances[index];
|
|
3117
|
+
const touched = touchedIndices.has(index);
|
|
3118
|
+
if (!instance || instance.index !== index || (touched ? instance.element.parentNode !== root : !Object.is(instance.item, finalValue[index]))) {
|
|
3119
|
+
return void 0;
|
|
3120
|
+
}
|
|
3121
|
+
}
|
|
3122
|
+
const knownKeys2 = new Set(instances.keys());
|
|
3123
|
+
const incomingKeys2 = /* @__PURE__ */ new Set();
|
|
3124
|
+
let replacesRows = false;
|
|
3125
|
+
const prepared = [];
|
|
3126
|
+
try {
|
|
3127
|
+
for (const index of [...touchedIndices].sort((left, right) => left - right)) {
|
|
3128
|
+
const instance = previousInstances[index];
|
|
3129
|
+
const item = finalValue[index];
|
|
3130
|
+
const key = keyedRowIdentity(props.rowKey(item, index));
|
|
3131
|
+
if (key !== instance.key) {
|
|
3132
|
+
if (knownKeys2.has(key) || incomingKeys2.has(key)) return void 0;
|
|
3133
|
+
incomingKeys2.add(key);
|
|
3134
|
+
replacesRows = true;
|
|
3135
|
+
const descriptor = props.create(item, index);
|
|
3136
|
+
prepared.push([
|
|
3137
|
+
index,
|
|
3138
|
+
instance,
|
|
3139
|
+
item,
|
|
3140
|
+
void 0,
|
|
3141
|
+
{
|
|
3142
|
+
key,
|
|
3143
|
+
element: createCompilerHostElement(root.ownerDocument, descriptor),
|
|
3144
|
+
values: readKeyedRowBindingValues(props, item, index),
|
|
3145
|
+
item,
|
|
3146
|
+
index,
|
|
3147
|
+
conditionalValues: EMPTY_KEYED_ROW_CONDITIONAL_VALUES
|
|
3148
|
+
}
|
|
3149
|
+
]);
|
|
3150
|
+
continue;
|
|
3151
|
+
}
|
|
3152
|
+
const bindingUpdates = prepareKeyedRowBindingUpdates(props, instance, item, index);
|
|
3153
|
+
if (!bindingUpdates) return void 0;
|
|
3154
|
+
prepared.push([index, instance, item, bindingUpdates, void 0]);
|
|
3155
|
+
}
|
|
3156
|
+
} catch {
|
|
3157
|
+
return void 0;
|
|
3158
|
+
}
|
|
3159
|
+
for (const [index, instance, item, bindingUpdates, replacement] of prepared) {
|
|
3160
|
+
if (replacement) {
|
|
3161
|
+
instance.scope?.cleanup();
|
|
3162
|
+
instance.element.replaceWith(replacement.element);
|
|
3163
|
+
previousInstances[index] = replacement;
|
|
3164
|
+
} else {
|
|
3165
|
+
applyPreparedKeyedRowBindingUpdates(props, instance, bindingUpdates);
|
|
3166
|
+
instance.item = item;
|
|
3167
|
+
}
|
|
3168
|
+
}
|
|
3169
|
+
return replacesRows ? new Map(previousInstances.map((instance) => [instance.key, instance])) : instances;
|
|
3170
|
+
}
|
|
3171
|
+
const update = updates[0];
|
|
3172
|
+
const removedEnd = update.position + update.removedCount;
|
|
3173
|
+
for (let sourceIndex = 0; sourceIndex < update.sourceLength; sourceIndex += 1) {
|
|
3174
|
+
const instance = previousInstances[sourceIndex];
|
|
3175
|
+
if (!instance || instance.index !== sourceIndex) return void 0;
|
|
3176
|
+
if (sourceIndex >= update.position && sourceIndex < removedEnd) continue;
|
|
3177
|
+
const resultIndex = sourceIndex < update.position ? sourceIndex : sourceIndex - update.removedCount + update.insertedCount;
|
|
3178
|
+
if (!Object.is(instance.item, finalValue[resultIndex])) return void 0;
|
|
3179
|
+
}
|
|
3180
|
+
const removed = previousInstances.slice(update.position, removedEnd);
|
|
3181
|
+
const anchor = previousInstances[removedEnd]?.element;
|
|
3182
|
+
if (removed.length !== update.removedCount || removed.some((instance) => instance.element.parentNode !== root) || anchor && anchor.parentNode !== root) {
|
|
3183
|
+
return void 0;
|
|
3184
|
+
}
|
|
3185
|
+
const incomingItems = [];
|
|
3186
|
+
const incomingKeys = [];
|
|
3187
|
+
try {
|
|
3188
|
+
for (let offset = 0; offset < update.insertedCount; offset += 1) {
|
|
3189
|
+
const index = update.position + offset;
|
|
3190
|
+
const item = finalValue[index];
|
|
3191
|
+
const key = keyedRowIdentity(props.rowKey(item, index));
|
|
3192
|
+
incomingItems.push(item);
|
|
3193
|
+
incomingKeys.push(key);
|
|
3194
|
+
}
|
|
3195
|
+
} catch {
|
|
3196
|
+
return void 0;
|
|
3197
|
+
}
|
|
3198
|
+
if (update.insertedCount === update.removedCount && incomingKeys.every((key, offset) => key === removed[offset].key)) {
|
|
3199
|
+
const prepared = [];
|
|
3200
|
+
try {
|
|
3201
|
+
for (let offset = 0; offset < update.insertedCount; offset += 1) {
|
|
3202
|
+
const updates2 = prepareKeyedRowBindingUpdates(
|
|
3203
|
+
props,
|
|
3204
|
+
removed[offset],
|
|
3205
|
+
incomingItems[offset],
|
|
3206
|
+
update.position + offset
|
|
3207
|
+
);
|
|
3208
|
+
if (!updates2) return void 0;
|
|
3209
|
+
prepared.push(updates2);
|
|
3210
|
+
}
|
|
3211
|
+
} catch {
|
|
3212
|
+
return void 0;
|
|
3213
|
+
}
|
|
3214
|
+
for (let offset = 0; offset < update.insertedCount; offset += 1) {
|
|
3215
|
+
applyPreparedKeyedRowBindingUpdates(props, removed[offset], prepared[offset]);
|
|
3216
|
+
removed[offset].item = incomingItems[offset];
|
|
3217
|
+
}
|
|
3218
|
+
return instances;
|
|
3219
|
+
}
|
|
3220
|
+
if (update.insertedCount === update.removedCount) {
|
|
3221
|
+
const incomingKeySet = new Set(incomingKeys);
|
|
3222
|
+
if (incomingKeySet.size !== incomingKeys.length) return void 0;
|
|
3223
|
+
const removedByKey = new Map(
|
|
3224
|
+
removed.map((instance, offset) => [instance.key, { instance, offset }])
|
|
3225
|
+
);
|
|
3226
|
+
if (incomingKeys.some((key) => removedByKey.has(key))) {
|
|
3227
|
+
const nextWindow = [];
|
|
3228
|
+
const sequence = [];
|
|
3229
|
+
const preparedBindings = [];
|
|
3230
|
+
try {
|
|
3231
|
+
for (let offset = 0; offset < update.insertedCount; offset += 1) {
|
|
3232
|
+
const index = update.position + offset;
|
|
3233
|
+
const item = incomingItems[offset];
|
|
3234
|
+
const key = incomingKeys[offset];
|
|
3235
|
+
const retained = removedByKey.get(key);
|
|
3236
|
+
if (retained) {
|
|
3237
|
+
const bindingUpdates = prepareKeyedRowBindingUpdates(
|
|
3238
|
+
props,
|
|
3239
|
+
retained.instance,
|
|
3240
|
+
item,
|
|
3241
|
+
index
|
|
3242
|
+
);
|
|
3243
|
+
if (!bindingUpdates) return void 0;
|
|
3244
|
+
nextWindow.push(retained.instance);
|
|
3245
|
+
sequence.push(retained.offset);
|
|
3246
|
+
preparedBindings.push(bindingUpdates);
|
|
3247
|
+
continue;
|
|
3248
|
+
}
|
|
3249
|
+
if (instances.has(key)) return void 0;
|
|
3250
|
+
const descriptor = props.create(item, index);
|
|
3251
|
+
nextWindow.push({
|
|
3252
|
+
key,
|
|
3253
|
+
element: createCompilerHostElement(root.ownerDocument, descriptor),
|
|
3254
|
+
values: readKeyedRowBindingValues(props, item, index),
|
|
3255
|
+
item,
|
|
3256
|
+
index,
|
|
3257
|
+
conditionalValues: EMPTY_KEYED_ROW_CONDITIONAL_VALUES
|
|
3258
|
+
});
|
|
3259
|
+
sequence.push(-1);
|
|
3260
|
+
preparedBindings.push(void 0);
|
|
3261
|
+
}
|
|
3262
|
+
} catch {
|
|
3263
|
+
return void 0;
|
|
3264
|
+
}
|
|
3265
|
+
for (const instance of removed) {
|
|
3266
|
+
if (incomingKeySet.has(instance.key)) continue;
|
|
3267
|
+
instance.scope?.cleanup();
|
|
3268
|
+
instance.element.remove();
|
|
3269
|
+
}
|
|
3270
|
+
for (let offset = 0; offset < nextWindow.length; offset += 1) {
|
|
3271
|
+
const bindingUpdates = preparedBindings[offset];
|
|
3272
|
+
if (bindingUpdates) {
|
|
3273
|
+
const instance = nextWindow[offset];
|
|
3274
|
+
applyPreparedKeyedRowBindingUpdates(props, instance, bindingUpdates);
|
|
3275
|
+
instance.item = incomingItems[offset];
|
|
3276
|
+
instance.index = update.position + offset;
|
|
3277
|
+
}
|
|
3278
|
+
}
|
|
3279
|
+
reorderCompilerKeyedRows(root, nextWindow, sequence, anchor || null);
|
|
3280
|
+
previousInstances.splice(update.position, update.removedCount, ...nextWindow);
|
|
3281
|
+
return new Map(previousInstances.map((instance) => [instance.key, instance]));
|
|
3282
|
+
}
|
|
3283
|
+
}
|
|
3284
|
+
const knownKeys = new Set(instances.keys());
|
|
3285
|
+
const incoming = [];
|
|
3286
|
+
try {
|
|
3287
|
+
for (let offset = 0; offset < update.insertedCount; offset += 1) {
|
|
3288
|
+
const index = update.position + offset;
|
|
3289
|
+
const item = incomingItems[offset];
|
|
3290
|
+
const key = incomingKeys[offset];
|
|
3291
|
+
if (knownKeys.has(key)) return void 0;
|
|
3292
|
+
knownKeys.add(key);
|
|
3293
|
+
const descriptor = props.create(item, index);
|
|
3294
|
+
incoming.push({
|
|
3295
|
+
key,
|
|
3296
|
+
element: createCompilerHostElement(root.ownerDocument, descriptor),
|
|
3297
|
+
values: readKeyedRowBindingValues(props, item, index),
|
|
3298
|
+
item,
|
|
3299
|
+
index,
|
|
3300
|
+
conditionalValues: EMPTY_KEYED_ROW_CONDITIONAL_VALUES
|
|
3301
|
+
});
|
|
3302
|
+
}
|
|
3303
|
+
} catch {
|
|
3304
|
+
return void 0;
|
|
3305
|
+
}
|
|
3306
|
+
for (const instance of removed) {
|
|
3307
|
+
instance.scope?.cleanup();
|
|
3308
|
+
instance.element.remove();
|
|
3309
|
+
}
|
|
3310
|
+
if (incoming.length > 0) {
|
|
3311
|
+
const fragment = root.ownerDocument.createDocumentFragment();
|
|
3312
|
+
for (const instance of incoming) fragment.append(instance.element);
|
|
3313
|
+
root.insertBefore(fragment, anchor || null);
|
|
3314
|
+
}
|
|
3315
|
+
previousInstances.splice(update.position, update.removedCount, ...incoming);
|
|
3316
|
+
for (let index = update.position + update.insertedCount; index < previousInstances.length; index += 1) {
|
|
3317
|
+
previousInstances[index].index = index;
|
|
3318
|
+
}
|
|
3319
|
+
return new Map(previousInstances.map((instance) => [instance.key, instance]));
|
|
3320
|
+
}
|
|
3321
|
+
function reconcileCompilerKeyedArrayPositionWithBatch(...args) {
|
|
3322
|
+
return reconcileCompilerKeyedArrayBatchInsert(...args) || reconcileCompilerKeyedArrayPosition(...args);
|
|
3323
|
+
}
|
|
3324
|
+
function reconcileCompilerKeyedArrayPositionWithWindow(...args) {
|
|
3325
|
+
return reconcileCompilerKeyedArrayWindowReplace(...args) || reconcileCompilerKeyedArrayBatchInsert(...args) || reconcileCompilerKeyedArrayPosition(...args);
|
|
3326
|
+
}
|
|
2861
3327
|
function reconcileCompilerKeyedArrayReorder(props, dirtyState, collectionToken, instances, root, reactOwnedRows) {
|
|
2862
3328
|
if (reactOwnedRows || props.hostBlocks || (props.conditionals?.length || 0) > 0 || !props.reorderIndexIndependent || props.collectionDependency === void 0) {
|
|
2863
3329
|
return void 0;
|
|
@@ -3837,8 +4303,6 @@ function createKeyedRowsBlockComponent(owner, options = {}) {
|
|
|
3837
4303
|
}
|
|
3838
4304
|
if (this.reconcileStableRows(rows, afterCommit, dirtyState)) return;
|
|
3839
4305
|
if (this.reconcileSingleRemoval(rows, afterCommit, dirtyState)) return;
|
|
3840
|
-
const activeElement = this.root.ownerDocument.activeElement;
|
|
3841
|
-
const restoreFocus = Boolean(activeElement && this.root.contains(activeElement));
|
|
3842
4306
|
const nextKeys = new Set(rows.keys);
|
|
3843
4307
|
const hasSurvivingRows = rows.keys.some((key) => this.instances.has(key));
|
|
3844
4308
|
const oldIndices = /* @__PURE__ */ new Map();
|
|
@@ -3852,7 +4316,6 @@ function createKeyedRowsBlockComponent(owner, options = {}) {
|
|
|
3852
4316
|
}
|
|
3853
4317
|
}
|
|
3854
4318
|
const sequence = hasSurvivingRows ? rows.keys.map((key) => oldIndices.get(key) ?? -1) : rows.keys.map(() => -1);
|
|
3855
|
-
const stablePositions = hasSurvivingRows ? longestIncreasingSubsequencePositions(sequence) : /* @__PURE__ */ new Set();
|
|
3856
4319
|
const nextInstances = [];
|
|
3857
4320
|
const conditionalChanges = [];
|
|
3858
4321
|
for (let index = 0; index < rows.items.length; index += 1) {
|
|
@@ -3917,34 +4380,12 @@ function createKeyedRowsBlockComponent(owner, options = {}) {
|
|
|
3917
4380
|
for (const instance of nextInstances) fragment.append(instance.element);
|
|
3918
4381
|
this.root.replaceChildren(fragment);
|
|
3919
4382
|
} else {
|
|
3920
|
-
|
|
3921
|
-
for (let index = nextInstances.length - 1; index >= 0; index -= 1) {
|
|
3922
|
-
const instance = nextInstances[index];
|
|
3923
|
-
if (sequence[index] < 0) {
|
|
3924
|
-
let start = index;
|
|
3925
|
-
while (start > 0 && sequence[start - 1] < 0) start -= 1;
|
|
3926
|
-
const fragment = this.root.ownerDocument.createDocumentFragment();
|
|
3927
|
-
for (let itemIndex = start; itemIndex <= index; itemIndex += 1) {
|
|
3928
|
-
fragment.append(nextInstances[itemIndex].element);
|
|
3929
|
-
}
|
|
3930
|
-
this.root.insertBefore(fragment, anchor);
|
|
3931
|
-
anchor = nextInstances[start].element;
|
|
3932
|
-
index = start;
|
|
3933
|
-
} else {
|
|
3934
|
-
if (!stablePositions.has(index) && instance.element.nextSibling !== anchor) {
|
|
3935
|
-
this.root.insertBefore(instance.element, anchor);
|
|
3936
|
-
}
|
|
3937
|
-
anchor = instance.element;
|
|
3938
|
-
}
|
|
3939
|
-
}
|
|
4383
|
+
reorderCompilerKeyedRows(this.root, nextInstances, sequence, null);
|
|
3940
4384
|
}
|
|
3941
4385
|
this.instances = new Map(nextInstances.map((instance) => [instance.key, instance]));
|
|
3942
4386
|
this.rebuildElementIndex(this.instances);
|
|
3943
4387
|
this.pruneEventHandlers(rows.keys);
|
|
3944
4388
|
this.pruneConditionalListeners(rows.keys);
|
|
3945
|
-
if (restoreFocus && activeElement?.isConnected && activeElement.ownerDocument.activeElement !== activeElement && "focus" in activeElement) {
|
|
3946
|
-
activeElement.focus({ preventScroll: true });
|
|
3947
|
-
}
|
|
3948
4389
|
this.commitCurrentCollection(dirtyState);
|
|
3949
4390
|
this.notifyConditionalChanges(conditionalChanges, afterCommit);
|
|
3950
4391
|
}
|
|
@@ -4434,6 +4875,22 @@ var keyedRowsPositionHintedRuntimeFeature = {
|
|
|
4434
4875
|
})
|
|
4435
4876
|
})
|
|
4436
4877
|
};
|
|
4878
|
+
var keyedRowsBatchPositionHintedRuntimeFeature = {
|
|
4879
|
+
name: "keyed-rows:batch-position-hinted",
|
|
4880
|
+
create: (owner) => ({
|
|
4881
|
+
KeyedRows: createKeyedRowsBlockComponent(owner, {
|
|
4882
|
+
keyedUpdates: keyedBatchPositionUpdateRuntime
|
|
4883
|
+
})
|
|
4884
|
+
})
|
|
4885
|
+
};
|
|
4886
|
+
var keyedRowsWindowPositionHintedRuntimeFeature = {
|
|
4887
|
+
name: "keyed-rows:window-position-hinted",
|
|
4888
|
+
create: (owner) => ({
|
|
4889
|
+
KeyedRows: createKeyedRowsBlockComponent(owner, {
|
|
4890
|
+
keyedUpdates: keyedWindowPositionUpdateRuntime
|
|
4891
|
+
})
|
|
4892
|
+
})
|
|
4893
|
+
};
|
|
4437
4894
|
var keyedRowsReorderHintedRuntimeFeature = {
|
|
4438
4895
|
name: "keyed-rows:reorder-hinted",
|
|
4439
4896
|
create: (owner) => ({
|
|
@@ -4458,6 +4915,22 @@ var keyedRowsEveryHintedRuntimeFeature = {
|
|
|
4458
4915
|
})
|
|
4459
4916
|
})
|
|
4460
4917
|
};
|
|
4918
|
+
var keyedRowsBatchEveryHintedRuntimeFeature = {
|
|
4919
|
+
name: "keyed-rows:batch-every-hinted",
|
|
4920
|
+
create: (owner) => ({
|
|
4921
|
+
KeyedRows: createKeyedRowsBlockComponent(owner, {
|
|
4922
|
+
keyedUpdates: keyedBatchEveryUpdateRuntime
|
|
4923
|
+
})
|
|
4924
|
+
})
|
|
4925
|
+
};
|
|
4926
|
+
var keyedRowsWindowEveryHintedRuntimeFeature = {
|
|
4927
|
+
name: "keyed-rows:window-every-hinted",
|
|
4928
|
+
create: (owner) => ({
|
|
4929
|
+
KeyedRows: createKeyedRowsBlockComponent(owner, {
|
|
4930
|
+
keyedUpdates: keyedWindowEveryUpdateRuntime
|
|
4931
|
+
})
|
|
4932
|
+
})
|
|
4933
|
+
};
|
|
4461
4934
|
var keyedRowsFilterHintedRuntimeFeature = {
|
|
4462
4935
|
name: "keyed-rows:filter-hinted",
|
|
4463
4936
|
create: (owner) => ({
|
|
@@ -4508,6 +4981,24 @@ var keyedRowsConditionalPositionHintedRuntimeFeature = {
|
|
|
4508
4981
|
})
|
|
4509
4982
|
})
|
|
4510
4983
|
};
|
|
4984
|
+
var keyedRowsConditionalBatchPositionHintedRuntimeFeature = {
|
|
4985
|
+
name: "keyed-rows:conditional:batch-position-hinted",
|
|
4986
|
+
create: (owner) => ({
|
|
4987
|
+
KeyedRows: createKeyedRowsBlockComponent(owner, {
|
|
4988
|
+
conditionals: createKeyedRowConditionalRuntime(),
|
|
4989
|
+
keyedUpdates: keyedBatchPositionUpdateRuntime
|
|
4990
|
+
})
|
|
4991
|
+
})
|
|
4992
|
+
};
|
|
4993
|
+
var keyedRowsConditionalWindowPositionHintedRuntimeFeature = {
|
|
4994
|
+
name: "keyed-rows:conditional:window-position-hinted",
|
|
4995
|
+
create: (owner) => ({
|
|
4996
|
+
KeyedRows: createKeyedRowsBlockComponent(owner, {
|
|
4997
|
+
conditionals: createKeyedRowConditionalRuntime(),
|
|
4998
|
+
keyedUpdates: keyedWindowPositionUpdateRuntime
|
|
4999
|
+
})
|
|
5000
|
+
})
|
|
5001
|
+
};
|
|
4511
5002
|
var keyedRowsConditionalReorderHintedRuntimeFeature = {
|
|
4512
5003
|
name: "keyed-rows:conditional:reorder-hinted",
|
|
4513
5004
|
create: (owner) => ({
|
|
@@ -4535,6 +5026,24 @@ var keyedRowsConditionalEveryHintedRuntimeFeature = {
|
|
|
4535
5026
|
})
|
|
4536
5027
|
})
|
|
4537
5028
|
};
|
|
5029
|
+
var keyedRowsConditionalBatchEveryHintedRuntimeFeature = {
|
|
5030
|
+
name: "keyed-rows:conditional:batch-every-hinted",
|
|
5031
|
+
create: (owner) => ({
|
|
5032
|
+
KeyedRows: createKeyedRowsBlockComponent(owner, {
|
|
5033
|
+
conditionals: createKeyedRowConditionalRuntime(),
|
|
5034
|
+
keyedUpdates: keyedBatchEveryUpdateRuntime
|
|
5035
|
+
})
|
|
5036
|
+
})
|
|
5037
|
+
};
|
|
5038
|
+
var keyedRowsConditionalWindowEveryHintedRuntimeFeature = {
|
|
5039
|
+
name: "keyed-rows:conditional:window-every-hinted",
|
|
5040
|
+
create: (owner) => ({
|
|
5041
|
+
KeyedRows: createKeyedRowsBlockComponent(owner, {
|
|
5042
|
+
conditionals: createKeyedRowConditionalRuntime(),
|
|
5043
|
+
keyedUpdates: keyedWindowEveryUpdateRuntime
|
|
5044
|
+
})
|
|
5045
|
+
})
|
|
5046
|
+
};
|
|
4538
5047
|
var keyedRowsConditionalFilterHintedRuntimeFeature = {
|
|
4539
5048
|
name: "keyed-rows:conditional:filter-hinted",
|
|
4540
5049
|
create: (owner) => ({
|
|
@@ -4588,6 +5097,24 @@ var keyedRowsHostPositionHintedRuntimeFeature = {
|
|
|
4588
5097
|
})
|
|
4589
5098
|
})
|
|
4590
5099
|
};
|
|
5100
|
+
var keyedRowsHostBatchPositionHintedRuntimeFeature = {
|
|
5101
|
+
name: "keyed-rows:host:batch-position-hinted",
|
|
5102
|
+
create: (owner) => ({
|
|
5103
|
+
KeyedRows: createKeyedRowsBlockComponent(owner, {
|
|
5104
|
+
hostBlocks: createKeyedRowHostRuntime(),
|
|
5105
|
+
keyedUpdates: keyedBatchPositionUpdateRuntime
|
|
5106
|
+
})
|
|
5107
|
+
})
|
|
5108
|
+
};
|
|
5109
|
+
var keyedRowsHostWindowPositionHintedRuntimeFeature = {
|
|
5110
|
+
name: "keyed-rows:host:window-position-hinted",
|
|
5111
|
+
create: (owner) => ({
|
|
5112
|
+
KeyedRows: createKeyedRowsBlockComponent(owner, {
|
|
5113
|
+
hostBlocks: createKeyedRowHostRuntime(),
|
|
5114
|
+
keyedUpdates: keyedWindowPositionUpdateRuntime
|
|
5115
|
+
})
|
|
5116
|
+
})
|
|
5117
|
+
};
|
|
4591
5118
|
var keyedRowsHostReorderHintedRuntimeFeature = {
|
|
4592
5119
|
name: "keyed-rows:host:reorder-hinted",
|
|
4593
5120
|
create: (owner) => ({
|
|
@@ -4615,6 +5142,24 @@ var keyedRowsHostEveryHintedRuntimeFeature = {
|
|
|
4615
5142
|
})
|
|
4616
5143
|
})
|
|
4617
5144
|
};
|
|
5145
|
+
var keyedRowsHostBatchEveryHintedRuntimeFeature = {
|
|
5146
|
+
name: "keyed-rows:host:batch-every-hinted",
|
|
5147
|
+
create: (owner) => ({
|
|
5148
|
+
KeyedRows: createKeyedRowsBlockComponent(owner, {
|
|
5149
|
+
hostBlocks: createKeyedRowHostRuntime(),
|
|
5150
|
+
keyedUpdates: keyedBatchEveryUpdateRuntime
|
|
5151
|
+
})
|
|
5152
|
+
})
|
|
5153
|
+
};
|
|
5154
|
+
var keyedRowsHostWindowEveryHintedRuntimeFeature = {
|
|
5155
|
+
name: "keyed-rows:host:window-every-hinted",
|
|
5156
|
+
create: (owner) => ({
|
|
5157
|
+
KeyedRows: createKeyedRowsBlockComponent(owner, {
|
|
5158
|
+
hostBlocks: createKeyedRowHostRuntime(),
|
|
5159
|
+
keyedUpdates: keyedWindowEveryUpdateRuntime
|
|
5160
|
+
})
|
|
5161
|
+
})
|
|
5162
|
+
};
|
|
4618
5163
|
var keyedRowsHostFilterHintedRuntimeFeature = {
|
|
4619
5164
|
name: "keyed-rows:host:filter-hinted",
|
|
4620
5165
|
create: (owner) => ({
|
|
@@ -4671,6 +5216,26 @@ var keyedRowsCompletePositionHintedRuntimeFeature = {
|
|
|
4671
5216
|
})
|
|
4672
5217
|
})
|
|
4673
5218
|
};
|
|
5219
|
+
var keyedRowsCompleteBatchPositionHintedRuntimeFeature = {
|
|
5220
|
+
name: "keyed-rows:complete:batch-position-hinted",
|
|
5221
|
+
create: (owner) => ({
|
|
5222
|
+
KeyedRows: createKeyedRowsBlockComponent(owner, {
|
|
5223
|
+
conditionals: createKeyedRowConditionalRuntime(),
|
|
5224
|
+
hostBlocks: createKeyedRowHostRuntime(),
|
|
5225
|
+
keyedUpdates: keyedBatchPositionUpdateRuntime
|
|
5226
|
+
})
|
|
5227
|
+
})
|
|
5228
|
+
};
|
|
5229
|
+
var keyedRowsCompleteWindowPositionHintedRuntimeFeature = {
|
|
5230
|
+
name: "keyed-rows:complete:window-position-hinted",
|
|
5231
|
+
create: (owner) => ({
|
|
5232
|
+
KeyedRows: createKeyedRowsBlockComponent(owner, {
|
|
5233
|
+
conditionals: createKeyedRowConditionalRuntime(),
|
|
5234
|
+
hostBlocks: createKeyedRowHostRuntime(),
|
|
5235
|
+
keyedUpdates: keyedWindowPositionUpdateRuntime
|
|
5236
|
+
})
|
|
5237
|
+
})
|
|
5238
|
+
};
|
|
4674
5239
|
var keyedRowsCompleteReorderHintedRuntimeFeature = {
|
|
4675
5240
|
name: "keyed-rows:complete:reorder-hinted",
|
|
4676
5241
|
create: (owner) => ({
|
|
@@ -4701,6 +5266,26 @@ var keyedRowsCompleteEveryHintedRuntimeFeature = {
|
|
|
4701
5266
|
})
|
|
4702
5267
|
})
|
|
4703
5268
|
};
|
|
5269
|
+
var keyedRowsCompleteBatchEveryHintedRuntimeFeature = {
|
|
5270
|
+
name: "keyed-rows:complete:batch-every-hinted",
|
|
5271
|
+
create: (owner) => ({
|
|
5272
|
+
KeyedRows: createKeyedRowsBlockComponent(owner, {
|
|
5273
|
+
conditionals: createKeyedRowConditionalRuntime(),
|
|
5274
|
+
hostBlocks: createKeyedRowHostRuntime(),
|
|
5275
|
+
keyedUpdates: keyedBatchEveryUpdateRuntime
|
|
5276
|
+
})
|
|
5277
|
+
})
|
|
5278
|
+
};
|
|
5279
|
+
var keyedRowsCompleteWindowEveryHintedRuntimeFeature = {
|
|
5280
|
+
name: "keyed-rows:complete:window-every-hinted",
|
|
5281
|
+
create: (owner) => ({
|
|
5282
|
+
KeyedRows: createKeyedRowsBlockComponent(owner, {
|
|
5283
|
+
conditionals: createKeyedRowConditionalRuntime(),
|
|
5284
|
+
hostBlocks: createKeyedRowHostRuntime(),
|
|
5285
|
+
keyedUpdates: keyedWindowEveryUpdateRuntime
|
|
5286
|
+
})
|
|
5287
|
+
})
|
|
5288
|
+
};
|
|
4704
5289
|
var keyedRowsCompleteFilterHintedRuntimeFeature = {
|
|
4705
5290
|
name: "keyed-rows:complete:filter-hinted",
|
|
4706
5291
|
create: (owner) => ({
|
|
@@ -5203,7 +5788,7 @@ var COMPLETE_RUNTIME_FEATURES = [
|
|
|
5203
5788
|
hostConditionalRuntimeFeature,
|
|
5204
5789
|
conditionalRangesRuntimeFeature,
|
|
5205
5790
|
keyedListRuntimeFeature,
|
|
5206
|
-
|
|
5791
|
+
keyedRowsCompleteWindowEveryHintedRuntimeFeature,
|
|
5207
5792
|
keyedRangesRuntimeFeature,
|
|
5208
5793
|
mixedRangesRuntimeFeature,
|
|
5209
5794
|
componentRuntimeFeature
|
|
@@ -5219,6 +5804,7 @@ exports.conditionalRuntimeFeature = conditionalRuntimeFeature;
|
|
|
5219
5804
|
exports.createCompiledComponent = createCompiledComponent;
|
|
5220
5805
|
exports.createCompiledComponentWithFeatures = createCompiledComponentWithFeatures;
|
|
5221
5806
|
exports.createCompilerKeyedArrayAppend = createCompilerKeyedArrayAppend;
|
|
5807
|
+
exports.createCompilerKeyedArrayBatchInsert = createCompilerKeyedArrayBatchInsert;
|
|
5222
5808
|
exports.createCompilerKeyedArrayFilter = createCompilerKeyedArrayFilter;
|
|
5223
5809
|
exports.createCompilerKeyedArrayPositionUpdate = createCompilerKeyedArrayPositionUpdate;
|
|
5224
5810
|
exports.createCompilerKeyedArrayPrepend = createCompilerKeyedArrayPrepend;
|
|
@@ -5226,13 +5812,18 @@ exports.createCompilerKeyedArrayReorder = createCompilerKeyedArrayReorder;
|
|
|
5226
5812
|
exports.createCompilerKeyedArrayRollingWindow = createCompilerKeyedArrayRollingWindow;
|
|
5227
5813
|
exports.createCompilerKeyedArraySlice = createCompilerKeyedArraySlice;
|
|
5228
5814
|
exports.createCompilerKeyedArraySort = createCompilerKeyedArraySort;
|
|
5815
|
+
exports.createCompilerKeyedArrayWindowReplace = createCompilerKeyedArrayWindowReplace;
|
|
5229
5816
|
exports.createCompilerKeyedCollectionUpdate = createCompilerKeyedCollectionUpdate;
|
|
5230
5817
|
exports.createCompilerKeyedMapUpdate = createCompilerKeyedMapUpdate;
|
|
5231
5818
|
exports.hostConditionalRuntimeFeature = hostConditionalRuntimeFeature;
|
|
5232
5819
|
exports.keyedListRuntimeFeature = keyedListRuntimeFeature;
|
|
5233
5820
|
exports.keyedRangesRuntimeFeature = keyedRangesRuntimeFeature;
|
|
5234
5821
|
exports.keyedRowsAllHintedRuntimeFeature = keyedRowsAllHintedRuntimeFeature;
|
|
5822
|
+
exports.keyedRowsBatchEveryHintedRuntimeFeature = keyedRowsBatchEveryHintedRuntimeFeature;
|
|
5823
|
+
exports.keyedRowsBatchPositionHintedRuntimeFeature = keyedRowsBatchPositionHintedRuntimeFeature;
|
|
5235
5824
|
exports.keyedRowsCompleteAllHintedRuntimeFeature = keyedRowsCompleteAllHintedRuntimeFeature;
|
|
5825
|
+
exports.keyedRowsCompleteBatchEveryHintedRuntimeFeature = keyedRowsCompleteBatchEveryHintedRuntimeFeature;
|
|
5826
|
+
exports.keyedRowsCompleteBatchPositionHintedRuntimeFeature = keyedRowsCompleteBatchPositionHintedRuntimeFeature;
|
|
5236
5827
|
exports.keyedRowsCompleteEveryHintedRuntimeFeature = keyedRowsCompleteEveryHintedRuntimeFeature;
|
|
5237
5828
|
exports.keyedRowsCompleteFilterHintedRuntimeFeature = keyedRowsCompleteFilterHintedRuntimeFeature;
|
|
5238
5829
|
exports.keyedRowsCompleteFilterPrependHintedRuntimeFeature = keyedRowsCompleteFilterPrependHintedRuntimeFeature;
|
|
@@ -5241,7 +5832,11 @@ exports.keyedRowsCompletePositionHintedRuntimeFeature = keyedRowsCompletePositio
|
|
|
5241
5832
|
exports.keyedRowsCompletePrependHintedRuntimeFeature = keyedRowsCompletePrependHintedRuntimeFeature;
|
|
5242
5833
|
exports.keyedRowsCompleteReorderHintedRuntimeFeature = keyedRowsCompleteReorderHintedRuntimeFeature;
|
|
5243
5834
|
exports.keyedRowsCompleteRuntimeFeature = keyedRowsCompleteRuntimeFeature;
|
|
5835
|
+
exports.keyedRowsCompleteWindowEveryHintedRuntimeFeature = keyedRowsCompleteWindowEveryHintedRuntimeFeature;
|
|
5836
|
+
exports.keyedRowsCompleteWindowPositionHintedRuntimeFeature = keyedRowsCompleteWindowPositionHintedRuntimeFeature;
|
|
5244
5837
|
exports.keyedRowsConditionalAllHintedRuntimeFeature = keyedRowsConditionalAllHintedRuntimeFeature;
|
|
5838
|
+
exports.keyedRowsConditionalBatchEveryHintedRuntimeFeature = keyedRowsConditionalBatchEveryHintedRuntimeFeature;
|
|
5839
|
+
exports.keyedRowsConditionalBatchPositionHintedRuntimeFeature = keyedRowsConditionalBatchPositionHintedRuntimeFeature;
|
|
5245
5840
|
exports.keyedRowsConditionalEveryHintedRuntimeFeature = keyedRowsConditionalEveryHintedRuntimeFeature;
|
|
5246
5841
|
exports.keyedRowsConditionalFilterHintedRuntimeFeature = keyedRowsConditionalFilterHintedRuntimeFeature;
|
|
5247
5842
|
exports.keyedRowsConditionalFilterPrependHintedRuntimeFeature = keyedRowsConditionalFilterPrependHintedRuntimeFeature;
|
|
@@ -5250,11 +5845,15 @@ exports.keyedRowsConditionalPositionHintedRuntimeFeature = keyedRowsConditionalP
|
|
|
5250
5845
|
exports.keyedRowsConditionalPrependHintedRuntimeFeature = keyedRowsConditionalPrependHintedRuntimeFeature;
|
|
5251
5846
|
exports.keyedRowsConditionalReorderHintedRuntimeFeature = keyedRowsConditionalReorderHintedRuntimeFeature;
|
|
5252
5847
|
exports.keyedRowsConditionalRuntimeFeature = keyedRowsConditionalRuntimeFeature;
|
|
5848
|
+
exports.keyedRowsConditionalWindowEveryHintedRuntimeFeature = keyedRowsConditionalWindowEveryHintedRuntimeFeature;
|
|
5849
|
+
exports.keyedRowsConditionalWindowPositionHintedRuntimeFeature = keyedRowsConditionalWindowPositionHintedRuntimeFeature;
|
|
5253
5850
|
exports.keyedRowsEveryHintedRuntimeFeature = keyedRowsEveryHintedRuntimeFeature;
|
|
5254
5851
|
exports.keyedRowsFilterHintedRuntimeFeature = keyedRowsFilterHintedRuntimeFeature;
|
|
5255
5852
|
exports.keyedRowsFilterPrependHintedRuntimeFeature = keyedRowsFilterPrependHintedRuntimeFeature;
|
|
5256
5853
|
exports.keyedRowsHintedRuntimeFeature = keyedRowsHintedRuntimeFeature;
|
|
5257
5854
|
exports.keyedRowsHostAllHintedRuntimeFeature = keyedRowsHostAllHintedRuntimeFeature;
|
|
5855
|
+
exports.keyedRowsHostBatchEveryHintedRuntimeFeature = keyedRowsHostBatchEveryHintedRuntimeFeature;
|
|
5856
|
+
exports.keyedRowsHostBatchPositionHintedRuntimeFeature = keyedRowsHostBatchPositionHintedRuntimeFeature;
|
|
5258
5857
|
exports.keyedRowsHostEveryHintedRuntimeFeature = keyedRowsHostEveryHintedRuntimeFeature;
|
|
5259
5858
|
exports.keyedRowsHostFilterHintedRuntimeFeature = keyedRowsHostFilterHintedRuntimeFeature;
|
|
5260
5859
|
exports.keyedRowsHostFilterPrependHintedRuntimeFeature = keyedRowsHostFilterPrependHintedRuntimeFeature;
|
|
@@ -5263,10 +5862,14 @@ exports.keyedRowsHostPositionHintedRuntimeFeature = keyedRowsHostPositionHintedR
|
|
|
5263
5862
|
exports.keyedRowsHostPrependHintedRuntimeFeature = keyedRowsHostPrependHintedRuntimeFeature;
|
|
5264
5863
|
exports.keyedRowsHostReorderHintedRuntimeFeature = keyedRowsHostReorderHintedRuntimeFeature;
|
|
5265
5864
|
exports.keyedRowsHostRuntimeFeature = keyedRowsHostRuntimeFeature;
|
|
5865
|
+
exports.keyedRowsHostWindowEveryHintedRuntimeFeature = keyedRowsHostWindowEveryHintedRuntimeFeature;
|
|
5866
|
+
exports.keyedRowsHostWindowPositionHintedRuntimeFeature = keyedRowsHostWindowPositionHintedRuntimeFeature;
|
|
5266
5867
|
exports.keyedRowsPositionHintedRuntimeFeature = keyedRowsPositionHintedRuntimeFeature;
|
|
5267
5868
|
exports.keyedRowsPrependHintedRuntimeFeature = keyedRowsPrependHintedRuntimeFeature;
|
|
5268
5869
|
exports.keyedRowsReorderHintedRuntimeFeature = keyedRowsReorderHintedRuntimeFeature;
|
|
5269
5870
|
exports.keyedRowsRuntimeFeature = keyedRowsRuntimeFeature;
|
|
5871
|
+
exports.keyedRowsWindowEveryHintedRuntimeFeature = keyedRowsWindowEveryHintedRuntimeFeature;
|
|
5872
|
+
exports.keyedRowsWindowPositionHintedRuntimeFeature = keyedRowsWindowPositionHintedRuntimeFeature;
|
|
5270
5873
|
exports.mixedRangesRuntimeFeature = mixedRangesRuntimeFeature;
|
|
5271
5874
|
//# sourceMappingURL=compiler-runtime.cjs.map
|
|
5272
5875
|
//# sourceMappingURL=compiler-runtime.cjs.map
|