@coolms/ui-react 0.1.0-alpha.20 → 0.1.0-alpha.21
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 -0
- package/design-tokens.lock.json +7 -3
- package/dist/components/Icon.d.ts +1 -1
- package/dist/components/ScreenShell.d.ts +8 -2
- package/dist/components/pull.d.ts +2 -2
- package/dist/index.js +937 -884
- package/kit.contract.json +1 -1
- package/package.json +1 -1
- package/src/kit.css +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@coolms/ui-react` are listed here. Versions follow [semantic versioning](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## 0.1.0-alpha.21 (2026-11-21)
|
|
6
|
+
|
|
7
|
+
The kit on design tokens v0.11.0 (contract 0.6.0, with the served icon list): the screen shell steps its bar out of the way while scrolling down, one header at phone width, and the Workspace's served icon names.
|
|
8
|
+
|
|
9
|
+
- Tokens: the copy is design-tokens v0.11.0 (eea2e13), contract 0.6.0, and `contract/icons.json` is copied and pinned with it: the icon names the server's navigation trees use, each with the interfaces whose trees use it.
|
|
10
|
+
- `ScreenShell`: `bar-hidden` (contract 0.6.0). The bar and the filters step out of view while the content, or any pane in it that scrolls on its own, scrolls down past 48px, and come back on any scroll up, at the top, or when focus moves into the bar; never while searching, pulling or refreshing. `barHidden` hands the decision to the host. Collapsed rather than removed, so focus can still reach the bar.
|
|
11
|
+
- `AppShell` at phone width: while a screen shell is drawn in it, its own top bar gives way, so the screen's bar is the only header (contract 0.6.0: one header at phone width). A host no longer needs its own rule for it.
|
|
12
|
+
- `iconForName`: the served names the Workspace's trees use since the Chat and Drive trees: `arrow-left` (chevron-left), `pencil-square` (pencil), `cloud-upload` (the new `upload` icon), `people` (the new `users` icon), `file-earmark-word` and `file-earmark-spreadsheet` (file). A test reads `contract/icons.json` and fails, naming it, for any name listed for the Workspace that has no icon.
|
|
13
|
+
- `ScreenShell` / `usePull`: a pull starts only when every region that scrolls under the finger, up to the shell's content, is at its top. A list that scrolls in its own box inside the shell, scrolled down, takes a downward drag as its own scroll, not as a refresh.
|
|
14
|
+
|
|
5
15
|
## 0.1.0-alpha.20 (2026-11-20)
|
|
6
16
|
|
|
7
17
|
The server's icon names the folder menu and the image bar use, and a space kept for a name the kit does not know.
|
package/design-tokens.lock.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"repository": "coolms/design-tokens",
|
|
3
|
-
"tag": "v0.
|
|
4
|
-
"commit": "
|
|
3
|
+
"tag": "v0.11.0",
|
|
4
|
+
"commit": "eea2e135989f5ceca34a81c839211c1146d13816",
|
|
5
5
|
"files": {
|
|
6
6
|
"dist/coolms-tokens.css": {
|
|
7
7
|
"to": "src/tokens/coolms-tokens.css",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"contract/components.json": {
|
|
11
11
|
"to": "contract/components.json",
|
|
12
|
-
"sha256": "
|
|
12
|
+
"sha256": "a9f7d90b51a47616e04cff5b37b9034077ac3050213ccb216fb9a9a53d1d5921"
|
|
13
13
|
},
|
|
14
14
|
"contract/server-states.json": {
|
|
15
15
|
"to": "contract/server-states.json",
|
|
@@ -42,6 +42,10 @@
|
|
|
42
42
|
"fonts/OFL.txt": {
|
|
43
43
|
"to": "src/fonts/OFL.txt",
|
|
44
44
|
"sha256": "262481e844521b326f5ecd053e59b98c8b2da78c8ee1bdbb6e8174305e54935a"
|
|
45
|
+
},
|
|
46
|
+
"contract/icons.json": {
|
|
47
|
+
"to": "contract/icons.json",
|
|
48
|
+
"sha256": "4bb392ba633451f8f151b93db6097dd4c405548a3ad84807b46497caac10f7aa"
|
|
45
49
|
}
|
|
46
50
|
}
|
|
47
51
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
/** The icons the Workspace draws: one stroke style, 24 units, coloured by the text around them. */
|
|
3
|
-
export type IconName = 'mail' | 'chat' | 'phone' | 'calendar' | 'file' | 'image' | 'search' | 'bell' | 'pencil' | 'star' | 'send' | 'inbox' | 'archive' | 'trash' | 'paperclip' | 'mic' | 'speaker' | 'user-plus' | 'phone-off' | 'video' | 'info' | 'chevron-down' | 'chevron-left' | 'plus' | 'folder' | 'check' | 'server' | 'reply' | 'more' | 'download' | 'print' | 'open-separately' | 'important' | 'forward' | 'refresh' | 'file-code' | 'mail-open' | 'copy' | 'user' | 'folder-plus' | 'folder-x' | 'user-check' | 'user-x';
|
|
3
|
+
export type IconName = 'mail' | 'chat' | 'phone' | 'calendar' | 'file' | 'image' | 'search' | 'bell' | 'pencil' | 'star' | 'send' | 'inbox' | 'archive' | 'trash' | 'paperclip' | 'mic' | 'speaker' | 'user-plus' | 'phone-off' | 'video' | 'info' | 'chevron-down' | 'chevron-left' | 'plus' | 'folder' | 'check' | 'server' | 'reply' | 'more' | 'download' | 'print' | 'open-separately' | 'important' | 'forward' | 'refresh' | 'file-code' | 'mail-open' | 'copy' | 'user' | 'folder-plus' | 'folder-x' | 'user-check' | 'user-x' | 'upload' | 'users';
|
|
4
4
|
export interface IconProps {
|
|
5
5
|
readonly name: IconName;
|
|
6
6
|
readonly size?: number;
|
|
@@ -52,14 +52,20 @@ export interface ScreenShellProps {
|
|
|
52
52
|
readonly onRefresh?: () => Promise<unknown>;
|
|
53
53
|
/** What the pull says while pulled: the time of the last sync. */
|
|
54
54
|
readonly pullText?: ReactNode;
|
|
55
|
+
/**
|
|
56
|
+
* Whether the bar (and the filters under it) is out of view. Not given, the shell decides: out while the content, or
|
|
57
|
+
* any pane in it, scrolls down past the bar's own height; back on any scroll up, at the top, or when focus moves into
|
|
58
|
+
* the bar. Never while searching, pulling or refreshing, whatever is given.
|
|
59
|
+
*/
|
|
60
|
+
readonly barHidden?: boolean;
|
|
55
61
|
/** The screen's content: it scrolls on its own; a list in it draws the pull. */
|
|
56
62
|
readonly children: ReactNode;
|
|
57
63
|
}
|
|
58
64
|
/**
|
|
59
65
|
* One screen of a section at phone width (contract component `screen-shell`: root, nested, with-filters,
|
|
60
|
-
* with-primary-action, with-primary-menu, pulling, refreshing, searching). One bar: the section's navigation or Back
|
|
66
|
+
* with-primary-action, with-primary-menu, pulling, refreshing, searching, bar-hidden). One bar: the section's navigation or Back
|
|
61
67
|
* with the parent's name, the title, then search and the shell's own icons, or while searching, Close and the field; the filters under it; the content, which
|
|
62
68
|
* scrolls on its own and refreshes by a pull from its top; the primary action floating at the bottom right, its menu
|
|
63
69
|
* opening above it. What fills each slot is the host's, from the server's declared nodes.
|
|
64
70
|
*/
|
|
65
|
-
export declare function ScreenShell({ title, back, navigation, search, searching, globals, filters, primary, onRefresh, pullText, children }: ScreenShellProps): ReactNode;
|
|
71
|
+
export declare function ScreenShell({ title, back, navigation, search, searching, globals, filters, primary, onRefresh, pullText, barHidden, children }: ScreenShellProps): ReactNode;
|
|
@@ -3,8 +3,8 @@ import { type ReactNode, type RefObject } from 'react';
|
|
|
3
3
|
export declare const PULL_AT = 64;
|
|
4
4
|
/**
|
|
5
5
|
* Pull to refresh on a scroll region at its top: a touch dragged down from the very top shows how far it has gone (up
|
|
6
|
-
* to half again the threshold) and, let go past the threshold, calls `onPull`. A drag that starts lower,
|
|
7
|
-
* is
|
|
6
|
+
* to half again the threshold) and, let go past the threshold, calls `onPull`. A drag that starts lower, in the region or
|
|
7
|
+
* in a list scrolling inside it, or goes up, is that scroll's own. Returns how far it is pulled now, 0 at rest.
|
|
8
8
|
*/
|
|
9
9
|
export declare function usePull(region: RefObject<HTMLElement | null>, onPull: (() => void) | null): number;
|
|
10
10
|
/** The content's pull, as the shell has it: a list inside draws it as its `pulled` state. */
|