@kdcloudjs/shoelace 1.0.29 → 1.0.31
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/cdn/chunks/{chunk.IXK74NKY.js → chunk.24WW36SE.js} +1 -1
- package/{dist/chunks/chunk.ZYEU5MVF.js → cdn/chunks/chunk.2I3QE4LS.js} +1 -1
- package/cdn/chunks/{chunk.6UZXCK6P.js → chunk.2RHE6UUM.js} +1 -1
- package/cdn/chunks/{chunk.OXQMELDN.js → chunk.2TWXBBYA.js} +1 -1
- package/cdn/chunks/{chunk.64FMXGBD.js → chunk.2UGFGPFO.js} +1 -1
- package/cdn/chunks/{chunk.OKEGJW6Y.js → chunk.2VXAPR3U.js} +1 -1
- package/cdn/chunks/{chunk.L74RGBMJ.js → chunk.2XZTJH3J.js} +1 -1
- package/cdn/chunks/{chunk.XWGQQ6NF.js → chunk.32QJTA5O.js} +1 -1
- package/cdn/chunks/{chunk.YWZB7GE3.js → chunk.3DRIHIOU.js} +1 -1
- package/cdn/chunks/chunk.3JHXVHMD.js +152 -0
- package/cdn/chunks/{chunk.ZPQFNTKC.js → chunk.3LJIDT6C.js} +1 -1
- package/cdn/chunks/chunk.3Q6AWNUW.js +154 -0
- package/cdn/chunks/chunk.43HIWDJN.js +11 -0
- package/cdn/chunks/{chunk.YOWALB6A.js → chunk.4EK6KNBC.js} +3 -3
- package/cdn/chunks/{chunk.SDRTJBSH.js → chunk.4QIMAJZU.js} +27 -9
- package/cdn/chunks/{chunk.VXY6IJM2.js → chunk.4ROHG6YW.js} +1 -1
- package/cdn/chunks/chunk.5DSHVTBU.js +338 -0
- package/cdn/chunks/{chunk.BN5EFUPY.js → chunk.5RGUSMA7.js} +1 -1
- package/cdn/chunks/{chunk.VU4ZS5DE.js → chunk.6MAGFWEV.js} +1 -1
- package/cdn/chunks/{chunk.P7TUEL7V.js → chunk.6XAK4BE3.js} +1 -1
- package/cdn/chunks/{chunk.24RHFOSL.js → chunk.74D4HZDZ.js} +2 -2
- package/cdn/chunks/{chunk.6VJJVWDV.js → chunk.77NGAFFB.js} +1 -1
- package/cdn/chunks/chunk.7FDLKXHH.js +45 -0
- package/cdn/chunks/{chunk.S2ZNUNYX.js → chunk.AIWRCLGO.js} +1 -1
- package/cdn/chunks/{chunk.L27ZP5M3.js → chunk.AQCX7OCI.js} +1 -1
- package/cdn/chunks/chunk.B5NTZCHJ.js +29 -0
- package/cdn/chunks/{chunk.W5B22CS4.js → chunk.BXCHFN5R.js} +1 -1
- package/cdn/chunks/{chunk.FEYPR3WK.js → chunk.C4N3GUEY.js} +1 -1
- package/cdn/chunks/chunk.CNMRVXFY.js +158 -0
- package/cdn/chunks/{chunk.AK3CJEZE.js → chunk.D2DVKNXX.js} +1 -1
- package/cdn/chunks/{chunk.K72KXZIJ.js → chunk.DAIAFYJT.js} +1 -1
- package/{dist/chunks/chunk.RS5RBPPC.js → cdn/chunks/chunk.DMM3PKQP.js} +1 -1
- package/{dist/chunks/chunk.SJFD3WIY.js → cdn/chunks/chunk.DPTOAIBI.js} +1 -1
- package/cdn/chunks/{chunk.IU5X6EHL.js → chunk.DR56AOD6.js} +1 -1
- package/{dist/chunks/chunk.FZHUM3HC.js → cdn/chunks/chunk.E7KUGXMS.js} +1 -1
- package/cdn/chunks/{chunk.JVTUZMLX.js → chunk.EAXP3GJF.js} +1 -1
- package/{dist/chunks/chunk.RCQO3ENT.js → cdn/chunks/chunk.EQ6GHEUX.js} +1 -1
- package/cdn/chunks/{chunk.7MQOX762.js → chunk.EQM3ROLB.js} +1 -1
- package/cdn/chunks/{chunk.K5W33AST.js → chunk.EVHE3P3B.js} +1 -1
- package/cdn/chunks/{chunk.FAOO3Q67.js → chunk.F22SPZB3.js} +4 -3
- package/cdn/chunks/{chunk.BQ5RKZFW.js → chunk.F4WJ35X3.js} +1 -1
- package/cdn/chunks/{chunk.ORT5WHZ4.js → chunk.FFVI2IXF.js} +1 -1
- package/cdn/chunks/{chunk.VJXJ24OK.js → chunk.FKC5SAC5.js} +1 -1
- package/cdn/chunks/{chunk.A5ILMN26.js → chunk.G62U2BDB.js} +1 -1
- package/cdn/chunks/{chunk.CUQWZ7IO.js → chunk.GAP3NMP6.js} +1 -1
- package/cdn/chunks/{chunk.UKLPQIYL.js → chunk.GZXB5Q7I.js} +8 -7
- package/cdn/chunks/chunk.H5ZKOE44.js +11 -0
- package/cdn/chunks/{chunk.AAHHK24C.js → chunk.HAFCRWWF.js} +7 -7
- package/cdn/chunks/{chunk.JC7NCTV3.js → chunk.HFPCERTR.js} +4 -4
- package/cdn/chunks/{chunk.ODCA53YM.js → chunk.HFX36NAZ.js} +1 -1
- package/cdn/chunks/{chunk.HDUGD4BT.js → chunk.HH4KTEOX.js} +7 -7
- package/cdn/chunks/{chunk.EGWQFRSJ.js → chunk.HZNHRGUW.js} +1 -1
- package/cdn/chunks/{chunk.NVO6AEKX.js → chunk.IAH6V4O6.js} +1 -1
- package/cdn/chunks/{chunk.D623GSPR.js → chunk.IBFQ4MLS.js} +1 -1
- package/cdn/chunks/{chunk.DJAGMFXZ.js → chunk.IFUMP3SM.js} +1 -1
- package/cdn/chunks/{chunk.YHGPKOXY.js → chunk.ILBB5HJK.js} +1 -1
- package/cdn/chunks/{chunk.FWXONNTU.js → chunk.IXTHDSH2.js} +1 -1
- package/{dist/chunks/chunk.4H7NUAAN.js → cdn/chunks/chunk.JGM5QSDL.js} +10 -2
- package/cdn/chunks/chunk.K3MR62NZ.js +181 -0
- package/{dist/chunks/chunk.QN5KURZ4.js → cdn/chunks/chunk.KF2IXR6F.js} +1 -1
- package/cdn/chunks/{chunk.Z3Z4ETP5.js → chunk.KFKG6VML.js} +1 -1
- package/{dist/chunks/chunk.RRE67WPJ.js → cdn/chunks/chunk.KHAA7DOA.js} +1 -1
- package/cdn/chunks/{chunk.M4S2IRFM.js → chunk.L3XGNBZC.js} +1 -1
- package/cdn/chunks/{chunk.PLPY7MLS.js → chunk.L54BOFZZ.js} +1 -1
- package/{dist/chunks/chunk.U3TBBNK7.js → cdn/chunks/chunk.LEWH7YKP.js} +1 -1
- package/{dist/chunks/chunk.QBOVLXXP.js → cdn/chunks/chunk.LRDC5FNM.js} +1 -1
- package/cdn/chunks/{chunk.3K5NTKB5.js → chunk.LRHB4GGU.js} +1 -1
- package/cdn/chunks/chunk.M22RVKD5.js +1156 -0
- package/cdn/chunks/{chunk.OHEL4NP5.js → chunk.MNIYL75K.js} +4 -4
- package/cdn/chunks/{chunk.WP3ZMSVT.js → chunk.MOGUH7GN.js} +1 -1
- package/{dist/chunks/chunk.UT7IPPSO.js → cdn/chunks/chunk.MOXXBMVH.js} +1 -1
- package/cdn/chunks/{chunk.FMPFP5OE.js → chunk.MRLC3567.js} +1 -1
- package/{dist/chunks/chunk.IJ3VMW2R.js → cdn/chunks/chunk.MW477ANT.js} +1 -1
- package/cdn/chunks/{chunk.OCJROKVC.js → chunk.MYLFX5LX.js} +1 -1
- package/cdn/chunks/{chunk.AIOAAHPL.js → chunk.NBCWBDT4.js} +1 -1
- package/cdn/chunks/{chunk.DN35DSU5.js → chunk.NBWMMBCI.js} +1 -1
- package/cdn/chunks/{chunk.MOV5RV53.js → chunk.NKXBOUPT.js} +1 -1
- package/cdn/chunks/{chunk.S23U5OGR.js → chunk.NPB5H3GH.js} +1 -1
- package/cdn/chunks/{chunk.H7LVX6WK.js → chunk.NSCQ5BDB.js} +1 -1
- package/cdn/chunks/chunk.NYQXSK4K.js +11 -0
- package/cdn/chunks/{chunk.N7W7BBNU.js → chunk.NZU6BSSA.js} +227 -0
- package/{dist/chunks/chunk.F5KDDEGG.js → cdn/chunks/chunk.NZXWOPL3.js} +1 -1
- package/cdn/chunks/{chunk.3FO6PJTD.js → chunk.O7BMIARB.js} +1 -1
- package/cdn/chunks/{chunk.WFGZ25EF.js → chunk.OBQXUZUT.js} +4 -4
- package/cdn/chunks/{chunk.22L6GGEN.js → chunk.OPUWOUN3.js} +1 -1
- package/cdn/chunks/{chunk.XPSRGG4H.js → chunk.OTYDDGYD.js} +1 -1
- package/cdn/chunks/{chunk.TBG5G4ET.js → chunk.PBB7322Y.js} +1 -1
- package/cdn/chunks/{chunk.2CWFRKQO.js → chunk.PG6GVAA4.js} +3 -3
- package/cdn/chunks/{chunk.ENXY5MW5.js → chunk.PLJLGB2U.js} +1 -1
- package/{dist/chunks/chunk.QZ6SOV43.js → cdn/chunks/chunk.POIE2XDG.js} +1 -1
- package/cdn/chunks/{chunk.4KPHRQ7L.js → chunk.PTU5C4HV.js} +1 -1
- package/{dist/chunks/chunk.I7A23GA6.js → cdn/chunks/chunk.QFZJJX6A.js} +1 -1
- package/cdn/chunks/chunk.QMAX5HQE.js +11 -0
- package/cdn/chunks/{chunk.XCZ57DS7.js → chunk.QPXE274O.js} +1 -1
- package/{dist/chunks/chunk.CSVWI6Y4.js → cdn/chunks/chunk.QROBXPC7.js} +1 -1
- package/{dist/chunks/chunk.ID3OSK4H.js → cdn/chunks/chunk.RJ3FTBIG.js} +1 -1
- package/cdn/chunks/{chunk.DKLBJEHD.js → chunk.RNK6BFDN.js} +11 -11
- package/{dist/chunks/chunk.MEBOP6MN.js → cdn/chunks/chunk.RSOAZPCO.js} +1 -1
- package/cdn/chunks/{chunk.77A7ZSJQ.js → chunk.RSREJ5ZX.js} +1 -1
- package/cdn/chunks/{chunk.ARH726IJ.js → chunk.S35STP65.js} +1 -1
- package/{dist/chunks/chunk.EBJFB5ED.js → cdn/chunks/chunk.S5S2NY35.js} +1 -1
- package/cdn/chunks/chunk.SFJXFFYI.js +24 -0
- package/cdn/chunks/chunk.SGCGLCRE.js +24 -0
- package/cdn/chunks/{chunk.2IJ4DOTI.js → chunk.SRPRGHBX.js} +1 -1
- package/cdn/chunks/chunk.SSB6QUTO.js +24 -0
- package/{dist/chunks/chunk.FJILDL42.js → cdn/chunks/chunk.STU2GAK3.js} +1 -1
- package/cdn/chunks/{chunk.IF3S5BNR.js → chunk.STYVQ3GY.js} +1 -1
- package/cdn/chunks/{chunk.ZNIGUQLJ.js → chunk.SXN43BZH.js} +1 -1
- package/cdn/chunks/{chunk.HIHQQRTZ.js → chunk.SZDK7V5H.js} +2 -2
- package/cdn/chunks/{chunk.AXVQ6SZ6.js → chunk.T4N2FGGL.js} +1 -1
- package/cdn/chunks/{chunk.KP4WXHNO.js → chunk.T5VRBH5J.js} +4 -4
- package/{dist/chunks/chunk.VDIOOKK3.js → cdn/chunks/chunk.T7OBFEH3.js} +1 -1
- package/{dist/chunks/chunk.566J3G5O.js → cdn/chunks/chunk.TKYOUUS4.js} +1 -1
- package/cdn/chunks/{chunk.UK67OQX4.js → chunk.TNUMW7A7.js} +1 -1
- package/cdn/chunks/chunk.UCVTBQUH.js +89 -0
- package/{dist/chunks/chunk.7ENY6KCX.js → cdn/chunks/chunk.UNHUSGU4.js} +1 -1
- package/cdn/chunks/chunk.UUVTBD2A.js +34 -0
- package/{dist/chunks/chunk.TJEPUVRV.js → cdn/chunks/chunk.V4N7IJQQ.js} +1 -1
- package/cdn/chunks/{chunk.J5NOE5GV.js → chunk.VAUFSUSB.js} +1 -1
- package/cdn/chunks/{chunk.CEKIG6XK.js → chunk.VBKSHZG6.js} +1 -1
- package/cdn/chunks/chunk.VKB6LKH4.js +91 -0
- package/{dist/chunks/chunk.77DZUVS6.js → cdn/chunks/chunk.VPGMGU5T.js} +1 -1
- package/cdn/chunks/{chunk.JNFUW4AH.js → chunk.VQ4QS2IG.js} +4 -4
- package/cdn/chunks/{chunk.EY32EKVK.js → chunk.VQZYCZBT.js} +4 -4
- package/cdn/chunks/{chunk.IGSMYZPJ.js → chunk.VVNUUKOU.js} +1 -1
- package/cdn/chunks/{chunk.QT6GUJBT.js → chunk.VYSCBDFH.js} +1 -1
- package/cdn/chunks/chunk.WBCR74E3.js +25 -0
- package/cdn/chunks/chunk.WEXM5ZNH.js +11 -0
- package/cdn/chunks/{chunk.W2JTEAS7.js → chunk.WPESYCFW.js} +1 -1
- package/cdn/chunks/{chunk.GFQ55FWN.js → chunk.WTJDLUX5.js} +7 -7
- package/cdn/chunks/{chunk.3T64H6HE.js → chunk.X3YUXAYG.js} +1 -1
- package/cdn/chunks/{chunk.JYH4JK7N.js → chunk.XNGBMHEJ.js} +2 -2
- package/cdn/chunks/{chunk.5ETPM5Y2.js → chunk.XRHTDMWI.js} +16 -12
- package/cdn/chunks/{chunk.VCCYYUGH.js → chunk.XTB2EMPO.js} +4 -4
- package/cdn/chunks/{chunk.E3KU5ZUQ.js → chunk.XTZD43PS.js} +1 -1
- package/cdn/chunks/{chunk.N2OQN5XQ.js → chunk.XY7Q4XXB.js} +1 -1
- package/{dist/chunks/chunk.LI6FEX4U.js → cdn/chunks/chunk.XZLP3R7F.js} +1 -1
- package/cdn/chunks/{chunk.I7QQDK7H.js → chunk.YATAWBAE.js} +1 -1
- package/cdn/chunks/{chunk.UXGLUGIV.js → chunk.YCNZNFG7.js} +2 -3
- package/{dist/chunks/chunk.2AGMSWQ3.js → cdn/chunks/chunk.YLTSE26T.js} +1 -1
- package/cdn/chunks/{chunk.BUTJ2U7V.js → chunk.YNIOT4PI.js} +8 -8
- package/cdn/chunks/{chunk.HNN73HJU.js → chunk.YNJYQXVB.js} +480 -8
- package/cdn/chunks/{chunk.N5NZNXBO.js → chunk.Z5YUILXA.js} +5 -5
- package/cdn/chunks/{chunk.MVBM42IW.js → chunk.ZFCRZORN.js} +1 -1
- package/cdn/chunks/{chunk.64S2MHOQ.js → chunk.ZIDTQCIT.js} +1 -1
- package/cdn/chunks/{chunk.BRSGTB5E.js → chunk.ZTVV5FSP.js} +1 -1
- package/cdn/chunks/{chunk.6WQO4RV4.js → chunk.ZUG342V6.js} +1 -1
- package/cdn/chunks/{chunk.G2AWY2X3.js → chunk.ZVNL2EA7.js} +1 -1
- package/cdn/chunks/{chunk.EQDPX25E.js → chunk.ZX24V6F5.js} +4 -4
- package/cdn/components/alert/alert.component.js +7 -7
- package/cdn/components/alert/alert.js +8 -8
- package/cdn/components/animated-image/animated-image.component.js +4 -4
- package/cdn/components/animated-image/animated-image.js +5 -5
- package/cdn/components/avatar/avatar.component.js +3 -3
- package/cdn/components/avatar/avatar.js +4 -4
- package/cdn/components/breadcrumb/breadcrumb.component.js +3 -3
- package/cdn/components/breadcrumb/breadcrumb.js +4 -4
- package/cdn/components/button/button.component.js +5 -5
- package/cdn/components/button/button.js +6 -6
- package/cdn/components/calendar/calendar.component.js +8 -8
- package/cdn/components/calendar/calendar.js +8 -8
- package/cdn/components/carousel/carousel.component.js +3 -3
- package/cdn/components/carousel/carousel.js +4 -4
- package/cdn/components/checkbox/checkbox.component.js +4 -4
- package/cdn/components/checkbox/checkbox.js +5 -5
- package/cdn/components/color-picker/color-picker.component.js +12 -12
- package/cdn/components/color-picker/color-picker.js +13 -13
- package/cdn/components/copy-button/copy-button.component.js +4 -4
- package/cdn/components/copy-button/copy-button.js +5 -5
- package/cdn/components/date-panel/date-panel.component.js +11 -11
- package/cdn/components/date-panel/date-panel.js +11 -11
- package/cdn/components/datepicker/datepicker.component.js +16 -16
- package/cdn/components/datepicker/datepicker.js +16 -16
- package/cdn/components/daterangepicker/daterangepicker.component.js +21 -10
- package/cdn/components/daterangepicker/daterangepicker.js +22 -11
- package/cdn/components/daterangepicker/daterangepicker.styles.js +1 -1
- package/cdn/components/details/details.component.js +3 -3
- package/cdn/components/details/details.js +4 -4
- package/cdn/components/dialog/dialog.component.js +6 -6
- package/cdn/components/dialog/dialog.js +7 -7
- package/cdn/components/drawer/drawer.component.js +6 -6
- package/cdn/components/drawer/drawer.js +7 -7
- package/cdn/components/dropdown/dropdown.component.js +2 -2
- package/cdn/components/dropdown/dropdown.js +3 -3
- package/cdn/components/float-button/float-button.component.js +34 -0
- package/cdn/components/float-button/float-button.js +35 -0
- package/cdn/components/float-button/float-button.styles.js +9 -0
- package/cdn/components/float-button-group/float-button-group.component.js +22 -0
- package/cdn/components/float-button-group/float-button-group.js +23 -0
- package/cdn/components/float-button-group/float-button-group.styles.js +9 -0
- package/cdn/components/icon/icon.component.js +2 -2
- package/cdn/components/icon/icon.js +3 -3
- package/cdn/components/icon-button/icon-button.component.js +3 -3
- package/cdn/components/icon-button/icon-button.js +4 -4
- package/cdn/components/image-comparer/image-comparer.component.js +3 -3
- package/cdn/components/image-comparer/image-comparer.js +4 -4
- package/cdn/components/include/include.component.js +2 -2
- package/cdn/components/include/include.js +3 -3
- package/cdn/components/input/input.component.js +5 -5
- package/cdn/components/input/input.js +6 -6
- package/cdn/components/menu-item/menu-item.component.js +4 -4
- package/cdn/components/menu-item/menu-item.js +5 -5
- package/cdn/components/nav/nav.component.js +9 -9
- package/cdn/components/nav/nav.js +10 -10
- package/cdn/components/nav-submenu/nav-submenu.component.js +4 -4
- package/cdn/components/nav-submenu/nav-submenu.js +5 -5
- package/cdn/components/option/option.component.js +3 -3
- package/cdn/components/option/option.js +4 -4
- package/cdn/components/pagination/custom-select.js +9 -9
- package/cdn/components/pagination/pagination.component.js +10 -10
- package/cdn/components/pagination/pagination.js +10 -10
- package/cdn/components/progress-bar/progress-bar.component.js +2 -2
- package/cdn/components/progress-bar/progress-bar.js +3 -3
- package/cdn/components/radio/radio.component.js +3 -3
- package/cdn/components/radio/radio.js +4 -4
- package/cdn/components/radio-group/radio-group.component.js +2 -2
- package/cdn/components/radio-group/radio-group.js +3 -3
- package/cdn/components/range/range.component.js +3 -3
- package/cdn/components/range/range.js +4 -4
- package/cdn/components/rating/rating.component.js +3 -3
- package/cdn/components/rating/rating.js +4 -4
- package/cdn/components/select/select.component.js +8 -8
- package/cdn/components/select/select.js +9 -9
- package/cdn/components/sender/sender.component.js +54 -0
- package/cdn/components/sender/sender.js +55 -0
- package/cdn/components/sender/sender.styles.js +9 -0
- package/cdn/components/sender-header/sender-header.component.js +33 -0
- package/cdn/components/sender-header/sender-header.js +34 -0
- package/cdn/components/sender-header/sender-header.styles.js +9 -0
- package/cdn/components/sender-switch/sender-switch.component.js +33 -0
- package/cdn/components/sender-switch/sender-switch.js +34 -0
- package/cdn/components/sender-switch/sender-switch.styles.js +9 -0
- package/cdn/components/split-panel/split-panel.component.js +2 -2
- package/cdn/components/split-panel/split-panel.js +3 -3
- package/cdn/components/tab/tab.component.js +5 -5
- package/cdn/components/tab/tab.js +6 -6
- package/cdn/components/tab-group/tab-group.component.js +5 -5
- package/cdn/components/tab-group/tab-group.js +6 -6
- package/cdn/components/table/body-table.js +2 -2
- package/cdn/components/table/features/index.js +3 -3
- package/cdn/components/table/features/row-drag-controller.js +1 -1
- package/cdn/components/table/head-table.js +19 -19
- package/cdn/components/table/table.component.js +28 -28
- package/cdn/components/table/table.js +30 -30
- package/cdn/components/tag/tag.component.js +5 -5
- package/cdn/components/tag/tag.js +6 -6
- package/cdn/components/think/think.component.js +4 -4
- package/cdn/components/think/think.js +5 -5
- package/cdn/components/think/think.styles.js +1 -1
- package/cdn/components/thought-chain-item/thought-chain-item.component.js +3 -3
- package/cdn/components/thought-chain-item/thought-chain-item.js +4 -4
- package/cdn/components/thought-chain-node/thought-chain-node.component.js +3 -3
- package/cdn/components/thought-chain-node/thought-chain-node.js +4 -4
- package/cdn/components/time-panel/time-panel.component.js +7 -7
- package/cdn/components/time-panel/time-panel.js +7 -7
- package/cdn/components/time-panel/time-panel.styles.js +1 -1
- package/cdn/components/timepicker/timepicker.component.js +16 -16
- package/cdn/components/timepicker/timepicker.js +16 -16
- package/cdn/components/tree/tree.component.js +9 -9
- package/cdn/components/tree/tree.js +10 -10
- package/cdn/components/tree-item/tree-item.component.js +7 -7
- package/cdn/components/tree-item/tree-item.js +8 -8
- package/cdn/components/x-markdown/markdown/render.js +2 -2
- package/cdn/components/x-markdown/x-markdown.component.js +3 -3
- package/cdn/components/x-markdown/x-markdown.js +4 -4
- package/cdn/custom-elements.json +5099 -3012
- package/cdn/react/alert/index.js +8 -8
- package/cdn/react/animated-image/index.js +5 -5
- package/cdn/react/avatar/index.js +4 -4
- package/cdn/react/breadcrumb/index.js +4 -4
- package/cdn/react/button/index.js +6 -6
- package/cdn/react/carousel/index.js +4 -4
- package/cdn/react/checkbox/index.js +5 -5
- package/cdn/react/color-picker/index.js +13 -13
- package/cdn/react/copy-button/index.js +5 -5
- package/cdn/react/date-panel/index.js +12 -12
- package/cdn/react/datepicker/index.js +17 -17
- package/cdn/react/daterangepicker/index.js +22 -11
- package/cdn/react/details/index.js +4 -4
- package/cdn/react/dialog/index.js +7 -7
- package/cdn/react/drawer/index.js +7 -7
- package/cdn/react/dropdown/index.js +3 -3
- package/cdn/react/float-button/index.js +35 -0
- package/cdn/react/float-button-group/index.js +23 -0
- package/cdn/react/icon/index.js +3 -3
- package/cdn/react/icon-button/index.js +4 -4
- package/cdn/react/image-comparer/index.js +4 -4
- package/cdn/react/include/index.js +3 -3
- package/cdn/react/index.js +255 -225
- package/cdn/react/input/index.js +6 -6
- package/cdn/react/menu-item/index.js +5 -5
- package/cdn/react/nav/index.js +10 -10
- package/cdn/react/nav-submenu/index.js +5 -5
- package/cdn/react/option/index.js +4 -4
- package/cdn/react/pagination/index.js +11 -11
- package/cdn/react/progress-bar/index.js +3 -3
- package/cdn/react/radio/index.js +4 -4
- package/cdn/react/radio-group/index.js +3 -3
- package/cdn/react/range/index.js +4 -4
- package/cdn/react/rating/index.js +4 -4
- package/cdn/react/select/index.js +9 -9
- package/cdn/react/sender/index.js +55 -0
- package/cdn/react/sender-header/index.js +34 -0
- package/cdn/react/sender-switch/index.js +34 -0
- package/cdn/react/split-panel/index.js +3 -3
- package/cdn/react/tab/index.js +6 -6
- package/cdn/react/tab-group/index.js +6 -6
- package/cdn/react/table/index.js +29 -29
- package/cdn/react/tag/index.js +6 -6
- package/cdn/react/think/index.js +5 -5
- package/cdn/react/thought-chain-item/index.js +4 -4
- package/cdn/react/thought-chain-node/index.js +4 -4
- package/cdn/react/timepicker/index.js +17 -17
- package/cdn/react/tree/index.js +10 -10
- package/cdn/react/tree-item/index.js +8 -8
- package/cdn/react/x-markdown/index.js +4 -4
- package/cdn/shoelace.js +272 -242
- package/cdn/themes/dark.css +14 -16
- package/cdn/themes/dark.styles.js +14 -16
- package/cdn/themes/light.css +47 -4
- package/cdn/themes/light.styles.js +47 -4
- package/cdn/themes/nova.css +20 -52
- package/cdn/themes/nova.styles.js +20 -52
- package/cdn/types/vue/index.d.ts +615 -340
- package/cdn/vscode.html-custom-data.json +468 -277
- package/cdn/web-types.json +1622 -1075
- package/{cdn/chunks/chunk.VVM2WFCF.js → dist/chunks/chunk.2222Y2UK.js} +1 -1
- package/dist/chunks/{chunk.TN7PWYQP.js → chunk.24YRDJWM.js} +2 -2
- package/dist/chunks/chunk.255ED3AX.js +29 -0
- package/dist/chunks/{chunk.4B3M6B7S.js → chunk.277V6KES.js} +1 -1
- package/dist/chunks/{chunk.F3B2VXIE.js → chunk.2T32M5MK.js} +7 -7
- package/dist/chunks/{chunk.RSLDQNZV.js → chunk.2ZZFGPJB.js} +1 -1
- package/{cdn/chunks/chunk.PRUWH44M.js → dist/chunks/chunk.3BI3ZBWV.js} +1 -1
- package/dist/chunks/{chunk.LHB2IX4Q.js → chunk.3ONOB433.js} +1 -1
- package/dist/chunks/{chunk.JGOR72YW.js → chunk.4QJCVJBF.js} +1 -1
- package/dist/chunks/{chunk.HUZFXLTR.js → chunk.4UNNJGN7.js} +3 -3
- package/dist/chunks/{chunk.RZEI373K.js → chunk.4UZHYDUY.js} +1 -1
- package/dist/chunks/{chunk.SJQBLTVX.js → chunk.4V3MCNCG.js} +4 -4
- package/dist/chunks/{chunk.UH4QRZF2.js → chunk.4X653G5O.js} +4 -4
- package/dist/chunks/{chunk.BU33S5IX.js → chunk.4XRAGUIQ.js} +1 -1
- package/dist/chunks/{chunk.K6WZPHYX.js → chunk.56LFKZBN.js} +1 -1
- package/{cdn/chunks/chunk.6YC7EQ35.js → dist/chunks/chunk.576UYCIO.js} +1 -1
- package/dist/chunks/{chunk.UUFFPP2C.js → chunk.5XQT43Z6.js} +4 -4
- package/dist/chunks/{chunk.LGPVZ5VZ.js → chunk.5YOOCYJR.js} +1 -1
- package/dist/chunks/{chunk.VFO6XX4A.js → chunk.6B322ONF.js} +1 -1
- package/dist/chunks/{chunk.OX3TLBRT.js → chunk.6JMQ2TIB.js} +1 -1
- package/{cdn/chunks/chunk.6WFV6NC7.js → dist/chunks/chunk.73BK3LQW.js} +1 -1
- package/dist/chunks/{chunk.KIRCNHCN.js → chunk.75YPNEVH.js} +1 -1
- package/dist/chunks/{chunk.3MI6FFND.js → chunk.7FBPST7K.js} +1 -1
- package/dist/chunks/{chunk.WYYIVPNV.js → chunk.7HG6ANKZ.js} +1 -1
- package/dist/chunks/{chunk.VZFYIASQ.js → chunk.7UIHF6BL.js} +1 -1
- package/dist/chunks/chunk.7UUWTJQR.js +178 -0
- package/{cdn/chunks/chunk.DTQ34BNA.js → dist/chunks/chunk.A4I7TNK6.js} +1 -1
- package/dist/chunks/{chunk.GMC3L4HB.js → chunk.A5FVRZ2V.js} +1 -1
- package/dist/chunks/{chunk.3OVZFWLQ.js → chunk.ACYS3462.js} +1 -1
- package/dist/chunks/{chunk.MU5AZVCP.js → chunk.AMPAX7MW.js} +1 -1
- package/dist/chunks/{chunk.BN4VTNVI.js → chunk.AR55FJTM.js} +1 -1
- package/{cdn/chunks/chunk.4H4WSGCJ.js → dist/chunks/chunk.AT6Q3CT3.js} +1 -1
- package/{cdn/chunks/chunk.4VDEW5WY.js → dist/chunks/chunk.ATWVDQCS.js} +1 -1
- package/dist/chunks/{chunk.FACUDL3Y.js → chunk.AV6HVIYO.js} +1 -1
- package/dist/chunks/{chunk.JEIRYLA7.js → chunk.AZ2WMYLE.js} +1 -1
- package/dist/chunks/chunk.AZTRAFIF.js +86 -0
- package/dist/chunks/{chunk.D3Y3WW77.js → chunk.BDR6VFV5.js} +1 -1
- package/dist/chunks/chunk.BW24FEPY.js +42 -0
- package/dist/chunks/{chunk.XLVA5ZEI.js → chunk.CBSZF36H.js} +1 -1
- package/dist/chunks/{chunk.QEB3AMG2.js → chunk.CJJNKIGS.js} +1 -1
- package/dist/chunks/{chunk.LDYNEEPR.js → chunk.CMHVCSO3.js} +1 -1
- package/dist/chunks/chunk.CMQDL7CN.js +25 -0
- package/dist/chunks/{chunk.VOXZIPYZ.js → chunk.COGPFCGH.js} +1 -1
- package/dist/chunks/{chunk.7Q6JJ7KV.js → chunk.CPYCCN74.js} +1 -1
- package/{cdn/chunks/chunk.OSXVD4NI.js → dist/chunks/chunk.CS3KGM3I.js} +1 -1
- package/dist/chunks/{chunk.2AQN4JQJ.js → chunk.CSJDM3I6.js} +8 -7
- package/dist/chunks/chunk.CVSDG6FV.js +24 -0
- package/dist/chunks/chunk.D23WFKHD.js +31 -0
- package/{cdn/chunks/chunk.72QKDL6S.js → dist/chunks/chunk.D46NZRNK.js} +1 -1
- package/dist/chunks/{chunk.MDNVBBZH.js → chunk.D7XNHHL2.js} +4 -3
- package/{cdn/chunks/chunk.QRPICAKD.js → dist/chunks/chunk.DEITFGBS.js} +1 -1
- package/{cdn/chunks/chunk.62S3UIKH.js → dist/chunks/chunk.DKX5VTND.js} +1 -1
- package/dist/chunks/chunk.DNWRKWYS.js +11 -0
- package/dist/chunks/{chunk.ADTP5OV5.js → chunk.DQABKHDM.js} +9 -9
- package/dist/chunks/{chunk.PLFXQQK7.js → chunk.DTKQCP3B.js} +1 -1
- package/dist/chunks/{chunk.WYGWB63T.js → chunk.DVZSBAMK.js} +1 -1
- package/dist/chunks/{chunk.IDAAUGHM.js → chunk.F3YAUNWY.js} +1 -1
- package/dist/chunks/{chunk.7DCG5NJM.js → chunk.FJR4PM7P.js} +1 -1
- package/dist/chunks/{chunk.QYRMBDMM.js → chunk.FZW6GDBE.js} +1 -1
- package/dist/chunks/chunk.GGRJO2OJ.js +335 -0
- package/dist/chunks/{chunk.ZB5UNZGF.js → chunk.GJTIA2ID.js} +1 -1
- package/dist/chunks/{chunk.FHEE6NC4.js → chunk.GT3XTQOL.js} +1 -1
- package/dist/chunks/chunk.GURJBGDH.js +24 -0
- package/dist/chunks/{chunk.GFT5UP3U.js → chunk.H6E5FUQA.js} +2 -3
- package/dist/chunks/{chunk.7RHFV3RB.js → chunk.HEIDKY6A.js} +1 -1
- package/dist/chunks/{chunk.PRNRZ46M.js → chunk.HUEJ6FJI.js} +1 -1
- package/dist/chunks/chunk.HXJCURBU.js +84 -0
- package/dist/chunks/{chunk.PKSNYBHX.js → chunk.I3E7XRJD.js} +1 -1
- package/dist/chunks/{chunk.6VOY3F7S.js → chunk.IBO3W47J.js} +4 -4
- package/dist/chunks/{chunk.3JH4YGTR.js → chunk.IFLJEMM4.js} +1 -1
- package/dist/chunks/{chunk.F5QCDAZD.js → chunk.IIITTBKF.js} +1 -1
- package/dist/chunks/{chunk.Q5QQPLBB.js → chunk.IL42CGIL.js} +1 -1
- package/dist/chunks/{chunk.7N2XFSOU.js → chunk.INWQRWZW.js} +1 -1
- package/dist/chunks/chunk.IPRT4PW2.js +148 -0
- package/dist/chunks/{chunk.ZDWVDDKH.js → chunk.IWLHXROM.js} +2 -2
- package/dist/chunks/{chunk.QIBAK7JU.js → chunk.J273PGYD.js} +1 -1
- package/dist/chunks/{chunk.RB2I5S6R.js → chunk.KFSHKNTI.js} +1 -1
- package/dist/chunks/{chunk.4TUTWGUS.js → chunk.KFT7NHGH.js} +227 -0
- package/dist/chunks/{chunk.ODVC7KHR.js → chunk.KWBC22UR.js} +28 -10
- package/dist/chunks/{chunk.DK37NZTT.js → chunk.KXLNRRER.js} +1 -1
- package/dist/chunks/{chunk.CKXVVDDK.js → chunk.LJUGR5OF.js} +4 -4
- package/dist/chunks/{chunk.LDKADK5S.js → chunk.LVUUWAFL.js} +480 -8
- package/{cdn/chunks/chunk.RN2Q4HOE.js → dist/chunks/chunk.M4PMEYE2.js} +1 -1
- package/{cdn/chunks/chunk.HH7XVAMC.js → dist/chunks/chunk.MAWNPWPF.js} +10 -2
- package/dist/chunks/{chunk.6D337CRO.js → chunk.MHCVVLCT.js} +1 -1
- package/dist/chunks/{chunk.QJTW7WJF.js → chunk.MHMUDAVA.js} +1 -1
- package/{cdn/chunks/chunk.7X5AEKPB.js → dist/chunks/chunk.MZLRGXPI.js} +1 -1
- package/{cdn/chunks/chunk.4N2I2AUC.js → dist/chunks/chunk.N46JKT2J.js} +1 -1
- package/dist/chunks/chunk.N5D2F64K.js +11 -0
- package/dist/chunks/{chunk.2HWAAINE.js → chunk.N7JHDJGM.js} +1 -1
- package/dist/chunks/{chunk.4GEQTMEV.js → chunk.NJCLPQUU.js} +6 -6
- package/{cdn/chunks/chunk.IS65YVZ6.js → dist/chunks/chunk.NKOQAWVZ.js} +1 -1
- package/dist/chunks/{chunk.7IZ4S4JF.js → chunk.NOJSANXR.js} +4 -4
- package/dist/chunks/{chunk.AR2OP4VW.js → chunk.NYQ75SBP.js} +1 -1
- package/dist/chunks/{chunk.6QHPFU7W.js → chunk.ON4ZSL6J.js} +1 -1
- package/dist/chunks/{chunk.5WEDPOQM.js → chunk.OSALHQGA.js} +1 -1
- package/{cdn/chunks/chunk.JS5UK2QZ.js → dist/chunks/chunk.P43PK6RL.js} +1 -1
- package/dist/chunks/{chunk.PJ5F7CV7.js → chunk.PGTN7J4V.js} +4 -4
- package/{cdn/chunks/chunk.4KRZJIAJ.js → dist/chunks/chunk.PMI7GCY2.js} +1 -1
- package/dist/chunks/{chunk.56HIWCX6.js → chunk.POUWYLGI.js} +1 -1
- package/{cdn/chunks/chunk.RD4VINFB.js → dist/chunks/chunk.PW7XZMYT.js} +1 -1
- package/{cdn/chunks/chunk.FPMCB7RB.js → dist/chunks/chunk.Q73UA4YW.js} +1 -1
- package/dist/chunks/chunk.QAYUT4BX.js +24 -0
- package/{cdn/chunks/chunk.WSNHPA4G.js → dist/chunks/chunk.QP5DAVFM.js} +1 -1
- package/dist/chunks/{chunk.NPS3ESCM.js → chunk.QQVS2P2C.js} +1 -1
- package/{cdn/chunks/chunk.QM45FXEX.js → dist/chunks/chunk.R5WPNMCQ.js} +1 -1
- package/dist/chunks/chunk.RS2GWDLW.js +153 -0
- package/{cdn/chunks/chunk.TCDIALPO.js → dist/chunks/chunk.RY2V2DAG.js} +1 -1
- package/dist/chunks/{chunk.6PXKSSWB.js → chunk.RZAJZ3DQ.js} +1 -1
- package/dist/chunks/{chunk.CD3W4OKL.js → chunk.S3JB2UHY.js} +1 -1
- package/dist/chunks/{chunk.NNXYAEOE.js → chunk.S4YBE4U3.js} +3 -3
- package/dist/chunks/{chunk.5RQBRMVA.js → chunk.S6OTSVTK.js} +1 -1
- package/dist/chunks/chunk.SI5MIM74.js +11 -0
- package/dist/chunks/{chunk.WNE6EGZT.js → chunk.SL5TVNJJ.js} +7 -7
- package/{cdn/chunks/chunk.533QXPAJ.js → dist/chunks/chunk.T2MF4VUY.js} +1 -1
- package/dist/chunks/{chunk.Q4TZCBZJ.js → chunk.TDWRSVI2.js} +1 -1
- package/dist/chunks/chunk.TFVPZDQP.js +1150 -0
- package/dist/chunks/{chunk.4TR2RXVB.js → chunk.TOIQDGSN.js} +1 -1
- package/dist/chunks/chunk.TTNMH7HL.js +11 -0
- package/dist/chunks/{chunk.5VMZZO5N.js → chunk.U546SMOX.js} +1 -1
- package/dist/chunks/{chunk.VR5RMHED.js → chunk.U7ELM3KR.js} +1 -1
- package/dist/chunks/{chunk.CLWK62MG.js → chunk.UQBEXQPA.js} +1 -1
- package/dist/chunks/{chunk.5KR42J46.js → chunk.VGZSH2J3.js} +1 -1
- package/{cdn/chunks/chunk.K7FKD6TO.js → dist/chunks/chunk.VOBHSZHJ.js} +1 -1
- package/dist/chunks/{chunk.LQCPIDQK.js → chunk.VTDIICXK.js} +1 -1
- package/dist/chunks/{chunk.4L4G75M3.js → chunk.VW4UAUYL.js} +1 -1
- package/dist/chunks/chunk.VX2XAZP7.js +149 -0
- package/dist/chunks/{chunk.G2POJAIO.js → chunk.W2MX7XQG.js} +1 -1
- package/{cdn/chunks/chunk.3ER5B33F.js → dist/chunks/chunk.W2XAF2TT.js} +1 -1
- package/dist/chunks/{chunk.QHAMOKMK.js → chunk.W6RAVHWZ.js} +2 -2
- package/dist/chunks/{chunk.NGEK5MSS.js → chunk.WDHQTWCE.js} +1 -1
- package/dist/chunks/{chunk.LNEYI7LV.js → chunk.WGWXYQAT.js} +4 -4
- package/dist/chunks/chunk.WTQNDLPG.js +11 -0
- package/dist/chunks/{chunk.LX5NM5NQ.js → chunk.X3FWAJEG.js} +1 -1
- package/dist/chunks/{chunk.PAHARZQS.js → chunk.XGK7HEDC.js} +1 -1
- package/{cdn/chunks/chunk.27S4WN5H.js → dist/chunks/chunk.XQMCPLLN.js} +1 -1
- package/dist/chunks/{chunk.FFNLDJFZ.js → chunk.XZNGEUYB.js} +1 -1
- package/dist/chunks/{chunk.KOMHPUGR.js → chunk.YO7DMVSG.js} +8 -8
- package/dist/chunks/{chunk.5AT3BVD5.js → chunk.YT7X6G4Q.js} +11 -7
- package/dist/chunks/{chunk.2XKG643M.js → chunk.ZE3LRPQR.js} +1 -1
- package/dist/chunks/{chunk.67C5V6BY.js → chunk.ZIK6UFCB.js} +4 -4
- package/dist/chunks/{chunk.X5WLR642.js → chunk.ZPSIFGI7.js} +1 -1
- package/dist/chunks/{chunk.CC7B3VFN.js → chunk.ZXDRF2AZ.js} +1 -1
- package/dist/components/alert/alert.component.js +6 -6
- package/dist/components/alert/alert.js +7 -7
- package/dist/components/animated-image/animated-image.component.js +4 -4
- package/dist/components/animated-image/animated-image.js +5 -5
- package/dist/components/avatar/avatar.component.js +3 -3
- package/dist/components/avatar/avatar.js +4 -4
- package/dist/components/breadcrumb/breadcrumb.component.js +3 -3
- package/dist/components/breadcrumb/breadcrumb.js +4 -4
- package/dist/components/button/button.component.js +4 -4
- package/dist/components/button/button.js +5 -5
- package/dist/components/calendar/calendar.component.js +7 -7
- package/dist/components/calendar/calendar.js +7 -7
- package/dist/components/carousel/carousel.component.js +3 -3
- package/dist/components/carousel/carousel.js +4 -4
- package/dist/components/checkbox/checkbox.component.js +4 -4
- package/dist/components/checkbox/checkbox.js +5 -5
- package/dist/components/color-picker/color-picker.component.js +10 -10
- package/dist/components/color-picker/color-picker.js +11 -11
- package/dist/components/copy-button/copy-button.component.js +4 -4
- package/dist/components/copy-button/copy-button.js +5 -5
- package/dist/components/date-panel/date-panel.component.js +10 -10
- package/dist/components/date-panel/date-panel.js +10 -10
- package/dist/components/datepicker/datepicker.component.js +15 -15
- package/dist/components/datepicker/datepicker.js +15 -15
- package/dist/components/daterangepicker/daterangepicker.component.js +20 -9
- package/dist/components/daterangepicker/daterangepicker.js +21 -10
- package/dist/components/daterangepicker/daterangepicker.styles.js +1 -1
- package/dist/components/details/details.component.js +3 -3
- package/dist/components/details/details.js +4 -4
- package/dist/components/dialog/dialog.component.js +5 -5
- package/dist/components/dialog/dialog.js +6 -6
- package/dist/components/drawer/drawer.component.js +5 -5
- package/dist/components/drawer/drawer.js +6 -6
- package/dist/components/float-button/float-button.component.js +27 -0
- package/dist/components/float-button/float-button.js +28 -0
- package/dist/components/float-button/float-button.styles.js +7 -0
- package/dist/components/float-button-group/float-button-group.component.js +17 -0
- package/dist/components/float-button-group/float-button-group.js +18 -0
- package/dist/components/float-button-group/float-button-group.styles.js +7 -0
- package/dist/components/icon/icon.component.js +2 -2
- package/dist/components/icon/icon.js +3 -3
- package/dist/components/icon-button/icon-button.component.js +3 -3
- package/dist/components/icon-button/icon-button.js +4 -4
- package/dist/components/image-comparer/image-comparer.component.js +3 -3
- package/dist/components/image-comparer/image-comparer.js +4 -4
- package/dist/components/include/include.component.js +2 -2
- package/dist/components/include/include.js +3 -3
- package/dist/components/input/input.component.js +4 -4
- package/dist/components/input/input.js +5 -5
- package/dist/components/menu-item/menu-item.component.js +4 -4
- package/dist/components/menu-item/menu-item.js +5 -5
- package/dist/components/nav/nav.component.js +9 -9
- package/dist/components/nav/nav.js +10 -10
- package/dist/components/nav-submenu/nav-submenu.component.js +4 -4
- package/dist/components/nav-submenu/nav-submenu.js +5 -5
- package/dist/components/option/option.component.js +3 -3
- package/dist/components/option/option.js +4 -4
- package/dist/components/pagination/custom-select.js +7 -7
- package/dist/components/pagination/pagination.component.js +8 -8
- package/dist/components/pagination/pagination.js +8 -8
- package/dist/components/radio/radio.component.js +3 -3
- package/dist/components/radio/radio.js +4 -4
- package/dist/components/radio-group/radio-group.component.js +2 -2
- package/dist/components/radio-group/radio-group.js +3 -3
- package/dist/components/range/range.component.js +2 -2
- package/dist/components/range/range.js +3 -3
- package/dist/components/rating/rating.component.js +3 -3
- package/dist/components/rating/rating.js +4 -4
- package/dist/components/select/select.component.js +7 -7
- package/dist/components/select/select.js +8 -8
- package/dist/components/sender/sender.component.js +45 -0
- package/dist/components/sender/sender.js +46 -0
- package/dist/components/sender/sender.styles.js +7 -0
- package/dist/components/sender-header/sender-header.component.js +25 -0
- package/dist/components/sender-header/sender-header.js +26 -0
- package/dist/components/sender-header/sender-header.styles.js +7 -0
- package/dist/components/sender-switch/sender-switch.component.js +25 -0
- package/dist/components/sender-switch/sender-switch.js +26 -0
- package/dist/components/sender-switch/sender-switch.styles.js +7 -0
- package/dist/components/tab/tab.component.js +4 -4
- package/dist/components/tab/tab.js +5 -5
- package/dist/components/tab-group/tab-group.component.js +4 -4
- package/dist/components/tab-group/tab-group.js +5 -5
- package/dist/components/table/body-table.js +2 -2
- package/dist/components/table/features/index.js +3 -3
- package/dist/components/table/features/row-drag-controller.js +1 -1
- package/dist/components/table/head-table.js +17 -17
- package/dist/components/table/table.component.js +25 -25
- package/dist/components/table/table.js +27 -27
- package/dist/components/tag/tag.component.js +4 -4
- package/dist/components/tag/tag.js +5 -5
- package/dist/components/think/think.component.js +4 -4
- package/dist/components/think/think.js +5 -5
- package/dist/components/think/think.styles.js +1 -1
- package/dist/components/thought-chain-item/thought-chain-item.component.js +3 -3
- package/dist/components/thought-chain-item/thought-chain-item.js +4 -4
- package/dist/components/thought-chain-node/thought-chain-node.component.js +3 -3
- package/dist/components/thought-chain-node/thought-chain-node.js +4 -4
- package/dist/components/time-panel/time-panel.component.js +6 -6
- package/dist/components/time-panel/time-panel.js +6 -6
- package/dist/components/time-panel/time-panel.styles.js +1 -1
- package/dist/components/timepicker/timepicker.component.js +15 -15
- package/dist/components/timepicker/timepicker.js +15 -15
- package/dist/components/tree/tree.component.js +8 -8
- package/dist/components/tree/tree.js +9 -9
- package/dist/components/tree-item/tree-item.component.js +6 -6
- package/dist/components/tree-item/tree-item.js +7 -7
- package/dist/components/x-markdown/markdown/render.js +2 -2
- package/dist/components/x-markdown/x-markdown.component.js +3 -3
- package/dist/components/x-markdown/x-markdown.js +4 -4
- package/dist/custom-elements.json +5099 -3012
- package/dist/react/alert/index.js +7 -7
- package/dist/react/animated-image/index.js +5 -5
- package/dist/react/avatar/index.js +4 -4
- package/dist/react/breadcrumb/index.js +4 -4
- package/dist/react/button/index.js +5 -5
- package/dist/react/carousel/index.js +4 -4
- package/dist/react/checkbox/index.js +5 -5
- package/dist/react/color-picker/index.js +11 -11
- package/dist/react/copy-button/index.js +5 -5
- package/dist/react/date-panel/index.js +11 -11
- package/dist/react/datepicker/index.js +16 -16
- package/dist/react/daterangepicker/index.js +21 -10
- package/dist/react/details/index.js +4 -4
- package/dist/react/dialog/index.js +6 -6
- package/dist/react/drawer/index.js +6 -6
- package/dist/react/float-button/index.js +28 -0
- package/dist/react/float-button-group/index.js +18 -0
- package/dist/react/icon/index.js +3 -3
- package/dist/react/icon-button/index.js +4 -4
- package/dist/react/image-comparer/index.js +4 -4
- package/dist/react/include/index.js +3 -3
- package/dist/react/index.js +248 -218
- package/dist/react/input/index.js +5 -5
- package/dist/react/menu-item/index.js +5 -5
- package/dist/react/nav/index.js +10 -10
- package/dist/react/nav-submenu/index.js +5 -5
- package/dist/react/option/index.js +4 -4
- package/dist/react/pagination/index.js +9 -9
- package/dist/react/radio/index.js +4 -4
- package/dist/react/radio-group/index.js +3 -3
- package/dist/react/range/index.js +3 -3
- package/dist/react/rating/index.js +4 -4
- package/dist/react/select/index.js +8 -8
- package/dist/react/sender/index.js +46 -0
- package/dist/react/sender-header/index.js +26 -0
- package/dist/react/sender-switch/index.js +26 -0
- package/dist/react/tab/index.js +5 -5
- package/dist/react/tab-group/index.js +5 -5
- package/dist/react/table/index.js +26 -26
- package/dist/react/tag/index.js +5 -5
- package/dist/react/think/index.js +5 -5
- package/dist/react/thought-chain-item/index.js +4 -4
- package/dist/react/thought-chain-node/index.js +4 -4
- package/dist/react/timepicker/index.js +16 -16
- package/dist/react/tree/index.js +9 -9
- package/dist/react/tree-item/index.js +7 -7
- package/dist/react/x-markdown/index.js +4 -4
- package/dist/shoelace.js +266 -236
- package/dist/themes/dark.css +14 -16
- package/dist/themes/dark.styles.js +14 -16
- package/dist/themes/light.css +47 -4
- package/dist/themes/light.styles.js +47 -4
- package/dist/themes/nova.css +20 -52
- package/dist/themes/nova.styles.js +20 -52
- package/dist/types/vue/index.d.ts +615 -340
- package/dist/vscode.html-custom-data.json +468 -277
- package/dist/web-types.json +1622 -1075
- package/package.json +2 -2
- package/cdn/chunks/{chunk.ZNCN2NE6.js → chunk.2AP733KC.js} +3 -3
- package/cdn/chunks/{chunk.QHLGXENI.js → chunk.6WEMAOXM.js} +3 -3
- package/cdn/chunks/{chunk.3GW6TCA3.js → chunk.7P4TKLSC.js} +3 -3
- package/cdn/chunks/{chunk.HIUGXXPV.js → chunk.D2GTY7PE.js} +3 -3
- package/cdn/chunks/{chunk.ULJSHWM3.js → chunk.EG5DXJSS.js} +3 -3
- package/cdn/chunks/{chunk.TGZRAX7P.js → chunk.JUHP7VBG.js} +3 -3
- package/cdn/chunks/{chunk.CFBUJD3D.js → chunk.RQQ7FUGE.js} +3 -3
- package/cdn/chunks/{chunk.XLNV2YNC.js → chunk.WUFUS2OW.js} +3 -3
- package/dist/chunks/{chunk.4UGGBC4S.js → chunk.GPSGJKTW.js} +3 -3
- package/dist/chunks/{chunk.MBBHJ5GO.js → chunk.P6QATVJO.js} +3 -3
- package/dist/chunks/{chunk.2XVFEHSO.js → chunk.PHBT3MJN.js} +3 -3
- package/dist/chunks/{chunk.3EOJVTR3.js → chunk.UNJJA52B.js} +3 -3
- package/dist/chunks/{chunk.TJTYBIR7.js → chunk.XRCLRCVM.js} +3 -3
|
@@ -0,0 +1,1156 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SlTextarea
|
|
3
|
+
} from "./chunk.6DRZMNH2.js";
|
|
4
|
+
import {
|
|
5
|
+
SlSelect
|
|
6
|
+
} from "./chunk.YNIOT4PI.js";
|
|
7
|
+
import {
|
|
8
|
+
SlTag
|
|
9
|
+
} from "./chunk.F4WJ35X3.js";
|
|
10
|
+
import {
|
|
11
|
+
sender_styles_default
|
|
12
|
+
} from "./chunk.5DSHVTBU.js";
|
|
13
|
+
import {
|
|
14
|
+
SlOption
|
|
15
|
+
} from "./chunk.5RGUSMA7.js";
|
|
16
|
+
import {
|
|
17
|
+
SlInput
|
|
18
|
+
} from "./chunk.T5VRBH5J.js";
|
|
19
|
+
import {
|
|
20
|
+
SlButton
|
|
21
|
+
} from "./chunk.OBQXUZUT.js";
|
|
22
|
+
import {
|
|
23
|
+
SlSpinner
|
|
24
|
+
} from "./chunk.NISAAN5X.js";
|
|
25
|
+
import {
|
|
26
|
+
SlIconButton
|
|
27
|
+
} from "./chunk.SXN43BZH.js";
|
|
28
|
+
import {
|
|
29
|
+
e
|
|
30
|
+
} from "./chunk.ZLKEMKLZ.js";
|
|
31
|
+
import {
|
|
32
|
+
SlIcon
|
|
33
|
+
} from "./chunk.2AP733KC.js";
|
|
34
|
+
import {
|
|
35
|
+
component_styles_default
|
|
36
|
+
} from "./chunk.WT5BNBAS.js";
|
|
37
|
+
import {
|
|
38
|
+
ShoelaceElement,
|
|
39
|
+
e as e2,
|
|
40
|
+
n,
|
|
41
|
+
r
|
|
42
|
+
} from "./chunk.J5EDZ3U4.js";
|
|
43
|
+
import {
|
|
44
|
+
b
|
|
45
|
+
} from "./chunk.7Z2GKZ7U.js";
|
|
46
|
+
import {
|
|
47
|
+
__decorateClass,
|
|
48
|
+
__spreadProps,
|
|
49
|
+
__spreadValues
|
|
50
|
+
} from "./chunk.CZCSAYQZ.js";
|
|
51
|
+
|
|
52
|
+
// src/components/sender/sender.component.ts
|
|
53
|
+
var SlSender = class extends ShoelaceElement {
|
|
54
|
+
constructor() {
|
|
55
|
+
super(...arguments);
|
|
56
|
+
this.value = "";
|
|
57
|
+
this.placeholder = "";
|
|
58
|
+
this.loading = false;
|
|
59
|
+
this.disabled = false;
|
|
60
|
+
this.readOnly = false;
|
|
61
|
+
this.rows = 1;
|
|
62
|
+
this.submitType = "enter";
|
|
63
|
+
this.allowSpeech = false;
|
|
64
|
+
this.speechRecording = false;
|
|
65
|
+
// SpeechRecognition 实例,用于浏览器内置语音输入
|
|
66
|
+
this.recognition = null;
|
|
67
|
+
// 麦克风权限状态缓存
|
|
68
|
+
this.permissionState = null;
|
|
69
|
+
// PermissionStatus 引用,用于移除 onchange 监听
|
|
70
|
+
this.permissionStatus = null;
|
|
71
|
+
// 强制停止时忽略下一次转写结果
|
|
72
|
+
this.forceBreak = false;
|
|
73
|
+
this.slotValues = /* @__PURE__ */ new Map();
|
|
74
|
+
this.hasHeaderContent = false;
|
|
75
|
+
this.hasFooterContent = false;
|
|
76
|
+
this.handleInput = (event) => {
|
|
77
|
+
this.value = event.target.value;
|
|
78
|
+
this.dispatchEvent(new CustomEvent("sl-change", {
|
|
79
|
+
detail: { value: this.value, slotConfig: [], skill: this.skill },
|
|
80
|
+
bubbles: true,
|
|
81
|
+
composed: true
|
|
82
|
+
}));
|
|
83
|
+
};
|
|
84
|
+
this.handleFocus = () => {
|
|
85
|
+
this.emit("sl-focus");
|
|
86
|
+
};
|
|
87
|
+
this.handleBlur = () => {
|
|
88
|
+
this.emit("sl-blur");
|
|
89
|
+
};
|
|
90
|
+
/** 处理 slot 区域的自由文本输入 */
|
|
91
|
+
this.handleSlotAreaInput = () => {
|
|
92
|
+
const snapshot = this.getEditorSnapshot();
|
|
93
|
+
this.value = snapshot.value;
|
|
94
|
+
this.dispatchEvent(new CustomEvent("sl-change", {
|
|
95
|
+
detail: snapshot,
|
|
96
|
+
bubbles: true,
|
|
97
|
+
composed: true
|
|
98
|
+
}));
|
|
99
|
+
};
|
|
100
|
+
this.handlePaste = (event) => {
|
|
101
|
+
var _a;
|
|
102
|
+
this.dispatchEvent(new CustomEvent("sl-paste", {
|
|
103
|
+
detail: { event },
|
|
104
|
+
bubbles: true,
|
|
105
|
+
composed: true
|
|
106
|
+
}));
|
|
107
|
+
const files = (_a = event.clipboardData) == null ? void 0 : _a.files;
|
|
108
|
+
if (files == null ? void 0 : files.length) {
|
|
109
|
+
this.dispatchEvent(new CustomEvent("sl-paste-file", {
|
|
110
|
+
detail: { files },
|
|
111
|
+
bubbles: true,
|
|
112
|
+
composed: true
|
|
113
|
+
}));
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
this.handleSlotValueChange = (key, value) => {
|
|
117
|
+
this.slotValues.set(key, value);
|
|
118
|
+
this.requestUpdate();
|
|
119
|
+
this.updateComplete.then(() => {
|
|
120
|
+
const snapshot = this.getEditorSnapshot();
|
|
121
|
+
this.value = snapshot.value;
|
|
122
|
+
this.dispatchEvent(new CustomEvent("sl-change", {
|
|
123
|
+
detail: snapshot,
|
|
124
|
+
bubbles: true,
|
|
125
|
+
composed: true
|
|
126
|
+
}));
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* 聚焦输入区域,支持 cursor 选项控制光标位置。
|
|
132
|
+
* - 'end'(默认):光标移到内容末尾
|
|
133
|
+
* - 'start':光标移到内容开头
|
|
134
|
+
* - 'all':全选内容
|
|
135
|
+
* - 'slot':聚焦第一个 slot input,若不存在则等同 'end'
|
|
136
|
+
*/
|
|
137
|
+
focus(options) {
|
|
138
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
139
|
+
const preventScroll = (_a = options == null ? void 0 : options.preventScroll) != null ? _a : false;
|
|
140
|
+
const cursor = (_b = options == null ? void 0 : options.cursor) != null ? _b : "end";
|
|
141
|
+
if (this.isSlotMode) {
|
|
142
|
+
const slotArea = this.slotArea;
|
|
143
|
+
if (!slotArea) return;
|
|
144
|
+
if (cursor === "slot") {
|
|
145
|
+
const firstSlotInput = (_c = this.shadowRoot) == null ? void 0 : _c.querySelector(
|
|
146
|
+
".sender__slot-area sl-input, .sender__slot-area sl-select, .sender__slot-area .sender__slot-content"
|
|
147
|
+
);
|
|
148
|
+
if (firstSlotInput) {
|
|
149
|
+
firstSlotInput.focus({ preventScroll });
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
this.focusSlotAreaAt(slotArea, "end", preventScroll);
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
if (cursor === "all") {
|
|
156
|
+
slotArea.focus({ preventScroll });
|
|
157
|
+
const selection = document.getSelection();
|
|
158
|
+
if (selection) {
|
|
159
|
+
const range = document.createRange();
|
|
160
|
+
range.selectNodeContents(slotArea);
|
|
161
|
+
const skillEl = slotArea.querySelector(".sender__skill");
|
|
162
|
+
if (skillEl) {
|
|
163
|
+
const idx = Array.from(slotArea.childNodes).indexOf(skillEl);
|
|
164
|
+
if (idx >= 0) range.setStart(slotArea, idx + 1);
|
|
165
|
+
}
|
|
166
|
+
selection.removeAllRanges();
|
|
167
|
+
selection.addRange(range);
|
|
168
|
+
}
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
this.focusSlotAreaAt(slotArea, cursor, preventScroll);
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
const textareaEl = (_e = (_d = this.textarea) == null ? void 0 : _d.shadowRoot) == null ? void 0 : _e.querySelector("textarea");
|
|
175
|
+
if (!textareaEl) {
|
|
176
|
+
(_f = this.textarea) == null ? void 0 : _f.focus({ preventScroll });
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
(_g = this.textarea) == null ? void 0 : _g.focus({ preventScroll });
|
|
180
|
+
if (cursor === "start") {
|
|
181
|
+
textareaEl.setSelectionRange(0, 0);
|
|
182
|
+
} else if (cursor === "all") {
|
|
183
|
+
textareaEl.setSelectionRange(0, textareaEl.value.length);
|
|
184
|
+
} else {
|
|
185
|
+
const len = textareaEl.value.length;
|
|
186
|
+
textareaEl.setSelectionRange(len, len);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
/** slot 模式下将光标定位到 slotArea 的 start 或 end */
|
|
190
|
+
focusSlotAreaAt(slotArea, position, preventScroll) {
|
|
191
|
+
slotArea.focus({ preventScroll });
|
|
192
|
+
const selection = document.getSelection();
|
|
193
|
+
if (!selection) return;
|
|
194
|
+
const range = document.createRange();
|
|
195
|
+
range.selectNodeContents(slotArea);
|
|
196
|
+
if (position === "start") {
|
|
197
|
+
const skillEl = slotArea.querySelector(".sender__skill");
|
|
198
|
+
if (skillEl) {
|
|
199
|
+
const idx = Array.from(slotArea.childNodes).indexOf(skillEl);
|
|
200
|
+
if (idx >= 0) range.setStart(slotArea, idx + 1);
|
|
201
|
+
}
|
|
202
|
+
range.collapse(true);
|
|
203
|
+
} else {
|
|
204
|
+
range.collapse(false);
|
|
205
|
+
}
|
|
206
|
+
selection.removeAllRanges();
|
|
207
|
+
selection.addRange(range);
|
|
208
|
+
}
|
|
209
|
+
/** 移除输入区域焦点 */
|
|
210
|
+
blur() {
|
|
211
|
+
var _a, _b;
|
|
212
|
+
if (this.isSlotMode) {
|
|
213
|
+
(_a = this.slotArea) == null ? void 0 : _a.blur();
|
|
214
|
+
} else {
|
|
215
|
+
(_b = this.textarea) == null ? void 0 : _b.blur();
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
/** 清空输入内容,slot 模式下同时重置 slotValues */
|
|
219
|
+
clear() {
|
|
220
|
+
this.handleClear();
|
|
221
|
+
}
|
|
222
|
+
/** 获取当前输入值,slot 模式下返回完整的 { value, slotConfig, skill } */
|
|
223
|
+
getValue() {
|
|
224
|
+
if (this.isSlotMode) {
|
|
225
|
+
return this.getEditorSnapshot();
|
|
226
|
+
}
|
|
227
|
+
return { value: this.value, slotConfig: [], skill: void 0 };
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* 插入文本或 slot 配置项到输入区域
|
|
231
|
+
* slot 模式下将 slotConfig 项渲染为 DOM 节点插入到 slot-area
|
|
232
|
+
* 普通模式下将各项文本拼接后插入到 textarea
|
|
233
|
+
*/
|
|
234
|
+
insert(slotConfig, position = "end", _replaceCharacters, preventScroll) {
|
|
235
|
+
if (!slotConfig || slotConfig.length === 0) return;
|
|
236
|
+
if (this.isSlotMode) {
|
|
237
|
+
this.insertSlotNodes(slotConfig, position, preventScroll);
|
|
238
|
+
} else {
|
|
239
|
+
const text = slotConfig.filter((item) => item.type === "text").map((item) => {
|
|
240
|
+
var _a;
|
|
241
|
+
return (_a = item.value) != null ? _a : "";
|
|
242
|
+
}).join("");
|
|
243
|
+
if (!text) return;
|
|
244
|
+
this.insertTextToTextarea(text, position);
|
|
245
|
+
}
|
|
246
|
+
const snapshot = this.isSlotMode ? this.getEditorSnapshot() : { value: this.value, slotConfig: [], skill: void 0 };
|
|
247
|
+
this.dispatchEvent(new CustomEvent("sl-change", {
|
|
248
|
+
detail: snapshot,
|
|
249
|
+
bubbles: true,
|
|
250
|
+
composed: true
|
|
251
|
+
}));
|
|
252
|
+
}
|
|
253
|
+
/** 普通模式下插入文本到 textarea */
|
|
254
|
+
insertTextToTextarea(text, position) {
|
|
255
|
+
var _a, _b;
|
|
256
|
+
if (position === "start") {
|
|
257
|
+
this.value = text + this.value;
|
|
258
|
+
} else if (position === "end") {
|
|
259
|
+
this.value = this.value + text;
|
|
260
|
+
} else {
|
|
261
|
+
const textareaEl = (_b = (_a = this.textarea) == null ? void 0 : _a.shadowRoot) == null ? void 0 : _b.querySelector("textarea");
|
|
262
|
+
if (textareaEl && typeof textareaEl.selectionStart === "number") {
|
|
263
|
+
const start = textareaEl.selectionStart;
|
|
264
|
+
const end = textareaEl.selectionEnd;
|
|
265
|
+
this.value = this.value.slice(0, start) + text + this.value.slice(end);
|
|
266
|
+
this.updateComplete.then(() => {
|
|
267
|
+
const newPos = start + text.length;
|
|
268
|
+
textareaEl.setSelectionRange(newPos, newPos);
|
|
269
|
+
});
|
|
270
|
+
} else {
|
|
271
|
+
this.value = this.value + text;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
/** slot 模式下将 slotConfig 项创建为 DOM 节点并插入到 slot-area */
|
|
276
|
+
insertSlotNodes(configs, position, preventScroll) {
|
|
277
|
+
var _a;
|
|
278
|
+
const slotArea = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector(".sender__slot-area");
|
|
279
|
+
if (!slotArea) return;
|
|
280
|
+
const fragment = document.createDocumentFragment();
|
|
281
|
+
configs.forEach((config, i) => {
|
|
282
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
283
|
+
if (config.type === "text") {
|
|
284
|
+
fragment.appendChild(document.createTextNode(String((_a2 = config.value) != null ? _a2 : "")));
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
const key = (_b = config.key) != null ? _b : `insert-${Date.now()}-${i}`;
|
|
288
|
+
const defaultValue = this.getSlotDefaultValue(config);
|
|
289
|
+
if (defaultValue !== void 0) {
|
|
290
|
+
this.slotValues.set(key, defaultValue);
|
|
291
|
+
}
|
|
292
|
+
if (config.type === "tag") {
|
|
293
|
+
const tag = document.createElement("sl-tag");
|
|
294
|
+
tag.setAttribute("size", "small");
|
|
295
|
+
tag.setAttribute("data-slot-key", key);
|
|
296
|
+
tag.className = "sender__slot-tag";
|
|
297
|
+
tag.textContent = String((_f = (_e = (_c = config.props) == null ? void 0 : _c.label) != null ? _e : (_d = config.props) == null ? void 0 : _d.value) != null ? _f : "");
|
|
298
|
+
fragment.appendChild(tag);
|
|
299
|
+
} else if (config.type === "input") {
|
|
300
|
+
const input = document.createElement("sl-input");
|
|
301
|
+
input.setAttribute("size", "small");
|
|
302
|
+
input.setAttribute("data-slot-key", key);
|
|
303
|
+
input.className = "sender__slot-input";
|
|
304
|
+
if ((_g = config.props) == null ? void 0 : _g.placeholder) input.setAttribute("placeholder", config.props.placeholder);
|
|
305
|
+
if ((_h = config.props) == null ? void 0 : _h.defaultValue) input.value = String(config.props.defaultValue);
|
|
306
|
+
input.addEventListener("sl-input", () => {
|
|
307
|
+
this.handleSlotValueChange(key, input.value);
|
|
308
|
+
});
|
|
309
|
+
fragment.appendChild(input);
|
|
310
|
+
} else if (config.type === "select") {
|
|
311
|
+
const select = document.createElement("sl-select");
|
|
312
|
+
select.setAttribute("size", "small");
|
|
313
|
+
select.setAttribute("data-slot-key", key);
|
|
314
|
+
select.className = "sender__slot-select";
|
|
315
|
+
if ((_i = config.props) == null ? void 0 : _i.placeholder) select.setAttribute("placeholder", config.props.placeholder);
|
|
316
|
+
((_k = (_j = config.props) == null ? void 0 : _j.options) != null ? _k : []).forEach((opt) => {
|
|
317
|
+
const option = document.createElement("sl-option");
|
|
318
|
+
option.setAttribute("value", opt.value);
|
|
319
|
+
option.textContent = String(opt.label);
|
|
320
|
+
select.appendChild(option);
|
|
321
|
+
});
|
|
322
|
+
if ((_l = config.props) == null ? void 0 : _l.defaultValue) select.value = String(config.props.defaultValue);
|
|
323
|
+
select.addEventListener("sl-change", () => {
|
|
324
|
+
this.handleSlotValueChange(key, select.value);
|
|
325
|
+
});
|
|
326
|
+
fragment.appendChild(select);
|
|
327
|
+
} else if (config.type === "content") {
|
|
328
|
+
const span = document.createElement("span");
|
|
329
|
+
span.className = "sender__slot-content";
|
|
330
|
+
span.setAttribute("contenteditable", this.readOnly || this.disabled ? "false" : "true");
|
|
331
|
+
span.setAttribute("data-slot-key", key);
|
|
332
|
+
if ((_m = config.props) == null ? void 0 : _m.placeholder) span.setAttribute("data-placeholder", config.props.placeholder);
|
|
333
|
+
span.setAttribute("spellcheck", "false");
|
|
334
|
+
span.textContent = String((_o = (_n = config.props) == null ? void 0 : _n.defaultValue) != null ? _o : "");
|
|
335
|
+
span.addEventListener("input", () => {
|
|
336
|
+
var _a3;
|
|
337
|
+
this.handleSlotValueChange(key, (_a3 = span.textContent) != null ? _a3 : "");
|
|
338
|
+
});
|
|
339
|
+
fragment.appendChild(span);
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
if (position === "start") {
|
|
343
|
+
const skillEl = slotArea.querySelector(".sender__skill");
|
|
344
|
+
if (skillEl) {
|
|
345
|
+
skillEl.after(fragment);
|
|
346
|
+
} else {
|
|
347
|
+
slotArea.prepend(fragment);
|
|
348
|
+
}
|
|
349
|
+
} else if (position === "end") {
|
|
350
|
+
slotArea.appendChild(fragment);
|
|
351
|
+
} else {
|
|
352
|
+
const selection = document.getSelection();
|
|
353
|
+
if (selection && selection.rangeCount > 0) {
|
|
354
|
+
const range = selection.getRangeAt(0);
|
|
355
|
+
if (slotArea.contains(range.commonAncestorContainer)) {
|
|
356
|
+
range.deleteContents();
|
|
357
|
+
range.insertNode(fragment);
|
|
358
|
+
range.collapse(false);
|
|
359
|
+
} else {
|
|
360
|
+
slotArea.appendChild(fragment);
|
|
361
|
+
}
|
|
362
|
+
} else {
|
|
363
|
+
slotArea.appendChild(fragment);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
if (!preventScroll) {
|
|
367
|
+
slotArea.focus({ preventScroll: false });
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
handleKeyDown(event) {
|
|
371
|
+
if (event.key === "Enter") {
|
|
372
|
+
const isShift = event.shiftKey;
|
|
373
|
+
if (this.submitType === "enter" && !isShift || this.submitType === "shift-enter" && isShift) {
|
|
374
|
+
event.preventDefault();
|
|
375
|
+
this.handleSubmit();
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
handleSubmit() {
|
|
380
|
+
const value = this.currentValue.trim();
|
|
381
|
+
if (this.loading || this.disabled || !value) return;
|
|
382
|
+
if (this.isSlotMode) {
|
|
383
|
+
const snapshot = this.getEditorSnapshot();
|
|
384
|
+
this.dispatchEvent(new CustomEvent("sl-submit", {
|
|
385
|
+
detail: { value: snapshot.value, slotConfig: snapshot.slotConfig, skill: snapshot.skill },
|
|
386
|
+
bubbles: true,
|
|
387
|
+
composed: true
|
|
388
|
+
}));
|
|
389
|
+
return;
|
|
390
|
+
}
|
|
391
|
+
this.dispatchEvent(new CustomEvent("sl-submit", {
|
|
392
|
+
detail: { value },
|
|
393
|
+
bubbles: true,
|
|
394
|
+
composed: true
|
|
395
|
+
}));
|
|
396
|
+
}
|
|
397
|
+
handleClear() {
|
|
398
|
+
var _a, _b;
|
|
399
|
+
if (this.isSlotMode) {
|
|
400
|
+
const slotArea = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector(".sender__slot-area");
|
|
401
|
+
if (slotArea) {
|
|
402
|
+
slotArea.innerHTML = "";
|
|
403
|
+
}
|
|
404
|
+
this.slotValues = /* @__PURE__ */ new Map();
|
|
405
|
+
this.value = "";
|
|
406
|
+
this.requestUpdate();
|
|
407
|
+
} else {
|
|
408
|
+
this.value = "";
|
|
409
|
+
}
|
|
410
|
+
this.emit("sl-clear");
|
|
411
|
+
if (this.isSlotMode) {
|
|
412
|
+
this.updateComplete.then(() => this.focusSlotInput());
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
(_b = this.textarea) == null ? void 0 : _b.focus();
|
|
416
|
+
}
|
|
417
|
+
handleSkillRemove() {
|
|
418
|
+
if (!this.skill) return;
|
|
419
|
+
const closable = this.skill.closable;
|
|
420
|
+
if (typeof closable === "object" && closable.disabled) return;
|
|
421
|
+
if (typeof closable === "object" && closable.onClose) {
|
|
422
|
+
closable.onClose();
|
|
423
|
+
}
|
|
424
|
+
this.skill = void 0;
|
|
425
|
+
this.requestUpdate();
|
|
426
|
+
this.updateComplete.then(() => {
|
|
427
|
+
const snapshot = this.getEditorSnapshot();
|
|
428
|
+
this.dispatchEvent(new CustomEvent("sl-change", {
|
|
429
|
+
detail: __spreadProps(__spreadValues({}, snapshot), { skill: void 0 }),
|
|
430
|
+
bubbles: true,
|
|
431
|
+
composed: true
|
|
432
|
+
}));
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
// 触发语音按钮点击逻辑
|
|
436
|
+
handleSpeechClick() {
|
|
437
|
+
if (this.disabled || this.readOnly || !this.allowSpeech) return;
|
|
438
|
+
if (!this.speechPermission) return;
|
|
439
|
+
this.triggerSpeech(false);
|
|
440
|
+
this.emit("sl-speech-toggle");
|
|
441
|
+
}
|
|
442
|
+
connectedCallback() {
|
|
443
|
+
super.connectedCallback();
|
|
444
|
+
this.updatePermissionState();
|
|
445
|
+
}
|
|
446
|
+
disconnectedCallback() {
|
|
447
|
+
super.disconnectedCallback();
|
|
448
|
+
this.cleanupPermissionStatus();
|
|
449
|
+
this.stopRecognition();
|
|
450
|
+
}
|
|
451
|
+
updated(changedProperties) {
|
|
452
|
+
var _a;
|
|
453
|
+
super.updated(changedProperties);
|
|
454
|
+
if (changedProperties.has("allowSpeech")) {
|
|
455
|
+
if (!this.allowSpeech) {
|
|
456
|
+
this.stopRecognition();
|
|
457
|
+
this.cleanupPermissionStatus();
|
|
458
|
+
this.permissionState = null;
|
|
459
|
+
if (this.speechRecording) this.speechRecording = false;
|
|
460
|
+
} else {
|
|
461
|
+
this.updatePermissionState();
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
if (changedProperties.has("slotConfig")) {
|
|
465
|
+
this.syncSlotValues((_a = this.slotConfig) != null ? _a : []);
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
// 规范化 allowSpeech 配置,区分受控与非受控
|
|
469
|
+
get speechConfig() {
|
|
470
|
+
if (typeof this.allowSpeech === "object" && this.allowSpeech) {
|
|
471
|
+
const controlledRecording = this.allowSpeech.recording;
|
|
472
|
+
const onControlledRecordingChange = this.allowSpeech.onRecordingChange;
|
|
473
|
+
const speechInControlled = typeof controlledRecording === "boolean";
|
|
474
|
+
return { controlledRecording, onControlledRecordingChange, speechInControlled };
|
|
475
|
+
}
|
|
476
|
+
return { controlledRecording: void 0, onControlledRecordingChange: void 0, speechInControlled: false };
|
|
477
|
+
}
|
|
478
|
+
// 当前录音状态(受控配置或内部状态)
|
|
479
|
+
get currentRecording() {
|
|
480
|
+
const { controlledRecording, speechInControlled } = this.speechConfig;
|
|
481
|
+
if (speechInControlled) return !!controlledRecording;
|
|
482
|
+
return this.speechRecording;
|
|
483
|
+
}
|
|
484
|
+
// 当前环境是否允许语音输入
|
|
485
|
+
get speechPermission() {
|
|
486
|
+
if (!this.allowSpeech) return false;
|
|
487
|
+
const { speechInControlled } = this.speechConfig;
|
|
488
|
+
if (speechInControlled) return true;
|
|
489
|
+
const SpeechRecognition = this.getSpeechRecognitionConstructor();
|
|
490
|
+
return !!SpeechRecognition && this.permissionState !== "denied";
|
|
491
|
+
}
|
|
492
|
+
get isSlotMode() {
|
|
493
|
+
var _a;
|
|
494
|
+
return Array.isArray(this.slotConfig) && this.slotConfig.length > 0 || !!((_a = this.skill) == null ? void 0 : _a.value);
|
|
495
|
+
}
|
|
496
|
+
get currentValue() {
|
|
497
|
+
return this.isSlotMode ? this.getSlotValueString() : this.value;
|
|
498
|
+
}
|
|
499
|
+
getSlotKey(item, index) {
|
|
500
|
+
var _a;
|
|
501
|
+
return (_a = item.key) != null ? _a : `slot-${index}`;
|
|
502
|
+
}
|
|
503
|
+
syncSlotValues(config) {
|
|
504
|
+
const nextValues = /* @__PURE__ */ new Map();
|
|
505
|
+
config.forEach((item, index) => {
|
|
506
|
+
const key = this.getSlotKey(item, index);
|
|
507
|
+
const existing = this.slotValues.get(key);
|
|
508
|
+
if (existing !== void 0) {
|
|
509
|
+
nextValues.set(key, existing);
|
|
510
|
+
return;
|
|
511
|
+
}
|
|
512
|
+
const defaultValue = this.getSlotDefaultValue(item);
|
|
513
|
+
if (defaultValue !== void 0) {
|
|
514
|
+
nextValues.set(key, defaultValue);
|
|
515
|
+
}
|
|
516
|
+
});
|
|
517
|
+
this.slotValues = nextValues;
|
|
518
|
+
this.requestUpdate();
|
|
519
|
+
}
|
|
520
|
+
focusSlotInput() {
|
|
521
|
+
var _a;
|
|
522
|
+
const slotInput = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector(
|
|
523
|
+
".sender__slot-area sl-input, .sender__slot-area sl-select"
|
|
524
|
+
);
|
|
525
|
+
slotInput == null ? void 0 : slotInput.focus();
|
|
526
|
+
}
|
|
527
|
+
getSlotDefaultValue(item) {
|
|
528
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
529
|
+
if (item.type === "input") return (_a = item.props) == null ? void 0 : _a.defaultValue;
|
|
530
|
+
if (item.type === "select") return (_b = item.props) == null ? void 0 : _b.defaultValue;
|
|
531
|
+
if (item.type === "content") return (_c = item.props) == null ? void 0 : _c.defaultValue;
|
|
532
|
+
if (item.type === "custom") return (_d = item.props) == null ? void 0 : _d.defaultValue;
|
|
533
|
+
if (item.type === "tag") return (_g = (_e = item.props) == null ? void 0 : _e.value) != null ? _g : (_f = item.props) == null ? void 0 : _f.label;
|
|
534
|
+
if (item.type === "text") return (_h = item.value) != null ? _h : "";
|
|
535
|
+
return void 0;
|
|
536
|
+
}
|
|
537
|
+
getSlotItemValue(item, index) {
|
|
538
|
+
var _a;
|
|
539
|
+
if (item.type === "text") return (_a = item.value) != null ? _a : "";
|
|
540
|
+
const key = this.getSlotKey(item, index);
|
|
541
|
+
if (this.slotValues.has(key)) return this.slotValues.get(key);
|
|
542
|
+
return this.getSlotDefaultValue(item);
|
|
543
|
+
}
|
|
544
|
+
getSlotValueString() {
|
|
545
|
+
var _a;
|
|
546
|
+
if (!this.isSlotMode) return "";
|
|
547
|
+
const slotArea = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector(".sender__slot-area");
|
|
548
|
+
if (!slotArea) return "";
|
|
549
|
+
return this.getEditorValue(slotArea).value;
|
|
550
|
+
}
|
|
551
|
+
/**
|
|
552
|
+
* 遍历 slot 区域的 DOM 子节点,提取完整的 { value, slotConfig, skill }。
|
|
553
|
+
* 参考 ant-design-x getEditorValue 实现:
|
|
554
|
+
* - 文本节点:计入 value,并作为 { type: 'text', value } 加入 slotConfig
|
|
555
|
+
* - skill 节点:跳过文本值,记录 skill
|
|
556
|
+
* - slot 组件节点:从 slotValues / DOM 读取最新值,计入 value 和 slotConfig
|
|
557
|
+
* - 其他元素:取 textContent
|
|
558
|
+
*/
|
|
559
|
+
getEditorValue(container) {
|
|
560
|
+
const parts = [];
|
|
561
|
+
const currentSlotConfig = [];
|
|
562
|
+
let currentSkill;
|
|
563
|
+
container.childNodes.forEach((node) => {
|
|
564
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
565
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
566
|
+
const text = (_a = node.textContent) != null ? _a : "";
|
|
567
|
+
if (!text || /^\s+$/.test(text)) {
|
|
568
|
+
return;
|
|
569
|
+
}
|
|
570
|
+
parts.push(text);
|
|
571
|
+
currentSlotConfig.push({ type: "text", value: text });
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
574
|
+
if (node.nodeType !== Node.ELEMENT_NODE) return;
|
|
575
|
+
const el = node;
|
|
576
|
+
if (el.classList.contains("sender__skill")) {
|
|
577
|
+
if (this.skill) {
|
|
578
|
+
currentSkill = this.skill;
|
|
579
|
+
}
|
|
580
|
+
return;
|
|
581
|
+
}
|
|
582
|
+
if (el.classList.contains("sender__slot-content")) {
|
|
583
|
+
const text = (_b = el.textContent) != null ? _b : "";
|
|
584
|
+
const key = (_c = el.dataset) == null ? void 0 : _c.slotKey;
|
|
585
|
+
parts.push(text);
|
|
586
|
+
const config = key ? this.getSlotConfigByKey(key) : void 0;
|
|
587
|
+
if (config) {
|
|
588
|
+
currentSlotConfig.push(__spreadProps(__spreadValues({}, config), { value: text }));
|
|
589
|
+
}
|
|
590
|
+
return;
|
|
591
|
+
}
|
|
592
|
+
if (el.tagName === "SL-INPUT") {
|
|
593
|
+
const key = this.getSlotKeyFromElement(el);
|
|
594
|
+
const rawValue = key && this.slotValues.has(key) ? this.slotValues.get(key) : el.value;
|
|
595
|
+
const config = key ? this.getSlotConfigByKey(key) : void 0;
|
|
596
|
+
const text = (config == null ? void 0 : config.formatResult) ? config.formatResult(rawValue) : String(rawValue != null ? rawValue : "");
|
|
597
|
+
parts.push(text);
|
|
598
|
+
if (config) {
|
|
599
|
+
currentSlotConfig.push(__spreadProps(__spreadValues({}, config), { value: rawValue }));
|
|
600
|
+
}
|
|
601
|
+
return;
|
|
602
|
+
}
|
|
603
|
+
if (el.tagName === "SL-SELECT") {
|
|
604
|
+
const key = this.getSlotKeyFromElement(el);
|
|
605
|
+
const rawValue = key && this.slotValues.has(key) ? this.slotValues.get(key) : el.value;
|
|
606
|
+
const config = key ? this.getSlotConfigByKey(key) : void 0;
|
|
607
|
+
const text = (config == null ? void 0 : config.formatResult) ? config.formatResult(rawValue) : String(rawValue != null ? rawValue : "");
|
|
608
|
+
parts.push(text);
|
|
609
|
+
if (config) {
|
|
610
|
+
currentSlotConfig.push(__spreadProps(__spreadValues({}, config), { value: rawValue }));
|
|
611
|
+
}
|
|
612
|
+
return;
|
|
613
|
+
}
|
|
614
|
+
if (el.tagName === "SL-TAG") {
|
|
615
|
+
const text = (_e = (_d = el.textContent) == null ? void 0 : _d.trim()) != null ? _e : "";
|
|
616
|
+
const key = this.getSlotKeyFromElement(el);
|
|
617
|
+
parts.push(text);
|
|
618
|
+
const config = key ? this.getSlotConfigByKey(key) : void 0;
|
|
619
|
+
if (config) {
|
|
620
|
+
currentSlotConfig.push(__spreadProps(__spreadValues({}, config), { value: text }));
|
|
621
|
+
}
|
|
622
|
+
return;
|
|
623
|
+
}
|
|
624
|
+
if (el.tagName === "BR") {
|
|
625
|
+
parts.push("\n");
|
|
626
|
+
currentSlotConfig.push({ type: "text", value: "\n" });
|
|
627
|
+
return;
|
|
628
|
+
}
|
|
629
|
+
if (el.tagName === "DIV") {
|
|
630
|
+
const text = (_f = el.innerText) != null ? _f : "";
|
|
631
|
+
if (text) {
|
|
632
|
+
parts.push("\n" + text);
|
|
633
|
+
currentSlotConfig.push({ type: "text", value: "\n" + text });
|
|
634
|
+
}
|
|
635
|
+
return;
|
|
636
|
+
}
|
|
637
|
+
parts.push((_g = el.textContent) != null ? _g : "");
|
|
638
|
+
});
|
|
639
|
+
return {
|
|
640
|
+
value: parts.join(""),
|
|
641
|
+
slotConfig: currentSlotConfig,
|
|
642
|
+
skill: currentSkill
|
|
643
|
+
};
|
|
644
|
+
}
|
|
645
|
+
/** 获取 slot 区域的完整快照(value + slotConfig + skill),从 DOM 遍历得到最新状态 */
|
|
646
|
+
getEditorSnapshot() {
|
|
647
|
+
var _a;
|
|
648
|
+
const slotArea = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector(".sender__slot-area");
|
|
649
|
+
if (!slotArea) return { value: "", slotConfig: [], skill: this.skill };
|
|
650
|
+
return this.getEditorValue(slotArea);
|
|
651
|
+
}
|
|
652
|
+
/** 根据 slot 区域中的 DOM 元素,反查对应的 slotConfig key */
|
|
653
|
+
getSlotKeyFromElement(el) {
|
|
654
|
+
var _a;
|
|
655
|
+
return (_a = el.dataset) == null ? void 0 : _a.slotKey;
|
|
656
|
+
}
|
|
657
|
+
/** 根据 key 查找对应的 slotConfig 项 */
|
|
658
|
+
getSlotConfigByKey(key) {
|
|
659
|
+
if (!this.slotConfig) return void 0;
|
|
660
|
+
return this.slotConfig.find((item, index) => this.getSlotKey(item, index) === key);
|
|
661
|
+
}
|
|
662
|
+
// 获取厂商前缀的 SpeechRecognition 构造函数
|
|
663
|
+
getSpeechRecognitionConstructor() {
|
|
664
|
+
if (typeof window === "undefined") return null;
|
|
665
|
+
const speechWindow = window;
|
|
666
|
+
return speechWindow.SpeechRecognition || speechWindow.webkitSpeechRecognition || null;
|
|
667
|
+
}
|
|
668
|
+
// 非受控模式下查询麦克风权限
|
|
669
|
+
updatePermissionState() {
|
|
670
|
+
const { speechInControlled } = this.speechConfig;
|
|
671
|
+
if (!this.allowSpeech || speechInControlled) return;
|
|
672
|
+
this.cleanupPermissionStatus();
|
|
673
|
+
if (!navigator.permissions) return;
|
|
674
|
+
navigator.permissions.query({ name: "microphone" }).then((permissionStatus) => {
|
|
675
|
+
this.permissionState = permissionStatus.state;
|
|
676
|
+
permissionStatus.onchange = () => {
|
|
677
|
+
this.permissionState = permissionStatus.state;
|
|
678
|
+
};
|
|
679
|
+
this.permissionStatus = permissionStatus;
|
|
680
|
+
}).catch(() => {
|
|
681
|
+
this.permissionState = null;
|
|
682
|
+
});
|
|
683
|
+
}
|
|
684
|
+
// 移除权限监听,避免泄漏
|
|
685
|
+
cleanupPermissionStatus() {
|
|
686
|
+
if (this.permissionStatus) {
|
|
687
|
+
this.permissionStatus.onchange = null;
|
|
688
|
+
this.permissionStatus = null;
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
// 按需创建识别实例并绑定事件
|
|
692
|
+
ensureRecognition() {
|
|
693
|
+
if (!this.allowSpeech || this.speechConfig.speechInControlled) return;
|
|
694
|
+
const SpeechRecognition = this.getSpeechRecognitionConstructor();
|
|
695
|
+
if (!SpeechRecognition || this.recognition) return;
|
|
696
|
+
const recognition = new SpeechRecognition();
|
|
697
|
+
recognition.onstart = () => {
|
|
698
|
+
this.speechRecording = true;
|
|
699
|
+
};
|
|
700
|
+
recognition.onend = () => {
|
|
701
|
+
this.speechRecording = false;
|
|
702
|
+
};
|
|
703
|
+
recognition.onresult = (event) => {
|
|
704
|
+
var _a, _b, _c;
|
|
705
|
+
if (!this.forceBreak) {
|
|
706
|
+
const transcript = (_c = (_b = (_a = event.results) == null ? void 0 : _a[0]) == null ? void 0 : _b[0]) == null ? void 0 : _c.transcript;
|
|
707
|
+
if (transcript) this.applyTranscript(transcript);
|
|
708
|
+
}
|
|
709
|
+
this.forceBreak = false;
|
|
710
|
+
};
|
|
711
|
+
this.recognition = recognition;
|
|
712
|
+
}
|
|
713
|
+
// 停止识别并释放实例
|
|
714
|
+
stopRecognition() {
|
|
715
|
+
if (this.recognition && this.currentRecording) {
|
|
716
|
+
this.recognition.stop();
|
|
717
|
+
}
|
|
718
|
+
this.recognition = null;
|
|
719
|
+
}
|
|
720
|
+
// 切换录音;forceBreak 为 true 时停止且不消费转写结果
|
|
721
|
+
triggerSpeech(forceBreak) {
|
|
722
|
+
if (!this.speechPermission) return;
|
|
723
|
+
if (forceBreak && !this.currentRecording) return;
|
|
724
|
+
this.forceBreak = forceBreak;
|
|
725
|
+
const { speechInControlled, onControlledRecordingChange } = this.speechConfig;
|
|
726
|
+
if (speechInControlled) {
|
|
727
|
+
onControlledRecordingChange == null ? void 0 : onControlledRecordingChange(!this.currentRecording);
|
|
728
|
+
return;
|
|
729
|
+
}
|
|
730
|
+
this.ensureRecognition();
|
|
731
|
+
if (!this.recognition) return;
|
|
732
|
+
if (this.currentRecording) {
|
|
733
|
+
this.recognition.stop();
|
|
734
|
+
} else {
|
|
735
|
+
this.recognition.start();
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
// 将语音转写内容追加到输入框
|
|
739
|
+
applyTranscript(transcript) {
|
|
740
|
+
if (this.disabled || this.readOnly) return;
|
|
741
|
+
if (this.isSlotMode) return;
|
|
742
|
+
this.value = this.value ? `${this.value} ${transcript}` : transcript;
|
|
743
|
+
this.dispatchEvent(new CustomEvent("sl-change", {
|
|
744
|
+
detail: { value: this.value, slotConfig: [], skill: this.skill },
|
|
745
|
+
bubbles: true,
|
|
746
|
+
composed: true
|
|
747
|
+
}));
|
|
748
|
+
}
|
|
749
|
+
renderSendButton(props) {
|
|
750
|
+
var _a, _b;
|
|
751
|
+
const loading = (_a = props == null ? void 0 : props.loading) != null ? _a : this.loading;
|
|
752
|
+
const disabled = (_b = props == null ? void 0 : props.disabled) != null ? _b : this.disabled || !this.currentValue.trim();
|
|
753
|
+
const name = loading ? "app" : "arrow-up-short";
|
|
754
|
+
return b`
|
|
755
|
+
<sl-icon-button
|
|
756
|
+
class="send-button"
|
|
757
|
+
name=${name}
|
|
758
|
+
?disabled=${disabled}
|
|
759
|
+
@click=${this.handleSubmit}
|
|
760
|
+
>
|
|
761
|
+
</sl-icon-button>
|
|
762
|
+
`;
|
|
763
|
+
}
|
|
764
|
+
renderClearButton(props) {
|
|
765
|
+
var _a;
|
|
766
|
+
const disabled = (_a = props == null ? void 0 : props.disabled) != null ? _a : this.disabled || !this.currentValue;
|
|
767
|
+
return b`
|
|
768
|
+
<sl-icon-button
|
|
769
|
+
name="trash"
|
|
770
|
+
?disabled=${disabled}
|
|
771
|
+
@click=${this.handleClear}
|
|
772
|
+
>
|
|
773
|
+
</sl-icon-button>
|
|
774
|
+
`;
|
|
775
|
+
}
|
|
776
|
+
renderRecordingIcon() {
|
|
777
|
+
return b`
|
|
778
|
+
<span class="sender__recording-icon" aria-label="Recording">
|
|
779
|
+
<span class="sender__recording-bar"></span>
|
|
780
|
+
<span class="sender__recording-bar"></span>
|
|
781
|
+
<span class="sender__recording-bar"></span>
|
|
782
|
+
<span class="sender__recording-bar"></span>
|
|
783
|
+
</span>
|
|
784
|
+
`;
|
|
785
|
+
}
|
|
786
|
+
renderSpeechButton(props) {
|
|
787
|
+
var _a, _b;
|
|
788
|
+
if (!this.allowSpeech) return null;
|
|
789
|
+
const disabled = (_a = props == null ? void 0 : props.disabled) != null ? _a : this.disabled || this.readOnly || !this.speechPermission;
|
|
790
|
+
const onClick = (_b = props == null ? void 0 : props.onClick) != null ? _b : this.handleSpeechClick.bind(this);
|
|
791
|
+
if (this.currentRecording) {
|
|
792
|
+
return b`
|
|
793
|
+
<button
|
|
794
|
+
class="sender__speech-btn sender__speech-btn--recording"
|
|
795
|
+
@click=${onClick}
|
|
796
|
+
?disabled=${disabled}
|
|
797
|
+
aria-label="Stop recording"
|
|
798
|
+
>
|
|
799
|
+
${this.renderRecordingIcon()}
|
|
800
|
+
</button>
|
|
801
|
+
`;
|
|
802
|
+
}
|
|
803
|
+
const iconName = disabled ? "mic-mute" : "mic";
|
|
804
|
+
return b`
|
|
805
|
+
<sl-icon-button
|
|
806
|
+
name=${iconName}
|
|
807
|
+
class="sender__speech-btn"
|
|
808
|
+
@click=${onClick}
|
|
809
|
+
?disabled=${disabled}
|
|
810
|
+
>
|
|
811
|
+
</sl-icon-button>
|
|
812
|
+
`;
|
|
813
|
+
}
|
|
814
|
+
renderLoadingButton(props) {
|
|
815
|
+
var _a, _b;
|
|
816
|
+
const disabled = (_a = props == null ? void 0 : props.disabled) != null ? _a : this.disabled;
|
|
817
|
+
const onClick = (_b = props == null ? void 0 : props.onClick) != null ? _b : this.handleSubmit.bind(this);
|
|
818
|
+
return b`
|
|
819
|
+
<sl-icon-button
|
|
820
|
+
name="send"
|
|
821
|
+
?loading=${true}
|
|
822
|
+
?disabled=${disabled}
|
|
823
|
+
@click=${this.handleSubmit}
|
|
824
|
+
>
|
|
825
|
+
</sl-icon-button>
|
|
826
|
+
`;
|
|
827
|
+
}
|
|
828
|
+
get actionComponents() {
|
|
829
|
+
return {
|
|
830
|
+
SendButton: (props) => this.renderSendButton(props),
|
|
831
|
+
ClearButton: (props) => this.renderClearButton(props),
|
|
832
|
+
LoadingButton: (props) => this.renderLoadingButton(props),
|
|
833
|
+
SpeechButton: (props) => this.renderSpeechButton(props)
|
|
834
|
+
};
|
|
835
|
+
}
|
|
836
|
+
renderFooter() {
|
|
837
|
+
const defaultFooter = b`
|
|
838
|
+
<div
|
|
839
|
+
class=${e({
|
|
840
|
+
sender__footer: true,
|
|
841
|
+
sender__footer_content: this.hasFooterContent
|
|
842
|
+
})}
|
|
843
|
+
part="footer"
|
|
844
|
+
>
|
|
845
|
+
<slot name="footer" @slotchange=${this.handleFooterSlotChange}></slot>
|
|
846
|
+
</div>
|
|
847
|
+
`;
|
|
848
|
+
if (this.footer === false) return null;
|
|
849
|
+
if (typeof this.footer === "function") {
|
|
850
|
+
return this.footer(defaultFooter, { components: this.actionComponents });
|
|
851
|
+
}
|
|
852
|
+
if (this.footer !== void 0) return this.footer;
|
|
853
|
+
return defaultFooter;
|
|
854
|
+
}
|
|
855
|
+
handleFooterSlotChange() {
|
|
856
|
+
var _a;
|
|
857
|
+
const slot = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector('slot[name="footer"]');
|
|
858
|
+
this.hasFooterContent = !!slot && slot.assignedNodes({ flatten: true }).length > 0;
|
|
859
|
+
}
|
|
860
|
+
handleHeaderSlotChange() {
|
|
861
|
+
var _a;
|
|
862
|
+
const slot = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector('slot[name="header"]');
|
|
863
|
+
this.hasHeaderContent = !!slot && slot.assignedNodes({ flatten: true }).length > 0;
|
|
864
|
+
}
|
|
865
|
+
renderHeader() {
|
|
866
|
+
const defaultHeader = b`
|
|
867
|
+
<div
|
|
868
|
+
class=${e({
|
|
869
|
+
sender__header: true,
|
|
870
|
+
sender__header_content: this.hasHeaderContent
|
|
871
|
+
})}
|
|
872
|
+
part="header"
|
|
873
|
+
>
|
|
874
|
+
<slot name="header" @slotchange=${this.handleHeaderSlotChange}></slot>
|
|
875
|
+
</div>
|
|
876
|
+
`;
|
|
877
|
+
if (this.header === false) return null;
|
|
878
|
+
if (typeof this.header === "function") {
|
|
879
|
+
return this.header(defaultHeader, { components: this.actionComponents });
|
|
880
|
+
}
|
|
881
|
+
if (this.header !== void 0) return this.header;
|
|
882
|
+
return defaultHeader;
|
|
883
|
+
}
|
|
884
|
+
renderPrefix() {
|
|
885
|
+
const defaultPrefix = b`<slot name="prefix"></slot>`;
|
|
886
|
+
if (this.prefixContent === false) return null;
|
|
887
|
+
if (typeof this.prefixContent === "function") {
|
|
888
|
+
return this.prefixContent(defaultPrefix, { components: this.actionComponents });
|
|
889
|
+
}
|
|
890
|
+
if (this.prefixContent !== void 0) return this.prefixContent;
|
|
891
|
+
return defaultPrefix;
|
|
892
|
+
}
|
|
893
|
+
renderSuffix() {
|
|
894
|
+
const defaultActions = b`
|
|
895
|
+
<div class="sender__actions" part="actions">
|
|
896
|
+
<slot name="suffix">
|
|
897
|
+
${this.renderSpeechButton()}
|
|
898
|
+
${this.renderSendButton()}
|
|
899
|
+
</slot>
|
|
900
|
+
</div>
|
|
901
|
+
`;
|
|
902
|
+
if (this.suffixContent === false) return null;
|
|
903
|
+
console.log("this.suffixContent", this.suffixContent, typeof this.suffixContent);
|
|
904
|
+
if (typeof this.suffixContent === "function") {
|
|
905
|
+
console.log("custom suffix");
|
|
906
|
+
return this.suffixContent(defaultActions, { components: this.actionComponents });
|
|
907
|
+
}
|
|
908
|
+
if (this.suffixContent !== void 0) return this.suffixContent;
|
|
909
|
+
console.log("\u8FD8\u662F\u6267\u884C\u5230\u4E86\u8FD9\u91CC", this.suffixContent);
|
|
910
|
+
return defaultActions;
|
|
911
|
+
}
|
|
912
|
+
renderSlotItem(item, index) {
|
|
913
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
914
|
+
const key = this.getSlotKey(item, index);
|
|
915
|
+
if (item.type === "text") {
|
|
916
|
+
return b`${(_a = item.value) != null ? _a : ""}`;
|
|
917
|
+
}
|
|
918
|
+
if (item.type === "content") {
|
|
919
|
+
const value = (_b = this.getSlotItemValue(item, index)) != null ? _b : "";
|
|
920
|
+
return b`
|
|
921
|
+
<span
|
|
922
|
+
class="sender__slot-content"
|
|
923
|
+
contenteditable=${this.readOnly || this.disabled ? "false" : "true"}
|
|
924
|
+
data-slot-key=${key}
|
|
925
|
+
data-placeholder=${(_d = (_c = item.props) == null ? void 0 : _c.placeholder) != null ? _d : ""}
|
|
926
|
+
spellcheck="false"
|
|
927
|
+
@input=${(event) => {
|
|
928
|
+
var _a2;
|
|
929
|
+
const target = event.target;
|
|
930
|
+
this.handleSlotValueChange(key, (_a2 = target.textContent) != null ? _a2 : "");
|
|
931
|
+
}}
|
|
932
|
+
@keydown=${(event) => this.handleKeyDown(event)}
|
|
933
|
+
@paste=${(event) => {
|
|
934
|
+
var _a2, _b2;
|
|
935
|
+
event.preventDefault();
|
|
936
|
+
const text = (_b2 = (_a2 = event.clipboardData) == null ? void 0 : _a2.getData("text/plain")) != null ? _b2 : "";
|
|
937
|
+
document.execCommand("insertText", false, text);
|
|
938
|
+
}}
|
|
939
|
+
>${String(value)}</span>
|
|
940
|
+
`;
|
|
941
|
+
}
|
|
942
|
+
if (item.type === "input") {
|
|
943
|
+
const value = (_e = this.getSlotItemValue(item, index)) != null ? _e : "";
|
|
944
|
+
return b`
|
|
945
|
+
<sl-input
|
|
946
|
+
class="sender__slot-input"
|
|
947
|
+
size="small"
|
|
948
|
+
data-slot-key=${key}
|
|
949
|
+
.value=${String(value != null ? value : "")}
|
|
950
|
+
placeholder=${(_g = (_f = item.props) == null ? void 0 : _f.placeholder) != null ? _g : ""}
|
|
951
|
+
?disabled=${this.disabled}
|
|
952
|
+
?readonly=${this.readOnly}
|
|
953
|
+
@sl-input=${(event) => {
|
|
954
|
+
const target = event.target;
|
|
955
|
+
this.handleSlotValueChange(key, target.value);
|
|
956
|
+
}}
|
|
957
|
+
></sl-input>
|
|
958
|
+
`;
|
|
959
|
+
}
|
|
960
|
+
if (item.type === "select") {
|
|
961
|
+
const value = this.getSlotItemValue(item, index);
|
|
962
|
+
return b`
|
|
963
|
+
<sl-select
|
|
964
|
+
class="sender__slot-select"
|
|
965
|
+
size="small"
|
|
966
|
+
data-slot-key=${key}
|
|
967
|
+
.value=${String(value != null ? value : "")}
|
|
968
|
+
placeholder=${(_i = (_h = item.props) == null ? void 0 : _h.placeholder) != null ? _i : ""}
|
|
969
|
+
?disabled=${this.disabled}
|
|
970
|
+
@sl-change=${(event) => {
|
|
971
|
+
const target = event.target;
|
|
972
|
+
this.handleSlotValueChange(key, target.value);
|
|
973
|
+
}}
|
|
974
|
+
>
|
|
975
|
+
${((_k = (_j = item.props) == null ? void 0 : _j.options) != null ? _k : []).map((option) => b`<sl-option value=${option.value}>${option.label}</sl-option>`)}
|
|
976
|
+
</sl-select>
|
|
977
|
+
`;
|
|
978
|
+
}
|
|
979
|
+
if (item.type === "tag") {
|
|
980
|
+
return b`
|
|
981
|
+
<sl-tag class="sender__slot-tag" size="small" data-slot-key=${key}>
|
|
982
|
+
${(_o = (_n = (_l = item.props) == null ? void 0 : _l.label) != null ? _n : (_m = item.props) == null ? void 0 : _m.value) != null ? _o : ""}
|
|
983
|
+
</sl-tag>
|
|
984
|
+
`;
|
|
985
|
+
}
|
|
986
|
+
if (item.type === "custom") {
|
|
987
|
+
const value = this.getSlotItemValue(item, index);
|
|
988
|
+
const onChange = (nextValue) => this.handleSlotValueChange(key, nextValue);
|
|
989
|
+
return (_q = (_p = item.customRender) == null ? void 0 : _p.call(item, value, onChange, { disabled: this.disabled, readOnly: this.readOnly }, item)) != null ? _q : null;
|
|
990
|
+
}
|
|
991
|
+
return null;
|
|
992
|
+
}
|
|
993
|
+
renderSlotConfig() {
|
|
994
|
+
var _a;
|
|
995
|
+
if (!this.isSlotMode) return null;
|
|
996
|
+
return b`
|
|
997
|
+
<div
|
|
998
|
+
class="sender__slot-area"
|
|
999
|
+
part="slot-area"
|
|
1000
|
+
contenteditable=${this.readOnly || this.disabled ? "false" : "true"}
|
|
1001
|
+
@keydown=${this.handleKeyDown}
|
|
1002
|
+
@paste=${this.handlePaste}
|
|
1003
|
+
@focus=${this.handleFocus}
|
|
1004
|
+
@blur=${this.handleBlur}
|
|
1005
|
+
@input=${this.handleSlotAreaInput}
|
|
1006
|
+
>
|
|
1007
|
+
${this.renderSkill()}
|
|
1008
|
+
${(_a = this.slotConfig) == null ? void 0 : _a.map((item, index) => this.renderSlotItem(item, index))}
|
|
1009
|
+
</div>
|
|
1010
|
+
`;
|
|
1011
|
+
}
|
|
1012
|
+
renderSkill() {
|
|
1013
|
+
var _a;
|
|
1014
|
+
if (!this.skill) return null;
|
|
1015
|
+
const displayTitle = (_a = this.skill.title) != null ? _a : this.skill.value;
|
|
1016
|
+
const closable = this.skill.closable;
|
|
1017
|
+
const showClose = !!closable;
|
|
1018
|
+
const closeDisabled = typeof closable === "object" && closable.disabled;
|
|
1019
|
+
const closeIcon = typeof closable === "object" && closable.closeIcon ? closable.closeIcon : "x-lg";
|
|
1020
|
+
return b`
|
|
1021
|
+
<span class="sender__skill" part="skill" contenteditable="false">
|
|
1022
|
+
<span class="sender__skill-tag">
|
|
1023
|
+
<span class="sender__skill-text">${displayTitle}</span>
|
|
1024
|
+
${showClose ? b`
|
|
1025
|
+
<span
|
|
1026
|
+
class="sender__skill-close ${closeDisabled ? "sender__skill-close--disabled" : ""}"
|
|
1027
|
+
role="button"
|
|
1028
|
+
aria-label="Remove skill"
|
|
1029
|
+
tabindex=${closeDisabled ? -1 : 0}
|
|
1030
|
+
@click=${() => !closeDisabled && this.handleSkillRemove()}
|
|
1031
|
+
@keydown=${(e3) => {
|
|
1032
|
+
if (!closeDisabled && (e3.key === "Enter" || e3.key === " ")) {
|
|
1033
|
+
e3.preventDefault();
|
|
1034
|
+
this.handleSkillRemove();
|
|
1035
|
+
}
|
|
1036
|
+
}}
|
|
1037
|
+
>
|
|
1038
|
+
<sl-icon name=${closeIcon}></sl-icon>
|
|
1039
|
+
</span>
|
|
1040
|
+
` : null}
|
|
1041
|
+
</span>
|
|
1042
|
+
</span>
|
|
1043
|
+
`;
|
|
1044
|
+
}
|
|
1045
|
+
render() {
|
|
1046
|
+
return b`
|
|
1047
|
+
<div
|
|
1048
|
+
class=${e({
|
|
1049
|
+
sender: true,
|
|
1050
|
+
"sender--disabled": this.disabled
|
|
1051
|
+
})}
|
|
1052
|
+
part="base"
|
|
1053
|
+
>
|
|
1054
|
+
${this.renderHeader()}
|
|
1055
|
+
|
|
1056
|
+
<div class="sender__content">
|
|
1057
|
+
<div class="sender__input-area">
|
|
1058
|
+
${this.renderPrefix()}
|
|
1059
|
+
${this.isSlotMode ? this.renderSlotConfig() : b`
|
|
1060
|
+
<sl-textarea
|
|
1061
|
+
part="input"
|
|
1062
|
+
.value=${this.value}
|
|
1063
|
+
placeholder=${this.placeholder}
|
|
1064
|
+
?disabled=${this.disabled}
|
|
1065
|
+
?readonly=${this.readOnly}
|
|
1066
|
+
resize="auto"
|
|
1067
|
+
rows=${this.rows}
|
|
1068
|
+
@sl-input=${this.handleInput}
|
|
1069
|
+
@keydown=${this.handleKeyDown}
|
|
1070
|
+
@paste=${this.handlePaste}
|
|
1071
|
+
@sl-focus=${this.handleFocus}
|
|
1072
|
+
@sl-blur=${this.handleBlur}
|
|
1073
|
+
></sl-textarea>
|
|
1074
|
+
`}
|
|
1075
|
+
${this.renderSuffix()}
|
|
1076
|
+
</div>
|
|
1077
|
+
</div>
|
|
1078
|
+
|
|
1079
|
+
${this.renderFooter()}
|
|
1080
|
+
</div>
|
|
1081
|
+
`;
|
|
1082
|
+
}
|
|
1083
|
+
};
|
|
1084
|
+
SlSender.styles = [component_styles_default, sender_styles_default];
|
|
1085
|
+
SlSender.dependencies = {
|
|
1086
|
+
"sl-textarea": SlTextarea,
|
|
1087
|
+
"sl-input": SlInput,
|
|
1088
|
+
"sl-select": SlSelect,
|
|
1089
|
+
"sl-option": SlOption,
|
|
1090
|
+
"sl-tag": SlTag,
|
|
1091
|
+
"sl-button": SlButton,
|
|
1092
|
+
"sl-icon-button": SlIconButton,
|
|
1093
|
+
"sl-icon": SlIcon,
|
|
1094
|
+
"sl-spinner": SlSpinner
|
|
1095
|
+
};
|
|
1096
|
+
__decorateClass([
|
|
1097
|
+
e2("sl-textarea")
|
|
1098
|
+
], SlSender.prototype, "textarea", 2);
|
|
1099
|
+
__decorateClass([
|
|
1100
|
+
e2(".sender__slot-area")
|
|
1101
|
+
], SlSender.prototype, "slotArea", 2);
|
|
1102
|
+
__decorateClass([
|
|
1103
|
+
n({ type: String })
|
|
1104
|
+
], SlSender.prototype, "value", 2);
|
|
1105
|
+
__decorateClass([
|
|
1106
|
+
n({ type: String })
|
|
1107
|
+
], SlSender.prototype, "placeholder", 2);
|
|
1108
|
+
__decorateClass([
|
|
1109
|
+
n({ type: Boolean })
|
|
1110
|
+
], SlSender.prototype, "loading", 2);
|
|
1111
|
+
__decorateClass([
|
|
1112
|
+
n({ type: Boolean })
|
|
1113
|
+
], SlSender.prototype, "disabled", 2);
|
|
1114
|
+
__decorateClass([
|
|
1115
|
+
n({ type: Boolean, attribute: "read-only" })
|
|
1116
|
+
], SlSender.prototype, "readOnly", 2);
|
|
1117
|
+
__decorateClass([
|
|
1118
|
+
n({ type: Number })
|
|
1119
|
+
], SlSender.prototype, "rows", 2);
|
|
1120
|
+
__decorateClass([
|
|
1121
|
+
n({ type: String, attribute: "submit-type" })
|
|
1122
|
+
], SlSender.prototype, "submitType", 2);
|
|
1123
|
+
__decorateClass([
|
|
1124
|
+
n({ attribute: false })
|
|
1125
|
+
], SlSender.prototype, "slotConfig", 2);
|
|
1126
|
+
__decorateClass([
|
|
1127
|
+
n({ attribute: false })
|
|
1128
|
+
], SlSender.prototype, "skill", 2);
|
|
1129
|
+
__decorateClass([
|
|
1130
|
+
n({ attribute: false })
|
|
1131
|
+
], SlSender.prototype, "footer", 2);
|
|
1132
|
+
__decorateClass([
|
|
1133
|
+
n({ attribute: false })
|
|
1134
|
+
], SlSender.prototype, "header", 2);
|
|
1135
|
+
__decorateClass([
|
|
1136
|
+
n({ attribute: false })
|
|
1137
|
+
], SlSender.prototype, "prefixContent", 2);
|
|
1138
|
+
__decorateClass([
|
|
1139
|
+
n({ attribute: false })
|
|
1140
|
+
], SlSender.prototype, "suffixContent", 2);
|
|
1141
|
+
__decorateClass([
|
|
1142
|
+
n({ type: Boolean, attribute: "allow-speech" })
|
|
1143
|
+
], SlSender.prototype, "allowSpeech", 2);
|
|
1144
|
+
__decorateClass([
|
|
1145
|
+
n({ type: Boolean, attribute: "speech-recording" })
|
|
1146
|
+
], SlSender.prototype, "speechRecording", 2);
|
|
1147
|
+
__decorateClass([
|
|
1148
|
+
r()
|
|
1149
|
+
], SlSender.prototype, "hasHeaderContent", 2);
|
|
1150
|
+
__decorateClass([
|
|
1151
|
+
r()
|
|
1152
|
+
], SlSender.prototype, "hasFooterContent", 2);
|
|
1153
|
+
|
|
1154
|
+
export {
|
|
1155
|
+
SlSender
|
|
1156
|
+
};
|