Releases: arijs/bootswatch-solid
Release list
Release v0.2.0
@arijs/bootswatch-ve v0.2.0
Utilities are now a faithful, per-theme family — no UnoCSS preset, no u() API — trimmed per-consumer by a purge Vite plugin. Each class is imported from its own family entry, and the theme provider is reactive.
Breaking changes
u()removed. Utilities are no longer applied through a runtime prefix helper. Import each class from its family and compose withcx(...):import { dFlex, mb3, textBgSecondary } from '@arijs/bootswatch-ve/utilities' cx(dFlex, mb3, textBgSecondary)
- UnoCSS preset removed. The
./presetentry and theunocss/preset wiring are gone. Consumers no longer configure a preset. - Per-family entry points. Classes are imported from their family (
@arijs/bootswatch-ve/buttons,/alerts,/utilities, …) and vars from<family>/vars. There is no.barrel. utilities/usedretired. The demo-only tree-shake split is gone; there is one authoritativeutilitiesfamily. Consumers who imported from ausedpath should import from/utilities.
New
- Purge Vite plugin (
@arijs/bootswatch-ve/vite). AddbootswatchPurge()to your Viteplugins; it reads the static family imports that survive tree-shaking and drops every unused CSS rule per theme chunk (≈ −84% in the ddsoft app). Theme scope and vars are always kept. - Reactive
BootswatchProvider.scopenow accepts an accessor and updates reactively on theme change:<BootswatchProvider scope={scope}>.useBootswatch()returns{ scope, cx }. - Faithful per-theme utilities. Every utility class is baked with the active theme's real values instead of a shared computed shim. Themes that diverge from Bootstrap render correctly — e.g. Lux
text-bg-secondarybakescolor: #000(legible) where Bootstrap bakes#fff.
Notes
- 27 themes, 30 contract entries; 0 residual literal
--bs-*across all themes. - Published via GitHub Actions trusted publishing (OIDC) with provenance.
Release v0.1.1
@arijs/bootswatch-ve v0.1.1
O Bootswatch reempacotado como design system Vanilla-Extract: CSS de componente pré-compilado com classes e variáveis 100% hasheadas, um preset UnoCSS de utilities e um runtime Solid mínimo e reativo — tudo theme-agnostic e compartilhado entre os 27 temas.
Destaques
- 27 temas do Bootswatch, cada um com CSS de componente por família (
buttons.css,dropdowns.css, …) +scope.css+public-vars.css+ umindex.cssde conveniência. - Classes e vars 100% hasheadas (prefixo de uma letra
b, ex.:.b1j3ahob0,var(--b54j6y45)) — zero--bs-*literal em todos os 27 temas, evitando colisão no CSS do projeto consumidor. /contract— manifesto theme-agnostic com ~820 nomes hasheados (classes + vars públicas tipadas), idêntico entre os temas: só os valores emscope/public-varsmudam./preset—presetBootswatch({ prefix })para UnoCSS, com utilities atômicas + variantes responsivas/print geradas do próprio Bootstrap. Fidelidade validada 46/46 vsbootstrap.css./solid— runtime reativo:BootswatchProvideraceita oscopecomo valor fixo ou accessor (troca de tema em runtime).useBootswatch()devolve{ scope, utilityPrefix, cx, u }—cx(...)monta classes de componente (scope + contracts, reativo ao tema) eu(...)monta utilities com o prefixo. AtalhosuseScope/useCx/useUtility.
Instalação
npm install @arijs/bootswatch-veUso rápido
import '@arijs/bootswatch-ve/themes/darkly' // CSS do tema
import { bootstrapScope } from '@arijs/bootswatch-ve/themes/bootstrap/scope'
import { btnPrimary } from '@arijs/bootswatch-ve/contract'
import { BootswatchProvider, useBootswatch } from '@arijs/bootswatch-ve/solid'
function Button() {
const { cx, u } = useBootswatch() // cx aplica o scope ativo (reativo)
return <button class={`${cx(btnPrimary)} ${u('mb-3')}`}>OK</button>
}
// scope reativo: passe um accessor (o app carrega o CSS e resolve o scope)
<BootswatchProvider scope={scope} utilityPrefix="bsu-"> … </BootswatchProvider>Entry points
. · ./contract · ./preset · ./solid · ./themes/* · ./themes/*.css · ./themes/*/scope
Temas
bootstrap, brite, cerulean, cosmo, cyborg, darkly, flatly, journal, litera, lumen, lux, materia, minty, morph, pulse, quartz, sandstone, simplex, sketchy, slate, solar, spacelab, superhero, united, vapor, yeti, zephyr
Compatibilidade
Peer deps opcionais: @unocss/core >=0.58.0 (só para o /preset) e solid-js >=1.8.0 || >=2.0.0-0 (só para o /solid) — o CSS e o /contract não exigem nenhuma das duas.
Notas
- Publicado via trusted publishing (OIDC) no GitHub Actions — sem token de longa duração, com provenance automática.
- Pacote: ~918 kB (tarball) / ~9,8 MB desempacotado, 901 arquivos.