@baseline-ui/core 3.9.0 → 3.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/dist/Accordion.mjs +1 -1
  2. package/dist/ActionButton.mjs +1 -1
  3. package/dist/ActionGroup.mjs +1 -1
  4. package/dist/ActionIconButton.mjs +1 -1
  5. package/dist/Actionable.mjs +1 -1
  6. package/dist/AlertDialog.mjs +1 -1
  7. package/dist/AudioPlayer.mjs +1 -1
  8. package/dist/Breadcrumbs.mjs +1 -1
  9. package/dist/ButtonSelect.mjs +1 -1
  10. package/dist/Calendar.mjs +1 -1
  11. package/dist/Checkbox.mjs +1 -1
  12. package/dist/ColorInput.mjs +1 -1
  13. package/dist/ColorSwatch.mjs +1 -1
  14. package/dist/ColorSwatchPicker.mjs +1 -1
  15. package/dist/ComboBox.mjs +1 -1
  16. package/dist/DateField.mjs +1 -1
  17. package/dist/Dialog.mjs +1 -1
  18. package/dist/Disclosure.mjs +1 -1
  19. package/dist/DomNodeRenderer.mjs +1 -1
  20. package/dist/Drawer.mjs +1 -1
  21. package/dist/Editor.mjs +1 -1
  22. package/dist/FileInput.mjs +1 -1
  23. package/dist/FileList.css +1 -1
  24. package/dist/FileList.mjs +1 -1
  25. package/dist/FileUploader.mjs +1 -1
  26. package/dist/FrameProvider.mjs +1 -1
  27. package/dist/FreehandCanvas.mjs +1 -1
  28. package/dist/GridList.mjs +1 -1
  29. package/dist/Group.mjs +1 -1
  30. package/dist/Icon.mjs +1 -1
  31. package/dist/Image.mjs +1 -1
  32. package/dist/ImageDropZone.mjs +1 -1
  33. package/dist/ImageGallery.mjs +1 -1
  34. package/dist/InlineAlert.mjs +1 -1
  35. package/dist/InlineToolbar.mjs +2 -2
  36. package/dist/Kbd.mjs +1 -1
  37. package/dist/Link.mjs +1 -1
  38. package/dist/ListBox.mjs +1 -1
  39. package/dist/Markdown.css +1 -1
  40. package/dist/Markdown.mjs +1 -1
  41. package/dist/Menu.mjs +1 -1
  42. package/dist/MessageFormat.mjs +1 -1
  43. package/dist/Modal.mjs +1 -1
  44. package/dist/NumberInput.mjs +1 -1
  45. package/dist/Pagination.mjs +1 -1
  46. package/dist/Panel.mjs +1 -1
  47. package/dist/PointPicker.mjs +1 -1
  48. package/dist/Popover.mjs +1 -1
  49. package/dist/Portal.mjs +1 -1
  50. package/dist/Preview.mjs +1 -1
  51. package/dist/ProgressBar.mjs +1 -1
  52. package/dist/ProgressSpinner.mjs +1 -1
  53. package/dist/RadioGroup.css +1 -1
  54. package/dist/RadioGroup.mjs +1 -1
  55. package/dist/Reaction.mjs +1 -1
  56. package/dist/ScrollControlButton.css +1 -1
  57. package/dist/ScrollControlButton.mjs +1 -1
  58. package/dist/SearchInput.mjs +1 -1
  59. package/dist/Select.mjs +1 -1
  60. package/dist/Slider.mjs +1 -1
  61. package/dist/Stepper.mjs +1 -1
  62. package/dist/Switch.mjs +1 -1
  63. package/dist/Table.mjs +1 -1
  64. package/dist/Tabs.mjs +1 -1
  65. package/dist/Tag.mjs +1 -1
  66. package/dist/TagGroup.mjs +1 -1
  67. package/dist/TaggedPagination.mjs +1 -1
  68. package/dist/Text.mjs +1 -1
  69. package/dist/TextInput.mjs +1 -1
  70. package/dist/ThemeProvider.mjs +1 -1
  71. package/dist/TimeField.mjs +1 -1
  72. package/dist/Toast.mjs +1 -1
  73. package/dist/ToggleButton.mjs +1 -1
  74. package/dist/ToggleIconButton.mjs +1 -1
  75. package/dist/Toolbar.mjs +1 -1
  76. package/dist/Tooltip.mjs +1 -1
  77. package/dist/TreeView.mjs +1 -1
  78. package/dist/UNSAFE_ListBox.mjs +1 -1
  79. package/dist/Virtualizer.mjs +1 -1
  80. package/dist/{chunk-E3TD3EJQ.mjs → chunk-23OLSA2X.mjs} +2 -2
  81. package/dist/{chunk-X6K4M542.mjs → chunk-24WOG72O.mjs} +2 -2
  82. package/dist/{chunk-YK3KAPIK.mjs → chunk-2CFMM7MZ.mjs} +2 -2
  83. package/dist/{chunk-WSRXTVYB.mjs → chunk-2KRVQJDA.mjs} +2 -2
  84. package/dist/{chunk-SCJ3RG7B.mjs → chunk-2MNK24YJ.mjs} +1 -1
  85. package/dist/{chunk-3PBFSDMT.mjs → chunk-2PTLJDIT.mjs} +1 -1
  86. package/dist/{chunk-YSQ3YHJN.mjs → chunk-2TMQUHHU.mjs} +1 -1
  87. package/dist/chunk-3A7ZISTE.mjs +10 -0
  88. package/dist/{chunk-DOFT4BQH.mjs → chunk-3EFE2WAJ.mjs} +1 -1
  89. package/dist/{chunk-CKUHFL5G.mjs → chunk-3HJAQJWA.mjs} +1 -1
  90. package/dist/chunk-3IHIKAT4.mjs +10 -0
  91. package/dist/chunk-3JHXI33A.mjs +10 -0
  92. package/dist/chunk-3K6XNSYE.mjs +10 -0
  93. package/dist/chunk-3LS73XVI.mjs +10 -0
  94. package/dist/chunk-3P25UGHE.mjs +10 -0
  95. package/dist/{chunk-BFW26T6V.mjs → chunk-43U6RZ5C.mjs} +2 -2
  96. package/dist/{chunk-54MWEZUP.mjs → chunk-46UWKP7W.mjs} +1 -1
  97. package/dist/chunk-4CMATAQ2.mjs +10 -0
  98. package/dist/{chunk-F3EOLTFM.mjs → chunk-4FN6UAXD.mjs} +1 -1
  99. package/dist/{chunk-NWYRVUTX.mjs → chunk-4Y5IKZSW.mjs} +1 -1
  100. package/dist/{chunk-ZRD2DMEX.mjs → chunk-5B6263RO.mjs} +13 -13
  101. package/dist/{chunk-WAPBLICF.mjs → chunk-5NVCSLXT.mjs} +1 -1
  102. package/dist/{chunk-OBEPT4LR.mjs → chunk-5YV74V36.mjs} +1 -1
  103. package/dist/{chunk-VWSTMBQK.mjs → chunk-64Y62MDR.mjs} +2 -2
  104. package/dist/{chunk-IVM5IBQS.mjs → chunk-6DVKR25T.mjs} +1 -1
  105. package/dist/{chunk-ADEALCJB.mjs → chunk-6IK2TDLH.mjs} +2 -2
  106. package/dist/{chunk-ES3IQZSH.mjs → chunk-6V7S5IG5.mjs} +2 -2
  107. package/dist/chunk-6VKIT2PF.mjs +10 -0
  108. package/dist/{chunk-NTUW55EB.mjs → chunk-7EOAYPSZ.mjs} +2 -2
  109. package/dist/{chunk-LZEZW5RE.mjs → chunk-7LQTLZJ5.mjs} +2 -2
  110. package/dist/{chunk-IOHULFEP.mjs → chunk-A4PXU7GU.mjs} +2 -2
  111. package/dist/chunk-A52PIXOO.mjs +10 -0
  112. package/dist/chunk-AANAI2XF.mjs +10 -0
  113. package/dist/{chunk-UQJB6AGO.mjs → chunk-AB7LDKP2.mjs} +1 -1
  114. package/dist/{chunk-BPLTQDXX.mjs → chunk-ACHYZYVA.mjs} +2 -2
  115. package/dist/{chunk-JB3UIJ3I.mjs → chunk-AFJ3QV2Q.mjs} +2 -2
  116. package/dist/{chunk-NQVTVL24.mjs → chunk-AIG23SN5.mjs} +2 -2
  117. package/dist/chunk-ASIKCQC6.mjs +10 -0
  118. package/dist/{chunk-DV72V6NI.mjs → chunk-AU3GNNEG.mjs} +2 -2
  119. package/dist/{chunk-45EAFDOZ.mjs → chunk-AYBI4SQV.mjs} +1 -1
  120. package/dist/chunk-BJHDL2HH.mjs +10 -0
  121. package/dist/chunk-BNWDQ4KX.mjs +10 -0
  122. package/dist/{chunk-QSFRMY47.mjs → chunk-BPXZ6J5G.mjs} +1 -1
  123. package/dist/{chunk-2UDXAKWA.mjs → chunk-C6TD53KY.mjs} +2 -2
  124. package/dist/chunk-CBQO7JUC.mjs +11 -0
  125. package/dist/{chunk-LN2NT32E.mjs → chunk-CE2W5D44.mjs} +1 -1
  126. package/dist/{chunk-UR42GQO4.mjs → chunk-CEUVH4UZ.mjs} +1 -1
  127. package/dist/chunk-CGBI7OB5.mjs +10 -0
  128. package/dist/chunk-CMM5JW7L.mjs +10 -0
  129. package/dist/chunk-CPX5CB4L.mjs +10 -0
  130. package/dist/{chunk-HMAVZPRE.mjs → chunk-CRNJAQPI.mjs} +1 -1
  131. package/dist/chunk-DIMNDTFC.mjs +10 -0
  132. package/dist/{chunk-KADD66HZ.mjs → chunk-DNZMQ7EA.mjs} +2 -2
  133. package/dist/{chunk-RFCTQQMD.mjs → chunk-DP76DMVO.mjs} +1 -1
  134. package/dist/{chunk-DZFNVFYT.mjs → chunk-EGSNIMDP.mjs} +1 -1
  135. package/dist/chunk-EHIGJYGW.mjs +10 -0
  136. package/dist/{chunk-U6M2GCPD.mjs → chunk-EJGGWOY5.mjs} +1 -1
  137. package/dist/chunk-EKRT3PPK.mjs +10 -0
  138. package/dist/{chunk-FDDB7QNQ.mjs → chunk-ELW6SXDM.mjs} +1 -1
  139. package/dist/{chunk-YQFS4UHL.mjs → chunk-EPWWEFTP.mjs} +1 -1
  140. package/dist/{chunk-VDUFLHKK.mjs → chunk-EYKQGC4O.mjs} +2 -2
  141. package/dist/{chunk-PLRUMLNB.mjs → chunk-FFPJBDWH.mjs} +1 -1
  142. package/dist/{chunk-KFJE5ZBK.mjs → chunk-G2IYZES5.mjs} +1 -1
  143. package/dist/chunk-G2RVM2KB.mjs +10 -0
  144. package/dist/{chunk-AALXW5AP.mjs → chunk-GAKWWL3Y.mjs} +1 -1
  145. package/dist/chunk-GHKMHXQ3.mjs +10 -0
  146. package/dist/{chunk-VYBJ36ZR.mjs → chunk-GJVQMTGA.mjs} +1 -1
  147. package/dist/chunk-GKPZBTRE.mjs +10 -0
  148. package/dist/{chunk-TN7FPPGM.mjs → chunk-GZTF5YE3.mjs} +1 -1
  149. package/dist/{chunk-RXADOJLS.mjs → chunk-HI56YXPJ.mjs} +2 -2
  150. package/dist/{chunk-R7Y36JCO.mjs → chunk-HOG4QRLG.mjs} +1 -1
  151. package/dist/chunk-HOV7MM7M.mjs +10 -0
  152. package/dist/{chunk-XKNL5LSL.mjs → chunk-HOZPCWCF.mjs} +2 -2
  153. package/dist/{chunk-IBBDZQPO.mjs → chunk-HVSDXCZP.mjs} +2 -2
  154. package/dist/{chunk-64ZD4EKW.mjs → chunk-I4F5NJUI.mjs} +1 -1
  155. package/dist/{chunk-DLJHL4V7.mjs → chunk-I5YPTKMM.mjs} +2 -2
  156. package/dist/chunk-IHCKLMWD.mjs +10 -0
  157. package/dist/chunk-IIYP5UE7.mjs +10 -0
  158. package/dist/{chunk-GXQQZWIP.mjs → chunk-IQ3Z6ZO2.mjs} +1 -1
  159. package/dist/{chunk-3COKCTB2.mjs → chunk-J4T6TE7V.mjs} +2 -2
  160. package/dist/{chunk-OS6PVCFX.mjs → chunk-JANI446W.mjs} +1 -1
  161. package/dist/{chunk-6MTVNQKW.mjs → chunk-JGKBJHX2.mjs} +1 -1
  162. package/dist/chunk-JQSZFPWJ.mjs +10 -0
  163. package/dist/{chunk-IDIZSV2Y.mjs → chunk-JYWJE6L5.mjs} +2 -2
  164. package/dist/{chunk-ARMWQYH2.mjs → chunk-KDNT54DP.mjs} +2 -2
  165. package/dist/{chunk-KMSNBINF.mjs → chunk-L42WN3AP.mjs} +2 -2
  166. package/dist/{chunk-SY24O432.mjs → chunk-L4MQCPRT.mjs} +3 -3
  167. package/dist/chunk-L7GYT3MC.mjs +10 -0
  168. package/dist/{chunk-6CSP66NI.mjs → chunk-LGE4377M.mjs} +1 -1
  169. package/dist/chunk-LJAVEZ2H.mjs +10 -0
  170. package/dist/{chunk-JDDA4R2D.mjs → chunk-LJM26E7W.mjs} +1 -1
  171. package/dist/chunk-LNEOOIXS.mjs +10 -0
  172. package/dist/{chunk-VSGVHATE.mjs → chunk-LPHX7UMQ.mjs} +1 -1
  173. package/dist/{chunk-L6ISOTLH.mjs → chunk-LZOXWIAS.mjs} +2 -2
  174. package/dist/{chunk-W3YUV7IF.mjs → chunk-M3NJURGR.mjs} +1 -1
  175. package/dist/{chunk-IIBBR266.mjs → chunk-MMLAKHLR.mjs} +3 -3
  176. package/dist/{chunk-Z7JRM3NW.mjs → chunk-MQCTOCK2.mjs} +2 -2
  177. package/dist/{chunk-X34RHNLT.mjs → chunk-NIAMDJYU.mjs} +2 -2
  178. package/dist/{chunk-WD2TPSZV.mjs → chunk-NIGOM3FD.mjs} +1 -1
  179. package/dist/{chunk-6NUHEJGL.mjs → chunk-NOTKA3RL.mjs} +1 -1
  180. package/dist/chunk-NYH6JQMA.mjs +10 -0
  181. package/dist/{chunk-SZNDCHMJ.mjs → chunk-OFEX3RHY.mjs} +1 -1
  182. package/dist/{chunk-GLIN7JAI.mjs → chunk-OJIOLYTM.mjs} +1 -1
  183. package/dist/chunk-OWXMAVXI.mjs +10 -0
  184. package/dist/chunk-OY57K37D.mjs +10 -0
  185. package/dist/{chunk-OO3ZVB2T.mjs → chunk-OYE6VSTU.mjs} +2 -2
  186. package/dist/{chunk-GIUNLLWW.mjs → chunk-P3RRGPNM.mjs} +2 -2
  187. package/dist/{chunk-GPT4DR4P.mjs → chunk-PGDGNOYE.mjs} +1 -1
  188. package/dist/{chunk-DPFX25HC.mjs → chunk-PITIJLE3.mjs} +1 -1
  189. package/dist/{chunk-RSKKEGJZ.mjs → chunk-PPGEEMZ2.mjs} +2 -2
  190. package/dist/{chunk-UKBBSYRC.mjs → chunk-PTL6NSYA.mjs} +2 -2
  191. package/dist/chunk-PV4E7XDP.mjs +10 -0
  192. package/dist/chunk-PZBJGZ57.mjs +10 -0
  193. package/dist/chunk-Q5SN5AQT.mjs +10 -0
  194. package/dist/{chunk-EISLHUT5.mjs → chunk-Q7BJGV4I.mjs} +1 -1
  195. package/dist/{chunk-R5JHN4X6.mjs → chunk-QDMG3P5Z.mjs} +1 -1
  196. package/dist/{chunk-RE7ZGPOY.mjs → chunk-QMFL5BMI.mjs} +1 -1
  197. package/dist/{chunk-JTGVIAOK.mjs → chunk-QMP72J5L.mjs} +1 -1
  198. package/dist/chunk-QMSBDXK6.mjs +10 -0
  199. package/dist/{chunk-JIGOXUY4.mjs → chunk-QPWBJW2X.mjs} +1 -1
  200. package/dist/{chunk-67QIBKUN.mjs → chunk-QRLUWOGW.mjs} +1 -1
  201. package/dist/{chunk-FTV6OWMI.mjs → chunk-QSNYILCF.mjs} +2 -2
  202. package/dist/chunk-QVXIFV7W.mjs +10 -0
  203. package/dist/{chunk-M7BCIQ2J.mjs → chunk-QYU7CWJD.mjs} +1 -1
  204. package/dist/{chunk-JC22ELJM.mjs → chunk-RGWXVYDG.mjs} +1 -1
  205. package/dist/{chunk-N4NDPTX6.mjs → chunk-RKPWFZB4.mjs} +1 -1
  206. package/dist/chunk-RM64ROGL.mjs +10 -0
  207. package/dist/{chunk-CIOPWCOS.mjs → chunk-RPV3UUIN.mjs} +2 -2
  208. package/dist/chunk-RS7TRDRM.mjs +10 -0
  209. package/dist/{chunk-CHBF3XQ6.mjs → chunk-S2MA4MRM.mjs} +1 -1
  210. package/dist/chunk-S3LWWMMQ.mjs +10 -0
  211. package/dist/{chunk-WID7IWNC.mjs → chunk-SL5Q4NLV.mjs} +1 -1
  212. package/dist/{chunk-A63HMTSM.mjs → chunk-SMPF53W4.mjs} +1 -1
  213. package/dist/{chunk-5MR5L5JZ.mjs → chunk-SQPWV3OX.mjs} +2 -2
  214. package/dist/chunk-ST3TDAOP.mjs +10 -0
  215. package/dist/{chunk-ENUU2IVX.mjs → chunk-SUJD4QFW.mjs} +1 -1
  216. package/dist/{chunk-OKEXEU3C.mjs → chunk-T7K4WI76.mjs} +1 -1
  217. package/dist/{chunk-DFMPVQM3.mjs → chunk-TJDL7HT5.mjs} +2 -2
  218. package/dist/{chunk-SI7LO2L4.mjs → chunk-TK33MBDB.mjs} +1 -1
  219. package/dist/{chunk-BK3RBPST.mjs → chunk-TLUB6FCT.mjs} +1 -1
  220. package/dist/{chunk-UBC32WQB.mjs → chunk-TMGB4HZ7.mjs} +1 -1
  221. package/dist/{chunk-ALMW6S4I.mjs → chunk-TQMBJFQC.mjs} +2 -2
  222. package/dist/{chunk-E6DZSC2G.mjs → chunk-TUSG5ZRW.mjs} +2 -2
  223. package/dist/{chunk-D2NVLRIU.mjs → chunk-TZSRU3GG.mjs} +1 -1
  224. package/dist/{chunk-WXILHRBE.mjs → chunk-U5XI3CZD.mjs} +1 -1
  225. package/dist/chunk-U6W7D7TT.mjs +10 -0
  226. package/dist/chunk-UC6WAEPH.mjs +10 -0
  227. package/dist/{chunk-TGLVJRZE.mjs → chunk-UXAMVDQ4.mjs} +1 -1
  228. package/dist/chunk-V2C4UDOC.mjs +10 -0
  229. package/dist/{chunk-5LGYS5CZ.mjs → chunk-V3DTS6FF.mjs} +1 -1
  230. package/dist/{chunk-AC44TKUI.mjs → chunk-V6ZIMZ53.mjs} +1 -1
  231. package/dist/{chunk-B5NICAFU.mjs → chunk-VGBHKFW7.mjs} +1 -1
  232. package/dist/{chunk-BSFG32AL.mjs → chunk-VOWLLVPD.mjs} +2 -2
  233. package/dist/chunk-W4DOEGYH.mjs +10 -0
  234. package/dist/chunk-WJBURR7M.mjs +10 -0
  235. package/dist/{chunk-MUQR2YER.mjs → chunk-WN4QRMX6.mjs} +2 -2
  236. package/dist/chunk-WSDEMATI.mjs +10 -0
  237. package/dist/{chunk-UPOQXYUI.mjs → chunk-XDORZSJQ.mjs} +1 -1
  238. package/dist/{chunk-6HTOSJOJ.mjs → chunk-Y5LEKSMM.mjs} +1 -1
  239. package/dist/{chunk-3JOOFCEF.mjs → chunk-YI5VNFT4.mjs} +2 -2
  240. package/dist/{chunk-PQIDCA7P.mjs → chunk-YYOOJMQZ.mjs} +1 -1
  241. package/dist/chunk-ZNZBHN2V.mjs +10 -0
  242. package/dist/chunk-ZOCNDYUQ.mjs +10 -0
  243. package/dist/{chunk-E2VXJPSE.mjs → chunk-ZRPR4V5U.mjs} +1 -1
  244. package/dist/chunk-ZY3ZKJVD.mjs +10 -0
  245. package/dist/{chunk-4PZGQTXE.mjs → chunk-ZZGRLSEK.mjs} +2 -2
  246. package/dist/hooks/useCommitEffect.mjs +1 -0
  247. package/dist/hooks/useDevice.mjs +1 -1
  248. package/dist/hooks/useI18n.mjs +1 -1
  249. package/dist/hooks/useIntersectionObserver.mjs +1 -1
  250. package/dist/hooks/useLiveInteractionModality.mjs +1 -1
  251. package/dist/hooks/useLocalStorage.mjs +1 -1
  252. package/dist/hooks/useMedia.mjs +1 -1
  253. package/dist/hooks/useMutationObserver.mjs +1 -1
  254. package/dist/hooks/usePortalContainer.mjs +1 -1
  255. package/dist/hooks/usePreventFocus.mjs +1 -1
  256. package/dist/hooks/useResizeObserver.mjs +1 -1
  257. package/dist/hooks/useTextSelection.mjs +1 -1
  258. package/dist/hooks/useUndoRedo.mjs +1 -1
  259. package/dist/index.css +1 -1
  260. package/dist/index.d.ts +116 -40
  261. package/dist/index.js +22 -22
  262. package/dist/index.mjs +1 -1
  263. package/dist/react-aria.mjs +1 -1
  264. package/dist/utils/dom.mjs +1 -1
  265. package/dist/utils/isInShadowDOM.mjs +1 -1
  266. package/dist/utils/keyboards.mjs +1 -1
  267. package/dist/utils/objects.mjs +1 -1
  268. package/package.json +5 -5
  269. package/sbom.json +13 -13
  270. package/dist/chunk-25NW6ZEB.mjs +0 -10
  271. package/dist/chunk-2O4HB7UL.mjs +0 -10
  272. package/dist/chunk-35AM4QEA.mjs +0 -10
  273. package/dist/chunk-3V4W6OGG.mjs +0 -10
  274. package/dist/chunk-4HOAPQDQ.mjs +0 -10
  275. package/dist/chunk-5GZAORDK.mjs +0 -10
  276. package/dist/chunk-6LFOODXI.mjs +0 -10
  277. package/dist/chunk-6PBBHYCA.mjs +0 -10
  278. package/dist/chunk-B3W7VMJR.mjs +0 -10
  279. package/dist/chunk-C4XJOYAW.mjs +0 -10
  280. package/dist/chunk-D6AOHRAV.mjs +0 -10
  281. package/dist/chunk-DHZKZ3AV.mjs +0 -10
  282. package/dist/chunk-DRQHSYY3.mjs +0 -10
  283. package/dist/chunk-DZJTPX2G.mjs +0 -10
  284. package/dist/chunk-F4YBUGLD.mjs +0 -10
  285. package/dist/chunk-G76NJ3IU.mjs +0 -10
  286. package/dist/chunk-HNKEI45D.mjs +0 -10
  287. package/dist/chunk-INHZHYOF.mjs +0 -10
  288. package/dist/chunk-J7BCMF23.mjs +0 -10
  289. package/dist/chunk-JVD752FA.mjs +0 -10
  290. package/dist/chunk-JXJZIKEY.mjs +0 -10
  291. package/dist/chunk-K276BGP2.mjs +0 -10
  292. package/dist/chunk-KBLJ34QI.mjs +0 -10
  293. package/dist/chunk-KMZ3YVPE.mjs +0 -10
  294. package/dist/chunk-L5H5GE3H.mjs +0 -10
  295. package/dist/chunk-LHLY432N.mjs +0 -10
  296. package/dist/chunk-LXZOYBTL.mjs +0 -10
  297. package/dist/chunk-MPJXTZ6L.mjs +0 -10
  298. package/dist/chunk-MZIQ27JP.mjs +0 -10
  299. package/dist/chunk-NN6HKMC4.mjs +0 -10
  300. package/dist/chunk-NYNS3UDR.mjs +0 -10
  301. package/dist/chunk-OAOIUNNG.mjs +0 -10
  302. package/dist/chunk-OMCGORTH.mjs +0 -10
  303. package/dist/chunk-P6LYION6.mjs +0 -10
  304. package/dist/chunk-PJINRIA6.mjs +0 -10
  305. package/dist/chunk-PSUZMSD3.mjs +0 -10
  306. package/dist/chunk-Q3FYMLAA.mjs +0 -10
  307. package/dist/chunk-QVFGEXDU.mjs +0 -10
  308. package/dist/chunk-SYA6LAFU.mjs +0 -10
  309. package/dist/chunk-TEQHGF4G.mjs +0 -10
  310. package/dist/chunk-UCRJ3AR5.mjs +0 -10
  311. package/dist/chunk-UI4SJCQU.mjs +0 -10
  312. package/dist/chunk-V6DZG4PM.mjs +0 -11
  313. package/dist/chunk-VKWXATZ3.mjs +0 -10
  314. package/dist/chunk-VNJDCKLQ.mjs +0 -10
  315. package/dist/chunk-VQ45RUYJ.mjs +0 -10
  316. package/dist/chunk-VQHI3ZCW.mjs +0 -10
  317. package/dist/chunk-WBOFQ4BH.mjs +0 -10
  318. package/dist/chunk-XC5H4EVW.mjs +0 -10
  319. package/dist/chunk-Z7UPVYL5.mjs +0 -10
@@ -1,10 +0,0 @@
1
- import {a as a$4}from'./chunk-G77E7EDE.mjs';import {a as a$6}from'./chunk-6HTOSJOJ.mjs';import {d}from'./chunk-VQ45RUYJ.mjs';import {a as a$1}from'./chunk-NGZRN4SF.mjs';import {c,b}from'./chunk-IDIZSV2Y.mjs';import {b as b$1}from'./chunk-KG2EHFYA.mjs';import {b as b$2}from'./chunk-DLJHL4V7.mjs';import {a as a$5}from'./chunk-FPM5UJRF.mjs';import {a as a$9}from'./chunk-FDDB7QNQ.mjs';import {a as a$8}from'./chunk-LRFFL765.mjs';import {a as a$2}from'./chunk-RT4LMB6X.mjs';import {c as c$1}from'./chunk-PJINRIA6.mjs';import {a as a$7}from'./chunk-SVIYLH7R.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import fe,{useMemo,useCallback,useEffect,useRef}from'react';import {CheckmarkIcon}from'@baseline-ui/icons/12';import {CheckmarkIcon as CheckmarkIcon$1}from'@baseline-ui/icons/16';import {jsx,jsxs}from'react/jsx-runtime';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- var Y={"ar-AE":{steplist:"\u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u062E\u0637\u0648\u0627\u062A"},"bg-BG":{steplist:"\u0421\u043F\u0438\u0441\u044A\u043A \u0441\u044A\u0441 \u0441\u0442\u044A\u043F\u043A\u0438"},"cs-CZ":{steplist:"Seznam krok\u016F"},"da-DK":{steplist:"Trinliste"},"de-DE":{steplist:"Schrittliste"},"el-GR":{steplist:"\u039B\u03AF\u03C3\u03C4\u03B1 \u03B2\u03B7\u03BC\u03AC\u03C4\u03C9\u03BD"},"en-US":{steplist:"Step List"},"es-ES":{steplist:"Lista de pasos"},"et-EE":{steplist:"Sammude loend"},"fi-FI":{steplist:"Vaiheluettelo"},"fr-FR":{steplist:"Liste des \xE9tapes"},"he-IL":{steplist:"\u05E8\u05E9\u05D9\u05DE\u05EA \u05E6\u05E2\u05D3\u05D9\u05DD"},"hr-HR":{steplist:"Lista koraka"},"hu-HU":{steplist:"L\xE9p\xE9sek list\xE1ja"},"it-IT":{steplist:"Elenco dei passaggi"},"ja-JP":{steplist:"\u624B\u9806\u30EA\u30B9\u30C8"},"ko-KR":{steplist:"\uB2E8\uACC4 \uBAA9\uB85D"},"lt-LT":{steplist:"\u017Dingsni\u0173 s\u0105ra\u0161as"},"lv-LV":{steplist:"Darb\u012Bbu saraksts"},"nb-NO":{steplist:"Trinnliste"},"nl-NL":{steplist:"Stappenlijst"},"pl-PL":{steplist:"Lista krok\xF3w"},"pt-BR":{steplist:"Lista de etapas"},"pt-PT":{steplist:"Lista de passos"},"ro-RO":{steplist:"Lista de pa\u0219i"},"ru-RU":{steplist:"\u0421\u043F\u0438\u0441\u043E\u043A \u0448\u0430\u0433\u043E\u0432"},"sk-SK":{steplist:"Zoznam krokov"},"sl-SI":{steplist:"Seznam korakov"},"sr-SP":{steplist:"Lista koraka"},"sv-SE":{steplist:"Steglista"},"tr-TR":{steplist:"Ad\u0131m Listesi"},"uk-UA":{steplist:"\u0421\u043F\u0438\u0441\u043E\u043A \u043A\u0440\u043E\u043A\u0456\u0432"},"zh-CN":{steplist:"\u6B65\u9AA4\u5217\u8868"},"zh-TW":{steplist:"\u6B65\u9A5F\u6E05\u55AE"}};function D(p,t,a){let{"aria-label":s}=p,{listProps:i}=a$6({...p,...t,allowsTabNavigation:true,ref:a}),r=b$1(Y,"@react-aria/steplist");return {listProps:{...{...c$1(i,a$7(p,{labelable:true})),"aria-label":s||r.format("steplist")},tabIndex:void 0}}}function N(p){let t=a$4({...p,onSelectionChange:p.onSelectionChange?e=>{e!=null&&p.onSelectionChange?.(e);}:void 0}),[a,s]=a$5(p.lastCompletedStep,p.defaultLastCompletedStep??null,p.onLastCompletedStepChange),{setSelectedKey:i,selectedKey:r,collection:l}=t,{indexMap:n,keysLinkedList:_}=useMemo(()=>me(l),[l]),z=r!=null?n.get(r):0,c=useCallback(e=>e===void 0?false:e!==null&&a!==null&&n.has(e)&&n.has(a)&&n.get(e)<=n.get(a),[n,a]),g=useCallback((e,d)=>{let y=null;if(e&&e.size>0)for(y=e.getFirstKey();y!==e.getLastKey()&&y&&(d.has(y)||c(y));)y=e.getKeyAfter(y);return y},[c]);useEffect(()=>{let e=t.selectedKey;(t.selectionManager.isEmpty||e==null||!t.collection.getItem(e))&&(e=g(t.collection,t.disabledKeys),e!==null&&t.selectionManager.replaceSelection(e)),t.selectionManager.focusedKey==null&&t.selectionManager.setFocusedKey(e);let d=(a!==null?n.get(a):-1)??-1;z!==void 0&&z>0&&z>d+1&&e!==null&&_.has(e)&&s(_.get(e));});function m(e){if(p.isDisabled||t.disabledKeys.has(e)||p.isReadOnly)return false;if(c(e))return true;let d=_.get(e);return c(d)||e===t.collection.getFirstKey()}function h(e){let d=_.get(e);d&&!c(d)&&s(d),i(e);}return {...t,setSelectedKey:h,setLastCompletedStep:s,isCompleted:c,isSelectable:m}}function me(p){let t=new Map,a=new Map,s=0,i;for(let r of p)t.set(r.key,s),a.set(r.key,i?.key),i=r,s++;return {indexMap:t,keysLinkedList:a}}var ee=a({defaultClassName:"_41r3q2q _1yep5z6kb _1yep5z6kc _1yep5z6kd",variantClassNames:{variant:{condensed:"_41r3q2r _1yep5z618j",expanded:"_41r3q2s _1yep5z6us _1yep5z6ut _1yep5z6uu _1yep5z6sg _1yep5z6sh _1yep5z6si _1yep5z6173 _1yep5z6174 _1yep5z6175"},status:{complete:"_1yep5z6136",active:"_41r3q2u",incomplete:"_41r3q2v"},isDisabled:{true:"_41r3q2w"}},defaultVariants:{},compoundVariants:[[{status:"complete",isDisabled:true},"_1yep5z61pt"]]}),te=a({defaultClassName:"_1yep5z6ez",variantClassNames:{size:{sm:"_1yep5z610e",md:"_1yep5z610h"},isDisabled:{true:"_1yep5z611l"}},defaultVariants:{},compoundVariants:[]}),se=a({defaultClassName:"_41r3q28 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6mf _1yep5z6mh _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kt _1yep5z6ku _1yep5z6kv _1yep5z6m0",variantClassNames:{size:{sm:"_41r3q29 _1yep5z610e",md:"_41r3q2a _1yep5z610h"},status:{complete:"_41r3q2b _1yep5z6136 _1yep5z611n",active:"_1yep5z612s _1yep5z611h _1yep5z6142",incomplete:"_1yep5z612s _1yep5z611h _1yep5z613z"},isDisabled:{true:"_41r3q2e"},isFocusVisible:{true:"_41r3q2f"}},defaultVariants:{},compoundVariants:[[{status:"complete",isDisabled:true},"_41r3q2g _1yep5z61pt _1yep5z61o6"],[{status:"active",isDisabled:true},"_1yep5z61pb _1yep5z61o4 _1yep5z61qp"],[{status:"incomplete",isDisabled:true},"_1yep5z61pb _1yep5z61o4 _1yep5z61qp"]]}),pe=a({defaultClassName:"_41r3q23 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1",variantClassNames:{variant:{condensed:"_1yep5z618j _1yep5z6vy _1yep5z6vz _1yep5z6w0",expanded:"_41r3q25 _1yep5z6173 _1yep5z6174 _1yep5z6175"},isLast:{true:"_41r3q26"}},defaultVariants:{},compoundVariants:[]}),ae="_41r3q27 _1yep5z60 _1yep5z61 _1yep5z62 _1yep5z62c _1yep5z62d _1yep5z62e _1yep5z63i _1yep5z63j _1yep5z63k _1yep5z616 _1yep5z617 _1yep5z618 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6m5",ie=a({defaultClassName:"_41r3q20 _1yep5z613 _1yep5z614 _1yep5z615 _1yep5z63f _1yep5z63g _1yep5z63h _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b _1yep5z65r _1yep5z65s _1yep5z65t _1yep5z683 _1yep5z684 _1yep5z685 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z66x _1yep5z66y _1yep5z66z _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj",variantClassNames:{variant:{condensed:"_1yep5z616i _1yep5z616j _1yep5z616k _1yep5z6vy _1yep5z6vz _1yep5z6w0",expanded:"_1yep5z616c _1yep5z616d _1yep5z616e _1yep5z618m _1yep5z618l _1yep5z6wy _1yep5z6wz _1yep5z6x0"}},defaultVariants:{},compoundVariants:[]}),re="_41r3q2h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6jw _1yep5z6jx _1yep5z6jy _1yep5z6kt _1yep5z6ku _1yep5z6kv _1yep5z6kk _1yep5z6kl _1yep5z6km _1yep5z69c _1yep5z69d _1yep5z69e",oe=a({defaultClassName:"_1yep5z6ey",variantClassNames:{size:{sm:"_1yep5z610h",md:"_1yep5z610k"},isDisabled:{true:"_1yep5z611l"}},defaultVariants:{},compoundVariants:[]});function A(p,t,a){let{key:s}=p,{selectionManager:i,selectedKey:r}=t,l=!t.isSelectable(s),{itemProps:n}=d({isDisabled:l,key:s,ref:a,selectionManager:i});return {stepProps:{...n,role:"link","aria-current":r===s?"step":void 0,"aria-disabled":l?true:void 0,tabIndex:l?void 0:0}}}function ne({state:p,item:t,size:a,variant:s,index:i,isLast:r,stepLabel:l,completedLabel:n,isDisabled:_}){let z=useRef(null),c=b(),{stepProps:g}=A({key:t.key},p,z),m=_||p.disabledKeys.has(t.key),{hoverProps:h,isHovered:e}=a$8({isDisabled:m}),{focusProps:d,isFocused:y,isFocusVisible:v}=a$9(),k=p.isCompleted(t.key),q=p.selectedKey===t.key,b$1=k?"complete":q?"active":"incomplete",S=t["aria-label"],C=!!S&&!t.description,j=s==="expanded"&&!!t.title&&!C,P=s==="expanded"&&!!t.description,o=t.title||((typeof l=="function"?l({index:i+1}):l)??c.formatMessage(le.step,{index:i+1})),x=n??c.formatMessage(le.completed),M=a==="sm"?CheckmarkIcon:CheckmarkIcon$1;return jsxs("li",{className:a$3("BaselineUI-Stepper-Item",pe({variant:s,isLast:r})),"data-status":b$1,children:[jsxs("a",{...c$1(g,h,d),ref:z,"aria-label":k&&S?[x,S].join(" "):S||void 0,className:a$3("BaselineUI-Stepper-StepLink",ae),"data-status":b$1,"data-hovered":e||void 0,"data-focused":y||void 0,"data-focus-visible":v||void 0,"data-disabled":m||void 0,children:[jsx("span",{className:a$3("BaselineUI-Stepper-Indicator",se({size:a,status:b$1,isDisabled:m,isFocusVisible:v})),"aria-hidden":"true",children:k?jsx(M,{}):jsx("span",{children:i+1})}),k?jsx(b$2,{children:x}):null,j?jsxs("span",{className:a$3("BaselineUI-Stepper-Text",re),children:[jsx("span",{className:a$3("BaselineUI-Stepper-Title",oe({size:a,isDisabled:m})),children:t.title}),P?jsx("span",{className:a$3("BaselineUI-Stepper-Description",te({size:a,isDisabled:m})),children:t.description}):null]}):S?null:jsx(b$2,{children:o})]}),!r&&jsx("span",{className:a$3("BaselineUI-Stepper-Connector",ee({variant:s,status:b$1,isDisabled:m})),"aria-hidden":"true"})]})}var le=c({step:{defaultMessage:"Step {index}",id:"bui.stepper.step"},completed:{defaultMessage:"Completed",id:"bui.stepper.completed"}});var de=fe.forwardRef(function(t,a){let{items:s,variant:i="expanded",size:r="md",selectedStep:l,defaultSelectedStep:n,onSelectionChange:_,lastCompletedStep:z,defaultLastCompletedStep:c,onLastCompletedStepChange:g,isDisabled:m,className:h,style:e,"aria-label":d,stepLabel:y,completedLabel:v}=t,k=b(),q=useMemo(()=>new Set(s.filter(o=>o.isDisabled).map(o=>o.key)),[s]),b$1=useMemo(()=>s.map(o=>jsx(a$1,{textValue:o.title??String(o.key),children:o.title??""},o.key)),[s]),S=useMemo(()=>new Map(s.map(o=>[o.key,o])),[s]),C=N({children:b$1,selectedKey:l,defaultSelectedKey:n,onSelectionChange:_,lastCompletedStep:z,defaultLastCompletedStep:c,onLastCompletedStepChange:g,disabledKeys:q,isDisabled:m}),j=a$2(a),{listProps:P}=D({children:b$1,"aria-label":d||k.formatMessage(be.label)},C,j);return jsx("ol",{...P,ref:j,className:a$3("BaselineUI-Stepper",ie({variant:i}),h),style:e,"data-variant":i,"data-size":r,children:[...C.collection].map((o,x,M)=>{let E=S.get(o.key);return E?jsx(ne,{state:C,item:E,size:r,variant:i,index:x,isLast:x===M.length-1,stepLabel:y,completedLabel:v,isDisabled:m},o.key):null})})});de.displayName="Stepper";var be=c({label:{defaultMessage:"Progress",id:"bui.stepper.label"}});export{de as a};
@@ -1,10 +0,0 @@
1
- import {c as c$1}from'./chunk-RO5ZRU3Y.mjs';import {a as a$6}from'./chunk-LHLY432N.mjs';import {a as a$3}from'./chunk-66CUIXA6.mjs';import {a as a$4}from'./chunk-RSKKEGJZ.mjs';import {a as a$1}from'./chunk-FDDB7QNQ.mjs';import {a as a$2}from'./chunk-LRFFL765.mjs';import {d}from'./chunk-IIBBR266.mjs';import {c}from'./chunk-PJINRIA6.mjs';import {a as a$5}from'./chunk-35AM4QEA.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$7}from'./chunk-4QEH5CGK.mjs';import {TrashIcon}from'@baseline-ui/icons/16';import*as V from'dompurify';import F from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- var N="_1vm2oh49 _1yep5z6iw _1yep5z6ix _1yep5z6iy _1yep5z6gc",o="_1vm2oh48 _1yep5z6m4 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kt _1yep5z6ku _1yep5z6kv _1yep5z6kk _1yep5z6kl _1yep5z6km",j=a({defaultClassName:"_1vm2oh40 mnnh5s1 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6m9 _1yep5z6m7 _1yep5z6is _1yep5z6ma _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6lq _1yep5z6m5 _1yep5z6it _1yep5z6iu _1yep5z6iv",variantClassNames:{accent:{theme:"_1vm2oh41",positive:"_1vm2oh42"},isInline:{true:"mnnh5s2 _1yep5z6x1 _1yep5z6x2 _1yep5z6x3 _1yep5z6xp _1yep5z6xq _1yep5z6xr _1yep5z6yd _1yep5z6ye _1yep5z6yf _1yep5z6z1 _1yep5z6z2 _1yep5z6z3 _1yep5z613z _1yep5z618y _1yep5z6190",false:"_1yep5z6135"},isFocusVisible:{true:"_1yep5z614b _1yep5z618s _1yep5z618q _1yep5z614w _1yep5z618t"},isDisabled:{true:"mnnh5s8 z9nup82 _1yep5z6zt"},isHovered:{true:"_1vm2oh47"}},defaultVariants:{},compoundVariants:[[{accent:"positive",isInline:true},"_1yep5z61pm"],[{accent:"theme",isInline:true},"_1yep5z61pb"],[{accent:"positive",isInline:false},"_1yep5z61po"],[{accent:"theme",isInline:false},"_1yep5z61pd"],[{isFocusVisible:true,isInline:true},"_1yep5z61rf _1yep5z61v9 _1yep5z61vb _1yep5z61vc"],[{isHovered:true,isInline:true},"_1yep5z61vc _1yep5z61rf _1yep5z61v9 _1yep5z61vb"],[{isHovered:true,isInline:false,accent:"positive"},"_1yep5z61pn"],[{isHovered:true,isInline:false,accent:"theme"},"_1yep5z61pf"],[{isHovered:true,isInline:true,accent:"theme"},"_1yep5z61pc"]]});var B=F.forwardRef(({className:R,style:T,isDisabled:e,isInline:a=true,imageAlt:y,imageSrc:p,svgSrc:t,textValue:r,textStyle:q,onPress:E,onDelete:n,deleteAriaLabel:M,addAriaLabel:z,accent:L="positive","data-block-id":U,"data-block-class":Y,..._},A)=>{let{focusProps:m,isFocused:G,isFocusVisible:l}=a$1({within:true}),{isHovered:u,hoverProps:v}=a$2({isDisabled:e}),{pressProps:c$2}=d({isDisabled:e,onPress:E});a$3(p||t||r,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop.");let f=a$4({"data-hovered":u,"data-focus-visible":l,"data-focused":G,"data-disabled":e}),[J,K]=F.useState("");return a$5(()=>{K(typeof t=="string"?V.default.sanitize(t):"");},[t]),jsxs("div",{..._,className:a$7(j({isInline:a,isFocusVisible:l,isDisabled:e,isHovered:u,accent:L}),"BaselineUI-Preview",R),"data-block-id":U,"data-block-class":Y,"aria-label":_["aria-label"]||y||r,style:T,ref:A,children:[typeof t=="string"?jsx("button",{disabled:e,...c(v,m,c$2,f),className:o,"aria-label":z,dangerouslySetInnerHTML:{__html:J}}):jsxs("button",{...c(v,m,c$2,f),disabled:e,style:q,"aria-label":z,className:o,children:[p?jsx("img",{src:p,alt:y,className:c$1({isInline:a,isDisabled:e})}):null,!!t&&typeof t=="object"&&t,r]}),n?jsx(a$6,{isDisabled:e,className:N,"aria-label":M,size:"xs",icon:TrashIcon,onPress:n}):null]})});B.displayName="Preview";export{B as a};
@@ -1,10 +0,0 @@
1
- import {d}from'./chunk-35AM4QEA.mjs';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- function s(...e){return e.length===1&&e[0]?e[0]:n=>{let r=false,o=e.map(t=>{let f=u(t,n);return r||=typeof f=="function",f});if(r)return ()=>{o.forEach((t,f)=>{typeof t=="function"?t():u(e[f],null);});}}}function u(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n);}function p(...e){return (...n)=>{for(let r of e)typeof r=="function"&&r(...n);}}function c(e){var n,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var t=e.length;for(n=0;n<t;n++)e[n]&&(r=c(e[n]))&&(o&&(o+=" "),o+=r);}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function y(){for(var e,n,r=0,o="",t=arguments.length;r<t;r++)(e=arguments[r])&&(n=c(e))&&(o&&(o+=" "),o+=n);return o}var a=y;function v(...e){let n={...e[0]};for(let r=1;r<e.length;r++){let o=e[r];for(let t in o){let f=n[t],i=o[t];typeof f=="function"&&typeof i=="function"&&t[0]==="o"&&t[1]==="n"&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90?n[t]=p(f,i):(t==="className"||t==="UNSAFE_className")&&typeof f=="string"&&typeof i=="string"?n[t]=a(f,i):t==="id"&&f&&i?n.id=d(f,i):t==="ref"&&f&&i?n.ref=s(f,i):n[t]=i!==void 0?i:f;}}return n}export{p as a,s as b,v as c};
@@ -1,10 +0,0 @@
1
- import {c}from'./chunk-VSGVHATE.mjs';import {i as i$1}from'./chunk-NQVTVL24.mjs';import {a as a$1}from'./chunk-SVIYLH7R.mjs';import {e}from'./chunk-35AM4QEA.mjs';import {a,i,h}from'./chunk-TYOEGCPS.mjs';import {useRef,useEffect}from'react';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- function E(r,e$1){let{role:d="dialog",isEntering:b}=r,i$2=e([],e$1);i$2=r["aria-label"]?void 0:i$2;let a$2=e([],e$1);a$2=d==="alertdialog"&&!r["aria-describedby"]?a$2:void 0;let o=useRef(false);useEffect(()=>{if(b||!e$1.current)return;let t=a(e$1.current),l=i(t);if(!h(e$1.current,l)){i$1(e$1.current);let n=setTimeout(()=>{let g=i(t);(g===e$1.current||g===t.body)&&(o.current=true,e$1.current&&(e$1.current.blur(),i$1(e$1.current)),o.current=false);},500);return ()=>{clearTimeout(n);}}},[e$1,b]),c();let m=useRef(false);useEffect(()=>{if(process.env.NODE_ENV!=="production"&&!m.current&&e$1.current){let t=e$1.current,l=t.hasAttribute("aria-label"),n=t.hasAttribute("aria-labelledby");!l&&!n&&(console.warn("A dialog must have a title for accessibility. Either provide an aria-label or aria-labelledby prop, or render a heading element inside the dialog."),m.current=true);}});let O=r["aria-describedby"]??a$2;return {dialogProps:{...a$1(r,{labelable:true}),role:d,tabIndex:-1,"aria-labelledby":r["aria-labelledby"]??i$2,"aria-describedby":O,onBlur:t=>{o.current&&t.stopPropagation();}},titleProps:{id:i$2},contentProps:{id:a$2}}}export{E as a};
@@ -1,10 +0,0 @@
1
- import {a as a$6}from'./chunk-HPUUQKKH.mjs';import {a as a$1}from'./chunk-ALMW6S4I.mjs';import {a as a$4}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-FDDB7QNQ.mjs';import {a as a$3}from'./chunk-LRFFL765.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {c}from'./chunk-PJINRIA6.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import i from'react';import {jsx}from'react/jsx-runtime';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- var D="_1h7pyh00",R="_1yep5z61vb _1yep5z61v9 _1yep5z61rf _1yep5z61vc";var _=i.forwardRef(({className:r,style:s,children:g,childClassName:a$7,childStyle:p,elementType:t="button",...o},x)=>{let e=i.Children.only(g);if(!i.isValidElement(e))throw new Error("Actionable: children must be a single React element");let b=a(x),{buttonProps:B,isPressed:f}=a$1({...o,elementType:t},b),{isFocusVisible:c$1,isFocused:m,focusProps:C}=a$2(),{hoverProps:F,isHovered:u}=a$3({isDisabled:o.isDisabled}),z=a$4({"data-focused":m,"data-focus-visible":c$1,"data-disabled":o.isDisabled,"data-hovered":u,"data-pressed":f}),n={isHovered:u,isFocused:m,isPressed:f,isDisabled:o.isDisabled,isFocusVisible:c$1},w=i.cloneElement(e,{className:a$5(e.props.className,{[R]:c$1},typeof a$7=="function"?a$7(n):a$7,"BaselineUI-Actionable-Child"),style:{...e.props.style,...typeof p=="function"?p(n):p}});return jsx(t==="button"?"button":t,{...c(a$6(t,o.isDisabled),B,F,C),...z,className:a$5(D,"BaselineUI-Actionable",typeof r=="function"?r(n):r),ref:b,style:typeof s=="function"?s(n):s,children:w})});_.displayName="Actionable";export{_ as a};
@@ -1,10 +0,0 @@
1
- import {a as a$1}from'./chunk-3PBFSDMT.mjs';import {j,i}from'./chunk-NQVTVL24.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {c,v as v$1}from'./chunk-SCJ3RG7B.mjs';import {b as b$1,c as c$1}from'./chunk-PJINRIA6.mjs';import {b}from'./chunk-TYOEGCPS.mjs';import n,{forwardRef,useEffect,useRef,useContext}from'react';import {jsx}from'react/jsx-runtime';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- var h=n.createContext(null);function v(r){let t=useContext(h)||{};v$1(t,r);let{ref:l,...s}=t;return s}var W=n.forwardRef(function(t,l){let{children:s,...a$1}=t,c=a(l),o={...a$1,ref:c};return jsx(h.Provider,{value:o,children:s})});function w(r,t){let{focusProps:l}=a$1(r),{keyboardProps:s}=j(r),a=c$1(l,s),c=v(t),o=r.isDisabled?{}:c,e=useRef(r.autoFocus);useEffect(()=>{e.current&&t.current&&i(t.current),e.current=false;},[t]);let b=r.excludeFromTabOrder?-1:0;return r.isDisabled&&(b=void 0),{focusableProps:c$1({...a,tabIndex:b},o)}}var $=forwardRef(({children:r,...t},l)=>{l=a(l);let{focusableProps:s}=w(t,l),a$1=n.Children.only(r);useEffect(()=>{if(process.env.NODE_ENV==="production")return;let o=l.current;if(!o||!(o instanceof b(o).Element)){console.error("<Focusable> child must forward its ref to a DOM element.");return}if(!t.isDisabled&&!c(o,{skipVisibilityCheck:true})){console.warn("<Focusable> child must be focusable. Please ensure the tabIndex prop is passed through.");return}if(o.localName!=="button"&&o.localName!=="input"&&o.localName!=="select"&&o.localName!=="textarea"&&o.localName!=="a"&&o.localName!=="area"&&o.localName!=="summary"&&o.localName!=="img"&&o.localName!=="svg"){let e=o.getAttribute("role");e?e!=="application"&&e!=="button"&&e!=="checkbox"&&e!=="combobox"&&e!=="gridcell"&&e!=="link"&&e!=="menuitem"&&e!=="menuitemcheckbox"&&e!=="menuitemradio"&&e!=="option"&&e!=="radio"&&e!=="searchbox"&&e!=="separator"&&e!=="slider"&&e!=="spinbutton"&&e!=="switch"&&e!=="tab"&&e!=="tabpanel"&&e!=="textbox"&&e!=="treeitem"&&e!=="img"&&e!=="meter"&&e!=="progressbar"&&console.warn(`<Focusable> child must have an interactive ARIA role. Got "${e}".`):console.warn("<Focusable> child must have an interactive ARIA role.");}},[l,t.isDisabled]);let c$2=parseInt(n.version,10)<19?a$1.ref:a$1.props.ref;return n.cloneElement(a$1,{...c$1(s,a$1.props),ref:b$1(c$2,l)})});export{h as a,W as b,w as c,$ as d};
@@ -1,10 +0,0 @@
1
- import {a as a$6}from'./chunk-UI4SJCQU.mjs';import {a as a$4}from'./chunk-7SKQUEHP.mjs';import {b,d as d$1,a as a$5,c as c$2}from'./chunk-W6QO7FPZ.mjs';import {b as b$1}from'./chunk-DLJHL4V7.mjs';import {e,h,c,d,g}from'./chunk-NYNS3UDR.mjs';import {a}from'./chunk-FDDB7QNQ.mjs';import {a as a$1}from'./chunk-LRFFL765.mjs';import {a as a$3}from'./chunk-RT4LMB6X.mjs';import {c as c$1,b as b$2}from'./chunk-PJINRIA6.mjs';import {a as a$2}from'./chunk-SVIYLH7R.mjs';import {createContext,forwardRef,useContext,useMemo,useRef,useEffect}from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- var W=new WeakMap;function C(o,e,t){let{labelProps:n,inputProps:a,descriptionProps:r,errorMessageProps:i,isSelected:l,isPressed:d,isDisabled:u,isReadOnly:m,isInvalid:f,validationErrors:b,validationDetails:x}=a$6(o,e,t),{isIndeterminate:c}=o;return useEffect(()=>{t.current&&(t.current.indeterminate=!!c);}),{labelProps:c$1(n,useMemo(()=>({onMouseDown:s=>s.preventDefault()}),[])),inputProps:a,descriptionProps:r,errorMessageProps:i,isSelected:l,isPressed:d,isDisabled:u,isReadOnly:m,isInvalid:f,validationErrors:b,validationDetails:x}}function O(o,e,t){let n=a$4({isReadOnly:o.isReadOnly||e.isReadOnly,isSelected:e.isSelected(o.value),defaultSelected:e.defaultValue.includes(o.value),onChange(s){s?e.addValue(o.value):e.removeValue(o.value),o.onChange&&o.onChange(s);}}),{name:a,form:r,descriptionId:i,errorMessageId:l,validationBehavior:d}=W.get(e);d=o.validationBehavior??d;let{realtimeValidation:u}=d$1({...o,value:n.isSelected,name:void 0,validationBehavior:"aria"}),m=useRef(a$5),f=()=>{e.setInvalid(o.value,u.isInvalid?u:m.current);};useEffect(f);let b=e.realtimeValidation.isInvalid?e.realtimeValidation:u,x=d==="native"?e.displayValidation:b,c=C({...o,isReadOnly:o.isReadOnly||e.isReadOnly,isDisabled:o.isDisabled||e.isDisabled,name:o.name||a,form:o.form||r,isRequired:o.isRequired??e.isRequired,validationBehavior:d,[c$2]:{realtimeValidation:b,displayValidation:x,resetValidation:e.resetValidation,commitValidation:e.commitValidation,updateValidation(s){m.current=s,f();}}},n,t);return {...c,inputProps:{...c.inputProps,"aria-describedby":[c.inputProps["aria-describedby"],e.isInvalid?l:null,i].filter(Boolean).join(" ")||void 0}}}var k=createContext(null);forwardRef(function(e$1,t){[e$1,t]=e(e$1,t,k);let{validationErrors:n,validationBehavior:a="native",children:r,className:i,...l}=e$1;return jsx(h.form,{noValidate:a!=="native",...l,ref:t,className:i||"react-aria-Form",children:jsx(k.Provider,{value:{...e$1,validationBehavior:a},children:jsx(b.Provider,{value:n??{},children:r})})})});var re=createContext(null),mo=createContext(null);createContext(null);var ie=createContext(null);var z=createContext(null);function ae(o,e){let{validationBehavior:t}=d(k)||{},n=o.validationBehavior??t??"native",a=useContext(ie),r=a$3(useMemo(()=>b$2(e,o.inputRef!==void 0?o.inputRef:null),[e,o.inputRef])),i={...g(o),children:typeof o.children=="function"?true:o.children,value:o.value,validationBehavior:n};return [a?O(i,a,r):C(i,a$4(o),r),r]}var xo=forwardRef(function(e$1,t){let{inputRef:n=null,...a}=e$1;[e$1,t]=e(a,t,re);let[r,i]=ae(e$1,n);return jsx(z.Provider,{value:{...r,inputRef:i,defaultClassName:"react-aria-Checkbox",isIndeterminate:e$1.isIndeterminate,isRequired:e$1.isRequired},children:jsx(ne,{...e$1,ref:t})})}),ne=forwardRef(function(e,t){let{labelProps:n,inputProps:a$3,isSelected:r,isDisabled:i,isReadOnly:l,isPressed:d,isInvalid:u,inputRef:m,defaultClassName:f,isIndeterminate:b,isRequired:x}=useContext(z),{isFocused:c$2,isFocusVisible:s,focusProps:J}=a(),K=i||l,{hoverProps:Q,isHovered:g}=a$1({...e,isDisabled:K}),T=c({...e,defaultClassName:f,values:{isSelected:r,isIndeterminate:b||false,isPressed:d,isHovered:g,isFocused:c$2,isFocusVisible:s,isDisabled:i,isReadOnly:l,isInvalid:u,isRequired:x||false}}),I=a$2(e,{global:true});return delete I.id,delete I.onClick,jsxs(h.label,{...c$1(I,n,Q,T),ref:t,slot:e.slot||void 0,"data-selected":r||void 0,"data-indeterminate":b||void 0,"data-pressed":d||void 0,"data-hovered":g||void 0,"data-focused":c$2||void 0,"data-focus-visible":s||void 0,"data-disabled":i||void 0,"data-readonly":l||void 0,"data-invalid":u||void 0,"data-required":x||void 0,children:[jsx(b$1,{elementType:"span",children:jsx("input",{...c$1(a$3,J),ref:m})}),T.children]})});export{re as a,mo as b,xo as c};
@@ -1,10 +0,0 @@
1
- import {a as a$4,d as d$1,c as c$3,b as b$4}from'./chunk-KRVEGSVY.mjs';import {b as b$3}from'./chunk-KG2EHFYA.mjs';import {d,g,b}from'./chunk-NYNS3UDR.mjs';import {b as b$2,a as a$7,i as i$1}from'./chunk-OS6PVCFX.mjs';import {a as a$6}from'./chunk-QSFRMY47.mjs';import {a as a$5}from'./chunk-UR42GQO4.mjs';import {a}from'./chunk-FPM5UJRF.mjs';import {c as c$2,e}from'./chunk-NQVTVL24.mjs';import {a as a$3}from'./chunk-RT4LMB6X.mjs';import {h,l,u}from'./chunk-SCJ3RG7B.mjs';import {c,b as b$1}from'./chunk-PJINRIA6.mjs';import {c as c$1,a as a$2}from'./chunk-35AM4QEA.mjs';import {i,a as a$1,j,k}from'./chunk-TYOEGCPS.mjs';import {createContext,useRef,useState,useEffect,useCallback,useMemo}from'react';import {jsx}from'react/jsx-runtime';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- var ie={"ar-AE":{collectionLabel:"\u0645\u0642\u062A\u0631\u062D\u0627\u062A"},"bg-BG":{collectionLabel:"\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F"},"cs-CZ":{collectionLabel:"N\xE1vrhy"},"da-DK":{collectionLabel:"Forslag"},"de-DE":{collectionLabel:"Empfehlungen"},"el-GR":{collectionLabel:"\u03A0\u03C1\u03BF\u03C4\u03AC\u03C3\u03B5\u03B9\u03C2"},"en-US":{collectionLabel:"Suggestions"},"es-ES":{collectionLabel:"Sugerencias"},"et-EE":{collectionLabel:"Soovitused"},"fi-FI":{collectionLabel:"Ehdotukset"},"fr-FR":{collectionLabel:"Suggestions"},"he-IL":{collectionLabel:"\u05D4\u05E6\u05E2\u05D5\u05EA"},"hr-HR":{collectionLabel:"Prijedlozi"},"hu-HU":{collectionLabel:"Javaslatok"},"it-IT":{collectionLabel:"Suggerimenti"},"ja-JP":{collectionLabel:"\u5019\u88DC"},"ko-KR":{collectionLabel:"\uC81C\uC548"},"lt-LT":{collectionLabel:"Pasi\u016Blymai"},"lv-LV":{collectionLabel:"Ieteikumi"},"nb-NO":{collectionLabel:"Forslag"},"nl-NL":{collectionLabel:"Suggesties"},"pl-PL":{collectionLabel:"Sugestie"},"pt-BR":{collectionLabel:"Sugest\xF5es"},"pt-PT":{collectionLabel:"Sugest\xF5es"},"ro-RO":{collectionLabel:"Sugestii"},"ru-RU":{collectionLabel:"\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F"},"sk-SK":{collectionLabel:"N\xE1vrhy"},"sl-SI":{collectionLabel:"Predlogi"},"sr-SP":{collectionLabel:"Predlozi"},"sv-SE":{collectionLabel:"F\xF6rslag"},"tr-TR":{collectionLabel:"\xD6neriler"},"uk-UA":{collectionLabel:"\u041F\u0440\u043E\u043F\u043E\u0437\u0438\u0446\u0456\u0457"},"zh-CN":{collectionLabel:"\u5EFA\u8BAE"},"zh-TW":{collectionLabel:"\u5EFA\u8B70"}};function O(i$2,n){let{inputRef:l$1,collectionRef:o,filter:c$4,disableAutoFocusFirst:m=false,disableVirtualFocus:E=false}=i$2,b=c$1(),a=useRef(void 0),s=useRef(false),r=useRef(null),se=c$2()==="virtual"&&(h()||l()),[P,pe]=useState(!se&&!E),[D,K]=useState(false),[de,M]=useState(false);useEffect(()=>()=>clearTimeout(a.current),[]);let H=u(e$1=>{!e$1.isTrusted&&P&&l$1.current&&i(a$1(l$1.current))!==l$1.current&&e()!=="touch"&&l$1.current.focus();let t=j(e$1);e$1.isTrusted||!t||r.current===t.id||(clearTimeout(a.current),t!==o.current?s.current?(r.current=t.id,a.current=setTimeout(()=>{n.setFocusedNodeId(t.id);},500)):(r.current=t.id,n.setFocusedNodeId(t.id)):r.current&&!k(r.current,a$1(o.current))&&(r.current=null,n.setFocusedNodeId(null)),s.current=false);}),[F,fe]=useState(null),U=useCallback(e=>{fe(e),e!=null?(e.getAttribute("tabindex")!=null&&pe(false),K(true)):K(false);},[]);a$2(()=>(F?.addEventListener("focusin",H),()=>{F?.removeEventListener("focusin",H);}),[F]);let me=a$3(useMemo(()=>b$1(o,U),[o,U])),be=useCallback(()=>{if(!o.current){M(true);return}s.current=true,o.current?.dispatchEvent(new CustomEvent(b$2,{cancelable:true,bubbles:true,detail:{focusStrategy:"first"}}));},[o]),x=useCallback(e=>{M(false),a$4(i(a$1(l$1.current))),r.current=null,n.setFocusedNodeId(null);let t=new CustomEvent(a$7,{cancelable:true,bubbles:true,detail:{clearFocusKey:e}});clearTimeout(a.current),s.current=false,o.current?.dispatchEvent(t);},[o,n]),p=useRef("");a$5(l$1,"beforeinput",e=>{let{inputType:t}=e;p.current=t;});let ve=e=>{(p.current==="insertText"||p.current==="insertCompositionText"||p.current==="insertFromComposition")&&!m?be():p.current&&(p.current.includes("insert")||p.current.includes("delete")||p.current.includes("history"))&&(x(true),d$1(a$1(l$1.current))===l$1.current&&c$3(l$1.current,null)),n.setInputValue(e);},B=useRef(null),Ee=e=>{if(B.current=j(e.nativeEvent),e.nativeEvent.isComposing)return;let t=r.current;switch(t!==null&&a$1(l$1.current).getElementById(t)==null&&(r.current=null,t=null),e.key){case "a":if(i$1(e))return;break;case "Escape":if(e.isDefaultPrevented())return;break;case " ":return;case "Tab":"continuePropagation"in e&&e.continuePropagation();return;case "Home":case "End":case "PageDown":case "PageUp":case "ArrowUp":case "ArrowDown":case "ArrowRight":case "ArrowLeft":{if((e.key==="Home"||e.key==="End")&&t==null&&e.shiftKey)return;if(e.key==="ArrowRight"||e.key==="ArrowLeft"){if(t==null){e.isPropagationStopped()||e.stopPropagation();return}break}e.preventDefault();let A=new CustomEvent(b$2,{cancelable:true,bubbles:true});o.current?.dispatchEvent(A);break}}e.isPropagationStopped()||e.stopPropagation();let d=true;if(o.current!==null)if(t==null)d=o.current?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type,e.nativeEvent))||false;else {let A=k(t,a$1(o.current));A&&(d=A?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type,e.nativeEvent))||false);}if(d)switch(e.key){case "ArrowLeft":case "ArrowRight":{x();break}case "Enter":t!=null&&k(t,a$1(l$1.current))?.dispatchEvent(new PointerEvent("click",e.nativeEvent));break}else e.preventDefault();},S=u(e=>{if(j(e)===B.current){e.stopImmediatePropagation();let t=r.current;t==null?o.current?.dispatchEvent(new KeyboardEvent(e.type,e)):k(t,a$1(o.current))?.dispatchEvent(new KeyboardEvent(e.type,e));}});useEffect(()=>{let e=a$1(l$1.current);return e.addEventListener("keyup",S,true),()=>{e.removeEventListener("keyup",S,true);}},[S]);let Ae=b$3(ie,"@react-aria/autocomplete"),ge=a$6({id:b,"aria-label":Ae.format("collectionLabel")}),Pe=useCallback((e,t)=>c$4?c$4(e,n.inputValue,t):true,[n.inputValue,c$4]),Fe=e=>{if(!e.isTrusted)return;let t=r.current?k(r.current,a$1(l$1.current)):null;t&&b$4(t,e.relatedTarget);},Te=e=>{if(!e.isTrusted)return;if(r.current?k(r.current,a$1(l$1.current)):null){let d=j(e.nativeEvent);queueMicrotask(()=>{b$4(d,o.current),c$3(o.current,d);});}},Le=e=>{e.button!==0||e.pointerType==="touch"||r.current==null||l$1.current==null||j(e)===l$1.current&&x();},h$1={value:n.inputValue,onChange:ve},ye={onKeyDown:Ee,"aria-activedescendant":n.focusedNodeId??void 0,onBlur:Fe,onFocus:Te,onPointerDown:Le};return h$1={...h$1,...P&&D&&ye,enterKeyHint:"go","aria-controls":D?b:void 0,"aria-autocomplete":"list",autoCorrect:"off",spellCheck:"false",autoComplete:"off"},{inputProps:h$1,collectionProps:c(ge,{shouldUseVirtualFocus:P,disallowTypeAhead:P,autoFocus:de?"first":false}),collectionRef:me,filter:c$4!=null?Pe:void 0}}function w(i){let{onInputChange:n,inputValue:l,defaultInputValue:o=""}=i,c=s=>{n&&n(s);},[m,E]=useState(null),[b,a$1]=a(l,o,c);return {inputValue:b,setInputValue:a$1,focusedNodeId:m,setFocusedNodeId:E}}var Se=createContext(null),he=createContext(null),Ie=createContext(null),Ve=createContext(null);function Ft(i){let n=d(Se,i.slot);i=c(n,i);let{filter:l,disableAutoFocusFirst:o}=i,c$1=w(i),m=useRef(null),E=useRef(null),{inputProps:b$1,collectionProps:a,collectionRef:s,filter:r}=O({...g(i),filter:l,disableAutoFocusFirst:o,inputRef:m,collectionRef:E},c$1);return jsx(b,{values:[[he,c$1],[Ve,{...b$1,ref:m}],[Ie,{...a,filter:r,ref:s}]],children:i.children})}export{he as a,Ie as b,Ve as c,Ft as d};
@@ -1,10 +0,0 @@
1
- import {c}from'./chunk-L3SNGDBH.mjs';import {b}from'./chunk-DF2D7NE6.mjs';import {a as a$2}from'./chunk-DIL5HL6K.mjs';import {a as a$5}from'./chunk-LHLY432N.mjs';import {a as a$4}from'./chunk-VQHI3ZCW.mjs';import {b as b$1}from'./chunk-ES3IQZSH.mjs';import {e}from'./chunk-D2NVLRIU.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {a as a$1}from'./chunk-66CUIXA6.mjs';import {j}from'./chunk-NQVTVL24.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {u}from'./chunk-SCJ3RG7B.mjs';import {c as c$1}from'./chunk-PJINRIA6.mjs';import {a as a$7}from'./chunk-SVIYLH7R.mjs';import {a as a$6}from'./chunk-35AM4QEA.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import z,{useMemo,useState,useEffect}from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- var _={none:"toolbar",single:"radiogroup",multiple:"toolbar"};function P(e$1,o,t){let{isDisabled:i,orientation:n="horizontal"}=e$1,[a,c]=useState(false);a$6(()=>{c(!!(t.current&&t.current.parentElement?.closest('[role="toolbar"]')));},[t]),[...o.collection.getKeys()].some(A=>!o.disabledKeys.has(A))||(i=true);let{direction:s}=b$2(),r=e(t),p=s==="rtl",{keyboardProps:d}=j({shortcuts:{ArrowRight:()=>{p?r.focusPrevious({wrap:true}):r.focusNext({wrap:true});},ArrowDown:()=>{r.focusNext({wrap:true});},ArrowLeft:()=>{p?r.focusNext({wrap:true}):r.focusPrevious({wrap:true});},ArrowUp:()=>{r.focusPrevious({wrap:true});}},allowRepeats:true}),l=_[o.selectionManager.selectionMode];return a&&l==="toolbar"&&(l="group"),{actionGroupProps:{...a$7(e$1,{labelable:true}),role:l,"aria-orientation":l==="toolbar"?n:void 0,"aria-disabled":i,...d}}}var U={none:void 0,single:"radio",multiple:"checkbox"};function x(e,o,t){let i=o.selectionManager.selectionMode,n={role:U[i]};if(i!=="none"){let u=o.selectionManager.isSelected(e.key);n["aria-checked"]=u;}let a=e.key===o.selectionManager.focusedKey,c=u(()=>{a&&o.selectionManager.setFocusedKey(null);});return useEffect(()=>()=>{c();},[]),{buttonProps:c$1(n,{tabIndex:a||o.selectionManager.focusedKey==null?0:-1,onFocus(){o.selectionManager.setFocusedKey(e.key);},onPress(){o.selectionManager.select(e.key);}})}}var h="_1yep5z6f9",F="_1dc3b8m0";var N=z.forwardRef(({className:e,selectionMode:o,style:t,"data-block-id":i,"data-block-class":n,tooltipProps:a$4,icon:c$1,renderActionItem:u,...s},r)=>{let p=a(r),d=c(),l=b({...s,selectionMode:o,suppressTextValueWarning:true,children:d}),{actionGroupProps:A}=P({...s,selectionMode:o,children:d},l,p),g=[...l.collection].map(I=>(a$1(I.value),jsx(V,{item:I,state:l,isDisabled:s.isDisabled,onAction:s.onAction,tooltipProps:a$4,renderActionItem:u},I.key)));return c$1?jsxs(a$2,{...A,display:"flex",flexDirection:"row",gap:"md",alignItems:"center",className:a$3("BaselineUI-ActionGroup",e),"data-block-id":i,"data-block-class":n,style:t,ref:p,children:[jsx(c$1,{"aria-hidden":"true",size:24,className:h}),jsx(a$2,{display:"flex",flexDirection:"row",gap:"xs",flex:1,children:g})]}):jsx(a$2,{...A,display:"flex",flexDirection:"row",gap:"xs",className:a$3("BaselineUI-ActionGroup",e),"data-block-id":i,"data-block-class":n,style:t,ref:p,children:g})});N.displayName="ActionGroup";var V=({item:e,state:o,tooltipProps:t,renderActionItem:i,onAction:n,isDisabled:a})=>{let{buttonProps:c}=x({key:e.key},o),u=a||o.selectionManager.isDisabled(e.key),s=o.selectionManager.isSelected(e.key);a$1(e.value);let{icon:r}=e.value;a$1(r);let p=useMemo(()=>(a$1(e.value),typeof t=="function"?t(e.value):t),[t,e.value]);return jsx(b$1,{...c$1(c,{onPress:()=>{n?.(e.key);}}),children:jsx(a$4,{text:e.textValue,size:"sm",variant:"inverse",includeArrow:false,offset:4,...p,children:i?.(e,{isSelected:s,isDisabled:u})||jsx(a$5,{variant:"tertiary",icon:r,"aria-label":e.textValue,size:"sm",isDisabled:u,className:a$3({[F]:s},"BaselineUI-ActionGroup-Item")})})})};export{N as a,V as b};
@@ -1,10 +0,0 @@
1
- import {a as a$3}from'./chunk-OKEXEU3C.mjs';import {a}from'./chunk-UBC32WQB.mjs';import {d,c}from'./chunk-W6QO7FPZ.mjs';import {a as a$2}from'./chunk-WAPBLICF.mjs';import {c as c$1}from'./chunk-QVFGEXDU.mjs';import {d as d$1}from'./chunk-IIBBR266.mjs';import {c as c$2}from'./chunk-PJINRIA6.mjs';import {a as a$1}from'./chunk-SVIYLH7R.mjs';import {j}from'./chunk-TYOEGCPS.mjs';import {useState}from'react';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- function pe(r,i,t){let{isDisabled:a$4=false,isReadOnly:l=false,value:u,name:R,form:V,children:k,isRequired:b,validationBehavior:P="aria","aria-label":C,"aria-labelledby":x,"aria-describedby":F,onPressStart:c$3,onPressEnd:m,onPressChange:n,onPress:f,onPressUp:g,onClick:v}=r,s=d({...r,value:i.isSelected}),{isInvalid:T,validationErrors:j$1,validationDetails:q}=s.displayValidation;a(r,s,t);let W=e=>{e.stopPropagation(),i.setSelected(j(e).checked);},B=k!=null,N=C!=null||x!=null;!B&&!N&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:U,isPressed:w}=d$1({onPressStart:c$3,onPressEnd:m,onPressChange:n,onPress:f,onPressUp:g,onClick:v,isDisabled:a$4}),[_,y]=useState(false),{pressProps:z}=d$1({onPressStart(e){if(e.pointerType==="keyboard"||e.pointerType==="virtual"){e.continuePropagation();return}c$3?.(e),n?.(true),y(true);},onPressEnd(e){if(e.pointerType==="keyboard"||e.pointerType==="virtual"){e.continuePropagation();return}m?.(e),n?.(false),y(false);},onPressUp(e){if(e.pointerType==="keyboard"||e.pointerType==="virtual"){e.continuePropagation();return}g?.(e);},onClick:v,onPress(e){if(e.pointerType==="keyboard"||e.pointerType==="virtual"){e.continuePropagation();return}f?.(e),i.toggle(),t.current?.focus();let{[c]:S}=r,{commitValidation:Q}=S||s;Q();},isDisabled:a$4||l}),{focusableProps:G}=c$1(r,t),J=c$2(U,G),K=a$1(r,{labelable:true});a$2(t,i.defaultSelected,i.setSelected);let L=a$3(),M=a$3();return {labelProps:c$2(z,{onClick:e=>e.preventDefault()}),inputProps:c$2(K,{checked:i.isSelected,"aria-required":b&&P==="aria"||void 0,required:b&&P==="native","aria-invalid":T||r.validationState==="invalid"||void 0,"aria-errormessage":r["aria-errormessage"],"aria-controls":r["aria-controls"],"aria-readonly":l||void 0,"aria-describedby":[L.id,M.id,F].filter(Boolean).join(" ")||void 0,onChange:W,disabled:a$4,...u==null?{}:{value:u},name:R,form:V,type:"checkbox",...J}),descriptionProps:L,errorMessageProps:M,isSelected:i.isSelected,isPressed:w||_,isDisabled:a$4,isReadOnly:l,isInvalid:T||r.validationState==="invalid",validationErrors:j$1,validationDetails:q}}export{pe as a};
@@ -1,11 +0,0 @@
1
- import {a as a$2}from'./chunk-67QIBKUN.mjs';import {a as a$6}from'./chunk-KMZ3YVPE.mjs';import {a as a$e}from'./chunk-JBXZ6ZHP.mjs';import {a as a$b}from'./chunk-BPW4QRPV.mjs';import {a as a$d}from'./chunk-JTGVIAOK.mjs';import {a as a$c}from'./chunk-DIL5HL6K.mjs';import {a as a$a}from'./chunk-54MWEZUP.mjs';import {a as a$4}from'./chunk-KFJE5ZBK.mjs';import {a as a$8}from'./chunk-WD2TPSZV.mjs';import {a as a$9,b as b$2}from'./chunk-RSKKEGJZ.mjs';import {a as a$5}from'./chunk-FDDB7QNQ.mjs';import {a as a$7}from'./chunk-3PBFSDMT.mjs';import {j}from'./chunk-NQVTVL24.mjs';import {d}from'./chunk-IIBBR266.mjs';import {b,c}from'./chunk-PJINRIA6.mjs';import {c as c$1}from'./chunk-35AM4QEA.mjs';import {a as a$3,b as b$1}from'./chunk-TYOEGCPS.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import R,{useContext,useMemo,useRef,useCallback,useEffect,useImperativeHandle,useState}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {PlusIcon}from'@baseline-ui/icons/12';import {themeVars}from'@baseline-ui/tokens';import {useGranularEffect}from'granular-hooks';import Ze from'just-camel-case';import*as it from'comlink';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- var vt={node:null,setNode:()=>{},coordinates:null,setCoordinates:()=>{},displayId:void 0,setDisplayId:()=>{},boundsRef:{current:null},isDisabled:false,cursorNode:null,setCursorNode:()=>{},children:null,setChildren:()=>{}},h=R.createContext(vt),ke=R.memo(({children:e,isDisabled:t=false})=>{let[n,r]=R.useState(null),[a,i]=R.useState(null),[s,c]=R.useState(null),p=R.useRef(null),[o,l]=R.useState(null),[m,k]=R.useState(),u=R.useMemo(()=>({node:n,setNode:r,coordinates:o,setCoordinates:l,displayId:m,setDisplayId:k,boundsRef:p,isDisabled:t,cursorNode:a,setCursorNode:i,children:s,setChildren:c}),[n,o,m,l,r,p,t,a,i,s,c]);return jsx(h.Provider,{value:u,children:e})});ke.displayName="PointPicker";var Ee="m0xg2me";var _e="m0xg2md _1yep5z6iw _1yep5z6ix _1yep5z6iy _1yep5z6mh _1yep5z6mg _1yep5z6ho",Re="m0xg2mj",ze="_1yep5z6fa",De="m0xg2mk m0xg2mj",Ie=a({defaultClassName:"m0xg2m0",variantClassNames:{isDisabled:{true:"m0xg2m1",false:"m0xg2m2"},isIndicatorVisible:{true:"m0xg2m3",false:"m0xg2m4"}},defaultVariants:{},compoundVariants:[[{isDisabled:false,isIndicatorVisible:true},"m0xg2m5"],[{isDisabled:false,isIndicatorVisible:false},"m0xg2m6"]]}),Me="m0xg2m8",Ne="m0xg2mb",Z="m0xg2ma _1yep5z6hp _1yep5z6mf",Ae="m0xg2m9 _1yep5z6je _1yep5z6jf _1yep5z6jg _1yep5z6hg _1yep5z6mf _1yep5z6it _1yep5z6iu _1yep5z6iv",Le="m0xg2m7",Te="m0xg2mc",Se="m0xg2mf";var $=a$1(_e,"BaselineUI-PointPicker-GridLine"),kt=({coordinates:e})=>jsxs(Fragment,{children:[jsx("div",{className:$,"data-grid-line-type":"vertical",style:{height:e.y-5,transform:`translate(${e.x}px, 0) translate(-1px, 0) scaleX(0.5)`}}),jsx("div",{className:$,"data-grid-line-type":"vertical",style:{height:`calc(100% - ${e.y+4}px)`,transform:`translate(${e.x}px, ${e.y+5}px) translate(-1px, 0) scaleX(0.5)`}})]}),Et=({coordinates:e})=>jsxs(Fragment,{children:[jsx("div",{className:$,"data-grid-line-type":"horizontal",style:{width:e.x-5,transform:`translate(0, ${e.y}px) translate(0, -1px) scaleY(0.5)`}}),jsx("div",{className:$,"data-grid-line-type":"horizontal",style:{width:`calc(100% - ${e.x+4}px)`,transform:`translate(${e.x+5}px, ${e.y}px) translate(0, -1px) scaleY(0.5)`}})]}),Oe=({gridLines:e})=>{let{isDisabled:t,boundsRef:n,coordinates:r}=useContext(h),a=useMemo(()=>{let i=typeof e=="function"?e({coordinates:r,boundingRect:n.current}):e;return typeof i=="boolean"?i?r:void 0:i?.coordinates},[e,r,n]);return a&&!t?jsxs(Fragment,{children:[jsx(kt,{coordinates:a}),jsx(Et,{coordinates:a})]}):null};var Rt=new Set(["ArrowRight","ArrowLeft","ArrowDown","ArrowUp","Home","End","PageUp","PageDown"]);function He({coordinates:e,setCoordinates:t,boundsRef:n,rootRef:r,onKeyDown:a,onKeyUp:i}){let{isDisabled:s}=useContext(h);return j({isDisabled:s,onKeyDown:c=>{a?.(c);let p=c.shiftKey?10:1,o=e&&Rt.has(c.key)?r.current?.getBoundingClientRect():void 0;if(!o||!e){c.isDefaultPrevented()||c.continuePropagation();return}n.current=o;let l;switch(c.key){case "ArrowRight":{c.preventDefault(),l={x:a$e(e.x+p,0,o.width),y:a$e(e.y,0,o.height)};break}case "ArrowLeft":{c.preventDefault(),l={x:a$e(e.x-p,0,o.width),y:a$e(e.y,0,o.height)};break}case "ArrowDown":{c.preventDefault(),l={x:a$e(e.x,0,o.width),y:a$e(e.y+p,0,o.height)};break}case "ArrowUp":{c.preventDefault(),l={x:a$e(e.x,0,o.width),y:a$e(e.y-p,0,o.height)};break}case "Home":{c.preventDefault(),l={x:0,y:a$e(e.y,0,o.height)};break}case "End":{c.preventDefault(),l={x:o.width,y:a$e(e.y,0,o.height)};break}case "PageUp":{c.preventDefault(),l={x:a$e(e.x,0,o.width),y:0};break}case "PageDown":{c.preventDefault(),l={x:a$e(e.x,0,o.width),y:o.height};break}default:{c.isDefaultPrevented()||c.continuePropagation();return}}l&&t(l);},onKeyUp:i})}function Ue(){let{node:e,coordinates:t}=useContext(h);return useMemo(()=>{if(!e||!t)return {x:0,y:0};let{left:n,top:r}=e.getBoundingClientRect();return {x:t.x+n,y:t.y+r}},[t,e])}var{color:Be}=themeVars,$e=R.forwardRef(({modality:e},t)=>e==="keyboard"?jsxs("svg",{width:92,height:92,viewBox:"0 0 92 92",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,className:Re,children:[jsxs("g",{filter:"url(#filter0_d_11407_457970)",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49 43V4h-6v39H4v6h39v39h6V49h39v-6H49zm38 5H48v39h-4V48H5v-4h39V5h4v39h39v4zm-5 28v6h-6v6h12V76h-6zm5 11H77v-4h6v-6h4v10zm-77-5v-6H4v12h12v-6h-6zm5 5H5V77h4v6h6v4zM76 4v6h6v6h6V4H76zm11 11h-4V9h-6V5h10v10zM4 4v12h6v-6h6V4H4zm11 5H9v6H5V5h10v4z",fill:Be.background.positive.subtle}),jsx("path",{d:"M48 44v4h39v-4H48zm-4 4v39h4V48h-4zM5 44v4h39v-4H5zM44 5v39h4V5h-4zm39 72v6h-6v4h10V77h-4zM9 83v-6H5v10h10v-4H9zM77 5v4h6v6h4V5H77zM5 5v10h4V9h6V5H5z",fill:Be.background.positive.interactive.enabled})]}),jsx("defs",{children:jsxs("filter",{id:"filter0_d_11407_457970",x:0,y:0,width:92,height:92,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),jsx("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),jsx("feOffset",{}),jsx("feGaussianBlur",{stdDeviation:2}),jsx("feComposite",{in2:"hardAlpha",operator:"out"}),jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_11407_457970"}),jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_11407_457970",result:"shape"})]})})]}):jsx(PlusIcon,{className:De,ref:t}));$e.displayName="PointPickerIndicatorIcon";var Lt=({trailingElement:e})=>{let{cursorNode:t}=useContext(h),[n,r]=useState({width:0,height:0});return useEffect(()=>{if(!t)return;let a=t.getBoundingClientRect();r(a);let i=new ResizeObserver(s=>{r({width:s[0].contentRect.width,height:s[0].contentRect.height});});return i.observe(t),()=>{i.disconnect();}},[t]),e?jsx(a$c,{position:"absolute",style:{left:0,top:0,zIndex:0,transform:`translate(${n.width/2}px, ${n.height/2}px)`},className:"BaselineUI-PointPickerContent-TrailingElement",children:e}):null},ee=R.forwardRef(({renderTrailingElement:e,renderCursor:t},n)=>{let{coordinates:r,isDisabled:a,node:i}=useContext(h),s=a$2({ownerDocument:a$3(i)}),c=!!(r&&!a),p=useMemo(()=>e?.(),[e]),o=Ue(),l=useMemo(()=>{if(!r)return null;let m=t?.({coordinates:r,modality:s});return m===void 0?jsx($e,{modality:s}):m},[t,r,s]);return c?jsxs(a$4,{style:{left:o.x,top:o.y},className:a$1(Le,"BaselineUI-PointPickerContent-Cursor"),ref:n,children:[l,p?jsx(Lt,{trailingElement:p}):null]}):null});ee.displayName="PointPickerIndicator";var Ke=R.forwardRef(({children:e,className:t,style:n,"data-block-id":r,"data-block-class":a,onFocusChange:i,onBlur:s,onFocus:c$1,onKeyDown:p,onKeyUp:o,gridLines:l=true,elementHandle:m,onMove:k,onPress:u,onPressStart:v,onPressEnd:b$1,renderTrailingElement:w,renderCursor:E},D)=>{let{setNode:C,node:_,coordinates:x,setCoordinates:z,displayId:Y,boundsRef:I,isDisabled:y,setCursorNode:st,setChildren:K}=useContext(h),A=useRef(null),ce=useRef(null),ue=a$2({ownerDocument:a$3(_)}),M=useCallback(d=>{z(d??null),k?.({coordinates:d,boundingRect:I.current});},[z,k,I]);useEffect(()=>{if(!y)return K(e),()=>{K(null);}},[e,y,K]),useEffect(()=>{let d=A.current;if(!d||y)return;let U=T=>{let H=d.getBoundingClientRect();I.current=H;let gt="clientX"in T?T.clientX:T.touches[0].clientX,xt="clientY"in T?T.clientY:T.touches[0].clientY,Pt={x:a$e(gt-H.left,0,H.width),y:a$e(xt-H.top,0,H.height)};M(Pt);},L=()=>{M(null);};return d.addEventListener("mousemove",U),d.addEventListener("touchmove",U,{passive:true}),d.addEventListener("mouseleave",L),d.addEventListener("touchend",L),d.addEventListener("touchcancel",L),()=>{d.removeEventListener("mousemove",U),d.removeEventListener("touchmove",U),d.removeEventListener("mouseleave",L),d.removeEventListener("touchend",L),d.removeEventListener("touchcancel",L);}},[I,y,M]);let{pressProps:at}=d({isDisabled:y,onPress:d=>{d.pointerType==="keyboard"?x&&u?.({...d,x:x.x,y:x.y}):u?.(d);},onPressStart:v,onPressEnd:b$1}),{focusProps:lt,isFocusVisible:ct,isFocused:ut}=a$5();a$6({ref:ce,isDisabled:y}),useImperativeHandle(m,()=>({focus:()=>{y||A.current?.focus();}}));let{focusProps:dt}=a$7({isDisabled:y,onFocusChange:i,onFocus:c$1,onBlur:s});function pt(){ue==="keyboard"&&setTimeout(()=>{let d=A.current?.getBoundingClientRect();d&&(I.current=d,M({x:a$e(d.width/2,0,d.width),y:a$e(d.height/2,0,d.height)}));},0);}function mt(){M(null);}let{keyboardProps:ft}=He({coordinates:x,setCoordinates:M,boundsRef:I,rootRef:A,onKeyDown:p,onKeyUp:o});a$8({isDisabled:y,ref:A,onInteractOutside:()=>{M(null);}});let ht=!!(x&&!y),yt=a$9({"data-focus-visible":ct,"data-focused":ut,"data-disabled":y,"data-block-id":r,"data-block-class":a,"data-active":x&&!y,"data-modality":ue});return jsxs(Fragment,{children:[jsx(ee,{renderTrailingElement:w,renderCursor:E,ref:st}),jsxs("div",{...c(lt,dt,{onFocus:pt,onBlur:mt},y?{}:c(ft,at)),ref:b(D,A,C),className:a$1(Ie({isDisabled:!!y,isIndicatorVisible:!!ht}),"BaselineUI-PointPicker-Content",t),tabIndex:y?void 0:0,style:n,"aria-controls":Y,"data-testid":"point-picker-content",...yt,children:[jsx(Oe,{gridLines:l}),jsx("div",{className:Ee,ref:ce,children:e})]})]})});Ke.displayName="PointPickerContent";function Xe(e,t,n){let[r,a]=useState(0),i=s=>{a(s),n();};return useGranularEffect(()=>{if(!e||t==="trailing")return;let s=new ResizeObserver(c=>{i(c[0].contentRect.width);});return i(e.getBoundingClientRect().width),s.observe(e),()=>{s.disconnect();}},[e,t],[n]),r}function jt(e,t){return t==="indicator"?e:e?.querySelector(".BaselineUI-PointPickerContent-TrailingElement")??null}var ne=R.forwardRef(({children:e,className:t,crossOffset:n,offset:r,placement:a="bottom start",anchorElement:i="indicator"},s)=>{let c=useRef(null),{cursorNode:p,coordinates:o}=useContext(h),l=Xe(p,i,()=>{u();}),m=jt(p,i),{overlayProps:k,updatePosition:u}=a$a({overlayRef:c,placement:a,targetRef:{get current(){return m}},crossOffset:n??l,offset:r});return useGranularEffect(()=>{u();},[o,n,r],[u]),o?jsx(a$4,{className:a$1(Se,t),ref:s,children:jsx("div",{ref:c,...k,children:e})}):null});ne.displayName="Floater";var tt=8,Xt=7,qt=7,re=R.memo(({children:e,scale:t,renderMagnifierContent:n})=>{let r=useRef(null),{coordinates:a,boundsRef:i,node:s}=useContext(h),c=useRef([]);a$6({ref:r}),useEffect(()=>{if(!r.current||n)return;let l=r.current.querySelectorAll("canvas"),m=[],k=r.current.ownerDocument;for(let u of l){let v=u.getContext("2d");if(!v)continue;let b=u.clientWidth,w=u.clientHeight,E=u.width,D=u.height,C=v.getImageData(0,0,E,D);m.push({el:u,width:E,height:D,image:C});let _=k.createElement("canvas");_.width=E,_.height=D;let x=_.getContext("2d");x&&x.drawImage(u,0,0),u.width=b*t,u.height=w*t,u.style.width=`${b}px`,u.style.height=`${w}px`,v.scale(t,t),v.drawImage(_,0,0,b,w);}return c.current=m,()=>{for(let{el:u,width:v,height:b,image:w}of c.current)u.width=v,u.height=b,u.getContext("2d")?.putImageData(w,0,0);}},[s,t,n]);let p=useMemo(()=>n?n({coordinates:a,boundingRect:i.current,children:e}):e?R.cloneElement(e,{key:"magnifier-content"}):null,[n,a,i,e]),o=useMemo(()=>!i.current||!a?null:{x:a.x/i.current.width,y:a.y/i.current.height},[i,a]);return o?jsx("div",{style:{left:0,transform:`scale(${t}) translate(calc(-${o.x*100}% + ${tt*Xt/(2*t)}px), calc(-${o.y*100}% + ${tt*qt/(2*t)}px))`},className:a$1(Te,"BaselineUI-PointPickerDisplay-Magnifier"),children:jsx("div",{style:Jt(s),ref:r,inert:"true",children:p})}):null});re.displayName="Magnifier";function Zt(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n],a=e.getPropertyValue(r);a&&t.push([r,a]);}for(let n of e)if(n.startsWith("--")){let r=e.getPropertyValue(n);r&&t.push([n,r]);}return Object.fromEntries(t)}function Jt(e){if(!e)return {};let n=b$1(e).getComputedStyle(e),r=e.getBoundingClientRect(),a={...Zt(n),position:"static",margin:"0px",left:"0px",top:"0px",transform:"none","-webkit-text-fill-color":"inherit","-webkit-text-stroke-color":"inherit",width:`${r.width}px`,height:`${r.height}px`,interactivity:"inert"};return Object.fromEntries(Object.entries(a).map(([i,s])=>i.startsWith("--")?[i,s]:i.startsWith("-")?[a$b(Ze(i)),s]:[Ze(i),s]))}var nn=7,rn=7,on={scale:2},sn={crossOffset:void 0,offset:void 0,placement:"bottom start",anchorElement:"indicator"},rt=R.forwardRef(({className:e,style:t,description:n,magnifier:r=true,"data-block-id":a,"data-block-class":i,floating:s=false,renderMagnifierContent:c},p)=>{let{coordinates:o,boundsRef:l,setDisplayId:m,isDisabled:k,children:u,cursorNode:v}=useContext(h),b=c$1(),w=useMemo(()=>b$2(r,on),[r]),E=useMemo(()=>typeof n=="function"?n({coordinates:o?{x:o.x,y:o.y}:null,boundingRect:l.current}):n,[n,o,l]),D=!k&&!!w&&o,C=useMemo(()=>b$2(s,sn),[s]);useEffect(()=>((!C||C&&v)&&m(b),()=>{m(void 0);}),[v,b,m,C]);let _=jsxs(a$c,{ref:C?void 0:p,className:a$1(Me,"BaselineUI-PointPicker-Display",e),backgroundColor:"background.primary.subtle",boxShadow:"medium",borderRadius:"sm",outlineWidth:1,outlineColor:"border.medium",outlineOffset:-1,outlineStyle:"solid",paddingY:"md",paddingLeft:"md",paddingRight:E?.length?"xl":"md",display:"flex",flexDirection:"row",gap:"lg",alignItems:"center",style:t,id:b,"data-block-id":a,"data-block-class":i,"data-variant":C?"floating":"auto","data-testid":"point-picker-display",children:[w?jsxs("div",{className:Ae,children:[D?jsx(re,{scale:w.scale,renderMagnifierContent:c,children:u}):null,Array.from({length:nn*rn}).map((x,z)=>z===24?jsx("div",{className:a$1(Z,Ne)},z):jsx("div",{className:Z},z))]}):null,E?.length?jsx(a$c,{display:"flex",gap:"lg",flexDirection:"column",children:E?.map(({label:x,icon:z},Y)=>jsxs(a$c,{display:"flex",gap:"md",flexDirection:"row",color:"text.secondary",alignItems:"center",children:[jsx(z,{size:12,className:ze}),jsx(a$d,{type:"label",size:"sm",children:x})]},x+Y))}):null]});return C?jsx(ne,{ref:p,...C,className:"BaselineUI-PointPicker-Floater",children:_}):_});rt.displayName="PointPickerDisplay";function se(e){let t=new Blob([e],{type:"text/javascript"}),n=URL.createObjectURL(t),r=new Worker(n);return URL.revokeObjectURL(n),r}function ae(){return se('var Y=Object.defineProperty;var Z=(n,t,e)=>t in n?Y(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var M=(n,t,e)=>Z(n,typeof t!="symbol"?t+"":t,e);var F=Symbol("Comlink.proxy"),J=Symbol("Comlink.endpoint"),Q=Symbol("Comlink.releaseProxy"),z=Symbol("Comlink.finalizer"),T=Symbol("Comlink.thrown"),B=n=>typeof n=="object"&&n!==null||typeof n=="function",q={canHandle:n=>B(n)&&n[F],serialize(n){let{port1:t,port2:e}=new MessageChannel;return U(n,t),[e,[e]]},deserialize(n){return n.start(),et(n)}},X={canHandle:n=>B(n)&&T in n,serialize({value:n}){let t;return n instanceof Error?t={isError:!0,value:{message:n.message,name:n.name,stack:n.stack}}:t={isError:!1,value:n},[t,[]]},deserialize(n){throw n.isError?Object.assign(new Error(n.value.message),n.value):n.value}},H=new Map([["proxy",q],["throw",X]]);function tt(n,t){for(let e of n)if(t===e||e==="*"||e instanceof RegExp&&e.test(t))return!0;return!1}function U(n,t=globalThis,e=["*"]){t.addEventListener("message",function r(s){if(!s||!s.data)return;if(!tt(e,s.origin)){console.warn(`Invalid origin \'${s.origin}\' for comlink proxy`);return}let{id:o,type:c,path:u}=Object.assign({path:[]},s.data),i=(s.data.argumentList||[]).map(m),a;try{let l=u.slice(0,-1).reduce((f,y)=>f[y],n),h=u.reduce((f,y)=>f[y],n);switch(c){case"GET":a=h;break;case"SET":l[u.slice(-1)[0]]=m(s.data.value),a=!0;break;case"APPLY":a=h.apply(l,i);break;case"CONSTRUCT":{let f=new h(...i);a=at(f)}break;case"ENDPOINT":{let{port1:f,port2:y}=new MessageChannel;U(n,y),a=ot(f,[f])}break;case"RELEASE":a=void 0;break;default:return}}catch(l){a={value:l,[T]:0}}Promise.resolve(a).catch(l=>({value:l,[T]:0})).then(l=>{let[h,f]=_(l);t.postMessage(Object.assign(Object.assign({},h),{id:o}),f),c==="RELEASE"&&(t.removeEventListener("message",r),V(t),z in n&&typeof n[z]=="function"&&n[z]())}).catch(l=>{let[h,f]=_({value:new TypeError("Unserializable return value"),[T]:0});t.postMessage(Object.assign(Object.assign({},h),{id:o}),f)})}),t.start&&t.start()}function nt(n){return n.constructor.name==="MessagePort"}function V(n){nt(n)&&n.close()}function et(n,t){let e=new Map;return n.addEventListener("message",function(s){let{data:o}=s;if(!o||!o.id)return;let c=e.get(o.id);if(c)try{c(o)}finally{e.delete(o.id)}}),I(n,e,[],t)}function S(n){if(n)throw new Error("Proxy has been released and is not useable")}function $(n){return A(n,new Map,{type:"RELEASE"}).then(()=>{V(n)})}var P=new WeakMap,R="FinalizationRegistry"in globalThis&&new FinalizationRegistry(n=>{let t=(P.get(n)||0)-1;P.set(n,t),t===0&&$(n)});function rt(n,t){let e=(P.get(t)||0)+1;P.set(t,e),R&&R.register(n,t,n)}function st(n){R&&R.unregister(n)}function I(n,t,e=[],r=function(){}){let s=!1,o=new Proxy(r,{get(c,u){if(S(s),u===Q)return()=>{st(o),$(n),t.clear(),s=!0};if(u==="then"){if(e.length===0)return{then:()=>o};let i=A(n,t,{type:"GET",path:e.map(a=>a.toString())}).then(m);return i.then.bind(i)}return I(n,t,[...e,u])},set(c,u,i){S(s);let[a,l]=_(i);return A(n,t,{type:"SET",path:[...e,u].map(h=>h.toString()),value:a},l).then(m)},apply(c,u,i){S(s);let a=e[e.length-1];if(a===J)return A(n,t,{type:"ENDPOINT"}).then(m);if(a==="bind")return I(n,t,e.slice(0,-1));let[l,h]=D(i);return A(n,t,{type:"APPLY",path:e.map(f=>f.toString()),argumentList:l},h).then(m)},construct(c,u){S(s);let[i,a]=D(u);return A(n,t,{type:"CONSTRUCT",path:e.map(l=>l.toString()),argumentList:i},a).then(m)}});return rt(o,n),o}function it(n){return Array.prototype.concat.apply([],n)}function D(n){let t=n.map(_);return[t.map(e=>e[0]),it(t.map(e=>e[1]))]}var W=new WeakMap;function ot(n,t){return W.set(n,t),n}function at(n){return Object.assign(n,{[F]:!0})}function _(n){for(let[t,e]of H)if(e.canHandle(n)){let[r,s]=e.serialize(n);return[{type:"HANDLER",name:t,value:r},s]}return[{type:"RAW",value:n},W.get(n)||[]]}function m(n){switch(n.type){case"HANDLER":return H.get(n.name).deserialize(n.value);case"RAW":return n.value}}function A(n,t,e,r){return new Promise(s=>{let o=ct();t.set(o,s),n.start&&n.start(),n.postMessage(Object.assign({id:o},e),r)})}function ct(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var G=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],L=1,x=8,d=new Uint32Array(96),C=class n{static from(t){if(!t||t.byteLength===void 0||t.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");let[e,r]=new Uint8Array(t,0,2);if(e!==219)throw new Error("Data does not appear to be in a KDBush format.");let s=r>>4;if(s!==L)throw new Error(`Got v${s} data when expected v${L}.`);let o=G[r&15];if(!o)throw new Error("Unrecognized array type.");let[c]=new Uint16Array(t,2,1),[u]=new Uint32Array(t,4,1);return new n(u,c,o,void 0,t)}constructor(t,e=64,r=Float64Array,s=ArrayBuffer,o){if(isNaN(t)||t<0)throw new Error(`Unexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;let c=G.indexOf(this.ArrayType),u=t*2*this.ArrayType.BYTES_PER_ELEMENT,i=t*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-i%8)%8;if(c<0)throw new Error(`Unexpected typed array class: ${r}.`);if(o)this.data=o,this.ids=new this.IndexArrayType(o,x,t),this.coords=new r(o,x+i+a,t*2),this._pos=t*2,this._finished=!0;else{let l=this.data=new s(x+u+i+a);this.ids=new this.IndexArrayType(l,x,t),this.coords=new r(l,x+i+a,t*2),this._pos=0,this._finished=!1,new Uint8Array(l,0,2).set([219,(L<<4)+c]),new Uint16Array(l,2,1)[0]=e,new Uint32Array(l,4,1)[0]=t}}add(t,e){let r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=e,r}finish(){let t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return N(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,r,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:o,coords:c,nodeSize:u}=this;d[0]=0,d[1]=o.length-1,d[2]=0;let i=3,a=[];for(;i>0;){let l=d[--i],h=d[--i],f=d[--i];if(h-f<=u){for(let g=f;g<=h;g++){let E=c[2*g],k=c[2*g+1];E>=t&&E<=r&&k>=e&&k<=s&&a.push(o[g])}continue}let y=f+h>>1,w=c[2*y],p=c[2*y+1];w>=t&&w<=r&&p>=e&&p<=s&&a.push(o[y]),(l===0?t<=w:e<=p)&&(d[i++]=f,d[i++]=y-1,d[i++]=1-l),(l===0?r>=w:s>=p)&&(d[i++]=y+1,d[i++]=h,d[i++]=1-l)}return a}within(t,e,r){let s=[];return this.withinInto(t,e,r,s),s}withinInto(t,e,r,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:o,coords:c,nodeSize:u}=this;d[0]=0,d[1]=o.length-1,d[2]=0;let i=3,a=0,l=r*r;for(;i>0;){let h=d[--i],f=d[--i],y=d[--i];if(f-y<=u){for(let E=y;E<=f;E++)j(c[2*E],c[2*E+1],t,e)<=l&&(s[a++]=o[E]);continue}let w=y+f>>1,p=c[2*w],g=c[2*w+1];j(p,g,t,e)<=l&&(s[a++]=o[w]),(h===0?t-r<=p:e-r<=g)&&(d[i++]=y,d[i++]=w-1,d[i++]=1-h),(h===0?t+r>=p:e+r>=g)&&(d[i++]=w+1,d[i++]=f,d[i++]=1-h)}return a}};function N(n,t,e,r,s,o){if(s-r<=e)return;let c=r+s>>1;K(n,t,c,r,s,o),N(n,t,e,r,c-1,1-o),N(n,t,e,c+1,s,1-o)}function K(n,t,e,r,s,o){for(;s>r;){if(s-r>600){let a=s-r+1,l=e-r+1,h=Math.log(a),f=.5*Math.exp(2*h/3),y=.5*Math.sqrt(h*f*(a-f)/a)*(l-a/2<0?-1:1),w=Math.max(r,Math.floor(e-l*f/a+y)),p=Math.min(s,Math.floor(e+(a-l)*f/a+y));K(n,t,e,w,p,o)}let c=t[2*e+o],u=r,i=s;for(b(n,t,r,e),t[2*s+o]>c&&b(n,t,r,s);u<i;){for(b(n,t,u,i),u++,i--;t[2*u+o]<c;)u++;for(;t[2*i+o]>c;)i--}t[2*r+o]===c?b(n,t,r,i):(i++,b(n,t,i,s)),i<=e&&(r=i+1),e<=i&&(s=i-1)}}function b(n,t,e,r){O(n,e,r),O(t,2*e,2*r),O(t,2*e+1,2*r+1)}function O(n,t,e){let r=n[t];n[t]=n[e],n[e]=r}function j(n,t,e,r){let s=n-e,o=t-r;return s*s+o*o}var v=class{constructor(){M(this,"index",null);M(this,"xCoords",null);M(this,"yCoords",null)}buildIndex(t){this.clear(),this.xCoords=new Float64Array(t.length),this.yCoords=new Float64Array(t.length);for(let[r,s]of t.entries())this.xCoords[r]=s.x,this.yCoords[r]=s.y;let e=new C(t.length);for(let r=0;r<t.length;r++)e.add(this.xCoords[r],this.yCoords[r]);return e.finish(),this.index=e,e.data}clear(){this.index=null,this.xCoords=null,this.yCoords=null}findNearestPoint(t,e,r){if(!this.index||!this.xCoords||!this.yCoords)return null;let s=this.index.within(t,e,r);if(s.length===0)return null;let o=s[0],c=1/0;for(let u of s){let i=t-this.xCoords[u],a=e-this.yCoords[u],l=i*i+a*a;l<c&&(c=l,o=u)}return{x:this.xCoords[o],y:this.yCoords[o]}}findPointsInRadius(t,e,r){if(!this.index||!this.xCoords||!this.yCoords)return[];let s=this.index.within(t,e,r),o=Array.from({length:s.length});for(let[c,u]of s.entries())o[c]={x:this.xCoords[u],y:this.yCoords[u]};return o}};U(new v);\n/*! Bundled license information:\n\ncomlink/dist/esm/comlink.mjs:\n (**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n *)\n*/\n')}function an({snapPoints:e,snapRadius:t=50}){let n=useRef(null),r=useRef(null),a=useRef(false),i=useCallback(()=>{if(a.current)return null;if(!r.current){let o=new ae;r.current={worker:o,api:it.wrap(o)};}return r.current.api},[]);useEffect(()=>(a.current=false,i(),()=>{a.current=true,r.current?.worker.terminate(),r.current=null,n.current=null;}),[i]);let s=useCallback(()=>{let o=i();if(!e?.length||!o)return null;if(n.current?.points!==e){let l={points:e,built:o.buildIndex(e)};n.current=l,l.built.catch(()=>{n.current===l&&(n.current=null);});}return {api:o,built:n.current.built}},[e,i]);useEffect(()=>{s()?.built.catch(()=>{});},[s]);let c=useCallback(async o=>{let l=s();if(!l)return null;let[,m]=await Promise.all([l.built,l.api.findNearestPoint(o.x,o.y,t)]);return m},[s,t]),p=useCallback(async o=>{let l=s();if(!l)return [];let[,m]=await Promise.all([l.built,l.api.findPointsInRadius(o.x,o.y,t)]);return m},[s,t]);return {findNearestPoint:c,findPointsInRadius:p}}
11
- export{ke as a,Ke as b,rt as c,an as d};
@@ -1,10 +0,0 @@
1
- import {a as a$1,e}from'./chunk-FCKJCFMD.mjs';import {a as a$g,b as b$4}from'./chunk-KADD66HZ.mjs';import {a as a$j}from'./chunk-X34RHNLT.mjs';import {a as a$h}from'./chunk-PQIDCA7P.mjs';import {b,c as c$1}from'./chunk-IDIZSV2Y.mjs';import {c as c$3}from'./chunk-W6QO7FPZ.mjs';import {a as a$5}from'./chunk-DIL5HL6K.mjs';import {a as a$7}from'./chunk-VQHI3ZCW.mjs';import {a as a$i}from'./chunk-N4NDPTX6.mjs';import {a as a$c}from'./chunk-JC22ELJM.mjs';import {b as b$2}from'./chunk-KG2EHFYA.mjs';import {b as b$1}from'./chunk-N2XGJKZG.mjs';import {a as a$f}from'./chunk-DLJHL4V7.mjs';import {a as a$4}from'./chunk-VDUFLHKK.mjs';import {a as a$e}from'./chunk-QSFRMY47.mjs';import {a as a$k}from'./chunk-66CUIXA6.mjs';import {a as a$b}from'./chunk-WAPBLICF.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {d}from'./chunk-QVFGEXDU.mjs';import {b as b$3,a as a$d}from'./chunk-3PBFSDMT.mjs';import {a as a$2}from'./chunk-LRFFL765.mjs';import {j}from'./chunk-NQVTVL24.mjs';import {a as a$a,h,l}from'./chunk-SCJ3RG7B.mjs';import {c}from'./chunk-PJINRIA6.mjs';import {a as a$8}from'./chunk-SVIYLH7R.mjs';import {c as c$2}from'./chunk-35AM4QEA.mjs';import {a as a$9}from'./chunk-6ZQE5SHE.mjs';import {b as b$5}from'./chunk-TYOEGCPS.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import {HelpIcon}from'@baseline-ui/icons/16';import Mr,{useMemo,useState,useCallback,useRef}from'react';import {flushSync}from'react-dom';import {themeVars}from'@baseline-ui/tokens';import {jsx,jsxs}from'react/jsx-runtime';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- var ne={"ar-AE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u0623\u062F\u0627\u0629 \u0627\u0646\u062A\u0642\u0627\u0621 \u0627\u0644\u0644\u0648\u0646",colorSwatch:"\u062A\u063A\u064A\u064A\u0631 \u0627\u0644\u0623\u0644\u0648\u0627\u0646",transparent:"\u0634\u0641\u0627\u0641",twoDimensionalSlider:"\u0645\u064F\u0646\u0632\u0644\u0642 2D"},"bg-BG":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u0421\u0440\u0435\u0434\u0441\u0442\u0432\u043E \u0437\u0430 \u0438\u0437\u0431\u0438\u0440\u0430\u043D\u0435 \u043D\u0430 \u0446\u0432\u044F\u0442",colorSwatch:"\u0446\u0432\u0435\u0442\u043D\u0430 \u043C\u043E\u0441\u0442\u0440\u0430",transparent:"\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u0435\u043D",twoDimensionalSlider:"2D \u043F\u043B\u044A\u0437\u0433\u0430\u0447"},"cs-CZ":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"V\xFDb\u011Br barvy",colorSwatch:"barevn\xFD vzorek",transparent:"pr\u016Fhledn\xFD",twoDimensionalSlider:"2D posuvn\xEDk"},"da-DK":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Farvev\xE6lger",colorSwatch:"farvepr\xF8ve",transparent:"gennemsigtig",twoDimensionalSlider:"2D-skyder"},"de-DE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Farbw\xE4hler",colorSwatch:"Farbfeld",transparent:"transparent",twoDimensionalSlider:"2D-Schieberegler"},"el-GR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03B1\u03C2 \u03C7\u03C1\u03C9\u03BC\u03AC\u03C4\u03C9\u03BD",colorSwatch:"\u03C7\u03C1\u03C9\u03BC\u03B1\u03C4\u03B9\u03BA\u03CC \u03B4\u03B5\u03AF\u03B3\u03BC\u03B1",transparent:"\u03B4\u03B9\u03B1\u03C6\u03B1\u03BD\u03AD\u03C2",twoDimensionalSlider:"\u03A1\u03C5\u03B8\u03BC\u03B9\u03C3\u03C4\u03B9\u03BA\u03CC 2D"},"en-US":{colorPicker:"Color picker",twoDimensionalSlider:"2D slider",colorNameAndValue:e=>`${e.name}: ${e.value}`,colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorSwatch:"color swatch",transparent:"transparent"},"es-ES":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Selector de color",colorSwatch:"muestra de color",transparent:"transparente",twoDimensionalSlider:"Regulador 2D"},"et-EE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"V\xE4rvivalija",colorSwatch:"v\xE4rvin\xE4idis",transparent:"l\xE4bipaistev",twoDimensionalSlider:"2D-liugur"},"fi-FI":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"V\xE4rimuokkain",colorSwatch:"v\xE4rimalli",transparent:"l\xE4pin\xE4kyv\xE4",twoDimensionalSlider:"2D-liukus\xE4\xE4din"},"fr-FR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}\xA0: ${e.value}`,colorPicker:"S\xE9lecteur de couleurs",colorSwatch:"\xC9chantillon de couleurs",transparent:"Transparent",twoDimensionalSlider:"Curseur\xA02D"},"he-IL":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u05D1\u05D5\u05D7\u05E8 \u05D4\u05E6\u05D1\u05E2\u05D9\u05DD",colorSwatch:"\u05D3\u05D5\u05D2\u05DE\u05D9\u05EA \u05E6\u05D1\u05E2",transparent:"\u05E9\u05E7\u05D5\u05E3",twoDimensionalSlider:"\u05DE\u05D7\u05D5\u05D5\u05DF \u05D3\u05D5 \u05DE\u05D9\u05DE\u05D3\u05D9"},"hr-HR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Odabir boje",colorSwatch:"uzorak boje",transparent:"transparentno",twoDimensionalSlider:"2D kliza\u010D"},"hu-HU":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Sz\xEDnv\xE1laszt\xF3",colorSwatch:"sz\xEDnt\xE1r",transparent:"\xE1tl\xE1tsz\xF3",twoDimensionalSlider:"2D-cs\xFAszka"},"it-IT":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Selettore colore",colorSwatch:"campione di colore",transparent:"trasparente",twoDimensionalSlider:"Cursore 2D"},"ja-JP":{colorInputLabel:e=>`${e.label}\u3001${e.channelLabel}`,colorNameAndValue:e=>`${e.name} : ${e.value}`,colorPicker:"\u30AB\u30E9\u30FC\u30D4\u30C3\u30AB\u30FC",colorSwatch:"\u30AB\u30E9\u30FC\u30B9\u30A6\u30A9\u30C3\u30C1",transparent:"\u900F\u660E",twoDimensionalSlider:"2D \u30B9\u30E9\u30A4\u30C0\u30FC"},"ko-KR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\uC0C9\uC0C1 \uD53C\uCEE4",colorSwatch:"\uC0C9\uC0C1 \uACAC\uBCF8",transparent:"\uD22C\uBA85\uB3C4",twoDimensionalSlider:"2D \uC2AC\uB77C\uC774\uB354"},"lt-LT":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Spalv\u0173 parinkiklis",colorSwatch:"spalv\u0173 pavyzdys",transparent:"skaidrus",twoDimensionalSlider:"2D slankiklis"},"lv-LV":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Kr\u0101su atlas\u012Bt\u0101js",colorSwatch:"kr\u0101su paraugs",transparent:"caursp\u012Bd\u012Bgs",twoDimensionalSlider:"2D sl\u012Bdnis"},"nb-NO":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Fargevelger",colorSwatch:"fargekart",transparent:"gjennomsiktig",twoDimensionalSlider:"2D-glidebryter"},"nl-NL":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Kleurkiezer",colorSwatch:"kleurstaal",transparent:"transparant",twoDimensionalSlider:"2D-schuifregelaar"},"pl-PL":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Pr\xF3bnik kolor\xF3w",colorSwatch:"pr\xF3bka koloru",transparent:"przezroczysty",twoDimensionalSlider:"Suwak 2D"},"pt-BR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Seletor de cores",colorSwatch:"amostra de cores",transparent:"transparente",twoDimensionalSlider:"Controle deslizante 2D"},"pt-PT":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Seletor de cores",colorSwatch:"amostra de cor",transparent:"transparente",twoDimensionalSlider:"Controle deslizante 2D"},"ro-RO":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Selector de culori",colorSwatch:"specimen de culoare",transparent:"transparent",twoDimensionalSlider:"Glisor 2D"},"ru-RU":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u041F\u0430\u043B\u0438\u0442\u0440\u0430 \u0446\u0432\u0435\u0442\u043E\u0432",colorSwatch:"\u0446\u0432\u0435\u0442\u043E\u0432\u043E\u0439 \u043E\u0431\u0440\u0430\u0437\u0435\u0446",transparent:"\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u0439",twoDimensionalSlider:"\u041F\u043E\u043B\u0437\u0443\u043D\u043E\u043A 2D"},"sk-SK":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"V\xFDber farieb",colorSwatch:"vzorkovn\xEDk farieb",transparent:"transparentn\xFD",twoDimensionalSlider:"2D jazdec"},"sl-SI":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Izbirnik barv",colorSwatch:"barvna paleta",transparent:"prozorno",twoDimensionalSlider:"2D drsnik"},"sr-SP":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Bira\u010D boja",colorSwatch:"Uzorak boje",transparent:"providno",twoDimensionalSlider:"2D kliza\u010D"},"sv-SE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"F\xE4rgv\xE4ljaren",colorSwatch:"f\xE4rgruta",transparent:"genomskinlig",twoDimensionalSlider:"2D-reglage"},"tr-TR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Renk Se\xE7ici",colorSwatch:"renk \xF6rne\u011Fi",transparent:"saydam",twoDimensionalSlider:"2D s\xFCrg\xFC"},"uk-UA":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u041F\u0430\u043B\u0456\u0442\u0440\u0430 \u043A\u043E\u043B\u044C\u043E\u0440\u0456\u0432",colorSwatch:"\u0437\u0440\u0430\u0437\u043E\u043A \u043A\u043E\u043B\u044C\u043E\u0440\u0443",transparent:"\u043F\u0440\u043E\u0437\u043E\u0440\u0438\u0439",twoDimensionalSlider:"\u041F\u043E\u0432\u0437\u0443\u043D\u043E\u043A 2D"},"zh-CN":{colorInputLabel:e=>`${e.label}\u3001${e.channelLabel}`,colorNameAndValue:e=>`${e.name}\uFF1A${e.value}`,colorPicker:"\u62FE\u8272\u5668",colorSwatch:"\u989C\u8272\u8272\u677F",transparent:"\u900F\u660E",twoDimensionalSlider:"2D \u6ED1\u5757"},"zh-TW":{colorInputLabel:e=>`${e.label}\uFF0C${e.channelLabel}`,colorNameAndValue:e=>`${e.name}\uFF1A${e.value}`,colorPicker:"\u6AA2\u8272\u5668",colorSwatch:"\u8272\u7968",transparent:"\u900F\u660E",twoDimensionalSlider:"2D \u6ED1\u687F"}};var Ye=e=>[0,60,120,180,240,300,360].map(r=>e.withChannelValue("hue",r).toString("css")).join(", "),Je=e=>`${e.withChannelValue("saturation",0)}, transparent`,wr={hue:Ye,saturation:Je,lightness:()=>"black, transparent, white"},Ar={hue:Ye,saturation:Je,brightness:()=>"black, transparent"};function Ze({direction:e,state:r,zChannel:l,xChannel:t,yChannel:a}){return useMemo(()=>{let y=e==="rtl"?"left":"right",C={},g=r.value.getChannelValue(l);switch(r.value.getColorSpace()){case "rgb":{let i=a$1("rgb(0, 0, 0)");C={background:[`linear-gradient(to ${y}, ${i.withChannelValue(t,0)}, ${i.withChannelValue(t,255)})`,`linear-gradient(to top, ${i.withChannelValue(a,0)}, ${i.withChannelValue(a,255)})`,i.withChannelValue(l,g)].join(","),backgroundBlendMode:"screen"};break}case "hsl":{let i=r.value.getColorChannels(),s=a$1("hsl(0, 100%, 50%)").withChannelValue(l,g),c=i.filter(n=>n!==l).map(n=>`linear-gradient(to ${n===t?y:"top"}, ${wr[n](s)})`).reverse();l==="hue"&&c.push(s.toString("css")),C={background:c.join(", ")};break}case "hsb":{let i=r.value.getColorChannels(),s=a$1("hsb(0, 100%, 100%)").withChannelValue(l,g),c=i.filter(n=>n!==l).map(n=>`linear-gradient(to ${n===t?y:"top"}, ${Ar[n](s)})`).reverse();l==="hue"&&c.push(s.toString("css")),C={background:c.join(", ")};break}}let{x:f,y:d}=r.getThumbPosition();e==="rtl"&&(f=1-f);let z={forcedColorAdjust:"none"};return {colorAreaStyleProps:{style:{position:"relative",touchAction:"none",...z,...C}},thumbStyleProps:{style:{position:"absolute",left:`${f*100}%`,top:`${d*100}%`,transform:"translate(-50%, -50%)",touchAction:"none",...z}}}},[e,r,l,t,a])}function er(e,r){let{isDisabled:l$1,inputXRef:t,inputYRef:a,containerRef:u,"aria-label":y,xName:C,yName:g,form:f}=e,d=b$2(ne,"@react-aria/color"),{addGlobalListener:z,removeGlobalListener:i}=a$9(),{direction:s,locale:c$1}=b$1(),[n,v]=useState(null),b=useCallback((o=t)=>{o.current&&a$a(o.current);},[t]);a$b(t,r.defaultValue,r.setValue);let[S,h$1]=useState(false),[I,x]=useState(false),{xChannel:_,yChannel:m,zChannel:A}=r.channels,j$1=r.xChannelStep,N=r.yChannelStep,k=useRef(null),O=(o,p,w)=>{r.setDragging(true),h$1(true),o(),r.setDragging(false),b(p),v(w);},{keyboardProps:$}=j({shortcuts:{PageUp:()=>O(()=>{r.incrementY(r.yChannelPageStep);},a,"y"),PageDown:()=>O(()=>{r.decrementY(r.yChannelPageStep);},a,"y"),Home:()=>O(()=>{s==="rtl"?r.incrementX(r.xChannelPageStep):r.decrementX(r.xChannelPageStep);},t,"x"),End:()=>O(()=>{s==="rtl"?r.decrementX(r.xChannelPageStep):r.incrementX(r.xChannelPageStep);},t,"x")},allowRepeats:true}),J={onMoveStart(){k.current=null,r.setDragging(true);},onMove({deltaX:o,deltaY:p,pointerType:w,shiftKey:Z}){let{incrementX:U,decrementX:se,incrementY:ce,decrementY:T,xChannelPageStep:q,xChannelStep:B,yChannelPageStep:ke,yChannelStep:Pe,getThumbPosition:Sr,setColorFromPoint:gr}=r;k.current==null&&(k.current=Sr());let{width:xr,height:kr}=u.current?.getBoundingClientRect()||{width:0,height:0},we=o!==0||p!==0;if(w==="keyboard"){let Ae=Z&&q>B?q:B,$e=Z&&ke>Pe?ke:Pe;o>0&&s==="ltr"||o<0&&s==="rtl"?U(Ae):o<0&&s==="ltr"||o>0&&s==="rtl"?se(Ae):p>0?T($e):p<0&&ce($e),h$1(we),n=we&&Math.abs(p)>Math.abs(o)?"y":"x",v(n);}else k.current.x+=(s==="rtl"?-1:1)*o/xr,k.current.y+=p/kr,gr(k.current.x,k.current.y);},onMoveEnd(){M.current=false,r.setDragging(false),b(n==="x"?t:a);}},{moveProps:sr}=a$c(J),{focusWithinProps:cr}=b$3({onFocusWithinChange:o=>{o||(h$1(false),x(false));}}),F=useRef(void 0),M=useRef(false),{moveProps:dr}=a$c({onMoveStart(){M.current&&J.onMoveStart();},onMove(o){M.current&&J.onMove(o);},onMoveEnd(){M.current&&J.onMoveEnd();}}),pe=o=>{let p=b$5(u.current);r.isDragging||(F.current=o,h$1(false),b(),r.setDragging(true),typeof PointerEvent<"u"?z(p,"pointerup",R,false):(z(p,"mouseup",R,false),z(p,"touchend",R,false)));},R=o=>{let p=b$5(u.current);(o.pointerId??o.changedTouches?.[0].identifier)===F.current&&(h$1(false),b(),r.setDragging(false),F.current=void 0,M.current=false,typeof PointerEvent<"u"?i(p,"pointerup",R,false):(i(p,"mouseup",R,false),i(p,"touchend",R,false)));},ue=(o,p,w,Z)=>{let U=o.getBoundingClientRect(),{width:se,height:ce}=U,T=(w-U.x)/se,q=(Z-U.y)/ce;s==="rtl"&&(T=1-T);let B=b$5(u.current);T>=0&&T<=1&&q>=0&&q<=1&&!r.isDragging&&F.current===void 0&&(M.current=true,h$1(false),F.current=p,r.setColorFromPoint(T,q),b(),r.setDragging(true),typeof PointerEvent<"u"?z(B,"pointerup",E,false):(z(B,"mouseup",E,false),z(B,"touchend",E,false)));},E=o=>{let p=o.pointerId??o.changedTouches?.[0].identifier;if(M.current&&p===F.current){M.current=false,h$1(false),F.current=void 0,r.setDragging(false),b();let w=b$5(u.current);typeof PointerEvent<"u"?i(w,"pointerup",E,false):(i(w,"mouseup",E,false),i(w,"touchend",E,false));}},mr=l$1?{}:c({...typeof PointerEvent<"u"?{onPointerDown:o=>{o.pointerType==="mouse"&&(o.button!==0||o.altKey||o.ctrlKey||o.metaKey)||ue(o.currentTarget,o.pointerId,o.clientX,o.clientY);}}:{onMouseDown:o=>{o.button!==0||o.altKey||o.ctrlKey||o.metaKey||ue(o.currentTarget,void 0,o.clientX,o.clientY);},onTouchStart:o=>{ue(o.currentTarget,o.changedTouches[0].identifier,o.changedTouches[0].clientX,o.changedTouches[0].clientY);}}},dr),yr=l$1?{}:c({...typeof PointerEvent<"u"?{onPointerDown:o=>{o.pointerType==="mouse"&&(o.button!==0||o.altKey||o.ctrlKey||o.metaKey)||pe(o.pointerId);}}:{onMouseDown:o=>{o.button!==0||o.altKey||o.ctrlKey||o.metaKey||pe(void 0);},onTouchStart:o=>{pe(o.changedTouches[0].identifier);}}},cr,$,sr),{focusProps:br}=a$d({onFocus:()=>{v("x");}}),{focusProps:_r}=a$d({onFocus:()=>{v("y");}}),ve=o=>{let{target:p}=o;x(true),p===t.current?r.setXValue(parseFloat(p.value)):p===a.current&&r.setYValue(parseFloat(p.value));},W=h()||l(),P=r.getDisplayColor(),Se=useCallback(o=>`${I||S?d.format("colorNameAndValue",{name:P.getChannelName(o,c$1),value:P.formatChannelValue(o,c$1)}):[d.format("colorNameAndValue",{name:P.getChannelName(o,c$1),value:P.formatChannelValue(o,c$1)}),d.format("colorNameAndValue",{name:P.getChannelName(o===m?_:m,c$1),value:P.formatChannelValue(o===m?_:m,c$1)}),d.format("colorNameAndValue",{name:P.getChannelName(A,c$1),value:P.formatChannelValue(A,c$1)})].join(", ")}, ${P.getColorName(c$1)}`,[c$1,P,d,I,S,_,m,A]),H=d.format("colorPicker"),fr=a$e({...e,"aria-label":y?d.format("colorInputLabel",{label:y,channelLabel:H}):H}),zr=a$e({...e,"aria-label":y?d.format("colorInputLabel",{label:y,channelLabel:H}):H}),hr=a$e({...e,"aria-label":y?`${y}, ${H}`:void 0},W?H:void 0),ge=d.format("twoDimensionalSlider"),{visuallyHiddenProps:xe}=a$f({style:{opacity:"0.0001",width:"100%",height:"100%",pointerEvents:"none"}}),{colorAreaStyleProps:Cr,thumbStyleProps:vr}=Ze({direction:s,state:r,xChannel:_,yChannel:m,zChannel:A});return {colorAreaProps:{...hr,...mr,...Cr,role:"group"},thumbProps:{...yr,...vr,role:"presentation"},xInputProps:{...fr,...xe,...br,type:"range",min:r.value.getChannelRange(_).minValue,max:r.value.getChannelRange(_).maxValue,step:j$1,"aria-roledescription":ge,"aria-valuetext":Se(_),"aria-orientation":"horizontal","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"],disabled:l$1,value:r.value.getChannelValue(_),name:C,form:f,tabIndex:W||!n||n==="x"?void 0:-1,"aria-hidden":W||!n||n==="x"||S?void 0:"true",onChange:ve},yInputProps:{...zr,...xe,..._r,type:"range",min:r.value.getChannelRange(m).minValue,max:r.value.getChannelRange(m).maxValue,step:N,"aria-roledescription":ge,"aria-valuetext":Se(m),"aria-orientation":"vertical","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"],disabled:l$1,value:r.value.getChannelValue(m),name:g,form:f,tabIndex:W||n==="y"?void 0:-1,"aria-hidden":W||n==="y"||S?void 0:"true",onChange:ve}}}function rr(e,r){let{trackRef:l,inputRef:t,orientation:a,channel:u,"aria-label":y,name:C,form:g}=e,{locale:f,direction:d}=b$1();!e.label&&!y&&!e["aria-labelledby"]&&(y=r.value.getChannelName(u,f));let{groupProps:z,trackProps:i,labelProps:s,outputProps:c$1}=a$g({...e,"aria-label":y},r,l),{inputProps:n,thumbProps:v}=b$4({index:0,orientation:a,isDisabled:e.isDisabled,name:C,form:g,trackRef:l,inputRef:t},r),b=r.getDisplayColor(),S=()=>{let x;switch(a==="vertical"?x="top":d==="ltr"?x="right":x="left",u){case "hue":{let _=[0,60,120,180,240,300,360].map(m=>b.withChannelValue("hue",m).toString("css")).join(", ");return `linear-gradient(to ${x}, ${_})`}case "lightness":{let _=r.getThumbMinValue(0),m=r.getThumbMaxValue(0),A=b.withChannelValue(u,_).toString("css"),j=b.withChannelValue(u,(m-_)/2).toString("css"),N=b.withChannelValue(u,m).toString("css");return `linear-gradient(to ${x}, ${A}, ${j}, ${N})`}case "saturation":case "brightness":case "red":case "green":case "blue":case "alpha":{let _=b.withChannelValue(u,r.getThumbMinValue(0)).toString("css"),m=b.withChannelValue(u,r.getThumbMaxValue(0)).toString("css");return `linear-gradient(to ${x}, ${_}, ${m})`}default:throw new Error("Unknown color channel: "+u)}},h={forcedColorAdjust:"none"};u==="hue"?n["aria-valuetext"]+=`, ${b.getHueName(f)}`:u!=="alpha"&&(n["aria-valuetext"]+=`, ${b.getColorName(f)}`);let{visuallyHiddenProps:I}=a$f({style:{opacity:"0.0001",width:"100%",height:"100%",pointerEvents:"none"}});return {trackProps:{...c(z,i),style:{...i.style,...h,background:S()}},inputProps:{...n,style:{...n.style,...I.style}},thumbProps:{...v,style:{...v.style,...h}},labelProps:s,outputProps:c$1}}function or(e,r,l){let{isDisabled:t,isReadOnly:a,isRequired:u,isWheelDisabled:y,validationBehavior:C="aria",onKeyDown:g,onKeyUp:f}=e,{colorValue:d,inputValue:z,increment:i,decrement:s,incrementToMax:c$1,decrementToMin:n,commit:v,commitValidation:b}=r,S=c$2(),{spinButtonProps:h}=a$h({isDisabled:t,isReadOnly:a,isRequired:u,maxValue:16777215,minValue:0,onIncrement:i,onIncrementToMax:c$1,onDecrement:s,onDecrementToMin:n,value:d?d.toHexInt():void 0,textValue:d?d.toString("hex"):void 0}),[I,x]=useState(false),{focusWithinProps:_}=b$3({isDisabled:t,onFocusWithinChange:x}),m=useCallback($=>{Math.abs($.deltaY)<=Math.abs($.deltaX)||($.deltaY>0?i():$.deltaY<0&&s());},[s,i]);a$i({onScroll:m,isDisabled:y||t||a||!I},l);let{keyboardProps:j$1}=j({isDisabled:t||a,shortcuts:{Enter:()=>(flushSync(()=>{v();}),b(),{shouldPreventDefault:false})},onKeyDown:g,onKeyUp:f}),N=$=>{r.validate($)&&r.setInputValue($);},{inputProps:k,...O}=a$j({...e,id:S,value:z,defaultValue:"!",validate:void 0,[c$3]:r,type:"text",autoComplete:"off",onChange:N,onKeyDown:void 0,onKeyUp:void 0},r,l);return a$b(l,r.defaultColorValue,r.setColorValue),k=c(j$1,k,h,_,{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false",onBlur:v}),C==="native"&&(k["aria-required"]=void 0),{inputProps:k,...O}}function ie(e){let{color:r,colorName:l}=e,t=r||"#fff0",a=useMemo(()=>typeof t=="string"?a$1(t):t,[t]),{locale:u}=b$1(),y=a$8(e,{labelable:true}),C=b$2(ne,"@react-aria/color"),g=c$2(e.id);return l||(l=a.getChannelValue("alpha")===0?C.format("transparent"):a.getColorName(u)),{colorSwatchProps:{...y,role:"img","aria-roledescription":C.format("colorSwatch"),"aria-label":[l,e["aria-label"]||""].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]?`${g} ${e["aria-labelledby"]}`:void 0,id:g,style:{backgroundColor:a.toString("css"),forcedColorAdjust:"none"}},color:a||null}}var nl="_1dbkl53 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6m3",il="_1dbkl5e",pl=a({defaultClassName:"_1dbkl54 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6me _1yep5z6m6 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6ey _1yep5z6m5 _1yep5z6dy",variantClassNames:{isHovered:{true:"_1dbkl55"},isFocusVisible:{true:"_1dbkl56"},isDisabled:{true:"z9nup82 _1yep5z611l"},labelPosition:{top:"_1dbkl58",start:"_1dbkl59"}},defaultVariants:{},compoundVariants:[]}),ul="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kz _1yep5z6l0 _1yep5z6l1",sl=a({defaultClassName:"_1dbkl50 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6dy _1yep5z6ez",variantClassNames:{labelPosition:{top:"_1yep5z6oy _1yep5z6oz _1yep5z6p0",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),cl="_1dbkl5l _1yep5z6je _1yep5z6jf _1yep5z6jg _1yep5z69f _1yep5z69g _1yep5z69h",dl="_1dbkl5f z9nup86",ml="_1dbkl5m _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6it _1yep5z6iu _1yep5z6iv",lr="_1dbkl5k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6m6",yl="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6kz _1yep5z6l0 _1yep5z6l1 _1yep5z6dy _1yep5z6ez _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jz _1yep5z6k0 _1yep5z6k1",bl=a({defaultClassName:"_1dbkl5h _1dbkl5g _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g9",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6nm _1yep5z6nn _1yep5z6no"}},defaultVariants:{},compoundVariants:[]}),_l="_1dbkl5v _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj",fl=a({defaultClassName:"_1dbkl5q _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6br _1yep5z6bs _1yep5z6bt _1yep5z6d3 _1yep5z6d4 _1yep5z6d5 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6mf _1yep5z6hg _1yep5z6m6 _1yep5z6ey _1yep5z6dy",variantClassNames:{isFocused:{true:"_1dbkl5r _1yep5z613w"},isHovered:{true:"_1dbkl5s"},allowAlpha:{false:"_1yep5z6xp _1yep5z6xq _1yep5z6xr _1yep5z6z1 _1yep5z6z2 _1yep5z6z3 _1yep5z618m"}},defaultVariants:{},compoundVariants:[[{isHovered:true,isFocused:false},"_1yep5z61qj"]]}),zl=a({defaultClassName:"_1dbkl5a _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62c _1yep5z62d _1yep5z62e _1yep5z63i _1yep5z63j _1yep5z63k _1yep5z616 _1yep5z617 _1yep5z618 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69c _1yep5z69d _1yep5z69e _1yep5z6f9 _1yep5z6m5 _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6lq _1yep5z6lt",variantClassNames:{isHovered:{true:"_1yep5z612u"},isFocusVisible:{true:"_1yep5z618s _1yep5z618q _1yep5z618t _1yep5z614w"},isDisabled:{true:"_1yep5z611u"}},defaultVariants:{},compoundVariants:[]}),hl="_1dbkl5g",Cl="_1dbkl5u",vl="_1dbkl5j _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69f _1yep5z69g _1yep5z69h",Sl="_1dbkl5x",gl="_1dbkl5w",xl="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69l _1yep5z69m _1yep5z69n",kl=a({defaultClassName:"_1dbkl5n _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6ma _1yep5z6iw _1yep5z6ix _1yep5z6iy _1yep5z6mf _1yep5z6mi",variantClassNames:{isFocusVisible:{true:"_1dbkl5o _1yep5z618q _1yep5z614w _1yep5z618s"}},defaultVariants:{},compoundVariants:[]}),Pl="z9nup83 z9nup85 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6lw _1yep5z6lx _1yep5z6lz _1yep5z6ly _1yep5z6iw _1yep5z6ix _1yep5z6iy";var jl=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],Nl=a$1("#000000").toFormat("hsla"),fe="hsla",ze="hexa";function jr(e){if(typeof document>"u")return "#000000";let r=document.createElement("canvas").getContext("2d");return a$k(r,"Failed to get canvas context"),r.fillStyle=e,r.fillStyle}function Ml(e$1){if(typeof e$1=="string")try{return e(e$1).toFormat(fe)}catch{return a$1(jr(e$1)).toFormat(fe)}else if(e$1)return e$1.toFormat(fe);return null}function Fl(e,r){return e?.getChannelValue("alpha")?r?.toString(ze)===e.toString(ze):!r?.getChannelValue("alpha")}function Tl(e,r,l){return r?.label?r.label:e?.getChannelValue("alpha")===0?l:e?.toString("rgba")}var he="NONE";function Ol(e$1,r){let l=r?.map(a=>({id:e(a.color).toString(ze),label:a.label}))||[],t={id:he,label:e$1};return [...l,t]}var Rl=(e,{optionProps:r,isFocusVisible:l,isSelected:t},a)=>(a$k(e.value&&"label"in e.value,"Item must have label"),jsx("li",{...r,ref:a,className:lr,children:jsx(Ce,{color:e.value.id,isFocusVisible:l,isSelected:t,"aria-label":e.value.label,isInteractive:true})})),ar=(e,r=4)=>{let l=e.getChannelValue("alpha")===0,t=`repeating-conic-gradient(transparent 0% 25%, ${themeVars.color.background.secondary.medium} 25% 50%)`;return {backgroundImage:l?t:`linear-gradient(${e.toString("hexa")}, ${e.toString("hexa")}), ${t}`,backgroundSize:`${r}px ${r}px`}};var nr=a({defaultClassName:"_1344e9q0 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z6m0 _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kt _1yep5z6ku _1yep5z6kv z9nup8a",variantClassNames:{isFocusVisible:{true:"_1344e9q1"},isDisabled:{true:"_1344e9q2"},removeBlendMode:{true:"_1344e9q3"},isSelected:{true:"_1yep5z618s _1yep5z618q _1yep5z614w _1yep5z618v"},isHovered:{true:"_1344e9q5"}},defaultVariants:{},compoundVariants:[[{isSelected:false,isFocusVisible:true},"_1344e9q6"],[{isSelected:true,isFocusVisible:true},"_1344e9q7 _1yep5z61vb _1yep5z61v9 _1yep5z61rf _1yep5z61ve"],[{isSelected:true,isDisabled:true},"_1yep5z61vb _1yep5z61v9 _1yep5z61rf _1yep5z61ve _1yep5z61rp"],[{isHovered:true,isSelected:false},"_1yep5z61ve _1yep5z61vb _1yep5z61v9 _1yep5z61rj"]]}),ir="_1yep5z6fa",pr="_1344e9q9 _1yep5z6fp";var Ce=Mr.forwardRef(({color:e$1,isFocusVisible:r,isSelected:l,isInteractive:t,isDisabled:a,style:u,className:y,id:C,tooltip:g,isIndeterminate:f,indeterminateIcon:d$1=HelpIcon,noneLabel:z,"data-block-id":i,"data-block-class":s,...c$1},n)=>{let v=e$1&&e$1!==he&&(typeof e$1=="string"?e(e$1):e$1),{formatMessage:b$1}=b(),S=!v,{colorSwatchProps:h}=ie({color:S?"#000000":v}),{hoverProps:I,isHovered:x}=a$2({isDisabled:a||!t}),_=a$3({"data-focus-visible":r,"data-selected":l,"data-hovered":x,"data-block-id":i,"data-block-class":s,"data-disabled":a,"data-interactive":t,"data-indeterminate":f}),m=S?z??b$1(ur.none):h["aria-label"],A=c$1["aria-label"]??m,{tooltipProps:j}=a$4({tooltip:g,label:A}),N=jsx("div",{...c(I,_,S?{}:h),style:u,"aria-label":S?z??b$1(ur.none):h["aria-label"],role:"img",className:a$6(nr({removeBlendMode:S,isFocusVisible:r,isDisabled:!!a,isSelected:!!l,isHovered:x}),"BaselineUI-ColorSwatch",y),ref:n,id:C,...c$1,children:jsxs(a$5,{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"full",height:"full",width:"full",opacity:a?"medium":void 0,style:v&&!f?ar(v,4):void 0,children:[S&&!f?jsx("div",{className:pr}):null,f&&d$1?jsx(d$1,{role:"presentation",size:16,className:ir,"aria-hidden":"true"}):null]})});return j&&!a?jsx(a$7,{...j,children:jsx(d,{children:N})}):N});Ce.displayName="ColorSwatch";var ur=c$1({none:{id:"bui.colorSwatch.none",defaultMessage:"None"}});export{fe as A,ze as B,Ml as C,Fl as D,Tl as E,he as F,Ol as G,Rl as H,Ce as I,er as a,or as b,rr as c,nl as d,il as e,pl as f,ul as g,sl as h,cl as i,dl as j,ml as k,yl as l,bl as m,_l as n,fl as o,zl as p,hl as q,Cl as r,vl as s,Sl as t,gl as u,xl as v,kl as w,Pl as x,jl as y,Nl as z};
@@ -1,10 +0,0 @@
1
- import {b as b$4,a as a$7,c as c$4}from'./chunk-TN7FPPGM.mjs';import {c,d,b as b$5,e as e$1,f as f$2}from'./chunk-NMSOOQB2.mjs';import {e,c as c$2,f as f$1}from'./chunk-D6AOHRAV.mjs';import {a as a$9}from'./chunk-WID7IWNC.mjs';import {f,d as d$1}from'./chunk-X6K4M542.mjs';import {b as b$3}from'./chunk-64ZD4EKW.mjs';import {a as a$1,c as c$3,b as b$7}from'./chunk-L3SNGDBH.mjs';import {b as b$6}from'./chunk-DF2D7NE6.mjs';import {a as a$6,b as b$1}from'./chunk-KCHAWPUN.mjs';import {a as a$a}from'./chunk-JZXLV6JU.mjs';import {a as a$4}from'./chunk-DIL5HL6K.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {a}from'./chunk-66CUIXA6.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {a as a$8}from'./chunk-FDDB7QNQ.mjs';import {a as a$2}from'./chunk-LRFFL765.mjs';import {b,c as c$1}from'./chunk-PJINRIA6.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import R,{useRef,createElement,useContext,useEffect}from'react';import {CheckmarkIcon}from'@baseline-ui/icons/24';import {jsxs,jsx,Fragment}from'react/jsx-runtime';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- var O=R.forwardRef(({item:e,isDisabled:i,isFocusVisible:o,isSelected:r,liProps:n,showSelectedIcon:l,description:p,descriptionProps:S,labelProps:L,isFocused:y,isPressed:u,_state:c$2},s)=>{a(e.value&&a$1(e.value),"Item cannot be a section");let a$6=useRef(null),{icon:t,label:m}=e.value,{hoverProps:d$1,isHovered:g}=a$2({isDisabled:i},a$6),f=a$3({"data-selected":r,"data-disabled":i,"data-focused":y,"data-hovered":g,"data-pressed":u,"data-focus-visible":o,"data-selection-mode":c$2.selectionManager.selectionMode});return jsxs("li",{...c$1(n,d$1,f),className:a$5(d({isHovered:g,isFocused:o,isFirstChild:c$2.collection.getFirstKey()===e.key,isLastChild:c$2.collection.getLastKey()===e.key,isDisabled:i}),n.className,"BaselineUI-ListBox-Option"),style:n.style,ref:b(s,a$6),children:[jsxs(a$4,{display:"flex",alignItems:"center",gap:"lg",children:[l?jsx("span",{"aria-hidden":true,style:{height:24,width:24},children:r?jsx(CheckmarkIcon,{size:24}):null}):null,t?jsx(t,{size:24}):null,jsx("span",{...L,children:m})]}),p?jsx("span",{className:c({isDisabled:i}),...S,children:p}):null]})});O.displayName="DefaultListOption";var le=({item:e,children:i,state:o,dragState:r,elementRef:n,...l})=>{let{dragProps:p}=d$1({key:e.key},r,n);return jsxs(Fragment,{children:[jsx(c$4,{target:{type:"item",key:e.key,dropPosition:"before"},...l}),i(p),o.collection.getKeyAfter(e.key)==null&&jsx(c$4,{target:{type:"item",key:e.key,dropPosition:"after"},...l})]})};le.displayName="DraggableListOption";var C=R.forwardRef(({item:e$1,renderOption:i=(a,t,m)=>jsx(O,{item:a,liProps:t.optionProps,...t,ref:m}),showSelectedIcon:o,state:r,dragState:n,dropState:l,orientation:p,renderDropIndicator:S,dropIndicatorStyle:L,dropIndicatorClassName:y,optionStyle:u,optionClassName:c},s)=>{let a$2=R.useRef(null),t=e({key:e$1.key},r,a$2),{value:m}=e$1;a(m&&a$1(m),"ListSection should not be passed to ListOption");let d={isFocusVisible:t.isFocusVisible,isSelected:t.isSelected,isFocused:t.isFocused,isDisabled:t.isDisabled,isPressed:t.isPressed},g={style:b$1(u,m,d),className:a$6(c,m,d)};return n&&l?jsx(le,{orientation:p,state:r,item:e$1,dropState:l,dragState:n,elementRef:a$2,renderDropIndicator:S,dropIndicatorStyle:L,dropIndicatorClassName:y,children:f=>i(e$1,{...t,showSelectedIcon:o,_state:r,optionProps:{...c$1(t.optionProps,f),...g}},b(a$2,s))}):i(e$1,{...t,showSelectedIcon:o,_state:r,optionProps:{...t.optionProps,...g}},b(a$2,s))});C.displayName="Option";var me=({section:e,state:i,sectionClassName:o,sectionStyle:r,showSectionHeader:n,renderSectionHeader:l,withSectionHeaderPadding:p=false,...S})=>{let L=R.useRef(null),{itemProps:y,groupProps:u,headingProps:c}=f$1({heading:n?l?.(e,L)||e.rendered:void 0,"aria-label":e["aria-label"]}),s=i.collection.getChildren?.(e.key);a(s,"children must be defined");let{value:a$1}=e;a(a$1&&b$7(a$1),"section must be a ListSection");let t=typeof r=="function"?r(a$1):r,m=typeof o=="function"?o(a$1):o;return jsxs(Fragment,{children:[e.key===i.collection.getFirstKey()?null:jsx(a$a,{UNSAFE_omitRole:true}),jsxs("li",{...y,style:{...y.style,...t},className:a$5(f$2,m,"BaselineUI-ListBox-Section"),children:[e.rendered&&n?l?.(e,L,c)||jsx(a$4,{...c,className:a$5("BaselineUI-ListBox-SectionHeader",e$1),ref:L,paddingX:"lg",typography:"label.md.medium",color:"text.primary",paddingInlineStart:p?"5xl":"lg",paddingInlineEnd:"lg",children:e.rendered}):null,jsx("ul",{...u,children:[...s].map(d=>jsx(C,{item:d,state:i,...S},d.key))})]})]})};var He=R.createContext(null),T=R.forwardRef(({className:e,layout:i="stack",orientation:o="vertical",showSelectedIcon:r=true,style:n,renderOption:l,enableReorder:p=false,shouldSelectOnPressUp:S=false,"data-block-id":L,"data-block-class":y,renderDragPreview:u,onReorder:c,state:s,listBoxHandle:a,...t},m)=>{let d=R.useRef(null),{direction:g}=b$2(),f$1=R.useRef(null),{listBoxProps:Le}=c$2({...t,shouldSelectOnPressUp:p||S,keyboardDelegate:new b$3({collection:s.collection,ref:f$1,layout:i,orientation:o,direction:g,disabledKeys:s.disabledKeys})},s,f$1);b$4({handle:a},s,f$1);let{collectionProps:ye,dragState:ue,dropState:Se}=a$7({...t,onReorder:c,layout:i,orientation:o,enableReorder:p,preview:d},s,f$1),{isFocusVisible:ge,isFocused:xe,focusProps:Pe}=a$8(),Ie=a$3({"data-block-id":L,"data-block-class":y,"data-layout":i,"data-empty":s.collection.size===0,"data-focused":xe,"data-focus-visible":ge,"data-orientation":o});return a$9({ref:f$1,isDisabled:!p}),jsxs("ul",{...c$1(Le,Pe,Ie,ye),className:a$5(b$5,"BaselineUI-ListBox",e),style:n,ref:b(m,f$1),children:[[...s.collection].map(b=>{let E={key:b.key,state:s,dragState:ue,dropState:Se,renderOption:l,renderDropIndicator:t.renderDropIndicator,renderSectionHeader:t.renderSectionHeader,showSelectedIcon:r,orientation:o,dropIndicatorStyle:t.dropIndicatorStyle,dropIndicatorClassName:t.dropIndicatorClassName,optionStyle:t.optionStyle,optionClassName:t.optionClassName,sectionClassName:t.sectionClassName,sectionStyle:t.sectionStyle,showSectionHeader:t.showSectionHeader,withSectionHeaderPadding:t.withSectionHeaderPadding};return b.type==="section"?createElement(me,{...E,key:b.key,section:b}):createElement(C,{...E,key:b.key,item:b})}),u?jsx(f,{ref:d,children:u}):null]})});T.displayName="ListBoxCore";var de=R.forwardRef((e,i)=>{let o=c$3(),r=b$6({...e,children:o});return jsx(T,{...e,ref:i,state:r})});de.displayName="ListBoxStandalone";var fe=R.forwardRef((e,i)=>{let o=useContext(He);return useEffect(()=>{if(!e.items&&!o)throw new Error("ListBox: You must provide a `state` or `items` prop to render the listbox.")},[e.items,o]),o?jsx(T,{...e,ref:i,state:o}):jsx(de,{...e,ref:i})});fe.displayName="ListBox";export{O as a,He as b,fe as c};
@@ -1,10 +0,0 @@
1
- import {a as a$1,c}from'./chunk-KRVEGSVY.mjs';import {d as d$2}from'./chunk-D2NVLRIU.mjs';import {a as a$5}from'./chunk-FTV6OWMI.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$1,d,a as a$2,i as i$2}from'./chunk-OS6PVCFX.mjs';import {e,f}from'./chunk-A63HMTSM.mjs';import {a}from'./chunk-UR42GQO4.mjs';import {j,i as i$1,c as c$1}from'./chunk-NQVTVL24.mjs';import {d as d$1}from'./chunk-IIBBR266.mjs';import {o,p,d as d$3,a as a$6,e as e$1,i as i$3}from'./chunk-SCJ3RG7B.mjs';import {c as c$2,a as a$4}from'./chunk-PJINRIA6.mjs';import {c as c$3}from'./chunk-35AM4QEA.mjs';import {i,b as b$2,a as a$3,j as j$1,h}from'./chunk-TYOEGCPS.mjs';import {useRef,useEffect}from'react';import {flushSync}from'react-dom';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- function Y(u){return i$3()?u.altKey:u.ctrlKey}function le(u,e){let r=`[data-key="${CSS.escape(String(e))}"]`,l=u.current?.dataset.collection;return l&&(r=`[data-collection="${CSS.escape(l)}"]${r}`),u.current?.querySelector(r)}var Ce=new WeakMap;function Ie(u){let e=c$3();return Ce.set(u,e),e}function ke(u){return Ce.get(u)}var xe=1e3;function Re(u){let{keyboardDelegate:e,selectionManager:r,onTypeSelect:l}=u,i=useRef({search:"",timeout:void 0}),T=c=>{if(i.current.search.length>0&&c.key===" "){if(c.preventDefault(),(!("continuePropagation"in c)||"continuePropagation"in c&&!c.isPropagationStopped())&&c.stopPropagation(),i.current.search+=" ",e.getKeyForSearch!=null){let a=e.getKeyForSearch(i.current.search,r.focusedKey);a==null&&(a=e.getKeyForSearch(i.current.search)),a!=null&&(r.setFocusedKey(a),l&&l(a));}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search="";},xe);}},b=c=>{let a=We(c.key);if(!(!a||c.ctrlKey||c.metaKey||c.altKey||!h(c.currentTarget,j$1(c))||i.current.search.length===0&&a===" ")){if(i.current.search+=a,e.getKeyForSearch!=null){let y=e.getKeyForSearch(i.current.search,r.focusedKey);if(y==null&&(y=e.getKeyForSearch(i.current.search)),y!=null)r.setFocusedKey(y),l&&l(y),c.preventDefault(),"continuePropagation"in c||c.stopPropagation();else {i.current.search="",clearTimeout(i.current.timeout),i.current.timeout=void 0;return}}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search="";},xe);}};return useEffect(()=>{let c=i.current.timeout;return ()=>{clearTimeout(c);}},[i]),{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?T:void 0,onKeyDown:e.getKeyForSearch?b:void 0}}}function We(u){return u.length===1||!/^[A-Z]/i.test(u)?u:""}function Pt(u){let{selectionManager:e$2,keyboardDelegate:r,ref:l,autoFocus:i$3=false,shouldFocusWrap:T=false,disallowEmptySelection:b$3=false,disallowSelectAll:c$3=false,escapeKeyBehavior:a$4="clearSelection",selectOnFocus:y=e$2.selectionBehavior==="replace",disallowTypeAhead:ie=false,shouldUseVirtualFocus:g,allowsTabNavigation:V=false,scrollRef:f$1=l,linkBehavior:v="action",UNSTABLE_focusOnEntry:H}=u,{direction:C}=b(),Z=o(),d$1=(n,o,m)=>{if(o!=null){if(e$2.isLink(o)&&v==="selection"&&y&&!Y(n)){flushSync(()=>{e$2.setFocusedKey(o,m);});let p=le(l,o),E=e$2.getItemProps(o);if(p){Z.open(p,n,E.href,E.routerOptions);return}return false}if(e$2.setFocusedKey(o,m),e$2.isLink(o)&&v==="override")return false;if(n.shiftKey&&e$2.selectionMode==="multiple"){e$2.extendSelection(o);return}else if(y&&!Y(n)){e$2.replaceSelection(o);return}}return false},_=n=>{if(r.getKeyBelow){let o=e$2.focusedKey!=null?r.getKeyBelow?.(e$2.focusedKey):r.getFirstKey?.();if(o==null&&T&&(o=r.getFirstKey?.(e$2.focusedKey)),o!=null){d$1(n,o);return}}return false},F=n=>{if(r.getKeyAbove){let o=e$2.focusedKey!=null?r.getKeyAbove?.(e$2.focusedKey):r.getLastKey?.();if(o==null&&T&&(o=r.getLastKey?.(e$2.focusedKey)),o!=null){d$1(n,o);return}}return false},W=n=>{if(r.getFirstKey){if(e$2.focusedKey===null&&n.shiftKey)return false;let o=r.getFirstKey(e$2.focusedKey,i$2(n));if(e$2.setFocusedKey(o),o!=null){if(i$2(n)&&n.shiftKey&&e$2.selectionMode==="multiple"){e$2.extendSelection(o);return}else if(y){e$2.replaceSelection(o);return}}}return false},A=n=>{if(r.getKeyLeftOf){let o=e$2.focusedKey!=null?r.getKeyLeftOf?.(e$2.focusedKey):r.getFirstKey?.();if(o==null&&T&&(o=C==="rtl"?r.getFirstKey?.(e$2.focusedKey):r.getLastKey?.(e$2.focusedKey)),o!=null){d$1(n,o,C==="rtl"?"first":"last");return}}return false},I=n=>{if(r.getKeyRightOf){let o=e$2.focusedKey!=null?r.getKeyRightOf?.(e$2.focusedKey):r.getFirstKey?.();if(o==null&&T&&(o=C==="rtl"?r.getLastKey?.(e$2.focusedKey):r.getFirstKey?.(e$2.focusedKey)),o!=null){d$1(n,o,C==="rtl"?"last":"first");return}}return false},k=n=>{if(r.getLastKey){if(e$2.focusedKey===null&&n.shiftKey)return false;let o=r.getLastKey(e$2.focusedKey,i$2(n));if(e$2.setFocusedKey(o),o!=null){if(i$2(n)&&n.shiftKey&&e$2.selectionMode==="multiple"){e$2.extendSelection(o);return}else if(y){e$2.replaceSelection(o);return}}}return false},z=n=>{if(r.getKeyPageBelow&&e$2.focusedKey!=null){let o=r.getKeyPageBelow(e$2.focusedKey);if(o!=null)return d$1(n,o)}return false},J=n=>{if(r.getKeyPageAbove&&e$2.focusedKey!=null){let o=r.getKeyPageAbove(e$2.focusedKey);if(o!=null)return d$1(n,o)}return false},w=()=>{if(e$2.selectionMode==="multiple"&&c$3!==true){e$2.selectAll();return}return false},x=()=>{if(a$4==="clearSelection"&&!b$3&&e$2.selectedKeys.size!==0){e$2.clearSelection();return}return false},K=()=>{if(!V&&l.current){let n=d$2(l.current,{tabbable:true}),o,m;do m=n.lastChild(),m&&(o=m);while(m);let p=a$3(l.current),E=i(p);o&&(!h(o,E)||E&&!d$3(E))&&a$6(o);}return {shouldContinuePropagation:true,shouldPreventDefault:false}},Q=()=>(!V&&l.current&&l.current.focus(),{shouldContinuePropagation:true,shouldPreventDefault:false}),P=(n,o)=>({[e$1()?n+"+Shift+Alt":n+"+Shift+Control"]:o,[n+"+Shift"]:o,[e$1()?n+"+Alt":n+"+Control"]:o,[n]:o}),{keyboardProps:se}=j({shortcuts:{...P("ArrowDown",_),...P("ArrowUp",F),...P("ArrowLeft",A),...P("ArrowRight",I),...P("PageDown",z),...P("PageUp",J)},allowRepeats:true}),{keyboardProps:ue}=j({shortcuts:{...P("Home",W),...P("End",k),"Mod+A":w,Escape:x,Tab:K,"Tab+Shift":Q}}),j$2=useRef({top:0,left:0});a(f$1,"scroll",()=>{j$2.current={top:f$1.current?.scrollTop??0,left:f$1.current?.scrollLeft??0};});let ce=n=>{if(e$2.isFocused){h(n.currentTarget,j$1(n))||e$2.setFocused(false);return}if(!h(n.currentTarget,j$1(n)))return;let o=c$1();e$2.setFocused(true);let m=p=>{p!=null&&(e$2.setFocusedKey(p),y&&!e$2.isSelected(p)&&e$2.replaceSelection(p));};if(H&&(o==="keyboard"||o==="virtual"))m(H==="first"?r.getFirstKey?.():r.getLastKey?.());else if(e$2.focusedKey==null){let p=n.relatedTarget;p&&n.currentTarget.compareDocumentPosition(p)&Node.DOCUMENT_POSITION_FOLLOWING?m(e$2.lastSelectedKey??r.getLastKey?.()):m(e$2.firstSelectedKey??r.getFirstKey?.());}else f$1.current&&(f$1.current.scrollTop=j$2.current.top,f$1.current.scrollLeft=j$2.current.left);if(e$2.focusedKey!=null&&f$1.current){let p=le(l,e$2.focusedKey),E=b$2(p);p instanceof E.HTMLElement&&(!h(p,i(E.document))&&!g&&a$6(p),(o==="keyboard"||H&&o==="virtual")&&f(p,{containingElement:l.current}));}},ae=n=>{h(n.currentTarget,n.relatedTarget)||e$2.setFocused(false);},S=useRef(false);a(l,b$1,g?n=>{let{detail:o}=n;n.stopPropagation(),e$2.setFocused(true),o?.focusStrategy==="first"&&(S.current=true);}:void 0);let R=r.getFirstKey?.()??null;d(()=>{if(S.current)if(R==null){let n=i();a$1(l.current),c(n,null),e$2.collection.size>0&&(S.current=false);}else e$2.setFocusedKey(R),S.current=false;},[R,e$2.collection.size]),d(()=>{e$2.collection.size>0&&(S.current=false);},[e$2.focusedKey]),a(l,a$2,g?n=>{n.stopPropagation(),e$2.setFocused(false),n.detail?.clearFocusKey&&e$2.setFocusedKey(null);}:void 0);let X=useRef(i$3),B=useRef(false);useEffect(()=>{if(X.current){let n=null;i$3==="first"&&(n=r.getFirstKey?.()??null),i$3==="last"&&(n=r.getLastKey?.()??null);let o=e$2.selectedKeys;if(o.size){for(let m of o)if(e$2.canSelectItem(m)){n=m;break}}e$2.setFocused(true),e$2.setFocusedKey(n),n!=null&&y&&!o.size&&e$2.canSelectItem(n)&&e$2.replaceSelection(n),n==null&&!g&&l.current&&i$1(l.current),e$2.collection.size>0&&(X.current=false,B.current=true);}});let t=useRef(e$2.focusedKey),s=useRef(null);useEffect(()=>{if(e$2.isFocused&&e$2.focusedKey!=null&&(e$2.focusedKey!==t.current||B.current)&&f$1.current&&l.current){let n=c$1(),o=le(l,e$2.focusedKey),m=b$2(o);if(!(o instanceof m.HTMLElement))return;(n==="keyboard"||B.current)&&(s.current&&cancelAnimationFrame(s.current),s.current=requestAnimationFrame(()=>{f$1.current&&(e(f$1.current,o),n!=="virtual"&&f(o,{containingElement:l.current}));}));}!g&&e$2.isFocused&&e$2.focusedKey==null&&t.current!=null&&l.current&&i$1(l.current),t.current=e$2.focusedKey,B.current=false;}),useEffect(()=>()=>{s.current&&cancelAnimationFrame(s.current);},[]),a(l,"react-aria-focus-scope-restore",n=>{n.preventDefault(),e$2.setFocused(true);});let M={...c$2(ue,se),onFocus:ce,onBlur:ae,onMouseDown(n){f$1.current===j$1(n)&&n.preventDefault();}},{typeSelectProps:$}=Re({keyboardDelegate:r,selectionManager:e$2});ie||(M=c$2($,M));let he;g||(he=e$2.focusedKey==null?0:-1);let Ve=Ie(e$2.collection);return {collectionProps:c$2(M,{tabIndex:he,"data-collection":Ve})}}function Ut(u){let{id:e,selectionManager:r,key:l,ref:i$3,shouldSelectOnPressUp:T,shouldUseVirtualFocus:b,focus:c,isDisabled:a,onAction:y,allowsDifferentPressOrigin:ie,linkBehavior:g="action"}=u,V=o();e=c$3(e);let f=t=>{if(t.pointerType==="keyboard"&&Y(t))r.toggleSelection(l);else {if(r.selectionMode==="none")return;if(r.isLink(l)){if(g==="selection"&&i$3.current){let s=r.getItemProps(l);V.open(i$3.current,t,s.href,s.routerOptions),r.setSelectedKeys(r.selectedKeys);return}else if(g==="override"||g==="none")return}r.selectionMode==="single"?r.isSelected(l)&&!r.disallowEmptySelection?r.toggleSelection(l):r.replaceSelection(l):t&&t.shiftKey?r.extendSelection(l):r.selectionBehavior==="toggle"||t&&(i$2(t)||t.pointerType==="touch"||t.pointerType==="virtual")?r.toggleSelection(l):r.replaceSelection(l);}};useEffect(()=>{l===r.focusedKey&&r.isFocused&&(b?a$1(i$3.current):c?c():i(a$3(i$3.current))!==i$3.current&&i$3.current&&i$1(i$3.current));},[i$3,l,r.focusedKey,r.childFocusStrategy,r.isFocused,b]),a=a||r.isDisabled(l);let v={};!b&&!a?v={tabIndex:l===r.focusedKey?0:-1,onFocus(t){j$1(t)===i$3.current&&r.setFocusedKey(l);}}:a&&(v.onMouseDown=t=>{t.preventDefault();}),useEffect(()=>{a&&r.focusedKey===l&&r.setFocusedKey(null);},[r,a,l]);let H=r.isLink(l)&&g==="override",C=y&&u.UNSTABLE_itemBehavior==="action",Z=r.isLink(l)&&g!=="selection"&&g!=="none",d=!a&&r.canSelectItem(l)&&!H&&!C,_=(y||Z)&&!a,F=_&&(r.selectionBehavior==="replace"?!d:!d||r.isEmpty),W=_&&d&&r.selectionBehavior==="replace",A=F||W,I=useRef(null),k=A&&d,z=useRef(false),J=useRef(false),w=r.getItemProps(l),x=t=>{y&&(y(),i$3.current?.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:true}))),Z&&i$3.current&&V.open(i$3.current,t,w.href,w.routerOptions);},K={ref:i$3};T?(K.onPressStart=t=>{I.current=t.pointerType,z.current=k,t.pointerType==="keyboard"&&(!A||Ne(t.key))&&f(t);},ie?(K.onPressUp=F?void 0:t=>{t.pointerType==="mouse"&&d&&f(t);},K.onPress=F?x:t=>{t.pointerType!=="keyboard"&&t.pointerType!=="mouse"&&d&&f(t);}):K.onPress=t=>{if(F||W&&t.pointerType!=="mouse"){if(t.pointerType==="keyboard"&&!Ue(t.key))return;x(t);}else t.pointerType!=="keyboard"&&d&&f(t);}):(K.onPressStart=t=>{I.current=t.pointerType,z.current=k,J.current=F,d&&(t.pointerType==="mouse"&&!F||t.pointerType==="keyboard"&&(!_||Ne(t.key)))&&f(t);},K.onPress=t=>{(t.pointerType==="touch"||t.pointerType==="pen"||t.pointerType==="virtual"||t.pointerType==="keyboard"&&A&&Ue(t.key)||t.pointerType==="mouse"&&J.current)&&(A?x(t):d&&f(t));});let Q=ke(r.collection);if(v["data-collection"]=Q,v["data-key"]=l,K.preventFocusOnPress=b,b&&(K=c$2(K,{onPressStart(t){t.pointerType!=="touch"&&(r.setFocused(true),r.setFocusedKey(l));},onPress(t){t.pointerType==="touch"&&(r.setFocused(true),r.setFocusedKey(l));}})),w)for(let t of ["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])w[t]&&(K[t]=a$4(K[t],w[t]));let{pressProps:P,isPressed:se}=d$1(K),ue=W?t=>{I.current==="mouse"&&(t.stopPropagation(),t.preventDefault(),x(t));}:void 0,{longPressProps:j}=a$5({isDisabled:!k,onLongPress(t){t.pointerType==="touch"&&(f(t),r.setSelectionBehavior("toggle"));}}),ce=t=>{if(I.current!=="touch"||!z.current)return;let s=j$1(t),$=(s.nodeType===Node.ELEMENT_NODE?s:s.parentElement)?.closest('[draggable="true"]');($==null||$===t.currentTarget||!t.currentTarget.contains($))&&t.preventDefault();},ae=g!=="none"&&r.isLink(l)?t=>{p.isOpening||t.preventDefault();}:void 0,S=c$2(v,d||F||b&&!a?P:{},k?j:{},{onDoubleClick:ue,onDragStartCapture:ce,onClick:ae,id:e},b?{onMouseDown:t=>t.preventDefault()}:void 0),R=t=>{let s=t;for(;s&&s!==i$3.current;){let M=s.getAttribute("data-collection");if(M!=null)return M!==Q;s=s.parentElement;}return d$3(t)},X=S.onPointerDown;S.onPointerDown=t=>{let s=j$1(t);if(s&&s!==i$3.current&&R(s)){t.stopPropagation();return}X?.(t);};let B=S.onMouseDown;return S.onMouseDown=t=>{let s=j$1(t);if(s&&s!==i$3.current&&R(s)){t.stopPropagation();return}B?.(t);},{itemProps:S,isPressed:se,isSelected:r.isSelected(l),isFocused:r.isFocused&&r.focusedKey===l,isDisabled:a,allowsSelection:d,hasAction:A}}function Ue(u){return u==="Enter"}function Ne(u){return u===" "}export{le as a,Re as b,Pt as c,Ut as d};
@@ -1,10 +0,0 @@
1
- import {a as a$3}from'./chunk-HNKEI45D.mjs';import {a as a$5}from'./chunk-FP5EWPOF.mjs';import {a as a$4}from'./chunk-MPJXTZ6L.mjs';import {a as a$2}from'./chunk-54MWEZUP.mjs';import {f}from'./chunk-CFDIUF4H.mjs';import {a as a$8}from'./chunk-KFJE5ZBK.mjs';import {a as a$6}from'./chunk-5LGYS5CZ.mjs';import {b}from'./chunk-A455VRNY.mjs';import {a as a$7}from'./chunk-5IC46G5J.mjs';import {a as a$b}from'./chunk-22VRCVTH.mjs';import {b as b$3,c as c$2}from'./chunk-QVFGEXDU.mjs';import {a as a$a}from'./chunk-LRFFL765.mjs';import {b as b$2,c as c$3}from'./chunk-NQVTVL24.mjs';import {c,b as b$1}from'./chunk-PJINRIA6.mjs';import {a as a$9}from'./chunk-SVIYLH7R.mjs';import {a as a$1,c as c$1}from'./chunk-35AM4QEA.mjs';import {a as a$c}from'./chunk-TYOEGCPS.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import F,{useRef,useEffect,useState,useMemo}from'react';import {motion}from'motion/react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- function k(t,a,o){let c$1=a$9(t,{labelable:true}),{hoverProps:f}=a$a({onHoverStart:()=>a?.open(true),onHoverEnd:()=>a?.close()},o);return {tooltipProps:c(c$1,f,{role:"tooltip"})}}function V(t,a,o){let{isDisabled:c$4,trigger:f,shouldCloseOnPress:b=true}=t,g=c$1(),p=useRef(false),i=useRef(false),r=()=>{(p.current||i.current)&&a.open(i.current);},n=y=>{!p.current&&!i.current&&a.close(y);};useEffect(()=>{let y=x=>{o&&o.current&&x.key==="Escape"&&(x.stopPropagation(),a.close(true));},v=a$c(o?.current);if(a.isOpen)return v.addEventListener("keydown",y,true),()=>{v.removeEventListener("keydown",y,true);}},[o,a]);let P=()=>{f!=="focus"&&(c$3()==="pointer"?p.current=true:p.current=false,r());},l=()=>{f!=="focus"&&(i.current=false,p.current=false,n());},T=()=>{b&&(i.current=false,p.current=false,n(true));},u=()=>{b$2()&&(i.current=true,r());},m=()=>{i.current=false,p.current=false,n(true);},{hoverProps:e}=a$a({isDisabled:c$4,onHoverStart:P,onHoverEnd:l}),{focusableProps:s}=c$2({isDisabled:c$4,onFocus:u,onBlur:m},o);return {triggerProps:{"aria-describedby":a.isOpen?g:void 0,...c(s,e,{onPointerDown:T,onKeyDown:T}),tabIndex:void 0},tooltipProps:{id:g}}}var be=1500,se=500,O={},ge=0,E=false,d=null,z=null;function j(t={}){let{delay:a=be,closeDelay:o=se}=t,{isOpen:c,open:f,close:b}=a$b(t),[g,p]=useState(false),i=useMemo(()=>`${++ge}`,[]),r=useRef(null),n=useRef(b),P=()=>{O[i]=u;},l=()=>{for(let e in O)e!==i&&(O[e](true,true),delete O[e]);},T=e=>{r.current&&clearTimeout(r.current),r.current=null,l(),P(),p(!!e),E=true,f(),d&&(clearTimeout(d),d=null),z&&(clearTimeout(z),z=null);},u=(e,s)=>{p(!!s),e||o<=0?(r.current&&clearTimeout(r.current),r.current=null,n.current()):r.current||(r.current=setTimeout(()=>{r.current=null,n.current();},o)),d&&(clearTimeout(d),d=null),E&&(z&&clearTimeout(z),z=setTimeout(()=>{delete O[i],z=null,E=false;},Math.max(se,o)));},m=()=>{l(),P(),!c&&!E?(d&&clearTimeout(d),d=setTimeout(()=>{d=null,E=true,T(false);},a)):c||T(true);};return useEffect(()=>{n.current=b;},[b]),useEffect(()=>()=>{r.current&&clearTimeout(r.current),O[i]&&delete O[i];},[i]),{isOpen:c,shouldSkipAnimation:g,open:e=>{!e&&a>0&&!r.current?m():T(E);},close:u}}var pe=a({defaultClassName:"_1jwycy80",variantClassNames:{placement:{bottom:"_1jwycy81",left:"_1jwycy82",right:"_1jwycy83",top:"_1jwycy84"},variant:{default:"_1jwycy85",inverse:"_1jwycy86"}},defaultVariants:{},compoundVariants:[]}),ne=a({defaultClassName:"_1jwycy87 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn",variantClassNames:{size:{md:"_1yep5z63u _1yep5z63v _1yep5z63w _1yep5z61i _1yep5z61j _1yep5z61k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6e7",sm:"_1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6dv"},variant:{default:"_1yep5z6gh _1yep5z6f3",inverse:"_1yep5z6d7 _1yep5z6g9 _1yep5z6ey"}},defaultVariants:{},compoundVariants:[]});var I=F.forwardRef(({children:t,state:a,triggerRef:o,positionProps:c$1,placement:f,lastPlacement:b$2,onPlacementChange:g,variant:p,size:i,tooltipProps:r,includeArrow:n,id:P,"aria-label":l,"aria-labelledby":T,"aria-describedby":u,"aria-details":m},e)=>{let s=useRef(null),{tooltipProps:y}=k({isOpen:a.isOpen,id:P,"aria-label":l,"aria-labelledby":T,"aria-describedby":u,"aria-details":m},a,s),v=useRef(null);a$1(()=>{if(s.current&&!o.current?.closest('[aria-hidden="true"], [inert]'))return b(s.current)},[o]);let{overlayProps:x,arrowProps:M,placement:R,updatePosition:h}=a$2({arrowSize:n?13:0,targetRef:o,arrowBoundaryOffset:n?8:0,offset:n?12:2,overlayRef:v,placement:f,...c$1,isOpen:true});a$3({ref:v,threshold:1,onIntersect:h}),a$4({ref:o,onResize:h}),useEffect(()=>{R&&g(R);},[R,g]);let S=R??b$2,A=S==="center"?"bottom":S,{transitionProps:fe}=a$5({placement:S});return jsxs(motion.span,{...c(x,fe),ref:b$1(e,v,s),"data-placement":A,children:[n?jsx("div",{className:pe({placement:A,variant:p}),...M}):null,jsx("div",{...c(y,r),className:ne({variant:p,size:i}),children:t})]})});I.displayName="TooltipContent";var me=F.forwardRef(({children:t,placement:a="bottom",delay:o=1e3,closeDelay:c=500,variant:f$1="default",size:b="md",includeArrow:g=true,portalContainer:p,className:i,style:r,"data-block-id":n,"data-block-class":P,...l},T)=>{let u=F.useRef(null),m=!!l.text,e=!m||l.isDisabled,s=j({...l,delay:o,closeDelay:c,isDisabled:e}),{triggerProps:y,tooltipProps:v}=V({...l,isDisabled:e},s,u),x=F.useRef({isDisabled:e,hasText:m});F.useEffect(()=>{let A=x.current;s.isOpen&&(A.hasText&&!m?s.close(true):e&&!A.isDisabled?s.close():!e&&A.isDisabled&&b$2()&&u.current&&u.current===f(u.current)&&s.open(true)),x.current={isDisabled:e,hasText:m};},[e,m,s]);let M=a$6(p),[R,h]=F.useState("bottom"),S=F.isValidElement(t)?jsx(b$3,{...y,ref:u,children:t}):typeof t=="function"?t({triggerProps:y,triggerRef:u}):t;return !F.isValidElement(t)&&typeof t!="function"&&t!=null&&t!==""&&typeof t!="boolean"&&a$7("Tooltip:non-element-children","Tooltip: children must be a single element or a render function to trigger the tooltip. Other children render without a trigger, so the tooltip never opens."),jsxs(Fragment,{children:[S,s.isOpen&&m?jsx(a$8,{disableFocusManagement:true,portalContainer:M,className:i,style:r,"data-block-id":n,"data-block-class":P,children:jsx(I,{ref:T,state:s,triggerRef:u,positionProps:l,placement:a,lastPlacement:R,onPlacementChange:h,tooltipProps:v,variant:f$1,size:b,includeArrow:g,id:l.id,"aria-label":l["aria-label"],"aria-labelledby":l["aria-labelledby"],"aria-describedby":l["aria-describedby"],"aria-details":l["aria-details"],children:l.text})}):null]})});me.displayName="Tooltip";export{me as a};
@@ -1,10 +0,0 @@
1
- import {a as a$4}from'./chunk-KOPAIJJU.mjs';import {a as a$5}from'./chunk-F3EOLTFM.mjs';import {a as a$2}from'./chunk-7JE2SRIH.mjs';import {d}from'./chunk-6LFOODXI.mjs';import {q}from'./chunk-OO3ZVB2T.mjs';import {b}from'./chunk-DOFT4BQH.mjs';import {c as c$1,b as b$1}from'./chunk-IDIZSV2Y.mjs';import {a as a$3}from'./chunk-DIL5HL6K.mjs';import {a as a$6}from'./chunk-LHLY432N.mjs';import {b as b$2}from'./chunk-DLJHL4V7.mjs';import {j}from'./chunk-TYOEGCPS.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import {MinusIcon}from'@baseline-ui/icons/12';import {AttachmentsIcon,ErrorCircleFilledIcon}from'@baseline-ui/icons/16';import {sprinkles}from'@baseline-ui/tokens';import c from'react';import {PagePortraitIcon}from'@baseline-ui/icons/24';import {jsx,jsxs,Fragment}from'react/jsx-runtime';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- var U=a({defaultClassName:"_1x35j5gm _1yep5z6ao _1yep5z6ap _1yep5z6aq _1yep5z6bc _1yep5z6bd _1yep5z6be _1yep5z6c0 _1yep5z6c1 _1yep5z6c2 _1yep5z6co _1yep5z6cp _1yep5z6cq _1yep5z6g9 _1yep5z6mf _1yep5z6mh _1yep5z6hg",variantClassNames:{variant:{expanded:"_1x35j5gn _1yep5z6ms _1yep5z6mt _1yep5z6mu _1yep5z6p4 _1yep5z6p5 _1yep5z6p6 _1yep5z6qa _1yep5z6qb _1yep5z6qc _1yep5z6ny _1yep5z6nz _1yep5z6o0 _1yep5z615x _1yep5z615y _1yep5z615z _1yep5z616i _1yep5z616j _1yep5z616k",grid:"_1x35j5go _1yep5z6mp _1yep5z6mq _1yep5z6mr _1yep5z6p1 _1yep5z6p2 _1yep5z6p3 _1yep5z6q7 _1yep5z6q8 _1yep5z6q9 _1yep5z6nv _1yep5z6nw _1yep5z6nx _1yep5z615r _1yep5z615s _1yep5z615t _1yep5z6163 _1yep5z6164 _1yep5z6165 _1yep5z616i _1yep5z616j _1yep5z616k _1yep5z6w1 _1yep5z6w2 _1yep5z6w3"},isHovered:{true:"_1yep5z6143 _1yep5z612t"},isFocusVisible:{true:"_1yep5z618q _1yep5z618s _1yep5z618t _1yep5z614w"},isDisabled:{true:"_1yep5z6146"}},defaultVariants:{},compoundVariants:[]}),G=a({defaultClassName:"_1x35j5gx _1yep5z6du _1yep5z6f0",variantClassNames:{variant:{expanded:"_1x35j5gy _1yep5z6r7 _1yep5z6r8 _1yep5z6r9",grid:"_1x35j5gz"},isDisabled:{true:"_1yep5z611l"}},defaultVariants:{},compoundVariants:[]}),K="_1x35j5gw",Y="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69c _1yep5z69d _1yep5z69e _1yep5z6m3",J=a({defaultClassName:"_1x35j5g12 _1yep5z6f9",variantClassNames:{isDisabled:{true:"_1yep5z611u"}},defaultVariants:{},compoundVariants:[]}),Q=a({defaultClassName:"_1x35j5gb _1yep5z69i _1yep5z69j _1yep5z69k",variantClassNames:{variant:{expanded:"_1x35j5gc _1yep5z615r _1yep5z615s _1yep5z615t _1yep5z6163 _1yep5z6164 _1yep5z6165",grid:"_1x35j5gd"},isCentered:{true:"_1yep5z6w4 _1yep5z6w5 _1yep5z6w6 _1yep5z617c _1yep5z617d _1yep5z617e",false:"_1x35j5gf"}},defaultVariants:{},compoundVariants:[[{variant:"grid",isCentered:false},"_1x35j5gg"],[{variant:"grid",isCentered:true},"_1x35j5gh"]]}),W=a({defaultClassName:"_1x35j5gs _1yep5z6e5 _1yep5z6ey",variantClassNames:{variant:{expanded:"_1x35j5gt",grid:"_1yep5z610n"},isDisabled:{true:"_1yep5z611l"}},defaultVariants:{},compoundVariants:[]}),X=a({defaultClassName:"_1x35j5gi _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",variantClassNames:{variant:{expanded:"_1yep5z618m",grid:"_1x35j5gk"},hasAction:{true:"_1x35j5gl"}},defaultVariants:{},compoundVariants:[]}),Z=a({defaultClassName:"_1x35j5g14 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kt _1yep5z6ku _1yep5z6kv _1yep5z6m3 _1yep5z6gc",variantClassNames:{isDisabled:{true:"_1x35j5g15"}},defaultVariants:{},compoundVariants:[]}),$="_1x35j5g11",ee="_1yep5z6e5 _1yep5z6ez",ae="_1x35j5g0 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6m3 _1yep5z6m6",re=a({defaultClassName:"_1x35j5g9 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69l _1yep5z69m _1yep5z69n",variantClassNames:{isCentered:{true:"_1x35j5ga _1yep5z616i _1yep5z616j _1yep5z616k"}},defaultVariants:{},compoundVariants:[]}),te=a({defaultClassName:"_1x35j5g1 _1yep5z68f _1yep5z68g _1yep5z68h _1yep5z663 _1yep5z664 _1yep5z665 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6m6",variantClassNames:{isFocusVisible:{true:"_1x35j5g2"},isError:{true:"_1x35j5g3"},isDisabled:{true:"_1x35j5g4"}},defaultVariants:{},compoundVariants:[]}),ie="_1x35j5g5 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6m3",pe=a({defaultClassName:"_1x35j5g7 _1yep5z6dy _1yep5z6ey",variantClassNames:{isLoading:{true:"_1yep5z611j"}},defaultVariants:{},compoundVariants:[]}),oe="_1yep5z64r _1yep5z64s _1yep5z64t _1yep5z673 _1yep5z674 _1yep5z675 _1yep5z689 _1yep5z68a _1yep5z68b _1yep5z65x _1yep5z65y _1yep5z65z",se="_1x35j5g6 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6jw _1yep5z6jx _1yep5z6jy _1yep5z6kt _1yep5z6ku _1yep5z6kv";function ye({item:e,variant:l,isHovered:p,isFocusVisible:y,isDisabled:r}){let t=c.useMemo(()=>jsx(PagePortraitIcon,{width:24,height:24,className:J({isDisabled:r})}),[r]),_=c.useMemo(()=>({fallback:t}),[t]),o=jsx(b,{slot:"label",className:W({variant:l,isDisabled:r}),children:e.name}),n=jsxs(b,{slot:"description",className:K,children:[e.description?jsx("span",{className:G({variant:l,isDisabled:r}),children:e.description}):null,l==="expanded"&&e.tag?jsx("span",{className:$,children:jsx(d,{elementType:"span",size:"sm",variant:e.tag.variant,isDisabled:r,children:e.tag.label})}):null]});return jsx(a$3,{elementType:"span",className:U({variant:l,isDisabled:r,isHovered:p,isFocusVisible:y}),children:l==="grid"?jsxs(Fragment,{children:[jsx(a$3,{elementType:"span",className:Z({isDisabled:r}),children:jsx(a$4.Provider,{value:_,children:e.preview??t})}),jsxs("span",{className:Y,children:[o,n]})]}):jsxs(Fragment,{children:[t,o,n]})})}var we=sprinkles({color:"icon.secondary"}),Ne=sprinkles({color:"support.error.medium"}),he=a$1(sprinkles({display:"flex",flexDirection:"column",width:"full",paddingY:"md"}),"BaselineUI-Box");function Le({item:e,isFocusVisible:l,isDisabled:p,onRemove:y,loadingLabel:r,removeHintLabel:t}){let{formatMessage:_}=b$1(),o=!!e.isLoading,n=!!(e.errorMessage||e.errorExplanation),f=!p&&!o&&!!y,j=(typeof r=="function"?r({fileName:e.name}):r)??_(_e.loading,{fileName:e.name}),u=e.name;return o?u=j:f&&(u=(typeof t=="function"?t({fileName:e.name}):t)??_(_e.removeHint,{fileName:e.name})),jsxs("div",{className:te({isDisabled:p,isFocusVisible:l,isError:n}),"data-error":n||void 0,children:[jsx(b$2,{children:jsx(b,{slot:"label",children:u})}),jsxs("div",{className:ie,children:[jsx(AttachmentsIcon,{width:16,height:16,className:we}),jsx("span",{className:se,children:jsx("span",{className:pe({isLoading:o}),title:e.name,children:e.name})}),jsxs(a$3,{elementType:"span",display:"flex",alignItems:"center",gap:"xs",flexShrink:0,children:[n?jsx(ErrorCircleFilledIcon,{width:16,height:16,className:Ne}):null,o?jsx(a$5,{size:"sm",className:oe,"aria-label":j}):y?jsx(a$6,{icon:MinusIcon,size:"xs",variant:"secondary",excludeFromTabOrder:true,preventFocusOnPress:true,isDisabled:p,onPress:()=>{y(e.id);},UNSAFE_isVisuallyInteractiveOnly:true}):null]})]}),jsxs(b,{slot:"description",elementType:"div",className:n?he:void 0,children:[e.errorMessage?jsx(a$3,{elementType:"span",typography:"label.sm.medium",color:"support.error.medium",children:e.errorMessage}):null,e.errorExplanation?jsx(a$3,{elementType:"span",typography:"label.sm.medium",color:"text.helper",children:e.errorExplanation}):null]})]})}var de=c.forwardRef(({className:e,style:l,variant:p="compact",label:y,onAction:r,items:t,onRemove:_,disabledKeys:o,loadingLabel:n,removeHintLabel:f,"aria-label":j$1,"aria-labelledby":u,"aria-describedby":me,"aria-details":ze},ce)=>{let{isCentered:k=false,isDisabled:xe}=c.useContext(a$2),T=c.useId(),w=p==="compact",b=xe||o==="all",v=c.useMemo(()=>new Set(o&&o!=="all"?o:[]),[o]),N=c.useMemo(()=>new Map(t.map(a=>[a.id,a])),[t]),V=c.useMemo(()=>t.map(a=>({id:a.id,label:a.name})),[t]),ue=c.useCallback((a,{isHovered:I,isFocusVisible:h})=>{let d=N.get(a.id);if(!d)return null;let B=b||v.has(d.id);return p!=="compact"?jsx(ye,{item:d,variant:p,isHovered:I,isFocusVisible:h,isDisabled:B}):jsx(Le,{item:d,isFocusVisible:h,isDisabled:B,onRemove:_,loadingLabel:n,removeHintLabel:f})},[N,p,b,v,_,n,f]);if(!t.length)return null;let ge=b?V.map(a=>a.id):v,fe=a=>{if(!_||!w||a.key!=="Delete"&&a.key!=="Backspace"||b)return;let d=j(a)?.closest("[data-key]")?.dataset.key;d&&(v.has(d)||N.get(d)?.isLoading||(a.preventDefault(),_(d)));};return jsxs(a$3,{ref:ce,className:a$1(re({isCentered:k}),"BaselineUI-FileList",e),style:l,onKeyDown:fe,children:[y?jsx("div",{id:T,className:ee,children:y}):null,jsx(q,{"aria-label":j$1,"aria-labelledby":[u,y?T:null].filter(Boolean).join(" ")||void 0,"aria-describedby":me,"aria-details":ze,items:V,selectionMode:"none",layout:p==="grid"?"grid":"stack",disabledKeys:ge,className:w?ae:Q({variant:p,isCentered:k}),optionClassName:w?void 0:X({variant:p,hasAction:!!r}),renderOption:ue,onAction:r?a=>{r(String(a));}:void 0})]})});de.displayName="FileList";var _e=c$1({loading:{id:"bui.fileList.loading",defaultMessage:"Loading {fileName}"},removeHint:{id:"bui.fileList.removeHint",defaultMessage:"{fileName}, press Delete or Backspace to remove"}});export{de as a};