From 0172a6adb151cde7f42b4bc6f1cfd8fd2b4c2f7c Mon Sep 17 00:00:00 2001 From: lukeocodes Date: Thu, 7 May 2026 09:46:44 +0100 Subject: [PATCH] fix(widget): bump @deepgram/ui to ^0.1.2 for prefixed tailwind utilities MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @deepgram/ui@0.1.2 (deepgram/ui#32) namespaces every Tailwind utility class under a `dg:` prefix so the bundle no longer collides with host pages that also use Tailwind. The 0.1.1 release scoped preflight but left utilities like .prose, .flex, .container, .max-w-none, .gap-2, .px-3, .text-sm, .border, .transition unprefixed. When the widget loaded on a host page that also used Tailwind, source order made the bundle's class rules win and visibly hijacked host layout. The most common symptom was .prose snapping content to max-width: 65ch the moment the widget mounted. Bumping the widget's @deepgram/ui dep brings the prefixed bundle into the published widget UMD and the CDN copy at cdn.deepgram.com/widgets/. Verified locally by rebuilding the widget against 0.1.2: before (against 0.1.1): unprefixed .prose, .flex, .container etc in bundle - 42 collisions counted vs Fern after (against 0.1.2): 0 unprefixed Tailwind rules in bundle, 353 prefixed .dg:* utility rules, 76 scoped :where([data-dg-agent], …) preflight rules unchanged Bundle size: 387.5 KB -> 393.5 KB (+6 KB). The increase is real generated CSS for prefixed utilities that 0.1.1 was silently dropping because Tailwind couldn't see prefix-less class usages when prefix mode was on. Customer impact: any host page embedding the widget UMD no longer has its prose width, flex layouts, padding, typography, borders, or transitions overridden by widget CSS. Widget components keep working because their own className strings use the dg: prefix that matches the bundle. Refs: - deepgram/ui#32 (the prefix(dg) fix) - deepgram/agent#48 (the scoped preflight 0.1.1 work that this completes) - deepgram/dx-stack#4 (will gain a "scoping utilities, not just preflight" gotcha) --- bun.lock | 6 +++--- packages/widget/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bun.lock b/bun.lock index 49d630a..26707c8 100644 --- a/bun.lock +++ b/bun.lock @@ -40,11 +40,11 @@ }, "packages/widget": { "name": "@deepgram/agents-widget", - "version": "0.1.3", + "version": "0.1.4", "dependencies": { "@deepgram/agents": "^0.1.1", "@deepgram/react": "^0.1.0", - "@deepgram/ui": "^0.1.1", + "@deepgram/ui": "^0.1.2", "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.1", "", { "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-z4MmQJZhwDKzLPeW++Br59NedFffGHhrcGICDpUSDgf+ToyLsrKqdbXqehB5U7W2fdKxa97rd+8Cd2e+5TpmBw=="], + "@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=="], "@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 1d26df5..7ed373a 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.1", + "@deepgram/ui": "^0.1.2", "preact": "10.29.1", "sugar-high": "1.1.0" },