@ariakit/react-core 0.2.10 → 0.2.12
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/CHANGELOG.md +34 -0
- package/cjs/__chunks/{XLXQVPCB.cjs → 2UFB2Z36.cjs} +24 -24
- package/cjs/__chunks/{E7WI5NX3.cjs → 3OCFY7CV.cjs} +8 -8
- package/cjs/__chunks/{QNLWLTET.cjs → 5UCVOKTG.cjs} +10 -10
- package/cjs/__chunks/5VOPA6D3.cjs +17 -0
- package/cjs/__chunks/{FHX4GO67.cjs → 5WLTMVVQ.cjs} +5 -5
- package/cjs/__chunks/{7BSXU2OL.cjs → 622BTGVD.cjs} +6 -6
- package/cjs/__chunks/{F2RJFRP2.cjs → 63P5JKLZ.cjs} +6 -6
- package/cjs/__chunks/6MKUVCEN.cjs +36 -0
- package/cjs/__chunks/6OTNLVJI.cjs +185 -0
- package/cjs/__chunks/{2KYUOSJ4.cjs → 7WUTS26Y.cjs} +3 -3
- package/cjs/__chunks/{GET3PZI4.cjs → A764D2YK.cjs} +28 -28
- package/cjs/__chunks/{GLPDHAGY.cjs → AD4BY53T.cjs} +7 -7
- package/cjs/__chunks/{HP2YFIDE.cjs → AU2JPBQE.cjs} +69 -39
- package/cjs/__chunks/{C5W4YO2W.cjs → BEGWNNXK.cjs} +8 -8
- package/cjs/__chunks/{RHFHMA7V.cjs → BJRJETRD.cjs} +8 -8
- package/cjs/__chunks/{4D7KCBQD.cjs → BNTTY6EA.cjs} +8 -8
- package/cjs/__chunks/BQZLBPPT.cjs +33 -0
- package/cjs/__chunks/CWY2PHPR.cjs +84 -0
- package/cjs/__chunks/{NAE74ZUF.cjs → DGSPHMOA.cjs} +6 -6
- package/cjs/__chunks/{FO43SNUQ.cjs → DIRRJVY5.cjs} +6 -6
- package/cjs/__chunks/{4CQBSK3W.cjs → ELOQI33M.cjs} +2 -2
- package/cjs/__chunks/{KQYBSO76.cjs → EQO3IFY4.cjs} +23 -31
- package/cjs/__chunks/{VBCPMROZ.cjs → ESIBWLXM.cjs} +10 -10
- package/cjs/__chunks/{GQUXK6V2.cjs → F4UT5TWU.cjs} +3 -3
- package/cjs/__chunks/{6Y7OJ66S.cjs → FLQEWPZR.cjs} +18 -18
- package/cjs/__chunks/{GXCVLZ7W.cjs → G6F4DPHM.cjs} +8 -8
- package/cjs/__chunks/{DIUUZQDC.cjs → GD2R4HJS.cjs} +10 -10
- package/cjs/__chunks/{SDW7WM6J.cjs → GHDSJPDP.cjs} +14 -14
- package/cjs/__chunks/{LBYC2WX6.cjs → GTZQOSRG.cjs} +10 -10
- package/cjs/__chunks/{CEDXB2ML.cjs → H76HM4AM.cjs} +11 -11
- package/cjs/__chunks/{ZEJ6SJAQ.cjs → HSS2CWT5.cjs} +3 -3
- package/cjs/__chunks/{HTXMZNNP.cjs → HUVFPCMZ.cjs} +8 -8
- package/cjs/__chunks/{OKM7CARK.cjs → HZ3BY4NC.cjs} +18 -18
- package/cjs/__chunks/{EYNBXS3C.cjs → I4FGWKS7.cjs} +24 -24
- package/cjs/__chunks/{FIEVSSEV.cjs → I4JDDV3V.cjs} +17 -17
- package/cjs/__chunks/{QSYK4F2U.cjs → IXZRUZTM.cjs} +17 -17
- package/cjs/__chunks/{4JALWV3V.cjs → IY72JWXE.cjs} +8 -8
- package/cjs/__chunks/{PZBTPQEZ.cjs → JNS4G3MN.cjs} +49 -44
- package/cjs/__chunks/JPSESJ6Y.cjs +32 -0
- package/cjs/__chunks/{WKQDBSB7.cjs → KC75EM3D.cjs} +9 -9
- package/cjs/__chunks/{TEOWWOVH.cjs → LCJP3BHK.cjs} +15 -15
- package/cjs/__chunks/{DFJJN2WM.cjs → MAD3AOPL.cjs} +14 -14
- package/cjs/__chunks/MCXTUISZ.cjs +711 -0
- package/cjs/__chunks/{EE7FGSYL.cjs → N2KSMVA7.cjs} +11 -11
- package/cjs/__chunks/{GJ2WWSXI.cjs → NXDHPYNQ.cjs} +11 -11
- package/cjs/__chunks/{6AEXHJIC.cjs → OHQG6SR6.cjs} +9 -9
- package/cjs/__chunks/{6WLP7YXF.cjs → OSQTQ6OF.cjs} +16 -16
- package/cjs/__chunks/{ZEDBIWF2.cjs → P3RGUF6X.cjs} +43 -37
- package/cjs/__chunks/{DFOWRKWT.cjs → PH57JDIM.cjs} +12 -12
- package/cjs/__chunks/{XIQNHQGW.cjs → PHGHRT2Q.cjs} +14 -14
- package/cjs/__chunks/{TO7FN64N.cjs → Q5EWS32Z.cjs} +11 -11
- package/cjs/__chunks/{ZKPH2VTW.cjs → QR3ATHWU.cjs} +7 -7
- package/cjs/__chunks/{7KKRNI4T.cjs → RA27OSF6.cjs} +4 -4
- package/cjs/__chunks/{NTZOVT4I.cjs → RSID6YP2.cjs} +8 -8
- package/cjs/__chunks/{4AQRNZQ7.cjs → RXCUKHX3.cjs} +9 -9
- package/cjs/__chunks/{VQHQDEFP.cjs → SIVNE3PR.cjs} +24 -13
- package/cjs/__chunks/{RQ3E2DZB.cjs → SZTCN3SG.cjs} +13 -13
- package/cjs/__chunks/{OHOMAAYP.cjs → T23EIXNF.cjs} +8 -8
- package/cjs/__chunks/{DBGYOVEJ.cjs → TNMPOEZG.cjs} +6 -6
- package/cjs/__chunks/{HM3GZVEF.cjs → TQ2AADTY.cjs} +19 -19
- package/cjs/__chunks/{364WU3DX.cjs → UVTMAR7N.cjs} +14 -14
- package/cjs/__chunks/{ZH4AYXKM.cjs → VBRBBWCP.cjs} +15 -15
- package/cjs/__chunks/{UU6GKP2M.cjs → VDYEYEEN.cjs} +6 -6
- package/cjs/__chunks/{SG4GNYMD.cjs → VWNFXJXN.cjs} +23 -15
- package/cjs/__chunks/{MOOOVIIV.cjs → W6IHBXQD.cjs} +6 -6
- package/cjs/__chunks/{PCBWFI66.cjs → W7ZAKGYJ.cjs} +8 -8
- package/cjs/__chunks/{N6LDQVMC.cjs → WWIZUBSB.cjs} +14 -14
- package/cjs/__chunks/{Z3TKBZHL.cjs → X3SZBNVV.cjs} +19 -19
- package/cjs/__chunks/{YMIV6HNY.cjs → X44H72BI.cjs} +5 -5
- package/cjs/__chunks/{WZI5KRRI.cjs → XE2DJMCI.cjs} +3 -3
- package/cjs/__chunks/{G2UKCWYO.cjs → YMZPP75I.cjs} +8 -8
- package/cjs/__chunks/{UNFAA7SH.cjs → YPXV3X22.cjs} +19 -19
- package/cjs/__chunks/ZECYRUVH.cjs +33 -0
- package/cjs/button/button.cjs +8 -8
- package/cjs/checkbox/checkbox-check.cjs +6 -6
- package/cjs/checkbox/checkbox-checked-context.cjs +1 -1
- package/cjs/checkbox/checkbox-store.cjs +6 -6
- package/cjs/checkbox/checkbox.cjs +9 -9
- package/cjs/collection/collection-context.cjs +1 -1
- package/cjs/collection/collection-item.cjs +6 -6
- package/cjs/collection/collection-renderer.cjs +18 -0
- package/cjs/collection/collection-renderer.d.ts +449 -0
- package/cjs/collection/collection-store.cjs +6 -6
- package/cjs/collection/collection.cjs +9 -9
- package/cjs/combobox/combobox-cancel.cjs +14 -14
- package/cjs/combobox/combobox-context.cjs +1 -1
- package/cjs/combobox/combobox-disclosure.cjs +17 -17
- package/cjs/combobox/combobox-group-label.cjs +10 -10
- package/cjs/combobox/combobox-group.cjs +10 -10
- package/cjs/combobox/combobox-item-value.cjs +9 -9
- package/cjs/combobox/combobox-item.cjs +25 -25
- package/cjs/combobox/combobox-list.cjs +8 -8
- package/cjs/combobox/combobox-popover.cjs +30 -30
- package/cjs/combobox/combobox-row.cjs +12 -12
- package/cjs/combobox/combobox-separator.cjs +12 -12
- package/cjs/combobox/combobox-store.cjs +15 -15
- package/cjs/combobox/combobox.cjs +68 -61
- package/cjs/command/command.cjs +7 -7
- package/cjs/composite/composite-container.cjs +8 -8
- package/cjs/composite/composite-context.cjs +3 -3
- package/cjs/composite/composite-context.d.ts +8 -4
- package/cjs/composite/composite-group-label.cjs +7 -7
- package/cjs/composite/composite-group.cjs +7 -7
- package/cjs/composite/composite-hover.cjs +7 -7
- package/cjs/composite/composite-input.cjs +6 -6
- package/cjs/composite/composite-item.cjs +11 -11
- package/cjs/composite/composite-overflow-disclosure.cjs +25 -25
- package/cjs/composite/composite-overflow-store.cjs +11 -11
- package/cjs/composite/composite-overflow.cjs +33 -33
- package/cjs/composite/composite-renderer.cjs +21 -0
- package/cjs/composite/composite-renderer.d.ts +317 -0
- package/cjs/composite/composite-row.cjs +7 -7
- package/cjs/composite/composite-separator.cjs +8 -8
- package/cjs/composite/composite-store.cjs +7 -7
- package/cjs/composite/composite-typeahead.cjs +7 -7
- package/cjs/composite/composite.cjs +8 -8
- package/cjs/composite/utils.cjs +1 -1
- package/cjs/dialog/dialog-backdrop.cjs +10 -10
- package/cjs/dialog/dialog-context.cjs +1 -1
- package/cjs/dialog/dialog-description.cjs +6 -6
- package/cjs/dialog/dialog-disclosure.cjs +10 -10
- package/cjs/dialog/dialog-dismiss.cjs +9 -9
- package/cjs/dialog/dialog-heading.cjs +7 -7
- package/cjs/dialog/dialog-store.cjs +7 -7
- package/cjs/dialog/dialog.cjs +23 -23
- package/cjs/dialog/utils/disable-accessibility-tree-outside.cjs +1 -1
- package/cjs/dialog/utils/disable-tree-outside.cjs +4 -4
- package/cjs/dialog/utils/is-backdrop.cjs +1 -1
- package/cjs/dialog/utils/mark-tree-outside.cjs +1 -1
- package/cjs/dialog/utils/orchestrate.cjs +1 -1
- package/cjs/dialog/utils/prepend-hidden-dismiss.cjs +1 -1
- package/cjs/dialog/utils/supports-inert.cjs +1 -1
- package/cjs/dialog/utils/use-hide-on-interact-outside.cjs +6 -6
- package/cjs/dialog/utils/use-nested-dialogs.cjs +5 -5
- package/cjs/dialog/utils/use-prevent-body-scroll.cjs +6 -6
- package/cjs/dialog/utils/use-previous-mouse-down-ref.cjs +1 -1
- package/cjs/dialog/utils/use-root-dialog.cjs +5 -5
- package/cjs/dialog/utils/walk-tree-outside.cjs +1 -1
- package/cjs/disclosure/disclosure-content.cjs +6 -6
- package/cjs/disclosure/disclosure-store.cjs +6 -6
- package/cjs/disclosure/disclosure.cjs +9 -9
- package/cjs/focus-trap/focus-trap-region.cjs +14 -14
- package/cjs/focus-trap/focus-trap.cjs +7 -7
- package/cjs/focusable/focusable-container.cjs +6 -6
- package/cjs/focusable/focusable-context.cjs +1 -1
- package/cjs/focusable/focusable.cjs +6 -6
- package/cjs/form/form-checkbox.cjs +18 -18
- package/cjs/form/form-context.cjs +1 -1
- package/cjs/form/form-description.cjs +14 -14
- package/cjs/form/form-error.cjs +14 -14
- package/cjs/form/form-field.cjs +7 -7
- package/cjs/form/form-group-label.cjs +10 -10
- package/cjs/form/form-group.cjs +7 -7
- package/cjs/form/form-input.cjs +15 -15
- package/cjs/form/form-label.cjs +18 -18
- package/cjs/form/form-push.cjs +17 -17
- package/cjs/form/form-radio-group.cjs +12 -12
- package/cjs/form/form-radio.cjs +20 -20
- package/cjs/form/form-remove.cjs +14 -14
- package/cjs/form/form-reset.cjs +13 -13
- package/cjs/form/form-store.cjs +14 -14
- package/cjs/form/form-submit.cjs +13 -13
- package/cjs/form/form.cjs +17 -17
- package/cjs/group/group-label-context.cjs +1 -1
- package/cjs/group/group-label.cjs +6 -6
- package/cjs/group/group.cjs +6 -6
- package/cjs/heading/heading-context.cjs +1 -1
- package/cjs/heading/heading-level.cjs +1 -1
- package/cjs/heading/heading.cjs +6 -6
- package/cjs/hovercard/hovercard-anchor.cjs +7 -7
- package/cjs/hovercard/hovercard-arrow.cjs +9 -9
- package/cjs/hovercard/hovercard-description.cjs +8 -8
- package/cjs/hovercard/hovercard-disclosure.cjs +22 -22
- package/cjs/hovercard/hovercard-dismiss.cjs +11 -11
- package/cjs/hovercard/hovercard-heading.cjs +9 -9
- package/cjs/hovercard/hovercard-store.cjs +9 -9
- package/cjs/hovercard/hovercard.cjs +25 -25
- package/cjs/hovercard/utils/debug-polygon.cjs +1 -1
- package/cjs/hovercard/utils/polygon.cjs +1 -1
- package/cjs/index.cjs +1 -1
- package/cjs/menu/menu-arrow.cjs +9 -9
- package/cjs/menu/menu-bar-store.cjs +10 -10
- package/cjs/menu/menu-bar.cjs +14 -14
- package/cjs/menu/menu-button-arrow.cjs +10 -10
- package/cjs/menu/menu-button.cjs +32 -32
- package/cjs/menu/menu-context.cjs +1 -1
- package/cjs/menu/menu-description.cjs +11 -11
- package/cjs/menu/menu-dismiss.cjs +14 -14
- package/cjs/menu/menu-group-label.cjs +10 -10
- package/cjs/menu/menu-group.cjs +10 -10
- package/cjs/menu/menu-heading.cjs +12 -12
- package/cjs/menu/menu-item-check.cjs +10 -10
- package/cjs/menu/menu-item-checkbox.cjs +23 -23
- package/cjs/menu/menu-item-radio.cjs +22 -22
- package/cjs/menu/menu-item.cjs +14 -14
- package/cjs/menu/menu-list.cjs +12 -12
- package/cjs/menu/menu-separator.cjs +11 -11
- package/cjs/menu/menu-store.cjs +17 -17
- package/cjs/menu/menu.cjs +42 -42
- package/cjs/menu/utils.cjs +1 -1
- package/cjs/popover/popover-anchor.cjs +6 -6
- package/cjs/popover/popover-arrow-path.cjs +1 -1
- package/cjs/popover/popover-arrow.cjs +6 -6
- package/cjs/popover/popover-context.cjs +1 -1
- package/cjs/popover/popover-description.cjs +7 -7
- package/cjs/popover/popover-disclosure-arrow.cjs +6 -6
- package/cjs/popover/popover-disclosure.cjs +12 -12
- package/cjs/popover/popover-dismiss.cjs +10 -10
- package/cjs/popover/popover-heading.cjs +8 -8
- package/cjs/popover/popover-store.cjs +8 -8
- package/cjs/popover/popover.cjs +24 -24
- package/cjs/portal/portal-context.cjs +1 -1
- package/cjs/portal/portal.cjs +8 -8
- package/cjs/radio/radio-context.cjs +1 -1
- package/cjs/radio/radio-group.cjs +14 -14
- package/cjs/radio/radio-store.cjs +10 -10
- package/cjs/radio/radio.cjs +12 -12
- package/cjs/role/role.cjs +6 -6
- package/cjs/select/select-arrow.cjs +7 -7
- package/cjs/select/select-context.cjs +1 -1
- package/cjs/select/select-group-label.cjs +10 -10
- package/cjs/select/select-group.cjs +10 -10
- package/cjs/select/select-item-check.cjs +10 -10
- package/cjs/select/select-item.cjs +39 -38
- package/cjs/select/select-label.cjs +13 -13
- package/cjs/select/select-list.cjs +11 -11
- package/cjs/select/select-popover.cjs +33 -33
- package/cjs/select/select-renderer.cjs +110 -0
- package/cjs/select/select-renderer.d.ts +32 -0
- package/cjs/select/select-row.cjs +12 -12
- package/cjs/select/select-separator.cjs +11 -11
- package/cjs/select/select-store.cjs +15 -15
- package/cjs/select/select.cjs +31 -31
- package/cjs/separator/separator.cjs +6 -6
- package/cjs/tab/tab-context.cjs +1 -1
- package/cjs/tab/tab-list.cjs +14 -14
- package/cjs/tab/tab-panel.cjs +21 -21
- package/cjs/tab/tab-store.cjs +13 -13
- package/cjs/tab/tab.cjs +19 -19
- package/cjs/toolbar/toolbar-container.cjs +18 -18
- package/cjs/toolbar/toolbar-context.cjs +1 -1
- package/cjs/toolbar/toolbar-input.cjs +18 -18
- package/cjs/toolbar/toolbar-item.cjs +12 -12
- package/cjs/toolbar/toolbar-separator.cjs +11 -11
- package/cjs/toolbar/toolbar-store.cjs +10 -10
- package/cjs/toolbar/toolbar.cjs +14 -14
- package/cjs/tooltip/tooltip-anchor.cjs +14 -14
- package/cjs/tooltip/tooltip-arrow.cjs +10 -10
- package/cjs/tooltip/tooltip-context.cjs +1 -1
- package/cjs/tooltip/tooltip-store.cjs +14 -14
- package/cjs/tooltip/tooltip.cjs +31 -31
- package/cjs/tsconfig.build.tsbuildinfo +1 -1
- package/cjs/utils/hooks.cjs +4 -4
- package/cjs/utils/misc.cjs +3 -3
- package/cjs/utils/store.cjs +5 -5
- package/cjs/utils/system.cjs +9 -5
- package/cjs/utils/system.d.ts +13 -4
- package/cjs/visually-hidden/visually-hidden.cjs +6 -6
- package/collection/collection-renderer/package.json +8 -0
- package/composite/composite-renderer/package.json +8 -0
- package/esm/__chunks/{WYH7HZPL.js → 2NIRKFVH.js} +3 -3
- package/esm/__chunks/{LC6BW35W.js → 37OBPWF6.js} +2 -2
- package/esm/__chunks/{RU5SBKR3.js → 3LAWLNOX.js} +3 -3
- package/esm/__chunks/{OYQC776W.js → 43VDSLJP.js} +3 -3
- package/esm/__chunks/{TQ2K6WFI.js → 4GZAUH66.js} +4 -4
- package/esm/__chunks/{TZIIKRHF.js → 4PKIGBPJ.js} +1 -1
- package/esm/__chunks/{VV72RDTD.js → 4XWTU3WN.js} +5 -5
- package/esm/__chunks/{LIFXUQPU.js → 53MSBYTF.js} +5 -5
- package/esm/__chunks/{2XOPWNSQ.js → 54LBRJ55.js} +2 -2
- package/esm/__chunks/{KF3PP2P3.js → 5I6BQS7D.js} +3 -3
- package/esm/__chunks/{ZTW46EPJ.js → 5QJYOWLQ.js} +3 -3
- package/esm/__chunks/{VSM5JGQO.js → 5WJWIOBD.js} +2 -2
- package/esm/__chunks/{KQUSQ6BH.js → 6DS7ZDWX.js} +2 -2
- package/esm/__chunks/{JQVGLAS2.js → 6FAQA4RZ.js} +3 -3
- package/esm/__chunks/{N2JKXTRW.js → 6FRHNZA6.js} +3 -3
- package/esm/__chunks/{5AXDCOCY.js → 6YH4Z35H.js} +3 -3
- package/esm/__chunks/{5NQLWI7E.js → 7PHM3O7I.js} +3 -3
- package/esm/__chunks/{ZZBJOUY4.js → AAVDGJD5.js} +10 -10
- package/esm/__chunks/{Y72RMTFY.js → AUUE7U2H.js} +3 -3
- package/esm/__chunks/{N36XUJ4I.js → BB7NHN6A.js} +4 -4
- package/esm/__chunks/{FYZCYWPI.js → BHLCYMUN.js} +5 -5
- package/esm/__chunks/{77C2ITJF.js → BO7WPTZZ.js} +5 -5
- package/esm/__chunks/{PYB45PRS.js → CJI67A3R.js} +1 -1
- package/esm/__chunks/{UWUL6FFR.js → CP3U4HPL.js} +1 -1
- package/esm/__chunks/{P3IT4SS7.js → CTVLGQZG.js} +3 -3
- package/esm/__chunks/{QLHYK3GC.js → D3IXN5NP.js} +2 -2
- package/esm/__chunks/{XECTFJQS.js → DTAO6DRL.js} +21 -16
- package/esm/__chunks/{B2QL7O62.js → EJ3GIT5B.js} +3 -3
- package/esm/__chunks/{SQCQXOYX.js → EQKKLUXV.js} +9 -9
- package/esm/__chunks/{ZSRI7KJ2.js → F4XABKPL.js} +4 -4
- package/esm/__chunks/{USB5JBON.js → FHQZ2KRN.js} +2 -2
- package/esm/__chunks/{K4NEG23J.js → FL2AU7YJ.js} +2 -2
- package/esm/__chunks/{5OP64YHR.js → GMWLPVWD.js} +1 -1
- package/esm/__chunks/{EJLZ2L22.js → HGFTMLQ7.js} +18 -7
- package/esm/__chunks/{UGE3SLMW.js → HIJMOAZK.js} +15 -7
- package/esm/__chunks/{MO5Q5FB7.js → HRXPFA6C.js} +2 -2
- package/esm/__chunks/{QTPMBYCP.js → I3PXTXPI.js} +4 -4
- package/esm/__chunks/{GKH7N3JM.js → IYNN2ZO5.js} +3 -3
- package/esm/__chunks/{TAQP627X.js → IZVL3EAG.js} +2 -2
- package/esm/__chunks/{SN2N5P2D.js → J7Q2EO23.js} +2 -2
- package/esm/__chunks/{QDYEK6IR.js → JFHRFFJJ.js} +3 -3
- package/esm/__chunks/{OTMCQXXR.js → LDJKN2ZV.js} +4 -4
- package/esm/__chunks/{ENZR4N3P.js → LL3AE4N4.js} +5 -5
- package/esm/__chunks/{IZJZD7LX.js → LOJQ7RPL.js} +3 -3
- package/esm/__chunks/{WMY7U3GW.js → LVMO37QD.js} +2 -2
- package/esm/__chunks/{HE7AYLA4.js → MEP5WKMB.js} +4 -4
- package/esm/__chunks/{YNUPNUID.js → MYID4V27.js} +3 -3
- package/esm/__chunks/{7GCARSHZ.js → NQJBHION.js} +20 -8
- package/esm/__chunks/{DJLHFG5J.js → NRNLVKYP.js} +7 -7
- package/esm/__chunks/{EUD77B6Z.js → O6CV6VRM.js} +4 -4
- package/esm/__chunks/{J4BKICPJ.js → OEA63YXU.js} +1 -1
- package/esm/__chunks/{ACET4OGQ.js → OK4RCQBZ.js} +3 -3
- package/esm/__chunks/{WQIYBPAY.js → P4RGQGTG.js} +4 -4
- package/esm/__chunks/{2NDM3R77.js → P634EF77.js} +5 -5
- package/esm/__chunks/PE45DLWW.js +711 -0
- package/esm/__chunks/{5DAYRSML.js → QHXLY5NM.js} +4 -4
- package/esm/__chunks/{NW5OKUH5.js → ROOVOZJF.js} +2 -2
- package/esm/__chunks/{FK3LYGHG.js → RY6ZOIHR.js} +4 -4
- package/esm/__chunks/{XJM2RD5W.js → SAES3ZFU.js} +27 -21
- package/esm/__chunks/{B3A7CWGN.js → SRHDWRFI.js} +2 -2
- package/esm/__chunks/{XGUNEAFA.js → SWPAMWUW.js} +3 -3
- package/esm/__chunks/{TWSODZ43.js → TALTYI5G.js} +3 -3
- package/esm/__chunks/TLXPUO3M.js +185 -0
- package/esm/__chunks/{VTOOL4S4.js → W5P7IKOU.js} +4 -4
- package/esm/__chunks/{E32RAHMA.js → WFK3YK7D.js} +46 -16
- package/esm/__chunks/{WFPVIVLA.js → WHEEIXMF.js} +3 -3
- package/esm/__chunks/{Z3X3QN6P.js → WJ37OVG2.js} +7 -3
- package/esm/__chunks/{3O3K4H2I.js → WW4JQU6W.js} +2 -2
- package/esm/__chunks/{EL4DJS34.js → X2PAO7C6.js} +5 -5
- package/esm/__chunks/{3NSZ5Q7K.js → X3U3KZAU.js} +7 -15
- package/esm/__chunks/{SHUCKX4V.js → YAQX4NUA.js} +3 -3
- package/esm/__chunks/{AF6MSKOW.js → YSASCXX3.js} +3 -3
- package/esm/__chunks/{XPRWPHQV.js → YUYDGNXZ.js} +5 -5
- package/esm/button/button.js +7 -7
- package/esm/checkbox/checkbox-check.js +5 -5
- package/esm/checkbox/checkbox-checked-context.js +1 -1
- package/esm/checkbox/checkbox-store.js +5 -5
- package/esm/checkbox/checkbox.js +8 -8
- package/esm/collection/collection-context.js +1 -1
- package/esm/collection/collection-item.js +5 -5
- package/esm/collection/collection-renderer.d.ts +449 -0
- package/esm/collection/collection-renderer.js +18 -0
- package/esm/collection/collection-store.js +5 -5
- package/esm/collection/collection.js +4 -4
- package/esm/combobox/combobox-cancel.js +7 -7
- package/esm/combobox/combobox-context.js +1 -1
- package/esm/combobox/combobox-disclosure.js +9 -9
- package/esm/combobox/combobox-group-label.js +6 -6
- package/esm/combobox/combobox-group.js +6 -6
- package/esm/combobox/combobox-item-value.js +4 -4
- package/esm/combobox/combobox-item.js +11 -11
- package/esm/combobox/combobox-list.js +7 -7
- package/esm/combobox/combobox-popover.js +24 -24
- package/esm/combobox/combobox-row.js +6 -6
- package/esm/combobox/combobox-separator.js +7 -7
- package/esm/combobox/combobox-store.js +9 -9
- package/esm/combobox/combobox.js +42 -35
- package/esm/command/command.js +6 -6
- package/esm/composite/composite-container.js +7 -7
- package/esm/composite/composite-context.d.ts +8 -4
- package/esm/composite/composite-context.js +2 -2
- package/esm/composite/composite-group-label.js +6 -6
- package/esm/composite/composite-group.js +6 -6
- package/esm/composite/composite-hover.js +6 -6
- package/esm/composite/composite-input.js +5 -5
- package/esm/composite/composite-item.js +10 -10
- package/esm/composite/composite-overflow-disclosure.js +15 -15
- package/esm/composite/composite-overflow-store.js +7 -7
- package/esm/composite/composite-overflow.js +23 -23
- package/esm/composite/composite-renderer.d.ts +317 -0
- package/esm/composite/composite-renderer.js +21 -0
- package/esm/composite/composite-row.js +6 -6
- package/esm/composite/composite-separator.js +7 -7
- package/esm/composite/composite-store.js +6 -6
- package/esm/composite/composite-typeahead.js +6 -6
- package/esm/composite/composite.js +7 -7
- package/esm/composite/utils.js +1 -1
- package/esm/dialog/dialog-backdrop.js +9 -9
- package/esm/dialog/dialog-context.js +1 -1
- package/esm/dialog/dialog-description.js +5 -5
- package/esm/dialog/dialog-disclosure.js +9 -9
- package/esm/dialog/dialog-dismiss.js +8 -8
- package/esm/dialog/dialog-heading.js +6 -6
- package/esm/dialog/dialog-store.js +6 -6
- package/esm/dialog/dialog.js +22 -22
- package/esm/dialog/utils/disable-accessibility-tree-outside.js +1 -1
- package/esm/dialog/utils/disable-tree-outside.js +3 -3
- package/esm/dialog/utils/is-backdrop.js +1 -1
- package/esm/dialog/utils/mark-tree-outside.js +1 -1
- package/esm/dialog/utils/orchestrate.js +1 -1
- package/esm/dialog/utils/prepend-hidden-dismiss.js +1 -1
- package/esm/dialog/utils/supports-inert.js +1 -1
- package/esm/dialog/utils/use-hide-on-interact-outside.js +5 -5
- package/esm/dialog/utils/use-nested-dialogs.js +4 -4
- package/esm/dialog/utils/use-prevent-body-scroll.js +5 -5
- package/esm/dialog/utils/use-previous-mouse-down-ref.js +1 -1
- package/esm/dialog/utils/use-root-dialog.js +4 -4
- package/esm/dialog/utils/walk-tree-outside.js +1 -1
- package/esm/disclosure/disclosure-content.js +5 -5
- package/esm/disclosure/disclosure-store.js +5 -5
- package/esm/disclosure/disclosure.js +8 -8
- package/esm/focus-trap/focus-trap-region.js +6 -6
- package/esm/focus-trap/focus-trap.js +6 -6
- package/esm/focusable/focusable-container.js +5 -5
- package/esm/focusable/focusable-context.js +1 -1
- package/esm/focusable/focusable.js +5 -5
- package/esm/form/form-checkbox.js +11 -11
- package/esm/form/form-context.js +1 -1
- package/esm/form/form-description.js +5 -5
- package/esm/form/form-error.js +5 -5
- package/esm/form/form-field.js +6 -6
- package/esm/form/form-group-label.js +5 -5
- package/esm/form/form-group.js +6 -6
- package/esm/form/form-input.js +7 -7
- package/esm/form/form-label.js +5 -5
- package/esm/form/form-push.js +8 -8
- package/esm/form/form-radio-group.js +6 -6
- package/esm/form/form-radio.js +12 -12
- package/esm/form/form-remove.js +7 -7
- package/esm/form/form-reset.js +7 -7
- package/esm/form/form-store.js +5 -5
- package/esm/form/form-submit.js +7 -7
- package/esm/form/form.js +4 -4
- package/esm/group/group-label-context.js +1 -1
- package/esm/group/group-label.js +5 -5
- package/esm/group/group.js +5 -5
- package/esm/heading/heading-context.js +1 -1
- package/esm/heading/heading-level.js +1 -1
- package/esm/heading/heading.js +5 -5
- package/esm/hovercard/hovercard-anchor.js +6 -6
- package/esm/hovercard/hovercard-arrow.js +5 -5
- package/esm/hovercard/hovercard-description.js +7 -7
- package/esm/hovercard/hovercard-disclosure.js +10 -10
- package/esm/hovercard/hovercard-dismiss.js +10 -10
- package/esm/hovercard/hovercard-heading.js +8 -8
- package/esm/hovercard/hovercard-store.js +8 -8
- package/esm/hovercard/hovercard.js +24 -24
- package/esm/hovercard/utils/debug-polygon.js +1 -1
- package/esm/hovercard/utils/polygon.js +1 -1
- package/esm/index.js +1 -1
- package/esm/menu/menu-arrow.js +5 -5
- package/esm/menu/menu-bar-store.js +6 -6
- package/esm/menu/menu-bar.js +7 -7
- package/esm/menu/menu-button-arrow.js +5 -5
- package/esm/menu/menu-button.js +18 -18
- package/esm/menu/menu-context.js +1 -1
- package/esm/menu/menu-description.js +7 -7
- package/esm/menu/menu-dismiss.js +10 -10
- package/esm/menu/menu-group-label.js +6 -6
- package/esm/menu/menu-group.js +6 -6
- package/esm/menu/menu-heading.js +8 -8
- package/esm/menu/menu-item-check.js +5 -5
- package/esm/menu/menu-item-checkbox.js +15 -15
- package/esm/menu/menu-item-radio.js +14 -14
- package/esm/menu/menu-item.js +13 -13
- package/esm/menu/menu-list.js +11 -11
- package/esm/menu/menu-separator.js +7 -7
- package/esm/menu/menu-store.js +10 -10
- package/esm/menu/menu.js +29 -29
- package/esm/menu/utils.js +1 -1
- package/esm/popover/popover-anchor.js +5 -5
- package/esm/popover/popover-arrow-path.js +1 -1
- package/esm/popover/popover-arrow.js +5 -5
- package/esm/popover/popover-context.js +1 -1
- package/esm/popover/popover-description.js +6 -6
- package/esm/popover/popover-disclosure-arrow.js +5 -5
- package/esm/popover/popover-disclosure.js +11 -11
- package/esm/popover/popover-dismiss.js +9 -9
- package/esm/popover/popover-heading.js +7 -7
- package/esm/popover/popover-store.js +7 -7
- package/esm/popover/popover.js +23 -23
- package/esm/portal/portal-context.js +1 -1
- package/esm/portal/portal.js +7 -7
- package/esm/radio/radio-context.js +1 -1
- package/esm/radio/radio-group.js +7 -7
- package/esm/radio/radio-store.js +6 -6
- package/esm/radio/radio.js +11 -11
- package/esm/role/role.js +5 -5
- package/esm/select/select-arrow.js +6 -6
- package/esm/select/select-context.js +1 -1
- package/esm/select/select-group-label.js +6 -6
- package/esm/select/select-group.js +6 -6
- package/esm/select/select-item-check.js +5 -5
- package/esm/select/select-item.js +26 -25
- package/esm/select/select-label.js +4 -4
- package/esm/select/select-list.js +10 -10
- package/esm/select/select-popover.js +27 -27
- package/esm/select/select-renderer.d.ts +32 -0
- package/esm/select/select-renderer.js +110 -0
- package/esm/select/select-row.js +6 -6
- package/esm/select/select-separator.js +7 -7
- package/esm/select/select-store.js +9 -9
- package/esm/select/select.js +15 -15
- package/esm/separator/separator.js +5 -5
- package/esm/tab/tab-context.js +1 -1
- package/esm/tab/tab-list.js +7 -7
- package/esm/tab/tab-panel.js +9 -9
- package/esm/tab/tab-store.js +6 -6
- package/esm/tab/tab.js +10 -10
- package/esm/toolbar/toolbar-container.js +12 -12
- package/esm/toolbar/toolbar-context.js +1 -1
- package/esm/toolbar/toolbar-input.js +12 -12
- package/esm/toolbar/toolbar-item.js +11 -11
- package/esm/toolbar/toolbar-separator.js +7 -7
- package/esm/toolbar/toolbar-store.js +6 -6
- package/esm/toolbar/toolbar.js +7 -7
- package/esm/tooltip/tooltip-anchor.js +6 -6
- package/esm/tooltip/tooltip-arrow.js +5 -5
- package/esm/tooltip/tooltip-context.js +1 -1
- package/esm/tooltip/tooltip-store.js +8 -8
- package/esm/tooltip/tooltip.js +24 -24
- package/esm/tsconfig.build.tsbuildinfo +1 -1
- package/esm/utils/hooks.js +3 -3
- package/esm/utils/misc.js +2 -2
- package/esm/utils/store.js +4 -4
- package/esm/utils/system.d.ts +13 -4
- package/esm/utils/system.js +10 -6
- package/esm/visually-hidden/visually-hidden.js +5 -5
- package/package.json +14 -2
- package/select/select-renderer/package.json +8 -0
- package/cjs/__chunks/B4IMQMNP.cjs +0 -36
- package/cjs/__chunks/N6BZRQWT.cjs +0 -32
- package/cjs/__chunks/NVMBKFRB.cjs +0 -13
- package/cjs/__chunks/O3Z4C76T.cjs +0 -72
- package/cjs/__chunks/V4OMCLAW.cjs +0 -33
- package/cjs/__chunks/XI6W2T6N.cjs +0 -33
- package/cjs/__chunks/{6455U47T.cjs → 72I2GWXF.cjs} +0 -0
- package/cjs/__chunks/{S2VSVWFY.cjs → ZWMVFMQY.cjs} +2 -2
- package/esm/__chunks/{QLHUIPVK.js → AR6DTI3S.js} +3 -3
- /package/esm/__chunks/{4BKCJXBM.js → PNRLI7OV.js} +0 -0
|
@@ -0,0 +1,711 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _ZQAFJQIScjs = require('./ZQAFJQIS.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _CWY2PHPRcjs = require('./CWY2PHPR.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _BEGWNNXKcjs = require('./BEGWNNXK.cjs');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
var _5WLTMVVQcjs = require('./5WLTMVVQ.cjs');
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
var _72I2GWXFcjs = require('./72I2GWXF.cjs');
|
|
24
|
+
|
|
25
|
+
// src/collection/collection-renderer.tsx
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
var _react = require('react');
|
|
35
|
+
var _dom = require('@ariakit/core/utils/dom');
|
|
36
|
+
var _misc = require('@ariakit/core/utils/misc');
|
|
37
|
+
var _reactdom = require('react-dom');
|
|
38
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
39
|
+
var CollectionRendererContext = _react.createContext.call(void 0, null);
|
|
40
|
+
function createTask() {
|
|
41
|
+
let raf = 0;
|
|
42
|
+
const run = (cb) => {
|
|
43
|
+
if (raf)
|
|
44
|
+
return;
|
|
45
|
+
raf = requestAnimationFrame(() => {
|
|
46
|
+
raf = 0;
|
|
47
|
+
cb();
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
const cancel = () => {
|
|
51
|
+
cancelAnimationFrame(raf);
|
|
52
|
+
raf = 0;
|
|
53
|
+
};
|
|
54
|
+
return { run, cancel };
|
|
55
|
+
}
|
|
56
|
+
function findNearestIndex(items, target, getValue) {
|
|
57
|
+
let left = 0;
|
|
58
|
+
let right = getItemsLength(items) - 1;
|
|
59
|
+
while (left <= right) {
|
|
60
|
+
const index = (left + right) / 2 | 0;
|
|
61
|
+
const value = getValue(index);
|
|
62
|
+
if (value === target)
|
|
63
|
+
return index;
|
|
64
|
+
else if (value < target)
|
|
65
|
+
left = index + 1;
|
|
66
|
+
else
|
|
67
|
+
right = index - 1;
|
|
68
|
+
}
|
|
69
|
+
if (left > 0)
|
|
70
|
+
return left - 1;
|
|
71
|
+
return 0;
|
|
72
|
+
}
|
|
73
|
+
function getItemsLength(items) {
|
|
74
|
+
return typeof items === "number" ? items : items.length;
|
|
75
|
+
}
|
|
76
|
+
function getItemObject(item) {
|
|
77
|
+
if (!item || typeof item !== "object") {
|
|
78
|
+
return { value: item };
|
|
79
|
+
}
|
|
80
|
+
return item;
|
|
81
|
+
}
|
|
82
|
+
function getItemId(item, index, baseId) {
|
|
83
|
+
var _a;
|
|
84
|
+
_misc.invariant.call(void 0, baseId, "CollectionRenderer must be given an `id` prop.");
|
|
85
|
+
const defaultId = `${baseId}/${index}`;
|
|
86
|
+
return (_a = getItemObject(item).id) != null ? _a : defaultId;
|
|
87
|
+
}
|
|
88
|
+
function getItem(items, index) {
|
|
89
|
+
if (typeof items === "number") {
|
|
90
|
+
if (index >= items)
|
|
91
|
+
return null;
|
|
92
|
+
return {};
|
|
93
|
+
}
|
|
94
|
+
const item = items[index];
|
|
95
|
+
if (!item)
|
|
96
|
+
return null;
|
|
97
|
+
if (typeof item === "object")
|
|
98
|
+
return item;
|
|
99
|
+
return { value: item };
|
|
100
|
+
}
|
|
101
|
+
function getItemSize(item, horizontal, fallbackElement) {
|
|
102
|
+
var _a, _b, _c, _d, _e;
|
|
103
|
+
const itemObject = getItemObject(item);
|
|
104
|
+
horizontal = itemObject.orientation === "horizontal";
|
|
105
|
+
const prop = horizontal ? "width" : "height";
|
|
106
|
+
const style = itemObject.style;
|
|
107
|
+
if (style) {
|
|
108
|
+
const size = style[prop];
|
|
109
|
+
if (typeof size === "number")
|
|
110
|
+
return size;
|
|
111
|
+
}
|
|
112
|
+
const items = itemObject.items;
|
|
113
|
+
if (items == null ? void 0 : items.length) {
|
|
114
|
+
const hasSameOrientation = !itemObject.orientation || horizontal && itemObject.orientation === "horizontal" || !horizontal && itemObject.orientation === "vertical";
|
|
115
|
+
const paddingStart = (_b = (_a = itemObject.paddingStart) != null ? _a : itemObject.padding) != null ? _b : 0;
|
|
116
|
+
const paddingEnd = (_d = (_c = itemObject.paddingEnd) != null ? _c : itemObject.padding) != null ? _d : 0;
|
|
117
|
+
const padding = hasSameOrientation ? paddingStart + paddingEnd : 0;
|
|
118
|
+
const initialSize = ((_e = itemObject.gap) != null ? _e : 0) * (items.length - 1) + padding;
|
|
119
|
+
if (hasSameOrientation && itemObject.itemSize) {
|
|
120
|
+
return initialSize + itemObject.itemSize * items.length;
|
|
121
|
+
}
|
|
122
|
+
const totalSize = items.reduce(
|
|
123
|
+
(sum, item2) => sum + getItemSize(item2, horizontal),
|
|
124
|
+
initialSize
|
|
125
|
+
);
|
|
126
|
+
if (totalSize !== initialSize)
|
|
127
|
+
return totalSize;
|
|
128
|
+
}
|
|
129
|
+
const element = fallbackElement !== false ? itemObject.element || fallbackElement : null;
|
|
130
|
+
if (element == null ? void 0 : element.isConnected) {
|
|
131
|
+
return element.getBoundingClientRect()[prop];
|
|
132
|
+
}
|
|
133
|
+
return 0;
|
|
134
|
+
}
|
|
135
|
+
function getAverageSize(props) {
|
|
136
|
+
const length = getItemsLength(props.items);
|
|
137
|
+
let currentIndex = 0;
|
|
138
|
+
let averageSize = props.estimatedItemSize;
|
|
139
|
+
const setAverageSize = (size) => {
|
|
140
|
+
const prevIndex = currentIndex;
|
|
141
|
+
currentIndex = currentIndex + 1;
|
|
142
|
+
averageSize = (averageSize * prevIndex + size) / currentIndex;
|
|
143
|
+
};
|
|
144
|
+
for (let index = 0; index < length; index += 1) {
|
|
145
|
+
const item = getItem(props.items, index);
|
|
146
|
+
const itemId = getItemId(item, index, props.baseId);
|
|
147
|
+
const itemData = props.data.get(itemId);
|
|
148
|
+
const fallbackElement = props.elements.get(itemId);
|
|
149
|
+
const size = getItemSize(item, props.horizontal, fallbackElement);
|
|
150
|
+
if (size) {
|
|
151
|
+
setAverageSize(size);
|
|
152
|
+
} else if (itemData == null ? void 0 : itemData.rendered) {
|
|
153
|
+
setAverageSize(itemData.end - itemData.start);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return averageSize;
|
|
157
|
+
}
|
|
158
|
+
function getScrollOffset(scroller, horizontal) {
|
|
159
|
+
if ("scrollX" in scroller) {
|
|
160
|
+
return horizontal ? scroller.scrollX : scroller.scrollY;
|
|
161
|
+
}
|
|
162
|
+
return horizontal ? scroller.scrollLeft : scroller.scrollTop;
|
|
163
|
+
}
|
|
164
|
+
function getViewport(scroller) {
|
|
165
|
+
const { defaultView, documentElement } = scroller.ownerDocument;
|
|
166
|
+
if (scroller === documentElement)
|
|
167
|
+
return defaultView;
|
|
168
|
+
return scroller;
|
|
169
|
+
}
|
|
170
|
+
function useScroller(rendererRef) {
|
|
171
|
+
const [scroller, setScroller] = _react.useState.call(void 0, null);
|
|
172
|
+
_react.useEffect.call(void 0, () => {
|
|
173
|
+
const renderer = rendererRef == null ? void 0 : rendererRef.current;
|
|
174
|
+
if (!renderer)
|
|
175
|
+
return;
|
|
176
|
+
const scroller2 = _dom.getScrollingElement.call(void 0, renderer);
|
|
177
|
+
if (!scroller2)
|
|
178
|
+
return;
|
|
179
|
+
setScroller(scroller2);
|
|
180
|
+
}, [rendererRef]);
|
|
181
|
+
return scroller;
|
|
182
|
+
}
|
|
183
|
+
function getRendererOffset(renderer, scroller, horizontal) {
|
|
184
|
+
const win = _dom.getWindow.call(void 0, renderer);
|
|
185
|
+
const htmlElement = win == null ? void 0 : win.document.documentElement;
|
|
186
|
+
const rendererRect = renderer.getBoundingClientRect();
|
|
187
|
+
const rendererOffset = horizontal ? rendererRect.left : rendererRect.top;
|
|
188
|
+
if (scroller === htmlElement) {
|
|
189
|
+
const scrollOffset2 = getScrollOffset(win, horizontal);
|
|
190
|
+
return scrollOffset2 + rendererOffset;
|
|
191
|
+
}
|
|
192
|
+
const scrollerRect = scroller.getBoundingClientRect();
|
|
193
|
+
const scrollerOffset = horizontal ? scrollerRect.left : scrollerRect.top;
|
|
194
|
+
const scrollOffset = getScrollOffset(scroller, horizontal);
|
|
195
|
+
return rendererOffset - scrollerOffset + scrollOffset;
|
|
196
|
+
}
|
|
197
|
+
function getOffsets(renderer, scroller, horizontal) {
|
|
198
|
+
const scrollOffset = getScrollOffset(scroller, horizontal);
|
|
199
|
+
const rendererOffset = getRendererOffset(renderer, scroller, horizontal);
|
|
200
|
+
const scrollSize = horizontal ? scroller.clientWidth : scroller.clientHeight;
|
|
201
|
+
const start = scrollOffset - rendererOffset;
|
|
202
|
+
const end = start + scrollSize;
|
|
203
|
+
return { start, end };
|
|
204
|
+
}
|
|
205
|
+
function getItemsEnd(props) {
|
|
206
|
+
const length = getItemsLength(props.items);
|
|
207
|
+
const totalPadding = props.paddingStart + props.paddingEnd;
|
|
208
|
+
if (!length)
|
|
209
|
+
return totalPadding;
|
|
210
|
+
const lastIndex = length - 1;
|
|
211
|
+
const totalGap = lastIndex * props.gap;
|
|
212
|
+
if (props.itemSize != null) {
|
|
213
|
+
return length * props.itemSize + totalGap + totalPadding;
|
|
214
|
+
}
|
|
215
|
+
const defaultEnd = length * props.estimatedItemSize + totalGap + totalPadding;
|
|
216
|
+
if (!props.baseId)
|
|
217
|
+
return defaultEnd;
|
|
218
|
+
const lastItem = getItem(props.items, lastIndex);
|
|
219
|
+
const lastItemId = getItemId(lastItem, lastIndex, props.baseId);
|
|
220
|
+
const lastItemData = props.data.get(lastItemId);
|
|
221
|
+
if (lastItemData == null ? void 0 : lastItemData.end)
|
|
222
|
+
return lastItemData.end + props.paddingEnd;
|
|
223
|
+
if (!Array.isArray(props.items))
|
|
224
|
+
return defaultEnd;
|
|
225
|
+
const end = props.items.reduce(
|
|
226
|
+
(sum, item) => sum + getItemSize(item, props.horizontal, false),
|
|
227
|
+
0
|
|
228
|
+
);
|
|
229
|
+
if (!end)
|
|
230
|
+
return defaultEnd;
|
|
231
|
+
return end + totalGap + totalPadding;
|
|
232
|
+
}
|
|
233
|
+
function getData(props) {
|
|
234
|
+
var _a;
|
|
235
|
+
const length = getItemsLength(props.items);
|
|
236
|
+
let nextData;
|
|
237
|
+
let start = props.paddingStart;
|
|
238
|
+
const avgSize = getAverageSize(props);
|
|
239
|
+
for (let index = 0; index < length; index += 1) {
|
|
240
|
+
const item = getItem(props.items, index);
|
|
241
|
+
const itemId = getItemId(item, index, props.baseId);
|
|
242
|
+
const itemData = props.data.get(itemId);
|
|
243
|
+
const prevRendered = (_a = itemData == null ? void 0 : itemData.rendered) != null ? _a : false;
|
|
244
|
+
const setSize = (size2, rendered = prevRendered) => {
|
|
245
|
+
start = start ? start + props.gap : start;
|
|
246
|
+
const end = start + size2;
|
|
247
|
+
const nextItemData = { index, rendered, start, end };
|
|
248
|
+
if (!_misc.shallowEqual.call(void 0, itemData, nextItemData)) {
|
|
249
|
+
if (!nextData) {
|
|
250
|
+
nextData = new Map(props.data);
|
|
251
|
+
}
|
|
252
|
+
nextData.set(itemId, { index, rendered, start, end });
|
|
253
|
+
}
|
|
254
|
+
start = end;
|
|
255
|
+
};
|
|
256
|
+
const size = getItemSize(
|
|
257
|
+
item,
|
|
258
|
+
props.horizontal,
|
|
259
|
+
props.elements.get(itemId)
|
|
260
|
+
);
|
|
261
|
+
if (size) {
|
|
262
|
+
setSize(size, true);
|
|
263
|
+
} else if (itemData == null ? void 0 : itemData.rendered) {
|
|
264
|
+
setSize(itemData.end - itemData.start, true);
|
|
265
|
+
} else {
|
|
266
|
+
setSize(avgSize);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
return nextData;
|
|
270
|
+
}
|
|
271
|
+
function useCollectionRenderer(_a) {
|
|
272
|
+
var _b = _a, {
|
|
273
|
+
store,
|
|
274
|
+
items: itemsProp,
|
|
275
|
+
initialItems = 0,
|
|
276
|
+
gap = 0,
|
|
277
|
+
itemSize,
|
|
278
|
+
estimatedItemSize = 40,
|
|
279
|
+
overscan: overscanProp,
|
|
280
|
+
orientation: orientationProp,
|
|
281
|
+
padding = 0,
|
|
282
|
+
paddingStart = padding,
|
|
283
|
+
paddingEnd = padding,
|
|
284
|
+
persistentIndices,
|
|
285
|
+
renderOnScroll = true,
|
|
286
|
+
renderOnResize = !!renderOnScroll,
|
|
287
|
+
children: renderItem
|
|
288
|
+
} = _b, props = _72I2GWXFcjs.__objRest.call(void 0, _b, [
|
|
289
|
+
"store",
|
|
290
|
+
"items",
|
|
291
|
+
"initialItems",
|
|
292
|
+
"gap",
|
|
293
|
+
"itemSize",
|
|
294
|
+
"estimatedItemSize",
|
|
295
|
+
"overscan",
|
|
296
|
+
"orientation",
|
|
297
|
+
"padding",
|
|
298
|
+
"paddingStart",
|
|
299
|
+
"paddingEnd",
|
|
300
|
+
"persistentIndices",
|
|
301
|
+
"renderOnScroll",
|
|
302
|
+
"renderOnResize",
|
|
303
|
+
"children"
|
|
304
|
+
]);
|
|
305
|
+
var _a2, _b2;
|
|
306
|
+
const context = _react.useContext.call(void 0, _ZQAFJQIScjs.CollectionContext);
|
|
307
|
+
store = store || context;
|
|
308
|
+
const items = _BEGWNNXKcjs.useStoreState.call(void 0, store, (state) => itemsProp != null ? itemsProp : state.items) || itemsProp;
|
|
309
|
+
_misc.invariant.call(void 0,
|
|
310
|
+
items != null,
|
|
311
|
+
process.env.NODE_ENV !== "production" && "CollectionRenderer must be either wrapped in a Collection component or be given an `items` prop."
|
|
312
|
+
);
|
|
313
|
+
let parent = _react.useContext.call(void 0, CollectionRendererContext);
|
|
314
|
+
if (store && (parent == null ? void 0 : parent.store) !== store) {
|
|
315
|
+
parent = null;
|
|
316
|
+
}
|
|
317
|
+
const parentData = parent == null ? void 0 : parent.childrenData;
|
|
318
|
+
const orientation = (_a2 = orientationProp != null ? orientationProp : parent == null ? void 0 : parent.orientation) != null ? _a2 : "vertical";
|
|
319
|
+
const overscan = (_b2 = overscanProp != null ? overscanProp : parent == null ? void 0 : parent.overscan) != null ? _b2 : 1;
|
|
320
|
+
const ref = _react.useRef.call(void 0, null);
|
|
321
|
+
const baseId = _5WLTMVVQcjs.useId.call(void 0, props.id);
|
|
322
|
+
const horizontal = orientation === "horizontal";
|
|
323
|
+
const elements = _react.useMemo.call(void 0, () => /* @__PURE__ */ new Map(), []);
|
|
324
|
+
const [elementsUpdated, updateElements] = _5WLTMVVQcjs.useForceUpdate.call(void 0, );
|
|
325
|
+
const [defaultVisibleIndices, setVisibleIndices] = _react.useState.call(void 0, () => {
|
|
326
|
+
if (!initialItems)
|
|
327
|
+
return [];
|
|
328
|
+
const length = getItemsLength(items);
|
|
329
|
+
const initialLength = Math.min(length, Math.abs(initialItems));
|
|
330
|
+
return Array.from({ length: initialLength }, (_, index) => {
|
|
331
|
+
if (initialItems < 0)
|
|
332
|
+
return length - index - 1;
|
|
333
|
+
return index;
|
|
334
|
+
});
|
|
335
|
+
});
|
|
336
|
+
const visibleIndices = _react.useMemo.call(void 0, () => {
|
|
337
|
+
if (!persistentIndices)
|
|
338
|
+
return defaultVisibleIndices;
|
|
339
|
+
const nextIndices = defaultVisibleIndices.slice();
|
|
340
|
+
persistentIndices.forEach((index) => {
|
|
341
|
+
if (index < 0)
|
|
342
|
+
return;
|
|
343
|
+
if (nextIndices.includes(index))
|
|
344
|
+
return;
|
|
345
|
+
nextIndices.push(index);
|
|
346
|
+
});
|
|
347
|
+
nextIndices.sort((a, b) => a - b);
|
|
348
|
+
if (_misc.shallowEqual.call(void 0, defaultVisibleIndices, nextIndices)) {
|
|
349
|
+
return defaultVisibleIndices;
|
|
350
|
+
}
|
|
351
|
+
return nextIndices;
|
|
352
|
+
}, [defaultVisibleIndices, persistentIndices]);
|
|
353
|
+
const [data, setData] = _react.useState.call(void 0, () => {
|
|
354
|
+
if (!baseId)
|
|
355
|
+
return /* @__PURE__ */ new Map();
|
|
356
|
+
const data2 = (parentData == null ? void 0 : parentData.get(baseId)) || /* @__PURE__ */ new Map();
|
|
357
|
+
if (itemSize != null)
|
|
358
|
+
return data2;
|
|
359
|
+
if (!items)
|
|
360
|
+
return data2;
|
|
361
|
+
const nextData = getData({
|
|
362
|
+
baseId,
|
|
363
|
+
items,
|
|
364
|
+
data: data2,
|
|
365
|
+
gap,
|
|
366
|
+
elements,
|
|
367
|
+
horizontal,
|
|
368
|
+
paddingStart,
|
|
369
|
+
itemSize,
|
|
370
|
+
estimatedItemSize
|
|
371
|
+
});
|
|
372
|
+
return nextData || data2;
|
|
373
|
+
});
|
|
374
|
+
const totalSize = _react.useMemo.call(void 0, () => {
|
|
375
|
+
return getItemsEnd({
|
|
376
|
+
baseId,
|
|
377
|
+
items,
|
|
378
|
+
data,
|
|
379
|
+
gap,
|
|
380
|
+
horizontal,
|
|
381
|
+
itemSize,
|
|
382
|
+
estimatedItemSize,
|
|
383
|
+
paddingStart,
|
|
384
|
+
paddingEnd
|
|
385
|
+
});
|
|
386
|
+
}, [
|
|
387
|
+
baseId,
|
|
388
|
+
items,
|
|
389
|
+
data,
|
|
390
|
+
gap,
|
|
391
|
+
horizontal,
|
|
392
|
+
itemSize,
|
|
393
|
+
estimatedItemSize,
|
|
394
|
+
paddingStart,
|
|
395
|
+
paddingEnd
|
|
396
|
+
]);
|
|
397
|
+
_react.useEffect.call(void 0, () => {
|
|
398
|
+
if (!baseId)
|
|
399
|
+
return;
|
|
400
|
+
parentData == null ? void 0 : parentData.set(baseId, data);
|
|
401
|
+
}, [baseId, parentData, data]);
|
|
402
|
+
_react.useEffect.call(void 0, () => {
|
|
403
|
+
if (itemSize != null)
|
|
404
|
+
return;
|
|
405
|
+
if (!baseId)
|
|
406
|
+
return;
|
|
407
|
+
if (!items)
|
|
408
|
+
return;
|
|
409
|
+
const nextData = getData({
|
|
410
|
+
baseId,
|
|
411
|
+
items,
|
|
412
|
+
data,
|
|
413
|
+
gap,
|
|
414
|
+
elements,
|
|
415
|
+
horizontal,
|
|
416
|
+
paddingStart,
|
|
417
|
+
itemSize,
|
|
418
|
+
estimatedItemSize
|
|
419
|
+
});
|
|
420
|
+
if (nextData) {
|
|
421
|
+
setData(nextData);
|
|
422
|
+
}
|
|
423
|
+
}, [
|
|
424
|
+
elementsUpdated,
|
|
425
|
+
itemSize,
|
|
426
|
+
baseId,
|
|
427
|
+
items,
|
|
428
|
+
data,
|
|
429
|
+
gap,
|
|
430
|
+
elements,
|
|
431
|
+
horizontal,
|
|
432
|
+
paddingStart,
|
|
433
|
+
estimatedItemSize
|
|
434
|
+
]);
|
|
435
|
+
const scroller = useScroller(items ? ref : null);
|
|
436
|
+
const offsetsRef = _react.useRef.call(void 0, { start: 0, end: 0 });
|
|
437
|
+
const processVisibleIndices = _react.useCallback.call(void 0, () => {
|
|
438
|
+
const offsets = offsetsRef.current;
|
|
439
|
+
if (!items)
|
|
440
|
+
return;
|
|
441
|
+
if (!baseId)
|
|
442
|
+
return;
|
|
443
|
+
if (!offsets.end)
|
|
444
|
+
return;
|
|
445
|
+
if (!data.size && !itemSize)
|
|
446
|
+
return;
|
|
447
|
+
const length = getItemsLength(items);
|
|
448
|
+
const getItemOffset = (index, prop = "start") => {
|
|
449
|
+
var _a3;
|
|
450
|
+
if (itemSize) {
|
|
451
|
+
const start2 = itemSize * index + gap * index + paddingStart;
|
|
452
|
+
if (prop === "start")
|
|
453
|
+
return start2;
|
|
454
|
+
return start2 + itemSize;
|
|
455
|
+
}
|
|
456
|
+
const item = getItem(items, index);
|
|
457
|
+
const itemId = getItemId(item, index, baseId);
|
|
458
|
+
const itemData = data.get(itemId);
|
|
459
|
+
return (_a3 = itemData == null ? void 0 : itemData[prop]) != null ? _a3 : 0;
|
|
460
|
+
};
|
|
461
|
+
const initialStart = findNearestIndex(items, offsets.start, getItemOffset);
|
|
462
|
+
let initialEnd = initialStart;
|
|
463
|
+
while (initialEnd < length && getItemOffset(initialEnd) < offsets.end) {
|
|
464
|
+
initialEnd += 1;
|
|
465
|
+
}
|
|
466
|
+
const finalOverscan = initialEnd - initialStart ? overscan : 0;
|
|
467
|
+
const start = Math.max(initialStart - finalOverscan, 0);
|
|
468
|
+
const end = Math.min(initialEnd + finalOverscan, length);
|
|
469
|
+
const indices = Array.from(
|
|
470
|
+
{ length: end - start },
|
|
471
|
+
(_, index) => index + start
|
|
472
|
+
);
|
|
473
|
+
setVisibleIndices((prevIndices) => {
|
|
474
|
+
if (_misc.shallowEqual.call(void 0, prevIndices, indices))
|
|
475
|
+
return prevIndices;
|
|
476
|
+
return indices;
|
|
477
|
+
});
|
|
478
|
+
}, [
|
|
479
|
+
elementsUpdated,
|
|
480
|
+
items,
|
|
481
|
+
baseId,
|
|
482
|
+
data,
|
|
483
|
+
itemSize,
|
|
484
|
+
gap,
|
|
485
|
+
paddingStart,
|
|
486
|
+
overscan
|
|
487
|
+
]);
|
|
488
|
+
_react.useEffect.call(void 0, processVisibleIndices, [processVisibleIndices]);
|
|
489
|
+
const processVisibleIndicesEvent = _5WLTMVVQcjs.useEvent.call(void 0, processVisibleIndices);
|
|
490
|
+
_react.useEffect.call(void 0, () => {
|
|
491
|
+
const renderer = ref.current;
|
|
492
|
+
if (!renderer)
|
|
493
|
+
return;
|
|
494
|
+
if (!scroller)
|
|
495
|
+
return;
|
|
496
|
+
offsetsRef.current = getOffsets(renderer, scroller, horizontal);
|
|
497
|
+
processVisibleIndicesEvent();
|
|
498
|
+
}, [scroller, horizontal, processVisibleIndicesEvent]);
|
|
499
|
+
const mayRenderOnScroll = !!renderOnScroll;
|
|
500
|
+
const renderOnScrollProp = _5WLTMVVQcjs.useBooleanEvent.call(void 0, renderOnScroll);
|
|
501
|
+
_react.useEffect.call(void 0, () => {
|
|
502
|
+
if (!mayRenderOnScroll)
|
|
503
|
+
return;
|
|
504
|
+
const renderer = ref.current;
|
|
505
|
+
if (!renderer)
|
|
506
|
+
return;
|
|
507
|
+
if (!scroller)
|
|
508
|
+
return;
|
|
509
|
+
const viewport = getViewport(scroller);
|
|
510
|
+
if (!viewport)
|
|
511
|
+
return;
|
|
512
|
+
const task = createTask();
|
|
513
|
+
const onScroll = (event) => {
|
|
514
|
+
task.run(() => {
|
|
515
|
+
if (!renderOnScrollProp(event))
|
|
516
|
+
return;
|
|
517
|
+
offsetsRef.current = getOffsets(renderer, scroller, horizontal);
|
|
518
|
+
processVisibleIndicesEvent();
|
|
519
|
+
});
|
|
520
|
+
};
|
|
521
|
+
viewport.addEventListener("scroll", onScroll, { passive: true });
|
|
522
|
+
return () => {
|
|
523
|
+
task.cancel();
|
|
524
|
+
viewport.removeEventListener("scroll", onScroll);
|
|
525
|
+
};
|
|
526
|
+
}, [
|
|
527
|
+
mayRenderOnScroll,
|
|
528
|
+
scroller,
|
|
529
|
+
renderOnScrollProp,
|
|
530
|
+
horizontal,
|
|
531
|
+
processVisibleIndicesEvent
|
|
532
|
+
]);
|
|
533
|
+
const mayRenderOnResize = !!renderOnResize;
|
|
534
|
+
const renderOnResizeProp = _5WLTMVVQcjs.useBooleanEvent.call(void 0, renderOnResize);
|
|
535
|
+
_react.useEffect.call(void 0, () => {
|
|
536
|
+
if (!mayRenderOnResize)
|
|
537
|
+
return;
|
|
538
|
+
const renderer = ref.current;
|
|
539
|
+
if (!renderer)
|
|
540
|
+
return;
|
|
541
|
+
if (!scroller)
|
|
542
|
+
return;
|
|
543
|
+
const viewport = getViewport(scroller);
|
|
544
|
+
if (!viewport)
|
|
545
|
+
return;
|
|
546
|
+
const task = createTask();
|
|
547
|
+
if (viewport === scroller) {
|
|
548
|
+
if (typeof ResizeObserver !== "function")
|
|
549
|
+
return;
|
|
550
|
+
let firstRun = true;
|
|
551
|
+
const observer = new ResizeObserver(() => {
|
|
552
|
+
if (firstRun) {
|
|
553
|
+
firstRun = false;
|
|
554
|
+
return;
|
|
555
|
+
}
|
|
556
|
+
task.run(() => {
|
|
557
|
+
if (!renderOnResizeProp(scroller))
|
|
558
|
+
return;
|
|
559
|
+
offsetsRef.current = getOffsets(renderer, scroller, horizontal);
|
|
560
|
+
processVisibleIndicesEvent();
|
|
561
|
+
});
|
|
562
|
+
});
|
|
563
|
+
observer.observe(scroller);
|
|
564
|
+
return () => {
|
|
565
|
+
task.cancel();
|
|
566
|
+
observer.disconnect();
|
|
567
|
+
};
|
|
568
|
+
}
|
|
569
|
+
const onResize = () => {
|
|
570
|
+
task.run(() => {
|
|
571
|
+
if (!renderOnResizeProp(scroller))
|
|
572
|
+
return;
|
|
573
|
+
offsetsRef.current = getOffsets(renderer, scroller, horizontal);
|
|
574
|
+
processVisibleIndicesEvent();
|
|
575
|
+
});
|
|
576
|
+
};
|
|
577
|
+
viewport.addEventListener("resize", onResize, { passive: true });
|
|
578
|
+
return () => {
|
|
579
|
+
task.cancel();
|
|
580
|
+
viewport.removeEventListener("resize", onResize);
|
|
581
|
+
};
|
|
582
|
+
}, [
|
|
583
|
+
mayRenderOnResize,
|
|
584
|
+
scroller,
|
|
585
|
+
renderOnResizeProp,
|
|
586
|
+
horizontal,
|
|
587
|
+
processVisibleIndicesEvent
|
|
588
|
+
]);
|
|
589
|
+
_react.useEffect.call(void 0, () => {
|
|
590
|
+
if (typeof IntersectionObserver !== "function")
|
|
591
|
+
return;
|
|
592
|
+
const renderer = ref.current;
|
|
593
|
+
if (!renderer)
|
|
594
|
+
return;
|
|
595
|
+
if (!scroller)
|
|
596
|
+
return;
|
|
597
|
+
const viewport = getViewport(scroller);
|
|
598
|
+
if (!viewport)
|
|
599
|
+
return;
|
|
600
|
+
const observer = new IntersectionObserver(
|
|
601
|
+
() => {
|
|
602
|
+
offsetsRef.current = getOffsets(renderer, scroller, horizontal);
|
|
603
|
+
processVisibleIndicesEvent();
|
|
604
|
+
},
|
|
605
|
+
{ root: scroller === viewport ? scroller : null }
|
|
606
|
+
);
|
|
607
|
+
observer.observe(renderer);
|
|
608
|
+
return () => {
|
|
609
|
+
observer.disconnect();
|
|
610
|
+
};
|
|
611
|
+
}, [scroller, processVisibleIndicesEvent]);
|
|
612
|
+
const elementObserver = _react.useMemo.call(void 0, () => {
|
|
613
|
+
if (typeof ResizeObserver !== "function")
|
|
614
|
+
return;
|
|
615
|
+
return new ResizeObserver(() => {
|
|
616
|
+
_reactdom.flushSync.call(void 0, updateElements);
|
|
617
|
+
});
|
|
618
|
+
}, [updateElements]);
|
|
619
|
+
const itemRef = _react.useCallback.call(void 0,
|
|
620
|
+
(element) => {
|
|
621
|
+
if (!element)
|
|
622
|
+
return;
|
|
623
|
+
if (itemSize)
|
|
624
|
+
return;
|
|
625
|
+
updateElements();
|
|
626
|
+
elements.set(element.id, element);
|
|
627
|
+
elementObserver == null ? void 0 : elementObserver.observe(element);
|
|
628
|
+
},
|
|
629
|
+
[itemSize, elements, updateElements, elementObserver]
|
|
630
|
+
);
|
|
631
|
+
const getItemProps = _react.useCallback.call(void 0,
|
|
632
|
+
(item, index) => {
|
|
633
|
+
var _a3, _b3;
|
|
634
|
+
const itemId = getItemId(item, index, baseId);
|
|
635
|
+
const offset = itemSize ? paddingStart + itemSize * index + gap * index : (_b3 = (_a3 = data.get(itemId)) == null ? void 0 : _a3.start) != null ? _b3 : 0;
|
|
636
|
+
const baseItemProps = {
|
|
637
|
+
id: itemId,
|
|
638
|
+
ref: itemRef,
|
|
639
|
+
index,
|
|
640
|
+
style: {
|
|
641
|
+
position: "absolute",
|
|
642
|
+
left: horizontal ? offset : 0,
|
|
643
|
+
top: horizontal ? 0 : offset
|
|
644
|
+
}
|
|
645
|
+
};
|
|
646
|
+
if (itemSize) {
|
|
647
|
+
baseItemProps.style[horizontal ? "width" : "height"] = itemSize;
|
|
648
|
+
}
|
|
649
|
+
if (item == null)
|
|
650
|
+
return baseItemProps;
|
|
651
|
+
const itemProps = getItemObject(item);
|
|
652
|
+
return _72I2GWXFcjs.__spreadProps.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, {}, itemProps), baseItemProps), {
|
|
653
|
+
style: _72I2GWXFcjs.__spreadValues.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, {}, itemProps.style), baseItemProps.style)
|
|
654
|
+
});
|
|
655
|
+
},
|
|
656
|
+
[baseId, data, itemSize, paddingStart, gap, horizontal, itemRef]
|
|
657
|
+
);
|
|
658
|
+
const itemsProps = _react.useMemo.call(void 0, () => {
|
|
659
|
+
return visibleIndices.map((index) => {
|
|
660
|
+
if (index < 0)
|
|
661
|
+
return;
|
|
662
|
+
const item = getItem(items, index);
|
|
663
|
+
if (!item)
|
|
664
|
+
return;
|
|
665
|
+
return getItemProps(item, index);
|
|
666
|
+
}).filter((value) => value != null);
|
|
667
|
+
}, [items, visibleIndices, getItemProps]);
|
|
668
|
+
const children = itemsProps == null ? void 0 : itemsProps.map((itemProps) => {
|
|
669
|
+
return renderItem == null ? void 0 : renderItem(itemProps);
|
|
670
|
+
});
|
|
671
|
+
const styleProp = props.style;
|
|
672
|
+
const sizeProperty = horizontal ? "width" : "height";
|
|
673
|
+
const style = _react.useMemo.call(void 0,
|
|
674
|
+
() => _72I2GWXFcjs.__spreadValues.call(void 0, {
|
|
675
|
+
flex: "none",
|
|
676
|
+
position: "relative",
|
|
677
|
+
[sizeProperty]: totalSize
|
|
678
|
+
}, styleProp),
|
|
679
|
+
[styleProp, sizeProperty, totalSize]
|
|
680
|
+
);
|
|
681
|
+
const childrenData = _react.useMemo.call(void 0, () => /* @__PURE__ */ new Map(), []);
|
|
682
|
+
const providerValue = _react.useMemo.call(void 0,
|
|
683
|
+
() => ({ store, orientation, overscan, childrenData }),
|
|
684
|
+
[store, orientation, overscan, childrenData]
|
|
685
|
+
);
|
|
686
|
+
props = _5WLTMVVQcjs.useWrapElement.call(void 0,
|
|
687
|
+
props,
|
|
688
|
+
(element) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CollectionRendererContext.Provider, { value: providerValue, children: element }),
|
|
689
|
+
[providerValue]
|
|
690
|
+
);
|
|
691
|
+
props = _72I2GWXFcjs.__spreadProps.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, {
|
|
692
|
+
id: baseId
|
|
693
|
+
}, props), {
|
|
694
|
+
style,
|
|
695
|
+
ref: _5WLTMVVQcjs.useMergeRefs.call(void 0, ref, props.ref)
|
|
696
|
+
});
|
|
697
|
+
return _72I2GWXFcjs.__spreadProps.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, {}, props), { children });
|
|
698
|
+
}
|
|
699
|
+
var CollectionRenderer = _CWY2PHPRcjs.forwardRef.call(void 0, function CollectionRenderer2(props) {
|
|
700
|
+
const htmlProps = useCollectionRenderer(props);
|
|
701
|
+
return _CWY2PHPRcjs.createElement.call(void 0, "div", htmlProps);
|
|
702
|
+
});
|
|
703
|
+
var getCollectionRendererItem = getItem;
|
|
704
|
+
var getCollectionRendererItemId = getItemId;
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
exports.useCollectionRenderer = useCollectionRenderer; exports.CollectionRenderer = CollectionRenderer; exports.getCollectionRendererItem = getCollectionRendererItem; exports.getCollectionRendererItemId = getCollectionRendererItemId;
|