@hot-updater/console 0.30.12 → 0.31.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 (34) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/BaseTanStackRouterDevtoolsPanel-Bmws3ikM-q5p5qKUx.js +486 -0
  3. package/.output/public/assets/FloatingTanStackRouterDevtools-B7vy70jP-Bzs2Gthe.js +1 -0
  4. package/.output/public/assets/clsx-CbprLf2V.js +1 -0
  5. package/.output/public/assets/dist-B5egZOkC.js +9 -0
  6. package/.output/public/assets/main-DrVuFR7r.js +10 -0
  7. package/.output/public/assets/preload-helper-C5ST2IKa.js +1 -0
  8. package/.output/public/assets/routes-C_bgs7kg.js +54 -0
  9. package/.output/public/assets/styles-DZ0tCVA1.css +2 -0
  10. package/.output/server/{__tanstack-start-server-fn-resolver-rXMsqALt.mjs → __tanstack-start-server-fn-resolver-5wPQ8bZ3.mjs} +19 -11
  11. package/.output/server/_chunks/ssr-renderer.mjs +2 -2
  12. package/.output/server/_libs/@tanstack/react-form+[...].mjs +5 -5
  13. package/.output/server/_libs/lucide-react.mjs +8 -1
  14. package/.output/server/_libs/unctx.mjs +1 -1
  15. package/.output/server/_ssr/{api-rpc-DYKuUgOh.mjs → api-rpc-BhBKhZqY.mjs} +61 -18
  16. package/.output/server/_ssr/{config.server-8YQWTTc0.mjs → config.server-xu3W-WAK.mjs} +3 -1
  17. package/.output/server/_ssr/deleteBundle-D4jF5HeY.mjs +96 -0
  18. package/.output/server/_ssr/dist-CRiLZLfa.mjs +120 -0
  19. package/.output/server/_ssr/getBundleChildren-DFqZ6XMp.mjs +58 -0
  20. package/.output/server/_ssr/{router-D-WWsYjv.mjs → router-SkApCyud.mjs} +57 -15
  21. package/.output/server/_ssr/{routes-DyUhibF4.mjs → routes-BSs-dv4D.mjs} +1120 -472
  22. package/.output/server/_ssr/{sidebar-DXng0IOP.mjs → sidebar-CgbtXkE2.mjs} +65 -85
  23. package/.output/server/_ssr/ssr.mjs +4 -4
  24. package/.output/server/_ssr/start-D0X4LIsd.mjs +4 -0
  25. package/.output/server/_ssr/storageProfile-wICk5nZZ.mjs +9 -0
  26. package/.output/server/{_tanstack-start-manifest_v-xpdCj2Ct.mjs → _tanstack-start-manifest_v-D2MqgD3d.mjs} +9 -4
  27. package/.output/server/index.mjs +70 -42
  28. package/package.json +10 -6
  29. package/.output/public/assets/dist-BKho179_.js +0 -53
  30. package/.output/public/assets/main-5MdOCmsM.js +0 -10
  31. package/.output/public/assets/routes-BmbL4goz.js +0 -10
  32. package/.output/public/assets/styles-M2W42JQb.css +0 -2
  33. package/.output/server/_ssr/deleteBundle-BiJvjt0k.mjs +0 -22
  34. package/.output/server/_ssr/start-DsRb6TkZ.mjs +0 -4
@@ -0,0 +1,96 @@
1
+ import { a as getManifestStorageUri, i as getBundlePatches, r as getAssetBaseStorageUri, u as getPatchStorageUri } from "./dist-CRiLZLfa.mjs";
2
+ import { randomUUID } from "node:crypto";
3
+ import path from "node:path";
4
+ import fs from "node:fs/promises";
5
+ //#region node_modules/.nitro/vite/services/ssr/assets/deleteBundle-D4jF5HeY.js
6
+ var HOT_UPDATER_DOWNLOAD_DIR_PREFIX = "downloads-";
7
+ function resolveStorageUriForDeletion(storageUri, storagePlugin) {
8
+ const protocol = new URL(storageUri).protocol.replace(":", "");
9
+ if (protocol === "http" || protocol === "https") return null;
10
+ if (storagePlugin.supportedProtocol !== protocol) throw new Error(`No storage plugin for protocol: ${protocol}`);
11
+ return storageUri;
12
+ }
13
+ async function downloadStorageBytes(storageUri, storagePlugin) {
14
+ const protocol = new URL(storageUri).protocol.replace(":", "");
15
+ if (protocol === "http" || protocol === "https") {
16
+ const response = await fetch(storageUri);
17
+ if (!response.ok) throw new Error(`Failed to download bundle manifest: ${response.statusText}`);
18
+ return new Uint8Array(await response.arrayBuffer());
19
+ }
20
+ if (storagePlugin.supportedProtocol !== protocol) throw new Error(`No storage plugin for protocol: ${protocol}`);
21
+ const downloadRoot = path.join(process.cwd(), ".hot-updater");
22
+ await fs.mkdir(downloadRoot, { recursive: true });
23
+ const workDir = await fs.mkdtemp(path.join(downloadRoot, HOT_UPDATER_DOWNLOAD_DIR_PREFIX));
24
+ const filename = path.basename(new URL(storageUri).pathname) || randomUUID();
25
+ const filePath = path.join(workDir, filename);
26
+ try {
27
+ await storagePlugin.profiles.node.downloadFile(storageUri, filePath);
28
+ return new Uint8Array(await fs.readFile(filePath));
29
+ } finally {
30
+ await fs.rm(workDir, {
31
+ force: true,
32
+ recursive: true
33
+ });
34
+ }
35
+ }
36
+ function createStorageUriWithRelativePath(baseStorageUri, relativePath) {
37
+ const storageUrl = new URL(baseStorageUri);
38
+ storageUrl.pathname = `${storageUrl.pathname.replace(/\/+$/, "")}/${relativePath.replace(/\\/g, "/").split("/").map((segment) => encodeURIComponent(segment)).join("/")}`;
39
+ return storageUrl.toString();
40
+ }
41
+ async function loadBundleManifest(manifestStorageUri, storagePlugin) {
42
+ const manifestBytes = await downloadStorageBytes(manifestStorageUri, storagePlugin);
43
+ return JSON.parse(new TextDecoder().decode(manifestBytes));
44
+ }
45
+ async function deleteBundle({ bundleId }, { databasePlugin, storagePlugin, waitForStorageCleanup = true }) {
46
+ const bundle = await databasePlugin.getBundleById(bundleId);
47
+ if (!bundle) throw new Error("Bundle not found");
48
+ const cleanupCandidates = [
49
+ bundle.storageUri,
50
+ getManifestStorageUri(bundle),
51
+ getAssetBaseStorageUri(bundle),
52
+ getPatchStorageUri(bundle),
53
+ ...getBundlePatches(bundle).map((patch) => patch.patchStorageUri)
54
+ ].filter((value) => Boolean(value));
55
+ for (const candidate of cleanupCandidates) resolveStorageUriForDeletion(candidate, storagePlugin);
56
+ await databasePlugin.deleteBundle(bundle);
57
+ await databasePlugin.commitBundle();
58
+ const cleanupStorage = async () => {
59
+ const cleanupUris = /* @__PURE__ */ new Set();
60
+ const addCleanupUri = (storageUri) => {
61
+ if (!storageUri) return;
62
+ const resolvedStorageUri = resolveStorageUriForDeletion(storageUri, storagePlugin);
63
+ if (resolvedStorageUri) cleanupUris.add(resolvedStorageUri);
64
+ };
65
+ addCleanupUri(bundle.storageUri);
66
+ addCleanupUri(getManifestStorageUri(bundle) ?? void 0);
67
+ addCleanupUri(getPatchStorageUri(bundle) ?? void 0);
68
+ for (const patch of getBundlePatches(bundle)) addCleanupUri(patch.patchStorageUri);
69
+ const manifestStorageUri = getManifestStorageUri(bundle);
70
+ const assetBaseStorageUri = getAssetBaseStorageUri(bundle);
71
+ if (assetBaseStorageUri) if (!manifestStorageUri) addCleanupUri(assetBaseStorageUri);
72
+ else try {
73
+ const manifest = await loadBundleManifest(manifestStorageUri, storagePlugin);
74
+ const assetPaths = Object.keys(manifest.assets ?? {}).sort((a, b) => a.localeCompare(b));
75
+ for (const assetPath of assetPaths) addCleanupUri(createStorageUriWithRelativePath(assetBaseStorageUri, assetPath));
76
+ } catch (error) {
77
+ console.error("Failed to load bundle manifest for storage cleanup:", error);
78
+ addCleanupUri(assetBaseStorageUri);
79
+ }
80
+ if (cleanupUris.size === 0) return;
81
+ for (const storageUri of cleanupUris) try {
82
+ await storagePlugin.profiles.node.delete(storageUri);
83
+ } catch (error) {
84
+ console.error("Failed to delete bundle from storage:", error);
85
+ }
86
+ };
87
+ if (waitForStorageCleanup) {
88
+ await cleanupStorage();
89
+ return;
90
+ }
91
+ cleanupStorage().catch((error) => {
92
+ console.error("Failed to clean up bundle storage:", error);
93
+ });
94
+ }
95
+ //#endregion
96
+ export { deleteBundle };
@@ -0,0 +1,120 @@
1
+ //#region node_modules/.nitro/vite/services/ssr/assets/dist-CRiLZLfa.js
2
+ var getManifestStorageUri = (bundle) => bundle.manifestStorageUri ?? null;
3
+ var getAssetBaseStorageUri = (bundle) => bundle.assetBaseStorageUri ?? null;
4
+ var isBundlePatchArtifact = (value) => {
5
+ if (!value || typeof value !== "object" || Array.isArray(value)) return false;
6
+ const candidate = value;
7
+ return typeof candidate.baseBundleId === "string" && typeof candidate.baseFileHash === "string" && typeof candidate.patchFileHash === "string" && typeof candidate.patchStorageUri === "string";
8
+ };
9
+ var readBundlePatchArray = (patches) => {
10
+ if (!Array.isArray(patches)) return [];
11
+ return patches.filter(isBundlePatchArtifact);
12
+ };
13
+ var getBundlePatches = (bundle) => {
14
+ const patches = readBundlePatchArray(bundle.patches);
15
+ const seenBaseBundleIds = /* @__PURE__ */ new Set();
16
+ return patches.filter((patch) => {
17
+ if (seenBaseBundleIds.has(patch.baseBundleId)) return false;
18
+ seenBaseBundleIds.add(patch.baseBundleId);
19
+ return true;
20
+ });
21
+ };
22
+ var getPrimaryPatch = (bundle) => {
23
+ return getBundlePatches(bundle)[0] ?? null;
24
+ };
25
+ var getPatchBaseBundleId = (bundle) => bundle.patchBaseBundleId ?? getPrimaryPatch(bundle)?.baseBundleId ?? null;
26
+ var getPatchBaseFileHash = (bundle) => bundle.patchBaseFileHash ?? getPrimaryPatch(bundle)?.baseFileHash ?? null;
27
+ var getPatchFileHash = (bundle) => bundle.patchFileHash ?? getPrimaryPatch(bundle)?.patchFileHash ?? null;
28
+ var getPatchStorageUri = (bundle) => bundle.patchStorageUri ?? getPrimaryPatch(bundle)?.patchStorageUri ?? null;
29
+ var NUMERIC_COHORT_SIZE = 1e3;
30
+ var DEFAULT_ROLLOUT_COHORT_COUNT = NUMERIC_COHORT_SIZE;
31
+ var INVALID_COHORT_ERROR_MESSAGE = `Invalid cohort. Use 1-1000 or a lowercase slug without spaces, up to 64 characters.`;
32
+ var CUSTOM_COHORT_PATTERN = /^[a-z0-9-]+$/;
33
+ function parseNumericCohortValue(cohort) {
34
+ if (!/^\d+$/.test(cohort)) return null;
35
+ const parsed = Number.parseInt(cohort, 10);
36
+ if (Number.isNaN(parsed) || parsed < 1 || parsed > 1e3) return null;
37
+ return parsed;
38
+ }
39
+ function positiveMod(value, modulus) {
40
+ return (value % modulus + modulus) % modulus;
41
+ }
42
+ function hashString(value) {
43
+ let hash = 0;
44
+ for (let i = 0; i < value.length; i++) {
45
+ const char = value.charCodeAt(i);
46
+ hash = (hash << 5) - hash + char;
47
+ hash |= 0;
48
+ }
49
+ return hash;
50
+ }
51
+ function gcd(a, b) {
52
+ let x = Math.abs(a);
53
+ let y = Math.abs(b);
54
+ while (y !== 0) {
55
+ const next = x % y;
56
+ x = y;
57
+ y = next;
58
+ }
59
+ return x;
60
+ }
61
+ function modularInverse(value, modulus) {
62
+ let t = 0;
63
+ let newT = 1;
64
+ let r = modulus;
65
+ let newR = positiveMod(value, modulus);
66
+ while (newR !== 0) {
67
+ const quotient = Math.floor(r / newR);
68
+ [t, newT] = [newT, t - quotient * newT];
69
+ [r, newR] = [newR, r - quotient * newR];
70
+ }
71
+ if (r > 1) throw new Error(`No modular inverse for ${value} mod ${modulus}`);
72
+ return positiveMod(t, modulus);
73
+ }
74
+ function getRolloutShuffleParameters(bundleId) {
75
+ let multiplier = positiveMod(hashString(`${bundleId}:multiplier`), 997);
76
+ if (multiplier === 0) multiplier = 1;
77
+ while (gcd(multiplier, NUMERIC_COHORT_SIZE) !== 1) {
78
+ multiplier = positiveMod(multiplier + 1, NUMERIC_COHORT_SIZE);
79
+ if (multiplier === 0) multiplier = 1;
80
+ }
81
+ const offset = positiveMod(hashString(`${bundleId}:offset`), NUMERIC_COHORT_SIZE);
82
+ return {
83
+ multiplier,
84
+ offset,
85
+ inverseMultiplier: modularInverse(multiplier, NUMERIC_COHORT_SIZE)
86
+ };
87
+ }
88
+ function normalizeRolloutCohortCount(rolloutCohortCount) {
89
+ if (rolloutCohortCount === null || rolloutCohortCount === void 0) return DEFAULT_ROLLOUT_COHORT_COUNT;
90
+ if (rolloutCohortCount <= 0) return 0;
91
+ if (rolloutCohortCount >= 1e3) return NUMERIC_COHORT_SIZE;
92
+ return Math.floor(rolloutCohortCount);
93
+ }
94
+ function normalizeCohortValue(cohort) {
95
+ const normalized = cohort.trim().toLowerCase();
96
+ const numericCohort = parseNumericCohortValue(normalized);
97
+ if (numericCohort !== null) return String(numericCohort);
98
+ return normalized;
99
+ }
100
+ function getNumericCohortValue(cohort) {
101
+ return parseNumericCohortValue(normalizeCohortValue(cohort));
102
+ }
103
+ function isNumericCohort(cohort) {
104
+ return getNumericCohortValue(cohort) !== null;
105
+ }
106
+ function isCustomCohort(cohort) {
107
+ const normalized = normalizeCohortValue(cohort);
108
+ return normalized.length > 0 && normalized.length <= 64 && !/^\d+$/.test(normalized) && CUSTOM_COHORT_PATTERN.test(normalized);
109
+ }
110
+ function isValidCohort(cohort) {
111
+ const normalized = normalizeCohortValue(cohort);
112
+ return isNumericCohort(normalized) || isCustomCohort(normalized);
113
+ }
114
+ function getNumericCohortRolloutPosition(bundleId, cohortValue) {
115
+ if (cohortValue < 1 || cohortValue > 1e3) throw new Error(`Invalid numeric cohort: ${cohortValue}`);
116
+ const { offset, inverseMultiplier } = getRolloutShuffleParameters(bundleId);
117
+ return positiveMod(inverseMultiplier * (cohortValue - 1 - offset), NUMERIC_COHORT_SIZE);
118
+ }
119
+ //#endregion
120
+ export { getManifestStorageUri as a, getPatchBaseFileHash as c, isValidCohort as d, normalizeCohortValue as f, getBundlePatches as i, getPatchFileHash as l, NUMERIC_COHORT_SIZE as n, getNumericCohortRolloutPosition as o, normalizeRolloutCohortCount as p, getAssetBaseStorageUri as r, getPatchBaseBundleId as s, INVALID_COHORT_ERROR_MESSAGE as t, getPatchStorageUri as u };
@@ -0,0 +1,58 @@
1
+ import { i as getBundlePatches } from "./dist-CRiLZLfa.mjs";
2
+ //#region node_modules/.nitro/vite/services/ssr/assets/getBundleChildren-DFqZ6XMp.js
3
+ var CHILDREN_QUERY_LIMIT = 100;
4
+ async function collectBundleChildrenByBaseIds(baseBundleIds, deps) {
5
+ const uniqueBaseBundleIds = [...new Set(baseBundleIds.filter(Boolean))];
6
+ const bundlesByBaseId = Object.fromEntries(uniqueBaseBundleIds.map((bundleId) => [bundleId, []]));
7
+ const baseBundles = (await Promise.all(uniqueBaseBundleIds.map((bundleId) => deps.databasePlugin.getBundleById(bundleId)))).filter((bundle) => Boolean(bundle));
8
+ const groupMap = /* @__PURE__ */ new Map();
9
+ for (const baseBundle of baseBundles) {
10
+ const groupKey = `${baseBundle.channel}:${baseBundle.platform}`;
11
+ const existingGroup = groupMap.get(groupKey);
12
+ if (existingGroup) {
13
+ existingGroup.bundleIds.add(baseBundle.id);
14
+ continue;
15
+ }
16
+ groupMap.set(groupKey, {
17
+ channel: baseBundle.channel,
18
+ platform: baseBundle.platform,
19
+ bundleIds: new Set([baseBundle.id])
20
+ });
21
+ }
22
+ for (const group of groupMap.values()) {
23
+ const seenBundleIds = /* @__PURE__ */ new Set();
24
+ const seenCursors = /* @__PURE__ */ new Set();
25
+ let after;
26
+ while (true) {
27
+ const page = await deps.databasePlugin.getBundles({
28
+ where: {
29
+ channel: group.channel,
30
+ platform: group.platform
31
+ },
32
+ limit: CHILDREN_QUERY_LIMIT,
33
+ cursor: after ? { after } : void 0
34
+ });
35
+ for (const bundle of page.data) {
36
+ const matchedParentBundleIds = getBundlePatches(bundle).map((patch) => patch.baseBundleId).filter((bundleId) => group.bundleIds.has(bundleId));
37
+ if (matchedParentBundleIds.length === 0 || seenBundleIds.has(bundle.id)) continue;
38
+ seenBundleIds.add(bundle.id);
39
+ for (const parentBundleId of matchedParentBundleIds) bundlesByBaseId[parentBundleId]?.push(bundle);
40
+ }
41
+ const pagination = page.pagination;
42
+ const nextCursor = pagination.nextCursor ?? void 0;
43
+ if (!pagination.hasNextPage || !nextCursor || seenCursors.has(nextCursor)) break;
44
+ seenCursors.add(nextCursor);
45
+ after = nextCursor;
46
+ }
47
+ }
48
+ return bundlesByBaseId;
49
+ }
50
+ async function getBundleChildren({ baseBundleId }, deps) {
51
+ return (await collectBundleChildrenByBaseIds([baseBundleId], deps))[baseBundleId] ?? [];
52
+ }
53
+ async function getBundleChildCounts(baseBundleIds, deps) {
54
+ const childrenByBaseId = await collectBundleChildrenByBaseIds(baseBundleIds, deps);
55
+ return Object.fromEntries(Object.entries(childrenByBaseId).map(([bundleId, bundles]) => [bundleId, bundles.length]));
56
+ }
57
+ //#endregion
58
+ export { getBundleChildCounts, getBundleChildren };
@@ -2,13 +2,13 @@ import { r as __toESM } from "../_runtime.mjs";
2
2
  import { P as require_jsx_runtime } from "../_libs/@radix-ui/react-alert-dialog+[...].mjs";
3
3
  import { u as require_react } from "../_libs/@floating-ui/react-dom+[...].mjs";
4
4
  import { _ as CircleCheck, c as Moon, f as Info, n as TriangleAlert, o as Package, r as Sun, s as OctagonX, u as LoaderCircle } from "../_libs/lucide-react.mjs";
5
- import { T as TooltipProvider, _ as SidebarMenu, b as SidebarProvider, d as SidebarFooter, f as SidebarGroup, g as SidebarInset, h as SidebarHeader, l as Sidebar, m as SidebarGroupLabel, p as SidebarGroupContent, t as Button, u as SidebarContent, v as SidebarMenuButton, y as SidebarMenuItem } from "./sidebar-DXng0IOP.mjs";
5
+ import { a as SidebarContent, b as TooltipProvider, c as SidebarGroupContent, d as SidebarInset, f as SidebarMenu, h as SidebarProvider, i as Sidebar, l as SidebarGroupLabel, m as SidebarMenuItem, o as SidebarFooter, p as SidebarMenuButton, s as SidebarGroup, t as Button, u as SidebarHeader } from "./sidebar-CgbtXkE2.mjs";
6
6
  import { a as createRouter, c as createFileRoute, l as createRootRoute, n as Scripts, o as Outlet, p as useRouterState, r as HeadContent, s as lazyRouteComponent, u as Link } from "../_libs/@tanstack/react-router+[...].mjs";
7
7
  import { t as QueryClient } from "../_libs/tanstack__query-core.mjs";
8
8
  import { r as QueryClientProvider } from "../_libs/tanstack__react-query.mjs";
9
9
  import { t as z } from "../_libs/next-themes.mjs";
10
10
  import { t as Toaster } from "../_libs/sonner.mjs";
11
- //#region node_modules/.nitro/vite/services/ssr/assets/router-D-WWsYjv.js
11
+ //#region node_modules/.nitro/vite/services/ssr/assets/router-SkApCyud.js
12
12
  var import_jsx_runtime = require_jsx_runtime();
13
13
  var import_react = /* @__PURE__ */ __toESM(require_react());
14
14
  function HotUpdaterLogo({ className }) {
@@ -50,6 +50,9 @@ function HotUpdaterLogo({ className }) {
50
50
  });
51
51
  }
52
52
  var ThemeContext = (0, import_react.createContext)(void 0);
53
+ var LIGHT_THEME_COLOR = "#fbfbfa";
54
+ var DARK_THEME_COLOR = "#1f1d1c";
55
+ var REFRESH_THEME_CHROME_EVENT = "hot-updater:refresh-theme-chrome";
53
56
  function ThemeProvider({ children, defaultTheme = "dark", storageKey = "hot-updater-theme" }) {
54
57
  const [theme, setTheme] = (0, import_react.useState)(defaultTheme);
55
58
  (0, import_react.useEffect)(() => {
@@ -58,11 +61,33 @@ function ThemeProvider({ children, defaultTheme = "dark", storageKey = "hot-upda
58
61
  }, [storageKey]);
59
62
  (0, import_react.useEffect)(() => {
60
63
  const root = window.document.documentElement;
61
- root.classList.remove("light", "dark");
62
- if (theme === "system") {
63
- const systemTheme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
64
- root.classList.add(systemTheme);
65
- } else root.classList.add(theme);
64
+ const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
65
+ const themeColorMeta = window.document.querySelector("meta[name=\"theme-color\"]");
66
+ const colorSchemeMeta = window.document.querySelector("meta[name=\"color-scheme\"]");
67
+ const applyResolvedTheme = (resolvedTheme) => {
68
+ root.classList.remove("light", "dark");
69
+ root.classList.add(resolvedTheme);
70
+ root.style.colorScheme = resolvedTheme;
71
+ if (themeColorMeta) themeColorMeta.setAttribute("content", resolvedTheme === "dark" ? DARK_THEME_COLOR : LIGHT_THEME_COLOR);
72
+ if (colorSchemeMeta) colorSchemeMeta.setAttribute("content", resolvedTheme === "dark" ? "dark light" : "light dark");
73
+ };
74
+ const syncTheme = () => {
75
+ applyResolvedTheme(theme === "system" ? mediaQuery.matches ? "dark" : "light" : theme);
76
+ };
77
+ syncTheme();
78
+ const refreshThemeChrome = () => {
79
+ window.requestAnimationFrame(syncTheme);
80
+ };
81
+ window.addEventListener(REFRESH_THEME_CHROME_EVENT, refreshThemeChrome);
82
+ window.addEventListener("pageshow", refreshThemeChrome);
83
+ document.addEventListener("visibilitychange", refreshThemeChrome);
84
+ if (theme === "system") mediaQuery.addEventListener("change", syncTheme);
85
+ return () => {
86
+ if (theme === "system") mediaQuery.removeEventListener("change", syncTheme);
87
+ window.removeEventListener(REFRESH_THEME_CHROME_EVENT, refreshThemeChrome);
88
+ window.removeEventListener("pageshow", refreshThemeChrome);
89
+ document.removeEventListener("visibilitychange", refreshThemeChrome);
90
+ };
66
91
  }, [theme]);
67
92
  const value = {
68
93
  theme,
@@ -97,7 +122,8 @@ function AppSidebar() {
97
122
  page: void 0,
98
123
  after: void 0,
99
124
  before: void 0,
100
- bundleId: void 0
125
+ bundleId: void 0,
126
+ expandedBundleId: void 0
101
127
  },
102
128
  className: "flex items-center gap-3 p-1 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:p-2",
103
129
  children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(HotUpdaterLogo, { className: "h-7 w-7 shrink-0" }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
@@ -124,7 +150,8 @@ function AppSidebar() {
124
150
  page: void 0,
125
151
  after: void 0,
126
152
  before: void 0,
127
- bundleId: void 0
153
+ bundleId: void 0,
154
+ expandedBundleId: void 0
128
155
  },
129
156
  children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Package, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Bundles" })]
130
157
  })
@@ -143,7 +170,8 @@ var homeSearch = {
143
170
  page: void 0,
144
171
  after: void 0,
145
172
  before: void 0,
146
- bundleId: void 0
173
+ bundleId: void 0,
174
+ expandedBundleId: void 0
147
175
  };
148
176
  function NotFoundPage() {
149
177
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
@@ -188,14 +216,22 @@ var Toaster$1 = ({ ...props }) => {
188
216
  ...props
189
217
  });
190
218
  };
191
- var styles_default = "/assets/styles-M2W42JQb.css";
219
+ var styles_default = "/assets/styles-DZ0tCVA1.css";
192
220
  var Route$1 = createRootRoute({
193
221
  head: () => ({
194
222
  meta: [
195
223
  { charSet: "utf-8" },
196
224
  {
197
225
  name: "viewport",
198
- content: "width=device-width, initial-scale=1"
226
+ content: "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover"
227
+ },
228
+ {
229
+ name: "theme-color",
230
+ content: "#1f1d1c"
231
+ },
232
+ {
233
+ name: "color-scheme",
234
+ content: "dark light"
199
235
  },
200
236
  { title: "Hot Updater Console" }
201
237
  ],
@@ -210,6 +246,7 @@ var Route$1 = createRootRoute({
210
246
  });
211
247
  function RootDocument({ children }) {
212
248
  const [queryClient] = (0, import_react.useState)(() => new QueryClient());
249
+ const [isLocalDebugHost, setIsLocalDebugHost] = (0, import_react.useState)(false);
213
250
  (0, import_react.useEffect)(() => {}, []);
214
251
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("html", {
215
252
  lang: "en",
@@ -218,7 +255,11 @@ function RootDocument({ children }) {
218
255
  defaultTheme: "dark",
219
256
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryClientProvider, {
220
257
  client: queryClient,
221
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TooltipProvider, { children: [children, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Toaster$1, {})] })
258
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TooltipProvider, { children: [
259
+ children,
260
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Toaster$1, {}),
261
+ null
262
+ ] })
222
263
  })
223
264
  }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Scripts, {})] })]
224
265
  });
@@ -227,7 +268,7 @@ function RootLayout() {
227
268
  (0, import_react.useEffect)(() => {}, []);
228
269
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarProvider, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AppSidebar, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarInset, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Outlet, {}) })] });
229
270
  }
230
- var $$splitComponentImporter = () => import("./routes-DyUhibF4.mjs");
271
+ var $$splitComponentImporter = () => import("./routes-BSs-dv4D.mjs");
231
272
  var rootRouteChildren = { IndexRoute: createFileRoute("/")({
232
273
  component: lazyRouteComponent($$splitComponentImporter, "component"),
233
274
  validateSearch: (search) => {
@@ -238,7 +279,8 @@ var rootRouteChildren = { IndexRoute: createFileRoute("/")({
238
279
  page: parsedPage !== void 0 && Number.isInteger(parsedPage) && parsedPage > 1 ? parsedPage : void 0,
239
280
  after: search.after,
240
281
  before: search.before,
241
- bundleId: search.bundleId
282
+ bundleId: search.bundleId,
283
+ expandedBundleId: search.expandedBundleId
242
284
  };
243
285
  }
244
286
  }).update({