@telepath-computer/television 1.5.10 → 1.6.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.
Files changed (130) hide show
  1. package/dist/THIRD-PARTY-NOTICES.txt +701 -0
  2. package/dist/cli.cjs +9035 -596
  3. package/dist/onboarding/tv-guide/welcome.html +14 -4
  4. package/dist/skills/television/SKILL.md +39 -33
  5. package/dist/skills/television/resources.md +4 -4
  6. package/dist/skills/television/templates.md +77 -0
  7. package/dist/skills/television/theming.md +31 -17
  8. package/dist/templates/calendar/README.md +17 -0
  9. package/dist/{skills/tv-tasks → templates/calendar}/THIRD-PARTY-NOTICES.txt +22 -22
  10. package/dist/templates/calendar/calendar-attendees.js +131 -0
  11. package/dist/templates/calendar/calendar-event.js +22 -0
  12. package/dist/templates/calendar/calendar-motion.js +273 -0
  13. package/dist/templates/calendar/calendar-page.js +403 -0
  14. package/dist/templates/calendar/calendar-time-axis.js +32 -0
  15. package/dist/templates/calendar/calendar-week.js +711 -0
  16. package/dist/templates/calendar/data.json +3 -0
  17. package/dist/templates/calendar/icon.svg +1 -0
  18. package/dist/templates/calendar/index.html +27 -0
  19. package/dist/templates/calendar/manifest.json +148 -0
  20. package/dist/templates/calendar/styles.css +771 -0
  21. package/dist/templates/checklist/README.md +45 -0
  22. package/dist/templates/checklist/THIRD-PARTY-NOTICES.txt +29 -0
  23. package/dist/templates/checklist/data.json +1 -0
  24. package/dist/templates/checklist/icon.svg +8 -0
  25. package/dist/templates/checklist/icons.css +61 -0
  26. package/dist/templates/checklist/index.html +47 -0
  27. package/dist/templates/checklist/manifest.json +49 -0
  28. package/dist/templates/checklist/model.d.ts +30 -0
  29. package/dist/templates/checklist/model.js +60 -0
  30. package/dist/templates/checklist/page.js +425 -0
  31. package/dist/templates/checklist/styles.css +206 -0
  32. package/dist/templates/document/README.md +55 -0
  33. package/dist/templates/document/THIRD-PARTY-NOTICES.txt +1080 -0
  34. package/dist/templates/document/data.json +3 -0
  35. package/dist/templates/document/editor.css +1 -0
  36. package/dist/templates/document/editor.js +37 -0
  37. package/dist/templates/document/icon.svg +6 -0
  38. package/dist/templates/document/index.html +29 -0
  39. package/dist/templates/document/manifest.json +22 -0
  40. package/dist/templates/document/page.js +190 -0
  41. package/dist/templates/document/styles.css +76 -0
  42. package/dist/templates/map/README.md +85 -0
  43. package/dist/templates/map/THIRD-PARTY-NOTICES.txt +84 -0
  44. package/dist/templates/map/data.json +1 -0
  45. package/dist/templates/map/icon.svg +8 -0
  46. package/dist/templates/map/icons.svg +43 -0
  47. package/dist/templates/map/index.html +95 -0
  48. package/dist/templates/map/manifest.json +227 -0
  49. package/dist/templates/map/map-model.js +18 -0
  50. package/dist/templates/map/map.css +202 -0
  51. package/dist/templates/map/map.js +728 -0
  52. package/dist/templates/map/vendor/LICENSE +26 -0
  53. package/dist/templates/map/vendor/README.md +11 -0
  54. package/dist/templates/map/vendor/leaflet.css +661 -0
  55. package/dist/templates/map/vendor/leaflet.js +6 -0
  56. package/dist/templates/map/vendor/lucide/LICENSE +43 -0
  57. package/dist/templates/map/vendor/lucide/README.md +46 -0
  58. package/dist/templates/map/vendor/lucide/icons.js +832 -0
  59. package/dist/templates/map/vendor/lucide/svg/airport.svg +15 -0
  60. package/dist/templates/map/vendor/lucide/svg/bar.svg +17 -0
  61. package/dist/templates/map/vendor/lucide/svg/beach.svg +17 -0
  62. package/dist/templates/map/vendor/lucide/svg/bridge.svg +20 -0
  63. package/dist/templates/map/vendor/lucide/svg/bus.svg +21 -0
  64. package/dist/templates/map/vendor/lucide/svg/church.svg +19 -0
  65. package/dist/templates/map/vendor/lucide/svg/coffee.svg +18 -0
  66. package/dist/templates/map/vendor/lucide/svg/ferry.svg +19 -0
  67. package/dist/templates/map/vendor/lucide/svg/flag.svg +15 -0
  68. package/dist/templates/map/vendor/lucide/svg/heart.svg +15 -0
  69. package/dist/templates/map/vendor/lucide/svg/home.svg +16 -0
  70. package/dist/templates/map/vendor/lucide/svg/hospital.svg +19 -0
  71. package/dist/templates/map/vendor/lucide/svg/hotel.svg +24 -0
  72. package/dist/templates/map/vendor/lucide/svg/info.svg +17 -0
  73. package/dist/templates/map/vendor/lucide/svg/landmark.svg +20 -0
  74. package/dist/templates/map/vendor/lucide/svg/mountain.svg +15 -0
  75. package/dist/templates/map/vendor/lucide/svg/museum.svg +20 -0
  76. package/dist/templates/map/vendor/lucide/svg/music.svg +17 -0
  77. package/dist/templates/map/vendor/lucide/svg/park.svg +18 -0
  78. package/dist/templates/map/vendor/lucide/svg/parking.svg +16 -0
  79. package/dist/templates/map/vendor/lucide/svg/pin.svg +16 -0
  80. package/dist/templates/map/vendor/lucide/svg/restaurant.svg +17 -0
  81. package/dist/templates/map/vendor/lucide/svg/school.svg +20 -0
  82. package/dist/templates/map/vendor/lucide/svg/shop.svg +17 -0
  83. package/dist/templates/map/vendor/lucide/svg/sports.svg +19 -0
  84. package/dist/templates/map/vendor/lucide/svg/star.svg +15 -0
  85. package/dist/templates/map/vendor/lucide/svg/theatre.svg +23 -0
  86. package/dist/templates/map/vendor/lucide/svg/train.svg +20 -0
  87. package/dist/templates/map/vendor/lucide/svg/viewpoint.svg +20 -0
  88. package/dist/templates/map/vendor/lucide/svg/work.svg +18 -0
  89. package/dist/templates/sticky-note/Caveat-Medium.woff2 +0 -0
  90. package/dist/templates/sticky-note/README.md +47 -0
  91. package/dist/templates/sticky-note/THIRD-PARTY-NOTICES.txt +127 -0
  92. package/dist/templates/sticky-note/data.json +1 -0
  93. package/dist/templates/sticky-note/icon.svg +16 -0
  94. package/dist/templates/sticky-note/icons.css +61 -0
  95. package/dist/templates/sticky-note/index.html +31 -0
  96. package/dist/templates/sticky-note/manifest.json +27 -0
  97. package/dist/templates/sticky-note/model.d.ts +33 -0
  98. package/dist/templates/sticky-note/model.js +152 -0
  99. package/dist/templates/sticky-note/page.js +84 -0
  100. package/dist/templates/sticky-note/styles.css +140 -0
  101. package/dist/templates/table/README.md +107 -0
  102. package/dist/templates/table/data.json +4 -0
  103. package/dist/templates/table/icon.svg +6 -0
  104. package/dist/templates/table/index.html +15 -0
  105. package/dist/templates/table/manifest.json +70 -0
  106. package/dist/templates/table/model.d.ts +164 -0
  107. package/dist/templates/table/model.js +395 -0
  108. package/dist/templates/table/page.js +1045 -0
  109. package/dist/templates/table/selection-model.d.ts +67 -0
  110. package/dist/templates/table/selection-model.js +163 -0
  111. package/dist/templates/table/styles.css +522 -0
  112. package/dist/views/markdown/THIRD-PARTY-NOTICES.txt +408 -0
  113. package/dist/views/markdown/index.html +21 -21
  114. package/dist/web/assets/main-CRSNodQt.js +864 -0
  115. package/dist/web/assets/main-DnvQkpg4.css +1 -0
  116. package/dist/web/index.html +2 -2
  117. package/package.json +1 -1
  118. package/dist/skills/tv-calendar/SKILL.md +0 -100
  119. package/dist/skills/tv-calendar/calendar.css +0 -1
  120. package/dist/skills/tv-calendar/calendar.js +0 -400
  121. package/dist/skills/tv-table/SKILL.md +0 -95
  122. package/dist/skills/tv-tasks/SKILL.md +0 -269
  123. package/dist/skills/tv-tasks/task.css +0 -180
  124. package/dist/skills/tv-tasks/task.js +0 -304
  125. package/dist/web/assets/calendar-DToAnkzj.png +0 -0
  126. package/dist/web/assets/main-CekDfJPz.js +0 -848
  127. package/dist/web/assets/main-CunC2_Nx.css +0 -1
  128. package/dist/web/assets/markdown-DdDrJuVK.png +0 -0
  129. package/dist/web/assets/table-oeG9uAN1.png +0 -0
  130. package/dist/web/assets/tasks-D4xqXFPl.png +0 -0
@@ -0,0 +1,771 @@
1
+ /* The Calendar template's page: the month title above a calendar of one to
2
+ seven days, laid out like Apple Calendar. Built only from the foundation's
3
+ tokens, so it follows the active theme and appearance. */
4
+
5
+ /* ------------------------------------------------------------------ */
6
+ /* Page */
7
+ /* ------------------------------------------------------------------ */
8
+
9
+ * { box-sizing: border-box; }
10
+ body {
11
+ margin: 0;
12
+ background: var(--color-surface);
13
+ color: var(--color-text);
14
+ font-family: var(--font-sans);
15
+ font-size: var(--text-base);
16
+ line-height: 1.4;
17
+ -webkit-font-smoothing: antialiased;
18
+ }
19
+ main { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100vh; overflow: hidden; }
20
+
21
+ /* The title reads like a calendar app's toolbar: the month in bold, the year
22
+ in a lighter weight. */
23
+ .masthead {
24
+ padding: clamp(14px, 2.4vh, 26px) var(--space-20) clamp(6px, 1vh, 12px);
25
+ }
26
+ .masthead h1 {
27
+ margin: 0;
28
+ font-size: clamp(22px, 1.1rem + 1.1vw, 40px);
29
+ font-weight: var(--font-weight-semibold);
30
+ letter-spacing: -0.015em;
31
+ line-height: 1.1;
32
+ }
33
+ .masthead h1 .year { font-weight: var(--font-weight-normal); }
34
+
35
+ /* Data the page cannot read: an error page in place of the calendar,
36
+ centred in the page. */
37
+ .calendar-unreadable {
38
+ grid-row: 1 / -1;
39
+ display: flex;
40
+ flex-direction: column;
41
+ align-items: center;
42
+ justify-content: center;
43
+ gap: var(--space-8);
44
+ padding: var(--space-48) var(--space-24);
45
+ text-align: center;
46
+ }
47
+
48
+ .calendar-unreadable-icon {
49
+ display: grid;
50
+ place-items: center;
51
+ width: var(--space-64);
52
+ height: var(--space-64);
53
+ margin-bottom: var(--space-12);
54
+ border: 1px solid var(--color-border);
55
+ border-radius: var(--radius-pill);
56
+ background: var(--color-surface);
57
+ color: var(--color-text-muted);
58
+ }
59
+
60
+ .calendar-unreadable-title {
61
+ margin: 0;
62
+ font-size: var(--text-xl);
63
+ font-weight: var(--font-weight-semibold);
64
+ }
65
+
66
+ .calendar-unreadable-text {
67
+ max-width: 28em;
68
+ margin: 0;
69
+ color: var(--color-text-muted);
70
+ }
71
+
72
+ /* ------------------------------------------------------------------ */
73
+ /* Calendar */
74
+ /* ------------------------------------------------------------------ */
75
+
76
+ calendar-week {
77
+ /* Hour lines and day separators: quieter than an ordinary border. */
78
+ --calendar-line: oklch(from var(--color-border) l c h / calc(alpha * 0.75));
79
+ /* Weekend columns sit a step toward the muted surface. */
80
+ --calendar-weekend: color-mix(in oklab, var(--color-surface-muted) 60%, var(--color-surface));
81
+ /* Today's date circle and the now line use the theme's red; dark
82
+ appearance takes a deeper step so reversed type stays legible. */
83
+ --calendar-today: var(--red-500);
84
+ --calendar-today-text: oklch(from var(--calendar-today) clamp(0.2, (var(--contrast-flip) - l) * 1e6, 0.98) 0 h);
85
+ --calendar-gutter: 60px;
86
+ /* Days share the full width equally down to this width; a calendar too
87
+ narrow for every day at it scrolls sideways under the pinned hour labels. */
88
+ --calendar-day-min-width: 100px;
89
+ --hour-count: 24;
90
+
91
+ /* Sizes for a week: a comfortable hour that grows with the window height. */
92
+ --hour-min-height: clamp(52px, 7.5vh, 76px);
93
+ --calendar-header-size: 15px;
94
+ --calendar-axis-size: 11px;
95
+ --event-font-size: 12px;
96
+
97
+ display: grid;
98
+ grid-template-columns:
99
+ [time-left] var(--calendar-gutter)
100
+ [days-start] repeat(var(--day-count, 0), minmax(var(--calendar-day-min-width), 1fr)) [days-end];
101
+ grid-template-rows:
102
+ [headers] auto
103
+ [allday] auto
104
+ [hours-start] repeat(var(--hour-count), minmax(var(--hour-min-height), 1fr)) [hours-end];
105
+ width: 100%;
106
+ height: 100%;
107
+ min-height: 0;
108
+ overflow: auto;
109
+ overflow-anchor: none;
110
+ scrollbar-color: var(--neutral-alpha-50) transparent;
111
+ background: var(--color-surface);
112
+ font-family: inherit;
113
+ color: var(--color-text);
114
+ }
115
+
116
+ :root[data-theme="dark"] calendar-week {
117
+ --calendar-today: var(--red-600);
118
+ }
119
+
120
+ /* One day is the stage view: larger type, taller hours, and events that fill
121
+ the width. The trailing inset leaves room for a raised event to grow. */
122
+ calendar-week[days="1"] {
123
+ --hour-min-height: clamp(56px, 8.6vh, 104px);
124
+ --calendar-gutter: clamp(56px, 4.5vw, 84px);
125
+ --calendar-header-size: clamp(17px, 0.5rem + 0.8vw, 26px);
126
+ --calendar-axis-size: clamp(11px, 0.3rem + 0.6vw, 16px);
127
+ --event-font-size: clamp(13px, 0.4rem + 0.7vw, 21px);
128
+ --event-padding-block: 0.32em;
129
+ --event-padding-inline: 0.75em;
130
+ --event-inset-start: max(12px, 1%);
131
+ --event-inset-end: max(16px, 1.4%);
132
+ --event-gap: 4px;
133
+ --lift-scale: 1.016;
134
+ --lift-rise: -14px;
135
+ --lift-perspective: 2400px;
136
+ }
137
+
138
+ @media (max-width: 560px) {
139
+ .masthead { padding-inline: var(--space-16); }
140
+ calendar-week[days="1"] { --event-inset-end: 10px; }
141
+ }
142
+
143
+ calendar-week > calendar-headers,
144
+ calendar-week > calendar-allday,
145
+ calendar-week > calendar-grid {
146
+ display: grid;
147
+ grid-column: 1 / -1;
148
+ grid-template-columns: subgrid;
149
+ min-width: 0;
150
+ }
151
+
152
+ /* ------------------------------------------------------------------ */
153
+ /* Day headers */
154
+ /* ------------------------------------------------------------------ */
155
+
156
+ calendar-week > calendar-headers {
157
+ grid-row: headers / allday;
158
+ position: sticky;
159
+ top: 0;
160
+ z-index: 3;
161
+ background: var(--color-surface);
162
+ border-bottom: 1px solid var(--calendar-line);
163
+ }
164
+
165
+ /* When the days scroll sideways, the gutter stays put: a surface strip in
166
+ each band covers the days passing beneath the hour labels. The grid's
167
+ strip stops short of the day columns so the now line's dot, which sits
168
+ on that edge, stays whole. */
169
+ calendar-headers::before,
170
+ calendar-grid::before {
171
+ content: "";
172
+ grid-column: time-left / days-start;
173
+ grid-row: 1 / -1;
174
+ position: sticky;
175
+ left: 0;
176
+ z-index: 3;
177
+ background: var(--color-surface);
178
+ }
179
+
180
+ calendar-grid::before {
181
+ width: calc(100% - 6px);
182
+ }
183
+
184
+ calendar-headers > calendar-day {
185
+ grid-column: calc(var(--day-index) + 1);
186
+ display: flex;
187
+ align-items: center;
188
+ gap: 0.3em;
189
+ min-width: 0;
190
+ padding: var(--space-6) var(--space-8) var(--space-8);
191
+ font-size: var(--calendar-header-size);
192
+ line-height: 1;
193
+ white-space: nowrap;
194
+ }
195
+
196
+ calendar-headers > calendar-day .weekday {
197
+ color: var(--color-text-muted);
198
+ }
199
+
200
+ /* The date sits in a circle that fills red only for today. */
201
+ calendar-headers > calendar-day .date-num {
202
+ display: grid;
203
+ place-items: center;
204
+ min-width: 1.75em;
205
+ height: 1.75em;
206
+ padding: 0 0.3em;
207
+ border-radius: var(--radius-pill);
208
+ color: var(--color-text);
209
+ font-weight: var(--font-weight-semibold);
210
+ font-variant-numeric: tabular-nums;
211
+ }
212
+
213
+ calendar-headers > calendar-day[data-weekend] .date-num {
214
+ color: var(--color-text-muted);
215
+ }
216
+
217
+ calendar-headers > calendar-day[data-today] .weekday {
218
+ color: var(--calendar-today);
219
+ }
220
+
221
+ calendar-headers > calendar-day[data-today] .date-num {
222
+ background: var(--calendar-today);
223
+ color: var(--calendar-today-text);
224
+ }
225
+
226
+ /* ------------------------------------------------------------------ */
227
+ /* All-day band */
228
+ /* ------------------------------------------------------------------ */
229
+
230
+ /* The band sticks just below the day headers, whose height is the date
231
+ circle plus the header padding and rule. */
232
+ calendar-week > calendar-allday {
233
+ grid-row: allday / hours-start;
234
+ grid-template-rows: repeat(var(--allday-lane-count, 1), auto);
235
+ position: sticky;
236
+ top: calc(1.75 * var(--calendar-header-size) + var(--space-6) + var(--space-8) + 1px);
237
+ z-index: 2;
238
+ padding: var(--space-2) 0;
239
+ background: var(--color-surface);
240
+ border-bottom: 1px solid var(--calendar-line);
241
+ }
242
+
243
+ calendar-allday > .allday-label {
244
+ grid-column: time-left / days-start;
245
+ grid-row: 1 / -1;
246
+ position: sticky;
247
+ left: 0;
248
+ z-index: 3;
249
+ margin: calc(-1 * var(--space-2)) 0;
250
+ padding: calc(var(--space-2) + 0.45em) var(--space-8) 0 0;
251
+ background: var(--color-surface);
252
+ color: var(--color-text-muted);
253
+ font-size: var(--calendar-axis-size);
254
+ text-align: right;
255
+ white-space: nowrap;
256
+ }
257
+
258
+ calendar-allday > calendar-cell {
259
+ grid-column: calc(var(--day-index) + 1);
260
+ grid-row: 1 / -1;
261
+ margin: calc(-1 * var(--space-2)) 0;
262
+ border-left: 1px solid var(--calendar-line);
263
+ }
264
+
265
+ /* ------------------------------------------------------------------ */
266
+ /* Hour grid */
267
+ /* ------------------------------------------------------------------ */
268
+
269
+ /* The grid is its own stacking context, so a raised event stays beneath the
270
+ sticky headers and all-day band when it scrolls under them. */
271
+ calendar-week > calendar-grid {
272
+ grid-row: hours-start / hours-end;
273
+ grid-template-rows: subgrid;
274
+ position: relative;
275
+ z-index: 0;
276
+ }
277
+
278
+ calendar-grid > calendar-column {
279
+ grid-column: calc(var(--day-index) + 1);
280
+ grid-row: 1 / -1;
281
+ border-left: 1px solid var(--calendar-line);
282
+ background-image: repeating-linear-gradient(
283
+ to bottom,
284
+ var(--calendar-line) 0,
285
+ var(--calendar-line) 1px,
286
+ transparent 1px,
287
+ transparent calc(100% / var(--hour-count))
288
+ );
289
+ }
290
+
291
+ /* With six or seven days shown, the weekend days are shaded, in the all-day
292
+ band and the hour grid alike. */
293
+ calendar-week:is([days="6"], [days="7"]) calendar-allday > calendar-cell[data-weekend],
294
+ calendar-week:is([days="6"], [days="7"]) calendar-grid > calendar-column[data-weekend] {
295
+ background-color: var(--calendar-weekend);
296
+ }
297
+
298
+ calendar-grid > .start-hour-marker {
299
+ grid-column: 2;
300
+ grid-row-start: calc(var(--start-hour) + 1);
301
+ width: 0;
302
+ height: 0;
303
+ }
304
+
305
+ /* Hour labels sit right-aligned in the gutter, centred on their hour line. */
306
+ calendar-time-axis {
307
+ display: contents;
308
+ }
309
+
310
+ calendar-time-axis .hour-label {
311
+ grid-column: time-left / days-start;
312
+ grid-row-start: calc(var(--hour-index) + 1);
313
+ align-self: start;
314
+ /* Pinned with the gutter when the days scroll sideways. */
315
+ position: sticky;
316
+ left: 0;
317
+ z-index: 3;
318
+ padding-right: var(--space-8);
319
+ color: var(--color-text-muted);
320
+ font-size: var(--calendar-axis-size);
321
+ font-variant-numeric: tabular-nums;
322
+ line-height: 1;
323
+ text-align: right;
324
+ white-space: nowrap;
325
+ transform: translateY(-50%);
326
+ }
327
+
328
+ /* Midnight would sit on the grid's top edge, so it is left out. */
329
+ calendar-time-axis .hour-label[data-hour="0"] {
330
+ visibility: hidden;
331
+ }
332
+
333
+ /* ------------------------------------------------------------------ */
334
+ /* Now line */
335
+ /* ------------------------------------------------------------------ */
336
+
337
+ calendar-grid > .now-line-faint,
338
+ calendar-grid > .now-line {
339
+ grid-row: 1 / -1;
340
+ position: relative;
341
+ pointer-events: none;
342
+ }
343
+
344
+ /* The faint line across the other days runs beneath the events. Today's red
345
+ line and its dot draw over them, as in Apple and Google Calendar, but stay
346
+ beneath a raised event. */
347
+ calendar-grid > .now-line-faint {
348
+ z-index: 0;
349
+ }
350
+
351
+ calendar-grid > .now-line {
352
+ z-index: 2;
353
+ }
354
+
355
+ calendar-grid > .now-line-faint {
356
+ grid-column: days-start / days-end;
357
+ }
358
+
359
+ calendar-grid > .now-line {
360
+ grid-column: calc(var(--day-index) + 1);
361
+ }
362
+
363
+ calendar-grid > .now-line-faint::before,
364
+ calendar-grid > .now-line::before {
365
+ content: "";
366
+ position: absolute;
367
+ left: 0;
368
+ right: 0;
369
+ top: calc(var(--y-fraction) * 100%);
370
+ height: 2px;
371
+ transform: translateY(-50%);
372
+ }
373
+
374
+ calendar-grid > .now-line-faint::before {
375
+ height: 1px;
376
+ background: oklch(from var(--calendar-today) l c h / var(--alpha-40));
377
+ }
378
+
379
+ calendar-grid > .now-line::before {
380
+ background: var(--calendar-today);
381
+ }
382
+
383
+ calendar-grid > .now-line::after {
384
+ content: "";
385
+ position: absolute;
386
+ left: 0;
387
+ top: calc(var(--y-fraction) * 100%);
388
+ width: 10px;
389
+ height: 10px;
390
+ border-radius: 50%;
391
+ background: var(--calendar-today);
392
+ transform: translate(-50%, -50%);
393
+ }
394
+
395
+ /* The current time replaces the hour label it lands on. The strip spans the
396
+ gutter for the whole day and is pinned with it; the time inside sits at
397
+ the same fraction of the day's height as the line. */
398
+ calendar-grid > .now-label {
399
+ grid-column: time-left / days-start;
400
+ grid-row: 1 / -1;
401
+ position: sticky;
402
+ left: 0;
403
+ z-index: 3;
404
+ pointer-events: none;
405
+ }
406
+
407
+ calendar-grid > .now-label > span {
408
+ position: absolute;
409
+ top: calc(var(--y-fraction) * 100%);
410
+ right: 6px;
411
+ padding: var(--space-2);
412
+ background: var(--color-surface);
413
+ color: var(--calendar-today);
414
+ font-size: var(--calendar-axis-size);
415
+ font-weight: var(--font-weight-semibold);
416
+ font-variant-numeric: tabular-nums;
417
+ line-height: 1;
418
+ white-space: nowrap;
419
+ transform: translateY(-50%);
420
+ }
421
+
422
+ /* ------------------------------------------------------------------ */
423
+ /* Events */
424
+ /* ------------------------------------------------------------------ */
425
+
426
+ /* Event blocks, in the manner of Apple Calendar: a soft fill in the event's
427
+ colour, a bold title and the time in a deeper shade of the same hue, no
428
+ border. Each colour reads from the matching canonical hue scale, so events
429
+ follow the active theme; the steps used change with the appearance. */
430
+ calendar-event {
431
+ display: contents;
432
+
433
+ /* The event's hue and its ink in each appearance, chosen by its color
434
+ attribute below. Light ink is a deep step of the hue, dark ink a pale
435
+ one. Yellow, green and orange go a step deeper in light to stay legible
436
+ on their pale fills, as Apple sets yellow in ochre. Blue is the default. */
437
+ --event-hue: var(--blue-500);
438
+ --event-ink-light: var(--blue-800);
439
+ --event-ink-soft-light: var(--blue-700);
440
+ --event-ink-dark: var(--blue-200);
441
+ --event-ink-soft-dark: var(--blue-300);
442
+
443
+ --event-fill-strength: 17%;
444
+ --event-fill-strength-raised: 32%;
445
+ --event-ink: var(--event-ink-light);
446
+ --event-ink-soft: var(--event-ink-soft-light);
447
+ }
448
+
449
+ /* Dark appearance: light ink on a deeper, denser fill. */
450
+ :root[data-theme="dark"] calendar-event {
451
+ --event-fill-strength: 30%;
452
+ --event-fill-strength-raised: 50%;
453
+ --event-ink: var(--event-ink-dark);
454
+ --event-ink-soft: var(--event-ink-soft-dark);
455
+ }
456
+
457
+ calendar-event[color="red"] { --event-hue: var(--red-500); --event-ink-light: var(--red-800); --event-ink-soft-light: var(--red-700); --event-ink-dark: var(--red-200); --event-ink-soft-dark: var(--red-300); }
458
+ calendar-event[color="orange"] { --event-hue: var(--orange-500); --event-ink-light: var(--orange-900); --event-ink-soft-light: var(--orange-800); --event-ink-dark: var(--orange-200); --event-ink-soft-dark: var(--orange-300); }
459
+ calendar-event[color="yellow"] { --event-hue: var(--yellow-500); --event-ink-light: var(--yellow-900); --event-ink-soft-light: var(--yellow-900); --event-ink-dark: var(--yellow-200); --event-ink-soft-dark: var(--yellow-300); }
460
+ calendar-event[color="green"] { --event-hue: var(--green-500); --event-ink-light: var(--green-900); --event-ink-soft-light: var(--green-800); --event-ink-dark: var(--green-200); --event-ink-soft-dark: var(--green-300); }
461
+ calendar-event[color="purple"] { --event-hue: var(--purple-500); --event-ink-light: var(--purple-800); --event-ink-soft-light: var(--purple-700); --event-ink-dark: var(--purple-200); --event-ink-soft-dark: var(--purple-300); }
462
+
463
+ calendar-event .event-block {
464
+ pointer-events: none;
465
+ }
466
+
467
+ calendar-event .event-block-inner {
468
+ --event-fill: color-mix(in oklab, var(--event-hue) var(--event-fill-strength), var(--color-surface));
469
+ display: flex;
470
+ flex-direction: column;
471
+ gap: 0.1em;
472
+ padding: var(--event-padding-block, 4px) var(--event-padding-inline, 6px);
473
+ border-radius: var(--control-radius);
474
+ background-color: var(--event-fill);
475
+ color: var(--event-ink);
476
+ font-size: var(--event-font-size);
477
+ line-height: 1.2;
478
+ overflow: hidden;
479
+ pointer-events: auto;
480
+ }
481
+
482
+ calendar-event h3 {
483
+ margin: 0;
484
+ overflow: hidden;
485
+ color: var(--event-ink);
486
+ font-size: 1em;
487
+ font-weight: var(--font-weight-semibold);
488
+ line-height: inherit;
489
+ text-overflow: ellipsis;
490
+ white-space: nowrap;
491
+ }
492
+
493
+ calendar-event :is(.event-time, .event-detail, .event-attendees) {
494
+ overflow: hidden;
495
+ color: var(--event-ink-soft);
496
+ white-space: nowrap;
497
+ }
498
+
499
+ calendar-event :is(.event-time, .event-detail) {
500
+ text-overflow: ellipsis;
501
+ }
502
+
503
+ calendar-event .event-time {
504
+ font-variant-numeric: tabular-nums;
505
+ }
506
+
507
+ /* Attendees: a person icon, then as many names as fit whole and a count of
508
+ the rest. The page sets the names to fit the block's width, so a name is
509
+ never cut off. */
510
+ calendar-event .event-attendees {
511
+ display: flex;
512
+ align-items: center;
513
+ gap: 0.3em;
514
+ margin-top: 0.35em;
515
+ }
516
+
517
+ calendar-event .event-attendees-icon {
518
+ flex: none;
519
+ width: 1.1em;
520
+ height: 1.1em;
521
+ }
522
+
523
+ calendar-event .event-attendees-names {
524
+ flex: 1 1 0;
525
+ min-width: 0;
526
+ overflow: hidden;
527
+ }
528
+
529
+ calendar-event :is(.event-time, .event-detail, .event-attendees)[hidden] {
530
+ display: none;
531
+ }
532
+
533
+ /* ------------------------------------------------------------------ */
534
+ /* Timed events */
535
+ /* ------------------------------------------------------------------ */
536
+
537
+ /* Each event spans its day's column; the block inside is placed in its
538
+ overlap column. With W the column width less the insets, a column is
539
+ (W + gap) / count wide including its trailing gap. */
540
+ calendar-grid calendar-event .event-block {
541
+ grid-column: calc(var(--day-index) + 1);
542
+ grid-row: 1 / -1;
543
+ position: relative;
544
+ z-index: 1;
545
+ --event-track: calc((100% - var(--event-inset-start, 2px) - var(--event-inset-end, 4px) + var(--event-gap, 2px)) / var(--column-count, 1));
546
+ }
547
+
548
+ calendar-grid calendar-event .event-block-inner {
549
+ position: absolute;
550
+ top: calc(var(--y-start) * 100% + 1px);
551
+ height: calc((var(--y-end) - var(--y-start)) * 100% - 2px);
552
+ left: calc(var(--event-inset-start, 2px) + var(--column-index, 0) * var(--event-track));
553
+ width: calc(var(--column-span, 1) * var(--event-track) - var(--event-gap, 2px));
554
+ /* The block's own height decides which lines fit; see the queries below. */
555
+ container: event / size;
556
+ }
557
+
558
+ /* A short event shows its title with the start time beside it. The line is
559
+ centred in a block too low for the usual padding, and otherwise sits at
560
+ the usual padding from the top; cqh measures the block's height. */
561
+ calendar-grid calendar-event[data-size="short"] .event-block-inner {
562
+ flex-direction: row;
563
+ align-items: baseline;
564
+ gap: 0.4em;
565
+ padding-top: 0;
566
+ padding-bottom: 0;
567
+ }
568
+
569
+ calendar-grid calendar-event[data-size="short"] h3 {
570
+ flex: 0 1 auto;
571
+ min-width: 0;
572
+ margin-top: clamp(0px, (100cqh - 1.2em) / 2, var(--event-padding-block, 4px));
573
+ }
574
+
575
+ calendar-grid calendar-event[data-size="short"] .event-time {
576
+ flex: none;
577
+ font-size: 0.92em;
578
+ }
579
+
580
+ calendar-grid calendar-event[data-size="short"] :is(.event-detail, .event-attendees) {
581
+ display: none;
582
+ }
583
+
584
+ /* In a narrow block the title keeps the room. */
585
+ @container event (width < 9em) {
586
+ calendar-grid calendar-event[data-size="short"] .event-time { display: none; }
587
+ }
588
+
589
+ /* Lines appear only when the block is tall enough to show them whole: each
590
+ line is 1.2em with 0.1em between, and attendees sit 0.35em lower. */
591
+ @container event (height < 2.5em) {
592
+ calendar-event[data-size="long"] .event-time { display: none; }
593
+ }
594
+
595
+ @container event (height < 3.8em) {
596
+ calendar-event .event-detail { display: none; }
597
+ }
598
+
599
+ @container event (height < 5.45em) {
600
+ calendar-event .event-attendees { display: none; }
601
+ }
602
+
603
+ /* A narrow block, such as one of two overlapping events, wraps its title
604
+ onto a second line in place of the detail line. */
605
+ @container event (width < 9em) and (height >= 3.7em) {
606
+ calendar-event[data-size="long"] h3 {
607
+ display: -webkit-box;
608
+ -webkit-box-orient: vertical;
609
+ -webkit-line-clamp: 2;
610
+ /* Titles wrap only between words; a word wider than the block ends in
611
+ an ellipsis. */
612
+ white-space: normal;
613
+ }
614
+
615
+ calendar-event[data-size="long"] .event-detail {
616
+ display: none;
617
+ }
618
+ }
619
+
620
+ /* ------------------------------------------------------------------ */
621
+ /* All-day events */
622
+ /* ------------------------------------------------------------------ */
623
+
624
+ calendar-allday calendar-event .event-block {
625
+ grid-column: calc(var(--day-start) + 1) / span var(--day-span);
626
+ grid-row: var(--lane-index);
627
+ padding: 1px var(--event-inset-end, 4px) 1px var(--event-inset-start, 2px);
628
+ }
629
+
630
+ calendar-allday calendar-event .event-block-inner {
631
+ flex-direction: row;
632
+ align-items: baseline;
633
+ gap: 0.5em;
634
+ padding-top: 0.2em;
635
+ padding-bottom: 0.2em;
636
+ }
637
+
638
+ calendar-allday calendar-event .event-detail {
639
+ flex: 0 1 auto;
640
+ min-width: 0;
641
+ }
642
+
643
+ calendar-allday calendar-event .event-attendees {
644
+ display: none;
645
+ }
646
+
647
+ /* ------------------------------------------------------------------ */
648
+ /* Highlight */
649
+ /* ------------------------------------------------------------------ */
650
+
651
+ /* A highlighted event lifts off the page: it rises, grows and tilts slightly
652
+ toward the viewer while a broad, layered shadow spreads beneath it. The
653
+ raised block sits above every other event and the now line. Its denser
654
+ fill takes the title's ink for the other lines as well. */
655
+ calendar-event[highlight] {
656
+ --event-ink-soft: var(--event-ink);
657
+ }
658
+
659
+ calendar-event[highlight] .event-block {
660
+ z-index: 4;
661
+ }
662
+
663
+ calendar-event[highlight] .event-block-inner {
664
+ --event-fill: color-mix(in oklab, var(--event-hue) var(--event-fill-strength-raised), var(--color-surface));
665
+ transform-origin: 50% 100%;
666
+ transform:
667
+ perspective(var(--lift-perspective, 700px))
668
+ translateY(var(--lift-rise, -7px))
669
+ rotateX(var(--lift-tilt, -3deg))
670
+ scale(var(--lift-scale, 1.06));
671
+ box-shadow:
672
+ /* Light catching the top edge, and a fine rim in the event's hue. */
673
+ inset 0 1px 0 oklch(from var(--event-fill) calc(l + 0.1) c h),
674
+ 0 0 0 1px oklch(from var(--event-hue) l c h / var(--lift-rim-alpha, 22%)),
675
+ /* Contact shadow, close under the block. */
676
+ 0 2px 5px oklch(from var(--neutral-950) l c h / var(--lift-contact-alpha, 14%)),
677
+ /* Body shadow, offset down as the block rises. */
678
+ 0 14px 28px -8px oklch(from var(--neutral-950) l c h / var(--lift-body-alpha, 26%)),
679
+ /* Broad ambient shadow, faintly tinted with the event's hue. */
680
+ 0 36px 72px -14px oklch(from var(--event-hue) calc(l * var(--lift-ambient-lightness, 0.45)) calc(c * 0.6) h / var(--lift-ambient-alpha, 42%));
681
+ }
682
+
683
+ /* On a dark ground a tinted shadow reads as a glow, so it goes near black. */
684
+ :root[data-theme="dark"] calendar-event[highlight] .event-block-inner {
685
+ --lift-contact-alpha: 50%;
686
+ --lift-body-alpha: 55%;
687
+ --lift-ambient-alpha: 75%;
688
+ --lift-ambient-lightness: 0.12;
689
+ --lift-rim-alpha: 40%;
690
+ }
691
+
692
+ /* Motion starts only once the calendar is ready after its first render, so
693
+ an event that loads raised appears raised. Both directions ease out
694
+ smoothly, with no overshoot; settling is quicker than rising. */
695
+ calendar-week[data-ready] calendar-event .event-block-inner {
696
+ transition:
697
+ transform 450ms cubic-bezier(0.32, 0.72, 0, 1),
698
+ box-shadow 450ms cubic-bezier(0.32, 0.72, 0, 1),
699
+ background-color 450ms ease;
700
+ }
701
+
702
+ calendar-week[data-ready] calendar-event[highlight] .event-block-inner {
703
+ transition:
704
+ transform 700ms cubic-bezier(0.16, 1, 0.3, 1),
705
+ box-shadow 700ms cubic-bezier(0.16, 1, 0.3, 1),
706
+ background-color 300ms ease;
707
+ }
708
+
709
+ @media (prefers-reduced-motion: reduce) {
710
+ calendar-week[data-ready] calendar-event .event-block-inner,
711
+ calendar-week[data-ready] calendar-event[highlight] .event-block-inner {
712
+ transition: none;
713
+ }
714
+ }
715
+
716
+ /* ------------------------------------------------------------------ */
717
+ /* Range slide */
718
+ /* ------------------------------------------------------------------ */
719
+
720
+ /* A new start date slides the days sideways as a view transition. The days
721
+ and each hour label in view are captured on their own, so the days move
722
+ while the hour labels stay put; the names apply only while a slide is
723
+ under way. The old days and the new travel together as one strip, each
724
+ image dropping its blank gutter, and the strip stays within the days' own
725
+ area. */
726
+ :root[data-calendar-move] calendar-week {
727
+ view-transition-name: calendar-days;
728
+ }
729
+
730
+ :root[data-calendar-move]::view-transition-group(calendar-days) {
731
+ clip-path: inset(0 0 0 var(--calendar-move-gutter));
732
+ }
733
+
734
+ :root[data-calendar-move]::view-transition-old(calendar-days),
735
+ :root[data-calendar-move]::view-transition-new(calendar-days) {
736
+ animation: none;
737
+ mix-blend-mode: normal;
738
+ clip-path: inset(0 0 0 var(--calendar-move-gutter));
739
+ }
740
+
741
+ /* When the month or year changes too, the title is captured on its own: the
742
+ old title fades out, then the new one fades in, each at its own size, and
743
+ the two never show together. */
744
+ :root[data-calendar-move="month"] #range-label {
745
+ view-transition-name: calendar-month;
746
+ }
747
+
748
+ :root[data-calendar-move]::view-transition-group(calendar-month) {
749
+ animation: none;
750
+ }
751
+
752
+ :root[data-calendar-move]::view-transition-old(calendar-month),
753
+ :root[data-calendar-move]::view-transition-new(calendar-month) {
754
+ inline-size: auto;
755
+ }
756
+
757
+ :root[data-calendar-move]::view-transition-old(calendar-month) {
758
+ animation: calendar-month-out 160ms ease both;
759
+ }
760
+
761
+ :root[data-calendar-move]::view-transition-new(calendar-month) {
762
+ animation: calendar-month-in 160ms ease 160ms both;
763
+ }
764
+
765
+ @keyframes calendar-month-out {
766
+ to { opacity: 0; }
767
+ }
768
+
769
+ @keyframes calendar-month-in {
770
+ from { opacity: 0; }
771
+ }