@chatpanel/events 0.432.2 → 0.433.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.
Files changed (2) hide show
  1. package/a2ui-style.js +105 -0
  2. package/package.json +3 -1
package/a2ui-style.js ADDED
@@ -0,0 +1,105 @@
1
+ const n=`:root {
2
+ --a2ui-good-bg: #dcfce7; --a2ui-good-fg: #166534; --a2ui-warn-bg: #fef3c7; --a2ui-warn-fg: #92400e;
3
+ --a2ui-bad-bg: #fee2e2; --a2ui-bad-fg: #991b1b; --a2ui-up: #15803d; --a2ui-down: #b45309;
4
+ }
5
+ @media (prefers-color-scheme: dark) {
6
+ :root:not([data-theme='light']) {
7
+ --a2ui-good-bg: #12351f; --a2ui-good-fg: #86efac; --a2ui-warn-bg: #3a2a0c; --a2ui-warn-fg: #fcd34d;
8
+ --a2ui-bad-bg: #3b1414; --a2ui-bad-fg: #fca5a5; --a2ui-up: #4ade80; --a2ui-down: #fbbf24;
9
+ }
10
+ }
11
+ :root[data-theme='dark'] {
12
+ --a2ui-good-bg: #12351f; --a2ui-good-fg: #86efac; --a2ui-warn-bg: #3a2a0c; --a2ui-warn-fg: #fcd34d;
13
+ --a2ui-bad-bg: #3b1414; --a2ui-bad-fg: #fca5a5; --a2ui-up: #4ade80; --a2ui-down: #fbbf24;
14
+ }
15
+ .md-artifact-a2ui { position: relative; margin: 8px 0; }
16
+ .md-artifact-a2ui.a2ui-trivial p { margin: 0; }
17
+ .a2ui-host { font-size: 13px; line-height: 1.4; color: var(--text, #1b1f24); }
18
+ .a2ui-source-toggle {
19
+ position: absolute; top: 4px; right: 4px; border: 0; background: transparent; cursor: pointer;
20
+ color: var(--text-dim, #6b7280); font: 11px ui-monospace, monospace; opacity: 0; transition: opacity .15s;
21
+ }
22
+ .md-artifact-a2ui:hover .a2ui-source-toggle, .a2ui-source-toggle:focus-visible { opacity: 1; }
23
+
24
+ .a2ui-card {
25
+ border: 1px solid var(--border, #e3e6ea); border-radius: 12px; padding: 12px 14px;
26
+ background: var(--bg-elev, #fff); box-shadow: 0 1px 2px rgba(0,0,0,.04);
27
+ }
28
+ .a2ui-card + .a2ui-card, .a2ui-stack > .a2ui-card { margin: 0; }
29
+ .a2ui-stack { display: flex; gap: 8px; min-width: 0; }
30
+ .a2ui-column { flex-direction: column; }
31
+ .a2ui-row { flex-direction: row; align-items: center; flex-wrap: wrap; }
32
+ .a2ui-justify-center { justify-content: center; } .a2ui-justify-end { justify-content: flex-end; }
33
+ .a2ui-justify-spaceBetween { justify-content: space-between; } .a2ui-justify-spaceAround { justify-content: space-around; }
34
+ .a2ui-justify-spaceEvenly { justify-content: space-evenly; }
35
+ .a2ui-align-start { align-items: flex-start; } .a2ui-align-center { align-items: center; }
36
+ .a2ui-align-end { align-items: flex-end; } .a2ui-align-stretch { align-items: stretch; }
37
+ .a2ui-weight-1 { flex: 1 1 0; } .a2ui-weight-2 { flex: 2 1 0; } .a2ui-weight-3 { flex: 3 1 0; }
38
+ .a2ui-weight-4, .a2ui-weight-5, .a2ui-weight-6, .a2ui-weight-7, .a2ui-weight-8, .a2ui-weight-9,
39
+ .a2ui-weight-10, .a2ui-weight-11, .a2ui-weight-12 { flex: 4 1 0; }
40
+ .a2ui-row > .a2ui-column { flex: 1 1 0; }
41
+
42
+ .a2ui-text { margin: 0; overflow-wrap: anywhere; }
43
+ h3.a2ui-text { font-size: 17px; font-weight: 650; }
44
+ h4.a2ui-text { font-size: 15px; font-weight: 650; }
45
+ h5.a2ui-text { font-size: 13.5px; font-weight: 650; }
46
+ .a2ui-text-caption { font-size: 12px; color: var(--text-dim, #6b7280); }
47
+ .a2ui-icon { font-size: 18px; line-height: 1; width: 1.4em; text-align: center; }
48
+ .a2ui-divider { border: 0; border-top: 1px solid var(--border, #e3e6ea); margin: 4px 0; width: 100%; }
49
+ .a2ui-divider-v { border-top: 0; border-left: 1px solid var(--border, #e3e6ea); width: 0; align-self: stretch; }
50
+
51
+ .a2ui-stat { display: flex; flex-direction: column; min-width: 72px; padding: 4px 10px 4px 0; }
52
+ .a2ui-stat-label { font-size: 11.5px; color: var(--text-dim, #6b7280); text-transform: uppercase; letter-spacing: .03em; }
53
+ .a2ui-stat-value { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
54
+ .a2ui-stat-delta { font-size: 12px; color: var(--text-dim, #6b7280); }
55
+ .a2ui-trend-up { color: var(--a2ui-up); } .a2ui-trend-down { color: var(--a2ui-down); }
56
+
57
+ .a2ui-badge {
58
+ display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
59
+ background: var(--bg-soft, #f6f7f9); color: var(--text-dim, #6b7280); border: 1px solid var(--border, #e3e6ea);
60
+ }
61
+ .a2ui-tone-good { background: var(--a2ui-good-bg); color: var(--a2ui-good-fg); border-color: transparent; }
62
+ .a2ui-tone-warn { background: var(--a2ui-warn-bg); color: var(--a2ui-warn-fg); border-color: transparent; }
63
+ .a2ui-tone-bad { background: var(--a2ui-bad-bg); color: var(--a2ui-bad-fg); border-color: transparent; }
64
+ .a2ui-tone-info { background: var(--accent-soft, #eef0fe); color: var(--accent, #4f46e5); border-color: transparent; }
65
+
66
+ .a2ui-table-wrap { overflow-x: auto; max-width: 100%; }
67
+ .a2ui-table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
68
+ .a2ui-table caption { text-align: left; color: var(--text-dim, #6b7280); padding-bottom: 4px; }
69
+ .a2ui-table th { text-align: left; font-weight: 600; color: var(--text-dim, #6b7280); border-bottom: 1px solid var(--border, #e3e6ea); padding: 4px 8px 4px 0; }
70
+ .a2ui-table td { border-bottom: 1px solid var(--border, #e3e6ea); padding: 5px 8px 5px 0; font-variant-numeric: tabular-nums; }
71
+ .a2ui-table tr:last-child td { border-bottom: 0; }
72
+
73
+ .a2ui-chart { display: block; width: 100%; max-width: 360px; height: auto; }
74
+ .a2ui-image { max-width: 100%; border-radius: 8px; }
75
+ .a2ui-image-avatar, .a2ui-image-icon { width: 40px; height: 40px; object-fit: cover; border-radius: 50%; }
76
+ .a2ui-link { color: var(--accent, #4f46e5); cursor: pointer; text-decoration: none; font-weight: 500; }
77
+ .a2ui-link:hover { text-decoration: underline; }
78
+
79
+ .a2ui-btn {
80
+ font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 8px; cursor: pointer;
81
+ border: 1px solid var(--border, #e3e6ea); background: var(--bg-soft, #f6f7f9); color: var(--text, #1b1f24); align-self: flex-start;
82
+ }
83
+ .a2ui-btn-primary { background: var(--accent, #4f46e5); border-color: var(--accent, #4f46e5); color: #fff; }
84
+ .a2ui-btn-borderless { background: transparent; border-color: transparent; color: var(--accent, #4f46e5); padding-inline: 4px; }
85
+ .a2ui-btn:disabled { opacity: .55; cursor: default; }
86
+ .a2ui-btn .a2ui-inline { display: inline-flex; gap: 6px; align-items: center; }
87
+
88
+ .a2ui-field { display: flex; flex-direction: column; gap: 4px; }
89
+ .a2ui-label { font-size: 12px; color: var(--text-dim, #6b7280); }
90
+ .a2ui-input {
91
+ font: inherit; font-size: 13px; padding: 6px 8px; border-radius: 8px;
92
+ border: 1px solid var(--border, #e3e6ea); background: var(--bg, #fff); color: var(--text, #1b1f24);
93
+ }
94
+ .a2ui-check, .a2ui-choice { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
95
+ .a2ui-choices { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; }
96
+ .a2ui-choices legend { padding: 0 0 4px; }
97
+ .a2ui-chips .a2ui-choice { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border, #e3e6ea); background: var(--bg-soft, #f6f7f9); }
98
+ .a2ui-chips .a2ui-choice:has(input:checked) { border-color: var(--accent, #4f46e5); background: var(--accent-soft, #eef0fe); }
99
+ .a2ui-chips .a2ui-choice input { position: absolute; opacity: 0; pointer-events: none; }
100
+ .a2ui-slider { width: 100%; }
101
+
102
+ .a2ui-tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--border, #e3e6ea); margin-bottom: 8px; }
103
+ .a2ui-tab { font: inherit; font-size: 12.5px; border: 0; background: transparent; padding: 6px 10px; cursor: pointer; color: var(--text-dim, #6b7280); border-bottom: 2px solid transparent; }
104
+ .a2ui-tab.is-active { color: var(--text, #1b1f24); border-bottom-color: var(--accent, #4f46e5); }
105
+ `,o="--bg:#ffffff;--bg-soft:#f6f7f9;--bg-elev:#ffffff;--border:#e3e6ea;--text:#1b1f24;--text-dim:#6b7280;--accent:#4f46e5;--accent-soft:#eef0fe;",r="--bg:#16181d;--bg-soft:#1d2026;--bg-elev:#22262e;--border:#2c313a;--text:#e8eaed;--text-dim:#9aa1ac;--accent:#818cf8;--accent-soft:#272a4a;";function d(i,{dark:a=!1,background:e=""}={}){const t=/^#[0-9a-f]{3,8}$/i.test(String(e))?e:"transparent";return`<!doctype html><html data-theme="${a?"dark":"light"}"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><style>:root{${a?r:o}color-scheme:${a?"dark":"light"}}html,body{margin:0;padding:0;background:${t};font-family:system-ui,-apple-system,Roboto,sans-serif}${n}</style></head><body>${String(i||"")}</body></html>`}export{n as A2UI_CSS,d as a2uiDocument};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chatpanel/events",
3
- "version": "0.432.2",
3
+ "version": "0.433.0",
4
4
  "description": "The canonical ChatPanel event-log and capability contracts — typed durable facts, clock-free deterministic linearization, schema upcasting, and the invariants the replay harness asserts. Pure, dependency-free ESM shared by the ChatPanel extension, gateway and bridge.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -23,6 +23,7 @@
23
23
  "./a2ui-chart.js": "./a2ui-chart.js",
24
24
  "./a2ui-reply.js": "./a2ui-reply.js",
25
25
  "./a2ui-tool-cards.js": "./a2ui-tool-cards.js",
26
+ "./a2ui-style.js": "./a2ui-style.js",
26
27
  "./agent-dialects.js": "./agent-dialects.js",
27
28
  "./agent-portability.js": "./agent-portability.js",
28
29
  "./agent-session-open.js": "./agent-session-open.js",
@@ -378,6 +379,7 @@
378
379
  "a2ui-chart.js",
379
380
  "a2ui-reply.js",
380
381
  "a2ui-tool-cards.js",
382
+ "a2ui-style.js",
381
383
  "agent-dialects.js",
382
384
  "agent-portability.js",
383
385
  "agent-session-open.js",