meowtail 0.1.0 → 0.2.0-alpha.1

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 (130) hide show
  1. package/AGENT-COMPONENTS.md +117 -0
  2. package/ASSISTANT.md +39 -19
  3. package/JSON.md +12 -5
  4. package/README.md +462 -349
  5. package/THIRD_PARTY_NOTICES.md +8 -0
  6. package/dist/src/chat/assistant-composer.js +3 -5
  7. package/dist/src/chat/assistant-content.d.ts +2 -0
  8. package/dist/src/chat/assistant-content.js +51 -3
  9. package/dist/src/chat/assistant-types.d.ts +39 -1
  10. package/dist/src/chat/assistant.d.ts +1 -1
  11. package/dist/src/chat/assistant.js +6 -3
  12. package/dist/src/chat/attachments.js +9 -5
  13. package/dist/src/chat/composer-panel.d.ts +17 -0
  14. package/dist/src/chat/composer-panel.js +12 -0
  15. package/dist/src/chat/composer.d.ts +2 -0
  16. package/dist/src/chat/composer.js +5 -2
  17. package/dist/src/chat/conversation.d.ts +4 -1
  18. package/dist/src/chat/conversation.js +7 -4
  19. package/dist/src/chat/index.d.ts +5 -2
  20. package/dist/src/chat/index.js +2 -0
  21. package/dist/src/chat/message-list.js +1 -1
  22. package/dist/src/chat/message.js +3 -3
  23. package/dist/src/chat/question.js +1 -1
  24. package/dist/src/chat/sources.js +1 -1
  25. package/dist/src/chat/task.d.ts +29 -0
  26. package/dist/src/chat/task.js +53 -0
  27. package/dist/src/chat/tool-call.d.ts +33 -8
  28. package/dist/src/chat/tool-call.js +70 -26
  29. package/dist/src/components/action-rail.d.ts +19 -0
  30. package/dist/src/components/action-rail.js +13 -0
  31. package/dist/src/components/add-button.js +1 -1
  32. package/dist/src/components/alert.d.ts +2 -0
  33. package/dist/src/components/alert.js +2 -1
  34. package/dist/src/components/app-bar.d.ts +17 -0
  35. package/dist/src/components/app-bar.js +10 -0
  36. package/dist/src/components/breadcrumb.js +1 -1
  37. package/dist/src/components/choice-select.js +1 -1
  38. package/dist/src/components/code-block.js +6 -6
  39. package/dist/src/components/credential-source.js +12 -12
  40. package/dist/src/components/diff-block.js +1 -1
  41. package/dist/src/components/grid.js +1 -0
  42. package/dist/src/components/hover-card.js +2 -2
  43. package/dist/src/components/image-lightbox.js +3 -3
  44. package/dist/src/components/image-preview.js +1 -1
  45. package/dist/src/components/index.d.ts +4 -0
  46. package/dist/src/components/index.js +4 -0
  47. package/dist/src/components/inline.js +1 -0
  48. package/dist/src/components/json-block.js +2 -2
  49. package/dist/src/components/json-tree.js +3 -3
  50. package/dist/src/components/layout-item.js +2 -1
  51. package/dist/src/components/layout-types.d.ts +1 -1
  52. package/dist/src/components/list-group.d.ts +1 -1
  53. package/dist/src/components/menu.js +5 -5
  54. package/dist/src/components/meta-row.d.ts +33 -0
  55. package/dist/src/components/meta-row.js +45 -0
  56. package/dist/src/components/output-block.d.ts +5 -3
  57. package/dist/src/components/output-block.js +35 -25
  58. package/dist/src/components/page-frame.d.ts +6 -2
  59. package/dist/src/components/page-frame.js +2 -2
  60. package/dist/src/components/path-picker.js +4 -4
  61. package/dist/src/components/process-group.d.ts +2 -2
  62. package/dist/src/components/rail-item.d.ts +2 -2
  63. package/dist/src/components/rail-section.d.ts +1 -1
  64. package/dist/src/components/read-block.js +2 -2
  65. package/dist/src/components/resource-card.d.ts +1 -1
  66. package/dist/src/components/resource-link.d.ts +1 -1
  67. package/dist/src/components/search-block.js +2 -3
  68. package/dist/src/components/stack.js +1 -0
  69. package/dist/src/components/status.d.ts +16 -0
  70. package/dist/src/components/status.js +8 -0
  71. package/dist/src/components/terminal-block.js +6 -6
  72. package/dist/src/components/web-block.js +3 -3
  73. package/dist/src/components/work-card.d.ts +2 -2
  74. package/dist/src/components/work-card.js +1 -1
  75. package/dist/src/icons/README.md +13 -2
  76. package/dist/src/icons/icon-frame.d.ts +11 -0
  77. package/dist/src/icons/icon-frame.js +4 -0
  78. package/dist/src/icons/icon-source.d.ts +17 -0
  79. package/dist/src/icons/icon-source.js +6 -0
  80. package/dist/src/icons/icon.d.ts +44 -37
  81. package/dist/src/icons/icon.js +55 -128
  82. package/dist/src/icons/index.d.ts +1 -0
  83. package/dist/src/icons/index.js +1 -0
  84. package/dist/src/icons/lucide.d.ts +1 -0
  85. package/dist/src/icons/lucide.js +4 -0
  86. package/dist/src/json/catalog.d.ts +88 -2
  87. package/dist/src/json/catalog.js +33 -1
  88. package/dist/src/registry/index.d.ts +54 -4
  89. package/dist/src/registry/index.js +16 -2
  90. package/dist/src/shared/execution-state.d.ts +7 -0
  91. package/dist/src/shared/execution-state.js +36 -0
  92. package/dist/src/theme/base.styles.js +15 -0
  93. package/dist/src/theme/chat/assistant.styles.js +21 -9
  94. package/dist/src/theme/chat/composer-panel.styles.d.ts +1 -0
  95. package/dist/src/theme/chat/composer-panel.styles.js +44 -0
  96. package/dist/src/theme/chat/composer.styles.js +39 -7
  97. package/dist/src/theme/chat/conversation.styles.js +15 -7
  98. package/dist/src/theme/chat/records.styles.js +79 -7
  99. package/dist/src/theme/chat/task.styles.d.ts +1 -0
  100. package/dist/src/theme/chat/task.styles.js +87 -0
  101. package/dist/src/theme/components/action-rail.styles.d.ts +1 -0
  102. package/dist/src/theme/components/action-rail.styles.js +47 -0
  103. package/dist/src/theme/components/alert.styles.js +42 -1
  104. package/dist/src/theme/components/app-bar.styles.d.ts +1 -0
  105. package/dist/src/theme/components/app-bar.styles.js +48 -0
  106. package/dist/src/theme/components/card.styles.js +9 -3
  107. package/dist/src/theme/components/code-block.styles.js +7 -0
  108. package/dist/src/theme/components/dialog.styles.js +7 -0
  109. package/dist/src/theme/components/field.styles.js +4 -0
  110. package/dist/src/theme/components/list-group.styles.js +10 -11
  111. package/dist/src/theme/components/meta-row.styles.d.ts +1 -0
  112. package/dist/src/theme/components/meta-row.styles.js +66 -0
  113. package/dist/src/theme/components/output-block.styles.js +17 -0
  114. package/dist/src/theme/components/page-frame.styles.js +7 -1
  115. package/dist/src/theme/components/page-header.styles.js +7 -0
  116. package/dist/src/theme/components/resource-card.styles.js +15 -3
  117. package/dist/src/theme/components/status.styles.d.ts +1 -0
  118. package/dist/src/theme/components/status.styles.js +25 -0
  119. package/dist/src/theme/components/tag.styles.js +3 -3
  120. package/dist/src/theme/components/toolbar.styles.js +7 -0
  121. package/dist/src/theme/index.d.ts +148 -0
  122. package/dist/src/theme/index.js +173 -159
  123. package/dist/src/theme/palette.d.ts +1 -1
  124. package/dist/src/theme/palette.js +1 -1
  125. package/dist/src/theme/shared/code-highlight.styles.js +1 -1
  126. package/dist/src/theme/shared/code-highlight.tokens.d.ts +6 -6
  127. package/dist/src/theme/shared/code-highlight.tokens.js +6 -6
  128. package/dist/src/theme/tokens.d.ts +7 -7
  129. package/dist/src/theme/tokens.js +14 -8
  130. package/package.json +17 -6
@@ -0,0 +1,36 @@
1
+ export function executionStateLabel(state) {
2
+ switch (state) {
3
+ case "queued":
4
+ return "Queued";
5
+ case "running":
6
+ return "Running";
7
+ case "waiting":
8
+ return "Waiting";
9
+ case "error":
10
+ return "Error";
11
+ case "cancelled":
12
+ return "Canceled";
13
+ case "unknown":
14
+ return "Unconfirmed result";
15
+ default:
16
+ return "Completed";
17
+ }
18
+ }
19
+ export function executionStateTone(state) {
20
+ switch (state) {
21
+ case "queued":
22
+ case "cancelled":
23
+ return "idle";
24
+ case "running":
25
+ return "processing";
26
+ case "waiting":
27
+ return "warning";
28
+ case "error":
29
+ return "danger";
30
+ case "success":
31
+ case "complete":
32
+ return "success";
33
+ default:
34
+ return "unknown";
35
+ }
36
+ }
@@ -10,6 +10,21 @@ export const cornerShapeStyles = css `
10
10
  }
11
11
  `;
12
12
  export const baseStyles = css `
13
+ /* Establish UI typography at an entry root without resetting an author's
14
+ typography when a nested region changes its theme or appearance. */
15
+ :where([data-meowui-theme-root="meowui"]:not([data-meowui-theme-root] *)) {
16
+ font-family: ${uiTokens.font};
17
+ font-size: ${uiTokens.fontBody};
18
+ line-height: ${uiTokens.leading};
19
+ }
20
+ /* Unlike typography, ink must resolve again at a local appearance boundary. */
21
+ :where(
22
+ [data-meowui-theme-root="meowui"],
23
+ [data-meowui-theme-root="meowui"]
24
+ [data-meowui-scope]:not([data-meowui-theme-root]:not([data-meowui-theme-root="meowui"]))
25
+ ) {
26
+ color: ${uiTokens.foreground};
27
+ }
13
28
  :where([data-meowui-theme-root="meowui"]) {
14
29
  -webkit-font-smoothing: antialiased;
15
30
  -moz-osx-font-smoothing: grayscale;
@@ -9,6 +9,7 @@ import { chatHeaderContract } from "../../chat/header.js";
9
9
  import { pageFrameContract } from "../../components/page-frame.js";
10
10
  import { chatComposerContract } from "../../chat/composer.js";
11
11
  import { workCardContract } from "../../components/work-card.js";
12
+ import { buttonContract } from "../../components/button.js";
12
13
  const root = partSelector(assistantViewContract, "root");
13
14
  const layout = partSelector(assistantViewContract, "layout");
14
15
  const messages = partSelector(assistantViewContract, "messages");
@@ -49,11 +50,15 @@ export const assistantStyles = css `
49
50
  ${messages} {
50
51
  grid-area: messages;
51
52
  position: relative;
53
+ display: flex;
54
+ flex-direction: column;
52
55
  min-height: 0;
53
56
  min-width: 0;
54
57
  }
55
58
  ${viewport} {
56
- height: 100%;
59
+ flex: 1 1 0;
60
+ min-height: 0;
61
+ min-width: 0;
57
62
  overflow-y: auto;
58
63
  overflow-anchor: none;
59
64
  overscroll-behavior-y: contain;
@@ -120,13 +125,20 @@ export const assistantStyles = css `
120
125
  color: ${uiTokens.info};
121
126
  }
122
127
  ${partSelector(assistantViewContract, "latest")} {
123
- position: absolute;
124
- bottom: ${uiTokens.spaceGroup};
125
- right: max(
126
- ${uiTokens.spacePanel},
127
- calc((100% - ${uiTokens.containerContent}) / 2 + ${uiTokens.spacePanel})
128
- );
129
- z-index: 1;
128
+ display: flex;
129
+ justify-content: flex-end;
130
+ flex-shrink: 0;
131
+ width: 100%;
132
+ max-width: ${uiTokens.containerContent};
133
+ margin-inline: auto;
134
+ padding: ${uiTokens.spaceGroup} ${uiTokens.spacePanel};
135
+ box-sizing: border-box;
136
+ }
137
+ ${partSelector(assistantViewContract, "latest")} > ${partSelector(buttonContract, "root")} {
138
+ min-width: 0;
139
+ max-width: 100%;
140
+ white-space: normal;
141
+ overflow-wrap: anywhere;
130
142
  }
131
143
  ${composer} {
132
144
  grid-area: composer;
@@ -280,7 +292,7 @@ export const assistantStyles = css `
280
292
  padding-inline: ${uiTokens.pageInsetCompactInline};
281
293
  }
282
294
  ${partSelector(assistantViewContract, "latest")} {
283
- right: ${uiTokens.pageInsetCompactInline};
295
+ padding-inline: ${uiTokens.pageInsetCompactInline};
284
296
  }
285
297
  }
286
298
  ${root} {
@@ -0,0 +1 @@
1
+ export declare const composerPanelStyles: import("meowcss/meowjsx").CSSFragment;
@@ -0,0 +1,44 @@
1
+ import { css, partSelector } from "meowcss/meowjsx";
2
+ import { uiTokens } from "../tokens.js";
3
+ import { composerPanelContract } from "../../chat/composer-panel.js";
4
+ import { chatComposerContract } from "../../chat/composer.js";
5
+ export const composerPanelStyles = css `
6
+ ${partSelector(composerPanelContract, "root")} {
7
+ display: grid;
8
+ gap: ${uiTokens.spaceGroup};
9
+ width: 100%;
10
+ min-width: 0;
11
+ font-family: ${uiTokens.font};
12
+ color: ${uiTokens.foreground};
13
+ }
14
+ ${partSelector(composerPanelContract, "surface")} {
15
+ min-width: 0;
16
+ padding: 12px 14px 10px;
17
+ border: 1px solid ${uiTokens.borderSoft};
18
+ border-radius: 24px;
19
+ background: ${uiTokens.surface};
20
+ box-shadow: 0 1px 2px rgb(0 0 0 / 12%);
21
+ transition: border-color ${uiTokens.durationResponse} ${uiTokens.ease};
22
+ }
23
+ ${partSelector(composerPanelContract, "surface")}:focus-within {
24
+ border-color: ${uiTokens.border};
25
+ }
26
+ ${partSelector(composerPanelContract, "meta")} {
27
+ min-width: 0;
28
+ padding: 2px 8px 0;
29
+ }
30
+ ${partSelector(composerPanelContract, "surface")} ${partSelector(chatComposerContract, "submit")} {
31
+ border-radius: 50%;
32
+ }
33
+
34
+ @media (pointer: coarse) {
35
+ ${partSelector(composerPanelContract, "surface")}[data-meowui-part] ${partSelector(chatComposerContract, "root")}[data-meowui-part] ${partSelector(chatComposerContract, "actions")}[data-meowui-part] button,
36
+ ${partSelector(composerPanelContract, "surface")}[data-meowui-part] ${partSelector(chatComposerContract, "root")}[data-meowui-part] ${partSelector(chatComposerContract, "submit")} {
37
+ min-width: 44px;
38
+ min-height: 44px;
39
+ }
40
+ ${partSelector(composerPanelContract, "surface")}[data-meowui-part] ${partSelector(chatComposerContract, "root")}[data-meowui-part] ${partSelector(chatComposerContract, "input")} {
41
+ min-height: 44px;
42
+ }
43
+ }
44
+ `;
@@ -95,7 +95,8 @@ export const chatComposerStyles = css `
95
95
  border-radius: ${radiusTokens.float};
96
96
  }
97
97
 
98
- ${partSelector(chatFrameContract, "root")} ${partSelector(chatComposerContract, "root")} {
98
+ /* The frame owns its direct writing surface; a footer or card owns its own inset. */
99
+ ${partSelector(chatFrameContract, "root")} > ${partSelector(chatComposerContract, "root")} {
99
100
  flex: 0 0 auto;
100
101
  box-sizing: border-box;
101
102
  width: calc(100% - 2 * ${chatTokens.readingInset});
@@ -198,7 +199,7 @@ export const chatComposerStyles = css `
198
199
  }
199
200
 
200
201
  ${partSelector(chatComposerContract, "input")}::placeholder {
201
- color: ${uiTokens.captionForeground};
202
+ color: ${uiTokens.placeholder};
202
203
  font-size: ${uiTokens.fontBody};
203
204
  }
204
205
 
@@ -312,11 +313,14 @@ export const chatComposerStyles = css `
312
313
  transition-duration: 40ms;
313
314
  }
314
315
 
315
- /* A compact writing surface grows with the draft, not with an empty tools row. */
316
+ /* A compact writing surface grows with the draft, not with an empty tools row.
317
+ The inline row keeps the one-line text and the send action on the optical
318
+ center: equal block padding around the 24px line, a symmetric action row, and
319
+ no base-layout nudge on the submit button. */
316
320
  ${partSelector(chatComposerContract, "root")} {
317
321
  ${chatComposerOptions.when({ layout: "inline" })} {
318
322
  grid-template-columns: minmax(0, 1fr) auto;
319
- align-items: end;
323
+ align-items: center;
320
324
  padding: ${uiTokens.controlPaddingInline} ${uiTokens.spaceSection};
321
325
  }
322
326
  }
@@ -325,13 +329,18 @@ export const chatComposerStyles = css `
325
329
  grid-column: 1;
326
330
  grid-row: 1;
327
331
  min-height: ${uiTokens.controlLarge};
328
- padding-block: 5px;
332
+ padding-block: 8px;
329
333
  }
330
334
 
331
335
  ${partSelector(chatComposerContract, "root")}[${chatComposerOptions.attribute("layout")}="inline"] ${partSelector(chatComposerContract, "actions")} {
332
336
  grid-column: 2;
333
337
  grid-row: 1;
334
338
  flex-wrap: nowrap;
339
+ padding-block: 4px;
340
+ }
341
+
342
+ ${partSelector(chatComposerContract, "root")}[${chatComposerOptions.attribute("layout")}="inline"] ${partSelector(chatComposerContract, "submit")} {
343
+ transform: none;
335
344
  }
336
345
 
337
346
  ${partSelector(chatComposerContract, "root")}[${chatComposerOptions.attribute("layout")}="inline"] ${partSelector(chatComposerContract, "attachments")} {
@@ -404,14 +413,18 @@ export const chatComposerStyles = css `
404
413
  color: ${uiTokens.foreground};
405
414
  }
406
415
 
407
- /* The model choice sits beside the attach control; the shortcut hint and send stay right. */
416
+ /* The model and its supporting choices stay beside send, not stranded after attach. */
408
417
  ${partSelector(chatComposerContract, "root")}[${chatComposerOptions.attribute("layout")}="stacked"] ${partSelector(chatComposerContract, "actions")} > ${partSelector(chatComposerContract, "trailing")} {
409
- margin-left: 0;
418
+ margin-left: auto;
410
419
  min-width: 0;
411
420
  max-width: min(360px, 70%);
412
421
  }
413
422
 
414
423
  ${partSelector(chatComposerContract, "root")}[${chatComposerOptions.attribute("layout")}="stacked"] ${partSelector(chatComposerContract, "actions")} > ${partSelector(chatComposerContract, "submit")} {
424
+ margin-left: 0;
425
+ }
426
+
427
+ ${partSelector(chatComposerContract, "root")}[${chatComposerOptions.attribute("layout")}="stacked"] ${partSelector(chatComposerContract, "actions")}:not(:has(> ${partSelector(chatComposerContract, "trailing")})) > ${partSelector(chatComposerContract, "submit")} {
415
428
  margin-left: auto;
416
429
  }
417
430
 
@@ -516,4 +529,23 @@ export const chatComposerStyles = css `
516
529
  border-radius: 50%;
517
530
  }
518
531
  }
532
+
533
+ /* A composing panel owns the surface; the composer then contributes only its
534
+ editor and action row, without a second chrome or padding layer. */
535
+ ${partSelector(chatComposerContract, "root")}[${chatComposerOptions.attribute("surface")}="none"] {
536
+ padding: 0;
537
+ border: 0;
538
+ border-radius: 0;
539
+ background: transparent;
540
+ box-shadow: none;
541
+ }
542
+ @media (max-width: 768px) {
543
+ ${partSelector(chatComposerContract, "root")}[${chatComposerOptions.attribute("surface")}="none"] {
544
+ padding: 0;
545
+ border: 0;
546
+ border-radius: 0;
547
+ background: transparent;
548
+ box-shadow: none;
549
+ }
550
+ }
519
551
  `;
@@ -4,11 +4,17 @@ import { chatConversationContract } from "../../chat/conversation.js";
4
4
  export const chatConversationStyles = css `
5
5
  ${partSelector(chatConversationContract, "root")} {
6
6
  position: relative;
7
+ display: flex;
8
+ flex-direction: column;
7
9
  min-height: 0;
10
+ min-width: 0;
8
11
  font-family: ${uiTokens.font};
9
12
  font-size: ${uiTokens.fontBody};
10
13
  }
11
14
  ${partSelector(chatConversationContract, "viewport")} {
15
+ flex: 1 1 0;
16
+ min-height: 0;
17
+ min-width: 0;
12
18
  scrollbar-gutter: stable;
13
19
  overscroll-behavior-y: contain;
14
20
  }
@@ -16,17 +22,19 @@ export const chatConversationStyles = css `
16
22
  outline: 2px solid ${uiTokens.focus};
17
23
  outline-offset: -2px;
18
24
  }
19
- ${partSelector(chatConversationContract, "content")} {
20
- padding-bottom: calc(${uiTokens.spaceGroup} + ${uiTokens.controlHeight});
21
- }
22
25
  ${partSelector(chatConversationContract, "latest")} {
23
26
  display: inline-flex;
24
27
  align-items: center;
25
28
  gap: 6px;
26
- position: absolute;
27
- bottom: 16px;
28
- right: 16px;
29
- white-space: nowrap;
29
+ flex-shrink: 0;
30
+ align-self: flex-end;
31
+ justify-self: end;
32
+ width: fit-content;
33
+ min-width: 0;
34
+ max-width: calc(100% - 2 * ${uiTokens.spaceSection});
35
+ margin: ${uiTokens.spaceGroup} ${uiTokens.spaceSection};
36
+ white-space: normal;
37
+ overflow-wrap: anywhere;
30
38
  min-height: 34px;
31
39
  padding: 0 ${uiTokens.controlPaddingInline};
32
40
  box-sizing: border-box;
@@ -4,6 +4,7 @@ import { accentTokens } from "../palette.js";
4
4
  import { chatProcessContract } from "../../chat/process.js";
5
5
  import { chatSourcesContract } from "../../chat/sources.js";
6
6
  import { chatToolCallContract } from "../../chat/tool-call.js";
7
+ import { outputBlockContract } from "../../components/output-block.js";
7
8
  /** How far the chat type scale sits above the 14px body the row metrics were drawn at. */
8
9
  const rowDelta = "--chat-row-delta";
9
10
  /** Where a row's label begins; anything the row owns rather than sits beside starts here. */
@@ -68,6 +69,8 @@ export const chatRecordsStyles = css `
68
69
  }
69
70
 
70
71
  ${partSelector(chatToolCallContract, "root")} {
72
+ container-type: inline-size;
73
+ min-width: 0;
71
74
  display: grid;
72
75
  gap: 0;
73
76
  margin-top: 0;
@@ -92,8 +95,10 @@ export const chatRecordsStyles = css `
92
95
  }
93
96
 
94
97
  ${partSelector(chatToolCallContract, "status")} {
95
- flex: 0 0 auto;
96
- white-space: nowrap;
98
+ flex: 0 1 auto;
99
+ white-space: normal;
100
+ overflow-wrap: anywhere;
101
+ min-width: 0;
97
102
  margin-left: 2px;
98
103
  color: ${uiTokens.mutedForeground};
99
104
  font-size: ${uiTokens.fontCaption};
@@ -107,9 +112,9 @@ export const chatRecordsStyles = css `
107
112
  font-weight: 400;
108
113
  }
109
114
 
110
- /* With a separate target summary, the action name stays intact and the target yields space. */
115
+ /* Both the action and its target can yield to long state facts in constrained containers. */
111
116
  ${partSelector(chatToolCallContract, "header")}:has(> ${partSelector(chatToolCallContract, "summary")}) > ${partSelector(chatToolCallContract, "label")} {
112
- flex-shrink: 0;
117
+ flex-shrink: 1;
113
118
  }
114
119
 
115
120
  ${partSelector(chatToolCallContract, "root")}[data-tool-state="error"] ${partSelector(chatToolCallContract, "status")} {
@@ -141,6 +146,31 @@ export const chatRecordsStyles = css `
141
146
  margin-inline-start: var(${rowIndent});
142
147
  }
143
148
 
149
+ ${partSelector(chatToolCallContract, "body")} {
150
+ display: grid;
151
+ gap: ${uiTokens.spaceGroup};
152
+ overflow-wrap: anywhere;
153
+ }
154
+ ${partSelector(chatToolCallContract, "root")} [hidden] {
155
+ display: none;
156
+ }
157
+ ${partSelector(chatToolCallContract, "outputSummary")} {
158
+ margin: 0;
159
+ color: ${uiTokens.foreground};
160
+ }
161
+ ${partSelector(chatToolCallContract, "actions")} {
162
+ display: flex;
163
+ flex-wrap: wrap;
164
+ align-items: center;
165
+ gap: ${uiTokens.spaceGroup};
166
+ }
167
+ ${partSelector(chatToolCallContract, "input")} ${partSelector(outputBlockContract, "body")},
168
+ ${partSelector(chatToolCallContract, "output")} ${partSelector(outputBlockContract, "body")} {
169
+ max-height: 24rem;
170
+ }
171
+ ${partSelector(chatToolCallContract, "root")}[data-tool-state="success"] ${partSelector(chatToolCallContract, "status")} {
172
+ color: ${uiTokens.success};
173
+ }
144
174
  ${partSelector(chatToolCallContract, "root")}[data-tool-state="running"] {
145
175
  color: ${uiTokens.subtleForeground};
146
176
  }
@@ -317,8 +347,8 @@ export const chatRecordsStyles = css `
317
347
  ${partSelector(chatToolCallContract, "root")}[data-tool-interactive="true"] ${partSelector(chatToolCallContract, "status")} {
318
348
  margin-left: 2px;
319
349
  font-size: ${uiTokens.fontCaption};
320
- white-space: nowrap;
321
- flex-shrink: 0;
350
+ white-space: normal;
351
+ flex-shrink: 1;
322
352
  }
323
353
 
324
354
  ${partSelector(chatToolCallContract, "root")}[data-tool-state="error"][data-tool-interactive="true"] ${partSelector(chatToolCallContract, "status")} {
@@ -357,7 +387,7 @@ export const chatRecordsStyles = css `
357
387
  overflow: hidden;
358
388
  text-overflow: ellipsis;
359
389
  white-space: nowrap;
360
- flex: 1 1 auto;
390
+ flex: 1 1 0;
361
391
  color: inherit;
362
392
  }
363
393
 
@@ -382,6 +412,48 @@ export const chatRecordsStyles = css `
382
412
  white-space: nowrap;
383
413
  }
384
414
 
415
+ /* A narrow host gives each fact a readable line instead of making two thin text columns. */
416
+ @container (max-width: 400px) {
417
+ ${partSelector(chatToolCallContract, "header")} {
418
+ display: grid;
419
+ grid-template-columns: calc(${uiTokens.iconSize} + var(${rowDelta}, 0px)) minmax(0, 1fr);
420
+ align-items: start;
421
+ row-gap: 0;
422
+ }
423
+ ${partSelector(chatToolCallContract, "icon")} {
424
+ grid-column: 1;
425
+ grid-row: 1;
426
+ align-self: start;
427
+ margin-block-start: calc(
428
+ (
429
+ (${chatTokens.rowLine} + var(${rowDelta}, 0px)) -
430
+ (${uiTokens.iconSize} + var(${rowDelta}, 0px))
431
+ ) /
432
+ 2
433
+ );
434
+ }
435
+ ${partSelector(chatToolCallContract, "label")},
436
+ ${partSelector(chatToolCallContract, "summary")},
437
+ ${partSelector(chatToolCallContract, "status")} {
438
+ grid-column: 2;
439
+ margin-inline-start: 0;
440
+ }
441
+ ${partSelector(chatToolCallContract, "root")}[data-tool-interactive="true"] ${partSelector(chatToolCallContract, "chevron")} {
442
+ inset-block: auto;
443
+ top: calc(
444
+ (
445
+ (${chatTokens.rowLine} + var(${rowDelta}, 0px)) -
446
+ (${uiTokens.iconSize} + var(${rowDelta}, 0px))
447
+ ) /
448
+ 2
449
+ );
450
+ margin-block: 0;
451
+ }
452
+ ${partSelector(chatToolCallContract, "summary")}::before {
453
+ display: none;
454
+ }
455
+ }
456
+
385
457
  @media (pointer: coarse) {
386
458
  ${partSelector(chatProcessContract, "summary")},
387
459
  ${partSelector(chatToolCallContract, "root")}[data-tool-interactive="true"] > ${partSelector(chatToolCallContract, "header")} {
@@ -0,0 +1 @@
1
+ export declare const chatTaskStyles: import("meowcss/meowjsx").CSSFragment;
@@ -0,0 +1,87 @@
1
+ import { css, partSelector } from "meowcss/meowjsx";
2
+ import { chatTaskContract } from "../../chat/task.js";
3
+ import { uiTokens } from "../tokens.js";
4
+ const part = (name) => partSelector(chatTaskContract, name);
5
+ export const chatTaskStyles = css `
6
+ ${part("root")} {
7
+ display: grid;
8
+ grid-template-columns: minmax(0, 1fr);
9
+ align-content: start;
10
+ gap: ${uiTokens.spaceGroup};
11
+ min-width: 0;
12
+ max-width: 100%;
13
+ color: ${uiTokens.foreground};
14
+ font: ${uiTokens.fontBody}/${uiTokens.leading} ${uiTokens.font};
15
+ overflow-wrap: anywhere;
16
+ }
17
+ ${part("header")} {
18
+ display: flex;
19
+ flex-wrap: wrap;
20
+ align-items: baseline;
21
+ gap: ${uiTokens.spaceGroup} ${uiTokens.spaceSection};
22
+ min-width: 0;
23
+ }
24
+ ${part("title")} {
25
+ flex: 1 1 14rem;
26
+ min-width: 0;
27
+ font-weight: 600;
28
+ }
29
+ ${part("status")} {
30
+ display: inline-flex;
31
+ align-items: baseline;
32
+ gap: ${uiTokens.spaceGroup};
33
+ min-width: 0;
34
+ max-width: 100%;
35
+ color: ${uiTokens.mutedForeground};
36
+ font-size: ${uiTokens.fontCaption};
37
+ }
38
+ ${part("status")} > :first-child {
39
+ flex: 0 0 auto;
40
+ }
41
+ ${part("description")}, ${part("execution")}, ${part("reply")} {
42
+ min-width: 0;
43
+ margin: 0;
44
+ white-space: pre-wrap;
45
+ color: ${uiTokens.mutedForeground};
46
+ }
47
+ ${part("progress")} {
48
+ display: grid;
49
+ gap: ${uiTokens.spaceGroup};
50
+ min-width: 0;
51
+ color: ${uiTokens.mutedForeground};
52
+ font-size: ${uiTokens.fontCaption};
53
+ }
54
+ ${part("progressBar")} {
55
+ display: block;
56
+ box-sizing: border-box;
57
+ width: 100%;
58
+ min-width: 0;
59
+ height: ${uiTokens.spaceGroup};
60
+ accent-color: ${uiTokens.info};
61
+ }
62
+ ${part("body")} {
63
+ display: grid;
64
+ align-content: start;
65
+ gap: ${uiTokens.spaceSection};
66
+ box-sizing: border-box;
67
+ min-width: 0;
68
+ padding-inline-start: ${uiTokens.spaceSection};
69
+ border-inline-start: 1px solid ${uiTokens.borderSoft};
70
+ }
71
+ ${part("body")} > :first-child {
72
+ margin-block-start: 0;
73
+ }
74
+ ${part("body")} > :last-child {
75
+ margin-block-end: 0;
76
+ }
77
+ ${part("footer")} {
78
+ display: flex;
79
+ flex-wrap: wrap;
80
+ align-items: baseline;
81
+ gap: ${uiTokens.spaceGroup};
82
+ min-width: 0;
83
+ }
84
+ ${part("root")} > [hidden], ${part("body")}:empty, ${part("footer")}:empty {
85
+ display: none;
86
+ }
87
+ `;
@@ -0,0 +1 @@
1
+ export declare const actionRailStyles: import("meowcss/meowjsx").CSSFragment;
@@ -0,0 +1,47 @@
1
+ import { css, partSelector } from "meowcss/meowjsx";
2
+ import { uiTokens } from "../tokens.js";
3
+ import { actionRailContract } from "../../components/action-rail.js";
4
+ import { buttonContract } from "../../components/button.js";
5
+ export const actionRailStyles = css `
6
+ ${partSelector(actionRailContract, "root")} {
7
+ display: flex;
8
+ align-items: center;
9
+ gap: ${uiTokens.spaceGroup};
10
+ min-width: 0;
11
+ }
12
+ ${partSelector(actionRailContract, "leading")} {
13
+ display: flex;
14
+ align-items: center;
15
+ gap: 6px;
16
+ flex: 0 1 auto;
17
+ flex-wrap: wrap;
18
+ min-width: min-content;
19
+ }
20
+ ${partSelector(actionRailContract, "trailing")} {
21
+ display: flex;
22
+ align-items: center;
23
+ justify-content: flex-end;
24
+ flex: 1 1 auto;
25
+ flex-wrap: wrap;
26
+ gap: 6px;
27
+ min-width: min-content;
28
+ }
29
+ :is(${partSelector(actionRailContract, "leading")}, ${partSelector(actionRailContract, "trailing")}) > ${partSelector(buttonContract, "root")} {
30
+ min-width: 0;
31
+ max-width: 100%;
32
+ white-space: normal;
33
+ overflow-wrap: anywhere;
34
+ }
35
+ ${partSelector(actionRailContract, "submit")} {
36
+ display: flex;
37
+ align-items: center;
38
+ flex: none;
39
+ }
40
+
41
+ @media (pointer: coarse) {
42
+ ${partSelector(actionRailContract, "root")} button {
43
+ min-width: 44px;
44
+ min-height: 44px;
45
+ }
46
+ }
47
+ `;
@@ -1,6 +1,6 @@
1
1
  import { css, partSelector } from "meowcss/meowjsx";
2
2
  import { alertTokens, uiTokens } from "../tokens.js";
3
- import { alertContract } from "../../components/alert.js";
3
+ import { alertContract, alertOptions } from "../../components/alert.js";
4
4
  export const alertStyles = css `
5
5
  ${partSelector(alertContract, "root")} {
6
6
  display: grid;
@@ -25,4 +25,45 @@ export const alertStyles = css `
25
25
  flex-wrap: wrap;
26
26
  gap: ${uiTokens.spaceGroup};
27
27
  }
28
+
29
+ /* A page notice is one compact line with an optional end action; the block
30
+ alert keeps the title/body/action stack for outcomes that need reading. */
31
+ ${partSelector(alertContract, "root")}[${alertOptions.attribute("layout")}="bar"] {
32
+ display: flex;
33
+ align-items: center;
34
+ gap: ${uiTokens.spaceGroup};
35
+ min-height: 36px;
36
+ padding: 6px 8px 6px 12px;
37
+ border-radius: ${uiTokens.radiusSmall};
38
+ font-size: 13px;
39
+ line-height: 20px;
40
+ }
41
+ ${partSelector(alertContract, "root")}[${alertOptions.attribute("layout")}="bar"]::before {
42
+ content: "";
43
+ width: 8px;
44
+ height: 8px;
45
+ flex: none;
46
+ border-radius: 50%;
47
+ background: ${alertTokens.accent};
48
+ }
49
+ ${partSelector(alertContract, "root")}[${alertOptions.attribute("layout")}="bar"] ${partSelector(alertContract, "title")} {
50
+ flex: none;
51
+ }
52
+ ${partSelector(alertContract, "root")}[${alertOptions.attribute("layout")}="bar"] ${partSelector(alertContract, "body")} {
53
+ flex: 1;
54
+ min-width: 0;
55
+ line-height: 20px;
56
+ }
57
+ ${partSelector(alertContract, "root")}[${alertOptions.attribute("layout")}="bar"] ${partSelector(alertContract, "actions")} {
58
+ flex: none;
59
+ margin-left: auto;
60
+ flex-wrap: nowrap;
61
+ }
62
+
63
+ @media (pointer: coarse) {
64
+ ${partSelector(alertContract, "root")}[${alertOptions.attribute("layout")}="bar"] ${partSelector(alertContract, "actions")} > * {
65
+ min-width: 44px;
66
+ min-height: 44px;
67
+ }
68
+ }
28
69
  `;
@@ -0,0 +1 @@
1
+ export declare const appBarStyles: import("meowcss/meowjsx").CSSFragment;