@synopackageland/ui 0.14.11 → 0.15.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.15.1 (2026-10-25)
4
+
5
+ - Defer responsive width updates to `requestAnimationFrame` so `CardGrid` and other components using `useElementWidth` avoid ResizeObserver delivery loops. Width changes are coalesced into one update per frame, and pending updates are cancelled when the component unmounts. (#53)
6
+
7
+ ## 0.15.0 (2026-10-24)
8
+
9
+ Visual change in dark mode only; the light theme looks as before.
10
+
11
+ - Official dark theme (`src/theme/dark.css`, inside `theme.css` and the embedded stylesheets): `<AppRoot color-scheme="dark">`, or `data-ui-color-scheme="dark"` on `<html>`, gives every role a dark value. The greys carry the light page's sage (page `#121513`, card `#1b1f1c`, menu `#242925`); text keeps 4.5:1 on cards, fills and tone tints. The host decides when to switch; the library does not follow `prefers-color-scheme` by itself.
12
+ - `accentScale(color, { dark: true })` and `accentStyle(color, { dark: true })`: thicker tints on the dark card and text steps lightened until they read at 4.5:1 and 7:1; step 9 keeps its white label. AppRoot uses it for `accent` when `color-scheme="dark"`.
13
+ - Colours components drew themselves are tokens now: `--ui-overlay` (dialog and sheet mask), `--ui-drawer-backdrop` (phone drawer), `--ui-scroll-edge-shade`, `--ui-switch-thumb`; a TreeView expander hovers with `--ui-control-bg-hover`. Light values are unchanged.
14
+ - The workbench and gallery dark previews use the library's dark theme; `histoire-dark.css` only paints the frame.
15
+
3
16
  ## 0.14.11 (2026-10-24)
4
17
 
5
18
  Visual change: the DSM7 light theme's page and neutral greys. Props, slots and exports stay as they were.
package/README.md CHANGED
@@ -455,6 +455,11 @@ readable on it, and leaves the status tones DSM's:
455
455
  </AppRoot>
456
456
  ```
457
457
 
458
+ The theme has a dark scheme too: `<AppRoot color-scheme="dark">` (or
459
+ `data-ui-color-scheme="dark"` on `<html>` for a full page) switches every
460
+ token, and derives the accent for a dark page. The host decides when, for
461
+ example from `prefers-color-scheme` ([colour system](docs/color-system.md#dark-theme)).
462
+
458
463
  Other tokens are overridden in a stylesheet imported after the library's:
459
464
 
460
465
  ```css
@@ -12,6 +12,12 @@ type __VLS_Props = {
12
12
  * apps; set it only for a colour that belongs to the app.
13
13
  */
14
14
  accent?: string;
15
+ /**
16
+ * `dark` draws the app in the dark theme (src/theme/dark.css), and derives the
17
+ * accent for it. A full page can set `data-ui-color-scheme="dark"` on
18
+ * `<html>` instead, but then passes `dark` here too when it sets an accent.
19
+ */
20
+ colorScheme?: 'light' | 'dark';
15
21
  };
16
22
  declare var __VLS_7: {}, __VLS_9: {};
17
23
  type __VLS_Slots = {} & {
@@ -26,6 +32,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
26
32
  }>, {
27
33
  modalScope: "document" | "app";
28
34
  dialogBounds: "app" | "viewport";
35
+ colorScheme: "light" | "dark";
29
36
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
30
37
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
31
38
  declare const _default: typeof __VLS_export;
package/dist/index.d.ts CHANGED
@@ -182,7 +182,7 @@ export type { AboutCheckState, AboutVersionInfo } from './components/composite/a
182
182
  export { default as AppRoot } from './components/app/app-root/AppRoot.vue';
183
183
  export { APP_ROOT_ATTRIBUTE, APP_ROOT_SELECTOR } from './lib/appRoot';
184
184
  export { accentScale, accentStyle } from './lib/accent';
185
- export type { AccentScale } from './lib/accent';
185
+ export type { AccentOptions, AccentScale } from './lib/accent';
186
186
  export { default as AppLayout } from './components/app/app-layout/AppLayout.vue';
187
187
  export { default as ResponsiveView } from './components/app/responsive-view/ResponsiveView.vue';
188
188
  export { appPresentationForWidth, MOBILE_LAYOUT_MAX, WEB_LAYOUT_MIN } from './lib/adaptiveLayout';