@flipdish/ui-library 0.17.0 → 0.19.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 (247) hide show
  1. package/dist/components/atoms/AppStoreButton/components/app-store-buttons-outline.cjs +5 -12
  2. package/dist/components/atoms/AppStoreButton/components/app-store-buttons-outline.cjs.map +1 -1
  3. package/dist/components/atoms/AppStoreButton/components/app-store-buttons-outline.d.ts.map +1 -1
  4. package/dist/components/atoms/AppStoreButton/components/app-store-buttons-outline.js +5 -12
  5. package/dist/components/atoms/AppStoreButton/components/app-store-buttons-outline.js.map +1 -1
  6. package/dist/components/atoms/AppStoreButton/index.cjs +6 -15
  7. package/dist/components/atoms/AppStoreButton/index.cjs.map +1 -1
  8. package/dist/components/atoms/AppStoreButton/index.d.ts.map +1 -1
  9. package/dist/components/atoms/AppStoreButton/index.js +6 -15
  10. package/dist/components/atoms/AppStoreButton/index.js.map +1 -1
  11. package/dist/components/atoms/Avatar/components/avatar-base.cjs +60 -0
  12. package/dist/components/atoms/Avatar/components/avatar-base.cjs.map +1 -0
  13. package/dist/components/atoms/Avatar/components/avatar-base.d.ts +77 -0
  14. package/dist/components/atoms/Avatar/components/avatar-base.d.ts.map +1 -0
  15. package/dist/components/atoms/Avatar/components/avatar-base.js +58 -0
  16. package/dist/components/atoms/Avatar/components/avatar-base.js.map +1 -0
  17. package/dist/components/atoms/Avatar/components/avatar-label-group.cjs +2 -2
  18. package/dist/components/atoms/Avatar/components/avatar-label-group.cjs.map +1 -1
  19. package/dist/components/atoms/Avatar/components/avatar-label-group.d.ts +1 -1
  20. package/dist/components/atoms/Avatar/components/avatar-label-group.d.ts.map +1 -1
  21. package/dist/components/atoms/Avatar/components/avatar-label-group.js +1 -1
  22. package/dist/components/atoms/Avatar/index.cjs +3 -55
  23. package/dist/components/atoms/Avatar/index.cjs.map +1 -1
  24. package/dist/components/atoms/Avatar/index.d.ts +2 -70
  25. package/dist/components/atoms/Avatar/index.d.ts.map +1 -1
  26. package/dist/components/atoms/Avatar/index.js +1 -57
  27. package/dist/components/atoms/Avatar/index.js.map +1 -1
  28. package/dist/components/atoms/BackgroundPattern/components/grid-check.cjs +2 -1
  29. package/dist/components/atoms/BackgroundPattern/components/grid-check.cjs.map +1 -1
  30. package/dist/components/atoms/BackgroundPattern/components/grid-check.d.ts.map +1 -1
  31. package/dist/components/atoms/BackgroundPattern/components/grid-check.js +2 -1
  32. package/dist/components/atoms/BackgroundPattern/components/grid-check.js.map +1 -1
  33. package/dist/components/atoms/BackgroundPattern/index.cjs +4 -1
  34. package/dist/components/atoms/BackgroundPattern/index.cjs.map +1 -1
  35. package/dist/components/atoms/BackgroundPattern/index.d.ts +8 -3
  36. package/dist/components/atoms/BackgroundPattern/index.d.ts.map +1 -1
  37. package/dist/components/atoms/BackgroundPattern/index.js +4 -1
  38. package/dist/components/atoms/BackgroundPattern/index.js.map +1 -1
  39. package/dist/components/atoms/Button/index.cjs +3 -3
  40. package/dist/components/atoms/Button/index.cjs.map +1 -1
  41. package/dist/components/atoms/Button/index.d.ts.map +1 -1
  42. package/dist/components/atoms/Button/index.js +1 -1
  43. package/dist/components/atoms/FeaturedIcon/index.cjs +2 -2
  44. package/dist/components/atoms/FeaturedIcon/index.cjs.map +1 -1
  45. package/dist/components/atoms/FeaturedIcon/index.d.ts.map +1 -1
  46. package/dist/components/atoms/FeaturedIcon/index.js +1 -1
  47. package/dist/components/atoms/UtilityButton/index.cjs +2 -2
  48. package/dist/components/atoms/UtilityButton/index.cjs.map +1 -1
  49. package/dist/components/atoms/UtilityButton/index.d.ts.map +1 -1
  50. package/dist/components/atoms/UtilityButton/index.js +1 -1
  51. package/dist/components/molecules/BadgeGroup/index.cjs +3 -3
  52. package/dist/components/molecules/BadgeGroup/index.cjs.map +1 -1
  53. package/dist/components/molecules/BadgeGroup/index.d.ts.map +1 -1
  54. package/dist/components/molecules/BadgeGroup/index.js +1 -1
  55. package/dist/components/molecules/Breadcrumbs/components/breadcrumb-account-item.cjs +2 -2
  56. package/dist/components/molecules/Breadcrumbs/components/breadcrumb-account-item.cjs.map +1 -1
  57. package/dist/components/molecules/Breadcrumbs/components/breadcrumb-account-item.js +1 -1
  58. package/dist/components/molecules/Breadcrumbs/components/breadcrumb-item.cjs +9 -6
  59. package/dist/components/molecules/Breadcrumbs/components/breadcrumb-item.cjs.map +1 -1
  60. package/dist/components/molecules/Breadcrumbs/components/breadcrumb-item.d.ts +1 -1
  61. package/dist/components/molecules/Breadcrumbs/components/breadcrumb-item.d.ts.map +1 -1
  62. package/dist/components/molecules/Breadcrumbs/components/breadcrumb-item.js +7 -4
  63. package/dist/components/molecules/Breadcrumbs/components/breadcrumb-item.js.map +1 -1
  64. package/dist/components/molecules/Breadcrumbs/index.cjs +3 -6
  65. package/dist/components/molecules/Breadcrumbs/index.cjs.map +1 -1
  66. package/dist/components/molecules/Breadcrumbs/index.d.ts +2 -6
  67. package/dist/components/molecules/Breadcrumbs/index.d.ts.map +1 -1
  68. package/dist/components/molecules/Breadcrumbs/index.js +2 -5
  69. package/dist/components/molecules/Breadcrumbs/index.js.map +1 -1
  70. package/dist/components/molecules/Breadcrumbs/providers/breadcrumbs-context.cjs +17 -0
  71. package/dist/components/molecules/Breadcrumbs/providers/breadcrumbs-context.cjs.map +1 -0
  72. package/dist/components/molecules/Breadcrumbs/providers/breadcrumbs-context.d.ts +13 -0
  73. package/dist/components/molecules/Breadcrumbs/providers/breadcrumbs-context.d.ts.map +1 -0
  74. package/dist/components/molecules/Breadcrumbs/providers/breadcrumbs-context.js +15 -0
  75. package/dist/components/molecules/Breadcrumbs/providers/breadcrumbs-context.js.map +1 -0
  76. package/dist/components/molecules/ButtonGroup/index.cjs +2 -2
  77. package/dist/components/molecules/ButtonGroup/index.cjs.map +1 -1
  78. package/dist/components/molecules/ButtonGroup/index.d.ts.map +1 -1
  79. package/dist/components/molecules/ButtonGroup/index.js +1 -1
  80. package/dist/components/molecules/EmptyState/index.cjs +4 -1
  81. package/dist/components/molecules/EmptyState/index.cjs.map +1 -1
  82. package/dist/components/molecules/EmptyState/index.d.ts.map +1 -1
  83. package/dist/components/molecules/EmptyState/index.js +4 -1
  84. package/dist/components/molecules/EmptyState/index.js.map +1 -1
  85. package/dist/components/molecules/Pagination/index.cjs +2 -2
  86. package/dist/components/molecules/Pagination/index.cjs.map +1 -1
  87. package/dist/components/molecules/Pagination/index.d.ts +1 -1
  88. package/dist/components/molecules/Pagination/index.d.ts.map +1 -1
  89. package/dist/components/molecules/Pagination/index.js +2 -2
  90. package/dist/components/molecules/Pagination/index.js.map +1 -1
  91. package/dist/components/molecules/Select/components/combobox.cjs +2 -2
  92. package/dist/components/molecules/Select/components/combobox.cjs.map +1 -1
  93. package/dist/components/molecules/Select/components/combobox.d.ts.map +1 -1
  94. package/dist/components/molecules/Select/components/combobox.js +1 -1
  95. package/dist/components/molecules/Select/components/select-item.cjs +2 -2
  96. package/dist/components/molecules/Select/components/select-item.cjs.map +1 -1
  97. package/dist/components/molecules/Select/components/select-item.d.ts.map +1 -1
  98. package/dist/components/molecules/Select/components/select-item.js +1 -1
  99. package/dist/components/molecules/Select/index.cjs +2 -2
  100. package/dist/components/molecules/Select/index.cjs.map +1 -1
  101. package/dist/components/molecules/Select/index.d.ts.map +1 -1
  102. package/dist/components/molecules/Select/index.js +1 -1
  103. package/dist/components/molecules/Tabs/index.cjs +2 -2
  104. package/dist/components/molecules/Tabs/index.cjs.map +1 -1
  105. package/dist/components/molecules/Tabs/index.d.ts.map +1 -1
  106. package/dist/components/molecules/Tabs/index.js +1 -1
  107. package/dist/components/organisms/ActivityFeed/index.cjs +5 -1
  108. package/dist/components/organisms/ActivityFeed/index.cjs.map +1 -1
  109. package/dist/components/organisms/ActivityFeed/index.d.ts.map +1 -1
  110. package/dist/components/organisms/ActivityFeed/index.js +5 -1
  111. package/dist/components/organisms/ActivityFeed/index.js.map +1 -1
  112. package/dist/components/organisms/Calendar/calendar.utils.cjs +16 -0
  113. package/dist/components/organisms/Calendar/calendar.utils.cjs.map +1 -0
  114. package/dist/components/organisms/Calendar/calendar.utils.d.ts +6 -0
  115. package/dist/components/organisms/Calendar/calendar.utils.d.ts.map +1 -0
  116. package/dist/components/organisms/Calendar/calendar.utils.js +14 -0
  117. package/dist/components/organisms/Calendar/calendar.utils.js.map +1 -0
  118. package/dist/components/organisms/Calendar/components/calendar-header.cjs +2 -1
  119. package/dist/components/organisms/Calendar/components/calendar-header.cjs.map +1 -1
  120. package/dist/components/organisms/Calendar/components/calendar-header.d.ts.map +1 -1
  121. package/dist/components/organisms/Calendar/components/calendar-header.js +2 -1
  122. package/dist/components/organisms/Calendar/components/calendar-header.js.map +1 -1
  123. package/dist/components/organisms/Calendar/index.cjs +13 -7
  124. package/dist/components/organisms/Calendar/index.cjs.map +1 -1
  125. package/dist/components/organisms/Calendar/index.d.ts.map +1 -1
  126. package/dist/components/organisms/Calendar/index.js +13 -7
  127. package/dist/components/organisms/Calendar/index.js.map +1 -1
  128. package/dist/components/organisms/Charts/components/charts-base.cjs +4 -0
  129. package/dist/components/organisms/Charts/components/charts-base.cjs.map +1 -1
  130. package/dist/components/organisms/Charts/components/charts-base.d.ts.map +1 -1
  131. package/dist/components/organisms/Charts/components/charts-base.js +4 -0
  132. package/dist/components/organisms/Charts/components/charts-base.js.map +1 -1
  133. package/dist/components/organisms/GradientPicker/providers/gradient-picker-context.cjs +6 -0
  134. package/dist/components/organisms/GradientPicker/providers/gradient-picker-context.cjs.map +1 -1
  135. package/dist/components/organisms/GradientPicker/providers/gradient-picker-context.d.ts.map +1 -1
  136. package/dist/components/organisms/GradientPicker/providers/gradient-picker-context.js +6 -0
  137. package/dist/components/organisms/GradientPicker/providers/gradient-picker-context.js.map +1 -1
  138. package/dist/components/organisms/HeaderNavigation/components/nav-account-card.cjs +2 -1
  139. package/dist/components/organisms/HeaderNavigation/components/nav-account-card.cjs.map +1 -1
  140. package/dist/components/organisms/HeaderNavigation/components/nav-account-card.d.ts.map +1 -1
  141. package/dist/components/organisms/HeaderNavigation/components/nav-account-card.js +2 -1
  142. package/dist/components/organisms/HeaderNavigation/components/nav-account-card.js.map +1 -1
  143. package/dist/components/organisms/HeaderNavigation/components/nav-item.cjs +4 -3
  144. package/dist/components/organisms/HeaderNavigation/components/nav-item.cjs.map +1 -1
  145. package/dist/components/organisms/HeaderNavigation/components/nav-item.d.ts.map +1 -1
  146. package/dist/components/organisms/HeaderNavigation/components/nav-item.js +4 -3
  147. package/dist/components/organisms/HeaderNavigation/components/nav-item.js.map +1 -1
  148. package/dist/components/organisms/HeaderNavigation/components/nav-list.cjs +4 -2
  149. package/dist/components/organisms/HeaderNavigation/components/nav-list.cjs.map +1 -1
  150. package/dist/components/organisms/HeaderNavigation/components/nav-list.d.ts.map +1 -1
  151. package/dist/components/organisms/HeaderNavigation/components/nav-list.js +4 -2
  152. package/dist/components/organisms/HeaderNavigation/components/nav-list.js.map +1 -1
  153. package/dist/components/organisms/SidebarNavigation/components/nav-button.cjs +5 -2
  154. package/dist/components/organisms/SidebarNavigation/components/nav-button.cjs.map +1 -1
  155. package/dist/components/organisms/SidebarNavigation/components/nav-button.d.ts.map +1 -1
  156. package/dist/components/organisms/SidebarNavigation/components/nav-button.js +5 -2
  157. package/dist/components/organisms/SidebarNavigation/components/nav-button.js.map +1 -1
  158. package/dist/components/organisms/SidebarNavigation/components/nav-item.cjs +5 -4
  159. package/dist/components/organisms/SidebarNavigation/components/nav-item.cjs.map +1 -1
  160. package/dist/components/organisms/SidebarNavigation/components/nav-item.d.ts.map +1 -1
  161. package/dist/components/organisms/SidebarNavigation/components/nav-item.js +5 -4
  162. package/dist/components/organisms/SidebarNavigation/components/nav-item.js.map +1 -1
  163. package/dist/components/organisms/SidebarNavigation/hooks/use-dual-tier-keyboard.cjs +7 -2
  164. package/dist/components/organisms/SidebarNavigation/hooks/use-dual-tier-keyboard.cjs.map +1 -1
  165. package/dist/components/organisms/SidebarNavigation/hooks/use-dual-tier-keyboard.d.ts.map +1 -1
  166. package/dist/components/organisms/SidebarNavigation/hooks/use-dual-tier-keyboard.js +7 -2
  167. package/dist/components/organisms/SidebarNavigation/hooks/use-dual-tier-keyboard.js.map +1 -1
  168. package/dist/components/organisms/TextEditor/components/text-editor-extensions.cjs +32 -15
  169. package/dist/components/organisms/TextEditor/components/text-editor-extensions.cjs.map +1 -1
  170. package/dist/components/organisms/TextEditor/components/text-editor-extensions.d.ts.map +1 -1
  171. package/dist/components/organisms/TextEditor/components/text-editor-extensions.js +20 -3
  172. package/dist/components/organisms/TextEditor/components/text-editor-extensions.js.map +1 -1
  173. package/dist/components/organisms/TextEditor/components/text-editor-tooltip.cjs +2 -2
  174. package/dist/components/organisms/TextEditor/components/text-editor-tooltip.cjs.map +1 -1
  175. package/dist/components/organisms/TextEditor/components/text-editor-tooltip.js +1 -1
  176. package/dist/components/organisms/TextEditor/index.cjs +30 -18
  177. package/dist/components/organisms/TextEditor/index.cjs.map +1 -1
  178. package/dist/components/organisms/TextEditor/index.d.ts +2 -10
  179. package/dist/components/organisms/TextEditor/index.d.ts.map +1 -1
  180. package/dist/components/organisms/TextEditor/index.js +26 -14
  181. package/dist/components/organisms/TextEditor/index.js.map +1 -1
  182. package/dist/components/organisms/TextEditor/providers/text-editor-context.cjs +21 -0
  183. package/dist/components/organisms/TextEditor/providers/text-editor-context.cjs.map +1 -0
  184. package/dist/components/organisms/TextEditor/providers/text-editor-context.d.ts +17 -0
  185. package/dist/components/organisms/TextEditor/providers/text-editor-context.d.ts.map +1 -0
  186. package/dist/components/organisms/TextEditor/providers/text-editor-context.js +18 -0
  187. package/dist/components/organisms/TextEditor/providers/text-editor-context.js.map +1 -0
  188. package/dist/components/organisms/TextEditor/textEditor.utils.cjs +32 -0
  189. package/dist/components/organisms/TextEditor/textEditor.utils.cjs.map +1 -0
  190. package/dist/components/organisms/TextEditor/textEditor.utils.d.ts +14 -0
  191. package/dist/components/organisms/TextEditor/textEditor.utils.d.ts.map +1 -0
  192. package/dist/components/organisms/TextEditor/textEditor.utils.js +29 -0
  193. package/dist/components/organisms/TextEditor/textEditor.utils.js.map +1 -0
  194. package/dist/components/organisms/TreeView/index.cjs +2 -2
  195. package/dist/components/organisms/TreeView/index.cjs.map +1 -1
  196. package/dist/components/organisms/TreeView/index.d.ts.map +1 -1
  197. package/dist/components/organisms/TreeView/index.js +1 -1
  198. package/dist/hooks/{useAriaDisclosureAttrs/index.cjs → __internal__/useAriaDisclosureAttrs/useAriaDisclosureAttrs.cjs} +1 -1
  199. package/dist/hooks/__internal__/useAriaDisclosureAttrs/useAriaDisclosureAttrs.cjs.map +1 -0
  200. package/dist/hooks/{useAriaDisclosureAttrs/index.d.ts → __internal__/useAriaDisclosureAttrs/useAriaDisclosureAttrs.d.ts} +1 -1
  201. package/dist/hooks/__internal__/useAriaDisclosureAttrs/useAriaDisclosureAttrs.d.ts.map +1 -0
  202. package/dist/hooks/{useAriaDisclosureAttrs/index.js → __internal__/useAriaDisclosureAttrs/useAriaDisclosureAttrs.js} +1 -1
  203. package/dist/hooks/__internal__/useAriaDisclosureAttrs/useAriaDisclosureAttrs.js.map +1 -0
  204. package/dist/hooks/useClipboard/index.cjs +10 -3
  205. package/dist/hooks/useClipboard/index.cjs.map +1 -1
  206. package/dist/hooks/useClipboard/index.d.ts.map +1 -1
  207. package/dist/hooks/useClipboard/index.js +10 -3
  208. package/dist/hooks/useClipboard/index.js.map +1 -1
  209. package/dist/native/components/atoms/Button/index.d.ts.map +1 -1
  210. package/dist/native/components/atoms/Button/index.js +1 -1
  211. package/dist/{utilities/isReactComponent/index.d.ts → native/utilities/__internal__/componentGuardUtils/componentGuard.utils.d.ts} +3 -3
  212. package/dist/native/utilities/__internal__/componentGuardUtils/componentGuard.utils.d.ts.map +1 -0
  213. package/dist/{utilities/isReactComponent/index.js → native/utilities/__internal__/componentGuardUtils/componentGuard.utils.js} +3 -3
  214. package/dist/native/utilities/__internal__/componentGuardUtils/componentGuard.utils.js.map +1 -0
  215. package/dist/native/{hooks/useAriaDisclosureAttrs → utilities/hrefUtils}/index.d.ts +3 -3
  216. package/dist/utilities/{isReactComponent/index.cjs → __internal__/componentGuardUtils/componentGuard.utils.cjs} +3 -3
  217. package/dist/utilities/__internal__/componentGuardUtils/componentGuard.utils.cjs.map +1 -0
  218. package/dist/{native/utilities/isReactComponent/index.d.ts → utilities/__internal__/componentGuardUtils/componentGuard.utils.d.ts} +3 -3
  219. package/dist/utilities/__internal__/componentGuardUtils/componentGuard.utils.d.ts.map +1 -0
  220. package/dist/{native/utilities/isReactComponent/index.js → utilities/__internal__/componentGuardUtils/componentGuard.utils.js} +3 -3
  221. package/dist/utilities/__internal__/componentGuardUtils/componentGuard.utils.js.map +1 -0
  222. package/dist/utilities/__internal__/logUtils/log.utils.cjs +32 -0
  223. package/dist/utilities/__internal__/logUtils/log.utils.cjs.map +1 -0
  224. package/dist/utilities/__internal__/logUtils/log.utils.d.ts +23 -0
  225. package/dist/utilities/__internal__/logUtils/log.utils.d.ts.map +1 -0
  226. package/dist/utilities/__internal__/logUtils/log.utils.js +30 -0
  227. package/dist/utilities/__internal__/logUtils/log.utils.js.map +1 -0
  228. package/dist/utilities/hrefUtils/index.cjs +50 -0
  229. package/dist/utilities/hrefUtils/index.cjs.map +1 -0
  230. package/dist/utilities/hrefUtils/index.d.ts +19 -0
  231. package/dist/utilities/hrefUtils/index.d.ts.map +1 -0
  232. package/dist/utilities/hrefUtils/index.js +47 -0
  233. package/dist/utilities/hrefUtils/index.js.map +1 -0
  234. package/dist/utilities/renderUtils/index.cjs +7 -12
  235. package/dist/utilities/renderUtils/index.cjs.map +1 -1
  236. package/dist/utilities/renderUtils/index.d.ts.map +1 -1
  237. package/dist/utilities/renderUtils/index.js +7 -12
  238. package/dist/utilities/renderUtils/index.js.map +1 -1
  239. package/package.json +5 -1
  240. package/dist/hooks/useAriaDisclosureAttrs/index.cjs.map +0 -1
  241. package/dist/hooks/useAriaDisclosureAttrs/index.d.ts.map +0 -1
  242. package/dist/hooks/useAriaDisclosureAttrs/index.js.map +0 -1
  243. package/dist/native/utilities/isReactComponent/index.d.ts.map +0 -1
  244. package/dist/native/utilities/isReactComponent/index.js.map +0 -1
  245. package/dist/utilities/isReactComponent/index.cjs.map +0 -1
  246. package/dist/utilities/isReactComponent/index.d.ts.map +0 -1
  247. package/dist/utilities/isReactComponent/index.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { cx } from '../../../utilities/cx/index.js';
3
- import { isReactComponent } from '../../../utilities/isReactComponent/index.js';
4
3
  import { useResolvedTestId } from '../../../utilities/testIdUtils/index.js';
5
4
  import { useState, isValidElement } from 'react';
6
5
  import { Pressable, View, ActivityIndicator, Text, Linking } from 'react-native';
6
+ import { isReactComponent } from '../../../utilities/__internal__/componentGuardUtils/componentGuard.utils.js';
7
7
  import { styles } from './Button.styles.js';
8
8
 
9
9
  const LINK_COLORS = ['link-gray', 'link-color', 'link-destructive'];
@@ -9,8 +9,8 @@ type ReactComponent = React.FC<any> | React.ComponentClass<any, any> | React.For
9
9
  * form; these guards select the "render it yourself" branch.
10
10
  *
11
11
  * Pure JS with no DOM dependency — works on web (PostCSS) and React Native
12
- * (NativeWind). Imported by components as
13
- * `@flipdish/ui-library/utilities/isReactComponent`.
12
+ * (NativeWind). INTERNAL: imported by components as
13
+ * `#internal/utilities/componentGuardUtils/componentGuard.utils`.
14
14
  */
15
15
  /** Checks if a given value is a function component. */
16
16
  export declare const isFunctionComponent: (component: any) => component is React.FC<any>;
@@ -21,4 +21,4 @@ export declare const isForwardRefComponent: (component: any) => component is Rea
21
21
  /** Checks if a given value is a valid React component (FC, class, or forwardRef). */
22
22
  export declare const isReactComponent: (component: any) => component is ReactComponent;
23
23
  export {};
24
- //# sourceMappingURL=index.d.ts.map
24
+ //# sourceMappingURL=componentGuard.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"componentGuard.utils.d.ts","sourceRoot":"","sources":["../../../../../src/utilities/__internal__/componentGuardUtils/componentGuard.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,cAAc,GAAG,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC;AAE5G;;;;;;;;;;;GAWG;AAEH,uDAAuD;AAEvD,eAAO,MAAM,mBAAmB,GAAI,WAAW,GAAG,KAAG,SAAS,IAAI,KAAK,CAAC,EAAE,CAAC,GAAG,CAE7E,CAAC;AAEF,oDAAoD;AAEpD,eAAO,MAAM,gBAAgB,GAAI,WAAW,GAAG,KAAG,SAAS,IAAI,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,GAAG,CAE3F,CAAC;AAEF,0DAA0D;AAE1D,eAAO,MAAM,qBAAqB,GAAI,WAAW,GAAG,KAAG,SAAS,IAAI,KAAK,CAAC,yBAAyB,CAAC,GAAG,CAEtG,CAAC;AAEF,qFAAqF;AAErF,eAAO,MAAM,gBAAgB,GAAI,WAAW,GAAG,KAAG,SAAS,IAAI,cAE9D,CAAC"}
@@ -7,8 +7,8 @@
7
7
  * form; these guards select the "render it yourself" branch.
8
8
  *
9
9
  * Pure JS with no DOM dependency — works on web (PostCSS) and React Native
10
- * (NativeWind). Imported by components as
11
- * `@flipdish/ui-library/utilities/isReactComponent`.
10
+ * (NativeWind). INTERNAL: imported by components as
11
+ * `#internal/utilities/componentGuardUtils/componentGuard.utils`.
12
12
  */
13
13
  /** Checks if a given value is a function component. */
14
14
  // biome-ignore lint/suspicious/noExplicitAny: required for React component type guard
@@ -32,4 +32,4 @@ const isReactComponent = (component) => {
32
32
  };
33
33
 
34
34
  export { isClassComponent, isForwardRefComponent, isFunctionComponent, isReactComponent };
35
- //# sourceMappingURL=index.js.map
35
+ //# sourceMappingURL=componentGuard.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"componentGuard.utils.js","sources":["../../../../../../src/utilities/__internal__/componentGuardUtils/componentGuard.utils.ts"],"sourcesContent":[null],"names":[],"mappings":"AAMA;;;;;;;;;;;AAWG;AAEH;AACA;AACO,MAAM,mBAAmB,GAAG,CAAC,SAAc,KAAgC;AAChF,IAAA,OAAO,OAAO,SAAS,KAAK,UAAU;AACxC;AAEA;AACA;AACO,MAAM,gBAAgB,GAAG,CAAC,SAAc,KAAiD;IAC9F,OAAO,OAAO,SAAS,KAAK,UAAU,IAAI,SAAS,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,gBAAgB,IAAI,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC;AAC3I;AAEA;AACA;AACO,MAAM,qBAAqB,GAAG,CAAC,SAAc,KAAuD;AACzG,IAAA,OAAO,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,KAAK,IAAI,IAAI,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,2BAA2B;AAC9H;AAEA;AACA;AACO,MAAM,gBAAgB,GAAG,CAAC,SAAc,KAAiC;AAC9E,IAAA,OAAO,mBAAmB,CAAC,SAAS,CAAC,IAAI,qBAAqB,CAAC,SAAS,CAAC,IAAI,gBAAgB,CAAC,SAAS,CAAC;AAC1G;;;;"}
@@ -1,12 +1,12 @@
1
1
  /**
2
- * `useAriaDisclosureAttrs` has no React Native implementation.
2
+ * `hrefUtils` has no React Native implementation.
3
3
  *
4
4
  * This is a generated types-only stub (scripts/emit-native-stubs.mjs). It exists so
5
- * that importing `@flipdish/ui-library/hooks/useAriaDisclosureAttrs` from React Native fails at
5
+ * that importing `@flipdish/ui-library/utilities/hrefUtils` from React Native fails at
6
6
  * compile time rather than resolving to the web build's types. There is no
7
7
  * matching `index.js`, so Metro cannot bundle this module either.
8
8
  *
9
- * To make `useAriaDisclosureAttrs` available on React Native, add an `index.native.tsx` beside
9
+ * To make `hrefUtils` available on React Native, add an `index.native.tsx` beside
10
10
  * its `index.tsx` — the build picks it up automatically and this stub disappears.
11
11
  */
12
12
  export declare const __NO_REACT_NATIVE_IMPLEMENTATION__: never;
@@ -9,8 +9,8 @@
9
9
  * form; these guards select the "render it yourself" branch.
10
10
  *
11
11
  * Pure JS with no DOM dependency — works on web (PostCSS) and React Native
12
- * (NativeWind). Imported by components as
13
- * `@flipdish/ui-library/utilities/isReactComponent`.
12
+ * (NativeWind). INTERNAL: imported by components as
13
+ * `#internal/utilities/componentGuardUtils/componentGuard.utils`.
14
14
  */
15
15
  /** Checks if a given value is a function component. */
16
16
  // biome-ignore lint/suspicious/noExplicitAny: required for React component type guard
@@ -37,4 +37,4 @@ exports.isClassComponent = isClassComponent;
37
37
  exports.isForwardRefComponent = isForwardRefComponent;
38
38
  exports.isFunctionComponent = isFunctionComponent;
39
39
  exports.isReactComponent = isReactComponent;
40
- //# sourceMappingURL=index.cjs.map
40
+ //# sourceMappingURL=componentGuard.utils.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"componentGuard.utils.cjs","sources":["../../../../src/utilities/__internal__/componentGuardUtils/componentGuard.utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAMA;;;;;;;;;;;AAWG;AAEH;AACA;AACO,MAAM,mBAAmB,GAAG,CAAC,SAAc,KAAgC;AAChF,IAAA,OAAO,OAAO,SAAS,KAAK,UAAU;AACxC;AAEA;AACA;AACO,MAAM,gBAAgB,GAAG,CAAC,SAAc,KAAiD;IAC9F,OAAO,OAAO,SAAS,KAAK,UAAU,IAAI,SAAS,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,gBAAgB,IAAI,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC;AAC3I;AAEA;AACA;AACO,MAAM,qBAAqB,GAAG,CAAC,SAAc,KAAuD;AACzG,IAAA,OAAO,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,KAAK,IAAI,IAAI,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,2BAA2B;AAC9H;AAEA;AACA;AACO,MAAM,gBAAgB,GAAG,CAAC,SAAc,KAAiC;AAC9E,IAAA,OAAO,mBAAmB,CAAC,SAAS,CAAC,IAAI,qBAAqB,CAAC,SAAS,CAAC,IAAI,gBAAgB,CAAC,SAAS,CAAC;AAC1G;;;;;;;"}
@@ -9,8 +9,8 @@ type ReactComponent = React.FC<any> | React.ComponentClass<any, any> | React.For
9
9
  * form; these guards select the "render it yourself" branch.
10
10
  *
11
11
  * Pure JS with no DOM dependency — works on web (PostCSS) and React Native
12
- * (NativeWind). Imported by components as
13
- * `@flipdish/ui-library/utilities/isReactComponent`.
12
+ * (NativeWind). INTERNAL: imported by components as
13
+ * `#internal/utilities/componentGuardUtils/componentGuard.utils`.
14
14
  */
15
15
  /** Checks if a given value is a function component. */
16
16
  export declare const isFunctionComponent: (component: any) => component is React.FC<any>;
@@ -21,4 +21,4 @@ export declare const isForwardRefComponent: (component: any) => component is Rea
21
21
  /** Checks if a given value is a valid React component (FC, class, or forwardRef). */
22
22
  export declare const isReactComponent: (component: any) => component is ReactComponent;
23
23
  export {};
24
- //# sourceMappingURL=index.d.ts.map
24
+ //# sourceMappingURL=componentGuard.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"componentGuard.utils.d.ts","sourceRoot":"","sources":["../../../../src/utilities/__internal__/componentGuardUtils/componentGuard.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,cAAc,GAAG,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC;AAE5G;;;;;;;;;;;GAWG;AAEH,uDAAuD;AAEvD,eAAO,MAAM,mBAAmB,GAAI,WAAW,GAAG,KAAG,SAAS,IAAI,KAAK,CAAC,EAAE,CAAC,GAAG,CAE7E,CAAC;AAEF,oDAAoD;AAEpD,eAAO,MAAM,gBAAgB,GAAI,WAAW,GAAG,KAAG,SAAS,IAAI,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,GAAG,CAE3F,CAAC;AAEF,0DAA0D;AAE1D,eAAO,MAAM,qBAAqB,GAAI,WAAW,GAAG,KAAG,SAAS,IAAI,KAAK,CAAC,yBAAyB,CAAC,GAAG,CAEtG,CAAC;AAEF,qFAAqF;AAErF,eAAO,MAAM,gBAAgB,GAAI,WAAW,GAAG,KAAG,SAAS,IAAI,cAE9D,CAAC"}
@@ -7,8 +7,8 @@
7
7
  * form; these guards select the "render it yourself" branch.
8
8
  *
9
9
  * Pure JS with no DOM dependency — works on web (PostCSS) and React Native
10
- * (NativeWind). Imported by components as
11
- * `@flipdish/ui-library/utilities/isReactComponent`.
10
+ * (NativeWind). INTERNAL: imported by components as
11
+ * `#internal/utilities/componentGuardUtils/componentGuard.utils`.
12
12
  */
13
13
  /** Checks if a given value is a function component. */
14
14
  // biome-ignore lint/suspicious/noExplicitAny: required for React component type guard
@@ -32,4 +32,4 @@ const isReactComponent = (component) => {
32
32
  };
33
33
 
34
34
  export { isClassComponent, isForwardRefComponent, isFunctionComponent, isReactComponent };
35
- //# sourceMappingURL=index.js.map
35
+ //# sourceMappingURL=componentGuard.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"componentGuard.utils.js","sources":["../../../../src/utilities/__internal__/componentGuardUtils/componentGuard.utils.ts"],"sourcesContent":[null],"names":[],"mappings":"AAMA;;;;;;;;;;;AAWG;AAEH;AACA;AACO,MAAM,mBAAmB,GAAG,CAAC,SAAc,KAAgC;AAChF,IAAA,OAAO,OAAO,SAAS,KAAK,UAAU;AACxC;AAEA;AACA;AACO,MAAM,gBAAgB,GAAG,CAAC,SAAc,KAAiD;IAC9F,OAAO,OAAO,SAAS,KAAK,UAAU,IAAI,SAAS,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,gBAAgB,IAAI,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC;AAC3I;AAEA;AACA;AACO,MAAM,qBAAqB,GAAG,CAAC,SAAc,KAAuD;AACzG,IAAA,OAAO,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,KAAK,IAAI,IAAI,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,2BAA2B;AAC9H;AAEA;AACA;AACO,MAAM,gBAAgB,GAAG,CAAC,SAAc,KAAiC;AAC9E,IAAA,OAAO,mBAAmB,CAAC,SAAS,CAAC,IAAI,qBAAqB,CAAC,SAAS,CAAC,IAAI,gBAAgB,CAAC,SAAS,CAAC;AAC1G;;;;"}
@@ -0,0 +1,32 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * INTERNAL — not part of the public API.
5
+ *
6
+ * `__internal__` modules deliberately have no `index.ts`, so they never match
7
+ * `PUBLIC_ENTRY_GLOBS` (scripts/entry-manifest.mjs) and the `./utilities/*` exports
8
+ * map cannot resolve them — consumers physically cannot import this. Library code
9
+ * imports them via the package-private `#internal/utilities/*` subpath (area-namespaced — add `#internal/hooks/*` etc. as new areas grow internal modules) (package.json `imports`
10
+ * field, resolved by tsc/Vite/Vitest at source level and rewritten to relative paths
11
+ * in dist by the rollup `internal-subpath-imports` plugin). Never import via
12
+ * `@flipdish/ui-library/...` — it resolves in TypeScript but breaks at runtime;
13
+ * `check-deep-imports.mjs` enforces this.
14
+ */
15
+ const seenWarnings = new Set();
16
+ /**
17
+ * Emits a `console.warn` prefixed with the library name, once per `key` for the
18
+ * lifetime of the module. Use for data-dependent runtime conditions (a blocked
19
+ * href scheme, a missing account id) that must stay visible in production —
20
+ * error-tracking tools pick console.warn up as breadcrumbs — without flooding
21
+ * the console on re-renders.
22
+ */
23
+ const warnOnce = (key, message) => {
24
+ if (seenWarnings.has(key)) {
25
+ return;
26
+ }
27
+ seenWarnings.add(key);
28
+ console.warn(`[@flipdish/ui-library] ${message}`);
29
+ };
30
+
31
+ exports.warnOnce = warnOnce;
32
+ //# sourceMappingURL=log.utils.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log.utils.cjs","sources":["../../../../src/utilities/__internal__/logUtils/log.utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;;;;;;;;;AAWG;AAEH,MAAM,YAAY,GAAG,IAAI,GAAG,EAAU;AAEtC;;;;;;AAMG;MACU,QAAQ,GAAG,CAAC,GAAW,EAAE,OAAe,KAAU;AAC7D,IAAA,IAAI,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACzB;IACF;AACA,IAAA,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC;AACrB,IAAA,OAAO,CAAC,IAAI,CAAC,0BAA0B,OAAO,CAAA,CAAE,CAAC;AACnD;;;;"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * INTERNAL — not part of the public API.
3
+ *
4
+ * `__internal__` modules deliberately have no `index.ts`, so they never match
5
+ * `PUBLIC_ENTRY_GLOBS` (scripts/entry-manifest.mjs) and the `./utilities/*` exports
6
+ * map cannot resolve them — consumers physically cannot import this. Library code
7
+ * imports them via the package-private `#internal/utilities/*` subpath (area-namespaced — add `#internal/hooks/*` etc. as new areas grow internal modules) (package.json `imports`
8
+ * field, resolved by tsc/Vite/Vitest at source level and rewritten to relative paths
9
+ * in dist by the rollup `internal-subpath-imports` plugin). Never import via
10
+ * `@flipdish/ui-library/...` — it resolves in TypeScript but breaks at runtime;
11
+ * `check-deep-imports.mjs` enforces this.
12
+ */
13
+ /**
14
+ * Emits a `console.warn` prefixed with the library name, once per `key` for the
15
+ * lifetime of the module. Use for data-dependent runtime conditions (a blocked
16
+ * href scheme, a missing account id) that must stay visible in production —
17
+ * error-tracking tools pick console.warn up as breadcrumbs — without flooding
18
+ * the console on re-renders.
19
+ */
20
+ export declare const warnOnce: (key: string, message: string) => void;
21
+ /** Test-only: clears the once-per-key warning memory. */
22
+ export declare const resetWarnOnce: () => void;
23
+ //# sourceMappingURL=log.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log.utils.d.ts","sourceRoot":"","sources":["../../../../src/utilities/__internal__/logUtils/log.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,GAAI,KAAK,MAAM,EAAE,SAAS,MAAM,KAAG,IAMvD,CAAC;AAEF,yDAAyD;AACzD,eAAO,MAAM,aAAa,QAAO,IAEhC,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * INTERNAL — not part of the public API.
3
+ *
4
+ * `__internal__` modules deliberately have no `index.ts`, so they never match
5
+ * `PUBLIC_ENTRY_GLOBS` (scripts/entry-manifest.mjs) and the `./utilities/*` exports
6
+ * map cannot resolve them — consumers physically cannot import this. Library code
7
+ * imports them via the package-private `#internal/utilities/*` subpath (area-namespaced — add `#internal/hooks/*` etc. as new areas grow internal modules) (package.json `imports`
8
+ * field, resolved by tsc/Vite/Vitest at source level and rewritten to relative paths
9
+ * in dist by the rollup `internal-subpath-imports` plugin). Never import via
10
+ * `@flipdish/ui-library/...` — it resolves in TypeScript but breaks at runtime;
11
+ * `check-deep-imports.mjs` enforces this.
12
+ */
13
+ const seenWarnings = new Set();
14
+ /**
15
+ * Emits a `console.warn` prefixed with the library name, once per `key` for the
16
+ * lifetime of the module. Use for data-dependent runtime conditions (a blocked
17
+ * href scheme, a missing account id) that must stay visible in production —
18
+ * error-tracking tools pick console.warn up as breadcrumbs — without flooding
19
+ * the console on re-renders.
20
+ */
21
+ const warnOnce = (key, message) => {
22
+ if (seenWarnings.has(key)) {
23
+ return;
24
+ }
25
+ seenWarnings.add(key);
26
+ console.warn(`[@flipdish/ui-library] ${message}`);
27
+ };
28
+
29
+ export { warnOnce };
30
+ //# sourceMappingURL=log.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log.utils.js","sources":["../../../../src/utilities/__internal__/logUtils/log.utils.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;;;;;;;AAWG;AAEH,MAAM,YAAY,GAAG,IAAI,GAAG,EAAU;AAEtC;;;;;;AAMG;MACU,QAAQ,GAAG,CAAC,GAAW,EAAE,OAAe,KAAU;AAC7D,IAAA,IAAI,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACzB;IACF;AACA,IAAA,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC;AACrB,IAAA,OAAO,CAAC,IAAI,CAAC,0BAA0B,OAAO,CAAA,CAAE,CAAC;AACnD;;;;"}
@@ -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;;;;"}
@@ -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;AAEA;;;;;;;;AAQG;AACI,MA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BAAyB,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,YAAY,CAAC,GAAG,CAAC,I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GED
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "name": "@flipdish/ui-library",
3
- "version": "0.17.0",
3
+ "version": "0.19.0",
4
4
  "description": "Flipdish Design System — atomic-design component library (Tailwind v4 + UntitledUI + React Aria).",
5
5
  "type": "module",
6
+ "imports": {
7
+ "#internal/hooks/*": "./src/hooks/__internal__/*.ts",
8
+ "#internal/utilities/*": "./src/utilities/__internal__/*.ts"
9
+ },
6
10
  "sideEffects": [
7
11
  "*.css"
8
12
  ],
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/hooks/useAriaDisclosureAttrs/index.ts"],"sourcesContent":[null],"names":["useEffect"],"mappings":";;;;AAWA;;;;;;;;;;AAUG;AACI,MAAM,sBAAsB,GAAG,CACpC,GAAwB,EACxB,EAAE,YAAY,EAAE,YAAY,EAAiC,KAC3D;IACFA,eAAS,CAAC,MAAK;AACb,QAAA,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO;AACxB,QAAA,IAAI,CAAC,IAAI;YAAE;AAEX,QAAA,IAAI,YAAY,KAAK,SAAS,EAAE;AAC9B,YAAA,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC;QACvC;aAAO;YACL,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;QAC1D;AAEA,QAAA,IAAI,YAAY,KAAK,SAAS,EAAE;AAC9B,YAAA,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC;QACvC;aAAO;AACL,YAAA,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,YAAY,CAAC;QAClD;IACF,CAAC,EAAE,CAAC,GAAG,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;AACvC;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAriaDisclosureAttrs/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,OAAO,CAAC;AAElD,MAAM,WAAW,6BAA6B;IAC5C,iGAAiG;IACjG,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,kGAAkG;IAClG,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,GAAI,CAAC,SAAS,WAAW,EAC1D,KAAK,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,EACxB,gCAAgC,6BAA6B,SAkB9D,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/hooks/useAriaDisclosureAttrs/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAWA;;;;;;;;;;AAUG;AACI,MAAM,sBAAsB,GAAG,CACpC,GAAwB,EACxB,EAAE,YAAY,EAAE,YAAY,EAAiC,KAC3D;IACF,SAAS,CAAC,MAAK;AACb,QAAA,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO;AACxB,QAAA,IAAI,CAAC,IAAI;YAAE;AAEX,QAAA,IAAI,YAAY,KAAK,SAAS,EAAE;AAC9B,YAAA,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC;QACvC;aAAO;YACL,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;QAC1D;AAEA,QAAA,IAAI,YAAY,KAAK,SAAS,EAAE;AAC9B,YAAA,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC;QACvC;aAAO;AACL,YAAA,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,YAAY,CAAC;QAClD;IACF,CAAC,EAAE,CAAC,GAAG,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;AACvC;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utilities/isReactComponent/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,cAAc,GAAG,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAA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;AAC9H;AAEA;AACA;AACO,MAAM,gBAAgB,GAAG,CAAC,SAAc,KAAiC;AAC9E,IAAA,OAAO,mBAAmB,CAAC,SAAS,CAAC,IAAI,qBAAqB,CAAC,SAAS,CAAC,IAAI,gBAAgB,CAAC,SAAS,CAAC;AAC1G;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/utilities/isReactComponent/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAMA;;;;;;;;;;;AAWG;AAEH;AACA;AACO,MAAM,mBAAmB,GAAG,CAAC,SAAc,KAAgC;AAChF,IAAA,OAAO,OAAO,SAAS,KAAK,UAAU;AACxC;AAEA;AACA;AACO,MAAM,gBAAgB,GAAG,CAAC,SAAc,KAAiD;IAC9F,OAAO,OAAO,SAAS,KAAK,UAAU,IAAI,SAAS,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,gBAAgB,IAAI,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC;AAC3I;AAEA;AACA;AACO,MAAM,qBAAqB,GAAG,CAAC,SAAc,KAAuD;AACzG,IAAA,OAAO,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,KAAK,IAAI,IAAI,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,2BAA2B;AAC9H;AAEA;AACA;AACO,MAAM,gBAAgB,GAAG,CAAC,SAAc,KAAiC;AAC9E,IAAA,OAAO,mBAAmB,CAAC,SAAS,CAAC,IAAI,qBAAqB,CAAC,SAAS,CAAC,IAAI,gBAAgB,CAAC,SAAS,CAAC;AAC1G;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utilities/isReactComponent/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,cAAc,GAAG,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC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