counterparts 0.3.3 → 0.3.4

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 (128) hide show
  1. package/CHANGELOG.md +81 -0
  2. package/docs/module-map.md +3 -2
  3. package/package.json +1 -1
  4. package/src/adapters/claude-code/NOTES.md +16 -0
  5. package/src/adapters/claude-code/doctor.ts +146 -0
  6. package/src/adapters/claude-code/hooks.ts +31 -3
  7. package/src/adapters/claude-code/transcript.ts +7 -0
  8. package/src/adapters/cli/CONTRACT.md +11 -0
  9. package/src/adapters/cli/INTERFACE-GAPS.md +16 -0
  10. package/src/adapters/cli/NOTES.md +25 -0
  11. package/src/adapters/cli/commands.ts +173 -4
  12. package/src/adapters/cli/dream-core.ts +126 -0
  13. package/src/adapters/cli/help.ts +17 -0
  14. package/src/adapters/cli/mechanisms.ts +169 -101
  15. package/src/adapters/dashboard/CONTRACT.md +5 -0
  16. package/src/adapters/dashboard/INTERFACE-GAPS.md +12 -0
  17. package/src/adapters/dashboard/NOTES.md +38 -0
  18. package/src/adapters/dashboard/registries.ts +31 -1
  19. package/src/adapters/dashboard/web/README.md +45 -16
  20. package/src/adapters/dashboard/web/app.html +2 -0
  21. package/src/adapters/dashboard/web/flow.ts +12 -0
  22. package/src/adapters/dashboard/web/lanes.ts +141 -0
  23. package/src/adapters/dashboard/web/mechanisms/association/index.js +1 -2
  24. package/src/adapters/dashboard/web/mechanisms/consolidation/index.js +8 -5
  25. package/src/adapters/dashboard/web/mechanisms/consolidation/panel.js +7 -7
  26. package/src/adapters/dashboard/web/mechanisms/decay/index.js +1 -2
  27. package/src/adapters/dashboard/web/mechanisms/dreaming/index.js +19 -0
  28. package/src/adapters/dashboard/web/mechanisms/emotional/index.js +1 -2
  29. package/src/adapters/dashboard/web/mechanisms/episodic-semantic/index.js +4 -5
  30. package/src/adapters/dashboard/web/mechanisms/index.js +5 -3
  31. package/src/adapters/dashboard/web/mechanisms/interference/index.js +1 -2
  32. package/src/adapters/dashboard/web/mechanisms/prospective/index.js +1 -2
  33. package/src/adapters/dashboard/web/mechanisms/reconsolidation/index.js +1 -2
  34. package/src/adapters/dashboard/web/mechanisms/regions.js +1 -1
  35. package/src/adapters/dashboard/web/mechanisms/retrieval/index.js +1 -2
  36. package/src/adapters/dashboard/web/mechanisms/salience/index.js +1 -2
  37. package/src/adapters/dashboard/web/mechanisms/schema/index.js +1 -2
  38. package/src/adapters/dashboard/web/narrate.ts +68 -13
  39. package/src/adapters/dashboard/web/pages/home/home.css +29 -13
  40. package/src/adapters/dashboard/web/pages/home/index.js +2 -0
  41. package/src/adapters/dashboard/web/pages/home/sections/explorer.js +22 -7
  42. package/src/adapters/dashboard/web/pages/home/sections/hero.js +15 -3
  43. package/src/adapters/dashboard/web/pages/home/sections/live-activity.js +15 -9
  44. package/src/adapters/dashboard/web/pages/home/sections/recent-chapters.js +6 -2
  45. package/src/adapters/dashboard/web/pages/home/sections/tiles.js +35 -18
  46. package/src/adapters/dashboard/web/pages/memories/index.js +30 -36
  47. package/src/adapters/dashboard/web/pages/memories/memories.css +97 -72
  48. package/src/adapters/dashboard/web/pages/memories/row.js +51 -0
  49. package/src/adapters/dashboard/web/pages/memories/sections/feel.js +176 -0
  50. package/src/adapters/dashboard/web/pages/memories/sections/hold.js +67 -0
  51. package/src/adapters/dashboard/web/pages/memories/sections/list.js +65 -43
  52. package/src/adapters/dashboard/web/pages/memories/sections/search.js +26 -23
  53. package/src/adapters/dashboard/web/pages/memories/state.js +12 -5
  54. package/src/adapters/dashboard/web/pages/self/index.js +4 -2
  55. package/src/adapters/dashboard/web/pages/self/sections/dreams.js +76 -0
  56. package/src/adapters/dashboard/web/pages/self/sections/journal.js +1 -1
  57. package/src/adapters/dashboard/web/pages/self/sections/page.js +1 -1
  58. package/src/adapters/dashboard/web/pages/self/sections/settling.js +50 -20
  59. package/src/adapters/dashboard/web/pages/self/sections/wake.js +1 -1
  60. package/src/adapters/dashboard/web/pages/self/self.css +23 -20
  61. package/src/adapters/dashboard/web/pages/self/state.js +0 -2
  62. package/src/adapters/dashboard/web/server.ts +9 -0
  63. package/src/adapters/dashboard/web/shared/memory-marks.css +17 -0
  64. package/src/adapters/dashboard/web/shared/memory-marks.js +81 -0
  65. package/src/adapters/dashboard/web/shared/memory-modal.js +240 -62
  66. package/src/adapters/dashboard/web/shared/modal.css +67 -0
  67. package/src/adapters/dashboard/web/shared/tip.js +1 -1
  68. package/src/adapters/dashboard/web/shared/widgets/feed.css +4 -0
  69. package/src/adapters/dashboard/web/shared/widgets/feed.js +56 -14
  70. package/src/adapters/dashboard/web/shared/widgets/light.css +1 -0
  71. package/src/adapters/dashboard/web/shared/widgets/light.js +7 -5
  72. package/src/adapters/dashboard/web/shared/widgets/tips.css +19 -0
  73. package/src/adapters/dashboard/web/{pages/self → shared/widgets}/tips.js +15 -9
  74. package/src/adapters/dashboard/web/views/activity.ts +18 -2
  75. package/src/adapters/dashboard/web/views/archive-words.ts +27 -10
  76. package/src/adapters/dashboard/web/views/dreams.ts +199 -0
  77. package/src/adapters/dashboard/web/views/mechanism-panel.ts +116 -35
  78. package/src/adapters/dashboard/web/views/mechanisms.ts +81 -326
  79. package/src/adapters/dashboard/web/views/memories.ts +245 -43
  80. package/src/adapters/dashboard/web/views/memory-words.ts +133 -0
  81. package/src/adapters/dashboard/web/views/memory.ts +215 -7
  82. package/src/adapters/dashboard/web/views/mind.ts +133 -57
  83. package/src/adapters/dashboard/web/views/overview.ts +80 -42
  84. package/src/adapters/dashboard/web/views/search.ts +35 -1
  85. package/src/adapters/dashboard/web/views/shared.ts +14 -0
  86. package/src/adapters/dashboard/web/views.ts +2 -0
  87. package/src/adapters/fired.ts +85 -5
  88. package/src/adapters/mcp/NOTES.md +11 -0
  89. package/src/adapters/mcp/server.ts +90 -1
  90. package/src/adapters/mcp/tools.ts +129 -1
  91. package/src/adapters/mechanism-evidence.ts +465 -0
  92. package/src/core/counterpart.ts +113 -4
  93. package/src/core/dream/CONTRACT.md +143 -0
  94. package/src/core/dream/INTERFACE-GAPS.md +24 -0
  95. package/src/core/dream/NOTES.md +84 -0
  96. package/src/core/dream/index.ts +1067 -0
  97. package/src/core/dream/mark.ts +14 -0
  98. package/src/core/dream/tunables.ts +56 -0
  99. package/src/core/physics/CONTRACT.md +92 -24
  100. package/src/core/physics/NOTES.md +139 -0
  101. package/src/core/physics/index.ts +345 -68
  102. package/src/core/recall/NOTES.md +16 -0
  103. package/src/core/recall/index.ts +9 -2
  104. package/src/core/remember/CONTRACT.md +5 -0
  105. package/src/core/remember/spans.ts +11 -1
  106. package/src/core/self/CONTRACT.md +3 -0
  107. package/src/core/self/INTERFACE-GAPS.md +7 -0
  108. package/src/core/self/NOTES.md +30 -0
  109. package/src/core/self/identity.ts +95 -5
  110. package/src/core/self/index.ts +17 -0
  111. package/src/core/self/tunables.ts +17 -0
  112. package/src/core/sleep/CONTRACT.md +17 -1
  113. package/src/core/sleep/INTERFACE-GAPS.md +19 -0
  114. package/src/core/sleep/NOTES.md +36 -0
  115. package/src/core/sleep/consolidate.ts +149 -96
  116. package/src/core/sleep/decay.ts +11 -0
  117. package/src/core/sleep/index.ts +4 -1
  118. package/src/core/sleep/tunables.ts +9 -0
  119. package/src/core/sleep/types.ts +17 -0
  120. package/src/core/sleep/upgrade.ts +168 -0
  121. package/src/core/store/CONTRACT.md +12 -0
  122. package/src/core/store/NOTES.md +48 -0
  123. package/src/core/store/index.ts +610 -8
  124. package/src/core/store/operational.ts +314 -3
  125. package/src/core/store/owner-op-seam.ts +79 -1
  126. package/src/core/types.ts +28 -0
  127. package/src/adapters/dashboard/web/pages/memories/sections/constellation.js +0 -178
  128. package/src/adapters/dashboard/web/pages/memories/sections/kinds.js +0 -42
@@ -1,17 +1,28 @@
1
- /* Every memory, with its words — newest first, a page at a time. The server
2
- filters and pages (`/api/memories/list`), so a store of twenty thousand rows
3
- sends fifty. Click a row to open the memory. */
1
+ /* Every memory, with its words — newest first (or oldest), a page at a time.
2
+ The server filters, sorts and pages (`/api/memories/list`), so a store of
3
+ twenty thousand rows sends fifty. The kinds are chips in the filter row, each
4
+ with its icon and count. Click a row to open the memory. */
4
5
  import { absenceLine } from "../../../shared/absence.js";
5
6
  import { api, fail } from "../../../shared/api.js";
6
- import { BANDCOL } from "../../../shared/colors.js";
7
7
  import { $, esc } from "../../../shared/dom.js";
8
+ import { kindMark, kindOf } from "../../../shared/memory-marks.js";
9
+ import { memRow, wireRows } from "../row.js";
8
10
  import { filters, onFilter, setFilter, toggle } from "../state.js";
11
+ import { q, wireTips } from "../../../shared/widgets/tips.js";
9
12
 
10
13
  const PAGE = 50;
11
- const KIND_LABEL = { self: "about me", person: "people", entity: "things", skill: "skills", place: "places", fact: "facts" };
14
+
15
+ /** What each kind is, how fast it fades and how easily it is corrected — the
16
+ * words that used to be the six kind cards, now behind the `?`. */
17
+ const KIND_TIP = "Kinds: about me (who I am — fades slowly, hardest to argue out of) · people (fade slowly, hard to correct) · " +
18
+ "things (fade fairly fast) · skills (fade slowest, easy to correct) · places (fade fairly fast, easy to correct) · " +
19
+ "facts (fade fastest, easiest to correct). ★ core is what has become part of who I am; journal is the chapters I wrote, kept as written.";
12
20
 
13
21
  export const markup = `
14
- <h2 id="mlist-h">Every memory <small id="mlist-sub"></small></h2>
22
+ <div class="mlist-head">
23
+ <h2 id="mlist-h">Every memory <small id="mlist-sub"></small></h2>
24
+ <div class="msort seggroup" id="msort" role="group" aria-label="order"></div>
25
+ </div>
15
26
  <div class="mfilters" id="mfilters"></div>
16
27
  <div class="card mlist" id="mlist"></div>
17
28
  <div class="mpager" id="mpager"></div>`;
@@ -19,14 +30,20 @@ export const markup = `
19
30
  let seq = 0;
20
31
 
21
32
  export function mount() {
33
+ wireRows($("mlist"));
22
34
  $("mfilters").addEventListener("click", (e) => {
23
35
  const b = e.target.closest("button[data-f]");
24
36
  if (!b) return;
25
37
  const f = b.dataset.f, v = b.dataset.v || null;
26
38
  if (f === "state") setFilter({ state: v });
27
- else if (f === "clear") setFilter({ kind: null, band: null });
39
+ else if (f === "clear") setFilter({ kind: null, core: false, journal: false, hold: null, feeling: null, feelingCore: null });
40
+ else if (f === "feeling") setFilter({ feeling: null, feelingCore: null });
28
41
  else toggle(f, v);
29
42
  });
43
+ $("msort").addEventListener("click", (e) => {
44
+ const b = e.target.closest("button[data-sort]");
45
+ if (b && b.dataset.sort !== filters.sort) setFilter({ sort: b.dataset.sort });
46
+ });
30
47
  $("mpager").addEventListener("click", (e) => {
31
48
  const b = e.target.closest("button[data-off]");
32
49
  if (!b || b.disabled) return;
@@ -38,67 +55,71 @@ export function mount() {
38
55
 
39
56
  export async function render() {
40
57
  const mine = ++seq;
41
- const qs = new URLSearchParams({ state: filters.state, offset: String(filters.offset), limit: String(PAGE) });
58
+ const qs = new URLSearchParams({ state: filters.state, sort: filters.sort, offset: String(filters.offset), limit: String(PAGE) });
42
59
  if (filters.kind) qs.set("kind", filters.kind);
43
- if (filters.band) qs.set("band", filters.band);
60
+ if (filters.core) qs.set("core", "1");
61
+ if (filters.journal) qs.set("journal", "1");
62
+ if (filters.hold) qs.set("hold", filters.hold);
63
+ if (filters.feeling) { qs.set("feeling", filters.feeling.word); qs.set("whose", filters.feeling.whose); }
64
+ else if (filters.feelingCore) qs.set("feelingCore", filters.feelingCore);
44
65
  let d;
45
66
  try { d = await api("/api/memories/list?" + qs.toString()); }
46
67
  catch (e) { return fail("The memory list", e); }
47
68
  if (mine !== seq) return; // a newer filter already asked
69
+ paintSort(d);
48
70
  paintFilters(d);
49
71
  paintRows(d);
50
72
  paintPager(d);
51
73
  }
52
74
 
53
- function chip(f, v, label, n, on, extraClass) {
75
+ function paintSort(d) {
76
+ $("msort").innerHTML = [["newest", "newest first"], ["oldest", "oldest first"]].map(([v, l]) =>
77
+ '<button type="button" class="fchip' + (d.sort === v ? " on" : "") + '" data-sort="' + v + '" aria-pressed="' +
78
+ (d.sort === v) + '">' + l + "</button>").join("");
79
+ }
80
+
81
+ function chip(f, v, inner, on, extraClass, title) {
54
82
  return '<button type="button" class="fchip' + (on ? " on" : "") + (extraClass ? " " + extraClass : "") +
55
- '" data-f="' + f + '"' + (v ? ' data-v="' + esc(v) + '"' : "") + ' aria-pressed="' + on + '">' +
56
- esc(label) + (n === undefined ? "" : ' <span class="fn">' + n + "</span>") + "</button>";
83
+ '" data-f="' + f + '"' + (v ? ' data-v="' + esc(v) + '"' : "") + ' aria-pressed="' + on + '"' +
84
+ (title ? ' title="' + esc(title) + '"' : "") + ">" + inner + "</button>";
57
85
  }
86
+ const count = (n) => ' <span class="fn">' + n + "</span>";
58
87
 
59
88
  function paintFilters(d) {
60
89
  const c = d.counts;
61
- const state = [["live", "live", c.live], ["archived", "archived", c.archived], ["all", "all", c.live + c.archived]]
62
- .map(([v, l, n]) => chip("state", v, l, n, d.state === v, "seg")).join("");
63
- const kinds = Object.keys(c.kinds).map((k) => chip("kind", k, KIND_LABEL[k] || k, c.kinds[k], d.kind === k,
64
- c.kinds[k] === 0 ? "zero" : "")).join("");
65
- const bands = Object.keys(c.bands).map((b) => chip("band", b, b, c.bands[b], d.band === b,
66
- c.bands[b] === 0 ? "zero" : "")).join("");
90
+ const state = [["live", c.live], ["archived", c.archived], ["all", c.live + c.archived]]
91
+ .map(([v, n]) => chip("state", v, esc(v) + count(n), d.state === v, "seg")).join("");
92
+ const kinds = Object.keys(c.kinds).map((k) => chip("kind", k, kindMark(k, false) + esc(kindOf(k).label) + count(c.kinds[k]),
93
+ d.kind === k, "kchip" + (c.kinds[k] === 0 ? " zero" : ""))).join("");
94
+ const special =
95
+ chip("core", null, '<span class="star">★</span>core' + count(c.core), d.core, c.core === 0 ? "zero" : "", "in the core: part of who I am") +
96
+ chip("journal", null, "journal" + count(c.journal), d.journal, c.journal === 0 ? "zero" : "", "journal chapters, kept as written");
97
+ const any = d.kind || d.core || d.journal || d.hold || d.feeling || d.feelingCore;
98
+ const feelingChip = d.feeling || d.feelingCore
99
+ ? chip("feeling", null, "feeling: " + esc(d.feeling ? d.feeling.word + " · " + (d.feeling.whose === "owner" ? "yours" : "mine") : d.feelingCore) +
100
+ ' <span class="fx" aria-hidden="true">✕</span>', true, "", "from “How it feels” — click to clear")
101
+ : "";
102
+ const holdChip = d.hold ? chip("hold", d.hold, '<span class="hdot ' + esc(d.hold) + '"></span>' + esc(d.hold) +
103
+ count(c.hold[d.hold]), true, "", "from the bar above — click to show all again") : "";
67
104
  $("mfilters").innerHTML =
68
105
  '<div class="fgroup seggroup" role="group" aria-label="live or archived">' + state + "</div>" +
69
- '<div class="fgroup" role="group" aria-label="kind">' + kinds + "</div>" +
70
- '<div class="fgroup" role="group" aria-label="band">' + bands +
71
- (d.kind || d.band ? chip("clear", null, "show every kind and band", undefined, false, "clear") : "") + "</div>";
106
+ '<div class="fgroup" role="group" aria-label="kind">' + kinds + special + holdChip + feelingChip +
107
+ (any ? chip("clear", null, "show all", false, "clear") : "") + q("kinds", KIND_TIP) + "</div>";
108
+ wireTips($("mfilters"));
72
109
  }
73
110
 
74
111
  function paintRows(d) {
75
112
  const from = d.total === 0 ? 0 : d.offset + 1;
76
113
  const to = Math.min(d.total, d.offset + d.rows.length);
77
- $("mlist-sub").textContent = "— newest first · " + (d.total === 0 ? "none match" : from + "–" + to + " of " + d.total);
114
+ $("mlist-sub").textContent = d.total === 0 ? "— none match" : "— " + from + "–" + to + " of " + d.total;
78
115
  if (d.rows.length === 0) {
116
+ const narrowed = d.kind || d.core || d.journal || d.hold || d.feeling || d.feelingCore;
79
117
  $("mlist").innerHTML = absenceLine(d.absent || "(none yet)",
80
- d.state === "archived" ? "nothing has been archived" + (d.kind || d.band ? " that matches these filters" : "")
118
+ d.state === "archived" ? "nothing has been archived" + (narrowed ? " that matches these filters" : "")
81
119
  : "no memory matches these filters");
82
120
  return;
83
121
  }
84
- $("mlist").innerHTML = d.rows.map((r) => {
85
- const words = r.confidential
86
- ? '<span class="withheld">' + esc(r.line) + "</span>"
87
- : (r.title ? "<b>" + esc(r.title) + "</b>" + (r.line && r.line !== r.title ? " " + esc(r.line) : "") : esc(r.line));
88
- const pct = Math.round(Math.max(0, Math.min(1, r.strength)) * 100);
89
- return '<div class="mrow click' + (r.archived ? " arch" : "") + '" role="button" tabindex="0" ' +
90
- "onclick=\"openMemory('" + esc(r.id) + "')\" onkeydown=\"if(event.key==='Enter')openMemory('" + esc(r.id) + "')\">" +
91
- '<div class="mwords">' + words +
92
- (r.archived ? '<div class="mwhy">archived: ' + esc(r.archived) + "</div>" : "") + "</div>" +
93
- '<div class="mmeta">' +
94
- '<span class="mkind">' + esc(KIND_LABEL[r.kind] || r.kind) + (r.schemaRole ? " · " + esc(r.schemaRole) : "") + "</span>" +
95
- '<span class="mstr" title="' + pct + '% strong"><span class="strack"><span style="width:' + pct + '%;background:' +
96
- (BANDCOL[r.band] || "var(--dim)") + '"></span></span><span class="spct">' + pct + "%</span></span>" +
97
- '<span class="mage">' + (r.livedDays === 0 ? "today" : r.livedDays + (r.livedDays === 1 ? " day" : " days")) + "</span>" +
98
- '<span class="mband"><span class="bdot" style="background:' + (BANDCOL[r.band] || "var(--dim)") + '"></span>' +
99
- esc(r.band) + "</span>" +
100
- "</div></div>";
101
- }).join("");
122
+ $("mlist").innerHTML = d.rows.map((r) => memRow(r)).join("");
102
123
  }
103
124
 
104
125
  function paintPager(d) {
@@ -107,8 +128,9 @@ function paintPager(d) {
107
128
  const next = d.offset + d.limit;
108
129
  const page = Math.floor(d.offset / d.limit) + 1;
109
130
  const pages = Math.ceil(d.total / d.limit);
131
+ const [back, fwd] = d.sort === "oldest" ? ["← older", "newer →"] : ["← newer", "older →"];
110
132
  $("mpager").innerHTML =
111
- '<button type="button" class="mbtn" data-off="' + prev + '"' + (d.offset === 0 ? " disabled" : "") + ">← newer</button>" +
133
+ '<button type="button" class="mbtn" data-off="' + prev + '"' + (d.offset === 0 ? " disabled" : "") + ">" + back + "</button>" +
112
134
  '<span class="mpage">page ' + page + " of " + pages + "</span>" +
113
- '<button type="button" class="mbtn" data-off="' + next + '"' + (next >= d.total ? " disabled" : "") + ">older →</button>";
135
+ '<button type="button" class="mbtn" data-off="' + next + '"' + (next >= d.total ? " disabled" : "") + ">" + fwd + "</button>";
114
136
  }
@@ -1,12 +1,12 @@
1
1
  /* Find a memory: search by its words (live, as you type) and ask a question
2
2
  (the console's own `counterparts ask`, through the actions seam). Both lists
3
- open the memory on click. */
3
+ use the list's row shape and open the memory on click; Ask's answers are
4
+ bright when they came clearly to mind and dim when they are a faint lead. */
4
5
  import { absenceLine } from "../../../shared/absence.js";
5
6
  import { act, resultHtml } from "../../../shared/actions.js";
6
7
  import { api, fail } from "../../../shared/api.js";
7
8
  import { $, esc } from "../../../shared/dom.js";
8
- import { said } from "../../../shared/format.js";
9
- import { BANDCOL } from "../../../shared/colors.js";
9
+ import { memRow, wireRows } from "../row.js";
10
10
 
11
11
  export const markup = `
12
12
  <div class="find">
@@ -17,7 +17,7 @@ export const markup = `
17
17
  placeholder="a word the memory would use…">
18
18
  <span id="qn"></span>
19
19
  </div>
20
- <div class="card rows" id="qout" hidden></div>
20
+ <div class="card mlist" id="qout" hidden></div>
21
21
  </div>
22
22
  <div class="find-col">
23
23
  <label class="find-lab" for="ask-q">Ask your memory a question</label>
@@ -30,18 +30,10 @@ export const markup = `
30
30
  </div>
31
31
  </div>`;
32
32
 
33
- /** One found memory as a row: words, then kind · band · strength. */
34
- function hitRow(id, title, text, confidential, kind, band, extra) {
35
- const words = confidential ? said(text, true)
36
- : (title ? "<b>" + esc(title) + "</b> " : "") + esc(text);
37
- return '<div class="r click" onclick="openMemory(\'' + esc(id) + '\')">' + words +
38
- '<div class="meta"><span class="k">' + esc(kind) + "</span>" +
39
- (band ? '<span><span class="bdot" style="background:' + (BANDCOL[band] || "var(--dim)") + '"></span>' + esc(band) + "</span>" : "") +
40
- (extra || "") + "</div></div>";
41
- }
42
-
43
33
  let qtimer = null;
44
34
  export function mount() {
35
+ wireRows($("qout"));
36
+ wireRows($("ask-out"));
45
37
  $("q").addEventListener("input", () => {
46
38
  clearTimeout(qtimer);
47
39
  qtimer = setTimeout(runSearch, 180);
@@ -61,12 +53,23 @@ async function runSearch() {
61
53
  $("qn").textContent = d.hits.length + (d.hits.length === 1 ? " match" : " matches");
62
54
  out.innerHTML = d.absent
63
55
  ? absenceLine(d.absent, "nothing I hold matches those words")
64
- : d.hits.map((h) => hitRow(h.id, null, h.text, h.confidential, h.kind, h.band,
65
- "<span>strength " + Math.round(h.strength * 100) + "%</span>")).join("");
56
+ : d.hits.map((h) => memRow({ ...h, text: h.shown, archived: null })).join("");
66
57
  }
67
58
 
68
- /** The tiers `ask` sorts answers into, in the words a person would use. */
59
+ /** The tiers `ask` sorts answers into, in the words a person would use, and
60
+ * the brightness each is drawn at. */
69
61
  const TIER = { vivid: "came clearly to mind", quiet: "came quietly", dim: "a faint lead" };
62
+ const TIER_LIT = { vivid: 5, quiet: 3, dim: 1 };
63
+
64
+ /** An answer's words as a row shows them: headings dropped, a date written at
65
+ * the front lifted off (display only — the memory is untouched). */
66
+ export function answerWords(body) {
67
+ const flat = String(body || "").split("\n").map((l) => l.trim()).filter((l) => l && !l.startsWith("#")).join(" ");
68
+ const m = /^(\d{4}-\d{2}-\d{2})(?:[ \t]*[:,—–-][ \t]*|[ \t]+)(?=\S)/.exec(flat);
69
+ let rest = m ? flat.slice(m[0].length) : flat;
70
+ if (m) rest = rest.charAt(0).toUpperCase() + rest.slice(1);
71
+ return { date: m ? m[1] : null, text: rest.length > 320 ? rest.slice(0, 319) + "…" : rest };
72
+ }
70
73
 
71
74
  async function ask() {
72
75
  const q = $("ask-q").value.trim();
@@ -92,11 +95,11 @@ async function ask() {
92
95
  }
93
96
  out.innerHTML = '<div class="ask-head">What came to mind — ' + mems.length +
94
97
  (mems.length === 1 ? " memory" : " memories") + ", best first</div>" +
95
- '<div class="card rows">' + mems.map((m) => {
96
- const body = String(m.body || "");
97
- const first = body.split("\n").map((l) => l.trim()).find((l) => l && !l.startsWith("#")) || body;
98
- const text = first.length > 200 ? first.slice(0, 199) + "…" : first;
99
- return hitRow(m.id, m.title, text, false, m.journal ? "journal" : m.kind, null,
100
- '<span class="tier tier-' + esc(m.tier) + '">' + esc(TIER[m.tier] || m.tier) + "</span>");
98
+ '<div class="card mlist ask-list">' + mems.map((m) => {
99
+ const w = answerWords(m.body);
100
+ return memRow({
101
+ id: m.id, title: m.title, text: w.text, confidential: false, kind: m.kind, strength: m.strength,
102
+ date: w.date, dateFrom: w.date ? "text" : null, journal: !!m.journal, feelings: [], archived: null,
103
+ }, { lit: TIER_LIT[m.tier] || 3, tier: TIER[m.tier] || m.tier });
101
104
  }).join("") + "</div>";
102
105
  }
@@ -1,6 +1,11 @@
1
- /* What the memories page is filtered to, shared by the legend (a band chip),
2
- the kind cards and the list's own filter bar. One listener: the list. */
3
- export const filters = { state: "live", kind: null, band: null, offset: 0 };
1
+ /* What the memories page is filtered to, kept apart from the markup so a live refresh redraws and leaves every choice as it was.
2
+ One filter listener: the list. */
3
+ /** `hold`: firm / settling / fading, set from the "How firmly it's held" bar.
4
+ * `feeling` ({ word, whose }) and `feelingCore`: set from the "How it feels"
5
+ * radar — one or the other, never both. */
6
+ export const filters = {
7
+ state: "live", kind: null, core: false, journal: false, hold: null, feeling: null, feelingCore: null, sort: "newest", offset: 0,
8
+ };
4
9
 
5
10
  const listeners = [];
6
11
  export function onFilter(fn) { listeners.push(fn); }
@@ -13,9 +18,11 @@ export function setFilter(patch) {
13
18
  for (const fn of listeners) fn(filters);
14
19
  }
15
20
 
16
- /** A band or kind chip is a toggle: click it again to show everything. */
21
+ /** A kind chip (or a part of the hold bar) is a toggle: click it again to
22
+ * show everything. Core and journal chips are on/off. */
17
23
  export function toggle(key, value) {
18
- setFilter({ [key]: filters[key] === value ? null : value });
24
+ if (key === "core" || key === "journal") setFilter({ [key]: !filters[key] });
25
+ else setFilter({ [key]: filters[key] === value ? null : value });
19
26
  }
20
27
 
21
28
  /** Tell the page the store changed on purpose (a note, a removal). */
@@ -10,11 +10,12 @@
10
10
  text — is drawn open again, and the scroll position is put back. */
11
11
  import { api, fail } from "../../shared/api.js";
12
12
  import { $, esc } from "../../shared/dom.js";
13
+ import * as dreams from "./sections/dreams.js";
13
14
  import * as journal from "./sections/journal.js";
14
15
  import * as page from "./sections/page.js";
15
16
  import * as settling from "./sections/settling.js";
16
17
  import * as wake from "./sections/wake.js";
17
- import { q, wireTips } from "./tips.js";
18
+ import { q, wireTips } from "../../shared/widgets/tips.js";
18
19
 
19
20
  const markup = `
20
21
  <h2 class="sp-title" id="mind-opening"></h2>
@@ -27,7 +28,7 @@ const markup = `
27
28
  <div class="cols self-cols">
28
29
  <div>${settling.markup}
29
30
  </div>
30
- <div>${journal.markup}
31
+ <div>${journal.markup}${dreams.markup}
31
32
  </div>
32
33
  </div>
33
34
  `;
@@ -41,6 +42,7 @@ const PANELS = [
41
42
  { name: "wake", slice: (d) => [d.wake, d.wakeParts, d.wakeBudget], paint: wake.paint },
42
43
  { name: "settling", slice: (d) => [d.settling, d.stories], paint: settling.paint },
43
44
  { name: "journal", slice: (d) => [d.journal, d.journalAbsent, d.journalMore], paint: journal.paint },
45
+ { name: "dreams", slice: (d) => [d.dreams, d.dreamsAbsent], paint: dreams.paint },
44
46
  ];
45
47
 
46
48
  /** What each panel was last drawn from. */
@@ -0,0 +1,76 @@
1
+ /* The dream journal (2026-09-26): each dream, newest first — its date, its
2
+ state, its title — and, opened, the journal entry in the dream's own words
3
+ and every change it made, each naming the memories it touched (clickable).
4
+ A change the owner undid is struck through. The journal is a dream, kept
5
+ apart from the memories: nothing here is something that happened. */
6
+ import { absenceLine } from "../../../shared/absence.js";
7
+ import { $, esc } from "../../../shared/dom.js";
8
+ import { said } from "../../../shared/format.js";
9
+ import { renderMarkdown } from "../markdown.js";
10
+ import { q, wireTips } from "../../../shared/widgets/tips.js";
11
+
12
+ export const markup = `
13
+ <h2 id="self-dreams-h">Dreams <span id="self-dreams-q"></span></h2>
14
+ <div id="self-dreams"></div>`;
15
+
16
+ let last = null;
17
+ /** Which dreams are open, by id — kept across redraws. */
18
+ const openIds = new Set();
19
+
20
+ const STATE = { begun: "dreaming", journaled: "woke", undone: "undone" };
21
+
22
+ function memoryRef(m) {
23
+ return '<span class="dr-mem' + (m.confidential ? " withheld" : "") + '" role="button" tabindex="0" onclick="openMemory(\'' +
24
+ esc(m.id) + '\')" onkeydown="if(event.key===\'Enter\')openMemory(\'' + esc(m.id) + '\')">' + said(m.text, m.confidential) + "</span>";
25
+ }
26
+
27
+ function change(c) {
28
+ return '<li class="dr-change' + (c.undone ? " undone" : "") + '">' +
29
+ '<span class="dr-said">' + esc(c.said) + (c.undone ? " · undone" : "") + "</span>" +
30
+ (c.memories.length > 0 ? '<span class="dr-mems">' + c.memories.map(memoryRef).join(" · ") + "</span>" : "") +
31
+ "</li>";
32
+ }
33
+
34
+ function countsLine(counts) {
35
+ const parts = Object.entries(counts).map(([k, n]) => n + " " + k);
36
+ return parts.length === 0 ? "no changes" : parts.join(", ");
37
+ }
38
+
39
+ export function paint(d) {
40
+ if (d) last = d;
41
+ d = last;
42
+ $("self-dreams-q").innerHTML = q("dreams", "Once a day, with the owner's yes, I dream for a few minutes over what was lived since the last dream: merging near-copies, linking what belongs together, replaying what matters, writing down a pattern. Every change can be undone as a whole (counterparts dream --undo <id>). A dream is never a memory of something that happened.");
43
+ wireTips($("self-dreams-q"));
44
+ const box = $("self-dreams");
45
+ if (d.dreamsAbsent) {
46
+ box.innerHTML = absenceLine(d.dreamsAbsent, "no dream yet");
47
+ return;
48
+ }
49
+ const v = d.dreams;
50
+ box.innerHTML = '<div class="card pad dr-list">' + v.dreams.map((x) => {
51
+ const open = openIds.has(x.id);
52
+ return '<div class="dr' + (open ? " open" : "") + (x.state === "undone" ? " undone" : "") + '">' +
53
+ '<button type="button" class="dr-top" data-id="' + esc(x.id) + '" aria-expanded="' + open + '">' +
54
+ '<span class="dr-date">' + esc(x.date || "day " + x.day) + "</span>" +
55
+ '<span class="dr-title">' + esc(x.title || "(no journal yet)") + "</span>" +
56
+ '<span class="chip">' + esc(STATE[x.state] || x.state) + "</span>" +
57
+ '<span class="dr-counts">' + esc(countsLine(x.counts)) + "</span>" +
58
+ "</button>" +
59
+ (open
60
+ ? '<div class="dr-body">' +
61
+ (x.journal ? '<div class="dr-journal">' + renderMarkdown(x.journal) + "</div>" : '<p class="foot">No journal written.</p>') +
62
+ (x.changes.length > 0 ? '<ol class="dr-changes">' + x.changes.map(change).join("") + "</ol>" : "") +
63
+ '<p class="foot">Undo it all: <code>counterparts dream --undo ' + esc(x.id) + "</code></p>" +
64
+ "</div>"
65
+ : "") +
66
+ "</div>";
67
+ }).join("") +
68
+ (v.more > 0 ? '<p class="foot">…and older dreams: <code>counterparts dream --list</code></p>' : "") +
69
+ "</div>";
70
+ box.querySelectorAll(".dr-top").forEach((b) => b.addEventListener("click", () => {
71
+ const id = b.dataset.id;
72
+ if (openIds.has(id)) openIds.delete(id);
73
+ else openIds.add(id);
74
+ paint();
75
+ }));
76
+ }
@@ -7,7 +7,7 @@ import { absenceLine } from "../../../shared/absence.js";
7
7
  import { $, esc } from "../../../shared/dom.js";
8
8
  import { renderMarkdown } from "../markdown.js";
9
9
  import { chapterKey, ui } from "../state.js";
10
- import { q, wireTips } from "../tips.js";
10
+ import { q, wireTips } from "../../../shared/widgets/tips.js";
11
11
 
12
12
  export const markup = `
13
13
  <h2 id="self-journal-h">Journal <span id="self-journal-q"></span></h2>
@@ -9,7 +9,7 @@ import { $, esc } from "../../../shared/dom.js";
9
9
  import { diffStats, diffText } from "../diff.js";
10
10
  import { renderMarkdown } from "../markdown.js";
11
11
  import { ui } from "../state.js";
12
- import { q, wireTips } from "../tips.js";
12
+ import { q, wireTips } from "../../../shared/widgets/tips.js";
13
13
 
14
14
  /** The left column: an opened version (when one is), then the page. */
15
15
  export const mainMarkup = `
@@ -8,7 +8,7 @@ import { $, esc } from "../../../shared/dom.js";
8
8
  import { headline, n2, said } from "../../../shared/format.js";
9
9
  import { openModal } from "../../../shared/modal.js";
10
10
  import { ui } from "../state.js";
11
- import { q, wireTips } from "../tips.js";
11
+ import { q, wireTips } from "../../../shared/widgets/tips.js";
12
12
  import { storyCard } from "./stories.js";
13
13
 
14
14
  export const markup = `
@@ -50,6 +50,9 @@ export function paint(d) {
50
50
  " could not be read just now:</b> " + s.unreadable.map((u) => esc(u.label)).join(" · ") + "</div>");
51
51
  }
52
52
 
53
+ // ── what crossed lately: became core, sent back, nominated ──
54
+ parts.push(history(s.history));
55
+
53
56
  // ── on the way ──
54
57
  parts.push(candidates(s));
55
58
 
@@ -67,6 +70,34 @@ export function paint(d) {
67
70
  wireTips(box);
68
71
  }
69
72
 
73
+ /**
74
+ * WHAT CROSSED LATELY (2026-09-26): the newest crossings into the core with
75
+ * the lane that carried each, the owner's demotions with his reason, and the
76
+ * memories a dream nominated. Nothing is drawn when all three are empty.
77
+ */
78
+ function history(h) {
79
+ if (!h) return "";
80
+ const LANE = { fast: "strongly felt, and came back", slow: "kept coming back over weeks" };
81
+ const row = (r, tail) =>
82
+ '<button type="button" class="st-row click" onclick="openMemory(\'' + esc(r.id) + '\')">' +
83
+ '<span class="st-text">' + said(headline(r.text), r.confidential) + "</span>" +
84
+ '<span class="st-hist-tail">' + esc(tail) + "</span></button>";
85
+ const out = [];
86
+ if (h.promoted.length > 0) {
87
+ out.push('<h4 class="st-h">Became core</h4>' + h.promoted.map((r) =>
88
+ row(r, "day " + r.day + (r.lane ? " · " + (LANE[r.lane] || r.lane) : ""))).join(""));
89
+ }
90
+ if (h.demoted.length > 0) {
91
+ out.push('<h4 class="st-h">Sent back to ordinary fading</h4>' + h.demoted.map((r) =>
92
+ row(r, "day " + r.day + (r.reason ? " · " + r.reason : ""))).join(""));
93
+ }
94
+ if (h.nominated.length > 0) {
95
+ out.push('<h4 class="st-h">Nominated in a dream ' + q("nominated", "A dream can say a memory belongs to who I am. That is recorded here and nothing more: only coming back awake, by a lane, makes a memory core.") + "</h4>" +
96
+ h.nominated.map((r) => row(r, "day " + r.day + (r.reason ? " · " + r.reason : ""))).join(""));
97
+ }
98
+ return out.length === 0 ? "" : '<div class="st-hist">' + out.join("") + "</div>";
99
+ }
100
+
70
101
  function listOf(s, key) {
71
102
  return key === "core" ? s.core : key === "guarded" ? s.guarded : key === "contested" ? s.contested : [];
72
103
  }
@@ -103,43 +134,42 @@ function row(r) {
103
134
  function candidates(s) {
104
135
  const r = s.rule;
105
136
  const c = s.candidates;
106
- const foot = ["A memory joins the core once what it has earned reaches " + n2(r.threshold) +
107
- " and it has been used on " + r.days + " different days. That is checked every " + r.everyDays + " lived days."];
108
- if (s.onTheWay > 0) foot.push(plural(s.onTheWay, "memory has", "memories have") + " been used on a later day.");
109
- if (s.unused > 0) foot.push(s.unused + " more could get there but haven't been used on a later day yet.");
137
+ const foot = ["Only a memory about me or about us joins the core, by one of two lanes: strongly felt (" + n2(r.needFeeling) +
138
+ " or more) and come back at least once, " + r.needGap + " or more days after it was made; or come back on " + r.days +
139
+ " different days over " + r.span + ". That is checked every " + r.everyDays + " lived days, at most " + r.cap + " a night."];
140
+ if (s.onTheWay > 0) foot.push(plural(s.onTheWay, "memory about us has", "memories about us have") + " come back at least once.");
141
+ if (s.unused > 0) foot.push(s.unused + " more about us haven't come back yet.");
110
142
  if (s.outOfReach > 0) {
111
- foot.push(s.outOfReach + (s.outOfReach === 1 ? " memory was" : " memories were") +
112
- " scored too low to get there by use alone (use tops out at " + n2(r.repCap + r.bonus) + ").");
143
+ foot.push(s.outOfReach + (s.outOfReach === 1 ? " memory is" : " memories are") +
144
+ " not about me or about us, so the core is not for them however often they come back.");
113
145
  }
114
146
  const tip = q("rule", foot.join(" "));
115
147
  if (c.length === 0) {
116
148
  return '<h4 class="st-h">On the way to the core ' + tip + "</h4>" +
117
149
  '<div class="empty"><b>(none yet)</b> nothing is on its way to the core yet.</div>';
118
150
  }
119
- const scale = 1.2; // the bar is drawn from 0 to 1.2 so the threshold sits right of centre
151
+ const scale = 1.2; // the bar is drawn from 0 to 1.2 so the fast lane's mark sits right of centre
120
152
  const rows = c.map((m) => {
121
153
  const ready = m.eligible;
122
- const have = Math.min(m.base, scale) / scale * 100;
123
- const ghost = m.consolidated ? 0 : Math.min(m.bonus, scale - Math.min(m.base, scale)) / scale * 100;
124
- const strong = m.base >= m.threshold;
154
+ const have = Math.min(m.feeling, scale) / scale * 100;
155
+ const felt = m.feeling >= m.needFeeling;
125
156
  const dots = Array.from({ length: m.requiredDays }, (_, i) =>
126
157
  '<span class="dd' + (i < m.days ? " on" : "") + '"></span>').join("");
127
158
  const status = ready
128
- ? "ready — it crosses at the next check"
129
- : (strong ? "strong enough" : "needs " + n2(m.threshold - m.base) + " more" + (m.consolidated ? "" : " (settling adds " + n2(m.bonus) + " once)")) +
130
- " · used on " + Math.min(m.days, m.requiredDays) + " of " + m.requiredDays + " days";
159
+ ? "ready (" + m.lane + " lane) — it crosses at the next check"
160
+ : (felt ? "strongly felt" + (m.returned ? "" : " — one return after a gap makes it core") : "felt " + n2(m.feeling) + " of " + n2(m.needFeeling)) +
161
+ " · came back on " + Math.min(m.days, m.requiredDays) + " of " + m.requiredDays + " days, over " + m.span + " of " + m.needSpan;
131
162
  return '<button type="button" class="cr' + (ready ? " ready" : "") + '" onclick="openMemory(\'' + m.id + '\')" title="' +
132
163
  esc((m.confidential ? "" : m.text + " — ") + status) + '">' +
133
164
  '<span class="cr-name">' + (ready ? '<span class="cr-ready">ready</span>' : "") + said(headline(m.text), m.confidential) + "</span>" +
134
- '<span class="cm-track" aria-label="earned ' + n2(m.base) + " of " + n2(m.threshold) + '">' +
135
- '<span class="cm-fill' + (strong ? " ok" : "") + '" style="width:' + have.toFixed(1) + '%"></span>' +
136
- (ghost > 0 ? '<span class="cm-ghost" style="left:' + have.toFixed(1) + "%;width:" + ghost.toFixed(1) + '%"></span>' : "") +
137
- '<span class="cm-mark" style="left:' + (m.threshold / scale * 100).toFixed(1) + '%"></span>' +
165
+ '<span class="cm-track" aria-label="felt ' + n2(m.feeling) + " of " + n2(m.needFeeling) + '">' +
166
+ '<span class="cm-fill' + (felt ? " ok" : "") + '" style="width:' + have.toFixed(1) + '%"></span>' +
167
+ '<span class="cm-mark" style="left:' + (m.needFeeling / scale * 100).toFixed(1) + '%"></span>' +
138
168
  "</span>" +
139
- '<span class="cm-dots" aria-label="used on ' + m.days + " of " + m.requiredDays + ' days">' + dots + "</span>" +
169
+ '<span class="cm-dots" aria-label="came back on ' + m.days + " of " + m.requiredDays + ' days">' + dots + "</span>" +
140
170
  "</button>";
141
171
  }).join("");
142
172
  return '<h4 class="st-h">' + esc(plural(c.length, "memory", "memories")) + " closest to the core " + tip + "</h4>" +
143
- '<div class="cr-head" aria-hidden="true"><span></span><span>earned</span><span>days</span></div>' +
173
+ '<div class="cr-head" aria-hidden="true"><span></span><span>felt</span><span>came back</span></div>' +
144
174
  '<div class="cr-list">' + rows + "</div>";
145
175
  }
@@ -7,7 +7,7 @@ import { absenceLine } from "../../../shared/absence.js";
7
7
  import { act, resultHtml } from "../../../shared/actions.js";
8
8
  import { $, esc } from "../../../shared/dom.js";
9
9
  import { ui } from "../state.js";
10
- import { q, wireTips } from "../tips.js";
10
+ import { q, wireTips } from "../../../shared/widgets/tips.js";
11
11
 
12
12
  export const markup = `
13
13
  <div class="side-block">
@@ -32,26 +32,6 @@
32
32
  .lane .item .date{color:var(--faint)}
33
33
  .wakehead{color:var(--dim);font-size:11px;margin-bottom:12px;line-height:1.65;overflow-wrap:anywhere}
34
34
 
35
- /* ── the `?`: the explaining words, out of the reading path ── */
36
- .q-wrap{position:relative;display:inline-block;vertical-align:middle;line-height:1}
37
- .q{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;margin:0 0 0 2px;
38
- border:1px solid var(--glow);border-radius:50%;background:none;color:var(--dim);font-family:var(--sans);
39
- font-size:12px;font-weight:600;line-height:1;cursor:pointer;position:relative}
40
- /* A small glyph with a thumb-sized hit area around it. */
41
- .q::after{content:"";position:absolute;inset:-12px}
42
- .q:hover,.q:focus-visible,.q-wrap.open .q{color:var(--cyan);border-color:var(--cyan)}
43
- .q-pop{display:none;position:absolute;left:0;top:calc(100% + 8px);z-index:30;width:max-content;
44
- max-width:min(22rem,calc(100vw - 32px));background:var(--deep);border:1px solid var(--glow);border-radius:6px;
45
- padding:9px 12px;font-family:var(--sans);font-size:13px;font-weight:400;line-height:1.55;color:var(--ink);
46
- text-transform:none;letter-spacing:0;text-align:left;white-space:normal;box-shadow:0 6px 26px rgba(0,0,0,.6)}
47
- /* Hovered: a floating note that never takes the pointer, so it can't sit in
48
- the way of what is under it. Pinned (tap / click / Enter): the words drop
49
- into the flow under the line they explain and cover nothing. */
50
- @media(hover:hover){.q-wrap:not(.open):hover .q-pop,.q-wrap:not(.open) .q:focus-visible+.q-pop{display:block;pointer-events:none}}
51
- .q-wrap.open{display:inline}
52
- .q-wrap.open .q-pop{display:block;position:static;width:auto;max-width:none;margin:8px 0 2px;box-shadow:none;
53
- background:rgba(0,229,255,.05);border-color:var(--border)}
54
-
55
35
  /* ── the top: the page on the left, a side column on the right ── */
56
36
  h2.sp-title{margin:0 0 12px;font-size:19px;color:var(--cyan)}
57
37
  .self-top{display:grid;grid-template-columns:minmax(0,1fr) clamp(17rem,30vw,22rem);gap:20px;align-items:start}
@@ -232,6 +212,29 @@ h4.st-h{font-family:var(--sans);font-size:13.5px;font-weight:600;color:var(--ink
232
212
  .jc-body .md{font-size:14px}
233
213
  .jc-open{min-height:44px;font-family:var(--sans);font-size:12.5px;padding:6px 12px}
234
214
 
215
+ /* What crossed into the core lately, and the dream journal (2026-09-26). */
216
+ .st-hist{margin:8px 0 4px}
217
+ .st-hist-tail{color:var(--dim);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:45%}
218
+ .dr-list{padding:6px 10px}
219
+ .dr{border-bottom:1px solid var(--border)}
220
+ .dr:last-child{border-bottom:none}
221
+ .dr.undone .dr-title{text-decoration:line-through;color:var(--dim)}
222
+ .dr-top{display:flex;gap:8px;align-items:center;flex-wrap:wrap;width:100%;background:none;border:none;text-align:left;
223
+ padding:10px 4px;min-height:44px;cursor:pointer;font-family:var(--sans)}
224
+ .dr-top:hover{background:var(--hover)}
225
+ .dr-date{font-size:12px;color:var(--dim);white-space:nowrap}
226
+ .dr-title{color:var(--purple);font-size:14px;font-weight:500;overflow-wrap:anywhere}
227
+ .dr-counts{font-size:12px;color:var(--dim)}
228
+ .dr-body{padding:6px 8px 12px;overflow-wrap:anywhere}
229
+ .dr-journal .md{font-size:14px}
230
+ .dr-changes{margin:8px 0;padding-left:20px;font-size:13px}
231
+ .dr-change{margin:4px 0}
232
+ .dr-change.undone{color:var(--dim);text-decoration:line-through}
233
+ .dr-said{display:block}
234
+ .dr-mems{display:block;color:var(--dim)}
235
+ .dr-mem{cursor:pointer;color:var(--cyan)}
236
+ .dr-mem.withheld{color:var(--dim)}
237
+
235
238
  @media(max-width:640px){
236
239
  .sp-card{padding:16px 14px 12px}
237
240
  .md{font-size:14.5px}