Skip to content

feat: v0.2.0 — icons, i18n, variants, slim builds, generators split - #4

Merged
reatlat merged 1 commit into
mainfrom
feat/v0.2.0
Aug 9, 2026
Merged

feat: v0.2.0 — icons, i18n, variants, slim builds, generators split#4
reatlat merged 1 commit into
mainfrom
feat/v0.2.0

Conversation

@reatlat

@reatlat reatlat commented Aug 9, 2026

Copy link
Copy Markdown
Member

What's new

Button variants

  • variant="outline" — white bg, black border, black text
  • Full --tc-* CSS custom property theming for every visual value

Icons

  • Brand SVG icons (Google, Outlook, Yahoo, Apple Calendar) in separate src/icons.js
  • show-icons="false" to hide per instance
  • Slim builds alias icons to empty stub — drops ~8 KB

Internationalization (12 languages)

  • en, de, es, fr, it, pt, nl, pl, uk, ru, ja, zh
  • Auto-detected from lang attribute, <html lang>, or navigator.language
  • Single-language builds via rollup alias (saves ~2 KB per lang)

Calendar selection

  • calendars="google,ics" — comma-separated list, order matters
  • services as alias attribute

Build system (rollup)

  • Full multilang: IIFE + ESM, 19 KB / 11 KB slim
  • Per-language: IIFE + ESM, 17 KB / 9 KB slim
  • Generators-only: IIFE + ESM, 3 KB — pure logic, no DOM/icons/i18n
  • 44 dist files total

Generators split

  • src/generators.js — timezone, ICS, URL builders, download
  • Importable standalone: import { generateICS } from '@freshjuice/twistcal/generators'
  • twistcal.js re-exports all generators (backward compatible)

Release workflow

  • GHA on v* tag: runs tests, builds all dist files, creates GitHub release with artifacts

Docs

  • README + llms.txt fully rewritten
  • All CDN links use jsdelivr

- Outline button variant + full --tc-* CSS custom property theming
- 12-language i18n with auto-detection (lang attr, <html lang>, navigator)
- Brand SVG icons in separate icons.js, swappable via rollup alias for slim builds
- Calendar selection via calendars='google,ics' attribute
- show-icons='false' to hide icons per instance
- Rollup build: full/slim/per-lang/generators-only (44 dist files)
- Generators split to src/generators.js — importable without web component
- Release GHA workflow: build on tag, attach dist artifacts
- README + llms.txt rewritten, all CDN links use jsdelivr
@reatlat
reatlat merged commit 60fc93e into main Aug 9, 2026
1 check passed
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