asta-ui 0.9.5 → 0.9.7
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/css/asta.css +2 -2
- package/css/asta.js +1461 -1
- package/css/components.css +1900 -138
- package/css/runtime/agent.css +136 -0
- package/css/runtime/agent.js +173 -0
- package/css/runtime/assist.css +79 -0
- package/css/runtime/assist.js +799 -0
- package/css/runtime/controls.css +48 -0
- package/css/runtime/controls.js +482 -0
- package/css/src/agent.css +484 -0
- package/css/src/assist.css +598 -0
- package/css/src/controls.css +424 -0
- package/css/tokens.css +16 -0
- package/dist/agent-plan.d.ts +2 -0
- package/dist/agent-plan.js +11 -0
- package/dist/agent-team.d.ts +2 -0
- package/dist/agent-team.js +7 -0
- package/dist/api-keys.d.ts +2 -0
- package/dist/api-keys.js +10 -0
- package/dist/autonomy-dial.d.ts +2 -0
- package/dist/autonomy-dial.js +7 -0
- package/dist/base/agent-plan.d.ts +2 -0
- package/dist/base/agent-plan.js +11 -0
- package/dist/base/agent-team.d.ts +2 -0
- package/dist/base/agent-team.js +7 -0
- package/dist/base/api-keys.d.ts +2 -0
- package/dist/base/api-keys.js +10 -0
- package/dist/base/autonomy-dial.d.ts +2 -0
- package/dist/base/autonomy-dial.js +7 -0
- package/dist/base/change-ledger.d.ts +2 -0
- package/dist/base/change-ledger.js +7 -0
- package/dist/base/citations.d.ts +2 -0
- package/dist/base/citations.js +9 -0
- package/dist/base/context-meter.d.ts +2 -0
- package/dist/base/context-meter.js +14 -0
- package/dist/base/fallback-chain.d.ts +2 -0
- package/dist/base/fallback-chain.js +7 -0
- package/dist/base/model-picker.d.ts +2 -0
- package/dist/base/model-picker.js +9 -0
- package/dist/base/navbar.js +1 -1
- package/dist/base/prompt-composer.d.ts +2 -0
- package/dist/base/prompt-composer.js +9 -0
- package/dist/base/scrub-input.d.ts +2 -0
- package/dist/base/scrub-input.js +13 -0
- package/dist/base/sidebar.js +1 -1
- package/dist/base/thinking.d.ts +2 -0
- package/dist/base/thinking.js +11 -0
- package/dist/base/tool-approval.d.ts +2 -0
- package/dist/base/tool-approval.js +9 -0
- package/dist/base/trace-waterfall.d.ts +2 -0
- package/dist/base/trace-waterfall.js +9 -0
- package/dist/base.js +204 -136
- package/dist/change-ledger.d.ts +2 -0
- package/dist/change-ledger.js +7 -0
- package/dist/chunk-24O5V2PQ.js +253 -0
- package/dist/chunk-44DNL43W.js +490 -0
- package/dist/chunk-45IXJ7W7.js +245 -0
- package/dist/chunk-ANL6VX4X.js +326 -0
- package/dist/chunk-DNROUJ62.js +432 -0
- package/dist/{chunk-2EBWWZPS.js → chunk-DWPGFNNF.js} +38 -9
- package/dist/{chunk-CACW5LH3.js → chunk-EAHHWF3V.js} +38 -9
- package/dist/chunk-F4CWSZXK.js +226 -0
- package/dist/chunk-FT66LAUZ.js +388 -0
- package/dist/chunk-GBOJUMMY.js +163 -0
- package/dist/chunk-H4NFBYKY.js +275 -0
- package/dist/chunk-KFPGQ5RT.js +321 -0
- package/dist/chunk-OIIMYSVT.js +342 -0
- package/dist/chunk-SUWA7DM6.js +388 -0
- package/dist/chunk-TL32C2SQ.js +221 -0
- package/dist/chunk-UBTYMAKF.js +240 -0
- package/dist/chunk-W6YVDJHX.js +235 -0
- package/dist/chunk-XYQI4ZYV.js +314 -0
- package/dist/citations.d.ts +2 -0
- package/dist/citations.js +9 -0
- package/dist/context-meter.d.ts +2 -0
- package/dist/context-meter.js +14 -0
- package/dist/fallback-chain.d.ts +2 -0
- package/dist/fallback-chain.js +7 -0
- package/dist/index.js +204 -136
- package/dist/model-picker.d.ts +2 -0
- package/dist/model-picker.js +9 -0
- package/dist/navbar.js +1 -1
- package/dist/prompt-composer.d.ts +2 -0
- package/dist/prompt-composer.js +9 -0
- package/dist/scrub-input.d.ts +2 -0
- package/dist/scrub-input.js +13 -0
- package/dist/sidebar.js +1 -1
- package/dist/thinking.d.ts +2 -0
- package/dist/thinking.js +11 -0
- package/dist/tool-approval.d.ts +2 -0
- package/dist/tool-approval.js +9 -0
- package/dist/trace-waterfall.d.ts +2 -0
- package/dist/trace-waterfall.js +9 -0
- package/dist/types/components/kit/agent-plan.d.ts +34 -0
- package/dist/types/components/kit/api-keys.d.ts +62 -0
- package/dist/types/components/kit/base/navbar.d.ts +4 -1
- package/dist/types/components/kit/base/sidebar.d.ts +29 -7
- package/dist/types/components/kit/citations.d.ts +34 -0
- package/dist/types/components/kit/context-meter.d.ts +38 -0
- package/dist/types/components/kit/model-picker.d.ts +46 -0
- package/dist/types/components/kit/navbar.d.ts +4 -1
- package/dist/types/components/kit/prompt-composer.d.ts +61 -0
- package/dist/types/components/kit/scrub-input.d.ts +44 -0
- package/dist/types/components/kit/sidebar.d.ts +29 -7
- package/dist/types/components/kit/thinking.d.ts +28 -0
- package/dist/types/components/kit/tool-approval.d.ts +43 -0
- package/dist/types/components/kit/trace-waterfall.d.ts +44 -0
- package/dist/types/components/lab/blocks/AgentTeam.d.ts +2 -0
- package/dist/types/components/lab/blocks/AutonomyDial.d.ts +2 -0
- package/dist/types/components/lab/blocks/ChangeLedger.d.ts +2 -0
- package/dist/types/components/lab/blocks/FallbackChain.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/agent-plan.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/agent-team.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/api-keys.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/autonomy-dial.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/agent-plan.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/agent-team.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/api-keys.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/autonomy-dial.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/change-ledger.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/citations.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/context-meter.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/fallback-chain.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/model-picker.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/prompt-composer.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/scrub-input.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/thinking.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/tool-approval.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/trace-waterfall.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base.d.ts +26 -2
- package/dist/types/packages/asta-ui/src/change-ledger.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/citations.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/context-meter.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/fallback-chain.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/index.d.ts +26 -2
- package/dist/types/packages/asta-ui/src/model-picker.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/prompt-composer.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/scrub-input.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/thinking.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/tool-approval.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/trace-waterfall.d.ts +2 -0
- package/package.json +1 -1
- package/dist/chunk-MVE7RJJ6.js +0 -322
- package/dist/chunk-TBMUSER2.js +0 -322
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
/* Controls: scrub input and API keys. Class lists mirror the React kit. Buttons use the core asta-btn classes and the
|
|
2
|
+
* copy button is the core asta-copy-button. The runtime CSS and asta.js key on the data-asta-* attributes, so keep them
|
|
3
|
+
* in the markup. Modifiers come after the base class. */
|
|
4
|
+
|
|
5
|
+
/* ---- Scrub input ----
|
|
6
|
+
* <div class="asta-scrub-row" role="group" aria-label="Position"><span class="asta-scrub-row-label">Position</span>
|
|
7
|
+
* <div class="asta-scrub-cells">
|
|
8
|
+
* <label class="asta-scrub" data-asta-scrub data-unit="px" data-min="0" data-max="560" data-step="1">
|
|
9
|
+
* <span class="asta-scrub-handle" data-asta-scrub-handle aria-hidden="true">X</span>
|
|
10
|
+
* <input class="asta-scrub-input" role="spinbutton" aria-label="X position" value="140" inputmode="text">
|
|
11
|
+
* <span class="asta-scrub-unit" aria-hidden="true">px</span>
|
|
12
|
+
* <span class="asta-scrub-limit" aria-hidden="true"></span>
|
|
13
|
+
* <span class="asta-scrub-tip">Try 24, 1.5rem or 24*2. Esc puts it back.</span>
|
|
14
|
+
* <input type="hidden" name="x" value="140">
|
|
15
|
+
* </label> … </div></div>
|
|
16
|
+
* asta.js sets data-scrubbing, data-mod="10|0.1", data-limit="min|max" and aria-invalid on the input.
|
|
17
|
+
* Size asta-scrub-sm. Columns asta-scrub-cells-1 (default 2), -3, -4. */
|
|
18
|
+
.asta-scrub {
|
|
19
|
+
@apply relative flex h-9 min-w-0 items-center rounded-[7px] bg-[color-mix(in_srgb,var(--ink)_5%,transparent)] text-ink transition-[background-color,box-shadow] duration-150 sm:h-8;
|
|
20
|
+
@apply hover:bg-[color-mix(in_srgb,var(--ink)_8%,transparent)] focus-within:bg-paper focus-within:shadow-[inset_0_0_0_1.5px_var(--brand)];
|
|
21
|
+
@apply data-[scrubbing]:bg-paper data-[scrubbing]:shadow-[inset_0_0_0_1.5px_var(--brand)];
|
|
22
|
+
@apply has-[:disabled]:pointer-events-none has-[:disabled]:opacity-45;
|
|
23
|
+
@apply has-[[aria-invalid=true]]:!shadow-[inset_0_0_0_1.5px_var(--ink)];
|
|
24
|
+
}
|
|
25
|
+
.asta-scrub-sm {
|
|
26
|
+
@apply h-8 sm:h-7;
|
|
27
|
+
}
|
|
28
|
+
.asta-scrub-handle {
|
|
29
|
+
@apply grid h-full w-7 shrink-0 cursor-ew-resize touch-none select-none place-items-center text-[11.5px] font-medium text-mute transition-colors duration-150 hover:text-ink [&>svg]:h-3.5 [&>svg]:w-3.5;
|
|
30
|
+
.asta-scrub-sm > & {
|
|
31
|
+
@apply w-6;
|
|
32
|
+
}
|
|
33
|
+
.asta-scrub[data-scrubbing] > & {
|
|
34
|
+
@apply text-brand;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
.asta-scrub-input {
|
|
38
|
+
@apply h-full min-w-0 flex-1 bg-transparent pr-1 text-[16px] tabular-nums tracking-[-0.01em] outline-none sm:text-[12.5px];
|
|
39
|
+
@apply transition-transform duration-200 ease-[cubic-bezier(.16,1,.3,1)] selection:bg-[color-mix(in_srgb,var(--brand)_22%,transparent)];
|
|
40
|
+
.asta-scrub-sm > & {
|
|
41
|
+
@apply sm:text-[12px];
|
|
42
|
+
}
|
|
43
|
+
.asta-scrub[data-limit="max"] > & {
|
|
44
|
+
@apply translate-x-[3px];
|
|
45
|
+
}
|
|
46
|
+
.asta-scrub[data-limit="min"] > & {
|
|
47
|
+
@apply -translate-x-[3px];
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
.asta-scrub-unit {
|
|
51
|
+
@apply shrink-0 pr-2 text-[11.5px] text-mute;
|
|
52
|
+
}
|
|
53
|
+
/* The ×10 / ×0.1 badge; asta.js writes the text while a modifier is held. */
|
|
54
|
+
.asta-scrub-badge {
|
|
55
|
+
@apply mr-1.5 hidden shrink-0 rounded-[4px] bg-brand px-1 text-[10.5px] font-medium leading-4 tabular-nums text-white;
|
|
56
|
+
}
|
|
57
|
+
.asta-scrub[data-scrubbing][data-mod] {
|
|
58
|
+
& > .asta-scrub-badge {
|
|
59
|
+
@apply inline;
|
|
60
|
+
}
|
|
61
|
+
& > .asta-scrub-unit {
|
|
62
|
+
@apply hidden;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
.asta-scrub-limit {
|
|
66
|
+
@apply pointer-events-none absolute inset-y-1.5 right-0.5 w-[2px] rounded-full bg-brand opacity-0 transition-opacity duration-500 ease-[cubic-bezier(.16,1,.3,1)];
|
|
67
|
+
.asta-scrub[data-limit] > & {
|
|
68
|
+
@apply opacity-100 duration-100;
|
|
69
|
+
}
|
|
70
|
+
.asta-scrub[data-limit="min"] > & {
|
|
71
|
+
@apply left-0.5 right-auto;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
.asta-scrub-tip {
|
|
75
|
+
@apply absolute left-0 top-[calc(100%+6px)] z-10 hidden w-max max-w-[220px] rounded-[8px] bg-ink px-2.5 py-1.5 text-[12px] leading-snug text-paper shadow-[0_8px_24px_-10px_rgb(0_0_0/0.4)];
|
|
76
|
+
.asta-scrub:has(> [aria-invalid="true"]) > & {
|
|
77
|
+
@apply block;
|
|
78
|
+
}
|
|
79
|
+
.asta-scrub[data-tip-end] > & {
|
|
80
|
+
@apply left-auto right-0;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
.asta-scrub-row {
|
|
84
|
+
@apply grid grid-cols-[64px_1fr] items-center gap-x-3;
|
|
85
|
+
}
|
|
86
|
+
.asta-scrub-row-label {
|
|
87
|
+
@apply truncate text-[12px] text-mute;
|
|
88
|
+
}
|
|
89
|
+
.asta-scrub-cells {
|
|
90
|
+
@apply grid min-w-0 grid-cols-2 gap-1.5;
|
|
91
|
+
}
|
|
92
|
+
.asta-scrub-cells-1 {
|
|
93
|
+
@apply grid-cols-1;
|
|
94
|
+
}
|
|
95
|
+
.asta-scrub-cells-3 {
|
|
96
|
+
@apply grid-cols-3;
|
|
97
|
+
}
|
|
98
|
+
.asta-scrub-cells-4 {
|
|
99
|
+
@apply grid-cols-4;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* ---- API keys ----
|
|
103
|
+
* <section class="asta-api-keys" data-asta-keys data-undo-ms="8000">
|
|
104
|
+
* <header class="asta-api-keys-header"><div><h3 class="asta-api-keys-title">API keys</h3><p class="asta-api-keys-desc">…</p></div>
|
|
105
|
+
* <button class="asta-btn asta-btn-sm" data-asta-keys-create aria-expanded="false" aria-controls="ak-form">Create key</button></header>
|
|
106
|
+
* <form class="asta-api-keys-form" id="ak-form" hidden> …name, expiry, fieldset of .asta-api-keys-scope… </form>
|
|
107
|
+
* <div class="asta-api-keys-head" aria-hidden="true"><span>Name</span>…</div>
|
|
108
|
+
* <ul class="asta-api-keys-list">
|
|
109
|
+
* <li class="asta-api-keys-row" data-id="k1" data-name="Production server" data-key="ak_live_…9f2c">
|
|
110
|
+
* <div class="asta-api-keys-grid">…cells…<button data-asta-keys-revoke aria-expanded="false">Revoke</button></div>
|
|
111
|
+
* <div class="asta-api-keys-confirm" role="group" hidden>…[data-asta-keys-keep] [data-asta-keys-confirm]</div></li>
|
|
112
|
+
* <li class="asta-api-keys-reveal">…secret, asta-copy-button, [data-asta-keys-dismiss]</li> </ul></section>
|
|
113
|
+
* asta.js opens the form, checks it, asks before revoking and swaps the row for an undo strip ([data-revoked]). */
|
|
114
|
+
.asta-api-keys {
|
|
115
|
+
@apply @container w-full text-ink;
|
|
116
|
+
}
|
|
117
|
+
.asta-api-keys-header {
|
|
118
|
+
@apply flex flex-wrap items-start justify-between gap-x-6 gap-y-3;
|
|
119
|
+
& > div {
|
|
120
|
+
@apply min-w-0 max-w-[520px];
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
.asta-api-keys-title {
|
|
124
|
+
@apply text-[17px] font-medium tracking-[-0.02em];
|
|
125
|
+
}
|
|
126
|
+
.asta-api-keys-desc {
|
|
127
|
+
@apply mt-1 text-[13px] leading-relaxed text-mute;
|
|
128
|
+
}
|
|
129
|
+
.asta-api-keys-form {
|
|
130
|
+
@apply mt-5 rounded-[12px] bg-paper-2 p-4 sm:p-5;
|
|
131
|
+
}
|
|
132
|
+
.asta-api-keys-fields {
|
|
133
|
+
@apply grid gap-5 @min-[640px]:grid-cols-[1fr_200px];
|
|
134
|
+
}
|
|
135
|
+
.asta-api-keys-field {
|
|
136
|
+
@apply flex flex-col gap-1.5;
|
|
137
|
+
& > label,
|
|
138
|
+
& > legend {
|
|
139
|
+
@apply text-[13px] font-medium;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
.asta-api-keys-control {
|
|
143
|
+
@apply h-10 w-full rounded-lg bg-paper px-3 text-[16px] text-ink outline-none transition-shadow duration-200 placeholder:text-mute sm:text-[14px];
|
|
144
|
+
@apply shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_14%,transparent)] hover:shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_24%,transparent)];
|
|
145
|
+
@apply focus:!shadow-[inset_0_0_0_1px_var(--brand),0_0_0_3px_color-mix(in_srgb,var(--brand)_18%,transparent)] aria-[invalid=true]:shadow-[inset_0_0_0_1.5px_var(--ink)];
|
|
146
|
+
}
|
|
147
|
+
.asta-api-keys-select {
|
|
148
|
+
@apply relative;
|
|
149
|
+
& > select {
|
|
150
|
+
@apply cursor-pointer appearance-none pr-9;
|
|
151
|
+
}
|
|
152
|
+
& > svg {
|
|
153
|
+
@apply pointer-events-none absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-mute;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
/* Hint under a field; data-error turns it into the message, with the icon shown. */
|
|
157
|
+
.asta-api-keys-msg {
|
|
158
|
+
@apply flex min-h-4 items-center gap-1.5 text-[12px] text-mute;
|
|
159
|
+
& > svg {
|
|
160
|
+
@apply hidden h-3.5 w-3.5 shrink-0;
|
|
161
|
+
}
|
|
162
|
+
&[data-error] {
|
|
163
|
+
@apply font-medium text-ink;
|
|
164
|
+
& > svg {
|
|
165
|
+
@apply block;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
.asta-api-keys-scopes {
|
|
170
|
+
@apply mt-5 min-w-0;
|
|
171
|
+
& > legend {
|
|
172
|
+
@apply text-[13px] font-medium;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
.asta-api-keys-scope-grid {
|
|
176
|
+
@apply mt-2 grid gap-1 @min-[560px]:grid-cols-2;
|
|
177
|
+
}
|
|
178
|
+
.asta-api-keys-scope {
|
|
179
|
+
@apply flex cursor-pointer items-start gap-3 rounded-lg p-2 transition-colors hover:bg-ink/4;
|
|
180
|
+
}
|
|
181
|
+
.asta-api-keys-box {
|
|
182
|
+
@apply relative mt-px grid h-[18px] w-[18px] shrink-0 place-items-center;
|
|
183
|
+
& > input {
|
|
184
|
+
@apply col-start-1 row-start-1 h-[18px] w-[18px] cursor-pointer appearance-none rounded-[6px] bg-paper shadow-[inset_0_0_0_1.5px_color-mix(in_srgb,var(--ink)_22%,transparent)] outline-none transition-[background-color,box-shadow] duration-200;
|
|
185
|
+
@apply checked:bg-brand checked:shadow-none focus-visible:ring-2 focus-visible:ring-brand/50 focus-visible:ring-offset-2 focus-visible:ring-offset-paper-2;
|
|
186
|
+
}
|
|
187
|
+
& > svg {
|
|
188
|
+
@apply pointer-events-none col-start-1 row-start-1 h-3 w-3 scale-50 text-white opacity-0 transition-[opacity,transform] duration-300;
|
|
189
|
+
}
|
|
190
|
+
& > input:checked + svg {
|
|
191
|
+
@apply scale-100 opacity-100;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
.asta-api-keys-scope-label {
|
|
195
|
+
@apply block text-[13.5px] leading-[18px] text-ink;
|
|
196
|
+
}
|
|
197
|
+
.asta-api-keys-scope-hint {
|
|
198
|
+
@apply mt-0.5 block text-[12px] text-mute;
|
|
199
|
+
& > code {
|
|
200
|
+
@apply font-mono text-[11.5px] text-ink-2;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
.asta-api-keys-alert {
|
|
204
|
+
@apply mt-4 flex items-center gap-2 rounded-lg bg-paper px-3 py-2 text-[13px] text-ink shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_14%,transparent)];
|
|
205
|
+
& > svg {
|
|
206
|
+
@apply h-4 w-4 shrink-0;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
.asta-api-keys-actions {
|
|
210
|
+
@apply mt-5 flex justify-end gap-2;
|
|
211
|
+
}
|
|
212
|
+
.asta-api-keys-body {
|
|
213
|
+
@apply mt-6;
|
|
214
|
+
}
|
|
215
|
+
.asta-api-keys-head {
|
|
216
|
+
@apply hidden gap-4 px-3 pb-2 text-[12px] text-mute @2xl:grid;
|
|
217
|
+
@apply @2xl:grid-cols-[minmax(0,1.3fr)_120px_minmax(0,1.4fr)_minmax(0,.7fr)_minmax(0,1fr)_64px];
|
|
218
|
+
}
|
|
219
|
+
.asta-api-keys-list {
|
|
220
|
+
@apply flex flex-col gap-2 @2xl:gap-0.5;
|
|
221
|
+
}
|
|
222
|
+
.asta-api-keys-row {
|
|
223
|
+
@apply rounded-[12px] bg-paper-2 transition-colors duration-200 @2xl:rounded-[10px] @2xl:bg-transparent @2xl:hover:bg-paper-2/60;
|
|
224
|
+
&:has(> .asta-api-keys-confirm:not([hidden])) {
|
|
225
|
+
@apply @2xl:bg-paper-2;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
.asta-api-keys-grid {
|
|
229
|
+
@apply grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 gap-y-3 p-4 @2xl:min-h-[60px] @2xl:px-3 @2xl:py-2.5;
|
|
230
|
+
@apply @2xl:grid-cols-[minmax(0,1.3fr)_120px_minmax(0,1.4fr)_minmax(0,.7fr)_minmax(0,1fr)_64px];
|
|
231
|
+
}
|
|
232
|
+
.asta-api-keys-name {
|
|
233
|
+
@apply min-w-0;
|
|
234
|
+
& > p:first-child {
|
|
235
|
+
@apply line-clamp-2 break-words text-[13.5px] font-medium @2xl:line-clamp-1 @2xl:truncate;
|
|
236
|
+
}
|
|
237
|
+
& > p + p {
|
|
238
|
+
@apply mt-0.5 text-[12px] text-mute;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
.asta-api-keys-menu {
|
|
242
|
+
@apply col-start-2 row-start-1 @2xl:col-start-6 @2xl:justify-self-end;
|
|
243
|
+
}
|
|
244
|
+
.asta-api-keys-cell {
|
|
245
|
+
@apply col-span-2 flex min-w-0 items-center gap-2 @2xl:col-span-1 @2xl:row-start-1;
|
|
246
|
+
&:nth-child(3) {
|
|
247
|
+
@apply @2xl:col-start-2;
|
|
248
|
+
}
|
|
249
|
+
&:nth-child(4) {
|
|
250
|
+
@apply @2xl:col-start-3;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
.asta-api-keys-meta {
|
|
254
|
+
@apply flex flex-col gap-0.5 text-[12.5px] @2xl:row-start-1;
|
|
255
|
+
&:nth-child(5) {
|
|
256
|
+
@apply @2xl:col-start-4;
|
|
257
|
+
}
|
|
258
|
+
&:nth-child(6) {
|
|
259
|
+
@apply @2xl:col-start-5;
|
|
260
|
+
}
|
|
261
|
+
& > span:last-child {
|
|
262
|
+
@apply tabular-nums text-ink-2;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
.asta-api-keys-cell-label {
|
|
266
|
+
@apply text-[11.5px] text-mute @2xl:sr-only;
|
|
267
|
+
}
|
|
268
|
+
.asta-api-keys-key {
|
|
269
|
+
@apply truncate font-mono text-[12.5px] text-ink-2;
|
|
270
|
+
}
|
|
271
|
+
.asta-api-keys-chips {
|
|
272
|
+
@apply flex min-w-0 flex-wrap gap-1;
|
|
273
|
+
& > span {
|
|
274
|
+
@apply rounded-[5px] bg-ink/6 px-1.5 text-[11.5px] leading-5 text-mute;
|
|
275
|
+
}
|
|
276
|
+
& > code {
|
|
277
|
+
@apply rounded-[5px] bg-ink/6 px-1.5 font-mono text-[11.5px] leading-5 text-ink-2;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
/* Status in words. The dot is filled for active, a ring for data-expired. */
|
|
281
|
+
.asta-api-keys-status {
|
|
282
|
+
@apply inline-flex items-center gap-1.5 whitespace-nowrap text-ink;
|
|
283
|
+
&::before {
|
|
284
|
+
@apply h-2 w-2 shrink-0 rounded-full bg-brand content-[''];
|
|
285
|
+
}
|
|
286
|
+
&[data-expired] {
|
|
287
|
+
@apply text-mute before:bg-transparent before:shadow-[inset_0_0_0_1.5px_currentColor];
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
.asta-api-keys-confirm {
|
|
291
|
+
@apply flex flex-wrap items-center justify-between gap-3 px-4 pb-4 @2xl:px-3 @2xl:pb-3;
|
|
292
|
+
& > p {
|
|
293
|
+
@apply text-[12.5px] text-ink-2;
|
|
294
|
+
}
|
|
295
|
+
& > div {
|
|
296
|
+
@apply flex gap-2;
|
|
297
|
+
}
|
|
298
|
+
&[hidden] {
|
|
299
|
+
@apply hidden;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
/* A revoked row becomes the undo strip until the window ends. */
|
|
303
|
+
.asta-api-keys-undo {
|
|
304
|
+
@apply relative hidden min-h-[60px] items-center gap-3 overflow-hidden rounded-[10px] bg-paper-2 px-3 py-2;
|
|
305
|
+
& > p {
|
|
306
|
+
@apply min-w-0 flex-1 text-[13px] text-ink-2;
|
|
307
|
+
}
|
|
308
|
+
& > p b {
|
|
309
|
+
@apply font-medium text-ink;
|
|
310
|
+
}
|
|
311
|
+
& > p span {
|
|
312
|
+
@apply hidden text-mute @min-[480px]:inline;
|
|
313
|
+
}
|
|
314
|
+
& > button {
|
|
315
|
+
@apply text-brand hover:text-brand;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
.asta-api-keys-row[data-revoked] {
|
|
319
|
+
@apply bg-transparent @2xl:hover:bg-transparent;
|
|
320
|
+
& > :not(.asta-api-keys-undo) {
|
|
321
|
+
@apply hidden;
|
|
322
|
+
}
|
|
323
|
+
& > .asta-api-keys-undo {
|
|
324
|
+
@apply flex;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
.asta-api-keys-countdown {
|
|
328
|
+
@apply absolute inset-x-0 bottom-0 h-0.5 origin-left bg-brand/40;
|
|
329
|
+
}
|
|
330
|
+
.asta-api-keys-reveal {
|
|
331
|
+
@apply rounded-[12px] bg-[color-mix(in_srgb,var(--brand)_6%,var(--paper))] p-4 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--brand)_35%,transparent)] sm:p-5;
|
|
332
|
+
&[hidden] {
|
|
333
|
+
@apply hidden;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
.asta-api-keys-reveal-title {
|
|
337
|
+
@apply flex flex-wrap items-center gap-2 text-[14px] font-medium;
|
|
338
|
+
& > span:last-child {
|
|
339
|
+
@apply rounded-[5px] bg-brand px-1.5 text-[11px] font-medium leading-5 text-white;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
.asta-api-keys-reveal-text {
|
|
343
|
+
@apply mt-1 text-[12.5px] text-ink-2;
|
|
344
|
+
}
|
|
345
|
+
.asta-api-keys-secret {
|
|
346
|
+
@apply mt-3 flex flex-col gap-2 @min-[480px]:flex-row;
|
|
347
|
+
& > input {
|
|
348
|
+
@apply h-10 min-w-0 shrink-0 rounded-lg bg-paper px-3 font-mono text-[13px] text-ink outline-none shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_14%,transparent)] focus:shadow-[inset_0_0_0_1px_var(--brand)] @min-[480px]:flex-1;
|
|
349
|
+
}
|
|
350
|
+
& > .asta-copy-button {
|
|
351
|
+
@apply h-10 bg-paper;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
/* The note under the secret. data-warn swaps it for the "not copied" line and the solid close button. */
|
|
355
|
+
.asta-api-keys-note {
|
|
356
|
+
@apply mt-3 flex flex-wrap items-center justify-between gap-3;
|
|
357
|
+
& > p {
|
|
358
|
+
@apply flex items-center gap-1.5 text-[12.5px] font-medium text-ink;
|
|
359
|
+
}
|
|
360
|
+
& > p > svg {
|
|
361
|
+
@apply h-3.5 w-3.5 shrink-0;
|
|
362
|
+
}
|
|
363
|
+
& [data-when="warn"] {
|
|
364
|
+
@apply hidden;
|
|
365
|
+
}
|
|
366
|
+
&[data-warn] [data-when="warn"] {
|
|
367
|
+
@apply inline;
|
|
368
|
+
}
|
|
369
|
+
&[data-warn] [data-when="calm"] {
|
|
370
|
+
@apply hidden;
|
|
371
|
+
}
|
|
372
|
+
&[data-warn] > .asta-btn {
|
|
373
|
+
@apply bg-ink text-paper hover:bg-[color-mix(in_srgb,var(--ink)_84%,var(--paper))] hover:text-paper;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
.asta-api-keys-empty {
|
|
377
|
+
@apply flex flex-col items-center rounded-[12px] bg-paper-2 px-6 py-12 text-center;
|
|
378
|
+
& > span {
|
|
379
|
+
@apply grid h-11 w-11 place-items-center rounded-full bg-paper text-mute shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_8%,transparent)] [&>svg]:h-5 [&>svg]:w-5;
|
|
380
|
+
}
|
|
381
|
+
& > p:first-of-type {
|
|
382
|
+
@apply mt-4 text-[14px] font-medium;
|
|
383
|
+
}
|
|
384
|
+
& > p + p {
|
|
385
|
+
@apply mt-1 max-w-[300px] text-[12.5px] text-mute;
|
|
386
|
+
}
|
|
387
|
+
& > button {
|
|
388
|
+
@apply mt-5;
|
|
389
|
+
}
|
|
390
|
+
/* Shown only while the list has no rows and the form is closed. */
|
|
391
|
+
.asta-api-keys:has(.asta-api-keys-list > li) &,
|
|
392
|
+
.asta-api-keys:has(.asta-api-keys-form:not([hidden])) & {
|
|
393
|
+
@apply hidden;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
.asta-api-keys:not(:has(.asta-api-keys-list > li)) .asta-api-keys-head {
|
|
397
|
+
@apply hidden;
|
|
398
|
+
}
|
|
399
|
+
.asta-api-keys-skeleton {
|
|
400
|
+
@apply grid h-[76px] grid-cols-[1fr_auto] items-center gap-4 rounded-[12px] bg-paper-2 px-4 @2xl:h-[60px] @2xl:bg-transparent @2xl:px-3;
|
|
401
|
+
@apply @2xl:grid-cols-[minmax(0,1.3fr)_120px_minmax(0,1.4fr)_minmax(0,.7fr)_minmax(0,1fr)_64px];
|
|
402
|
+
& > span {
|
|
403
|
+
@apply hidden h-3 rounded-full bg-ink/8 @2xl:block;
|
|
404
|
+
}
|
|
405
|
+
& > span:first-child,
|
|
406
|
+
& > span:last-child {
|
|
407
|
+
@apply block;
|
|
408
|
+
}
|
|
409
|
+
& > span:last-child {
|
|
410
|
+
@apply w-16 justify-self-end;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
.asta-api-keys-error {
|
|
414
|
+
@apply flex flex-col items-center rounded-[12px] bg-paper-2 px-6 py-10 text-center [&>svg]:h-5 [&>svg]:w-5;
|
|
415
|
+
& > p:first-of-type {
|
|
416
|
+
@apply mt-3 text-[14px] font-medium;
|
|
417
|
+
}
|
|
418
|
+
& > p + p {
|
|
419
|
+
@apply mt-1 text-[12.5px] text-mute;
|
|
420
|
+
}
|
|
421
|
+
& > button {
|
|
422
|
+
@apply mt-4;
|
|
423
|
+
}
|
|
424
|
+
}
|
package/css/tokens.css
CHANGED
|
@@ -75,6 +75,18 @@
|
|
|
75
75
|
@keyframes asta-spinner-bar { 0%, 100% { transform: scaleY(0.35) } 50% { transform: scaleY(1) } }
|
|
76
76
|
@keyframes asta-progress-sweep { from { transform: translateX(-100%) } to { transform: translateX(260%) } }
|
|
77
77
|
@keyframes asta-skeleton-shimmer { from { transform: translateX(-100%) } to { transform: translateX(100%) } }
|
|
78
|
+
@keyframes asta-agent-sweep { from { transform: translateX(-100%) } 70%, to { transform: translateX(100%) } }
|
|
79
|
+
@keyframes asta-agent-counter { from { transform: translateX(100%) } 70%, to { transform: translateX(-100%) } }
|
|
80
|
+
@keyframes asta-agent-pulse { 0%, 100% { opacity: 0.4 } 50% { opacity: 1 } }
|
|
81
|
+
@keyframes asta-agent-in { from { opacity: 0; transform: translateY(4px) } }
|
|
82
|
+
@keyframes asta-agent-pop { from { opacity: 0; transform: scale(0.6) } }
|
|
83
|
+
@keyframes asta-agent-spin { to { transform: rotate(360deg) } }
|
|
84
|
+
@keyframes asta-agent-card { from { opacity: 0; transform: translateY(6px) scale(0.98) } }
|
|
85
|
+
@keyframes asta-assist-in { from { opacity: 0; transform: translateY(var(--asta-assist-y, 4px)) scale(0.98) } }
|
|
86
|
+
@keyframes asta-assist-rise { from { opacity: 0; transform: translateY(6px) } }
|
|
87
|
+
@keyframes asta-trace-grow { from { transform: translateX(var(--x, 0%)) scaleX(0) } }
|
|
88
|
+
@keyframes asta-trace-run { 50% { opacity: 0.45 } }
|
|
89
|
+
@keyframes asta-prompt-orbit { to { transform: translate(-50%, -50%) rotate(1turn) } }
|
|
78
90
|
@keyframes asta-blk-shake {
|
|
79
91
|
0%, 100% { transform: none }
|
|
80
92
|
20% { transform: translateX(-6px) }
|
|
@@ -90,6 +102,10 @@
|
|
|
90
102
|
@keyframes asta-blk-roll-down { from { opacity: 0; transform: translateY(-70%) } }
|
|
91
103
|
@keyframes asta-blk-count { from { transform: scaleX(1) } to { transform: scaleX(0) } }
|
|
92
104
|
@keyframes asta-blk-prop-in { from { opacity: 0; transform: translateY(-3px) } }
|
|
105
|
+
@keyframes asta-scrub-tip { from { opacity: 0; transform: translateY(-3px) } }
|
|
106
|
+
@keyframes asta-ak-in { from { opacity: 0; transform: translateY(6px) } }
|
|
107
|
+
@keyframes asta-ak-count { from { transform: scaleX(1) } to { transform: scaleX(0) } }
|
|
108
|
+
@keyframes asta-ak-pulse { 50% { opacity: 0.45 } }
|
|
93
109
|
@keyframes asta-tree-in { from { opacity: 0; transform: translateY(-4px) } }
|
|
94
110
|
@keyframes asta-timeline-in { from { opacity: 0; transform: translateY(8px) } }
|
|
95
111
|
@keyframes asta-timeline-line { from { transform: scaleY(0) } }
|
package/dist/api-keys.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
ContextBreakdown,
|
|
4
|
+
ContextMeter,
|
|
5
|
+
context_meter_default,
|
|
6
|
+
formatTokens
|
|
7
|
+
} from "../chunk-24O5V2PQ.js";
|
|
8
|
+
import "../chunk-IATF2OTU.js";
|
|
9
|
+
export {
|
|
10
|
+
ContextBreakdown,
|
|
11
|
+
ContextMeter,
|
|
12
|
+
context_meter_default as default,
|
|
13
|
+
formatTokens
|
|
14
|
+
};
|
package/dist/base/navbar.js
CHANGED