foldkit-mixins 0.2.0 → 0.3.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 +236 -121
- package/dist/index.d.mts +33 -11
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +50 -21
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,21 +1,51 @@
|
|
|
1
1
|
# foldkit-mixins
|
|
2
2
|
|
|
3
|
-
Typed
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
3
|
+
Typed extension points for Foldkit views.
|
|
4
|
+
|
|
5
|
+
A component eventually gets used somewhere its author did not anticipate. One caller wants a
|
|
6
|
+
brand treatment, another wants a tooltip, another wants analytics, another needs an ARIA
|
|
7
|
+
attribute or a `ResizeObserver`. The usual answers are to keep adding props or to copy the
|
|
8
|
+
component and edit its markup.
|
|
9
|
+
|
|
10
|
+
`foldkit-mixins` takes a different approach:
|
|
11
|
+
|
|
12
|
+
> **A view declares where it may be customized once. Callers attach appearance and
|
|
13
|
+
> element-level behavior to those named points later.**
|
|
14
|
+
|
|
15
|
+
The view keeps its markup, state and Messages. The caller gets a typed customization surface
|
|
16
|
+
instead of an open-ended bag of props.
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
Without a slot contract With a slot contract
|
|
20
|
+
|
|
21
|
+
Button Button
|
|
22
|
+
├─ className ├─ root slot
|
|
23
|
+
├─ iconClassName ├─ icon slot
|
|
24
|
+
├─ tooltip └─ label slot
|
|
25
|
+
├─ tracking
|
|
26
|
+
├─ ariaLabelOverride callers attach independently:
|
|
27
|
+
├─ onFocusDecoration ├─ BrandStyle
|
|
28
|
+
└─ ... ├─ TooltipBehavior
|
|
29
|
+
└─ AnalyticsBehavior
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
This is not a second component system and it is not a state library. A slot ultimately resolves
|
|
33
|
+
to ordinary Foldkit attributes.
|
|
34
|
+
|
|
35
|
+
## The mental model
|
|
36
|
+
|
|
37
|
+
There are five ideas to learn:
|
|
38
|
+
|
|
39
|
+
| Concept | Meaning |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| **Slot** | A named extension point in a view: `root`, `input`, `label`, `trigger`, ... |
|
|
42
|
+
| **Slots** | The contract describing which extension points exist and what each permits. |
|
|
43
|
+
| **Style** | Appearance attached to a slot: classes, inline declarations and compiled CSS rules. |
|
|
44
|
+
| **Behavior** | Element-level interaction attached to a slot: attributes and an optional Foldkit `Mount`. Never application state. |
|
|
45
|
+
| **SlotView** | A pure Foldkit view that renders those slots and resolves attached Style/Behavior. |
|
|
46
|
+
|
|
47
|
+
`Style` and `Behavior` both compile to a `Mixin`. The resolver combines their contributions and
|
|
48
|
+
rejects ambiguous ownership instead of silently choosing a winner.
|
|
19
49
|
|
|
20
50
|
```text
|
|
21
51
|
Slots contract
|
|
@@ -24,29 +54,44 @@ ordinary array of Foldkit attributes, so nothing new runs at runtime.
|
|
|
24
54
|
Style Behavior
|
|
25
55
|
appearance interaction
|
|
26
56
|
│ │
|
|
27
|
-
|
|
57
|
+
└───────────┬───────────┘
|
|
28
58
|
▼
|
|
29
59
|
Mixin
|
|
30
|
-
|
|
60
|
+
│
|
|
61
|
+
▼
|
|
62
|
+
resolver
|
|
31
63
|
│
|
|
32
64
|
▼
|
|
33
65
|
ordinary Foldkit attributes
|
|
34
66
|
```
|
|
35
67
|
|
|
68
|
+
## Why not just `className` and props?
|
|
69
|
+
|
|
70
|
+
A class name says only "append this string." A slot is a **typed public customization point**.
|
|
71
|
+
It can say:
|
|
72
|
+
|
|
73
|
+
- this point is a text input rather than an arbitrary element;
|
|
74
|
+
- it publishes `input` but not `click`;
|
|
75
|
+
- callers may set `aria-invalid` but may not replace the structural `role`;
|
|
76
|
+
- this point is internal and cannot be targeted publicly;
|
|
77
|
+
- two independent behaviors may not both own the same event.
|
|
78
|
+
|
|
79
|
+
That matters once a design system, a feature, accessibility logic and product-specific behavior
|
|
80
|
+
all need to customize the same view without knowing about each other.
|
|
81
|
+
|
|
36
82
|
## Use it when
|
|
37
83
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
84
|
+
Use mixins when a view should be restyled or decorated **where it is used**, not only where it is
|
|
85
|
+
defined, and you want those customizations checked.
|
|
86
|
+
|
|
87
|
+
Typical examples are a design system styling a feature component, a tooltip attached by a caller,
|
|
88
|
+
analytics on an existing action, ARIA decoration, a focus trap, a `ResizeObserver`, keyboard
|
|
89
|
+
behavior, or a reusable visual recipe.
|
|
44
90
|
|
|
45
|
-
**Not for state.** A
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
here — a Behavior that "needs state" is a signal to reach for a Submodel.
|
|
91
|
+
**Not for state.** A widget's open/selected/value belongs in a Foldkit Model or Submodel. A
|
|
92
|
+
transition is `update`; a network call is Message → Command; an element-scoped effect is a
|
|
93
|
+
`Mount`. A Behavior that "needs state" is a signal to reach for a Submodel, not to hide an atom
|
|
94
|
+
inside the mixin.
|
|
50
95
|
|
|
51
96
|
## Install
|
|
52
97
|
|
|
@@ -54,11 +99,14 @@ here — a Behavior that "needs state" is a signal to reach for a Submodel.
|
|
|
54
99
|
pnpm add foldkit-mixins
|
|
55
100
|
```
|
|
56
101
|
|
|
57
|
-
`foldkit` and `effect` are peer dependencies. `foldkit-mixins-surface` bridges a
|
|
58
|
-
|
|
102
|
+
`foldkit` and `effect` are peer dependencies. `foldkit-mixins-surface` bridges a Surface
|
|
103
|
+
projection, and `foldkit-mixins-ui` adapts `@foldkit/ui` components.
|
|
59
104
|
|
|
60
105
|
## Quick start
|
|
61
106
|
|
|
107
|
+
The component author publishes the extension points. Style and Behavior can then be authored
|
|
108
|
+
elsewhere and attached by the caller.
|
|
109
|
+
|
|
62
110
|
```ts
|
|
63
111
|
import { Schema } from 'effect'
|
|
64
112
|
import { defineMessageUnion } from 'foldkit/message'
|
|
@@ -69,7 +117,7 @@ type Message = typeof Message.Type
|
|
|
69
117
|
|
|
70
118
|
type FieldInput = { readonly value: string; readonly invalid: boolean }
|
|
71
119
|
|
|
72
|
-
// 1. The
|
|
120
|
+
// 1. The component author publishes the extension points it supports.
|
|
73
121
|
const FieldSlots = Slots.define({
|
|
74
122
|
root: Slot.make({ capability: Capability.Container }),
|
|
75
123
|
input: Slot.make({
|
|
@@ -79,13 +127,13 @@ const FieldSlots = Slots.define({
|
|
|
79
127
|
}),
|
|
80
128
|
})
|
|
81
129
|
|
|
82
|
-
// 2. Appearance
|
|
130
|
+
// 2. Appearance can live in a design system or another module.
|
|
83
131
|
const FieldStyle = Style.forSlots(FieldSlots)({
|
|
84
132
|
root: Style.compose(Style.class('field'), Style.inline({ display: 'grid' })),
|
|
85
133
|
input: Style.class('field-input'),
|
|
86
134
|
})
|
|
87
135
|
|
|
88
|
-
// 3.
|
|
136
|
+
// 3. Element-level behavior can be authored independently.
|
|
89
137
|
const Validation = Behavior.forSlots(FieldSlots)<FieldInput, Message>({
|
|
90
138
|
input: Behavior.slot({
|
|
91
139
|
requires: { capability: Capability.TextInput, attributes: [Attr.AriaInvalid] },
|
|
@@ -93,8 +141,8 @@ const Validation = Behavior.forSlots(FieldSlots)<FieldInput, Message>({
|
|
|
93
141
|
}),
|
|
94
142
|
})
|
|
95
143
|
|
|
96
|
-
// 4. The view
|
|
97
|
-
//
|
|
144
|
+
// 4. The pure view renders through the slots. Attachments return a new view;
|
|
145
|
+
// the original view is unchanged.
|
|
98
146
|
const Field = SlotView.forMessages<Message>()
|
|
99
147
|
.define(FieldSlots, (input: FieldInput, slots, h) =>
|
|
100
148
|
h.label(slots.root.attrs(), [
|
|
@@ -109,58 +157,72 @@ const Field = SlotView.forMessages<Message>()
|
|
|
109
157
|
.pipe(Style.attach(FieldStyle), Behavior.attach(Validation))
|
|
110
158
|
```
|
|
111
159
|
|
|
112
|
-
`slots.input.attrs(base)` returns the base attributes plus every
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
160
|
+
`slots.input.attrs(base)` returns the view's base attributes plus every resolved contribution.
|
|
161
|
+
Base attributes, event Messages and any `ChildAttribute` survive. The caller did not copy the
|
|
162
|
+
markup or add a `validationBehavior` prop to the component.
|
|
163
|
+
|
|
164
|
+
## What the resolver guarantees
|
|
165
|
+
|
|
166
|
+
Attachments are not concatenated and left to renderer order. The resolver applies explicit rules:
|
|
116
167
|
|
|
117
|
-
|
|
168
|
+
- classes are additive and deduplicated into one `Class`;
|
|
169
|
+
- inline styles merge per property, with later attachments winning per property;
|
|
170
|
+
- an event or scalar attribute has exactly one owner — a second owner is an error;
|
|
171
|
+
- a `ChildAttribute` (a Submodel's published handler) is preserved by identity;
|
|
172
|
+
- `Key` and `InnerHTML` are structural and cannot be overridden;
|
|
173
|
+
- multiple mount contributions compose into exactly one `OnMount`.
|
|
118
174
|
|
|
119
|
-
|
|
175
|
+
Conflicts throw `Diagnostics.DiagnosticError` with stable codes such as
|
|
176
|
+
`mixins:event-conflict` and `mixins:protected-attribute`, so tests, DevTools and editor tooling can
|
|
177
|
+
all speak the same diagnostic language.
|
|
178
|
+
|
|
179
|
+
## Slots: the public contract
|
|
180
|
+
|
|
181
|
+
A slot is metadata, not a DOM node:
|
|
120
182
|
|
|
121
183
|
```ts
|
|
122
184
|
Slot.make({
|
|
123
|
-
capability: Capability.TextInput,
|
|
124
|
-
events: [Event.Input],
|
|
125
|
-
attributes: [Attr.AriaInvalid],
|
|
126
|
-
hidden: false,
|
|
185
|
+
capability: Capability.TextInput,
|
|
186
|
+
events: [Event.Input],
|
|
187
|
+
attributes: [Attr.AriaInvalid],
|
|
188
|
+
hidden: false,
|
|
127
189
|
protected: { events: [Event.Click], attributes: [Attr.Role], style: ['position'] },
|
|
128
190
|
})
|
|
129
191
|
```
|
|
130
192
|
|
|
131
|
-
- **Capability**
|
|
132
|
-
|
|
133
|
-
`Interactive`
|
|
134
|
-
`Capability.make(name, { extends })`.
|
|
135
|
-
- **Event** and **Attr** are branded tokens
|
|
136
|
-
|
|
137
|
-
- **Requirement** tokens name platform needs
|
|
138
|
-
|
|
139
|
-
- `hidden` reserves an internal point
|
|
140
|
-
|
|
141
|
-
- `protected` keeps structural
|
|
142
|
-
|
|
193
|
+
- **Capability** describes structural compatibility. The built-in hierarchy is
|
|
194
|
+
`Base → Interactive → { Container, Focusable → TextInput, Draggable }`, plus
|
|
195
|
+
`Base → Collection`. A behavior that requires `Interactive` may attach to a `TextInput`.
|
|
196
|
+
Extend it with `Capability.make(name, { extends })`.
|
|
197
|
+
- **Event** and **Attr** are branded metadata tokens. `Event.make` and `Attr.make` add custom ones;
|
|
198
|
+
declaring them does not install handlers.
|
|
199
|
+
- **Requirement** tokens name platform needs such as `Keyboard`, `Pointer` and `Clipboard` for
|
|
200
|
+
tooling to inspect.
|
|
201
|
+
- `hidden` reserves an internal extension point: public Style and Behavior specs do not even offer
|
|
202
|
+
that key.
|
|
203
|
+
- `protected` keeps structural events, attributes or style properties from being replaced by an
|
|
204
|
+
attachment.
|
|
143
205
|
|
|
144
|
-
Names come from the `Slots.define
|
|
206
|
+
Names come from the keys passed to `Slots.define`; they are never repeated inside each slot.
|
|
145
207
|
|
|
146
|
-
## Style
|
|
208
|
+
## Style: appearance as data
|
|
147
209
|
|
|
148
|
-
|
|
210
|
+
Style is pure data. It never touches the DOM.
|
|
149
211
|
|
|
150
212
|
| Primitive | Meaning |
|
|
151
213
|
| --- | --- |
|
|
152
214
|
| `Style.class(...)` | class tokens |
|
|
153
215
|
| `Style.inline({...})` | inline declarations |
|
|
154
|
-
| `Style.compose(...)` | concatenate classes
|
|
216
|
+
| `Style.compose(...)` | concatenate classes; later declarations win per property |
|
|
155
217
|
| `Style.when(condition, piece)` | a boolean known at authoring time |
|
|
156
218
|
| `Style.whenInput(predicate, piece)` | a condition read from the view input at render time |
|
|
157
219
|
| `Style.recipe({ base, variants, defaults, compound })` | returns `selection => StyleValue` |
|
|
158
|
-
| `Style.pseudo
|
|
159
|
-
| `Style.keyframes
|
|
160
|
-
| `Theme.define
|
|
220
|
+
| `Style.pseudo` / `media` / `supports` / `container` / `nest` | rule-based appearance |
|
|
221
|
+
| `Style.keyframes` / `global` | class-independent CSS |
|
|
222
|
+
| `Theme.define` / `variable` / `variables` | typed tokens and CSS custom properties |
|
|
161
223
|
|
|
162
|
-
Rule-based
|
|
163
|
-
|
|
224
|
+
Rule-based Style compiles to one deterministic class (an FNV-1a hash of canonical rule text) plus
|
|
225
|
+
CSS as data:
|
|
164
226
|
|
|
165
227
|
```ts
|
|
166
228
|
const CardStyle = Style.forSlots(FieldSlots)({
|
|
@@ -171,59 +233,74 @@ const CardStyle = Style.forSlots(FieldSlots)({
|
|
|
171
233
|
),
|
|
172
234
|
})
|
|
173
235
|
|
|
174
|
-
CardStyle.css
|
|
175
|
-
Style.stylesheet(FieldStyle, CardStyle)
|
|
236
|
+
CardStyle.css
|
|
237
|
+
Style.stylesheet(FieldStyle, CardStyle)
|
|
176
238
|
```
|
|
177
239
|
|
|
178
|
-
Equal rules share a class
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
condition is not. See [DESIGN.md](https://github.com/doeixd/foldkit-plus/blob/main/docs/design/mixins-DESIGN.md) for the compiler's scope.
|
|
240
|
+
Equal rules share a class, so server and client derive the same class and CSS. Rules inside
|
|
241
|
+
`Style.whenInput` are rejected (`style:conditional-rules-unsupported`) because the class is static
|
|
242
|
+
while the condition is not.
|
|
182
243
|
|
|
183
|
-
## Behavior
|
|
244
|
+
## Behavior: reusable element-level interaction
|
|
184
245
|
|
|
185
|
-
A
|
|
186
|
-
from the view's `input` and `h`, so
|
|
187
|
-
|
|
188
|
-
definition time: a behavior that needs `Event.Click` cannot attach to a slot
|
|
189
|
-
that does not publish it.
|
|
246
|
+
A Behavior is a reusable bundle of element-level interaction that does **not** own application
|
|
247
|
+
state. Its attributes are built while resolving from the view's `input` and `h`, so it can only
|
|
248
|
+
emit Messages from the view's own Message universe.
|
|
190
249
|
|
|
191
250
|
```ts
|
|
192
251
|
const Focus = Behavior.forSlots(FieldSlots)<FieldInput, Message>({
|
|
193
252
|
input: Behavior.slot({
|
|
194
253
|
requires: { capability: Capability.TextInput },
|
|
195
254
|
attributes: ({ input, h }) => (input.invalid ? [h.AriaInvalid(true)] : []),
|
|
196
|
-
mount: input => MeasureField(input.value), // your own
|
|
255
|
+
mount: input => MeasureField(input.value), // your own Mount.define* action
|
|
197
256
|
}),
|
|
198
257
|
})
|
|
199
258
|
```
|
|
200
259
|
|
|
201
|
-
|
|
260
|
+
`requires` is checked against the slot contract at definition time. A behavior that requires
|
|
261
|
+
`Event.Click` cannot attach to a slot that did not publish click. Multiple mount contributions
|
|
262
|
+
compose into one `OnMount` per element.
|
|
202
263
|
|
|
203
264
|
## SlotView
|
|
204
265
|
|
|
205
266
|
`SlotView.define(slots, render)` is a pure view that publishes slots. Attach with
|
|
206
267
|
`SlotView.attach`, `Style.attach` or `Behavior.attach`; each returns a new view.
|
|
207
268
|
|
|
208
|
-
Nothing but the render callback's builder names the view's Message universe, so
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
`
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
269
|
+
Nothing but the render callback's builder names the view's Message universe, so plain `define`
|
|
270
|
+
infers it from an explicit `h: HtmlBuilder<Message>` annotation. Without one, `Message` becomes
|
|
271
|
+
`unknown` and the eventual variance error is hard to read.
|
|
272
|
+
`SlotView.forMessages<Message>().define(slots, render)` fixes the universe up front instead;
|
|
273
|
+
`Input` still comes from the callback's own `input` annotation.
|
|
274
|
+
|
|
275
|
+
`Behavior.attach` uses the behavior's `Input` as the attached view's `Input`, so declare a
|
|
276
|
+
behavior over the view's input type, not merely the subset of fields it happens to read.
|
|
215
277
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
with.
|
|
278
|
+
For per-item groups such as tabs, options or calendar cells, use
|
|
279
|
+
`SlotView.buildersFor(slots, mixins, { input, h })` and map the items yourself. One contribution
|
|
280
|
+
then applies to every item while each item's base attributes retain their own event ownership.
|
|
220
281
|
|
|
221
|
-
|
|
222
|
-
calendar cells), call `SlotView.buildersFor(slots, mixins, { input, h })` and map
|
|
223
|
-
the items yourself — one contribution then applies to every item while each
|
|
224
|
-
item's base keeps its own event ownership.
|
|
282
|
+
## With `foldkit-surface`
|
|
225
283
|
|
|
226
|
-
|
|
284
|
+
Mixins do not require Surface, but the two fit naturally: Surface says **what a feature may
|
|
285
|
+
observe and emit**; slots say **where that feature may be customized**.
|
|
286
|
+
|
|
287
|
+
`foldkit-mixins-surface` renders a Surface projection through a `SlotView`, so a Behavior reads the
|
|
288
|
+
projected input rather than the root application Model, and its builder carries the Surface's
|
|
289
|
+
Message subset.
|
|
290
|
+
|
|
291
|
+
```text
|
|
292
|
+
Application Model / Message
|
|
293
|
+
│
|
|
294
|
+
Surface
|
|
295
|
+
what may be seen/emitted
|
|
296
|
+
│
|
|
297
|
+
SlotView
|
|
298
|
+
where it may be customized
|
|
299
|
+
│
|
|
300
|
+
Style + Behavior
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
## Accessibility contracts
|
|
227
304
|
|
|
228
305
|
```ts
|
|
229
306
|
const DialogPattern = A11y.pattern({
|
|
@@ -231,37 +308,75 @@ const DialogPattern = A11y.pattern({
|
|
|
231
308
|
content: { capability: Capability.Container },
|
|
232
309
|
})
|
|
233
310
|
|
|
234
|
-
A11y.validate(DialogPattern, DialogSlots)
|
|
311
|
+
A11y.validate(DialogPattern, DialogSlots)
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
`A11y.validate` is pure and DOM-independent. It checks the declared contract for missing or hidden
|
|
315
|
+
slots, capability mismatches and unpublished events or attributes. An optional requirement
|
|
316
|
+
tolerates an absent slot but still checks a present one. It does **not** certify WCAG compliance.
|
|
317
|
+
|
|
318
|
+
## Introspection
|
|
319
|
+
|
|
320
|
+
The contracts are data:
|
|
321
|
+
|
|
322
|
+
- `Slots.describe(contract)` and `Slot.describe(slot)` return serializable metadata.
|
|
323
|
+
- `Mixin.compose` combines mixins; `Mixin.make`, `Mixin.dynamic` and `Mixin.empty` build them.
|
|
324
|
+
- diagnostics have stable codes and structured `details`, so the same information can feed tests,
|
|
325
|
+
DevTools, documentation or agent tooling.
|
|
326
|
+
|
|
327
|
+
## Testing and static output
|
|
328
|
+
|
|
329
|
+
`SlotView.inertBuilder<Message>()` is an `HtmlBuilder` with no runtime behind it. Rendering a
|
|
330
|
+
view with it builds the same tagged attributes and elements, but nothing mounts and handlers are
|
|
331
|
+
never dispatched. Use it in tests, demos and static output, not as a renderer.
|
|
332
|
+
|
|
333
|
+
`Attributes` reads a resolved bundle, such as the result of `slots.x.attrs(base)`, by tag.
|
|
334
|
+
`Attributes.find(bundle, tag)` returns the **first** match typed as that variant, so `value`,
|
|
335
|
+
`message` or `action` need no cast; `Attributes.filter` returns every match in bundle order;
|
|
336
|
+
`Attributes.tagOf` returns an entry's tag. Opaque `ChildAttribute` entries have no readable tag
|
|
337
|
+
and are skipped.
|
|
338
|
+
|
|
339
|
+
```ts
|
|
340
|
+
import { Attributes, type SlotAttributes } from 'foldkit-mixins'
|
|
341
|
+
|
|
342
|
+
let input: SlotAttributes<Message> = []
|
|
343
|
+
const Probe = SlotView.forMessages<Message>()
|
|
344
|
+
.define(FieldSlots, (field: FieldInput, slots, h) => {
|
|
345
|
+
input = slots.input.attrs([h.Value(field.value)])
|
|
346
|
+
return h.input(input)
|
|
347
|
+
})
|
|
348
|
+
.pipe(Style.attach(FieldStyle), Behavior.attach(Validation))
|
|
349
|
+
|
|
350
|
+
Probe({ value: 'Ada', invalid: true }, SlotView.inertBuilder<Message>())
|
|
351
|
+
|
|
352
|
+
Attributes.find(input, 'Class')?.value // 'field-input'
|
|
353
|
+
Attributes.find(input, 'AriaInvalid')?.value // true
|
|
235
354
|
```
|
|
236
355
|
|
|
237
|
-
`
|
|
238
|
-
rendered tree, and reports missing or hidden slots, capability mismatches and
|
|
239
|
-
unpublished events or attributes in authored order. A requirement marked
|
|
240
|
-
`optional` tolerates an absent slot but still checks a present one. It does not
|
|
241
|
-
certify WCAG.
|
|
356
|
+
## `@foldkit/ui`
|
|
242
357
|
|
|
243
|
-
|
|
358
|
+
`foldkit-mixins-ui` adapts `@foldkit/ui` components that expose attribute bundles or a consumer
|
|
359
|
+
render seam. Button, Input, Checkbox, Disclosure, Dialog, Popover, Tooltip, Slider, Tabs,
|
|
360
|
+
RadioGroup, Calendar and others are covered.
|
|
244
361
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
record, so tests, DevTools and editor tooling share one shape.
|
|
250
|
-
- `Mixin.compose` merges mixins; `Mixin.make`/`Mixin.dynamic`/`Mixin.empty` build
|
|
251
|
-
them.
|
|
362
|
+
Some components build their entire element tree internally and expose no attachment seam; those
|
|
363
|
+
cannot be adapted without changing the component API. Others simply do not have an adapter yet.
|
|
364
|
+
See the [guide](https://github.com/doeixd/foldkit-plus/blob/main/docs/mixins.md) for the current
|
|
365
|
+
boundary.
|
|
252
366
|
|
|
253
367
|
## Status
|
|
254
368
|
|
|
255
|
-
The API is still settling (`0.
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
369
|
+
The API is still settling (`0.2.x`). This package replaces none of Foldkit's state or effect
|
|
370
|
+
machinery — Commands, Subscriptions, Mounts, ManagedResources, Models or Submodels. Its job is
|
|
371
|
+
narrower: make view customization explicit, typed and composable.
|
|
372
|
+
|
|
373
|
+
The [design note](https://github.com/doeixd/foldkit-plus/blob/main/docs/design/mixins-DESIGN.md)
|
|
374
|
+
records the substrate probes and implementation decisions.
|
|
259
375
|
|
|
260
376
|
## See also
|
|
261
377
|
|
|
262
|
-
- [Inside-out view composition](https://github.com/doeixd/foldkit-plus/blob/main/docs/mixins.md) — the mental
|
|
263
|
-
|
|
264
|
-
- [`foldkit-mixins-
|
|
265
|
-
|
|
266
|
-
- [`examples/
|
|
267
|
-
application this way.
|
|
378
|
+
- [Inside-out view composition](https://github.com/doeixd/foldkit-plus/blob/main/docs/mixins.md) — the mental model and when to use it.
|
|
379
|
+
- [`foldkit-mixins-surface`](https://github.com/doeixd/foldkit-plus/tree/main/packages/mixins-surface) — bind a Surface projection and Message subset to a SlotView.
|
|
380
|
+
- [`foldkit-mixins-ui`](https://github.com/doeixd/foldkit-plus/tree/main/packages/mixins-ui) — adapters for `@foldkit/ui`.
|
|
381
|
+
- [`examples/mixins`](https://github.com/doeixd/foldkit-plus/tree/main/examples/mixins) — a focused runnable trace.
|
|
382
|
+
- [`examples/todo-app`](https://github.com/doeixd/foldkit-plus/tree/main/examples/todo-app) — a whole application styled this way.
|
package/dist/index.d.mts
CHANGED
|
@@ -304,6 +304,30 @@ type Contribution<Message> = {
|
|
|
304
304
|
type StaticContributionMap<Message> = {
|
|
305
305
|
readonly [slot: string]: StaticContribution<Message> | undefined;
|
|
306
306
|
};
|
|
307
|
+
declare namespace resolver_d_exports {
|
|
308
|
+
export { ResolveOptions, SlotAttributes, resolve };
|
|
309
|
+
}
|
|
310
|
+
type SlotAttributes<Message> = ReadonlyArray<Attribute<Message> | ChildAttribute>;
|
|
311
|
+
interface ResolveOptions {
|
|
312
|
+
readonly slot?: string;
|
|
313
|
+
readonly protected?: SlotProtection;
|
|
314
|
+
}
|
|
315
|
+
declare const resolve: <Message>(base: SlotAttributes<Message> | undefined, contributions: ReadonlyArray<StaticContribution<Message>>, options?: ResolveOptions) => SlotAttributes<Message>;
|
|
316
|
+
declare namespace attributes_d_exports {
|
|
317
|
+
export { Of, Tag, filter, find, tagOf };
|
|
318
|
+
}
|
|
319
|
+
/** Every Foldkit attribute tag: `'Class'`, `'OnClick'`, `'DataAttribute'`, … */
|
|
320
|
+
type Tag = Attribute<never>['_tag'];
|
|
321
|
+
/** The attribute variant carrying `T`. */
|
|
322
|
+
type Of<Message, T extends Tag> = Extract<Attribute<Message>, {
|
|
323
|
+
readonly _tag: T;
|
|
324
|
+
}>;
|
|
325
|
+
/** The tag of one bundle entry; `undefined` for an opaque `ChildAttribute`. */
|
|
326
|
+
declare const tagOf: <Message>(attribute: SlotAttributes<Message>[number]) => Tag | undefined;
|
|
327
|
+
/** The first attribute with `tag`, typed as that variant. */
|
|
328
|
+
declare const find: <Message, T extends Tag>(attributes: SlotAttributes<Message>, tag: T) => Of<Message, T> | undefined;
|
|
329
|
+
/** Every attribute with `tag`, in bundle order. */
|
|
330
|
+
declare const filter: <Message, T extends Tag>(attributes: SlotAttributes<Message>, tag: T) => ReadonlyArray<Of<Message, T>>;
|
|
307
331
|
declare namespace mixin_d_exports {
|
|
308
332
|
export { AnyMixin, Mixin, MixinFor, StaticMixin, compose, contributionsFor, dynamic, empty, evaluate, isDynamic, make };
|
|
309
333
|
}
|
|
@@ -329,17 +353,8 @@ declare const dynamic: <Message = never>(name: string, contributions: Contributi
|
|
|
329
353
|
declare const empty: <Message = never>() => StaticMixin<Message>;
|
|
330
354
|
declare const compose: <Message = never>(...mixins: ReadonlyArray<MixinFor<Message>>) => Mixin<Message>;
|
|
331
355
|
declare const contributionsFor: <Message>(mixin: Mixin<Message> | StaticMixin<Message>, slot: string) => SlotContribution<Message> | undefined;
|
|
332
|
-
declare namespace resolver_d_exports {
|
|
333
|
-
export { ResolveOptions, SlotAttributes, resolve };
|
|
334
|
-
}
|
|
335
|
-
type SlotAttributes<Message> = ReadonlyArray<Attribute<Message> | ChildAttribute>;
|
|
336
|
-
interface ResolveOptions {
|
|
337
|
-
readonly slot?: string;
|
|
338
|
-
readonly protected?: SlotProtection;
|
|
339
|
-
}
|
|
340
|
-
declare const resolve: <Message>(base: SlotAttributes<Message> | undefined, contributions: ReadonlyArray<StaticContribution<Message>>, options?: ResolveOptions) => SlotAttributes<Message>;
|
|
341
356
|
declare namespace slotView_d_exports {
|
|
342
|
-
export { MessageSlotView, SlotBuilder, SlotBuilders, SlotView, SlotViewRender, SlotViewTransform, SlotViewTransformFor, attach$1 as attach, buildersFor, define$1 as define, forMessages };
|
|
357
|
+
export { MessageSlotView, SlotBuilder, SlotBuilders, SlotView, SlotViewRender, SlotViewTransform, SlotViewTransformFor, attach$1 as attach, buildersFor, define$1 as define, forMessages, inertBuilder };
|
|
343
358
|
}
|
|
344
359
|
type SlotBuilder<Message> = {
|
|
345
360
|
readonly attrs: (base?: SlotAttributes<Message>) => SlotAttributes<Message>;
|
|
@@ -371,6 +386,13 @@ declare const buildersFor: <Slots, Message, Input>(slots: Slots, mixins: Readonl
|
|
|
371
386
|
declare const define$1: <Slots, Input, Message>(slots: Slots, render: SlotViewRender<Slots, Input, Message>, options?: {
|
|
372
387
|
readonly name?: string;
|
|
373
388
|
}) => SlotView<Slots, Input, Message>;
|
|
389
|
+
/**
|
|
390
|
+
* Foldkit's `inertHtml` typed for a Message universe, for rendering a view
|
|
391
|
+
* outside a runtime (tests, demos, static description). `inertHtml` is
|
|
392
|
+
* `HtmlBuilder<never>`, and the builder is invariant in `Message`, so this is
|
|
393
|
+
* the one cast: sound because inert handlers are never dispatched.
|
|
394
|
+
*/
|
|
395
|
+
declare const inertBuilder: <Message>() => HtmlBuilder<Message>;
|
|
374
396
|
/** The `SlotView` constructors with `Message` already fixed. */
|
|
375
397
|
interface MessageSlotView<Message> {
|
|
376
398
|
readonly define: <Slots, Input>(slots: Slots, render: SlotViewRender<Slots, Input, Message>, options?: {
|
|
@@ -577,5 +599,5 @@ export declare const Theme: {
|
|
|
577
599
|
readonly variables: <T extends ThemeTokens>(theme: T) => StyleValue;
|
|
578
600
|
};
|
|
579
601
|
//#endregion
|
|
580
|
-
export { a11y_d_exports as A11y, type A11yDiagnostic, type A11yDiagnosticCode, type Pattern as A11yPattern, type SlotRequirement as A11yRequirement, type Any as AnyCapability, type AnyMixin, attr_d_exports as Attr, type AttrToken, behavior_d_exports as Behavior, type BehaviorSlotOptions, type BehaviorSpec, capability_d_exports as Capability, type Contribution, type ContributionContext, type Diagnostic, type DiagnosticCode, diagnostics_d_exports as Diagnostics, type DynamicContribution, event_d_exports as Event, type EventToken, type InputContribution, type MessageSlotView, metadataToken_d_exports as MetadataToken, mixin_d_exports as Mixin, type MixinFor, type Mixin as MixinValue, type NamedBehavior, type NamedStyle, requirement_d_exports as Requirement, type RequirementToken, type ResolveOptions, resolver_d_exports as Resolver, type Satisfies, slot_d_exports as Slot, type SlotAttributes, type SlotBuilder, type SlotBuilders, type SlotContribution, type SlotProtection, type SlotRequirements, slotView_d_exports as SlotView, type SlotViewRender, type SlotViewTransform, type SlotViewTransformFor, slots_d_exports as Slots, type Contract as SlotsContract, type StaticContribution, type StaticContributionMap, type StaticMixin, type StyleCondition, type StylePieces, type StyleRule, type StyleValue, type Theme as ThemeValue, type ThemeTokens, type UnnamedSlot };
|
|
602
|
+
export { a11y_d_exports as A11y, type A11yDiagnostic, type A11yDiagnosticCode, type Pattern as A11yPattern, type SlotRequirement as A11yRequirement, type Any as AnyCapability, type AnyMixin, attr_d_exports as Attr, type AttrToken, attributes_d_exports as Attributes, behavior_d_exports as Behavior, type BehaviorSlotOptions, type BehaviorSpec, capability_d_exports as Capability, type Contribution, type ContributionContext, type Diagnostic, type DiagnosticCode, diagnostics_d_exports as Diagnostics, type DynamicContribution, event_d_exports as Event, type EventToken, type InputContribution, type MessageSlotView, metadataToken_d_exports as MetadataToken, mixin_d_exports as Mixin, type MixinFor, type Mixin as MixinValue, type NamedBehavior, type NamedStyle, requirement_d_exports as Requirement, type RequirementToken, type ResolveOptions, resolver_d_exports as Resolver, type Satisfies, slot_d_exports as Slot, type SlotAttributes, type SlotBuilder, type SlotBuilders, type SlotContribution, type SlotProtection, type SlotRequirements, slotView_d_exports as SlotView, type SlotViewRender, type SlotViewTransform, type SlotViewTransformFor, slots_d_exports as Slots, type Contract as SlotsContract, type StaticContribution, type StaticContributionMap, type StaticMixin, type StyleCondition, type StylePieces, type StyleRule, type StyleValue, type Theme as ThemeValue, type ThemeTokens, type UnnamedSlot };
|
|
581
603
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/diagnostics.ts","../src/metadataToken.ts","../src/attr.ts","../src/capability.ts","../src/event.ts","../src/pipe.ts","../src/requirement.ts","../src/slot.ts","../src/a11y.ts","../src/contribution.ts","../src/
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/diagnostics.ts","../src/metadataToken.ts","../src/attr.ts","../src/capability.ts","../src/event.ts","../src/pipe.ts","../src/requirement.ts","../src/slot.ts","../src/a11y.ts","../src/contribution.ts","../src/resolver.ts","../src/attributes.ts","../src/mixin.ts","../src/slotView.ts","../src/behavior.ts","../src/slots.ts","../src/styleRules.ts","../src/style.ts","../src/theme.ts"],"mappings":";;;;;;;;;;;KAMY;UAoBK;WACN;WACA,MAAM;WACN;WACA;WACA;WACA,UAAU,SAAS;;cAGjB,wBAAwB;WAC1B,YAAY;EAET,YAAA,YAAY;;;;;;;;;;cCjCb;UAEI,cAAc,qBAAqB;YACxC;aACC,MAAM;aACN,MAAM;;WAER,MAAM;WACN,MAAM;;KAGL,QAAM;KAEN,SAAO,KACjB,UAAU,yBAAyB,QAAQ,OAAO,mBAAmB;KAE3D,OAAO,KAAK,UAAU,oBAAoB,aAAa;KAEvD,UAAQ,gCAAgC,SAAO;cAE9C,eAAc,2BAA2B,qBACpD,MAAM,MACN,MAAM,SACL,cAAc,MAAM;cAcV,OAAM,mBAAiB,SAAS;cAGhC,SAAU,gBAAgB;;;;KCvC3B,UAAU,gCAAgC,gCAEpD;cAGW,OAAM,mBAAiB,SAAS;cAGhC,eAAc,qBAAqB,MAAM,SAAO,UAAU;cAG1D,WAAU,MAAM,WAAW,OAAO;cAElC,aAAY,MAAM;WAAuB;;cAIzC,MAAI;cACJ,WAAS;cACT,iBAAe;cACf,cAAY;cACZ,c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