@jaetask/toolkit 0.3.1 → 0.3.6
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 +37 -1
- package/README.md +12 -10
- package/dist/guard.d.ts +1 -1
- package/dist/guard.d.ts.map +1 -1
- package/dist/guard.js +17 -6
- package/dist/guard.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/styles.css +0 -11
- package/dist/suite/chat.d.ts +65 -0
- package/dist/suite/chat.d.ts.map +1 -0
- package/dist/suite/chat.js +103 -0
- package/dist/suite/chat.js.map +1 -0
- package/dist/suite/controls.d.ts +0 -1
- package/dist/suite/controls.d.ts.map +1 -1
- package/dist/suite/controls.js +0 -2
- package/dist/suite/controls.js.map +1 -1
- package/dist/suite/due-picker.d.ts +0 -9
- package/dist/suite/due-picker.d.ts.map +1 -1
- package/dist/suite/due-picker.js +0 -8
- package/dist/suite/due-picker.js.map +1 -1
- package/dist/suite/due.d.ts +0 -2
- package/dist/suite/due.d.ts.map +1 -1
- package/dist/suite/due.js +0 -9
- package/dist/suite/due.js.map +1 -1
- package/dist/suite/emoji.d.ts +0 -7
- package/dist/suite/emoji.d.ts.map +1 -1
- package/dist/suite/emoji.js +0 -7
- package/dist/suite/emoji.js.map +1 -1
- package/dist/suite/entity-nav.d.ts +37 -0
- package/dist/suite/entity-nav.d.ts.map +1 -0
- package/dist/suite/entity-nav.js +125 -0
- package/dist/suite/entity-nav.js.map +1 -0
- package/dist/suite/files.d.ts +0 -8
- package/dist/suite/files.d.ts.map +1 -1
- package/dist/suite/files.js +0 -8
- package/dist/suite/files.js.map +1 -1
- package/dist/suite/filters.d.ts +18 -0
- package/dist/suite/filters.d.ts.map +1 -0
- package/dist/suite/filters.js +23 -0
- package/dist/suite/filters.js.map +1 -0
- package/dist/suite/forms.d.ts +0 -3
- package/dist/suite/forms.d.ts.map +1 -1
- package/dist/suite/forms.js +7 -7
- package/dist/suite/forms.js.map +1 -1
- package/dist/suite/index.d.ts +5 -1
- package/dist/suite/index.d.ts.map +1 -1
- package/dist/suite/index.js +5 -3
- package/dist/suite/index.js.map +1 -1
- package/dist/suite/link.d.ts +0 -6
- package/dist/suite/link.d.ts.map +1 -1
- package/dist/suite/link.js +0 -9
- package/dist/suite/link.js.map +1 -1
- package/dist/suite/links.d.ts +0 -9
- package/dist/suite/links.d.ts.map +1 -1
- package/dist/suite/links.js +0 -9
- package/dist/suite/links.js.map +1 -1
- package/dist/suite/markdown.d.ts +0 -1
- package/dist/suite/markdown.d.ts.map +1 -1
- package/dist/suite/markdown.js +1 -8
- package/dist/suite/markdown.js.map +1 -1
- package/dist/suite/page.d.ts +0 -23
- package/dist/suite/page.d.ts.map +1 -1
- package/dist/suite/page.js +0 -23
- package/dist/suite/page.js.map +1 -1
- package/dist/suite/parts.d.ts +0 -14
- package/dist/suite/parts.d.ts.map +1 -1
- package/dist/suite/parts.js +0 -16
- package/dist/suite/parts.js.map +1 -1
- package/dist/suite/pickers.d.ts +0 -10
- package/dist/suite/pickers.d.ts.map +1 -1
- package/dist/suite/pickers.js +1 -13
- package/dist/suite/pickers.js.map +1 -1
- package/dist/suite/project-appearance.d.ts.map +1 -1
- package/dist/suite/project-appearance.js +0 -1
- package/dist/suite/project-appearance.js.map +1 -1
- package/dist/suite/project-icon.d.ts +4 -5
- package/dist/suite/project-icon.d.ts.map +1 -1
- package/dist/suite/project-icon.js +2 -9
- package/dist/suite/project-icon.js.map +1 -1
- package/dist/suite/shell.d.ts +4 -27
- package/dist/suite/shell.d.ts.map +1 -1
- package/dist/suite/shell.js +63 -11
- package/dist/suite/shell.js.map +1 -1
- package/dist/suite/suite.css +375 -40
- package/dist/suite/views.d.ts +0 -7
- package/dist/suite/views.d.ts.map +1 -1
- package/dist/suite/views.js +1 -8
- package/dist/suite/views.js.map +1 -1
- package/dist/suite/work.d.ts +100 -0
- package/dist/suite/work.d.ts.map +1 -0
- package/dist/suite/work.js +160 -0
- package/dist/suite/work.js.map +1 -0
- package/dist/theme/suite-theme.css +0 -8
- package/package.json +2 -2
- package/skills/ux-flow/SKILL.md +12 -6
- package/dist/fonts/OFL.txt +0 -93
- package/dist/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-wght-normal.woff2 +0 -0
- package/dist/forms.d.ts +0 -70
- package/dist/forms.js +0 -56
- package/dist/forms.js.map +0 -1
- package/dist/link.d.ts +0 -22
- package/dist/link.js +0 -45
- package/dist/link.js.map +0 -1
- package/dist/page.d.ts +0 -122
- package/dist/page.js +0 -108
- package/dist/page.js.map +0 -1
- package/dist/parts.d.ts +0 -83
- package/dist/parts.js +0 -78
- package/dist/parts.js.map +0 -1
- package/dist/shell.d.ts +0 -85
- package/dist/shell.js +0 -143
- package/dist/shell.js.map +0 -1
- package/dist/ui.d.ts +0 -26
- package/dist/ui.js +0 -37
- package/dist/ui.js.map +0 -1
package/dist/link.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// Links and the way back. Every link the toolkit draws goes through one Link component, so an app
|
|
3
|
-
// with a router (React Router, TanStack) passes its own, and an app without one gets a plain <a>.
|
|
4
|
-
// Edit links carry ?from= so the edit page's Back, Cancel and Save return to the same spot.
|
|
5
|
-
import { createContext, useContext } from "react";
|
|
6
|
-
const PlainLink = ({ href, children, ...rest }) => (_jsx("a", { href: href, ...rest, children: children }));
|
|
7
|
-
const browserLocation = () => typeof window === "undefined" ? "" : window.location.pathname + window.location.search;
|
|
8
|
-
const RoutingContext = createContext({ link: PlainLink, location: browserLocation });
|
|
9
|
-
/** Gives the toolkit the app's router: its link component and its current location. */
|
|
10
|
-
export function ToolkitProvider({ link, location, children, }) {
|
|
11
|
-
const value = {
|
|
12
|
-
link: link ?? PlainLink,
|
|
13
|
-
location: typeof location === "string" ? () => location : (location ?? browserLocation),
|
|
14
|
-
};
|
|
15
|
-
return _jsx(RoutingContext.Provider, { value: value, children: children });
|
|
16
|
-
}
|
|
17
|
-
/** The app's link component. */
|
|
18
|
-
export function Link(props) {
|
|
19
|
-
const { link: L } = useContext(RoutingContext);
|
|
20
|
-
return _jsx(L, { ...props });
|
|
21
|
-
}
|
|
22
|
-
/** `to` with ?from= set to the given location. */
|
|
23
|
-
export function withFrom(to, from) {
|
|
24
|
-
if (!from)
|
|
25
|
-
return to;
|
|
26
|
-
return `${to}${to.includes("?") ? "&" : "?"}from=${encodeURIComponent(from)}`;
|
|
27
|
-
}
|
|
28
|
-
/** `to` with ?from= set to the current location. */
|
|
29
|
-
export function useFromHref(to) {
|
|
30
|
-
const { location } = useContext(RoutingContext);
|
|
31
|
-
return withFrom(to, location());
|
|
32
|
-
}
|
|
33
|
-
/** A ?from= value that is safe to follow: a same-origin path. */
|
|
34
|
-
export function safeFrom(from) {
|
|
35
|
-
if (!from)
|
|
36
|
-
return null;
|
|
37
|
-
return from.startsWith("/") && !from.startsWith("//") && !from.includes("\\") ? from : null;
|
|
38
|
-
}
|
|
39
|
-
/** Where an edit page's Back goes: the ?from= path when it is safe, else the fallback. */
|
|
40
|
-
export function useBackTo(fallback) {
|
|
41
|
-
const { location } = useContext(RoutingContext);
|
|
42
|
-
const query = location().split("?")[1] ?? "";
|
|
43
|
-
return safeFrom(new URLSearchParams(query).get("from")) ?? fallback;
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=link.js.map
|
package/dist/link.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link.js","sourceRoot":"","sources":["../src/link.tsx"],"names":[],"mappings":";AAAA,kGAAkG;AAClG,kGAAkG;AAClG,4FAA4F;AAC5F,OAAO,EAA6B,aAAa,EAAkB,UAAU,EAAE,MAAM,OAAO,CAAC;AAe7F,MAAM,SAAS,GAAkB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,CAChE,YA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oDAAoD;AACpD,MAAM,UAAU,WAAW,CAAC,EAAU;IACpC,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAChD,OAAO,QAAQ,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClC,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,QAAQ,CAAC,IAA+B;IACtD,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IACvB,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AAC9F,CAAC;AAED,0FAA0F;AAC1F,MAAM,UAAU,SAAS,CAAC,QAAgB;IACxC,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAChD,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC7C,OAAO,QAAQ,CAAC,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,QAAQ,CAAC;AACtE,CAAC"}
|
package/dist/page.d.ts
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
import { type Surface } from "./ui.js";
|
|
3
|
-
/** A page: title, one line, the one primary action on the right, then stacked panels. */
|
|
4
|
-
export declare function PageBody({ title, line, action, children, }: {
|
|
5
|
-
title: string;
|
|
6
|
-
line?: ReactNode;
|
|
7
|
-
action?: ReactNode;
|
|
8
|
-
children: ReactNode;
|
|
9
|
-
}): import("react").JSX.Element;
|
|
10
|
-
/** A section: warm grey panel, title, one line on what it holds, at most one action on the right. */
|
|
11
|
-
export declare function Panel({ id, title, line, action, children, }: {
|
|
12
|
-
id: string;
|
|
13
|
-
title: string;
|
|
14
|
-
line?: ReactNode;
|
|
15
|
-
action?: ReactNode;
|
|
16
|
-
children: ReactNode;
|
|
17
|
-
}): import("react").JSX.Element;
|
|
18
|
-
/** A white card inside a panel. */
|
|
19
|
-
export declare function Card({ children, className }: {
|
|
20
|
-
children: ReactNode;
|
|
21
|
-
className?: string;
|
|
22
|
-
}): import("react").JSX.Element;
|
|
23
|
-
/** A small-caps label above a value inside a card. */
|
|
24
|
-
export declare function Kicker({ children }: {
|
|
25
|
-
children: ReactNode;
|
|
26
|
-
}): import("react").JSX.Element;
|
|
27
|
-
/** A grey button that opens another page and remembers this one as ?from=. */
|
|
28
|
-
export declare function PageLink({ to, children, disabled, surface, }: {
|
|
29
|
-
to: string;
|
|
30
|
-
children: ReactNode;
|
|
31
|
-
disabled?: boolean;
|
|
32
|
-
surface?: Surface;
|
|
33
|
-
}): import("react").JSX.Element;
|
|
34
|
-
/** A panel's one Edit button: opens that section's own edit page. */
|
|
35
|
-
export declare function EditLink({ to, label, disabled, }: {
|
|
36
|
-
to: string;
|
|
37
|
-
label?: string;
|
|
38
|
-
disabled?: boolean;
|
|
39
|
-
}): import("react").JSX.Element;
|
|
40
|
-
/** The page's one dark button. */
|
|
41
|
-
export declare function PrimaryLink({ to, children }: {
|
|
42
|
-
to: string;
|
|
43
|
-
children: ReactNode;
|
|
44
|
-
}): import("react").JSX.Element;
|
|
45
|
-
/** Back to where you came from: the same pill on every page that has one. */
|
|
46
|
-
export declare function BackLink({ to }: {
|
|
47
|
-
to: string;
|
|
48
|
-
}): import("react").JSX.Element;
|
|
49
|
-
/** A list: one white card of divided rows. */
|
|
50
|
-
export declare function ListCard({ children, as, }: {
|
|
51
|
-
children: ReactNode;
|
|
52
|
-
as?: "ul" | "ol" | "div";
|
|
53
|
-
}): import("react").JSX.Element;
|
|
54
|
-
/** The drag type the toolkit uses for rows; Column reads it on drop. */
|
|
55
|
-
export declare const ROW_DRAG_TYPE = "application/x-tk-row";
|
|
56
|
-
/**
|
|
57
|
-
* One list row. With `to`, the row opens its own page. With `dragId`, the row can be dragged onto
|
|
58
|
-
* a Column. `blocked` marks it as waiting on something, with a word you can change.
|
|
59
|
-
*/
|
|
60
|
-
export declare function ListRow({ to, children, aside, as, dragId, blocked, blockedLabel, }: {
|
|
61
|
-
to?: string;
|
|
62
|
-
children: ReactNode;
|
|
63
|
-
aside?: ReactNode;
|
|
64
|
-
as?: "li" | "div" | "article";
|
|
65
|
-
dragId?: string;
|
|
66
|
-
blocked?: boolean;
|
|
67
|
-
blockedLabel?: string;
|
|
68
|
-
}): import("react").JSX.Element;
|
|
69
|
-
/** An empty section: a dashed card, one sentence on how to fill it, one button. */
|
|
70
|
-
export declare function EmptyCard({ text, action }: {
|
|
71
|
-
text: string;
|
|
72
|
-
action?: ReactNode;
|
|
73
|
-
}): import("react").JSX.Element;
|
|
74
|
-
export type Progress = "not-started" | "in-progress" | "done";
|
|
75
|
-
/** A bare status dot, for sidebars and tight rows. */
|
|
76
|
-
export declare function Dot({ status }: {
|
|
77
|
-
status: Progress;
|
|
78
|
-
}): import("react").JSX.Element;
|
|
79
|
-
/** Status as a dot and a word: grey not started, orange in progress, green done. Never red. */
|
|
80
|
-
export declare function StatusDot({ status, label }: {
|
|
81
|
-
status: Progress;
|
|
82
|
-
label?: string;
|
|
83
|
-
}): import("react").JSX.Element;
|
|
84
|
-
/** The six named colours for labels, project colours and avatars. */
|
|
85
|
-
export declare const COLOURS: readonly ["blue", "teal", "green", "amber", "purple", "pink"];
|
|
86
|
-
export type Colour = (typeof COLOURS)[number];
|
|
87
|
-
/** A pill value: a label, a kind or a state, in any word. `colour` picks one of the six. */
|
|
88
|
-
export declare function Chip({ children, colour }: {
|
|
89
|
-
children: ReactNode;
|
|
90
|
-
colour?: Colour;
|
|
91
|
-
}): import("react").JSX.Element;
|
|
92
|
-
/** Pills to pick one value from, on an edit page. */
|
|
93
|
-
export declare function ChipPicker<T extends string>({ value, options, onChange, label, }: {
|
|
94
|
-
value: T;
|
|
95
|
-
options: {
|
|
96
|
-
id: T;
|
|
97
|
-
name: string;
|
|
98
|
-
}[];
|
|
99
|
-
onChange: (value: T) => void;
|
|
100
|
-
label: string;
|
|
101
|
-
}): import("react").JSX.Element;
|
|
102
|
-
/**
|
|
103
|
-
* One edit page: title and Back, a white card of labelled Rows, then Cancel and Save. Without
|
|
104
|
-
* onSave (changes save as you go) the bar shows Done.
|
|
105
|
-
*/
|
|
106
|
-
export declare function EditFrame({ title, line, backTo, children, onSave, busy, saveLabel, extra, }: {
|
|
107
|
-
title: string;
|
|
108
|
-
line?: ReactNode;
|
|
109
|
-
backTo: string;
|
|
110
|
-
children: ReactNode;
|
|
111
|
-
onSave?: () => void;
|
|
112
|
-
busy?: boolean;
|
|
113
|
-
saveLabel?: string;
|
|
114
|
-
extra?: ReactNode;
|
|
115
|
-
}): import("react").JSX.Element;
|
|
116
|
-
/** A labelled row on an edit page: label and one line on the left, the inputs on the right. */
|
|
117
|
-
export declare function Row({ title, line, htmlFor, children, }: {
|
|
118
|
-
title: string;
|
|
119
|
-
line?: string;
|
|
120
|
-
htmlFor?: string;
|
|
121
|
-
children: ReactNode;
|
|
122
|
-
}): import("react").JSX.Element;
|
package/dist/page.js
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Link, useFromHref } from "./link.js";
|
|
3
|
-
import { Button, cx } from "./ui.js";
|
|
4
|
-
/** A page: title, one line, the one primary action on the right, then stacked panels. */
|
|
5
|
-
export function PageBody({ title, line, action, children, }) {
|
|
6
|
-
return (_jsxs("div", { className: "tk-page", children: [_jsxs("div", { className: "tk-page-head", children: [_jsxs("div", { children: [_jsx("h1", { className: "tk-page-title", children: title }), line && _jsx("p", { className: "tk-page-line", children: line })] }), action] }), children] }));
|
|
7
|
-
}
|
|
8
|
-
/** A section: warm grey panel, title, one line on what it holds, at most one action on the right. */
|
|
9
|
-
export function Panel({ id, title, line, action, children, }) {
|
|
10
|
-
return (_jsxs("section", { id: id, "aria-labelledby": `${id}-title`, className: "tk-panel", children: [_jsxs("div", { className: "tk-panel-head", children: [_jsxs("div", { children: [_jsx("h2", { id: `${id}-title`, className: "tk-panel-title", children: title }), line && _jsx("p", { className: "tk-panel-line", children: line })] }), action] }), children] }));
|
|
11
|
-
}
|
|
12
|
-
/** A white card inside a panel. */
|
|
13
|
-
export function Card({ children, className }) {
|
|
14
|
-
return _jsx("div", { className: cx("tk-card", className), children: children });
|
|
15
|
-
}
|
|
16
|
-
/** A small-caps label above a value inside a card. */
|
|
17
|
-
export function Kicker({ children }) {
|
|
18
|
-
return _jsx("span", { className: "tk-kicker", children: children });
|
|
19
|
-
}
|
|
20
|
-
function ButtonLink({ href, variant = "grey", surface = "panel", disabled, children, }) {
|
|
21
|
-
if (disabled)
|
|
22
|
-
return (_jsx(Button, { variant: variant, surface: surface, disabled: true, children: children }));
|
|
23
|
-
return (_jsx(Link, { href: href, className: "tk-button", "data-variant": variant, "data-surface": surface, children: children }));
|
|
24
|
-
}
|
|
25
|
-
/** A grey button that opens another page and remembers this one as ?from=. */
|
|
26
|
-
export function PageLink({ to, children, disabled, surface, }) {
|
|
27
|
-
const href = useFromHref(to);
|
|
28
|
-
return (_jsx(ButtonLink, { href: href, surface: surface ?? "panel", disabled: disabled ?? false, children: children }));
|
|
29
|
-
}
|
|
30
|
-
/** A panel's one Edit button: opens that section's own edit page. */
|
|
31
|
-
export function EditLink({ to, label = "Edit", disabled, }) {
|
|
32
|
-
return (_jsx(PageLink, { to: to, disabled: disabled ?? false, children: label }));
|
|
33
|
-
}
|
|
34
|
-
/** The page's one dark button. */
|
|
35
|
-
export function PrimaryLink({ to, children }) {
|
|
36
|
-
const href = useFromHref(to);
|
|
37
|
-
return (_jsx(ButtonLink, { href: href, variant: "primary", children: children }));
|
|
38
|
-
}
|
|
39
|
-
/** Back to where you came from: the same pill on every page that has one. */
|
|
40
|
-
export function BackLink({ to }) {
|
|
41
|
-
return (_jsx(ButtonLink, { href: to, surface: "white", children: "Back" }));
|
|
42
|
-
}
|
|
43
|
-
/** A list: one white card of divided rows. */
|
|
44
|
-
export function ListCard({ children, as = "ul", }) {
|
|
45
|
-
const Tag = as;
|
|
46
|
-
return _jsx(Tag, { className: "tk-list", children: children });
|
|
47
|
-
}
|
|
48
|
-
/** The drag type the toolkit uses for rows; Column reads it on drop. */
|
|
49
|
-
export const ROW_DRAG_TYPE = "application/x-tk-row";
|
|
50
|
-
/**
|
|
51
|
-
* One list row. With `to`, the row opens its own page. With `dragId`, the row can be dragged onto
|
|
52
|
-
* a Column. `blocked` marks it as waiting on something, with a word you can change.
|
|
53
|
-
*/
|
|
54
|
-
export function ListRow({ to, children, aside, as = "li", dragId, blocked, blockedLabel = "Blocked", }) {
|
|
55
|
-
const href = useFromHref(to ?? "");
|
|
56
|
-
const Tag = as;
|
|
57
|
-
const drag = dragId
|
|
58
|
-
? {
|
|
59
|
-
draggable: true,
|
|
60
|
-
onDragStart: (e) => {
|
|
61
|
-
e.dataTransfer.setData(ROW_DRAG_TYPE, dragId);
|
|
62
|
-
e.dataTransfer.effectAllowed = "move";
|
|
63
|
-
},
|
|
64
|
-
}
|
|
65
|
-
: {};
|
|
66
|
-
return (_jsxs(Tag, { className: "tk-list-row", "data-blocked": blocked ? "true" : undefined, ...drag, children: [to ? (_jsx(Link, { href: href, className: "tk-list-body", draggable: dragId ? false : undefined, children: children })) : (_jsx("div", { className: "tk-list-body", children: children })), (aside || blocked) && (_jsxs("span", { className: "tk-list-aside", children: [blocked && _jsx(Chip, { colour: "amber", children: blockedLabel }), aside] }))] }));
|
|
67
|
-
}
|
|
68
|
-
/** An empty section: a dashed card, one sentence on how to fill it, one button. */
|
|
69
|
-
export function EmptyCard({ text, action }) {
|
|
70
|
-
return (_jsxs("div", { className: "tk-empty", children: [_jsx("p", { children: text }), action] }));
|
|
71
|
-
}
|
|
72
|
-
const WORD = {
|
|
73
|
-
"not-started": "Not started",
|
|
74
|
-
"in-progress": "In progress",
|
|
75
|
-
done: "Done",
|
|
76
|
-
};
|
|
77
|
-
/** A bare status dot, for sidebars and tight rows. */
|
|
78
|
-
export function Dot({ status }) {
|
|
79
|
-
return _jsx("span", { "aria-hidden": true, className: "tk-dot", "data-status": status });
|
|
80
|
-
}
|
|
81
|
-
/** Status as a dot and a word: grey not started, orange in progress, green done. Never red. */
|
|
82
|
-
export function StatusDot({ status, label }) {
|
|
83
|
-
return (_jsxs("span", { className: "tk-status", children: [_jsx(Dot, { status: status }), label ?? WORD[status]] }));
|
|
84
|
-
}
|
|
85
|
-
/** The six named colours for labels, project colours and avatars. */
|
|
86
|
-
export const COLOURS = ["blue", "teal", "green", "amber", "purple", "pink"];
|
|
87
|
-
/** A pill value: a label, a kind or a state, in any word. `colour` picks one of the six. */
|
|
88
|
-
export function Chip({ children, colour }) {
|
|
89
|
-
return (_jsx("span", { className: "tk-chip", "data-colour": colour, children: children }));
|
|
90
|
-
}
|
|
91
|
-
/** Pills to pick one value from, on an edit page. */
|
|
92
|
-
export function ChipPicker({ value, options, onChange, label, }) {
|
|
93
|
-
return (_jsx("div", { role: "radiogroup", "aria-label": label, className: "tk-chips", children: options.map((o) => (
|
|
94
|
-
// biome-ignore lint/a11y/useSemanticElements: pills styled as buttons, with radio semantics
|
|
95
|
-
_jsx("button", { type: "button", role: "radio", "aria-checked": value === o.id, className: "tk-pick", onClick: () => onChange(o.id), children: o.name }, o.id))) }));
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* One edit page: title and Back, a white card of labelled Rows, then Cancel and Save. Without
|
|
99
|
-
* onSave (changes save as you go) the bar shows Done.
|
|
100
|
-
*/
|
|
101
|
-
export function EditFrame({ title, line, backTo, children, onSave, busy, saveLabel = "Save", extra, }) {
|
|
102
|
-
return (_jsxs("div", { className: "tk-edit", children: [_jsxs("div", { className: "tk-page-head", children: [_jsxs("div", { children: [_jsx("h1", { className: "tk-page-title", children: title }), line && _jsx("p", { className: "tk-page-line", children: line })] }), _jsx(BackLink, { to: backTo })] }), _jsx("div", { className: "tk-edit-card", children: children }), _jsxs("div", { className: "tk-edit-bar", children: [extra && _jsx("span", { className: "tk-edit-extra", children: extra }), onSave ? (_jsxs(_Fragment, { children: [_jsx(ButtonLink, { href: backTo, surface: "white", children: "Cancel" }), _jsx(Button, { variant: "primary", disabled: busy ?? false, onClick: onSave, children: busy ? "Saving…" : saveLabel })] })) : (_jsx(ButtonLink, { href: backTo, variant: "primary", children: "Done" }))] })] }));
|
|
103
|
-
}
|
|
104
|
-
/** A labelled row on an edit page: label and one line on the left, the inputs on the right. */
|
|
105
|
-
export function Row({ title, line, htmlFor, children, }) {
|
|
106
|
-
return (_jsxs("div", { className: "tk-row", children: [_jsxs("div", { className: "tk-row-label", children: [htmlFor ? (_jsx("label", { htmlFor: htmlFor, className: "tk-row-title", children: title })) : (_jsx("span", { className: "tk-row-title", children: title })), line && _jsx("span", { className: "tk-row-line", children: line })] }), _jsx("div", { className: "tk-row-fields", children: children })] }));
|
|
107
|
-
}
|
|
108
|
-
//# sourceMappingURL=page.js.map
|
package/dist/page.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"page.js","sourceRoot":"","sources":["../src/page.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,EAAE,EAAgB,MAAM,SAAS,CAAC;AAEnD,yFAAyF;AACzF,MAAM,UAAU,QAAQ,CAAC,EACvB,KAAK,EACL,IAAI,EACJ,MAAM,EACN,QAAQ,GAMT;IACC,OAAO,CACL,eAAK,SAAS,EAAC,SAAS,aACtB,eAAK,SAAS,EAAC,cAAc,aAC3B,0BACE,aAAI,SAAS,EAAC,eAAe,YAAE,KAAK,GAAM,EACzC,IAAI,IAAI,YAAG,SAAS,EAAC,cAAc,YAAE,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I,EACJ,OAAO,EACP,QAAQ,GAMT;IACC,OAAO,CACL,eAAK,SAAS,EAAC,QAAQ,aACrB,eAAK,SAAS,EAAC,cAAc,aAC1B,OAAO,CAAC,CAAC,CAAC,CACT,gBAAO,OAAO,EAAE,OAAO,EAAE,SAAS,EAAC,cAAc,YAC9C,KAAK,GACA,CACT,CAAC,CAAC,CAAC,CACF,eAAM,SAAS,EAAC,cAAc,YAAE,KAAK,GAAQ,CAC9C,EACA,IAAI,IAAI,eAAM,SAAS,EAAC,aAAa,YAAE,IAAI,GAAQ,IAChD,EACN,cAAK,SAAS,EAAC,eAAe,YAAE,QAAQ,GAAO,IAC3C,CACP,CAAC;AACJ,CAAC"}
|
package/dist/parts.d.ts
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
2
|
-
import { type Colour } from "./page.js";
|
|
3
|
-
/** Columns side by side, scrolling sideways when they do not fit. */
|
|
4
|
-
export declare function Board({ children, label }: {
|
|
5
|
-
children: ReactNode;
|
|
6
|
-
label?: string;
|
|
7
|
-
}): import("react").JSX.Element;
|
|
8
|
-
/**
|
|
9
|
-
* One column: a title, an optional kind chip and count, then its rows. With `onDrop`, a ListRow
|
|
10
|
-
* that has a `dragId` can be dropped here, and onDrop gets that id.
|
|
11
|
-
*/
|
|
12
|
-
export declare function Column({ id, title, kind, count, action, empty, onDrop, children, }: {
|
|
13
|
-
id: string;
|
|
14
|
-
title: string;
|
|
15
|
-
kind?: ReactNode;
|
|
16
|
-
count?: number;
|
|
17
|
-
action?: ReactNode;
|
|
18
|
-
empty?: ReactNode;
|
|
19
|
-
onDrop?: (rowId: string) => void;
|
|
20
|
-
children?: ReactNode;
|
|
21
|
-
}): import("react").JSX.Element;
|
|
22
|
-
/** A run of comments and activity lines, oldest first. */
|
|
23
|
-
export declare function Thread({ children, label }: {
|
|
24
|
-
children: ReactNode;
|
|
25
|
-
label?: string;
|
|
26
|
-
}): import("react").JSX.Element;
|
|
27
|
-
/**
|
|
28
|
-
* One comment: author, time, text, then reactions and actions. `replies` holds one level of
|
|
29
|
-
* reply Comments; a reply's own replies are not shown.
|
|
30
|
-
*/
|
|
31
|
-
export declare function Comment({ author, avatar, time, reactions, actions, replies, children, }: {
|
|
32
|
-
author: string;
|
|
33
|
-
avatar?: ReactNode;
|
|
34
|
-
time?: string;
|
|
35
|
-
reactions?: ReactNode;
|
|
36
|
-
actions?: ReactNode;
|
|
37
|
-
replies?: ReactNode;
|
|
38
|
-
children: ReactNode;
|
|
39
|
-
}): import("react").JSX.Element;
|
|
40
|
-
/** Emoji reactions under a comment; the person's own are pressed. */
|
|
41
|
-
export declare function Reactions({ items, onToggle, }: {
|
|
42
|
-
items: {
|
|
43
|
-
emoji: string;
|
|
44
|
-
count: number;
|
|
45
|
-
mine?: boolean;
|
|
46
|
-
}[];
|
|
47
|
-
onToggle?: (emoji: string) => void;
|
|
48
|
-
}): import("react").JSX.Element;
|
|
49
|
-
/** One line of activity in a thread (a move, a status change), with at most one action. */
|
|
50
|
-
export declare function ActivityRow({ children, time, action, }: {
|
|
51
|
-
children: ReactNode;
|
|
52
|
-
time?: string;
|
|
53
|
-
action?: ReactNode;
|
|
54
|
-
}): import("react").JSX.Element;
|
|
55
|
-
/** Small-caps labels with their values, in a white card. */
|
|
56
|
-
export declare function Facts({ items }: {
|
|
57
|
-
items: {
|
|
58
|
-
label: string;
|
|
59
|
-
value: ReactNode;
|
|
60
|
-
}[];
|
|
61
|
-
}): import("react").JSX.Element;
|
|
62
|
-
export type NoticeTone = "done" | "refused" | "info";
|
|
63
|
-
/**
|
|
64
|
-
* What the last change did, or why it was refused. Inline by default; `floating` pins it to the
|
|
65
|
-
* bottom of the window. A refusal is amber, never red.
|
|
66
|
-
*/
|
|
67
|
-
export declare function Notice({ tone, floating, onDismiss, children, }: {
|
|
68
|
-
tone?: NoticeTone;
|
|
69
|
-
floating?: boolean;
|
|
70
|
-
onDismiss?: () => void;
|
|
71
|
-
children: ReactNode;
|
|
72
|
-
}): import("react").JSX.Element;
|
|
73
|
-
/** A page outside the shell, such as sign-in: one panel in the middle of the window. */
|
|
74
|
-
export declare function CenteredPage({ title, line, children, }: {
|
|
75
|
-
title: string;
|
|
76
|
-
line?: ReactNode;
|
|
77
|
-
children: ReactNode;
|
|
78
|
-
}): import("react").JSX.Element;
|
|
79
|
-
/** Several controls side by side inside one Row. */
|
|
80
|
-
export declare function Inline({ children }: {
|
|
81
|
-
children: ReactNode;
|
|
82
|
-
}): import("react").JSX.Element;
|
|
83
|
-
export type { Colour };
|
package/dist/parts.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// Parts that go inside a page: the board and its columns, threads of comments, facts, notices,
|
|
3
|
-
// and the centred page that sits outside the shell (sign-in).
|
|
4
|
-
import { createContext, useContext, useState } from "react";
|
|
5
|
-
import { ROW_DRAG_TYPE } from "./page.js";
|
|
6
|
-
/** Columns side by side, scrolling sideways when they do not fit. */
|
|
7
|
-
export function Board({ children, label }) {
|
|
8
|
-
return (_jsx("section", { className: "tk-board", "aria-label": label, children: children }));
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* One column: a title, an optional kind chip and count, then its rows. With `onDrop`, a ListRow
|
|
12
|
-
* that has a `dragId` can be dropped here, and onDrop gets that id.
|
|
13
|
-
*/
|
|
14
|
-
export function Column({ id, title, kind, count, action, empty = "Nothing here.", onDrop, children, }) {
|
|
15
|
-
const [over, setOver] = useState(false);
|
|
16
|
-
const accepts = (e) => !!onDrop && e.dataTransfer.types.includes(ROW_DRAG_TYPE);
|
|
17
|
-
const hasRows = Array.isArray(children) ? children.length > 0 : !!children;
|
|
18
|
-
return (_jsxs("section", { className: "tk-column", "aria-labelledby": `${id}-title`, "data-over": over ? "true" : undefined, onDragOver: (e) => {
|
|
19
|
-
if (!accepts(e))
|
|
20
|
-
return;
|
|
21
|
-
e.preventDefault();
|
|
22
|
-
e.dataTransfer.dropEffect = "move";
|
|
23
|
-
if (!over)
|
|
24
|
-
setOver(true);
|
|
25
|
-
}, onDragLeave: (e) => {
|
|
26
|
-
if (!e.currentTarget.contains(e.relatedTarget))
|
|
27
|
-
setOver(false);
|
|
28
|
-
}, onDrop: (e) => {
|
|
29
|
-
setOver(false);
|
|
30
|
-
if (!accepts(e))
|
|
31
|
-
return;
|
|
32
|
-
e.preventDefault();
|
|
33
|
-
const rowId = e.dataTransfer.getData(ROW_DRAG_TYPE);
|
|
34
|
-
if (rowId)
|
|
35
|
-
onDrop?.(rowId);
|
|
36
|
-
}, children: [_jsxs("div", { className: "tk-column-head", children: [_jsx("h3", { id: `${id}-title`, className: "tk-column-title", children: title }), kind, count !== undefined && _jsx("span", { className: "tk-count", children: count }), action && _jsx("span", { className: "tk-column-action", children: action })] }), hasRows ? (_jsx("ul", { className: "tk-list tk-column-list", children: children })) : (_jsx("p", { className: "tk-column-empty", children: empty }))] }));
|
|
37
|
-
}
|
|
38
|
-
const Depth = createContext(0);
|
|
39
|
-
/** A run of comments and activity lines, oldest first. */
|
|
40
|
-
export function Thread({ children, label }) {
|
|
41
|
-
return (_jsx("ol", { className: "tk-thread", "aria-label": label, children: children }));
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* One comment: author, time, text, then reactions and actions. `replies` holds one level of
|
|
45
|
-
* reply Comments; a reply's own replies are not shown.
|
|
46
|
-
*/
|
|
47
|
-
export function Comment({ author, avatar, time, reactions, actions, replies, children, }) {
|
|
48
|
-
const depth = useContext(Depth);
|
|
49
|
-
return (_jsxs("li", { className: "tk-comment", "data-reply": depth > 0 ? "true" : undefined, children: [avatar, _jsxs("div", { className: "tk-comment-main", children: [_jsxs("div", { className: "tk-comment-head", children: [_jsx("span", { className: "tk-comment-author", children: author }), time && _jsx("span", { className: "tk-comment-time", children: time })] }), _jsx("div", { className: "tk-comment-text", children: children }), (reactions || actions) && (_jsxs("div", { className: "tk-comment-foot", children: [reactions, actions] })), depth === 0 && replies && (_jsx(Depth.Provider, { value: 1, children: _jsx("ol", { className: "tk-replies", children: replies }) }))] })] }));
|
|
50
|
-
}
|
|
51
|
-
/** Emoji reactions under a comment; the person's own are pressed. */
|
|
52
|
-
export function Reactions({ items, onToggle, }) {
|
|
53
|
-
return (_jsx("span", { className: "tk-reactions", children: items.map((r) => (_jsxs("button", { type: "button", className: "tk-reaction", "aria-pressed": !!r.mine, "aria-label": `${r.emoji} ${r.count}`, onClick: () => onToggle?.(r.emoji), children: [_jsx("span", { "aria-hidden": true, children: r.emoji }), " ", r.count] }, r.emoji))) }));
|
|
54
|
-
}
|
|
55
|
-
/** One line of activity in a thread (a move, a status change), with at most one action. */
|
|
56
|
-
export function ActivityRow({ children, time, action, }) {
|
|
57
|
-
return (_jsxs("li", { className: "tk-activity", children: [_jsx("span", { className: "tk-activity-dot", "aria-hidden": true }), _jsx("span", { className: "tk-activity-text", children: children }), time && _jsx("span", { className: "tk-comment-time", children: time }), action && _jsx("span", { className: "tk-activity-action", children: action })] }));
|
|
58
|
-
}
|
|
59
|
-
/** Small-caps labels with their values, in a white card. */
|
|
60
|
-
export function Facts({ items }) {
|
|
61
|
-
return (_jsx("dl", { className: "tk-card tk-facts", children: items.map((f) => (_jsxs("div", { className: "tk-fact", children: [_jsx("dt", { className: "tk-kicker", children: f.label }), _jsx("dd", { children: f.value })] }, f.label))) }));
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* What the last change did, or why it was refused. Inline by default; `floating` pins it to the
|
|
65
|
-
* bottom of the window. A refusal is amber, never red.
|
|
66
|
-
*/
|
|
67
|
-
export function Notice({ tone = "info", floating, onDismiss, children, }) {
|
|
68
|
-
return (_jsxs("div", { className: "tk-notice", "data-tone": tone, "data-floating": floating ? "true" : undefined, role: tone === "refused" ? "alert" : "status", children: [_jsx("span", { className: "tk-notice-text", children: children }), onDismiss && (_jsx("button", { type: "button", className: "tk-icon-button", "aria-label": "Dismiss", onClick: onDismiss, children: _jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": true, children: _jsx("path", { d: "M6 6l12 12M18 6 6 18", strokeLinecap: "round" }) }) }))] }));
|
|
69
|
-
}
|
|
70
|
-
/** A page outside the shell, such as sign-in: one panel in the middle of the window. */
|
|
71
|
-
export function CenteredPage({ title, line, children, }) {
|
|
72
|
-
return (_jsx("main", { className: "tk-root tk-centered", children: _jsxs("section", { className: "tk-panel tk-centered-panel", "aria-labelledby": "tk-centered-title", children: [_jsxs("div", { children: [_jsx("h1", { id: "tk-centered-title", className: "tk-panel-title", children: title }), line && _jsx("p", { className: "tk-panel-line", children: line })] }), children] }) }));
|
|
73
|
-
}
|
|
74
|
-
/** Several controls side by side inside one Row. */
|
|
75
|
-
export function Inline({ children }) {
|
|
76
|
-
return _jsx("div", { className: "tk-inline", children: children });
|
|
77
|
-
}
|
|
78
|
-
//# sourceMappingURL=parts.js.map
|
package/dist/parts.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parts.js","sourceRoot":"","sources":["../src/parts.tsx"],"names":[],"mappings":";AAAA,+FAA+F;AAC/F,8DAA8D;AAC9D,OAAO,EAAE,aAAa,EAAkC,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5F,OAAO,EAAe,aAAa,EAAE,MAAM,WAAW,CAAC;AAEvD,qEAAqE;AACrE,MAAM,UAAU,KAAK,CAAC,EAAE,QAAQ,EAAE,KAAK,EAA2C;IAChF,OAAO,CACL,kBAAS,SAAS,EAAC,UAAU,gBAAa,KAAK,YAC5C,QAAQ,GACD,CACX,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,EACrB,EAAE,EACF,KAAK,EACL,IAAI,EACJ,KAAK,EACL,MAAM,EACN,KAAK,GAAG,eAAe,EACvB,MAAM,EACN,QAAQ,GAUT;IACC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,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AC,SAAS,EAAC,gBAAgB,YAClD,KAAK,GACH,EACJ,IAAI,IAAI,YAAG,SAAS,EAAC,eAAe,YAAE,IAAI,GAAK,IAC5C,EACL,QAAQ,IACD,GACL,CACR,CAAC;AACJ,CAAC;AAED,oDAAoD;AACpD,MAAM,UAAU,MAAM,CAAC,EAAE,QAAQ,EAA2B;IAC1D,OAAO,cAAK,SAAS,EAAC,WAAW,YAAE,QAAQ,GAAO,CAAC;AACrD,CAAC"}
|
package/dist/shell.d.ts
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
2
|
-
import { type Colour, type Progress } from "./page.js";
|
|
3
|
-
export type NavItem = {
|
|
4
|
-
href: string;
|
|
5
|
-
label: string;
|
|
6
|
-
/** A 16px line icon (for example from @tabler/icons-react). */
|
|
7
|
-
icon?: ReactNode;
|
|
8
|
-
current?: boolean;
|
|
9
|
-
/** A number shown at the right of the row, such as items waiting. */
|
|
10
|
-
count?: number;
|
|
11
|
-
};
|
|
12
|
-
export type GroupItem = {
|
|
13
|
-
id: string;
|
|
14
|
-
href: string;
|
|
15
|
-
label: string;
|
|
16
|
-
/** An image or Avatar. */
|
|
17
|
-
avatar?: ReactNode;
|
|
18
|
-
status?: Progress;
|
|
19
|
-
/** Always shown open, in a warm grey block: for an app where only the selected item opens. */
|
|
20
|
-
open?: ReactNode;
|
|
21
|
-
/**
|
|
22
|
-
* Sections the item expands into. Each item with children has its own expand button; several
|
|
23
|
-
* can be open at once, and the shell remembers which ones were left open.
|
|
24
|
-
*/
|
|
25
|
-
children?: ReactNode;
|
|
26
|
-
/** Expanded until the person collapses it. */
|
|
27
|
-
defaultOpen?: boolean;
|
|
28
|
-
/** The row is the current page. */
|
|
29
|
-
current?: boolean;
|
|
30
|
-
onSelect?: () => void;
|
|
31
|
-
};
|
|
32
|
-
export type Group = {
|
|
33
|
-
label: string;
|
|
34
|
-
/** Where the group label links, for example the list of all projects. */
|
|
35
|
-
href?: string;
|
|
36
|
-
items: GroupItem[];
|
|
37
|
-
/** Shown when the group has no items: one line on how to add the first. */
|
|
38
|
-
empty?: ReactNode;
|
|
39
|
-
/**
|
|
40
|
-
* Lets the person reorder the items by dragging a row, or with Alt+Up and Alt+Down on a focused
|
|
41
|
-
* row. Gets the item ids in their new order; save it, then pass the items back in that order.
|
|
42
|
-
*/
|
|
43
|
-
onReorder?: (ids: string[]) => void;
|
|
44
|
-
};
|
|
45
|
-
/** A round avatar: an image, an emoji, or the first letter, on one of the six colours. */
|
|
46
|
-
export declare function Avatar({ name, src, emoji, colour, }: {
|
|
47
|
-
name: string;
|
|
48
|
-
src?: string;
|
|
49
|
-
emoji?: string;
|
|
50
|
-
colour?: Colour;
|
|
51
|
-
}): import("react").JSX.Element;
|
|
52
|
-
/** A small-caps label and its links, inside the selected group item. */
|
|
53
|
-
export declare function SideSection({ label, children }: {
|
|
54
|
-
label: string;
|
|
55
|
-
children: ReactNode;
|
|
56
|
-
}): import("react").JSX.Element;
|
|
57
|
-
/** A link inside the selected group item, with an optional line and status dot. */
|
|
58
|
-
export declare function SideLink({ href, label, line, status, current, }: {
|
|
59
|
-
href: string;
|
|
60
|
-
label: string;
|
|
61
|
-
line?: string;
|
|
62
|
-
status?: Progress;
|
|
63
|
-
current?: boolean;
|
|
64
|
-
}): import("react").JSX.Element;
|
|
65
|
-
/** The frame every Kit app opens in. */
|
|
66
|
-
export declare function AppShell({ app, nav, groups, bottom, settingsHref, onSearch, title, topAside, collapsed: collapsedProp, onCollapsedChange, children, }: {
|
|
67
|
-
app: {
|
|
68
|
-
name: string;
|
|
69
|
-
href?: string;
|
|
70
|
-
mark?: ReactNode;
|
|
71
|
-
};
|
|
72
|
-
nav: NavItem[];
|
|
73
|
-
groups?: Group[];
|
|
74
|
-
/** Pages that sit at the bottom of the sidebar, above Settings (for example Archive). */
|
|
75
|
-
bottom?: NavItem[];
|
|
76
|
-
settingsHref?: string;
|
|
77
|
-
onSearch?: () => void;
|
|
78
|
-
/** Where you are, shown in the top bar before the app name. */
|
|
79
|
-
title?: ReactNode;
|
|
80
|
-
/** Controls on the right of the top bar, for example the chat panel toggle. */
|
|
81
|
-
topAside?: ReactNode;
|
|
82
|
-
collapsed?: boolean;
|
|
83
|
-
onCollapsedChange?: (collapsed: boolean) => void;
|
|
84
|
-
children: ReactNode;
|
|
85
|
-
}): import("react").JSX.Element;
|