@raylang/elements 0.7.0 → 0.9.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.
Files changed (58) hide show
  1. package/base.css +1 -1
  2. package/components/accordion/accordion.js +7 -4
  3. package/components/alert/alert.js +2 -1
  4. package/components/attachment/attachment.js +4 -5
  5. package/components/blockquote/blockquote.js +2 -2
  6. package/components/bottom-nav/bottom-nav.js +3 -3
  7. package/components/carousel/carousel.js +22 -10
  8. package/components/checkbox/checkbox.js +5 -2
  9. package/components/checkbox-group/checkbox-group.js +1 -1
  10. package/components/code/code.js +16 -11
  11. package/components/color-picker/color-picker.js +5 -5
  12. package/components/combobox/combobox.js +2 -1
  13. package/components/command-palette/command-palette.js +17 -2
  14. package/components/date-picker/date-picker.js +5 -3
  15. package/components/dialog/dialog.js +1 -1
  16. package/components/doc-tabs/doc-tabs.js +255 -0
  17. package/components/drawer/drawer.js +27 -9
  18. package/components/icon/icon.js +4 -1
  19. package/components/icon-button/icon-button.js +4 -0
  20. package/components/indicator/indicator.js +2 -1
  21. package/components/input/input.js +13 -1
  22. package/components/menu/menu.js +43 -8
  23. package/components/mode-input/mode-input.js +221 -0
  24. package/components/nav-link/nav-link.js +5 -2
  25. package/components/notification/notification.js +15 -12
  26. package/components/progress/progress.js +2 -2
  27. package/components/radio/radio.js +4 -2
  28. package/components/scroll-area/scroll-area.js +14 -11
  29. package/components/search/search.js +3 -3
  30. package/components/segmented-control/segmented-control.js +5 -3
  31. package/components/select/select.js +3 -3
  32. package/components/separator/separator.js +8 -3
  33. package/components/sidebar/sidebar.js +154 -11
  34. package/components/slider/slider.js +5 -2
  35. package/components/split/split.js +25 -7
  36. package/components/stepper/stepper.js +4 -4
  37. package/components/switch/switch.js +3 -3
  38. package/components/table/table.js +5 -5
  39. package/components/tabs/tabs.js +55 -14
  40. package/components/textarea/textarea.js +13 -1
  41. package/components/timeline/timeline.js +13 -8
  42. package/components/toggle-group/toggle-group.js +6 -4
  43. package/core/complete.js +252 -0
  44. package/core/core.js +6 -1
  45. package/core/direction.js +19 -0
  46. package/core/icons.js +12 -0
  47. package/core/position.js +11 -3
  48. package/core/scroll.js +85 -1
  49. package/core/styles.js +1 -1
  50. package/core/textlayer.js +214 -0
  51. package/core.js +1 -0
  52. package/custom-elements.json +1487 -143
  53. package/index.js +2 -0
  54. package/llms-full.txt +224 -28
  55. package/llms.txt +26 -4
  56. package/package.json +9 -1
  57. package/ray-elements.d.ts +190 -31
  58. package/vscode.html-custom-data.json +477 -22
package/index.js CHANGED
@@ -16,6 +16,7 @@ export { RayCombobox } from "./components/combobox/combobox.js";
16
16
  export { RayDatePicker, RayCalendar } from "./components/date-picker/date-picker.js";
17
17
  export { RayFileUpload, parseSize, matchesAccept, describeAccept } from "./components/file-upload/file-upload.js";
18
18
  export { RayInput } from "./components/input/input.js";
19
+ export { RayModeInput } from "./components/mode-input/mode-input.js";
19
20
  export { RayNumberInput, parseNumber, formatNumber } from "./components/number-input/number-input.js";
20
21
  export { RayPasswordInput } from "./components/password-input/password-input.js";
21
22
  export { RayPathInput, dirName, baseName } from "./components/path-input/path-input.js";
@@ -28,6 +29,7 @@ export { RaySwitch } from "./components/switch/switch.js";
28
29
  export { RayTextarea } from "./components/textarea/textarea.js";
29
30
  export { RayBottomNav, RayBottomNavItem } from "./components/bottom-nav/bottom-nav.js";
30
31
  export { RayBreadcrumbs, RayBreadcrumb } from "./components/breadcrumbs/breadcrumbs.js";
32
+ export { RayDocTabs, RayDocTab } from "./components/doc-tabs/doc-tabs.js";
31
33
  export { RayNavLink } from "./components/nav-link/nav-link.js";
32
34
  export { RayPagination, paginationRange } from "./components/pagination/pagination.js";
33
35
  export { RaySidebar, RaySidebarGroup } from "./components/sidebar/sidebar.js";
package/llms-full.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # ray-elements
2
2
 
3
- > Web components (custom elements, Shadow DOM, no dependencies) for any web app: plain HTML, React, Vue or a raylang app. npm: `@raylang/elements`, `@raylang/react`, `@raylang/vue`; raylang: the `elements` package. This file describes version 0.7.0.
3
+ > Web components (custom elements, Shadow DOM, no dependencies) for any web app: plain HTML, React, Vue or a raylang app. npm: `@raylang/elements`, `@raylang/react`, `@raylang/vue`; raylang: the `elements` package. This file describes version 0.9.0.
4
4
 
5
5
  ray-elements is a design system of standard web components (custom elements
6
6
  with Shadow DOM, no dependencies): `<ray-button>`, `<ray-input>`,
@@ -82,7 +82,10 @@ reference of every component follows them.
82
82
  `import { Trash2 } from "lucide-static"; setIcons({ trash: Trash2 })` (or
83
83
  its SVG pasted in, without a bundler); never draw your own paths. To change
84
84
  one control's icon (only the chips' ×), register its role
85
- (`setIcons({ "ui.remove": … })`, roles listed in the reference).
85
+ (`setIcons({ "ui.remove": … })`, roles listed in the reference). Under
86
+ `dir="rtl"` the roles that point along the text (`ui.next`…) mirror by
87
+ themselves; an icon of yours that points (back, send) takes `mirror`
88
+ (`<ray-icon name="arrow-left" mirror>`).
86
89
  - **Overlays are in the top layer**: `ray-dialog` is a native modal
87
90
  `<dialog>`; popovers, menus, tooltips and notifications are `[popover]`
88
91
  elements. Never fight them with `z-index` or `overflow`.
@@ -164,6 +167,21 @@ green a check, red an error, yellow a warning, others info).
164
167
  - App-wide defaults for a component: `configure({ defaults: { "ray-button":
165
168
  { variant: "light" } } })`.
166
169
 
170
+ ## Right to left
171
+
172
+ - `dir="rtl"` on `<html>` (with its `lang`) or a subtree mirrors the
173
+ components: layout, the icons that point along the text, arrow keys
174
+ (ArrowLeft is forward), sliders, carousels, splits and floating panels
175
+ (`bottom-start` lines up with the right edge). Nothing to configure.
176
+ - For a side, write `start`/`end` (they follow the direction):
177
+ `label-position="start"`, `<ray-drawer position="start">`,
178
+ `<ray-sidebar side="end">`, `<ray-toaster position="top-start">`.
179
+ `left`/`right` are sides of the screen whatever the direction; use them
180
+ only when the side is meant (a map's legend).
181
+ - Your own CSS: logical properties (`margin-inline-start`, `inset-inline-end`,
182
+ `text-align: start`), never `left`/`right`; an icon of yours that points
183
+ (back, send) takes `mirror`.
184
+
167
185
  ## React and Vue
168
186
 
169
187
  ```tsx
@@ -238,7 +256,9 @@ fn run() -> Result<int, string> {
238
256
 
239
257
  With the bridge: `<ray-file-upload native>` and `<ray-path-input>` use the
240
258
  system file dialogs and give real paths, `confirmDialog()` asks with the
241
- system dialog, `<ray-menu native>` opens a native context menu,
259
+ system dialog, `<ray-menu native>` opens a native context menu (fill
260
+ items that depend on the click in its `ray-request-open`, not in your own
261
+ `contextmenu` listener),
242
262
  `<ray-command-palette native-menus>` runs the app's menu bar
243
263
  (`bridge.menu`, `bridge.route`), `ray-app-shell` becomes the title bar of a
244
264
  `full_content` window, and `trackEdits(form)` shows the unsaved mark. The
@@ -463,7 +483,7 @@ Properties:
463
483
  - `variant`: `filled` | `outline`, default `filled`, reflects. Checked look: filled box, or colored border and mark.
464
484
  - `color`: string. A palette color or any CSS color for the checked state.
465
485
  - `size`: `xs` | `sm` | `md` | `lg` | `xl`, default `sm`, reflects. Box and font size.
466
- - `labelPosition` (attribute `label-position`): `right` | `left`, default `right`, reflects. Side of the label.
486
+ - `labelPosition` (attribute `label-position`): `end` | `start` | `right` | `left`, default `end`, reflects. Side of the label: start/end follow the writing direction; left/right are sides of the screen.
467
487
 
468
488
  Also the properties of FieldControl: `radius`, `descriptionPosition`.
469
489
 
@@ -877,6 +897,9 @@ Properties:
877
897
  - `size`: `xs` | `sm` | `md` | `lg` | `xl`, default `sm`, reflects. Height and font size.
878
898
  - `radius`: `xs` | `sm` | `md` | `lg` | `xl` | `full`. Corner radius.
879
899
  - `variant`: `default` | `filled` | `unstyled`, default `default`, reflects. Box style.
900
+ - `highlight` (property only): `((text: string) => HighlightRange[]) | null`. Marks ranges of the text, painted behind it: called with the text on every change (typed or set), it returns { start, end, kind?, title? } offsets. kind "error" is red with a wavy underline; any other kind is styled with ::part(highlight-<kind>); title is the tooltip over the range. Ranges must not overlap.
901
+ - `complete` (property only): `((text: string, caret: number) => CompletionResult | null | Promise<CompletionResult | null>) | null`. Inline suggestions: called as the user types (and on Ctrl+Space) with the text and the caret, it returns the part of the text a suggestion would replace and the suggestions ({ from, to, items }), or null for none. A list opens under that part (ArrowUp/Down, Enter or Tab to accept, Escape to close); the chosen item's value replaces from–to as an undoable edit, then ray-complete fires. The field becomes a combobox (aria-autocomplete, aria-expanded, aria-activedescendant).
902
+ - `suggestionsLabel` (attribute `suggestions-label`): string, default `Suggestions`. Accessible name of the suggestion list.
880
903
 
881
904
  Attributes (forwarded to the inner element):
882
905
 
@@ -894,6 +917,7 @@ Attributes (forwarded to the inner element):
894
917
 
895
918
  Events:
896
919
 
920
+ - `ray-complete` (detail `{ item: CompletionItem; from: number; to: number }`): A suggestion was accepted (the text already has it).
897
921
  - `input`: On every edit (value already updated).
898
922
  - `change`: When an edit is committed (blur, Enter).
899
923
 
@@ -909,13 +933,66 @@ Parts (`::part()`):
909
933
  - `label`: The label.
910
934
  - `description`: The description.
911
935
  - `error`: The error message.
936
+ - `suggestions`: The suggestion list (a listbox in the top layer).
937
+ - `suggestion`: Each suggestion ([aria-selected] when active).
938
+ - `highlight`: Each marked range (also highlight-<kind> for a range with a kind).
939
+ - `text-layer`: The layer behind the text that holds the marks.
912
940
 
913
941
  Methods and properties:
914
942
 
915
943
  - `select(): void`: Selects the text.
944
+ - `refreshHighlight(): void`: Runs highlight again, when what it marks changed but the text did not.
916
945
 
917
946
  Vue `v-model`: `value` (updated on input).
918
947
 
948
+ Types:
949
+
950
+ - `{ start: number; end: number; kind?: string; title?: string }`: A range of a field's text to mark (ray-input and ray-textarea highlight): offsets into the text, end excluded.
951
+ - `{ value: string; label?: string; detail?: string; description?: string }`: A suggestion of a field's complete(): value is inserted; label (default: value) and detail are shown, description under them.
952
+ - `{ from: number; to: number; items: CompletionItem[] }`: What complete() returns: the part of the text (offsets, to excluded) a suggestion replaces, and the suggestions.
953
+
954
+ ### Mode input
955
+
956
+ A text field with a menu of modes on one side: choosing a mode applies its attributes to the field (type, placeholder, inputmode, pattern…), so one control says what a value is and the value — a file path or text, an amount in € or $, a search by name or ID. Everything else is ray-input.
957
+
958
+ Import: `import "@raylang/elements/mode-input";` · Category: Inputs
959
+
960
+ #### `<ray-mode-input>` (RayModeInput, extends RayInput)
961
+
962
+ Declare the modes as <option> children (label, data-icon, data-hint, data-description, disabled, and data-set-<attribute> for each attribute the mode sets on the field) or with the options property. A mode's attributes replace the field's own while it is chosen and give them back after. The menu is a ray-menu of radio items in the field's shadow root; Alt+ArrowDown opens it from the field, and the trigger keeps the caret in the field.
963
+
964
+ Properties:
965
+
966
+ - `mode`: string, reflects. The chosen mode's value (default: the first). Setting it applies that mode without ray-mode-change.
967
+ - `options` (property only): `ModeOption[]`. The modes; when not set, the <option> children.
968
+ - `display`: `label` | `icon` | `both`, reflects. What the trigger shows: the mode's hint or label, its icon, or both. Default: the icon when the mode has one, else the label.
969
+ - `position`: `start` | `end`, default `start`, reflects. The side of the field the trigger sits on.
970
+ - `menuLabel` (attribute `menu-label`): string, default `Mode`. The trigger's accessible name, read with the current mode ("Mode: File").
971
+ - `nativeMenu` (attribute `native-menu`): boolean, reflects. With a native host (a std/ui window with the bridge), the system's menu (no descriptions there).
972
+
973
+ Also the properties of RayInput (`<ray-input>`): `value`, `type`, `name`, `label`, `description`, `descriptionPosition`, `error`, `placeholder`, `required`, `disabled`, `readonly`, `size`, `radius`, `variant`, `highlight`, `complete`, `suggestionsLabel`.
974
+
975
+ Events:
976
+
977
+ - `ray-mode-change` (detail `{ mode: string; previous: string | null; option: ModeOption }`): The user chose a mode (mode is already the new one); cancelable: preventDefault keeps the previous mode.
978
+
979
+ Parts (`::part()`):
980
+
981
+ - `trigger`: The button that opens the menu.
982
+ - `trigger-icon`: The current mode's icon in the trigger.
983
+ - `trigger-label`: The current mode's hint or label in the trigger.
984
+ - `menu`: The ray-menu of modes.
985
+
986
+ Methods and properties:
987
+
988
+ - `readonly modes: ModeOption[]`: The modes in use.
989
+ - `readonly currentOption: ModeOption | null`: The chosen mode.
990
+ - `choose(value: string): void`: Chooses a mode as the user would (fires ray-mode-change).
991
+
992
+ Types:
993
+
994
+ - `{ value: string; label: string; icon?: string; hint?: string; description?: string; disabled?: boolean; attrs?: Record<string, string> }`: A mode of ray-mode-input: hint is the trigger's short text ("€"), attrs the attributes it sets on the field.
995
+
919
996
  ### Number input
920
997
 
921
998
  A number field (Mantine's NumberInput): + and − buttons (hold to repeat), arrow keys, min, max and step, fixed decimals, a prefix and a suffix, a thousands separator, or a duration (m:ss). An ARIA spinbutton.
@@ -989,7 +1066,7 @@ Properties:
989
1066
  - `showLabel` (attribute `show-label`): string, default `Show password`. Accessible name of the toggle while hidden.
990
1067
  - `hideLabel` (attribute `hide-label`): string, default `Hide password`. Accessible name of the toggle while shown.
991
1068
 
992
- Also the properties of RayInput (`<ray-input>`): `value`, `type`, `name`, `label`, `description`, `descriptionPosition`, `error`, `placeholder`, `required`, `disabled`, `readonly`, `size`, `radius`, `variant`.
1069
+ Also the properties of RayInput (`<ray-input>`): `value`, `type`, `name`, `label`, `description`, `descriptionPosition`, `error`, `placeholder`, `required`, `disabled`, `readonly`, `size`, `radius`, `variant`, `highlight`, `complete`, `suggestionsLabel`.
993
1070
 
994
1071
  Events:
995
1072
 
@@ -1016,7 +1093,7 @@ Properties:
1016
1093
  - `browseLabel` (attribute `browse-label`): string, default `Browse…`. Text of the button.
1017
1094
  - `dialogTitle` (attribute `dialog-title`): string. Title of the system dialog (default: the label).
1018
1095
 
1019
- Also the properties of RayInput (`<ray-input>`): `value`, `type`, `name`, `label`, `description`, `descriptionPosition`, `error`, `placeholder`, `required`, `disabled`, `readonly`, `size`, `radius`, `variant`.
1096
+ Also the properties of RayInput (`<ray-input>`): `value`, `type`, `name`, `label`, `description`, `descriptionPosition`, `error`, `placeholder`, `required`, `disabled`, `readonly`, `size`, `radius`, `variant`, `highlight`, `complete`, `suggestionsLabel`.
1020
1097
 
1021
1098
  Events:
1022
1099
 
@@ -1334,7 +1411,7 @@ Properties:
1334
1411
  - `label`: string. Label text (or the content).
1335
1412
  - `description`: string. Help text.
1336
1413
  - `error`: string. Error text.
1337
- - `labelPosition` (attribute `label-position`): `right` | `left`, default `right`, reflects. Side of the label.
1414
+ - `labelPosition` (attribute `label-position`): `end` | `start` | `right` | `left`, default `end`, reflects. Side of the label: start/end follow the writing direction; left/right are sides of the screen.
1338
1415
  - `color`: string. Track color when on.
1339
1416
  - `size`: `xs` | `sm` | `md` | `lg` | `xl`, default `sm`, reflects. Track size.
1340
1417
  - `disabled`: boolean. Not interactive nor submitted.
@@ -1383,6 +1460,9 @@ Properties:
1383
1460
  - `readonly`: boolean. Not editable, still submitted.
1384
1461
  - `size`: `xs` | `sm` | `md` | `lg` | `xl`, default `sm`, reflects. Font size.
1385
1462
  - `variant`: `default` | `filled` | `unstyled`, default `default`, reflects. Box style.
1463
+ - `highlight` (property only): `((text: string) => HighlightRange[]) | null`. Marks ranges of the text, painted behind it: called with the text on every change (typed or set), it returns { start, end, kind?, title? } offsets. kind "error" is red with a wavy underline; any other kind is styled with ::part(highlight-<kind>); title is the tooltip over the range. Ranges must not overlap.
1464
+ - `complete` (property only): `((text: string, caret: number) => CompletionResult | null | Promise<CompletionResult | null>) | null`. Inline suggestions: called as the user types (and on Ctrl+Space) with the text and the caret, it returns the part of the text a suggestion would replace and the suggestions ({ from, to, items }), or null for none. A list opens under that part (ArrowUp/Down, Enter or Tab to accept, Escape to close); the chosen item's value replaces from–to as an undoable edit, then ray-complete fires. The field becomes a combobox (aria-autocomplete, aria-expanded, aria-activedescendant).
1465
+ - `suggestionsLabel` (attribute `suggestions-label`): string, default `Suggestions`. Accessible name of the suggestion list.
1386
1466
 
1387
1467
  Also the properties of FieldControl: `radius`.
1388
1468
 
@@ -1396,6 +1476,7 @@ Attributes (forwarded to the inner element):
1396
1476
 
1397
1477
  Events:
1398
1478
 
1479
+ - `ray-complete` (detail `{ item: CompletionItem; from: number; to: number }`): A suggestion was accepted (the text already has it).
1399
1480
  - `input`: On every edit.
1400
1481
  - `change`: When an edit is committed.
1401
1482
 
@@ -1403,6 +1484,14 @@ Parts (`::part()`):
1403
1484
 
1404
1485
  - `textarea`: The inner <textarea>.
1405
1486
  - `wrapper`: The box.
1487
+ - `suggestions`: The suggestion list (a listbox in the top layer).
1488
+ - `suggestion`: Each suggestion ([aria-selected] when active).
1489
+ - `highlight`: Each marked range (also highlight-<kind> for a range with a kind).
1490
+ - `text-layer`: The layer behind the text that holds the marks.
1491
+
1492
+ Methods and properties:
1493
+
1494
+ - `refreshHighlight(): void`: Runs highlight again, when what it marks changed but the text did not.
1406
1495
 
1407
1496
  Vue `v-model`: `value` (updated on input).
1408
1497
 
@@ -1525,6 +1614,66 @@ Parts (`::part()`):
1525
1614
  - `separator`: The separator before it.
1526
1615
  - `more`: The "…" button of a collapsed path.
1527
1616
 
1617
+ ### Document tabs
1618
+
1619
+ The tabs of open documents (an editor's, a browser's): closable, with an unsaved mark, all over one shared panel; WAI-ARIA tabs with arrows, Home/End and Delete to close. The app closes them: ray-request-close asks.
1620
+
1621
+ Import: `import "@raylang/elements/doc-tabs";` · Category: Navigation
1622
+
1623
+ #### `<ray-doc-tabs>` (RayDocTabs, extends RayElement)
1624
+
1625
+ Unlike ray-tabs, a tab has no panel of its own: they all control the element named by panel, whose content the app fills for the selected one. Closing is the app's: the ×, a middle click or Delete/Backspace fire ray-request-close, and the app removes the tab (after asking about unsaved changes, if it must). When the selected tab is removed, the one at its place is selected (change) and, if the closed tab had the focus, focused. More tabs than width: the bar scrolls sideways, fades the edge that hides tabs (data-overflow-start / data-overflow-end on the host), scrolls with a vertical wheel and keeps the selected tab in view.
1626
+
1627
+ Properties:
1628
+
1629
+ - `value`: string. Value of the selected tab (default: the first).
1630
+ - `panel`: string. The id of the shared panel: it gets role=tabpanel and aria-labelledby the selected tab; the tabs get aria-controls.
1631
+ - `label`: string. Accessible name of the tab list ("Open requests").
1632
+ - `closeLabel` (attribute `close-label`): string, default `Close`. Tooltip of the ×.
1633
+ - `dirtyLabel` (attribute `dirty-label`): string, default `Unsaved changes`. What assistive technology hears after the name of a dirty tab.
1634
+
1635
+ Events:
1636
+
1637
+ - `change`: The selected tab changed: a click, the arrow keys, or the selected tab removed.
1638
+ - `ray-request-close` (detail `{ value: string; tab: RayDocTab; source: "button" | "middle" | "key" }`): The × was clicked, the tab middle-clicked, or Delete/Backspace pressed on it: remove the tab to close it (not fired for hide-close tabs).
1639
+
1640
+ Slots:
1641
+
1642
+ - (default): ray-doc-tab elements.
1643
+ - `end`: After the tabs, outside the scrolling list: a new-tab button.
1644
+
1645
+ Parts (`::part()`):
1646
+
1647
+ - `list`: The tab list (it scrolls sideways when the tabs do not fit).
1648
+ - `end`: The end slot's box.
1649
+
1650
+ Methods and properties:
1651
+
1652
+ - `readonly tabs: RayDocTab[]`: Its tabs, in order.
1653
+ - `readonly panelElement: HTMLElement | null`: The shared panel, found by the panel id.
1654
+
1655
+ #### `<ray-doc-tab>` (RayDocTab, extends RayElement)
1656
+
1657
+ A document's tab: an icon or tag (slot left), its name (cut with an ellipsis; give the full one in title), and the × or the unsaved dot.
1658
+
1659
+ Properties:
1660
+
1661
+ - `value`: string, reflects. Identifies the document (ray-doc-tabs value).
1662
+ - `dirty`: boolean, reflects. Unsaved changes: a dot in place of the ×, which comes back under the pointer.
1663
+ - `hideClose` (attribute `hide-close`): boolean, reflects. Cannot be closed: no ×, no middle click, no Delete.
1664
+
1665
+ Slots:
1666
+
1667
+ - (default): The document's name.
1668
+ - `left`: An icon or a tag (a file type, an HTTP method).
1669
+
1670
+ Parts (`::part()`):
1671
+
1672
+ - `label`: The name.
1673
+ - `left-section`: The left slot's box.
1674
+ - `close`: The × (pointer only: it is not focusable).
1675
+ - `dot`: The unsaved mark.
1676
+
1528
1677
  ### Nav link
1529
1678
 
1530
1679
  A sidebar/navigation item: icon, label, description, badge, active state, and nested nav links that collapse under it.
@@ -1622,7 +1771,7 @@ Exports (from `@raylang/elements/pagination` and `@raylang/elements`):
1622
1771
 
1623
1772
  ### Sidebar
1624
1773
 
1625
- The side navigation of an app shell: header, content and footer; on wide screens it collapses to an icon rail, below a breakpoint it becomes an off-canvas drawer. toggle() does the right thing for the screen.
1774
+ The side navigation of an app shell: header, content and footer; on wide screens it collapses to an icon rail (or out of view), below a breakpoint it becomes an off-canvas drawer. toggle() does the right thing for the screen. It is for navigation, a list of places with icons; for content such as a tree of documents, a panel that hides and resizes, put your own element in the start pane of a ray-split (min, max, autosave, collapsed).
1626
1775
 
1627
1776
  Import: `import "@raylang/elements/sidebar";` · Category: Navigation
1628
1777
 
@@ -1632,17 +1781,24 @@ Put ray-sidebar-group + ray-nav-link (with an icon in slot=left) inside. Collaps
1632
1781
 
1633
1782
  Properties:
1634
1783
 
1635
- - `collapsed`: boolean, reflects. Wide screens: an icon rail instead of the full panel.
1784
+ - `collapsed`: boolean, reflects. Wide screens: collapsed as collapse says (an icon rail, or out of view).
1785
+ - `collapse`: `icon` | `offcanvas`, default `icon`, reflects. What collapsed does on wide screens: icon, a rail of the nav links' icons; offcanvas, hidden entirely (no width, out of the tab order).
1636
1786
  - `open`: boolean, reflects. Narrow screens: the drawer is shown (modal, focus trapped; Escape, backdrop click or a followed link close it).
1637
- - `side`: `left` | `right`, default `left`, reflects. The edge it sits on.
1787
+ - `side`: `start` | `end` | `left` | `right`, default `start`, reflects. The edge it sits on (its border faces the content, its narrow-screen drawer slides from there): start/end follow the writing direction; left/right are sides of the screen.
1638
1788
  - `variant`: `sidebar` | `floating`, default `sidebar`, reflects. A panel against the edge, or a floating card with a margin.
1639
1789
  - `width`: string. Width when expanded (CSS length). Default 16rem.
1640
1790
  - `collapsedWidth` (attribute `collapsed-width`): string. Width of the icon rail. Default 3.5rem.
1641
1791
  - `breakpoint`: string, default `48em`. At this viewport width and below, it becomes a drawer.
1642
1792
  - `label`: string, default `Sidebar`. Accessible name of its navigation.
1793
+ - `resizable`: boolean, reflects. Wide screens, expanded: its inner edge drags (or, focused, arrow-keys; Shift is faster, Home/End go to the limits) the width between min-width and max-width.
1794
+ - `minWidth` (attribute `min-width`): number, default `192`. Narrowest width when resizing, in px.
1795
+ - `maxWidth` (attribute `max-width`): number, default `480`. Widest width when resizing, in px.
1796
+ - `autosave`: string. A key: the resized width is saved in localStorage and restored. A later change of width wins.
1797
+ - `resizeLabel` (attribute `resize-label`): string, default `Resize sidebar`. Accessible name of the resize edge.
1643
1798
 
1644
1799
  Events:
1645
1800
 
1801
+ - `ray-resize` (detail `{ width: number }`): After a drag or a key resized it (resizable).
1646
1802
  - `ray-toggle` (detail `{ collapsed: boolean; open: boolean; mobile: boolean }`): After toggle().
1647
1803
  - `ray-open`: The drawer opened (narrow screens).
1648
1804
  - `ray-close`: The drawer closed (narrow screens).
@@ -1659,6 +1815,7 @@ Parts (`::part()`):
1659
1815
  - `header`: The header area.
1660
1816
  - `content`: The scrolling <nav>.
1661
1817
  - `footer`: The footer area.
1818
+ - `resizer`: The resize edge (a separator), shown when resizable.
1662
1819
  - `drawer`: The <dialog> used on narrow screens.
1663
1820
 
1664
1821
  Methods and properties:
@@ -1697,7 +1854,7 @@ Properties:
1697
1854
 
1698
1855
  - `active`: number, default `0`, reflects. Index of the active step (steps.length: completed).
1699
1856
  - `orientation`: `horizontal` | `vertical`, default `horizontal`, reflects. Steps in a row above the content, or in a column beside it.
1700
- - `iconPosition` (attribute `icon-position`): `left` | `top`, default `left`, reflects. Label beside the number, or under it (narrow screens, many steps).
1857
+ - `iconPosition` (attribute `icon-position`): `start` | `top` | `left`, default `start`, reflects. Label beside the number (after it in the reading direction), or under it (narrow screens, many steps). "left", its former name, still works.
1701
1858
  - `allowStepSelect` (attribute `allow-step-select`): boolean, reflects. Completed steps are buttons that go back to them.
1702
1859
  - `linear`: boolean, default `true`. With allow-step-select off, false lets the user jump to any step.
1703
1860
  - `size`: `sm` | `md` | `lg`, default `md`, reflects. Size of the numbers.
@@ -1757,12 +1914,15 @@ Import: `import "@raylang/elements/tabs";` · Category: Navigation
1757
1914
 
1758
1915
  #### `<ray-tabs>` (RayTabs, extends RayElement)
1759
1916
 
1917
+ More tabs than width: the list scrolls sideways, fades the edge that hides tabs, scrolls with a vertical wheel and keeps the selected tab in view. The host then carries data-overflow-start and data-overflow-end (following the writing direction), to style it further.
1918
+
1760
1919
  Properties:
1761
1920
 
1762
1921
  - `value`: string. Value of the active tab (default: the first enabled one).
1763
1922
  - `variant`: `default` | `outline` | `pills`, default `default`, reflects. Tab style.
1764
1923
  - `orientation`: `horizontal` | `vertical`, default `horizontal`, reflects. Tab list direction (and arrow keys).
1765
1924
  - `color`: string, reflects. Active indicator color.
1925
+ - `size`: `xs` | `sm` | `md` | `lg` | `xl`, default `sm`, reflects. Height, font size and padding of the tabs (xs for a compact bar).
1766
1926
  - `activation`: `auto` | `manual`, default `auto`. manual: arrows move focus, Enter/Space activates.
1767
1927
  - `grow`: boolean, reflects. Tabs share the full width.
1768
1928
 
@@ -1776,7 +1936,7 @@ Slots:
1776
1936
 
1777
1937
  Parts (`::part()`):
1778
1938
 
1779
- - `list`: The tab list.
1939
+ - `list`: The tab list (it scrolls sideways when the tabs do not fit).
1780
1940
  - `panels`: The panel area.
1781
1941
 
1782
1942
  Methods and properties:
@@ -1792,11 +1952,16 @@ Properties:
1792
1952
 
1793
1953
  - `value`: string, reflects. Matches a ray-tab-panel's value.
1794
1954
  - `disabled`: boolean, reflects. Cannot be activated.
1955
+ - `count`: string, reflects. A small number after the label ("3", "99+"), lighter than a badge; part of the tab's accessible name. Empty: none.
1795
1956
 
1796
1957
  Slots:
1797
1958
 
1798
1959
  - `left`: Icon.
1799
- - `right`: Badge or count.
1960
+ - `right`: A badge or other content after the label (for a plain number, count is lighter).
1961
+
1962
+ Parts (`::part()`):
1963
+
1964
+ - `count`: The count.
1800
1965
 
1801
1966
  #### `<ray-tab-panel>` (RayTabPanel, extends RayElement)
1802
1967
 
@@ -1825,6 +1990,9 @@ Properties:
1825
1990
  - `emptyLabel` (attribute `empty-label`): string, default `Nothing found`. Text without results.
1826
1991
  - `label`: string, default `Command palette`. Accessible name.
1827
1992
  - `hideHint` (attribute `hide-hint`): boolean, reflects. No keyboard hint at the bottom.
1993
+ - `navigateLabel` (attribute `navigate-label`): string, default `navigate`. The keyboard hint's word for ↑↓.
1994
+ - `runLabel` (attribute `run-label`): string, default `run`. The keyboard hint's word for ↵.
1995
+ - `closeLabel` (attribute `close-label`): string, default `close`. The keyboard hint's word for esc.
1828
1996
  - `nativeMenus` (attribute `native-menus`): boolean, reflects. With a native host (ray-elements/core/raylang.js in a std/ui window, menus declared with elements/bridge), also lists the app's menu bar, grouped by menu with its shortcuts; running one gives the program the menu's own event.
1829
1997
  - `overlayBlur` (attribute `overlay-blur`): string. Blur of the page behind: px ("8"), a CSS length or "none". Default: --ray-overlay-blur ([overlay] blur in tokens.toml).
1830
1998
 
@@ -1855,7 +2023,7 @@ Exports (from `@raylang/elements/command-palette` and `@raylang/elements`):
1855
2023
 
1856
2024
  Types:
1857
2025
 
1858
- - `{ id?: string; label: string; description?: string; group?: string; keywords?: string | string[]; shortcut?: string; icon?: string | Node; disabled?: boolean; native?: boolean; tag?: string; onSelect?: (action: CommandAction) => void }`: An action of ray-command-palette.
2026
+ - `{ id?: string; label: string; description?: string; group?: string; keywords?: string | string[]; shortcut?: string; icon?: string | Node; prefix?: string | Node; disabled?: boolean; native?: boolean; tag?: string; onSelect?: (action: CommandAction) => void }`: An action of ray-command-palette. icon is a 1.25rem square (a registered icon name, text or a Node); prefix is content of any width before the label (text or a Node, e.g. a ray-badge with an HTTP method), not searched.
1859
2027
 
1860
2028
  #### In a raylang app
1861
2029
 
@@ -1969,7 +2137,7 @@ Properties:
1969
2137
  - `open`: boolean, reflects. Shown.
1970
2138
  - `label`: string. Heading (also the accessible name).
1971
2139
  - `description`: string. A line under the title (the drawer's accessible description).
1972
- - `position`: `right` | `left` | `top` | `bottom`, default `right`, reflects. The edge it slides from.
2140
+ - `position`: `end` | `start` | `right` | `left` | `top` | `bottom`, default `end`, reflects. The edge it slides from: start/end follow the writing direction; left/right are sides of the screen.
1973
2141
  - `size`: `"xs" | "sm" | "md" | "lg" | "xl" | "full" | (string & {})`, default `md`, reflects. Width (left/right) or height (top/bottom): xs…xl, full, or any CSS length.
1974
2142
  - `modeless`: boolean, reflects. No backdrop nor scroll lock: the page stays interactive (a side panel).
1975
2143
  - `floating`: boolean, reflects. Detached from the edge, with rounded corners.
@@ -2013,7 +2181,7 @@ Import: `import "@raylang/elements/menu";` · Category: Overlays
2013
2181
  Properties:
2014
2182
 
2015
2183
  - `open`: boolean, reflects. Shown.
2016
- - `placement`: `bottom-start` | `bottom` | `bottom-end` | `top-start` | `top` | `top-end` | `right-start` | `left-start`, default `bottom-start`, reflects. Preferred side and alignment.
2184
+ - `placement`: `bottom-start` | `bottom` | `bottom-end` | `top-start` | `top` | `top-end` | `right-start` | `left-start`, default `bottom-start`, reflects. Preferred side and alignment: top/bottom/left/right are sides of the screen; on top and bottom, -start/-end follow the writing direction (right to left, "bottom-start" lines up the right edges).
2017
2185
  - `context`: boolean, reflects. Opens on right click (contextmenu) over the trigger area, at the pointer.
2018
2186
  - `keepOpen` (attribute `keep-open`): boolean, reflects. Choosing an item does not close the menu.
2019
2187
  - `native`: boolean, reflects. With a native host (ray-elements/core/raylang.js in a std/ui window), opens as the system's context menu at the pointer: items and dividers, same ray-select.
@@ -2023,6 +2191,7 @@ Also the properties of Floating: `offset`.
2023
2191
  Events:
2024
2192
 
2025
2193
  - `ray-select` (detail `{ value: string; item: RayMenuItem }`): An item was chosen; detail: { value, item }.
2194
+ - `ray-request-open` (detail `{ event: Event }`): Its trigger is about to open it (click, Arrow keys, right click), before the items are read, native menu included: fill items that depend on what was clicked here. Cancelable (preventDefault keeps it closed). Not fired by show() or open = true. detail: { event }.
2026
2195
  - `ray-open`: After it opened.
2027
2196
  - `ray-close`: After it closed.
2028
2197
 
@@ -2053,6 +2222,9 @@ Properties:
2053
2222
  - `value`: string, reflects. Reported in ray-select (default: the text).
2054
2223
  - `disabled`: boolean, reflects. Skipped by the keyboard, cannot be chosen.
2055
2224
  - `color`: string, reflects. Text and hover color (e.g. red for destructive actions).
2225
+ - `type`: `item` | `checkbox` | `radio`, default `item`, reflects. checkbox: choosing it toggles checked (menuitemcheckbox); radio: choosing it checks it and unchecks the radio items of the menu with the same name (menuitemradio). Both show a check mark when checked, in the native menu too.
2226
+ - `checked`: boolean, reflects. Checked (checkbox and radio items). Already updated when ray-select fires.
2227
+ - `name`: string, reflects. The group of a radio item: one checked per name in the menu.
2056
2228
 
2057
2229
  Slots:
2058
2230
 
@@ -2060,6 +2232,14 @@ Slots:
2060
2232
  - `left`: Icon.
2061
2233
  - `right`: Shortcut or badge.
2062
2234
 
2235
+ Parts (`::part()`):
2236
+
2237
+ - `mark`: The check mark of a checkbox or radio item.
2238
+
2239
+ Methods and properties:
2240
+
2241
+ - `readonly checkable: boolean`: Whether type is checkbox or radio.
2242
+
2063
2243
  #### `<ray-menu-label>` (RayMenuLabel, extends RayElement)
2064
2244
 
2065
2245
  A section caption inside the menu.
@@ -2082,7 +2262,16 @@ With `native` and [the native bridge](https://elements.raylang.dev/raylang.html#
2082
2262
  </ray-menu>
2083
2263
  ```
2084
2264
 
2085
- Labels, nested menus, icons and colors are the page menu's only. A dismissed native menu fires nothing.
2265
+ Checkbox and radio items show their check mark there too. Labels, nested menus, icons and colors are the page menu's only. A dismissed native menu fires nothing.
2266
+
2267
+ The native menu reads its items the moment it opens, so items that depend on what was clicked go in `ray-request-open`, which comes first (a `contextmenu` listener of your own on the trigger may run after the menu's):
2268
+
2269
+ ```js
2270
+ menu.addEventListener("ray-request-open", (e) => {
2271
+ const row = e.detail.event.target.closest(".file-row");
2272
+ menu.replaceChildren(menu.querySelector("[slot=trigger]"), ...itemsFor(row));
2273
+ });
2274
+ ```
2086
2275
 
2087
2276
  ### Popover
2088
2277
 
@@ -2097,7 +2286,7 @@ Positioned in JS (flip + shift to stay in the viewport). JS: show(), hide(), tog
2097
2286
  Properties:
2098
2287
 
2099
2288
  - `open`: boolean, reflects. Shown.
2100
- - `placement`: `bottom` | `bottom-start` | `bottom-end` | `top` | `top-start` | `top-end` | `left` | `left-start` | `left-end` | `right` | `right-start` | `right-end`, default `bottom`, reflects. Preferred side and alignment.
2289
+ - `placement`: `bottom` | `bottom-start` | `bottom-end` | `top` | `top-start` | `top-end` | `left` | `left-start` | `left-end` | `right` | `right-start` | `right-end`, default `bottom`, reflects. Preferred side and alignment: top/bottom/left/right are sides of the screen; on top and bottom, -start/-end follow the writing direction (right to left, "bottom-start" lines up the right edges).
2101
2290
  - `offset`: number, default `8`. Gap to the trigger in px.
2102
2291
  - `width`: string. Panel width (px number or CSS length). Default: its content.
2103
2292
  - `matchWidth` (attribute `match-width`): boolean. At least as wide as the trigger.
@@ -2138,7 +2327,7 @@ Import: `import "@raylang/elements/tooltip";` · Category: Overlays
2138
2327
  Properties:
2139
2328
 
2140
2329
  - `label`: string. Tooltip text.
2141
- - `placement`: `top` | `bottom` | `left` | `right` | `top-start` | `top-end` | `bottom-start` | `bottom-end`, default `top`, reflects. Preferred side.
2330
+ - `placement`: `top` | `bottom` | `left` | `right` | `top-start` | `top-end` | `bottom-start` | `bottom-end`, default `top`, reflects. Preferred side; -start/-end follow the writing direction.
2142
2331
  - `openDelay` (attribute `open-delay`): number, default `300`. ms before showing.
2143
2332
  - `closeDelay` (attribute `close-delay`): number, default `0`. ms before hiding.
2144
2333
  - `color`: string. A palette color or any CSS color. Default: inverted foreground/background.
@@ -2174,7 +2363,7 @@ Properties:
2174
2363
  - `value`: `string | string[] | undefined`. Open item's value; with multiple, an array (attribute: comma-separated).
2175
2364
  - `multiple`: boolean, reflects. Several items may be open.
2176
2365
  - `variant`: `default` | `contained` | `separated` | `filled`, default `default`, reflects. Visual style.
2177
- - `chevronPosition` (attribute `chevron-position`): `right` | `left`, default `right`, reflects. Side of the chevron.
2366
+ - `chevronPosition` (attribute `chevron-position`): `end` | `start` | `right` | `left`, default `end`, reflects. Side of the chevron: start/end follow the writing direction; left/right are sides of the screen.
2178
2367
 
2179
2368
  Events:
2180
2369
 
@@ -2415,7 +2604,7 @@ Import: `import "@raylang/elements/code";` · Category: Data display
2415
2604
 
2416
2605
  #### `<ray-code>` (RayCode, extends RayElement)
2417
2606
 
2418
- The code comes from the code property, a <script type="text/plain"> child (raw text: anything but a closing script tag), a <template> child (parsed as HTML: the easiest for markup, but a < that is not a tag, as in Promise<void>, breaks it), or the element's text; common indentation and blank edges are removed. Built-in languages: js/ts (jsx, tsx), json, html/xml/svg/vue, css, shell, ray and diff; others show as plain text. Library classes painted with the tokens: Prism's .token.*, highlight.js's .hljs-*, and Shiki's css-variables theme.
2607
+ The code comes from the code property, a <script type="text/plain"> child (raw text: anything but a closing script tag), a <template> child (parsed as HTML: the easiest for markup, but a < that is not a tag, as in Promise<void>, breaks it), or the element's text; common indentation and blank edges are removed (not with verbatim). Built-in languages: js/ts (jsx, tsx), json, html/xml/svg/vue, css, shell, ray and diff; others show as plain text. Library classes painted with the tokens: Prism's .token.*, highlight.js's .hljs-*, and Shiki's css-variables theme.
2419
2608
 
2420
2609
  Properties:
2421
2610
 
@@ -2425,6 +2614,7 @@ Properties:
2425
2614
  - `lineNumbers` (attribute `line-numbers`): boolean, reflects. Numbers each line (not copied, not selectable).
2426
2615
  - `highlight`: string. Lines to highlight: "3, 5-7".
2427
2616
  - `wrap`: boolean, reflects. Wraps long lines instead of scrolling sideways.
2617
+ - `verbatim`: boolean, reflects. Shows and copies the text exactly as given: no common indentation or blank first and last lines removed. For data (a response body, a log) rather than code written in the page.
2428
2618
  - `maxHeight` (attribute `max-height`): string. Height before it scrolls: px as a number, or a CSS length. A taller block gets a "Show all N lines" button.
2429
2619
  - `expanded`: boolean, reflects. Shown whole, past max-height.
2430
2620
  - `hideCopy` (attribute `hide-copy`): boolean, reflects. No copy button.
@@ -2474,6 +2664,7 @@ Properties:
2474
2664
 
2475
2665
  - `name`: `IconName`, reflects. Registered icon name (iconNames()); "none" draws nothing, a blank that keeps the alignment (a menu item without its check).
2476
2666
  - `filled`: boolean, reflects. The filled version, for a state (active, selected, favorite, unread); the outline icon when there is none. Built in: user, info, circle-check, alert-triangle, circle-x, folder, bell, star, settings, home, message-circle.
2667
+ - `mirror`: boolean, reflects. Mirrored in a right-to-left context (dir="rtl"), for an icon that points along the text: back, forward, send, undo. The roles that do (ui.next, ui.previous, ui.first, ui.last, ui.disclosure, ui.separator) mirror by themselves.
2477
2668
  - `size`: string, reflects. xs…xl or any CSS length. Default: 1em.
2478
2669
  - `label`: string. Accessible name; without it the icon is decorative (hidden from screen readers).
2479
2670
  - `color`: string, reflects. A palette color or any CSS color. Default: the text color.
@@ -2629,7 +2820,7 @@ A list (role="list") of ray-timeline-item.
2629
2820
  Properties:
2630
2821
 
2631
2822
  - `active`: number, default `-1`, reflects. Index of the last reached item (-1: none).
2632
- - `align`: `left` | `right`, default `left`, reflects. Side of the line.
2823
+ - `align`: `start` | `end` | `left` | `right`, default `start`, reflects. Side of the line: start/end follow the writing direction; left/right are sides of the screen.
2633
2824
  - `bulletSize` (attribute `bullet-size`): string. Bullet size: px as a number or a CSS length (default 20px).
2634
2825
  - `lineWidth` (attribute `line-width`): number. Line width in px (default 2).
2635
2826
  - `color`: string, reflects. A palette color or any CSS color for what is reached (default: primary).
@@ -2760,7 +2951,7 @@ Created by notify() when missing; add one yourself to choose its position. A sta
2760
2951
 
2761
2952
  Properties:
2762
2953
 
2763
- - `position`: `bottom-right` | `bottom-left` | `bottom-center` | `top-right` | `top-left` | `top-center`, default `bottom-right`, reflects. Corner of the stack.
2954
+ - `position`: `bottom-end` | `bottom-start` | `bottom-center` | `top-end` | `top-start` | `top-center` | `bottom-right` | `bottom-left` | `top-right` | `top-left`, default `bottom-end`, reflects. Corner of the stack: -start/-end follow the writing direction; -left/-right are sides of the screen.
2764
2955
  - `limit`: number, default `5`. Maximum kept; the oldest go first.
2765
2956
  - `visible`: number, default `3`. Toasts shown in the collapsed stack (the rest wait, hidden).
2766
2957
  - `expand`: boolean, reflects. Always expanded: a list instead of a stack.
@@ -3177,7 +3368,7 @@ Properties:
3177
3368
 
3178
3369
  Events:
3179
3370
 
3180
- - `ray-reach-end` (detail `{ edge: "bottom" | "right" }`): The end came within threshold (once per arrival).
3371
+ - `ray-reach-end` (detail `{ edge: "bottom" | "right" | "left" }`): The end came within threshold (once per arrival): the bottom, or the right when horizontal (the left right to left).
3181
3372
 
3182
3373
  Slots:
3183
3374
 
@@ -3191,8 +3382,8 @@ Parts (`::part()`):
3191
3382
  Methods and properties:
3192
3383
 
3193
3384
  - `readonly viewport: HTMLElement`: The scrolling element (scrollTop, scrollTo…).
3194
- - `scrollToStart(options?: { behavior?: ScrollBehavior }): void`: Scrolls to the top (left).
3195
- - `scrollToEnd(options?: { behavior?: ScrollBehavior }): void`: Scrolls to the bottom (right when horizontal).
3385
+ - `scrollToStart(options?: { behavior?: ScrollBehavior }): void`: Scrolls to the start: the top, or the left when horizontal (the right right to left).
3386
+ - `scrollToEnd(options?: { behavior?: ScrollBehavior }): void`: Scrolls to the end: the bottom, or the right when horizontal (the left right to left).
3196
3387
 
3197
3388
  ### Separator
3198
3389
 
@@ -3206,7 +3397,7 @@ Properties:
3206
3397
 
3207
3398
  - `orientation`: `horizontal` | `vertical`, default `horizontal`, reflects. Direction of the rule.
3208
3399
  - `label`: string, reflects. Text in the middle of a horizontal rule.
3209
- - `labelPosition` (attribute `label-position`): `left` | `center` | `right`, default `center`, reflects. Where the label sits.
3400
+ - `labelPosition` (attribute `label-position`): `start` | `center` | `end` | `left` | `right`, default `center`, reflects. Where the label sits: start/end follow the writing direction; left/right are sides of the screen.
3210
3401
  - `size`: `xs` | `sm` | `md` | `lg` | `xl`, default `xs`, reflects. Thickness (1–5px).
3211
3402
  - `variant`: `solid` | `dashed` | `dotted`, default `solid`, reflects. Line style.
3212
3403
 
@@ -3233,7 +3424,7 @@ Properties:
3233
3424
  - `max`: number. Maximum size of the start pane in px.
3234
3425
  - `collapsed`: boolean, reflects. The start pane is hidden.
3235
3426
  - `disabled`: boolean, reflects. The divider cannot be moved.
3236
- - `autosave`: string. A key: the size is saved in localStorage and restored.
3427
+ - `autosave`: string. A key: the size and the collapsed state are saved in localStorage and restored (a saved state wins over the collapsed attribute).
3237
3428
 
3238
3429
  Events:
3239
3430
 
@@ -3777,6 +3968,7 @@ export declare const srOnlyStyles: CSSStyleSheet;
3777
3968
  // --- positioning and focus ---------------------------------------------------
3778
3969
 
3779
3970
  export interface PlaceOptions {
3971
+ /** side[-align]: top|bottom|left|right, -start|-end; on top/bottom, -start/-end follow the writing direction. */
3780
3972
  placement?: string;
3781
3973
  offset?: number;
3782
3974
  padding?: number;
@@ -3794,6 +3986,10 @@ export declare function autoUpdate(anchor: Element | object, floating: HTMLEleme
3794
3986
  export declare function tabbables(root: Element | ShadowRoot, options?: { lightOnly?: boolean }): HTMLElement[];
3795
3987
  /** Focuses the first [autofocus] or tabbable element; whether something got focus. */
3796
3988
  export declare function focusFirst(root: Element | ShadowRoot, options?: { lightOnly?: boolean }): boolean;
3989
+ /** Whether the element lays out right to left (dir="rtl" on it or an ancestor). */
3990
+ export declare function isRtl(el: Element): boolean;
3991
+ /** An arrow key as the reading direction sees it: right to left, ArrowLeft comes back as "ArrowRight" and the reverse. */
3992
+ export declare function inlineKey(key: string, el: Element): string;
3797
3993
 
3798
3994
  // --- charts (core/charts.js) -----------------------------------------------------
3799
3995