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
@@ -0,0 +1,158 @@
1
+ import { plainDecimal, plainDecimalText } from "../exact/text.mjs";
2
+ import { digitsFor, fine, holds, percentDigits, tickDigits } from "./digits.mjs";
3
+ import { currencyOf, moneyOf, placesIn, writeStyled } from "./write.mjs";
4
+ // src/format/number.ts
5
+ /**
6
+ * A cell's value as a float, for choosing its digits only. An exact text too small for a
7
+ * float, yet not zero, weighs as the smallest float there is, so it is never taken for zero;
8
+ * the digits written are still the text's own.
9
+ */
10
+ function weigh(cell) {
11
+ if (typeof cell === "number") return cell;
12
+ const value = Number(cell.v);
13
+ const digits = cell.v.split(/e/iu)[0] ?? "";
14
+ return value === 0 && /[1-9]/u.test(digits) ? Number.MIN_VALUE : value;
15
+ }
16
+ /** What a value that is no finite number is written as, on every path: the text of no value. */
17
+ const NO_NUMBER = "–";
18
+ /** A value's plain decimal digits; undefined for NaN, an infinity, or text that is no number. */
19
+ const digitsOf = (value) => typeof value === "number" ? plainDecimal(value) : plainDecimalText(value.v);
20
+ /**
21
+ * The sign a column's numbers are written with. A change (`signed`) says which way it went,
22
+ * so a rise has its plus (+2.32, +$340.03) and nothing has neither; anything else has a sign
23
+ * only when it is below nothing.
24
+ */
25
+ const signOf = (shape) => ({ signDisplay: shape.signed === true ? "exceptZero" : "negative" });
26
+ /** Decimal text as Intl's percent takes it: a fraction as it is, points two places down. */
27
+ const shifted = (digits, fraction) => `${digits}${fraction ? "" : "E-2"}`;
28
+ /**
29
+ * A value in percent points (42.5) as a percent (42.5%), or a fraction (0.425) as one. Exact
30
+ * digits move two places as text, so Intl formats them without a float; a float is written out
31
+ * in full and shifted as text too, so the smallest is not lost in a division.
32
+ */
33
+ function percentText(formats, cell, digits, shape) {
34
+ const fraction = shape.fraction === true;
35
+ const style = {
36
+ style: "percent",
37
+ ...percentDigits(weigh(cell), fraction ? 1 : 100),
38
+ ...signOf(shape)
39
+ };
40
+ return writeStyled(formats, style, shifted(digits, fraction));
41
+ }
42
+ /** The units a duration is written in, largest first, each in seconds. */
43
+ const DURATION_UNITS = [
44
+ ["day", 86400],
45
+ ["hour", 3600],
46
+ ["minute", 60],
47
+ ["second", 1]
48
+ ];
49
+ /** How many of what a duration's values count make a second: one, or a million microseconds. */
50
+ const perSecond = (unit) => unit === "microsecond" ? 1e6 : 1;
51
+ /**
52
+ * The sizes of the units a duration is written in (a day, an hour, a minute, a second), largest
53
+ * first, counted as its values are; none for a value that is no duration. An axis steps in
54
+ * whole numbers of one of them.
55
+ */
56
+ function durationUnits(shape) {
57
+ if (shape.format !== "duration") return void 0;
58
+ const per = perSecond(shape.unit);
59
+ return DURATION_UNITS.map(([, seconds]) => seconds * per);
60
+ }
61
+ /**
62
+ * A duration in the largest unit that keeps it, or the value it is written beside, at one or
63
+ * more: 90 seconds is "1.5 min". A tick keeps three figures (75 seconds is "1.25 min"). A
64
+ * change has its sign (`signOf`).
65
+ */
66
+ function durationText(formats, value, at) {
67
+ const seconds = value / perSecond(at.shape.unit);
68
+ const size = Math.abs((at.shape.beside ?? value) / perSecond(at.shape.unit));
69
+ const [unit, length] = DURATION_UNITS.find(([, n]) => size >= n) ?? ["second", 1];
70
+ const count = seconds / length;
71
+ const style = {
72
+ style: "unit",
73
+ unit,
74
+ unitDisplay: "short",
75
+ ...at.tick ? tickDigits(count, 1, false) : digitsFor(count, 1)
76
+ };
77
+ return writeStyled(formats, {
78
+ ...style,
79
+ ...signOf(at.shape)
80
+ }, count);
81
+ }
82
+ /**
83
+ * Digits too many for Intl to write, as they are, with the sign any number has: a true minus
84
+ * below nothing, and a plus on a change that rose (`signOf`'s rule, kept where Intl cannot apply
85
+ * it).
86
+ */
87
+ function ownDigits(text, shape) {
88
+ if (text.startsWith("-")) return `−${text.slice(1)}`;
89
+ return shape.signed === true && /[1-9]/u.test(text) ? `+${text}` : text;
90
+ }
91
+ /** Decimal text in the reader's locale, exactly: Intl formats the digits, never a float. */
92
+ function exactText(text, formats, shape) {
93
+ const currency = currencyOf(shape.unit);
94
+ const cents = text.split(".")[1] ?? "";
95
+ const most = placesIn(formats, currency);
96
+ const places = /^0*$/u.test(cents) ? 0 : currency === void 0 ? Math.min(cents.length, most) : most;
97
+ const size = Math.abs(weigh({ v: text }));
98
+ const fraction = size === 0 || holds(size, places) ? {
99
+ minimumFractionDigits: places,
100
+ maximumFractionDigits: places
101
+ } : fine(size);
102
+ const digits = text;
103
+ const style = {
104
+ ...fraction,
105
+ ...moneyOf(currency),
106
+ ...signOf(shape)
107
+ };
108
+ const written = writeStyled(formats, style, digits);
109
+ return written.includes("∞") ? ownDigits(text, shape) : written;
110
+ }
111
+ /** A number in full, by its column's shape: a float to its places while they hold it, else its first figures. */
112
+ function textOf(value, shape, formats) {
113
+ const plain = digitsOf(value);
114
+ if (plain === void 0) return NO_NUMBER;
115
+ if (shape.format === "percent") return percentText(formats, value, plain, shape);
116
+ const count = typeof value === "number" ? value : Number(value.v);
117
+ if (shape.format === "duration") return durationText(formats, count, {
118
+ shape,
119
+ tick: false
120
+ });
121
+ if (typeof value !== "number") return exactText(value.v, formats, shape);
122
+ const currency = currencyOf(shape.unit);
123
+ const digits = digitsFor(value, placesIn(formats, currency));
124
+ return writeStyled(formats, {
125
+ ...digits,
126
+ ...moneyOf(currency),
127
+ ...signOf(shape)
128
+ }, value);
129
+ }
130
+ /** A value of a percent or a plain or money tick, short: three figures, compact. */
131
+ function tickOf(value, shape, formats) {
132
+ const plain = plainDecimal(value);
133
+ if (plain === void 0) return NO_NUMBER;
134
+ const sign = signOf(shape);
135
+ if (shape.format === "percent") {
136
+ const fraction = shape.fraction === true;
137
+ const style = {
138
+ style: "percent",
139
+ ...tickDigits(value, fraction ? 1 : 100, false)
140
+ };
141
+ return writeStyled(formats, {
142
+ ...style,
143
+ ...sign
144
+ }, shifted(plain, fraction));
145
+ }
146
+ if (shape.format === "duration") return durationText(formats, value, {
147
+ shape,
148
+ tick: true
149
+ });
150
+ const currency = currencyOf(shape.unit);
151
+ const digits = tickDigits(value, 1, currency !== void 0);
152
+ return writeStyled(formats, {
153
+ ...digits,
154
+ ...moneyOf(currency),
155
+ ...sign
156
+ }, value);
157
+ }
158
+ export { durationUnits, signOf, textOf, tickOf };
@@ -0,0 +1,6 @@
1
+ /** The minus sign every number is written with: the true one (U+2212), as wide as a plus, not a hyphen. */
2
+ export declare const MINUS = "−";
3
+ /** A number as Intl takes it: a float, or decimal text that Intl formats exactly (ES2023 NumberFormat v3). */
4
+ export type Writable = number | `${number}`;
5
+ /** A unit that is an ISO 4217 currency code ("USD"); undefined for any other unit. */
6
+ export declare function currencyOf(unit: string | undefined): string | undefined;
@@ -0,0 +1,57 @@
1
+ // src/format/write.ts
2
+ /** The minus sign every number is written with: the true one (U+2212), as wide as a plus, not a hyphen. */
3
+ const MINUS = "−";
4
+ /** Every number's sign rule, and a tie rounded half away from zero, as exact values are (`exact/decimal.ts`). */
5
+ const EVERY_FORMAT = {
6
+ signDisplay: "negative",
7
+ roundingMode: "halfExpand"
8
+ };
9
+ /**
10
+ * Number formats in one locale, each made once: making one costs fifty times a format, and a
11
+ * table or a chart would make one for every cell. The cache is the caller's, never the module's.
12
+ */
13
+ function formatsIn(locale) {
14
+ const made = /* @__PURE__ */ new Map();
15
+ return (style) => {
16
+ const key = JSON.stringify(style);
17
+ const format = made.get(key) ?? new Intl.NumberFormat(locale, {
18
+ ...EVERY_FORMAT,
19
+ ...style
20
+ });
21
+ made.set(key, format);
22
+ return format;
23
+ };
24
+ }
25
+ /** Whether a part of a written number is its sign, wherever the locale writes it, or its exponent's. */
26
+ const isSign = (type) => type === "minusSign" || type === "exponentMinusSign";
27
+ /**
28
+ * A number in a style, with the sign rule: a negative is written with a true minus, in the place
29
+ * and with the marks the locale writes its own sign. Only a negative pays for reading the parts.
30
+ */
31
+ function writeStyled(formats, style, value) {
32
+ const format = formats(style);
33
+ const written = format.format(value);
34
+ if (!written.includes("-")) return written;
35
+ return format.formatToParts(value).map((p) => isSign(p.type) ? p.value.replace("-", "−") : p.value).join("");
36
+ }
37
+ /** The ISO 4217 codes the runtime knows. Three capitals alone (RPM, SKU) are no currency. */
38
+ const CURRENCIES = Object.freeze(Intl.supportedValuesOf("currency"));
39
+ /** A unit that is an ISO 4217 currency code ("USD"); undefined for any other unit. */
40
+ function currencyOf(unit) {
41
+ return unit !== void 0 && CURRENCIES.includes(unit) ? unit : void 0;
42
+ }
43
+ /**
44
+ * The places a number with a fraction is written to: two, or its currency's own where that
45
+ * has more, as a dinar has three. A thousandth of a dinar is not rounded away as a cent's part.
46
+ */
47
+ const placesIn = (formats, currency) => currency === void 0 ? 2 : Math.max(2, formats({
48
+ style: "currency",
49
+ currency
50
+ }).resolvedOptions().maximumFractionDigits ?? 2);
51
+ /** The style of an amount of a currency, which drops its cents when it has none ($1,200, $4.50). */
52
+ const moneyOf = (currency) => currency === void 0 ? {} : {
53
+ style: "currency",
54
+ currency,
55
+ trailingZeroDisplay: "stripIfInteger"
56
+ };
57
+ export { MINUS, currencyOf, formatsIn, moneyOf, placesIn, writeStyled };
@@ -1,62 +1,71 @@
1
1
  import { CustomSource, GroupedRead, HostCell, HostRows, ReadContext, ReadField, ReadFilter, ReadMeasure, RecordsRead } from "./engine/custom/request.mjs";
2
- import { BASE_ERROR_CODES, CatalogIssueCode, DRILL_REASONS, DocumentRefusalCode, DrillReason, IssueCode, ModelIssueCode, QueryRefusalCode, RawError, ResultWarningCode, RuntimeErrorCode, defineErrorCodes } from "./error/codes.mjs";
2
+ import { BASE_ERROR_CODES, CatalogIssueCode, DRILL_REASONS, DocumentRefusalCode, DrillReason, IssueCode, ModelIssueCode, QueryRefusalCode, RawError, ResultWarningCode, RuntimeErrorCode, START_REFUSALS, StartRefusalCode, defineErrorCodes } from "./error/codes.mjs";
3
+ import { NumberWriter, numberWriters } from "./format/index.mjs";
3
4
  import { checkCatalog } from "./model/catalog/check.mjs";
4
5
  import { describeQueries } from "./model/catalog/queries.mjs";
5
- import { policyBinding } from "./model/defaults.mjs";
6
+ import { missingTenantKey, policyBinding, tenantValues } from "./model/defaults.mjs";
6
7
  import { DimensionId, JoinedDimensionId, MeasureId, MemberId, ModelError, OwnDimensionId, SourceNameOf, defineModel } from "./model/define.mjs";
7
8
  import { DimensionHints, Noun, NumberFormat, RecordsHint, Tone } from "./model/hints.mjs";
8
- import { MemberRef, ResolvedDimension, parseMemberId, recordDimensions, resolveDimension, resolveMeasure } from "./model/member.mjs";
9
- import { Moment, isZone, momentMicros } from "./time/temporal.mjs";
10
- import { lastIncludedMillisecond, parseTextTime } from "./time/text-time.mjs";
11
- import { MICROS_PER_DAY, MICROS_PER_HOUR, MICROS_PER_SECOND, Micros, formatTextTime, parseDate, parseNaiveTime } from "./time/instant.mjs";
12
- import { bucketLabel, bucketLabels, bucketStart, nextBucketStart, shiftBucket } from "./time/bucket.mjs";
13
- import { DatePart, DimensionDef, EXPR_FUNCTIONS, Expr, ExprCondition, ExprFunction, JoinDef, MeasureDef, MemberMeta, Model, Numeric, PolicyBinding, PolicyFilter, PolicyRule, Relationship, RowPolicy, SourceDef, TenantBinding, TimeStorage, Unit, ViewerMatch } from "./model/types.mjs";
14
- import { LinearTerm, linearTerms } from "./model/validate/expr.mjs";
15
- import { validateModel } from "./model/validate/index.mjs";
16
- import { Cuts, Drill, DrillCan, DrillField, DrillOrigin, DrillSemantics, DrillState, DrillStep, DrillView, MAX_DRILL_ROWS, MAX_DRILL_STEPS, PinnedExecution, Selection } from "./query/drill/types.mjs";
9
+ import { MemberRef, ResolvedDimension, parseMemberId, recordDimensions, resolveDimension, sourceOf } from "./model/member.mjs";
17
10
  import { ColumnRole, Mark, Receipt, RecordColumn, Result, ResultCell, ResultColumn, ResultRows, TimeAxis, TimeBucket } from "./result/types.mjs";
18
- import { Span, inSpan, resolveRange } from "./time/range.mjs";
19
- import { NaiveRule, OffsetSegment, offsetSegments, resolveNaive, startOfDate } from "./time/zone.mjs";
11
+ import { cellDigits, decimalPlaces, formatExact, movePoint, parseExact } from "./exact/text.mjs";
12
+ import { Exact } from "./exact/decimal.mjs";
13
+ import { Moment } from "./time/temporal.mjs";
14
+ import { MICROS_PER_DAY, dateMillis, isDateOnly, lastIncludedMillisecond, parseTextTime, textMillis, wallClock } from "./time/text-time.mjs";
15
+ import { Micros, formatTextTime } from "./time/instant.mjs";
16
+ import { bucketLabel } from "./time/bucket.mjs";
17
+ import { Span, requestInstant } from "./time/range.mjs";
18
+ import { NaiveRule } from "./time/zone.mjs";
19
+ import { Better, DatePart, DimensionDef, Expr, ExprCondition, ExprFunction, JoinDef, MeasureDef, MemberMeta, Model, Numeric, PolicyBinding, PolicyFilter, PolicyRule, Relationship, RowPolicy, SourceDef, TenantBinding, TimeStorage, Unit, ViewerMatch } from "./model/types.mjs";
20
+ import { LinearTerm } from "./model/validate/expr.mjs";
21
+ import { didYouMean } from "./model/validate/fields.mjs";
22
+ import { Cuts, Drill, DrillCan, DrillField, DrillOrigin, DrillSemantics, DrillState, DrillStep, DrillView, MAX_DRILL_ROWS, MAX_DRILL_STEPS, PinnedExecution, Selection } from "./query/drill/types.mjs";
23
+ import { validateModel } from "./model/validate/index.mjs";
20
24
  import { viaJoins } from "./model/validate/via.mjs";
21
- import { BoundRule, bindFilter, bindPolicy, namedPolicy, viewerValues } from "./policy/bind.mjs";
25
+ import { BoundRule, bindPolicy, namedPolicy } from "./policy/bind.mjs";
26
+ import { controlFieldIssues, controlFieldOffers } from "./document/control-fields.mjs";
22
27
  import { Command, CommandBody, CommandId, Display, Doc, LayoutItem, Scope, Tab, TabId, Widget, WidgetId, emptyDoc } from "./document/types.mjs";
23
28
  import { Change, Placement, WidgetPart, changedWidget, diffDocs, markShifted, placementOf, widgetDiff } from "./document/diff.mjs";
24
- import { ComparisonFields, DISPLAY_HELP, DISPLAY_OPTIONS, DisplayKind, DisplayOf, SharedDisplay, displayIssues, displayOf, sharedDisplay } from "./document/display.mjs";
29
+ import { ComparisonFields, DISPLAY_OPTIONS, DisplayKind, DisplayOf, DisplayOptionName, OptionType, SHARED_OPTIONS, SharedDisplay, displayOf, displayOptionsOf, sharedDisplay } from "./document/display.mjs";
30
+ import { ByQuery, comparisonsByQuery } from "./document/display-comparisons.mjs";
31
+ import { entriesNamed, namesValues, refusedDisplayOptions } from "./document/display-entries.mjs";
25
32
  import { documentDisplayIssues, editedDisplayIssues } from "./document/display-validation.mjs";
26
- import { GRID_COLUMNS, Gap, closeGaps, closeGapsCommands, freeSpot, layoutGaps, placeItem, repairLayout } from "./document/layout.mjs";
33
+ import { GRID_COLUMNS, Gap, TITLE_MOST, closeGaps, closeGapsCommands, freeSpot, layoutGaps, placeItem } from "./document/layout.mjs";
27
34
  import { Outcome } from "./document/outcome.mjs";
28
35
  import { lockChanged, reduce, reduceAll } from "./document/reduce.mjs";
29
36
  import { Recorded, Replayed, commandWidget, replay } from "./document/replay.mjs";
30
- import { readingOrder, stepCommands, stepMoves } from "./document/stacked.mjs";
37
+ import { readingOrder, stepCommands } from "./document/stacked.mjs";
31
38
  import { EncodeOptions, VIEW_PREFIX, ViewState, encodeView, viewFor, withView } from "./document/view.mjs";
32
39
  import { smallestFor, viewLayout } from "./document/view-layout.mjs";
33
- import { formatExact, parseExact } from "./exact/text.mjs";
34
- import { EXACT_LIMIT, Exact, divideExact, storedExact } from "./exact/decimal.mjs";
35
40
  import { ExactSum, Operands, rowValue, sumLinear } from "./exact/sum.mjs";
41
+ import { MINUS, currencyOf } from "./format/write.mjs";
42
+ import { NumberShape, durationUnits, signOf } from "./format/number.mjs";
36
43
  import { bindQueryViewer, bindViewer } from "./policy/bind-query.mjs";
37
- import { ruleMatches, selectRule } from "./policy/match.mjs";
38
- import { Closure, queryClosure } from "./query/closure.mjs";
39
- import { AssertionContext, BoundPolicy, BoundPolicyFilter, ComposeCtx, ComposeDelta, ComposedQuery, CompositionPolicy, DEFAULT_COMPOSITION_POLICY, LockEntry, RequiredEntry, StoredLockEntry } from "./query/compose.mjs";
44
+ import { Closure, Offer, queryClosure } from "./query/closure.mjs";
45
+ import { AssertionContext, BoundPolicy, BoundPolicyFilter, ComposeCtx, ComposeDelta, ComposedQuery, CompositionPolicy, LockEntry, RequiredEntry, StoredLockEntry } from "./query/compose.mjs";
40
46
  import { ComposedTile, TileInput, composeTile, documentLock, tileInputs } from "./query/compose-tile.mjs";
41
47
  import { AccessParts, effectiveFilter } from "./query/effective.mjs";
42
- import { BoundFilter, Leaf, NEGATION_OF, NEGATIVE_OPS, NULL_OPS, NegativeOp, NodeId, NullOp, Op, POSITIVE_OPS, PositiveOp, StoredFilter, ValueLeaf, VariableLeaf, ViewerLeaf, ViewerRef, WireFilter, isBound, isLeaf, stripIds } from "./query/filter.mjs";
48
+ import { BoundFilter, Leaf, NegativeOp, NodeId, NullOp, Op, PositiveOp, StoredFilter, ValueLeaf, VariableLeaf, ViewerLeaf, ViewerRef, WireFilter, isBound } from "./query/filter.mjs";
43
49
  import { FormulaRef, changeOf, formulaRefs, shareOf } from "./query/formulas.mjs";
44
50
  import { isDateRange, isValuePick, pickProblem } from "./query/picks.mjs";
45
- import { Alias, QueryReferenceError, entryAliases, toWire } from "./query/to-wire.mjs";
46
- import { CalcAlias, Calendar, Cell, Control, ControlId, DateRange, DimensionAlias, DimensionCut, EntryId, ExplicitRange, Format, Formula, FormulaNode, Grain, MeasureAlias, Picks, RefOf, RelativeRange, ResolvedRange, ScopeCoverage, StoredFormulaNode, StoredQuery, TileRef, TypedFilter, TypedQuery, WireQuery } from "./query/types.mjs";
51
+ import { Alias, QueryReferenceError, entryAliases, entryNamed, toWire } from "./query/to-wire.mjs";
52
+ import { CalcAlias, CalcEntry, Calendar, Cell, Control, ControlId, DateRange, DimensionAlias, DimensionCut, EntryId, ExplicitRange, Format, Formula, FormulaNode, Grain, MeasureAlias, Picks, RefOf, RelativeRange, ResolvedRange, ScopeCoverage, StoredFormulaNode, StoredQuery, TileRef, TypedFilter, TypedQuery, WireQuery } from "./query/types.mjs";
47
53
  import "./time/index.mjs";
48
- import { ItemLinks, ItemLinksFor, LINK_PART, itemLink, linkTemplateIssues } from "./query/drill/links.mjs";
49
54
  import { ApiError, CONTRACT_VERSION, CoreContract, DashboardListResponse, DashboardResponse, DraftResponse, MetaJoin, MetaMember, MetaResponse, PublishResponse, QueryAnswer, QueryLine, RecordsResponse, TileAnswer, TileLine, TileRequest, TileResult, TilesRequest, ValidateResponse, ValuesResponse } from "./types/api.mjs";
55
+ import { ItemLinks, ItemLinksFor, itemLink, linkTemplateIssues } from "./query/drill/links.mjs";
56
+ import { CodeDashboard, LIBRARY_WIDGET_KINDS, LibraryWidgetKind, defineDashboard } from "./types/dashboard.mjs";
50
57
  import { AnswerDrill, ClosedRow, DrillAbilities, DrillAnswer, DrillBody, DrillComparisonView, DrillCrumb, DrillExplanationView, DrillGroupedView, DrillItem, DrillItemsView, DrillOperand, DrillSummary, ItemColumn, SealedAnswer } from "./types/drill-api.mjs";
51
- import { CoreApi, CreateDash, Dash, EndpointsByPath, HeadersLike, PluginEndpoints, PluginErrorCodes, ServerCall, ServerCallInput, ServerCalls, UniqueIds } from "./types/infer.mjs";
52
- import { CodeDashboard, DashOptions, SecondaryStorage } from "./types/options.mjs";
58
+ import { CoreApi, Dash, EndpointsByPath, HeadersLike, PluginEndpoints, PluginErrorCodes, ServerCall, ServerCallInput, ServerCalls, UniqueIds } from "./types/infer.mjs";
59
+ import { DashOptions, SecondaryStorage } from "./types/options.mjs";
53
60
  import { addsUp } from "./result/additive.mjs";
54
61
  import { memberLabel, recordColumns, resultColumns, roleOf } from "./result/columns.mjs";
55
62
  import { isMark, markedRows } from "./result/marks.mjs";
56
- import { timeAxis, withTime } from "./result/time-axis.mjs";
63
+ import { answerStatus, unreadWarnings } from "./result/status.mjs";
64
+ import { bucketWithin, isRunning, isStarting, withTime } from "./result/time-axis.mjs";
65
+ import { markedWhole, wholeAnswer } from "./result/whole.mjs";
57
66
  import { Field, FieldType, TABLES, TableDef, TableName } from "./store/schema.mjs";
58
- import { CATALOG, StoreDialect, TableCheck, createTable, schemaChecks, schemaStatements } from "./store/ddl.mjs";
59
- import { comparisonQuery, comparisonSpan, shiftInstant } from "./time/compare.mjs";
67
+ import { CATALOG, StoreDialect, TableCheck, createTable, schemaChecks } from "./store/ddl.mjs";
68
+ import { MIN_SECRET_BYTES, StartError, StartIssue, dashboardKeyIssues, layoutWidgetIssues, refuseStart, widgetKindIssues } from "./types/options-check.mjs";
60
69
  import { DashEndpoint, DashHook, DashPlugin, DocumentSlice, EndpointAccess, EndpointContext, HookContext, createDashEndpoint } from "./types/plugin.mjs";
61
70
  import { Awaitable, Column, ConnectionId, DimensionName, IanaZone, IsoInstant, Issue, JoinName, MeasureName, PolicyName, Primitive, SourceName, TenantKey, WeekStart } from "./types/primitives.mjs";
62
71
  import { Catalog, Explanation, PageRequest, QueryCtx, RawLevels, RawResult, RecordPage, RunOptions, SemanticProvider } from "./types/provider.mjs";
@@ -64,5 +73,6 @@ import { ColumnType, DbSchema, IntrospectingConnection, Param, QueryConnection,
64
73
  import { Author, DashAdapter, DashboardHead, DashboardReader, DashboardStore, DashboardSummary, Draft, DraftTarget, OverlapPart, Preview, Published, Refusal, Row, SchemaDriver, StoredVersion, Tenant, Token, UnpublishedDraft, VersionEntry, Where } from "./types/store.mjs";
65
74
  import { CanFn, Channel, Principal, Resource, TenantKeysOf, Verb, Viewer, ViewerFor, principalTenant } from "./types/viewer.mjs";
66
75
  import { canonical } from "./value/canonical.mjs";
67
- import { fold, foldingPairs } from "./value/casefold.mjs";
68
- export { type AccessParts, type Alias, type AnswerDrill, type ApiError, type AssertionContext, type Author, type Awaitable, BASE_ERROR_CODES, type BoundFilter, type BoundPolicy, type BoundPolicyFilter, type BoundRule, CATALOG, CONTRACT_VERSION, type CalcAlias, type Calendar, type CanFn, type Catalog, type CatalogIssueCode, type Cell, type Change, type Channel, type ClosedRow, type Closure, type CodeDashboard, type Column, type ColumnRole, type ColumnType, type Command, type CommandBody, type CommandId, type ComparisonFields, type ComposeCtx, type ComposeDelta, type ComposedQuery, type ComposedTile, type CompositionPolicy, type ConnectionId, type Control, type ControlId, type CoreApi, type CoreContract, type CreateDash, type CustomSource, type Cuts, DEFAULT_COMPOSITION_POLICY, DISPLAY_HELP, DISPLAY_OPTIONS, DRILL_REASONS, type Dash, type DashAdapter, type DashEndpoint, type DashHook, type DashOptions, type DashPlugin, type DashboardHead, type DashboardListResponse, type DashboardReader, type DashboardResponse, type DashboardStore, type DashboardSummary, type DatePart, type DateRange, type DbSchema, type DimensionAlias, type DimensionCut, type DimensionDef, type DimensionHints, type DimensionId, type DimensionName, type Display, type DisplayKind, type DisplayOf, type Doc, type DocumentRefusalCode, type DocumentSlice, type Draft, type DraftResponse, type DraftTarget, type Drill, type DrillAbilities, type DrillAnswer, type DrillBody, type DrillCan, type DrillComparisonView, type DrillCrumb, type DrillExplanationView, type DrillField, type DrillGroupedView, type DrillItem, type DrillItemsView, type DrillOperand, type DrillOrigin, type DrillReason, type DrillSemantics, type DrillState, type DrillStep, type DrillSummary, type DrillView, EXACT_LIMIT, EXPR_FUNCTIONS, type EncodeOptions, type EndpointAccess, type EndpointContext, type EndpointsByPath, type EntryId, type Exact, type ExactSum, type Explanation, type ExplicitRange, type Expr, type ExprCondition, type ExprFunction, type Field, type FieldType, type Format, type Formula, type FormulaNode, type FormulaRef, GRID_COLUMNS, type Gap, type Grain, type GroupedRead, type HeadersLike, type HookContext, type HostCell, type HostRows, type IanaZone, type IntrospectingConnection, type IsoInstant, type Issue, type IssueCode, type ItemColumn, type ItemLinks, type ItemLinksFor, type JoinDef, type JoinName, type JoinedDimensionId, LINK_PART, type LayoutItem, type Leaf, type LinearTerm, type LockEntry, MAX_DRILL_ROWS, MAX_DRILL_STEPS, MICROS_PER_DAY, MICROS_PER_HOUR, MICROS_PER_SECOND, type Mark, type MeasureAlias, type MeasureDef, type MeasureId, type MeasureName, type MemberId, type MemberMeta, type MemberRef, type MetaJoin, type MetaMember, type MetaResponse, type Micros, type Model, ModelError, type ModelIssueCode, type Moment, NEGATION_OF, NEGATIVE_OPS, NULL_OPS, type NaiveRule, type NegativeOp, type NodeId, type Noun, type NullOp, type NumberFormat, type Numeric, type OffsetSegment, type Op, type Operands, type Outcome, type OverlapPart, type OwnDimensionId, POSITIVE_OPS, type PageRequest, type Param, type Picks, type PinnedExecution, type Placement, type PluginEndpoints, type PluginErrorCodes, type PolicyBinding, type PolicyFilter, type PolicyName, type PolicyRule, type PositiveOp, type Preview, type Primitive, type Principal, type PublishResponse, type Published, type QueryAnswer, type QueryConnection, type QueryCtx, type QueryLine, QueryReferenceError, type QueryRefusalCode, type RawError, type RawLevels, type RawResult, type ReadContext, type ReadField, type ReadFilter, type ReadMeasure, type ReadSession, type Receipt, type RecordColumn, type RecordPage, type Recorded, type RecordsHint, type RecordsRead, type RecordsResponse, type RefOf, type Refusal, type Relationship, type RelativeRange, type Replayed, type RequiredEntry, type ResolvedDimension, type ResolvedRange, type Resource, type Result, type ResultCell, type ResultColumn, type ResultRows, type ResultWarningCode, type Row, type RowPolicy, type RunOptions, type RuntimeErrorCode, type SchemaDriver, type Scope, type ScopeCoverage, type SealedAnswer, type SecondaryStorage, type Selection, type SemanticProvider, type ServerCall, type ServerCallInput, type ServerCalls, type SharedDisplay, type SourceDef, type SourceName, type SourceNameOf, type Span, type Sql, type StoreDialect, type StoredFilter, type StoredFormulaNode, type StoredLockEntry, type StoredQuery, type StoredVersion, TABLES, type Tab, type TabId, type TableCheck, type TableDef, type TableName, type Tenant, type TenantBinding, type TenantKey, type TenantKeysOf, type TileAnswer, type TileInput, type TileLine, type TileRef, type TileRequest, type TileResult, type TilesRequest, type TimeAxis, type TimeBucket, type TimeStorage, type Token, type Tone, type TypedFilter, type TypedQuery, type UniqueIds, type Unit, type UnpublishedDraft, VIEW_PREFIX, type ValidateResponse, type ValueLeaf, type ValuesResponse, type VariableLeaf, type Verb, type VersionEntry, type ViewState, type Viewer, type ViewerFor, type ViewerLeaf, type ViewerMatch, type ViewerRef, type WeekStart, type Where, type Widget, type WidgetId, type WidgetPart, type WireFilter, type WireQuery, addsUp, bindFilter, bindPolicy, bindQueryViewer, bindViewer, bucketLabel, bucketLabels, bucketStart, canonical, changeOf, changedWidget, checkCatalog, closeGaps, closeGapsCommands, commandWidget, comparisonQuery, comparisonSpan, composeTile, createDashEndpoint, createTable, defineErrorCodes, defineModel, describeQueries, diffDocs, displayIssues, displayOf, divideExact, documentDisplayIssues, documentLock, editedDisplayIssues, effectiveFilter, emptyDoc, encodeView, entryAliases, fold, foldingPairs, formatExact, formatTextTime, formulaRefs, freeSpot, inSpan, isBound, isDateRange, isLeaf, isMark, isValuePick, isZone, itemLink, lastIncludedMillisecond, layoutGaps, linearTerms, linkTemplateIssues, lockChanged, markShifted, markedRows, memberLabel, momentMicros, namedPolicy, nextBucketStart, offsetSegments, parseDate, parseExact, parseMemberId, parseNaiveTime, parseTextTime, pickProblem, placeItem, placementOf, policyBinding, principalTenant, queryClosure, readingOrder, recordColumns, recordDimensions, reduce, reduceAll, repairLayout, replay, resolveDimension, resolveMeasure, resolveNaive, resolveRange, resultColumns, roleOf, rowValue, ruleMatches, schemaChecks, schemaStatements, selectRule, shareOf, sharedDisplay, shiftBucket, shiftInstant, smallestFor, startOfDate, stepCommands, stepMoves, storedExact, stripIds, sumLinear, tileInputs, timeAxis, toWire, validateModel, viaJoins, viewFor, viewLayout, viewerValues, widgetDiff, withTime, withView };
76
+ import { fold } from "./value/casefold.mjs";
77
+ import { Reading, StoredValue, Unread } from "./value/stored.mjs";
78
+ export { type AccessParts, type Alias, type AnswerDrill, type ApiError, type AssertionContext, type Author, type Awaitable, BASE_ERROR_CODES, type Better, type BoundFilter, type BoundPolicy, type BoundPolicyFilter, type BoundRule, type ByQuery, CATALOG, CONTRACT_VERSION, type CalcAlias, type CalcEntry, type Calendar, type CanFn, type Catalog, type CatalogIssueCode, type Cell, type Change, type Channel, type ClosedRow, type Closure, type CodeDashboard, type Column, type ColumnRole, type ColumnType, type Command, type CommandBody, type CommandId, type ComparisonFields, type ComposeCtx, type ComposeDelta, type ComposedQuery, type ComposedTile, type CompositionPolicy, type ConnectionId, type Control, type ControlId, type CoreApi, type CoreContract, type CustomSource, type Cuts, DISPLAY_OPTIONS, DRILL_REASONS, type Dash, type DashAdapter, type DashEndpoint, type DashHook, type DashOptions, type DashPlugin, type DashboardHead, type DashboardListResponse, type DashboardReader, type DashboardResponse, type DashboardStore, type DashboardSummary, type DatePart, type DateRange, type DbSchema, type DimensionAlias, type DimensionCut, type DimensionDef, type DimensionHints, type DimensionId, type DimensionName, type Display, type DisplayKind, type DisplayOf, type DisplayOptionName, type Doc, type DocumentRefusalCode, type DocumentSlice, type Draft, type DraftResponse, type DraftTarget, type Drill, type DrillAbilities, type DrillAnswer, type DrillBody, type DrillCan, type DrillComparisonView, type DrillCrumb, type DrillExplanationView, type DrillField, type DrillGroupedView, type DrillItem, type DrillItemsView, type DrillOperand, type DrillOrigin, type DrillReason, type DrillSemantics, type DrillState, type DrillStep, type DrillSummary, type DrillView, type EncodeOptions, type EndpointAccess, type EndpointContext, type EndpointsByPath, type EntryId, type Exact, type ExactSum, type Explanation, type ExplicitRange, type Expr, type ExprCondition, type ExprFunction, type Field, type FieldType, type Format, type Formula, type FormulaNode, type FormulaRef, GRID_COLUMNS, type Gap, type Grain, type GroupedRead, type HeadersLike, type HookContext, type HostCell, type HostRows, type IanaZone, type IntrospectingConnection, type IsoInstant, type Issue, type IssueCode, type ItemColumn, type ItemLinks, type ItemLinksFor, type JoinDef, type JoinName, type JoinedDimensionId, LIBRARY_WIDGET_KINDS, type LayoutItem, type Leaf, type LibraryWidgetKind, type LinearTerm, type LockEntry, MAX_DRILL_ROWS, MAX_DRILL_STEPS, MICROS_PER_DAY, MINUS, MIN_SECRET_BYTES, type Mark, type MeasureAlias, type MeasureDef, type MeasureId, type MeasureName, type MemberId, type MemberMeta, type MemberRef, type MetaJoin, type MetaMember, type MetaResponse, type Micros, type Model, ModelError, type ModelIssueCode, type Moment, type NaiveRule, type NegativeOp, type NodeId, type Noun, type NullOp, type NumberFormat, type NumberShape, type NumberWriter, type Numeric, type Offer, type Op, type Operands, type OptionType, type Outcome, type OverlapPart, type OwnDimensionId, type PageRequest, type Param, type Picks, type PinnedExecution, type Placement, type PluginEndpoints, type PluginErrorCodes, type PolicyBinding, type PolicyFilter, type PolicyName, type PolicyRule, type PositiveOp, type Preview, type Primitive, type Principal, type PublishResponse, type Published, type QueryAnswer, type QueryConnection, type QueryCtx, type QueryLine, QueryReferenceError, type QueryRefusalCode, type RawError, type RawLevels, type RawResult, type ReadContext, type ReadField, type ReadFilter, type ReadMeasure, type ReadSession, type Reading, type Receipt, type RecordColumn, type RecordPage, type Recorded, type RecordsHint, type RecordsRead, type RecordsResponse, type RefOf, type Refusal, type Relationship, type RelativeRange, type Replayed, type RequiredEntry, type ResolvedDimension, type ResolvedRange, type Resource, type Result, type ResultCell, type ResultColumn, type ResultRows, type ResultWarningCode, type Row, type RowPolicy, type RunOptions, type RuntimeErrorCode, SHARED_OPTIONS, START_REFUSALS, type SchemaDriver, type Scope, type ScopeCoverage, type SealedAnswer, type SecondaryStorage, type Selection, type SemanticProvider, type ServerCall, type ServerCallInput, type ServerCalls, type SharedDisplay, type SourceDef, type SourceName, type SourceNameOf, type Span, type Sql, StartError, type StartIssue, type StartRefusalCode, type StoreDialect, type StoredFilter, type StoredFormulaNode, type StoredLockEntry, type StoredQuery, type StoredValue, type StoredVersion, TABLES, TITLE_MOST, type Tab, type TabId, type TableCheck, type TableDef, type TableName, type Tenant, type TenantBinding, type TenantKey, type TenantKeysOf, type TileAnswer, type TileInput, type TileLine, type TileRef, type TileRequest, type TileResult, type TilesRequest, type TimeAxis, type TimeBucket, type TimeStorage, type Token, type Tone, type TypedFilter, type TypedQuery, type UniqueIds, type Unit, type UnpublishedDraft, type Unread, VIEW_PREFIX, type ValidateResponse, type ValueLeaf, type ValuesResponse, type VariableLeaf, type Verb, type VersionEntry, type ViewState, type Viewer, type ViewerFor, type ViewerLeaf, type ViewerMatch, type ViewerRef, type WeekStart, type Where, type Widget, type WidgetId, type WidgetPart, type WireFilter, type WireQuery, addsUp, answerStatus, bindPolicy, bindQueryViewer, bindViewer, bucketLabel, bucketWithin, canonical, cellDigits, changeOf, changedWidget, checkCatalog, closeGaps, closeGapsCommands, commandWidget, comparisonsByQuery, composeTile, controlFieldIssues, controlFieldOffers, createDashEndpoint, createTable, currencyOf, dashboardKeyIssues, dateMillis, decimalPlaces, defineDashboard, defineErrorCodes, defineModel, describeQueries, didYouMean, diffDocs, displayOf, displayOptionsOf, documentDisplayIssues, documentLock, durationUnits, editedDisplayIssues, effectiveFilter, emptyDoc, encodeView, entriesNamed, entryAliases, entryNamed, fold, formatExact, formatTextTime, formulaRefs, freeSpot, isBound, isDateOnly, isDateRange, isMark, isRunning, isStarting, isValuePick, itemLink, lastIncludedMillisecond, layoutGaps, layoutWidgetIssues, linkTemplateIssues, lockChanged, markShifted, markedRows, markedWhole, memberLabel, missingTenantKey, movePoint, namedPolicy, namesValues, numberWriters, parseExact, parseMemberId, parseTextTime, pickProblem, placeItem, placementOf, policyBinding, principalTenant, queryClosure, readingOrder, recordColumns, recordDimensions, reduce, reduceAll, refuseStart, refusedDisplayOptions, replay, requestInstant, resolveDimension, resultColumns, roleOf, rowValue, schemaChecks, shareOf, sharedDisplay, signOf, smallestFor, sourceOf, stepCommands, sumLinear, tenantValues, textMillis, tileInputs, toWire, unreadWarnings, validateModel, viaJoins, viewFor, viewLayout, wallClock, wholeAnswer, widgetDiff, widgetKindIssues, withTime, withView };
@@ -1,55 +1,58 @@
1
- import { BASE_ERROR_CODES, DRILL_REASONS, defineErrorCodes } from "./error/codes.mjs";
2
- import { changedWidget, diffDocs, markShifted, placementOf, widgetDiff } from "./document/diff.mjs";
3
- import { DISPLAY_HELP, DISPLAY_OPTIONS, displayIssues, displayOf, sharedDisplay } from "./document/display.mjs";
1
+ import { BASE_ERROR_CODES, DRILL_REASONS, START_REFUSALS, defineErrorCodes } from "./error/codes.mjs";
2
+ import { numberWriters } from "./format/index.mjs";
3
+ import { controlFieldIssues, controlFieldOffers } from "./document/control-fields.mjs";
4
4
  import { checkCatalog } from "./model/catalog/check.mjs";
5
+ import { changedWidget, diffDocs, markShifted, placementOf, widgetDiff } from "./document/diff.mjs";
6
+ import { DISPLAY_OPTIONS, SHARED_OPTIONS, displayOf, displayOptionsOf, sharedDisplay } from "./document/display.mjs";
7
+ import { comparisonsByQuery } from "./document/display-comparisons.mjs";
5
8
  import { describeQueries } from "./model/catalog/queries.mjs";
6
- import { policyBinding } from "./model/defaults.mjs";
9
+ import { missingTenantKey, policyBinding, tenantValues } from "./model/defaults.mjs";
10
+ import { entriesNamed, namesValues, refusedDisplayOptions } from "./document/display-entries.mjs";
7
11
  import { documentDisplayIssues, editedDisplayIssues } from "./document/display-validation.mjs";
8
- import { GRID_COLUMNS, closeGaps, closeGapsCommands, freeSpot, layoutGaps, placeItem, repairLayout } from "./document/layout.mjs";
12
+ import { GRID_COLUMNS, TITLE_MOST, closeGaps, closeGapsCommands, freeSpot, layoutGaps, placeItem } from "./document/layout.mjs";
9
13
  import { lockChanged, reduce, reduceAll } from "./document/reduce.mjs";
10
14
  import { commandWidget, replay } from "./document/replay.mjs";
11
- import { readingOrder, stepCommands, stepMoves } from "./document/stacked.mjs";
15
+ import { readingOrder, stepCommands } from "./document/stacked.mjs";
12
16
  import { emptyDoc } from "./document/types.mjs";
13
17
  import { ModelError, defineModel } from "./model/define.mjs";
14
18
  import { VIEW_PREFIX, encodeView, viewFor, withView } from "./document/view.mjs";
15
19
  import { smallestFor, viewLayout } from "./document/view-layout.mjs";
16
- import { parseMemberId, recordDimensions, resolveDimension, resolveMeasure } from "./model/member.mjs";
17
- import { formatExact, parseExact } from "./exact/text.mjs";
18
- import { EXACT_LIMIT, divideExact, storedExact } from "./exact/decimal.mjs";
20
+ import { parseMemberId, recordDimensions, resolveDimension, sourceOf } from "./model/member.mjs";
19
21
  import { rowValue, sumLinear } from "./exact/sum.mjs";
20
- import { EXPR_FUNCTIONS } from "./model/types.mjs";
21
- import { linearTerms } from "./model/validate/expr.mjs";
22
+ import { cellDigits, decimalPlaces, formatExact, movePoint, parseExact } from "./exact/text.mjs";
23
+ import { MINUS, currencyOf } from "./format/write.mjs";
24
+ import { durationUnits, signOf } from "./format/number.mjs";
25
+ import { didYouMean } from "./model/validate/fields.mjs";
22
26
  import { validateModel } from "./model/validate/index.mjs";
23
27
  import { viaJoins } from "./model/validate/via.mjs";
24
- import { bindFilter, bindPolicy, namedPolicy, viewerValues } from "./policy/bind.mjs";
28
+ import { bindPolicy, namedPolicy } from "./policy/bind.mjs";
25
29
  import { bindQueryViewer, bindViewer } from "./policy/bind-query.mjs";
26
- import { ruleMatches, selectRule } from "./policy/match.mjs";
27
- import { isZone, momentMicros } from "./time/temporal.mjs";
28
30
  import { queryClosure } from "./query/closure.mjs";
29
- import { DEFAULT_COMPOSITION_POLICY } from "./query/compose.mjs";
30
31
  import { composeTile, documentLock, tileInputs } from "./query/compose-tile.mjs";
31
32
  import { effectiveFilter } from "./query/effective.mjs";
32
- import { NEGATION_OF, NEGATIVE_OPS, NULL_OPS, POSITIVE_OPS, isBound, isLeaf, stripIds } from "./query/filter.mjs";
33
+ import { isBound } from "./query/filter.mjs";
33
34
  import { changeOf, formulaRefs, shareOf } from "./query/formulas.mjs";
34
35
  import { isDateRange, isValuePick, pickProblem } from "./query/picks.mjs";
35
- import { QueryReferenceError, entryAliases, toWire } from "./query/to-wire.mjs";
36
- import { LINK_PART, itemLink, linkTemplateIssues } from "./query/drill/links.mjs";
36
+ import { QueryReferenceError, entryAliases, entryNamed, toWire } from "./query/to-wire.mjs";
37
+ import { itemLink, linkTemplateIssues } from "./query/drill/links.mjs";
37
38
  import { MAX_DRILL_ROWS, MAX_DRILL_STEPS } from "./query/drill/types.mjs";
38
39
  import { CONTRACT_VERSION } from "./types/api.mjs";
39
40
  import { addsUp } from "./result/additive.mjs";
40
41
  import { memberLabel, recordColumns, resultColumns, roleOf } from "./result/columns.mjs";
41
42
  import { isMark, markedRows } from "./result/marks.mjs";
42
- import { lastIncludedMillisecond, parseTextTime } from "./time/text-time.mjs";
43
- import { MICROS_PER_DAY, MICROS_PER_HOUR, MICROS_PER_SECOND, formatTextTime, parseDate, parseNaiveTime } from "./time/instant.mjs";
44
- import { offsetSegments, resolveNaive, startOfDate } from "./time/zone.mjs";
45
- import { bucketLabel, bucketLabels, bucketStart, nextBucketStart, shiftBucket } from "./time/bucket.mjs";
46
- import { timeAxis, withTime } from "./result/time-axis.mjs";
43
+ import { answerStatus, unreadWarnings } from "./result/status.mjs";
44
+ import { MICROS_PER_DAY, dateMillis, isDateOnly, lastIncludedMillisecond, parseTextTime, textMillis, wallClock } from "./time/text-time.mjs";
45
+ import { formatTextTime } from "./time/instant.mjs";
46
+ import { bucketLabel } from "./time/bucket.mjs";
47
+ import { bucketWithin, isRunning, isStarting, withTime } from "./result/time-axis.mjs";
48
+ import { markedWhole, wholeAnswer } from "./result/whole.mjs";
47
49
  import { TABLES } from "./store/schema.mjs";
48
- import { CATALOG, createTable, schemaChecks, schemaStatements } from "./store/ddl.mjs";
49
- import { comparisonQuery, comparisonSpan, shiftInstant } from "./time/compare.mjs";
50
- import { inSpan, resolveRange } from "./time/range.mjs";
50
+ import { CATALOG, createTable, schemaChecks } from "./store/ddl.mjs";
51
+ import { requestInstant } from "./time/range.mjs";
52
+ import { LIBRARY_WIDGET_KINDS, defineDashboard } from "./types/dashboard.mjs";
53
+ import { MIN_SECRET_BYTES, StartError, dashboardKeyIssues, layoutWidgetIssues, refuseStart, widgetKindIssues } from "./types/options-check.mjs";
51
54
  import { createDashEndpoint } from "./types/plugin.mjs";
52
55
  import { principalTenant } from "./types/viewer.mjs";
53
56
  import { canonical } from "./value/canonical.mjs";
54
- import { fold, foldingPairs } from "./value/casefold.mjs";
55
- export { BASE_ERROR_CODES, CATALOG, CONTRACT_VERSION, DEFAULT_COMPOSITION_POLICY, DISPLAY_HELP, DISPLAY_OPTIONS, DRILL_REASONS, EXACT_LIMIT, EXPR_FUNCTIONS, GRID_COLUMNS, LINK_PART, MAX_DRILL_ROWS, MAX_DRILL_STEPS, MICROS_PER_DAY, MICROS_PER_HOUR, MICROS_PER_SECOND, ModelError, NEGATION_OF, NEGATIVE_OPS, NULL_OPS, POSITIVE_OPS, QueryReferenceError, TABLES, VIEW_PREFIX, addsUp, bindFilter, bindPolicy, bindQueryViewer, bindViewer, bucketLabel, bucketLabels, bucketStart, canonical, changeOf, changedWidget, checkCatalog, closeGaps, closeGapsCommands, commandWidget, comparisonQuery, comparisonSpan, composeTile, createDashEndpoint, createTable, defineErrorCodes, defineModel, describeQueries, diffDocs, displayIssues, displayOf, divideExact, documentDisplayIssues, documentLock, editedDisplayIssues, effectiveFilter, emptyDoc, encodeView, entryAliases, fold, foldingPairs, formatExact, formatTextTime, formulaRefs, freeSpot, inSpan, isBound, isDateRange, isLeaf, isMark, isValuePick, isZone, itemLink, lastIncludedMillisecond, layoutGaps, linearTerms, linkTemplateIssues, lockChanged, markShifted, markedRows, memberLabel, momentMicros, namedPolicy, nextBucketStart, offsetSegments, parseDate, parseExact, parseMemberId, parseNaiveTime, parseTextTime, pickProblem, placeItem, placementOf, policyBinding, principalTenant, queryClosure, readingOrder, recordColumns, recordDimensions, reduce, reduceAll, repairLayout, replay, resolveDimension, resolveMeasure, resolveNaive, resolveRange, resultColumns, roleOf, rowValue, ruleMatches, schemaChecks, schemaStatements, selectRule, shareOf, sharedDisplay, shiftBucket, shiftInstant, smallestFor, startOfDate, stepCommands, stepMoves, storedExact, stripIds, sumLinear, tileInputs, timeAxis, toWire, validateModel, viaJoins, viewFor, viewLayout, viewerValues, widgetDiff, withTime, withView };
57
+ import { fold } from "./value/casefold.mjs";
58
+ export { BASE_ERROR_CODES, CATALOG, CONTRACT_VERSION, DISPLAY_OPTIONS, DRILL_REASONS, GRID_COLUMNS, LIBRARY_WIDGET_KINDS, MAX_DRILL_ROWS, MAX_DRILL_STEPS, MICROS_PER_DAY, MINUS, MIN_SECRET_BYTES, ModelError, QueryReferenceError, SHARED_OPTIONS, START_REFUSALS, StartError, TABLES, TITLE_MOST, VIEW_PREFIX, addsUp, answerStatus, bindPolicy, bindQueryViewer, bindViewer, bucketLabel, bucketWithin, canonical, cellDigits, changeOf, changedWidget, checkCatalog, closeGaps, closeGapsCommands, commandWidget, comparisonsByQuery, composeTile, controlFieldIssues, controlFieldOffers, createDashEndpoint, createTable, currencyOf, dashboardKeyIssues, dateMillis, decimalPlaces, defineDashboard, defineErrorCodes, defineModel, describeQueries, didYouMean, diffDocs, displayOf, displayOptionsOf, documentDisplayIssues, documentLock, durationUnits, editedDisplayIssues, effectiveFilter, emptyDoc, encodeView, entriesNamed, entryAliases, entryNamed, fold, formatExact, formatTextTime, formulaRefs, freeSpot, isBound, isDateOnly, isDateRange, isMark, isRunning, isStarting, isValuePick, itemLink, lastIncludedMillisecond, layoutGaps, layoutWidgetIssues, linkTemplateIssues, lockChanged, markShifted, markedRows, markedWhole, memberLabel, missingTenantKey, movePoint, namedPolicy, namesValues, numberWriters, parseExact, parseMemberId, parseTextTime, pickProblem, placeItem, placementOf, policyBinding, principalTenant, queryClosure, readingOrder, recordColumns, recordDimensions, reduce, reduceAll, refuseStart, refusedDisplayOptions, replay, requestInstant, resolveDimension, resultColumns, roleOf, rowValue, schemaChecks, shareOf, sharedDisplay, signOf, smallestFor, sourceOf, stepCommands, sumLinear, tenantValues, textMillis, tileInputs, toWire, unreadWarnings, validateModel, viaJoins, viewFor, viewLayout, wallClock, wholeAnswer, widgetDiff, widgetKindIssues, withTime, withView };
@@ -1,3 +1,20 @@
1
+ import { TenantKey } from "../types/primitives.mjs";
1
2
  import { PolicyBinding, SourceDef } from "./types.mjs";
3
+ /** The model's tenant keys; none for a model of one tenant. */
4
+ export declare function tenantKeys(model: {
5
+ tenant?: {
6
+ keys: readonly TenantKey[];
7
+ };
8
+ }): readonly TenantKey[];
9
+ type Keyed = Parameters<typeof tenantKeys>[0];
10
+ type Values = Readonly<Record<string, string>>;
11
+ /**
12
+ * A viewer's tenant narrowed to the model's keys that have a value. The one place an empty
13
+ * value counts as missing: `{ org: "" }` is no org, so it reads and writes nothing.
14
+ */
15
+ export declare const tenantValues: (model: Keyed, values: Values) => Record<string, string>;
16
+ /** The first of the model's tenant keys with no value (`tenantValues`); none when all have one. */
17
+ export declare const missingTenantKey: (model: Keyed, values: Values) => TenantKey | undefined;
2
18
  /** A source's row policy: as declared, else every row. */
3
- export declare function policyBinding(def: SourceDef): PolicyBinding;
19
+ export declare function policyBinding(def: SourceDef): PolicyBinding;
20
+ export {};
@@ -3,6 +3,24 @@
3
3
  function tenantKeys(model) {
4
4
  return model.tenant?.keys ?? [];
5
5
  }
6
+ /**
7
+ * A record's own entry for a tenant key: every read of a viewer's tenant or a source's tenant
8
+ * columns goes through it, so a key named `toString` or `valueOf` is never the inherited function.
9
+ */
10
+ const tenantEntry = (record, key) => Object.hasOwn(record, key) ? record[key] : void 0;
11
+ /**
12
+ * A viewer's tenant narrowed to the model's keys that have a value. The one place an empty
13
+ * value counts as missing: `{ org: "" }` is no org, so it reads and writes nothing.
14
+ */
15
+ const tenantValues = (model, values) => Object.fromEntries(tenantKeys(model).flatMap((key) => {
16
+ const value = tenantEntry(values, key) ?? "";
17
+ return value === "" ? [] : [[key, value]];
18
+ }));
19
+ /** The first of the model's tenant keys with no value (`tenantValues`); none when all have one. */
20
+ const missingTenantKey = (model, values) => {
21
+ const present = tenantValues(model, values);
22
+ return tenantKeys(model).find((key) => tenantEntry(present, key) === void 0);
23
+ };
6
24
  /** The first source a model with tenant keys leaves untied to them; none when the model is sound. */
7
25
  function untiedSource(model) {
8
26
  if (tenantKeys(model).length === 0) return void 0;
@@ -21,4 +39,4 @@ function tenantBinding(model, def) {
21
39
  function policyBinding(def) {
22
40
  return def.policy ?? "all";
23
41
  }
24
- export { policyBinding, tenantBinding, tenantKeys, untiedSource };
42
+ export { missingTenantKey, policyBinding, tenantBinding, tenantEntry, tenantKeys, tenantValues, untiedSource };
@@ -5,7 +5,9 @@ import { Model } from "./types.mjs";
5
5
  * known to the type checker. Throws if the model is not valid.
6
6
  */
7
7
  export declare function defineModel<const M extends Model>(model: M): M;
8
+ /** Thrown by `defineModel`: `code` is `MODEL_INVALID`, and each issue keeps its own code. */
8
9
  export declare class ModelError extends Error {
10
+ readonly code = "MODEL_INVALID";
9
11
  readonly issues: readonly Issue[];
10
12
  constructor(issues: readonly Issue[]);
11
13
  }
@@ -14,19 +16,26 @@ type Sources<M extends Model> = M["sources"];
14
16
  export type SourceNameOf<M extends Model> = keyof Sources<M> & string;
15
17
  /** `source.measure`, for the sources in `S`. */
16
18
  export type MeasureId<M extends Model, S extends SourceNameOf<M> = SourceNameOf<M>> = { [K in S]: `${K}.${keyof Sources<M>[K]["measures"] & string}`; }[S];
17
- /** `source.dimension`: a dimension the source owns. */
18
- export type OwnDimensionId<M extends Model, S extends SourceNameOf<M> = SourceNameOf<M>> = { [K in S]: `${K}.${keyof Sources<M>[K]["dimensions"] & string}`; }[S];
19
19
  /**
20
- * `source.join.dimension`: a dimension reached through a named join. Naming the join keeps
21
- * two joins to one target apart (`created_by` and `assigned_to` both reaching `user`).
22
- * One hop only.
20
+ * The dimension names an id may end in, by source: every dimension of each, unless a caller
21
+ * keeps fewer (those holding one type of value, for a filter's fields).
23
22
  */
24
- export type JoinedDimensionId<M extends Model, S extends SourceNameOf<M> = SourceNameOf<M>> = { [K in S]: Sources<M>[K] extends {
23
+ type DimensionNames<M extends Model> = { [K in SourceNameOf<M>]: keyof Sources<M>[K]["dimensions"] & string; };
24
+ type Names<M extends Model> = Record<SourceNameOf<M>, string>;
25
+ /** `source.dimension`: a dimension the source owns, among the names `N` keeps. */
26
+ export type OwnDimensionId<M extends Model, S extends SourceNameOf<M> = SourceNameOf<M>, N extends Names<M> = DimensionNames<M>> = { [K in S]: `${K}.${N[K]}`; }[S];
27
+ /**
28
+ * `source.join.dimension`: a dimension reached through a named join, among the names `N`
29
+ * keeps. Naming the join keeps two joins to one target apart (`created_by` and `assigned_to`
30
+ * both reaching `user`). One hop only. This is the one walk of a model's joins in the types:
31
+ * a type that wants fewer ids narrows `N`, and does not walk them again.
32
+ */
33
+ export type JoinedDimensionId<M extends Model, S extends SourceNameOf<M> = SourceNameOf<M>, N extends Names<M> = DimensionNames<M>> = { [K in S]: Sources<M>[K] extends {
25
34
  joins: infer J extends Record<string, {
26
35
  to: string;
27
36
  }>;
28
- } ? { [N in keyof J & string]: J[N]["to"] extends SourceNameOf<M> ? `${K}.${N}.${keyof Sources<M>[J[N]["to"]]["dimensions"] & string}` : never; }[keyof J & string] : never; }[S];
29
- export type DimensionId<M extends Model, S extends SourceNameOf<M> = SourceNameOf<M>> = OwnDimensionId<M, S> | JoinedDimensionId<M, S>;
37
+ } ? { [X in keyof J & string]: J[X]["to"] extends SourceNameOf<M> ? `${K}.${X}.${N[J[X]["to"]]}` : never; }[keyof J & string] : never; }[S];
38
+ export type DimensionId<M extends Model, S extends SourceNameOf<M> = SourceNameOf<M>, N extends Names<M> = DimensionNames<M>> = OwnDimensionId<M, S, N> | JoinedDimensionId<M, S, N>;
30
39
  /** Every id a query, filter, order or formula may name. */
31
40
  export type MemberId<M extends Model> = MeasureId<M> | DimensionId<M>;
32
41
  export {};
@@ -9,7 +9,9 @@ function defineModel(model) {
9
9
  if (issues.length > 0) throw new ModelError(issues);
10
10
  return model;
11
11
  }
12
+ /** Thrown by `defineModel`: `code` is `MODEL_INVALID`, and each issue keeps its own code. */
12
13
  var ModelError = class extends Error {
14
+ code = "MODEL_INVALID";
13
15
  issues;
14
16
  constructor(issues) {
15
17
  const lines = issues.map((i) => ` ${i.path.join(".")}: ${i.message} [${i.code}]`);
@@ -1,4 +1,4 @@
1
- import { DimensionDef, MeasureDef, Model } from "./types.mjs";
1
+ import { DimensionDef, Model, SourceDef } from "./types.mjs";
2
2
  /** A member id: `source.name` for an own member, `source.join.name` one join away. */
3
3
  export type MemberRef = {
4
4
  source: string;
@@ -7,18 +7,20 @@ export type MemberRef = {
7
7
  };
8
8
  /** The one place member ids are parsed. Undefined for anything else, never a guess. */
9
9
  export declare function parseMemberId(id: string): MemberRef | undefined;
10
+ /** The source a name from outside the model names; none for a name the model does not have. */
11
+ export declare const sourceOf: (model: Model, name: string) => SourceDef | undefined;
10
12
  export type ResolvedDimension = {
11
13
  source: string;
12
14
  join?: string;
13
15
  dimension: DimensionDef;
14
16
  };
17
+ /** The type of value a dimension holds: what a filter on it compares and a column of it is. */
18
+ export type DimensionValueType = "string" | "number" | "boolean" | "time";
15
19
  /**
16
20
  * The dimension a member id names, seen from `sourceName`: own, or one hop through a join
17
21
  * that reaches at most one row. Undefined when it does not exist.
18
22
  */
19
23
  export declare function resolveDimension(model: Model, sourceName: string, id: string): ResolvedDimension | undefined;
20
- /** The measure a member id names. Measures are always the source's own. */
21
- export declare function resolveMeasure(model: Model, sourceName: string, id: string): MeasureDef | undefined;
22
24
  /**
23
25
  * The dimensions a records view of a source shows, by name: its `records.columns`, or else up
24
26
  * to twelve that are neither hidden, sensitive nor `drill: false`: its text fields, then its