From 971f6f75ea539fa318bad23eebb8e728e9ed3ad3 Mon Sep 17 00:00:00 2001 From: lukeocodes Date: Thu, 7 May 2026 10:23:39 +0100 Subject: [PATCH] fix(widget): bump @deepgram/ui to ^0.1.3 to drop unscoped preflight regression MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @deepgram/ui@0.1.2 reintroduced an unscoped preflight leak by switching to the full `@import "tailwindcss"` shortcut. The shortcut applied prefix(dg) correctly to utilities but also pulled raw preflight in at root scope, on top of the scoped copy emitted by the plugin. Bundle shipped two preflight copies, one of which leaked `*, ::before, ::after { box-sizing: border-box; ... }`, `html{...}`, `body{...}`, and `h1,h2,h3{...}` onto every host page. @deepgram/ui@0.1.3 (deepgram/ui#34) restores granular imports (`tailwindcss/theme.css` + `tailwindcss/utilities.css` with prefix(dg) on each) so preflight is no longer pulled in directly. The scoped-preflight plugin remains the single source of preflight, ensuring every preflight rule has a `[data-dg-agent]` ancestor. Verified locally by rebuilding the widget against 0.1.3: before (0.1.2): 1 unscoped @layer base{*,...} block, multiple unscoped html/body/h1-h3 rules at root after (0.1.3): 0 unscoped preflight indicators, 76 scoped :where([data-dg-agent], …) rules (unchanged), 353 prefixed .dg\: utility refs (unchanged), 0 unprefixed Tailwind utility class rules (unchanged) Bundle size: 393.5 KB -> 389.8 KB (-3.7 KB) from removing duplicate raw-preflight rules. Customer impact: any host page embedding the widget no longer has its `box-sizing`, margins, paddings, headings, anchor colors, or form-element appearance reset by the widget bundle. Widget styling inside `[data-dg-agent]` continues to apply. Refs: - deepgram/ui#34 (the granular-imports fix) - deepgram/ui#27 (the original scoped-preflight work) - deepgram/ui#32 (the prefix(dg) work) - deepgram/agent#48 (the prior 0.1.1 bump) - deepgram/agent#50 (the prior 0.1.2 bump) --- bun.lock | 6 +++--- packages/widget/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bun.lock b/bun.lock index 26707c8..aa146d3 100644 --- a/bun.lock +++ b/bun.lock @@ -40,11 +40,11 @@ }, "packages/widget": { "name": "@deepgram/agents-widget", - "version": "0.1.4", + "version": "0.1.5", "dependencies": { "@deepgram/agents": "^0.1.1", "@deepgram/react": "^0.1.0", - "@deepgram/ui": "^0.1.2", + "@deepgram/ui": "^0.1.3", "preact": "10.29.1", "sugar-high": "1.1.0", }, @@ -660,7 +660,7 @@ "ws": ["ws@8.20.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA=="], - "@deepgram/agents-widget/@deepgram/ui": ["@deepgram/ui@0.1.2", "", { "dependencies": { "@deepgram/agents": "^0.1.1", "@deepgram/react": "^0.1.0", "@radix-ui/react-scroll-area": "1.2.10", "@radix-ui/react-select": "2.2.6", "@radix-ui/react-slot": "1.2.4", "@radix-ui/react-toggle": "1.1.10", "class-variance-authority": "0.7.1", "clsx": "2.1.1", "lucide-react": "1.11.0", "tailwind-merge": "3.5.0", "tailwindcss-scoped-preflight": "^4.0.6" }, "peerDependencies": { "react": ">=18.0.0", "react-dom": ">=18.0.0" } }, "sha512-uDvqQ1ia6e9oJFgWobpGggMY0q/6P+MPgt74UVTe4/DYPN6Vf4I1YyRJnwuNbRtdpO2vbJr24FhJRDUzf0tPrA=="], + "@deepgram/agents-widget/@deepgram/ui": ["@deepgram/ui@0.1.3", "", { "dependencies": { "@deepgram/agents": "^0.1.1", "@deepgram/react": "^0.1.0", "@radix-ui/react-scroll-area": "1.2.10", "@radix-ui/react-select": "2.2.6", "@radix-ui/react-slot": "1.2.4", "@radix-ui/react-toggle": "1.1.10", "class-variance-authority": "0.7.1", "clsx": "2.1.1", "lucide-react": "1.11.0", "tailwind-merge": "3.5.0", "tailwindcss-scoped-preflight": "^4.0.6" }, "peerDependencies": { "react": ">=18.0.0", "react-dom": ">=18.0.0" } }, "sha512-baOHUlgzQVYnziOv8DrRRLcD5JC5TyLJ8FHAtN2MPSODVKOTp6CF79/qaivTFPeGb+YbtfdO3uHAfa70NY6Yvw=="], "@microsoft/api-extractor/typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], diff --git a/packages/widget/package.json b/packages/widget/package.json index afc5ad9..dd23419 100644 --- a/packages/widget/package.json +++ b/packages/widget/package.json @@ -46,7 +46,7 @@ "dependencies": { "@deepgram/agents": "^0.1.1", "@deepgram/react": "^0.1.0", - "@deepgram/ui": "^0.1.2", + "@deepgram/ui": "^0.1.3", "preact": "10.29.1", "sugar-high": "1.1.0" },