Skip to content

armgit / ui

Public Imported from GitHub
0
TypeScript

Fix DOCX cache key minification in production builds

Andrew Luo886f40a2303d
diff --git a/package.json b/package.json
index c1d45a3..a0eba3e 100644
--- a/package.json
+++ b/package.json
@@ -33,6 +33,9 @@
"overrides": {
"@types/react": "19.2.2",
"@types/react-dom": "19.2.2"
+ },
+ "patchedDependencies": {
+ "@extend-ai/[email protected]": "patches/@[email protected]"
}
}
}
diff --git a/patches/@[email protected] b/patches/@[email protected]
new file mode 100644
index 0000000..f5a411e
--- /dev/null
+++ b/patches/@[email protected]
@@ -0,0 +1,26 @@
+diff --git a/dist/index.cjs b/dist/index.cjs
+index 6e5b4facab5b3ee7bbe9faf21e51f6571a92c020..2215135e1e6e28f36421d96548ce1aac66e2d88a 100644
+--- a/dist/index.cjs
++++ b/dist/index.cjs
+@@ -12661,7 +12661,7 @@ function fontMetricProfileKey() {
+ const ratio = typeof window !== "undefined" ? window.devicePixelRatio : 1;
+ const viewportScale = typeof window !== "undefined" ? window.visualViewport?.scale ?? 1 : 1;
+ const hasDom = typeof document !== "undefined" && Boolean(document.body);
+- return `${ratio}\0${viewportScale}\0${hasDom}`;
++ return [ratio, viewportScale, hasDom].join("\0");
+ }
+ function bodyZoomScale() {
+ let scale = 1;
+diff --git a/dist/index.js b/dist/index.js
+index f1c26fc1a7005acc436ce4d4395c6c1a8c72a169..51f2bd857558321ab5d55ca7c6dd83b1a1a7a4d7 100644
+--- a/dist/index.js
++++ b/dist/index.js
+@@ -10836,7 +10836,7 @@ function fontMetricProfileKey() {
+ const ratio = typeof window !== "undefined" ? window.devicePixelRatio : 1;
+ const viewportScale = typeof window !== "undefined" ? window.visualViewport?.scale ?? 1 : 1;
+ const hasDom = typeof document !== "undefined" && Boolean(document.body);
+- return `${ratio}\0${viewportScale}\0${hasDom}`;
++ return [ratio, viewportScale, hasDom].join("\0");
+ }
+ function bodyZoomScale() {
+ let scale = 1;
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 2ec9428..176e6cb 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -8,6 +8,11 @@ overrides:
'@types/react': 19.2.2
'@types/react-dom': 19.2.2
+patchedDependencies:
+ '@extend-ai/[email protected]':
+ hash: olzxvw7bsmbduaezq7u5ayhfs4
+ path: patches/@[email protected]
+
importers:
.:
@@ -125,7 +130,7 @@ importers:
'@extend-ai/react-docx':
specifier: 0.11.2
+ version: 0.11.2(patch_hash=olzxvw7bsmbduaezq7u5ayhfs4)([email protected]([email protected]))([email protected])
'@extend-ai/react-pptx':
specifier: 0.2.1
@@ -7628,7 +7633,7 @@ snapshots:
'@eslint/core': 0.13.0
levn: 0.4.1
+ '@extend-ai/[email protected](patch_hash=olzxvw7bsmbduaezq7u5ayhfs4)([email protected]([email protected]))([email protected])':
dependencies:
'@chenglou/pretext': 0.0.8
'@tanstack/react-virtual': 3.14.21([email protected]([email protected]))([email protected])