@k2b/ui 0.47.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/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/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/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/ssr/chat/ChatComposer.js +53 -30
- package/dist/ssr/chat/ChatComposer.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/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/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/styles.css +1 -1
- 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/dictation/dictation-messages.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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";
|