From 9974f85e6dbfcc237fbe4f6a9e44a8a8d12ce278 Mon Sep 17 00:00:00 2001 From: SheetJS Date: Wed, 17 May 2023 20:39:46 -0400 Subject: [PATCH] mobile --- Makefile | 2 +- index.html | 4 +- package.json | 4 +- patches/react-resizable-panels+0.0.45.patch | 68 +++++++++++++++++++++ 4 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 patches/react-resizable-panels+0.0.45.patch diff --git a/Makefile b/Makefile index 43d1fd0..a13b31e 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ build: .PHONY: dev dev: - npm run dev + npm run dev -- --host .PHONY: deps deps: diff --git a/index.html b/index.html index 8e44caa..8cf0910 100644 --- a/index.html +++ b/index.html @@ -4,8 +4,10 @@ - SheetJS IWA Inspector + + + SheetJS IWA Inspector
diff --git a/package.json b/package.json index f07cfcc..c6465a5 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "dev": "vite", "build": "tsc && vite build", "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0", - "preview": "vite preview" + "preview": "vite preview", + "postinstall": "patch-package" }, "dependencies": { "cfb": "1.2.2", @@ -32,6 +33,7 @@ "eslint": "8.40.0", "eslint-plugin-react-hooks": "4.6.0", "eslint-plugin-react-refresh": "0.3.5", + "patch-package": "7.0.0", "typescript": "5.0.4", "vite": "4.3.5", "vite-plugin-pwa": "0.14.7" diff --git a/patches/react-resizable-panels+0.0.45.patch b/patches/react-resizable-panels+0.0.45.patch new file mode 100644 index 0000000..dc58948 --- /dev/null +++ b/patches/react-resizable-panels+0.0.45.patch @@ -0,0 +1,68 @@ +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;