@sableui/react 0.0.0-stage → 0.1.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/AGENTS.md +157 -0
- package/CHANGELOG.md +50 -0
- package/CONTRIBUTING.md +221 -0
- package/DESIGN.md +548 -0
- package/LICENSE +21 -0
- package/README.md +194 -2
- package/THIRD_PARTY_NOTICES.md +44 -0
- package/bin/sable-lint.mjs +0 -0
- package/bin/sable.mjs +1223 -0
- package/dist/_contract-CYScOdf5.d.ts +150 -0
- package/dist/chunk-3IWZYBGH.js +398 -0
- package/dist/chunk-5Z5KLOAU.js +167 -0
- package/dist/chunk-7MG4SHYX.js +15 -0
- package/dist/chunk-ADLLDWLW.js +15 -0
- package/dist/chunk-EP55KSYA.js +14 -0
- package/dist/chunk-J23ELQQZ.js +9396 -0
- package/dist/chunk-JI7WJP2L.js +286 -0
- package/dist/chunk-K7RUHUGC.js +14 -0
- package/dist/chunk-KO3NAEBF.js +15 -0
- package/dist/chunk-L4IEIQQA.js +14 -0
- package/dist/chunk-L6Y46C62.js +270 -0
- package/dist/chunk-NEQNXI2G.js +25 -0
- package/dist/chunk-PAOZBZME.js +40 -0
- package/dist/chunk-RWP4XBSK.js +139 -0
- package/dist/chunk-SRQWQUTW.js +63 -0
- package/dist/chunk-YXBOYWBN.js +15 -0
- package/dist/foundations/index.d.ts +88 -0
- package/dist/foundations/index.js +792 -0
- package/dist/icon/index.d.ts +60 -0
- package/dist/icon/index.js +2 -0
- package/dist/icon-sets/brands.d.ts +44 -0
- package/dist/icon-sets/brands.js +147 -0
- package/dist/icon-sets/reicon.d.ts +8 -0
- package/dist/icon-sets/reicon.js +1 -0
- package/dist/index.d.ts +7013 -0
- package/dist/index.js +15462 -0
- package/dist/ios/chrome.css +83 -0
- package/dist/ios/frame.css +5 -0
- package/dist/ios/index.d.ts +70 -0
- package/dist/ios/index.js +313 -0
- package/dist/ios/preview.d.ts +64 -0
- package/dist/ios/preview.js +133 -0
- package/dist/ios/styles.css +77 -0
- package/dist/layout/index.d.ts +280 -0
- package/dist/layout/index.js +2 -0
- package/dist/meta-6dUzgC6M.d.ts +205 -0
- package/dist/patterns/index.d.ts +36 -0
- package/dist/patterns/index.js +934 -0
- package/dist/presets/index.d.ts +37 -0
- package/dist/presets/index.js +117 -0
- package/dist/registry-CyL28OzJ.d.ts +28 -0
- package/dist/styles.css +1893 -0
- package/dist/theme-provider-BWcizhAt.d.ts +105 -0
- package/dist/themes/atelier/atelier.css +213 -0
- package/dist/themes/atelier/index.d.ts +9 -0
- package/dist/themes/atelier/index.js +1 -0
- package/dist/themes/base/base.css +443 -0
- package/dist/themes/base/index.d.ts +9 -0
- package/dist/themes/base/index.js +1 -0
- package/dist/themes/ember/ember.css +270 -0
- package/dist/themes/ember/index.d.ts +9 -0
- package/dist/themes/ember/index.js +1 -0
- package/dist/themes/index.d.ts +10 -0
- package/dist/themes/index.js +8 -0
- package/dist/themes/meridian/index.d.ts +9 -0
- package/dist/themes/meridian/index.js +1 -0
- package/dist/themes/meridian/meridian.css +255 -0
- package/dist/themes/poppy/index.d.ts +6 -0
- package/dist/themes/poppy/index.js +1 -0
- package/dist/themes/poppy/poppy.css +174 -0
- package/dist/themes/prism/index.d.ts +6 -0
- package/dist/themes/prism/index.js +1 -0
- package/dist/themes/prism/prism.css +183 -0
- package/dist/themes/verdant/index.d.ts +9 -0
- package/dist/themes/verdant/index.js +1 -0
- package/dist/themes/verdant/verdant.css +210 -0
- package/dist/themes.css +30 -0
- package/llms/components/accordion.md +93 -0
- package/llms/components/app-header.md +70 -0
- package/llms/components/app-shell.md +117 -0
- package/llms/components/attachment.md +105 -0
- package/llms/components/avatar.md +141 -0
- package/llms/components/badge.md +117 -0
- package/llms/components/banner.md +119 -0
- package/llms/components/bottom-nav.md +80 -0
- package/llms/components/breadcrumbs.md +75 -0
- package/llms/components/browser.md +67 -0
- package/llms/components/bubble.md +119 -0
- package/llms/components/button.md +199 -0
- package/llms/components/calendar.md +75 -0
- package/llms/components/card.md +135 -0
- package/llms/components/carousel.md +87 -0
- package/llms/components/chat-composer.md +126 -0
- package/llms/components/checkbox-card.md +98 -0
- package/llms/components/checkbox.md +90 -0
- package/llms/components/code-block.md +81 -0
- package/llms/components/code.md +62 -0
- package/llms/components/collapsible.md +83 -0
- package/llms/components/color-field.md +100 -0
- package/llms/components/combobox.md +119 -0
- package/llms/components/command-menu.md +158 -0
- package/llms/components/context-card.md +73 -0
- package/llms/components/context-menu.md +79 -0
- package/llms/components/data-table.md +99 -0
- package/llms/components/date-picker.md +97 -0
- package/llms/components/description.md +96 -0
- package/llms/components/destructive-action-modal.md +76 -0
- package/llms/components/dialog.md +127 -0
- package/llms/components/dots-menu.md +64 -0
- package/llms/components/empty-state.md +113 -0
- package/llms/components/entity.md +67 -0
- package/llms/components/feedback.md +63 -0
- package/llms/components/fieldset.md +106 -0
- package/llms/components/file-dropzone.md +103 -0
- package/llms/components/form.md +111 -0
- package/llms/components/gliding-highlight.md +84 -0
- package/llms/components/inline-status.md +62 -0
- package/llms/components/input.md +127 -0
- package/llms/components/kbd.md +57 -0
- package/llms/components/label.md +73 -0
- package/llms/components/marker.md +99 -0
- package/llms/components/marquee.md +66 -0
- package/llms/components/menu.md +122 -0
- package/llms/components/message-scroller.md +110 -0
- package/llms/components/message.md +114 -0
- package/llms/components/meter.md +124 -0
- package/llms/components/middle-truncate.md +62 -0
- package/llms/components/note.md +81 -0
- package/llms/components/notification-badge.md +67 -0
- package/llms/components/number-field.md +70 -0
- package/llms/components/otp-field.md +101 -0
- package/llms/components/page-header.md +76 -0
- package/llms/components/page-loader.md +67 -0
- package/llms/components/pagination.md +92 -0
- package/llms/components/panel-group.md +120 -0
- package/llms/components/panel-section.md +122 -0
- package/llms/components/phone.md +70 -0
- package/llms/components/pill.md +73 -0
- package/llms/components/popover.md +79 -0
- package/llms/components/progress.md +98 -0
- package/llms/components/radio-card.md +90 -0
- package/llms/components/radio.md +86 -0
- package/llms/components/relative-time.md +60 -0
- package/llms/components/scroller.md +88 -0
- package/llms/components/scrub-field.md +97 -0
- package/llms/components/search-input.md +84 -0
- package/llms/components/select.md +106 -0
- package/llms/components/separator.md +70 -0
- package/llms/components/settings-menu.md +139 -0
- package/llms/components/sheet.md +97 -0
- package/llms/components/show-more.md +59 -0
- package/llms/components/side-nav.md +106 -0
- package/llms/components/sidebar.md +87 -0
- package/llms/components/skeleton.md +62 -0
- package/llms/components/slider.md +114 -0
- package/llms/components/spinner.md +87 -0
- package/llms/components/status-bar.md +91 -0
- package/llms/components/status-dot.md +70 -0
- package/llms/components/stepper.md +125 -0
- package/llms/components/streaming-text.md +86 -0
- package/llms/components/switch.md +87 -0
- package/llms/components/table.md +112 -0
- package/llms/components/tabs.md +84 -0
- package/llms/components/textarea.md +88 -0
- package/llms/components/theme-selector.md +95 -0
- package/llms/components/theme-switcher.md +71 -0
- package/llms/components/thinking-orb.md +91 -0
- package/llms/components/toast.md +130 -0
- package/llms/components/toggle.md +95 -0
- package/llms/components/toolbar.md +168 -0
- package/llms/components/tooltip.md +93 -0
- package/llms/components/tree.md +227 -0
- package/llms/components/video.md +66 -0
- package/llms/components/workspace.md +138 -0
- package/llms/foundations/accessibility.md +60 -0
- package/llms/foundations/motion.md +96 -0
- package/llms/foundations/scrolling.md +41 -0
- package/llms/foundations/shape.md +73 -0
- package/llms/foundations/spacing.md +82 -0
- package/llms/foundations/surfaces.md +69 -0
- package/llms/foundations/typography.md +120 -0
- package/llms/layout/aspect-box.md +37 -0
- package/llms/layout/bleed.md +31 -0
- package/llms/layout/center.md +37 -0
- package/llms/layout/columns.md +51 -0
- package/llms/layout/grid-overlay.md +40 -0
- package/llms/layout/grid.md +47 -0
- package/llms/layout/page.md +39 -0
- package/llms/layout/region.md +49 -0
- package/llms/layout/row.md +40 -0
- package/llms/layout/safe-area.md +37 -0
- package/llms/layout/spacer.md +39 -0
- package/llms/layout/split-pane.md +41 -0
- package/llms/layout/stack.md +39 -0
- package/llms/patterns/auth-page.md +68 -0
- package/llms/patterns/brand-landing-page.md +423 -0
- package/llms/patterns/chat-panel.md +210 -0
- package/llms/patterns/dashboard-page.md +170 -0
- package/llms/patterns/feed-page.md +103 -0
- package/llms/patterns/landing-page.md +122 -0
- package/llms/patterns/list-detail-page.md +100 -0
- package/llms/patterns/settings-page.md +121 -0
- package/llms/reference/token-intent.md +324 -0
- package/llms/reference/utilities.md +129 -0
- package/llms/tasks/adding-a-component.md +113 -0
- package/llms/tasks/auditing-an-app.md +216 -0
- package/llms/tasks/building-a-page.md +109 -0
- package/llms/tasks/building-a-tool.md +141 -0
- package/llms/tasks/building-an-ios-prototype.md +105 -0
- package/llms/tasks/building-with-sable.md +73 -0
- package/llms/tasks/choosing-a-component.md +109 -0
- package/llms/tasks/converting-an-app.md +139 -0
- package/llms/tasks/creating-a-preset.md +43 -0
- package/llms/tasks/creating-design-assets.md +96 -0
- package/llms/tasks/designing-a-surface.md +115 -0
- package/llms/tasks/developing-taste.md +157 -0
- package/llms/tasks/getting-started.md +63 -0
- package/llms/tasks/learning-from-builds.md +74 -0
- package/llms/tasks/reviewing-a-design.md +114 -0
- package/llms/tasks/reviewing-a-journey.md +84 -0
- package/llms/tasks/reviewing-motion.md +92 -0
- package/llms/tasks/using-presets.md +87 -0
- package/llms/taste/asset-plan.template.json +53 -0
- package/llms/taste/composition-follows-content.md +20 -0
- package/llms/taste/hierarchy-is-a-relationship.md +22 -0
- package/llms/taste/lessons.json +57 -0
- package/llms/taste/motion-needs-a-reason.md +21 -0
- package/llms/taste/surface-states-travel-together.md +20 -0
- package/llms-full.txt +14906 -0
- package/llms.txt +405 -0
- package/package.json +185 -3
- package/registry.json +18812 -0
- package/scripts/agent-setup.mjs +54 -0
- package/scripts/design-atlas.mjs +221 -0
- package/scripts/design-directions.mjs +123 -0
- package/scripts/design-memory.mjs +166 -0
- package/scripts/design-preferences.mjs +227 -0
- package/scripts/design-presets.mjs +48 -0
- package/scripts/grade.mjs +509 -0
- package/scripts/lint-rules.mjs +1065 -0
- package/scripts/review-evidence.mjs +120 -0
- package/scripts/skeleton.mjs +248 -0
- package/skills/entry/SKILL.md +34 -0
- package/skills/sable/SKILL.md +187 -0
- package/skills/sable/agents/openai.yaml +6 -0
- package/targets/ios.json +982 -0
- package/third-party/reicon-LICENSE.txt +20 -0
package/README.md
CHANGED
|
@@ -1,3 +1,195 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Sable
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Sable** — a themeable React component system with layout patterns, semantic tokens and tools for coding agents. Default theme: **Base**. On npm as `@sableui/react`; docs and the live catalog at [sableui.com](https://www.sableui.com).
|
|
4
|
+
|
|
5
|
+
For a clickable iOS prototype (demos and presentations, not production), ask the
|
|
6
|
+
Sable skill to build with the iOS target. Every screen is Sable components in your
|
|
7
|
+
preset; the optional `@sableui/react/ios` adapter adds only the iOS system chrome
|
|
8
|
+
(status bar, navigation bar, tab bar, sheet presentation), drawn by the optional
|
|
9
|
+
`konsta` peer that the agent installs for that target. The prototype's document
|
|
10
|
+
imports Tailwind, Sable's styles, a preset, then `@sableui/react/ios/styles.css`.
|
|
11
|
+
Frame it with `PhoneFrame` from `@sableui/react/ios/preview`. See
|
|
12
|
+
[building an iOS prototype](llms/tasks/building-an-ios-prototype.md).
|
|
13
|
+
|
|
14
|
+
Original Sable code is [MIT licensed](./LICENSE).
|
|
15
|
+
|
|
16
|
+
The featured presets are Base (neutral), Meridian (square), Prism (compact technical),
|
|
17
|
+
Verdant (serif), Ember (warm), and Poppy (playful). Every preset supports light and
|
|
18
|
+
dark modes. Load its declared fonts and use `ThemeSelector` to offer preset choices.
|
|
19
|
+
[Third-party notices](./THIRD_PARTY_NOTICES.md) list the software and fonts used
|
|
20
|
+
in Sable.
|
|
21
|
+
|
|
22
|
+
- **Behavior:** [Base UI](https://base-ui.com) (`@base-ui/react`) — accessible primitives, isolated behind our own component APIs.
|
|
23
|
+
- **Styling:** Tailwind CSS v4 + semantic CSS-variable tokens; variants via `class-variance-authority`.
|
|
24
|
+
- **Icons:** Reicon by default, with a pluggable adapter for any icon package.
|
|
25
|
+
- **Motion:** a token-driven, zero-dependency motion layer (recipes, policy, browser-native primitives).
|
|
26
|
+
- **Themeable:** components reference semantic tokens only; a theme is a CSS variable set.
|
|
27
|
+
|
|
28
|
+
A broad product component catalog, a fluid layout foundation, and a pluggable icon adapter — see [`registry.json`](./registry.json).
|
|
29
|
+
|
|
30
|
+
## Taste, style, and variety
|
|
31
|
+
|
|
32
|
+
A project can keep its own visual atlas at `.sable/atlas/atlas.json`: annotated
|
|
33
|
+
desktop, mobile and interaction captures with conditional transfer principles and
|
|
34
|
+
cautions. `sable atlas --search` retrieves contextual examples from it and `--show`
|
|
35
|
+
returns verified local image paths, which an agent must actually view. The package
|
|
36
|
+
ships no atlas; without one, work from the brief and the user's references.
|
|
37
|
+
|
|
38
|
+
When alternatives materially affect the brief, keep content and behavior fixed while
|
|
39
|
+
rendering bounded directions with meaningful differences in composition, typography,
|
|
40
|
+
density, imagery, story, or purposeful motion. `sable explore --check design/directions.json`
|
|
41
|
+
checks the specification and capture hashes; `--compare` creates an offline
|
|
42
|
+
comparison with anonymous labels and an explicit choice or tie. It exports a
|
|
43
|
+
review record for `sable prefer --record`. Preferences live in the consuming
|
|
44
|
+
project's `.sable/preferences/`, are scoped to a project, brand, person, or task,
|
|
45
|
+
and distinguish an actual human judgment from an agent observation. Human-only
|
|
46
|
+
retrieval is the default. These tools do not update model weights. See
|
|
47
|
+
`sable docs developing-taste` for the complete workflow.
|
|
48
|
+
|
|
49
|
+
## Install & setup
|
|
50
|
+
|
|
51
|
+
> **Agents:** the machine-readable version of these steps is the `consume` block in [`registry.json`](./registry.json).
|
|
52
|
+
|
|
53
|
+
**1. Install:**
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
pnpm add @sableui/react
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**2. Dedupe React**, or Base UI resolves a second copy → "invalid hook call". Vite:
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
// vite.config.ts
|
|
63
|
+
export default defineConfig({ resolve: { dedupe: ["react", "react-dom"] } })
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**3. CSS** (order matters), in your root stylesheet:
|
|
67
|
+
|
|
68
|
+
```css
|
|
69
|
+
@import "tailwindcss";
|
|
70
|
+
@import "@sableui/react/styles.css";
|
|
71
|
+
/* let Tailwind scan the package for the classes its components use */
|
|
72
|
+
@source "../node_modules/@sableui/react/dist/**/*.{js,mjs}";
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**4. Fonts** — the default theme expects **Figtree** (sans) + **DM Mono** (mono). Each alternate preset declares its own families in its manifest (`registry.json → themes.available[].fonts`). Load whichever stacks you plan to use via `<link>` or `@font-face`; the theme manifests declare the stacks but ship no font files.
|
|
76
|
+
|
|
77
|
+
**5. Providers + color mode / theme selection:**
|
|
78
|
+
|
|
79
|
+
```tsx
|
|
80
|
+
import {
|
|
81
|
+
IconProvider,
|
|
82
|
+
MotionProvider,
|
|
83
|
+
SableThemeProvider,
|
|
84
|
+
ThemeSelector,
|
|
85
|
+
ThemeSwitcher,
|
|
86
|
+
useSableTheme,
|
|
87
|
+
} from "@sableui/react"
|
|
88
|
+
import { reiconIconSet } from "@sableui/react/icons/reicon"
|
|
89
|
+
|
|
90
|
+
function ThemeControls() {
|
|
91
|
+
const { preference, setPreference, themeId, themes, setThemeId, mode } = useSableTheme()
|
|
92
|
+
|
|
93
|
+
return (
|
|
94
|
+
<>
|
|
95
|
+
<ThemeSelector value={themeId} onValueChange={setThemeId} themes={themes} mode={mode} />
|
|
96
|
+
<ThemeSwitcher value={preference} onValueChange={setPreference} />
|
|
97
|
+
</>
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
<IconProvider set={reiconIconSet}> {/* optional — omit for Reicon, or pass another icon set */}
|
|
102
|
+
<MotionProvider> {/* optional — enables the motion on/off toggle */}
|
|
103
|
+
<SableThemeProvider> {/* optional, recommended when users can switch themes */}
|
|
104
|
+
<App />
|
|
105
|
+
</SableThemeProvider>
|
|
106
|
+
</MotionProvider>
|
|
107
|
+
</IconProvider>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Components render Reicon icons out of the box. To replace Reicon, mount `<IconProvider set={yourIconSet}>`; to add domain icons, use `composeIconSets(appExtras, reiconIconSet)`. Both helpers and the `IconSet` type are exported from Sable. A set returns `null` for names it does not handle. `fallbackIconSet` remains a deprecated alias of Reicon for compatibility. `SableThemeProvider` is the preferred route for user-facing theme switching: it stores the user's color preference (`light` / `dark` / `system`), toggles the **`.dark` class**, stores the active design theme, and writes **`data-sable-theme`** for non-default themes. If your app already owns this state, use `applySableColorMode()` / `applySableTheme()` or the exported `SABLE_THEME_ATTRIBUTE` constant directly. You do **not** need a Tailwind `@custom-variant dark` for Sable itself — add one (`@custom-variant dark (&:where(.dark, .dark *));`) only if **your own** app code uses `dark:` utilities (Sable ships none).
|
|
111
|
+
|
|
112
|
+
**6. Use it:**
|
|
113
|
+
|
|
114
|
+
```tsx
|
|
115
|
+
import { Button, Card, Carousel, Dialog } from "@sableui/react"
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## The CLI
|
|
119
|
+
|
|
120
|
+
Two binaries ship with the package, both zero-dependency and both reading the contract from the version you actually installed:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
npx sable pattern --list # the eight canonical page shells
|
|
124
|
+
npx sable pattern DashboardPage --skeleton # its composition tree — 127 lines of source, 45 of structure
|
|
125
|
+
npx sable component Button --props
|
|
126
|
+
npx sable search "date range" # one ranked set across components, patterns, layout, tokens, docs
|
|
127
|
+
npx sable doctor # is this project wired correctly? exits 1 if not
|
|
128
|
+
npx sable docs designing-a-surface # brief, direction, composition, interaction, adaptation
|
|
129
|
+
npx sable docs developing-taste # references, rendered directions, scoped judgment
|
|
130
|
+
npx sable atlas --search "editorial culture" --contrast --limit 3 --json # a project's own atlas, if it has one
|
|
131
|
+
npx sable explore --template # specification for three rendered alternatives
|
|
132
|
+
npx sable prefer --search "reading" --scope project:my-app --json
|
|
133
|
+
npx sable learn --search "editorial hierarchy" --json
|
|
134
|
+
npx sable grade src --json # code conformance; pattern similarity is descriptive
|
|
135
|
+
npx sable grade --template # evidence record for a rendered design review
|
|
136
|
+
npx sable-lint # run the design contract over ./src
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
`registry.json` is about 1 MB and `llms-full.txt` about 800 KB — complete, and larger than any working context. `sable` serves the same generated content a piece at a time: `--detail brief|compact|full` picks a size, `--dense` drops prose, and `--json` wraps everything in a `{ type, data }` envelope with a stable discriminator. Errors carry a stable `code` plus concrete `suggestions`, so a misspelled name costs one call instead of a guess. `npx sable manifest --json` describes the whole surface, generated from the same table that drives `--help`.
|
|
140
|
+
|
|
141
|
+
Design quality needs a rendered review. Start from the surface brief, reuse a
|
|
142
|
+
canonical composition when it fits, or build an original one from layout
|
|
143
|
+
primitives. Inspect desktop/mobile, the primary flow, keyboard behavior, and
|
|
144
|
+
reduced motion; `sable docs reviewing-a-design` explains the evidence format.
|
|
145
|
+
`sable grade src --review design/review.json --strict` validates conformance and
|
|
146
|
+
recorded review completeness. It does not independently judge the images.
|
|
147
|
+
|
|
148
|
+
`sable learn` reads packaged precedents and project-owned `.sable/lessons/` without
|
|
149
|
+
a plugin or network. Each lesson states when to apply it, when to avoid it, and
|
|
150
|
+
where its evidence came from. Use `sable learn --template`, fill observed
|
|
151
|
+
before/after evidence, and `sable learn --record design/lesson.json` to preserve a
|
|
152
|
+
provisional local lesson. Package upgrades never overwrite project memory. See
|
|
153
|
+
`sable docs learning-from-builds` for the full loop.
|
|
154
|
+
|
|
155
|
+
## Documentation
|
|
156
|
+
|
|
157
|
+
- **[AGENTS.md](./AGENTS.md)** — how to build with Sable: wiring, the rules for code you write, customizing (read first).
|
|
158
|
+
- **[CONTRIBUTING.md](./CONTRIBUTING.md)** — changing the package: hard rules, adding a component, theme/icon/motion contracts.
|
|
159
|
+
- **[DESIGN.md](./DESIGN.md)** — the design-system spec (tokens, type, grid, motion).
|
|
160
|
+
- **[registry.json](./registry.json)** / **[llms.txt](./llms.txt)** — machine-readable catalog + the `consume` recipe. Component entries include props, variants, tokens, a11y notes, copy-pasteable examples, and AI-readable usage guidance with do/don'ts, anatomy, keywords, and related components.
|
|
161
|
+
|
|
162
|
+
## Build & publish
|
|
163
|
+
|
|
164
|
+
In the workspace the package is consumed as **source** (`exports` point at `./src`) for instant HMR — no build needed for local dev. To produce the publishable artifact:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
pnpm --filter @sableui/react build # regenerates registry.json from the metas → tsup → dist/ (ESM + .d.ts) → copies the token CSS
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
> Requires **Node 22+** (the registry generator imports the `.meta.ts` files via Node's built-in TypeScript type-stripping). `registry.json` is generated from each component's `*.meta.ts`; CI's `pnpm registry:check` fails the build if it drifts.
|
|
171
|
+
|
|
172
|
+
`publishConfig.exports` repoints consumers at `./dist` on publish (workspace dev keeps `./src`). Publishing is automated — push a `v*` tag and the repo's **Release** GitHub Action publishes to npm with provenance (see the repo-root README).
|
|
173
|
+
|
|
174
|
+
## Requirements
|
|
175
|
+
|
|
176
|
+
- React 19 (peer), React DOM 19 (peer), Tailwind CSS v4 in the consuming app.
|
|
177
|
+
|
|
178
|
+
## Build with an agent
|
|
179
|
+
|
|
180
|
+
After installing Sable, run `pnpm exec sable setup --agent` in the target
|
|
181
|
+
project. It installs discoverable entry files in `.agents/skills/sable` for
|
|
182
|
+
Codex/Cursor and `.claude/skills/sable` for Claude Code; `--target` selects a host.
|
|
183
|
+
Each entry resolves `skills/sable/SKILL.md` from the installed package, so package
|
|
184
|
+
upgrades also update the workflow. Other agents can read that file directly.
|
|
185
|
+
Use `$sable build <idea>`, `inspire <references>`, `audit <target>`, or
|
|
186
|
+
`polish <target>` in Codex; use `/sable` with the same modes in Claude Code or
|
|
187
|
+
Cursor. `create` is a build alias. These are agent modes, not shell commands.
|
|
188
|
+
|
|
189
|
+
Upgrade with `pnpm update @sableui/react --latest`, then
|
|
190
|
+
`pnpm exec sable setup --agent --update`. Setup only replaces managed files
|
|
191
|
+
that have not been locally edited; `--dry-run` checks without writing. Keep
|
|
192
|
+
project preferences in project instructions. Package installation alone does not
|
|
193
|
+
change agent settings. See [building-with-sable.md](./llms/tasks/building-with-sable.md),
|
|
194
|
+
[creating-a-preset.md](./llms/tasks/creating-a-preset.md), and
|
|
195
|
+
[using-presets.md](./llms/tasks/using-presets.md).
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Credits and license
|
|
2
|
+
|
|
3
|
+
Sable's original source is [MIT licensed](https://opensource.org/license/mit).
|
|
4
|
+
Third-party software, fonts, and trademarks retain their own terms.
|
|
5
|
+
|
|
6
|
+
## Software
|
|
7
|
+
|
|
8
|
+
| Project | License | Role |
|
|
9
|
+
| --- | --- | --- |
|
|
10
|
+
| [Base UI](https://github.com/mui/base-ui) | MIT | Accessible behavior primitives |
|
|
11
|
+
| [Class Variance Authority](https://github.com/joe-bell/cva) | Apache-2.0 | Component variants |
|
|
12
|
+
| [clsx](https://github.com/lukeed/clsx) | MIT | Class composition |
|
|
13
|
+
| [date-fns](https://github.com/date-fns/date-fns) | MIT | Date helpers |
|
|
14
|
+
| [React DayPicker](https://github.com/gpbl/react-day-picker) | MIT | Calendar behavior |
|
|
15
|
+
| [tailwind-merge](https://github.com/dcastil/tailwind-merge) | MIT | Class merging |
|
|
16
|
+
| [React](https://github.com/facebook/react) | MIT | Component runtime |
|
|
17
|
+
| [Reicon](https://github.com/dqev/reicon) | MIT | Default interface icons and bundled brand icons |
|
|
18
|
+
| [Konsta UI](https://github.com/konstaui/konsta) | MIT | Optional native controls for iOS prototypes |
|
|
19
|
+
|
|
20
|
+
Library dependencies are external to Sable's library build and carry their
|
|
21
|
+
license notices in their distributions.
|
|
22
|
+
|
|
23
|
+
## Brand icons
|
|
24
|
+
|
|
25
|
+
The 23 bundled brand marks come from `reicon-brands` 1.0.2. Sable normalizes them
|
|
26
|
+
to a 24-unit grid and removes fixed colors. Copyright 2025 REICON; the complete
|
|
27
|
+
MIT notice is included in the package as `third-party/reicon-LICENSE.txt` and
|
|
28
|
+
available on this site as the [Reicon license](/licenses/reicon.txt).
|
|
29
|
+
|
|
30
|
+
The software license does not grant trademark rights. Follow each brand's usage
|
|
31
|
+
guidelines when displaying its mark.
|
|
32
|
+
|
|
33
|
+
## Fonts
|
|
34
|
+
|
|
35
|
+
Presets declare font stacks; applications load the font files. The featured
|
|
36
|
+
presets use Figtree, DM Mono, Instrument Sans, Geist Mono, Outfit, Playfair Display,
|
|
37
|
+
Roboto Mono, IBM Plex Mono, Inter, Instrument Serif, Work Sans, Albert Sans,
|
|
38
|
+
Unbounded, and Red Hat Mono. The documentation also offers Josefin Slab,
|
|
39
|
+
IBM Plex Sans, Martian Mono and Sora in its font picker. These families are
|
|
40
|
+
available through [Google Fonts](https://fonts.google.com/) under their respective
|
|
41
|
+
font licenses.
|
|
42
|
+
|
|
43
|
+
Self-hosted repository fonts retain adjacent OFL notices; include those notices
|
|
44
|
+
when redistributing the font files.
|
|
Binary file
|