@mieweb/ui 0.10.0-dev.2 → 0.10.0-dev.21
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/agent/mieweb-ui.instructions.md +13 -1
- package/dist/CsvBlock-FX5YNGNE.cjs +17 -0
- package/dist/{CsvBlock-ROJCKJDP.cjs.map → CsvBlock-FX5YNGNE.cjs.map} +1 -1
- package/dist/CsvBlock-VLMG7GUO.js +8 -0
- package/dist/{CsvBlock-UWPMTLE2.js.map → CsvBlock-VLMG7GUO.js.map} +1 -1
- package/dist/HtmlPreviewBlock-5JE7L3GR.js +8 -0
- package/dist/{HtmlPreviewBlock-ME5U3XNS.js.map → HtmlPreviewBlock-5JE7L3GR.js.map} +1 -1
- package/dist/HtmlPreviewBlock-UO37JQ3K.cjs +17 -0
- package/dist/{HtmlPreviewBlock-DWFN6EUB.cjs.map → HtmlPreviewBlock-UO37JQ3K.cjs.map} +1 -1
- package/dist/Input-yN516s5_.d.cts +3 -0
- package/dist/Input-yN516s5_.d.ts +3 -0
- package/dist/MermaidBlock-3XHFBAMV.js +8 -0
- package/dist/{MermaidBlock-2B6CPD6Y.js.map → MermaidBlock-3XHFBAMV.js.map} +1 -1
- package/dist/MermaidBlock-RZ75RPZA.cjs +17 -0
- package/dist/{MermaidBlock-D2UC5M55.cjs.map → MermaidBlock-RZ75RPZA.cjs.map} +1 -1
- package/dist/SurveyBlock-MUVJ3JUI.js +8 -0
- package/dist/{SurveyBlock-4DO62RBT.js.map → SurveyBlock-MUVJ3JUI.js.map} +1 -1
- package/dist/SurveyBlock-VH47YXZC.cjs +17 -0
- package/dist/{SurveyBlock-4CD4AYMJ.cjs.map → SurveyBlock-VH47YXZC.cjs.map} +1 -1
- package/dist/ag-grid.d.cts +142 -1
- package/dist/ag-grid.d.ts +142 -1
- package/dist/{chunk-ACCAXVOG.js → chunk-2ABWFQQH.js} +133 -55
- package/dist/chunk-2ABWFQQH.js.map +1 -0
- package/dist/{chunk-Y5HFM7LO.js → chunk-2BARVD4C.js} +3 -3
- package/dist/{chunk-Y5HFM7LO.js.map → chunk-2BARVD4C.js.map} +1 -1
- package/dist/{chunk-G3JX3UAU.cjs → chunk-3KPDQG5O.cjs} +5 -5
- package/dist/{chunk-G3JX3UAU.cjs.map → chunk-3KPDQG5O.cjs.map} +1 -1
- package/dist/chunk-3YBS4WUQ.js +52 -0
- package/dist/chunk-3YBS4WUQ.js.map +1 -0
- package/dist/chunk-4HC2IBOX.js +258 -0
- package/dist/chunk-4HC2IBOX.js.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-E4IBHYJ7.cjs → chunk-6N6LIAUJ.cjs} +9 -9
- package/dist/{chunk-E4IBHYJ7.cjs.map → chunk-6N6LIAUJ.cjs.map} +1 -1
- package/dist/chunk-74ENCTIK.js +162 -0
- package/dist/chunk-74ENCTIK.js.map +1 -0
- package/dist/{chunk-GOALNQZ2.js → chunk-7YO7DNUV.js} +4 -83
- package/dist/chunk-7YO7DNUV.js.map +1 -0
- package/dist/{chunk-VILW53UZ.js → chunk-BIQ7GSO2.js} +3 -3
- package/dist/{chunk-VILW53UZ.js.map → chunk-BIQ7GSO2.js.map} +1 -1
- package/dist/chunk-BM35CACB.js +148 -0
- package/dist/chunk-BM35CACB.js.map +1 -0
- package/dist/{chunk-XI34EGK5.cjs → chunk-CPPUT74P.cjs} +9 -9
- package/dist/{chunk-XI34EGK5.cjs.map → chunk-CPPUT74P.cjs.map} +1 -1
- package/dist/{chunk-WNM7IZJ7.js → chunk-DSB4DKWG.js} +7 -7
- package/dist/{chunk-WNM7IZJ7.js.map → chunk-DSB4DKWG.js.map} +1 -1
- package/dist/chunk-DXEPYK3I.cjs +92 -0
- package/dist/chunk-DXEPYK3I.cjs.map +1 -0
- package/dist/{chunk-JI244Y7C.js → chunk-EK3BCET6.js} +57 -4
- package/dist/chunk-EK3BCET6.js.map +1 -0
- package/dist/{chunk-5JJ2DAE4.js → chunk-ENMXHZNE.js} +3 -3
- package/dist/{chunk-5JJ2DAE4.js.map → chunk-ENMXHZNE.js.map} +1 -1
- package/dist/{chunk-XCP454Q6.js → chunk-F4N67NAF.js} +12 -3
- package/dist/chunk-F4N67NAF.js.map +1 -0
- package/dist/{chunk-VKELAMAZ.js → chunk-FBLVPM2K.js} +3 -3
- package/dist/{chunk-VKELAMAZ.js.map → chunk-FBLVPM2K.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-DEDN5HAG.js → chunk-FZURBQJ2.js} +3 -3
- package/dist/{chunk-DEDN5HAG.js.map → chunk-FZURBQJ2.js.map} +1 -1
- package/dist/{chunk-ENKFJJZX.js → chunk-G45FBKKV.js} +5 -5
- package/dist/{chunk-ENKFJJZX.js.map → chunk-G45FBKKV.js.map} +1 -1
- package/dist/{chunk-JHULS3EC.js → chunk-GBUVIGD5.js} +89 -3
- package/dist/chunk-GBUVIGD5.js.map +1 -0
- package/dist/chunk-GU5OS7JJ.cjs +281 -0
- package/dist/chunk-GU5OS7JJ.cjs.map +1 -0
- package/dist/{chunk-V7D3YGUV.js → chunk-GVLNXPJX.js} +4 -4
- package/dist/{chunk-V7D3YGUV.js.map → chunk-GVLNXPJX.js.map} +1 -1
- package/dist/chunk-GVM6DTR5.js +90 -0
- package/dist/chunk-GVM6DTR5.js.map +1 -0
- package/dist/{chunk-3QEVGSFG.cjs → chunk-GYXUS65N.cjs} +5 -5
- package/dist/{chunk-3QEVGSFG.cjs.map → chunk-GYXUS65N.cjs.map} +1 -1
- package/dist/{chunk-WGPLUCBD.js → chunk-H2IAMSHK.js} +3 -3
- package/dist/{chunk-WGPLUCBD.js.map → chunk-H2IAMSHK.js.map} +1 -1
- package/dist/{chunk-7ZXAQTV4.cjs → chunk-HIZWOAWY.cjs} +8 -8
- package/dist/{chunk-7ZXAQTV4.cjs.map → chunk-HIZWOAWY.cjs.map} +1 -1
- package/dist/{chunk-ELPW32ZI.cjs → chunk-HQ4CGVWX.cjs} +41 -41
- package/dist/{chunk-ELPW32ZI.cjs.map → chunk-HQ4CGVWX.cjs.map} +1 -1
- package/dist/{chunk-6EN3IQQI.cjs → chunk-I4LXSHKO.cjs} +4 -4
- package/dist/{chunk-6EN3IQQI.cjs.map → chunk-I4LXSHKO.cjs.map} +1 -1
- package/dist/{chunk-NV2CWBI2.cjs → chunk-IEY3ZJIT.cjs} +12 -3
- package/dist/chunk-IEY3ZJIT.cjs.map +1 -0
- package/dist/{chunk-2YCERQWC.js → chunk-IH55BEB3.js} +4 -4
- package/dist/{chunk-2YCERQWC.js.map → chunk-IH55BEB3.js.map} +1 -1
- package/dist/chunk-IT775BYG.js +179 -0
- package/dist/chunk-IT775BYG.js.map +1 -0
- package/dist/chunk-IYWG72DM.js +166 -0
- package/dist/chunk-IYWG72DM.js.map +1 -0
- package/dist/{chunk-IX6KFB3K.cjs → chunk-JELTRRR5.cjs} +9 -9
- package/dist/{chunk-IX6KFB3K.cjs.map → chunk-JELTRRR5.cjs.map} +1 -1
- 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-KHSFJTEX.js +1924 -0
- package/dist/chunk-KHSFJTEX.js.map +1 -0
- package/dist/{chunk-UV2FVNWT.cjs → chunk-LFPJ3OUM.cjs} +5 -5
- package/dist/{chunk-UV2FVNWT.cjs.map → chunk-LFPJ3OUM.cjs.map} +1 -1
- package/dist/{chunk-WNAA6CLE.cjs → chunk-LHBWRMNC.cjs} +94 -2
- package/dist/chunk-LHBWRMNC.cjs.map +1 -0
- package/dist/{chunk-X4XPNTCZ.cjs → chunk-LJZKEMAH.cjs} +135 -57
- package/dist/chunk-LJZKEMAH.cjs.map +1 -0
- package/dist/{chunk-2QKBTPUC.cjs → chunk-MQPG3KVK.cjs} +8 -8
- package/dist/{chunk-2QKBTPUC.cjs.map → chunk-MQPG3KVK.cjs.map} +1 -1
- package/dist/{chunk-WIAQQNFU.cjs → chunk-MYHV2ND3.cjs} +37 -3
- package/dist/chunk-MYHV2ND3.cjs.map +1 -0
- package/dist/{chunk-OE5CKRUC.js → chunk-MZNCLXXU.js} +4 -4
- package/dist/{chunk-OE5CKRUC.js.map → chunk-MZNCLXXU.js.map} +1 -1
- package/dist/{chunk-XEAT7XJG.cjs → chunk-N2CJJHHB.cjs} +4 -4
- package/dist/{chunk-XEAT7XJG.cjs.map → chunk-N2CJJHHB.cjs.map} +1 -1
- package/dist/chunk-N7C4OEP7.cjs +356 -0
- package/dist/chunk-N7C4OEP7.cjs.map +1 -0
- package/dist/chunk-OGNADPM4.cjs +170 -0
- package/dist/chunk-OGNADPM4.cjs.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-U42F3HLE.cjs → chunk-QNDP6PE5.cjs} +57 -4
- package/dist/chunk-QNDP6PE5.cjs.map +1 -0
- package/dist/{chunk-H4ZXMQQW.js → chunk-QOVJ6Z6R.js} +3 -3
- package/dist/{chunk-H4ZXMQQW.js.map → chunk-QOVJ6Z6R.js.map} +1 -1
- package/dist/{chunk-GD7EBGC4.cjs → chunk-R2O72G6Z.cjs} +19 -19
- package/dist/{chunk-GD7EBGC4.cjs.map → chunk-R2O72G6Z.cjs.map} +1 -1
- package/dist/{chunk-TMMVIUUN.js → chunk-R6KPWIGO.js} +4 -4
- package/dist/{chunk-TMMVIUUN.js.map → chunk-R6KPWIGO.js.map} +1 -1
- package/dist/{chunk-VPWJCJCX.cjs → chunk-S45EERW3.cjs} +5 -5
- package/dist/{chunk-VPWJCJCX.cjs.map → chunk-S45EERW3.cjs.map} +1 -1
- package/dist/{chunk-WNZAYBVB.cjs → chunk-SQ2D7AON.cjs} +45 -45
- package/dist/{chunk-WNZAYBVB.cjs.map → chunk-SQ2D7AON.cjs.map} +1 -1
- package/dist/{chunk-P2CA3XGI.js → chunk-SYRLCTDV.js} +3 -3
- package/dist/{chunk-P2CA3XGI.js.map → chunk-SYRLCTDV.js.map} +1 -1
- package/dist/{chunk-7ZDPD5ZX.cjs → chunk-T4L7Q5FA.cjs} +7 -7
- package/dist/{chunk-7ZDPD5ZX.cjs.map → chunk-T4L7Q5FA.cjs.map} +1 -1
- package/dist/{chunk-ZGRCSNPK.js → chunk-TF7YWJHU.js} +3 -3
- package/dist/{chunk-ZGRCSNPK.js.map → chunk-TF7YWJHU.js.map} +1 -1
- 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-N6IY47YA.cjs → chunk-TTSSUOEV.cjs} +8 -8
- package/dist/{chunk-N6IY47YA.cjs.map → chunk-TTSSUOEV.cjs.map} +1 -1
- package/dist/{chunk-5MCBWTIF.cjs → chunk-TYE5K5WV.cjs} +4 -4
- package/dist/{chunk-5MCBWTIF.cjs.map → chunk-TYE5K5WV.cjs.map} +1 -1
- package/dist/{chunk-22CYDCXA.js → chunk-TZJQB4P2.js} +37 -4
- package/dist/chunk-TZJQB4P2.js.map +1 -0
- package/dist/{chunk-VOKVG3ER.js → chunk-UBSH27C2.js} +4 -4
- package/dist/{chunk-VOKVG3ER.js.map → chunk-UBSH27C2.js.map} +1 -1
- 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-SGFYA22I.cjs → chunk-VYPPQPSZ.cjs} +7 -7
- package/dist/{chunk-SGFYA22I.cjs.map → chunk-VYPPQPSZ.cjs.map} +1 -1
- package/dist/chunk-WCDJFMZO.cjs +1967 -0
- package/dist/chunk-WCDJFMZO.cjs.map +1 -0
- package/dist/{chunk-VNYW4C4J.cjs → chunk-X6A27RGO.cjs} +4 -84
- package/dist/chunk-X6A27RGO.cjs.map +1 -0
- package/dist/chunk-XBTKZCZF.js +333 -0
- package/dist/chunk-XBTKZCZF.js.map +1 -0
- package/dist/chunk-XDIMTPZU.cjs +202 -0
- package/dist/chunk-XDIMTPZU.cjs.map +1 -0
- package/dist/chunk-XVW5DPPP.js +429 -0
- package/dist/chunk-XVW5DPPP.js.map +1 -0
- package/dist/chunk-Y4E2WRUR.cjs +188 -0
- package/dist/chunk-Y4E2WRUR.cjs.map +1 -0
- package/dist/chunk-Y4QNLW7W.js +300 -0
- package/dist/chunk-Y4QNLW7W.js.map +1 -0
- package/dist/{chunk-KZFBQ7GY.js → chunk-YU55JD35.js} +3 -3
- package/dist/{chunk-KZFBQ7GY.js.map → chunk-YU55JD35.js.map} +1 -1
- package/dist/{chunk-OD47TTAW.cjs → chunk-Z4JR23IB.cjs} +9 -9
- package/dist/{chunk-OD47TTAW.cjs.map → chunk-Z4JR23IB.cjs.map} +1 -1
- package/dist/{chunk-3M7TAXNR.js → chunk-ZTW4KODY.js} +3 -3
- package/dist/{chunk-3M7TAXNR.js.map → chunk-ZTW4KODY.js.map} +1 -1
- package/dist/{chunk-3QGS6CXD.js → chunk-ZYL4SNOR.js} +3 -3
- package/dist/{chunk-3QGS6CXD.js.map → chunk-ZYL4SNOR.js.map} +1 -1
- package/dist/components/Alert/index.d.cts +1 -1
- package/dist/components/Alert/index.d.ts +1 -1
- package/dist/components/AlertDialog/index.cjs +6 -5
- package/dist/components/AlertDialog/index.d.cts +28 -3
- package/dist/components/AlertDialog/index.d.ts +28 -3
- package/dist/components/AlertDialog/index.js +5 -4
- 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.d.cts +1 -1
- package/dist/components/Avatar/index.d.ts +1 -1
- package/dist/components/Badge/index.d.cts +1 -1
- package/dist/components/Badge/index.d.ts +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 +129 -0
- package/dist/components/BoardView/index.d.ts +129 -0
- package/dist/components/BoardView/index.js +7 -0
- package/dist/components/BoardView/index.js.map +1 -0
- package/dist/components/Button/index.cjs +4 -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 +2 -1
- package/dist/components/CalendarView/index.cjs +23 -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 +10 -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/Collapsible/index.cjs +5 -5
- package/dist/components/Collapsible/index.js +2 -2
- package/dist/components/CustomizableDashboard/index.cjs +10 -9
- package/dist/components/CustomizableDashboard/index.js +3 -2
- package/dist/components/Dropdown/index.cjs +9 -9
- package/dist/components/Dropdown/index.d.cts +2 -1
- package/dist/components/Dropdown/index.d.ts +2 -1
- package/dist/components/Dropdown/index.js +2 -2
- package/dist/components/FloatingWindow/index.cjs +5 -4
- package/dist/components/FloatingWindow/index.js +3 -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/KeyboardShortcutsOverlay/index.cjs +5 -5
- package/dist/components/KeyboardShortcutsOverlay/index.js +3 -3
- package/dist/components/ListView/index.cjs +23 -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 +10 -0
- package/dist/components/ListView/index.js.map +1 -0
- package/dist/components/Markdown/index.cjs +20 -19
- package/dist/components/Markdown/index.js +8 -7
- package/dist/components/MediaEditor/index.cjs +11 -10
- package/dist/components/MediaEditor/index.d.cts +91 -2
- package/dist/components/MediaEditor/index.d.ts +91 -2
- package/dist/components/MediaEditor/index.js +6 -5
- package/dist/components/MediaPlayer/index.cjs +6 -5
- package/dist/components/MediaPlayer/index.d.cts +1 -1
- package/dist/components/MediaPlayer/index.d.ts +1 -1
- package/dist/components/MediaPlayer/index.js +3 -2
- package/dist/components/MegaMenu/index.cjs +6 -5
- package/dist/components/MegaMenu/index.js +3 -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/PhoneInput/index.d.cts +36 -3
- package/dist/components/PhoneInput/index.d.ts +36 -3
- package/dist/components/Progress/index.d.cts +1 -1
- package/dist/components/Progress/index.d.ts +1 -1
- 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 +4 -3
- package/dist/components/RadialExplorer/index.js +3 -2
- package/dist/components/RecordButton/index.d.cts +1 -1
- package/dist/components/RecordButton/index.d.ts +1 -1
- package/dist/components/RichTextEditor/index.cjs +8 -7
- package/dist/components/RichTextEditor/index.d.cts +7 -2
- package/dist/components/RichTextEditor/index.d.ts +7 -2
- package/dist/components/RichTextEditor/index.js +5 -4
- package/dist/components/ScrollArea/index.d.cts +1 -1
- package/dist/components/ScrollArea/index.d.ts +1 -1
- package/dist/components/SectionSpyNav/index.cjs +4 -3
- package/dist/components/SectionSpyNav/index.js +3 -2
- package/dist/components/Select/index.d.cts +1 -2
- package/dist/components/Select/index.d.ts +1 -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/Spinner/index.d.cts +2 -2
- package/dist/components/Spinner/index.d.ts +2 -2
- package/dist/components/SuperChat/index.cjs +478 -281
- package/dist/components/SuperChat/index.cjs.map +1 -1
- package/dist/components/SuperChat/index.d.cts +2 -4
- package/dist/components/SuperChat/index.d.ts +2 -4
- package/dist/components/SuperChat/index.js +468 -271
- package/dist/components/SuperChat/index.js.map +1 -1
- package/dist/components/SuperChat/plugins/index.cjs +5 -5
- 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 +4 -4
- 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 +1 -2
- package/dist/components/Textarea/index.d.ts +1 -2
- package/dist/components/ThemeProvider/index.d.cts +3 -1
- package/dist/components/ThemeProvider/index.d.ts +3 -1
- package/dist/components/TranscriptView/index.d.cts +85 -4
- package/dist/components/TranscriptView/index.d.ts +85 -4
- package/dist/components/ViewSet/index.cjs +24 -0
- package/dist/components/ViewSet/index.cjs.map +1 -0
- package/dist/components/ViewSet/index.d.cts +300 -0
- package/dist/components/ViewSet/index.d.ts +300 -0
- package/dist/components/ViewSet/index.js +15 -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 +57 -0
- package/dist/components/ViewSwitcher/index.d.ts +57 -0
- package/dist/components/ViewSwitcher/index.js +7 -0
- package/dist/components/ViewSwitcher/index.js.map +1 -0
- package/dist/datavis.cjs +3 -2
- 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 +2 -1
- package/dist/datavis.js.map +1 -1
- package/dist/esheet.cjs +9 -8
- 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 +6 -5
- package/dist/esheet.js.map +1 -1
- package/dist/hooks/index.cjs +49 -16
- package/dist/hooks/index.d.cts +590 -31
- package/dist/hooks/index.d.ts +590 -31
- package/dist/hooks/index.js +3 -2
- package/dist/index.cjs +1375 -1088
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8596 -683
- package/dist/index.d.ts +8596 -683
- package/dist/index.js +433 -340
- 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/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/q.d.cts +25 -3
- package/dist/q.d.ts +25 -3
- package/dist/{speaker-verify-5GTWAN5Y.cjs → speaker-verify-4NEJAK6C.cjs} +57 -90
- package/dist/speaker-verify-4NEJAK6C.cjs.map +1 -0
- package/dist/{speaker-verify-R67P433H.js → speaker-verify-AWSKI6DI.js} +57 -90
- package/dist/speaker-verify-AWSKI6DI.js.map +1 -0
- package/dist/styles/effects.css +33 -0
- package/dist/styles.css +1 -1
- package/dist/tailwind-preset.cjs +4 -4
- package/dist/tailwind-preset.js +1 -1
- package/dist/templates.cjs +103 -0
- package/dist/templates.cjs.map +1 -0
- package/dist/templates.d.cts +560 -0
- package/dist/templates.d.ts +560 -0
- package/dist/templates.js +10 -0
- package/dist/templates.js.map +1 -0
- package/dist/types-C3HQe74F.d.cts +86 -0
- package/dist/types-C3HQe74F.d.ts +86 -0
- package/dist/{types-B97JNRNQ.d.cts → types-DOxdTwmq.d.cts} +170 -2
- package/dist/{types-gZXrfLj6.d.ts → types-DOxdTwmq.d.ts} +170 -2
- package/dist/utils/index.d.cts +13 -2
- package/dist/utils/index.d.ts +13 -2
- package/package.json +29 -12
- 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-ACCAXVOG.js.map +0 -1
- package/dist/chunk-GOALNQZ2.js.map +0 -1
- package/dist/chunk-JHULS3EC.js.map +0 -1
- package/dist/chunk-JI244Y7C.js.map +0 -1
- package/dist/chunk-NV2CWBI2.cjs.map +0 -1
- package/dist/chunk-U42F3HLE.cjs.map +0 -1
- package/dist/chunk-VNYW4C4J.cjs.map +0 -1
- package/dist/chunk-WIAQQNFU.cjs.map +0 -1
- package/dist/chunk-WNAA6CLE.cjs.map +0 -1
- package/dist/chunk-X4XPNTCZ.cjs.map +0 -1
- package/dist/chunk-XCP454Q6.js.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/speaker-verify-5GTWAN5Y.cjs.map +0 -1
- package/dist/speaker-verify-R67P433H.js.map +0 -1
- package/dist/transcript-Cg7uSW-C.d.cts +0 -84
- package/dist/transcript-Cg7uSW-C.d.ts +0 -84
- package/dist/types-CnPEwzlp.d.cts +0 -254
- package/dist/types-CnPEwzlp.d.ts +0 -254
- 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
package/dist/motion.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export { A as Animated, a as AnimatedPresence, b as AnimatedProps, M as MotionEdge, c as MotionPreset, d as MotionRuntime, m as motionPresets, u as useMotionRuntime } from './Animated-XmH6k8pZ.js';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* `<MotionProvider>` — the opt-in switch.
|
|
@@ -49,4 +48,189 @@ declare namespace MotionProvider {
|
|
|
49
48
|
var displayName: string;
|
|
50
49
|
}
|
|
51
50
|
|
|
52
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Motion presets — the shared vocabulary of animations.
|
|
53
|
+
*
|
|
54
|
+
* This module is intentionally **free of any `motion` import**. It ships in the
|
|
55
|
+
* main `@mieweb/ui` entry so components can describe *what* they animate
|
|
56
|
+
* without pulling in a runtime to actually do it. The `@mieweb/ui/motion` entry
|
|
57
|
+
* is what turns these descriptions into real animations.
|
|
58
|
+
*
|
|
59
|
+
* Every preset is expressed as an open/closed variant pair so the same
|
|
60
|
+
* definition serves both usages:
|
|
61
|
+
*
|
|
62
|
+
* - **toggle** — the element stays mounted and animates between `open` and
|
|
63
|
+
* `closed` (a drawer sliding in and out).
|
|
64
|
+
* - **presence** — the element mounts and unmounts, entering on `open` and
|
|
65
|
+
* exiting back to `closed` (a modal).
|
|
66
|
+
*/
|
|
67
|
+
/** Named animation recipes shared by components. */
|
|
68
|
+
type MotionPreset = 'drawerStart' | 'overlay' | 'modalContent' | 'sidebarLabel' | 'menu' | 'collapse' | 'toast' | 'fade' | 'pop';
|
|
69
|
+
/**
|
|
70
|
+
* A physical edge, already resolved from any logical (`start`/`end`) position
|
|
71
|
+
* and from writing direction.
|
|
72
|
+
*
|
|
73
|
+
* Presets that move an element along an axis take one of these as `custom`.
|
|
74
|
+
* Resolution is the component's job, not the preset's: only the component knows
|
|
75
|
+
* whether its `end` means right or left, and — for anything anchored — which
|
|
76
|
+
* side it actually landed on after flipping away from a viewport edge.
|
|
77
|
+
*/
|
|
78
|
+
type MotionEdge = 'top' | 'bottom' | 'left' | 'right';
|
|
79
|
+
/**
|
|
80
|
+
* A variant value. Either a plain target object or a function of the element's
|
|
81
|
+
* `custom` value — the latter lets a single preset adapt to context, e.g. a
|
|
82
|
+
* drawer flipping its off-canvas direction in RTL.
|
|
83
|
+
*/
|
|
84
|
+
type MotionVariant = Record<string, unknown> | ((custom: unknown) => Record<string, unknown>);
|
|
85
|
+
interface MotionPresetDefinition {
|
|
86
|
+
variants: {
|
|
87
|
+
open: MotionVariant;
|
|
88
|
+
closed: MotionVariant;
|
|
89
|
+
};
|
|
90
|
+
transition: Record<string, unknown>;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* `custom` contract per preset:
|
|
94
|
+
*
|
|
95
|
+
* - `drawerStart` — `boolean`, whether the document direction is RTL.
|
|
96
|
+
* - `menu`, `toast` — a {@link MotionEdge}, already resolved from logical
|
|
97
|
+
* position and writing direction by the component.
|
|
98
|
+
* - `overlay`, `modalContent`, `sidebarLabel`, `collapse`, `fade`, `pop` —
|
|
99
|
+
* unused.
|
|
100
|
+
*/
|
|
101
|
+
declare const motionPresets: Record<MotionPreset, MotionPresetDefinition>;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Motion runtime — the seam between components and an optional animation library.
|
|
105
|
+
*
|
|
106
|
+
* Components in the main entry never import `motion`. They ask this module for
|
|
107
|
+
* a runtime; if an app has opted in by rendering `<MotionProvider>` from
|
|
108
|
+
* `@mieweb/ui/motion`, they get one and animate. If not, `useMotionRuntime()`
|
|
109
|
+
* returns `null` and they fall back to their existing CSS transitions. That is
|
|
110
|
+
* what keeps `motion` out of the bundle of every app that hasn't asked for it —
|
|
111
|
+
* the opt-in is resolved in the *module graph*, not by a prop.
|
|
112
|
+
*
|
|
113
|
+
* Like `presets`, this module must stay free of any `motion` import.
|
|
114
|
+
*/
|
|
115
|
+
|
|
116
|
+
interface MotionPresenceProps {
|
|
117
|
+
children?: React.ReactNode;
|
|
118
|
+
/** Suppress the initial mount animation. */
|
|
119
|
+
initial?: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Fires once every exiting child has finished and been removed.
|
|
122
|
+
*
|
|
123
|
+
* Needed by anything that guards the DOM while it is open — a focus trap, a
|
|
124
|
+
* scroll lock — because those guards must outlive `open` for as long as the
|
|
125
|
+
* subtree is still on screen. Never fires when no runtime is active, since
|
|
126
|
+
* there is no exit to wait for.
|
|
127
|
+
*/
|
|
128
|
+
onExitComplete?: () => void;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* The capabilities a motion library must supply. Deliberately small: element
|
|
132
|
+
* factories, a presence wrapper, and prop builders. Components depend on this
|
|
133
|
+
* interface, never on a concrete library, so swapping or dropping the library
|
|
134
|
+
* stays a one-file change.
|
|
135
|
+
*/
|
|
136
|
+
interface MotionRuntime {
|
|
137
|
+
/**
|
|
138
|
+
* Whether animations should actually run.
|
|
139
|
+
*
|
|
140
|
+
* A disabled provider still supplies a runtime rather than `null` so that
|
|
141
|
+
* consumers can tell "disabled" apart from "never opted in": `Modal` uses it
|
|
142
|
+
* to decide whether an exit animation will ever report completion, and
|
|
143
|
+
* `AnimatedPresence` keeps its wrapper element stable across the flip.
|
|
144
|
+
* `Animated` itself renders the plain fallback tag whenever this is false —
|
|
145
|
+
* withholding animation props from a mounted motion component corrupts
|
|
146
|
+
* `toggle`-mode elements, so the swap (and the remount it implies) is the
|
|
147
|
+
* correct behaviour. See the render branches in `Animated`.
|
|
148
|
+
*/
|
|
149
|
+
enabled: boolean;
|
|
150
|
+
/** Animated `div`. */
|
|
151
|
+
Div: React.ElementType;
|
|
152
|
+
/** Animated `nav`. */
|
|
153
|
+
Nav: React.ElementType;
|
|
154
|
+
/** Animated `span`, for inline content that must not become a block. */
|
|
155
|
+
Span: React.ElementType;
|
|
156
|
+
/** Enables exit animations for conditionally rendered children. */
|
|
157
|
+
Presence: React.ComponentType<MotionPresenceProps>;
|
|
158
|
+
/**
|
|
159
|
+
* Props for an element that stays mounted and animates between states.
|
|
160
|
+
* Skips the initial animation so a closed drawer doesn't slide out on load.
|
|
161
|
+
*/
|
|
162
|
+
toggle: (preset: MotionPreset, open: boolean, custom?: unknown) => Record<string, unknown>;
|
|
163
|
+
/** Props for an element that mounts and unmounts inside `Presence`. */
|
|
164
|
+
presence: (preset: MotionPreset, custom?: unknown) => Record<string, unknown>;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* The active motion runtime, or `null` when the app has not opted in.
|
|
168
|
+
*
|
|
169
|
+
* Components must treat `null` as the normal case and keep a CSS path that
|
|
170
|
+
* looks good on its own — motion is an enhancement, never a requirement.
|
|
171
|
+
*/
|
|
172
|
+
declare function useMotionRuntime(): MotionRuntime | null;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* `Animated` / `AnimatedPresence` — the ergonomic layer components use.
|
|
176
|
+
*
|
|
177
|
+
* These exist so an individual component never has to branch on whether motion
|
|
178
|
+
* is available. It declares the preset it wants and the CSS classes that stand
|
|
179
|
+
* in when motion is absent; this module picks the element to render.
|
|
180
|
+
*
|
|
181
|
+
* Adding motion to a further component should be a matter of swapping its
|
|
182
|
+
* root `<div>` for an `<Animated>` and naming a preset — no new imports, no
|
|
183
|
+
* new dependency, and no behavior change for apps that have not opted in.
|
|
184
|
+
*/
|
|
185
|
+
|
|
186
|
+
interface AnimatedProps extends React.HTMLAttributes<HTMLElement> {
|
|
187
|
+
/** Intrinsic element to render. */
|
|
188
|
+
as?: 'div' | 'nav' | 'span';
|
|
189
|
+
/** Which shared animation recipe to use. */
|
|
190
|
+
preset: MotionPreset;
|
|
191
|
+
/**
|
|
192
|
+
* - `toggle` — element stays mounted and animates between open and closed.
|
|
193
|
+
* - `presence` — element mounts and unmounts; wrap it in `<AnimatedPresence>`
|
|
194
|
+
* so the exit animation gets a chance to run.
|
|
195
|
+
*/
|
|
196
|
+
mode: 'toggle' | 'presence';
|
|
197
|
+
/** Current state. Only read in `toggle` mode. */
|
|
198
|
+
open?: boolean;
|
|
199
|
+
/** Per-preset context value — see the `custom` contract in `presets.ts`. */
|
|
200
|
+
custom?: unknown;
|
|
201
|
+
/**
|
|
202
|
+
* Classes applied whenever this element is **not** animating — no provider,
|
|
203
|
+
* a disabled provider, or `enabled={false}`. This is where a component's
|
|
204
|
+
* existing CSS transition lives, so the two paths never both try to drive
|
|
205
|
+
* the same property.
|
|
206
|
+
*/
|
|
207
|
+
fallbackClassName?: string;
|
|
208
|
+
/**
|
|
209
|
+
* Set `false` to stop this element animating even when a runtime is active.
|
|
210
|
+
*
|
|
211
|
+
* For states where an animated element would be wrong rather than merely
|
|
212
|
+
* unnecessary. Motion writes a `transform` to hold an element at its resting
|
|
213
|
+
* position, and a transformed ancestor becomes the containing block for any
|
|
214
|
+
* `position: fixed` descendant — so an element that is only sometimes
|
|
215
|
+
* animated should opt out the rest of the time.
|
|
216
|
+
*
|
|
217
|
+
* Flipping this (or the provider's `disabled`) swaps the element back to a
|
|
218
|
+
* plain tag, which **remounts** it — deliberately. See the note on the
|
|
219
|
+
* render branches below.
|
|
220
|
+
*/
|
|
221
|
+
enabled?: boolean;
|
|
222
|
+
}
|
|
223
|
+
declare const Animated: React.ForwardRefExoticComponent<AnimatedProps & React.RefAttributes<HTMLElement>>;
|
|
224
|
+
/**
|
|
225
|
+
* Keeps unmounting children on screen long enough to animate out.
|
|
226
|
+
*
|
|
227
|
+
* Without a runtime this is a pass-through, so children disappear immediately —
|
|
228
|
+
* which is exactly what they do today. Children rendered conditionally inside
|
|
229
|
+
* it need a stable `key`.
|
|
230
|
+
*/
|
|
231
|
+
declare function AnimatedPresence({ children, initial, onExitComplete, }: MotionPresenceProps): React.JSX.Element;
|
|
232
|
+
declare namespace AnimatedPresence {
|
|
233
|
+
var displayName: string;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export { Animated, AnimatedPresence, type AnimatedProps, type MotionEdge, type MotionPreset, MotionProvider, type MotionProviderProps, type MotionRuntime, motionPresets, useMotionRuntime };
|
package/dist/motion.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createPresetPropBuilders, MotionRuntimeContext } from './chunk-
|
|
2
|
-
export { Animated, AnimatedPresence, motionPresets, useMotionRuntime } from './chunk-
|
|
1
|
+
import { createPresetPropBuilders, MotionRuntimeContext } from './chunk-F4N67NAF.js';
|
|
2
|
+
export { Animated, AnimatedPresence, motionPresets, useMotionRuntime } from './chunk-F4N67NAF.js';
|
|
3
3
|
import './chunk-TQONQSJO.js';
|
|
4
4
|
import './chunk-PX6F3LHL.js';
|
|
5
5
|
import * as React from 'react';
|
package/dist/q.d.cts
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { AgentConfigGeneratorProps, QConfig, QSchema } from '@mieweb/q';
|
|
2
4
|
export { AgentConfigGenerator, AgentConfigGeneratorProps, ConfigEditor, ConfigEditorProps, FormBuilder, FormBuilderProps, GENERIC_TOOLS, Header, HeaderProps, QConfig, QDownloadMode, QSchema, TIMEZONES, ToolBuilder, ToolBuilderProps, configToQuestionnaire, configToYaml, copyToClipboard, defaultSchema, deriveDefaultConfig, downloadConfig, questionnaireToConfig, validateConfig, yamlToConfig } from '@mieweb/q';
|
|
3
5
|
export { UniversalAgentConfigGenerator, UniversalAgentConfigGeneratorOptions, brands, generateBrandCSS } from '@mieweb/q/universal';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
|
|
7
|
+
interface QProps extends AgentConfigGeneratorProps {
|
|
8
|
+
/** Additional class name for the Q container. */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** Inline styles for the Q container. */
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Q is the agent config generator form surface.
|
|
15
|
+
*
|
|
16
|
+
* It wraps the published @mieweb/q form generator so it can be consumed through
|
|
17
|
+
* @mieweb/ui/q while keeping Q's heavier dependencies out of the main UI entry.
|
|
18
|
+
*/
|
|
19
|
+
declare function Q({ className, style, ...props }: QProps): react_jsx_runtime.JSX.Element;
|
|
20
|
+
|
|
21
|
+
declare const qTwilioAgentSchema: QSchema;
|
|
22
|
+
declare const qAgentSchema: QSchema;
|
|
23
|
+
declare const qLandingPageAgentConfig: QConfig;
|
|
24
|
+
declare function createQAgentConfig(): QConfig;
|
|
25
|
+
declare function createQTwilioAgentConfig(): QConfig;
|
|
26
|
+
|
|
27
|
+
export { Q, type QProps, createQAgentConfig, createQTwilioAgentConfig, qAgentSchema, qLandingPageAgentConfig, qTwilioAgentSchema };
|
package/dist/q.d.ts
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { AgentConfigGeneratorProps, QConfig, QSchema } from '@mieweb/q';
|
|
2
4
|
export { AgentConfigGenerator, AgentConfigGeneratorProps, ConfigEditor, ConfigEditorProps, FormBuilder, FormBuilderProps, GENERIC_TOOLS, Header, HeaderProps, QConfig, QDownloadMode, QSchema, TIMEZONES, ToolBuilder, ToolBuilderProps, configToQuestionnaire, configToYaml, copyToClipboard, defaultSchema, deriveDefaultConfig, downloadConfig, questionnaireToConfig, validateConfig, yamlToConfig } from '@mieweb/q';
|
|
3
5
|
export { UniversalAgentConfigGenerator, UniversalAgentConfigGeneratorOptions, brands, generateBrandCSS } from '@mieweb/q/universal';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
|
|
7
|
+
interface QProps extends AgentConfigGeneratorProps {
|
|
8
|
+
/** Additional class name for the Q container. */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** Inline styles for the Q container. */
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Q is the agent config generator form surface.
|
|
15
|
+
*
|
|
16
|
+
* It wraps the published @mieweb/q form generator so it can be consumed through
|
|
17
|
+
* @mieweb/ui/q while keeping Q's heavier dependencies out of the main UI entry.
|
|
18
|
+
*/
|
|
19
|
+
declare function Q({ className, style, ...props }: QProps): react_jsx_runtime.JSX.Element;
|
|
20
|
+
|
|
21
|
+
declare const qTwilioAgentSchema: QSchema;
|
|
22
|
+
declare const qAgentSchema: QSchema;
|
|
23
|
+
declare const qLandingPageAgentConfig: QConfig;
|
|
24
|
+
declare function createQAgentConfig(): QConfig;
|
|
25
|
+
declare function createQTwilioAgentConfig(): QConfig;
|
|
26
|
+
|
|
27
|
+
export { Q, type QProps, createQAgentConfig, createQTwilioAgentConfig, qAgentSchema, qLandingPageAgentConfig, qTwilioAgentSchema };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var chunkOGNADPM4_cjs = require('./chunk-OGNADPM4.cjs');
|
|
4
|
+
require('./chunk-EUAMEVVI.cjs');
|
|
5
|
+
|
|
3
6
|
// src/components/AI/HeyOzwell/SpeakerVerify/lib/speaker-verify.js
|
|
4
7
|
(function() {
|
|
5
8
|
const SV_DIR = (function() {
|
|
@@ -25,7 +28,7 @@
|
|
|
25
28
|
return "https://huggingface.co/jlocala/ozwell-voice-assets/resolve/main/sv-runtime";
|
|
26
29
|
})();
|
|
27
30
|
const MODEL = "./nemo_en_titanet_small.onnx";
|
|
28
|
-
const
|
|
31
|
+
const BASE_STORAGE_KEY = "ozwellDoctorVoiceprint";
|
|
29
32
|
const DEFAULT_THRESHOLD = 0.45;
|
|
30
33
|
let Module = null, handle = 0, dim = 0;
|
|
31
34
|
let cohort = [];
|
|
@@ -72,74 +75,41 @@
|
|
|
72
75
|
for (let i = 0; i < n; i++) d += a[i] * b[i];
|
|
73
76
|
return d;
|
|
74
77
|
}
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
return new Promise((resolve, reject) => {
|
|
78
|
-
const req = indexedDB.open(IDB_DB, 1);
|
|
79
|
-
req.onupgradeneeded = () => {
|
|
80
|
-
if (!req.result.objectStoreNames.contains(IDB_STORE)) req.result.createObjectStore(IDB_STORE);
|
|
81
|
-
};
|
|
82
|
-
req.onsuccess = () => resolve(req.result);
|
|
83
|
-
req.onerror = () => reject(req.error);
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
function idbReq(mode, run) {
|
|
87
|
-
return idbOpen().then((db) => new Promise((resolve, reject) => {
|
|
88
|
-
const tx = db.transaction(IDB_STORE, mode);
|
|
89
|
-
const r = run(tx.objectStore(IDB_STORE));
|
|
90
|
-
tx.oncomplete = () => {
|
|
91
|
-
resolve(r && r.result);
|
|
92
|
-
db.close();
|
|
93
|
-
};
|
|
94
|
-
tx.onerror = () => {
|
|
95
|
-
reject(tx.error);
|
|
96
|
-
db.close();
|
|
97
|
-
};
|
|
98
|
-
tx.onabort = () => {
|
|
99
|
-
reject(tx.error);
|
|
100
|
-
db.close();
|
|
101
|
-
};
|
|
102
|
-
}));
|
|
103
|
-
}
|
|
104
|
-
const idbGet = (key) => idbReq("readonly", (s) => s.get(key));
|
|
105
|
-
const idbPut = (key, v) => idbReq("readwrite", (s) => s.put(v, key));
|
|
106
|
-
const idbDel = (key) => idbReq("readwrite", (s) => s.delete(key));
|
|
107
|
-
let _store = null;
|
|
78
|
+
const stores = /* @__PURE__ */ new Map();
|
|
79
|
+
const hydrations = /* @__PURE__ */ new Map();
|
|
108
80
|
const normalizeWho = (o) => o && Array.isArray(o.centroid) ? {} : o || {};
|
|
109
|
-
async function hydrateStore() {
|
|
81
|
+
async function hydrateStore(namespace) {
|
|
82
|
+
const storageKey = chunkOGNADPM4_cjs.voiceprintStorageKey(BASE_STORAGE_KEY, namespace);
|
|
83
|
+
if (stores.has(storageKey)) return;
|
|
84
|
+
const pending = hydrations.get(storageKey);
|
|
85
|
+
if (pending) return pending;
|
|
86
|
+
const hydration = chunkOGNADPM4_cjs.getVoiceprints(
|
|
87
|
+
storageKey,
|
|
88
|
+
namespace === void 0 ? (raw) => normalizeWho(JSON.parse(raw || "{}")) : void 0
|
|
89
|
+
).then((value) => {
|
|
90
|
+
stores.set(storageKey, value || {});
|
|
91
|
+
});
|
|
92
|
+
hydrations.set(storageKey, hydration);
|
|
110
93
|
try {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
try {
|
|
115
|
-
raw = localStorage.getItem(LS_KEY);
|
|
116
|
-
} catch (e) {
|
|
117
|
-
}
|
|
118
|
-
if (raw != null) {
|
|
119
|
-
v = normalizeWho(JSON.parse(raw || "{}"));
|
|
120
|
-
await idbPut(LS_KEY, v);
|
|
121
|
-
try {
|
|
122
|
-
localStorage.removeItem(LS_KEY);
|
|
123
|
-
} catch (e) {
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
_store = v || {};
|
|
128
|
-
} catch (e) {
|
|
129
|
-
_store = _store || {};
|
|
94
|
+
await hydration;
|
|
95
|
+
} finally {
|
|
96
|
+
hydrations.delete(storageKey);
|
|
130
97
|
}
|
|
131
98
|
}
|
|
132
|
-
function loadAll() {
|
|
133
|
-
|
|
99
|
+
function loadAll(namespace) {
|
|
100
|
+
const storageKey = chunkOGNADPM4_cjs.voiceprintStorageKey(BASE_STORAGE_KEY, namespace);
|
|
101
|
+
if (stores.has(storageKey)) return stores.get(storageKey);
|
|
102
|
+
if (namespace !== void 0) return {};
|
|
134
103
|
try {
|
|
135
|
-
return normalizeWho(JSON.parse(localStorage.getItem(
|
|
104
|
+
return normalizeWho(JSON.parse(localStorage.getItem(BASE_STORAGE_KEY) || "{}"));
|
|
136
105
|
} catch (e) {
|
|
137
106
|
return {};
|
|
138
107
|
}
|
|
139
108
|
}
|
|
140
|
-
function saveAll(obj) {
|
|
141
|
-
|
|
142
|
-
|
|
109
|
+
function saveAll(obj, namespace) {
|
|
110
|
+
const storageKey = chunkOGNADPM4_cjs.voiceprintStorageKey(BASE_STORAGE_KEY, namespace);
|
|
111
|
+
stores.set(storageKey, obj);
|
|
112
|
+
void chunkOGNADPM4_cjs.setVoiceprints(storageKey, obj);
|
|
143
113
|
}
|
|
144
114
|
const DEFAULT_VOICE_ID = "you";
|
|
145
115
|
function normPhrase(o) {
|
|
@@ -149,14 +119,15 @@
|
|
|
149
119
|
if (Array.isArray(o.centroid)) return { voices: { [DEFAULT_VOICE_ID]: { label: "You", createdAt: 0, centroids: [o.centroid] } } };
|
|
150
120
|
return { voices: {} };
|
|
151
121
|
}
|
|
152
|
-
function allCentroids(phrase) {
|
|
153
|
-
const voices = normPhrase(loadAll()[phrase]).voices;
|
|
122
|
+
function allCentroids(phrase, namespace) {
|
|
123
|
+
const voices = normPhrase(loadAll(namespace)[phrase]).voices;
|
|
154
124
|
const out = [];
|
|
155
125
|
for (const id in voices) for (const c of voices[id].centroids || []) out.push(Float32Array.from(c));
|
|
156
126
|
return out;
|
|
157
127
|
}
|
|
158
128
|
const SpeakerVerify = {
|
|
159
129
|
ready: () => readyPromise,
|
|
130
|
+
loadNamespace: (namespace) => hydrateStore(namespace),
|
|
160
131
|
isLoaded: () => handle !== 0,
|
|
161
132
|
threshold: DEFAULT_THRESHOLD,
|
|
162
133
|
// AS-norm (score normalization): normalize the raw cosine against a crowd of other voices, so the
|
|
@@ -172,7 +143,7 @@
|
|
|
172
143
|
/** Enroll a VOICE for a phrase from N utterances → one condition-centroid under opts.voiceId
|
|
173
144
|
* (default "you"). opts.append ADDS it as another condition for that voice; otherwise it replaces
|
|
174
145
|
* that voice's conditions. opts.label names the voice. Capped to the most recent SV_CENTROID_CAP. */
|
|
175
|
-
enroll(phrase, utterances, opts) {
|
|
146
|
+
enroll(phrase, utterances, opts, namespace) {
|
|
176
147
|
if (!handle) throw new Error("SpeakerVerify not ready");
|
|
177
148
|
const voiceId = opts && opts.voiceId || DEFAULT_VOICE_ID;
|
|
178
149
|
const embs = utterances.map((u) => computeEmbedding(u.samples, u.sampleRate));
|
|
@@ -180,7 +151,7 @@
|
|
|
180
151
|
for (const e of embs) for (let i = 0; i < dim; i++) c[i] += e[i];
|
|
181
152
|
for (let i = 0; i < dim; i++) c[i] /= embs.length;
|
|
182
153
|
l2normalize(c);
|
|
183
|
-
const all = loadAll();
|
|
154
|
+
const all = loadAll(namespace);
|
|
184
155
|
const entry = normPhrase(all[phrase]);
|
|
185
156
|
const prevVoice = entry.voices[voiceId];
|
|
186
157
|
const prev = opts && opts.append && prevVoice && Array.isArray(prevVoice.centroids) ? prevVoice.centroids.map((x) => Float32Array.from(x)) : [];
|
|
@@ -192,12 +163,12 @@
|
|
|
192
163
|
centroids
|
|
193
164
|
};
|
|
194
165
|
all[phrase] = entry;
|
|
195
|
-
saveAll(all);
|
|
166
|
+
saveAll(all, namespace);
|
|
196
167
|
return { n: embs.length, conditions: centroids.length, voiceId };
|
|
197
168
|
},
|
|
198
169
|
/** Verify a live utterance against the BEST condition-centroid across ALL enrolled voices. */
|
|
199
|
-
verify(phrase, samples, sampleRate) {
|
|
200
|
-
const cents = allCentroids(phrase);
|
|
170
|
+
verify(phrase, samples, sampleRate, namespace) {
|
|
171
|
+
const cents = allCentroids(phrase, namespace);
|
|
201
172
|
if (!cents.length) return { score: 0, znorm: null, pass: false, enrolled: false };
|
|
202
173
|
const live = computeEmbedding(samples, sampleRate);
|
|
203
174
|
let score = -1;
|
|
@@ -220,7 +191,7 @@
|
|
|
220
191
|
return { score, znorm, pass, enrolled: true };
|
|
221
192
|
},
|
|
222
193
|
/** How many conditions are enrolled for a phrase, across ALL voices (0 = none). */
|
|
223
|
-
conditionCount: (phrase) => allCentroids(phrase).length,
|
|
194
|
+
conditionCount: (phrase, namespace) => allCentroids(phrase, namespace).length,
|
|
224
195
|
/** TitaNet speaker embedding for a raw utterance (Float32 + true sample rate). For diarization /
|
|
225
196
|
* clustering. Returns the L2-normalized embedding, or null if the runtime isn't ready. */
|
|
226
197
|
embed(samples, sampleRate) {
|
|
@@ -229,10 +200,10 @@
|
|
|
229
200
|
/** Best-matching ENROLLED voice for a live utterance, across all voices + phrases (text-independent,
|
|
230
201
|
* so conversational audio works). Returns { voiceId, label, score } (max cosine) or null if nothing
|
|
231
202
|
* enrolled / not ready. The caller applies a threshold to decide whether to trust the name. */
|
|
232
|
-
identify(samples, sampleRate) {
|
|
203
|
+
identify(samples, sampleRate, namespace) {
|
|
233
204
|
if (!handle) return null;
|
|
234
205
|
const live = computeEmbedding(samples, sampleRate);
|
|
235
|
-
const all = loadAll();
|
|
206
|
+
const all = loadAll(namespace);
|
|
236
207
|
const best = {};
|
|
237
208
|
for (const phrase in all) {
|
|
238
209
|
const voices = normPhrase(all[phrase]).voices;
|
|
@@ -250,8 +221,8 @@
|
|
|
250
221
|
return top;
|
|
251
222
|
},
|
|
252
223
|
/** List enrolled voices aggregated across phrases: [{ id, label, createdAt, conditions }]. */
|
|
253
|
-
listVoices() {
|
|
254
|
-
const all = loadAll();
|
|
224
|
+
listVoices(namespace) {
|
|
225
|
+
const all = loadAll(namespace);
|
|
255
226
|
const acc = {};
|
|
256
227
|
for (const phrase in all) {
|
|
257
228
|
const voices = normPhrase(all[phrase]).voices;
|
|
@@ -270,8 +241,8 @@
|
|
|
270
241
|
},
|
|
271
242
|
/** Remove a voice across all phrases — revokes that person's WHO match (the WHAT phrase-prints,
|
|
272
243
|
* which are shared/speaker-independent, are left in voiceprintStore). */
|
|
273
|
-
removeVoice(voiceId) {
|
|
274
|
-
const all = loadAll();
|
|
244
|
+
removeVoice(voiceId, namespace) {
|
|
245
|
+
const all = loadAll(namespace);
|
|
275
246
|
let changed = false;
|
|
276
247
|
for (const phrase in all) {
|
|
277
248
|
const entry = normPhrase(all[phrase]);
|
|
@@ -281,11 +252,11 @@
|
|
|
281
252
|
changed = true;
|
|
282
253
|
}
|
|
283
254
|
}
|
|
284
|
-
if (changed) saveAll(all);
|
|
255
|
+
if (changed) saveAll(all, namespace);
|
|
285
256
|
},
|
|
286
257
|
/** Rename a voice across all phrases. */
|
|
287
|
-
renameVoice(voiceId, label) {
|
|
288
|
-
const all = loadAll();
|
|
258
|
+
renameVoice(voiceId, label, namespace) {
|
|
259
|
+
const all = loadAll(namespace);
|
|
289
260
|
let changed = false;
|
|
290
261
|
for (const phrase in all) {
|
|
291
262
|
const entry = normPhrase(all[phrase]);
|
|
@@ -295,19 +266,15 @@
|
|
|
295
266
|
changed = true;
|
|
296
267
|
}
|
|
297
268
|
}
|
|
298
|
-
if (changed) saveAll(all);
|
|
269
|
+
if (changed) saveAll(all, namespace);
|
|
299
270
|
},
|
|
300
271
|
// hasEnrollment(phrase) -> is that phrase enrolled; hasEnrollment() -> is anything enrolled.
|
|
301
|
-
hasEnrollment: (phrase) => phrase ? allCentroids(phrase).length > 0 : Object.keys(loadAll()).some((p) => allCentroids(p).length > 0),
|
|
302
|
-
enrolledPhrases: () => Object.keys(loadAll()),
|
|
303
|
-
clearEnrollment: () => {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
try {
|
|
308
|
-
localStorage.removeItem(LS_KEY);
|
|
309
|
-
} catch (e) {
|
|
310
|
-
}
|
|
272
|
+
hasEnrollment: (phrase, namespace) => phrase ? allCentroids(phrase, namespace).length > 0 : Object.keys(loadAll(namespace)).some((p) => allCentroids(p, namespace).length > 0),
|
|
273
|
+
enrolledPhrases: (namespace) => Object.keys(loadAll(namespace)),
|
|
274
|
+
clearEnrollment: (namespace) => {
|
|
275
|
+
const storageKey = chunkOGNADPM4_cjs.voiceprintStorageKey(BASE_STORAGE_KEY, namespace);
|
|
276
|
+
stores.set(storageKey, {});
|
|
277
|
+
void chunkOGNADPM4_cjs.clearVoiceprints(storageKey);
|
|
311
278
|
}
|
|
312
279
|
};
|
|
313
280
|
async function init() {
|
|
@@ -353,5 +320,5 @@
|
|
|
353
320
|
if (document.readyState === "loading") document.addEventListener("DOMContentLoaded", init);
|
|
354
321
|
else init();
|
|
355
322
|
})();
|
|
356
|
-
//# sourceMappingURL=speaker-verify-
|
|
357
|
-
//# sourceMappingURL=speaker-verify-
|
|
323
|
+
//# sourceMappingURL=speaker-verify-4NEJAK6C.cjs.map
|
|
324
|
+
//# sourceMappingURL=speaker-verify-4NEJAK6C.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/AI/HeyOzwell/SpeakerVerify/lib/speaker-verify.js"],"names":["voiceprintStorageKey","getVoiceprints","setVoiceprints","clearVoiceprints"],"mappings":";;;;;;CAuBC,WAAY;AAOX,EAAA,MAAM,UAAU,WAAY;AAG1B,IAAA,IAAI,IAAA,GAAO,SAAU,CAAA,EAAG;AAAE,MAAA,IAAI;AAAE,QAAA,OAAO,KAAK,CAAA,CAAE,cAAA;AAAA,MAAgB,SAAS,CAAA,EAAG;AAAE,QAAA,OAAO,IAAA;AAAA,MAAM;AAAA,IAAE,CAAA;AAC3F,IAAA,IAAI,CAAA,GAAK,OAAO,MAAA,KAAW,WAAA,GAAgB,KAAK,MAAM,CAAA,IAAK,IAAA,CAAK,MAAA,CAAO,MAAM,CAAA,IAAK,IAAA,CAAK,MAAA,CAAO,GAAG,CAAA,GAAK,IAAA;AACtG,IAAA,IAAI,KA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F;AAEA,EAAA,MAAA,CAAO,aAAA,GAAgB,aAAA;AACvB,EAAA,IAAI,SAAS,UAAA,KAAe,SAAA,EAAW,QAAA,CAAS,gBAAA,CAAiB,oBAAoB,IAAI,CAAA;AAAA,OACpF,IAAA,EAAK;AACZ,CAAA,GAAG","file":"speaker-verify-4NEJAK6C.cjs","sourcesContent":["import {\n clearVoiceprints,\n getVoiceprints,\n setVoiceprints,\n voiceprintStorageKey,\n} from '../../../voiceprintStore';\n\n/**\n * On-device speaker-verification gate (the \"only the enrolled doctor can wake it\" layer).\n *\n * Loads the custom single-threaded sherpa-onnx WASM build (in /sv-wasm/) that exports the\n * SpeakerEmbeddingExtractor C-API, runs TitaNet speaker embeddings fully in-browser, and\n * verifies a live utterance against enrolled per-voice centroids stored in IndexedDB (db `ozwell-voice`,\n * migrated from the old localStorage format on first read).\n *\n * Proven in the /sv-wasm/ spike: a ~1s \"hey ozwell\" gives genuine cosine ~0.66 / impostor\n * ~0.30 (enroll-centroid: ~0.75 vs ~0.22, EER ~1.3%). This is a DIFFERENT axis from the\n * content voiceprint in hey-buddy.js: that BOOSTS the doctor's accented phrase (recall);\n * this BLOCKS a non-doctor's clean phrase (act/no-act). They compose.\n *\n * Loaded via dynamic import by the `useSpeakerVerify` hook (NOT a classic <script>). Exposes window.SpeakerVerify.\n * Audio in == Float32Array; pass its TRUE sample rate (sherpa resamples to 16k internally).\n */\n(function () {\n // Production runtime artifacts live in their OWN folder so they never clobber the\n // frozen feasibility proof in /sv-wasm (test.html + mic-test.html, kept for the\n // progression demo / YouTube short). This loads the single-threaded slim build.\n // Where the sherpa runtime (.js glue + .wasm + .data) and the AS-norm cohort are served from.\n // Default \"/sv-runtime\" (Storybook static dir). Set window.__ozwellAssets (a base URL string, or\n // { base, svRuntime }) to fetch the ~50 MB off the repo from a host — see AI/MODEL-HOSTING.md.\n const SV_DIR = (function () {\n // Storybook runs in an iframe; a console-set window.__ozwellAssets often lands on the parent frame,\n // so check current -> parent -> top (all same-origin).\n var pick = function (w) { try { return w && w.__ozwellAssets; } catch (e) { return null; } };\n var g = (typeof window !== \"undefined\") ? (pick(window) || pick(window.parent) || pick(window.top)) : null;\n var strip = function (s) { return String(s).replace(/\\/$/, \"\"); };\n if (typeof g === \"string\") return strip(g) + \"/sv-runtime\";\n if (g && g.svRuntime) return strip(g.svRuntime);\n if (g && g.base) return strip(g.base) + \"/sv-runtime\";\n // localStorage fallback — shared across Storybook frames, survives reload (the reliable path).\n try { var ls = localStorage.getItem(\"ozwellAssetBase\"); if (ls) return strip(ls) + \"/sv-runtime\"; } catch (e) { /* ignore */ }\n // Default host: the runtime was moved off the repo (see AI/MODEL-HOSTING.md) so a fresh clone\n // fetches it from here with no config. Override via window.__ozwellAssets / localStorage.\n return \"https://huggingface.co/jlocala/ozwell-voice-assets/resolve/main/sv-runtime\";\n })();\n const MODEL = \"./nemo_en_titanet_small.onnx\"; // preloaded into the WASM filesystem\n const BASE_STORAGE_KEY = \"ozwellDoctorVoiceprint\"; // { centroid: number[], n: number }\n // Threshold from the spike's enroll-centroid distributions (genuine ~0.75 / impostor ~0.22).\n // 0.45 (2026-06-22): with mic DSP on + matched enrollment the genuine doctor scores ~0.75-0.93 clean,\n // so 0.45 passes with wide margin and rejects impostors harder. Heavy background can still drag the doctor\n // toward ~0.4 (then 0.45 rejects -> \"say it again\", a fail-safe miss in an unrealistic-noise case).\n // Re-tune live: window.SpeakerVerify.threshold = 0.4 / 0.35 for heavy noise (don't go below ~0.3 — impostors).\n const DEFAULT_THRESHOLD = 0.45;\n\n let Module = null, handle = 0, dim = 0;\n let cohort = []; // AS-norm crowd: other-voice embeddings; live/centroid scored against it cancels channel\n let readyResolve, readyReject;\n const readyPromise = new Promise((res, rej) => { readyResolve = res; readyReject = rej; });\n\n function loadScript(src) {\n return new Promise((res, rej) => {\n const s = document.createElement(\"script\");\n s.src = src; s.onload = res; s.onerror = () => rej(new Error(\"failed to load \" + src));\n document.head.appendChild(s);\n });\n }\n\n // --- speaker-embedding extraction over the WASM C-API (names confirmed from the build) ---\n function computeEmbedding(samples, sampleRate) {\n const M = Module;\n const stream = M._SherpaOnnxSpeakerEmbeddingExtractorCreateStream(handle);\n const ptr = M._malloc(samples.length * 4);\n M.HEAPF32.set(samples, ptr / 4);\n M._SherpaOnnxOnlineStreamAcceptWaveform(stream, sampleRate, ptr, samples.length); // stream-only\n M._free(ptr);\n M._SherpaOnnxOnlineStreamInputFinished(stream);\n const ep = M._SherpaOnnxSpeakerEmbeddingExtractorComputeEmbedding(handle, stream);\n const out = M.HEAPF32.subarray(ep / 4, ep / 4 + dim).slice();\n // free the embedding (exported in the slim rebuild); guard in case it's absent.\n if (M._SherpaOnnxSpeakerEmbeddingExtractorDestroyEmbedding) {\n M._SherpaOnnxSpeakerEmbeddingExtractorDestroyEmbedding(ep);\n }\n M._SherpaOnnxDestroyOnlineStream(stream);\n return l2normalize(out);\n }\n\n function l2normalize(v) {\n let s = 0; for (let i = 0; i < v.length; i++) s += v[i] * v[i];\n s = Math.sqrt(s); if (s > 0) for (let i = 0; i < v.length; i++) v[i] /= s;\n return v;\n }\n function cosine(a, b) { let d = 0; const n = Math.min(a.length, b.length); for (let i = 0; i < n; i++) d += a[i] * b[i]; return d; } // both L2-normalized\n\n // --- enrollment storage: PER-PHRASE centroids of the doctor's embeddings (vectors, not\n // audio). Per-phrase because on a ~1s clip a speaker embedding still carries a little of\n // WHAT was said, so the doctor's \"hey ozwell\" centroid scores their \"ozwell i'm done\"\n // too low. We enroll + gate each phrase against its own centroid. ---\n const stores = new Map(); // in-memory WHO maps, hydrated per namespace before use\n const hydrations = new Map(); // one IndexedDB read per namespace, shared by concurrent hooks\n // Ignore the old single-centroid format ({centroid, n}) from earlier builds.\n const normalizeWho = (o) => (o && Array.isArray(o.centroid)) ? {} : (o || {});\n\n async function hydrateStore(namespace) {\n const storageKey = voiceprintStorageKey(BASE_STORAGE_KEY, namespace);\n if (stores.has(storageKey)) return;\n const pending = hydrations.get(storageKey);\n if (pending) return pending;\n const hydration = getVoiceprints(\n storageKey,\n namespace === undefined ? (raw) => normalizeWho(JSON.parse(raw || \"{}\")) : undefined\n ).then((value) => {\n stores.set(storageKey, value || {});\n });\n hydrations.set(storageKey, hydration);\n try {\n await hydration;\n } finally {\n hydrations.delete(storageKey);\n }\n }\n function loadAll(namespace) {\n const storageKey = voiceprintStorageKey(BASE_STORAGE_KEY, namespace);\n if (stores.has(storageKey)) return stores.get(storageKey);\n // Pre-hydration fallback (verify/enroll only run after ready(), which awaits hydrateStore).\n if (namespace !== undefined) return {};\n try { return normalizeWho(JSON.parse(localStorage.getItem(BASE_STORAGE_KEY) || \"{}\")); } catch (e) { return {}; }\n }\n function saveAll(obj, namespace) {\n const storageKey = voiceprintStorageKey(BASE_STORAGE_KEY, namespace);\n stores.set(storageKey, obj);\n void setVoiceprints(storageKey, obj);\n }\n // Multi-VOICE, multi-condition: each phrase stores a map of voices, each with a LIST of condition\n // centroids. Verify passes if ANY voice's ANY condition matches (so the doctor AND an enrolled\n // assistant both wake it; adding \"across the room\"/\"with background\" extends a voice's coverage).\n // Backward-compatible: legacy flat shapes ({centroids} / {centroid}) normalize to a default \"You\" voice.\n const SV_CENTROID_CAP = 6; // keep the most recent N conditions per voice\n const DEFAULT_VOICE_ID = \"you\";\n // Normalize any legacy per-phrase entry into { voices: { [id]: { label, createdAt, centroids:number[][] } } }.\n function normPhrase(o) {\n if (!o) return { voices: {} };\n if (o.voices) return o; // already voice-keyed\n if (Array.isArray(o.centroids)) return { voices: { [DEFAULT_VOICE_ID]: { label: \"You\", createdAt: 0, centroids: o.centroids } } };\n if (Array.isArray(o.centroid)) return { voices: { [DEFAULT_VOICE_ID]: { label: \"You\", createdAt: 0, centroids: [o.centroid] } } };\n return { voices: {} };\n }\n // Flat list of EVERY enrolled voice's centroids for a phrase (verify passes if any matches).\n function allCentroids(phrase, namespace) {\n const voices = normPhrase(loadAll(namespace)[phrase]).voices;\n const out = [];\n for (const id in voices) for (const c of (voices[id].centroids || [])) out.push(Float32Array.from(c));\n return out;\n }\n\n const SpeakerVerify = {\n ready: () => readyPromise,\n loadNamespace: (namespace) => hydrateStore(namespace),\n isLoaded: () => handle !== 0,\n threshold: DEFAULT_THRESHOLD,\n // AS-norm (score normalization): normalize the raw cosine against a crowd of other voices, so the\n // threshold stays stable when a room/mic drags scores down. PRIMARY gate when a cohort is loaded (znorm\n // != null); falls back to raw cosine only when there's no cohort. Turned on after live diagnostics showed\n // the genuine speaker scoring z 2–3.4 (well clear of 1.5) while raw cosine sat at 0.33–0.43 — i.e. raw\n // cosine was rejecting the real speaker in a room/mic that differed from enrollment, and AS-norm fixes it.\n useAsnorm: true,\n znormThreshold: 1.5, // \"at least N std above the crowd\"; tune from genuine vs real-impostor z-scores\n cohortSize: () => cohort.length,\n embeddingDim: () => dim,\n\n /** Enroll a VOICE for a phrase from N utterances → one condition-centroid under opts.voiceId\n * (default \"you\"). opts.append ADDS it as another condition for that voice; otherwise it replaces\n * that voice's conditions. opts.label names the voice. Capped to the most recent SV_CENTROID_CAP. */\n enroll(phrase, utterances /* [{samples, sampleRate}] */, opts, namespace) {\n if (!handle) throw new Error(\"SpeakerVerify not ready\");\n const voiceId = (opts && opts.voiceId) || DEFAULT_VOICE_ID;\n const embs = utterances.map(u => computeEmbedding(u.samples, u.sampleRate));\n const c = new Float32Array(dim);\n for (const e of embs) for (let i = 0; i < dim; i++) c[i] += e[i];\n for (let i = 0; i < dim; i++) c[i] /= embs.length;\n l2normalize(c);\n const all = loadAll(namespace);\n const entry = normPhrase(all[phrase]);\n const prevVoice = entry.voices[voiceId];\n const prev = (opts && opts.append && prevVoice && Array.isArray(prevVoice.centroids))\n ? prevVoice.centroids.map((x) => Float32Array.from(x)) : [];\n const centroids = prev.concat([c]).slice(-SV_CENTROID_CAP).map((v) => Array.from(v));\n entry.voices[voiceId] = {\n // keep the existing label when appending; otherwise use the provided one (or a sensible default)\n label: (prevVoice && opts && opts.append) ? prevVoice.label : ((opts && opts.label) || (voiceId === DEFAULT_VOICE_ID ? \"You\" : \"Voice\")),\n createdAt: (prevVoice && prevVoice.createdAt) || Date.now(),\n centroids,\n };\n all[phrase] = entry; saveAll(all, namespace);\n return { n: embs.length, conditions: centroids.length, voiceId };\n },\n\n /** Verify a live utterance against the BEST condition-centroid across ALL enrolled voices. */\n verify(phrase, samples, sampleRate, namespace) {\n const cents = allCentroids(phrase, namespace);\n if (!cents.length) return { score: 0, znorm: null, pass: false, enrolled: false };\n const live = computeEmbedding(samples, sampleRate);\n let score = -1;\n for (const c of cents) { const s = cosine(live, c); if (s > score) score = s; }\n // AS-norm: z = how many std the raw score sits above the crowd's scores against this same live clip.\n // A weird room drags the crowd scores down too, so the offset cancels and z stays stable.\n let znorm = null;\n if (cohort.length) {\n let sum = 0, sum2 = 0;\n for (const cv of cohort) { const s = cosine(live, cv); sum += s; sum2 += s * s; }\n const m = cohort.length, mean = sum / m, std = Math.sqrt(Math.max(sum2 / m - mean * mean, 1e-9));\n znorm = (score - mean) / std;\n }\n const pass = (SpeakerVerify.useAsnorm && znorm !== null)\n ? (znorm >= SpeakerVerify.znormThreshold)\n : (score >= SpeakerVerify.threshold);\n return { score, znorm, pass, enrolled: true };\n },\n\n /** How many conditions are enrolled for a phrase, across ALL voices (0 = none). */\n conditionCount: (phrase, namespace) => allCentroids(phrase, namespace).length,\n\n /** TitaNet speaker embedding for a raw utterance (Float32 + true sample rate). For diarization /\n * clustering. Returns the L2-normalized embedding, or null if the runtime isn't ready. */\n embed(samples, sampleRate) {\n return handle ? computeEmbedding(samples, sampleRate) : null;\n },\n\n /** Best-matching ENROLLED voice for a live utterance, across all voices + phrases (text-independent,\n * so conversational audio works). Returns { voiceId, label, score } (max cosine) or null if nothing\n * enrolled / not ready. The caller applies a threshold to decide whether to trust the name. */\n identify(samples, sampleRate, namespace) {\n if (!handle) return null;\n const live = computeEmbedding(samples, sampleRate);\n const all = loadAll(namespace);\n const best = {}; // voiceId -> { label, score }\n for (const phrase in all) {\n const voices = normPhrase(all[phrase]).voices;\n for (const id in voices) {\n for (const c of (voices[id].centroids || [])) {\n const s = cosine(live, Float32Array.from(c));\n if (!best[id] || s > best[id].score) best[id] = { label: voices[id].label, score: s };\n }\n }\n }\n let top = null;\n for (const id in best) {\n if (!top || best[id].score > top.score) top = { voiceId: id, label: best[id].label, score: best[id].score };\n }\n return top;\n },\n\n /** List enrolled voices aggregated across phrases: [{ id, label, createdAt, conditions }]. */\n listVoices(namespace) {\n const all = loadAll(namespace);\n const acc = {};\n for (const phrase in all) {\n const voices = normPhrase(all[phrase]).voices;\n for (const id in voices) {\n const v = voices[id];\n const conds = (v.centroids || []).length;\n if (!acc[id]) acc[id] = { id, label: v.label || id, createdAt: v.createdAt || 0, conditions: conds };\n else {\n acc[id].conditions = Math.max(acc[id].conditions, conds);\n if (v.label) acc[id].label = v.label;\n if (v.createdAt && (!acc[id].createdAt || v.createdAt < acc[id].createdAt)) acc[id].createdAt = v.createdAt;\n }\n }\n }\n return Object.keys(acc).map((k) => acc[k]).sort((a, b) => a.createdAt - b.createdAt);\n },\n\n /** Remove a voice across all phrases — revokes that person's WHO match (the WHAT phrase-prints,\n * which are shared/speaker-independent, are left in voiceprintStore). */\n removeVoice(voiceId, namespace) {\n const all = loadAll(namespace);\n let changed = false;\n for (const phrase in all) {\n const entry = normPhrase(all[phrase]);\n if (entry.voices[voiceId]) { delete entry.voices[voiceId]; all[phrase] = entry; changed = true; }\n }\n if (changed) saveAll(all, namespace);\n },\n\n /** Rename a voice across all phrases. */\n renameVoice(voiceId, label, namespace) {\n const all = loadAll(namespace);\n let changed = false;\n for (const phrase in all) {\n const entry = normPhrase(all[phrase]);\n if (entry.voices[voiceId]) { entry.voices[voiceId].label = label; all[phrase] = entry; changed = true; }\n }\n if (changed) saveAll(all, namespace);\n },\n\n // hasEnrollment(phrase) -> is that phrase enrolled; hasEnrollment() -> is anything enrolled.\n hasEnrollment: (phrase, namespace) => phrase ? allCentroids(phrase, namespace).length > 0 : Object.keys(loadAll(namespace)).some((p) => allCentroids(p, namespace).length > 0),\n enrolledPhrases: (namespace) => Object.keys(loadAll(namespace)),\n clearEnrollment: (namespace) => {\n const storageKey = voiceprintStorageKey(BASE_STORAGE_KEY, namespace);\n stores.set(storageKey, {});\n void clearVoiceprints(storageKey);\n },\n };\n\n async function init() {\n // Save the existing Emscripten global so we can restore it — don't permanently clobber window.Module\n // for any other emscripten bundle the host loads.\n const prevModule = window.Module;\n try {\n // locateFile: the page is at \"/\" but the glue + .wasm/.data live in SV_DIR, so\n // tell emscripten exactly where to fetch them (otherwise it 404s and init hangs).\n window.Module = { locateFile: (path) => SV_DIR + \"/\" + path };\n const onRuntime = new Promise((res) => { window.Module.onRuntimeInitialized = res; });\n // order matters: config-marshaling helper, then the glue (which fires onRuntimeInitialized)\n await loadScript(SV_DIR + \"/sherpa-onnx-speaker-diarization.js\");\n await loadScript(SV_DIR + \"/sherpa-onnx-wasm-main-speaker-diarization.js\");\n await onRuntime;\n Module = window.Module;\n window.Module = prevModule; // restore the global; we keep our own ref in `Module`\n const cfg = initSherpaOnnxSpeakerEmbeddingExtractorConfig(\n { model: MODEL, numThreads: 1, debug: 0, provider: \"cpu\" }, Module);\n handle = Module._SherpaOnnxCreateSpeakerEmbeddingExtractor(cfg.ptr);\n Module._free(cfg.buffer); Module._free(cfg.ptr);\n if (!handle) throw new Error(\"CreateSpeakerEmbeddingExtractor returned null\");\n dim = Module._SherpaOnnxSpeakerEmbeddingExtractorDim(handle);\n console.log(\"[SpeakerVerify] ready — embedding dim\", dim);\n // Load the AS-norm cohort (other-voice embeddings, same model). Optional — gate works without it.\n try {\n const r = await fetch(SV_DIR + \"/sv-cohort.json\");\n if (r.ok) { cohort = (await r.json()).map((v) => Float32Array.from(v)); console.log(\"[SpeakerVerify] AS-norm cohort:\", cohort.length); }\n } catch (e) { console.warn(\"[SpeakerVerify] cohort load failed (AS-norm off):\", e); }\n await hydrateStore(); // preserve the existing unscoped API by default\n readyResolve(SpeakerVerify);\n } catch (e) {\n window.Module = prevModule; // restore the global even on failure\n console.error(\"[SpeakerVerify] init failed:\", e);\n readyReject(e);\n }\n }\n\n window.SpeakerVerify = SpeakerVerify;\n if (document.readyState === \"loading\") document.addEventListener(\"DOMContentLoaded\", init);\n else init();\n})();\n"]}
|