@mintjamsinc/ichigojs 0.1.47 → 0.1.49

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.
@@ -8615,8 +8615,10 @@ class VTextEvaluator {
8615
8615
  * @param functionDependencies A dictionary mapping function names to their dependencies.
8616
8616
  */
8617
8617
  constructor(text, functionDependencies) {
8618
- // Extract expressions in {{...}} using regex
8619
- const regex = /\{\{([^}]+)\}\}/g;
8618
+ // Extract expressions in {{...}} using regex.
8619
+ // Allow `}` inside the expression as long as it is not followed by another `}`,
8620
+ // so that object literals like `{ short: true }` are captured correctly.
8621
+ const regex = /\{\{((?:[^}]|\}(?!\}))+)\}\}/g;
8620
8622
  const matches = Array.from(text.matchAll(regex));
8621
8623
  // Gather identifiers from the extracted expressions
8622
8624
  this.#identifiers = [];
@@ -8672,7 +8674,7 @@ class VTextEvaluator {
8672
8674
  * @returns True if the text contains expressions, false otherwise.
8673
8675
  */
8674
8676
  static containsExpression(text) {
8675
- const regex = /\{\{([^}]+)\}\}/g;
8677
+ const regex = /\{\{((?:[^}]|\}(?!\}))+)\}\}/g;
8676
8678
  return regex.test(text);
8677
8679
  }
8678
8680
  /**
@@ -10692,6 +10694,14 @@ class VModelDirective {
10692
10694
  * @inheritdoc
10693
10695
  */
10694
10696
  get onMounted() {
10697
+ const element = this.#vNode.node;
10698
+ // For select elements, re-apply value after mount to ensure
10699
+ // options (e.g., generated by v-for) are present in the DOM.
10700
+ if (element instanceof HTMLSelectElement) {
10701
+ return () => {
10702
+ this.#render();
10703
+ };
10704
+ }
10695
10705
  return undefined;
10696
10706
  }
10697
10707
  /**
@@ -10704,6 +10714,14 @@ class VModelDirective {
10704
10714
  * @inheritdoc
10705
10715
  */
10706
10716
  get onUpdated() {
10717
+ const element = this.#vNode.node;
10718
+ // For select elements, re-apply value after children are updated
10719
+ // to ensure dynamically generated options are available.
10720
+ if (element instanceof HTMLSelectElement) {
10721
+ return () => {
10722
+ this.#render();
10723
+ };
10724
+ }
10707
10725
  return undefined;
10708
10726
  }
10709
10727
  /**