@telepath-computer/television 1.4.26 → 1.4.28

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.
@@ -40,7 +40,7 @@
40
40
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
41
41
  <link rel="icon" type="image/svg+xml" href="./assets/favicon-DaYMFRha.svg" />
42
42
  <title>Television</title>
43
- <script type="module" crossorigin src="./assets/main-C1ANF-FD.js"></script>
43
+ <script type="module" crossorigin src="./assets/main-B1UYVUiH.js"></script>
44
44
  <link rel="modulepreload" crossorigin href="./assets/artifact-bridge-BEUWXKq7.js">
45
45
  <link rel="modulepreload" crossorigin href="./assets/missing-artifact-page-DVzJ41AE.js">
46
46
  <link rel="stylesheet" crossorigin href="./assets/main-CunC2_Nx.css">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telepath-computer/television",
3
- "version": "1.4.26",
3
+ "version": "1.4.28",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,40 +0,0 @@
1
- // The two Productivity onboarding documents share one story day. Their dates
2
- // move together when the document opens, using the viewer's local calendar day.
3
- const dayMs = 86_400_000;
4
- const storyDay = Date.UTC(2026, 6, 8);
5
-
6
- /** Whole calendar days from July 8, 2026 to the local day of `now`. */
7
- export function localDayShift(now) {
8
- return (Date.UTC(now.getFullYear(), now.getMonth(), now.getDate()) - storyDay) / dayMs;
9
- }
10
-
11
- /** Shift an ISO date or local date-time while retaining its clock-time suffix. */
12
- export function shiftDate(value, days) {
13
- const shifted = new Date(`${value.slice(0, 10)}T00:00:00Z`);
14
- shifted.setUTCDate(shifted.getUTCDate() + days);
15
- return shifted.toISOString().slice(0, 10) + value.slice(10);
16
- }
17
-
18
- if (typeof document !== "undefined") {
19
- const today = new Date();
20
- const days = localDayShift(today);
21
-
22
- const tasks = document.querySelector("tv-task-list");
23
- if (tasks) {
24
- for (const due of tasks.querySelectorAll("tv-task-meta-due")) {
25
- due.setAttribute("date", shiftDate(due.getAttribute("date"), days));
26
- }
27
- document.querySelector("header p").textContent = today.toLocaleDateString("en-US", {
28
- weekday: "long", month: "long", day: "numeric",
29
- });
30
- }
31
-
32
- const calendar = document.querySelector("calendar-week");
33
- if (calendar) {
34
- calendar.setAttribute("start-date", shiftDate(calendar.getAttribute("start-date"), days));
35
- for (const event of calendar.querySelectorAll("calendar-event")) {
36
- event.setAttribute("start", shiftDate(event.getAttribute("start"), days));
37
- event.setAttribute("end", shiftDate(event.getAttribute("end"), days));
38
- }
39
- }
40
- }