@skillcdn/console 0.4.0 → 0.4.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/README.md +1 -0
- package/dist/api.d.ts +1 -1
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +1 -1
- package/dist/api.js.map +1 -1
- package/dist/cli/cli.d.ts.map +1 -1
- package/dist/cli/cli.js +36 -11
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +25 -5
- package/dist/cli/help.js.map +1 -1
- package/dist/client.d.ts +12 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +4 -0
- package/dist/client.js.map +1 -1
- package/dist/compat.d.ts +1 -1
- package/dist/compat.js +2 -2
- package/dist/components/markdown.d.ts.map +1 -1
- package/dist/components/markdown.js +6 -3
- package/dist/components/markdown.js.map +1 -1
- package/dist/components/pack-connect.d.ts +3 -1
- package/dist/components/pack-connect.d.ts.map +1 -1
- package/dist/components/pack-connect.js +4 -4
- package/dist/components/pack-connect.js.map +1 -1
- package/dist/components/pack-token.d.ts +3 -1
- package/dist/components/pack-token.d.ts.map +1 -1
- package/dist/components/pack-token.js +1 -1
- package/dist/components/pack-token.js.map +1 -1
- package/dist/components/people.d.ts.map +1 -1
- package/dist/components/people.js +14 -3
- package/dist/components/people.js.map +1 -1
- package/dist/components/remote-pictures.d.ts +6 -0
- package/dist/components/remote-pictures.d.ts.map +1 -0
- package/dist/components/remote-pictures.js +8 -0
- package/dist/components/remote-pictures.js.map +1 -0
- package/dist/components/sign-in.d.ts.map +1 -1
- package/dist/components/sign-in.js +49 -2
- package/dist/components/sign-in.js.map +1 -1
- package/dist/components/ui.d.ts +3 -2
- package/dist/components/ui.d.ts.map +1 -1
- package/dist/components/ui.js +6 -3
- package/dist/components/ui.js.map +1 -1
- package/dist/console.css +57 -5
- package/dist/console.d.ts.map +1 -1
- package/dist/console.js +13 -6
- package/dist/console.js.map +1 -1
- package/dist/data.d.ts +4 -1
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +16 -19
- package/dist/data.js.map +1 -1
- package/dist/i18n/en.d.ts +14 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +14 -1
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/ko.d.ts.map +1 -1
- package/dist/i18n/ko.js +10 -1
- package/dist/i18n/ko.js.map +1 -1
- package/dist/limits.d.ts +14 -0
- package/dist/limits.d.ts.map +1 -1
- package/dist/limits.js +14 -0
- package/dist/limits.js.map +1 -1
- package/dist/routes.d.ts +2 -0
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +2 -0
- package/dist/routes.js.map +1 -1
- package/dist/schemas.d.ts +30 -1
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +15 -4
- package/dist/schemas.js.map +1 -1
- package/dist/web.d.ts.map +1 -1
- package/dist/web.js +3 -2
- package/dist/web.js.map +1 -1
- package/docs/specs/cli.md +5 -5
- package/docs/specs/rest.md +22 -11
- package/package.json +2 -2
- package/skills/building-a-console/SKILL.md +2 -2
- package/skills/working-the-board/references/setting-up.md +1 -1
- package/src/api.ts +8 -0
- package/src/cli/cli.ts +39 -12
- package/src/cli/help.ts +30 -4
- package/src/client.ts +30 -1
- package/src/compat.ts +2 -2
- package/src/components/markdown.tsx +6 -3
- package/src/components/pack-connect.tsx +10 -7
- package/src/components/pack-token.tsx +4 -1
- package/src/components/people.tsx +17 -7
- package/src/components/remote-pictures.ts +19 -0
- package/src/components/sign-in.tsx +114 -13
- package/src/components/ui.tsx +6 -3
- package/src/console.tsx +24 -5
- package/src/data.ts +20 -20
- package/src/i18n/en.ts +15 -1
- package/src/i18n/ko.ts +11 -1
- package/src/limits.ts +14 -0
- package/src/routes.ts +2 -0
- package/src/schemas.ts +17 -4
- package/src/styles/console.css +57 -5
- package/src/web.ts +3 -2
package/src/schemas.ts
CHANGED
|
@@ -167,6 +167,18 @@ export const restProviderSchema = z.object({
|
|
|
167
167
|
key: z.enum(PROVIDER_KEYS),
|
|
168
168
|
/** What people read on the button. */
|
|
169
169
|
label: z.string(),
|
|
170
|
+
/**
|
|
171
|
+
* Who this way in lets in, for the line under the button: the organization at the git host
|
|
172
|
+
* whose members are in, the Workspace domains whose accounts are, or neither, where only the
|
|
173
|
+
* logins an administrator listed get in. Answered from 0.4.1; read as optional, so that a
|
|
174
|
+
* console built on this package reads an older console's answer.
|
|
175
|
+
*/
|
|
176
|
+
admits: z.optional(
|
|
177
|
+
z.object({
|
|
178
|
+
organization: z.nullable(z.string()),
|
|
179
|
+
domains: z.array(z.string()),
|
|
180
|
+
}),
|
|
181
|
+
),
|
|
170
182
|
});
|
|
171
183
|
export type RestProvider = z.infer<typeof restProviderSchema>;
|
|
172
184
|
|
|
@@ -1095,9 +1107,10 @@ export const restPackConnectStartedSchema = z.object({
|
|
|
1095
1107
|
export type RestPackConnectStarted = z.infer<typeof restPackConnectStartedSchema>;
|
|
1096
1108
|
|
|
1097
1109
|
/**
|
|
1098
|
-
* `GET .../pack-token/connect`: how the connection
|
|
1099
|
-
* person, with what they were shown; connected,
|
|
1100
|
-
*
|
|
1110
|
+
* `GET .../pack-token/connect` and `POST .../pack-token/connect/claim`: how the connection
|
|
1111
|
+
* stands. Nothing asked; waiting for the person, with what they were shown; connected, which
|
|
1112
|
+
* only the claim answers (ADR-0046), the token kept and the project as it stands; or ended
|
|
1113
|
+
* short of a token, and why.
|
|
1101
1114
|
*/
|
|
1102
1115
|
const packConnectNone = z.object({ status: z.literal("none") });
|
|
1103
1116
|
const packConnectPending = z.object({
|
|
@@ -1119,7 +1132,7 @@ export const restPackConnectSchema = z.union([
|
|
|
1119
1132
|
]);
|
|
1120
1133
|
export type RestPackConnect = z.infer<typeof restPackConnectSchema>;
|
|
1121
1134
|
|
|
1122
|
-
/** `GET /api/v1/workspace/pack-token/connect`: the same, for the workspace's token, with the workspace as it stands once connected. */
|
|
1135
|
+
/** `GET /api/v1/workspace/pack-token/connect` and `POST .../connect/claim`: the same, for the workspace's token, with the workspace as it stands once connected. */
|
|
1123
1136
|
export const restWorkspacePackConnectSchema = z.union([
|
|
1124
1137
|
packConnectNone,
|
|
1125
1138
|
packConnectPending,
|
package/src/styles/console.css
CHANGED
|
@@ -2168,15 +2168,67 @@ select.sc-input {
|
|
|
2168
2168
|
text-align: left;
|
|
2169
2169
|
}
|
|
2170
2170
|
|
|
2171
|
+
/* The ways in, one under the other, each a button with who gets in through it under it. */
|
|
2171
2172
|
.sc-sign-in-ways {
|
|
2172
|
-
display:
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2173
|
+
display: grid;
|
|
2174
|
+
justify-items: center;
|
|
2175
|
+
gap: var(--sc-space-4);
|
|
2176
|
+
margin-top: var(--sc-space-2);
|
|
2176
2177
|
}
|
|
2177
2178
|
|
|
2179
|
+
.sc-sign-in-way {
|
|
2180
|
+
display: grid;
|
|
2181
|
+
justify-items: center;
|
|
2182
|
+
gap: var(--sc-space-2);
|
|
2183
|
+
width: 100%;
|
|
2184
|
+
}
|
|
2185
|
+
|
|
2186
|
+
/* The button is the page's one call: wide, a step taller than a control, the provider's mark
|
|
2187
|
+
before its words. */
|
|
2178
2188
|
.sc-sign-in-button {
|
|
2179
|
-
|
|
2189
|
+
width: 100%;
|
|
2190
|
+
max-width: 20rem;
|
|
2191
|
+
min-height: 2.75rem;
|
|
2192
|
+
gap: var(--sc-space-3);
|
|
2193
|
+
font-size: var(--sc-text-md);
|
|
2194
|
+
}
|
|
2195
|
+
|
|
2196
|
+
.sc-sign-in-button:focus-visible {
|
|
2197
|
+
outline: var(--sc-focus-ring);
|
|
2198
|
+
outline-offset: 3px;
|
|
2199
|
+
border-radius: var(--sc-radius-md);
|
|
2200
|
+
}
|
|
2201
|
+
|
|
2202
|
+
/* On the way to the provider: the button keeps its color and turns its ring in the text's color. */
|
|
2203
|
+
.sc-sign-in-button-going {
|
|
2204
|
+
cursor: progress;
|
|
2205
|
+
}
|
|
2206
|
+
|
|
2207
|
+
.sc-sign-in-spinner .sc-spinner-ring {
|
|
2208
|
+
width: 1rem;
|
|
2209
|
+
height: 1rem;
|
|
2210
|
+
border-color: color-mix(in srgb, var(--sc-color-accent-contrast) 40%, transparent);
|
|
2211
|
+
border-top-color: var(--sc-color-accent-contrast);
|
|
2212
|
+
}
|
|
2213
|
+
|
|
2214
|
+
.sc-sign-in-mark {
|
|
2215
|
+
flex: none;
|
|
2216
|
+
}
|
|
2217
|
+
|
|
2218
|
+
/* A mark in colors of its own sits on a light tile, whatever the button's color. */
|
|
2219
|
+
.sc-sign-in-mark-tile {
|
|
2220
|
+
display: grid;
|
|
2221
|
+
place-items: center;
|
|
2222
|
+
width: 1.5rem;
|
|
2223
|
+
height: 1.5rem;
|
|
2224
|
+
border-radius: var(--sc-radius-full);
|
|
2225
|
+
background: var(--sc-color-accent-contrast);
|
|
2226
|
+
}
|
|
2227
|
+
|
|
2228
|
+
.sc-sign-in-admits {
|
|
2229
|
+
margin: 0;
|
|
2230
|
+
color: var(--sc-color-text-muted);
|
|
2231
|
+
font-size: var(--sc-text-xs);
|
|
2180
2232
|
}
|
|
2181
2233
|
|
|
2182
2234
|
/* Prose: what people and agents write, rendered from Markdown. Element selectors on purpose. */
|
package/src/web.ts
CHANGED
|
@@ -32,14 +32,15 @@ const CONTENT_TYPES: Readonly<Record<string, string>> = {
|
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* Pages show what people and agents wrote, which is untrusted. Nothing inline runs, nothing
|
|
35
|
-
* loads from elsewhere
|
|
35
|
+
* loads from elsewhere, a picture from elsewhere coming through the console (ADR-0048), and
|
|
36
|
+
* nobody frames the page.
|
|
36
37
|
*/
|
|
37
38
|
const PAGE_HEADERS: Readonly<Record<string, string>> = {
|
|
38
39
|
"content-security-policy": [
|
|
39
40
|
"default-src 'self'",
|
|
40
41
|
"script-src 'self'",
|
|
41
42
|
"style-src 'self'",
|
|
42
|
-
"img-src 'self' data:
|
|
43
|
+
"img-src 'self' data:",
|
|
43
44
|
"font-src 'self'",
|
|
44
45
|
"connect-src 'self'",
|
|
45
46
|
"object-src 'none'",
|