@flipdish/ui-library 0.18.0 → 0.20.0

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.
Files changed (232) hide show
  1. package/README.md +6 -7
  2. package/dist/components/atoms/AppStoreButton/components/app-store-buttons-outline.cjs +5 -12
  3. package/dist/components/atoms/AppStoreButton/components/app-store-buttons-outline.cjs.map +1 -1
  4. package/dist/components/atoms/AppStoreButton/components/app-store-buttons-outline.d.ts.map +1 -1
  5. package/dist/components/atoms/AppStoreButton/components/app-store-buttons-outline.js +5 -12
  6. package/dist/components/atoms/AppStoreButton/components/app-store-buttons-outline.js.map +1 -1
  7. package/dist/components/atoms/AppStoreButton/index.cjs +6 -15
  8. package/dist/components/atoms/AppStoreButton/index.cjs.map +1 -1
  9. package/dist/components/atoms/AppStoreButton/index.d.ts.map +1 -1
  10. package/dist/components/atoms/AppStoreButton/index.js +6 -15
  11. package/dist/components/atoms/AppStoreButton/index.js.map +1 -1
  12. package/dist/components/atoms/Avatar/components/avatar-base.cjs +60 -0
  13. package/dist/components/atoms/Avatar/components/avatar-base.cjs.map +1 -0
  14. package/dist/components/atoms/Avatar/components/avatar-base.d.ts +77 -0
  15. package/dist/components/atoms/Avatar/components/avatar-base.d.ts.map +1 -0
  16. package/dist/components/atoms/Avatar/components/avatar-base.js +58 -0
  17. package/dist/components/atoms/Avatar/components/avatar-base.js.map +1 -0
  18. package/dist/components/atoms/Avatar/components/avatar-label-group.cjs +2 -2
  19. package/dist/components/atoms/Avatar/components/avatar-label-group.cjs.map +1 -1
  20. package/dist/components/atoms/Avatar/components/avatar-label-group.d.ts +1 -1
  21. package/dist/components/atoms/Avatar/components/avatar-label-group.d.ts.map +1 -1
  22. package/dist/components/atoms/Avatar/components/avatar-label-group.js +1 -1
  23. package/dist/components/atoms/Avatar/index.cjs +3 -55
  24. package/dist/components/atoms/Avatar/index.cjs.map +1 -1
  25. package/dist/components/atoms/Avatar/index.d.ts +2 -70
  26. package/dist/components/atoms/Avatar/index.d.ts.map +1 -1
  27. package/dist/components/atoms/Avatar/index.js +1 -57
  28. package/dist/components/atoms/Avatar/index.js.map +1 -1
  29. package/dist/components/atoms/Badge/index.cjs +0 -1
  30. package/dist/components/atoms/Badge/index.cjs.map +1 -1
  31. package/dist/components/atoms/Badge/index.d.ts +0 -5
  32. package/dist/components/atoms/Badge/index.d.ts.map +1 -1
  33. package/dist/components/atoms/Badge/index.js +1 -1
  34. package/dist/components/atoms/Badge/index.js.map +1 -1
  35. package/dist/components/atoms/Button/index.cjs +3 -3
  36. package/dist/components/atoms/Button/index.cjs.map +1 -1
  37. package/dist/components/atoms/Button/index.d.ts.map +1 -1
  38. package/dist/components/atoms/Button/index.js +1 -1
  39. package/dist/components/atoms/FeaturedIcon/index.cjs +2 -2
  40. package/dist/components/atoms/FeaturedIcon/index.cjs.map +1 -1
  41. package/dist/components/atoms/FeaturedIcon/index.d.ts.map +1 -1
  42. package/dist/components/atoms/FeaturedIcon/index.js +1 -1
  43. package/dist/components/atoms/UtilityButton/index.cjs +2 -2
  44. package/dist/components/atoms/UtilityButton/index.cjs.map +1 -1
  45. package/dist/components/atoms/UtilityButton/index.d.ts.map +1 -1
  46. package/dist/components/atoms/UtilityButton/index.js +1 -1
  47. package/dist/components/molecules/BadgeGroup/index.cjs +3 -3
  48. package/dist/components/molecules/BadgeGroup/index.cjs.map +1 -1
  49. package/dist/components/molecules/BadgeGroup/index.d.ts.map +1 -1
  50. package/dist/components/molecules/BadgeGroup/index.js +1 -1
  51. package/dist/components/molecules/Breadcrumbs/components/breadcrumb-account-item.cjs +2 -2
  52. package/dist/components/molecules/Breadcrumbs/components/breadcrumb-account-item.cjs.map +1 -1
  53. package/dist/components/molecules/Breadcrumbs/components/breadcrumb-account-item.js +1 -1
  54. package/dist/components/molecules/Breadcrumbs/components/breadcrumb-item.cjs +9 -6
  55. package/dist/components/molecules/Breadcrumbs/components/breadcrumb-item.cjs.map +1 -1
  56. package/dist/components/molecules/Breadcrumbs/components/breadcrumb-item.d.ts +1 -1
  57. package/dist/components/molecules/Breadcrumbs/components/breadcrumb-item.d.ts.map +1 -1
  58. package/dist/components/molecules/Breadcrumbs/components/breadcrumb-item.js +7 -4
  59. package/dist/components/molecules/Breadcrumbs/components/breadcrumb-item.js.map +1 -1
  60. package/dist/components/molecules/Breadcrumbs/index.cjs +3 -6
  61. package/dist/components/molecules/Breadcrumbs/index.cjs.map +1 -1
  62. package/dist/components/molecules/Breadcrumbs/index.d.ts +2 -6
  63. package/dist/components/molecules/Breadcrumbs/index.d.ts.map +1 -1
  64. package/dist/components/molecules/Breadcrumbs/index.js +2 -5
  65. package/dist/components/molecules/Breadcrumbs/index.js.map +1 -1
  66. package/dist/components/molecules/Breadcrumbs/providers/breadcrumbs-context.cjs +17 -0
  67. package/dist/components/molecules/Breadcrumbs/providers/breadcrumbs-context.cjs.map +1 -0
  68. package/dist/components/molecules/Breadcrumbs/providers/breadcrumbs-context.d.ts +13 -0
  69. package/dist/components/molecules/Breadcrumbs/providers/breadcrumbs-context.d.ts.map +1 -0
  70. package/dist/components/molecules/Breadcrumbs/providers/breadcrumbs-context.js +15 -0
  71. package/dist/components/molecules/Breadcrumbs/providers/breadcrumbs-context.js.map +1 -0
  72. package/dist/components/molecules/ButtonGroup/index.cjs +2 -2
  73. package/dist/components/molecules/ButtonGroup/index.cjs.map +1 -1
  74. package/dist/components/molecules/ButtonGroup/index.d.ts.map +1 -1
  75. package/dist/components/molecules/ButtonGroup/index.js +1 -1
  76. package/dist/components/molecules/Carousel/index.cjs +0 -1
  77. package/dist/components/molecules/Carousel/index.cjs.map +1 -1
  78. package/dist/components/molecules/Carousel/index.d.ts +0 -1
  79. package/dist/components/molecules/Carousel/index.d.ts.map +1 -1
  80. package/dist/components/molecules/Carousel/index.js +1 -1
  81. package/dist/components/molecules/Carousel/index.js.map +1 -1
  82. package/dist/components/molecules/Select/components/combobox.cjs +2 -2
  83. package/dist/components/molecules/Select/components/combobox.cjs.map +1 -1
  84. package/dist/components/molecules/Select/components/combobox.d.ts.map +1 -1
  85. package/dist/components/molecules/Select/components/combobox.js +1 -1
  86. package/dist/components/molecules/Select/components/select-item.cjs +2 -2
  87. package/dist/components/molecules/Select/components/select-item.cjs.map +1 -1
  88. package/dist/components/molecules/Select/components/select-item.d.ts.map +1 -1
  89. package/dist/components/molecules/Select/components/select-item.js +1 -1
  90. package/dist/components/molecules/Select/index.cjs +2 -2
  91. package/dist/components/molecules/Select/index.cjs.map +1 -1
  92. package/dist/components/molecules/Select/index.d.ts.map +1 -1
  93. package/dist/components/molecules/Select/index.js +1 -1
  94. package/dist/components/molecules/Tabs/index.cjs +2 -2
  95. package/dist/components/molecules/Tabs/index.cjs.map +1 -1
  96. package/dist/components/molecules/Tabs/index.d.ts.map +1 -1
  97. package/dist/components/molecules/Tabs/index.js +1 -1
  98. package/dist/components/organisms/ActivityFeed/index.cjs +5 -1
  99. package/dist/components/organisms/ActivityFeed/index.cjs.map +1 -1
  100. package/dist/components/organisms/ActivityFeed/index.d.ts.map +1 -1
  101. package/dist/components/organisms/ActivityFeed/index.js +5 -1
  102. package/dist/components/organisms/ActivityFeed/index.js.map +1 -1
  103. package/dist/components/organisms/Charts/index.d.ts +22 -6
  104. package/dist/components/organisms/Charts/index.d.ts.map +1 -1
  105. package/dist/components/organisms/FileUpload/index.cjs +1 -4
  106. package/dist/components/organisms/FileUpload/index.cjs.map +1 -1
  107. package/dist/components/organisms/FileUpload/index.d.ts +1 -9
  108. package/dist/components/organisms/FileUpload/index.d.ts.map +1 -1
  109. package/dist/components/organisms/FileUpload/index.js +3 -3
  110. package/dist/components/organisms/FileUpload/index.js.map +1 -1
  111. package/dist/components/organisms/GradientPicker/index.cjs +0 -6
  112. package/dist/components/organisms/GradientPicker/index.cjs.map +1 -1
  113. package/dist/components/organisms/GradientPicker/index.d.ts +0 -28
  114. package/dist/components/organisms/GradientPicker/index.d.ts.map +1 -1
  115. package/dist/components/organisms/GradientPicker/index.js +1 -1
  116. package/dist/components/organisms/GradientPicker/index.js.map +1 -1
  117. package/dist/components/organisms/HeaderNavigation/components/nav-account-card.cjs +2 -1
  118. package/dist/components/organisms/HeaderNavigation/components/nav-account-card.cjs.map +1 -1
  119. package/dist/components/organisms/HeaderNavigation/components/nav-account-card.d.ts.map +1 -1
  120. package/dist/components/organisms/HeaderNavigation/components/nav-account-card.js +2 -1
  121. package/dist/components/organisms/HeaderNavigation/components/nav-account-card.js.map +1 -1
  122. package/dist/components/organisms/HeaderNavigation/components/nav-item.cjs +4 -3
  123. package/dist/components/organisms/HeaderNavigation/components/nav-item.cjs.map +1 -1
  124. package/dist/components/organisms/HeaderNavigation/components/nav-item.d.ts.map +1 -1
  125. package/dist/components/organisms/HeaderNavigation/components/nav-item.js +4 -3
  126. package/dist/components/organisms/HeaderNavigation/components/nav-item.js.map +1 -1
  127. package/dist/components/organisms/ImagePicker/index.cjs +0 -3
  128. package/dist/components/organisms/ImagePicker/index.cjs.map +1 -1
  129. package/dist/components/organisms/ImagePicker/index.d.ts +0 -6
  130. package/dist/components/organisms/ImagePicker/index.d.ts.map +1 -1
  131. package/dist/components/organisms/ImagePicker/index.js +1 -1
  132. package/dist/components/organisms/ImagePicker/index.js.map +1 -1
  133. package/dist/components/organisms/SidebarNavigation/components/nav-button.cjs +5 -2
  134. package/dist/components/organisms/SidebarNavigation/components/nav-button.cjs.map +1 -1
  135. package/dist/components/organisms/SidebarNavigation/components/nav-button.d.ts.map +1 -1
  136. package/dist/components/organisms/SidebarNavigation/components/nav-button.js +5 -2
  137. package/dist/components/organisms/SidebarNavigation/components/nav-button.js.map +1 -1
  138. package/dist/components/organisms/SidebarNavigation/components/nav-item.cjs +5 -4
  139. package/dist/components/organisms/SidebarNavigation/components/nav-item.cjs.map +1 -1
  140. package/dist/components/organisms/SidebarNavigation/components/nav-item.d.ts.map +1 -1
  141. package/dist/components/organisms/SidebarNavigation/components/nav-item.js +5 -4
  142. package/dist/components/organisms/SidebarNavigation/components/nav-item.js.map +1 -1
  143. package/dist/components/organisms/TextEditor/components/text-editor-extensions.cjs +13 -13
  144. package/dist/components/organisms/TextEditor/components/text-editor-extensions.cjs.map +1 -1
  145. package/dist/components/organisms/TextEditor/components/text-editor-extensions.js +1 -1
  146. package/dist/components/organisms/TextEditor/components/text-editor-tooltip.cjs +2 -2
  147. package/dist/components/organisms/TextEditor/components/text-editor-tooltip.cjs.map +1 -1
  148. package/dist/components/organisms/TextEditor/components/text-editor-tooltip.js +1 -1
  149. package/dist/components/organisms/TextEditor/index.cjs +6 -13
  150. package/dist/components/organisms/TextEditor/index.cjs.map +1 -1
  151. package/dist/components/organisms/TextEditor/index.d.ts +2 -10
  152. package/dist/components/organisms/TextEditor/index.d.ts.map +1 -1
  153. package/dist/components/organisms/TextEditor/index.js +2 -9
  154. package/dist/components/organisms/TextEditor/index.js.map +1 -1
  155. package/dist/components/organisms/TextEditor/providers/text-editor-context.cjs +21 -0
  156. package/dist/components/organisms/TextEditor/providers/text-editor-context.cjs.map +1 -0
  157. package/dist/components/organisms/TextEditor/providers/text-editor-context.d.ts +17 -0
  158. package/dist/components/organisms/TextEditor/providers/text-editor-context.d.ts.map +1 -0
  159. package/dist/components/organisms/TextEditor/providers/text-editor-context.js +18 -0
  160. package/dist/components/organisms/TextEditor/providers/text-editor-context.js.map +1 -0
  161. package/dist/components/organisms/TreeView/index.cjs +2 -2
  162. package/dist/components/organisms/TreeView/index.cjs.map +1 -1
  163. package/dist/components/organisms/TreeView/index.d.ts.map +1 -1
  164. package/dist/components/organisms/TreeView/index.js +1 -1
  165. package/dist/hooks/{useAriaDisclosureAttrs/index.cjs → __internal__/useAriaDisclosureAttrs/useAriaDisclosureAttrs.cjs} +1 -1
  166. package/dist/hooks/__internal__/useAriaDisclosureAttrs/useAriaDisclosureAttrs.cjs.map +1 -0
  167. package/dist/hooks/{useAriaDisclosureAttrs/index.d.ts → __internal__/useAriaDisclosureAttrs/useAriaDisclosureAttrs.d.ts} +1 -1
  168. package/dist/hooks/__internal__/useAriaDisclosureAttrs/useAriaDisclosureAttrs.d.ts.map +1 -0
  169. package/dist/hooks/{useAriaDisclosureAttrs/index.js → __internal__/useAriaDisclosureAttrs/useAriaDisclosureAttrs.js} +1 -1
  170. package/dist/hooks/__internal__/useAriaDisclosureAttrs/useAriaDisclosureAttrs.js.map +1 -0
  171. package/dist/native/components/atoms/Button/index.d.ts.map +1 -1
  172. package/dist/native/components/atoms/Button/index.js +1 -1
  173. package/dist/{utilities/isReactComponent/index.d.ts → native/utilities/__internal__/componentGuardUtils/componentGuard.utils.d.ts} +3 -3
  174. package/dist/native/utilities/__internal__/componentGuardUtils/componentGuard.utils.d.ts.map +1 -0
  175. package/dist/{utilities/isReactComponent/index.js → native/utilities/__internal__/componentGuardUtils/componentGuard.utils.js} +3 -3
  176. package/dist/native/utilities/__internal__/componentGuardUtils/componentGuard.utils.js.map +1 -0
  177. package/dist/native/utilities/cx/index.d.ts +2 -2
  178. package/dist/native/utilities/cx/index.js +2 -2
  179. package/dist/native/{hooks/useAriaDisclosureAttrs → utilities/hrefUtils}/index.d.ts +3 -3
  180. package/dist/utilities/{isReactComponent/index.cjs → __internal__/componentGuardUtils/componentGuard.utils.cjs} +3 -3
  181. package/dist/utilities/__internal__/componentGuardUtils/componentGuard.utils.cjs.map +1 -0
  182. package/dist/{native/utilities/isReactComponent/index.d.ts → utilities/__internal__/componentGuardUtils/componentGuard.utils.d.ts} +3 -3
  183. package/dist/utilities/__internal__/componentGuardUtils/componentGuard.utils.d.ts.map +1 -0
  184. package/dist/{native/utilities/isReactComponent/index.js → utilities/__internal__/componentGuardUtils/componentGuard.utils.js} +3 -3
  185. package/dist/utilities/__internal__/componentGuardUtils/componentGuard.utils.js.map +1 -0
  186. package/dist/utilities/__internal__/logUtils/log.utils.cjs +32 -0
  187. package/dist/utilities/__internal__/logUtils/log.utils.cjs.map +1 -0
  188. package/dist/utilities/__internal__/logUtils/log.utils.d.ts +23 -0
  189. package/dist/utilities/__internal__/logUtils/log.utils.d.ts.map +1 -0
  190. package/dist/utilities/__internal__/logUtils/log.utils.js +30 -0
  191. package/dist/utilities/__internal__/logUtils/log.utils.js.map +1 -0
  192. package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.cjs +102 -0
  193. package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.cjs.map +1 -0
  194. package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.d.ts +41 -0
  195. package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.d.ts.map +1 -0
  196. package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.js +98 -0
  197. package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.js.map +1 -0
  198. package/dist/utilities/cx/index.cjs +2 -2
  199. package/dist/utilities/cx/index.d.ts +2 -2
  200. package/dist/utilities/cx/index.js +2 -2
  201. package/dist/utilities/hrefUtils/index.cjs +50 -0
  202. package/dist/utilities/hrefUtils/index.cjs.map +1 -0
  203. package/dist/utilities/hrefUtils/index.d.ts +19 -0
  204. package/dist/utilities/hrefUtils/index.d.ts.map +1 -0
  205. package/dist/utilities/hrefUtils/index.js +47 -0
  206. package/dist/utilities/hrefUtils/index.js.map +1 -0
  207. package/dist/utilities/localStorageUtils/index.cjs +9 -102
  208. package/dist/utilities/localStorageUtils/index.cjs.map +1 -1
  209. package/dist/utilities/localStorageUtils/index.d.ts +5 -5
  210. package/dist/utilities/localStorageUtils/index.d.ts.map +1 -1
  211. package/dist/utilities/localStorageUtils/index.js +7 -100
  212. package/dist/utilities/localStorageUtils/index.js.map +1 -1
  213. package/dist/utilities/renderUtils/index.cjs +7 -12
  214. package/dist/utilities/renderUtils/index.cjs.map +1 -1
  215. package/dist/utilities/renderUtils/index.d.ts.map +1 -1
  216. package/dist/utilities/renderUtils/index.js +7 -12
  217. package/dist/utilities/renderUtils/index.js.map +1 -1
  218. package/dist/utilities/sessionStorageUtils/index.cjs +9 -103
  219. package/dist/utilities/sessionStorageUtils/index.cjs.map +1 -1
  220. package/dist/utilities/sessionStorageUtils/index.d.ts +5 -6
  221. package/dist/utilities/sessionStorageUtils/index.d.ts.map +1 -1
  222. package/dist/utilities/sessionStorageUtils/index.js +7 -101
  223. package/dist/utilities/sessionStorageUtils/index.js.map +1 -1
  224. package/package.json +7 -7
  225. package/dist/hooks/useAriaDisclosureAttrs/index.cjs.map +0 -1
  226. package/dist/hooks/useAriaDisclosureAttrs/index.d.ts.map +0 -1
  227. package/dist/hooks/useAriaDisclosureAttrs/index.js.map +0 -1
  228. package/dist/native/utilities/isReactComponent/index.d.ts.map +0 -1
  229. package/dist/native/utilities/isReactComponent/index.js.map +0 -1
  230. package/dist/utilities/isReactComponent/index.cjs.map +0 -1
  231. package/dist/utilities/isReactComponent/index.d.ts.map +0 -1
  232. package/dist/utilities/isReactComponent/index.js.map +0 -1
@@ -0,0 +1,50 @@
1
+ 'use strict';
2
+
3
+ var log_utils = require('../__internal__/logUtils/log.utils.cjs');
4
+
5
+ const ALLOWED_PROTOCOLS = ['http:', 'https:', 'mailto:', 'tel:'];
6
+ // The only scheme names that may appear in warnings — never consumer input.
7
+ const KNOWN_BLOCKED_SCHEMES = ['javascript:', 'data:', 'vbscript:', 'file:', 'blob:', 'ftp:'];
8
+ // Browsers strip tab/newline (and tolerate other C0 controls) when parsing URLs, so
9
+ // `java\nscript:alert(1)` executes as javascript: — remove them before scheme-checking.
10
+ // biome-ignore lint/suspicious/noControlCharactersInRegex: removing control characters is the point
11
+ const CONTROL_CHARACTERS = /[\u0000-\u001F\u007F]/g;
12
+ /**
13
+ * Validates a consumer-supplied `href` for safe use on an anchor.
14
+ *
15
+ * Strips ASCII control characters, then rejects any explicit scheme outside
16
+ * http/https/mailto/tel — blocking `javascript:`, `data:` and friends. Scheme-less
17
+ * values (relative paths, fragments, bare domains) are allowed.
18
+ *
19
+ * @returns the cleaned href, or `undefined` when the href is not allowed (rendering
20
+ * an anchor with no `href` rather than an executable one).
21
+ */
22
+ const safeHref = (href) => {
23
+ if (href === undefined) {
24
+ return undefined;
25
+ }
26
+ const cleaned = href.replace(CONTROL_CHARACTERS, '');
27
+ const scheme = /^[a-z][a-z0-9+.-]*:/i.exec(cleaned.trim())?.[0].toLowerCase();
28
+ if (scheme && !ALLOWED_PROTOCOLS.includes(scheme)) {
29
+ // Kept in production builds on purpose: the dangerous input is data-dependent
30
+ // (CMS content, user profiles) and usually only exists in production. The warning
31
+ // text and dedupe key only ever use values from the fixed list below — a raw
32
+ // scheme is consumer input that can embed identifiers (`customer-123:`) and would
33
+ // grow the dedupe set without bound.
34
+ const known = KNOWN_BLOCKED_SCHEMES.includes(scheme);
35
+ log_utils.warnOnce(`safeHref:${known ? scheme : 'other-scheme'}`, `safeHref blocked an href with ${known ? `disallowed scheme "${scheme}"` : 'a non-allowlisted scheme'}. Allowed: http, https, mailto, tel, and relative URLs. The element renders without an href.`);
36
+ return undefined;
37
+ }
38
+ return cleaned;
39
+ };
40
+ /**
41
+ * Whether an href points at an external site (http/https), for `target="_blank"`
42
+ * decisions. Unlike a bare `startsWith('http')`, this requires a real scheme match on
43
+ * the control-character-stripped value, so `javascript:` never classifies as internal
44
+ * by falling through, and `httpfoo` never classifies as external.
45
+ */
46
+ const isExternalHref = (href) => /^https?:/i.test((href ?? '').replace(CONTROL_CHARACTERS, '').trim());
47
+
48
+ exports.isExternalHref = isExternalHref;
49
+ exports.safeHref = safeHref;
50
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/utilities/hrefUtils/index.ts"],"sourcesContent":[null],"names":["warnOnce"],"mappings":";;;;AAEA,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC;AAEhE;AACA,MAAM,qBAAqB,GAAG,CAAC,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC;AAE7F;AACA;AACA;AACA,MAAM,kBAAkB,GAAG,wBAAwB;AAEnD;;;;;;;;;AASG;AACI,MAAM,QAAQ,GAAG,CAAC,IAAwB,KAAwB;AACvE,IAAA,IAAI,IAAI,KAAK,SAAS,EAAE;AACtB,QAAA,OAAO,SAAS;IAClB;IACA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;AACpD,IAAA,MAAM,MAAM,GAAG,sBAAsB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE;IAC7E,IAAI,MAAM,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;;;;;;QAMjD,MAAM,KAAK,GAAG,qBAAqB,CAAC,QAAQ,CAAC,MAAM,CAAC;QACpDA,kBAAQ,CACN,CAAA,SAAA,EAAY,KAAK,GAAG,MAAM,GAAG,cAAc,CAAA,CAAE,EAC7C,CAAA,8BAAA,EAAiC,KAAK,GAAG,CAAA,mBAAA,EAAsB,MAAM,CAAA,CAAA,CAAG,GAAG,0BAA0B,CAAA,4FAAA,CAA8F,CACpM;AACD,QAAA,OAAO,SAAS;IAClB;AACA,IAAA,OAAO,OAAO;AAChB;AAEA;;;;;AAKG;AACI,MAAM,cAAc,GAAG,CAAC,IAAwB,KAAc,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,EAAE,EAAE,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE;;;;;"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Validates a consumer-supplied `href` for safe use on an anchor.
3
+ *
4
+ * Strips ASCII control characters, then rejects any explicit scheme outside
5
+ * http/https/mailto/tel — blocking `javascript:`, `data:` and friends. Scheme-less
6
+ * values (relative paths, fragments, bare domains) are allowed.
7
+ *
8
+ * @returns the cleaned href, or `undefined` when the href is not allowed (rendering
9
+ * an anchor with no `href` rather than an executable one).
10
+ */
11
+ export declare const safeHref: (href: string | undefined) => string | undefined;
12
+ /**
13
+ * Whether an href points at an external site (http/https), for `target="_blank"`
14
+ * decisions. Unlike a bare `startsWith('http')`, this requires a real scheme match on
15
+ * the control-character-stripped value, so `javascript:` never classifies as internal
16
+ * by falling through, and `httpfoo` never classifies as external.
17
+ */
18
+ export declare const isExternalHref: (href: string | undefined) => boolean;
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utilities/hrefUtils/index.ts"],"names":[],"mappings":"AAYA;;;;;;;;;GASG;AACH,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,GAAG,SAAS,KAAG,MAAM,GAAG,SAoB5D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,GAAG,SAAS,KAAG,OAAgF,CAAC"}
@@ -0,0 +1,47 @@
1
+ import { warnOnce } from '../__internal__/logUtils/log.utils.js';
2
+
3
+ const ALLOWED_PROTOCOLS = ['http:', 'https:', 'mailto:', 'tel:'];
4
+ // The only scheme names that may appear in warnings — never consumer input.
5
+ const KNOWN_BLOCKED_SCHEMES = ['javascript:', 'data:', 'vbscript:', 'file:', 'blob:', 'ftp:'];
6
+ // Browsers strip tab/newline (and tolerate other C0 controls) when parsing URLs, so
7
+ // `java\nscript:alert(1)` executes as javascript: — remove them before scheme-checking.
8
+ // biome-ignore lint/suspicious/noControlCharactersInRegex: removing control characters is the point
9
+ const CONTROL_CHARACTERS = /[\u0000-\u001F\u007F]/g;
10
+ /**
11
+ * Validates a consumer-supplied `href` for safe use on an anchor.
12
+ *
13
+ * Strips ASCII control characters, then rejects any explicit scheme outside
14
+ * http/https/mailto/tel — blocking `javascript:`, `data:` and friends. Scheme-less
15
+ * values (relative paths, fragments, bare domains) are allowed.
16
+ *
17
+ * @returns the cleaned href, or `undefined` when the href is not allowed (rendering
18
+ * an anchor with no `href` rather than an executable one).
19
+ */
20
+ const safeHref = (href) => {
21
+ if (href === undefined) {
22
+ return undefined;
23
+ }
24
+ const cleaned = href.replace(CONTROL_CHARACTERS, '');
25
+ const scheme = /^[a-z][a-z0-9+.-]*:/i.exec(cleaned.trim())?.[0].toLowerCase();
26
+ if (scheme && !ALLOWED_PROTOCOLS.includes(scheme)) {
27
+ // Kept in production builds on purpose: the dangerous input is data-dependent
28
+ // (CMS content, user profiles) and usually only exists in production. The warning
29
+ // text and dedupe key only ever use values from the fixed list below — a raw
30
+ // scheme is consumer input that can embed identifiers (`customer-123:`) and would
31
+ // grow the dedupe set without bound.
32
+ const known = KNOWN_BLOCKED_SCHEMES.includes(scheme);
33
+ warnOnce(`safeHref:${known ? scheme : 'other-scheme'}`, `safeHref blocked an href with ${known ? `disallowed scheme "${scheme}"` : 'a non-allowlisted scheme'}. Allowed: http, https, mailto, tel, and relative URLs. The element renders without an href.`);
34
+ return undefined;
35
+ }
36
+ return cleaned;
37
+ };
38
+ /**
39
+ * Whether an href points at an external site (http/https), for `target="_blank"`
40
+ * decisions. Unlike a bare `startsWith('http')`, this requires a real scheme match on
41
+ * the control-character-stripped value, so `javascript:` never classifies as internal
42
+ * by falling through, and `httpfoo` never classifies as external.
43
+ */
44
+ const isExternalHref = (href) => /^https?:/i.test((href ?? '').replace(CONTROL_CHARACTERS, '').trim());
45
+
46
+ export { isExternalHref, safeHref };
47
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/utilities/hrefUtils/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC;AAEhE;AACA,MAAM,qBAAqB,GAAG,CAAC,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC;AAE7F;AACA;AACA;AACA,MAAM,kBAAkB,GAAG,wBAAwB;AAEnD;;;;;;;;;AASG;AACI,MAAM,QAAQ,GAAG,CAAC,IAAwB,KAAwB;AACvE,IAAA,IAAI,IAAI,KAAK,SAAS,EAAE;AACtB,QAAA,OAAO,SAAS;IAClB;IACA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;AACpD,IAAA,MAAM,MAAM,GAAG,sBAAsB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE;IAC7E,IAAI,MAAM,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;;;;;;QAMjD,MAAM,KAAK,GAAG,qBAAqB,CAAC,QAAQ,CAAC,MAAM,CAAC;QACpD,QAAQ,CACN,CAAA,SAAA,EAAY,KAAK,GAAG,MAAM,GAAG,cAAc,CAAA,CAAE,EAC7C,CAAA,8BAAA,EAAiC,KAAK,GAAG,CAAA,mBAAA,EAAsB,MAAM,CAAA,CAAA,CAAG,GAAG,0BAA0B,CAAA,4FAAA,CAA8F,CACpM;AACD,QAAA,OAAO,SAAS;IAClB;AACA,IAAA,OAAO,OAAO;AAChB;AAEA;;;;;AAKG;AACI,MAAM,cAAc,GAAG,CAAC,IAAwB,KAAc,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,EAAE,EAAE,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE;;;;"}
@@ -1,75 +1,18 @@
1
1
  'use strict';
2
2
 
3
+ var webStorage_utils = require('../__internal__/webStorageUtils/webStorage.utils.cjs');
3
4
  var localStorageUtils_constants = require('./localStorageUtils.constants.cjs');
4
5
 
5
6
  /**
6
- * Web-only, typed `localStorage` persistence. DOM access (`window.localStorage`)
7
- * lives here rather than in components, so component code stays free of `window.*`
8
- * and keeps React Native parity see `useBreakpoint` for the same isolation
9
- * pattern. Every helper no-ops / returns `null` when `localStorage` is
10
- * unavailable (SSR, React Native, private mode, quota errors).
7
+ * Web-only, typed `localStorage` persistence. Thin wrapper over the shared
8
+ * `#internal/utilities/webStorageUtils` factory (which `sessionStorageUtils`
9
+ * also uses the two modules were byte-identical twins before the factory).
10
+ * Every helper no-ops / returns `null` when `localStorage` is unavailable
11
+ * (SSR, React Native, private mode, quota errors).
11
12
  *
12
13
  * Every key this package persists is registered in `localStorageUtils.constants.ts`
13
14
  * — check there for the full list before adding a new one.
14
15
  */
15
- const isBrowser = typeof window !== 'undefined';
16
- /**
17
- * Internal `localStorage` primitives backing `createLocalStorageItem`. Not
18
- * exported — everything a consumer needs goes through `createLocalStorageItem`,
19
- * which adds typed serialization/validation on top. Add a raw string export
20
- * here only once a real caller needs plain-string storage without JSON typing.
21
- */
22
- /** Read a raw string value, or `null` when unset/unavailable. */
23
- const safeLocalGet = (key) => {
24
- if (!isBrowser)
25
- return null;
26
- try {
27
- return window.localStorage.getItem(key);
28
- }
29
- catch {
30
- return null;
31
- }
32
- };
33
- /** Persist a raw string value; returns whether the write succeeded. */
34
- const safeLocalSet = (key, value) => {
35
- if (!isBrowser)
36
- return false;
37
- try {
38
- window.localStorage.setItem(key, value);
39
- return true;
40
- }
41
- catch {
42
- return false;
43
- }
44
- };
45
- /** Remove a value; returns whether the removal succeeded. */
46
- const safeLocalRemove = (key) => {
47
- if (!isBrowser)
48
- return false;
49
- try {
50
- window.localStorage.removeItem(key);
51
- return true;
52
- }
53
- catch {
54
- return false;
55
- }
56
- };
57
- /**
58
- * Reusable `validate` guard for a `createLocalStorageItem<boolean>` item.
59
- */
60
- const isBoolean = (value) => typeof value === 'boolean';
61
- /**
62
- * Parse a plain `'true'`/`'false'` string (not JSON) into a boolean; throws
63
- * `errorMessage` for anything else so `createLocalStorageItem.get()` treats it
64
- * as invalid data and returns `null`.
65
- */
66
- const parseBooleanString = (raw, errorMessage) => {
67
- if (raw === 'true')
68
- return true;
69
- if (raw === 'false')
70
- return false;
71
- throw new Error(errorMessage);
72
- };
73
16
  /**
74
17
  * Build a typed, failure-safe accessor for a single `localStorage` key.
75
18
  *
@@ -78,51 +21,15 @@ const parseBooleanString = (raw, errorMessage) => {
78
21
  * draft.set({ title: 'Hi' });
79
22
  * const value = draft.get(); // Draft | null
80
23
  */
81
- const createLocalStorageItem = (key, options = {}) => {
82
- const { serialize = JSON.stringify, deserialize = JSON.parse, validate } = options;
83
- return {
84
- get() {
85
- const raw = safeLocalGet(key);
86
- if (raw == null)
87
- return null;
88
- try {
89
- const value = deserialize(raw);
90
- if (validate && !validate(value))
91
- return null;
92
- return value;
93
- }
94
- catch {
95
- return null;
96
- }
97
- },
98
- set(value) {
99
- try {
100
- const serialized = serialize(value);
101
- // JSON.stringify (and a custom serializer) can return `undefined` for a
102
- // top-level `undefined`, function, or symbol — treat that as a failed
103
- // serialization rather than writing the literal string "undefined".
104
- if (typeof serialized !== 'string')
105
- return;
106
- safeLocalSet(key, serialized);
107
- }
108
- catch {
109
- // serialize() can throw (e.g. circular refs); matches the documented
110
- // failure-safe contract — silently ignore, same as a write failure.
111
- }
112
- },
113
- clear() {
114
- safeLocalRemove(key);
115
- },
116
- };
117
- };
24
+ const createLocalStorageItem = (key, options = {}) => webStorage_utils.createWebStorageItem(() => window.localStorage, key, options);
118
25
  /**
119
26
  * Persistence for the `SidebarNavigation` collapsed preference. Stored as the
120
27
  * plain strings `'true'` / `'false'` to preserve the original on-disk format.
121
28
  */
122
29
  const sidebarCollapsedStorage = createLocalStorageItem(localStorageUtils_constants.LOCAL_STORAGE_KEYS.sidebarCollapsed, {
123
30
  serialize: String,
124
- deserialize: (raw) => parseBooleanString(raw, 'Invalid sidebar collapsed value'),
125
- validate: isBoolean,
31
+ deserialize: (raw) => webStorage_utils.parseBooleanString(raw, 'Invalid sidebar collapsed value'),
32
+ validate: webStorage_utils.isBoolean,
126
33
  });
127
34
 
128
35
  exports.LOCAL_STORAGE_KEYS = localStorageUtils_constants.LOCAL_STORAGE_KEYS;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/utilities/localStorageUtils/index.ts"],"sourcesContent":[null],"names":["LOCAL_STORAGE_KEYS"],"mappings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AM,sBAAsB,GAAG,CAAI,GAAW,EAAE,OAAA,GAAsC,EAAE,KAAyB;AACtH,IAAA,MAAM,EAAE,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC,KAA2B,EAAE,QAAQ,EAAE,GAAG,OAAO;IAExG,OAAO;QACL,GAAG,GAAA;AACD,YAAA,MAAM,GAAG,GAAG,YAAY,CAAC,GAAG,CAAC;YAC7B,IAAI,GAAG,IAAI,IAAI;AAAE,gBAAA,OAAO,IAAI;AAC5B,YAAA,IAAI;AACF,gBAAA,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC;AAC9B,gBAAA,IAAI,QAAQ,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;AAAE,oBAAA,OAAO,IAAI;AAC7C,gBAAA,OAAO,KAAK;YACd;AAAE,YAAA,MAAM;AACN,gBAAA,OAAO,IAAI;YACb;QACF,CAAC;AACD,QAAA,GAAG,CAAC,KAAK,EAAA;AACP,YAAA,IAAI;AACF,gBAAA,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC;;;;gBAInC,IAAI,OAAO,UAAU,KAAK,QAAQ;oBAAE;AACpC,gBAAA,YAAY,CAAC,GAAG,EAAE,UAAU,CAAC;YAC/B;AAAE,YAAA,MAAM;;;YAGR;QACF,CAAC;QACD,KAAK,GAAA;YACH,eAAe,CAAC,GAAG,CAAC;QACtB,CAAC;KACF;AACH;AAEA;;;AAGG;MACU,uBAAuB,GAAG,sBAAsB,CAAUA,8CAAkB,CAAC,gBAAgB,EAAE;AAC1G,IAAA,SAAS,EAAE,MAAM;IACjB,WAAW,EAAE,CAAC,GAAG,KAAK,kBAAkB,CAAC,GAAG,EAAE,iCAAiC,CAAC;AAChF,IAAA,QAAQ,EAAE,SAAS;AACpB,CAAA;;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/utilities/localStorageUtils/index.ts"],"sourcesContent":[null],"names":["createWebStorageItem","LOCAL_STORAGE_KEYS","parseBooleanString","isBoolean"],"mappings":";;;;;AAAA;;;;;;;;;AASG;AA2BH;;;;;;;AAOG;AACI,MAAM,sBAAsB,GAAG,CAAI,GAAW,EAAE,OAAA,GAAsC,EAAE,KAC7FA,qCAAoB,CAAC,MAAM,MAAM,CAAC,YAAY,EAAE,GAAG,EAAE,OAAO;AAE9D;;;AAGG;MACU,uBAAuB,GAAG,sBAAsB,CAAUC,8CAAkB,CAAC,gBAAgB,EAAE;AAC1G,IAAA,SAAS,EAAE,MAAM;IACjB,WAAW,EAAE,CAAC,GAAG,KAAKC,mCAAkB,CAAC,GAAG,EAAE,iCAAiC,CAAC;AAChF,IAAA,QAAQ,EAAEC,0BAAS;AACpB,CAAA;;;;;;"}
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Web-only, typed `localStorage` persistence. DOM access (`window.localStorage`)
3
- * lives here rather than in components, so component code stays free of `window.*`
4
- * and keeps React Native parity see `useBreakpoint` for the same isolation
5
- * pattern. Every helper no-ops / returns `null` when `localStorage` is
6
- * unavailable (SSR, React Native, private mode, quota errors).
2
+ * Web-only, typed `localStorage` persistence. Thin wrapper over the shared
3
+ * `#internal/utilities/webStorageUtils` factory (which `sessionStorageUtils`
4
+ * also uses the two modules were byte-identical twins before the factory).
5
+ * Every helper no-ops / returns `null` when `localStorage` is unavailable
6
+ * (SSR, React Native, private mode, quota errors).
7
7
  *
8
8
  * Every key this package persists is registered in `localStorageUtils.constants.ts`
9
9
  * — check there for the full list before adding a new one.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utilities/localStorageUtils/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,EAAE,kBAAkB,EAAE,CAAC;AA2C9B,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,gFAAgF;IAChF,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IACh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CAAC;IACjC,oEAAoE;IACpE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,KAAK,IAAI,CAAC,CAAC;CAC3C;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,GAAI,CAAC,EAAE,KAAK,MAAM,EAAE,UAAS,uBAAuB,CAAC,CAAC,CAAM,KAAG,gBAAgB,CAAC,CAAC,CACrD,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,uBAAuB,2BAIlC,CAAC"}
@@ -1,73 +1,16 @@
1
+ import { createWebStorageItem, isBoolean, parseBooleanString } from '../__internal__/webStorageUtils/webStorage.utils.js';
1
2
  import { LOCAL_STORAGE_KEYS } from './localStorageUtils.constants.js';
2
3
 
3
4
  /**
4
- * Web-only, typed `localStorage` persistence. DOM access (`window.localStorage`)
5
- * lives here rather than in components, so component code stays free of `window.*`
6
- * and keeps React Native parity see `useBreakpoint` for the same isolation
7
- * pattern. Every helper no-ops / returns `null` when `localStorage` is
8
- * unavailable (SSR, React Native, private mode, quota errors).
5
+ * Web-only, typed `localStorage` persistence. Thin wrapper over the shared
6
+ * `#internal/utilities/webStorageUtils` factory (which `sessionStorageUtils`
7
+ * also uses the two modules were byte-identical twins before the factory).
8
+ * Every helper no-ops / returns `null` when `localStorage` is unavailable
9
+ * (SSR, React Native, private mode, quota errors).
9
10
  *
10
11
  * Every key this package persists is registered in `localStorageUtils.constants.ts`
11
12
  * — check there for the full list before adding a new one.
12
13
  */
13
- const isBrowser = typeof window !== 'undefined';
14
- /**
15
- * Internal `localStorage` primitives backing `createLocalStorageItem`. Not
16
- * exported — everything a consumer needs goes through `createLocalStorageItem`,
17
- * which adds typed serialization/validation on top. Add a raw string export
18
- * here only once a real caller needs plain-string storage without JSON typing.
19
- */
20
- /** Read a raw string value, or `null` when unset/unavailable. */
21
- const safeLocalGet = (key) => {
22
- if (!isBrowser)
23
- return null;
24
- try {
25
- return window.localStorage.getItem(key);
26
- }
27
- catch {
28
- return null;
29
- }
30
- };
31
- /** Persist a raw string value; returns whether the write succeeded. */
32
- const safeLocalSet = (key, value) => {
33
- if (!isBrowser)
34
- return false;
35
- try {
36
- window.localStorage.setItem(key, value);
37
- return true;
38
- }
39
- catch {
40
- return false;
41
- }
42
- };
43
- /** Remove a value; returns whether the removal succeeded. */
44
- const safeLocalRemove = (key) => {
45
- if (!isBrowser)
46
- return false;
47
- try {
48
- window.localStorage.removeItem(key);
49
- return true;
50
- }
51
- catch {
52
- return false;
53
- }
54
- };
55
- /**
56
- * Reusable `validate` guard for a `createLocalStorageItem<boolean>` item.
57
- */
58
- const isBoolean = (value) => typeof value === 'boolean';
59
- /**
60
- * Parse a plain `'true'`/`'false'` string (not JSON) into a boolean; throws
61
- * `errorMessage` for anything else so `createLocalStorageItem.get()` treats it
62
- * as invalid data and returns `null`.
63
- */
64
- const parseBooleanString = (raw, errorMessage) => {
65
- if (raw === 'true')
66
- return true;
67
- if (raw === 'false')
68
- return false;
69
- throw new Error(errorMessage);
70
- };
71
14
  /**
72
15
  * Build a typed, failure-safe accessor for a single `localStorage` key.
73
16
  *
@@ -76,43 +19,7 @@ const parseBooleanString = (raw, errorMessage) => {
76
19
  * draft.set({ title: 'Hi' });
77
20
  * const value = draft.get(); // Draft | null
78
21
  */
79
- const createLocalStorageItem = (key, options = {}) => {
80
- const { serialize = JSON.stringify, deserialize = JSON.parse, validate } = options;
81
- return {
82
- get() {
83
- const raw = safeLocalGet(key);
84
- if (raw == null)
85
- return null;
86
- try {
87
- const value = deserialize(raw);
88
- if (validate && !validate(value))
89
- return null;
90
- return value;
91
- }
92
- catch {
93
- return null;
94
- }
95
- },
96
- set(value) {
97
- try {
98
- const serialized = serialize(value);
99
- // JSON.stringify (and a custom serializer) can return `undefined` for a
100
- // top-level `undefined`, function, or symbol — treat that as a failed
101
- // serialization rather than writing the literal string "undefined".
102
- if (typeof serialized !== 'string')
103
- return;
104
- safeLocalSet(key, serialized);
105
- }
106
- catch {
107
- // serialize() can throw (e.g. circular refs); matches the documented
108
- // failure-safe contract — silently ignore, same as a write failure.
109
- }
110
- },
111
- clear() {
112
- safeLocalRemove(key);
113
- },
114
- };
115
- };
22
+ const createLocalStorageItem = (key, options = {}) => createWebStorageItem(() => window.localStorage, key, options);
116
23
  /**
117
24
  * Persistence for the `SidebarNavigation` collapsed preference. Stored as the
118
25
  * plain strings `'true'` / `'false'` to preserve the original on-disk format.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/utilities/localStorageUtils/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;;;;;;;AASG;AAMH,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,WAAW;AAE/C;;;;;AAKG;AAEH;AACA,MAAM,YAAY,GAAG,CAAC,GAAW,KAAmB;AAClD,IAAA,IAAI,CAAC,SAAS;AAAE,QAAA,OAAO,IAAI;AAC3B,IAAA,IAAI;QACF,OAAO,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC;IACzC;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,IAAI;IACb;AACF,CAAC;AAED;AACA,MAAM,YAAY,GAAG,CAAC,GAAW,EAAE,KAAa,KAAa;AAC3D,IAAA,IAAI,CAAC,SAAS;AAAE,QAAA,OAAO,KAAK;AAC5B,IAAA,IAAI;QACF,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC;AACvC,QAAA,OAAO,IAAI;IACb;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,KAAK;IACd;AACF,CAAC;AAED;AACA,MAAM,eAAe,GAAG,CAAC,GAAW,KAAa;AAC/C,IAAA,IAAI,CAAC,SAAS;AAAE,QAAA,OAAO,KAAK;AAC5B,IAAA,IAAI;AACF,QAAA,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC;AACnC,QAAA,OAAO,IAAI;IACb;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,KAAK;IACd;AACF,CAAC;AAoBD;;AAEG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A;;;AAGG;MACU,uBAAuB,GAAG,sBAAsB,CAAU,kBAAkB,CAAC,gBAAgB,EAAE;AAC1G,IAAA,SAAS,EAAE,MAAM;IACjB,WAAW,EAAE,CAAC,GAAG,KAAK,kBAAkB,CAAC,GAAG,EAAE,iCAAiC,CAAC;AAChF,IAAA,QAAQ,EAAE,SAAS;AACpB,CAAA;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/utilities/localStorageUtils/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;;;;;;;;;AASG;AA2BH;;;;;;;AAOG;AACI,MAAM,sBAAsB,GAAG,CAAI,GAAW,EAAE,OAAA,GAAsC,EAAE,KAC7F,oBAAoB,CAAC,MAAM,MAAM,CAAC,YAAY,EAAE,GAAG,EAAE,OAAO;AAE9D;;;AAGG;MACU,uBAAuB,GAAG,sBAAsB,CAAU,kBAAkB,CAAC,gBAAgB,EAAE;AAC1G,IAAA,SAAS,EAAE,MAAM;IACjB,WAAW,EAAE,CAAC,GAAG,KAAK,kBAAkB,CAAC,GAAG,EAAE,iCAAiC,CAAC;AAChF,IAAA,QAAQ,EAAE,SAAS;AACpB,CAAA;;;;"}
@@ -14,18 +14,13 @@ const getEnvironmentVariable = (key) => {
14
14
  if (typeof process !== 'undefined' && process.env && typeof process.env[key] === 'string') {
15
15
  return process.env[key];
16
16
  }
17
- // Fallback to Vite env when available; use eval to avoid parse errors in non‑Vite/CJS.
18
- // `eval('import.meta')` is intentional — `import.meta` is a parse-time syntax error in
19
- // CommonJS / non-ESM contexts (e.g. some Node test runners). Using eval defers parsing
20
- // until runtime so this util can live in shared library code consumed by both Vite and non-Vite environments.
21
- try {
22
- // biome-ignore lint/security/noGlobalEval: see comment above — required for cross-runtime import.meta access
23
- const viteEnv = eval('import.meta')?.env;
24
- return viteEnv?.[key] ?? '';
25
- }
26
- catch {
27
- return '';
28
- }
17
+ // Fallback to Vite env when available. Written as bare `import.meta.env` legal in
18
+ // the ESM build and in Vite/Vitest and rewritten to `undefined` in the CJS output
19
+ // by the `import-meta-env-cjs-safe` plugin in rollup.config.js, where `import.meta`
20
+ // would be a parse error. No eval: strict-CSP consumers (no `unsafe-eval`) previously
21
+ // lost this path silently.
22
+ const viteEnv = undefined;
23
+ return viteEnv?.[key] ?? '';
29
24
  };
30
25
  /**
31
26
  * Retrieves a micro-frontend attribute.
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/utilities/renderUtils/index.ts"],"sourcesContent":[null],"names":["lazy","importWithRetry"],"mappings":";;;;;AAIA;;;;;AAKG;AACI,MAAM,sBAAsB,GAAG,CAAC,GAAW,KAAY;;AAE5D,IAAA,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE;AACzF,QAAA,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,CAAW;IACnC;;;;;AAKA,IAAA,IAAI;;QAEF,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,EAAE,GAAqD;AAC1F,QAAA,OAAO,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE;IAC7B;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,EAAE;IACX;AACF;AAEA;;;;;AAKG;AACI,MAAM,yBAAyB,GAAG,CAAC,GAAW,KAAY;AAC/D,IAAA,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;AACnC,QAAA,OAAO,EAAE;IACX;IACA,MAAM,gBAAgB,GAAG,QAAQ,CAAC,cAAc,CAAC,yBAAyB,CAAC;IAC3E,OAAO,gBAAgB,EAAE,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE;AAClD;AAEA;;;;;;;;AAQG;AACI,MAAM,QAAQ,GAAG,MAAa;AACnC,IAAA,OAAO,sBAAsB,CAAC,qBAAqB,CAAC,IAAI,yBAAyB,CAAC,aAAa,CAAC,IAAI,yBAAyB,CAAC,YAAY,CAAC;AAC7I;A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;;GAKG;AACH,eAAO,MAAM,yBAAyB,GAAI,KAAK,MAAM,KAAG,MAMvD,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ,QAAO,MAE3B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ,QAAO,MAE3B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,QAAO,MAE7B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,QAAO,OAMrC,CAAC;AAGF,eAAO,MAAM,aAAa,GAAI,iBAAiB,MAAM,GAAG,4EAAiD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utilities/renderUtils/index.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GAAI,KAAK,MAAM,KAAG,MAYpD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,GAAI,KAAK,MAAM,KAAG,MAMvD,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ,QAAO,MAE3B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ,QAAO,MAE3B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,QAAO,MAE7B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,QAAO,OAMrC,CAAC;AAGF,eAAO,MAAM,aAAa,GAAI,iBAAiB,MAAM,GAAG,4EAAiD,CAAC"}
@@ -12,18 +12,13 @@ const getEnvironmentVariable = (key) => {
12
12
  if (typeof process !== 'undefined' && process.env && typeof process.env[key] === 'string') {
13
13
  return process.env[key];
14
14
  }
15
- // Fallback to Vite env when available; use eval to avoid parse errors in non‑Vite/CJS.
16
- // `eval('import.meta')` is intentional — `import.meta` is a parse-time syntax error in
17
- // CommonJS / non-ESM contexts (e.g. some Node test runners). Using eval defers parsing
18
- // until runtime so this util can live in shared library code consumed by both Vite and non-Vite environments.
19
- try {
20
- // biome-ignore lint/security/noGlobalEval: see comment above — required for cross-runtime import.meta access
21
- const viteEnv = eval('import.meta')?.env;
22
- return viteEnv?.[key] ?? '';
23
- }
24
- catch {
25
- return '';
26
- }
15
+ // Fallback to Vite env when available. Written as bare `import.meta.env` legal in
16
+ // the ESM build and in Vite/Vitest and rewritten to `undefined` in the CJS output
17
+ // by the `import-meta-env-cjs-safe` plugin in rollup.config.js, where `import.meta`
18
+ // would be a parse error. No eval: strict-CSP consumers (no `unsafe-eval`) previously
19
+ // lost this path silently.
20
+ const viteEnv = import.meta.env;
21
+ return viteEnv?.[key] ?? '';
27
22
  };
28
23
  /**
29
24
  * Retrieves a micro-frontend attribute.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/utilities/renderUtils/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAIA;;;;;AAKG;AACI,MAAM,sBAAsB,GAAG,CAAC,GAAW,KAAY;;AAE5D,IAAA,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE;AACzF,QAAA,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,CAAW;IACnC;;;;;AAKA,IAAA,IAAI;;QAEF,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,EAAE,GAAqD;AAC1F,QAAA,OAAO,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE;IAC7B;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,EAAE;IACX;AACF;AAEA;;;;;AAKG;AACI,MAAM,yBAAyB,GAAG,CAAC,GAAW,KAAY;AAC/D,IAAA,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;AACnC,QAAA,OAAO,EAAE;IACX;IACA,MAAM,gBAAgB,GAAG,QAAQ,CAAC,cAAc,CAAC,yBAAyB,CAAC;IAC3E,OAAO,gBAAgB,EAAE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