@leitware/composables 1.3.3 → 1.4.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/README.md +37 -0
- package/dist/presets/brutalist.css +5 -1
- package/dist/presets/default.css +4 -0
- package/dist/presets/signal-pop.css +4 -0
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +8 -0
- package/package.json +2 -1
- package/rules/composables.md +9 -7
- package/skills/use-composables/references/public-api.md +7 -2
- package/skills/use-composables/references/semantic-utilities.md +2 -0
- package/src/_internal/ai-elements/chain-of-thought.tsx +1 -1
- package/src/_internal/badge.tsx +2 -2
- package/src/_internal/button.tsx +1 -1
- package/src/_internal/calendar.tsx +1 -1
- package/src/_internal/checkbox.tsx +1 -1
- package/src/_internal/combobox.tsx +3 -3
- package/src/_internal/command.tsx +3 -3
- package/src/_internal/dropdown-menu.tsx +2 -2
- package/src/_internal/dropzone.tsx +3 -3
- package/src/_internal/field.tsx +2 -2
- package/src/_internal/grid-overlay.tsx +2 -2
- package/src/_internal/input-group.tsx +1 -1
- package/src/_internal/input.tsx +1 -1
- package/src/_internal/layout-bento.tsx +1 -1
- package/src/_internal/marker.tsx +1 -1
- package/src/_internal/radio-group.tsx +2 -2
- package/src/_internal/resizable.tsx +1 -1
- package/src/_internal/select.tsx +5 -2
- package/src/_internal/sidebar.tsx +2 -2
- package/src/_internal/switch.tsx +1 -1
- package/src/_internal/tabs.tsx +2 -2
- package/src/_internal/textarea.tsx +1 -1
- package/src/_internal/tooltip.tsx +1 -1
- package/src/index.ts +4 -0
- package/src/opinionated/blocks/content.tsx +247 -0
- package/src/opinionated/blocks/features.tsx +242 -0
- package/src/opinionated/blocks/heroes.tsx +711 -0
- package/src/opinionated/blocks/index.ts +4 -0
- package/src/opinionated/blocks/shared.tsx +185 -0
- package/src/opinionated/button.tsx +2 -0
- package/src/opinionated/collapsible.tsx +1 -1
- package/src/opinionated/form-calendar-popover.tsx +1 -1
- package/src/opinionated/form-checkbox.tsx +1 -1
- package/src/opinionated/form-combobox.tsx +1 -1
- package/src/opinionated/form-date-of-birth.tsx +1 -1
- package/src/opinionated/form-dropzone.tsx +1 -1
- package/src/opinionated/form-input-group.tsx +1 -1
- package/src/opinionated/form-input.tsx +1 -1
- package/src/opinionated/form-multi-combobox.tsx +1 -1
- package/src/opinionated/form-multi-dropzone.tsx +1 -1
- package/src/opinionated/form-radiogroup.tsx +1 -1
- package/src/opinionated/form-select.tsx +1 -1
- package/src/opinionated/form-slider.tsx +1 -1
- package/src/opinionated/form-switch.tsx +1 -1
- package/src/opinionated/form-textarea.tsx +1 -1
- package/src/opinionated/token-config-panel/color-editor.tsx +1 -1
- package/src/opinionated/token-config-panel/json-import-export.tsx +1 -1
- package/src/opinionated/window-frame.tsx +57 -0
- package/src/styles/presets/brutalist.css +5 -1
- package/src/styles/presets/default.css +4 -0
- package/src/styles/presets/signal-pop.css +4 -0
- package/src/styles/presets-data/brutalist.ts +5 -1
- package/src/styles/presets-data/default.ts +4 -0
- package/src/styles/presets-data/signal-pop.ts +4 -0
- package/src/styles/tokens/components.css +1 -0
- package/src/styles/tokens/registry.ts +15 -1
- package/src/styles/tokens/semantic-utilities.css +8 -0
- package/src/styles/tokens/semantic.css +5 -1
- package/src/styles/tokens/tailwind-color-adapter.css +3 -1
- package/src/styles/tokens/tailwind-public-utilities.css +8 -0
package/README.md
CHANGED
|
@@ -134,6 +134,43 @@ import { AIMessage, AIPromptInput } from '@leitware/composables/ai'
|
|
|
134
134
|
|
|
135
135
|
The AI libraries remain optional peer dependencies because they are a materially larger, specialised integration surface. Applications that do not import `@leitware/composables/ai` do not need to install or configure them. If you use that entrypoint, install its optional peers; see the table below.
|
|
136
136
|
|
|
137
|
+
### Page blocks
|
|
138
|
+
|
|
139
|
+
The 26 page blocks cover heroes, content, features, calls to action, a bento grid, and a testimonial. They are available from the root entrypoint or the focused `/blocks` entrypoint:
|
|
140
|
+
|
|
141
|
+
```tsx
|
|
142
|
+
import { Hero06, Cta01 } from '@leitware/composables/blocks'
|
|
143
|
+
|
|
144
|
+
export function LandingPage() {
|
|
145
|
+
return (
|
|
146
|
+
<>
|
|
147
|
+
<Hero06
|
|
148
|
+
title="Build together,"
|
|
149
|
+
highlight="from one place."
|
|
150
|
+
description="A clear workspace for your team."
|
|
151
|
+
primaryCTA={{ text: 'Get started', link: '/start' }}
|
|
152
|
+
/>
|
|
153
|
+
<Cta01
|
|
154
|
+
title="Ready to begin?"
|
|
155
|
+
description="Make your next idea real."
|
|
156
|
+
cta={{ text: 'Start now', link: '/start' }}
|
|
157
|
+
/>
|
|
158
|
+
</>
|
|
159
|
+
)
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Each block accepts content as typed props and supports `className`; most also accept `variant` and `animation`. Run `bun run dev` and open `/blocks` for an individual preview of every block.
|
|
164
|
+
|
|
165
|
+
The desktop-style preview chrome is also available on its own:
|
|
166
|
+
|
|
167
|
+
```tsx
|
|
168
|
+
import { WindowFrame } from '@leitware/composables'
|
|
169
|
+
;<WindowFrame title="Project overview" toolbar={<span>Workspace</span>}>
|
|
170
|
+
<div>Dashboard content</div>
|
|
171
|
+
</WindowFrame>
|
|
172
|
+
```
|
|
173
|
+
|
|
137
174
|
### Consumer agent skill
|
|
138
175
|
|
|
139
176
|
The npm package includes a `use-composables` agent skill at `skills/use-composables/SKILL.md`. Install or point your coding agent at that directory to give it the package workflow, semantic-styling rules, exact public entrypoints, and optional-dependency guidance. Its utility manifest is generated from the token registry by `bun scripts/generate-css.ts`; its public API manifest is generated from package metadata and public barrels by `bun scripts/generate-rules.ts`. Both generators support `--check`, keeping agent guidance aligned with the shipped contract.
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
--bg-surface-default: #ffffffff;
|
|
17
17
|
--bg-surface-popover: #ffffffff;
|
|
18
18
|
--bg-surface-accent: #f0f0f0ff;
|
|
19
|
+
--bg-surface-field: #0a0a0aff;
|
|
19
20
|
--bg-surface-info: #e8f0f8ff;
|
|
20
21
|
--bg-surface-success: #e8f4e8ff;
|
|
21
22
|
--bg-surface-warning: #fbf4e0ff;
|
|
@@ -51,6 +52,7 @@
|
|
|
51
52
|
--text-disabled: #aaaaaaff;
|
|
52
53
|
--text-inverse: #f8f8f8ff;
|
|
53
54
|
--text-on-fill-primary: #ffffffff;
|
|
55
|
+
--text-on-fill-brand: #ffffffff;
|
|
54
56
|
--text-on-fill-secondary: #0a0a0aff;
|
|
55
57
|
--text-on-surface-accent: #0a0a0aff;
|
|
56
58
|
--text-info: #001e5eff;
|
|
@@ -191,12 +193,13 @@
|
|
|
191
193
|
--bg-surface-default: #0a0a0aff;
|
|
192
194
|
--bg-surface-popover: #141414ff;
|
|
193
195
|
--bg-surface-accent: #1a1a1aff;
|
|
196
|
+
--bg-surface-field: #c0c0c0ff;
|
|
194
197
|
--bg-surface-info: #0a1828ff;
|
|
195
198
|
--bg-surface-success: #0a180aff;
|
|
196
199
|
--bg-surface-warning: #1e1406ff;
|
|
197
200
|
--bg-surface-critical: #1e0a0aff;
|
|
198
201
|
--bg-surface-emphasis: #0a0a1eff;
|
|
199
|
-
--bg-surface-inverse: #
|
|
202
|
+
--bg-surface-inverse: #888888ff;
|
|
200
203
|
--bg-surface-transparent: #ffffff10;
|
|
201
204
|
--bg-overlay: var(--overlays-black-alpha-800);
|
|
202
205
|
--bg-surface-brand: #1e0a08ff;
|
|
@@ -226,6 +229,7 @@
|
|
|
226
229
|
--text-disabled: #444444ff;
|
|
227
230
|
--text-inverse: #0a0a0aff;
|
|
228
231
|
--text-on-fill-primary: #0a0a0aff;
|
|
232
|
+
--text-on-fill-brand: #000000ff;
|
|
229
233
|
--text-on-fill-secondary: #f0f0f0ff;
|
|
230
234
|
--text-on-surface-accent: #f0f0f0ff;
|
|
231
235
|
--text-info: #99bbffff;
|
package/dist/presets/default.css
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
--bg-surface-default: #f9f9f8ff;
|
|
17
17
|
--bg-surface-popover: #f9f9f8ff;
|
|
18
18
|
--bg-surface-accent: #f1f0efff;
|
|
19
|
+
--bg-surface-field: #dad9d6ff;
|
|
19
20
|
--bg-surface-info: #f1fafdff;
|
|
20
21
|
--bg-surface-success: #f5fbf5ff;
|
|
21
22
|
--bg-surface-warning: #fff7edff;
|
|
@@ -51,6 +52,7 @@
|
|
|
51
52
|
--text-disabled: #cfcecaff;
|
|
52
53
|
--text-inverse: #ffffffff;
|
|
53
54
|
--text-on-fill-primary: #ffffffff;
|
|
55
|
+
--text-on-fill-brand: #000000ff;
|
|
54
56
|
--text-on-fill-secondary: #21201cff;
|
|
55
57
|
--text-on-surface-accent: #21201cff;
|
|
56
58
|
--text-info: #1d3e56ff;
|
|
@@ -191,6 +193,7 @@
|
|
|
191
193
|
--bg-surface-default: #191918ff;
|
|
192
194
|
--bg-surface-popover: #191918ff;
|
|
193
195
|
--bg-surface-accent: #222221ff;
|
|
196
|
+
--bg-surface-field: #494844ff;
|
|
194
197
|
--bg-surface-info: #111a27ff;
|
|
195
198
|
--bg-surface-success: #141a15ff;
|
|
196
199
|
--bg-surface-warning: #1e160fff;
|
|
@@ -226,6 +229,7 @@
|
|
|
226
229
|
--text-disabled: #494844ff;
|
|
227
230
|
--text-inverse: #000000ff;
|
|
228
231
|
--text-on-fill-primary: #000000ff;
|
|
232
|
+
--text-on-fill-brand: #000000ff;
|
|
229
233
|
--text-on-fill-secondary: #eeeeecff;
|
|
230
234
|
--text-on-surface-accent: #eeeeecff;
|
|
231
235
|
--text-info: #c2f3ffff;
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
--bg-surface-default: #ffffffff;
|
|
17
17
|
--bg-surface-popover: #ffffffff;
|
|
18
18
|
--bg-surface-accent: #ff8bd3ff;
|
|
19
|
+
--bg-surface-field: #e8eef2ff;
|
|
19
20
|
--bg-surface-info: #d7f0faff;
|
|
20
21
|
--bg-surface-success: #def6d8ff;
|
|
21
22
|
--bg-surface-warning: #ffe8b5ff;
|
|
@@ -51,6 +52,7 @@
|
|
|
51
52
|
--text-disabled: #b9bdc6ff;
|
|
52
53
|
--text-inverse: #f9faf2ff;
|
|
53
54
|
--text-on-fill-primary: #ffffffff;
|
|
55
|
+
--text-on-fill-brand: #ffffffff;
|
|
54
56
|
--text-on-fill-secondary: #050507ff;
|
|
55
57
|
--text-on-surface-accent: #0b0b0fff;
|
|
56
58
|
--text-info: #064864ff;
|
|
@@ -202,6 +204,7 @@
|
|
|
202
204
|
--bg-surface-default: #050507ff;
|
|
203
205
|
--bg-surface-popover: #050507ff;
|
|
204
206
|
--bg-surface-accent: #351026ff;
|
|
207
|
+
--bg-surface-field: #17191fff;
|
|
205
208
|
--bg-surface-info: #073348ff;
|
|
206
209
|
--bg-surface-success: #0b3017ff;
|
|
207
210
|
--bg-surface-warning: #342602ff;
|
|
@@ -237,6 +240,7 @@
|
|
|
237
240
|
--text-disabled: #5b606aff;
|
|
238
241
|
--text-inverse: #050507ff;
|
|
239
242
|
--text-on-fill-primary: #ffffffff;
|
|
243
|
+
--text-on-fill-brand: #ffffffff;
|
|
240
244
|
--text-on-fill-secondary: #050507ff;
|
|
241
245
|
--text-on-surface-accent: #f7f8f2ff;
|
|
242
246
|
--text-info: #9fdef2ff;
|