derive-dashboards 0.8.0 → 0.9.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 (585) hide show
  1. package/CHANGELOG.md +513 -0
  2. package/README.md +8 -2
  3. package/dist/adapter/statement.mjs +9 -7
  4. package/dist/authorize.mjs +27 -6
  5. package/dist/body.mjs +28 -25
  6. package/dist/cache.d.mts +2 -2
  7. package/dist/charts/data/buckets.d.mts +25 -7
  8. package/dist/charts/data/buckets.mjs +92 -15
  9. package/dist/charts/data/clean.mjs +254 -12
  10. package/dist/charts/data/format.d.mts +7 -2
  11. package/dist/charts/data/format.mjs +68 -70
  12. package/dist/charts/data/input-error.d.mts +2 -0
  13. package/dist/charts/data/input-error.mjs +2 -0
  14. package/dist/charts/data/rows.d.mts +3 -1
  15. package/dist/charts/data/rows.mjs +4 -2
  16. package/dist/charts/data/types.d.mts +50 -7
  17. package/dist/charts/data/words.d.mts +13 -0
  18. package/dist/charts/data/words.mjs +8 -1
  19. package/dist/charts/describe.mjs +6 -6
  20. package/dist/charts/index.d.mts +14 -14
  21. package/dist/charts/index.mjs +4 -1
  22. package/dist/charts/kinds/area-marks.mjs +67 -26
  23. package/dist/charts/kinds/area.d.mts +3 -3
  24. package/dist/charts/kinds/area.mjs +32 -11
  25. package/dist/charts/kinds/bars-data.d.mts +3 -3
  26. package/dist/charts/kinds/bars-data.mjs +12 -6
  27. package/dist/charts/kinds/bars-layout.mjs +60 -6
  28. package/dist/charts/kinds/bars-marks.mjs +6 -6
  29. package/dist/charts/kinds/bars.d.mts +5 -3
  30. package/dist/charts/kinds/bars.mjs +39 -6
  31. package/dist/charts/kinds/columns-data.mjs +14 -5
  32. package/dist/charts/kinds/columns-marks.mjs +52 -23
  33. package/dist/charts/kinds/columns.d.mts +2 -2
  34. package/dist/charts/kinds/columns.mjs +36 -10
  35. package/dist/charts/kinds/course-data.mjs +44 -0
  36. package/dist/charts/kinds/course-layout.mjs +77 -0
  37. package/dist/charts/kinds/course-marks.mjs +52 -0
  38. package/dist/charts/kinds/course-words.mjs +64 -0
  39. package/dist/charts/kinds/course.d.mts +10 -0
  40. package/dist/charts/kinds/course.mjs +55 -0
  41. package/dist/charts/kinds/dumbbell-data.d.mts +4 -4
  42. package/dist/charts/kinds/dumbbell-data.mjs +3 -3
  43. package/dist/charts/kinds/dumbbell-layout.mjs +17 -8
  44. package/dist/charts/kinds/dumbbell.d.mts +5 -3
  45. package/dist/charts/kinds/dumbbell.mjs +35 -4
  46. package/dist/charts/kinds/funnel-data.d.mts +3 -3
  47. package/dist/charts/kinds/funnel-data.mjs +11 -16
  48. package/dist/charts/kinds/funnel-layout.mjs +7 -6
  49. package/dist/charts/kinds/funnel.d.mts +5 -4
  50. package/dist/charts/kinds/funnel.mjs +33 -6
  51. package/dist/charts/kinds/grid-data.d.mts +3 -3
  52. package/dist/charts/kinds/grid-data.mjs +55 -13
  53. package/dist/charts/kinds/grid-layout.mjs +88 -13
  54. package/dist/charts/kinds/grid-legend.mjs +60 -0
  55. package/dist/charts/kinds/grid-marks.mjs +81 -30
  56. package/dist/charts/kinds/grid-time.mjs +19 -5
  57. package/dist/charts/kinds/grid-words.mjs +57 -35
  58. package/dist/charts/kinds/grid.d.mts +7 -4
  59. package/dist/charts/kinds/grid.mjs +49 -8
  60. package/dist/charts/kinds/histogram-data.mjs +68 -26
  61. package/dist/charts/kinds/histogram-layout.mjs +4 -3
  62. package/dist/charts/kinds/histogram-words.mjs +2 -3
  63. package/dist/charts/kinds/histogram.d.mts +2 -2
  64. package/dist/charts/kinds/histogram.mjs +17 -1
  65. package/dist/charts/kinds/line-marks.mjs +19 -11
  66. package/dist/charts/kinds/line.d.mts +2 -2
  67. package/dist/charts/kinds/line.mjs +21 -3
  68. package/dist/charts/kinds/multiples-grid.mjs +57 -27
  69. package/dist/charts/kinds/multiples-head.mjs +52 -22
  70. package/dist/charts/kinds/multiples-layout.mjs +106 -52
  71. package/dist/charts/kinds/multiples-marks.mjs +6 -5
  72. package/dist/charts/kinds/multiples-words.mjs +53 -38
  73. package/dist/charts/kinds/multiples.d.mts +2 -2
  74. package/dist/charts/kinds/multiples.mjs +35 -7
  75. package/dist/charts/kinds/row-chart.d.mts +7 -0
  76. package/dist/charts/kinds/row-chart.mjs +47 -10
  77. package/dist/charts/kinds/row-marks.mjs +5 -5
  78. package/dist/charts/kinds/scatter-data.d.mts +5 -5
  79. package/dist/charts/kinds/scatter-data.mjs +6 -6
  80. package/dist/charts/kinds/scatter-marks.mjs +46 -19
  81. package/dist/charts/kinds/scatter-words.mjs +8 -8
  82. package/dist/charts/kinds/scatter.d.mts +5 -3
  83. package/dist/charts/kinds/scatter.mjs +18 -0
  84. package/dist/charts/kinds/stat-data.mjs +7 -7
  85. package/dist/charts/kinds/stat-marks.mjs +2 -2
  86. package/dist/charts/kinds/stat.d.mts +4 -4
  87. package/dist/charts/kinds/stat.mjs +19 -0
  88. package/dist/charts/kinds/time-chart.mjs +13 -4
  89. package/dist/charts/kinds/time-frame.mjs +50 -19
  90. package/dist/charts/kinds/time-plan.mjs +29 -2
  91. package/dist/charts/kinds/time-plot.mjs +1 -1
  92. package/dist/charts/kinds/time-stops.mjs +58 -29
  93. package/dist/charts/kinds/waterfall-data.d.mts +3 -3
  94. package/dist/charts/kinds/waterfall-data.mjs +2 -2
  95. package/dist/charts/kinds/waterfall.d.mts +5 -4
  96. package/dist/charts/kinds/waterfall.mjs +29 -2
  97. package/dist/charts/layout/frame.mjs +5 -3
  98. package/dist/charts/layout/stack.mjs +43 -22
  99. package/dist/charts/marks/axes.mjs +10 -5
  100. package/dist/charts/marks/budget.mjs +14 -0
  101. package/dist/charts/marks/end-labels.mjs +24 -10
  102. package/dist/charts/marks/legend.mjs +19 -8
  103. package/dist/charts/marks/lines.mjs +3 -3
  104. package/dist/charts/marks/more.mjs +79 -13
  105. package/dist/charts/marks/notes.mjs +12 -6
  106. package/dist/charts/marks/series-line.mjs +14 -10
  107. package/dist/charts/marks/thin.mjs +16 -33
  108. package/dist/charts/scale/calendar.mjs +41 -26
  109. package/dist/charts/scale/linear.mjs +58 -0
  110. package/dist/charts/scale/value.d.mts +21 -0
  111. package/dist/charts/scale/value.mjs +67 -9
  112. package/dist/charts/scene/lazy.mjs +27 -0
  113. package/dist/charts/scene/markup.mjs +2 -1
  114. package/dist/charts/scene/svg.mjs +20 -8
  115. package/dist/charts/scene/types.d.mts +34 -0
  116. package/dist/charts/text/measure.mjs +33 -3
  117. package/dist/charts/theme.mjs +13 -4
  118. package/dist/charts-react/Chart.d.mts +20 -0
  119. package/dist/charts-react/Chart.mjs +9 -67
  120. package/dist/charts-react/Reader.mjs +50 -96
  121. package/dist/charts-react/box.mjs +106 -0
  122. package/dist/charts-react/bucket-names.mjs +9 -24
  123. package/dist/charts-react/columns-picture.mjs +12 -0
  124. package/dist/charts-react/exact-sum.mjs +4 -7
  125. package/dist/charts-react/from-answer.mjs +9 -4
  126. package/dist/charts-react/index.d.mts +9 -2
  127. package/dist/charts-react/index.mjs +9 -2
  128. package/dist/charts-react/kinds/area.d.mts +4 -0
  129. package/dist/charts-react/kinds/area.mjs +38 -0
  130. package/dist/charts-react/kinds/bar.d.mts +4 -0
  131. package/dist/charts-react/kinds/bar.mjs +15 -0
  132. package/dist/charts-react/kinds/funnel.d.mts +4 -0
  133. package/dist/charts-react/kinds/funnel.mjs +13 -0
  134. package/dist/charts-react/kinds/heatmap.d.mts +4 -0
  135. package/dist/charts-react/kinds/heatmap.mjs +13 -0
  136. package/dist/charts-react/kinds/line.d.mts +4 -0
  137. package/dist/charts-react/kinds/line.mjs +20 -0
  138. package/dist/charts-react/kinds/multiples.d.mts +4 -0
  139. package/dist/charts-react/kinds/multiples.mjs +33 -0
  140. package/dist/charts-react/kinds/number.d.mts +5 -0
  141. package/dist/charts-react/kinds/number.mjs +86 -0
  142. package/dist/charts-react/plan-bars.mjs +15 -8
  143. package/dist/charts-react/plan-funnel.mjs +3 -1
  144. package/dist/charts-react/plan-grid.mjs +14 -5
  145. package/dist/charts-react/plan-of.mjs +17 -0
  146. package/dist/charts-react/plan-parts.mjs +16 -5
  147. package/dist/charts-react/plan-time.mjs +4 -53
  148. package/dist/charts-react/reader-page.d.mts +1 -1
  149. package/dist/charts-react/reader-page.mjs +19 -9
  150. package/dist/charts-react/renderers.d.mts +14 -0
  151. package/dist/charts-react/renderers.mjs +22 -0
  152. package/dist/charts-react/table.d.mts +1 -0
  153. package/dist/charts-react/table.mjs +108 -0
  154. package/dist/charts-react/tiles.mjs +21 -49
  155. package/dist/charts-react/useScene.mjs +45 -17
  156. package/dist/charts-react/words.mjs +19 -0
  157. package/dist/checks.mjs +97 -19
  158. package/dist/cli/add.mjs +4 -3
  159. package/dist/cli/doctor.mjs +2 -2
  160. package/dist/core/conformance/index.d.mts +5 -2
  161. package/dist/core/conformance/index.mjs +5 -2
  162. package/dist/core/conformance/memory/aggregate.mjs +11 -6
  163. package/dist/core/conformance/memory/rows.d.mts +7 -3
  164. package/dist/core/conformance/memory/rows.mjs +19 -13
  165. package/dist/core/conformance/memory/source.mjs +4 -4
  166. package/dist/core/document/control-fields.d.mts +20 -0
  167. package/dist/core/document/control-fields.mjs +117 -0
  168. package/dist/core/document/display-comparisons.d.mts +17 -0
  169. package/dist/core/document/display-comparisons.mjs +15 -4
  170. package/dist/core/document/display-entries.d.mts +14 -0
  171. package/dist/core/document/display-entries.mjs +25 -9
  172. package/dist/core/document/display-validation.d.mts +5 -1
  173. package/dist/core/document/display-validation.mjs +14 -7
  174. package/dist/core/document/display.d.mts +10 -8
  175. package/dist/core/document/display.mjs +25 -4
  176. package/dist/core/document/layout.d.mts +8 -9
  177. package/dist/core/document/layout.mjs +23 -6
  178. package/dist/core/document/stacked.d.mts +0 -7
  179. package/dist/core/document/types.mjs +8 -6
  180. package/dist/core/document/upgrade.d.mts +1 -0
  181. package/dist/core/document/upgrade.mjs +4 -2
  182. package/dist/core/engine/access.mjs +3 -3
  183. package/dist/core/engine/assert.mjs +4 -2
  184. package/dist/core/engine/bucket.mjs +2 -2
  185. package/dist/core/engine/checks.mjs +6 -7
  186. package/dist/core/engine/custom/ask.mjs +22 -2
  187. package/dist/core/engine/custom/cells.mjs +22 -22
  188. package/dist/core/engine/custom/level.mjs +12 -13
  189. package/dist/core/engine/custom/measures.mjs +12 -9
  190. package/dist/core/engine/custom/reader.mjs +3 -1
  191. package/dist/core/engine/custom/records.mjs +8 -7
  192. package/dist/core/engine/custom/unread.mjs +78 -0
  193. package/dist/core/engine/custom/where.mjs +15 -10
  194. package/dist/core/engine/index.d.mts +2 -13
  195. package/dist/core/engine/index.mjs +2 -12
  196. package/dist/core/engine/measure.mjs +1 -0
  197. package/dist/core/engine/members.mjs +7 -3
  198. package/dist/core/engine/nan.mjs +10 -1
  199. package/dist/core/engine/native.mjs +2 -20
  200. package/dist/core/engine/numbers.mjs +26 -14
  201. package/dist/core/engine/postgres.mjs +9 -5
  202. package/dist/core/engine/prepare.mjs +4 -4
  203. package/dist/core/engine/rank-sets.mjs +1 -1
  204. package/dist/core/engine/read.mjs +5 -4
  205. package/dist/core/engine/reader.d.mts +6 -0
  206. package/dist/core/engine/record-layout.mjs +3 -3
  207. package/dist/core/engine/run.mjs +77 -20
  208. package/dist/core/engine/segmented.d.mts +2 -1
  209. package/dist/core/engine/segmented.mjs +19 -12
  210. package/dist/core/engine/series.mjs +1 -1
  211. package/dist/core/engine/shape.mjs +8 -8
  212. package/dist/core/engine/sql-partition.mjs +2 -2
  213. package/dist/core/engine/sql-pass.mjs +3 -2
  214. package/dist/core/engine/sql-reader.mjs +13 -5
  215. package/dist/core/engine/sql-reads.mjs +2 -1
  216. package/dist/core/engine/sql-records.mjs +2 -2
  217. package/dist/core/engine/sql-split.mjs +1 -1
  218. package/dist/core/engine/sql-unread.mjs +70 -0
  219. package/dist/core/engine/time.mjs +2 -1
  220. package/dist/core/engine/types.d.mts +17 -0
  221. package/dist/core/engine/version.d.mts +1 -1
  222. package/dist/core/engine/version.mjs +1 -1
  223. package/dist/core/error/codes.d.mts +24 -1
  224. package/dist/core/error/codes.mjs +23 -3
  225. package/dist/core/error/refusal.d.mts +8 -3
  226. package/dist/core/error/refusal.mjs +6 -1
  227. package/dist/core/exact/decimal.d.mts +1 -14
  228. package/dist/core/exact/decimal.mjs +9 -19
  229. package/dist/core/exact/stored.d.mts +9 -0
  230. package/dist/core/exact/stored.mjs +38 -0
  231. package/dist/core/exact/text.d.mts +16 -1
  232. package/dist/core/exact/text.mjs +50 -1
  233. package/dist/core/format/digits.mjs +55 -0
  234. package/dist/core/format/index.d.mts +16 -0
  235. package/dist/core/format/index.mjs +27 -0
  236. package/dist/core/format/number.d.mts +27 -0
  237. package/dist/core/format/number.mjs +158 -0
  238. package/dist/core/format/write.d.mts +6 -0
  239. package/dist/core/format/write.mjs +57 -0
  240. package/dist/core/index.d.mts +43 -33
  241. package/dist/core/index.mjs +31 -28
  242. package/dist/core/model/defaults.d.mts +18 -1
  243. package/dist/core/model/defaults.mjs +19 -1
  244. package/dist/core/model/define.d.mts +17 -8
  245. package/dist/core/model/define.mjs +2 -0
  246. package/dist/core/model/member.d.mts +5 -3
  247. package/dist/core/model/member.mjs +33 -6
  248. package/dist/core/model/storage.mjs +40 -12
  249. package/dist/core/model/types.d.mts +17 -1
  250. package/dist/core/model/types.mjs +5 -0
  251. package/dist/core/model/validate/expr.d.mts +1 -7
  252. package/dist/core/model/validate/fields.d.mts +2 -0
  253. package/dist/core/model/validate/fields.mjs +14 -7
  254. package/dist/core/model/validate/issues.mjs +5 -1
  255. package/dist/core/model/validate/known-members.mjs +6 -5
  256. package/dist/core/model/validate/shape.mjs +36 -3
  257. package/dist/core/model/validate/source.mjs +2 -2
  258. package/dist/core/oracle/data.d.mts +4 -2
  259. package/dist/core/oracle/evaluate.d.mts +19 -1
  260. package/dist/core/oracle/evaluate.mjs +56 -10
  261. package/dist/core/oracle/expr.mjs +1 -1
  262. package/dist/core/oracle/facts.mjs +12 -5
  263. package/dist/core/oracle/measure.mjs +1 -1
  264. package/dist/core/oracle/request.mjs +39 -4
  265. package/dist/core/oracle/segmented.d.mts +3 -1
  266. package/dist/core/oracle/segmented.mjs +19 -13
  267. package/dist/core/oracle/unread.mjs +32 -0
  268. package/dist/core/oracle/visibility.mjs +4 -3
  269. package/dist/core/policy/bind.d.mts +2 -11
  270. package/dist/core/policy/bind.mjs +1 -1
  271. package/dist/core/policy/match.mjs +1 -1
  272. package/dist/core/query/closure.d.mts +7 -2
  273. package/dist/core/query/closure.mjs +29 -12
  274. package/dist/core/query/compose-tile.d.mts +3 -2
  275. package/dist/core/query/compose-tile.mjs +32 -13
  276. package/dist/core/query/compose.d.mts +0 -5
  277. package/dist/core/query/drill/internal.d.mts +5 -5
  278. package/dist/core/query/drill/internal.mjs +11 -0
  279. package/dist/core/query/drill/links.d.mts +2 -3
  280. package/dist/core/query/drill/links.mjs +18 -4
  281. package/dist/core/query/drill/selection.d.mts +8 -2
  282. package/dist/core/query/drill/selection.mjs +14 -3
  283. package/dist/core/query/drill/synthetic.mjs +1 -1
  284. package/dist/core/query/drill/time.mjs +11 -10
  285. package/dist/core/query/filter.d.mts +1 -6
  286. package/dist/core/query/filter.mjs +1 -4
  287. package/dist/core/query/fold.mjs +23 -0
  288. package/dist/core/query/segments.mjs +42 -3
  289. package/dist/core/query/to-wire.d.mts +7 -0
  290. package/dist/core/query/to-wire.mjs +14 -2
  291. package/dist/core/query/types.d.mts +30 -13
  292. package/dist/core/result/columns.mjs +23 -13
  293. package/dist/core/result/number.mjs +3 -3
  294. package/dist/core/result/status.d.mts +13 -0
  295. package/dist/core/result/status.mjs +18 -0
  296. package/dist/core/result/time-axis.d.mts +14 -13
  297. package/dist/core/result/time-axis.mjs +20 -2
  298. package/dist/core/result/types.d.mts +33 -3
  299. package/dist/core/result/whole.d.mts +23 -0
  300. package/dist/core/result/whole.mjs +27 -0
  301. package/dist/core/schema/agent-query.d.mts +89 -0
  302. package/dist/core/schema/agent-query.mjs +115 -0
  303. package/dist/core/schema/aliases.mjs +1 -52
  304. package/dist/core/schema/answer-parts.mjs +17 -13
  305. package/dist/core/schema/answers.d.mts +787 -319
  306. package/dist/core/schema/commands.d.mts +33 -23
  307. package/dist/core/schema/commands.mjs +26 -18
  308. package/dist/core/schema/custom.mjs +46 -45
  309. package/dist/core/schema/document.d.mts +32 -27
  310. package/dist/core/schema/document.mjs +61 -81
  311. package/dist/core/schema/drill-answers.mjs +4 -1
  312. package/dist/core/schema/drill.d.mts +14 -9
  313. package/dist/core/schema/drill.mjs +23 -22
  314. package/dist/core/schema/index.d.mts +5 -3
  315. package/dist/core/schema/index.mjs +5 -3
  316. package/dist/core/schema/options.d.mts +92 -0
  317. package/dist/core/schema/options.mjs +104 -0
  318. package/dist/core/schema/picks.d.mts +2 -2
  319. package/dist/core/schema/picks.mjs +7 -6
  320. package/dist/core/schema/query.d.mts +9 -83
  321. package/dist/core/schema/query.mjs +49 -73
  322. package/dist/core/schema/strict.d.mts +3 -0
  323. package/dist/core/schema/strict.mjs +91 -0
  324. package/dist/core/schema/union-error.mjs +30 -7
  325. package/dist/core/schema/view.d.mts +4 -3
  326. package/dist/core/schema/view.mjs +16 -11
  327. package/dist/core/store/ddl.d.mts +0 -2
  328. package/dist/core/store/ddl.mjs +1 -5
  329. package/dist/core/time/bucket.d.mts +1 -19
  330. package/dist/core/time/bucket.mjs +6 -6
  331. package/dist/core/time/compare.mjs +3 -2
  332. package/dist/core/time/index.d.mts +7 -8
  333. package/dist/core/time/instant.d.mts +15 -9
  334. package/dist/core/time/instant.mjs +23 -9
  335. package/dist/core/time/range.d.mts +3 -15
  336. package/dist/core/time/range.mjs +17 -7
  337. package/dist/core/time/stored.d.mts +8 -5
  338. package/dist/core/time/stored.mjs +51 -15
  339. package/dist/core/time/temporal.d.mts +1 -5
  340. package/dist/core/time/temporal.mjs +9 -4
  341. package/dist/core/time/text-time.d.mts +31 -2
  342. package/dist/core/time/text-time.mjs +139 -22
  343. package/dist/core/time/zone.mjs +2 -2
  344. package/dist/core/types/api.d.mts +1 -1
  345. package/dist/core/types/api.mjs +1 -1
  346. package/dist/core/types/dashboard.d.mts +185 -0
  347. package/dist/core/types/dashboard.mjs +26 -0
  348. package/dist/core/types/drill-api.d.mts +14 -2
  349. package/dist/core/types/infer.d.mts +0 -4
  350. package/dist/core/types/options-check.d.mts +42 -0
  351. package/dist/core/types/options-check.mjs +90 -0
  352. package/dist/core/types/options.d.mts +14 -8
  353. package/dist/core/value/casefold.d.mts +1 -3
  354. package/dist/core/value/stored.d.mts +26 -0
  355. package/dist/core/value/stored.mjs +28 -0
  356. package/dist/cursor-seal.mjs +37 -9
  357. package/dist/dashboard-documents.d.mts +14 -6
  358. package/dist/dashboard-documents.mjs +32 -12
  359. package/dist/dashboards.mjs +10 -9
  360. package/dist/drill-access.mjs +6 -6
  361. package/dist/drill-change.mjs +18 -20
  362. package/dist/drill-comparison.mjs +2 -1
  363. package/dist/drill-crumbs.mjs +63 -28
  364. package/dist/drill-distinct.mjs +2 -1
  365. package/dist/drill-explain.mjs +1 -1
  366. package/dist/drill-items.mjs +1 -1
  367. package/dist/drill-open.mjs +39 -23
  368. package/dist/drill-seal.mjs +41 -13
  369. package/dist/drill-share.mjs +1 -1
  370. package/dist/drill-summary.mjs +2 -1
  371. package/dist/drill-targets.mjs +4 -4
  372. package/dist/drill-views.mjs +4 -3
  373. package/dist/drill.mjs +1 -1
  374. package/dist/editing.mjs +5 -3
  375. package/dist/endpoints/index.d.mts +29 -8
  376. package/dist/endpoints/index.mjs +4 -1
  377. package/dist/endpoints/meta.mjs +4 -3
  378. package/dist/endpoints/query.mjs +5 -2
  379. package/dist/endpoints/read.mjs +7 -6
  380. package/dist/endpoints/versions.mjs +2 -1
  381. package/dist/execute.d.mts +3 -0
  382. package/dist/execute.mjs +23 -12
  383. package/dist/grant.d.mts +9 -0
  384. package/dist/grant.mjs +43 -0
  385. package/dist/handler.mjs +8 -13
  386. package/dist/http.d.mts +6 -2
  387. package/dist/http.mjs +6 -2
  388. package/dist/index.d.mts +25 -4
  389. package/dist/index.mjs +91 -40
  390. package/dist/llms.txt +3 -3
  391. package/dist/mcp/api.mjs +2 -1
  392. package/dist/mcp/query.mjs +3 -8
  393. package/dist/mcp/resolve.mjs +9 -2
  394. package/dist/node/index.d.mts +36 -0
  395. package/dist/node/index.mjs +89 -0
  396. package/dist/node/request.d.mts +12 -0
  397. package/dist/node/request.mjs +119 -0
  398. package/dist/node/response.mjs +58 -0
  399. package/dist/principal.mjs +15 -7
  400. package/dist/react/Canvas.mjs +88 -67
  401. package/dist/react/Cell.mjs +2 -1
  402. package/dist/react/Dashboard.d.mts +9 -1
  403. package/dist/react/Dashboard.mjs +42 -42
  404. package/dist/react/DashboardList.mjs +9 -4
  405. package/dist/react/Editing.d.mts +9 -0
  406. package/dist/react/Editing.mjs +8 -3
  407. package/dist/react/Grid.mjs +1 -1
  408. package/dist/react/Header.mjs +4 -35
  409. package/dist/react/History.mjs +3 -2
  410. package/dist/react/LoadFailed.mjs +59 -0
  411. package/dist/react/Panel.d.mts +1 -1
  412. package/dist/react/Panel.mjs +1 -1
  413. package/dist/react/Parts.d.mts +34 -0
  414. package/dist/react/Parts.mjs +9 -6
  415. package/dist/react/ReviewPanel.mjs +1 -1
  416. package/dist/react/RowBody.d.mts +2 -0
  417. package/dist/react/RowBody.mjs +5 -1
  418. package/dist/react/Share.mjs +153 -0
  419. package/dist/react/TabStrip.mjs +37 -0
  420. package/dist/react/Tile.d.mts +3 -1
  421. package/dist/react/Tile.mjs +89 -92
  422. package/dist/react/TileState.mjs +117 -0
  423. package/dist/react/ago.mjs +45 -0
  424. package/dist/react/arrange.mjs +1 -1
  425. package/dist/react/board.mjs +2 -2
  426. package/dist/react/bucket-name.d.mts +8 -0
  427. package/dist/react/bucket-name.mjs +13 -0
  428. package/dist/react/builder/DisplayOptions.mjs +219 -0
  429. package/dist/react/builder/Preview.mjs +13 -13
  430. package/dist/react/builder/RangeEditor.mjs +4 -3
  431. package/dist/react/builder/WidgetBuilder.d.mts +1 -7
  432. package/dist/react/builder/WidgetBuilder.mjs +12 -3
  433. package/dist/react/builder/base.d.mts +13 -2
  434. package/dist/react/builder/base.mjs +70 -12
  435. package/dist/react/builder/display.d.mts +3 -0
  436. package/dist/react/builder/display.mjs +256 -0
  437. package/dist/react/builder/labels.mjs +19 -5
  438. package/dist/react/builder/options.mjs +11 -6
  439. package/dist/react/builder/state.mjs +25 -3
  440. package/dist/react/builder/useBuilder.d.mts +7 -1
  441. package/dist/react/builder/useBuilder.mjs +6 -9
  442. package/dist/react/builder/usePreview.mjs +3 -2
  443. package/dist/react/builder/words.d.mts +16 -1
  444. package/dist/react/builder/words.mjs +41 -1
  445. package/dist/react/change-text.mjs +149 -0
  446. package/dist/react/client.d.mts +9 -0
  447. package/dist/react/client.mjs +105 -14
  448. package/dist/react/context.d.mts +24 -3
  449. package/dist/react/context.mjs +23 -7
  450. package/dist/react/dates-shown.mjs +76 -0
  451. package/dist/react/draft.mjs +3 -2
  452. package/dist/react/drill/Bars.mjs +12 -16
  453. package/dist/react/drill/Comparison.mjs +1 -1
  454. package/dist/react/drill/DrillPanel.d.mts +1 -1
  455. package/dist/react/drill/DrillPanel.mjs +2 -1
  456. package/dist/react/drill/Header.mjs +65 -12
  457. package/dist/react/drill/Items.d.mts +1 -1
  458. package/dist/react/drill/Notes.mjs +10 -7
  459. package/dist/react/drill/PanelStates.mjs +8 -1
  460. package/dist/react/drill/Trend.mjs +10 -5
  461. package/dist/react/drill/board.d.mts +1 -1
  462. package/dist/react/drill/host.mjs +4 -1
  463. package/dist/react/drill/lazy.mjs +2 -27
  464. package/dist/react/drill/props.d.mts +17 -7
  465. package/dist/react/drill/props.mjs +55 -14
  466. package/dist/react/drill/state.d.mts +15 -5
  467. package/dist/react/drill/state.mjs +12 -3
  468. package/dist/react/drill/words.d.mts +46 -3
  469. package/dist/react/drill/words.mjs +30 -5
  470. package/dist/react/english.mjs +33 -8
  471. package/dist/react/export/ExportButton.mjs +4 -1
  472. package/dist/react/export/csv.d.mts +7 -2
  473. package/dist/react/export/csv.mjs +24 -7
  474. package/dist/react/failure-words.mjs +60 -0
  475. package/dist/react/filters/bar.d.mts +1 -1
  476. package/dist/react/filters/bar.mjs +4 -1
  477. package/dist/react/filters/calendar.mjs +23 -8
  478. package/dist/react/filters/chip.mjs +7 -3
  479. package/dist/react/filters/context.d.mts +13 -1
  480. package/dist/react/filters/context.mjs +1 -1
  481. package/dist/react/filters/dates-said.mjs +57 -0
  482. package/dist/react/filters/days.d.mts +3 -4
  483. package/dist/react/filters/days.mjs +10 -17
  484. package/dist/react/filters/hooks.d.mts +11 -0
  485. package/dist/react/filters/hooks.mjs +10 -6
  486. package/dist/react/filters/menu-search.mjs +17 -9
  487. package/dist/react/filters/menu.mjs +10 -8
  488. package/dist/react/filters/phone.mjs +41 -16
  489. package/dist/react/filters/place.mjs +40 -0
  490. package/dist/react/filters/popover.mjs +18 -13
  491. package/dist/react/filters/rules.d.mts +4 -3
  492. package/dist/react/filters/rules.mjs +3 -3
  493. package/dist/react/filters/sheet.mjs +7 -3
  494. package/dist/react/filters/state.mjs +6 -1
  495. package/dist/react/filters/values.mjs +24 -7
  496. package/dist/react/filters/words.d.mts +13 -0
  497. package/dist/react/filters/words.mjs +5 -0
  498. package/dist/react/format-time.d.mts +17 -6
  499. package/dist/react/format-time.mjs +152 -33
  500. package/dist/react/format.d.mts +3 -3
  501. package/dist/react/format.mjs +27 -133
  502. package/dist/react/headline.d.mts +6 -3
  503. package/dist/react/headline.mjs +81 -25
  504. package/dist/react/index.d.mts +19 -17
  505. package/dist/react/index.mjs +12 -10
  506. package/dist/react/lazy.mjs +38 -0
  507. package/dist/react/messages.d.mts +78 -2
  508. package/dist/react/now.mjs +38 -0
  509. package/dist/react/read.d.mts +1 -0
  510. package/dist/react/read.mjs +140 -9
  511. package/dist/react/renderers/exact.mjs +31 -59
  512. package/dist/react/renderers/index.d.mts +27 -6
  513. package/dist/react/renderers/index.mjs +141 -102
  514. package/dist/react/renderers/list-parts.mjs +24 -0
  515. package/dist/react/renderers/list.d.mts +1 -0
  516. package/dist/react/renderers/list.mjs +99 -43
  517. package/dist/react/renderers/more-rows.mjs +75 -0
  518. package/dist/react/renderers/number-before.mjs +320 -0
  519. package/dist/react/renderers/number-period.mjs +54 -0
  520. package/dist/react/renderers/number-whole.mjs +29 -0
  521. package/dist/react/renderers/props.d.mts +24 -1
  522. package/dist/react/renderers/props.mjs +8 -0
  523. package/dist/react/renderers/table-cells.mjs +137 -31
  524. package/dist/react/renderers/table-fit.mjs +55 -10
  525. package/dist/react/renderers/table-measure.mjs +29 -9
  526. package/dist/react/renderers/table-row.mjs +14 -9
  527. package/dist/react/renderers/table-scale.mjs +2 -3
  528. package/dist/react/renderers/table-sort.mjs +3 -2
  529. package/dist/react/renderers/table-whole.mjs +37 -0
  530. package/dist/react/renderers/table.mjs +73 -53
  531. package/dist/react/review.d.mts +7 -0
  532. package/dist/react/review.mjs +35 -8
  533. package/dist/react/roving.d.mts +6 -0
  534. package/dist/react/roving.mjs +123 -0
  535. package/dist/react/says-dates.d.mts +7 -0
  536. package/dist/react/says-dates.mjs +51 -0
  537. package/dist/react/series.mjs +5 -6
  538. package/dist/react/stable.mjs +1 -1
  539. package/dist/react/tabs/EditTabs.mjs +125 -0
  540. package/dist/react/tabs/NameField.mjs +72 -0
  541. package/dist/react/tabs/TabMenu.mjs +175 -0
  542. package/dist/react/tabs/actions.mjs +37 -0
  543. package/dist/react/tabs/commands.mjs +76 -0
  544. package/dist/react/tabs/focus.mjs +22 -0
  545. package/dist/react/tabs/keys.mjs +28 -0
  546. package/dist/react/theme-unlayered.css +1 -1
  547. package/dist/react/theme.css +1 -1
  548. package/dist/react/tile-store.d.mts +4 -0
  549. package/dist/react/tile-store.mjs +93 -13
  550. package/dist/react/touch.d.mts +16 -0
  551. package/dist/react/touch.mjs +39 -0
  552. package/dist/react/useBoard.d.mts +6 -0
  553. package/dist/react/useBoard.mjs +1 -0
  554. package/dist/react/useDashboard.d.mts +2 -0
  555. package/dist/react/useDashboard.mjs +5 -2
  556. package/dist/react/useTiles.d.mts +3 -0
  557. package/dist/react/useTiles.mjs +73 -17
  558. package/dist/react/view-grid.mjs +2 -2
  559. package/dist/react/view.mjs +1 -1
  560. package/dist/recharts/axes.mjs +1 -1
  561. package/dist/recharts/axis.mjs +23 -73
  562. package/dist/recharts/bar.d.mts +2 -1
  563. package/dist/recharts/bar.mjs +140 -64
  564. package/dist/recharts/fit.mjs +33 -0
  565. package/dist/recharts/line.mjs +21 -15
  566. package/dist/recharts/marks.mjs +2 -1
  567. package/dist/recharts/parts.mjs +16 -13
  568. package/dist/recharts/table.mjs +8 -3
  569. package/dist/refusal.mjs +46 -0
  570. package/dist/registry/filter-bar.json +1 -1
  571. package/dist/skills/derive-dashboards/SKILL.md +23 -8
  572. package/dist/tile-doc.mjs +1 -1
  573. package/package.json +21 -6
  574. package/dist/charts-react/plan.d.mts +0 -3
  575. package/dist/charts-react/plan.mjs +0 -37
  576. package/dist/charts-react/tiles.d.mts +0 -24
  577. package/dist/core/policy/match.d.mts +0 -16
  578. package/dist/core/schema/aliases.d.mts +0 -7
  579. package/dist/core/time/compare.d.mts +0 -30
  580. package/dist/react/EditBar.d.mts +0 -16
  581. package/dist/react/History.d.mts +0 -30
  582. package/dist/react/ReviewPanel.d.mts +0 -15
  583. package/dist/react/digits.mjs +0 -46
  584. package/dist/react/drill/trend-touch.mjs +0 -33
  585. package/dist/react/renderers/exact.d.mts +0 -6
package/CHANGELOG.md ADDED
@@ -0,0 +1,513 @@
1
+ # derive-dashboards
2
+
3
+ ## 0.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 7659231: Fixes from the 20 Nov audit.
8
+
9
+ Breaking:
10
+ - `derive-dashboards/core`: `MICROS_PER_DAY` and `Micros` are `bigint`; `bucketLabel` and `formatTextTime` take `bigint` microseconds and `parseTextTime` returns them.
11
+ - `derive-dashboards/core`: `bucketLabels`, `bucketStart`, `nextBucketStart`, `shiftBucket`, `shiftInstant`, `inSpan`, `resolveRange`, `momentMicros`, `MICROS_PER_SECOND`, `MICROS_PER_HOUR`, `comparisonQuery`, `comparisonSpan`, `isZone` and `EXACT_LIMIT` are removed; use `requestInstant(now, quantumSeconds)` for a request's instant and `bucketLabel` for a bucket's label.
12
+ - An exact quotient (an average, a ratio, a calc) rounds a tie half away from zero, as every number on screen does, not half to even.
13
+ - `derive-dashboards/core/conformance`: `timeValue` returns `bigint` microseconds.
14
+ - `derive-dashboards/react`: `TileDrill.compare` is `TileDrill.compareGroups`.
15
+ - `derive-dashboards/core`: `CreateDash` is removed.
16
+ - `derive-dashboards/core/schema`: `positional` is removed.
17
+ - `derive-dashboards/core/schema`: `wireQueryShape` is removed; use `wireQuerySchema`.
18
+ - Unknown keys are refused at every depth, in options, documents and request bodies.
19
+ - A `viewer()` result that is neither a viewer nor `null` is refused as `VIEWER_INVALID`.
20
+ - `derive-dashboards/core/engine`: the drill internals are removed (`KEY_FIELD`, `ROW_COUNT`, `breakdownQuery`, `composeDrill`, `countQuery`, `distinctQuery`, `drillMeasure`, `drillModel`, `drillOwner`, `flagCell`, `formulaParts`, `itemsShape`, `keptPath`, `lineFilter`, `lineScopes`, `lineSemantics`, `measuresOnly`, `offeredMembers`, `parentQuery`, `pathFields`, `population`, `rowSelection`, `scopeSteps`, `scopedLines`, `stepMembers`, `storedCell`, `summaryQuery`, `trendDimension`, `trendQuery` and their types).
21
+ - `derive-dashboards/core/schema`: `keySchema` is removed.
22
+ - `derive-dashboards/core`: `plainDecimalText`, `isInstant`, `INSTANTS`, `readTime`, `readExact`, `parseDate`, `parseNaiveTime`, `offsetSegments`, `resolveNaive`, `startOfDate` and `OffsetSegment` are removed; all but `plainDecimalText`, `isInstant`, `INSTANTS` and `OffsetSegment` stay on `derive-dashboards/core/conformance`, where `startOfDate` and `resolveNaive` return `bigint` microseconds.
23
+ - `derive-dashboards/react`: `formatBucket(label, grain, locale, { timeZone, withYear })` takes an options object as its fourth argument, and names an hour in the zone.
24
+ - `derive-dashboards/core/oracle`: a `data` key that names no source of the model is refused as `QUERY_INVALID`.
25
+
26
+ Also:
27
+ - One number writer for every kit.
28
+ - Unreadable stored values are counted as `VALUE_UNREAD`, with status `partial`.
29
+ - Typed start-up errors (`StartError`).
30
+ - One mark budget for charts, and chart kinds tree-shake.
31
+ - `derive-dashboards/core/schema`: `viewerSchema`.
32
+ - `derive-dashboards/charts`: `timeBuckets(start, { rows, at, series })` makes the whole `TimeTable` from your own rows.
33
+ - Documents may leave out `specVersion`, `tabs`, `controls` and `scope`; a widget on no tab is placed by its kind (a number 3x2, others 6x4).
34
+ - `derive-dashboards/charts`: a currency that is no ISO 4217 code and a locale that is not one are refused with `ChartInputError`.
35
+ - React tables name an hour bucket in the dashboard's zone, as the chart tiles do.
36
+ - `derive-dashboards/react`: `<DashboardsProvider tiles>` takes tile answers read on the server, drawn in its HTML and hydrated with no refetch; a measure over an `elapsed` reads as a duration (`durationUnits`, chart `Measure.units`, `Scene.wants`, `Words.against`).
37
+ - ca4ec7e: A change against the period before can be drawn for the better or the worse. A number tile's arrow and size were always in ink, and a table's column of changes in the cell's ink, since nothing said whether more of a measure is good: more revenue is, more churn is not. A measure now takes `better: "higher"` or `better: "lower"` in the model, and a query's calc takes the same `better`, read from the calc alone (a formula can turn the sign around); a query's measure entry does not, its measure's is the model's. An answer's column carries it as `better`. Where it is said, a number tile's arrow and size are marked `data-better="true"` or `"false"` and drawn in `--dd-good` or `--dd-danger`, the arrow's `title` says "better" or "worse", and the mark's spoken name says it too ("Sales up 14% (+462, better) from 3,189"); a table's cell of a change is marked and coloured by its own sign, with the word for a screen reader after the value. Nothing is coloured unless the model or the query says which way is better. Any other value of `better` is refused by the model check (`MODEL_SHAPE`) and the query schema.
38
+
39
+ Two words are new, `messages.changeBetter` and `messages.changeWorse`, and `changeSaid` receives an optional `better` (`"better"` or `"worse"`), so a translation written before still compiles; it says nothing of better or worse until it reads that field.
40
+ - ca4ec7e: The widget builder now sets how a tile looks. Under Options a person picks a number's main and second figure, ticks which of a table's columns draw bars or are shaded, draws its rows closer, writes amounts in full, picks a list row's title, subtitle, avatar, number and link, a bar's mark to read against, an area's shares and small multiples' own scales, and, for every kind, keeps the tile's own dates and says what it shows with no data. A widget opened for editing shows the options it was given and saves them back unchanged. An option that names an entry removed from the query, or that a new kind does not take, is dropped in the same change, so the builder never saves a display the server would refuse, and a line beside the preview says which options were cleared. A host's own display keys are kept as they were. Colours are kept on a kind that takes them and go with a change to one that does not, and a table's comparisons go with a change to any other kind and where the server would refuse them: all of them on a table left with no group or moved to another source, and any by a field the table now groups by. So a widget the builder saves, copied as JSON into a dashboard in code, is one that dashboard starts with.
41
+
42
+ A list's line under its title is ticked as the tile draws it: left alone, the tile writes every group the row does not show elsewhere, and those boxes are ticked. Unticking them all saves `subtitle: []`, which is a row with nothing under its title.
43
+
44
+ The Options' words are in `messages`: `optionNames` and `optionHelp` (by option name; give only the ones you translate), `optionAutomatic`, `optionNone`, `nothingToSet` and `optionsCleared(names)`. `messages.keptAside`'s `display` flag now means a display option the builder does not offer for the kind (colours, comparisons, a host's own), where it meant any display at all: English says "its other display settings", and a translation that says "its display settings" should say the same.
45
+
46
+ For an editor of your own, `derive-dashboards/core` exports the rules the builder reads: `displayOptionsOf(kind)`, `SHARED_OPTIONS`, `namesValues(kind, option)`, `entryNamed(query, name)`, `entriesNamed(query, value)`, `comparisonsByQuery(query, comparisons)` and `refusedDisplayOptions(widget)`, with the types `OptionType`, `DisplayOptionName` and `ByQuery`.
47
+ - ca4ec7e: A change is written with its sign whatever it is a change of. A calc that reads the period before is a change, and its rises were given a plus only when it was a percent: a column of changes in points read "2.32" over "−0.72". It now reads "+2.32", an amount "+$340.03", a time "+1.5 min"; no change is "0" with no sign. An axis tick of a change has its sign too (`formatTick`). `signOf(column)` in `derive-dashboards/core` is the rule itself, as the `Intl.NumberFormat` option a writer of your own takes.
48
+ - ca4ec7e: A drill crumb over a row of several fields changed shape. It was one text, the fields' values joined on the server ("Discount · HALF_OFF_1M · null"), in `value`. It is now `value: null` with one crumb a field in `parts`, each with its own label and value, one level deep; its `label` joins the fields' labels ("Offer type · Coupon"). The built-in drill panel reads the parts. A breadcrumb of your own over `useDrill().path` that wrote `value` writes "null" for such a step until it reads `parts` where there are any.
49
+ - ca4ec7e: Two things in a dashboard's header.
50
+
51
+ - **The filter bar's keys can be turned off.** F opens the Filter menu and Shift+F removes the last filter, anywhere on the page. A page with keys of its own passes `shortcuts: false`, and the Filter button then shows no key. `<Dashboard>` takes the bar's options as `filterBar` (`<Dashboard filterBar={{ shortcuts: false }} />`), so there is no wrapper to write; a bar of your own in `components.FilterBar` is handed them as props too. The count on that button ("+5") says what it counts, in its title and its name: "5 more filters" (`messages.filterBar.moreFilters`).
52
+ - **Share says "Link copied" without moving the header.** It was a line of text between the buttons, which pushed them along as it came and went. It hangs under the Share button now, over the page, and a press goes through it; on a phone it sits at the foot of the screen, inside the page's gutter. Where the clipboard is refused (an iframe without `clipboard-write`, plain http), Share opens a small panel with the link selected in a read-only field, its start in view, a line saying to copy it (`messages.shareCopyByHand`) and Close; Escape, Close, a press outside or focus moving out of it closes it, and a second press of Share closes it too. On a phone its field is 16px, so the browser does not zoom the page as it takes focus, and Close is 44px tall. The note, the panel and the line that says a dashboard cannot be read again take their shadow from `--dd-pop-shadow`, which a filter's popover follows (`--dd-fb-shadow`): `none` gives a flat skin.
53
+
54
+ Also: a period of one day reads as that day ("Nov 1"), not "Nov 1 to Nov 1"; and in a table, a group that is a number keeps its column's side when a row has none ("No pause months" sits under the numbers, not across from them).
55
+ - ca4ec7e: One filter control can reach the tiles of several sources. A filter narrowed only the tiles whose source had its field, and every other tile said "Not filtered by Plan", even when its own source carried a plan of its own under another name. A control now takes `also`, the same field on other sources: `{ kind: "filter", member: "session.plan", also: ["invoice.plan", "save.plan"], ... }`. A tile is narrowed through the first of `member` and `also` its source can read, and the pick is reported as dropped only where none can be. The control's label, type and listed values are `member`'s.
56
+
57
+ The names are checked: each must be a field of the model, on a source no other name of the control is on, and hold the same type of value as `member` (a text field read through a join, a bucket and a text expression all hold text), with the new issue code `CONTROL_FIELD` and, for a typo, the field it most likely meant. A measure named as a filter's field is said to be one ("is a measure, and a filter narrows by a dimension"), not called a name the model lacks. A dashboard in code that names a filter field the model does not have now stops the server (`DOCUMENT_INVALID`), as a wrong display option does; before, such a filter silently narrowed nothing. An edit that adds one is refused as `EDIT_REFUSED` with the same issue; a filter edit naming a missing field was refused as `QUERY_REFERENCE` before. With `defineDashboard`, an `also` field holding another type of value than `member` does not compile.
58
+
59
+ A name the model resolves is now only one it declares: `session.toString`, `session.__proto__` or `constructor.plan` is not a field, a measure or a join of any model, where before a filter control could name one, and `constructor.plan` stopped the server with a raw `TypeError`.
60
+
61
+ An edit's filter fields are asked of the host's `access.can` together, sixteen at a time at most, each once, where they were asked one after another: a save of a dashboard whose filters name many fields no longer waits for every answer in turn. The edit is still refused for the first field named that the editor may not read. An edit with a mistyped field asks the host only about the few members its refusal could name (the five fields nearest the typo, or the name itself when it is a measure; `controlFieldOffers`), never about every member of the model.
62
+ - ca4ec7e: **A changed default.** A dashboard whose viewers pick days to come (renewals, bookings, what is planned) passes `filterBar={{ futureDays: true }}` to keep them: `<Dashboard filterBar={{ futureDays: true }} />`.
63
+
64
+ The date control's calendar no longer lets a viewer pick a day after today. A range that ran into next month drew charts that looked broken, with nothing after today's bar. Days to come are dimmed, the arrow keys stop at today, and "Next month" is off while this month is shown. Today is the dashboard's own, in the zone its days are read in. A dashboard of what is planned passes `futureDays: true` to the filter bar (`(props) => <FilterBar {...props} futureDays />`). The registry's shadcn bar already kept days to come off; it now takes `futureDays` too and reads today in the dashboard's zone (`npx derive-dashboards add filter-bar --overwrite` brings a copy up to date).
65
+ - ca4ec7e: Mount the server on Express or plain `node:http` with `nodeHandler` from `derive-dashboards/node`: `app.use("/api/dashboards", nodeHandler(dashboards))`, or `createServer(nodeHandler(dashboards))`. It builds the fetch `Request` from the Node request (the full URL, every header, and the body whether it is still a stream or `express.json()` has already parsed it onto `req.body`), writes the `Response` back with every header kept (each `set-cookie` its own), and streams the body as it is made, so the tiles endpoint arrives a tile at a time and a slow client is never buffered for. When the viewer leaves, the request's signal aborts and the queries stop. An error before anything is sent goes to Express's `next`, or answers 500 and reaches `onError` without one; a failure partway cuts the connection rather than send an answer that looks whole. `x-forwarded-proto` and `x-forwarded-host` are read only with `{ trustProxy: true }`, for a proxy you run. An error that goes out before any byte carries none of the headers the handler's answer had set, and keeps the ones the app's own middleware set before the mount (its request id, its CORS header). `nodeHandler` takes what `deriveDashboards` returned or its `handler`, and refuses anything else as the mount is made, where a wrong argument failed every request with a bare 500. A request target sent in absolute form (`GET http://host/path`) is read by its path, the origin still the Host header's. A body another parser read is written out as JSON only when the request said it was JSON: a form read by `express.urlencoded()` is refused with `BODY_INVALID`, as it is on plain `node:http`. `nodeRequest(request)`, from the same entry, is the Node request a fetch `Request` was built from, so a `viewer` reads who the app's own middleware signed in (`req.user`) instead of checking the session again.
66
+ - ca4ec7e: A number tile says how its number moved against the period before as a reader takes it in. It read "+462 from 3,189", in grey. It now reads "↑ 14% from 3,189 in the 13 weeks before": an arrow (and "up" or "down" for a screen reader), the change as a share of where the number was, what it was, and the period's length when that is the period just before the answer's own. A rate's change is in points ("↑ 2.2 pts from 41.8%"), never a percent of a percent. A number tile's rate, and what it was, keep a tenth of a point from ten percent up ("25.2%", where a table's cell reads "25%"): written whole, a tile read "25%" over "down 0.5 pts from 25%". `formatHeadline` writes a rate so too. From nothing, from less than nothing, and where the share is under a twentieth of a percent or a hundredfold and more, the change is said as the amount ("↑ 17 from 0"). The change as it is, is the line's `title` and is in the mark's spoken name ("Revenue up 14% (+462) from 3,189"): an exact amount's with every digit it holds ("+1.23456789" where a cell would write 1.23), money with its cents.
67
+
68
+ A rate's change is written to a tenth of a point, a smaller move to a hundredth ("↑ 0.01 pts"), and one smaller than that as "↑ less than 0.01 pts", never as "0 pts"; its change as it is, is in points too ("+2.2345 pts" where the line says 2.2). Two floats' change is written by the digits each is written in, rounded to the twelve figures a float keeps, so 0.440000001 less 0.44 is 0.0000001 pts and never a float's 9.99999971718E−8, and 0.30000000000000004 less 0.1 is 0.2; a rate's move is rounded by those digits too, so half a tenth of a point is a tenth whatever rate it moved from. A column of floats is held to twelve figures though its values be whole numbers. A rate whose move no float holds gets no arrow, where it read as an infinite percent. What the number was is written as the headline over it is, so "$27,001" no longer stands over "from $26,999.99"; and where the number did not move, the mark's name sets the measure off ("Revenue: No change from 3,189"). Two floats that differ only past their twelfth figure did not move. A value that is no number (NaN, an infinity) gets no arrow: the line says only what the value was. The period is named only when it is the one just before, the answer's own period moved back a whole number of days: it ends where the answer's starts, or as far short of there as an answer that runs to now is short of whole days. A period of another length is not named (four days before a single day, 91 days before 92), and only a month, of 28 to 31 days, may differ from the month before it, by up to three days. A number a custom source sent as text is read as the headline reads it, so its change is no longer lost.
69
+
70
+ The line's words changed: `messages.beforeChange` and `beforeSame` are gone. `changeSeen`, `changeSaid` and `changeNone` are whole sentences, so a language can put what a number moved from before how far; `changeUp`, `changeDown`, `changePoints` and `changeUnder` are the words inside them. A host that translated `beforeChange` translates those.
71
+ - ca4ec7e: A number over time now shows its trend beside it. With the chart kit's renderers, a number tile whose query has a time grain draws the value it shows large, period by period, in a small box at the right of the number: columns for a count, a line ending in a dot for a rate, with the period still running drawn lighter or dotted. It has no axis or words of its own; each column or point has a tooltip, is reached by the arrow keys, and opens its rows. Without a time grain the tile is the plain number. A number widget takes `display.colors`, a colour for its measure by its label, which the trend is drawn in, so a number can wear the colour its measure has in the chart beside it. The chart alone is `courseChart`, exported from `derive-dashboards/charts`.
72
+ - ca4ec7e: A number over time shows the whole range, not its first bucket. A number tile whose query had a grain showed its first week as its headline, since a query by week has no total row. A query can now ask for its whole beside its buckets (`time: { grain, whole: true }`), and the widget builder asks for it on a number with a grain. The tile reads its large value, its second figure, its change and the line under it from that whole, and the large value and the line open the whole's rows. `NumberTile` takes a `course`, a small trend it lays beside the figures (under them in a narrow tile), and `headlineColumn` says which column of the rows by bucket that trend should draw. A tile's CSV writes the whole's rows after the rows by bucket, marked as the total.
73
+ - ca4ec7e: A query with a time grain can ask for its whole: `time: { ..., grain: "week", whole: true }`. The answer then carries, beside its rows by week, `whole.rows`: the answer of the same query without its grain, over the same range, read in the same database session, so each group's number over the whole range (a headline beside its weeks) comes from the database and from one snapshot, never from adding or averaging buckets, which is wrong for a rate or a distinct count. Its rows are in the answer's columns without the time column (`wholeAnswer(answer)` gives both), groups first, then Other, then totals, marked as rows are. With a comparison, `compare.whole.rows` is the comparison period's whole, cut to the groups the whole has. The whole stays complete when the row cap cuts the rows by week (the answer still says `truncated`), the receipt's `rowsReturned` counts its groups too, and a whole row drills (`drill.whole`, `drill.previousWhole`) into its group over the range. `time.whole` without a grain is refused with `QUERY_INVALID`, and a server from an earlier release refuses the field, so do not roll a server back after saving a document that uses it. The answer's shape changed (`CONTRACT_VERSION`), so pages and servers must be the same release, as for any change to an answer.
74
+ - ca4ec7e: A viewer whose session ended is told so, also where the sign-in layer redirects instead of answering 401. Most sign-in layers send a signed-out request to a sign-in page, which the browser follows, so the client got that page back: a 200 of HTML with no `dd-contract` header. It was read as a proxy stripping the header (`CONTRACT_MISMATCH`), or, with `schemas`, as an answer that did not parse, and the viewer was offered a "Try again" that could never pass. The client now asks with `redirect: "manual"`, so a sign-in page on another origin (Okta, Auth0, Cloudflare Access, Google IAP, oauth2-proxy) no longer fails CORS and reads as "Can't reach the server". A redirect is followed once, to see whose answer is behind it; a host's own `fetch` gets the same two calls. An answer with no `dd-contract` header that was redirected, a redirect the browser would not let the page follow and read, or the handler's own 401 (its host's `viewer` having found no one) is read as a viewer signed out: a redirect is a `NO_HANDLER` failure with status 401, like a sign-in layer's own 401: the page says "Your session may have ended. Sign in again, then reload." wherever it does for a 401, and the console says which request was redirected, and to where when the browser says. A handler's answer behind a redirect that keeps the method (a 307 or 308, or any redirect of a GET, such as a trailing slash) carries the header and is read as before. A 301, 302 or 303 in front of a POST turns it into a GET, which the handler refuses with its own 404; that is now a `NO_HANDLER` failure with status 404, so the page says it is not set up, and the console names the path asked, where the request ended, the handler's own words, and the fix: set `baseURL` to where the handler answers, or redirect with 307 or 308. A web page answered with an error status (a proxy's 503 page) keeps its status and its retry advice, also where a redirect led to it: only a redirect nobody could follow, or one that led to an answer of success, reads as a sign-in page. A request that was stopped stays stopped, and one that never arrived still says "Can't reach the server".
75
+
76
+ A dashboard already shown that cannot be read again because a sign-in layer turned the viewer away no longer says "Can't reach the server … it updates when the connection is back". It says "Your session may have ended. Showing what was last loaded; sign in again, then reload to update it." (`messages.dashboardSignedOutShown`). It says so too when only the tiles were turned away, as after a pick once the session ended. A tile that still shows its answer to the filters picked before says "Not updated for these filters. Sign in again to see it." (`messages.tileNotUpdated`) above its answer, so it is not taken for the answer to the new pick; its headline number and its chart's shapes are dimmed, its text never is, and each of its marks is described by that note for a screen reader. The dashboard's line saying the session may have ended sits after the tiles, held at the foot of the view, so it moves nothing above it. Neither the dashboard nor its turned-away tiles are asked for again on a timer any more, even while the timer asks again for other tiles the network failed; they are asked again when the viewer comes back to the page, comes back online, or presses a tile's "Try again".
77
+
78
+ `createDashboardsClient` takes `onSignedOut`, called when a request finds the viewer signed out: the handler's own 401, or something in front of the handler turning them away (each case above that reads as a 401 `NO_HANDLER`, and a sign-in layer's 403). Once, until a request is answered again, and never for a stopped request or the handler's own 403. `createDashboardsClient({ onSignedOut: () => location.assign("/sign-in") })` sends a signed-out viewer to sign in; a host's own `fetch` cannot, since it never sees a sign-in layer's redirect as a 401. The handler's own 401 on the tiles reads as signed out everywhere the page says so: the tiles say they are not updated under the banner, and are not asked for again on a timer, where they kept the old numbers under the new pick with no word.
79
+
80
+ A web page answered with success that no redirect led to is no sign-in page: it is most often the app's own page, which a single-page app sends for every path nothing is mounted at. It is a `NO_HANDLER` failure with status 404, the page says it is not set up, and `onSignedOut` is not called, where sending the viewer to sign in would loop. A 413 with no handler behind it is said as a body too large for something in front of the handler (a body parser's limit), not as a handler that is not mounted. Where a redirect led to the handler's own answer on the same site, the client asks there directly from then on: one request a call, where asking, meeting the redirect and following it took three.
81
+
82
+ A filter's list of values that found the viewer signed out says "Sign in again to load the values." (`messages.filterBar.valuesSignedOut`) with no Retry, which could never pass, and an empty list says "No values" (`noValues`) where nothing was typed, not that nothing matches “”. `useControlValues` answers `signedOut` beside `failed`. A tile not updated no longer says which filters did not reach it.
83
+ - ca4ec7e: A table's column of large amounts is written in whole units, as a headline is. A dashboard read "$1,491,464" in its headline and "$1,491,463.97" in the total of the table under it, with cents on every six-figure sum. A column of amounts or plain numbers is now set in whole units when every value in it is a thousand or more (or nothing): "$821,016". The value in full is the cell's `title` once the pointer is over it, and a CSV keeps every digit. A column with any smaller amount is left as it was: no amount in it is rounded. `display.full: true` on a table writes every column in full, as it does for a number tile.
84
+ - ca4ec7e: Editors can now add, rename, move and remove tabs in the page. While editing, the tab strip
85
+ shows even for one tab, with Add tab after the last one. Double-click a tab's name to rename it,
86
+ or open the small menu beside it to rename it, move it left or right, or remove it. Removing
87
+ asks first and says how many tiles go with the tab, and the only tab cannot be removed. Every
88
+ change is a draft edit, so Undo, Redo and the review list cover it. A name another tab already has is refused as an empty one is, whatever its capitals and however its accented letters are written, the selected tab is the strip's one Tab stop with the arrow keys, Home and End moving between tabs, and screen readers hear the question before a tab is removed; while it is asked, the Remove item reads "Yes, remove".
89
+
90
+ The strip's words are in `messages`, for a host that translates its UI: `addTab`, `newTab(n)`, `tabName`, `tabNameEmpty`, `tabNameTaken(title)`, `tabOptions(title)`, `renameTab`, `moveTabLeft`, `moveTabRight`, `removeTab`, `removeTabAsk(title, tiles)`, `removeTabYes` and `lastTab`. A tab's name takes at most 500 characters, as the server does: the limit is `TITLE_MOST` in `derive-dashboards/core`, which the dashboard's and a widget's title fields stop at too, and a widget added with a longer title is refused as one renamed to it is. The editor's strip is loaded when editing starts, so a reader's page does not download it.
91
+ - ca4ec7e: A tile whose answer to a new pick did not arrive says so. When the request for the filters just picked never reached the server, or the server failed it, the tile kept the numbers of the filters before under the new pick's chip with no word, until the next try (fifteen seconds on) brought the answer. It is now marked as a tile a sign-in layer turned away is: its headline number and its chart's shapes are dimmed, and a note over it says "Not updated for these filters yet. Trying again." (`messages.tileNotUpdatedYet`). The note goes when the answer is in. The note stays until that tile's own answer is in, through a try that has answered other tiles, and the dashboard says how many tiles are not updated once, in a status region a screen reader hears (`messages.tilesNotUpdatedYet(tiles)`).
92
+ - ca4ec7e: A tile on a dashboard that is being read is as tall as what it holds. Before, every tile was the height of the rows it was given on the grid: a table or list with more rows than fit scrolled inside its tile, where a pointer with no scrollbar showed nothing was cut, and a funnel, ranked bars or a heatmap with few rows left the rest of its tile empty.
93
+
94
+ - A table draws its first 12 rows, Other and the total still under them, with a button for the rest where those rows would be, so what is read down the table adds up; once every row is drawn the button folds them back (`messages.showFirstRows`). A list draws its first 12 the same way (it has no Other or total row). A table by more than one field, or over time, keeps the Other and the total of the groups it draws, not of every group. No row scrolls inside the tile; a table too wide for it still scrolls sideways. When the button's last press draws the rest, a keyboard's focus goes to the first row it drew.
95
+ - Ranked bars, a funnel and a heatmap drawn by the charts kit (`CHARTS_RENDERERS`) are as tall as their rows ask, up to `--dd-fit-most` (560px), a new theme variable. The Recharts kit's charts keep the rows their tile was given.
96
+ - A chart over time keeps the rows its tile was given. While editing, every tile is still the box it was given.
97
+ - Tiles side by side still share the grid's rows, so they are as tall as the tallest of them: a short chart beside a long table has bare room under it. Give it a row of its own where that room would be large.
98
+
99
+ For a renderer of your own: `TileRendererProps.fit` is true while the dashboard is read; spread `fitted(fit)` on your root to be sized by what you draw (it is `data-fit="content"`). `<Chart fit>` sizes a chart of rows by its picture: the kind says the height it asks for as `Scene.natural`, and answers that alone, laying nothing out, when it is asked with `env.sizing`, so a chart with room for its rows is laid out once (one too narrow to draw a row is asked for a height and then laid out to find it has none; a heatmap of more rows than its cells allow at its width asks again once it is measured).
100
+
101
+ A value axis no longer throws for values a float's least normal step either side of zero.
102
+
103
+ ### Patch Changes
104
+
105
+ - ca4ec7e: A dashboard whose tiles mostly read every date says "All time", once, where it says its dates. A tab of lifetime figures read "Period: Each widget's own", which says nothing of what is shown. The date control (or the line under the tabs, with no control) now says "All time" when more than half of the tiles that read data cover no range; the tiles that do cover dates of their own still say them under their titles. "Each widget's own" is left for a dashboard whose tiles share nothing. A filter bar of your own is handed the same words as `FilterBarProps.span`: it may now be "All time" (`messages.tileAllTime`) where it was a range of dates or nothing, so show it as text.
106
+ - ca4ec7e: A chart of many rows draws quickly again. When ranked bars, a funnel, a dumbbell, a waterfall or a grid has more rows than room, it writes one line naming what it left out ("Not shown: Plan 28, Plan 29, 11 more"). It found how many names fit by measuring the whole line once for every count of names, so the time grew with the square of the rows: a 2,000-row bar chart at 600 by 300 took about 300 ms to lay out, and a 2,000-step funnel the same. It now finds that count by doubling from one name and then halving, measuring a few dozen short lines whatever the number of rows, and the same chart takes about 7 ms (0.9 ms at 200 rows). In the built-in words the line says exactly the words it said before, and so it does in a host's own `notShown` words of the same shape: two names parted by something wider than a digit (", ", " · ", "、"), then the count, written the same way whatever its number. Words that part names by nothing, or that say one left over in other words than many (", another" against ", 14 more not included"), can make a line narrower as it names more; there the line may name fewer than before, and it still fits.
107
+ - ca4ec7e: A name in Arabic or Hebrew that a chart cuts to fit keeps its ellipsis at the end it is read to. The ellipsis was set at the far right, where such a name begins, so a cut name read as if its start were missing. The whole name is still the cut one's title.
108
+ - ca4ec7e: A dashboard says the dates it is showing in its date control. With nothing picked the control read "Each widget's own" and the dates were a line of small print under the tabs; with a preset picked it read "Last 30 days" and no dates at all. It now reads the dates most tiles cover ("Aug 23 to Nov 20"; "showing Aug 23 to Nov 20" to a screen reader, so they are not taken for a pick), and beside a preset the dates it came to, in quieter type: on a wide screen, and on a phone in the filter row (where the date control is now always the first pill, set or not) and in the sheet. While tiles are still answering a pick of other dates, it says it is waiting where the dates will be ("…", and "loading dates" to a screen reader, `messages.filterBar.datesLoading`), and says dates only once most of the tiles have answered alike: the first tile to answer does not speak for the dashboard. The line under the tabs is drawn only where the bar does not say the dates.
109
+
110
+ "Most tiles" is now more than half of the tiles that read their data, those that read every date among them: one tile's dates are the dashboard's on a dashboard of one tile (it took two), and two tiles of five no longer speak for a dashboard whose other three read every date.
111
+
112
+ A bar of your own gets the same text as `FilterBarProps.span`: undefined when the tiles share no dates, null while the answers to another tab or to other dates are on their way. A bar that says it calls `useSaysDates()`, as the built-in bar and the shadcn copy do (so a bar that wraps the built-in one need do nothing); one that does not keeps the line under the tabs, so an older copy of the shadcn bar loses nothing. Run `add filter-bar --overwrite` to get the copy that says the dates.
113
+
114
+ A tile that reads every date whatever is picked says "All time" (`messages.tileAllTime`) where its dates would be, wherever the dashboard says dates of its own or the viewer has picked some, so a lifetime figure is not taken to cover those dates or to be broken. A tile the viewer may not see says nothing of dates.
115
+ - ca4ec7e: A drill's Breakdown of the change writes how each group moved as the line itself is written. A rate's change was the raw difference of two fractions ("7.6%, was 12%, −0.041") and an amount's had lost its currency ("$821.50, was $700, +121.50"). A rate's change is now in points ("−4.1 pts", to a tenth; a smaller move to its first figure, "+0.04 pts"; none at all is "0 pts", with no sign; one that is no number is written as no value) and an amount's is an amount ("+$121.50"), in the rows and in the line over them ("vs 25%, −0.5 pts"). The panel's rate keeps a tenth of a point as the tile's does, with no coarser "value in full" behind it, and the value that was clicked is written the same way, so the panel says a value moved only when it did.
116
+ - ca4ec7e: A heatmap now draws a legend under its rows: the least value, a ramp from the palest shade to the
117
+ deepest, the most value and the measure's name, so a grid whose cells are too small for their
118
+ numbers can still be read. A heatmap by two fields names the field across over its column
119
+ names, as it already named the field down over its row names, and in a narrow tile it names
120
+ every column, each name cut to its column, where it named only the first and the last (dates
121
+ over time still do: a date cut short says no date). Its summary now names the lowest
122
+ cell as well as the highest, each where one cell alone reads lowest or highest: among cells
123
+ that read alike none is named, as no chart names a highest among equals. The legend's two
124
+ numbers are written short, as an axis tick is, or in full where short they would read alike
125
+ (1,001 and 1,004 are both "1K"); it is not drawn for a range of one value, or in a tile too
126
+ narrow for its numbers. Where it does not fit beside the row names it starts at the picture's
127
+ edge, under them, so a phone's grid keeps its key. `gridChart` checks `columnTitle` as it checks `rowTitle`. The table a screen reader is given is headed as the picture is: the field down in its corner, the field across over its columns. The legend's ramp has a hairline frame, so its palest step is seen on a dark tile.
128
+ - ca4ec7e: A list whose rows end in a time says how long ago each was: "41 min. ago", "3 hr. ago", "3 days ago", in the reader's language, kept up each minute, with the time itself as its `title`. It read "Nov 20, 2026, 9:02 PM", which in a tile a third of the page wide fell to a line of its own under each row. From a week away the date and time are written as before. A brief end (a number, a time ago) now keeps its place at the end of its row in a narrow list. A list that names its `title` and `meta` but no `subtitle` no longer writes under each name what the row already shows: the line is every group not drawn as the row's title, end or avatar.
129
+ - ca4ec7e: A table cell with no value in a column that is not the row's name is a dash. A table of offers repeated "No coupon" and "No pause months" down two columns, louder than the few values among them. The words are still the cell's `title` and what a screen reader is told, and a row whose own name is missing still reads "No owner".
130
+ - ca4ec7e: On a phone a tile's Rows and CSV are words without a box. There they are on every tile and always in sight, and two boxed buttons a tile were the loudest thing on the page. They are still 36 pixels to tap.
131
+ - ca4ec7e: Bars by category drawn by the Recharts kit (`RECHARTS_RENDERERS`) are as tall as their rows ask while a dashboard is read, as the charts kit's ranked bars are: 34px a row, with room for the value axis, up to `--dd-fit-most` (560px). A split's legend is drawn under the picture and adds its own lines to the tile's height, however many its names wrap to, so it never takes the rows' room. Before, they kept the rows their tile was given, so three bars stretched to fill a tall tile and thirty were squeezed into a short one. Past the most a tile grows, the rows are drawn thinner and every name is still written, so a chart of many more rows than about fifteen is hard to read; give it fewer rows (a top N with Other). Bars over time keep the rows their tile was given, and while a dashboard is edited every tile is still the box it was given. Where a split's parts stand side by side (a measure that does not add up), a row is as tall as its bars need, ten pixels a bar past three, so ten side by side are bars of six pixels and not hairlines in a row of 34.
132
+ - ca4ec7e: The Recharts kit's tooltip keeps a series' name and its value each in its own direction. A name in Arabic or Hebrew beside a number ran the two together, the number set inside the name. `theme.css` now isolates `.recharts-tooltip-item-name` and `.recharts-tooltip-item-value`.
133
+ - ca4ec7e: Small multiples are now as tall as a panel for every series asks, up to the most a tile grows,
134
+ so a phone shows all eight panels of an eight-series chart, two across, where it used to show
135
+ one and a line about the rest. The width alone says how many panels stand across, preferring
136
+ panels wide enough for every name; two stand across down to a tile about 260 pixels wide, while
137
+ each plot keeps its least width. Where a panel's name does not fit beside its value, every
138
+ panel writes its name on a line of its own with the value under it, so names are no longer cut
139
+ to make room for the number; only a name wider than its whole panel is still shortened.
140
+ - ca4ec7e: Two things about a table in a narrow tile.
141
+
142
+ - **A table a little too wide keeps its columns.** It became cards as soon as its columns did not fit a tile under 480px, so a four-column table in a half-width tile on a laptop was a card a row, three times as tall. It is first drawn tighter, still in columns: column names break over lines, words break before they push the numbers out, and bars are shorter. Only when that is not enough does it become cards, or scroll in a wider tile. The table says so as `data-layout="tight"`.
143
+ - **A card's value sits beside its column's name where cells open a drill.** The button that opens a cell took the whole width, so every value fell to the line under its label and a value's bar was lost. The button now holds the label too and lays the line as the cell does: label and value on one line, the bar under them, and the whole line opens the cell.
144
+ - ca4ec7e: Fixes for what a viewer saw wrong on a real dashboard.
145
+
146
+ - **An hour is written as a date and a time.** An hour's bucket was written as the instant it was sent as, `2026-03-11T12:00:00.000000Z`, in a table, a list and a drill's trend. It is now "Mar 11, 2026, 8:00 AM", in the zone the answer's days are cut in, and the hour a clock change repeats says which of the two it is ("1:00 AM EDT", "1:00 AM EST"), however far the clock is set back, from the one namer charts, tables and drills now share (`formatBucket`, given the zone). A renderer's props carry that zone as `timeZone`, and `formatCell(cell, column, props)` writes instants in it too, so a tile and its drill no longer write one time in two zones. With no zone an hour stays as sent: `formatBucket` no longer writes it in the zone of the machine it runs on; a time whose text names no zone is read as UTC, by `formatInstantAt` and `formatInstant` too. Nothing is read in the zone the code happens to run in: a drill's crumb for a time is named by its field until its answer, and so its zone, has come.
147
+ - **A drill into a row of several fields names each field.** Its title was the fields joined on the server, where an empty one read "null": "Discount · HALF_OFF_1M · null". The page now reads "Discount · HALF_OFF_1M · No pause months"; an empty text is named by its field too, and a number, however it was sent, says its field ("Pause months: 1").
148
+ - **The builder's preview draws its chart in the whole card.** The preview's title grew down the card and left the chart a strip at its foot, and a table one row.
149
+ - **A viewer is not shown setup advice.** When something in front of the handler answers with a 401 or a 403 (a session that ended), the page says "Your session may have ended. Sign in again, then reload." (`messages.dashboardSignedOut`). Where nothing is mounted at the path it says "This page is not set up to load it. The browser's console says why." (`messages.dashboardSetup`), with no "Try again" that could never pass. The client's `NO_HANDLER` advice goes to the console, wherever a request fails: loading a dashboard, making one, restoring a version, saving or reviewing a draft, previewing a tile, the tiles' answers, a drill. A tile or a drill a sign-in layer answered for says the session may have ended. A failure that may pass offers "Try again" and says whether waiting helps: "The server is busy. Try again in a moment." (`messages.dashboardBusy`) or "Something went wrong on the server." (`messages.dashboardServerFailed`).
150
+ - **A filter's panel stays on the screen.** It was placed by the size it is drawn at while it scales in, a little smaller than it is, so it ended past the viewport's edge; and by the window's width, which counts a scrollbar that takes room, so it could end under one. Where it does not fit from its chip's left edge it now hangs from the chip's right edge, and where it fits from neither it is kept inside the window.
151
+ - **A drill's large number is a headline.** An amount of a thousand or more is written as a number tile writes it unless told otherwise (`display.full`, which the drill does not read): in whole units for a currency of two decimal places or fewer, with the amount in full a pointer away and in the page for a screen reader.
152
+
153
+ ## 0.8.0
154
+
155
+ ### Minor Changes
156
+
157
+ - cd3f8b2: A new default look, so a dashboard reads well with no styling of the host's own.
158
+
159
+ A dashboard that is being read draws its tiles as one ruled sheet: the tiles share hairline rules with no room between, and `--dd-card-shadow` falls under the whole sheet. A place the layout leaves without a tile is bare sheet. `<Dashboard tiles="cards">` keeps each tile a card of its own with room between, as before. Tiles are always cards while editing.
160
+
161
+ The filter bar sits in the header, at the end of the title's row beside Share and Edit, and moves under the title when there is no room. A host's own `components.FilterBar` is mounted there too, as wide as its content; `docs/filters.md` has the rule that gives it a line of its own. A chip reads as one phrase, its field quiet and its value in ink, with no rules between its parts. Filter and a filter with nothing set are buttons of the same box. The Filter button says its F key quietly beside its name. A long title keeps its words: the filters and buttons move under it before it is cut.
162
+
163
+ The built-in chart palette is brighter: blue, orange, green, violet, pink and a slate blue, which is deep on the light theme and pale on the dark one. Each colour, and Other's grey, holds 3:1 on the card in both themes, and every pair of them stays apart (a CIE76 ΔE of 10 or more) in normal and simulated colour vision. Earlier each was held to the 4.5:1 of text, though no series colour is used for text.
164
+
165
+ A stacked area draws each band as a light tint, with every band's upper edge over the tints in the series' own colour, where it drew six near-solid fills. The edge tells one band from the next, and the grid shows through the tint.
166
+
167
+ A heat grid and a table's heat cells run from a faint tint to a much deeper shade (72% of the hue in a grid with its numbers written, 58% in a table and 62% in the row under the pointer, where both stopped near a third or a half). A grid told to wear another colour of the palette (`slot`) stops at 44%. The ink of a cell's number holds 4.5:1 on the deepest cell of every colour, in both themes.
168
+
169
+ The neutral colours take a slight cool tint and dark mode a deeper surface. Cards have no shadow by default. Titles, headline numbers and tables have new sizes and weights: a tile's title is 15px, a number's label is quiet above a larger value, the chosen tab is in ink at the weight of the others, and a table's numbers, heat cells among them, are regular weight beside a heavier first column and total row. A row's name keeps room for a few words in a narrow table, and a tile that scrolls shows a thin, quiet bar.
170
+
171
+ `THEMES` in `derive-dashboards/charts` carries the same colours for charts drawn outside a page.
172
+
173
+ On a phone a tile's padding is smaller a tile that is not a number is at least four rows tall, so a chart keeps a plot worth reading, and a long dashboard name wraps. The word Loading is no longer dimmed with what it replaces, and every header button has the accent focus ring. A dashboard's title has a tooltip, its name in full. A chart's tile does not scroll, so it is never left scrolled by a hair with an axis cut.
174
+
175
+ Buttons, filter chips, small boxes and pills take their corners from `--dd-radius` (`--dd-radius-control`, `--dd-radius-small`, `--dd-radius-pill`, each a variable of its own), where they were fixed at 8px, 6px and a full pill. A host that sets `--dd-radius: 0px` gets square controls too. `docs/react.md` has a new section on making a skin from variables alone.
176
+
177
+ `--dd-font-display`, when a host sets it, is the face of the dashboard's name, a tile's title and a number tile's large value; without it they are set in `--dd-font`. A chart's gridlines are drawn at 60% of the line colour, and a table bar's track is a tint of the bar's own colour, where both were the line colour at full strength: a host's heavy border no longer darkens a plot or a track.
178
+ - cd3f8b2: A number tile sets a large value in whole units. An amount or a plain number of a thousand or more is rounded to the unit, so 1,487,340.03 US dollars reads "$1,487,340"; this holds for a measure and for a calc alike. The number's `title` is the value as a table writes it (an amount with cents to two places, a whole amount with none), and what opens its rows is named by the number as it is seen. Values under a thousand, percents and durations are written as before, and so is every other place a number is written: the second figure, the period before, tables, charts and exports.
179
+
180
+ `display.full: true` on a number widget writes the large value in full whatever its size. `formatHeadline(cell, column, format)` is exported beside `formatCell`, for a tile of your own.
181
+
182
+ A value a driver sends as its text, in a measure or a calc of numbers, is written as any number of that column is: grouped, with its unit, to the places the column is written in. The text may have a plus before it, or a point with no digit before or after it. It was written as the raw text. A group that is a number (a year, an id) is still written as its text.
183
+
184
+ Every figure of a number tile writes a negative with a true minus, in the place the locale writes its sign: the large value, the change under it and the second figure. A currency written to three places (a dinar) keeps them, as a headline and everywhere an amount with a fraction is written, where every currency was cut to two.
185
+
186
+ The large value is sized by its tile's width and its own length (`--dd-chars`, set on it), so a long amount is set smaller, down to 14px, and past that goes onto a second line. It is never cut.
187
+ - cd3f8b2: A row that holds only number tiles is as tall as they are. While a dashboard is read on a screen wider than 720px, a row's height comes from its tiles: a tile asks for the rows it was given, whatever is in it, and a number tile asks for the lines it writes (at least 116px). A number beside a taller tile still fills its rows, and tiles keep their fixed rows while editing.
188
+
189
+ A placed tile carries `--dd-at-rows`, the rows it spans, beside `--dd-at-row`.
190
+
191
+ ### Patch Changes
192
+
193
+ - d2a328a: A day, week, month, quarter or year bucket starts at the later midnight where a zone's clocks fall back across midnight and so reach it twice (St John's did, at 00:01, until 2011). The day before is then one stretch of 25 hours with the minute after the first midnight in it, and no instant is in two buckets. Before, that hour sat in the day before by its label and in the next day by its bounds.
194
+
195
+ ## 0.7.1
196
+
197
+ ### Patch Changes
198
+
199
+ - 8f5642a: The English widget builder labels its time grouping “Group dates by” and the ungrouped option “Whole period”. The chart picker and accessible table captions use “Heatmap” and “Small multiples”.
200
+
201
+ Hosts that translate the builder can continue to override `breakdown`, `allTime`, `kinds.heatmap`, `kinds.multiples`, `chartTable`, and `removedCalcs` through the provider’s `messages`. Update label-based selectors and snapshots that use the old English text.
202
+
203
+ ## 0.7.0
204
+
205
+ ### Minor Changes
206
+
207
+ - 9c6113e: Refine the shared dashboard theme, table and list layout, chart palette and typography, heat cells, and tooltip spacing. The light dashboard canvas now uses #f7f8fa. Set `--dd-bg: var(--background)` to match the host page. Set `--dd-card-shadow` and `--dd-tooltip-radius` to style the cards and tooltips independently.
208
+
209
+ The built-in drill opens over the dashboard and keeps the originating chart at its original size. The records summary compares one field across rows, with every column available under All fields. Drill panels name the selected measure, label the active group and date range, and show record counts and sort order above a compact list or table. The trend displays its period and value on hover or keyboard focus.
210
+
211
+ Large record sets page through 100 records at a time in either layout. Choosing Rows on a phone opens Records directly. Hovering a period updates the trend caption without redrawing the columns. For a PostgreSQL comparison ranked by count with a distinct-customer measure, the database can now compute the named groups, Other and the total in a single statement.
212
+
213
+ The default English drill labels changed from Items to Records, List to Summary, Table to All fields, and See N to View details. A named measure now reads, for example, `59% of the total for “Accepted”`. An unnamed measure uses “of the tile total”. Hosts with label-based tests can update their selectors. Translations can set `drillMetricTotal`, `drillCompareGroup`, `drillGroupedBy`, `drillRecordPages` and `drillTrendWindow` in the provider’s messages.
214
+
215
+ Opening a drill reuses the server answer that identifies the selected row. The comparison table pins its group names when scrolling. Long trends keep at most 400 periods on screen, with earlier pages available at the same scale.
216
+ - 9c6113e: Table widgets can open grouped comparisons from specific row labels and expand a group by a second field. The built-in drill gives comparisons and full record tables a wide dialog. Clients that call the drill endpoint directly receive a `comparison` view with its measures and totals in `view.answer`. This view omits the single-measure `summary`.
217
+
218
+ Custom table renderers can open a group with `drill.compare` or create the initial state with `drillFrom(origin, drill, { row, view })`. Hosts can type the configuration with `ComparisonFields<Field>` and `DisplayOf<"table", Field>`. A code-defined dashboard that fails startup validation raises `DashboardDocumentError` with field-level issues.
219
+
220
+ ## 0.6.0
221
+
222
+ ### Minor Changes
223
+
224
+ - 89ca830: The package's own charts ship, as tiles and as plain functions, with four more kinds of chart.
225
+
226
+ - **`derive-dashboards/charts-react`**: `CHARTS_RENDERERS`, a chart kit to pass to `<DashboardsProvider renderers>` in place of the Recharts one, with nothing more to install. It draws `line` and `bar`, and four kinds the Recharts kit does not have: `area` (a stacked area, or each band's share of the whole), `multiples` (a small chart per series), `heatmap` (one value by two fields, or by one field over time) and `funnel` (steps in order). Each has a tooltip under the pointer and the keyboard, a table for a screen reader, drill on its values, and a second tap to open on a touch screen. Import `derive-dashboards/charts-react/chart.css` beside the theme (`chart-unlayered.css` beside `theme-unlayered.css`). `Chart` draws one yourself.
227
+ - **`derive-dashboards/charts`**: the charts with no React in them: data in, a picture out as SVG (`lineChart`, `barChart`, `columnChart`, `areaChart`, `multiplesChart`, `gridChart`, `funnelChart` and more, and `renderSvg`).
228
+ - **New display options, typed in `DISPLAY_OPTIONS`.** A bar's `against` names a query entry to read each bar against: a tick on the bar and a line in its tooltip, not a bar of its own. A name the query does not have is refused where a display is checked, as a number's `value` is. An area's `share: true` shows proportions for nonnegative splits with a positive total. Small multiples' `ownScales: true` gives each small chart its own value axis.
229
+ - **The widget builder names the new kinds** ("Area", "Small charts", "Heat grid", "Funnel"), and offers each one the provider can draw.
230
+
231
+ - **What a tile never does.** An area tile stacks only the parts of one split: separate measures are lines, and shares are read on nonnegative data with a positive total. A funnel's steps are the values read in one unit; over time it draws columns, and where a step is negative or rises, bars, so the number stays in sight. A tile with no value to draw says "No data". A chart's table for a screen reader is captioned by what was drawn.
232
+ - **Long ranges.** With more periods than pixels a line keeps the least and the most of each pixel column, columns share a column as tall as their average, and a heat grid's cells are the average of the periods they hold; each says so.
233
+ - **Browser bundle.** Importing `parseTextTime`, `parseExact` and `formatExact` from `derive-dashboards/core` leaves the calendar and decimal libraries out of the bundle. On a page already using `derive-dashboards/react`, adding the chart renderers cost 64.1 KiB gzip in the release build.
234
+
235
+ - **Histogram ranges.** A single bin keeps both endpoints in its summary and tooltip when the measure writes them differently, even for adjacent representable numbers. The axis labels both ends when they fit.
236
+
237
+ `Messages.chartTable` now takes any of the six kinds (`ChartKind`), so a translation that switched on `"line" | "bar"` should name the other four.
238
+
239
+ ### Patch Changes
240
+
241
+ - 89ca830: An average and a percentile measure can carry a `unit` (`unit: "USD"`), as a sum, a min and a max already could. An average of amounts is an amount: tiles write it "$347.01", where before the model check refused the field and the value read "347.01".
242
+ - f6a91dc: A person whose access rule applies but reads a list they hold empty (no websites, no teams yet) now gets empty answers (zeros, empty tables) instead of "You don't have access to this data" on every tile. They still read no rows; no rule that applies, a rule that says `"none"`, or a viewer value they do not have at all stays no access.
243
+ - f6a91dc: A filter test with `set` or `notSet` may leave out `values` (it reads none), in a document, a query or a request. A filter that does not fit says what is wrong and where (`all.0: values: ...`, `Needs `values`, `viewer` or `variable`.`, `Expected an object with `all`, ...`) instead of a bare "Invalid input".
244
+
245
+ ## 0.5.1
246
+
247
+ ### Patch Changes
248
+
249
+ - 02f0478: `derive-dashboards check` names a missing fold function. A dimension with `collation: "ci"` runs `derive_dashboards_fold` in the database; without it `check` passed and every query on that source failed. Now `check` reports `FOLD_FUNCTION_MISSING` on each such dimension, with the fix: run `foldFunctionSql()` once, as a migration, or make the dimension `"binary"`.
250
+ - 02f0478: Expose the `dd-contract` header to cross-origin pages (`Access-Control-Expose-Headers`), so a page served from another origin no longer fails with "could not be loaded" when the app's CORS allows it.
251
+ - 02f0478: Projects on TypeScript's older `moduleResolution: "node"` (NestJS and most CommonJS backends) resolve the types of every subpath (`derive-dashboards/core`, `/react`, `/mcp`, …) through `typesVersions`. The package check now holds that resolution, so it stays working.
252
+ - 02f0478: A row policy that compares a column with the viewer's values (`viewer: "id"`, `viewer: "attributes.teams"`) works on integer and uuid columns. Viewer values are text, so the policy compares the column's text form, code point for code point, the way a tenant column already does: "7" matches 7, and "07" never does. It used to pass `check` and then fail on the first query with `integer = text`. The oracle follows the same rule.
253
+ - 02f0478: The React parts run on React 18.2, as well as 18.3 and 19: the peer range is `^18.2.0 || ^19.0.0`, and `doctor` accepts 18.2. They use no API newer than 18.0; the React 18 check in CI now runs the oldest version claimed, 18.2.
254
+ - 02f0478: An exact measure over a source's own `sql` passes `check` when the SQL casts the column to `numeric(p, s)`. Postgres describes a query's result without its precision and scale, so `check` refused every decimal measure on such a source; the scale is now taken on the author's word, as the source's key is. A float column is still refused.
255
+ - 02f0478: Dashboards follow an app's dark mode when it is `class="dark"` on `<html>` (next-themes, shadcn, Tailwind's class strategy), as well as `data-theme="dark"`. Before, such an app showed white tiles and a near-invisible title on its dark pages; `data-theme="light"` still keeps them light.
256
+ - 02f0478: Ship `derive-dashboards/react/theme-unlayered.css`: the same theme outside its cascade layer, for apps whose reset is unlayered (Tailwind 3's preflight, bare `button {}` rules), which otherwise strips the filter bar's padding and borders.
257
+
258
+ ## 0.5.0
259
+
260
+ Not published by itself: 0.5.1 is the first release with these changes.
261
+
262
+ ### Minor Changes
263
+
264
+ - b03f846: An answer says whether each measure and calc adds up, and no chart stacks or sums what does not.
265
+
266
+ - **`additive` on every measure's and calc's column.** A measure says it by the model's merge rule: `true` for a count or a sum, whose parts make a whole; `false` for an average, a rate, a percentile, a minimum, a maximum or a distinct count. A calc says it by its formula: `true` for one value that adds up, times or over a constant, so a share of the total adds up; `false` for a rate, a constant offset, a previous value, and a sum or difference of two entries (a part may have one and not the other).
267
+ - **One reader, `addsUp(column)`, and one rule for an answer that does not say.** `addsUp` (from `derive-dashboards/core`) is true only where the column says `additive: true`. An answer from an older server, which does not say, is never stacked or summed. The bar tile and the chart library's tiles both read it.
268
+ - **A bar chart split by a second field stacks only where the value adds up.** In the bar tile the parts of an average or a rate now stand side by side: stacked, they reached a total that meant nothing.
269
+ - **The model check refuses a merge its kind cannot take** (`MEASURE_MERGE`). A count (without `distinct`) and a sum take `"sum"`; a min takes `"min"`; a max takes `"max"`; an average and a distinct count take only `"none"`; every kind takes `"none"`. A model that declares anything else (an average with `merge: "sum"`) no longer loads: `defineModel` throws and names the measure. Set its merge to one its kind takes. A percentile and a ratio take only `"none"` as before, refused as `PERCENTILE_MERGE` and `RATIO_MERGE`.
270
+
271
+ The contract version and the engine version change, so answers cached in the older shape or made by the older code are not read. Upgrade the server and the browser together: a browser on this release draws a split from an older server side by side until the server says what adds up.
272
+
273
+ For a renderer of your own: ask `addsUp(column)` before you stack or sum a split.
274
+ - b03f846: A number tile can show a second figure, and its widget can choose which value is large. `display.secondary` names a query entry shown smaller under the number, beside its label ("5,838" with "30% Save rate" beneath it). `display.value` names the entry shown large; without it the tile keeps its own choice: a calc that is not a change when the query has one, else the first value. Naming the query's one calc as `secondary` leaves the measure large. An entry is named as the widget's query names it, or by the id its column has in an answer; a name that is no measure or calc of the query is refused when a dashboard in code is loaded or an edit sets it.
275
+ - b03f846: Tables read better, and a viewer can sort them.
276
+
277
+ - **A new look.** The header is small, muted and set in capitals, and stays in sight while the tile scrolls. Rows are parted by a lighter rule and washed under the pointer. Other is muted, and the total is set apart by weight and a full rule above it. Words keep to one line with an ellipsis, and a cut text's whole self shows on hover; the first column of words takes the room the numbers leave. Yes and no are quiet badges, and a missing value is muted. The drill panel's records table gets the same look, with its numbers set to the right.
278
+ - **Sort by a click.** A column's header sorts its rows for that viewer: values largest first, words A to Z, then the other way, then the answer's own order. Other and the total stay under the rows, a row with no value is last either way, and amounts a float cannot tell apart are compared by their digits. Nothing is saved.
279
+ - **Bars and shading.** `display.bars` (a list of query entries) draws a bar in each cell of those columns, as long as the value is beside the column's largest; `display.heat` shades cells by their value; `display.compact` draws the rows closer together. An entry is named as the widget's query names it, or by the id its column has in an answer. A name that is no measure or calc of the query is refused when a dashboard in code is loaded or an edit sets it.
280
+ - **A table fits its tile.** It measures the room it has. Where its columns do not fit a tile under 480px wide, each row becomes a small card with each value beside its column's label. In a wider tile it keeps its columns and scrolls sideways under its first column, which stays in sight.
281
+ - **Long tables.** A table of more than 500 rows draws its first 500 with a button that draws 500 more at each press, so a long answer does not hold the page up.
282
+
283
+ New theme variables, each with a default: `--dd-line-soft`, `--dd-hover`, `--dd-table-pad-x`, `--dd-table-pad-y`.
284
+
285
+ `Messages` has two new words, `sortBy` and `showMoreRows`. A dictionary you pass as `messages` is laid over English, so nothing is needed there; an object you typed as a whole `Messages` needs both.
286
+
287
+ `sharedDisplay` gives only the two options every kind takes (`keepDateRange`, `empty`), typed `SharedDisplay`. Core exports `entryAliases(query)`: the id each entry of a stored query has in an answer.
288
+ - b03f846: A tile's answer can be saved as a CSV file. Every tile with rows has a CSV button beside Rows; the file is made in the browser from the answer the tile already holds, in the answer's order, and is named by the tile's title. Numbers are written as their own digits, as plain decimals, so an exact amount keeps every one and a spreadsheet reads a number; a money column's heading carries its currency and a duration's says seconds; a percent is in percent points with its sign. Fields are quoted as RFC 4180 asks, and a text that begins as a formula does is led by an apostrophe, your words for Other and a total included. The file's name is the title less what a file system refuses.
289
+
290
+ **On by default:** every tile with rows gets the button when you upgrade. `<DashboardsProvider csv={false}>` leaves it out. For a button of your own: `downloadCsv(title, csvOf(answer, messages))` saves the same file, and `csvOf(answer, messages)` and `exportRows(answer, messages)` give its text and its rows, all from `derive-dashboards/react`.
291
+
292
+ `Messages` has two new words, `csv` and `csvLabel`. A dictionary you pass as `messages` is laid over English, so nothing is needed there; an object you typed as a whole `Messages` needs both.
293
+
294
+ ### Patch Changes
295
+
296
+ - b03f846: A number that is not zero is never written as zero. A value too small for its two decimal places (0.0004, a share of 0.02%, $0.004) was written "0", "0.0%" or "$0.00" in tiles, tables and tooltips; it now keeps its first two figures, and under a millionth those with its power of ten (5.6E-17), on a chart's axis too. Zero, and every number its places already held, read as before.
297
+
298
+ A chart's value axis writes each tick in three figures. One decimal place had written the ticks 0.05, 0.1 and 0.15 all as "0.1", and 0.25 as "0.3".
299
+
300
+ ## 0.4.0
301
+
302
+ ### Minor Changes
303
+
304
+ - 77b2667: Small additions to `derive-dashboards/react`, for a renderer of your own:
305
+
306
+ - `pointText(answer, drawn, { point, series }, format)` gives the answer's own cell behind a point of a series, written as its column writes it. A tooltip that reads it shows an exact amount with every digit, where a number re-formatted from the chart's value can lose some. `pointCell(answer, drawn, { point, series })` gives the cell itself.
307
+ - `exactDigits(cell)` gives a cell's digits when they are exact ("12.50"), to add cells up without a float.
308
+ - `toSeries(answer).xAt(point)` is a point's raw x cell, and `.isOther(point)` says whether a point stands for the values a limit folded together, so a renderer can draw it grey and last.
309
+ - `formatInstantAt(text, grain, locale, timeZone)` names the bucket an instant starts, at its grain, in a zone.
310
+
311
+ The built-in chart table now reads `pointText`. What it shows is unchanged.
312
+
313
+ ### Patch Changes
314
+
315
+ - 77b2667: A chart no longer makes a narrow page scroll sideways. The table a chart keeps for screen readers was hidden by a class on the table itself, and a table takes the width of what it holds whatever width it is told, so on a phone the page grew as wide as the table. The table now sits in a hidden box.
316
+ - 77b2667: Tables and charts write their numbers faster: a number format is made once for a locale and a style, not once for every cell.
317
+
318
+ ## 0.3.0
319
+
320
+ ### Minor Changes
321
+
322
+ - 79cc2cb: Answers say what a chart needs, so no renderer works it out.
323
+
324
+ - **Columns have a `role`** (`time`, `dimension`, `measure`, `calc`). Renderers, the drill and the tables read it through `roleOf(column)`; nothing reads the first letter of a column's id any more, except `roleOf` itself for a column with no role (a drill link sealed by an earlier release, or an answer made one release back while a deploy rolls out).
325
+ - **Time as instants.** An answer with a time grain carries `time.buckets`: each bucket the rows name, with `from` and `to` as instants by the request's calendar (a 25-hour day across a clock change, the week on its own start day), and `partial` on a bucket the range covers only part of. `compare.time` is the same for the period before. `toSeries(answer).buckets` gives each point's bucket, for a real time scale, and `lastBucketOpen` reads the server's mark instead of working the bucket's end out in the browser, so hours and fiscal quarters are right too.
326
+ - **A series keeps its colour.** Each series has a `slot`, its place in the palette, which follows the series and not its position. In a chart split by one field, a filter that removes one series repaints no other, and a value has the same slot on every tile inside one `<Dashboard>` (a tile on its own keeps its own book; `SeriesSlotsContext` shares one across your own views). A field whose values the model declares places them in the model's order, the same on every load (`values` on the column); other fields keep their places while the page is open. Within one chart two series share a colour only past the palette's six (`chartColors`); once a page has drawn more than six values of one field, the later ones take whatever colour their chart has free, so theirs can differ between charts. A widget's `display.colors` still wins. A line's dash still goes by where it is drawn.
327
+ - **Typed display options.** The built-in kinds' options are a typed table (`DISPLAY_OPTIONS`, `displayOf`): an edit that sets or changes one to the wrong type is refused (`EDIT_REFUSED` with a `DISPLAY_INVALID` issue), a dashboard defined in code with one stops the server, and `/meta/schemas` lists each kind's options under `display`. Options stored before this release are read as before and never block an edit; unknown options and a host's own kinds are left alone.
328
+ - The result cache now keys on the contract version as well, and the engine version covers the core code that shapes an answer, so an answer cached in an older shape is never read.
329
+
330
+ For a renderer of your own: read `roleOf(column)`; `ResultColumn` now has a required `role`.
331
+ - 9c91808: Works with React 18.3 as well as React 19. The peer range for `react` and `react-dom` is now `^18.3.0 || ^19.0.0`. Nothing in the components used a React 19 feature; a few refs were typed in a way only React 19's types accept, and are now typed for both. CI runs the component and chart tests, and their type check, on React 18.3.1 beside React 19, and `derive-dashboards doctor` takes React 18.3. The filter bar that `derive-dashboards add` copies into an app still needs React 19.
332
+ - eb16be9: The model check refuses a field it does not know. A misspelt `where` used to count every row, and a misspelt `policy` to show every row, because a field the library did not read was left alone. `validateModel` and `defineModel` now name each such field at its place, say what was likely meant, and list the fields the object does have (`MODEL_FIELD_UNKNOWN`):
333
+
334
+ ```
335
+ sources.order.polcy: "polcy" is not a field of a source. Did you mean "policy"? Its fields are table, schema, sql, ...
336
+ ```
337
+
338
+ - Every object of the model is checked: sources, joins, measures and dimensions by kind, filters, expressions, policies and their rules, and every hint. Maps by name (sources, measures, tenant columns, tones) take any name.
339
+ - A model that passed with a stray field is now refused until the field is removed or spelt right. The field is named beside every other problem of the model, in one pass.
340
+ - A value that must be an object, a map or a list and is something else is `MODEL_SHAPE`. A rule's `when` written as a list has none of `when`'s fields, so the rule used to match everyone.
341
+ - An object that must hold one of a few fields and holds none (a tenant binding, a source's policy, an expression, a filter) is `MODEL_SHAPE` with the nearest field named, where it used to crash a later check.
342
+ - `tenant: { shared: false }` is refused: the engine read the field's presence, so it meant shared and dropped the tenant filter.
343
+ - An unknown key of `records` is `MODEL_FIELD_UNKNOWN`, not `MODEL_SHAPE`. `records.link` still says where it went.
344
+
345
+ ### Patch Changes
346
+
347
+ - ed3d017: Runs on Node 22.18 and later again. 0.2.0 raised the floor to Node 24, but the library uses nothing Node 24 added, and Node 22 is in long-term support until April 2027. CI runs its main checks on Node 22 and Node 24, and the type check uses Node 22's types, so an API only Node 24 has does not compile.
348
+
349
+ ## 0.2.0
350
+
351
+ ### Minor Changes
352
+
353
+ - 57d4bf3: Filters: every dashboard now has a modern filter bar by default, with no extra packages. One
354
+ chip per filter (field, is or is not, values, remove), the first four unset filters on the bar
355
+ and the rest in a Filter menu (F) that reads typed words ("stat rev", "last 90"), a searchable
356
+ value list with None, date presets with a two-month calendar read in the dashboard's time zone,
357
+ number ranges from the model's buckets, Undo, Reset, and a one-row bar with a sheet on phones.
358
+ Its styles are `dd-fb-*` classes and `--dd-fb-*` variables in the `derive-dashboards` layer, so
359
+ any host CSS wins. `FilterBar` takes `pinned`, `icons`, `renderMark` and `formatValue`; its words
360
+ are `messages.filterBar` (`ENGLISH_FILTERS`), and date presets use `messages.range`, whose
361
+ English now says "Today", "Last month" and "Previous 3 months". `filterRules`, `Popover`,
362
+ `useFilterFields` and `useControlValues` serve custom bars, and the provider takes
363
+ `components={{ FilterBar }}`. `npx derive-dashboards add filter-bar` copies a shadcn/ui version
364
+ into a shadcn app.
365
+
366
+ The react part now declares `react-dom` as a peer. `/meta` dimensions carry `tones`, `buckets`
367
+ and `unit`; lookup values come back in the model's declared order; a filter pick with `set` or
368
+ `notSet` takes no values. `FilterBarProps` gains the dashboard's `timezone`.
369
+
370
+ Breaking: `theme.css` is light unless the host sets `data-theme="dark"` (or `"system"` to follow
371
+ the viewer's OS) on `<html>`; it used to follow the OS by default. A dashboard that cannot load
372
+ shows the handler's reason for a refusal instead of a retry button.
373
+ - 326b81f: Needs Node 24 or later (was 22.18). Node 24 is the LTS every major host runs; CI tests on it.
374
+ - 73e253b: Dashboards look right by default, however they were saved.
375
+
376
+ - **Layout:** a viewer never sees a hole, an overlap or a squashed tile. Each kind of tile has a smallest size it reads at, and the editor's resize stops there too. Rows close their gaps and share any spare columns, and a tile beside a taller one matches its height. The saved layout is untouched (`viewLayout` in core).
377
+ - **Axes:** every value axis steps in round numbers from 0 (0, 50, 100, 150), counts in whole numbers, and reaches a stacked bar's total.
378
+ - **Bars by category lie down,** so every name is shown. Bars over time stand up.
379
+ - **The time bucket still running is marked "so far":** shaded on a line, faint on a bar, and named in the tooltip. It no longer reads as a fall.
380
+ - **The date range most tiles share is shown once,** under the filters. A tile shows its own range only when it differs.
381
+ - **The dashboard list opens again:** Copy link no longer covers its row. Rows are links, so Cmd-click opens a new tab, and each shows its description. The list response carries `description`.
382
+ - Larger headline numbers. The Draft label beside a long name is never cut off.
383
+
384
+ ### Changes
385
+
386
+ - A query's own filters (and each measure's `filter`, a lock, a required filter) can name the signed-in viewer: `{ member: "deal.owner", op: "equals", viewer: "id" }` answers "my deals". The viewer's values are bound on the server, as a row policy's are; a missing value (a public link, a viewer without the attribute) matches no rows, never more. The bound query keys the cache, the receipt and a records cursor, so two viewers never share an answer.
387
+ - Percent measures read as percents on chart axes (50%, not 0.5).
388
+ - `format: "duration"` on a sum, min, max, avg or percentile: its values are seconds, shown as "3.7 days" or "2 hr" in tiles, axes and drills.
389
+ - Charts: the tooltip and the hover band follow the theme (no white box or gray slab in dark mode).
390
+ - Editing: with no changes, Discard reads "Done" and leaves without asking "Discard all 0 changes?".
391
+ - A number tile leaves out "Before: –" when the period before has no value.
392
+ - Percents read as whole numbers from 10% (67%, not 66.67%) and with one decimal below it (4.5%).
393
+ - Count axes tick in whole numbers; a percent axis over all-zero values reaches 100%, not 400%.
394
+ - The chosen filter chip is filled, so an active filter reads at a glance.
395
+ - Edit says Edit, not "Resume editing", when the open draft has no changes.
396
+ - A number tile shows its change against the period before ("+17 from 0", "No change from 12"), not "Before: 0".
397
+ - Whole amounts read without ".00" (1,168,000); amounts with cents keep two places.
398
+ - Percent axes tick on round steps just past the data (0, 5, 10… 25%; 0, 20… 100%), never 6.5%.
399
+ - `dashboards_query` answers show percents and durations as people read them (64.3%, 3.5 d); the structured answer keeps the raw values.
400
+ - Share is hidden while editing: a link opens the published dashboard, not the draft.
401
+ - Docs: React → With Tailwind: the layer order and the `--dd-*` token mapping for a Tailwind or shadcn/ui host.
402
+
403
+ ### Fixes
404
+
405
+ - A free query's ids are its entries' positions (`m1`, `d1`, the second dimension `d2`), checked when it arrives (`QUERY_INVALID`, naming the path), so a query, its answer and its drill share one id space. `dashboards_query` takes any ids an agent gives and renumbers them, and no longer documents `m0`/`d0`. Before, `order: [{ by: "d0" }]` reached Postgres as `ORDER BY 0`.
406
+
407
+ ## 0.1.1
408
+
409
+ ### Changes
410
+
411
+ - Drill-in polish: the panel no longer shows "Couldn't load" when React mounts it twice (Strict Mode, a moved subtree); a Breakdown of the change with nothing in the period before draws its values instead of empty bars and drops "vs –, –"; while viewing, a tile's Rows button floats over the end of its header on hover or focus, so the title has the full width.
412
+ - Drill-in is on by default; `drill: false` on `deriveDashboards` turns it off for the whole server (answers carry nothing to drill and the drill endpoints refuse with `DRILL_DENIED`, naming the option).
413
+ - 52c9a10: Drill-in: a click on a bar, a point, a table row or a number opens what is behind it (broken down by another field, over time, or as its items, each a link into the host app), in the side panel, for people and through `dashboards_query` for agents. See React → Drill-in and Concepts → Drill-in.
414
+
415
+ A `list` widget: each row an avatar, a title, a subtitle and one number, linked into the host app by `display.href`. Any widget's `display.empty` names its own empty state. `DashboardList` puts the built-in (`default:`) dashboards under "Built in", above the ones made in the app. The optional `vitest` peer accepts 4 as well as 5.
416
+
417
+ Drill items carry their `link` when the server has `itemLinks`, so a browser client opens them with no copy of the templates.
418
+
419
+ A number tile shows its query's calc (a share, a rate) when it has one, rather than the first measure the calc divides.
420
+
421
+ A list's `display` names the widget query's own entries; it maps them to the answer's columns. A line or bar chart's `display.colors` colors a series by its label.
422
+
423
+ - Charts: the default series palette is checked for color-blind separation in light and dark (blue, orange, aqua, yellow, magenta, green); legend words wear the text color, not the series hue; stacked segments have a gap; bars are at most 56px wide.
424
+ - Drill answers are sealed once per answer (`drill: { execution, answer, closed?, previous?, reason? }`), not once per row. A click sends the answer and the row's place; the server answers with one sealed selection per step. `POST /dashboards/drill` and `/query/drill` take `summary: false` when the client already has the path's summary (Show more, another view), and skip reading it.
425
+ - The drill summary adds `offered`, `rows` and `operand` ("396 tasks with hours (57 without)"), `range`, `previous`, `foreign` and `omitted`. A first step's share is of the whole tile, a deeper one's of the step before; a sum's share shows only when no row can be negative.
426
+ - Breakdown offers `drill.prefer` first, then fields with a known small set of values (declared `values`, refs, booleans, numbers with `buckets`); under Other, the field Other was cut on comes first. Items with no `records` show up to 12 safe fields (was 4), and `records.title` is read even when it is not one of the columns.
427
+ - `{key.<column>}` in an `itemLinks` template names one key value. `itemLinks` is typed by source (`ItemLinksFor<M>`) and checked at startup. `itemHref` returning `undefined` turns the link off for that item.
428
+ - React: `toSeries` and `rowAt` export from `derive-dashboards/react`, with no chart kit attached (`/recharts` re-exports them). `<DrillPanel controller={useDrill(...)} />` takes a controller you hold; `<DashboardTile state onStateChange />` can be controlled; `<DashboardsProvider viewerKey>` keeps drill answers apart per viewer; the drill panel loads lazily. Refusals render through `messages.drillReasons`, so a host translates them.
429
+ - `secret` now seals drill executions, sealed answers, selections, Items cursors and hidden item ids as well as records cursors. Without it a production server warns when it starts (elsewhere, once, on the first drill).
430
+ - A `RunSql` gets a third argument, `{ signal }`; `nodePostgres` cancels a running statement (`pg_cancel_backend`) when the request aborts.
431
+ - Docs: router recipes (plain history with `popstate`, Next App Router, React Router with a `Link` adapter), a link template reference, a model hints reference, indexes for drill-in, and drill on a custom data layer. The conformance kit (`checkConformance`) and the hand-worked conformance set gain drill cases: a measure's own `where`, Other with a kept set, a ratio's flagged rows, distinct values, exact sums, and records paged through rows that tie on their order.
432
+
433
+ ### Fixes
434
+
435
+ - aa44058: Fixes from the four reviews of 0.1.0.
436
+
437
+ - Records cursors are sealed (AES-GCM) and bound to the viewer's tenant and the query, so a cursor shows no row value and a forged or altered one is refused (`CURSOR_INVALID`). An optional `secret` shares the key across instances; without it each process has its own, and the rows panel starts again from the first page when a cursor no longer opens.
438
+ - `defineModel` names an unknown measure or dimension kind, merge, percentile, time storage or a missing field (`MODEL_SHAPE`) instead of passing it or crashing.
439
+ - MCP: `addDashboardTools`'s `viewer` is typed from the server's model; the query tool refuses fields it does not take; an engine refusal keeps its code, and anything unexpected reaches the model as `INTERNAL` while `onError` gets the error. The docs show one call per `op` and bind the viewer in host code for code mode.
440
+ - `init --from dbt` reads manifests that leave out `filter`, and a manifest it cannot read names each problem's path.
441
+ - Tiles that failed because the connection dropped keep their last answer, say so quietly, and ask again when the browser is back online, on focus and every 15 seconds. The review says "Can't reach the server" offline. The desktop edit bar stays in view. Remove moves focus to the next tile's Edit and says what was removed. A refused change says what it was. The Discard question is read out. The rows panel says how many rows show.
442
+ - Version documents are kept in memory once read; a drafts index serves the dashboard list.
443
+ - The package publishes `dist` only, needs Node 22.18 or later, and ships a type declaration for `react/theme.css`.
444
+
445
+ - Drill access: every member a drill adds to its tile (a step, a Breakdown or Over time field, an Items column) needs `view` on that member, for dashboard and free-query drills alike, and an Items column the viewer may not read is left out. A source with `drill: false` is refused on the server (`DRILL_DENIED`). Sensitive fields are never offered.
446
+ - Drill links are bound to the viewer's access, the execution and the steps before them. A link opened by someone else opens without the clicked value, at the deepest step they may read, and says "Part of this link was left out", never how many rows.
447
+ - An item key is hidden when `records.key` is `"hide"` or when a sensitive or hidden field reads a key column. A hidden key leaves as an opaque id (an HMAC under the server's secret, bound to the tenant) and never builds a link.
448
+ - `validateModel` refuses `records.link` and unknown `records` keys (`MODEL_SHAPE`), a `records.key` other than `"expose"` or `"hide"`, and a sensitive or hidden `records.title` (`HINT_INVALID`). These were accepted silently.
449
+ - A drill refusal (`DrillCan`) carries a `code` from `DRILL_REASONS` beside its text.
450
+ - A custom data layer without `records` shows Items as unavailable (`RECORDS_UNAVAILABLE`) instead of failing the drill.
451
+
452
+ - Drill links opened by a viewer who sees less are always counted, so a group their row rules hide is cut back (with or without `summary`), never shown. A distinct list's cursor is bound to the viewer and policy like a records cursor. A distinct value links to its row only for a viewer who may list that source.
453
+ - A relative range ("last 30 days") is read again at the instant the tile was drawn, so a change Breakdown's "was" equals the Before drill across a DST change.
454
+ - A share divides the count of now by the step before read now, beside the drill's own value, not the whole the chart drew.
455
+ - A ratio's numerator rows are its condition and its counted field set, for the flag, Only and its count; a numerator with no condition marks its rows.
456
+ - A formula that reads the whole chart or the period before opens on Explanation; Breakdown and Over time are off for it (`FORMULA_SCOPED`). A source or number field with `drill: false` gets no drill and no buckets.
457
+ - A restriction of two or more groups is a hashed match (was a nested loop up to 64). Other's change is exact on float lines.
458
+ - The drill panel keeps the last view and its controls while a new one of the same step loads (search keeps its letters), Show more keeps focus, Refresh reads the summary again, a table's cells each drill their own line, the Items table names each row, a total step reads "Total", big counts read "10,000+", and only views the drill can show are tabs.
459
+ - A dashboard and an open drill stay on screen through a failed refresh, with a quiet "Can't reach the server"; a first load that fails offers Try again.
460
+ - `records` takes a `title` alone; `itemLinks` refuses a template naming anything but `{id}` or `{key.<column>}`; a production server with no `secret` warns at startup; `<DrillPanel controller={d} />` needs no state of its own.
461
+
462
+ - Breakdown offers a source's `drill.prefer` fields, then its fields with a known small set of values. Free text and ids are never guessed at: a source with neither opens on Over time or Items.
463
+ - An Other link opened by a viewer who sees less names no group it leaves out (its receipt carries no filter for them). A distinct value links only to a row the viewer's row rules show. A drill reads live, never from the answer cache.
464
+ - A ratio lists its rows only when it is a rate of rows (both lines count rows, the numerator inside the denominator); others say why (`RATIO_NOT_ROWS`).
465
+ - A distinct list's footer counts its values; every count past 10,000 reads "10,000+". A refresh drops pages read after the old first page; a page read stops when the drill moves on.
466
+ - A click on a bar while another has keyboard focus opens it; "Before" is named for screen readers; Escape clears a search before closing; a table names an empty group as the drill does; editing never opens a drill; tiles show the span they cover; charts are not an empty tab stop.
467
+ - `withView(search, view)` (core) writes the view into an address and keeps the host's own parameters. `linkTemplateIssues` checks an `itemLinks` template as the link filler reads it; a relative template is refused. `validateModel` names a malformed `records` list or `noun`.
468
+ - A receipt names its query by a hash keyed with the server's `secret` (still 64 hex characters), so a hidden part of a query cannot be guessed against it. A link opened by another viewer carries only a fixed list of receipt fields. Sealed tokens are padded to whole blocks.
469
+ - The browser's Back to before a drill closes it: `decodeView` says `drill: undefined` when the address has none. Show more after Refresh reads the new pages. A distinct value links to another source only when the viewer may view that source too.
470
+ - `records.order` entries must be a field and `"asc"` or `"desc"`; an `itemLinks` template with a `javascript:` or `data:` scheme is refused. Empty groups read "No assignee" in charts and to screen readers; a first step's share reads "of the total"; tooltips read "Tasks: 118".
471
+
472
+ ### Migrating
473
+
474
+ - Drill-in is on by default. Set `drill: false` on `deriveDashboards` to keep it off.
475
+
476
+ - `RecordsPanel` is removed. Rows on a tile opens the drill on Items; to place it yourself, use `<DrillPanel>`.
477
+ - `records.link` is removed from the model. Pass `itemLinks` (`{ order: "/orders/{id}" }`) to `deriveDashboards` and the React UI.
478
+ - `onViewChange` gets a second argument, `{ history }`: push on `"push"`, replace on `"replace"`. A controlled `view` must keep `view.drill`; a view rebuilt as `{ tab, picks }` closes every drill.
479
+ - `encodeView(view, options)` takes an options object (`{ prefix, drill: "inline" | "omit" }`); a prefix string still works.
480
+ - Drill internals (`composeDrill`, `population`, `drillModel`, `rowSelection` and the rest) moved off the core root to `derive-dashboards/core/engine`.
481
+ - `AnswerDrill` is sealed once: read `answer` and `closed`, not `selections`. Use `drillFrom` to turn a click into a drill state.
482
+ - A `DrillCan` refusal is `{ ok: false, code, reason }`: switch on `code`.
483
+ - `RunSql` takes an optional third argument, `{ signal }`. A wrapper that forwards its arguments should pass it on.
484
+
485
+ ## 0.1.0
486
+
487
+ The first release: open-source embedded dashboards for your product, in one package.
488
+
489
+ - **Server** (`derive-dashboards`): `deriveDashboards(options)`, a fetch handler for every
490
+ endpoint, with a Postgres source and store for any driver (`nodePostgres(pool)` for
491
+ node-postgres), the result cache and `createTables`.
492
+ - **Model and engine** (`derive-dashboards/core`): `defineModel` with typed member ids;
493
+ tenancy and row rules, opt-in and checked twice before any SQL runs; the Postgres engine,
494
+ your own SQL per source, or your own data layer (`customSource`) with a conformance kit.
495
+ `viewer()` is typed from the model (`ViewerFor<typeof model>`): with tenant keys, a viewer
496
+ without a value for each does not compile.
497
+ The rows behind an answer page by keyset: `/dashboards/records` and `/query/records` take
498
+ `after` (the `next` cursor of the page before), and a custom layer's `records` read gets
499
+ `after` and answers each row's place in the order.
500
+ - **React** (`derive-dashboards/react`, `/recharts`): a dashboard with filters, the widget
501
+ builder, editing in a personal draft with undo, review before publish, version history,
502
+ share links, and agents that edit and publish as themselves.
503
+ - **Agents** (`derive-dashboards/mcp`): two tools for the MCP server you already run,
504
+ `dashboards_query` (read only: ask, the rows behind an answer, dashboards read out) and
505
+ `dashboards_api` (every endpoint, edits to the agent's own draft), each call as its person.
506
+ - **CLI** (`npx derive-dashboards`): `init` proposes a model from your tables, `check` proves
507
+ it against the database, `generate` writes the library's tables for your schema tool.
508
+ - `init --from dbt|cube <path>` imports a model already defined in dbt's semantic layer
509
+ (`semantic_manifest.json`) or Cube's YAML, with exact storage from your database, and names
510
+ everything it cannot express.
511
+
512
+ `react` and `recharts` are optional peer dependencies, needed only for those parts. Start with
513
+ the [quick start](https://github.com/derive-to/dashboards/blob/main/docs/quick-start.md).