@hot-updater/console 1.0.0-rc.1 → 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-C_NydL0e.js +1 -0
- 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-BkbfZ62O.js → refresh-cw-Bqc72UZG.js} +1 -1
- package/.output/public/assets/{routes-BuoI5-Cr.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-Dftxlm2E.mjs → __23tanstack-start-server-fn-resolver-B7ioJhtE.mjs} +46 -54
- package/.output/server/_libs/@base-ui/react+[...].mjs +283 -2417
- 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-CpBqHpuC.mjs → api-keys-CZeTPQys.mjs} +9 -11
- package/.output/server/_ssr/{api-keys-api-Czkp57UV.mjs → api-keys-api-BUPQVSpk.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-rpc-BTtMDSoR.mjs → api-keys-rpc-Cs7tS5_j.mjs} +5 -5
- package/.output/server/_ssr/{api-rpc-BEX8ISai.mjs → api-rpc-tAupfGQm.mjs} +73 -142
- package/.output/server/_ssr/{auth-rpc-BFMEC-TT.mjs → auth-rpc-DUaeOWKK.mjs} +2 -2
- package/.output/server/_ssr/{bundle-signing-rpc-BbCFUQSu.mjs → bundle-signing-rpc-BhnBw0-d.mjs} +2 -2
- package/.output/server/_ssr/{card-Bsc8mRis.mjs → card-BRiPmi0C.mjs} +25 -3
- package/.output/server/_ssr/{config.server-DQYEr_5X.mjs → config.server-afDuAwaG.mjs} +14 -7
- package/.output/server/_ssr/{createSsrRpc-DhfrxEjg.mjs → createSsrRpc-DjWNJ0uc.mjs} +6 -6
- package/.output/server/_ssr/databaseJsonValue-d6I3nAS4.mjs +45 -0
- package/.output/server/_ssr/{databaseRows-QlCYLi0H.mjs → databaseRows-5bCRTxm-.mjs} +4 -44
- package/.output/server/_ssr/{deleteBundle-Cu_XOMt0.mjs → deleteBundle-BTGwBgzx.mjs} +2 -2
- package/.output/server/_ssr/{dialog-C0vKUp8R.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-BxBEvtF1.mjs → router-B9wG_9f8.mjs} +23 -32
- package/.output/server/_ssr/{routes-BC7rn-tf.mjs → routes-CKrrS2q2.mjs} +3 -3
- package/.output/server/_ssr/{routes-CM5KAwpB.mjs → routes-D7Yh_jfj.mjs} +402 -389
- package/.output/server/_ssr/runtime.server-DacU1TBV.mjs +438 -0
- package/.output/server/_ssr/{server-CpzW--lT.mjs → server-D_C2rMzf.mjs} +5 -5
- package/.output/server/_ssr/{signing-jk4HANnl.mjs → signing-Dz1WkZOf.mjs} +5 -6
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/{field-DASCh-5d.mjs → table-CnZmon_Z.mjs} +51 -5
- package/.output/server/_ssr/{uuidv7-CaKuKXrV.mjs → uuidv7-D0QFkPL_.mjs} +3 -3
- package/.output/server/_tanstack-start-manifest_v-2MjTyxil.mjs +97 -0
- package/.output/server/index.mjs +164 -178
- package/lib/index.d.mts +4 -3
- package/lib/vite-internal.mjs +1 -1
- package/lib/vite.d.mts +0 -1
- package/package.json +8 -8
- package/src/components/AppSidebar.tsx +10 -14
- package/src/components/ConsoleAccessPage.tsx +1 -1
- package/src/components/HashValueDisplay.tsx +11 -2
- 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 +82 -76
- package/src/components/features/insights/InsightsErrorAlert.tsx +5 -5
- package/src/components/features/insights/InsightsOverview.tsx +156 -161
- 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 +178 -176
- package/src/components/features/insights/InstallationMatchesCard.tsx +111 -65
- package/src/components/features/insights/InstallationPageHeader.tsx +57 -105
- package/src/components/features/releases/ReleaseEditorSheet.tsx +24 -24
- 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 -2
- package/src/lib/api-rpc.ts +19 -90
- package/src/lib/api.ts +0 -99
- package/src/lib/insights-api.ts +93 -137
- package/src/lib/insights-rpc.ts +69 -199
- package/src/lib/insights-view.ts +15 -0
- package/src/lib/public-bundle-error.ts +19 -0
- package/src/lib/server/releaseReachability.ts +1 -4
- package/src/lib/server/runtime.server.ts +5 -141
- package/src/router.tsx +3 -0
- package/src/routes/-installations-search.ts +25 -12
- package/src/routes/__root.tsx +6 -16
- package/src/routes/index.tsx +21 -81
- package/src/routes/insights.tsx +50 -105
- package/src/routes/installations.tsx +290 -138
- package/src/styles.css +6 -0
- package/.output/public/assets/BundleIdDisplay-D4ErdU5_.js +0 -1
- package/.output/public/assets/InsightsCapabilityContext-B42VqvP6.js +0 -1
- package/.output/public/assets/api-keys-api-DGVTTvTJ.js +0 -1
- package/.output/public/assets/api-keys-z16OZIP4.js +0 -1
- package/.output/public/assets/badge-Br_KDO0J.js +0 -1
- package/.output/public/assets/card-DzuEXvyJ.js +0 -1
- package/.output/public/assets/createServerFn-gM2-LFBy.js +0 -3
- package/.output/public/assets/dialog-BeAENgez.js +0 -1
- package/.output/public/assets/dist-Bssh_cv0.js +0 -1
- package/.output/public/assets/field-Buq148-A.js +0 -1
- package/.output/public/assets/index-uOpQAIC4.js +0 -10
- package/.output/public/assets/input-group-B3p5UpyW.js +0 -1
- package/.output/public/assets/insights-DJTr7Ozn.js +0 -1
- package/.output/public/assets/insights-api-DVMOoRMS.js +0 -1
- package/.output/public/assets/installations-BY64iIAK.js +0 -2
- package/.output/public/assets/installations-D5v9i3AL.js +0 -1
- package/.output/public/assets/lazyRouteComponent-DKYu5cZJ.js +0 -1
- package/.output/public/assets/routes-C8fvgETO.js +0 -1
- package/.output/public/assets/search-qsIDvS2I.js +0 -1
- package/.output/public/assets/signing-mJD88Y4C.js +0 -1
- package/.output/public/assets/styles-BZIG7t42.css +0 -2
- package/.output/public/assets/table-RamFEclP.js +0 -1
- package/.output/public/assets/useCompositeListItem-ChzDqdpc.js +0 -42
- package/.output/public/assets/useMutation-JsGVjQMY.js +0 -1
- package/.output/public/assets/useOpenInteractionType-Dwfy-SpA.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/BundleActivityChart-CWcdPuUn.mjs +0 -288
- package/.output/server/_ssr/BundleIdDisplay-BEvB3MvA.mjs +0 -13
- package/.output/server/_ssr/InsightsCapabilityContext-Cx8fjm2s.mjs +0 -15
- package/.output/server/_ssr/badge-CpWXQwyF.mjs +0 -26
- package/.output/server/_ssr/input-group-etIsBUqv.mjs +0 -288
- package/.output/server/_ssr/insights-api-C1F7UreR.mjs +0 -71
- package/.output/server/_ssr/insights-input-9fEJF-ZG.mjs +0 -96
- package/.output/server/_ssr/insights-rpc-C-8R6kED.mjs +0 -155
- package/.output/server/_ssr/insights-ygT_aIfo.mjs +0 -858
- package/.output/server/_ssr/installations-DqRT1QTd.mjs +0 -535
- package/.output/server/_ssr/installations-K8TCYTYh.mjs +0 -19
- package/.output/server/_ssr/runtime.server-la7TRAH_.mjs +0 -527
- package/.output/server/_ssr/table-CU58HeI7.mjs +0 -53
- package/.output/server/_tanstack-start-manifest_v-Mz9MmSlD.mjs +0 -103
- package/src/components/features/bundles/BundleActivityChart.tsx +0 -193
- package/src/components/features/bundles/BundleInsightsSummary.tsx +0 -123
- package/src/components/features/insights/ActivityChart.tsx +0 -150
- package/src/components/features/insights/BundleDistribution.tsx +0 -133
- package/src/components/features/insights/BundleSelector.tsx +0 -114
- package/src/components/features/insights/InsightsCapabilityContext.tsx +0 -24
- package/src/components/features/insights/InstallationPagination.tsx +0 -48
- package/src/components/features/insights/InstallationSearch.tsx +0 -230
- package/src/components/features/insights/UpdateOutcomes.tsx +0 -147
- package/src/lib/insights-error.ts +0 -19
- package/src/lib/insights-input.ts +0 -187
- package/src/lib/insights-overview.ts +0 -170
- package/src/lib/server/releaseActivity.ts +0 -27
|
@@ -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 };
|