diff --git a/console/frontend/patches/@codemirror__view@6.38.4.patch b/console/frontend/patches/@codemirror__view@6.38.4.patch index b7c4785e..526f7e46 100644 --- a/console/frontend/patches/@codemirror__view@6.38.4.patch +++ b/console/frontend/patches/@codemirror__view@6.38.4.patch @@ -1,8 +1,8 @@ diff --git a/dist/index.cjs b/dist/index.cjs -index e9ca104998a1db31cc19c797d1e8a450a5807073..3603da43a97aec2a3dc4e947a000d1d55a07f30c 100644 +index e9ca104998a1db31cc19c797d1e8a450a5807073..2c7462a21d4e55c5b867c0d00d32a933d605b0c4 100644 --- a/dist/index.cjs +++ b/dist/index.cjs -@@ -10033,13 +10033,7 @@ const tooltipPlugin = ViewPlugin.fromClass(class { +@@ -10033,17 +10033,16 @@ const tooltipPlugin = ViewPlugin.fromClass(class { let scaleX = 1, scaleY = 1, makeAbsolute = false; if (this.position == "fixed" && this.manager.tooltipViews.length) { let { dom } = this.manager.tooltipViews[0]; @@ -13,15 +13,28 @@ index e9ca104998a1db31cc19c797d1e8a450a5807073..3603da43a97aec2a3dc4e947a000d1d5 - makeAbsolute = dom.offsetParent != this.container.ownerDocument.body; - } - else if (dom.style.top == Outside && dom.style.left == "0px") { -+ if (dom.style.top == Outside && dom.style.left == "0px") { - // On other browsers, we have to awkwardly try and use other - // information to detect a transform. - let rect = dom.getBoundingClientRect(); +- // On other browsers, we have to awkwardly try and use other +- // information to detect a transform. +- let rect = dom.getBoundingClientRect(); +- makeAbsolute = Math.abs(rect.top + 10000) > 1 || Math.abs(rect.left) > 1; ++ if (browser.safari) { ++ // Safari always sets offsetParent to null, even if a fixed ++ // element is positioned relative to a transformed parent. So ++ // we use this kludge to try and detect this. ++ let rect = dom.getBoundingClientRect() ++ makeAbsolute = Math.abs(rect.top + 10000) > 1 || Math.abs(rect.left) > 1 ++ } else { ++ // More conforming browsers will set offsetParent to the ++ // transformed element. ++ makeAbsolute = !!dom.offsetParent && dom.offsetParent != this.container.ownerDocument.body + } + } + if (makeAbsolute || this.position == "absolute") { diff --git a/dist/index.js b/dist/index.js -index 7915cd285c08b6bf3f221872ff98006bef30fc66..ed0fd377d18f75a2e1f9de20559656e7c08a6ba4 100644 +index 7915cd285c08b6bf3f221872ff98006bef30fc66..d386d5519add1def97668014fec28891ee75f849 100644 --- a/dist/index.js +++ b/dist/index.js -@@ -10028,13 +10028,7 @@ const tooltipPlugin = /*@__PURE__*/ViewPlugin.fromClass(class { +@@ -10028,17 +10028,16 @@ const tooltipPlugin = /*@__PURE__*/ViewPlugin.fromClass(class { let scaleX = 1, scaleY = 1, makeAbsolute = false; if (this.position == "fixed" && this.manager.tooltipViews.length) { let { dom } = this.manager.tooltipViews[0]; @@ -32,7 +45,20 @@ index 7915cd285c08b6bf3f221872ff98006bef30fc66..ed0fd377d18f75a2e1f9de20559656e7 - makeAbsolute = dom.offsetParent != this.container.ownerDocument.body; - } - else if (dom.style.top == Outside && dom.style.left == "0px") { -+ if (dom.style.top == Outside && dom.style.left == "0px") { - // On other browsers, we have to awkwardly try and use other - // information to detect a transform. - let rect = dom.getBoundingClientRect(); +- // On other browsers, we have to awkwardly try and use other +- // information to detect a transform. +- let rect = dom.getBoundingClientRect(); +- makeAbsolute = Math.abs(rect.top + 10000) > 1 || Math.abs(rect.left) > 1; ++ if (browser.safari) { ++ // Safari always sets offsetParent to null, even if a fixed ++ // element is positioned relative to a transformed parent. So ++ // we use this kludge to try and detect this. ++ let rect = dom.getBoundingClientRect() ++ makeAbsolute = Math.abs(rect.top + 10000) > 1 || Math.abs(rect.left) > 1 ++ } else { ++ // More conforming browsers will set offsetParent to the ++ // transformed element. ++ makeAbsolute = !!dom.offsetParent && dom.offsetParent != this.container.ownerDocument.body + } + } + if (makeAbsolute || this.position == "absolute") { diff --git a/console/frontend/pnpm-lock.yaml b/console/frontend/pnpm-lock.yaml index 457a14e6..c8534d40 100644 --- a/console/frontend/pnpm-lock.yaml +++ b/console/frontend/pnpm-lock.yaml @@ -6,7 +6,7 @@ settings: patchedDependencies: '@codemirror/view@6.38.4': - hash: 9bfcd4f367848d1f656593faf8482aae53d106fe7a236d7d21b9b7f4cfef5553 + hash: 532b56fc70b17b5158f2ea1fd90b89246b3263e5013052cb76167107d0a9127d path: patches/@codemirror__view@6.38.4.patch importers: @@ -30,7 +30,7 @@ importers: version: 6.5.2 '@codemirror/view': specifier: ^6.0.0 - version: 6.38.4(patch_hash=9bfcd4f367848d1f656593faf8482aae53d106fe7a236d7d21b9b7f4cfef5553) + version: 6.38.4(patch_hash=532b56fc70b17b5158f2ea1fd90b89246b3263e5013052cb76167107d0a9127d) '@headlessui/vue': specifier: ^1.6.1 version: 1.7.23(vue@3.5.22(typescript@5.9.2)) @@ -1769,20 +1769,20 @@ snapshots: dependencies: '@codemirror/language': 6.11.3 '@codemirror/state': 6.5.2 - '@codemirror/view': 6.38.4(patch_hash=9bfcd4f367848d1f656593faf8482aae53d106fe7a236d7d21b9b7f4cfef5553) + '@codemirror/view': 6.38.4(patch_hash=532b56fc70b17b5158f2ea1fd90b89246b3263e5013052cb76167107d0a9127d) '@lezer/common': 1.3.0 '@codemirror/commands@6.9.0': dependencies: '@codemirror/language': 6.11.3 '@codemirror/state': 6.5.2 - '@codemirror/view': 6.38.4(patch_hash=9bfcd4f367848d1f656593faf8482aae53d106fe7a236d7d21b9b7f4cfef5553) + '@codemirror/view': 6.38.4(patch_hash=532b56fc70b17b5158f2ea1fd90b89246b3263e5013052cb76167107d0a9127d) '@lezer/common': 1.3.0 '@codemirror/language@6.11.3': dependencies: '@codemirror/state': 6.5.2 - '@codemirror/view': 6.38.4(patch_hash=9bfcd4f367848d1f656593faf8482aae53d106fe7a236d7d21b9b7f4cfef5553) + '@codemirror/view': 6.38.4(patch_hash=532b56fc70b17b5158f2ea1fd90b89246b3263e5013052cb76167107d0a9127d) '@lezer/common': 1.3.0 '@lezer/highlight': 1.2.2 '@lezer/lr': 1.4.2 @@ -1791,14 +1791,14 @@ snapshots: '@codemirror/lint@6.9.0': dependencies: '@codemirror/state': 6.5.2 - '@codemirror/view': 6.38.4(patch_hash=9bfcd4f367848d1f656593faf8482aae53d106fe7a236d7d21b9b7f4cfef5553) + '@codemirror/view': 6.38.4(patch_hash=532b56fc70b17b5158f2ea1fd90b89246b3263e5013052cb76167107d0a9127d) crelt: 1.0.6 '@codemirror/state@6.5.2': dependencies: '@marijn/find-cluster-break': 1.0.2 - '@codemirror/view@6.38.4(patch_hash=9bfcd4f367848d1f656593faf8482aae53d106fe7a236d7d21b9b7f4cfef5553)': + '@codemirror/view@6.38.4(patch_hash=532b56fc70b17b5158f2ea1fd90b89246b3263e5013052cb76167107d0a9127d)': dependencies: '@codemirror/state': 6.5.2 crelt: 1.0.6