@xaendar/core 0.6.16 → 0.6.17

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.
@@ -369,11 +369,17 @@ export declare type InputSignalOptions<ActualValue = unknown, IncomingValue = Ac
369
369
  *
370
370
  * @param items - The full array being iterated.
371
371
  * @param index - The current iteration index.
372
- * @param itemAlias - The template alias name for the current item.
373
- * @param indexAlias - The template alias name for the current index.
372
+ * @param itemName - The identifier to reference the i-th item during iteration
373
+ * @param aliases - Aliases for implicit variables defined in the `{@for} loop`
374
374
  * @returns A record mapping alias names and built-in variables to their values.
375
375
  */
376
- export declare function _iterationVariables(items: unknown[], index: number, itemAlias: string, indexAlias: string): Record<string, unknown>;
376
+ export declare function _iterationVariables(items: unknown[], index: number, itemName: string, aliases: {
377
+ $index: string;
378
+ $first: string;
379
+ $last: string;
380
+ $even: string;
381
+ $odd: string;
382
+ }): Record<string, unknown>;
377
383
 
378
384
  /**
379
385
  * Represents the output type returned by an `@Event` decorator in a web component.
@@ -622,19 +622,19 @@ function _for(parentNode, parentContext, condition, forFn) {
622
622
  *
623
623
  * @param items - The full array being iterated.
624
624
  * @param index - The current iteration index.
625
- * @param itemAlias - The template alias name for the current item.
626
- * @param indexAlias - The template alias name for the current index.
625
+ * @param itemName - The identifier to reference the i-th item during iteration
626
+ * @param aliases - Aliases for implicit variables defined in the `{@for} loop`
627
627
  * @returns A record mapping alias names and built-in variables to their values.
628
628
  */
629
- function _iterationVariables(items, index, itemAlias, indexAlias) {
629
+ function _iterationVariables(items, index, itemName, aliases) {
630
630
  const even = index % 2 === 0;
631
631
  return {
632
- [itemAlias]: items[index],
633
- [indexAlias]: index,
634
- $first: index === 0,
635
- $last: index === items.length - 1,
636
- $even: even,
637
- $odd: !even
632
+ [itemName]: items[index],
633
+ [aliases.$index]: index,
634
+ [aliases.$first]: index === 0,
635
+ [aliases.$last]: index === items.length - 1,
636
+ [aliases.$even]: even,
637
+ [aliases.$odd]: !even
638
638
  };
639
639
  }
640
640
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xaendar/core",
3
- "version": "0.6.16",
3
+ "version": "0.6.17",
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.16",
20
- "@xaendar/types": "0.6.16"
19
+ "@xaendar/signals": "0.6.17",
20
+ "@xaendar/types": "0.6.17"
21
21
  }
22
22
  }