@arcgis/toolkit 5.1.0-next.44 → 5.1.0-next.46

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.
@@ -117,7 +117,7 @@ const getClosestElement = (base, selector) => {
117
117
  if (rootElement === globalThis.document) {
118
118
  return;
119
119
  }
120
- currentElement = rootElement.host;
120
+ currentElement = rootElement?.host;
121
121
  }
122
122
  return;
123
123
  };
package/dist/dom/index.js CHANGED
@@ -115,7 +115,7 @@ const getClosestElement = (base, selector) => {
115
115
  if (rootElement === globalThis.document) {
116
116
  return;
117
117
  }
118
- currentElement = rootElement.host;
118
+ currentElement = rootElement?.host;
119
119
  }
120
120
  return;
121
121
  };
@@ -62,15 +62,18 @@ export declare const addLtrMark: (value: string | undefined) => string;
62
62
  export type UUID = ReturnType<typeof crypto.randomUUID>;
63
63
  /**
64
64
  * Generate a GUID string.
65
+ *
66
+ * If your component is using shadow root, the DOM element IDs do not need
67
+ * to be globally unique - IDs are scoped to the shadow root.
68
+ *
69
+ * Avoid using GUID and other non-deterministic output in render() as they
70
+ * cause SSR hydration issues and snapshot test instability.
71
+ *
65
72
  * @example
66
73
  * ```ts
67
74
  * const id = generateGuid();
68
75
  * // 00000000-0000-0000-0000-000000000000.
69
76
  * ```
70
- *
71
- * @remarks
72
- * If your component is using shadow root, the DOM element IDs do not need
73
- * to be globally unique.
74
77
  */
75
78
  export declare const generateGuid: () => UUID;
76
79
  /**
@@ -62,15 +62,18 @@ export declare const addLtrMark: (value: string | undefined) => string;
62
62
  export type UUID = ReturnType<typeof crypto.randomUUID>;
63
63
  /**
64
64
  * Generate a GUID string.
65
+ *
66
+ * If your component is using shadow root, the DOM element IDs do not need
67
+ * to be globally unique - IDs are scoped to the shadow root.
68
+ *
69
+ * Avoid using GUID and other non-deterministic output in render() as they
70
+ * cause SSR hydration issues and snapshot test instability.
71
+ *
65
72
  * @example
66
73
  * ```ts
67
74
  * const id = generateGuid();
68
75
  * // 00000000-0000-0000-0000-000000000000.
69
76
  * ```
70
- *
71
- * @remarks
72
- * If your component is using shadow root, the DOM element IDs do not need
73
- * to be globally unique.
74
77
  */
75
78
  export declare const generateGuid: () => UUID;
76
79
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/toolkit",
3
- "version": "5.1.0-next.44",
3
+ "version": "5.1.0-next.46",
4
4
  "description": "Collection of common internal patterns and utilities for ArcGIS Maps SDK for JavaScript components.",
5
5
  "homepage": "https://developers.arcgis.com/javascript/latest/",
6
6
  "sideEffects": false,