camox 0.3.0 → 0.4.0
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/components/AuthGate.js +2 -1
- package/dist/core/components/AddBlockControlBar.js +117 -44
- package/dist/core/components/lexical/InlineContentEditable.js +37 -17
- package/dist/core/components/lexical/InlineLexicalEditor.js +84 -25
- package/dist/core/components/lexical/SelectionBroadcaster.js +84 -47
- package/dist/core/components/lexical/SidebarLexicalEditor.js +54 -19
- package/dist/core/createBlock.js +1172 -414
- package/dist/core/createLayout.js +48 -16
- package/dist/core/hooks/useFieldSelection.js +24 -13
- package/dist/core/hooks/useIsEditable.js +8 -2
- package/dist/core/hooks/useOverlayMessage.js +51 -20
- package/dist/features/content/CamoxContent.js +239 -107
- package/dist/features/content/components/AssetCard.js +78 -16
- package/dist/features/content/components/AssetCardSkeleton.js +11 -4
- package/dist/features/content/components/ContentSidebar.js +15 -8
- package/dist/features/content/components/UploadDropZone.js +77 -34
- package/dist/features/content/components/UploadProgressDrawer.js +201 -58
- package/dist/features/metadata/sitemap.js +15 -0
- package/dist/features/preview/CamoxPreview.js +447 -179
- package/dist/features/preview/components/AddBlockSheet.js +344 -167
- package/dist/features/preview/components/AgentChatSheet.js +32 -10
- package/dist/features/preview/components/AssetFieldEditor.js +185 -50
- package/dist/features/preview/components/AssetLightbox.js +60 -33
- package/dist/features/preview/components/AssetPickerGrid.js +203 -71
- package/dist/features/preview/components/BlockActionsPopover.js +295 -218
- package/dist/features/preview/components/CreatePageSheet.js +3 -3
- package/dist/features/preview/components/DebouncedFieldEditor.js +80 -23
- package/dist/features/preview/components/EditPageSheet.js +241 -86
- package/dist/features/preview/components/ItemFieldsEditor.js +209 -115
- package/dist/features/preview/components/LinkFieldEditor.js +351 -153
- package/dist/features/preview/components/MultipleAssetFieldEditor.js +245 -92
- package/dist/features/preview/components/OverlayTracker.js +58 -23
- package/dist/features/preview/components/Overlays.js +85 -43
- package/dist/features/preview/components/PageContentSheet.js +18 -18
- package/dist/features/preview/components/PageLocationFieldset.js +229 -63
- package/dist/features/preview/components/PagePicker.js +27 -27
- package/dist/features/preview/components/PageTree.js +921 -319
- package/dist/features/preview/components/PeekedBlock.js +173 -63
- package/dist/features/preview/components/PreviewPanel.js +271 -148
- package/dist/features/preview/components/PreviewSideSheet.js +44 -11
- package/dist/features/preview/components/PreviewToolbar.js +262 -59
- package/dist/features/preview/components/RepeatableItemsList.js +187 -78
- package/dist/features/preview/components/ShikiMarkdown.js +46 -20
- package/dist/features/preview/components/TextFormatToolbar.js +81 -23
- package/dist/features/preview/components/UnlinkAssetButton.js +161 -40
- package/dist/features/preview/components/useUpdateBlockPosition.js +64 -47
- package/dist/features/preview/previewStore.d.ts +2 -2
- package/dist/features/provider/CamoxProvider.js +69 -21
- package/dist/features/provider/actionsStore.d.ts +2 -2
- package/dist/features/provider/components/CamoxAppContext.js +15 -5
- package/dist/features/provider/components/CommandPalette.js +199 -92
- package/dist/features/provider/useAdminShortcuts.js +80 -64
- package/dist/features/routes/pageRoute.js +8 -1
- package/dist/features/studio/CamoxStudio.js +45 -9
- package/dist/features/studio/components/EnvironmentMenu.js +47 -12
- package/dist/features/studio/components/Navbar.js +163 -65
- package/dist/features/studio/components/ProjectMenu.d.ts.map +1 -1
- package/dist/features/studio/components/ProjectMenu.js +284 -83
- package/dist/features/studio/components/UserButton.js +21 -6
- package/dist/features/studio/studioStore.d.ts +2 -2
- package/dist/features/studio/useTheme.js +128 -74
- package/dist/features/vite/definitionsSync.d.ts +7 -12
- package/dist/features/vite/definitionsSync.d.ts.map +1 -1
- package/dist/features/vite/definitionsSync.js +5 -16
- package/dist/features/vite/vite.d.ts +0 -3
- package/dist/features/vite/vite.d.ts.map +1 -1
- package/dist/features/vite/vite.js +1 -2
- package/dist/hooks/use-file-upload.js +11 -11
- package/dist/hooks/use-marquee-selection.js +121 -74
- package/dist/lib/auth.js +95 -51
- package/dist/lib/normalized-data.js +103 -30
- package/dist/lib/use-project-room.js +55 -22
- package/dist/studio.css +2 -2
- package/package.json +29 -26
- package/dist/lib/auth.d.ts +0 -2130
- package/dist/lib/auth.d.ts.map +0 -1
|
@@ -1,21 +1,57 @@
|
|
|
1
1
|
import { useAuthState, useSignInRedirect } from "../../lib/auth.js";
|
|
2
2
|
import { Navbar } from "./components/Navbar.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
3
4
|
import * as React from "react";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { Navigate, useLocation } from "@tanstack/react-router";
|
|
6
7
|
//#region src/features/studio/CamoxStudio.tsx
|
|
7
|
-
var CamoxStudio = (
|
|
8
|
+
var CamoxStudio = (t0) => {
|
|
9
|
+
const $ = c(11);
|
|
10
|
+
const { children } = t0;
|
|
8
11
|
const { isAuthenticated, isLoading: isLoadingAuth } = useAuthState();
|
|
9
12
|
const { pathname } = useLocation();
|
|
10
13
|
const signInRedirect = useSignInRedirect();
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
let t1;
|
|
15
|
+
if ($[0] !== isAuthenticated || $[1] !== isLoadingAuth || $[2] !== signInRedirect) {
|
|
16
|
+
t1 = () => {
|
|
17
|
+
if (!isAuthenticated && !isLoadingAuth) signInRedirect();
|
|
18
|
+
};
|
|
19
|
+
$[0] = isAuthenticated;
|
|
20
|
+
$[1] = isLoadingAuth;
|
|
21
|
+
$[2] = signInRedirect;
|
|
22
|
+
$[3] = t1;
|
|
23
|
+
} else t1 = $[3];
|
|
24
|
+
let t2;
|
|
25
|
+
if ($[4] !== isAuthenticated || $[5] !== signInRedirect) {
|
|
26
|
+
t2 = [isAuthenticated, signInRedirect];
|
|
27
|
+
$[4] = isAuthenticated;
|
|
28
|
+
$[5] = signInRedirect;
|
|
29
|
+
$[6] = t2;
|
|
30
|
+
} else t2 = $[6];
|
|
31
|
+
React.useEffect(t1, t2);
|
|
32
|
+
if (pathname === "cmx-studio") {
|
|
33
|
+
let t3;
|
|
34
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
35
|
+
t3 = /* @__PURE__ */ jsx(Navigate, { to: "/" });
|
|
36
|
+
$[7] = t3;
|
|
37
|
+
} else t3 = $[7];
|
|
38
|
+
return t3;
|
|
39
|
+
}
|
|
40
|
+
let t3;
|
|
41
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
42
|
+
t3 = /* @__PURE__ */ jsx(Navbar, {});
|
|
43
|
+
$[8] = t3;
|
|
44
|
+
} else t3 = $[8];
|
|
45
|
+
let t4;
|
|
46
|
+
if ($[9] !== children) {
|
|
47
|
+
t4 = /* @__PURE__ */ jsxs("div", {
|
|
48
|
+
className: "bg-background flex h-screen flex-col overflow-hidden",
|
|
49
|
+
children: [t3, children]
|
|
50
|
+
});
|
|
51
|
+
$[9] = children;
|
|
52
|
+
$[10] = t4;
|
|
53
|
+
} else t4 = $[10];
|
|
54
|
+
return t4;
|
|
19
55
|
};
|
|
20
56
|
//#endregion
|
|
21
57
|
export { CamoxStudio };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AuthContext } from "../../../lib/auth.js";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
2
3
|
import { Popover, PopoverContent, PopoverTrigger } from "@camox/ui/popover";
|
|
3
4
|
import * as React from "react";
|
|
4
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -7,25 +8,44 @@ import { ChevronsUpDown } from "lucide-react";
|
|
|
7
8
|
import { Badge } from "@camox/ui/badge";
|
|
8
9
|
//#region src/features/studio/components/EnvironmentMenu.tsx
|
|
9
10
|
var EnvironmentMenu = () => {
|
|
11
|
+
const $ = c(12);
|
|
10
12
|
const [open, setOpen] = React.useState(false);
|
|
11
13
|
const authCtx = React.useContext(AuthContext);
|
|
12
14
|
if (!authCtx?.environmentName) return null;
|
|
13
15
|
const isProduction = authCtx.environmentName === "production";
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
const badgeClassName = isProduction ? "bg-green-100 text-green-800 border border-green-300 hover:bg-green-100 dark:bg-green-900 dark:text-green-300 dark:border-green-700 dark:hover:bg-green-900 font-mono text-xs" : "bg-yellow-100 text-yellow-800 border border-yellow-300 hover:bg-yellow-100 dark:bg-yellow-900 dark:text-yellow-300 dark:border-yellow-700 dark:hover:bg-yellow-900 font-mono text-xs";
|
|
17
|
+
let t0;
|
|
18
|
+
if ($[0] !== authCtx.environmentName || $[1] !== badgeClassName) {
|
|
19
|
+
t0 = /* @__PURE__ */ jsx(Badge, {
|
|
20
|
+
variant: "secondary",
|
|
21
|
+
className: badgeClassName,
|
|
22
|
+
children: authCtx.environmentName
|
|
23
|
+
});
|
|
24
|
+
$[0] = authCtx.environmentName;
|
|
25
|
+
$[1] = badgeClassName;
|
|
26
|
+
$[2] = t0;
|
|
27
|
+
} else t0 = $[2];
|
|
28
|
+
let t1;
|
|
29
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
30
|
+
t1 = /* @__PURE__ */ jsx(ChevronsUpDown, { className: "shrink-0 opacity-50" });
|
|
31
|
+
$[3] = t1;
|
|
32
|
+
} else t1 = $[3];
|
|
33
|
+
let t2;
|
|
34
|
+
if ($[4] !== t0) {
|
|
35
|
+
t2 = /* @__PURE__ */ jsx(PopoverTrigger, {
|
|
18
36
|
asChild: true,
|
|
19
37
|
children: /* @__PURE__ */ jsxs(Button, {
|
|
20
38
|
variant: "ghost",
|
|
21
39
|
className: "gap-2",
|
|
22
|
-
children: [
|
|
23
|
-
variant: "secondary",
|
|
24
|
-
className: isProduction ? "bg-green-100 text-green-800 border border-green-300 hover:bg-green-100 dark:bg-green-900 dark:text-green-300 dark:border-green-700 dark:hover:bg-green-900 font-mono text-xs" : "bg-yellow-100 text-yellow-800 border border-yellow-300 hover:bg-yellow-100 dark:bg-yellow-900 dark:text-yellow-300 dark:border-yellow-700 dark:hover:bg-yellow-900 font-mono text-xs",
|
|
25
|
-
children: authCtx.environmentName
|
|
26
|
-
}), /* @__PURE__ */ jsx(ChevronsUpDown, { className: "h-4 w-4 shrink-0 opacity-50" })]
|
|
40
|
+
children: [t0, t1]
|
|
27
41
|
})
|
|
28
|
-
})
|
|
42
|
+
});
|
|
43
|
+
$[4] = t0;
|
|
44
|
+
$[5] = t2;
|
|
45
|
+
} else t2 = $[5];
|
|
46
|
+
let t3;
|
|
47
|
+
if ($[6] !== isProduction) {
|
|
48
|
+
t3 = /* @__PURE__ */ jsx(PopoverContent, {
|
|
29
49
|
className: "w-96 p-4",
|
|
30
50
|
align: "start",
|
|
31
51
|
side: "bottom",
|
|
@@ -42,8 +62,23 @@ var EnvironmentMenu = () => {
|
|
|
42
62
|
children: "Switching between environments and transferring data between them is coming soon."
|
|
43
63
|
})] })
|
|
44
64
|
})
|
|
45
|
-
})
|
|
46
|
-
|
|
65
|
+
});
|
|
66
|
+
$[6] = isProduction;
|
|
67
|
+
$[7] = t3;
|
|
68
|
+
} else t3 = $[7];
|
|
69
|
+
let t4;
|
|
70
|
+
if ($[8] !== open || $[9] !== t2 || $[10] !== t3) {
|
|
71
|
+
t4 = /* @__PURE__ */ jsxs(Popover, {
|
|
72
|
+
open,
|
|
73
|
+
onOpenChange: setOpen,
|
|
74
|
+
children: [t2, t3]
|
|
75
|
+
});
|
|
76
|
+
$[8] = open;
|
|
77
|
+
$[9] = t2;
|
|
78
|
+
$[10] = t3;
|
|
79
|
+
$[11] = t4;
|
|
80
|
+
} else t4 = $[11];
|
|
81
|
+
return t4;
|
|
47
82
|
};
|
|
48
83
|
//#endregion
|
|
49
84
|
export { EnvironmentMenu };
|
|
@@ -7,6 +7,7 @@ import { studioStore } from "../studioStore.js";
|
|
|
7
7
|
import { EnvironmentMenu } from "./EnvironmentMenu.js";
|
|
8
8
|
import { ProjectMenu } from "./ProjectMenu.js";
|
|
9
9
|
import { UserButton } from "./UserButton.js";
|
|
10
|
+
import { c } from "react/compiler-runtime";
|
|
10
11
|
import { Kbd } from "@camox/ui/kbd";
|
|
11
12
|
import { useQuery } from "@tanstack/react-query";
|
|
12
13
|
import * as React from "react";
|
|
@@ -27,79 +28,176 @@ var links = [{
|
|
|
27
28
|
icon: "FileText"
|
|
28
29
|
}];
|
|
29
30
|
var Navbar = () => {
|
|
31
|
+
const $ = c(23);
|
|
30
32
|
const projectSlug = useProjectSlug();
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
let t0;
|
|
34
|
+
if ($[0] !== projectSlug) {
|
|
35
|
+
t0 = projectQueries.getBySlug(projectSlug);
|
|
36
|
+
$[0] = projectSlug;
|
|
37
|
+
$[1] = t0;
|
|
38
|
+
} else t0 = $[1];
|
|
39
|
+
const { data: project } = useQuery(t0);
|
|
40
|
+
let t1;
|
|
41
|
+
if ($[2] !== project?.id) {
|
|
42
|
+
t1 = pageQueries.list(project?.id ?? 0);
|
|
43
|
+
$[2] = project?.id;
|
|
44
|
+
$[3] = t1;
|
|
45
|
+
} else t1 = $[3];
|
|
46
|
+
const t2 = !!project;
|
|
47
|
+
let t3;
|
|
48
|
+
if ($[4] !== t1 || $[5] !== t2) {
|
|
49
|
+
t3 = {
|
|
50
|
+
...t1,
|
|
51
|
+
enabled: t2
|
|
52
|
+
};
|
|
53
|
+
$[4] = t1;
|
|
54
|
+
$[5] = t2;
|
|
55
|
+
$[6] = t3;
|
|
56
|
+
} else t3 = $[6];
|
|
57
|
+
const { data: pages } = useQuery(t3);
|
|
58
|
+
const isMac = navigator.userAgent.toUpperCase().indexOf("MAC") >= 0;
|
|
37
59
|
const { pathname } = useLocation();
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
60
|
+
const t4 = useIsPreviewSheetOpen() ? "opacity-60" : "opacity-0";
|
|
61
|
+
let t5;
|
|
62
|
+
if ($[7] !== t4) {
|
|
63
|
+
t5 = cn("absolute top-0 left-0 w-full h-[calc(100%+2px)] bg-black transition-opacity z-10 will-change-auto pointer-events-none", t4);
|
|
64
|
+
$[7] = t4;
|
|
65
|
+
$[8] = t5;
|
|
66
|
+
} else t5 = $[8];
|
|
67
|
+
let t6;
|
|
68
|
+
if ($[9] !== t5) {
|
|
69
|
+
t6 = /* @__PURE__ */ jsx("div", { className: t5 });
|
|
70
|
+
$[9] = t5;
|
|
71
|
+
$[10] = t6;
|
|
72
|
+
} else t6 = $[10];
|
|
73
|
+
let t7;
|
|
74
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
75
|
+
t7 = /* @__PURE__ */ jsxs("div", {
|
|
76
|
+
className: "flew-row flex gap-1",
|
|
77
|
+
children: [/* @__PURE__ */ jsx(ProjectMenu, {}), /* @__PURE__ */ jsx(EnvironmentMenu, {})]
|
|
78
|
+
});
|
|
79
|
+
$[11] = t7;
|
|
80
|
+
} else t7 = $[11];
|
|
81
|
+
let t8;
|
|
82
|
+
if ($[12] !== pages || $[13] !== pathname) {
|
|
83
|
+
t8 = links.map((link, index) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Link, {
|
|
84
|
+
to: link.to,
|
|
85
|
+
className: cn("flex gap-2 items-center rounded-md px-4 py-2 text-sm font-medium", "hover:bg-accent hover:text-accent-foreground outline-none transition-[color,box-shadow] focus-visible:ring-ring/50 focus-visible:ring-[3px] focus-visible:outline-1", pages?.some((page) => page.fullPath === pathname) && index === 0 ? "bg-accent hover:bg-accent text-accent-foreground" : "text-muted-foreground"),
|
|
86
|
+
activeProps: { className: "bg-accent hover:bg-accent text-accent-foreground!" },
|
|
87
|
+
children: link.children
|
|
88
|
+
}) }, link.to));
|
|
89
|
+
$[12] = pages;
|
|
90
|
+
$[13] = pathname;
|
|
91
|
+
$[14] = t8;
|
|
92
|
+
} else t8 = $[14];
|
|
93
|
+
let t9;
|
|
94
|
+
if ($[15] !== t8) {
|
|
95
|
+
t9 = /* @__PURE__ */ jsxs("div", {
|
|
96
|
+
className: "flex flex-row gap-2",
|
|
97
|
+
children: [t7, /* @__PURE__ */ jsx("ul", {
|
|
98
|
+
className: "flex items-center gap-1",
|
|
99
|
+
children: t8
|
|
100
|
+
})]
|
|
101
|
+
});
|
|
102
|
+
$[15] = t8;
|
|
103
|
+
$[16] = t9;
|
|
104
|
+
} else t9 = $[16];
|
|
105
|
+
let t10;
|
|
106
|
+
let t11;
|
|
107
|
+
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
108
|
+
t10 = /* @__PURE__ */ jsx(SearchIcon, { className: "text-muted-foreground size-4" });
|
|
109
|
+
t11 = /* @__PURE__ */ jsx("span", {
|
|
110
|
+
className: "text-muted-foreground",
|
|
111
|
+
children: "Quick find"
|
|
112
|
+
});
|
|
113
|
+
$[17] = t10;
|
|
114
|
+
$[18] = t11;
|
|
115
|
+
} else {
|
|
116
|
+
t10 = $[17];
|
|
117
|
+
t11 = $[18];
|
|
118
|
+
}
|
|
119
|
+
let t12;
|
|
120
|
+
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
121
|
+
t12 = /* @__PURE__ */ jsxs("div", {
|
|
122
|
+
className: "flex items-center gap-2",
|
|
123
|
+
children: [/* @__PURE__ */ jsxs(Button, {
|
|
124
|
+
variant: "outline",
|
|
125
|
+
onClick: _temp,
|
|
126
|
+
children: [
|
|
127
|
+
t10,
|
|
128
|
+
t11,
|
|
129
|
+
/* @__PURE__ */ jsxs(Kbd, {
|
|
130
|
+
className: "ml-4",
|
|
131
|
+
children: [isMac ? "⌘" : "Ctrl", " K"]
|
|
132
|
+
})
|
|
133
|
+
]
|
|
134
|
+
}), /* @__PURE__ */ jsx(UserButton, {})]
|
|
135
|
+
});
|
|
136
|
+
$[19] = t12;
|
|
137
|
+
} else t12 = $[19];
|
|
138
|
+
let t13;
|
|
139
|
+
if ($[20] !== t6 || $[21] !== t9) {
|
|
140
|
+
t13 = /* @__PURE__ */ jsxs("nav", {
|
|
141
|
+
className: "relative flex items-center justify-between gap-4 border-b-2 bg-transparent px-2 py-2",
|
|
142
|
+
children: [
|
|
143
|
+
t6,
|
|
144
|
+
t9,
|
|
145
|
+
t12
|
|
146
|
+
]
|
|
147
|
+
});
|
|
148
|
+
$[20] = t6;
|
|
149
|
+
$[21] = t9;
|
|
150
|
+
$[22] = t13;
|
|
151
|
+
} else t13 = $[22];
|
|
152
|
+
return t13;
|
|
77
153
|
};
|
|
78
154
|
function useNavbarActions() {
|
|
155
|
+
const $ = c(3);
|
|
79
156
|
const navigate = useNavigate();
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
});
|
|
96
|
-
return () => {
|
|
157
|
+
let t0;
|
|
158
|
+
let t1;
|
|
159
|
+
if ($[0] !== navigate) {
|
|
160
|
+
t0 = () => {
|
|
161
|
+
const actions = links.map((link, index) => ({
|
|
162
|
+
id: `navigate-to-${link.to}`,
|
|
163
|
+
label: `Go to ${link.title}`,
|
|
164
|
+
groupLabel: "Navigation",
|
|
165
|
+
checkIfAvailable: _temp2,
|
|
166
|
+
execute: () => {
|
|
167
|
+
navigate({ to: link.to });
|
|
168
|
+
},
|
|
169
|
+
shortcut: { key: String(index + 1) },
|
|
170
|
+
icon: link.icon
|
|
171
|
+
}));
|
|
97
172
|
actionsStore.send({
|
|
98
|
-
type: "
|
|
99
|
-
|
|
173
|
+
type: "registerManyActions",
|
|
174
|
+
actions
|
|
100
175
|
});
|
|
176
|
+
return () => {
|
|
177
|
+
actionsStore.send({
|
|
178
|
+
type: "unregisterManyActions",
|
|
179
|
+
ids: actions.map(_temp3)
|
|
180
|
+
});
|
|
181
|
+
};
|
|
101
182
|
};
|
|
102
|
-
|
|
183
|
+
t1 = [navigate];
|
|
184
|
+
$[0] = navigate;
|
|
185
|
+
$[1] = t0;
|
|
186
|
+
$[2] = t1;
|
|
187
|
+
} else {
|
|
188
|
+
t0 = $[1];
|
|
189
|
+
t1 = $[2];
|
|
190
|
+
}
|
|
191
|
+
React.useEffect(t0, t1);
|
|
192
|
+
}
|
|
193
|
+
function _temp3(a) {
|
|
194
|
+
return a.id;
|
|
195
|
+
}
|
|
196
|
+
function _temp2() {
|
|
197
|
+
return true;
|
|
198
|
+
}
|
|
199
|
+
function _temp() {
|
|
200
|
+
return studioStore.send({ type: "openCommandPalette" });
|
|
103
201
|
}
|
|
104
202
|
//#endregion
|
|
105
203
|
export { Navbar, useNavbarActions };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectMenu.d.ts","sourceRoot":"","sources":["../../../../src/features/studio/components/ProjectMenu.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProjectMenu.d.ts","sourceRoot":"","sources":["../../../../src/features/studio/components/ProjectMenu.tsx"],"names":[],"mappings":"AAwEA,eAAO,MAAM,WAAW,+CA8EvB,CAAC"}
|