@baseline-ui/core 3.5.0 → 3.7.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.mjs +1 -1
- package/dist/ActionButton.mjs +1 -1
- package/dist/ActionGroup.mjs +1 -1
- package/dist/ActionIconButton.mjs +1 -1
- package/dist/Actionable.mjs +1 -1
- package/dist/AlertDialog.mjs +1 -1
- package/dist/AudioPlayer.mjs +1 -1
- package/dist/Box.mjs +1 -1
- package/dist/Breadcrumbs.css +10 -0
- package/dist/Breadcrumbs.mjs +1 -0
- 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.mjs +1 -1
- package/dist/ColorSwatch.mjs +1 -1
- package/dist/ColorSwatchPicker.mjs +1 -1
- package/dist/ComboBox.mjs +1 -1
- package/dist/DateField.css +1 -1
- package/dist/DateField.mjs +1 -1
- package/dist/Dialog.mjs +1 -1
- package/dist/Disclosure.mjs +1 -1
- package/dist/DomNodeRenderer.mjs +1 -1
- package/dist/Drawer.mjs +1 -1
- package/dist/Editor.css +1 -1
- package/dist/Editor.mjs +1 -1
- package/dist/FileInput.mjs +1 -1
- package/dist/FileList.mjs +1 -1
- package/dist/FileUploader.mjs +1 -1
- package/dist/FrameProvider.mjs +1 -1
- package/dist/FreehandCanvas.mjs +1 -1
- package/dist/GridList.mjs +1 -1
- package/dist/I18nProvider.mjs +1 -1
- package/dist/Icon.mjs +1 -1
- package/dist/ImageDropZone.mjs +1 -1
- package/dist/ImageGallery.mjs +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/Markdown.css +1 -1
- package/dist/Markdown.mjs +1 -1
- package/dist/Menu.mjs +1 -1
- package/dist/MessageFormat.mjs +1 -1
- package/dist/Modal.mjs +1 -1
- package/dist/NumberInput.mjs +1 -1
- package/dist/Pagination.mjs +1 -1
- package/dist/PointPicker.mjs +1 -1
- package/dist/Popover.mjs +1 -1
- package/dist/Portal.mjs +1 -1
- package/dist/Preview.mjs +1 -1
- package/dist/ProgressBar.mjs +1 -1
- package/dist/RadioGroup.mjs +1 -1
- package/dist/Reaction.mjs +1 -1
- package/dist/ScrollControlButton.mjs +1 -1
- package/dist/SearchInput.mjs +1 -1
- package/dist/Select.mjs +1 -1
- package/dist/Slider.mjs +1 -1
- package/dist/StatusCard.mjs +1 -1
- package/dist/Stepper.mjs +1 -1
- package/dist/Switch.css +1 -1
- package/dist/Switch.mjs +1 -1
- package/dist/Table.mjs +1 -1
- package/dist/Tabs.mjs +1 -1
- package/dist/Tag.mjs +1 -1
- package/dist/TagGroup.mjs +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.mjs +1 -1
- package/dist/ToggleButton.mjs +1 -1
- package/dist/ToggleIconButton.mjs +1 -1
- package/dist/Toolbar.mjs +1 -1
- package/dist/Tooltip.mjs +1 -1
- package/dist/TreeView.mjs +1 -1
- package/dist/UNSAFE_ListBox.mjs +1 -1
- package/dist/Virtualizer.mjs +1 -1
- package/dist/{chunk-UOWKAUCQ.mjs → chunk-23WMOYTQ.mjs} +2 -2
- package/dist/{chunk-7XLBV46W.mjs → chunk-2JRDTJWJ.mjs} +1 -1
- package/dist/chunk-3IPRT57V.mjs +10 -0
- package/dist/{chunk-O6FPWOHR.mjs → chunk-4QGZDJW4.mjs} +1 -1
- package/dist/{chunk-UO75BAPM.mjs → chunk-4Y4WKIL5.mjs} +1 -1
- package/dist/chunk-54ZKQAA3.mjs +10 -0
- package/dist/{chunk-GLAMJIYO.mjs → chunk-5EI2562M.mjs} +1 -1
- package/dist/{chunk-6GMU63H2.mjs → chunk-5GW36EQJ.mjs} +1 -1
- package/dist/{chunk-ZA2FH3MS.mjs → chunk-5ILCVLWY.mjs} +1 -1
- package/dist/{chunk-VXZT2JR2.mjs → chunk-5W6G3ZUT.mjs} +1 -1
- package/dist/{chunk-UYUYQFOW.mjs → chunk-5YKRWGEJ.mjs} +1 -1
- package/dist/{chunk-7BE6MOPW.mjs → chunk-6CEV43ZA.mjs} +2 -2
- package/dist/chunk-6DETJFO2.mjs +10 -0
- package/dist/chunk-6DYTFYPO.mjs +10 -0
- package/dist/{chunk-3DWFAHR2.mjs → chunk-6GV3YWV7.mjs} +1 -1
- package/dist/chunk-6TRBOQVN.mjs +10 -0
- package/dist/chunk-6Z3GYFG5.mjs +10 -0
- package/dist/chunk-73UBSCJ2.mjs +10 -0
- package/dist/{chunk-7XGNJE7J.mjs → chunk-7DCQF3EP.mjs} +1 -1
- package/dist/{chunk-MCN5JU6E.mjs → chunk-7YCV7MPI.mjs} +1 -1
- package/dist/{chunk-3M3WJHOI.mjs → chunk-AQTRFPF2.mjs} +1 -1
- package/dist/{chunk-HABKIEKC.mjs → chunk-B5VHU77N.mjs} +1 -1
- package/dist/{chunk-ONBEVR2G.mjs → chunk-BULEKXBD.mjs} +1 -1
- package/dist/chunk-CBV6KXGO.mjs +30 -0
- package/dist/chunk-CD5KKXIM.mjs +10 -0
- package/dist/{chunk-KW3BKIG4.mjs → chunk-DG5VNJOH.mjs} +1 -1
- package/dist/{chunk-O7XK2WIX.mjs → chunk-DIL5HL6K.mjs} +2 -2
- package/dist/{chunk-QWZBZ23U.mjs → chunk-EDMVODCD.mjs} +1 -1
- package/dist/{chunk-PYV5J322.mjs → chunk-EFFODO2N.mjs} +1 -1
- package/dist/{chunk-CTBCJZEG.mjs → chunk-EGYIHFEQ.mjs} +1 -1
- package/dist/{chunk-5VNC6UYE.mjs → chunk-F3THHK5C.mjs} +1 -1
- package/dist/chunk-F56P4EKI.mjs +10 -0
- package/dist/{chunk-NMK4W6K3.mjs → chunk-FJO6KCT5.mjs} +2 -2
- package/dist/{chunk-GL5GUKT7.mjs → chunk-FX3THTOK.mjs} +1 -1
- package/dist/{chunk-EL5OYHOX.mjs → chunk-G5MSZV5O.mjs} +2 -2
- package/dist/chunk-GJ6ZPLFR.mjs +10 -0
- package/dist/{chunk-JRCDMRIW.mjs → chunk-HTRO6BM5.mjs} +1 -1
- package/dist/{chunk-7MLFM55C.mjs → chunk-IDIZSV2Y.mjs} +1 -1
- package/dist/chunk-IGM72PUL.mjs +0 -0
- package/dist/{chunk-2M2LI4MI.mjs → chunk-IMXJCV7G.mjs} +1 -1
- package/dist/{chunk-43LOJ3SH.mjs → chunk-IN7BLI4M.mjs} +1 -1
- package/dist/{chunk-AFOW62QN.mjs → chunk-INFMXVHD.mjs} +1 -1
- package/dist/{chunk-5G6JNQQR.mjs → chunk-IVDIKT6F.mjs} +1 -1
- package/dist/{chunk-WFYFHANE.mjs → chunk-JHA7DIPG.mjs} +1 -1
- package/dist/{chunk-X5ZTXDQ4.mjs → chunk-JXCL5CUV.mjs} +1 -1
- package/dist/chunk-K3WFKO7R.mjs +10 -0
- package/dist/{chunk-TFSBTGTQ.mjs → chunk-KQOXSF4J.mjs} +1 -1
- package/dist/{chunk-LKSUUT3M.mjs → chunk-L45T2KGW.mjs} +1 -1
- package/dist/{chunk-7EQIV4GX.mjs → chunk-LDWNE2JT.mjs} +1 -1
- package/dist/{chunk-676DOXEK.mjs → chunk-LY2ZVEGJ.mjs} +2 -2
- package/dist/chunk-M3R4ZM34.mjs +10 -0
- package/dist/{chunk-USUPPN73.mjs → chunk-MJPCLLDU.mjs} +1 -1
- package/dist/{chunk-5W67PVZQ.mjs → chunk-MKHLBKSN.mjs} +2 -2
- package/dist/{chunk-LBHZV4BO.mjs → chunk-MURSKAKT.mjs} +1 -1
- package/dist/chunk-MYT5CSGX.mjs +10 -0
- package/dist/{chunk-2AKHB7Y5.mjs → chunk-NLVJYKSA.mjs} +1 -1
- package/dist/{chunk-5G7ABQYJ.mjs → chunk-NO3DNA2U.mjs} +1 -1
- package/dist/{chunk-DO5YROCG.mjs → chunk-NT2MFIKD.mjs} +1 -1
- package/dist/{chunk-7P7VZMTO.mjs → chunk-NWWH62TU.mjs} +1 -1
- package/dist/chunk-O6PPXOEX.mjs +10 -0
- package/dist/chunk-OBEPT4LR.mjs +10 -0
- package/dist/{chunk-DAI7V4TE.mjs → chunk-OPIPJTLG.mjs} +1 -1
- package/dist/{chunk-3KWSJRYK.mjs → chunk-P6V5EAYL.mjs} +1 -1
- package/dist/chunk-PCR5FD43.mjs +10 -0
- package/dist/{chunk-Z3ZMWJSV.mjs → chunk-PR3CD3UC.mjs} +2 -2
- package/dist/chunk-Q6R75IOP.mjs +10 -0
- package/dist/{chunk-6M7PJXEE.mjs → chunk-QIYZRQGP.mjs} +1 -1
- package/dist/{chunk-BAIVRB2I.mjs → chunk-QL7SC5BW.mjs} +1 -1
- package/dist/{chunk-X5ORCNAU.mjs → chunk-QUWRO3HT.mjs} +1 -1
- package/dist/{chunk-3UC5V5E3.mjs → chunk-RE7ZGPOY.mjs} +1 -1
- package/dist/chunk-RINS2TBF.mjs +10 -0
- package/dist/{chunk-SLFKSR3T.mjs → chunk-SAATXQOW.mjs} +1 -1
- package/dist/chunk-SSWWJZRE.mjs +10 -0
- package/dist/{chunk-D5VU5TED.mjs → chunk-SXZP556C.mjs} +1 -1
- package/dist/{chunk-2WA3KB7H.mjs → chunk-TDRN6VLD.mjs} +1 -1
- package/dist/{chunk-OWQRYRWF.mjs → chunk-TFBJ767L.mjs} +1 -1
- package/dist/{chunk-QXXKOFWM.mjs → chunk-TLU2GNUT.mjs} +1 -1
- package/dist/{chunk-GFKZXGWJ.mjs → chunk-UCDGZFQ7.mjs} +1 -1
- package/dist/{chunk-ABXTAFKP.mjs → chunk-UPCEZ32D.mjs} +1 -1
- package/dist/chunk-VE2UA2AH.mjs +0 -0
- package/dist/{chunk-JDIGAVFU.mjs → chunk-VIMSH5F5.mjs} +1 -1
- package/dist/chunk-VNWKXT3X.mjs +10 -0
- package/dist/chunk-VPVF5N62.mjs +10 -0
- package/dist/chunk-VQ2K6Q3G.mjs +10 -0
- package/dist/chunk-WDWBYTJG.mjs +10 -0
- package/dist/{chunk-LQHFBXCW.mjs → chunk-X3ACY7IY.mjs} +2 -2
- package/dist/chunk-XC2S3RLC.mjs +10 -0
- package/dist/{chunk-SI5WP6I7.mjs → chunk-XO7MAUFC.mjs} +1 -1
- package/dist/{chunk-AN26QORL.mjs → chunk-XVL2GXTB.mjs} +1 -1
- package/dist/{chunk-PLZ6ZFEO.mjs → chunk-YAI33K42.mjs} +1 -1
- package/dist/chunk-YEIRJNEA.mjs +10 -0
- package/dist/{chunk-LQ7PGSP4.mjs → chunk-YNJD34U4.mjs} +1 -1
- package/dist/{chunk-FGSVPRDN.mjs → chunk-YQKEP62C.mjs} +1 -1
- package/dist/{chunk-CENNHSIS.mjs → chunk-ZC5WXVNV.mjs} +1 -1
- package/dist/chunk-ZXN5VT4G.mjs +10 -0
- package/dist/{chunk-UPJHL37C.mjs → chunk-ZZ7YJ2FN.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/index.css +1 -1
- package/dist/index.d.ts +305 -95
- package/dist/index.js +22 -21
- package/dist/index.mjs +1 -1
- package/dist/messageIds.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/dist/utils/selection.mjs +1 -0
- package/intl/ar.json +2 -0
- package/intl/cs.json +2 -0
- package/intl/cy.json +2 -0
- package/intl/da.json +2 -0
- package/intl/de.json +2 -0
- package/intl/el.json +2 -0
- package/intl/en-GB.json +2 -0
- package/intl/en.json +2 -0
- package/intl/es.json +2 -0
- package/intl/fi.json +2 -0
- package/intl/fr-CA.json +2 -0
- package/intl/fr.json +2 -0
- package/intl/he.json +2 -0
- package/intl/hr.json +2 -0
- package/intl/id.json +2 -0
- package/intl/it.json +2 -0
- package/intl/ja.json +2 -0
- package/intl/ko.json +2 -0
- package/intl/ms.json +2 -0
- package/intl/nb-NO.json +2 -0
- package/intl/nl.json +2 -0
- package/intl/pl.json +2 -0
- package/intl/pt-PT.json +2 -0
- package/intl/pt.json +2 -0
- package/intl/ru.json +2 -0
- package/intl/sk.json +2 -0
- package/intl/sl.json +2 -0
- package/intl/sv.json +2 -0
- package/intl/th.json +2 -0
- package/intl/tr.json +2 -0
- package/intl/uk.json +2 -0
- package/intl/zh-Hans.json +2 -0
- package/intl/zh-Hant.json +2 -0
- package/messages.json +8 -0
- package/package.json +4 -4
- package/sbom.json +6 -6
- package/dist/chunk-335C37NB.mjs +0 -10
- package/dist/chunk-46RUOB4U.mjs +0 -29
- package/dist/chunk-AMVX34SS.mjs +0 -10
- package/dist/chunk-AYQN3OH2.mjs +0 -10
- package/dist/chunk-BET5GVGQ.mjs +0 -10
- package/dist/chunk-FNCHBVLF.mjs +0 -10
- package/dist/chunk-IHES52NR.mjs +0 -10
- package/dist/chunk-NMGKHMH3.mjs +0 -10
- package/dist/chunk-OMWMNUTI.mjs +0 -10
- package/dist/chunk-R6Q7UMQS.mjs +0 -10
- package/dist/chunk-SBGZCLF4.mjs +0 -10
- package/dist/chunk-T6J7G3YL.mjs +0 -10
- package/dist/chunk-TTVYMCU3.mjs +0 -10
- package/dist/chunk-UH6QIGD3.mjs +0 -10
- package/dist/chunk-UYAFH4CW.mjs +0 -10
- package/dist/chunk-X7CKWYUD.mjs +0 -10
- package/dist/chunk-XQC3DSTW.mjs +0 -10
- package/dist/chunk-Y3HXPORF.mjs +0 -10
- package/dist/chunk-YFBMCK5O.mjs +0 -10
- package/dist/chunk-YMYMFVW4.mjs +0 -10
- package/dist/chunk-YQHHE5AT.mjs +0 -10
- package/dist/chunk-YYU46XNM.mjs +0 -10
- /package/dist/{chunk-MAJ74VNE.mjs → chunk-HMAVZPRE.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-
|
|
1
|
+
import {a as a$2}from'./chunk-QL7SC5BW.mjs';import {d,c}from'./chunk-KCHAWPUN.mjs';import {d as d$2}from'./chunk-VPVF5N62.mjs';import {a as a$5}from'./chunk-FP5EWPOF.mjs';import {a as a$4}from'./chunk-2VOWBYNS.mjs';import {a as a$7}from'./chunk-X3ACY7IY.mjs';import {a as a$1}from'./chunk-BA5OA5DY.mjs';import {a as a$8}from'./chunk-BGQRLALS.mjs';import {b}from'./chunk-YDUKC7QS.mjs';import {h,g,f,e,a as a$9,c as c$3,d as d$1}from'./chunk-MBRNO6IW.mjs';import {c as c$2}from'./chunk-GQIS4QBN.mjs';import {a as a$a}from'./chunk-66CUIXA6.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {c as c$1}from'./chunk-3WKDIXCM.mjs';import {a as a$3}from'./chunk-ETM4MNG4.mjs';import {a as a$b,b as b$1}from'./chunk-SD43KVTU.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import be,{useContext,useMemo,useImperativeHandle,useState,useCallback,useEffect,useRef}from'react';import Be from'react-dom';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {assignInlineVars}from'@vanilla-extract/dynamic';import {motion}from'motion/react';import {themeVars}from'@baseline-ui/tokens';import {useGranularEffect}from'granular-hooks';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {j,e,h}from'./chunk-
|
|
1
|
+
import {j,e,h}from'./chunk-RINS2TBF.mjs';import {createContext}from'react';import {jsx}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {b as b$4,a as a$7,c as c$4}from'./chunk-GFBRKKX4.mjs';import {c,d,b as b$5,e as e$1,f as f$2}from'./chunk-NMSOOQB2.mjs';import {e,c as c$2,f as f$1}from'./chunk-JHA7DIPG.mjs';import {a as a$9}from'./chunk-TAT552A5.mjs';import {f,d as d$1}from'./chunk-XOS3JIQX.mjs';import {b as b$3}from'./chunk-XAM3AXXK.mjs';import {a as a$1,c as c$3,b as b$7}from'./chunk-L3SNGDBH.mjs';import {b as b$6}from'./chunk-DF2D7NE6.mjs';import {a as a$6,b as b$1}from'./chunk-KCHAWPUN.mjs';import {a as a$a}from'./chunk-JZXLV6JU.mjs';import {a as a$4}from'./chunk-DIL5HL6K.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {a}from'./chunk-66CUIXA6.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {a as a$8}from'./chunk-STMDFIUL.mjs';import {a as a$2}from'./chunk-B3EZOXNU.mjs';import {b,c as c$1}from'./chunk-3WKDIXCM.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import R,{useRef,createElement,useContext,useEffect}from'react';import {CheckmarkIcon}from'@baseline-ui/icons/24';import {jsxs,jsx,Fragment}from'react/jsx-runtime';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var O=R.forwardRef(({item:e,isDisabled:i,isFocusVisible:o,isSelected:r,liProps:n,showSelectedIcon:l,description:p,descriptionProps:S,labelProps:L,isFocused:y,isPressed:u,_state:c$2},s)=>{a(e.value&&a$1(e.value),"Item cannot be a section");let a$6=useRef(null),{icon:t,label:m}=e.value,{hoverProps:d$1,isHovered:g}=a$2({isDisabled:i},a$6),f=a$3({"data-selected":r,"data-disabled":i,"data-focused":y,"data-hovered":g,"data-pressed":u,"data-focus-visible":o,"data-selection-mode":c$2.selectionManager.selectionMode});return jsxs("li",{...c$1(n,d$1,f),className:a$5(d({isHovered:g,isFocused:o,isFirstChild:c$2.collection.getFirstKey()===e.key,isLastChild:c$2.collection.getLastKey()===e.key,isDisabled:i}),n.className,"BaselineUI-ListBox-Option"),style:n.style,ref:b(s,a$6),children:[jsxs(a$4,{display:"flex",alignItems:"center",gap:"lg",children:[l?jsx("span",{"aria-hidden":true,style:{height:24,width:24},children:r?jsx(CheckmarkIcon,{size:24}):null}):null,t?jsx(t,{size:24}):null,jsx("span",{...L,children:m})]}),p?jsx("span",{className:c({isDisabled:i}),...S,children:p}):null]})});O.displayName="DefaultListOption";var le=({item:e,children:i,state:o,dragState:r,elementRef:n,...l})=>{let{dragProps:p}=d$1({key:e.key},r,n);return jsxs(Fragment,{children:[jsx(c$4,{target:{type:"item",key:e.key,dropPosition:"before"},...l}),i(p),o.collection.getKeyAfter(e.key)==null&&jsx(c$4,{target:{type:"item",key:e.key,dropPosition:"after"},...l})]})};le.displayName="DraggableListOption";var C=R.forwardRef(({item:e$1,renderOption:i=(a,t,m)=>jsx(O,{item:a,liProps:t.optionProps,...t,ref:m}),showSelectedIcon:o,state:r,dragState:n,dropState:l,orientation:p,renderDropIndicator:S,dropIndicatorStyle:L,dropIndicatorClassName:y,optionStyle:u,optionClassName:c},s)=>{let a$2=R.useRef(null),t=e({key:e$1.key},r,a$2),{value:m}=e$1;a(m&&a$1(m),"ListSection should not be passed to ListOption");let d={isFocusVisible:t.isFocusVisible,isSelected:t.isSelected,isFocused:t.isFocused,isDisabled:t.isDisabled,isPressed:t.isPressed},g={style:b$1(u,m,d),className:a$6(c,m,d)};return n&&l?jsx(le,{orientation:p,state:r,item:e$1,dropState:l,dragState:n,elementRef:a$2,renderDropIndicator:S,dropIndicatorStyle:L,dropIndicatorClassName:y,children:f=>i(e$1,{...t,showSelectedIcon:o,_state:r,optionProps:{...c$1(t.optionProps,f),...g}},b(a$2,s))}):i(e$1,{...t,showSelectedIcon:o,_state:r,optionProps:{...t.optionProps,...g}},b(a$2,s))});C.displayName="Option";var me=({section:e,state:i,sectionClassName:o,sectionStyle:r,showSectionHeader:n,renderSectionHeader:l,withSectionHeaderPadding:p=false,...S})=>{let L=R.useRef(null),{itemProps:y,groupProps:u,headingProps:c}=f$1({heading:n?l?.(e,L)||e.rendered:void 0,"aria-label":e["aria-label"]}),s=i.collection.getChildren?.(e.key);a(s,"children must be defined");let{value:a$1}=e;a(a$1&&b$7(a$1),"section must be a ListSection");let t=typeof r=="function"?r(a$1):r,m=typeof o=="function"?o(a$1):o;return jsxs(Fragment,{children:[e.key===i.collection.getFirstKey()?null:jsx(a$a,{UNSAFE_omitRole:true}),jsxs("li",{...y,style:{...y.style,...t},className:a$5(f$2,m,"BaselineUI-ListBox-Section"),children:[e.rendered&&n?l?.(e,L,c)||jsx(a$4,{...c,className:a$5("BaselineUI-ListBox-SectionHeader",e$1),ref:L,paddingX:"lg",typography:"label.md.medium",color:"text.primary",paddingInlineStart:p?"5xl":"lg",paddingInlineEnd:"lg",children:e.rendered}):null,jsx("ul",{...u,children:[...s].map(d=>jsx(C,{item:d,state:i,...S},d.key))})]})]})};var He=R.createContext(null),T=R.forwardRef(({className:e,layout:i="stack",orientation:o="vertical",showSelectedIcon:r=true,style:n,renderOption:l,enableReorder:p=false,shouldSelectOnPressUp:S=false,"data-block-id":L,"data-block-class":y,renderDragPreview:u,onReorder:c,state:s,listBoxHandle:a,...t},m)=>{let d=R.useRef(null),{direction:g}=b$2(),f$1=R.useRef(null),{listBoxProps:Le}=c$2({...t,shouldSelectOnPressUp:p||S,keyboardDelegate:new b$3({collection:s.collection,ref:f$1,layout:i,orientation:o,direction:g,disabledKeys:s.disabledKeys})},s,f$1);b$4({handle:a},s,f$1);let{collectionProps:ye,dragState:ue,dropState:Se}=a$7({...t,onReorder:c,layout:i,orientation:o,enableReorder:p,preview:d},s,f$1),{isFocusVisible:ge,isFocused:xe,focusProps:Pe}=a$8(),Ie=a$3({"data-block-id":L,"data-block-class":y,"data-layout":i,"data-empty":s.collection.size===0,"data-focused":xe,"data-focus-visible":ge,"data-orientation":o});return a$9({ref:f$1,isDisabled:!p}),jsxs("ul",{...c$1(Le,Pe,Ie,ye),className:a$5(b$5,"BaselineUI-ListBox",e),style:n,ref:b(m,f$1),children:[[...s.collection].map(b=>{let E={key:b.key,state:s,dragState:ue,dropState:Se,renderOption:l,renderDropIndicator:t.renderDropIndicator,renderSectionHeader:t.renderSectionHeader,showSelectedIcon:r,orientation:o,dropIndicatorStyle:t.dropIndicatorStyle,dropIndicatorClassName:t.dropIndicatorClassName,optionStyle:t.optionStyle,optionClassName:t.optionClassName,sectionClassName:t.sectionClassName,sectionStyle:t.sectionStyle,showSectionHeader:t.showSectionHeader,withSectionHeaderPadding:t.withSectionHeaderPadding};return b.type==="section"?createElement(me,{...E,key:b.key,section:b}):createElement(C,{...E,key:b.key,item:b})}),u?jsx(f,{ref:d,children:u}):null]})});T.displayName="ListBoxCore";var de=R.forwardRef((e,i)=>{let o=c$3(),r=b$6({...e,children:o});return jsx(T,{...e,ref:i,state:r})});de.displayName="ListBoxStandalone";var fe=R.forwardRef((e,i)=>{let o=useContext(He);return useEffect(()=>{if(!e.items&&!o)throw new Error("ListBox: You must provide a `state` or `items` prop to render the listbox.")},[e.items,o]),o?jsx(T,{...e,ref:i,state:o}):jsx(de,{...e,ref:i})});fe.displayName="ListBox";export{O as a,He as b,fe as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {c as c$1,a as a$4,d,b as b$2,e}from'./chunk-X5Z54UUE.mjs';import {c as c$4,b as b$6}from'./chunk-MHAPHPNN.mjs';import {b as b$5}from'./chunk-XAM3AXXK.mjs';import {a as a$7}from'./chunk-CY6W27WG.mjs';import {b,c as c$2}from'./chunk-
|
|
1
|
+
import {c as c$1,a as a$4,d,b as b$2,e}from'./chunk-X5Z54UUE.mjs';import {c as c$4,b as b$6}from'./chunk-MHAPHPNN.mjs';import {b as b$5}from'./chunk-XAM3AXXK.mjs';import {a as a$7}from'./chunk-CY6W27WG.mjs';import {b,c as c$2}from'./chunk-IDIZSV2Y.mjs';import {a as a$5}from'./chunk-DIL5HL6K.mjs';import {b as b$3}from'./chunk-KG2EHFYA.mjs';import {b as b$4}from'./chunk-N2XGJKZG.mjs';import {d as d$1}from'./chunk-GQIS4QBN.mjs';import {a as a$2}from'./chunk-SGZWUG3H.mjs';import {a}from'./chunk-STMDFIUL.mjs';import {c as c$5}from'./chunk-HH4VLTF3.mjs';import {b as b$7}from'./chunk-4S4GGUSH.mjs';import {a as a$1}from'./chunk-B3EZOXNU.mjs';import {j,f}from'./chunk-KUDCYGII.mjs';import {q}from'./chunk-PPHSLODC.mjs';import {c,b as b$1}from'./chunk-3WKDIXCM.mjs';import {a as a$6}from'./chunk-SVIYLH7R.mjs';import {c as c$3}from'./chunk-ETM4MNG4.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import {XIcon as XIcon$1}from'@baseline-ui/icons/8';import {CheckmarkIcon as CheckmarkIcon$1,XIcon}from'@baseline-ui/icons/12';import {CheckmarkIcon}from'@baseline-ui/icons/16';import T,{useState,useRef,useEffect}from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$1,r,d}from'./chunk-
|
|
1
|
+
import {a as a$1,r,d}from'./chunk-3IPRT57V.mjs';import {i,l}from'./chunk-6Z3GYFG5.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {createElement,useMemo}from'react';import {jsx}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$c}from'./chunk-5BAHJXOI.mjs';import {a as a$b}from'./chunk-YF63IQQR.mjs';import {a as a$2}from'./chunk-CY6W27WG.mjs';import {a as a$4}from'./chunk-6QQEK5I6.mjs';import {d as d$1}from'./chunk-W6QO7FPZ.mjs';import {a as a$9}from'./chunk-
|
|
1
|
+
import {a as a$c}from'./chunk-5BAHJXOI.mjs';import {a as a$b}from'./chunk-YF63IQQR.mjs';import {a as a$2}from'./chunk-CY6W27WG.mjs';import {a as a$4}from'./chunk-6QQEK5I6.mjs';import {d as d$1}from'./chunk-W6QO7FPZ.mjs';import {a as a$9}from'./chunk-DIL5HL6K.mjs';import {a as a$7,b as b$4}from'./chunk-XMGPNXZH.mjs';import {e,d as d$3}from'./chunk-GMALMQWI.mjs';import {a as a$a}from'./chunk-CV6JQGJ3.mjs';import {b as b$1,a as a$h}from'./chunk-KG2EHFYA.mjs';import {a,b as b$3}from'./chunk-YHI2PD3M.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {d,f,b as b$5}from'./chunk-GQIS4QBN.mjs';import {a as a$g}from'./chunk-Y2MIU76N.mjs';import {a as a$e}from'./chunk-AI6WQPRX.mjs';import {a as a$6}from'./chunk-FPM5UJRF.mjs';import {a as a$3}from'./chunk-4QBHQCCK.mjs';import {a as a$8}from'./chunk-STMDFIUL.mjs';import {b}from'./chunk-4S4GGUSH.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {d as d$2}from'./chunk-F7WPMQ3P.mjs';import {h as h$1}from'./chunk-PPHSLODC.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {a as a$5}from'./chunk-SVIYLH7R.mjs';import {a as a$f,c as c$1}from'./chunk-ETM4MNG4.mjs';import {j as j$1,a as a$d,h,i}from'./chunk-SD43KVTU.mjs';import {a as a$1}from'./chunk-JQQGRJ5J.mjs';import pa,{useRef,useMemo,useEffect,useState}from'react';import {DateFormatter,isEqualCalendar,toCalendar,GregorianCalendar,CalendarDate,now,getLocalTimeZone,toCalendarDate,toCalendarDateTime}from'@internationalized/date';import {jsx}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$3}from'./chunk-GCBMNOA6.mjs';import {a as a$5}from'./chunk-FP5EWPOF.mjs';import {a as a$4}from'./chunk-2VOWBYNS.mjs';import {a as a$2}from'./chunk-
|
|
1
|
+
import {a as a$3}from'./chunk-GCBMNOA6.mjs';import {a as a$5}from'./chunk-FP5EWPOF.mjs';import {a as a$4}from'./chunk-2VOWBYNS.mjs';import {a as a$2}from'./chunk-B5VHU77N.mjs';import {a as a$8}from'./chunk-X3ACY7IY.mjs';import {a as a$6}from'./chunk-BA5OA5DY.mjs';import {b}from'./chunk-I7LPPUZS.mjs';import {a as a$7}from'./chunk-5IC46G5J.mjs';import {a as a$b}from'./chunk-22VRCVTH.mjs';import {b as b$2,c as c$2}from'./chunk-HH4VLTF3.mjs';import {a as a$a}from'./chunk-B3EZOXNU.mjs';import {c as c$3,b as b$3}from'./chunk-KUDCYGII.mjs';import {c,b as b$1}from'./chunk-3WKDIXCM.mjs';import {a as a$9}from'./chunk-SVIYLH7R.mjs';import {a as a$1,c as c$1}from'./chunk-ETM4MNG4.mjs';import {a as a$c}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import A,{useRef,useEffect,useState,useMemo}from'react';import {motion}from'motion/react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$4}from'./chunk-
|
|
1
|
+
import {a as a$4}from'./chunk-FX3THTOK.mjs';import {a as a$2}from'./chunk-2MS356Q7.mjs';import {b}from'./chunk-SZTFMBPY.mjs';import {e,f,d,h,g}from'./chunk-PG3WDHSK.mjs';import {b as b$1}from'./chunk-INFMXVHD.mjs';import {a as a$5}from'./chunk-DIL5HL6K.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {a as a$1}from'./chunk-STMDFIUL.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import j from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a}from'./chunk-OVJT5F2R.mjs';import {e}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-OVJT5F2R.mjs';import {e}from'./chunk-3IPRT57V.mjs';import {c}from'./chunk-6DYTFYPO.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import {jsx}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -7,4 +7,4 @@ import {a}from'./chunk-OVJT5F2R.mjs';import {e}from'./chunk-OMWMNUTI.mjs';import
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
function s(a$2){return a({getItems:(o,r)=>r.map(i=>({"text/plain":i.label})),renderDropIndicator(o){return jsx(
|
|
10
|
+
function s(a$2){return a({getItems:(o,r)=>r.map(i=>({"text/plain":i.label})),renderDropIndicator(o){return jsx(c,{target:o,className:({isDropTarget:r})=>a$1(e({isDropTarget:r}),"BaselineUI-DropIndicator")})},...a$2})}export{s as a};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a as a$5}from'./chunk-TDYBXLYP.mjs';import {a}from'./chunk-Q6R75IOP.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {a as a$1}from'./chunk-STMDFIUL.mjs';import {a as a$2}from'./chunk-B3EZOXNU.mjs';import {b,c}from'./chunk-3WKDIXCM.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import p 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 u=p.forwardRef(({className:b$1,style:L,children:P,variant:y="default",size:R="md",elementType:s="a",type:v="body","data-block-id":D,"data-block-class":E,title:H,role:T,...e},g)=>{let o=p.useRef(null),{linkProps:h,isPressed:i}=a({...e,elementType:e.onPress?"span":s},o),{isFocusVisible:t,isFocused:F,focusProps:N}=a$1(),{hoverProps:x,isHovered:a$6}=a$2({isDisabled:e.isDisabled}),A=s,M=a$3({"data-block-id":D,"data-block-class":E,"data-disabled":e.isDisabled,"data-focused":F,"data-pressed":i,"data-focus-visible":t,"data-hovered":a$6,role:T,title:H});return jsx(A,{...c(h,N,x,M),className:a$4(a$5({variant:y,isFocusVisible:t,isHovered:a$6,isDisabled:e.isDisabled,size:R,isActive:i,type:v}),"BaselineUI-Link",b$1),ref:b(o,g),style:L,children:P})});u.displayName="Link";export{u as a};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {c,h,e}from'./chunk-RINS2TBF.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {a as a$1}from'./chunk-ETM4MNG4.mjs';import {createContext,forwardRef,useContext,useState,useCallback,useMemo,useRef}from'react';import {jsx,Fragment}from'react/jsx-runtime';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
|
+
var se=createContext({}),X=createContext(null),j=forwardRef(function(n,e){let{render:o}=useContext(X);return jsx(Fragment,{children:o(n,e)})});function de(i,n){let e=i?.renderDropIndicator,o=i?.isVirtualDragging?.(),t=useCallback(r=>{if(o||n?.isDropTarget(r))return e?e(r):jsx(j,{target:r})},[n?.target,o,e]);return i?.useDropIndicator?t:void 0}function ce(i,n,e){let o=i.focusedKey,t=null;if(n?.isVirtualDragging?.()&&e?.target?.type==="item"&&(t=e.target.key,e.target.dropPosition==="after")){let r=e.collection.getKeyAfter(t),u=null;if(r!=null){let s=e.collection.getItem(t)?.level??0;for(;r!=null;){let d=e.collection.getItem(r);if(!d)break;if(d.type!=="item"){r=e.collection.getKeyAfter(r);continue}if((d.level??0)<=s)break;u=r,r=e.collection.getKeyAfter(r);}}t=r??u??t;}return useMemo(()=>new Set([o,t].filter(r=>r!=null)),[o,t])}function pe(i,n,e){if(n?.pointerDragSource!=="handle")return {itemProps:i?.dragProps,dragButtonProps:{...i?.dragButtonProps,style:{pointerEvents:"none"}}};let{draggable:o,onDragStart:t,onDrag:r,onDragEnd:u}=i?.dragProps??{};return {itemProps:void 0,dragButtonProps:{...i?.dragButtonProps,draggable:o,onDrag:r,onDragEnd:u,onDragStart:t?s=>{t(s);let d=e.current;if(!s.defaultPrevented&&!n.renderDragPreview&&d){let D=d.getBoundingClientRect();s.dataTransfer.setDragImage(d,s.clientX-D.x,s.clientY-D.y);}}:void 0}}}var H=createContext(null);function Ce(i){let n=useRef({});return jsx(H.Provider,{value:n,children:i.children})}var L=forwardRef(function(n,e){let{name:o,isVisible:t=true,children:r,className:u,style:s,render:d,...D}=n,[m,c$1]=useState(t?"visible":"hidden"),S=useContext(H);if(!S)throw new Error("<SharedElement> must be rendered inside a <SharedElementTransition>");t&&m==="hidden"&&c$1("visible"),e=a(e),a$1(()=>{let a=e.current,g=S.current,P=g?.[o],f=null;if(a&&t&&P){c$1("visible");let p=a.getAnimations(),R=P.style.map(([l,x])=>{let B=a.style[l];if(l==="translate"){let y=P.rect,E=a.getBoundingClientRect(),F=y.left-E?.left,V=y.top-E?.top;a.style.translate=`${F}px ${V}px`;}else a.style[l]=x;return [l,B]});for(let l of a.getAnimations())p.includes(l)||l.cancel();f=requestAnimationFrame(()=>{f=null;for(let[l,x]of R)a.style[l]=x;}),delete g?.[o];}else a&&t&&!P?(queueMicrotask(()=>flushSync(()=>c$1("entering"))),f=requestAnimationFrame(()=>{f=null,c$1("visible");})):a&&!t&&queueMicrotask(()=>{g?.[o]?(delete g?.[o],flushSync(()=>c$1("exiting")),Promise.all(a.getAnimations().map(p=>p.finished)).then(()=>c$1("hidden")).catch(()=>{})):c$1("hidden");});return ()=>{if(f!=null&&cancelAnimationFrame(f),a&&a.isConnected&&!a.hasAttribute("data-exiting")){let p=window.getComputedStyle(a);if(p.transitionProperty!=="none"){let R=p.transitionProperty.split(/\s*,\s*/);g[o]={rect:a.getBoundingClientRect(),style:R.map(l=>[l,p[l]])};}}}},[e,S,o,t]);let N=c({children:r,className:u,style:s,render:d,values:{isEntering:m==="entering",isExiting:m==="exiting"}});return m==="hidden"?null:jsx(h.div,{...D,...N,ref:e,"data-entering":m==="entering"||void 0,"data-exiting":m==="exiting"||void 0})});var Z=createContext({isSelected:false});forwardRef(function(n,e$1){[n,e$1]=e(n,e$1,Z);let{isSelected:o,...t}=n;return jsx(L,{...t,ref:e$1,className:n.className||"react-aria-SelectionIndicator",name:"SelectionIndicator",isVisible:o})});export{se as a,X as b,j as c,de as d,ce as e,pe as f,Ce as g,Z as h};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-4Y4WKIL5.mjs';import {e}from'./chunk-RINS2TBF.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import x from'react';import {jsx}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a as a$2}from'./chunk-I7SMG6PT.mjs';import {i}from'./chunk-F3THHK5C.mjs';import {c as c$1,b as b$2,a as a$3}from'./chunk-GFBRKKX4.mjs';import {c,b as b$1}from'./chunk-MHAPHPNN.mjs';import {d,f as f$1}from'./chunk-XOS3JIQX.mjs';import {c as c$2}from'./chunk-L3SNGDBH.mjs';import {b}from'./chunk-DF2D7NE6.mjs';import {a as a$4}from'./chunk-66CUIXA6.mjs';import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {c as c$3}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import P 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
|
+
function O(e){return e&&(t=>{(t.key==="Enter"||t.key==="Escape")&&e(t);})}function f(e){return {...e,onKeyDown:O(e.onKeyDown),onKeyDownCapture:O(e.onKeyDownCapture)}}var A=a({defaultClassName:"byycd01 _1yep5z6d6 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6it _1yep5z6iu _1yep5z6iv",variantClassNames:{},defaultVariants:{},compoundVariants:[]});var G=P.forwardRef(({enableReorder:e,...t},r)=>e?jsx(j,{ref:r,...t}):jsx(k,{ref:r,...t}));G.displayName="GridListItem";var k=P.forwardRef(({item:e,state:t,dropState:r,renderGridItem:i,dragHandleProps:s,isEditing:p},u)=>{let a=a$1(u),d=c({node:e},t,a),g=t.selectionManager.selectionMode!=="none"&&t.selectionManager.selectionBehavior==="toggle",{checkboxProps:L}=a$2({key:e.key},t),l={...d,rowProps:p?f(d.rowProps):d.rowProps,checkBoxProps:g?L:void 0,dragHandleProps:s};return jsxs("div",{"data-grid-list-item-key":e.key,children:[r?jsx(c$1,{target:{type:"item",key:e.key,dropPosition:"before"},dropState:r}):null,i?i(e,l,a):null,r&&t.collection.getKeyAfter(e.key)==null?jsx(c$1,{target:{type:"item",key:e.key,dropPosition:"after"},dropState:r}):null]},e.key)});k.displayName="BaseGridListItem";var j=P.forwardRef(({dragState:e,item:t,...r},i)=>{let s=a$1(i),p=d({key:t.key,hasDragButton:true},e,s);return jsx(k,{item:t,dragHandleProps:p,ref:s,...r})});j.displayName="DraggableGridListItem";var V=P.forwardRef(({className:e,style:t,isEditing:r=false,"data-block-id":i$1,"data-block-class":s,gridListHandle:p,onReorder:u,enableReorder:a=false,layout:d="stack",orientation:g="vertical",renderGridItem:L,...l},F)=>{let q=c$2(),o=b({...l,children:q}),w=P.useRef(null),y=a$1(F),{gridProps:J}=b$1(l,o,y);b$2({handle:p,type:"gridlist"},o,y);let{collectionProps:Q,dragState:W,dropState:X}=a$3({...l,onReorder:u,enableReorder:a,layout:d,orientation:g,preview:w,getItems:n=>[...n].map(Z=>{let v=o.collection.getItem(Z);return a$4(v,"Expected item to be defined."),{key:v.key.toString()}})},o,y),D=c$3(J,Q),Y={state:o,dragState:W,dropState:X,enableReorder:a,renderGridItem:L,isEditing:r};return jsxs("ul",{...r?f(D):D,className:a$5("BaselineUI-GridList",e),"data-block-id":i$1,"data-block-class":s,style:t,ref:y,"aria-rowcount":o.collection.size,children:[[...o.collection].map(n=>jsx(G,{item:n,...Y},n.key)),a?jsx(f$1,{ref:w,children:n=>jsx(i,{items:n,containerClassName:".BaselineUI-GridList",previewClassName:A(),itemDataAttribute:"data-grid-list-item-key"})}):null]})});V.displayName="GridList";export{V as a};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {i}from'./chunk-RINS2TBF.mjs';import {a}from'./chunk-HH4VLTF3.mjs';import {b as b$1}from'./chunk-RMUV6NJJ.mjs';import V,{createContext,useRef,useCallback,useMemo,cloneElement,useContext,useState,forwardRef,isValidElement}from'react';import {createPortal}from'react-dom';import {useSyncExternalStore}from'use-sync-external-store/shim/index.js';import {jsxs,Fragment,jsx}from'react/jsx-runtime';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var h=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 l=this.clone();return t.addDescendants(l,e),l}},f=class extends h{filter(e,t,i){let[l,o]=F(e,t,this.firstChildKey,i),r=this.clone();return r.firstChildKey=l,r.lastChildKey=o,r}},E=class extends h{static type="header"},w=class extends h{static type="loader"},k=class extends f{static type="item";filter(e,t,i){if(i(this.textValue,this)){let l=this.clone();return t.addDescendants(l,e),l}return null}},D=class extends f{static type="section";filter(e,t,i){let l=super.filter(e,t,i);if(l&&l.lastChildKey!==null){let o=e.getItem(l.lastChildKey);if(o&&o.type!=="header")return l}return null}},m=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),l=i?.firstChildKey!=null?t.get(i.firstChildKey):null;for(;l;)yield l,l=l.nextKey!=null?t.get(l.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 l of i)this.addDescendants(l,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,l]=F(this,t,this.firstKey,e);return t?.commit(i,l),t}};function F(n,e,t,i){if(t==null)return [null,null];let l=null,o=null,r=n.getItem(t);for(;r!=null;){let s=r.filter(n,e,i);s!=null&&(s.nextKey=null,o&&(s.prevKey=o.key,o.nextKey=s.key),l==null&&(l=s),e.addNode(s),o=s),r=r.nextKey!=null?n.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 [l?.key??null,o?.key??null]}var b=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}},x=class n extends b{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 n?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 n?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 l=e.getMutableNode();l.colIndex=i;}}}setProps(e,t,i,l,o){let r,{value:s,textValue:d,id:u,...c}=e;if(this.node==null?(r=new i(u??`react-aria-${++this.ownerDocument.nodeId}`),this.node=r):r=this.getMutableNode(),c.ref=t,r.props=c,r.rendered=l,r.render=o,r.value=s,e["aria-label"]&&(r["aria-label"]=e["aria-label"]),r.textValue=d||(typeof c.children=="string"?c.children:"")||e["aria-label"]||"",u!=null&&u!==r.key)throw new Error("Cannot change the id of an item");c.colSpan!=null&&(r.colSpan=c.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 l=e.previousVisibleSibling,o=e.nextVisibleSibling;l&&e.ownerDocument.markDirty(l),o&&e.ownerDocument.markDirty(o),e.isHidden=i,e.ownerDocument.markDirty(e);}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}},T=class extends b{nodeType=11;ownerDocument=this;dirtyNodes=new Set;isSSR=false;nodeId=0;nodesByProps=new WeakMap;keyOwners=new Map;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 x(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;if(process.env.NODE_ENV!=="production"){let i=e.node.key,l=this.keyOwners.get(i);if(l&&l!==e)throw new Error(`Duplicate key "${String(i)}" found in collection. Every item in a collection must have a unique key.`);this.keyOwners.set(i,e);}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),process.env.NODE_ENV!=="production"&&this.keyOwners.get(e.node.key)===e&&this.keyOwners.delete(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 x&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof x?(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.queuedRender&&e(),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=false,this.firstChild=null,this.lastChild=null,this.nodeId=0,this.keyOwners.clear());}};function N(n){let{children:e,items:t,idScope:i,addIdAndValue:l,dependencies:o=[]}=n,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 d=[];for(let u of t){let c=X(u)?u:null,p=c?s.get(c):null;if(!p){p=e(u);let C=p.props.id??u?.key??u?.id;i!=null&&p.props.id==null&&C!=null&&(C=i+":"+C);let M=C??d.length;p=cloneElement(p,l?{key:M,id:C,value:u}:{key:M}),c&&s.set(c,p);}d.push(p);}return d}else if(typeof e!="function")return e},[e,t,s,i,l])}function X(n){switch(typeof n){case "object":return n!=null;case "function":case "symbol":return true;default:return false}}var H=createContext(false),S=createContext(null);function Z(n){if(useContext(S))return n.content;let{collection:t,document:i$1}=le(n.createCollection);return jsxs(Fragment,{children:[jsx(i,{children:jsx(S.Provider,{value:i$1,children:n.content})}),jsx(ee,{render:n.children,collection:t})]})}function ee({collection:n,render:e}){return e(n)}function te(n,e,t){let i=b$1(),l=useRef(i);l.current=i;let o=useCallback(()=>l.current?t():e(),[e,t]);return useSyncExternalStore(n,o)}var ne=typeof V.useSyncExternalStore=="function"?V.useSyncExternalStore:te;function le(n){let[e]=useState(()=>new T(n?.()||new m)),t=useCallback(r=>e.subscribe(r),[e]),i=useCallback(()=>{let r=e.getCollection();return e.isSSR&&e.resetAfterSSR(),r},[e]),l=useCallback(()=>(e.isSSR=true,e.getCollection()),[e]);return {collection:ne(t,i,l),document:e}}var P=createContext(null);function ie(n){return class extends h{static type=n}}function L(n,e,t,i,l,o){typeof n=="string"&&(n=ie(n));let r=useCallback(d=>{d?.setProps(e,t,n,i,o);},[e,t,i,o,n]),s=useContext(P);if(s){let d=s.ownerDocument.nodesByProps.get(e);return d||(d=s.ownerDocument.createElement(n.type),d.setProps(e,t,n,i,o),s.appendChild(d),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(e,d)),l?jsx(P.Provider,{value:d,children:l}):null}return jsx(n.type,{ref:r,children:l})}function oe(n,e){let t=({node:l})=>e(l.props,l.props.ref,l),i=forwardRef((l,o)=>{let r=useContext(a);if(!useContext(H)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(l,o)}return L(n,l,o,"children"in l?l.children:null,null,d=>jsx(a.Provider,{value:r,children:jsx(t,{node:d})}))});return i.displayName=e.name,i}function re(n,e,t=q){let i=({node:o})=>e(o.props,o.props.ref,o),l=forwardRef((o,r)=>{let s=t(o);return L(n,o,r,null,s,d=>jsx(i,{node:d}))??jsx(Fragment,{})});return l.displayName=e.name,l}function q(n){return N({...n,addIdAndValue:true})}var _=createContext(null);function se(n){let e=useContext(_),t=(e?.dependencies||[]).concat(n.dependencies),i=n.idScope??e?.idScope,l=q({...n,idScope:i,dependencies:t});return useContext(S)&&(l=jsx(de,{children:l})),e=useMemo(()=>({dependencies:t,idScope:i}),[i,...t]),jsx(_.Provider,{value:e,children:l})}function de({children:n}){let e=useContext(S),t=useMemo(()=>jsx(S.Provider,{value:null,children:jsx(H.Provider,{value:true,children:n})}),[n]);return b$1()?jsx(P.Provider,{value:e,children:t}):createPortal(t,e)}var lt=createContext(null);var he={CollectionRoot({collection:n,renderDropIndicator:e}){return W(n,null,e)},CollectionBranch({collection:n,parent:e,renderDropIndicator:t}){return W(n,e,t)}};function W(n,e,t){return N({items:e?n.getChildren(e.key):n,dependencies:[t],children(i){if(i.type==="content")return jsx(Fragment,{});let l=i.render(i);return !t||i.type!=="item"?l:jsxs(Fragment,{children:[t({type:"item",key:i.key,dropPosition:"before"}),l,ye(n,i,t)]})}})}function ye(n,e,t){let i=e.key,l=n.getKeyAfter(i),o=l!=null?n.getItem(l):null;for(;o!=null&&o.type!=="item";)l=n.getKeyAfter(o.key),o=l!=null?n.getItem(l):null;let r=e.nextKey!=null?n.getItem(e.nextKey):null;for(;r!=null&&r.type!=="item";)r=r.nextKey!=null?n.getItem(r.nextKey):null;let s=[];if(r==null){let d=e;for(;d?.type==="item"&&(!o||d.parentKey!==o.parentKey&&o.level<d.level);){let u=t({type:"item",key:d.key,dropPosition:"after"});isValidElement(u)&&s.push(cloneElement(u,{key:`${d.key}-after`})),d=d.parentKey!=null?n.getItem(d.parentKey):null;}}return s}var it=createContext(he);function ot(n){return useMemo(()=>n!=null?new Set([n]):null,[n])}export{h as a,f as b,E as c,w as d,k as e,D as f,m as g,N as h,Z as i,oe as j,re as k,se as l,lt as m,he as n,ye as o,it as p,ot as q};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a}from'./chunk-K3WFKO7R.mjs';import {d as d$1}from'./chunk-F7WPMQ3P.mjs';import {b,a as a$1}from'./chunk-SD43KVTU.mjs';import d,{useEffect}from'react';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
function E({ref:n,onSelectionChange:i,onSelectionEnd:S,isDisabled:t}){let o=d.useRef(null);d$1({ref:n,isDisabled:t,onPressEnd(){let e=a(n.current);e&&n.current?.contains(e.anchorNode)&&S?.(e);},onPressStart(){let e=b(n.current);o.current=e.getSelection(),o.current&&o.current.removeAllRanges();}}),useEffect(()=>{let e=n.current;if(!e||t)return;function l(){let c=a(e);c&&n.current?.contains(c.anchorNode)&&i(c);}let s=a$1(e);return s.addEventListener("selectionchange",l),()=>{s.removeEventListener("selectionchange",l);}},[n,i,t]);}export{E as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$5,b as b$3,e}from'./chunk-X5Z54UUE.mjs';import {a as a$1}from'./chunk-SGZWUG3H.mjs';import {a as a$4}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-STMDFIUL.mjs';import {
|
|
1
|
+
import {a as a$5,b as b$3,e}from'./chunk-X5Z54UUE.mjs';import {a as a$1}from'./chunk-SGZWUG3H.mjs';import {a as a$4}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-STMDFIUL.mjs';import {a as a$3}from'./chunk-B3EZOXNU.mjs';import {f}from'./chunk-KUDCYGII.mjs';import {b as b$2,c as c$1}from'./chunk-3WKDIXCM.mjs';import {a,b}from'./chunk-SD43KVTU.mjs';import {b as b$1}from'./chunk-RMUV6NJJ.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import {ArrowDownCircleFilledIcon}from'@baseline-ui/icons/16';import {AnimatePresence,motion}from'motion/react';import c,{useCallback,useEffect}from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {b}from'./chunk-Q5UMLFN3.mjs';import {a as a$9}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-Q5UMLFN3.mjs';import {a as a$9}from'./chunk-OPIPJTLG.mjs';import {a as a$4,b as b$1}from'./chunk-GMALMQWI.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {a as a$5}from'./chunk-66CUIXA6.mjs';import {a as a$3}from'./chunk-FPM5UJRF.mjs';import {a as a$6}from'./chunk-SGZWUG3H.mjs';import {a as a$7}from'./chunk-STMDFIUL.mjs';import {a as a$8}from'./chunk-B3EZOXNU.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {d}from'./chunk-F7WPMQ3P.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {c as c$1}from'./chunk-ETM4MNG4.mjs';import {i,a as a$1}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import H,{useContext,useEffect,useMemo,useState}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {AnimatePresence,motion}from'motion/react';import {ChevronRightIcon}from'@baseline-ui/icons/8';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,b as b$1,c as c$1,d}from'./chunk-
|
|
1
|
+
import {a,b as b$1,c as c$1,d}from'./chunk-5EI2562M.mjs';import {c}from'./chunk-L3SNGDBH.mjs';import {b}from'./chunk-DF2D7NE6.mjs';import {b as b$2}from'./chunk-3WKDIXCM.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import v,{useMemo}from'react';import {jsx}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -7,4 +7,4 @@ import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$2}from'./chunk-CU6D2EA6.mjs'
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var $=1e7;function xt(t,e,l){let o=st(e.body,l);return t==="left"?{...o,left:-$/2,width:$,totalWidth:$,scroll:{...o.scroll,left:0}}:{...o,top:-$/2,height:$,totalHeight:$,scroll:{...o.scroll,top:0}}}var B={top:"top",bottom:"top",left:"left",right:"left"},G={top:"bottom",bottom:"top",left:"right",right:"left"},Mt={top:"left",left:"top"},it={top:"height",left:"width"},Rt={width:"totalWidth",height:"totalHeight"},J={};function It(t){let e=b$1(t);return typeof e<"u"&&e.visualViewport?e.visualViewport:null}function st(t,e){let l=a(t),o=0,n=0,s=0,i=0,c=0,u=0,r={},m=(e?.scale??1)>1;if(t.tagName==="BODY"||t.tagName==="HTML"){let h=l.documentElement;s=h.clientWidth,i=h.clientHeight,o=e?.width??s,n=e?.height??i,r.top=h.scrollTop||t.scrollTop,r.left=h.scrollLeft||t.scrollLeft,e&&(c=Math.max(0,e.pageTop-(r.top??0)),u=Math.max(0,e.pageLeft-(r.left??0)));}else (({width:o,height:n,top:c,left:u}=Z(t,false))),r.top=t.scrollTop,r.left=t.scrollLeft,s=o,i=n;return j()&&(t.tagName==="BODY"||t.tagName==="HTML")&&m&&(r.top=0,r.left=0,c=e?.pageTop??0,u=e?.pageLeft??0),{width:o,height:n,totalWidth:s,totalHeight:i,scroll:r,top:c,left:u}}function vt(t){return {top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function Q(t,e,l,o,n,s,i){let c=n.scroll[t]??0,u=o[it[t]],r=i[t]+o.scroll[B[t]]+s,m=i[t]+o.scroll[B[t]]+u-s,h=e-c+o.scroll[B[t]]+i[t]-o[B[t]],d=e-c+l+o.scroll[B[t]]+i[t]-o[B[t]];return h<r?r-h:d>m?Math.max(m-d,r-h):0}function St(t){let l=b$1(t).getComputedStyle(t);return {top:parseInt(l.marginTop,10)||0,bottom:parseInt(l.marginBottom,10)||0,left:parseInt(l.marginLeft,10)||0,right:parseInt(l.marginRight,10)||0}}function rt(t){if(J[t])return J[t];let[e,l]=t.split(" "),o=B[e]||"right",n=Mt[o];B[l]||(l="center");let s=it[o],i=it[n];return J[t]={placement:e,crossPlacement:l,axis:o,crossAxis:n,size:s,crossSize:i},J[t]}function tt(t,e,l,o,n,s,i,c,u,r,m){let{placement:h,crossPlacement:d,axis:y,crossAxis:f,size:L,crossSize:w}=o,b={};b[f]=t[f]??0,d==="center"?b[f]+=((t[w]??0)-(l[w]??0))/2:d!==f&&(b[f]+=(t[w]??0)-(l[w]??0)),b[f]+=s;let E=t[f]-l[w]+u+r,C=t[f]+t[w]-u-r;if(b[f]=a$2(b[f],E,C),h===y){let D=c?m[L]:m[Rt[L]];b[G[y]]=Math.floor(D-t[y]+n);}else b[y]=Math.floor(t[y]+t[L]+n);return b}function zt(t,e,l,o,n,s,i,c,u,r,m){let h=(t.top!=null?t.top:u[Rt.height]-(t.bottom??0)-i)-(u.scroll.top??0),d=r?l.top:0,y={top:Math.max(e.top+d,(m?.offsetTop??e.top)+d),bottom:Math.min(e.top+e.height+d,(m?.offsetTop??0)+(m?.height??0))};return c!=="top"?Math.max(0,y.bottom-h-((n.top??0)+(n.bottom??0)+s)):Math.max(0,h+i-y.top-((n.top??0)+(n.bottom??0)+s))}function wt(t,e,l,o,n,s,i,c){let{placement:u,axis:r,size:m}=s;return u===r?Math.max(0,l[r]-(i.scroll[r]??0)-(t[r]+(c?e[r]:0))-(o[r]??0)-o[G[r]]-n):Math.max(0,t[m]+t[r]+(c?e[r]:0)-l[r]-l[m]+(i.scroll[r]??0)-(o[r]??0)-o[G[r]]-n)}function Ft(t,e,l,o,n,s,i,c,u,r,m,h,d,y,f,L,w,b,E,C,D,_){let a=rt(t),{size:A,crossAxis:p,crossSize:R,placement:M,crossPlacement:T}=a,P=tt(e,c,l,a,m,h,r,d,f,L,u),S=m,k=E?$:wt(c,r,e,n,s+m,a,u,w);if(i&&l[A]>k){let j=rt(`${G[M]} ${T}`),X=tt(e,c,l,j,m,h,r,d,f,L,u);wt(c,r,e,n,s+m,j,u,w)>k&&(a=j,P=X,S=m);}if(_==="anchor"&&C&&(a.placement==="top"||a.placement==="bottom")){let j=E?0:Q(p,P[p],l[R],c,u,s,r);if(j!==0){let X=a.crossPlacement==="center"?j>0?"left":"right":G[a.crossPlacement];if(X){let lt=rt(`${a.placement} ${X}`),pt=tt(e,c,l,lt,m,h,r,d,f,L,u),Ot=E?0:Q(p,pt[p],l[R],c,u,s,r);Math.abs(Ot)<Math.abs(j)&&(a=lt,P=pt);}}}let I="bottom";a.axis==="top"?a.placement==="top"?I="top":a.placement==="bottom"&&(I="bottom"):a.crossAxis==="top"&&(a.crossPlacement==="top"?I="bottom":a.crossPlacement==="bottom"&&(I="top"));let V=_==="anchor"&&C&&(a.placement==="top"||a.placement==="bottom")&&a.crossPlacement!=="center",z=V||E?0:Q(p,P[p],l[R],c,u,s,r);P[p]+=z;let x=E||!D?void 0:zt(P,c,r,d,n,s,l.height,I,u,w,b);y&&(x==null||y<x)&&(x=y),l.height=x!=null?Math.min(l.height,x):l.height,P=tt(e,c,l,a,S,h,r,d,f,L,u),z=V||E?0:Q(p,P[p],l[R],c,u,s,r),P[p]+=z;let v={},g=e[p]-P[p]-n[B[p]],H=g+.5*e[R],F=f/2+L,W=B[p]==="left"?(n.left??0)+(n.right??0):(n.top??0)+(n.bottom??0),N=l[R]-W-f/2-L,ot=e[p]+f/2-(P[p]+n[B[p]]),Ht=e[p]+e[R]-f/2-(P[p]+n[B[p]]),Lt=a$2(H,ot,Ht);v[p]=a$2(Lt,F,N),{placement:M,crossPlacement:T}=a,f?g=v[p]:T==="right"?g+=e[R]:T==="center"&&(g+=e[R]/2);let mt=M==="left"||M==="top"?l[A]:0,Ct={x:M==="top"||M==="bottom"?g:mt,y:M==="left"||M==="right"?g:mt};return {position:P,maxHeight:x,arrowOffsetLeft:v.left,arrowOffsetTop:v.top,placement:M,triggerAnchorPoint:Ct}}function Tt(t){let{placement:e,targetNode:l,overlayNode:o,scrollNode:n,padding:s,shouldFlip:i,boundaryElement:c,boundaryAxis:u="both",horizontalBoundaryBehavior:r="shift",offset:m,crossOffset:h$1,maxHeight:d,arrowSize:y=0,arrowBoundaryOffset:f=0,targetRect:L}=t,w=a(o),b=b$1(o),E=It(o),C=o instanceof b.HTMLElement?Bt(o):w.documentElement,D=C===w.documentElement,_=b.getComputedStyle(C).position,a$1=!!_&&_!=="static",A=D?Z(l,false,L):Et(l,C,false,L);if(!D){let{marginTop:F,marginLeft:W}=b.getComputedStyle(l);A.top+=parseInt(F,10)||0,A.left+=parseInt(W,10)||0;}let p=Z(o,true),R=St(o);p.width+=(R.left??0)+(R.right??0),p.height+=(R.top??0)+(R.bottom??0);let M=vt(n),T=c===null,P=c??w.body,S=!T&&u!=="vertical",k=!T&&u!=="horizontal",I=st(P,E),V=S?I:xt("left",w,E),z=k?I:xt("top",w,E),x={...z,left:V.left,width:V.width,totalWidth:V.totalWidth,scroll:{top:z.scroll.top,left:V.scroll.left}},v=st(C,E);a$1&&!D&&(x.top-=v.top,x.left-=v.left,v.top=0,v.left=0);let g=T?{top:0,left:0,width:0,height:0}:Et(P,C,false),H=!T&&h(P,C)&&C!==P;return Ft(e,A,p,M,R,s,i,x,v,g,m,h$1,a$1,d,y,f,H,E,T,S,k,r)}function et(t,e){let l=b$1(t),{top:o,left:n,width:s,height:i}=t.getBoundingClientRect();return e&&t instanceof l.HTMLElement&&(s=t.offsetWidth,i=t.offsetHeight),{top:o,left:n,width:s,height:i}}function Z(t,e,l){let o=a(t),{top:n,left:s,width:i,height:c}=l||et(t,e),{scrollTop:u,scrollLeft:r,clientTop:m,clientLeft:h}=o.documentElement;return {top:n+u-m,left:s+r-h,width:i,height:c}}function Et(t,e,l,o){let n=b$1(t),s=n.getComputedStyle(t),i;if(s.position==="fixed")i=o||et(t,l);else {i=Z(t,l,o);let c=Z(e,l),u=n.getComputedStyle(e);c.top+=(parseInt(u.borderTopWidth,10)||0)-e.scrollTop,c.left+=(parseInt(u.borderLeftWidth,10)||0)-e.scrollLeft,i.top-=c.top,i.left-=c.left;}return i.top-=parseInt(s.marginTop,10)||0,i.left-=parseInt(s.marginLeft,10)||0,i}function Bt(t){let e=a(t),l=b$1(t),o=t.offsetParent;if(o&&o===e.body&&l.getComputedStyle(o).position==="static"&&!At(o)&&(o=e.documentElement),o==null)for(o=t.parentElement;o&&!At(o);)o=o.parentElement;return o||e.documentElement}function At(t){let l=b$1(t).getComputedStyle(t);return l.transform!=="none"||/transform|perspective/.test(l.willChange)||l.filter!=="none"||l.contain==="paint"||"backdropFilter"in l&&l.backdropFilter!=="none"||"WebkitBackdropFilter"in l&&l.WebkitBackdropFilter!=="none"}function at(t){return typeof document>"u"?null:b$1(t).visualViewport??null}function oe(t){let{direction:e$2}=b(),{arrowSize:l$1,targetRef:o,overlayRef:n,arrowRef:s,scrollRef:i$1=n,placement:c="bottom",containerPadding:u=12,shouldFlip:r=true,boundaryElement:m,boundaryAxis:h$1="both",horizontalBoundaryBehavior:d="shift",offset:y=0,crossOffset:f=0,shouldUpdatePosition:L=true,shouldCloseOnScroll:w=true,isOpen:b$3=true,onClose:E,maxHeight:C,arrowBoundaryOffset:D=0,getTargetRect:_}=t,a$2=m??(typeof document<"u"?o.current?.ownerDocument.body??n.current?.ownerDocument.body??document.body:void 0),[A,p]=useState(null),R=[L,c,n.current,o.current,s?.current,i$1.current,u,r,a$2,h$1,d,y,f,b$3,e$2,C,D,l$1],M=useRef(at(n.current)?.scale);useEffect(()=>{b$3&&(M.current=at(n.current)?.scale);},[b$3,n]);let T=useCallback(()=>{if(L===false||!b$3||!n.current||!o.current||a$2===void 0||at(n.current)?.scale!==M.current)return;let z=a(n.current),x=i(z),v=b$1(z.body),g=null;if(i$1.current&&h(i$1.current,x)){let W=x?.getBoundingClientRect(),N=i$1.current.getBoundingClientRect();g={type:"top",offset:(W?.top??0)-N.top},g.offset>N.height/2&&(g.type="bottom",g.offset=(W?.bottom??0)-N.bottom);}let H=n.current;!C&&n.current&&(H.style.top="0px",H.style.bottom="",H.style.maxHeight=(v.visualViewport?.height??v.innerHeight)+"px");let F=Tt({placement:Vt(c,e$2),overlayNode:n.current,targetNode:o.current,scrollNode:i$1.current||n.current,padding:u,shouldFlip:r,boundaryElement:a$2,boundaryAxis:h$1,horizontalBoundaryBehavior:d,offset:y,crossOffset:f,maxHeight:C,arrowSize:l$1??(s?.current?et(s.current,true).width:0),arrowBoundaryOffset:D,targetRect:_?.(o.current)});if(F.position){if(H.style.top="",H.style.bottom="",H.style.left="",H.style.right="",Object.keys(F.position).forEach(W=>H.style[W]=F.position[W]+"px"),H.style.maxHeight=F.maxHeight!=null?F.maxHeight+"px":"",g&&x&&i$1.current){let W=x.getBoundingClientRect(),N=i$1.current.getBoundingClientRect(),ot=W[g.type]-N[g.type];i$1.current.scrollTop+=ot-g.offset;}p(F);}},R);a$1(T,R);let P=a$2?b$1(a$2):o.current?b$1(o.current):n.current?b$1(n.current):void 0;Dt(T,P);let S=useRef(null),k=useCallback(()=>{S.current!==null&&cancelAnimationFrame(S.current),S.current=requestAnimationFrame(()=>{S.current=null,T();});},[T]);useEffect(()=>()=>{S.current!==null&&cancelAnimationFrame(S.current);},[]),e({ref:n,onResize:k}),e({ref:o,onResize:k});let I=useRef(false);a$1(()=>{let z,x=()=>{I.current=true,clearTimeout(z),z=setTimeout(()=>{I.current=false;},500),T();},g=b$1(n.current).visualViewport,H=()=>{I.current&&x();};g?.addEventListener("resize",x),g?.addEventListener("scroll",H);let F=e$1(l(window),"scroll",H);return ()=>{g?.removeEventListener("resize",x),g?.removeEventListener("scroll",H),F();}},[T]);let V=useCallback(()=>{I.current||E?.();},[E,I]);return b$2({triggerRef:o,isOpen:b$3,onClose:w?E&&V:null}),{overlayProps:{style:{position:A?"absolute":"fixed",top:A?void 0:0,left:A?void 0:0,zIndex:1e5,...A?.position,maxHeight:A==null?"100vh":A.maxHeight!=null?`${A.maxHeight}px`:""}},placement:A?.placement??null,triggerAnchorPoint:A?.triggerAnchorPoint??null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:A?.arrowOffsetLeft,top:A?.arrowOffsetTop}},updatePosition:T}}function Dt(t,e=window){a$1(()=>(e?.addEventListener("resize",t,false),()=>{e?.removeEventListener("resize",t,false);}),[t,e]);}function Vt(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}export{oe as a};
|
|
10
|
+
var $=1e7;function xt(t,e,l){let o=st(e.body,l);return t==="left"?{...o,left:-$/2,width:$,totalWidth:$,scroll:{...o.scroll,left:0}}:{...o,top:-$/2,height:$,totalHeight:$,scroll:{...o.scroll,top:0}}}var B={top:"top",bottom:"top",left:"left",right:"left"},G={top:"bottom",bottom:"top",left:"right",right:"left"},Mt={top:"left",left:"top"},it={top:"height",left:"width"},Rt={width:"totalWidth",height:"totalHeight"},J={};function It(t){let e=b$1(t);return typeof e<"u"&&e.visualViewport?e.visualViewport:null}function st(t,e){let l=a(t),o=0,n=0,s=0,i=0,c=0,u=0,r={},m=(e?.scale??1)>1;if(t.tagName==="BODY"||t.tagName==="HTML"){let h=l.documentElement;s=h.clientWidth,i=h.clientHeight,o=e?.width??s,n=e?.height??i,r.top=h.scrollTop||t.scrollTop,r.left=h.scrollLeft||t.scrollLeft,e&&(c=Math.max(0,e.pageTop-(r.top??0)),u=Math.max(0,e.pageLeft-(r.left??0)));}else (({width:o,height:n,top:c,left:u}=Z(t,false))),r.top=t.scrollTop,r.left=t.scrollLeft,s=o,i=n;return j()&&(t.tagName==="BODY"||t.tagName==="HTML")&&m&&(r.top=0,r.left=0,c=e?.pageTop??0,u=e?.pageLeft??0),{width:o,height:n,totalWidth:s,totalHeight:i,scroll:r,top:c,left:u}}function vt(t){return {top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function Q(t,e,l,o,n,s,i){let c=n.scroll[t]??0,u=o[it[t]],r=i[t]+o.scroll[B[t]]+s,m=i[t]+o.scroll[B[t]]+u-s,h=e-c+o.scroll[B[t]]+i[t]-o[B[t]],d=e-c+l+o.scroll[B[t]]+i[t]-o[B[t]];return h<r?r-h:d>m?Math.max(m-d,r-h):0}function St(t){let l=b$1(t).getComputedStyle(t);return {top:parseInt(l.marginTop,10)||0,bottom:parseInt(l.marginBottom,10)||0,left:parseInt(l.marginLeft,10)||0,right:parseInt(l.marginRight,10)||0}}function rt(t){if(J[t])return J[t];let[e,l]=t.split(" "),o=B[e]||"right",n=Mt[o];B[l]||(l="center");let s=it[o],i=it[n];return J[t]={placement:e,crossPlacement:l,axis:o,crossAxis:n,size:s,crossSize:i},J[t]}function tt(t,e,l,o,n,s,i,c,u,r,m){let{placement:h,crossPlacement:d,axis:y,crossAxis:f,size:L,crossSize:w}=o,b={};b[f]=t[f]??0,d==="center"?b[f]+=((t[w]??0)-(l[w]??0))/2:d!==f&&(b[f]+=(t[w]??0)-(l[w]??0)),b[f]+=s;let E=t[f]-l[w]+u+r,C=t[f]+t[w]-u-r;if(b[f]=a$2(b[f],E,C),h===y){let D=c?m[L]:m[Rt[L]];b[G[y]]=Math.floor(D-t[y]+n);}else b[y]=Math.floor(t[y]+t[L]+n);return b}function zt(t,e,l,o,n,s,i,c,u,r,m){let h=(t.top!=null?t.top:u[Rt.height]-(t.bottom??0)-i)-(u.scroll.top??0),d=r?l.top:0,y={top:Math.max(e.top+d,(m?.offsetTop??e.top)+d),bottom:Math.min(e.top+e.height+d,(m?.offsetTop??0)+(m?.height??0))};return c!=="top"?Math.max(0,y.bottom-h-((n.top??0)+(n.bottom??0)+s)):Math.max(0,h+i-y.top-((n.top??0)+(n.bottom??0)+s))}function wt(t,e,l,o,n,s,i,c){let{placement:u,axis:r,size:m}=s;return u===r?Math.max(0,l[r]-(i.scroll[r]??0)-(t[r]+(c?e[r]:0))-(o[r]??0)-o[G[r]]-n):Math.max(0,t[m]+t[r]+(c?e[r]:0)-l[r]-l[m]+(i.scroll[r]??0)-(o[r]??0)-o[G[r]]-n)}function Ft(t,e,l,o,n,s,i,c,u,r,m,h,d,y,f,L,w,b,E,C,D,_){let a=rt(t),{size:A,crossAxis:p,crossSize:R,placement:M,crossPlacement:T}=a,P=tt(e,c,l,a,m,h,r,d,f,L,u),S=m,k=E?$:wt(c,r,e,n,s+m,a,u,w);if(i&&l[A]>k){let j=rt(`${G[M]} ${T}`),X=tt(e,c,l,j,m,h,r,d,f,L,u);wt(c,r,e,n,s+m,j,u,w)>k&&(a=j,P=X,S=m);}if(_==="anchor"&&C&&(a.placement==="top"||a.placement==="bottom")){let j=E?0:Q(p,P[p],l[R],c,u,s,r);if(j!==0){let X=a.crossPlacement==="center"?j>0?"left":"right":G[a.crossPlacement];if(X){let lt=rt(`${a.placement} ${X}`),pt=tt(e,c,l,lt,m,h,r,d,f,L,u),Ot=E?0:Q(p,pt[p],l[R],c,u,s,r);Math.abs(Ot)<Math.abs(j)&&(a=lt,P=pt);}}}let I="bottom";a.axis==="top"?a.placement==="top"?I="top":a.placement==="bottom"&&(I="bottom"):a.crossAxis==="top"&&(a.crossPlacement==="top"?I="bottom":a.crossPlacement==="bottom"&&(I="top"));let V=_==="anchor"&&C&&(a.placement==="top"||a.placement==="bottom")&&a.crossPlacement!=="center",z=V||E?0:Q(p,P[p],l[R],c,u,s,r);P[p]+=z;let x=E||!D?void 0:zt(P,c,r,d,n,s,l.height,I,u,w,b);y&&(x==null||y<x)&&(x=y),l.height=x!=null?Math.min(l.height,x):l.height,P=tt(e,c,l,a,S,h,r,d,f,L,u),z=V||E?0:Q(p,P[p],l[R],c,u,s,r),P[p]+=z;let v={},g=e[p]-P[p]-n[B[p]],H=g+.5*e[R],F=f/2+L,W=B[p]==="left"?(n.left??0)+(n.right??0):(n.top??0)+(n.bottom??0),N=l[R]-W-f/2-L,ot=e[p]+f/2-(P[p]+n[B[p]]),Ht=e[p]+e[R]-f/2-(P[p]+n[B[p]]),Lt=a$2(H,ot,Ht);v[p]=a$2(Lt,F,N),{placement:M,crossPlacement:T}=a,f?g=v[p]:T==="right"?g+=e[R]:T==="center"&&(g+=e[R]/2);let mt=M==="left"||M==="top"?l[A]:0,Ct={x:M==="top"||M==="bottom"?g:mt,y:M==="left"||M==="right"?g:mt};return {position:P,maxHeight:x,arrowOffsetLeft:v.left,arrowOffsetTop:v.top,placement:M,triggerAnchorPoint:Ct}}function Tt(t){let{placement:e,targetNode:l,overlayNode:o,scrollNode:n,padding:s,shouldFlip:i,boundaryElement:c,boundaryAxis:u="both",horizontalBoundaryBehavior:r="shift",offset:m,crossOffset:h$1,maxHeight:d,arrowSize:y=0,arrowBoundaryOffset:f=0,targetRect:L}=t,w=a(o),b=b$1(o),E=It(o),C=o instanceof b.HTMLElement?Bt(o):w.documentElement,D=C===w.documentElement,_=b.getComputedStyle(C).position,a$1=!!_&&_!=="static",A=D?Z(l,false,L):Et(l,C,false,L);if(!D){let{marginTop:F,marginLeft:W}=b.getComputedStyle(l);A.top+=parseInt(F,10)||0,A.left+=parseInt(W,10)||0;}let p=Z(o,true),R=St(o);p.width+=(R.left??0)+(R.right??0),p.height+=(R.top??0)+(R.bottom??0);let M=vt(n),T=c===null,P=c??w.body,S=!T&&u!=="vertical",k=!T&&u!=="horizontal",I=st(P,E),V=S?I:xt("left",w,E),z=k?I:xt("top",w,E),x={...z,left:V.left,width:V.width,totalWidth:V.totalWidth,scroll:{top:z.scroll.top,left:V.scroll.left}},v=st(C,E);a$1&&!D&&(x.top-=v.top,x.left-=v.left,v.top=0,v.left=0);let g=T?{top:0,left:0,width:0,height:0}:Et(P,C,false),H=!T&&h(P,C)&&C!==P;return Ft(e,A,p,M,R,s,i,x,v,g,m,h$1,a$1,d,y,f,H,E,T,S,k,r)}function et(t,e){let l=b$1(t),{top:o,left:n,width:s,height:i}=t.getBoundingClientRect();return e&&t instanceof l.HTMLElement&&(s=t.offsetWidth,i=t.offsetHeight),{top:o,left:n,width:s,height:i}}function Z(t,e,l){let o=a(t),{top:n,left:s,width:i,height:c}=l||et(t,e),{scrollTop:u,scrollLeft:r,clientTop:m,clientLeft:h}=o.documentElement;return {top:n+u-m,left:s+r-h,width:i,height:c}}function Et(t,e,l,o){let n=b$1(t),s=n.getComputedStyle(t),i;if(s.position==="fixed")i=o||et(t,l);else {i=Z(t,l,o);let c=Z(e,l),u=n.getComputedStyle(e);c.top+=(parseInt(u.borderTopWidth,10)||0)-e.scrollTop,c.left+=(parseInt(u.borderLeftWidth,10)||0)-e.scrollLeft,i.top-=c.top,i.left-=c.left;}return i.top-=parseInt(s.marginTop,10)||0,i.left-=parseInt(s.marginLeft,10)||0,i}function Bt(t){let e=a(t),l=b$1(t),o=t.offsetParent;if(o&&o===e.body&&l.getComputedStyle(o).position==="static"&&!At(o)&&(o=e.documentElement),o==null)for(o=t.parentElement;o&&!At(o);)o=o.parentElement;return o||e.documentElement}function At(t){let l=b$1(t).getComputedStyle(t);return l.transform!=="none"||/transform|perspective/.test(l.willChange)||l.filter!=="none"||l.contain==="paint"||"backdropFilter"in l&&l.backdropFilter!=="none"||"WebkitBackdropFilter"in l&&l.WebkitBackdropFilter!=="none"}function at(t){return typeof document>"u"?null:b$1(t).visualViewport??null}function oe(t){let{direction:e$2}=b(),{arrowSize:l$1,targetRef:o,overlayRef:n,arrowRef:s,scrollRef:i$1=n,placement:c="bottom",containerPadding:u=12,shouldFlip:r=true,boundaryElement:m,boundaryAxis:h$1="both",horizontalBoundaryBehavior:d="shift",offset:y=0,crossOffset:f=0,shouldUpdatePosition:L=true,shouldCloseOnScroll:w=true,isOpen:b$3=true,onClose:E,maxHeight:C,arrowBoundaryOffset:D=0,getTargetRect:_}=t,a$2=m??(typeof document<"u"?o.current?.ownerDocument.body??n.current?.ownerDocument.body??document.body:void 0),[A,p]=useState(null),R=[L,c,n.current,o.current,s?.current,i$1.current,u,r,a$2,h$1,d,y,f,b$3,e$2,C,D,l$1],M=useRef(at(n.current)?.scale);useEffect(()=>{b$3&&(M.current=at(n.current)?.scale);},[b$3,n]);let T=useCallback(()=>{if(L===false||!b$3||!n.current||!o.current||a$2===void 0||at(n.current)?.scale!==M.current)return;let z=a(n.current),x=i(z),v=b$1(z.body),g=null;if(i$1.current&&h(i$1.current,x)){let W=x?.getBoundingClientRect(),N=i$1.current.getBoundingClientRect();g={type:"top",offset:(W?.top??0)-N.top},g.offset>N.height/2&&(g.type="bottom",g.offset=(W?.bottom??0)-N.bottom);}let H=n.current;!C&&n.current&&(H.style.top="0px",H.style.bottom="",H.style.maxHeight=(v.visualViewport?.height??v.innerHeight)+"px");let F=Tt({placement:Vt(c,e$2),overlayNode:n.current,targetNode:o.current,scrollNode:i$1.current||n.current,padding:u,shouldFlip:r,boundaryElement:a$2,boundaryAxis:h$1,horizontalBoundaryBehavior:d,offset:y,crossOffset:f,maxHeight:C,arrowSize:l$1??(s?.current?et(s.current,true).width:0),arrowBoundaryOffset:D,targetRect:_?.(o.current)});if(F.position){if(H.style.top="",H.style.bottom="",H.style.left="",H.style.right="",Object.keys(F.position).forEach(W=>H.style[W]=F.position[W]+"px"),H.style.maxHeight=F.maxHeight!=null?F.maxHeight+"px":"",g&&x&&i$1.current){let W=x.getBoundingClientRect(),N=i$1.current.getBoundingClientRect(),ot=W[g.type]-N[g.type];i$1.current.scrollTop+=ot-g.offset;}p(F);}},R);a$1(T,R);let P=a$2?b$1(a$2):o.current?b$1(o.current):n.current?b$1(n.current):void 0;Dt(T,P);let S=useRef(null),k=useCallback(()=>{S.current!==null&&cancelAnimationFrame(S.current),S.current=requestAnimationFrame(()=>{S.current=null,T();});},[T]);useEffect(()=>()=>{S.current!==null&&cancelAnimationFrame(S.current);},[]),e({ref:n,onResize:k}),e({ref:o,onResize:k});let I=useRef(false);a$1(()=>{let z,x=()=>{I.current=true,clearTimeout(z),z=setTimeout(()=>{I.current=false;},500),T();},g=b$1(n.current).visualViewport,H=()=>{I.current&&x();};g?.addEventListener("resize",x),g?.addEventListener("scroll",H);let F=e$1(l(n.current),"scroll",H);return ()=>{g?.removeEventListener("resize",x),g?.removeEventListener("scroll",H),F();}},[T]);let V=useCallback(()=>{I.current||E?.();},[E,I]);return b$2({triggerRef:o,isOpen:b$3,onClose:w?E&&V:null}),{overlayProps:{style:{position:A?"absolute":"fixed",top:A?void 0:0,left:A?void 0:0,zIndex:1e5,...A?.position,maxHeight:A==null?"100vh":A.maxHeight!=null?`${A.maxHeight}px`:""}},placement:A?.placement??null,triggerAnchorPoint:A?.triggerAnchorPoint??null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:A?.arrowOffsetLeft,top:A?.arrowOffsetTop}},updatePosition:T}}function Dt(t,e=window){a$1(()=>(e?.addEventListener("resize",t,false),()=>{e?.removeEventListener("resize",t,false);}),[t,e]);}function Vt(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}export{oe as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {b as b$1,a as a$8}from'./chunk-KHDWTXGG.mjs';import {a,b as b$4,c}from'./chunk-
|
|
1
|
+
import {b as b$1,a as a$8}from'./chunk-KHDWTXGG.mjs';import {a,b as b$4,c}from'./chunk-HTRO6BM5.mjs';import {a as a$c}from'./chunk-5GW36EQJ.mjs';import {n,p}from'./chunk-3IPRT57V.mjs';import {a as a$7}from'./chunk-TLU2GNUT.mjs';import {b,c as c$1}from'./chunk-IDIZSV2Y.mjs';import {b as b$2}from'./chunk-INFMXVHD.mjs';import {a as a$b}from'./chunk-DIL5HL6K.mjs';import {a as a$6}from'./chunk-OPIPJTLG.mjs';import {a as a$5}from'./chunk-5W6G3ZUT.mjs';import {b as b$3}from'./chunk-OQPYPKZV.mjs';import {a as a$3}from'./chunk-66CUIXA6.mjs';import {a as a$1}from'./chunk-FPM5UJRF.mjs';import {a as a$9}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-B3EZOXNU.mjs';import {a as a$a}from'./chunk-RT4LMB6X.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import {CaretDownIcon}from'@baseline-ui/icons/8';import pe,{useMemo,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|