@uniformdev/mesh-sdk-react 19.58.0 → 19.58.1-alpha.16

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.d.mts CHANGED
@@ -596,6 +596,7 @@ type MeshDataVariableDefinition = Omit<DataVariableDefinition, 'default'> & {
596
596
  type KnownUndefinedVariableInfo = {
597
597
  error?: string;
598
598
  info?: string;
599
+ displayName?: string;
599
600
  };
600
601
  type DataVariableDefinitionWithName = {
601
602
  name: string;
package/dist/index.d.ts CHANGED
@@ -596,6 +596,7 @@ type MeshDataVariableDefinition = Omit<DataVariableDefinition, 'default'> & {
596
596
  type KnownUndefinedVariableInfo = {
597
597
  error?: string;
598
598
  info?: string;
599
+ displayName?: string;
599
600
  };
600
601
  type DataVariableDefinitionWithName = {
601
602
  name: string;
package/dist/index.esm.js CHANGED
@@ -3691,17 +3691,19 @@ function VariablesPlugin({
3691
3691
  const targetVar = variablesRef.current.variables[variableNode.reference];
3692
3692
  const targetUndefinedVar = variablesRef.current.knownUndefinedValues[variableNode.reference];
3693
3693
  const isLoadingVariables = variablesRef.current.isLoading;
3694
- const tooltip = (_c = (_b = (_a = targetVar == null ? void 0 : targetVar.tooltip) != null ? _a : targetVar == null ? void 0 : targetVar.helpText) != null ? _b : targetUndefinedVar == null ? void 0 : targetUndefinedVar.error) != null ? _c : targetUndefinedVar == null ? void 0 : targetUndefinedVar.info;
3695
3694
  const currentState = variableNode.getState();
3695
+ if (currentState.isFresh && !targetVar) {
3696
+ return;
3697
+ }
3698
+ const tooltip = (_c = (_b = (_a = targetVar == null ? void 0 : targetVar.tooltip) != null ? _a : targetVar == null ? void 0 : targetVar.helpText) != null ? _b : targetUndefinedVar == null ? void 0 : targetUndefinedVar.error) != null ? _c : targetUndefinedVar == null ? void 0 : targetUndefinedVar.info;
3696
3699
  const newState = {
3697
3700
  ...currentState,
3698
- // if we lose a display name we 'latch' it to last known (prevents flashes during mesh var updates),
3699
- // unless we're also loading the whole var state
3700
- displayName: (targetVar == null ? void 0 : targetVar.displayName) || (isLoadingVariables ? void 0 : currentState.displayName) || variableNode.reference,
3701
+ displayName: (targetVar == null ? void 0 : targetVar.displayName) || (targetUndefinedVar == null ? void 0 : targetUndefinedVar.displayName) || variableNode.reference,
3701
3702
  isLoading: isLoadingVariables && !targetVar && !(targetUndefinedVar == null ? void 0 : targetUndefinedVar.info),
3702
3703
  hasClickEvent: canEditVariable(variableNode.reference, targetVar),
3703
3704
  referenceIsValid: (targetUndefinedVar == null ? void 0 : targetUndefinedVar.info) ? "info" : isLoadingVariables ? true : Boolean(targetVar),
3704
- tooltip
3705
+ tooltip,
3706
+ isFresh: false
3705
3707
  };
3706
3708
  if (!dequal2(currentState, newState)) {
3707
3709
  variableNode.setState(newState);
package/dist/index.js CHANGED
@@ -3869,17 +3869,19 @@ function VariablesPlugin({
3869
3869
  const targetVar = variablesRef.current.variables[variableNode.reference];
3870
3870
  const targetUndefinedVar = variablesRef.current.knownUndefinedValues[variableNode.reference];
3871
3871
  const isLoadingVariables = variablesRef.current.isLoading;
3872
- const tooltip = (_c = (_b = (_a = targetVar == null ? void 0 : targetVar.tooltip) != null ? _a : targetVar == null ? void 0 : targetVar.helpText) != null ? _b : targetUndefinedVar == null ? void 0 : targetUndefinedVar.error) != null ? _c : targetUndefinedVar == null ? void 0 : targetUndefinedVar.info;
3873
3872
  const currentState = variableNode.getState();
3873
+ if (currentState.isFresh && !targetVar) {
3874
+ return;
3875
+ }
3876
+ const tooltip = (_c = (_b = (_a = targetVar == null ? void 0 : targetVar.tooltip) != null ? _a : targetVar == null ? void 0 : targetVar.helpText) != null ? _b : targetUndefinedVar == null ? void 0 : targetUndefinedVar.error) != null ? _c : targetUndefinedVar == null ? void 0 : targetUndefinedVar.info;
3874
3877
  const newState = {
3875
3878
  ...currentState,
3876
- // if we lose a display name we 'latch' it to last known (prevents flashes during mesh var updates),
3877
- // unless we're also loading the whole var state
3878
- displayName: (targetVar == null ? void 0 : targetVar.displayName) || (isLoadingVariables ? void 0 : currentState.displayName) || variableNode.reference,
3879
+ displayName: (targetVar == null ? void 0 : targetVar.displayName) || (targetUndefinedVar == null ? void 0 : targetUndefinedVar.displayName) || variableNode.reference,
3879
3880
  isLoading: isLoadingVariables && !targetVar && !(targetUndefinedVar == null ? void 0 : targetUndefinedVar.info),
3880
3881
  hasClickEvent: canEditVariable(variableNode.reference, targetVar),
3881
3882
  referenceIsValid: (targetUndefinedVar == null ? void 0 : targetUndefinedVar.info) ? "info" : isLoadingVariables ? true : Boolean(targetVar),
3882
- tooltip
3883
+ tooltip,
3884
+ isFresh: false
3883
3885
  };
3884
3886
  if (!(0, import_lite2.dequal)(currentState, newState)) {
3885
3887
  variableNode.setState(newState);
package/dist/index.mjs CHANGED
@@ -3691,17 +3691,19 @@ function VariablesPlugin({
3691
3691
  const targetVar = variablesRef.current.variables[variableNode.reference];
3692
3692
  const targetUndefinedVar = variablesRef.current.knownUndefinedValues[variableNode.reference];
3693
3693
  const isLoadingVariables = variablesRef.current.isLoading;
3694
- const tooltip = (_c = (_b = (_a = targetVar == null ? void 0 : targetVar.tooltip) != null ? _a : targetVar == null ? void 0 : targetVar.helpText) != null ? _b : targetUndefinedVar == null ? void 0 : targetUndefinedVar.error) != null ? _c : targetUndefinedVar == null ? void 0 : targetUndefinedVar.info;
3695
3694
  const currentState = variableNode.getState();
3695
+ if (currentState.isFresh && !targetVar) {
3696
+ return;
3697
+ }
3698
+ const tooltip = (_c = (_b = (_a = targetVar == null ? void 0 : targetVar.tooltip) != null ? _a : targetVar == null ? void 0 : targetVar.helpText) != null ? _b : targetUndefinedVar == null ? void 0 : targetUndefinedVar.error) != null ? _c : targetUndefinedVar == null ? void 0 : targetUndefinedVar.info;
3696
3699
  const newState = {
3697
3700
  ...currentState,
3698
- // if we lose a display name we 'latch' it to last known (prevents flashes during mesh var updates),
3699
- // unless we're also loading the whole var state
3700
- displayName: (targetVar == null ? void 0 : targetVar.displayName) || (isLoadingVariables ? void 0 : currentState.displayName) || variableNode.reference,
3701
+ displayName: (targetVar == null ? void 0 : targetVar.displayName) || (targetUndefinedVar == null ? void 0 : targetUndefinedVar.displayName) || variableNode.reference,
3701
3702
  isLoading: isLoadingVariables && !targetVar && !(targetUndefinedVar == null ? void 0 : targetUndefinedVar.info),
3702
3703
  hasClickEvent: canEditVariable(variableNode.reference, targetVar),
3703
3704
  referenceIsValid: (targetUndefinedVar == null ? void 0 : targetUndefinedVar.info) ? "info" : isLoadingVariables ? true : Boolean(targetVar),
3704
- tooltip
3705
+ tooltip,
3706
+ isFresh: false
3705
3707
  };
3706
3708
  if (!dequal2(currentState, newState)) {
3707
3709
  variableNode.setState(newState);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/mesh-sdk-react",
3
- "version": "19.58.0",
3
+ "version": "19.58.1-alpha.16+5b13596bc",
4
4
  "description": "Uniform Mesh Framework SDK for React",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -50,9 +50,9 @@
50
50
  "@lexical/selection": "^0.12.0",
51
51
  "@lexical/utils": "^0.12.0",
52
52
  "@react-icons/all-files": "https://github.com/react-icons/react-icons/releases/download/v4.10.1/react-icons-all-files-4.10.1.tgz",
53
- "@uniformdev/canvas": "19.58.0",
54
- "@uniformdev/design-system": "19.58.0",
55
- "@uniformdev/mesh-sdk": "19.58.0",
53
+ "@uniformdev/canvas": "19.58.1-alpha.16+5b13596bc",
54
+ "@uniformdev/design-system": "19.58.1-alpha.16+5b13596bc",
55
+ "@uniformdev/mesh-sdk": "19.58.1-alpha.16+5b13596bc",
56
56
  "dequal": "^2.0.3",
57
57
  "lexical": "^0.12.0",
58
58
  "mitt": "^3.0.0",
@@ -60,7 +60,7 @@
60
60
  "react-hook-form": "^7.43.9",
61
61
  "react-use": "17.4.0",
62
62
  "timeago.js": "4.0.2",
63
- "uuid": "9.0.0",
63
+ "uuid": "9.0.1",
64
64
  "zod": "^3.21.4"
65
65
  },
66
66
  "peerDependencies": {
@@ -76,7 +76,7 @@
76
76
  "@types/react": "18.2.21",
77
77
  "@types/react-beautiful-dnd": "13.1.4",
78
78
  "@types/react-dom": "18.2.7",
79
- "@types/uuid": "9.0.3",
79
+ "@types/uuid": "9.0.4",
80
80
  "react": "18.2.0",
81
81
  "react-dom": "18.2.0"
82
82
  },
@@ -86,5 +86,5 @@
86
86
  "publishConfig": {
87
87
  "access": "public"
88
88
  },
89
- "gitHead": "1e355c1405dc744f333cbce45766965c160c535c"
89
+ "gitHead": "5b13596bc07ad3b8d3809122c9843d17e4a6f413"
90
90
  }