@vuer-ai/vuer-uikit 0.0.101 → 0.0.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/SyncScroll/SyncScroll.cjs +4 -4
- package/dist/SyncScroll/SyncScroll.mjs +4 -4
- package/dist/SyncScroll/index.cjs +4 -4
- package/dist/SyncScroll/index.mjs +4 -4
- package/dist/auth/context/auth-context.cjs +10 -0
- package/dist/auth/context/auth-context.d.cts +15 -0
- package/dist/auth/context/auth-context.d.ts +15 -0
- package/dist/auth/context/auth-context.mjs +1 -0
- package/dist/auth/handler/create-client.cjs +12 -0
- package/dist/auth/handler/create-client.d.cts +7 -0
- package/dist/auth/handler/create-client.d.ts +7 -0
- package/dist/auth/handler/create-client.mjs +3 -0
- package/dist/auth/handler/sign-in-handler.cjs +11 -0
- package/dist/auth/handler/sign-in-handler.d.cts +7 -0
- package/dist/auth/handler/sign-in-handler.d.ts +7 -0
- package/dist/auth/handler/sign-in-handler.mjs +2 -0
- package/dist/auth/hooks/use-vuer-auth.cjs +11 -0
- package/dist/auth/hooks/use-vuer-auth.d.cts +9 -0
- package/dist/auth/hooks/use-vuer-auth.d.ts +9 -0
- package/dist/auth/hooks/use-vuer-auth.mjs +2 -0
- package/dist/auth/hooks/use-vuer-method.cjs +14 -0
- package/dist/auth/hooks/use-vuer-method.d.cts +11 -0
- package/dist/auth/hooks/use-vuer-method.d.ts +11 -0
- package/dist/auth/hooks/use-vuer-method.mjs +5 -0
- package/dist/auth/index.cjs +33 -0
- package/dist/auth/index.d.cts +10 -0
- package/dist/auth/index.d.ts +10 -0
- package/dist/auth/index.mjs +8 -0
- package/dist/auth/localstorage-key.cjs +14 -0
- package/dist/auth/localstorage-key.d.cts +4 -0
- package/dist/auth/localstorage-key.d.ts +4 -0
- package/dist/auth/localstorage-key.mjs +1 -0
- package/dist/auth/types.cjs +14 -0
- package/dist/auth/types.d.cts +3481 -0
- package/dist/auth/types.d.ts +3481 -0
- package/dist/auth/types.mjs +1 -0
- package/dist/auth/vuer-auth-provider.cjs +14 -0
- package/dist/auth/vuer-auth-provider.d.cts +9 -0
- package/dist/auth/vuer-auth-provider.d.ts +9 -0
- package/dist/auth/vuer-auth-provider.mjs +5 -0
- package/dist/{chunk-OJUK6WJ5.mjs → chunk-24IUD6Q3.mjs} +1 -1
- package/dist/{chunk-BMJX3SEO.cjs → chunk-2EG65KGO.cjs} +2 -2
- package/dist/{chunk-MDR7WUX6.cjs → chunk-2JV7MJIF.cjs} +10 -11
- package/dist/{chunk-LPA6WYFD.cjs → chunk-2WD4ZL27.cjs} +4 -4
- package/dist/chunk-3IVDCAFM.mjs +10 -0
- package/dist/{chunk-U7XH7M5B.mjs → chunk-3NSSQHRK.mjs} +7 -8
- package/dist/{chunk-OWEYAVGT.mjs → chunk-3OMGBQ7I.mjs} +8 -5
- package/dist/chunk-3PDV3ZKD.cjs +26 -0
- package/dist/{chunk-ZZLF2YWP.mjs → chunk-3TUONMQ6.mjs} +1 -1
- package/dist/{chunk-TPPM276W.mjs → chunk-3VVQWVDE.mjs} +1 -1
- package/dist/{chunk-JA6XS5KY.cjs → chunk-3XTBLV6T.cjs} +3 -3
- package/dist/chunk-4B44SRRP.cjs +12 -0
- package/dist/{chunk-NT5ZTF56.mjs → chunk-4JGGLCXT.mjs} +1 -1
- package/dist/{chunk-KMCZXNKA.mjs → chunk-4THQPG6Y.mjs} +1 -1
- package/dist/{chunk-PQEAXTVY.mjs → chunk-5KJP6A6C.mjs} +12 -26
- package/dist/chunk-5XBMFADS.cjs +42 -0
- package/dist/{chunk-HKJCPZZG.cjs → chunk-64L2SNKA.cjs} +2 -2
- package/dist/chunk-6BD5MQ5R.cjs +8 -0
- package/dist/chunk-6DYF6WO6.mjs +24 -0
- package/dist/{chunk-2FGRTFK4.mjs → chunk-6XOTWZFC.mjs} +2 -2
- package/dist/{chunk-AAWWWYRN.cjs → chunk-7GJVMFKJ.cjs} +4 -4
- package/dist/{chunk-C4E2MFZB.mjs → chunk-7HOEFGEO.mjs} +1 -1
- package/dist/chunk-7KQXX7QB.mjs +54 -0
- package/dist/{chunk-AJYO5W6O.mjs → chunk-7P563TWH.mjs} +4 -4
- package/dist/{chunk-BIUDC66P.mjs → chunk-7UO6NLB6.mjs} +9 -11
- package/dist/{chunk-OTR4SFDC.cjs → chunk-A2UZY7Y2.cjs} +2 -2
- package/dist/chunk-ACYOVCGH.mjs +30 -0
- package/dist/chunk-ACYZOKPT.mjs +64 -0
- package/dist/chunk-AJQEHMYV.cjs +47 -0
- package/dist/{chunk-7YMH34JL.cjs → chunk-AOV3ADTV.cjs} +2 -2
- package/dist/{chunk-A2PCEL5S.mjs → chunk-AYYX3TVN.mjs} +2 -2
- package/dist/{chunk-MEE3IHTT.mjs → chunk-BFNETXJK.mjs} +185 -22
- package/dist/{chunk-62VCQ2SU.cjs → chunk-BSOJYJ4D.cjs} +1 -1
- package/dist/{chunk-QUFZWF4E.cjs → chunk-C7WHIFJZ.cjs} +4 -4
- package/dist/chunk-CFOMX6SF.mjs +328 -0
- package/dist/{chunk-CZ2YNM7Y.mjs → chunk-CGUQWS2I.mjs} +1 -1
- package/dist/chunk-CHYXRETV.cjs +23 -0
- package/dist/{chunk-INHZ5D7P.mjs → chunk-CZ4GQOXG.mjs} +1 -6
- package/dist/{chunk-CUOGY4FW.mjs → chunk-D4DKSGER.mjs} +1 -1
- package/dist/{chunk-MUQYO2G3.cjs → chunk-D5WOPTKY.cjs} +2 -2
- package/dist/{chunk-D3IW2NW6.mjs → chunk-E2EMVLII.mjs} +1 -1
- package/dist/{chunk-CWAVHHJA.cjs → chunk-EAXBNWXE.cjs} +2 -2
- package/dist/{chunk-73VF2W3D.mjs → chunk-EI5ZOFWX.mjs} +1 -1
- package/dist/{chunk-MIGXY5PR.mjs → chunk-EXQQRW7T.mjs} +1 -1
- package/dist/{chunk-7LLDKYND.mjs → chunk-FK6ZROZE.mjs} +31 -29
- package/dist/chunk-G6U2K2GR.cjs +32 -0
- package/dist/{chunk-DREOOKO2.cjs → chunk-GOGJVFRN.cjs} +4 -4
- package/dist/{chunk-W3J4QTKS.cjs → chunk-H6MFBIRB.cjs} +7 -7
- package/dist/{chunk-NSQOQD43.cjs → chunk-HBIZQDDS.cjs} +1 -6
- package/dist/{chunk-7RIGSS5X.cjs → chunk-HN3AMWUM.cjs} +2 -2
- package/dist/chunk-HPK4YEVK.cjs +27 -0
- package/dist/{chunk-EC4HJUX6.cjs → chunk-IQ5MDNCR.cjs} +4 -4
- package/dist/chunk-IXNXSECD.mjs +45 -0
- package/dist/chunk-IY36FZ5R.mjs +40 -0
- package/dist/{chunk-FFCQKAQA.cjs → chunk-JFIAWTRH.cjs} +2 -2
- package/dist/{chunk-AEVZSYGJ.cjs → chunk-JFJRNNPQ.cjs} +2 -2
- package/dist/{chunk-G7FYBSFO.cjs → chunk-JMFTHHHE.cjs} +5 -5
- package/dist/{chunk-7R2ZBAE6.mjs → chunk-JUSFLIU5.mjs} +1 -1
- package/dist/chunk-JYIVDUDL.cjs +66 -0
- package/dist/{chunk-NTGUD2JN.mjs → chunk-KBC7VNER.mjs} +1 -1
- package/dist/{chunk-JM6NBUDT.cjs → chunk-KR7VBV3B.cjs} +31 -30
- package/dist/{chunk-VTEWRMGQ.mjs → chunk-KRNKB4FM.mjs} +3 -3
- package/dist/{chunk-3UEVUYFQ.cjs → chunk-LQGXG373.cjs} +4 -6
- package/dist/{chunk-4XUJBMDE.mjs → chunk-LRSDE62T.mjs} +4 -6
- package/dist/chunk-LSKJOUAE.cjs +56 -0
- package/dist/{chunk-NO35POZW.mjs → chunk-MHJM7YMG.mjs} +4 -33
- package/dist/{chunk-ZAP4EHBO.cjs → chunk-MIT3YWUC.cjs} +2 -2
- package/dist/{chunk-GDUVAZDW.cjs → chunk-NSUFTZNC.cjs} +2 -2
- package/dist/{chunk-V2IP7UUV.mjs → chunk-PIC2EJWA.mjs} +2 -2
- package/dist/chunk-PKSIXQJX.mjs +20 -0
- package/dist/{chunk-YUHHUSIO.cjs → chunk-PTCDBU72.cjs} +2 -2
- package/dist/{chunk-SQQXY4AY.mjs → chunk-PTGMHZFS.mjs} +1 -1
- package/dist/chunk-PZMA33PL.mjs +25 -0
- package/dist/{chunk-GWIACOMY.cjs → chunk-Q2HC5ZL4.cjs} +3 -38
- package/dist/{chunk-OYNLQTHW.cjs → chunk-RGV3EB3K.cjs} +11 -13
- package/dist/{chunk-LG3PNH2P.mjs → chunk-RIJUPORK.mjs} +1 -1
- package/dist/{chunk-QBFOBDBC.cjs → chunk-RZILHP75.cjs} +2 -2
- package/dist/{chunk-UCRLH44Q.cjs → chunk-SPRBKXGP.cjs} +2 -2
- package/dist/{chunk-PIXIN3IG.mjs → chunk-SYX6TMCQ.mjs} +1 -1
- package/dist/chunk-TC3W4VRO.mjs +6 -0
- package/dist/{chunk-L26ULDYM.mjs → chunk-THMYDDZF.mjs} +1 -1
- package/dist/{chunk-VO3C6RE2.mjs → chunk-UA3OTLX4.mjs} +2 -2
- package/dist/{chunk-6CM4GYJU.mjs → chunk-VEWWUO2N.mjs} +1 -1
- package/dist/{chunk-76V4RD4V.cjs → chunk-VLOFKTSL.cjs} +3 -3
- package/dist/{chunk-6J7ZVRSY.mjs → chunk-VUMOJPEC.mjs} +1 -1
- package/dist/chunk-WGVKFNG6.mjs +5 -0
- package/dist/{chunk-JD4J3RDN.cjs → chunk-WHV4VATL.cjs} +12 -26
- package/dist/{chunk-55RSKLJ5.cjs → chunk-XG56MLQH.cjs} +4 -4
- package/dist/{chunk-TZC4ST5T.cjs → chunk-XOIIYO5J.cjs} +20 -335
- package/dist/{chunk-M5UZ3SBY.cjs → chunk-Z6KE4XDB.cjs} +214 -47
- package/dist/{chunk-AIYM5PFP.cjs → chunk-ZFIEYXJO.cjs} +8 -4
- package/dist/{chunk-5TXABUNC.mjs → chunk-ZNM6PNI6.mjs} +1 -1
- package/dist/{chunk-EQIEKFCA.cjs → chunk-ZRRCYQ53.cjs} +3 -3
- package/dist/chunk-ZULCZ5L6.cjs +8 -0
- package/dist/dial/DialPanel.cjs +67 -66
- package/dist/dial/DialPanel.mjs +66 -65
- package/dist/dial/index.cjs +83 -82
- package/dist/dial/index.mjs +66 -65
- package/dist/dial/wrapped-inputs/ControlledInputs.cjs +74 -69
- package/dist/dial/wrapped-inputs/ControlledInputs.d.cts +2 -1
- package/dist/dial/wrapped-inputs/ControlledInputs.d.ts +2 -1
- package/dist/dial/wrapped-inputs/ControlledInputs.mjs +66 -65
- package/dist/dial/wrapped-inputs/DialInputs.cjs +86 -77
- package/dist/dial/wrapped-inputs/DialInputs.d.cts +3 -1
- package/dist/dial/wrapped-inputs/DialInputs.d.ts +3 -1
- package/dist/dial/wrapped-inputs/DialInputs.mjs +66 -65
- package/dist/dial/wrapped-inputs/DialPresetsInput.cjs +124 -0
- package/dist/dial/wrapped-inputs/DialPresetsInput.d.cts +16 -0
- package/dist/dial/wrapped-inputs/DialPresetsInput.d.ts +16 -0
- package/dist/dial/wrapped-inputs/DialPresetsInput.mjs +115 -0
- package/dist/dial/wrapped-inputs/DialVectorInput.cjs +67 -66
- package/dist/dial/wrapped-inputs/DialVectorInput.mjs +66 -65
- package/dist/dial/wrapped-inputs/index.cjs +99 -82
- package/dist/dial/wrapped-inputs/index.d.cts +3 -2
- package/dist/dial/wrapped-inputs/index.d.ts +3 -2
- package/dist/dial/wrapped-inputs/index.mjs +66 -65
- package/dist/highlight-cursor/enhanced-components.cjs +12 -12
- package/dist/highlight-cursor/enhanced-components.mjs +7 -7
- package/dist/highlight-cursor/index.cjs +12 -12
- package/dist/highlight-cursor/index.mjs +7 -7
- package/dist/hooks/index.cjs +21 -21
- package/dist/hooks/index.mjs +4 -4
- package/dist/hooks/useQueryParams.cjs +3 -3
- package/dist/hooks/useQueryParams.mjs +2 -2
- package/dist/index.cjs +404 -423
- package/dist/index.css +13 -13
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.mjs +66 -65
- package/dist/ui/DialBadge.cjs +12 -8
- package/dist/ui/DialBadge.d.cts +11 -6
- package/dist/ui/DialBadge.d.ts +11 -6
- package/dist/ui/DialBadge.mjs +5 -5
- package/dist/ui/UIKitBadge.cjs +9 -9
- package/dist/ui/UIKitBadge.mjs +5 -5
- package/dist/ui/avatar.cjs +9 -33
- package/dist/ui/avatar.d.cts +4 -61
- package/dist/ui/avatar.d.ts +4 -61
- package/dist/ui/avatar.mjs +5 -5
- package/dist/ui/badge.cjs +4 -4
- package/dist/ui/badge.mjs +4 -4
- package/dist/ui/button.cjs +7 -7
- package/dist/ui/button.mjs +5 -5
- package/dist/ui/card.cjs +12 -12
- package/dist/ui/card.mjs +5 -5
- package/dist/ui/checkbox.cjs +4 -4
- package/dist/ui/checkbox.mjs +4 -4
- package/dist/ui/collapsible.cjs +4 -4
- package/dist/ui/collapsible.mjs +4 -4
- package/dist/ui/drawer.cjs +4 -4
- package/dist/ui/drawer.mjs +4 -4
- package/dist/ui/dropdown.cjs +20 -20
- package/dist/ui/dropdown.d.cts +18 -27
- package/dist/ui/dropdown.d.ts +18 -27
- package/dist/ui/dropdown.mjs +5 -5
- package/dist/ui/index.cjs +354 -373
- package/dist/ui/index.d.cts +4 -3
- package/dist/ui/index.d.ts +4 -3
- package/dist/ui/index.mjs +63 -62
- package/dist/ui/inputs/color-input.cjs +7 -7
- package/dist/ui/inputs/color-input.mjs +6 -6
- package/dist/ui/inputs/index.cjs +62 -57
- package/dist/ui/inputs/index.d.cts +1 -0
- package/dist/ui/inputs/index.d.ts +1 -0
- package/dist/ui/inputs/index.mjs +25 -24
- package/dist/ui/inputs/input-numbers.cjs +7 -7
- package/dist/ui/inputs/input-numbers.mjs +6 -6
- package/dist/ui/inputs/input.cjs +8 -8
- package/dist/ui/inputs/input.mjs +5 -5
- package/dist/ui/inputs/number-inputs/CmInput.cjs +8 -8
- package/dist/ui/inputs/number-inputs/CmInput.mjs +7 -7
- package/dist/ui/inputs/number-inputs/DegInput.cjs +8 -8
- package/dist/ui/inputs/number-inputs/DegInput.mjs +7 -7
- package/dist/ui/inputs/number-inputs/EulerDegInput.cjs +10 -10
- package/dist/ui/inputs/number-inputs/EulerDegInput.mjs +9 -9
- package/dist/ui/inputs/number-inputs/EulerInput.cjs +9 -9
- package/dist/ui/inputs/number-inputs/EulerInput.mjs +8 -8
- package/dist/ui/inputs/number-inputs/EulerRadInput.cjs +9 -10
- package/dist/ui/inputs/number-inputs/EulerRadInput.d.cts +6 -3
- package/dist/ui/inputs/number-inputs/EulerRadInput.d.ts +6 -3
- package/dist/ui/inputs/number-inputs/EulerRadInput.mjs +8 -9
- package/dist/ui/inputs/number-inputs/InchInput.cjs +8 -8
- package/dist/ui/inputs/number-inputs/InchInput.mjs +7 -7
- package/dist/ui/inputs/number-inputs/IntInput.cjs +8 -8
- package/dist/ui/inputs/number-inputs/IntInput.mjs +7 -7
- package/dist/ui/inputs/number-inputs/KVectorInput.cjs +9 -9
- package/dist/ui/inputs/number-inputs/KVectorInput.mjs +8 -8
- package/dist/ui/inputs/number-inputs/QuaternionInput.cjs +9 -9
- package/dist/ui/inputs/number-inputs/QuaternionInput.mjs +8 -8
- package/dist/ui/inputs/number-inputs/RadInput.cjs +8 -8
- package/dist/ui/inputs/number-inputs/RadInput.d.cts +1 -0
- package/dist/ui/inputs/number-inputs/RadInput.d.ts +1 -0
- package/dist/ui/inputs/number-inputs/RadInput.mjs +7 -7
- package/dist/ui/inputs/number-inputs/TimeInput.cjs +8 -8
- package/dist/ui/inputs/number-inputs/TimeInput.mjs +7 -7
- package/dist/ui/inputs/number-inputs/Vec3Input.cjs +9 -9
- package/dist/ui/inputs/number-inputs/Vec3Input.mjs +8 -8
- package/dist/ui/inputs/number-inputs/VectorInput.cjs +8 -8
- package/dist/ui/inputs/number-inputs/VectorInput.mjs +7 -7
- package/dist/ui/inputs/number-inputs/index.cjs +42 -42
- package/dist/ui/inputs/number-inputs/index.mjs +19 -19
- package/dist/ui/inputs/presets-input.cjs +9 -9
- package/dist/ui/inputs/presets-input.mjs +8 -8
- package/dist/ui/inputs/presets-rad-input.cjs +24 -0
- package/dist/ui/inputs/presets-rad-input.d.cts +17 -0
- package/dist/ui/inputs/presets-rad-input.d.ts +17 -0
- package/dist/ui/inputs/presets-rad-input.mjs +15 -0
- package/dist/ui/inputs/text-input.cjs +7 -7
- package/dist/ui/inputs/text-input.mjs +6 -6
- package/dist/ui/label.cjs +4 -4
- package/dist/ui/label.mjs +4 -4
- package/dist/ui/layout.cjs +4 -4
- package/dist/ui/layout.mjs +4 -4
- package/dist/ui/layouts/dock-layout/DockLayoutView.cjs +4 -4
- package/dist/ui/layouts/dock-layout/DockLayoutView.mjs +4 -4
- package/dist/ui/layouts/dock-layout/LayoutSlots.cjs +4 -4
- package/dist/ui/layouts/dock-layout/LayoutSlots.mjs +4 -4
- package/dist/ui/layouts/dock-layout/index.cjs +4 -4
- package/dist/ui/layouts/dock-layout/index.mjs +4 -4
- package/dist/ui/layouts/index.cjs +8 -8
- package/dist/ui/layouts/index.mjs +7 -7
- package/dist/ui/layouts/liquid-layout/LayoutSlots.cjs +11 -11
- package/dist/ui/layouts/liquid-layout/LayoutSlots.mjs +5 -5
- package/dist/ui/layouts/liquid-layout/LiquidLayoutView.cjs +7 -7
- package/dist/ui/layouts/liquid-layout/LiquidLayoutView.mjs +6 -6
- package/dist/ui/layouts/liquid-layout/index.cjs +7 -7
- package/dist/ui/layouts/liquid-layout/index.mjs +6 -6
- package/dist/ui/modal.cjs +4 -4
- package/dist/ui/modal.mjs +4 -4
- package/dist/ui/navigation.cjs +7 -7
- package/dist/ui/navigation.mjs +6 -6
- package/dist/ui/pagination.cjs +13 -13
- package/dist/ui/pagination.mjs +6 -6
- package/dist/ui/panel.cjs +4 -4
- package/dist/ui/panel.mjs +4 -4
- package/dist/ui/popover.cjs +4 -4
- package/dist/ui/popover.mjs +4 -4
- package/dist/ui/radio-group.cjs +4 -4
- package/dist/ui/radio-group.mjs +4 -4
- package/dist/ui/resizable.cjs +4 -4
- package/dist/ui/resizable.mjs +4 -4
- package/dist/ui/select.cjs +4 -4
- package/dist/ui/select.mjs +4 -4
- package/dist/ui/separator.cjs +4 -4
- package/dist/ui/separator.mjs +4 -4
- package/dist/ui/sheet.cjs +4 -4
- package/dist/ui/sheet.mjs +4 -4
- package/dist/ui/sidebar.cjs +32 -32
- package/dist/ui/sidebar.mjs +8 -8
- package/dist/ui/simple-tree-view.cjs +4 -4
- package/dist/ui/simple-tree-view.mjs +4 -4
- package/dist/ui/skeleton.cjs +4 -4
- package/dist/ui/skeleton.mjs +4 -4
- package/dist/ui/slider.cjs +4 -4
- package/dist/ui/slider.mjs +4 -4
- package/dist/ui/switch.cjs +4 -4
- package/dist/ui/switch.mjs +4 -4
- package/dist/ui/table.cjs +4 -4
- package/dist/ui/table.mjs +4 -4
- package/dist/ui/tabs.cjs +4 -4
- package/dist/ui/tabs.mjs +4 -4
- package/dist/ui/textarea.cjs +4 -4
- package/dist/ui/textarea.mjs +4 -4
- package/dist/ui/theme/ThemeProvider.cjs +16 -20
- package/dist/ui/theme/ThemeProvider.d.cts +3 -10
- package/dist/ui/theme/ThemeProvider.d.ts +3 -10
- package/dist/ui/theme/ThemeProvider.mjs +2 -2
- package/dist/ui/theme/ThemeToggles.cjs +11 -11
- package/dist/ui/theme/ThemeToggles.mjs +8 -8
- package/dist/ui/theme/index.cjs +16 -20
- package/dist/ui/theme/index.d.cts +1 -1
- package/dist/ui/theme/index.d.ts +1 -1
- package/dist/ui/theme/index.mjs +8 -8
- package/dist/ui/theme/themeScript.cjs +2 -2
- package/dist/ui/theme/themeScript.d.cts +1 -2
- package/dist/ui/theme/themeScript.d.ts +1 -2
- package/dist/ui/theme/themeScript.mjs +1 -1
- package/dist/ui/toggle-buttons.cjs +4 -4
- package/dist/ui/toggle-buttons.mjs +4 -4
- package/dist/ui/toggle-group.cjs +4 -4
- package/dist/ui/toggle-group.mjs +4 -4
- package/dist/ui/toggle.cjs +4 -4
- package/dist/ui/toggle.mjs +4 -4
- package/dist/ui/toolbar.cjs +8 -8
- package/dist/ui/toolbar.mjs +5 -5
- package/dist/ui/tooltip.cjs +4 -4
- package/dist/ui/tooltip.mjs +4 -4
- package/dist/ui/tree-view/TreeSearchBar.cjs +7 -7
- package/dist/ui/tree-view/TreeSearchBar.mjs +6 -6
- package/dist/ui/tree-view/TreeView.cjs +4 -4
- package/dist/ui/tree-view/TreeView.mjs +4 -4
- package/dist/ui/tree-view/index.cjs +8 -8
- package/dist/ui/tree-view/index.mjs +7 -7
- package/dist/ui/tree-view-legacy.cjs +10 -10
- package/dist/ui/tree-view-legacy.mjs +6 -6
- package/dist/ui/waterfall/CursorOverlay.cjs +4 -4
- package/dist/ui/waterfall/CursorOverlay.mjs +4 -4
- package/dist/ui/waterfall/TimelineEvent.cjs +4 -4
- package/dist/ui/waterfall/TimelineEvent.mjs +4 -4
- package/dist/ui/waterfall/TimelineProcessBar.cjs +4 -4
- package/dist/ui/waterfall/TimelineProcessBar.mjs +4 -4
- package/dist/ui/waterfall/Wedges.cjs +4 -4
- package/dist/ui/waterfall/Wedges.mjs +4 -4
- package/dist/ui/waterfall/index.cjs +12 -12
- package/dist/ui/waterfall/index.mjs +11 -11
- package/package.json +7 -1
- package/src/auth/context/auth-context.ts +16 -0
- package/src/auth/handler/create-client.ts +23 -0
- package/src/auth/handler/sign-in-handler.ts +66 -0
- package/src/auth/hooks/use-vuer-auth.ts +10 -0
- package/src/auth/hooks/use-vuer-method.ts +35 -0
- package/src/auth/index.ts +6 -0
- package/src/auth/localstorage-key.ts +3 -0
- package/src/auth/types.ts +56 -0
- package/src/auth/vuer-auth-provider.tsx +35 -0
- package/src/dial/DialPanel.tsx +46 -3
- package/src/dial/wrapped-inputs/ControlledInputs.tsx +17 -0
- package/src/dial/wrapped-inputs/DialInputs.tsx +77 -0
- package/src/dial/wrapped-inputs/DialPresetsInput.tsx +79 -0
- package/src/dial/wrapped-inputs/index.ts +6 -0
- package/src/ui/DialBadge.tsx +18 -7
- package/src/ui/avatar.tsx +4 -85
- package/src/ui/button.tsx +0 -5
- package/src/ui/card.tsx +1 -1
- package/src/ui/dropdown.tsx +21 -366
- package/src/ui/inputs/index.tsx +1 -0
- package/src/ui/inputs/input.tsx +3 -5
- package/src/ui/inputs/number-inputs/EulerRadInput.tsx +46 -5
- package/src/ui/inputs/number-inputs/RadInput.tsx +31 -5
- package/src/ui/inputs/presets-rad-input.tsx +77 -0
- package/src/ui/layouts/liquid-layout/LayoutSlots.tsx +2 -2
- package/src/ui/sidebar.tsx +7 -8
- package/src/ui/theme/ThemeProvider.tsx +69 -52
- package/src/ui/theme/ThemeToggles.tsx +12 -12
- package/src/ui/theme/index.ts +6 -16
- package/src/ui/theme/themeScript.tsx +24 -50
- package/src/ui/toolbar.tsx +3 -3
- package/dist/chunk-DVKONMS7.cjs +0 -20
- package/dist/chunk-GPV4XELL.mjs +0 -18
- package/dist/chunk-H2GERFBG.cjs +0 -13
- package/dist/chunk-H4IDSUG5.mjs +0 -643
- package/dist/chunk-TY47DFGO.mjs +0 -11
- package/dist/{chunk-ADYUCJMQ.mjs → chunk-2KQRWXNO.mjs} +0 -0
- package/dist/{chunk-SQRAUVEP.cjs → chunk-63OJOP6W.cjs} +0 -0
- package/dist/{chunk-LYZJNEOR.cjs → chunk-Q4XH2Z5M.cjs} +1 -1
- package/dist/{chunk-OEIF3JCH.mjs → chunk-U3LN5NB6.mjs} +1 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { forwardRef, useState } from "react";
|
|
2
|
+
|
|
3
|
+
import { Button } from "../button";
|
|
4
|
+
import { RadInput, RadInputProps } from "./number-inputs/RadInput";
|
|
5
|
+
import { cn } from "../../hooks";
|
|
6
|
+
|
|
7
|
+
interface PresetsRadInputProps extends Omit<RadInputProps, "value" | "onChange"> {
|
|
8
|
+
presets: [number, number, number];
|
|
9
|
+
value?: number;
|
|
10
|
+
onChange?: (value: number) => void;
|
|
11
|
+
display?: "deg" | "pi" | "rad";
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const PresetsRadInput = forwardRef<HTMLDivElement, PresetsRadInputProps>(
|
|
16
|
+
function PresetsRadInput({ presets, value = 0, onChange, display = "rad", size, className, ...props }, ref) {
|
|
17
|
+
const [preset, setPreset] = useState(value);
|
|
18
|
+
|
|
19
|
+
const handleValueChange = (newValue: number) => {
|
|
20
|
+
setPreset(newValue);
|
|
21
|
+
onChange?.(newValue);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const handlePresetClick = (presetValue: number) => {
|
|
25
|
+
setPreset(presetValue);
|
|
26
|
+
onChange?.(presetValue);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const getDisplayValue = (radValue: number) => {
|
|
30
|
+
if (display === "deg") {
|
|
31
|
+
return (radValue * 180) / Math.PI;
|
|
32
|
+
} else if (display === "pi") {
|
|
33
|
+
return radValue / Math.PI;
|
|
34
|
+
}
|
|
35
|
+
return radValue;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const formatDisplayValue = (radValue: number) => {
|
|
39
|
+
const displayValue = getDisplayValue(radValue);
|
|
40
|
+
if (display === "pi") {
|
|
41
|
+
return `${displayValue.toFixed(2)}π`;
|
|
42
|
+
} else if (display === "deg") {
|
|
43
|
+
return `${displayValue.toFixed(0)}°`;
|
|
44
|
+
}
|
|
45
|
+
return displayValue.toFixed(2);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<div className={cn("gap-xs grid grid-cols-5", className)}>
|
|
50
|
+
<div className="col-span-full">
|
|
51
|
+
<RadInput
|
|
52
|
+
{...props}
|
|
53
|
+
ref={ref}
|
|
54
|
+
size={size}
|
|
55
|
+
value={preset}
|
|
56
|
+
onChange={handleValueChange}
|
|
57
|
+
display={display}
|
|
58
|
+
/>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
{presets.map((p: number, i: number) => {
|
|
62
|
+
return (
|
|
63
|
+
<Button
|
|
64
|
+
key={i}
|
|
65
|
+
size={size}
|
|
66
|
+
variant="secondary"
|
|
67
|
+
className="h-6"
|
|
68
|
+
onClick={() => handlePresetClick(p)}
|
|
69
|
+
>
|
|
70
|
+
{formatDisplayValue(p)}
|
|
71
|
+
</Button>
|
|
72
|
+
);
|
|
73
|
+
})}
|
|
74
|
+
</div>
|
|
75
|
+
);
|
|
76
|
+
},
|
|
77
|
+
);
|
|
@@ -28,7 +28,7 @@ export function LiquidLayoutLeft({ className, ...props }: Readonly<ComponentProp
|
|
|
28
28
|
<div
|
|
29
29
|
{...props}
|
|
30
30
|
className={cn(
|
|
31
|
-
"order-2 col-start-1 flex flex-col items-start gap-4 [&>*]:pointer-events-auto",
|
|
31
|
+
"order-2 col-start-1 flex flex-col items-start gap-4 overflow-y-auto [&>*]:pointer-events-auto",
|
|
32
32
|
className,
|
|
33
33
|
)}
|
|
34
34
|
/>
|
|
@@ -57,7 +57,7 @@ export function LiquidLayoutRight({
|
|
|
57
57
|
<Comp
|
|
58
58
|
{...props}
|
|
59
59
|
className={cn(
|
|
60
|
-
"order-4 col-start-3 flex flex-col items-end gap-4 [&>*]:pointer-events-auto",
|
|
60
|
+
"order-4 col-start-3 flex flex-col items-end gap-4 overflow-y-auto [&>*]:pointer-events-auto",
|
|
61
61
|
className,
|
|
62
62
|
)}
|
|
63
63
|
/>
|
package/src/ui/sidebar.tsx
CHANGED
|
@@ -316,7 +316,7 @@ function SidebarHeader({ className, ...props }: ComponentProps<"div">) {
|
|
|
316
316
|
<div
|
|
317
317
|
data-slot="sidebar-header"
|
|
318
318
|
data-sidebar="header"
|
|
319
|
-
className={cn("text-uk-lg leading-uk-lg px-md flex flex-col", className)}
|
|
319
|
+
className={cn("text-uk-lg leading-uk-lg px-md py-lg flex flex-col", className)}
|
|
320
320
|
{...props}
|
|
321
321
|
/>
|
|
322
322
|
);
|
|
@@ -327,7 +327,7 @@ function SidebarFooter({ className, ...props }: ComponentProps<"div">) {
|
|
|
327
327
|
<div
|
|
328
328
|
data-slot="sidebar-footer"
|
|
329
329
|
data-sidebar="footer"
|
|
330
|
-
className={cn("px-lg flex flex-col", className)}
|
|
330
|
+
className={cn("px-md py-lg flex flex-col", className)}
|
|
331
331
|
{...props}
|
|
332
332
|
/>
|
|
333
333
|
);
|
|
@@ -338,10 +338,7 @@ function SidebarSeparator({ className, ...props }: ComponentProps<typeof Separat
|
|
|
338
338
|
<Separator
|
|
339
339
|
data-slot="sidebar-separator"
|
|
340
340
|
data-sidebar="separator"
|
|
341
|
-
className={cn("bg-line-primary
|
|
342
|
-
style={{
|
|
343
|
-
width: "calc(100% + var(--spacing-lg) * 2)",
|
|
344
|
-
}}
|
|
341
|
+
className={cn("bg-line-primary", className)}
|
|
345
342
|
{...props}
|
|
346
343
|
/>
|
|
347
344
|
);
|
|
@@ -431,7 +428,7 @@ function SidebarMenu({ className, ...props }: ComponentProps<"ul">) {
|
|
|
431
428
|
<ul
|
|
432
429
|
data-slot="sidebar-menu"
|
|
433
430
|
data-sidebar="menu"
|
|
434
|
-
className={cn("gap-
|
|
431
|
+
className={cn("py-md gap-sm flex w-full min-w-0 flex-col", className)}
|
|
435
432
|
style={{
|
|
436
433
|
paddingLeft: "0px",
|
|
437
434
|
marginBottom: "0px",
|
|
@@ -656,10 +653,12 @@ function SidebarMenuSubButton({
|
|
|
656
653
|
data-size={size}
|
|
657
654
|
data-active={isActive}
|
|
658
655
|
className={cn(
|
|
659
|
-
"text-text-primary ring-sidebar-ring hover:bg-bg-secondary hover:text-text-primary active:bg-bg-tertiary active:text-text-highlight [&>svg]:text-icon-primary gap-md rounded-uk-md px-lg flex h-[32px] min-w-0 -translate-x-px items-center overflow-hidden outline-hidden
|
|
656
|
+
"text-text-primary ring-sidebar-ring hover:bg-bg-secondary hover:text-text-primary active:bg-bg-tertiary active:text-text-highlight [&>svg]:text-icon-primary gap-md rounded-uk-md px-lg flex h-[32px] min-w-0 -translate-x-px cursor-pointer items-center overflow-hidden outline-hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-[16px] [&>svg]:shrink-0",
|
|
660
657
|
size === "sm" && "text-uk-sm leading-uk-sm",
|
|
661
658
|
size === "md" && "text-uk-md leading-uk-md",
|
|
662
659
|
"group-data-[collapsible=icon]:hidden",
|
|
660
|
+
isActive &&
|
|
661
|
+
"bg-bg-tertiary text-text-highlight [&>svg]:text-icon-highlight hover:bg-bg-tertiary hover:text-text-highlight",
|
|
663
662
|
className,
|
|
664
663
|
)}
|
|
665
664
|
{...props}
|
|
@@ -9,7 +9,13 @@ import {
|
|
|
9
9
|
} from "react";
|
|
10
10
|
|
|
11
11
|
import { ThemeScript } from "./themeScript";
|
|
12
|
-
import type {
|
|
12
|
+
import type {
|
|
13
|
+
Attribute,
|
|
14
|
+
BaseTheme,
|
|
15
|
+
ComputedTheme,
|
|
16
|
+
ThemeProviderProps,
|
|
17
|
+
UseThemeProps,
|
|
18
|
+
} from "./types";
|
|
13
19
|
|
|
14
20
|
export const colorSchemes = ["light", "dark"] as const;
|
|
15
21
|
export const MEDIA = "(prefers-color-scheme: dark)";
|
|
@@ -37,47 +43,47 @@ export const getFromLS = (key: string, fallback: string): string => {
|
|
|
37
43
|
/**
|
|
38
44
|
* Calculate the actual theme name
|
|
39
45
|
*/
|
|
40
|
-
export const computeTheme = (
|
|
46
|
+
export const computeTheme = (
|
|
47
|
+
baseTheme: BaseTheme,
|
|
48
|
+
isLiquid: boolean,
|
|
49
|
+
systemIsDark: boolean,
|
|
50
|
+
): ComputedTheme => {
|
|
41
51
|
let resolvedBase: "light" | "dark";
|
|
42
|
-
|
|
52
|
+
|
|
43
53
|
if (baseTheme === "system") {
|
|
44
54
|
resolvedBase = systemIsDark ? "dark" : "light";
|
|
45
55
|
} else {
|
|
46
56
|
resolvedBase = baseTheme;
|
|
47
57
|
}
|
|
48
|
-
|
|
49
|
-
return isLiquid ? `liquid-${resolvedBase}` as ComputedTheme : resolvedBase;
|
|
50
|
-
};
|
|
51
58
|
|
|
52
|
-
|
|
53
|
-
* Parse old theme string to new state structure
|
|
54
|
-
*/
|
|
55
|
-
export const parseOldTheme = (oldTheme: string): { baseTheme: BaseTheme; isLiquid: boolean } => {
|
|
56
|
-
if (oldTheme === "system") {
|
|
57
|
-
return { baseTheme: "system", isLiquid: false };
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (oldTheme.startsWith("liquid-")) {
|
|
61
|
-
const base = oldTheme.replace("liquid-", "") as "light" | "dark";
|
|
62
|
-
return { baseTheme: base, isLiquid: true };
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return { baseTheme: oldTheme as BaseTheme, isLiquid: false };
|
|
59
|
+
return isLiquid ? (`liquid-${resolvedBase}` as ComputedTheme) : resolvedBase;
|
|
66
60
|
};
|
|
67
61
|
|
|
68
|
-
|
|
69
|
-
|
|
70
62
|
/**
|
|
71
|
-
* Hook to read and update theme state from `ThemeProvider`.
|
|
63
|
+
* Hook to read and update the theme state from `ThemeProvider`.
|
|
72
64
|
* Throws if used outside a provider.
|
|
73
65
|
*/
|
|
74
|
-
export
|
|
66
|
+
export function useTheme<T = UseThemeProps>(
|
|
67
|
+
selector?: (v: UseThemeProps) => T,
|
|
68
|
+
): T extends void ? UseThemeProps : T {
|
|
75
69
|
const context = useContext(ThemeContext);
|
|
76
70
|
|
|
77
71
|
if (context === undefined) throw new Error("useTheme must be used within a ThemeProvider");
|
|
78
72
|
|
|
79
|
-
return
|
|
80
|
-
|
|
73
|
+
return useMemo(
|
|
74
|
+
() => {
|
|
75
|
+
if (!selector) {
|
|
76
|
+
return context as any;
|
|
77
|
+
} else if (typeof selector === "function") {
|
|
78
|
+
return selector(context);
|
|
79
|
+
} else {
|
|
80
|
+
return context[selector] as any;
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
84
|
+
[context],
|
|
85
|
+
) as T extends void ? UseThemeProps : T;
|
|
86
|
+
}
|
|
81
87
|
|
|
82
88
|
/**
|
|
83
89
|
* Provides theme context and DOM attribute synchronization for theming.
|
|
@@ -112,7 +118,7 @@ export const Theme = ({
|
|
|
112
118
|
scriptProps,
|
|
113
119
|
}: PropsWithChildren<ThemeProviderProps>) => {
|
|
114
120
|
const themes = defaultThemes;
|
|
115
|
-
|
|
121
|
+
|
|
116
122
|
const initialState = useMemo(() => {
|
|
117
123
|
return { baseTheme: defaultBaseTheme!, isLiquid: defaultIsLiquid! };
|
|
118
124
|
}, [defaultBaseTheme, defaultIsLiquid]);
|
|
@@ -122,9 +128,11 @@ export const Theme = ({
|
|
|
122
128
|
if (!stored) {
|
|
123
129
|
return initialState.baseTheme;
|
|
124
130
|
}
|
|
125
|
-
return (
|
|
131
|
+
return (
|
|
132
|
+
["light", "dark", "system"].includes(stored) ? stored : initialState.baseTheme
|
|
133
|
+
) as BaseTheme;
|
|
126
134
|
});
|
|
127
|
-
|
|
135
|
+
|
|
128
136
|
const [isLiquid, setIsLiquidState] = useState<boolean>(() => {
|
|
129
137
|
const stored = getFromLS(`${storageKey}-liquid`, "");
|
|
130
138
|
if (!stored) {
|
|
@@ -142,15 +150,14 @@ export const Theme = ({
|
|
|
142
150
|
|
|
143
151
|
const attrs = !value ? themes : Object.values(value);
|
|
144
152
|
|
|
145
|
-
const computedTheme = useMemo(
|
|
146
|
-
computeTheme(baseTheme, isLiquid, systemIsDark),
|
|
147
|
-
[baseTheme, isLiquid, systemIsDark]
|
|
153
|
+
const computedTheme = useMemo(
|
|
154
|
+
() => computeTheme(baseTheme, isLiquid, systemIsDark),
|
|
155
|
+
[baseTheme, isLiquid, systemIsDark],
|
|
148
156
|
);
|
|
149
157
|
|
|
150
158
|
const resolvedTheme = useMemo((): ComputedTheme => {
|
|
151
159
|
if (forcedTheme) {
|
|
152
|
-
|
|
153
|
-
return computeTheme(parsed.baseTheme, parsed.isLiquid, systemIsDark);
|
|
160
|
+
return forcedTheme as ComputedTheme;
|
|
154
161
|
}
|
|
155
162
|
return computedTheme;
|
|
156
163
|
}, [forcedTheme, computedTheme, systemIsDark]);
|
|
@@ -190,26 +197,26 @@ export const Theme = ({
|
|
|
190
197
|
[attribute, attrs, disableTransitionOnChange, enableColorScheme, nonce, value],
|
|
191
198
|
);
|
|
192
199
|
|
|
193
|
-
const setBaseTheme = useCallback(
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
200
|
+
const setBaseTheme = useCallback(
|
|
201
|
+
(newBaseTheme: BaseTheme) => {
|
|
202
|
+
setBaseThemeState(newBaseTheme);
|
|
203
|
+
saveToLS(`${storageKey}-base`, newBaseTheme);
|
|
204
|
+
},
|
|
205
|
+
[storageKey],
|
|
206
|
+
);
|
|
197
207
|
|
|
198
208
|
const toggleLiquid = useCallback(() => {
|
|
199
|
-
setIsLiquidState(prev => {
|
|
209
|
+
setIsLiquidState((prev) => {
|
|
200
210
|
const newValue = !prev;
|
|
201
211
|
saveToLS(`${storageKey}-liquid`, String(newValue));
|
|
202
212
|
return newValue;
|
|
203
213
|
});
|
|
204
214
|
}, [storageKey]);
|
|
205
215
|
|
|
206
|
-
const handleMediaQuery = useCallback(
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
},
|
|
211
|
-
[],
|
|
212
|
-
);
|
|
216
|
+
const handleMediaQuery = useCallback((e: MediaQueryListEvent | MediaQueryList) => {
|
|
217
|
+
const isDark = e.matches;
|
|
218
|
+
setSystemIsDark(isDark);
|
|
219
|
+
}, []);
|
|
213
220
|
|
|
214
221
|
// Always listen to System preference
|
|
215
222
|
useEffect(() => {
|
|
@@ -249,13 +256,24 @@ export const Theme = ({
|
|
|
249
256
|
toggleLiquid,
|
|
250
257
|
computedTheme,
|
|
251
258
|
resolvedTheme,
|
|
252
|
-
systemTheme: (enableSystem ? (systemIsDark ? "dark" : "light") : undefined) as
|
|
259
|
+
systemTheme: (enableSystem ? (systemIsDark ? "dark" : "light") : undefined) as
|
|
260
|
+
| "light"
|
|
261
|
+
| "dark"
|
|
262
|
+
| undefined,
|
|
253
263
|
forcedTheme,
|
|
254
264
|
storageKey,
|
|
255
265
|
}),
|
|
256
266
|
[
|
|
257
|
-
baseTheme,
|
|
258
|
-
|
|
267
|
+
baseTheme,
|
|
268
|
+
setBaseTheme,
|
|
269
|
+
isLiquid,
|
|
270
|
+
toggleLiquid,
|
|
271
|
+
computedTheme,
|
|
272
|
+
resolvedTheme,
|
|
273
|
+
systemIsDark,
|
|
274
|
+
enableSystem,
|
|
275
|
+
forcedTheme,
|
|
276
|
+
storageKey,
|
|
259
277
|
],
|
|
260
278
|
);
|
|
261
279
|
|
|
@@ -268,9 +286,8 @@ export const Theme = ({
|
|
|
268
286
|
attribute,
|
|
269
287
|
enableSystem,
|
|
270
288
|
enableColorScheme,
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
: (initialState.isLiquid ? `liquid-${initialState.baseTheme}` : initialState.baseTheme),
|
|
289
|
+
defaultBaseTheme: initialState.baseTheme,
|
|
290
|
+
defaultIsLiquid: initialState.isLiquid,
|
|
274
291
|
value,
|
|
275
292
|
themes,
|
|
276
293
|
nonce,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// Liquid toggle component
|
|
2
|
-
import {
|
|
2
|
+
import { LayoutTemplate, Moon, PanelsTopLeft, Sun, SunMoon } from "lucide-react";
|
|
3
3
|
import React, { type ComponentProps } from "react";
|
|
4
4
|
|
|
5
5
|
import { Button } from "../button";
|
|
6
6
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../tooltip";
|
|
7
7
|
import { useTheme } from "./ThemeProvider";
|
|
8
|
-
import { cn
|
|
8
|
+
import { cn } from "../../hooks";
|
|
9
9
|
|
|
10
10
|
type LiquidToggleProps = Omit<ComponentProps<typeof Button>, "onClick" | "children">;
|
|
11
11
|
|
|
@@ -18,16 +18,16 @@ export const LiquidToggle: React.FC<LiquidToggleProps> = ({ className, ...props
|
|
|
18
18
|
<Button
|
|
19
19
|
icon
|
|
20
20
|
variant="ghost"
|
|
21
|
-
value={isLiquid}
|
|
21
|
+
// value={isLiquid}
|
|
22
22
|
aria-label={`Toggle liquid theme: ${isLiquid ? "on" : "off"}`}
|
|
23
23
|
{...props}
|
|
24
24
|
onClick={toggleLiquid}
|
|
25
25
|
className={className}
|
|
26
26
|
>
|
|
27
|
-
<
|
|
27
|
+
{isLiquid ? <PanelsTopLeft size={20} /> : <LayoutTemplate size={20} />}
|
|
28
28
|
</Button>
|
|
29
29
|
</TooltipTrigger>
|
|
30
|
-
<TooltipContent>
|
|
30
|
+
<TooltipContent>{isLiquid ? "Dock Menu Panels" : "Floating Menu Panels"}</TooltipContent>
|
|
31
31
|
</Tooltip>
|
|
32
32
|
);
|
|
33
33
|
};
|
|
@@ -48,7 +48,7 @@ export const ThemeColorToggle: React.FC<ThemeColorToggleProps> = (props) => {
|
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
const isDark = resolvedTheme
|
|
51
|
+
const isDark = resolvedTheme?.includes("dark");
|
|
52
52
|
const isSystem = baseTheme === "system";
|
|
53
53
|
|
|
54
54
|
return (
|
|
@@ -70,15 +70,15 @@ type ThemeTogglesProps = {
|
|
|
70
70
|
colorToggleProps?: Omit<ThemeColorToggleProps, "className">;
|
|
71
71
|
};
|
|
72
72
|
|
|
73
|
-
export const ThemeToggles: React.FC<ThemeTogglesProps> = ({
|
|
74
|
-
className,
|
|
75
|
-
liquidToggleProps = {},
|
|
76
|
-
colorToggleProps = {}
|
|
73
|
+
export const ThemeToggles: React.FC<ThemeTogglesProps> = ({
|
|
74
|
+
className,
|
|
75
|
+
liquidToggleProps = {},
|
|
76
|
+
colorToggleProps = {},
|
|
77
77
|
}) => {
|
|
78
78
|
return (
|
|
79
|
-
<div className={cn("flex
|
|
79
|
+
<div className={cn("flex", className)}>
|
|
80
80
|
<LiquidToggle {...liquidToggleProps} />
|
|
81
81
|
<ThemeColorToggle {...colorToggleProps} />
|
|
82
82
|
</div>
|
|
83
83
|
);
|
|
84
|
-
};
|
|
84
|
+
};
|
package/src/ui/theme/index.ts
CHANGED
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
3
|
-
ThemeProvider,
|
|
4
|
-
defaultThemes,
|
|
5
|
-
computeTheme,
|
|
6
|
-
parseOldTheme
|
|
7
|
-
} from "./ThemeProvider";
|
|
8
|
-
export {
|
|
9
|
-
LiquidToggle,
|
|
10
|
-
ThemeColorToggle,
|
|
11
|
-
ThemeToggles,
|
|
12
|
-
} from "./ThemeToggles";
|
|
1
|
+
export { useTheme, ThemeProvider, defaultThemes, computeTheme } from "./ThemeProvider";
|
|
2
|
+
export { LiquidToggle, ThemeColorToggle, ThemeToggles } from "./ThemeToggles";
|
|
13
3
|
export { ThemeScript } from "./themeScript";
|
|
14
4
|
|
|
15
|
-
export type {
|
|
16
|
-
Attribute,
|
|
17
|
-
ThemeProviderProps,
|
|
5
|
+
export type {
|
|
6
|
+
Attribute,
|
|
7
|
+
ThemeProviderProps,
|
|
18
8
|
UseThemeProps,
|
|
19
9
|
BaseTheme,
|
|
20
|
-
ComputedTheme
|
|
10
|
+
ComputedTheme,
|
|
21
11
|
} from "./types";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { memo } from "react";
|
|
2
2
|
|
|
3
|
-
import { Attribute, ThemeProviderProps } from "./types";
|
|
3
|
+
import { Attribute, BaseTheme, ThemeProviderProps } from "./types";
|
|
4
4
|
|
|
5
5
|
const themeScript = (
|
|
6
|
-
|
|
6
|
+
defaultBaseTheme: BaseTheme,
|
|
7
|
+
defaultIsLiquid: boolean,
|
|
7
8
|
storageKey: string,
|
|
8
9
|
attribute: Attribute | Attribute[],
|
|
9
10
|
themes: string[],
|
|
@@ -39,66 +40,37 @@ const themeScript = (
|
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
|
|
42
|
-
function getSystemTheme() {
|
|
43
|
-
return window.matchMedia("(prefers-color-scheme: dark)").matches
|
|
44
|
-
? "liquid-dark"
|
|
45
|
-
: "liquid-light";
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function parseOldTheme(oldTheme: string): { baseTheme: string; isLiquid: boolean } {
|
|
49
|
-
if (oldTheme === "system") {
|
|
50
|
-
return { baseTheme: "system", isLiquid: false };
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
if (oldTheme.startsWith("liquid-")) {
|
|
54
|
-
const base = oldTheme.replace("liquid-", "");
|
|
55
|
-
return { baseTheme: base, isLiquid: true };
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return { baseTheme: oldTheme, isLiquid: false };
|
|
59
|
-
}
|
|
60
|
-
|
|
61
43
|
function computeTheme(baseTheme: string, isLiquid: boolean, systemIsDark: boolean): string {
|
|
62
44
|
let resolvedBase: string;
|
|
63
|
-
|
|
45
|
+
|
|
64
46
|
if (baseTheme === "system") {
|
|
65
47
|
resolvedBase = systemIsDark ? "dark" : "light";
|
|
66
48
|
} else {
|
|
67
49
|
resolvedBase = baseTheme;
|
|
68
50
|
}
|
|
69
|
-
|
|
51
|
+
|
|
70
52
|
return isLiquid ? `liquid-${resolvedBase}` : resolvedBase;
|
|
71
53
|
}
|
|
72
54
|
|
|
73
55
|
function getStoredState(): { baseTheme: string; isLiquid: boolean } {
|
|
74
56
|
try {
|
|
75
|
-
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
if (baseTheme !== null && isLiquid !== null) {
|
|
57
|
+
const storedBase = localStorage.getItem(`${storageKey}-base`);
|
|
58
|
+
const storedLiquid = localStorage.getItem(`${storageKey}-liquid`);
|
|
59
|
+
|
|
60
|
+
if (storedBase !== null && storedLiquid !== null) {
|
|
80
61
|
return {
|
|
81
|
-
baseTheme,
|
|
82
|
-
isLiquid:
|
|
62
|
+
baseTheme: storedBase,
|
|
63
|
+
isLiquid: storedLiquid === "true",
|
|
83
64
|
};
|
|
84
65
|
}
|
|
85
|
-
|
|
86
|
-
const oldTheme = localStorage.getItem(storageKey);
|
|
87
|
-
if (oldTheme) {
|
|
88
|
-
return parseOldTheme(oldTheme);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
const defaultBaseTheme = enableSystem ? "system" : "light";
|
|
92
66
|
return {
|
|
93
67
|
baseTheme: defaultBaseTheme,
|
|
94
|
-
isLiquid:
|
|
68
|
+
isLiquid: defaultIsLiquid,
|
|
95
69
|
};
|
|
96
70
|
} catch {
|
|
97
|
-
// Default values on error
|
|
98
|
-
const defaultBaseTheme = enableSystem ? "system" : "light";
|
|
99
71
|
return {
|
|
100
|
-
baseTheme:
|
|
101
|
-
isLiquid: true
|
|
72
|
+
baseTheme: "system",
|
|
73
|
+
isLiquid: true,
|
|
102
74
|
};
|
|
103
75
|
}
|
|
104
76
|
}
|
|
@@ -107,10 +79,10 @@ const themeScript = (
|
|
|
107
79
|
updateDOM(forcedTheme);
|
|
108
80
|
} else {
|
|
109
81
|
const { baseTheme, isLiquid } = getStoredState();
|
|
110
|
-
|
|
82
|
+
|
|
111
83
|
const hasStoredBase = localStorage.getItem(`${storageKey}-base`) !== null;
|
|
112
84
|
const hasStoredLiquid = localStorage.getItem(`${storageKey}-liquid`) !== null;
|
|
113
|
-
|
|
85
|
+
|
|
114
86
|
if (!hasStoredBase || !hasStoredLiquid) {
|
|
115
87
|
try {
|
|
116
88
|
if (!hasStoredBase) {
|
|
@@ -119,10 +91,11 @@ const themeScript = (
|
|
|
119
91
|
if (!hasStoredLiquid) {
|
|
120
92
|
localStorage.setItem(`${storageKey}-liquid`, String(isLiquid));
|
|
121
93
|
}
|
|
122
|
-
|
|
123
|
-
|
|
94
|
+
} catch {
|
|
95
|
+
// Ignore storage errors
|
|
96
|
+
}
|
|
124
97
|
}
|
|
125
|
-
|
|
98
|
+
|
|
126
99
|
const systemIsDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
127
100
|
const computedTheme = computeTheme(baseTheme, isLiquid, systemIsDark);
|
|
128
101
|
updateDOM(computedTheme);
|
|
@@ -132,7 +105,6 @@ const themeScript = (
|
|
|
132
105
|
interface ThemeScriptProps extends ThemeProviderProps {
|
|
133
106
|
themes: string[];
|
|
134
107
|
storageKey: string;
|
|
135
|
-
defaultTheme: string;
|
|
136
108
|
attribute: Attribute | Attribute[];
|
|
137
109
|
forcedTheme?: string;
|
|
138
110
|
enableSystem?: boolean;
|
|
@@ -148,14 +120,16 @@ const ThemeScript = memo(
|
|
|
148
120
|
attribute,
|
|
149
121
|
enableSystem,
|
|
150
122
|
enableColorScheme,
|
|
151
|
-
|
|
123
|
+
defaultBaseTheme,
|
|
124
|
+
defaultIsLiquid,
|
|
152
125
|
value,
|
|
153
126
|
themes,
|
|
154
127
|
nonce,
|
|
155
128
|
scriptProps,
|
|
156
129
|
}: ThemeScriptProps) => {
|
|
157
130
|
const scriptArgs = JSON.stringify([
|
|
158
|
-
|
|
131
|
+
defaultBaseTheme,
|
|
132
|
+
defaultIsLiquid,
|
|
159
133
|
storageKey,
|
|
160
134
|
attribute,
|
|
161
135
|
themes,
|
package/src/ui/toolbar.tsx
CHANGED
|
@@ -29,13 +29,13 @@ export function Toolbar({ className, children, variant = "default", size = "md"
|
|
|
29
29
|
return (
|
|
30
30
|
<div
|
|
31
31
|
className={cn(
|
|
32
|
-
"bg-bg-primary flex items-center gap-2
|
|
33
|
-
"liquid:liquid-bg",
|
|
32
|
+
"bg-bg-primary flex items-center gap-2",
|
|
33
|
+
"liquid:liquid-bg liquid:shadow-[0_4px_16px_0_var(--color-shadow-secondary)]",
|
|
34
34
|
size === "sm" && "rounded-uk-md p-1.5",
|
|
35
35
|
size === "md" && "rounded-uk-lg p-1.5",
|
|
36
36
|
size === "lg" && "rounded-uk-xl p-1.5",
|
|
37
37
|
variant === "floating" &&
|
|
38
|
-
"rounded-[var(--radius-uk-md)] bg-white
|
|
38
|
+
"rounded-[var(--radius-uk-md)] bg-white dark:bg-gray-900" &&
|
|
39
39
|
(size === "sm" ? "px-1 py-1" : size === "md" ? "px-2 py-2" : "px-3 py-3"),
|
|
40
40
|
className,
|
|
41
41
|
)}
|
package/dist/chunk-DVKONMS7.cjs
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkDREOOKO2_cjs = require('./chunk-DREOOKO2.cjs');
|
|
4
|
-
var react = require('react');
|
|
5
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
|
|
7
|
-
var RadInput = react.forwardRef(function RadInput2({ value = 0, onChange, ...props }, ref) {
|
|
8
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9
|
-
chunkDREOOKO2_cjs.InputNumbers,
|
|
10
|
-
{
|
|
11
|
-
ref,
|
|
12
|
-
value: [value],
|
|
13
|
-
onValuesChange: (values) => onChange?.(values[0]),
|
|
14
|
-
suffix: ["rad"],
|
|
15
|
-
...props
|
|
16
|
-
}
|
|
17
|
-
);
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
exports.RadInput = RadInput;
|
package/dist/chunk-GPV4XELL.mjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { InputNumbers } from './chunk-C4E2MFZB.mjs';
|
|
2
|
-
import { forwardRef } from 'react';
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
var RadInput = forwardRef(function RadInput2({ value = 0, onChange, ...props }, ref) {
|
|
6
|
-
return /* @__PURE__ */ jsx(
|
|
7
|
-
InputNumbers,
|
|
8
|
-
{
|
|
9
|
-
ref,
|
|
10
|
-
value: [value],
|
|
11
|
-
onValuesChange: (values) => onChange?.(values[0]),
|
|
12
|
-
suffix: ["rad"],
|
|
13
|
-
...props
|
|
14
|
-
}
|
|
15
|
-
);
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
export { RadInput };
|
package/dist/chunk-H2GERFBG.cjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkBMJX3SEO_cjs = require('./chunk-BMJX3SEO.cjs');
|
|
4
|
-
var react = require('react');
|
|
5
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
|
|
7
|
-
var EulerRadInput = react.forwardRef(
|
|
8
|
-
function EulerRadInput2(props, ref) {
|
|
9
|
-
return /* @__PURE__ */ jsxRuntime.jsx(chunkBMJX3SEO_cjs.EulerInput, { ref, unit: "rad", ...props });
|
|
10
|
-
}
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
exports.EulerRadInput = EulerRadInput;
|