@flowgram.ai/variable-core 0.4.5 → 0.4.7

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/index.js CHANGED
@@ -319,7 +319,7 @@ var ASTKind = /* @__PURE__ */ ((ASTKind2) => {
319
319
  })(ASTKind || {});
320
320
 
321
321
  // src/ast/ast-registers.ts
322
- var import_lodash3 = require("lodash");
322
+ var import_lodash_es3 = require("lodash-es");
323
323
  var import_inversify3 = require("inversify");
324
324
 
325
325
  // src/ast/utils/inversify.ts
@@ -807,7 +807,7 @@ var MapType = class extends BaseType {
807
807
  MapType.kind = "Map" /* Map */;
808
808
 
809
809
  // src/ast/type/object.ts
810
- var import_lodash = require("lodash");
810
+ var import_lodash_es = require("lodash-es");
811
811
  var ObjectType = class extends BaseType {
812
812
  constructor() {
813
813
  super(...arguments);
@@ -887,7 +887,7 @@ var ObjectType = class extends BaseType {
887
887
  const targetProperties = targetTypeJSON.properties || [];
888
888
  const sourcePropertyKeys = Array.from(this.propertyTable.keys());
889
889
  const targetPropertyKeys = targetProperties.map((_target) => _target.key);
890
- const isKeyStrongEqual = !(0, import_lodash.xor)(sourcePropertyKeys, targetPropertyKeys).length;
890
+ const isKeyStrongEqual = !(0, import_lodash_es.xor)(sourcePropertyKeys, targetPropertyKeys).length;
891
891
  return isKeyStrongEqual && targetProperties.every((targetProperty) => {
892
892
  const sourceProperty = this.propertyTable.get(targetProperty.key);
893
893
  return sourceProperty && sourceProperty.key === targetProperty.key && sourceProperty.type?.isTypeEqual(targetProperty?.type);
@@ -1083,12 +1083,12 @@ EnumerateExpression.kind = "EnumerateExpression" /* EnumerateExpression */;
1083
1083
  var import_fast_equals4 = require("fast-equals");
1084
1084
 
1085
1085
  // src/ast/utils/expression.ts
1086
- var import_lodash2 = require("lodash");
1086
+ var import_lodash_es2 = require("lodash-es");
1087
1087
  function getAllRefs(ast) {
1088
1088
  return getAllChildren(ast).filter((_child) => _child.flags & 4 /* Expression */).map((_child) => _child.refs).flat().filter(Boolean);
1089
1089
  }
1090
1090
  function checkRefCycle(curr, refNodes) {
1091
- if ((0, import_lodash2.intersection)(curr.scope.coverScopes, refNodes.map((_ref) => _ref?.scope).filter(Boolean)).length === 0) {
1091
+ if ((0, import_lodash_es2.intersection)(curr.scope.coverScopes, refNodes.map((_ref) => _ref?.scope).filter(Boolean)).length === 0) {
1092
1092
  return false;
1093
1093
  }
1094
1094
  const visited = /* @__PURE__ */ new Set();
@@ -1100,7 +1100,7 @@ function checkRefCycle(curr, refNodes) {
1100
1100
  queue.push(ref);
1101
1101
  }
1102
1102
  }
1103
- return (0, import_lodash2.intersection)(Array.from(visited), getParentFields(curr)).length > 0;
1103
+ return (0, import_lodash_es2.intersection)(Array.from(visited), getParentFields(curr)).length > 0;
1104
1104
  }
1105
1105
 
1106
1106
  // src/ast/expression/keypath-expression-v2.ts
@@ -1553,7 +1553,7 @@ var ASTRegisters = class {
1553
1553
  injector?.() || {}
1554
1554
  );
1555
1555
  node.changeLocked = true;
1556
- node.fromJSON((0, import_lodash3.omit)(json, ["key", "kind"]));
1556
+ node.fromJSON((0, import_lodash_es3.omit)(json, ["key", "kind"]));
1557
1557
  node.changeLocked = false;
1558
1558
  node.dispatchGlobalEvent({ type: "NewAST" });
1559
1559
  if (Reflect.hasMetadata(POST_CONSTRUCT_AST_SYMBOL, node)) {
@@ -1745,7 +1745,7 @@ var ScopeOutputData = class {
1745
1745
 
1746
1746
  // src/scope/datas/scope-available-data.ts
1747
1747
  var import_rxjs4 = require("rxjs");
1748
- var import_lodash4 = require("lodash");
1748
+ var import_lodash_es4 = require("lodash-es");
1749
1749
  var import_fast_equals7 = require("fast-equals");
1750
1750
  var import_utils5 = require("@flowgram.ai/utils");
1751
1751
  var import_utils6 = require("@flowgram.ai/utils");
@@ -1761,7 +1761,7 @@ var ScopeAvailableData = class {
1761
1761
  */
1762
1762
  this.variables$ = this.refresh$.pipe(
1763
1763
  // 输出变量是否 version 发生变化
1764
- (0, import_rxjs4.map)(() => (0, import_lodash4.flatten)(this.depScopes.map((scope) => scope.output.variables || []))),
1764
+ (0, import_rxjs4.map)(() => (0, import_lodash_es4.flatten)(this.depScopes.map((scope) => scope.output.variables || []))),
1765
1765
  // 变量列表浅比较
1766
1766
  (0, import_rxjs4.distinctUntilChanged)(import_fast_equals7.shallowEqual),
1767
1767
  (0, import_rxjs4.share)()
@@ -2118,7 +2118,7 @@ VariableEngine = __decorateClass([
2118
2118
  ], VariableEngine);
2119
2119
 
2120
2120
  // src/services/variable-field-key-rename-service.ts
2121
- var import_lodash5 = require("lodash");
2121
+ var import_lodash_es5 = require("lodash-es");
2122
2122
  var import_inversify7 = require("inversify");
2123
2123
  var import_utils10 = require("@flowgram.ai/utils");
2124
2124
  var VariableFieldKeyRenameService = class {
@@ -2161,7 +2161,7 @@ var VariableFieldKeyRenameService = class {
2161
2161
  this.renameEmitter.fire(renameNodeInfo);
2162
2162
  }
2163
2163
  notifyFieldsDispose(prev, next) {
2164
- const removedFields = (0, import_lodash5.difference)(prev || [], next || []);
2164
+ const removedFields = (0, import_lodash_es5.difference)(prev || [], next || []);
2165
2165
  removedFields.forEach((_field) => this.disposeInListEmitter.fire(_field));
2166
2166
  }
2167
2167
  init() {