@qball-inc/tokens 0.1.0 → 1.0.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/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Ashay Kubal
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -58,6 +58,10 @@
58
58
  behind a dialog). Theme-independent dark veil, matching the preview cards;
59
59
  consumed by the .scrim class and the Scrim overlay component. */
60
60
  --color-scrim: rgba(20, 20, 20, 0.45);
61
+ /* Light foreground for glyphs sitting ON the dark scrim (e.g. the MediaSlot
62
+ embed-facade play button). Theme-independent — the scrim is always a dark
63
+ veil, so the glyph on it is always light. */
64
+ --color-on-scrim: rgba(255, 255, 255, 0.96);
61
65
 
62
66
  /* ===== Finance / data palette (traditional hues, warm-tuned) =====
63
67
  Recognizable green/red/gold/blue for data semantics ONLY (gains,
@@ -163,6 +167,8 @@
163
167
  --data-down-bg: rgba(226, 112, 95, 0.15);
164
168
  --data-warn-bg: rgba(217, 180, 60, 0.16);
165
169
  --data-info-bg: rgba(91, 155, 214, 0.15);
170
+ --anno-source: #93A7B5;
171
+ --anno-source-bg: rgba(147, 167, 181, 0.16);
166
172
  }
167
173
  }
168
174
 
package/components.css CHANGED
@@ -263,9 +263,71 @@
263
263
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
264
264
  }
265
265
  .segmented button:last-child { border-right: 0; }
266
- .segmented button:hover { color: var(--text-secondary); }
266
+ .segmented button:hover:not(:disabled) { color: var(--text-secondary); }
267
267
  .segmented button[aria-pressed="true"] { background: var(--signal-bg); color: var(--color-signal); }
268
268
 
269
+ /* ----- Tabs ----------------------------------------------------
270
+ Page-level section switcher. Distinct from .segmented (a compact,
271
+ boxed inline toggle): Tabs are an UNDERLINE list for larger content
272
+ regions. Active = sage label + sage underline sitting on the list's
273
+ hairline baseline; inactive = muted; hover lifts to secondary. Active
274
+ weight is held constant (no bold) so switching tabs causes no layout
275
+ shift. Styled on aria-selected (which the React Tabs wrapper sets),
276
+ matching the .segmented aria-pressed / .menu__item aria-selected cue. */
277
+ .tabs { font-family: var(--font-ui); }
278
+
279
+ .tab-list {
280
+ display: flex;
281
+ gap: var(--space-lg);
282
+ border-bottom: 1px solid var(--border-default);
283
+ }
284
+
285
+ .tab {
286
+ appearance: none; -webkit-appearance: none;
287
+ margin: 0 0 -1px; /* overlap the list rule so the active underline replaces it */
288
+ padding: var(--space-sm) 0;
289
+ background: transparent;
290
+ border: 0; border-bottom: 2px solid transparent;
291
+ font-family: inherit; font-size: var(--size-button);
292
+ color: var(--text-muted);
293
+ cursor: pointer;
294
+ transition: color var(--dur-base) var(--ease-out),
295
+ border-color var(--dur-base) var(--ease-out);
296
+ }
297
+ .tab:hover:not(:disabled) { color: var(--text-secondary); }
298
+ .tab[aria-selected="true"] {
299
+ color: var(--color-signal);
300
+ border-bottom-color: var(--color-signal);
301
+ }
302
+ .tab:disabled, .tab[data-disabled] { opacity: 0.4; cursor: not-allowed; }
303
+
304
+ .tab-panel { padding-top: var(--space-md); color: var(--text-secondary); }
305
+
306
+ /* ----- Shared focus ring ---------------------------------------
307
+ The library's single sage keyboard-focus ring (:focus-visible only,
308
+ so pointer clicks stay clean). Retrofits every interactive surface
309
+ that previously relied on the UA outline. One treatment, two offset
310
+ contexts: OUTSET for standalone controls; INSET where a container
311
+ would clip the ring (.segmented is overflow:hidden; the .menu /
312
+ .dropdown / .notif panels scroll). Additive — leaves the existing
313
+ border-color :focus on .input / .select / .switch untouched. */
314
+ .btn:focus-visible,
315
+ .iconbtn:focus-visible,
316
+ .tab:focus-visible,
317
+ .gwrap:focus-visible,
318
+ .appnav a:focus-visible,
319
+ .link:focus-visible {
320
+ outline: 2px solid var(--color-signal);
321
+ outline-offset: 2px;
322
+ }
323
+ .segmented button:focus-visible,
324
+ .menu__item:focus-visible,
325
+ .dropdown__row:focus-visible,
326
+ .notif__item:focus-visible {
327
+ outline: 2px solid var(--color-signal);
328
+ outline-offset: -2px;
329
+ }
330
+
269
331
  /* ----- Scrim / overlay backdrop --------------------------------
270
332
  The dim veil behind a modal/dialog — the brand's no-shadow lift
271
333
  partner. Full-viewport fixed layer; no blur (the preview oracle
@@ -400,6 +462,23 @@
400
462
  .skel { animation: none; background: var(--bg-surface); }
401
463
  }
402
464
 
465
+ /* ----- AI sparkle shimmer — the icon system's ONLY animated icon ----
466
+ Signals ACTIVE AI. Apply the `ic-ai-shimmer` class to <AiSparkle> (it
467
+ merges after the base `ic`): a gentle opacity/scale twinkle paced by
468
+ the --duration-slow token. Reduced-motion collapses it to one static
469
+ sparkle (no loop) — the binding DESIGN.md Motion contract (§7a). */
470
+ .ic-ai-shimmer {
471
+ transform-origin: center;
472
+ animation: ic-ai-shimmer calc(var(--dur-slow) * 4) ease-in-out infinite;
473
+ }
474
+ @keyframes ic-ai-shimmer {
475
+ 0%, 100% { opacity: 1; transform: scale(1); }
476
+ 50% { opacity: 0.55; transform: scale(0.92); }
477
+ }
478
+ @media (prefers-reduced-motion: reduce) {
479
+ .ic-ai-shimmer { animation: none; opacity: 1; }
480
+ }
481
+
403
482
  /* ----- Empty / error / status states ---------------------------
404
483
  Centered figure: icon chip, headline, supporting line, action.
405
484
  --error reserves the red for genuine failures; --empty stays
@@ -446,6 +525,22 @@
446
525
  .gtip--cited .gtip__k { color: var(--anno-source); }
447
526
  .gtip--unverified .gtip__k { color: var(--color-highlight); }
448
527
 
528
+ /* Portal variant of .gtip for the React <GroundingFlag> (Radix). Same reason as
529
+ .tip-pop: the React tooltip portals its content to <body> to escape transformed
530
+ ancestors (the .dock / a Modal), and a node at <body> cannot be positioned by
531
+ the parent-anchored .gtip rules — Radix's popper owns placement and mounts the
532
+ content only while open (no opacity/pointer-events gate). So this class carries
533
+ the SAME light guardrail-bubble visual as the .gtip oracle (light surface, 1px
534
+ border) MINUS positioning. The .gtip__k / .gtip__src / .gtip--cited|--unverified
535
+ descendants compose in unchanged. No caret — the .gtip oracle has none. */
536
+ .gtip-pop {
537
+ width: max-content; max-width: 232px; text-align: left;
538
+ background: var(--bg-primary); border: 1px solid var(--border-strong);
539
+ border-radius: var(--radius-sm); padding: 9px 11px;
540
+ font-family: var(--font-ui); font-size: 11px; line-height: 1.5; color: var(--text-secondary);
541
+ z-index: 30;
542
+ }
543
+
449
544
  /* canonical inline chips */
450
545
  .ground {
451
546
  display: inline-flex; align-items: center; gap: 3px;
@@ -539,11 +634,13 @@
539
634
  /* avatar (image or initials) */
540
635
  .avatar {
541
636
  width: 28px; height: 28px; flex: none; border-radius: var(--radius-sm);
542
- display: grid; place-items: center; overflow: hidden;
637
+ display: grid; place-items: center; overflow: visible;
543
638
  background: var(--signal-bg); color: var(--color-signal);
544
639
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
545
640
  }
546
- .avatar img { width: 100%; height: 100%; object-fit: cover; }
641
+ /* overflow stays visible so the .avatar__status corner dot's halo isn't clipped;
642
+ the image self-clips to the avatar's border-radius via inherit (incl. --round 50%). */
643
+ .avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
547
644
  .avatar--lg { width: 38px; height: 38px; font-size: 14px; }
548
645
  .avatar--round { border-radius: 50%; }
549
646
 
@@ -824,6 +921,259 @@ html[data-theme="dark"] .theme-toggle .ic-moon { display: inline; }
824
921
  .digest--read .digest__dot { display: none; }
825
922
  .digest__skel { display: flex; flex-direction: column; gap: 9px; }
826
923
 
924
+ /* ----- AI conversation terminal --------------------
925
+ The Stocky terminal transcript surface + its inline composer.
926
+ Ported from the conversation-terminal oracle; the generic helpers
927
+ (turn / prefixes / cursor / number / bullet) are BEM-namespaced
928
+ under .term__* so the published bundle never ships a bare global
929
+ .cursor / .n / .turn. The persistent AI disclaimer is the shipped
930
+ <Callout> (owner decision S86), NOT a terminal-local style.
931
+ Monospace display face; lift via border weight, no shadow. */
932
+ .term {
933
+ display: flex;
934
+ flex-direction: column;
935
+ max-width: 560px;
936
+ font-family: var(--font-display);
937
+ background: var(--bg-primary);
938
+ border: 1px solid var(--border-strong);
939
+ border-radius: var(--radius-lg);
940
+ overflow: hidden;
941
+ }
942
+ .term__head {
943
+ padding: 11px 14px;
944
+ border-bottom: 0.5px solid var(--border-default);
945
+ display: flex;
946
+ align-items: center;
947
+ gap: 8px;
948
+ font-family: var(--font-ui);
949
+ }
950
+ .term__caret { font-family: var(--font-display); color: var(--color-signal); font-weight: 700; font-size: 13px; }
951
+ .term__title { font-size: 11.5px; color: var(--text-muted); letter-spacing: 0.5px; }
952
+ .term__body {
953
+ padding: 4px 14px;
954
+ display: flex;
955
+ flex-direction: column;
956
+ font-size: 12.5px;
957
+ line-height: 1.65;
958
+ overflow-y: auto;
959
+ }
960
+ .term__sep { height: 0; border: 0; border-top: 0.5px solid var(--border-default); margin: 0; }
961
+ .term__turn {
962
+ display: grid;
963
+ grid-template-columns: 56px 1fr;
964
+ gap: 8px;
965
+ align-items: start;
966
+ padding: 11px 0;
967
+ }
968
+ .term__pre--you { color: var(--color-signal); font-weight: 600; white-space: nowrap; }
969
+ .term__pre--bot { color: var(--color-highlight); font-weight: 700; white-space: nowrap; }
970
+ .term__txt--you { color: var(--text-primary); }
971
+ .term__txt--bot { color: var(--text-secondary); }
972
+ .term__num { color: var(--data-up); font-weight: 600; }
973
+ .term__bul { color: var(--text-muted); }
974
+ .term__cursor {
975
+ display: inline-block;
976
+ width: 7px;
977
+ height: 14px;
978
+ background: var(--color-signal);
979
+ vertical-align: text-bottom;
980
+ margin-left: 2px;
981
+ animation: term-blink 1s steps(1) infinite;
982
+ }
983
+ .term__composer {
984
+ padding: 11px 14px 4px;
985
+ border-top: 0.5px solid var(--border-default);
986
+ display: grid;
987
+ grid-template-columns: 56px 1fr auto;
988
+ gap: 8px;
989
+ align-items: start;
990
+ }
991
+ .term__prompt { color: var(--color-signal); font-weight: 600; white-space: nowrap; line-height: 1.65; padding-top: 9px; }
992
+ .term__input {
993
+ font-family: var(--font-display);
994
+ font-size: 12.5px;
995
+ line-height: 1.65;
996
+ border: 0;
997
+ border-bottom: 1px solid var(--border-strong);
998
+ padding: 9px 4px;
999
+ min-height: 22px;
1000
+ background: transparent;
1001
+ color: var(--text-primary);
1002
+ outline: none;
1003
+ width: 100%;
1004
+ resize: none;
1005
+ overflow: hidden;
1006
+ box-sizing: border-box;
1007
+ }
1008
+ .term__input:focus { border-bottom-color: var(--color-signal); }
1009
+ .term__input:disabled { opacity: 0.5; cursor: not-allowed; }
1010
+ .term__send { align-self: center; }
1011
+ .term__send:disabled { opacity: 0.4; cursor: not-allowed; }
1012
+ .term__keyhint {
1013
+ grid-column: 2 / -1;
1014
+ font-family: var(--font-ui);
1015
+ font-size: 10.5px;
1016
+ color: var(--text-muted);
1017
+ padding: 2px 4px 4px;
1018
+ }
1019
+ /* The persistent disclaimer is the shipped <Callout> (owner S86); this is a
1020
+ layout-only modifier that insets the bordered note inside the terminal footer
1021
+ so it does not double-border against the .term edge. */
1022
+ .term__disc { margin: 6px 14px 12px; }
1023
+ /* An error row (also a <Callout>) surfaced inline in the transcript body. */
1024
+ .term__errrow { margin: 8px 0 2px; }
1025
+ @keyframes term-blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
1026
+ @media (prefers-reduced-motion: reduce) {
1027
+ .term__cursor { animation: none; }
1028
+ }
1029
+
1030
+ /* ----- Tool-use / skill indicator (.tuf) -------------------
1031
+ The lifecycle chip for a skill/tool call inside the AI terminal transcript,
1032
+ built from the signed-off design + preview/tool-use-indicator.html.
1033
+ A transient, status-bearing chip: it reports state, it is not a control.
1034
+ `data-state` drives the per-state color + tint, and the color flows to the
1035
+ leading glyph + verb via currentColor. The glyph is the primary NON-color cue
1036
+ (FR4); `partial` (caution gold) ALWAYS pairs its color with the glyph + the
1037
+ literal word. Sage leads (running); amber stays reserved for grounding. No
1038
+ shadow, no emoji, radius --radius-sm. The running loop reuses the shipped
1039
+ .spinner (the one sanctioned loop) and the streaming variant reuses the
1040
+ shipped .term__cursor — neither is re-declared here. */
1041
+ .tuf {
1042
+ display: inline-flex;
1043
+ align-items: center;
1044
+ gap: 6px;
1045
+ padding: 3px 9px;
1046
+ border: 1px solid var(--border-default);
1047
+ border-radius: var(--radius-sm);
1048
+ background: transparent;
1049
+ font-family: var(--font-ui);
1050
+ font-size: 11.5px;
1051
+ line-height: 1;
1052
+ /* §4 motion: appear = 120ms opacity fade-in; state change = 200ms color/tint
1053
+ cross-fade. Both stop under reduced-motion below. Fades, not slides. */
1054
+ animation: tuf-appear var(--dur-fast) var(--ease-out);
1055
+ transition:
1056
+ color var(--dur-base) var(--ease-out),
1057
+ background-color var(--dur-base) var(--ease-out);
1058
+ }
1059
+ .tuf__glyph { display: inline-flex; width: 16px; height: 16px; flex: 0 0 16px; color: currentColor; }
1060
+ .tuf__glyph svg { width: 16px; height: 16px; display: block; }
1061
+ .tuf__label { color: var(--text-primary); white-space: nowrap; }
1062
+ .tuf__verb { color: currentColor; font-weight: 600; }
1063
+ .tuf__meta { font-size: 10px; color: var(--text-muted); white-space: nowrap; }
1064
+
1065
+ /* Per-state color + tint (color drives the glyph + verb via currentColor).
1066
+ idle/pending = neutral --bg-surface fill + hairline (pre-result states);
1067
+ running/success/error/partial = a state-matched tint, border-free.
1068
+ The idle rule completes the public .tuf state set for direct-CSS consumers +
1069
+ the gallery specimen; the React ToolUseIndicator collapses idle to a null render. */
1070
+ .tuf[data-state="idle"] { color: var(--text-muted); background: var(--bg-surface); }
1071
+ .tuf[data-state="pending"] { color: var(--color-info); background: var(--bg-surface); }
1072
+ .tuf[data-state="running"] { color: var(--color-signal); background: var(--signal-bg); border-color: transparent; }
1073
+ .tuf[data-state="success"] { color: var(--color-success); background: var(--signal-bg); border-color: transparent; }
1074
+ .tuf[data-state="error"] { color: var(--color-error); background: var(--data-down-bg); border-color: transparent; }
1075
+ .tuf[data-state="partial"] { color: var(--data-warn); background: var(--data-warn-bg); border-color: transparent; }
1076
+
1077
+ @keyframes tuf-appear { from { opacity: 0; } to { opacity: 1; } }
1078
+ /* Reduced-motion: stop the appear fade + state-change cross-fade; the running
1079
+ .spinner / .term__cursor self-stop via their own shipped rules above. NFR5. */
1080
+ @media (prefers-reduced-motion: reduce) {
1081
+ .tuf { animation: none; transition: none; }
1082
+ }
1083
+
1084
+ /* ----- MediaSlot — art-directed media container ---------------
1085
+ A sized/shaped frame for heterogeneous media (image / gif / video / embed
1086
+ facade). `aspect-ratio` reserves the box (no CLS); the inner native element
1087
+ fills it (`overflow:hidden`). Shapes reuse the radius vocabulary + the
1088
+ circle/pill idiom (Avatar/Badge). Container-query units (cqw) size the
1089
+ placeholder / play affordances so they scale with the box (.dt-wrap precedent).
1090
+ The embed facade play button sits on the shipped `--color-scrim` with a light
1091
+ `--color-on-scrim` glyph (no shadow — scrim is the brand's lift partner).
1092
+ The dropzone surface is the authoring visual: the CSS ships now to
1093
+ lock the signed-off look; the upload BEHAVIOR is deferred to 4b.3a. */
1094
+ .media-slot {
1095
+ position: relative; display: block; overflow: hidden;
1096
+ container-type: inline-size;
1097
+ background: var(--bg-surface); border: .5px solid var(--border-default);
1098
+ aspect-ratio: var(--ms-aspect, 16 / 9);
1099
+ }
1100
+ .media-slot > img,
1101
+ .media-slot > video,
1102
+ .media-slot > iframe {
1103
+ display: block; width: 100%; height: 100%; border: 0;
1104
+ object-fit: var(--ms-fit, cover); object-position: var(--ms-pos, 50% 50%);
1105
+ }
1106
+ .media-slot--rect { border-radius: 0; }
1107
+ .media-slot--rounded { border-radius: var(--ms-radius, var(--radius-md)); }
1108
+ .media-slot--circle { border-radius: 50%; }
1109
+ .media-slot--pill { border-radius: 999px; }
1110
+
1111
+ /* empty state + passive placeholder (icon + label); scales with the box (cqw) */
1112
+ .media-slot--empty { display: grid; place-items: center; border-style: dashed; border-color: var(--border-strong); }
1113
+ .media-slot__placeholder {
1114
+ display: flex; flex-direction: column; align-items: center; justify-content: center;
1115
+ gap: clamp(6px, 2.2cqw, 12px); font-family: var(--font-ui);
1116
+ font-size: clamp(11px, 5.5cqw, 15px); color: var(--text-muted);
1117
+ text-align: center; padding: clamp(10px, 4cqw, 20px); line-height: 1.4;
1118
+ }
1119
+ .media-slot__placeholder svg { width: clamp(22px, 18cqw, 60px); height: auto; stroke: var(--text-muted); fill: none; stroke-width: 1.5; }
1120
+ /* icon-only placeholder (e.g. avatar/circle empty) — the glyph spans most of the box */
1121
+ .media-slot__placeholder--icon svg { width: clamp(30px, 48cqw, 140px); }
1122
+
1123
+ /* drag-and-drop / upload placeholder — the AUTHORING-LAYER visual.
1124
+ CSS ships now to lock the signed-off look; the upload behavior is deferred. */
1125
+ .media-slot--dropzone { border-style: dotted; border-color: var(--border-strong); }
1126
+ .media-slot__dropzone {
1127
+ display: flex; flex-direction: column; align-items: center; justify-content: center;
1128
+ gap: clamp(6px, 2.4cqw, 12px); font-family: var(--font-ui); text-align: center;
1129
+ padding: clamp(10px, 4cqw, 20px); color: var(--text-muted);
1130
+ font-size: clamp(10.5px, 4.6cqw, 13px); line-height: 1.4;
1131
+ }
1132
+ .media-slot__dropzone svg { width: clamp(22px, 16cqw, 48px); height: auto; stroke: var(--text-muted); fill: none; stroke-width: 1.5; }
1133
+ .media-slot__browse {
1134
+ font-family: var(--font-ui); font-size: clamp(10px, 4cqw, 12px);
1135
+ padding: 4px 12px; border: .5px solid var(--border-strong); border-radius: var(--radius-sm);
1136
+ background: transparent; color: var(--text-primary); cursor: pointer;
1137
+ transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
1138
+ }
1139
+ .media-slot__browse:hover { border-color: var(--color-signal); color: var(--color-signal); }
1140
+ .media-slot__browse:focus-visible { outline: 2px solid var(--color-signal); outline-offset: 2px; }
1141
+
1142
+ /* embed FACADE: real provider thumbnail + a real play <button> on a DARK SCRIM
1143
+ (so it never blends into the thumbnail). Click swaps the real iframe; never
1144
+ auto-load. */
1145
+ .media-slot__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
1146
+ .media-slot__play {
1147
+ position: absolute; inset: 0; margin: auto;
1148
+ width: clamp(46px, 26cqw, 74px); height: clamp(46px, 26cqw, 74px);
1149
+ display: grid; place-items: center; border: 0; border-radius: 50%;
1150
+ background: var(--color-scrim); color: var(--color-on-scrim);
1151
+ cursor: pointer; transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
1152
+ }
1153
+ .media-slot__play .tri {
1154
+ width: 0; height: 0; margin-left: 14%;
1155
+ border-style: solid; border-width: 0.9em 0 0.9em 1.5em;
1156
+ border-color: transparent transparent transparent currentColor;
1157
+ }
1158
+ .media-slot__play:hover { background: var(--color-signal); color: var(--color-on-scrim); }
1159
+ .media-slot__play:focus-visible { outline: 2px solid var(--color-signal); outline-offset: 3px; }
1160
+
1161
+ /* in-frame type chip — optional; rendered only when the consumer passes `badge` */
1162
+ .media-slot__badge {
1163
+ position: absolute; top: 7px; left: 7px;
1164
+ font-family: var(--font-ui); font-size: 9.5px; letter-spacing: .4px;
1165
+ text-transform: uppercase; color: var(--text-muted);
1166
+ background: var(--bg-surface); border: .5px solid var(--border-default);
1167
+ border-radius: var(--radius-sm); padding: 2px 6px;
1168
+ }
1169
+
1170
+ /* Reduced-motion: gif-as-video autoplay is gated in the component (autoPlay
1171
+ suppressed under prefers-reduced-motion); native <img> GIFs animate per the UA.
1172
+ Cut the facade/browse hover micro-transitions too. NFR5. */
1173
+ @media (prefers-reduced-motion: reduce) {
1174
+ .media-slot__play, .media-slot__browse { transition: none; }
1175
+ }
1176
+
827
1177
  /* ----- Scrollbar (design-system default) ------------------------
828
1178
  Thin, unobtrusive, token-driven. Track is transparent; the thumb
829
1179
  uses the strong border token and darkens on hover. Applies to any
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qball-inc/tokens",
3
- "version": "0.1.0",
3
+ "version": "1.0.0",
4
4
  "description": "QBall Design System tokens — framework-agnostic CSS custom properties, component classes, and a DTCG/Style-Dictionary JSON mirror. Zero build step; public default display face is Fira Code (Berkeley Mono restored per README in private builds).",
5
5
  "keywords": [
6
6
  "design-tokens",
@@ -33,4 +33,4 @@
33
33
  "components.css",
34
34
  "tokens.json"
35
35
  ]
36
- }
36
+ }
package/theme.css CHANGED
@@ -47,6 +47,7 @@
47
47
  --color-signal-bg: rgba(63,107,91,0.10);
48
48
  --color-highlight-bg: rgba(180,83,9,0.10);
49
49
  --color-scrim: rgba(20,20,20,0.45); /* modal/overlay scrim (theme-independent) */
50
+ --color-on-scrim: rgba(255,255,255,0.96); /* light glyph on the dark scrim (theme-independent) */
50
51
 
51
52
  /* finance / data palette — SEMANTICS ONLY, never wayfinding */
52
53
  --color-up: #2E7D4F; --color-down: #B5342B; --color-warn: #9A7D0F;
package/tokens.json CHANGED
File without changes