@xaendar/core 0.6.15 → 0.6.16
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.
|
@@ -274,7 +274,7 @@ export declare type EventOptions = Beautify<RequireOne<Omit<CustomEventInit, 'de
|
|
|
274
274
|
* @param condition - A reactive function that returns the array of items to iterate over.
|
|
275
275
|
* @param forFn - A callback invoked for each item, receiving the parent node, the item, and its index. Must return an array of cleanup functions.
|
|
276
276
|
*/
|
|
277
|
-
export declare function _for(parentNode: HTMLElement, parentContext: Context, condition: () => unknown[], forFn: Function_2<[parentNode: HTMLElement, context: Context,
|
|
277
|
+
export declare function _for(parentNode: HTMLElement, parentContext: Context, condition: () => unknown[], forFn: Function_2<[parentNode: HTMLElement, context: Context, items: unknown[], index: number], Context>): void;
|
|
278
278
|
|
|
279
279
|
/**
|
|
280
280
|
* Creates a reactive conditional structure from a list of branches.
|
package/dist/xaendar-core.es.js
CHANGED
|
@@ -608,7 +608,7 @@ function _for(parentNode, parentContext, condition, forFn) {
|
|
|
608
608
|
const items = condition();
|
|
609
609
|
Signal.subtle.untrack(() => {
|
|
610
610
|
for (let i = 0; i < items.length; i++) {
|
|
611
|
-
const context = forFn(parentNode, parentContext, items
|
|
611
|
+
const context = forFn(parentNode, parentContext, items, i);
|
|
612
612
|
contexts.push(context);
|
|
613
613
|
parentContext.addChild(context);
|
|
614
614
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xaendar/core",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.16",
|
|
4
4
|
"description": "A library containing core utils such as webcomponent base classes and theming support",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@xaendar/signals": "0.6.
|
|
20
|
-
"@xaendar/types": "0.6.
|
|
19
|
+
"@xaendar/signals": "0.6.16",
|
|
20
|
+
"@xaendar/types": "0.6.16"
|
|
21
21
|
}
|
|
22
22
|
}
|