@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 @@
|
|
|
1
|
+
{"version":3,"file":"lt-popover.js","sourceRoot":"","sources":["../../../../src/components/frame/popover/lt-popover.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,OAAO,EACP,OAAO,EACP,eAAe,GAChB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACL,kBAAkB,EAClB,aAAa,GAEd,MAAM,cAAc,CAAA;AAErB,MAAM,CAAC,MAAM,cAAc,GAAG,YAAqB,CAAA;AAEnD;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,OAAO,EAAE,yBAAyB;IAClC,KAAK,EAAE,eAAe,aAAa,EAAE;CAC7B,CAAA;AAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,MAAM,OAAO,SAAU,SAAQ,WAAW;IAA1C;;QAME;;;;;;;;;;;;;;WAcG;QACK,cAAS,GAAG,KAAK,CAAA;QAkUjB,uBAAkB,GAAG,GAAS,EAAE;YACtC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAA;YACzB,IAAI,CAAC,MAAM,EAAE,CAAA;YACb,qEAAqE;YACrE,yEAAyE;YACzE,wEAAwE;YACxE,IAAI,OAAO,IAAI,QAAQ,CAAC,aAAa,KAAK,QAAQ,CAAC,IAAI;gBACrD,IAAI,CAAC,cAAc,EAAE,KAAK,EAAE,CAAA;QAChC,CAAC,CAAA;QA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AAI,EAAE;YAChB,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;SACf,CAAC,CACH,CAAA;IACH,CAAC;IAED;;;;OAIG;IACH,IAAI;QACF,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAA;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,GAAG;YAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,CAAC;IAED,gFAAgF;IAChF,IAAI;QACF,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAA;QACrB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAA;QACjB,IAAI,GAAG;YAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAC3B,CAAC;IAED,uBAAuB;IACvB,MAAM;QACJ,IAAI,IAAI,CAAC,IAAI;YAAE,IAAI,CAAC,IAAI,EAAE,CAAA;;YACrB,IAAI,CAAC,IAAI,EAAE,CAAA;IAClB,CAAC;;AAvfM,4BAAkB,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,iBAAiB,CAAU,AAApD,CAAoD;AA0f/E,MAAM,UAAU,eAAe,CAAC,UAAkB,cAAc;IAC9D,aAAa,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;AACnC,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export declare const POPOVER_CLASS: "lt-popover";
|
|
2
|
+
/** Which edge of the button the panel hangs from. `start` and `end` follow the reading direction. */
|
|
3
|
+
export declare const popoverPlacements: readonly ["bottom-start", "bottom-end", "top-start", "top-end"];
|
|
4
|
+
export type PopoverPlacement = (typeof popoverPlacements)[number];
|
|
5
|
+
export declare function isPopoverPlacement(value: unknown): value is PopoverPlacement;
|
|
6
|
+
export type PopoverOptions = {
|
|
7
|
+
/** Id of the panel. Connects the button to the panel with `aria-controls`. */
|
|
8
|
+
id: string;
|
|
9
|
+
/** The panel is open. Default: closed. */
|
|
10
|
+
open?: boolean;
|
|
11
|
+
/** Which edge the panel hangs from. Default: `bottom-start`. */
|
|
12
|
+
placement?: PopoverPlacement;
|
|
13
|
+
};
|
|
14
|
+
export type PopoverAttributes = {
|
|
15
|
+
host: {
|
|
16
|
+
open?: true;
|
|
17
|
+
placement?: PopoverPlacement;
|
|
18
|
+
};
|
|
19
|
+
trigger: {
|
|
20
|
+
type: "button";
|
|
21
|
+
"aria-expanded": "true" | "false";
|
|
22
|
+
"aria-controls": string;
|
|
23
|
+
};
|
|
24
|
+
panel: {
|
|
25
|
+
class: typeof POPOVER_CLASS;
|
|
26
|
+
id: string;
|
|
27
|
+
popover: "manual";
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* The attributes for a popover.
|
|
32
|
+
*
|
|
33
|
+
* The server writes both the button and the panel, with the wiring between
|
|
34
|
+
* them. `<lt-popover>` works out the position and closes on a click outside.
|
|
35
|
+
*
|
|
36
|
+
* ```ts
|
|
37
|
+
* const box = lt.popover({ id: "help" })
|
|
38
|
+
* ```
|
|
39
|
+
* ```html
|
|
40
|
+
* <lt-popover>
|
|
41
|
+
* <button {...box.trigger}>What does this mean?</button>
|
|
42
|
+
* <div {...box.panel}>We use the date of birth to find the right rate.</div>
|
|
43
|
+
* </lt-popover>
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare const popover: (({ id: givenId, open, placement, }: PopoverOptions) => PopoverAttributes) & {
|
|
47
|
+
isPlacement: typeof isPopoverPlacement;
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../../src/components/frame/popover/popover.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,EAAG,YAAqB,CAAA;AAElD,qGAAqG;AACrG,eAAO,MAAM,iBAAiB,iEAKpB,CAAA;AACV,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEjE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB,CAE5E;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,8EAA8E;IAC9E,EAAE,EAAE,MAAM,CAAA;IACV,0CAA0C;IAC1C,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,gEAAgE;IAChE,SAAS,CAAC,EAAE,gBAAgB,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE;QACJ,IAAI,CAAC,EAAE,IAAI,CAAA;QACX,SAAS,CAAC,EAAE,gBAAgB,CAAA;KAC7B,CAAA;IACD,OAAO,EAAE;QACP,IAAI,EAAE,QAAQ,CAAA;QACd,eAAe,EAAE,MAAM,GAAG,OAAO,CAAA;QACjC,eAAe,EAAE,MAAM,CAAA;KACxB,CAAA;IACD,KAAK,EAAE;QACL,KAAK,EAAE,OAAO,aAAa,CAAA;QAC3B,EAAE,EAAE,MAAM,CAAA;QACV,OAAO,EAAE,QAAQ,CAAA;KAClB,CAAA;CACF,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,OAAO,uCAKf,cAAc,KAAG,iBAAiB;;CAqCtC,CAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { attributes, idOrFallback } from "../../css/shared.js";
|
|
2
|
+
export const POPOVER_CLASS = "lt-popover";
|
|
3
|
+
/** Which edge of the button the panel hangs from. `start` and `end` follow the reading direction. */
|
|
4
|
+
export const popoverPlacements = [
|
|
5
|
+
"bottom-start",
|
|
6
|
+
"bottom-end",
|
|
7
|
+
"top-start",
|
|
8
|
+
"top-end",
|
|
9
|
+
];
|
|
10
|
+
export function isPopoverPlacement(value) {
|
|
11
|
+
return popoverPlacements.includes(value);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The attributes for a popover.
|
|
15
|
+
*
|
|
16
|
+
* The server writes both the button and the panel, with the wiring between
|
|
17
|
+
* them. `<lt-popover>` works out the position and closes on a click outside.
|
|
18
|
+
*
|
|
19
|
+
* ```ts
|
|
20
|
+
* const box = lt.popover({ id: "help" })
|
|
21
|
+
* ```
|
|
22
|
+
* ```html
|
|
23
|
+
* <lt-popover>
|
|
24
|
+
* <button {...box.trigger}>What does this mean?</button>
|
|
25
|
+
* <div {...box.panel}>We use the date of birth to find the right rate.</div>
|
|
26
|
+
* </lt-popover>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export const popover = Object.assign(({ id: givenId, open = false, placement = "bottom-start", }) => {
|
|
30
|
+
// The fallback only matters to someone without a type check.
|
|
31
|
+
const id = idOrFallback("lt.popover()", givenId);
|
|
32
|
+
return {
|
|
33
|
+
host: attributes({
|
|
34
|
+
// `open` must be on the host, not only in the button's aria-expanded.
|
|
35
|
+
// Without it the markup said the panel was open while the component
|
|
36
|
+
// thought it was closed. No preserve list: if a patch removes the
|
|
37
|
+
// attribute, the component puts it back, and `server-controlled` turns
|
|
38
|
+
// off the repair when the server is to decide the state.
|
|
39
|
+
open: open ? true : undefined,
|
|
40
|
+
placement: placement === "bottom-start" ? undefined : placement,
|
|
41
|
+
}),
|
|
42
|
+
trigger: attributes({
|
|
43
|
+
// A button without `type` submits the form it is in.
|
|
44
|
+
type: "button",
|
|
45
|
+
"aria-expanded": (open ? "true" : "false"),
|
|
46
|
+
"aria-controls": id,
|
|
47
|
+
}),
|
|
48
|
+
panel: attributes({
|
|
49
|
+
class: POPOVER_CLASS,
|
|
50
|
+
id,
|
|
51
|
+
// `manual` and not `auto`: the component closes the panel itself, so
|
|
52
|
+
// the button can close it again without the browser closing it first.
|
|
53
|
+
popover: "manual",
|
|
54
|
+
}),
|
|
55
|
+
};
|
|
56
|
+
}, {
|
|
57
|
+
// The guard hangs on the function, as elsewhere in `lt`. The list sits
|
|
58
|
+
// next to it, as `popoverPlacements`, and not on the function: `placement`
|
|
59
|
+
// controls where JavaScript puts the panel, not CSS, and the guard for
|
|
60
|
+
// the classes requires every list on a builder function to do something
|
|
61
|
+
// in the CSS.
|
|
62
|
+
isPlacement: isPopoverPlacement,
|
|
63
|
+
});
|
|
64
|
+
//# sourceMappingURL=popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.js","sourceRoot":"","sources":["../../../../src/components/frame/popover/popover.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAE9D,MAAM,CAAC,MAAM,aAAa,GAAG,YAAqB,CAAA;AAElD,qGAAqG;AACrG,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,cAAc;IACd,YAAY;IACZ,WAAW;IACX,SAAS;CACD,CAAA;AAGV,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAC/C,OAAQ,iBAAwC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAClE,CAAC;AA4BD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAClC,CAAC,EACC,EAAE,EAAE,OAAO,EACX,IAAI,GAAG,KAAK,EACZ,SAAS,GAAG,cAAc,GACX,EAAqB,EAAE;IACtC,6DAA6D;IAC7D,MAAM,EAAE,GAAG,YAAY,CAAC,cAAc,EAAE,OAAO,CAAC,CAAA;IAEhD,OAAO;QACL,IAAI,EAAE,UAAU,CAAC;YACf,sEAAsE;YACtE,oEAAoE;YACpE,kEAAkE;YAClE,uEAAuE;YACvE,yDAAyD;YACzD,IAAI,EAAE,IAAI,CAAC,CAAC,CAAE,IAAc,CAAC,CAAC,CAAC,SAAS;YACxC,SAAS,EAAE,SAAS,KAAK,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;SAChE,CAAC;QACF,OAAO,EAAE,UAAU,CAAC;YAClB,qDAAqD;YACrD,IAAI,EAAE,QAAiB;YACvB,eAAe,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAqB;YAC9D,eAAe,EAAE,EAAE;SACpB,CAAC;QACF,KAAK,EAAE,UAAU,CAAC;YAChB,KAAK,EAAE,aAAa;YACpB,EAAE;YACF,qEAAqE;YACrE,sEAAsE;YACtE,OAAO,EAAE,QAAiB;SAC3B,CAAC;KACH,CAAA;AACH,CAAC,EACD;IACE,uEAAuE;IACvE,2EAA2E;IAC3E,uEAAuE;IACvE,wEAAwE;IACxE,cAAc;IACd,WAAW,EAAE,kBAAkB;CAChC,CACF,CAAA"}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { HostElement } from "../../host-element.js";
|
|
2
|
+
export declare const LT_SESSION_TIMEOUT_TAG: "lt-session-timeout";
|
|
3
|
+
/**
|
|
4
|
+
* The parts the warning finds, as selectors relative to the element. The
|
|
5
|
+
* component finds the parts with these, and the manifest describes them for
|
|
6
|
+
* whoever assembles the markup by hand, so the two cannot say different things.
|
|
7
|
+
*/
|
|
8
|
+
export declare const LT_SESSION_TIMEOUT_PARTS: {
|
|
9
|
+
readonly dialog: "dialog";
|
|
10
|
+
readonly title: "h1, h2, h3, h4, h5, h6";
|
|
11
|
+
readonly text: ".lt-session-timeout__text";
|
|
12
|
+
readonly count: ".lt-session-timeout__count";
|
|
13
|
+
readonly status: "[role='status']";
|
|
14
|
+
readonly button: "form[method=\"dialog\" i] button";
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Warns before a signed-in session expires.
|
|
18
|
+
*
|
|
19
|
+
* This is the thing every large organisation builds itself and gets wrong.
|
|
20
|
+
* Either no warning comes, and the user loses a half-filled application
|
|
21
|
+
* form, or the dialog steals focus in the middle of a sentence, or the
|
|
22
|
+
* screen reader reads the countdown every second.
|
|
23
|
+
*
|
|
24
|
+
* The renderer writes the dialog and the text, so the warning is in the
|
|
25
|
+
* language the app uses, with the translation tool the app already has. The
|
|
26
|
+
* component keeps time: it counts activity, opens the dialog with
|
|
27
|
+
* `showModal()`, fills in the number and announces the countdown. That is all
|
|
28
|
+
* it writes, along with what a template may have forgotten: the class
|
|
29
|
+
* `lt-session-timeout__dialog` on the dialog, `role="alertdialog"`, and the
|
|
30
|
+
* name from the first heading, with an id on the heading when it lacks one.
|
|
31
|
+
*
|
|
32
|
+
* The parts are recognised by what must be there anyway: a `<dialog>` inside
|
|
33
|
+
* the host, `.lt-session-timeout__count` for the number, `[role=status]` for
|
|
34
|
+
* the announcement and the buttons in a `<form method="dialog">`. A button
|
|
35
|
+
* with `value="logout"` logs out. Every other way of closing the dialog,
|
|
36
|
+
* Escape and the button with `value="extend"` included, means "I am here",
|
|
37
|
+
* and extends the session.
|
|
38
|
+
*
|
|
39
|
+
* ```html
|
|
40
|
+
* <lt-session-timeout warn-at="1500" expires-at="1800" data-ignore-morph>
|
|
41
|
+
* <dialog class="lt-session-timeout__dialog" role="alertdialog" aria-labelledby="session">
|
|
42
|
+
* <h2 class="lt-session-timeout__title" id="session">You will soon be signed out</h2>
|
|
43
|
+
* <p class="lt-session-timeout__text">
|
|
44
|
+
* We will sign you out in <span class="lt-session-timeout__count" aria-hidden="true"></span>.
|
|
45
|
+
* </p>
|
|
46
|
+
* <span class="lt-sr-only" role="status"></span>
|
|
47
|
+
* <form method="dialog" class="lt-session-timeout__actions">
|
|
48
|
+
* <button class="lt-button" value="extend">Stay signed in</button>
|
|
49
|
+
* <button class="lt-button" data-variant="secondary" value="logout">Sign out now</button>
|
|
50
|
+
* </form>
|
|
51
|
+
* </dialog>
|
|
52
|
+
* </lt-session-timeout>
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* ```ts
|
|
56
|
+
* document.querySelector("lt-session-timeout")
|
|
57
|
+
* .addEventListener("session-extend", () => fetch("/extend", { method: "POST" }))
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export declare class LtSessionTimeout extends HostElement {
|
|
61
|
+
static observedAttributes: readonly ["warn-at", "expires-at", "activity-interval"];
|
|
62
|
+
private ticker?;
|
|
63
|
+
private lastActivity;
|
|
64
|
+
/**
|
|
65
|
+
* When the component last sent `session-activity`, and whether the user has
|
|
66
|
+
* done anything since.
|
|
67
|
+
*
|
|
68
|
+
* The clock is reset by activity in the browser, but the server session does
|
|
69
|
+
* not know about it. A user typing in a long form without a single call to
|
|
70
|
+
* the server never got the warning, and the submission failed because the
|
|
71
|
+
* server session had expired. The event lets the app keep the server session
|
|
72
|
+
* alive. It is sent at the start of an interval, and at the end if the user
|
|
73
|
+
* has done something since, so the server is never more than one interval
|
|
74
|
+
* behind the clock here.
|
|
75
|
+
*/
|
|
76
|
+
private lastActivityEvent;
|
|
77
|
+
private activitySinceEvent;
|
|
78
|
+
/** The seconds left at the previous tick, so a threshold is not skipped. */
|
|
79
|
+
private previousLeft?;
|
|
80
|
+
private previousFocus;
|
|
81
|
+
/**
|
|
82
|
+
* True from when the session expired, or the user chose to sign out, until
|
|
83
|
+
* `extend()` or `reset()` is called.
|
|
84
|
+
*
|
|
85
|
+
* Without this the cycle started again by itself, and an app that did not
|
|
86
|
+
* navigate away got a new dialog and a new `session-expired` every
|
|
87
|
+
* `expires-at` seconds, for a session that was already gone.
|
|
88
|
+
*/
|
|
89
|
+
private expired;
|
|
90
|
+
/** The id the component gave the heading, so the same one comes back. */
|
|
91
|
+
private titleId?;
|
|
92
|
+
/**
|
|
93
|
+
* The dialog the component opened, until `close` has arrived.
|
|
94
|
+
*
|
|
95
|
+
* `close` arrives in a later task than the click that closed the dialog.
|
|
96
|
+
* When the clock ticked in between, `tick()` opened the dialog again and
|
|
97
|
+
* cleared `returnValue`, and the queued event then read `""` and extended
|
|
98
|
+
* the session: the user pressed "Sign out now", and the app got
|
|
99
|
+
* `session-extend`.
|
|
100
|
+
*/
|
|
101
|
+
private shownDialog?;
|
|
102
|
+
/** Watches for `open` disappearing from a dialog in the top layer. See `repairOpen()`. */
|
|
103
|
+
private openObserver?;
|
|
104
|
+
/** Seconds without activity before the warning appears. */
|
|
105
|
+
get warnAt(): number;
|
|
106
|
+
set warnAt(value: number);
|
|
107
|
+
/** Seconds between each `session-activity` while the user is active. */
|
|
108
|
+
get activityInterval(): number;
|
|
109
|
+
set activityInterval(value: number);
|
|
110
|
+
/** Seconds without activity before the session expires. */
|
|
111
|
+
get expiresAt(): number;
|
|
112
|
+
set expiresAt(value: number);
|
|
113
|
+
connectedCallback(): void;
|
|
114
|
+
disconnectedCallback(): void;
|
|
115
|
+
attributeChangedCallback(): void;
|
|
116
|
+
/** The dialog the component controls: the first `<dialog>` inside the host. */
|
|
117
|
+
private get dialog();
|
|
118
|
+
private readSeconds;
|
|
119
|
+
/**
|
|
120
|
+
* Says so when markup and numbers do not add up, instead of staying quiet.
|
|
121
|
+
*
|
|
122
|
+
* `warn-at="1800" expires-at="1500"` gave `session-expired` without the
|
|
123
|
+
* dialog ever being shown, and a negative number gave a dialog on the first
|
|
124
|
+
* tick. The defaults are used when a number is not a number.
|
|
125
|
+
*/
|
|
126
|
+
private validate;
|
|
127
|
+
/** The parts inside the dialog. Each of them makes the warning worse when missing. */
|
|
128
|
+
private validateParts;
|
|
129
|
+
/**
|
|
130
|
+
* Fills in what accessibility requires and a template may have forgotten:
|
|
131
|
+
* the role, and the name from the first heading. Only what is missing: a
|
|
132
|
+
* name from `aria-label` or `aria-labelledby` was written by the renderer,
|
|
133
|
+
* and stays.
|
|
134
|
+
*/
|
|
135
|
+
private wire;
|
|
136
|
+
/**
|
|
137
|
+
* Puts `open` back on a dialog that is still in the top layer.
|
|
138
|
+
*
|
|
139
|
+
* `showModal()` sets the attribute itself, and the renderer did not send
|
|
140
|
+
* it. A morph without `data-ignore-morph` therefore removes it, and the
|
|
141
|
+
* dialog stayed in the top layer, invisible, with the rest of the page
|
|
142
|
+
* inert. The page was stuck. The number comes back on the next tick.
|
|
143
|
+
*
|
|
144
|
+
* The condition is `:modal` and not `open`: when the user closes the
|
|
145
|
+
* dialog, it leaves the top layer, and then the missing attribute is real.
|
|
146
|
+
* The same rule as in `<lt-dialog>`.
|
|
147
|
+
*/
|
|
148
|
+
private repairOpen;
|
|
149
|
+
private registerActivity;
|
|
150
|
+
/**
|
|
151
|
+
* Sends `session-activity` when an interval has passed and the user was
|
|
152
|
+
* active.
|
|
153
|
+
*
|
|
154
|
+
* Not while the warning is showing or after the session has expired: then
|
|
155
|
+
* the app kept the server session alive while the clock here counted down
|
|
156
|
+
* towards `session-expired`. The interval is at least one second, or every
|
|
157
|
+
* scroll sent a call.
|
|
158
|
+
*/
|
|
159
|
+
private reportActivity;
|
|
160
|
+
/**
|
|
161
|
+
* The user closed the dialog, or the component did.
|
|
162
|
+
*
|
|
163
|
+
* The component's own closes have their own reasons, and do nothing here.
|
|
164
|
+
* `value="logout"` logs out. Everything else, Escape and the button with
|
|
165
|
+
* `value="extend"` included, is "I am here". That also applies to a button
|
|
166
|
+
* with another value: otherwise the dialog closed, and the next tick opened
|
|
167
|
+
* it again a second later.
|
|
168
|
+
*/
|
|
169
|
+
private handleClose;
|
|
170
|
+
private tick;
|
|
171
|
+
/** Writes the number, and the announcement when `announce` is true. */
|
|
172
|
+
private show;
|
|
173
|
+
private openDialog;
|
|
174
|
+
private closeDialog;
|
|
175
|
+
private emit;
|
|
176
|
+
/**
|
|
177
|
+
* Extends the session, closes the warning and sends `session-extend`.
|
|
178
|
+
*
|
|
179
|
+
* If the app listens for `session-extend` to ask the server to extend, it
|
|
180
|
+
* should call `reset()` when the answer comes, not this. Otherwise the
|
|
181
|
+
* answer sends a new `session-extend`, which sends a new call.
|
|
182
|
+
*/
|
|
183
|
+
extend(): void;
|
|
184
|
+
/**
|
|
185
|
+
* Resets the clock without sending `session-extend`.
|
|
186
|
+
*
|
|
187
|
+
* For an app that has already extended the session itself, such as when an
|
|
188
|
+
* autosave went through. `extend()` would have asked the server a second
|
|
189
|
+
* time.
|
|
190
|
+
*/
|
|
191
|
+
reset(): void;
|
|
192
|
+
}
|
|
193
|
+
export declare function defineLtSessionTimeout(tagName?: string): void;
|
|
194
|
+
/** `element.extend()`, but waits for the registration first. See `whenUpgraded`. */
|
|
195
|
+
export declare function extendSession(element: Element): Promise<void>;
|
|
196
|
+
/** `element.reset()`, but waits for the registration first. See `whenUpgraded`. */
|
|
197
|
+
export declare function resetSession(element: Element): Promise<void>;
|
|
198
|
+
//# sourceMappingURL=lt-session-timeout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lt-session-timeout.d.ts","sourceRoot":"","sources":["../../../../src/components/frame/session-timeout/lt-session-timeout.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,WAAW,EAOZ,MAAM,uBAAuB,CAAA;AAS9B,eAAO,MAAM,sBAAsB,EAAG,oBAA6B,CAAA;AAEnE;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;;CAO3B,CAAA;AA0GV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,MAAM,CAAC,kBAAkB,0DAIf;IAEV,OAAO,CAAC,MAAM,CAAC,CAAQ;IACvB,OAAO,CAAC,YAAY,CAAa;IACjC;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,iBAAiB,CAAI;IAC7B,OAAO,CAAC,kBAAkB,CAAQ;IAClC,4EAA4E;IAC5E,OAAO,CAAC,YAAY,CAAC,CAAQ;IAC7B,OAAO,CAAC,aAAa,CAA2B;IAChD;;;;;;;OAOG;IACH,OAAO,CAAC,OAAO,CAAQ;IACvB,yEAAyE;IACzE,OAAO,CAAC,OAAO,CAAC,CAAQ;IACxB;;;;;;;;OAQG;IACH,OAAO,CAAC,WAAW,CAAC,CAAmB;IACvC,0FAA0F;IAC1F,OAAO,CAAC,YAAY,CAAC,CAAkB;IAEvC,2DAA2D;IAC3D,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,EAEvB;IAED,wEAAwE;IACxE,I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