@mintjamsinc/ichigojs 0.1.85 → 0.1.86

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.
@@ -15,6 +15,13 @@ export declare class ExpressionUtils {
15
15
  static extractIdentifiers(expression: string, functionDependencies: Record<string, string[]>, options?: {
16
16
  asScript?: boolean;
17
17
  }): string[];
18
+ /**
19
+ * Returns the binding name an identifier chain starts with
20
+ * (e.g. "items" for "items[0].name" or "user.name").
21
+ * @param identifier An identifier or member chain returned by extractIdentifiers.
22
+ * @returns The left-most name of the chain.
23
+ */
24
+ static baseIdentifier(identifier: string): string;
18
25
  /**
19
26
  * Analyzes the dependencies of functions in the provided dictionary.
20
27
  * @param functions A dictionary mapping function names to their implementations.
@@ -50,6 +50,11 @@ export declare class ReactiveProxy {
50
50
  * This allows mapping variable names to their actual source paths for dependency tracking.
51
51
  */
52
52
  private static pathAliases;
53
+ /**
54
+ * Compiled patterns for identifiers that contain a "[*]" index, keyed by the
55
+ * identifier and whether descendants of the path also match.
56
+ */
57
+ private static pathPatterns;
53
58
  /**
54
59
  * The `Object.prototype.toString` tags of the *only* value types we deeply
55
60
  * proxy. Everything else is returned untouched (raw).
@@ -189,5 +194,17 @@ export declare class ReactiveProxy {
189
194
  * @returns True if the change path matches the identifier
190
195
  */
191
196
  static doesChangeMatchIdentifier(changePath: string, identifier: string): boolean;
197
+ /**
198
+ * Checks whether a change path names the location an identifier refers to.
199
+ * A "[*]" index in the identifier (e.g. "items[*].name" for `items[i].name`)
200
+ * stands for an index known only when the expression runs and matches any
201
+ * one index or key.
202
+ *
203
+ * @param changePath The path that was changed (e.g., "items[2].name")
204
+ * @param identifier The identifier to check (e.g., "items[*].name")
205
+ * @param descendants Whether a change below the identifier also matches
206
+ * @returns True if the change path matches the identifier
207
+ */
208
+ static pathMatches(changePath: string, identifier: string, descendants?: boolean): boolean;
192
209
  }
193
210
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintjamsinc/ichigojs",
3
- "version": "0.1.85",
3
+ "version": "0.1.86",
4
4
  "description": "ichigo.js - Simple and intuitive reactive framework. Lightweight, fast, and user-friendly virtual DOM library",
5
5
  "main": "./dist/ichigo.cjs",
6
6
  "module": "./dist/ichigo.esm.js",