@synopackageland/ui 0.12.0 → 0.12.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 +10 -2
- package/README.md +3 -2
- package/dist/components/composite/data-grid/DataGrid.vue.d.ts +5 -1
- package/dist/components/composite/data-grid/columnType.d.ts +19 -0
- package/dist/components/composite/data-table/DataTable.vue.d.ts +11 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3740 -3696
- package/dist/json/catalog.d.ts +24 -0
- package/dist/json/registry.d.ts +408 -0
- package/dist/json-ai-prompt.md +2 -2
- package/dist/json-catalog.schema.json +18 -0
- package/dist/json-preview/preview.js +3623 -3591
- package/dist/json.js +2 -0
- package/dist/reka-runtime.json +1 -1
- package/dist/theme.css +1 -1
- package/dist/themes/dsm7-embedded-theme.css +1 -1
- package/dist/themes/dsm7-embedded.css +1 -1
- package/dist/themes/dsm7.css +1 -1
- package/docs/layout-rules.md +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.12.1 (2026-10-19)
|
|
4
|
+
|
|
5
|
+
- Fix the development/workbench Reka patch loader reading Vite version query strings as part of a filename.
|
|
6
|
+
|
|
7
|
+
- Fix: an app-local `AppRoot` with `dialog-bounds="viewport"` no longer throws `style is not iterable` where a `CSSStyleDeclaration` has no iterator (jsdom 27 and other older engines): the floating host reads the accent properties by index. Apps on jsdom 27 no longer need a jsdom upgrade to run their tests.
|
|
8
|
+
- `DataGrid` and `DataTable` columns take a `type`: `text` (default), `number`, `date` or `actions`, and the JSON catalog's table column does too. The type sets the alignment the DSM way: every column left, header and cells alike, as File Station, Drive, Resource Monitor and Container Manager do; `number` and `date` cells use tabular digits; an `actions` cell lays out its buttons from the left with one gap, the first icon under the header text. `align` still overrides it, and `align: 'right'` still gives tabular digits. `TableColumnType` and `TableColumnAlign` are exported. Visible change for apps: none until a column sets `type`; an app that right-aligned numbers can switch to `type: 'number'`.
|
|
9
|
+
- Fix: in an app-local `AppRoot` (`modal-scope="app"`), a mouse click on a control, such as a sidebar row, no longer draws the keyboard focus ring. The click now focuses the control without `:focus-visible`; Tab and arrow focus still show the ring. New browser check `pnpm check:sidebar-focus`.
|
|
10
|
+
|
|
3
11
|
## 0.12.0 (2026-10-18)
|
|
4
12
|
|
|
5
13
|
- Colours come from five 12-step scales built from DSM 7's colours (`--ui-gray-*`, `--ui-blue-*`, `--ui-green-*`, `--ui-orange-*`, `--ui-red-*`, each with translucent `-a` steps, and `--ui-accent-*`), and every semantic token is now one step of a scale ([colour system](docs/color-system.md)). No token was renamed or removed. A few values changed so every text step reads at AA on its fills: `--ui-text-secondary` 78% → 82%, `--ui-danger-text` `#a81b1b`, the soft tone fills 10% of their tone, `--ui-surface-subtle`, `--ui-control-track` and `--ui-control-divider` one step of the grey scale. `--ui-info-soft` no longer follows `--ui-primary-soft`, and `--ui-info-text` no longer follows `--ui-primary-active` overrides. `--ui-selection` is deprecated (unused; use `--ui-surface-selected`).
|
|
@@ -183,8 +191,8 @@ No existing token was renamed or removed. These values change from 0.11.5; scale
|
|
|
183
191
|
|
|
184
192
|
## 0.9.7 (2026-10-14)
|
|
185
193
|
|
|
186
|
-
Fixes from the
|
|
187
|
-
修正
|
|
194
|
+
Fixes from the re-verification on DSM. **Behavior change:** a `Space` row packs its items at the start instead of centring them.
|
|
195
|
+
修正 DSM 複驗發現的問題。**行為變更:** `Space` 列的項目改為靠起點排列,不再置中。
|
|
188
196
|
|
|
189
197
|
- A `Space` row packs its items at the start of the line (`justify-content: flex-start`); before, it centred them, and every app had to add `justify-content="start"`. Pass `justify-content="center"` for the old layout.
|
|
190
198
|
- `Space` 列的項目靠行首排列(`justify-content: flex-start`);先前預設置中,每個 App 都得加上 `justify-content="start"`。需要舊版排列時傳入 `justify-content="center"`。
|
package/README.md
CHANGED
|
@@ -537,9 +537,9 @@ phone; use `DataGrid` for anything a user searches or arranges.
|
|
|
537
537
|
<DataGrid
|
|
538
538
|
:columns="[
|
|
539
539
|
{ key: 'name', label: '名稱', sortable: true, flex: 2, minWidth: 200, hideable: false },
|
|
540
|
-
{ key: 'size', label: '大小', sortable: true, width: 90,
|
|
540
|
+
{ key: 'size', label: '大小', sortable: true, width: 90, type: 'number' },
|
|
541
541
|
{ key: 'location', label: '存放位置', minWidth: 120 },
|
|
542
|
-
{ key: 'started', label: '開始時間', sortable: true, width: 140, defaultHidden: true },
|
|
542
|
+
{ key: 'started', label: '開始時間', sortable: true, width: 140, type: 'date', defaultHidden: true },
|
|
543
543
|
]"
|
|
544
544
|
:rows="rows"
|
|
545
545
|
:filter="filter"
|
|
@@ -554,6 +554,7 @@ phone; use `DataGrid` for anything a user searches or arranges.
|
|
|
554
554
|
```
|
|
555
555
|
|
|
556
556
|
- **Column widths.** A column with `width` (px, or a percentage of the grid) keeps it; a column without one is flexible and shares the rest by `flex` (default 1), never below its `minWidth` (default 80px for a flexible column, 40px for a fixed one). A long text cannot widen its column, and a header never wraps. When the minimums do not fit (a phone), the grid scrolls sideways instead of squeezing.
|
|
557
|
+
- **Alignment.** Give a column a `type` instead of aligning it: `text` (the default), `number` (a size, a percentage, a speed, a count, a duration), `date`, or `actions` (a row of icon buttons). As in DSM's own grids (File Station, Drive, Resource Monitor, Container Manager), every column sits left, its header with it; `number` and `date` give their digits one width so they line up down the column, and `actions` lays its buttons out from the left with one gap, the first icon under the header's text (put the `IconButton`s straight in the `#cell-<key>` slot). The selection checkbox is centred. A `—` placeholder sits where the column's values do. `align` still overrides the type. `DataTable` takes the same `type`.
|
|
557
558
|
- **Long text.** A plain cell is cut to one line with an ellipsis and shows its full text on hover (`title`); `wrap: true` wraps a column instead. A `#cell-<key>` slot renders its own content: `CellText` cuts and titles it the same way. Every body cell, a slot's included, carries `data-column="<key>"`.
|
|
558
559
|
- **Row height.** Rows are one height (28px, 24px compact). `CellStatus` with a running `progress` fits it (a 4px bar under the label); its `detail` adds a line, so put speed or a reason in its own column. Dates: `formatDateTime(value, { locale, style: 'compact' })` in the cell (this year: `10/17 14:32`, `Oct 17, 2:32 PM`; another year: the date with its year, `2025/3/2`, `Mar 2, 2025`) and the full `formatDateTime(value, { locale })` as its `title`; it fits a 140px column in every built-in locale.
|
|
559
560
|
- **Folders and status reasons.** Show a folder in a cell with `PathDisplay display="name"`: the folder icon and the last segment of the path on one unframed line (`/volume1/downloads/` reads `downloads`), cut at its end, the whole path as its `title` and read to a screen reader ("Path: …", nine locales); the copy button still copies the whole path. The default `display="path"` is the framed full path for forms. Give `CellStatus` a `description` to explain a status (why it failed, how to resume): the label opens it in a `Tooltip` on hover or keyboard focus (it becomes a Tab stop with a focus ring) and drops its own `title`, so two tooltips never stack; without one the cell is unchanged.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DataGridLabels } from './labels';
|
|
2
|
+
import { TableColumnAlign, TableColumnType } from './columnType';
|
|
2
3
|
export type DataGridSort = {
|
|
3
4
|
key: string;
|
|
4
5
|
direction: 'asc' | 'desc';
|
|
@@ -28,7 +29,10 @@ export type DataGridColumn = {
|
|
|
28
29
|
searchable?: boolean;
|
|
29
30
|
/** The text the quick filter searches for a row; defaults to the cell value. */
|
|
30
31
|
searchText?: (row: Record<string, unknown>) => string;
|
|
31
|
-
|
|
32
|
+
/** What the column holds; sets its alignment (see TableColumnType). Defaults to `text`. */
|
|
33
|
+
type?: TableColumnType;
|
|
34
|
+
/** Overrides the alignment the type sets. */
|
|
35
|
+
align?: TableColumnAlign;
|
|
32
36
|
sortable?: boolean;
|
|
33
37
|
/** Overrides the grid's `resizable` for this column. */
|
|
34
38
|
resizable?: boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a table column holds; it sets the column's alignment, so an App does
|
|
3
|
+
* not tune each column. As in DSM's own grids (File Station, Drive, Resource
|
|
4
|
+
* Monitor, Container Manager) every column sits left, numbers and dates too:
|
|
5
|
+
* `number` (a size, a percentage, a speed, a count, a duration) and `date`
|
|
6
|
+
* give their digits one width so they line up down the column; `actions`
|
|
7
|
+
* lays out its buttons in a row from the left edge, under the header's text.
|
|
8
|
+
*/
|
|
9
|
+
export type TableColumnType = 'text' | 'number' | 'date' | 'actions';
|
|
10
|
+
export type TableColumnAlign = 'left' | 'center' | 'right';
|
|
11
|
+
type TypedColumn = {
|
|
12
|
+
type?: TableColumnType;
|
|
13
|
+
align?: TableColumnAlign;
|
|
14
|
+
};
|
|
15
|
+
/** `align` overrides the type, for a column DSM itself aligns otherwise. */
|
|
16
|
+
export declare function columnAlignClass(column: TypedColumn): "text-right" | "text-center" | "text-left";
|
|
17
|
+
export declare function columnHasTabularDigits(column: TypedColumn): boolean;
|
|
18
|
+
export declare const ACTIONS_CELL_CLASS = "-ml-1 flex items-center justify-start gap-1";
|
|
19
|
+
export {};
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { TableColumnAlign, TableColumnType } from '../data-grid/columnType';
|
|
1
2
|
export type DataTableColumn = {
|
|
2
3
|
key: string;
|
|
3
4
|
label: string;
|
|
4
5
|
width?: string;
|
|
5
|
-
|
|
6
|
+
/** What the column holds; sets its alignment (see TableColumnType). Defaults to `text`. */
|
|
7
|
+
type?: TableColumnType;
|
|
8
|
+
/** Overrides the alignment the type sets. */
|
|
9
|
+
align?: TableColumnAlign;
|
|
6
10
|
};
|
|
7
11
|
type __VLS_Props = {
|
|
8
12
|
columns: DataTableColumn[];
|
|
@@ -21,11 +25,17 @@ declare var __VLS_2: `cell-${string}`, __VLS_3: {
|
|
|
21
25
|
row: Record<string, unknown>;
|
|
22
26
|
value: unknown;
|
|
23
27
|
column: DataTableColumn;
|
|
28
|
+
}, __VLS_16: `cell-${string}`, __VLS_17: {
|
|
29
|
+
row: Record<string, unknown>;
|
|
30
|
+
value: unknown;
|
|
31
|
+
column: DataTableColumn;
|
|
24
32
|
};
|
|
25
33
|
type __VLS_Slots = {} & {
|
|
26
34
|
[K in NonNullable<typeof __VLS_2>]?: (props: typeof __VLS_3) => any;
|
|
27
35
|
} & {
|
|
28
36
|
[K in NonNullable<typeof __VLS_12>]?: (props: typeof __VLS_13) => any;
|
|
37
|
+
} & {
|
|
38
|
+
[K in NonNullable<typeof __VLS_16>]?: (props: typeof __VLS_17) => any;
|
|
29
39
|
};
|
|
30
40
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
31
41
|
compact: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -127,6 +127,7 @@ export { default as Statistic } from './components/composite/statistic/Statistic
|
|
|
127
127
|
export type { DataTableColumn } from './components/composite/data-table/DataTable.vue';
|
|
128
128
|
export { default as DataGrid } from './components/composite/data-grid/DataGrid.vue';
|
|
129
129
|
export type { DataGridColumn, DataGridColumnWidths, DataGridLabels, ResolvedDataGridLabels, DataGridSort, DataGridGroup, DataGridExpandable, DataGridDraggable, DataGridReorder, DataGridCellUpdate, DataGridAdapter, DataGridCellSlotProps } from './components/composite/data-grid/DataGrid.vue';
|
|
130
|
+
export type { TableColumnType, TableColumnAlign } from './components/composite/data-grid/columnType';
|
|
130
131
|
export { loadGridState, saveGridState, type DataGridViewState } from './components/composite/data-grid/viewState';
|
|
131
132
|
export { default as TreeView } from './components/composite/tree-view/TreeView.vue';
|
|
132
133
|
export type { TreeNode, TreeViewCheckPayload, TreeViewDraggableConfig, TreeViewPosition, TreeViewReorder } from './components/composite/tree-view/TreeView.vue';
|