@arch-cadre/panel 0.0.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.
Files changed (97) hide show
  1. package/dist/actions/actions.cjs +18 -0
  2. package/dist/actions/actions.d.ts +4 -0
  3. package/dist/actions/actions.mjs +10 -0
  4. package/dist/actions/index.cjs +27 -0
  5. package/dist/actions/index.d.ts +2 -0
  6. package/dist/actions/index.mjs +2 -0
  7. package/dist/actions/manager.cjs +138 -0
  8. package/dist/actions/manager.d.ts +14 -0
  9. package/dist/actions/manager.mjs +135 -0
  10. package/dist/actions/profile.cjs +169 -0
  11. package/dist/actions/profile.d.ts +8 -0
  12. package/dist/actions/profile.mjs +135 -0
  13. package/dist/actions/settings.cjs +26 -0
  14. package/dist/actions/settings.d.ts +7 -0
  15. package/dist/actions/settings.mjs +20 -0
  16. package/dist/index.cjs +29 -0
  17. package/dist/index.d.ts +3 -0
  18. package/dist/index.mjs +25 -0
  19. package/dist/intl.d.ts +9 -0
  20. package/dist/navigation.cjs +38 -0
  21. package/dist/navigation.d.ts +2 -0
  22. package/dist/navigation.mjs +39 -0
  23. package/dist/routes.cjs +71 -0
  24. package/dist/routes.d.ts +4 -0
  25. package/dist/routes.mjs +71 -0
  26. package/dist/types.cjs +1 -0
  27. package/dist/types.d.ts +13 -0
  28. package/dist/types.mjs +0 -0
  29. package/dist/ui/[...catchAll]/page.cjs +127 -0
  30. package/dist/ui/[...catchAll]/page.d.ts +13 -0
  31. package/dist/ui/[...catchAll]/page.mjs +88 -0
  32. package/dist/ui/components/app-content.cjs +49 -0
  33. package/dist/ui/components/app-content.d.ts +6 -0
  34. package/dist/ui/components/app-content.mjs +34 -0
  35. package/dist/ui/components/app-header.cjs +55 -0
  36. package/dist/ui/components/app-header.d.ts +6 -0
  37. package/dist/ui/components/app-header.mjs +45 -0
  38. package/dist/ui/components/app-sidebar.cjs +133 -0
  39. package/dist/ui/components/app-sidebar.d.ts +17 -0
  40. package/dist/ui/components/app-sidebar.mjs +142 -0
  41. package/dist/ui/components/app-user.cjs +102 -0
  42. package/dist/ui/components/app-user.d.ts +2 -0
  43. package/dist/ui/components/app-user.mjs +92 -0
  44. package/dist/ui/components/breadcrumb-slot.cjs +35 -0
  45. package/dist/ui/components/breadcrumb-slot.d.ts +2 -0
  46. package/dist/ui/components/breadcrumb-slot.mjs +31 -0
  47. package/dist/ui/components/manager/module-card.cjs +213 -0
  48. package/dist/ui/components/manager/module-card.d.ts +12 -0
  49. package/dist/ui/components/manager/module-card.mjs +197 -0
  50. package/dist/ui/components/manager/module-list.cjs +52 -0
  51. package/dist/ui/components/manager/module-list.d.ts +4 -0
  52. package/dist/ui/components/manager/module-list.mjs +16 -0
  53. package/dist/ui/components/manager/module-upload.cjs +81 -0
  54. package/dist/ui/components/manager/module-upload.d.ts +2 -0
  55. package/dist/ui/components/manager/module-upload.mjs +68 -0
  56. package/dist/ui/components/profile/components.cjs +239 -0
  57. package/dist/ui/components/profile/components.d.ts +8 -0
  58. package/dist/ui/components/profile/components.mjs +219 -0
  59. package/dist/ui/components/profile/link.cjs +25 -0
  60. package/dist/ui/components/profile/link.d.ts +1 -0
  61. package/dist/ui/components/profile/link.mjs +13 -0
  62. package/dist/ui/components/profile/page.cjs +41 -0
  63. package/dist/ui/components/profile/page.d.ts +1 -0
  64. package/dist/ui/components/profile/page.mjs +21 -0
  65. package/dist/ui/components/sidebar-slot.cjs +49 -0
  66. package/dist/ui/components/sidebar-slot.d.ts +2 -0
  67. package/dist/ui/components/sidebar-slot.mjs +33 -0
  68. package/dist/ui/dashboard/page.cjs +31 -0
  69. package/dist/ui/dashboard/page.d.ts +2 -0
  70. package/dist/ui/dashboard/page.mjs +9 -0
  71. package/dist/ui/error.cjs +50 -0
  72. package/dist/ui/error.d.ts +7 -0
  73. package/dist/ui/error.mjs +35 -0
  74. package/dist/ui/layout.cjs +48 -0
  75. package/dist/ui/layout.d.ts +4 -0
  76. package/dist/ui/layout.mjs +35 -0
  77. package/dist/ui/modules/docs/page.cjs +98 -0
  78. package/dist/ui/modules/docs/page.d.ts +6 -0
  79. package/dist/ui/modules/docs/page.mjs +46 -0
  80. package/dist/ui/modules/page.cjs +30 -0
  81. package/dist/ui/modules/page.d.ts +2 -0
  82. package/dist/ui/modules/page.mjs +10 -0
  83. package/dist/ui/page.cjs +18 -0
  84. package/dist/ui/page.d.ts +1 -0
  85. package/dist/ui/page.mjs +9 -0
  86. package/dist/ui/router.cjs +61 -0
  87. package/dist/ui/router.d.ts +5 -0
  88. package/dist/ui/router.mjs +51 -0
  89. package/dist/ui/settings/page.cjs +61 -0
  90. package/dist/ui/settings/page.d.ts +2 -0
  91. package/dist/ui/settings/page.mjs +22 -0
  92. package/dist/ui/settings-page.cjs +76 -0
  93. package/dist/ui/settings-page.d.ts +2 -0
  94. package/dist/ui/settings-page.mjs +57 -0
  95. package/locales/en/global.json +80 -0
  96. package/manifest.json +11 -0
  97. package/package.json +67 -0
@@ -0,0 +1,51 @@
1
+ import { checkSecurity, getCurrentSession } from "@arch-cadre/core/server";
2
+ import { getKryoModuleRoutes } from "@arch-cadre/modules/server";
3
+ import { redirect } from "next/navigation";
4
+ import * as React from "react";
5
+ import KryoLayout from "./layout.mjs";
6
+ function matchRoute(pattern, path) {
7
+ const paramNames = [];
8
+ const regexPattern = pattern.replace(/:([^/]+)/g, (_, name) => {
9
+ paramNames.push(name);
10
+ return "([^/]+)";
11
+ }).replace(/\//g, "\\/");
12
+ const regex = new RegExp(`^${regexPattern}$`);
13
+ const match = path.match(regex);
14
+ if (!match) return null;
15
+ const params = {};
16
+ paramNames.forEach((name, index) => {
17
+ params[name] = match[index + 1];
18
+ });
19
+ return params;
20
+ }
21
+ export async function KryoRouter({
22
+ path,
23
+ searchParams
24
+ }) {
25
+ const routes = await getKryoModuleRoutes();
26
+ for (const route of routes) {
27
+ const params = matchRoute(route.path, path);
28
+ if (params) {
29
+ if (route.auth) {
30
+ const { user, session } = await getCurrentSession();
31
+ if (!user || !session) {
32
+ return redirect("/signin");
33
+ }
34
+ const security = await checkSecurity(
35
+ session,
36
+ user,
37
+ route.roles,
38
+ route.permissions
39
+ );
40
+ if (!security.satisfied) {
41
+ return redirect(security.redirect || "/signin");
42
+ }
43
+ }
44
+ const Component = route.component;
45
+ const Layout = route.layout || KryoLayout;
46
+ const content = /* @__PURE__ */ React.createElement(Component, { params, searchParams });
47
+ return /* @__PURE__ */ React.createElement(Layout, null, content);
48
+ }
49
+ }
50
+ return null;
51
+ }
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ module.exports = GlobalSettingsPage;
7
+ var _server = require("@arch-cadre/intl/server");
8
+ var _server2 = require("@arch-cadre/modules/server");
9
+ var _card = require("@arch-cadre/ui/components/card");
10
+ var _react = require("@iconify/react");
11
+ var _link = _interopRequireDefault(require("next/link"));
12
+ var React = _interopRequireWildcard(require("react"));
13
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
14
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
+ async function GlobalSettingsPage() {
17
+ const groups = await (0, _server2.getKryoModuleNavigationGrouped)("settings");
18
+ const {
19
+ t
20
+ } = await (0, _server.getTranslation)();
21
+ return /* @__PURE__ */React.createElement("div", {
22
+ className: "container mx-auto py-10 px-4 space-y-8"
23
+ }, /* @__PURE__ */React.createElement("div", null, /* @__PURE__ */React.createElement("h1", {
24
+ className: "text-3xl font-bold tracking-tight"
25
+ }, t("Settings Overview")), /* @__PURE__ */React.createElement("p", {
26
+ className: "text-muted-foreground"
27
+ }, t("Manage your global settings"))), /* @__PURE__ */React.createElement("div", {
28
+ className: "grid gap-6"
29
+ }, Object.entries(groups).map(([groupName, items]) => /* @__PURE__ */React.createElement("div", {
30
+ key: groupName,
31
+ className: "space-y-4"
32
+ }, /* @__PURE__ */React.createElement("h2", {
33
+ className: "text-xl font-semibold tracking-tight px-1"
34
+ }, groupName), /* @__PURE__ */React.createElement("div", {
35
+ className: "grid gap-4 md:grid-cols-2 lg:grid-cols-3"
36
+ }, items.map(item => /* @__PURE__ */React.createElement(_link.default, {
37
+ key: item.url,
38
+ href: item.url,
39
+ className: "block group"
40
+ }, /* @__PURE__ */React.createElement(_card.Card, {
41
+ className: "h-full transition-colors hover:border-primary/50 hover:bg-accent/5"
42
+ }, /* @__PURE__ */React.createElement(_card.CardHeader, {
43
+ className: "flex flex-row items-center space-y-0 gap-4"
44
+ }, /* @__PURE__ */React.createElement("div", {
45
+ className: "size-10 flex items-center justify-center rounded-lg bg-primary/10 text-primary group-hover:bg-primary group-hover:text-primary-foreground transition-colors"
46
+ }, item.icon ? /* @__PURE__ */React.createElement(_react.Icon, {
47
+ icon: item.icon,
48
+ className: "size-5"
49
+ }) : /* @__PURE__ */React.createElement(_react.Icon, {
50
+ icon: "solar:settings-linear",
51
+ className: "size-5"
52
+ })), /* @__PURE__ */React.createElement("div", {
53
+ className: "space-y-1"
54
+ }, /* @__PURE__ */React.createElement(_card.CardTitle, {
55
+ className: "text-base"
56
+ }, t(item.title)))))))))), Object.keys(groups).length === 0 && /* @__PURE__ */React.createElement(_card.Card, {
57
+ className: "border-dashed"
58
+ }, /* @__PURE__ */React.createElement(_card.CardContent, {
59
+ className: "py-10 text-center text-muted-foreground"
60
+ }, t("No settings available")))));
61
+ }
@@ -0,0 +1,2 @@
1
+ import * as React from "react";
2
+ export default function GlobalSettingsPage(): Promise<React.JSX.Element>;
@@ -0,0 +1,22 @@
1
+ import { getTranslation } from "@arch-cadre/intl/server";
2
+ import { getKryoModuleNavigationGrouped } from "@arch-cadre/modules/server";
3
+ import {
4
+ Card,
5
+ CardContent,
6
+ CardHeader,
7
+ CardTitle
8
+ } from "@arch-cadre/ui/components/card";
9
+ import { Icon } from "@iconify/react";
10
+ import Link from "next/link";
11
+ import * as React from "react";
12
+ export default async function GlobalSettingsPage() {
13
+ const groups = await getKryoModuleNavigationGrouped("settings");
14
+ const { t } = await getTranslation();
15
+ return /* @__PURE__ */ React.createElement("div", { className: "container mx-auto py-10 px-4 space-y-8" }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("h1", { className: "text-3xl font-bold tracking-tight" }, t("Settings Overview")), /* @__PURE__ */ React.createElement("p", { className: "text-muted-foreground" }, t("Manage your global settings"))), /* @__PURE__ */ React.createElement("div", { className: "grid gap-6" }, Object.entries(groups).map(([groupName, items]) => /* @__PURE__ */ React.createElement("div", { key: groupName, className: "space-y-4" }, /* @__PURE__ */ React.createElement("h2", { className: "text-xl font-semibold tracking-tight px-1" }, groupName), /* @__PURE__ */ React.createElement("div", { className: "grid gap-4 md:grid-cols-2 lg:grid-cols-3" }, items.map((item) => /* @__PURE__ */ React.createElement(Link, { key: item.url, href: item.url, className: "block group" }, /* @__PURE__ */ React.createElement(Card, { className: "h-full transition-colors hover:border-primary/50 hover:bg-accent/5" }, /* @__PURE__ */ React.createElement(CardHeader, { className: "flex flex-row items-center space-y-0 gap-4" }, /* @__PURE__ */ React.createElement("div", { className: "size-10 flex items-center justify-center rounded-lg bg-primary/10 text-primary group-hover:bg-primary group-hover:text-primary-foreground transition-colors" }, item.icon ? /* @__PURE__ */ React.createElement(Icon, { icon: item.icon, className: "size-5" }) : /* @__PURE__ */ React.createElement(
16
+ Icon,
17
+ {
18
+ icon: "solar:settings-linear",
19
+ className: "size-5"
20
+ }
21
+ )), /* @__PURE__ */ React.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ React.createElement(CardTitle, { className: "text-base" }, t(item.title)))))))))), Object.keys(groups).length === 0 && /* @__PURE__ */ React.createElement(Card, { className: "border-dashed" }, /* @__PURE__ */ React.createElement(CardContent, { className: "py-10 text-center text-muted-foreground" }, t("No settings available")))));
22
+ }
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ "use client";
3
+
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ module.exports = KryoPanelSettingsPage;
8
+ var _intl = require("@arch-cadre/intl");
9
+ var _button = require("@arch-cadre/ui/components/button");
10
+ var _card = require("@arch-cadre/ui/components/card");
11
+ var _input = require("@arch-cadre/ui/components/input");
12
+ var _label = require("@arch-cadre/ui/components/label");
13
+ var _react = _interopRequireWildcard(require("react"));
14
+ var React = _react;
15
+ var _sonner = require("sonner");
16
+ var _settings = require("../actions/settings.cjs");
17
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
18
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
+ function KryoPanelSettingsPage() {
20
+ const [config, setConfig] = (0, _react.useState)({
21
+ pathPrefix: "/kryo"
22
+ });
23
+ const {
24
+ t
25
+ } = (0, _intl.useTranslation)();
26
+ const [loading, setLoading] = (0, _react.useState)(true);
27
+ (0, _react.useEffect)(() => {
28
+ (0, _settings.getKryoConfig)().then(data => {
29
+ setConfig(data);
30
+ setLoading(false);
31
+ });
32
+ }, []);
33
+ const handleSave = async e => {
34
+ e.preventDefault();
35
+ try {
36
+ await (0, _settings.updateKryoConfig)(config);
37
+ _sonner.toast.success(t("Panel settings saved. Your admin path has changed!"));
38
+ if (typeof window !== "undefined") {
39
+ const newPath = config.pathPrefix.endsWith("/") ? `${config.pathPrefix}config` : `${config.pathPrefix}/config`;
40
+ window.location.href = newPath;
41
+ }
42
+ } catch (error) {
43
+ _sonner.toast.error(error.message || t("Failed to save settings"));
44
+ }
45
+ };
46
+ if (loading) return /* @__PURE__ */React.createElement("div", {
47
+ className: "p-10 text-center"
48
+ }, t("Loading..."));
49
+ return /* @__PURE__ */React.createElement("div", {
50
+ className: "container mx-auto py-10 max-w-2xl px-4"
51
+ }, /* @__PURE__ */React.createElement(_card.Card, {
52
+ className: "border-primary/10"
53
+ }, /* @__PURE__ */React.createElement(_card.CardHeader, null, /* @__PURE__ */React.createElement(_card.CardTitle, null, t("Kryo Panel Settings")), /* @__PURE__ */React.createElement(_card.CardDescription, null, t("Manage kryo-panel settings"))), /* @__PURE__ */React.createElement(_card.CardContent, null, /* @__PURE__ */React.createElement("form", {
54
+ onSubmit: handleSave,
55
+ className: "space-y-6"
56
+ }, /* @__PURE__ */React.createElement("div", {
57
+ className: "space-y-2"
58
+ }, /* @__PURE__ */React.createElement(_label.Label, {
59
+ htmlFor: "pathPrefix"
60
+ }, t("Path Prefix")), /* @__PURE__ */React.createElement("div", {
61
+ className: "flex gap-2"
62
+ }, /* @__PURE__ */React.createElement(_input.Input, {
63
+ id: "pathPrefix",
64
+ value: config.pathPrefix,
65
+ onChange: e => setConfig({
66
+ ...config,
67
+ pathPrefix: e.target.value
68
+ }),
69
+ placeholder: "/kryo"
70
+ })), /* @__PURE__ */React.createElement("p", {
71
+ className: "text-[11px] italic bg-amber-50 p-2 rounded squircle border border-amber-100 text-amber-800"
72
+ }, /* @__PURE__ */React.createElement("strong", null, t("Warning")), " ", t("Warning changing the path prefix may affect existing links and bookmarks. Make sure to update any references to the admin panel URL accordingly."))), /* @__PURE__ */React.createElement(_button.Button, {
73
+ type: "submit",
74
+ className: "w-full"
75
+ }, t("Save Configuration"))))));
76
+ }
@@ -0,0 +1,2 @@
1
+ import * as React from "react";
2
+ export default function KryoPanelSettingsPage(): React.JSX.Element;
@@ -0,0 +1,57 @@
1
+ "use client";
2
+ import { useTranslation } from "@arch-cadre/intl";
3
+ import { Button } from "@arch-cadre/ui/components/button";
4
+ import {
5
+ Card,
6
+ CardContent,
7
+ CardDescription,
8
+ CardHeader,
9
+ CardTitle
10
+ } from "@arch-cadre/ui/components/card";
11
+ import { Input } from "@arch-cadre/ui/components/input";
12
+ import { Label } from "@arch-cadre/ui/components/label";
13
+ import * as React from "react";
14
+ import { useEffect, useState } from "react";
15
+ import { toast } from "sonner";
16
+ import {
17
+ getKryoConfig,
18
+ updateKryoConfig
19
+ } from "../actions/settings.mjs";
20
+ export default function KryoPanelSettingsPage() {
21
+ const [config, setConfig] = useState({
22
+ pathPrefix: "/kryo"
23
+ });
24
+ const { t } = useTranslation();
25
+ const [loading, setLoading] = useState(true);
26
+ useEffect(() => {
27
+ getKryoConfig().then((data) => {
28
+ setConfig(data);
29
+ setLoading(false);
30
+ });
31
+ }, []);
32
+ const handleSave = async (e) => {
33
+ e.preventDefault();
34
+ try {
35
+ await updateKryoConfig(config);
36
+ toast.success(t("Panel settings saved. Your admin path has changed!"));
37
+ if (typeof window !== "undefined") {
38
+ const newPath = config.pathPrefix.endsWith("/") ? `${config.pathPrefix}config` : `${config.pathPrefix}/config`;
39
+ window.location.href = newPath;
40
+ }
41
+ } catch (error) {
42
+ toast.error(error.message || t("Failed to save settings"));
43
+ }
44
+ };
45
+ if (loading) return /* @__PURE__ */ React.createElement("div", { className: "p-10 text-center" }, t("Loading..."));
46
+ return /* @__PURE__ */ React.createElement("div", { className: "container mx-auto py-10 max-w-2xl px-4" }, /* @__PURE__ */ React.createElement(Card, { className: "border-primary/10" }, /* @__PURE__ */ React.createElement(CardHeader, null, /* @__PURE__ */ React.createElement(CardTitle, null, t("Kryo Panel Settings")), /* @__PURE__ */ React.createElement(CardDescription, null, t("Manage kryo-panel settings"))), /* @__PURE__ */ React.createElement(CardContent, null, /* @__PURE__ */ React.createElement("form", { onSubmit: handleSave, className: "space-y-6" }, /* @__PURE__ */ React.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React.createElement(Label, { htmlFor: "pathPrefix" }, t("Path Prefix")), /* @__PURE__ */ React.createElement("div", { className: "flex gap-2" }, /* @__PURE__ */ React.createElement(
47
+ Input,
48
+ {
49
+ id: "pathPrefix",
50
+ value: config.pathPrefix,
51
+ onChange: (e) => setConfig({ ...config, pathPrefix: e.target.value }),
52
+ placeholder: "/kryo"
53
+ }
54
+ )), /* @__PURE__ */ React.createElement("p", { className: "text-[11px] italic bg-amber-50 p-2 rounded squircle border border-amber-100 text-amber-800" }, /* @__PURE__ */ React.createElement("strong", null, t("Warning")), " ", t(
55
+ "Warning changing the path prefix may affect existing links and bookmarks. Make sure to update any references to the admin panel URL accordingly."
56
+ ))), /* @__PURE__ */ React.createElement(Button, { type: "submit", className: "w-full" }, t("Save Configuration"))))));
57
+ }
@@ -0,0 +1,80 @@
1
+ {
2
+ "Panel settings saved. Your admin path has changed!": "Panel settings saved. Your admin path has changed!",
3
+ "Failed to save settings": "Failed to save settings",
4
+ "Kryo Panel Settings": "Kryo Panel Settings",
5
+ "Manage kryo-panel settings": "Manage kryo-panel settings",
6
+ "Path Prefix": "Path Prefix",
7
+ "Warning": "Warning",
8
+ "Warning changing the path prefix may affect existing links and bookmarks. Make sure to update any references to the admin panel URL accordingly.": "Warning changing the path prefix may affect existing links and bookmarks. Make sure to update any references to the admin panel URL accordingly.",
9
+ "Save Configuration": "Save Configuration",
10
+ "Error": "Error",
11
+ "An error occurred while loading the page.": "An error occurred while loading the page.",
12
+ "errors": {
13
+ "db_error": "errors.db_error"
14
+ },
15
+ "Settings": "Settings",
16
+ "Check database connection": "Check database connection",
17
+ "Check core settings": "Check core settings",
18
+ "Check module dependencies": "Check module dependencies",
19
+ "Unauthorized": "Unauthorized",
20
+ "Unauthorized access to the requested resource": "Unauthorized access to the requested resource",
21
+ "Check permissions for the current user": "Check permissions for the current user",
22
+ "Unknown error": "Unknown error",
23
+ "Try Again": "Try Again",
24
+ "Pos": "Pos",
25
+ "Settings Overview": "Settings Overview",
26
+ "Manage your global settings": "Manage your global settings",
27
+ "No settings available": "No settings available",
28
+ "Modules Marketplace": "Modules Marketplace",
29
+ "Manage your installed modules": "Manage your installed modules",
30
+ "Welcome {name}": "Welcome {name}",
31
+ "Back to Dashboard": "Back to Dashboard",
32
+ "Dashboard": "Dashboard",
33
+ "Logout successful!": "Logout successful!",
34
+ "error_occurred": "error_occurred",
35
+ "user": {
36
+ "upgrade": "user.upgrade",
37
+ "billing": "user.billing",
38
+ "notifications": "user.notifications"
39
+ },
40
+ "edit": "edit",
41
+ "sidebar": {
42
+ "settings": "sidebar.settings",
43
+ "dashboard": "sidebar.dashboard"
44
+ },
45
+ "Logout": "Logout",
46
+ "Not Found": "Not Found",
47
+ "Not found documentation for path": "Not found documentation for path",
48
+ "back": "back",
49
+ "docs": {
50
+ "title": "docs.title",
51
+ "browsing": "docs.browsing",
52
+ "back": "docs.back",
53
+ "file": "docs.file"
54
+ },
55
+ "Invalid file": "Invalid file",
56
+ "Uploading...": "Uploading...",
57
+ "Upload successful": "Upload successful",
58
+ "Upload error": "Upload error",
59
+ "No write access": "No write access",
60
+ "Upload disabled": "Upload disabled",
61
+ "Upload module": "Upload module",
62
+ "Public Modules": "Public Modules",
63
+ "Core Modules": "Core Modules",
64
+ "Waiting...": "Waiting...",
65
+ "Starting...": "Starting...",
66
+ "View documentation": "View documentation",
67
+ "Working...": "Working...",
68
+ "Enabled": "Enabled",
69
+ "Disabled": "Disabled",
70
+ "Installed": "Installed",
71
+ "Processing": "Processing",
72
+ "No dependencies": "No dependencies",
73
+ "Extends": "Extends",
74
+ "Requires": "Requires",
75
+ "General": "General",
76
+ "System": "System",
77
+ "Module Manager": "Module Manager",
78
+ "Panel Core": "Panel Core",
79
+ "Panel Core Settings": "Panel Core Settings"
80
+ }
package/manifest.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "id": "panel",
3
+ "name": "Kryo Panel",
4
+ "version": "0.0.1",
5
+ "description": "Main dashboard panel for Kryo Framework.",
6
+ "enabled": true,
7
+ "system": true,
8
+ "dependencies": ["auth-module", "setup-module"],
9
+ "extends": [],
10
+ "isNpm": true
11
+ }
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "@arch-cadre/panel",
3
+ "version": "0.0.1",
4
+ "type": "module",
5
+ "description": "Panel module for Kryo framework",
6
+ "exports": {
7
+ "./package.json": "./package.json",
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.mjs",
11
+ "require": "./dist/index.cjs"
12
+ },
13
+ "./actions": {
14
+ "types": "./dist/actions/index.d.ts",
15
+ "import": "./dist/actions/index.mjs",
16
+ "require": "./dist/actions/index.cjs"
17
+ },
18
+ "./router": {
19
+ "types": "./dist/ui/router.d.ts",
20
+ "import": "./dist/ui/router.mjs",
21
+ "require": "./dist/ui/router.cjs"
22
+ }
23
+ },
24
+ "files": [
25
+ "dist",
26
+ "locales",
27
+ "manifest.json"
28
+ ],
29
+ "scripts": {
30
+ "release": "npm publish --access public --no-git-checks",
31
+ "clean": "rm -rf ./dist",
32
+ "switch:dev": "node scripts/switchToSrc.js",
33
+ "switch:prod": "node scripts/switchToDist.js",
34
+ "build": "unbuild",
35
+ "dev": "unbuild --stub",
36
+ "lint": "biome check --write"
37
+ },
38
+ "dependencies": {
39
+ "@arch-cadre/modules": "^0.0.15",
40
+ "@hookform/resolvers": "^3.10.0",
41
+ "react-hook-form": "^7.54.2",
42
+ "@iconify-json/solar": "^1.2.2",
43
+ "@iconify/react": "^6.0.0",
44
+ "adm-zip": "^0.5.16",
45
+ "lucide-react": "^0.475.0",
46
+ "sonner": "^2.0.7",
47
+ "zod": "^3.24.1"
48
+ },
49
+ "devDependencies": {
50
+ "@arch-cadre/core": "^0.0.15",
51
+ "@types/adm-zip": "^0.5.7",
52
+ "@types/node": "^20.19.9",
53
+ "@types/react": "^19",
54
+ "@types/react-dom": "^19",
55
+ "typescript": "^5.3.3",
56
+ "unbuild": "^3.6.1"
57
+ },
58
+ "peerDependencies": {
59
+ "@arch-cadre/core": "^0.0.15",
60
+ "@arch-cadre/intl": "^0.0.15",
61
+ "@arch-cadre/ui": "^0.0.15",
62
+ "next": ">=13.0.0",
63
+ "react": "^19.0.0",
64
+ "react-dom": "^19.0.0"
65
+ },
66
+ "main": "./dist/index.mjs"
67
+ }