markdown-flow-ui 0.3.2-dev.2 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/README.md +0 -13
  2. package/dist/_virtual/index.es8.js +2 -2
  3. package/dist/_virtual/index.es9.js +2 -2
  4. package/dist/_virtual/index8.cjs +1 -1
  5. package/dist/_virtual/index9.cjs +1 -1
  6. package/dist/assets/markdown-flow-ui.css +1 -1
  7. package/dist/components/ContentRender/IframeSandbox.cjs.map +1 -1
  8. package/dist/components/ContentRender/IframeSandbox.es.js.map +1 -1
  9. package/dist/components/ContentRender/utils/video-markdown-run.cjs.map +1 -1
  10. package/dist/components/ContentRender/utils/video-markdown-run.es.js.map +1 -1
  11. package/dist/components/MarkdownFlow/ScrollToBottomButton.cjs.map +1 -1
  12. package/dist/components/MarkdownFlow/ScrollToBottomButton.es.js.map +1 -1
  13. package/dist/components/MarkdownFlow/ScrollToBottomControl.cjs.map +1 -1
  14. package/dist/components/MarkdownFlow/ScrollToBottomControl.es.js.map +1 -1
  15. package/dist/components/MarkdownFlow/useScrollToBottom.cjs.map +1 -1
  16. package/dist/components/MarkdownFlow/useScrollToBottom.es.js.map +1 -1
  17. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.cjs +1 -1
  18. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.cjs.map +1 -1
  19. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.d.ts +2 -2
  20. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.es.js +323 -562
  21. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.es.js.map +1 -1
  22. package/dist/components/MarkdownFlowEditor/components/EditorToolbar.cjs +1 -1
  23. package/dist/components/MarkdownFlowEditor/components/EditorToolbar.cjs.map +1 -1
  24. package/dist/components/MarkdownFlowEditor/components/EditorToolbar.d.ts +0 -8
  25. package/dist/components/MarkdownFlowEditor/components/EditorToolbar.es.js +64 -107
  26. package/dist/components/MarkdownFlowEditor/components/EditorToolbar.es.js.map +1 -1
  27. package/dist/components/MarkdownFlowEditor/editor-context.cjs +1 -1
  28. package/dist/components/MarkdownFlowEditor/editor-context.cjs.map +1 -1
  29. package/dist/components/MarkdownFlowEditor/editor-context.es.js +4 -10
  30. package/dist/components/MarkdownFlowEditor/editor-context.es.js.map +1 -1
  31. package/dist/components/MarkdownFlowEditor/editorI18n.d.ts +0 -308
  32. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.cjs +1 -1
  33. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.d.ts +1 -15
  34. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.es.js +87 -115
  35. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.es.js.map +1 -1
  36. package/dist/components/MarkdownFlowEditor/locales/de-DE.json.cjs +1 -1
  37. package/dist/components/MarkdownFlowEditor/locales/de-DE.json.d.ts +1 -15
  38. package/dist/components/MarkdownFlowEditor/locales/de-DE.json.es.js +88 -116
  39. package/dist/components/MarkdownFlowEditor/locales/de-DE.json.es.js.map +1 -1
  40. package/dist/components/MarkdownFlowEditor/locales/en-US.json.cjs +1 -1
  41. package/dist/components/MarkdownFlowEditor/locales/en-US.json.d.ts +1 -15
  42. package/dist/components/MarkdownFlowEditor/locales/en-US.json.es.js +88 -116
  43. package/dist/components/MarkdownFlowEditor/locales/en-US.json.es.js.map +1 -1
  44. package/dist/components/MarkdownFlowEditor/locales/es-ES.json.cjs +1 -1
  45. package/dist/components/MarkdownFlowEditor/locales/es-ES.json.d.ts +1 -15
  46. package/dist/components/MarkdownFlowEditor/locales/es-ES.json.es.js +80 -108
  47. package/dist/components/MarkdownFlowEditor/locales/es-ES.json.es.js.map +1 -1
  48. package/dist/components/MarkdownFlowEditor/locales/fil-PH.json.cjs +1 -1
  49. package/dist/components/MarkdownFlowEditor/locales/fil-PH.json.d.ts +1 -15
  50. package/dist/components/MarkdownFlowEditor/locales/fil-PH.json.es.js +82 -110
  51. package/dist/components/MarkdownFlowEditor/locales/fil-PH.json.es.js.map +1 -1
  52. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.cjs +1 -1
  53. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.d.ts +1 -15
  54. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.es.js +86 -114
  55. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.es.js.map +1 -1
  56. package/dist/components/MarkdownFlowEditor/locales/ja-JP.json.cjs +1 -1
  57. package/dist/components/MarkdownFlowEditor/locales/ja-JP.json.d.ts +1 -15
  58. package/dist/components/MarkdownFlowEditor/locales/ja-JP.json.es.js +88 -116
  59. package/dist/components/MarkdownFlowEditor/locales/ja-JP.json.es.js.map +1 -1
  60. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.cjs +1 -1
  61. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.d.ts +1 -15
  62. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.es.js +85 -113
  63. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.es.js.map +1 -1
  64. package/dist/components/MarkdownFlowEditor/locales/ur-PK.json.cjs +1 -1
  65. package/dist/components/MarkdownFlowEditor/locales/ur-PK.json.d.ts +1 -15
  66. package/dist/components/MarkdownFlowEditor/locales/ur-PK.json.es.js +94 -122
  67. package/dist/components/MarkdownFlowEditor/locales/ur-PK.json.es.js.map +1 -1
  68. package/dist/components/MarkdownFlowEditor/locales/vi-VN.json.cjs +1 -1
  69. package/dist/components/MarkdownFlowEditor/locales/vi-VN.json.d.ts +1 -15
  70. package/dist/components/MarkdownFlowEditor/locales/vi-VN.json.es.js +74 -102
  71. package/dist/components/MarkdownFlowEditor/locales/vi-VN.json.es.js.map +1 -1
  72. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.cjs +1 -1
  73. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.d.ts +1 -15
  74. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.es.js +72 -100
  75. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.es.js.map +1 -1
  76. package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.cjs +1 -1
  77. package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.cjs.map +1 -1
  78. package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.d.ts +2 -1
  79. package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.es.js +62 -53
  80. package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.es.js.map +1 -1
  81. package/dist/components/MarkdownFlowEditor/plugins/PlaceholderWidget.cjs.map +1 -1
  82. package/dist/components/MarkdownFlowEditor/plugins/PlaceholderWidget.d.ts +1 -1
  83. package/dist/components/MarkdownFlowEditor/plugins/PlaceholderWidget.es.js.map +1 -1
  84. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.cjs +3 -3
  85. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.cjs.map +1 -1
  86. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.d.ts +1 -5
  87. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.es.js +149 -154
  88. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.es.js.map +1 -1
  89. package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.cjs +1 -1
  90. package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.cjs.map +1 -1
  91. package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.d.ts +2 -1
  92. package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.es.js +53 -42
  93. package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.es.js.map +1 -1
  94. package/dist/components/MarkdownFlowEditor/types.cjs +1 -1
  95. package/dist/components/MarkdownFlowEditor/types.cjs.map +1 -1
  96. package/dist/components/MarkdownFlowEditor/types.d.ts +1 -11
  97. package/dist/components/MarkdownFlowEditor/types.es.js +2 -2
  98. package/dist/components/MarkdownFlowEditor/types.es.js.map +1 -1
  99. package/dist/components/MarkdownFlowEditor/utils.cjs +1 -1
  100. package/dist/components/MarkdownFlowEditor/utils.cjs.map +1 -1
  101. package/dist/components/MarkdownFlowEditor/utils.d.ts +0 -10
  102. package/dist/components/MarkdownFlowEditor/utils.es.js +59 -73
  103. package/dist/components/MarkdownFlowEditor/utils.es.js.map +1 -1
  104. package/dist/components/Slide/MarkdownSlideScaling.cjs.map +1 -1
  105. package/dist/components/Slide/MarkdownSlideScaling.es.js.map +1 -1
  106. package/dist/components/Slide/MobilePlayerSettingsSheet.es.js +16 -16
  107. package/dist/components/Slide/Player.cjs.map +1 -1
  108. package/dist/components/Slide/Player.es.js.map +1 -1
  109. package/dist/components/Slide/Slide.cjs.map +1 -1
  110. package/dist/components/Slide/Slide.es.js.map +1 -1
  111. package/dist/components/Slide/SubtitleOverlay.cjs.map +1 -1
  112. package/dist/components/Slide/SubtitleOverlay.es.js.map +1 -1
  113. package/dist/components/Slide/slideI18n.cjs.map +1 -1
  114. package/dist/components/Slide/slideI18n.es.js.map +1 -1
  115. package/dist/components/Slide/useSlide.cjs.map +1 -1
  116. package/dist/components/Slide/useSlide.es.js.map +1 -1
  117. package/dist/components/Slide/utils/streamingNavigation.cjs.map +1 -1
  118. package/dist/components/Slide/utils/streamingNavigation.es.js.map +1 -1
  119. package/dist/components/ui/dialog.cjs +1 -1
  120. package/dist/components/ui/dialog.cjs.map +1 -1
  121. package/dist/components/ui/dialog.es.js +27 -27
  122. package/dist/components/ui/dialog.es.js.map +1 -1
  123. package/dist/lib/interaction-defaults.cjs.map +1 -1
  124. package/dist/lib/interaction-defaults.es.js.map +1 -1
  125. package/dist/markdown-flow-ui-lib.css +1 -1
  126. package/dist/markdown-flow-ui.css +1 -1
  127. package/dist/node_modules/@braintree/sanitize-url/dist/index.cjs +1 -1
  128. package/dist/node_modules/@braintree/sanitize-url/dist/index.es.js +1 -1
  129. package/dist/node_modules/@radix-ui/react-context/dist/index.cjs +1 -1
  130. package/dist/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -1
  131. package/dist/node_modules/@radix-ui/react-context/dist/index.es.js +34 -49
  132. package/dist/node_modules/@radix-ui/react-context/dist/index.es.js.map +1 -1
  133. package/dist/node_modules/@radix-ui/react-dialog/dist/index.cjs +1 -5
  134. package/dist/node_modules/@radix-ui/react-dialog/dist/index.cjs.map +1 -1
  135. package/dist/node_modules/@radix-ui/react-dialog/dist/index.es.js +206 -220
  136. package/dist/node_modules/@radix-ui/react-dialog/dist/index.es.js.map +1 -1
  137. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.cjs +2 -0
  138. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.cjs.map +1 -0
  139. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.es.js +50 -0
  140. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.es.js.map +1 -0
  141. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +2 -0
  142. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs/dist/index.cjs.map +1 -0
  143. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs/dist/index.es.js +34 -0
  144. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs/dist/index.es.js.map +1 -0
  145. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.cjs +2 -0
  146. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -0
  147. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.es.js +82 -0
  148. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.es.js.map +1 -0
  149. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +2 -0
  150. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs.map +1 -0
  151. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.es.js +216 -0
  152. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.es.js.map +1 -0
  153. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/dist/index.cjs +2 -0
  154. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/dist/index.cjs.map +1 -0
  155. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/dist/index.es.js +15 -0
  156. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/dist/index.es.js.map +1 -0
  157. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.cjs +2 -0
  158. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.cjs.map +1 -0
  159. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.es.js +18 -0
  160. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.es.js.map +1 -0
  161. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.cjs +2 -0
  162. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.cjs.map +1 -0
  163. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.es.js +104 -0
  164. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.es.js.map +1 -0
  165. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.cjs +2 -0
  166. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -0
  167. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.es.js +39 -0
  168. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.es.js.map +1 -0
  169. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +2 -0
  170. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs.map +1 -0
  171. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js +13 -0
  172. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js.map +1 -0
  173. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +2 -0
  174. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs.map +1 -0
  175. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.es.js +70 -0
  176. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.es.js.map +1 -0
  177. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-effect-event/dist/index.cjs +2 -0
  178. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-effect-event/dist/index.cjs.map +1 -0
  179. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-effect-event/dist/index.es.js +20 -0
  180. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-effect-event/dist/index.es.js.map +1 -0
  181. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +2 -0
  182. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs.map +1 -0
  183. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-layout-effect/dist/index.es.js +7 -0
  184. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-layout-effect/dist/index.es.js.map +1 -0
  185. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +1 -1
  186. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.cjs.map +1 -1
  187. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.es.js +18 -9
  188. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.es.js.map +1 -1
  189. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +1 -1
  190. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs.map +1 -1
  191. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.es.js +148 -100
  192. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.es.js.map +1 -1
  193. package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +2 -0
  194. package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-compose-refs/dist/index.cjs.map +1 -0
  195. package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-compose-refs/dist/index.es.js +34 -0
  196. package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-compose-refs/dist/index.es.js.map +1 -0
  197. package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-primitive/dist/index.cjs +2 -0
  198. package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -0
  199. package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-primitive/dist/index.es.js +39 -0
  200. package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-primitive/dist/index.es.js.map +1 -0
  201. package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +2 -0
  202. package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs.map +1 -0
  203. package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js +13 -0
  204. package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js.map +1 -0
  205. package/dist/node_modules/@radix-ui/react-id/dist/index.cjs +1 -1
  206. package/dist/node_modules/@radix-ui/react-id/dist/index.cjs.map +1 -1
  207. package/dist/node_modules/@radix-ui/react-id/dist/index.es.js +8 -8
  208. package/dist/node_modules/@radix-ui/react-id/dist/index.es.js.map +1 -1
  209. package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs +1 -1
  210. package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -1
  211. package/dist/node_modules/@radix-ui/react-primitive/dist/index.es.js +1 -1
  212. package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.cjs +2 -0
  213. package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -0
  214. package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.es.js +50 -0
  215. package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.es.js.map +1 -0
  216. package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs +1 -1
  217. package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -1
  218. package/dist/node_modules/@radix-ui/react-slot/dist/index.es.js +80 -41
  219. package/dist/node_modules/@radix-ui/react-slot/dist/index.es.js.map +1 -1
  220. package/dist/node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +2 -0
  221. package/dist/node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs/dist/index.cjs.map +1 -0
  222. package/dist/node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs/dist/index.es.js +34 -0
  223. package/dist/node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs/dist/index.es.js.map +1 -0
  224. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.cjs +1 -1
  225. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.cjs.map +1 -1
  226. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.es.js +1 -1
  227. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.cjs +2 -0
  228. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -0
  229. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.es.js +12 -0
  230. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.es.js.map +1 -0
  231. package/dist/node_modules/classnames/index.cjs +1 -1
  232. package/dist/node_modules/classnames/index.es.js +1 -1
  233. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +2 -2
  234. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs.map +1 -1
  235. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.es.js +75 -72
  236. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.es.js.map +1 -1
  237. package/package.json +10 -10
  238. package/dist/components/MarkdownFlowEditor/components/CustomPopover.cjs +0 -2
  239. package/dist/components/MarkdownFlowEditor/components/CustomPopover.cjs.map +0 -1
  240. package/dist/components/MarkdownFlowEditor/components/CustomPopover.d.ts +0 -17
  241. package/dist/components/MarkdownFlowEditor/components/CustomPopover.es.js +0 -46
  242. package/dist/components/MarkdownFlowEditor/components/CustomPopover.es.js.map +0 -1
  243. package/dist/components/MarkdownFlowEditor/components/VariableSearchDropdown.cjs +0 -2
  244. package/dist/components/MarkdownFlowEditor/components/VariableSearchDropdown.cjs.map +0 -1
  245. package/dist/components/MarkdownFlowEditor/components/VariableSearchDropdown.d.ts +0 -18
  246. package/dist/components/MarkdownFlowEditor/components/VariableSearchDropdown.es.js +0 -184
  247. package/dist/components/MarkdownFlowEditor/components/VariableSearchDropdown.es.js.map +0 -1
  248. package/dist/components/MarkdownFlowEditor/components/VariableSelect.cjs +0 -2
  249. package/dist/components/MarkdownFlowEditor/components/VariableSelect.cjs.map +0 -1
  250. package/dist/components/MarkdownFlowEditor/components/VariableSelect.d.ts +0 -11
  251. package/dist/components/MarkdownFlowEditor/components/VariableSelect.es.js +0 -172
  252. package/dist/components/MarkdownFlowEditor/components/VariableSelect.es.js.map +0 -1
  253. package/dist/components/MarkdownFlowEditor/components/icons/SearchBracesIcon.cjs +0 -2
  254. package/dist/components/MarkdownFlowEditor/components/icons/SearchBracesIcon.cjs.map +0 -1
  255. package/dist/components/MarkdownFlowEditor/components/icons/SearchBracesIcon.d.ts +0 -3
  256. package/dist/components/MarkdownFlowEditor/components/icons/SearchBracesIcon.es.js +0 -32
  257. package/dist/components/MarkdownFlowEditor/components/icons/SearchBracesIcon.es.js.map +0 -1
  258. package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.cjs +0 -3
  259. package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.cjs.map +0 -1
  260. package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.d.ts +0 -9
  261. package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.es.js +0 -53
  262. package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.es.js.map +0 -1
  263. package/dist/components/ui/popover.cjs +0 -2
  264. package/dist/components/ui/popover.cjs.map +0 -1
  265. package/dist/components/ui/popover.es.js +0 -24
  266. package/dist/components/ui/popover.es.js.map +0 -1
  267. package/dist/node_modules/@radix-ui/react-popover/dist/index.cjs +0 -2
  268. package/dist/node_modules/@radix-ui/react-popover/dist/index.cjs.map +0 -1
  269. package/dist/node_modules/@radix-ui/react-popover/dist/index.es.js +0 -241
  270. package/dist/node_modules/@radix-ui/react-popover/dist/index.es.js.map +0 -1
  271. package/dist/node_modules/lucide-react/dist/esm/icons/braces.cjs +0 -7
  272. package/dist/node_modules/lucide-react/dist/esm/icons/braces.cjs.map +0 -1
  273. package/dist/node_modules/lucide-react/dist/esm/icons/braces.es.js +0 -25
  274. package/dist/node_modules/lucide-react/dist/esm/icons/braces.es.js.map +0 -1
  275. package/dist/node_modules/lucide-react/dist/esm/icons/plus.cjs +0 -7
  276. package/dist/node_modules/lucide-react/dist/esm/icons/plus.cjs.map +0 -1
  277. package/dist/node_modules/lucide-react/dist/esm/icons/plus.es.js +0 -16
  278. package/dist/node_modules/lucide-react/dist/esm/icons/plus.es.js.map +0 -1
  279. package/dist/node_modules/lucide-react/dist/esm/icons/search.cjs +0 -7
  280. package/dist/node_modules/lucide-react/dist/esm/icons/search.cjs.map +0 -1
  281. package/dist/node_modules/lucide-react/dist/esm/icons/search.es.js +0 -16
  282. package/dist/node_modules/lucide-react/dist/esm/icons/search.es.js.map +0 -1
  283. /package/dist/components/MarkdownFlowEditor/plugins/{VariablePlaceholder.test.d.ts → MediaPlaceholder.variables.test.d.ts} +0 -0
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react"),g=require("../../../../../react-compose-refs/dist/index.cjs"),p=require("react/jsx-runtime");function m(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const l=m(y);function S(e){const t=b(e),n=l.forwardRef((r,o)=>{const{children:i,...c}=r,s=l.Children.toArray(i),a=s.find(E);if(a){const u=a.props.children,d=s.map(f=>f===a?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...c,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,d):null})}return p.jsx(t,{...c,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function b(e){const t=l.forwardRef((n,r)=>{const{children:o,...i}=n;if(l.isValidElement(o)){const c=R(o),s=O(i,o.props);return o.type!==l.Fragment&&(s.ref=r?g.composeRefs(r,c):c),l.cloneElement(o,s)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var j=Symbol("radix.slottable");function E(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===j}function O(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const a=i(...s);return o(...s),a}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function R(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}exports.createSlot=S;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../../../../../../node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","childrenRef","getElementRef","props2","mergeProps","composeRefs","SLOTTABLE_IDENTIFIER","childProps","overrideProps","propName","slotPropValue","childPropValue","args","result","element","getter","mayWarn"],"mappings":"geAKA,SAASA,EAAWC,EAAW,CAC7B,MAAMC,EAA4BC,EAAgBF,CAAS,EACrDG,EAAQC,EAAM,WAAW,CAACC,EAAOC,IAAiB,CACtD,KAAM,CAAE,SAAAC,EAAU,GAAGC,CAAS,EAAKH,EAC7BI,EAAgBL,EAAM,SAAS,QAAQG,CAAQ,EAC/CG,EAAYD,EAAc,KAAKE,CAAW,EAChD,GAAID,EAAW,CACb,MAAME,EAAaF,EAAU,MAAM,SAC7BG,EAAcJ,EAAc,IAAKK,GACjCA,IAAUJ,EACRN,EAAM,SAAS,MAAMQ,CAAU,EAAI,EAAUR,EAAM,SAAS,KAAK,IAAI,EAClEA,EAAM,eAAeQ,CAAU,EAAIA,EAAW,MAAM,SAAW,KAE/DE,CAEV,EACD,OAAuBC,EAAAA,IAAId,EAAW,CAAE,GAAGO,EAAW,IAAK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C,OAAAF,EAAc,GAAGE,CAAI,EACdC,CACT,EACSH,IACTF,EAAcC,CAAQ,EAAIC,GAEnBD,IAAa,QACtBD,EAAcC,CAAQ,EAAI,CAAE,GAAGC,EAAe,GAAGC,CAAc,EACtDF,IAAa,cACtBD,EAAcC,CAAQ,EAAI,CAACC,EAAeC,CAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAEtF,CACA,MAAO,CAAE,GAAGlB,EAAW,GAAGe,CAAa,CACzC,CACA,SAASN,EAAcY,EAAS,CAC9B,IAAIC,EAAS,OAAO,yBAAyBD,EAAQ,MAAO,KAAK,GAAG,IAChEE,EAAUD,GAAU,mBAAoBA,GAAUA,EAAO,eAC7D,OAAIC,EACKF,EAAQ,KAEjBC,EAAS,OAAO,yBAAyBD,EAAS,KAAK,GAAG,IAC1DE,EAAUD,GAAU,mBAAoBA,GAAUA,EAAO,eACrDC,EACKF,EAAQ,MAAM,IAEhBA,EAAQ,MAAM,KAAOA,EAAQ,IACtC","x_google_ignoreList":[0]}
@@ -0,0 +1,50 @@
1
+ import * as l from "react";
2
+ import { composeRefs as m } from "../../../../../react-compose-refs/dist/index.es.js";
3
+ import { jsx as u } from "react/jsx-runtime";
4
+ // @__NO_SIDE_EFFECTS__
5
+ function b(e) {
6
+ const r = /* @__PURE__ */ y(e), t = l.forwardRef((o, n) => {
7
+ const { children: i, ...c } = o, s = l.Children.toArray(i), a = s.find(E);
8
+ if (a) {
9
+ const f = a.props.children, d = s.map((p) => p === a ? l.Children.count(f) > 1 ? l.Children.only(null) : l.isValidElement(f) ? f.props.children : null : p);
10
+ return /* @__PURE__ */ u(r, { ...c, ref: n, children: l.isValidElement(f) ? l.cloneElement(f, void 0, d) : null });
11
+ }
12
+ return /* @__PURE__ */ u(r, { ...c, ref: n, children: i });
13
+ });
14
+ return t.displayName = `${e}.Slot`, t;
15
+ }
16
+ // @__NO_SIDE_EFFECTS__
17
+ function y(e) {
18
+ const r = l.forwardRef((t, o) => {
19
+ const { children: n, ...i } = t;
20
+ if (l.isValidElement(n)) {
21
+ const c = S(n), s = C(i, n.props);
22
+ return n.type !== l.Fragment && (s.ref = o ? m(o, c) : c), l.cloneElement(n, s);
23
+ }
24
+ return l.Children.count(n) > 1 ? l.Children.only(null) : null;
25
+ });
26
+ return r.displayName = `${e}.SlotClone`, r;
27
+ }
28
+ var g = Symbol("radix.slottable");
29
+ function E(e) {
30
+ return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === g;
31
+ }
32
+ function C(e, r) {
33
+ const t = { ...r };
34
+ for (const o in r) {
35
+ const n = e[o], i = r[o];
36
+ /^on[A-Z]/.test(o) ? n && i ? t[o] = (...s) => {
37
+ const a = i(...s);
38
+ return n(...s), a;
39
+ } : n && (t[o] = n) : o === "style" ? t[o] = { ...n, ...i } : o === "className" && (t[o] = [n, i].filter(Boolean).join(" "));
40
+ }
41
+ return { ...e, ...t };
42
+ }
43
+ function S(e) {
44
+ let r = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, t = r && "isReactWarning" in r && r.isReactWarning;
45
+ return t ? e.ref : (r = Object.getOwnPropertyDescriptor(e, "ref")?.get, t = r && "isReactWarning" in r && r.isReactWarning, t ? e.props.ref : e.props.ref || e.ref);
46
+ }
47
+ export {
48
+ b as createSlot
49
+ };
50
+ //# sourceMappingURL=index.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es.js","sources":["../../../../../../../../node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","childrenRef","getElementRef","props2","mergeProps","composeRefs","SLOTTABLE_IDENTIFIER","childProps","overrideProps","propName","slotPropValue","childPropValue","args","result","element","getter","mayWarn"],"mappings":";;;;AAKA,SAASA,EAAWC,GAAW;AAC7B,QAAMC,IAA4B,gBAAAC,EAAgBF,CAAS,GACrDG,IAAQC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACtD,UAAM,EAAE,UAAAC,GAAU,GAAGC,EAAS,IAAKH,GAC7BI,IAAgBL,EAAM,SAAS,QAAQG,CAAQ,GAC/CG,IAAYD,EAAc,KAAKE,CAAW;AAChD,QAAID,GAAW;AACb,YAAME,IAAaF,EAAU,MAAM,UAC7BG,IAAcJ,EAAc,IAAI,CAACK,MACjCA,MAAUJ,IACRN,EAA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AYF,GAAY;AACjC,UAAMG,IAAgBjB,EAAUgB,CAAQ,GAClCE,IAAiBJ,EAAWE,CAAQ;AAE1C,IADkB,WAAW,KAAKA,CAAQ,IAEpCC,KAAiBC,IACnBH,EAAcC,CAAQ,IAAI,IAAIG,MAAS;AACrC,YAAMC,IAASF,EAAe,GAAGC,CAAI;AACrC,aAAAF,EAAc,GAAGE,CAAI,GACdC;AAAA,IACT,IACSH,MACTF,EAAcC,CAAQ,IAAIC,KAEnBD,MAAa,UACtBD,EAAcC,CAAQ,IAAI,EAAE,GAAGC,GAAe,GAAGC,EAAc,IACtDF,MAAa,gBACtBD,EAAcC,CAAQ,IAAI,CAACC,GAAeC,CAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,EAEtF;AACA,SAAO,EAAE,GAAGlB,GAAW,GAAGe,EAAa;AACzC;AACA,SAASN,EAAcY,GAAS;AAC9B,MAAIC,IAAS,OAAO,yBAAyBD,EAAQ,OAAO,KAAK,GAAG,KAChEE,IAAUD,KAAU,oBAAoBA,KAAUA,EAAO;AAC7D,SAAIC,IACKF,EAAQ,OAEjBC,IAAS,OAAO,yBAAyBD,GAAS,KAAK,GAAG,KAC1DE,IAAUD,KAAU,oBAAoBA,KAAUA,EAAO,gBACrDC,IACKF,EAAQ,MAAM,MAEhBA,EAAQ,MAAM,OAAOA,EAAQ;AACtC;","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react"),b=require("../../react-compose-refs/dist/index.cjs"),f=require("react/jsx-runtime");function j(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const l=j(g);function d(e){const t=R(e),r=l.forwardRef((n,o)=>{const{children:i,...c}=n,s=l.Children.toArray(i),a=s.find(O);if(a){const u=a.props.children,m=s.map(p=>p===a?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:p);return f.jsx(t,{...c,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,m):null})}return f.jsx(t,{...c,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}var y=d("Slot");function R(e){const t=l.forwardRef((r,n)=>{const{children:o,...i}=r;if(l.isValidElement(o)){const c=_(o),s=C(i,o.props);return o.type!==l.Fragment&&(s.ref=n?b.composeRefs(n,c):c),l.cloneElement(o,s)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var S=Symbol("radix.slottable");function E(e){const t=({children:r})=>f.jsx(f.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=S,t}function O(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===S}function C(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{const a=i(...s);return o(...s),a}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function _(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}exports.Root=y;exports.Slot=y;exports.createSlot=d;exports.createSlottable=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),A=require("../node_modules/@radix-ui/react-compose-refs/dist/index.cjs");function C(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const l=C(x);var D=Object.defineProperty,a=(e,t)=>D(e,"name",{value:t,configurable:!0});function y(e){const t=l.forwardRef((r,o)=>{let{children:n,...c}=r,i=null,s=!1;const f=[];S(n)&&typeof u=="function"&&(n=u(n._payload)),l.Children.forEach(n,b=>{if(P(b)){s=!0;const d=b;let p="child"in d.props?d.props.child:d.props.children;S(p)&&typeof u=="function"&&(p=u(p._payload)),i=L(d,p),f.push(i?.props?.children)}else f.push(b)}),i?i=l.cloneElement(i,void 0,f):!s&&l.Children.count(n)===1&&l.isValidElement(n)&&(i=n);const m=i?R(i):void 0,$=A.useComposedRefs(o,m);if(!i){if(n||n===0)throw new Error(s?V(e):I(e));return n}const g=v(c,i.props??{});return i.type!==l.Fragment&&(g.ref=o?$:m),l.cloneElement(i,g)});return t.displayName=`${e}.Slot`,t}a(y,"createSlot");var E=y("Slot"),h=Symbol.for("radix.slottable");function _(e){const t=a(r=>"child"in r?r.children(r.child):r.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=h,t}a(_,"createSlottable");var L=a((e,t)=>{if("child"in e.props){const r=e.props.child;return l.isValidElement(r)?l.cloneElement(r,void 0,e.props.children(r.props.children)):null}return l.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function v(e,t){const r={...t};for(const o in t){const n=e[o],c=t[o];/^on[A-Z]/.test(o)?n&&c?r[o]=(...s)=>{const f=c(...s);return n(...s),f}:n&&(r[o]=n):o==="style"?r[o]={...n,...c}:o==="className"?r[o]=[n,c].filter(Boolean).join(" "):o==="aria-describedby"&&(r[o]=O(c,n))}return{...e,...r}}a(v,"mergeProps");function R(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}a(R,"getElementRef");function P(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===h}a(P,"isSlottable");var T=Symbol.for("react.lazy");function S(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===T&&"_payload"in e&&j(e._payload)}a(S,"isLazyComponent");function j(e){return typeof e=="object"&&e!==null&&"then"in e}a(j,"isPromiseLike");function O(...e){const t=new Set;for(const r of e)if(typeof r=="string")for(const o of String(r).trim().split(/\s+/))o&&t.add(o);return t.size>0?Array.from(t).join(" "):void 0}a(O,"concatAriaDescribedby");var I=a(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),V=a(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),u=l[" use ".trim().toString()];exports.Root=E;exports.Slot=E;exports.createSlot=y;exports.createSlottable=_;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../../node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","Slot","childrenRef","getElementRef","props2","mergeProps","composeRefs","SLOTTABLE_IDENTIFIER","createSlottable","Slottable2","Fragment2","childProps","overrideProps","propName","slotPropValue","childPropValue","args","result","element","getter","mayWarn"],"mappings":"udAKA,SAASA,EAAWC,EAAW,CAC7B,MAAMC,EAA4BC,EAAgBF,CAAS,EACrDG,EAAQC,EAAM,WAAW,CAACC,EAAOC,IAAiB,CACtD,KAAM,CAAE,SAAAC,EAAU,GAAGC,CAAS,EAAKH,EAC7BI,EAAgBL,EAAM,SAAS,QAAQG,CAAQ,EAC/CG,EAAYD,EAAc,KAAKE,CAAW,EAChD,GAAID,EAAW,CACb,MAAME,EAAaF,EAAU,MAAM,SAC7BG,EAAcJ,EAAc,IAAKK,GACjCA,IAAUJ,EACRN,EAAM,SAAS,MAAMQ,CAAU,EAAI,EAAUR,EAAM,SAAS,KAAK,IAAI,EAClEA,EAAM,eAAeQ,CAAU,EAAIA,EAAW,MAAM,SAAW,KAE/DE,CAEV,EACD,OAAuBC,EAAAA,IAAId,EAAW,CAAE,GAAGO,EAAW,IAAKF,EAAc,SAAUF,EAAM,eAAeQ,CAAU,EAAIR,EAAM,aAAaQ,EAAY,OAAQC,CAAW,EAAI,KAAM,CACpL,CACA,OAAuBE,EAAAA,IAAId,EAAW,CAAE,GAAGO,EAA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EACnBH,EAAcC,CAAQ,EAAI,IAAIG,IAAS,CACrC,MAAMC,EAASF,EAAe,GAAGC,CAAI,EACrC,OAAAF,EAAc,GAAGE,CAAI,EACdC,CACT,EACSH,IACTF,EAAcC,CAAQ,EAAIC,GAEnBD,IAAa,QACtBD,EAAcC,CAAQ,EAAI,CAAE,GAAGC,EAAe,GAAGC,CAAc,EACtDF,IAAa,cACtBD,EAAcC,CAAQ,EAAI,CAACC,EAAeC,CAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAEtF,CACA,MAAO,CAAE,GAAGtB,EAAW,GAAGmB,CAAa,CACzC,CACA,SAAST,EAAce,EAAS,CAC9B,IAAIC,EAAS,OAAO,yBAAyBD,EAAQ,MAAO,KAAK,GAAG,IAChEE,EAAUD,GAAU,mBAAoBA,GAAUA,EAAO,eAC7D,OAAIC,EACKF,EAAQ,KAEjBC,EAAS,OAAO,yBAAyBD,EAAS,KAAK,GAAG,IAC1DE,EAAUD,GAAU,mBAAoBA,GAAUA,EAAO,eACrDC,EACKF,EAAQ,MAAM,IAEhBA,EAAQ,MAAM,KAAOA,EAAQ,IACtC","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../../node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/slot.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n let slottableElement = null;\n let hasSlottable = false;\n const newChildren = [];\n if (isLazyComponent(children) && typeof use === \"function\") {\n children = use(children._payload);\n }\n React.Children.forEach(children, (maybeSlottable) => {\n if (isSlottable(maybeSlottable)) {\n hasSlottable = true;\n const slottable = maybeSlottable;\n let child = \"child\" in slottable.props ? slottable.props.child : slottable.props.children;\n if (isLazyComponent(child) && typeof use === \"function\") {\n child = use(child._payload);\n }\n slottableElement = getSlottableElementFromSlottable(slottable, child);\n newChildren.push(slottableElement?.props?.children);\n } else {\n newChildren.push(maybeSlottable);\n }\n });\n if (slottableElement) {\n slottableElement = React.cloneElement(slottableElement, void 0, newChildren);\n } else if (\n // A `Slottable` was found but it didn't resolve to a single element (e.g.\n // it wrapped multiple elements, text, or a render-prop `child` that\n // wasn't an element). Don't fall back to treating the `Slottable` wrapper\n // itself as the slot target — throw a descriptive error below instead.\n !hasSlottable && React.Children.count(children) === 1 && React.isValidElement(children)\n ) {\n slottableElement = children;\n }\n const slottableElementRef = slottableElement ? getElementRef(slottableElement) : void 0;\n const composedRef = useComposedRefs(forwardedRef, slottableElementRef);\n if (!slottableElement) {\n if (children || children === 0) {\n throw new Error(\n hasSlottable ? createSlottableError(ownerName) : createSlotError(ownerName)\n );\n }\n return children;\n }\n const mergedProps = mergeProps(slotProps, slottableElement.props ?? {});\n if (slottableElement.type !== React.Fragment) {\n mergedProps.ref = forwardedRef ? composedRef : slottableElementRef;\n }\n return React.cloneElement(slottableElement, mergedProps);\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\n__name(createSlot, \"createSlot\");\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\nvar SLOTTABLE_IDENTIFIER = Symbol.for(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = /* @__PURE__ */ __name((props) => \"child\" in props ? props.children(props.child) : props.children, \"Slottable\");\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\n__name(createSlottable, \"createSlottable\");\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nvar getSlottableElementFromSlottable = /* @__PURE__ */ __name((slottable, child) => {\n if (\"child\" in slottable.props) {\n const child2 = slottable.props.child;\n if (!React.isValidElement(child2)) return null;\n return React.cloneElement(child2, void 0, slottable.props.children(child2.props.children));\n }\n return React.isValidElement(child) ? child : null;\n}, \"getSlottableElementFromSlottable\");\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n } else if (propName === \"aria-describedby\") {\n overrideProps[propName] = concatAriaDescribedby(childPropValue, slotPropValue);\n }\n }\n return { ...slotProps, ...overrideProps };\n}\n__name(mergeProps, \"mergeProps\");\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\n__name(getElementRef, \"getElementRef\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\n__name(isSlottable, \"isSlottable\");\nvar REACT_LAZY_TYPE = Symbol.for(\"react.lazy\");\nfunction isLazyComponent(element) {\n return element != null && typeof element === \"object\" && \"$$typeof\" in element && element.$$typeof === REACT_LAZY_TYPE && \"_payload\" in element && isPromiseLike(element._payload);\n}\n__name(isLazyComponent, \"isLazyComponent\");\nfunction isPromiseLike(value) {\n return typeof value === \"object\" && value !== null && \"then\" in value;\n}\n__name(isPromiseLike, \"isPromiseLike\");\nfunction concatAriaDescribedby(...values) {\n const ids = /* @__PURE__ */ new Set();\n for (const value of values) {\n if (typeof value !== \"string\") continue;\n for (const id of String(value).trim().split(/\\s+/)) {\n if (id) ids.add(id);\n }\n }\n return ids.size > 0 ? Array.from(ids).join(\" \") : void 0;\n}\n__name(concatAriaDescribedby, \"concatAriaDescribedby\");\nvar createSlotError = /* @__PURE__ */ __name((ownerName) => {\n return `${ownerName} failed to slot onto its children. Expected a single React element child or \\`Slottable\\`.`;\n}, \"createSlotError\");\nvar createSlottableError = /* @__PURE__ */ __name((ownerName) => {\n return `${ownerName} failed to slot onto its \\`Slottable\\`. Expected \\`Slottable\\` to receive a single React element child.`;\n}, \"createSlottableError\");\nvar use = React[\" use \".trim().toString()];\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["__defProp","__name","target","value","createSlot","ownerName","Slot2","React","props","forwardedRef","children","slotProps","slottableElement","hasSlottable","newChildren","isLazyComponent","use","maybeSlottable","isSlottable","slottable","child","getSlottableElementFromSlottable","slottableElementRef","getElementRef","composedRef","useComposedRefs","createSlottableError","createSlotError","mergedProps","mergeProps","Slot","SLOTTABLE_IDENTIFIER","createSlottable","Slottable2","child2","childProps","overrideProps","propName","slotPropValue","childPropValue","args","result","concatAriaDescribedby","element","getter","mayWarn","REACT_LAZY_TYPE","isPromiseLike","values","ids","id"],"mappings":"4cAAA,IAAIA,EAAY,OAAO,eACnBC,EAAS,CAACC,EAAQC,IAAUH,EAAUE,EAAQ,OAAQ,CAAE,MAAAC,EAAO,aAAc,GAAM,EAMvF,SAASC,EAAWC,EAAW,CAC7B,MAAMC,EAAQC,EAAM,WAAW,CAACC,EAAOC,IAAiB,CACtD,GAAI,CAAE,SAAAC,EAAU,GAAGC,CAAS,EAAKH,EAC7BI,EAAmB,KACnBC,EAAe,GACnB,MAAMC,EAA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GAC1C,GAAGA,CAAS,0GAClB,sBAAsB,EACrBW,EAAMT,EAAM,QAAQ,KAAI,EAAG,SAAQ,CAAE","x_google_ignoreList":[0]}
@@ -1,59 +1,98 @@
1
1
  import * as l from "react";
2
- import { composeRefs as y } from "../../react-compose-refs/dist/index.es.js";
3
- import { jsx as p, Fragment as S } from "react/jsx-runtime";
4
- // @__NO_SIDE_EFFECTS__
5
- function g(e) {
6
- const t = /* @__PURE__ */ E(e), r = l.forwardRef((o, n) => {
7
- const { children: i, ...a } = o, s = l.Children.toArray(i), c = s.find(C);
8
- if (c) {
9
- const f = c.props.children, m = s.map((u) => u === c ? l.Children.count(f) > 1 ? l.Children.only(null) : l.isValidElement(f) ? f.props.children : null : u);
10
- return /* @__PURE__ */ p(t, { ...a, ref: n, children: l.isValidElement(f) ? l.cloneElement(f, void 0, m) : null });
11
- }
12
- return /* @__PURE__ */ p(t, { ...a, ref: n, children: i });
13
- });
14
- return r.displayName = `${e}.Slot`, r;
15
- }
16
- var x = /* @__PURE__ */ g("Slot");
2
+ import { useComposedRefs as j } from "../node_modules/@radix-ui/react-compose-refs/dist/index.es.js";
3
+ var x = Object.defineProperty, a = (e, t) => x(e, "name", { value: t, configurable: !0 });
17
4
  // @__NO_SIDE_EFFECTS__
18
5
  function E(e) {
19
- const t = l.forwardRef((r, o) => {
20
- const { children: n, ...i } = r;
21
- if (l.isValidElement(n)) {
22
- const a = b(n), s = R(i, n.props);
23
- return n.type !== l.Fragment && (s.ref = o ? y(o, a) : a), l.cloneElement(n, s);
6
+ const t = l.forwardRef((r, n) => {
7
+ let { children: o, ...s } = r, i = null, c = !1;
8
+ const f = [];
9
+ b(o) && typeof u == "function" && (o = u(o._payload)), l.Children.forEach(o, (y) => {
10
+ if (R(y)) {
11
+ c = !0;
12
+ const p = y;
13
+ let d = "child" in p.props ? p.props.child : p.props.children;
14
+ b(d) && typeof u == "function" && (d = u(d._payload)), i = C(p, d), f.push(i?.props?.children);
15
+ } else
16
+ f.push(y);
17
+ }), i ? i = l.cloneElement(i, void 0, f) : (
18
+ // A `Slottable` was found but it didn't resolve to a single element (e.g.
19
+ // it wrapped multiple elements, text, or a render-prop `child` that
20
+ // wasn't an element). Don't fall back to treating the `Slottable` wrapper
21
+ // itself as the slot target — throw a descriptive error below instead.
22
+ !c && l.Children.count(o) === 1 && l.isValidElement(o) && (i = o)
23
+ );
24
+ const m = i ? _(i) : void 0, $ = j(n, m);
25
+ if (!i) {
26
+ if (o || o === 0)
27
+ throw new Error(
28
+ c ? O(e) : I(e)
29
+ );
30
+ return o;
24
31
  }
25
- return l.Children.count(n) > 1 ? l.Children.only(null) : null;
32
+ const S = h(s, i.props ?? {});
33
+ return i.type !== l.Fragment && (S.ref = n ? $ : m), l.cloneElement(i, S);
26
34
  });
27
- return t.displayName = `${e}.SlotClone`, t;
35
+ return t.displayName = `${e}.Slot`, t;
28
36
  }
29
- var d = Symbol("radix.slottable");
37
+ a(E, "createSlot");
38
+ var D = /* @__PURE__ */ E("Slot"), g = Symbol.for("radix.slottable");
30
39
  // @__NO_SIDE_EFFECTS__
31
- function I(e) {
32
- const t = ({ children: r }) => /* @__PURE__ */ p(S, { children: r });
33
- return t.displayName = `${e}.Slottable`, t.__radixId = d, t;
34
- }
35
- function C(e) {
36
- return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === d;
40
+ function A(e) {
41
+ const t = /* @__PURE__ */ a((r) => "child" in r ? r.children(r.child) : r.children, "Slottable");
42
+ return t.displayName = `${e}.Slottable`, t.__radixId = g, t;
37
43
  }
38
- function R(e, t) {
44
+ a(A, "createSlottable");
45
+ var C = /* @__PURE__ */ a((e, t) => {
46
+ if ("child" in e.props) {
47
+ const r = e.props.child;
48
+ return l.isValidElement(r) ? l.cloneElement(r, void 0, e.props.children(r.props.children)) : null;
49
+ }
50
+ return l.isValidElement(t) ? t : null;
51
+ }, "getSlottableElementFromSlottable");
52
+ function h(e, t) {
39
53
  const r = { ...t };
40
- for (const o in t) {
41
- const n = e[o], i = t[o];
42
- /^on[A-Z]/.test(o) ? n && i ? r[o] = (...s) => {
43
- const c = i(...s);
44
- return n(...s), c;
45
- } : n && (r[o] = n) : o === "style" ? r[o] = { ...n, ...i } : o === "className" && (r[o] = [n, i].filter(Boolean).join(" "));
54
+ for (const n in t) {
55
+ const o = e[n], s = t[n];
56
+ /^on[A-Z]/.test(n) ? o && s ? r[n] = (...c) => {
57
+ const f = s(...c);
58
+ return o(...c), f;
59
+ } : o && (r[n] = o) : n === "style" ? r[n] = { ...o, ...s } : n === "className" ? r[n] = [o, s].filter(Boolean).join(" ") : n === "aria-describedby" && (r[n] = P(s, o));
46
60
  }
47
61
  return { ...e, ...r };
48
62
  }
49
- function b(e) {
63
+ a(h, "mergeProps");
64
+ function _(e) {
50
65
  let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning;
51
66
  return r ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
52
67
  }
68
+ a(_, "getElementRef");
69
+ function R(e) {
70
+ return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === g;
71
+ }
72
+ a(R, "isSlottable");
73
+ var L = Symbol.for("react.lazy");
74
+ function b(e) {
75
+ return e != null && typeof e == "object" && "$$typeof" in e && e.$$typeof === L && "_payload" in e && v(e._payload);
76
+ }
77
+ a(b, "isLazyComponent");
78
+ function v(e) {
79
+ return typeof e == "object" && e !== null && "then" in e;
80
+ }
81
+ a(v, "isPromiseLike");
82
+ function P(...e) {
83
+ const t = /* @__PURE__ */ new Set();
84
+ for (const r of e)
85
+ if (typeof r == "string")
86
+ for (const n of String(r).trim().split(/\s+/))
87
+ n && t.add(n);
88
+ return t.size > 0 ? Array.from(t).join(" ") : void 0;
89
+ }
90
+ a(P, "concatAriaDescribedby");
91
+ var I = /* @__PURE__ */ a((e) => `${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`, "createSlotError"), O = /* @__PURE__ */ a((e) => `${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`, "createSlottableError"), u = l[" use ".trim().toString()];
53
92
  export {
54
- x as Root,
55
- x as Slot,
56
- g as createSlot,
57
- I as createSlottable
93
+ D as Root,
94
+ D as Slot,
95
+ E as createSlot,
96
+ A as createSlottable
58
97
  };
59
98
  //# sourceMappingURL=index.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../../../../../node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","Slot","childrenRef","getElementRef","props2","mergeProps","composeRefs","SLOTTABLE_IDENTIFIER","createSlottable","Slottable2","Fragment2","childProps","overrideProps","propName","slotPropValue","childPropValue","args","result","element","getter","mayWarn"],"mappings":";;;;AAKA,SAASA,EAAWC,GAAW;AAC7B,QAAMC,IAA4B,gBAAAC,EAAgBF,CAAS,GACrDG,IAAQC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACtD,UAAM,EAAE,UAAAC,GAAU,GAAGC,EAAS,IAAKH,GAC7BI,IAAgBL,EAAM,SAAS,QAAQG,CAAQ,GAC/CG,IAAYD,EAAc,KAAKE,CAAW;AAChD,QAAID,GAAW;AACb,YAAME,IAAaF,EAAU,MAAM,UAC7BG,IAAcJ,EAAc,IAAI,CAACK,MACjCA,MAAUJ,IACRN,EAAM,SAAS,MAAMQ,CAAU,IAAI,IAAUR,EAAM,SAAS,KAAK,IAAI,IAClEA,EAAM,eAAeQ,CAAU,IAAIA,EAAW,MAAM,WAAW,OAE/DE,CAEV;AACD,aAAuB,gBAAAC,EAAId,GAAW,EAAE,GAAGO,GAAW,KAAKF,GAAc,UAAUF,EAAM,eAAeQ,CAAU,IAAIR,EAAM,aAAaQ,GAAY,QAAQC,CAAW,IAAI,MAAM;AAAA,IACpL;AACA,WAAuB,gBAAAE,EAAId,GAAW,EAAE,GAAGO,GAAW,KAAKF,GAAc,UAAAC,GAAU;AAAA,EACrF,CAAC;AACD,SAAAJ,EAAM,cAAc,GAAGH,CAAS,SACzBG;AACT;AACG,IAACa,IAAuB,gBAAAjB,EAAW,MAAM;AAAA;AAE5C,SAASG,EAAgBF,GAAW;AAClC,QAAMC,IAAYG,EAAM,WAAW,CAACC,GAAO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UACtBD,EAAcC,CAAQ,IAAI,EAAE,GAAGC,GAAe,GAAGC,EAAc,IACtDF,MAAa,gBACtBD,EAAcC,CAAQ,IAAI,CAACC,GAAeC,CAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,EAEtF;AACA,SAAO,EAAE,GAAGtB,GAAW,GAAGmB,EAAa;AACzC;AACA,SAAST,EAAce,GAAS;AAC9B,MAAIC,IAAS,OAAO,yBAAyBD,EAAQ,OAAO,KAAK,GAAG,KAChEE,IAAUD,KAAU,oBAAoBA,KAAUA,EAAO;AAC7D,SAAIC,IACKF,EAAQ,OAEjBC,IAAS,OAAO,yBAAyBD,GAAS,KAAK,GAAG,KAC1DE,IAAUD,KAAU,oBAAoBA,KAAUA,EAAO,gBACrDC,IACKF,EAAQ,MAAM,MAEhBA,EAAQ,MAAM,OAAOA,EAAQ;AACtC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es.js","sources":["../../../../../node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/slot.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n let slottableElement = null;\n let hasSlottable = false;\n const newChildren = [];\n if (isLazyComponent(children) && typeof use === \"function\") {\n children = use(children._payload);\n }\n React.Children.forEach(children, (maybeSlottable) => {\n if (isSlottable(maybeSlottable)) {\n hasSlottable = true;\n const slottable = maybeSlottable;\n let child = \"child\" in slottable.props ? slottable.props.child : slottable.props.children;\n if (isLazyComponent(child) && typeof use === \"function\") {\n child = use(child._payload);\n }\n slottableElement = getSlottableElementFromSlottable(slottable, child);\n newChildren.push(slottableElement?.props?.children);\n } else {\n newChildren.push(maybeSlottable);\n }\n });\n if (slottableElement) {\n slottableElement = React.cloneElement(slottableElement, void 0, newChildren);\n } else if (\n // A `Slottable` was found but it didn't resolve to a single element (e.g.\n // it wrapped multiple elements, text, or a render-prop `child` that\n // wasn't an element). Don't fall back to treating the `Slottable` wrapper\n // itself as the slot target — throw a descriptive error below instead.\n !hasSlottable && React.Children.count(children) === 1 && React.isValidElement(children)\n ) {\n slottableElement = children;\n }\n const slottableElementRef = slottableElement ? getElementRef(slottableElement) : void 0;\n const composedRef = useComposedRefs(forwardedRef, slottableElementRef);\n if (!slottableElement) {\n if (children || children === 0) {\n throw new Error(\n hasSlottable ? createSlottableError(ownerName) : createSlotError(ownerName)\n );\n }\n return children;\n }\n const mergedProps = mergeProps(slotProps, slottableElement.props ?? {});\n if (slottableElement.type !== React.Fragment) {\n mergedProps.ref = forwardedRef ? composedRef : slottableElementRef;\n }\n return React.cloneElement(slottableElement, mergedProps);\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\n__name(createSlot, \"createSlot\");\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\nvar SLOTTABLE_IDENTIFIER = Symbol.for(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = /* @__PURE__ */ __name((props) => \"child\" in props ? props.children(props.child) : props.children, \"Slottable\");\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\n__name(createSlottable, \"createSlottable\");\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nvar getSlottableElementFromSlottable = /* @__PURE__ */ __name((slottable, child) => {\n if (\"child\" in slottable.props) {\n const child2 = slottable.props.child;\n if (!React.isValidElement(child2)) return null;\n return React.cloneElement(child2, void 0, slottable.props.children(child2.props.children));\n }\n return React.isValidElement(child) ? child : null;\n}, \"getSlottableElementFromSlottable\");\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n } else if (propName === \"aria-describedby\") {\n overrideProps[propName] = concatAriaDescribedby(childPropValue, slotPropValue);\n }\n }\n return { ...slotProps, ...overrideProps };\n}\n__name(mergeProps, \"mergeProps\");\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\n__name(getElementRef, \"getElementRef\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\n__name(isSlottable, \"isSlottable\");\nvar REACT_LAZY_TYPE = Symbol.for(\"react.lazy\");\nfunction isLazyComponent(element) {\n return element != null && typeof element === \"object\" && \"$$typeof\" in element && element.$$typeof === REACT_LAZY_TYPE && \"_payload\" in element && isPromiseLike(element._payload);\n}\n__name(isLazyComponent, \"isLazyComponent\");\nfunction isPromiseLike(value) {\n return typeof value === \"object\" && value !== null && \"then\" in value;\n}\n__name(isPromiseLike, \"isPromiseLike\");\nfunction concatAriaDescribedby(...values) {\n const ids = /* @__PURE__ */ new Set();\n for (const value of values) {\n if (typeof value !== \"string\") continue;\n for (const id of String(value).trim().split(/\\s+/)) {\n if (id) ids.add(id);\n }\n }\n return ids.size > 0 ? Array.from(ids).join(\" \") : void 0;\n}\n__name(concatAriaDescribedby, \"concatAriaDescribedby\");\nvar createSlotError = /* @__PURE__ */ __name((ownerName) => {\n return `${ownerName} failed to slot onto its children. Expected a single React element child or \\`Slottable\\`.`;\n}, \"createSlotError\");\nvar createSlottableError = /* @__PURE__ */ __name((ownerName) => {\n return `${ownerName} failed to slot onto its \\`Slottable\\`. Expected \\`Slottable\\` to receive a single React element child.`;\n}, \"createSlottableError\");\nvar use = React[\" use \".trim().toString()];\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["__defProp","__name","target","value","createSlot","ownerName","Slot2","React","props","forwardedRef","children","slotProps","slottableElement","hasSlottable","newChildren","isLazyComponent","use","maybeSlottable","isSlottable","slottable","child","getSlottableElementFromSlottable","slottableElementRef","getElementRef","composedRef","useComposedRefs","createSlottableError","createSlotError","mergedProps","mergeProps","Slot","SLOTTABLE_IDENTIFIER","createSlottable","Slottable2","child2","childProps","overrideProps","propName","slotPropValue","childPropValue","args","result","concatAriaDescribedby","element","getter","mayWarn","REACT_LAZY_TYPE","isPromiseLike","values","ids","id"],"mappings":";;AAAA,IAAIA,IAAY,OAAO,gBACnBC,IAAS,CAACC,GAAQC,MAAUH,EAAUE,GAAQ,QAAQ,EAAE,OAAAC,GAAO,cAAc,IAAM;AAAA;AAMvF,SAASC,EAAWC,GAAW;AAC7B,QAAMC,IAAQC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACtD,QAAI,EAAE,UAAAC,GAAU,GAAGC,EAAS,IAAKH,GAC7BI,IAAmB,MACnBC,IAAe;AACnB,UAAMC,IAAc,CAAA;AACpB,IAAIC,EAAgBL,CAAQ,KAAK,OAAOM,KAAQ,eAC9CN,IAAWM,EAAIN,EAAS,QAAQ,IAElCH,EAAM,SAAS,QAAQG,GAAU,CAACO,MAAmB;AACnD,UAAIC,E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BqB,IAAuC,gBAAAzB,EAAO,CAACI,MAC1C,GAAGA,CAAS,2GAClB,sBAAsB,GACrBW,IAAMT,EAAM,QAAQ,KAAI,EAAG,SAAQ,CAAE;","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react");function i(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const p=i(l);var m=Object.defineProperty,s=(e,t)=>m(e,"name",{value:t,configurable:!0});function r(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}s(r,"setRef");function f(...e){return t=>{let n=!1;const u=e.map(o=>{const c=r(o,t);return!n&&typeof c=="function"&&(n=!0),c});if(n)return()=>{for(let o=0;o<u.length;o++){const c=u[o];typeof c=="function"?c():r(e[o],null)}}}}s(f,"composeRefs");function a(...e){return p.useCallback(f(...e),e)}s(a,"useComposedRefs");exports.composeRefs=f;exports.useComposedRefs=a;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../../../../../../node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs/dist/index.mjs"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\n__name(setRef, \"setRef\");\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\n__name(composeRefs, \"composeRefs\");\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\n__name(useComposedRefs, \"useComposedRefs\");\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["__defProp","__name","target","value","setRef","ref","composeRefs","refs","node","hasCleanup","cleanups","cleanup","i","useComposedRefs","React"],"mappings":"mYAAA,IAAIA,EAAY,OAAO,eACnBC,EAAS,CAACC,EAAQC,IAAUH,EAAUE,EAAQ,OAAQ,CAAE,MAAAC,EAAO,aAAc,GAAM,EAIvF,SAASC,EAAOC,EAAKF,EAAO,CAC1B,GAAI,OAAOE,GAAQ,WACjB,OAAOA,EAAIF,CAAK,EACPE,GAAQ,OACjBA,EAAI,QAAUF,EAElB,CACAF,EAAOG,EAAQ,QAAQ,EACvB,SAASE,KAAeC,EAAM,CAC5B,OAAQC,GAAS,CACf,IAAIC,EAAa,GACjB,MAAMC,EAAWH,EAAK,IAAKF,GAAQ,CACjC,MAAMM,EAAUP,EAAOC,EAAKG,CAAI,EAChC,MAAI,CAACC,GAAc,OAAOE,GAAW,aACnCF,EAAa,IAERE,CACT,CAAC,EACD,GAAIF,EACF,MAAO,IAAM,CACX,QAASG,EAAI,EAAGA,EAAIF,EAAS,OAAQE,IAAK,CACxC,MAAMD,EAAUD,EAASE,CAAC,EACtB,OAAOD,GAAW,WACpBA,EAAO,EAEPP,EAAOG,EAAKK,CAAC,EAAG,IAAI,CAExB,CACF,CAEJ,CACF,CACAX,EAAOK,EAAa,aAAa,EACjC,SAASO,KAAmBN,EAAM,CAChC,OAAOO,EAAM,YAAYR,EAAY,GAAGC,CAAI,EAAGA,CAAI,CACrD,CACAN,EAAOY,EAAiB,iBAAiB","x_google_ignoreList":[0]}
@@ -0,0 +1,34 @@
1
+ import * as i from "react";
2
+ var l = Object.defineProperty, s = (e, n) => l(e, "name", { value: n, configurable: !0 });
3
+ function f(e, n) {
4
+ if (typeof e == "function")
5
+ return e(n);
6
+ e != null && (e.current = n);
7
+ }
8
+ s(f, "setRef");
9
+ function r(...e) {
10
+ return (n) => {
11
+ let u = !1;
12
+ const c = e.map((t) => {
13
+ const o = f(t, n);
14
+ return !u && typeof o == "function" && (u = !0), o;
15
+ });
16
+ if (u)
17
+ return () => {
18
+ for (let t = 0; t < c.length; t++) {
19
+ const o = c[t];
20
+ typeof o == "function" ? o() : f(e[t], null);
21
+ }
22
+ };
23
+ };
24
+ }
25
+ s(r, "composeRefs");
26
+ function p(...e) {
27
+ return i.useCallback(r(...e), e);
28
+ }
29
+ s(p, "useComposedRefs");
30
+ export {
31
+ r as composeRefs,
32
+ p as useComposedRefs
33
+ };
34
+ //# sourceMappingURL=index.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es.js","sources":["../../../../../../../../node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs/dist/index.mjs"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\n__name(setRef, \"setRef\");\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\n__name(composeRefs, \"composeRefs\");\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\n__name(useComposedRefs, \"useComposedRefs\");\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["__defProp","__name","target","value","setRef","ref","composeRefs","refs","node","hasCleanup","cleanups","cleanup","i","useComposedRefs","React"],"mappings":";AAAA,IAAIA,IAAY,OAAO,gBACnBC,IAAS,CAACC,GAAQC,MAAUH,EAAUE,GAAQ,QAAQ,EAAE,OAAAC,GAAO,cAAc,IAAM;AAIvF,SAASC,EAAOC,GAAKF,GAAO;AAC1B,MAAI,OAAOE,KAAQ;AACjB,WAAOA,EAAIF,CAAK;AACX,EAAIE,KAAQ,SACjBA,EAAI,UAAUF;AAElB;AACAF,EAAOG,GAAQ,QAAQ;AACvB,SAASE,KAAeC,GAAM;AAC5B,SAAO,CAACC,MAAS;AACf,QAAIC,IAAa;AACjB,UAAMC,IAAWH,EAAK,IAAI,CAACF,MAAQ;AACjC,YAAMM,IAAUP,EAAOC,GAAKG,CAAI;AAChC,aAAI,CAACC,KAAc,OAAOE,KAAW,eACnCF,IAAa,KAERE;AAAA,IACT,CAAC;AACD,QAAIF;AACF,aAAO,MAAM;AACX,iBAASG,IAAI,GAAGA,IAAIF,EAAS,QAAQE,KAAK;AACxC,gBAAMD,IAAUD,EAASE,CAAC;AAC1B,UAAI,OAAOD,KAAW,aACpBA,EAAO,IAEPP,EAAOG,EAAKK,CAAC,GAAG,IAAI;AAAA,QAExB;AAAA,MACF;AAAA,EAEJ;AACF;AACAX,EAAOK,GAAa,aAAa;AACjC,SAASO,KAAmBN,GAAM;AAChC,SAAOO,EAAM,YAAYR,EAAY,GAAGC,CAAI,GAAGA,CAAI;AACrD;AACAN,EAAOY,GAAiB,iBAAiB;","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("react"),m=require("../../primitive/dist/index.cjs"),B=require("../../react-compose-refs/dist/index.cjs"),K=require("../../react-context/dist/index.cjs"),W=require("../../react-dismissable-layer/dist/index.cjs"),J=require("../../react-id/dist/index.cjs"),P=require("../../react-popper/dist/index.cjs"),Q=require("../../react-portal/dist/index.cjs"),U=require("../../react-presence/dist/index.cjs"),Z=require("../../react-primitive/dist/index.cjs"),ee=require("../../react-slot/dist/index.cjs"),te=require("../../react-use-controllable-state/dist/index.cjs"),oe=require("../../react-visually-hidden/dist/index.cjs"),p=require("react/jsx-runtime");function re(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(o,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return o.default=t,Object.freeze(o)}const s=re(z);var[j,ne]=K.createContextScope("Tooltip",[P.createPopperScope]),D=P.createPopperScope(),V="TooltipProvider",se=700,A="tooltip.open",[ie,k]=j(V),S=t=>{const{__scopeTooltip:o,delayDuration:e=se,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:a}=t,c=s.useRef(!0),v=s.useRef(!1),i=s.useRef(0);return s.useEffect(()=>{const d=i.current;return()=>window.clearTimeout(d)},[]),p.jsx(ie,{scope:o,isOpenDelayedRef:c,delayDuration:e,onOpen:s.useCallback(()=>{window.clearTimeout(i.current),c.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(()=>c.current=!0,r)},[r]),isPointerInTransitRef:v,onPointerInTransitChange:s.useCallback(d=>{v.current=d},[]),disableHoverableContent:n,children:a})};S.displayName=V;var O="Tooltip",[ce,_]=j(O),H=t=>{const{__scopeTooltip:o,children:e,open:r,defaultOpen:n,onOpenChange:a,disableHoverableContent:c,delayDuration:v}=t,i=k(O,t.__scopeTooltip),d=D(o),[l,f]=s.useState(null),x=J.useId(),u=s.useRef(0),T=c??i.disableHoverableContent,g=v??i.delayDuration,h=s.useRef(!1),[C,y]=te.useControllableState({prop:r,defaultProp:n??!1,onChange:F=>{F?(i.onOpen(),document.dispatchEvent(new CustomEvent(A))):i.onClose(),a?.(F)},caller:O}),w=s.useMemo(()=>C?h.current?"delayed-open":"instant-open":"closed",[C]),E=s.useCallback(()=>{window.clearTimeout(u.current),u.current=0,h.current=!1,y(!0)},[y]),R=s.useCallback(()=>{window.clearTimeout(u.current),u.current=0,y(!1)},[y]),G=s.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>{h.current=!0,y(!0),u.current=0},g)},[g,y]);return s.useEffect(()=>()=>{u.current&&(window.clearTimeout(u.current),u.current=0)},[]),p.jsx(P.Root,{...d,children:p.jsx(ce,{scope:o,contentId:x,open:C,stateAttribute:w,trigger:l,onTriggerChange:f,onTriggerEnter:s.useCallback(()=>{i.isOpenDelayedRef.current?G():E()},[i.isOpenDelayedRef,G,E]),onTriggerLeave:s.useCallback(()=>{T?R():(window.clearTimeout(u.current),u.current=0)},[R,T]),onOpen:E,onClose:R,disableHoverableContent:T,children:e})})};H.displayName=O;var L="TooltipTrigger",M=s.forwardRef((t,o)=>{const{__scopeTooltip:e,...r}=t,n=_(L,e),a=k(L,e),c=D(e),v=s.useRef(null),i=B.useComposedRefs(o,v,n.onTriggerChange),d=s.useRef(!1),l=s.useRef(!1),f=s.useCallback(()=>d.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(P.Anchor,{asChild:!0,...c,children:p.jsx(Z.Primitive.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:i,onPointerMove:m.composeEventHandlers(t.onPointerMove,x=>{x.pointerType!=="touch"&&!l.current&&!a.isPointerInTransitRef.current&&(n.onTriggerEnter(),l.current=!0)}),onPointerLeave:m.composeEventHandlers(t.onPointerLeave,()=>{n.onTriggerLeave(),l.current=!1}),onPointerDown:m.composeEventHandlers(t.onPointerDown,()=>{n.open&&n.onClose(),d.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:m.composeEventHandlers(t.onFocus,()=>{d.current||n.onOpen()}),onBlur:m.composeEventHandlers(t.onBlur,n.onClose),onClick:m.composeEventHandlers(t.onClick,n.onClose)})})});M.displayName=L;var I="TooltipPortal",[ae,le]=j(I,{forceMount:void 0}),N=t=>{const{__scopeTooltip:o,forceMount:e,children:r,container:n}=t,a=_(I,o);return p.jsx(ae,{scope:o,forceMount:e,children:p.jsx(U.Presence,{present:e||a.open,children:p.jsx(Q.Portal,{asChild:!0,container:n,children:r})})})};N.displayName=I;var b="TooltipContent",q=s.forwardRef((t,o)=>{const e=le(b,t.__scopeTooltip),{forceMount:r=e.forceMount,side:n="top",...a}=t,c=_(b,t.__scopeTooltip);return p.jsx(U.Presence,{present:r||c.open,children:c.disableHoverableContent?p.jsx(Y,{side:n,...a,ref:o}):p.jsx(ue,{side:n,...a,ref:o})})}),ue=s.forwardRef((t,o)=>{const e=_(b,t.__scopeTooltip),r=k(b,t.__scopeTooltip),n=s.useRef(null),a=B.useComposedRefs(o,n),[c,v]=s.useState(null),{trigger:i,onClose:d}=e,l=n.current,{onPointerInTransitChange:f}=r,x=s.useCallback(()=>{v(null),f(!1)},[f]),u=s.useCallback((T,g)=>{const h=T.currentTarget,C={x:T.clientX,y:T.clientY},y=ve(C,h.getBoundingClientRect()),w=xe(C,y),E=Te(g.getBoundingClientRect()),R=ge([...w,...E]);v(R),f(!0)},[f]);return s.useEffect(()=>()=>x(),[x]),s.useEffect(()=>{if(i&&l){const T=h=>u(h,l),g=h=>u(h,i);return i.addEventListener("pointerleave",T),l.addEventListener("pointerleave",g),()=>{i.removeEventListener("pointerleave",T),l.removeEventListener("pointerleave",g)}}},[i,l,u,x]),s.useEffect(()=>{if(c){const T=g=>{const h=g.target,C={x:g.clientX,y:g.clientY},y=i?.contains(h)||l?.contains(h),w=!he(C,c);y?x():w&&(x(),d())};return document.addEventListener("pointermove",T),()=>document.removeEventListener("pointermove",T)}},[i,l,c,d,x]),p.jsx(Y,{...t,ref:a})}),[pe,de]=j(O,{isInside:!1}),fe=ee.createSlottable("TooltipContent"),Y=s.forwardRef((t,o)=>{const{__scopeTooltip:e,children:r,"aria-label":n,onEscapeKeyDown:a,onPointerDownOutside:c,...v}=t,i=_(b,e),d=D(e),{onClose:l}=i;return s.useEffect(()=>(document.addEventListener(A,l),()=>document.removeEventListener(A,l)),[l]),s.useEffect(()=>{if(i.trigger){const f=x=>{x.target?.contains(i.trigger)&&l()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[i.trigger,l]),p.jsx(W.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:f=>f.preventDefault(),onDismiss:l,children:p.jsxs(P.Content,{"data-state":i.stateAttribute,...d,...v,ref:o,style:{...v.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(fe,{children:r}),p.jsx(pe,{scope:e,isInside:!0,children:p.jsx(oe.Root,{id:i.contentId,role:"tooltip",children:n||r})})]})})});q.displayName=b;var X="TooltipArrow",$=s.forwardRef((t,o)=>{const{__scopeTooltip:e,...r}=t,n=D(e);return de(X,e).isInside?null:p.jsx(P.Arrow,{...n,...r,ref:o})});$.displayName=X;function ve(t,o){const e=Math.abs(o.top-t.y),r=Math.abs(o.bottom-t.y),n=Math.abs(o.right-t.x),a=Math.abs(o.left-t.x);switch(Math.min(e,r,n,a)){case a:return"left";case n:return"right";case e:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function xe(t,o,e=5){const r=[];switch(o){case"top":r.push({x:t.x-e,y:t.y+e},{x:t.x+e,y:t.y+e});break;case"bottom":r.push({x:t.x-e,y:t.y-e},{x:t.x+e,y:t.y-e});break;case"left":r.push({x:t.x+e,y:t.y-e},{x:t.x+e,y:t.y+e});break;case"right":r.push({x:t.x-e,y:t.y-e},{x:t.x-e,y:t.y+e});break}return r}function Te(t){const{top:o,right:e,bottom:r,left:n}=t;return[{x:n,y:o},{x:e,y:o},{x:e,y:r},{x:n,y:r}]}function he(t,o){const{x:e,y:r}=t;let n=!1;for(let a=0,c=o.length-1;a<o.length;c=a++){const v=o[a],i=o[c],d=v.x,l=v.y,f=i.x,x=i.y;l>r!=x>r&&e<(f-d)*(r-l)/(x-l)+d&&(n=!n)}return n}function ge(t){const o=t.slice();return o.sort((e,r)=>e.x<r.x?-1:e.x>r.x?1:e.y<r.y?-1:e.y>r.y?1:0),ye(o)}function ye(t){if(t.length<=1)return t.slice();const o=[];for(let r=0;r<t.length;r++){const n=t[r];for(;o.length>=2;){const a=o[o.length-1],c=o[o.length-2];if((a.x-c.x)*(n.y-c.y)>=(a.y-c.y)*(n.x-c.x))o.pop();else break}o.push(n)}o.pop();const e=[];for(let r=t.length-1;r>=0;r--){const n=t[r];for(;e.length>=2;){const a=e[e.length-1],c=e[e.length-2];if((a.x-c.x)*(n.y-c.y)>=(a.y-c.y)*(n.x-c.x))e.pop();else break}e.push(n)}return e.pop(),o.length===1&&e.length===1&&o[0].x===e[0].x&&o[0].y===e[0].y?o:o.concat(e)}var Ce=S,me=H,be=M,Pe=N,we=q,Ee=$;exports.Arrow=Ee;exports.Content=we;exports.Portal=Pe;exports.Provider=Ce;exports.Root=me;exports.Tooltip=H;exports.TooltipArrow=$;exports.TooltipContent=q;exports.TooltipPortal=N;exports.TooltipProvider=S;exports.TooltipTrigger=M;exports.Trigger=be;exports.createTooltipScope=ne;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("react"),m=require("../../primitive/dist/index.cjs"),B=require("../../react-compose-refs/dist/index.cjs"),K=require("../../react-context/dist/index.cjs"),W=require("../../react-dismissable-layer/dist/index.cjs"),J=require("../../react-id/dist/index.cjs"),P=require("../../react-popper/dist/index.cjs"),Q=require("../../react-portal/dist/index.cjs"),U=require("../../react-presence/dist/index.cjs"),Z=require("../../react-primitive/dist/index.cjs"),ee=require("../node_modules/@radix-ui/react-slot/dist/index.cjs"),te=require("../../react-use-controllable-state/dist/index.cjs"),oe=require("../../react-visually-hidden/dist/index.cjs"),p=require("react/jsx-runtime");function re(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(o,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return o.default=t,Object.freeze(o)}const s=re(z);var[j,ne]=K.createContextScope("Tooltip",[P.createPopperScope]),D=P.createPopperScope(),V="TooltipProvider",se=700,A="tooltip.open",[ie,k]=j(V),S=t=>{const{__scopeTooltip:o,delayDuration:e=se,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:a}=t,c=s.useRef(!0),v=s.useRef(!1),i=s.useRef(0);return s.useEffect(()=>{const d=i.current;return()=>window.clearTimeout(d)},[]),p.jsx(ie,{scope:o,isOpenDelayedRef:c,delayDuration:e,onOpen:s.useCallback(()=>{window.clearTimeout(i.current),c.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(()=>c.current=!0,r)},[r]),isPointerInTransitRef:v,onPointerInTransitChange:s.useCallback(d=>{v.current=d},[]),disableHoverableContent:n,children:a})};S.displayName=V;var O="Tooltip",[ce,_]=j(O),H=t=>{const{__scopeTooltip:o,children:e,open:r,defaultOpen:n,onOpenChange:a,disableHoverableContent:c,delayDuration:v}=t,i=k(O,t.__scopeTooltip),d=D(o),[l,f]=s.useState(null),x=J.useId(),u=s.useRef(0),T=c??i.disableHoverableContent,g=v??i.delayDuration,h=s.useRef(!1),[C,y]=te.useControllableState({prop:r,defaultProp:n??!1,onChange:F=>{F?(i.onOpen(),document.dispatchEvent(new CustomEvent(A))):i.onClose(),a?.(F)},caller:O}),w=s.useMemo(()=>C?h.current?"delayed-open":"instant-open":"closed",[C]),E=s.useCallback(()=>{window.clearTimeout(u.current),u.current=0,h.current=!1,y(!0)},[y]),R=s.useCallback(()=>{window.clearTimeout(u.current),u.current=0,y(!1)},[y]),G=s.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>{h.current=!0,y(!0),u.current=0},g)},[g,y]);return s.useEffect(()=>()=>{u.current&&(window.clearTimeout(u.current),u.current=0)},[]),p.jsx(P.Root,{...d,children:p.jsx(ce,{scope:o,contentId:x,open:C,stateAttribute:w,trigger:l,onTriggerChange:f,onTriggerEnter:s.useCallback(()=>{i.isOpenDelayedRef.current?G():E()},[i.isOpenDelayedRef,G,E]),onTriggerLeave:s.useCallback(()=>{T?R():(window.clearTimeout(u.current),u.current=0)},[R,T]),onOpen:E,onClose:R,disableHoverableContent:T,children:e})})};H.displayName=O;var L="TooltipTrigger",M=s.forwardRef((t,o)=>{const{__scopeTooltip:e,...r}=t,n=_(L,e),a=k(L,e),c=D(e),v=s.useRef(null),i=B.useComposedRefs(o,v,n.onTriggerChange),d=s.useRef(!1),l=s.useRef(!1),f=s.useCallback(()=>d.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(P.Anchor,{asChild:!0,...c,children:p.jsx(Z.Primitive.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:i,onPointerMove:m.composeEventHandlers(t.onPointerMove,x=>{x.pointerType!=="touch"&&!l.current&&!a.isPointerInTransitRef.current&&(n.onTriggerEnter(),l.current=!0)}),onPointerLeave:m.composeEventHandlers(t.onPointerLeave,()=>{n.onTriggerLeave(),l.current=!1}),onPointerDown:m.composeEventHandlers(t.onPointerDown,()=>{n.open&&n.onClose(),d.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:m.composeEventHandlers(t.onFocus,()=>{d.current||n.onOpen()}),onBlur:m.composeEventHandlers(t.onBlur,n.onClose),onClick:m.composeEventHandlers(t.onClick,n.onClose)})})});M.displayName=L;var I="TooltipPortal",[ae,le]=j(I,{forceMount:void 0}),N=t=>{const{__scopeTooltip:o,forceMount:e,children:r,container:n}=t,a=_(I,o);return p.jsx(ae,{scope:o,forceMount:e,children:p.jsx(U.Presence,{present:e||a.open,children:p.jsx(Q.Portal,{asChild:!0,container:n,children:r})})})};N.displayName=I;var b="TooltipContent",q=s.forwardRef((t,o)=>{const e=le(b,t.__scopeTooltip),{forceMount:r=e.forceMount,side:n="top",...a}=t,c=_(b,t.__scopeTooltip);return p.jsx(U.Presence,{present:r||c.open,children:c.disableHoverableContent?p.jsx(Y,{side:n,...a,ref:o}):p.jsx(ue,{side:n,...a,ref:o})})}),ue=s.forwardRef((t,o)=>{const e=_(b,t.__scopeTooltip),r=k(b,t.__scopeTooltip),n=s.useRef(null),a=B.useComposedRefs(o,n),[c,v]=s.useState(null),{trigger:i,onClose:d}=e,l=n.current,{onPointerInTransitChange:f}=r,x=s.useCallback(()=>{v(null),f(!1)},[f]),u=s.useCallback((T,g)=>{const h=T.currentTarget,C={x:T.clientX,y:T.clientY},y=ve(C,h.getBoundingClientRect()),w=xe(C,y),E=Te(g.getBoundingClientRect()),R=ge([...w,...E]);v(R),f(!0)},[f]);return s.useEffect(()=>()=>x(),[x]),s.useEffect(()=>{if(i&&l){const T=h=>u(h,l),g=h=>u(h,i);return i.addEventListener("pointerleave",T),l.addEventListener("pointerleave",g),()=>{i.removeEventListener("pointerleave",T),l.removeEventListener("pointerleave",g)}}},[i,l,u,x]),s.useEffect(()=>{if(c){const T=g=>{const h=g.target,C={x:g.clientX,y:g.clientY},y=i?.contains(h)||l?.contains(h),w=!he(C,c);y?x():w&&(x(),d())};return document.addEventListener("pointermove",T),()=>document.removeEventListener("pointermove",T)}},[i,l,c,d,x]),p.jsx(Y,{...t,ref:a})}),[pe,de]=j(O,{isInside:!1}),fe=ee.createSlottable("TooltipContent"),Y=s.forwardRef((t,o)=>{const{__scopeTooltip:e,children:r,"aria-label":n,onEscapeKeyDown:a,onPointerDownOutside:c,...v}=t,i=_(b,e),d=D(e),{onClose:l}=i;return s.useEffect(()=>(document.addEventListener(A,l),()=>document.removeEventListener(A,l)),[l]),s.useEffect(()=>{if(i.trigger){const f=x=>{x.target?.contains(i.trigger)&&l()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[i.trigger,l]),p.jsx(W.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:f=>f.preventDefault(),onDismiss:l,children:p.jsxs(P.Content,{"data-state":i.stateAttribute,...d,...v,ref:o,style:{...v.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(fe,{children:r}),p.jsx(pe,{scope:e,isInside:!0,children:p.jsx(oe.Root,{id:i.contentId,role:"tooltip",children:n||r})})]})})});q.displayName=b;var X="TooltipArrow",$=s.forwardRef((t,o)=>{const{__scopeTooltip:e,...r}=t,n=D(e);return de(X,e).isInside?null:p.jsx(P.Arrow,{...n,...r,ref:o})});$.displayName=X;function ve(t,o){const e=Math.abs(o.top-t.y),r=Math.abs(o.bottom-t.y),n=Math.abs(o.right-t.x),a=Math.abs(o.left-t.x);switch(Math.min(e,r,n,a)){case a:return"left";case n:return"right";case e:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function xe(t,o,e=5){const r=[];switch(o){case"top":r.push({x:t.x-e,y:t.y+e},{x:t.x+e,y:t.y+e});break;case"bottom":r.push({x:t.x-e,y:t.y-e},{x:t.x+e,y:t.y-e});break;case"left":r.push({x:t.x+e,y:t.y-e},{x:t.x+e,y:t.y+e});break;case"right":r.push({x:t.x-e,y:t.y-e},{x:t.x-e,y:t.y+e});break}return r}function Te(t){const{top:o,right:e,bottom:r,left:n}=t;return[{x:n,y:o},{x:e,y:o},{x:e,y:r},{x:n,y:r}]}function he(t,o){const{x:e,y:r}=t;let n=!1;for(let a=0,c=o.length-1;a<o.length;c=a++){const v=o[a],i=o[c],d=v.x,l=v.y,f=i.x,x=i.y;l>r!=x>r&&e<(f-d)*(r-l)/(x-l)+d&&(n=!n)}return n}function ge(t){const o=t.slice();return o.sort((e,r)=>e.x<r.x?-1:e.x>r.x?1:e.y<r.y?-1:e.y>r.y?1:0),ye(o)}function ye(t){if(t.length<=1)return t.slice();const o=[];for(let r=0;r<t.length;r++){const n=t[r];for(;o.length>=2;){const a=o[o.length-1],c=o[o.length-2];if((a.x-c.x)*(n.y-c.y)>=(a.y-c.y)*(n.x-c.x))o.pop();else break}o.push(n)}o.pop();const e=[];for(let r=t.length-1;r>=0;r--){const n=t[r];for(;e.length>=2;){const a=e[e.length-1],c=e[e.length-2];if((a.x-c.x)*(n.y-c.y)>=(a.y-c.y)*(n.x-c.x))e.pop();else break}e.push(n)}return e.pop(),o.length===1&&e.length===1&&o[0].x===e[0].x&&o[0].y===e[0].y?o:o.concat(e)}var Ce=S,me=H,be=M,Pe=N,we=q,Ee=$;exports.Arrow=Ee;exports.Content=we;exports.Portal=Pe;exports.Provider=Ce;exports.Root=me;exports.Tooltip=H;exports.TooltipArrow=$;exports.TooltipContent=q;exports.TooltipPortal=N;exports.TooltipProvider=S;exports.TooltipTrigger=M;exports.Trigger=be;exports.createTooltipScope=ne;
2
2
  //# sourceMappingURL=index.cjs.map