@flowgram.ai/variable-core 0.4.6 → 0.4.8

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/esm/index.js CHANGED
@@ -255,7 +255,7 @@ var ASTKind = /* @__PURE__ */ ((ASTKind2) => {
255
255
  })(ASTKind || {});
256
256
 
257
257
  // src/ast/ast-registers.ts
258
- import { omit } from "lodash";
258
+ import { omit } from "lodash-es";
259
259
  import { injectable as injectable2 } from "inversify";
260
260
 
261
261
  // src/ast/utils/inversify.ts
@@ -673,7 +673,17 @@ var StringType = class extends BaseType {
673
673
  super(...arguments);
674
674
  this.flags = 8 /* BasicType */;
675
675
  }
676
- fromJSON() {
676
+ /**
677
+ * https://json-schema.org/understanding-json-schema/reference/type#format
678
+ */
679
+ get format() {
680
+ return this._format;
681
+ }
682
+ fromJSON(json) {
683
+ if (json?.format !== this._format) {
684
+ this._format = json?.format;
685
+ this.fireChange();
686
+ }
677
687
  }
678
688
  };
679
689
  StringType.kind = "String" /* String */;
@@ -751,7 +761,7 @@ var MapType = class extends BaseType {
751
761
  MapType.kind = "Map" /* Map */;
752
762
 
753
763
  // src/ast/type/object.ts
754
- import { xor } from "lodash";
764
+ import { xor } from "lodash-es";
755
765
  var ObjectType = class extends BaseType {
756
766
  constructor() {
757
767
  super(...arguments);
@@ -1035,7 +1045,7 @@ EnumerateExpression.kind = "EnumerateExpression" /* EnumerateExpression */;
1035
1045
  import { shallowEqual as shallowEqual4 } from "fast-equals";
1036
1046
 
1037
1047
  // src/ast/utils/expression.ts
1038
- import { intersection } from "lodash";
1048
+ import { intersection } from "lodash-es";
1039
1049
  function getAllRefs(ast) {
1040
1050
  return getAllChildren(ast).filter((_child) => _child.flags & 4 /* Expression */).map((_child) => _child.refs).flat().filter(Boolean);
1041
1051
  }
@@ -1541,7 +1551,10 @@ ASTRegisters = __decorateClass([
1541
1551
  // src/ast/factory.ts
1542
1552
  var ASTFactory;
1543
1553
  ((ASTFactory2) => {
1544
- ASTFactory2.createString = () => ({ kind: "String" /* String */ });
1554
+ ASTFactory2.createString = (json) => ({
1555
+ kind: "String" /* String */,
1556
+ ...json || {}
1557
+ });
1545
1558
  ASTFactory2.createNumber = () => ({ kind: "Number" /* Number */ });
1546
1559
  ASTFactory2.createBoolean = () => ({ kind: "Boolean" /* Boolean */ });
1547
1560
  ASTFactory2.createInteger = () => ({ kind: "Integer" /* Integer */ });
@@ -1709,7 +1722,7 @@ import {
1709
1722
  switchMap as switchMap3,
1710
1723
  tap as tap2
1711
1724
  } from "rxjs";
1712
- import { flatten } from "lodash";
1725
+ import { flatten } from "lodash-es";
1713
1726
  import { shallowEqual as shallowEqual7 } from "fast-equals";
1714
1727
  import { Disposable as Disposable3 } from "@flowgram.ai/utils";
1715
1728
  import { Emitter as Emitter2 } from "@flowgram.ai/utils";
@@ -2082,7 +2095,7 @@ VariableEngine = __decorateClass([
2082
2095
  ], VariableEngine);
2083
2096
 
2084
2097
  // src/services/variable-field-key-rename-service.ts
2085
- import { difference } from "lodash";
2098
+ import { difference } from "lodash-es";
2086
2099
  import { inject as inject3, injectable as injectable4, postConstruct, preDestroy as preDestroy2 } from "inversify";
2087
2100
  import { DisposableCollection as DisposableCollection6, Emitter as Emitter4 } from "@flowgram.ai/utils";
2088
2101
  var VariableFieldKeyRenameService = class {