@tanrei/web 0.0.0-stage → 0.1.0-next.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/LICENSE +202 -0
- package/NOTICE +58 -0
- package/README.md +9743 -2
- package/custom-elements.json +86072 -0
- package/dist/THIRD_PARTY_LICENSES.md +136 -0
- package/dist/accordion.css +812 -0
- package/dist/app-shell.css +493 -0
- package/dist/avatar.css +80 -0
- package/dist/breadcrumbs.css +511 -0
- package/dist/callout.css +65 -0
- package/dist/code.css +595 -0
- package/dist/components/accordion/accordion.d.ts +197 -0
- package/dist/components/accordion/accordion.js +763 -0
- package/dist/components/accordion/accordion.js.map +1 -0
- package/dist/components/app-bar/app-bar.d.ts +107 -0
- package/dist/components/app-bar/app-bar.js +295 -0
- package/dist/components/app-bar/app-bar.js.map +1 -0
- package/dist/components/app-bar/app-bar.styles.d.ts +12 -0
- package/dist/components/app-bar/app-bar.styles.js +223 -0
- package/dist/components/app-bar/app-bar.styles.js.map +1 -0
- package/dist/components/app-shell/app-shell.d.ts +220 -0
- package/dist/components/app-shell/app-shell.js +677 -0
- package/dist/components/app-shell/app-shell.js.map +1 -0
- package/dist/components/avatar/avatar.d.ts +162 -0
- package/dist/components/avatar/avatar.js +390 -0
- package/dist/components/avatar/avatar.js.map +1 -0
- package/dist/components/avatar/avatar.styles.d.ts +9 -0
- package/dist/components/avatar/avatar.styles.js +258 -0
- package/dist/components/avatar/avatar.styles.js.map +1 -0
- package/dist/components/badge/badge.d.ts +59 -0
- package/dist/components/badge/badge.js +176 -0
- package/dist/components/badge/badge.js.map +1 -0
- package/dist/components/badge/badge.styles.d.ts +1 -0
- package/dist/components/badge/badge.styles.js +106 -0
- package/dist/components/badge/badge.styles.js.map +1 -0
- package/dist/components/bottom-sheet/bottom-sheet.d.ts +207 -0
- package/dist/components/bottom-sheet/bottom-sheet.js +724 -0
- package/dist/components/bottom-sheet/bottom-sheet.js.map +1 -0
- package/dist/components/bottom-sheet/bottom-sheet.styles.d.ts +1 -0
- package/dist/components/bottom-sheet/bottom-sheet.styles.js +393 -0
- package/dist/components/bottom-sheet/bottom-sheet.styles.js.map +1 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +176 -0
- package/dist/components/breadcrumbs/breadcrumbs.js +638 -0
- package/dist/components/breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/components/breadcrumbs/breadcrumbs.styles.d.ts +1 -0
- package/dist/components/breadcrumbs/breadcrumbs.styles.js +225 -0
- package/dist/components/breadcrumbs/breadcrumbs.styles.js.map +1 -0
- package/dist/components/button/button.d.ts +280 -0
- package/dist/components/button/button.js +530 -0
- package/dist/components/button/button.js.map +1 -0
- package/dist/components/button/button.styles.d.ts +20 -0
- package/dist/components/button/button.styles.js +328 -0
- package/dist/components/button/button.styles.js.map +1 -0
- package/dist/components/button-group/button-group.d.ts +124 -0
- package/dist/components/button-group/button-group.js +287 -0
- package/dist/components/button-group/button-group.js.map +1 -0
- package/dist/components/button-group/button-group.styles.d.ts +1 -0
- package/dist/components/button-group/button-group.styles.js +220 -0
- package/dist/components/button-group/button-group.styles.js.map +1 -0
- package/dist/components/button-with-menu/button-with-menu.d.ts +224 -0
- package/dist/components/button-with-menu/button-with-menu.js +635 -0
- package/dist/components/button-with-menu/button-with-menu.js.map +1 -0
- package/dist/components/button-with-menu/button-with-menu.styles.d.ts +15 -0
- package/dist/components/button-with-menu/button-with-menu.styles.js +418 -0
- package/dist/components/button-with-menu/button-with-menu.styles.js.map +1 -0
- package/dist/components/calendar/calendar.d.ts +380 -0
- package/dist/components/calendar/calendar.js +1619 -0
- package/dist/components/calendar/calendar.js.map +1 -0
- package/dist/components/calendar/calendar.styles.d.ts +11 -0
- package/dist/components/calendar/calendar.styles.js +412 -0
- package/dist/components/calendar/calendar.styles.js.map +1 -0
- package/dist/components/callout/callout.d.ts +157 -0
- package/dist/components/callout/callout.js +436 -0
- package/dist/components/callout/callout.js.map +1 -0
- package/dist/components/callout/callout.styles.d.ts +13 -0
- package/dist/components/callout/callout.styles.js +383 -0
- package/dist/components/callout/callout.styles.js.map +1 -0
- package/dist/components/card/card.d.ts +108 -0
- package/dist/components/card/card.js +235 -0
- package/dist/components/card/card.js.map +1 -0
- package/dist/components/card/card.styles.d.ts +9 -0
- package/dist/components/card/card.styles.js +170 -0
- package/dist/components/card/card.styles.js.map +1 -0
- package/dist/components/carousel/carousel-geometry.d.ts +178 -0
- package/dist/components/carousel/carousel-geometry.js +356 -0
- package/dist/components/carousel/carousel-geometry.js.map +1 -0
- package/dist/components/carousel/carousel.d.ts +401 -0
- package/dist/components/carousel/carousel.js +1352 -0
- package/dist/components/carousel/carousel.js.map +1 -0
- package/dist/components/carousel/carousel.styles.d.ts +4 -0
- package/dist/components/carousel/carousel.styles.js +475 -0
- package/dist/components/carousel/carousel.styles.js.map +1 -0
- package/dist/components/chat-composer/chat-composer.d.ts +482 -0
- package/dist/components/chat-composer/chat-composer.js +1374 -0
- package/dist/components/chat-composer/chat-composer.js.map +1 -0
- package/dist/components/chat-composer/chat-composer.styles.d.ts +9 -0
- package/dist/components/chat-composer/chat-composer.styles.js +308 -0
- package/dist/components/chat-composer/chat-composer.styles.js.map +1 -0
- package/dist/components/checkbox/checkbox.d.ts +135 -0
- package/dist/components/checkbox/checkbox.js +296 -0
- package/dist/components/checkbox/checkbox.js.map +1 -0
- package/dist/components/checkbox/checkbox.styles.d.ts +13 -0
- package/dist/components/checkbox/checkbox.styles.js +226 -0
- package/dist/components/checkbox/checkbox.styles.js.map +1 -0
- package/dist/components/checkbox-group/checkbox-group.d.ts +199 -0
- package/dist/components/checkbox-group/checkbox-group.js +500 -0
- package/dist/components/checkbox-group/checkbox-group.js.map +1 -0
- package/dist/components/chip/chip.d.ts +176 -0
- package/dist/components/chip/chip.js +376 -0
- package/dist/components/chip/chip.js.map +1 -0
- package/dist/components/chip/chip.styles.d.ts +10 -0
- package/dist/components/chip/chip.styles.js +465 -0
- package/dist/components/chip/chip.styles.js.map +1 -0
- package/dist/components/chip-field/chip-field.d.ts +315 -0
- package/dist/components/chip-field/chip-field.js +887 -0
- package/dist/components/chip-field/chip-field.js.map +1 -0
- package/dist/components/code-block/code-block.before.d.ts +2 -0
- package/dist/components/code-block/code-block.before.js +193 -0
- package/dist/components/code-block/code-block.before.js.map +1 -0
- package/dist/components/code-block/code-block.d.ts +268 -0
- package/dist/components/code-block/code-block.js +1009 -0
- package/dist/components/code-block/code-block.js.map +1 -0
- package/dist/components/code-block/code-block.light.d.ts +50 -0
- package/dist/components/code-block/code-block.light.js +287 -0
- package/dist/components/code-block/code-block.light.js.map +1 -0
- package/dist/components/code-block/code-block.lines.d.ts +49 -0
- package/dist/components/code-block/code-block.lines.js +75 -0
- package/dist/components/code-block/code-block.lines.js.map +1 -0
- package/dist/components/code-block/code-block.styles.d.ts +8 -0
- package/dist/components/code-block/code-block.styles.js +212 -0
- package/dist/components/code-block/code-block.styles.js.map +1 -0
- package/dist/components/color-field/color-field.d.ts +120 -0
- package/dist/components/color-field/color-field.js +182 -0
- package/dist/components/color-field/color-field.js.map +1 -0
- package/dist/components/color-input/color-input.d.ts +302 -0
- package/dist/components/color-input/color-input.js +748 -0
- package/dist/components/color-input/color-input.js.map +1 -0
- package/dist/components/color-input/color-input.styles.d.ts +22 -0
- package/dist/components/color-input/color-input.styles.js +373 -0
- package/dist/components/color-input/color-input.styles.js.map +1 -0
- package/dist/components/color-input/color-text.d.ts +48 -0
- package/dist/components/color-input/color-text.js +77 -0
- package/dist/components/color-input/color-text.js.map +1 -0
- package/dist/components/combobox/combobox.d.ts +387 -0
- package/dist/components/combobox/combobox.js +1108 -0
- package/dist/components/combobox/combobox.js.map +1 -0
- package/dist/components/combobox/combobox.styles.d.ts +26 -0
- package/dist/components/combobox/combobox.styles.js +497 -0
- package/dist/components/combobox/combobox.styles.js.map +1 -0
- package/dist/components/combobox-field/combobox-field.d.ts +159 -0
- package/dist/components/combobox-field/combobox-field.js +280 -0
- package/dist/components/combobox-field/combobox-field.js.map +1 -0
- package/dist/components/copy-button/copy-button.d.ts +112 -0
- package/dist/components/copy-button/copy-button.js +237 -0
- package/dist/components/copy-button/copy-button.js.map +1 -0
- package/dist/components/copy-button/copy-button.styles.d.ts +1 -0
- package/dist/components/copy-button/copy-button.styles.js +62 -0
- package/dist/components/copy-button/copy-button.styles.js.map +1 -0
- package/dist/components/date-time-picker/date-time-picker.d.ts +603 -0
- package/dist/components/date-time-picker/date-time-picker.js +2537 -0
- package/dist/components/date-time-picker/date-time-picker.js.map +1 -0
- package/dist/components/date-time-picker/date-time-picker.styles.d.ts +1 -0
- package/dist/components/date-time-picker/date-time-picker.styles.js +842 -0
- package/dist/components/date-time-picker/date-time-picker.styles.js.map +1 -0
- package/dist/components/description-list/description-list.d.ts +133 -0
- package/dist/components/description-list/description-list.js +395 -0
- package/dist/components/description-list/description-list.js.map +1 -0
- package/dist/components/dialog/dialog.d.ts +140 -0
- package/dist/components/dialog/dialog.js +440 -0
- package/dist/components/dialog/dialog.js.map +1 -0
- package/dist/components/dialog/dialog.styles.d.ts +1 -0
- package/dist/components/dialog/dialog.styles.js +306 -0
- package/dist/components/dialog/dialog.styles.js.map +1 -0
- package/dist/components/divider/divider.d.ts +112 -0
- package/dist/components/divider/divider.js +331 -0
- package/dist/components/divider/divider.js.map +1 -0
- package/dist/components/divider/divider.styles.d.ts +6 -0
- package/dist/components/divider/divider.styles.js +183 -0
- package/dist/components/divider/divider.styles.js.map +1 -0
- package/dist/components/embedded-text-input/embedded-text-input.d.ts +246 -0
- package/dist/components/embedded-text-input/embedded-text-input.js +673 -0
- package/dist/components/embedded-text-input/embedded-text-input.js.map +1 -0
- package/dist/components/embedded-text-input/embedded-text-input.styles.d.ts +1 -0
- package/dist/components/embedded-text-input/embedded-text-input.styles.js +204 -0
- package/dist/components/embedded-text-input/embedded-text-input.styles.js.map +1 -0
- package/dist/components/empty-state/empty-state.d.ts +132 -0
- package/dist/components/empty-state/empty-state.js +333 -0
- package/dist/components/empty-state/empty-state.js.map +1 -0
- package/dist/components/empty-state/empty-state.styles.d.ts +11 -0
- package/dist/components/empty-state/empty-state.styles.js +218 -0
- package/dist/components/empty-state/empty-state.styles.js.map +1 -0
- package/dist/components/fab-menu/fab-menu.d.ts +240 -0
- package/dist/components/fab-menu/fab-menu.js +605 -0
- package/dist/components/fab-menu/fab-menu.js.map +1 -0
- package/dist/components/fab-menu/fab-menu.styles.d.ts +21 -0
- package/dist/components/fab-menu/fab-menu.styles.js +427 -0
- package/dist/components/fab-menu/fab-menu.styles.js.map +1 -0
- package/dist/components/field/field.d.ts +165 -0
- package/dist/components/field/field.js +399 -0
- package/dist/components/field/field.js.map +1 -0
- package/dist/components/field/field.styles.d.ts +2 -0
- package/dist/components/field/field.styles.js +177 -0
- package/dist/components/field/field.styles.js.map +1 -0
- package/dist/components/field-group/field-group.d.ts +122 -0
- package/dist/components/field-group/field-group.js +246 -0
- package/dist/components/field-group/field-group.js.map +1 -0
- package/dist/components/field-group/field-group.styles.d.ts +7 -0
- package/dist/components/field-group/field-group.styles.js +28 -0
- package/dist/components/field-group/field-group.styles.js.map +1 -0
- package/dist/components/figure/figure.d.ts +152 -0
- package/dist/components/figure/figure.js +435 -0
- package/dist/components/figure/figure.js.map +1 -0
- package/dist/components/file-item/file-item.d.ts +232 -0
- package/dist/components/file-item/file-item.js +665 -0
- package/dist/components/file-item/file-item.js.map +1 -0
- package/dist/components/file-item/file-item.styles.d.ts +2 -0
- package/dist/components/file-item/file-item.styles.js +582 -0
- package/dist/components/file-item/file-item.styles.js.map +1 -0
- package/dist/components/file-picker/file-picker.d.ts +221 -0
- package/dist/components/file-picker/file-picker.js +588 -0
- package/dist/components/file-picker/file-picker.js.map +1 -0
- package/dist/components/file-picker/file-picker.styles.d.ts +2 -0
- package/dist/components/file-picker/file-picker.styles.js +303 -0
- package/dist/components/file-picker/file-picker.styles.js.map +1 -0
- package/dist/components/file-upload/file-upload.d.ts +353 -0
- package/dist/components/file-upload/file-upload.js +939 -0
- package/dist/components/file-upload/file-upload.js.map +1 -0
- package/dist/components/file-upload/file-upload.styles.d.ts +1 -0
- package/dist/components/file-upload/file-upload.styles.js +91 -0
- package/dist/components/file-upload/file-upload.styles.js.map +1 -0
- package/dist/components/image-preview/image-preview.d.ts +336 -0
- package/dist/components/image-preview/image-preview.js +1510 -0
- package/dist/components/image-preview/image-preview.js.map +1 -0
- package/dist/components/image-preview/image-preview.styles.d.ts +1 -0
- package/dist/components/image-preview/image-preview.styles.js +418 -0
- package/dist/components/image-preview/image-preview.styles.js.map +1 -0
- package/dist/components/keyboard-shortcut/keyboard-shortcut.d.ts +94 -0
- package/dist/components/keyboard-shortcut/keyboard-shortcut.js +285 -0
- package/dist/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -0
- package/dist/components/keyboard-shortcut/keyboard-shortcut.styles.d.ts +11 -0
- package/dist/components/keyboard-shortcut/keyboard-shortcut.styles.js +155 -0
- package/dist/components/keyboard-shortcut/keyboard-shortcut.styles.js.map +1 -0
- package/dist/components/link-card/link-card.d.ts +156 -0
- package/dist/components/link-card/link-card.js +713 -0
- package/dist/components/link-card/link-card.js.map +1 -0
- package/dist/components/list/list.d.ts +430 -0
- package/dist/components/list/list.js +1230 -0
- package/dist/components/list/list.js.map +1 -0
- package/dist/components/list/list.styles.d.ts +3 -0
- package/dist/components/list/list.styles.js +334 -0
- package/dist/components/list/list.styles.js.map +1 -0
- package/dist/components/loading-indicator/loading-indicator.d.ts +83 -0
- package/dist/components/loading-indicator/loading-indicator.js +195 -0
- package/dist/components/loading-indicator/loading-indicator.js.map +1 -0
- package/dist/components/loading-indicator/loading-indicator.styles.d.ts +6 -0
- package/dist/components/loading-indicator/loading-indicator.styles.js +124 -0
- package/dist/components/loading-indicator/loading-indicator.styles.js.map +1 -0
- package/dist/components/main-action-button/main-action-button.d.ts +95 -0
- package/dist/components/main-action-button/main-action-button.js +202 -0
- package/dist/components/main-action-button/main-action-button.js.map +1 -0
- package/dist/components/main-action-button/main-action-button.styles.d.ts +10 -0
- package/dist/components/main-action-button/main-action-button.styles.js +285 -0
- package/dist/components/main-action-button/main-action-button.styles.js.map +1 -0
- package/dist/components/menu/menu.d.ts +813 -0
- package/dist/components/menu/menu.js +2061 -0
- package/dist/components/menu/menu.js.map +1 -0
- package/dist/components/menu/menu.styles.d.ts +18 -0
- package/dist/components/menu/menu.styles.js +587 -0
- package/dist/components/menu/menu.styles.js.map +1 -0
- package/dist/components/menubar/menubar.d.ts +477 -0
- package/dist/components/menubar/menubar.js +1677 -0
- package/dist/components/menubar/menubar.js.map +1 -0
- package/dist/components/menubar/menubar.styles.d.ts +43 -0
- package/dist/components/menubar/menubar.styles.js +379 -0
- package/dist/components/menubar/menubar.styles.js.map +1 -0
- package/dist/components/navigation-bar/navigation-bar.d.ts +239 -0
- package/dist/components/navigation-bar/navigation-bar.js +544 -0
- package/dist/components/navigation-bar/navigation-bar.js.map +1 -0
- package/dist/components/navigation-bar/navigation-bar.styles.d.ts +21 -0
- package/dist/components/navigation-bar/navigation-bar.styles.js +320 -0
- package/dist/components/navigation-bar/navigation-bar.styles.js.map +1 -0
- package/dist/components/navigation-drawer/navigation-drawer.d.ts +627 -0
- package/dist/components/navigation-drawer/navigation-drawer.js +1917 -0
- package/dist/components/navigation-drawer/navigation-drawer.js.map +1 -0
- package/dist/components/navigation-drawer/navigation-drawer.styles.d.ts +40 -0
- package/dist/components/navigation-drawer/navigation-drawer.styles.js +934 -0
- package/dist/components/navigation-drawer/navigation-drawer.styles.js.map +1 -0
- package/dist/components/number-field/number-field.d.ts +147 -0
- package/dist/components/number-field/number-field.js +252 -0
- package/dist/components/number-field/number-field.js.map +1 -0
- package/dist/components/number-input/number-input.d.ts +347 -0
- package/dist/components/number-input/number-input.js +929 -0
- package/dist/components/number-input/number-input.js.map +1 -0
- package/dist/components/number-input/number-input.styles.d.ts +22 -0
- package/dist/components/number-input/number-input.styles.js +395 -0
- package/dist/components/number-input/number-input.styles.js.map +1 -0
- package/dist/components/number-input/number-text.d.ts +74 -0
- package/dist/components/number-input/number-text.js +230 -0
- package/dist/components/number-input/number-text.js.map +1 -0
- package/dist/components/one-time-code-field/one-time-code-field.d.ts +94 -0
- package/dist/components/one-time-code-field/one-time-code-field.js +135 -0
- package/dist/components/one-time-code-field/one-time-code-field.js.map +1 -0
- package/dist/components/one-time-code-input/code-text.d.ts +51 -0
- package/dist/components/one-time-code-input/code-text.js +145 -0
- package/dist/components/one-time-code-input/code-text.js.map +1 -0
- package/dist/components/one-time-code-input/one-time-code-input.d.ts +219 -0
- package/dist/components/one-time-code-input/one-time-code-input.js +710 -0
- package/dist/components/one-time-code-input/one-time-code-input.js.map +1 -0
- package/dist/components/one-time-code-input/one-time-code-input.styles.d.ts +8 -0
- package/dist/components/one-time-code-input/one-time-code-input.styles.js +323 -0
- package/dist/components/one-time-code-input/one-time-code-input.styles.js.map +1 -0
- package/dist/components/option/option.d.ts +51 -0
- package/dist/components/option/option.js +75 -0
- package/dist/components/option/option.js.map +1 -0
- package/dist/components/page-header/page-header.d.ts +97 -0
- package/dist/components/page-header/page-header.js +258 -0
- package/dist/components/page-header/page-header.js.map +1 -0
- package/dist/components/popover/popover.d.ts +217 -0
- package/dist/components/popover/popover.js +616 -0
- package/dist/components/popover/popover.js.map +1 -0
- package/dist/components/popover/popover.styles.d.ts +8 -0
- package/dist/components/popover/popover.styles.js +299 -0
- package/dist/components/popover/popover.styles.js.map +1 -0
- package/dist/components/progress-indicator/progress-indicator.d.ts +76 -0
- package/dist/components/progress-indicator/progress-indicator.js +165 -0
- package/dist/components/progress-indicator/progress-indicator.js.map +1 -0
- package/dist/components/progress-indicator/progress-indicator.styles.d.ts +7 -0
- package/dist/components/progress-indicator/progress-indicator.styles.js +271 -0
- package/dist/components/progress-indicator/progress-indicator.styles.js.map +1 -0
- package/dist/components/radio-button/radio-button.d.ts +149 -0
- package/dist/components/radio-button/radio-button.js +370 -0
- package/dist/components/radio-button/radio-button.js.map +1 -0
- package/dist/components/radio-button/radio-button.styles.d.ts +8 -0
- package/dist/components/radio-button/radio-button.styles.js +190 -0
- package/dist/components/radio-button/radio-button.styles.js.map +1 -0
- package/dist/components/radio-group/radio-group.d.ts +188 -0
- package/dist/components/radio-group/radio-group.js +380 -0
- package/dist/components/radio-group/radio-group.js.map +1 -0
- package/dist/components/search/search.d.ts +569 -0
- package/dist/components/search/search.js +1801 -0
- package/dist/components/search/search.js.map +1 -0
- package/dist/components/search/search.styles.d.ts +15 -0
- package/dist/components/search/search.styles.js +967 -0
- package/dist/components/search/search.styles.js.map +1 -0
- package/dist/components/segmented-button/segmented-button.d.ts +183 -0
- package/dist/components/segmented-button/segmented-button.js +483 -0
- package/dist/components/segmented-button/segmented-button.js.map +1 -0
- package/dist/components/segmented-button/segmented-button.styles.d.ts +19 -0
- package/dist/components/segmented-button/segmented-button.styles.js +400 -0
- package/dist/components/segmented-button/segmented-button.styles.js.map +1 -0
- package/dist/components/select/select.d.ts +259 -0
- package/dist/components/select/select.js +702 -0
- package/dist/components/select/select.js.map +1 -0
- package/dist/components/select/select.styles.d.ts +27 -0
- package/dist/components/select/select.styles.js +359 -0
- package/dist/components/select/select.styles.js.map +1 -0
- package/dist/components/select-field/select-field.d.ts +141 -0
- package/dist/components/select-field/select-field.js +234 -0
- package/dist/components/select-field/select-field.js.map +1 -0
- package/dist/components/side-sheet/side-sheet.d.ts +190 -0
- package/dist/components/side-sheet/side-sheet.js +592 -0
- package/dist/components/side-sheet/side-sheet.js.map +1 -0
- package/dist/components/side-sheet/side-sheet.styles.d.ts +9 -0
- package/dist/components/side-sheet/side-sheet.styles.js +352 -0
- package/dist/components/side-sheet/side-sheet.styles.js.map +1 -0
- package/dist/components/skeleton/skeleton.d.ts +157 -0
- package/dist/components/skeleton/skeleton.js +550 -0
- package/dist/components/skeleton/skeleton.js.map +1 -0
- package/dist/components/slider/slider.d.ts +235 -0
- package/dist/components/slider/slider.js +792 -0
- package/dist/components/slider/slider.js.map +1 -0
- package/dist/components/slider/slider.styles.d.ts +6 -0
- package/dist/components/slider/slider.styles.js +492 -0
- package/dist/components/slider/slider.styles.js.map +1 -0
- package/dist/components/slider-field/slider-field.d.ts +150 -0
- package/dist/components/slider-field/slider-field.js +269 -0
- package/dist/components/slider-field/slider-field.js.map +1 -0
- package/dist/components/snackbar/snackbar.d.ts +237 -0
- package/dist/components/snackbar/snackbar.js +607 -0
- package/dist/components/snackbar/snackbar.js.map +1 -0
- package/dist/components/snackbar/snackbar.styles.d.ts +10 -0
- package/dist/components/snackbar/snackbar.styles.js +510 -0
- package/dist/components/snackbar/snackbar.styles.js.map +1 -0
- package/dist/components/switch/switch.d.ts +161 -0
- package/dist/components/switch/switch.js +470 -0
- package/dist/components/switch/switch.js.map +1 -0
- package/dist/components/switch/switch.styles.d.ts +3 -0
- package/dist/components/switch/switch.styles.js +440 -0
- package/dist/components/switch/switch.styles.js.map +1 -0
- package/dist/components/tab-view/tab-view.d.ts +303 -0
- package/dist/components/tab-view/tab-view.js +917 -0
- package/dist/components/tab-view/tab-view.js.map +1 -0
- package/dist/components/tab-view/tab-view.styles.d.ts +19 -0
- package/dist/components/tab-view/tab-view.styles.js +85 -0
- package/dist/components/tab-view/tab-view.styles.js.map +1 -0
- package/dist/components/table/table.d.ts +386 -0
- package/dist/components/table/table.js +1320 -0
- package/dist/components/table/table.js.map +1 -0
- package/dist/components/table-of-contents/table-of-contents.d.ts +227 -0
- package/dist/components/table-of-contents/table-of-contents.js +963 -0
- package/dist/components/table-of-contents/table-of-contents.js.map +1 -0
- package/dist/components/table-of-contents/table-of-contents.styles.d.ts +1 -0
- package/dist/components/table-of-contents/table-of-contents.styles.js +243 -0
- package/dist/components/table-of-contents/table-of-contents.styles.js.map +1 -0
- package/dist/components/tabs/tabs.d.ts +800 -0
- package/dist/components/tabs/tabs.js +2183 -0
- package/dist/components/tabs/tabs.js.map +1 -0
- package/dist/components/tabs/tabs.styles.d.ts +47 -0
- package/dist/components/tabs/tabs.styles.js +595 -0
- package/dist/components/tabs/tabs.styles.js.map +1 -0
- package/dist/components/tag/tag.d.ts +77 -0
- package/dist/components/tag/tag.js +143 -0
- package/dist/components/tag/tag.js.map +1 -0
- package/dist/components/tag/tag.styles.d.ts +13 -0
- package/dist/components/tag/tag.styles.js +215 -0
- package/dist/components/tag/tag.styles.js.map +1 -0
- package/dist/components/tag-group/tag-group.d.ts +110 -0
- package/dist/components/tag-group/tag-group.js +298 -0
- package/dist/components/tag-group/tag-group.js.map +1 -0
- package/dist/components/tag-group/tag-group.styles.d.ts +8 -0
- package/dist/components/tag-group/tag-group.styles.js +66 -0
- package/dist/components/tag-group/tag-group.styles.js.map +1 -0
- package/dist/components/text-field/text-field.d.ts +159 -0
- package/dist/components/text-field/text-field.js +272 -0
- package/dist/components/text-field/text-field.js.map +1 -0
- package/dist/components/text-input/text-input-segments.d.ts +93 -0
- package/dist/components/text-input/text-input-segments.js +233 -0
- package/dist/components/text-input/text-input-segments.js.map +1 -0
- package/dist/components/text-input/text-input.d.ts +683 -0
- package/dist/components/text-input/text-input.js +2120 -0
- package/dist/components/text-input/text-input.js.map +1 -0
- package/dist/components/text-input/text-input.styles.d.ts +27 -0
- package/dist/components/text-input/text-input.styles.js +1071 -0
- package/dist/components/text-input/text-input.styles.js.map +1 -0
- package/dist/components/toolbar/toolbar.d.ts +123 -0
- package/dist/components/toolbar/toolbar.js +336 -0
- package/dist/components/toolbar/toolbar.js.map +1 -0
- package/dist/components/toolbar/toolbar.styles.d.ts +10 -0
- package/dist/components/toolbar/toolbar.styles.js +156 -0
- package/dist/components/toolbar/toolbar.styles.js.map +1 -0
- package/dist/components/tooltip/tooltip-placement.d.ts +22 -0
- package/dist/components/tooltip/tooltip-placement.js +15 -0
- package/dist/components/tooltip/tooltip-placement.js.map +1 -0
- package/dist/components/tooltip/tooltip.d.ts +267 -0
- package/dist/components/tooltip/tooltip.js +902 -0
- package/dist/components/tooltip/tooltip.js.map +1 -0
- package/dist/components/tooltip/tooltip.styles.d.ts +7 -0
- package/dist/components/tooltip/tooltip.styles.js +240 -0
- package/dist/components/tooltip/tooltip.styles.js.map +1 -0
- package/dist/components/tree-view/tree-view.d.ts +264 -0
- package/dist/components/tree-view/tree-view.js +1228 -0
- package/dist/components/tree-view/tree-view.js.map +1 -0
- package/dist/description-list.css +337 -0
- package/dist/empty-state.css +70 -0
- package/dist/figure.css +381 -0
- package/dist/generated/icon-sets.d.ts +9 -0
- package/dist/generated/icon-sets.js +18 -0
- package/dist/generated/icon-sets.js.map +1 -0
- package/dist/generated/words.d.ts +161 -0
- package/dist/generated/words.js +91 -0
- package/dist/generated/words.js.map +1 -0
- package/dist/highlight/grammars/css.d.ts +3 -0
- package/dist/highlight/grammars/css.js +56 -0
- package/dist/highlight/grammars/css.js.map +1 -0
- package/dist/highlight/grammars/dart.d.ts +3 -0
- package/dist/highlight/grammars/dart.js +53 -0
- package/dist/highlight/grammars/dart.js.map +1 -0
- package/dist/highlight/grammars/javascript.d.ts +4 -0
- package/dist/highlight/grammars/javascript.js +119 -0
- package/dist/highlight/grammars/javascript.js.map +1 -0
- package/dist/highlight/grammars/json.d.ts +3 -0
- package/dist/highlight/grammars/json.js +19 -0
- package/dist/highlight/grammars/json.js.map +1 -0
- package/dist/highlight/grammars/kotlin.d.ts +3 -0
- package/dist/highlight/grammars/kotlin.js +46 -0
- package/dist/highlight/grammars/kotlin.js.map +1 -0
- package/dist/highlight/grammars/markup.d.ts +3 -0
- package/dist/highlight/grammars/markup.js +45 -0
- package/dist/highlight/grammars/markup.js.map +1 -0
- package/dist/highlight/grammars/shared.d.ts +25 -0
- package/dist/highlight/grammars/shared.js +37 -0
- package/dist/highlight/grammars/shared.js.map +1 -0
- package/dist/highlight/grammars/shell.d.ts +3 -0
- package/dist/highlight/grammars/shell.js +48 -0
- package/dist/highlight/grammars/shell.js.map +1 -0
- package/dist/highlight/grammars/swift.d.ts +3 -0
- package/dist/highlight/grammars/swift.js +46 -0
- package/dist/highlight/grammars/swift.js.map +1 -0
- package/dist/highlight/grammars/typescript.d.ts +2 -0
- package/dist/highlight/grammars/typescript.js +5 -0
- package/dist/highlight/grammars/typescript.js.map +1 -0
- package/dist/highlight/index.d.ts +104 -0
- package/dist/highlight/index.js +331 -0
- package/dist/highlight/index.js.map +1 -0
- package/dist/icons.css +107 -0
- package/dist/icons.d.ts +2 -0
- package/dist/icons.js +10 -0
- package/dist/icons.js.map +1 -0
- package/dist/index.d.ts +85 -0
- package/dist/index.js +100 -0
- package/dist/index.js.map +1 -0
- package/dist/link-card.css +678 -0
- package/dist/link.css +728 -0
- package/dist/link.d.ts +21 -0
- package/dist/link.js +594 -0
- package/dist/link.js.map +1 -0
- package/dist/links/index.d.ts +136 -0
- package/dist/links/index.js +404 -0
- package/dist/links/index.js.map +1 -0
- package/dist/links/node/address.js +154 -0
- package/dist/links/node/cli.js +102 -0
- package/dist/links/node/fetcher.js +267 -0
- package/dist/links/node/head.js +278 -0
- package/dist/links/node/index.d.ts +164 -0
- package/dist/links/node/index.js +26 -0
- package/dist/links/node/links.js +275 -0
- package/dist/links/node/lock.js +86 -0
- package/dist/links/node/mark.js +71 -0
- package/dist/links/node/options.js +120 -0
- package/dist/links/node/pictures.js +265 -0
- package/dist/links/node/refresh.js +28 -0
- package/dist/menu.css +97 -0
- package/dist/menubar.css +69 -0
- package/dist/page-header.css +324 -0
- package/dist/pagination.css +410 -0
- package/dist/pagination.d.ts +6 -0
- package/dist/pagination.js +256 -0
- package/dist/pagination.js.map +1 -0
- package/dist/primitives/actions.d.ts +75 -0
- package/dist/primitives/actions.js +142 -0
- package/dist/primitives/actions.js.map +1 -0
- package/dist/primitives/after-click.d.ts +8 -0
- package/dist/primitives/after-click.js +21 -0
- package/dist/primitives/after-click.js.map +1 -0
- package/dist/primitives/anchored.d.ts +134 -0
- package/dist/primitives/anchored.js +425 -0
- package/dist/primitives/anchored.js.map +1 -0
- package/dist/primitives/arc.d.ts +13 -0
- package/dist/primitives/arc.js +49 -0
- package/dist/primitives/arc.js.map +1 -0
- package/dist/primitives/arrow.d.ts +47 -0
- package/dist/primitives/arrow.js +159 -0
- package/dist/primitives/arrow.js.map +1 -0
- package/dist/primitives/auto-height.d.ts +56 -0
- package/dist/primitives/auto-height.js +150 -0
- package/dist/primitives/auto-height.js.map +1 -0
- package/dist/primitives/autofocus.d.ts +11 -0
- package/dist/primitives/autofocus.js +26 -0
- package/dist/primitives/autofocus.js.map +1 -0
- package/dist/primitives/availability.d.ts +32 -0
- package/dist/primitives/availability.js +122 -0
- package/dist/primitives/availability.js.map +1 -0
- package/dist/primitives/axes.d.ts +45 -0
- package/dist/primitives/axes.js +72 -0
- package/dist/primitives/axes.js.map +1 -0
- package/dist/primitives/behavior.d.ts +14 -0
- package/dist/primitives/behavior.js +19 -0
- package/dist/primitives/behavior.js.map +1 -0
- package/dist/primitives/calendar-date.d.ts +79 -0
- package/dist/primitives/calendar-date.js +135 -0
- package/dist/primitives/calendar-date.js.map +1 -0
- package/dist/primitives/composed.d.ts +144 -0
- package/dist/primitives/composed.js +303 -0
- package/dist/primitives/composed.js.map +1 -0
- package/dist/primitives/default-button.d.ts +49 -0
- package/dist/primitives/default-button.js +270 -0
- package/dist/primitives/default-button.js.map +1 -0
- package/dist/primitives/description.d.ts +18 -0
- package/dist/primitives/description.js +18 -0
- package/dist/primitives/description.js.map +1 -0
- package/dist/primitives/destination.d.ts +259 -0
- package/dist/primitives/destination.js +651 -0
- package/dist/primitives/destination.js.map +1 -0
- package/dist/primitives/direction.d.ts +23 -0
- package/dist/primitives/direction.js +90 -0
- package/dist/primitives/direction.js.map +1 -0
- package/dist/primitives/disabled-while-focused.d.ts +46 -0
- package/dist/primitives/disabled-while-focused.js +126 -0
- package/dist/primitives/disabled-while-focused.js.map +1 -0
- package/dist/primitives/disclosure.d.ts +9 -0
- package/dist/primitives/disclosure.js +15 -0
- package/dist/primitives/disclosure.js.map +1 -0
- package/dist/primitives/dismiss.d.ts +88 -0
- package/dist/primitives/dismiss.js +232 -0
- package/dist/primitives/dismiss.js.map +1 -0
- package/dist/primitives/field-frame.d.ts +166 -0
- package/dist/primitives/field-frame.js +358 -0
- package/dist/primitives/field-frame.js.map +1 -0
- package/dist/primitives/field-group-frame.d.ts +59 -0
- package/dist/primitives/field-group-frame.js +174 -0
- package/dist/primitives/field-group-frame.js.map +1 -0
- package/dist/primitives/field-trigger.d.ts +117 -0
- package/dist/primitives/field-trigger.js +387 -0
- package/dist/primitives/field-trigger.js.map +1 -0
- package/dist/primitives/field.d.ts +186 -0
- package/dist/primitives/field.js +349 -0
- package/dist/primitives/field.js.map +1 -0
- package/dist/primitives/file-format.d.ts +23 -0
- package/dist/primitives/file-format.js +185 -0
- package/dist/primitives/file-format.js.map +1 -0
- package/dist/primitives/file-item-holder.d.ts +45 -0
- package/dist/primitives/file-item-holder.js +39 -0
- package/dist/primitives/file-item-holder.js.map +1 -0
- package/dist/primitives/focus-order.d.ts +11 -0
- package/dist/primitives/focus-order.js +11 -0
- package/dist/primitives/focus-order.js.map +1 -0
- package/dist/primitives/focus-ring.d.ts +76 -0
- package/dist/primitives/focus-ring.js +230 -0
- package/dist/primitives/focus-ring.js.map +1 -0
- package/dist/primitives/follow.d.ts +65 -0
- package/dist/primitives/follow.js +283 -0
- package/dist/primitives/follow.js.map +1 -0
- package/dist/primitives/form-disabled.d.ts +20 -0
- package/dist/primitives/form-disabled.js +46 -0
- package/dist/primitives/form-disabled.js.map +1 -0
- package/dist/primitives/form-says.d.ts +33 -0
- package/dist/primitives/form-says.js +45 -0
- package/dist/primitives/form-says.js.map +1 -0
- package/dist/primitives/forward.d.ts +13 -0
- package/dist/primitives/forward.js +28 -0
- package/dist/primitives/forward.js.map +1 -0
- package/dist/primitives/glyph-mirror.d.ts +77 -0
- package/dist/primitives/glyph-mirror.js +211 -0
- package/dist/primitives/glyph-mirror.js.map +1 -0
- package/dist/primitives/glyph-pending.d.ts +17 -0
- package/dist/primitives/glyph-pending.js +91 -0
- package/dist/primitives/glyph-pending.js.map +1 -0
- package/dist/primitives/glyph.d.ts +53 -0
- package/dist/primitives/glyph.js +161 -0
- package/dist/primitives/glyph.js.map +1 -0
- package/dist/primitives/group-item.d.ts +128 -0
- package/dist/primitives/group-item.js +334 -0
- package/dist/primitives/group-item.js.map +1 -0
- package/dist/primitives/hidden.d.ts +2 -0
- package/dist/primitives/hidden.js +23 -0
- package/dist/primitives/hidden.js.map +1 -0
- package/dist/primitives/host-aria.d.ts +8 -0
- package/dist/primitives/host-aria.js +18 -0
- package/dist/primitives/host-aria.js.map +1 -0
- package/dist/primitives/index.d.ts +59 -0
- package/dist/primitives/index.js +189 -0
- package/dist/primitives/index.js.map +1 -0
- package/dist/primitives/indicator-drag.d.ts +90 -0
- package/dist/primitives/indicator-drag.js +207 -0
- package/dist/primitives/indicator-drag.js.map +1 -0
- package/dist/primitives/interactive.d.ts +13 -0
- package/dist/primitives/interactive.js +67 -0
- package/dist/primitives/interactive.js.map +1 -0
- package/dist/primitives/item-row.d.ts +34 -0
- package/dist/primitives/item-row.js +76 -0
- package/dist/primitives/item-row.js.map +1 -0
- package/dist/primitives/item-update.d.ts +2 -0
- package/dist/primitives/item-update.js +12 -0
- package/dist/primitives/item-update.js.map +1 -0
- package/dist/primitives/kept-length.d.ts +34 -0
- package/dist/primitives/kept-length.js +154 -0
- package/dist/primitives/kept-length.js.map +1 -0
- package/dist/primitives/keyboard-convention.d.ts +30 -0
- package/dist/primitives/keyboard-convention.js +88 -0
- package/dist/primitives/keyboard-convention.js.map +1 -0
- package/dist/primitives/label-lines.d.ts +12 -0
- package/dist/primitives/label-lines.js +34 -0
- package/dist/primitives/label-lines.js.map +1 -0
- package/dist/primitives/layout-scale.d.ts +18 -0
- package/dist/primitives/layout-scale.js +35 -0
- package/dist/primitives/layout-scale.js.map +1 -0
- package/dist/primitives/link.d.ts +147 -0
- package/dist/primitives/link.js +204 -0
- package/dist/primitives/link.js.map +1 -0
- package/dist/primitives/locale-date.d.ts +132 -0
- package/dist/primitives/locale-date.js +508 -0
- package/dist/primitives/locale-date.js.map +1 -0
- package/dist/primitives/missing-value.d.ts +16 -0
- package/dist/primitives/missing-value.js +31 -0
- package/dist/primitives/missing-value.js.map +1 -0
- package/dist/primitives/modal.d.ts +38 -0
- package/dist/primitives/modal.js +175 -0
- package/dist/primitives/modal.js.map +1 -0
- package/dist/primitives/native-text.d.ts +51 -0
- package/dist/primitives/native-text.js +77 -0
- package/dist/primitives/native-text.js.map +1 -0
- package/dist/primitives/natural-height.d.ts +21 -0
- package/dist/primitives/natural-height.js +36 -0
- package/dist/primitives/natural-height.js.map +1 -0
- package/dist/primitives/option-list.d.ts +314 -0
- package/dist/primitives/option-list.js +1098 -0
- package/dist/primitives/option-list.js.map +1 -0
- package/dist/primitives/overlay-focus.d.ts +48 -0
- package/dist/primitives/overlay-focus.js +152 -0
- package/dist/primitives/overlay-focus.js.map +1 -0
- package/dist/primitives/placement.d.ts +131 -0
- package/dist/primitives/placement.js +144 -0
- package/dist/primitives/placement.js.map +1 -0
- package/dist/primitives/places.d.ts +44 -0
- package/dist/primitives/places.js +98 -0
- package/dist/primitives/places.js.map +1 -0
- package/dist/primitives/press.d.ts +90 -0
- package/dist/primitives/press.js +153 -0
- package/dist/primitives/press.js.map +1 -0
- package/dist/primitives/report.d.ts +17 -0
- package/dist/primitives/report.js +34 -0
- package/dist/primitives/report.js.map +1 -0
- package/dist/primitives/ripple.d.ts +40 -0
- package/dist/primitives/ripple.js +70 -0
- package/dist/primitives/ripple.js.map +1 -0
- package/dist/primitives/roving.d.ts +41 -0
- package/dist/primitives/roving.js +71 -0
- package/dist/primitives/roving.js.map +1 -0
- package/dist/primitives/selection.d.ts +134 -0
- package/dist/primitives/selection.js +287 -0
- package/dist/primitives/selection.js.map +1 -0
- package/dist/primitives/separation.d.ts +28 -0
- package/dist/primitives/separation.js +96 -0
- package/dist/primitives/separation.js.map +1 -0
- package/dist/primitives/shared-choice.d.ts +33 -0
- package/dist/primitives/shared-choice.js +110 -0
- package/dist/primitives/shared-choice.js.map +1 -0
- package/dist/primitives/sheet.d.ts +63 -0
- package/dist/primitives/sheet.js +139 -0
- package/dist/primitives/sheet.js.map +1 -0
- package/dist/primitives/sheets.d.ts +8 -0
- package/dist/primitives/sheets.js +96 -0
- package/dist/primitives/sheets.js.map +1 -0
- package/dist/primitives/states.d.ts +33 -0
- package/dist/primitives/states.js +30 -0
- package/dist/primitives/states.js.map +1 -0
- package/dist/primitives/system-watch.d.ts +9 -0
- package/dist/primitives/system-watch.js +29 -0
- package/dist/primitives/system-watch.js.map +1 -0
- package/dist/primitives/target.d.ts +21 -0
- package/dist/primitives/target.js +79 -0
- package/dist/primitives/target.js.map +1 -0
- package/dist/primitives/values.d.ts +6 -0
- package/dist/primitives/values.js +22 -0
- package/dist/primitives/values.js.map +1 -0
- package/dist/primitives/visibility.d.ts +12 -0
- package/dist/primitives/visibility.js +50 -0
- package/dist/primitives/visibility.js.map +1 -0
- package/dist/primitives/words.d.ts +81 -0
- package/dist/primitives/words.js +236 -0
- package/dist/primitives/words.js.map +1 -0
- package/dist/prose.css +1917 -0
- package/dist/registry.d.ts +182 -0
- package/dist/registry.js +2 -0
- package/dist/registry.js.map +1 -0
- package/dist/shape.css +21 -0
- package/dist/skeleton.css +428 -0
- package/dist/steps.css +231 -0
- package/dist/steps.d.ts +6 -0
- package/dist/steps.js +156 -0
- package/dist/steps.js.map +1 -0
- package/dist/styles/icons.d.ts +62 -0
- package/dist/styles/icons.js +237 -0
- package/dist/styles/icons.js.map +1 -0
- package/dist/styles/product-text.d.ts +66 -0
- package/dist/styles/product-text.js +114 -0
- package/dist/styles/product-text.js.map +1 -0
- package/dist/styles/registered-properties.d.ts +6 -0
- package/dist/styles/registered-properties.js +68 -0
- package/dist/styles/registered-properties.js.map +1 -0
- package/dist/styles/shape.d.ts +59 -0
- package/dist/styles/shape.js +95 -0
- package/dist/styles/shape.js.map +1 -0
- package/dist/systems/cupertino.css +8793 -0
- package/dist/systems/m3-expressive-like.css +8786 -0
- package/dist/systems/m3-like.css +8748 -0
- package/dist/table-of-contents.css +482 -0
- package/dist/table.css +902 -0
- package/dist/tanrei.bundle.js +26644 -0
- package/dist/tanrei.bundle.js.map +7 -0
- package/dist/text.css +104 -0
- package/dist/timeline.css +410 -0
- package/dist/timeline.d.ts +6 -0
- package/dist/timeline.js +176 -0
- package/dist/timeline.js.map +1 -0
- package/dist/tokens.css +8801 -0
- package/dist/tree-view.css +797 -0
- package/dist/words.d.ts +2 -0
- package/dist/words.js +6 -0
- package/dist/words.js.map +1 -0
- package/package.json +132 -3
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
// Pictures and icons (REQUIREMENTS.md, LKD-18 to LKD-22, LKD-30): what kind of file a picture is, told from its first
|
|
2
|
+
// bytes; its width and height, read from its own header; the site's image step, without which nothing is kept; and
|
|
3
|
+
// the file it is written to. The package has no picture codec: the one thing decoded here is the small PNG the site's
|
|
4
|
+
// own step has just made of an icon, read to see whether it would be seen on a dark and on a light surface.
|
|
5
|
+
import crypto from 'node:crypto';
|
|
6
|
+
import fs from 'node:fs';
|
|
7
|
+
import path from 'node:path';
|
|
8
|
+
import zlib from 'node:zlib';
|
|
9
|
+
|
|
10
|
+
const KINDS = {
|
|
11
|
+
'image/png': 'png',
|
|
12
|
+
'image/jpeg': 'jpg',
|
|
13
|
+
'image/gif': 'gif',
|
|
14
|
+
'image/webp': 'webp',
|
|
15
|
+
'image/avif': 'avif',
|
|
16
|
+
'image/x-icon': 'ico',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const starts = (bytes, at, ...values) => values.every((value, index) => bytes[at + index] === value);
|
|
20
|
+
const ascii = (bytes, at, text) => bytes.length >= at + text.length && [...text].every((char, index) => bytes[at + index] === char.charCodeAt(0));
|
|
21
|
+
const be16 = (bytes, at) => (bytes[at] << 8) | bytes[at + 1];
|
|
22
|
+
const le16 = (bytes, at) => bytes[at] | (bytes[at + 1] << 8);
|
|
23
|
+
const be32 = (bytes, at) => ((bytes[at] << 24) | (bytes[at + 1] << 16) | (bytes[at + 2] << 8) | bytes[at + 3]) >>> 0;
|
|
24
|
+
const le32 = (bytes, at) => (bytes[at] | (bytes[at + 1] << 8) | (bytes[at + 2] << 16) | (bytes[at + 3] << 24)) >>> 0;
|
|
25
|
+
|
|
26
|
+
function jpegSize(bytes) {
|
|
27
|
+
let at = 2;
|
|
28
|
+
while (at + 9 < bytes.length) {
|
|
29
|
+
if (bytes[at] !== 0xff) {
|
|
30
|
+
at += 1;
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
const marker = bytes[at + 1];
|
|
34
|
+
if (marker === 0xff) at += 1;
|
|
35
|
+
else if (marker === 0x01 || (marker >= 0xd0 && marker <= 0xd9)) at += 2;
|
|
36
|
+
else if (marker >= 0xc0 && marker <= 0xcf && marker !== 0xc4 && marker !== 0xc8 && marker !== 0xcc) return { height: be16(bytes, at + 5), width: be16(bytes, at + 7) };
|
|
37
|
+
else at += 2 + be16(bytes, at + 2);
|
|
38
|
+
}
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function webpSize(bytes) {
|
|
43
|
+
if (bytes.length < 30) return null;
|
|
44
|
+
if (ascii(bytes, 12, 'VP8 ') && starts(bytes, 23, 0x9d, 0x01, 0x2a)) return { width: le16(bytes, 26) & 0x3fff, height: le16(bytes, 28) & 0x3fff };
|
|
45
|
+
if (ascii(bytes, 12, 'VP8L') && bytes[20] === 0x2f) {
|
|
46
|
+
const bits = le32(bytes, 21);
|
|
47
|
+
return { width: (bits & 0x3fff) + 1, height: ((bits >>> 14) & 0x3fff) + 1 };
|
|
48
|
+
}
|
|
49
|
+
if (ascii(bytes, 12, 'VP8X')) return { width: 1 + (le32(bytes, 24) & 0xffffff), height: 1 + (le32(bytes, 27) & 0xffffff) };
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function avifSize(bytes) {
|
|
54
|
+
// The largest extent the file declares: a picture made of tiles declares each tile's and the whole's.
|
|
55
|
+
const data = Buffer.from(bytes.buffer, bytes.byteOffset, bytes.length);
|
|
56
|
+
let width = 0;
|
|
57
|
+
let height = 0;
|
|
58
|
+
for (let at = data.indexOf('ispe', 0, 'latin1'); at !== -1 && at + 16 <= data.length; at = data.indexOf('ispe', at + 4, 'latin1')) {
|
|
59
|
+
width = Math.max(width, be32(data, at + 8));
|
|
60
|
+
height = Math.max(height, be32(data, at + 12));
|
|
61
|
+
}
|
|
62
|
+
return width && height ? { width, height } : null;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function isAvif(bytes) {
|
|
66
|
+
if (!ascii(bytes, 4, 'ftyp')) return false;
|
|
67
|
+
const end = Math.min(be32(bytes, 0), bytes.length);
|
|
68
|
+
for (let at = 8; at + 4 <= end; at += at === 8 ? 8 : 4) if (ascii(bytes, at, 'avif') || ascii(bytes, at, 'avis')) return true;
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** The pictures inside an icon file, as its directory lists them. */
|
|
73
|
+
function icoEntries(bytes) {
|
|
74
|
+
const count = le16(bytes, 4);
|
|
75
|
+
const entries = [];
|
|
76
|
+
for (let index = 0; index < count && 6 + (index + 1) * 16 <= bytes.length; index += 1) {
|
|
77
|
+
const at = 6 + index * 16;
|
|
78
|
+
entries.push({ width: bytes[at] || 256, height: bytes[at + 1] || 256, size: le32(bytes, at + 8), offset: le32(bytes, at + 12) });
|
|
79
|
+
}
|
|
80
|
+
return entries;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* LKD-19 and LKD-20: the kind of a file from its first bytes alone, and its width and height from its own header.
|
|
85
|
+
* Returns `{ type, extension, width, height }`, or null for anything that is not a PNG, a JPEG, a GIF, a WebP or an
|
|
86
|
+
* AVIF picture — or, where `icon` is set, an icon file, of whose pictures the one LKD-20 chooses for `side` is
|
|
87
|
+
* described. A vector drawing is a document: it is null here whatever it is called.
|
|
88
|
+
*/
|
|
89
|
+
export function sniffPicture(bytes, { icon = false, side = 32 } = {}) {
|
|
90
|
+
if (!(bytes instanceof Uint8Array) || bytes.length < 12) return null;
|
|
91
|
+
let found = null;
|
|
92
|
+
if (starts(bytes, 0, 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a) && bytes.length >= 24 && ascii(bytes, 12, 'IHDR')) found = { type: 'image/png', width: be32(bytes, 16), height: be32(bytes, 20) };
|
|
93
|
+
else if (starts(bytes, 0, 0xff, 0xd8, 0xff)) found = { type: 'image/jpeg', ...jpegSize(bytes) };
|
|
94
|
+
else if (ascii(bytes, 0, 'GIF87a') || ascii(bytes, 0, 'GIF89a')) found = { type: 'image/gif', width: le16(bytes, 6), height: le16(bytes, 8) };
|
|
95
|
+
else if (ascii(bytes, 0, 'RIFF') && ascii(bytes, 8, 'WEBP')) found = { type: 'image/webp', ...webpSize(bytes) };
|
|
96
|
+
else if (isAvif(bytes)) found = { type: 'image/avif', ...avifSize(bytes) };
|
|
97
|
+
else if (icon && starts(bytes, 0, 0x00, 0x00, 0x01, 0x00)) {
|
|
98
|
+
const entries = icoEntries(bytes);
|
|
99
|
+
const enough = entries.filter((entry) => Math.min(entry.width, entry.height) >= side).sort((a, b) => a.width - b.width)[0];
|
|
100
|
+
const chosen = enough ?? entries.sort((a, b) => b.width - a.width)[0];
|
|
101
|
+
if (chosen) found = { type: 'image/x-icon', width: chosen.width, height: chosen.height, entry: chosen };
|
|
102
|
+
}
|
|
103
|
+
if (!found || !Number.isInteger(found.width) || !Number.isInteger(found.height)) return null;
|
|
104
|
+
return { ...found, extension: KINDS[found.type] };
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** LKD-20: neither side 0, neither longer than the limit. */
|
|
108
|
+
export const sizeIsKept = (found, pixels) => found.width > 0 && found.height > 0 && found.width <= pixels && found.height <= pixels;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* An icon file's chosen picture, where the file holds it as a PNG of its own: those bytes, which the site's image
|
|
112
|
+
* step can read as any PNG. Otherwise null, and the whole file is what the step is given.
|
|
113
|
+
*/
|
|
114
|
+
export function pngInsideIcon(bytes, found) {
|
|
115
|
+
const { offset, size } = found.entry ?? {};
|
|
116
|
+
if (!Number.isInteger(offset) || offset + size > bytes.length || size < 24) return null;
|
|
117
|
+
const inner = bytes.subarray(offset, offset + size);
|
|
118
|
+
return sniffPicture(inner)?.type === 'image/png' ? inner : null;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* The pixels of a small PNG — the one the site's image step has just written — as RGBA bytes, or null where this
|
|
123
|
+
* reader does not know the form (it reads 8 bits a channel, not interlaced). Used only to look, never to write.
|
|
124
|
+
*/
|
|
125
|
+
export function readPngPixels(bytes) {
|
|
126
|
+
try {
|
|
127
|
+
const found = sniffPicture(bytes);
|
|
128
|
+
if (found?.type !== 'image/png') return null;
|
|
129
|
+
const [depth, colour, , , interlace] = bytes.subarray(24, 29);
|
|
130
|
+
const channels = { 0: 1, 2: 3, 3: 1, 4: 2, 6: 4 }[colour];
|
|
131
|
+
if (depth !== 8 || !channels || interlace !== 0) return null;
|
|
132
|
+
const { width, height } = found;
|
|
133
|
+
let palette = null;
|
|
134
|
+
let clear = null;
|
|
135
|
+
const data = [];
|
|
136
|
+
for (let at = 8; at + 12 <= bytes.length; ) {
|
|
137
|
+
const length = be32(bytes, at);
|
|
138
|
+
const body = bytes.subarray(at + 8, at + 8 + length);
|
|
139
|
+
if (ascii(bytes, at + 4, 'PLTE')) palette = body;
|
|
140
|
+
else if (ascii(bytes, at + 4, 'tRNS')) clear = body;
|
|
141
|
+
else if (ascii(bytes, at + 4, 'IDAT')) data.push(body);
|
|
142
|
+
at += 12 + length;
|
|
143
|
+
}
|
|
144
|
+
const stride = width * channels;
|
|
145
|
+
const raw = zlib.inflateSync(Buffer.concat(data), { maxOutputLength: (stride + 1) * height });
|
|
146
|
+
if (raw.length !== (stride + 1) * height) return null;
|
|
147
|
+
const lines = new Uint8Array(stride * height);
|
|
148
|
+
for (let y = 0; y < height; y += 1) {
|
|
149
|
+
const filter = raw[y * (stride + 1)];
|
|
150
|
+
for (let x = 0; x < stride; x += 1) {
|
|
151
|
+
const value = raw[y * (stride + 1) + 1 + x];
|
|
152
|
+
const left = x >= channels ? lines[y * stride + x - channels] : 0;
|
|
153
|
+
const up = y > 0 ? lines[(y - 1) * stride + x] : 0;
|
|
154
|
+
const corner = x >= channels && y > 0 ? lines[(y - 1) * stride + x - channels] : 0;
|
|
155
|
+
let predicted = 0;
|
|
156
|
+
if (filter === 1) predicted = left;
|
|
157
|
+
else if (filter === 2) predicted = up;
|
|
158
|
+
else if (filter === 3) predicted = (left + up) >> 1;
|
|
159
|
+
else if (filter === 4) {
|
|
160
|
+
const estimate = left + up - corner;
|
|
161
|
+
const [a, b, c] = [Math.abs(estimate - left), Math.abs(estimate - up), Math.abs(estimate - corner)];
|
|
162
|
+
predicted = a <= b && a <= c ? left : b <= c ? up : corner;
|
|
163
|
+
} else if (filter !== 0) return null;
|
|
164
|
+
lines[y * stride + x] = (value + predicted) & 0xff;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
const rgba = new Uint8Array(width * height * 4);
|
|
168
|
+
for (let index = 0; index < width * height; index += 1) {
|
|
169
|
+
const at = index * channels;
|
|
170
|
+
let pixel;
|
|
171
|
+
if (colour === 6) pixel = [lines[at], lines[at + 1], lines[at + 2], lines[at + 3]];
|
|
172
|
+
else if (colour === 2) pixel = [lines[at], lines[at + 1], lines[at + 2], 255];
|
|
173
|
+
else if (colour === 4) pixel = [lines[at], lines[at], lines[at], lines[at + 1]];
|
|
174
|
+
else if (colour === 0) pixel = [lines[at], lines[at], lines[at], 255];
|
|
175
|
+
else {
|
|
176
|
+
const entry = lines[at];
|
|
177
|
+
if (!palette || entry * 3 + 2 >= palette.length) return null;
|
|
178
|
+
pixel = [palette[entry * 3], palette[entry * 3 + 1], palette[entry * 3 + 2], clear && entry < clear.length ? clear[entry] : 255];
|
|
179
|
+
}
|
|
180
|
+
rgba.set(pixel, index * 4);
|
|
181
|
+
}
|
|
182
|
+
return { width, height, rgba };
|
|
183
|
+
} catch {
|
|
184
|
+
return null;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const channel = (value) => (value <= 0.04045 * 255 ? value / 255 / 12.92 : ((value / 255 + 0.055) / 1.055) ** 2.4);
|
|
189
|
+
|
|
190
|
+
/** A pixel is seen on a surface while it stands 3 to 1 against it: on black from this luminance up, on white from that one down. */
|
|
191
|
+
const SEEN_ON_DARK_FROM = 0.1;
|
|
192
|
+
const SEEN_ON_LIGHT_TO = 0.3;
|
|
193
|
+
/** A picture is seen on a surface while at least this share of what it draws is. */
|
|
194
|
+
const SEEN_SHARE = 0.1;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* LKD-30: the ground a picture needs under it — 'light' where it has transparent pixels and what it draws would not
|
|
198
|
+
* be seen on a dark surface, 'dark' where it would not be seen on a light one, null where it needs none.
|
|
199
|
+
*/
|
|
200
|
+
export function groundFor(rgba) {
|
|
201
|
+
let transparent = 0;
|
|
202
|
+
let drawn = 0;
|
|
203
|
+
let onDark = 0;
|
|
204
|
+
let onLight = 0;
|
|
205
|
+
for (let at = 0; at + 3 < rgba.length; at += 4) {
|
|
206
|
+
const alpha = rgba[at + 3] / 255;
|
|
207
|
+
if (alpha < 1) transparent += 1;
|
|
208
|
+
if (alpha === 0) continue;
|
|
209
|
+
const luminance = 0.2126 * channel(rgba[at]) + 0.7152 * channel(rgba[at + 1]) + 0.0722 * channel(rgba[at + 2]);
|
|
210
|
+
drawn += alpha;
|
|
211
|
+
if (luminance >= SEEN_ON_DARK_FROM) onDark += alpha;
|
|
212
|
+
if (luminance <= SEEN_ON_LIGHT_TO) onLight += alpha;
|
|
213
|
+
}
|
|
214
|
+
if (transparent === 0 || drawn === 0) return null;
|
|
215
|
+
if (onDark / drawn < SEEN_SHARE) return 'light';
|
|
216
|
+
if (onLight / drawn < SEEN_SHARE) return 'dark';
|
|
217
|
+
return null;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export const digestOf = (bytes) => crypto.createHash('sha256').update(bytes).digest('hex');
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* LKD-22: writes a kept picture under a name made from the digest of its bytes and the extension of the kind its
|
|
224
|
+
* bytes are — nothing of the name is the destination's. Returns the file's name and the digest.
|
|
225
|
+
*/
|
|
226
|
+
export function storePicture(bytes, extension, directory) {
|
|
227
|
+
const digest = digestOf(bytes);
|
|
228
|
+
const file = `${digest.slice(0, 32)}.${extension}`;
|
|
229
|
+
const target = path.join(directory, file);
|
|
230
|
+
fs.mkdirSync(directory, { recursive: true });
|
|
231
|
+
if (!fs.existsSync(target)) {
|
|
232
|
+
const draft = `${target}.${process.pid}.tmp`;
|
|
233
|
+
fs.writeFileSync(draft, bytes);
|
|
234
|
+
fs.renameSync(draft, target);
|
|
235
|
+
}
|
|
236
|
+
return { file, digest };
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/** LKD-26: whether the file an entry names is in the directory with the bytes the entry recorded. */
|
|
240
|
+
export function storedPictureIsWhole(file, digest, directory) {
|
|
241
|
+
if (typeof file !== 'string' || file !== path.basename(file) || typeof directory !== 'string') return false;
|
|
242
|
+
try {
|
|
243
|
+
return digestOf(fs.readFileSync(path.join(directory, file))) === digest;
|
|
244
|
+
} catch {
|
|
245
|
+
return false;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* LKD-21: a kept picture through the site's own image step, and what comes back held again to LKD-19 and LKD-20.
|
|
251
|
+
* `info` is what the step is told: `{ type, width, height, role }`, and for an icon the side asked for and, on a
|
|
252
|
+
* second call, the ground to put under it. Returns `{ bytes, found }` or `{ reason }`; it never throws.
|
|
253
|
+
*/
|
|
254
|
+
export async function reencode(bytes, info, { transform, pixels, limit }) {
|
|
255
|
+
let out;
|
|
256
|
+
try {
|
|
257
|
+
out = await transform(bytes, info);
|
|
258
|
+
} catch {
|
|
259
|
+
return { reason: 'image-step-failed' };
|
|
260
|
+
}
|
|
261
|
+
if (!(out instanceof Uint8Array)) return { reason: 'image-step-failed' };
|
|
262
|
+
const found = sniffPicture(out);
|
|
263
|
+
if (!found || !sizeIsKept(found, pixels) || out.length > limit) return { reason: 'image-step-failed' };
|
|
264
|
+
return { bytes: out, found };
|
|
265
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// What a person runs to read what the lock file lacks, or to read everything again (REQUIREMENTS.md, LKD-24). A build
|
|
2
|
+
// never calls this: a build asks in `frozen`, the default.
|
|
3
|
+
import { beginRun, resolveLinkDataWith, resolveSiteIconsWith } from './links.js';
|
|
4
|
+
import { readLock, lockText } from './lock.js';
|
|
5
|
+
import { forgetWhatWasSaid, readOptions } from './options.js';
|
|
6
|
+
|
|
7
|
+
/** refreshLinkData(), with the fetcher's seam as an argument. */
|
|
8
|
+
export async function refreshLinkDataWith(request, internals) {
|
|
9
|
+
if (request === null || typeof request !== 'object') throw new TypeError('links: refreshLinkData({ links, origins, options, mode }) takes an object');
|
|
10
|
+
const { links = [], origins = [], mode = 'update' } = request;
|
|
11
|
+
if (mode !== 'update' && mode !== 'refresh' && mode !== 'frozen') throw new TypeError('links: refreshLinkData() takes mode "update" (the default: read what has no entry), "refresh" (read everything again) or "frozen" (read nothing; say what is missing)');
|
|
12
|
+
for (const [name, list] of [['links', links], ['origins', origins]]) if (!Array.isArray(list) || !list.every((entry) => typeof entry === 'string')) throw new TypeError(`links: refreshLinkData() takes ${name} as a list of addresses`);
|
|
13
|
+
const options = { ...request.options, mode };
|
|
14
|
+
const settings = readOptions(options);
|
|
15
|
+
forgetWhatWasSaid(settings.report);
|
|
16
|
+
beginRun(settings.lock);
|
|
17
|
+
const before = lockText(readLock(settings.lock));
|
|
18
|
+
const wanted = [...new Set(links)];
|
|
19
|
+
const results = await Promise.all(wanted.map((href) => resolveLinkDataWith(href, options, internals)));
|
|
20
|
+
const icons = await resolveSiteIconsWith(origins, options, internals);
|
|
21
|
+
return {
|
|
22
|
+
lock: settings.lock,
|
|
23
|
+
changed: lockText(readLock(settings.lock)) !== before,
|
|
24
|
+
links: results.filter((result) => result.ok).map((result) => result.data.href),
|
|
25
|
+
failed: results.filter((result) => !result.ok).map((result) => ({ href: result.href, reason: result.reason })),
|
|
26
|
+
icons: Object.keys(icons),
|
|
27
|
+
};
|
|
28
|
+
}
|
package/dist/menu.css
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* A menu drawn in place before its elements are defined (specs/menu.spec.json; MNU-19's verify, MNU-20, MNU-23, MNU-28,
|
|
3
|
+
* MNU-36). `<tanrei-menu inline open>` — the form tests and documentation draw a menu in — holds its rows as child
|
|
4
|
+
* elements whose words are attributes, so until the elements are defined nothing of it is laid out and it has no size:
|
|
5
|
+
* a page that draws one moves by the menu's whole height when the script arrives. This stylesheet gives that first
|
|
6
|
+
* paint the block size the surface will have, so that what is under it stays where it is:
|
|
7
|
+
*
|
|
8
|
+
* <tanrei-menu inline open>
|
|
9
|
+
* <tanrei-menu-item label="Copy"></tanrei-menu-item>
|
|
10
|
+
* <tanrei-menu-group label="View"><tanrei-menu-checkbox-item label="Show grid"></tanrei-menu-checkbox-item></tanrei-menu-group>
|
|
11
|
+
* </tanrei-menu>
|
|
12
|
+
*
|
|
13
|
+
* - the surface's padding above and below;
|
|
14
|
+
* - each row — an item of any kind, a submenu's item — at the container's height or the pointer's target, whichever is
|
|
15
|
+
* more, with a line of the label, and a line of the supporting text where the row has one;
|
|
16
|
+
* - a group's title, and between a group and what is next to it the divider's space or, where the separation is gap
|
|
17
|
+
* (the attribute over comp.menu.separation), the group's gap.
|
|
18
|
+
*
|
|
19
|
+
* What it does not give: anything drawn (no fill, no word, no glyph — the words are attributes until the elements
|
|
20
|
+
* draw them); the surface's inline size, which is as wide as its widest row's words; a label or a supporting text
|
|
21
|
+
* that wraps onto more lines; a submenu's own surface. A menu that is not drawn in place opens in the top layer and
|
|
22
|
+
* has no size to hold.
|
|
23
|
+
*
|
|
24
|
+
* Every value is a `--tanrei-comp-menu-*` token. Every selector has no specificity (`:where()`), and none matches
|
|
25
|
+
* once the menu is defined.
|
|
26
|
+
*/
|
|
27
|
+
@layer tanrei.components {
|
|
28
|
+
:where(tanrei-menu[inline][open]:not(:defined)) {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
padding-block: var(--tanrei-comp-menu-surface-padding-block);
|
|
33
|
+
}
|
|
34
|
+
:where(tanrei-menu[inline][open]:not(:defined)) :where(tanrei-menu-group) {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex: none;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
}
|
|
39
|
+
/* A row: at least the container's height and the pointer's target, padded, a line of the label. */
|
|
40
|
+
:where(tanrei-menu[inline][open]:not(:defined)) :where(tanrei-menu-item, tanrei-menu-checkbox-item, tanrei-menu-radio-item, tanrei-submenu) {
|
|
41
|
+
display: block;
|
|
42
|
+
flex: none;
|
|
43
|
+
box-sizing: border-box;
|
|
44
|
+
min-block-size: max(var(--tanrei-comp-menu-container-height), var(--tanrei-sys-target-pointer));
|
|
45
|
+
padding-block: var(--tanrei-comp-menu-container-padding-block);
|
|
46
|
+
font: var(--tanrei-comp-menu-label-typescale-font);
|
|
47
|
+
}
|
|
48
|
+
:where(tanrei-menu[inline][open]:not(:defined)) :where(tanrei-menu-item, tanrei-menu-checkbox-item, tanrei-menu-radio-item, tanrei-submenu)::before {
|
|
49
|
+
content: '';
|
|
50
|
+
display: block;
|
|
51
|
+
/* The label's line, moved down by half of what it is shorter than the tallest glyph beside it. */
|
|
52
|
+
block-size: calc((max(1lh, var(--tanrei-comp-menu-mark-size), var(--tanrei-comp-menu-leading-icon-size), var(--tanrei-comp-menu-trailing-icon-size)) + 1lh) / 2);
|
|
53
|
+
}
|
|
54
|
+
:where(tanrei-menu[inline][open]:not(:defined)) :where(tanrei-menu-item, tanrei-menu-checkbox-item, tanrei-menu-radio-item, tanrei-submenu):where([supporting-text]:not([supporting-text='']))::after {
|
|
55
|
+
content: '';
|
|
56
|
+
display: block;
|
|
57
|
+
font: var(--tanrei-comp-menu-supporting-text-typescale-font);
|
|
58
|
+
block-size: 1lh;
|
|
59
|
+
}
|
|
60
|
+
/* A submenu is a row; its own items are another surface's. (Every element these rules style for the sake of the
|
|
61
|
+
menu's :defined has a name: an engine goes through what is under an element that is defined for the elements such
|
|
62
|
+
rules can style, and a rule for any element makes that everything — src/styles/has.test.ts.) */
|
|
63
|
+
:where(tanrei-menu[inline][open]:not(:defined)) :where(tanrei-submenu) > :where(tanrei-menu-item, tanrei-menu-checkbox-item, tanrei-menu-radio-item, tanrei-submenu, tanrei-menu-group) {
|
|
64
|
+
display: none;
|
|
65
|
+
}
|
|
66
|
+
/* A group's title (not a group's inside a group, MNU-29). */
|
|
67
|
+
:where(tanrei-menu[inline][open]:not(:defined)) > :where(tanrei-menu-group[label]:not([label='']))::before {
|
|
68
|
+
content: '';
|
|
69
|
+
display: block;
|
|
70
|
+
flex: none;
|
|
71
|
+
box-sizing: content-box;
|
|
72
|
+
padding-block: var(--tanrei-comp-menu-container-padding-block);
|
|
73
|
+
font: var(--tanrei-comp-menu-group-title-typescale-font);
|
|
74
|
+
block-size: 1lh;
|
|
75
|
+
}
|
|
76
|
+
/* MNU-23: between a group and what is next to it. */
|
|
77
|
+
:where(tanrei-menu[inline][open]:not(:defined)) > :where(tanrei-menu-group:not(:first-child), tanrei-menu-group + :is(tanrei-menu-item, tanrei-menu-checkbox-item, tanrei-menu-radio-item, tanrei-submenu)) {
|
|
78
|
+
margin-block-start: calc(2 * var(--tanrei-comp-menu-divider-space) + var(--tanrei-comp-menu-divider-thickness));
|
|
79
|
+
}
|
|
80
|
+
/* MNU-35, MNU-36: the gap form — the token's, then the attribute's. */
|
|
81
|
+
@container style(--tanrei-comp-menu-separation: gap) {
|
|
82
|
+
:where(tanrei-menu[inline][open]:not(:defined)) > :where(tanrei-menu-group:not(:first-child), tanrei-menu-group + :is(tanrei-menu-item, tanrei-menu-checkbox-item, tanrei-menu-radio-item, tanrei-submenu)) {
|
|
83
|
+
margin-block-start: var(--tanrei-comp-menu-group-gap);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
:where(tanrei-menu[inline][open][separation='divider']:not(:defined)) > :where(tanrei-menu-group:not(:first-child), tanrei-menu-group + :is(tanrei-menu-item, tanrei-menu-checkbox-item, tanrei-menu-radio-item, tanrei-submenu)) {
|
|
87
|
+
margin-block-start: calc(2 * var(--tanrei-comp-menu-divider-space) + var(--tanrei-comp-menu-divider-thickness));
|
|
88
|
+
}
|
|
89
|
+
:where(tanrei-menu[inline][open][separation='gap']:not(:defined)) > :where(tanrei-menu-group:not(:first-child), tanrei-menu-group + :is(tanrei-menu-item, tanrei-menu-checkbox-item, tanrei-menu-radio-item, tanrei-submenu)) {
|
|
90
|
+
margin-block-start: var(--tanrei-comp-menu-group-gap);
|
|
91
|
+
}
|
|
92
|
+
@media (pointer: coarse) {
|
|
93
|
+
:where(tanrei-menu[inline][open]:not(:defined)) :where(tanrei-menu-item, tanrei-menu-checkbox-item, tanrei-menu-radio-item, tanrei-submenu) {
|
|
94
|
+
min-block-size: max(var(--tanrei-comp-menu-container-height), var(--tanrei-sys-target-touch));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
package/dist/menubar.css
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Menubar before its elements are defined, and where script does not run (specs/menubar.spec.json; MBR-45): a bar's
|
|
3
|
+
* menus and actions draw nothing there — their words are attributes and their work is the product's script — but a
|
|
4
|
+
* link item is the product's own anchor in the document, and it is a link that works:
|
|
5
|
+
*
|
|
6
|
+
* <tanrei-menubar label="Application menu">
|
|
7
|
+
* <tanrei-menubar-menu label="File">…</tanrei-menubar-menu>
|
|
8
|
+
* <tanrei-menubar-item label="Run"></tanrei-menubar-item>
|
|
9
|
+
* <tanrei-menubar-item><a href="/docs/">Documentation</a></tanrei-menubar-item>
|
|
10
|
+
* </tanrei-menubar>
|
|
11
|
+
*
|
|
12
|
+
* - the bar is a row with the bar's paddings, gap and fill, in which only the link items' anchors stand, in the order
|
|
13
|
+
* given, on further lines where one line does not hold them;
|
|
14
|
+
* - each anchor in a title's text style, color, height and paddings, with no underline; it is followed by the browser
|
|
15
|
+
* and takes focus with Tab, as any link: there is no menubar, no menu item and no roving focus until the bar runs;
|
|
16
|
+
* - a disabled link item — an anchor without `href` under `disabled` — is text in the disabled color.
|
|
17
|
+
*
|
|
18
|
+
* What it cannot give: the titles and the actions, so the row holds fewer things than it will, and where it holds no
|
|
19
|
+
* link item it is as tall as its paddings alone. A page that must not move reserves the bar's block size:
|
|
20
|
+
*
|
|
21
|
+
* tanrei-menubar:not(:defined) { min-block-size: calc(var(--tanrei-comp-menubar-container-height) + 2 * var(--tanrei-comp-menubar-bar-padding-block)); }
|
|
22
|
+
*
|
|
23
|
+
* Every value is a `--tanrei-comp-menubar-*` token. Every selector has no specificity (`:where()`), and none matches
|
|
24
|
+
* once the element is defined: the bar then takes the same anchors, where they stand, as its link items.
|
|
25
|
+
*/
|
|
26
|
+
@layer tanrei.components {
|
|
27
|
+
:where(tanrei-menubar:not(:defined)) {
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-wrap: wrap;
|
|
30
|
+
align-items: center;
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
gap: var(--tanrei-comp-menubar-bar-gap);
|
|
33
|
+
padding-block: var(--tanrei-comp-menubar-bar-padding-block);
|
|
34
|
+
padding-inline: var(--tanrei-comp-menubar-bar-padding-inline);
|
|
35
|
+
background: var(--tanrei-comp-menubar-bar-color);
|
|
36
|
+
}
|
|
37
|
+
:where(tanrei-menubar:not(:defined)) > :where(tanrei-menubar-menu) {
|
|
38
|
+
display: none;
|
|
39
|
+
}
|
|
40
|
+
:where(tanrei-menubar:not(:defined)) > :where(tanrei-menubar-item) {
|
|
41
|
+
display: contents;
|
|
42
|
+
}
|
|
43
|
+
:where(tanrei-menubar:not(:defined)) > :where(tanrei-menubar-item) > :where(a) {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex: none;
|
|
46
|
+
align-items: center;
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
min-block-size: var(--tanrei-comp-menubar-container-height);
|
|
49
|
+
padding-inline: var(--tanrei-comp-menubar-container-padding-inline);
|
|
50
|
+
border-radius: var(--tanrei-comp-menubar-container-shape);
|
|
51
|
+
font: var(--tanrei-comp-menubar-label-typescale-font);
|
|
52
|
+
letter-spacing: var(--tanrei-comp-menubar-label-typescale-letter-spacing);
|
|
53
|
+
white-space: nowrap;
|
|
54
|
+
color: var(--tanrei-comp-menubar-unselected-label-color);
|
|
55
|
+
text-decoration: none;
|
|
56
|
+
}
|
|
57
|
+
:where(tanrei-menubar:not(:defined)) > :where(tanrei-menubar-item) > :where(a[aria-current]:not([aria-current='false'])) {
|
|
58
|
+
font-weight: var(--tanrei-comp-menubar-label-typescale-font-weight-emphasized);
|
|
59
|
+
}
|
|
60
|
+
:where(tanrei-menubar:not(:defined)) > :where(tanrei-menubar-item[disabled]) > :where(a) {
|
|
61
|
+
color: var(--tanrei-comp-menubar-unselected-disabled-label-color);
|
|
62
|
+
}
|
|
63
|
+
/* Hidden: the rules above name a display, and an author's rule beats the browser's for the attribute. */
|
|
64
|
+
:where(tanrei-menubar[hidden]:not([hidden='until-found' i]):not(:defined)),
|
|
65
|
+
:where(tanrei-menubar:not(:defined)) > :where(tanrei-menubar-item[hidden]:not([hidden='until-found' i])),
|
|
66
|
+
:where(tanrei-menubar:not(:defined)) > :where(tanrei-menubar-item) > :where(a[hidden]:not([hidden='until-found' i])) {
|
|
67
|
+
display: none;
|
|
68
|
+
}
|
|
69
|
+
}
|