@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.
package/dist/ichigo.cjs CHANGED
@@ -8621,8 +8621,10 @@
8621
8621
  * @param functionDependencies A dictionary mapping function names to their dependencies.
8622
8622
  */
8623
8623
  constructor(text, functionDependencies) {
8624
- // Extract expressions in {{...}} using regex
8625
- const regex = /\{\{([^}]+)\}\}/g;
8624
+ // Extract expressions in {{...}} using regex.
8625
+ // Allow `}` inside the expression as long as it is not followed by another `}`,
8626
+ // so that object literals like `{ short: true }` are captured correctly.
8627
+ const regex = /\{\{((?:[^}]|\}(?!\}))+)\}\}/g;
8626
8628
  const matches = Array.from(text.matchAll(regex));
8627
8629
  // Gather identifiers from the extracted expressions
8628
8630
  this.#identifiers = [];
@@ -8678,7 +8680,7 @@
8678
8680
  * @returns True if the text contains expressions, false otherwise.
8679
8681
  */
8680
8682
  static containsExpression(text) {
8681
- const regex = /\{\{([^}]+)\}\}/g;
8683
+ const regex = /\{\{((?:[^}]|\}(?!\}))+)\}\}/g;
8682
8684
  return regex.test(text);
8683
8685
  }
8684
8686
  /**
@@ -10698,6 +10700,14 @@
10698
10700
  * @inheritdoc
10699
10701
  */
10700
10702
  get onMounted() {
10703
+ const element = this.#vNode.node;
10704
+ // For select elements, re-apply value after mount to ensure
10705
+ // options (e.g., generated by v-for) are present in the DOM.
10706
+ if (element instanceof HTMLSelectElement) {
10707
+ return () => {
10708
+ this.#render();
10709
+ };
10710
+ }
10701
10711
  return undefined;
10702
10712
  }
10703
10713
  /**
@@ -10710,6 +10720,14 @@
10710
10720
  * @inheritdoc
10711
10721
  */
10712
10722
  get onUpdated() {
10723
+ const element = this.#vNode.node;
10724
+ // For select elements, re-apply value after children are updated
10725
+ // to ensure dynamically generated options are available.
10726
+ if (element instanceof HTMLSelectElement) {
10727
+ return () => {
10728
+ this.#render();
10729
+ };
10730
+ }
10713
10731
  return undefined;
10714
10732
  }
10715
10733
  /**