@codemem/server 0.41.0 → 0.43.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
 
@@ -1200,6 +1203,76 @@
1200
1203
  font-weight: var(--font-weight-semibold);
1201
1204
  }
1202
1205
  .recipient-policy-management-dialog .modal-card { width: min(720px, calc(100vw - 32px)); }
1206
+ .legacy-team-setup-dialog .modal-card { width: min(680px, calc(100vw - 32px)); }
1207
+ .legacy-team-setup-steps {
1208
+ display: grid;
1209
+ grid-template-columns: repeat(3, minmax(0, 1fr));
1210
+ gap: var(--sp-2);
1211
+ margin: var(--sp-2) 0;
1212
+ padding-left: var(--sp-5);
1213
+ }
1214
+ .legacy-team-setup-steps button { width: 100%; }
1215
+ .legacy-team-setup-steps button[aria-current="step"] {
1216
+ border-color: var(--accent);
1217
+ background: var(--accent-subtle);
1218
+ color: var(--text-primary);
1219
+ font-weight: var(--font-weight-semibold);
1220
+ }
1221
+ .legacy-team-setup-dialog button[aria-disabled="true"] {
1222
+ opacity: 0.55;
1223
+ cursor: not-allowed;
1224
+ }
1225
+ .legacy-team-setup-body h3 { margin: var(--sp-2) 0; }
1226
+ .legacy-team-setup-body p { overflow-wrap: anywhere; }
1227
+ .legacy-team-setup-error { display: grid; gap: var(--sp-2); justify-items: start; }
1228
+ .legacy-team-setup-actions { justify-content: flex-end; }
1229
+ .legacy-team-setup-target { min-width: 24px; min-height: 24px; }
1230
+ .legacy-team-device-list { display: grid; gap: var(--sp-3); margin-top: var(--sp-3); }
1231
+ .legacy-team-device-row {
1232
+ display: grid;
1233
+ gap: var(--sp-2);
1234
+ min-width: 0;
1235
+ margin: 0;
1236
+ padding: var(--sp-3);
1237
+ border: 1px solid var(--border);
1238
+ border-radius: var(--radius-md);
1239
+ background: var(--surface-2);
1240
+ }
1241
+ .legacy-team-device-row legend {
1242
+ padding: 0 var(--sp-1);
1243
+ color: var(--text-primary);
1244
+ font-weight: var(--font-weight-semibold);
1245
+ }
1246
+ .legacy-team-device-row label { font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); }
1247
+ .legacy-team-device-evidence { display: grid; gap: var(--sp-1); }
1248
+ .legacy-team-device-select { width: 100%; margin: 0; }
1249
+ .legacy-team-device-select:disabled { opacity: 0.55; cursor: not-allowed; }
1250
+ .legacy-team-device-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
1251
+ .legacy-team-project-list { display: grid; gap: var(--sp-3); margin-top: var(--sp-3); }
1252
+ .legacy-team-project-row {
1253
+ display: grid;
1254
+ gap: var(--sp-2);
1255
+ min-width: 0;
1256
+ margin: 0;
1257
+ padding: var(--sp-3);
1258
+ border: 1px solid var(--border);
1259
+ border-radius: var(--radius-md);
1260
+ background: var(--surface-2);
1261
+ }
1262
+ .legacy-team-project-row legend {
1263
+ padding: 0 var(--sp-1);
1264
+ color: var(--text-primary);
1265
+ font-weight: var(--font-weight-semibold);
1266
+ }
1267
+ .legacy-team-project-row label { font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); }
1268
+ .legacy-team-project-select { width: 100%; margin: 0; }
1269
+ .legacy-team-project-select:disabled { opacity: 0.55; cursor: not-allowed; }
1270
+ .legacy-team-setup-delta { display: grid; gap: var(--sp-3); }
1271
+ .legacy-team-setup-delta section { padding-block: var(--sp-2); border-bottom: 1px solid var(--border); }
1272
+ .legacy-team-setup-delta h4 { margin: 0 0 var(--sp-2); }
1273
+ .legacy-team-setup-delta ul { display: grid; gap: var(--sp-1); margin: 0; padding-inline-start: var(--sp-5); }
1274
+ .legacy-team-setup-confirmation { display: flex; gap: var(--sp-2); align-items: flex-start; margin-block: var(--sp-4); }
1275
+ .legacy-team-setup-confirmation input { flex: 0 0 auto; margin-top: 0.2em; min-width: 24px; min-height: 24px; }
1203
1276
  .recipient-policy-management-selection fieldset { border: 0; padding: 0; margin: var(--sp-4) 0 0; }
1204
1277
  .recipient-policy-management-selection legend { font-weight: var(--font-weight-semibold); }
1205
1278
  .recipient-policy-management-review section + section { margin-top: var(--sp-4); }
@@ -1260,6 +1333,35 @@
1260
1333
  }
1261
1334
  .recipient-policy-sharing-details dt { color: var(--text-secondary); }
1262
1335
  .recipient-policy-sharing-details dd { margin: 0; color: var(--text-primary); }
1336
+
1337
+ .loading-card-list { display: grid; gap: var(--sp-3); }
1338
+ .loading-card {
1339
+ padding: var(--sp-4);
1340
+ border: 1px solid var(--border);
1341
+ border-radius: var(--radius-md);
1342
+ background: var(--surface-1);
1343
+ }
1344
+ .loading-card-header,
1345
+ .loading-card-detail {
1346
+ display: flex;
1347
+ align-items: center;
1348
+ justify-content: space-between;
1349
+ gap: var(--sp-3);
1350
+ }
1351
+ .loading-card-details { display: grid; gap: var(--sp-3); margin-top: var(--sp-4); }
1352
+ .loading-card-line,
1353
+ .loading-card-badge {
1354
+ display: block;
1355
+ background: linear-gradient(90deg, var(--border) 25%, var(--surface-2) 50%, var(--border) 75%);
1356
+ background-size: 400px 100%;
1357
+ animation: sync-shimmer var(--duration-shimmer) var(--ease-in-out) infinite;
1358
+ }
1359
+ .loading-card-line { height: 12px; border-radius: var(--radius-pill); }
1360
+ .loading-card-title { height: 16px; }
1361
+ .loading-card-badge { width: 72px; height: 20px; border-radius: var(--radius-pill); }
1362
+ .loading-card-label { width: 28%; }
1363
+ .loading-card .w-45 { width: 45%; }
1364
+ .loading-card .w-60 { width: 60%; }
1263
1365
  .recipient-policy-invitation-result {
1264
1366
  display: flex;
1265
1367
  align-items: flex-start;
@@ -1308,7 +1410,52 @@
1308
1410
  margin-top: var(--sp-2);
1309
1411
  padding-left: var(--sp-5);
1310
1412
  }
1311
- #devicesMount .recipient-policy-sharing-card > .settings-button { margin-top: var(--sp-4); }
1413
+ #devicesMount .recipient-policy-sharing-card > .settings-button {
1414
+ align-self: end;
1415
+ margin-top: var(--sp-4);
1416
+ }
1417
+
1418
+ #devicesMount .device-identity-card-actions {
1419
+ align-self: end;
1420
+ display: grid;
1421
+ gap: var(--sp-2);
1422
+ margin-top: var(--sp-4);
1423
+ }
1424
+ .device-identity-setup-summary,
1425
+ .recipient-policy-sharing-attention {
1426
+ display: flex;
1427
+ align-items: center;
1428
+ justify-content: space-between;
1429
+ gap: var(--sp-3);
1430
+ margin-bottom: var(--sp-4);
1431
+ }
1432
+ .recipient-policy-sharing-attention {
1433
+ display: block;
1434
+ border-color: color-mix(in srgb, var(--status-warning) 45%, var(--border));
1435
+ background: color-mix(in srgb, var(--status-warning) 8%, var(--surface-1));
1436
+ }
1437
+ .recipient-policy-sharing-attention p { margin-top: var(--sp-2); }
1438
+ .recipient-policy-sharing-attention .settings-button { margin-top: var(--sp-3); }
1439
+ .device-identity-setup-card fieldset,
1440
+ .device-identity-rebind fieldset {
1441
+ display: grid;
1442
+ gap: var(--sp-3);
1443
+ margin-top: var(--sp-4);
1444
+ padding: var(--sp-3);
1445
+ border: 1px solid var(--border);
1446
+ border-radius: var(--radius-sm);
1447
+ }
1448
+ .device-identity-setup-card legend,
1449
+ .device-identity-rebind legend { padding: 0 var(--sp-2); font-weight: var(--font-weight-semibold); }
1450
+ .device-identity-setup-card label,
1451
+ .device-identity-rebind label { display: flex; align-items: center; gap: var(--sp-2); }
1452
+ .device-identity-setup-card select,
1453
+ .device-identity-rebind select { width: 100%; min-height: 36px; }
1454
+ .device-identity-rebind { margin-top: var(--sp-4); }
1455
+ .device-identity-rebind-review { display: grid; gap: var(--sp-3); padding-top: var(--sp-2); }
1456
+ .device-identity-review-panel { margin-top: var(--sp-4); }
1457
+ .device-identity-review-panel ul { margin: var(--sp-3) 0; padding-left: var(--sp-5); }
1458
+ .device-identity-review-panel .peer-actions { margin-top: var(--sp-4); }
1312
1459
 
1313
1460
  @media (max-width: 720px) {
1314
1461
  .project-inventory-row-header { align-items: center; flex-wrap: wrap; }
@@ -1322,10 +1469,14 @@
1322
1469
  .recipient-policy-sharing-responsive-tabs { overflow-x: auto; }
1323
1470
  .recipient-policy-sharing-details div { grid-template-columns: 1fr; gap: var(--sp-1); }
1324
1471
  .recipient-policy-invitation-result { padding: var(--sp-3); }
1325
- #devicesMount .recipient-policy-sharing-card > .settings-button {
1472
+ #devicesMount .recipient-policy-sharing-card > .settings-button,
1473
+ #devicesMount .device-identity-card-actions .settings-button {
1326
1474
  min-height: 44px;
1327
1475
  width: 100%;
1328
1476
  }
1477
+ .device-identity-setup-summary { align-items: stretch; flex-direction: column; }
1478
+ .device-identity-setup-summary .settings-button,
1479
+ .device-identity-review-panel .settings-button { min-height: 44px; width: 100%; }
1329
1480
  }
1330
1481
 
1331
1482
  /* 36×36 square icon buttons — theme toggle, settings gear. */
@@ -3348,35 +3499,6 @@
3348
3499
  background: color-mix(in srgb, var(--accent) 88%, white);
3349
3500
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
3350
3501
  }
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
3502
  .field textarea { resize: vertical; min-height: 84px; }
3381
3503
  .settings-save {
3382
3504
  border: 1px solid var(--control-border);
@@ -3592,6 +3714,8 @@
3592
3714
  .tab-bar { padding: 0 var(--sp-4); }
3593
3715
  .modal { padding: var(--sp-3); }
3594
3716
  .modal-card { padding: var(--sp-4); border-radius: var(--radius-lg); }
3717
+ .legacy-team-setup-dialog .modal-card { width: calc(100vw - 16px); }
3718
+ .legacy-team-setup-steps { grid-template-columns: 1fr; }
3595
3719
  }
3596
3720
 
3597
3721
  /* ──────────────────────────────────────────────────────────────────
@@ -3679,6 +3803,7 @@
3679
3803
  </nav>
3680
3804
  <div id="toastRoot"></div>
3681
3805
  <div id="recipientPolicyManagementMount"></div>
3806
+ <div id="legacyTeamSetupMount"></div>
3682
3807
  <div class="viewer-reconnect-overlay" id="viewerReconnectOverlay" hidden>
3683
3808
  <div class="viewer-reconnect-card" role="status" aria-live="assertive">
3684
3809
  <div class="viewer-reconnect-eyebrow">Viewer connection</div>
@@ -3928,9 +4053,9 @@
3928
4053
  <!-- ── Tab: Feed ───────────────────────────────────────── -->
3929
4054
  <div class="tab-panel" id="tab-feed">
3930
4055
  <div class="feed-controls">
3931
- <div class="section-meta" id="feedMeta">Loading memories…</div>
4056
+ <div class="section-meta" id="feedMeta" role="status" aria-live="polite">Loading memories…</div>
3932
4057
  <div class="feed-controls-right">
3933
- <input class="feed-search" id="feedSearch" placeholder="Search title, body, tags…" />
4058
+ <input class="feed-search" id="feedSearch" type="search" aria-label="Search memories" placeholder="Search title, body, tags…" />
3934
4059
  <div class="feed-toggle" id="feedScopeToggle">
3935
4060
  <button class="toggle-button" data-filter="all">All</button>
3936
4061
  <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