@masterteam/components 0.0.284 → 0.0.286

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.
@@ -2687,9 +2687,20 @@ class FormulaToolbar {
2687
2687
  /**
2688
2688
  * Insert a picked value as a literal. The item's `key` is what gets stored
2689
2689
  * and compared; the name rides along as the chip's display label only.
2690
+ *
2691
+ * A numeric item serializes as a number literal rather than a quoted string —
2692
+ * `createLiteralBlock` keeps the JS type on `literalValue`, which is what the
2693
+ * editor reads to stamp `literalType`. Never infer this from the key looking
2694
+ * numeric: lookup keys fall back to the item id and still compare as strings.
2690
2695
  */
2691
2696
  insertPropertyValue(item) {
2692
- this.insertBlock({ ...createLiteralBlock(item.key), display: item.name });
2697
+ const numeric = Number(item.key);
2698
+ const value = item.valueType === 'number' &&
2699
+ item.key.trim() !== '' &&
2700
+ Number.isFinite(numeric)
2701
+ ? numeric
2702
+ : item.key;
2703
+ this.insertBlock({ ...createLiteralBlock(value), display: item.name });
2693
2704
  }
2694
2705
  /** Insert custom value */
2695
2706
  insertCustomValue() {