@bitbaum/chatkit 0.12.1 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +48 -1
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +1 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/markdown.d.ts +1 -0
  7. package/dist/markdown.d.ts.map +1 -1
  8. package/dist/markdown.js +36 -1
  9. package/dist/markdown.js.map +1 -1
  10. package/dist/react/AnswerActions.d.ts +15 -1
  11. package/dist/react/AnswerActions.d.ts.map +1 -1
  12. package/dist/react/AnswerActions.js +44 -4
  13. package/dist/react/AnswerActions.js.map +1 -1
  14. package/dist/react/Markdown.d.ts +3 -0
  15. package/dist/react/Markdown.d.ts.map +1 -1
  16. package/dist/react/Markdown.js +13 -5
  17. package/dist/react/Markdown.js.map +1 -1
  18. package/dist/react/RichBlock.d.ts.map +1 -1
  19. package/dist/react/RichBlock.js +3 -0
  20. package/dist/react/RichBlock.js.map +1 -1
  21. package/dist/react/Thread.d.ts +45 -9
  22. package/dist/react/Thread.d.ts.map +1 -1
  23. package/dist/react/Thread.js +42 -13
  24. package/dist/react/Thread.js.map +1 -1
  25. package/dist/react/icons.d.ts +7 -0
  26. package/dist/react/icons.d.ts.map +1 -1
  27. package/dist/react/icons.js +61 -0
  28. package/dist/react/icons.js.map +1 -1
  29. package/dist/react/index.d.ts +2 -2
  30. package/dist/react/index.d.ts.map +1 -1
  31. package/dist/react/index.js +1 -1
  32. package/dist/react/index.js.map +1 -1
  33. package/dist/review.d.ts +72 -0
  34. package/dist/review.d.ts.map +1 -0
  35. package/dist/review.js +103 -0
  36. package/dist/review.js.map +1 -0
  37. package/dist/rich.d.ts +31 -0
  38. package/dist/rich.d.ts.map +1 -1
  39. package/dist/rich.js +42 -1
  40. package/dist/rich.js.map +1 -1
  41. package/package.json +1 -1
  42. package/styles.css +275 -15
package/dist/rich.d.ts CHANGED
@@ -38,7 +38,38 @@ export type RichBlock = {
38
38
  reply: string;
39
39
  }[];
40
40
  submit: string;
41
+ } | {
42
+ /**
43
+ * A layered figure, the way the ChatGPT app draws an architecture or a
44
+ * flow: full-width boxes stacked top to bottom, a row of tiles where one
45
+ * layer has several parts, an arrow between layers with the words that
46
+ * cross it, and a caption that says what the figure claims.
47
+ */
48
+ type: "stack";
49
+ title: string;
50
+ layers: StackLayer[];
51
+ caption?: string;
52
+ };
53
+ export type StackNode = {
54
+ /** A small uppercase line above the label ("USER", "LOKI"). */
55
+ kicker?: string;
56
+ label: string;
57
+ detail?: string;
58
+ /** "accent" tints the box with the product's accent; the default is neutral. */
59
+ tone?: "neutral" | "accent";
60
+ /** One of STACK_ICONS, drawn above the label on a tile. */
61
+ icon?: StackIcon;
62
+ };
63
+ export type StackLayer = {
64
+ nodes: StackNode[];
65
+ /** The words on the arrow DOWN to the next layer ("Offers, payments"). */
66
+ link?: string;
67
+ /** The arrow runs both ways. */
68
+ both?: boolean;
41
69
  };
70
+ /** The icons a stack tile may carry — a closed set, so a name is never markup. */
71
+ export declare const STACK_ICONS: readonly ["agent", "people", "robot", "person", "building", "money", "document", "code", "check", "globe", "wrench", "box", "chat", "flag"];
72
+ export type StackIcon = (typeof STACK_ICONS)[number];
42
73
  /** Web images or same-origin assets only; no embedded markup or protocol-relative URLs. */
43
74
  export declare function safeImageSrc(value: unknown): string | null;
44
75
  /** Invalid or oversized blocks are rejected without crashing the answer. */
@@ -1 +1 @@
1
- {"version":3,"file":"rich.d.ts","sourceRoot":"","sources":["../src/rich.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,MAAM,MAAM,SAAS,GACjB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GACjF;IA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AA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gFAAgF;IAChF,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC5B,2DAA2D;IAC3D,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AACF,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AACF,kFAAkF;AAClF,eAAO,MAAM,WAAW,6IAed,CAAC;AACX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AASrD,2FAA2F;AAC3F,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAY1D;AAED,4EAA4E;AAC5E,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CA+F5D;AAED,eAAO,MAAM,wBAAwB,QAWzB,CAAC;AAEb,+EAA+E;AAC/E,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CA6BnD"}
package/dist/rich.js CHANGED
@@ -1,3 +1,20 @@
1
+ /** The icons a stack tile may carry — a closed set, so a name is never markup. */
2
+ export const STACK_ICONS = [
3
+ "agent",
4
+ "people",
5
+ "robot",
6
+ "person",
7
+ "building",
8
+ "money",
9
+ "document",
10
+ "code",
11
+ "check",
12
+ "globe",
13
+ "wrench",
14
+ "box",
15
+ "chat",
16
+ "flag",
17
+ ];
1
18
  const record = (v) => !!v && typeof v === "object" && !Array.isArray(v);
2
19
  const str = (v, max = 2000) => typeof v === "string" && !!v.trim() && v.length <= max;
3
20
  const list = (v, max) => Array.isArray(v) && v.length > 0 && v.length <= max;
@@ -65,6 +82,23 @@ export function parseRichBlock(raw) {
65
82
  return null;
66
83
  return b;
67
84
  }
85
+ case "stack": {
86
+ const icons = new Set(STACK_ICONS);
87
+ if (!list(b.layers, 8) ||
88
+ !b.layers.every((l) => record(l) &&
89
+ list(l.nodes, 4) &&
90
+ l.nodes.every((n) => record(n) &&
91
+ str(n.label, 120) &&
92
+ (n.kicker === undefined || str(n.kicker, 40)) &&
93
+ (n.detail === undefined || str(n.detail, 300)) &&
94
+ (n.tone === undefined || n.tone === "neutral" || n.tone === "accent") &&
95
+ (n.icon === undefined || (typeof n.icon === "string" && icons.has(n.icon)))) &&
96
+ (l.link === undefined || str(l.link, 120)) &&
97
+ (l.both === undefined || typeof l.both === "boolean")) ||
98
+ (b.caption !== undefined && !str(b.caption, 300)))
99
+ return null;
100
+ return b;
101
+ }
68
102
  case "choices":
69
103
  if (!str(b.submit, 80) ||
70
104
  !list(b.options, 6) ||
@@ -82,9 +116,10 @@ export const RICH_ANSWERS_INSTRUCTION = [
82
116
  '{"type":"audio","title":"Song sample","src":"/provided-sample.wav","creator":"Creator name","caption":"What to listen for"}',
83
117
  '{"type":"gallery","title":"Reference photos","images":[{"src":"/provided-image.jpg","alt":"Describe the image","caption":"What to notice"}]}',
84
118
  '{"type":"diagram","title":"How it connects","nodes":[{"id":"a","label":"Input","detail":"Optional explanation"},{"id":"b","label":"Result"}],"edges":[{"from":"a","to":"b","label":"leads to"}]}',
119
+ '{"type":"stack","title":"The complete architecture","layers":[{"nodes":[{"kicker":"USER","label":"Build this","detail":"One conversation, one goal"}],"link":"the goal"},{"nodes":[{"kicker":"CONTROL PLANE","label":"Plan · Dispatch · Verify","tone":"accent"}],"link":"work orders","both":true},{"nodes":[{"icon":"agent","label":"AI agents","detail":"Code, research"},{"icon":"people","label":"People","detail":"Specialists"},{"icon":"robot","label":"Robots","detail":"Move, inspect"}]}],"caption":"Proposed logical architecture — not a claim that every connection exists today."}',
85
120
  '{"type":"callout","title":"Recommendation","body":"The useful takeaway."}',
86
121
  '{"type":"choices","title":"What would you like next?","options":[{"label":"Explain the first option","reply":"Explain the first option"},{"label":"Compare the alternatives","reply":"Compare the alternatives"}],"submit":"Continue"}',
87
- "Use at most 6 images, 8 diagram nodes, 16 edges, or 6 choices per block. Translate titles, labels and submit into the reader's language. A choice sends its reply as a normal message; it never performs an action directly. Audio uses explicit playback, never autoplay. Include audio only for URLs actually provided by a person, context or a completed tool result; a track title or a planned generation is not a playable file. Preserve creator attribution and distinguish previews, generated drafts and finished recordings. Never invent media URLs, numbers, sources, tool results or product capabilities. Use only image URLs provided by the person, context or tools; otherwise use a diagram or plain text. Always explain the takeaway in prose too. No HTML, scripts, raw SVG, or decorative images. Preserve domain-specific evidence and authority rules. Put suggested replies last, outside chat_ui blocks.",
122
+ "Use a stack for an architecture, a pipeline or layers of responsibility (top to bottom, at most 8 layers of at most 4 tiles; icons only from: agent, people, robot, person, building, money, document, code, check, globe, wrench, box, chat, flag); use a diagram for an arbitrary graph. When you lay out a few approaches to choose from, write them as a numbered list whose items open with a bold name, and mark the one you recommend with [Recommended] right after the name. Use at most 6 images, 8 diagram nodes, 16 edges, or 6 choices per block. Translate titles, labels and submit into the reader's language. A choice sends its reply as a normal message; it never performs an action directly. Audio uses explicit playback, never autoplay. Include audio only for URLs actually provided by a person, context or a completed tool result; a track title or a planned generation is not a playable file. Preserve creator attribution and distinguish previews, generated drafts and finished recordings. Never invent media URLs, numbers, sources, tool results or product capabilities. Use only image URLs provided by the person, context or tools; otherwise use a diagram or plain text. Always explain the takeaway in prose too. No HTML, scripts, raw SVG, or decorative images. Preserve domain-specific evidence and authority rules. Put suggested replies last, outside chat_ui blocks.",
88
123
  ].join("\n");
89
124
  /** Copy, share and voice keep the content of a visual, never its wire JSON. */
90
125
  export function richAnswerText(text) {
@@ -101,6 +136,12 @@ export function richAnswerText(text) {
101
136
  return `${b.title}\n${b.images.map((i) => `${i.alt}${i.caption ? ` — ${i.caption}` : ""}\n${i.src}`).join("\n")}`;
102
137
  case "choices":
103
138
  return `${b.title}\n${b.options.map((o) => `- ${o.label}`).join("\n")}`;
139
+ case "stack":
140
+ return `${b.title}\n${b.layers
141
+ .map((l) => l.nodes
142
+ .map((n) => `${n.kicker ? `${n.kicker}: ` : ""}${n.label}${n.detail ? ` — ${n.detail}` : ""}`)
143
+ .join(" · ") + (l.link ? `\n${l.both ? "⇅" : "↓"} ${l.link}` : ""))
144
+ .join("\n")}${b.caption ? `\n${b.caption}` : ""}`;
104
145
  case "diagram":
105
146
  return `${b.title}\n${b.nodes.map((n) => `${n.label}${n.detail ? `: ${n.detail}` : ""}`).join("\n")}\n${b.edges.map((e) => `${b.nodes.find((n) => n.id === e.from).label} → ${b.nodes.find((n) => n.id === e.to).label}${e.label ? ` (${e.label})` : ""}`).join("\n")}`;
106
147
  }
package/dist/rich.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"rich.js","sourceRoot":"","sources":["../src/rich.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,GAAG,CAAC,CAAU,EAAgC,EAAE,CAC1D,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AACpD,MAAM,GAAG,GAAG,CAAC,CAAU,EAAE,GAAG,GAAG,IAAI,EAAe,EAAE,CAClD,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,MAAM,IAAI,GAAG,CAAC;AACzD,MAAM,IAAI,GAAG,CAAC,CAAU,EAAE,GAAW,EAAkB,EAAE,CACvD,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,IAAI,GAAG,CAAC;AAEtD,2FAA2F;AAC3F,MAAM,UAAU,YAAY,CAAC,KAAc;IACzC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,IAA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EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9Q,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitbaum/chatkit",
3
- "version": "0.12.1",
3
+ "version": "0.14.0",
4
4
  "description": "One chat for every product: a composer with a microphone that always works, a thread that does not fight the reader, messages with copy and retry, and LLM markdown \u2014 the fleet's chat standard as a package.",
5
5
  "license": "MIT",
6
6
  "author": "Cato",
package/styles.css CHANGED
@@ -519,7 +519,9 @@
519
519
  display: inline-flex;
520
520
  align-items: center;
521
521
  gap: 0.375rem;
522
+ min-width: var(--ck-target);
522
523
  min-height: var(--ck-target);
524
+ justify-content: center;
523
525
  padding: 0 0.5rem;
524
526
  white-space: nowrap;
525
527
  border: 0;
@@ -807,17 +809,25 @@
807
809
  .ck-md > .ck-md-h + * {
808
810
  margin-top: 0.5em;
809
811
  }
812
+ /* Headings with air above them, large enough to be the signposts of a long
813
+ answer — the ChatGPT app's "4. The complete architecture" is a heading you
814
+ can find again while scrolling, not a bold line. */
810
815
  .ck-md > * + .ck-md-h {
811
- margin-top: 1.25em;
816
+ margin-top: 1.75em;
812
817
  }
813
818
  .ck-md-h1 {
814
- font-size: 1.375em;
819
+ font-size: 1.5em;
820
+ letter-spacing: -0.01em;
815
821
  }
816
822
  .ck-md-h2 {
817
- font-size: 1.1875em;
823
+ font-size: 1.375em;
824
+ letter-spacing: -0.01em;
818
825
  }
819
826
  .ck-md-h3 {
820
- font-size: 1.0625em;
827
+ font-size: 1.125em;
828
+ }
829
+ .ck-md > p + p {
830
+ margin-top: 0.9em;
821
831
  }
822
832
  .ck-md ul ul,
823
833
  .ck-md ol ul {
@@ -853,30 +863,50 @@
853
863
  .ck-cards {
854
864
  display: flex;
855
865
  flex-direction: column;
856
- gap: 0.875em;
857
866
  margin: 0;
858
867
  padding: 0;
859
868
  list-style: none;
860
869
  }
870
+ /* Each option is its own card: a hairline between them, room around each,
871
+ the badge the size of a tile and the name a size up — the ChatGPT app's
872
+ option list, which reads as three things to choose from, not a list. */
861
873
  .ck-card {
862
874
  display: grid;
863
- grid-template-columns: 2.5em minmax(0, 1fr);
864
- gap: 0.75em;
875
+ grid-template-columns: 2.75em minmax(0, 1fr);
876
+ gap: 0.875em;
865
877
  align-items: start;
878
+ padding: 1em 0;
879
+ }
880
+ .ck-card + .ck-card {
881
+ border-top: 1px solid var(--ck-line);
882
+ }
883
+ .ck-cards > .ck-card:first-child {
884
+ padding-top: 0.25em;
866
885
  }
867
886
  .ck-card-badge {
868
887
  display: flex;
869
888
  align-items: center;
870
889
  justify-content: center;
871
- width: 2.5em;
872
- height: 2.5em;
890
+ width: 2.75em;
891
+ height: 2.75em;
873
892
  border-radius: 0.75em;
874
893
  background: var(--ck-raised);
875
- color: var(--ck-fg-2);
894
+ color: var(--ck-fg);
876
895
  font-size: 1em;
877
896
  font-weight: 600;
878
897
  font-variant-numeric: tabular-nums;
879
898
  }
899
+ .ck-card-tag {
900
+ display: inline-block;
901
+ margin-top: 0.4em;
902
+ padding: 0.15em 0.6em;
903
+ border-radius: 999px;
904
+ background: color-mix(in srgb, var(--ck-accent) 14%, transparent);
905
+ color: var(--ck-fg);
906
+ font-size: 0.8125em;
907
+ font-weight: 550;
908
+ line-height: 1.5;
909
+ }
880
910
  .ck-cards:not(.ck-cards-numbered) .ck-card-badge:not(.ck-card-icon) {
881
911
  font-size: 1.5em;
882
912
  line-height: 1;
@@ -889,11 +919,13 @@
889
919
  padding-top: 0.2em;
890
920
  }
891
921
  .ck-card-title {
922
+ font-size: 1.125em;
892
923
  font-weight: 650;
924
+ line-height: 1.3;
893
925
  }
894
926
  .ck-card-text {
895
- margin-top: 0.25em;
896
- color: var(--ck-fg-2);
927
+ margin-top: 0.4em;
928
+ color: var(--ck-fg);
897
929
  }
898
930
  .ck-card-body > ul {
899
931
  margin-top: 0.375em;
@@ -1004,12 +1036,44 @@ a.ck-source:hover {
1004
1036
  text-decoration-color: var(--ck-accent);
1005
1037
  text-underline-offset: 0.18em;
1006
1038
  }
1007
- .ck-cite {
1039
+ .ck-link-out {
1040
+ text-decoration-style: dotted;
1041
+ }
1042
+ .ck-link-arrow {
1008
1043
  margin-left: 0.15em;
1009
- color: var(--ck-muted);
1010
- font-size: 0.7em;
1044
+ font-size: 0.8em;
1045
+ color: var(--ck-fg-3);
1046
+ }
1047
+ /* The citation as a chip after the sentence: the first source's name and how
1048
+ many more stand behind it ("NVIDIA De… +3"). */
1049
+ .ck-cite {
1050
+ display: inline-flex;
1051
+ align-items: center;
1052
+ gap: 0.3em;
1053
+ max-width: 11em;
1054
+ margin-left: 0.3em;
1055
+ padding: 0.1em 0.55em;
1056
+ border-radius: 999px;
1057
+ background: var(--ck-raised);
1058
+ color: var(--ck-fg-2);
1059
+ font-size: 0.8125em;
1060
+ line-height: 1.5;
1061
+ text-decoration: none;
1062
+ vertical-align: 0.1em;
1011
1063
  cursor: help;
1012
1064
  }
1065
+ a.ck-cite:hover {
1066
+ color: var(--ck-fg);
1067
+ }
1068
+ .ck-cite-label {
1069
+ overflow: hidden;
1070
+ text-overflow: ellipsis;
1071
+ white-space: nowrap;
1072
+ }
1073
+ .ck-cite-more {
1074
+ flex: none;
1075
+ color: var(--ck-fg-3);
1076
+ }
1013
1077
 
1014
1078
  /* starters */
1015
1079
  .ck-starters {
@@ -1539,6 +1603,202 @@ a.ck-source-row:hover .ck-source-title {
1539
1603
  opacity: 0.45;
1540
1604
  cursor: default;
1541
1605
  }
1606
+ /* A layered figure: boxes stacked top to bottom in one bordered card, a
1607
+ row of tiles where a layer has parts, and the words that cross each arrow. */
1608
+ .ck-stack {
1609
+ padding: 1rem;
1610
+ border: 1px solid var(--ck-line);
1611
+ border-radius: var(--ck-radius);
1612
+ background: var(--ck-bg);
1613
+ }
1614
+ .ck-stack-layers {
1615
+ display: flex;
1616
+ flex-direction: column;
1617
+ }
1618
+ .ck-stack-row {
1619
+ display: grid;
1620
+ gap: 0.625rem;
1621
+ }
1622
+ .ck-stack-node {
1623
+ display: flex;
1624
+ flex-direction: column;
1625
+ align-items: center;
1626
+ gap: 0.25rem;
1627
+ min-width: 0;
1628
+ padding: 1rem 0.75rem;
1629
+ border: 1px solid var(--ck-line);
1630
+ border-radius: calc(var(--ck-radius) * 0.75);
1631
+ background: var(--ck-raised);
1632
+ text-align: center;
1633
+ overflow-wrap: anywhere;
1634
+ }
1635
+ .ck-stack-accent {
1636
+ border-color: color-mix(in srgb, var(--ck-accent) 35%, var(--ck-line));
1637
+ background: color-mix(in srgb, var(--ck-accent) 9%, var(--ck-bg));
1638
+ }
1639
+ .ck-stack-icon {
1640
+ width: 1.5em;
1641
+ height: 1.5em;
1642
+ margin-bottom: 0.25rem;
1643
+ color: var(--ck-fg);
1644
+ }
1645
+ .ck-stack-kicker {
1646
+ color: var(--ck-fg-2);
1647
+ font-size: 0.75em;
1648
+ font-weight: 600;
1649
+ letter-spacing: 0.08em;
1650
+ text-transform: uppercase;
1651
+ }
1652
+ .ck-stack-label {
1653
+ font-size: 1.0625em;
1654
+ font-weight: 650;
1655
+ line-height: 1.3;
1656
+ }
1657
+ /* Tiles in a row share the width: tighter padding and smaller words, so
1658
+ "Manufacture, move, inspect" fits three across on a 390px phone. */
1659
+ .ck-stack-row:not([style*="repeat(1,"]) .ck-stack-node {
1660
+ padding: 0.875rem 0.5rem;
1661
+ }
1662
+ .ck-stack-row:not([style*="repeat(1,"]) .ck-stack-label {
1663
+ font-size: 1em;
1664
+ }
1665
+ .ck-stack-row:not([style*="repeat(1,"]) .ck-stack-detail {
1666
+ font-size: 0.8125em;
1667
+ }
1668
+ .ck-stack-detail {
1669
+ color: var(--ck-fg-2);
1670
+ font-size: 0.875em;
1671
+ line-height: 1.4;
1672
+ }
1673
+ .ck-stack-link {
1674
+ display: flex;
1675
+ flex-direction: column;
1676
+ align-items: center;
1677
+ gap: 0.125rem;
1678
+ padding: 0.5rem 0;
1679
+ color: var(--ck-fg-2);
1680
+ font-size: 0.875em;
1681
+ text-align: center;
1682
+ }
1683
+ .ck-stack-arrow {
1684
+ font-size: 1.25em;
1685
+ line-height: 1;
1686
+ color: var(--ck-fg-3);
1687
+ }
1688
+ .ck-stack-caption {
1689
+ margin: 0.875rem 0 0;
1690
+ color: var(--ck-fg-2);
1691
+ font-size: 0.875em;
1692
+ text-align: center;
1693
+ }
1694
+
1695
+ /* Thumbs under an answer, and the sheet that asks why. */
1696
+ .ck-action-on {
1697
+ color: var(--ck-fg);
1698
+ background: var(--ck-raised);
1699
+ }
1700
+ .ck-feedback-thanks {
1701
+ align-self: center;
1702
+ color: var(--ck-fg-2);
1703
+ font-size: 0.875em;
1704
+ }
1705
+ .ck-feedback {
1706
+ display: flex;
1707
+ flex-direction: column;
1708
+ gap: 0.5rem;
1709
+ }
1710
+ .ck-feedback-reason {
1711
+ min-height: var(--ck-target);
1712
+ padding: 0.5rem 0.875rem;
1713
+ border: 1px solid var(--ck-line);
1714
+ border-radius: calc(var(--ck-radius) * 0.75);
1715
+ background: var(--ck-bg);
1716
+ color: var(--ck-fg);
1717
+ font: inherit;
1718
+ text-align: left;
1719
+ cursor: pointer;
1720
+ }
1721
+ .ck-feedback-reason-on {
1722
+ border-color: var(--ck-fg);
1723
+ background: var(--ck-raised);
1724
+ }
1725
+ .ck-feedback-more {
1726
+ min-height: var(--ck-target);
1727
+ padding: 0.625rem 0.875rem;
1728
+ border: 1px solid var(--ck-line);
1729
+ border-radius: calc(var(--ck-radius) * 0.75);
1730
+ background: var(--ck-bg);
1731
+ color: var(--ck-fg);
1732
+ font: inherit;
1733
+ font-size: max(16px, var(--ck-text));
1734
+ resize: vertical;
1735
+ }
1736
+ .ck-feedback-send {
1737
+ min-height: var(--ck-target);
1738
+ padding: 0 1rem;
1739
+ border: 0;
1740
+ border-radius: 999px;
1741
+ background: var(--ck-accent);
1742
+ color: var(--ck-on-accent);
1743
+ font: inherit;
1744
+ font-weight: 600;
1745
+ cursor: pointer;
1746
+ }
1747
+
1748
+ /* "Thought for 3m 38s ›": one quiet line above the answer, opening to the
1749
+ steps; open and ticking while the turn runs. */
1750
+ .ck-thinking {
1751
+ margin: 0 0 0.75em;
1752
+ color: var(--ck-fg-2);
1753
+ font-size: 0.9375em;
1754
+ }
1755
+ .ck-thinking-title {
1756
+ display: inline-flex;
1757
+ align-items: center;
1758
+ gap: 0.35em;
1759
+ min-height: 2rem;
1760
+ cursor: default;
1761
+ list-style: none;
1762
+ }
1763
+ details.ck-thinking > summary {
1764
+ cursor: pointer;
1765
+ }
1766
+ details.ck-thinking > summary::-webkit-details-marker {
1767
+ display: none;
1768
+ }
1769
+ details.ck-thinking > summary svg {
1770
+ transition: transform 0.15s ease;
1771
+ }
1772
+ details.ck-thinking[open] > summary svg {
1773
+ transform: rotate(90deg);
1774
+ }
1775
+ .ck-thinking-body {
1776
+ padding: 0.25em 0 0.5em 0.75em;
1777
+ border-left: 2px solid var(--ck-line);
1778
+ }
1779
+ .ck-thinking-body p {
1780
+ margin: 0 0 0.5em;
1781
+ }
1782
+ .ck-thinking-steps {
1783
+ margin: 0;
1784
+ padding: 0;
1785
+ list-style: none;
1786
+ }
1787
+ .ck-thinking-steps li {
1788
+ display: flex;
1789
+ flex-direction: column;
1790
+ padding: 0.2em 0;
1791
+ }
1792
+ .ck-thinking-steps small {
1793
+ color: var(--ck-fg-3);
1794
+ }
1795
+ .ck-thinking-now {
1796
+ color: var(--ck-fg);
1797
+ }
1798
+ .ck-thinking-live .ck-dots {
1799
+ margin-right: 0.25em;
1800
+ }
1801
+
1542
1802
  .ck-rich button:focus-visible,
1543
1803
  .ck-rich input:focus-visible {
1544
1804
  outline: 2px solid var(--ck-fg);