@lo-tek/interfaces 0.0.0 → 0.37.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.
- package/CHANGELOG.md +3254 -0
- package/LICENSE +21 -0
- package/README.md +128 -1
- package/agent/astro.md +400 -0
- package/agent/bundles.md +429 -0
- package/agent/datastar.md +409 -0
- package/agent/html.md +388 -0
- package/agent/react.md +440 -0
- package/agent/templates.md +472 -0
- package/core/lotek-core.wasm +0 -0
- package/core/lotek.wasm +0 -0
- package/dist/cli.d.ts +12 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +14 -0
- package/dist/cli.js.map +1 -0
- package/dist/components/css/accordion/accordion.d.ts +37 -0
- package/dist/components/css/accordion/accordion.d.ts.map +1 -0
- package/dist/components/css/accordion/accordion.js +31 -0
- package/dist/components/css/accordion/accordion.js.map +1 -0
- package/dist/components/css/alert/alert.d.ts +35 -0
- package/dist/components/css/alert/alert.d.ts.map +1 -0
- package/dist/components/css/alert/alert.js +29 -0
- package/dist/components/css/alert/alert.js.map +1 -0
- package/dist/components/css/avatar/avatar.d.ts +40 -0
- package/dist/components/css/avatar/avatar.d.ts.map +1 -0
- package/dist/components/css/avatar/avatar.js +30 -0
- package/dist/components/css/avatar/avatar.js.map +1 -0
- package/dist/components/css/badge/badge.d.ts +24 -0
- package/dist/components/css/badge/badge.d.ts.map +1 -0
- package/dist/components/css/badge/badge.js +24 -0
- package/dist/components/css/badge/badge.js.map +1 -0
- package/dist/components/css/breadcrumbs/breadcrumbs.d.ts +26 -0
- package/dist/components/css/breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/dist/components/css/breadcrumbs/breadcrumbs.js +24 -0
- package/dist/components/css/breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/components/css/button/button.d.ts +26 -0
- package/dist/components/css/button/button.d.ts.map +1 -0
- package/dist/components/css/button/button.js +25 -0
- package/dist/components/css/button/button.js.map +1 -0
- package/dist/components/css/card/card.d.ts +36 -0
- package/dist/components/css/card/card.d.ts.map +1 -0
- package/dist/components/css/card/card.js +28 -0
- package/dist/components/css/card/card.js.map +1 -0
- package/dist/components/css/checkbox/checkbox.d.ts +32 -0
- package/dist/components/css/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/css/checkbox/checkbox.js +27 -0
- package/dist/components/css/checkbox/checkbox.js.map +1 -0
- package/dist/components/css/divider/divider.d.ts +29 -0
- package/dist/components/css/divider/divider.d.ts.map +1 -0
- package/dist/components/css/divider/divider.js +23 -0
- package/dist/components/css/divider/divider.js.map +1 -0
- package/dist/components/css/error-text/error-text.d.ts +24 -0
- package/dist/components/css/error-text/error-text.d.ts.map +1 -0
- package/dist/components/css/error-text/error-text.js +18 -0
- package/dist/components/css/error-text/error-text.js.map +1 -0
- package/dist/components/css/fieldset/fieldset.d.ts +55 -0
- package/dist/components/css/fieldset/fieldset.d.ts.map +1 -0
- package/dist/components/css/fieldset/fieldset.js +39 -0
- package/dist/components/css/fieldset/fieldset.js.map +1 -0
- package/dist/components/css/file-upload/file-upload.d.ts +41 -0
- package/dist/components/css/file-upload/file-upload.d.ts.map +1 -0
- package/dist/components/css/file-upload/file-upload.js +32 -0
- package/dist/components/css/file-upload/file-upload.js.map +1 -0
- package/dist/components/css/heading/heading.d.ts +29 -0
- package/dist/components/css/heading/heading.d.ts.map +1 -0
- package/dist/components/css/heading/heading.js +23 -0
- package/dist/components/css/heading/heading.js.map +1 -0
- package/dist/components/css/help-text/help-text.d.ts +24 -0
- package/dist/components/css/help-text/help-text.d.ts.map +1 -0
- package/dist/components/css/help-text/help-text.js +23 -0
- package/dist/components/css/help-text/help-text.js.map +1 -0
- package/dist/components/css/icon/icon.d.ts +34 -0
- package/dist/components/css/icon/icon.d.ts.map +1 -0
- package/dist/components/css/icon/icon.js +25 -0
- package/dist/components/css/icon/icon.js.map +1 -0
- package/dist/components/css/input/input.d.ts +40 -0
- package/dist/components/css/input/input.d.ts.map +1 -0
- package/dist/components/css/input/input.js +45 -0
- package/dist/components/css/input/input.js.map +1 -0
- package/dist/components/css/label/label.d.ts +33 -0
- package/dist/components/css/label/label.d.ts.map +1 -0
- package/dist/components/css/label/label.js +23 -0
- package/dist/components/css/label/label.js.map +1 -0
- package/dist/components/css/link/link.d.ts +28 -0
- package/dist/components/css/link/link.d.ts.map +1 -0
- package/dist/components/css/link/link.js +20 -0
- package/dist/components/css/link/link.js.map +1 -0
- package/dist/components/css/list/list.d.ts +31 -0
- package/dist/components/css/list/list.d.ts.map +1 -0
- package/dist/components/css/list/list.js +25 -0
- package/dist/components/css/list/list.js.map +1 -0
- package/dist/components/css/pagination/pagination.d.ts +27 -0
- package/dist/components/css/pagination/pagination.d.ts.map +1 -0
- package/dist/components/css/pagination/pagination.js +25 -0
- package/dist/components/css/pagination/pagination.js.map +1 -0
- package/dist/components/css/paragraph/paragraph.d.ts +36 -0
- package/dist/components/css/paragraph/paragraph.d.ts.map +1 -0
- package/dist/components/css/paragraph/paragraph.js +26 -0
- package/dist/components/css/paragraph/paragraph.js.map +1 -0
- package/dist/components/css/progress/progress.d.ts +53 -0
- package/dist/components/css/progress/progress.d.ts.map +1 -0
- package/dist/components/css/progress/progress.js +38 -0
- package/dist/components/css/progress/progress.js.map +1 -0
- package/dist/components/css/radio/radio.d.ts +32 -0
- package/dist/components/css/radio/radio.d.ts.map +1 -0
- package/dist/components/css/radio/radio.js +27 -0
- package/dist/components/css/radio/radio.js.map +1 -0
- package/dist/components/css/search/search.d.ts +34 -0
- package/dist/components/css/search/search.d.ts.map +1 -0
- package/dist/components/css/search/search.js +32 -0
- package/dist/components/css/search/search.js.map +1 -0
- package/dist/components/css/select/select.d.ts +40 -0
- package/dist/components/css/select/select.d.ts.map +1 -0
- package/dist/components/css/select/select.js +31 -0
- package/dist/components/css/select/select.js.map +1 -0
- package/dist/components/css/shared.d.ts +90 -0
- package/dist/components/css/shared.d.ts.map +1 -0
- package/dist/components/css/shared.js +167 -0
- package/dist/components/css/shared.js.map +1 -0
- package/dist/components/css/skeleton/skeleton.d.ts +29 -0
- package/dist/components/css/skeleton/skeleton.d.ts.map +1 -0
- package/dist/components/css/skeleton/skeleton.js +23 -0
- package/dist/components/css/skeleton/skeleton.js.map +1 -0
- package/dist/components/css/skip-link/skip-link.d.ts +18 -0
- package/dist/components/css/skip-link/skip-link.d.ts.map +1 -0
- package/dist/components/css/skip-link/skip-link.js +16 -0
- package/dist/components/css/skip-link/skip-link.js.map +1 -0
- package/dist/components/css/spinner/spinner.d.ts +33 -0
- package/dist/components/css/spinner/spinner.d.ts.map +1 -0
- package/dist/components/css/spinner/spinner.js +25 -0
- package/dist/components/css/spinner/spinner.js.map +1 -0
- package/dist/components/css/sr-only/sr-only.d.ts +17 -0
- package/dist/components/css/sr-only/sr-only.d.ts.map +1 -0
- package/dist/components/css/sr-only/sr-only.js +15 -0
- package/dist/components/css/sr-only/sr-only.js.map +1 -0
- package/dist/components/css/switch/switch.d.ts +37 -0
- package/dist/components/css/switch/switch.d.ts.map +1 -0
- package/dist/components/css/switch/switch.js +29 -0
- package/dist/components/css/switch/switch.js.map +1 -0
- package/dist/components/css/table/table.d.ts +76 -0
- package/dist/components/css/table/table.d.ts.map +1 -0
- package/dist/components/css/table/table.js +59 -0
- package/dist/components/css/table/table.js.map +1 -0
- package/dist/components/css/tag/tag.d.ts +35 -0
- package/dist/components/css/tag/tag.d.ts.map +1 -0
- package/dist/components/css/tag/tag.js +27 -0
- package/dist/components/css/tag/tag.js.map +1 -0
- package/dist/components/css/textarea/textarea.d.ts +23 -0
- package/dist/components/css/textarea/textarea.d.ts.map +1 -0
- package/dist/components/css/textarea/textarea.js +18 -0
- package/dist/components/css/textarea/textarea.js.map +1 -0
- package/dist/components/css/toggle-group/toggle-group.d.ts +31 -0
- package/dist/components/css/toggle-group/toggle-group.d.ts.map +1 -0
- package/dist/components/css/toggle-group/toggle-group.js +29 -0
- package/dist/components/css/toggle-group/toggle-group.js.map +1 -0
- package/dist/components/css/tooltip/tooltip.d.ts +31 -0
- package/dist/components/css/tooltip/tooltip.d.ts.map +1 -0
- package/dist/components/css/tooltip/tooltip.js +29 -0
- package/dist/components/css/tooltip/tooltip.js.map +1 -0
- package/dist/components/default-texts.d.ts +35 -0
- package/dist/components/default-texts.d.ts.map +1 -0
- package/dist/components/default-texts.js +35 -0
- package/dist/components/default-texts.js.map +1 -0
- package/dist/components/events.d.ts +77 -0
- package/dist/components/events.d.ts.map +1 -0
- package/dist/components/events.js +3 -0
- package/dist/components/events.js.map +1 -0
- package/dist/components/frame/dialog/dialog.d.ts +122 -0
- package/dist/components/frame/dialog/dialog.d.ts.map +1 -0
- package/dist/components/frame/dialog/dialog.js +112 -0
- package/dist/components/frame/dialog/dialog.js.map +1 -0
- package/dist/components/frame/dialog/lt-dialog.d.ts +104 -0
- package/dist/components/frame/dialog/lt-dialog.d.ts.map +1 -0
- package/dist/components/frame/dialog/lt-dialog.js +431 -0
- package/dist/components/frame/dialog/lt-dialog.js.map +1 -0
- package/dist/components/frame/error-summary/error-summary.d.ts +40 -0
- package/dist/components/frame/error-summary/error-summary.d.ts.map +1 -0
- package/dist/components/frame/error-summary/error-summary.js +32 -0
- package/dist/components/frame/error-summary/error-summary.js.map +1 -0
- package/dist/components/frame/error-summary/lt-error-summary.d.ts +82 -0
- package/dist/components/frame/error-summary/lt-error-summary.d.ts.map +1 -0
- package/dist/components/frame/error-summary/lt-error-summary.js +302 -0
- package/dist/components/frame/error-summary/lt-error-summary.js.map +1 -0
- package/dist/components/frame/field/field-core.d.ts +92 -0
- package/dist/components/frame/field/field-core.d.ts.map +1 -0
- package/dist/components/frame/field/field-core.js +63 -0
- package/dist/components/frame/field/field-core.js.map +1 -0
- package/dist/components/frame/field/lt-field.d.ts +173 -0
- package/dist/components/frame/field/lt-field.d.ts.map +1 -0
- package/dist/components/frame/field/lt-field.js +580 -0
- package/dist/components/frame/field/lt-field.js.map +1 -0
- package/dist/components/frame/popover/lt-popover.d.ts +132 -0
- package/dist/components/frame/popover/lt-popover.d.ts.map +1 -0
- package/dist/components/frame/popover/lt-popover.js +490 -0
- package/dist/components/frame/popover/lt-popover.js.map +1 -0
- package/dist/components/frame/popover/popover.d.ts +49 -0
- package/dist/components/frame/popover/popover.d.ts.map +1 -0
- package/dist/components/frame/popover/popover.js +64 -0
- package/dist/components/frame/popover/popover.js.map +1 -0
- package/dist/components/frame/session-timeout/lt-session-timeout.d.ts +198 -0
- package/dist/components/frame/session-timeout/lt-session-timeout.d.ts.map +1 -0
- package/dist/components/frame/session-timeout/lt-session-timeout.js +573 -0
- package/dist/components/frame/session-timeout/lt-session-timeout.js.map +1 -0
- package/dist/components/frame/session-timeout/session-timeout.d.ts +113 -0
- package/dist/components/frame/session-timeout/session-timeout.d.ts.map +1 -0
- package/dist/components/frame/session-timeout/session-timeout.js +101 -0
- package/dist/components/frame/session-timeout/session-timeout.js.map +1 -0
- package/dist/components/frame/suggestion/lt-suggestion.d.ts +361 -0
- package/dist/components/frame/suggestion/lt-suggestion.d.ts.map +1 -0
- package/dist/components/frame/suggestion/lt-suggestion.js +1152 -0
- package/dist/components/frame/suggestion/lt-suggestion.js.map +1 -0
- package/dist/components/frame/suggestion/suggestion.d.ts +143 -0
- package/dist/components/frame/suggestion/suggestion.d.ts.map +1 -0
- package/dist/components/frame/suggestion/suggestion.js +127 -0
- package/dist/components/frame/suggestion/suggestion.js.map +1 -0
- package/dist/components/frame/tabs/lt-tabs.d.ts +404 -0
- package/dist/components/frame/tabs/lt-tabs.d.ts.map +1 -0
- package/dist/components/frame/tabs/lt-tabs.js +1201 -0
- package/dist/components/frame/tabs/lt-tabs.js.map +1 -0
- package/dist/components/frame/tabs/tabs.d.ts +112 -0
- package/dist/components/frame/tabs/tabs.d.ts.map +1 -0
- package/dist/components/frame/tabs/tabs.js +107 -0
- package/dist/components/frame/tabs/tabs.js.map +1 -0
- package/dist/components/host-element.d.ts +135 -0
- package/dist/components/host-element.d.ts.map +1 -0
- package/dist/components/host-element.js +366 -0
- package/dist/components/host-element.js.map +1 -0
- package/dist/components/standalone/connection-status/connection-status.d.ts +28 -0
- package/dist/components/standalone/connection-status/connection-status.d.ts.map +1 -0
- package/dist/components/standalone/connection-status/connection-status.js +22 -0
- package/dist/components/standalone/connection-status/connection-status.js.map +1 -0
- package/dist/components/standalone/connection-status/lt-connection-status.d.ts +81 -0
- package/dist/components/standalone/connection-status/lt-connection-status.d.ts.map +1 -0
- package/dist/components/standalone/connection-status/lt-connection-status.js +216 -0
- package/dist/components/standalone/connection-status/lt-connection-status.js.map +1 -0
- package/dist/components/standalone/toast/lt-toast.d.ts +109 -0
- package/dist/components/standalone/toast/lt-toast.d.ts.map +1 -0
- package/dist/components/standalone/toast/lt-toast.js +256 -0
- package/dist/components/standalone/toast/lt-toast.js.map +1 -0
- package/dist/components/standalone/toast/toast.d.ts +52 -0
- package/dist/components/standalone/toast/toast.d.ts.map +1 -0
- package/dist/components/standalone/toast/toast.js +42 -0
- package/dist/components/standalone/toast/toast.js.map +1 -0
- package/dist/diagnostics/core.d.ts +137 -0
- package/dist/diagnostics/core.d.ts.map +1 -0
- package/dist/diagnostics/core.js +72 -0
- package/dist/diagnostics/core.js.map +1 -0
- package/dist/diagnostics/default-core.d.ts +10 -0
- package/dist/diagnostics/default-core.d.ts.map +1 -0
- package/dist/diagnostics/default-core.js +72 -0
- package/dist/diagnostics/default-core.js.map +1 -0
- package/dist/diagnostics/index.d.ts +84 -0
- package/dist/diagnostics/index.d.ts.map +1 -0
- package/dist/diagnostics/index.js +106 -0
- package/dist/diagnostics/index.js.map +1 -0
- package/dist/dom.d.ts +55 -0
- package/dist/dom.d.ts.map +1 -0
- package/dist/dom.js +162 -0
- package/dist/dom.js.map +1 -0
- package/dist/index.d.ts +97 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +58 -0
- package/dist/index.js.map +1 -0
- package/dist/jsx/react.d.ts +180 -0
- package/dist/jsx/react.d.ts.map +1 -0
- package/dist/jsx/react.js +2 -0
- package/dist/jsx/react.js.map +1 -0
- package/dist/lotek.css +3617 -0
- package/dist/lt.d.ts +325 -0
- package/dist/lt.d.ts.map +1 -0
- package/dist/lt.js +183 -0
- package/dist/lt.js.map +1 -0
- package/dist/react.d.ts +492 -0
- package/dist/react.d.ts.map +1 -0
- package/dist/react.js +296 -0
- package/dist/react.js.map +1 -0
- package/dist/register.d.ts +17 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/register.js +35 -0
- package/dist/register.js.map +1 -0
- package/dist/tokens/color.d.ts +43 -0
- package/dist/tokens/color.d.ts.map +1 -0
- package/dist/tokens/color.js +123 -0
- package/dist/tokens/color.js.map +1 -0
- package/dist/tokens/contract.d.ts +18 -0
- package/dist/tokens/contract.d.ts.map +1 -0
- package/dist/tokens/contract.js +18 -0
- package/dist/tokens/contract.js.map +1 -0
- package/dist/tokens/matrix-cells.d.ts +30 -0
- package/dist/tokens/matrix-cells.d.ts.map +1 -0
- package/dist/tokens/matrix-cells.js +273 -0
- package/dist/tokens/matrix-cells.js.map +1 -0
- package/dist/tokens/matrix.d.ts +18 -0
- package/dist/tokens/matrix.d.ts.map +1 -0
- package/dist/tokens/matrix.js +21 -0
- package/dist/tokens/matrix.js.map +1 -0
- package/dist/tokens/theme-check.d.ts +42 -0
- package/dist/tokens/theme-check.d.ts.map +1 -0
- package/dist/tokens/theme-check.js +10 -0
- package/dist/tokens/theme-check.js.map +1 -0
- package/dist/tokens/theme.d.ts +94 -0
- package/dist/tokens/theme.d.ts.map +1 -0
- package/dist/tokens/theme.js +14 -0
- package/dist/tokens/theme.js.map +1 -0
- package/dist/tokens/tokens.d.ts +122 -0
- package/dist/tokens/tokens.d.ts.map +1 -0
- package/dist/tokens/tokens.js +158 -0
- package/dist/tokens/tokens.js.map +1 -0
- package/dist/vocabulary/classes.d.ts +3 -0
- package/dist/vocabulary/classes.d.ts.map +1 -0
- package/dist/vocabulary/classes.js +1320 -0
- package/dist/vocabulary/classes.js.map +1 -0
- package/dist/vocabulary/elements.d.ts +3 -0
- package/dist/vocabulary/elements.d.ts.map +1 -0
- package/dist/vocabulary/elements.js +410 -0
- package/dist/vocabulary/elements.js.map +1 -0
- package/dist/vocabulary/types.d.ts +175 -0
- package/dist/vocabulary/types.d.ts.map +1 -0
- package/dist/vocabulary/types.js +11 -0
- package/dist/vocabulary/types.js.map +1 -0
- package/dist/wasi-host.d.ts +24 -0
- package/dist/wasi-host.d.ts.map +1 -0
- package/dist/wasi-host.js +140 -0
- package/dist/wasi-host.js.map +1 -0
- package/live-templates.xml +62 -0
- package/manifest/files.json +373 -0
- package/manifest/manifest.json +4965 -0
- package/manifest/manifest.schema.json +513 -0
- package/package.json +398 -5
- package/src/cli.ts +21 -0
- package/src/components/css/accordion/accordion.css +102 -0
- package/src/components/css/accordion/accordion.ts +50 -0
- package/src/components/css/alert/alert.css +53 -0
- package/src/components/css/alert/alert.ts +48 -0
- package/src/components/css/avatar/avatar.css +96 -0
- package/src/components/css/avatar/avatar.ts +57 -0
- package/src/components/css/badge/badge.css +42 -0
- package/src/components/css/badge/badge.ts +43 -0
- package/src/components/css/breadcrumbs/breadcrumbs.css +62 -0
- package/src/components/css/breadcrumbs/breadcrumbs.ts +30 -0
- package/src/components/css/button/button.css +128 -0
- package/src/components/css/button/button.ts +44 -0
- package/src/components/css/card/card.css +65 -0
- package/src/components/css/card/card.ts +50 -0
- package/src/components/css/checkbox/checkbox.css +114 -0
- package/src/components/css/checkbox/checkbox.ts +50 -0
- package/src/components/css/divider/divider.css +38 -0
- package/src/components/css/divider/divider.ts +42 -0
- package/src/components/css/error-text/error-text.css +21 -0
- package/src/components/css/error-text/error-text.ts +37 -0
- package/src/components/css/fieldset/fieldset.css +72 -0
- package/src/components/css/fieldset/fieldset.ts +87 -0
- package/src/components/css/file-upload/file-upload.css +102 -0
- package/src/components/css/file-upload/file-upload.ts +65 -0
- package/src/components/css/heading/heading.css +33 -0
- package/src/components/css/heading/heading.ts +42 -0
- package/src/components/css/help-text/help-text.css +24 -0
- package/src/components/css/help-text/help-text.ts +42 -0
- package/src/components/css/icon/icon.css +20 -0
- package/src/components/css/icon/icon.ts +44 -0
- package/src/components/css/input/input.css +145 -0
- package/src/components/css/input/input.ts +77 -0
- package/src/components/css/label/label.css +42 -0
- package/src/components/css/label/label.ts +51 -0
- package/src/components/css/link/link.css +38 -0
- package/src/components/css/link/link.ts +38 -0
- package/src/components/css/list/list.css +53 -0
- package/src/components/css/list/list.ts +44 -0
- package/src/components/css/pagination/pagination.css +95 -0
- package/src/components/css/pagination/pagination.ts +33 -0
- package/src/components/css/paragraph/paragraph.css +31 -0
- package/src/components/css/paragraph/paragraph.ts +53 -0
- package/src/components/css/progress/progress.css +161 -0
- package/src/components/css/progress/progress.ts +78 -0
- package/src/components/css/radio/radio.css +94 -0
- package/src/components/css/radio/radio.ts +50 -0
- package/src/components/css/search/search.css +50 -0
- package/src/components/css/search/search.ts +56 -0
- package/src/components/css/select/select.css +321 -0
- package/src/components/css/select/select.ts +63 -0
- package/src/components/css/shared.ts +199 -0
- package/src/components/css/skeleton/skeleton.css +62 -0
- package/src/components/css/skeleton/skeleton.ts +43 -0
- package/src/components/css/skip-link/skip-link.css +41 -0
- package/src/components/css/skip-link/skip-link.ts +22 -0
- package/src/components/css/spinner/spinner.css +48 -0
- package/src/components/css/spinner/spinner.ts +48 -0
- package/src/components/css/sr-only/sr-only.css +16 -0
- package/src/components/css/sr-only/sr-only.ts +21 -0
- package/src/components/css/switch/switch.css +105 -0
- package/src/components/css/switch/switch.ts +50 -0
- package/src/components/css/table/table.css +159 -0
- package/src/components/css/table/table.ts +107 -0
- package/src/components/css/tag/tag.css +58 -0
- package/src/components/css/tag/tag.ts +49 -0
- package/src/components/css/textarea/textarea.css +83 -0
- package/src/components/css/textarea/textarea.ts +40 -0
- package/src/components/css/toggle-group/toggle-group.css +92 -0
- package/src/components/css/toggle-group/toggle-group.ts +37 -0
- package/src/components/css/tooltip/tooltip.css +89 -0
- package/src/components/css/tooltip/tooltip.ts +37 -0
- package/src/components/default-texts.ts +34 -0
- package/src/components/events.ts +68 -0
- package/src/components/frame/dialog/dialog.css +306 -0
- package/src/components/frame/dialog/dialog.ts +166 -0
- package/src/components/frame/dialog/lt-dialog.ts +510 -0
- package/src/components/frame/error-summary/error-summary.css +47 -0
- package/src/components/frame/error-summary/error-summary.ts +56 -0
- package/src/components/frame/error-summary/lt-error-summary.ts +344 -0
- package/src/components/frame/field/field-core.ts +152 -0
- package/src/components/frame/field/field.css +17 -0
- package/src/components/frame/field/lt-field.ts +753 -0
- package/src/components/frame/popover/lt-popover.ts +555 -0
- package/src/components/frame/popover/popover.css +50 -0
- package/src/components/frame/popover/popover.ts +102 -0
- package/src/components/frame/session-timeout/lt-session-timeout.ts +681 -0
- package/src/components/frame/session-timeout/session-timeout.css +50 -0
- package/src/components/frame/session-timeout/session-timeout.ts +156 -0
- package/src/components/frame/suggestion/lt-suggestion.ts +1358 -0
- package/src/components/frame/suggestion/suggestion.css +132 -0
- package/src/components/frame/suggestion/suggestion.ts +172 -0
- package/src/components/frame/tabs/lt-tabs.ts +1319 -0
- package/src/components/frame/tabs/tabs.css +128 -0
- package/src/components/frame/tabs/tabs.ts +188 -0
- package/src/components/host-element.ts +400 -0
- package/src/components/standalone/connection-status/connection-status.css +41 -0
- package/src/components/standalone/connection-status/connection-status.ts +41 -0
- package/src/components/standalone/connection-status/lt-connection-status.ts +242 -0
- package/src/components/standalone/toast/lt-toast.ts +300 -0
- package/src/components/standalone/toast/toast.css +78 -0
- package/src/components/standalone/toast/toast.ts +70 -0
- package/src/diagnostics/core.ts +210 -0
- package/src/diagnostics/default-core.ts +81 -0
- package/src/diagnostics/index.ts +150 -0
- package/src/dom.ts +185 -0
- package/src/index.ts +218 -0
- package/src/jsx/react.ts +212 -0
- package/src/lt.ts +192 -0
- package/src/react.ts +411 -0
- package/src/register.ts +43 -0
- package/src/tailwind/tailwind.css +169 -0
- package/src/tokens/boundary.css +104 -0
- package/src/tokens/color-contract.json +231 -0
- package/src/tokens/color.ts +150 -0
- package/src/tokens/contract.ts +24 -0
- package/src/tokens/matrix-cells.ts +375 -0
- package/src/tokens/matrix.ts +32 -0
- package/src/tokens/theme-check.ts +51 -0
- package/src/tokens/theme.ts +104 -0
- package/src/tokens/tokens.css +569 -0
- package/src/tokens/tokens.ts +223 -0
- package/src/vocabulary/classes.ts +1322 -0
- package/src/vocabulary/elements.ts +412 -0
- package/src/vocabulary/types.ts +178 -0
- package/src/wasi-host.ts +155 -0
- package/web-types.json +800 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shape of the vocabulary: the elements and classes LO-TEK has.
|
|
3
|
+
*
|
|
4
|
+
* `elements.ts` and `classes.ts` next to this file are generated by
|
|
5
|
+
* `scripts/generate-vocabulary.ts`, and are the source the manifest is
|
|
6
|
+
* written from (`scripts/generate-manifest.ts`). The core and all the tools
|
|
7
|
+
* read the manifest, not these files, so they are not part of the package's
|
|
8
|
+
* API.
|
|
9
|
+
*/
|
|
10
|
+
export type Attribute = ({
|
|
11
|
+
type: "flag" | "text" | "number";
|
|
12
|
+
} | {
|
|
13
|
+
type: "values";
|
|
14
|
+
values: readonly string[];
|
|
15
|
+
}) & {
|
|
16
|
+
description?: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* A part of an element, such as the control in `<lt-field>`. `selector` is
|
|
20
|
+
* the one the component finds the part with, relative to the element.
|
|
21
|
+
* `content` is what the part takes: `text` is text and phrasing without
|
|
22
|
+
* interactive elements, `free` free content, `parts` only the other parts,
|
|
23
|
+
* and `none` no text: the part is a control, such as a `<select>` with its
|
|
24
|
+
* `<option>` elements, or an element the component fills. Without `multiple`
|
|
25
|
+
* the first one applies, and with `unique` another part of the same kind is
|
|
26
|
+
* an error, not ordinary content. Without `optional` the element needs the
|
|
27
|
+
* part.
|
|
28
|
+
*/
|
|
29
|
+
export type Part = {
|
|
30
|
+
selector: string;
|
|
31
|
+
description: string;
|
|
32
|
+
content: "text" | "free" | "parts" | "none";
|
|
33
|
+
multiple?: true;
|
|
34
|
+
/** Another part of the same kind is an error, not ordinary content. */
|
|
35
|
+
unique?: true;
|
|
36
|
+
optional?: true;
|
|
37
|
+
/** The part must have an id from the server; the component never writes one. */
|
|
38
|
+
stableId?: true;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* An event an element dispatches, such as `dialog-toggle`. `detail` is the
|
|
42
|
+
* fields in `event.detail` with their types, and is absent when the event
|
|
43
|
+
* has none.
|
|
44
|
+
*/
|
|
45
|
+
export type ElementEvent = {
|
|
46
|
+
detail?: Record<string, "boolean" | "string" | "number">;
|
|
47
|
+
};
|
|
48
|
+
export type Element = {
|
|
49
|
+
link: string;
|
|
50
|
+
description?: string;
|
|
51
|
+
attributes: Record<string, Attribute>;
|
|
52
|
+
/** Empty for the elements that create all of their content themselves. */
|
|
53
|
+
parts?: Record<string, Part>;
|
|
54
|
+
events?: Record<string, ElementEvent>;
|
|
55
|
+
/** Attributes that have been removed, with what applies instead. */
|
|
56
|
+
removed?: Record<string, string>;
|
|
57
|
+
};
|
|
58
|
+
/** The content of `elements.ts`: tag to element. */
|
|
59
|
+
export type Elements = Record<string, Element>;
|
|
60
|
+
/**
|
|
61
|
+
* An attribute a class takes, such as `data-variant` on `lt-button`.
|
|
62
|
+
*
|
|
63
|
+
* `flag` is an attribute that works by being present, such as
|
|
64
|
+
* `data-interactive` on `lt-card`. The stylesheet only asks whether it
|
|
65
|
+
* exists, so it has no values.
|
|
66
|
+
*/
|
|
67
|
+
export type ClassAttribute = {
|
|
68
|
+
values: readonly string[];
|
|
69
|
+
default?: string;
|
|
70
|
+
flag?: true;
|
|
71
|
+
};
|
|
72
|
+
export type ClassInfo = {
|
|
73
|
+
/** The path of the component page, such as `button`. */
|
|
74
|
+
component: string;
|
|
75
|
+
title: string;
|
|
76
|
+
description: string;
|
|
77
|
+
link: string;
|
|
78
|
+
/** What the element with the class takes as content, in the same words as the parts. */
|
|
79
|
+
content: Part["content"];
|
|
80
|
+
/**
|
|
81
|
+
* The class this one is part of, when it is only part of another
|
|
82
|
+
* component's markup, such as `lt-card__title` in `lt-card`. The parent has
|
|
83
|
+
* a part that matches it.
|
|
84
|
+
*/
|
|
85
|
+
partOf?: string;
|
|
86
|
+
/** The parts the markup consists of, for the classes with a fixed structure. */
|
|
87
|
+
parts?: Record<string, Part>;
|
|
88
|
+
attributes: Record<string, ClassAttribute>;
|
|
89
|
+
};
|
|
90
|
+
/** The content of `classes.ts`: class name to class. */
|
|
91
|
+
export type Classes = Record<string, ClassInfo>;
|
|
92
|
+
/**
|
|
93
|
+
* The tokens in the manifest: what a stylesheet outside the package can
|
|
94
|
+
* build on. The colours are listed as axes with what they are for, not as
|
|
95
|
+
* values, since a theme can have values other than LO-TEK's defaults.
|
|
96
|
+
* `components` is the component variables per component, with the fallback
|
|
97
|
+
* in the stylesheet as the value.
|
|
98
|
+
*/
|
|
99
|
+
export type ManifestTokens = {
|
|
100
|
+
/** The spacing scale, name to value. */
|
|
101
|
+
spacing: Record<string, string>;
|
|
102
|
+
breakpoints: Record<string, string>;
|
|
103
|
+
containers: Record<string, string>;
|
|
104
|
+
colors: {
|
|
105
|
+
/** The families, with what each is for. */
|
|
106
|
+
families: Record<string, string>;
|
|
107
|
+
/** The roles as they are written in CSS, with what each is for. */
|
|
108
|
+
roles: Record<string, string>;
|
|
109
|
+
/** The layers only the neutral family has. */
|
|
110
|
+
layers: Record<string, string>;
|
|
111
|
+
/** Every `--lt-color-*` name the package ships. */
|
|
112
|
+
tokens: readonly string[];
|
|
113
|
+
};
|
|
114
|
+
/** Component to variable name to default value. */
|
|
115
|
+
components: Record<string, Record<string, string>>;
|
|
116
|
+
};
|
|
117
|
+
/** What an option of a builder function takes. */
|
|
118
|
+
export type BuilderOptionType = {
|
|
119
|
+
kind: "values";
|
|
120
|
+
values: readonly string[];
|
|
121
|
+
} | {
|
|
122
|
+
kind: "flag" | "text" | "number" | "textList";
|
|
123
|
+
};
|
|
124
|
+
/** The shape of what a builder function returns. */
|
|
125
|
+
export type BuilderReturns = {
|
|
126
|
+
optional?: boolean;
|
|
127
|
+
} & ({
|
|
128
|
+
kind: "attributes" | "text";
|
|
129
|
+
} | {
|
|
130
|
+
kind: "values";
|
|
131
|
+
values: readonly string[];
|
|
132
|
+
} | {
|
|
133
|
+
kind: "list";
|
|
134
|
+
of: BuilderReturns;
|
|
135
|
+
} | {
|
|
136
|
+
kind: "group";
|
|
137
|
+
fields: Record<string, BuilderReturns>;
|
|
138
|
+
});
|
|
139
|
+
/**
|
|
140
|
+
* A builder function in `lt`, such as `button`, with its options and the
|
|
141
|
+
* shape of its result. `table`, which the generator behind the Kotlin
|
|
142
|
+
* version uses, is left out here.
|
|
143
|
+
*/
|
|
144
|
+
export type Builder = {
|
|
145
|
+
name: string;
|
|
146
|
+
options: {
|
|
147
|
+
name: string;
|
|
148
|
+
required: boolean;
|
|
149
|
+
type: BuilderOptionType;
|
|
150
|
+
description?: string;
|
|
151
|
+
}[];
|
|
152
|
+
returns: BuilderReturns;
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* The shape of `manifest.json`, as `manifest.schema.json` describes it. The
|
|
156
|
+
* elements are the same as in `elements.ts`. A class attribute in the
|
|
157
|
+
* manifest is either a list of values or a flag, and a flag has no values,
|
|
158
|
+
* unlike `classes.ts`, where the flag has an empty list.
|
|
159
|
+
*/
|
|
160
|
+
export type Manifest = {
|
|
161
|
+
schemaVersion: number;
|
|
162
|
+
version: string;
|
|
163
|
+
elements: Elements;
|
|
164
|
+
tokens: ManifestTokens;
|
|
165
|
+
builders: Builder[];
|
|
166
|
+
classes: Record<string, Omit<ClassInfo, "attributes"> & {
|
|
167
|
+
attributes: Record<string, {
|
|
168
|
+
values?: readonly string[];
|
|
169
|
+
default?: string;
|
|
170
|
+
flag?: true;
|
|
171
|
+
description?: string;
|
|
172
|
+
}>;
|
|
173
|
+
}>;
|
|
174
|
+
};
|
|
175
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version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,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,QAAQ,CAAA;IAClB,MAAM,EAAE,cAAc,CAAA;IACtB,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,OAAO,EAAE,MAAM,CACb,MAAM,EACN,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG;QAC9B,UAAU,EAAE,MAAM,CAChB,MAAM,EACN;YACE,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;YAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;YAChB,IAAI,CAAC,EAAE,IAAI,CAAA;YACX,WAAW,CAAC,EAAE,MAAM,CAAA;SACrB,CACF,CAAA;KACF,CACF,CAAA;CACF,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shape of the vocabulary: the elements and classes LO-TEK has.
|
|
3
|
+
*
|
|
4
|
+
* `elements.ts` and `classes.ts` next to this file are generated by
|
|
5
|
+
* `scripts/generate-vocabulary.ts`, and are the source the manifest is
|
|
6
|
+
* written from (`scripts/generate-manifest.ts`). The core and all the tools
|
|
7
|
+
* read the manifest, not these files, so they are not part of the package's
|
|
8
|
+
* API.
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/vocabulary/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The host for the command line in Node: runs the WASI module `lotek.wasm`
|
|
3
|
+
* with Node's own `node:wasi`. Used by `cli.ts`, and by the VS Code
|
|
4
|
+
* extension, which starts the language server, `lotek lsp`, this way.
|
|
5
|
+
*
|
|
6
|
+
* The commands are written once, in Rust (`cli/`). The same code is the
|
|
7
|
+
* executable from `cargo install` and what `java -jar` runs, so the answers
|
|
8
|
+
* are the same everywhere. The host does only what WASI cannot:
|
|
9
|
+
*
|
|
10
|
+
* - opens the folders the module reads and writes in, the working directory
|
|
11
|
+
* and the rest of the file system, so both relative and absolute paths work;
|
|
12
|
+
* - fetches the addresses `lotek check` gets, since WASI has no network, and
|
|
13
|
+
* gives the page to the module as a file (see `cli/src/fetch.rs`);
|
|
14
|
+
* - says when standard input is a terminal, which WASI cannot see.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Runs one command, like `["check", "form.html"]`, and gives the exit code.
|
|
18
|
+
* `module` is the path to `lotek.wasm`, and `packageDir` the folder with the
|
|
19
|
+
* package's files: the manifest, the colour contract, the rulebooks and the
|
|
20
|
+
* components. The command line carries none of them, and gets the folder as
|
|
21
|
+
* `LOTEK_PACKAGE`.
|
|
22
|
+
*/
|
|
23
|
+
export declare function runCommandLine(module: string | URL, args: string[], packageDir: string | URL): Promise<number>;
|
|
24
|
+
//# sourceMappingURL=wasi-host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wasi-host.d.ts","sourceRoot":"","sources":["../src/wasi-host.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;GAcG;AAoCH;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,MAAM,GAAG,GAAG,EACpB,IAAI,EAAE,MAAM,EAAE,EACd,UAAU,EAAE,MAAM,GAAG,GAAG,GACvB,OAAO,CAAC,MAAM,CAAC,CA4FjB"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/**
|
|
3
|
+
* The host for the command line in Node: runs the WASI module `lotek.wasm`
|
|
4
|
+
* with Node's own `node:wasi`. Used by `cli.ts`, and by the VS Code
|
|
5
|
+
* extension, which starts the language server, `lotek lsp`, this way.
|
|
6
|
+
*
|
|
7
|
+
* The commands are written once, in Rust (`cli/`). The same code is the
|
|
8
|
+
* executable from `cargo install` and what `java -jar` runs, so the answers
|
|
9
|
+
* are the same everywhere. The host does only what WASI cannot:
|
|
10
|
+
*
|
|
11
|
+
* - opens the folders the module reads and writes in, the working directory
|
|
12
|
+
* and the rest of the file system, so both relative and absolute paths work;
|
|
13
|
+
* - fetches the addresses `lotek check` gets, since WASI has no network, and
|
|
14
|
+
* gives the page to the module as a file (see `cli/src/fetch.rs`);
|
|
15
|
+
* - says when standard input is a terminal, which WASI cannot see.
|
|
16
|
+
*/
|
|
17
|
+
import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync, } from "node:fs";
|
|
18
|
+
import { tmpdir } from "node:os";
|
|
19
|
+
import { join } from "node:path";
|
|
20
|
+
import { isatty } from "node:tty";
|
|
21
|
+
import { fileURLToPath } from "node:url";
|
|
22
|
+
const windows = process.platform === "win32";
|
|
23
|
+
/**
|
|
24
|
+
* A path as the WASI module sees it.
|
|
25
|
+
*
|
|
26
|
+
* On Windows every drive is opened as its own folder, `C:\` as `/c`, and
|
|
27
|
+
* the backslashes become slashes. Elsewhere the path is the same.
|
|
28
|
+
*/
|
|
29
|
+
function forWasi(path) {
|
|
30
|
+
if (!windows)
|
|
31
|
+
return path;
|
|
32
|
+
const absolute = /^([A-Za-z]):[\\/](.*)$/.exec(path);
|
|
33
|
+
if (absolute)
|
|
34
|
+
return `/${absolute[1].toLowerCase()}/${absolute[2].replace(/\\/g, "/")}`;
|
|
35
|
+
return path.replace(/\\/g, "/");
|
|
36
|
+
}
|
|
37
|
+
/** An argument for the WASI module: the path in a file or in a `--flag=value`. */
|
|
38
|
+
function toModule(part) {
|
|
39
|
+
const flag = /^(--[^=]+=)(.*)$/s.exec(part);
|
|
40
|
+
return flag ? flag[1] + forWasi(flag[2]) : forWasi(part);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Runs one command, like `["check", "form.html"]`, and gives the exit code.
|
|
44
|
+
* `module` is the path to `lotek.wasm`, and `packageDir` the folder with the
|
|
45
|
+
* package's files: the manifest, the colour contract, the rulebooks and the
|
|
46
|
+
* components. The command line carries none of them, and gets the folder as
|
|
47
|
+
* `LOTEK_PACKAGE`.
|
|
48
|
+
*/
|
|
49
|
+
export async function runCommandLine(module, args, packageDir) {
|
|
50
|
+
/*
|
|
51
|
+
* The whole file system is opened, and the module is told where the working
|
|
52
|
+
* directory is and goes there itself. A WASI module otherwise starts in `/`,
|
|
53
|
+
* and a relative path was read from the root.
|
|
54
|
+
*/
|
|
55
|
+
const preopens = {};
|
|
56
|
+
if (windows) {
|
|
57
|
+
// Only the drives that exist. A folder that cannot be opened stops
|
|
58
|
+
// `node:wasi` before the module starts, and most machines have only C:.
|
|
59
|
+
for (const letter of "abcdefghijklmnopqrstuvwxyz") {
|
|
60
|
+
const drive = `${letter.toUpperCase()}:\\`;
|
|
61
|
+
if (existsSync(drive))
|
|
62
|
+
preopens[`/${letter}`] = drive;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
else
|
|
66
|
+
preopens["/"] = "/";
|
|
67
|
+
/*
|
|
68
|
+
* The addresses are fetched here and given to the module as files.
|
|
69
|
+
*
|
|
70
|
+
* The file has the address, the status code (0 when nobody answered), the
|
|
71
|
+
* content type or the reason, and the page, in that order. The module
|
|
72
|
+
* judges the answer: whether it is a page and whether the status code is
|
|
73
|
+
* fine.
|
|
74
|
+
*/
|
|
75
|
+
let fetchedDir;
|
|
76
|
+
const warn = process.emitWarning;
|
|
77
|
+
try {
|
|
78
|
+
const address = /^https?:\/\//i;
|
|
79
|
+
const moduleArgs = [];
|
|
80
|
+
for (const [index, part] of args.entries()) {
|
|
81
|
+
if (args[0] !== "check" || index === 0 || !address.test(part)) {
|
|
82
|
+
moduleArgs.push(toModule(part));
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
fetchedDir ??= mkdtempSync(join(tmpdir(), "lotek-"));
|
|
86
|
+
let answer;
|
|
87
|
+
try {
|
|
88
|
+
// As in the executable: a server that never answers must not hang a
|
|
89
|
+
// CI job until it is killed.
|
|
90
|
+
const response = await fetch(part, {
|
|
91
|
+
signal: AbortSignal.timeout(30_000),
|
|
92
|
+
});
|
|
93
|
+
const type = response.headers.get("content-type") ?? "";
|
|
94
|
+
answer = `${part}\n${response.status}\n${type}\n${await response.text()}`;
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
98
|
+
answer = `${part}\n0\n${reason.replace(/\n/g, " ")}\n`;
|
|
99
|
+
}
|
|
100
|
+
const file = join(fetchedDir, `${index}.txt`);
|
|
101
|
+
writeFileSync(file, answer);
|
|
102
|
+
moduleArgs.push(`--fetched=${forWasi(file)}`);
|
|
103
|
+
}
|
|
104
|
+
// `node:wasi` is marked experimental, and says so in the console. That is
|
|
105
|
+
// nothing the user of the command line can do anything about.
|
|
106
|
+
process.emitWarning = ((warning, ...rest) => {
|
|
107
|
+
if (String(warning).includes("WASI"))
|
|
108
|
+
return;
|
|
109
|
+
warn.call(process, warning, ...rest);
|
|
110
|
+
});
|
|
111
|
+
const { WASI } = await import("node:wasi");
|
|
112
|
+
const wasi = new WASI({
|
|
113
|
+
version: "preview1",
|
|
114
|
+
args: ["lotek", ...moduleArgs],
|
|
115
|
+
env: {
|
|
116
|
+
LOTEK_WORKDIR: forWasi(process.cwd()),
|
|
117
|
+
LOTEK_PACKAGE: forWasi(packageDir instanceof URL ? fileURLToPath(packageDir) : packageDir),
|
|
118
|
+
// So the messages show the paths as `C:\\…`, not as `/c/…`.
|
|
119
|
+
...(windows ? { LOTEK_WINDOWS: "1" } : {}),
|
|
120
|
+
// `isatty(0)`, not `process.stdin.isTTY`: touching `process.stdin`
|
|
121
|
+
// puts a pipe in non-blocking mode, and the module then gave up
|
|
122
|
+
// reading before the writer was done, as in `curl … | lotek check`.
|
|
123
|
+
...(isatty(0) ? { LOTEK_TERMINAL: "1" } : {}),
|
|
124
|
+
},
|
|
125
|
+
preopens,
|
|
126
|
+
returnOnExit: true,
|
|
127
|
+
});
|
|
128
|
+
const compiled = await WebAssembly.compile(readFileSync(module));
|
|
129
|
+
const instance = await WebAssembly.instantiate(compiled, wasi.getImportObject());
|
|
130
|
+
return wasi.start(instance);
|
|
131
|
+
}
|
|
132
|
+
finally {
|
|
133
|
+
// Also when the module crashes: the fetched pages must not be left
|
|
134
|
+
// behind, and the warnings come back for the rest of the process.
|
|
135
|
+
process.emitWarning = warn;
|
|
136
|
+
if (fetchedDir)
|
|
137
|
+
rmSync(fetchedDir, { recursive: true, force: true });
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=wasi-host.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wasi-host.js","sourceRoot":"","sources":["../src/wasi-host.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,UAAU,EACV,WAAW,EACX,YAAY,EACZ,MAAM,EACN,aAAa,GACd,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,MAAM,OAAO,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAA;AAE5C;;;;;GAKG;AACH,SAAS,OAAO,CAAC,IAAY;IAC3B,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAA;IACzB,MAAM,QAAQ,GAAG,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACpD,IAAI,QAAQ;QACV,OAAO,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAA;IAC3E,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;AACjC,CAAC;AAED,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C,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;IACtE,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<!-- Generated by interfaces/scripts/generate-vocabulary.ts. Do not edit. -->
|
|
2
|
+
<templateSet group="LO-TEK">
|
|
3
|
+
<template name="lt-field" value="<!-- novalidate: otherwise the browser stops an empty required field before the submit event, and the error text below is never shown. --> <form id="$contact_form$" novalidate> <lt-field> <label class="lt-label" for="$name$" data-required="symbol">Full name</label> <input class="lt-input" id="$name$" type="text" name="name" required /> <p class="lt-error-text" hidden>Enter your name.</p> </lt-field> <button class="lt-button" type="submit">Send</button> </form>" 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." toReformat="false" toShortenFQNames="false">
|
|
4
|
+
<variable name="contact_form" expression="" defaultValue=""contact-form"" alwaysStopAt="true" />
|
|
5
|
+
<variable name="name" expression="" defaultValue=""name"" alwaysStopAt="true" />
|
|
6
|
+
<context>
|
|
7
|
+
<option name="HTML" value="true" />
|
|
8
|
+
</context>
|
|
9
|
+
</template>
|
|
10
|
+
<template name="lt-tabs" value="<!-- The links point to the panels. The component writes the roles, the selection and `hidden`. Without JavaScript this is a table of contents. --> <lt-tabs id="$case_tabs$"> <ul class="lt-tabs__list" aria-label="Parts of the case"> <li><a href="#$application$">Application</a></li> <li><a href="#$attachments$">Attachments</a></li> </ul> <section class="lt-tabs__panel" id="$application$"> <h2>Application</h2> <p>The application was sent on 4 March 2026.</p> </section> <section class="lt-tabs__panel" id="$attachments$"> <h2>Attachments</h2> <p>Three attachments have been uploaded.</p> </section> </lt-tabs>" description="Tab list. The tabs are links to the panels in an `.lt-tabs__list`, so without JavaScript the list is a table of contents; `role="tab"` on anything other than a link is not a tab. The component adds keyboard and focus handling, sets roles and wiring, gives each panel its tab's name, makes only the selected panel a tab stop, and hides the rest with `hidden="until-found"`, so find in page and links into a panel reach them. Each selection is written to the URL. It never writes an id on a tab or a panel. When the page loads, the selected tab is the one with `aria-selected` from the server, otherwise the one the URL points to, otherwise the first one not hidden with `hidden`. Under `server-controlled` the URL never selects." toReformat="false" toShortenFQNames="false">
|
|
11
|
+
<variable name="case_tabs" expression="" defaultValue=""case-tabs"" alwaysStopAt="true" />
|
|
12
|
+
<variable name="application" expression="" defaultValue=""application"" alwaysStopAt="true" />
|
|
13
|
+
<variable name="attachments" expression="" defaultValue=""attachments"" alwaysStopAt="true" />
|
|
14
|
+
<context>
|
|
15
|
+
<option name="HTML" value="true" />
|
|
16
|
+
</context>
|
|
17
|
+
</template>
|
|
18
|
+
<template name="lt-error-summary" value="<form novalidate> <!-- The component sets the class, role="alert" and tabindex="-1". --> <lt-error-summary id="$errors$" hidden> <h2></h2> <ul class="lt-list"></ul> </lt-error-summary> <label class="lt-label" for="$email$">Email address</label> <input class="lt-input" id="$email$" type="email" /> <button class="lt-button">Send application</button> </form>" description="Error summary. Moves focus to the box when it appears, and to the control when a link in the list is followed." toReformat="false" toShortenFQNames="false">
|
|
19
|
+
<variable name="errors" expression="" defaultValue=""errors"" alwaysStopAt="true" />
|
|
20
|
+
<variable name="email" expression="" defaultValue=""email"" alwaysStopAt="true" />
|
|
21
|
+
<context>
|
|
22
|
+
<option name="HTML" value="true" />
|
|
23
|
+
</context>
|
|
24
|
+
</template>
|
|
25
|
+
<template name="lt-popover" value="<!-- The component sets `popover` and `aria-controls`. You write the id on the panel: that is what the button points to. --> <lt-popover id="$menu$" placement="bottom-end"> <button class="lt-button" data-variant="secondary" type="button">Actions</button> <ul class="lt-popover" id="$actions$"> <li><button class="lt-button" data-variant="ghost" type="button">Archive the case</button></li> <li><button class="lt-button" data-variant="ghost" type="button">Download as PDF</button></li> </ul> </lt-popover>" description="A panel that hangs from a button and closes itself. A button and a panel with the class `lt-popover` and an id from the template; the component sets `popover` and `aria-controls` where the markup came without them, but never the id." toReformat="false" toShortenFQNames="false">
|
|
26
|
+
<variable name="menu" expression="" defaultValue=""menu"" alwaysStopAt="true" />
|
|
27
|
+
<variable name="actions" expression="" defaultValue=""actions"" alwaysStopAt="true" />
|
|
28
|
+
<context>
|
|
29
|
+
<option name="HTML" value="true" />
|
|
30
|
+
</context>
|
|
31
|
+
</template>
|
|
32
|
+
<template name="lt-suggestion" value="<!-- You write for and id, so the field has a name without JavaScript. The component sets the roles and the wiring to the list. You write the status element: that is where the number of matches is announced. --> <lt-suggestion id="$airport_search$"> <label class="lt-label" for="$airport$">Airport</label> <input class="lt-input" id="$airport$" name="airport" type="text"> <ul class="lt-suggestion__list"> <li>Bergen</li> <li>Malmö</li> </ul> <p class="lt-suggestion__empty">No matches</p> <span class="lt-sr-only" role="status"></span> </lt-suggestion>" 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." toReformat="false" toShortenFQNames="false">
|
|
33
|
+
<variable name="airport_search" expression="" defaultValue=""airport-search"" alwaysStopAt="true" />
|
|
34
|
+
<variable name="airport" expression="" defaultValue=""airport"" alwaysStopAt="true" />
|
|
35
|
+
<context>
|
|
36
|
+
<option name="HTML" value="true" />
|
|
37
|
+
</context>
|
|
38
|
+
</template>
|
|
39
|
+
<template name="lt-dialog" value="<lt-dialog open> <dialog class="lt-dialog" open> <h2>The decision is registered</h2> <div class="lt-dialog__body"> <p>The case is closed and has been sent to the archive.</p> </div> <form method="dialog" class="lt-dialog__footer"> <button class="lt-button" value="close">Close</button> </form> </dialog> </lt-dialog>" 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." toReformat="false" toShortenFQNames="false">
|
|
40
|
+
<context>
|
|
41
|
+
<option name="HTML" value="true" />
|
|
42
|
+
</context>
|
|
43
|
+
</template>
|
|
44
|
+
<template name="lt-toast" value="<lt-toast id="$messages$" class="lt-toast" role="status" aria-live="polite" aria-atomic="false" aria-label="Messages" data-ignore-morph></lt-toast> <button class="lt-button" id="$save$" type="button">Save application</button>" description="A queue of short messages in the corner of the screen. The messages are created from script with `show(text, { color, duration })`." toReformat="false" toShortenFQNames="false">
|
|
45
|
+
<variable name="messages" expression="" defaultValue=""messages"" alwaysStopAt="true" />
|
|
46
|
+
<variable name="save" expression="" defaultValue=""save"" alwaysStopAt="true" />
|
|
47
|
+
<context>
|
|
48
|
+
<option name="HTML" value="true" />
|
|
49
|
+
</context>
|
|
50
|
+
</template>
|
|
51
|
+
<template name="lt-session-timeout" value="<lt-session-timeout class="lt-session-timeout" warn-at="1500" expires-at="1800" data-ignore-morph> <dialog class="lt-session-timeout__dialog" role="alertdialog" aria-labelledby="$session_title$"> <h2 class="lt-session-timeout__title" id="$session_title$">You will soon be logged out</h2> <p class="lt-session-timeout__text"> We will log you out in <span class="lt-session-timeout__count" aria-hidden="true"></span> to protect your information. </p> <span class="lt-sr-only" role="status"></span> <form method="dialog" class="lt-session-timeout__actions"> <button class="lt-button" value="extend">Stay logged in</button> <button class="lt-button" data-variant="secondary" value="logout">Log out now</button> </form> </dialog> </lt-session-timeout>" 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." toReformat="false" toShortenFQNames="false">
|
|
52
|
+
<variable name="session_title" expression="" defaultValue=""session-title"" alwaysStopAt="true" />
|
|
53
|
+
<context>
|
|
54
|
+
<option name="HTML" value="true" />
|
|
55
|
+
</context>
|
|
56
|
+
</template>
|
|
57
|
+
<template name="lt-connection-status" value="<lt-connection-status class="lt-connection-status" data-ignore-morph></lt-connection-status>" description="Tells the user when the connection to the server is lost. The app reports with `reportFailure()` and `reportSuccess()`." toReformat="false" toShortenFQNames="false">
|
|
58
|
+
<context>
|
|
59
|
+
<option name="HTML" value="true" />
|
|
60
|
+
</context>
|
|
61
|
+
</template>
|
|
62
|
+
</templateSet>
|