@commonpub/layer 0.86.1 → 0.86.3

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.
@@ -640,7 +640,7 @@ function onHandlePointerDown(e: PointerEvent): void {
640
640
  gap: 4px;
641
641
  align-items: center;
642
642
  }
643
- .cpub-layout-section-placeholder code { color: var(--accent); }
643
+ .cpub-layout-section-placeholder code { color: var(--code-inline); }
644
644
  .cpub-layout-section-placeholder-hint {
645
645
  font-size: var(--text-xs);
646
646
  color: var(--text-faint);
@@ -205,7 +205,7 @@ export function digestFor(body: string): string {
205
205
  .scene-muted { font-size: var(--text-sm); color: var(--text-dim); margin: 0; }
206
206
  .scene-faint { font-size: var(--text-sm); color: var(--text-faint); margin: 0; }
207
207
  .scene-mono-label { font-family: var(--font-mono); font-size: var(--text-label); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-dim); margin: 0; }
208
- .scene-inline-code { font-family: var(--font-mono); font-size: 0.9em; padding: 1px 6px; background: var(--surface2); color: var(--accent); border: var(--border-width-thin) solid var(--border2); }
208
+ .scene-inline-code { font-family: var(--font-mono); font-size: 0.9em; padding: 1px 6px; background: var(--surface2); color: var(--code-inline); border: var(--border-width-thin) solid var(--border2); }
209
209
 
210
210
  /* Buttons */
211
211
  .scene-btn {
@@ -119,7 +119,7 @@
119
119
  color: var(--text-dim);
120
120
  background: var(--accent-bg);
121
121
  }
122
- .scene-prose-code-inline { font-family: var(--font-mono); font-size: 0.9em; padding: 1px 6px; background: var(--surface2); border: var(--border-width-thin) solid var(--border2); color: var(--accent); }
122
+ .scene-prose-code-inline { font-family: var(--font-mono); font-size: 0.9em; padding: 1px 6px; background: var(--surface2); border: var(--border-width-thin) solid var(--border2); color: var(--code-inline); }
123
123
  .scene-prose-pre {
124
124
  background: var(--code-bg);
125
125
  color: var(--code-text);
@@ -25,7 +25,7 @@ const html = computed(() => sanitizeBlockHtml((props.content.html as string) ||
25
25
  .cpub-block-text :deep(code) {
26
26
  font-family: var(--font-mono);
27
27
  font-size: 13px;
28
- color: var(--teal);
28
+ color: var(--code-inline);
29
29
  background: var(--surface2);
30
30
  border: var(--border-width-default) solid var(--border);
31
31
  padding: 1px 6px;
@@ -568,7 +568,7 @@ useJsonLd({
568
568
  .cpub-prose :deep(code) {
569
569
  font-family: var(--font-mono);
570
570
  font-size: 13px;
571
- color: var(--teal);
571
+ color: var(--code-inline);
572
572
  background: var(--surface2);
573
573
  border: var(--border-width-default) solid var(--border);
574
574
  padding: 1px 6px;
@@ -696,7 +696,7 @@ onUnmounted(() => { document.removeEventListener('keydown', onKeydown); });
696
696
  background: var(--surface2);
697
697
  border: var(--border-width-default) solid var(--border);
698
698
  padding: 1px 6px;
699
- color: var(--accent);
699
+ color: var(--code-inline);
700
700
  }
701
701
 
702
702
  .cpub-empty-section {
@@ -926,7 +926,7 @@ async function handleBuild(): Promise<void> {
926
926
  background: var(--surface2);
927
927
  padding: 2px 5px;
928
928
  border: var(--border-width-default) solid var(--border2);
929
- color: var(--accent);
929
+ color: var(--code-inline);
930
930
  }
931
931
 
932
932
  .cpub-prose :deep(pre code) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commonpub/layer",
3
- "version": "0.86.1",
3
+ "version": "0.86.3",
4
4
  "type": "module",
5
5
  "main": "./nuxt.config.ts",
6
6
  "files": [
@@ -55,16 +55,16 @@
55
55
  "vue-router": "^4.3.0",
56
56
  "zod": "^4.3.6",
57
57
  "@commonpub/auth": "0.8.0",
58
- "@commonpub/config": "0.23.0",
59
58
  "@commonpub/docs": "0.6.3",
60
- "@commonpub/protocol": "0.14.0",
61
- "@commonpub/learning": "0.5.2",
62
59
  "@commonpub/explainer": "0.8.0",
60
+ "@commonpub/schema": "0.48.0",
61
+ "@commonpub/protocol": "0.14.0",
62
+ "@commonpub/editor": "0.9.0",
63
+ "@commonpub/config": "0.23.0",
63
64
  "@commonpub/theme-studio": "0.6.1",
64
65
  "@commonpub/server": "2.92.0",
65
- "@commonpub/editor": "0.9.0",
66
66
  "@commonpub/ui": "0.13.1",
67
- "@commonpub/schema": "0.48.0"
67
+ "@commonpub/learning": "0.5.2"
68
68
  },
69
69
  "devDependencies": {
70
70
  "@testing-library/jest-dom": "^6.9.1",
package/theme/base.css CHANGED
@@ -108,6 +108,14 @@
108
108
 
109
109
  --color-text-inverse: #ffffff;
110
110
 
111
+ /* Inline-code text. The raw --teal fails WCAG AA as small text on the light
112
+ --surface2 chip (≈2.4:1 on base, worse on vivid themes). --code-inline is the
113
+ theme's teal mixed toward --text so it stays branded yet readable; it adapts
114
+ per theme (deveco's green, dark mode's light text) via the inner var()
115
+ resolution. The @supports block (after :root) upgrades it to color-mix; this is
116
+ the readable fallback. */
117
+ --code-inline: var(--text);
118
+
111
119
  /* Code block tokens (GitHub Dark defaults — overridable by themes) */
112
120
  --code-bg: #0d1117;
113
121
  --code-text: #e6edf3;
@@ -305,6 +313,17 @@
305
313
  --focus-ring: var(--shadow-accent);
306
314
  }
307
315
 
316
+ /* Branded-but-readable inline code: mix the theme's --teal ~50% toward --text so it
317
+ reads at ~6:1 on light themes and adapts on dark (mixes toward the light --text).
318
+ One definition adapts to every theme because the inner var()s resolve at the
319
+ inline-code element. ~95% browser support; older browsers keep the readable
320
+ --text fallback declared in :root above. */
321
+ @supports (color: color-mix(in srgb, red, white)) {
322
+ :root {
323
+ --code-inline: color-mix(in srgb, var(--teal), var(--text) 50%);
324
+ }
325
+ }
326
+
308
327
  /* === BASE STYLES === */
309
328
  body {
310
329
  font-family: var(--font-body);
package/theme/prose.css CHANGED
@@ -65,7 +65,7 @@
65
65
  .cpub-prose code {
66
66
  font-family: var(--font-mono);
67
67
  font-size: 0.9em;
68
- color: var(--teal);
68
+ color: var(--code-inline);
69
69
  background: var(--surface2);
70
70
  padding: 2px 6px;
71
71
  border: var(--border-width-thin) solid var(--border2);