@vezham/react 26.0.3 → 26.3.1
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/index.css +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/lib/components/command/command-dialog.js +1 -1
- package/dist/lib/components/command/command-provider.js +1 -1
- package/dist/lib/components/command/index.d.ts +0 -1
- package/dist/lib/components/command/index.d.ts.map +1 -1
- package/dist/lib/components/panel/footer/control-center/control-center.js +1 -1
- package/dist/lib/components/panel/footer/control-center/editor.d.ts.map +1 -1
- package/dist/lib/components/panel/footer/control-center/editor.js +19 -24
- package/dist/lib/components/panel/footer/control-center/theme.d.ts.map +1 -1
- package/dist/lib/components/panel/footer/control-center/theme.js +2 -15
- package/dist/lib/components/panel/footer/control-center/variant.d.ts +3 -3
- package/dist/lib/components/panel/footer/control-center/variant.js +1 -1
- package/dist/lib/components/panel/footer/data.d.ts +1 -1
- package/dist/lib/components/panel/footer/data.js +1 -1
- package/dist/lib/components/panel/footer/index.d.ts +1 -1
- package/dist/lib/components/panel/footer/index.d.ts.map +1 -1
- package/dist/lib/components/panel/footer/index.js +11 -9
- package/dist/lib/components/panel/footer/notification-center/index.js +1 -1
- package/dist/lib/components/panel/footer/tamizhi/index.d.ts +3 -0
- package/dist/lib/components/panel/footer/tamizhi/index.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/tamizhi/index.js +20 -0
- package/dist/lib/components/panel/footer/types.d.ts +2 -3
- package/dist/lib/components/panel/footer/types.d.ts.map +1 -1
- package/dist/lib/components/panel/footer/user-menu.d.ts +2 -2
- package/dist/lib/components/panel/footer/user-menu.d.ts.map +1 -1
- package/dist/lib/components/panel/footer/user-menu.js +127 -59
- package/dist/lib/components/panel/header/bookmarks/favorites/variant.js +2 -2
- package/dist/lib/components/panel/header/bookmarks/folder-modal/index.js +6 -6
- package/dist/lib/components/panel/header/bookmarks/index.js +1 -1
- package/dist/lib/components/panel/header/bookmarks/quick-access/index.js +9 -9
- package/dist/lib/components/panel/header/bookmarks/variant.js +22 -22
- package/dist/lib/components/panel/header/index.js +3 -3
- package/dist/lib/components/panel/info-panel/provider.d.ts.map +1 -1
- package/dist/lib/components/panel/info-panel/provider.js +20 -34
- package/dist/lib/components/panel/info-panel/types.d.ts +1 -1
- package/dist/lib/components/panel/info-panel/types.d.ts.map +1 -1
- package/dist/lib/components/panel/menu/index.js +4 -4
- package/dist/lib/components/panel/menu/variant.js +4 -4
- package/dist/lib/components/workspace-navigation/index.d.ts.map +1 -1
- package/dist/lib/components/workspace-navigation/index.js +1 -1
- package/dist/lib/layouts/app/frame.d.ts +2 -1
- package/dist/lib/layouts/app/frame.d.ts.map +1 -1
- package/dist/lib/layouts/app/frame.js +2 -2
- package/dist/lib/layouts/app/index.d.ts +7 -4
- package/dist/lib/layouts/app/index.d.ts.map +1 -1
- package/dist/lib/layouts/app/index.js +37 -6
- package/dist/lib/layouts/menu-layout/home-navigation-bubble.js +3 -3
- package/dist/lib/layouts/menu-layout/index-md.d.ts.map +1 -1
- package/dist/lib/layouts/menu-layout/index-md.js +19 -28
- package/dist/lib/layouts/menu-layout/index-sm.d.ts.map +1 -1
- package/dist/lib/layouts/menu-layout/index-sm.js +8 -20
- package/dist/lib/layouts/section/toolbar.js +1 -1
- package/dist/lib/pages/settings/settings-content.d.ts.map +1 -1
- package/dist/lib/pages/settings/settings-content.js +14 -26
- package/dist/lib/workspace/action-dialog.d.ts +9 -0
- package/dist/lib/workspace/action-dialog.d.ts.map +1 -0
- package/dist/lib/workspace/action-dialog.js +86 -0
- package/dist/lib/workspace/actions-menu.d.ts +8 -0
- package/dist/lib/workspace/actions-menu.d.ts.map +1 -0
- package/dist/lib/workspace/actions-menu.js +47 -0
- package/dist/lib/workspace/create-dialog.d.ts +5 -0
- package/dist/lib/workspace/create-dialog.d.ts.map +1 -0
- package/dist/lib/workspace/create-dialog.js +108 -0
- package/dist/lib/workspace/index.d.ts +34 -0
- package/dist/lib/workspace/index.d.ts.map +1 -0
- package/dist/lib/workspace/index.js +128 -0
- package/dist/lib/workspace/menu.d.ts +18 -0
- package/dist/lib/workspace/menu.d.ts.map +1 -0
- package/dist/lib/workspace/menu.js +148 -0
- package/dist/lib/workspace/model.d.ts +17 -0
- package/dist/lib/workspace/model.d.ts.map +1 -0
- package/dist/lib/workspace/model.js +35 -0
- package/package.json +3 -2
- package/dist/lib/components/command/index.js +0 -3
- package/dist/lib/components/panel/footer/ai/chat-header.d.ts +0 -9
- package/dist/lib/components/panel/footer/ai/chat-header.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/chat-header.js +0 -63
- package/dist/lib/components/panel/footer/ai/composer.d.ts +0 -7
- package/dist/lib/components/panel/footer/ai/composer.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/composer.js +0 -77
- package/dist/lib/components/panel/footer/ai/content.d.ts +0 -13
- package/dist/lib/components/panel/footer/ai/content.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/content.js +0 -148
- package/dist/lib/components/panel/footer/ai/conversation.d.ts +0 -47
- package/dist/lib/components/panel/footer/ai/conversation.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/conversation.js +0 -222
- package/dist/lib/components/panel/footer/ai/index.d.ts +0 -3
- package/dist/lib/components/panel/footer/ai/index.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/index.js +0 -41
- package/dist/lib/components/panel/footer/ai/message-actions.d.ts +0 -8
- package/dist/lib/components/panel/footer/ai/message-actions.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/message-actions.js +0 -63
- package/dist/lib/components/panel/footer/ai/mock-result.d.ts +0 -6
- package/dist/lib/components/panel/footer/ai/mock-result.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/mock-result.js +0 -121
- package/dist/lib/components/panel/footer/ai/model-logo.d.ts +0 -5
- package/dist/lib/components/panel/footer/ai/model-logo.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/model-logo.js +0 -13
- package/dist/lib/components/panel/footer/ai/model-logos.d.ts +0 -2
- package/dist/lib/components/panel/footer/ai/model-logos.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/model-logos.js +0 -10
- package/dist/lib/components/panel/footer/ai/model-picker.d.ts +0 -8
- package/dist/lib/components/panel/footer/ai/model-picker.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/model-picker.js +0 -166
- package/dist/lib/components/panel/footer/ai/models.d.ts +0 -9
- package/dist/lib/components/panel/footer/ai/models.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/models.js +0 -72
- package/dist/lib/components/panel/footer/ai/permission-picker.d.ts +0 -5
- package/dist/lib/components/panel/footer/ai/permission-picker.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/permission-picker.js +0 -63
- package/dist/lib/components/panel/footer/ai/use-chat-scroll.d.ts +0 -9
- package/dist/lib/components/panel/footer/ai/use-chat-scroll.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/use-chat-scroll.js +0 -57
- package/dist/lib/components/panel/footer/preferences/data.d.ts +0 -14
- package/dist/lib/components/panel/footer/preferences/data.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/preferences/data.js +0 -304
- package/dist/lib/components/panel/footer/preferences/modal.d.ts +0 -8
- package/dist/lib/components/panel/footer/preferences/modal.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/preferences/modal.js +0 -75
- package/dist/lib/components/panel/footer/preferences/sidebar.d.ts +0 -9
- package/dist/lib/components/panel/footer/preferences/sidebar.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/preferences/sidebar.js +0 -105
- package/dist/lib/components/panel/footer/preferences/user-settings/account/index.d.ts +0 -3
- package/dist/lib/components/panel/footer/preferences/user-settings/account/index.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/preferences/user-settings/account/index.js +0 -16
- package/dist/lib/components/panel/footer/preferences/user-settings/content-social/index.d.ts +0 -3
- package/dist/lib/components/panel/footer/preferences/user-settings/content-social/index.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/preferences/user-settings/content-social/index.js +0 -16
- package/dist/lib/components/panel/footer/preferences/user-settings/data-privacy/index.d.ts +0 -3
- package/dist/lib/components/panel/footer/preferences/user-settings/data-privacy/index.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/preferences/user-settings/data-privacy/index.js +0 -101
- package/dist/lib/components/panel/footer/preferences/user-settings/family-center/index.d.ts +0 -3
- package/dist/lib/components/panel/footer/preferences/user-settings/family-center/index.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/preferences/user-settings/family-center/index.js +0 -24
- package/dist/lib/components/panel/footer/preferences/user-settings/profiles/index.d.ts +0 -3
- package/dist/lib/components/panel/footer/preferences/user-settings/profiles/index.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/preferences/user-settings/profiles/index.js +0 -103
- package/dist/lib/components/panel/footer/tabs.d.ts +0 -12
- package/dist/lib/components/panel/footer/tabs.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/tabs.js +0 -23
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { createContext, useCallback, useContext,
|
|
1
|
+
import { createContext, useCallback, useContext, useMemo } from "react";
|
|
2
|
+
import { useLocalStore } from "@vezham/hooks";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
import { useHotkey } from "@tanstack/react-hotkeys";
|
|
4
5
|
//#region src/lib/components/panel/info-panel/provider.tsx
|
|
@@ -7,57 +8,42 @@ var STORAGE_KEY = "vx-app:info-panel";
|
|
|
7
8
|
var VALID_INFO_PANELS = [
|
|
8
9
|
"bookmarks",
|
|
9
10
|
"storage",
|
|
10
|
-
"
|
|
11
|
+
"tamizhi"
|
|
11
12
|
];
|
|
12
13
|
var isInfoPanel = (panel) => typeof panel === "string" && VALID_INFO_PANELS.includes(panel);
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
var INITIAL_PANEL_STATE = {
|
|
15
|
+
activeInfoPanel: null,
|
|
16
|
+
isOpen: false
|
|
17
|
+
};
|
|
18
|
+
var parsePanelState = (value) => {
|
|
19
|
+
if (!value || typeof value !== "object") return INITIAL_PANEL_STATE;
|
|
20
|
+
const parsedValue = value;
|
|
21
|
+
const storedPanel = parsedValue.activeInfoPanel;
|
|
22
|
+
const activeInfoPanel = isInfoPanel(storedPanel) ? storedPanel : null;
|
|
23
|
+
return {
|
|
24
|
+
activeInfoPanel,
|
|
25
|
+
isOpen: Boolean(parsedValue.isOpen && activeInfoPanel)
|
|
17
26
|
};
|
|
18
|
-
try {
|
|
19
|
-
const storedValue = window.localStorage.getItem(STORAGE_KEY);
|
|
20
|
-
if (!storedValue) return {
|
|
21
|
-
activeInfoPanel: null,
|
|
22
|
-
isOpen: false
|
|
23
|
-
};
|
|
24
|
-
const parsedValue = JSON.parse(storedValue);
|
|
25
|
-
const storedPanel = parsedValue.activeInfoPanel;
|
|
26
|
-
const migratedPanel = storedPanel === "disc" ? "storage" : storedPanel;
|
|
27
|
-
const activeInfoPanel = isInfoPanel(migratedPanel) ? migratedPanel : null;
|
|
28
|
-
return {
|
|
29
|
-
activeInfoPanel,
|
|
30
|
-
isOpen: Boolean(parsedValue.isOpen && activeInfoPanel)
|
|
31
|
-
};
|
|
32
|
-
} catch {
|
|
33
|
-
return {
|
|
34
|
-
activeInfoPanel: null,
|
|
35
|
-
isOpen: false
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
27
|
};
|
|
39
28
|
var InfoPanelProvider = ({ children }) => {
|
|
40
|
-
const
|
|
29
|
+
const { value: state, setValue: setState } = useLocalStore(STORAGE_KEY, INITIAL_PANEL_STATE, { parse: parsePanelState });
|
|
41
30
|
const { activeInfoPanel, isOpen } = state;
|
|
42
|
-
useEffect(() => {
|
|
43
|
-
window.localStorage.setItem(STORAGE_KEY, JSON.stringify(state));
|
|
44
|
-
}, [state]);
|
|
45
31
|
const setActiveInfoPanel = useCallback((panel) => {
|
|
46
32
|
setState({
|
|
47
33
|
activeInfoPanel: panel,
|
|
48
34
|
isOpen: Boolean(panel)
|
|
49
35
|
});
|
|
50
|
-
}, []);
|
|
36
|
+
}, [setState]);
|
|
51
37
|
const openInfoPanel = useCallback((panel) => setState({
|
|
52
38
|
activeInfoPanel: panel,
|
|
53
39
|
isOpen: true
|
|
54
|
-
}), []);
|
|
40
|
+
}), [setState]);
|
|
55
41
|
const closeInfoPanel = useCallback(() => {
|
|
56
42
|
setState((current) => ({
|
|
57
43
|
...current,
|
|
58
44
|
isOpen: false
|
|
59
45
|
}));
|
|
60
|
-
}, []);
|
|
46
|
+
}, [setState]);
|
|
61
47
|
const toggleInfoPanel = useCallback((panel) => {
|
|
62
48
|
setState((current) => current.activeInfoPanel === panel && current.isOpen ? {
|
|
63
49
|
...current,
|
|
@@ -66,7 +52,7 @@ var InfoPanelProvider = ({ children }) => {
|
|
|
66
52
|
activeInfoPanel: panel,
|
|
67
53
|
isOpen: true
|
|
68
54
|
});
|
|
69
|
-
}, []);
|
|
55
|
+
}, [setState]);
|
|
70
56
|
useHotkey("Mod+Shift+B", () => toggleInfoPanel("bookmarks"), {
|
|
71
57
|
preventDefault: true,
|
|
72
58
|
ignoreInputs: true
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
export type ActiveInfoPanel = 'bookmarks' | 'storage' | '
|
|
2
|
+
export type ActiveInfoPanel = 'bookmarks' | 'storage' | 'tamizhi' | null;
|
|
3
3
|
export interface InfoPanelContextValue {
|
|
4
4
|
activeInfoPanel: ActiveInfoPanel;
|
|
5
5
|
isOpen: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/components/panel/info-panel/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,SAAS,GAAG,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/components/panel/info-panel/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,IAAI,CAAA;AAExE,MAAM,WAAW,qBAAqB;IACpC,eAAe,EAAE,eAAe,CAAA;IAChC,MAAM,EAAE,OAAO,CAAA;IACf,kBAAkB,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAA;IACpD,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,eAAe,EAAE,IAAI,CAAC,KAAK,IAAI,CAAA;IAC9D,cAAc,EAAE,MAAM,IAAI,CAAA;IAC1B,eAAe,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,eAAe,EAAE,IAAI,CAAC,KAAK,IAAI,CAAA;CACjE;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,OAAO,EAAE,SAAS,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,SAAS,CAAA;CAC/E"}
|
|
@@ -50,13 +50,13 @@ var Menu = forwardRef((props, ref) => {
|
|
|
50
50
|
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("button", {
|
|
51
51
|
type: "button",
|
|
52
52
|
onClick: () => handleDrawerItemClick(item),
|
|
53
|
-
className: cn("flex w-full cursor-pointer items-center gap-3 rounded-lg border-0 bg-transparent px-4 py-2.5 text-left transition-all duration-200", "hover:bg-default
|
|
53
|
+
className: cn("flex w-full cursor-pointer items-center gap-3 rounded-lg border-0 bg-transparent px-4 py-2.5 text-left transition-all duration-200", "hover:bg-default", !hasSubmenu && selectedKey === item.key && "bg-accent/10 text-accent"),
|
|
54
54
|
style: { paddingLeft: `${paddingLeft}px` },
|
|
55
55
|
children: [
|
|
56
56
|
item.icon && /* @__PURE__ */ jsx(AppIcon, {
|
|
57
57
|
icon: item.icon,
|
|
58
58
|
size: 18,
|
|
59
|
-
className: "text-
|
|
59
|
+
className: "text-muted",
|
|
60
60
|
"aria-hidden": "true"
|
|
61
61
|
}),
|
|
62
62
|
/* @__PURE__ */ jsx("span", {
|
|
@@ -66,7 +66,7 @@ var Menu = forwardRef((props, ref) => {
|
|
|
66
66
|
hasSubmenu && /* @__PURE__ */ jsx(AppIcon, {
|
|
67
67
|
icon: isExpanded ? "vx:chevron-down" : "vx:chevron-right",
|
|
68
68
|
size: 16,
|
|
69
|
-
className: "text-
|
|
69
|
+
className: "text-muted transition-transform duration-200",
|
|
70
70
|
"aria-hidden": "true"
|
|
71
71
|
})
|
|
72
72
|
]
|
|
@@ -133,7 +133,7 @@ var Menu = forwardRef((props, ref) => {
|
|
|
133
133
|
children: [
|
|
134
134
|
/* @__PURE__ */ jsx(Drawer.CloseTrigger, {}),
|
|
135
135
|
/* @__PURE__ */ jsx("div", {
|
|
136
|
-
className: "border-
|
|
136
|
+
className: "border-border flex items-center justify-between border-b p-4",
|
|
137
137
|
children: /* @__PURE__ */ jsx(Drawer.Header, {
|
|
138
138
|
className: "text-lg font-semibold",
|
|
139
139
|
children: currentTitle
|
|
@@ -21,8 +21,8 @@ var tva = tv({
|
|
|
21
21
|
label: "text-muted"
|
|
22
22
|
},
|
|
23
23
|
primary: {
|
|
24
|
-
icon: "text-
|
|
25
|
-
label: "text-
|
|
24
|
+
icon: "text-accent",
|
|
25
|
+
label: "text-accent font-medium"
|
|
26
26
|
},
|
|
27
27
|
muted: {
|
|
28
28
|
icon: "text-muted-foreground",
|
|
@@ -86,8 +86,8 @@ var tva = tv({
|
|
|
86
86
|
{
|
|
87
87
|
variant: "primary",
|
|
88
88
|
class: {
|
|
89
|
-
icon: "data-[active=true]:text-
|
|
90
|
-
label: "data-[active=true]:text-
|
|
89
|
+
icon: "data-[active=true]:text-accent",
|
|
90
|
+
label: "data-[active=true]:text-accent data-[active=true]:font-medium"
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/workspace-navigation/index.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,SAAS,EAQf,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/workspace-navigation/index.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,SAAS,EAQf,MAAM,OAAO,CAAA;AAMd,KAAK,oBAAoB,GAAG;IAC1B,MAAM,EAAE,OAAO,CAAA;IACf,QAAQ,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,KAAK,+BAA+B,GAAG;IACrC,qBAAqB,EAAE,OAAO,CAAA;IAC9B,gBAAgB,EAAE,MAAM,IAAI,CAAA;IAC5B,uBAAuB,EAAE,CAAC,OAAO,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAA;IAC5D,aAAa,EAAE,oBAAoB,GAAG,IAAI,CAAA;IAC1C,qBAAqB,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,MAAM,IAAI,CAAA;CACrE,CAAA;AAKD;;;;GAIG;AACH,QAAA,MAAM,2BAA2B,GAAI,cAAc;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,gCAwDzE,CAAA;AAED,OAAO,EAAE,2BAA2B,EAAE,CAAA;AAEtC,eAAO,MAAM,sBAAsB,uCAUlC,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,SAAS,MAAM,IAAI,EAAE,iBAAc,SAMrE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useCommand } from "../command/index.js";
|
|
2
1
|
import { useInfoPanel } from "../panel/info-panel/provider.js";
|
|
3
2
|
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
+
import { useCommand } from "@vezham/hooks";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { useHotkey } from "@tanstack/react-hotkeys";
|
|
6
6
|
//#region src/lib/components/workspace-navigation/index.tsx
|
|
@@ -3,6 +3,7 @@ export type AppFrameProps = {
|
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
contentClassName?: string;
|
|
5
5
|
navigation?: ReactNode;
|
|
6
|
+
hasBottomNavigation?: boolean;
|
|
6
7
|
} & Omit<ComponentPropsWithoutRef<'div'>, 'children'>;
|
|
7
|
-
export declare const AppFrame: ({ children, className, contentClassName, navigation, ...props }: AppFrameProps) => import("react").JSX.Element;
|
|
8
|
+
export declare const AppFrame: ({ children, className, contentClassName, navigation, hasBottomNavigation, ...props }: AppFrameProps) => import("react").JSX.Element;
|
|
8
9
|
//# sourceMappingURL=frame.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frame.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/app/frame.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMhE,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,SAAS,CAAA;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,UAAU,CAAC,EAAE,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"frame.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/app/frame.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMhE,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,SAAS,CAAA;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B,GAAG,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,CAAA;AAErD,eAAO,MAAM,QAAQ,GAAI,sFAOtB,aAAa,gCAwBf,CAAA"}
|
|
@@ -2,7 +2,7 @@ import { useMobileControls } from "../../components/mobile-controls/index.js";
|
|
|
2
2
|
import { Surface, cn } from "@vezham/react-v3";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
//#region src/lib/layouts/app/frame.tsx
|
|
5
|
-
var AppFrame = ({ children, className, contentClassName, navigation, ...props }) => {
|
|
5
|
+
var AppFrame = ({ children, className, contentClassName, navigation, hasBottomNavigation = true, ...props }) => {
|
|
6
6
|
const { isFooterHidden } = useMobileControls();
|
|
7
7
|
return /* @__PURE__ */ jsxs(Surface, {
|
|
8
8
|
variant: "transparent",
|
|
@@ -11,7 +11,7 @@ var AppFrame = ({ children, className, contentClassName, navigation, ...props })
|
|
|
11
11
|
...props,
|
|
12
12
|
children: [navigation, /* @__PURE__ */ jsx("main", {
|
|
13
13
|
"data-slot": "app-layout-content",
|
|
14
|
-
className: cn("min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto pt-18 transition-transform duration-300 ease-out md:p-0", isFooterHidden ? "pb-0" : "pb-20", contentClassName),
|
|
14
|
+
className: cn("min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto pt-18 transition-transform duration-300 ease-out md:p-0", isFooterHidden || !hasBottomNavigation ? "pb-0" : "pb-20", contentClassName),
|
|
15
15
|
children
|
|
16
16
|
})]
|
|
17
17
|
});
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { type ReactElement, type ReactNode } from 'react';
|
|
2
|
+
import { type TamizhiSessionProviderProps } from '@vezham/tamizhi-ui';
|
|
2
3
|
import { type AppMenuItem } from '../../components/app-menu';
|
|
3
4
|
import type { ControlCenterConfig, ControlCenterI18n } from '../../components/panel/footer/control-center/types';
|
|
4
5
|
import type { AppNavigationItem } from '../../navigation';
|
|
5
6
|
import { type User } from '../../store/users/useUserStore';
|
|
6
7
|
import { type AppFrameProps } from './frame';
|
|
7
|
-
export type AppLayoutProps =
|
|
8
|
+
export type AppLayoutProps = {
|
|
9
|
+
tamizhi?: Pick<TamizhiSessionProviderProps, 'client' | 'appId' | 'profiles'>;
|
|
10
|
+
} & Omit<AppFrameProps, 'navigation' | 'children' | 'hasBottomNavigation'> & {
|
|
8
11
|
children?: ReactNode;
|
|
9
12
|
navigationItems: AppNavigationItem[];
|
|
10
13
|
appMenu?: AppMenuItem[];
|
|
@@ -14,13 +17,13 @@ export type AppLayoutProps = Omit<AppFrameProps, 'navigation' | 'children'> & {
|
|
|
14
17
|
controlCenterSlot?: ReactElement;
|
|
15
18
|
i18n?: ControlCenterI18n;
|
|
16
19
|
};
|
|
17
|
-
type AppLayoutViewProps = Omit<AppFrameProps, 'navigation'> & {
|
|
20
|
+
type AppLayoutViewProps = Omit<AppFrameProps, 'navigation' | 'hasBottomNavigation'> & {
|
|
18
21
|
navigationItems: AppNavigationItem[];
|
|
19
22
|
controlCenterSlot?: ReactElement;
|
|
20
23
|
};
|
|
21
|
-
export declare const AppLayoutProviders: ({ children, navigationItems, appMenu, user }: Pick<AppLayoutProps, "children" | "navigationItems" | "appMenu" | "user">) => import("react").JSX.Element;
|
|
24
|
+
export declare const AppLayoutProviders: ({ children, navigationItems, appMenu, user, tamizhi }: Pick<AppLayoutProps, "children" | "navigationItems" | "appMenu" | "user" | "tamizhi">) => import("react").JSX.Element;
|
|
22
25
|
export declare const AppLayoutView: ({ children, navigationItems, controlCenterSlot, ...frameProps }: AppLayoutViewProps) => import("react").JSX.Element;
|
|
23
|
-
declare const AppLayout: ({ children, navigationItems, appMenu, user, settings, controlCenter, controlCenterSlot, i18n, ...frameProps }: AppLayoutProps) => import("react").JSX.Element;
|
|
26
|
+
declare const AppLayout: ({ children, navigationItems, appMenu, user, settings, controlCenter, controlCenterSlot, tamizhi, i18n, ...frameProps }: AppLayoutProps) => import("react").JSX.Element;
|
|
24
27
|
export { AppLayout };
|
|
25
28
|
export { AppFrame } from './frame';
|
|
26
29
|
export type { AppFrameProps } from './frame';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/app/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAe,MAAM,OAAO,CAAA;AAItE,OAAO,EAAE,KAAK,WAAW,EAAmB,MAAM,2BAA2B,CAAA;AAI7E,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,oDAAoD,CAAA;AAQ3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAMzD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/app/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAe,MAAM,OAAO,CAAA;AAItE,OAAO,EAEL,KAAK,2BAA2B,EACjC,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,KAAK,WAAW,EAAmB,MAAM,2BAA2B,CAAA;AAI7E,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,oDAAoD,CAAA;AAQ3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAMzD,OAAO,EACL,KAAK,IAAI,EAGV,MAAM,gCAAgC,CAAA;AAKvC,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,SAAS,CAAA;AAEtD,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,CAAC,EAAE,IAAI,CAAC,2BAA2B,EAAE,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAC,CAAA;CAC7E,GAAG,IAAI,CAAC,aAAa,EAAE,YAAY,GAAG,UAAU,GAAG,qBAAqB,CAAC,GAAG;IACzE,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,eAAe,EAAE,iBAAiB,EAAE,CAAA;IACpC,OAAO,CAAC,EAAE,WAAW,EAAE,CAAA;IACvB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,iBAAiB,CAAC,EAAE,YAAY,CAAA;IAChC,IAAI,CAAC,EAAE,iBAAiB,CAAA;CACzB,CAAA;AAEH,KAAK,kBAAkB,GAAG,IAAI,CAC5B,aAAa,EACb,YAAY,GAAG,qBAAqB,CACrC,GAAG;IACF,eAAe,EAAE,iBAAiB,EAAE,CAAA;IACpC,iBAAiB,CAAC,EAAE,YAAY,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,uDAMhC,IAAI,CACL,cAAc,EACd,UAAU,GAAG,iBAAiB,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAChE,gCAsBA,CAAA;AASD,eAAO,MAAM,aAAa,GAAI,iEAK3B,kBAAkB,gCASpB,CAAA;AAED,QAAA,MAAM,SAAS,GAAI,wHAWhB,cAAc,gCA4ChB,CAAA;AA+BD,OAAO,EAAE,SAAS,EAAE,CAAA;AACpB,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -8,35 +8,51 @@ import { InfoPanelProvider } from "../../components/panel/info-panel/provider.js
|
|
|
8
8
|
import { ResponsiveToolbarActionProvider } from "../../components/responsive-toolbar-action/index.js";
|
|
9
9
|
import { WorkspaceNavigationProvider } from "../../components/workspace-navigation/index.js";
|
|
10
10
|
import { getNavigationPageKey } from "../../navigation.js";
|
|
11
|
-
import { UserProvider } from "../../store/users/useUserStore.js";
|
|
11
|
+
import { UserProvider, useUser } from "../../store/users/useUserStore.js";
|
|
12
|
+
import { workspaceDataKey } from "../../workspace/model.js";
|
|
13
|
+
import { WorkspaceProvider, useOptionalWorkspace } from "../../workspace/index.js";
|
|
12
14
|
import { MenuLayout } from "../menu-layout/index.js";
|
|
13
15
|
import { AppFrame } from "./frame.js";
|
|
14
16
|
import { SettingsLayout } from "../settings/index.js";
|
|
15
17
|
import { Outlet, useLocation, useMatches, useNavigate } from "@tanstack/react-router";
|
|
16
18
|
import { useCallback } from "react";
|
|
19
|
+
import { useApp } from "@vezham/hooks";
|
|
17
20
|
import { toast } from "@vezham/react-v3";
|
|
21
|
+
import { TamizhiSessionProvider } from "@vezham/tamizhi-ui";
|
|
18
22
|
import { jsx } from "react/jsx-runtime";
|
|
19
23
|
//#region src/lib/layouts/app/index.tsx
|
|
20
|
-
var AppLayoutProviders = ({ children, navigationItems, appMenu = [], user }) => /* @__PURE__ */ jsx(ToolbarActionsProvider, { children: /* @__PURE__ */ jsx(AppMenuShell, {
|
|
24
|
+
var AppLayoutProviders = ({ children, navigationItems, appMenu = [], user, tamizhi }) => /* @__PURE__ */ jsx(ToolbarActionsProvider, { children: /* @__PURE__ */ jsx(AppMenuShell, {
|
|
21
25
|
items: appMenu,
|
|
22
26
|
navigationItems,
|
|
23
|
-
children: /* @__PURE__ */ jsx(UserProvider, {
|
|
27
|
+
children: /* @__PURE__ */ jsx(AppWorkspaces, { children: /* @__PURE__ */ jsx(UserProvider, {
|
|
24
28
|
initialUser: user,
|
|
25
29
|
children: /* @__PURE__ */ jsx(CommandProvider, {
|
|
26
30
|
items: navigationItems,
|
|
27
|
-
children: /* @__PURE__ */ jsx(InfoPanelProvider, { children: /* @__PURE__ */ jsx(
|
|
31
|
+
children: /* @__PURE__ */ jsx(InfoPanelProvider, { children: /* @__PURE__ */ jsx(EmbeddedSession, {
|
|
32
|
+
...tamizhi,
|
|
33
|
+
children: /* @__PURE__ */ jsx(WorkspaceNavigationProvider, { children: /* @__PURE__ */ jsx(MobileControlsProvider, { children: /* @__PURE__ */ jsx(ResponsiveToolbarActionProvider, { children }) }) })
|
|
34
|
+
}) })
|
|
28
35
|
})
|
|
29
|
-
})
|
|
36
|
+
}) })
|
|
30
37
|
}) });
|
|
38
|
+
var AppWorkspaces = ({ children }) => {
|
|
39
|
+
const app = useApp();
|
|
40
|
+
if (useOptionalWorkspace() || !app?.id) return children;
|
|
41
|
+
return /* @__PURE__ */ jsx(WorkspaceProvider, {
|
|
42
|
+
appId: app.id,
|
|
43
|
+
children
|
|
44
|
+
});
|
|
45
|
+
};
|
|
31
46
|
var AppLayoutView = ({ children, navigationItems, controlCenterSlot, ...frameProps }) => /* @__PURE__ */ jsx(AppFrame, {
|
|
32
47
|
...frameProps,
|
|
48
|
+
hasBottomNavigation: navigationItems.length > 1,
|
|
33
49
|
navigation: /* @__PURE__ */ jsx(MenuLayout, {
|
|
34
50
|
items: navigationItems,
|
|
35
51
|
controlCenter: controlCenterSlot
|
|
36
52
|
}),
|
|
37
53
|
children
|
|
38
54
|
});
|
|
39
|
-
var AppLayout = ({ children, navigationItems, appMenu, user, settings = false, controlCenter, controlCenterSlot, i18n, ...frameProps }) => {
|
|
55
|
+
var AppLayout = ({ children, navigationItems, appMenu, user, settings = false, controlCenter, controlCenterSlot, tamizhi, i18n, ...frameProps }) => {
|
|
40
56
|
const navigate = useNavigate();
|
|
41
57
|
const isSettings = useMatches({ select: (matches) => settings && matches.some((match) => match.routeId === "/settings") });
|
|
42
58
|
const openSettings = useCallback((section) => navigate({
|
|
@@ -54,6 +70,7 @@ var AppLayout = ({ children, navigationItems, appMenu, user, settings = false, c
|
|
|
54
70
|
navigationItems,
|
|
55
71
|
appMenu,
|
|
56
72
|
user,
|
|
73
|
+
tamizhi,
|
|
57
74
|
children: /* @__PURE__ */ jsx(SettingsNavigationContext.Provider, {
|
|
58
75
|
value: settings ? openSettings : null,
|
|
59
76
|
children: isSettings ? /* @__PURE__ */ jsx(SettingsLayout, { children: content }) : /* @__PURE__ */ jsx(AppLayoutView, {
|
|
@@ -85,5 +102,19 @@ var AppMenuShell = ({ items, navigationItems, children }) => {
|
|
|
85
102
|
children
|
|
86
103
|
});
|
|
87
104
|
};
|
|
105
|
+
var EmbeddedSession = ({ children, client, appId, profiles }) => {
|
|
106
|
+
const { user } = useUser();
|
|
107
|
+
const app = useApp();
|
|
108
|
+
const workspace = useOptionalWorkspace();
|
|
109
|
+
const sessionKey = `tamizhi.embed.${user?.id ?? "guest"}.v1`;
|
|
110
|
+
const storageKey = workspace ? workspaceDataKey(workspace.appId, workspace.active.id, sessionKey) : sessionKey;
|
|
111
|
+
return /* @__PURE__ */ jsx(TamizhiSessionProvider, {
|
|
112
|
+
storageKey,
|
|
113
|
+
client,
|
|
114
|
+
appId: appId ?? app?.id,
|
|
115
|
+
profiles,
|
|
116
|
+
children
|
|
117
|
+
}, storageKey);
|
|
118
|
+
};
|
|
88
119
|
//#endregion
|
|
89
120
|
export { AppFrame, AppLayout, AppLayoutProviders, AppLayoutView };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Header } from "../../components/panel/header/index.js";
|
|
1
|
+
import { Header as Header$1 } from "../../components/panel/header/index.js";
|
|
2
2
|
import { Surface } from "@vezham/react-v3";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/lib/layouts/menu-layout/home-navigation-bubble.tsx
|
|
@@ -7,8 +7,8 @@ var HomeNavigationBubble = ({ onToggleDock, users }) => {
|
|
|
7
7
|
variant: "transparent",
|
|
8
8
|
role: "group",
|
|
9
9
|
"aria-label": "Home navigation",
|
|
10
|
-
className: "border-
|
|
11
|
-
children: /* @__PURE__ */ jsx(Header, {
|
|
10
|
+
className: "border-border bg-background/90 fixed top-3 left-3 z-40 flex h-[50px] w-fit items-center rounded-full border px-2 py-0 shadow-[0_14px_28px_rgba(15,23,42,0.14)] backdrop-blur-xl",
|
|
11
|
+
children: /* @__PURE__ */ jsx(Header$1, {
|
|
12
12
|
compact: true,
|
|
13
13
|
users,
|
|
14
14
|
isDockHidden: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-md.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/menu-layout/index-md.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index-md.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/menu-layout/index-md.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAS9C,QAAA,MAAM,MAAM,GAAI,0BAA0B,eAAe,gCAoExD,CAAA;AAqGD,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { useCommand } from "../../components/command/index.js";
|
|
2
1
|
import { useInfoPanel } from "../../components/panel/info-panel/provider.js";
|
|
3
2
|
import { InfoPanelContainer } from "../../components/panel/info-panel/container.js";
|
|
4
3
|
import { useSidebarShortcut, useWorkspaceNavigation } from "../../components/workspace-navigation/index.js";
|
|
5
4
|
import { getSelectedMenuKey } from "../../navigation.js";
|
|
6
5
|
import { useUser } from "../../store/users/useUserStore.js";
|
|
7
6
|
import { Footer } from "../../components/panel/footer/index.js";
|
|
8
|
-
import { aiPanel } from "../../components/panel/footer/ai/index.js";
|
|
9
7
|
import { NotificationDrawer } from "../../components/panel/footer/notification-center/index.js";
|
|
10
|
-
import {
|
|
8
|
+
import { tamizhiPanel } from "../../components/panel/footer/tamizhi/index.js";
|
|
11
9
|
import { bookmarksPanel } from "../../components/panel/header/bookmarks/index.js";
|
|
12
10
|
import { storagePanel } from "../../components/panel/header/storage/index.js";
|
|
13
|
-
import { Header } from "../../components/panel/header/index.js";
|
|
11
|
+
import { Header as Header$1 } from "../../components/panel/header/index.js";
|
|
14
12
|
import { Menu } from "../../components/panel/menu/index.js";
|
|
15
13
|
import { HomeNavigationBubble } from "./home-navigation-bubble.js";
|
|
16
14
|
import { useLocation } from "@tanstack/react-router";
|
|
17
15
|
import { useState } from "react";
|
|
16
|
+
import { useCommand } from "@vezham/hooks";
|
|
18
17
|
import { Surface } from "@vezham/react-v3";
|
|
19
18
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
20
19
|
//#region src/lib/layouts/menu-layout/index-md.tsx
|
|
@@ -24,8 +23,6 @@ var headerUsers = {
|
|
|
24
23
|
avatar: "https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/blue.jpg"
|
|
25
24
|
};
|
|
26
25
|
var MenuMD = ({ items, controlCenter }) => {
|
|
27
|
-
const [openSettings, setOpenSettings] = useState(false);
|
|
28
|
-
const [settingsEntryPoint, setSettingsEntryPoint] = useState("account");
|
|
29
26
|
const location = useLocation();
|
|
30
27
|
const [notificationsOpen, setNotificationsOpen] = useState(false);
|
|
31
28
|
const { openInfoPanel, closeInfoPanel } = useInfoPanel();
|
|
@@ -41,7 +38,6 @@ var MenuMD = ({ items, controlCenter }) => {
|
|
|
41
38
|
closeInfoPanel();
|
|
42
39
|
closeCommand();
|
|
43
40
|
} else toggleNavigation();
|
|
44
|
-
setOpenSettings(false);
|
|
45
41
|
setNotificationsOpen(false);
|
|
46
42
|
};
|
|
47
43
|
useSidebarShortcut(toggleDock, isHome);
|
|
@@ -60,24 +56,15 @@ var MenuMD = ({ items, controlCenter }) => {
|
|
|
60
56
|
controlCenter,
|
|
61
57
|
navigationWidth,
|
|
62
58
|
selectedKey,
|
|
63
|
-
|
|
59
|
+
onTamizhi: () => openInfoPanel("tamizhi"),
|
|
64
60
|
onToggleDock: toggleDock,
|
|
65
|
-
onNotifications: () => setNotificationsOpen(true)
|
|
66
|
-
onUser: (entryPoint) => {
|
|
67
|
-
setSettingsEntryPoint(entryPoint);
|
|
68
|
-
setOpenSettings(true);
|
|
69
|
-
}
|
|
61
|
+
onNotifications: () => setNotificationsOpen(true)
|
|
70
62
|
}),
|
|
71
63
|
/* @__PURE__ */ jsx(CollapsedNavigation, {
|
|
72
64
|
collapsed: isNavigationCollapsed,
|
|
73
65
|
isHome,
|
|
74
66
|
onToggleDock: toggleDock
|
|
75
67
|
}),
|
|
76
|
-
/* @__PURE__ */ jsx(UserInfoModal, {
|
|
77
|
-
open: openSettings && !isNavigationCollapsed,
|
|
78
|
-
onClose: () => setOpenSettings(false),
|
|
79
|
-
defaultActiveTab: settingsEntryPoint
|
|
80
|
-
}),
|
|
81
68
|
/* @__PURE__ */ jsx(NotificationDrawer, {
|
|
82
69
|
isOpen: notificationsOpen && !isNavigationCollapsed,
|
|
83
70
|
onClose: () => setNotificationsOpen(false)
|
|
@@ -85,37 +72,41 @@ var MenuMD = ({ items, controlCenter }) => {
|
|
|
85
72
|
/* @__PURE__ */ jsx(InfoPanelContainer, { panels: {
|
|
86
73
|
bookmarks: bookmarksPanel,
|
|
87
74
|
storage: storagePanel,
|
|
88
|
-
|
|
75
|
+
tamizhi: tamizhiPanel
|
|
89
76
|
} })
|
|
90
77
|
] });
|
|
91
78
|
};
|
|
92
|
-
var NavigationPanel = ({ collapsed, footerUser, items, controlCenter, navigationWidth, selectedKey,
|
|
79
|
+
var NavigationPanel = ({ collapsed, footerUser, items, controlCenter, navigationWidth, selectedKey, onTamizhi, onToggleDock, onNotifications }) => /* @__PURE__ */ jsx(Surface, {
|
|
93
80
|
variant: "transparent",
|
|
94
|
-
className: `border-
|
|
81
|
+
className: `border-border-secondary sticky top-0 left-0 z-[10] flex h-[100dvh] shrink-0 flex-col overflow-hidden transition-[width,padding,gap] duration-300 ease-out ${navigationWidth} ${collapsed ? "border-0 p-0" : "gap-6 px-4 pt-3 pb-4"}`,
|
|
95
82
|
"data-vx": "menu-layout",
|
|
96
83
|
children: !collapsed && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
97
|
-
/* @__PURE__ */ jsx(Header, {
|
|
84
|
+
/* @__PURE__ */ jsx(Header$1, {
|
|
98
85
|
users: headerUsers,
|
|
99
86
|
showSearch: true,
|
|
100
87
|
showBookamarks: true,
|
|
101
88
|
showStorage: true,
|
|
89
|
+
hideSeparator: items.length <= 1,
|
|
102
90
|
onToggleDock
|
|
103
91
|
}),
|
|
104
|
-
/* @__PURE__ */ jsx(Menu, {
|
|
92
|
+
items.length > 1 ? /* @__PURE__ */ jsx(Menu, {
|
|
105
93
|
collapsed: false,
|
|
106
94
|
items,
|
|
107
95
|
selectedKey
|
|
96
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
97
|
+
className: "min-h-0 flex-1",
|
|
98
|
+
"aria-hidden": "true"
|
|
108
99
|
}),
|
|
109
100
|
/* @__PURE__ */ jsx(Footer, {
|
|
110
101
|
user: footerUser,
|
|
102
|
+
hideSeparator: items.length <= 1,
|
|
111
103
|
showAI: true,
|
|
112
104
|
showControlCenter: true,
|
|
113
105
|
controlCenter,
|
|
114
106
|
showNotifications: true,
|
|
115
107
|
showUserInfo: true,
|
|
116
|
-
|
|
117
|
-
onNotificationsClick: onNotifications
|
|
118
|
-
onUserClick: (_user, entryPoint = "account") => onUser(entryPoint)
|
|
108
|
+
onTamizhi,
|
|
109
|
+
onNotificationsClick: onNotifications
|
|
119
110
|
})
|
|
120
111
|
] })
|
|
121
112
|
});
|
|
@@ -127,8 +118,8 @@ var CollapsedNavigation = ({ collapsed, isHome, onToggleDock }) => {
|
|
|
127
118
|
});
|
|
128
119
|
return /* @__PURE__ */ jsx(Surface, {
|
|
129
120
|
variant: "transparent",
|
|
130
|
-
className: "border-
|
|
131
|
-
children: /* @__PURE__ */ jsx(Header, {
|
|
121
|
+
className: "border-border bg-background/90 fixed top-3 left-3 z-40 flex h-[45px] w-fit items-center rounded-full border px-2 py-0 shadow-[0_14px_28px_rgba(15,23,42,0.14)] backdrop-blur-xl",
|
|
122
|
+
children: /* @__PURE__ */ jsx(Header$1, {
|
|
132
123
|
compact: true,
|
|
133
124
|
users: headerUsers,
|
|
134
125
|
isDockHidden: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-sm.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/menu-layout/index-sm.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index-sm.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/menu-layout/index-sm.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAsBvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,QAAA,MAAM,MAAM,GAAI,0BAA0B,eAAe,sBA2GxD,CAAA;AAED,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
|
@@ -7,12 +7,11 @@ import { useWorkspaceNavigation } from "../../components/workspace-navigation/in
|
|
|
7
7
|
import { getNavigationPageKey } from "../../navigation.js";
|
|
8
8
|
import { useUser } from "../../store/users/useUserStore.js";
|
|
9
9
|
import { Footer } from "../../components/panel/footer/index.js";
|
|
10
|
-
import { aiPanel } from "../../components/panel/footer/ai/index.js";
|
|
11
10
|
import { NotificationDrawer } from "../../components/panel/footer/notification-center/index.js";
|
|
12
|
-
import {
|
|
11
|
+
import { tamizhiPanel } from "../../components/panel/footer/tamizhi/index.js";
|
|
13
12
|
import { bookmarksPanel } from "../../components/panel/header/bookmarks/index.js";
|
|
14
13
|
import { storagePanel } from "../../components/panel/header/storage/index.js";
|
|
15
|
-
import { Header } from "../../components/panel/header/index.js";
|
|
14
|
+
import { Header as Header$1 } from "../../components/panel/header/index.js";
|
|
16
15
|
import { BottomNavbar } from "../../components/menu/index.js";
|
|
17
16
|
import { getNavigationToolbar } from "../../navigation-toolbar.js";
|
|
18
17
|
import { useLocation } from "@tanstack/react-router";
|
|
@@ -22,8 +21,6 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
|
22
21
|
//#region src/lib/layouts/menu-layout/index-sm.tsx
|
|
23
22
|
var MenuSM = ({ items, controlCenter }) => {
|
|
24
23
|
const [selectedKey, setSelectedKey] = React.useState(items[0]?.key ?? "");
|
|
25
|
-
const [openSettings, setOpenSettings] = useState(false);
|
|
26
|
-
const [settingsEntryPoint, setSettingsEntryPoint] = useState("account");
|
|
27
24
|
const [notificationsOpen, setNotificationsOpen] = useState(false);
|
|
28
25
|
const { openInfoPanel } = useInfoPanel();
|
|
29
26
|
const { isFooterHidden } = useMobileControls();
|
|
@@ -56,8 +53,8 @@ var MenuSM = ({ items, controlCenter }) => {
|
|
|
56
53
|
variant: "transparent",
|
|
57
54
|
role: "group",
|
|
58
55
|
"aria-label": "Mobile navigation controls",
|
|
59
|
-
className: "border-
|
|
60
|
-
children: /* @__PURE__ */ jsx(Header, {
|
|
56
|
+
className: "border-border bg-background/90 pointer-events-auto flex h-12 shrink-0 items-center rounded-full border px-2 shadow-[0_14px_28px_rgba(15,23,42,0.14)] backdrop-blur-xl",
|
|
57
|
+
children: /* @__PURE__ */ jsx(Header$1, {
|
|
61
58
|
compact: true,
|
|
62
59
|
className: "flex-shrink-0",
|
|
63
60
|
users,
|
|
@@ -70,7 +67,7 @@ var MenuSM = ({ items, controlCenter }) => {
|
|
|
70
67
|
variant: "transparent",
|
|
71
68
|
role: "group",
|
|
72
69
|
"aria-label": "Mobile account actions",
|
|
73
|
-
className: "border-
|
|
70
|
+
className: "border-border bg-background/90 pointer-events-auto flex h-12 shrink-0 items-center rounded-full border px-2 shadow-[0_14px_28px_rgba(15,23,42,0.14)] backdrop-blur-xl",
|
|
74
71
|
children: /* @__PURE__ */ jsx(Footer, {
|
|
75
72
|
user: {
|
|
76
73
|
id: user?.id ?? "",
|
|
@@ -83,21 +80,12 @@ var MenuSM = ({ items, controlCenter }) => {
|
|
|
83
80
|
controlCenter,
|
|
84
81
|
showNotifications: true,
|
|
85
82
|
showUserInfo: true,
|
|
86
|
-
|
|
83
|
+
onTamizhi: () => openInfoPanel("tamizhi"),
|
|
87
84
|
onNotificationsClick: () => setNotificationsOpen(true),
|
|
88
|
-
onUserClick: (_user, entryPoint = "account") => {
|
|
89
|
-
setSettingsEntryPoint(entryPoint);
|
|
90
|
-
setOpenSettings(true);
|
|
91
|
-
},
|
|
92
85
|
toolbarAction
|
|
93
86
|
})
|
|
94
87
|
})]
|
|
95
88
|
}),
|
|
96
|
-
/* @__PURE__ */ jsx(UserInfoModal, {
|
|
97
|
-
open: openSettings,
|
|
98
|
-
onClose: () => setOpenSettings(false),
|
|
99
|
-
defaultActiveTab: settingsEntryPoint
|
|
100
|
-
}),
|
|
101
89
|
/* @__PURE__ */ jsx(NotificationDrawer, {
|
|
102
90
|
isOpen: notificationsOpen,
|
|
103
91
|
onClose: () => setNotificationsOpen(false)
|
|
@@ -105,9 +93,9 @@ var MenuSM = ({ items, controlCenter }) => {
|
|
|
105
93
|
/* @__PURE__ */ jsx(InfoPanelContainer, { panels: {
|
|
106
94
|
bookmarks: bookmarksPanel,
|
|
107
95
|
storage: storagePanel,
|
|
108
|
-
|
|
96
|
+
tamizhi: tamizhiPanel
|
|
109
97
|
} }),
|
|
110
|
-
!isFooterHidden && /* @__PURE__ */ jsx("div", {
|
|
98
|
+
!isFooterHidden && items.length > 1 && /* @__PURE__ */ jsx("div", {
|
|
111
99
|
className: "shrink-0",
|
|
112
100
|
children: /* @__PURE__ */ jsx(BottomNavbar, {
|
|
113
101
|
items,
|
|
@@ -290,7 +290,7 @@ var SectionSearchField = ({ search }) => {
|
|
|
290
290
|
var ToolbarActions = ({ search, toolbar, sync = true, onSync, filterAction, hasFilters, isMobile, isFilterMenuOpen, onFilterOpenChange, selectedFilters, onToggleFilter, sort = false, sortValue = DEFAULT_SORT, onSortChange, view: viewModeActions = EMPTY_VIEW_ACTIONS, viewMode, onViewModeChange, primaryAction, menuActions, isMenuOpen, onMenuOpenChange }) => /* @__PURE__ */ jsxs("div", {
|
|
291
291
|
role: "group",
|
|
292
292
|
"aria-label": "Toolbar actions",
|
|
293
|
-
className: "
|
|
293
|
+
className: "col-start-2 row-start-1 -m-1 hidden max-w-[calc(100vw-2rem)] min-w-0 [scrollbar-width:none] items-center gap-2 overflow-x-auto p-1 md:flex [&::-webkit-scrollbar]:hidden",
|
|
294
294
|
children: [
|
|
295
295
|
search && /* @__PURE__ */ jsx(SectionSearchField, { search }),
|
|
296
296
|
sync && /* @__PURE__ */ jsx(ShortcutButton, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-content.d.ts","sourceRoot":"","sources":["../../../../src/lib/pages/settings/settings-content.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"settings-content.d.ts","sourceRoot":"","sources":["../../../../src/lib/pages/settings/settings-content.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAiNnD,eAAO,MAAM,eAAe,GAAI,YAAY;IAAE,MAAM,EAAE,eAAe,CAAA;CAAE,gCAItE,CAAA"}
|