@codemem/server 0.41.0 → 0.42.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.
package/static/app.js.br CHANGED
Binary file
package/static/app.js.gz CHANGED
Binary file
@@ -0,0 +1,196 @@
1
+ /* Global native-control baseline. Keep selectors low-specificity so component
2
+ * styles can refine layout and variants without opting out of theme safety. */
3
+
4
+ :where(button, input, select, textarea) {
5
+ color: var(--text-primary);
6
+ font: inherit;
7
+ }
8
+
9
+ :where(
10
+ button,
11
+ input[type="button"],
12
+ input[type="reset"],
13
+ input[type="submit"]
14
+ ) {
15
+ border: 1px solid var(--control-border);
16
+ border-radius: var(--radius-sm);
17
+ background: var(--control-bg);
18
+ color: var(--control-text);
19
+ cursor: pointer;
20
+ padding: var(--sp-2) var(--sp-3);
21
+ }
22
+
23
+ :where(
24
+ input:not([type]),
25
+ input[type="date"],
26
+ input[type="datetime-local"],
27
+ input[type="email"],
28
+ input[type="month"],
29
+ input[type="number"],
30
+ input[type="password"],
31
+ input[type="search"],
32
+ input[type="tel"],
33
+ input[type="text"],
34
+ input[type="time"],
35
+ input[type="url"],
36
+ input[type="week"],
37
+ select,
38
+ textarea
39
+ ) {
40
+ border: 1px solid var(--border);
41
+ border-radius: var(--radius-sm);
42
+ background: var(--input-bg);
43
+ padding: var(--sp-2) var(--sp-3);
44
+ }
45
+
46
+ :where(select) {
47
+ cursor: pointer;
48
+ }
49
+
50
+ :where(textarea) {
51
+ resize: vertical;
52
+ }
53
+
54
+ :where(input, textarea)::placeholder {
55
+ color: var(--text-tertiary);
56
+ opacity: 1;
57
+ }
58
+
59
+ :where(
60
+ button:hover:not(:disabled),
61
+ input[type="button"]:hover:not(:disabled),
62
+ input[type="reset"]:hover:not(:disabled),
63
+ input[type="submit"]:hover:not(:disabled)
64
+ ) {
65
+ border-color: var(--control-hover-border);
66
+ background: var(--control-hover-bg);
67
+ }
68
+
69
+ :where(
70
+ input:not([type]):hover:not(:disabled),
71
+ input[type="date"]:hover:not(:disabled),
72
+ input[type="datetime-local"]:hover:not(:disabled),
73
+ input[type="email"]:hover:not(:disabled),
74
+ input[type="month"]:hover:not(:disabled),
75
+ input[type="number"]:hover:not(:disabled),
76
+ input[type="password"]:hover:not(:disabled),
77
+ input[type="search"]:hover:not(:disabled),
78
+ input[type="tel"]:hover:not(:disabled),
79
+ input[type="text"]:hover:not(:disabled),
80
+ input[type="time"]:hover:not(:disabled),
81
+ input[type="url"]:hover:not(:disabled),
82
+ input[type="week"]:hover:not(:disabled),
83
+ select:hover:not(:disabled),
84
+ textarea:hover:not(:disabled)
85
+ ) {
86
+ border-color: var(--border-hover);
87
+ }
88
+
89
+ :where(button, input, select, textarea):focus-visible {
90
+ border-color: var(--accent);
91
+ outline: 2px solid var(--accent);
92
+ outline-offset: 2px;
93
+ box-shadow: 0 0 0 4px var(--focus-ring);
94
+ }
95
+
96
+ :where(input[type="checkbox"], input[type="radio"]) {
97
+ appearance: none;
98
+ display: inline-grid;
99
+ width: 16px;
100
+ height: 16px;
101
+ flex: 0 0 auto;
102
+ margin: 0;
103
+ place-content: center;
104
+ border: 1px solid color-mix(in srgb, var(--text-tertiary) 85%, var(--surface-1));
105
+ background: var(--surface-1);
106
+ cursor: pointer;
107
+ vertical-align: middle;
108
+ }
109
+
110
+ :where(input[type="checkbox"]) {
111
+ border-radius: 4px;
112
+ }
113
+
114
+ :where(input[type="radio"]) {
115
+ border-radius: 50%;
116
+ }
117
+
118
+ :where(input[type="checkbox"]):checked,
119
+ :where(input[type="checkbox"]):indeterminate,
120
+ :where(input[type="radio"]):checked {
121
+ border-color: var(--accent);
122
+ background: var(--accent);
123
+ }
124
+
125
+ :where(input[type="checkbox"])::before {
126
+ width: 4px;
127
+ height: 8px;
128
+ border: solid var(--text-inverse);
129
+ border-width: 0 2px 2px 0;
130
+ content: "";
131
+ transform: scale(0) rotate(45deg);
132
+ }
133
+
134
+ :where(input[type="checkbox"]):checked::before {
135
+ transform: scale(1) rotate(45deg);
136
+ }
137
+
138
+ :where(input[type="checkbox"]):indeterminate::before {
139
+ width: 8px;
140
+ height: 2px;
141
+ border: 0;
142
+ background: var(--text-inverse);
143
+ transform: scale(1);
144
+ }
145
+
146
+ :where(input[type="radio"])::before {
147
+ width: 6px;
148
+ height: 6px;
149
+ border-radius: 50%;
150
+ background: var(--text-inverse);
151
+ content: "";
152
+ transform: scale(0);
153
+ }
154
+
155
+ :where(input[type="radio"]):checked::before {
156
+ transform: scale(1);
157
+ }
158
+
159
+ :where(input[type="range"], progress) {
160
+ accent-color: var(--accent);
161
+ }
162
+
163
+ :where(input[type="file"])::file-selector-button {
164
+ margin-right: var(--sp-3);
165
+ border: 1px solid var(--control-border);
166
+ border-radius: var(--radius-sm);
167
+ background: var(--control-bg);
168
+ color: var(--control-text);
169
+ cursor: pointer;
170
+ font: inherit;
171
+ padding: var(--sp-2) var(--sp-3);
172
+ }
173
+
174
+ :where(input[type="file"]:not(:disabled))::file-selector-button:hover {
175
+ border-color: var(--control-hover-border);
176
+ background: var(--control-hover-bg);
177
+ }
178
+
179
+ :where(input[type="file"]:disabled)::file-selector-button {
180
+ cursor: not-allowed;
181
+ }
182
+
183
+ :where(button, input, select, textarea):disabled {
184
+ cursor: not-allowed;
185
+ opacity: 0.55;
186
+ }
187
+
188
+ @media (forced-colors: active) {
189
+ :where(input[type="checkbox"], input[type="radio"]) {
190
+ appearance: auto;
191
+ }
192
+
193
+ :where(button, input, select, textarea):focus-visible {
194
+ outline: 2px solid CanvasText;
195
+ }
196
+ }
Binary file
Binary file
package/static/index.html CHANGED
@@ -22,6 +22,7 @@
22
22
  </script>
23
23
  <link rel="stylesheet" href="/assets/tokens.css" />
24
24
  <link rel="stylesheet" href="/assets/themes.css" />
25
+ <link rel="stylesheet" href="/assets/controls.css" />
25
26
  <style>
26
27
  /* Design tokens (color, surface, accent, status, chrome, body bg,
27
28
  inputs, toggles, spacing, radii, typography, motion) and the light
@@ -30,10 +31,12 @@
30
31
  1. Dark defaults from tokens.css (:root).
31
32
  2. Light overrides from themes.css ([data-theme="light"] +
32
33
  @media (prefers-color-scheme: light)).
33
- 3. The component-level rules below, which reference the tokens
34
+ 3. Low-specificity native controls from controls.css.
35
+ 4. The component-level rules below, which reference the tokens
34
36
  via var(--...).
35
37
  Edit packages/ui/static/tokens.css and themes.css to change the
36
- token surface. Edit this <style> block for per-component styling. */
38
+ token surface, controls.css for native-control defaults, and this
39
+ <style> block for per-component styling. */
37
40
 
38
41
  /* ── Reset & base ──────────────────────────────────────── */
39
42
 
@@ -1260,6 +1263,35 @@
1260
1263
  }
1261
1264
  .recipient-policy-sharing-details dt { color: var(--text-secondary); }
1262
1265
  .recipient-policy-sharing-details dd { margin: 0; color: var(--text-primary); }
1266
+
1267
+ .loading-card-list { display: grid; gap: var(--sp-3); }
1268
+ .loading-card {
1269
+ padding: var(--sp-4);
1270
+ border: 1px solid var(--border);
1271
+ border-radius: var(--radius-md);
1272
+ background: var(--surface-1);
1273
+ }
1274
+ .loading-card-header,
1275
+ .loading-card-detail {
1276
+ display: flex;
1277
+ align-items: center;
1278
+ justify-content: space-between;
1279
+ gap: var(--sp-3);
1280
+ }
1281
+ .loading-card-details { display: grid; gap: var(--sp-3); margin-top: var(--sp-4); }
1282
+ .loading-card-line,
1283
+ .loading-card-badge {
1284
+ display: block;
1285
+ background: linear-gradient(90deg, var(--border) 25%, var(--surface-2) 50%, var(--border) 75%);
1286
+ background-size: 400px 100%;
1287
+ animation: sync-shimmer var(--duration-shimmer) var(--ease-in-out) infinite;
1288
+ }
1289
+ .loading-card-line { height: 12px; border-radius: var(--radius-pill); }
1290
+ .loading-card-title { height: 16px; }
1291
+ .loading-card-badge { width: 72px; height: 20px; border-radius: var(--radius-pill); }
1292
+ .loading-card-label { width: 28%; }
1293
+ .loading-card .w-45 { width: 45%; }
1294
+ .loading-card .w-60 { width: 60%; }
1263
1295
  .recipient-policy-invitation-result {
1264
1296
  display: flex;
1265
1297
  align-items: flex-start;
@@ -1308,7 +1340,52 @@
1308
1340
  margin-top: var(--sp-2);
1309
1341
  padding-left: var(--sp-5);
1310
1342
  }
1311
- #devicesMount .recipient-policy-sharing-card > .settings-button { margin-top: var(--sp-4); }
1343
+ #devicesMount .recipient-policy-sharing-card > .settings-button {
1344
+ align-self: end;
1345
+ margin-top: var(--sp-4);
1346
+ }
1347
+
1348
+ #devicesMount .device-identity-card-actions {
1349
+ align-self: end;
1350
+ display: grid;
1351
+ gap: var(--sp-2);
1352
+ margin-top: var(--sp-4);
1353
+ }
1354
+ .device-identity-setup-summary,
1355
+ .recipient-policy-sharing-attention {
1356
+ display: flex;
1357
+ align-items: center;
1358
+ justify-content: space-between;
1359
+ gap: var(--sp-3);
1360
+ margin-bottom: var(--sp-4);
1361
+ }
1362
+ .recipient-policy-sharing-attention {
1363
+ display: block;
1364
+ border-color: color-mix(in srgb, var(--status-warning) 45%, var(--border));
1365
+ background: color-mix(in srgb, var(--status-warning) 8%, var(--surface-1));
1366
+ }
1367
+ .recipient-policy-sharing-attention p { margin-top: var(--sp-2); }
1368
+ .recipient-policy-sharing-attention .settings-button { margin-top: var(--sp-3); }
1369
+ .device-identity-setup-card fieldset,
1370
+ .device-identity-rebind fieldset {
1371
+ display: grid;
1372
+ gap: var(--sp-3);
1373
+ margin-top: var(--sp-4);
1374
+ padding: var(--sp-3);
1375
+ border: 1px solid var(--border);
1376
+ border-radius: var(--radius-sm);
1377
+ }
1378
+ .device-identity-setup-card legend,
1379
+ .device-identity-rebind legend { padding: 0 var(--sp-2); font-weight: var(--font-weight-semibold); }
1380
+ .device-identity-setup-card label,
1381
+ .device-identity-rebind label { display: flex; align-items: center; gap: var(--sp-2); }
1382
+ .device-identity-setup-card select,
1383
+ .device-identity-rebind select { width: 100%; min-height: 36px; }
1384
+ .device-identity-rebind { margin-top: var(--sp-4); }
1385
+ .device-identity-rebind-review { display: grid; gap: var(--sp-3); padding-top: var(--sp-2); }
1386
+ .device-identity-review-panel { margin-top: var(--sp-4); }
1387
+ .device-identity-review-panel ul { margin: var(--sp-3) 0; padding-left: var(--sp-5); }
1388
+ .device-identity-review-panel .peer-actions { margin-top: var(--sp-4); }
1312
1389
 
1313
1390
  @media (max-width: 720px) {
1314
1391
  .project-inventory-row-header { align-items: center; flex-wrap: wrap; }
@@ -1322,10 +1399,14 @@
1322
1399
  .recipient-policy-sharing-responsive-tabs { overflow-x: auto; }
1323
1400
  .recipient-policy-sharing-details div { grid-template-columns: 1fr; gap: var(--sp-1); }
1324
1401
  .recipient-policy-invitation-result { padding: var(--sp-3); }
1325
- #devicesMount .recipient-policy-sharing-card > .settings-button {
1402
+ #devicesMount .recipient-policy-sharing-card > .settings-button,
1403
+ #devicesMount .device-identity-card-actions .settings-button {
1326
1404
  min-height: 44px;
1327
1405
  width: 100%;
1328
1406
  }
1407
+ .device-identity-setup-summary { align-items: stretch; flex-direction: column; }
1408
+ .device-identity-setup-summary .settings-button,
1409
+ .device-identity-review-panel .settings-button { min-height: 44px; width: 100%; }
1329
1410
  }
1330
1411
 
1331
1412
  /* 36×36 square icon buttons — theme toggle, settings gear. */
@@ -3348,35 +3429,6 @@
3348
3429
  background: color-mix(in srgb, var(--accent) 88%, white);
3349
3430
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
3350
3431
  }
3351
- .cm-checkbox {
3352
- appearance: none;
3353
- width: 16px;
3354
- height: 16px;
3355
- border: 1px solid var(--border-hover);
3356
- border-radius: 4px;
3357
- background: var(--surface-1);
3358
- position: relative;
3359
- cursor: pointer;
3360
- }
3361
- .cm-checkbox:checked {
3362
- background: var(--accent);
3363
- border-color: var(--accent);
3364
- }
3365
- .cm-checkbox:checked::after {
3366
- content: "";
3367
- position: absolute;
3368
- left: 4px;
3369
- top: 1px;
3370
- width: 4px;
3371
- height: 8px;
3372
- border: solid var(--text-inverse);
3373
- border-width: 0 2px 2px 0;
3374
- transform: rotate(45deg);
3375
- }
3376
- .cm-checkbox:focus-visible {
3377
- outline: 2px solid var(--focus-ring);
3378
- outline-offset: 1px;
3379
- }
3380
3432
  .field textarea { resize: vertical; min-height: 84px; }
3381
3433
  .settings-save {
3382
3434
  border: 1px solid var(--control-border);
@@ -3928,9 +3980,9 @@
3928
3980
  <!-- ── Tab: Feed ───────────────────────────────────────── -->
3929
3981
  <div class="tab-panel" id="tab-feed">
3930
3982
  <div class="feed-controls">
3931
- <div class="section-meta" id="feedMeta">Loading memories…</div>
3983
+ <div class="section-meta" id="feedMeta" role="status" aria-live="polite">Loading memories…</div>
3932
3984
  <div class="feed-controls-right">
3933
- <input class="feed-search" id="feedSearch" placeholder="Search title, body, tags…" />
3985
+ <input class="feed-search" id="feedSearch" type="search" aria-label="Search memories" placeholder="Search title, body, tags…" />
3934
3986
  <div class="feed-toggle" id="feedScopeToggle">
3935
3987
  <button class="toggle-button" data-filter="all">All</button>
3936
3988
  <button class="toggle-button" data-filter="mine">My memories</button>
package/static/themes.css CHANGED
@@ -11,6 +11,8 @@
11
11
  * trivially auditable without depending on extra cascade tricks. */
12
12
 
13
13
  [data-theme="light"] {
14
+ color-scheme: light;
15
+
14
16
  /* Surface */
15
17
  --surface-0: #f7faf8;
16
18
  --surface-1: #ffffff;
@@ -81,6 +83,8 @@
81
83
 
82
84
  @media (prefers-color-scheme: light) {
83
85
  :root:not([data-theme="dark"]) {
86
+ color-scheme: light;
87
+
84
88
  --surface-0: #f7faf8;
85
89
  --surface-1: #ffffff;
86
90
  --surface-2: #eef5f1;
Binary file
Binary file
package/static/tokens.css CHANGED
@@ -10,6 +10,8 @@
10
10
  * Values come from the codemem design handoff (tokens/colors_and_type.css). */
11
11
 
12
12
  :root {
13
+ color-scheme: dark;
14
+
13
15
  /* Surface — deep ink */
14
16
  --surface-0: #0b1016;
15
17
  --surface-1: #0f1720;
Binary file
Binary file