@lo-tek/interfaces 0.39.0 → 0.41.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 (201) hide show
  1. package/CHANGELOG.md +178 -0
  2. package/README.md +1 -1
  3. package/agent/astro.md +16 -14
  4. package/agent/bundles.md +18 -16
  5. package/agent/datastar.md +70 -68
  6. package/agent/html.md +63 -61
  7. package/agent/kotlin.md +622 -0
  8. package/agent/react.md +18 -16
  9. package/agent/templates.md +72 -68
  10. package/core/lotek-core.wasm +0 -0
  11. package/core/lotek.wasm +0 -0
  12. package/dist/components/css/accordion/accordion.d.ts +1 -1
  13. package/dist/components/css/accordion/accordion.js +1 -1
  14. package/dist/components/css/alert/alert.d.ts +1 -1
  15. package/dist/components/css/alert/alert.js +1 -1
  16. package/dist/components/css/avatar/avatar.d.ts +1 -1
  17. package/dist/components/css/avatar/avatar.js +1 -1
  18. package/dist/components/css/badge/badge.d.ts +1 -1
  19. package/dist/components/css/badge/badge.js +1 -1
  20. package/dist/components/css/breadcrumbs/breadcrumbs.d.ts +1 -1
  21. package/dist/components/css/breadcrumbs/breadcrumbs.js +1 -1
  22. package/dist/components/css/card/card.d.ts +1 -1
  23. package/dist/components/css/card/card.js +1 -1
  24. package/dist/components/css/file-upload/file-upload.d.ts +1 -1
  25. package/dist/components/css/file-upload/file-upload.js +1 -1
  26. package/dist/components/css/icon/icon.d.ts +1 -1
  27. package/dist/components/css/icon/icon.js +1 -1
  28. package/dist/components/css/label/label.d.ts +1 -1
  29. package/dist/components/css/label/label.js +1 -1
  30. package/dist/components/css/link/link.d.ts +1 -1
  31. package/dist/components/css/link/link.js +1 -1
  32. package/dist/components/css/spinner/spinner.d.ts +7 -5
  33. package/dist/components/css/spinner/spinner.d.ts.map +1 -1
  34. package/dist/components/css/spinner/spinner.js +7 -5
  35. package/dist/components/css/spinner/spinner.js.map +1 -1
  36. package/dist/components/css/steps/steps.d.ts +23 -0
  37. package/dist/components/css/steps/steps.d.ts.map +1 -0
  38. package/dist/components/css/steps/steps.js +21 -0
  39. package/dist/components/css/steps/steps.js.map +1 -0
  40. package/dist/components/css/tag/tag.d.ts +1 -1
  41. package/dist/components/css/tag/tag.js +1 -1
  42. package/dist/components/css/toggle-group/toggle-group.d.ts +1 -1
  43. package/dist/components/css/toggle-group/toggle-group.js +1 -1
  44. package/dist/components/css/tooltip/tooltip.d.ts +2 -2
  45. package/dist/components/css/tooltip/tooltip.js +2 -2
  46. package/dist/components/events.d.ts +3 -1
  47. package/dist/components/events.d.ts.map +1 -1
  48. package/dist/components/frame/dialog/dialog.d.ts +11 -6
  49. package/dist/components/frame/dialog/dialog.d.ts.map +1 -1
  50. package/dist/components/frame/dialog/dialog.js +4 -4
  51. package/dist/components/frame/dialog/dialog.js.map +1 -1
  52. package/dist/components/frame/dialog/lt-dialog.d.ts +1 -1
  53. package/dist/components/frame/dialog/lt-dialog.js +7 -7
  54. package/dist/components/frame/error-summary/error-summary.d.ts +6 -2
  55. package/dist/components/frame/error-summary/error-summary.d.ts.map +1 -1
  56. package/dist/components/frame/error-summary/error-summary.js +1 -1
  57. package/dist/components/frame/error-summary/error-summary.js.map +1 -1
  58. package/dist/components/frame/error-summary/lt-error-summary.d.ts +1 -1
  59. package/dist/components/frame/error-summary/lt-error-summary.js +6 -6
  60. package/dist/components/frame/field/field-core.d.ts +4 -2
  61. package/dist/components/frame/field/field-core.d.ts.map +1 -1
  62. package/dist/components/frame/field/field-core.js.map +1 -1
  63. package/dist/components/frame/field/lt-field.d.ts +5 -4
  64. package/dist/components/frame/field/lt-field.d.ts.map +1 -1
  65. package/dist/components/frame/field/lt-field.js +5 -4
  66. package/dist/components/frame/field/lt-field.js.map +1 -1
  67. package/dist/components/frame/popover/lt-popover.d.ts +3 -3
  68. package/dist/components/frame/popover/lt-popover.d.ts.map +1 -1
  69. package/dist/components/frame/popover/lt-popover.js +7 -22
  70. package/dist/components/frame/popover/lt-popover.js.map +1 -1
  71. package/dist/components/frame/popover/popover.d.ts +7 -3
  72. package/dist/components/frame/popover/popover.d.ts.map +1 -1
  73. package/dist/components/frame/popover/popover.js +2 -2
  74. package/dist/components/frame/popover/popover.js.map +1 -1
  75. package/dist/components/frame/session-timeout/lt-session-timeout.d.ts +8 -8
  76. package/dist/components/frame/session-timeout/lt-session-timeout.js +7 -7
  77. package/dist/components/frame/session-timeout/session-timeout.d.ts +10 -5
  78. package/dist/components/frame/session-timeout/session-timeout.d.ts.map +1 -1
  79. package/dist/components/frame/session-timeout/session-timeout.js +4 -4
  80. package/dist/components/frame/session-timeout/session-timeout.js.map +1 -1
  81. package/dist/components/frame/suggestion/lt-suggestion.d.ts +12 -11
  82. package/dist/components/frame/suggestion/lt-suggestion.d.ts.map +1 -1
  83. package/dist/components/frame/suggestion/lt-suggestion.js +11 -10
  84. package/dist/components/frame/suggestion/lt-suggestion.js.map +1 -1
  85. package/dist/components/frame/suggestion/suggestion.d.ts +3 -1
  86. package/dist/components/frame/suggestion/suggestion.d.ts.map +1 -1
  87. package/dist/components/frame/suggestion/suggestion.js.map +1 -1
  88. package/dist/components/frame/tabs/lt-tabs.d.ts +3 -3
  89. package/dist/components/frame/tabs/lt-tabs.js +5 -5
  90. package/dist/components/frame/tabs/lt-tabs.js.map +1 -1
  91. package/dist/components/frame/tabs/tabs.d.ts +8 -6
  92. package/dist/components/frame/tabs/tabs.d.ts.map +1 -1
  93. package/dist/components/frame/tabs/tabs.js +4 -4
  94. package/dist/components/frame/tabs/tabs.js.map +1 -1
  95. package/dist/components/frame/term/lt-term.d.ts +114 -0
  96. package/dist/components/frame/term/lt-term.d.ts.map +1 -0
  97. package/dist/components/frame/term/lt-term.js +530 -0
  98. package/dist/components/frame/term/lt-term.js.map +1 -0
  99. package/dist/components/frame/term/term.d.ts +55 -0
  100. package/dist/components/frame/term/term.d.ts.map +1 -0
  101. package/dist/components/frame/term/term.js +55 -0
  102. package/dist/components/frame/term/term.js.map +1 -0
  103. package/dist/components/host-element.d.ts +19 -0
  104. package/dist/components/host-element.d.ts.map +1 -1
  105. package/dist/components/host-element.js +37 -0
  106. package/dist/components/host-element.js.map +1 -1
  107. package/dist/components/standalone/connection-status/lt-connection-status.d.ts +1 -1
  108. package/dist/components/standalone/connection-status/lt-connection-status.js +1 -1
  109. package/dist/components/standalone/toast/lt-toast.d.ts +1 -1
  110. package/dist/components/standalone/toast/lt-toast.js +1 -1
  111. package/dist/diagnostics/index.d.ts +2 -2
  112. package/dist/diagnostics/index.js +2 -2
  113. package/dist/dom.d.ts +2 -1
  114. package/dist/dom.d.ts.map +1 -1
  115. package/dist/dom.js +2 -1
  116. package/dist/dom.js.map +1 -1
  117. package/dist/index.d.ts +4 -0
  118. package/dist/index.d.ts.map +1 -1
  119. package/dist/index.js +3 -0
  120. package/dist/index.js.map +1 -1
  121. package/dist/jsx/react.d.ts +3 -1
  122. package/dist/jsx/react.d.ts.map +1 -1
  123. package/dist/lotek.css +370 -1
  124. package/dist/lt.d.ts +13 -6
  125. package/dist/lt.d.ts.map +1 -1
  126. package/dist/lt.js +14 -6
  127. package/dist/lt.js.map +1 -1
  128. package/dist/react.d.ts +19 -0
  129. package/dist/react.d.ts.map +1 -1
  130. package/dist/react.js +14 -0
  131. package/dist/react.js.map +1 -1
  132. package/dist/register.d.ts.map +1 -1
  133. package/dist/register.js +2 -0
  134. package/dist/register.js.map +1 -1
  135. package/dist/vocabulary/classes.d.ts.map +1 -1
  136. package/dist/vocabulary/classes.js +60 -6
  137. package/dist/vocabulary/classes.js.map +1 -1
  138. package/dist/vocabulary/elements.d.ts.map +1 -1
  139. package/dist/vocabulary/elements.js +16 -3
  140. package/dist/vocabulary/elements.js.map +1 -1
  141. package/dist/vocabulary/types.d.ts +28 -3
  142. package/dist/vocabulary/types.d.ts.map +1 -1
  143. package/live-templates-kotlin.xml +69 -0
  144. package/live-templates.xml +29 -23
  145. package/manifest/files.json +18 -0
  146. package/manifest/manifest.json +510 -87
  147. package/manifest/manifest.schema.json +54 -7
  148. package/package.json +16 -5
  149. package/src/components/css/accordion/accordion.ts +1 -1
  150. package/src/components/css/alert/alert.ts +1 -1
  151. package/src/components/css/avatar/avatar.ts +1 -1
  152. package/src/components/css/badge/badge.ts +1 -1
  153. package/src/components/css/breadcrumbs/breadcrumbs.ts +1 -1
  154. package/src/components/css/card/card.ts +1 -1
  155. package/src/components/css/file-upload/file-upload.ts +1 -1
  156. package/src/components/css/icon/icon.ts +1 -1
  157. package/src/components/css/input/input.css +21 -0
  158. package/src/components/css/label/label.ts +1 -1
  159. package/src/components/css/link/link.ts +1 -1
  160. package/src/components/css/spinner/spinner.ts +8 -5
  161. package/src/components/css/steps/steps.css +240 -0
  162. package/src/components/css/steps/steps.ts +26 -0
  163. package/src/components/css/tag/tag.ts +1 -1
  164. package/src/components/css/toggle-group/toggle-group.ts +1 -1
  165. package/src/components/css/tooltip/tooltip.ts +2 -2
  166. package/src/components/events.ts +3 -1
  167. package/src/components/frame/dialog/dialog.ts +11 -6
  168. package/src/components/frame/dialog/lt-dialog.ts +7 -7
  169. package/src/components/frame/error-summary/error-summary.ts +6 -2
  170. package/src/components/frame/error-summary/lt-error-summary.ts +6 -6
  171. package/src/components/frame/field/field-core.ts +4 -2
  172. package/src/components/frame/field/lt-field.ts +5 -4
  173. package/src/components/frame/popover/lt-popover.ts +7 -27
  174. package/src/components/frame/popover/popover.ts +7 -3
  175. package/src/components/frame/session-timeout/lt-session-timeout.ts +8 -8
  176. package/src/components/frame/session-timeout/session-timeout.ts +10 -5
  177. package/src/components/frame/suggestion/lt-suggestion.ts +13 -12
  178. package/src/components/frame/suggestion/suggestion.css +1 -1
  179. package/src/components/frame/suggestion/suggestion.ts +3 -1
  180. package/src/components/frame/tabs/lt-tabs.ts +5 -5
  181. package/src/components/frame/tabs/tabs.css +1 -1
  182. package/src/components/frame/tabs/tabs.ts +8 -6
  183. package/src/components/frame/term/lt-term.ts +573 -0
  184. package/src/components/frame/term/term.css +177 -0
  185. package/src/components/frame/term/term.ts +87 -0
  186. package/src/components/host-element.ts +46 -0
  187. package/src/components/standalone/connection-status/lt-connection-status.ts +1 -1
  188. package/src/components/standalone/toast/lt-toast.ts +1 -1
  189. package/src/diagnostics/index.ts +2 -2
  190. package/src/dom.ts +2 -1
  191. package/src/index.ts +4 -0
  192. package/src/jsx/react.ts +4 -0
  193. package/src/lt.ts +14 -6
  194. package/src/react.ts +15 -0
  195. package/src/register.ts +2 -0
  196. package/src/tokens/boundary.css +4 -0
  197. package/src/tokens/tokens.css +4 -0
  198. package/src/vocabulary/classes.ts +60 -6
  199. package/src/vocabulary/elements.ts +16 -3
  200. package/src/vocabulary/types.ts +25 -3
  201. package/web-types.json +32 -11
@@ -757,6 +757,31 @@ export const classes: Classes = {
757
757
  "content": "text",
758
758
  "attributes": {}
759
759
  },
760
+ "lt-steps": {
761
+ "component": "steps",
762
+ "title": "Steps",
763
+ "description": "A step indicator that shows where the user is in a task over several pages. A CSS component with one class and no JavaScript.",
764
+ "link": "https://lo-tek.sobernetics.no/components/steps/",
765
+ "content": "parts",
766
+ "parts": {
767
+ "step": {
768
+ "selector": "li",
769
+ "description": "One step, with its name as text, or a link back to it. The step the user is on has `aria-current=\"step\"`, and the steps before it are drawn as done.",
770
+ "content": "free",
771
+ "multiple": true
772
+ }
773
+ },
774
+ "texts": [
775
+ {
776
+ "variable": "--lt-steps-done-text",
777
+ "text": "Completed ",
778
+ "attribute": "aria-current",
779
+ "value": "step",
780
+ "siblingsBefore": true
781
+ }
782
+ ],
783
+ "attributes": {}
784
+ },
760
785
  "lt-switch": {
761
786
  "component": "switch",
762
787
  "title": "Switch",
@@ -962,7 +987,7 @@ export const classes: Classes = {
962
987
  "lt-dialog": {
963
988
  "component": "dialog",
964
989
  "title": "Dialog",
965
- "description": "Modal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for servers that cannot call showModal().",
990
+ "description": "Modal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for when the server decides that the dialog is open.",
966
991
  "link": "https://lo-tek.sobernetics.no/components/dialog/",
967
992
  "content": "free",
968
993
  "parts": {
@@ -1013,7 +1038,7 @@ export const classes: Classes = {
1013
1038
  "lt-dialog__body": {
1014
1039
  "component": "dialog",
1015
1040
  "title": "Dialog",
1016
- "description": "Modal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for servers that cannot call showModal().",
1041
+ "description": "Modal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for when the server decides that the dialog is open.",
1017
1042
  "link": "https://lo-tek.sobernetics.no/components/dialog/",
1018
1043
  "content": "free",
1019
1044
  "partOf": "lt-dialog",
@@ -1022,7 +1047,7 @@ export const classes: Classes = {
1022
1047
  "lt-dialog__title": {
1023
1048
  "component": "dialog",
1024
1049
  "title": "Dialog",
1025
- "description": "Modal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for servers that cannot call showModal().",
1050
+ "description": "Modal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for when the server decides that the dialog is open.",
1026
1051
  "link": "https://lo-tek.sobernetics.no/components/dialog/",
1027
1052
  "content": "text",
1028
1053
  "partOf": "lt-dialog",
@@ -1031,7 +1056,7 @@ export const classes: Classes = {
1031
1056
  "lt-dialog__footer": {
1032
1057
  "component": "dialog",
1033
1058
  "title": "Dialog",
1034
- "description": "Modal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for servers that cannot call showModal().",
1059
+ "description": "Modal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for when the server decides that the dialog is open.",
1035
1060
  "link": "https://lo-tek.sobernetics.no/components/dialog/",
1036
1061
  "content": "free",
1037
1062
  "partOf": "lt-dialog",
@@ -1040,7 +1065,7 @@ export const classes: Classes = {
1040
1065
  "lt-dialog__header": {
1041
1066
  "component": "dialog",
1042
1067
  "title": "Dialog",
1043
- "description": "Modal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for servers that cannot call showModal().",
1068
+ "description": "Modal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for when the server decides that the dialog is open.",
1044
1069
  "link": "https://lo-tek.sobernetics.no/components/dialog/",
1045
1070
  "content": "parts",
1046
1071
  "partOf": "lt-dialog",
@@ -1062,7 +1087,7 @@ export const classes: Classes = {
1062
1087
  "lt-dialog__subtitle": {
1063
1088
  "component": "dialog",
1064
1089
  "title": "Dialog",
1065
- "description": "Modal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for servers that cannot call showModal().",
1090
+ "description": "Modal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for when the server decides that the dialog is open.",
1066
1091
  "link": "https://lo-tek.sobernetics.no/components/dialog/",
1067
1092
  "content": "text",
1068
1093
  "partOf": "lt-dialog",
@@ -1305,6 +1330,35 @@ export const classes: Classes = {
1305
1330
  "content": "free",
1306
1331
  "attributes": {}
1307
1332
  },
1333
+ "lt-term": {
1334
+ "component": "term",
1335
+ "title": "Term",
1336
+ "description": "A word in the text that shows its entry from a glossary on the same page, in a card by the word. Frame component.",
1337
+ "link": "https://lo-tek.sobernetics.no/components/term/",
1338
+ "content": "text",
1339
+ "attributes": {}
1340
+ },
1341
+ "lt-term__entry": {
1342
+ "component": "term",
1343
+ "title": "Term",
1344
+ "description": "A word in the text that shows its entry from a glossary on the same page, in a card by the word. Frame component.",
1345
+ "link": "https://lo-tek.sobernetics.no/components/term/",
1346
+ "content": "parts",
1347
+ "parts": {
1348
+ "term": {
1349
+ "selector": "dt",
1350
+ "description": "The term, as it stands in the glossary.",
1351
+ "content": "text",
1352
+ "unique": true
1353
+ },
1354
+ "description": {
1355
+ "selector": "dd",
1356
+ "description": "The explanation. It can hold links and code.",
1357
+ "content": "free"
1358
+ }
1359
+ },
1360
+ "attributes": {}
1361
+ },
1308
1362
  "lt-connection-status": {
1309
1363
  "component": "connection-status",
1310
1364
  "title": "Connection Status",
@@ -4,7 +4,7 @@ import type { Elements } from "./types.js"
4
4
  export const elements: Elements = {
5
5
  "lt-field": {
6
6
  "link": "https://lo-tek.sobernetics.no/components/field/",
7
- "description": "Wires label, field, help text and error text together: sets `aria-describedby` and `aria-invalid` on the control and an id on the help text and the error text. Never writes an id on the control: the template writes `for` and `id`, or wraps the field in the label. The field is invalid when the error text is there without `hidden`. Exists for markup produced without JavaScript. When the markup is produced with JavaScript, use `lt.field()` instead.",
7
+ "description": "Wires label, field, help text and error text together: sets `aria-describedby` and `aria-invalid` on the control and an id on the help text and the error text. Never writes an id on the control: the template writes `for` and `id`, or wraps the field in the label. The field is invalid when the error text is there without `hidden`. Exists for markup from code that cannot call a builder function. When it can, in TypeScript, Kotlin or Java, use `lt.field()` or `Lt.field()` instead.",
8
8
  "attributes": {
9
9
  "disabled": {
10
10
  "type": "flag",
@@ -184,6 +184,19 @@ export const elements: Elements = {
184
184
  }
185
185
  }
186
186
  },
187
+ "lt-term": {
188
+ "link": "https://lo-tek.sobernetics.no/components/term/",
189
+ "description": "A word in the text that shows its glossary entry in a card by the word. A link to the entry's id is enough; the component sets the class, `aria-details` and `aria-expanded` on the link, and shows the entry itself in the top layer while the card is open. Without JavaScript the word is a link to the glossary.",
190
+ "attributes": {},
191
+ "parts": {
192
+ "word": {
193
+ "selector": "a[href^='#']",
194
+ "description": "The word: a link to the glossary entry, such as `<a href=\"#term-signal\">`. The entry is a `<div>` with that id in a `<dl>`, with a `<dt>` and a `<dd>`, anywhere on the page.",
195
+ "content": "text",
196
+ "unique": true
197
+ }
198
+ }
199
+ },
187
200
  "lt-suggestion": {
188
201
  "link": "https://lo-tek.sobernetics.no/components/suggestion/",
189
202
  "description": "Field with a suggestion list. A `<label for>`, an `<input id>`, an `.lt-suggestion__list` with `<li>` items and a `[role=status]` are enough; the component sets the roles and the wiring where the markup came without them, and gives the list and the options ids. The field never gets an id from the component. Filters as the user types, moves the highlight with the arrow keys and announces the number of matches.",
@@ -310,7 +323,7 @@ export const elements: Elements = {
310
323
  },
311
324
  "lt-dialog": {
312
325
  "link": "https://lo-tek.sobernetics.no/components/dialog/",
313
- "description": "Makes a `<dialog class=\"lt-dialog\">` modal with `showModal()`, for servers that cannot call it themselves. The host around the dialog. Gives the dialog its name from the first heading outside `lt-dialog__body` when neither `aria-labelledby` nor `aria-label` is there.",
326
+ "description": "Makes a `<dialog class=\"lt-dialog\">` the server sends open a real modal, with `showModal()`. The host around the dialog. Gives the dialog its name from the first heading outside `lt-dialog__body` when neither `aria-labelledby` nor `aria-label` is there.",
314
327
  "attributes": {
315
328
  "open": {
316
329
  "type": "flag",
@@ -393,7 +406,7 @@ export const elements: Elements = {
393
406
  },
394
407
  "lt-session-timeout": {
395
408
  "link": "https://lo-tek.sobernetics.no/components/session-timeout/",
396
- "description": "Warns before a signed-in session expires, and counts down. The renderer writes the dialog and the text inside the element: a `<dialog>` with `.lt-session-timeout__count` for the number, `[role=status]` for the announcement and the buttons in a `<form method=\"dialog\">`. Dispatches `session-warn` when the dialog opens, `session-extend` when the user wants to continue, `session-logout` when the user logs out, `session-expired` when time is up, and `session-activity` at most once per `activity-interval` while the user is active, so the app can keep the server session alive.",
409
+ "description": "Warns before a signed-in session expires, and counts down. The renderer writes the dialog and the text inside the element: a `<dialog>` with `.lt-session-timeout__count` for the number, `[role=status]` for the announcement and the buttons in a `<form method=\"dialog\">`. Dispatches `session-warn` when the dialog opens, `session-extend` when the user wants to continue, `session-logout` when the user logs out with a button that closes the dialog, `session-expired` when time is up, and `session-activity` at most once per `activity-interval` while the user is active, so the app can keep the server session alive.",
397
410
  "attributes": {
398
411
  "warn-at": {
399
412
  "type": "number",
@@ -90,9 +90,13 @@ export type Element = {
90
90
  export type DefaultText = { text: string; replacedBy: readonly string[] }
91
91
 
92
92
  /**
93
- * A text the stylesheet shows in `::after` on an element with the class and
94
- * `attribute`, with `value` when the selector requires one, and none of the
95
- * attributes in `unless`. `variable` is the CSS variable that replaces it.
93
+ * A text the stylesheet shows on an element with the class and `attribute`,
94
+ * with `value` when the selector requires one, and none of the attributes in
95
+ * `unless`. With `siblingsBefore`,
96
+ * the attribute is on a child of the element with the class, and the text
97
+ * is shown on the children before it, as "Completed " is on the steps before
98
+ * the one with `aria-current="step"` in `lt-steps`. `variable` is the CSS
99
+ * variable that replaces it.
96
100
  */
97
101
  export type CssText = {
98
102
  variable: string
@@ -100,6 +104,7 @@ export type CssText = {
100
104
  attribute: string
101
105
  value?: string
102
106
  unless?: readonly string[]
107
+ siblingsBefore?: true
103
108
  }
104
109
 
105
110
  /** The content of `elements.ts`: tag to element. */
@@ -190,11 +195,28 @@ export type BuilderReturns = { optional?: boolean } & (
190
195
  */
191
196
  export type Builder = {
192
197
  name: string
198
+ /**
199
+ * The comment on the function, without the code examples. Missing in a
200
+ * manifest from before 0.40, where the schema version was already 1.
201
+ */
202
+ description?: string
203
+ /** The code examples in the comment, in TypeScript. */
204
+ example?: string
205
+ /** The page the function is documented on. */
206
+ docs?: string
207
+ /**
208
+ * Which part of a frame component each set in the result fills, as
209
+ * `field.control` fills the control of `<lt-field>`. A set that fills no
210
+ * part is left out.
211
+ */
212
+ parts?: Record<string, { element: string; part: string }>
193
213
  options: {
194
214
  name: string
195
215
  required: boolean
196
216
  type: BuilderOptionType
197
217
  description?: string
218
+ /** The value that gives the same answer as leaving the option out. */
219
+ default?: string
198
220
  }[]
199
221
  returns: BuilderReturns
200
222
  /**
package/web-types.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@lo-tek/interfaces",
4
- "version": "0.39.0",
4
+ "version": "0.41.0",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "lt-field",
11
- "description": "Wires label, field, help text and error text together: sets `aria-describedby` and `aria-invalid` on the control and an id on the help text and the error text. Never writes an id on the control: the template writes `for` and `id`, or wraps the field in the label. The field is invalid when the error text is there without `hidden`. Exists for markup produced without JavaScript. When the markup is produced with JavaScript, use `lt.field()` instead.",
11
+ "description": "Wires label, field, help text and error text together: sets `aria-describedby` and `aria-invalid` on the control and an id on the help text and the error text. Never writes an id on the control: the template writes `for` and `id`, or wraps the field in the label. The field is invalid when the error text is there without `hidden`. Exists for markup from code that cannot call a builder function. When it can, in TypeScript, Kotlin or Java, use `lt.field()` or `Lt.field()` instead.",
12
12
  "doc-url": "https://lo-tek.sobernetics.no/components/field/",
13
13
  "attributes": [
14
14
  {
@@ -162,6 +162,12 @@
162
162
  ]
163
163
  }
164
164
  },
165
+ {
166
+ "name": "lt-term",
167
+ "description": "A word in the text that shows its glossary entry in a card by the word. A link to the entry's id is enough; the component sets the class, `aria-details` and `aria-expanded` on the link, and shows the entry itself in the top layer while the card is open. Without JavaScript the word is a link to the glossary.",
168
+ "doc-url": "https://lo-tek.sobernetics.no/components/term/",
169
+ "attributes": []
170
+ },
165
171
  {
166
172
  "name": "lt-suggestion",
167
173
  "description": "Field with a suggestion list. A `<label for>`, an `<input id>`, an `.lt-suggestion__list` with `<li>` items and a `[role=status]` are enough; the component sets the roles and the wiring where the markup came without them, and gives the list and the options ids. The field never gets an id from the component. Filters as the user types, moves the highlight with the arrow keys and announces the number of matches.",
@@ -249,7 +255,7 @@
249
255
  },
250
256
  {
251
257
  "name": "lt-dialog",
252
- "description": "Makes a `<dialog class=\"lt-dialog\">` modal with `showModal()`, for servers that cannot call it themselves. The host around the dialog. Gives the dialog its name from the first heading outside `lt-dialog__body` when neither `aria-labelledby` nor `aria-label` is there.",
258
+ "description": "Makes a `<dialog class=\"lt-dialog\">` the server sends open a real modal, with `showModal()`. The host around the dialog. Gives the dialog its name from the first heading outside `lt-dialog__body` when neither `aria-labelledby` nor `aria-label` is there.",
253
259
  "doc-url": "https://lo-tek.sobernetics.no/components/dialog/",
254
260
  "attributes": [
255
261
  {
@@ -317,7 +323,7 @@
317
323
  },
318
324
  {
319
325
  "name": "lt-session-timeout",
320
- "description": "Warns before a signed-in session expires, and counts down. The renderer writes the dialog and the text inside the element: a `<dialog>` with `.lt-session-timeout__count` for the number, `[role=status]` for the announcement and the buttons in a `<form method=\"dialog\">`. Dispatches `session-warn` when the dialog opens, `session-extend` when the user wants to continue, `session-logout` when the user logs out, `session-expired` when time is up, and `session-activity` at most once per `activity-interval` while the user is active, so the app can keep the server session alive.",
326
+ "description": "Warns before a signed-in session expires, and counts down. The renderer writes the dialog and the text inside the element: a `<dialog>` with `.lt-session-timeout__count` for the number, `[role=status]` for the announcement and the buttons in a `<form method=\"dialog\">`. Dispatches `session-warn` when the dialog opens, `session-extend` when the user wants to continue, `session-logout` when the user logs out with a button that closes the dialog, `session-expired` when time is up, and `session-activity` at most once per `activity-interval` while the user is active, so the app can keep the server session alive.",
321
327
  "doc-url": "https://lo-tek.sobernetics.no/components/session-timeout/",
322
328
  "attributes": [
323
329
  {
@@ -357,7 +363,7 @@
357
363
  },
358
364
  {
359
365
  "name": "session-logout",
360
- "description": "The user chose to log out."
366
+ "description": "The user chose to log out with a button that closes the dialog. A Log out button with `formmethod=\"post\"` submits to the server instead, and the event does not come."
361
367
  },
362
368
  {
363
369
  "name": "session-expired",
@@ -604,6 +610,11 @@
604
610
  "description": "**Sr Only**\n\nText only screen readers get. A CSS component with one class and no JavaScript.",
605
611
  "doc-url": "https://lo-tek.sobernetics.no/components/sr-only/"
606
612
  },
613
+ {
614
+ "name": "lt-steps",
615
+ "description": "**Steps**\n\nA step indicator that shows where the user is in a task over several pages. A CSS component with one class and no JavaScript.",
616
+ "doc-url": "https://lo-tek.sobernetics.no/components/steps/"
617
+ },
607
618
  {
608
619
  "name": "lt-switch",
609
620
  "description": "**Switch**\n\nA switch for a setting that takes effect immediately. CSS component with two classes and no JavaScript.",
@@ -661,32 +672,32 @@
661
672
  },
662
673
  {
663
674
  "name": "lt-dialog",
664
- "description": "**Dialog**\n\nModal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for servers that cannot call showModal().",
675
+ "description": "**Dialog**\n\nModal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for when the server decides that the dialog is open.",
665
676
  "doc-url": "https://lo-tek.sobernetics.no/components/dialog/"
666
677
  },
667
678
  {
668
679
  "name": "lt-dialog__body",
669
- "description": "**Dialog**\n\nModal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for servers that cannot call showModal().",
680
+ "description": "**Dialog**\n\nModal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for when the server decides that the dialog is open.",
670
681
  "doc-url": "https://lo-tek.sobernetics.no/components/dialog/"
671
682
  },
672
683
  {
673
684
  "name": "lt-dialog__title",
674
- "description": "**Dialog**\n\nModal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for servers that cannot call showModal().",
685
+ "description": "**Dialog**\n\nModal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for when the server decides that the dialog is open.",
675
686
  "doc-url": "https://lo-tek.sobernetics.no/components/dialog/"
676
687
  },
677
688
  {
678
689
  "name": "lt-dialog__footer",
679
- "description": "**Dialog**\n\nModal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for servers that cannot call showModal().",
690
+ "description": "**Dialog**\n\nModal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for when the server decides that the dialog is open.",
680
691
  "doc-url": "https://lo-tek.sobernetics.no/components/dialog/"
681
692
  },
682
693
  {
683
694
  "name": "lt-dialog__header",
684
- "description": "**Dialog**\n\nModal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for servers that cannot call showModal().",
695
+ "description": "**Dialog**\n\nModal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for when the server decides that the dialog is open.",
685
696
  "doc-url": "https://lo-tek.sobernetics.no/components/dialog/"
686
697
  },
687
698
  {
688
699
  "name": "lt-dialog__subtitle",
689
- "description": "**Dialog**\n\nModal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for servers that cannot call showModal().",
700
+ "description": "**Dialog**\n\nModal dialog built on the native dialog element. Six classes and no JavaScript, with an optional component for when the server decides that the dialog is open.",
690
701
  "doc-url": "https://lo-tek.sobernetics.no/components/dialog/"
691
702
  },
692
703
  {
@@ -764,6 +775,16 @@
764
775
  "description": "**Tabs**\n\nTab list of links to their panels. Frame component.",
765
776
  "doc-url": "https://lo-tek.sobernetics.no/components/tabs/"
766
777
  },
778
+ {
779
+ "name": "lt-term",
780
+ "description": "**Term**\n\nA word in the text that shows its entry from a glossary on the same page, in a card by the word. Frame component.",
781
+ "doc-url": "https://lo-tek.sobernetics.no/components/term/"
782
+ },
783
+ {
784
+ "name": "lt-term__entry",
785
+ "description": "**Term**\n\nA word in the text that shows its entry from a glossary on the same page, in a card by the word. Frame component.",
786
+ "doc-url": "https://lo-tek.sobernetics.no/components/term/"
787
+ },
767
788
  {
768
789
  "name": "lt-connection-status",
769
790
  "description": "**Connection Status**\n\nTells the user when the connection to the server is gone. Standalone component.",