loseta 0.9.0 → 0.10.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.
@@ -0,0 +1,66 @@
1
+ <!-- Steps -->
2
+ <div class="questionnaire">
3
+ <div data-slot="progress">
4
+ <span data-slot="progress-label" id="questionnaire-progress" aria-live="polite">Question 1 of 2</span>
5
+ <progress aria-labelledby="questionnaire-progress" value="1" max="2">1 of 2</progress>
6
+ </div>
7
+ <fieldset data-slot="item" aria-current="step">
8
+ <legend>What should the agent build next?</legend>
9
+ <p data-slot="description">Choose a direction or describe another task.</p>
10
+ <div data-slot="choices">
11
+ <label class="questionnaire-choice">
12
+ <input type="radio" name="direction" value="timeline" checked>
13
+ <span data-slot="text">
14
+ <span data-slot="label">Tool call timeline</span>
15
+ <span data-slot="description">Show what the agent ran and what came back.</span>
16
+ </span>
17
+ </label>
18
+ <label class="questionnaire-choice">
19
+ <input type="radio" name="direction" value="checkpoints">
20
+ <span data-slot="text">
21
+ <span data-slot="label">Approval checkpoints</span>
22
+ <span data-slot="description">Ask before sensitive or destructive actions.</span>
23
+ </span>
24
+ </label>
25
+ <label class="questionnaire-choice">
26
+ <input type="radio" name="direction" value="handoffs">
27
+ <span data-slot="text">
28
+ <span data-slot="label">Sub-agent handoffs</span>
29
+ <span data-slot="description">Make delegated work and results easier to follow.</span>
30
+ </span>
31
+ </label>
32
+ <input type="text" data-slot="input" name="other" aria-label="Another answer" placeholder="Type another answer…">
33
+ </div>
34
+ </fieldset>
35
+ <fieldset data-slot="item" hidden>
36
+ <legend>What context should the agent inspect?</legend>
37
+ <p data-slot="description">Select every source that may affect the implementation.</p>
38
+ <div data-slot="choices">
39
+ <label class="questionnaire-choice">
40
+ <input type="checkbox" name="context" value="files">
41
+ <span data-slot="text">
42
+ <span data-slot="label">Relevant source files</span>
43
+ <span data-slot="description">Components, styles and tests touched by the change.</span>
44
+ </span>
45
+ </label>
46
+ <label class="questionnaire-choice">
47
+ <input type="checkbox" name="context" value="tests" checked>
48
+ <span data-slot="text">
49
+ <span data-slot="label">Existing tests</span>
50
+ <span data-slot="description">Unit and browser coverage for the affected area.</span>
51
+ </span>
52
+ </label>
53
+ <label class="questionnaire-choice">
54
+ <input type="checkbox" name="context" value="history">
55
+ <span data-slot="text">
56
+ <span data-slot="label">Recent commit history</span>
57
+ <span data-slot="description">Changes that explain the current behavior.</span>
58
+ </span>
59
+ </label>
60
+ </div>
61
+ </fieldset>
62
+ <div data-slot="actions">
63
+ <button type="button" class="btn" data-variant="outline" disabled>Previous</button>
64
+ <button type="button" class="btn">Next</button>
65
+ </div>
66
+ </div>
@@ -26,6 +26,6 @@
26
26
  </nav>
27
27
  </section>
28
28
  <footer>
29
- <span>v0.9.0</span>
29
+ <span>v0.10.0</span>
30
30
  </footer>
31
31
  </aside>
@@ -0,0 +1,42 @@
1
+ <!-- Tool calls -->
2
+ <div style="display: flex; flex-direction: column">
3
+ <details class="trace" open>
4
+ <summary>
5
+ <span data-slot="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="4 17 10 11 4 5"/><line x1="12" x2="20" y1="19" y2="19"/></svg></span>
6
+ <span data-slot="title">Ran pnpm install</span>
7
+ <span data-slot="status" data-variant="error">Failed</span>
8
+ </summary>
9
+ <div data-slot="body">
10
+ <p>The frozen install failed because the lockfile is out of date.</p>
11
+ <a data-slot="source" href="#">pnpm install logs</a>
12
+ </div>
13
+ </details>
14
+ <details class="trace" aria-busy="true">
15
+ <summary>
16
+ <span data-slot="icon"><span class="spinner" data-size="sm"></span></span>
17
+ <span data-slot="title">Running pnpm build</span>
18
+ <span data-slot="status">Running</span>
19
+ </summary>
20
+ <div data-slot="body">
21
+ <p>Compiling the registry and the docs site.</p>
22
+ </div>
23
+ </details>
24
+ <details class="trace">
25
+ <summary>
26
+ <span data-slot="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg></span>
27
+ <span data-slot="title">Searched for minimumReleaseAge</span>
28
+ <span data-slot="status" data-variant="success">8 results</span>
29
+ </summary>
30
+ <div data-slot="body">
31
+ <details class="trace">
32
+ <summary>
33
+ <span data-slot="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/></svg></span>
34
+ <span data-slot="title">Read pnpm.io settings</span>
35
+ </summary>
36
+ <div data-slot="body">
37
+ <p>minimumReleaseAge delays newly published versions.</p>
38
+ </div>
39
+ </details>
40
+ </div>
41
+ </details>
42
+ </div>
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "./schema.json",
3
3
  "name": "loseta",
4
- "version": "0.9.0",
4
+ "version": "0.10.0",
5
5
  "styles": [
6
6
  {
7
7
  "name": "nova",
@@ -3132,6 +3132,232 @@
3132
3132
  "examples": [
3133
3133
  "examples/toast.html"
3134
3134
  ]
3135
+ },
3136
+ {
3137
+ "name": "attachment",
3138
+ "type": "component",
3139
+ "status": "experimental",
3140
+ "title": "Attachment",
3141
+ "description": "A file or media card with upload and error states.",
3142
+ "docs": "/docs/components/attachment",
3143
+ "root": [
3144
+ ".attachment"
3145
+ ],
3146
+ "registryDependencies": [],
3147
+ "optionalDependencies": [
3148
+ "button",
3149
+ "spinner"
3150
+ ],
3151
+ "files": [
3152
+ {
3153
+ "path": "components/attachment.css",
3154
+ "target": "components/attachment.css",
3155
+ "role": "base",
3156
+ "layer": "loseta.components"
3157
+ },
3158
+ {
3159
+ "path": "styles/nova/attachment.css",
3160
+ "target": "styles/nova/attachment.css",
3161
+ "role": "style",
3162
+ "layer": "loseta.style"
3163
+ }
3164
+ ],
3165
+ "examples": [
3166
+ "examples/attachment.html"
3167
+ ]
3168
+ },
3169
+ {
3170
+ "name": "bubble",
3171
+ "type": "component",
3172
+ "status": "experimental",
3173
+ "title": "Bubble",
3174
+ "description": "The message surface with variants and reaction chips.",
3175
+ "docs": "/docs/components/bubble",
3176
+ "root": [
3177
+ ".bubble",
3178
+ ".bubble-group"
3179
+ ],
3180
+ "registryDependencies": [],
3181
+ "optionalDependencies": [],
3182
+ "files": [
3183
+ {
3184
+ "path": "components/bubble.css",
3185
+ "target": "components/bubble.css",
3186
+ "role": "base",
3187
+ "layer": "loseta.components"
3188
+ },
3189
+ {
3190
+ "path": "styles/nova/bubble.css",
3191
+ "target": "styles/nova/bubble.css",
3192
+ "role": "style",
3193
+ "layer": "loseta.style"
3194
+ }
3195
+ ],
3196
+ "examples": [
3197
+ "examples/bubble.html"
3198
+ ]
3199
+ },
3200
+ {
3201
+ "name": "marker",
3202
+ "type": "component",
3203
+ "status": "experimental",
3204
+ "title": "Marker",
3205
+ "description": "An inline note, status or divider between conversation turns.",
3206
+ "docs": "/docs/components/marker",
3207
+ "root": [
3208
+ ".marker"
3209
+ ],
3210
+ "registryDependencies": [],
3211
+ "optionalDependencies": [],
3212
+ "files": [
3213
+ {
3214
+ "path": "components/marker.css",
3215
+ "target": "components/marker.css",
3216
+ "role": "base",
3217
+ "layer": "loseta.components"
3218
+ },
3219
+ {
3220
+ "path": "styles/nova/marker.css",
3221
+ "target": "styles/nova/marker.css",
3222
+ "role": "style",
3223
+ "layer": "loseta.style"
3224
+ }
3225
+ ],
3226
+ "examples": [
3227
+ "examples/marker.html"
3228
+ ]
3229
+ },
3230
+ {
3231
+ "name": "message",
3232
+ "type": "component",
3233
+ "status": "experimental",
3234
+ "title": "Message",
3235
+ "description": "A conversation row with avatar, header, content and footer.",
3236
+ "docs": "/docs/components/message",
3237
+ "root": [
3238
+ ".message",
3239
+ ".message-group"
3240
+ ],
3241
+ "registryDependencies": [],
3242
+ "optionalDependencies": [
3243
+ "avatar",
3244
+ "bubble"
3245
+ ],
3246
+ "files": [
3247
+ {
3248
+ "path": "components/message.css",
3249
+ "target": "components/message.css",
3250
+ "role": "base",
3251
+ "layer": "loseta.components"
3252
+ },
3253
+ {
3254
+ "path": "styles/nova/message.css",
3255
+ "target": "styles/nova/message.css",
3256
+ "role": "style",
3257
+ "layer": "loseta.style"
3258
+ }
3259
+ ],
3260
+ "examples": [
3261
+ "examples/message.html"
3262
+ ]
3263
+ },
3264
+ {
3265
+ "name": "message-scroller",
3266
+ "type": "component",
3267
+ "status": "experimental",
3268
+ "title": "Message Scroller",
3269
+ "description": "A scroll container for conversations with a jump-to-latest button.",
3270
+ "docs": "/docs/components/message-scroller",
3271
+ "root": [
3272
+ ".message-scroller"
3273
+ ],
3274
+ "registryDependencies": [],
3275
+ "optionalDependencies": [
3276
+ "bubble",
3277
+ "message"
3278
+ ],
3279
+ "files": [
3280
+ {
3281
+ "path": "components/message-scroller.css",
3282
+ "target": "components/message-scroller.css",
3283
+ "role": "base",
3284
+ "layer": "loseta.components"
3285
+ },
3286
+ {
3287
+ "path": "styles/nova/message-scroller.css",
3288
+ "target": "styles/nova/message-scroller.css",
3289
+ "role": "style",
3290
+ "layer": "loseta.style"
3291
+ }
3292
+ ],
3293
+ "examples": [
3294
+ "examples/message-scroller.html"
3295
+ ]
3296
+ },
3297
+ {
3298
+ "name": "questionnaire",
3299
+ "type": "component",
3300
+ "status": "experimental",
3301
+ "title": "Questionnaire",
3302
+ "description": "A multi-step form with native choices, progress and navigation.",
3303
+ "docs": "/docs/components/questionnaire",
3304
+ "root": [
3305
+ ".questionnaire"
3306
+ ],
3307
+ "registryDependencies": [],
3308
+ "optionalDependencies": [
3309
+ "button"
3310
+ ],
3311
+ "files": [
3312
+ {
3313
+ "path": "components/questionnaire.css",
3314
+ "target": "components/questionnaire.css",
3315
+ "role": "base",
3316
+ "layer": "loseta.components"
3317
+ },
3318
+ {
3319
+ "path": "styles/nova/questionnaire.css",
3320
+ "target": "styles/nova/questionnaire.css",
3321
+ "role": "style",
3322
+ "layer": "loseta.style"
3323
+ }
3324
+ ],
3325
+ "examples": [
3326
+ "examples/questionnaire.html"
3327
+ ]
3328
+ },
3329
+ {
3330
+ "name": "trace",
3331
+ "type": "component",
3332
+ "status": "experimental",
3333
+ "title": "Trace",
3334
+ "description": "A native disclosure for agent steps, tool calls and sources.",
3335
+ "docs": "/docs/components/trace",
3336
+ "root": [
3337
+ ".trace"
3338
+ ],
3339
+ "registryDependencies": [],
3340
+ "optionalDependencies": [
3341
+ "code-block",
3342
+ "spinner"
3343
+ ],
3344
+ "files": [
3345
+ {
3346
+ "path": "components/trace.css",
3347
+ "target": "components/trace.css",
3348
+ "role": "base",
3349
+ "layer": "loseta.components"
3350
+ },
3351
+ {
3352
+ "path": "styles/nova/trace.css",
3353
+ "target": "styles/nova/trace.css",
3354
+ "role": "style",
3355
+ "layer": "loseta.style"
3356
+ }
3357
+ ],
3358
+ "examples": [
3359
+ "examples/trace.html"
3360
+ ]
3135
3361
  }
3136
3362
  ]
3137
3363
  }
@@ -0,0 +1,176 @@
1
+ /* Attachment */
2
+ @layer loseta.style {
3
+ .attachment {
4
+ border-color: var(--border);
5
+ border-radius: var(--radius-xl);
6
+ background-color: var(--card);
7
+ color: var(--card-foreground);
8
+ transition-property: color, background-color, border-color, box-shadow;
9
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
10
+ transition-duration: 150ms;
11
+
12
+ &:has(> :is(a, button, [data-slot='trigger'])):hover {
13
+ background-color: color-mix(in oklab, var(--muted) 50%, var(--card));
14
+ }
15
+
16
+ &:focus-within {
17
+ box-shadow: 0 0 0 1px color-mix(in oklab, var(--ring) 50%, transparent);
18
+ }
19
+
20
+ &:has([role='alert']) {
21
+ border-color: light-dark(
22
+ color-mix(in oklab, var(--destructive) 30%, transparent),
23
+ color-mix(in oklab, var(--destructive) 40%, transparent)
24
+ );
25
+ }
26
+
27
+ &[aria-busy='true'] > [data-slot='media'] {
28
+ opacity: 60%;
29
+ }
30
+
31
+ > [data-slot='media'] {
32
+ border-radius: var(--radius-lg);
33
+ background-color: var(--muted);
34
+ color: var(--foreground);
35
+
36
+ > svg {
37
+ width: 1rem;
38
+ height: 1rem;
39
+ }
40
+ }
41
+
42
+ > [data-slot='content'] {
43
+ line-height: 1.25;
44
+
45
+ > [data-slot='title'] {
46
+ font-weight: 500;
47
+ }
48
+
49
+ > [data-slot='description'] {
50
+ margin-block-start: 0.125rem;
51
+ color: var(--muted-foreground);
52
+ font-size: var(--text-xs);
53
+ line-height: var(--text-xs--line-height);
54
+ }
55
+
56
+ > [role='alert'] {
57
+ color: var(--destructive);
58
+ }
59
+ }
60
+
61
+ &:not([data-size]),
62
+ &[data-size='default'] {
63
+ gap: 0.5rem;
64
+ font-size: var(--text-sm);
65
+ line-height: var(--text-sm--line-height);
66
+
67
+ &:has(> [data-slot='content']) {
68
+ padding-inline: 0.625rem;
69
+ padding-block: 0.5rem;
70
+ }
71
+
72
+ &:has(> [data-slot='media']) {
73
+ padding: 0.5rem;
74
+ }
75
+
76
+ > [data-slot='media'] {
77
+ width: 2.5rem;
78
+ }
79
+
80
+ &[data-orientation='vertical'] > [data-slot='media'] {
81
+ width: 100%;
82
+ }
83
+ }
84
+
85
+ &[data-size='sm'] {
86
+ gap: 0.625rem;
87
+ font-size: var(--text-xs);
88
+ line-height: var(--text-xs--line-height);
89
+
90
+ &:has(> [data-slot='content']) {
91
+ padding-inline: 0.5rem;
92
+ padding-block: 0.375rem;
93
+ }
94
+
95
+ &:has(> [data-slot='media']) {
96
+ padding: 0.375rem;
97
+ }
98
+
99
+ > [data-slot='media'] {
100
+ width: 2rem;
101
+ }
102
+
103
+ &[data-orientation='vertical'] > [data-slot='media'] {
104
+ width: 100%;
105
+ }
106
+
107
+ > [data-slot='content'] > [data-slot='description'] {
108
+ font-size: var(--text-xs);
109
+ line-height: var(--text-xs--line-height);
110
+ }
111
+ }
112
+
113
+ &[data-size='xs'] {
114
+ gap: 0.375rem;
115
+ border-radius: var(--radius-lg);
116
+ font-size: var(--text-xs);
117
+ line-height: var(--text-xs--line-height);
118
+
119
+ &:has(> [data-slot='content']) {
120
+ padding-inline: 0.375rem;
121
+ padding-block: 0.25rem;
122
+ }
123
+
124
+ &:has(> [data-slot='media']) {
125
+ padding: 0.25rem;
126
+ }
127
+
128
+ > [data-slot='media'] {
129
+ width: 1.75rem;
130
+ border-radius: var(--radius-md);
131
+ }
132
+
133
+ &[data-orientation='vertical'] > [data-slot='media'] {
134
+ width: 100%;
135
+ }
136
+
137
+ > [data-slot='content'] > [data-slot='description'] {
138
+ font-size: var(--text-xs);
139
+ line-height: var(--text-xs--line-height);
140
+ }
141
+ }
142
+
143
+ &:not([data-orientation]),
144
+ &[data-orientation='horizontal'] {
145
+ min-width: 10rem;
146
+ align-items: center;
147
+ }
148
+
149
+ &[data-orientation='vertical'] {
150
+ > [data-slot='media'] {
151
+ width: 100%;
152
+ border-radius: var(--radius-lg);
153
+ }
154
+
155
+ > [data-slot='content'] {
156
+ padding-inline: 0.25rem;
157
+ }
158
+
159
+ > [data-slot='actions'] {
160
+ gap: 0.25rem;
161
+ }
162
+ }
163
+
164
+ &[aria-busy='true'] > [data-slot='content'] > [data-slot='title'] {
165
+ color: var(--muted-foreground);
166
+ }
167
+
168
+ &:has([role='alert']) > [data-slot='media'] {
169
+ background-color: light-dark(
170
+ color-mix(in oklab, var(--destructive) 10%, transparent),
171
+ color-mix(in oklab, var(--destructive) 20%, transparent)
172
+ );
173
+ color: var(--destructive);
174
+ }
175
+ }
176
+ }
@@ -0,0 +1,147 @@
1
+ /* Bubble */
2
+ @layer loseta.style {
3
+ .bubble {
4
+ > [data-slot='content'] {
5
+ border-radius: var(--radius-xl);
6
+ padding-inline: 0.75rem;
7
+ padding-block: 0.5rem;
8
+ font-size: var(--text-sm);
9
+ line-height: 1.625;
10
+ transition-property: color, background-color, border-color, box-shadow;
11
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
12
+ transition-duration: 150ms;
13
+
14
+ &:is(a, button) {
15
+ cursor: pointer;
16
+ }
17
+
18
+ &:is(a, button):focus-visible {
19
+ box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
20
+ }
21
+ }
22
+
23
+ &:not([data-variant]),
24
+ &[data-variant='default'] {
25
+ > [data-slot='content'] {
26
+ background-color: var(--primary);
27
+ color: var(--primary-foreground);
28
+ }
29
+
30
+ > [data-slot='content']:is(a, button):hover {
31
+ background-color: color-mix(in oklab, var(--primary) 85%, var(--background));
32
+ }
33
+ }
34
+
35
+ &[data-variant='secondary'] {
36
+ > [data-slot='content'] {
37
+ background-color: var(--secondary);
38
+ color: var(--secondary-foreground);
39
+ }
40
+
41
+ > [data-slot='content']:is(a, button):hover {
42
+ background-color: color-mix(in oklab, var(--secondary) 95%, var(--foreground));
43
+ }
44
+ }
45
+
46
+ &[data-variant='muted'] {
47
+ > [data-slot='content'] {
48
+ background-color: var(--muted);
49
+ color: var(--foreground);
50
+ }
51
+
52
+ > [data-slot='content']:is(a, button):hover {
53
+ background-color: color-mix(in oklab, var(--muted) 95%, var(--foreground));
54
+ }
55
+ }
56
+
57
+ &[data-variant='tinted'] {
58
+ > [data-slot='content'] {
59
+ background-color: light-dark(
60
+ color-mix(in oklab, var(--primary) 8%, var(--background)),
61
+ color-mix(in oklab, var(--primary) 18%, var(--background))
62
+ );
63
+ color: var(--foreground);
64
+ }
65
+
66
+ > [data-slot='content']:is(a, button):hover {
67
+ background-color: light-dark(
68
+ color-mix(in oklab, var(--primary) 12%, var(--background)),
69
+ color-mix(in oklab, var(--primary) 24%, var(--background))
70
+ );
71
+ }
72
+ }
73
+
74
+ &[data-variant='outline'] {
75
+ > [data-slot='content'] {
76
+ border-color: var(--border);
77
+ background-color: var(--background);
78
+ color: var(--foreground);
79
+ }
80
+
81
+ > [data-slot='content']:is(a, button):hover {
82
+ background-color: var(--muted);
83
+ }
84
+ }
85
+
86
+ &[data-variant='ghost'] {
87
+ > [data-slot='content'] {
88
+ border-radius: 0;
89
+ background-color: transparent;
90
+ padding: 0;
91
+ color: var(--foreground);
92
+ }
93
+
94
+ > [data-slot='content']:is(a, button):hover {
95
+ background-color: var(--muted);
96
+ }
97
+ }
98
+
99
+ &[data-variant='destructive'] {
100
+ > [data-slot='content'] {
101
+ background-color: light-dark(
102
+ color-mix(in oklab, var(--destructive) 10%, transparent),
103
+ color-mix(in oklab, var(--destructive) 20%, transparent)
104
+ );
105
+ color: var(--destructive);
106
+ }
107
+
108
+ > [data-slot='content']:is(a, button):hover {
109
+ background-color: light-dark(
110
+ color-mix(in oklab, var(--destructive) 20%, transparent),
111
+ color-mix(in oklab, var(--destructive) 30%, transparent)
112
+ );
113
+ }
114
+ }
115
+
116
+ > [data-slot='reactions'] {
117
+ border-radius: var(--radius-full);
118
+ background-color: var(--muted);
119
+ padding-inline: 0.375rem;
120
+ padding-block: 0.125rem;
121
+ color: var(--foreground);
122
+ box-shadow: 0 0 0 3px var(--background);
123
+ font-size: var(--text-sm);
124
+ line-height: var(--text-sm--line-height);
125
+ }
126
+
127
+ [data-slot='reaction'] {
128
+ padding-inline: 0.25rem;
129
+ padding-block: 0.125rem;
130
+ background-color: transparent;
131
+ color: inherit;
132
+
133
+ &:hover {
134
+ background-color: color-mix(in oklab, var(--foreground) 8%, transparent);
135
+ }
136
+
137
+ &[aria-pressed='true'] {
138
+ background-color: color-mix(in oklab, var(--primary) 15%, transparent);
139
+ color: var(--primary);
140
+ }
141
+
142
+ &:focus-visible {
143
+ box-shadow: 0 0 0 2px var(--ring);
144
+ }
145
+ }
146
+ }
147
+ }