fix(widget): bump @deepgram/ui to ^0.1.3 to drop unscoped preflight regression#52
Merged
lukeocodes merged 1 commit intomainfrom May 7, 2026
Merged
Conversation
…egression
@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)
- #48 (the prior 0.1.1 bump)
- #50 (the prior 0.1.2 bump)
lukeocodes
pushed a commit
that referenced
this pull request
May 7, 2026
🤖 I have created a release *beep* *boop* --- ## [0.1.6](agents-widget-v0.1.5...agents-widget-v0.1.6) (2026-05-07) ### Bug Fixes * **widget:** bump @deepgram/ui to ^0.1.3 to drop unscoped preflight regression ([#52](#52)) ([f323ac4](f323ac4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
@deepgram/ui@0.1.2introduced a regression by switching to the full@import "tailwindcss"shortcut. The shortcut appliedprefix(dg)correctly to utilities but also pulled raw preflight in at root scope, alongside the scoped-preflight plugin's scoped copy. The bundle shipped two preflights and the unscoped one leaked*, ::before, ::after { box-sizing: border-box; ... },html{...},body{...}, andh1,h2,h3{...}onto every host page that loaded the widget.@deepgram/ui@0.1.3(just published from deepgram/ui#34) restored granular imports (tailwindcss/theme.css+tailwindcss/utilities.csswithprefix(dg)on each) so preflight comes ONLY from the scoped-preflight plugin. Every preflight rule in the bundle now has a[data-dg-agent]ancestor.What changed
packages/widget/package.json:@deepgram/ui^0.1.2->^0.1.3bun.lockregeneratedVerification
Rebuilt the widget locally against
@deepgram/ui@0.1.3:@layer base{*,...}blockhtml{},body{},h1,h2,h3{}etc:where([data-dg-agent], …)preflight.dg\:*utility refsExpected after merge
chore(main): release agents-widget 0.1.6.@deepgram/agents-widget@0.1.6to npm and uploads:https://cdn.deepgram.com/widgets/v0.1.6/widget.umd.js(immutable)https://cdn.deepgram.com/widgets/latest/widget.umd.js(cache-invalidated)Refs