@synopackageland/ui 0.20.8 → 0.20.10

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.
@@ -65,6 +65,41 @@ for a viewport change. `ensureDeviceViewport()` therefore fires one `resize`
65
65
  on the next frame after it changes the viewport (and after it restores it), so
66
66
  the window narrows to the phone's width.
67
67
 
68
+ ### Full-page type scale
69
+
70
+ A full page reads at a web console's sizes, one step above a DSM window. The
71
+ tokens are set on the web layout (`data-ui-layout-mode="web"`) and on an app
72
+ root that holds one or is a `full-page` root, so dialogs teleported into the
73
+ root follow. A DSM window keeps DSM's sizes and a phone its own scale
74
+ ([mobile-native.md](mobile-native.md)).
75
+
76
+ | Token | DSM window | Full page |
77
+ |---|---|---|
78
+ | `--ui-font-size` (body, navigation, buttons, fields) | 13px | 14px |
79
+ | `--ui-font-size-control` (checkbox, select, form and settings labels) | 13px | 14px |
80
+ | `--ui-font-size-sm` (secondary text, group labels) | 12px | 13px |
81
+ | `--ui-font-size-lg` (a main label) | 14px | 15px |
82
+ | `--ui-font-size-tab` / `--ui-font-size-section` | 12px / 15px | 13px / 16px |
83
+ | `--ui-font-size-h1` / `-h2` / `-h3` | 20 / 16 / 14px | 22 / 18 / 16px |
84
+ | `--ui-grid-font-size` | 13px | 14px |
85
+ | `--ui-control-sm` / `-md` / `-lg` | 24 / 28 / 34px | 28 / 32 / 36px |
86
+ | `--ui-grid-row-height` / `--ui-grid-header-height` | 28px | 32px |
87
+ | `--ui-list-row-height` | 32px | 36px |
88
+ | `--ui-nav-row-height-default` | 42px | 36px |
89
+ | `--ui-label-offset` (a label beside a field) | 4px | 6px |
90
+
91
+ The web page header's title is `--ui-font-size-title` (16px) over a
92
+ `--ui-font-size-sm` description. The smallest text (`--ui-font-size-xs`) stays
93
+ 12px and a dialog's title 16px. Control and grid sizes apply under a mouse
94
+ only: a touch tablet keeps its touch sizes, and an explicit `data-ui-density`
95
+ keeps what the app chose.
96
+
97
+ A page without a `PageHeader` that starts with a `PageToolbar` starts on the
98
+ page padding: its toolbar is a control-height row, not a 48px chrome row, so
99
+ there is no empty band over it. Under a header, and inside a card or pane, a
100
+ toolbar stays one chrome row. An App that adds its own top padding to an
101
+ untitled page doubles the page padding the shell already gives it.
102
+
68
103
  ## Viewport, keyboard and Back on a phone
69
104
 
70
105
  A full-page `AppRoot` is the page: it is `100dvh` tall, `html` and `body`
@@ -251,9 +286,10 @@ import {
251
286
  - `PageContent surface="auto"` puts the page straight on the content area: flush
252
287
  beside the sidebar and under the toolbar, at the DSM window's page padding,
253
288
  with no card, border or outer margin around it. The area is white, unless the
254
- page holds a card (`Card`, `Surface`): then it is the page grey
255
- (`--ui-bg`, the web canvas) and the cards lift off it with a 1px frame and
256
- `--ui-shadow-card`, as on DSM's own card pages. A list page stays white: a
289
+ page holds a card (`Card`, `Surface`): then it is the card-page canvas
290
+ (`--ui-page-canvas`, a near-white tint) and the cards lift off it with a 1px
291
+ frame and `--ui-shadow-card`, as on DSM's own card pages. A web app can set
292
+ `--ui-app-web-canvas` to pick its own canvas. A list page stays white: a
257
293
  page with a `DataGrid` on it (not inside a card) keeps the white area when a
258
294
  `Surface` opens beside the list, such as a detail pane for the selected row;
259
295
  the pane keeps its 1px border and takes no shadow, so selecting a row never
@@ -261,7 +297,7 @@ import {
261
297
  release shares the DSM document and its stylesheet still has the earlier
262
298
  rules. Draw the pane with [`ListDetail`](list-detail.md), which is not a
263
299
  `Surface` and adds a resizable separator. `surface="card"` always stays
264
- white. `surface="flat"` always takes the grey canvas, for multi-card
300
+ white. `surface="flat"` always takes the canvas, for multi-card
265
301
  dashboards. All three behave the same in the web, DSM-window and mobile
266
302
  presentations.
267
303
  `surface="none"` adds no page surface and removes the horizontal page gutters
@@ -350,11 +386,14 @@ Applications can adjust tokens per mode without CSS leaks into the DSM host:
350
386
  ```
351
387
 
352
388
  The web colour tokens are read with fallbacks, so a theme can also set them on
353
- any ancestor. Light defaults and the dark values the workbench uses:
389
+ any ancestor. `--ui-app-web-canvas` defaults to the theme's card-page canvas
390
+ (`--ui-page-canvas`), which is set on the theme (see
391
+ [colour system](color-system.md)) and is the same in the web, DSM-window and
392
+ phone presentations. Light defaults and the dark values the workbench uses:
354
393
 
355
394
  | Token | Light (default) | Dark |
356
395
  | --- | --- | --- |
357
- | `--ui-app-web-canvas` | `var(--ui-bg)` (`#f4f6f3`) | `var(--ui-bg)` (`#11161c`) |
396
+ | `--ui-app-web-canvas` | `var(--ui-page-canvas)` (`#fafbf9`) | `var(--ui-bg)` (`#121513`) |
358
397
  | `--ui-app-web-surface` | `var(--ui-surface)` | `var(--ui-surface)` (`#1f2832`) |
359
398
  | `--ui-app-web-border` | `var(--ui-border)` | `#34404d` |
360
399
  | `--ui-app-web-shadow` | `var(--ui-shadow-card)` | `var(--ui-shadow-card)` |
@@ -39,7 +39,8 @@ at 7:1 or more (`tests/css/palette.test.ts`).
39
39
 
40
40
  | Role | Step | DSM 7 |
41
41
  | --- | --- | --- |
42
- | `--ui-bg` | `#f4f6f3` | the page behind cards: a pale sage mist, light enough that cards read by their frame and shadow rather than a dark page |
42
+ | `--ui-bg` | `#f4f6f3` | the app's page: a pale sage mist, light enough that cards read by their frame and shadow rather than a dark page |
43
+ | `--ui-page-canvas` | `#fafbf9` | the canvas behind a page of cards: a near-white tint, a step lighter than the app page, so a card page sits beside a white one; the card's 1px frame and shadow do the separating |
43
44
  | `--ui-surface`, `--ui-surface-raised` | `gray-1` | white window, cards and panels; menus and dialogs add a shadow |
44
45
  | `--ui-surface-subtle`, `--ui-surface-inset` | `mist-a2` | faint block, 12% of `#bec8c0` |
45
46
  | `--ui-surface-hover` | `accent-a2` | list row hover, 4% blue |
@@ -121,6 +122,7 @@ The same roles, with the light page's sage carried into the greys:
121
122
  | Role | Dark | |
122
123
  | --- | --- | --- |
123
124
  | `--ui-bg` | `#121513` | the page |
125
+ | `--ui-page-canvas` | the page | a card is the lighter layer, so a page of cards needs no extra tint |
124
126
  | `--ui-surface` | `#1b1f1c` | a card or panel |
125
127
  | `--ui-surface-raised` | `#242925` | a menu or dialog |
126
128
  | `--ui-text` | `#e3e8e4` | 13.4:1 on a card |
@@ -32,7 +32,7 @@ here stay implementation details and can change in any release.
32
32
  | `data-ui-app` | `AppRoot`'s root and its floating hosts (portals) | present |
33
33
  | `data-ui-theme`, `data-ui-density`, `data-ui-accent` | the app root (mirrored on floating hosts) | theme name, `compact`/`comfortable`, present |
34
34
  | `data-ui-color-scheme` | the app root (AppRoot `color-scheme`, mirrored on floating hosts) or `<html>` | `dark` |
35
- | `data-ui-presentation` | `AppRoot` root | `mobile`, `window`, `web` |
35
+ | `data-ui-presentation` | `AppRoot` root | `mobile` (640px or narrower), else `web` for a `full-page` root or one holding an `AppLayout` with `wide-layout="web"` from 960px, else `window` (a DSM window at any width) |
36
36
  | `data-ui-floating` | a floating host (dialog, menu, popover) | present |
37
37
  | `data-ui-layout-mode` | `AppLayout` root | `mobile`, `window`, `web` |
38
38
  | `data-ui-navigation` | `AppLayout` root, and `AppSidebar`'s `<nav>`, while the navigation is a top bar | `top` (absent for the sidebar and on a phone) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synopackageland/ui",
3
- "version": "0.20.8",
3
+ "version": "0.20.10",
4
4
  "description": "Shared Vue 3 UI component library with a DSM 7 inspired application theme",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -60,59 +60,6 @@
60
60
  "./themes/dsm7-embedded-reset.css": "./dist/themes/dsm7-embedded-reset.css",
61
61
  "./themes/dsm7-embedded-theme.css": "./dist/themes/dsm7-embedded-theme.css"
62
62
  },
63
- "scripts": {
64
- "check:docs": "node --test scripts/check-doc-versions.test.mjs && node scripts/check-doc-versions.mjs",
65
- "dev": "vite build --watch",
66
- "build": "vite build && vite build --mode json && vite build --mode rich-text && vite build --mode grid && vite build --mode cli && vite build --mode preview && vite build --mode embedded && node scripts/postbuild.mjs",
67
- "lint": "eslint .",
68
- "typecheck": "vue-tsc --noEmit -p tsconfig.json",
69
- "test": "vitest run",
70
- "test:watch": "vitest",
71
- "test:changed": "echo \"test:changed skips the tests the changes since ${SYNOPKGLAND_GATE_BASE:-origin/master} do not reach (vitest --changed); pnpm check runs them all\" && vitest run --changed ${SYNOPKGLAND_GATE_BASE:-origin/master}",
72
- "story": "histoire dev",
73
- "story:build": "histoire build",
74
- "check:host": "node scripts/dsm-host-shots.mjs",
75
- "check:switch": "node scripts/check-switch.mjs",
76
- "check:tabs": "node scripts/check-tabs.mjs",
77
- "check:mobile": "node scripts/check-mobile-overflow.mjs",
78
- "check:ui-patch": "node scripts/check-ui-patch.mjs",
79
- "check:narrow": "node scripts/check-narrow-controls.mjs",
80
- "check:drawer-form": "node scripts/check-drawer-form.mjs",
81
- "check:responsive": "node scripts/check-responsive.mjs",
82
- "check:adaptive": "node scripts/check-adaptive.mjs",
83
- "check:sidebar-focus": "node scripts/check-sidebar-focus.mjs",
84
- "check:json-render": "node scripts/check-json-render.mjs",
85
- "check:motion": "node scripts/check-motion.mjs",
86
- "check:topology": "node scripts/check-topology.mjs",
87
- "check:wizard": "node scripts/check-wizard.mjs",
88
- "check:edges": "node scripts/check-edges.mjs",
89
- "check:data-grid": "node scripts/check-data-grid.mjs",
90
- "check:truncation": "node scripts/check-truncation.mjs",
91
- "check:link": "node scripts/check-link.mjs",
92
- "check:text-select": "node scripts/check-text-select.mjs",
93
- "check:date-picker": "node scripts/check-date-picker.mjs",
94
- "check:full-page": "node scripts/check-full-page.mjs",
95
- "check:detail-surface": "node scripts/check-detail-surface.mjs",
96
- "check:internal": "node --test scripts/check-internal-content.test.mjs scripts/check-npm-metadata.test.mjs && node scripts/check-internal-content.mjs --repo .",
97
- "check:npm-metadata": "node scripts/check-npm-metadata.mjs",
98
- "check:package": "node scripts/check-package-content.mjs",
99
- "check:public-api-consumer": "node scripts/check-public-api-consumer.mjs",
100
- "notices:update": "node scripts/third-party-notices.mjs --write",
101
- "notices:check": "node scripts/third-party-notices.mjs --check",
102
- "check": "bash scripts/docker-check.sh \"npm run gates\"",
103
- "check:fast": "bash scripts/docker-check.sh \"npm run gates\"",
104
- "check:local-browser": "node scripts/app-local-browser.mjs",
105
- "check:infotip": "node scripts/check-infotip.mjs",
106
- "release:stage": "node scripts/stage-release.mjs",
107
- "check:polish": "bash scripts/docker-check.sh --build --out .polish-shots 'node scripts/check-polish.mjs'",
108
- "check:acceptance": "node scripts/check-acceptance.mjs",
109
- "check:palette": "node scripts/check-palette.mjs",
110
- "gates": "node scripts/gates.mjs",
111
- "gates:full": "node scripts/gates.mjs --full",
112
- "check:layout": "node scripts/check-layout.mjs",
113
- "release:smoke": "node scripts/release-smoke.mjs",
114
- "check:browser-install": "playwright install chromium"
115
- },
116
63
  "peerDependencies": {
117
64
  "vue": "^3.5.0"
118
65
  },
@@ -132,44 +79,9 @@
132
79
  "@tiptap/vue-3": "3.32.1",
133
80
  "zod": "^4.6.5"
134
81
  },
135
- "devDependencies": {
136
- "@eslint/js": "10.0.1",
137
- "@histoire/plugin-vue": "1.0.0-beta.1",
138
- "@tailwindcss/vite": "4.3.3",
139
- "@tanstack/vue-virtual": "3.13.39",
140
- "@vitejs/plugin-vue": "6.0.9",
141
- "@vue/test-utils": "2.5.1",
142
- "@vueuse/core": "14.4.0",
143
- "eslint": "10.11.0",
144
- "eslint-plugin-vue": "10.11.1",
145
- "flexsearch": "0.8.212",
146
- "globals": "17.12.0",
147
- "histoire": "1.0.0-beta.1",
148
- "jsdom": "30.1.1",
149
- "playwright": "1.58.2",
150
- "reka-ui": "2.11.0",
151
- "tailwindcss": "4.3.3",
152
- "typescript": "5.9.3",
153
- "typescript-eslint": "8.71.0",
154
- "vite": "7.3.6",
155
- "vite-plugin-dts": "5.1.1",
156
- "vitest": "5.0.2",
157
- "vscode-oniguruma": "2.0.1",
158
- "vscode-textmate": "9.3.2",
159
- "vue": "3.5.43",
160
- "vue-eslint-parser": "10.4.1",
161
- "vue-tsc": "3.3.11"
162
- },
163
82
  "engines": {
164
83
  "node": ">=20"
165
84
  },
166
- "packageManager": "pnpm@10.33.2",
167
- "pnpm": {
168
- "onlyBuiltDependencies": [
169
- "esbuild",
170
- "vue-demi"
171
- ]
172
- },
173
85
  "config": {
174
86
  "bundledRuntime": {
175
87
  "@tanstack/vue-virtual": "3.13.39",