Skip to content

Releases: arijs/bootswatch-solid

Release v0.2.0

Choose a tag to compare

@rhengles rhengles released this 22 Jul 13:26
250c95b

@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 with cx(...):
    import { dFlex, mb3, textBgSecondary } from '@arijs/bootswatch-ve/utilities'
    cx(dFlex, mb3, textBgSecondary)
  • UnoCSS preset removed. The ./preset entry and the unocss/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/used retired. The demo-only tree-shake split is gone; there is one authoritative utilities family. Consumers who imported from a used path should import from /utilities.

New

  • Purge Vite plugin (@arijs/bootswatch-ve/vite). Add bootswatchPurge() to your Vite plugins; 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. scope now 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-secondary bakes color: #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

Choose a tag to compare

@rhengles rhengles released this 22 Jul 00:22

@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 + um index.css de 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 em scope/public-vars mudam.
  • /preset — presetBootswatch({ prefix }) para UnoCSS, com utilities atômicas + variantes responsivas/print geradas do próprio Bootstrap. Fidelidade validada 46/46 vs bootstrap.css.
  • /solid — runtime reativo: BootswatchProvider aceita o scope como 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) e u(...) monta utilities com o prefixo. Atalhos useScope/useCx/useUtility.

Instalação

npm install @arijs/bootswatch-ve

Uso 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.