@oj-module/cli 0.2.64 → 0.2.66
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/devkit/README.md +9 -3
- package/devkit/SKILL.md +5 -2
- package/devkit/framework-dev.md +12 -7
- package/devkit/manual.md +123 -56
- package/devkit/menu-rules.md +4 -1
- package/package.json +3 -2
- package/shell-dist/assets/ahooks.2l850ymmh0.js +18 -0
- package/shell-dist/assets/antd-es-locale-zh_CN.1gjjsvxbf0.js +1 -0
- package/shell-dist/assets/antd-img-crop.196rkty480.js +99 -0
- package/shell-dist/assets/antd-locale-en_US.561tozx860.js +1 -0
- package/shell-dist/assets/antd-locale-zh_CN.1cmpmgzh70.js +1 -0
- package/shell-dist/assets/antd.uw1coq15l0.js +348 -0
- package/shell-dist/assets/clsx.jotilrt2e0.js +1 -0
- package/shell-dist/assets/contract-errors.2o17vz9u50.js +1 -0
- package/shell-dist/assets/contract.3h327o3mj0.js +57 -0
- package/shell-dist/assets/cssinjs.atgmhan7m0.js +3 -0
- package/shell-dist/assets/dayjs-plugin-advancedFormat.3vsyd2eis0.js +1 -0
- package/shell-dist/assets/dayjs-plugin-customParseFormat.13xhghv1d0.js +1 -0
- package/shell-dist/assets/dayjs-plugin-isoWeek.1fn1tw82p0.js +1 -0
- package/shell-dist/assets/dayjs-plugin-localeData.2rwbjp9nk0.js +1 -0
- package/shell-dist/assets/dayjs-plugin-quarterOfYear.2oqo1lcx80.js +1 -0
- package/shell-dist/assets/dayjs-plugin-relativeTime.2pqs3et4y0.js +1 -0
- package/shell-dist/assets/dayjs-plugin-weekOfYear.gvn9iph080.js +1 -0
- package/shell-dist/assets/dayjs-plugin-weekYear.2u78l3ex10.js +1 -0
- package/shell-dist/assets/dayjs-plugin-weekday.2d56a4tml0.js +1 -0
- package/shell-dist/assets/dayjs.pa60l6wjo0.js +1 -0
- package/shell-dist/assets/dnd-kit-core.1xyreig6r0.js +5 -0
- package/shell-dist/assets/dnd-kit-sortable.s94qciuft0.js +1 -0
- package/shell-dist/assets/dnd-kit-utilities.1umw4xphb0.js +1 -0
- package/shell-dist/assets/i18next.33zqofapj0.js +1 -0
- package/shell-dist/assets/icons-es-components-Context.365qmflwg0.js +1 -0
- package/shell-dist/assets/icons.159wjwals0.js +57 -0
- package/shell-dist/assets/jsx-dev-runtime.3uibuc82f0.js +14 -0
- package/shell-dist/assets/jsx-runtime.h40xu4o5b0.js +14 -0
- package/shell-dist/assets/keepalive-for-react.xenu5vam70.js +1 -0
- package/shell-dist/assets/kit.37kr8ui390.js +1 -0
- package/shell-dist/assets/ky.1cgch7gu60.js +6 -0
- package/shell-dist/assets/motion-react.pjsxytvjs0.js +12 -0
- package/shell-dist/assets/motion.21tciqutg0.js +4 -0
- package/shell-dist/assets/nprogress.2nz76n9ny0.js +7 -0
- package/shell-dist/assets/ojm-dayjs-locale-zh-cn.3vr3beiyp0.js +9 -0
- package/shell-dist/assets/pinyin-pro.3v0mnxczn0.js +1 -0
- package/shell-dist/assets/pro-components.2kyot1vcl0.js +83 -0
- package/shell-dist/assets/react-countup.2x8idnr8y0.js +10 -0
- package/shell-dist/assets/react-dom-client.ick0v05ob0.js +43 -0
- package/shell-dist/assets/react-dom.2so9uxg3f0.js +22 -0
- package/shell-dist/assets/react-error-boundary.2dncdfj3b0.js +1 -0
- package/shell-dist/assets/react-i18next.auhvjhqv00.js +1 -0
- package/shell-dist/assets/react-jss.1ei6dr9e00.js +29 -0
- package/shell-dist/assets/react-query.3rln45ow00.js +1 -0
- package/shell-dist/assets/react-router-dom.3c6zld8h40.js +44 -0
- package/shell-dist/assets/react-router.2h9rebcv50.js +56 -0
- package/shell-dist/assets/react.1ew63mwts0.js +14 -0
- package/shell-dist/assets/runtime.1xfsxcajj0.js +21702 -0
- package/shell-dist/assets/simplebar-react.2g739uvai0.js +1 -0
- package/shell-dist/assets/spin-delay.yjeyj6iwp0.js +9 -0
- package/shell-dist/assets/tailwind-merge.125ehiqjw0.js +1 -0
- package/shell-dist/assets/use-sync-external-store-shim.1nz1pi9bb0.js +22 -0
- package/shell-dist/assets/zustand-middleware.1xaxjueme0.js +6 -0
- package/shell-dist/assets/zustand-react-shallow.pybayv1hx0.js +1 -0
- package/shell-dist/assets/zustand-react.9fsl9brxy0.js +1 -0
- package/shell-dist/assets/zustand-shallow.6cz0yyv9x0.js +1 -0
- package/shell-dist/assets/zustand-vanilla-shallow.3424monv50.js +1 -0
- package/shell-dist/assets/zustand-vanilla.1mo3ka3g30.js +1 -0
- package/shell-dist/assets/zustand.3gjgzlnqo0.js +1 -0
- package/shell-dist/index.html +67 -118
- package/shell-dist/versions.json +3 -3
- package/src/esm-exports.ts +152 -70
- package/src/shared-deps.ts +69 -19
- package/src/site-base.ts +4 -0
- package/templates/src/app/web/home/pages/components/bar-chart.tsx +5 -3
- package/templates/src/app/web/home/pages/components/echarts-setup.ts +30 -0
- package/templates/src/app/web/home/pages/components/line-chart.tsx +5 -3
- package/templates/src/app/web/home/pages/components/pie-chart.tsx +6 -3
- package/templates/src/app/web/home/pages/index.tsx +3 -2
- package/templates/src/app/web/home/routes.ts +3 -2
- package/vendor/host-versions.json +3 -3
- package/shell-dist/assets/ahooks.js +0 -6909
- package/shell-dist/assets/antd-es-locale-zh_CN.js +0 -257
- package/shell-dist/assets/antd-img-crop.js +0 -1495
- package/shell-dist/assets/antd-locale-en_US.js +0 -374
- package/shell-dist/assets/antd-locale-zh_CN.js +0 -379
- package/shell-dist/assets/antd.js +0 -106874
- package/shell-dist/assets/clsx.js +0 -33
- package/shell-dist/assets/contract-errors.js +0 -30
- package/shell-dist/assets/contract.js +0 -18900
- package/shell-dist/assets/cssinjs.js +0 -2595
- package/shell-dist/assets/dayjs-plugin-advancedFormat.js +0 -98
- package/shell-dist/assets/dayjs-plugin-customParseFormat.js +0 -173
- package/shell-dist/assets/dayjs-plugin-isoWeek.js +0 -77
- package/shell-dist/assets/dayjs-plugin-localeData.js +0 -126
- package/shell-dist/assets/dayjs-plugin-quarterOfYear.js +0 -77
- package/shell-dist/assets/dayjs-plugin-relativeTime.js +0 -92
- package/shell-dist/assets/dayjs-plugin-weekOfYear.js +0 -73
- package/shell-dist/assets/dayjs-plugin-weekYear.js +0 -63
- package/shell-dist/assets/dayjs-plugin-weekday.js +0 -63
- package/shell-dist/assets/dayjs.js +0 -326
- package/shell-dist/assets/dnd-kit-core.js +0 -3601
- package/shell-dist/assets/dnd-kit-sortable.js +0 -717
- package/shell-dist/assets/dnd-kit-utilities.js +0 -340
- package/shell-dist/assets/i18next.js +0 -2321
- package/shell-dist/assets/icons-es-components-Context.js +0 -20
- package/shell-dist/assets/icons.js +0 -34961
- package/shell-dist/assets/jsx-dev-runtime.js +0 -75
- package/shell-dist/assets/jsx-runtime.js +0 -97
- package/shell-dist/assets/keepalive-for-react.js +0 -283
- package/shell-dist/assets/kit.js +0 -151
- package/shell-dist/assets/ky.js +0 -1427
- package/shell-dist/assets/motion-react.js +0 -13589
- package/shell-dist/assets/motion.js +0 -9959
- package/shell-dist/assets/nprogress.js +0 -314
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-BarsOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CalendarOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CaretDownFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CaretDownOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CaretUpOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CheckCircleFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CheckOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-ClockCircleOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CloseCircleFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CloseOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CopyOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-DeleteOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-DoubleLeftOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-DoubleRightOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-DownOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-DownloadOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-EditOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-EllipsisOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-EnterOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-ExclamationCircleFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-EyeInvisibleOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-EyeOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-FileOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-FileTextOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-FilterFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-FolderOpenOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-FolderOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-HolderOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-InfoCircleFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-LeftOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-LoadingOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-MinusOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-MinusSquareOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-PaperClipOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-PictureOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-PlusOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-PlusSquareOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-QuestionCircleOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-ReloadOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-RightOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-RotateLeftOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-RotateRightOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-SearchOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-StarFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-SwapOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-SwapRightOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-UpOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-VerticalAlignTopOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-WarningFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-ZoomInOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-ZoomOutOutlined.js +0 -7
- package/shell-dist/assets/ojm-dayjs-locale-zh-cn.js +0 -81
- package/shell-dist/assets/pinyin-pro.js +0 -25175
- package/shell-dist/assets/pro-components.js +0 -44627
- package/shell-dist/assets/react-countup.js +0 -525
- package/shell-dist/assets/react-dom-client.js +0 -12134
- package/shell-dist/assets/react-dom.js +0 -266
- package/shell-dist/assets/react-error-boundary.js +0 -141
- package/shell-dist/assets/react-i18next.js +0 -1773
- package/shell-dist/assets/react-jss.js +0 -4089
- package/shell-dist/assets/react-query.js +0 -3072
- package/shell-dist/assets/react-router-dom.js +0 -9927
- package/shell-dist/assets/react-router.js +0 -14584
- package/shell-dist/assets/react.js +0 -590
- package/shell-dist/assets/runtime.js +0 -28311
- package/shell-dist/assets/simplebar-react.js +0 -1119
- package/shell-dist/assets/spin-delay.js +0 -111
- package/shell-dist/assets/tailwind-merge.js +0 -3364
- package/shell-dist/assets/use-sync-external-store-shim.js +0 -130
- package/shell-dist/assets/zustand-middleware.js +0 -513
- package/shell-dist/assets/zustand-react-shallow.js +0 -27
- package/shell-dist/assets/zustand-react.js +0 -39
- package/shell-dist/assets/zustand-shallow.js +0 -22
- package/shell-dist/assets/zustand-vanilla-shallow.js +0 -71
- package/shell-dist/assets/zustand-vanilla.js +0 -40
- package/shell-dist/assets/zustand.js +0 -32
- /package/shell-dist/assets/{index-xZhmujjM.js → index.i0kqbxp050.js} +0 -0
- /package/shell-dist/assets/{nprogress-css.js → nprogress-css.1cq2pzkre0.js} +0 -0
- /package/shell-dist/assets/{ojm-antd-es-button.js → ojm-antd-es-button.2uriphio50.js} +0 -0
- /package/shell-dist/assets/{ojm-antd-es-modal.js → ojm-antd-es-modal.bf3tgdh8v0.js} +0 -0
- /package/shell-dist/assets/{ojm-antd-es-slider.js → ojm-antd-es-slider.xyvptuhid0.js} +0 -0
- /package/shell-dist/assets/{ojm-antd-es-upload.js → ojm-antd-es-upload.13gx45e0g0.js} +0 -0
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import * as __rad_ext_0 from "react";
|
|
2
|
-
var __rad_require = {
|
|
3
|
-
"react": __rad_ext_0
|
|
4
|
-
};
|
|
5
|
-
var require = function (id) {
|
|
6
|
-
if (Object.prototype.hasOwnProperty.call(__rad_require, id)) return __rad_require[id];
|
|
7
|
-
throw new Error("Dynamic require of " + JSON.stringify(id) + " is not supported(该说明符未在共享表内登记)");
|
|
8
|
-
};
|
|
9
|
-
var __create = Object.create;
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
14
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
15
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
16
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
17
|
-
}) : x)(function(x) {
|
|
18
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
19
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
20
|
-
});
|
|
21
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
22
|
-
try {
|
|
23
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
24
|
-
} catch (e) {
|
|
25
|
-
throw mod = 0, e;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
var __copyProps = (to, from, except, desc) => {
|
|
29
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
30
|
-
for (let key of __getOwnPropNames(from))
|
|
31
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
32
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
33
|
-
}
|
|
34
|
-
return to;
|
|
35
|
-
};
|
|
36
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
37
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
38
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
39
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
40
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
41
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
42
|
-
mod
|
|
43
|
-
));
|
|
44
|
-
|
|
45
|
-
// ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.8/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js
|
|
46
|
-
var require_use_sync_external_store_shim_production = __commonJS({
|
|
47
|
-
"../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.8/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js"(exports) {
|
|
48
|
-
"use strict";
|
|
49
|
-
var React = __require("react");
|
|
50
|
-
function is(x, y) {
|
|
51
|
-
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
52
|
-
}
|
|
53
|
-
var objectIs = "function" === typeof Object.is ? Object.is : is;
|
|
54
|
-
var useState = React.useState;
|
|
55
|
-
var useEffect = React.useEffect;
|
|
56
|
-
var useLayoutEffect = React.useLayoutEffect;
|
|
57
|
-
var useDebugValue = React.useDebugValue;
|
|
58
|
-
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
59
|
-
var value = getSnapshot(), _useState = useState({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
|
|
60
|
-
useLayoutEffect(
|
|
61
|
-
function() {
|
|
62
|
-
inst.value = value;
|
|
63
|
-
inst.getSnapshot = getSnapshot;
|
|
64
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
65
|
-
},
|
|
66
|
-
[subscribe, value, getSnapshot]
|
|
67
|
-
);
|
|
68
|
-
useEffect(
|
|
69
|
-
function() {
|
|
70
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
71
|
-
return subscribe(function() {
|
|
72
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
73
|
-
});
|
|
74
|
-
},
|
|
75
|
-
[subscribe]
|
|
76
|
-
);
|
|
77
|
-
useDebugValue(value);
|
|
78
|
-
return value;
|
|
79
|
-
}
|
|
80
|
-
function checkIfSnapshotChanged(inst) {
|
|
81
|
-
var latestGetSnapshot = inst.getSnapshot;
|
|
82
|
-
inst = inst.value;
|
|
83
|
-
try {
|
|
84
|
-
var nextValue = latestGetSnapshot();
|
|
85
|
-
return !objectIs(inst, nextValue);
|
|
86
|
-
} catch (error) {
|
|
87
|
-
return true;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
91
|
-
return getSnapshot();
|
|
92
|
-
}
|
|
93
|
-
var shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
94
|
-
exports.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
// ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.8/node_modules/use-sync-external-store/shim/index.js
|
|
99
|
-
var require_shim = __commonJS({
|
|
100
|
-
"../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.8/node_modules/use-sync-external-store/shim/index.js"(exports, module) {
|
|
101
|
-
"use strict";
|
|
102
|
-
if (true) {
|
|
103
|
-
module.exports = require_use_sync_external_store_shim_production();
|
|
104
|
-
} else {
|
|
105
|
-
module.exports = null;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
// shell/.ojm-shim-use-sync-external-store-shim.mjs
|
|
111
|
-
var __m = __toESM(require_shim(), 1);
|
|
112
|
-
var useSyncExternalStore2 = __m["useSyncExternalStore"];
|
|
113
|
-
var ojm_shim_use_sync_external_store_shim_default = __m.default ?? __m;
|
|
114
|
-
export {
|
|
115
|
-
ojm_shim_use_sync_external_store_shim_default as default,
|
|
116
|
-
useSyncExternalStore2 as useSyncExternalStore
|
|
117
|
-
};
|
|
118
|
-
/*! Bundled license information:
|
|
119
|
-
|
|
120
|
-
use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
|
|
121
|
-
(**
|
|
122
|
-
* @license React
|
|
123
|
-
* use-sync-external-store-shim.production.js
|
|
124
|
-
*
|
|
125
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
126
|
-
*
|
|
127
|
-
* This source code is licensed under the MIT license found in the
|
|
128
|
-
* LICENSE file in the root directory of this source tree.
|
|
129
|
-
*)
|
|
130
|
-
*/
|
|
@@ -1,513 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __export = (target, all) => {
|
|
3
|
-
for (var name in all)
|
|
4
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
// ../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.2.18_react@19.2.8_use-sync-external-store@1.6.0_react@19.2.8_/node_modules/zustand/esm/middleware.mjs
|
|
8
|
-
var middleware_exports = {};
|
|
9
|
-
__export(middleware_exports, {
|
|
10
|
-
combine: () => combine,
|
|
11
|
-
createJSONStorage: () => createJSONStorage,
|
|
12
|
-
devtools: () => devtools,
|
|
13
|
-
persist: () => persist,
|
|
14
|
-
redux: () => redux,
|
|
15
|
-
subscribeWithSelector: () => subscribeWithSelector,
|
|
16
|
-
unstable_ssrSafe: () => ssrSafe
|
|
17
|
-
});
|
|
18
|
-
var reduxImpl = (reducer, initial) => (set, _get, api) => {
|
|
19
|
-
api.dispatch = (action) => {
|
|
20
|
-
set((state) => reducer(state, action), false, action);
|
|
21
|
-
return action;
|
|
22
|
-
};
|
|
23
|
-
api.dispatchFromDevtools = true;
|
|
24
|
-
return { dispatch: (...args) => api.dispatch(...args), ...initial };
|
|
25
|
-
};
|
|
26
|
-
var redux = reduxImpl;
|
|
27
|
-
var shouldDispatchFromDevtools = (api) => !!api.dispatchFromDevtools && typeof api.dispatch === "function";
|
|
28
|
-
var trackedConnections = /* @__PURE__ */ new Map();
|
|
29
|
-
var getTrackedConnectionState = (name) => {
|
|
30
|
-
const api = trackedConnections.get(name);
|
|
31
|
-
if (!api) return {};
|
|
32
|
-
return Object.fromEntries(
|
|
33
|
-
Object.entries(api.stores).map(([key, api2]) => [key, api2.getState()])
|
|
34
|
-
);
|
|
35
|
-
};
|
|
36
|
-
var extractConnectionInformation = (store, extensionConnector, options) => {
|
|
37
|
-
if (store === void 0) {
|
|
38
|
-
return {
|
|
39
|
-
type: "untracked",
|
|
40
|
-
connection: extensionConnector.connect(options)
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
const existingConnection = trackedConnections.get(options.name);
|
|
44
|
-
if (existingConnection) {
|
|
45
|
-
return { type: "tracked", store, ...existingConnection };
|
|
46
|
-
}
|
|
47
|
-
const newConnection = {
|
|
48
|
-
connection: extensionConnector.connect(options),
|
|
49
|
-
stores: {}
|
|
50
|
-
};
|
|
51
|
-
trackedConnections.set(options.name, newConnection);
|
|
52
|
-
return { type: "tracked", store, ...newConnection };
|
|
53
|
-
};
|
|
54
|
-
var removeStoreFromTrackedConnections = (name, store) => {
|
|
55
|
-
if (store === void 0) return;
|
|
56
|
-
const connectionInfo = trackedConnections.get(name);
|
|
57
|
-
if (!connectionInfo) return;
|
|
58
|
-
delete connectionInfo.stores[store];
|
|
59
|
-
if (Object.keys(connectionInfo.stores).length === 0) {
|
|
60
|
-
trackedConnections.delete(name);
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
var v8StackLineRe = /^at (?:new |async )?(.+?) \(/;
|
|
64
|
-
var geckoStackLineRe = /^([^@]+)@/;
|
|
65
|
-
function findCallerName(stack) {
|
|
66
|
-
var _a, _b, _c;
|
|
67
|
-
if (!stack) return void 0;
|
|
68
|
-
const traceLines = stack.split("\n");
|
|
69
|
-
const apiSetStateLineIndex = traceLines.findIndex(
|
|
70
|
-
(traceLine) => traceLine.includes("api.setState")
|
|
71
|
-
);
|
|
72
|
-
if (apiSetStateLineIndex < 0) return void 0;
|
|
73
|
-
const callerLine = ((_a = traceLines[apiSetStateLineIndex + 1]) == null ? void 0 : _a.trim()) || "";
|
|
74
|
-
return ((_b = v8StackLineRe.exec(callerLine)) == null ? void 0 : _b[1]) || ((_c = geckoStackLineRe.exec(callerLine)) == null ? void 0 : _c[1]);
|
|
75
|
-
}
|
|
76
|
-
var devtoolsImpl = (fn, devtoolsOptions = {}) => (set, get, api) => {
|
|
77
|
-
const { enabled, anonymousActionType, store, ...options } = devtoolsOptions;
|
|
78
|
-
let extensionConnector;
|
|
79
|
-
try {
|
|
80
|
-
extensionConnector = (enabled != null ? enabled : (import.meta.env ? import.meta.env.MODE : void 0) !== "production") && window.__REDUX_DEVTOOLS_EXTENSION__;
|
|
81
|
-
} catch (e) {
|
|
82
|
-
}
|
|
83
|
-
if (!extensionConnector) {
|
|
84
|
-
return fn(set, get, api);
|
|
85
|
-
}
|
|
86
|
-
const { connection, ...connectionInformation } = extractConnectionInformation(store, extensionConnector, options);
|
|
87
|
-
let isRecording = true;
|
|
88
|
-
api.setState = ((state, replace, nameOrAction) => {
|
|
89
|
-
const r = set(state, replace);
|
|
90
|
-
if (!isRecording) return r;
|
|
91
|
-
const action = nameOrAction === void 0 ? {
|
|
92
|
-
type: anonymousActionType || findCallerName(new Error().stack) || "anonymous"
|
|
93
|
-
} : typeof nameOrAction === "string" ? { type: nameOrAction } : nameOrAction;
|
|
94
|
-
if (store === void 0) {
|
|
95
|
-
connection == null ? void 0 : connection.send(action, get());
|
|
96
|
-
return r;
|
|
97
|
-
}
|
|
98
|
-
connection == null ? void 0 : connection.send(
|
|
99
|
-
{
|
|
100
|
-
...action,
|
|
101
|
-
type: `${store}/${action.type}`
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
...getTrackedConnectionState(options.name),
|
|
105
|
-
[store]: api.getState()
|
|
106
|
-
}
|
|
107
|
-
);
|
|
108
|
-
return r;
|
|
109
|
-
});
|
|
110
|
-
api.devtools = {
|
|
111
|
-
cleanup: () => {
|
|
112
|
-
if (connection && typeof connection.unsubscribe === "function") {
|
|
113
|
-
connection.unsubscribe();
|
|
114
|
-
}
|
|
115
|
-
removeStoreFromTrackedConnections(options.name, store);
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
const setStateFromDevtools = (...a) => {
|
|
119
|
-
const originalIsRecording = isRecording;
|
|
120
|
-
isRecording = false;
|
|
121
|
-
set(...a);
|
|
122
|
-
isRecording = originalIsRecording;
|
|
123
|
-
};
|
|
124
|
-
const initialState = fn(api.setState, get, api);
|
|
125
|
-
if (connectionInformation.type === "untracked") {
|
|
126
|
-
connection == null ? void 0 : connection.init(initialState);
|
|
127
|
-
} else {
|
|
128
|
-
connectionInformation.stores[connectionInformation.store] = api;
|
|
129
|
-
connection == null ? void 0 : connection.init(
|
|
130
|
-
Object.fromEntries(
|
|
131
|
-
Object.entries(connectionInformation.stores).map(([key, store2]) => [
|
|
132
|
-
key,
|
|
133
|
-
key === connectionInformation.store ? initialState : store2.getState()
|
|
134
|
-
])
|
|
135
|
-
)
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
if (shouldDispatchFromDevtools(api)) {
|
|
139
|
-
let didWarnAboutReservedActionType = false;
|
|
140
|
-
const originalDispatch = api.dispatch;
|
|
141
|
-
api.dispatch = (...args) => {
|
|
142
|
-
if ((import.meta.env ? import.meta.env.MODE : void 0) !== "production" && args[0].type === "__setState" && !didWarnAboutReservedActionType) {
|
|
143
|
-
console.warn(
|
|
144
|
-
'[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'
|
|
145
|
-
);
|
|
146
|
-
didWarnAboutReservedActionType = true;
|
|
147
|
-
}
|
|
148
|
-
originalDispatch(...args);
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
connection.subscribe((message) => {
|
|
152
|
-
var _a;
|
|
153
|
-
switch (message.type) {
|
|
154
|
-
case "ACTION":
|
|
155
|
-
if (typeof message.payload !== "string") {
|
|
156
|
-
console.error(
|
|
157
|
-
"[zustand devtools middleware] Unsupported action format"
|
|
158
|
-
);
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
return parseJsonThen(
|
|
162
|
-
message.payload,
|
|
163
|
-
(action) => {
|
|
164
|
-
if (action.type === "__setState") {
|
|
165
|
-
if (store === void 0) {
|
|
166
|
-
setStateFromDevtools(action.state);
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
if (Object.keys(action.state).length !== 1) {
|
|
170
|
-
console.error(
|
|
171
|
-
`
|
|
172
|
-
[zustand devtools middleware] Unsupported __setState action format.
|
|
173
|
-
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
|
174
|
-
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
|
175
|
-
`
|
|
176
|
-
);
|
|
177
|
-
}
|
|
178
|
-
const stateFromDevtools = action.state[store];
|
|
179
|
-
if (stateFromDevtools === void 0 || stateFromDevtools === null) {
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
if (JSON.stringify(api.getState()) !== JSON.stringify(stateFromDevtools)) {
|
|
183
|
-
setStateFromDevtools(stateFromDevtools);
|
|
184
|
-
}
|
|
185
|
-
return;
|
|
186
|
-
}
|
|
187
|
-
if (shouldDispatchFromDevtools(api)) {
|
|
188
|
-
api.dispatch(action);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
);
|
|
192
|
-
case "DISPATCH":
|
|
193
|
-
switch (message.payload.type) {
|
|
194
|
-
case "RESET":
|
|
195
|
-
setStateFromDevtools(initialState);
|
|
196
|
-
if (store === void 0) {
|
|
197
|
-
return connection == null ? void 0 : connection.init(api.getState());
|
|
198
|
-
}
|
|
199
|
-
return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));
|
|
200
|
-
case "COMMIT":
|
|
201
|
-
if (store === void 0) {
|
|
202
|
-
connection == null ? void 0 : connection.init(api.getState());
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));
|
|
206
|
-
case "ROLLBACK":
|
|
207
|
-
return parseJsonThen(message.state, (state) => {
|
|
208
|
-
if (store === void 0) {
|
|
209
|
-
setStateFromDevtools(state);
|
|
210
|
-
connection == null ? void 0 : connection.init(api.getState());
|
|
211
|
-
return;
|
|
212
|
-
}
|
|
213
|
-
setStateFromDevtools(state[store]);
|
|
214
|
-
connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));
|
|
215
|
-
});
|
|
216
|
-
case "JUMP_TO_STATE":
|
|
217
|
-
case "JUMP_TO_ACTION":
|
|
218
|
-
return parseJsonThen(message.state, (state) => {
|
|
219
|
-
if (store === void 0) {
|
|
220
|
-
setStateFromDevtools(state);
|
|
221
|
-
return;
|
|
222
|
-
}
|
|
223
|
-
if (JSON.stringify(api.getState()) !== JSON.stringify(state[store])) {
|
|
224
|
-
setStateFromDevtools(state[store]);
|
|
225
|
-
}
|
|
226
|
-
});
|
|
227
|
-
case "IMPORT_STATE": {
|
|
228
|
-
const { nextLiftedState } = message.payload;
|
|
229
|
-
const lastComputedState = (_a = nextLiftedState.computedStates.slice(-1)[0]) == null ? void 0 : _a.state;
|
|
230
|
-
if (!lastComputedState) return;
|
|
231
|
-
if (store === void 0) {
|
|
232
|
-
setStateFromDevtools(lastComputedState);
|
|
233
|
-
} else {
|
|
234
|
-
setStateFromDevtools(lastComputedState[store]);
|
|
235
|
-
}
|
|
236
|
-
connection == null ? void 0 : connection.send(
|
|
237
|
-
null,
|
|
238
|
-
// FIXME no-any
|
|
239
|
-
nextLiftedState
|
|
240
|
-
);
|
|
241
|
-
return;
|
|
242
|
-
}
|
|
243
|
-
case "PAUSE_RECORDING":
|
|
244
|
-
return isRecording = !isRecording;
|
|
245
|
-
}
|
|
246
|
-
return;
|
|
247
|
-
}
|
|
248
|
-
});
|
|
249
|
-
return initialState;
|
|
250
|
-
};
|
|
251
|
-
var devtools = devtoolsImpl;
|
|
252
|
-
var parseJsonThen = (stringified, fn) => {
|
|
253
|
-
let parsed;
|
|
254
|
-
try {
|
|
255
|
-
parsed = JSON.parse(stringified);
|
|
256
|
-
} catch (e) {
|
|
257
|
-
console.error(
|
|
258
|
-
"[zustand devtools middleware] Could not parse the received json",
|
|
259
|
-
e
|
|
260
|
-
);
|
|
261
|
-
}
|
|
262
|
-
if (parsed !== void 0) fn(parsed);
|
|
263
|
-
};
|
|
264
|
-
var subscribeWithSelectorImpl = (fn) => (set, get, api) => {
|
|
265
|
-
const origSubscribe = api.subscribe;
|
|
266
|
-
api.subscribe = ((selector, optListener, options) => {
|
|
267
|
-
let listener = selector;
|
|
268
|
-
if (optListener) {
|
|
269
|
-
const equalityFn = (options == null ? void 0 : options.equalityFn) || Object.is;
|
|
270
|
-
let currentSlice = selector(api.getState());
|
|
271
|
-
listener = (state) => {
|
|
272
|
-
const nextSlice = selector(state);
|
|
273
|
-
if (!equalityFn(currentSlice, nextSlice)) {
|
|
274
|
-
const previousSlice = currentSlice;
|
|
275
|
-
optListener(currentSlice = nextSlice, previousSlice);
|
|
276
|
-
}
|
|
277
|
-
};
|
|
278
|
-
if (options == null ? void 0 : options.fireImmediately) {
|
|
279
|
-
optListener(currentSlice, currentSlice);
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
return origSubscribe(listener);
|
|
283
|
-
});
|
|
284
|
-
const initialState = fn(set, get, api);
|
|
285
|
-
return initialState;
|
|
286
|
-
};
|
|
287
|
-
var subscribeWithSelector = subscribeWithSelectorImpl;
|
|
288
|
-
function combine(initialState, create) {
|
|
289
|
-
return (...args) => Object.assign({}, initialState, create(...args));
|
|
290
|
-
}
|
|
291
|
-
function createJSONStorage(getStorage, options) {
|
|
292
|
-
let storage;
|
|
293
|
-
try {
|
|
294
|
-
storage = getStorage();
|
|
295
|
-
} catch (e) {
|
|
296
|
-
return;
|
|
297
|
-
}
|
|
298
|
-
const persistStorage = {
|
|
299
|
-
getItem: (name) => {
|
|
300
|
-
var _a;
|
|
301
|
-
const parse = (str2) => {
|
|
302
|
-
if (str2 === null) {
|
|
303
|
-
return null;
|
|
304
|
-
}
|
|
305
|
-
return JSON.parse(str2, options == null ? void 0 : options.reviver);
|
|
306
|
-
};
|
|
307
|
-
const str = (_a = storage.getItem(name)) != null ? _a : null;
|
|
308
|
-
if (str instanceof Promise) {
|
|
309
|
-
return str.then(parse);
|
|
310
|
-
}
|
|
311
|
-
return parse(str);
|
|
312
|
-
},
|
|
313
|
-
setItem: (name, newValue) => storage.setItem(name, JSON.stringify(newValue, options == null ? void 0 : options.replacer)),
|
|
314
|
-
removeItem: (name) => storage.removeItem(name)
|
|
315
|
-
};
|
|
316
|
-
return persistStorage;
|
|
317
|
-
}
|
|
318
|
-
var toThenable = (fn) => (input) => {
|
|
319
|
-
try {
|
|
320
|
-
const result = fn(input);
|
|
321
|
-
if (result instanceof Promise) {
|
|
322
|
-
return result;
|
|
323
|
-
}
|
|
324
|
-
return {
|
|
325
|
-
then(onFulfilled) {
|
|
326
|
-
return toThenable(onFulfilled)(result);
|
|
327
|
-
},
|
|
328
|
-
catch(_onRejected) {
|
|
329
|
-
return this;
|
|
330
|
-
}
|
|
331
|
-
};
|
|
332
|
-
} catch (e) {
|
|
333
|
-
return {
|
|
334
|
-
then(_onFulfilled) {
|
|
335
|
-
return this;
|
|
336
|
-
},
|
|
337
|
-
catch(onRejected) {
|
|
338
|
-
return toThenable(onRejected)(e);
|
|
339
|
-
}
|
|
340
|
-
};
|
|
341
|
-
}
|
|
342
|
-
};
|
|
343
|
-
var persistImpl = (config, baseOptions) => (set, get, api) => {
|
|
344
|
-
let options = {
|
|
345
|
-
storage: createJSONStorage(() => window.localStorage),
|
|
346
|
-
partialize: (state) => state,
|
|
347
|
-
version: 0,
|
|
348
|
-
merge: (persistedState, currentState) => ({
|
|
349
|
-
...currentState,
|
|
350
|
-
...persistedState
|
|
351
|
-
}),
|
|
352
|
-
...baseOptions
|
|
353
|
-
};
|
|
354
|
-
let hasHydrated = false;
|
|
355
|
-
let hydrationVersion = 0;
|
|
356
|
-
const hydrationListeners = /* @__PURE__ */ new Set();
|
|
357
|
-
const finishHydrationListeners = /* @__PURE__ */ new Set();
|
|
358
|
-
let storage = options.storage;
|
|
359
|
-
if (!storage) {
|
|
360
|
-
return config(
|
|
361
|
-
(...args) => {
|
|
362
|
-
console.warn(
|
|
363
|
-
`[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`
|
|
364
|
-
);
|
|
365
|
-
set(...args);
|
|
366
|
-
},
|
|
367
|
-
get,
|
|
368
|
-
api
|
|
369
|
-
);
|
|
370
|
-
}
|
|
371
|
-
const setItem = () => {
|
|
372
|
-
const state = options.partialize({ ...get() });
|
|
373
|
-
return storage.setItem(options.name, {
|
|
374
|
-
state,
|
|
375
|
-
version: options.version
|
|
376
|
-
});
|
|
377
|
-
};
|
|
378
|
-
const savedSetState = api.setState;
|
|
379
|
-
api.setState = (state, replace) => {
|
|
380
|
-
savedSetState(state, replace);
|
|
381
|
-
return setItem();
|
|
382
|
-
};
|
|
383
|
-
const configResult = config(
|
|
384
|
-
(...args) => {
|
|
385
|
-
set(...args);
|
|
386
|
-
return setItem();
|
|
387
|
-
},
|
|
388
|
-
get,
|
|
389
|
-
api
|
|
390
|
-
);
|
|
391
|
-
api.getInitialState = () => configResult;
|
|
392
|
-
let stateFromStorage;
|
|
393
|
-
const hydrate = () => {
|
|
394
|
-
var _a, _b;
|
|
395
|
-
if (!storage) return;
|
|
396
|
-
const currentVersion = ++hydrationVersion;
|
|
397
|
-
hasHydrated = false;
|
|
398
|
-
hydrationListeners.forEach((cb) => {
|
|
399
|
-
var _a2;
|
|
400
|
-
return cb((_a2 = get()) != null ? _a2 : configResult);
|
|
401
|
-
});
|
|
402
|
-
const postRehydrationCallback = ((_b = options.onRehydrateStorage) == null ? void 0 : _b.call(options, (_a = get()) != null ? _a : configResult)) || void 0;
|
|
403
|
-
return toThenable(storage.getItem.bind(storage))(options.name).then((deserializedStorageValue) => {
|
|
404
|
-
if (deserializedStorageValue) {
|
|
405
|
-
if (typeof deserializedStorageValue.version === "number" && deserializedStorageValue.version !== options.version) {
|
|
406
|
-
if (options.migrate) {
|
|
407
|
-
const migration = options.migrate(
|
|
408
|
-
deserializedStorageValue.state,
|
|
409
|
-
deserializedStorageValue.version
|
|
410
|
-
);
|
|
411
|
-
if (migration instanceof Promise) {
|
|
412
|
-
return migration.then((result) => [true, result]);
|
|
413
|
-
}
|
|
414
|
-
return [true, migration];
|
|
415
|
-
}
|
|
416
|
-
console.error(
|
|
417
|
-
`State loaded from storage couldn't be migrated since no migrate function was provided`
|
|
418
|
-
);
|
|
419
|
-
} else {
|
|
420
|
-
return [false, deserializedStorageValue.state];
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
return [false, void 0];
|
|
424
|
-
}).then((migrationResult) => {
|
|
425
|
-
var _a2;
|
|
426
|
-
if (currentVersion !== hydrationVersion) {
|
|
427
|
-
return;
|
|
428
|
-
}
|
|
429
|
-
const [migrated, migratedState] = migrationResult;
|
|
430
|
-
stateFromStorage = options.merge(
|
|
431
|
-
migratedState,
|
|
432
|
-
(_a2 = get()) != null ? _a2 : configResult
|
|
433
|
-
);
|
|
434
|
-
set(stateFromStorage, true);
|
|
435
|
-
if (migrated) {
|
|
436
|
-
return setItem();
|
|
437
|
-
}
|
|
438
|
-
}).then(() => {
|
|
439
|
-
if (currentVersion !== hydrationVersion) {
|
|
440
|
-
return;
|
|
441
|
-
}
|
|
442
|
-
postRehydrationCallback == null ? void 0 : postRehydrationCallback(get(), void 0);
|
|
443
|
-
stateFromStorage = get();
|
|
444
|
-
hasHydrated = true;
|
|
445
|
-
finishHydrationListeners.forEach((cb) => cb(stateFromStorage));
|
|
446
|
-
}).catch((e) => {
|
|
447
|
-
if (currentVersion !== hydrationVersion) {
|
|
448
|
-
return;
|
|
449
|
-
}
|
|
450
|
-
postRehydrationCallback == null ? void 0 : postRehydrationCallback(void 0, e);
|
|
451
|
-
});
|
|
452
|
-
};
|
|
453
|
-
api.persist = {
|
|
454
|
-
setOptions: (newOptions) => {
|
|
455
|
-
options = {
|
|
456
|
-
...options,
|
|
457
|
-
...newOptions
|
|
458
|
-
};
|
|
459
|
-
if (newOptions.storage) {
|
|
460
|
-
storage = newOptions.storage;
|
|
461
|
-
}
|
|
462
|
-
},
|
|
463
|
-
clearStorage: () => {
|
|
464
|
-
++hydrationVersion;
|
|
465
|
-
storage == null ? void 0 : storage.removeItem(options.name);
|
|
466
|
-
},
|
|
467
|
-
getOptions: () => options,
|
|
468
|
-
rehydrate: () => hydrate(),
|
|
469
|
-
hasHydrated: () => hasHydrated,
|
|
470
|
-
onHydrate: (cb) => {
|
|
471
|
-
hydrationListeners.add(cb);
|
|
472
|
-
return () => {
|
|
473
|
-
hydrationListeners.delete(cb);
|
|
474
|
-
};
|
|
475
|
-
},
|
|
476
|
-
onFinishHydration: (cb) => {
|
|
477
|
-
finishHydrationListeners.add(cb);
|
|
478
|
-
return () => {
|
|
479
|
-
finishHydrationListeners.delete(cb);
|
|
480
|
-
};
|
|
481
|
-
}
|
|
482
|
-
};
|
|
483
|
-
if (!options.skipHydration) {
|
|
484
|
-
hydrate();
|
|
485
|
-
}
|
|
486
|
-
return stateFromStorage || configResult;
|
|
487
|
-
};
|
|
488
|
-
var persist = persistImpl;
|
|
489
|
-
function ssrSafe(config, isSSR = typeof window === "undefined") {
|
|
490
|
-
return (set, get, api) => {
|
|
491
|
-
if (!isSSR) {
|
|
492
|
-
return config(set, get, api);
|
|
493
|
-
}
|
|
494
|
-
const ssrSet = () => {
|
|
495
|
-
throw new Error("Cannot set state of Zustand store in SSR");
|
|
496
|
-
};
|
|
497
|
-
api.setState = ssrSet;
|
|
498
|
-
return config(ssrSet, get, api);
|
|
499
|
-
};
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
// shell/.ojm-shim-zustand-middleware.mjs
|
|
503
|
-
var ojm_shim_zustand_middleware_default = void 0 ?? middleware_exports;
|
|
504
|
-
export {
|
|
505
|
-
combine,
|
|
506
|
-
createJSONStorage,
|
|
507
|
-
ojm_shim_zustand_middleware_default as default,
|
|
508
|
-
devtools,
|
|
509
|
-
persist,
|
|
510
|
-
redux,
|
|
511
|
-
subscribeWithSelector,
|
|
512
|
-
ssrSafe as unstable_ssrSafe
|
|
513
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __export = (target, all) => {
|
|
3
|
-
for (var name in all)
|
|
4
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
// ../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.2.18_react@19.2.8_use-sync-external-store@1.6.0_react@19.2.8_/node_modules/zustand/esm/react/shallow.mjs
|
|
8
|
-
var shallow_exports = {};
|
|
9
|
-
__export(shallow_exports, {
|
|
10
|
-
useShallow: () => useShallow
|
|
11
|
-
});
|
|
12
|
-
import React from "react";
|
|
13
|
-
import { shallow } from "zustand/vanilla/shallow";
|
|
14
|
-
function useShallow(selector) {
|
|
15
|
-
const prev = React.useRef(void 0);
|
|
16
|
-
return (state) => {
|
|
17
|
-
const next = selector(state);
|
|
18
|
-
return shallow(prev.current, next) ? prev.current : prev.current = next;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// shell/.ojm-shim-zustand-react-shallow.mjs
|
|
23
|
-
var ojm_shim_zustand_react_shallow_default = void 0 ?? shallow_exports;
|
|
24
|
-
export {
|
|
25
|
-
ojm_shim_zustand_react_shallow_default as default,
|
|
26
|
-
useShallow
|
|
27
|
-
};
|