@domicile-desktop/manganese-bar-module-network 1.1.1 → 1.2.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.
- package/package.json +16 -17
- package/src/Failure.tsx +17 -0
- package/src/Network.tsx +12 -9
- package/src/NetworkQuick.tsx +2 -0
- package/src/SavedNetworks.tsx +191 -0
- package/src/WifiPanel.tsx +57 -30
- package/src/held-wifi-actions.ts +4 -0
- package/src/wifi-actions.ts +4 -0
- package/styled-system/patterns/aspect-ratio.mjs +2 -2
- package/styled-system/patterns/bleed.mjs +1 -2
- package/styled-system/patterns/float.mjs +5 -11
- package/styled-system/patterns/grid-item.mjs +1 -2
- package/styled-system/patterns/grid.mjs +1 -2
- package/styled-system/patterns/link-overlay.mjs +1 -1
- package/styled-system/patterns/spacer.mjs +3 -3
- package/styled-system/patterns/visually-hidden.mjs +1 -1
- package/styled-system/tokens/index.mjs +7 -3
- package/styled-system/tokens/tokens.d.ts +2 -2
- package/styled-system/types/prop-type.d.ts +2 -2
package/package.json
CHANGED
|
@@ -1,32 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
3
|
"@cprussin/option-result": "^2.0.1",
|
|
4
|
-
"@domicile-desktop/component-library": "2.0
|
|
5
|
-
"@domicile-desktop/manganese-bar": "1.1.
|
|
6
|
-
"@domicile-desktop/manganese-host": "2.0.
|
|
7
|
-
"@domicile-desktop/react": "0.
|
|
8
|
-
"@domicile-desktop/sdk": "
|
|
9
|
-
"@domicile-desktop/system-network": "1.
|
|
10
|
-
"@pandacss/dev": "^1.12.
|
|
4
|
+
"@domicile-desktop/component-library": "2.2.0",
|
|
5
|
+
"@domicile-desktop/manganese-bar": "1.1.3",
|
|
6
|
+
"@domicile-desktop/manganese-host": "2.0.3",
|
|
7
|
+
"@domicile-desktop/react": "0.2.0",
|
|
8
|
+
"@domicile-desktop/sdk": "3.0.0",
|
|
9
|
+
"@domicile-desktop/system-network": "1.2.0",
|
|
10
|
+
"@pandacss/dev": "^1.12.2",
|
|
11
11
|
"@phosphor-icons/react": "^2.1.10",
|
|
12
|
-
"react": "^19.
|
|
12
|
+
"react": "^19.3.1"
|
|
13
13
|
},
|
|
14
14
|
"description": "A manganese bar item: the network connection and its Wi-Fi panel.",
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@cprussin/tsconfig": "^5.0.0",
|
|
17
17
|
"@domicile-desktop/test-support": "0.0.2",
|
|
18
|
-
"@pandacss/preset-panda": "^1.12.
|
|
18
|
+
"@pandacss/preset-panda": "^1.12.2",
|
|
19
19
|
"@testing-library/react": "^16.3.3",
|
|
20
|
-
"@testing-library/user-event": "^14.6.
|
|
21
|
-
"@types/bun": "^1.4.
|
|
22
|
-
"@types/react": "^19.
|
|
23
|
-
"@types/react-dom": "^19.
|
|
24
|
-
"postcss": "^8.5.
|
|
20
|
+
"@testing-library/user-event": "^14.6.10",
|
|
21
|
+
"@types/bun": "^1.4.4",
|
|
22
|
+
"@types/react": "^19.3.0",
|
|
23
|
+
"@types/react-dom": "^19.3.0",
|
|
24
|
+
"postcss": "^8.5.32",
|
|
25
25
|
"typescript": "^7.0.2"
|
|
26
26
|
},
|
|
27
27
|
"engines": {
|
|
28
|
-
"bun": ">=1.4.2"
|
|
29
|
-
"node": ">=24"
|
|
28
|
+
"bun": ">=1.4.2"
|
|
30
29
|
},
|
|
31
30
|
"exports": {
|
|
32
31
|
".": "./src/bar-item.tsx",
|
|
@@ -57,5 +56,5 @@
|
|
|
57
56
|
"test:unit": "bun test"
|
|
58
57
|
},
|
|
59
58
|
"type": "module",
|
|
60
|
-
"version": "1.
|
|
59
|
+
"version": "1.2.0"
|
|
61
60
|
}
|
package/src/Failure.tsx
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PanelNote } from "@domicile-desktop/component-library/PanelNote";
|
|
2
|
+
import type { SystemError } from "@domicile-desktop/sdk/system";
|
|
3
|
+
import type { ReactNode } from "react";
|
|
4
|
+
|
|
5
|
+
/** What failed, in plain words, with the service's in its tooltip. */
|
|
6
|
+
export const Failure = ({
|
|
7
|
+
children,
|
|
8
|
+
error,
|
|
9
|
+
}: {
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
error: SystemError | undefined;
|
|
12
|
+
}) =>
|
|
13
|
+
error !== undefined && (
|
|
14
|
+
<PanelNote detail={error.message} tone="warning">
|
|
15
|
+
{children}
|
|
16
|
+
</PanelNote>
|
|
17
|
+
);
|
package/src/Network.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Option, Result } from "@cprussin/option-result";
|
|
2
|
+
import { Drilldown } from "@domicile-desktop/component-library/Drilldown";
|
|
2
3
|
import { Panel } from "@domicile-desktop/component-library/Panel";
|
|
3
4
|
import { Popover } from "@domicile-desktop/component-library/Popover";
|
|
4
5
|
import { useKeepsKeyboard } from "@domicile-desktop/manganese-bar/panel-keyboard";
|
|
@@ -122,15 +123,17 @@ const Item = ({
|
|
|
122
123
|
}
|
|
123
124
|
wide
|
|
124
125
|
>
|
|
125
|
-
<
|
|
126
|
-
<
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
126
|
+
<Drilldown>
|
|
127
|
+
<Panel title="Network" width="standard">
|
|
128
|
+
<NetworkPanel
|
|
129
|
+
actions={actions}
|
|
130
|
+
addresses={addresses}
|
|
131
|
+
host={host}
|
|
132
|
+
wifi={wifi}
|
|
133
|
+
wired={wired}
|
|
134
|
+
/>
|
|
135
|
+
</Panel>
|
|
136
|
+
</Drilldown>
|
|
134
137
|
</Popover>
|
|
135
138
|
);
|
|
136
139
|
};
|
package/src/NetworkQuick.tsx
CHANGED
|
@@ -90,6 +90,7 @@ export const NetworkTile = ({ interfaces, onMore, wifi }: TileProps) => {
|
|
|
90
90
|
detail={wifiDetailOf(device)}
|
|
91
91
|
icon={<AnimatedWifiIcon bars={3} off={!device.enabled} size={15} />}
|
|
92
92
|
label="Wi-Fi"
|
|
93
|
+
lit={device.connection !== undefined}
|
|
93
94
|
onMore={onMore}
|
|
94
95
|
/>
|
|
95
96
|
);
|
|
@@ -99,6 +100,7 @@ export const NetworkTile = ({ interfaces, onMore, wifi }: TileProps) => {
|
|
|
99
100
|
detail={cable === undefined ? "No cable" : cableDetailOf(cable)}
|
|
100
101
|
icon={<NetworkIcon size={15} weight="bold" />}
|
|
101
102
|
label="Wired"
|
|
103
|
+
lit={cable !== undefined}
|
|
102
104
|
onMore={onMore}
|
|
103
105
|
/>
|
|
104
106
|
);
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { Button } from "@domicile-desktop/component-library/Button";
|
|
2
|
+
import { EmptyState } from "@domicile-desktop/component-library/EmptyState";
|
|
3
|
+
import { List, ListRow } from "@domicile-desktop/component-library/ListRow";
|
|
4
|
+
import { PanelFooter } from "@domicile-desktop/component-library/PanelFooter";
|
|
5
|
+
import { Switch } from "@domicile-desktop/component-library/Switch";
|
|
6
|
+
import { useRequests } from "@domicile-desktop/manganese-host/useRequests";
|
|
7
|
+
import type { Domicile } from "@domicile-desktop/sdk/desktop/desktop";
|
|
8
|
+
import type {
|
|
9
|
+
SavedWifi,
|
|
10
|
+
Wifi,
|
|
11
|
+
WifiNetwork,
|
|
12
|
+
} from "@domicile-desktop/system-network/wifi";
|
|
13
|
+
import { WifiSecurity } from "@domicile-desktop/system-network/wifi";
|
|
14
|
+
import { BookmarkSimpleIcon } from "@phosphor-icons/react/dist/ssr/BookmarkSimple";
|
|
15
|
+
import { TrashIcon } from "@phosphor-icons/react/dist/ssr/Trash";
|
|
16
|
+
import { WifiHighIcon } from "@phosphor-icons/react/dist/ssr/WifiHigh";
|
|
17
|
+
|
|
18
|
+
import { css } from "../styled-system/css";
|
|
19
|
+
import { Failure } from "./Failure";
|
|
20
|
+
import { WifiSignalIcon } from "./WifiSignalIcon";
|
|
21
|
+
import type { WifiActions } from "./wifi-actions";
|
|
22
|
+
|
|
23
|
+
type Props = {
|
|
24
|
+
wifi: Wifi;
|
|
25
|
+
/** Where requests go. */
|
|
26
|
+
host: Domicile;
|
|
27
|
+
actions: WifiActions;
|
|
28
|
+
/** What "today" and "yesterday" are counted from. */
|
|
29
|
+
now?: Date | undefined;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Every saved network, each a tile with all it offers in view: when it was
|
|
34
|
+
* last used, how it is secured, whether it joins by itself, and Forget.
|
|
35
|
+
*
|
|
36
|
+
* The connected network leads, then those in range, then the rest, most
|
|
37
|
+
* recently used first.
|
|
38
|
+
*/
|
|
39
|
+
export const SavedNetworks = ({
|
|
40
|
+
actions,
|
|
41
|
+
host,
|
|
42
|
+
now = new Date(),
|
|
43
|
+
wifi,
|
|
44
|
+
}: Props) => {
|
|
45
|
+
const requests = useRequests();
|
|
46
|
+
const inRange = new Map(
|
|
47
|
+
wifi.networks.flatMap((network) =>
|
|
48
|
+
network.profile === undefined ? [] : [[network.profile, network]],
|
|
49
|
+
),
|
|
50
|
+
);
|
|
51
|
+
return wifi.saved.length === 0 ? (
|
|
52
|
+
<EmptyState icon={BookmarkSimpleIcon} title="No saved networks" />
|
|
53
|
+
) : (
|
|
54
|
+
<List label="Saved networks">
|
|
55
|
+
{orderOf(wifi.saved, inRange).map((saved) => {
|
|
56
|
+
const network = inRange.get(saved.profile);
|
|
57
|
+
const forget = `forget:${saved.profile}`;
|
|
58
|
+
const autoJoin = `autoJoin:${saved.profile}`;
|
|
59
|
+
return (
|
|
60
|
+
<ListRow
|
|
61
|
+
detail={detailOf(saved, network, now)}
|
|
62
|
+
icon={
|
|
63
|
+
network === undefined ? (
|
|
64
|
+
<span className={awayStyles}>
|
|
65
|
+
<WifiHighIcon aria-hidden size={15} />
|
|
66
|
+
</span>
|
|
67
|
+
) : (
|
|
68
|
+
<WifiSignalIcon strength={network.strength} />
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
key={saved.profile}
|
|
72
|
+
label={saved.ssid}
|
|
73
|
+
surface="filled"
|
|
74
|
+
>
|
|
75
|
+
<Failure error={requests.failed(forget)}>
|
|
76
|
+
Couldn't forget {saved.ssid}
|
|
77
|
+
</Failure>
|
|
78
|
+
<Failure error={requests.failed(autoJoin)}>
|
|
79
|
+
Couldn't change {saved.ssid}
|
|
80
|
+
</Failure>
|
|
81
|
+
<PanelFooter
|
|
82
|
+
action={
|
|
83
|
+
<Button
|
|
84
|
+
beforeIcon={<TrashIcon aria-hidden size={14} />}
|
|
85
|
+
loading={requests.pending(forget)}
|
|
86
|
+
onClick={() => {
|
|
87
|
+
requests.run(forget, () =>
|
|
88
|
+
actions.forgetWifi(host, wifi, saved),
|
|
89
|
+
);
|
|
90
|
+
}}
|
|
91
|
+
rounded
|
|
92
|
+
size="xs"
|
|
93
|
+
variant="dangerGhost"
|
|
94
|
+
>
|
|
95
|
+
Forget
|
|
96
|
+
</Button>
|
|
97
|
+
}
|
|
98
|
+
>
|
|
99
|
+
<Switch
|
|
100
|
+
checked={saved.autoJoin}
|
|
101
|
+
disabled={requests.pending(autoJoin)}
|
|
102
|
+
label="Join automatically"
|
|
103
|
+
onCheckedChange={(checked) => {
|
|
104
|
+
requests.run(autoJoin, () =>
|
|
105
|
+
actions.setWifiAutoJoin(host, wifi, saved, checked),
|
|
106
|
+
);
|
|
107
|
+
}}
|
|
108
|
+
/>
|
|
109
|
+
</PanelFooter>
|
|
110
|
+
</ListRow>
|
|
111
|
+
);
|
|
112
|
+
})}
|
|
113
|
+
</List>
|
|
114
|
+
);
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/** Connected, then in range, then most recently used; never used last. */
|
|
118
|
+
const orderOf = (
|
|
119
|
+
saved: readonly SavedWifi[],
|
|
120
|
+
inRange: ReadonlyMap<string, WifiNetwork>,
|
|
121
|
+
): SavedWifi[] =>
|
|
122
|
+
saved.toSorted(
|
|
123
|
+
(a, b) =>
|
|
124
|
+
rankOf(a, inRange) - rankOf(b, inRange) ||
|
|
125
|
+
(b.lastUsed?.getTime() ?? 0) - (a.lastUsed?.getTime() ?? 0),
|
|
126
|
+
);
|
|
127
|
+
|
|
128
|
+
const rankOf = (
|
|
129
|
+
saved: SavedWifi,
|
|
130
|
+
inRange: ReadonlyMap<string, WifiNetwork>,
|
|
131
|
+
): number => {
|
|
132
|
+
const network = inRange.get(saved.profile);
|
|
133
|
+
if (network === undefined) {
|
|
134
|
+
return 2;
|
|
135
|
+
} else {
|
|
136
|
+
return network.connected ? 0 : 1;
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
/** Where it is, when it was last used, and how it is secured. */
|
|
141
|
+
const detailOf = (
|
|
142
|
+
saved: SavedWifi,
|
|
143
|
+
network: WifiNetwork | undefined,
|
|
144
|
+
now: Date,
|
|
145
|
+
): string =>
|
|
146
|
+
[
|
|
147
|
+
...(network === undefined
|
|
148
|
+
? []
|
|
149
|
+
: [network.connected ? "Connected" : "In range"]),
|
|
150
|
+
...(network?.connected === true ? [] : [usedOf(saved.lastUsed, now)]),
|
|
151
|
+
SECURITY[saved.security],
|
|
152
|
+
].join(" · ");
|
|
153
|
+
|
|
154
|
+
const SECURITY = {
|
|
155
|
+
[WifiSecurity.Open]: "Open",
|
|
156
|
+
[WifiSecurity.Password]: "Secured",
|
|
157
|
+
[WifiSecurity.Enterprise]: "Enterprise",
|
|
158
|
+
} as const satisfies Record<WifiSecurity, string>;
|
|
159
|
+
|
|
160
|
+
const usedOf = (used: Date | undefined, now: Date): string =>
|
|
161
|
+
used === undefined ? "Never used" : `Used ${dayOf(used, now)}`;
|
|
162
|
+
|
|
163
|
+
/** A day as people say it: today, yesterday, or its date, with its year if not this one. */
|
|
164
|
+
const dayOf = (day: Date, now: Date): string => {
|
|
165
|
+
switch (daysBetween(day, now)) {
|
|
166
|
+
case 0: {
|
|
167
|
+
return "today";
|
|
168
|
+
}
|
|
169
|
+
case 1: {
|
|
170
|
+
return "yesterday";
|
|
171
|
+
}
|
|
172
|
+
default: {
|
|
173
|
+
return day.toLocaleDateString("en-US", {
|
|
174
|
+
day: "numeric",
|
|
175
|
+
month: "short",
|
|
176
|
+
...(day.getFullYear() === now.getFullYear() ? {} : { year: "numeric" }),
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
/** Calendar days from `from` to `to`, in local time. */
|
|
183
|
+
const daysBetween = (from: Date, to: Date): number =>
|
|
184
|
+
Math.round(
|
|
185
|
+
(new Date(to.getFullYear(), to.getMonth(), to.getDate()).getTime() -
|
|
186
|
+
new Date(from.getFullYear(), from.getMonth(), from.getDate()).getTime()) /
|
|
187
|
+
86_400_000,
|
|
188
|
+
);
|
|
189
|
+
|
|
190
|
+
// Out of range: the network is there to manage, not to join.
|
|
191
|
+
const awayStyles = css({ display: "inline-flex", opacity: "inactive" });
|
package/src/WifiPanel.tsx
CHANGED
|
@@ -2,12 +2,13 @@ import type { Option, Result } from "@cprussin/option-result";
|
|
|
2
2
|
import { Button } from "@domicile-desktop/component-library/Button";
|
|
3
3
|
import type { Detail } from "@domicile-desktop/component-library/DetailList";
|
|
4
4
|
import { DetailList } from "@domicile-desktop/component-library/DetailList";
|
|
5
|
+
import { DrilldownPage } from "@domicile-desktop/component-library/Drilldown";
|
|
5
6
|
import { EmptyState } from "@domicile-desktop/component-library/EmptyState";
|
|
6
7
|
import { IconButton } from "@domicile-desktop/component-library/IconButton";
|
|
7
8
|
import { Input } from "@domicile-desktop/component-library/Input";
|
|
8
9
|
import { List, ListRow } from "@domicile-desktop/component-library/ListRow";
|
|
9
10
|
import { Loading } from "@domicile-desktop/component-library/Loading";
|
|
10
|
-
import {
|
|
11
|
+
import { PanelFooter } from "@domicile-desktop/component-library/PanelFooter";
|
|
11
12
|
import { PanelSection } from "@domicile-desktop/component-library/PanelSection";
|
|
12
13
|
import { Switch } from "@domicile-desktop/component-library/Switch";
|
|
13
14
|
import { Tooltip } from "@domicile-desktop/component-library/Tooltip";
|
|
@@ -21,15 +22,17 @@ import type {
|
|
|
21
22
|
WifiNetwork,
|
|
22
23
|
} from "@domicile-desktop/system-network/wifi";
|
|
23
24
|
import { ArrowClockwiseIcon } from "@phosphor-icons/react/dist/ssr/ArrowClockwise";
|
|
25
|
+
import { CaretRightIcon } from "@phosphor-icons/react/dist/ssr/CaretRight";
|
|
24
26
|
import { LockSimpleIcon } from "@phosphor-icons/react/dist/ssr/LockSimple";
|
|
25
27
|
import { MagnifyingGlassIcon } from "@phosphor-icons/react/dist/ssr/MagnifyingGlass";
|
|
26
28
|
import { WifiHighIcon } from "@phosphor-icons/react/dist/ssr/WifiHigh";
|
|
27
29
|
import { WifiSlashIcon } from "@phosphor-icons/react/dist/ssr/WifiSlash";
|
|
28
|
-
import type { ReactNode } from "react";
|
|
29
30
|
import { useEffect, useState } from "react";
|
|
30
31
|
import { hstack } from "../styled-system/patterns";
|
|
31
32
|
import type { Addresses } from "./addressing";
|
|
32
33
|
import { addressRowsOf, COPYABLE } from "./addressing";
|
|
34
|
+
import { Failure } from "./Failure";
|
|
35
|
+
import { SavedNetworks } from "./SavedNetworks";
|
|
33
36
|
import { signalOf } from "./signal";
|
|
34
37
|
import { speedOf } from "./speed";
|
|
35
38
|
import { WifiSignalIcon } from "./WifiSignalIcon";
|
|
@@ -48,7 +51,9 @@ type Props = {
|
|
|
48
51
|
/**
|
|
49
52
|
* The Wi-Fi section: a switch for the radio on its heading, the connection
|
|
50
53
|
* with its details folded away, then the other networks in range, each
|
|
51
|
-
* joined with a click.
|
|
54
|
+
* joined with a click. A button on the heading opens a page of the saved
|
|
55
|
+
* networks, radio on or off. Nothing without a Wi-Fi device. Goes in a
|
|
56
|
+
* `Drilldown`, which shows the page.
|
|
52
57
|
*
|
|
53
58
|
* Scans when shown. A refusal shows plainly where it was asked, with the
|
|
54
59
|
* service's words in its tooltip; the service's state shows the rest.
|
|
@@ -64,9 +69,12 @@ export const WifiPanel = ({ actions, addresses, host, wifi }: Props) => {
|
|
|
64
69
|
return wifi.match({
|
|
65
70
|
Err: (error) => (
|
|
66
71
|
<PanelSection label="Wi-Fi">
|
|
67
|
-
<
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
<EmptyState
|
|
73
|
+
detail={error.message}
|
|
74
|
+
hint="Close this and open it again in a moment."
|
|
75
|
+
title="Couldn't read Wi-Fi"
|
|
76
|
+
tone="warning"
|
|
77
|
+
/>
|
|
70
78
|
</PanelSection>
|
|
71
79
|
),
|
|
72
80
|
Ok: (found) =>
|
|
@@ -95,6 +103,7 @@ type ControlsProps = {
|
|
|
95
103
|
const Controls = ({ actions, addresses, host, wifi }: ControlsProps) => {
|
|
96
104
|
const requests = useRequests();
|
|
97
105
|
const [asking, setAsking] = useState<string | undefined>(undefined);
|
|
106
|
+
const [savedOpen, setSavedOpen] = useState(false);
|
|
98
107
|
const { backend, device, interface: name } = wifi;
|
|
99
108
|
const scanning = wifi.scanning || requests.pending("scan");
|
|
100
109
|
const join = (network: WifiNetwork, passphrase: string | undefined) => {
|
|
@@ -112,6 +121,19 @@ const Controls = ({ actions, addresses, host, wifi }: ControlsProps) => {
|
|
|
112
121
|
<PanelSection
|
|
113
122
|
action={
|
|
114
123
|
<span className={headStyles}>
|
|
124
|
+
{wifi.saved.length > 0 && (
|
|
125
|
+
<Button
|
|
126
|
+
afterIcon={<CaretRightIcon aria-hidden size={10} weight="bold" />}
|
|
127
|
+
onClick={() => {
|
|
128
|
+
setSavedOpen(true);
|
|
129
|
+
}}
|
|
130
|
+
rounded
|
|
131
|
+
size="xs"
|
|
132
|
+
variant="ghost"
|
|
133
|
+
>
|
|
134
|
+
{`${wifi.saved.length} saved`}
|
|
135
|
+
</Button>
|
|
136
|
+
)}
|
|
115
137
|
{wifi.enabled && (scanning || !empty) && (
|
|
116
138
|
<Tooltip
|
|
117
139
|
content="Scan"
|
|
@@ -175,7 +197,6 @@ const Controls = ({ actions, addresses, host, wifi }: ControlsProps) => {
|
|
|
175
197
|
<Connection
|
|
176
198
|
addresses={addresses}
|
|
177
199
|
connection={wifi.connection}
|
|
178
|
-
failed={requests.failed("disconnect")}
|
|
179
200
|
onDisconnect={() => {
|
|
180
201
|
requests.run("disconnect", () =>
|
|
181
202
|
actions.disconnectWifi(host, wifi),
|
|
@@ -209,8 +230,11 @@ const Controls = ({ actions, addresses, host, wifi }: ControlsProps) => {
|
|
|
209
230
|
{!scanning &&
|
|
210
231
|
others.length === 0 &&
|
|
211
232
|
wifi.connection !== undefined && (
|
|
212
|
-
<
|
|
233
|
+
<EmptyState layout="inline" title="No other networks nearby" />
|
|
213
234
|
)}
|
|
235
|
+
<Failure error={requests.failed("disconnect")}>
|
|
236
|
+
Couldn't disconnect
|
|
237
|
+
</Failure>
|
|
214
238
|
<Failure error={requests.failed("scan")}>
|
|
215
239
|
Couldn't look for networks
|
|
216
240
|
</Failure>
|
|
@@ -222,6 +246,16 @@ const Controls = ({ actions, addresses, host, wifi }: ControlsProps) => {
|
|
|
222
246
|
title="Wi-Fi is off"
|
|
223
247
|
/>
|
|
224
248
|
)}
|
|
249
|
+
{savedOpen && (
|
|
250
|
+
<DrilldownPage
|
|
251
|
+
onBack={() => {
|
|
252
|
+
setSavedOpen(false);
|
|
253
|
+
}}
|
|
254
|
+
title="Saved networks"
|
|
255
|
+
>
|
|
256
|
+
<SavedNetworks actions={actions} host={host} wifi={wifi} />
|
|
257
|
+
</DrilldownPage>
|
|
258
|
+
)}
|
|
225
259
|
</PanelSection>
|
|
226
260
|
);
|
|
227
261
|
};
|
|
@@ -264,14 +298,13 @@ type ConnectionProps = {
|
|
|
264
298
|
addresses: Addresses;
|
|
265
299
|
connection: WifiConnection;
|
|
266
300
|
pending: boolean;
|
|
267
|
-
failed: SystemError | undefined;
|
|
268
301
|
onDisconnect: () => void;
|
|
269
302
|
};
|
|
270
303
|
|
|
304
|
+
/** The connection, with Disconnect at the foot of its details. */
|
|
271
305
|
const Connection = ({
|
|
272
306
|
addresses,
|
|
273
307
|
connection,
|
|
274
|
-
failed,
|
|
275
308
|
onDisconnect,
|
|
276
309
|
pending,
|
|
277
310
|
wifi,
|
|
@@ -284,12 +317,20 @@ const Connection = ({
|
|
|
284
317
|
surface="filled"
|
|
285
318
|
>
|
|
286
319
|
<DetailList rows={detailsOf(wifi, connection, addresses)} />
|
|
287
|
-
<
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
320
|
+
<PanelFooter
|
|
321
|
+
action={
|
|
322
|
+
<Button
|
|
323
|
+
beforeIcon={<WifiSlashIcon aria-hidden size={14} />}
|
|
324
|
+
loading={pending}
|
|
325
|
+
onClick={onDisconnect}
|
|
326
|
+
rounded
|
|
327
|
+
size="xs"
|
|
328
|
+
variant="dangerGhost"
|
|
329
|
+
>
|
|
330
|
+
Disconnect
|
|
331
|
+
</Button>
|
|
332
|
+
}
|
|
333
|
+
/>
|
|
293
334
|
</ListRow>
|
|
294
335
|
);
|
|
295
336
|
|
|
@@ -376,20 +417,6 @@ const Passphrase = ({
|
|
|
376
417
|
);
|
|
377
418
|
};
|
|
378
419
|
|
|
379
|
-
/** What failed, in plain words, with the service's in its tooltip. */
|
|
380
|
-
const Failure = ({
|
|
381
|
-
children,
|
|
382
|
-
error,
|
|
383
|
-
}: {
|
|
384
|
-
children: ReactNode;
|
|
385
|
-
error: SystemError | undefined;
|
|
386
|
-
}) =>
|
|
387
|
-
error !== undefined && (
|
|
388
|
-
<PanelNote detail={error.message} tone="warning">
|
|
389
|
-
{children}
|
|
390
|
-
</PanelNote>
|
|
391
|
-
);
|
|
392
|
-
|
|
393
420
|
/** A new secured network, whose passphrase the service does not know. */
|
|
394
421
|
const needsPassphrase = (network: WifiNetwork): boolean =>
|
|
395
422
|
network.secured && network.profile === undefined;
|
package/src/held-wifi-actions.ts
CHANGED
|
@@ -23,7 +23,11 @@ export const heldWifiActions = (
|
|
|
23
23
|
connectWifi: (_system, wifi, network, passphrase) =>
|
|
24
24
|
ask(["connect", wifi.device, network.ssid, passphrase]),
|
|
25
25
|
disconnectWifi: (_system, wifi) => ask(["disconnect", wifi.device]),
|
|
26
|
+
forgetWifi: (_system, wifi, saved) =>
|
|
27
|
+
ask(["forget", wifi.device, saved.ssid]),
|
|
26
28
|
scanWifi: (_system, wifi) => ask(["scan", wifi.device]),
|
|
29
|
+
setWifiAutoJoin: (_system, wifi, saved, autoJoin) =>
|
|
30
|
+
ask(["autoJoin", wifi.device, saved.ssid, autoJoin]),
|
|
27
31
|
setWifiEnabled: (_system, wifi, enabled) =>
|
|
28
32
|
ask(["setEnabled", wifi.device, enabled]),
|
|
29
33
|
};
|
package/src/wifi-actions.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
connectWifi,
|
|
3
3
|
disconnectWifi,
|
|
4
|
+
forgetWifi,
|
|
4
5
|
scanWifi,
|
|
6
|
+
setWifiAutoJoin,
|
|
5
7
|
setWifiEnabled,
|
|
6
8
|
} from "@domicile-desktop/system-network/wifi";
|
|
7
9
|
|
|
@@ -9,7 +11,9 @@ import {
|
|
|
9
11
|
export const WIFI_ACTIONS = {
|
|
10
12
|
connectWifi,
|
|
11
13
|
disconnectWifi,
|
|
14
|
+
forgetWifi,
|
|
12
15
|
scanWifi,
|
|
16
|
+
setWifiAutoJoin,
|
|
13
17
|
setWifiEnabled,
|
|
14
18
|
};
|
|
15
19
|
|
|
@@ -3,11 +3,11 @@ import { css } from '../css/index.mjs';
|
|
|
3
3
|
|
|
4
4
|
const aspectRatioConfig = {
|
|
5
5
|
transform(props, { map }) {
|
|
6
|
-
const { ratio =
|
|
6
|
+
const { ratio = 1.3333333333333333, ...rest } = props;
|
|
7
7
|
return {
|
|
8
8
|
position: "relative",
|
|
9
9
|
_before: {
|
|
10
|
-
content:
|
|
10
|
+
content: '""',
|
|
11
11
|
display: "block",
|
|
12
12
|
height: "0",
|
|
13
13
|
paddingBottom: map(ratio, (r) => `${1 / r * 100}%`)
|
|
@@ -3,8 +3,7 @@ import { css } from '../css/index.mjs';
|
|
|
3
3
|
|
|
4
4
|
const bleedConfig = {
|
|
5
5
|
transform(props, { map, isCssUnit, isCssVar }) {
|
|
6
|
-
const { inline, block, ...rest } = props
|
|
7
|
-
const valueFn = (v) => isCssUnit(v) || isCssVar(v) ? v : `token(spacing.${v}, ${v})`;
|
|
6
|
+
const { inline, block, ...rest } = props, valueFn = (v) => isCssUnit(v) || isCssVar(v) ? v : `token(spacing.${v}, ${v})`;
|
|
8
7
|
return {
|
|
9
8
|
"--bleed-x": map(inline, valueFn),
|
|
10
9
|
"--bleed-y": map(block, valueFn),
|
|
@@ -11,28 +11,22 @@ transform(props, { map }) {
|
|
|
11
11
|
position: "absolute",
|
|
12
12
|
insetBlockStart: map(placement, (v) => {
|
|
13
13
|
const [side] = v.split("-");
|
|
14
|
-
|
|
15
|
-
return map2[side];
|
|
14
|
+
return { top: offsetY, middle: "50%", bottom: "auto" }[side];
|
|
16
15
|
}),
|
|
17
16
|
insetBlockEnd: map(placement, (v) => {
|
|
18
17
|
const [side] = v.split("-");
|
|
19
|
-
|
|
20
|
-
return map2[side];
|
|
18
|
+
return { top: "auto", middle: "50%", bottom: offsetY }[side];
|
|
21
19
|
}),
|
|
22
20
|
insetInlineStart: map(placement, (v) => {
|
|
23
21
|
const [, align] = v.split("-");
|
|
24
|
-
|
|
25
|
-
return map2[align];
|
|
22
|
+
return { start: offsetX, center: "50%", end: "auto" }[align];
|
|
26
23
|
}),
|
|
27
24
|
insetInlineEnd: map(placement, (v) => {
|
|
28
25
|
const [, align] = v.split("-");
|
|
29
|
-
|
|
30
|
-
return map2[align];
|
|
26
|
+
return { start: "auto", center: "50%", end: offsetX }[align];
|
|
31
27
|
}),
|
|
32
28
|
translate: map(placement, (v) => {
|
|
33
|
-
const [side, align] = v.split("-");
|
|
34
|
-
const mapX = { start: "-50%", center: "-50%", end: "50%" };
|
|
35
|
-
const mapY = { top: "-50%", middle: "-50%", bottom: "50%" };
|
|
29
|
+
const [side, align] = v.split("-"), mapX = { start: "-50%", center: "-50%", end: "50%" }, mapY = { top: "-50%", middle: "-50%", bottom: "50%" };
|
|
36
30
|
return `${mapX[align]} ${mapY[side]}`;
|
|
37
31
|
}),
|
|
38
32
|
...rest
|
|
@@ -3,8 +3,7 @@ import { css } from '../css/index.mjs';
|
|
|
3
3
|
|
|
4
4
|
const gridItemConfig = {
|
|
5
5
|
transform(props, { map }) {
|
|
6
|
-
const { colSpan, rowSpan, colStart, rowStart, colEnd, rowEnd, ...rest } = props
|
|
7
|
-
const spanFn = (v) => v === "auto" ? v : `span ${v}`;
|
|
6
|
+
const { colSpan, rowSpan, colStart, rowStart, colEnd, rowEnd, ...rest } = props, spanFn = (v) => v === "auto" ? v : `span ${v}`;
|
|
8
7
|
return {
|
|
9
8
|
gridColumn: colSpan != null ? map(colSpan, spanFn) : void 0,
|
|
10
9
|
gridRow: rowSpan != null ? map(rowSpan, spanFn) : void 0,
|
|
@@ -3,8 +3,7 @@ import { css } from '../css/index.mjs';
|
|
|
3
3
|
|
|
4
4
|
const gridConfig = {
|
|
5
5
|
transform(props, { map, isCssUnit }) {
|
|
6
|
-
const { columnGap, rowGap, gap, columns, minChildWidth, ...rest } = props
|
|
7
|
-
const getValue = (v) => isCssUnit(v) ? v : `token(sizes.${v}, ${v})`;
|
|
6
|
+
const { columnGap, rowGap, gap, columns, minChildWidth, ...rest } = props, getValue = (v) => isCssUnit(v) ? v : `token(sizes.${v}, ${v})`;
|
|
8
7
|
return {
|
|
9
8
|
display: "grid",
|
|
10
9
|
gridTemplateColumns: columns != null ? map(columns, (v) => `repeat(${v}, minmax(0, 1fr))`) : minChildWidth != null ? map(minChildWidth, (v) => `repeat(auto-fit, minmax(${getValue(v)}, 1fr))`) : void 0,
|
|
@@ -8,9 +8,9 @@ transform(props, { map, isCssUnit, isCssVar }) {
|
|
|
8
8
|
alignSelf: "stretch",
|
|
9
9
|
justifySelf: "stretch",
|
|
10
10
|
flex: map(size, (v) => {
|
|
11
|
-
if (v == null)
|
|
12
|
-
|
|
13
|
-
return `0 0 ${
|
|
11
|
+
if (v == null)
|
|
12
|
+
return "1";
|
|
13
|
+
return `0 0 ${isCssUnit(v) || isCssVar(v) ? v : `token(spacing.${v}, ${v})`}`;
|
|
14
14
|
}),
|
|
15
15
|
...rest
|
|
16
16
|
};
|
|
@@ -33504,15 +33504,15 @@ const tokens = {
|
|
|
33504
33504
|
"variable": "var(--jRjWKm)"
|
|
33505
33505
|
},
|
|
33506
33506
|
"zIndex.lock": {
|
|
33507
|
-
"value": "
|
|
33507
|
+
"value": "2147483647",
|
|
33508
33508
|
"variable": "var(--fkMZTt)"
|
|
33509
33509
|
},
|
|
33510
33510
|
"zIndex.modal": {
|
|
33511
|
-
"value": "
|
|
33511
|
+
"value": "2147483646",
|
|
33512
33512
|
"variable": "var(--dIktSh)"
|
|
33513
33513
|
},
|
|
33514
33514
|
"zIndex.modalBackdrop": {
|
|
33515
|
-
"value": "
|
|
33515
|
+
"value": "2147483645",
|
|
33516
33516
|
"variable": "var(--jXaBXH)"
|
|
33517
33517
|
},
|
|
33518
33518
|
"zIndex.toast": {
|
|
@@ -33595,6 +33595,10 @@ const tokens = {
|
|
|
33595
33595
|
"value": "var(--dIlxIZ)",
|
|
33596
33596
|
"variable": "var(--dIlxIZ)"
|
|
33597
33597
|
},
|
|
33598
|
+
"colors.onDanger": {
|
|
33599
|
+
"value": "white",
|
|
33600
|
+
"variable": "var(--hgeHO)"
|
|
33601
|
+
},
|
|
33598
33602
|
"colors.onPhoto": {
|
|
33599
33603
|
"value": "white",
|
|
33600
33604
|
"variable": "var(--cFzlNp)"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
export type Token = `aspectRatios.${AspectRatioToken}` | `borders.${BorderToken}` | `radii.${RadiusToken}` | `fontWeights.${FontWeightToken}` | `lineHeights.${LineHeightToken}` | `letterSpacings.${LetterSpacingToken}` | `shadows.${ShadowToken}` | `colors.${ColorToken}` | `blurs.${BlurToken}` | `animations.${AnimationToken}` | `borderWidths.${BorderWidthToken}` | `durations.${DurationToken}` | `easings.${EasingToken}` | `fontSizes.${FontSizeToken}` | `fonts.${FontToken}` | `gradients.${GradientToken}` | `opacity.${OpacityToken}` | `sizes.${SizeToken}` | `spacing.${SpacingToken}` | `zIndex.${ZIndexToken}` | `breakpoints.${BreakpointToken}`
|
|
3
3
|
|
|
4
|
-
export type ColorPalette = "current" | "black" | "white" | "transparent" | "rose" | "pink" | "fuchsia" | "purple" | "violet" | "indigo" | "blue" | "sky" | "cyan" | "teal" | "emerald" | "green" | "lime" | "yellow" | "amber" | "orange" | "red" | "neutral" | "stone" | "zinc" | "gray" | "slate" | "accent" | "backdrop" | "background" | "border" | "borderStrong" | "card" | "danger" | "dangerSoft" | "divider" | "fill" | "fillHover" | "fillOverPhoto" | "foreground" | "muted" | "onPhoto" | "panelOverPhoto" | "private" | "skeleton" | "success" | "textFaint" | "textSoft" | "warning"
|
|
4
|
+
export type ColorPalette = "current" | "black" | "white" | "transparent" | "rose" | "pink" | "fuchsia" | "purple" | "violet" | "indigo" | "blue" | "sky" | "cyan" | "teal" | "emerald" | "green" | "lime" | "yellow" | "amber" | "orange" | "red" | "neutral" | "stone" | "zinc" | "gray" | "slate" | "accent" | "backdrop" | "background" | "border" | "borderStrong" | "card" | "danger" | "dangerSoft" | "divider" | "fill" | "fillHover" | "fillOverPhoto" | "foreground" | "muted" | "onDanger" | "onPhoto" | "panelOverPhoto" | "private" | "skeleton" | "success" | "textFaint" | "textSoft" | "warning"
|
|
5
5
|
|
|
6
6
|
export type AspectRatioToken = "square" | "landscape" | "portrait" | "wide" | "ultrawide" | "golden"
|
|
7
7
|
|
|
@@ -17,7 +17,7 @@ export type LetterSpacingToken = "tighter" | "tight" | "normal" | "wide" | "wide
|
|
|
17
17
|
|
|
18
18
|
export type ShadowToken = "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "inset-2xs" | "inset-xs" | "inset-sm" | "lifted" | "modal" | "textOverPhoto"
|
|
19
19
|
|
|
20
|
-
export type ColorToken = "current" | "black" | "white" | "transparent" | "rose.50" | "rose.100" | "rose.200" | "rose.300" | "rose.400" | "rose.500" | "rose.600" | "rose.700" | "rose.800" | "rose.900" | "rose.950" | "pink.50" | "pink.100" | "pink.200" | "pink.300" | "pink.400" | "pink.500" | "pink.600" | "pink.700" | "pink.800" | "pink.900" | "pink.950" | "fuchsia.50" | "fuchsia.100" | "fuchsia.200" | "fuchsia.300" | "fuchsia.400" | "fuchsia.500" | "fuchsia.600" | "fuchsia.700" | "fuchsia.800" | "fuchsia.900" | "fuchsia.950" | "purple.50" | "purple.100" | "purple.200" | "purple.300" | "purple.400" | "purple.500" | "purple.600" | "purple.700" | "purple.800" | "purple.900" | "purple.950" | "violet.50" | "violet.100" | "violet.200" | "violet.300" | "violet.400" | "violet.500" | "violet.600" | "violet.700" | "violet.800" | "violet.900" | "violet.950" | "indigo.50" | "indigo.100" | "indigo.200" | "indigo.300" | "indigo.400" | "indigo.500" | "indigo.600" | "indigo.700" | "indigo.800" | "indigo.900" | "indigo.950" | "blue.50" | "blue.100" | "blue.200" | "blue.300" | "blue.400" | "blue.500" | "blue.600" | "blue.700" | "blue.800" | "blue.900" | "blue.950" | "sky.50" | "sky.100" | "sky.200" | "sky.300" | "sky.400" | "sky.500" | "sky.600" | "sky.700" | "sky.800" | "sky.900" | "sky.950" | "cyan.50" | "cyan.100" | "cyan.200" | "cyan.300" | "cyan.400" | "cyan.500" | "cyan.600" | "cyan.700" | "cyan.800" | "cyan.900" | "cyan.950" | "teal.50" | "teal.100" | "teal.200" | "teal.300" | "teal.400" | "teal.500" | "teal.600" | "teal.700" | "teal.800" | "teal.900" | "teal.950" | "emerald.50" | "emerald.100" | "emerald.200" | "emerald.300" | "emerald.400" | "emerald.500" | "emerald.600" | "emerald.700" | "emerald.800" | "emerald.900" | "emerald.950" | "green.50" | "green.100" | "green.200" | "green.300" | "green.400" | "green.500" | "green.600" | "green.700" | "green.800" | "green.900" | "green.950" | "lime.50" | "lime.100" | "lime.200" | "lime.300" | "lime.400" | "lime.500" | "lime.600" | "lime.700" | "lime.800" | "lime.900" | "lime.950" | "yellow.50" | "yellow.100" | "yellow.200" | "yellow.300" | "yellow.400" | "yellow.500" | "yellow.600" | "yellow.700" | "yellow.800" | "yellow.900" | "yellow.950" | "amber.50" | "amber.100" | "amber.200" | "amber.300" | "amber.400" | "amber.500" | "amber.600" | "amber.700" | "amber.800" | "amber.900" | "amber.950" | "orange.50" | "orange.100" | "orange.200" | "orange.300" | "orange.400" | "orange.500" | "orange.600" | "orange.700" | "orange.800" | "orange.900" | "orange.950" | "red.50" | "red.100" | "red.200" | "red.300" | "red.400" | "red.500" | "red.600" | "red.700" | "red.800" | "red.900" | "red.950" | "neutral.50" | "neutral.100" | "neutral.200" | "neutral.300" | "neutral.400" | "neutral.500" | "neutral.600" | "neutral.700" | "neutral.800" | "neutral.900" | "neutral.950" | "stone.50" | "stone.100" | "stone.200" | "stone.300" | "stone.400" | "stone.500" | "stone.600" | "stone.700" | "stone.800" | "stone.900" | "stone.950" | "zinc.50" | "zinc.100" | "zinc.200" | "zinc.300" | "zinc.400" | "zinc.500" | "zinc.600" | "zinc.700" | "zinc.800" | "zinc.900" | "zinc.950" | "gray.50" | "gray.100" | "gray.200" | "gray.300" | "gray.400" | "gray.500" | "gray.600" | "gray.700" | "gray.800" | "gray.900" | "gray.950" | "slate.50" | "slate.100" | "slate.200" | "slate.300" | "slate.400" | "slate.500" | "slate.600" | "slate.700" | "slate.800" | "slate.900" | "slate.950" | "accent" | "backdrop" | "background" | "border" | "borderStrong" | "card" | "danger" | "dangerSoft" | "divider" | "fill" | "fillHover" | "fillOverPhoto" | "foreground" | "muted" | "onPhoto" | "panelOverPhoto" | "private" | "skeleton" | "success" | "textFaint" | "textSoft" | "warning" | "colorPalette" | "colorPalette.50" | "colorPalette.100" | "colorPalette.200" | "colorPalette.300" | "colorPalette.400" | "colorPalette.500" | "colorPalette.600" | "colorPalette.700" | "colorPalette.800" | "colorPalette.900" | "colorPalette.950"
|
|
20
|
+
export type ColorToken = "current" | "black" | "white" | "transparent" | "rose.50" | "rose.100" | "rose.200" | "rose.300" | "rose.400" | "rose.500" | "rose.600" | "rose.700" | "rose.800" | "rose.900" | "rose.950" | "pink.50" | "pink.100" | "pink.200" | "pink.300" | "pink.400" | "pink.500" | "pink.600" | "pink.700" | "pink.800" | "pink.900" | "pink.950" | "fuchsia.50" | "fuchsia.100" | "fuchsia.200" | "fuchsia.300" | "fuchsia.400" | "fuchsia.500" | "fuchsia.600" | "fuchsia.700" | "fuchsia.800" | "fuchsia.900" | "fuchsia.950" | "purple.50" | "purple.100" | "purple.200" | "purple.300" | "purple.400" | "purple.500" | "purple.600" | "purple.700" | "purple.800" | "purple.900" | "purple.950" | "violet.50" | "violet.100" | "violet.200" | "violet.300" | "violet.400" | "violet.500" | "violet.600" | "violet.700" | "violet.800" | "violet.900" | "violet.950" | "indigo.50" | "indigo.100" | "indigo.200" | "indigo.300" | "indigo.400" | "indigo.500" | "indigo.600" | "indigo.700" | "indigo.800" | "indigo.900" | "indigo.950" | "blue.50" | "blue.100" | "blue.200" | "blue.300" | "blue.400" | "blue.500" | "blue.600" | "blue.700" | "blue.800" | "blue.900" | "blue.950" | "sky.50" | "sky.100" | "sky.200" | "sky.300" | "sky.400" | "sky.500" | "sky.600" | "sky.700" | "sky.800" | "sky.900" | "sky.950" | "cyan.50" | "cyan.100" | "cyan.200" | "cyan.300" | "cyan.400" | "cyan.500" | "cyan.600" | "cyan.700" | "cyan.800" | "cyan.900" | "cyan.950" | "teal.50" | "teal.100" | "teal.200" | "teal.300" | "teal.400" | "teal.500" | "teal.600" | "teal.700" | "teal.800" | "teal.900" | "teal.950" | "emerald.50" | "emerald.100" | "emerald.200" | "emerald.300" | "emerald.400" | "emerald.500" | "emerald.600" | "emerald.700" | "emerald.800" | "emerald.900" | "emerald.950" | "green.50" | "green.100" | "green.200" | "green.300" | "green.400" | "green.500" | "green.600" | "green.700" | "green.800" | "green.900" | "green.950" | "lime.50" | "lime.100" | "lime.200" | "lime.300" | "lime.400" | "lime.500" | "lime.600" | "lime.700" | "lime.800" | "lime.900" | "lime.950" | "yellow.50" | "yellow.100" | "yellow.200" | "yellow.300" | "yellow.400" | "yellow.500" | "yellow.600" | "yellow.700" | "yellow.800" | "yellow.900" | "yellow.950" | "amber.50" | "amber.100" | "amber.200" | "amber.300" | "amber.400" | "amber.500" | "amber.600" | "amber.700" | "amber.800" | "amber.900" | "amber.950" | "orange.50" | "orange.100" | "orange.200" | "orange.300" | "orange.400" | "orange.500" | "orange.600" | "orange.700" | "orange.800" | "orange.900" | "orange.950" | "red.50" | "red.100" | "red.200" | "red.300" | "red.400" | "red.500" | "red.600" | "red.700" | "red.800" | "red.900" | "red.950" | "neutral.50" | "neutral.100" | "neutral.200" | "neutral.300" | "neutral.400" | "neutral.500" | "neutral.600" | "neutral.700" | "neutral.800" | "neutral.900" | "neutral.950" | "stone.50" | "stone.100" | "stone.200" | "stone.300" | "stone.400" | "stone.500" | "stone.600" | "stone.700" | "stone.800" | "stone.900" | "stone.950" | "zinc.50" | "zinc.100" | "zinc.200" | "zinc.300" | "zinc.400" | "zinc.500" | "zinc.600" | "zinc.700" | "zinc.800" | "zinc.900" | "zinc.950" | "gray.50" | "gray.100" | "gray.200" | "gray.300" | "gray.400" | "gray.500" | "gray.600" | "gray.700" | "gray.800" | "gray.900" | "gray.950" | "slate.50" | "slate.100" | "slate.200" | "slate.300" | "slate.400" | "slate.500" | "slate.600" | "slate.700" | "slate.800" | "slate.900" | "slate.950" | "accent" | "backdrop" | "background" | "border" | "borderStrong" | "card" | "danger" | "dangerSoft" | "divider" | "fill" | "fillHover" | "fillOverPhoto" | "foreground" | "muted" | "onDanger" | "onPhoto" | "panelOverPhoto" | "private" | "skeleton" | "success" | "textFaint" | "textSoft" | "warning" | "colorPalette" | "colorPalette.50" | "colorPalette.100" | "colorPalette.200" | "colorPalette.300" | "colorPalette.400" | "colorPalette.500" | "colorPalette.600" | "colorPalette.700" | "colorPalette.800" | "colorPalette.900" | "colorPalette.950"
|
|
21
21
|
|
|
22
22
|
export type BlurToken = "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl"
|
|
23
23
|
|
|
@@ -169,7 +169,7 @@ export interface UtilityValues {
|
|
|
169
169
|
transitionProperty: "common" | "colors" | "size" | "position" | "background";
|
|
170
170
|
transition: "all" | "common" | "size" | "position" | "background" | "colors" | "opacity" | "shadow" | "transform";
|
|
171
171
|
animation: Tokens["animations"];
|
|
172
|
-
animationName: "bounce" | "iconArcRipple" | "iconArcSearch" | "iconArmReach" | "iconArmSwing" | "iconArrowWind" | "iconBellClapper" | "iconBellNudge" | "iconBellSwing" | "iconBoltStrike" | "iconBubbleTip" | "iconCapsuleBob" | "iconCheckDraw" | "iconCoreIn" | "iconCoreOut" | "iconDotBlink" | "iconDownloadDrop" | "iconGearTurn" | "iconKeyholePulse" | "iconKeyPress" | "iconLineWrite" | "iconMoonIn" | "iconMoonOut" | "iconMoonRock" | "iconPartSpread" | "iconPupilGlance" | "iconRayIn" | "iconRayOut" | "iconRayPulse" | "iconShackleLift" | "iconShackleShut" | "iconTrayGive" | "iconWavePull" | "iconWavePush" | "levelToastEnter" | "levelToastHold" | "levelToastHoldAgain" | "noticeShown" | "ping" | "pulse" | "spin" | "themeSwipeFromBottom" | "themeSwipeFromTop" | "toastCountdown";
|
|
172
|
+
animationName: "bounce" | "iconArcRipple" | "iconArcSearch" | "iconArmReach" | "iconArmSwing" | "iconArrowWind" | "iconBellClapper" | "iconBellNudge" | "iconBellSwing" | "iconBoltStrike" | "iconBubbleTip" | "iconCapsuleBob" | "iconCheckDraw" | "iconCoreIn" | "iconCoreOut" | "iconDotBlink" | "iconDownloadDrop" | "iconGearTurn" | "iconKeyholePulse" | "iconKeyPress" | "iconLineWrite" | "iconMoonIn" | "iconMoonOut" | "iconMoonRock" | "iconPartSpread" | "iconPupilGlance" | "iconRayIn" | "iconRayOut" | "iconRayPulse" | "iconShackleLift" | "iconShackleShut" | "iconSparkleTwinkle" | "iconSparkleWink" | "iconTrayGive" | "iconWavePull" | "iconWavePush" | "levelToastEnter" | "levelToastHold" | "levelToastHoldAgain" | "noticeShown" | "ping" | "pulse" | "spin" | "themeSwipeFromBottom" | "themeSwipeFromTop" | "toastCountdown";
|
|
173
173
|
animationTimingFunction: Tokens["easings"];
|
|
174
174
|
animationDuration: Tokens["durations"];
|
|
175
175
|
animationDelay: Tokens["durations"];
|
|
@@ -222,7 +222,7 @@ export interface UtilityValues {
|
|
|
222
222
|
srOnly: boolean;
|
|
223
223
|
debug: boolean;
|
|
224
224
|
containerName: CssProperties["containerName"];
|
|
225
|
-
colorPalette: "current" | "black" | "white" | "transparent" | "rose" | "pink" | "fuchsia" | "purple" | "violet" | "indigo" | "blue" | "sky" | "cyan" | "teal" | "emerald" | "green" | "lime" | "yellow" | "amber" | "orange" | "red" | "neutral" | "stone" | "zinc" | "gray" | "slate" | "accent" | "backdrop" | "background" | "border" | "borderStrong" | "card" | "danger" | "dangerSoft" | "divider" | "fill" | "fillHover" | "fillOverPhoto" | "foreground" | "muted" | "onPhoto" | "panelOverPhoto" | "private" | "skeleton" | "success" | "textFaint" | "textSoft" | "warning";
|
|
225
|
+
colorPalette: "current" | "black" | "white" | "transparent" | "rose" | "pink" | "fuchsia" | "purple" | "violet" | "indigo" | "blue" | "sky" | "cyan" | "teal" | "emerald" | "green" | "lime" | "yellow" | "amber" | "orange" | "red" | "neutral" | "stone" | "zinc" | "gray" | "slate" | "accent" | "backdrop" | "background" | "border" | "borderStrong" | "card" | "danger" | "dangerSoft" | "divider" | "fill" | "fillHover" | "fillOverPhoto" | "foreground" | "muted" | "onDanger" | "onPhoto" | "panelOverPhoto" | "private" | "skeleton" | "success" | "textFaint" | "textSoft" | "warning";
|
|
226
226
|
textStyle: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "panelDetail" | "panelLabel" | "panelOverline" | "panelTitle";
|
|
227
227
|
}
|
|
228
228
|
|