tandem-editor 0.13.0 → 0.13.6

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.
@@ -85,8 +85,19 @@
85
85
  --tandem-author-user: oklch(0.55 0.14 245);
86
86
  --tandem-author-claude: #d97757;
87
87
  --tandem-author-claude-fg: oklch(0.24 0.03 55);
88
+ --tandem-author-user-bg: color-mix(in srgb, var(--tandem-author-user) 10%, var(--tandem-surface));
89
+ --tandem-author-claude-bg: color-mix(in srgb, var(--tandem-author-claude) 10%, var(--tandem-surface));
88
90
  --tandem-claude-focus-bg: color-mix(in srgb, var(--tandem-author-claude) 10%, transparent);
89
91
  --tandem-claude-focus-border: color-mix(in srgb, var(--tandem-author-claude) 40%, transparent);
92
+ /* File-type pip colors for the new-tab launcher recents list. These are
93
+ 6px decorative dots (non-text → WCAG text-contrast does not gate).
94
+ .md/.docx reuse the author tokens; .txt/.html get their own identity
95
+ so they don't read as authorship. Light seeds are taken verbatim from
96
+ the Claude Design a7 bundle; dark variants below derive from these by
97
+ applying the same light→dark lightness lift the author-user token uses
98
+ (+0.17 L, -0.01 C, hue fixed). */
99
+ --tandem-filetype-txt: oklch(0.62 0.04 280);
100
+ --tandem-filetype-html: oklch(0.55 0.14 150);
90
101
  --tandem-success: oklch(0.55 0.14 150);
91
102
  --tandem-success-fg: #ffffff;
92
103
  --tandem-success-fg-strong: #166534;
@@ -121,6 +132,15 @@
121
132
  --tandem-highlight-green: rgba(76, 175, 80, 0.3);
122
133
  --tandem-highlight-blue: rgba(33, 150, 243, 0.3);
123
134
  --tandem-highlight-pink: rgba(236, 72, 153, 0.3);
135
+ /* Theme-picker swatch chips. Fixed identity colors that PREVIEW
136
+ each scheme — they do NOT track the active theme (adapting
137
+ them would defeat the picker visually). Note:
138
+ --tandem-swatch-dark is oklch(0.22 0.012 280), NOT the dark
139
+ theme's actual --tandem-bg (oklch(0.18 0.012 270)) —
140
+ intentional design choice; do not "correct" to match. */
141
+ --tandem-swatch-light: oklch(1 0 0);
142
+ --tandem-swatch-dark: oklch(0.22 0.012 280);
143
+ --tandem-swatch-warm: oklch(0.945 0.012 70);
124
144
  --tandem-h-fmtbar: 36px;
125
145
  --tandem-page-bg: #e8e8e8;
126
146
  --tandem-page-paper: #ffffff;
@@ -149,6 +169,26 @@
149
169
  --tandem-text-xl: 20px;
150
170
  --tandem-text-2xl: 28px;
151
171
  --tandem-text-3xl: 48px;
172
+ /* Phase 1.3 ADOPT — semantic type role tokens. Theme-invariant; no
173
+ dark/warm overrides needed. Per token-audit.md §"Semantic type
174
+ roles": h1/h2 adopt serif; body STAYS sans (PROD WINS override of
175
+ bundle's serif body — protected by token-audit.md line 84). */
176
+ --tandem-h1-font: var(--tandem-font-serif);
177
+ --tandem-h1-size: calc(var(--tandem-text-lg) * 2);
178
+ --tandem-h1-weight: 600;
179
+ --tandem-h1-leading: 1.15;
180
+ --tandem-h1-tracking: -0.02em;
181
+ --tandem-h2-font: var(--tandem-font-serif);
182
+ --tandem-h2-size: calc(var(--tandem-text-lg) * 1.4);
183
+ --tandem-h2-weight: 600;
184
+ --tandem-h2-leading: 1.2;
185
+ --tandem-h2-tracking: -0.015em;
186
+ --tandem-body-font: var(--tandem-font-sans);
187
+ --tandem-body-size: var(--tandem-editor-font-size, 17px);
188
+ --tandem-body-leading: 1.65;
189
+ --tandem-ui-font: var(--tandem-font-sans);
190
+ --tandem-ui-size: 13px;
191
+ --tandem-ui-leading: 1.4;
152
192
  --tandem-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.08);
153
193
  --tandem-shadow-2: 0 8px 24px rgba(0, 0, 0, 0.12);
154
194
  --tandem-shadow-3: 0 20px 60px rgba(0, 0, 0, 0.2);
@@ -167,6 +207,12 @@
167
207
  --tandem-z-modal: 1000;
168
208
  --tandem-z-toast: 1100;
169
209
  --tandem-z-tooltip: 10000;
210
+ /* The title bar lifts its controls above tauri-plugin-decorum's drag
211
+ overlay; --tandem-z-above-titlebar is for full-screen modal overlays
212
+ that must cover the title bar (otherwise the +new-tab button and
213
+ Solo/Tandem toggle poke through the dimming backdrop). */
214
+ --tandem-z-titlebar: 99999;
215
+ --tandem-z-above-titlebar: 100000;
170
216
  /* v7 floating chrome clearance/position vars — consumed by W2-W6
171
217
  rails, fmtbar, status pill. W4a maximalist lifted DocumentTabs
172
218
  into the floating TitleBar (44px tall, no in-flow tabs row), so
@@ -192,6 +238,18 @@
192
238
  0 1px 1px rgba(0, 0, 0, 0.04),
193
239
  0 6px 14px -6px rgba(0, 0, 0, 0.10),
194
240
  0 22px 38px -22px rgba(0, 0, 0, 0.16);
241
+ /* Motion easing tokens (Phase 4 / #798 — see
242
+ docs/design-system-impl/motion.md). Theme-independent timing
243
+ functions, defined once in :root. --tandem-ease-out is the primary
244
+ entrance/exit curve (fast into position, soft settle);
245
+ --tandem-ease-standard is reserved for longer layout transitions
246
+ (e.g. the A16 highlight wash). Per-scene @keyframes live in each
247
+ surface's own re-skin, not here. Reduced motion is already honored
248
+ app-wide via the prefers-reduced-motion media query + the
249
+ body.tandem-reduce-motion class (wired in App.svelte from the
250
+ reduceMotion setting). */
251
+ --tandem-ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
252
+ --tandem-ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
195
253
  }
196
254
 
197
255
  /* Shared white-mode floating-pill recipe. Applied to every floating
@@ -241,33 +299,109 @@
241
299
  to a card shape (menus aren't pill-shaped) and stacks an item list
242
300
  with a keyboard-hint footer. */
243
301
  .tandem-slash-menu {
244
- border-radius: var(--tandem-r-4);
245
- min-width: 200px;
302
+ border-radius: var(--tandem-r-5);
303
+ min-width: 256px;
246
304
  padding: var(--tandem-space-1);
247
305
  z-index: var(--tandem-z-popover, 1100);
306
+ /* A20a (#798) — the menu lifts in from the cursor anchor. The container
307
+ is created once and display-gated (none↔block in extension.ts), so a
308
+ CSS `animation` fires once on open (none→block) and does NOT replay on
309
+ the per-keystroke re-render (block→block, identical className → no
310
+ restart). The per-row cascade (A20b) is intentionally out of scope —
311
+ rows are torn down/rebuilt each keystroke and would flicker. */
312
+ transform-origin: top left;
313
+ animation: tandem-slash-menu-in 240ms var(--tandem-ease-out);
314
+ }
315
+ @keyframes tandem-slash-menu-in {
316
+ from {
317
+ opacity: 0;
318
+ transform: translateY(-4px) scale(0.98);
319
+ }
320
+ to {
321
+ opacity: 1;
322
+ transform: none;
323
+ }
324
+ }
325
+ @media (prefers-reduced-motion: reduce) {
326
+ .tandem-slash-menu {
327
+ animation: none;
328
+ }
329
+ }
330
+ body.tandem-reduce-motion .tandem-slash-menu {
331
+ animation: none;
248
332
  }
249
333
  .tandem-slash-menu__item {
250
334
  display: flex;
251
335
  align-items: center;
336
+ gap: var(--tandem-space-3);
252
337
  width: 100%;
253
- padding: var(--tandem-space-1) var(--tandem-space-3);
338
+ padding: var(--tandem-space-1) var(--tandem-space-2);
339
+ /* Transparent base border kept so the selected/hover states never
340
+ shift the row height by 1px. */
254
341
  border: 1px solid transparent;
255
- border-radius: var(--tandem-r-2);
342
+ border-radius: var(--tandem-r-3);
256
343
  background: transparent;
257
344
  color: var(--tandem-fg);
258
345
  font: inherit;
259
346
  font-size: var(--tandem-text-sm);
347
+ font-weight: 500;
260
348
  text-align: left;
261
349
  cursor: pointer;
262
350
  white-space: nowrap;
263
351
  }
264
352
  .tandem-slash-menu__item:hover {
265
- background: color-mix(in srgb, var(--tandem-fg) 5%, transparent);
353
+ background: var(--tandem-surface-sunk);
266
354
  }
267
355
  .tandem-slash-menu__item[aria-selected="true"] {
268
356
  background: var(--tandem-accent-bg);
269
357
  color: var(--tandem-accent-fg-strong);
358
+ border-color: transparent;
359
+ }
360
+ .tandem-slash-menu__icon {
361
+ flex-shrink: 0;
362
+ width: 26px;
363
+ height: 26px;
364
+ display: grid;
365
+ place-items: center;
366
+ border: 1px solid var(--tandem-border);
367
+ border-radius: var(--tandem-r-3);
368
+ background: var(--tandem-surface-sunk);
369
+ color: var(--tandem-fg-subtle);
370
+ font-weight: 700;
371
+ font-size: var(--tandem-text-2xs);
372
+ line-height: 1;
373
+ }
374
+ .tandem-slash-menu__icon svg {
375
+ width: 14px;
376
+ height: 14px;
377
+ display: block;
378
+ }
379
+ .tandem-slash-menu__item[aria-selected="true"] .tandem-slash-menu__icon {
380
+ background: color-mix(in srgb, var(--tandem-accent) 14%, var(--tandem-surface));
270
381
  border-color: var(--tandem-accent-border);
382
+ color: var(--tandem-accent);
383
+ }
384
+ .tandem-slash-menu__label {
385
+ flex: 1;
386
+ }
387
+ .tandem-slash-menu__shortcut {
388
+ flex-shrink: 0;
389
+ font-family: var(--tandem-font-mono);
390
+ font-size: var(--tandem-text-2xs);
391
+ padding: 0 6px;
392
+ border: 1px solid var(--tandem-border);
393
+ border-radius: var(--tandem-r-1);
394
+ background: var(--tandem-surface-sunk);
395
+ color: var(--tandem-fg-faint);
396
+ }
397
+ .tandem-slash-menu__item[aria-selected="true"] .tandem-slash-menu__shortcut {
398
+ background: var(--tandem-accent-bg);
399
+ border-color: var(--tandem-accent-border);
400
+ /* Matches the selected row's label color rather than the bundle's
401
+ --tandem-accent: accent-on-accent-bg is only ~4.6:1 in light mode
402
+ (AA-marginal), accent-fg-strong clears it comfortably (Conflict #6,
403
+ same call as the 1.7 version chip / 1.8 status pill). */
404
+ color: var(--tandem-accent-fg-strong);
271
405
  }
272
406
  .tandem-slash-menu__hint {
273
407
  display: flex;
@@ -309,8 +443,19 @@
309
443
  --tandem-author-user: oklch(0.72 0.13 245);
310
444
  --tandem-author-claude: #e89a78;
311
445
  --tandem-author-claude-fg: oklch(0.24 0.03 55);
446
+ /* Hand-coded saturated card tints (color-mix washes out against the dark
447
+ neutral, per the dark-mode -bg convention). Chosen distinct from
448
+ --tandem-warning-bg (#451a03, orange) and --tandem-suggestion-bg
449
+ (#2e1065, violet): navy-leaning for user, red-peach for claude. */
450
+ --tandem-author-user-bg: #11243f;
451
+ --tandem-author-claude-bg: #4d2419;
312
452
  --tandem-claude-focus-bg: color-mix(in srgb, var(--tandem-author-claude) 10%, transparent);
313
453
  --tandem-claude-focus-border: color-mix(in srgb, var(--tandem-author-claude) 40%, transparent);
454
+ /* Dark file-type pips — light seeds lifted by the author-user light→dark
455
+ delta (+0.17 L, -0.01 C, hue fixed) so they stay legible on the dark
456
+ recents surface. See the light :root block for the rationale. */
457
+ --tandem-filetype-txt: oklch(0.79 0.03 280);
458
+ --tandem-filetype-html: oklch(0.72 0.13 150);
314
459
  --tandem-success: #22c55e;
315
460
  --tandem-success-fg: #0f172a;
316
461
  --tandem-success-fg-strong: #bbf7d0;
@@ -436,6 +581,8 @@
436
581
  --tandem-accent-fg-strong: HighlightText;
437
582
  --tandem-author-user: CanvasText;
438
583
  --tandem-author-claude: CanvasText;
584
+ --tandem-author-user-bg: Canvas;
585
+ --tandem-author-claude-bg: Canvas;
439
586
  --tandem-claude-focus-bg: Canvas;
440
587
  --tandem-claude-focus-border: Highlight;
441
588
  --tandem-scrollbar-track: Canvas;
@@ -477,9 +624,37 @@
477
624
  scrollbar-width: thin;
478
625
  scrollbar-color: var(--tandem-scrollbar-thumb) var(--tandem-scrollbar-track);
479
626
  }
627
+
628
+ /* Phase 1.3 ADOPT — semantic type utility classes. Reach for these
629
+ from chrome surfaces (rail labels, UI captions) instead of inlining
630
+ font-family/size/leading. Editor heading rules live in editor.css. */
631
+ .tandem-h1 {
632
+ font-family: var(--tandem-h1-font);
633
+ font-size: var(--tandem-h1-size);
634
+ font-weight: var(--tandem-h1-weight);
635
+ line-height: var(--tandem-h1-leading);
636
+ letter-spacing: var(--tandem-h1-tracking);
637
+ }
638
+ .tandem-h2 {
639
+ font-family: var(--tandem-h2-font);
640
+ font-size: var(--tandem-h2-size);
641
+ font-weight: var(--tandem-h2-weight);
642
+ line-height: var(--tandem-h2-leading);
643
+ letter-spacing: var(--tandem-h2-tracking);
644
+ }
645
+ .tandem-body {
646
+ font-family: var(--tandem-body-font);
647
+ font-size: var(--tandem-body-size);
648
+ line-height: var(--tandem-body-leading);
649
+ }
650
+ .tandem-ui {
651
+ font-family: var(--tandem-ui-font);
652
+ font-size: var(--tandem-ui-size);
653
+ line-height: var(--tandem-ui-leading);
654
+ }
480
655
  </style>
481
- <script type="module" crossorigin src="/assets/index-g-KwmRn9.js"></script>
482
- <link rel="stylesheet" crossorigin href="/assets/index-D8uS4cj7.css">
656
+ <script type="module" crossorigin src="/assets/index-DDqbVvCU.js"></script>
657
+ <link rel="stylesheet" crossorigin href="/assets/index-C4uZDO35.css">
483
658
  </head>
484
659
  <body>
485
660
  <div id="root"></div>
@@ -4210,7 +4210,7 @@ var HighlightColorSchema = external_exports.enum(["yellow", "green", "blue", "pi
4210
4210
  var SeveritySchema = external_exports.enum(["info", "warning", "error", "success"]);
4211
4211
  var TandemModeSchema = external_exports.enum(["solo", "tandem"]);
4212
4212
  var AuthorSchema = external_exports.enum(["user", "claude", "import"]);
4213
- var ReplyAuthorSchema = external_exports.enum(["user", "claude"]);
4213
+ var ReplyAuthorSchema = external_exports.enum(["user", "claude", "import"]);
4214
4214
  var AnnotationActionSchema = external_exports.enum(["accept", "dismiss"]);
4215
4215
  var ExportFormatSchema = external_exports.enum(["markdown", "json"]);
4216
4216
  var DocumentFormatSchema = external_exports.enum(["md", "txt", "html", "docx"]);