@baseline-ui/core 3.3.0 → 3.4.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.
- package/dist/Accordion.css +1 -1
- package/dist/Accordion.mjs +1 -1
- package/dist/ActionButton.css +1 -1
- package/dist/ActionButton.mjs +1 -1
- package/dist/ActionGroup.css +1 -1
- package/dist/ActionGroup.mjs +1 -1
- package/dist/ActionIconButton.css +1 -1
- package/dist/ActionIconButton.mjs +1 -1
- package/dist/Actionable.mjs +1 -1
- package/dist/AlertDialog.css +1 -1
- package/dist/AlertDialog.mjs +1 -1
- package/dist/AudioPlayer.css +1 -1
- package/dist/AudioPlayer.mjs +1 -1
- package/dist/ButtonSelect.css +1 -1
- package/dist/ButtonSelect.mjs +1 -1
- package/dist/Calendar.css +1 -1
- package/dist/Calendar.mjs +1 -1
- package/dist/Checkbox.mjs +1 -1
- package/dist/ColorInput.css +1 -1
- package/dist/ColorInput.mjs +1 -1
- package/dist/ColorSwatch.mjs +1 -1
- package/dist/ColorSwatchPicker.mjs +1 -1
- package/dist/ComboBox.css +1 -1
- package/dist/ComboBox.mjs +1 -1
- package/dist/DateField.css +1 -1
- package/dist/DateField.mjs +1 -1
- package/dist/DateFormat.mjs +1 -1
- package/dist/Dialog.css +1 -1
- package/dist/Dialog.mjs +1 -1
- package/dist/Disclosure.mjs +1 -1
- package/dist/DomNodeRenderer.mjs +1 -1
- package/dist/Drawer.css +1 -1
- package/dist/Drawer.mjs +1 -1
- package/dist/Editor.css +1 -1
- package/dist/Editor.mjs +1 -1
- package/dist/FileInput.css +1 -1
- package/dist/FileInput.mjs +1 -1
- package/dist/FileList.css +1 -1
- package/dist/FileList.mjs +1 -1
- package/dist/FileUploader.css +1 -1
- package/dist/FileUploader.mjs +1 -1
- package/dist/FrameProvider.mjs +1 -1
- package/dist/FreehandCanvas.css +1 -1
- package/dist/FreehandCanvas.mjs +1 -1
- package/dist/GridList.mjs +1 -1
- package/dist/Group.mjs +1 -1
- package/dist/I18nProvider.mjs +1 -1
- package/dist/Icon.mjs +1 -1
- package/dist/ImageDropZone.css +1 -1
- package/dist/ImageDropZone.mjs +1 -1
- package/dist/ImageGallery.css +1 -1
- package/dist/ImageGallery.mjs +1 -1
- package/dist/InlineAlert.css +1 -1
- package/dist/InlineAlert.mjs +1 -1
- package/dist/InlineToolbar.mjs +2 -2
- package/dist/Kbd.mjs +1 -1
- package/dist/Link.mjs +1 -1
- package/dist/ListBox.mjs +1 -1
- package/dist/Menu.css +1 -1
- package/dist/Menu.mjs +1 -1
- package/dist/MessageFormat.mjs +1 -1
- package/dist/Modal.mjs +1 -1
- package/dist/NumberFormat.mjs +1 -1
- package/dist/NumberInput.css +1 -1
- package/dist/NumberInput.mjs +1 -1
- package/dist/Pagination.css +1 -1
- package/dist/Pagination.mjs +1 -1
- package/dist/Panel.mjs +1 -1
- package/dist/PointPicker.mjs +1 -1
- package/dist/Popover.mjs +1 -1
- package/dist/Portal.mjs +1 -1
- package/dist/Preview.css +1 -1
- package/dist/Preview.mjs +1 -1
- package/dist/ProgressBar.mjs +1 -1
- package/dist/ProgressSpinner.mjs +1 -1
- package/dist/RadioGroup.mjs +1 -1
- package/dist/Reaction.mjs +1 -1
- package/dist/ScrollControlButton.mjs +1 -1
- package/dist/SearchInput.css +1 -1
- package/dist/SearchInput.mjs +1 -1
- package/dist/Select.css +1 -1
- package/dist/Select.mjs +1 -1
- package/dist/Separator.mjs +1 -1
- package/dist/Slider.css +1 -1
- package/dist/Slider.mjs +1 -1
- package/dist/Stepper.mjs +1 -1
- package/dist/Switch.mjs +1 -1
- package/dist/Table.mjs +1 -1
- package/dist/Tabs.css +1 -1
- package/dist/Tabs.mjs +1 -1
- package/dist/Tag.mjs +1 -1
- package/dist/TagGroup.mjs +1 -1
- package/dist/TaggedPagination.css +1 -1
- package/dist/TaggedPagination.mjs +1 -1
- package/dist/Text.mjs +1 -1
- package/dist/TextInput.mjs +1 -1
- package/dist/ThemeProvider.mjs +1 -1
- package/dist/TimeField.mjs +1 -1
- package/dist/Toast.css +1 -1
- package/dist/Toast.mjs +1 -1
- package/dist/ToggleButton.css +1 -1
- package/dist/ToggleButton.mjs +1 -1
- package/dist/ToggleIconButton.mjs +1 -1
- package/dist/Toolbar.css +1 -1
- package/dist/Toolbar.mjs +1 -1
- package/dist/Tooltip.mjs +1 -1
- package/dist/TreeView.css +1 -1
- package/dist/TreeView.mjs +1 -1
- package/dist/UNSAFE_ListBox.mjs +1 -1
- package/dist/Virtualizer.mjs +1 -1
- package/dist/{chunk-UUBOEBYZ.mjs → chunk-22MA6EYO.mjs} +1 -1
- package/dist/{chunk-4PYEGHW5.mjs → chunk-22VRCVTH.mjs} +2 -2
- package/dist/chunk-235S3EB7.mjs +10 -0
- package/dist/chunk-24R46WQW.mjs +10 -0
- package/dist/{chunk-5IXSPQRW.mjs → chunk-2F3CFR22.mjs} +2 -2
- package/dist/{chunk-CHTLOFCT.mjs → chunk-2JGVUCP5.mjs} +1 -1
- package/dist/{chunk-KHOXLBPR.mjs → chunk-2LFMBQKQ.mjs} +2 -2
- package/dist/{chunk-TK4QXU3W.mjs → chunk-2VOWBYNS.mjs} +1 -1
- package/dist/{chunk-TO2TQ2LE.mjs → chunk-335C37NB.mjs} +1 -1
- package/dist/{chunk-QXOG2ISL.mjs → chunk-36ZMHBG5.mjs} +2 -2
- package/dist/chunk-3BEG3MEX.mjs +10 -0
- package/dist/chunk-3BG6K2G2.mjs +10 -0
- package/dist/{chunk-E5GYCA3P.mjs → chunk-3DWFAHR2.mjs} +1 -1
- package/dist/{chunk-YX2ASVM3.mjs → chunk-3KCSUNRV.mjs} +1 -1
- package/dist/{chunk-TZ4MVY4E.mjs → chunk-3WKDIXCM.mjs} +1 -1
- package/dist/chunk-4AG2RUAZ.mjs +10 -0
- package/dist/{chunk-RSTHM3ZF.mjs → chunk-4EANTENO.mjs} +1 -1
- package/dist/{chunk-TCCQDGMI.mjs → chunk-4EAXDHSV.mjs} +1 -1
- package/dist/{chunk-UQJGSVXP.mjs → chunk-4I7K4CCG.mjs} +2 -2
- package/dist/{chunk-QR2AF3KT.mjs → chunk-4JQUB53Q.mjs} +1 -1
- package/dist/chunk-4MHBLLHV.mjs +11 -0
- package/dist/chunk-4P247R4V.mjs +10 -0
- package/dist/{chunk-RXSYDMT6.mjs → chunk-4QBHQCCK.mjs} +2 -2
- package/dist/chunk-4RSUKS23.mjs +10 -0
- package/dist/chunk-4S4GGUSH.mjs +10 -0
- package/dist/chunk-4W5VP4NV.mjs +10 -0
- package/dist/chunk-5BKC373Y.mjs +10 -0
- package/dist/chunk-5FK5AJ7A.mjs +10 -0
- package/dist/{chunk-FWAK2OZM.mjs → chunk-5KJF7IQN.mjs} +1 -1
- package/dist/{chunk-XZSDCUID.mjs → chunk-5SHHWKFM.mjs} +1 -1
- package/dist/{chunk-WAOWR7MR.mjs → chunk-5USQ6HBY.mjs} +1 -1
- package/dist/{chunk-UCPPKNGF.mjs → chunk-5VNC6UYE.mjs} +2 -2
- package/dist/chunk-5ZC64ZG7.mjs +10 -0
- package/dist/{chunk-NUYBQ7KP.mjs → chunk-6G7EUNZW.mjs} +1 -1
- package/dist/chunk-6QQEK5I6.mjs +10 -0
- package/dist/{chunk-B237CJT4.mjs → chunk-76DKF2SK.mjs} +1 -1
- package/dist/chunk-7MMO7S3R.mjs +10 -0
- package/dist/{chunk-6NQPENP4.mjs → chunk-7P7VZMTO.mjs} +1 -1
- package/dist/{chunk-CFLEBB5T.mjs → chunk-7SKQUEHP.mjs} +1 -1
- package/dist/chunk-7SQRBY7N.mjs +10 -0
- package/dist/chunk-7TE4MFKC.mjs +10 -0
- package/dist/chunk-7XGNJE7J.mjs +10 -0
- package/dist/{chunk-VZFS4QRW.mjs → chunk-AD3MLX6G.mjs} +1 -1
- package/dist/chunk-AELTF2DE.mjs +10 -0
- package/dist/chunk-AI6WQPRX.mjs +10 -0
- package/dist/chunk-AK7XHUQW.mjs +10 -0
- package/dist/chunk-AM5FU4Y7.mjs +10 -0
- package/dist/chunk-AYQN3OH2.mjs +10 -0
- package/dist/chunk-B3EZOXNU.mjs +10 -0
- package/dist/chunk-BBYODNBO.mjs +10 -0
- package/dist/chunk-BGQRLALS.mjs +10 -0
- package/dist/chunk-BGRGRUG4.mjs +10 -0
- package/dist/chunk-BHJCYKFJ.mjs +11 -0
- package/dist/chunk-BTPAZDGG.mjs +10 -0
- package/dist/{chunk-HVKYWSRF.mjs → chunk-BXNNVZOQ.mjs} +1 -1
- package/dist/chunk-BYDJXA5A.mjs +10 -0
- package/dist/{chunk-ZLZAFTSD.mjs → chunk-C2VP5IEB.mjs} +1 -1
- package/dist/{chunk-I3YGB2BE.mjs → chunk-C4WHTPLY.mjs} +2 -2
- package/dist/chunk-CIPPPD6E.mjs +10 -0
- package/dist/{chunk-EU75HMPG.mjs → chunk-CLGLEEFO.mjs} +2 -2
- package/dist/{chunk-QSSCSN5S.mjs → chunk-COHK4QQW.mjs} +2 -2
- package/dist/chunk-CTSDHAAV.mjs +10 -0
- package/dist/chunk-CU6D2EA6.mjs +10 -0
- package/dist/{chunk-SAZLJ66W.mjs → chunk-CY6W27WG.mjs} +1 -1
- package/dist/{chunk-34TYNTXM.mjs → chunk-D4NW56YQ.mjs} +1 -1
- package/dist/chunk-DAN62T2M.mjs +10 -0
- package/dist/{chunk-SYFSGF73.mjs → chunk-DAS5QGJX.mjs} +1 -1
- package/dist/{chunk-PAQQ7MQG.mjs → chunk-DF2D7NE6.mjs} +1 -1
- package/dist/{chunk-RJZZIVSY.mjs → chunk-DSV6CCI6.mjs} +1 -1
- package/dist/{chunk-GX2IOGYR.mjs → chunk-DZDZZRWE.mjs} +1 -1
- package/dist/{chunk-NADBGP35.mjs → chunk-E22TWF63.mjs} +2 -2
- package/dist/{chunk-DRYSJSKA.mjs → chunk-E3FP4B25.mjs} +1 -1
- package/dist/chunk-ETM4MNG4.mjs +10 -0
- package/dist/chunk-EUVUJQ2Z.mjs +10 -0
- package/dist/chunk-F7WPMQ3P.mjs +16 -0
- package/dist/chunk-FOKMDEP7.mjs +10 -0
- package/dist/chunk-FPFGTGUC.mjs +10 -0
- package/dist/chunk-FPM5UJRF.mjs +10 -0
- package/dist/{chunk-TJEK54BW.mjs → chunk-G77E7EDE.mjs} +1 -1
- package/dist/{chunk-N26C7NYZ.mjs → chunk-GCBMNOA6.mjs} +1 -1
- package/dist/chunk-GFKZXGWJ.mjs +10 -0
- package/dist/{chunk-CPSUI4IW.mjs → chunk-GFTIEY5K.mjs} +1 -1
- package/dist/{chunk-IVVZSESM.mjs → chunk-GL5GUKT7.mjs} +2 -2
- package/dist/chunk-GMALMQWI.mjs +10 -0
- package/dist/chunk-GQIS4QBN.mjs +10 -0
- package/dist/chunk-GUPSQSPC.mjs +0 -0
- package/dist/chunk-HH4VLTF3.mjs +10 -0
- package/dist/chunk-I7LPPUZS.mjs +10 -0
- package/dist/chunk-IEOHIOGL.mjs +10 -0
- package/dist/chunk-IHES52NR.mjs +10 -0
- package/dist/{chunk-AGYQLGBZ.mjs → chunk-IIURKT24.mjs} +1 -1
- package/dist/chunk-IUXXTORQ.mjs +10 -0
- package/dist/{chunk-5K46OAX5.mjs → chunk-IVGNOQSQ.mjs} +1 -1
- package/dist/chunk-IWZXZ5LU.mjs +10 -0
- package/dist/chunk-J4OPD7OL.mjs +10 -0
- package/dist/{chunk-XUJJMAKM.mjs → chunk-JZXLV6JU.mjs} +1 -1
- package/dist/chunk-K4TTZX4T.mjs +10 -0
- package/dist/{chunk-4ZJMZB5B.mjs → chunk-K5RYVERS.mjs} +1 -1
- package/dist/chunk-K7VOXFSK.mjs +10 -0
- package/dist/{chunk-WL27JGVG.mjs → chunk-KG2EHFYA.mjs} +1 -1
- package/dist/chunk-KGS3UWPG.mjs +10 -0
- package/dist/{chunk-6EFNC443.mjs → chunk-KJ6ZSO3I.mjs} +1 -1
- package/dist/{chunk-AMYRLAIC.mjs → chunk-KT4FTBJ2.mjs} +1 -1
- package/dist/chunk-KUDCYGII.mjs +10 -0
- package/dist/{chunk-YCI6BEXQ.mjs → chunk-KVIV5RTE.mjs} +1 -1
- package/dist/chunk-KX7WG3L4.mjs +10 -0
- package/dist/chunk-LJZ7ZS4C.mjs +10 -0
- package/dist/{chunk-PNBYTIUO.mjs → chunk-LPI2NIDI.mjs} +1 -1
- package/dist/{chunk-L6S5GBKS.mjs → chunk-MBRNO6IW.mjs} +1 -1
- package/dist/chunk-MDE2FQHX.mjs +10 -0
- package/dist/chunk-MFB3SWO7.mjs +29 -0
- package/dist/{chunk-V37GPPZD.mjs → chunk-MIF6BAPG.mjs} +1 -1
- package/dist/chunk-MYJ733MN.mjs +10 -0
- package/dist/chunk-MZIQ27JP.mjs +10 -0
- package/dist/chunk-NJKSUI2F.mjs +10 -0
- package/dist/chunk-NKC4MIX3.mjs +10 -0
- package/dist/{chunk-GI2O6H4I.mjs → chunk-NMGKHMH3.mjs} +1 -1
- package/dist/{chunk-GEZGEZAP.mjs → chunk-NQIZ3U7Q.mjs} +2 -2
- package/dist/chunk-NRQSR3G7.mjs +10 -0
- package/dist/{chunk-6Z6HOW6T.mjs → chunk-NUCSMH4S.mjs} +2 -2
- package/dist/chunk-NYCG264A.mjs +10 -0
- package/dist/chunk-NZNOHFLD.mjs +10 -0
- package/dist/chunk-O4DA3TPW.mjs +11 -0
- package/dist/{chunk-3UH5CQQF.mjs → chunk-O7IU5NHN.mjs} +2 -2
- package/dist/chunk-ONEE6UCM.mjs +10 -0
- package/dist/chunk-OQPYPKZV.mjs +10 -0
- package/dist/{chunk-F3HQNHR5.mjs → chunk-OYSOPCTA.mjs} +1 -1
- package/dist/chunk-OZMADP4Z.mjs +10 -0
- package/dist/chunk-P7BN7QDF.mjs +10 -0
- package/dist/chunk-PD5ZXNGT.mjs +10 -0
- package/dist/chunk-PMDRFB75.mjs +10 -0
- package/dist/chunk-PPHSLODC.mjs +10 -0
- package/dist/chunk-PYV5J322.mjs +11 -0
- package/dist/{chunk-6V7BIFQD.mjs → chunk-Q4SEEMIX.mjs} +1 -1
- package/dist/{chunk-2EMOQIU7.mjs → chunk-Q6PGYMYI.mjs} +2 -2
- package/dist/chunk-QAAOC64D.mjs +10 -0
- package/dist/chunk-QJYPCVSD.mjs +10 -0
- package/dist/chunk-QU34XSML.mjs +10 -0
- package/dist/chunk-QUQ4VYCN.mjs +10 -0
- package/dist/chunk-R3HHMCE5.mjs +10 -0
- package/dist/chunk-R4MOUAJW.mjs +10 -0
- package/dist/{chunk-CGFLGZL4.mjs → chunk-R6TFTLMV.mjs} +1 -1
- package/dist/{chunk-XEGXSFIP.mjs → chunk-R7R7JDA3.mjs} +2 -2
- package/dist/{chunk-AV4ZP5SY.mjs → chunk-RPIUPWPO.mjs} +1 -1
- package/dist/chunk-RXSX2RKA.mjs +10 -0
- package/dist/{chunk-HT55YHTN.mjs → chunk-S2XIFW52.mjs} +2 -2
- package/dist/chunk-S4HLMIFK.mjs +10 -0
- package/dist/chunk-SD43KVTU.mjs +10 -0
- package/dist/{chunk-YS3Y5KGV.mjs → chunk-SGZWUG3H.mjs} +2 -2
- package/dist/chunk-SLFKSR3T.mjs +10 -0
- package/dist/chunk-SLSJEMQ4.mjs +10 -0
- package/dist/{chunk-K6X2BHPP.mjs → chunk-STMDFIUL.mjs} +1 -1
- package/dist/chunk-SVIYLH7R.mjs +10 -0
- package/dist/chunk-SVTTHYTR.mjs +10 -0
- package/dist/{chunk-GXOXYPQQ.mjs → chunk-SVV6DLJH.mjs} +1 -1
- package/dist/chunk-SZCVQU55.mjs +10 -0
- package/dist/{chunk-DMJHCNBU.mjs → chunk-SZN2J2ER.mjs} +1 -1
- package/dist/chunk-TAT552A5.mjs +10 -0
- package/dist/{chunk-ZNN43VZV.mjs → chunk-TFSBTGTQ.mjs} +2 -2
- package/dist/{chunk-NQO6OQT6.mjs → chunk-TH4XPZEO.mjs} +1 -1
- package/dist/chunk-TSHZ7JSR.mjs +10 -0
- package/dist/{chunk-AYBACQ6U.mjs → chunk-TUJLNJPJ.mjs} +2 -2
- package/dist/chunk-TUY23KMK.mjs +10 -0
- package/dist/{chunk-LQMEFFFM.mjs → chunk-U3T5JTZ7.mjs} +1 -1
- package/dist/chunk-UDMNDUBO.mjs +10 -0
- package/dist/chunk-UFN2OAM2.mjs +10 -0
- package/dist/{chunk-ZLAY7NNY.mjs → chunk-UI2VBG26.mjs} +1 -1
- package/dist/chunk-UNGYVWKZ.mjs +10 -0
- package/dist/{chunk-545KDVGI.mjs → chunk-UO75BAPM.mjs} +2 -2
- package/dist/chunk-UUTMZQQA.mjs +15 -0
- package/dist/chunk-UZ672WDX.mjs +10 -0
- package/dist/chunk-VETO7WNN.mjs +10 -0
- package/dist/chunk-VGFPT43C.mjs +10 -0
- package/dist/{chunk-GKODQS6E.mjs → chunk-VJUBKX3W.mjs} +2 -2
- package/dist/{chunk-2TH2QRSV.mjs → chunk-W7OTSFZS.mjs} +1 -1
- package/dist/chunk-WHN2SEWO.mjs +10 -0
- package/dist/{chunk-UN7XC7QV.mjs → chunk-WTAJLO6E.mjs} +1 -1
- package/dist/chunk-XD43CVDT.mjs +10 -0
- package/dist/{chunk-5KD2MNNX.mjs → chunk-XDTKLQJB.mjs} +1 -1
- package/dist/chunk-XMGPNXZH.mjs +10 -0
- package/dist/chunk-XWJJ4V3O.mjs +10 -0
- package/dist/{chunk-D3IZ4HBL.mjs → chunk-Y2MIU76N.mjs} +1 -1
- package/dist/chunk-YF63IQQR.mjs +10 -0
- package/dist/{chunk-2RCST7ET.mjs → chunk-YHI2PD3M.mjs} +1 -1
- package/dist/chunk-YMYMFVW4.mjs +10 -0
- package/dist/chunk-YPEAGD2G.mjs +10 -0
- package/dist/chunk-YQHHE5AT.mjs +10 -0
- package/dist/{chunk-UCNHDT36.mjs → chunk-YS3Z53YT.mjs} +2 -2
- package/dist/{chunk-Z4HTFTPM.mjs → chunk-YU5NRJT6.mjs} +2 -2
- package/dist/{chunk-IXK6S6IH.mjs → chunk-ZFGTKLCU.mjs} +1 -1
- package/dist/{chunk-DECHIERQ.mjs → chunk-ZQOR4LCM.mjs} +1 -1
- package/dist/{chunk-XJ2DFV56.mjs → chunk-ZZIQF6XD.mjs} +1 -1
- package/dist/hooks/useDevice.mjs +1 -1
- package/dist/hooks/useI18n.mjs +1 -1
- package/dist/hooks/useIntersectionObserver.mjs +1 -1
- package/dist/hooks/useLiveInteractionModality.mjs +1 -1
- package/dist/hooks/useMedia.mjs +1 -1
- package/dist/hooks/useMutationObserver.mjs +1 -1
- package/dist/hooks/usePortalContainer.mjs +1 -1
- package/dist/hooks/usePreventFocus.mjs +1 -1
- package/dist/hooks/useResizeObserver.mjs +1 -1
- package/dist/hooks/useTextSelection.mjs +1 -1
- package/dist/hooks/useUndoRedo.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +375 -166
- package/dist/index.js +21 -20
- package/dist/index.mjs +1 -1
- package/dist/react-aria.mjs +1 -1
- package/dist/react-stately.mjs +1 -1
- package/dist/utils/colors.mjs +1 -1
- package/dist/utils/dom.mjs +1 -1
- package/dist/utils/isInShadowDOM.mjs +1 -1
- package/dist/utils/keyboards.mjs +1 -1
- package/messages.json +1 -1
- package/package.json +4 -4
- package/sbom.json +6 -6
- package/dist/chunk-2BXXD6SW.mjs +0 -10
- package/dist/chunk-2V323KAD.mjs +0 -10
- package/dist/chunk-2YTKLY4F.mjs +0 -10
- package/dist/chunk-3FYY26ED.mjs +0 -10
- package/dist/chunk-3W6RWDIE.mjs +0 -10
- package/dist/chunk-4C6AJ3TZ.mjs +0 -10
- package/dist/chunk-5HK56IXH.mjs +0 -10
- package/dist/chunk-63KRQW56.mjs +0 -10
- package/dist/chunk-66NJ7EYY.mjs +0 -10
- package/dist/chunk-6JWACCHG.mjs +0 -10
- package/dist/chunk-6PXOVWVM.mjs +0 -10
- package/dist/chunk-6VXBFM6Q.mjs +0 -10
- package/dist/chunk-7MQBBSZ2.mjs +0 -10
- package/dist/chunk-7P322KP4.mjs +0 -10
- package/dist/chunk-7PRJIPFA.mjs +0 -10
- package/dist/chunk-A24DWFQ2.mjs +0 -10
- package/dist/chunk-AC7OXVHA.mjs +0 -10
- package/dist/chunk-AKES5B6C.mjs +0 -10
- package/dist/chunk-AQYBKDT2.mjs +0 -16
- package/dist/chunk-AUOQSTS5.mjs +0 -10
- package/dist/chunk-AW5WDI2U.mjs +0 -10
- package/dist/chunk-B6U6JHD4.mjs +0 -10
- package/dist/chunk-B7PSE5KC.mjs +0 -10
- package/dist/chunk-BBZ2I3RF.mjs +0 -10
- package/dist/chunk-BCENUHNO.mjs +0 -10
- package/dist/chunk-BGHBSM3K.mjs +0 -10
- package/dist/chunk-BGMVPFYK.mjs +0 -10
- package/dist/chunk-BJVFZYUV.mjs +0 -10
- package/dist/chunk-BU5H25MV.mjs +0 -10
- package/dist/chunk-C7AUJO36.mjs +0 -10
- package/dist/chunk-CAWUDHAE.mjs +0 -10
- package/dist/chunk-CCA2ABXO.mjs +0 -10
- package/dist/chunk-CUOTJ7AP.mjs +0 -10
- package/dist/chunk-CYTHB4M4.mjs +0 -10
- package/dist/chunk-D5EEZT5J.mjs +0 -10
- package/dist/chunk-DDLZ6CKC.mjs +0 -10
- package/dist/chunk-E3DMXJIC.mjs +0 -10
- package/dist/chunk-E3QDPL77.mjs +0 -10
- package/dist/chunk-EA6GA4WC.mjs +0 -10
- package/dist/chunk-EGXILQNX.mjs +0 -10
- package/dist/chunk-EX2LI2CV.mjs +0 -10
- package/dist/chunk-EYKIXVM3.mjs +0 -10
- package/dist/chunk-F2X474RV.mjs +0 -10
- package/dist/chunk-GVI6EBGJ.mjs +0 -10
- package/dist/chunk-HK3CZVHY.mjs +0 -10
- package/dist/chunk-HONWMHMX.mjs +0 -10
- package/dist/chunk-HZHAKW6I.mjs +0 -10
- package/dist/chunk-ILAQFMYD.mjs +0 -10
- package/dist/chunk-INDVRI57.mjs +0 -10
- package/dist/chunk-ITWJSFYK.mjs +0 -10
- package/dist/chunk-IVC2BJRU.mjs +0 -10
- package/dist/chunk-JDLUGVXG.mjs +0 -10
- package/dist/chunk-K6HE4Z2Y.mjs +0 -10
- package/dist/chunk-K73R5G6G.mjs +0 -10
- package/dist/chunk-KEAM6GSA.mjs +0 -10
- package/dist/chunk-KEVERVHK.mjs +0 -10
- package/dist/chunk-KPEONVLU.mjs +0 -10
- package/dist/chunk-KUEDQO7P.mjs +0 -10
- package/dist/chunk-KWHTLY23.mjs +0 -10
- package/dist/chunk-KY3JKXSX.mjs +0 -10
- package/dist/chunk-LZFTBNPW.mjs +0 -10
- package/dist/chunk-M5M3EPG5.mjs +0 -10
- package/dist/chunk-M7OLZJYB.mjs +0 -10
- package/dist/chunk-MHUFXHRU.mjs +0 -10
- package/dist/chunk-MONDDKB4.mjs +0 -10
- package/dist/chunk-MRJFGHFW.mjs +0 -10
- package/dist/chunk-MVK5CB64.mjs +0 -10
- package/dist/chunk-N6VKP3UH.mjs +0 -10
- package/dist/chunk-NZQVKNP4.mjs +0 -10
- package/dist/chunk-OAY74XPB.mjs +0 -10
- package/dist/chunk-OMT6ZWSV.mjs +0 -11
- package/dist/chunk-P37WUXAI.mjs +0 -10
- package/dist/chunk-P5LSMA24.mjs +0 -11
- package/dist/chunk-PA3THES4.mjs +0 -10
- package/dist/chunk-QDQPVCXN.mjs +0 -10
- package/dist/chunk-QYTY3KJR.mjs +0 -10
- package/dist/chunk-R2OV7FJO.mjs +0 -10
- package/dist/chunk-RCBUNCHV.mjs +0 -10
- package/dist/chunk-RFTDIXEG.mjs +0 -10
- package/dist/chunk-SHJ2TJYG.mjs +0 -10
- package/dist/chunk-SMAYNDQQ.mjs +0 -10
- package/dist/chunk-T4R3EXGI.mjs +0 -10
- package/dist/chunk-TBCZKWGQ.mjs +0 -10
- package/dist/chunk-TDXALNX3.mjs +0 -10
- package/dist/chunk-TKQOQVZD.mjs +0 -10
- package/dist/chunk-TTYRHIRQ.mjs +0 -10
- package/dist/chunk-UBFMOTBM.mjs +0 -10
- package/dist/chunk-UEDBY5JI.mjs +0 -10
- package/dist/chunk-UT2I4K7L.mjs +0 -10
- package/dist/chunk-V3L4SVVF.mjs +0 -10
- package/dist/chunk-VAFIUM63.mjs +0 -29
- package/dist/chunk-VIVNQZYK.mjs +0 -10
- package/dist/chunk-VOSSQAHC.mjs +0 -11
- package/dist/chunk-WWSGOGLA.mjs +0 -10
- package/dist/chunk-X3AXUU3H.mjs +0 -10
- package/dist/chunk-X6IJEPSH.mjs +0 -10
- package/dist/chunk-XF5UMU6D.mjs +0 -15
- package/dist/chunk-XTH6B5FE.mjs +0 -10
- package/dist/chunk-XWLESSHN.mjs +0 -10
- package/dist/chunk-Y3YZMICA.mjs +0 -10
- package/dist/chunk-Y4DRSGEJ.mjs +0 -10
- package/dist/chunk-YB3KW7JC.mjs +0 -10
- package/dist/chunk-YIGT3OP2.mjs +0 -10
- package/dist/chunk-YKMSINHH.mjs +0 -10
- package/dist/chunk-YWCU4PP7.mjs +0 -10
- package/dist/chunk-YWQXHVMW.mjs +0 -10
- package/dist/chunk-ZGRRD3TU.mjs +0 -10
- /package/dist/{chunk-FKYHERP4.mjs → chunk-3K2H3JOE.mjs} +0 -0
package/dist/chunk-P5LSMA24.mjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import {a as a$e}from'./chunk-JBXZ6ZHP.mjs';import {a as a$6}from'./chunk-63KRQW56.mjs';import {a as a$2}from'./chunk-UCNHDT36.mjs';import {a as a$b}from'./chunk-HI44JQA7.mjs';import {a as a$d}from'./chunk-E5GYCA3P.mjs';import {a as a$c}from'./chunk-O7XK2WIX.mjs';import {a as a$a}from'./chunk-CCA2ABXO.mjs';import {a as a$4}from'./chunk-YX2ASVM3.mjs';import {a as a$8}from'./chunk-TDXALNX3.mjs';import {a as a$9,b as b$2}from'./chunk-RSKKEGJZ.mjs';import {a as a$5}from'./chunk-K6X2BHPP.mjs';import {a as a$f}from'./chunk-BGMVPFYK.mjs';import {a as a$7}from'./chunk-YB3KW7JC.mjs';import {d}from'./chunk-AQYBKDT2.mjs';import {b,c}from'./chunk-TZ4MVY4E.mjs';import {c as c$1}from'./chunk-JDLUGVXG.mjs';import {a as a$3,b as b$1}from'./chunk-AUOQSTS5.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import z,{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 Je from'just-camel-case';import*as st 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 bt={node:null,setNode:()=>{},coordinates:null,setCoordinates:()=>{},displayId:void 0,setDisplayId:()=>{},boundsRef:{current:null},isDisabled:false,cursorNode:null,setCursorNode:()=>{},children:null,setChildren:()=>{}},p=z.createContext(bt),Ee=z.memo(({children:e,isDisabled:t=false})=>{let[n,r]=z.useState(null),[a,o]=z.useState(null),[i,d]=z.useState(null),l=z.useRef(null),[s,x]=z.useState(null),[f,k]=z.useState(),c=z.useMemo(()=>({node:n,setNode:r,coordinates:s,setCoordinates:x,displayId:f,setDisplayId:k,boundsRef:l,isDisabled:t,cursorNode:a,setCursorNode:o,children:i,setChildren:d}),[n,s,f,x,r,l,t,a,o,i,d]);return jsx(p.Provider,{value:c,children:e})});Ee.displayName="PointPicker";var _e="m0xg2me";var ze="m0xg2md _1yep5z6iw _1yep5z6ix _1yep5z6iy _1yep5z6mh _1yep5z6mg _1yep5z6ho",Re="m0xg2mj",Ie="_1yep5z6fa",De="m0xg2mk m0xg2mj",Me=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"]]}),Ne="m0xg2m8",Ae="m0xg2mb",q="m0xg2ma _1yep5z6hp _1yep5z6mf",Te="m0xg2m9 _1yep5z6je _1yep5z6jf _1yep5z6jg _1yep5z6hg _1yep5z6mf _1yep5z6it _1yep5z6iu _1yep5z6iv",Le="m0xg2m7",Se="m0xg2mc",Oe="m0xg2mf";var W=a$1(ze,"BaselineUI-PointPicker-GridLine"),Et=({coordinates:e})=>jsxs(Fragment,{children:[jsx("div",{className:W,"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:W,"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)`}})]}),_t=({coordinates:e})=>jsxs(Fragment,{children:[jsx("div",{className:W,"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:W,"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)`}})]}),He=({gridLines:e})=>{let{isDisabled:t,boundsRef:n,coordinates:r}=useContext(p),a=useMemo(()=>{let o=typeof e=="function"?e({coordinates:r,boundingRect:n.current}):e;return typeof o=="boolean"?o?r:void 0:o?.coordinates},[e,r,n]);return a&&!t?jsxs(Fragment,{children:[jsx(Et,{coordinates:a}),jsx(_t,{coordinates:a})]}):null};function Ue({coordinates:e,setCoordinates:t,boundsRef:n,onKeyDown:r,onKeyUp:a}){let{isDisabled:o}=useContext(p);return a$f({isDisabled:o,onKeyDown:i=>{r?.(i);let d=i.shiftKey?10:1,l=n.current;if(!l||!e)return;let s;switch(i.key){case "ArrowRight":{i.preventDefault(),s={x:a$e(e.x+d,0,l.width),y:a$e(e.y,0,l.height)};break}case "ArrowLeft":{i.preventDefault(),s={x:a$e(e.x-d,0,l.width),y:a$e(e.y,0,l.height)};break}case "ArrowDown":{i.preventDefault(),s={x:a$e(e.x,0,l.width),y:a$e(e.y+d,0,l.height)};break}case "ArrowUp":{i.preventDefault(),s={x:a$e(e.x,0,l.width),y:a$e(e.y-d,0,l.height)};break}case "Home":{i.preventDefault(),s={x:0,y:a$e(e.y,0,l.height)};break}case "End":{i.preventDefault(),s={x:l.width,y:a$e(e.y,0,l.height)};break}case "PageUp":{i.preventDefault(),s={x:a$e(e.x,0,l.width),y:0};break}case "PageDown":{i.preventDefault(),s={x:a$e(e.x,0,l.width),y:l.height};break}default:{i.continuePropagation();return}}s&&t(s);},onKeyUp:a})}function Ve(){let{node:e,coordinates:t}=useContext(p);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:Fe}=themeVars,Ge=z.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:Fe.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:Fe.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}));Ge.displayName="PointPickerIndicatorIcon";var Tt=({trailingElement:e})=>{let{cursorNode:t}=useContext(p),[n,r]=useState({width:0,height:0});return useEffect(()=>{if(!t)return;let a=t.getBoundingClientRect();r(a);let o=new ResizeObserver(i=>{r({width:i[0].contentRect.width,height:i[0].contentRect.height});});return o.observe(t),()=>{o.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},Q=z.forwardRef(({renderTrailingElement:e,renderCursor:t},n)=>{let{coordinates:r,isDisabled:a,node:o}=useContext(p),i=a$2({ownerDocument:a$3(o)}),d=!!(r&&!a),l=useMemo(()=>e?.(),[e]),s=Ve(),x=useMemo(()=>{if(!r)return null;let f=t?.({coordinates:r,modality:i});return f===void 0?jsx(Ge,{modality:i}):f},[t,r,i]);return d?jsxs(a$4,{style:{left:s.x,top:s.y},className:a$1(Le,"BaselineUI-PointPickerContent-Cursor"),ref:n,children:[x,l?jsx(Tt,{trailingElement:l}):null]}):null});Q.displayName="PointPickerIndicator";var Xe=z.forwardRef(({children:e,className:t,style:n,"data-block-id":r,"data-block-class":a,onFocusChange:o,onBlur:i,onFocus:d$1,onKeyDown:l,onKeyUp:s,gridLines:x=true,elementHandle:f,onMove:k,onPress:c$1,onPressStart:P,onPressEnd:b$1,renderTrailingElement:w,renderCursor:E},M)=>{let{setNode:C,node:_,coordinates:g,setCoordinates:R,displayId:j,boundsRef:I,isDisabled:h,setCursorNode:at,setChildren:Y}=useContext(p),S=useRef(null),le=useRef(null),ce=a$2({ownerDocument:a$3(_)}),N=useCallback(u=>{R(u??null),k?.({coordinates:u,boundingRect:I.current});},[R,k,I]);useEffect(()=>{if(!h)return Y(e),()=>{Y(null);}},[e,h,Y]),useEffect(()=>{let u=S.current;if(!u||h)return;let ue=()=>{let D=u.getBoundingClientRect();I.current=D;},H=D=>{let O=I.current;if(!O)return;let gt="clientX"in D?D.clientX:D.touches[0].clientX,vt="clientY"in D?D.clientY:D.touches[0].clientY,Pt={x:a$e(gt-O.left,0,O.width),y:a$e(vt-O.top,0,O.height)};N(Pt);},de=()=>{N(null);};return u.addEventListener("mousemove",H),u.addEventListener("touchmove",H),u.addEventListener("mouseenter",ue),u.addEventListener("mouseleave",de),()=>{u.removeEventListener("mousemove",H),u.removeEventListener("touchmove",H),u.removeEventListener("mouseenter",ue),u.removeEventListener("mouseleave",de);}},[I,h,N]);let{pressProps:lt}=d({isDisabled:h,onPress:u=>{u.pointerType==="keyboard"?g&&c$1?.({...u,x:g.x,y:g.y}):c$1?.(u);},onPressStart:P,onPressEnd:b$1}),{focusProps:ct,isFocusVisible:ut,isFocused:dt}=a$5();a$6({ref:le,isDisabled:h}),useImperativeHandle(f,()=>({focus:()=>{h||S.current?.focus();}}));let{focusProps:mt}=a$7({isDisabled:h,onFocusChange:o,onFocus:d$1,onBlur:i});function pt(){ce==="keyboard"&&setTimeout(()=>{let u=S.current?.getBoundingClientRect();u&&(I.current=u,N({x:a$e(u.width/2,0,u.width),y:a$e(u.height/2,0,u.height)}));},0);}function ft(){N(null);}let{keyboardProps:ht}=Ue({coordinates:g,setCoordinates:N,boundsRef:I,onKeyDown:l,onKeyUp:s});a$8({isDisabled:h,ref:S,onInteractOutside:()=>{N(null);}});let yt=!!(g&&!h),xt=a$9({"data-focus-visible":ut,"data-focused":dt,"data-disabled":h,"data-block-id":r,"data-block-class":a,"data-active":g&&!h,"data-modality":ce});return jsxs(Fragment,{children:[jsx(Q,{renderTrailingElement:w,renderCursor:E,ref:at}),jsxs("div",{...c(ct,mt,{onFocus:pt,onBlur:ft},h?{}:c(ht,lt)),ref:b(M,S,C),className:a$1(Me({isDisabled:!!h,isIndicatorVisible:!!yt}),"BaselineUI-PointPicker-Content",t),tabIndex:h?void 0:0,style:n,"aria-controls":j,"data-testid":"point-picker-content",...xt,children:[jsx(He,{gridLines:x}),jsx("div",{className:_e,ref:le,children:e})]})]})});Xe.displayName="PointPickerContent";function qe(e,t,n){let[r,a]=useState(0),o=i=>{a(i),n();};return useGranularEffect(()=>{if(!e||t==="trailing")return;let i=new ResizeObserver(d=>{o(d[0].contentRect.width);});return o(e.getBoundingClientRect().width),i.observe(e),()=>{i.disconnect();}},[e,t],[n]),r}function jt(e,t){return t==="indicator"?e:e?.querySelector(".BaselineUI-PointPickerContent-TrailingElement")??null}var te=z.forwardRef(({children:e,className:t,crossOffset:n,offset:r,placement:a="bottom start",anchorElement:o="indicator"},i)=>{let d=useRef(null),{cursorNode:l,coordinates:s}=useContext(p),x=qe(l,o,()=>{c();}),f=jt(l,o),{overlayProps:k,updatePosition:c}=a$a({overlayRef:d,placement:a,targetRef:{get current(){return f}},crossOffset:n??x,offset:r});return useGranularEffect(()=>{c();},[s,n,r],[c]),s?jsx(a$4,{className:a$1(Oe,t),ref:i,children:jsx("div",{ref:d,...k,children:e})}):null});te.displayName="Floater";var nt=8,Xt=7,qt=7,ne=z.memo(({children:e,scale:t,renderMagnifierContent:n})=>{let r=useRef(null),{coordinates:a,boundsRef:o,node:i}=useContext(p),d=useRef([]);a$6({ref:r}),useEffect(()=>{if(!r.current||n)return;let x=r.current.querySelectorAll("canvas"),f=[],k=r.current.ownerDocument;for(let c of x){let P=c.getContext("2d");if(!P)continue;let b=c.clientWidth,w=c.clientHeight,E=c.width,M=c.height,C=P.getImageData(0,0,E,M);f.push({el:c,width:E,height:M,image:C});let _=k.createElement("canvas");_.width=E,_.height=M;let g=_.getContext("2d");g&&g.drawImage(c,0,0),c.width=b*t,c.height=w*t,c.style.width=`${b}px`,c.style.height=`${w}px`,P.scale(t,t),P.drawImage(_,0,0,b,w);}return d.current=f,()=>{for(let{el:c,width:P,height:b,image:w}of d.current)c.width=P,c.height=b,c.getContext("2d")?.putImageData(w,0,0);}},[i,t,n]);let l=useMemo(()=>n?n({coordinates:a,boundingRect:o.current,children:e}):e?z.cloneElement(e,{key:"magnifier-content"}):null,[n,a,o,e]),s=useMemo(()=>!o.current||!a?null:{x:a.x/o.current.width,y:a.y/o.current.height},[o,a]);return s?jsx("div",{style:{left:0,transform:`scale(${t}) translate(calc(-${s.x*100}% + ${nt*Xt/(2*t)}px), calc(-${s.y*100}% + ${nt*qt/(2*t)}px))`},className:a$1(Se,"BaselineUI-PointPickerDisplay-Magnifier"),children:jsx("div",{style:Jt(i),ref:r,inert:"true",children:l})}):null});ne.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(([o,i])=>o.startsWith("--")?[o,i]:o.startsWith("-")?[a$b(Je(o)),i]:[Je(o),i]))}var nn=7,rn=7,on={scale:2},sn={crossOffset:void 0,offset:void 0,placement:"bottom start",anchorElement:"indicator"},it=z.forwardRef(({className:e,style:t,description:n,magnifier:r=true,"data-block-id":a,"data-block-class":o,floating:i=false,renderMagnifierContent:d},l)=>{let{coordinates:s,boundsRef:x,setDisplayId:f,isDisabled:k,children:c,cursorNode:P}=useContext(p),b=c$1(),w=useMemo(()=>b$2(r,on),[r]),E=useMemo(()=>typeof n=="function"?n({coordinates:s?{x:s.x,y:s.y}:null,boundingRect:x.current}):n,[n,s,x]),M=!k&&!!w&&s,C=useMemo(()=>b$2(i,sn),[i]);useEffect(()=>((!C||C&&P)&&f(b),()=>{f(void 0);}),[P,b,f,C]);let _=jsxs(a$c,{ref:C?void 0:l,className:a$1(Ne,"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":o,"data-variant":C?"floating":"auto","data-testid":"point-picker-display",children:[w?jsxs("div",{className:Te,children:[M?jsx(ne,{scale:w.scale,renderMagnifierContent:d,children:c}):null,Array.from({length:nn*rn}).map((g,R)=>R===24?jsx("div",{className:a$1(q,Ae)},R):jsx("div",{className:q},R))]}):null,E?.length?jsx(a$c,{display:"flex",gap:"lg",flexDirection:"column",children:E?.map(({label:g,icon:R},j)=>jsxs(a$c,{display:"flex",gap:"md",flexDirection:"row",color:"text.secondary",alignItems:"center",children:[jsx(R,{size:12,className:Ie}),jsx(a$d,{type:"label",size:"sm",children:g})]},g+j))}):null]});return C?jsx(te,{ref:l,...C,className:"BaselineUI-PointPicker-Floater",children:_}):_});it.displayName="PointPickerDisplay";function oe(e){let t=new Blob([e],{type:"text/javascript"}),n=URL.createObjectURL(t),r=new Worker(n);return URL.revokeObjectURL(n),r}function se(){return oe('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),o=useCallback(()=>{if(a.current)return null;if(!r.current){let s=new se;r.current={worker:s,api:st.wrap(s)};}return r.current.api},[]);useEffect(()=>(a.current=false,o(),()=>{a.current=true,r.current?.worker.terminate(),r.current=null,n.current=null;}),[o]);let i=useCallback(async()=>{let s=o();!e||!s||(n.current=await s.buildIndex(e));},[e,o]);useEffect(()=>{e&&e.length>0&&i();},[e,i]);let d=useCallback(async s=>e?(n.current||await i(),await o()?.findNearestPoint(s.x,s.y,t)??null):null,[e,t,i,o]),l=useCallback(async s=>e?(n.current||await i(),await o()?.findPointsInRadius(s.x,s.y,t)??[]):[],[e,t,i,o]);return {findNearestPoint:d,findPointsInRadius:l}}
|
|
11
|
-
export{Ee as a,Xe as b,it as c,an as d};
|
package/dist/chunk-PA3THES4.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {b as b$1,d as d$1,e,c}from'./chunk-E3QDPL77.mjs';import {a as a$1}from'./chunk-VOSSQAHC.mjs';import {b as b$2}from'./chunk-SZTFMBPY.mjs';import {a as a$2}from'./chunk-O7XK2WIX.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$3}from'./chunk-4ZJMZB5B.mjs';import {a as a$4}from'./chunk-X3AXUU3H.mjs';import {a}from'./chunk-K6X2BHPP.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import N,{useMemo,useCallback}from'react';import {Time,toZoned,toTime,GregorianCalendar,toCalendarDateTime,today,getLocalTimeZone}from'@internationalized/date';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
|
-
function P(i){let{placeholderValue:a=new Time,minValue:p,maxValue:u,defaultValue:t,granularity:c$1,validate:T}=i,[e,s]=a$4(i.value,t??null,i.onChange),r=e||a,o=r&&"day"in r?r:void 0,m=t&&"timeZone"in t?t.timeZone:void 0,F=useMemo(()=>{let l=r&&"timeZone"in r?r.timeZone:void 0;return (l||m)&&a?toZoned(d(a),l||m):d(a)},[a,r,m]),V=useMemo(()=>d(p,o),[p,o]),y=useMemo(()=>d(u,o),[u,o]),x=useMemo(()=>e&&"day"in e?toTime(e):e,[e]),g=useMemo(()=>e==null?null:d(e),[e]),S=useMemo(()=>t==null?null:d(t),[t]);return {...c({...i,value:g,defaultValue:S,minValue:V,maxValue:y,onChange:l=>{s(o||m?l:l&&toTime(l));},granularity:c$1||"minute",maxGranularity:"hour",placeholderValue:F??void 0,createCalendar:()=>new GregorianCalendar,validate:useCallback(()=>T?.(e),[T,e])}),timeValue:x}}function d(i,a=today(getLocalTimeZone())){return i?"day"in i?i:toCalendarDateTime(a,i):null}var B=N.forwardRef(({className:i,labelPosition:a$4,"data-block-id":p,"data-block-class":u,...t},c)=>{let{locale:T}=b(),e$1={...t,validationState:void 0,isInvalid:t.validationState==="error"||void 0},s=P({...e$1,locale:T}),r=N.useRef(null),{labelProps:o,fieldProps:m,descriptionProps:F,errorMessageProps:V,validationErrors:y,isInvalid:x,inputProps:g}=b$1(e$1,s,r),S=t.errorMessage||y.join(" "),k=b$2({...t,errorMessage:S,descriptionProps:F,errorMessageProps:V,labelPosition:a$4}),{focusProps:v,isFocused:l}=a({within:true});return jsxs(a$1,{className:a$3("BaselineUI-TimeField",i),labelProps:o,fieldProps:m,ref:c,wrapperRef:r,wrapperClassName:d$1,labelPosition:a$4,message:k,isFocused:l,"data-block-id":p,"data-block-class":u,isInvalid:x,...t,children:[jsx(b$3,{children:jsx("input",{...g})}),jsx(a$2,{display:"flex",flexDirection:"row",paddingRight:"md",...v,children:s.segments.map((E,G)=>jsx(e,{segment:E,state:s},G))})]})});B.displayName="TimeField";export{B as a};
|
package/dist/chunk-QDQPVCXN.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-EU75HMPG.mjs';import {a as a$h,b as b$4}from'./chunk-BJVFZYUV.mjs';import {a as a$k}from'./chunk-UQJGSVXP.mjs';import {a as a$i}from'./chunk-RFTDIXEG.mjs';import {b,c as c$1}from'./chunk-GX2IOGYR.mjs';import {c as c$3}from'./chunk-W6QO7FPZ.mjs';import {a as a$5}from'./chunk-O7XK2WIX.mjs';import {a as a$7}from'./chunk-6JWACCHG.mjs';import {a as a$j}from'./chunk-6Z6HOW6T.mjs';import {a as a$d}from'./chunk-7PRJIPFA.mjs';import {b as b$2}from'./chunk-WL27JGVG.mjs';import {b as b$1}from'./chunk-N2XGJKZG.mjs';import {a as a$g}from'./chunk-4ZJMZB5B.mjs';import {a as a$4}from'./chunk-VDUFLHKK.mjs';import {a as a$l}from'./chunk-66CUIXA6.mjs';import {a as a$f}from'./chunk-D3IZ4HBL.mjs';import {a as a$b}from'./chunk-545KDVGI.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {e,a as a$c}from'./chunk-BGMVPFYK.mjs';import {b as b$3,a as a$e}from'./chunk-YB3KW7JC.mjs';import {a as a$2}from'./chunk-3FYY26ED.mjs';import {a as a$a,g,k}from'./chunk-MRJFGHFW.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a as a$8}from'./chunk-KEVERVHK.mjs';import {c as c$2}from'./chunk-JDLUGVXG.mjs';import {a as a$9}from'./chunk-6ZQE5SHE.mjs';import {b as b$5}from'./chunk-AUOQSTS5.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import {HelpIcon}from'@baseline-ui/icons/16';import Ir,{useMemo,useState,useCallback,useRef}from'react';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 oe={"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 Ue=e=>[0,60,120,180,240,300,360].map(r=>e.withChannelValue("hue",r).toString("css")).join(", "),Xe=e=>`${e.withChannelValue("saturation",0)}, transparent`,kr={hue:Ue,saturation:Xe,lightness:()=>"black, transparent, white"},Pr={hue:Ue,saturation:Xe,brightness:()=>"black, transparent"};function Ge({direction:e,state:r,zChannel:l,xChannel:t,yChannel:n}){return useMemo(()=>{let m=e==="rtl"?"left":"right",v={},z=r.value.getChannelValue(l);switch(r.value.getColorSpace()){case "rgb":{let s=a$1("rgb(0, 0, 0)");v={background:[`linear-gradient(to ${m}, ${s.withChannelValue(t,0)}, ${s.withChannelValue(t,255)})`,`linear-gradient(to top, ${s.withChannelValue(n,0)}, ${s.withChannelValue(n,255)})`,s.withChannelValue(l,z)].join(","),backgroundBlendMode:"screen"};break}case "hsl":{let s=r.value.getColorChannels(),d=a$1("hsl(0, 100%, 50%)").withChannelValue(l,z),c=s.filter(i=>i!==l).map(i=>`linear-gradient(to ${i===t?m:"top"}, ${kr[i](d)})`).reverse();l==="hue"&&c.push(d.toString("css")),v={background:c.join(", ")};break}case "hsb":{let s=r.value.getColorChannels(),d=a$1("hsb(0, 100%, 100%)").withChannelValue(l,z),c=s.filter(i=>i!==l).map(i=>`linear-gradient(to ${i===t?m:"top"}, ${Pr[i](d)})`).reverse();l==="hue"&&c.push(d.toString("css")),v={background:c.join(", ")};break}}let{x:h,y}=r.getThumbPosition();e==="rtl"&&(h=1-h);let f={forcedColorAdjust:"none"};return {colorAreaStyleProps:{style:{position:"relative",touchAction:"none",...f,...v}},thumbStyleProps:{style:{position:"absolute",left:`${h*100}%`,top:`${y*100}%`,transform:"translate(-50%, -50%)",touchAction:"none",...f}}}},[e,r,l,t,n])}function Je(e,r){let{isDisabled:l,inputXRef:t,inputYRef:n,containerRef:u,"aria-label":m,xName:v,yName:z,form:h}=e,y=b$2(oe,"@react-aria/color"),{addGlobalListener:f,removeGlobalListener:s}=a$9(),{direction:d,locale:c$1}=b$1(),[i,x]=useState(null),b=useCallback((o=t)=>{o.current&&a$a(o.current);},[t]);a$b(t,r.defaultValue,r.setValue);let[S,C]=useState(false),[V,k$1]=useState(false),{xChannel:_,yChannel:p,zChannel:w}=r.channels,g$1=r.xChannelStep,F=r.yChannelStep,j=useRef(null),{keyboardProps:ir}=a$c({onKeyDown(o){if(!/^(PageUp|PageDown|Home|End)$/.test(o.key)){o.continuePropagation();return}o.preventDefault(),r.setDragging(true),C(true);let a;switch(o.key){case "PageUp":r.incrementY(r.yChannelPageStep),a="y";break;case "PageDown":r.decrementY(r.yChannelPageStep),a="y";break;case "Home":d==="rtl"?r.incrementX(r.xChannelPageStep):r.decrementX(r.xChannelPageStep),a="x";break;case "End":d==="rtl"?r.decrementX(r.xChannelPageStep):r.incrementX(r.xChannelPageStep),a="x";break}r.setDragging(false),a&&(b(a==="x"?t:n),x(a));}}),X={onMoveStart(){j.current=null,r.setDragging(true);},onMove({deltaX:o,deltaY:a,pointerType:$,shiftKey:G}){let{incrementX:W,decrementX:ne,incrementY:ie,decrementY:M,xChannelPageStep:E,xChannelStep:H,yChannelPageStep:ve,yChannelStep:Se,getThumbPosition:Cr,setColorFromPoint:vr}=r;j.current==null&&(j.current=Cr());let{width:Sr,height:gr}=u.current?.getBoundingClientRect()||{width:0,height:0},ge=o!==0||a!==0;if($==="keyboard"){let xe=G&&E>H?E:H,ke=G&&ve>Se?ve:Se;o>0&&d==="ltr"||o<0&&d==="rtl"?W(xe):o<0&&d==="ltr"||o>0&&d==="rtl"?ne(xe):a>0?M(ke):a<0&&ie(ke),C(ge),i=ge&&Math.abs(a)>Math.abs(o)?"y":"x",x(i);}else j.current.x+=(d==="rtl"?-1:1)*o/Sr,j.current.y+=a/gr,vr(j.current.x,j.current.y);},onMoveEnd(){I.current=false,r.setDragging(false),b(i==="x"?t:n);}},{moveProps:pr}=a$d(X),{focusWithinProps:ur}=b$3({onFocusWithinChange:o=>{o||(C(false),k$1(false));}}),N=useRef(void 0),I=useRef(false),{moveProps:sr}=a$d({onMoveStart(){I.current&&X.onMoveStart();},onMove(o){I.current&&X.onMove(o);},onMoveEnd(){I.current&&X.onMoveEnd();}}),te=o=>{let a=b$5(u.current);r.isDragging||(N.current=o,C(false),b(),r.setDragging(true),typeof PointerEvent<"u"?f(a,"pointerup",T,false):(f(a,"mouseup",T,false),f(a,"touchend",T,false)));},T=o=>{let a=b$5(u.current);(o.pointerId??o.changedTouches?.[0].identifier)===N.current&&(C(false),b(),r.setDragging(false),N.current=void 0,I.current=false,typeof PointerEvent<"u"?s(a,"pointerup",T,false):(s(a,"mouseup",T,false),s(a,"touchend",T,false)));},ae=(o,a,$,G)=>{let W=o.getBoundingClientRect(),{width:ne,height:ie}=W,M=($-W.x)/ne,E=(G-W.y)/ie;d==="rtl"&&(M=1-M);let H=b$5(u.current);M>=0&&M<=1&&E>=0&&E<=1&&!r.isDragging&&N.current===void 0&&(I.current=true,C(false),N.current=a,r.setColorFromPoint(M,E),b(),r.setDragging(true),typeof PointerEvent<"u"?f(H,"pointerup",O,false):(f(H,"mouseup",O,false),f(H,"touchend",O,false)));},O=o=>{let a=o.pointerId??o.changedTouches?.[0].identifier;if(I.current&&a===N.current){I.current=false,C(false),N.current=void 0,r.setDragging(false),b();let $=b$5(u.current);typeof PointerEvent<"u"?s($,"pointerup",O,false):(s($,"mouseup",O,false),s($,"touchend",O,false));}},cr=l?{}:c({...typeof PointerEvent<"u"?{onPointerDown:o=>{o.pointerType==="mouse"&&(o.button!==0||o.altKey||o.ctrlKey||o.metaKey)||ae(o.currentTarget,o.pointerId,o.clientX,o.clientY);}}:{onMouseDown:o=>{o.button!==0||o.altKey||o.ctrlKey||o.metaKey||ae(o.currentTarget,void 0,o.clientX,o.clientY);},onTouchStart:o=>{ae(o.currentTarget,o.changedTouches[0].identifier,o.changedTouches[0].clientX,o.changedTouches[0].clientY);}}},sr),dr=l?{}:c({...typeof PointerEvent<"u"?{onPointerDown:o=>{o.pointerType==="mouse"&&(o.button!==0||o.altKey||o.ctrlKey||o.metaKey)||te(o.pointerId);}}:{onMouseDown:o=>{o.button!==0||o.altKey||o.ctrlKey||o.metaKey||te(void 0);},onTouchStart:o=>{te(o.changedTouches[0].identifier);}}},ur,ir,pr),{focusProps:mr}=a$e({onFocus:()=>{x("x");}}),{focusProps:yr}=a$e({onFocus:()=>{x("y");}}),fe=o=>{let{target:a}=o;k$1(true),a===t.current?r.setXValue(parseFloat(a.value)):a===n.current&&r.setYValue(parseFloat(a.value));},B=g()||k(),A=r.getDisplayColor(),ze=useCallback(o=>`${V||S?y.format("colorNameAndValue",{name:A.getChannelName(o,c$1),value:A.formatChannelValue(o,c$1)}):[y.format("colorNameAndValue",{name:A.getChannelName(o,c$1),value:A.formatChannelValue(o,c$1)}),y.format("colorNameAndValue",{name:A.getChannelName(o===p?_:p,c$1),value:A.formatChannelValue(o===p?_:p,c$1)}),y.format("colorNameAndValue",{name:A.getChannelName(w,c$1),value:A.formatChannelValue(w,c$1)})].join(", ")}, ${A.getColorName(c$1)}`,[c$1,A,y,V,S,_,p,w]),R=y.format("colorPicker"),br=a$f({...e,"aria-label":m?y.format("colorInputLabel",{label:m,channelLabel:R}):R}),_r=a$f({...e,"aria-label":m?y.format("colorInputLabel",{label:m,channelLabel:R}):R}),fr=a$f({...e,"aria-label":m?`${m}, ${R}`:void 0},B?R:void 0),he=y.format("twoDimensionalSlider"),{visuallyHiddenProps:Ce}=a$g({style:{opacity:"0.0001",width:"100%",height:"100%",pointerEvents:"none"}}),{colorAreaStyleProps:zr,thumbStyleProps:hr}=Ge({direction:d,state:r,xChannel:_,yChannel:p,zChannel:w});return {colorAreaProps:{...fr,...cr,...zr,role:"group"},thumbProps:{...dr,...hr,role:"presentation"},xInputProps:{...br,...Ce,...mr,type:"range",min:r.value.getChannelRange(_).minValue,max:r.value.getChannelRange(_).maxValue,step:g$1,"aria-roledescription":he,"aria-valuetext":ze(_),"aria-orientation":"horizontal","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"],disabled:l,value:r.value.getChannelValue(_),name:v,form:h,tabIndex:B||!i||i==="x"?void 0:-1,"aria-hidden":B||!i||i==="x"||S?void 0:"true",onChange:fe},yInputProps:{..._r,...Ce,...yr,type:"range",min:r.value.getChannelRange(p).minValue,max:r.value.getChannelRange(p).maxValue,step:F,"aria-roledescription":he,"aria-valuetext":ze(p),"aria-orientation":"vertical","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"],disabled:l,value:r.value.getChannelValue(p),name:z,form:h,tabIndex:B||i==="y"?void 0:-1,"aria-hidden":B||i==="y"||S?void 0:"true",onChange:fe}}}function Ze(e,r){let{trackRef:l,inputRef:t,orientation:n,channel:u,"aria-label":m,name:v,form:z}=e,{locale:h,direction:y}=b$1();!e.label&&!m&&!e["aria-labelledby"]&&(m=r.value.getChannelName(u,h));let{groupProps:f,trackProps:s,labelProps:d,outputProps:c$1}=a$h({...e,"aria-label":m},r,l),{inputProps:i,thumbProps:x}=b$4({index:0,orientation:n,isDisabled:e.isDisabled,name:v,form:z,trackRef:l,inputRef:t},r),b=r.getDisplayColor(),S=()=>{let k;switch(n==="vertical"?k="top":y==="ltr"?k="right":k="left",u){case "hue":{let _=[0,60,120,180,240,300,360].map(p=>b.withChannelValue("hue",p).toString("css")).join(", ");return `linear-gradient(to ${k}, ${_})`}case "lightness":{let _=r.getThumbMinValue(0),p=r.getThumbMaxValue(0),w=b.withChannelValue(u,_).toString("css"),g=b.withChannelValue(u,(p-_)/2).toString("css"),F=b.withChannelValue(u,p).toString("css");return `linear-gradient(to ${k}, ${w}, ${g}, ${F})`}case "saturation":case "brightness":case "red":case "green":case "blue":case "alpha":{let _=b.withChannelValue(u,r.getThumbMinValue(0)).toString("css"),p=b.withChannelValue(u,r.getThumbMaxValue(0)).toString("css");return `linear-gradient(to ${k}, ${_}, ${p})`}default:throw new Error("Unknown color channel: "+u)}},C={forcedColorAdjust:"none"};u==="hue"?i["aria-valuetext"]+=`, ${b.getHueName(h)}`:u!=="alpha"&&(i["aria-valuetext"]+=`, ${b.getColorName(h)}`);let{visuallyHiddenProps:V}=a$g({style:{opacity:"0.0001",width:"100%",height:"100%",pointerEvents:"none"}});return {trackProps:{...c(f,s),style:{...s.style,...C,background:S()}},inputProps:{...i,style:{...i.style,...V.style}},thumbProps:{...x,style:{...x.style,...C}},labelProps:d,outputProps:c$1}}function Qe(e,r,l){let{isDisabled:t,isReadOnly:n,isRequired:u,isWheelDisabled:m,validationBehavior:v="aria"}=e,{colorValue:z,inputValue:h,increment:y,decrement:f,incrementToMax:s,decrementToMin:d,commit:c$1}=r,i=c$2(),{spinButtonProps:x}=a$i({isDisabled:t,isReadOnly:n,isRequired:u,maxValue:16777215,minValue:0,onIncrement:y,onIncrementToMax:s,onDecrement:f,onDecrementToMin:d,value:z?z.toHexInt():void 0,textValue:z?z.toString("hex"):void 0}),[b,S]=useState(false),{focusWithinProps:C}=b$3({isDisabled:t,onFocusWithinChange:S}),V=useCallback(g=>{Math.abs(g.deltaY)<=Math.abs(g.deltaX)||(g.deltaY>0?y():g.deltaY<0&&f());},[f,y]);a$j({onScroll:V,isDisabled:m||t||n||!b},l);let _=g=>{r.validate(g)&&r.setInputValue(g);},{inputProps:p,...w}=a$k({...e,id:i,value:h,defaultValue:"!",validate:void 0,[c$3]:r,type:"text",autoComplete:"off",onChange:_},r,l);return a$b(l,r.defaultColorValue,r.setColorValue),p=c(p,x,C,{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false",onBlur:c$1}),v==="native"&&(p["aria-required"]=void 0),{inputProps:p,...w}}function le(e){let{color:r,colorName:l}=e,t=r||"#fff0",n=useMemo(()=>typeof t=="string"?a$1(t):t,[t]),{locale:u}=b$1(),m=a$8(e,{labelable:true}),v=b$2(oe,"@react-aria/color"),z=c$2(e.id);return l||(l=n.getChannelValue("alpha")===0?v.format("transparent"):n.getColorName(u)),{colorSwatchProps:{...m,role:"img","aria-roledescription":v.format("colorSwatch"),"aria-label":[l,e["aria-label"]||""].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]?`${z} ${e["aria-labelledby"]}`:void 0,id:z,style:{backgroundColor:n.toString("css"),forcedColorAdjust:"none"}},color:n||null}}var rl="_1dbkl53 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6m3",ol="_1dbkl5e",ll=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:[]}),tl="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kz _1yep5z6l0 _1yep5z6l1",al=a({defaultClassName:"_1dbkl50 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6dy _1yep5z6ez",variantClassNames:{labelPosition:{top:"_1yep5z6oy _1yep5z6oz _1yep5z6p0",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),nl="_1dbkl5l _1yep5z6je _1yep5z6jf _1yep5z6jg _1yep5z69f _1yep5z69g _1yep5z69h",il="_1dbkl5f z9nup86",pl="_1dbkl5m _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6it _1yep5z6iu _1yep5z6iv",er="_1dbkl5k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6m6",ul="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6kz _1yep5z6l0 _1yep5z6l1 _1yep5z6dy _1yep5z6ez _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jz _1yep5z6k0 _1yep5z6k1",sl=a({defaultClassName:"_1dbkl5h _1dbkl5g _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g9",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6nm _1yep5z6nn _1yep5z6no"}},defaultVariants:{},compoundVariants:[]}),cl="_1dbkl5v _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj",dl=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"]]}),ml=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:[]}),yl="_1dbkl5g",bl="_1dbkl5u",_l="_1dbkl5j _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69f _1yep5z69g _1yep5z69h",fl="_1dbkl5x",zl="_1dbkl5w",hl="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69l _1yep5z69m _1yep5z69n",Cl=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:[]}),vl="z9nup83 z9nup85 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6lw _1yep5z6lx _1yep5z6lz _1yep5z6ly _1yep5z6iw _1yep5z6ix _1yep5z6iy";var Al=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],$l=a$1("#000000").toFormat("hsla"),me="hsla",ye="hexa";function Dr(e){let r=document.createElement("canvas").getContext("2d");return a$l(r,"Failed to get canvas context"),r.fillStyle=e,r.fillStyle}function Ll(e){if(typeof e=="string")try{return a$1(e).toFormat(me)}catch{return a$1(Dr(e)).toFormat(me)}else if(e)return e.toFormat(me);return null}function Dl(e,r){return e?.getChannelValue("alpha")?r?.toString(ye)===e.toString(ye):!r?.getChannelValue("alpha")}function Vl(e,r,l){return r?.label?r.label:e?.getChannelValue("alpha")===0?l:e?.toString("rgba")}var be="NONE";function Il(e,r){let l=r?.map(n=>({id:a$1(n.color).toString(ye),label:n.label}))||[],t={id:be,label:e};return [...l,t]}var jl=(e,{optionProps:r,isFocusVisible:l,isSelected:t},n)=>(a$l(e.value&&"label"in e.value,"Item must have label"),jsx("li",{...r,ref:n,className:er,children:jsx(_e,{color:e.value.id,isFocusVisible:l,isSelected:t,"aria-label":e.value.label,isInteractive:true})})),or=(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 lr=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"]]}),tr="_1yep5z6fa",ar="_1344e9q9 _1yep5z6fp";var _e=Ir.forwardRef(({color:e$1,isFocusVisible:r,isSelected:l,isInteractive:t,isDisabled:n,style:u,className:m,id:v,tooltip:z,isIndeterminate:h,indeterminateIcon:y=HelpIcon,noneLabel:f,"data-block-id":s,"data-block-class":d,...c$1},i)=>{let x=e$1&&e$1!==be&&(typeof e$1=="string"?a$1(e$1):e$1),{formatMessage:b$1}=b(),S=!x,{colorSwatchProps:C}=le({color:S?"#000000":e$1}),{hoverProps:V,isHovered:k}=a$2({isDisabled:n||!t}),_=a$3({"data-focus-visible":r,"data-selected":l,"data-hovered":k,"data-block-id":s,"data-block-class":d,"data-disabled":n,"data-interactive":t,"data-indeterminate":h}),p=S?f??b$1(nr.none):C["aria-label"],w=c$1["aria-label"]??p,{tooltipProps:g}=a$4({tooltip:z,label:w}),F=jsx("div",{...c(V,_,S?{}:C),style:u,"aria-label":S?f??b$1(nr.none):C["aria-label"],role:"img",className:a$6(lr({removeBlendMode:S,isFocusVisible:r,isDisabled:!!n,isSelected:!!l,isHovered:k}),"BaselineUI-ColorSwatch",m),ref:i,id:v,...c$1,children:jsxs(a$5,{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"full",height:"full",width:"full",opacity:n?"medium":void 0,style:x&&!h?or(x,4):void 0,children:[S&&!h?jsx("div",{className:ar}):null,h&&y?jsx(y,{role:"presentation",size:16,className:tr,"aria-hidden":"true"}):null]})});return g&&!n?jsx(a$7,{...g,children:jsx(e,{children:F})}):F});_e.displayName="ColorSwatch";var nr=c$1({none:{id:"bui.colorSwatch.none",defaultMessage:"None"}});export{me as A,ye as B,Ll as C,Dl as D,Vl as E,be as F,Il as G,jl as H,_e as I,Je as a,Qe as b,Ze as c,rl as d,ol as e,ll as f,tl as g,al as h,nl as i,il as j,pl as k,ul as l,sl as m,cl as n,dl as o,ml as p,yl as q,bl as r,_l as s,fl as t,zl as u,hl as v,Cl as w,vl as x,Al as y,$l as z};
|
package/dist/chunk-QYTY3KJR.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$3}from'./chunk-YCI6BEXQ.mjs';import {q}from'./chunk-EYKIXVM3.mjs';import {b as b$2}from'./chunk-AC7OXVHA.mjs';import {c,b}from'./chunk-GX2IOGYR.mjs';import {a as a$1}from'./chunk-O7XK2WIX.mjs';import {a as a$4}from'./chunk-2V323KAD.mjs';import {b as b$1}from'./chunk-4ZJMZB5B.mjs';import {g}from'./chunk-AUOQSTS5.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$2}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 d 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 T="_1x35j5g0 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6m3 _1yep5z6m6",P=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:[]}),D="_1x35j5g5 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6m3",V=a({defaultClassName:"_1x35j5g7 _1yep5z6dy _1yep5z6ey",variantClassNames:{isLoading:{true:"_1yep5z611j"}},defaultVariants:{},compoundVariants:[]}),S="_1yep5z64r _1yep5z64s _1yep5z64t _1yep5z673 _1yep5z674 _1yep5z675 _1yep5z689 _1yep5z68a _1yep5z68b _1yep5z65x _1yep5z65y _1yep5z65z",H="_1x35j5g6 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6jw _1yep5z6jx _1yep5z6jy _1yep5z6kt _1yep5z6ku _1yep5z6kv";var Q=sprinkles({color:"icon.secondary"}),W=sprinkles({color:"support.error.medium"});function X({item:e,isFocusVisible:x,isDisabled:i,onRemove:t,loadingLabel:a,removeHintLabel:s}){let{formatMessage:y}=b(),n=!!e.isLoading,l=!!(e.errorMessage||e.errorExplanation),b$3=!i&&!n&&!!t,c=(typeof a=="function"?a({fileName:e.name}):a)??y(A.loading,{fileName:e.name}),m=e.name;return n?m=c:b$3&&(m=(typeof s=="function"?s({fileName:e.name}):s)??y(A.removeHint,{fileName:e.name})),jsxs("div",{className:P({isDisabled:i,isFocusVisible:x,isError:l}),"data-error":l||void 0,children:[jsx(b$1,{children:jsx(b$2,{slot:"label",children:m})}),jsxs("div",{className:D,children:[jsx(AttachmentsIcon,{width:16,height:16,className:Q}),jsx("span",{className:H,children:jsx("span",{className:V({isLoading:n}),title:e.name,children:e.name})}),jsxs(a$1,{elementType:"span",display:"flex",alignItems:"center",gap:"xs",flexShrink:0,children:[l?jsx(ErrorCircleFilledIcon,{width:16,height:16,className:W}):null,n?jsx(a$3,{size:"sm",className:S,"aria-label":c}):t?jsx(a$4,{icon:MinusIcon,size:"xs",variant:"secondary",excludeFromTabOrder:true,preventFocusOnPress:true,isDisabled:i,onPress:()=>{t(e.id);},UNSAFE_isVisuallyInteractiveOnly:true}):null]})]}),l?jsxs(a$1,{display:"flex",flexDirection:"column",width:"full",paddingY:"md",children:[e.errorMessage?jsx(a$1,{elementType:"span",typography:"label.sm.medium",color:"support.error.medium",children:e.errorMessage}):null,e.errorExplanation?jsx(a$1,{elementType:"span",typography:"label.sm.medium",color:"text.helper",children:e.errorExplanation}):null]}):null]})}var R=d.forwardRef(({className:e,style:x,items:i,onRemove:t,disabledKeys:a,loadingLabel:s,removeHintLabel:y,"aria-label":n,"aria-labelledby":l,"aria-describedby":b,"aria-details":c},m)=>{let u=a==="all",_=d.useMemo(()=>new Set(a&&a!=="all"?a:[]),[a]),j=d.useMemo(()=>new Map(i.map(r=>[r.id,r])),[i]),L=d.useMemo(()=>i.map(r=>({id:r.id,label:r.name})),[i]),U=d.useCallback((r,{isFocusVisible:F})=>{let f=j.get(r.id);return f?jsx(X,{item:f,isFocusVisible:F,isDisabled:u||_.has(f.id),onRemove:t,loadingLabel:s,removeHintLabel:y}):null},[j,u,_,t,s,y]);if(!i.length)return null;let K=u?L.map(r=>r.id):_,Y=r=>{if(!t||r.key!=="Delete"&&r.key!=="Backspace"||u)return;let z=g(r)?.closest("[data-key]")?.dataset.key;z&&(_.has(z)||j.get(z)?.isLoading||(r.preventDefault(),t(z)));};return jsx(a$1,{ref:m,className:a$2("BaselineUI-FileList",e),style:x,onKeyDown:Y,children:jsx(q,{"aria-label":n,"aria-labelledby":l,"aria-describedby":b,"aria-details":c,items:L,selectionMode:"none",disabledKeys:K,className:T,renderOption:U})})});R.displayName="FileList";var A=c({loading:{id:"bui.fileList.loading",defaultMessage:"Loading {fileName}"},removeHint:{id:"bui.fileList.removeHint",defaultMessage:"{fileName}, press Delete or Backspace to remove"}});export{R as a};
|
package/dist/chunk-R2OV7FJO.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-CHTLOFCT.mjs';import {a as a$6}from'./chunk-DRYSJSKA.mjs';import {a as a$1}from'./chunk-CFLEBB5T.mjs';import {b}from'./chunk-4ZJMZB5B.mjs';import {a as a$5}from'./chunk-RSKKEGJZ.mjs';import {a as a$3}from'./chunk-K6X2BHPP.mjs';import {a as a$4}from'./chunk-3FYY26ED.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$7}from'./chunk-4QEH5CGK.mjs';import {CheckmarkIcon as CheckmarkIcon$1}from'@baseline-ui/icons/16';import {CheckmarkIcon}from'@baseline-ui/icons/20';import C 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 k="_1yep5z6jb _1yep5z6jc _1yep5z6jd",R=a({defaultClassName:"_9b1tml0",variantClassNames:{isSelected:{true:"_9b1tml1",false:"_9b1tml2"},isDisabled:{true:"z9nup82"},isHovered:{true:"_9b1tml4"},isFocusVisible:{true:"_9b1tml5"},isReadOnly:{true:"_9b1tml6"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isFocusVisible:true,isReadOnly:false},"_9b1tml7"],[{isSelected:true,isHovered:true,isDisabled:false,isReadOnly:false},"_9b1tml8"],[{isSelected:false,isHovered:true,isDisabled:false,isReadOnly:false},"_9b1tml9"],[{isSelected:true,isDisabled:true},"_9b1tmla"],[{isSelected:true,isReadOnly:true},"_9b1tmlb"]]}),x=a({defaultClassName:"_9b1tmlf _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6ey _1yep5z6lq _1yep5z6e9",variantClassNames:{isSelected:{true:"_9b1tmlg"},size:{sm:"_9b1tmlh",md:"_9b1tmli"},isDisabled:{true:"_9b1tmlj"},isReadOnly:{true:"_1yep5z611h"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isDisabled:false,isReadOnly:false},"_1yep5z61o6"],[{isSelected:true,isDisabled:true},"_1yep5z61o6"],[{isSelected:false,isDisabled:true},"_1yep5z61o4"]]}),z=a({defaultClassName:"_9b1tmlc",variantClassNames:{isDisabled:{true:"_9b1tmld"},isReadOnly:{true:"_9b1tmle"}},defaultVariants:{},compoundVariants:[]});var S=C.forwardRef(({className:N,count:V,style:P,size:t="md",icon:D,"data-block-id":H,"data-block-class":I,...a},O)=>{let l={isRequired:false},T=D||(t==="md"?CheckmarkIcon:CheckmarkIcon$1);!a["aria-label"]&&!a["aria-labelledby"]&&console.warn("You must provide either an `aria-label` or `aria-labelledby` prop to the `Reaction` component.");let s=C.useRef(null),d=a$1({...a,...l}),{inputProps:j,isPressed:F,isDisabled:r,isReadOnly:i,isSelected:c}=a$2({...a,...l},d,s),{focusProps:w,isFocused:M,isFocusVisible:n}=a$3(),{hoverProps:q,isHovered:b$1}=a$4({}),A=a$5({"data-block-id":H,"data-block-class":I,"data-focused":M,"data-focus-visible":n,"data-disabled":r,"data-hovered":b$1,"data-pressed":F,"data-selected":c});return jsxs("label",{ref:O,style:P,className:a$7(k,"BaselineUI-Reaction",N),...A,children:[jsx(b,{children:jsx("input",{...j,...w,ref:s})}),jsxs("div",{...q,className:R({isSelected:c,isFocusVisible:n,isHovered:b$1,isReadOnly:i,isDisabled:r}),children:[jsx("div",{className:z({isDisabled:r,isReadOnly:i}),children:jsx(T,{size:t==="md"?20:16})}),jsx("div",{className:x({isSelected:d.isSelected,isDisabled:r,isReadOnly:i,size:t}),children:jsx(a$6,{value:V})})]})]})});S.displayName="Reaction";export{S as a};
|
package/dist/chunk-RCBUNCHV.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {createContext,useContext,forwardRef}from'react';import {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
|
-
typeof HTMLTemplateElement<"u"&&(Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:true,enumerable:true,get:function(){return this.content.firstChild}}),Object.defineProperty(HTMLTemplateElement.prototype,"appendChild",{configurable:true,enumerable:true,value:function(e){return this.content.appendChild(e)}}),Object.defineProperty(HTMLTemplateElement.prototype,"removeChild",{configurable:true,enumerable:true,value:function(e){return this.content.removeChild(e)}}),Object.defineProperty(HTMLTemplateElement.prototype,"insertBefore",{configurable:true,enumerable:true,value:function(e,t){return this.content.insertBefore(e,t)}}));var n=createContext(false);function h(e){if(useContext(n))return jsx(Fragment,{children:e.children});let o=jsx(n.Provider,{value:true,children:e.children});return jsx("template",{children:o})}function d(e){let t=(o,s)=>useContext(n)?null:e(o,s);return t.displayName=e.displayName||e.name,forwardRef(t)}function u(){return useContext(n)}var D=createContext({});export{h as a,d as b,u as c,D as d};
|
package/dist/chunk-RFTDIXEG.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {b}from'./chunk-WL27JGVG.mjs';import {b as b$1,a}from'./chunk-JJG67M2S.mjs';import {t}from'./chunk-MRJFGHFW.mjs';import {a as a$1}from'./chunk-6ZQE5SHE.mjs';import {useRef,useCallback,useEffect,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
|
-
var K={"ar-AE":{Empty:"\u0641\u0627\u0631\u063A"},"bg-BG":{Empty:"\u0418\u0437\u043F\u0440\u0430\u0437\u043D\u0438"},"cs-CZ":{Empty:"Pr\xE1zdn\xE9"},"da-DK":{Empty:"Tom"},"de-DE":{Empty:"Leer"},"el-GR":{Empty:"\u0386\u03B4\u03B5\u03B9\u03BF"},"en-US":{Empty:"Empty"},"es-ES":{Empty:"Vac\xEDo"},"et-EE":{Empty:"T\xFChjenda"},"fi-FI":{Empty:"Tyhj\xE4"},"fr-FR":{Empty:"Vide"},"he-IL":{Empty:"\u05E8\u05D9\u05E7"},"hr-HR":{Empty:"Prazno"},"hu-HU":{Empty:"\xDCres"},"it-IT":{Empty:"Vuoto"},"ja-JP":{Empty:"\u7A7A"},"ko-KR":{Empty:"\uBE44\uC5B4 \uC788\uC74C"},"lt-LT":{Empty:"Tu\u0161\u010Dias"},"lv-LV":{Empty:"Tuk\u0161s"},"nb-NO":{Empty:"Tom"},"nl-NL":{Empty:"Leeg"},"pl-PL":{Empty:"Pusty"},"pt-BR":{Empty:"Vazio"},"pt-PT":{Empty:"Vazio"},"ro-RO":{Empty:"Gol"},"ru-RU":{Empty:"\u041D\u0435 \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u043E"},"sk-SK":{Empty:"Pr\xE1zdne"},"sl-SI":{Empty:"Prazen"},"sr-SP":{Empty:"Prazno"},"sv-SE":{Empty:"Tomt"},"tr-TR":{Empty:"Bo\u015F"},"uk-UA":{Empty:"\u041F\u0443\u0441\u0442\u043E"},"zh-CN":{Empty:"\u7A7A"},"zh-TW":{Empty:"\u7A7A\u767D"}};var F=()=>{};function oe(G){let P=useRef(void 0),{value:t$1,textValue:w,minValue:p,maxValue:c,isDisabled:O,isReadOnly:S,isRequired:j,onIncrement:s,onIncrementPage:g,onDecrement:a$2,onDecrementPage:x,onDecrementToMin:A,onIncrementToMax:V}=G,H=b(K,"@react-aria/spinbutton"),i=useRef(false),n=useCallback(()=>{clearTimeout(P.current),i.current=false;},[]),u=t(()=>{n();});useEffect(()=>()=>u(),[]);let q=e=>{if(!(e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||S||e.nativeEvent.isComposing))switch(e.key){case "PageUp":if(g){e.preventDefault(),g?.();break}case "ArrowUp":case "Up":s&&(e.preventDefault(),s?.());break;case "PageDown":if(x){e.preventDefault(),x?.();break}case "ArrowDown":case "Down":a$2&&(e.preventDefault(),a$2?.());break;case "Home":A&&(e.preventDefault(),A?.());break;case "End":V&&(e.preventDefault(),V?.());break}},v=useRef(false),D=()=>{v.current=true;},b$2=()=>{v.current=false;},T=w===""?H.format("Empty"):(w||`${t$1}`).replace("-","\u2212");useEffect(()=>{v.current&&(b$1("assertive"),a(T,"assertive"));},[T]);let N=useCallback(()=>{n();},[n]),J=t(s??F),W=t(a$2??F),Z=t(()=>{(c===void 0||isNaN(c)||t$1===void 0||isNaN(t$1)||t$1<c)&&(J(),B(60));}),B=t(e=>{u(),i.current=true,P.current=window.setTimeout(Z,e);}),_=t(()=>{(p===void 0||isNaN(p)||t$1===void 0||isNaN(t$1)||t$1>p)&&(W(),h(60));}),h=t(e=>{u(),i.current=true,P.current=window.setTimeout(_,e);}),$=e=>{e.preventDefault();},{addGlobalListener:I,removeAllGlobalListeners:R}=a$1(),r=useRef(false),[m,l]=useState(null);useEffect(()=>{m==="touch"?B(600):m?B(400):m||u();},[m]);let[f,d]=useState(null);return useEffect(()=>{f==="touch"?h(600):f?h(400):f||u();},[f]),{spinButtonProps:{role:"spinbutton","aria-valuenow":t$1!==void 0&&!isNaN(t$1)?t$1:void 0,"aria-valuetext":T,"aria-valuemin":p,"aria-valuemax":c,"aria-disabled":O||void 0,"aria-readonly":S||void 0,"aria-required":j||void 0,onKeyDown:q,onFocus:D,onBlur:b$2},incrementButtonProps:{onPressStart:e=>{n(),e.pointerType!=="touch"?(s?.(),l("mouse")):(I(window,"pointercancel",N,{capture:true}),r.current=false,l("touch")),I(window,"contextmenu",$);},onPressUp:e=>{n(),e.pointerType==="touch"&&(r.current=true),R(),l(null);},onPressEnd:e=>{n(),e.pointerType==="touch"&&!i.current&&r.current&&s?.(),r.current=false,l(null);},onFocus:D,onBlur:b$2},decrementButtonProps:{onPressStart:e=>{n(),e.pointerType!=="touch"?(a$2?.(),d("mouse")):(I(window,"pointercancel",N,{capture:true}),r.current=false,d("touch"));},onPressUp:e=>{n(),e.pointerType==="touch"&&(r.current=true),R(),d(null);},onPressEnd:e=>{n(),e.pointerType==="touch"&&!i.current&&r.current&&a$2?.(),r.current=false,d(null);},onFocus:D,onBlur:b$2}}}export{oe as a};
|
package/dist/chunk-SHJ2TJYG.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {b as b$1}from'./chunk-MVK5CB64.mjs';import {t,d}from'./chunk-MRJFGHFW.mjs';import {a}from'./chunk-JDLUGVXG.mjs';import {b}from'./chunk-AUOQSTS5.mjs';import {useRef,useEffect,version}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
|
-
var S="react-aria-clear-focus",I="react-aria-focus";function k(t$1,e){let r=useRef(true),s=useRef(null),o=t(t$1);useEffect(()=>(r.current=true,()=>{r.current=false;}),[]),useEffect(()=>{let n=s.current;r.current?r.current=false:(!n||e.some((i,f)=>!Object.is(i,n[f])))&&o(),s.current=e;},e);}function U(t,e){let r=useRef(true),s=useRef(null);a(()=>(r.current=true,()=>{r.current=false;}),[]),a(()=>{r.current?r.current=false:(!s.current||e.some((o,n)=>!Object.is(o,s[n])))&&t(),s.current=e;},e);}function O(t$1){let{ref:e,box:r,onResize:s}=t$1,o=t(s);useEffect(()=>{let n=e?.current;if(!n)return;let i=b(n);if(typeof i.ResizeObserver>"u")return i.addEventListener("resize",o,false),()=>{i.removeEventListener("resize",o,false);};{let f=new i.ResizeObserver(a=>{a.length&&o();});return f.observe(n,{box:r}),()=>{n&&f.unobserve(n);}}},[e,r]);}function Y(t){return d()?t.metaKey:t.ctrlKey}var y=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Z(t){let e=b(t);return t instanceof e.HTMLInputElement&&!y.has(t.type)||t instanceof e.HTMLTextAreaElement||t instanceof e.HTMLElement&&t.isContentEditable}function L(t$1,e){let{collection:r,onLoadMore:s,scrollOffset:o=1}=t$1,n=useRef(null),i=t(f=>{for(let a of f)a.isIntersecting&&s&&s();});a(()=>(e.current&&(n.current=new IntersectionObserver(i,{root:b$1(e?.current),rootMargin:`0px ${100*o}% ${100*o}% ${100*o}%`}),n.current.observe(e.current)),()=>{n.current&&n.current.disconnect();}),[r,e,o]);}function M(t){let e=version.split(".");return parseInt(e[0],10)>=19?t:t?"true":void 0}export{S as a,I as b,k as c,U as d,O as e,Y as f,Z as g,L as h,M as i};
|
package/dist/chunk-SMAYNDQQ.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-RCBUNCHV.mjs';import {c,h,e}from'./chunk-B7PSE5KC.mjs';import {b as b$2}from'./chunk-BGMVPFYK.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {a as a$1}from'./chunk-JDLUGVXG.mjs';import {b as b$1}from'./chunk-RMUV6NJJ.mjs';import Y,{createContext,forwardRef,useContext,useState,useRef,useCallback,useMemo,cloneElement,isValidElement}from'react';import {flushSync,createPortal}from'react-dom';import {useSyncExternalStore}from'use-sync-external-store/shim/index.js';import {jsx,Fragment,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=class{static type;type;key;value=null;level=0;hasChildNodes=false;rendered=null;textValue="";"aria-label"=void 0;index=0;parentKey=null;prevKey=null;nextKey=null;firstChildKey=null;lastChildKey=null;props={};render;colSpan=null;colIndex=null;constructor(e){this.type=this.constructor.type,this.key=e;}get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,i){let n=this.clone();return t.addDescendants(n,e),n}},b=class extends y{filter(e,t,i){let[n,o]=G(e,t,this.firstChildKey,i),r=this.clone();return r.firstChildKey=n,r.lastChildKey=o,r}},V=class extends y{static type="header"},A=class extends y{static type="loader"},H=class extends b{static type="item";filter(e,t,i){if(i(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}},L=class extends b{static type="section";filter(e,t,i){let n=super.filter(e,t,i);if(n&&n.lastChildKey!==null){let o=e.getItem(n.lastChildKey);if(o&&o.type!=="header")return n}return null}},N=class{keyMap=new Map;firstKey=null;lastKey=null;frozen=false;itemCount=0;get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0;}getChildren(e){let t=this.keyMap;return {*[Symbol.iterator](){let i=t.get(e),n=i?.firstChildKey!=null?t.get(i.firstChildKey):null;for(;n;)yield n,n=n.nextKey!=null?t.get(n.nextKey):void 0;}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!=="item"&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!=="item"&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t.itemCount=this.itemCount,t}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");e.type==="item"&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e);}addDescendants(e,t){this.addNode(e);let i=t.getChildren(e.key);for(let n of i)this.addDescendants(n,t);}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");let t=this.keyMap.get(e);t!=null&&t.type==="item"&&this.itemCount--,this.keyMap.delete(e);}commit(e,t,i=false){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=t,this.frozen=!i;}filter(e){let t=new this.constructor,[i,n]=G(this,t,this.firstKey,e);return t?.commit(i,n),t}};function G(l,e,t,i){if(t==null)return [null,null];let n=null,o=null,r=l.getItem(t);for(;r!=null;){let s=r.filter(l,e,i);s!=null&&(s.nextKey=null,o&&(s.prevKey=o.key,o.nextKey=s.key),n==null&&(n=s),e.addNode(s),o=s),r=r.nextKey!=null?l.getItem(r.nextKey):null;}if(o&&o.type==="separator"){let s=o.prevKey;e.removeNode(o.key),s!=null?(o=e.getItem(s),o.nextKey=null):o=null;}return [n?.key??null,o?.key??null]}var w=class{_firstChild=null;_lastChild=null;_previousSibling=null;_nextSibling=null;_parentNode=null;_minInvalidChildIndex=null;ownerDocument;constructor(e){this.ownerDocument=e;}*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling;}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this);}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this);}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this);}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this);}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this);}get isConnected(){return this.parentNode?.isConnected||false}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this));}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null;}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate();}insertBefore(e,t){if(t==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index-1,this.firstChild===t?this.firstChild=e:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate();}removeChild(e){e.parentNode===this&&(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate());}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}},T=class l extends w{nodeType=8;node;isMutated=true;_index=0;isHidden=false;constructor(e,t){super(t),this.node=null;}get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this);}get level(){return this.parentNode instanceof l?this.parentNode.level+(this.parentNode.node?.type==="item"?1:0):0}getMutableNode(){return this.node==null?null:(this.isMutated||(this.node=this.node.clone(),this.isMutated=true),this.ownerDocument.markDirty(this),this.node)}updateNode(){let e=this.nextVisibleSibling,t=this.getMutableNode();if(t!=null&&(t.index=this.index,t.level=this.level,t.parentKey=this.parentNode instanceof l?this.parentNode.node?.key??null:null,t.prevKey=this.previousVisibleSibling?.node?.key??null,t.nextKey=e?.node?.key??null,t.hasChildNodes=!!this.firstChild,t.firstChildKey=this.firstVisibleChild?.node?.key??null,t.lastChildKey=this.lastVisibleChild?.node?.key??null,(t.colSpan!=null||t.colIndex!=null)&&e)){let i=(t.colIndex??t.index)+(t.colSpan??1);if(e.node!=null&&i!==e.node.colIndex){let n=e.getMutableNode();n.colIndex=i;}}}setProps(e,t,i,n,o){let r,{value:s,textValue:a,id:p,...d}=e;if(this.node==null?(r=new i(p??`react-aria-${++this.ownerDocument.nodeId}`),this.node=r):r=this.getMutableNode(),d.ref=t,r.props=d,r.rendered=n,r.render=o,r.value=s,e["aria-label"]&&(r["aria-label"]=e["aria-label"]),r.textValue=a||(typeof d.children=="string"?d.children:"")||e["aria-label"]||"",p!=null&&p!==r.key)throw new Error("Cannot change the id of an item");d.colSpan!=null&&(r.colSpan=d.colSpan),this.isConnected&&this.ownerDocument.queueUpdate();}get style(){let e=this;return {get display(){return e.isHidden?"none":""},set display(t){let i=t==="none";if(e.isHidden!==i){(e.parentNode?.firstVisibleChild===e||e.parentNode?.lastVisibleChild===e)&&e.ownerDocument.markDirty(e.parentNode);let n=e.previousVisibleSibling,o=e.nextVisibleSibling;n&&e.ownerDocument.markDirty(n),o&&e.ownerDocument.markDirty(o),e.isHidden=i,e.ownerDocument.markDirty(e);}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}},I=class extends w{nodeType=11;ownerDocument=this;dirtyNodes=new Set;isSSR=false;nodeId=0;nodesByProps=new WeakMap;collection;nextCollection=null;subscriptions=new Set;queuedRender=false;inSubscription=false;constructor(e){super(null),this.collection=e,this.nextCollection=e;}get isConnected(){return true}createElement(e){return new T(e,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(e){this.dirtyNodes.add(e);}addNode(e){if(e.isHidden||e.node==null)return;let t=this.getMutableCollection();if(!t.getItem(e.node.key))for(let i of e)this.addNode(i);t.addNode(e.node);}removeNode(e){for(let t of e)this.removeNode(t);e.node&&this.getMutableCollection().removeNode(e.node.key);}getCollection(){return this.inSubscription?this.collection:(this.queuedRender=false,this.updateCollection(),this.collection)}updateCollection(){for(let e of this.dirtyNodes)e instanceof T&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof T?(e.isConnected&&!e.isHidden&&(e.updateNode(),this.addNode(e)),e.node&&this.dirtyNodes.delete(e),e.isMutated=false):this.dirtyNodes.delete(e);this.nextCollection&&(this.nextCollection.commit(this.firstVisibleChild?.node?.key??null,this.lastVisibleChild?.node?.key??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null));}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=true,this.inSubscription=true,this.isSSR||(this.collection=this.collection.clone());for(let e of this.subscriptions)e();this.inSubscription=false;}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=false,this.firstChild=null,this.lastChild=null,this.nodeId=0);}};function v(l){let{children:e,items:t,idScope:i,addIdAndValue:n,dependencies:o=[]}=l,r=useMemo(()=>process.env.NODE_ENV!=="production"&&typeof e=="function"?e.toString():void 0,[e]),s=useMemo(()=>new WeakMap,[...o,r]);return useMemo(()=>{if(t&&typeof e=="function"){let a=[];for(let p of t){let d=xe(p)?p:null,u=d?s.get(d):null;if(!u){u=e(p);let f=u.props.id??p?.key??p?.id;i!=null&&u.props.id==null&&f!=null&&(f=i+":"+f);let K=f??a.length;u=cloneElement(u,n?{key:K,id:f,value:p}:{key:K}),d&&s.set(d,u);}a.push(u);}return a}else if(typeof e!="function")return e},[e,t,s,i,n])}function xe(l){switch(typeof l){case "object":return l!=null;case "function":case "symbol":return true;default:return false}}var te=createContext(false),D=createContext(null);function Te(l){if(useContext(D))return l.content;let{collection:t,document:i}=Ke(l.createCollection);return jsxs(Fragment,{children:[jsx(a$2,{children:jsx(D.Provider,{value:i,children:l.content})}),jsx(ve,{render:l.children,collection:t})]})}function ve({collection:l,render:e}){return e(l)}function Re(l,e,t){let i=b$1(),n=useRef(i);n.current=i;let o=useCallback(()=>n.current?t():e(),[e,t]);return useSyncExternalStore(l,o)}var De=typeof Y.useSyncExternalStore=="function"?Y.useSyncExternalStore:Re;function Ke(l){let[e]=useState(()=>new I(l?.()||new N)),t=useCallback(r=>e.subscribe(r),[e]),i=useCallback(()=>{let r=e.getCollection();return e.isSSR&&e.resetAfterSSR(),r},[e]),n=useCallback(()=>(e.isSSR=true,e.getCollection()),[e]);return {collection:De(t,i,n),document:e}}var O=createContext(null);function Ee(l){return class extends y{static type=l}}function ne(l,e,t,i,n,o){typeof l=="string"&&(l=Ee(l));let r=useCallback(a=>{a?.setProps(e,t,l,i,o);},[e,t,i,o,l]),s=useContext(O);if(s){let a=s.ownerDocument.nodesByProps.get(e);return a||(a=s.ownerDocument.createElement(l.type),a.setProps(e,t,l,i,o),s.appendChild(a),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(e,a)),n?jsx(O.Provider,{value:a,children:n}):null}return jsx(l.type,{ref:r,children:n})}function we(l,e){let t=({node:n})=>e(n.props,n.props.ref,n),i=forwardRef((n,o)=>{let r=useContext(b$2);if(!useContext(te)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(n,o)}return ne(l,n,o,"children"in n?n.children:null,null,a=>jsx(b$2.Provider,{value:r,children:jsx(t,{node:a})}))});return i.displayName=e.name,i}function Ie(l,e,t=le){let i=({node:o})=>e(o.props,o.props.ref,o),n=forwardRef((o,r)=>{let s=t(o);return ne(l,o,r,null,s,a=>jsx(i,{node:a}))??jsx(Fragment,{})});return n.displayName=e.name,n}function le(l){return v({...l,addIdAndValue:true})}var Q=createContext(null);function Pe(l){let e=useContext(Q),t=(e?.dependencies||[]).concat(l.dependencies),i=l.idScope??e?.idScope,n=le({...l,idScope:i,dependencies:t});return useContext(D)&&(n=jsx(ke,{children:n})),e=useMemo(()=>({dependencies:t,idScope:i}),[i,...t]),jsx(Q.Provider,{value:e,children:n})}function ke({children:l}){let e=useContext(D),t=useMemo(()=>jsx(D.Provider,{value:null,children:jsx(te.Provider,{value:true,children:l})}),[l]);return b$1()?jsx(O.Provider,{value:e,children:t}):createPortal(t,e)}var Ot=createContext(null);var Ae={CollectionRoot({collection:l,renderDropIndicator:e}){return oe(l,null,e)},CollectionBranch({collection:l,parent:e,renderDropIndicator:t}){return oe(l,e,t)}};function oe(l,e,t){return v({items:e?l.getChildren(e.key):l,dependencies:[t],children(i){if(i.type==="content")return jsx(Fragment,{});let n=i.render(i);return !t||i.type!=="item"?n:jsxs(Fragment,{children:[t({type:"item",key:i.key,dropPosition:"before"}),n,He(l,i,t)]})}})}function He(l,e,t){let i=e.key,n=l.getKeyAfter(i),o=n!=null?l.getItem(n):null;for(;o!=null&&o.type!=="item";)n=l.getKeyAfter(o.key),o=n!=null?l.getItem(n):null;let r=e.nextKey!=null?l.getItem(e.nextKey):null;for(;r!=null&&r.type!=="item";)r=r.nextKey!=null?l.getItem(r.nextKey):null;let s=[];if(r==null){let a=e;for(;a?.type==="item"&&(!o||a.parentKey!==o.parentKey&&o.level<a.level);){let p=t({type:"item",key:a.key,dropPosition:"after"});isValidElement(p)&&s.push(cloneElement(p,{key:`${a.key}-after`})),a=a.parentKey!=null?l.getItem(a.parentKey):null;}}return s}var qt=createContext(Ae);function zt(l){return useMemo(()=>l!=null?new Set([l]):null,[l])}var Zt=createContext({}),Je=createContext(null),We=forwardRef(function(e,t){let{render:i}=useContext(Je);return jsx(Fragment,{children:i(e,t)})});function en(l,e){let t=l?.renderDropIndicator,i=l?.isVirtualDragging?.(),n=useCallback(o=>{if(i||e?.isDropTarget(o))return t?t(o):jsx(We,{target:o})},[e?.target,i,t]);return l?.useDropIndicator?n:void 0}function tn(l,e,t){let i=l.focusedKey,n=null;if(e?.isVirtualDragging?.()&&t?.target?.type==="item"&&(n=t.target.key,t.target.dropPosition==="after")){let o=t.collection.getKeyAfter(n),r=null;if(o!=null){let s=t.collection.getItem(n)?.level??0;for(;o!=null;){let a=t.collection.getItem(o);if(!a)break;if(a.type!=="item"){o=t.collection.getKeyAfter(o);continue}if((a.level??0)<=s)break;r=o,o=t.collection.getKeyAfter(o);}}n=o??r??n;}return useMemo(()=>new Set([i,n].filter(o=>o!=null)),[i,n])}var ce=createContext(null);function xn(l){let e=useRef({});return jsx(ce.Provider,{value:e,children:l.children})}var pe=forwardRef(function(e,t){let{name:i,isVisible:n=true,children:o,className:r,style:s,render:a$2,...p}=e,[d,u]=useState(n?"visible":"hidden"),f=useContext(ce);if(!f)throw new Error("<SharedElement> must be rendered inside a <SharedElementTransition>");n&&d==="hidden"&&u("visible"),t=a(t),a$1(()=>{let c=t.current,S=f.current,E=S?.[i],g=null;if(c&&n&&E){u("visible");let C=c.getAnimations(),k=E.style.map(([m,M])=>{let me=c.style[m];if(m==="translate"){let q=E.rect,z=c.getBoundingClientRect(),fe=q.left-z?.left,ye=q.top-z?.top;c.style.translate=`${fe}px ${ye}px`;}else c.style[m]=M;return [m,me]});for(let m of c.getAnimations())C.includes(m)||m.cancel();g=requestAnimationFrame(()=>{g=null;for(let[m,M]of k)c.style[m]=M;}),delete S?.[i];}else c&&n&&!E?(queueMicrotask(()=>flushSync(()=>u("entering"))),g=requestAnimationFrame(()=>{g=null,u("visible");})):c&&!n&&queueMicrotask(()=>{S?.[i]?(delete S?.[i],flushSync(()=>u("exiting")),Promise.all(c.getAnimations().map(C=>C.finished)).then(()=>u("hidden")).catch(()=>{})):u("hidden");});return ()=>{if(g!=null&&cancelAnimationFrame(g),c&&c.isConnected&&!c.hasAttribute("data-exiting")){let C=window.getComputedStyle(c);if(C.transitionProperty!=="none"){let k=C.transitionProperty.split(/\s*,\s*/);S[i]={rect:c.getBoundingClientRect(),style:k.map(m=>[m,C[m]])};}}}},[t,f,i,n]);let K=c({children:o,className:r,style:s,render:a$2,values:{isEntering:d==="entering",isExiting:d==="exiting"}});return d==="hidden"?null:jsx(h.div,{...p,...K,ref:t,"data-entering":d==="entering"||void 0,"data-exiting":d==="exiting"||void 0})});var tt=createContext({isSelected:false});forwardRef(function(e$1,t){[e$1,t]=e(e$1,t,tt);let{isSelected:i,...n}=e$1;return jsx(pe,{...n,ref:t,className:e$1.className||"react-aria-SelectionIndicator",name:"SelectionIndicator",isVisible:i})});export{y as a,b,V as c,A as d,H as e,L as f,N as g,v as h,Te as i,we as j,Ie as k,Pe as l,Ot as m,Ae as n,He as o,qt as p,zt as q,Zt as r,Je as s,We as t,en as u,tn as v,xn as w,tt as x};
|
package/dist/chunk-T4R3EXGI.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$5}from'./chunk-GVI6EBGJ.mjs';import {a as a$a}from'./chunk-A24DWFQ2.mjs';import {a as a$9}from'./chunk-NGZRN4SF.mjs';import {b as b$1}from'./chunk-PAQQ7MQG.mjs';import {a as a$c}from'./chunk-UN7XC7QV.mjs';import {b as b$3,e as e$1}from'./chunk-7MQBBSZ2.mjs';import {b,c as c$1}from'./chunk-GX2IOGYR.mjs';import {b as b$6}from'./chunk-AYBACQ6U.mjs';import {a as a$4}from'./chunk-O7XK2WIX.mjs';import {a as a$7}from'./chunk-2V323KAD.mjs';import {a as a$3}from'./chunk-KUEDQO7P.mjs';import {b as b$5}from'./chunk-N2XGJKZG.mjs';import {b as b$7,j}from'./chunk-L6S5GBKS.mjs';import {a as a$6}from'./chunk-66CUIXA6.mjs';import {e}from'./chunk-SHJ2TJYG.mjs';import {a as a$2}from'./chunk-BGMVPFYK.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {c,b as b$4}from'./chunk-TZ4MVY4E.mjs';import {b as b$2,a as a$1}from'./chunk-JDLUGVXG.mjs';import {b as b$8,f,a as a$b,e as e$2}from'./chunk-AUOQSTS5.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import _,{useState,useRef,useCallback,useMemo,useEffect,createElement}from'react';import {MoreIcon}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 De=0,S="UNSUPPORTED_IN_MENU";function ge(e){return useMemo(()=>_.Children.toArray(e).map(t=>{let o=t,i=`item${++De}`,r=w(o,b$7),a=be(o),c,m;if(r){let b=w(r,j);a$6(b),c=be(b),m=w(r,a$c).props.children;}else a?c=a:c=o;let{onPress:y,label:p,"aria-label":s,iconStart:f,isDisabled:T,icon:g}=c.props,u=p||s||S;a$6(typeof u=="string","ActionGroup children must have a string label");let v=`${i}-${u}`;return createElement(a$9,{...{key:v,onPress:y,textValue:u,"aria-label":s,icon:f||g,dialogContent:m,isDisabled:T},key:v},o)}),[e])}function w(e,t){if(t)for(let o of _.Children.toArray(e)){if(!_.isValidElement(o))continue;let i=o;if(i.type===t)return i;if(i.props.children){let r=w(i.props.children,t);if(r)return r}}}function be(e){return w(e,b$6)||w(e,a$7)}var Se=new Set(["text","search","password","tel","url"]);function L({props:e,ref:t}){let{toolbarProps:o}=a$a(e,t),{direction:i}=b$5(),r=i==="rtl";return {toolbarProps:{...o,onKeyDownCapture:a=>{let c=a.target,m=a.key,y=()=>{let p=t.current;if(!p)return;let s=f(a$b(p));if(!s||!e$2(p,s)||s.dataset.buiAvoidFocus!=="true")return;let f$1=Be(p),T=f$1.indexOf(s);if(T===-1)return;let g=ke({key:m,orientation:e.orientation??"horizontal",isRTL:r});if(!g)return;let u=T+g;for(;u>=0&&u<f$1.length;){let v=f$1[u];if(v.dataset.buiAvoidFocus!=="true"&&!v.matches('[disabled], [aria-disabled="true"]')){v.focus();return}u+=g;}};if(He(c)&&Se.has(c.type)){let p=c.selectionStart===0,s=c.selectionEnd===c.value.length;(p&&(r&&a.key==="ArrowRight"||!r&&a.key==="ArrowLeft")||s&&(r&&a.key==="ArrowLeft"||!r&&a.key==="ArrowRight"))&&(o.onKeyDownCapture?.(a),y());return}o.onKeyDownCapture?.(a),y();}}}}function ke({key:e,orientation:t,isRTL:o}){return t==="vertical"?e==="ArrowUp"?-1:e==="ArrowDown"?1:null:e==="ArrowLeft"?o?1:-1:e==="ArrowRight"?o?-1:1:null}var Oe='button, [role="button"], input, [tabindex]';function Be(e){let t=[],o=i=>{t.push(...i.querySelectorAll(Oe));for(let r of i.querySelectorAll("*"))r.shadowRoot&&o(r.shadowRoot);};return o(e),t}function He(e){return e.tagName.toLowerCase()==="input"}var ye="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z6m3 _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6lv",ve={horizontal:"xvr3wn0",vertical:"xvr3wn1"};var O=_.forwardRef(({className:e$2,style:t,children:o,collapsibleMenuProps:i,"data-block-id":r,"data-block-class":a$8,renderSpacer:c$1,onKeyDown:m,isSingleTabStop:y=true,moreLabel:p,...s},f)=>{let{formatMessage:T}=b(),[g,u]=useState(),v=ge(o),d=b$1({...s,children:v}),b$4=a(f),M=useRef(null),[{visibleItems:H,isMeasuring:V},U]=b$2({visibleItems:d.collection.size,isMeasuring:false}),x=useCallback(()=>{let n=l=>{if(M.current&&b$4.current){let R=[...M.current.children],z=b$4.current.getBoundingClientRect().width,Le=l<d.collection.size,D=0,j=0;if(Le){let C=R.pop();C&&(D+=he(C,false,true));}for(let[C,xe]of R.entries())if(D+=he(xe,C===0,C===R.length-1),Math.round(D)<=Math.round(z))j++;else break;return j}return l};U(function*(){yield {visibleItems:d.collection.size,isMeasuring:true};let l=n(d.collection.size),R=l<d.collection.size&&l>0;yield {visibleItems:l,isMeasuring:R},R&&(yield {visibleItems:n(l),isMeasuring:false});});},[U,b$4,d.collection.size]),Me=useMemo(()=>({get current(){return b$4.current?.parentElement}}),[b$4]);e({ref:Me,onResize:x}),a$1(x,[d.collection,x]);let{toolbarProps:Ae}=L({props:{...s,isSingleTabStop:y},ref:b$4}),W=[...d.collection],Ie=W.slice(0,H),A=W.slice(H).filter(n=>n.textValue!==S),Ne=A.length>0;useEffect(()=>{u(void 0);},[A.length]),useEffect(()=>{s.orientation==="vertical"&&console.warn("Toolbar: Vertical orientation is not supported when `isCollapsible` is true.");},[s.orientation]);let{keyboardProps:Pe}=a$2({onKeyDown:m});return jsxs(a$3,{children:[jsx("div",{...c(Ae,Pe),className:e$2,"data-block-id":r,"data-block-class":a$8,"data-collapse":true,style:{...t,flexBasis:V?"100%":void 0},ref:b$4,children:jsxs("div",{ref:M,className:ye,children:[Ie.map(n=>n.rendered),Ne?jsxs(Fragment,{children:[!V&&c$1?jsx(a$4,{flexGrow:1}):null,jsx(a$5,{placement:"bottom end",renderTrigger:({buttonProps:n,ref:l})=>jsx(a$7,{...n,size:"md",icon:MoreIcon,"aria-label":p??T(Ke.more),variant:"toolbar",ref:l,tooltip:true}),...i,disabledKeys:A.filter(n=>n.props?.isDisabled).map(n=>n.key),items:A.map(n=>{let l=n.textValue||n["aria-label"];return a$6(l,"ActionItem must have a label"),{id:n.key,label:l,icon:n.props.icon}}),onAction:n=>{let l=d.collection.getItem(n);a$6(l,"Item not found");let{onPress:R,dialogContent:z}=l.props;R?.(),u(z);}})]}):null]})}),jsx(b$3,{isOpen:!!g,onOpenChange:n=>{n||u(void 0);},children:jsx(e$1,{enableDrawer:"auto",style:{zIndex:1e5},children:g?_.cloneElement(g,{inheritDrawer:true}):null})})]})});O.displayName="CollapsibleToolbar";function he(e,t,o){let r=b$8(e).getComputedStyle(e);return e.getBoundingClientRect().width+(t?0:we(r.marginLeft))+(o?0:we(r.marginRight))}function we(e){let t=Number.parseInt(e,10);return Number.isNaN(t)?0:t}var Ke=c$1({more:{id:"bui.toolbar.more",defaultMessage:"More"}});var B=_.forwardRef(({className:e,style:t,isSingleTabStop:o=true,"data-block-id":i,"data-block-class":r,"aria-controls":a,onKeyDown:c$1,...m},y)=>{let p=_.useRef(null),{toolbarProps:s}=L({props:{...m,isSingleTabStop:o},ref:p}),{keyboardProps:f}=a$2({onKeyDown:c$1});return jsx("div",{...c(s,f),...a?{"aria-controls":a}:{},className:a$8(ve[m.orientation||"horizontal"],"BaselineUI-Toolbar",e),style:t,"data-block-id":i,"data-block-class":r,ref:b$4(y,p),children:m.children})});B.displayName="WrappedToolbar";var Ce=_.forwardRef((e,t)=>{let o=e.isCollapsible?O:B;return jsx(o,{...e,ref:t})});Ce.displayName="Toolbar";export{Ce as a};
|
package/dist/chunk-TBCZKWGQ.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a,b as b$1,c as c$1,d}from'./chunk-BBZ2I3RF.mjs';import {c}from'./chunk-L3SNGDBH.mjs';import {b}from'./chunk-PAQQ7MQG.mjs';import {b as b$2}from'./chunk-TZ4MVY4E.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import v,{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 G="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69i _1yep5z69j _1yep5z69k";var z=({item:e})=>{let p=useMemo(()=>({item:e}),[e]);return jsx(c$1.Provider,{value:p,children:jsx(d,{children:e.rendered})})},x=v.forwardRef(({className:e,style:p,"data-block-id":C,"data-block-class":P,items:i,size:m="md",isDisabled:_=false,...t},k)=>{let L=useMemo(()=>i.map(o=>({...o,data:{variant:o.variant}})),[i]),b$3=c(),n=v.useRef(null),a$2=b({...t,items:L,children:b$3,disabledKeys:_?i.map(o=>o.id):t.disabledKeys}),{gridProps:I}=a(t,a$2,n),R=useMemo(()=>({state:a$2,variant:t.variant,size:m}),[a$2,t.variant,m]);return jsx("div",{...I,className:a$1(G,"BaselineUI-TagGroup",e),style:p,"data-block-id":C,"data-block-class":P,ref:b$2(k,n),children:jsx(b$1.Provider,{value:R,children:[...a$2.collection].map(o=>jsx(z,{item:o},o.key))})})});x.displayName="TagGroup";export{x as a};
|
package/dist/chunk-TDXALNX3.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {t}from'./chunk-MRJFGHFW.mjs';import {a,g,e}from'./chunk-AUOQSTS5.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 H(s){let{ref:n,onInteractOutside:o,isDisabled:u,onInteractOutsideStart:p}=s,m=useRef({isPointerDown:false,ignoreEmulatedMouseEvents:false}),i=t(e=>{o&&d(e,n)&&(p&&p(e),m.current.isPointerDown=true);}),f=t(e=>{o&&o(e);});useEffect(()=>{let e=m.current;if(u)return;let y=n.current,t=a(y);if(typeof PointerEvent<"u"){let a=r=>{r.pointerType==="pen"&&e.isPointerDown&&d(r,n)&&(f(r),e.isPointerDown=false);},c=r=>{e.isPointerDown&&d(r,n)&&(f(r),e.isPointerDown=false);};return t.addEventListener("pointerdown",i,true),t.addEventListener("pointerup",a,true),t.addEventListener("click",c,true),()=>{t.removeEventListener("pointerdown",i,true),t.removeEventListener("pointerup",a,true),t.removeEventListener("click",c,true);}}else if(process.env.NODE_ENV==="test"){let a=r=>{e.ignoreEmulatedMouseEvents?e.ignoreEmulatedMouseEvents=false:e.isPointerDown&&d(r,n)&&f(r),e.isPointerDown=false;},c=r=>{e.ignoreEmulatedMouseEvents=true,e.isPointerDown&&d(r,n)&&f(r),e.isPointerDown=false;};return t.addEventListener("mousedown",i,true),t.addEventListener("mouseup",a,true),t.addEventListener("touchstart",i,true),t.addEventListener("touchend",c,true),()=>{t.removeEventListener("mousedown",i,true),t.removeEventListener("mouseup",a,true),t.removeEventListener("touchstart",i,true),t.removeEventListener("touchend",c,true);}}},[n,u]);}function d(s,n){if(s.button>0)return false;let o=g(s);if(o){let u=o.ownerDocument;if(!u||!e(u.documentElement,o)||o.closest("[data-react-aria-top-layer]"))return false}return n.current?!s.composedPath().includes(n.current):false}export{H as a};
|
package/dist/chunk-TKQOQVZD.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {j,k}from'./chunk-OMT6ZWSV.mjs';import {a}from'./chunk-YB3KW7JC.mjs';import {t}from'./chunk-MRJFGHFW.mjs';import {a as a$2}from'./chunk-TZ4MVY4E.mjs';import {a as a$1,g}from'./chunk-AUOQSTS5.mjs';import {useRef,useState,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
|
-
var c=new Map;function i(t,l,a){let r=c.get(t);r||(r=new Map,c.set(t,r));let o=r.get(l);if(!o){let s=new Set,p=u=>{for(let f of s)f(u);};o={listener:p,handlers:s},r.set(l,o),t.addEventListener(l,p);}return o.handlers.add(a),()=>{o.handlers.delete(a),o.handlers.size===0&&(t.removeEventListener(l,o.listener),r.delete(l),r.size===0&&c.delete(t));}}function F(t$1){let{isDisabled:l}=t$1,a$3=useRef(false),[r,o]=useState(null),{focusProps:s}=a({onFocus:e=>{o(a$1(g(e)));},onFocusChange:e=>{a$3.current=e;}}),p=t(e=>{a$3.current&&t$1.getItems&&e.preventDefault();}),u=t(e=>{!a$3.current||!t$1.getItems||(e.preventDefault(),e.clipboardData&&(j(e.clipboardData,t$1.getItems({action:"copy"})),t$1.onCopy?.()));}),f=t(e=>{a$3.current&&t$1.onCut&&t$1.getItems&&e.preventDefault();}),g$1=t(e=>{!a$3.current||!t$1.onCut||!t$1.getItems||(e.preventDefault(),e.clipboardData&&(j(e.clipboardData,t$1.getItems({action:"cut"})),t$1.onCut()));}),E=t(e=>{a$3.current&&t$1.onPaste&&e.preventDefault();}),I=t(e=>{if(!(!a$3.current||!t$1.onPaste)&&(e.preventDefault(),e.clipboardData)){let y=k(e.clipboardData);t$1.onPaste(y);}});return useEffect(()=>{if(!(l||!r))return a$2(i(r,"beforecopy",p),i(r,"copy",u),i(r,"beforecut",f),i(r,"cut",g$1),i(r,"beforepaste",E),i(r,"paste",I))},[l,r]),{clipboardProps:s}}export{F as a};
|
package/dist/chunk-TTYRHIRQ.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-DD5FWULD.mjs';import {useGranularEffect}from'granular-hooks';import {useReducer,useRef}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
|
-
var f="SET_STATE",o="UNDO",a="REDO",U=(u,e)=>{let{past:t,present:n,future:s}=u;switch(e.type){case f:return {past:[...t,n],present:e.data,future:[]};case o:return {past:t.slice(0,t?.length-1),present:t[t?.length-1],future:[n,...s]};case a:return {past:[...t,n],present:s[0],future:s.slice(1)};default:throw new Error("Invalid action type")}},H=(u={},{isDisabled:e,onAction:t})=>{let n=a$1(),[s,c]=useReducer(U,{past:[],present:u,future:[]}),{past:i,present:p,future:T}=s,h=E=>{c({type:f,data:E});},r=useRef(void 0),y=()=>{i.length&&(r.current=o,c({type:o}));},S=()=>{T.length&&(r.current=a,c({type:a}));},l=!!i?.length,R=!!T?.length;return useGranularEffect(()=>{(r.current===o||r.current===a)&&(t?.(p,r.current),r.current=void 0);},[p],[t,n]),{state:p,push:e?()=>{}:h,undo:e?()=>{}:y,redo:e?()=>{}:S,pastStates:i,futureStates:T,canUndo:l,canRedo:R}};export{H as a};
|
package/dist/chunk-UBFMOTBM.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$1,c}from'./chunk-I3YGB2BE.mjs';import {d as d$3}from'./chunk-KUEDQO7P.mjs';import {a as a$5}from'./chunk-BU5H25MV.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$1,d,a as a$2,f as f$1}from'./chunk-SHJ2TJYG.mjs';import {d as d$1,e}from'./chunk-MVK5CB64.mjs';import {a}from'./chunk-RXSYDMT6.mjs';import {i,c as c$1}from'./chunk-Y4DRSGEJ.mjs';import {d as d$2}from'./chunk-AQYBKDT2.mjs';import {n,o,c as c$4,a as a$6,h}from'./chunk-MRJFGHFW.mjs';import {c as c$2,a as a$4}from'./chunk-TZ4MVY4E.mjs';import {c as c$3}from'./chunk-JDLUGVXG.mjs';import {f,b as b$2,a as a$3,g,e as e$1}from'./chunk-AUOQSTS5.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 H(s){return h()?s.altKey:s.ctrlKey}function Y(s,e){let t=`[data-key="${CSS.escape(String(e))}"]`,l=s.current?.dataset.collection;return l&&(t=`[data-collection="${CSS.escape(l)}"]${t}`),s.current?.querySelector(t)}var be=new WeakMap;function Se(s){let e=c$3();return be.set(s,e),e}function Fe(s){return be.get(s)}var Pe=1e3;function he(s){let{keyboardDelegate:e,selectionManager:t,onTypeSelect:l}=s,i=useRef({search:"",timeout:void 0}),v=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 f=e.getKeyForSearch(i.current.search,t.focusedKey);f==null&&(f=e.getKeyForSearch(i.current.search)),f!=null&&(t.setFocusedKey(f),l&&l(f));}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search="";},Pe);}},K=c=>{let f=Oe(c.key);if(!(!f||c.ctrlKey||c.metaKey||c.altKey||!e$1(c.currentTarget,g(c))||i.current.search.length===0&&f===" ")){if(i.current.search+=f,e.getKeyForSearch!=null){let p=e.getKeyForSearch(i.current.search,t.focusedKey);if(p==null&&(p=e.getKeyForSearch(i.current.search)),p!=null)t.setFocusedKey(p),l&&l(p),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="";},Pe);}};return useEffect(()=>{let c=i.current.timeout;return ()=>{clearTimeout(c);}},[i]),{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?v:void 0,onKeyDown:e.getKeyForSearch?K:void 0}}}function Oe(s){return s.length===1||!/^[A-Z]/i.test(s)?s:""}function it(s){let{selectionManager:e$2,keyboardDelegate:t,ref:l,autoFocus:i$1=false,shouldFocusWrap:v=false,disallowEmptySelection:K=false,disallowSelectAll:c$3=false,escapeKeyBehavior:f$2="clearSelection",selectOnFocus:p=e$2.selectionBehavior==="replace",disallowTypeAhead:Z=false,shouldUseVirtualFocus:y,allowsTabNavigation:W=false,scrollRef:d$2=l,linkBehavior:T="action",UNSTABLE_focusOnEntry:R}=s,{direction:L}=b(),_=n(),g$1=r=>{if(r.altKey&&r.key==="Tab"&&r.preventDefault(),!l.current||!e$1(l.current,g(r)))return;let u=(n,a)=>{if(n!=null){if(e$2.isLink(n)&&T==="selection"&&p&&!H(r)){flushSync(()=>{e$2.setFocusedKey(n,a);});let o=Y(l,n),w=e$2.getItemProps(n);o&&_.open(o,r,w.href,w.routerOptions);return}if(e$2.setFocusedKey(n,a),e$2.isLink(n)&&T==="override")return;r.shiftKey&&e$2.selectionMode==="multiple"?e$2.extendSelection(n):p&&!H(r)&&e$2.replaceSelection(n);}};switch(r.key){case "ArrowDown":{if(t.getKeyBelow){let n=e$2.focusedKey!=null?t.getKeyBelow?.(e$2.focusedKey):t.getFirstKey?.();n==null&&v&&(n=t.getFirstKey?.(e$2.focusedKey)),n!=null&&(r.preventDefault(),u(n));}break}case "ArrowUp":{if(t.getKeyAbove){let n=e$2.focusedKey!=null?t.getKeyAbove?.(e$2.focusedKey):t.getLastKey?.();n==null&&v&&(n=t.getLastKey?.(e$2.focusedKey)),n!=null&&(r.preventDefault(),u(n));}break}case "ArrowLeft":{if(t.getKeyLeftOf){let n=e$2.focusedKey!=null?t.getKeyLeftOf?.(e$2.focusedKey):t.getFirstKey?.();n==null&&v&&(n=L==="rtl"?t.getFirstKey?.(e$2.focusedKey):t.getLastKey?.(e$2.focusedKey)),n!=null&&(r.preventDefault(),u(n,L==="rtl"?"first":"last"));}break}case "ArrowRight":{if(t.getKeyRightOf){let n=e$2.focusedKey!=null?t.getKeyRightOf?.(e$2.focusedKey):t.getFirstKey?.();n==null&&v&&(n=L==="rtl"?t.getLastKey?.(e$2.focusedKey):t.getFirstKey?.(e$2.focusedKey)),n!=null&&(r.preventDefault(),u(n,L==="rtl"?"last":"first"));}break}case "Home":if(t.getFirstKey){if(e$2.focusedKey===null&&r.shiftKey)return;r.preventDefault();let n=t.getFirstKey(e$2.focusedKey,f$1(r));e$2.setFocusedKey(n),n!=null&&(f$1(r)&&r.shiftKey&&e$2.selectionMode==="multiple"?e$2.extendSelection(n):p&&e$2.replaceSelection(n));}break;case "End":if(t.getLastKey){if(e$2.focusedKey===null&&r.shiftKey)return;r.preventDefault();let n=t.getLastKey(e$2.focusedKey,f$1(r));e$2.setFocusedKey(n),n!=null&&(f$1(r)&&r.shiftKey&&e$2.selectionMode==="multiple"?e$2.extendSelection(n):p&&e$2.replaceSelection(n));}break;case "PageDown":if(t.getKeyPageBelow&&e$2.focusedKey!=null){let n=t.getKeyPageBelow(e$2.focusedKey);n!=null&&(r.preventDefault(),u(n));}break;case "PageUp":if(t.getKeyPageAbove&&e$2.focusedKey!=null){let n=t.getKeyPageAbove(e$2.focusedKey);n!=null&&(r.preventDefault(),u(n));}break;case "a":f$1(r)&&e$2.selectionMode==="multiple"&&c$3!==true&&(r.preventDefault(),e$2.selectAll());break;case "Escape":f$2==="clearSelection"&&!K&&e$2.selectedKeys.size!==0&&(r.stopPropagation(),r.preventDefault(),e$2.clearSelection());break;case "Tab":if(!W){if(r.shiftKey)l.current.focus();else {let n=d$3(l.current,{tabbable:true}),a,o;do o=n.lastChild(),o&&(a=o);while(o);let w=a$3(l.current),Q=f(w);a&&(!e$1(a,Q)||Q&&!c$4(Q))&&a$6(a);}break}}},k=useRef({top:0,left:0});a(d$2,"scroll",()=>{k.current={top:d$2.current?.scrollTop??0,left:d$2.current?.scrollLeft??0};});let F=r=>{if(e$2.isFocused){e$1(r.currentTarget,g(r))||e$2.setFocused(false);return}if(!e$1(r.currentTarget,g(r)))return;let u=c$1();e$2.setFocused(true);let n=a=>{a!=null&&(e$2.setFocusedKey(a),p&&!e$2.isSelected(a)&&e$2.replaceSelection(a));};if(R&&(u==="keyboard"||u==="virtual"))n(R==="first"?t.getFirstKey?.():t.getLastKey?.());else if(e$2.focusedKey==null){let a=r.relatedTarget;a&&r.currentTarget.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_FOLLOWING?n(e$2.lastSelectedKey??t.getLastKey?.()):n(e$2.firstSelectedKey??t.getFirstKey?.());}else d$2.current&&(d$2.current.scrollTop=k.current.top,d$2.current.scrollLeft=k.current.left);if(e$2.focusedKey!=null&&d$2.current){let a=Y(l,e$2.focusedKey),o=b$2(a);a instanceof o.HTMLElement&&(!e$1(a,f(o.document))&&!y&&a$6(a),(u==="keyboard"||R&&u==="virtual")&&e(a,{containingElement:l.current}));}},U=r=>{e$1(r.currentTarget,r.relatedTarget)||e$2.setFocused(false);},b$3=useRef(false);a(l,b$1,y?r=>{let{detail:u}=r;r.stopPropagation(),e$2.setFocused(true),u?.focusStrategy==="first"&&(b$3.current=true);}:void 0);let E=t.getFirstKey?.()??null;d(()=>{if(b$3.current)if(E==null){let r=f();a$1(l.current),c(r,null),e$2.collection.size>0&&(b$3.current=false);}else e$2.setFocusedKey(E),b$3.current=false;},[E,e$2.collection.size]),d(()=>{e$2.collection.size>0&&(b$3.current=false);},[e$2.focusedKey]),a(l,a$2,y?r=>{r.stopPropagation(),e$2.setFocused(false),r.detail?.clearFocusKey&&e$2.setFocusedKey(null);}:void 0);let M=useRef(i$1),D=useRef(false);useEffect(()=>{if(M.current){let r=null;i$1==="first"&&(r=t.getFirstKey?.()??null),i$1==="last"&&(r=t.getLastKey?.()??null);let u=e$2.selectedKeys;if(u.size){for(let n of u)if(e$2.canSelectItem(n)){r=n;break}}e$2.setFocused(true),e$2.setFocusedKey(r),r==null&&!y&&l.current&&i(l.current),e$2.collection.size>0&&(M.current=false,D.current=true);}});let C=useRef(e$2.focusedKey),S=useRef(null);useEffect(()=>{if(e$2.isFocused&&e$2.focusedKey!=null&&(e$2.focusedKey!==C.current||D.current)&&d$2.current&&l.current){let r=c$1(),u=Y(l,e$2.focusedKey),n=b$2(u);if(!(u instanceof n.HTMLElement))return;(r==="keyboard"||D.current)&&(S.current&&cancelAnimationFrame(S.current),S.current=requestAnimationFrame(()=>{d$2.current&&(d$1(d$2.current,u),r!=="virtual"&&e(u,{containingElement:l.current}));}));}!y&&e$2.isFocused&&e$2.focusedKey==null&&C.current!=null&&l.current&&i(l.current),C.current=e$2.focusedKey,D.current=false;}),useEffect(()=>()=>{S.current&&cancelAnimationFrame(S.current);},[]),a(l,"react-aria-focus-scope-restore",r=>{r.preventDefault(),e$2.setFocused(true);});let A={onKeyDown:g$1,onFocus:F,onBlur:U,onMouseDown(r){d$2.current===g(r)&&r.preventDefault();}},{typeSelectProps:m}=he({keyboardDelegate:t,selectionManager:e$2});Z||(A=c$2(m,A));let z;y||(z=e$2.focusedKey==null?0:-1);let J=Se(e$2.collection);return {collectionProps:c$2(A,{tabIndex:z,"data-collection":J})}}function ht(s){let{id:e,selectionManager:t,key:l,ref:i$1,shouldSelectOnPressUp:v,shouldUseVirtualFocus:K,focus:c,isDisabled:f$2,onAction:p,allowsDifferentPressOrigin:Z,linkBehavior:y="action"}=s,W=n();e=c$3(e);let d=o=>{if(o.pointerType==="keyboard"&&H(o))t.toggleSelection(l);else {if(t.selectionMode==="none")return;if(t.isLink(l)){if(y==="selection"&&i$1.current){let w=t.getItemProps(l);W.open(i$1.current,o,w.href,w.routerOptions),t.setSelectedKeys(t.selectedKeys);return}else if(y==="override"||y==="none")return}t.selectionMode==="single"?t.isSelected(l)&&!t.disallowEmptySelection?t.toggleSelection(l):t.replaceSelection(l):o&&o.shiftKey?t.extendSelection(l):t.selectionBehavior==="toggle"||o&&(f$1(o)||o.pointerType==="touch"||o.pointerType==="virtual")?t.toggleSelection(l):t.replaceSelection(l);}};useEffect(()=>{l===t.focusedKey&&t.isFocused&&(K?a$1(i$1.current):c?c():f(a$3(i$1.current))!==i$1.current&&i$1.current&&i(i$1.current));},[i$1,l,t.focusedKey,t.childFocusStrategy,t.isFocused,K]),f$2=f$2||t.isDisabled(l);let T={};!K&&!f$2?T={tabIndex:l===t.focusedKey?0:-1,onFocus(o){g(o)===i$1.current&&t.setFocusedKey(l);}}:f$2&&(T.onMouseDown=o=>{o.preventDefault();}),useEffect(()=>{f$2&&t.focusedKey===l&&t.setFocusedKey(null);},[t,f$2,l]);let R=t.isLink(l)&&y==="override",L=p&&s.UNSTABLE_itemBehavior==="action",_=t.isLink(l)&&y!=="selection"&&y!=="none",g$1=!f$2&&t.canSelectItem(l)&&!R&&!L,k=(p||_)&&!f$2,F=k&&(t.selectionBehavior==="replace"?!g$1:!g$1||t.isEmpty),U=k&&g$1&&t.selectionBehavior==="replace",b=F||U,E=useRef(null),M=b&&g$1,D=useRef(false),C=useRef(false),S=t.getItemProps(l),A=o=>{p&&(p(),i$1.current?.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:true}))),_&&i$1.current&&W.open(i$1.current,o,S.href,S.routerOptions);},m={ref:i$1};if(v?(m.onPressStart=o=>{E.current=o.pointerType,D.current=M,o.pointerType==="keyboard"&&(!b||Ee(o.key))&&d(o);},Z?(m.onPressUp=F?void 0:o=>{o.pointerType==="mouse"&&g$1&&d(o);},m.onPress=F?A:o=>{o.pointerType!=="keyboard"&&o.pointerType!=="mouse"&&g$1&&d(o);}):m.onPress=o=>{if(F||U&&o.pointerType!=="mouse"){if(o.pointerType==="keyboard"&&!Te(o.key))return;A(o);}else o.pointerType!=="keyboard"&&g$1&&d(o);}):(m.onPressStart=o=>{E.current=o.pointerType,D.current=M,C.current=F,g$1&&(o.pointerType==="mouse"&&!F||o.pointerType==="keyboard"&&(!k||Ee(o.key)))&&d(o);},m.onPress=o=>{(o.pointerType==="touch"||o.pointerType==="pen"||o.pointerType==="virtual"||o.pointerType==="keyboard"&&b&&Te(o.key)||o.pointerType==="mouse"&&C.current)&&(b?A(o):g$1&&d(o));}),T["data-collection"]=Fe(t.collection),T["data-key"]=l,m.preventFocusOnPress=K,K&&(m=c$2(m,{onPressStart(o){o.pointerType!=="touch"&&(t.setFocused(true),t.setFocusedKey(l));},onPress(o){o.pointerType==="touch"&&(t.setFocused(true),t.setFocusedKey(l));}})),S)for(let o of ["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])S[o]&&(m[o]=a$4(m[o],S[o]));let{pressProps:z,isPressed:J}=d$2(m),r=U?o=>{E.current==="mouse"&&(o.stopPropagation(),o.preventDefault(),A(o));}:void 0,{longPressProps:u}=a$5({isDisabled:!M,onLongPress(o){o.pointerType==="touch"&&(d(o),t.setSelectionBehavior("toggle"));}}),n$1=o=>{E.current==="touch"&&D.current&&o.preventDefault();},a=y!=="none"&&t.isLink(l)?o$1=>{o.isOpening||o$1.preventDefault();}:void 0;return {itemProps:c$2(T,g$1||F||K&&!f$2?z:{},M?u:{},{onDoubleClick:r,onDragStartCapture:n$1,onClick:a,id:e},K?{onMouseDown:o=>o.preventDefault()}:void 0),isPressed:J,isSelected:t.isSelected(l),isFocused:t.isFocused&&t.focusedKey===l,isDisabled:f$2,allowsSelection:g$1,hasAction:b}}function Te(s){return s==="Enter"}function Ee(s){return s===" "}export{Y as a,he as b,it as c,ht as d};
|
package/dist/chunk-UEDBY5JI.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {c as c$1,b}from'./chunk-QSSCSN5S.mjs';import {a}from'./chunk-V37GPPZD.mjs';import {d}from'./chunk-UBFMOTBM.mjs';import {a as a$1}from'./chunk-34TYNTXM.mjs';import {d as d$1}from'./chunk-KUEDQO7P.mjs';import {b as b$1}from'./chunk-N2XGJKZG.mjs';import {e as e$2,b as b$2}from'./chunk-MVK5CB64.mjs';import {i as i$1,b as b$3}from'./chunk-Y4DRSGEJ.mjs';import {p,c as c$3}from'./chunk-MRJFGHFW.mjs';import {c as c$2,a as a$3}from'./chunk-TZ4MVY4E.mjs';import {a as a$2}from'./chunk-KEVERVHK.mjs';import {c,e}from'./chunk-JDLUGVXG.mjs';import {g,i,f,a as a$4,e as e$1}from'./chunk-AUOQSTS5.mjs';import {useRef}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
|
-
var w=new WeakMap;function N(o,t){let{id:e}=w.get(o)??{};if(!e)throw new Error("Unknown list");return `${e}-${ce(t)}`}function ce(o){return typeof o=="string"?o.replace(/\s*/g,""):""+o}function Se(o,t,e){let{isVirtualized:n,keyboardDelegate:a$3,layoutDelegate:s,onAction:d,disallowTypeAhead:A,linkBehavior:p="action",keyboardNavigationBehavior:M="arrow",escapeKeyBehavior:k="clearSelection",shouldSelectOnPressUp:S}=o;!o["aria-label"]&&!o["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let{listProps:L}=a({selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,ref:e,keyboardDelegate:a$3,layoutDelegate:s,isVirtualized:n,selectOnFocus:t.selectionManager.selectionBehavior==="replace",shouldFocusWrap:o.shouldFocusWrap,linkBehavior:p,disallowTypeAhead:A,autoFocus:o.autoFocus,escapeKeyBehavior:k,UNSTABLE_focusOnEntry:o.UNSTABLE_focusOnEntry}),v=c(o.id);w.set(t,{id:v,onAction:d,linkBehavior:p,keyboardNavigationBehavior:M,shouldSelectOnPressUp:S});let m=c$1({selectionManager:t.selectionManager,hasItemActions:!!d}),T=a$1(e,{isDisabled:t.collection.size!==0}),D=a$2(o,{labelable:true}),E=c$2(D,{role:"grid",id:v,"aria-multiselectable":t.selectionManager.selectionMode==="multiple"?"true":void 0},t.collection.size===0?{tabIndex:T?-1:0}:L,m);return n&&(E["aria-rowcount"]=t.collection.size,E["aria-colcount"]=1),b({},t),{gridProps:E}}var Y={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function He(o,t,e$3){let{node:n,isVirtualized:a}=o,{direction:s}=b$1(),{onAction:d$2,linkBehavior:A,keyboardNavigationBehavior:p$1,shouldSelectOnPressUp:M}=w.get(t),k=e(),S=useRef(null),L=()=>{e$3.current!==null&&(S.current!=null&&n.key!==S.current||!i(e$3.current))&&i$1(e$3.current);},v={},m=o.hasChildItems,T=t.selectionManager.isLink(n.key);if(n!=null&&"expandedKeys"in t){let r=t.collection.getChildren?.(n.key);m=m||[...r??[]].length>1,d$2==null&&!T&&t.selectionManager.selectionMode==="none"&&m&&(d$2=()=>t.toggleKey(n.key));let l=m?t.expandedKeys.has(n.key):void 0,i=1,u=n.index;if(n.level>=0&&n?.parentKey!=null){let c=t.collection.getItem(n.parentKey);if(c){let I=de(c,t.collection);i=[...I].filter(se=>se.type==="item").length,u>0&&I[0].type!=="item"&&(u-=1);}}else i=[...t.collection].filter(c=>c.level===0&&c.type==="item").length;v={"aria-expanded":l,"aria-level":n.level+1,"aria-posinset":u+1,"aria-setsize":i};}let{itemProps:D,...E}=d({selectionManager:t.selectionManager,key:n.key,ref:e$3,isVirtualized:a,shouldSelectOnPressUp:o.shouldSelectOnPressUp||M,onAction:d$2||n.props?.onAction?a$3(n.props?.onAction,d$2?()=>d$2(n.key):void 0):void 0,focus:L,linkBehavior:A}),Z=r=>{let l=f(a$4(e$3.current));if(!e$1(r.currentTarget,g(r))||!e$3.current||!l)return;let i=d$1(e$3.current);if(i.currentNode=l,!J(r,t,n,m,s,l,e$3.current))switch(r.key){case "ArrowLeft":{if(p$1==="arrow"){let u=s==="rtl"?i.nextNode():i.previousNode();if(u)r.preventDefault(),r.stopPropagation(),i$1(u),e$2(u,{containingElement:b$2(e$3.current)});else if(r.preventDefault(),r.stopPropagation(),s==="rtl")i$1(e$3.current),e$2(e$3.current,{containingElement:b$2(e$3.current)});else {i.currentNode=e$3.current;let c=Q(i);c&&(i$1(c),e$2(c,{containingElement:b$2(e$3.current)}));}}break}case "ArrowRight":{if(p$1==="arrow"){let u=s==="rtl"?i.previousNode():i.nextNode();if(u)r.preventDefault(),r.stopPropagation(),i$1(u),e$2(u,{containingElement:b$2(e$3.current)});else if(r.preventDefault(),r.stopPropagation(),s==="ltr")i$1(e$3.current),e$2(e$3.current,{containingElement:b$2(e$3.current)});else {i.currentNode=e$3.current;let c=Q(i);c&&(i$1(c),e$2(c,{containingElement:b$2(e$3.current)}));}}break}case "ArrowUp":case "ArrowDown":!r.altKey&&e$1(e$3.current,g(r))&&(r.stopPropagation(),r.preventDefault(),e$3.current.parentElement?.dispatchEvent(new KeyboardEvent(r.nativeEvent.type,r.nativeEvent)));break}},ee=r=>{if(S.current=n.key,g(r)!==e$3.current){b$3()||t.selectionManager.setFocusedKey(n.key);return}},te=r=>{let l=f(a$4(e$3.current));if(!(!e$1(r.currentTarget,g(r))||!e$3.current||!l)){if(p$1==="tab"){if(g(r)!==e$3.current&&r.key!=="Tab"){r.stopPropagation();return}if(J(r,t,n,m,s,l,e$3.current))return}switch(r.key){case "Tab":if(p$1==="tab"){let i=d$1(e$3.current,{tabbable:true});i.currentNode=l,(r.shiftKey?i.previousNode():i.nextNode())&&r.stopPropagation();}}}},re=p(n.props),ne=E.hasAction?re:{},y=c$2(D,ne,{role:"row",onKeyDownCapture:p$1==="arrow"?Z:void 0,onFocus:ee,"aria-label":n["aria-label"]||n.textValue||void 0,"aria-selected":t.selectionManager.canSelectItem(n.key)?t.selectionManager.isSelected(n.key):void 0,"aria-disabled":t.selectionManager.isDisabled(n.key)||void 0,"aria-labelledby":k&&(n["aria-label"]||n.textValue)?`${N(t,n.key)} ${k}`:void 0,id:N(t,n.key)}),oe=y.onKeyDown;y.onKeyDown=r=>{te(r),r.isPropagationStopped()||oe?.(r);};let ie=y.onPointerDown;y.onPointerDown=r=>{let l=g(r);if(l&&l!==e$3.current&&c$3(l)){r.stopPropagation();return}ie?.(r);};let le=y.onMouseDown;if(y.onMouseDown=r=>{let l=g(r);if(l&&l!==e$3.current&&c$3(l)){r.stopPropagation();return}le?.(r);},a){let{collection:r}=t,l=[...r];y["aria-rowindex"]=l.find(i=>i.type==="section")?[...r.getKeys()].filter(i=>r.getItem(i)?.type!=="section").findIndex(i=>i===n.key)+1:n.index+1;}let ae={role:"gridcell","aria-colindex":1};return {rowProps:{...c$2(y,v)},gridCellProps:ae,descriptionProps:{id:k},...E}}function J(o,t,e,n,a,s,d){if(!("expandedKeys"in t)||s!==d)return false;if(o.key===Y.expand[a]&&t.selectionManager.focusedKey===e.key&&n&&!t.expandedKeys.has(e.key))return t.toggleKey(e.key),o.stopPropagation(),true;if(o.key===Y.collapse[a]&&t.selectionManager.focusedKey===e.key){if(n&&t.expandedKeys.has(e.key))return t.toggleKey(e.key),o.stopPropagation(),true;if(!t.expandedKeys.has(e.key)&&e.parentKey&&t.collection.getItem(e.parentKey)?.type==="item")return t.selectionManager.setFocusedKey(e.parentKey),o.stopPropagation(),true}return false}function Q(o){let t=null,e=null;do e=o.lastChild(),e&&(t=e);while(e);return t}function de(o,t){let e=t.getChildren?.(o.key),n=e?Array.from(e):[],a=n.length>0?n[0]:null,s=[];for(;a;)s.push(a),a=a.nextKey!=null?t.getItem(a.nextKey):null;return s}export{N as a,Se as b,He as c};
|
package/dist/chunk-UT2I4K7L.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {b as b$1}from'./chunk-TCCQDGMI.mjs';import {a as a$1}from'./chunk-2UUKKXBD.mjs';import {a}from'./chunk-ZGRRD3TU.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import {MotionConfig,MotionGlobalConfig}from'motion/react';export{MotionGlobalConfig as f}from'motion/react';import {lightTheme,themes,themeVars}from'@baseline-ui/tokens';import {assignInlineVars}from'@vanilla-extract/dynamic';import J,{createContext,useMemo,useEffect,useState}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
|
-
function v(r=typeof window>"u"?void 0:window){let[f,s]=useState("light"),[i,a]=useState(false),[u,n]=useState(false),[p,m]=useState(false);return useEffect(()=>{if(!r)return;let e=r.matchMedia("(prefers-color-scheme: dark)"),t=o=>{s(o.matches?"dark":"light");};return e.matches&&s("dark"),e.addEventListener("change",t),()=>{e.removeEventListener("change",t);}},[r]),useEffect(()=>{if(!r)return;let e=r.matchMedia("(prefers-contrast: more)"),t=o=>{a(o.matches);};return a(e.matches),e.addEventListener("change",t),()=>{e.removeEventListener("change",t);}},[r]),useEffect(()=>{if(!r)return;let e=r.matchMedia("(prefers-reduced-motion: reduce)"),t=o=>{n(o.matches);};return e.matches&&n(true),e.addEventListener("change",t),()=>{e.removeEventListener("change",t);}},[r]),useEffect(()=>{if(!r)return;let e=r.matchMedia("(prefers-reduced-transparency: reduce)"),t=o=>{m(o.matches);};return e.matches&&m(true),e.addEventListener("change",t),()=>{e.removeEventListener("change",t);}},[r]),{colorScheme:f,highContrast:i,reducedMotion:u,transparency:p}}var k=createContext({theme:lightTheme,setTheme:()=>{},shouldHandleVirtualKeyboard:true});var A="var(--hj25q10)";var h={LIGHT:themes.base.light,DARK:themes.base.dark},R=J.forwardRef(({theme:r="system",children:f,setTheme:s,onThemeChange:i,className:a$3,style:u,UNSAFE_domProps:n,"data-block-id":p,"data-block-class":m,reducedMotion:e="user",shouldHandleVirtualKeyboard:t=true,minTouchTargetSize:o=24},U)=>{let{direction:P}=b(),{colorScheme:g,reducedMotion:V,highContrast:D,transparency:G}=v(),{name:K,...l}=useMemo(()=>{switch(r){case "system":return g==="light"?h.LIGHT:h.DARK;case "light":return h.LIGHT;case "dark":return h.DARK;default:return r}},[g,r]),N=a(),z={"data-theme":K,"data-block-id":p,"data-block-class":m,"data-reduced-motion":e==="user"?V:e==="always","data-high-contrast":D,"data-transparency":G,"data-device":N},B=useMemo(()=>({theme:l,setTheme:y=>{s?.(y),i?.(y);},shouldHandleVirtualKeyboard:t}),[l,s,i,t]);return useEffect(()=>{s&&console.warn("ThemeProvider: The `setTheme` prop is deprecated and will be removed in a future version of Baseline UI. Use the `onThemeChange` prop instead.");},[s]),jsx(k.Provider,{value:B,children:jsx(MotionConfig,{reducedMotion:e,children:jsx("div",{...c(n,z),className:a$2(b$1,"BaselineUI-ThemeProvider",a$3),style:{...assignInlineVars(themeVars,l),...assignInlineVars({[a$1]:P==="rtl"?"-1":"1",[A]:`${o}px`}),...u},dir:P,ref:U,children:f})})})});R.displayName="ThemeProvider";function ve(){MotionGlobalConfig.skipAnimations=true;}function Te(){MotionGlobalConfig.skipAnimations=false;}export{v as a,k as b,R as c,ve as d,Te as e};
|
package/dist/chunk-V3L4SVVF.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {c}from'./chunk-WWSGOGLA.mjs';import {a as a$1}from'./chunk-KUEDQO7P.mjs';import {b as b$1}from'./chunk-WL27JGVG.mjs';import {b as b$2}from'./chunk-4ZJMZB5B.mjs';import {a as a$3}from'./chunk-D3IZ4HBL.mjs';import {a as a$2}from'./chunk-JDLUGVXG.mjs';import {a}from'./chunk-AUOQSTS5.mjs';import {b}from'./chunk-RMUV6NJJ.mjs';import O,{createContext,useState,useMemo,useContext}from'react';import L from'react-dom';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 g=createContext({});function x(){return useContext(g)??{}}var v=O.createContext(null);function N(e){let t=b(),{portalContainer:s=t?null:a(null).body,isExiting:r}=e,[o,n]=useState(false),y=useMemo(()=>({contain:o,setContain:n}),[o,n]),{getContainer:m}=x();if(!e.portalContainer&&m&&(s=m()),!s)return null;let i=e.children;return e.disableFocusManagement||(i=jsx(a$1,{restoreFocus:true,contain:(e.shouldContainFocus||o)&&!r,ownerDocument:a(s),children:i})),i=jsx(v.Provider,{value:y,children:jsx(c,{children:i})}),L.createPortal(i,s)}function W(){let t=useContext(v)?.setContain;a$2(()=>{t?.(true);},[t]);}var R={"ar-AE":{dismiss:"\u062A\u062C\u0627\u0647\u0644"},"bg-BG":{dismiss:"\u041E\u0442\u0445\u0432\u044A\u0440\u043B\u044F\u043D\u0435"},"cs-CZ":{dismiss:"Odstranit"},"da-DK":{dismiss:"Luk"},"de-DE":{dismiss:"Schlie\xDFen"},"el-GR":{dismiss:"\u0391\u03C0\u03CC\u03C1\u03C1\u03B9\u03C8\u03B7"},"en-US":{dismiss:"Dismiss"},"es-ES":{dismiss:"Descartar"},"et-EE":{dismiss:"L\xF5peta"},"fi-FI":{dismiss:"Hylk\xE4\xE4"},"fr-FR":{dismiss:"Rejeter"},"he-IL":{dismiss:"\u05D4\u05EA\u05E2\u05DC\u05DD"},"hr-HR":{dismiss:"Odbaci"},"hu-HU":{dismiss:"Elutas\xEDt\xE1s"},"it-IT":{dismiss:"Ignora"},"ja-JP":{dismiss:"\u9589\u3058\u308B"},"ko-KR":{dismiss:"\uBB34\uC2DC"},"lt-LT":{dismiss:"Atmesti"},"lv-LV":{dismiss:"Ner\u0101d\u012Bt"},"nb-NO":{dismiss:"Lukk"},"nl-NL":{dismiss:"Negeren"},"pl-PL":{dismiss:"Zignoruj"},"pt-BR":{dismiss:"Descartar"},"pt-PT":{dismiss:"Dispensar"},"ro-RO":{dismiss:"Revocare"},"ru-RU":{dismiss:"\u041F\u0440\u043E\u043F\u0443\u0441\u0442\u0438\u0442\u044C"},"sk-SK":{dismiss:"Zru\u0161i\u0165"},"sl-SI":{dismiss:"Opusti"},"sr-SP":{dismiss:"Odbaci"},"sv-SE":{dismiss:"Avvisa"},"tr-TR":{dismiss:"Kapat"},"uk-UA":{dismiss:"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438"},"zh-CN":{dismiss:"\u53D6\u6D88"},"zh-TW":{dismiss:"\u95DC\u9589"}};function A(e){let{onDismiss:t,...s}=e,r=b$1(R,"@react-aria/overlays"),o=a$3(s,r.format("dismiss"));return jsx(b$2,{children:jsx("button",{...o,tabIndex:-1,onClick:()=>{t&&t();},style:{width:1,height:1}})})}export{A as a,N as b,W as c};
|