@lo-tek/interfaces 0.41.0 → 0.43.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 (63) hide show
  1. package/CHANGELOG.md +107 -0
  2. package/agent/astro.md +1 -1
  3. package/agent/bundles.md +1 -1
  4. package/agent/datastar.md +57 -50
  5. package/agent/html.md +53 -53
  6. package/agent/kotlin.md +4 -4
  7. package/agent/react.md +1 -1
  8. package/agent/templates.md +50 -50
  9. package/dist/components/frame/dialog/lt-dialog.d.ts +11 -3
  10. package/dist/components/frame/dialog/lt-dialog.d.ts.map +1 -1
  11. package/dist/components/frame/dialog/lt-dialog.js +59 -46
  12. package/dist/components/frame/dialog/lt-dialog.js.map +1 -1
  13. package/dist/components/frame/error-summary/lt-error-summary.d.ts +9 -6
  14. package/dist/components/frame/error-summary/lt-error-summary.d.ts.map +1 -1
  15. package/dist/components/frame/error-summary/lt-error-summary.js +38 -57
  16. package/dist/components/frame/error-summary/lt-error-summary.js.map +1 -1
  17. package/dist/components/frame/field/lt-field.d.ts +17 -26
  18. package/dist/components/frame/field/lt-field.d.ts.map +1 -1
  19. package/dist/components/frame/field/lt-field.js +81 -143
  20. package/dist/components/frame/field/lt-field.js.map +1 -1
  21. package/dist/components/frame/popover/lt-popover.d.ts +1 -1
  22. package/dist/components/frame/popover/lt-popover.d.ts.map +1 -1
  23. package/dist/components/frame/popover/lt-popover.js +31 -33
  24. package/dist/components/frame/popover/lt-popover.js.map +1 -1
  25. package/dist/components/frame/session-timeout/lt-session-timeout.d.ts +14 -2
  26. package/dist/components/frame/session-timeout/lt-session-timeout.d.ts.map +1 -1
  27. package/dist/components/frame/session-timeout/lt-session-timeout.js +73 -46
  28. package/dist/components/frame/session-timeout/lt-session-timeout.js.map +1 -1
  29. package/dist/components/frame/suggestion/lt-suggestion.d.ts +5 -7
  30. package/dist/components/frame/suggestion/lt-suggestion.d.ts.map +1 -1
  31. package/dist/components/frame/suggestion/lt-suggestion.js +57 -72
  32. package/dist/components/frame/suggestion/lt-suggestion.js.map +1 -1
  33. package/dist/components/frame/tabs/lt-tabs.d.ts +14 -5
  34. package/dist/components/frame/tabs/lt-tabs.d.ts.map +1 -1
  35. package/dist/components/frame/tabs/lt-tabs.js +86 -106
  36. package/dist/components/frame/tabs/lt-tabs.js.map +1 -1
  37. package/dist/components/frame/term/lt-term.d.ts +5 -1
  38. package/dist/components/frame/term/lt-term.d.ts.map +1 -1
  39. package/dist/components/frame/term/lt-term.js +23 -21
  40. package/dist/components/frame/term/lt-term.js.map +1 -1
  41. package/dist/components/host-element.d.ts +137 -2
  42. package/dist/components/host-element.d.ts.map +1 -1
  43. package/dist/components/host-element.js +187 -4
  44. package/dist/components/host-element.js.map +1 -1
  45. package/dist/lotek.css +1 -1
  46. package/dist/react.d.ts +51 -437
  47. package/dist/react.d.ts.map +1 -1
  48. package/dist/react.js +48 -208
  49. package/dist/react.js.map +1 -1
  50. package/live-templates-kotlin.xml +4 -6
  51. package/manifest/manifest.json +1 -1
  52. package/package.json +7 -3
  53. package/src/components/frame/dialog/lt-dialog.ts +56 -50
  54. package/src/components/frame/error-summary/lt-error-summary.ts +33 -46
  55. package/src/components/frame/field/lt-field.ts +99 -207
  56. package/src/components/frame/popover/lt-popover.ts +37 -35
  57. package/src/components/frame/session-timeout/lt-session-timeout.ts +88 -46
  58. package/src/components/frame/suggestion/lt-suggestion.ts +59 -73
  59. package/src/components/frame/tabs/lt-tabs.ts +96 -122
  60. package/src/components/frame/term/lt-term.ts +27 -21
  61. package/src/components/host-element.ts +306 -3
  62. package/src/react.ts +125 -240
  63. package/web-types.json +1 -1
package/dist/react.js CHANGED
@@ -1,51 +1,9 @@
1
- import { accordion } from "./components/css/accordion/accordion.js";
2
- import { alert } from "./components/css/alert/alert.js";
3
- import { avatar } from "./components/css/avatar/avatar.js";
4
- import { badge } from "./components/css/badge/badge.js";
5
- import { breadcrumbs } from "./components/css/breadcrumbs/breadcrumbs.js";
6
- import { button } from "./components/css/button/button.js";
7
- import { card } from "./components/css/card/card.js";
8
- import { checkbox } from "./components/css/checkbox/checkbox.js";
9
- import { divider } from "./components/css/divider/divider.js";
10
- import { errorText } from "./components/css/error-text/error-text.js";
11
- import { fieldset, legend } from "./components/css/fieldset/fieldset.js";
12
- import { fileUpload } from "./components/css/file-upload/file-upload.js";
13
- import { heading } from "./components/css/heading/heading.js";
14
- import { helpText } from "./components/css/help-text/help-text.js";
15
- import { icon } from "./components/css/icon/icon.js";
16
- import { input } from "./components/css/input/input.js";
17
- import { label } from "./components/css/label/label.js";
18
- import { link } from "./components/css/link/link.js";
19
- import { list } from "./components/css/list/list.js";
20
- import { pagination } from "./components/css/pagination/pagination.js";
21
- import { paragraph } from "./components/css/paragraph/paragraph.js";
22
- import { progress } from "./components/css/progress/progress.js";
23
- import { radio } from "./components/css/radio/radio.js";
24
- import { search } from "./components/css/search/search.js";
25
- import { select } from "./components/css/select/select.js";
26
- import { fieldStates, isFieldState, isRequiredMarker, managedNames, rememberManaged, requiredMarkers, } from "./components/css/shared.js";
27
- import { skeleton } from "./components/css/skeleton/skeleton.js";
28
- import { skipLink } from "./components/css/skip-link/skip-link.js";
29
- import { spinner } from "./components/css/spinner/spinner.js";
30
- import { srOnly } from "./components/css/sr-only/sr-only.js";
31
- import { steps } from "./components/css/steps/steps.js";
32
- import { switchControl } from "./components/css/switch/switch.js";
33
- import { table, tableSort } from "./components/css/table/table.js";
34
- import { tag } from "./components/css/tag/tag.js";
35
- import { textarea } from "./components/css/textarea/textarea.js";
36
- import { toggleGroup } from "./components/css/toggle-group/toggle-group.js";
37
- import { tooltip } from "./components/css/tooltip/tooltip.js";
38
- import { dialog } from "./components/frame/dialog/dialog.js";
39
- import { errorSummary } from "./components/frame/error-summary/error-summary.js";
40
- import { computeFieldAttributes, createFieldId, } from "./components/frame/field/field-core.js";
41
- import { popover } from "./components/frame/popover/popover.js";
42
- import { sessionTimeout } from "./components/frame/session-timeout/session-timeout.js";
43
- import { suggestion } from "./components/frame/suggestion/suggestion.js";
1
+ import { managedNames, rememberManaged } from "./components/css/shared.js";
2
+ import { createFieldId } from "./components/frame/field/field-core.js";
44
3
  import { tabsWithState, } from "./components/frame/tabs/tabs.js";
45
4
  import { termWithState } from "./components/frame/term/term.js";
46
- import { connectionStatus } from "./components/standalone/connection-status/connection-status.js";
47
- import { toast } from "./components/standalone/toast/toast.js";
48
5
  import { setAttributes as setHtmlAttributes } from "./dom.js";
6
+ import { lt as html } from "./lt.js";
49
7
  /**
50
8
  * The attributes that have another name in React.
51
9
  *
@@ -118,16 +76,48 @@ export function setAttributes(element, ...sets) {
118
76
  setHtmlAttributes(element, ...sets.map((set) => toHtmlAttributes(set)));
119
77
  }
120
78
  /**
121
- * Wraps a builder function so the return value gets the React names.
122
- *
123
- * The signature is written as an intersection type so TypeScript can infer
124
- * both the options type and the extra fields attached to the function, that
125
- * is `variants`, `isVariant` and the others, in one go.
79
+ * The result with the React names. A set is recognised by what
80
+ * `attributes()` notes on every set a builder function makes, not by its
81
+ * shape, so a compound whose parts are all absent is not taken for one.
82
+ */
83
+ function toReactResult(value) {
84
+ if (Array.isArray(value))
85
+ return value.map(toReactResult);
86
+ if (!value || typeof value !== "object")
87
+ return value;
88
+ if (managedNames(value))
89
+ return toReactAttributes(value);
90
+ return Object.fromEntries(Object.entries(value).map(([name, child]) => [name, toReactResult(child)]));
91
+ }
92
+ /**
93
+ * Wraps a builder function so the result gets the React names, and keeps
94
+ * what hangs on the function: `variants`, `isVariant` and the others.
126
95
  */
127
96
  function forReact(fn) {
128
- const wrapped = (options) => toReactAttributes(fn(options));
97
+ const wrapped = (...args) => toReactResult(fn(...args));
129
98
  return Object.assign(wrapped, fn);
130
99
  }
100
+ /**
101
+ * A guard on `lt`, such as `isState`: it builds nothing, and passes through
102
+ * as the same function. Named `is` and a capital letter, as every guard in
103
+ * the package is.
104
+ */
105
+ const isGuard = (name) => /^is[A-Z]/.test(name);
106
+ /**
107
+ * What stands by hand in `lt` below: the two that give the whole state, and
108
+ * `setAttributes`, which takes an element and builds nothing.
109
+ */
110
+ const BY_HAND = ["tabs", "term", "setAttributes"];
111
+ function everyBuilder() {
112
+ const result = {};
113
+ for (const [name, value] of Object.entries(html))
114
+ if (!BY_HAND.includes(name))
115
+ result[name] =
116
+ typeof value === "function" && !isGuard(name)
117
+ ? forReact(value)
118
+ : value;
119
+ return result;
120
+ }
131
121
  /**
132
122
  * Re-exported from the main entry point.
133
123
  *
@@ -138,173 +128,23 @@ function forReact(fn) {
138
128
  * also in an app without a server.
139
129
  */
140
130
  export { createFieldId };
131
+ /**
132
+ * Every builder function from the main entry, with the React names. A new
133
+ * component comes along by itself; only the exceptions stand here.
134
+ */
141
135
  export const lt = {
142
- accordion: forReact(accordion),
143
- alert: forReact(alert),
144
- avatar: forReact(avatar),
145
- badge: forReact(badge),
146
- breadcrumbs: forReact(breadcrumbs),
147
- button: forReact(button),
148
- card: forReact(card),
149
- checkbox: forReact(checkbox),
150
- divider: forReact(divider),
151
- errorText: forReact(errorText),
152
- fieldset: forReact(fieldset),
153
- heading: forReact(heading),
154
- fileUpload: forReact(fileUpload),
155
- helpText: forReact(helpText),
156
- icon: forReact(icon),
157
- input: forReact(input),
158
- label: forReact(label),
159
- legend: forReact(legend),
160
- link: forReact(link),
161
- list: forReact(list),
162
- pagination: forReact(pagination),
163
- paragraph: forReact(paragraph),
164
- radio: forReact(radio),
165
- search: forReact(search),
166
- select: forReact(select),
167
- skeleton: forReact(skeleton),
168
- skipLink: forReact(skipLink),
169
- progress: forReact(progress),
170
- spinner: forReact(spinner),
171
- srOnly: forReact(srOnly),
172
- steps: forReact(steps),
173
- switch: forReact(switchControl),
174
- toggleGroup: forReact(toggleGroup),
175
- tooltip: forReact(tooltip),
176
- table: forReact(table),
177
- tableSort: Object.assign((options) => {
178
- const built = tableSort(options);
179
- return {
180
- header: built.header,
181
- button: toReactAttributes(built.button),
182
- };
183
- }, { isDirection: tableSort.isDirection }),
184
- tag: forReact(tag),
185
- textarea: forReact(textarea),
186
- /**
187
- * Wires a whole field, with `className` and `htmlFor` on the label.
188
- *
189
- * `control`, `help` and `error` have no keys that need renaming, and are
190
- * therefore the same in both entry points.
191
- */
192
- field: (options) => {
193
- const field = computeFieldAttributes(options);
194
- return { ...field, label: toReactAttributes(field.label) };
195
- },
196
- /**
197
- * The compound builder functions return one attribute set per element,
198
- * and each set must be renamed on its own. `host` has `tabindex`, and the
199
- * panels in `lt.tabs()` have both `tabindex` and `class`.
200
- */
201
- errorSummary: (options = {}) => {
202
- const built = errorSummary(options);
203
- return {
204
- host: toReactAttributes(built.host),
205
- title: toReactAttributes(built.title),
206
- };
207
- },
208
- dialog: Object.assign((options) => {
209
- const built = dialog(options);
210
- return {
211
- host: built.host,
212
- dialog: toReactAttributes(built.dialog),
213
- header: toReactAttributes(built.header),
214
- title: toReactAttributes(built.title),
215
- subtitle: toReactAttributes(built.subtitle),
216
- body: toReactAttributes(built.body),
217
- footer: toReactAttributes(built.footer),
218
- };
219
- }, {
220
- dialog: dialog.dialog,
221
- header: dialog.header,
222
- title: dialog.title,
223
- subtitle: dialog.subtitle,
224
- body: dialog.body,
225
- footer: dialog.footer,
226
- colors: dialog.colors,
227
- isColor: dialog.isColor,
228
- }),
229
- popover: Object.assign((options) => {
230
- const built = popover(options);
231
- return {
232
- host: built.host,
233
- trigger: toReactAttributes(built.trigger),
234
- panel: toReactAttributes(built.panel),
235
- };
236
- }, { isPlacement: popover.isPlacement }),
136
+ ...everyBuilder(),
237
137
  /**
238
138
  * The whole state, not just the links: React reports a mismatch for every
239
139
  * attribute the component writes on an element React has rendered. See
240
140
  * `tabsWithState`.
241
141
  */
242
- tabs: (options) => {
243
- const built = tabsWithState(options);
244
- return {
245
- list: toReactAttributes(built.list),
246
- item: toReactAttributes(built.item),
247
- tabs: built.tabs.map(toReactAttributes),
248
- panels: built.panels.map(toReactAttributes),
249
- };
250
- },
142
+ tabs: (options) => toReactResult(tabsWithState(options)),
251
143
  /**
252
144
  * With `aria-expanded`, which `<lt-term>` writes: React reports a mismatch
253
145
  * for an attribute it did not render. See `termWithState`.
254
146
  */
255
- term: (options) => {
256
- const built = termWithState(options);
257
- return {
258
- word: toReactAttributes(built.word),
259
- entry: toReactAttributes(built.entry),
260
- };
261
- },
262
- suggestion: (options) => {
263
- const built = suggestion(options);
264
- return {
265
- ...built,
266
- label: toReactAttributes(built.label),
267
- control: toReactAttributes(built.control),
268
- list: toReactAttributes(built.list),
269
- options: built.options.map(toReactAttributes),
270
- empty: toReactAttributes(built.empty),
271
- status: toReactAttributes(built.status),
272
- value: toReactAttributes(built.value),
273
- };
274
- },
275
- toast: (options = {}) => {
276
- const built = toast(options);
277
- return {
278
- host: toReactAttributes(built.host),
279
- message: toReactAttributes(built.message),
280
- close: toReactAttributes(built.close),
281
- };
282
- },
283
- sessionTimeout: Object.assign((options) => {
284
- const built = sessionTimeout(options);
285
- return {
286
- host: toReactAttributes(built.host),
287
- dialog: toReactAttributes(built.dialog),
288
- title: toReactAttributes(built.title),
289
- text: toReactAttributes(built.text),
290
- count: toReactAttributes(built.count),
291
- live: toReactAttributes(built.live),
292
- actions: toReactAttributes(built.actions),
293
- extend: toReactAttributes(built.extend),
294
- logout: toReactAttributes(built.logout),
295
- };
296
- }, {
297
- dialog: sessionTimeout.dialog,
298
- title: sessionTimeout.title,
299
- text: sessionTimeout.text,
300
- count: sessionTimeout.count,
301
- actions: sessionTimeout.actions,
302
- }),
303
- connectionStatus: forReact(connectionStatus),
147
+ term: (options) => toReactResult(termWithState(options)),
304
148
  setAttributes,
305
- states: fieldStates,
306
- isState: isFieldState,
307
- markers: requiredMarkers,
308
- isMarker: isRequiredMarker,
309
149
  };
310
150
  //# sourceMappingURL=react.js.map
package/dist/react.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"react.js","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AACnE,OAAO,EAAE,KAAK,EAAE,MA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,EAAE,CAAC,OAA4C,EAAE,EAAE,CACrD,aAAa,CAAC,aAAa,CAAC,OAAO,CAAC,CAEnC;IAEH,aAAa;CACd,CAAA"}
@@ -40,28 +40,26 @@
40
40
  <option name="KOTLIN_TOPLEVEL" value="true" />
41
41
  </context>
42
42
  </template>
43
- <template name="ltdialog" value="fun FlowContent.cancelJob() {&#10; val box = no.lotek.Lt.dialog(titleId = &quot;$confirm_title$&quot;)&#10; button { lt(no.lotek.Lt.button(variant = no.lotek.ButtonVariant.DANGER)); id = &quot;$open_confirm$&quot;; type = ButtonType.button; +&quot;Cancel the job&quot; }&#10; dialog {&#10; lt(box.dialog)&#10; id = &quot;$confirm$&quot;&#10; h2 { lt(box.title); +&quot;Cancel job 222-0481?&quot; }&#10; div {&#10; lt(box.body)&#10; p { +&quot;The crew keeps the advance. This cannot be undone.&quot; }&#10; }&#10; form {&#10; lt(box.footer)&#10; attributes[&quot;method&quot;] = &quot;dialog&quot;&#10; button { lt(no.lotek.Lt.button(variant = no.lotek.ButtonVariant.SECONDARY)); value = &quot;keep&quot;; +&quot;Keep the job&quot; }&#10; button {&#10; lt(no.lotek.Lt.button(variant = no.lotek.ButtonVariant.DANGER))&#10; formMethod = ButtonFormMethod.post&#10; formAction = &quot;/jobs/222-0481/cancel&quot;&#10; +&quot;Cancel the job&quot;&#10; }&#10; }&#10; }&#10; script(type = &quot;module&quot;) {&#10; unsafe {&#10; +&quot;&quot;&quot;&#10; const dialog = document.getElementById(&quot;$confirm$&quot;)&#10;&#10; // showModal() and not commandfor, which does nothing in a browser from&#10; // before December 2025. This is the one script the recipe needs.&#10; document.getElementById(&quot;$open_confirm$&quot;).addEventListener(&quot;click&quot;, () =&gt; {&#10; dialog.showModal()&#10; })&#10; &quot;&quot;&quot;&#10; }&#10; }&#10;}" description="The Kotlin recipe from the dialog page, in kotlinx.html. Needs import kotlinx.html.* and no.lotek.html.*; the names from no.lotek are imported when it is inserted." toReformat="true" toShortenFQNames="true">
43
+ <template name="ltdialog" value="fun FlowContent.cancelJob(open: Boolean = true) {&#10; val box = no.lotek.Lt.dialog(titleId = &quot;$confirm_title$&quot;, open = open)&#10; ltDialog {&#10; lt(box.host)&#10; id = &quot;$confirm$&quot;&#10; dialog {&#10; lt(box.dialog)&#10; // Escape is a close request, reported with `cancel`, and it&#10; // keeps the job. A close the server makes gives no `cancel`.&#10; attributes[&quot;data-on:cancel&quot;] = &quot;@post('/jobs/222-0481/keep')&quot;&#10; h2 { lt(box.title); +&quot;Cancel job 222-0481?&quot; }&#10; div {&#10; lt(box.body)&#10; p { +&quot;The crew keeps the advance. This cannot be undone.&quot; }&#10; }&#10; form {&#10; lt(box.footer)&#10; attributes[&quot;method&quot;] = &quot;dialog&quot;&#10; button {&#10; lt(no.lotek.Lt.button(variant = no.lotek.ButtonVariant.SECONDARY))&#10; value = &quot;keep&quot;&#10; attributes[&quot;data-on:click&quot;] = &quot;@post('/jobs/222-0481/keep')&quot;&#10; +&quot;Keep the job&quot;&#10; }&#10; button {&#10; lt(no.lotek.Lt.button(variant = no.lotek.ButtonVariant.DANGER))&#10; value = &quot;cancel&quot;&#10; attributes[&quot;data-on:click&quot;] = &quot;@post('/jobs/222-0481/cancel')&quot;&#10; +&quot;Cancel the job&quot;&#10; }&#10; }&#10; }&#10; }&#10;}" description="The Kotlin recipe from the dialog page, in kotlinx.html. Needs import kotlinx.html.* and no.lotek.html.*; the names from no.lotek are imported when it is inserted." toReformat="true" toShortenFQNames="true">
44
44
  <variable name="confirm_title" expression="" defaultValue="" alwaysStopAt="true" />
45
- <variable name="open_confirm" expression="" defaultValue="" alwaysStopAt="true" />
46
45
  <variable name="confirm" expression="" defaultValue="" alwaysStopAt="true" />
47
46
  <context>
48
47
  <option name="KOTLIN_TOPLEVEL" value="true" />
49
48
  </context>
50
49
  </template>
51
- <template name="lttoast" value="fun FlowContent.relay() {&#10; ltToast { lt(no.lotek.Lt.toast(label = &quot;Messages&quot;).host); id = &quot;$messages$&quot; }&#10; button { lt(no.lotek.Lt.button()); id = &quot;$restart$&quot;; type = ButtonType.button; +&quot;Restart relay 14&quot; }&#10; script(type = &quot;module&quot;) {&#10; unsafe {&#10; +&quot;&quot;&quot;&#10; const messages = document.getElementById(&quot;$messages$&quot;)&#10;&#10; document.getElementById(&quot;$restart$&quot;).addEventListener(&quot;click&quot;, async () =&gt; {&#10; let answer&#10; try {&#10; answer = await fetch(&quot;/relays/14/restart&quot;, { method: &quot;POST&quot; })&#10; } catch {}&#10; // A gateway whose server is gone answers 502, 503 or 504, which is no&#10; // answer from the relay either. Any other answer that is not ok means&#10; // the server is there and said no.&#10; if (answer &amp;&amp; [502, 503, 504].includes(answer.status)) answer = undefined&#10; // fetch follows a redirect, as to the log-in page when the session has&#10; // run out, and the page it lands on is ok. That is no restart.&#10; if (answer?.ok &amp;&amp; !answer.redirected) {&#10; messages.show(&quot;Relay 14 is back&quot;, { color: &quot;success&quot; })&#10; } else if (answer) {&#10; messages.show(&quot;Relay 14 refused the restart. Try again.&quot;, { color: &quot;danger&quot;, duration: 0 })&#10; } else {&#10; messages.show(&quot;Relay 14 did not answer. Try again.&quot;, { color: &quot;danger&quot;, duration: 0 })&#10; }&#10; })&#10; &quot;&quot;&quot;&#10; }&#10; }&#10;}" description="The Kotlin recipe from the toast page, in kotlinx.html. Needs import kotlinx.html.* and no.lotek.html.*; the names from no.lotek are imported when it is inserted." toReformat="true" toShortenFQNames="true">
50
+ <template name="lttoast" value="fun FlowContent.relay() {&#10; ltToast { lt(no.lotek.Lt.toast(label = &quot;Messages&quot;).host); id = &quot;$messages$&quot; }&#10; button {&#10; lt(no.lotek.Lt.button())&#10; type = ButtonType.button&#10; attributes[&quot;data-on:click&quot;] = &quot;@post('/relays/14/restart')&quot;&#10; +&quot;Restart relay 14&quot;&#10; }&#10;}" description="The Kotlin recipe from the toast page, in kotlinx.html. Needs import kotlinx.html.* and no.lotek.html.*; the names from no.lotek are imported when it is inserted." toReformat="true" toShortenFQNames="true">
52
51
  <variable name="messages" expression="" defaultValue="" alwaysStopAt="true" />
53
- <variable name="restart" expression="" defaultValue="" alwaysStopAt="true" />
54
52
  <context>
55
53
  <option name="KOTLIN_TOPLEVEL" value="true" />
56
54
  </context>
57
55
  </template>
58
- <template name="ltsessiontimeout" value="fun FlowContent.sessionWarning() {&#10; val session = no.lotek.Lt.sessionTimeout(titleId = &quot;$session_title$&quot;, warnAt = 1500, expiresAt = 1800)&#10; ltSessionTimeout {&#10; lt(session.host)&#10; dialog {&#10; lt(session.dialog)&#10; h2 { lt(session.title); +&quot;Your session is ending&quot; }&#10; p {&#10; lt(session.text)&#10; +&quot;Your session on the Lattice ends in &quot;&#10; span { lt(session.count) }&#10; +&quot;. Unsaved routes will be lost.&quot;&#10; }&#10; span { lt(session.live) }&#10; form {&#10; lt(session.actions)&#10; attributes[&quot;method&quot;] = &quot;dialog&quot;&#10; button { lt(no.lotek.Lt.button(), session.extend); +&quot;Stay connected&quot; }&#10; button {&#10; lt(no.lotek.Lt.button(variant = no.lotek.ButtonVariant.SECONDARY), session.logout)&#10; // Logging out is a post to the server, which ends the session.&#10; formMethod = ButtonFormMethod.post&#10; formAction = &quot;/log-out&quot;&#10; +&quot;Log out&quot;&#10; }&#10; }&#10; }&#10; }&#10; script(type = &quot;module&quot;) {&#10; unsafe {&#10; +&quot;&quot;&quot;&#10; const session = document.querySelector(&quot;lt-session-timeout&quot;)&#10;&#10; session.addEventListener(&quot;session-extend&quot;, async () =&gt; {&#10; await fetch(&quot;/api/extend-session&quot;, { method: &quot;POST&quot; })&#10; })&#10;&#10; session.addEventListener(&quot;session-expired&quot;, () =&gt; {&#10; location.href = &quot;/log-in?reason=expired&quot;&#10; })&#10; &quot;&quot;&quot;&#10; }&#10; }&#10;}" description="The Kotlin recipe from the session-timeout page, in kotlinx.html. Needs import kotlinx.html.* and no.lotek.html.*; the names from no.lotek are imported when it is inserted." toReformat="true" toShortenFQNames="true">
56
+ <template name="ltsessiontimeout" value="fun FlowContent.sessionWarning() {&#10; val session = no.lotek.Lt.sessionTimeout(titleId = &quot;$session_title$&quot;, warnAt = 1500, expiresAt = 1800)&#10; ltSessionTimeout {&#10; lt(session.host)&#10; attributes[&quot;data-on:session-extend&quot;] = &quot;@post('/api/extend-session')&quot;&#10; attributes[&quot;data-on:session-expired&quot;] = &quot;window.location = '/log-in?reason=expired'&quot;&#10; dialog {&#10; lt(session.dialog)&#10; h2 { lt(session.title); +&quot;Your session is ending&quot; }&#10; p {&#10; lt(session.text)&#10; +&quot;Your session on the Lattice ends in &quot;&#10; span { lt(session.count) }&#10; +&quot;. Unsaved routes will be lost.&quot;&#10; }&#10; span { lt(session.live) }&#10; form {&#10; lt(session.actions)&#10; attributes[&quot;method&quot;] = &quot;dialog&quot;&#10; button { lt(no.lotek.Lt.button(), session.extend); +&quot;Stay connected&quot; }&#10; button {&#10; lt(no.lotek.Lt.button(variant = no.lotek.ButtonVariant.SECONDARY), session.logout)&#10; // Logging out is a post to the server, which ends the session.&#10; formMethod = ButtonFormMethod.post&#10; formAction = &quot;/log-out&quot;&#10; +&quot;Log out&quot;&#10; }&#10; }&#10; }&#10; }&#10;}" description="The Kotlin recipe from the session-timeout page, in kotlinx.html. Needs import kotlinx.html.* and no.lotek.html.*; the names from no.lotek are imported when it is inserted." toReformat="true" toShortenFQNames="true">
59
57
  <variable name="session_title" expression="" defaultValue="" alwaysStopAt="true" />
60
58
  <context>
61
59
  <option name="KOTLIN_TOPLEVEL" value="true" />
62
60
  </context>
63
61
  </template>
64
- <template name="ltconnectionstatus" value="fun FlowContent.connection() {&#10; ltConnectionStatus { lt(no.lotek.Lt.connectionStatus()) }&#10; // The bar shows by itself when the browser goes offline. That the&#10; // server stopped answering, only the app knows, and says so here.&#10; script(type = &quot;module&quot;) {&#10; unsafe {&#10; +&quot;&quot;&quot;&#10; import { reportFailure, reportSuccess } from&#10; &quot;$${no.lotek.LotekWebJar.ROOT}/dist/components/standalone/connection-status/lt-connection-status.js&quot;&#10;&#10; const connection = document.querySelector(&quot;lt-connection-status&quot;)&#10; if (!connection) throw new Error(&quot;element not found&quot;)&#10;&#10; // The page's own saves go through this function, so every answer from the&#10; // server, or the lack of one, is reported. A module keeps its names to&#10; // itself, so it is put on window, where the page's other scripts call it&#10; // with what they save.&#10; // A request that got no answer is a lost connection, and so is an answer&#10; // from a gateway whose server is gone (502, 503, 504). Any other answer, an&#10; // error status included, means the server is there. reportSuccess and&#10; // reportFailure wait for the component to be registered, and warn when it&#10; // never is; the save does not wait for them.&#10; window.saveRoute = async (body) =&gt; {&#10; let response&#10; try {&#10; response = await fetch(&quot;/api/routes&quot;, { method: &quot;POST&quot;, body })&#10; } catch {}&#10; if (response &amp;&amp; ![502, 503, 504].includes(response.status)) reportSuccess(connection)&#10; else reportFailure(connection)&#10; return response&#10; }&#10; &quot;&quot;&quot;&#10; }&#10; }&#10;}" description="The Kotlin recipe from the connection-status page, in kotlinx.html. Needs import kotlinx.html.* and no.lotek.html.*; the names from no.lotek are imported when it is inserted." toReformat="true" toShortenFQNames="true">
62
+ <template name="ltconnectionstatus" value="fun FlowContent.connection() {&#10; ltConnectionStatus {&#10; lt(no.lotek.Lt.connectionStatus())&#10; // `retrying`: the request got no answer. `error`: an answer of 400 or&#10; // more; 502, 503 and 504 come from a gateway whose server is gone,&#10; // any other is a server that is there. A patch: the stream is alive.&#10; attributes[&quot;data-on:datastar-fetch__document&quot;] =&#10; &quot;evt.detail.type === 'retrying' || [502, 503, 504].includes(+evt.detail.argsRaw.status) ? el.reportFailure() : (evt.detail.type === 'error' || evt.detail.type.startsWith('datastar-patch')) &amp;&amp; el.reportSuccess()&quot;&#10; }&#10;}" description="The Kotlin recipe from the connection-status page, in kotlinx.html. Needs import kotlinx.html.* and no.lotek.html.*; the names from no.lotek are imported when it is inserted." toReformat="true" toShortenFQNames="true">
65
63
  <context>
66
64
  <option name="KOTLIN_TOPLEVEL" value="true" />
67
65
  </context>
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "./manifest.schema.json",
3
3
  "schemaVersion": 1,
4
- "version": "0.41.0",
4
+ "version": "0.43.0",
5
5
  "textLanguage": "en",
6
6
  "elements": {
7
7
  "lt-field": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lo-tek/interfaces",
3
- "version": "0.41.0",
3
+ "version": "0.43.0",
4
4
  "description": "Framework-agnostic design system: tokens, CSS components and web components.",
5
5
  "license": "MIT",
6
6
  "author": "August Søberg-Klyver",
@@ -367,14 +367,14 @@
367
367
  "access": "public"
368
368
  },
369
369
  "scripts": {
370
- "generate": "bun scripts/generate-matrix.ts && bun scripts/generate-tokens.ts && bun scripts/generate-tailwind.ts && bun scripts/generate-vocabulary.ts && bun scripts/generate-agent.ts && bun scripts/generate-manifest.ts",
370
+ "generate": "bun scripts/extract-recipes.ts && bun scripts/generate-matrix.ts && bun scripts/generate-tokens.ts && bun scripts/generate-tailwind.ts && bun scripts/generate-vocabulary.ts && bun scripts/generate-agent.ts && bun scripts/generate-manifest.ts",
371
371
  "build:css": "bun scripts/build-css.ts",
372
372
  "pack": "bun run core && rm -rf dist && tsc -b --force && bun run build:css && npm pack --ignore-scripts",
373
373
  "build:browser": "tsc -b && bun run build:css",
374
374
  "vocabulary": "bun scripts/generate-vocabulary.ts",
375
375
  "check:vocabulary": "bun scripts/check-vocabulary.ts",
376
376
  "core": "bun ../core/scripts/build.ts && mkdir -p core && cp ../core/dist/lotek-core.wasm ../core/dist/lotek.wasm core/",
377
- "build": "bun run core && bun run generate && rm -rf dist && tsc -b --force && bun run build:css && bun run check:exports && bun run check:server && bun run check:types && bun run check:writes && bun run check:test-files && bun run check:texts && bun run check:identifiers && bun run check:agent && bun run check:vocabulary && bun run check:css-witness && bun run check:wording && bun run check:cli && bun run check:version && bun run check:package",
377
+ "build": "bun run core && bun run generate && rm -rf dist && tsc -b --force && bun run build:css && bun run check:exports && bun run check:server && bun run check:types && bun run check:writes && bun run check:layers && bun run check:test-files && bun run check:texts && bun run check:identifiers && bun run check:agent && bun run check:vocabulary && bun run check:css-witness && bun run check:wording && bun run check:cli && bun run check:version && bun run check:package",
378
378
  "typecheck": "tsc --noEmit",
379
379
  "typecheck:tests": "tsc --noEmit -p tsconfig.tests.json",
380
380
  "test:browser": "vitest --config vitest.config.ts --run",
@@ -391,6 +391,7 @@
391
391
  "check:package": "publint",
392
392
  "prepublishOnly": "bun run build",
393
393
  "check:writes": "bun scripts/check-writes.ts",
394
+ "check:layers": "bun scripts/check-layers.ts",
394
395
  "check:test-files": "bun scripts/check-test-files.ts",
395
396
  "check:identifiers": "bun scripts/check-identifiers.ts",
396
397
  "typecheck:scripts": "tsc --noEmit -p scripts/tsconfig.json",
@@ -411,7 +412,10 @@
411
412
  "publint": "^0.3.24",
412
413
  "react": "19",
413
414
  "react-dom": "19",
415
+ "remark-mdx": "3.1.1",
416
+ "remark-parse": "11.0.0",
414
417
  "tailwindcss": "4.3.0",
418
+ "unified": "11.0.5",
415
419
  "vite": "7.3.7",
416
420
  "vitest": "4.1.12"
417
421
  }