@lo-tek/interfaces 0.0.0 → 0.38.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 +3389 -0
- package/LICENSE +21 -0
- package/README.md +129 -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 +41 -0
- package/dist/components/default-texts.d.ts.map +1 -0
- package/dist/components/default-texts.js +41 -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 +434 -0
- package/dist/components/frame/dialog/lt-dialog.js.map +1 -0
- package/dist/components/frame/error-summary/error-summary.d.ts +53 -0
- package/dist/components/frame/error-summary/error-summary.d.ts.map +1 -0
- package/dist/components/frame/error-summary/error-summary.js +54 -0
- package/dist/components/frame/error-summary/error-summary.js.map +1 -0
- package/dist/components/frame/error-summary/lt-error-summary.d.ts +93 -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 +408 -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 +600 -0
- package/dist/components/frame/field/lt-field.js.map +1 -0
- package/dist/components/frame/popover/lt-popover.d.ts +136 -0
- package/dist/components/frame/popover/lt-popover.d.ts.map +1 -0
- package/dist/components/frame/popover/lt-popover.js +520 -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 +610 -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 +367 -0
- package/dist/components/frame/suggestion/lt-suggestion.d.ts.map +1 -0
- package/dist/components/frame/suggestion/lt-suggestion.js +1171 -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 +426 -0
- package/dist/components/frame/tabs/lt-tabs.d.ts.map +1 -0
- package/dist/components/frame/tabs/lt-tabs.js +1265 -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 +184 -0
- package/dist/components/host-element.d.ts.map +1 -0
- package/dist/components/host-element.js +440 -0
- package/dist/components/host-element.js.map +1 -0
- package/dist/components/standalone/connection-status/connection-status.d.ts +32 -0
- package/dist/components/standalone/connection-status/connection-status.d.ts.map +1 -0
- package/dist/components/standalone/connection-status/connection-status.js +26 -0
- package/dist/components/standalone/connection-status/connection-status.js.map +1 -0
- package/dist/components/standalone/connection-status/lt-connection-status.d.ts +86 -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 +240 -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 +171 -0
- package/dist/diagnostics/core.d.ts.map +1 -0
- package/dist/diagnostics/core.js +84 -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 +494 -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 +1354 -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 +490 -0
- package/dist/vocabulary/elements.js.map +1 -0
- package/dist/vocabulary/types.d.ts +229 -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 +63 -0
- package/manifest/files.json +373 -0
- package/manifest/manifest.json +5090 -0
- package/manifest/manifest.schema.json +586 -0
- package/package.json +399 -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 +41 -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 +513 -0
- package/src/components/frame/error-summary/error-summary.css +47 -0
- package/src/components/frame/error-summary/error-summary.ts +90 -0
- package/src/components/frame/error-summary/lt-error-summary.ts +458 -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 +790 -0
- package/src/components/frame/popover/lt-popover.ts +586 -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 +715 -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 +1379 -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 +1395 -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 +493 -0
- package/src/components/standalone/connection-status/connection-status.css +41 -0
- package/src/components/standalone/connection-status/connection-status.ts +47 -0
- package/src/components/standalone/connection-status/lt-connection-status.ts +268 -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 +227 -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 +1356 -0
- package/src/vocabulary/elements.ts +492 -0
- package/src/vocabulary/types.ts +228 -0
- package/src/wasi-host.ts +155 -0
- package/web-types.json +800 -0
|
@@ -0,0 +1,228 @@
|
|
|
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
|
+
|
|
11
|
+
export type Attribute = (
|
|
12
|
+
| { type: "flag" | "text" | "number" }
|
|
13
|
+
| { type: "values"; values: readonly string[] }
|
|
14
|
+
) & { description?: string }
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* A part of an element, such as the control in `<lt-field>`. `selector` is
|
|
18
|
+
* the one the component finds the part with, relative to the element.
|
|
19
|
+
* `content` is what the part takes: `text` is text and phrasing without
|
|
20
|
+
* interactive elements, `free` free content, `parts` only the other parts,
|
|
21
|
+
* and `none` no text: the part is a control, such as a `<select>` with its
|
|
22
|
+
* `<option>` elements, or an element the component fills. Without `multiple`
|
|
23
|
+
* the first one applies, and with `unique` another part of the same kind is
|
|
24
|
+
* an error, not ordinary content. Without `optional` the element needs the
|
|
25
|
+
* part.
|
|
26
|
+
*/
|
|
27
|
+
export type Part = {
|
|
28
|
+
selector: string
|
|
29
|
+
description: string
|
|
30
|
+
content: "text" | "free" | "parts" | "none"
|
|
31
|
+
multiple?: true
|
|
32
|
+
/** Another part of the same kind is an error, not ordinary content. */
|
|
33
|
+
unique?: true
|
|
34
|
+
optional?: true
|
|
35
|
+
/** The part must have an id from the server; the component never writes one. */
|
|
36
|
+
stableId?: true
|
|
37
|
+
/** LO-TEK demands a name for the part. */
|
|
38
|
+
name?: Name
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* A name LO-TEK demands where WAI-ARIA does not, or one the component gives
|
|
43
|
+
* itself. WAI-ARIA's own demands, by role, are in the core, and `lotek check`
|
|
44
|
+
* reports an element the markup gives no name (`without-name`).
|
|
45
|
+
*
|
|
46
|
+
* `after` is the part the component points `aria-labelledby` at when the
|
|
47
|
+
* markup has neither `aria-label` nor `aria-labelledby`, such as the heading
|
|
48
|
+
* of a dialog; then that part's name is enough. With `id` the part must have
|
|
49
|
+
* an id from the template, since the component does not write one. With
|
|
50
|
+
* `component` the component names it itself, after what the other rules
|
|
51
|
+
* check, such as the list in a suggestion field after the label, and no
|
|
52
|
+
* rule judges its name in the markup.
|
|
53
|
+
*
|
|
54
|
+
* Each of them is held to the component by a contract in
|
|
55
|
+
* `interfaces/scripts/accessibility/contracts.ts`: a mutation that takes the name away
|
|
56
|
+
* must fail in the browsers, and `lotek check` must report it.
|
|
57
|
+
*/
|
|
58
|
+
export type Name = { after?: string; id?: true; component?: true }
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* An event an element dispatches, such as `dialog-toggle`. `detail` is the
|
|
62
|
+
* fields in `event.detail` with their types, and is absent when the event
|
|
63
|
+
* has none.
|
|
64
|
+
*/
|
|
65
|
+
export type ElementEvent = {
|
|
66
|
+
detail?: Record<string, "boolean" | "string" | "number">
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export type Element = {
|
|
70
|
+
link: string
|
|
71
|
+
description?: string
|
|
72
|
+
attributes: Record<string, Attribute>
|
|
73
|
+
/** Empty for the elements that create all of their content themselves. */
|
|
74
|
+
parts?: Record<string, Part>
|
|
75
|
+
events?: Record<string, ElementEvent>
|
|
76
|
+
/** LO-TEK demands a name for the element itself. */
|
|
77
|
+
name?: Name
|
|
78
|
+
/** The texts the element writes itself, by their name in `DEFAULT_TEXTS`. */
|
|
79
|
+
texts?: Record<string, DefaultText>
|
|
80
|
+
/** Attributes that have been removed, with what applies instead. */
|
|
81
|
+
removed?: Record<string, string>
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* A text the element writes itself when nobody has given it another, from
|
|
86
|
+
* `DEFAULT_TEXTS`. `replacedBy` is the attributes that replace it; any one
|
|
87
|
+
* of them is enough, and `lotek check` warns when none is there on a page in
|
|
88
|
+
* another language than the text's.
|
|
89
|
+
*/
|
|
90
|
+
export type DefaultText = { text: string; replacedBy: readonly string[] }
|
|
91
|
+
|
|
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.
|
|
96
|
+
*/
|
|
97
|
+
export type CssText = {
|
|
98
|
+
variable: string
|
|
99
|
+
text: string
|
|
100
|
+
attribute: string
|
|
101
|
+
value?: string
|
|
102
|
+
unless?: readonly string[]
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** The content of `elements.ts`: tag to element. */
|
|
106
|
+
export type Elements = Record<string, Element>
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* An attribute a class takes, such as `data-variant` on `lt-button`.
|
|
110
|
+
*
|
|
111
|
+
* `flag` is an attribute that works by being present, such as
|
|
112
|
+
* `data-interactive` on `lt-card`. The stylesheet only asks whether it
|
|
113
|
+
* exists, so it has no values.
|
|
114
|
+
*/
|
|
115
|
+
export type ClassAttribute = {
|
|
116
|
+
values: readonly string[]
|
|
117
|
+
default?: string
|
|
118
|
+
flag?: true
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export type ClassInfo = {
|
|
122
|
+
/** The path of the component page, such as `button`. */
|
|
123
|
+
component: string
|
|
124
|
+
title: string
|
|
125
|
+
description: string
|
|
126
|
+
link: string
|
|
127
|
+
/** What the element with the class takes as content, in the same words as the parts. */
|
|
128
|
+
content: Part["content"]
|
|
129
|
+
/**
|
|
130
|
+
* The class this one is part of, when it is only part of another
|
|
131
|
+
* component's markup, such as `lt-card__title` in `lt-card`. The parent has
|
|
132
|
+
* a part that matches it.
|
|
133
|
+
*/
|
|
134
|
+
partOf?: string
|
|
135
|
+
/** The parts the markup consists of, for the classes with a fixed structure. */
|
|
136
|
+
parts?: Record<string, Part>
|
|
137
|
+
/** LO-TEK demands a name for the element with the class. */
|
|
138
|
+
name?: Name
|
|
139
|
+
/** The texts the stylesheet shows on it. */
|
|
140
|
+
texts?: readonly CssText[]
|
|
141
|
+
attributes: Record<string, ClassAttribute>
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/** The content of `classes.ts`: class name to class. */
|
|
145
|
+
export type Classes = Record<string, ClassInfo>
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* The tokens in the manifest: what a stylesheet outside the package can
|
|
149
|
+
* build on. The colours are listed as axes with what they are for, not as
|
|
150
|
+
* values, since a theme can have values other than LO-TEK's defaults.
|
|
151
|
+
* `components` is the component variables per component, with the fallback
|
|
152
|
+
* in the stylesheet as the value.
|
|
153
|
+
*/
|
|
154
|
+
export type ManifestTokens = {
|
|
155
|
+
/** The spacing scale, name to value. */
|
|
156
|
+
spacing: Record<string, string>
|
|
157
|
+
breakpoints: Record<string, string>
|
|
158
|
+
containers: Record<string, string>
|
|
159
|
+
colors: {
|
|
160
|
+
/** The families, with what each is for. */
|
|
161
|
+
families: Record<string, string>
|
|
162
|
+
/** The roles as they are written in CSS, with what each is for. */
|
|
163
|
+
roles: Record<string, string>
|
|
164
|
+
/** The layers only the neutral family has. */
|
|
165
|
+
layers: Record<string, string>
|
|
166
|
+
/** Every `--lt-color-*` name the package ships. */
|
|
167
|
+
tokens: readonly string[]
|
|
168
|
+
}
|
|
169
|
+
/** Component to variable name to default value. */
|
|
170
|
+
components: Record<string, Record<string, string>>
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/** What an option of a builder function takes. */
|
|
174
|
+
export type BuilderOptionType =
|
|
175
|
+
| { kind: "values"; values: readonly string[] }
|
|
176
|
+
| { kind: "flag" | "text" | "number" | "textList" }
|
|
177
|
+
|
|
178
|
+
/** The shape of what a builder function returns. */
|
|
179
|
+
export type BuilderReturns = { optional?: boolean } & (
|
|
180
|
+
| { kind: "attributes" | "text" }
|
|
181
|
+
| { kind: "values"; values: readonly string[] }
|
|
182
|
+
| { kind: "list"; of: BuilderReturns }
|
|
183
|
+
| { kind: "group"; fields: Record<string, BuilderReturns> }
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* A builder function in `lt`, such as `button`, with its options and the
|
|
188
|
+
* shape of its result. `table`, which the generator behind the Kotlin
|
|
189
|
+
* version uses, is left out here.
|
|
190
|
+
*/
|
|
191
|
+
export type Builder = {
|
|
192
|
+
name: string
|
|
193
|
+
options: {
|
|
194
|
+
name: string
|
|
195
|
+
required: boolean
|
|
196
|
+
type: BuilderOptionType
|
|
197
|
+
description?: string
|
|
198
|
+
}[]
|
|
199
|
+
returns: BuilderReturns
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* The shape of `manifest.json`, as `manifest.schema.json` describes it. The
|
|
204
|
+
* elements are the same as in `elements.ts`. A class attribute in the
|
|
205
|
+
* manifest is either a list of values or a flag, and a flag has no values,
|
|
206
|
+
* unlike `classes.ts`, where the flag has an empty list.
|
|
207
|
+
*/
|
|
208
|
+
export type Manifest = {
|
|
209
|
+
schemaVersion: number
|
|
210
|
+
version: string
|
|
211
|
+
elements: Elements
|
|
212
|
+
tokens: ManifestTokens
|
|
213
|
+
builders: Builder[]
|
|
214
|
+
classes: Record<
|
|
215
|
+
string,
|
|
216
|
+
Omit<ClassInfo, "attributes"> & {
|
|
217
|
+
attributes: Record<
|
|
218
|
+
string,
|
|
219
|
+
{
|
|
220
|
+
values?: readonly string[]
|
|
221
|
+
default?: string
|
|
222
|
+
flag?: true
|
|
223
|
+
description?: string
|
|
224
|
+
}
|
|
225
|
+
>
|
|
226
|
+
}
|
|
227
|
+
>
|
|
228
|
+
}
|
package/src/wasi-host.ts
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
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
|
+
|
|
18
|
+
import {
|
|
19
|
+
existsSync,
|
|
20
|
+
mkdtempSync,
|
|
21
|
+
readFileSync,
|
|
22
|
+
rmSync,
|
|
23
|
+
writeFileSync,
|
|
24
|
+
} from "node:fs"
|
|
25
|
+
import { tmpdir } from "node:os"
|
|
26
|
+
import { join } from "node:path"
|
|
27
|
+
import { isatty } from "node:tty"
|
|
28
|
+
import { fileURLToPath } from "node:url"
|
|
29
|
+
|
|
30
|
+
const windows = process.platform === "win32"
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A path as the WASI module sees it.
|
|
34
|
+
*
|
|
35
|
+
* On Windows every drive is opened as its own folder, `C:\` as `/c`, and
|
|
36
|
+
* the backslashes become slashes. Elsewhere the path is the same.
|
|
37
|
+
*/
|
|
38
|
+
function forWasi(path: string): string {
|
|
39
|
+
if (!windows) return path
|
|
40
|
+
const absolute = /^([A-Za-z]):[\\/](.*)$/.exec(path)
|
|
41
|
+
if (absolute)
|
|
42
|
+
return `/${absolute[1].toLowerCase()}/${absolute[2].replace(/\\/g, "/")}`
|
|
43
|
+
return path.replace(/\\/g, "/")
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** An argument for the WASI module: the path in a file or in a `--flag=value`. */
|
|
47
|
+
function toModule(part: string): string {
|
|
48
|
+
const flag = /^(--[^=]+=)(.*)$/s.exec(part)
|
|
49
|
+
return flag ? flag[1] + forWasi(flag[2]) : forWasi(part)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Runs one command, like `["check", "form.html"]`, and gives the exit code.
|
|
54
|
+
* `module` is the path to `lotek.wasm`, and `packageDir` the folder with the
|
|
55
|
+
* package's files: the manifest, the colour contract, the rulebooks and the
|
|
56
|
+
* components. The command line carries none of them, and gets the folder as
|
|
57
|
+
* `LOTEK_PACKAGE`.
|
|
58
|
+
*/
|
|
59
|
+
export async function runCommandLine(
|
|
60
|
+
module: string | URL,
|
|
61
|
+
args: string[],
|
|
62
|
+
packageDir: string | URL,
|
|
63
|
+
): Promise<number> {
|
|
64
|
+
/*
|
|
65
|
+
* The whole file system is opened, and the module is told where the working
|
|
66
|
+
* directory is and goes there itself. A WASI module otherwise starts in `/`,
|
|
67
|
+
* and a relative path was read from the root.
|
|
68
|
+
*/
|
|
69
|
+
const preopens: Record<string, string> = {}
|
|
70
|
+
if (windows) {
|
|
71
|
+
// Only the drives that exist. A folder that cannot be opened stops
|
|
72
|
+
// `node:wasi` before the module starts, and most machines have only C:.
|
|
73
|
+
for (const letter of "abcdefghijklmnopqrstuvwxyz") {
|
|
74
|
+
const drive = `${letter.toUpperCase()}:\\`
|
|
75
|
+
if (existsSync(drive)) preopens[`/${letter}`] = drive
|
|
76
|
+
}
|
|
77
|
+
} else preopens["/"] = "/"
|
|
78
|
+
|
|
79
|
+
/*
|
|
80
|
+
* The addresses are fetched here and given to the module as files.
|
|
81
|
+
*
|
|
82
|
+
* The file has the address, the status code (0 when nobody answered), the
|
|
83
|
+
* content type or the reason, and the page, in that order. The module
|
|
84
|
+
* judges the answer: whether it is a page and whether the status code is
|
|
85
|
+
* fine.
|
|
86
|
+
*/
|
|
87
|
+
let fetchedDir: string | undefined
|
|
88
|
+
const warn = process.emitWarning
|
|
89
|
+
try {
|
|
90
|
+
const address = /^https?:\/\//i
|
|
91
|
+
const moduleArgs: string[] = []
|
|
92
|
+
for (const [index, part] of args.entries()) {
|
|
93
|
+
if (args[0] !== "check" || index === 0 || !address.test(part)) {
|
|
94
|
+
moduleArgs.push(toModule(part))
|
|
95
|
+
continue
|
|
96
|
+
}
|
|
97
|
+
fetchedDir ??= mkdtempSync(join(tmpdir(), "lotek-"))
|
|
98
|
+
let answer: string
|
|
99
|
+
try {
|
|
100
|
+
// As in the executable: a server that never answers must not hang a
|
|
101
|
+
// CI job until it is killed.
|
|
102
|
+
const response = await fetch(part, {
|
|
103
|
+
signal: AbortSignal.timeout(30_000),
|
|
104
|
+
})
|
|
105
|
+
const type = response.headers.get("content-type") ?? ""
|
|
106
|
+
answer = `${part}\n${response.status}\n${type}\n${await response.text()}`
|
|
107
|
+
} catch (error) {
|
|
108
|
+
const reason = error instanceof Error ? error.message : String(error)
|
|
109
|
+
answer = `${part}\n0\n${reason.replace(/\n/g, " ")}\n`
|
|
110
|
+
}
|
|
111
|
+
const file = join(fetchedDir, `${index}.txt`)
|
|
112
|
+
writeFileSync(file, answer)
|
|
113
|
+
moduleArgs.push(`--fetched=${forWasi(file)}`)
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// `node:wasi` is marked experimental, and says so in the console. That is
|
|
117
|
+
// nothing the user of the command line can do anything about.
|
|
118
|
+
process.emitWarning = ((warning: string | Error, ...rest: unknown[]) => {
|
|
119
|
+
if (String(warning).includes("WASI")) return
|
|
120
|
+
;(warn as (...a: unknown[]) => void).call(process, warning, ...rest)
|
|
121
|
+
}) as typeof process.emitWarning
|
|
122
|
+
|
|
123
|
+
const { WASI } = await import("node:wasi")
|
|
124
|
+
const wasi = new WASI({
|
|
125
|
+
version: "preview1",
|
|
126
|
+
args: ["lotek", ...moduleArgs],
|
|
127
|
+
env: {
|
|
128
|
+
LOTEK_WORKDIR: forWasi(process.cwd()),
|
|
129
|
+
LOTEK_PACKAGE: forWasi(
|
|
130
|
+
packageDir instanceof URL ? fileURLToPath(packageDir) : packageDir,
|
|
131
|
+
),
|
|
132
|
+
// So the messages show the paths as `C:\\…`, not as `/c/…`.
|
|
133
|
+
...(windows ? { LOTEK_WINDOWS: "1" } : {}),
|
|
134
|
+
// `isatty(0)`, not `process.stdin.isTTY`: touching `process.stdin`
|
|
135
|
+
// puts a pipe in non-blocking mode, and the module then gave up
|
|
136
|
+
// reading before the writer was done, as in `curl … | lotek check`.
|
|
137
|
+
...(isatty(0) ? { LOTEK_TERMINAL: "1" } : {}),
|
|
138
|
+
},
|
|
139
|
+
preopens,
|
|
140
|
+
returnOnExit: true,
|
|
141
|
+
})
|
|
142
|
+
|
|
143
|
+
const compiled = await WebAssembly.compile(readFileSync(module))
|
|
144
|
+
const instance = await WebAssembly.instantiate(
|
|
145
|
+
compiled,
|
|
146
|
+
wasi.getImportObject() as WebAssembly.Imports,
|
|
147
|
+
)
|
|
148
|
+
return wasi.start(instance)
|
|
149
|
+
} finally {
|
|
150
|
+
// Also when the module crashes: the fetched pages must not be left
|
|
151
|
+
// behind, and the warnings come back for the rest of the process.
|
|
152
|
+
process.emitWarning = warn
|
|
153
|
+
if (fetchedDir) rmSync(fetchedDir, { recursive: true, force: true })
|
|
154
|
+
}
|
|
155
|
+
}
|