@k2b/ui 0.50.0 → 0.51.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 (294) hide show
  1. package/dist/base.css +32 -1
  2. package/dist/browser/actions/Button.js.map +1 -1
  3. package/dist/browser/actions/CommandList.js +861 -0
  4. package/dist/browser/actions/CommandList.js.map +1 -0
  5. package/dist/browser/actions/CommandMenu.js +237 -0
  6. package/dist/browser/actions/CommandMenu.js.map +1 -0
  7. package/dist/browser/actions/Dropdown.js +43 -10
  8. package/dist/browser/actions/Dropdown.js.map +1 -1
  9. package/dist/browser/actions/command-dock.js +47 -0
  10. package/dist/browser/actions/command-dock.js.map +1 -0
  11. package/dist/browser/actions/command-items.js +84 -0
  12. package/dist/browser/actions/command-items.js.map +1 -0
  13. package/dist/browser/actions/command-messages.js +42 -0
  14. package/dist/browser/actions/command-messages.js.map +1 -0
  15. package/dist/browser/actions/index.js +1 -0
  16. package/dist/browser/actions/index.js.map +1 -1
  17. package/dist/browser/charts/core/area.js +3 -5
  18. package/dist/browser/charts/core/area.js.map +1 -1
  19. package/dist/browser/charts/core/calendar.js +1 -1
  20. package/dist/browser/charts/core/calendar.js.map +1 -1
  21. package/dist/browser/charts/core/chart-messages.js +17 -0
  22. package/dist/browser/charts/core/chart-messages.js.map +1 -0
  23. package/dist/browser/charts/core/hbar-layout.js +118 -0
  24. package/dist/browser/charts/core/hbar-layout.js.map +1 -0
  25. package/dist/browser/charts/core/hbar.js +39 -0
  26. package/dist/browser/charts/core/hbar.js.map +1 -0
  27. package/dist/browser/charts/core/index.js +7 -2
  28. package/dist/browser/charts/core/index.js.map +1 -1
  29. package/dist/browser/charts/core/map.js +116 -0
  30. package/dist/browser/charts/core/map.js.map +1 -0
  31. package/dist/browser/charts/core/registry.js +22 -15
  32. package/dist/browser/charts/core/registry.js.map +1 -1
  33. package/dist/browser/charts/core/render-size.js +13 -0
  34. package/dist/browser/charts/core/render-size.js.map +1 -0
  35. package/dist/browser/charts/core/render.js +20 -10
  36. package/dist/browser/charts/core/render.js.map +1 -1
  37. package/dist/browser/charts/core/snapshot.js +3 -3
  38. package/dist/browser/charts/core/snapshot.js.map +1 -1
  39. package/dist/browser/charts/core/svg-renderers.js +2406 -0
  40. package/dist/browser/charts/core/svg-renderers.js.map +1 -0
  41. package/dist/browser/charts/core/svg.js +4 -2525
  42. package/dist/browser/charts/core/svg.js.map +1 -1
  43. package/dist/browser/charts/core/types.js +0 -2
  44. package/dist/browser/charts/core/types.js.map +1 -1
  45. package/dist/browser/charts/core/waterfall.js +162 -0
  46. package/dist/browser/charts/core/waterfall.js.map +1 -0
  47. package/dist/browser/charts/description.js +2 -0
  48. package/dist/browser/charts/description.js.map +1 -0
  49. package/dist/browser/charts.js.map +1 -1
  50. package/dist/browser/content/Chart.js +14 -628
  51. package/dist/browser/content/Chart.js.map +1 -1
  52. package/dist/browser/content/ChartRoot.js +632 -0
  53. package/dist/browser/content/ChartRoot.js.map +1 -0
  54. package/dist/browser/content/ChartSparkline.js +24 -0
  55. package/dist/browser/content/ChartSparkline.js.map +1 -0
  56. package/dist/browser/content/FileView.js +111 -61
  57. package/dist/browser/content/FileView.js.map +1 -1
  58. package/dist/browser/content/Lightbox.js +8 -8
  59. package/dist/browser/content/Lightbox.js.map +1 -1
  60. package/dist/browser/content/MapView.js +30 -28
  61. package/dist/browser/content/MapView.js.map +1 -1
  62. package/dist/browser/content/PdfPreview.js +84 -52
  63. package/dist/browser/content/PdfPreview.js.map +1 -1
  64. package/dist/browser/content/PdfViewer.js +588 -0
  65. package/dist/browser/content/PdfViewer.js.map +1 -0
  66. package/dist/browser/content/chart-bar.js +246 -16
  67. package/dist/browser/content/chart-bar.js.map +1 -1
  68. package/dist/browser/content/chart-inspection-core.js +22 -21
  69. package/dist/browser/content/chart-inspection-core.js.map +1 -1
  70. package/dist/browser/content/chart-line-gaps.js +1 -1
  71. package/dist/browser/content/chart-line-gaps.js.map +1 -1
  72. package/dist/browser/content/chart-message-catalog.js +10 -0
  73. package/dist/browser/content/chart-message-catalog.js.map +1 -1
  74. package/dist/browser/content/chart-state-timeline.js +1 -1
  75. package/dist/browser/content/chart-state-timeline.js.map +1 -1
  76. package/dist/browser/content/chart-svg.js +2 -1
  77. package/dist/browser/content/chart-svg.js.map +1 -1
  78. package/dist/browser/content/index.js +1 -0
  79. package/dist/browser/content/index.js.map +1 -1
  80. package/dist/browser/content/pdf-document.js +29 -0
  81. package/dist/browser/content/pdf-document.js.map +1 -0
  82. package/dist/browser/content/pdf-limits.js +31 -0
  83. package/dist/browser/content/pdf-limits.js.map +1 -0
  84. package/dist/browser/content/pdf-messages.js +34 -2
  85. package/dist/browser/content/pdf-messages.js.map +1 -1
  86. package/dist/browser/content/pdf-viewer-engine.js +57 -0
  87. package/dist/browser/content/pdf-viewer-worker.js +28 -0
  88. package/dist/browser/inputs/ChoiceInputs.js +94 -51
  89. package/dist/browser/inputs/ChoiceInputs.js.map +1 -1
  90. package/dist/browser/inputs/ChoiceSlider.js +75 -58
  91. package/dist/browser/inputs/ChoiceSlider.js.map +1 -1
  92. package/dist/browser/inputs/DatePicker.js +113 -98
  93. package/dist/browser/inputs/DatePicker.js.map +1 -1
  94. package/dist/browser/inputs/PeriodPicker.js +874 -0
  95. package/dist/browser/inputs/PeriodPicker.js.map +1 -0
  96. package/dist/browser/inputs/index.js +4 -1
  97. package/dist/browser/inputs/index.js.map +1 -1
  98. package/dist/browser/inputs/input-messages.js +8 -2
  99. package/dist/browser/inputs/input-messages.js.map +1 -1
  100. package/dist/browser/inputs/markdown/MarkdownEditor.js +14 -10
  101. package/dist/browser/inputs/markdown/MarkdownEditor.js.map +1 -1
  102. package/dist/browser/inputs/markdown/SlashCommands.js +402 -0
  103. package/dist/browser/inputs/markdown/SlashCommands.js.map +1 -0
  104. package/dist/browser/inputs/period-picker-messages.js +71 -0
  105. package/dist/browser/inputs/period-picker-messages.js.map +1 -0
  106. package/dist/browser/inputs/period.js +263 -0
  107. package/dist/browser/inputs/period.js.map +1 -0
  108. package/dist/browser/layout/DetailPanel.js +147 -120
  109. package/dist/browser/layout/DetailPanel.js.map +1 -1
  110. package/dist/browser/layout/Discussion.js +101 -108
  111. package/dist/browser/layout/Discussion.js.map +1 -1
  112. package/dist/browser/layout/index.js.map +1 -1
  113. package/dist/browser/surfaces/DescriptionList.js +5 -2
  114. package/dist/browser/surfaces/DescriptionList.js.map +1 -1
  115. package/dist/browser/surfaces/StatCell.js +19 -14
  116. package/dist/browser/surfaces/StatCell.js.map +1 -1
  117. package/dist/browser/surfaces/delta-badge.js +16 -2
  118. package/dist/browser/surfaces/delta-badge.js.map +1 -1
  119. package/dist/browser/widgets/DashboardFrame.js +310 -0
  120. package/dist/browser/widgets/DashboardFrame.js.map +1 -0
  121. package/dist/browser/widgets/index.js +1 -0
  122. package/dist/browser/widgets/index.js.map +1 -1
  123. package/dist/licenses/pdfjs-dist.txt +177 -0
  124. package/dist/ssr/actions/Button.js.map +1 -1
  125. package/dist/ssr/actions/CommandList.js +638 -0
  126. package/dist/ssr/actions/CommandList.js.map +1 -0
  127. package/dist/ssr/actions/CommandMenu.js +197 -0
  128. package/dist/ssr/actions/CommandMenu.js.map +1 -0
  129. package/dist/ssr/actions/Dropdown.js +43 -10
  130. package/dist/ssr/actions/Dropdown.js.map +1 -1
  131. package/dist/ssr/actions/command-dock.js +47 -0
  132. package/dist/ssr/actions/command-dock.js.map +1 -0
  133. package/dist/ssr/actions/command-items.js +84 -0
  134. package/dist/ssr/actions/command-items.js.map +1 -0
  135. package/dist/ssr/actions/command-messages.js +42 -0
  136. package/dist/ssr/actions/command-messages.js.map +1 -0
  137. package/dist/ssr/actions/index.js +1 -0
  138. package/dist/ssr/actions/index.js.map +1 -1
  139. package/dist/ssr/charts/core/area.js +3 -5
  140. package/dist/ssr/charts/core/area.js.map +1 -1
  141. package/dist/ssr/charts/core/calendar.js +1 -1
  142. package/dist/ssr/charts/core/calendar.js.map +1 -1
  143. package/dist/ssr/charts/core/chart-messages.js +17 -0
  144. package/dist/ssr/charts/core/chart-messages.js.map +1 -0
  145. package/dist/ssr/charts/core/hbar-layout.js +118 -0
  146. package/dist/ssr/charts/core/hbar-layout.js.map +1 -0
  147. package/dist/ssr/charts/core/hbar.js +39 -0
  148. package/dist/ssr/charts/core/hbar.js.map +1 -0
  149. package/dist/ssr/charts/core/index.js +7 -2
  150. package/dist/ssr/charts/core/index.js.map +1 -1
  151. package/dist/ssr/charts/core/map.js +116 -0
  152. package/dist/ssr/charts/core/map.js.map +1 -0
  153. package/dist/ssr/charts/core/registry.js +22 -15
  154. package/dist/ssr/charts/core/registry.js.map +1 -1
  155. package/dist/ssr/charts/core/render-size.js +13 -0
  156. package/dist/ssr/charts/core/render-size.js.map +1 -0
  157. package/dist/ssr/charts/core/render.js +20 -10
  158. package/dist/ssr/charts/core/render.js.map +1 -1
  159. package/dist/ssr/charts/core/snapshot.js +3 -3
  160. package/dist/ssr/charts/core/snapshot.js.map +1 -1
  161. package/dist/ssr/charts/core/svg-renderers.js +2406 -0
  162. package/dist/ssr/charts/core/svg-renderers.js.map +1 -0
  163. package/dist/ssr/charts/core/svg.js +4 -2525
  164. package/dist/ssr/charts/core/svg.js.map +1 -1
  165. package/dist/ssr/charts/core/types.js +0 -2
  166. package/dist/ssr/charts/core/types.js.map +1 -1
  167. package/dist/ssr/charts/core/waterfall.js +162 -0
  168. package/dist/ssr/charts/core/waterfall.js.map +1 -0
  169. package/dist/ssr/charts/description.js +2 -0
  170. package/dist/ssr/charts/description.js.map +1 -0
  171. package/dist/ssr/charts.js.map +1 -1
  172. package/dist/ssr/content/Chart.js +14 -471
  173. package/dist/ssr/content/Chart.js.map +1 -1
  174. package/dist/ssr/content/ChartRoot.js +475 -0
  175. package/dist/ssr/content/ChartRoot.js.map +1 -0
  176. package/dist/ssr/content/ChartSparkline.js +24 -0
  177. package/dist/ssr/content/ChartSparkline.js.map +1 -0
  178. package/dist/ssr/content/FileView.js +56 -7
  179. package/dist/ssr/content/FileView.js.map +1 -1
  180. package/dist/ssr/content/Lightbox.js +8 -8
  181. package/dist/ssr/content/Lightbox.js.map +1 -1
  182. package/dist/ssr/content/MapView.js +9 -9
  183. package/dist/ssr/content/MapView.js.map +1 -1
  184. package/dist/ssr/content/PdfPreview.js +49 -20
  185. package/dist/ssr/content/PdfPreview.js.map +1 -1
  186. package/dist/ssr/content/PdfViewer.js +484 -0
  187. package/dist/ssr/content/PdfViewer.js.map +1 -0
  188. package/dist/ssr/content/chart-bar.js +246 -16
  189. package/dist/ssr/content/chart-bar.js.map +1 -1
  190. package/dist/ssr/content/chart-inspection-core.js +22 -21
  191. package/dist/ssr/content/chart-inspection-core.js.map +1 -1
  192. package/dist/ssr/content/chart-line-gaps.js +1 -1
  193. package/dist/ssr/content/chart-line-gaps.js.map +1 -1
  194. package/dist/ssr/content/chart-message-catalog.js +10 -0
  195. package/dist/ssr/content/chart-message-catalog.js.map +1 -1
  196. package/dist/ssr/content/chart-state-timeline.js +1 -1
  197. package/dist/ssr/content/chart-state-timeline.js.map +1 -1
  198. package/dist/ssr/content/chart-svg.js +2 -1
  199. package/dist/ssr/content/chart-svg.js.map +1 -1
  200. package/dist/ssr/content/index.js +1 -0
  201. package/dist/ssr/content/index.js.map +1 -1
  202. package/dist/ssr/content/pdf-document.js +29 -0
  203. package/dist/ssr/content/pdf-document.js.map +1 -0
  204. package/dist/ssr/content/pdf-limits.js +31 -0
  205. package/dist/ssr/content/pdf-limits.js.map +1 -0
  206. package/dist/ssr/content/pdf-messages.js +34 -2
  207. package/dist/ssr/content/pdf-messages.js.map +1 -1
  208. package/dist/ssr/inputs/ChoiceInputs.js +49 -12
  209. package/dist/ssr/inputs/ChoiceInputs.js.map +1 -1
  210. package/dist/ssr/inputs/ChoiceSlider.js +17 -12
  211. package/dist/ssr/inputs/ChoiceSlider.js.map +1 -1
  212. package/dist/ssr/inputs/DatePicker.js +14 -9
  213. package/dist/ssr/inputs/DatePicker.js.map +1 -1
  214. package/dist/ssr/inputs/PeriodPicker.js +598 -0
  215. package/dist/ssr/inputs/PeriodPicker.js.map +1 -0
  216. package/dist/ssr/inputs/index.js +4 -1
  217. package/dist/ssr/inputs/index.js.map +1 -1
  218. package/dist/ssr/inputs/input-messages.js +8 -2
  219. package/dist/ssr/inputs/input-messages.js.map +1 -1
  220. package/dist/ssr/inputs/markdown/MarkdownEditor.js +3 -2
  221. package/dist/ssr/inputs/markdown/MarkdownEditor.js.map +1 -1
  222. package/dist/ssr/inputs/markdown/SlashCommands.js +339 -0
  223. package/dist/ssr/inputs/markdown/SlashCommands.js.map +1 -0
  224. package/dist/ssr/inputs/period-picker-messages.js +71 -0
  225. package/dist/ssr/inputs/period-picker-messages.js.map +1 -0
  226. package/dist/ssr/inputs/period.js +263 -0
  227. package/dist/ssr/inputs/period.js.map +1 -0
  228. package/dist/ssr/layout/DetailPanel.js +27 -4
  229. package/dist/ssr/layout/DetailPanel.js.map +1 -1
  230. package/dist/ssr/layout/Discussion.js +16 -2
  231. package/dist/ssr/layout/Discussion.js.map +1 -1
  232. package/dist/ssr/layout/index.js.map +1 -1
  233. package/dist/ssr/surfaces/DescriptionList.js +1 -1
  234. package/dist/ssr/surfaces/DescriptionList.js.map +1 -1
  235. package/dist/ssr/surfaces/StatCell.js +4 -5
  236. package/dist/ssr/surfaces/StatCell.js.map +1 -1
  237. package/dist/ssr/surfaces/delta-badge.js +16 -2
  238. package/dist/ssr/surfaces/delta-badge.js.map +1 -1
  239. package/dist/ssr/widgets/DashboardFrame.js +200 -0
  240. package/dist/ssr/widgets/DashboardFrame.js.map +1 -0
  241. package/dist/ssr/widgets/index.js +1 -0
  242. package/dist/ssr/widgets/index.js.map +1 -1
  243. package/dist/styles.css +1 -1
  244. package/dist/types/actions/Button.d.ts +1 -1
  245. package/dist/types/actions/CommandList.d.ts +120 -0
  246. package/dist/types/actions/CommandMenu.d.ts +39 -0
  247. package/dist/types/actions/Dropdown.d.ts +17 -0
  248. package/dist/types/actions/command-dock.d.ts +8 -0
  249. package/dist/types/actions/command-items.d.ts +134 -0
  250. package/dist/types/actions/command-messages.d.ts +19 -0
  251. package/dist/types/actions/index.d.ts +3 -0
  252. package/dist/types/charts/core/calendar.d.ts +1 -1
  253. package/dist/types/charts/core/chart-messages.d.ts +5 -0
  254. package/dist/types/charts/core/hbar-layout.d.ts +74 -0
  255. package/dist/types/charts/core/hbar.d.ts +13 -0
  256. package/dist/types/charts/core/index.d.ts +7 -2
  257. package/dist/types/charts/core/map.d.ts +3 -0
  258. package/dist/types/charts/core/registry.d.ts +17 -11
  259. package/dist/types/charts/core/render-size.d.ts +7 -0
  260. package/dist/types/charts/core/render.d.ts +1 -4
  261. package/dist/types/charts/core/snapshot.d.ts +2 -2
  262. package/dist/types/charts/core/svg-renderers.d.ts +722 -0
  263. package/dist/types/charts/core/svg.d.ts +4 -698
  264. package/dist/types/charts/core/types.d.ts +1 -12
  265. package/dist/types/charts/core/waterfall.d.ts +68 -0
  266. package/dist/types/charts/description.d.ts +226 -0
  267. package/dist/types/charts.d.ts +1 -0
  268. package/dist/types/content/Chart.d.ts +3 -91
  269. package/dist/types/content/ChartRoot.d.ts +92 -0
  270. package/dist/types/content/ChartSparkline.d.ts +5 -0
  271. package/dist/types/content/PdfViewer.d.ts +32 -0
  272. package/dist/types/content/chart-bar.d.ts +95 -2
  273. package/dist/types/content/index.d.ts +2 -0
  274. package/dist/types/content/pdf-document.d.ts +5 -0
  275. package/dist/types/content/pdf-engine.d.ts +9 -0
  276. package/dist/types/content/pdf-limits.d.ts +43 -0
  277. package/dist/types/content/pdf-messages.d.ts +16 -0
  278. package/dist/types/inputs/ChoiceInputs.d.ts +4 -0
  279. package/dist/types/inputs/ChoiceSlider.d.ts +12 -0
  280. package/dist/types/inputs/DatePicker.d.ts +22 -0
  281. package/dist/types/inputs/PeriodPicker.d.ts +24 -0
  282. package/dist/types/inputs/index.d.ts +8 -2
  283. package/dist/types/inputs/input-messages.d.ts +3 -0
  284. package/dist/types/inputs/markdown/MarkdownEditor.d.ts +5 -0
  285. package/dist/types/inputs/markdown/SlashCommands.d.ts +20 -0
  286. package/dist/types/inputs/period-picker-messages.d.ts +34 -0
  287. package/dist/types/inputs/period.d.ts +134 -0
  288. package/dist/types/layout/DetailPanel.d.ts +12 -0
  289. package/dist/types/layout/index.d.ts +1 -1
  290. package/dist/types/surfaces/DescriptionList.d.ts +5 -0
  291. package/dist/types/surfaces/StatCell.d.ts +6 -1
  292. package/dist/types/widgets/DashboardFrame.d.ts +58 -0
  293. package/dist/types/widgets/index.d.ts +1 -0
  294. package/package.json +2 -1
@@ -1,7 +1,7 @@
1
1
  import { type LinkNavigateEvent, type NavigationScrollMode } from "@k2b/ssr/nav";
2
2
  import { type JSX } from "solid-js";
3
3
  import { type TooltipPlacement } from "../feedback/Tooltip";
4
- export type ButtonVariant = "primary" | "secondary" | "ghost" | "text" | "subtle" | "input" | "warning" | "danger" | "success" | "ai";
4
+ export type ButtonVariant = "primary" | "secondary" | "ghost" | "text" | "link" | "subtle" | "input" | "warning" | "danger" | "success" | "ai";
5
5
  export type ButtonSize = "xs" | "sm" | "md" | "lg";
6
6
  export type ButtonAlign = "center" | "start";
7
7
  export type ButtonProps = JSX.ButtonHTMLAttributes<HTMLButtonElement> & {
@@ -0,0 +1,120 @@
1
+ import { type Accessor, type JSX } from "solid-js";
2
+ import { type CommandContext, type CommandGroup, type CommandItem, type CommandSource } from "./command-items";
3
+ /** The state of one open command list: its steps, the shown entries, and the marked one. */
4
+ export type CommandNavigator = ReturnType<typeof createCommandNavigator>;
5
+ /** The context without what the list adds itself: the query, the path, the signal, and the reports. */
6
+ export type CommandPlace = Omit<CommandContext, "query" | "path" | "signal" | "success" | "error">;
7
+ /** A list whose entries come from a promise: pending, or failed with the message of its rejection. */
8
+ export type CommandListLoad = {
9
+ state: "ready";
10
+ } | {
11
+ state: "loading";
12
+ } | {
13
+ state: "failed";
14
+ message?: string;
15
+ };
16
+ /** A command that returned a promise, busy while it runs. */
17
+ export type CommandStatus = {
18
+ key: string;
19
+ label: string;
20
+ state: "running";
21
+ };
22
+ /**
23
+ * What a finished command reported, shown in the list's place: a confirmation, an error (with a way to try again when
24
+ * the command threw or rejected), or the command running again after a retry.
25
+ */
26
+ export type CommandOutcome = {
27
+ state: "success";
28
+ message: string;
29
+ } | {
30
+ state: "error";
31
+ message?: string;
32
+ retry?: () => void;
33
+ } | {
34
+ state: "running";
35
+ message: string;
36
+ };
37
+ /** A confirmation or an error stays at least this long, even when the person types on at once. */
38
+ export declare const COMMAND_OUTCOME_MIN_MS = 1200;
39
+ /** A confirmation goes by itself after this long; an error stays until the person types, retries, or presses Escape. */
40
+ export declare const COMMAND_OUTCOME_SUCCESS_MS = 4000;
41
+ /**
42
+ * Keeps the steps, the marked entry, and the running command of a command list. The host owns the query and the
43
+ * effects: `onText` places an entry's text; for an entry with `onSelect`, `beforeRun` lets the host remove its query,
44
+ * `context` describes the text the command acts on, and `afterRun` closes the list once the command finished.
45
+ * `onStep` runs after a further list opened or closed, with the new depth, so the host clears its query.
46
+ */
47
+ export declare const createCommandNavigator: (options: {
48
+ items: Accessor<CommandSource>;
49
+ query: Accessor<string>;
50
+ onText: (item: CommandItem) => void;
51
+ /** The part of the context the host knows: the text and where the list is in it. */
52
+ context: () => CommandPlace;
53
+ /** Whether the list is open; a closed list asks no source. */
54
+ active: () => boolean;
55
+ beforeRun?: () => void;
56
+ /** Runs once a command finished, before its outcome shows; `outcome` tells the host to keep its place for it. */
57
+ afterRun: (outcome: boolean) => void;
58
+ onStep?: (depth: number) => void;
59
+ }) => {
60
+ query: Accessor<string>;
61
+ step: () => CommandItem | undefined;
62
+ groups: Accessor<CommandGroup[]>;
63
+ entries: Accessor<CommandItem[]>;
64
+ active: Accessor<number>;
65
+ setActive: (index: number) => void;
66
+ /** Marks the next or previous entry, wrapping; unavailable entries are passed over, as in a searchable menu. */
67
+ move: (delta: 1 | -1) => void;
68
+ edge: (which: "first" | "last") => void;
69
+ status: Accessor<CommandStatus | undefined>;
70
+ load: Accessor<CommandListLoad>;
71
+ /** Asks a source whose promise failed again. */
72
+ retry: () => number;
73
+ /** Whether a command's promise is pending; the list then waits for it. */
74
+ busy: () => boolean;
75
+ choose: (index?: number) => void;
76
+ /** Enter while entries load: chooses the first entry of this query once it arrives. */
77
+ chooseWhenLoaded: () => string;
78
+ /** Whether a choice waits for entries on their way. */
79
+ awaitingChoice: () => boolean;
80
+ /** Stops a running command: its signal aborts, and its result no longer reaches the list. */
81
+ abort: () => void;
82
+ /** What the last command reported, shown in the list's place until it clears. */
83
+ outcome: Accessor<CommandOutcome | undefined>;
84
+ /** The person typed on: the outcome clears, but not before it showed for `COMMAND_OUTCOME_MIN_MS`. */
85
+ typedOn: () => void;
86
+ /** Clears the outcome at once, for Escape or a new list; a retry still running is stopped. */
87
+ clearOutcome: () => void;
88
+ /** Leaves the second list; `false` when the first list shows. */
89
+ back: () => boolean;
90
+ /**
91
+ * Forgets steps, mark, and status. A running command goes on, but its result no longer reaches the list, so a
92
+ * retry's running line goes too; a reported outcome stays until it clears.
93
+ */
94
+ reset: () => void;
95
+ };
96
+ export declare const commandOptionId: (listId: string, index: number) => string;
97
+ /**
98
+ * The rows of a command list as a list box, with the menu's own rows and headings. The focus stays in the host's
99
+ * field, which points at the marked row as its active descendant; the rows only answer the pointer.
100
+ */
101
+ export declare function CommandList(props: {
102
+ navigator: CommandNavigator;
103
+ id: string;
104
+ /** Names the first list; a second list is named by its step. */
105
+ label: string;
106
+ /** Shows the step's label beside the back control, for a host without its own search field. */
107
+ stepHint?: boolean;
108
+ /** Says how many entries match, after the query changed. */
109
+ query: Accessor<string>;
110
+ /** Content between the back control and the list, such as a search field. */
111
+ header?: JSX.Element;
112
+ /** Runs after Retry or Close on an outcome, so the host puts the focus back where the person writes. */
113
+ onOutcomeAction?: () => void;
114
+ }): JSX.Element;
115
+ /**
116
+ * The keys of a command list in its host's field: Up, Down, Home, and End mark; Enter and Tab choose; Escape and
117
+ * Backspace on an empty query leave a second list. Returns whether the key was used; Escape in the first list is left
118
+ * to the host, which closes.
119
+ */
120
+ export declare const commandListKey: (nav: CommandNavigator, event: KeyboardEvent, query: string) => boolean;
@@ -0,0 +1,39 @@
1
+ import { type JSX } from "solid-js";
2
+ import { type CommandSource } from "./command-items";
3
+ import { Dropdown, type DropdownAnchor, type DropdownPosition, type DropdownReturnFocus } from "./Dropdown";
4
+ export type CommandMenuProps = {
5
+ /** The same entries as `MarkdownEditor`'s `commands`, so the slash menu, a "+" button, and a chip offer one list. */
6
+ items: CommandSource;
7
+ /** Names the menu and its first list, such as "Add to message". */
8
+ label: string;
9
+ /** Names the search field and is its hint, such as "Search commands". A second list shows its own label there. */
10
+ search: string;
11
+ /**
12
+ * The field the commands act on, such as the composer's textarea beside a "+" button. Its text and selection are the
13
+ * `context` of an `onSelect`, and `context.insert` and entries with `text` write into it as typing would.
14
+ */
15
+ target?: HTMLTextAreaElement | HTMLInputElement;
16
+ /**
17
+ * The composer box the menu docks to, as the slash list does: as wide as the box, just above it, or below it when
18
+ * there is more room there. Without it, the menu opens beside its trigger.
19
+ */
20
+ dock?: HTMLElement;
21
+ /** Receives inserted text when there is no `target`, such as a snippet the host places itself. */
22
+ onInsert?: (text: string) => void;
23
+ /** The `CommandMenu.Trigger`; leave it out for a menu opened through `openAt` or `attach`. */
24
+ children?: JSX.Element;
25
+ position?: DropdownPosition;
26
+ align?: "start" | "end";
27
+ /** Receives `open`, which shows the menu beside `anchor` without its trigger; focus returns to `returnFocus`. */
28
+ openAt?: (open: (anchor: DropdownAnchor, returnFocus?: DropdownReturnFocus) => void) => void;
29
+ /** Adopts an element rendered elsewhere, such as a server-rendered chip, as the trigger. */
30
+ attach?: () => HTMLElement | null | undefined;
31
+ onOpenChange?: (open: boolean) => void;
32
+ disabled?: boolean;
33
+ class?: string;
34
+ };
35
+ type CommandMenuComponent = ((props: CommandMenuProps) => JSX.Element) & {
36
+ Trigger: typeof Dropdown.Trigger;
37
+ };
38
+ export declare const CommandMenu: CommandMenuComponent;
39
+ export {};
@@ -1,6 +1,7 @@
1
1
  import { type JSX } from "solid-js";
2
2
  import { type TooltipPlacement } from "../feedback/Tooltip";
3
3
  import { type ButtonProps, type ButtonSize, type ButtonVariant } from "./Button";
4
+ import { type MenuSearchApi } from "./menu-search";
4
5
  export type DropdownPosition = "bottom-right" | "bottom-left" | "top-right" | "top-left" | "right-start";
5
6
  /** Where a menu opened without its trigger appears: an element, or any box such as a point inside one. */
6
7
  export type DropdownAnchor = {
@@ -198,10 +199,26 @@ export declare function DropdownItems(props: {
198
199
  close: (restoreFocus?: boolean) => void;
199
200
  role?: "menuitem" | "option";
200
201
  }): JSX.Element;
202
+ /**
203
+ * Internal: content in place of the entries, as `CommandMenu` renders its command list. It reports where the focus
204
+ * goes as the menu opens, like the search field, and `open` tells it when the menu closed.
205
+ */
206
+ export type DropdownBody = (props: {
207
+ close: (restoreFocus?: boolean) => void;
208
+ open: () => boolean;
209
+ api: (api: MenuSearchApi) => void;
210
+ }) => JSX.Element;
211
+ /** Accessible top-layer menu with explicit trigger ownership. */
212
+ declare function DropdownRoot(props: DropdownProps & {
213
+ body?: DropdownBody;
214
+ placeMenu?: (menu: HTMLElement) => void;
215
+ }): JSX.Element;
201
216
  type DropdownComponent = ((props: DropdownProps) => JSX.Element) & {
202
217
  Root: (props: DropdownProps) => JSX.Element;
203
218
  Trigger: (props: DropdownTriggerProps) => JSX.Element;
204
219
  Item: (props: DropdownItemProps) => JSX.Element;
205
220
  };
221
+ /** Internal: the menu with a `body`, for `CommandMenu`. */
222
+ export declare const DropdownShell: typeof DropdownRoot;
206
223
  export declare const Dropdown: DropdownComponent;
207
224
  export default Dropdown;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Docks a command list to its composer: exactly as wide as the composer and flush with its edges, just above it, or
3
+ * below it when the visible viewport leaves more room there, as for a composer at the top. The visible viewport counts,
4
+ * so a phone's open keyboard does not hide the list. The list scrolls within the room it gets.
5
+ */
6
+ export declare const dockCommandList: (list: HTMLElement, composer: Element) => void;
7
+ /** Calls `follow` whenever the composer or the visible viewport moves or changes size; returns the cleanup. */
8
+ export declare const followComposer: (composer: Element, follow: () => void) => () => void;
@@ -0,0 +1,134 @@
1
+ import type { JSX } from "solid-js";
2
+ /**
3
+ * One entry of a command list: the slash menu of `MarkdownEditor` and `CommandMenu` read the same entries, so a
4
+ * composer's `/`, its "+" button, and a chip offer one list.
5
+ */
6
+ /** Where a slash at `start` stands in `value`: the text before it and whether only whitespace precedes it, overall or on its line. */
7
+ export declare const commandPlace: (value: string, start: number, end: number) => {
8
+ text: string;
9
+ before: string;
10
+ atStart: boolean;
11
+ lineStart: boolean;
12
+ };
13
+ export type CommandItem = {
14
+ label: string;
15
+ /** Heading above the entry. Entries of one group stand together, in the order the groups first appear. */
16
+ group?: string;
17
+ /** One quiet line of what the entry does, after the label on the same line, such as "Preis aus dem Text prüfen". */
18
+ description?: string;
19
+ /** Quiet text at the end of the row, such as what a person can type: `/telefonat`. It is searched, too. */
20
+ hint?: string;
21
+ /** Tabler icon class, such as `ti ti-phone`. */
22
+ icon?: string;
23
+ /**
24
+ * An image at icon size in place of the icon, such as a service's logo: a URL, or one for each theme when the logo
25
+ * needs a light variant on dark surfaces. It is decorative; the label names the entry.
26
+ */
27
+ image?: string | {
28
+ light: string;
29
+ dark: string;
30
+ };
31
+ /**
32
+ * Renders the start of the row in place of the icon, such as an avatar or a tag's color. A function, so each row
33
+ * gets its own element.
34
+ */
35
+ leading?: () => JSX.Element;
36
+ /** Further words that find the entry, such as "anruf" for "Phone call". */
37
+ keywords?: readonly string[];
38
+ /** Unavailable now: the entry stays in the list, greyed, with this one-line reason, and cannot be chosen. */
39
+ disabled?: string;
40
+ /** Stable key, when two entries share group and label. */
41
+ id?: string;
42
+ } & ({
43
+ /**
44
+ * Runs when the entry is chosen, with the text it acts on. In the editor, the typed `/query` has left the text
45
+ * first. A returned promise keeps the list open with the entry busy; any other result counts as done; a rejection shows its message on the entry,
46
+ * which can then run again, and Escape aborts `context.signal`.
47
+ */
48
+ onSelect: (context: CommandContext) => unknown;
49
+ text?: never;
50
+ next?: never;
51
+ } | {
52
+ /** Text that takes the place of the typed `/query`; `CommandMenu` hands it to `onInsert`. */
53
+ text: string;
54
+ onSelect?: never;
55
+ next?: never;
56
+ } | {
57
+ /** A second list in the same popover, such as people to assign. */
58
+ next: CommandStep;
59
+ onSelect?: never;
60
+ text?: never;
61
+ });
62
+ /**
63
+ * Where a command list is and what it acts on: one context for the entries of every level and for `onSelect`. In
64
+ * `SlashCommands` the text is the editor's, without the typed `/query`; in `CommandMenu` it is the text of its `target`
65
+ * field, or empty without one.
66
+ */
67
+ export type CommandContext = {
68
+ /** What the person typed after `/`, or into the menu's search field. */
69
+ query: string;
70
+ /** The whole text without the typed `/query`. */
71
+ text: string;
72
+ /** The text before the slash, or before the caret in `CommandMenu`. */
73
+ before: string;
74
+ /** Whether the slash is the first character of the text, leading whitespace aside. */
75
+ atStart: boolean;
76
+ /** Whether the slash starts a line, leading whitespace aside. */
77
+ lineStart: boolean;
78
+ /** The selection in `text`; `start === end` is the caret. */
79
+ selection: {
80
+ start: number;
81
+ end: number;
82
+ };
83
+ /** The entries chosen so far on the way to this level, such as `[assign, person]` on the third. */
84
+ path: readonly CommandItem[];
85
+ /**
86
+ * Puts text at the caret in place of the selection, as typing would, so undo keeps working. Without a `target`,
87
+ * `CommandMenu` hands it to `onInsert`. Meant for `onSelect`.
88
+ */
89
+ insert: (text: string) => void;
90
+ /**
91
+ * Reports what a command did, such as "Valentin Brandt zugewiesen": after the command finished, the list gives way to
92
+ * a short confirmation in the same place. Meant for `onSelect`; an entry source has its own loading and failure.
93
+ */
94
+ success: (message: string) => void;
95
+ /**
96
+ * Reports why a command could not do it, such as "Keine Artikelnummer im Text"; it stays until the person types on
97
+ * or presses Escape. A command that throws or rejects reports its error itself, with a way to try again.
98
+ */
99
+ error: (message: string) => void;
100
+ /**
101
+ * Aborts when the result is no longer wanted: a new query replaces a pending list, or the person closes the list
102
+ * with Escape before a command's promise settled.
103
+ */
104
+ signal: AbortSignal;
105
+ };
106
+ /**
107
+ * The entries of a list: a list, or a function of the context that decides which entries there are in this place, at
108
+ * once or as a promise, such as templates only at the start of the text or people from a server search. Either way the
109
+ * list filters them by the query; give server matches the words they matched on as `keywords`.
110
+ */
111
+ export type CommandSource = readonly CommandItem[] | ((context: CommandContext) => readonly CommandItem[] | Promise<readonly CommandItem[]>);
112
+ /** A further list in the same place, as deep as needed. Escape, or Backspace on an empty query, goes back. */
113
+ export type CommandStep = {
114
+ /** Names the list and is the search hint, such as "Search person". */
115
+ label: string;
116
+ items: CommandSource;
117
+ };
118
+ export type CommandGroup = {
119
+ label?: string;
120
+ entries: {
121
+ item: CommandItem;
122
+ index: number;
123
+ }[];
124
+ };
125
+ /**
126
+ * The entries whose label, hint, or keywords contain every word of the query, ignoring case and accents, in their
127
+ * order. A blank query keeps all.
128
+ */
129
+ export declare const filterCommandItems: (items: readonly CommandItem[], query: string) => readonly CommandItem[];
130
+ /** The entries of a source in a context, filtered by its query; a promise resolves to the filtered entries. */
131
+ export declare const resolveCommandSource: (source: CommandSource, context: CommandContext) => readonly CommandItem[] | Promise<readonly CommandItem[]>;
132
+ /** Groups in the order they first appear; `index` is the entry's place in the order the list shows. */
133
+ export declare const groupCommandItems: (items: readonly CommandItem[]) => CommandGroup[];
134
+ export declare const commandKey: (item: CommandItem) => string;
@@ -0,0 +1,19 @@
1
+ declare const commandMessages: import("@k2b/stdlib").Catalog<{
2
+ commands: string;
3
+ back: ({ label }: {
4
+ label: string;
5
+ }) => string;
6
+ running: ({ label }: {
7
+ label: string;
8
+ }) => string;
9
+ failed: string;
10
+ loading: string;
11
+ loadingChoice: string;
12
+ loadFailed: string;
13
+ done: string;
14
+ }>;
15
+ export type CommandMessages = ReturnType<(typeof commandMessages)["resolve"]>["t"];
16
+ /** Resolved from the inherited render locale. */
17
+ export declare const useCommandMessages: () => (() => CommandMessages);
18
+ export declare const checkCommandMessages: () => import("@k2b/stdlib").CatalogIssue[];
19
+ export {};
@@ -1,9 +1,12 @@
1
1
  export type { ButtonAlign, ButtonLinkProps, ButtonProps, ButtonSize, ButtonVariant, IconButtonLinkProps, IconButtonProps } from "./Button";
2
2
  export { Button, ButtonLink, IconButton, IconButtonLink } from "./Button";
3
+ export type { CommandMenuProps } from "./CommandMenu";
4
+ export { CommandMenu } from "./CommandMenu";
3
5
  export type { ContextMenuProps } from "./ContextMenu";
4
6
  export { ContextMenu } from "./ContextMenu";
5
7
  export type { CopyButtonProps, CopyButtonValue } from "./CopyButton";
6
8
  export { CopyButton } from "./CopyButton";
9
+ export type { CommandContext, CommandItem, CommandSource, CommandStep } from "./command-items";
7
10
  export type { DisclosureProps } from "./Disclosure";
8
11
  export { Disclosure } from "./Disclosure";
9
12
  export type { DragPayload, DragSourceProps, DropTargetProps } from "./DragAndDrop";
@@ -1,4 +1,4 @@
1
- import { type ChartOptions, type HeatmapOptions } from "./svg";
1
+ import { type ChartOptions, type HeatmapOptions } from "./svg-renderers";
2
2
  export type CalendarHeatmapOptions = ChartOptions & {
3
3
  layout: "calendar";
4
4
  data: [string, number | null][];
@@ -0,0 +1,5 @@
1
+ /** Labels needed by pure SVG renderers; UI inspection messages stay with the UI host. */
2
+ export declare const coreChartMessages: import("@k2b/stdlib").Catalog<{
3
+ series: string;
4
+ areaTotal: string;
5
+ }>;
@@ -0,0 +1,74 @@
1
+ import type { ChartDatum } from "./types";
2
+ export type HorizontalBarOptions = {
3
+ series: string[];
4
+ rows: {
5
+ group?: string;
6
+ label: string;
7
+ values: (number | null)[];
8
+ }[];
9
+ valueFormat?: (value: number) => string;
10
+ legend?: boolean;
11
+ title?: string;
12
+ subtitle?: string;
13
+ locale?: string;
14
+ className?: string;
15
+ };
16
+ /** Stacks start at zero, group headings keep their first-appearance order. */
17
+ export declare function hbarLayout(spec: HorizontalBarOptions, size?: {
18
+ width: number;
19
+ height: number;
20
+ }): {
21
+ width: number;
22
+ header: number;
23
+ height: number;
24
+ top: number;
25
+ left: number;
26
+ right: number;
27
+ rows: {
28
+ group?: string;
29
+ label: string;
30
+ values: (number | null)[];
31
+ labelLines: string[];
32
+ groupHeading: string | undefined;
33
+ index: number;
34
+ center: number;
35
+ segments: {
36
+ value: number | null;
37
+ seriesIndex: number;
38
+ x: number;
39
+ width: number;
40
+ label: string;
41
+ showLabel: boolean;
42
+ }[];
43
+ total: number;
44
+ valueText: string;
45
+ datum: ChartDatum;
46
+ title: string;
47
+ groupY: number;
48
+ }[];
49
+ groups: (string | undefined)[];
50
+ pitch: number;
51
+ x: (v: number) => number;
52
+ scale: {
53
+ domain: [number, number];
54
+ ticks: number[];
55
+ };
56
+ format: (value: number) => string;
57
+ unit: number;
58
+ legend: {
59
+ hidden: number;
60
+ height: number;
61
+ items: {
62
+ label: string;
63
+ data: (number | null)[];
64
+ total: number | null;
65
+ x: number;
66
+ y: number;
67
+ labelWidth: number;
68
+ valueX: number;
69
+ valueText: string;
70
+ text: string;
71
+ }[];
72
+ };
73
+ };
74
+ export type HorizontalBarLayout = ReturnType<typeof hbarLayout>;
@@ -0,0 +1,13 @@
1
+ import { type HorizontalBarLayout, type HorizontalBarOptions } from "./hbar-layout";
2
+ export { type HorizontalBarLayout, type HorizontalBarOptions, hbarLayout } from "./hbar-layout";
3
+ export declare function renderHbarSvg(spec: HorizontalBarOptions & {
4
+ width: number;
5
+ height: number;
6
+ inspect?: boolean;
7
+ }): string;
8
+ /** Draw an already prepared layout; lazy hosts reuse the geometry reserved before loading. */
9
+ export declare function renderHbarLayoutSvg(spec: HorizontalBarOptions & {
10
+ width: number;
11
+ height: number;
12
+ inspect?: boolean;
13
+ }, g: HorizontalBarLayout): string;
@@ -1,11 +1,16 @@
1
1
  /** Portable chart contracts. This entry never imports Solid or browser APIs. */
2
- export { type BarChartOptions, barChartLayout, renderBarChartSvg } from "../../content/chart-bar";
2
+ export { type BarChartLayout, type BarChartOptions, barChartLayout, renderBarChartSvg, seriesBarLayout } from "../../content/chart-bar";
3
3
  export { renderStateTimelineSvg, type StateTimelineChartOptions, type StateTimelineDomain, stateTimelineDomain, stateTimelineHeight, } from "../../content/chart-state-timeline";
4
4
  export { type ChartTimeAxis } from "../../content/chart-time-axis";
5
5
  export { type AreaOptions, areaLayout, renderAreaSvg } from "./area";
6
6
  export * from "./calendar";
7
+ export { type HorizontalBarLayout, type HorizontalBarOptions, hbarLayout, renderHbarLayoutSvg, renderHbarSvg } from "./hbar";
7
8
  export * from "./inspection";
9
+ export { map } from "./map";
8
10
  export * from "./render";
11
+ export { chartRenderHeight, preservesAspectRatio } from "./render-size";
9
12
  export * from "./snapshot";
10
- export { type AxisOptions, arcPathD, autoBin, type BarItem, bar, barGauge, boxplot, type ChartOptions, chartDatumSvg, charts, computeBoxStats, computeDomain, donut, escapeXml, extendDomainToNice, gauge, heatmap, histogram, type LineStyle, line, linearRegression, linePathD, type MapOptions, type MapPoint, type MapSeries, type MapViewport, type MarkerShape, map, mapLog, mapRange, markerPath, niceLogTicks, niceStep, normalizePadding, type Padding, type Point, pie, type ReferenceLine, type Series, type SliceItem, scatter, smoothPathD, sparkline, stat, stateTimeline, stepPathD, svgRoot, } from "./svg";
13
+ export { charts } from "./svg";
14
+ export { type AxisOptions, arcPathD, autoBin, type BarItem, bar, barGauge, boxplot, type ChartOptions, chartDatumSvg, computeBoxStats, computeDomain, donut, escapeXml, extendDomainToNice, gauge, heatmap, histogram, type LineStyle, line, linearRegression, linePathD, type MapOptions, type MapPoint, type MapSeries, type MapViewport, type MarkerShape, mapLog, mapRange, markerPath, niceLogTicks, niceStep, normalizePadding, type Padding, type Point, pie, type ReferenceLine, type Series, type SliceItem, scatter, smoothPathD, sparkline, stat, stateTimeline, stepPathD, svgRoot, } from "./svg-renderers";
11
15
  export { type ChartDateFormat, type ChartDatum, type ChartDatumRole, type ChartFormat, type ChartKind, type ChartNumberFormat, chartDatumRoles, } from "./types";
16
+ export { renderWaterfallLayoutSvg, renderWaterfallSvg, type WaterfallLayout, type WaterfallOptions, waterfallLayout } from "./waterfall";
@@ -0,0 +1,3 @@
1
+ import { type MapOptions } from "./svg-renderers";
2
+ /** Render geographic point series over a dependency-free world land map. */
3
+ export declare function map(opts: MapOptions): string;
@@ -2,21 +2,27 @@ import { renderBarChartSvg } from "../../content/chart-bar";
2
2
  import { renderStateTimelineSvg } from "../../content/chart-state-timeline";
3
3
  import { renderAreaSvg } from "./area";
4
4
  import { renderHeatmapSvg } from "./calendar";
5
+ import { renderHbarSvg } from "./hbar";
6
+ import { map } from "./map";
7
+ import { barGauge, boxplot, donut, gauge, histogram, line, pie, scatter, sparkline, stat } from "./svg-renderers";
8
+ import { renderWaterfallSvg } from "./waterfall";
5
9
  export declare const chartRenderers: {
10
+ waterfall: typeof renderWaterfallSvg;
6
11
  area: typeof renderAreaSvg;
7
- line: typeof import("./svg").line;
12
+ line: typeof line;
8
13
  bar: typeof renderBarChartSvg;
9
- pie: typeof import("./svg").pie;
10
- donut: typeof import("./svg").donut;
11
- scatter: typeof import("./svg").scatter;
12
- sparkline: typeof import("./svg").sparkline;
13
- histogram: typeof import("./svg").histogram;
14
- boxplot: typeof import("./svg").boxplot;
15
- gauge: typeof import("./svg").gauge;
16
- barGauge: typeof import("./svg").barGauge;
17
- stat: typeof import("./svg").stat;
14
+ hbar: typeof renderHbarSvg;
15
+ pie: typeof pie;
16
+ donut: typeof donut;
17
+ scatter: typeof scatter;
18
+ sparkline: typeof sparkline;
19
+ histogram: typeof histogram;
20
+ boxplot: typeof boxplot;
21
+ gauge: typeof gauge;
22
+ barGauge: typeof barGauge;
23
+ stat: typeof stat;
18
24
  heatmap: typeof renderHeatmapSvg;
19
- map: typeof import("./svg").map;
25
+ map: typeof map;
20
26
  stateTimeline: typeof renderStateTimelineSvg;
21
27
  };
22
28
  type Kind = keyof typeof chartRenderers;
@@ -0,0 +1,7 @@
1
+ import type { ChartRenderOptions } from "./render";
2
+ import type { ChartKind } from "./types";
3
+ /** Standard logical height, or compact bar-gauge rows for a host without an explicit height. */
4
+ export declare const chartRenderHeight: (props: ChartRenderOptions, sizing?: {
5
+ contentHeight?: boolean;
6
+ }) => number;
7
+ export declare const preservesAspectRatio: (kind: ChartKind) => kind is "donut" | "gauge" | "map" | "pie";
@@ -21,11 +21,9 @@ export type ChartDrawingOptions = {
21
21
  } : {}) & DrawingOptions<Parameters<(typeof chartRenderers)[K]>[0]>;
22
22
  }[ChartKind];
23
23
  export type ChartRenderOptions = RenderOptions<ChartDrawingOptions>;
24
- /** Keep the fixed 28-unit bar-gauge rows inside the shared SSR/browser coordinate space. */
25
- export declare const chartRenderHeight: (props: ChartRenderOptions) => number;
24
+ export { chartRenderHeight, preservesAspectRatio } from "./render-size";
26
25
  /** Shared logical SVG renderer; callbacks and browser interaction stay with the Solid host. */
27
26
  export declare const renderChartSvg: (props: ChartDrawingOptions, width: number, height: number, mapViewport?: MapViewport, timelineViewport?: StateTimelineDomain, renderLocale?: string) => string;
28
- export declare const preservesAspectRatio: (kind: ChartKind) => kind is "donut" | "gauge" | "map" | "pie";
29
27
  export type ChartSize = {
30
28
  width: number;
31
29
  height: number;
@@ -37,4 +35,3 @@ export type ChartScene = ChartSize & {
37
35
  /** Lay out a chart in a fixed logical coordinate space, without browser measurement. */
38
36
  export declare const layout: (spec: ChartDrawingOptions, size: ChartSize) => ChartScene;
39
37
  export declare const toSvg: (scene: ChartScene) => string;
40
- export {};
@@ -1,5 +1,5 @@
1
1
  import { type ChartSelection, type ChartTooltip, type ChartTooltipFormatter } from "./inspection";
2
- import { type ChartRenderOptions } from "./render";
2
+ import { type ChartRenderOptions, chartRenderHeight } from "./render";
3
3
  import type { ChartDatum, ChartKind } from "./types";
4
4
  /** Trusted output of prepareChartSnapshot; never accept arbitrary user SVG. */
5
5
  export type ChartSnapshot = {
@@ -24,4 +24,4 @@ export declare function prepareChartSnapshot(options: ChartRenderOptions, inspec
24
24
  rowKey?: (selection: ChartSelection) => string;
25
25
  tooltip: ChartTooltipFormatter;
26
26
  reference?: (selection: ChartSelection) => boolean;
27
- }): ChartSnapshot;
27
+ }, sizing?: Parameters<typeof chartRenderHeight>[1]): ChartSnapshot;