@skillcdn/console 0.1.12 → 0.1.14
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 +6 -4
- package/dist/cli/cli.d.ts.map +1 -1
- package/dist/cli/cli.js +260 -6
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/format.d.ts +7 -1
- package/dist/cli/format.d.ts.map +1 -1
- package/dist/cli/format.js +22 -0
- package/dist/cli/format.js.map +1 -1
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +69 -2
- package/dist/cli/help.js.map +1 -1
- package/dist/components/calendar.d.ts +15 -0
- package/dist/components/calendar.d.ts.map +1 -1
- package/dist/components/calendar.js +57 -30
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/decision-list.d.ts.map +1 -1
- package/dist/components/decision-list.js +1 -1
- package/dist/components/decision-list.js.map +1 -1
- package/dist/components/skills.d.ts.map +1 -1
- package/dist/components/skills.js +1 -1
- package/dist/components/skills.js.map +1 -1
- package/dist/components/work.d.ts +4 -0
- package/dist/components/work.d.ts.map +1 -1
- package/dist/components/work.js +8 -3
- package/dist/components/work.js.map +1 -1
- package/dist/connect-page.d.ts.map +1 -1
- package/dist/connect-page.js +1 -1
- package/dist/connect-page.js.map +1 -1
- package/dist/console.css +35 -1
- package/dist/console.d.ts +3 -2
- package/dist/console.d.ts.map +1 -1
- package/dist/console.js +24 -58
- package/dist/console.js.map +1 -1
- package/dist/dates.d.ts +4 -0
- package/dist/dates.d.ts.map +1 -1
- package/dist/dates.js +26 -0
- package/dist/dates.js.map +1 -1
- package/dist/i18n/en.d.ts +7 -19
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +10 -22
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/ko.d.ts.map +1 -1
- package/dist/i18n/ko.js +10 -22
- package/dist/i18n/ko.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/router.d.ts +4 -0
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +10 -2
- package/dist/router.js.map +1 -1
- package/docs/specs/cli.md +15 -2
- package/docs/specs/rest.md +13 -13
- package/package.json +1 -1
- package/skills/building-a-console/SKILL.md +2 -2
- package/skills/working-the-board/SKILL.md +5 -1
- package/src/cli/cli.ts +333 -5
- package/src/cli/format.ts +27 -0
- package/src/cli/help.ts +86 -1
- package/src/components/calendar.tsx +219 -91
- package/src/components/decision-list.tsx +0 -1
- package/src/components/skills.tsx +0 -1
- package/src/components/work.tsx +66 -46
- package/src/connect-page.tsx +0 -1
- package/src/console.tsx +22 -74
- package/src/dates.ts +28 -0
- package/src/i18n/en.ts +10 -28
- package/src/i18n/ko.ts +10 -28
- package/src/index.ts +5 -0
- package/src/router.ts +15 -5
- package/src/styles/console.css +35 -1
package/src/router.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { isFolderPath, isSignInFailure, SIGN_IN_PARAM, type SignInFailure } from "./api.js";
|
|
2
|
-
import { isMonth } from "./dates.js";
|
|
2
|
+
import { isDay, isMonth } from "./dates.js";
|
|
3
3
|
|
|
4
4
|
// The addresses of the default console (ADR-0010): the router is a function from a URL to a
|
|
5
5
|
// route, and the hrefs below are its inverse. A project's pages live under `/projects/<key>`,
|
|
6
6
|
// the word the REST API uses; an address names what it shows (a task by its number, a decision
|
|
7
7
|
// by its id, a document by its path, a goal by its id), every form has one, and the query says
|
|
8
|
-
// how a page is shown (`?edit`, `?ask`, `?new`, `?version=`, `?q=`, `?month=`, and the
|
|
9
|
-
// filters). The old addresses are taken to the new.
|
|
8
|
+
// how a page is shown (`?edit`, `?ask`, `?new`, `?version=`, `?q=`, `?month=`, `?week=`, and the
|
|
9
|
+
// board's filters). The old addresses are taken to the new.
|
|
10
10
|
|
|
11
11
|
/** How a task's page is shown: as it is, or with one of its forms open. */
|
|
12
12
|
export type TaskFormKind = "edit" | "ask";
|
|
@@ -77,7 +77,8 @@ export type Route =
|
|
|
77
77
|
| { readonly name: "agents" }
|
|
78
78
|
| { readonly name: "new-token" }
|
|
79
79
|
/** What is on the person's plate across their projects. */
|
|
80
|
-
|
|
80
|
+
/** What is on the person's plate: a day of the week shown at the top, or today's when the address names none. */
|
|
81
|
+
| { readonly name: "work"; readonly week: string | undefined }
|
|
81
82
|
/** The categories tasks are sorted into; an administrator keeps them here. */
|
|
82
83
|
| { readonly name: "categories" }
|
|
83
84
|
/** Where a person approves an agent's connection, by the code it showed, or types one. */
|
|
@@ -206,7 +207,11 @@ export function matchRoute(pathname: string, search = ""): Route {
|
|
|
206
207
|
return { name: "new-project" };
|
|
207
208
|
}
|
|
208
209
|
if (path === PATHS.work) {
|
|
209
|
-
|
|
210
|
+
const week = params.get("week");
|
|
211
|
+
if (week !== null && !isDay(week)) {
|
|
212
|
+
return NOT_FOUND;
|
|
213
|
+
}
|
|
214
|
+
return { name: "work", week: week ?? undefined };
|
|
210
215
|
}
|
|
211
216
|
if (path === PATHS.people) {
|
|
212
217
|
return { name: "people" };
|
|
@@ -377,6 +382,11 @@ export function decisionHref(key: string, id: string): string {
|
|
|
377
382
|
return `${PATHS.project}/${key}/decisions/${id}`;
|
|
378
383
|
}
|
|
379
384
|
|
|
385
|
+
/** Where the person's own work is, with the week of a day at the top, or this week's when none is named. */
|
|
386
|
+
export function workHref(week?: string): string {
|
|
387
|
+
return week === undefined ? PATHS.work : `${PATHS.work}?week=${week}`;
|
|
388
|
+
}
|
|
389
|
+
|
|
380
390
|
/** Where a project's calendar is, on a month, or on this one when none is named, narrowed as the filter says. */
|
|
381
391
|
export function calendarHref(key: string, month?: string, filter: BoardFilter = {}): string {
|
|
382
392
|
const base = projectHref(key, "calendar");
|
package/src/styles/console.css
CHANGED
|
@@ -2974,10 +2974,31 @@ table {
|
|
|
2974
2974
|
flex: 1 1 10rem;
|
|
2975
2975
|
}
|
|
2976
2976
|
|
|
2977
|
-
/*
|
|
2977
|
+
/* One week on its own, the only row there is: its days are taller than a month's. */
|
|
2978
|
+
.sc-week .sc-calendar-cell {
|
|
2979
|
+
height: 9rem;
|
|
2980
|
+
}
|
|
2981
|
+
|
|
2982
|
+
/* A project's mark before a task on a day: the cell's own gap keeps it off the title. */
|
|
2983
|
+
.sc-calendar-task .sc-mark,
|
|
2984
|
+
.sc-calendar-bar .sc-mark {
|
|
2985
|
+
flex: none;
|
|
2986
|
+
margin-right: var(--sc-space-1);
|
|
2987
|
+
}
|
|
2988
|
+
|
|
2989
|
+
.sc-calendar-task .sc-mark {
|
|
2990
|
+
margin-right: 0;
|
|
2991
|
+
}
|
|
2992
|
+
|
|
2993
|
+
/* What is on a person's plate: the week across the page, the lists below it at reading width. */
|
|
2978
2994
|
.sc-work {
|
|
2979
2995
|
display: grid;
|
|
2980
2996
|
gap: var(--sc-space-6);
|
|
2997
|
+
}
|
|
2998
|
+
|
|
2999
|
+
.sc-work-lists {
|
|
3000
|
+
display: grid;
|
|
3001
|
+
gap: var(--sc-space-6);
|
|
2981
3002
|
max-width: var(--sc-width-prose);
|
|
2982
3003
|
}
|
|
2983
3004
|
|
|
@@ -3068,6 +3089,19 @@ table {
|
|
|
3068
3089
|
border: 0;
|
|
3069
3090
|
}
|
|
3070
3091
|
|
|
3092
|
+
.sc-week .sc-calendar-cell {
|
|
3093
|
+
height: 4.5rem;
|
|
3094
|
+
}
|
|
3095
|
+
|
|
3096
|
+
/* A bar is a line here, too thin for a mark; a task on its day keeps its mark as its dot. */
|
|
3097
|
+
.sc-calendar-bar .sc-mark {
|
|
3098
|
+
display: none;
|
|
3099
|
+
}
|
|
3100
|
+
|
|
3101
|
+
.sc-calendar-task .sc-mark {
|
|
3102
|
+
margin: 0;
|
|
3103
|
+
}
|
|
3104
|
+
|
|
3071
3105
|
.sc-feed-item {
|
|
3072
3106
|
grid-template-columns: 1fr;
|
|
3073
3107
|
gap: var(--sc-space-1);
|