lintje 0.7.0 → 0.8.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 (263) hide show
  1. package/NOTICE.md +2 -0
  2. package/README.md +2 -2
  3. package/dist-elements/actions.js +1 -1
  4. package/dist-elements/chat.js +1 -1
  5. package/dist-elements/chunks/{addon-CFoSG70u.js → addon-B-nZKTVZ.js} +2 -2
  6. package/dist-elements/chunks/avatar-C1Wj9drG.js +1 -0
  7. package/dist-elements/chunks/axes-DPj3RyPk.js +129 -0
  8. package/dist-elements/chunks/base-lxVG98kf.js +226 -0
  9. package/dist-elements/chunks/chart-styles-sK3xVPFj.js +45 -0
  10. package/dist-elements/chunks/{date-format-5bii3QLP.js → date-format-DvDaZtFc.js} +1 -1
  11. package/dist-elements/chunks/{dialog-close-CzMRXkJ6.js → dialog-close-DpjJ6JbT.js} +1 -1
  12. package/dist-elements/chunks/disclosure-Ch2SwnkG.js +1 -0
  13. package/dist-elements/chunks/disclosure-o3Agc4Ji.js +20 -0
  14. package/dist-elements/chunks/download-C74iql1Q.js +18 -0
  15. package/dist-elements/chunks/{focus-trap-BDxiHED1.js → focus-trap-xGyZPSzU.js} +1 -1
  16. package/dist-elements/chunks/frame-BMR48Vea.js +1 -0
  17. package/dist-elements/chunks/{input-C7qx0e4p.js → input-C7MnFu5X.js} +4 -4
  18. package/dist-elements/chunks/input-CCT6CcW1.js +1 -0
  19. package/dist-elements/chunks/month-grid-CoYFI13w.js +26 -0
  20. package/dist-elements/chunks/{other-BaLStKaf.js → other-D_wlqvPA.js} +3 -3
  21. package/dist-elements/chunks/player-BW0tPg9_.js +39 -0
  22. package/dist-elements/chunks/{prose-DOF7h3je.js → prose-aNcSsHId.js} +1 -1
  23. package/dist-elements/chunks/search-text-i-Em9oIy.js +1 -0
  24. package/dist-elements/chunks/sentence-CJX3W7W5.js +3 -0
  25. package/dist-elements/chunks/stagger-DYloMMgF.js +27 -0
  26. package/dist-elements/chunks/wheel-Co2Dpj0Q.js +1 -0
  27. package/dist-elements/content.js +1 -1
  28. package/dist-elements/core.js +1 -1
  29. package/dist-elements/custom-elements.json +1298 -204
  30. package/dist-elements/data-types.json +2836 -622
  31. package/dist-elements/feedback.js +1 -1
  32. package/dist-elements/graph.d.ts +1 -0
  33. package/dist-elements/graph.js +1 -0
  34. package/dist-elements/guides/events.md +7 -3
  35. package/dist-elements/guides/loading.md +12 -9
  36. package/dist-elements/layout.js +1 -1
  37. package/dist-elements/lintje.js +3002 -2246
  38. package/dist-elements/overlays.js +1 -1
  39. package/dist-elements/skills/lintje/SKILL.md +26 -5
  40. package/dist-elements/skills/lintje/check.mjs +180 -0
  41. package/dist-elements/skills/lintje/reference.mjs +24 -3
  42. package/dist-elements/tables.js +1 -1
  43. package/dist-elements/tag/accordion.d.ts +1 -0
  44. package/dist-elements/tag/accordion.js +6 -0
  45. package/dist-elements/tag/activity-log.js +13 -11
  46. package/dist-elements/tag/ai-label.js +5 -5
  47. package/dist-elements/tag/announcement.js +2 -2
  48. package/dist-elements/tag/app-search.js +19 -19
  49. package/dist-elements/tag/attachment.d.ts +1 -0
  50. package/dist-elements/tag/attachment.js +54 -0
  51. package/dist-elements/tag/audio-player.js +42 -42
  52. package/dist-elements/tag/badge.js +1 -1
  53. package/dist-elements/tag/breadcrumbs.js +8 -8
  54. package/dist-elements/tag/button.js +1 -1
  55. package/dist-elements/tag/card-list.js +9 -9
  56. package/dist-elements/tag/card.js +41 -35
  57. package/dist-elements/tag/chart.js +682 -419
  58. package/dist-elements/tag/chat-answer.js +49 -47
  59. package/dist-elements/tag/chat-composer.js +100 -40
  60. package/dist-elements/tag/chat-message.js +16 -11
  61. package/dist-elements/tag/chat-questions.d.ts +1 -0
  62. package/dist-elements/tag/chat-questions.js +133 -0
  63. package/dist-elements/tag/chat-steps.d.ts +1 -0
  64. package/dist-elements/tag/chat-steps.js +52 -0
  65. package/dist-elements/tag/chat-strip.js +27 -27
  66. package/dist-elements/tag/chat-suggestions.js +9 -10
  67. package/dist-elements/tag/chat.js +70 -42
  68. package/dist-elements/tag/checkbox-group.js +8 -8
  69. package/dist-elements/tag/checkbox.js +7 -7
  70. package/dist-elements/tag/code.js +9 -9
  71. package/dist-elements/tag/combobox.js +22 -22
  72. package/dist-elements/tag/conflict-alert.js +7 -7
  73. package/dist-elements/tag/copy-button.js +9 -9
  74. package/dist-elements/tag/data-table.js +237 -232
  75. package/dist-elements/tag/date-input.js +15 -39
  76. package/dist-elements/tag/date-range.js +21 -46
  77. package/dist-elements/tag/description-list.js +21 -19
  78. package/dist-elements/tag/dialog.js +7 -7
  79. package/dist-elements/tag/document-viewer.js +23 -23
  80. package/dist-elements/tag/drawer.js +9 -9
  81. package/dist-elements/tag/empty-state.js +1 -1
  82. package/dist-elements/tag/error-page.js +11 -11
  83. package/dist-elements/tag/error-summary.js +12 -12
  84. package/dist-elements/tag/expander.js +5 -5
  85. package/dist-elements/tag/explainer.js +5 -5
  86. package/dist-elements/tag/field.js +4 -4
  87. package/dist-elements/tag/file-upload.js +32 -42
  88. package/dist-elements/tag/filter-bar.js +20 -20
  89. package/dist-elements/tag/filter-sheet.js +3 -3
  90. package/dist-elements/tag/filter-zone.js +15 -15
  91. package/dist-elements/tag/find.js +16 -16
  92. package/dist-elements/tag/footer.js +14 -14
  93. package/dist-elements/tag/form-actions.js +2 -2
  94. package/dist-elements/tag/form-section.js +3 -3
  95. package/dist-elements/tag/form.js +3 -3
  96. package/dist-elements/tag/gallery.js +10 -10
  97. package/dist-elements/tag/graph.d.ts +1 -0
  98. package/dist-elements/tag/graph.js +102 -0
  99. package/dist-elements/tag/grid-item.js +1 -1
  100. package/dist-elements/tag/grid.js +1 -1
  101. package/dist-elements/tag/hero.js +7 -7
  102. package/dist-elements/tag/highlight.js +4 -4
  103. package/dist-elements/tag/icon-button.js +1 -1
  104. package/dist-elements/tag/icon.js +1 -1
  105. package/dist-elements/tag/job-list.js +4 -4
  106. package/dist-elements/tag/key.d.ts +1 -0
  107. package/dist-elements/tag/key.js +1 -0
  108. package/dist-elements/tag/kpi-row.js +5 -5
  109. package/dist-elements/tag/kpi.js +70 -70
  110. package/dist-elements/tag/level-meter.js +8 -8
  111. package/dist-elements/tag/list.js +43 -42
  112. package/dist-elements/tag/log-viewer.js +68 -68
  113. package/dist-elements/tag/logo.js +23 -23
  114. package/dist-elements/tag/map.js +154 -153
  115. package/dist-elements/tag/menu-button.js +34 -34
  116. package/dist-elements/tag/modal.js +9 -9
  117. package/dist-elements/tag/multiselect.js +21 -22
  118. package/dist-elements/tag/note.js +2 -2
  119. package/dist-elements/tag/notifications.js +23 -23
  120. package/dist-elements/tag/number-input.js +18 -18
  121. package/dist-elements/tag/page-header.js +13 -13
  122. package/dist-elements/tag/pagination.js +26 -26
  123. package/dist-elements/tag/person-group.d.ts +1 -0
  124. package/dist-elements/tag/person-group.js +36 -0
  125. package/dist-elements/tag/person.d.ts +1 -0
  126. package/dist-elements/tag/person.js +11 -0
  127. package/dist-elements/tag/popover.js +1 -1
  128. package/dist-elements/tag/progress-bar.js +1 -1
  129. package/dist-elements/tag/prose.js +1 -1
  130. package/dist-elements/tag/qr-code.js +5 -5
  131. package/dist-elements/tag/radio-group.js +12 -12
  132. package/dist-elements/tag/range.js +24 -24
  133. package/dist-elements/tag/recording-status.js +9 -9
  134. package/dist-elements/tag/repeater.js +5 -5
  135. package/dist-elements/tag/segmented.js +8 -8
  136. package/dist-elements/tag/select.js +8 -8
  137. package/dist-elements/tag/shell.js +199 -199
  138. package/dist-elements/tag/skeleton.js +1 -1
  139. package/dist-elements/tag/slot-picker.js +15 -15
  140. package/dist-elements/tag/sortable-list.js +20 -20
  141. package/dist-elements/tag/spinner.js +1 -1
  142. package/dist-elements/tag/split-pane.js +9 -9
  143. package/dist-elements/tag/status-dot.js +1 -1
  144. package/dist-elements/tag/stepper.js +14 -14
  145. package/dist-elements/tag/streaming-text.js +13 -13
  146. package/dist-elements/tag/sub-nav.js +20 -20
  147. package/dist-elements/tag/tabs.js +37 -38
  148. package/dist-elements/tag/tag-input.js +28 -28
  149. package/dist-elements/tag/text-editor.js +25 -24
  150. package/dist-elements/tag/text-input.js +21 -21
  151. package/dist-elements/tag/textarea.js +11 -11
  152. package/dist-elements/tag/tile.js +1 -1
  153. package/dist-elements/tag/time-input.js +13 -13
  154. package/dist-elements/tag/toast.js +8 -8
  155. package/dist-elements/tag/toggle.js +5 -5
  156. package/dist-elements/tag/toggletip.js +6 -6
  157. package/dist-elements/tag/token-value.js +2 -2
  158. package/dist-elements/tag/tooltip.js +1 -1
  159. package/dist-elements/tag/transcript.js +32 -32
  160. package/dist-elements/tag/translator.js +6 -6
  161. package/dist-elements/tag/tree-view.js +22 -22
  162. package/dist-elements/tag/user-menu.js +37 -36
  163. package/dist-elements/tag/video-player.js +17 -14
  164. package/dist-elements/tokens.css +52 -1
  165. package/dist-elements/tokens.json +701 -313
  166. package/dist-elements/types/bundle/chat.d.ts +2 -0
  167. package/dist-elements/types/bundle/content.d.ts +2 -0
  168. package/dist-elements/types/bundle/graph.d.ts +2 -0
  169. package/dist-elements/types/bundle/index.d.ts +1 -1
  170. package/dist-elements/types/bundle/layout.d.ts +1 -0
  171. package/dist-elements/types/bundle/tables.d.ts +2 -0
  172. package/dist-elements/types/components/charts/chart/chart.d.ts +3 -12
  173. package/dist-elements/types/components/chat/chat/chat.d.ts +11 -2
  174. package/dist-elements/types/components/chat/chat-answer/chat-answer.d.ts +6 -4
  175. package/dist-elements/types/components/chat/chat-composer/chat-composer.d.ts +61 -4
  176. package/dist-elements/types/components/chat/chat-message/chat-message.d.ts +6 -2
  177. package/dist-elements/types/components/chat/chat-questions/chat-questions.d.ts +106 -0
  178. package/dist-elements/types/components/chat/chat-steps/chat-steps.d.ts +53 -0
  179. package/dist-elements/types/components/chat/chat-suggestions/chat-suggestions.d.ts +4 -11
  180. package/dist-elements/types/components/content/attachment/attachment.d.ts +58 -0
  181. package/dist-elements/types/components/content/audio-player/audio-player.d.ts +2 -1
  182. package/dist-elements/types/components/content/key/key.d.ts +21 -0
  183. package/dist-elements/types/components/content/prose/prose.d.ts +4 -3
  184. package/dist-elements/types/components/content/shared/player.d.ts +2 -1
  185. package/dist-elements/types/components/content/transcript/transcript.d.ts +7 -0
  186. package/dist-elements/types/components/content/video-player/video-player.d.ts +12 -3
  187. package/dist-elements/types/components/feedback/empty-state/empty-state.d.ts +2 -2
  188. package/dist-elements/types/components/feedback/status-dot/status-dot.d.ts +13 -2
  189. package/dist-elements/types/components/forms/form-actions/form-actions.d.ts +5 -2
  190. package/dist-elements/types/components/frame/app-search/app-search.d.ts +0 -2
  191. package/dist-elements/types/components/frame/user-menu/user-menu.d.ts +2 -2
  192. package/dist-elements/types/components/graph/graph/graph.d.ts +147 -0
  193. package/dist-elements/types/components/graph/graph/layout-runner.d.ts +13 -0
  194. package/dist-elements/types/components/graph/graph/layout-worker.d.ts +1 -0
  195. package/dist-elements/types/components/graph/graph/layout.d.ts +27 -0
  196. package/dist-elements/types/components/graph/graph/model.d.ts +81 -0
  197. package/dist-elements/types/components/graph/graph/routes.d.ts +62 -0
  198. package/dist-elements/types/components/graph/graph/view.d.ts +58 -0
  199. package/dist-elements/types/components/index.d.ts +20 -4
  200. package/dist-elements/types/components/inputs/combobox/combobox.d.ts +0 -2
  201. package/dist-elements/types/components/inputs/date-input/date-input.d.ts +1 -1
  202. package/dist-elements/types/components/inputs/date-range/date-range.d.ts +17 -6
  203. package/dist-elements/types/components/inputs/file-upload/file-upload.d.ts +10 -33
  204. package/dist-elements/types/components/inputs/multiselect/multiselect.d.ts +1 -11
  205. package/dist-elements/types/components/layout/accordion/accordion.d.ts +37 -0
  206. package/dist-elements/types/components/layout/expander/expander.d.ts +5 -1
  207. package/dist-elements/types/components/layout/split-pane/split-pane.d.ts +2 -0
  208. package/dist-elements/types/components/layout/tabs/tabs.d.ts +3 -0
  209. package/dist-elements/types/components/overlays/popover/popover.d.ts +7 -0
  210. package/dist-elements/types/components/overlays/tooltip/tooltip.d.ts +1 -1
  211. package/dist-elements/types/components/shared/avatar.d.ts +21 -0
  212. package/dist-elements/types/components/shared/charts/bar-chart/bar-chart.d.ts +3 -2
  213. package/dist-elements/types/components/shared/charts/dumbbell-chart/dumbbell-chart.d.ts +33 -0
  214. package/dist-elements/types/components/shared/charts/index.d.ts +6 -2
  215. package/dist-elements/types/components/shared/charts/kinds.d.ts +22 -4
  216. package/dist-elements/types/components/shared/charts/line-chart/line-chart.d.ts +3 -2
  217. package/dist-elements/types/components/shared/charts/sankey-chart/sankey-chart.d.ts +124 -0
  218. package/dist-elements/types/components/shared/charts/shared/axes.d.ts +33 -6
  219. package/dist-elements/types/components/shared/charts/shared/chart-states.d.ts +1 -1
  220. package/dist-elements/types/components/shared/charts/shared/chart-styles.d.ts +2 -0
  221. package/dist-elements/types/components/shared/charts/shared/colors.d.ts +29 -4
  222. package/dist-elements/types/components/shared/charts/shared/controller.d.ts +23 -3
  223. package/dist-elements/types/components/shared/charts/shared/forecast.d.ts +21 -0
  224. package/dist-elements/types/components/shared/charts/shared/plot-keys.d.ts +5 -0
  225. package/dist-elements/types/components/shared/charts/shared/tints.d.ts +2 -0
  226. package/dist-elements/types/components/shared/charts/shared/types.d.ts +146 -0
  227. package/dist-elements/types/components/shared/charts/shared/wheel.d.ts +11 -0
  228. package/dist-elements/types/components/shared/charts/treemap-chart/squarify.d.ts +16 -0
  229. package/dist-elements/types/components/shared/charts/treemap-chart/treemap-chart.d.ts +18 -0
  230. package/dist-elements/types/components/shared/charts/treemap-chart/treemap-labels.d.ts +36 -0
  231. package/dist-elements/types/components/shared/charts/treemap-chart/treemap-parts.d.ts +64 -0
  232. package/dist-elements/types/components/shared/disclosure.d.ts +5 -3
  233. package/dist-elements/types/components/shared/download.d.ts +28 -2
  234. package/dist-elements/types/components/shared/empty-state-block.d.ts +1 -1
  235. package/dist-elements/types/components/shared/files.d.ts +67 -0
  236. package/dist-elements/types/components/shared/heading.d.ts +4 -0
  237. package/dist-elements/types/components/shared/month-grid.d.ts +33 -0
  238. package/dist-elements/types/components/shared/place.d.ts +2 -2
  239. package/dist-elements/types/components/shared/search-text.d.ts +5 -0
  240. package/dist-elements/types/components/tables/activity-log/activity-log.d.ts +9 -2
  241. package/dist-elements/types/components/tables/card/card.d.ts +13 -2
  242. package/dist-elements/types/components/tables/data-table/editing.d.ts +7 -2
  243. package/dist-elements/types/components/tables/description-list/description-list.d.ts +4 -0
  244. package/dist-elements/types/components/tables/list/list.d.ts +9 -0
  245. package/dist-elements/types/components/tables/person/person.d.ts +35 -0
  246. package/dist-elements/types/components/tables/person-group/person-group.d.ts +42 -0
  247. package/dist-elements/types/core/format.d.ts +2 -2
  248. package/dist-elements/types/core/id.d.ts +2 -0
  249. package/dist-elements/types/icons/register.d.ts +1 -1
  250. package/dist-elements/types/types.d.ts +194 -15
  251. package/dist-elements/workers/layout-worker.js +3 -0
  252. package/dist-icons/functioneel-link.svg +1 -0
  253. package/dist-icons/functioneel-ondertiteling.svg +1 -0
  254. package/package.json +8 -1
  255. package/dist-elements/chunks/base-BsZyWDre.js +0 -226
  256. package/dist-elements/chunks/chart-styles-C5IzbVUF.js +0 -44
  257. package/dist-elements/chunks/disclosure-CQcLUnKh.js +0 -22
  258. package/dist-elements/chunks/disclosure-DjLQzn9n.js +0 -1
  259. package/dist-elements/chunks/download-CxEzwMxI.js +0 -13
  260. package/dist-elements/chunks/input-CazTpGUd.js +0 -1
  261. package/dist-elements/chunks/player-BEG3MVCm.js +0 -39
  262. package/dist-elements/chunks/sentence-CjgQjBP9.js +0 -3
  263. package/dist-elements/chunks/stagger-CwsMNTLl.js +0 -133
@@ -0,0 +1,64 @@
1
+ /**
2
+ * What a treemap draws, from the host's parts: the parts that have an area, largest first, with
3
+ * the parts under 1 % of the whole folded into one grey "Overig" (at the top and inside a part),
4
+ * the total of what is drawn and what is missing from it. Also the table's rows, which keep
5
+ * every part apart.
6
+ */
7
+ import type { ChartSpec, TreemapPart } from '../shared/types.js';
8
+ type TreemapSpec = Extract<ChartSpec, {
9
+ kind: 'treemap';
10
+ }>;
11
+ /** A part under this share of the whole folds into "Overig", if another one does too. */
12
+ export declare const FOLD_SHARE = 0.01;
13
+ /** A part folded into an "Overig", for its tooltip. */
14
+ export interface FoldedPart {
15
+ label: string;
16
+ value: number;
17
+ }
18
+ /** One area of the drawing: a part without sub-parts, a sub-part, or an "Overig". */
19
+ export interface TreemapArea {
20
+ label: string;
21
+ value: number;
22
+ /** Grey and never labelled: the parts under 1 % together. */
23
+ other: boolean;
24
+ folded: FoldedPart[];
25
+ }
26
+ /** A part of the whole as drawn: one area, or its sub-parts' areas inside it. */
27
+ export interface TreemapGroup {
28
+ label: string;
29
+ /** What is drawn of it: its value, or the sum of its sub-parts that have one. */
30
+ value: number;
31
+ /** Its identity for a choice: its `id`, else its label. */
32
+ id: string;
33
+ href?: string;
34
+ other: boolean;
35
+ folded: FoldedPart[];
36
+ /** With sub-parts, their areas, largest first and their own "Overig" last; else empty. */
37
+ areas: TreemapArea[];
38
+ /** Sub-parts without data: its sum is without them. */
39
+ missing: string[];
40
+ /** Its place among the parts that take a tint, darkest first; -1 for "Overig". */
41
+ rank: number;
42
+ }
43
+ export interface TreemapModel {
44
+ groups: TreemapGroup[];
45
+ /** The sum of what is drawn. */
46
+ total: number;
47
+ /** The decimals of the most precise value the host sent. */
48
+ decimals: number;
49
+ /** What has no data, in the host's order: a part, or a sub-part by its own name. */
50
+ missing: string[];
51
+ /** Some parts fold into an "Overig". */
52
+ folded: boolean;
53
+ /** Some part has sub-parts. */
54
+ nested: boolean;
55
+ }
56
+ /** A part without any data: its value, or every one of its sub-parts. */
57
+ export declare function isMissing(part: TreemapPart): boolean;
58
+ export declare function treemapModel(spec: Pick<TreemapSpec, 'parts'>): TreemapModel;
59
+ /**
60
+ * The table's and the CSV's rows, header first: a row per sub-part, or per part without them,
61
+ * in the drawn order and those without an area after them. What the drawing folds stays apart.
62
+ */
63
+ export declare function treemapRows(spec: TreemapSpec): (string | number | null)[][];
64
+ export {};
@@ -4,7 +4,7 @@
4
4
  * not `--dur-collapse`: whatever `tokens/base.css` lets move under reduced motion decides the wait.
5
5
  */
6
6
  import { type ReactiveController, type ReactiveControllerHost, type TemplateResult } from 'lit';
7
- export declare function nextDisclosureId(): string;
7
+ import { type HeadingLevel } from './heading.js';
8
8
  export declare class DisclosureSettle implements ReactiveController {
9
9
  #private;
10
10
  /** False while the body is growing; the box clips until then. */
@@ -17,17 +17,19 @@ export declare class DisclosureSettle implements ReactiveController {
17
17
  export interface DisclosureHeaderOptions {
18
18
  bodyId: string;
19
19
  open: boolean;
20
- /** The title text, drawn inside an `<h3>`. */
20
+ /** The title text, drawn inside the heading. */
21
21
  title: unknown;
22
22
  subtitle?: string;
23
23
  /** An icon file name. Decorative. */
24
24
  icon?: string;
25
25
  /** The chevron before the title instead of at the end of the row. */
26
26
  leading?: boolean;
27
+ /** The heading's level; `h3` when unset. */
28
+ level?: HeadingLevel;
27
29
  toggle: () => void;
28
30
  }
29
31
  /**
30
- * The heading holds the button, not the reverse: an `<h3>` inside a `<button>` is presentational
32
+ * The heading holds the button, not the reverse: a heading inside a `<button>` is presentational
31
33
  * and reaches no assistive technology. Inside the button only phrasing content.
32
34
  */
33
35
  export declare function disclosureHeader(options: DisclosureHeaderOptions): TemplateResult;
@@ -1,7 +1,11 @@
1
1
  /**
2
2
  * The downloads a tile offers: the numbers as CSV (semicolons, decimal comma and a byte order
3
- * mark, so a Dutch spreadsheet opens columns) and the chart's `<svg>` as PNG.
3
+ * mark, so a Dutch spreadsheet opens columns) and the image of a chart as PNG.
4
4
  * A missing value is an empty cell, never 0 (rule 15).
5
+ *
6
+ * The image is what the chart shows on screen without its controls, composed as one `<svg>`
7
+ * (`chartImage`) before it becomes a PNG. Every part is drawn where the screen has it, in plain
8
+ * SVG: HTML in a `<foreignObject>` does not reliably reach a canvas, in WebKit least of all.
5
9
  */
6
10
  export type CsvCell = string | number | null | undefined;
7
11
  export declare function toCsv(rows: CsvCell[][]): string;
@@ -10,5 +14,27 @@ export declare function downloadText(name: string, text: string, type: string):
10
14
  export declare function downloadCsv(filename: string, rows: CsvCell[][]): void;
11
15
  /** The surface a PNG is drawn on; an empty string leaves the PNG transparent. */
12
16
  export declare function surfaceColour(svg: Element): string;
13
- /** The chart's `<svg>` as a PNG, twice its size. The web font is not embedded: the system face. */
17
+ /** What an element that is no chart tells the image about itself. */
18
+ export interface ImageOptions {
19
+ /** Its controls, left out as a tooltip is: zoom buttons, an overview. */
20
+ skip?: string;
21
+ /** Buttons that are content, drawn with their own box: a node that is a card. */
22
+ buttons?: string;
23
+ }
24
+ /** What the tile around a chart says; the image draws it around the chart, as the tile does. */
25
+ export interface ImageFrame {
26
+ title?: string;
27
+ subtitle?: string;
28
+ footnote?: string;
29
+ }
30
+ /**
31
+ * The chart in `root` as one `<svg>` on the surface of the mode the reader looks in: the legend,
32
+ * axis titles, drawing, events and legend table where they stand on screen. With a `frame`, the
33
+ * tile around it as well: its padding and edge, the title and subtitle above, the footnote below.
34
+ */
35
+ export declare function chartImage(root: Element, frame?: ImageFrame, options?: ImageOptions): SVGSVGElement;
36
+ /**
37
+ * An image of `chartImage` as a PNG, in the page's web font. A drawing still on the page is made
38
+ * one first, alone.
39
+ */
14
40
  export declare function downloadPng(filename: string, svg: SVGSVGElement): Promise<void>;
@@ -4,7 +4,7 @@
4
4
  * arrives with its words is not announced.
5
5
  */
6
6
  import { nothing, type CSSResult, type TemplateResult } from 'lit';
7
- export type HeadingLevel = 2 | 3 | 4 | 5 | 6;
7
+ import { type HeadingLevel } from './heading.js';
8
8
  export declare const emptyStateBlockStyles: CSSResult;
9
9
  export interface EmptyStateBlockOptions {
10
10
  /** Not drawn when `compact`. */
@@ -0,0 +1,67 @@
1
+ /** One file, as the host keeps it: chosen, sent along with a question or given back in an answer. */
2
+ export interface UploadFile {
3
+ id: string;
4
+ name: string;
5
+ /** In bytes. Without it and without `detail`, only the name stands. */
6
+ size?: number;
7
+ state: 'busy' | 'done' | 'error';
8
+ /** 0–100 while busy; left out, the line is indeterminate. */
9
+ progress?: number;
10
+ /** Why it failed or was refused, in Dutch. */
11
+ message?: string;
12
+ /** The MIME type; it picks the icon. Without it the extension does. */
13
+ type?: string;
14
+ /** Stands in for the size: "blz. 4" beside a source. */
15
+ detail?: string;
16
+ /** A small picture the host made; an image without one gets the blank sheet. */
17
+ thumbnail?: string;
18
+ /** The chip is a link to it. */
19
+ href?: string;
20
+ /** With `href`: the link hands over the file, and the browser keeps the click. */
21
+ download?: boolean;
22
+ /** With `state: 'error'`: the upload can be tried again. */
23
+ retry?: boolean;
24
+ }
25
+ export declare function formatSize(bytes: number): string;
26
+ export declare function typesText(accept: string): string;
27
+ /** The types and the largest size, as the line under a drop zone: "PDF of JPG · hoogstens 10 MB". */
28
+ export declare function limitsText(accept: string, maxSize: number | undefined): string;
29
+ export declare function accepts(file: {
30
+ name: string;
31
+ type: string;
32
+ }, accept: string): boolean;
33
+ export declare function refusal(file: {
34
+ name: string;
35
+ type: string;
36
+ size: number;
37
+ }, accept: string, maxSize: number | undefined): string;
38
+ /** A file's state in words: the icon and the line beside the name are drawing only. */
39
+ export declare const STATE_TEXT: {
40
+ readonly busy: 'bezig';
41
+ readonly done: 'klaar';
42
+ /** An error of the host's: the upload failed. */
43
+ readonly error: 'mislukt';
44
+ /** An error of the element's own: it never let the file through. */
45
+ readonly refused: 'geweigerd';
46
+ };
47
+ /** What changed between two lists, for a status region. `refused`: the errors are the element's own. */
48
+ export declare function rowNews(before: UploadFile[], after: UploadFile[], refused?: boolean): string;
49
+ /**
50
+ * What a drop zone says while files are dragged: beside it, it points at itself; over it, what
51
+ * letting go does. `count` is 0 when the browser does not say.
52
+ */
53
+ export declare function dropText(count: number, over?: boolean): string;
54
+ /** Whether a drag carries files, and not only text or a link. */
55
+ export declare const carriesFiles: (event: DragEvent) => boolean;
56
+ /** The files on the clipboard, only when it carries no text: pasted text stays text. */
57
+ export declare function pastedFiles(event: ClipboardEvent): File[];
58
+ /**
59
+ * The focus of a list of files whose rows can leave: held before the rows change, and handed to
60
+ * the row now in its place (else the one before, else `fallback`) once its row has left.
61
+ * A row is an element with `data-id` that takes the focus through its own `focus()`.
62
+ */
63
+ export declare class RowFocus {
64
+ #private;
65
+ hold(rows: HTMLElement[]): void;
66
+ restore(rows: HTMLElement[], fallback: () => void): void;
67
+ }
@@ -0,0 +1,4 @@
1
+ /** A heading at the level the host asks for; `h3` when it asks for none. */
2
+ import { type TemplateResult } from 'lit';
3
+ export type HeadingLevel = 2 | 3 | 4 | 5 | 6;
4
+ export declare function renderHeading(level: HeadingLevel | undefined, className: string, content: unknown, id?: string): TemplateResult;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * The one month grid of the date input and the date range: the weekday heads, the weeks as day
3
+ * cells, their states and their keys. Its owner draws it in its own root, with `monthGridCss`,
4
+ * and says per day what it means there.
5
+ */
6
+ import { type TemplateResult } from 'lit';
7
+ /** What one day is to the grid's owner. */
8
+ export interface GridDay {
9
+ /** Filled in the primary: the chosen day, or the start or end of a period. */
10
+ selected?: boolean;
11
+ /** Between the start and the end of a period. */
12
+ inRange?: boolean;
13
+ /** Outside what may be chosen: it keeps its tab stop, a press does nothing. */
14
+ blocked?: boolean;
15
+ /** What the day's name adds, after a comma. */
16
+ note?: string;
17
+ }
18
+ export interface MonthGrid {
19
+ /** The day that holds the grid's one tab stop, ISO; the grid shows its month. */
20
+ focus: string;
21
+ /** The day marked as today, ISO. */
22
+ today: string;
23
+ /** More than one day is selected at once: a period and the days in it. */
24
+ multiselectable?: boolean;
25
+ day: (iso: string) => GridDay;
26
+ /** A click, Enter or Space on a day that is not blocked. */
27
+ onPick: (iso: string) => void;
28
+ /** An arrow, Home, End or PageUp/PageDown: the day the tab stop goes to, in any month. */
29
+ onMove: (iso: string) => void;
30
+ }
31
+ export declare function renderMonthGrid(grid: MonthGrid): TemplateResult;
32
+ /** Focuses the day that holds the tab stop, once the owner has drawn it. */
33
+ export declare function focusGridDay(root: ParentNode): void;
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Where a floating box stands against its anchor, in viewport pixels: below or above at a fixed
3
3
  * gap, flipped when the room is too small and the other side has more, never past the viewport.
4
- * Shared by the popover and the tooltip.
4
+ * Shared by the popover, the tooltip, the toggletip, the multiselect and the date range.
5
5
  */
6
- export type Placement = 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end' | 'top-center' | 'left-center' | 'left-start';
6
+ export type Placement = 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end' | 'top-center' | 'bottom-center' | 'left-center' | 'left-start';
7
7
  /** `bottom` is set instead of `top` when the box stands above the anchor. */
8
8
  export interface Place {
9
9
  top: number | null;
@@ -0,0 +1,5 @@
1
+ /** The words of a search, shared by the app search, the combobox, the tag input and the multiselect. */
2
+ /** The label split around the first case-insensitive occurrence of the term; null when absent. */
3
+ export declare function splitMatch(label: string, query: string): [string, string, string] | null;
4
+ /** "1 resultaat", "3 resultaten". */
5
+ export declare function resultsText(count: number): string;
@@ -7,9 +7,14 @@
7
7
  import { type PropertyDeclarations, type TemplateResult } from 'lit';
8
8
  import { LintjeElement } from '../../../core/element.js';
9
9
  import '../../actions/button/button.js';
10
+ import '../person/person.js';
11
+ import type { Person } from '../../../types.js';
10
12
  export interface ActivityEntry {
11
- /** A name, or "Systeem". */
12
- who: string;
13
+ /**
14
+ * Someone, with the circle before the name and a link with `href`; or a text that is no person
15
+ * ("Systeem"), as the bold name alone.
16
+ */
17
+ who: string | Person;
13
18
  /** The rest of the sentence: "wijzigde de omschrijving". */
14
19
  what: string;
15
20
  /** The moment as the host wrote it, in Dutch. */
@@ -28,6 +33,8 @@ export declare class LintjeActivityLog extends LintjeElement {
28
33
  limit: number;
29
34
  private showMore;
30
35
  private renderHeading;
36
+ /** A person's circle before the name; a text keeps the circle's room empty where others have one. */
37
+ private who;
31
38
  private entry;
32
39
  protected render(): TemplateResult;
33
40
  }
@@ -17,6 +17,9 @@ import { type Tone } from '../../shared/tone.js';
17
17
  import '../../actions/button/button.js';
18
18
  import '../../actions/icon-button/icon-button.js';
19
19
  import '../../feedback/skeleton/skeleton.js';
20
+ import '../person/person.js';
21
+ import '../person-group/person-group.js';
22
+ import type { Person } from '../../../types.js';
20
23
  export type CardStatusTone = Tone;
21
24
  export interface CardStatus {
22
25
  /** The word that carries the status: "Je hebt toegang". */
@@ -50,10 +53,16 @@ export interface CardIconAction {
50
53
  /** The icon while pressed, so the glyph carries the state too: the filled beside the outlined. */
51
54
  iconPressed?: string;
52
55
  }
56
+ /** One of `person`, `people` or `value`; with more, `person` wins, then `people`. */
53
57
  export interface CardFact {
58
+ /** The term: "Behandelaar", "Meelezers"; also the name of a row of people. */
54
59
  label: string;
55
60
  /** Text the host formatted. Missing is a dash, never 0. */
56
- value: string | null;
61
+ value?: string | null;
62
+ /** One person at 24 px; `null` is "Niet toegewezen". On a card that is a link, never a link. */
63
+ person?: Person | null;
64
+ /** A row of people that opens the list of everyone: a control of its own, also on a link. */
65
+ people?: Person[];
57
66
  }
58
67
  export interface CardMedia {
59
68
  src: string;
@@ -108,9 +117,11 @@ export declare class LintjeCard extends LintjeElement {
108
117
  private onTitleClick;
109
118
  private onAction;
110
119
  private renderIconAction;
111
- private heading;
112
120
  private renderTitle;
113
121
  private renderStatus;
122
+ /** On a card that is a link, a person is no second link: the card opens. */
123
+ private shownPerson;
124
+ private renderFactValue;
114
125
  private renderFacts;
115
126
  private renderAction;
116
127
  private renderMedia;
@@ -8,7 +8,7 @@
8
8
  */
9
9
  import { type TemplateResult } from 'lit';
10
10
  import '../../feedback/spinner/spinner.js';
11
- import type { CellValue, DataTableData, TableCellRef, TableColumnData } from '../../../types.js';
11
+ import type { CellValue, DataTableData, TableCellRef, TableColumnData, TableOption } from '../../../types.js';
12
12
  export interface CellPosition {
13
13
  row: number;
14
14
  column: number;
@@ -18,6 +18,11 @@ export type CellMove = 'down' | 'next' | 'previous';
18
18
  export declare function nextEditableCell(from: CellPosition, move: CellMove, rows: number, columns: number, editable: (row: number, column: number) => boolean): CellPosition | null;
19
19
  export declare function cellKey(ref: TableCellRef): string;
20
20
  export declare function editText(value: CellValue): string;
21
+ /**
22
+ * The options of a `select` editor. A `person` column without its own takes the people, in their
23
+ * order, after the empty word: its value `''` is sent as `null`.
24
+ */
25
+ export declare function editorOptions(column: TableColumnData): TableOption[];
21
26
  export type CellMode = {
22
27
  kind: 'rest';
23
28
  } | {
@@ -40,7 +45,7 @@ export interface EditGrid {
40
45
  export interface EditingHost {
41
46
  requestUpdate(): void;
42
47
  editCell(detail: TableCellRef & {
43
- value: string;
48
+ value: string | null;
44
49
  }): void;
45
50
  }
46
51
  export declare class CellEditing {
@@ -9,6 +9,7 @@
9
9
  import { type PropertyDeclarations, type TemplateResult } from 'lit';
10
10
  import { LintjeGridItemElement } from '../../shared/grid-item-element.js';
11
11
  import { type Tone } from '../../shared/tone.js';
12
+ import '../../content/key/key.js';
12
13
  /** A link on the right of the value, for changing it ("Locatie wijzigen" as accessible name). */
13
14
  export interface DescriptionAction {
14
15
  href: string;
@@ -24,6 +25,8 @@ export interface DescriptionItem {
24
25
  action?: DescriptionAction;
25
26
  /** The value as separate tags (word lists, people); `value` is then left out. */
26
27
  tags?: string[];
28
+ /** The value as keyboard keys, one `lintje-key` each (`keyLabels()`); `value` is then left out. */
29
+ keys?: string[];
27
30
  /** Grid: an icon by the label, by file name. */
28
31
  icon?: string;
29
32
  /** Grid: two columns instead of one. */
@@ -57,6 +60,7 @@ export declare class LintjeDescriptionList extends LintjeGridItemElement {
57
60
  */
58
61
  layout: DescriptionListLayout;
59
62
  private follow;
63
+ private slotOnly;
60
64
  private value;
61
65
  private action;
62
66
  private renderItem;
@@ -19,8 +19,10 @@ import '../../inputs/text-input/text-input.js';
19
19
  import '../../feedback/badge/badge.js';
20
20
  import '../../actions/button/button.js';
21
21
  import '../../feedback/progress-bar/progress-bar.js';
22
+ import '../person/person.js';
22
23
  import type { MenuEntry } from '../../actions/menu-button/menu-button.js';
23
24
  import type { BadgeTone } from '../../feedback/badge/badge.js';
25
+ import type { Person } from '../../../types.js';
24
26
  export interface ListItem {
25
27
  id: string;
26
28
  title: string;
@@ -50,6 +52,11 @@ export interface ListItem {
50
52
  icon?: string;
51
53
  /** A data colour as a bar along the row (`sky-blue`): a speaker, as in the player and transcript. */
52
54
  swatch?: string;
55
+ /**
56
+ * Who handles or made it, before the status: never a link, since the row opens. `null` is
57
+ * "Niet toegewezen"; without the field no person.
58
+ */
59
+ person?: Person | null;
53
60
  /** The state as a word ("Bezig"), drawn as a badge in the badge's tone. */
54
61
  status?: {
55
62
  label: string;
@@ -95,6 +102,8 @@ export declare class LintjeList extends LintjeElement {
95
102
  private onRowClick;
96
103
  private onAction;
97
104
  private rowAction;
105
+ /** At 24 px, in the letter of the facts; passed without `href`, as the row opens. */
106
+ private renderPerson;
98
107
  private renderTitle;
99
108
  private renderAction;
100
109
  private row;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * `<lintje-person>` — one person: a circle with photo, initials or icon, and the name beside it.
3
+ *
4
+ * A person is a value: in a table cell, a row, a card or a log entry it reads in the letter of
5
+ * where it stands. Without `person` it is the empty place, read as its word. With `href` circle
6
+ * and name are one link; a table, list or card that opens itself passes the person without one.
7
+ *
8
+ * Events: `lintje-navigate` `{ href }` (a plain click on a name with `href`).
9
+ */
10
+ import { type PropertyDeclarations, type TemplateResult } from 'lit';
11
+ import { LintjeElement } from '../../../core/element.js';
12
+ import { type AvatarSize } from '../../shared/avatar.js';
13
+ import type { SpeakerColour } from '../../content/shared/playback.js';
14
+ import type { Person } from '../../../types.js';
15
+ /** The word for nobody, where a host names none. */
16
+ export declare const NO_PERSON = "Niet toegewezen";
17
+ export declare class LintjePerson extends LintjeElement {
18
+ static styles: import("lit").CSSResult[];
19
+ static properties: PropertyDeclarations;
20
+ /** Without a person, the empty place with `empty`. */
21
+ person: Person | null;
22
+ /** 24, 32 or 40 px. `small` shows no second line: it does not fit beside 24 px in a row. */
23
+ size: AvatarSize;
24
+ /** The word where nobody is ("Nog niemand"). */
25
+ empty: string;
26
+ /** A speaker's colour, only where the people are the variable, as the speakers of a recording. */
27
+ color?: SpeakerColour;
28
+ private onClick;
29
+ protected render(): TemplateResult;
30
+ }
31
+ declare global {
32
+ interface HTMLElementTagNameMap {
33
+ 'lintje-person': LintjePerson;
34
+ }
35
+ }
@@ -0,0 +1,42 @@
1
+ /**
2
+ * `<lintje-person-group>` — a row of overlapping circles with "+n", that opens a list of everyone.
3
+ *
4
+ * It shows no names, so it is always a button with a panel: a disclosure, not a menu. It opens and
5
+ * closes itself, as the user menu does, and says so; a host may set `open`. The list holds the
6
+ * people in the host's order, each with name and role; a name with `href` is a link there.
7
+ *
8
+ * Events: `lintje-toggle` `{ open }`, `lintje-navigate` `{ href }` (from a name in the list).
9
+ */
10
+ import { type PropertyDeclarations, type PropertyValues, type TemplateResult } from 'lit';
11
+ import { LintjeElement } from '../../../core/element.js';
12
+ import '../person/person.js';
13
+ import '../../overlays/popover/popover.js';
14
+ import type { Person } from '../../../types.js';
15
+ /** The names a reader sees, then how many more stand in "+n": "A, B en 3 anderen". */
16
+ export declare function spoken(names: string[], more: number): string;
17
+ export declare class LintjePersonGroup extends LintjeElement {
18
+ #private;
19
+ static styles: import("lit").CSSResult[];
20
+ static properties: PropertyDeclarations;
21
+ people: Person[];
22
+ /** What the row is ("Meelezers"): the list's heading and the start of the button's name. */
23
+ label: string;
24
+ /** The number of circles, "+n" included; at least 2. With more people, `max − 1` and "+n". */
25
+ max: number;
26
+ /** 24 or 32 px. */
27
+ size: 'small' | 'medium';
28
+ /** The word where nobody is. */
29
+ empty: string;
30
+ /** Whether the list stands open. */
31
+ open: boolean;
32
+ protected updated(changed: PropertyValues<this>): void;
33
+ private get trigger();
34
+ private setOpen;
35
+ private onPopoverClose;
36
+ protected render(): TemplateResult;
37
+ }
38
+ declare global {
39
+ interface HTMLElementTagNameMap {
40
+ 'lintje-person-group': LintjePersonGroup;
41
+ }
42
+ }
@@ -10,7 +10,7 @@ export declare function dataLabelFits(text: string, available: number): boolean;
10
10
  export declare function truncateToWidth(text: string, maxWidth: number, fontFamily?: string): string;
11
11
  /**
12
12
  * Width in px of `text` in the 12 px chart font, at `weight` (400 for an axis label, 700 for a
13
- * data label); ~6.5 px per character without a canvas.
13
+ * data label), or at another `size`; ~6.5 px per character at 12 px without a canvas.
14
14
  */
15
- export declare function textWidth(text: string, fontFamily?: string, weight?: number): number;
15
+ export declare function textWidth(text: string, fontFamily?: string, weight?: number, size?: number): number;
16
16
  export declare function formatPercent(n: number, decimals?: number): string;
@@ -0,0 +1,2 @@
1
+ /** An id no other element on the page has: `lintje-menu-3`. */
2
+ export declare function uniqueId(prefix: string): string;
@@ -5,7 +5,7 @@
5
5
  * Every other icon is fetched by name when a name needs it
6
6
  * (`src/icons/loader.ts`); the name is always the file name.
7
7
  *
8
- * 64 icons, of 1200 in `dist-icons/`.
8
+ * 73 icons, of 1202 in `dist-icons/`.
9
9
  */
10
10
  export interface IconGlyph {
11
11
  /** The file's own viewBox: 64 or 48 in RVO's set, 24 for an own icon, 346x75 for an emblem. */