@fictjs/runtime 0.0.11 → 0.0.13

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/dist/index.d.cts CHANGED
@@ -111,6 +111,10 @@ interface SuspenseToken {
111
111
  then: Promise<unknown>['then'];
112
112
  }
113
113
 
114
+ /**
115
+ * Effect callback run synchronously; async callbacks are not tracked after the first await.
116
+ * TypeScript will reject `async () => {}` here—split async work or read signals before awaiting.
117
+ */
114
118
  type Effect = () => void | Cleanup;
115
119
  declare function createEffect(fn: Effect): () => void;
116
120
  declare const $effect: typeof createEffect;
@@ -142,6 +146,7 @@ interface BindingHandle {
142
146
  /** Dispose function to clean up the binding */
143
147
  dispose: Cleanup;
144
148
  }
149
+ /** Managed child node with its dispose function */
145
150
  /**
146
151
  * Check if a value is reactive (a getter function)
147
152
  * Note: Event handlers (functions that take arguments) are NOT reactive values
@@ -157,28 +162,6 @@ declare function unwrap<T>(value: MaybeReactive<T>): T;
157
162
  * optional data payload followed by the event.
158
163
  */
159
164
  declare function callEventHandler(handler: EventListenerOrEventListenerObject | null | undefined, event: Event, node?: EventTarget | null, data?: unknown): void;
160
- /**
161
- * Unwrap a primitive proxy value to get the raw primitive value.
162
- * This is primarily useful for advanced scenarios where you need the actual
163
- * primitive type (e.g., for typeof checks or strict equality comparisons).
164
- *
165
- * @param value - A potentially proxied primitive value
166
- * @returns The raw primitive value
167
- *
168
- * @example
169
- * ```ts
170
- * createList(
171
- * () => [1, 2, 3],
172
- * (item) => {
173
- * const raw = unwrapPrimitive(item)
174
- * typeof raw === 'number' // true
175
- * raw === 1 // true (for first item)
176
- * },
177
- * item => item
178
- * )
179
- * ```
180
- */
181
- declare function unwrapPrimitive<T>(value: T): T;
182
165
  /**
183
166
  * Create a text node that reactively updates when the value changes.
184
167
  *
@@ -390,13 +373,6 @@ declare function assign(node: Element, props: Record<string, unknown>, isSVG?: b
390
373
  * ```
391
374
  */
392
375
  declare function createConditional(condition: () => boolean, renderTrue: () => FictNode, createElementFn: CreateElementFn, renderFalse?: () => FictNode): BindingHandle;
393
- /** Key extractor function type */
394
- type KeyFn<T> = (item: T, index: number) => string | number;
395
- /**
396
- * Create a reactive list rendering binding with optional keying.
397
- * The render callback receives signal accessors for the item and index.
398
- */
399
- declare function createList<T>(items: () => T[], renderItem: (item: SignalAccessor<T>, index: SignalAccessor<number>) => FictNode, createElementFn: CreateElementFn, getKey?: KeyFn<T>): BindingHandle;
400
376
  /**
401
377
  * Create a show/hide binding that uses CSS display instead of DOM manipulation.
402
378
  * More efficient than conditional when the content is expensive to create.
@@ -515,16 +491,6 @@ type PropGetter<T> = (() => T) & {
515
491
  declare function useProp<T>(getter: () => T): PropGetter<T>;
516
492
 
517
493
  type LifecycleFn = () => void | Cleanup;
518
- interface RootContext {
519
- parent?: RootContext | undefined;
520
- onMountCallbacks?: LifecycleFn[];
521
- cleanups: Cleanup[];
522
- destroyCallbacks: Cleanup[];
523
- errorHandlers?: ErrorHandler[];
524
- suspenseHandlers?: SuspenseHandler[];
525
- }
526
- type ErrorHandler = (err: unknown, info?: ErrorInfo) => boolean | void;
527
- type SuspenseHandler = (token: SuspenseToken | PromiseLike<unknown>) => boolean | void;
528
494
  declare function onMount(fn: LifecycleFn): void;
529
495
  declare function onDestroy(fn: LifecycleFn): void;
530
496
  declare function onCleanup(fn: Cleanup): void;
@@ -639,7 +605,7 @@ interface CycleProtectionOptions {
639
605
  enableWindowWarning?: boolean;
640
606
  devMode?: boolean;
641
607
  }
642
- declare function setCycleProtectionOptions(opts: CycleProtectionOptions): void;
608
+ declare let setCycleProtectionOptions: (opts: CycleProtectionOptions) => void;
643
609
 
644
610
  declare const Fragment: unique symbol;
645
611
  declare namespace JSX {
@@ -1374,10 +1340,6 @@ declare function Suspense(props: SuspenseProps): FictNode;
1374
1340
  * Borrowed from dom-expressions for comprehensive DOM support.
1375
1341
  */
1376
1342
  declare const BooleanAttributes: Set<string>;
1377
- /**
1378
- * Properties that should be set via DOM property (not attribute)
1379
- * Includes camelCase versions of boolean attributes
1380
- */
1381
1343
  declare const Properties: Set<string>;
1382
1344
  /**
1383
1345
  * Properties that represent children/content
@@ -1391,22 +1353,12 @@ declare const Aliases: Record<string, string>;
1391
1353
  * Get the property alias for a given attribute and tag name
1392
1354
  */
1393
1355
  declare function getPropAlias(prop: string, tagName: string): string | undefined;
1394
- /**
1395
- * Events that should use event delegation for performance
1396
- * These events bubble and are commonly used across many elements
1397
- */
1398
1356
  declare const DelegatedEvents: Set<string>;
1399
- /**
1400
- * SVG element names (excluding common ones that overlap with HTML)
1401
- */
1402
1357
  declare const SVGElements: Set<string>;
1403
1358
  /**
1404
1359
  * SVG attribute namespaces
1405
1360
  */
1406
1361
  declare const SVGNamespace: Record<string, string>;
1407
- /**
1408
- * CSS properties that don't need a unit (like 'px')
1409
- */
1410
1362
  declare const UnitlessStyles: Set<string>;
1411
1363
 
1412
1364
  /**
@@ -1431,6 +1383,10 @@ declare const UnitlessStyles: Set<string>;
1431
1383
  * @param a - The old array of nodes (currently in DOM)
1432
1384
  * @param b - The new array of nodes (target state)
1433
1385
  *
1386
+ * **Note:** This function may mutate the input array `a` during the swap
1387
+ * optimization (step 5a). If you need to preserve the original array,
1388
+ * pass a shallow copy: `reconcileArrays(parent, [...oldNodes], newNodes)`.
1389
+ *
1434
1390
  * @example
1435
1391
  * ```ts
1436
1392
  * const oldNodes = [node1, node2, node3]
@@ -1478,50 +1434,6 @@ declare function removeNodes(nodes: Node[]): void;
1478
1434
  * They provide low-level primitives for DOM node manipulation without rebuilding.
1479
1435
  */
1480
1436
 
1481
- /**
1482
- * A keyed block represents a single item in a list with its associated DOM nodes and state
1483
- */
1484
- interface KeyedBlock<T = unknown> {
1485
- /** Unique key for this block */
1486
- key: string | number;
1487
- /** DOM nodes belonging to this block */
1488
- nodes: Node[];
1489
- /** Root context for lifecycle management */
1490
- root: RootContext;
1491
- /** Signal containing the current item value */
1492
- item: SignalAccessor<T>;
1493
- /** Signal containing the current index */
1494
- index: SignalAccessor<number>;
1495
- /** Last raw item value assigned to this block */
1496
- rawItem: T;
1497
- /** Last raw index value assigned to this block */
1498
- rawIndex: number;
1499
- }
1500
- /**
1501
- * Container for managing keyed list blocks
1502
- */
1503
- interface KeyedListContainer<T = unknown> {
1504
- /** Start marker comment node */
1505
- startMarker: Comment;
1506
- /** End marker comment node */
1507
- endMarker: Comment;
1508
- /** Map of key to block */
1509
- blocks: Map<string | number, KeyedBlock<T>>;
1510
- /** Scratch map reused for the next render */
1511
- nextBlocks: Map<string | number, KeyedBlock<T>>;
1512
- /** Current nodes in DOM order (including markers) */
1513
- currentNodes: Node[];
1514
- /** Next-frame node buffer to avoid reallocations */
1515
- nextNodes: Node[];
1516
- /** Ordered blocks in current DOM order */
1517
- orderedBlocks: KeyedBlock<T>[];
1518
- /** Next-frame ordered block buffer to avoid reallocations */
1519
- nextOrderedBlocks: KeyedBlock<T>[];
1520
- /** Track position of keys in the ordered buffer to handle duplicates */
1521
- orderedIndexByKey: Map<string | number, number>;
1522
- /** Cleanup function */
1523
- dispose: () => void;
1524
- }
1525
1437
  /**
1526
1438
  * Binding handle returned by createKeyedList for compiler-generated code
1527
1439
  */
@@ -1538,14 +1450,6 @@ interface KeyedListBinding {
1538
1450
  dispose: () => void;
1539
1451
  }
1540
1452
  type FineGrainedRenderItem<T> = (itemSig: SignalAccessor<T>, indexSig: SignalAccessor<number>, key: string | number) => Node[];
1541
- /**
1542
- * A block identified by start/end comment markers.
1543
- */
1544
- interface MarkerBlock {
1545
- start: Comment;
1546
- end: Comment;
1547
- root?: RootContext;
1548
- }
1549
1453
  /**
1550
1454
  * Move nodes to a position before the anchor node.
1551
1455
  * This is optimized to avoid unnecessary DOM operations.
@@ -1555,40 +1459,6 @@ interface MarkerBlock {
1555
1459
  * @param anchor - Node to insert before (or null for end)
1556
1460
  */
1557
1461
  declare function moveNodesBefore(parent: Node, nodes: Node[], anchor: Node | null): void;
1558
- /**
1559
- * Remove an array of nodes from the DOM
1560
- *
1561
- * @param nodes - Array of nodes to remove
1562
- */
1563
- /**
1564
- * Move an entire marker-delimited block (including markers) before the anchor.
1565
- */
1566
- declare function moveMarkerBlock(parent: Node, block: MarkerBlock, anchor: Node | null): void;
1567
- /**
1568
- * Destroy a marker-delimited block, removing nodes and destroying the associated root.
1569
- */
1570
- declare function destroyMarkerBlock(block: MarkerBlock): void;
1571
- /**
1572
- * Create a container for managing a keyed list.
1573
- * This sets up the marker nodes and provides cleanup.
1574
- *
1575
- * @returns Container object with markers, blocks map, and dispose function
1576
- */
1577
- declare function createKeyedListContainer<T = unknown>(): KeyedListContainer<T>;
1578
- /**
1579
- * Create a new keyed block with the given render function
1580
- *
1581
- * @param key - Unique key for this block
1582
- * @param item - Initial item value
1583
- * @param index - Initial index
1584
- * @param render - Function that creates the DOM nodes and sets up bindings
1585
- * @returns New KeyedBlock
1586
- */
1587
- declare function createKeyedBlock<T>(key: string | number, item: T, index: number, render: (item: SignalAccessor<T>, index: SignalAccessor<number>, key: string | number) => Node[], needsIndex?: boolean, hostRoot?: RootContext): KeyedBlock<T>;
1588
- /**
1589
- * Find the first node after the start marker (for getting current anchor)
1590
- */
1591
- declare function getFirstNodeAfter(marker: Comment): Node | null;
1592
1462
  /**
1593
1463
  * Check if a node is between two markers
1594
1464
  */
@@ -1604,4 +1474,4 @@ declare function isNodeBetweenMarkers(node: Node, startMarker: Comment, endMarke
1604
1474
  */
1605
1475
  declare function createKeyedList<T>(getItems: () => T[], keyFn: (item: T, index: number) => string | number, renderItem: FineGrainedRenderItem<T>, needsIndex?: boolean): KeyedListBinding;
1606
1476
 
1607
- export { $effect, $memo, $state, Aliases, type AttributeSetter, type BaseProps, type BindingHandle, BooleanAttributes, ChildProperties, type ClassProp, type Cleanup, type Component, type CreateElementFn, type DOMElement, DelegatedEvents, type Effect, ErrorBoundary, type ErrorInfo, type EventHandler, type FictDevtoolsHook, type FictNode, type FictVNode, Fragment, JSX, type KeyFn, type KeyedBlock, type KeyedListBinding, type KeyedListContainer, type MarkerBlock, type MaybeReactive, type Memo, Properties, type PropsWithChildren, type ReactiveScope, type Ref, type RefCallback, type RefObject, SVGElements, SVGNamespace, type SignalAccessor as Signal, type Store, type StyleProp, Suspense, type SuspenseToken, UnitlessStyles, type VersionedSignal, type VersionedSignalOptions, __fictPopContext, __fictProp, __fictPropsRest, __fictPushContext, __fictRender, __fictResetContext, __fictUseContext, __fictUseEffect, __fictUseMemo, __fictUseSignal, addEventListener, assign, batch, bindAttribute, bindClass, bindEvent, bindProperty, bindRef, bindStyle, bindText, callEventHandler, classList, clearDelegatedEvents, createAttributeBinding, createChildBinding, createClassBinding, createConditional, createEffect, createElement, createKeyedBlock, createKeyedList, createKeyedListContainer, createList, createMemo, createPortal, createPropsProxy, createRef, createRenderEffect, createRoot, createScope, createSelector, createShow, signal as createSignal, createStore, createStyleBinding, createSuspenseToken, createTextBinding, createVersionedSignal, delegateEvents, destroyMarkerBlock, effectScope, getDevtoolsHook, getFirstNodeAfter, getPropAlias, insert, insertNodesBefore, isNodeBetweenMarkers, isReactive, mergeProps, moveMarkerBlock, moveNodesBefore, onCleanup, onDestroy, onMount, __fictProp as prop, reconcileArrays, removeNodes, render, runInScope, setCycleProtectionOptions, spread, startTransition, template, toNodeArray, untrack, unwrap, unwrapPrimitive, useDeferredValue, useProp, useTransition };
1477
+ export { $effect, $memo, $state, Aliases, type AttributeSetter, type BaseProps, type BindingHandle, BooleanAttributes, ChildProperties, type ClassProp, type Cleanup, type Component, type CreateElementFn, type DOMElement, DelegatedEvents, type Effect, ErrorBoundary, type ErrorInfo, type EventHandler, type FictDevtoolsHook, type FictNode, type FictVNode, Fragment, JSX, type KeyedListBinding, type MaybeReactive, type Memo, Properties, type PropsWithChildren, type ReactiveScope, type Ref, type RefCallback, type RefObject, SVGElements, SVGNamespace, type SignalAccessor as Signal, type Store, type StyleProp, Suspense, type SuspenseToken, UnitlessStyles, type VersionedSignal, type VersionedSignalOptions, __fictPopContext, __fictProp, __fictPropsRest, __fictPushContext, __fictRender, __fictResetContext, __fictUseContext, __fictUseEffect, __fictUseMemo, __fictUseSignal, addEventListener, assign, batch, bindAttribute, bindClass, bindEvent, bindProperty, bindRef, bindStyle, bindText, callEventHandler, classList, clearDelegatedEvents, createAttributeBinding, createChildBinding, createClassBinding, createConditional, createEffect, createElement, createKeyedList, createMemo, createPortal, createPropsProxy, createRef, createRenderEffect, createRoot, createScope, createSelector, createShow, signal as createSignal, createStore, createStyleBinding, createSuspenseToken, createTextBinding, createVersionedSignal, delegateEvents, effectScope, getDevtoolsHook, getPropAlias, insert, insertNodesBefore, isNodeBetweenMarkers, isReactive, mergeProps, moveNodesBefore, onCleanup, onDestroy, onMount, __fictProp as prop, reconcileArrays, removeNodes, render, runInScope, setCycleProtectionOptions, spread, startTransition, template, toNodeArray, untrack, unwrap, useDeferredValue, useProp, useTransition };
package/dist/index.d.ts CHANGED
@@ -111,6 +111,10 @@ interface SuspenseToken {
111
111
  then: Promise<unknown>['then'];
112
112
  }
113
113
 
114
+ /**
115
+ * Effect callback run synchronously; async callbacks are not tracked after the first await.
116
+ * TypeScript will reject `async () => {}` here—split async work or read signals before awaiting.
117
+ */
114
118
  type Effect = () => void | Cleanup;
115
119
  declare function createEffect(fn: Effect): () => void;
116
120
  declare const $effect: typeof createEffect;
@@ -142,6 +146,7 @@ interface BindingHandle {
142
146
  /** Dispose function to clean up the binding */
143
147
  dispose: Cleanup;
144
148
  }
149
+ /** Managed child node with its dispose function */
145
150
  /**
146
151
  * Check if a value is reactive (a getter function)
147
152
  * Note: Event handlers (functions that take arguments) are NOT reactive values
@@ -157,28 +162,6 @@ declare function unwrap<T>(value: MaybeReactive<T>): T;
157
162
  * optional data payload followed by the event.
158
163
  */
159
164
  declare function callEventHandler(handler: EventListenerOrEventListenerObject | null | undefined, event: Event, node?: EventTarget | null, data?: unknown): void;
160
- /**
161
- * Unwrap a primitive proxy value to get the raw primitive value.
162
- * This is primarily useful for advanced scenarios where you need the actual
163
- * primitive type (e.g., for typeof checks or strict equality comparisons).
164
- *
165
- * @param value - A potentially proxied primitive value
166
- * @returns The raw primitive value
167
- *
168
- * @example
169
- * ```ts
170
- * createList(
171
- * () => [1, 2, 3],
172
- * (item) => {
173
- * const raw = unwrapPrimitive(item)
174
- * typeof raw === 'number' // true
175
- * raw === 1 // true (for first item)
176
- * },
177
- * item => item
178
- * )
179
- * ```
180
- */
181
- declare function unwrapPrimitive<T>(value: T): T;
182
165
  /**
183
166
  * Create a text node that reactively updates when the value changes.
184
167
  *
@@ -390,13 +373,6 @@ declare function assign(node: Element, props: Record<string, unknown>, isSVG?: b
390
373
  * ```
391
374
  */
392
375
  declare function createConditional(condition: () => boolean, renderTrue: () => FictNode, createElementFn: CreateElementFn, renderFalse?: () => FictNode): BindingHandle;
393
- /** Key extractor function type */
394
- type KeyFn<T> = (item: T, index: number) => string | number;
395
- /**
396
- * Create a reactive list rendering binding with optional keying.
397
- * The render callback receives signal accessors for the item and index.
398
- */
399
- declare function createList<T>(items: () => T[], renderItem: (item: SignalAccessor<T>, index: SignalAccessor<number>) => FictNode, createElementFn: CreateElementFn, getKey?: KeyFn<T>): BindingHandle;
400
376
  /**
401
377
  * Create a show/hide binding that uses CSS display instead of DOM manipulation.
402
378
  * More efficient than conditional when the content is expensive to create.
@@ -515,16 +491,6 @@ type PropGetter<T> = (() => T) & {
515
491
  declare function useProp<T>(getter: () => T): PropGetter<T>;
516
492
 
517
493
  type LifecycleFn = () => void | Cleanup;
518
- interface RootContext {
519
- parent?: RootContext | undefined;
520
- onMountCallbacks?: LifecycleFn[];
521
- cleanups: Cleanup[];
522
- destroyCallbacks: Cleanup[];
523
- errorHandlers?: ErrorHandler[];
524
- suspenseHandlers?: SuspenseHandler[];
525
- }
526
- type ErrorHandler = (err: unknown, info?: ErrorInfo) => boolean | void;
527
- type SuspenseHandler = (token: SuspenseToken | PromiseLike<unknown>) => boolean | void;
528
494
  declare function onMount(fn: LifecycleFn): void;
529
495
  declare function onDestroy(fn: LifecycleFn): void;
530
496
  declare function onCleanup(fn: Cleanup): void;
@@ -639,7 +605,7 @@ interface CycleProtectionOptions {
639
605
  enableWindowWarning?: boolean;
640
606
  devMode?: boolean;
641
607
  }
642
- declare function setCycleProtectionOptions(opts: CycleProtectionOptions): void;
608
+ declare let setCycleProtectionOptions: (opts: CycleProtectionOptions) => void;
643
609
 
644
610
  declare const Fragment: unique symbol;
645
611
  declare namespace JSX {
@@ -1374,10 +1340,6 @@ declare function Suspense(props: SuspenseProps): FictNode;
1374
1340
  * Borrowed from dom-expressions for comprehensive DOM support.
1375
1341
  */
1376
1342
  declare const BooleanAttributes: Set<string>;
1377
- /**
1378
- * Properties that should be set via DOM property (not attribute)
1379
- * Includes camelCase versions of boolean attributes
1380
- */
1381
1343
  declare const Properties: Set<string>;
1382
1344
  /**
1383
1345
  * Properties that represent children/content
@@ -1391,22 +1353,12 @@ declare const Aliases: Record<string, string>;
1391
1353
  * Get the property alias for a given attribute and tag name
1392
1354
  */
1393
1355
  declare function getPropAlias(prop: string, tagName: string): string | undefined;
1394
- /**
1395
- * Events that should use event delegation for performance
1396
- * These events bubble and are commonly used across many elements
1397
- */
1398
1356
  declare const DelegatedEvents: Set<string>;
1399
- /**
1400
- * SVG element names (excluding common ones that overlap with HTML)
1401
- */
1402
1357
  declare const SVGElements: Set<string>;
1403
1358
  /**
1404
1359
  * SVG attribute namespaces
1405
1360
  */
1406
1361
  declare const SVGNamespace: Record<string, string>;
1407
- /**
1408
- * CSS properties that don't need a unit (like 'px')
1409
- */
1410
1362
  declare const UnitlessStyles: Set<string>;
1411
1363
 
1412
1364
  /**
@@ -1431,6 +1383,10 @@ declare const UnitlessStyles: Set<string>;
1431
1383
  * @param a - The old array of nodes (currently in DOM)
1432
1384
  * @param b - The new array of nodes (target state)
1433
1385
  *
1386
+ * **Note:** This function may mutate the input array `a` during the swap
1387
+ * optimization (step 5a). If you need to preserve the original array,
1388
+ * pass a shallow copy: `reconcileArrays(parent, [...oldNodes], newNodes)`.
1389
+ *
1434
1390
  * @example
1435
1391
  * ```ts
1436
1392
  * const oldNodes = [node1, node2, node3]
@@ -1478,50 +1434,6 @@ declare function removeNodes(nodes: Node[]): void;
1478
1434
  * They provide low-level primitives for DOM node manipulation without rebuilding.
1479
1435
  */
1480
1436
 
1481
- /**
1482
- * A keyed block represents a single item in a list with its associated DOM nodes and state
1483
- */
1484
- interface KeyedBlock<T = unknown> {
1485
- /** Unique key for this block */
1486
- key: string | number;
1487
- /** DOM nodes belonging to this block */
1488
- nodes: Node[];
1489
- /** Root context for lifecycle management */
1490
- root: RootContext;
1491
- /** Signal containing the current item value */
1492
- item: SignalAccessor<T>;
1493
- /** Signal containing the current index */
1494
- index: SignalAccessor<number>;
1495
- /** Last raw item value assigned to this block */
1496
- rawItem: T;
1497
- /** Last raw index value assigned to this block */
1498
- rawIndex: number;
1499
- }
1500
- /**
1501
- * Container for managing keyed list blocks
1502
- */
1503
- interface KeyedListContainer<T = unknown> {
1504
- /** Start marker comment node */
1505
- startMarker: Comment;
1506
- /** End marker comment node */
1507
- endMarker: Comment;
1508
- /** Map of key to block */
1509
- blocks: Map<string | number, KeyedBlock<T>>;
1510
- /** Scratch map reused for the next render */
1511
- nextBlocks: Map<string | number, KeyedBlock<T>>;
1512
- /** Current nodes in DOM order (including markers) */
1513
- currentNodes: Node[];
1514
- /** Next-frame node buffer to avoid reallocations */
1515
- nextNodes: Node[];
1516
- /** Ordered blocks in current DOM order */
1517
- orderedBlocks: KeyedBlock<T>[];
1518
- /** Next-frame ordered block buffer to avoid reallocations */
1519
- nextOrderedBlocks: KeyedBlock<T>[];
1520
- /** Track position of keys in the ordered buffer to handle duplicates */
1521
- orderedIndexByKey: Map<string | number, number>;
1522
- /** Cleanup function */
1523
- dispose: () => void;
1524
- }
1525
1437
  /**
1526
1438
  * Binding handle returned by createKeyedList for compiler-generated code
1527
1439
  */
@@ -1538,14 +1450,6 @@ interface KeyedListBinding {
1538
1450
  dispose: () => void;
1539
1451
  }
1540
1452
  type FineGrainedRenderItem<T> = (itemSig: SignalAccessor<T>, indexSig: SignalAccessor<number>, key: string | number) => Node[];
1541
- /**
1542
- * A block identified by start/end comment markers.
1543
- */
1544
- interface MarkerBlock {
1545
- start: Comment;
1546
- end: Comment;
1547
- root?: RootContext;
1548
- }
1549
1453
  /**
1550
1454
  * Move nodes to a position before the anchor node.
1551
1455
  * This is optimized to avoid unnecessary DOM operations.
@@ -1555,40 +1459,6 @@ interface MarkerBlock {
1555
1459
  * @param anchor - Node to insert before (or null for end)
1556
1460
  */
1557
1461
  declare function moveNodesBefore(parent: Node, nodes: Node[], anchor: Node | null): void;
1558
- /**
1559
- * Remove an array of nodes from the DOM
1560
- *
1561
- * @param nodes - Array of nodes to remove
1562
- */
1563
- /**
1564
- * Move an entire marker-delimited block (including markers) before the anchor.
1565
- */
1566
- declare function moveMarkerBlock(parent: Node, block: MarkerBlock, anchor: Node | null): void;
1567
- /**
1568
- * Destroy a marker-delimited block, removing nodes and destroying the associated root.
1569
- */
1570
- declare function destroyMarkerBlock(block: MarkerBlock): void;
1571
- /**
1572
- * Create a container for managing a keyed list.
1573
- * This sets up the marker nodes and provides cleanup.
1574
- *
1575
- * @returns Container object with markers, blocks map, and dispose function
1576
- */
1577
- declare function createKeyedListContainer<T = unknown>(): KeyedListContainer<T>;
1578
- /**
1579
- * Create a new keyed block with the given render function
1580
- *
1581
- * @param key - Unique key for this block
1582
- * @param item - Initial item value
1583
- * @param index - Initial index
1584
- * @param render - Function that creates the DOM nodes and sets up bindings
1585
- * @returns New KeyedBlock
1586
- */
1587
- declare function createKeyedBlock<T>(key: string | number, item: T, index: number, render: (item: SignalAccessor<T>, index: SignalAccessor<number>, key: string | number) => Node[], needsIndex?: boolean, hostRoot?: RootContext): KeyedBlock<T>;
1588
- /**
1589
- * Find the first node after the start marker (for getting current anchor)
1590
- */
1591
- declare function getFirstNodeAfter(marker: Comment): Node | null;
1592
1462
  /**
1593
1463
  * Check if a node is between two markers
1594
1464
  */
@@ -1604,4 +1474,4 @@ declare function isNodeBetweenMarkers(node: Node, startMarker: Comment, endMarke
1604
1474
  */
1605
1475
  declare function createKeyedList<T>(getItems: () => T[], keyFn: (item: T, index: number) => string | number, renderItem: FineGrainedRenderItem<T>, needsIndex?: boolean): KeyedListBinding;
1606
1476
 
1607
- export { $effect, $memo, $state, Aliases, type AttributeSetter, type BaseProps, type BindingHandle, BooleanAttributes, ChildProperties, type ClassProp, type Cleanup, type Component, type CreateElementFn, type DOMElement, DelegatedEvents, type Effect, ErrorBoundary, type ErrorInfo, type EventHandler, type FictDevtoolsHook, type FictNode, type FictVNode, Fragment, JSX, type KeyFn, type KeyedBlock, type KeyedListBinding, type KeyedListContainer, type MarkerBlock, type MaybeReactive, type Memo, Properties, type PropsWithChildren, type ReactiveScope, type Ref, type RefCallback, type RefObject, SVGElements, SVGNamespace, type SignalAccessor as Signal, type Store, type StyleProp, Suspense, type SuspenseToken, UnitlessStyles, type VersionedSignal, type VersionedSignalOptions, __fictPopContext, __fictProp, __fictPropsRest, __fictPushContext, __fictRender, __fictResetContext, __fictUseContext, __fictUseEffect, __fictUseMemo, __fictUseSignal, addEventListener, assign, batch, bindAttribute, bindClass, bindEvent, bindProperty, bindRef, bindStyle, bindText, callEventHandler, classList, clearDelegatedEvents, createAttributeBinding, createChildBinding, createClassBinding, createConditional, createEffect, createElement, createKeyedBlock, createKeyedList, createKeyedListContainer, createList, createMemo, createPortal, createPropsProxy, createRef, createRenderEffect, createRoot, createScope, createSelector, createShow, signal as createSignal, createStore, createStyleBinding, createSuspenseToken, createTextBinding, createVersionedSignal, delegateEvents, destroyMarkerBlock, effectScope, getDevtoolsHook, getFirstNodeAfter, getPropAlias, insert, insertNodesBefore, isNodeBetweenMarkers, isReactive, mergeProps, moveMarkerBlock, moveNodesBefore, onCleanup, onDestroy, onMount, __fictProp as prop, reconcileArrays, removeNodes, render, runInScope, setCycleProtectionOptions, spread, startTransition, template, toNodeArray, untrack, unwrap, unwrapPrimitive, useDeferredValue, useProp, useTransition };
1477
+ export { $effect, $memo, $state, Aliases, type AttributeSetter, type BaseProps, type BindingHandle, BooleanAttributes, ChildProperties, type ClassProp, type Cleanup, type Component, type CreateElementFn, type DOMElement, DelegatedEvents, type Effect, ErrorBoundary, type ErrorInfo, type EventHandler, type FictDevtoolsHook, type FictNode, type FictVNode, Fragment, JSX, type KeyedListBinding, type MaybeReactive, type Memo, Properties, type PropsWithChildren, type ReactiveScope, type Ref, type RefCallback, type RefObject, SVGElements, SVGNamespace, type SignalAccessor as Signal, type Store, type StyleProp, Suspense, type SuspenseToken, UnitlessStyles, type VersionedSignal, type VersionedSignalOptions, __fictPopContext, __fictProp, __fictPropsRest, __fictPushContext, __fictRender, __fictResetContext, __fictUseContext, __fictUseEffect, __fictUseMemo, __fictUseSignal, addEventListener, assign, batch, bindAttribute, bindClass, bindEvent, bindProperty, bindRef, bindStyle, bindText, callEventHandler, classList, clearDelegatedEvents, createAttributeBinding, createChildBinding, createClassBinding, createConditional, createEffect, createElement, createKeyedList, createMemo, createPortal, createPropsProxy, createRef, createRenderEffect, createRoot, createScope, createSelector, createShow, signal as createSignal, createStore, createStyleBinding, createSuspenseToken, createTextBinding, createVersionedSignal, delegateEvents, effectScope, getDevtoolsHook, getPropAlias, insert, insertNodesBefore, isNodeBetweenMarkers, isReactive, mergeProps, moveNodesBefore, onCleanup, onDestroy, onMount, __fictProp as prop, reconcileArrays, removeNodes, render, runInScope, setCycleProtectionOptions, spread, startTransition, template, toNodeArray, untrack, unwrap, useDeferredValue, useProp, useTransition };