@k2b/ui 0.46.0 → 0.48.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/dist/browser/chat/ChatComposer.js +244 -193
- package/dist/browser/chat/ChatComposer.js.map +1 -1
- package/dist/browser/chat/ChatDecision.js +10 -6
- package/dist/browser/chat/ChatDecision.js.map +1 -1
- package/dist/browser/chat/chat-messages.js +6 -0
- package/dist/browser/chat/chat-messages.js.map +1 -1
- package/dist/browser/chat/types.js.map +1 -1
- package/dist/browser/content/Calendar.js +40 -5
- package/dist/browser/content/Calendar.js.map +1 -1
- package/dist/browser/content/VirtualFeed.js +26 -21
- package/dist/browser/content/VirtualFeed.js.map +1 -1
- package/dist/browser/content/calendar-event-detail.js +328 -0
- package/dist/browser/content/calendar-event-detail.js.map +1 -0
- package/dist/browser/content/calendar-messages.js +34 -2
- package/dist/browser/content/calendar-messages.js.map +1 -1
- package/dist/browser/content/calendar-shared.js +189 -82
- package/dist/browser/content/calendar-shared.js.map +1 -1
- package/dist/browser/content/calendar-time-view.js +101 -96
- package/dist/browser/content/calendar-time-view.js.map +1 -1
- package/dist/browser/content/index.js.map +1 -1
- package/dist/browser/inputs/Combobox.js +14 -6
- package/dist/browser/inputs/Combobox.js.map +1 -1
- package/dist/browser/inputs/dictation/Dictation.js +114 -108
- package/dist/browser/inputs/dictation/Dictation.js.map +1 -1
- package/dist/browser/inputs/dictation/dictation-messages.js +2 -0
- package/dist/browser/inputs/dictation/dictation-messages.js.map +1 -1
- package/dist/browser/layout/AnchoredPopover.js +2 -1
- package/dist/browser/layout/AnchoredPopover.js.map +1 -1
- package/dist/browser/layout/AppWorkspace.js +340 -440
- package/dist/browser/layout/AppWorkspace.js.map +1 -1
- package/dist/browser/layout/AppWorkspaceSidebarItemStatus.js +113 -0
- package/dist/browser/layout/AppWorkspaceSidebarItemStatus.js.map +1 -0
- package/dist/browser/layout/DetailPanel.js +1 -1
- package/dist/browser/layout/DetailPanel.js.map +1 -1
- package/dist/browser/layout/DetailSections.js +236 -132
- package/dist/browser/layout/DetailSections.js.map +1 -1
- package/dist/browser/layout/MobileShell.js +30 -13
- package/dist/browser/layout/MobileShell.js.map +1 -1
- package/dist/browser/layout/detail-sections-messages.js +4 -0
- package/dist/browser/layout/detail-sections-messages.js.map +1 -1
- package/dist/browser/layout/index.js +1 -0
- package/dist/browser/layout/index.js.map +1 -1
- package/dist/ssr/chat/ChatComposer.js +53 -30
- package/dist/ssr/chat/ChatComposer.js.map +1 -1
- package/dist/ssr/chat/ChatDecision.js +10 -6
- package/dist/ssr/chat/ChatDecision.js.map +1 -1
- package/dist/ssr/chat/chat-messages.js +6 -0
- package/dist/ssr/chat/chat-messages.js.map +1 -1
- package/dist/ssr/chat/types.js.map +1 -1
- package/dist/ssr/content/Calendar.js +36 -4
- package/dist/ssr/content/Calendar.js.map +1 -1
- package/dist/ssr/content/VirtualFeed.js +26 -21
- package/dist/ssr/content/VirtualFeed.js.map +1 -1
- package/dist/ssr/content/calendar-event-detail.js +212 -0
- package/dist/ssr/content/calendar-event-detail.js.map +1 -0
- package/dist/ssr/content/calendar-messages.js +34 -2
- package/dist/ssr/content/calendar-messages.js.map +1 -1
- package/dist/ssr/content/calendar-shared.js +117 -36
- package/dist/ssr/content/calendar-shared.js.map +1 -1
- package/dist/ssr/content/calendar-time-view.js +6 -4
- package/dist/ssr/content/calendar-time-view.js.map +1 -1
- package/dist/ssr/content/index.js.map +1 -1
- package/dist/ssr/inputs/Combobox.js +6 -3
- package/dist/ssr/inputs/Combobox.js.map +1 -1
- package/dist/ssr/inputs/dictation/Dictation.js +3 -1
- package/dist/ssr/inputs/dictation/Dictation.js.map +1 -1
- package/dist/ssr/inputs/dictation/dictation-messages.js +2 -0
- package/dist/ssr/inputs/dictation/dictation-messages.js.map +1 -1
- package/dist/ssr/layout/AnchoredPopover.js +2 -1
- package/dist/ssr/layout/AnchoredPopover.js.map +1 -1
- package/dist/ssr/layout/AppWorkspace.js +61 -127
- package/dist/ssr/layout/AppWorkspace.js.map +1 -1
- package/dist/ssr/layout/AppWorkspaceSidebarItemStatus.js +76 -0
- package/dist/ssr/layout/AppWorkspaceSidebarItemStatus.js.map +1 -0
- package/dist/ssr/layout/DetailPanel.js +1 -1
- package/dist/ssr/layout/DetailPanel.js.map +1 -1
- package/dist/ssr/layout/DetailSections.js +126 -50
- package/dist/ssr/layout/DetailSections.js.map +1 -1
- package/dist/ssr/layout/MobileShell.js +16 -2
- package/dist/ssr/layout/MobileShell.js.map +1 -1
- package/dist/ssr/layout/detail-sections-messages.js +4 -0
- package/dist/ssr/layout/detail-sections-messages.js.map +1 -1
- package/dist/ssr/layout/index.js +1 -0
- package/dist/ssr/layout/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/chat/ChatDecision.d.ts +5 -0
- package/dist/types/chat/chat-messages.d.ts +3 -0
- package/dist/types/chat/types.d.ts +5 -0
- package/dist/types/content/Calendar.d.ts +29 -5
- package/dist/types/content/calendar-event-detail.d.ts +21 -0
- package/dist/types/content/calendar-messages.d.ts +16 -0
- package/dist/types/content/calendar-shared.d.ts +16 -1
- package/dist/types/content/calendar-time-view.d.ts +1 -1
- package/dist/types/content/index.d.ts +1 -1
- package/dist/types/inputs/Combobox.d.ts +2 -0
- package/dist/types/inputs/dictation/dictation-messages.d.ts +1 -0
- package/dist/types/layout/AppWorkspace.d.ts +2 -28
- package/dist/types/layout/AppWorkspaceSidebarItemStatus.d.ts +30 -0
- package/dist/types/layout/DetailSections.d.ts +32 -2
- package/dist/types/layout/MobileShell.d.ts +12 -0
- package/dist/types/layout/detail-sections-messages.d.ts +2 -0
- package/dist/types/layout/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -19,6 +19,11 @@ export type ChatDecisionProps = {
|
|
|
19
19
|
remember?: ChatDecisionAnswer;
|
|
20
20
|
/** Turns `confirm` and `remember` off; this reason replaces `reason` in the same place. */
|
|
21
21
|
unavailable?: ChatDecisionReason;
|
|
22
|
+
/**
|
|
23
|
+
* Turns every answer off until the reason clears, such as no connection, so no answer is lost on the way; this
|
|
24
|
+
* reason replaces `reason` and `unavailable` in the same place.
|
|
25
|
+
*/
|
|
26
|
+
waiting?: ChatDecisionReason;
|
|
22
27
|
/** The result line shown in every state but `open`, usually `Chat.Outcome`. */
|
|
23
28
|
outcome?: JSX.Element;
|
|
24
29
|
/** Receives a rejected promise from an answer's `onSelect`. */
|
|
@@ -134,6 +134,9 @@ export declare const chatMessages: import("@k2b/stdlib").Catalog<{
|
|
|
134
134
|
openInNewTab: ({ name }: {
|
|
135
135
|
name: string;
|
|
136
136
|
}) => string;
|
|
137
|
+
uploading: ({ name }: {
|
|
138
|
+
name: string;
|
|
139
|
+
}) => string;
|
|
137
140
|
retryOlderMessages: string;
|
|
138
141
|
sendMessage: string;
|
|
139
142
|
startConversation: string;
|
|
@@ -88,6 +88,11 @@ export type ChatAttachment = {
|
|
|
88
88
|
data?: unknown;
|
|
89
89
|
/** Optional application-owned action presented below the attachment label. */
|
|
90
90
|
action?: ChatAction;
|
|
91
|
+
/**
|
|
92
|
+
* Upload progress in percent while the attachment uploads, such as a draft that saves its files before sending. The
|
|
93
|
+
* line below the label shows a ring and the percentage instead of `action`.
|
|
94
|
+
*/
|
|
95
|
+
progress?: number;
|
|
91
96
|
};
|
|
92
97
|
export type ChatUsage = {
|
|
93
98
|
input?: number;
|
|
@@ -13,12 +13,23 @@ export type CalendarEvent = {
|
|
|
13
13
|
color?: CalendarEventColor;
|
|
14
14
|
colorHex?: string;
|
|
15
15
|
href?: string;
|
|
16
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Host data for the entry's element: each key becomes a `data-*` attribute, `spaceItemId` as `data-space-item-id`.
|
|
18
|
+
* Keys must be camelCase letters and digits; keys that start with `calendar` belong to the calendar and are left out.
|
|
19
|
+
*/
|
|
20
|
+
data?: Record<string, string>;
|
|
21
|
+
/** A Tabler icon class such as `"ti ti-truck"`, drawn before the title in the color of the entry's edge. */
|
|
22
|
+
icon?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Links that belong to the entry, such as an order or a video room. They show in the entry's detail, and week, day,
|
|
25
|
+
* and the day list show how many there are; an entry never nests them, since it is a link or button itself.
|
|
26
|
+
*/
|
|
27
|
+
links?: CalendarEventLink[];
|
|
17
28
|
meta?: string;
|
|
18
29
|
description?: string;
|
|
19
30
|
/**
|
|
20
|
-
* `marker` draws a point in time, such as a deadline,
|
|
21
|
-
*
|
|
31
|
+
* `marker` draws a point in time, such as a deadline, with a dashed edge in
|
|
32
|
+
* its color instead of a filled band.
|
|
22
33
|
*/
|
|
23
34
|
display?: "event" | "background" | "marker";
|
|
24
35
|
/**
|
|
@@ -27,20 +38,33 @@ export type CalendarEvent = {
|
|
|
27
38
|
*/
|
|
28
39
|
accessibleDetail?: string;
|
|
29
40
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
41
|
+
* The state of a to-do or deadline, such as a task's. Leave it out for entries without one. `true` strikes the title
|
|
42
|
+
* through in every view; `false` turns the entry red once it lies in the past. The day and week views with
|
|
43
|
+
* `dayHours` draw a checkbox, and with `onEventCheck` the reader can change it.
|
|
32
44
|
*/
|
|
33
45
|
checked?: boolean;
|
|
34
46
|
location?: string;
|
|
35
47
|
calendarName?: string;
|
|
48
|
+
/**
|
|
49
|
+
* The people of the entry. Week and day show up to three faces and then "+n", the day list one, and the compact
|
|
50
|
+
* month none; the detail lists them all. Without `src` a face shows initials.
|
|
51
|
+
*/
|
|
36
52
|
attendees?: CalendarAttendee[];
|
|
37
53
|
resources?: CalendarResource[];
|
|
38
54
|
recurrence?: CalendarRecurrence;
|
|
39
55
|
};
|
|
40
56
|
export type CalendarAttendee = {
|
|
41
57
|
name: string;
|
|
58
|
+
/** A picture of the person; without it the face shows initials. */
|
|
59
|
+
src?: string;
|
|
42
60
|
status?: "accepted" | "declined" | "tentative" | "needs-action";
|
|
43
61
|
};
|
|
62
|
+
export type CalendarEventLink = {
|
|
63
|
+
label: string;
|
|
64
|
+
href: string;
|
|
65
|
+
/** A Tabler icon class before the label; a link icon by default. */
|
|
66
|
+
icon?: string;
|
|
67
|
+
};
|
|
44
68
|
export type CalendarResource = {
|
|
45
69
|
name: string;
|
|
46
70
|
kind?: "room" | "equipment" | "link" | "other";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { JSX } from "solid-js";
|
|
2
|
+
import type { CalendarEvent } from "./Calendar";
|
|
3
|
+
import { type CalendarOwner } from "./calendar-shared";
|
|
4
|
+
/** The entry the calendar's own detail shows, and the element that opened it, where the focus returns. */
|
|
5
|
+
export type CalendarDetailState = {
|
|
6
|
+
event: CalendarEvent & {
|
|
7
|
+
sourceStartDate?: Date;
|
|
8
|
+
sourceEndDate?: Date;
|
|
9
|
+
};
|
|
10
|
+
anchor: HTMLElement;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The calendar's own detail of an entry, for hosts without `onEventActivate`: its time, place, people, and links, and
|
|
14
|
+
* "Open" for its `href`. It lies beside the entry, and on a phone it rises from the bottom. Escape and a click outside
|
|
15
|
+
* close it, and the focus goes back to the entry.
|
|
16
|
+
*/
|
|
17
|
+
export declare const CalendarEventDetail: (props: {
|
|
18
|
+
owner: CalendarOwner;
|
|
19
|
+
state: CalendarDetailState | null;
|
|
20
|
+
onClose: () => void;
|
|
21
|
+
}) => JSX.Element;
|
|
@@ -151,6 +151,22 @@ declare const calendarMessages: import("@k2b/stdlib").Catalog<{
|
|
|
151
151
|
calendarGoToHint: string;
|
|
152
152
|
calendarGoToUnknown: string;
|
|
153
153
|
calendarGoToGo: string;
|
|
154
|
+
calendarStateDone: string;
|
|
155
|
+
calendarStateOverdue: string;
|
|
156
|
+
calendarOverdue: string;
|
|
157
|
+
calendarDoneState: string;
|
|
158
|
+
calendarPeopleCount: ({ count }: {
|
|
159
|
+
count: number;
|
|
160
|
+
}) => string;
|
|
161
|
+
calendarLinkCount: ({ count }: {
|
|
162
|
+
count: number;
|
|
163
|
+
}) => string;
|
|
164
|
+
calendarPeople: string;
|
|
165
|
+
calendarLinks: string;
|
|
166
|
+
calendarOpenEvent: string;
|
|
167
|
+
calendarEventDetail: ({ title }: {
|
|
168
|
+
title: string;
|
|
169
|
+
}) => string;
|
|
154
170
|
}>;
|
|
155
171
|
export type CalendarMessages = ReturnType<(typeof calendarMessages)["resolve"]>["t"];
|
|
156
172
|
/** Resolved from the inherited render locale, like the rest of @k2b/ui. */
|
|
@@ -16,7 +16,18 @@ export type CalendarStop = {
|
|
|
16
16
|
minute: number;
|
|
17
17
|
};
|
|
18
18
|
/** What the built-in views read from the props: they only ever link to built-in views. */
|
|
19
|
-
export type CalendarOwner = Omit<CalendarProps, "view" | "customViews" | "children"
|
|
19
|
+
export type CalendarOwner = Omit<CalendarProps, "view" | "customViews" | "children"> & {
|
|
20
|
+
/** The calendar's clock, which ticks every minute; an open entry in the past is overdue. */
|
|
21
|
+
calendarNow?: () => Date;
|
|
22
|
+
/** Without `onEventActivate`: opens the calendar's own detail of an entry beside the element that opened it. */
|
|
23
|
+
openEventDetail?: (event: CalendarEvent, anchor: HTMLElement) => void;
|
|
24
|
+
};
|
|
25
|
+
export declare const eventDataAttributes: (data: CalendarEvent["data"]) => Record<string, string>;
|
|
26
|
+
/** An open to-do or deadline whose time has passed. */
|
|
27
|
+
export declare const isOverdue: (event: CalendarEvent & {
|
|
28
|
+
sourceStartDate?: Date;
|
|
29
|
+
sourceEndDate?: Date;
|
|
30
|
+
}, now: Date | undefined) => boolean;
|
|
20
31
|
export declare const ownerDateConfig: (owner: CalendarOwner) => DateContext;
|
|
21
32
|
export declare const parseDate: (value: Date | string, context?: DateContext) => Date;
|
|
22
33
|
export declare const validDate: (value: Date) => boolean;
|
|
@@ -64,6 +75,10 @@ export declare const EventChip: (props: {
|
|
|
64
75
|
/** Day and week views: Space on the chip checks the box the calendar draws beside it, as on the box itself. */
|
|
65
76
|
onCheck?: () => void;
|
|
66
77
|
onMovePointerDown?: (event: PointerEvent, onActivate: () => void) => void;
|
|
78
|
+
/** How many faces of the attendees fit: up to three in a band, one in the day list, none by default. */
|
|
79
|
+
faces?: number;
|
|
80
|
+
/** Shows how many links the entry has, where there is room beside the title or time. */
|
|
81
|
+
linkCount?: boolean;
|
|
67
82
|
}) => JSX.Element;
|
|
68
83
|
/** The width of a text in a font, from a canvas, so a bar can tell whether its title leaves room for a date hint. */
|
|
69
84
|
export declare const textWidth: (text: string, font: string) => number;
|
|
@@ -156,7 +156,7 @@ export declare const compactGermanDate: (text: string, locale: string | undefine
|
|
|
156
156
|
export declare const shortDay: (view: TimeView, key: string, withMonth?: boolean) => string;
|
|
157
157
|
/** A long day such as "Friday, October 9", with the year when it is not this year's. */
|
|
158
158
|
export declare const longDay: (view: TimeView, key: string) => string;
|
|
159
|
-
/** A to-do's
|
|
159
|
+
/** A to-do's check: a small ring in the entry's color before its title that fills when done; the title strikes through. */
|
|
160
160
|
export declare const TimeCheck: (props: {
|
|
161
161
|
view: TimeView;
|
|
162
162
|
event: CalendarEvent;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { CalendarAttendee, CalendarCommand, CalendarController, CalendarCustomView, CalendarDayBadge, CalendarEvent, CalendarEventColor, CalendarEventRenderContext, CalendarEventTimeChange, CalendarExternalDrag, CalendarLabels, CalendarProps, CalendarQuickCreateControls, CalendarRange, CalendarRecurrence, CalendarResource, CalendarSelectionControls, CalendarView, } from "./Calendar";
|
|
1
|
+
export type { CalendarAttendee, CalendarCommand, CalendarController, CalendarCustomView, CalendarDayBadge, CalendarEvent, CalendarEventColor, CalendarEventLink, CalendarEventRenderContext, CalendarEventTimeChange, CalendarExternalDrag, CalendarLabels, CalendarProps, CalendarQuickCreateControls, CalendarRange, CalendarRecurrence, CalendarResource, CalendarSelectionControls, CalendarView, } from "./Calendar";
|
|
2
2
|
export { default as Calendar } from "./Calendar";
|
|
3
3
|
export type { ChartKind, ChartLabels, ChartProps, ChartRenderOptions } from "./Chart";
|
|
4
4
|
export { default as Chart } from "./Chart";
|
|
@@ -5,6 +5,8 @@ export type ComboboxOption = {
|
|
|
5
5
|
label: string;
|
|
6
6
|
description?: string;
|
|
7
7
|
icon?: string;
|
|
8
|
+
/** Shown but cannot be picked, such as someone who is already on the list; say why in `description`. */
|
|
9
|
+
disabled?: boolean;
|
|
8
10
|
};
|
|
9
11
|
export type ComboboxProps = FieldProps & {
|
|
10
12
|
readOnly?: boolean;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type AppWorkspaceSidebarItemStatusProps } from "./AppWorkspaceSidebarItemStatus";
|
|
2
|
+
export type { AppWorkspaceSidebarItemStatusProps } from "./AppWorkspaceSidebarItemStatus";
|
|
1
3
|
import { type LinkNavigateEvent, type NavigationScrollMode } from "@k2b/ssr/nav";
|
|
2
4
|
import { type JSX } from "solid-js";
|
|
3
5
|
import { type AppWorkspaceLayoutState } from "./app-workspace-state";
|
|
@@ -361,34 +363,6 @@ export type AppWorkspaceSidebarItemActionsProps = {
|
|
|
361
363
|
children: JSX.Element;
|
|
362
364
|
visibility?: AppWorkspaceSidebarAccessoryVisibility;
|
|
363
365
|
};
|
|
364
|
-
/**
|
|
365
|
-
* Unread state for the trailing `meta` slot. Every mark keeps a fixed width,
|
|
366
|
-
* so the row keeps its height and the label its start in every state.
|
|
367
|
-
*/
|
|
368
|
-
export type AppWorkspaceSidebarItemStatusProps = {
|
|
369
|
-
/**
|
|
370
|
-
* A positive number shows a count (above 99 as "99+") and sets the label in
|
|
371
|
-
* a stronger weight; `true` shows a quiet dot for new activity that should
|
|
372
|
-
* not draw attention, such as in a muted conversation.
|
|
373
|
-
*/
|
|
374
|
-
unread?: number | boolean;
|
|
375
|
-
/** Marks unread items that mention the person with "@". */
|
|
376
|
-
mention?: boolean;
|
|
377
|
-
/**
|
|
378
|
-
* Shows a muted bell, and the item reads as set aside: its label in the muted ink without unread weight, and a
|
|
379
|
-
* mention count without its fill.
|
|
380
|
-
*/
|
|
381
|
-
muted?: boolean;
|
|
382
|
-
/**
|
|
383
|
-
* Items that wait for the person, such as requests to approve, in the unread slot instead of `unread`. `label` is
|
|
384
|
-
* the phrase a screen reader hears, for example "3 waiting". `0` stays as a muted count, for a count that dropped
|
|
385
|
-
* to zero while the row is still shown; leave the prop out when nothing waits.
|
|
386
|
-
*/
|
|
387
|
-
waiting?: {
|
|
388
|
-
count: number;
|
|
389
|
-
label: string;
|
|
390
|
-
};
|
|
391
|
-
};
|
|
392
366
|
export type AppWorkspaceNavTreeProps = {
|
|
393
367
|
children: JSX.Element;
|
|
394
368
|
ariaLabel: string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
/**
|
|
3
|
+
* Unread state for the trailing `meta` slot. Every mark keeps a fixed width,
|
|
4
|
+
* so the row keeps its height and the label its start in every state.
|
|
5
|
+
*/
|
|
6
|
+
export type AppWorkspaceSidebarItemStatusProps = {
|
|
7
|
+
/**
|
|
8
|
+
* A positive number shows a count (above 99 as "99+") and sets the label in
|
|
9
|
+
* a stronger weight; `true` shows a quiet dot for new activity that should
|
|
10
|
+
* not draw attention, such as in a muted conversation.
|
|
11
|
+
*/
|
|
12
|
+
unread?: number | boolean;
|
|
13
|
+
/** Marks unread items that mention the person with "@". */
|
|
14
|
+
mention?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Shows a muted bell, and the item reads as set aside: its label in the muted ink without unread weight, and a
|
|
17
|
+
* mention count without its fill.
|
|
18
|
+
*/
|
|
19
|
+
muted?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Items that wait for the person, such as requests to approve, in the unread slot instead of `unread`. `label` is
|
|
22
|
+
* the phrase a screen reader hears, for example "3 waiting". `0` stays as a muted count, for a count that dropped
|
|
23
|
+
* to zero while the row is still shown; leave the prop out when nothing waits.
|
|
24
|
+
*/
|
|
25
|
+
waiting?: {
|
|
26
|
+
count: number;
|
|
27
|
+
label: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare const AppWorkspaceSidebarItemStatus: (props: AppWorkspaceSidebarItemStatusProps) => JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type JSX } from "solid-js";
|
|
2
|
+
import type { DropdownItem } from "../actions/Dropdown";
|
|
2
3
|
import { type AvatarShape } from "../surfaces/Avatar";
|
|
3
4
|
export type DetailPresencePerson = {
|
|
4
5
|
/** Stable key, such as the account id. */
|
|
@@ -99,9 +100,25 @@ export type DetailLinkItem = {
|
|
|
99
100
|
onClick?: (event: MouseEvent) => void;
|
|
100
101
|
/** Defaults to a document. */
|
|
101
102
|
icon?: string;
|
|
103
|
+
/** Replaces the icon, such as a site's favicon. */
|
|
104
|
+
leading?: JSX.Element;
|
|
105
|
+
/** One quiet line below the title, such as where the item lives. */
|
|
106
|
+
description?: JSX.Element;
|
|
102
107
|
/** Quiet text at the end, such as the other notebook's name. */
|
|
103
108
|
trailing?: JSX.Element;
|
|
104
|
-
|
|
109
|
+
/** For a link to another site, such as `_blank` with `rel="noreferrer"`. */
|
|
110
|
+
target?: string;
|
|
111
|
+
rel?: string;
|
|
112
|
+
/** An item that cannot be opened right now, such as one the person may no longer read. */
|
|
113
|
+
disabled?: boolean;
|
|
114
|
+
} & ({
|
|
115
|
+
menuItems?: never;
|
|
116
|
+
menuLabel?: never;
|
|
117
|
+
} | {
|
|
118
|
+
/** Further commands on the item, such as "Unlink", only for people who may run them. */
|
|
119
|
+
menuItems: readonly DropdownItem[];
|
|
120
|
+
menuLabel: string;
|
|
121
|
+
});
|
|
105
122
|
export type DetailLinksProps = {
|
|
106
123
|
/** What links here. */
|
|
107
124
|
incoming: readonly DetailLinkItem[];
|
|
@@ -112,9 +129,20 @@ export type DetailLinksProps = {
|
|
|
112
129
|
/** Defaults to "Links". */
|
|
113
130
|
title?: string;
|
|
114
131
|
defaultOpen?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* `loading` while links still load after the first paint: a placeholder row keeps their place. `error` keeps the
|
|
134
|
+
* loaded rows and says that the rest failed, with `onRetry`.
|
|
135
|
+
*/
|
|
136
|
+
state?: "ready" | "loading" | "error";
|
|
137
|
+
onRetry?: () => void;
|
|
138
|
+
/** Rows after the links, such as "Add link" or "Load more", only for people who may use them. */
|
|
139
|
+
footer?: JSX.Element;
|
|
115
140
|
class?: string;
|
|
116
141
|
};
|
|
117
|
-
/**
|
|
142
|
+
/**
|
|
143
|
+
* "Linked from" and "Links to" in one section. Without links it is one row: the title and "None yet", followed by the
|
|
144
|
+
* `footer` when there is one.
|
|
145
|
+
*/
|
|
118
146
|
export declare function DetailLinks(props: DetailLinksProps): JSX.Element;
|
|
119
147
|
export type DetailProperty = {
|
|
120
148
|
id: string;
|
|
@@ -134,6 +162,8 @@ export type DetailPropertiesProps = {
|
|
|
134
162
|
summary?: JSX.Element;
|
|
135
163
|
/** Open by default only when the properties are the object's main content. */
|
|
136
164
|
defaultOpen?: boolean;
|
|
165
|
+
/** Rows after the facts, such as a command that copies the object's ID. */
|
|
166
|
+
children?: JSX.Element;
|
|
137
167
|
class?: string;
|
|
138
168
|
};
|
|
139
169
|
/** Facts about the object as label and value rows, such as created, edited, size, and the way to its history. */
|
|
@@ -18,6 +18,12 @@ export type MobileShellProps = {
|
|
|
18
18
|
* tab's page loads.
|
|
19
19
|
*/
|
|
20
20
|
scroll?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The content is a screen of its own, such as an open chat on a phone: the footer steps aside, so the content
|
|
23
|
+
* reaches the bottom edge and pads its safe area itself. Content that opens or leaves such a screen in place calls
|
|
24
|
+
* `MobileShell.setScreen`.
|
|
25
|
+
*/
|
|
26
|
+
screen?: boolean;
|
|
21
27
|
class?: string;
|
|
22
28
|
};
|
|
23
29
|
export type MobileShellHeaderProps = {
|
|
@@ -37,6 +43,11 @@ export type MobileShellHeaderProps = {
|
|
|
37
43
|
/** Controls after the title, such as a menu. */
|
|
38
44
|
actions?: JSX.Element;
|
|
39
45
|
};
|
|
46
|
+
/**
|
|
47
|
+
* Marks the shell around `from` as showing a screen of its own, or not, after the first paint; the server renders
|
|
48
|
+
* the first state with the `screen` prop. Does nothing outside a shell.
|
|
49
|
+
*/
|
|
50
|
+
declare const setMobileShellScreen: (from: Element, screen: boolean) => void;
|
|
40
51
|
/**
|
|
41
52
|
* Keeps a mounted shell working: the footer height on the body, which the portalled toast rail reads, the room a
|
|
42
53
|
* persistent toast takes from the scroll area, the scroll area's edge fade, and immediate feedback for link taps.
|
|
@@ -86,5 +97,6 @@ declare function MobileShellSidebar(props: MobileShellSidebarProps): JSX.Element
|
|
|
86
97
|
export declare const MobileShell: typeof MobileShellRoot & {
|
|
87
98
|
Header: typeof MobileShellHeader;
|
|
88
99
|
Sidebar: typeof MobileShellSidebar;
|
|
100
|
+
setScreen: typeof setMobileShellScreen;
|
|
89
101
|
};
|
|
90
102
|
export default MobileShell;
|
|
@@ -3,6 +3,7 @@ export type { AppOverviewCardsProps, AppOverviewEmptyStateProps, AppOverviewPane
|
|
|
3
3
|
export { default as AppOverview } from "./AppOverview";
|
|
4
4
|
export type { AppWorkspaceBottomDrawerHeight, AppWorkspaceBottomDrawerProps, AppWorkspaceContentProps, AppWorkspaceDetailProps, AppWorkspaceDetailWidth, AppWorkspaceHeadProps, AppWorkspaceMainPaneProps, AppWorkspaceMainProps, AppWorkspaceNavTreeItemProps, AppWorkspaceNavTreeMove, AppWorkspaceNavTreeProps, AppWorkspaceProps, AppWorkspaceSidebarAccessoryVisibility, AppWorkspaceSidebarBodyProps, AppWorkspaceSidebarIconActionProps, AppWorkspaceSidebarIconActionTone, AppWorkspaceSidebarIconGridProps, AppWorkspaceSidebarItemActionProps, AppWorkspaceSidebarItemActionsProps, AppWorkspaceSidebarItemIconProps, AppWorkspaceSidebarItemLabelProps, AppWorkspaceSidebarItemMetaProps, AppWorkspaceSidebarItemProps, AppWorkspaceSidebarItemStatusProps, AppWorkspaceSidebarItemTone, AppWorkspaceSidebarProps, AppWorkspaceSidebarSectionProps, AppWorkspaceSidebarVisibility, AppWorkspaceWidthShare, } from "./AppWorkspace";
|
|
5
5
|
export { appWorkspaceDetailElementId, default as AppWorkspace } from "./AppWorkspace";
|
|
6
|
+
export { AppWorkspaceSidebarItemStatus } from "./AppWorkspaceSidebarItemStatus";
|
|
6
7
|
export { watchAppHostWidth } from "./app-host-width";
|
|
7
8
|
export type { AppWorkspaceControllerOptions } from "./app-workspace-controller";
|
|
8
9
|
export { installAppWorkspaceController, parkWorkspaceDetailDrawers } from "./app-workspace-controller";
|