@uniformdev/mesh-sdk 20.14.1 → 20.14.2

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
@@ -1654,6 +1654,7 @@ type OpenDialogMessage = {
1654
1654
  type NavigateMessage = {
1655
1655
  path: string;
1656
1656
  options?: {
1657
+ projectId?: string;
1657
1658
  target?: '_blank';
1658
1659
  };
1659
1660
  };
@@ -1759,8 +1760,6 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
1759
1760
  metadata: TMetadata;
1760
1761
  /**
1761
1762
  * A router object that can be used to navigate parent frame (Uniform App) to other page within current project and other methods.
1762
- *
1763
- * @deprecated Is not stable yet so can contain breaking changes in the future
1764
1763
  */
1765
1764
  router: MeshRouter;
1766
1765
  /**
@@ -1787,9 +1786,13 @@ type MeshRouter = {
1787
1786
  * So router.navigate('/canvas/edit/{compositionId}') will navigate will open the composition editor for the given composition ID in the parent frame.
1788
1787
  * Be aware that most of the time it will close your mesh app, so you should use it with caution.
1789
1788
  *
1790
- * @deprecated Is not stable yet so can contain breaking changes in the future
1789
+ * @param path - The path to navigate to. You don't need to specify /projects/${projectId} as it is prepended automatically with the current project ID.
1790
+ * @param options - The options for the navigation.
1791
+ * @param options.projectId - You can specify project ID to navigate to. By default the current project ID is used.
1792
+ * @param options.target - Allows to open a new tab instead of navigating the current one.
1791
1793
  */
1792
1794
  navigatePlatform: (path: string, options?: {
1795
+ projectId?: string;
1793
1796
  target?: '_blank';
1794
1797
  }) => void;
1795
1798
  };
@@ -2008,9 +2011,7 @@ type PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration = unknown
2008
2011
  /** @deprecated Experimental functionality is subject to change in minor versions. */
2009
2012
  type PersonalizationCriteriaLocation<TCriteriaValue, TIntegrationConfiguration = unknown> = MeshLocationCore<TCriteriaValue | undefined, PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration>, TCriteriaValue, 'personalizationCriteria'>;
2010
2013
 
2011
- /** @deprecated Experimental functionality is subject to change in minor versions. */
2012
2014
  type ToolLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<unknown, TIntegrationConfiguration>;
2013
- /** @deprecated Experimental functionality is subject to change in minor versions. */
2014
2015
  type ToolLocation<TTool, TIntegrationConfiguration = unknown> = MeshLocationCore<TTool, ToolLocationMetadata<TIntegrationConfiguration>, TTool, 'tool'>;
2015
2016
 
2016
2017
  interface SdkWindow {
package/dist/index.d.ts CHANGED
@@ -1654,6 +1654,7 @@ type OpenDialogMessage = {
1654
1654
  type NavigateMessage = {
1655
1655
  path: string;
1656
1656
  options?: {
1657
+ projectId?: string;
1657
1658
  target?: '_blank';
1658
1659
  };
1659
1660
  };
@@ -1759,8 +1760,6 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
1759
1760
  metadata: TMetadata;
1760
1761
  /**
1761
1762
  * A router object that can be used to navigate parent frame (Uniform App) to other page within current project and other methods.
1762
- *
1763
- * @deprecated Is not stable yet so can contain breaking changes in the future
1764
1763
  */
1765
1764
  router: MeshRouter;
1766
1765
  /**
@@ -1787,9 +1786,13 @@ type MeshRouter = {
1787
1786
  * So router.navigate('/canvas/edit/{compositionId}') will navigate will open the composition editor for the given composition ID in the parent frame.
1788
1787
  * Be aware that most of the time it will close your mesh app, so you should use it with caution.
1789
1788
  *
1790
- * @deprecated Is not stable yet so can contain breaking changes in the future
1789
+ * @param path - The path to navigate to. You don't need to specify /projects/${projectId} as it is prepended automatically with the current project ID.
1790
+ * @param options - The options for the navigation.
1791
+ * @param options.projectId - You can specify project ID to navigate to. By default the current project ID is used.
1792
+ * @param options.target - Allows to open a new tab instead of navigating the current one.
1791
1793
  */
1792
1794
  navigatePlatform: (path: string, options?: {
1795
+ projectId?: string;
1793
1796
  target?: '_blank';
1794
1797
  }) => void;
1795
1798
  };
@@ -2008,9 +2011,7 @@ type PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration = unknown
2008
2011
  /** @deprecated Experimental functionality is subject to change in minor versions. */
2009
2012
  type PersonalizationCriteriaLocation<TCriteriaValue, TIntegrationConfiguration = unknown> = MeshLocationCore<TCriteriaValue | undefined, PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration>, TCriteriaValue, 'personalizationCriteria'>;
2010
2013
 
2011
- /** @deprecated Experimental functionality is subject to change in minor versions. */
2012
2014
  type ToolLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<unknown, TIntegrationConfiguration>;
2013
- /** @deprecated Experimental functionality is subject to change in minor versions. */
2014
2015
  type ToolLocation<TTool, TIntegrationConfiguration = unknown> = MeshLocationCore<TTool, ToolLocationMetadata<TIntegrationConfiguration>, TTool, 'tool'>;
2015
2016
 
2016
2017
  interface SdkWindow {
package/dist/index.esm.js CHANGED
@@ -131,7 +131,7 @@ var getLogger = (prefix, debug) => {
131
131
  };
132
132
 
133
133
  // src/temp/version.ts
134
- var UNIFORM_MESH_SDK_VERSION = "20.14.1";
134
+ var UNIFORM_MESH_SDK_VERSION = "20.14.2";
135
135
 
136
136
  // src/framepost/constants.ts
137
137
  var DEFAULT_REQUEST_TIMEOUT = 5e3;
@@ -552,9 +552,11 @@ var createSdkWindow = ({
552
552
  }
553
553
  const windowInstance = window;
554
554
  const updateHeight = (height) => {
555
- if (height && height !== oldHeight) {
556
- oldHeight = height;
557
- onHeightChange == null ? void 0 : onHeightChange(height);
555
+ if (height) {
556
+ if (height !== oldHeight) {
557
+ oldHeight = height;
558
+ onHeightChange == null ? void 0 : onHeightChange(height);
559
+ }
558
560
  return;
559
561
  }
560
562
  let maxBottom = windowInstance.document.documentElement.getBoundingClientRect().height;
@@ -625,6 +627,7 @@ var createSdkWindow = ({
625
627
  childList: true,
626
628
  subtree: true
627
629
  });
630
+ updateHeight();
628
631
  },
629
632
  disableAutoResizing: () => {
630
633
  observer == null ? void 0 : observer.disconnect();
package/dist/index.js CHANGED
@@ -172,7 +172,7 @@ var getLogger = (prefix, debug) => {
172
172
  };
173
173
 
174
174
  // src/temp/version.ts
175
- var UNIFORM_MESH_SDK_VERSION = "20.14.1";
175
+ var UNIFORM_MESH_SDK_VERSION = "20.14.2";
176
176
 
177
177
  // src/framepost/constants.ts
178
178
  var DEFAULT_REQUEST_TIMEOUT = 5e3;
@@ -593,9 +593,11 @@ var createSdkWindow = ({
593
593
  }
594
594
  const windowInstance = window;
595
595
  const updateHeight = (height) => {
596
- if (height && height !== oldHeight) {
597
- oldHeight = height;
598
- onHeightChange == null ? void 0 : onHeightChange(height);
596
+ if (height) {
597
+ if (height !== oldHeight) {
598
+ oldHeight = height;
599
+ onHeightChange == null ? void 0 : onHeightChange(height);
600
+ }
599
601
  return;
600
602
  }
601
603
  let maxBottom = windowInstance.document.documentElement.getBoundingClientRect().height;
@@ -666,6 +668,7 @@ var createSdkWindow = ({
666
668
  childList: true,
667
669
  subtree: true
668
670
  });
671
+ updateHeight();
669
672
  },
670
673
  disableAutoResizing: () => {
671
674
  observer == null ? void 0 : observer.disconnect();
package/dist/index.mjs CHANGED
@@ -131,7 +131,7 @@ var getLogger = (prefix, debug) => {
131
131
  };
132
132
 
133
133
  // src/temp/version.ts
134
- var UNIFORM_MESH_SDK_VERSION = "20.14.1";
134
+ var UNIFORM_MESH_SDK_VERSION = "20.14.2";
135
135
 
136
136
  // src/framepost/constants.ts
137
137
  var DEFAULT_REQUEST_TIMEOUT = 5e3;
@@ -552,9 +552,11 @@ var createSdkWindow = ({
552
552
  }
553
553
  const windowInstance = window;
554
554
  const updateHeight = (height) => {
555
- if (height && height !== oldHeight) {
556
- oldHeight = height;
557
- onHeightChange == null ? void 0 : onHeightChange(height);
555
+ if (height) {
556
+ if (height !== oldHeight) {
557
+ oldHeight = height;
558
+ onHeightChange == null ? void 0 : onHeightChange(height);
559
+ }
558
560
  return;
559
561
  }
560
562
  let maxBottom = windowInstance.document.documentElement.getBoundingClientRect().height;
@@ -625,6 +627,7 @@ var createSdkWindow = ({
625
627
  childList: true,
626
628
  subtree: true
627
629
  });
630
+ updateHeight();
628
631
  },
629
632
  disableAutoResizing: () => {
630
633
  observer == null ? void 0 : observer.disconnect();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/mesh-sdk",
3
- "version": "20.14.1",
3
+ "version": "20.14.2",
4
4
  "description": "Uniform Mesh Framework SDK",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -34,10 +34,10 @@
34
34
  "access": "public"
35
35
  },
36
36
  "dependencies": {
37
- "@uniformdev/assets": "20.14.1",
38
- "@uniformdev/canvas": "20.14.1",
39
- "@uniformdev/context": "20.14.1",
40
- "@uniformdev/project-map": "20.14.1",
37
+ "@uniformdev/assets": "20.14.2",
38
+ "@uniformdev/canvas": "20.14.2",
39
+ "@uniformdev/context": "20.14.2",
40
+ "@uniformdev/project-map": "20.14.2",
41
41
  "imagesloaded": "^5.0.0",
42
42
  "mitt": "^3.0.1"
43
43
  },
@@ -45,5 +45,5 @@
45
45
  "@types/imagesloaded": "^4.1.2",
46
46
  "openai": "4.94.0"
47
47
  },
48
- "gitHead": "1cf777c56f2e7f08514fd44b40700579c48a9c71"
48
+ "gitHead": "5da8b97b485b3a86ca4aaadcf70c0a0273429ef1"
49
49
  }