@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,205 +0,0 @@
|
|
|
1
|
-
import { i as __toESM, t as __commonJSMin } from "../_runtime.mjs";
|
|
2
|
-
import { at as require_react } from "./@base-ui/react+[...].mjs";
|
|
3
|
-
//#region ../../node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.2.6/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js
|
|
4
|
-
/**
|
|
5
|
-
* @license React
|
|
6
|
-
* use-sync-external-store-with-selector.production.js
|
|
7
|
-
*
|
|
8
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
9
|
-
*
|
|
10
|
-
* This source code is licensed under the MIT license found in the
|
|
11
|
-
* LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/
|
|
13
|
-
var require_use_sync_external_store_with_selector_production = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14
|
-
var React = require_react();
|
|
15
|
-
React.useSyncExternalStore;
|
|
16
|
-
React.useRef;
|
|
17
|
-
React.useEffect;
|
|
18
|
-
React.useMemo;
|
|
19
|
-
React.useDebugValue;
|
|
20
|
-
}));
|
|
21
|
-
//#endregion
|
|
22
|
-
//#region ../../node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.2.6/node_modules/use-sync-external-store/with-selector.js
|
|
23
|
-
var require_with_selector = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
24
|
-
module.exports = require_use_sync_external_store_with_selector_production();
|
|
25
|
-
}));
|
|
26
|
-
//#endregion
|
|
27
|
-
//#region ../../node_modules/.pnpm/react-redux@9.3.0_@types+react@19.2.15_react@19.2.6_redux@5.0.1/node_modules/react-redux/dist/react-redux.mjs
|
|
28
|
-
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
29
|
-
require_with_selector();
|
|
30
|
-
function defaultNoopBatch(callback) {
|
|
31
|
-
callback();
|
|
32
|
-
}
|
|
33
|
-
function createListenerCollection() {
|
|
34
|
-
let first = null;
|
|
35
|
-
let last = null;
|
|
36
|
-
return {
|
|
37
|
-
clear() {
|
|
38
|
-
first = null;
|
|
39
|
-
last = null;
|
|
40
|
-
},
|
|
41
|
-
notify() {
|
|
42
|
-
defaultNoopBatch(() => {
|
|
43
|
-
let listener = first;
|
|
44
|
-
while (listener) {
|
|
45
|
-
listener.callback();
|
|
46
|
-
listener = listener.next;
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
},
|
|
50
|
-
get() {
|
|
51
|
-
const listeners = [];
|
|
52
|
-
let listener = first;
|
|
53
|
-
while (listener) {
|
|
54
|
-
listeners.push(listener);
|
|
55
|
-
listener = listener.next;
|
|
56
|
-
}
|
|
57
|
-
return listeners;
|
|
58
|
-
},
|
|
59
|
-
subscribe(callback) {
|
|
60
|
-
let isSubscribed = true;
|
|
61
|
-
const listener = last = {
|
|
62
|
-
callback,
|
|
63
|
-
next: null,
|
|
64
|
-
prev: last
|
|
65
|
-
};
|
|
66
|
-
if (listener.prev) listener.prev.next = listener;
|
|
67
|
-
else first = listener;
|
|
68
|
-
return function unsubscribe() {
|
|
69
|
-
if (!isSubscribed || first === null) return;
|
|
70
|
-
isSubscribed = false;
|
|
71
|
-
if (listener.next) listener.next.prev = listener.prev;
|
|
72
|
-
else last = listener.prev;
|
|
73
|
-
if (listener.prev) listener.prev.next = listener.next;
|
|
74
|
-
else first = listener.next;
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
var nullListeners = {
|
|
80
|
-
notify() {},
|
|
81
|
-
get: () => []
|
|
82
|
-
};
|
|
83
|
-
function createSubscription(store, parentSub) {
|
|
84
|
-
let unsubscribe;
|
|
85
|
-
let listeners = nullListeners;
|
|
86
|
-
let subscriptionsAmount = 0;
|
|
87
|
-
let selfSubscribed = false;
|
|
88
|
-
function addNestedSub(listener) {
|
|
89
|
-
trySubscribe();
|
|
90
|
-
const cleanupListener = listeners.subscribe(listener);
|
|
91
|
-
let removed = false;
|
|
92
|
-
return () => {
|
|
93
|
-
if (!removed) {
|
|
94
|
-
removed = true;
|
|
95
|
-
cleanupListener();
|
|
96
|
-
tryUnsubscribe();
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
function notifyNestedSubs() {
|
|
101
|
-
listeners.notify();
|
|
102
|
-
}
|
|
103
|
-
function handleChangeWrapper() {
|
|
104
|
-
if (subscription.onStateChange) subscription.onStateChange();
|
|
105
|
-
}
|
|
106
|
-
function isSubscribed() {
|
|
107
|
-
return selfSubscribed;
|
|
108
|
-
}
|
|
109
|
-
function trySubscribe() {
|
|
110
|
-
subscriptionsAmount++;
|
|
111
|
-
if (!unsubscribe) {
|
|
112
|
-
unsubscribe = parentSub ? parentSub.addNestedSub(handleChangeWrapper) : store.subscribe(handleChangeWrapper);
|
|
113
|
-
listeners = createListenerCollection();
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
function tryUnsubscribe() {
|
|
117
|
-
subscriptionsAmount--;
|
|
118
|
-
if (unsubscribe && subscriptionsAmount === 0) {
|
|
119
|
-
unsubscribe();
|
|
120
|
-
unsubscribe = void 0;
|
|
121
|
-
listeners.clear();
|
|
122
|
-
listeners = nullListeners;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
function trySubscribeSelf() {
|
|
126
|
-
if (!selfSubscribed) {
|
|
127
|
-
selfSubscribed = true;
|
|
128
|
-
trySubscribe();
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
function tryUnsubscribeSelf() {
|
|
132
|
-
if (selfSubscribed) {
|
|
133
|
-
selfSubscribed = false;
|
|
134
|
-
tryUnsubscribe();
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
const subscription = {
|
|
138
|
-
addNestedSub,
|
|
139
|
-
notifyNestedSubs,
|
|
140
|
-
handleChangeWrapper,
|
|
141
|
-
isSubscribed,
|
|
142
|
-
trySubscribe: trySubscribeSelf,
|
|
143
|
-
tryUnsubscribe: tryUnsubscribeSelf,
|
|
144
|
-
getListeners: () => listeners
|
|
145
|
-
};
|
|
146
|
-
return subscription;
|
|
147
|
-
}
|
|
148
|
-
var canUseDOM = () => !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined");
|
|
149
|
-
var isDOM = /* @__PURE__ */ canUseDOM();
|
|
150
|
-
var isRunningInReactNative = () => typeof navigator !== "undefined" && navigator.product === "ReactNative";
|
|
151
|
-
var isReactNative = /* @__PURE__ */ isRunningInReactNative();
|
|
152
|
-
var getUseIsomorphicLayoutEffect = () => isDOM || isReactNative ? import_react.useLayoutEffect : import_react.useEffect;
|
|
153
|
-
var useIsomorphicLayoutEffect = /* @__PURE__ */ getUseIsomorphicLayoutEffect();
|
|
154
|
-
function is(x, y) {
|
|
155
|
-
if (x === y) return x !== 0 || y !== 0 || 1 / x === 1 / y;
|
|
156
|
-
else return x !== x && y !== y;
|
|
157
|
-
}
|
|
158
|
-
function shallowEqual(objA, objB) {
|
|
159
|
-
if (is(objA, objB)) return true;
|
|
160
|
-
if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) return false;
|
|
161
|
-
const keysA = Object.keys(objA);
|
|
162
|
-
const keysB = Object.keys(objB);
|
|
163
|
-
if (keysA.length !== keysB.length) return false;
|
|
164
|
-
for (let i = 0; i < keysA.length; i++) if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) return false;
|
|
165
|
-
return true;
|
|
166
|
-
}
|
|
167
|
-
var ContextKey = /* @__PURE__ */ Symbol.for(`react-redux-context`);
|
|
168
|
-
var gT = typeof globalThis !== "undefined" ? globalThis : {};
|
|
169
|
-
function getContext() {
|
|
170
|
-
if (!import_react.createContext) return {};
|
|
171
|
-
const contextMap = gT[ContextKey] ??= /* @__PURE__ */ new Map();
|
|
172
|
-
let realContext = contextMap.get(import_react.createContext);
|
|
173
|
-
if (!realContext) {
|
|
174
|
-
realContext = import_react.createContext(null);
|
|
175
|
-
contextMap.set(import_react.createContext, realContext);
|
|
176
|
-
}
|
|
177
|
-
return realContext;
|
|
178
|
-
}
|
|
179
|
-
var ReactReduxContext = /* @__PURE__ */ getContext();
|
|
180
|
-
function Provider(providerProps) {
|
|
181
|
-
const { children, context, serverState, store } = providerProps;
|
|
182
|
-
const contextValue = import_react.useMemo(() => {
|
|
183
|
-
return {
|
|
184
|
-
store,
|
|
185
|
-
subscription: createSubscription(store),
|
|
186
|
-
getServerState: serverState ? () => serverState : void 0
|
|
187
|
-
};
|
|
188
|
-
}, [store, serverState]);
|
|
189
|
-
const previousState = import_react.useMemo(() => store.getState(), [store]);
|
|
190
|
-
useIsomorphicLayoutEffect(() => {
|
|
191
|
-
const { subscription } = contextValue;
|
|
192
|
-
subscription.onStateChange = subscription.notifyNestedSubs;
|
|
193
|
-
subscription.trySubscribe();
|
|
194
|
-
if (previousState !== store.getState()) subscription.notifyNestedSubs();
|
|
195
|
-
return () => {
|
|
196
|
-
subscription.tryUnsubscribe();
|
|
197
|
-
subscription.onStateChange = void 0;
|
|
198
|
-
};
|
|
199
|
-
}, [contextValue, previousState]);
|
|
200
|
-
const Context = context || ReactReduxContext;
|
|
201
|
-
return /* @__PURE__ */ import_react.createElement(Context.Provider, { value: contextValue }, children);
|
|
202
|
-
}
|
|
203
|
-
var Provider_default = Provider;
|
|
204
|
-
//#endregion
|
|
205
|
-
export { shallowEqual as n, Provider_default as t };
|