@telepath-computer/television 1.5.9 → 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-CPopSWec.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
@@ -1,400 +0,0 @@
1
- var St = Object.defineProperty;
2
- var F = (e) => {
3
- throw TypeError(e);
4
- };
5
- var bt = (e, r, t) => r in e ? St(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
6
- var z = (e, r, t) => bt(e, typeof r != "symbol" ? r + "" : r, t), O = (e, r, t) => r.has(e) || F("Cannot " + t);
7
- var s = (e, r, t) => (O(e, r, "read from private field"), t ? t.call(e) : r.get(e)), h = (e, r, t) => r.has(e) ? F("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(e) : r.set(e, t), u = (e, r, t, n) => (O(e, r, "write to private field"), n ? n.call(e, t) : r.set(e, t), t), d = (e, r, t) => (O(e, r, "access private method"), t);
8
- class vt extends HTMLElement {
9
- connectedCallback() {
10
- this.dispatchEvent(new Event("reactive:connect"));
11
- }
12
- disconnectedCallback() {
13
- this.dispatchEvent(new Event("reactive:disconnect"));
14
- }
15
- }
16
- customElements.define("calendar-event", vt);
17
- const N = 12;
18
- var K, Q;
19
- class Pt extends HTMLElement {
20
- constructor() {
21
- super(...arguments);
22
- h(this, K);
23
- }
24
- connectedCallback() {
25
- this.dispatchEvent(new Event("reactive:connect")), d(this, K, Q).call(this);
26
- }
27
- disconnectedCallback() {
28
- this.dispatchEvent(new Event("reactive:disconnect"));
29
- }
30
- }
31
- K = new WeakSet(), Q = function() {
32
- const t = Array.from({ length: 24 }, (n, a) => {
33
- const i = document.createElement("div");
34
- return i.classList.add("hour-label"), i.style.setProperty("--hour-index", String(a)), i.setAttribute("data-hour", String(a)), i.textContent = Dt(a), i;
35
- });
36
- this.replaceChildren(...t);
37
- };
38
- customElements.define("calendar-time-axis", Pt);
39
- function Dt(e) {
40
- const r = e < N ? "AM" : "PM";
41
- return `${e % N === 0 ? N : e % N} ${r}`;
42
- }
43
- const q = 24, Ct = 8, Mt = 6e4, Z = 23, xt = 59, Tt = 1e3, L = 60, $ = q * L, tt = $ * L * Tt, At = /^(\d{4})-(\d{2})-(\d{2})$/, kt = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})$/, Ht = ["days", "startDate", "startHour"];
44
- var g, v, y, k, m, b, x, T, M, H, A, P, D, C, w, o, nt, R, I, rt, st, at, it, ot, lt, ct, dt, B, ut, ht, yt, Y, pt, U;
45
- class et extends HTMLElement {
46
- constructor() {
47
- super();
48
- h(this, o);
49
- h(this, g, null);
50
- h(this, v, 0);
51
- h(this, y, null);
52
- h(this, k, !1);
53
- h(this, m, null);
54
- h(this, b, null);
55
- h(this, x, !1);
56
- h(this, T, null);
57
- h(this, M, /* @__PURE__ */ new Set());
58
- h(this, H, /* @__PURE__ */ new Map());
59
- h(this, A, null);
60
- h(this, P, "");
61
- h(this, D);
62
- h(this, C, !1);
63
- h(this, w, !1);
64
- const t = this;
65
- for (const n of Ht)
66
- Object.hasOwn(this, n) && (s(this, H).set(n, t[n]), delete t[n]);
67
- }
68
- get days() {
69
- return s(this, v);
70
- }
71
- set days(t) {
72
- Object.is(s(this, v), t) || (u(this, v, t), d(this, o, R).call(this, "days"));
73
- }
74
- get startDate() {
75
- return s(this, P);
76
- }
77
- set startDate(t) {
78
- s(this, P) !== t && (u(this, P, t), d(this, o, R).call(this, "start-date"));
79
- }
80
- get startHour() {
81
- return s(this, D);
82
- }
83
- set startHour(t) {
84
- Object.is(s(this, D), t) || (u(this, D, t), d(this, o, R).call(this, "start-hour"));
85
- }
86
- connectedCallback() {
87
- this.dispatchEvent(new Event("reactive:connect")), u(this, T, setInterval(() => d(this, o, Y).call(this), Mt)), s(this, k) ? (s(this, x) || s(this, C)) && d(this, o, I).call(this) : (u(this, k, !0), s(this, M).add("days"), s(this, M).add("start-date"), d(this, o, nt).call(this), u(this, C, !0), d(this, o, I).call(this));
88
- }
89
- disconnectedCallback() {
90
- var t;
91
- this.dispatchEvent(new Event("reactive:disconnect")), s(this, T) !== null && (clearInterval(s(this, T)), u(this, T, null)), (t = s(this, b)) == null || t.disconnect();
92
- }
93
- attributeChangedCallback(t, n, a) {
94
- n !== a && d(this, o, at).call(this, t, a) && (u(this, C, !0), d(this, o, I).call(this));
95
- }
96
- changed() {
97
- const t = d(this, o, lt).call(this), n = Lt(this.startDate, this.days), a = t.map((c) => ({
98
- event: c,
99
- placement: n ? _t(c, n) : null
100
- })), i = qt(a), l = Kt(this.startHour, a.map(({ placement: c }) => c));
101
- if (u(this, A, n), this.style.setProperty("--day-count", String((n == null ? void 0 : n.dayCount) ?? 0)), this.style.setProperty("--hour-count", String(q)), this.style.setProperty("--start-hour", String(l)), !n) {
102
- d(this, o, ut).call(this);
103
- for (const { event: c } of a)
104
- W(c), this.append(c);
105
- return;
106
- }
107
- d(this, o, ht).call(this, n), d(this, o, yt).call(this, a, n, i), d(this, o, Y).call(this), d(this, o, ot).call(this);
108
- }
109
- }
110
- g = new WeakMap(), v = new WeakMap(), y = new WeakMap(), k = new WeakMap(), m = new WeakMap(), b = new WeakMap(), x = new WeakMap(), T = new WeakMap(), M = new WeakMap(), H = new WeakMap(), A = new WeakMap(), P = new WeakMap(), D = new WeakMap(), C = new WeakMap(), w = new WeakMap(), o = new WeakSet(), nt = function() {
111
- for (const [t, n] of s(this, H))
112
- switch (t) {
113
- case "days":
114
- this.days = n;
115
- break;
116
- case "startDate":
117
- this.startDate = n;
118
- break;
119
- case "startHour":
120
- this.startHour = n;
121
- break;
122
- }
123
- s(this, H).clear();
124
- }, R = function(t) {
125
- s(this, M).add(t), u(this, C, !0), d(this, o, I).call(this);
126
- }, I = function() {
127
- s(this, w) || (u(this, w, !0), queueMicrotask(() => d(this, o, rt).call(this)));
128
- }, rt = function() {
129
- if (u(this, w, !1), !s(this, k)) return;
130
- const t = s(this, C) || s(this, x);
131
- if (u(this, C, !1), u(this, x, !1), d(this, o, st).call(this), !this.isConnected) {
132
- u(this, x, t);
133
- return;
134
- }
135
- t && d(this, o, it).call(this);
136
- }, st = function() {
137
- const t = [...s(this, M)];
138
- s(this, M).clear();
139
- for (const n of t) {
140
- const a = n === "days" ? s(this, v) : n === "start-date" ? s(this, P) : s(this, D), i = a === void 0 ? null : String(a);
141
- i === null ? this.removeAttribute(n) : this.getAttribute(n) !== i && this.setAttribute(n, i);
142
- }
143
- }, at = function(t, n) {
144
- switch (t) {
145
- case "days": {
146
- const a = X(n);
147
- return Object.is(s(this, v), a) ? !1 : (u(this, v, a), !0);
148
- }
149
- case "start-date": {
150
- const a = n ?? void 0;
151
- return s(this, P) === a ? !1 : (u(this, P, a), !0);
152
- }
153
- case "start-hour": {
154
- const a = X(n);
155
- return Object.is(s(this, D), a) ? !1 : (u(this, D, a), !0);
156
- }
157
- default:
158
- return !1;
159
- }
160
- }, it = function() {
161
- try {
162
- this.changed();
163
- } catch (t) {
164
- console.error(t);
165
- }
166
- }, ot = function() {
167
- requestAnimationFrame(() => {
168
- var l, c, p;
169
- d(this, o, U).call(this);
170
- const t = (l = s(this, y)) == null ? void 0 : l.querySelector(":scope > .start-hour-marker");
171
- if (!t) return;
172
- const n = (((c = s(this, m)) == null ? void 0 : c.offsetHeight) ?? 0) + (((p = s(this, g)) == null ? void 0 : p.offsetHeight) ?? 0), a = Math.max(this.scrollHeight - this.clientHeight, 0);
173
- if (a <= 0) return;
174
- const i = this.scrollTop + (t.getBoundingClientRect().top - this.getBoundingClientRect().top) - n;
175
- this.scrollTop = Math.max(0, Math.min(i, a));
176
- });
177
- }, lt = function() {
178
- return Array.from(this.querySelectorAll("calendar-event"));
179
- }, ct = function() {
180
- s(this, m) || (u(this, m, document.createElement("calendar-headers")), this.append(s(this, m))), s(this, y) || (u(this, y, document.createElement("calendar-grid")), this.append(s(this, y)));
181
- }, dt = function(t) {
182
- s(this, g) || (u(this, g, document.createElement("calendar-allday")), this.insertBefore(s(this, g), s(this, y)));
183
- const n = t.days.map((a, i) => wt(a, i + 1));
184
- s(this, g).replaceChildren(...n);
185
- }, B = function() {
186
- var t;
187
- (t = s(this, g)) == null || t.remove(), u(this, g, null), this.style.removeProperty("--allday-lane-count");
188
- }, ut = function() {
189
- var t, n, a;
190
- (t = s(this, b)) == null || t.disconnect(), (n = s(this, m)) == null || n.remove(), d(this, o, B).call(this), (a = s(this, y)) == null || a.remove(), u(this, m, null), u(this, y, null), this.style.removeProperty("--headers-height"), this.style.removeProperty("--allday-lane-count");
191
- }, ht = function(t) {
192
- d(this, o, ct).call(this);
193
- const n = t.days.map((i, l) => It(i, l + 1)), a = [
194
- document.createElement("calendar-time-axis"),
195
- ...t.days.map((i, l) => Nt(i, l + 1)),
196
- Rt()
197
- ];
198
- s(this, m).replaceChildren(...n), s(this, y).replaceChildren(...a), d(this, o, pt).call(this);
199
- }, yt = function(t, n, a) {
200
- const i = t.filter(Et);
201
- if (i.length > 0) {
202
- d(this, o, dt).call(this, n), this.style.setProperty("--allday-lane-count", String(a));
203
- for (const { event: l, placement: c } of i)
204
- V(l, c), s(this, g).append(l);
205
- } else
206
- d(this, o, B).call(this);
207
- for (const { event: l, placement: c } of t.filter(gt).sort(ft))
208
- V(l, c), s(this, y).append(l);
209
- for (const { event: l } of t.filter(({ placement: c }) => c === null))
210
- W(l), this.append(l);
211
- }, Y = function() {
212
- var f, S;
213
- const t = (f = s(this, y)) == null ? void 0 : f.querySelector(":scope > .now-line"), n = (S = s(this, y)) == null ? void 0 : S.querySelector(":scope > .now-line-faint");
214
- if (!s(this, y) || !s(this, A)) {
215
- n == null || n.remove(), t == null || t.remove();
216
- return;
217
- }
218
- const a = /* @__PURE__ */ new Date(), l = j(a.getFullYear(), a.getMonth() + 1, a.getDate()) - s(this, A).startDayKey + 1;
219
- if (l < 1 || l > s(this, A).dayCount) {
220
- n == null || n.remove(), t == null || t.remove();
221
- return;
222
- }
223
- const c = (a.getHours() + a.getMinutes() / L) / q, p = n ?? document.createElement("div");
224
- n || (p.classList.add("now-line-faint"), s(this, y).append(p));
225
- const E = t ?? document.createElement("div");
226
- t || (E.classList.add("now-line"), s(this, y).append(E)), p.style.setProperty("--y-fraction", String(c)), E.style.setProperty("--day-index", String(l)), E.style.setProperty("--y-fraction", String(c));
227
- }, pt = function() {
228
- var t;
229
- if (!s(this, m)) {
230
- (t = s(this, b)) == null || t.disconnect(), this.style.removeProperty("--headers-height");
231
- return;
232
- }
233
- if (typeof ResizeObserver != "function") {
234
- d(this, o, U).call(this);
235
- return;
236
- }
237
- s(this, b) || u(this, b, new ResizeObserver(() => d(this, o, U).call(this))), s(this, b).disconnect(), s(this, b).observe(s(this, m));
238
- }, U = function() {
239
- var t;
240
- this.style.setProperty("--headers-height", `${((t = s(this, m)) == null ? void 0 : t.offsetHeight) ?? 0}px`);
241
- }, z(et, "observedAttributes", ["days", "start-date", "start-hour"]);
242
- customElements.define("calendar-week", et);
243
- function wt(e, r) {
244
- const t = document.createElement("calendar-cell");
245
- return t.setAttribute("date", e.iso), t.style.setProperty("--day-index", String(r)), t;
246
- }
247
- function It(e, r) {
248
- const t = document.createElement("calendar-day");
249
- t.setAttribute("date", e.iso), t.style.setProperty("--day-index", String(r));
250
- const n = document.createElement("span");
251
- n.classList.add("weekday"), n.textContent = e.labelWeekday;
252
- const a = document.createElement("span");
253
- return a.classList.add("date-num"), a.textContent = e.labelDay, t.append(n, a), t;
254
- }
255
- function Nt(e, r) {
256
- const t = document.createElement("calendar-column");
257
- return t.setAttribute("date", e.iso), t.style.setProperty("--day-index", String(r)), t;
258
- }
259
- function Rt() {
260
- const e = document.createElement("div");
261
- return e.classList.add("start-hour-marker"), e;
262
- }
263
- function V(e, r) {
264
- const t = Ut(e), n = e.getAttribute("title") ?? "";
265
- if (t.querySelector("h3").textContent = n, r.kind === "all-day") {
266
- e.style.setProperty("--day-start", String(r.dayStart)), e.style.setProperty("--day-span", String(r.daySpan)), e.style.setProperty("--lane-index", String(r.laneIndex)), e.style.removeProperty("--day-index"), e.style.removeProperty("--y-start"), e.style.removeProperty("--y-end"), e.style.removeProperty("--cascade-depth");
267
- return;
268
- }
269
- e.style.setProperty("--day-index", String(r.dayIndex)), e.style.setProperty("--y-start", String(r.yStart)), e.style.setProperty("--y-end", String(r.yEnd)), e.style.setProperty("--cascade-depth", String(r.cascadeDepth)), e.style.removeProperty("--day-start"), e.style.removeProperty("--day-span"), e.style.removeProperty("--lane-index");
270
- }
271
- function W(e) {
272
- var r;
273
- (r = e.querySelector(":scope > .event-block")) == null || r.remove(), e.style.removeProperty("--day-index"), e.style.removeProperty("--y-start"), e.style.removeProperty("--y-end"), e.style.removeProperty("--day-start"), e.style.removeProperty("--day-span"), e.style.removeProperty("--lane-index"), e.style.removeProperty("--cascade-depth");
274
- }
275
- function Ut(e) {
276
- let r = e.querySelector(":scope > .event-block");
277
- if (r) return r;
278
- r = document.createElement("div"), r.classList.add("event-block");
279
- const t = document.createElement("div");
280
- t.classList.add("event-block-inner");
281
- const n = document.createElement("h3");
282
- return t.append(n), r.append(t), e.append(r), r;
283
- }
284
- function _t(e, r) {
285
- const t = e.getAttribute("title"), n = e.getAttribute("start"), a = e.getAttribute("end");
286
- if (t === null || n === null || a === null) return null;
287
- if (e.hasAttribute("all-day")) {
288
- const p = _(n), E = _(a);
289
- if (!p || !E || E.dayKey <= p.dayKey) return null;
290
- const f = Math.max(p.dayKey, r.startDayKey), S = Math.min(E.dayKey, r.endDayKey);
291
- return S <= f ? null : {
292
- kind: "all-day",
293
- daySpan: S - f,
294
- dayStart: f - r.startDayKey + 1,
295
- laneIndex: 1
296
- };
297
- }
298
- const i = G(n), l = G(a);
299
- if (!i || !l || i.dayKey !== l.dayKey || l.totalMinutes <= i.totalMinutes) return null;
300
- const c = i.dayKey - r.startDayKey + 1;
301
- return c < 1 || c > r.dayCount ? null : {
302
- cascadeDepth: 0,
303
- kind: "timed",
304
- dayIndex: c,
305
- endMinutes: l.totalMinutes,
306
- startHour: i.hour,
307
- startMinutes: i.totalMinutes,
308
- yEnd: l.totalMinutes / $,
309
- yStart: i.totalMinutes / $
310
- };
311
- }
312
- function Kt(e, r) {
313
- if (Number.isInteger(e) && e >= 0 && e <= Z)
314
- return e;
315
- const t = r.filter((n) => (n == null ? void 0 : n.kind) === "timed").map((n) => n.startHour);
316
- return t.length > 0 ? Math.max(Math.min(...t) - 1, 0) : Ct;
317
- }
318
- function Lt(e, r) {
319
- if (typeof r != "number" || !Number.isInteger(r) || r < 1 || e === void 0) return null;
320
- const t = _(e);
321
- if (!t) return null;
322
- const n = Array.from({ length: r }, (a, i) => Ot(t, i));
323
- return {
324
- dayCount: r,
325
- days: n,
326
- endDayKey: t.dayKey + r,
327
- startDayKey: t.dayKey
328
- };
329
- }
330
- function X(e) {
331
- return e === null ? void 0 : Number(e);
332
- }
333
- function _(e) {
334
- const r = At.exec(e);
335
- if (!r) return null;
336
- const [, t, n, a] = r, i = Number(t), l = Number(n), c = Number(a);
337
- if (!mt(i, l, c)) return null;
338
- const p = new Date(i, l - 1, c);
339
- return {
340
- dayKey: j(i, l, c),
341
- iso: e,
342
- labelDay: String(c),
343
- labelWeekday: p.toLocaleDateString(void 0, { weekday: "short" })
344
- };
345
- }
346
- function G(e) {
347
- const r = kt.exec(e);
348
- if (!r) return null;
349
- const [, t, n, a, i, l] = r, c = Number(t), p = Number(n), E = Number(a), f = Number(i), S = Number(l);
350
- return !mt(c, p, E) || !Number.isInteger(f) || f < 0 || f > Z || !Number.isInteger(S) || S < 0 || S > xt ? null : {
351
- dayKey: j(c, p, E),
352
- hour: f,
353
- totalMinutes: f * L + S
354
- };
355
- }
356
- function Ot(e, r) {
357
- const t = new Date((e.dayKey + r) * tt), n = t.getUTCFullYear(), a = t.getUTCMonth() + 1, i = t.getUTCDate();
358
- return _(
359
- `${n}-${String(a).padStart(2, "0")}-${String(i).padStart(2, "0")}`
360
- );
361
- }
362
- function mt(e, r, t) {
363
- const n = new Date(Date.UTC(e, r - 1, t));
364
- return n.getUTCFullYear() === e && n.getUTCMonth() === r - 1 && n.getUTCDate() === t;
365
- }
366
- function j(e, r, t) {
367
- return Date.UTC(e, r - 1, t) / tt;
368
- }
369
- function qt(e) {
370
- const r = [];
371
- for (const { placement: n } of e.filter(Et)) {
372
- const a = n.dayStart + n.daySpan;
373
- let i = r.findIndex(
374
- (l) => l.every((c) => !J(c.dayStart, c.dayStart + c.daySpan, n.dayStart, a))
375
- );
376
- i === -1 && (r.push([]), i = r.length - 1), n.laneIndex = i + 1, r[i].push(n);
377
- }
378
- const t = /* @__PURE__ */ new Map();
379
- for (const { placement: n } of e.filter(gt).sort(ft)) {
380
- const a = t.get(n.dayIndex) ?? [];
381
- n.cascadeDepth = a.filter(
382
- (i) => i.startMinutes < n.startMinutes && J(i.startMinutes, i.endMinutes, n.startMinutes, n.endMinutes)
383
- ).length, a.push(n), t.set(n.dayIndex, a);
384
- }
385
- return r.length;
386
- }
387
- function ft(e, r) {
388
- return e.placement.dayIndex - r.placement.dayIndex || e.placement.startMinutes - r.placement.startMinutes || e.placement.endMinutes - r.placement.endMinutes;
389
- }
390
- function Et(e) {
391
- var r;
392
- return ((r = e.placement) == null ? void 0 : r.kind) === "all-day";
393
- }
394
- function gt(e) {
395
- var r;
396
- return ((r = e.placement) == null ? void 0 : r.kind) === "timed";
397
- }
398
- function J(e, r, t, n) {
399
- return e < n && t < r;
400
- }
@@ -1,95 +0,0 @@
1
- ---
2
- name: tv-table
3
- description: Author dense Airtable-style HTML record tables using the shared Television house style.
4
- ---
5
-
6
- # Authoring a record table
7
-
8
- Know the main `television` skill first. Re-read it only if it is not already in your context or you know it changed. It defines the general Television workflow and the canonical HTML house style (`<link rel="stylesheet" href="/canonical/v2/styles.css?authoredForAppVersion=<version>" />`). This skill only adds table-specific guidance.
9
-
10
- For a running server, read the exact release `version` from `tv status`; when working in a Television checkout, read the exact version from the checkout root `package.json`. Copy that exact release version unchanged into `authoredForAppVersion`. A missing version or the `0.0.0` development sentinel does not identify a release, so omit the metadata.
11
-
12
- A dense, Airtable-style table of records. Lots of cells, mixed cell types,
13
- structured rows. It should look crisp at a glance and read like real software,
14
- not a styled spreadsheet.
15
-
16
- ## Required content
17
-
18
- - `<h1>` heading with a short title naming the table
19
- - one paragraph describing what the table contains and how many rows it has
20
- - a `<table>` with:
21
- - a `<thead>` row of column labels
22
- - 8–15 `<tbody>` rows of data
23
- - 4–6 columns covering a mix of cell types
24
- - realistic-looking values, not placeholders
25
-
26
- At minimum include:
27
-
28
- - one **text** column
29
- - one **status** column rendered as a pill
30
- - one **date** column
31
- - one **person** column
32
- - one **numeric** or **tag** column
33
-
34
- ## Page layout
35
-
36
- The artifact is a full-width table view, not a centered prose document.
37
- Do not wrap the content in `<main>` or any other width-constraining container.
38
-
39
- Use this page structure:
40
-
41
- ```html
42
- <body>
43
- <header class="lead">
44
- <h1>...</h1>
45
- <p class="lede">...</p>
46
- </header>
47
- <table class="records">
48
- ...
49
- </table>
50
- </body>
51
- ```
52
-
53
- Use `--color-surface` for the page background and `--color-text` for its text.
54
- Hairline borders using `--color-border` around the thead and between rows do the visual work.
55
-
56
- ## Styling guidance
57
-
58
- Follow the base spacing-token rule: use only listed spacing tokens, and include
59
- pixel fallbacks whenever you use them.
60
-
61
- - `header.lead` padding: `var(--space-32, 32px) var(--space-32, 32px) var(--space-16, 16px)`
62
- - `table.records`: `width: 100%; border-collapse: collapse;`
63
- - use `font-variant-numeric: tabular-nums;`
64
- - pad the first and last cells so the table aligns with the page gutter
65
- - keep header text small, muted, and uppercase
66
- - right-align numeric and date columns
67
- - make the title cell slightly heavier than surrounding cells
68
-
69
- ## Borders
70
-
71
- - thead gets a top and bottom hairline border
72
- - tbody rows get muted bottom borders
73
- - the last tbody row gets the stronger final border
74
- - no vertical column rules
75
-
76
- ## Status pills
77
-
78
- Status pills should be inline, rounded, and subtle. Use calm background accents rather than loud badges.
79
-
80
- ## Sections (optional)
81
-
82
- A single ungrouped table is the default. Only break into sections when a categorical field is genuinely the main way the user scans the data and each section has enough rows to matter.
83
-
84
- If you do use sections:
85
-
86
- - render each group as its own `<table>` inside `<section class="group">`
87
- - repeat the same `<colgroup>` and `<thead>` in every grouped table
88
- - order active states before terminal states
89
-
90
- ## Non-goals
91
-
92
- - no filtering, sorting, search, or selection UI
93
- - no nested tables or expandable rows
94
- - no sticky headers
95
- - no decorative icon spam