iwa-inspector/patches/react-resizable-panels+0.0.45.patch
2023-05-17 20:39:46 -04:00

69 lines
4.4 KiB
Diff

diff --git a/node_modules/react-resizable-panels/dist/.react-resizable-panels.module.js.swp b/node_modules/react-resizable-panels/dist/.react-resizable-panels.module.js.swp
new file mode 100644
index 0000000..02b51f0
Binary files /dev/null and b/node_modules/react-resizable-panels/dist/.react-resizable-panels.module.js.swp differ
diff --git a/node_modules/react-resizable-panels/dist/react-resizable-panels.js b/node_modules/react-resizable-panels/dist/react-resizable-panels.js
index a408e9e..1fda82c 100644
--- a/node_modules/react-resizable-panels/dist/react-resizable-panels.js
+++ b/node_modules/react-resizable-panels/dist/react-resizable-panels.js
@@ -644,9 +644,10 @@ const $cec4cafe75f3db78$var$debounceMap = {};
function $cec4cafe75f3db78$var$throwServerError() {
throw new Error('PanelGroup "storage" prop required for server rendering.');
}
+const $data = {};
const $cec4cafe75f3db78$var$defaultStorage = {
- getItem: typeof localStorage !== "undefined" ? (name)=>localStorage.getItem(name) : $cec4cafe75f3db78$var$throwServerError,
- setItem: typeof localStorage !== "undefined" ? (name, value)=>localStorage.setItem(name, value) : $cec4cafe75f3db78$var$throwServerError
+ getItem: (name) => $data[name],
+ setItem: (name, value)=> $data[name] = value
};
function $cec4cafe75f3db78$var$PanelGroupWithForwardedRef({ autoSaveId: autoSaveId , children: children = null , className: classNameFromProps = "" , direction: direction , disablePointerEventsDuringResize: disablePointerEventsDuringResize = false , forwardedRef: forwardedRef , id: idFromProps = null , onLayout: onLayout , storage: storage = $cec4cafe75f3db78$var$defaultStorage , style: styleFromProps = {} , tagName: Type = "div" }) {
const groupId = (0, $b1693d8d8f570e9c$export$2e2bcd8739ae039)(idFromProps);
diff --git a/node_modules/react-resizable-panels/dist/react-resizable-panels.module.js b/node_modules/react-resizable-panels/dist/react-resizable-panels.module.js
index d7d60c3..ce98f0d 100644
--- a/node_modules/react-resizable-panels/dist/react-resizable-panels.module.js
+++ b/node_modules/react-resizable-panels/dist/react-resizable-panels.module.js
@@ -637,10 +637,12 @@ const $3daa5d4c086ea816$var$debounceMap = {};
function $3daa5d4c086ea816$var$throwServerError() {
throw new Error('PanelGroup "storage" prop required for server rendering.');
}
+const $data = {};
const $3daa5d4c086ea816$var$defaultStorage = {
- getItem: typeof localStorage !== "undefined" ? (name)=>localStorage.getItem(name) : $3daa5d4c086ea816$var$throwServerError,
- setItem: typeof localStorage !== "undefined" ? (name, value)=>localStorage.setItem(name, value) : $3daa5d4c086ea816$var$throwServerError
+ getItem: (name) => $data[name],
+ setItem: (name, value)=> $data[name] = value
};
+
function $3daa5d4c086ea816$var$PanelGroupWithForwardedRef({ autoSaveId: autoSaveId , children: children = null , className: classNameFromProps = "" , direction: direction , disablePointerEventsDuringResize: disablePointerEventsDuringResize = false , forwardedRef: forwardedRef , id: idFromProps = null , onLayout: onLayout , storage: storage = $3daa5d4c086ea816$var$defaultStorage , style: styleFromProps = {} , tagName: Type = "div" }) {
const groupId = (0, $e504a2438473eda9$export$2e2bcd8739ae039)(idFromProps);
const [activeHandleId, setActiveHandleId] = (0, $ef07efbe5fa7d87e$export$60241385465d0a34)(null);
diff --git a/node_modules/react-resizable-panels/src/PanelGroup.ts b/node_modules/react-resizable-panels/src/PanelGroup.ts
index 5eb5125..07abea3 100644
--- a/node_modules/react-resizable-panels/src/PanelGroup.ts
+++ b/node_modules/react-resizable-panels/src/PanelGroup.ts
@@ -60,16 +60,13 @@ function throwServerError() {
throw new Error('PanelGroup "storage" prop required for server rendering.');
}
-const defaultStorage: PanelGroupStorage = {
- getItem:
- typeof localStorage !== "undefined"
- ? (name: string) => localStorage.getItem(name)
- : (throwServerError as any),
- setItem:
- typeof localStorage !== "undefined"
- ? (name: string, value: string) => localStorage.setItem(name, value)
- : (throwServerError as any),
-};
+const defaultStorage: PanelGroupStorage = (()=>{
+ const data: {[k: string]: string} = {};
+ return {
+ getItem(name) { return data[name]; },
+ setItem(name, value) { data[name] = value; }
+ };
+})();
export type CommittedValues = {
direction: Direction;