mtxuilib 0.1.299 → 0.1.300

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.
@@ -29,18 +29,15 @@ const createMtAppStore = (initProps) => {
29
29
  }), {
30
30
  name: "Dash5Layout",
31
31
  skipHydration: true,
32
- version: 1,
32
+ version: 2,
33
33
  onRehydrateStorage: () => (state, error) => {
34
34
  state?.setHasHydrated(true);
35
35
  },
36
36
  partialize: (state) => {
37
37
  return Object.fromEntries(Object.entries(state).filter(([key]) => {
38
38
  return ![
39
- "cookieStr",
40
39
  "children",
41
40
  "_hasHydrated",
42
- "socket",
43
- "session",
44
41
  "siderComponent",
45
42
  ].includes(key);
46
43
  }));
@@ -3,6 +3,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
3
3
  import { cn } from "mtxuilib/lib/utils";
4
4
  import { useRef } from "react";
5
5
  import { ResizableHandle, ResizablePanel, ResizablePanelGroup, } from "../../ui/resizable";
6
+ import { TooltipProvider } from "../../ui/tooltip";
6
7
  import { useDash } from "../DashLayoutProvider";
7
8
  import { Dash5LayoutProvider, useDash5Store, } from "./dash5.store";
8
9
  import { DashSider } from "./DashSider";
@@ -18,12 +19,12 @@ const DashLayoutInner = (props) => {
18
19
  const navPanelRef = useRef(null);
19
20
  const logo = useDash(x => x.config?.logo);
20
21
  const siderNavMenus = useDash(x => x.config?.siderNavMenus);
21
- return (_jsxs(ResizablePanelGroup, { direction: "horizontal", onLayout: (sizes) => {
22
- document.cookie = `react-resizable-panels:layout=${JSON.stringify(sizes)}`;
23
- }, className: "h-full items-stretch", children: [_jsx(ResizablePanel, { ref: navPanelRef, defaultSize: defaultLayout[0], collapsedSize: navCollapsedSize, collapsible: true, minSize: 12, maxSize: 30, onCollapse: () => {
24
- setIsSideCollapsed(true);
25
- }, onExpand: () => {
26
- setIsSideCollapsed(false);
27
- }, className: cn(isSideCollapsed &&
28
- "min-w-[60px] transition-all duration-300 ease-in-out", "hidden sm:flex sm:flex-col"), children: _jsx(_Fragment, { children: _jsx(DashSider, { isCollapsed: !!isSideCollapsed }) }) }), _jsx(ResizableHandle, { withHandle: true, className: "hidden md:flex" }), _jsx(ResizablePanel, { defaultSize: defaultLayout[1], minSize: 30, children: _jsx("div", { className: "bg-muted/40 flex min-h-screen w-full flex-col", children: _jsxs("div", { className: cn("flex min-h-dvh flex-col"), children: [_jsx("main", { className: cn("flex h-full min-h-full flex-1 p-1 flex-col px-1"), children: _jsx("div", { className: "min-h-full w-full flex-1 flex flex-col", children: props.children }) }), _jsx("div", { className: "bg-slate-50" })] }) }) })] }));
22
+ return (_jsx(TooltipProvider, { delayDuration: 0, children: _jsxs(ResizablePanelGroup, { direction: "horizontal", onLayout: (sizes) => {
23
+ document.cookie = `react-resizable-panels:layout=${JSON.stringify(sizes)}`;
24
+ }, className: "h-full items-stretch", children: [_jsx(ResizablePanel, { ref: navPanelRef, defaultSize: defaultLayout[0], collapsedSize: navCollapsedSize, collapsible: true, minSize: 12, maxSize: 30, onCollapse: () => {
25
+ setIsSideCollapsed(true);
26
+ }, onExpand: () => {
27
+ setIsSideCollapsed(false);
28
+ }, className: cn(isSideCollapsed &&
29
+ "min-w-[60px] transition-all duration-300 ease-in-out", "hidden sm:flex sm:flex-col"), children: _jsx(_Fragment, { children: _jsx(DashSider, { isCollapsed: !!isSideCollapsed }) }) }), _jsx(ResizableHandle, { withHandle: true, className: "hidden md:flex" }), _jsx(ResizablePanel, { defaultSize: defaultLayout[1], minSize: 30, children: _jsx("div", { className: "bg-muted/40 flex min-h-screen w-full flex-col", children: _jsxs("div", { className: cn("flex min-h-dvh flex-col"), children: [_jsx("main", { className: cn("flex h-full min-h-full flex-1 p-1 flex-col px-1"), children: _jsx("div", { className: "min-h-full w-full flex-1 flex flex-col", children: props.children }) }), _jsx("div", { className: "bg-slate-50" })] }) }) })] }) }));
29
30
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mtxuilib",
3
3
  "private": false,
4
- "version": "0.1.299",
4
+ "version": "0.1.300",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },