From a9ee01fc138ca841ee7a3b7cc85db3ea3d04ce29 Mon Sep 17 00:00:00 2001 From: rcoenen <753704+rcoenen@users.noreply.github.com> Date: Sat, 6 Jun 2026 06:28:46 -0400 Subject: [PATCH] fix: make fill hex editable and quiet local font probing * fix: make fill hex editable and suppress premature local font warnings - FillSection: replace read-only hex span with editable input for solid fills (matching existing stroke behavior); gradient/image fills and variable-bound fills keep the display span - FontManager.findLocalFont: guard on localFontAccessState === 'granted' before calling queryLocalFonts(), eliminating SecurityError console warnings on load when the user hasn't yet granted font access - .gitignore: add .opencode/ Co-Authored-By: Claude Sonnet 4.6 * style: apply oxfmt formatting to FillSection.vue Co-Authored-By: Claude Sonnet 4.6 --------- Co-authored-by: Claude Sonnet 4.6 Co-authored-by: Danila Poyarkov --- .gitignore | 3 +++ packages/core/src/text/fonts.ts | 1 + src/components/properties/FillSection.vue | 27 ++++++++++++++++++++++- 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2fced0a71..0649c0c3e 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,6 @@ vue-stream-markdown/ # Agent scratch space (reviews, test artifacts) scratch/ + +# OpenCode +.opencode/ diff --git a/packages/core/src/text/fonts.ts b/packages/core/src/text/fonts.ts index e08728203..cada408ee 100644 --- a/packages/core/src/text/fonts.ts +++ b/packages/core/src/text/fonts.ts @@ -528,6 +528,7 @@ export class FontManager { options: FindLocalFontOptions = {} ): Promise { if (!IS_BROWSER || !window.queryLocalFonts) return null + if (this.localFontAccessState !== 'granted') return null try { const fonts = await window.queryLocalFonts() const match = chooseLocalFontMatch(fonts, family, style) diff --git a/src/components/properties/FillSection.vue b/src/components/properties/FillSection.vue index c7c978dc8..b40e359fc 100644 --- a/src/components/properties/FillSection.vue +++ b/src/components/properties/FillSection.vue @@ -1,5 +1,6 @@