@lumiose/ui 0.1.1 → 0.1.3

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.
Files changed (70) hide show
  1. package/README.md +2 -2
  2. package/dist/accordion/accordion.tsx +6 -4
  3. package/dist/autocomplete/autocomplete.tsx +6 -5
  4. package/dist/avatar/avatar.tsx +4 -3
  5. package/dist/batched.ts +11 -0
  6. package/dist/checkbox/checkbox.tsx +4 -3
  7. package/dist/checkbox-group/checkbox-group.tsx +3 -2
  8. package/dist/collapsible/collapsible.tsx +5 -3
  9. package/dist/collapsible/panel.ts +3 -1
  10. package/dist/combobox/combobox.tsx +8 -6
  11. package/dist/combobox/context.ts +2 -1
  12. package/dist/context-menu/context-menu.tsx +6 -4
  13. package/dist/dialog/dialog.tsx +4 -2
  14. package/dist/drawer/drawer.tsx +2 -1
  15. package/dist/field/field.tsx +13 -11
  16. package/dist/form/reset.ts +4 -2
  17. package/dist/input/input.tsx +4 -1
  18. package/dist/menu/menu.tsx +13 -11
  19. package/dist/meter/meter.tsx +2 -1
  20. package/dist/navigation-menu/navigation-menu.tsx +6 -4
  21. package/dist/not-inside.ts +13 -0
  22. package/dist/number-field/number-field.tsx +6 -4
  23. package/dist/otp-field/otp-field.tsx +11 -9
  24. package/dist/popover/hover.ts +2 -1
  25. package/dist/popover/popover-hover.script.ts +27 -0
  26. package/dist/popover/popover.script.ts +19 -25
  27. package/dist/popover/popover.tsx +18 -9
  28. package/dist/preview-card/preview-card.tsx +4 -2
  29. package/dist/progress/progress.tsx +2 -1
  30. package/dist/radio-group/radio-group.tsx +5 -3
  31. package/dist/select/select.script.ts +26 -0
  32. package/dist/select/select.tsx +43 -11
  33. package/dist/slider/slider.tsx +6 -4
  34. package/dist/switch/switch.tsx +4 -3
  35. package/dist/tabs/tabs.tsx +5 -3
  36. package/dist/toast/toast.tsx +5 -3
  37. package/dist/toggle/toggle.tsx +6 -5
  38. package/dist/toggle-group/toggle-group.script.ts +12 -4
  39. package/dist/toggle-group/toggle-group.tsx +16 -4
  40. package/dist/toolbar/toolbar.tsx +2 -1
  41. package/dist/tooltip/tooltip.tsx +6 -2
  42. package/docs/README.md +16 -7
  43. package/docs/accordion.md +3 -2
  44. package/docs/autocomplete.md +2 -2
  45. package/docs/avatar.md +2 -2
  46. package/docs/checkbox-group.md +1 -1
  47. package/docs/checkbox.md +1 -1
  48. package/docs/collapsible.md +4 -3
  49. package/docs/combobox.md +4 -3
  50. package/docs/context-menu.md +3 -3
  51. package/docs/dialog.md +1 -1
  52. package/docs/drawer.md +3 -2
  53. package/docs/field.md +2 -2
  54. package/docs/installation.md +3 -3
  55. package/docs/llms-full.txt +114 -73
  56. package/docs/llms.txt +14 -14
  57. package/docs/menu.md +4 -3
  58. package/docs/menubar.md +3 -3
  59. package/docs/navigation-menu.md +4 -3
  60. package/docs/otp-field.md +2 -2
  61. package/docs/popover.md +7 -4
  62. package/docs/preview-card.md +4 -3
  63. package/docs/radio-group.md +1 -1
  64. package/docs/select.md +25 -10
  65. package/docs/tabs.md +1 -1
  66. package/docs/toast.md +2 -2
  67. package/docs/toggle-group.md +10 -4
  68. package/docs/toolbar.md +2 -2
  69. package/docs/tooltip.md +4 -3
  70. package/package.json +5 -5
@@ -11,6 +11,7 @@ import {
11
11
  } from "../toggle/context.ts";
12
12
  import type { ToggleGroupElement } from "./toggle-group.script.ts";
13
13
  import toggleGroupScript from "./toggle-group.script.ts?client";
14
+ import { batched } from "../batched.ts";
14
15
 
15
16
  declare module "lumiose/jsx-runtime" {
16
17
  namespace JSX {
@@ -39,7 +40,10 @@ type ElementProps = {
39
40
  * `aria-labelledby`. `bind:value={signal}` stands in for `value` and `onValueChange`.
40
41
  */
41
42
  export interface ToggleGroupProps extends Omit<ElementProps, "children"> {
42
- /** Presses the toggles with these values when it changes. Pair it with `onValueChange`. */
43
+ /**
44
+ * The pressed toggles. Pair it with `onValueChange`, which updates it: the toggles show `value`
45
+ * again after each press, so one that `onValueChange` does not take is undone.
46
+ */
43
47
  value?: string[];
44
48
  /** The toggles pressed at first, when `value` is left out. */
45
49
  defaultValue?: string[];
@@ -104,11 +108,19 @@ export function ToggleGroup({
104
108
  multiple={multiple}
105
109
  data-orientation={orientation ?? "horizontal"}
106
110
  data-loop-focus={loopFocus === false ? "false" : undefined}
107
- on:valuechange={() => {
108
- const next = element()!.value;
111
+ on:valuechange={batched(() => {
112
+ const host = element()!;
113
+ const next = host.value;
109
114
  values.set(next);
110
115
  onValueChange?.(next);
111
- }}
116
+ // Controlled: when the callback leaves `value` as it was, the toggles show it again, as
117
+ // in Base UI (TASK-538). A changed `value` equals the element's, which then does nothing.
118
+ const held = value;
119
+ if (held !== undefined) {
120
+ values.set(held);
121
+ host.value = held;
122
+ }
123
+ })}
112
124
  >
113
125
  {children}
114
126
  </lu-toggle-group>
@@ -14,6 +14,7 @@ import { Separator, type SeparatorProps } from "../separator/separator.tsx";
14
14
  import { ToolbarContext, type ToolbarContextValue } from "./context.ts";
15
15
  import type { ToolbarElement } from "./toolbar.script.ts";
16
16
  import toolbarScript from "./toolbar.script.ts?client";
17
+ import { notInside } from "../not-inside.ts";
17
18
 
18
19
  declare module "lumiose/jsx-runtime" {
19
20
  namespace JSX {
@@ -63,7 +64,7 @@ export type ToolbarSeparatorProps = SeparatorProps;
63
64
 
64
65
  function useToolbar(part: string): ToolbarContextValue {
65
66
  const context = useContext(ToolbarContext);
66
- if (!context) throw new Error(`Toolbar.${part} must be inside <Toolbar.Root>.`);
67
+ if (!context) throw notInside(`Toolbar.${part}`, "<Toolbar.Root>");
67
68
  return context;
68
69
  }
69
70
 
@@ -8,6 +8,8 @@
8
8
  import { createContext, effect, ref, useContext, useId } from "lumiose";
9
9
  import { anchorName, placement, withStyle, type PlacementProps } from "../placement/placement.ts";
10
10
  import tooltipScript from "./tooltip.script.ts?client";
11
+ import { batched } from "../batched.ts";
12
+ import { notInside } from "../not-inside.ts";
11
13
 
12
14
  /**
13
15
  * `Tooltip.Root` renders no element: it holds the ids its parts share. `bind:open={signal}`
@@ -61,7 +63,7 @@ const TooltipContext = createContext<TooltipContextValue>();
61
63
 
62
64
  function useTooltip(): TooltipContextValue {
63
65
  const context = useContext(TooltipContext);
64
- if (!context) throw new Error("Tooltip parts must be inside <Tooltip.Root>.");
66
+ if (!context) throw notInside("Tooltip parts", "<Tooltip.Root>");
65
67
  return context;
66
68
  }
67
69
 
@@ -128,7 +130,9 @@ function Popup({
128
130
  }}
129
131
  id={tooltip.popupId}
130
132
  popover="hint"
131
- on:toggle={(event: ToggleEvent) => tooltip.props.onOpenChange?.(event.newState === "open")}
133
+ on:toggle={batched((event: ToggleEvent) =>
134
+ tooltip.props.onOpenChange?.(event.newState === "open"),
135
+ )}
132
136
  >
133
137
  {children}
134
138
  </span>
package/docs/README.md CHANGED
@@ -2,9 +2,8 @@
2
2
 
3
3
  > `@lumiose/ui`: accessible, unstyled UI primitives built on native elements (`<dialog>`, popover, invoker commands, CSS anchor positioning), server-rendered without hydration. Style them with your own CSS or the optional default theme.
4
4
 
5
- **Status:** in development. `@lumiose/ui` keeps its own 0.x versions, apart from the version all
6
- other Lumiose packages share, and is not on npm yet: today it is used from this repository's
7
- workspace. The goal for its 1.0 is parity with [Base UI](https://base-ui.com)'s components; the
5
+ **Status:** in development. `@lumiose/ui` is on npm and keeps its own 0.x versions, apart from
6
+ the version all other Lumiose packages share. The goal for its 1.0 is parity with [Base UI](https://base-ui.com)'s components; the
8
7
  table below lists them as they land.
9
8
 
10
9
  These pages ship in the package, in `node_modules/@lumiose/ui/docs`, so they match the installed
@@ -32,12 +31,19 @@ Anatomy, API, Example, Styling, Keyboard and focus, Without JavaScript, Browser
32
31
  runtime.
33
32
  - **Parts.** Each component is a set of parts named as in Base UI (`Dialog.Root`,
34
33
  `Dialog.Trigger`, `Dialog.Popup`, …). Every part that renders an element takes that element's
35
- props (`class`, `style`, `aria-*`, events) and passes them through.
34
+ props (`class`, `style`, `aria-*`, events) and passes them through. A part finds its `Root`
35
+ through context, so a `Root` and its parts render on the same side of an island boundary, even
36
+ where the JSX nests them. A part the page passes to an island as a slot (children or a JSX prop)
37
+ renders in the page, outside the `Root` the island renders, and the server throws "Combobox
38
+ parts must be inside <Combobox.Root>"; an island inside a `Root` the page renders does not see
39
+ that `Root` either. Pass the data as props and render the `Root` and its parts inside the
40
+ island ([Islands](https://itsjavi.com/lumiose/docs/concepts/islands/)).
36
41
  - **Signals.** A component's state is a prop and a callback: `open` with `onOpenChange`, `checked`
37
42
  with `onCheckedChange`, `value` with `onValueChange`. Pass a signal's value and write it back in
38
43
  the callback to keep both in sync, or leave both out and the element keeps its own state. Custom
39
44
  elements report changes with lowercase DOM events, like native ones: `openchange`,
40
- `checkedchange` and `change`.
45
+ `checkedchange` and `change`. The callbacks run inside `batch()`, as event handlers do: what
46
+ they write renders together, and the DOM is current as soon as the event returns.
41
47
  - **Keyboard contracts.** Every component follows its WAI-ARIA Authoring Practices pattern, and
42
48
  its end-to-end tests check the keyboard paths.
43
49
  - **WCAG 2.2 AA.** Every component meets it: the components own semantics, keyboard and
@@ -70,7 +76,7 @@ custom properties, named as in shadcn/ui, are listed in [Theming](theming.md#the
70
76
  | [Tooltip](tooltip.md) | Available: native hint popover, opened by its script |
71
77
  | [Menu](menu.md) | Available: popover menu, opens without JavaScript |
72
78
  | [Combobox](combobox.md) | Available: `<lu-combobox>`, a form control that filters its options |
73
- | [Select](select.md) | Available: native `<select>`, customizable where supported, no script |
79
+ | [Select](select.md) | Available: native `<select>`, customizable where supported, no script but for `label`s |
74
80
  | [Tabs](tabs.md) | Available: server HTML with the full state, `<lu-tabs>` adds the keys |
75
81
  | [Field](field.md) | Available: label, description, errors; native validation in the field |
76
82
  | [Fieldset](fieldset.md) | Available: native `<fieldset>` and `<legend>`, no script |
@@ -165,7 +171,10 @@ errors are yours.
165
171
  `@lumiose/ui` is opt-in, so its size is reported apart from the runtime's caps:
166
172
  `pnpm --filter @lumiose/ui size` prints, per component, the JavaScript a server-rendered page loads
167
173
  for its custom elements, the JavaScript an island that uses it loads, and its CSS (minified, gzip
168
- and brotli).
174
+ and brotli). The scripts load as separate modules, in islands too: each component's script, and
175
+ the modules several scripts share (the dismissal model, the placement fallback, the hover timing),
176
+ each a file of its own, as an app's build splits them. The sizes on the component pages are those
177
+ files' brotli sizes added up.
169
178
 
170
179
  ## Related
171
180
 
package/docs/accordion.md CHANGED
@@ -187,8 +187,9 @@ closed item are HTML features: an accordion in a server-rendered page works befo
187
187
  loads, and with none. Disabled triggers ignore the pointer through CSS. `value`, `onValueChange`
188
188
  and `bind:value` need the component to run in an island.
189
189
 
190
- A page that renders an `Accordion` loads a 1 kB (brotli) module once, without the Lumiose runtime;
191
- islands bundle it. It defines `<lu-accordion>`, which adds the arrow keys, Home and End, and sets
190
+ A page that renders an `Accordion` loads its script once, with the panel and animation modules it
191
+ shares with Collapsible: 1.3 kB (brotli) without the Lumiose runtime; an island loads the same
192
+ modules. It defines `<lu-accordion>`, which adds the arrow keys, Home and End, and sets
192
193
  the panels' animation hooks (shared with [Collapsible](collapsible.md)); a disabled trigger does
193
194
  not toggle, also from the keyboard.
194
195
 
@@ -1,6 +1,6 @@
1
1
  # Autocomplete
2
2
 
3
- > A text input with suggestions, for text that may be anything (a search, a tag, an address): the WAI-ARIA combobox pattern with list autocomplete, after Base UI's Autocomplete. Unlike a [Combobox](combobox.md), the text is the value: the input has the name and submits what is typed, and choosing a suggestion only fills it in. It runs on the Combobox's element (`<lu-combobox free>`, 5.0 kB) and parts, on server-rendered pages and in islands; `bind:value` keeps a signal in sync. Filtering, inline completion, groups, an empty state and a status.
3
+ > A text input with suggestions, for text that may be anything (a search, a tag, an address): the WAI-ARIA combobox pattern with list autocomplete, after Base UI's Autocomplete. Unlike a [Combobox](combobox.md), the text is the value: the input has the name and submits what is typed, and choosing a suggestion only fills it in. It runs on the Combobox's element (`<lu-combobox free>`, 5.8 kB) and parts, on server-rendered pages and in islands; `bind:value` keeps a signal in sync. Filtering, inline completion, groups, an empty state and a status.
4
4
 
5
5
  ```ts
6
6
  import { Autocomplete } from "@lumiose/ui"; // or "@lumiose/ui/autocomplete"
@@ -145,7 +145,7 @@ Focus stays in the input: the highlight moves through `aria-activedescendant`.
145
145
  ## Without JavaScript, and the element's script
146
146
 
147
147
  The input is a native text field with the name: typing, `required`, submission and reset work with
148
- no script; the suggestions need it. `<lu-combobox>`'s script (5.0 kB brotli, shared with Combobox)
148
+ no script; the suggestions need it. `<lu-combobox>`'s script (5.8 kB brotli, shared with Combobox)
149
149
  filters and opens them, moves the highlight, fills in a choice (firing `input` and `change` on the
150
150
  input) and runs inline completion.
151
151
 
package/docs/avatar.md CHANGED
@@ -180,8 +180,8 @@ when it fails) and hides its fallback, from sight and from assistive technology,
180
180
  the avatar twice; an avatar without an image shows its fallback.
181
181
  `onLoadingStatusChange` needs the component to run in an island.
182
182
 
183
- A page that renders an `Avatar` loads a 0.5 kB (brotli) script, without the Lumiose runtime;
184
- islands bundle it. `<lu-avatar>` reads the image's state when it connects (a cached image shows
183
+ A page that renders an `Avatar` loads a 0.5 kB (brotli) script, without the Lumiose runtime; an
184
+ island loads the same module. `<lu-avatar>` reads the image's state when it connects (a cached image shows
185
185
  at once), then follows its `load` and `error` events and changes to its `src` and `srcset`. An
186
186
  image that is complete without a size (an SVG without intrinsic dimensions, or a broken image) is
187
187
  told apart with `decode()`.
@@ -3,7 +3,7 @@
3
3
  > A group of checkboxes with one value, the list of the checked ones, after Base UI's CheckboxGroup: a native `<fieldset>` whose checkboxes share a name, so the form submits each checked value and a disabled group disables them all, without JavaScript. A parent checkbox checks them all and shows checked, mixed or unchecked as they are; `bind:value` keeps a signal in sync.
4
4
 
5
5
  ```ts
6
- import { CheckboxGroup, Checkbox, Fieldset } from "@lumiose/ui"; // or "@lumiose/ui/checkbox-group"
6
+ import { CheckboxGroup, Checkbox, Fieldset } from "@lumiose/ui"; // or "@lumiose/ui/checkbox-group", "@lumiose/ui/checkbox" and "@lumiose/ui/fieldset"
7
7
  import "@lumiose/ui/themes/default.css"; // optional: the default theme
8
8
  ```
9
9
 
package/docs/checkbox.md CHANGED
@@ -112,7 +112,7 @@ A native checkbox: toggling, submission, `required`, reset and `disabled` (its o
112
112
  work with no script.
113
113
 
114
114
  A page that renders a Checkbox, Checkbox Group, Radio Group or Switch loads one 1.0 kB (brotli)
115
- script once, without the Lumiose runtime; islands bundle it. It turns server HTML's
115
+ script once, without the Lumiose runtime; an island loads the same module. It turns server HTML's
116
116
  `data-indeterminate` into the `indeterminate` property (which has no attribute), makes read-only
117
117
  inputs ignore clicks, Space and the label, runs the parent checkbox of a group and a [Radio
118
118
  Group](radio-group.md)'s arrow keys, and adds an
@@ -1,6 +1,6 @@
1
1
  # Collapsible
2
2
 
3
- > A panel that its trigger shows and hides: a native `<details>` whose `<summary>` is the trigger, so it works in server HTML with no JavaScript, keeps the browser's keyboard handling, and opens when find-in-page or a link lands inside it. A 0.7 kB script adds Base UI's animation hooks. `bind:open` (or `open` and `onOpenChange`) keeps a signal in sync in islands.
3
+ > A panel that its trigger shows and hides: a native `<details>` whose `<summary>` is the trigger, so it works in server HTML with no JavaScript, keeps the browser's keyboard handling, and opens when find-in-page or a link lands inside it. A 0.9 kB script adds Base UI's animation hooks. `bind:open` (or `open` and `onOpenChange`) keeps a signal in sync in islands.
4
4
 
5
5
  ```ts
6
6
  import { Collapsible } from "@lumiose/ui"; // or "@lumiose/ui/collapsible"
@@ -141,8 +141,9 @@ Collapsible in a server-rendered page works before any script loads, and with no
141
141
  trigger ignores the pointer through CSS. `open`, `onOpenChange` and `bind:open` need the component
142
142
  to run in an island.
143
143
 
144
- A page that renders a `Collapsible` loads a 0.7 kB (brotli) module once, without the Lumiose
145
- runtime; islands bundle it. It covers every Collapsible and [Accordion](accordion.md) panel on the
144
+ A page that renders a `Collapsible` loads 0.9 kB (brotli) of modules once (its script, and the
145
+ panel and animation modules it shares with Accordion), without the Lumiose runtime; an island
146
+ loads the same modules. It covers every Collapsible and [Accordion](accordion.md) panel on the
146
147
  page:
147
148
 
148
149
  - the animation hooks above, set on every opening and closing, whatever caused it (the trigger,
package/docs/combobox.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Combobox
2
2
 
3
- > A text input that filters a list of options, for picking one value or several from many: the WAI-ARIA combobox pattern with list autocomplete, after Base UI's Combobox. The input shows the option's label and the form gets its value. `<lu-combobox>`, a 5.4 kB form-associated light-DOM element, runs it on server-rendered pages and in islands; `bind:value` and `bind:open` keep signals in sync. Groups, an empty state, a status, a clear button, multiple values with chips, validation and async options.
3
+ > A text input that filters a list of options, for picking one value or several from many: the WAI-ARIA combobox pattern with list autocomplete, after Base UI's Combobox. The input shows the option's label and the form gets its value. `<lu-combobox>`, a 5.8 kB form-associated light-DOM element, runs it on server-rendered pages and in islands; `bind:value` and `bind:open` keep signals in sync. Groups, an empty state, a status, a clear button, multiple values with chips, validation and async options.
4
4
 
5
5
  ```ts
6
6
  import { Combobox } from "@lumiose/ui"; // or "@lumiose/ui/combobox"
@@ -313,8 +313,9 @@ In the server HTML the input is empty even with a selected value: the input rend
313
313
  options, so the server does not know the selected option's label when it writes the input. The
314
314
  script puts the label in as it upgrades the element (decision-62).
315
315
 
316
- A page that renders a `Combobox` loads the script once, as a 5.4 kB (brotli) module without the
317
- Lumiose runtime, and islands bundle it. It defines `lu-combobox`, which upgrades every combobox on
316
+ A page that renders a `Combobox` loads the script once, with the dismissal and placement modules
317
+ it shares with Menu and Popover: 5.8 kB (brotli) without the Lumiose runtime, and an island loads
318
+ the same modules. It defines `lu-combobox`, which upgrades every combobox on
318
319
  the page in place: it reads the selection the server rendered (`aria-selected="true"`), puts its
319
320
  label in the input (text typed before it ran is kept, as a search), renders the chips, and from
320
321
  then on owns the value, the filtering, the popup,
@@ -1,6 +1,6 @@
1
1
  # Context Menu
2
2
 
3
- > A menu opened at the pointer by a right-click in its trigger area, a long press on a touch screen, or Shift+F10 and the ContextMenu key: Menu's popup and items, with Menu's keys, typeahead, submenus and dismissal. A 0.6 kB script on top of Menu's (4.6 kB together) opens it; without JavaScript the browser shows its own menu. `bind:open` (or `open` and `onOpenChange`) keeps a signal in sync in islands.
3
+ > A menu opened at the pointer by a right-click in its trigger area, a long press on a touch screen, or Shift+F10 and the ContextMenu key: Menu's popup and items, with Menu's keys, typeahead, submenus and dismissal. A 0.9 kB script on top of Menu's (5.4 kB together) opens it; without JavaScript the browser shows its own menu. `bind:open` (or `open` and `onOpenChange`) keeps a signal in sync in islands.
4
4
 
5
5
  ```ts
6
6
  import { ContextMenu } from "@lumiose/ui"; // or "@lumiose/ui/context-menu"
@@ -175,8 +175,8 @@ Opening a menu at the pointer needs the script: without JavaScript a right-click
175
175
  browser's own menu, and the popup stays hidden. `open`, `onOpenChange` and `bind:open` need the
176
176
  component to run in an island.
177
177
 
178
- A page that renders a `ContextMenu` loads Menu's script and a 0.6 kB (brotli) one of its own,
179
- 4.6 kB together, without the Lumiose runtime; islands bundle them. The element opens the menu on a
178
+ A page that renders a `ContextMenu` loads Menu's script and a 0.9 kB (brotli) one of its own,
179
+ 5.4 kB together, without the Lumiose runtime; an island loads the same modules. The element opens the menu on a
180
180
  right-click, a long press or the keys, at the pointer, through a zero-size anchor that it moves
181
181
  there (CSS anchor positioning places the popup, with Menu's flips; without it, the shared
182
182
  placement script does). Menu's script does the rest: keys, items, submenus, and dismissal shared
package/docs/dialog.md CHANGED
@@ -221,7 +221,7 @@ server-rendered page works before any script loads, and with none. `open`, `onOp
221
221
 
222
222
  Where the native element falls short of Base UI's dialog, a small script closes the gap: a page
223
223
  that renders a `Dialog` loads it once, as a 1.5 kB (brotli) module without the Lumiose runtime, and
224
- islands bundle it. It covers every `<dialog>` on the page:
224
+ an island loads the same module. It covers every `<dialog>` on the page:
225
225
 
226
226
  - a right-click or a second finger outside does not close the dialog;
227
227
  - `data-nested-dialog-open` and `--lu-nested-dialogs` on a dialog with open dialogs inside;
package/docs/drawer.md CHANGED
@@ -182,8 +182,9 @@ The trigger, the close buttons, Escape and the click outside are HTML features,
182
182
  drawer in a server-rendered page works before any script loads, and with none, against its edge.
183
183
  `open`, `onOpenChange` and `bind:open` need the component to run in an island.
184
184
 
185
- A page that renders a `Drawer` loads Dialog's script and a 1 kB (brotli) one of its own (2.5 kB
186
- together), without the Lumiose runtime; islands bundle them. The drawer's script handles the
185
+ A page that renders a `Drawer` loads Dialog's script and a 1.1 kB (brotli) one of its own (2.8 kB
186
+ together, with the animation module it shares with Toast), without the Lumiose runtime; an island
187
+ loads the same modules. The drawer's script handles the
187
188
  swipe, with the mouse and pen through pointer events and on touch screens through touch events,
188
189
  taking the gesture from scrolling only once it is a swipe.
189
190
 
package/docs/field.md CHANGED
@@ -253,8 +253,8 @@ the message Error's id (`Field.Error` without children or `match`) even when the
253
253
  Errors with children or a `match`. Give a field that must read well without JavaScript a message
254
254
  Error, and its Descriptions before the control.
255
255
 
256
- A page that renders a `Field` loads a 1.7 kB (brotli) script once, without the Lumiose runtime;
257
- islands bundle it. On a submit attempt (a submit button, Enter in a field, `requestSubmit()` or
256
+ A page that renders a `Field` loads a 1.7 kB (brotli) script once, without the Lumiose runtime; an
257
+ island loads the same module. On a submit attempt (a submit button, Enter in a field, `requestSubmit()` or
258
258
  the form's `reportValidity()`; a silent `checkValidity()` changes nothing) it cancels the browser's
259
259
  `invalid` bubble for fields that have an Error part for the problem and shows it there instead (the
260
260
  browser's message, or one your `validate` set), with the timing above, and focuses the first
@@ -2,13 +2,13 @@
2
2
 
3
3
  > Add `@lumiose/ui` to a Lumiose app and import its stylesheets, and the default theme if you want its look. The components then render in server HTML, without an island, and a page loads only the small scripts of the components it renders.
4
4
 
5
- **Status:** `@lumiose/ui` is not on npm yet. In this repository's workspace, an app adds it as
6
- `"@lumiose/ui": "workspace:*"` in its `dependencies`.
5
+ **Status:** in development, on npm with its own 0.x versions, apart from the version the other
6
+ Lumiose packages share.
7
7
 
8
8
  ## Add the package
9
9
 
10
10
  `@lumiose/ui` needs a Lumiose app: it ships its components as TSX, which the app's build compiles
11
- with the app's own code, and `lumiose` is its peer dependency. Once it is on npm:
11
+ with the app's own code, and `lumiose` is its peer dependency. Install it from npm:
12
12
 
13
13
  ```sh
14
14
  pnpm add @lumiose/ui