Skip to content

fix(widget): bump @deepgram/ui to ^0.1.3 to drop unscoped preflight regression#52

Merged
lukeocodes merged 1 commit intomainfrom
fix/bump-deepgram-ui-to-0.1.3
May 7, 2026
Merged

fix(widget): bump @deepgram/ui to ^0.1.3 to drop unscoped preflight regression#52
lukeocodes merged 1 commit intomainfrom
fix/bump-deepgram-ui-to-0.1.3

Conversation

@lukeocodes
Copy link
Copy Markdown
Member

Why

@deepgram/ui@0.1.2 introduced a regression 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, 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{...}, and h1,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.css with prefix(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.3
  • bun.lock regenerated

Verification

Rebuilt the widget locally against @deepgram/ui@0.1.3:

0.1.2 (broken) 0.1.3 (this PR)
Unscoped @layer base{*,...} block 1 0
Unscoped html{}, body{}, h1,h2,h3{} etc multiple 0
Scoped :where([data-dg-agent], …) preflight 76 76 (unchanged)
Prefixed .dg\:* utility refs 353 353 (unchanged)
Unprefixed Tailwind utility leaks 0 0 (unchanged)
Bundle size 393.5 KB 389.8 KB (-3.7 KB)

Expected after merge

  1. release-please opens chore(main): release agents-widget 0.1.6.
  2. Merging publishes @deepgram/agents-widget@0.1.6 to 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)
  3. Anyone embedding the widget on their own site stops having their host-page CSS reset by the widget bundle.

Refs

…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 lukeocodes merged commit f323ac4 into main May 7, 2026
2 checks passed
@lukeocodes lukeocodes deleted the fix/bump-deepgram-ui-to-0.1.3 branch May 7, 2026 09:25
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant