Commit Graph
7 Commits
Author SHA1 Message Date
tbenandClaude Opus 5.5 7e7ab495c3 Move base.css rules into cascade layers so utility classes win
Unlayered CSS beats Tailwind's @layer utilities regardless of specificity,
so base.css (and consumer stylesheets) overrode classes passed to
components. Element defaults now live in @layer base and twui-* rules in
@layer components. Third-party TinyMCE/Ace overrides stay unlayered. README
documents wrapping consumer overrides in layers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-09 03:16:25 +01:00
tbenandClaude Opus 5.5 1c607c4bcd Add full-featured AIChat component
AIChat (elements/ai/AIChat) is a complete LLM chat UI built on new hooks:
- useAIChat: streaming conversation state (send, stop, regenerate,
  edit, feedback); `send` may return a string, async iterable,
  ReadableStream or fetch Response
- useAIChatHistory: saved conversations with optional localStorage
  persistence and generated titles, shown in AIChatSidebar
- useAIChatSpeech: read aloud via browser speech synthesis or a
  custom `speak` returning audio
- useAIChatDictation: voice input via browser recognition or a
  custom `transcribe`

Also adds a model picker, message editing, thumbs up/down, markdown
export, scoped markdown styles in base.css, the twuiReadTextStream,
twuiStripMarkdown and twuiGroupByRecency utils (with tests), and a
playground page. AIPromptBlock is kept and marked deprecated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 10:45:46 +01:00
tben 73a25f54c2 Add bunext playground for local component development
Runs at http://localhost:7010 via bun run dev. The playground imports the library from src through a committed symlink and tsconfig path alias, so component edits hot-reload without a build step. It has its own install root and is excluded from the published package.
2026-10-19 04:23:07 +01:00
tbenandClaude Opus 5.5 11da9b89e7 Package library as @moduletrace/twui npm package
- Move components/ to src/ and compile to dist/ with tsc
- Add root barrel export plus deep-import subpath exports and base.css export
- Post-compile step: copy base.css, add .js import extensions, mark client modules
- Add publish.sh and .npmrc for the Gitea npm registry
- Fix type errors, guard TinyMCE env access, drop ace-builds type dependency
- Rename clashing props type names, remove Next.js scaffolding and unused deps

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 10:17:54 +01:00
tben 89e673bb59 Updates 2026-03-04 17:54:49 +01:00
tben 214937e166 Updates 2026-03-04 17:50:26 +01:00
Benjamin Toby 25daf1844e First Commit 2024-10-16 15:20:34 +01:00