@usetheo/ui 0.3.0-next.0 → 0.5.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +60 -0
- package/dist/index.d.ts +85 -2
- package/dist/index.js +540 -4
- package/dist/index.js.map +1 -1
- package/dist/preset.d.ts +31 -0
- package/dist/preset.js +159 -0
- package/dist/preset.js.map +1 -0
- package/dist/vite-plugin.d.ts +29 -0
- package/dist/vite-plugin.js +72 -0
- package/dist/vite-plugin.js.map +1 -0
- package/package.json +21 -1
- package/registry/r/theme-provider.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,66 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.5.0-next.0] - 2026-05-22
|
|
11
|
+
|
|
12
|
+
Minor bump — public API gains two subpath exports (`./vite-plugin` and
|
|
13
|
+
`./preset`) so the TheoKit framework's `integrateUseTheoUI()` can
|
|
14
|
+
auto-wire Tailwind v4 for consumers with zero further configuration.
|
|
15
|
+
Zero visual break and no runtime behavior change for existing consumers.
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- **`@usetheo/ui/vite-plugin` (NEW, RFC 0008)** — Default-export factory
|
|
20
|
+
returning one Vite `Plugin`. The plugin's `config()` hook
|
|
21
|
+
dynamic-imports `@tailwindcss/vite` v4 and chains it into the
|
|
22
|
+
consumer's plugin array when resolvable, and degrades to `console.warn`
|
|
23
|
+
+ CSS-only mode (via the pre-built `@usetheo/ui/styles.css` subpath)
|
|
24
|
+
when the peer is not installed. A virtual module
|
|
25
|
+
`virtual:@usetheo/ui/library-sources.css` provides the `@source`
|
|
26
|
+
directive covering `node_modules/@usetheo/ui/dist/**/*.{js,mjs,cjs}`
|
|
27
|
+
so Tailwind scans the library's published JS for utilities. Plugin
|
|
28
|
+
name slug: `@usetheo/ui/vite-plugin`. Options: `tailwind?: boolean`
|
|
29
|
+
(default `true`), `contentExtra?: string[]` (extra `@source` globs).
|
|
30
|
+
(#TBD)
|
|
31
|
+
- **`@usetheo/ui/preset` (NEW, RFC 0008)** — Default-export Tailwind v4
|
|
32
|
+
`Partial<Config>` mirroring the design tokens in `tokens.css`
|
|
33
|
+
(colors via `hsl(var(--x) / <alpha-value>)`, font families, the
|
|
34
|
+
Violet Forge typescale, radii, shadows, animations, motion timing)
|
|
35
|
+
with `content` paths covering `./node_modules/@usetheo/ui/dist/**` and
|
|
36
|
+
the `tailwindcss-animate` plugin. Consumer usage:
|
|
37
|
+
`import preset from "@usetheo/ui/preset"; export default { presets: [preset] }`.
|
|
38
|
+
Internally delegates to the existing `src/styles/tailwind-preset.ts` —
|
|
39
|
+
the v3 shadcn-registry preset and the v4 import preset stay
|
|
40
|
+
byte-for-byte aligned and impossible to drift. (#TBD)
|
|
41
|
+
- **`@tailwindcss/vite ^4`, `tailwindcss ^4`, `vite ^6 || ^7` peer-deps
|
|
42
|
+
(all optional)** — added to `peerDependenciesMeta` so consumers
|
|
43
|
+
importing `@usetheo/ui` standalone (no framework) are not forced into
|
|
44
|
+
Tailwind v4. Required only when consuming via TheoKit's auto-wire path
|
|
45
|
+
or the new `./vite-plugin` subpath. (#TBD)
|
|
46
|
+
|
|
47
|
+
### Notes
|
|
48
|
+
|
|
49
|
+
- Existing `tailwindcss@^3` consumers continue to work via the shadcn
|
|
50
|
+
registry preset (`registry/r/tailwind-preset.json`) and the prebuilt
|
|
51
|
+
`@usetheo/ui/styles.css`. The new subpaths are additive — they do not
|
|
52
|
+
break v3-based setups.
|
|
53
|
+
- The `vite-plugin` returns ONE `Plugin` object (not `Plugin[]`) per the
|
|
54
|
+
cross-repo contract with TheoKit's `integrateUseTheoUI()`. The chain
|
|
55
|
+
to `@tailwindcss/vite` happens via the `config()` hook's `plugins`
|
|
56
|
+
field — Vite 5+ tightened the TypeScript signature, the runtime still
|
|
57
|
+
merges plugins as expected.
|
|
58
|
+
|
|
59
|
+
## [0.4.0-next.0] - 2026-05-22
|
|
60
|
+
|
|
61
|
+
Minor bump — public API gains 7 new theme exports. Zero visual break for
|
|
62
|
+
consumers in 0.3.x (default theme remains `violet-forge`).
|
|
63
|
+
|
|
64
|
+
### Added
|
|
65
|
+
|
|
66
|
+
- **7 new built-in themes (2026-05-22, RFC 0007)** — `vercelMono`, `githubDark`, `dracula`, `oneDark`, `anthropicStyle`, `openaiStyle`, `linearGlass`. `builtinThemes` grows from 3 to 10 entries. Each ships light + dark mode. Derivative slugs from brand names use suffixes (`-mono`, `-style`, `-glass`) and descriptions include "Inspired by, not affiliated with [Company]" per D1.1 ADR (trademark protection / no false-affiliation). Canonical OSS themes (Dracula, One Dark, GitHub Dark) keep their reusable names. Bundle delta: ~60 KB CSS injection if consumer passes `builtinThemes` (alternative: `themes={[violetForge, dracula]}` for ~12 KB). (#TBD)
|
|
67
|
+
- **`validateThemeContrast` quality gate (2026-05-22)** — Pure-JS WCAG 2.1 contrast validator in `scripts/lib/wcag-contrast.ts` + gate in `validate-quality-gates.ts`. Iterates 10 themes × 2 modes × 4 high-stakes pairs, enforces 4.5:1 (body) and 3:1 (large/button) thresholds. Runs <50ms. Caught 14 pre-existing AA failures in `violet-forge`, `classic-paper`, `aurora-terminal` accent contrast; `classic-paper` accent darkened from `37 92% 50%` → `37 92% 40%` and `openai-style` dark primary darkened from `155 78% 43%` → `155 78% 30%` to satisfy the gate. (#TBD)
|
|
68
|
+
- **`scripts/lib/wcag-contrast.ts` + `.test.ts` (NEW)** — Pure functions `parseHsl`, `hslToLuminance`, `contrastRatio`. 9 tests cover edge cases (achromatic, hue overflow, percent stripping — EC-3). (#TBD)
|
|
69
|
+
|
|
10
70
|
## [0.3.0-next.0] - 2026-05-22
|
|
11
71
|
|
|
12
72
|
Minor bump — visual defaults realigned to FAANG-modern density baseline
|
package/dist/index.d.ts
CHANGED
|
@@ -362,9 +362,92 @@ declare function hex(input: string): string;
|
|
|
362
362
|
*/
|
|
363
363
|
declare function rgb(r: number, g: number, b: number): string;
|
|
364
364
|
|
|
365
|
+
/**
|
|
366
|
+
* Vercel Mono — razor-sharp monochrome + signature blue.
|
|
367
|
+
*
|
|
368
|
+
* Inspired by, not affiliated with Vercel. Based on Geist Design tokens
|
|
369
|
+
* (https://github.com/vercel/geist). Light = pure white + black ink + blue
|
|
370
|
+
* accent (#0070F3); dark = near-black canvas + white text + same blue.
|
|
371
|
+
*
|
|
372
|
+
* Plan: .claude/knowledge-base/plans/seven-themes-plan.md T2.1
|
|
373
|
+
*/
|
|
374
|
+
declare const vercelMono: Theme;
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* GitHub Dark — GitHub's default dark theme.
|
|
378
|
+
*
|
|
379
|
+
* Based on the canonical Primer Primitives tokens
|
|
380
|
+
* (https://github.com/primer/primitives, MIT). Light fallback uses GitHub's
|
|
381
|
+
* "light-default" Primer scale.
|
|
382
|
+
*
|
|
383
|
+
* Plan: .claude/knowledge-base/plans/seven-themes-plan.md T3.1
|
|
384
|
+
*/
|
|
385
|
+
declare const githubDark: Theme;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Dracula — the cult OSS dark theme (https://draculatheme.com, MIT).
|
|
389
|
+
*
|
|
390
|
+
* Dark mode = canonical Dracula spec (background #282A36, signature pink
|
|
391
|
+
* #FF79C6, purple #BD93F9, etc.).
|
|
392
|
+
*
|
|
393
|
+
* Note: "light" mode is a Theo-original adaptation — Dracula upstream
|
|
394
|
+
* spec is dark-only. We darken the signature pink/purple to pass WCAG AA
|
|
395
|
+
* against light backgrounds, sacrificing palette purity for accessibility.
|
|
396
|
+
*
|
|
397
|
+
* Plan: .claude/knowledge-base/plans/seven-themes-plan.md T4.1
|
|
398
|
+
*/
|
|
399
|
+
declare const dracula: Theme;
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* One Dark / One Light — Atom's iconic syntax theme.
|
|
403
|
+
*
|
|
404
|
+
* Sources:
|
|
405
|
+
* - atom/one-dark-syntax (MIT) — dark mode canonical
|
|
406
|
+
* - atom/one-light-syntax (MIT) — light mode canonical
|
|
407
|
+
*
|
|
408
|
+
* Plan: .claude/knowledge-base/plans/seven-themes-plan.md T5.1
|
|
409
|
+
*/
|
|
410
|
+
declare const oneDark: Theme;
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* Anthropic-style — claude.ai-inspired editorial calm.
|
|
414
|
+
*
|
|
415
|
+
* Inspired by, not affiliated with Anthropic. Visually informed by claude.ai's
|
|
416
|
+
* warm cream canvas + burnt sienna primary + ink-on-paper feel. No proprietary
|
|
417
|
+
* assets reproduced (font is Geist, colors are independent measurements).
|
|
418
|
+
*
|
|
419
|
+
* Plan: .claude/knowledge-base/plans/seven-themes-plan.md T6.1
|
|
420
|
+
*/
|
|
421
|
+
declare const anthropicStyle: Theme;
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* OpenAI-style — chatgpt.com-inspired minimal tech-utility.
|
|
425
|
+
*
|
|
426
|
+
* Inspired by, not affiliated with OpenAI. Pure white / charcoal canvas +
|
|
427
|
+
* signature ChatGPT green (#10A37F). Minimal saturation, high contrast.
|
|
428
|
+
*
|
|
429
|
+
* Plan: .claude/knowledge-base/plans/seven-themes-plan.md T7.1
|
|
430
|
+
*/
|
|
431
|
+
declare const openaiStyle: Theme;
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Linear Glass — linear.app-inspired glassy indigo.
|
|
435
|
+
*
|
|
436
|
+
* Inspired by, not affiliated with Linear. Refined indigo-violet primary
|
|
437
|
+
* (#5E6AD2) on near-black canvas in dark, pure white in light. Subtle
|
|
438
|
+
* glassmorphic surface temperature.
|
|
439
|
+
*
|
|
440
|
+
* Plan: .claude/knowledge-base/plans/seven-themes-plan.md T8.1
|
|
441
|
+
*/
|
|
442
|
+
declare const linearGlass: Theme;
|
|
443
|
+
|
|
365
444
|
/**
|
|
366
445
|
* All themes bundled with Theo UI. Pass to `<ThemeProvider themes={builtinThemes}>`
|
|
367
|
-
* if you want all
|
|
446
|
+
* if you want all 10 available out of the box.
|
|
447
|
+
*
|
|
448
|
+
* EC-4 note: passing the full 10-entry list triggers ~60 KB CSS injection in
|
|
449
|
+
* `<style id="theo-ui-theme-vars">`. For apps focused on 1-2 themes, prefer
|
|
450
|
+
* `themes={[violetForge, dracula]}` to keep the payload at ~12 KB.
|
|
368
451
|
*/
|
|
369
452
|
declare const builtinThemes: Theme[];
|
|
370
453
|
|
|
@@ -3286,4 +3369,4 @@ interface CommandPaletteProps {
|
|
|
3286
3369
|
*/
|
|
3287
3370
|
declare function CommandPalette({ open, onOpenChange, items, onSelect, placeholder, emptyMessage, filter, }: CommandPaletteProps): react_jsx_runtime.JSX.Element;
|
|
3288
3371
|
|
|
3289
|
-
export { ALL_MODES, AgentComposer, type AgentDraft, AgentEditor, AgentErrorCard, type AgentErrorKind, AgentEvent, type AgentEvent$1 as AgentEventModel, type AgentEventStatus, type AgentEventType, AgentHandoff, AgentProfile, type AgentProfileDescriptor, AgentStartingState, AgentStream, type AgentStreamItem, AgentStreaming, AgentTimeline, ApprovalCard, type ApprovalSeverity, ArtifactPreview, type Attachment, AttachmentChip, type AuditActorKind, type AuditEntry, AuditLogEntry, type AuditSeverity, AutoCompactNotice, Avatar, BadgeWithDot as Badge, type BadgeProps, BrowserControls, BuildLogStream, Button, type ButtonProps, type Capability, CapabilityIndicator, type CapabilityState, Card, ChatComposer, ChatMessage, ChatThread, Checkbox, type ColorScale, type CommandItem, CommandPalette, type ComposerMode, ContextCard, ContextWindowBar, CostMeter, type CreatedFile, CreatedFilesCard, type CronJob, CronJobCard, type CronJobStatus, CronJobsList, type DefineThemeInput, type Density, type DensityContextValue, type Deployment, DeploymentRow, type DeploymentStatus, Dialog, type DiffHunk, type DiffLine, type DiffLineKind, DiffViewer, type Domain, DomainConfig, type DomainStatus, EmptyState, type EnvScope, type EnvVar, EnvVarEditor, FolderContextCard, type FolderEntry, FolderSelector, FormField, HOOK_EVENTS, type HandoffParty, HookConfig, type HookEntry, type HookEvent, type HookEventEntry, HookEventLog, type HookEventResult, Input, type InputProps, type IntentOption, IntentSelector, Label, type Lane, LaneBoard, type LaneCard, type LaneState, type LogLevel, type LogLine, LoginSplit, type MCPServer, MCPServerCard, MCPServerList, type MCPServerStatus, MODE_LABEL, MemoryEditor, type MemoryLayer, type MemoryScope, type MentionItem, MentionMenu, type MentionTrigger, type Message, type MessageRole, type Metric, MetricsPanel, type Mode, type ModelCapabilityFlag, ModelCard, type ModelInfo, type ModelOption, ModelSelector, type PermissionDecision, type PermissionDecisionKind, PermissionMatrix, PermissionModal, type PermissionOperation, type PermissionRequest, type PermissionRule, type PlanNode, type PlanNodeStatus, type PreviewEnv, PreviewEnvCard, PreviewPanel, type PreviewService, ProgressChecklist, type Project, ProjectCard, type ProjectStatus, ProjectSwitcher, type QuickAction, QuickActionChips, RadioGroup, type RailStep, type RecentFolder, RecentFoldersList, type RollbackTarget, RollbackUI, type Rule, RuleCard, RuleEditor, type RuleScope, type RuleState, RunStats, type RunningTaskItem, type RunningTaskStatus, RunningTasksPanel, ScrollArea, Select, SessionListItem, type SessionMode, type SessionRunStatus, type SessionStatus, type SessionSummary, SessionTimeline, Sheet, Sidebar, Skeleton, type Skill, SkillCard, SkillEditor, type SkillSource, type SkillState, SkillsList, SocialAuthRow, type SocialProvider, StepsRail, SubAgentDispatch, type SubAgentRun, type SubAgentState, Switch, SystemPromptEditor, Tabs, TaskHeader, TaskNode, TaskPlan, type TaskSource, type TaskStatus, type TaskStep, type TaskStepStatus, type TerminalLine, TerminalPanel, Textarea, type TextareaProps, type Theme, type ThemeFonts, type ThemeMode, ThemeProvider, ThemeScript, ThemeSwitcher, TheoUIProvider, type TheoUIProviderProps, Toast, type ToastVariant, Toaster, TokenUsageChart, type TokenUsagePoint, ToolCall, ToolCallCard, type ToolCallStatus, type ToolEnablement, type ToolEntry, ToolResult, ToolsList, TooltipWithStatics as Tooltip, TopNav, auroraTerminal, avatarVariants, badgeVariants, builtinThemes, buttonVariants, capabilityPresets, classicPaper, cn, defineTheme, hex, modelCapabilityPresets, rgb, sheetVariants, useDensity, useTheme, useToast, violetForge };
|
|
3372
|
+
export { ALL_MODES, AgentComposer, type AgentDraft, AgentEditor, AgentErrorCard, type AgentErrorKind, AgentEvent, type AgentEvent$1 as AgentEventModel, type AgentEventStatus, type AgentEventType, AgentHandoff, AgentProfile, type AgentProfileDescriptor, AgentStartingState, AgentStream, type AgentStreamItem, AgentStreaming, AgentTimeline, ApprovalCard, type ApprovalSeverity, ArtifactPreview, type Attachment, AttachmentChip, type AuditActorKind, type AuditEntry, AuditLogEntry, type AuditSeverity, AutoCompactNotice, Avatar, BadgeWithDot as Badge, type BadgeProps, BrowserControls, BuildLogStream, Button, type ButtonProps, type Capability, CapabilityIndicator, type CapabilityState, Card, ChatComposer, ChatMessage, ChatThread, Checkbox, type ColorScale, type CommandItem, CommandPalette, type ComposerMode, ContextCard, ContextWindowBar, CostMeter, type CreatedFile, CreatedFilesCard, type CronJob, CronJobCard, type CronJobStatus, CronJobsList, type DefineThemeInput, type Density, type DensityContextValue, type Deployment, DeploymentRow, type DeploymentStatus, Dialog, type DiffHunk, type DiffLine, type DiffLineKind, DiffViewer, type Domain, DomainConfig, type DomainStatus, EmptyState, type EnvScope, type EnvVar, EnvVarEditor, FolderContextCard, type FolderEntry, FolderSelector, FormField, HOOK_EVENTS, type HandoffParty, HookConfig, type HookEntry, type HookEvent, type HookEventEntry, HookEventLog, type HookEventResult, Input, type InputProps, type IntentOption, IntentSelector, Label, type Lane, LaneBoard, type LaneCard, type LaneState, type LogLevel, type LogLine, LoginSplit, type MCPServer, MCPServerCard, MCPServerList, type MCPServerStatus, MODE_LABEL, MemoryEditor, type MemoryLayer, type MemoryScope, type MentionItem, MentionMenu, type MentionTrigger, type Message, type MessageRole, type Metric, MetricsPanel, type Mode, type ModelCapabilityFlag, ModelCard, type ModelInfo, type ModelOption, ModelSelector, type PermissionDecision, type PermissionDecisionKind, PermissionMatrix, PermissionModal, type PermissionOperation, type PermissionRequest, type PermissionRule, type PlanNode, type PlanNodeStatus, type PreviewEnv, PreviewEnvCard, PreviewPanel, type PreviewService, ProgressChecklist, type Project, ProjectCard, type ProjectStatus, ProjectSwitcher, type QuickAction, QuickActionChips, RadioGroup, type RailStep, type RecentFolder, RecentFoldersList, type RollbackTarget, RollbackUI, type Rule, RuleCard, RuleEditor, type RuleScope, type RuleState, RunStats, type RunningTaskItem, type RunningTaskStatus, RunningTasksPanel, ScrollArea, Select, SessionListItem, type SessionMode, type SessionRunStatus, type SessionStatus, type SessionSummary, SessionTimeline, Sheet, Sidebar, Skeleton, type Skill, SkillCard, SkillEditor, type SkillSource, type SkillState, SkillsList, SocialAuthRow, type SocialProvider, StepsRail, SubAgentDispatch, type SubAgentRun, type SubAgentState, Switch, SystemPromptEditor, Tabs, TaskHeader, TaskNode, TaskPlan, type TaskSource, type TaskStatus, type TaskStep, type TaskStepStatus, type TerminalLine, TerminalPanel, Textarea, type TextareaProps, type Theme, type ThemeFonts, type ThemeMode, ThemeProvider, ThemeScript, ThemeSwitcher, TheoUIProvider, type TheoUIProviderProps, Toast, type ToastVariant, Toaster, TokenUsageChart, type TokenUsagePoint, ToolCall, ToolCallCard, type ToolCallStatus, type ToolEnablement, type ToolEntry, ToolResult, ToolsList, TooltipWithStatics as Tooltip, TopNav, anthropicStyle, auroraTerminal, avatarVariants, badgeVariants, builtinThemes, buttonVariants, capabilityPresets, classicPaper, cn, defineTheme, dracula, githubDark, hex, linearGlass, modelCapabilityPresets, oneDark, openaiStyle, rgb, sheetVariants, useDensity, useTheme, useToast, vercelMono, violetForge };
|