@fedify/interaction-controls 2.4.0-dev.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/mod.d.cts ADDED
@@ -0,0 +1,762 @@
1
+ /// <reference lib="esnext.temporal" />
2
+ import { Accept, Activity, Actor, Announce, AnnounceAuthorization, AnnounceRequest, Article, ChatMessage, Create, Delete, FeatureAuthorization, FeatureRequest, FeaturedCollection, Like, LikeAuthorization, LikeRequest, Note, Object as Object$1, Question, QuoteAuthorization, QuoteRequest, Reject, ReplyAuthorization, ReplyRequest } from "@fedify/vocab";
3
+ import { Context } from "@fedify/fedify";
4
+ import { DocumentLoader } from "@fedify/vocab-runtime";
5
+
6
+ //#region ../../node_modules/.pnpm/temporal-spec@1.0.0/node_modules/temporal-spec/index.d.ts
7
+ /*
8
+ This file was derived from the TypeScript project.
9
+ Original source: https://github.com/microsoft/TypeScript/blob/main/src/lib/esnext.intl.d.ts
10
+ Copyright (c) Microsoft Corporation. Licensed under the Apache License 2.0.
11
+ */
12
+ /// <reference lib="es2015.symbol.wellknown" />
13
+ /// <reference lib="es2020.intl" />
14
+ /// <reference lib="es2021.intl" />
15
+ declare namespace Temporal {
16
+ type CalendarLike = PlainDate | PlainDateTime | PlainMonthDay | PlainYearMonth | ZonedDateTime | string;
17
+ type DurationLike = Duration | DurationLikeObject | string;
18
+ type InstantLike = Instant | ZonedDateTime | string;
19
+ type PlainDateLike = PlainDate | ZonedDateTime | PlainDateTime | DateLikeObject | string;
20
+ type PlainDateTimeLike = PlainDateTime | ZonedDateTime | PlainDate | DateTimeLikeObject | string;
21
+ type PlainMonthDayLike = PlainMonthDay | DateLikeObject | string;
22
+ type PlainTimeLike = PlainTime | PlainDateTime | ZonedDateTime | TimeLikeObject | string;
23
+ type PlainYearMonthLike = PlainYearMonth | YearMonthLikeObject | string;
24
+ type TimeZoneLike = ZonedDateTime | string;
25
+ type ZonedDateTimeLike = ZonedDateTime | ZonedDateTimeLikeObject | string;
26
+ type PartialTemporalLike<T extends object> = { [P in Exclude<keyof T, 'calendar' | 'timeZone'>]?: T[P] | undefined };
27
+ interface DateLikeObject {
28
+ year?: number | undefined;
29
+ era?: string | undefined;
30
+ eraYear?: number | undefined;
31
+ month?: number | undefined;
32
+ monthCode?: string | undefined;
33
+ day: number;
34
+ calendar?: string | undefined;
35
+ }
36
+ interface DateTimeLikeObject extends DateLikeObject, TimeLikeObject {}
37
+ interface DurationLikeObject {
38
+ years?: number | undefined;
39
+ months?: number | undefined;
40
+ weeks?: number | undefined;
41
+ days?: number | undefined;
42
+ hours?: number | undefined;
43
+ minutes?: number | undefined;
44
+ seconds?: number | undefined;
45
+ milliseconds?: number | undefined;
46
+ microseconds?: number | undefined;
47
+ nanoseconds?: number | undefined;
48
+ }
49
+ interface TimeLikeObject {
50
+ hour?: number | undefined;
51
+ minute?: number | undefined;
52
+ second?: number | undefined;
53
+ millisecond?: number | undefined;
54
+ microsecond?: number | undefined;
55
+ nanosecond?: number | undefined;
56
+ }
57
+ interface YearMonthLikeObject extends Omit<DateLikeObject, 'day'> {}
58
+ interface ZonedDateTimeLikeObject extends DateTimeLikeObject {
59
+ timeZone: TimeZoneLike;
60
+ offset?: string | undefined;
61
+ }
62
+ type DateUnit = 'year' | 'month' | 'week' | 'day';
63
+ type TimeUnit = 'hour' | 'minute' | 'second' | 'millisecond' | 'microsecond' | 'nanosecond';
64
+ type PluralizeUnit<T extends DateUnit | TimeUnit> = T | {
65
+ year: 'years';
66
+ month: 'months';
67
+ week: 'weeks';
68
+ day: 'days';
69
+ hour: 'hours';
70
+ minute: 'minutes';
71
+ second: 'seconds';
72
+ millisecond: 'milliseconds';
73
+ microsecond: 'microseconds';
74
+ nanosecond: 'nanoseconds';
75
+ }[T];
76
+ interface DisambiguationOptions {
77
+ disambiguation?: 'compatible' | 'earlier' | 'later' | 'reject' | undefined;
78
+ }
79
+ interface OverflowOptions {
80
+ overflow?: 'constrain' | 'reject' | undefined;
81
+ }
82
+ interface TransitionOptions {
83
+ direction: 'next' | 'previous';
84
+ }
85
+ interface RoundingOptions<Units extends DateUnit | TimeUnit> {
86
+ smallestUnit?: PluralizeUnit<Units> | undefined;
87
+ roundingIncrement?: number | undefined;
88
+ roundingMode?: 'ceil' | 'floor' | 'expand' | 'trunc' | 'halfCeil' | 'halfFloor' | 'halfExpand' | 'halfTrunc' | 'halfEven' | undefined;
89
+ }
90
+ interface RoundingOptionsWithLargestUnit<Units extends DateUnit | TimeUnit> extends RoundingOptions<Units> {
91
+ largestUnit?: 'auto' | PluralizeUnit<Units> | undefined;
92
+ }
93
+ interface ToStringRoundingOptions<Units extends DateUnit | TimeUnit> extends Pick<RoundingOptions<Units>, 'smallestUnit' | 'roundingMode'> {}
94
+ interface ToStringRoundingOptionsWithFractionalSeconds<Units extends DateUnit | TimeUnit> extends ToStringRoundingOptions<Units> {
95
+ fractionalSecondDigits?: 'auto' | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined;
96
+ }
97
+ namespace Now {
98
+ function timeZoneId(): string;
99
+ function instant(): Instant;
100
+ function plainDateTimeISO(timeZone?: TimeZoneLike): PlainDateTime;
101
+ function zonedDateTimeISO(timeZone?: TimeZoneLike): ZonedDateTime;
102
+ function plainDateISO(timeZone?: TimeZoneLike): PlainDate;
103
+ function plainTimeISO(timeZone?: TimeZoneLike): PlainTime;
104
+ }
105
+ interface PlainDateToStringOptions {
106
+ calendarName?: 'auto' | 'always' | 'never' | 'critical' | undefined;
107
+ }
108
+ interface PlainDateToZonedDateTimeOptions {
109
+ plainTime?: PlainTimeLike | undefined;
110
+ timeZone: TimeZoneLike;
111
+ }
112
+ interface PlainDate {
113
+ readonly calendarId: string;
114
+ readonly era: string | undefined;
115
+ readonly eraYear: number | undefined;
116
+ readonly year: number;
117
+ readonly month: number;
118
+ readonly monthCode: string;
119
+ readonly day: number;
120
+ readonly dayOfWeek: number;
121
+ readonly dayOfYear: number;
122
+ readonly weekOfYear: number | undefined;
123
+ readonly yearOfWeek: number | undefined;
124
+ readonly daysInWeek: number;
125
+ readonly daysInMonth: number;
126
+ readonly daysInYear: number;
127
+ readonly monthsInYear: number;
128
+ readonly inLeapYear: boolean;
129
+ toPlainYearMonth(): PlainYearMonth;
130
+ toPlainMonthDay(): PlainMonthDay;
131
+ add(duration: DurationLike, options?: OverflowOptions): PlainDate;
132
+ subtract(duration: DurationLike, options?: OverflowOptions): PlainDate;
133
+ with(dateLike: PartialTemporalLike<DateLikeObject>, options?: OverflowOptions): PlainDate;
134
+ withCalendar(calendarLike: CalendarLike): PlainDate;
135
+ until(other: PlainDateLike, options?: RoundingOptionsWithLargestUnit<DateUnit>): Duration;
136
+ since(other: PlainDateLike, options?: RoundingOptionsWithLargestUnit<DateUnit>): Duration;
137
+ equals(other: PlainDateLike): boolean;
138
+ toPlainDateTime(time?: PlainTimeLike): PlainDateTime;
139
+ toZonedDateTime(timeZone: TimeZoneLike): ZonedDateTime;
140
+ toZonedDateTime(item: PlainDateToZonedDateTimeOptions): ZonedDateTime;
141
+ toString(options?: PlainDateToStringOptions): string;
142
+ toLocaleString(locales?: globalThis.Intl.LocalesArgument, options?: globalThis.Intl.DateTimeFormatOptions): string;
143
+ toJSON(): string;
144
+ valueOf(): never;
145
+ readonly [Symbol.toStringTag]: 'Temporal.PlainDate';
146
+ }
147
+ interface PlainDateConstructor {
148
+ new (isoYear: number, isoMonth: number, isoDay: number, calendar?: string): PlainDate;
149
+ readonly prototype: PlainDate;
150
+ from(item: PlainDateLike, options?: OverflowOptions): PlainDate;
151
+ compare(one: PlainDateLike, two: PlainDateLike): number;
152
+ }
153
+ var PlainDate: PlainDateConstructor;
154
+ interface PlainTimeToStringOptions extends ToStringRoundingOptionsWithFractionalSeconds<Exclude<TimeUnit, 'hour'>> {}
155
+ interface PlainTime {
156
+ readonly hour: number;
157
+ readonly minute: number;
158
+ readonly second: number;
159
+ readonly millisecond: number;
160
+ readonly microsecond: number;
161
+ readonly nanosecond: number;
162
+ add(duration: DurationLike): PlainTime;
163
+ subtract(duration: DurationLike): PlainTime;
164
+ with(timeLike: PartialTemporalLike<TimeLikeObject>, options?: OverflowOptions): PlainTime;
165
+ until(other: PlainTimeLike, options?: RoundingOptionsWithLargestUnit<TimeUnit>): Duration;
166
+ since(other: PlainTimeLike, options?: RoundingOptionsWithLargestUnit<TimeUnit>): Duration;
167
+ equals(other: PlainTimeLike): boolean;
168
+ round(roundTo: PluralizeUnit<TimeUnit>): PlainTime;
169
+ round(roundTo: RoundingOptions<TimeUnit>): PlainTime;
170
+ toString(options?: PlainTimeToStringOptions): string;
171
+ toLocaleString(locales?: globalThis.Intl.LocalesArgument, options?: globalThis.Intl.DateTimeFormatOptions): string;
172
+ toJSON(): string;
173
+ valueOf(): never;
174
+ readonly [Symbol.toStringTag]: 'Temporal.PlainTime';
175
+ }
176
+ interface PlainTimeConstructor {
177
+ new (hour?: number, minute?: number, second?: number, millisecond?: number, microsecond?: number, nanosecond?: number): PlainTime;
178
+ readonly prototype: PlainTime;
179
+ from(item: PlainTimeLike, options?: OverflowOptions): PlainTime;
180
+ compare(one: PlainTimeLike, two: PlainTimeLike): number;
181
+ }
182
+ var PlainTime: PlainTimeConstructor;
183
+ interface PlainDateTimeToStringOptions extends PlainDateToStringOptions, PlainTimeToStringOptions {}
184
+ interface PlainDateTime {
185
+ readonly calendarId: string;
186
+ readonly era: string | undefined;
187
+ readonly eraYear: number | undefined;
188
+ readonly year: number;
189
+ readonly month: number;
190
+ readonly monthCode: string;
191
+ readonly day: number;
192
+ readonly hour: number;
193
+ readonly minute: number;
194
+ readonly second: number;
195
+ readonly millisecond: number;
196
+ readonly microsecond: number;
197
+ readonly nanosecond: number;
198
+ readonly dayOfWeek: number;
199
+ readonly dayOfYear: number;
200
+ readonly weekOfYear: number | undefined;
201
+ readonly yearOfWeek: number | undefined;
202
+ readonly daysInWeek: number;
203
+ readonly daysInMonth: number;
204
+ readonly daysInYear: number;
205
+ readonly monthsInYear: number;
206
+ readonly inLeapYear: boolean;
207
+ with(dateTimeLike: PartialTemporalLike<DateTimeLikeObject>, options?: OverflowOptions): PlainDateTime;
208
+ withPlainTime(plainTime?: PlainTimeLike): PlainDateTime;
209
+ withCalendar(calendar: CalendarLike): PlainDateTime;
210
+ add(duration: DurationLike, options?: OverflowOptions): PlainDateTime;
211
+ subtract(duration: DurationLike, options?: OverflowOptions): PlainDateTime;
212
+ until(other: PlainDateTimeLike, options?: RoundingOptionsWithLargestUnit<DateUnit | TimeUnit>): Duration;
213
+ since(other: PlainDateTimeLike, options?: RoundingOptionsWithLargestUnit<DateUnit | TimeUnit>): Duration;
214
+ round(roundTo: PluralizeUnit<'day' | TimeUnit>): PlainDateTime;
215
+ round(roundTo: RoundingOptions<'day' | TimeUnit>): PlainDateTime;
216
+ equals(other: PlainDateTimeLike): boolean;
217
+ toString(options?: PlainDateTimeToStringOptions): string;
218
+ toLocaleString(locales?: globalThis.Intl.LocalesArgument, options?: globalThis.Intl.DateTimeFormatOptions): string;
219
+ toJSON(): string;
220
+ valueOf(): never;
221
+ toZonedDateTime(timeZone: TimeZoneLike, options?: DisambiguationOptions): ZonedDateTime;
222
+ toPlainDate(): PlainDate;
223
+ toPlainTime(): PlainTime;
224
+ readonly [Symbol.toStringTag]: 'Temporal.PlainDateTime';
225
+ }
226
+ interface PlainDateTimeConstructor {
227
+ new (isoYear: number, isoMonth: number, isoDay: number, hour?: number, minute?: number, second?: number, millisecond?: number, microsecond?: number, nanosecond?: number, calendar?: string): PlainDateTime;
228
+ readonly prototype: PlainDateTime;
229
+ from(item: PlainDateTimeLike, options?: OverflowOptions): PlainDateTime;
230
+ compare(one: PlainDateTimeLike, two: PlainDateTimeLike): number;
231
+ }
232
+ var PlainDateTime: PlainDateTimeConstructor;
233
+ interface ZonedDateTimeToStringOptions extends PlainDateTimeToStringOptions {
234
+ offset?: 'auto' | 'never' | undefined;
235
+ timeZoneName?: 'auto' | 'never' | 'critical' | undefined;
236
+ }
237
+ interface ZonedDateTimeFromOptions extends OverflowOptions, DisambiguationOptions {
238
+ offset?: 'use' | 'ignore' | 'prefer' | 'reject' | undefined;
239
+ }
240
+ interface ZonedDateTime {
241
+ readonly calendarId: string;
242
+ readonly timeZoneId: string;
243
+ readonly era: string | undefined;
244
+ readonly eraYear: number | undefined;
245
+ readonly year: number;
246
+ readonly month: number;
247
+ readonly monthCode: string;
248
+ readonly day: number;
249
+ readonly hour: number;
250
+ readonly minute: number;
251
+ readonly second: number;
252
+ readonly millisecond: number;
253
+ readonly microsecond: number;
254
+ readonly nanosecond: number;
255
+ readonly epochMilliseconds: number;
256
+ readonly epochNanoseconds: bigint;
257
+ readonly dayOfWeek: number;
258
+ readonly dayOfYear: number;
259
+ readonly weekOfYear: number | undefined;
260
+ readonly yearOfWeek: number | undefined;
261
+ readonly hoursInDay: number;
262
+ readonly daysInWeek: number;
263
+ readonly daysInMonth: number;
264
+ readonly daysInYear: number;
265
+ readonly monthsInYear: number;
266
+ readonly inLeapYear: boolean;
267
+ readonly offsetNanoseconds: number;
268
+ readonly offset: string;
269
+ with(zonedDateTimeLike: PartialTemporalLike<ZonedDateTimeLikeObject>, options?: ZonedDateTimeFromOptions): ZonedDateTime;
270
+ withPlainTime(plainTime?: PlainTimeLike): ZonedDateTime;
271
+ withTimeZone(timeZone: TimeZoneLike): ZonedDateTime;
272
+ withCalendar(calendar: CalendarLike): ZonedDateTime;
273
+ add(duration: DurationLike, options?: OverflowOptions): ZonedDateTime;
274
+ subtract(duration: DurationLike, options?: OverflowOptions): ZonedDateTime;
275
+ until(other: ZonedDateTimeLike, options?: RoundingOptionsWithLargestUnit<DateUnit | TimeUnit>): Duration;
276
+ since(other: ZonedDateTimeLike, options?: RoundingOptionsWithLargestUnit<DateUnit | TimeUnit>): Duration;
277
+ round(roundTo: PluralizeUnit<'day' | TimeUnit>): ZonedDateTime;
278
+ round(roundTo: RoundingOptions<'day' | TimeUnit>): ZonedDateTime;
279
+ equals(other: ZonedDateTimeLike): boolean;
280
+ toString(options?: ZonedDateTimeToStringOptions): string;
281
+ toLocaleString(locales?: globalThis.Intl.LocalesArgument, options?: globalThis.Intl.DateTimeFormatOptions): string;
282
+ toJSON(): string;
283
+ valueOf(): never;
284
+ startOfDay(): ZonedDateTime;
285
+ getTimeZoneTransition(direction: 'next' | 'previous'): ZonedDateTime | null;
286
+ getTimeZoneTransition(direction: TransitionOptions): ZonedDateTime | null;
287
+ toInstant(): Instant;
288
+ toPlainDate(): PlainDate;
289
+ toPlainTime(): PlainTime;
290
+ toPlainDateTime(): PlainDateTime;
291
+ readonly [Symbol.toStringTag]: 'Temporal.ZonedDateTime';
292
+ }
293
+ interface ZonedDateTimeConstructor {
294
+ new (epochNanoseconds: bigint, timeZone: string, calendar?: string): ZonedDateTime;
295
+ readonly prototype: ZonedDateTime;
296
+ from(item: ZonedDateTimeLike, options?: ZonedDateTimeFromOptions): ZonedDateTime;
297
+ compare(one: ZonedDateTimeLike, two: ZonedDateTimeLike): number;
298
+ }
299
+ var ZonedDateTime: ZonedDateTimeConstructor;
300
+ interface DurationRelativeToOptions {
301
+ relativeTo?: ZonedDateTimeLike | PlainDateLike | undefined;
302
+ }
303
+ interface DurationRoundingOptions extends DurationRelativeToOptions, RoundingOptionsWithLargestUnit<DateUnit | TimeUnit> {}
304
+ interface DurationToStringOptions extends ToStringRoundingOptionsWithFractionalSeconds<Exclude<TimeUnit, 'hour' | 'minute'>> {}
305
+ interface DurationTotalOptions extends DurationRelativeToOptions {
306
+ unit: PluralizeUnit<DateUnit | TimeUnit>;
307
+ } // Use the host's Intl.DurationFormat options when the consumer includes a
308
+ // lib that declares Intl.DurationFormat, without forcing this file to
309
+ // reference es2025.intl for every consumer.
310
+ type DurationFormatOptions = typeof Intl extends {
311
+ DurationFormat: {
312
+ new (locales?: unknown, options?: infer Options): unknown;
313
+ };
314
+ } ? NonNullable<Options> : unknown;
315
+ interface Duration {
316
+ readonly years: number;
317
+ readonly months: number;
318
+ readonly weeks: number;
319
+ readonly days: number;
320
+ readonly hours: number;
321
+ readonly minutes: number;
322
+ readonly seconds: number;
323
+ readonly milliseconds: number;
324
+ readonly microseconds: number;
325
+ readonly nanoseconds: number;
326
+ readonly sign: number;
327
+ readonly blank: boolean;
328
+ with(durationLike: PartialTemporalLike<DurationLikeObject>): Duration;
329
+ negated(): Duration;
330
+ abs(): Duration;
331
+ add(other: DurationLike): Duration;
332
+ subtract(other: DurationLike): Duration;
333
+ round(roundTo: PluralizeUnit<'day' | TimeUnit>): Duration;
334
+ round(roundTo: DurationRoundingOptions): Duration;
335
+ total(totalOf: PluralizeUnit<DateUnit | TimeUnit>): number;
336
+ total(totalOf: DurationTotalOptions): number;
337
+ toString(options?: DurationToStringOptions): string;
338
+ toLocaleString(locales?: globalThis.Intl.LocalesArgument, options?: DurationFormatOptions): string;
339
+ toJSON(): string;
340
+ valueOf(): never;
341
+ readonly [Symbol.toStringTag]: 'Temporal.Duration';
342
+ }
343
+ interface DurationConstructor {
344
+ new (years?: number, months?: number, weeks?: number, days?: number, hours?: number, minutes?: number, seconds?: number, milliseconds?: number, microseconds?: number, nanoseconds?: number): Duration;
345
+ readonly prototype: Duration;
346
+ from(item: DurationLike): Duration;
347
+ compare(one: DurationLike, two: DurationLike, options?: DurationRelativeToOptions): number;
348
+ }
349
+ var Duration: DurationConstructor;
350
+ interface InstantToStringOptions extends PlainTimeToStringOptions {
351
+ timeZone?: TimeZoneLike | undefined;
352
+ }
353
+ interface Instant {
354
+ readonly epochMilliseconds: number;
355
+ readonly epochNanoseconds: bigint;
356
+ add(duration: DurationLike): Instant;
357
+ subtract(duration: DurationLike): Instant;
358
+ until(other: InstantLike, options?: RoundingOptionsWithLargestUnit<TimeUnit>): Duration;
359
+ since(other: InstantLike, options?: RoundingOptionsWithLargestUnit<TimeUnit>): Duration;
360
+ round(roundTo: PluralizeUnit<TimeUnit>): Instant;
361
+ round(roundTo: RoundingOptions<TimeUnit>): Instant;
362
+ equals(other: InstantLike): boolean;
363
+ toString(options?: InstantToStringOptions): string;
364
+ toLocaleString(locales?: globalThis.Intl.LocalesArgument, options?: globalThis.Intl.DateTimeFormatOptions): string;
365
+ toJSON(): string;
366
+ valueOf(): never;
367
+ toZonedDateTimeISO(timeZone: TimeZoneLike): ZonedDateTime;
368
+ readonly [Symbol.toStringTag]: 'Temporal.Instant';
369
+ }
370
+ interface InstantConstructor {
371
+ new (epochNanoseconds: bigint): Instant;
372
+ readonly prototype: Instant;
373
+ from(item: InstantLike): Instant;
374
+ fromEpochMilliseconds(epochMilliseconds: number): Instant;
375
+ fromEpochNanoseconds(epochNanoseconds: bigint): Instant;
376
+ compare(one: InstantLike, two: InstantLike): number;
377
+ }
378
+ var Instant: InstantConstructor;
379
+ interface PlainYearMonthToPlainDateOptions {
380
+ day: number;
381
+ }
382
+ interface PlainYearMonth {
383
+ readonly calendarId: string;
384
+ readonly era: string | undefined;
385
+ readonly eraYear: number | undefined;
386
+ readonly year: number;
387
+ readonly month: number;
388
+ readonly monthCode: string;
389
+ readonly daysInYear: number;
390
+ readonly daysInMonth: number;
391
+ readonly monthsInYear: number;
392
+ readonly inLeapYear: boolean;
393
+ with(yearMonthLike: PartialTemporalLike<YearMonthLikeObject>, options?: OverflowOptions): PlainYearMonth;
394
+ add(duration: DurationLike, options?: OverflowOptions): PlainYearMonth;
395
+ subtract(duration: DurationLike, options?: OverflowOptions): PlainYearMonth;
396
+ until(other: PlainYearMonthLike, options?: RoundingOptionsWithLargestUnit<'year' | 'month'>): Duration;
397
+ since(other: PlainYearMonthLike, options?: RoundingOptionsWithLargestUnit<'year' | 'month'>): Duration;
398
+ equals(other: PlainYearMonthLike): boolean;
399
+ toString(options?: PlainDateToStringOptions): string;
400
+ toLocaleString(locales?: globalThis.Intl.LocalesArgument, options?: globalThis.Intl.DateTimeFormatOptions): string;
401
+ toJSON(): string;
402
+ valueOf(): never;
403
+ toPlainDate(item: PlainYearMonthToPlainDateOptions): PlainDate;
404
+ readonly [Symbol.toStringTag]: 'Temporal.PlainYearMonth';
405
+ }
406
+ interface PlainYearMonthConstructor {
407
+ new (isoYear: number, isoMonth: number, calendar?: string, referenceISODay?: number): PlainYearMonth;
408
+ readonly prototype: PlainYearMonth;
409
+ from(item: PlainYearMonthLike, options?: OverflowOptions): PlainYearMonth;
410
+ compare(one: PlainYearMonthLike, two: PlainYearMonthLike): number;
411
+ }
412
+ var PlainYearMonth: PlainYearMonthConstructor;
413
+ interface PlainMonthDayToPlainDateOptions {
414
+ era?: string | undefined;
415
+ eraYear?: number | undefined;
416
+ year?: number | undefined;
417
+ }
418
+ interface PlainMonthDay {
419
+ readonly calendarId: string;
420
+ readonly monthCode: string;
421
+ readonly day: number;
422
+ with(monthDayLike: PartialTemporalLike<DateLikeObject>, options?: OverflowOptions): PlainMonthDay;
423
+ equals(other: PlainMonthDayLike): boolean;
424
+ toString(options?: PlainDateToStringOptions): string;
425
+ toLocaleString(locales?: globalThis.Intl.LocalesArgument, options?: globalThis.Intl.DateTimeFormatOptions): string;
426
+ toJSON(): string;
427
+ valueOf(): never;
428
+ toPlainDate(item: PlainMonthDayToPlainDateOptions): PlainDate;
429
+ readonly [Symbol.toStringTag]: 'Temporal.PlainMonthDay';
430
+ }
431
+ interface PlainMonthDayConstructor {
432
+ new (isoMonth: number, isoDay: number, calendar?: string, referenceISOYear?: number): PlainMonthDay;
433
+ readonly prototype: PlainMonthDay;
434
+ from(item: PlainMonthDayLike, options?: OverflowOptions): PlainMonthDay;
435
+ }
436
+ var PlainMonthDay: PlainMonthDayConstructor;
437
+ }
438
+ declare namespace Intl {
439
+ type FormattableTemporalObject = Temporal.PlainDate | Temporal.PlainYearMonth | Temporal.PlainMonthDay | Temporal.PlainTime | Temporal.PlainDateTime | Temporal.Instant;
440
+ interface DateTimeFormat extends Omit<globalThis.Intl.DateTimeFormat, 'format' | 'formatToParts' | 'formatRange' | 'formatRangeToParts'> {
441
+ format(date?: FormattableTemporalObject | Date | number): string;
442
+ formatToParts(date?: FormattableTemporalObject | Date | number): globalThis.Intl.DateTimeFormatPart[];
443
+ formatRange(startDate: FormattableTemporalObject | Date | number, endDate: FormattableTemporalObject | Date | number): string;
444
+ formatRangeToParts(startDate: FormattableTemporalObject | Date | number, endDate: FormattableTemporalObject | Date | number): globalThis.Intl.DateTimeRangeFormatPart[];
445
+ }
446
+ }
447
+ //#endregion
448
+ //#region src/types.d.ts
449
+ type InteractionName = "like" | "reply" | "announce" | "quote" | "feature";
450
+ type InteractionPolicyProperty = "canLike" | "canReply" | "canAnnounce" | "canQuote" | "canFeature";
451
+ interface InteractionControl<TRequest extends Activity, TAuthorization extends Object$1, TInteracting extends Object$1, TTarget extends Object$1, TImpoliteSource extends Object$1> {
452
+ readonly name: InteractionName;
453
+ readonly policyProperty: InteractionPolicyProperty;
454
+ readonly requestTypeId: URL;
455
+ readonly authorizationTypeId: URL;
456
+ readonly verifyRequest: <TContextData>(context: Context<TContextData>, options: InteractionRequestVerificationOptions<TRequest>) => Promise<InteractionRequestVerification<TRequest, TInteracting, TTarget>>;
457
+ readonly evaluatePolicy: <TContextData>(context: Context<TContextData>, options: InteractionPolicyEvaluationOptions<TContextData, TTarget>) => Promise<InteractionPolicyDecision>;
458
+ readonly createRequest: (options: InteractionRequestCreationOptions<TInteracting, TTarget>) => TRequest;
459
+ readonly createAuthorization: (options: InteractionAuthorizationCreationOptions<TInteracting, TTarget>) => TAuthorization;
460
+ readonly verifyAuthorization: <TContextData>(context: Context<TContextData>, options: InteractionAuthorizationVerificationOptions<TContextData, TAuthorization, TInteracting, TTarget>) => Promise<InteractionAuthorizationVerification<TAuthorization>>;
461
+ readonly createAccept: (options: InteractionAcceptOptions<TRequest, TAuthorization, TInteracting, TTarget>) => Accept;
462
+ readonly createReject: (options: InteractionRejectOptions<TRequest, TInteracting, TTarget>) => Reject;
463
+ readonly createRevocation: (options: InteractionRevocationCreationOptions<TAuthorization>) => Delete;
464
+ readonly recognizeImpolite: (source: TImpoliteSource) => RecognizedImpoliteInteraction<TInteracting, TTarget, TImpoliteSource> | null;
465
+ readonly getInteractionKey: (input: InteractionKeyInput<TInteracting, TTarget>) => InteractionKey;
466
+ readonly getAuthorizationKey: (input: InteractionAuthorizationKeyInput<TAuthorization>) => InteractionAuthorizationKey;
467
+ }
468
+ interface InteractionRequestVerificationOptions<TRequest extends Activity> {
469
+ readonly request: TRequest | URL;
470
+ readonly documentLoader?: DocumentLoader;
471
+ }
472
+ type InteractionRequestVerification<TRequest extends Activity, TInteracting extends Object$1, TTarget extends Object$1> = {
473
+ readonly verified: true;
474
+ readonly request: TRequest;
475
+ readonly requestId: URL;
476
+ readonly requester: URL;
477
+ readonly interactingObject: TInteracting;
478
+ readonly interactingObjectId: URL;
479
+ readonly interactionTarget: TTarget;
480
+ readonly interactionTargetId: URL;
481
+ } | {
482
+ readonly verified: false;
483
+ readonly failure: InteractionRequestVerificationFailure;
484
+ readonly request?: TRequest;
485
+ readonly requestId?: URL;
486
+ };
487
+ type InteractionRequestVerificationFailure = {
488
+ readonly category: "unverifiable";
489
+ readonly type: "notDereferenceable";
490
+ readonly url: URL;
491
+ readonly cause?: unknown;
492
+ } | {
493
+ readonly category: "unverifiable";
494
+ readonly type: "unauthorizedFetchRequired";
495
+ readonly url: URL;
496
+ } | {
497
+ readonly category: "unverifiable";
498
+ readonly type: "invalidJsonLd";
499
+ readonly cause?: unknown;
500
+ } | {
501
+ readonly category: "invalid";
502
+ readonly type: "wrongType";
503
+ readonly expectedType: URL;
504
+ readonly actualTypes: readonly URL[];
505
+ } | {
506
+ readonly category: "invalid";
507
+ readonly type: "wrongInstrumentType";
508
+ readonly expectedTypes: readonly URL[];
509
+ readonly actualTypes: readonly URL[];
510
+ } | {
511
+ readonly category: "invalid";
512
+ readonly type: "wrongObjectType";
513
+ readonly expectedTypes: readonly URL[];
514
+ readonly actualTypes: readonly URL[];
515
+ } | {
516
+ readonly category: "invalid";
517
+ readonly type: "missingId" | "missingActor" | "missingObject" | "missingObjectId" | "missingInstrument" | "missingInstrumentId";
518
+ } | {
519
+ readonly category: "invalid";
520
+ readonly type: "idMismatch" | "objectMismatch" | "instrumentMismatch";
521
+ readonly expected: URL;
522
+ readonly actual?: URL;
523
+ } | {
524
+ readonly category: "unauthorized";
525
+ readonly type: "requesterMismatch";
526
+ readonly expected: URL;
527
+ readonly actual?: URL;
528
+ };
529
+ interface InteractionPolicyEvaluationOptions<TContextData, TTarget extends Object$1> {
530
+ readonly subject: TTarget;
531
+ readonly requester: URL;
532
+ readonly documentLoader?: DocumentLoader;
533
+ readonly matchesApprovalCollection?: MatchesApprovalCollection<TContextData>;
534
+ }
535
+ type MatchesApprovalCollection<TContextData> = (collection: URL, actor: URL, context: Context<TContextData>) => boolean | Promise<boolean>;
536
+ type InteractionPolicyDecision = {
537
+ readonly result: "automatic";
538
+ readonly reason: InteractionPolicyMatchReason;
539
+ } | {
540
+ readonly result: "manual";
541
+ readonly reason: InteractionPolicyMatchReason;
542
+ } | {
543
+ readonly result: "denied";
544
+ readonly reason: InteractionPolicyDenialReason;
545
+ };
546
+ type InteractionPolicyMatchReason = {
547
+ readonly type: "self";
548
+ } | {
549
+ readonly type: "default";
550
+ readonly default: "publicAutomatic";
551
+ } | {
552
+ readonly type: "public";
553
+ } | {
554
+ readonly type: "actor";
555
+ readonly actor: URL;
556
+ } | {
557
+ readonly type: "collection";
558
+ readonly collection: URL;
559
+ };
560
+ type InteractionPolicyDenialReason = {
561
+ readonly type: "missingPolicy";
562
+ } | {
563
+ readonly type: "missingRule";
564
+ } | {
565
+ readonly type: "noMatch";
566
+ } | {
567
+ readonly type: "unverifiableCollection";
568
+ readonly collection: URL;
569
+ };
570
+ interface InteractionRequestCreationOptions<TInteracting extends Object$1, TTarget extends Object$1> {
571
+ readonly id: URL;
572
+ readonly actor: URL;
573
+ readonly object: TTarget | URL;
574
+ readonly instrument: TInteracting | URL;
575
+ readonly to?: URL | readonly URL[];
576
+ readonly cc?: URL | readonly URL[];
577
+ }
578
+ interface InteractionAuthorizationCreationOptions<TInteracting extends Object$1, TTarget extends Object$1> {
579
+ readonly id: URL;
580
+ readonly attributedTo?: URL;
581
+ readonly interactingObject: TInteracting | URL;
582
+ readonly interactionTarget: TTarget | URL;
583
+ }
584
+ interface InteractionAuthorizationVerificationOptions<TContextData, TAuthorization extends Object$1, TInteracting extends Object$1, TTarget extends Object$1> {
585
+ readonly authorization: TAuthorization | URL;
586
+ readonly interactingObject: TInteracting | URL;
587
+ readonly interactionTarget: TTarget | URL;
588
+ readonly attributedTo?: URL;
589
+ readonly documentLoader?: DocumentLoader;
590
+ readonly getRevocation?: GetInteractionAuthorizationRevocation<TContextData>;
591
+ readonly verifyAuthenticity?: (authorization: TAuthorization, context: Context<TContextData>) => boolean | Promise<boolean>;
592
+ }
593
+ type InteractionAuthorizationVerification<TAuthorization extends Object$1> = {
594
+ readonly verified: true;
595
+ readonly authorization: TAuthorization;
596
+ readonly authorizationId: URL;
597
+ } | {
598
+ readonly verified: false;
599
+ readonly failure: InteractionAuthorizationVerificationFailure;
600
+ readonly authorization?: TAuthorization;
601
+ readonly authorizationId?: URL;
602
+ };
603
+ type InteractionAuthorizationVerificationFailure = {
604
+ readonly category: "unverifiable";
605
+ readonly type: "notDereferenceable";
606
+ readonly url: URL;
607
+ readonly cause?: unknown;
608
+ } | {
609
+ readonly category: "unverifiable";
610
+ readonly type: "unauthorizedFetchRequired";
611
+ readonly url: URL;
612
+ } | {
613
+ readonly category: "unverifiable";
614
+ readonly type: "invalidJsonLd";
615
+ readonly cause?: unknown;
616
+ } | {
617
+ readonly category: "unauthorized";
618
+ readonly type: "wrongType";
619
+ readonly expectedType: URL;
620
+ readonly actualTypes: readonly URL[];
621
+ } | {
622
+ readonly category: "unauthorized";
623
+ readonly type: "missingId" | "missingObjectId" | "missingTargetId";
624
+ } | {
625
+ readonly category: "unauthorized";
626
+ readonly type: "missingAttribution";
627
+ } | {
628
+ readonly category: "unauthorized";
629
+ readonly type: "idMismatch" | "objectMismatch" | "targetMismatch";
630
+ readonly expected: URL;
631
+ readonly actual?: URL;
632
+ } | {
633
+ readonly category: "unauthorized";
634
+ readonly type: "attributionMismatch";
635
+ readonly expected: URL;
636
+ readonly actual?: URL;
637
+ } | {
638
+ readonly category: "unauthorized";
639
+ readonly type: "originMismatch";
640
+ readonly expectedOrigin: string;
641
+ readonly actualOrigin: string;
642
+ } | {
643
+ readonly category: "unauthorized";
644
+ readonly type: "notAuthentic";
645
+ readonly detail?: string;
646
+ readonly cause?: unknown;
647
+ } | {
648
+ readonly category: "revoked";
649
+ readonly type: "deleted";
650
+ readonly revoker?: URL;
651
+ readonly revoked?: Temporal.Instant;
652
+ readonly activity?: Delete;
653
+ };
654
+ type GetInteractionAuthorizationRevocation<TContextData> = (authorizationId: URL, context: Context<TContextData>) => InteractionAuthorizationRevocation | null | Promise<InteractionAuthorizationRevocation | null>;
655
+ interface InteractionAuthorizationRevocation {
656
+ readonly revoker?: URL;
657
+ readonly revoked?: Temporal.Instant;
658
+ readonly activity?: Delete;
659
+ }
660
+ type InteractionAcceptOptions<TRequest extends Activity, TAuthorization extends Object$1, TInteracting extends Object$1, TTarget extends Object$1> = {
661
+ readonly mode: "polite";
662
+ readonly id: URL;
663
+ readonly actor: URL;
664
+ readonly request: TRequest | URL;
665
+ readonly authorization: TAuthorization | URL;
666
+ readonly to: URL | readonly URL[];
667
+ readonly cc?: URL | readonly URL[];
668
+ } | {
669
+ readonly mode: "impolite";
670
+ readonly id: URL;
671
+ readonly actor: URL;
672
+ readonly interactingObject: TInteracting | URL;
673
+ readonly interactionTarget: TTarget | URL;
674
+ readonly authorization: TAuthorization | URL;
675
+ readonly to: URL | readonly URL[];
676
+ readonly cc?: URL | readonly URL[];
677
+ };
678
+ type InteractionRejectOptions<TRequest extends Activity, TInteracting extends Object$1, TTarget extends Object$1> = {
679
+ readonly mode: "polite";
680
+ readonly id: URL;
681
+ readonly actor: URL;
682
+ readonly request: TRequest | URL;
683
+ readonly to: URL | readonly URL[];
684
+ readonly cc?: URL | readonly URL[];
685
+ } | {
686
+ readonly mode: "impolite";
687
+ readonly id: URL;
688
+ readonly actor: URL;
689
+ readonly interactingObject: TInteracting | URL;
690
+ readonly interactionTarget: TTarget | URL;
691
+ readonly to: URL | readonly URL[];
692
+ readonly cc?: URL | readonly URL[];
693
+ };
694
+ interface InteractionRevocationCreationOptions<TAuthorization extends Object$1> {
695
+ readonly id: URL;
696
+ readonly actor: URL;
697
+ readonly authorization: TAuthorization | URL;
698
+ readonly to: URL | readonly URL[];
699
+ readonly cc?: URL | readonly URL[];
700
+ }
701
+ interface RecognizedImpoliteInteraction<TInteracting extends Object$1, TTarget extends Object$1, TImpoliteSource extends Object$1> {
702
+ readonly requester: URL;
703
+ readonly interactingObject: TInteracting;
704
+ readonly interactingObjectId: URL;
705
+ readonly interactionTarget?: TTarget;
706
+ readonly interactionTargetId: URL;
707
+ readonly source: TImpoliteSource;
708
+ readonly evidence: ImpoliteInteractionEvidence;
709
+ }
710
+ type ImpoliteInteractionEvidence = {
711
+ readonly type: "activity";
712
+ readonly activityType: URL;
713
+ } | {
714
+ readonly type: "property";
715
+ readonly property: URL;
716
+ } | {
717
+ readonly type: "linkRel";
718
+ readonly rel: URL;
719
+ };
720
+ interface InteractionKeyInput<TInteracting extends Object$1, TTarget extends Object$1> {
721
+ readonly requester: URL;
722
+ readonly interactingObject: TInteracting | URL;
723
+ readonly interactionTarget: TTarget | URL;
724
+ }
725
+ interface InteractionKey {
726
+ readonly interaction: string;
727
+ readonly requester: URL;
728
+ readonly interactingObjectId: URL;
729
+ readonly interactionTargetId: URL;
730
+ }
731
+ interface InteractionAuthorizationKeyInput<TAuthorization extends Object$1> {
732
+ readonly authorization: TAuthorization | URL;
733
+ }
734
+ interface InteractionAuthorizationKey {
735
+ readonly interaction: string;
736
+ readonly authorizationId: URL;
737
+ }
738
+ //#endregion
739
+ //#region src/announce.d.ts
740
+ declare const announceInteraction: InteractionControl<AnnounceRequest, AnnounceAuthorization, Announce, Object$1, Announce>;
741
+ //#endregion
742
+ //#region src/feature.d.ts
743
+ declare const featureInteraction: InteractionControl<FeatureRequest, FeatureAuthorization, FeaturedCollection, Actor, Object$1>;
744
+ //#endregion
745
+ //#region src/key.d.ts
746
+ declare function formatInteractionKey(key: InteractionKey): string;
747
+ declare function formatAuthorizationKey(key: InteractionAuthorizationKey): string;
748
+ //#endregion
749
+ //#region src/like.d.ts
750
+ declare const likeInteraction: InteractionControl<LikeRequest, LikeAuthorization, Like, Object$1, Like>;
751
+ //#endregion
752
+ //#region src/quote.d.ts
753
+ type QuotePost = Note | Article | Question | ChatMessage;
754
+ type QuoteImpoliteSource = Create | QuotePost;
755
+ declare const quoteInteraction: InteractionControl<QuoteRequest, QuoteAuthorization, QuotePost, Object$1, QuoteImpoliteSource>;
756
+ //#endregion
757
+ //#region src/reply.d.ts
758
+ type ReplyPost = Note | Article | Question | ChatMessage;
759
+ type ReplyImpoliteSource = Create | ReplyPost;
760
+ declare const replyInteraction: InteractionControl<ReplyRequest, ReplyAuthorization, ReplyPost, Object$1, ReplyImpoliteSource>;
761
+ //#endregion
762
+ export { GetInteractionAuthorizationRevocation, ImpoliteInteractionEvidence, InteractionAcceptOptions, InteractionAuthorizationCreationOptions, InteractionAuthorizationKey, InteractionAuthorizationKeyInput, InteractionAuthorizationRevocation, InteractionAuthorizationVerification, InteractionAuthorizationVerificationFailure, InteractionAuthorizationVerificationOptions, InteractionControl, InteractionKey, InteractionKeyInput, InteractionName, InteractionPolicyDecision, InteractionPolicyDenialReason, InteractionPolicyEvaluationOptions, InteractionPolicyMatchReason, InteractionPolicyProperty, InteractionRejectOptions, InteractionRequestCreationOptions, InteractionRequestVerification, InteractionRequestVerificationFailure, InteractionRequestVerificationOptions, InteractionRevocationCreationOptions, MatchesApprovalCollection, type QuoteImpoliteSource, type QuotePost, RecognizedImpoliteInteraction, type ReplyImpoliteSource, type ReplyPost, announceInteraction, featureInteraction, formatAuthorizationKey, formatInteractionKey, likeInteraction, quoteInteraction, replyInteraction };