@lit-material/calendar 0.0.0-stage → 1.1.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.
@@ -0,0 +1,2109 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "readme": "",
4
+ "modules": [
5
+ {
6
+ "kind": "javascript-module",
7
+ "path": "src/calendar-format.ts",
8
+ "declarations": [
9
+ {
10
+ "kind": "function",
11
+ "name": "formatter",
12
+ "return": {
13
+ "type": {
14
+ "text": "Intl.DateTimeFormat"
15
+ }
16
+ },
17
+ "parameters": [
18
+ {
19
+ "name": "lang",
20
+ "type": {
21
+ "text": "string"
22
+ }
23
+ },
24
+ {
25
+ "name": "name",
26
+ "type": {
27
+ "text": "string"
28
+ }
29
+ },
30
+ {
31
+ "name": "options",
32
+ "type": {
33
+ "text": "Intl.DateTimeFormatOptions"
34
+ }
35
+ }
36
+ ],
37
+ "description": "A `DateTimeFormat` for `lang`, built once per language and option set; an invalid `lang` falls back to the default locale."
38
+ },
39
+ {
40
+ "kind": "variable",
41
+ "name": "format"
42
+ },
43
+ {
44
+ "kind": "function",
45
+ "name": "formatRange",
46
+ "return": {
47
+ "type": {
48
+ "text": "string"
49
+ }
50
+ },
51
+ "parameters": [
52
+ {
53
+ "name": "format",
54
+ "type": {
55
+ "text": "Intl.DateTimeFormat"
56
+ }
57
+ },
58
+ {
59
+ "name": "start",
60
+ "type": {
61
+ "text": "Date"
62
+ }
63
+ },
64
+ {
65
+ "name": "end",
66
+ "type": {
67
+ "text": "Date"
68
+ }
69
+ }
70
+ ],
71
+ "description": "`start – end` the way the language writes a range (\"Jun 14 – 20, 2026\"); the same instant prints once."
72
+ },
73
+ {
74
+ "kind": "variable",
75
+ "name": "range"
76
+ },
77
+ {
78
+ "kind": "variable",
79
+ "name": "OPTIONS",
80
+ "default": "{ monthTitle: { month: \"long\", year: \"numeric\" }, rangeTitle: { month: \"short\", day: \"numeric\", year: \"numeric\" }, dayTitle: { weekday: \"long\", month: \"long\", day: \"numeric\", year: \"numeric\" }, fullDate: { weekday: \"long\", month: \"long\", day: \"numeric\", year: \"numeric\" }, eventDate: { weekday: \"long\", month: \"long\", day: \"numeric\" }, eventDateTime: { weekday: \"long\", month: \"long\", day: \"numeric\", hour: \"numeric\", minute: \"2-digit\" }, time: { hour: \"numeric\", minute: \"2-digit\" }, hour: { hour: \"numeric\" }, weekdayShort: { weekday: \"short\" }, weekdayLong: { weekday: \"long\" }, agendaDate: { weekday: \"short\", month: \"short\", day: \"numeric\" }, } satisfies Record<string, Intl.DateTimeFormatOptions>"
81
+ },
82
+ {
83
+ "kind": "function",
84
+ "name": "format",
85
+ "return": {
86
+ "type": {
87
+ "text": "string"
88
+ }
89
+ },
90
+ "parameters": [
91
+ {
92
+ "name": "lang",
93
+ "type": {
94
+ "text": "string"
95
+ }
96
+ },
97
+ {
98
+ "name": "name",
99
+ "type": {
100
+ "text": "FormatName"
101
+ }
102
+ },
103
+ {
104
+ "name": "date",
105
+ "type": {
106
+ "text": "Date | CalendarDate"
107
+ }
108
+ }
109
+ ]
110
+ },
111
+ {
112
+ "kind": "function",
113
+ "name": "range",
114
+ "return": {
115
+ "type": {
116
+ "text": "string"
117
+ }
118
+ },
119
+ "parameters": [
120
+ {
121
+ "name": "lang",
122
+ "type": {
123
+ "text": "string"
124
+ }
125
+ },
126
+ {
127
+ "name": "name",
128
+ "type": {
129
+ "text": "FormatName"
130
+ }
131
+ },
132
+ {
133
+ "name": "start",
134
+ "type": {
135
+ "text": "Date | CalendarDate"
136
+ }
137
+ },
138
+ {
139
+ "name": "end",
140
+ "type": {
141
+ "text": "Date | CalendarDate"
142
+ }
143
+ }
144
+ ]
145
+ },
146
+ {
147
+ "kind": "function",
148
+ "name": "dayNumber",
149
+ "return": {
150
+ "type": {
151
+ "text": "string"
152
+ }
153
+ },
154
+ "parameters": [
155
+ {
156
+ "name": "lang",
157
+ "type": {
158
+ "text": "string"
159
+ }
160
+ },
161
+ {
162
+ "name": "value",
163
+ "type": {
164
+ "text": "number"
165
+ }
166
+ }
167
+ ],
168
+ "description": "A day number in `lang`'s digits."
169
+ }
170
+ ],
171
+ "exports": [
172
+ {
173
+ "kind": "js",
174
+ "name": "formatter",
175
+ "declaration": {
176
+ "name": "formatter",
177
+ "module": "src/calendar-format.ts"
178
+ }
179
+ },
180
+ {
181
+ "kind": "js",
182
+ "name": "formatRange",
183
+ "declaration": {
184
+ "name": "formatRange",
185
+ "module": "src/calendar-format.ts"
186
+ }
187
+ },
188
+ {
189
+ "kind": "js",
190
+ "name": "OPTIONS",
191
+ "declaration": {
192
+ "name": "OPTIONS",
193
+ "module": "src/calendar-format.ts"
194
+ }
195
+ },
196
+ {
197
+ "kind": "js",
198
+ "name": "format",
199
+ "declaration": {
200
+ "name": "format",
201
+ "module": "src/calendar-format.ts"
202
+ }
203
+ },
204
+ {
205
+ "kind": "js",
206
+ "name": "range",
207
+ "declaration": {
208
+ "name": "range",
209
+ "module": "src/calendar-format.ts"
210
+ }
211
+ },
212
+ {
213
+ "kind": "js",
214
+ "name": "dayNumber",
215
+ "declaration": {
216
+ "name": "dayNumber",
217
+ "module": "src/calendar-format.ts"
218
+ }
219
+ }
220
+ ]
221
+ },
222
+ {
223
+ "kind": "javascript-module",
224
+ "path": "src/calendar-styles.ts",
225
+ "declarations": [
226
+ {
227
+ "kind": "variable",
228
+ "name": "styles",
229
+ "default": "css` :host { --cal-slot-height: var(--lit-material-calendar-slot-height, 24px); --cal-height: var(--lit-material-calendar-height, 640px); --cal-gutter: 64px; --cal-chip: 20px; --cal-lane: 22px; --cal-day-label: 28px; --cal-outline: var(--md-sys-color-outline-variant, light-dark(#cac4d0, #49454f)); --cal-muted: var(--md-sys-color-on-surface-variant, light-dark(#49454f, #cac4d0)); --cal-surface: var(--md-sys-color-surface, light-dark(#fef7ff, #141218)); --cal-primary: var(--md-sys-color-primary, light-dark(#6750a4, #d0bcff)); --cal-on-primary: var(--md-sys-color-on-primary, light-dark(#ffffff, #381e72)); display: block; color: var(--md-sys-color-on-surface, light-dark(#1d1b20, #e6e0e9)); font-family: var(--md-sys-typescale-body-medium-font, Roboto, system-ui, sans-serif); font-size: var(--md-sys-typescale-body-medium-size, 0.875rem); } :host([hidden]) { display: none; } .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } button { font: inherit; color: inherit; } :focus-visible { outline: 2px solid var(--cal-primary); outline-offset: -2px; } /* Toolbar */ .toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-block-end: 12px; } .nav { display: flex; align-items: center; gap: 4px; } .title { flex: 1 1 auto; margin: 0; font-family: var(--md-sys-typescale-title-large-font, inherit); font-size: var(--md-sys-typescale-title-large-size, 1.375rem); font-weight: var(--md-sys-typescale-title-large-weight, 400); line-height: 1.3; } .today-button { block-size: 40px; padding-inline: 16px; border: 1px solid var(--md-sys-color-outline, light-dark(#79747e, #938f99)); border-radius: var(--md-sys-shape-corner-full, 20px); background: none; color: var(--cal-primary); font-weight: 500; cursor: pointer; } .icon-button { display: inline-grid; place-items: center; inline-size: 40px; block-size: 40px; padding: 0; border: none; border-radius: 50%; background: none; color: var(--cal-muted); cursor: pointer; } .today-button:hover, .icon-button:hover { background: color-mix(in srgb, currentColor 8%, transparent); } .nav-icon { inline-size: 24px; block-size: 24px; fill: currentColor; } :host(:dir(rtl)) .nav-icon { transform: scaleX(-1); } /* Event chips */ .event { --c: var(--event-color, var(--cal-primary)); display: flex; align-items: baseline; gap: 4px; box-sizing: border-box; margin: 0; padding: 0 6px; border: none; border-inline-start: 3px solid var(--c); border-radius: 4px; background: color-mix(in srgb, var(--c) 18%, var(--cal-surface)); color: var(--md-sys-color-on-surface, light-dark(#1d1b20, #e6e0e9)); font-size: var(--md-sys-typescale-label-medium-size, 0.75rem); line-height: var(--cal-chip); text-align: start; white-space: nowrap; overflow: hidden; cursor: pointer; } .event.editable { touch-action: none; } .event:hover, .event:focus-visible { z-index: 2; background: color-mix(in srgb, var(--c) 30%, var(--cal-surface)); } .event.dragging { opacity: 0.8; box-shadow: var(--md-sys-elevation-level2, 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 6px 2px rgba(0, 0, 0, 0.15)); z-index: 2; } .event.continues-before { border-start-start-radius: 0; border-end-start-radius: 0; } .event.continues-after { border-start-end-radius: 0; border-end-end-radius: 0; } .event-title { overflow: hidden; text-overflow: ellipsis; font-weight: 500; } .time { color: var(--cal-muted); font-variant-numeric: tabular-nums; } /* Times read in their own direction (\"9:00 AM\" stays put in a right-to-left page). */ .time, .agenda-time, .time-label span { unicode-bidi: plaintext; } /* Month */ .month { border: 1px solid var(--cal-outline); border-radius: var(--md-sys-shape-corner-medium, 12px); } .row { display: grid; } .month .row { grid-template-columns: repeat(7, minmax(0, 1fr)); } .weekday { padding: 8px 4px; color: var(--cal-muted); font-size: var(--md-sys-typescale-label-medium-size, 0.75rem); font-weight: 500; text-align: center; } .day { position: relative; box-sizing: border-box; min-block-size: calc(var(--cal-day-label) + (var(--max-lanes) + 1) * var(--cal-lane) + 4px); border-block-start: 1px solid var(--cal-outline); border-inline-start: 1px solid var(--cal-outline); cursor: pointer; } .day:first-child { border-inline-start-color: transparent; } .day.outside { background: color-mix(in srgb, var(--cal-outline) 18%, transparent); } .day.outside .day-number { color: var(--cal-muted); } .day-number { display: inline-grid; place-items: center; min-inline-size: 24px; block-size: 24px; margin: 2px; border-radius: 12px; font-size: var(--md-sys-typescale-label-medium-size, 0.75rem); font-weight: 500; } .today .day-number, .day-header.today .date-number { background: var(--cal-primary); color: var(--cal-on-primary); } .month .event { position: absolute; z-index: 1; inset-block-start: calc(var(--cal-day-label) + var(--lane) * var(--cal-lane)); inset-inline-start: 2px; inline-size: calc(var(--span) * (100% + 1px) - 5px); block-size: var(--cal-chip); } .month .event.timed { border-inline-start-width: 0; background: none; } .month .event.timed::before { content: \"\"; flex: none; align-self: center; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--c); } .month .event.timed:hover, .month .event.timed:focus-visible { background: color-mix(in srgb, var(--c) 14%, var(--cal-surface)); } .more { position: absolute; inset-block-start: calc(var(--cal-day-label) + var(--max-lanes) * var(--cal-lane)); inset-inline-start: 2px; padding: 0 6px; border: none; border-radius: 4px; background: none; color: var(--cal-muted); font-size: var(--md-sys-typescale-label-medium-size, 0.75rem); font-weight: 500; line-height: var(--cal-chip); cursor: pointer; } .more:hover { background: color-mix(in srgb, currentColor 8%, transparent); } /* Week and day */ .time-grid { position: relative; max-block-size: var(--cal-height); overflow: auto; border: 1px solid var(--cal-outline); border-radius: var(--md-sys-shape-corner-medium, 12px); overscroll-behavior: contain; } .time-grid .row { grid-template-columns: var(--cal-gutter) repeat(var(--days), minmax(0, 1fr)); } .head { position: sticky; inset-block-start: 0; z-index: 3; background: var(--cal-surface); border-block-end: 1px solid var(--cal-outline); } .day-header { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-block: 6px; border-inline-start: 1px solid var(--cal-outline); } .day-header .weekday { padding: 0; } .date-number { display: inline-grid; place-items: center; min-inline-size: 32px; block-size: 32px; border-radius: 16px; font-size: var(--md-sys-typescale-title-medium-size, 1rem); font-weight: 500; } .time-label { position: relative; padding-inline: 4px 8px; color: var(--cal-muted); font-size: var(--md-sys-typescale-label-small-size, 0.6875rem); text-align: end; line-height: 1; } .slot-row .time-label span[aria-hidden] { position: relative; inset-block-start: -0.5em; } .slot-row:first-child .time-label span[aria-hidden] { inset-block-start: 0; } .all-day-label { align-self: center; } .cell { position: relative; box-sizing: border-box; border-inline-start: 1px solid var(--cal-outline); cursor: pointer; } .all-day-cell { min-block-size: calc(var(--lanes) * var(--cal-lane) + 6px); } .all-day-cell .event { position: absolute; z-index: 1; inset-block-start: calc(2px + var(--lane) * var(--cal-lane)); inset-inline-start: 2px; inline-size: calc(var(--span) * (100% + 1px) - 5px); block-size: var(--cal-chip); } .slot { block-size: var(--cal-slot-height); border-block-start: 1px dotted color-mix(in srgb, var(--cal-outline) 70%, transparent); } .hour .slot { border-block-start: 1px solid var(--cal-outline); } .slot-row:first-child .slot { border-block-start-color: transparent; } .slot.selected { background: color-mix(in srgb, var(--cal-primary) 16%, transparent); } .timed-block { position: absolute; z-index: 1; flex-direction: column; align-items: stretch; gap: 0; inset-block-start: calc(var(--offset) * var(--cal-slot-height)); block-size: max(12px, calc(var(--length) * var(--cal-slot-height) - 2px)); inset-inline-start: calc(2px + var(--col) * (100% - 8px) / var(--cols)); inline-size: calc((100% - 8px) / var(--cols) - 2px); padding-block: 2px; white-space: normal; line-height: 1.25; } .timed-block .event-title, .timed-block .time { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .timed-block.short { flex-direction: row; padding-block: 0; gap: 4px; } .resize { position: absolute; inset-inline: 0; inset-block-end: 0; block-size: 6px; cursor: ns-resize; } .now { position: absolute; z-index: 2; inset-inline: 0; inset-block-start: calc(var(--offset) * var(--cal-slot-height)); border-block-start: 2px solid var(--md-sys-color-error, light-dark(#b3261e, #f2b8b5)); pointer-events: none; } /* Agenda */ .agenda { display: grid; gap: 8px; } .agenda-day { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 8px; padding-block: 8px; border-block-start: 1px solid var(--cal-outline); } .agenda-date { margin: 0; font-size: var(--md-sys-typescale-title-small-size, 0.875rem); font-weight: 500; line-height: 2rem; } .agenda-day.today .agenda-date { color: var(--cal-primary); } .agenda ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; } .agenda-event { inline-size: 100%; align-items: center; gap: 12px; padding: 6px 8px; border-inline-start: none; background: none; font-size: inherit; line-height: 1.4; } .agenda-event:hover, .agenda-event:focus-visible { background: color-mix(in srgb, var(--c) 12%, var(--cal-surface)); } .agenda-time { flex: none; min-inline-size: 9rem; color: var(--cal-muted); font-variant-numeric: tabular-nums; } .dot { flex: none; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--c); } .empty { margin: 0; padding: 24px; color: var(--cal-muted); text-align: center; } @media (max-width: 600px) { .agenda-day { grid-template-columns: 1fr; } .agenda-time { min-inline-size: 6rem; } :host { --cal-gutter: 48px; } } @media (forced-colors: active) { .event { border: 1px solid CanvasText; border-inline-start-width: 3px; } .slot.selected { background: Highlight; } .today .day-number, .day-header.today .date-number { border: 1px solid CanvasText; } } `"
230
+ }
231
+ ],
232
+ "exports": [
233
+ {
234
+ "kind": "js",
235
+ "name": "styles",
236
+ "declaration": {
237
+ "name": "styles",
238
+ "module": "src/calendar-styles.ts"
239
+ }
240
+ }
241
+ ]
242
+ },
243
+ {
244
+ "kind": "javascript-module",
245
+ "path": "src/calendar-utils.ts",
246
+ "declarations": [
247
+ {
248
+ "kind": "variable",
249
+ "name": "MINUTE",
250
+ "type": {
251
+ "text": "number"
252
+ },
253
+ "default": "60_000"
254
+ },
255
+ {
256
+ "kind": "variable",
257
+ "name": "DAY_MINUTES"
258
+ },
259
+ {
260
+ "kind": "function",
261
+ "name": "parseISODate",
262
+ "return": {
263
+ "type": {
264
+ "text": "CalendarDate | undefined"
265
+ }
266
+ },
267
+ "parameters": [
268
+ {
269
+ "name": "iso",
270
+ "type": {
271
+ "text": "string | undefined | null"
272
+ }
273
+ }
274
+ ]
275
+ },
276
+ {
277
+ "kind": "function",
278
+ "name": "formatISODate",
279
+ "return": {
280
+ "type": {
281
+ "text": "string"
282
+ }
283
+ },
284
+ "parameters": [
285
+ {
286
+ "name": "date",
287
+ "type": {
288
+ "text": "CalendarDate"
289
+ }
290
+ }
291
+ ]
292
+ },
293
+ {
294
+ "kind": "function",
295
+ "name": "toDate",
296
+ "return": {
297
+ "type": {
298
+ "text": "Date"
299
+ }
300
+ },
301
+ "parameters": [
302
+ {
303
+ "name": "date",
304
+ "type": {
305
+ "text": "CalendarDate"
306
+ }
307
+ },
308
+ {
309
+ "name": "minutes",
310
+ "default": "0"
311
+ }
312
+ ]
313
+ },
314
+ {
315
+ "kind": "function",
316
+ "name": "fromDate",
317
+ "return": {
318
+ "type": {
319
+ "text": "CalendarDate"
320
+ }
321
+ },
322
+ "parameters": [
323
+ {
324
+ "name": "date",
325
+ "type": {
326
+ "text": "Date"
327
+ }
328
+ }
329
+ ]
330
+ },
331
+ {
332
+ "kind": "function",
333
+ "name": "today",
334
+ "return": {
335
+ "type": {
336
+ "text": "CalendarDate"
337
+ }
338
+ }
339
+ },
340
+ {
341
+ "kind": "function",
342
+ "name": "compareDate",
343
+ "return": {
344
+ "type": {
345
+ "text": "number"
346
+ }
347
+ },
348
+ "parameters": [
349
+ {
350
+ "name": "a",
351
+ "type": {
352
+ "text": "CalendarDate"
353
+ }
354
+ },
355
+ {
356
+ "name": "b",
357
+ "type": {
358
+ "text": "CalendarDate"
359
+ }
360
+ }
361
+ ]
362
+ },
363
+ {
364
+ "kind": "function",
365
+ "name": "sameDate",
366
+ "return": {
367
+ "type": {
368
+ "text": "boolean"
369
+ }
370
+ },
371
+ "parameters": [
372
+ {
373
+ "name": "a",
374
+ "type": {
375
+ "text": "CalendarDate"
376
+ }
377
+ },
378
+ {
379
+ "name": "b",
380
+ "type": {
381
+ "text": "CalendarDate"
382
+ }
383
+ }
384
+ ]
385
+ },
386
+ {
387
+ "kind": "function",
388
+ "name": "addDays",
389
+ "return": {
390
+ "type": {
391
+ "text": "CalendarDate"
392
+ }
393
+ },
394
+ "parameters": [
395
+ {
396
+ "name": "date",
397
+ "type": {
398
+ "text": "CalendarDate"
399
+ }
400
+ },
401
+ {
402
+ "name": "delta",
403
+ "type": {
404
+ "text": "number"
405
+ }
406
+ }
407
+ ]
408
+ },
409
+ {
410
+ "kind": "function",
411
+ "name": "addMonths",
412
+ "return": {
413
+ "type": {
414
+ "text": "CalendarDate"
415
+ }
416
+ },
417
+ "parameters": [
418
+ {
419
+ "name": "date",
420
+ "type": {
421
+ "text": "CalendarDate"
422
+ }
423
+ },
424
+ {
425
+ "name": "delta",
426
+ "type": {
427
+ "text": "number"
428
+ }
429
+ }
430
+ ],
431
+ "description": "The same day `delta` months away, clamped to the target month's length (Jan 31 + 1 month = Feb 28)."
432
+ },
433
+ {
434
+ "kind": "function",
435
+ "name": "daysBetween",
436
+ "return": {
437
+ "type": {
438
+ "text": "number"
439
+ }
440
+ },
441
+ "parameters": [
442
+ {
443
+ "name": "a",
444
+ "type": {
445
+ "text": "CalendarDate"
446
+ }
447
+ },
448
+ {
449
+ "name": "b",
450
+ "type": {
451
+ "text": "CalendarDate"
452
+ }
453
+ }
454
+ ],
455
+ "description": "Whole days from `a` to `b` (calendar days, so DST changes don't matter)."
456
+ },
457
+ {
458
+ "kind": "function",
459
+ "name": "startOfWeek",
460
+ "return": {
461
+ "type": {
462
+ "text": "CalendarDate"
463
+ }
464
+ },
465
+ "parameters": [
466
+ {
467
+ "name": "date",
468
+ "type": {
469
+ "text": "CalendarDate"
470
+ }
471
+ },
472
+ {
473
+ "name": "firstDayOfWeek",
474
+ "type": {
475
+ "text": "number"
476
+ }
477
+ }
478
+ ]
479
+ },
480
+ {
481
+ "kind": "function",
482
+ "name": "minutesInto",
483
+ "return": {
484
+ "type": {
485
+ "text": "number"
486
+ }
487
+ },
488
+ "parameters": [
489
+ {
490
+ "name": "day",
491
+ "type": {
492
+ "text": "CalendarDate"
493
+ }
494
+ },
495
+ {
496
+ "name": "date",
497
+ "type": {
498
+ "text": "Date"
499
+ }
500
+ }
501
+ ],
502
+ "description": "Minutes since local midnight of `day` (can be negative, or past 1440). Wall-clock, so DST days still have 24 hours of rows."
503
+ },
504
+ {
505
+ "kind": "function",
506
+ "name": "localeFirstDayOfWeek",
507
+ "return": {
508
+ "type": {
509
+ "text": "number"
510
+ }
511
+ },
512
+ "parameters": [
513
+ {
514
+ "name": "lang",
515
+ "type": {
516
+ "text": "string"
517
+ }
518
+ }
519
+ ],
520
+ "description": "The first day of the week for `lang` (0 = Sunday, 1 = Monday, ...), from `Intl.Locale` week info where the\nruntime has it, else CLDR's first day for the language's likely region (Monday for most), else Sunday."
521
+ },
522
+ {
523
+ "kind": "function",
524
+ "name": "regionFirstDayOfWeek",
525
+ "return": {
526
+ "type": {
527
+ "text": "number"
528
+ }
529
+ },
530
+ "parameters": [
531
+ {
532
+ "name": "region",
533
+ "type": {
534
+ "text": "string"
535
+ }
536
+ }
537
+ ],
538
+ "description": "CLDR's first day of the week for a region (0 = Sunday, 1 = Monday, ...), for runtimes without `Intl.Locale` week info."
539
+ },
540
+ {
541
+ "kind": "function",
542
+ "name": "parseTime",
543
+ "return": {
544
+ "type": {
545
+ "text": "{ date: Date; dateOnly: boolean } | undefined"
546
+ }
547
+ },
548
+ "parameters": [
549
+ {
550
+ "name": "value",
551
+ "type": {
552
+ "text": "string | Date | undefined"
553
+ }
554
+ }
555
+ ],
556
+ "description": "Reads an event time: a `Date`, a date-only string (local midnight), a local date-time string, or any string `Date` parses."
557
+ },
558
+ {
559
+ "kind": "function",
560
+ "name": "normalizeEvents",
561
+ "return": {
562
+ "type": {
563
+ "text": "NormalizedEvent[]"
564
+ }
565
+ },
566
+ "parameters": [
567
+ {
568
+ "name": "events",
569
+ "type": {
570
+ "text": "readonly CalendarEvent[] | null | undefined"
571
+ }
572
+ },
573
+ {
574
+ "name": "readonly",
575
+ "default": "false"
576
+ }
577
+ ],
578
+ "description": "Resolves the app's events; ones without a readable `start` are dropped."
579
+ },
580
+ {
581
+ "kind": "function",
582
+ "name": "lastDay",
583
+ "return": {
584
+ "type": {
585
+ "text": "CalendarDate"
586
+ }
587
+ },
588
+ "parameters": [
589
+ {
590
+ "name": "event",
591
+ "type": {
592
+ "text": "{ start: Date; end: Date }"
593
+ }
594
+ }
595
+ ],
596
+ "description": "The last day an event covers (its end is exclusive, so an event ending at midnight doesn't reach that day)."
597
+ },
598
+ {
599
+ "kind": "function",
600
+ "name": "coversDay",
601
+ "return": {
602
+ "type": {
603
+ "text": "boolean"
604
+ }
605
+ },
606
+ "parameters": [
607
+ {
608
+ "name": "event",
609
+ "type": {
610
+ "text": "{ start: Date; end: Date }"
611
+ }
612
+ },
613
+ {
614
+ "name": "day",
615
+ "type": {
616
+ "text": "CalendarDate"
617
+ }
618
+ }
619
+ ],
620
+ "description": "Whether an event covers any part of `day`."
621
+ },
622
+ {
623
+ "kind": "function",
624
+ "name": "layoutDay",
625
+ "return": {
626
+ "type": {
627
+ "text": "TimedSegment<T>[]"
628
+ }
629
+ },
630
+ "parameters": [
631
+ {
632
+ "name": "items",
633
+ "type": {
634
+ "text": "readonly T[]"
635
+ }
636
+ },
637
+ {
638
+ "name": "day",
639
+ "type": {
640
+ "text": "CalendarDate"
641
+ }
642
+ },
643
+ {
644
+ "name": "minLength",
645
+ "default": "15"
646
+ }
647
+ ],
648
+ "description": "The part of each timed event that falls on `day`, laid out in side-by-side columns where they overlap:\neach cluster of transitively overlapping events gets as many equal columns as it needs at its busiest,\nand every event the first column free at its start. Events shorter than `minLength` minutes are laid out\nas if they were that long, so they stay visible and don't overprint."
649
+ },
650
+ {
651
+ "kind": "function",
652
+ "name": "layoutSpans",
653
+ "return": {
654
+ "type": {
655
+ "text": "SpanSegment<T>[]"
656
+ }
657
+ },
658
+ "parameters": [
659
+ {
660
+ "name": "items",
661
+ "type": {
662
+ "text": "readonly T[]"
663
+ }
664
+ },
665
+ {
666
+ "name": "first",
667
+ "type": {
668
+ "text": "CalendarDate"
669
+ }
670
+ },
671
+ {
672
+ "name": "days",
673
+ "type": {
674
+ "text": "number"
675
+ }
676
+ }
677
+ ],
678
+ "description": "Lays events out as bars across a row of `days` consecutive days (a month-view week or the all-day row):\neach covering event becomes one bar, and bars are stacked in the first lane that's free over their whole\nspan, longer bars first."
679
+ }
680
+ ],
681
+ "exports": [
682
+ {
683
+ "kind": "js",
684
+ "name": "MINUTE",
685
+ "declaration": {
686
+ "name": "MINUTE",
687
+ "module": "src/calendar-utils.ts"
688
+ }
689
+ },
690
+ {
691
+ "kind": "js",
692
+ "name": "DAY_MINUTES",
693
+ "declaration": {
694
+ "name": "DAY_MINUTES",
695
+ "module": "src/calendar-utils.ts"
696
+ }
697
+ },
698
+ {
699
+ "kind": "js",
700
+ "name": "parseISODate",
701
+ "declaration": {
702
+ "name": "parseISODate",
703
+ "module": "src/calendar-utils.ts"
704
+ }
705
+ },
706
+ {
707
+ "kind": "js",
708
+ "name": "formatISODate",
709
+ "declaration": {
710
+ "name": "formatISODate",
711
+ "module": "src/calendar-utils.ts"
712
+ }
713
+ },
714
+ {
715
+ "kind": "js",
716
+ "name": "toDate",
717
+ "declaration": {
718
+ "name": "toDate",
719
+ "module": "src/calendar-utils.ts"
720
+ }
721
+ },
722
+ {
723
+ "kind": "js",
724
+ "name": "fromDate",
725
+ "declaration": {
726
+ "name": "fromDate",
727
+ "module": "src/calendar-utils.ts"
728
+ }
729
+ },
730
+ {
731
+ "kind": "js",
732
+ "name": "today",
733
+ "declaration": {
734
+ "name": "today",
735
+ "module": "src/calendar-utils.ts"
736
+ }
737
+ },
738
+ {
739
+ "kind": "js",
740
+ "name": "compareDate",
741
+ "declaration": {
742
+ "name": "compareDate",
743
+ "module": "src/calendar-utils.ts"
744
+ }
745
+ },
746
+ {
747
+ "kind": "js",
748
+ "name": "sameDate",
749
+ "declaration": {
750
+ "name": "sameDate",
751
+ "module": "src/calendar-utils.ts"
752
+ }
753
+ },
754
+ {
755
+ "kind": "js",
756
+ "name": "addDays",
757
+ "declaration": {
758
+ "name": "addDays",
759
+ "module": "src/calendar-utils.ts"
760
+ }
761
+ },
762
+ {
763
+ "kind": "js",
764
+ "name": "addMonths",
765
+ "declaration": {
766
+ "name": "addMonths",
767
+ "module": "src/calendar-utils.ts"
768
+ }
769
+ },
770
+ {
771
+ "kind": "js",
772
+ "name": "daysBetween",
773
+ "declaration": {
774
+ "name": "daysBetween",
775
+ "module": "src/calendar-utils.ts"
776
+ }
777
+ },
778
+ {
779
+ "kind": "js",
780
+ "name": "startOfWeek",
781
+ "declaration": {
782
+ "name": "startOfWeek",
783
+ "module": "src/calendar-utils.ts"
784
+ }
785
+ },
786
+ {
787
+ "kind": "js",
788
+ "name": "minutesInto",
789
+ "declaration": {
790
+ "name": "minutesInto",
791
+ "module": "src/calendar-utils.ts"
792
+ }
793
+ },
794
+ {
795
+ "kind": "js",
796
+ "name": "localeFirstDayOfWeek",
797
+ "declaration": {
798
+ "name": "localeFirstDayOfWeek",
799
+ "module": "src/calendar-utils.ts"
800
+ }
801
+ },
802
+ {
803
+ "kind": "js",
804
+ "name": "regionFirstDayOfWeek",
805
+ "declaration": {
806
+ "name": "regionFirstDayOfWeek",
807
+ "module": "src/calendar-utils.ts"
808
+ }
809
+ },
810
+ {
811
+ "kind": "js",
812
+ "name": "parseTime",
813
+ "declaration": {
814
+ "name": "parseTime",
815
+ "module": "src/calendar-utils.ts"
816
+ }
817
+ },
818
+ {
819
+ "kind": "js",
820
+ "name": "normalizeEvents",
821
+ "declaration": {
822
+ "name": "normalizeEvents",
823
+ "module": "src/calendar-utils.ts"
824
+ }
825
+ },
826
+ {
827
+ "kind": "js",
828
+ "name": "lastDay",
829
+ "declaration": {
830
+ "name": "lastDay",
831
+ "module": "src/calendar-utils.ts"
832
+ }
833
+ },
834
+ {
835
+ "kind": "js",
836
+ "name": "coversDay",
837
+ "declaration": {
838
+ "name": "coversDay",
839
+ "module": "src/calendar-utils.ts"
840
+ }
841
+ },
842
+ {
843
+ "kind": "js",
844
+ "name": "layoutDay",
845
+ "declaration": {
846
+ "name": "layoutDay",
847
+ "module": "src/calendar-utils.ts"
848
+ }
849
+ },
850
+ {
851
+ "kind": "js",
852
+ "name": "layoutSpans",
853
+ "declaration": {
854
+ "name": "layoutSpans",
855
+ "module": "src/calendar-utils.ts"
856
+ }
857
+ }
858
+ ]
859
+ },
860
+ {
861
+ "kind": "javascript-module",
862
+ "path": "src/calendar.ts",
863
+ "declarations": [
864
+ {
865
+ "kind": "class",
866
+ "description": "Material Design 3 styled calendar and scheduler: a month grid, week and day time grids, and an agenda\nlist, with a toolbar (previous / today / next, the period's title, and a view switch).\n\nEvents are controlled: the element never moves an event itself. Dragging, resizing or Alt+arrow keys\nfire a cancelable `event-change` with the new times; update `events` to accept it.\n\nTimes are in the browser's (or server's) local time zone. ISO strings without an offset are read as\nlocal wall-clock time; date-only strings are local days. `slot-click` and `event-change` hand back\nlocal `Date`s.\n\nThe month view is an ARIA grid of days. The week and day views are one ARIA grid too: a header row of\ndays, an \"All day\" row, then a row per time slot, each with a time row header. One cell is in the tab\norder (arrow keys move it); Tab goes on to the events in that cell, each a button named by its title\nand time.",
867
+ "name": "LitMaterialCalendar",
868
+ "cssProperties": [
869
+ {
870
+ "description": "Height of one time slot in the week and day views. Default 24px.",
871
+ "name": "--lit-material-calendar-slot-height"
872
+ },
873
+ {
874
+ "description": "Maximum height of the scrolling time grid. Default 640px.",
875
+ "name": "--lit-material-calendar-height"
876
+ }
877
+ ],
878
+ "cssParts": [
879
+ {
880
+ "description": "The row with the navigation buttons, title and view switch.",
881
+ "name": "toolbar"
882
+ },
883
+ {
884
+ "description": "The period's title.",
885
+ "name": "title"
886
+ },
887
+ {
888
+ "description": "The view switch (a segmented button group).",
889
+ "name": "views"
890
+ },
891
+ {
892
+ "description": "The month grid or the time grid.",
893
+ "name": "grid"
894
+ },
895
+ {
896
+ "description": "The agenda list.",
897
+ "name": "agenda"
898
+ },
899
+ {
900
+ "description": "Each event chip.",
901
+ "name": "event"
902
+ }
903
+ ],
904
+ "members": [
905
+ {
906
+ "kind": "field",
907
+ "name": "view",
908
+ "type": {
909
+ "text": "CalendarView"
910
+ },
911
+ "default": "\"month\"",
912
+ "description": "Which view is shown.",
913
+ "attribute": "view",
914
+ "reflects": true
915
+ },
916
+ {
917
+ "kind": "field",
918
+ "name": "date",
919
+ "type": {
920
+ "text": "string | undefined"
921
+ },
922
+ "description": "The day in focus, as an ISO `\"YYYY-MM-DD\"` string; the view shows the month, week or day around it. Default: today.",
923
+ "attribute": "date"
924
+ },
925
+ {
926
+ "kind": "field",
927
+ "name": "events",
928
+ "type": {
929
+ "text": "CalendarEvent[]"
930
+ },
931
+ "default": "[]",
932
+ "description": "The events: `{ id, title, start, end?, allDay?, color?, editable?, ...data }`. Property or JSON attribute.",
933
+ "attribute": "events"
934
+ },
935
+ {
936
+ "kind": "field",
937
+ "name": "firstDayOfWeek",
938
+ "type": {
939
+ "text": "number | undefined"
940
+ },
941
+ "description": "0 = Sunday, 1 = Monday, ... Default: the first day of the week in the element's language, else Sunday.",
942
+ "attribute": "first-day-of-week"
943
+ },
944
+ {
945
+ "kind": "field",
946
+ "name": "slotMinutes",
947
+ "type": {
948
+ "text": "number"
949
+ },
950
+ "default": "30",
951
+ "description": "Minutes per row of the week and day views; also the step for keyboard moves.",
952
+ "attribute": "slot-minutes"
953
+ },
954
+ {
955
+ "kind": "field",
956
+ "name": "scrollToHour",
957
+ "type": {
958
+ "text": "number"
959
+ },
960
+ "default": "8",
961
+ "description": "The hour the week and day views scroll to when they open.",
962
+ "attribute": "scroll-to-hour"
963
+ },
964
+ {
965
+ "kind": "field",
966
+ "name": "dayMaxEvents",
967
+ "type": {
968
+ "text": "number"
969
+ },
970
+ "default": "3",
971
+ "description": "Event rows per day in the month view before \"+N more\".",
972
+ "attribute": "day-max-events"
973
+ },
974
+ {
975
+ "kind": "field",
976
+ "name": "agendaDays",
977
+ "type": {
978
+ "text": "number"
979
+ },
980
+ "default": "7",
981
+ "description": "Days the agenda view lists, from `date`.",
982
+ "attribute": "agenda-days"
983
+ },
984
+ {
985
+ "kind": "field",
986
+ "name": "readonly",
987
+ "type": {
988
+ "text": "boolean"
989
+ },
990
+ "default": "false",
991
+ "description": "No dragging, resizing or keyboard moves (clicks still fire).",
992
+ "attribute": "readonly",
993
+ "reflects": true
994
+ },
995
+ {
996
+ "kind": "field",
997
+ "name": "focusSlot",
998
+ "type": {
999
+ "text": "number"
1000
+ },
1001
+ "privacy": "private",
1002
+ "default": "-1",
1003
+ "description": "Slot in focus in the time grid (`-1`: the all-day row)."
1004
+ },
1005
+ {
1006
+ "kind": "field",
1007
+ "name": "selection",
1008
+ "type": {
1009
+ "text": "Selection | null"
1010
+ },
1011
+ "privacy": "private",
1012
+ "default": "null"
1013
+ },
1014
+ {
1015
+ "kind": "field",
1016
+ "name": "preview",
1017
+ "type": {
1018
+ "text": "{ key: string; start: Date; end: Date } | null"
1019
+ },
1020
+ "privacy": "private",
1021
+ "default": "null"
1022
+ },
1023
+ {
1024
+ "kind": "field",
1025
+ "name": "agendaIndex",
1026
+ "type": {
1027
+ "text": "number"
1028
+ },
1029
+ "privacy": "private",
1030
+ "default": "0"
1031
+ },
1032
+ {
1033
+ "kind": "field",
1034
+ "name": "announcement",
1035
+ "type": {
1036
+ "text": "string"
1037
+ },
1038
+ "privacy": "private",
1039
+ "default": "\"\""
1040
+ },
1041
+ {
1042
+ "kind": "field",
1043
+ "name": "now",
1044
+ "type": {
1045
+ "text": "Date | undefined"
1046
+ },
1047
+ "privacy": "private",
1048
+ "description": "The current time, for the line in the time grid. Unset on the server and in the first (hydrating) render, so a page rendered earlier still hydrates."
1049
+ },
1050
+ {
1051
+ "kind": "field",
1052
+ "name": "localize",
1053
+ "privacy": "private",
1054
+ "readonly": true,
1055
+ "default": "new LocalizeController(this)"
1056
+ },
1057
+ {
1058
+ "kind": "field",
1059
+ "name": "normalized",
1060
+ "type": {
1061
+ "text": "NormalizedEvent[]"
1062
+ },
1063
+ "privacy": "private",
1064
+ "default": "[]"
1065
+ },
1066
+ {
1067
+ "kind": "field",
1068
+ "name": "byKey",
1069
+ "privacy": "private",
1070
+ "default": "new Map<string, NormalizedEvent>()"
1071
+ },
1072
+ {
1073
+ "kind": "field",
1074
+ "name": "focusAfterUpdate",
1075
+ "type": {
1076
+ "text": "\"cell\" | \"agenda\" | { key: string } | null"
1077
+ },
1078
+ "privacy": "private",
1079
+ "default": "null"
1080
+ },
1081
+ {
1082
+ "kind": "field",
1083
+ "name": "pendingEventFocus",
1084
+ "type": {
1085
+ "text": "string | null"
1086
+ },
1087
+ "privacy": "private",
1088
+ "default": "null"
1089
+ },
1090
+ {
1091
+ "kind": "field",
1092
+ "name": "drag",
1093
+ "type": {
1094
+ "text": "DragState | null"
1095
+ },
1096
+ "privacy": "private",
1097
+ "default": "null"
1098
+ },
1099
+ {
1100
+ "kind": "field",
1101
+ "name": "suppressClick",
1102
+ "type": {
1103
+ "text": "boolean"
1104
+ },
1105
+ "privacy": "private",
1106
+ "default": "false"
1107
+ },
1108
+ {
1109
+ "kind": "field",
1110
+ "name": "scrolledView",
1111
+ "type": {
1112
+ "text": "CalendarView | null"
1113
+ },
1114
+ "privacy": "private",
1115
+ "default": "null"
1116
+ },
1117
+ {
1118
+ "kind": "field",
1119
+ "name": "timer",
1120
+ "type": {
1121
+ "text": "ReturnType<typeof setInterval> | undefined"
1122
+ },
1123
+ "privacy": "private"
1124
+ },
1125
+ {
1126
+ "kind": "method",
1127
+ "name": "startClock",
1128
+ "privacy": "private",
1129
+ "return": {
1130
+ "type": {
1131
+ "text": "void"
1132
+ }
1133
+ }
1134
+ },
1135
+ {
1136
+ "kind": "field",
1137
+ "name": "slotLength",
1138
+ "type": {
1139
+ "text": "number"
1140
+ },
1141
+ "privacy": "private",
1142
+ "readonly": true
1143
+ },
1144
+ {
1145
+ "kind": "field",
1146
+ "name": "slotCount",
1147
+ "type": {
1148
+ "text": "number"
1149
+ },
1150
+ "privacy": "private",
1151
+ "readonly": true
1152
+ },
1153
+ {
1154
+ "kind": "field",
1155
+ "name": "anchor",
1156
+ "type": {
1157
+ "text": "CalendarDate"
1158
+ },
1159
+ "privacy": "private",
1160
+ "readonly": true
1161
+ },
1162
+ {
1163
+ "kind": "field",
1164
+ "name": "weekStart",
1165
+ "type": {
1166
+ "text": "number"
1167
+ },
1168
+ "privacy": "private",
1169
+ "readonly": true
1170
+ },
1171
+ {
1172
+ "kind": "field",
1173
+ "name": "agendaLength",
1174
+ "type": {
1175
+ "text": "number"
1176
+ },
1177
+ "privacy": "private",
1178
+ "readonly": true
1179
+ },
1180
+ {
1181
+ "kind": "method",
1182
+ "name": "rangeOf",
1183
+ "privacy": "private",
1184
+ "return": {
1185
+ "type": {
1186
+ "text": "{ first: CalendarDate; days: number }"
1187
+ }
1188
+ },
1189
+ "parameters": [
1190
+ {
1191
+ "name": "view",
1192
+ "type": {
1193
+ "text": "CalendarView"
1194
+ }
1195
+ },
1196
+ {
1197
+ "name": "anchor",
1198
+ "type": {
1199
+ "text": "CalendarDate"
1200
+ }
1201
+ }
1202
+ ],
1203
+ "description": "The first day shown and how many days, for a view around `anchor`."
1204
+ },
1205
+ {
1206
+ "kind": "field",
1207
+ "name": "visibleRange",
1208
+ "type": {
1209
+ "text": "{ start: Date; end: Date }"
1210
+ },
1211
+ "description": "The first and (exclusive) last instant on screen.",
1212
+ "readonly": true
1213
+ },
1214
+ {
1215
+ "kind": "method",
1216
+ "name": "inPeriod",
1217
+ "privacy": "private",
1218
+ "return": {
1219
+ "type": {
1220
+ "text": "boolean"
1221
+ }
1222
+ },
1223
+ "parameters": [
1224
+ {
1225
+ "name": "date",
1226
+ "type": {
1227
+ "text": "CalendarDate"
1228
+ }
1229
+ }
1230
+ ]
1231
+ },
1232
+ {
1233
+ "kind": "field",
1234
+ "name": "timeGrid",
1235
+ "type": {
1236
+ "text": "boolean"
1237
+ },
1238
+ "privacy": "private",
1239
+ "readonly": true
1240
+ },
1241
+ {
1242
+ "kind": "method",
1243
+ "name": "defaultSlot",
1244
+ "privacy": "private",
1245
+ "return": {
1246
+ "type": {
1247
+ "text": "number"
1248
+ }
1249
+ }
1250
+ },
1251
+ {
1252
+ "kind": "method",
1253
+ "name": "scrollToDefaultHour",
1254
+ "privacy": "private",
1255
+ "return": {
1256
+ "type": {
1257
+ "text": "void"
1258
+ }
1259
+ }
1260
+ },
1261
+ {
1262
+ "kind": "method",
1263
+ "name": "followMovedEvent",
1264
+ "privacy": "private",
1265
+ "return": {
1266
+ "type": {
1267
+ "text": "void"
1268
+ }
1269
+ },
1270
+ "parameters": [
1271
+ {
1272
+ "name": "key",
1273
+ "type": {
1274
+ "text": "string"
1275
+ }
1276
+ }
1277
+ ],
1278
+ "description": "After an `event-change` the app accepted: focus and announce the event where it is now."
1279
+ },
1280
+ {
1281
+ "kind": "method",
1282
+ "name": "next",
1283
+ "return": {
1284
+ "type": {
1285
+ "text": "void"
1286
+ }
1287
+ },
1288
+ "description": "Shows the next month, week, day or agenda period."
1289
+ },
1290
+ {
1291
+ "kind": "method",
1292
+ "name": "previous",
1293
+ "return": {
1294
+ "type": {
1295
+ "text": "void"
1296
+ }
1297
+ },
1298
+ "description": "Shows the previous period."
1299
+ },
1300
+ {
1301
+ "kind": "method",
1302
+ "name": "goToToday",
1303
+ "return": {
1304
+ "type": {
1305
+ "text": "void"
1306
+ }
1307
+ },
1308
+ "description": "Shows the period with today in it."
1309
+ },
1310
+ {
1311
+ "kind": "method",
1312
+ "name": "step",
1313
+ "privacy": "private",
1314
+ "return": {
1315
+ "type": {
1316
+ "text": "void"
1317
+ }
1318
+ },
1319
+ "parameters": [
1320
+ {
1321
+ "name": "direction",
1322
+ "type": {
1323
+ "text": "1 | -1"
1324
+ }
1325
+ }
1326
+ ]
1327
+ },
1328
+ {
1329
+ "kind": "method",
1330
+ "name": "setDate",
1331
+ "privacy": "private",
1332
+ "return": {
1333
+ "type": {
1334
+ "text": "void"
1335
+ }
1336
+ },
1337
+ "parameters": [
1338
+ {
1339
+ "name": "date",
1340
+ "type": {
1341
+ "text": "CalendarDate"
1342
+ }
1343
+ },
1344
+ {
1345
+ "name": "view",
1346
+ "default": "this.view",
1347
+ "type": {
1348
+ "text": "CalendarView"
1349
+ }
1350
+ }
1351
+ ],
1352
+ "description": "Moves the focused day, firing `navigate` when the period on screen changes."
1353
+ },
1354
+ {
1355
+ "kind": "method",
1356
+ "name": "periodTitle",
1357
+ "privacy": "private",
1358
+ "return": {
1359
+ "type": {
1360
+ "text": "string"
1361
+ }
1362
+ }
1363
+ },
1364
+ {
1365
+ "kind": "method",
1366
+ "name": "eventTime",
1367
+ "privacy": "private",
1368
+ "return": {
1369
+ "type": {
1370
+ "text": "string"
1371
+ }
1372
+ },
1373
+ "parameters": [
1374
+ {
1375
+ "name": "event",
1376
+ "type": {
1377
+ "text": "NormalizedEvent"
1378
+ }
1379
+ }
1380
+ ]
1381
+ },
1382
+ {
1383
+ "kind": "method",
1384
+ "name": "eventLabel",
1385
+ "privacy": "private",
1386
+ "return": {
1387
+ "type": {
1388
+ "text": "string"
1389
+ }
1390
+ },
1391
+ "parameters": [
1392
+ {
1393
+ "name": "event",
1394
+ "type": {
1395
+ "text": "NormalizedEvent"
1396
+ }
1397
+ }
1398
+ ]
1399
+ },
1400
+ {
1401
+ "kind": "method",
1402
+ "name": "dayLabel",
1403
+ "privacy": "private",
1404
+ "return": {
1405
+ "type": {
1406
+ "text": "string"
1407
+ }
1408
+ },
1409
+ "parameters": [
1410
+ {
1411
+ "name": "date",
1412
+ "type": {
1413
+ "text": "string"
1414
+ }
1415
+ },
1416
+ {
1417
+ "name": "count",
1418
+ "type": {
1419
+ "text": "number"
1420
+ }
1421
+ }
1422
+ ]
1423
+ },
1424
+ {
1425
+ "kind": "method",
1426
+ "name": "navLabel",
1427
+ "privacy": "private",
1428
+ "return": {
1429
+ "type": {
1430
+ "text": "string"
1431
+ }
1432
+ },
1433
+ "parameters": [
1434
+ {
1435
+ "name": "direction",
1436
+ "type": {
1437
+ "text": "\"previous\" | \"next\""
1438
+ }
1439
+ }
1440
+ ]
1441
+ },
1442
+ {
1443
+ "kind": "method",
1444
+ "name": "viewLabel",
1445
+ "privacy": "private",
1446
+ "return": {
1447
+ "type": {
1448
+ "text": "string"
1449
+ }
1450
+ },
1451
+ "parameters": [
1452
+ {
1453
+ "name": "view",
1454
+ "type": {
1455
+ "text": "CalendarView"
1456
+ }
1457
+ }
1458
+ ]
1459
+ },
1460
+ {
1461
+ "kind": "method",
1462
+ "name": "renderToolbar",
1463
+ "privacy": "private",
1464
+ "parameters": [
1465
+ {
1466
+ "name": "title",
1467
+ "type": {
1468
+ "text": "string"
1469
+ }
1470
+ }
1471
+ ]
1472
+ },
1473
+ {
1474
+ "kind": "field",
1475
+ "name": "displayed",
1476
+ "type": {
1477
+ "text": "NormalizedEvent[]"
1478
+ },
1479
+ "privacy": "private",
1480
+ "description": "The events to lay out, with a drag preview in place of the event being dragged.",
1481
+ "readonly": true
1482
+ },
1483
+ {
1484
+ "kind": "method",
1485
+ "name": "renderChip",
1486
+ "privacy": "private",
1487
+ "parameters": [
1488
+ {
1489
+ "name": "event",
1490
+ "type": {
1491
+ "text": "NormalizedEvent"
1492
+ }
1493
+ },
1494
+ {
1495
+ "name": "focusable",
1496
+ "type": {
1497
+ "text": "boolean"
1498
+ }
1499
+ },
1500
+ {
1501
+ "name": "classes",
1502
+ "type": {
1503
+ "text": "string"
1504
+ }
1505
+ },
1506
+ {
1507
+ "name": "props",
1508
+ "type": {
1509
+ "text": "Record<string, string | number>"
1510
+ }
1511
+ },
1512
+ {
1513
+ "name": "content",
1514
+ "type": {
1515
+ "text": "unknown"
1516
+ }
1517
+ }
1518
+ ]
1519
+ },
1520
+ {
1521
+ "kind": "method",
1522
+ "name": "renderMonth",
1523
+ "privacy": "private",
1524
+ "parameters": [
1525
+ {
1526
+ "name": "title",
1527
+ "type": {
1528
+ "text": "string"
1529
+ }
1530
+ }
1531
+ ]
1532
+ },
1533
+ {
1534
+ "kind": "method",
1535
+ "name": "renderTimeGrid",
1536
+ "privacy": "private",
1537
+ "parameters": [
1538
+ {
1539
+ "name": "title",
1540
+ "type": {
1541
+ "text": "string"
1542
+ }
1543
+ }
1544
+ ]
1545
+ },
1546
+ {
1547
+ "kind": "method",
1548
+ "name": "agendaItems",
1549
+ "privacy": "private",
1550
+ "return": {
1551
+ "type": {
1552
+ "text": "{ day: CalendarDate; event: NormalizedEvent }[]"
1553
+ }
1554
+ }
1555
+ },
1556
+ {
1557
+ "kind": "method",
1558
+ "name": "renderAgenda",
1559
+ "privacy": "private",
1560
+ "parameters": [
1561
+ {
1562
+ "name": "title",
1563
+ "type": {
1564
+ "text": "string"
1565
+ }
1566
+ }
1567
+ ]
1568
+ },
1569
+ {
1570
+ "kind": "field",
1571
+ "name": "handleToday",
1572
+ "privacy": "private",
1573
+ "readonly": true
1574
+ },
1575
+ {
1576
+ "kind": "field",
1577
+ "name": "handlePrevious",
1578
+ "privacy": "private",
1579
+ "readonly": true
1580
+ },
1581
+ {
1582
+ "kind": "field",
1583
+ "name": "handleNext",
1584
+ "privacy": "private",
1585
+ "readonly": true
1586
+ },
1587
+ {
1588
+ "kind": "field",
1589
+ "name": "handleViewChange",
1590
+ "privacy": "private",
1591
+ "readonly": true
1592
+ },
1593
+ {
1594
+ "kind": "method",
1595
+ "name": "cellInfo",
1596
+ "privacy": "private",
1597
+ "return": {
1598
+ "type": {
1599
+ "text": "CellInfo | undefined"
1600
+ }
1601
+ },
1602
+ "parameters": [
1603
+ {
1604
+ "name": "cell",
1605
+ "type": {
1606
+ "text": "HTMLElement"
1607
+ }
1608
+ }
1609
+ ]
1610
+ },
1611
+ {
1612
+ "kind": "method",
1613
+ "name": "slotTimes",
1614
+ "privacy": "private",
1615
+ "return": {
1616
+ "type": {
1617
+ "text": "SlotClickDetail"
1618
+ }
1619
+ },
1620
+ "parameters": [
1621
+ {
1622
+ "name": "info",
1623
+ "type": {
1624
+ "text": "CellInfo"
1625
+ }
1626
+ },
1627
+ {
1628
+ "name": "toSlot",
1629
+ "default": "info.slot"
1630
+ }
1631
+ ]
1632
+ },
1633
+ {
1634
+ "kind": "method",
1635
+ "name": "emitSlot",
1636
+ "privacy": "private",
1637
+ "return": {
1638
+ "type": {
1639
+ "text": "void"
1640
+ }
1641
+ },
1642
+ "parameters": [
1643
+ {
1644
+ "name": "detail",
1645
+ "type": {
1646
+ "text": "SlotClickDetail"
1647
+ }
1648
+ }
1649
+ ]
1650
+ },
1651
+ {
1652
+ "kind": "method",
1653
+ "name": "emitEventClick",
1654
+ "privacy": "private",
1655
+ "return": {
1656
+ "type": {
1657
+ "text": "void"
1658
+ }
1659
+ },
1660
+ "parameters": [
1661
+ {
1662
+ "name": "event",
1663
+ "type": {
1664
+ "text": "NormalizedEvent"
1665
+ }
1666
+ }
1667
+ ]
1668
+ },
1669
+ {
1670
+ "kind": "field",
1671
+ "name": "handleGridClick",
1672
+ "privacy": "private",
1673
+ "readonly": true
1674
+ },
1675
+ {
1676
+ "kind": "field",
1677
+ "name": "handleFocusIn",
1678
+ "privacy": "private",
1679
+ "readonly": true,
1680
+ "description": "Focus that lands on a cell (a click, or a chip's cell) makes it the roving tab stop."
1681
+ },
1682
+ {
1683
+ "kind": "method",
1684
+ "name": "focusCellLater",
1685
+ "privacy": "private",
1686
+ "return": {
1687
+ "type": {
1688
+ "text": "void"
1689
+ }
1690
+ }
1691
+ },
1692
+ {
1693
+ "kind": "field",
1694
+ "name": "handleGridKeydown",
1695
+ "privacy": "private",
1696
+ "readonly": true
1697
+ },
1698
+ {
1699
+ "kind": "method",
1700
+ "name": "handleEventKeydown",
1701
+ "privacy": "private",
1702
+ "return": {
1703
+ "type": {
1704
+ "text": "boolean"
1705
+ }
1706
+ },
1707
+ "parameters": [
1708
+ {
1709
+ "name": "e",
1710
+ "type": {
1711
+ "text": "KeyboardEvent"
1712
+ }
1713
+ },
1714
+ {
1715
+ "name": "chip",
1716
+ "type": {
1717
+ "text": "HTMLElement"
1718
+ }
1719
+ }
1720
+ ],
1721
+ "description": "Alt+arrows move an event, Alt+Shift+arrows change its end. Returns whether the key was handled."
1722
+ },
1723
+ {
1724
+ "kind": "method",
1725
+ "name": "requestChange",
1726
+ "privacy": "private",
1727
+ "return": {
1728
+ "type": {
1729
+ "text": "boolean"
1730
+ }
1731
+ },
1732
+ "parameters": [
1733
+ {
1734
+ "name": "event",
1735
+ "type": {
1736
+ "text": "NormalizedEvent"
1737
+ }
1738
+ },
1739
+ {
1740
+ "name": "start",
1741
+ "type": {
1742
+ "text": "Date"
1743
+ }
1744
+ },
1745
+ {
1746
+ "name": "end",
1747
+ "type": {
1748
+ "text": "Date"
1749
+ }
1750
+ },
1751
+ {
1752
+ "name": "keyboard",
1753
+ "type": {
1754
+ "text": "boolean"
1755
+ }
1756
+ }
1757
+ ]
1758
+ },
1759
+ {
1760
+ "kind": "method",
1761
+ "name": "cellAt",
1762
+ "privacy": "private",
1763
+ "return": {
1764
+ "type": {
1765
+ "text": "CellInfo | undefined"
1766
+ }
1767
+ },
1768
+ "parameters": [
1769
+ {
1770
+ "name": "x",
1771
+ "type": {
1772
+ "text": "number"
1773
+ }
1774
+ },
1775
+ {
1776
+ "name": "y",
1777
+ "type": {
1778
+ "text": "number"
1779
+ }
1780
+ }
1781
+ ]
1782
+ },
1783
+ {
1784
+ "kind": "field",
1785
+ "name": "handlePointerDown",
1786
+ "privacy": "private",
1787
+ "readonly": true
1788
+ },
1789
+ {
1790
+ "kind": "field",
1791
+ "name": "handlePointerMove",
1792
+ "privacy": "private",
1793
+ "readonly": true
1794
+ },
1795
+ {
1796
+ "kind": "field",
1797
+ "name": "handlePointerUp",
1798
+ "privacy": "private",
1799
+ "readonly": true
1800
+ },
1801
+ {
1802
+ "kind": "field",
1803
+ "name": "handlePointerCancel",
1804
+ "privacy": "private",
1805
+ "readonly": true
1806
+ },
1807
+ {
1808
+ "kind": "method",
1809
+ "name": "endDrag",
1810
+ "privacy": "private",
1811
+ "return": {
1812
+ "type": {
1813
+ "text": "void"
1814
+ }
1815
+ }
1816
+ },
1817
+ {
1818
+ "kind": "field",
1819
+ "name": "handleAgendaClick",
1820
+ "privacy": "private",
1821
+ "readonly": true
1822
+ },
1823
+ {
1824
+ "kind": "field",
1825
+ "name": "handleAgendaKeydown",
1826
+ "privacy": "private",
1827
+ "readonly": true
1828
+ }
1829
+ ],
1830
+ "events": [
1831
+ {
1832
+ "name": "navigate",
1833
+ "type": {
1834
+ "text": "CustomEvent"
1835
+ },
1836
+ "description": "`detail: { view, date, start, end }` when the toolbar, keyboard or a \"+N more\" link changes the view or the period shown."
1837
+ },
1838
+ {
1839
+ "name": "slot-click",
1840
+ "type": {
1841
+ "text": "CustomEvent"
1842
+ },
1843
+ "description": "`detail: { start, end, allDay }` when an empty day, all-day cell or time slot is clicked or activated, or a time range is dragged out (pointer) or extended with Shift+arrows."
1844
+ },
1845
+ {
1846
+ "name": "event-click",
1847
+ "type": {
1848
+ "text": "CustomEvent"
1849
+ },
1850
+ "description": "`detail: { event }` when an event is clicked or activated with Enter/Space."
1851
+ },
1852
+ {
1853
+ "name": "event-change",
1854
+ "type": {
1855
+ "text": "CustomEvent"
1856
+ },
1857
+ "description": "Cancelable. `detail: { event, start, end, allDay }` when an event is dragged, resized or moved with the keyboard. The app updates `events`."
1858
+ }
1859
+ ],
1860
+ "attributes": [
1861
+ {
1862
+ "name": "view",
1863
+ "type": {
1864
+ "text": "CalendarView"
1865
+ },
1866
+ "default": "\"month\"",
1867
+ "description": "Which view is shown.",
1868
+ "fieldName": "view"
1869
+ },
1870
+ {
1871
+ "name": "date",
1872
+ "type": {
1873
+ "text": "string | undefined"
1874
+ },
1875
+ "description": "The day in focus, as an ISO `\"YYYY-MM-DD\"` string; the view shows the month, week or day around it. Default: today.",
1876
+ "fieldName": "date"
1877
+ },
1878
+ {
1879
+ "name": "events",
1880
+ "type": {
1881
+ "text": "CalendarEvent[]"
1882
+ },
1883
+ "default": "[]",
1884
+ "description": "The events: `{ id, title, start, end?, allDay?, color?, editable?, ...data }`. Property or JSON attribute.",
1885
+ "fieldName": "events"
1886
+ },
1887
+ {
1888
+ "name": "first-day-of-week",
1889
+ "type": {
1890
+ "text": "number | undefined"
1891
+ },
1892
+ "description": "0 = Sunday, 1 = Monday, ... Default: the first day of the week in the element's language, else Sunday.",
1893
+ "fieldName": "firstDayOfWeek"
1894
+ },
1895
+ {
1896
+ "name": "slot-minutes",
1897
+ "type": {
1898
+ "text": "number"
1899
+ },
1900
+ "default": "30",
1901
+ "description": "Minutes per row of the week and day views; also the step for keyboard moves.",
1902
+ "fieldName": "slotMinutes"
1903
+ },
1904
+ {
1905
+ "name": "scroll-to-hour",
1906
+ "type": {
1907
+ "text": "number"
1908
+ },
1909
+ "default": "8",
1910
+ "description": "The hour the week and day views scroll to when they open.",
1911
+ "fieldName": "scrollToHour"
1912
+ },
1913
+ {
1914
+ "name": "day-max-events",
1915
+ "type": {
1916
+ "text": "number"
1917
+ },
1918
+ "default": "3",
1919
+ "description": "Event rows per day in the month view before \"+N more\".",
1920
+ "fieldName": "dayMaxEvents"
1921
+ },
1922
+ {
1923
+ "name": "agenda-days",
1924
+ "type": {
1925
+ "text": "number"
1926
+ },
1927
+ "default": "7",
1928
+ "description": "Days the agenda view lists, from `date`.",
1929
+ "fieldName": "agendaDays"
1930
+ },
1931
+ {
1932
+ "name": "readonly",
1933
+ "type": {
1934
+ "text": "boolean"
1935
+ },
1936
+ "default": "false",
1937
+ "description": "No dragging, resizing or keyboard moves (clicks still fire).",
1938
+ "fieldName": "readonly"
1939
+ }
1940
+ ],
1941
+ "superclass": {
1942
+ "name": "LitElement",
1943
+ "package": "lit"
1944
+ },
1945
+ "tagName": "lit-material-calendar",
1946
+ "customElement": true
1947
+ }
1948
+ ],
1949
+ "exports": [
1950
+ {
1951
+ "kind": "js",
1952
+ "name": "CalendarEvent",
1953
+ "declaration": {
1954
+ "name": "CalendarEvent",
1955
+ "module": "./calendar-utils.js"
1956
+ }
1957
+ },
1958
+ {
1959
+ "kind": "js",
1960
+ "name": "LitMaterialCalendar",
1961
+ "declaration": {
1962
+ "name": "LitMaterialCalendar",
1963
+ "module": "src/calendar.ts"
1964
+ }
1965
+ },
1966
+ {
1967
+ "kind": "custom-element-definition",
1968
+ "name": "lit-material-calendar",
1969
+ "declaration": {
1970
+ "name": "LitMaterialCalendar",
1971
+ "module": "src/calendar.ts"
1972
+ }
1973
+ }
1974
+ ]
1975
+ },
1976
+ {
1977
+ "kind": "javascript-module",
1978
+ "path": "src/index.ts",
1979
+ "declarations": [],
1980
+ "exports": [
1981
+ {
1982
+ "kind": "js",
1983
+ "name": "LitMaterialCalendar",
1984
+ "declaration": {
1985
+ "name": "LitMaterialCalendar",
1986
+ "module": "./calendar.js"
1987
+ }
1988
+ },
1989
+ {
1990
+ "kind": "js",
1991
+ "name": "CalendarView",
1992
+ "declaration": {
1993
+ "name": "CalendarView",
1994
+ "module": "./calendar.js"
1995
+ }
1996
+ },
1997
+ {
1998
+ "kind": "js",
1999
+ "name": "CalendarEvent",
2000
+ "declaration": {
2001
+ "name": "CalendarEvent",
2002
+ "module": "./calendar.js"
2003
+ }
2004
+ },
2005
+ {
2006
+ "kind": "js",
2007
+ "name": "SlotClickDetail",
2008
+ "declaration": {
2009
+ "name": "SlotClickDetail",
2010
+ "module": "./calendar.js"
2011
+ }
2012
+ },
2013
+ {
2014
+ "kind": "js",
2015
+ "name": "EventClickDetail",
2016
+ "declaration": {
2017
+ "name": "EventClickDetail",
2018
+ "module": "./calendar.js"
2019
+ }
2020
+ },
2021
+ {
2022
+ "kind": "js",
2023
+ "name": "EventChangeDetail",
2024
+ "declaration": {
2025
+ "name": "EventChangeDetail",
2026
+ "module": "./calendar.js"
2027
+ }
2028
+ },
2029
+ {
2030
+ "kind": "js",
2031
+ "name": "NavigateDetail",
2032
+ "declaration": {
2033
+ "name": "NavigateDetail",
2034
+ "module": "./calendar.js"
2035
+ }
2036
+ },
2037
+ {
2038
+ "kind": "js",
2039
+ "name": "layoutDay",
2040
+ "declaration": {
2041
+ "name": "layoutDay",
2042
+ "module": "./calendar-utils.js"
2043
+ }
2044
+ },
2045
+ {
2046
+ "kind": "js",
2047
+ "name": "layoutSpans",
2048
+ "declaration": {
2049
+ "name": "layoutSpans",
2050
+ "module": "./calendar-utils.js"
2051
+ }
2052
+ },
2053
+ {
2054
+ "kind": "js",
2055
+ "name": "normalizeEvents",
2056
+ "declaration": {
2057
+ "name": "normalizeEvents",
2058
+ "module": "./calendar-utils.js"
2059
+ }
2060
+ },
2061
+ {
2062
+ "kind": "js",
2063
+ "name": "NormalizedEvent",
2064
+ "declaration": {
2065
+ "name": "NormalizedEvent",
2066
+ "module": "./calendar-utils.js"
2067
+ }
2068
+ },
2069
+ {
2070
+ "kind": "js",
2071
+ "name": "TimedSegment",
2072
+ "declaration": {
2073
+ "name": "TimedSegment",
2074
+ "module": "./calendar-utils.js"
2075
+ }
2076
+ },
2077
+ {
2078
+ "kind": "js",
2079
+ "name": "SpanSegment",
2080
+ "declaration": {
2081
+ "name": "SpanSegment",
2082
+ "module": "./calendar-utils.js"
2083
+ }
2084
+ }
2085
+ ]
2086
+ },
2087
+ {
2088
+ "kind": "javascript-module",
2089
+ "path": "src/react.ts",
2090
+ "declarations": [
2091
+ {
2092
+ "kind": "variable",
2093
+ "name": "Calendar",
2094
+ "description": "React wrapper for `<lit-material-calendar>`."
2095
+ }
2096
+ ],
2097
+ "exports": [
2098
+ {
2099
+ "kind": "js",
2100
+ "name": "Calendar",
2101
+ "declaration": {
2102
+ "name": "Calendar",
2103
+ "module": "src/react.ts"
2104
+ }
2105
+ }
2106
+ ]
2107
+ }
2108
+ ]
2109
+ }