@react-x11/components 0.6.0 → 0.7.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/README.md +49 -39
- package/dist/formula/node.d.ts.map +1 -1
- package/dist/formula/node.js +17 -6
- package/dist/formula/node.js.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/richtext/node.d.ts.map +1 -1
- package/dist/richtext/node.js +7 -2
- package/dist/richtext/node.js.map +1 -1
- package/dist/table/index.d.ts +15 -0
- package/dist/table/index.d.ts.map +1 -1
- package/dist/table/index.js +95 -11
- package/dist/table/index.js.map +1 -1
- package/dist/tree/index.d.ts.map +1 -1
- package/dist/tree/index.js +77 -2
- package/dist/tree/index.js.map +1 -1
- package/package.json +3 -8
- package/src/formula/node.ts +22 -34
- package/src/index.ts +0 -18
- package/src/richtext/node.ts +7 -2
- package/src/table/index.ts +114 -10
- package/src/tree/index.ts +77 -2
- package/dist/desktop-calendar/eds.d.ts +0 -102
- package/dist/desktop-calendar/eds.d.ts.map +0 -1
- package/dist/desktop-calendar/eds.js +0 -356
- package/dist/desktop-calendar/eds.js.map +0 -1
- package/dist/desktop-calendar/ical.d.ts +0 -63
- package/dist/desktop-calendar/ical.d.ts.map +0 -1
- package/dist/desktop-calendar/ical.js +0 -57
- package/dist/desktop-calendar/ical.js.map +0 -1
- package/dist/desktop-calendar/index.d.ts +0 -72
- package/dist/desktop-calendar/index.d.ts.map +0 -1
- package/dist/desktop-calendar/index.js +0 -213
- package/dist/desktop-calendar/index.js.map +0 -1
- package/src/desktop-calendar/eds.ts +0 -484
- package/src/desktop-calendar/ical.ts +0 -119
- package/src/desktop-calendar/index.ts +0 -287
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import type { CalendarChange, DesktopCalendarError, DesktopCalendarInfo, DesktopEvent } from './eds.js';
|
|
2
|
-
export { DesktopCalendar, parseKeyFile } from './eds.js';
|
|
3
|
-
export type { CalendarChange, DesktopCalendarError, DesktopCalendarInfo, DesktopEvent, EventsResult, } from './eds.js';
|
|
4
|
-
export { IcalUnavailableError } from './ical.js';
|
|
5
|
-
/**
|
|
6
|
-
* Occurrences grouped by the local day they appear on — which is what a
|
|
7
|
-
* calendar grid actually renders.
|
|
8
|
-
*
|
|
9
|
-
* An all-day event spans `[start, end)` across possibly several days, and a
|
|
10
|
-
* timed one can cross midnight, so an event lands under **every** day it
|
|
11
|
-
* touches rather than only under its start.
|
|
12
|
-
*/
|
|
13
|
-
export declare function byDay(events: DesktopEvent[]): Map<string, DesktopEvent[]>;
|
|
14
|
-
export type DesktopCalendarStatus = 'idle' | 'loading' | 'ready' | 'unavailable';
|
|
15
|
-
export interface UseDesktopCalendarEventsOptions {
|
|
16
|
-
/** Start of the window to read, inclusive. */
|
|
17
|
-
from: Date;
|
|
18
|
-
/** End of the window, exclusive. */
|
|
19
|
-
to: Date;
|
|
20
|
-
/** Restrict to these calendar UIDs. Default: every enabled calendar. */
|
|
21
|
-
calendars?: string[];
|
|
22
|
-
/** Re-query when the desktop says something in the range changed. */
|
|
23
|
-
watch?: boolean;
|
|
24
|
-
/** Set false to hold off entirely — a picker that is not open yet. */
|
|
25
|
-
enabled?: boolean;
|
|
26
|
-
}
|
|
27
|
-
export interface UseDesktopCalendarEventsResult {
|
|
28
|
-
events: DesktopEvent[];
|
|
29
|
-
/** The same events, keyed by `'YYYY-MM-DD'`, ready for `dayContent`. */
|
|
30
|
-
byDay: Map<string, DesktopEvent[]>;
|
|
31
|
-
/** Every calendar found, for a legend or a filter. */
|
|
32
|
-
calendars: DesktopCalendarInfo[];
|
|
33
|
-
/** Backends that would not answer. Not fatal; the rest still loaded. */
|
|
34
|
-
errors: DesktopCalendarError[];
|
|
35
|
-
status: DesktopCalendarStatus;
|
|
36
|
-
/** Why there are no events: no bus, or no `ical.js`. */
|
|
37
|
-
error: Error | null;
|
|
38
|
-
/** Re-query now. */
|
|
39
|
-
refresh: () => void;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* The user's desktop calendar events, as rendering state.
|
|
43
|
-
*
|
|
44
|
-
* ```tsx
|
|
45
|
-
* const { byDay } = useDesktopCalendarEvents({ from, to });
|
|
46
|
-
*
|
|
47
|
-
* <Calendar
|
|
48
|
-
* dayContent={(day, state) =>
|
|
49
|
-
* byDay.get(day)?.slice(0, 3).map((ev) => (
|
|
50
|
-
* <box key={ev.uid} style={{ width: 4, height: 4, borderRadius: 2,
|
|
51
|
-
* backgroundColor: state.selected
|
|
52
|
-
* ? state.color
|
|
53
|
-
* : (ev.calendar.color ?? '$accent') }} />
|
|
54
|
-
* ))
|
|
55
|
-
* }
|
|
56
|
-
* />
|
|
57
|
-
* ```
|
|
58
|
-
*
|
|
59
|
-
* **`from` and `to` are read by their timestamps, not their identity**, so
|
|
60
|
-
* `new Date(...)` inline in the render is fine and will not re-query on every
|
|
61
|
-
* paint. That is the mistake this hook would otherwise invite, and it costs a
|
|
62
|
-
* D-Bus round trip per frame.
|
|
63
|
-
*
|
|
64
|
-
* `status` is `'unavailable'` when there is no session bus or `ical.js` is not
|
|
65
|
-
* installed — both are ordinary on a machine that simply does not have them,
|
|
66
|
-
* so neither throws, and `error` says which it was. Treat it as "no calendar
|
|
67
|
-
* integration here", not as a failure to report.
|
|
68
|
-
*/
|
|
69
|
-
export declare function useDesktopCalendarEvents(options: UseDesktopCalendarEventsOptions): UseDesktopCalendarEventsResult;
|
|
70
|
-
/** A subscription that only reports *when* something changed. */
|
|
71
|
-
export type { CalendarChange as DesktopCalendarChange };
|
|
72
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/desktop-calendar/index.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,YAAY,EACb,MAAM,UAAU,CAAC;A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Y,EAAE,cAAc,IAAI,qBAAqB,EAAE,CAAC"}
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
// Read the calendars the user's desktop already has, and hand them to a
|
|
2
|
-
// `<Calendar dayContent>`.
|
|
3
|
-
//
|
|
4
|
-
// The point of this module is that an app gets the user's real events —
|
|
5
|
-
// Google, Microsoft, CalDAV, local — without asking for a single credential
|
|
6
|
-
// and without an OAuth flow, because the desktop already did all of that. See
|
|
7
|
-
// `./eds.js` for how, and `../calendar/` for what to draw them on.
|
|
8
|
-
//
|
|
9
|
-
// Nothing here opens a D-Bus connection. `useSessionBus()` (or `sessionBus()`
|
|
10
|
-
// for the imperative path) hands over react-x11's shared one, so an app is one
|
|
11
|
-
// name on the bus however many features it turns on.
|
|
12
|
-
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
13
|
-
import { useSessionBus } from 'react-x11';
|
|
14
|
-
import { DesktopCalendar } from './eds.js';
|
|
15
|
-
export { DesktopCalendar, parseKeyFile } from './eds.js';
|
|
16
|
-
export { IcalUnavailableError } from './ical.js';
|
|
17
|
-
const pad = (n) => String(n).padStart(2, '0');
|
|
18
|
-
/**
|
|
19
|
-
* The local calendar day a `Date` falls on, as `'YYYY-MM-DD'`.
|
|
20
|
-
*
|
|
21
|
-
* Deliberately a local three-liner rather than an import from `../calendar/`:
|
|
22
|
-
* no component in this package imports another, because a lateral import
|
|
23
|
-
* makes the two one unit in a bundler's eyes and an app that wanted only the
|
|
24
|
-
* events would start paying for the grid. The **format** is the contract they
|
|
25
|
-
* share, not the function — these keys index straight into a `<Calendar>`'s
|
|
26
|
-
* `dayContent`.
|
|
27
|
-
*/
|
|
28
|
-
function dayKeyOf(date) {
|
|
29
|
-
return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Occurrences grouped by the local day they appear on — which is what a
|
|
33
|
-
* calendar grid actually renders.
|
|
34
|
-
*
|
|
35
|
-
* An all-day event spans `[start, end)` across possibly several days, and a
|
|
36
|
-
* timed one can cross midnight, so an event lands under **every** day it
|
|
37
|
-
* touches rather than only under its start.
|
|
38
|
-
*/
|
|
39
|
-
export function byDay(events) {
|
|
40
|
-
const days = new Map();
|
|
41
|
-
for (const event of events) {
|
|
42
|
-
// `end` is exclusive, so a one-day all-day event ending at the next
|
|
43
|
-
// midnight must not also mark the next day.
|
|
44
|
-
const lastMs = Math.max(event.start.getTime(), event.end.getTime() - 1);
|
|
45
|
-
const last = new Date(lastMs);
|
|
46
|
-
const cursor = new Date(event.start.getFullYear(), event.start.getMonth(), event.start.getDate());
|
|
47
|
-
while (cursor <= last) {
|
|
48
|
-
const key = dayKeyOf(cursor);
|
|
49
|
-
const list = days.get(key);
|
|
50
|
-
if (list)
|
|
51
|
-
list.push(event);
|
|
52
|
-
else
|
|
53
|
-
days.set(key, [event]);
|
|
54
|
-
cursor.setDate(cursor.getDate() + 1);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return days;
|
|
58
|
-
}
|
|
59
|
-
const NO_EVENTS = [];
|
|
60
|
-
const NO_CALENDARS = [];
|
|
61
|
-
const NO_ERRORS = [];
|
|
62
|
-
/** The calendars a caller asked for by uid, or every enabled one. `onlyKey`
|
|
63
|
-
* is the comma-joined list, because an array prop is a new identity every
|
|
64
|
-
* render and these two effects are keyed on it. */
|
|
65
|
-
function pickCalendars(all, onlyKey) {
|
|
66
|
-
if (!onlyKey)
|
|
67
|
-
return all.filter((c) => c.enabled);
|
|
68
|
-
const wanted = new Set(onlyKey.split(','));
|
|
69
|
-
return all.filter((c) => wanted.has(c.uid));
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* The user's desktop calendar events, as rendering state.
|
|
73
|
-
*
|
|
74
|
-
* ```tsx
|
|
75
|
-
* const { byDay } = useDesktopCalendarEvents({ from, to });
|
|
76
|
-
*
|
|
77
|
-
* <Calendar
|
|
78
|
-
* dayContent={(day, state) =>
|
|
79
|
-
* byDay.get(day)?.slice(0, 3).map((ev) => (
|
|
80
|
-
* <box key={ev.uid} style={{ width: 4, height: 4, borderRadius: 2,
|
|
81
|
-
* backgroundColor: state.selected
|
|
82
|
-
* ? state.color
|
|
83
|
-
* : (ev.calendar.color ?? '$accent') }} />
|
|
84
|
-
* ))
|
|
85
|
-
* }
|
|
86
|
-
* />
|
|
87
|
-
* ```
|
|
88
|
-
*
|
|
89
|
-
* **`from` and `to` are read by their timestamps, not their identity**, so
|
|
90
|
-
* `new Date(...)` inline in the render is fine and will not re-query on every
|
|
91
|
-
* paint. That is the mistake this hook would otherwise invite, and it costs a
|
|
92
|
-
* D-Bus round trip per frame.
|
|
93
|
-
*
|
|
94
|
-
* `status` is `'unavailable'` when there is no session bus or `ical.js` is not
|
|
95
|
-
* installed — both are ordinary on a machine that simply does not have them,
|
|
96
|
-
* so neither throws, and `error` says which it was. Treat it as "no calendar
|
|
97
|
-
* integration here", not as a failure to report.
|
|
98
|
-
*/
|
|
99
|
-
export function useDesktopCalendarEvents(options) {
|
|
100
|
-
const { from, to, calendars: only, watch = false, enabled = true } = options;
|
|
101
|
-
const { bus } = useSessionBus();
|
|
102
|
-
const [events, setEvents] = useState(NO_EVENTS);
|
|
103
|
-
const [found, setFound] = useState(NO_CALENDARS);
|
|
104
|
-
const [errors, setErrors] = useState(NO_ERRORS);
|
|
105
|
-
const [status, setStatus] = useState('idle');
|
|
106
|
-
const [error, setError] = useState(null);
|
|
107
|
-
const [nonce, setNonce] = useState(0);
|
|
108
|
-
const refresh = useCallback(() => setNonce((n) => n + 1), []);
|
|
109
|
-
// Timestamps, not the Date objects: a caller writing `from={new Date(y, m, 1)}`
|
|
110
|
-
// in the render body hands us a new identity every paint, and an effect keyed
|
|
111
|
-
// on that would re-query the bus on every frame.
|
|
112
|
-
const fromMs = from.getTime();
|
|
113
|
-
const toMs = to.getTime();
|
|
114
|
-
const onlyKey = only ? only.join(',') : '';
|
|
115
|
-
useEffect(() => {
|
|
116
|
-
if (!enabled) {
|
|
117
|
-
setStatus('idle');
|
|
118
|
-
return undefined;
|
|
119
|
-
}
|
|
120
|
-
if (!bus) {
|
|
121
|
-
// `useSessionBus` is still connecting, or there is no bus at all. Its
|
|
122
|
-
// own `status` distinguishes them; from here both mean "nothing yet".
|
|
123
|
-
setStatus('unavailable');
|
|
124
|
-
setEvents(NO_EVENTS);
|
|
125
|
-
return undefined;
|
|
126
|
-
}
|
|
127
|
-
let live = true;
|
|
128
|
-
const desktop = new DesktopCalendar(bus);
|
|
129
|
-
const run = async () => {
|
|
130
|
-
setStatus('loading');
|
|
131
|
-
setError(null);
|
|
132
|
-
try {
|
|
133
|
-
const all = await desktop.listCalendars();
|
|
134
|
-
if (!live)
|
|
135
|
-
return;
|
|
136
|
-
setFound(all);
|
|
137
|
-
const result = await desktop.eventsBetween(new Date(fromMs), new Date(toMs), { calendars: pickCalendars(all, onlyKey) });
|
|
138
|
-
if (!live)
|
|
139
|
-
return;
|
|
140
|
-
setEvents(result.events);
|
|
141
|
-
setErrors(result.errors);
|
|
142
|
-
setStatus('ready');
|
|
143
|
-
}
|
|
144
|
-
catch (err) {
|
|
145
|
-
if (!live)
|
|
146
|
-
return;
|
|
147
|
-
// No bus, no ical.js, no EDS on this desktop — all ordinary.
|
|
148
|
-
setError(err instanceof Error ? err : new Error(String(err)));
|
|
149
|
-
setEvents(NO_EVENTS);
|
|
150
|
-
setStatus('unavailable');
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
void run();
|
|
154
|
-
return () => {
|
|
155
|
-
live = false;
|
|
156
|
-
void desktop.dispose();
|
|
157
|
-
};
|
|
158
|
-
// `refresh` is stable; `nonce` is what a manual refresh moves.
|
|
159
|
-
}, [bus, enabled, fromMs, toMs, onlyKey, nonce, refresh]);
|
|
160
|
-
// The subscription is a **separate** effect, and deliberately not keyed on
|
|
161
|
-
// `nonce`: a change has to re-run the query, and only the query. Watching
|
|
162
|
-
// from inside the effect the change re-runs means every notification tears
|
|
163
|
-
// the views down and starts new ones — which is a loop as soon as anything
|
|
164
|
-
// is delivered while a view is starting, and was one for as long as
|
|
165
|
-
// `Start()` reported the range's existing contents as a change.
|
|
166
|
-
//
|
|
167
|
-
// The cost is one extra `listCalendars()` per range, not per refresh.
|
|
168
|
-
useEffect(() => {
|
|
169
|
-
if (!enabled || !watch || !bus)
|
|
170
|
-
return undefined;
|
|
171
|
-
let live = true;
|
|
172
|
-
let stopWatching = null;
|
|
173
|
-
const desktop = new DesktopCalendar(bus);
|
|
174
|
-
void (async () => {
|
|
175
|
-
try {
|
|
176
|
-
const all = await desktop.listCalendars();
|
|
177
|
-
if (!live)
|
|
178
|
-
return;
|
|
179
|
-
stopWatching = await desktop.watch(new Date(fromMs), new Date(toMs), () => {
|
|
180
|
-
// Re-query rather than patch: a recurrence master edited months
|
|
181
|
-
// away changes what this range looks like.
|
|
182
|
-
if (live)
|
|
183
|
-
refresh();
|
|
184
|
-
}, { calendars: pickCalendars(all, onlyKey) });
|
|
185
|
-
if (!live)
|
|
186
|
-
await stopWatching();
|
|
187
|
-
}
|
|
188
|
-
catch {
|
|
189
|
-
// No bus, no EDS, nothing to watch. The query effect above is what
|
|
190
|
-
// reports that to the caller; a second copy of it would only race.
|
|
191
|
-
}
|
|
192
|
-
})();
|
|
193
|
-
return () => {
|
|
194
|
-
live = false;
|
|
195
|
-
void (async () => {
|
|
196
|
-
if (stopWatching)
|
|
197
|
-
await stopWatching();
|
|
198
|
-
await desktop.dispose();
|
|
199
|
-
})();
|
|
200
|
-
};
|
|
201
|
-
}, [bus, enabled, watch, fromMs, toMs, onlyKey, refresh]);
|
|
202
|
-
const grouped = useMemo(() => byDay(events), [events]);
|
|
203
|
-
return {
|
|
204
|
-
events,
|
|
205
|
-
byDay: grouped,
|
|
206
|
-
calendars: found,
|
|
207
|
-
errors,
|
|
208
|
-
status,
|
|
209
|
-
error,
|
|
210
|
-
refresh,
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
//# sourceMappingURL=index.js.map
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