AI-native design editor. Open-source Figma alternative.
fix(deps): patch collaboration websocket driver
Danila Poyarkov6c9ef9d10320
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 0948d45c7..95ca12c74 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -45,6 +45,7 @@### Fixes+- Pin the patched `websocket-driver` release used through Trystero/Firebase collaboration to resolve a critical protocol-length advisory.- Preserve unrelated Figma prototype, library, export, and raw metadata when editing modeled `.fig` fields, while still overriding stale field-specific payloads.- Make canvas text rendering demand missing font faces and verify CJK/Arabic fallback coverage from CanvasKit shaping results instead of coarse script predictions.- Resolve fonts before loaded, pasted, imported, and tool-created nodes render; invalidate generation-stale text caches and use baked `.fig` glyphs only after live font resolution is exhausted.diff --git a/bun.lock b/bun.lockindex 42cab165a..1b7e56567 100644--- a/bun.lock+++ b/bun.lock@@ -315,6 +315,7 @@"overrides": {"brace-expansion": "5.0.6","protobufjs": "7.5.5",+ "websocket-driver": "0.7.5",},"packages": {"@acemir/cssom": ["@acemir/[email protected]", "", {}, "sha512-ZnR3GSaH+/vJ0YlHau21FjfLYjMpYVIzTD8M8vIEQvIGxeOXyXdzCI140rrCY862p/C/BbzWsjc1dgnM9mkoTA=="],@@ -3101,7 +3102,7 @@"webpack-virtual-modules": ["[email protected]", "", {}, "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ=="],- "websocket-driver": ["[email protected]", "", { "dependencies": { "http-parser-js": ">=0.5.1", "safe-buffer": ">=5.1.0", "websocket-extensions": ">=0.1.1" } }, "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg=="],+ "websocket-driver": ["[email protected]", "", { "dependencies": { "http-parser-js": ">=0.5.1", "safe-buffer": ">=5.1.0", "websocket-extensions": ">=0.1.1" } }, "sha512-ZL2+3c7kMBdIRCMz6l8jQMHyGVxj+UL+xVk74Ombiciboca8rHa15L86B19E5oh1pL9Ii/uj54gtsIrZGMo6zA=="],"websocket-extensions": ["[email protected]", "", {}, "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg=="],@@ -3265,10 +3266,14 @@"@open-pencil/docs/@tailwindcss/vite": ["@tailwindcss/[email protected]", "", { "dependencies": { "@tailwindcss/node": "4.3.2", "@tailwindcss/oxide": "4.3.2", "tailwindcss": "4.3.2" }, "peerDependencies": { "vite": "^5.2.0 || ^6 || ^7 || ^8" } }, "sha512-eHpMeX4JXfVNJDEcsouTeCBubJBTcTLigeaw/NTUW6PB5ATKKXdyonnXgTBX2VuRbjz1hjfz6C5XAhr52ImQXA=="],+ "@open-pencil/dom-css/tailwindcss": ["[email protected]", "", {}, "sha512-WtctNNSH8A9jlMIqxzuYumOHU5uGZyRv0Q5svQl+oEPy5w84YpBxdb7MdqyiSPQge5jTJ6zFQLq0PFygdccSBA=="],+"@open-pencil/fig/fflate": ["[email protected]", "", {}, "sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA=="],"@open-pencil/kiwi/fflate": ["[email protected]", "", {}, "sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA=="],+ "@open-pencil/vue/@vueuse/core": ["@vueuse/[email protected]", "", { "dependencies": { "@types/web-bluetooth": "^0.0.21", "@vueuse/metadata": "14.3.0", "@vueuse/shared": "14.3.0" }, "peerDependencies": { "vue": "^3.5.0" } }, "sha512-aHfz47g0ZhMtTVHmIzMVpJy8ePhhOy68GY5bv110+5DVtZ+W7BsOx+m61UNQqfrWyPztIHIanWa3E2tib3NFIw=="],+"@oxc-resolver/binding-wasm32-wasi/@emnapi/core": ["@emnapi/[email protected]", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.2", "tslib": "^2.4.0" } }, "sha512-l9Oo58x0HOP5znGzVhYW9U3e5wVuA4LAZU2AGezTmkhO1CgQRFDhDg4nneHsu/t3WniXg9QrG2nIXL/ZS8ln8Q=="],"@oxc-resolver/binding-wasm32-wasi/@emnapi/runtime": ["@emnapi/[email protected]", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-55coeOFKHv1ywEcUXJtWU5f+Jr/W5tZDvZig8DLKSwUN1JpROQ4rk/SNOQiFWmaR/VKF4zuFyW1B8JduOSv6Pg=="],@@ -3561,6 +3566,10 @@"@open-pencil/docs/@tailwindcss/vite/tailwindcss": ["[email protected]", "", {}, "sha512-WtctNNSH8A9jlMIqxzuYumOHU5uGZyRv0Q5svQl+oEPy5w84YpBxdb7MdqyiSPQge5jTJ6zFQLq0PFygdccSBA=="],+ "@open-pencil/vue/@vueuse/core/@vueuse/metadata": ["@vueuse/[email protected]", "", {}, "sha512-BwxmbAzwAVF50+MW57GXOUEV61nFBGnlBvrTqj49PqWJu3uw7hdu72ztXeZ33RdZtDY6kO+bfCAE1PCn88Tktw=="],++ "@open-pencil/vue/@vueuse/core/@vueuse/shared": ["@vueuse/[email protected]", "", { "peerDependencies": { "vue": "^3.5.0" } }, "sha512-bZpge9eSXwa4ToSiqJ7j6KRwhAsneMFoSz3LMWKQDkqimm3D/tbFlrklrs/IOqC8tEcYmXQZJ6N0UrjhBirVCg=="],+"@shikijs/vitepress-twoslash/shiki/@shikijs/engine-javascript": ["@shikijs/[email protected]", "", { "dependencies": { "@shikijs/types": "4.3.1", "@shikijs/vscode-textmate": "^10.0.2", "oniguruma-to-es": "^4.3.6" } }, "sha512-JBItcnPuYq7jVJdZo/vMj94r+szT7XEjHFX+mvFDGSEIbVAXAGyHAHzhbWzpGOwYidCZrErJLLgn2PVeiokHnQ=="],"@shikijs/vitepress-twoslash/shiki/@shikijs/engine-oniguruma": ["@shikijs/[email protected]", "", { "dependencies": { "@shikijs/types": "4.3.1", "@shikijs/vscode-textmate": "^10.0.2" } }, "sha512-OXyNMzg0pews+msMj4cHeqT4xiYKKvbnn6VbdAXxfoFl3SSx4fJTc8FadECuc5/H9p3BzhNAoAUXKwAu9rWYhg=="],diff --git a/package.json b/package.jsonindex 38abddb32..1196c589f 100644--- a/package.json+++ b/package.json@@ -165,6 +165,7 @@},"overrides": {"brace-expansion": "5.0.6",- "protobufjs": "7.5.5"+ "protobufjs": "7.5.5",+ "websocket-driver": "0.7.5"}}diff --git a/packages/core/src/figma-api/fonts.ts b/packages/core/src/figma-api/fonts.tsindex df6e74e81..e9bbfedbf 100644--- a/packages/core/src/figma-api/fonts.ts+++ b/packages/core/src/figma-api/fonts.ts@@ -1,6 +1,8 @@+import type { FontFamilyStyle } from '@open-pencil/scene-graph'+import { FONT_WEIGHT_NAMES } from '#core/text/fonts'-export type FigmaFontName = { family: string; style: string }+export type FigmaFontName = FontFamilyStyleexport type FigmaFont = { fontName: FigmaFontName }export function weightToStyleName(weight: number, italic: boolean): string {diff --git a/packages/core/src/text/font-style.ts b/packages/core/src/text/font-style.tsindex c6ad30710..b95467a32 100644--- a/packages/core/src/text/font-style.ts+++ b/packages/core/src/text/font-style.ts@@ -1,4 +1,5 @@import { normalizeFontFamily } from '@open-pencil/scene-graph'+import type { FontFamilyStyle } from '@open-pencil/scene-graph'export {FONT_WEIGHT_NAMES,@@ -10,12 +11,7 @@ export {import { parseFontStyle } from '#core/text/face'-interface LocalFontMatch {- family: string- style: string-}--export function chooseLocalFontMatch<T extends LocalFontMatch>(+export function chooseLocalFontMatch<T extends FontFamilyStyle>(fonts: T[],family: string,style?: stringdiff --git a/packages/scene-graph/src/font-style.ts b/packages/scene-graph/src/font-style.tsindex 9a779eed0..ad46ca0ed 100644--- a/packages/scene-graph/src/font-style.ts+++ b/packages/scene-graph/src/font-style.ts@@ -1,3 +1,8 @@+export interface FontFamilyStyle {+ family: string+ style: string+}+export interface ParsedFontStyle {weight: numberitalic: boolean