@mieweb/ui 0.10.0-dev.4 → 0.10.0-dev.40
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/README.md +4 -4
- package/agent/mieweb-ui.instructions.md +90 -1
- package/dist/CsvBlock-CFXSDPBI.js +9 -0
- package/dist/{CsvBlock-UWPMTLE2.js.map → CsvBlock-CFXSDPBI.js.map} +1 -1
- package/dist/CsvBlock-RGO7JXHJ.cjs +18 -0
- package/dist/{CsvBlock-ROJCKJDP.cjs.map → CsvBlock-RGO7JXHJ.cjs.map} +1 -1
- package/dist/HtmlPreviewBlock-VBYXCXVT.cjs +18 -0
- package/dist/{HtmlPreviewBlock-DWFN6EUB.cjs.map → HtmlPreviewBlock-VBYXCXVT.cjs.map} +1 -1
- package/dist/HtmlPreviewBlock-Z2GCK325.js +9 -0
- package/dist/{HtmlPreviewBlock-ME5U3XNS.js.map → HtmlPreviewBlock-Z2GCK325.js.map} +1 -1
- package/dist/MermaidBlock-I2R2BQOX.cjs +18 -0
- package/dist/{MermaidBlock-D2UC5M55.cjs.map → MermaidBlock-I2R2BQOX.cjs.map} +1 -1
- package/dist/MermaidBlock-XCAK7IA5.js +9 -0
- package/dist/{MermaidBlock-2B6CPD6Y.js.map → MermaidBlock-XCAK7IA5.js.map} +1 -1
- package/dist/SurveyBlock-KI5JOWCL.js +9 -0
- package/dist/{SurveyBlock-4DO62RBT.js.map → SurveyBlock-KI5JOWCL.js.map} +1 -1
- package/dist/SurveyBlock-UKSGISRT.cjs +18 -0
- package/dist/{SurveyBlock-4CD4AYMJ.cjs.map → SurveyBlock-UKSGISRT.cjs.map} +1 -1
- package/dist/ag-grid.d.cts +142 -1
- package/dist/ag-grid.d.ts +142 -1
- package/dist/brands/bluehive.cjs +3 -3
- package/dist/brands/bluehive.css +3 -0
- package/dist/brands/bluehive.js +1 -1
- package/dist/brands/index.cjs +14 -14
- package/dist/brands/index.js +4 -4
- package/dist/{chunk-3M7TAXNR.js → chunk-24AFHH4J.js} +3 -3
- package/dist/{chunk-3M7TAXNR.js.map → chunk-24AFHH4J.js.map} +1 -1
- package/dist/{chunk-JYZW2PZS.cjs → chunk-254QK722.cjs} +7 -7
- package/dist/chunk-254QK722.cjs.map +1 -0
- package/dist/{chunk-VPIYTQCV.cjs → chunk-2I4IRQQG.cjs} +12 -5
- package/dist/chunk-2I4IRQQG.cjs.map +1 -0
- package/dist/chunk-2X54ZLT6.js +874 -0
- package/dist/chunk-2X54ZLT6.js.map +1 -0
- package/dist/{chunk-5MCBWTIF.cjs → chunk-32ZCJOSR.cjs} +4 -4
- package/dist/{chunk-5MCBWTIF.cjs.map → chunk-32ZCJOSR.cjs.map} +1 -1
- package/dist/chunk-3YBS4WUQ.js +52 -0
- package/dist/chunk-3YBS4WUQ.js.map +1 -0
- package/dist/{chunk-WNJRS7Y7.cjs → chunk-3ZWCIPFT.cjs} +4 -2
- package/dist/chunk-3ZWCIPFT.cjs.map +1 -0
- package/dist/chunk-434L5RYF.js +314 -0
- package/dist/chunk-434L5RYF.js.map +1 -0
- package/dist/{chunk-TPWKM7JH.js → chunk-43K7OQ3E.js} +3 -3
- package/dist/{chunk-TPWKM7JH.js.map → chunk-43K7OQ3E.js.map} +1 -1
- package/dist/chunk-47P5QLX4.cjs +42 -0
- package/dist/chunk-47P5QLX4.cjs.map +1 -0
- package/dist/chunk-4IS3QCOQ.cjs +453 -0
- package/dist/chunk-4IS3QCOQ.cjs.map +1 -0
- package/dist/chunk-4NCDU5IG.cjs +56 -0
- package/dist/chunk-4NCDU5IG.cjs.map +1 -0
- package/dist/chunk-4ZB7RSMY.cjs +306 -0
- package/dist/chunk-4ZB7RSMY.cjs.map +1 -0
- package/dist/chunk-522WJIVI.js +99 -0
- package/dist/chunk-522WJIVI.js.map +1 -0
- package/dist/chunk-56VTM4OX.js +261 -0
- package/dist/chunk-56VTM4OX.js.map +1 -0
- package/dist/chunk-5HKZR6UG.js +248 -0
- package/dist/chunk-5HKZR6UG.js.map +1 -0
- package/dist/chunk-6BNZLN4B.cjs +548 -0
- package/dist/chunk-6BNZLN4B.cjs.map +1 -0
- package/dist/chunk-6N7NMOSV.js +233 -0
- package/dist/chunk-6N7NMOSV.js.map +1 -0
- package/dist/chunk-6TTCZY3P.cjs +4 -0
- package/dist/chunk-6TTCZY3P.cjs.map +1 -0
- package/dist/{chunk-YQDA366U.js → chunk-753ENNB6.js} +2 -2
- package/dist/{chunk-YQDA366U.js.map → chunk-753ENNB6.js.map} +1 -1
- package/dist/{chunk-N6IY47YA.cjs → chunk-7C5W744U.cjs} +8 -8
- package/dist/{chunk-N6IY47YA.cjs.map → chunk-7C5W744U.cjs.map} +1 -1
- package/dist/chunk-7E46YDOT.cjs +122 -0
- package/dist/chunk-7E46YDOT.cjs.map +1 -0
- package/dist/chunk-7HUTR6RX.js +178 -0
- package/dist/chunk-7HUTR6RX.js.map +1 -0
- package/dist/chunk-7IRTD4JT.cjs +61 -0
- package/dist/chunk-7IRTD4JT.cjs.map +1 -0
- package/dist/{chunk-KZFBQ7GY.js → chunk-7QW6TU4X.js} +3 -3
- package/dist/{chunk-KZFBQ7GY.js.map → chunk-7QW6TU4X.js.map} +1 -1
- package/dist/{chunk-MWVW4APN.cjs → chunk-7UTBDFFL.cjs} +4 -4
- package/dist/{chunk-MWVW4APN.cjs.map → chunk-7UTBDFFL.cjs.map} +1 -1
- package/dist/chunk-7WJ6MBF5.cjs +47 -0
- package/dist/chunk-7WJ6MBF5.cjs.map +1 -0
- package/dist/{chunk-FJ7YPVKV.js → chunk-7X6R3JIA.js} +3 -3
- package/dist/{chunk-FJ7YPVKV.js.map → chunk-7X6R3JIA.js.map} +1 -1
- package/dist/chunk-A4W5CSK7.cjs +216 -0
- package/dist/chunk-A4W5CSK7.cjs.map +1 -0
- package/dist/{chunk-2G75X6TS.cjs → chunk-AHHFFXJR.cjs} +3 -3
- package/dist/{chunk-2G75X6TS.cjs.map → chunk-AHHFFXJR.cjs.map} +1 -1
- package/dist/chunk-AJPFQF3H.cjs +896 -0
- package/dist/chunk-AJPFQF3H.cjs.map +1 -0
- package/dist/chunk-AMYFRY7K.js +3 -0
- package/dist/chunk-AMYFRY7K.js.map +1 -0
- package/dist/{chunk-VNYW4C4J.cjs → chunk-ANMX7YDL.cjs} +4 -84
- package/dist/chunk-ANMX7YDL.cjs.map +1 -0
- package/dist/chunk-ARIJ5OHW.cjs +139 -0
- package/dist/chunk-ARIJ5OHW.cjs.map +1 -0
- package/dist/{chunk-DVOQ3JNO.js → chunk-B4CKCNWD.js} +16 -8
- package/dist/chunk-B4CKCNWD.js.map +1 -0
- package/dist/chunk-BJ6ABRSQ.cjs +256 -0
- package/dist/chunk-BJ6ABRSQ.cjs.map +1 -0
- package/dist/chunk-BM35CACB.js +148 -0
- package/dist/chunk-BM35CACB.js.map +1 -0
- package/dist/{chunk-G3JX3UAU.cjs → chunk-BWSZ2BHJ.cjs} +6 -6
- package/dist/{chunk-G3JX3UAU.cjs.map → chunk-BWSZ2BHJ.cjs.map} +1 -1
- package/dist/chunk-BXRQ6HEP.cjs +4 -0
- package/dist/chunk-BXRQ6HEP.cjs.map +1 -0
- package/dist/{chunk-SGFYA22I.cjs → chunk-C77FAR3F.cjs} +8 -8
- package/dist/{chunk-SGFYA22I.cjs.map → chunk-C77FAR3F.cjs.map} +1 -1
- package/dist/chunk-CBBKWRLG.js +213 -0
- package/dist/chunk-CBBKWRLG.js.map +1 -0
- package/dist/{chunk-UAMXCMST.cjs → chunk-CFI3TQMA.cjs} +3 -3
- package/dist/{chunk-UAMXCMST.cjs.map → chunk-CFI3TQMA.cjs.map} +1 -1
- package/dist/chunk-CLQW724U.cjs +271 -0
- package/dist/chunk-CLQW724U.cjs.map +1 -0
- package/dist/chunk-CPDNX3LS.cjs +47 -0
- package/dist/chunk-CPDNX3LS.cjs.map +1 -0
- package/dist/chunk-CVNPNZMX.js +44 -0
- package/dist/chunk-CVNPNZMX.js.map +1 -0
- package/dist/{chunk-2YCERQWC.js → chunk-CVXESGXJ.js} +10 -9
- package/dist/chunk-CVXESGXJ.js.map +1 -0
- package/dist/chunk-DGHS5IVD.js +305 -0
- package/dist/chunk-DGHS5IVD.js.map +1 -0
- package/dist/chunk-DHGCLPFZ.js +91 -0
- package/dist/chunk-DHGCLPFZ.js.map +1 -0
- package/dist/{chunk-GD7EBGC4.cjs → chunk-DHU3FFC3.cjs} +49 -19
- package/dist/chunk-DHU3FFC3.cjs.map +1 -0
- package/dist/chunk-DO2YN46R.cjs +201 -0
- package/dist/chunk-DO2YN46R.cjs.map +1 -0
- package/dist/chunk-DVDT7TX7.js +151 -0
- package/dist/chunk-DVDT7TX7.js.map +1 -0
- package/dist/chunk-DXEPYK3I.cjs +92 -0
- package/dist/chunk-DXEPYK3I.cjs.map +1 -0
- package/dist/{chunk-X4XPNTCZ.cjs → chunk-DZ3JTMKM.cjs} +136 -58
- package/dist/chunk-DZ3JTMKM.cjs.map +1 -0
- package/dist/chunk-EACNRR3C.cjs +4 -0
- package/dist/chunk-EACNRR3C.cjs.map +1 -0
- package/dist/{chunk-ZGRCSNPK.js → chunk-EEOGIGIA.js} +4 -4
- package/dist/{chunk-ZGRCSNPK.js.map → chunk-EEOGIGIA.js.map} +1 -1
- package/dist/chunk-EPCUPHEO.js +193 -0
- package/dist/chunk-EPCUPHEO.js.map +1 -0
- package/dist/{chunk-7ZXAQTV4.cjs → chunk-ERACGSDY.cjs} +8 -8
- package/dist/{chunk-7ZXAQTV4.cjs.map → chunk-ERACGSDY.cjs.map} +1 -1
- package/dist/{chunk-OD47TTAW.cjs → chunk-F2FOG4EG.cjs} +9 -9
- package/dist/{chunk-OD47TTAW.cjs.map → chunk-F2FOG4EG.cjs.map} +1 -1
- package/dist/chunk-F3EWRDIT.js +312 -0
- package/dist/chunk-F3EWRDIT.js.map +1 -0
- package/dist/{chunk-XCP454Q6.js → chunk-F4N67NAF.js} +12 -3
- package/dist/chunk-F4N67NAF.js.map +1 -0
- package/dist/{chunk-WGPLUCBD.js → chunk-F6W62K4J.js} +4 -4
- package/dist/{chunk-WGPLUCBD.js.map → chunk-F6W62K4J.js.map} +1 -1
- package/dist/chunk-FBCDYTWM.js +385 -0
- package/dist/chunk-FBCDYTWM.js.map +1 -0
- package/dist/{chunk-V7D3YGUV.js → chunk-FGLIP6YR.js} +4 -4
- package/dist/{chunk-V7D3YGUV.js.map → chunk-FGLIP6YR.js.map} +1 -1
- package/dist/{chunk-VU6UTJRM.js → chunk-FIKO4WR6.js} +3 -3
- package/dist/{chunk-VU6UTJRM.js.map → chunk-FIKO4WR6.js.map} +1 -1
- package/dist/chunk-FSGJXCBG.cjs +318 -0
- package/dist/chunk-FSGJXCBG.cjs.map +1 -0
- package/dist/chunk-FSWHZY3T.cjs +328 -0
- package/dist/chunk-FSWHZY3T.cjs.map +1 -0
- package/dist/chunk-FTEZNCRI.js +29 -0
- package/dist/chunk-FTEZNCRI.js.map +1 -0
- package/dist/{chunk-YVPC65ZJ.cjs → chunk-GF2BE4FB.cjs} +91 -32
- package/dist/chunk-GF2BE4FB.cjs.map +1 -0
- package/dist/{chunk-JEIW7BSV.cjs → chunk-GKDHMNUA.cjs} +2 -52
- package/dist/chunk-GKDHMNUA.cjs.map +1 -0
- package/dist/chunk-GM32IDVL.cjs +356 -0
- package/dist/chunk-GM32IDVL.cjs.map +1 -0
- package/dist/chunk-GVM6DTR5.js +90 -0
- package/dist/chunk-GVM6DTR5.js.map +1 -0
- package/dist/{chunk-SQHMGT4W.js → chunk-GW4RFJZ5.js} +7 -7
- package/dist/chunk-GW4RFJZ5.js.map +1 -0
- package/dist/chunk-GY5SP4ST.js +3 -0
- package/dist/chunk-GY5SP4ST.js.map +1 -0
- package/dist/chunk-H2Y7HZV5.js +3 -0
- package/dist/chunk-H2Y7HZV5.js.map +1 -0
- package/dist/chunk-H3P7POFC.cjs +337 -0
- package/dist/chunk-H3P7POFC.cjs.map +1 -0
- package/dist/{chunk-JID7AZTO.cjs → chunk-H3ROMJYI.cjs} +4 -4
- package/dist/{chunk-JID7AZTO.cjs.map → chunk-H3ROMJYI.cjs.map} +1 -1
- package/dist/{chunk-462XSCP3.cjs → chunk-HCIXGFWR.cjs} +4 -4
- package/dist/{chunk-462XSCP3.cjs.map → chunk-HCIXGFWR.cjs.map} +1 -1
- package/dist/{chunk-H4ZXMQQW.js → chunk-HDY7YQFX.js} +3 -3
- package/dist/{chunk-H4ZXMQQW.js.map → chunk-HDY7YQFX.js.map} +1 -1
- package/dist/chunk-HNFFFFYH.cjs +114 -0
- package/dist/chunk-HNFFFFYH.cjs.map +1 -0
- package/dist/chunk-HNXLLDPN.js +25 -0
- package/dist/chunk-HNXLLDPN.js.map +1 -0
- package/dist/{chunk-NV2CWBI2.cjs → chunk-IEY3ZJIT.cjs} +12 -3
- package/dist/chunk-IEY3ZJIT.cjs.map +1 -0
- package/dist/{chunk-3QEVGSFG.cjs → chunk-IGDO62KR.cjs} +5 -5
- package/dist/{chunk-3QEVGSFG.cjs.map → chunk-IGDO62KR.cjs.map} +1 -1
- package/dist/chunk-IT775BYG.js +179 -0
- package/dist/chunk-IT775BYG.js.map +1 -0
- package/dist/{chunk-N5O47VGS.cjs → chunk-IVGI353O.cjs} +2 -2
- package/dist/{chunk-N5O47VGS.cjs.map → chunk-IVGI353O.cjs.map} +1 -1
- package/dist/chunk-IWRBJHO3.cjs +51 -0
- package/dist/chunk-IWRBJHO3.cjs.map +1 -0
- package/dist/{chunk-VILW53UZ.js → chunk-JMAZ2GKT.js} +3 -3
- package/dist/{chunk-VILW53UZ.js.map → chunk-JMAZ2GKT.js.map} +1 -1
- package/dist/{chunk-WWJIW2IH.cjs → chunk-JSXIB6EJ.cjs} +4 -4
- package/dist/{chunk-WWJIW2IH.cjs.map → chunk-JSXIB6EJ.cjs.map} +1 -1
- package/dist/{chunk-KRU6IGV7.js → chunk-JUJGWUAN.js} +28 -6
- package/dist/chunk-JUJGWUAN.js.map +1 -0
- package/dist/{chunk-FXO5ARBB.cjs → chunk-KDW6BD4O.cjs} +4 -4
- package/dist/{chunk-FXO5ARBB.cjs.map → chunk-KDW6BD4O.cjs.map} +1 -1
- package/dist/{chunk-Z5V7SAZ4.js → chunk-KFEN2SRZ.js} +3 -3
- package/dist/{chunk-Z5V7SAZ4.js.map → chunk-KFEN2SRZ.js.map} +1 -1
- package/dist/{chunk-XEAT7XJG.cjs → chunk-KQ6GLYFZ.cjs} +29 -13
- package/dist/chunk-KQ6GLYFZ.cjs.map +1 -0
- package/dist/chunk-L6K4PRZK.cjs +4 -0
- package/dist/chunk-L6K4PRZK.cjs.map +1 -0
- package/dist/{chunk-7ZDPD5ZX.cjs → chunk-LC3JL2HB.cjs} +11 -7
- package/dist/chunk-LC3JL2HB.cjs.map +1 -0
- package/dist/{chunk-P7UMS4E6.cjs → chunk-LC7PVBXH.cjs} +16 -8
- package/dist/chunk-LC7PVBXH.cjs.map +1 -0
- package/dist/{chunk-Y5HFM7LO.js → chunk-LDBNUJB7.js} +5 -5
- package/dist/{chunk-Y5HFM7LO.js.map → chunk-LDBNUJB7.js.map} +1 -1
- package/dist/chunk-LRAAJRE7.cjs +2707 -0
- package/dist/chunk-LRAAJRE7.cjs.map +1 -0
- package/dist/chunk-LUPRGPKP.js +2540 -0
- package/dist/chunk-LUPRGPKP.js.map +1 -0
- package/dist/chunk-M3VPGJMV.js +283 -0
- package/dist/chunk-M3VPGJMV.js.map +1 -0
- package/dist/{chunk-VKELAMAZ.js → chunk-N54FYWG6.js} +27 -11
- package/dist/chunk-N54FYWG6.js.map +1 -0
- package/dist/chunk-N5JDL4VE.js +3 -0
- package/dist/chunk-N5JDL4VE.js.map +1 -0
- package/dist/{chunk-2QKBTPUC.cjs → chunk-NAH65KPK.cjs} +8 -8
- package/dist/{chunk-2QKBTPUC.cjs.map → chunk-NAH65KPK.cjs.map} +1 -1
- package/dist/{chunk-PYJDVWXM.js → chunk-NUB5HRKS.js} +3 -3
- package/dist/{chunk-PYJDVWXM.js.map → chunk-NUB5HRKS.js.map} +1 -1
- package/dist/{chunk-WNZAYBVB.cjs → chunk-O6BJMVGT.cjs} +48 -48
- package/dist/{chunk-WNZAYBVB.cjs.map → chunk-O6BJMVGT.cjs.map} +1 -1
- package/dist/{chunk-SVSHA7XV.js → chunk-O6XDA3SI.js} +31 -33
- package/dist/chunk-O6XDA3SI.js.map +1 -0
- package/dist/chunk-OIF34LEN.cjs +425 -0
- package/dist/chunk-OIF34LEN.cjs.map +1 -0
- package/dist/chunk-OIMXMPH2.cjs +218 -0
- package/dist/chunk-OIMXMPH2.cjs.map +1 -0
- package/dist/{chunk-J5CSLNCN.cjs → chunk-OODVC2UD.cjs} +2 -2
- package/dist/{chunk-J5CSLNCN.cjs.map → chunk-OODVC2UD.cjs.map} +1 -1
- package/dist/{chunk-ACCAXVOG.js → chunk-OSTSZDQC.js} +134 -56
- package/dist/chunk-OSTSZDQC.js.map +1 -0
- package/dist/{chunk-LL6IWKI3.js → chunk-OW3SQJ7P.js} +3 -3
- package/dist/{chunk-LL6IWKI3.js.map → chunk-OW3SQJ7P.js.map} +1 -1
- package/dist/chunk-P22YCUVM.cjs +4 -0
- package/dist/chunk-P22YCUVM.cjs.map +1 -0
- package/dist/{chunk-CEQJGUAS.js → chunk-P4E3K3ND.js} +12 -5
- package/dist/chunk-P4E3K3ND.js.map +1 -0
- package/dist/{chunk-5GUOOLPR.cjs → chunk-P5CMZZRZ.cjs} +5 -5
- package/dist/{chunk-5GUOOLPR.cjs.map → chunk-P5CMZZRZ.cjs.map} +1 -1
- package/dist/{chunk-TMMVIUUN.js → chunk-P7D7BYFE.js} +4 -4
- package/dist/{chunk-TMMVIUUN.js.map → chunk-P7D7BYFE.js.map} +1 -1
- package/dist/{chunk-3T7QGLNB.js → chunk-PJEL5ZZV.js} +4 -2
- package/dist/chunk-PJEL5ZZV.js.map +1 -0
- package/dist/chunk-PYI2IWNX.cjs +281 -0
- package/dist/chunk-PYI2IWNX.cjs.map +1 -0
- package/dist/chunk-Q3YVLO52.cjs +174 -0
- package/dist/chunk-Q3YVLO52.cjs.map +1 -0
- package/dist/{chunk-WNM7IZJ7.js → chunk-QJ2L5RU6.js} +7 -7
- package/dist/{chunk-WNM7IZJ7.js.map → chunk-QJ2L5RU6.js.map} +1 -1
- package/dist/{chunk-X4LBUPJO.cjs → chunk-QX6AAVDE.cjs} +31 -33
- package/dist/chunk-QX6AAVDE.cjs.map +1 -0
- package/dist/{chunk-UV2FVNWT.cjs → chunk-RIUQP2QS.cjs} +5 -5
- package/dist/{chunk-UV2FVNWT.cjs.map → chunk-RIUQP2QS.cjs.map} +1 -1
- package/dist/chunk-RLVYWUXG.js +115 -0
- package/dist/chunk-RLVYWUXG.js.map +1 -0
- package/dist/{chunk-22CYDCXA.js → chunk-RM2HPQIC.js} +105 -14
- package/dist/chunk-RM2HPQIC.js.map +1 -0
- package/dist/{chunk-DEDN5HAG.js → chunk-RSJGTWLM.js} +3 -3
- package/dist/{chunk-DEDN5HAG.js.map → chunk-RSJGTWLM.js.map} +1 -1
- package/dist/{chunk-6EN3IQQI.cjs → chunk-RV45J2ZT.cjs} +8 -8
- package/dist/{chunk-6EN3IQQI.cjs.map → chunk-RV45J2ZT.cjs.map} +1 -1
- package/dist/chunk-RZSSQ7AT.js +333 -0
- package/dist/chunk-RZSSQ7AT.js.map +1 -0
- package/dist/{chunk-ENKFJJZX.js → chunk-S2JZL4JC.js} +6 -6
- package/dist/{chunk-ENKFJJZX.js.map → chunk-S2JZL4JC.js.map} +1 -1
- package/dist/{chunk-ELPW32ZI.cjs → chunk-S4XCPDEO.cjs} +60 -59
- package/dist/chunk-S4XCPDEO.cjs.map +1 -0
- package/dist/{chunk-OE5CKRUC.js → chunk-SACHTD7B.js} +34 -4
- package/dist/chunk-SACHTD7B.js.map +1 -0
- package/dist/{chunk-U42F3HLE.cjs → chunk-SAGJHL2Z.cjs} +275 -5
- package/dist/chunk-SAGJHL2Z.cjs.map +1 -0
- package/dist/{chunk-VROIMIHB.cjs → chunk-SHBCUXFS.cjs} +28 -6
- package/dist/chunk-SHBCUXFS.cjs.map +1 -0
- package/dist/{chunk-RJ6NTJHC.js → chunk-SRMTRD7F.js} +3 -3
- package/dist/{chunk-RJ6NTJHC.js.map → chunk-SRMTRD7F.js.map} +1 -1
- package/dist/{chunk-IX6KFB3K.cjs → chunk-SW2E7XKY.cjs} +9 -9
- package/dist/{chunk-IX6KFB3K.cjs.map → chunk-SW2E7XKY.cjs.map} +1 -1
- package/dist/chunk-SZSRGUVO.js +402 -0
- package/dist/chunk-SZSRGUVO.js.map +1 -0
- package/dist/{chunk-NJ6MY6V5.js → chunk-T5BBZQ66.js} +3 -3
- package/dist/{chunk-NJ6MY6V5.js.map → chunk-T5BBZQ66.js.map} +1 -1
- package/dist/{chunk-JI244Y7C.js → chunk-T5NOFXOL.js} +275 -5
- package/dist/chunk-T5NOFXOL.js.map +1 -0
- package/dist/{chunk-2IZLKPUW.js → chunk-THLIL6PY.js} +3 -3
- package/dist/{chunk-2IZLKPUW.js.map → chunk-THLIL6PY.js.map} +1 -1
- package/dist/{chunk-HZ4MBUC3.js → chunk-TI3TQQ7F.js} +4 -53
- package/dist/chunk-TI3TQQ7F.js.map +1 -0
- package/dist/chunk-TVU4KB27.cjs +353 -0
- package/dist/chunk-TVU4KB27.cjs.map +1 -0
- package/dist/{chunk-5JJ2DAE4.js → chunk-TWQSMUE6.js} +7 -3
- package/dist/chunk-TWQSMUE6.js.map +1 -0
- package/dist/{chunk-TAXD5ADA.cjs → chunk-UEDTZYGI.cjs} +3 -3
- package/dist/{chunk-TAXD5ADA.cjs.map → chunk-UEDTZYGI.cjs.map} +1 -1
- package/dist/{chunk-3QGS6CXD.js → chunk-UJDWFDKE.js} +3 -3
- package/dist/{chunk-3QGS6CXD.js.map → chunk-UJDWFDKE.js.map} +1 -1
- package/dist/chunk-UNFDIBKJ.js +258 -0
- package/dist/chunk-UNFDIBKJ.js.map +1 -0
- package/dist/{chunk-UQ3VVR6A.cjs → chunk-UPWIJC6I.cjs} +3 -3
- package/dist/{chunk-UQ3VVR6A.cjs.map → chunk-UPWIJC6I.cjs.map} +1 -1
- package/dist/chunk-UTIPENPW.cjs +286 -0
- package/dist/chunk-UTIPENPW.cjs.map +1 -0
- package/dist/{chunk-S7WCHDBO.js → chunk-VCI2Y7ST.js} +3 -3
- package/dist/{chunk-S7WCHDBO.js.map → chunk-VCI2Y7ST.js.map} +1 -1
- package/dist/chunk-VEE46VTX.js +166 -0
- package/dist/chunk-VEE46VTX.js.map +1 -0
- package/dist/chunk-VFFV7EMT.cjs +188 -0
- package/dist/chunk-VFFV7EMT.cjs.map +1 -0
- package/dist/chunk-VINZZQBD.cjs +323 -0
- package/dist/chunk-VINZZQBD.cjs.map +1 -0
- package/dist/chunk-VPTASZ2O.cjs +171 -0
- package/dist/chunk-VPTASZ2O.cjs.map +1 -0
- package/dist/{chunk-P2CA3XGI.js → chunk-VSRO4PAI.js} +23 -5
- package/dist/chunk-VSRO4PAI.js.map +1 -0
- package/dist/{chunk-L6MDULYB.js → chunk-VU3ZMJBN.js} +2 -2
- package/dist/{chunk-L6MDULYB.js.map → chunk-VU3ZMJBN.js.map} +1 -1
- package/dist/{chunk-XI34EGK5.cjs → chunk-VV2U36T6.cjs} +9 -9
- package/dist/{chunk-XI34EGK5.cjs.map → chunk-VV2U36T6.cjs.map} +1 -1
- package/dist/{chunk-VPWJCJCX.cjs → chunk-VXW7D5LR.cjs} +26 -8
- package/dist/chunk-VXW7D5LR.cjs.map +1 -0
- package/dist/chunk-W3HXHIDO.cjs +2573 -0
- package/dist/chunk-W3HXHIDO.cjs.map +1 -0
- package/dist/{chunk-GOALNQZ2.js → chunk-WFBUBT54.js} +4 -83
- package/dist/chunk-WFBUBT54.js.map +1 -0
- package/dist/chunk-WFL4N5PC.js +283 -0
- package/dist/chunk-WFL4N5PC.js.map +1 -0
- package/dist/chunk-WQHBMZSC.js +295 -0
- package/dist/chunk-WQHBMZSC.js.map +1 -0
- package/dist/chunk-X3RSNAMX.js +195 -0
- package/dist/chunk-X3RSNAMX.js.map +1 -0
- package/dist/chunk-X5JOEZVR.js +525 -0
- package/dist/chunk-X5JOEZVR.js.map +1 -0
- package/dist/chunk-XBAAHOCP.js +3 -0
- package/dist/chunk-XBAAHOCP.js.map +1 -0
- package/dist/chunk-XDIMTPZU.cjs +202 -0
- package/dist/chunk-XDIMTPZU.cjs.map +1 -0
- package/dist/chunk-XDU65GLW.js +21 -0
- package/dist/chunk-XDU65GLW.js.map +1 -0
- package/dist/chunk-XI74P5F2.cjs +424 -0
- package/dist/chunk-XI74P5F2.cjs.map +1 -0
- package/dist/chunk-XNPDZANN.cjs +238 -0
- package/dist/chunk-XNPDZANN.cjs.map +1 -0
- package/dist/{chunk-WIAQQNFU.cjs → chunk-XRVMYT5G.cjs} +106 -13
- package/dist/chunk-XRVMYT5G.cjs.map +1 -0
- package/dist/chunk-XVW5DPPP.js +429 -0
- package/dist/chunk-XVW5DPPP.js.map +1 -0
- package/dist/chunk-XXA4NZUC.js +3 -0
- package/dist/chunk-XXA4NZUC.js.map +1 -0
- package/dist/chunk-Y424YL55.js +59 -0
- package/dist/chunk-Y424YL55.js.map +1 -0
- package/dist/chunk-Y4QNLW7W.js +300 -0
- package/dist/chunk-Y4QNLW7W.js.map +1 -0
- package/dist/chunk-Y7ZJZLJY.js +2657 -0
- package/dist/chunk-Y7ZJZLJY.js.map +1 -0
- package/dist/chunk-YGS2TRMP.js +38 -0
- package/dist/chunk-YGS2TRMP.js.map +1 -0
- package/dist/chunk-YUMOM3KE.js +167 -0
- package/dist/chunk-YUMOM3KE.js.map +1 -0
- package/dist/chunk-YW2AKBLS.cjs +23 -0
- package/dist/chunk-YW2AKBLS.cjs.map +1 -0
- package/dist/chunk-ZNUMOJOI.cjs +4 -0
- package/dist/chunk-ZNUMOJOI.cjs.map +1 -0
- package/dist/chunk-ZSNFL736.cjs +306 -0
- package/dist/chunk-ZSNFL736.cjs.map +1 -0
- package/dist/components/Accordion/index.cjs +2 -2
- package/dist/components/Accordion/index.d.cts +6 -0
- package/dist/components/Accordion/index.d.ts +6 -0
- package/dist/components/Accordion/index.js +1 -1
- package/dist/components/ActionPlan/index.cjs +34 -0
- package/dist/components/ActionPlan/index.cjs.map +1 -0
- package/dist/components/ActionPlan/index.d.cts +65 -0
- package/dist/components/ActionPlan/index.d.ts +65 -0
- package/dist/components/ActionPlan/index.js +21 -0
- package/dist/components/ActionPlan/index.js.map +1 -0
- package/dist/components/ActivityFeed/index.cjs +31 -0
- package/dist/components/ActivityFeed/index.cjs.map +1 -0
- package/dist/components/ActivityFeed/index.d.cts +99 -0
- package/dist/components/ActivityFeed/index.d.ts +99 -0
- package/dist/components/ActivityFeed/index.js +18 -0
- package/dist/components/ActivityFeed/index.js.map +1 -0
- package/dist/components/Alert/index.d.cts +1 -1
- package/dist/components/Alert/index.d.ts +1 -1
- package/dist/components/AlertDialog/index.cjs +19 -5
- package/dist/components/AlertDialog/index.d.cts +94 -16
- package/dist/components/AlertDialog/index.d.ts +94 -16
- package/dist/components/AlertDialog/index.js +6 -4
- package/dist/components/AssociationList/index.cjs +29 -0
- package/dist/components/AssociationList/index.cjs.map +1 -0
- package/dist/components/AssociationList/index.d.cts +50 -0
- package/dist/components/AssociationList/index.d.ts +50 -0
- package/dist/components/AssociationList/index.js +16 -0
- package/dist/components/AssociationList/index.js.map +1 -0
- package/dist/components/AudioRecorder/index.d.cts +2 -2
- package/dist/components/AudioRecorder/index.d.ts +2 -2
- package/dist/components/Autocomplete/index.d.cts +8 -2
- package/dist/components/Autocomplete/index.d.ts +8 -2
- package/dist/components/Avatar/index.cjs +9 -7
- package/dist/components/Avatar/index.d.cts +46 -15
- package/dist/components/Avatar/index.d.ts +46 -15
- package/dist/components/Avatar/index.js +3 -1
- package/dist/components/AvatarGroup/index.cjs +20 -0
- package/dist/components/AvatarGroup/index.cjs.map +1 -0
- package/dist/components/AvatarGroup/index.d.cts +57 -0
- package/dist/components/AvatarGroup/index.d.ts +57 -0
- package/dist/components/AvatarGroup/index.js +7 -0
- package/dist/components/AvatarGroup/index.js.map +1 -0
- package/dist/components/Badge/index.cjs +3 -3
- package/dist/components/Badge/index.d.cts +16 -2
- package/dist/components/Badge/index.d.ts +16 -2
- package/dist/components/Badge/index.js +1 -1
- package/dist/components/BoardView/index.cjs +24 -0
- package/dist/components/BoardView/index.cjs.map +1 -0
- package/dist/components/BoardView/index.d.cts +41 -0
- package/dist/components/BoardView/index.d.ts +41 -0
- package/dist/components/BoardView/index.js +7 -0
- package/dist/components/BoardView/index.js.map +1 -0
- package/dist/components/Button/index.cjs +5 -3
- package/dist/components/Button/index.d.cts +2 -1
- package/dist/components/Button/index.d.ts +2 -1
- package/dist/components/Button/index.js +3 -1
- package/dist/components/CalendarHeatmap/index.cjs +18 -0
- package/dist/components/CalendarHeatmap/index.cjs.map +1 -0
- package/dist/components/CalendarHeatmap/index.d.cts +47 -0
- package/dist/components/CalendarHeatmap/index.d.ts +47 -0
- package/dist/components/CalendarHeatmap/index.js +5 -0
- package/dist/components/CalendarHeatmap/index.js.map +1 -0
- package/dist/components/CalendarView/index.cjs +24 -0
- package/dist/components/CalendarView/index.cjs.map +1 -0
- package/dist/components/CalendarView/index.d.cts +39 -0
- package/dist/components/CalendarView/index.d.ts +39 -0
- package/dist/components/CalendarView/index.js +11 -0
- package/dist/components/CalendarView/index.js.map +1 -0
- package/dist/components/Card/index.d.cts +3 -3
- package/dist/components/Card/index.d.ts +3 -3
- package/dist/components/ClampedText/index.cjs +3 -2
- package/dist/components/ClampedText/index.js +2 -1
- package/dist/components/CollabStatus/index.cjs +6 -4
- package/dist/components/CollabStatus/index.d.cts +11 -0
- package/dist/components/CollabStatus/index.d.ts +11 -0
- package/dist/components/CollabStatus/index.js +3 -1
- package/dist/components/Collapsible/index.cjs +6 -6
- package/dist/components/Collapsible/index.d.cts +6 -0
- package/dist/components/Collapsible/index.d.ts +6 -0
- package/dist/components/Collapsible/index.js +3 -3
- package/dist/components/CompletenessMeter/index.cjs +23 -0
- package/dist/components/CompletenessMeter/index.cjs.map +1 -0
- package/dist/components/CompletenessMeter/index.d.cts +52 -0
- package/dist/components/CompletenessMeter/index.d.ts +52 -0
- package/dist/components/CompletenessMeter/index.js +6 -0
- package/dist/components/CompletenessMeter/index.js.map +1 -0
- package/dist/components/CountryCodeDropdown/index.cjs +5 -5
- package/dist/components/CountryCodeDropdown/index.js +2 -2
- package/dist/components/CustomizableDashboard/index.cjs +12 -10
- package/dist/components/CustomizableDashboard/index.js +5 -3
- package/dist/components/DateInput/index.d.cts +36 -4
- package/dist/components/DateInput/index.d.ts +36 -4
- package/dist/components/Dropdown/index.cjs +11 -10
- package/dist/components/Dropdown/index.d.cts +2 -1
- package/dist/components/Dropdown/index.d.ts +2 -1
- package/dist/components/Dropdown/index.js +4 -3
- package/dist/components/EmailEditor/index.cjs +67 -0
- package/dist/components/EmailEditor/index.cjs.map +1 -0
- package/dist/components/EmailEditor/index.d.cts +347 -0
- package/dist/components/EmailEditor/index.d.ts +347 -0
- package/dist/components/EmailEditor/index.js +26 -0
- package/dist/components/EmailEditor/index.js.map +1 -0
- package/dist/components/FieldHistory/index.cjs +34 -0
- package/dist/components/FieldHistory/index.cjs.map +1 -0
- package/dist/components/FieldHistory/index.d.cts +66 -0
- package/dist/components/FieldHistory/index.d.ts +66 -0
- package/dist/components/FieldHistory/index.js +21 -0
- package/dist/components/FieldHistory/index.js.map +1 -0
- package/dist/components/FloatingWindow/index.cjs +6 -4
- package/dist/components/FloatingWindow/index.js +4 -2
- package/dist/components/GanttView/index.cjs +20 -0
- package/dist/components/GanttView/index.cjs.map +1 -0
- package/dist/components/GanttView/index.d.cts +36 -0
- package/dist/components/GanttView/index.d.ts +36 -0
- package/dist/components/GanttView/index.js +7 -0
- package/dist/components/GanttView/index.js.map +1 -0
- package/dist/components/GlossaryTooltip/index.cjs +3 -3
- package/dist/components/GlossaryTooltip/index.js +2 -2
- package/dist/components/InlineEdit/index.cjs +20 -0
- package/dist/components/InlineEdit/index.cjs.map +1 -0
- package/dist/components/InlineEdit/index.d.cts +56 -0
- package/dist/components/InlineEdit/index.d.ts +56 -0
- package/dist/components/InlineEdit/index.js +7 -0
- package/dist/components/InlineEdit/index.js.map +1 -0
- package/dist/components/KeyboardShortcutsOverlay/index.cjs +5 -5
- package/dist/components/KeyboardShortcutsOverlay/index.js +3 -3
- package/dist/components/ListView/index.cjs +24 -0
- package/dist/components/ListView/index.cjs.map +1 -0
- package/dist/components/ListView/index.d.cts +124 -0
- package/dist/components/ListView/index.d.ts +124 -0
- package/dist/components/ListView/index.js +11 -0
- package/dist/components/ListView/index.js.map +1 -0
- package/dist/components/LogoUploader/index.cjs +18 -0
- package/dist/components/LogoUploader/index.cjs.map +1 -0
- package/dist/components/LogoUploader/index.d.cts +49 -0
- package/dist/components/LogoUploader/index.d.ts +49 -0
- package/dist/components/LogoUploader/index.js +5 -0
- package/dist/components/LogoUploader/index.js.map +1 -0
- package/dist/components/Markdown/index.cjs +21 -19
- package/dist/components/Markdown/index.js +9 -7
- package/dist/components/MediaEditor/index.cjs +16 -14
- package/dist/components/MediaEditor/index.d.cts +91 -2
- package/dist/components/MediaEditor/index.d.ts +91 -2
- package/dist/components/MediaEditor/index.js +11 -9
- package/dist/components/MediaFeed/index.cjs +29 -0
- package/dist/components/MediaFeed/index.cjs.map +1 -0
- package/dist/components/MediaFeed/index.d.cts +104 -0
- package/dist/components/MediaFeed/index.d.ts +104 -0
- package/dist/components/MediaFeed/index.js +20 -0
- package/dist/components/MediaFeed/index.js.map +1 -0
- package/dist/components/MediaPlayer/index.cjs +8 -6
- package/dist/components/MediaPlayer/index.d.cts +19 -1
- package/dist/components/MediaPlayer/index.d.ts +19 -1
- package/dist/components/MediaPlayer/index.js +5 -3
- package/dist/components/MegaMenu/index.cjs +7 -5
- package/dist/components/MegaMenu/index.js +4 -2
- package/dist/components/Modal/index.cjs +10 -10
- package/dist/components/Modal/index.js +2 -2
- package/dist/components/Pagination/index.d.cts +1 -1
- package/dist/components/Pagination/index.d.ts +1 -1
- package/dist/components/PhiMask/index.cjs +18 -0
- package/dist/components/PhiMask/index.cjs.map +1 -0
- package/dist/components/PhiMask/index.d.cts +45 -0
- package/dist/components/PhiMask/index.d.ts +45 -0
- package/dist/components/PhiMask/index.js +5 -0
- package/dist/components/PhiMask/index.js.map +1 -0
- package/dist/components/Progress/index.cjs +6 -6
- package/dist/components/Progress/index.d.cts +8 -2
- package/dist/components/Progress/index.d.ts +8 -2
- package/dist/components/Progress/index.js +1 -1
- package/dist/components/PropertyList/index.cjs +25 -0
- package/dist/components/PropertyList/index.cjs.map +1 -0
- package/dist/components/PropertyList/index.d.cts +87 -0
- package/dist/components/PropertyList/index.d.ts +87 -0
- package/dist/components/PropertyList/index.js +12 -0
- package/dist/components/PropertyList/index.js.map +1 -0
- package/dist/components/Q/index.d.cts +2 -2
- package/dist/components/Q/index.d.ts +2 -2
- package/dist/components/QuickAction/index.d.cts +1 -1
- package/dist/components/QuickAction/index.d.ts +1 -1
- package/dist/components/RadialExplorer/index.cjs +7 -5
- package/dist/components/RadialExplorer/index.js +6 -4
- package/dist/components/Rating/index.cjs +28 -0
- package/dist/components/Rating/index.cjs.map +1 -0
- package/dist/components/Rating/index.d.cts +85 -0
- package/dist/components/Rating/index.d.ts +85 -0
- package/dist/components/Rating/index.js +7 -0
- package/dist/components/Rating/index.js.map +1 -0
- package/dist/components/RecordButton/index.d.cts +1 -1
- package/dist/components/RecordButton/index.d.ts +1 -1
- package/dist/components/RecordHeader/index.cjs +29 -0
- package/dist/components/RecordHeader/index.cjs.map +1 -0
- package/dist/components/RecordHeader/index.d.cts +96 -0
- package/dist/components/RecordHeader/index.d.ts +96 -0
- package/dist/components/RecordHeader/index.js +16 -0
- package/dist/components/RecordHeader/index.js.map +1 -0
- package/dist/components/RecordLayout/index.cjs +21 -0
- package/dist/components/RecordLayout/index.cjs.map +1 -0
- package/dist/components/RecordLayout/index.d.cts +40 -0
- package/dist/components/RecordLayout/index.d.ts +40 -0
- package/dist/components/RecordLayout/index.js +8 -0
- package/dist/components/RecordLayout/index.js.map +1 -0
- package/dist/components/RichTextEditor/index.cjs +11 -8
- package/dist/components/RichTextEditor/index.d.cts +12 -2
- package/dist/components/RichTextEditor/index.d.ts +12 -2
- package/dist/components/RichTextEditor/index.js +8 -5
- package/dist/components/ScrollArea/index.d.cts +1 -1
- package/dist/components/ScrollArea/index.d.ts +1 -1
- package/dist/components/SectionSpyNav/index.cjs +5 -3
- package/dist/components/SectionSpyNav/index.js +4 -2
- package/dist/components/Select/index.cjs +4 -4
- package/dist/components/Select/index.d.cts +2 -2
- package/dist/components/Select/index.d.ts +2 -2
- package/dist/components/Select/index.js +2 -2
- package/dist/components/Skeleton/index.d.cts +1 -1
- package/dist/components/Skeleton/index.d.ts +1 -1
- package/dist/components/Slider/index.d.cts +2 -2
- package/dist/components/Slider/index.d.ts +2 -2
- package/dist/components/SliderCalculator/index.cjs +4 -4
- package/dist/components/SliderCalculator/index.js +2 -2
- package/dist/components/SourceTip/index.cjs +3 -3
- package/dist/components/SourceTip/index.js +2 -2
- package/dist/components/Spinner/index.d.cts +2 -2
- package/dist/components/Spinner/index.d.ts +2 -2
- package/dist/components/SuperChat/index.cjs +1300 -713
- package/dist/components/SuperChat/index.cjs.map +1 -1
- package/dist/components/SuperChat/index.d.cts +126 -8
- package/dist/components/SuperChat/index.d.ts +126 -8
- package/dist/components/SuperChat/index.js +1404 -817
- package/dist/components/SuperChat/index.js.map +1 -1
- package/dist/components/SuperChat/plugins/index.cjs +7 -6
- package/dist/components/SuperChat/plugins/index.cjs.map +1 -1
- package/dist/components/SuperChat/plugins/index.d.cts +2 -3
- package/dist/components/SuperChat/plugins/index.d.ts +2 -3
- package/dist/components/SuperChat/plugins/index.js +6 -5
- package/dist/components/SuperChat/plugins/index.js.map +1 -1
- package/dist/components/Tabs/index.cjs +9 -7
- package/dist/components/Tabs/index.d.cts +12 -1
- package/dist/components/Tabs/index.d.ts +12 -1
- package/dist/components/Tabs/index.js +3 -1
- package/dist/components/TagEditor/index.cjs +22 -0
- package/dist/components/TagEditor/index.cjs.map +1 -0
- package/dist/components/TagEditor/index.d.cts +46 -0
- package/dist/components/TagEditor/index.d.ts +46 -0
- package/dist/components/TagEditor/index.js +9 -0
- package/dist/components/TagEditor/index.js.map +1 -0
- package/dist/components/Text/index.d.cts +3 -3
- package/dist/components/Text/index.d.ts +3 -3
- package/dist/components/Textarea/index.d.cts +2 -2
- package/dist/components/Textarea/index.d.ts +2 -2
- package/dist/components/ThemeProvider/index.cjs +9 -9
- package/dist/components/ThemeProvider/index.d.cts +3 -1
- package/dist/components/ThemeProvider/index.d.ts +3 -1
- package/dist/components/ThemeProvider/index.js +3 -3
- package/dist/components/Tooltip/index.cjs +3 -3
- package/dist/components/Tooltip/index.js +2 -2
- package/dist/components/TranscriptView/index.d.cts +85 -4
- package/dist/components/TranscriptView/index.d.ts +85 -4
- package/dist/components/UserPicker/index.cjs +24 -0
- package/dist/components/UserPicker/index.cjs.map +1 -0
- package/dist/components/UserPicker/index.d.cts +60 -0
- package/dist/components/UserPicker/index.d.ts +60 -0
- package/dist/components/UserPicker/index.js +11 -0
- package/dist/components/UserPicker/index.js.map +1 -0
- package/dist/components/VideoCard/index.cjs +4 -4
- package/dist/components/VideoCard/index.js +2 -2
- package/dist/components/ViewSet/index.cjs +25 -0
- package/dist/components/ViewSet/index.cjs.map +1 -0
- package/dist/components/ViewSet/index.d.cts +201 -0
- package/dist/components/ViewSet/index.d.ts +201 -0
- package/dist/components/ViewSet/index.js +16 -0
- package/dist/components/ViewSet/index.js.map +1 -0
- package/dist/components/ViewSwitcher/index.cjs +20 -0
- package/dist/components/ViewSwitcher/index.cjs.map +1 -0
- package/dist/components/ViewSwitcher/index.d.cts +39 -0
- package/dist/components/ViewSwitcher/index.d.ts +39 -0
- package/dist/components/ViewSwitcher/index.js +7 -0
- package/dist/components/ViewSwitcher/index.js.map +1 -0
- package/dist/datavis.cjs +6 -4
- package/dist/datavis.cjs.map +1 -1
- package/dist/datavis.d.cts +167 -13
- package/dist/datavis.d.ts +167 -13
- package/dist/datavis.js +4 -2
- package/dist/datavis.js.map +1 -1
- package/dist/deck.cjs +3360 -0
- package/dist/deck.cjs.map +1 -0
- package/dist/deck.d.cts +712 -0
- package/dist/deck.d.ts +712 -0
- package/dist/deck.js +3316 -0
- package/dist/deck.js.map +1 -0
- package/dist/esheet.cjs +19 -16
- package/dist/esheet.cjs.map +1 -1
- package/dist/esheet.d.cts +183 -1
- package/dist/esheet.d.ts +183 -1
- package/dist/esheet.js +16 -13
- package/dist/esheet.js.map +1 -1
- package/dist/globe.cjs +2 -2
- package/dist/globe.js +1 -1
- package/dist/hooks/index.cjs +94 -35
- package/dist/hooks/index.d.cts +680 -36
- package/dist/hooks/index.d.ts +680 -36
- package/dist/hooks/index.js +10 -7
- package/dist/icons-wBacj6BW.d.cts +142 -0
- package/dist/icons-wBacj6BW.d.ts +142 -0
- package/dist/index.cjs +2152 -1276
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10375 -626
- package/dist/index.d.ts +10375 -626
- package/dist/index.js +740 -313
- package/dist/index.js.map +1 -1
- package/dist/kerebron.cjs +58 -19
- package/dist/kerebron.cjs.map +1 -1
- package/dist/kerebron.css +115 -0
- package/dist/kerebron.d.cts +37 -0
- package/dist/kerebron.d.ts +37 -0
- package/dist/kerebron.js +58 -19
- package/dist/kerebron.js.map +1 -1
- package/dist/maps.cjs +160 -0
- package/dist/maps.cjs.map +1 -0
- package/dist/maps.d.cts +42 -0
- package/dist/maps.d.ts +42 -0
- package/dist/maps.js +138 -0
- package/dist/maps.js.map +1 -0
- package/dist/motion.cjs +7 -7
- package/dist/motion.d.cts +186 -2
- package/dist/motion.d.ts +186 -2
- package/dist/motion.js +2 -2
- package/dist/org-chart.cjs +1302 -0
- package/dist/org-chart.cjs.map +1 -0
- package/dist/org-chart.d.cts +164 -0
- package/dist/org-chart.d.ts +164 -0
- package/dist/org-chart.js +1277 -0
- package/dist/org-chart.js.map +1 -0
- package/dist/q.d.cts +25 -3
- package/dist/q.d.ts +25 -3
- package/dist/styles/effects.css +133 -0
- package/dist/styles/init.css +22 -3
- package/dist/styles.css +1 -1
- package/dist/tailwind-preset.cjs +4 -4
- package/dist/tailwind-preset.js +1 -1
- package/dist/templates.cjs +156 -0
- package/dist/templates.cjs.map +1 -0
- package/dist/templates.d.cts +734 -0
- package/dist/templates.d.ts +734 -0
- package/dist/templates.js +11 -0
- package/dist/templates.js.map +1 -0
- package/dist/types-CDeBNZiE.d.cts +92 -0
- package/dist/types-CDeBNZiE.d.ts +92 -0
- package/dist/types-Cx1FHLq2.d.cts +548 -0
- package/dist/types-Cx1FHLq2.d.ts +548 -0
- package/dist/types-DsdZvEI1.d.cts +92 -0
- package/dist/types-DsdZvEI1.d.ts +92 -0
- package/dist/utils/index.cjs +9 -9
- package/dist/utils/index.d.cts +13 -2
- package/dist/utils/index.d.ts +13 -2
- package/dist/utils/index.js +1 -1
- package/package.json +82 -13
- package/dist/Animated-XmH6k8pZ.d.cts +0 -188
- package/dist/Animated-XmH6k8pZ.d.ts +0 -188
- package/dist/CsvBlock-ROJCKJDP.cjs +0 -16
- package/dist/CsvBlock-UWPMTLE2.js +0 -7
- package/dist/HtmlPreviewBlock-DWFN6EUB.cjs +0 -16
- package/dist/HtmlPreviewBlock-ME5U3XNS.js +0 -7
- package/dist/MedicationEditor-Bp4NLy7y.d.cts +0 -352
- package/dist/MedicationEditor-Bp4NLy7y.d.ts +0 -352
- package/dist/MermaidBlock-2B6CPD6Y.js +0 -7
- package/dist/MermaidBlock-D2UC5M55.cjs +0 -16
- package/dist/SurveyBlock-4CD4AYMJ.cjs +0 -16
- package/dist/SurveyBlock-4DO62RBT.js +0 -7
- package/dist/chunk-22CYDCXA.js.map +0 -1
- package/dist/chunk-2YCERQWC.js.map +0 -1
- package/dist/chunk-3T7QGLNB.js.map +0 -1
- package/dist/chunk-5JJ2DAE4.js.map +0 -1
- package/dist/chunk-6HFFWEM3.cjs +0 -22
- package/dist/chunk-6HFFWEM3.cjs.map +0 -1
- package/dist/chunk-7ZDPD5ZX.cjs.map +0 -1
- package/dist/chunk-7ZVTLTJF.js +0 -109
- package/dist/chunk-7ZVTLTJF.js.map +0 -1
- package/dist/chunk-ACCAXVOG.js.map +0 -1
- package/dist/chunk-BMSG4NBH.js +0 -56
- package/dist/chunk-BMSG4NBH.js.map +0 -1
- package/dist/chunk-CEQJGUAS.js.map +0 -1
- package/dist/chunk-DVOQ3JNO.js.map +0 -1
- package/dist/chunk-E4IBHYJ7.cjs +0 -80
- package/dist/chunk-E4IBHYJ7.cjs.map +0 -1
- package/dist/chunk-ELPW32ZI.cjs.map +0 -1
- package/dist/chunk-GD7EBGC4.cjs.map +0 -1
- package/dist/chunk-GOALNQZ2.js.map +0 -1
- package/dist/chunk-HB7C7NB5.js +0 -20
- package/dist/chunk-HB7C7NB5.js.map +0 -1
- package/dist/chunk-HZ4MBUC3.js.map +0 -1
- package/dist/chunk-JEIW7BSV.cjs.map +0 -1
- package/dist/chunk-JHULS3EC.js +0 -130
- package/dist/chunk-JHULS3EC.js.map +0 -1
- package/dist/chunk-JI244Y7C.js.map +0 -1
- package/dist/chunk-JYZW2PZS.cjs.map +0 -1
- package/dist/chunk-KRU6IGV7.js.map +0 -1
- package/dist/chunk-NV2CWBI2.cjs.map +0 -1
- package/dist/chunk-OE5CKRUC.js.map +0 -1
- package/dist/chunk-P2CA3XGI.js.map +0 -1
- package/dist/chunk-P7UMS4E6.cjs.map +0 -1
- package/dist/chunk-SQHMGT4W.js.map +0 -1
- package/dist/chunk-SVSHA7XV.js.map +0 -1
- package/dist/chunk-U42F3HLE.cjs.map +0 -1
- package/dist/chunk-VKELAMAZ.js.map +0 -1
- package/dist/chunk-VNYW4C4J.cjs.map +0 -1
- package/dist/chunk-VOKVG3ER.js +0 -78
- package/dist/chunk-VOKVG3ER.js.map +0 -1
- package/dist/chunk-VPIYTQCV.cjs.map +0 -1
- package/dist/chunk-VPWJCJCX.cjs.map +0 -1
- package/dist/chunk-VROIMIHB.cjs.map +0 -1
- package/dist/chunk-WIAQQNFU.cjs.map +0 -1
- package/dist/chunk-WNAA6CLE.cjs +0 -143
- package/dist/chunk-WNAA6CLE.cjs.map +0 -1
- package/dist/chunk-WNJRS7Y7.cjs.map +0 -1
- package/dist/chunk-X4LBUPJO.cjs.map +0 -1
- package/dist/chunk-X4XPNTCZ.cjs.map +0 -1
- package/dist/chunk-XCP454Q6.js.map +0 -1
- package/dist/chunk-XEAT7XJG.cjs.map +0 -1
- package/dist/chunk-YVL3XATO.cjs +0 -79
- package/dist/chunk-YVL3XATO.cjs.map +0 -1
- package/dist/chunk-YVPC65ZJ.cjs.map +0 -1
- package/dist/html-MdxqSzjD.d.cts +0 -13
- package/dist/html-MdxqSzjD.d.ts +0 -13
- package/dist/orderRows-BUJYgSc7.d.cts +0 -221
- package/dist/orderRows-BUJYgSc7.d.ts +0 -221
- package/dist/transcript-Cg7uSW-C.d.cts +0 -84
- package/dist/transcript-Cg7uSW-C.d.ts +0 -84
- package/dist/types-B97JNRNQ.d.cts +0 -251
- package/dist/types-CnPEwzlp.d.cts +0 -254
- package/dist/types-CnPEwzlp.d.ts +0 -254
- package/dist/types-gZXrfLj6.d.ts +0 -251
- package/dist/useAnchoredPosition-CKwLSQW8.d.cts +0 -76
- package/dist/useAnchoredPosition-CKwLSQW8.d.ts +0 -76
- package/dist/useTheme-B9SWu6ui.d.cts +0 -24
- package/dist/useTheme-B9SWu6ui.d.ts +0 -24
- package/dist/useTranscriptEdits-CGzlemHT.d.cts +0 -182
- package/dist/useTranscriptEdits-D32bLs0l.d.ts +0 -182
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk47P5QLX4_cjs = require('./chunk-47P5QLX4.cjs');
|
|
4
|
+
var chunk7IRTD4JT_cjs = require('./chunk-7IRTD4JT.cjs');
|
|
5
|
+
var chunkGKDHMNUA_cjs = require('./chunk-GKDHMNUA.cjs');
|
|
6
|
+
var chunk4NCDU5IG_cjs = require('./chunk-4NCDU5IG.cjs');
|
|
7
|
+
var chunkUPWIJC6I_cjs = require('./chunk-UPWIJC6I.cjs');
|
|
8
|
+
var chunkS5RVSXDV_cjs = require('./chunk-S5RVSXDV.cjs');
|
|
9
|
+
var React = require('react');
|
|
10
|
+
var luxon = require('luxon');
|
|
11
|
+
var lucideReact = require('lucide-react');
|
|
12
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
13
|
+
|
|
14
|
+
function _interopNamespace(e) {
|
|
15
|
+
if (e && e.__esModule) return e;
|
|
16
|
+
var n = Object.create(null);
|
|
17
|
+
if (e) {
|
|
18
|
+
Object.keys(e).forEach(function (k) {
|
|
19
|
+
if (k !== 'default') {
|
|
20
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
21
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return e[k]; }
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
n.default = e;
|
|
29
|
+
return Object.freeze(n);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
33
|
+
|
|
34
|
+
var defaultFieldHistoryLabels = {
|
|
35
|
+
loading: "Loading history",
|
|
36
|
+
empty: "No changes recorded",
|
|
37
|
+
error: "Could not load history",
|
|
38
|
+
retry: "Try again",
|
|
39
|
+
emptyValue: "Empty",
|
|
40
|
+
from: "Changed from",
|
|
41
|
+
to: "to",
|
|
42
|
+
fieldFilter: "Field",
|
|
43
|
+
allFields: "All fields",
|
|
44
|
+
today: "Today",
|
|
45
|
+
yesterday: "Yesterday",
|
|
46
|
+
undated: "Undated"
|
|
47
|
+
};
|
|
48
|
+
var ALL = "__all__";
|
|
49
|
+
var isBlank = (value) => value === null || value === void 0 || value === "";
|
|
50
|
+
function FieldHistoryInner({
|
|
51
|
+
items,
|
|
52
|
+
loading = false,
|
|
53
|
+
error = null,
|
|
54
|
+
onRetry,
|
|
55
|
+
locale,
|
|
56
|
+
timeZone = "local",
|
|
57
|
+
now,
|
|
58
|
+
defaultField,
|
|
59
|
+
formatValue,
|
|
60
|
+
emptyState,
|
|
61
|
+
labels,
|
|
62
|
+
classNames,
|
|
63
|
+
headingLevel: Heading = "h3",
|
|
64
|
+
className,
|
|
65
|
+
...rest
|
|
66
|
+
}, ref) {
|
|
67
|
+
const text = { ...defaultFieldHistoryLabels, ...labels };
|
|
68
|
+
const baseId = React__namespace.useId();
|
|
69
|
+
const [fieldState, setField] = React__namespace.useState(defaultField ?? ALL);
|
|
70
|
+
const reference = now ?? /* @__PURE__ */ new Date();
|
|
71
|
+
const fields = React__namespace.useMemo(
|
|
72
|
+
() => [...new Set(items.map((e) => e.field))].sort(),
|
|
73
|
+
[items]
|
|
74
|
+
);
|
|
75
|
+
const field = fields.includes(fieldState) ? fieldState : ALL;
|
|
76
|
+
const visible = field === ALL ? items : items.filter((e) => e.field === field);
|
|
77
|
+
const value = (v, entry) => isBlank(v) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "italic", children: text.emptyValue }) : formatValue?.(v, entry) ?? String(v);
|
|
78
|
+
const renderEntry = (entry) => {
|
|
79
|
+
const dt = chunk4NCDU5IG_cjs.toDateTime(entry.changedAt, timeZone);
|
|
80
|
+
const localDt = dt && chunk47P5QLX4_cjs.withLocale(dt, locale);
|
|
81
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
82
|
+
"li",
|
|
83
|
+
{
|
|
84
|
+
"data-slot": "field-history-entry",
|
|
85
|
+
className: chunkS5RVSXDV_cjs.cn("flex items-start gap-3 px-3 py-3", classNames?.entry),
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
88
|
+
chunkGKDHMNUA_cjs.Avatar,
|
|
89
|
+
{
|
|
90
|
+
size: "sm",
|
|
91
|
+
name: entry.changedBy?.name,
|
|
92
|
+
src: entry.changedBy?.avatarUrl,
|
|
93
|
+
alt: "",
|
|
94
|
+
"aria-hidden": true,
|
|
95
|
+
className: "shrink-0"
|
|
96
|
+
}
|
|
97
|
+
),
|
|
98
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
99
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline gap-2", children: [
|
|
100
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground min-w-0 flex-1 truncate text-sm font-medium", children: entry.field }),
|
|
101
|
+
localDt && /* @__PURE__ */ jsxRuntime.jsx(
|
|
102
|
+
"time",
|
|
103
|
+
{
|
|
104
|
+
dateTime: localDt.toISO() ?? void 0,
|
|
105
|
+
title: localDt.toLocaleString(luxon.DateTime.DATETIME_FULL),
|
|
106
|
+
className: "text-muted-foreground shrink-0 text-xs",
|
|
107
|
+
children: localDt.toRelative({
|
|
108
|
+
base: luxon.DateTime.fromJSDate(reference)
|
|
109
|
+
})
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
] }),
|
|
113
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
114
|
+
"p",
|
|
115
|
+
{
|
|
116
|
+
"data-slot": "field-history-value",
|
|
117
|
+
className: chunkS5RVSXDV_cjs.cn(
|
|
118
|
+
"mt-1 flex flex-wrap items-center gap-x-2 gap-y-1 text-sm",
|
|
119
|
+
classNames?.value
|
|
120
|
+
),
|
|
121
|
+
children: [
|
|
122
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: text.from }),
|
|
123
|
+
/* @__PURE__ */ jsxRuntime.jsx("del", { className: "text-muted-foreground line-through", children: value(entry.from, entry) }),
|
|
124
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
125
|
+
lucideReact.ArrowRight,
|
|
126
|
+
{
|
|
127
|
+
className: "text-muted-foreground size-3.5 shrink-0 rtl:rotate-180",
|
|
128
|
+
"aria-hidden": true
|
|
129
|
+
}
|
|
130
|
+
),
|
|
131
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: text.to }),
|
|
132
|
+
/* @__PURE__ */ jsxRuntime.jsx("ins", { className: "text-foreground no-underline", children: value(entry.to, entry) })
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
(entry.changedBy || entry.source) && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mt-1 text-xs", children: [entry.changedBy?.name, entry.source].filter(Boolean).join(" \xB7 ") })
|
|
137
|
+
] })
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
entry.id
|
|
141
|
+
);
|
|
142
|
+
};
|
|
143
|
+
let body;
|
|
144
|
+
if (error) {
|
|
145
|
+
body = /* @__PURE__ */ jsxRuntime.jsx(
|
|
146
|
+
chunk7IRTD4JT_cjs.RecordState,
|
|
147
|
+
{
|
|
148
|
+
kind: "error",
|
|
149
|
+
slot: "field-history-state",
|
|
150
|
+
message: text.error,
|
|
151
|
+
retryLabel: text.retry,
|
|
152
|
+
onRetry,
|
|
153
|
+
className: classNames?.state
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
} else if (loading) {
|
|
157
|
+
body = /* @__PURE__ */ jsxRuntime.jsx(
|
|
158
|
+
chunk7IRTD4JT_cjs.RecordState,
|
|
159
|
+
{
|
|
160
|
+
kind: "loading",
|
|
161
|
+
slot: "field-history-state",
|
|
162
|
+
message: text.loading,
|
|
163
|
+
className: classNames?.state
|
|
164
|
+
}
|
|
165
|
+
);
|
|
166
|
+
} else if (visible.length === 0) {
|
|
167
|
+
body = emptyState ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
168
|
+
chunk7IRTD4JT_cjs.RecordState,
|
|
169
|
+
{
|
|
170
|
+
kind: "empty",
|
|
171
|
+
slot: "field-history-state",
|
|
172
|
+
message: text.empty,
|
|
173
|
+
className: classNames?.state
|
|
174
|
+
}
|
|
175
|
+
);
|
|
176
|
+
} else {
|
|
177
|
+
body = chunk47P5QLX4_cjs.groupByDay(visible, (e) => e.changedAt, timeZone).map((day) => {
|
|
178
|
+
const headingId = `${baseId}-${day.key || "none"}`;
|
|
179
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
180
|
+
"section",
|
|
181
|
+
{
|
|
182
|
+
"aria-labelledby": headingId,
|
|
183
|
+
"data-slot": "field-history-section",
|
|
184
|
+
className: classNames?.section,
|
|
185
|
+
children: [
|
|
186
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
187
|
+
Heading,
|
|
188
|
+
{
|
|
189
|
+
id: headingId,
|
|
190
|
+
"data-slot": "field-history-day-header",
|
|
191
|
+
className: chunkS5RVSXDV_cjs.cn(
|
|
192
|
+
"border-border bg-card text-muted-foreground sticky top-0 z-10 border-b px-3 py-2 text-xs font-semibold tracking-wide uppercase",
|
|
193
|
+
classNames?.dayHeader
|
|
194
|
+
),
|
|
195
|
+
children: chunk47P5QLX4_cjs.formatDayLabel(day.key, {
|
|
196
|
+
now: reference,
|
|
197
|
+
zone: timeZone,
|
|
198
|
+
locale,
|
|
199
|
+
today: text.today,
|
|
200
|
+
yesterday: text.yesterday,
|
|
201
|
+
undated: text.undated
|
|
202
|
+
})
|
|
203
|
+
}
|
|
204
|
+
),
|
|
205
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "divide-border divide-y", children: day.items.map(renderEntry) })
|
|
206
|
+
]
|
|
207
|
+
},
|
|
208
|
+
day.key
|
|
209
|
+
);
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
213
|
+
"div",
|
|
214
|
+
{
|
|
215
|
+
ref,
|
|
216
|
+
"data-slot": "field-history",
|
|
217
|
+
className: chunkS5RVSXDV_cjs.cn(
|
|
218
|
+
"border-border bg-card overflow-hidden rounded-lg border",
|
|
219
|
+
className
|
|
220
|
+
),
|
|
221
|
+
...rest,
|
|
222
|
+
children: [
|
|
223
|
+
fields.length > 1 && !loading && !error && /* @__PURE__ */ jsxRuntime.jsx(
|
|
224
|
+
"div",
|
|
225
|
+
{
|
|
226
|
+
"data-slot": "field-history-toolbar",
|
|
227
|
+
className: chunkS5RVSXDV_cjs.cn("border-border border-b p-3", classNames?.toolbar),
|
|
228
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
229
|
+
chunkUPWIJC6I_cjs.Select,
|
|
230
|
+
{
|
|
231
|
+
size: "sm",
|
|
232
|
+
label: text.fieldFilter,
|
|
233
|
+
hideLabel: true,
|
|
234
|
+
value: field,
|
|
235
|
+
onValueChange: setField,
|
|
236
|
+
options: [
|
|
237
|
+
{ value: ALL, label: text.allFields },
|
|
238
|
+
...fields.map((f) => ({ value: f, label: f }))
|
|
239
|
+
],
|
|
240
|
+
className: "sm:max-w-xs"
|
|
241
|
+
}
|
|
242
|
+
)
|
|
243
|
+
}
|
|
244
|
+
),
|
|
245
|
+
body
|
|
246
|
+
]
|
|
247
|
+
}
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
var FieldHistory = React__namespace.forwardRef(FieldHistoryInner);
|
|
251
|
+
FieldHistory.displayName = "FieldHistory";
|
|
252
|
+
|
|
253
|
+
exports.FieldHistory = FieldHistory;
|
|
254
|
+
exports.defaultFieldHistoryLabels = defaultFieldHistoryLabels;
|
|
255
|
+
//# sourceMappingURL=chunk-BJ6ABRSQ.cjs.map
|
|
256
|
+
//# sourceMappingURL=chunk-BJ6ABRSQ.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/FieldHistory/FieldHistory.tsx"],"names":["React","jsx","toDateTime","withLocale","jsxs","cn","Avatar","DateTime","ArrowRight","RecordState","groupByDay","formatDayLabel","Select"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0DO,IAAM,yBAAA,GAAgD;AAAA,EAC3D,OAAA,EAAS,iBAAA;AAAA,EACT,KAAA,EAAO,qBAAA;AAAA,EACP,KAAA,EAAO,wBAAA;AAAA,EACP,KAAA,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BAAA;AAAA,QACT,yDAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,IAAA;AAAA,MAEH,QAAA,EAAA;AAAA,QAAA,MAAA,CAAO,MAAA,GAAS,CAAA,IAAK,CAAC,OAAA,IAAW,CAAC,KAAA,oBACjCJ,cAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACC,WAAA,EAAU,uBAAA;AAAA,YACV,SAAA,EAAWI,oBAAA,CAAG,4BAAA,EAA8B,UAAA,EAAY,OAAO,CAAA;AAAA,YAE/D,QAAA,kBAAAJ,cAAA;AAAA,cAACW,wBAAA;AAAA,cAAA;AAAA,gBACC,IAAA,EAAK,IAAA;AAAA,gBACL,OAAO,IAAA,CAAK,WAAA;AAAA,gBACZ,SAAA,EAAS,IAAA;AAAA,gBACT,KAAA,EAAO,KAAA;AAAA,gBACP,aAAA,EAAe,QAAA;AAAA,gBACf,OAAA,EAAS;AAAA,kBACP,EAAE,KAAA,EAAO,GAAA,EAAK,KAAA,EAAO,KAAK,SAAA,EAAU;AAAA,kBACpC,GAAG,MAAA,CAAO,GAAA,CAAI,CAAC,CAAA,MAAO,EAAE,KAAA,EAAO,CAAA,EAAG,KAAA,EAAO,CAAA,EAAE,CAAE;AAAA,iBAC/C;AAAA,gBACA,SAAA,EAAU;AAAA;AAAA;AACZ;AAAA,SACF;AAAA,QAED;AAAA;AAAA;AAAA,GACH;AAEJ;AAMO,IAAM,YAAA,GAAqBZ,4BAAW,iBAAiB;AAM7D,YAAA,CAA0B,WAAA,GAAc,cAAA","file":"chunk-BJ6ABRSQ.cjs","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { DateTime } from 'luxon';\nimport { ArrowRight } from 'lucide-react';\nimport { cn } from '../../utils/cn';\nimport { Avatar } from '../Avatar';\nimport { Select } from '../Select';\nimport { toDateTime } from '../../views/types';\nimport {\n formatDayLabel,\n groupByDay,\n withLocale,\n} from '../ActivityFeed/dayGroups';\nimport { RecordState } from '../ActivityFeed/RecordState';\n\n// =============================================================================\n// Types\n// =============================================================================\n\nexport type FieldHistoryValue = string | number | boolean | null | undefined;\n\nexport interface FieldHistoryActor {\n name: string;\n avatarUrl?: string;\n}\n\nexport interface FieldHistoryEntry<V = FieldHistoryValue> {\n id: string;\n /** Display label of the changed field. */\n field: string;\n from?: V;\n to?: V;\n /** ISO string or `Date`. */\n changedAt: string | Date;\n changedBy?: FieldHistoryActor;\n /** Where the change came from, e.g. \"Import\" or \"API\". */\n source?: string;\n}\n\nexport interface FieldHistoryLabels {\n loading: string;\n empty: string;\n error: string;\n retry: string;\n /** Shown in place of a blank value. */\n emptyValue: string;\n /** Screen-reader prefix for the old value. */\n from: string;\n /** Screen-reader prefix for the new value. */\n to: string;\n fieldFilter: string;\n allFields: string;\n today: string;\n yesterday: string;\n undated: string;\n}\n\nexport const defaultFieldHistoryLabels: FieldHistoryLabels = {\n loading: 'Loading history',\n empty: 'No changes recorded',\n error: 'Could not load history',\n retry: 'Try again',\n emptyValue: 'Empty',\n from: 'Changed from',\n to: 'to',\n fieldFilter: 'Field',\n allFields: 'All fields',\n today: 'Today',\n yesterday: 'Yesterday',\n undated: 'Undated',\n};\n\nexport type FieldHistorySlot =\n | 'toolbar'\n | 'section'\n | 'dayHeader'\n | 'entry'\n | 'value'\n | 'state';\n\nexport interface FieldHistoryProps<V = FieldHistoryValue> extends Omit<\n React.HTMLAttributes<HTMLDivElement>,\n 'children'\n> {\n items: FieldHistoryEntry<V>[];\n loading?: boolean;\n error?: Error | null;\n onRetry?: () => void;\n locale?: string;\n /** IANA zone for day boundaries. Defaults to local. */\n timeZone?: string;\n /** Pins \"now\" for relative times in stories and tests. */\n now?: Date;\n /** Field shown first; the user can change it. Omit for all fields. */\n defaultField?: string;\n /** Renders a non-empty value, e.g. a currency or a status badge. */\n formatValue?: (value: V, entry: FieldHistoryEntry<V>) => React.ReactNode;\n emptyState?: React.ReactNode;\n labels?: Partial<FieldHistoryLabels>;\n classNames?: Partial<Record<FieldHistorySlot, string>>;\n headingLevel?: 'h2' | 'h3' | 'h4';\n}\n\nconst ALL = '__all__';\n\nconst isBlank = (value: unknown) =>\n value === null || value === undefined || value === '';\n\n// =============================================================================\n// Component\n// =============================================================================\n\nfunction FieldHistoryInner<V = FieldHistoryValue>(\n {\n items,\n loading = false,\n error = null,\n onRetry,\n locale,\n timeZone = 'local',\n now,\n defaultField,\n formatValue,\n emptyState,\n labels,\n classNames,\n headingLevel: Heading = 'h3',\n className,\n ...rest\n }: FieldHistoryProps<V>,\n ref: React.ForwardedRef<HTMLDivElement>\n) {\n const text = { ...defaultFieldHistoryLabels, ...labels };\n const baseId = React.useId();\n const [fieldState, setField] = React.useState(defaultField ?? ALL);\n const reference = now ?? new Date();\n\n const fields = React.useMemo(\n () => [...new Set(items.map((e) => e.field))].sort(),\n [items]\n );\n // A field no longer in `items` falls back to all, so the history can't go blank.\n const field = fields.includes(fieldState) ? fieldState : ALL;\n const visible =\n field === ALL ? items : items.filter((e) => e.field === field);\n\n const value = (v: V | undefined, entry: FieldHistoryEntry<V>) =>\n isBlank(v) ? (\n <span className=\"italic\">{text.emptyValue}</span>\n ) : (\n (formatValue?.(v as V, entry) ?? String(v))\n );\n\n const renderEntry = (entry: FieldHistoryEntry<V>) => {\n const dt = toDateTime(entry.changedAt, timeZone);\n const localDt = dt && withLocale(dt, locale);\n return (\n <li\n key={entry.id}\n data-slot=\"field-history-entry\"\n className={cn('flex items-start gap-3 px-3 py-3', classNames?.entry)}\n >\n <Avatar\n size=\"sm\"\n name={entry.changedBy?.name}\n src={entry.changedBy?.avatarUrl}\n alt=\"\"\n aria-hidden\n className=\"shrink-0\"\n />\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-baseline gap-2\">\n <span className=\"text-foreground min-w-0 flex-1 truncate text-sm font-medium\">\n {entry.field}\n </span>\n {localDt && (\n <time\n dateTime={localDt.toISO() ?? undefined}\n title={localDt.toLocaleString(DateTime.DATETIME_FULL)}\n className=\"text-muted-foreground shrink-0 text-xs\"\n >\n {localDt.toRelative({\n base: DateTime.fromJSDate(reference),\n })}\n </time>\n )}\n </div>\n <p\n data-slot=\"field-history-value\"\n className={cn(\n 'mt-1 flex flex-wrap items-center gap-x-2 gap-y-1 text-sm',\n classNames?.value\n )}\n >\n <span className=\"sr-only\">{text.from}</span>\n <del className=\"text-muted-foreground line-through\">\n {value(entry.from, entry)}\n </del>\n <ArrowRight\n className=\"text-muted-foreground size-3.5 shrink-0 rtl:rotate-180\"\n aria-hidden\n />\n <span className=\"sr-only\">{text.to}</span>\n <ins className=\"text-foreground no-underline\">\n {value(entry.to, entry)}\n </ins>\n </p>\n {(entry.changedBy || entry.source) && (\n <p className=\"text-muted-foreground mt-1 text-xs\">\n {[entry.changedBy?.name, entry.source]\n .filter(Boolean)\n .join(' · ')}\n </p>\n )}\n </div>\n </li>\n );\n };\n\n let body: React.ReactNode;\n if (error) {\n body = (\n <RecordState\n kind=\"error\"\n slot=\"field-history-state\"\n message={text.error}\n retryLabel={text.retry}\n onRetry={onRetry}\n className={classNames?.state}\n />\n );\n } else if (loading) {\n body = (\n <RecordState\n kind=\"loading\"\n slot=\"field-history-state\"\n message={text.loading}\n className={classNames?.state}\n />\n );\n } else if (visible.length === 0) {\n body = emptyState ?? (\n <RecordState\n kind=\"empty\"\n slot=\"field-history-state\"\n message={text.empty}\n className={classNames?.state}\n />\n );\n } else {\n body = groupByDay(visible, (e) => e.changedAt, timeZone).map((day) => {\n const headingId = `${baseId}-${day.key || 'none'}`;\n return (\n <section\n key={day.key}\n aria-labelledby={headingId}\n data-slot=\"field-history-section\"\n className={classNames?.section}\n >\n <Heading\n id={headingId}\n data-slot=\"field-history-day-header\"\n className={cn(\n 'border-border bg-card text-muted-foreground sticky top-0 z-10 border-b px-3 py-2 text-xs font-semibold tracking-wide uppercase',\n classNames?.dayHeader\n )}\n >\n {formatDayLabel(day.key, {\n now: reference,\n zone: timeZone,\n locale,\n today: text.today,\n yesterday: text.yesterday,\n undated: text.undated,\n })}\n </Heading>\n <ul className=\"divide-border divide-y\">\n {day.items.map(renderEntry)}\n </ul>\n </section>\n );\n });\n }\n\n return (\n <div\n ref={ref}\n data-slot=\"field-history\"\n className={cn(\n 'border-border bg-card overflow-hidden rounded-lg border',\n className\n )}\n {...rest}\n >\n {fields.length > 1 && !loading && !error && (\n <div\n data-slot=\"field-history-toolbar\"\n className={cn('border-border border-b p-3', classNames?.toolbar)}\n >\n <Select\n size=\"sm\"\n label={text.fieldFilter}\n hideLabel\n value={field}\n onValueChange={setField}\n options={[\n { value: ALL, label: text.allFields },\n ...fields.map((f) => ({ value: f, label: f })),\n ]}\n className=\"sm:max-w-xs\"\n />\n </div>\n )}\n {body}\n </div>\n );\n}\n\n/**\n * The change log of a record's fields, grouped by day. Declared\n * `parameters.catalog.collection` — its load states are part of the API.\n */\nexport const FieldHistory = React.forwardRef(FieldHistoryInner) as <\n V = FieldHistoryValue,\n>(\n props: FieldHistoryProps<V> & { ref?: React.ForwardedRef<HTMLDivElement> }\n) => React.ReactElement;\n\n(FieldHistory as React.FC).displayName = 'FieldHistory';\n"]}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
// src/hooks/useStickToBottom.ts
|
|
4
|
+
function pinToBottom(el) {
|
|
5
|
+
el.scrollTop = el.scrollHeight;
|
|
6
|
+
}
|
|
7
|
+
function useStickToBottom({
|
|
8
|
+
threshold = 100,
|
|
9
|
+
disabled = false
|
|
10
|
+
} = {}) {
|
|
11
|
+
const containerRef = React.useRef(null);
|
|
12
|
+
const contentRef = React.useRef(null);
|
|
13
|
+
const [isAtBottom, setIsAtBottom] = React.useState(true);
|
|
14
|
+
const pinnedRef = React.useRef(true);
|
|
15
|
+
const readingRef = React.useRef(false);
|
|
16
|
+
const anchorTargetRef = React.useRef(null);
|
|
17
|
+
const anchorDistanceRef = React.useRef(Infinity);
|
|
18
|
+
const [containerEl, setContainerEl] = React.useState(
|
|
19
|
+
null
|
|
20
|
+
);
|
|
21
|
+
const [contentEl, setContentEl] = React.useState(null);
|
|
22
|
+
React.useEffect(() => {
|
|
23
|
+
if (containerRef.current !== containerEl)
|
|
24
|
+
setContainerEl(containerRef.current);
|
|
25
|
+
if (contentRef.current !== contentEl) setContentEl(contentRef.current);
|
|
26
|
+
});
|
|
27
|
+
React.useEffect(() => {
|
|
28
|
+
if (disabled) return;
|
|
29
|
+
const el = containerEl;
|
|
30
|
+
if (!el) return;
|
|
31
|
+
const handleScroll = () => {
|
|
32
|
+
const anchorTarget = anchorTargetRef.current;
|
|
33
|
+
if (anchorTarget != null) {
|
|
34
|
+
const distance = Math.abs(el.scrollTop - anchorTarget);
|
|
35
|
+
if (distance < 2) {
|
|
36
|
+
anchorTargetRef.current = null;
|
|
37
|
+
} else if (distance > anchorDistanceRef.current + 1) {
|
|
38
|
+
anchorTargetRef.current = null;
|
|
39
|
+
} else {
|
|
40
|
+
anchorDistanceRef.current = distance;
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const atBottom = el.scrollHeight - el.scrollTop - el.clientHeight <= threshold;
|
|
45
|
+
if (!atBottom) readingRef.current = false;
|
|
46
|
+
pinnedRef.current = atBottom && !readingRef.current;
|
|
47
|
+
setIsAtBottom(atBottom);
|
|
48
|
+
};
|
|
49
|
+
if (pinnedRef.current) pinToBottom(el);
|
|
50
|
+
handleScroll();
|
|
51
|
+
el.addEventListener("scroll", handleScroll, { passive: true });
|
|
52
|
+
return () => el.removeEventListener("scroll", handleScroll);
|
|
53
|
+
}, [containerEl, threshold, disabled]);
|
|
54
|
+
React.useEffect(() => {
|
|
55
|
+
if (disabled) return;
|
|
56
|
+
const el = containerEl;
|
|
57
|
+
if (!el || typeof globalThis.ResizeObserver === "undefined") return;
|
|
58
|
+
const observer = new globalThis.ResizeObserver(() => {
|
|
59
|
+
if (pinnedRef.current) {
|
|
60
|
+
pinToBottom(el);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
if (anchorTargetRef.current != null) return;
|
|
64
|
+
const atBottom = el.scrollHeight - el.scrollTop - el.clientHeight <= threshold;
|
|
65
|
+
if (!atBottom) readingRef.current = false;
|
|
66
|
+
setIsAtBottom(atBottom);
|
|
67
|
+
});
|
|
68
|
+
observer.observe(el);
|
|
69
|
+
if (contentEl) observer.observe(contentEl);
|
|
70
|
+
return () => observer.disconnect();
|
|
71
|
+
}, [containerEl, contentEl, threshold, disabled]);
|
|
72
|
+
const scrollToBottom = React.useCallback(
|
|
73
|
+
(behavior = "auto") => {
|
|
74
|
+
const el = containerRef.current;
|
|
75
|
+
if (!el) return;
|
|
76
|
+
readingRef.current = false;
|
|
77
|
+
anchorTargetRef.current = null;
|
|
78
|
+
pinnedRef.current = true;
|
|
79
|
+
setIsAtBottom(true);
|
|
80
|
+
if (typeof el.scrollTo === "function") {
|
|
81
|
+
el.scrollTo({ top: el.scrollHeight, behavior });
|
|
82
|
+
} else {
|
|
83
|
+
pinToBottom(el);
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
[]
|
|
87
|
+
);
|
|
88
|
+
const anchorToTurnStart = React.useCallback(
|
|
89
|
+
(target, behavior = "auto") => {
|
|
90
|
+
const el = containerRef.current;
|
|
91
|
+
if (!el) return;
|
|
92
|
+
readingRef.current = true;
|
|
93
|
+
pinnedRef.current = false;
|
|
94
|
+
const top = Math.min(
|
|
95
|
+
target.getBoundingClientRect().top - el.getBoundingClientRect().top + el.scrollTop,
|
|
96
|
+
el.scrollHeight - el.clientHeight
|
|
97
|
+
);
|
|
98
|
+
if (Math.abs(el.scrollTop - top) < 2) return;
|
|
99
|
+
anchorTargetRef.current = top;
|
|
100
|
+
anchorDistanceRef.current = Infinity;
|
|
101
|
+
if (typeof el.scrollTo === "function") {
|
|
102
|
+
el.scrollTo({ top, behavior });
|
|
103
|
+
} else {
|
|
104
|
+
el.scrollTop = top;
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
[]
|
|
108
|
+
);
|
|
109
|
+
const followIfPinned = React.useCallback(
|
|
110
|
+
(behavior = "auto") => {
|
|
111
|
+
if (!pinnedRef.current) return false;
|
|
112
|
+
scrollToBottom(behavior);
|
|
113
|
+
return true;
|
|
114
|
+
},
|
|
115
|
+
[scrollToBottom]
|
|
116
|
+
);
|
|
117
|
+
const stopFollowing = React.useCallback(() => {
|
|
118
|
+
readingRef.current = true;
|
|
119
|
+
pinnedRef.current = false;
|
|
120
|
+
}, []);
|
|
121
|
+
return {
|
|
122
|
+
containerRef,
|
|
123
|
+
contentRef,
|
|
124
|
+
isAtBottom,
|
|
125
|
+
scrollToBottom,
|
|
126
|
+
anchorToTurnStart,
|
|
127
|
+
followIfPinned,
|
|
128
|
+
stopFollowing
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
function useStreamEndedBelowFold(newest, isAtBottom, onEnded, onEndedAtBottom) {
|
|
132
|
+
const streamingIdRef = React.useRef(null);
|
|
133
|
+
React.useEffect(() => {
|
|
134
|
+
if (newest?.status === "streaming") {
|
|
135
|
+
streamingIdRef.current = newest.id;
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
if (streamingIdRef.current && newest?.id === streamingIdRef.current) {
|
|
139
|
+
streamingIdRef.current = null;
|
|
140
|
+
if (!isAtBottom) onEnded();
|
|
141
|
+
else onEndedAtBottom?.();
|
|
142
|
+
}
|
|
143
|
+
}, [newest, isAtBottom, onEnded, onEndedAtBottom]);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export { useStickToBottom, useStreamEndedBelowFold };
|
|
147
|
+
//# sourceMappingURL=chunk-BM35CACB.js.map
|
|
148
|
+
//# sourceMappingURL=chunk-BM35CACB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/hooks/useStickToBottom.ts"],"names":[],"mappings":";;;AAyDA,SAAS,YAAY,EAAA,EAAiB;AACpC,EAAA,EAAA,CAAG,YAAY,EAAA,CAAG,YAAA;AACpB;AAmCO,SAAS,gBAAA,CAAiB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AA,IACA,iBAAA;AAAA,IACA,cAAA;AAAA,IACA;AAAA,GACF;AACF;AAUO,SAAS,uBAAA,CACd,MAAA,EACA,UAAA,EACA,OAAA,EACA,eAAA,EACA;AACA,EAAA,MAAM,cAAA,GAAuB,aAAsB,IAAI,CAAA;AACvD,EAAM,gBAAU,MAAM;AACpB,IAAA,IAAI,MAAA,EAAQ,WAAW,WAAA,EAAa;AAClC,MAAA,cAAA,CAAe,UAAU,MAAA,CAAO,EAAA;AAChC,MAAA;AAAA,IACF;AACA,IAAA,IAAI,cAAA,CAAe,OAAA,IAAW,MAAA,EAAQ,EAAA,KAAO,eAAe,OAAA,EAAS;AACnE,MAAA,cAAA,CAAe,OAAA,GAAU,IAAA;AACzB,MAAA,IAAI,CAAC,YAAY,OAAA,EAAQ;AAAA,WACpB,eAAA,IAAkB;AAAA,IACzB;AAAA,EACF,GAAG,CAAC,MAAA,EAAQ,UAAA,EAAY,OAAA,EAAS,eAAe,CAAC,CAAA;AACnD","file":"chunk-BM35CACB.js","sourcesContent":["import * as React from 'react';\n\n/**\n * Options for {@link useStickToBottom}.\n */\nexport interface UseStickToBottomOptions {\n /**\n * Distance from the bottom (px) within which the user still counts as \"at\n * the bottom\" — small offsets from rounding or momentum scrolling shouldn't\n * break pinning.\n */\n threshold?: number;\n /**\n * Disable all behavior (listeners and observers detach). Useful when the\n * scroll container anchors somewhere other than the bottom (e.g. a\n * newest-first feed).\n */\n disabled?: boolean;\n}\n\nexport interface UseStickToBottomReturn {\n /** Attach to the scrollable container. */\n containerRef: React.RefObject<HTMLDivElement | null>;\n /**\n * Attach to the element wrapping the container's content. Its growth (e.g.\n * a streaming message) re-pins the scroll while the user is at the bottom.\n */\n contentRef: React.RefObject<HTMLDivElement | null>;\n /** Whether the user is currently at (or within `threshold` of) the bottom. */\n isAtBottom: boolean;\n /** Scroll to the bottom and resume pinning. */\n scrollToBottom: (behavior?: ScrollBehavior) => void;\n /**\n * Scroll so `target`'s top aligns with the viewport top and enter “reading”\n * mode: content growing past the fold no longer auto-follows, so the reader\n * consumes the response at their own pace (the ChatGPT/Claude send UX).\n * Following resumes when they explicitly return to the bottom — a\n * jump-to-bottom click (`scrollToBottom`) or scrolling there by hand.\n */\n anchorToTurnStart: (target: HTMLElement, behavior?: ScrollBehavior) => void;\n /**\n * Scroll to the bottom only while actually following (at the bottom and not\n * in reading mode). Returns whether it scrolled — hosts use this to decide\n * between following an appended message and raising a “new messages” hint.\n */\n followIfPinned: (behavior?: ScrollBehavior) => boolean;\n /**\n * Hold the current position: enter reading mode without scrolling, so an\n * incoming stream fills below the fold instead of pushing the view up.\n * Call right after a streaming message appends (optionally after revealing\n * its first line with `followIfPinned`). Following resumes exactly as after\n * `anchorToTurnStart`: an explicit `scrollToBottom` or the reader returning\n * to the bottom by hand.\n */\n stopFollowing: () => void;\n}\n\nfunction pinToBottom(el: HTMLElement) {\n el.scrollTop = el.scrollHeight;\n}\n\n/**\n * Keeps a scroll container pinned to its bottom edge while the user is there,\n * and — crucially — leaves the scroll position alone once they scroll up.\n *\n * Designed for chat threads with streaming responses:\n * - While the user is at the bottom, content growth (new tokens, new\n * messages) and container resizes (on-screen keyboard, growing composer)\n * keep the newest content in view via a `ResizeObserver` on both the\n * content and the container.\n * - Once the user scrolls up, nothing moves until they return to the bottom\n * themselves or the host calls `scrollToBottom` (e.g. a jump-to-bottom\n * button, or an outgoing message from the local user).\n *\n * The hook only pins; *when* to force a scroll (own message sent, thread\n * switched) stays a host decision through `scrollToBottom`,\n * `anchorToTurnStart` (ChatGPT-style: scroll a fresh turn to the viewport top\n * and pause following while the reader digests the reply), and\n * `followIfPinned` (follow an append only while actually at the bottom).\n *\n * @example\n * ```tsx\n * const { containerRef, contentRef, isAtBottom, scrollToBottom } =\n * useStickToBottom();\n * return (\n * <div className=\"relative min-h-0 flex-1\">\n * <div ref={containerRef} className=\"h-full overflow-y-auto\">\n * <div ref={contentRef}>{rows}</div>\n * </div>\n * {!isAtBottom && <JumpToBottom onClick={() => scrollToBottom('smooth')} />}\n * </div>\n * );\n * ```\n */\nexport function useStickToBottom({\n threshold = 100,\n disabled = false,\n}: UseStickToBottomOptions = {}): UseStickToBottomReturn {\n const containerRef = React.useRef<HTMLDivElement>(null);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const [isAtBottom, setIsAtBottom] = React.useState(true);\n // Mirror of `isAtBottom` readable synchronously from observer callbacks\n // without re-subscribing them on every scroll.\n const pinnedRef = React.useRef(true);\n // “Reading” mode (entered via `anchorToTurnStart`): the viewport sits at the\n // reserved space below a fresh turn — geometrically the bottom — but growth\n // must NOT follow. Cleared once the position genuinely leaves the bottom\n // (content outgrew the reserve or the user scrolled up), after which the\n // normal pin-at-bottom rules apply again.\n const readingRef = React.useRef(false);\n // In-flight anchor animation: a smooth `anchorToTurnStart` fires scroll\n // events that are neither the user's nor at the bottom — they must not end\n // reading mode or re-pin. Cleared on arrival at the target, or when the\n // distance to it grows (the user grabbed the scroll mid-animation).\n const anchorTargetRef = React.useRef<number | null>(null);\n const anchorDistanceRef = React.useRef(Infinity);\n\n // Hosts can re-attach the refs to new DOM nodes without remounting (e.g.\n // SuperChat swapping its plain thread for the virtualized one when the\n // conversation grows). Mirror the current nodes into state so the listener\n // and observer effects below re-bind whenever the target changes.\n const [containerEl, setContainerEl] = React.useState<HTMLDivElement | null>(\n null\n );\n const [contentEl, setContentEl] = React.useState<HTMLDivElement | null>(null);\n // Intentionally dep-less: ref mutations don't trigger renders, so this must\n // check after every render. The inequality guards make it settle immediately.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n React.useEffect(() => {\n if (containerRef.current !== containerEl)\n setContainerEl(containerRef.current);\n if (contentRef.current !== contentEl) setContentEl(contentRef.current);\n });\n\n // Track the user's position: at (or near) the bottom means \"pinned\".\n React.useEffect(() => {\n if (disabled) return;\n const el = containerEl;\n if (!el) return;\n\n const handleScroll = () => {\n const anchorTarget = anchorTargetRef.current;\n if (anchorTarget != null) {\n const distance = Math.abs(el.scrollTop - anchorTarget);\n if (distance < 2) {\n anchorTargetRef.current = null; // arrived — handle normally\n } else if (distance > anchorDistanceRef.current + 1) {\n anchorTargetRef.current = null; // user took over mid-animation\n } else {\n anchorDistanceRef.current = distance;\n return; // the animation's own events don't change pinning\n }\n }\n const atBottom =\n el.scrollHeight - el.scrollTop - el.clientHeight <= threshold;\n if (!atBottom) readingRef.current = false;\n pinnedRef.current = atBottom && !readingRef.current;\n setIsAtBottom(atBottom);\n };\n\n // A freshly attached node starts at `scrollTop` 0 — re-assert carried-over\n // pinning (e.g. across SuperChat's plain ⇄ virtualized swap) instead of\n // letting the initial read demote a pinned reader to \"scrolled up\".\n if (pinnedRef.current) pinToBottom(el);\n handleScroll(); // initial position\n el.addEventListener('scroll', handleScroll, { passive: true });\n return () => el.removeEventListener('scroll', handleScroll);\n }, [containerEl, threshold, disabled]);\n\n // While pinned, follow growth of the content (streaming tokens, appended\n // rows) and shrinking of the container (on-screen keyboard, composer\n // growing) so the newest content stays in view. While unpinned this\n // observer never touches the scroll position.\n React.useEffect(() => {\n if (disabled) return;\n const el = containerEl;\n if (!el || typeof globalThis.ResizeObserver === 'undefined') return;\n\n const observer = new globalThis.ResizeObserver(() => {\n if (pinnedRef.current) {\n pinToBottom(el);\n return;\n }\n // Mid-anchor-animation the position is transient — judge nothing yet.\n if (anchorTargetRef.current != null) return;\n // Not following: growth can still silently carry the position away from\n // the bottom (no scroll event fires), so recompute the state here — it\n // drives the jump-to-bottom affordance and ends reading mode once the\n // response outgrows its reserved space.\n const atBottom =\n el.scrollHeight - el.scrollTop - el.clientHeight <= threshold;\n if (!atBottom) readingRef.current = false;\n setIsAtBottom(atBottom);\n });\n observer.observe(el);\n if (contentEl) observer.observe(contentEl);\n return () => observer.disconnect();\n }, [containerEl, contentEl, threshold, disabled]);\n\n const scrollToBottom = React.useCallback(\n (behavior: ScrollBehavior = 'auto') => {\n const el = containerRef.current;\n if (!el) return;\n // Pin immediately so a concurrent stream keeps following while a\n // smooth scroll animates down.\n readingRef.current = false;\n anchorTargetRef.current = null;\n pinnedRef.current = true;\n setIsAtBottom(true);\n if (typeof el.scrollTo === 'function') {\n el.scrollTo({ top: el.scrollHeight, behavior });\n } else {\n pinToBottom(el); // jsdom fallback\n }\n },\n []\n );\n\n const anchorToTurnStart = React.useCallback(\n (target: HTMLElement, behavior: ScrollBehavior = 'auto') => {\n const el = containerRef.current;\n if (!el) return;\n readingRef.current = true;\n pinnedRef.current = false;\n // Clamp to the reachable range so the “arrived” check always resolves.\n const top = Math.min(\n target.getBoundingClientRect().top -\n el.getBoundingClientRect().top +\n el.scrollTop,\n el.scrollHeight - el.clientHeight\n );\n // Already there: `scrollTo` emits no scroll event, so tracking an\n // in-flight animation would swallow observer updates forever.\n if (Math.abs(el.scrollTop - top) < 2) return;\n anchorTargetRef.current = top;\n anchorDistanceRef.current = Infinity;\n if (typeof el.scrollTo === 'function') {\n el.scrollTo({ top, behavior });\n } else {\n el.scrollTop = top; // jsdom fallback\n }\n },\n []\n );\n\n const followIfPinned = React.useCallback(\n (behavior: ScrollBehavior = 'auto') => {\n if (!pinnedRef.current) return false;\n scrollToBottom(behavior);\n return true;\n },\n [scrollToBottom]\n );\n\n const stopFollowing = React.useCallback(() => {\n readingRef.current = true;\n pinnedRef.current = false;\n }, []);\n\n return {\n containerRef,\n contentRef,\n isAtBottom,\n scrollToBottom,\n anchorToTurnStart,\n followIfPinned,\n stopFollowing,\n };\n}\n\n/**\n * Companion to {@link useStickToBottom}: fires `onEnded` when the newest\n * message finishes streaming while the reader is away from the bottom — the\n * end of the reply landed below the fold, so the jump-to-bottom button should\n * upgrade to its “new messages” hint. When the whole reply fit above the fold\n * (the reader is still at the bottom), `onEndedAtBottom` fires instead so the\n * host can exit the stream's hold and resume following (`scrollToBottom`).\n */\nexport function useStreamEndedBelowFold(\n newest: { id: string; status?: string } | undefined,\n isAtBottom: boolean,\n onEnded: () => void,\n onEndedAtBottom?: () => void\n) {\n const streamingIdRef = React.useRef<string | null>(null);\n React.useEffect(() => {\n if (newest?.status === 'streaming') {\n streamingIdRef.current = newest.id;\n return;\n }\n if (streamingIdRef.current && newest?.id === streamingIdRef.current) {\n streamingIdRef.current = null;\n if (!isAtBottom) onEnded();\n else onEndedAtBottom?.();\n }\n }, [newest, isAtBottom, onEnded, onEndedAtBottom]);\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var chunkPLMXN23Q_cjs = require('./chunk-PLMXN23Q.cjs');
|
|
4
3
|
var chunkRS5VA6QU_cjs = require('./chunk-RS5VA6QU.cjs');
|
|
5
|
-
var
|
|
4
|
+
var chunkPLMXN23Q_cjs = require('./chunk-PLMXN23Q.cjs');
|
|
5
|
+
var chunkANMX7YDL_cjs = require('./chunk-ANMX7YDL.cjs');
|
|
6
6
|
var chunkS5RVSXDV_cjs = require('./chunk-S5RVSXDV.cjs');
|
|
7
7
|
var React2 = require('react');
|
|
8
8
|
var reactDom = require('react-dom');
|
|
@@ -124,7 +124,7 @@ function DashboardCustomizePanel({
|
|
|
124
124
|
] }, category || "general"))
|
|
125
125
|
] }),
|
|
126
126
|
onReset && /* @__PURE__ */ jsxRuntime.jsx(chunkRS5VA6QU_cjs.SheetFooter, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
127
|
-
|
|
127
|
+
chunkANMX7YDL_cjs.Button,
|
|
128
128
|
{
|
|
129
129
|
variant: "outline",
|
|
130
130
|
size: "sm",
|
|
@@ -632,7 +632,7 @@ var CustomizableDashboard = React2__namespace.forwardRef(function CustomizableDa
|
|
|
632
632
|
const toolbar = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end gap-3 pb-2", children: [
|
|
633
633
|
title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-foreground me-auto text-lg font-semibold", children: title }),
|
|
634
634
|
widgets && widgets.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
635
|
-
|
|
635
|
+
chunkANMX7YDL_cjs.Button,
|
|
636
636
|
{
|
|
637
637
|
variant: "outline",
|
|
638
638
|
size: "sm",
|
|
@@ -732,5 +732,5 @@ exports.mergeColumnOrder = mergeColumnOrder;
|
|
|
732
732
|
exports.moveAcrossColumns = moveAcrossColumns;
|
|
733
733
|
exports.reorderOnDrop = reorderOnDrop;
|
|
734
734
|
exports.requiredColumns = requiredColumns;
|
|
735
|
-
//# sourceMappingURL=chunk-
|
|
736
|
-
//# sourceMappingURL=chunk-
|
|
735
|
+
//# sourceMappingURL=chunk-BWSZ2BHJ.cjs.map
|
|
736
|
+
//# sourceMappingURL=chunk-BWSZ2BHJ.cjs.map
|