@hot-updater/console 1.0.0-rc.0 → 1.0.0-rc.2
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/.output/nitro.json +1 -1
- package/.output/public/assets/HashValueDisplay-CB0Eskit.js +1 -0
- package/.output/public/assets/InsightsPageHeader-Car5LNiZ.js +1 -0
- package/.output/public/assets/api-keys-BzKocqRy.js +1 -0
- package/.output/public/assets/api-keys-api-BHcODB7q.js +1 -0
- package/.output/public/assets/card-Dhr_eFYj.js +1 -0
- package/.output/public/assets/{chart-no-axes-combined-FaYMGmQS.js → chart-no-axes-combined-Dy4WJv2U.js} +1 -1
- package/.output/public/assets/composite-Bp98A0Ld.js +1 -0
- package/.output/public/assets/createServerFn-CA8fs7QD.js +3 -0
- package/.output/public/assets/dialog-CUTrcPlB.js +1 -0
- package/.output/public/assets/{dist-DspNKfMj.js → dist-C_NydL0e.js} +1 -1
- package/.output/public/assets/index-DdAz-CXv.js +10 -0
- package/.output/public/assets/input-group-cSOG4wh_.js +1 -0
- package/.output/public/assets/insights-C0PBSZ-n.js +1 -0
- package/.output/public/assets/installations-CE33wgbY.js +2 -0
- package/.output/public/assets/installations-CStZja8x.js +1 -0
- package/.output/public/assets/lazyRouteComponent-Ccp3bwBY.js +1 -0
- package/.output/public/assets/link-CI8idAUi.js +1 -0
- package/.output/public/assets/loader-circle-BoxLrsOu.js +1 -0
- package/.output/public/assets/refresh-cw-Bqc72UZG.js +1 -0
- package/.output/public/assets/{routes-DcQnVajO.js → routes-DGVXdzpw.js} +2 -2
- package/.output/public/assets/routes-DTlwOr8I.js +1 -0
- package/.output/public/assets/{shield-check-DE_hVuHu.js → shield-check-uK3MHWJZ.js} +1 -1
- package/.output/public/assets/signing-CMf4aqDO.js +1 -0
- package/.output/public/assets/styles-BCvbtKsm.css +2 -0
- package/.output/public/assets/table-2vcV89QB.js +1 -0
- package/.output/public/assets/useCompositeListItem-CHLITE_4.js +1 -0
- package/.output/public/assets/x-DCd0j8c6.js +1 -0
- package/.output/server/{__23tanstack-start-server-fn-resolver-DBP9TQ7K.mjs → __23tanstack-start-server-fn-resolver-B7ioJhtE.mjs} +44 -52
- package/.output/server/_libs/@base-ui/react+[...].mjs +1906 -4040
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +52 -4
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +2 -2
- package/.output/server/_libs/lucide-react.mjs +36 -3
- package/.output/server/_libs/next-themes.mjs +2 -2
- package/.output/server/_libs/sonner.mjs +2 -2
- package/.output/server/_libs/tanstack__react-query.mjs +2 -2
- package/.output/server/_libs/verkit.mjs +20 -15
- package/.output/server/_runtime.mjs +1 -10
- package/.output/server/_ssr/HashValueDisplay-DwpGLfrl.mjs +55 -0
- package/.output/server/_ssr/InsightsPageHeader-Df4Brj8u.mjs +484 -0
- package/.output/server/_ssr/{api-keys-BnM_o2nS.mjs → api-keys-CZeTPQys.mjs} +11 -13
- package/.output/server/_ssr/{api-keys-api-CIywsSF5.mjs → api-keys-api-BUPQVSpk.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-rpc-BSp1wkIV.mjs → api-keys-rpc-Cs7tS5_j.mjs} +5 -5
- package/.output/server/_ssr/{api-rpc-cG5wd_tO.mjs → api-rpc-tAupfGQm.mjs} +73 -142
- package/.output/server/_ssr/{auth-rpc-BrJ6obHJ.mjs → auth-rpc-DUaeOWKK.mjs} +4 -4
- package/.output/server/_ssr/{auth.server-DwKoZoQM.mjs → auth.server-DW71WzsD.mjs} +2 -5
- package/.output/server/_ssr/{bundle-signing-rpc-COoQhW8E.mjs → bundle-signing-rpc-BhnBw0-d.mjs} +2 -2
- package/.output/server/_ssr/bundle-signing.server-C4NW5mWx.mjs +12 -0
- package/.output/server/_ssr/{alert-Dim3MGY5.mjs → card-BRiPmi0C.mjs} +61 -39
- package/.output/server/_ssr/{config.server-DEiLhKmy.mjs → config.server-afDuAwaG.mjs} +15 -8
- package/.output/server/_ssr/{createSsrRpc-9P0S0lJ3.mjs → createSsrRpc-DjWNJ0uc.mjs} +6 -6
- package/.output/server/_ssr/databaseJsonValue-d6I3nAS4.mjs +45 -0
- package/.output/server/_ssr/{databaseRows-CwbNwYSl.mjs → databaseRows-5bCRTxm-.mjs} +4 -44
- package/.output/server/_ssr/{deleteBundle-Cu_XOMt0.mjs → deleteBundle-BTGwBgzx.mjs} +2 -2
- package/.output/server/_ssr/{dialog-CQuRMNZ4.mjs → dialog-DS-nw-pA.mjs} +2 -2
- package/.output/server/_ssr/{dist-BVSLTpoP.mjs → dist-CyzPaI5v.mjs} +2 -2
- package/.output/server/_ssr/{getBundleChildren-BcRMFoDF.mjs → getBundleChildren-C0vh4ZvE.mjs} +2 -2
- package/.output/server/_ssr/input-group-BpsnmvZw.mjs +70 -0
- package/.output/server/_ssr/insights-BdS364Xu.mjs +460 -0
- package/.output/server/_ssr/insights-rpc-38DujK0G.mjs +57 -0
- package/.output/server/_ssr/insightsContract-fjJDBeEE.mjs +303 -0
- package/.output/server/_ssr/installations-CtA59MQG.mjs +29 -0
- package/.output/server/_ssr/installations-DiVKEF5T.mjs +627 -0
- package/.output/server/_ssr/{router-C-KUBfOi.mjs → router-B9wG_9f8.mjs} +37 -46
- package/.output/server/_ssr/{routes-Z7TwC6nC.mjs → routes-CKrrS2q2.mjs} +3 -3
- package/.output/server/_ssr/{routes-BM4ht9jb.mjs → routes-D7Yh_jfj.mjs} +402 -390
- package/.output/server/_ssr/runtime.server-DacU1TBV.mjs +438 -0
- package/.output/server/_ssr/{server-BjzmvXnO.mjs → server-D_C2rMzf.mjs} +5 -5
- package/.output/server/_ssr/{signing-k8GxyBDF.mjs → signing-Dz1WkZOf.mjs} +16 -85
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/{field-DRIXKjZG.mjs → table-CnZmon_Z.mjs} +51 -5
- package/.output/server/_ssr/{uuidv7-BbJ-9D_I.mjs → uuidv7-D0QFkPL_.mjs} +3 -3
- package/.output/server/_tanstack-start-manifest_v-2MjTyxil.mjs +97 -0
- package/.output/server/index.mjs +168 -203
- package/lib/index.d.mts +4 -4
- package/lib/vite-internal.mjs +1 -1
- package/lib/vite.d.mts +0 -1
- package/package.json +8 -8
- package/src/components/AppSidebar.tsx +12 -16
- package/src/components/ConsoleAccessPage.tsx +1 -1
- package/src/components/HashValueDisplay.tsx +11 -2
- package/src/components/features/api-keys/ApiKeysPage.tsx +1 -1
- package/src/components/features/bundles/BundleChildrenPanel.tsx +7 -6
- package/src/components/features/bundles/BundleMetadata.tsx +1 -20
- package/src/components/features/channels/ChannelManagementDialog.tsx +1 -1
- package/src/components/features/insights/EventDetails.tsx +151 -0
- package/src/components/features/insights/EventHistoryCard.tsx +245 -0
- package/src/components/features/insights/EventHistoryList.tsx +63 -0
- package/src/components/features/insights/InsightsBundleReports.tsx +51 -0
- package/src/components/features/insights/InsightsControls.tsx +121 -0
- package/src/components/features/{analytics/AnalyticsErrorAlert.tsx → insights/InsightsErrorAlert.tsx} +6 -6
- package/src/components/features/insights/InsightsOverview.tsx +203 -0
- package/src/components/features/insights/InsightsPageHeader.tsx +48 -0
- package/src/components/features/insights/InsightsPagination.tsx +52 -0
- package/src/components/features/insights/InstallationHistoryCard.tsx +250 -0
- package/src/components/features/insights/InstallationMatchesCard.tsx +178 -0
- package/src/components/features/insights/InstallationPageHeader.tsx +90 -0
- package/src/components/features/releases/ReleaseEditorSheet.tsx +24 -24
- package/src/components/features/signing/BundleSigningPage.tsx +18 -126
- package/src/components/ui/badge.tsx +2 -0
- package/src/components/ui/combobox.tsx +1 -0
- package/src/components/ui/skeleton.tsx +4 -1
- package/src/components/ui/tooltip.tsx +1 -1
- package/src/index.ts +7 -3
- package/src/lib/api-rpc.ts +19 -90
- package/src/lib/api.ts +0 -99
- package/src/lib/insights-api.ts +100 -0
- package/src/lib/insights-rpc.ts +88 -0
- package/src/lib/insights-view.ts +15 -0
- package/src/lib/public-bundle-error.ts +19 -0
- package/src/lib/server/bundle-signing.server.ts +5 -82
- package/src/lib/server/console-runtime.server.ts +0 -9
- package/src/lib/server/releaseReachability.ts +1 -4
- package/src/lib/server/runtime.server.ts +6 -142
- package/src/routeTree.gen.ts +21 -21
- package/src/router.tsx +3 -0
- package/src/routes/-installations-search.ts +25 -12
- package/src/routes/__root.tsx +6 -16
- package/src/routes/api-keys.tsx +1 -1
- package/src/routes/index.tsx +21 -81
- package/src/routes/insights.tsx +84 -0
- package/src/routes/installations.tsx +294 -142
- package/src/styles.css +6 -0
- package/.output/public/assets/AnalyticsCapabilityContext-BCke57-7.js +0 -1
- package/.output/public/assets/BundleActivityChart-CnsBe_1J.js +0 -42
- package/.output/public/assets/BundleIdDisplay-Dky75zLU.js +0 -1
- package/.output/public/assets/alert-C-1KvDW8.js +0 -1
- package/.output/public/assets/analytics-Bqz0c-BT.js +0 -1
- package/.output/public/assets/analytics-api-CJdrTLLO.js +0 -1
- package/.output/public/assets/api-B_Rh-uzC.js +0 -1
- package/.output/public/assets/api-keys-BurCFhzH.js +0 -1
- package/.output/public/assets/api-keys-api-BEDJdQg3.js +0 -1
- package/.output/public/assets/badge-Bf0fZ-Gx.js +0 -1
- package/.output/public/assets/createServerFn-gM2-LFBy.js +0 -3
- package/.output/public/assets/dialog-BS60BRr2.js +0 -1
- package/.output/public/assets/download-O-yNBc9H.js +0 -1
- package/.output/public/assets/field-Buq148-A.js +0 -1
- package/.output/public/assets/index-kFhd2S78.js +0 -10
- package/.output/public/assets/installations-BrQ-od41.js +0 -2
- package/.output/public/assets/installations-CGlZ3ROz.js +0 -1
- package/.output/public/assets/lazyRouteComponent-rPzgA7S-.js +0 -1
- package/.output/public/assets/loader-circle-DCYF-wJl.js +0 -1
- package/.output/public/assets/refresh-cw-n8XYbPPj.js +0 -1
- package/.output/public/assets/routes-CrdokJ80.js +0 -1
- package/.output/public/assets/search-DLhbWw3W.js +0 -1
- package/.output/public/assets/signing-HRexfjsH.js +0 -1
- package/.output/public/assets/styles-eB4EtvFS.css +0 -2
- package/.output/public/assets/table-D8CLieHX.js +0 -1
- package/.output/public/assets/textarea-YJLTVAoq.js +0 -1
- package/.output/public/assets/useMutation-JsGVjQMY.js +0 -1
- package/.output/public/assets/useOpenInteractionType-4cRD5xO0.js +0 -1
- package/.output/server/_libs/@reduxjs/toolkit+[...].mjs +0 -1554
- package/.output/server/_libs/d3-array.mjs +0 -231
- package/.output/server/_libs/d3-color.mjs +0 -330
- package/.output/server/_libs/d3-format.mjs +0 -252
- package/.output/server/_libs/d3-interpolate.mjs +0 -207
- package/.output/server/_libs/d3-path.mjs +0 -77
- package/.output/server/_libs/d3-scale+[...].mjs +0 -1907
- package/.output/server/_libs/d3-shape.mjs +0 -818
- package/.output/server/_libs/decimal.js-light.mjs +0 -884
- package/.output/server/_libs/es-toolkit.mjs +0 -1134
- package/.output/server/_libs/eventemitter3.mjs +0 -236
- package/.output/server/_libs/immer.mjs +0 -532
- package/.output/server/_libs/react-redux+[...].mjs +0 -205
- package/.output/server/_libs/recharts+[...].mjs +0 -14117
- package/.output/server/_ssr/AnalyticsCapabilityContext-ui4DX8GO.mjs +0 -15
- package/.output/server/_ssr/BundleActivityChart-BiB9ZORH.mjs +0 -288
- package/.output/server/_ssr/BundleIdDisplay-Czk6iR6p.mjs +0 -13
- package/.output/server/_ssr/analytics-DtMTn8fn.mjs +0 -858
- package/.output/server/_ssr/analytics-api-Cg1M5v_H.mjs +0 -71
- package/.output/server/_ssr/analytics-input-fRRRn0uA.mjs +0 -96
- package/.output/server/_ssr/analytics-rpc-DY5uXvHT.mjs +0 -155
- package/.output/server/_ssr/api-BTSv1tZb.mjs +0 -282
- package/.output/server/_ssr/badge-DCxbEeof.mjs +0 -26
- package/.output/server/_ssr/bundle-signing.server-D5u8KkMp.mjs +0 -51
- package/.output/server/_ssr/installations-B-azgAvX.mjs +0 -19
- package/.output/server/_ssr/installations-Ctvzp2JH.mjs +0 -535
- package/.output/server/_ssr/runtime.server-awTLiiXW.mjs +0 -527
- package/.output/server/_ssr/table-v1yCvYo7.mjs +0 -53
- package/.output/server/_ssr/textarea-DYHnskhb.mjs +0 -14
- package/.output/server/_tanstack-start-manifest_v-CH4StzJu.mjs +0 -108
- package/src/components/features/analytics/ActivityChart.tsx +0 -150
- package/src/components/features/analytics/AnalyticsCapabilityContext.tsx +0 -24
- package/src/components/features/analytics/AnalyticsControls.tsx +0 -115
- package/src/components/features/analytics/AnalyticsOverview.tsx +0 -208
- package/src/components/features/analytics/BundleDistribution.tsx +0 -133
- package/src/components/features/analytics/BundleSelector.tsx +0 -114
- package/src/components/features/analytics/InstallationHistoryCard.tsx +0 -248
- package/src/components/features/analytics/InstallationMatchesCard.tsx +0 -132
- package/src/components/features/analytics/InstallationPageHeader.tsx +0 -138
- package/src/components/features/analytics/InstallationPagination.tsx +0 -48
- package/src/components/features/analytics/InstallationSearch.tsx +0 -230
- package/src/components/features/analytics/UpdateOutcomes.tsx +0 -147
- package/src/components/features/bundles/BundleActivityChart.tsx +0 -193
- package/src/components/features/bundles/BundleAnalyticsSummary.tsx +0 -123
- package/src/lib/analytics-api.ts +0 -145
- package/src/lib/analytics-error.ts +0 -19
- package/src/lib/analytics-input.ts +0 -187
- package/src/lib/analytics-overview.ts +0 -170
- package/src/lib/analytics-rpc.ts +0 -218
- package/src/lib/server/releaseActivity.ts +0 -27
- package/src/routes/analytics.tsx +0 -139
- /package/.output/public/assets/{preload-helper-TKOBYGYD.js → preload-helper-CQ36nxok.js} +0 -0
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { i as __toESM } from "../_runtime.mjs";
|
|
2
|
-
import { at as require_react, it as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/AnalyticsCapabilityContext-ui4DX8GO.js
|
|
4
|
-
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
5
|
-
var import_jsx_runtime = require_jsx_runtime();
|
|
6
|
-
var AnalyticsCapabilityContext = (0, import_react.createContext)({ status: "unresolved" });
|
|
7
|
-
function AnalyticsCapabilityProvider({ children, value }) {
|
|
8
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AnalyticsCapabilityContext.Provider, {
|
|
9
|
-
value,
|
|
10
|
-
children
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
var useAnalyticsCapability = () => (0, import_react.useContext)(AnalyticsCapabilityContext);
|
|
14
|
-
//#endregion
|
|
15
|
-
export { useAnalyticsCapability as n, AnalyticsCapabilityProvider as t };
|
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
import { i as __toESM } from "../_runtime.mjs";
|
|
2
|
-
import { at as require_react, it as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
|
-
import { n as TriangleAlert } from "../_libs/lucide-react.mjs";
|
|
4
|
-
import { C as cn } from "./createSsrRpc-9P0S0lJ3.mjs";
|
|
5
|
-
import { i as AlertTitle, r as AlertDescription, t as Alert } from "./alert-Dim3MGY5.mjs";
|
|
6
|
-
import { a as CartesianGrid, c as ResponsiveContainer, i as Area, n as YAxis, o as Tooltip, r as XAxis, t as AreaChart } from "../_libs/recharts+[...].mjs";
|
|
7
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/BundleActivityChart-BiB9ZORH.js
|
|
8
|
-
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
9
|
-
var import_jsx_runtime = require_jsx_runtime();
|
|
10
|
-
var THEMES = {
|
|
11
|
-
light: "",
|
|
12
|
-
dark: ".dark"
|
|
13
|
-
};
|
|
14
|
-
var INITIAL_DIMENSION = {
|
|
15
|
-
width: 320,
|
|
16
|
-
height: 200
|
|
17
|
-
};
|
|
18
|
-
var ChartContext = import_react.createContext(null);
|
|
19
|
-
function useChart() {
|
|
20
|
-
const context = import_react.useContext(ChartContext);
|
|
21
|
-
if (!context) throw new Error("useChart must be used within a <ChartContainer />");
|
|
22
|
-
return context;
|
|
23
|
-
}
|
|
24
|
-
function ChartContainer({ id, className, children, config, initialDimension = INITIAL_DIMENSION, ...props }) {
|
|
25
|
-
const uniqueId = import_react.useId();
|
|
26
|
-
const chartId = `chart-${id ?? uniqueId.replace(/:/g, "")}`;
|
|
27
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChartContext.Provider, {
|
|
28
|
-
value: { config },
|
|
29
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
30
|
-
"data-slot": "chart",
|
|
31
|
-
"data-chart": chartId,
|
|
32
|
-
className: cn("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", className),
|
|
33
|
-
...props,
|
|
34
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChartStyle, {
|
|
35
|
-
id: chartId,
|
|
36
|
-
config
|
|
37
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ResponsiveContainer, {
|
|
38
|
-
initialDimension,
|
|
39
|
-
children
|
|
40
|
-
})]
|
|
41
|
-
})
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
var ChartStyle = ({ id, config }) => {
|
|
45
|
-
const colorConfig = Object.entries(config).filter(([, config]) => config.theme ?? config.color);
|
|
46
|
-
if (!colorConfig.length) return null;
|
|
47
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", { dangerouslySetInnerHTML: { __html: Object.entries(THEMES).map(([theme, prefix]) => `
|
|
48
|
-
${prefix} [data-chart=${id}] {
|
|
49
|
-
${colorConfig.map(([key, itemConfig]) => {
|
|
50
|
-
const color = itemConfig.theme?.[theme] ?? itemConfig.color;
|
|
51
|
-
return color ? ` --color-${key}: ${color};` : null;
|
|
52
|
-
}).join("\n")}
|
|
53
|
-
}
|
|
54
|
-
`).join("\n") } });
|
|
55
|
-
};
|
|
56
|
-
var ChartTooltip = Tooltip;
|
|
57
|
-
function ChartTooltipContent({ active, payload, className, indicator = "dot", hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey }) {
|
|
58
|
-
const { config } = useChart();
|
|
59
|
-
const tooltipLabel = import_react.useMemo(() => {
|
|
60
|
-
if (hideLabel || !payload?.length) return null;
|
|
61
|
-
const [item] = payload;
|
|
62
|
-
const itemConfig = getPayloadConfigFromPayload(config, item, `${labelKey ?? item?.dataKey ?? item?.name ?? "value"}`);
|
|
63
|
-
const value = !labelKey && typeof label === "string" ? config[label]?.label ?? label : itemConfig?.label;
|
|
64
|
-
if (labelFormatter) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
65
|
-
className: cn("font-medium", labelClassName),
|
|
66
|
-
children: labelFormatter(value, payload)
|
|
67
|
-
});
|
|
68
|
-
if (!value) return null;
|
|
69
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
70
|
-
className: cn("font-medium", labelClassName),
|
|
71
|
-
children: value
|
|
72
|
-
});
|
|
73
|
-
}, [
|
|
74
|
-
label,
|
|
75
|
-
labelFormatter,
|
|
76
|
-
payload,
|
|
77
|
-
hideLabel,
|
|
78
|
-
labelClassName,
|
|
79
|
-
config,
|
|
80
|
-
labelKey
|
|
81
|
-
]);
|
|
82
|
-
if (!active || !payload?.length) return null;
|
|
83
|
-
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
84
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
85
|
-
className: cn("grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs/relaxed shadow-xl", className),
|
|
86
|
-
children: [!nestLabel ? tooltipLabel : null, /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
87
|
-
className: "grid gap-1.5",
|
|
88
|
-
children: payload.filter((item) => item.type !== "none").map((item, index) => {
|
|
89
|
-
const itemConfig = getPayloadConfigFromPayload(config, item, `${nameKey ?? item.name ?? item.dataKey ?? "value"}`);
|
|
90
|
-
const indicatorColor = color ?? item.payload?.fill ?? item.color;
|
|
91
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
92
|
-
className: cn("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", indicator === "dot" && "items-center"),
|
|
93
|
-
children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [itemConfig?.icon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
94
|
-
className: cn("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)", {
|
|
95
|
-
"h-2.5 w-2.5": indicator === "dot",
|
|
96
|
-
"w-1": indicator === "line",
|
|
97
|
-
"w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
|
|
98
|
-
"my-0.5": nestLabel && indicator === "dashed"
|
|
99
|
-
}),
|
|
100
|
-
style: {
|
|
101
|
-
"--color-bg": indicatorColor,
|
|
102
|
-
"--color-border": indicatorColor
|
|
103
|
-
}
|
|
104
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
105
|
-
className: cn("flex flex-1 justify-between gap-2 leading-none", nestLabel ? "items-end" : "items-center"),
|
|
106
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
107
|
-
className: "grid gap-1.5",
|
|
108
|
-
children: [nestLabel ? tooltipLabel : null, /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
109
|
-
className: "text-muted-foreground",
|
|
110
|
-
children: itemConfig?.label ?? item.name
|
|
111
|
-
})]
|
|
112
|
-
}), item.value != null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
113
|
-
className: "font-mono font-medium text-foreground tabular-nums",
|
|
114
|
-
children: typeof item.value === "number" ? item.value.toLocaleString() : String(item.value)
|
|
115
|
-
})]
|
|
116
|
-
})] })
|
|
117
|
-
}, index);
|
|
118
|
-
})
|
|
119
|
-
})]
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
function getPayloadConfigFromPayload(config, payload, key) {
|
|
123
|
-
if (typeof payload !== "object" || payload === null) return;
|
|
124
|
-
const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
|
|
125
|
-
let configLabelKey = key;
|
|
126
|
-
if (key in payload && typeof payload[key] === "string") configLabelKey = payload[key];
|
|
127
|
-
else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") configLabelKey = payloadPayload[key];
|
|
128
|
-
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
129
|
-
}
|
|
130
|
-
var getAnalyticsErrorCopy = (error, fallbackTitle) => {
|
|
131
|
-
const match = /^Bundle event scan exceeded (\d+) rows\.$/.exec(error.message);
|
|
132
|
-
if (!match) return {
|
|
133
|
-
title: fallbackTitle,
|
|
134
|
-
description: error.message
|
|
135
|
-
};
|
|
136
|
-
return {
|
|
137
|
-
title: "Analytics report limit reached",
|
|
138
|
-
description: `This query matched more than ${Number(match[1]).toLocaleString()} reports. Narrow the query and try again.`
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
|
-
function AnalyticsErrorAlert({ error, fallbackTitle }) {
|
|
142
|
-
const copy = getAnalyticsErrorCopy(error, fallbackTitle);
|
|
143
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, {
|
|
144
|
-
variant: "destructive",
|
|
145
|
-
children: [
|
|
146
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TriangleAlert, { "aria-hidden": "true" }),
|
|
147
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTitle, { children: copy.title }),
|
|
148
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDescription, { children: copy.description })
|
|
149
|
-
]
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
var chartConfig = {
|
|
153
|
-
installed: {
|
|
154
|
-
label: "Applied",
|
|
155
|
-
color: "var(--chart-2)"
|
|
156
|
-
},
|
|
157
|
-
recovered: {
|
|
158
|
-
label: "Recovered",
|
|
159
|
-
color: "var(--muted-foreground)"
|
|
160
|
-
}
|
|
161
|
-
};
|
|
162
|
-
var dateFormatter = new Intl.DateTimeFormat("en", {
|
|
163
|
-
day: "numeric",
|
|
164
|
-
month: "short",
|
|
165
|
-
timeZone: "UTC"
|
|
166
|
-
});
|
|
167
|
-
var hourFormatter = new Intl.DateTimeFormat("en", {
|
|
168
|
-
day: "numeric",
|
|
169
|
-
hour: "numeric",
|
|
170
|
-
month: "short",
|
|
171
|
-
timeZone: "UTC"
|
|
172
|
-
});
|
|
173
|
-
var windowLabels = {
|
|
174
|
-
"24h": "24 hours",
|
|
175
|
-
"7d": "7 days",
|
|
176
|
-
"30d": "30 days"
|
|
177
|
-
};
|
|
178
|
-
var mergeActivitySeries = (installed, recovered) => {
|
|
179
|
-
const installedByBucket = new Map(installed.map((point) => [point.bucketStartMs, point.value]));
|
|
180
|
-
const recoveredByBucket = new Map(recovered.map((point) => [point.bucketStartMs, point.value]));
|
|
181
|
-
return [...new Set([...installedByBucket.keys(), ...recoveredByBucket.keys()])].sort((left, right) => left - right).map((bucketStartMs) => ({
|
|
182
|
-
bucketStartMs,
|
|
183
|
-
installed: installedByBucket.get(bucketStartMs) ?? 0,
|
|
184
|
-
recovered: recoveredByBucket.get(bucketStartMs) ?? 0
|
|
185
|
-
}));
|
|
186
|
-
};
|
|
187
|
-
var formatBucket = (value, window) => (window === "24h" ? hourFormatter : dateFormatter).format(new Date(value));
|
|
188
|
-
function BundleActivityChart({ installed, recovered, window }) {
|
|
189
|
-
const captionId = (0, import_react.useId)();
|
|
190
|
-
const chartData = mergeActivitySeries(installed, recovered);
|
|
191
|
-
if (!chartData.some((point) => point.installed > 0 || point.recovered > 0)) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
192
|
-
className: "flex h-16 items-center justify-center border-t px-4 pt-3 text-center text-xs text-muted-foreground sm:h-20 sm:pt-4",
|
|
193
|
-
children: "No device activity in the last 30 days."
|
|
194
|
-
});
|
|
195
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
196
|
-
className: "border-t pt-3 sm:pt-4",
|
|
197
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChartContainer, {
|
|
198
|
-
"aria-describedby": captionId,
|
|
199
|
-
"aria-label": `Bundle movement over ${windowLabels[window]}`,
|
|
200
|
-
className: "h-24 w-full aspect-auto sm:h-32",
|
|
201
|
-
config: chartConfig,
|
|
202
|
-
role: "img",
|
|
203
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AreaChart, {
|
|
204
|
-
accessibilityLayer: true,
|
|
205
|
-
data: chartData,
|
|
206
|
-
margin: {
|
|
207
|
-
left: -16,
|
|
208
|
-
right: 4,
|
|
209
|
-
top: 4
|
|
210
|
-
},
|
|
211
|
-
children: [
|
|
212
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CartesianGrid, { vertical: false }),
|
|
213
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(XAxis, {
|
|
214
|
-
axisLine: false,
|
|
215
|
-
dataKey: "bucketStartMs",
|
|
216
|
-
minTickGap: 28,
|
|
217
|
-
tickFormatter: (value) => formatBucket(value, window),
|
|
218
|
-
tickLine: false
|
|
219
|
-
}),
|
|
220
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(YAxis, {
|
|
221
|
-
allowDecimals: false,
|
|
222
|
-
axisLine: false,
|
|
223
|
-
tickLine: false,
|
|
224
|
-
width: 32
|
|
225
|
-
}),
|
|
226
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChartTooltip, { content: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChartTooltipContent, { labelFormatter: (_, payload) => {
|
|
227
|
-
const bucket = payload[0]?.payload.bucketStartMs;
|
|
228
|
-
return typeof bucket === "number" ? formatBucket(bucket, window) : "";
|
|
229
|
-
} }) }),
|
|
230
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Area, {
|
|
231
|
-
dataKey: "installed",
|
|
232
|
-
fill: "var(--color-installed)",
|
|
233
|
-
fillOpacity: .12,
|
|
234
|
-
isAnimationActive: false,
|
|
235
|
-
stroke: "var(--color-installed)",
|
|
236
|
-
strokeWidth: 2,
|
|
237
|
-
type: "monotone"
|
|
238
|
-
}),
|
|
239
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Area, {
|
|
240
|
-
dataKey: "recovered",
|
|
241
|
-
fill: "var(--color-recovered)",
|
|
242
|
-
fillOpacity: .04,
|
|
243
|
-
isAnimationActive: false,
|
|
244
|
-
stroke: "var(--color-recovered)",
|
|
245
|
-
strokeWidth: 1.5,
|
|
246
|
-
type: "monotone"
|
|
247
|
-
})
|
|
248
|
-
]
|
|
249
|
-
})
|
|
250
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
251
|
-
className: "sr-only",
|
|
252
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("table", { children: [
|
|
253
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("caption", {
|
|
254
|
-
id: captionId,
|
|
255
|
-
children: [
|
|
256
|
-
"Distinct bundle movement in each bucket over ",
|
|
257
|
-
windowLabels[window],
|
|
258
|
-
". Times are shown in UTC."
|
|
259
|
-
]
|
|
260
|
-
}),
|
|
261
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [
|
|
262
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
|
|
263
|
-
scope: "col",
|
|
264
|
-
children: "Date"
|
|
265
|
-
}),
|
|
266
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
|
|
267
|
-
scope: "col",
|
|
268
|
-
children: "Applied"
|
|
269
|
-
}),
|
|
270
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
|
|
271
|
-
scope: "col",
|
|
272
|
-
children: "Recovered"
|
|
273
|
-
})
|
|
274
|
-
] }) }),
|
|
275
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: chartData.map((point) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [
|
|
276
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
|
|
277
|
-
scope: "row",
|
|
278
|
-
children: formatBucket(point.bucketStartMs, window)
|
|
279
|
-
}),
|
|
280
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: point.installed }),
|
|
281
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: point.recovered })
|
|
282
|
-
] }, point.bucketStartMs)) })
|
|
283
|
-
] })
|
|
284
|
-
})]
|
|
285
|
-
});
|
|
286
|
-
}
|
|
287
|
-
//#endregion
|
|
288
|
-
export { ChartTooltipContent as a, ChartTooltip as i, BundleActivityChart as n, ChartContainer as r, AnalyticsErrorAlert as t };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { it as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
2
|
-
import { C as cn } from "./createSsrRpc-9P0S0lJ3.mjs";
|
|
3
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/BundleIdDisplay-Czk6iR6p.js
|
|
4
|
-
var import_jsx_runtime = require_jsx_runtime();
|
|
5
|
-
function BundleIdDisplay({ bundleId, className }) {
|
|
6
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
7
|
-
translate: "no",
|
|
8
|
-
className: cn("break-all font-mono text-xs tabular-nums", className),
|
|
9
|
-
children: bundleId
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
//#endregion
|
|
13
|
-
export { BundleIdDisplay as t };
|