@fusion.dev/helix 0.0.0-dev
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 +21 -0
- package/custom-elements.json +99157 -0
- package/dist/accordion/index.d.ts +2 -0
- package/dist/accordion/index.js +2 -0
- package/dist/accordion/item/accordion-item.css.d.ts +1 -0
- package/dist/accordion/item/accordion-item.css.js +92 -0
- package/dist/accordion/item/accordion-item.d.ts +39 -0
- package/dist/accordion/item/accordion-item.js +45 -0
- package/dist/accordion/root/accordion-root.css.d.ts +1 -0
- package/dist/accordion/root/accordion-root.css.js +25 -0
- package/dist/accordion/root/accordion-root.d.ts +49 -0
- package/dist/accordion/root/accordion-root.js +40 -0
- package/dist/announcement/index.d.ts +1 -0
- package/dist/announcement/index.js +1 -0
- package/dist/announcement/root/announcement-root.css.d.ts +1 -0
- package/dist/announcement/root/announcement-root.css.js +145 -0
- package/dist/announcement/root/announcement-root.d.ts +26 -0
- package/dist/announcement/root/announcement-root.js +32 -0
- package/dist/app-header/index.d.ts +1 -0
- package/dist/app-header/index.js +1 -0
- package/dist/app-header/root/app-header-root.css.d.ts +1 -0
- package/dist/app-header/root/app-header-root.css.js +112 -0
- package/dist/app-header/root/app-header-root.d.ts +103 -0
- package/dist/app-header/root/app-header-root.js +72 -0
- package/dist/aura/index.d.ts +1 -0
- package/dist/aura/index.js +1 -0
- package/dist/aura/root/aura-axis.d.ts +61 -0
- package/dist/aura/root/aura-axis.js +68 -0
- package/dist/aura/root/aura-root.css.d.ts +1 -0
- package/dist/aura/root/aura-root.css.js +35 -0
- package/dist/aura/root/aura-root.d.ts +447 -0
- package/dist/aura/root/aura-root.js +1024 -0
- package/dist/aura/root/aura-shader.d.ts +46 -0
- package/dist/aura/root/aura-shader.js +1145 -0
- package/dist/avatar/group/avatar-group.css.d.ts +1 -0
- package/dist/avatar/group/avatar-group.css.js +48 -0
- package/dist/avatar/group/avatar-group.d.ts +34 -0
- package/dist/avatar/group/avatar-group.js +40 -0
- package/dist/avatar/index.d.ts +2 -0
- package/dist/avatar/index.js +2 -0
- package/dist/avatar/root/avatar-root.css.d.ts +1 -0
- package/dist/avatar/root/avatar-root.css.js +55 -0
- package/dist/avatar/root/avatar-root.d.ts +41 -0
- package/dist/avatar/root/avatar-root.js +46 -0
- package/dist/badge/index.d.ts +1 -0
- package/dist/badge/index.js +1 -0
- package/dist/badge/root/badge-root.css.d.ts +1 -0
- package/dist/badge/root/badge-root.css.js +91 -0
- package/dist/badge/root/badge-root.d.ts +38 -0
- package/dist/badge/root/badge-root.js +38 -0
- package/dist/bar-chart/index.d.ts +1 -0
- package/dist/bar-chart/index.js +1 -0
- package/dist/bar-chart/root/bar-chart-root.css.d.ts +1 -0
- package/dist/bar-chart/root/bar-chart-root.css.js +445 -0
- package/dist/bar-chart/root/bar-chart-root.d.ts +177 -0
- package/dist/bar-chart/root/bar-chart-root.js +122 -0
- package/dist/blockquote/index.d.ts +1 -0
- package/dist/blockquote/index.js +1 -0
- package/dist/blockquote/root/blockquote-root.css.d.ts +1 -0
- package/dist/blockquote/root/blockquote-root.css.js +42 -0
- package/dist/blockquote/root/blockquote-root.d.ts +27 -0
- package/dist/blockquote/root/blockquote-root.js +33 -0
- package/dist/breadcrumbs/breadcrumb/breadcrumb.css.d.ts +1 -0
- package/dist/breadcrumbs/breadcrumb/breadcrumb.css.js +109 -0
- package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +38 -0
- package/dist/breadcrumbs/breadcrumb/breadcrumb.js +44 -0
- package/dist/breadcrumbs/index.d.ts +2 -0
- package/dist/breadcrumbs/index.js +2 -0
- package/dist/breadcrumbs/root/breadcrumbs-root.css.d.ts +1 -0
- package/dist/breadcrumbs/root/breadcrumbs-root.css.js +23 -0
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +29 -0
- package/dist/breadcrumbs/root/breadcrumbs-root.js +35 -0
- package/dist/button/index.d.ts +1 -0
- package/dist/button/index.js +1 -0
- package/dist/button/root/button-root.css.d.ts +1 -0
- package/dist/button/root/button-root.css.js +190 -0
- package/dist/button/root/button-root.d.ts +95 -0
- package/dist/button/root/button-root.js +59 -0
- package/dist/button-group/index.d.ts +1 -0
- package/dist/button-group/index.js +1 -0
- package/dist/button-group/root/button-group-root.css.d.ts +1 -0
- package/dist/button-group/root/button-group-root.css.js +54 -0
- package/dist/button-group/root/button-group-root.d.ts +48 -0
- package/dist/button-group/root/button-group-root.js +44 -0
- package/dist/callout/index.d.ts +1 -0
- package/dist/callout/index.js +1 -0
- package/dist/callout/root/callout-root.css.d.ts +1 -0
- package/dist/callout/root/callout-root.css.js +82 -0
- package/dist/callout/root/callout-root.d.ts +36 -0
- package/dist/callout/root/callout-root.js +42 -0
- package/dist/card/index.d.ts +1 -0
- package/dist/card/index.js +1 -0
- package/dist/card/root/card-root.css.d.ts +1 -0
- package/dist/card/root/card-root.css.js +111 -0
- package/dist/card/root/card-root.d.ts +120 -0
- package/dist/card/root/card-root.js +74 -0
- package/dist/carousel/index.d.ts +1 -0
- package/dist/carousel/index.js +1 -0
- package/dist/carousel/root/carousel-root.css.d.ts +1 -0
- package/dist/carousel/root/carousel-root.css.js +347 -0
- package/dist/carousel/root/carousel-root.d.ts +111 -0
- package/dist/carousel/root/carousel-root.js +53 -0
- package/dist/chat/composer/chat-composer.css.d.ts +1 -0
- package/dist/chat/composer/chat-composer.css.js +103 -0
- package/dist/chat/composer/chat-composer.d.ts +37 -0
- package/dist/chat/composer/chat-composer.js +43 -0
- package/dist/chat/index.d.ts +3 -0
- package/dist/chat/index.js +3 -0
- package/dist/chat/message/chat-message.css.d.ts +1 -0
- package/dist/chat/message/chat-message.css.js +270 -0
- package/dist/chat/message/chat-message.d.ts +66 -0
- package/dist/chat/message/chat-message.js +50 -0
- package/dist/chat/root/chat-root.css.d.ts +1 -0
- package/dist/chat/root/chat-root.css.js +134 -0
- package/dist/chat/root/chat-root.d.ts +51 -0
- package/dist/chat/root/chat-root.js +57 -0
- package/dist/checkbox/index.d.ts +1 -0
- package/dist/checkbox/index.js +1 -0
- package/dist/checkbox/root/checkbox-root.css.d.ts +1 -0
- package/dist/checkbox/root/checkbox-root.css.js +177 -0
- package/dist/checkbox/root/checkbox-root.d.ts +51 -0
- package/dist/checkbox/root/checkbox-root.js +48 -0
- package/dist/checkbox-group/index.d.ts +1 -0
- package/dist/checkbox-group/index.js +1 -0
- package/dist/checkbox-group/root/checkbox-group-root.css.d.ts +1 -0
- package/dist/checkbox-group/root/checkbox-group-root.css.js +30 -0
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +29 -0
- package/dist/checkbox-group/root/checkbox-group-root.js +37 -0
- package/dist/code/index.d.ts +1 -0
- package/dist/code/index.js +1 -0
- package/dist/code/root/code-root.css.d.ts +1 -0
- package/dist/code/root/code-root.css.js +30 -0
- package/dist/code/root/code-root.d.ts +27 -0
- package/dist/code/root/code-root.js +33 -0
- package/dist/code-block/index.d.ts +1 -0
- package/dist/code-block/index.js +1 -0
- package/dist/code-block/root/code-block-root.css.d.ts +1 -0
- package/dist/code-block/root/code-block-root.css.js +84 -0
- package/dist/code-block/root/code-block-root.d.ts +31 -0
- package/dist/code-block/root/code-block-root.js +37 -0
- package/dist/color-input/index.d.ts +1 -0
- package/dist/color-input/index.js +1 -0
- package/dist/color-input/root/color-input-root.css.d.ts +1 -0
- package/dist/color-input/root/color-input-root.css.js +193 -0
- package/dist/color-input/root/color-input-root.d.ts +50 -0
- package/dist/color-input/root/color-input-root.js +62 -0
- package/dist/color-picker/index.d.ts +1 -0
- package/dist/color-picker/index.js +1 -0
- package/dist/color-picker/root/color-picker-root.css.d.ts +1 -0
- package/dist/color-picker/root/color-picker-root.css.js +282 -0
- package/dist/color-picker/root/color-picker-root.d.ts +53 -0
- package/dist/color-picker/root/color-picker-root.js +64 -0
- package/dist/combobox/index.d.ts +1 -0
- package/dist/combobox/index.js +1 -0
- package/dist/combobox/root/combobox-root.css.d.ts +1 -0
- package/dist/combobox/root/combobox-root.css.js +249 -0
- package/dist/combobox/root/combobox-root.d.ts +37 -0
- package/dist/combobox/root/combobox-root.js +49 -0
- package/dist/command/index.d.ts +1 -0
- package/dist/command/index.js +1 -0
- package/dist/command/root/command-root.css.d.ts +1 -0
- package/dist/command/root/command-root.css.js +76 -0
- package/dist/command/root/command-root.d.ts +31 -0
- package/dist/command/root/command-root.js +40 -0
- package/dist/copy-button/index.d.ts +1 -0
- package/dist/copy-button/index.js +1 -0
- package/dist/copy-button/root/copy-button-root.css.d.ts +1 -0
- package/dist/copy-button/root/copy-button-root.css.js +37 -0
- package/dist/copy-button/root/copy-button-root.d.ts +28 -0
- package/dist/copy-button/root/copy-button-root.js +34 -0
- package/dist/data-table/index.d.ts +1 -0
- package/dist/data-table/index.js +1 -0
- package/dist/data-table/root/data-table-root.css.d.ts +1 -0
- package/dist/data-table/root/data-table-root.css.js +91 -0
- package/dist/data-table/root/data-table-root.d.ts +49 -0
- package/dist/data-table/root/data-table-root.js +55 -0
- package/dist/date-input/index.d.ts +1 -0
- package/dist/date-input/index.js +1 -0
- package/dist/date-input/root/date-input-root.css.d.ts +1 -0
- package/dist/date-input/root/date-input-root.css.js +172 -0
- package/dist/date-input/root/date-input-root.d.ts +44 -0
- package/dist/date-input/root/date-input-root.js +59 -0
- package/dist/date-picker/index.d.ts +1 -0
- package/dist/date-picker/index.js +1 -0
- package/dist/date-picker/root/date-picker-root.css.d.ts +1 -0
- package/dist/date-picker/root/date-picker-root.css.js +219 -0
- package/dist/date-picker/root/date-picker-root.d.ts +38 -0
- package/dist/date-picker/root/date-picker-root.js +44 -0
- package/dist/dialog/index.d.ts +1 -0
- package/dist/dialog/index.js +1 -0
- package/dist/dialog/root/dialog-root.css.d.ts +1 -0
- package/dist/dialog/root/dialog-root.css.js +184 -0
- package/dist/dialog/root/dialog-root.d.ts +81 -0
- package/dist/dialog/root/dialog-root.js +54 -0
- package/dist/divider/index.d.ts +1 -0
- package/dist/divider/index.js +1 -0
- package/dist/divider/root/divider-root.css.d.ts +1 -0
- package/dist/divider/root/divider-root.css.js +82 -0
- package/dist/divider/root/divider-root.d.ts +34 -0
- package/dist/divider/root/divider-root.js +40 -0
- package/dist/donut-chart/index.d.ts +1 -0
- package/dist/donut-chart/index.js +1 -0
- package/dist/donut-chart/root/donut-chart-root.css.d.ts +1 -0
- package/dist/donut-chart/root/donut-chart-root.css.js +326 -0
- package/dist/donut-chart/root/donut-chart-root.d.ts +111 -0
- package/dist/donut-chart/root/donut-chart-root.js +76 -0
- package/dist/drawer/index.d.ts +1 -0
- package/dist/drawer/index.js +1 -0
- package/dist/drawer/root/drawer-root.css.d.ts +1 -0
- package/dist/drawer/root/drawer-root.css.js +151 -0
- package/dist/drawer/root/drawer-root.d.ts +69 -0
- package/dist/drawer/root/drawer-root.js +58 -0
- package/dist/drilldown/index.d.ts +2 -0
- package/dist/drilldown/index.js +2 -0
- package/dist/drilldown/item/drilldown-item.css.d.ts +1 -0
- package/dist/drilldown/item/drilldown-item.css.js +47 -0
- package/dist/drilldown/item/drilldown-item.d.ts +25 -0
- package/dist/drilldown/item/drilldown-item.js +31 -0
- package/dist/drilldown/root/drilldown-root.css.d.ts +1 -0
- package/dist/drilldown/root/drilldown-root.css.js +125 -0
- package/dist/drilldown/root/drilldown-root.d.ts +33 -0
- package/dist/drilldown/root/drilldown-root.js +39 -0
- package/dist/element-events.generated.d.ts +1 -0
- package/dist/element-events.generated.js +123 -0
- package/dist/empty/index.d.ts +1 -0
- package/dist/empty/index.js +1 -0
- package/dist/empty/root/empty-root.css.d.ts +1 -0
- package/dist/empty/root/empty-root.css.js +45 -0
- package/dist/empty/root/empty-root.d.ts +26 -0
- package/dist/empty/root/empty-root.js +32 -0
- package/dist/file-input/index.d.ts +1 -0
- package/dist/file-input/index.js +1 -0
- package/dist/file-input/root/file-input-root.css.d.ts +1 -0
- package/dist/file-input/root/file-input-root.css.js +194 -0
- package/dist/file-input/root/file-input-root.d.ts +40 -0
- package/dist/file-input/root/file-input-root.js +53 -0
- package/dist/flex/index.d.ts +1 -0
- package/dist/flex/index.js +1 -0
- package/dist/flex/root/flex-root.css.d.ts +1 -0
- package/dist/flex/root/flex-root.css.js +81 -0
- package/dist/flex/root/flex-root.d.ts +61 -0
- package/dist/flex/root/flex-root.js +75 -0
- package/dist/format-date/index.d.ts +1 -0
- package/dist/format-date/index.js +1 -0
- package/dist/format-date/root/format-date-root.css.d.ts +1 -0
- package/dist/format-date/root/format-date-root.css.js +15 -0
- package/dist/format-date/root/format-date-root.d.ts +28 -0
- package/dist/format-date/root/format-date-root.js +34 -0
- package/dist/grid/index.d.ts +1 -0
- package/dist/grid/index.js +1 -0
- package/dist/grid/root/grid-root.css.d.ts +1 -0
- package/dist/grid/root/grid-root.css.js +74 -0
- package/dist/grid/root/grid-root.d.ts +79 -0
- package/dist/grid/root/grid-root.js +125 -0
- package/dist/heatmap/index.d.ts +1 -0
- package/dist/heatmap/index.js +1 -0
- package/dist/heatmap/root/heatmap-root.css.d.ts +1 -0
- package/dist/heatmap/root/heatmap-root.css.js +141 -0
- package/dist/heatmap/root/heatmap-root.d.ts +87 -0
- package/dist/heatmap/root/heatmap-root.js +96 -0
- package/dist/icon/glyph.css.d.ts +1 -0
- package/dist/icon/glyph.css.js +7 -0
- package/dist/icon/index.d.ts +1 -0
- package/dist/icon/index.js +1 -0
- package/dist/icon/root/icon-root.css.d.ts +1 -0
- package/dist/icon/root/icon-root.css.js +20 -0
- package/dist/icon/root/icon-root.d.ts +29 -0
- package/dist/icon/root/icon-root.js +35 -0
- package/dist/icon-button/index.d.ts +1 -0
- package/dist/icon-button/index.js +1 -0
- package/dist/icon-button/root/icon-button-root.css.d.ts +1 -0
- package/dist/icon-button/root/icon-button-root.css.js +165 -0
- package/dist/icon-button/root/icon-button-root.d.ts +65 -0
- package/dist/icon-button/root/icon-button-root.js +63 -0
- package/dist/image/index.d.ts +1 -0
- package/dist/image/index.js +1 -0
- package/dist/image/root/image-root.css.d.ts +1 -0
- package/dist/image/root/image-root.css.js +73 -0
- package/dist/image/root/image-root.d.ts +39 -0
- package/dist/image/root/image-root.js +52 -0
- package/dist/index.d.ts +100 -0
- package/dist/index.js +100 -0
- package/dist/input/index.d.ts +1 -0
- package/dist/input/index.js +1 -0
- package/dist/input/root/input-root.css.d.ts +1 -0
- package/dist/input/root/input-root.css.js +123 -0
- package/dist/input/root/input-root.d.ts +36 -0
- package/dist/input/root/input-root.js +48 -0
- package/dist/kbd/index.d.ts +1 -0
- package/dist/kbd/index.js +1 -0
- package/dist/kbd/root/kbd-root.css.d.ts +1 -0
- package/dist/kbd/root/kbd-root.css.js +47 -0
- package/dist/kbd/root/kbd-root.d.ts +30 -0
- package/dist/kbd/root/kbd-root.js +36 -0
- package/dist/legend/index.d.ts +1 -0
- package/dist/legend/index.js +1 -0
- package/dist/legend/root/legend-root.css.d.ts +1 -0
- package/dist/legend/root/legend-root.css.js +90 -0
- package/dist/legend/root/legend-root.d.ts +128 -0
- package/dist/legend/root/legend-root.js +99 -0
- package/dist/line-chart/index.d.ts +1 -0
- package/dist/line-chart/index.js +1 -0
- package/dist/line-chart/root/line-chart-root.css.d.ts +1 -0
- package/dist/line-chart/root/line-chart-root.css.js +293 -0
- package/dist/line-chart/root/line-chart-root.d.ts +106 -0
- package/dist/line-chart/root/line-chart-root.js +74 -0
- package/dist/list/index.d.ts +2 -0
- package/dist/list/index.js +2 -0
- package/dist/list/item/list-item.css.d.ts +1 -0
- package/dist/list/item/list-item.css.js +70 -0
- package/dist/list/item/list-item.d.ts +49 -0
- package/dist/list/item/list-item.js +58 -0
- package/dist/list/root/list-root.css.d.ts +1 -0
- package/dist/list/root/list-root.css.js +76 -0
- package/dist/list/root/list-root.d.ts +54 -0
- package/dist/list/root/list-root.js +50 -0
- package/dist/listbox/index.d.ts +1 -0
- package/dist/listbox/index.js +1 -0
- package/dist/listbox/root/listbox-root.css.d.ts +1 -0
- package/dist/listbox/root/listbox-root.css.js +110 -0
- package/dist/listbox/root/listbox-root.d.ts +30 -0
- package/dist/listbox/root/listbox-root.js +38 -0
- package/dist/loader/index.d.ts +1 -0
- package/dist/loader/index.js +1 -0
- package/dist/loader/root/loader-root.css.d.ts +1 -0
- package/dist/loader/root/loader-root.css.js +159 -0
- package/dist/loader/root/loader-root.d.ts +49 -0
- package/dist/loader/root/loader-root.js +42 -0
- package/dist/megamenu/index.d.ts +1 -0
- package/dist/megamenu/index.js +1 -0
- package/dist/megamenu/root/megamenu-root.css.d.ts +1 -0
- package/dist/megamenu/root/megamenu-root.css.js +153 -0
- package/dist/megamenu/root/megamenu-root.d.ts +34 -0
- package/dist/megamenu/root/megamenu-root.js +40 -0
- package/dist/menu/index.d.ts +2 -0
- package/dist/menu/index.js +2 -0
- package/dist/menu/item/menu-item.css.d.ts +1 -0
- package/dist/menu/item/menu-item.css.js +87 -0
- package/dist/menu/item/menu-item.d.ts +26 -0
- package/dist/menu/item/menu-item.js +32 -0
- package/dist/menu/root/menu-root.css.d.ts +1 -0
- package/dist/menu/root/menu-root.css.js +161 -0
- package/dist/menu/root/menu-root.d.ts +36 -0
- package/dist/menu/root/menu-root.js +42 -0
- package/dist/meter/index.d.ts +1 -0
- package/dist/meter/index.js +1 -0
- package/dist/meter/root/meter-root.css.d.ts +1 -0
- package/dist/meter/root/meter-root.css.js +218 -0
- package/dist/meter/root/meter-root.d.ts +79 -0
- package/dist/meter/root/meter-root.js +72 -0
- package/dist/mixins/mixin-control-surface/mixin-control-surface.d.ts +28 -0
- package/dist/mixins/mixin-control-surface/mixin-control-surface.js +21 -0
- package/dist/navigation/index.d.ts +1 -0
- package/dist/navigation/index.js +1 -0
- package/dist/navigation/root/navigation-root.css.d.ts +1 -0
- package/dist/navigation/root/navigation-root.css.js +50 -0
- package/dist/navigation/root/navigation-root.d.ts +28 -0
- package/dist/navigation/root/navigation-root.js +34 -0
- package/dist/notifications/index.d.ts +2 -0
- package/dist/notifications/index.js +2 -0
- package/dist/notifications/notification/notification.css.d.ts +1 -0
- package/dist/notifications/notification/notification.css.js +194 -0
- package/dist/notifications/notification/notification.d.ts +64 -0
- package/dist/notifications/notification/notification.js +71 -0
- package/dist/notifications/root/notifications-root.css.d.ts +1 -0
- package/dist/notifications/root/notifications-root.css.js +94 -0
- package/dist/notifications/root/notifications-root.d.ts +43 -0
- package/dist/notifications/root/notifications-root.js +49 -0
- package/dist/number-input/index.d.ts +1 -0
- package/dist/number-input/index.js +1 -0
- package/dist/number-input/root/number-input-root.css.d.ts +1 -0
- package/dist/number-input/root/number-input-root.css.js +149 -0
- package/dist/number-input/root/number-input-root.d.ts +41 -0
- package/dist/number-input/root/number-input-root.js +49 -0
- package/dist/option/group/option-group.css.d.ts +1 -0
- package/dist/option/group/option-group.css.js +24 -0
- package/dist/option/group/option-group.d.ts +23 -0
- package/dist/option/group/option-group.js +29 -0
- package/dist/option/index.d.ts +2 -0
- package/dist/option/index.js +2 -0
- package/dist/option/root/option-root.css.d.ts +1 -0
- package/dist/option/root/option-root.css.js +93 -0
- package/dist/option/root/option-root.d.ts +30 -0
- package/dist/option/root/option-root.js +36 -0
- package/dist/outline/index.d.ts +1 -0
- package/dist/outline/index.js +1 -0
- package/dist/outline/root/outline-root.css.d.ts +1 -0
- package/dist/outline/root/outline-root.css.js +144 -0
- package/dist/outline/root/outline-root.d.ts +31 -0
- package/dist/outline/root/outline-root.js +37 -0
- package/dist/pagination/index.d.ts +3 -0
- package/dist/pagination/index.js +3 -0
- package/dist/pagination/root/pagination-root.css.d.ts +1 -0
- package/dist/pagination/root/pagination-root.css.js +158 -0
- package/dist/pagination/root/pagination-root.d.ts +59 -0
- package/dist/pagination/root/pagination-root.js +65 -0
- package/dist/pagination/size/pagination-size.css.d.ts +1 -0
- package/dist/pagination/size/pagination-size.css.js +24 -0
- package/dist/pagination/size/pagination-size.d.ts +31 -0
- package/dist/pagination/size/pagination-size.js +44 -0
- package/dist/pagination/summary/pagination-summary.css.d.ts +1 -0
- package/dist/pagination/summary/pagination-summary.css.js +9 -0
- package/dist/pagination/summary/pagination-summary.d.ts +23 -0
- package/dist/pagination/summary/pagination-summary.js +29 -0
- package/dist/pin-input/index.d.ts +1 -0
- package/dist/pin-input/index.js +1 -0
- package/dist/pin-input/root/pin-input-root.css.d.ts +1 -0
- package/dist/pin-input/root/pin-input-root.css.js +74 -0
- package/dist/pin-input/root/pin-input-root.d.ts +37 -0
- package/dist/pin-input/root/pin-input-root.js +45 -0
- package/dist/popover/index.d.ts +1 -0
- package/dist/popover/index.js +1 -0
- package/dist/popover/root/popover-root.css.d.ts +1 -0
- package/dist/popover/root/popover-root.css.js +93 -0
- package/dist/popover/root/popover-root.d.ts +53 -0
- package/dist/popover/root/popover-root.js +50 -0
- package/dist/progress/index.d.ts +1 -0
- package/dist/progress/index.js +1 -0
- package/dist/progress/root/progress-root.css.d.ts +1 -0
- package/dist/progress/root/progress-root.css.js +225 -0
- package/dist/progress/root/progress-root.d.ts +54 -0
- package/dist/progress/root/progress-root.js +45 -0
- package/dist/qr-code/index.d.ts +1 -0
- package/dist/qr-code/index.js +1 -0
- package/dist/qr-code/root/qr-code-root.css.d.ts +1 -0
- package/dist/qr-code/root/qr-code-root.css.js +58 -0
- package/dist/qr-code/root/qr-code-root.d.ts +37 -0
- package/dist/qr-code/root/qr-code-root.js +43 -0
- package/dist/quote/index.d.ts +1 -0
- package/dist/quote/index.js +1 -0
- package/dist/quote/root/quote-root.css.d.ts +1 -0
- package/dist/quote/root/quote-root.css.js +20 -0
- package/dist/quote/root/quote-root.d.ts +25 -0
- package/dist/quote/root/quote-root.js +31 -0
- package/dist/radio/group/radio-group.css.d.ts +1 -0
- package/dist/radio/group/radio-group.css.js +23 -0
- package/dist/radio/group/radio-group.d.ts +26 -0
- package/dist/radio/group/radio-group.js +34 -0
- package/dist/radio/index.d.ts +2 -0
- package/dist/radio/index.js +2 -0
- package/dist/radio/root/radio-root.css.d.ts +1 -0
- package/dist/radio/root/radio-root.css.js +198 -0
- package/dist/radio/root/radio-root.d.ts +73 -0
- package/dist/radio/root/radio-root.js +74 -0
- package/dist/rating/index.d.ts +1 -0
- package/dist/rating/index.js +1 -0
- package/dist/rating/root/rating-root.css.d.ts +1 -0
- package/dist/rating/root/rating-root.css.js +122 -0
- package/dist/rating/root/rating-root.d.ts +52 -0
- package/dist/rating/root/rating-root.js +42 -0
- package/dist/sandbox/index.d.ts +20 -0
- package/dist/sandbox/index.js +20 -0
- package/dist/sandbox/preview/sandbox-preview.css.d.ts +1 -0
- package/dist/sandbox/preview/sandbox-preview.css.js +14 -0
- package/dist/sandbox/preview/sandbox-preview.d.ts +224 -0
- package/dist/sandbox/preview/sandbox-preview.js +306 -0
- package/dist/sandbox/root/sandbox-root.css.d.ts +1 -0
- package/dist/sandbox/root/sandbox-root.css.js +73 -0
- package/dist/sandbox/root/sandbox-root.d.ts +324 -0
- package/dist/sandbox/root/sandbox-root.js +569 -0
- package/dist/sandbox/source/sandbox-source.css.d.ts +1 -0
- package/dist/sandbox/source/sandbox-source.css.js +27 -0
- package/dist/sandbox/source/sandbox-source.d.ts +105 -0
- package/dist/sandbox/source/sandbox-source.js +173 -0
- package/dist/sandbox/status-bar/sandbox-status-bar.css.d.ts +1 -0
- package/dist/sandbox/status-bar/sandbox-status-bar.css.js +23 -0
- package/dist/sandbox/status-bar/sandbox-status-bar.d.ts +59 -0
- package/dist/sandbox/status-bar/sandbox-status-bar.js +86 -0
- package/dist/sandbox/terminal/sandbox-terminal.css.d.ts +1 -0
- package/dist/sandbox/terminal/sandbox-terminal.css.js +69 -0
- package/dist/sandbox/terminal/sandbox-terminal.d.ts +71 -0
- package/dist/sandbox/terminal/sandbox-terminal.js +130 -0
- package/dist/sandbox/toolbar/sandbox-toolbar.css.d.ts +1 -0
- package/dist/sandbox/toolbar/sandbox-toolbar.css.js +32 -0
- package/dist/sandbox/toolbar/sandbox-toolbar.d.ts +37 -0
- package/dist/sandbox/toolbar/sandbox-toolbar.js +49 -0
- package/dist/scroll-area/index.d.ts +1 -0
- package/dist/scroll-area/index.js +1 -0
- package/dist/scroll-area/root/scroll-area-root.css.d.ts +1 -0
- package/dist/scroll-area/root/scroll-area-root.css.js +118 -0
- package/dist/scroll-area/root/scroll-area-root.d.ts +34 -0
- package/dist/scroll-area/root/scroll-area-root.js +40 -0
- package/dist/select/index.d.ts +1 -0
- package/dist/select/index.js +1 -0
- package/dist/select/root/select-root.css.d.ts +1 -0
- package/dist/select/root/select-root.css.js +197 -0
- package/dist/select/root/select-root.d.ts +71 -0
- package/dist/select/root/select-root.js +60 -0
- package/dist/shared/chart/series.css.d.ts +1 -0
- package/dist/shared/chart/series.css.js +35 -0
- package/dist/shared/chart/terminus.css.d.ts +1 -0
- package/dist/shared/chart/terminus.css.js +41 -0
- package/dist/shared/field/field-inline.css.d.ts +1 -0
- package/dist/shared/field/field-inline.css.js +7 -0
- package/dist/shared/field/field-stacked.css.d.ts +1 -0
- package/dist/shared/field/field-stacked.css.js +7 -0
- package/dist/shared/field/field.css.d.ts +1 -0
- package/dist/shared/field/field.css.js +59 -0
- package/dist/skeleton/index.d.ts +1 -0
- package/dist/skeleton/index.js +1 -0
- package/dist/skeleton/root/skeleton-root.css.d.ts +1 -0
- package/dist/skeleton/root/skeleton-root.css.js +74 -0
- package/dist/skeleton/root/skeleton-root.d.ts +34 -0
- package/dist/skeleton/root/skeleton-root.js +38 -0
- package/dist/slider/index.d.ts +1 -0
- package/dist/slider/index.js +1 -0
- package/dist/slider/root/slider-root.css.d.ts +1 -0
- package/dist/slider/root/slider-root.css.js +335 -0
- package/dist/slider/root/slider-root.d.ts +42 -0
- package/dist/slider/root/slider-root.js +50 -0
- package/dist/sparkline/index.d.ts +1 -0
- package/dist/sparkline/index.js +1 -0
- package/dist/sparkline/root/sparkline-root.css.d.ts +1 -0
- package/dist/sparkline/root/sparkline-root.css.js +103 -0
- package/dist/sparkline/root/sparkline-root.d.ts +114 -0
- package/dist/sparkline/root/sparkline-root.js +67 -0
- package/dist/speed-dial/index.d.ts +2 -0
- package/dist/speed-dial/index.js +2 -0
- package/dist/speed-dial/item/speed-dial-item.css.d.ts +1 -0
- package/dist/speed-dial/item/speed-dial-item.css.js +80 -0
- package/dist/speed-dial/item/speed-dial-item.d.ts +26 -0
- package/dist/speed-dial/item/speed-dial-item.js +32 -0
- package/dist/speed-dial/root/speed-dial-root.css.d.ts +1 -0
- package/dist/speed-dial/root/speed-dial-root.css.js +140 -0
- package/dist/speed-dial/root/speed-dial-root.d.ts +27 -0
- package/dist/speed-dial/root/speed-dial-root.js +34 -0
- package/dist/splitter/index.d.ts +1 -0
- package/dist/splitter/index.js +1 -0
- package/dist/splitter/root/splitter-root.css.d.ts +1 -0
- package/dist/splitter/root/splitter-root.css.js +203 -0
- package/dist/splitter/root/splitter-root.d.ts +78 -0
- package/dist/splitter/root/splitter-root.js +70 -0
- package/dist/stat/group/stat-group.css.d.ts +1 -0
- package/dist/stat/group/stat-group.css.js +12 -0
- package/dist/stat/group/stat-group.d.ts +30 -0
- package/dist/stat/group/stat-group.js +43 -0
- package/dist/stat/index.d.ts +2 -0
- package/dist/stat/index.js +2 -0
- package/dist/stat/root/stat-root.css.d.ts +1 -0
- package/dist/stat/root/stat-root.css.js +60 -0
- package/dist/stat/root/stat-root.d.ts +27 -0
- package/dist/stat/root/stat-root.js +33 -0
- package/dist/steps/index.d.ts +2 -0
- package/dist/steps/index.js +2 -0
- package/dist/steps/root/steps-root.css.d.ts +1 -0
- package/dist/steps/root/steps-root.css.js +94 -0
- package/dist/steps/root/steps-root.d.ts +36 -0
- package/dist/steps/root/steps-root.js +42 -0
- package/dist/steps/step/step.css.d.ts +1 -0
- package/dist/steps/step/step.css.js +158 -0
- package/dist/steps/step/step.d.ts +20 -0
- package/dist/steps/step/step.js +30 -0
- package/dist/switch/index.d.ts +1 -0
- package/dist/switch/index.js +1 -0
- package/dist/switch/root/switch-root.css.d.ts +1 -0
- package/dist/switch/root/switch-root.css.js +113 -0
- package/dist/switch/root/switch-root.d.ts +42 -0
- package/dist/switch/root/switch-root.js +50 -0
- package/dist/table/cell/table-cell.css.d.ts +1 -0
- package/dist/table/cell/table-cell.css.js +25 -0
- package/dist/table/cell/table-cell.d.ts +24 -0
- package/dist/table/cell/table-cell.js +30 -0
- package/dist/table/column/table-column.css.d.ts +1 -0
- package/dist/table/column/table-column.css.js +21 -0
- package/dist/table/column/table-column.d.ts +23 -0
- package/dist/table/column/table-column.js +29 -0
- package/dist/table/index.d.ts +4 -0
- package/dist/table/index.js +4 -0
- package/dist/table/root/table-root.css.d.ts +1 -0
- package/dist/table/root/table-root.css.js +39 -0
- package/dist/table/root/table-root.d.ts +29 -0
- package/dist/table/root/table-root.js +35 -0
- package/dist/table/row/table-row.css.d.ts +1 -0
- package/dist/table/row/table-row.css.js +5 -0
- package/dist/table/row/table-row.d.ts +24 -0
- package/dist/table/row/table-row.js +30 -0
- package/dist/tabs/index.d.ts +3 -0
- package/dist/tabs/index.js +3 -0
- package/dist/tabs/panel/tab-panel.css.d.ts +1 -0
- package/dist/tabs/panel/tab-panel.css.js +17 -0
- package/dist/tabs/panel/tab-panel.d.ts +26 -0
- package/dist/tabs/panel/tab-panel.js +32 -0
- package/dist/tabs/root/tabs-root.css.d.ts +1 -0
- package/dist/tabs/root/tabs-root.css.js +136 -0
- package/dist/tabs/root/tabs-root.d.ts +29 -0
- package/dist/tabs/root/tabs-root.js +35 -0
- package/dist/tabs/tab/tab.css.d.ts +1 -0
- package/dist/tabs/tab/tab.css.js +57 -0
- package/dist/tabs/tab/tab.d.ts +26 -0
- package/dist/tabs/tab/tab.js +32 -0
- package/dist/tag/index.d.ts +1 -0
- package/dist/tag/index.js +1 -0
- package/dist/tag/root/tag-root.css.d.ts +1 -0
- package/dist/tag/root/tag-root.css.js +112 -0
- package/dist/tag/root/tag-root.d.ts +66 -0
- package/dist/tag/root/tag-root.js +48 -0
- package/dist/text/index.d.ts +1 -0
- package/dist/text/index.js +1 -0
- package/dist/text/root/text-root.css.d.ts +1 -0
- package/dist/text/root/text-root.css.js +113 -0
- package/dist/text/root/text-root.d.ts +83 -0
- package/dist/text/root/text-root.js +92 -0
- package/dist/textarea/index.d.ts +1 -0
- package/dist/textarea/index.js +1 -0
- package/dist/textarea/root/textarea-root.css.d.ts +1 -0
- package/dist/textarea/root/textarea-root.css.js +79 -0
- package/dist/textarea/root/textarea-root.d.ts +27 -0
- package/dist/textarea/root/textarea-root.js +35 -0
- package/dist/time-input/index.d.ts +1 -0
- package/dist/time-input/index.js +1 -0
- package/dist/time-input/root/time-input-root.css.d.ts +1 -0
- package/dist/time-input/root/time-input-root.css.js +184 -0
- package/dist/time-input/root/time-input-root.d.ts +42 -0
- package/dist/time-input/root/time-input-root.js +53 -0
- package/dist/time-picker/index.d.ts +1 -0
- package/dist/time-picker/index.js +1 -0
- package/dist/time-picker/root/time-picker-root.css.d.ts +1 -0
- package/dist/time-picker/root/time-picker-root.css.js +147 -0
- package/dist/time-picker/root/time-picker-root.d.ts +38 -0
- package/dist/time-picker/root/time-picker-root.js +48 -0
- package/dist/timeline/index.d.ts +2 -0
- package/dist/timeline/index.js +2 -0
- package/dist/timeline/item/timeline-item.css.d.ts +1 -0
- package/dist/timeline/item/timeline-item.css.js +111 -0
- package/dist/timeline/item/timeline-item.d.ts +27 -0
- package/dist/timeline/item/timeline-item.js +33 -0
- package/dist/timeline/root/timeline-root.css.d.ts +1 -0
- package/dist/timeline/root/timeline-root.css.js +12 -0
- package/dist/timeline/root/timeline-root.d.ts +25 -0
- package/dist/timeline/root/timeline-root.js +31 -0
- package/dist/toast/index.d.ts +2 -0
- package/dist/toast/index.js +2 -0
- package/dist/toast/item/toast-item.css.d.ts +1 -0
- package/dist/toast/item/toast-item.css.js +233 -0
- package/dist/toast/item/toast-item.d.ts +31 -0
- package/dist/toast/item/toast-item.js +37 -0
- package/dist/toast/root/toast-root.css.d.ts +1 -0
- package/dist/toast/root/toast-root.css.js +66 -0
- package/dist/toast/root/toast-root.d.ts +37 -0
- package/dist/toast/root/toast-root.js +43 -0
- package/dist/toggle/group/toggle-group.css.d.ts +1 -0
- package/dist/toggle/group/toggle-group.css.js +118 -0
- package/dist/toggle/group/toggle-group.d.ts +49 -0
- package/dist/toggle/group/toggle-group.js +47 -0
- package/dist/toggle/index.d.ts +2 -0
- package/dist/toggle/index.js +2 -0
- package/dist/toggle/root/toggle-root.css.d.ts +1 -0
- package/dist/toggle/root/toggle-root.css.js +25 -0
- package/dist/toggle/root/toggle-root.d.ts +28 -0
- package/dist/toggle/root/toggle-root.js +34 -0
- package/dist/toolbar/index.d.ts +1 -0
- package/dist/toolbar/index.js +1 -0
- package/dist/toolbar/root/toolbar-root.css.d.ts +1 -0
- package/dist/toolbar/root/toolbar-root.css.js +28 -0
- package/dist/toolbar/root/toolbar-root.d.ts +29 -0
- package/dist/toolbar/root/toolbar-root.js +35 -0
- package/dist/tooltip/index.d.ts +1 -0
- package/dist/tooltip/index.js +1 -0
- package/dist/tooltip/root/tooltip-root.css.d.ts +1 -0
- package/dist/tooltip/root/tooltip-root.css.js +121 -0
- package/dist/tooltip/root/tooltip-root.d.ts +63 -0
- package/dist/tooltip/root/tooltip-root.js +42 -0
- package/dist/tour/index.d.ts +2 -0
- package/dist/tour/index.js +2 -0
- package/dist/tour/root/tour-root.css.d.ts +1 -0
- package/dist/tour/root/tour-root.css.js +30 -0
- package/dist/tour/root/tour-root.d.ts +24 -0
- package/dist/tour/root/tour-root.js +30 -0
- package/dist/tour/stop/tour-stop.css.d.ts +1 -0
- package/dist/tour/stop/tour-stop.css.js +77 -0
- package/dist/tour/stop/tour-stop.d.ts +34 -0
- package/dist/tour/stop/tour-stop.js +40 -0
- package/dist/tree/index.d.ts +2 -0
- package/dist/tree/index.js +2 -0
- package/dist/tree/item/tree-item.css.d.ts +1 -0
- package/dist/tree/item/tree-item.css.js +177 -0
- package/dist/tree/item/tree-item.d.ts +44 -0
- package/dist/tree/item/tree-item.js +50 -0
- package/dist/tree/root/tree-root.css.d.ts +1 -0
- package/dist/tree/root/tree-root.css.js +43 -0
- package/dist/tree/root/tree-root.d.ts +63 -0
- package/dist/tree/root/tree-root.js +47 -0
- package/dist/trend/index.d.ts +1 -0
- package/dist/trend/index.js +1 -0
- package/dist/trend/root/trend-root.css.d.ts +1 -0
- package/dist/trend/root/trend-root.css.js +50 -0
- package/dist/trend/root/trend-root.d.ts +48 -0
- package/dist/trend/root/trend-root.js +55 -0
- package/dist/video/index.d.ts +1 -0
- package/dist/video/index.js +1 -0
- package/dist/video/root/video-root.css.d.ts +1 -0
- package/dist/video/root/video-root.css.js +404 -0
- package/dist/video/root/video-root.d.ts +87 -0
- package/dist/video/root/video-root.js +61 -0
- package/dist/video-playlist/index.d.ts +3 -0
- package/dist/video-playlist/index.js +3 -0
- package/dist/video-playlist/item/video-playlist-item.css.d.ts +1 -0
- package/dist/video-playlist/item/video-playlist-item.css.js +95 -0
- package/dist/video-playlist/item/video-playlist-item.d.ts +25 -0
- package/dist/video-playlist/item/video-playlist-item.js +31 -0
- package/dist/video-playlist/menu/video-playlist-menu.css.d.ts +1 -0
- package/dist/video-playlist/menu/video-playlist-menu.css.js +44 -0
- package/dist/video-playlist/menu/video-playlist-menu.d.ts +43 -0
- package/dist/video-playlist/menu/video-playlist-menu.js +56 -0
- package/dist/video-playlist/root/video-playlist-root.css.d.ts +1 -0
- package/dist/video-playlist/root/video-playlist-root.css.js +21 -0
- package/dist/video-playlist/root/video-playlist-root.d.ts +26 -0
- package/dist/video-playlist/root/video-playlist-root.js +32 -0
- package/dist/virtual-list/index.d.ts +1 -0
- package/dist/virtual-list/index.js +1 -0
- package/dist/virtual-list/root/virtual-list-root.css.d.ts +1 -0
- package/dist/virtual-list/root/virtual-list-root.css.js +27 -0
- package/dist/virtual-list/root/virtual-list-root.d.ts +31 -0
- package/dist/virtual-list/root/virtual-list-root.js +37 -0
- package/elements.css +287 -0
- package/jsx.d.ts +54748 -0
- package/package.json +80 -0
- package/svelte.d.ts +139 -0
- package/vue.d.ts +11511 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { HelixElement } from '@fusion.dev/helix-core';
|
|
2
|
+
import type { CSSResultGroup, TemplateResult } from 'lit';
|
|
3
|
+
/**
|
|
4
|
+
* @summary Editable source for a sandbox preview.
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* A real `<textarea>`, not a contenteditable div with a syntax highlighter over
|
|
8
|
+
* it. Undo, selection, spellcheck suppression, mobile keyboards, and screen
|
|
9
|
+
* reader support all come from the platform, and every one of them is
|
|
10
|
+
* expensive to rebuild and easy to get subtly wrong.
|
|
11
|
+
*
|
|
12
|
+
* Tab inserts two spaces rather than leaving the field, because a code pane
|
|
13
|
+
* that cannot indent is not one. Escape then Tab still moves focus out, which
|
|
14
|
+
* is the documented escape hatch for exactly this trade.
|
|
15
|
+
*
|
|
16
|
+
* @since 0.1.0
|
|
17
|
+
* @status experimental
|
|
18
|
+
* @aliases Editor, Code pane
|
|
19
|
+
* @documentation https://helix.fusion.dev/sandbox/source
|
|
20
|
+
*
|
|
21
|
+
* @event {HelixBeforeEditEvent} helix-before-edit - Fired before the source is edited. Cancelable: refusing it takes the decision and nothing moves.
|
|
22
|
+
* @event {HelixCaretEvent} helix-caret - Fired when the cursor moves.
|
|
23
|
+
*
|
|
24
|
+
* @csspart source - The editable region.
|
|
25
|
+
*
|
|
26
|
+
* @cssproperty --sandbox-source-background-color - Fill behind the source.
|
|
27
|
+
* @cssproperty --sandbox-source-min-block-size - Minimum height of the pane.
|
|
28
|
+
*/
|
|
29
|
+
export declare class HelixSandboxSource extends HelixElement {
|
|
30
|
+
/**
|
|
31
|
+
* The source being edited.
|
|
32
|
+
*/
|
|
33
|
+
value: string;
|
|
34
|
+
/**
|
|
35
|
+
* Which source this pane holds, echoed in every `helix-before-edit`.
|
|
36
|
+
*
|
|
37
|
+
* `html` and `css` are what the sandbox root routes on; any other name is
|
|
38
|
+
* passed through untouched for a consumer wiring their own panes.
|
|
39
|
+
*
|
|
40
|
+
* Not reflected: nothing selects on it, so it keeps a real default instead.
|
|
41
|
+
*/
|
|
42
|
+
name: string;
|
|
43
|
+
/**
|
|
44
|
+
* Accessible name for the editable region.
|
|
45
|
+
*/
|
|
46
|
+
fieldLabel: string;
|
|
47
|
+
/**
|
|
48
|
+
* Whether Tab indents rather than moving focus.
|
|
49
|
+
*/
|
|
50
|
+
tabIndents: boolean;
|
|
51
|
+
/** Set by Escape, so the next Tab leaves the field. */
|
|
52
|
+
private escaped;
|
|
53
|
+
/**
|
|
54
|
+
* Reports where the cursor is, for a status bar to read.
|
|
55
|
+
*
|
|
56
|
+
* **The shipped shell could not fill its own readout before this.**
|
|
57
|
+
* `SandboxRoot` binds a `helix-caret` listener and writes `line` and `column`
|
|
58
|
+
* onto every slotted status bar, and `SandboxStatusBar` renders a `caret` part
|
|
59
|
+
* as soon as it has both, and both of those ship from `@fusion.dev/helix`. The one
|
|
60
|
+
* pane that reported a position was `SandboxEditor`, which is in
|
|
61
|
+
* `@fusion.dev/helix-sandbox` and is `private` while Helix is pre-release. So a
|
|
62
|
+
* consumer taking the published shell and this pane got a status bar that
|
|
63
|
+
* could never show a position, and the only fix available to them was a
|
|
64
|
+
* package they cannot install.
|
|
65
|
+
*
|
|
66
|
+
* That is the gap rather than a dead event: the editor has dispatched this
|
|
67
|
+
* since it was written, and `check:events` has always seen it. What was
|
|
68
|
+
* missing was the half of the pair that ships.
|
|
69
|
+
*
|
|
70
|
+
* The textarea is the only thing that knows, so this is where it belongs.
|
|
71
|
+
* One-based on both axes, which is what an editor shows and what the detail's
|
|
72
|
+
* own documentation says.
|
|
73
|
+
*/
|
|
74
|
+
private readonly reportCaret;
|
|
75
|
+
/**
|
|
76
|
+
* Announces the edit, then applies it if nobody refused.
|
|
77
|
+
*
|
|
78
|
+
* **This was the other way round, so `helix-before-edit` was a `before` event
|
|
79
|
+
* that had already happened.** The value was assigned and the request
|
|
80
|
+
* dispatched after it, which means `preventDefault()` was accepted and
|
|
81
|
+
* ignored: a consumer refusing an edit kept the old value in their handler and
|
|
82
|
+
* the pane held the new one. Every other `before` event in this library is
|
|
83
|
+
* announced first and applied only if the request stands, and this is that.
|
|
84
|
+
*
|
|
85
|
+
* `restoreValue` because the textarea has already taken the character
|
|
86
|
+
* whichever way it goes, so a refusal has to put the text back, and it does so
|
|
87
|
+
* without sending the caret to the end. Exactly what `Input` does with the
|
|
88
|
+
* same helper for the same reason. */
|
|
89
|
+
private readonly handleInput;
|
|
90
|
+
/**
|
|
91
|
+
* The one place an edit is taken, so a refusal cannot be forgotten at one of them.
|
|
92
|
+
*
|
|
93
|
+
* Two paths reach it, a keystroke and the tab that indents, and the second had
|
|
94
|
+
* the same fault as the first with its own copy of the code.
|
|
95
|
+
*/
|
|
96
|
+
private edit;
|
|
97
|
+
private readonly handleKeydown;
|
|
98
|
+
protected render(): TemplateResult;
|
|
99
|
+
static styles: CSSResultGroup;
|
|
100
|
+
}
|
|
101
|
+
declare global {
|
|
102
|
+
interface HTMLElementTagNameMap {
|
|
103
|
+
'helix-sandbox-source': HelixSandboxSource;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { customElement, HelixBeforeEditEvent, HelixCaretEvent, HelixElement, onUnlessFalse, restoreValue, } from '@fusion.dev/helix-core';
|
|
8
|
+
import { html } from 'lit';
|
|
9
|
+
import { property } from 'lit/decorators.js';
|
|
10
|
+
import { styles } from './sandbox-source.css.js';
|
|
11
|
+
/**
|
|
12
|
+
* @summary Editable source for a sandbox preview.
|
|
13
|
+
*
|
|
14
|
+
* @description
|
|
15
|
+
* A real `<textarea>`, not a contenteditable div with a syntax highlighter over
|
|
16
|
+
* it. Undo, selection, spellcheck suppression, mobile keyboards, and screen
|
|
17
|
+
* reader support all come from the platform, and every one of them is
|
|
18
|
+
* expensive to rebuild and easy to get subtly wrong.
|
|
19
|
+
*
|
|
20
|
+
* Tab inserts two spaces rather than leaving the field, because a code pane
|
|
21
|
+
* that cannot indent is not one. Escape then Tab still moves focus out, which
|
|
22
|
+
* is the documented escape hatch for exactly this trade.
|
|
23
|
+
*
|
|
24
|
+
* @since 0.1.0
|
|
25
|
+
* @status experimental
|
|
26
|
+
* @aliases Editor, Code pane
|
|
27
|
+
* @documentation https://helix.fusion.dev/sandbox/source
|
|
28
|
+
*
|
|
29
|
+
* @event {HelixBeforeEditEvent} helix-before-edit - Fired before the source is edited. Cancelable: refusing it takes the decision and nothing moves.
|
|
30
|
+
* @event {HelixCaretEvent} helix-caret - Fired when the cursor moves.
|
|
31
|
+
*
|
|
32
|
+
* @csspart source - The editable region.
|
|
33
|
+
*
|
|
34
|
+
* @cssproperty --sandbox-source-background-color - Fill behind the source.
|
|
35
|
+
* @cssproperty --sandbox-source-min-block-size - Minimum height of the pane.
|
|
36
|
+
*/
|
|
37
|
+
let HelixSandboxSource = class HelixSandboxSource extends HelixElement {
|
|
38
|
+
constructor() {
|
|
39
|
+
super(...arguments);
|
|
40
|
+
/**
|
|
41
|
+
* The source being edited.
|
|
42
|
+
*/
|
|
43
|
+
this.value = '';
|
|
44
|
+
/**
|
|
45
|
+
* Which source this pane holds, echoed in every `helix-before-edit`.
|
|
46
|
+
*
|
|
47
|
+
* `html` and `css` are what the sandbox root routes on; any other name is
|
|
48
|
+
* passed through untouched for a consumer wiring their own panes.
|
|
49
|
+
*
|
|
50
|
+
* Not reflected: nothing selects on it, so it keeps a real default instead.
|
|
51
|
+
*/
|
|
52
|
+
this.name = 'html';
|
|
53
|
+
/**
|
|
54
|
+
* Accessible name for the editable region.
|
|
55
|
+
*/
|
|
56
|
+
this.fieldLabel = 'Example source';
|
|
57
|
+
/**
|
|
58
|
+
* Whether Tab indents rather than moving focus.
|
|
59
|
+
*/
|
|
60
|
+
this.tabIndents = true;
|
|
61
|
+
/** Set by Escape, so the next Tab leaves the field. */
|
|
62
|
+
this.escaped = false;
|
|
63
|
+
/**
|
|
64
|
+
* Reports where the cursor is, for a status bar to read.
|
|
65
|
+
*
|
|
66
|
+
* **The shipped shell could not fill its own readout before this.**
|
|
67
|
+
* `SandboxRoot` binds a `helix-caret` listener and writes `line` and `column`
|
|
68
|
+
* onto every slotted status bar, and `SandboxStatusBar` renders a `caret` part
|
|
69
|
+
* as soon as it has both, and both of those ship from `@fusion.dev/helix`. The one
|
|
70
|
+
* pane that reported a position was `SandboxEditor`, which is in
|
|
71
|
+
* `@fusion.dev/helix-sandbox` and is `private` while Helix is pre-release. So a
|
|
72
|
+
* consumer taking the published shell and this pane got a status bar that
|
|
73
|
+
* could never show a position, and the only fix available to them was a
|
|
74
|
+
* package they cannot install.
|
|
75
|
+
*
|
|
76
|
+
* That is the gap rather than a dead event: the editor has dispatched this
|
|
77
|
+
* since it was written, and `check:events` has always seen it. What was
|
|
78
|
+
* missing was the half of the pair that ships.
|
|
79
|
+
*
|
|
80
|
+
* The textarea is the only thing that knows, so this is where it belongs.
|
|
81
|
+
* One-based on both axes, which is what an editor shows and what the detail's
|
|
82
|
+
* own documentation says.
|
|
83
|
+
*/
|
|
84
|
+
this.reportCaret = (event) => {
|
|
85
|
+
const field = event.target;
|
|
86
|
+
const at = field.selectionStart ?? 0;
|
|
87
|
+
const before = field.value.slice(0, at);
|
|
88
|
+
this.dispatchEvent(new HelixCaretEvent({
|
|
89
|
+
column: at - (before.lastIndexOf('\n') + 1) + 1,
|
|
90
|
+
line: before.split('\n').length,
|
|
91
|
+
}));
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Announces the edit, then applies it if nobody refused.
|
|
95
|
+
*
|
|
96
|
+
* **This was the other way round, so `helix-before-edit` was a `before` event
|
|
97
|
+
* that had already happened.** The value was assigned and the request
|
|
98
|
+
* dispatched after it, which means `preventDefault()` was accepted and
|
|
99
|
+
* ignored: a consumer refusing an edit kept the old value in their handler and
|
|
100
|
+
* the pane held the new one. Every other `before` event in this library is
|
|
101
|
+
* announced first and applied only if the request stands, and this is that.
|
|
102
|
+
*
|
|
103
|
+
* `restoreValue` because the textarea has already taken the character
|
|
104
|
+
* whichever way it goes, so a refusal has to put the text back, and it does so
|
|
105
|
+
* without sending the caret to the end. Exactly what `Input` does with the
|
|
106
|
+
* same helper for the same reason. */
|
|
107
|
+
this.handleInput = (event) => {
|
|
108
|
+
const field = event.target;
|
|
109
|
+
this.edit(field, field.value);
|
|
110
|
+
this.reportCaret(event);
|
|
111
|
+
};
|
|
112
|
+
this.handleKeydown = (event) => {
|
|
113
|
+
if (event.key === 'Escape') {
|
|
114
|
+
this.escaped = true;
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (event.key !== 'Tab' || !this.tabIndents || this.escaped) {
|
|
118
|
+
this.escaped = false;
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
event.preventDefault();
|
|
122
|
+
const field = event.target;
|
|
123
|
+
const { selectionEnd, selectionStart, value } = field;
|
|
124
|
+
field.value = `${value.slice(0, selectionStart)} ${value.slice(selectionEnd)}`;
|
|
125
|
+
field.selectionStart = selectionStart + 2;
|
|
126
|
+
field.selectionEnd = field.selectionStart;
|
|
127
|
+
this.edit(field, field.value);
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* The one place an edit is taken, so a refusal cannot be forgotten at one of them.
|
|
132
|
+
*
|
|
133
|
+
* Two paths reach it, a keystroke and the tab that indents, and the second had
|
|
134
|
+
* the same fault as the first with its own copy of the code.
|
|
135
|
+
*/
|
|
136
|
+
edit(field, next) {
|
|
137
|
+
const request = new HelixBeforeEditEvent({ value: next });
|
|
138
|
+
if (this.dispatchEvent(request)) {
|
|
139
|
+
this.value = next;
|
|
140
|
+
}
|
|
141
|
+
restoreValue(field, this.value);
|
|
142
|
+
}
|
|
143
|
+
render() {
|
|
144
|
+
return html `<textarea
|
|
145
|
+
part="source"
|
|
146
|
+
aria-label=${this.fieldLabel}
|
|
147
|
+
spellcheck="false"
|
|
148
|
+
.value=${this.value}
|
|
149
|
+
@focus=${this.reportCaret}
|
|
150
|
+
@input=${this.handleInput}
|
|
151
|
+
@keydown=${this.handleKeydown}
|
|
152
|
+
@keyup=${this.reportCaret}
|
|
153
|
+
@pointerup=${this.reportCaret}
|
|
154
|
+
></textarea>`;
|
|
155
|
+
}
|
|
156
|
+
static { this.styles = styles; }
|
|
157
|
+
};
|
|
158
|
+
__decorate([
|
|
159
|
+
property()
|
|
160
|
+
], HelixSandboxSource.prototype, "value", void 0);
|
|
161
|
+
__decorate([
|
|
162
|
+
property()
|
|
163
|
+
], HelixSandboxSource.prototype, "name", void 0);
|
|
164
|
+
__decorate([
|
|
165
|
+
property({ attribute: 'field-label' })
|
|
166
|
+
], HelixSandboxSource.prototype, "fieldLabel", void 0);
|
|
167
|
+
__decorate([
|
|
168
|
+
property({ attribute: 'tab-indents', converter: onUnlessFalse })
|
|
169
|
+
], HelixSandboxSource.prototype, "tabIndents", void 0);
|
|
170
|
+
HelixSandboxSource = __decorate([
|
|
171
|
+
customElement('helix-sandbox-source')
|
|
172
|
+
], HelixSandboxSource);
|
|
173
|
+
export { HelixSandboxSource };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Generated from src/sandbox/status-bar/sandbox-status-bar.css by `bun run styles`. Do not edit.
|
|
2
|
+
import { createSheet } from '@fusion.dev/helix-core';
|
|
3
|
+
export const styles = createSheet(`:host {
|
|
4
|
+
align-items: center;
|
|
5
|
+
background-color: var(--helix-color-background);
|
|
6
|
+
border-block-start: var(--helix-border-thin) solid var(--helix-color-border);
|
|
7
|
+
color: var(--sandbox-status-bar-color, var(--helix-color-foreground-subtle));
|
|
8
|
+
display: flex;
|
|
9
|
+
font-size: var(--helix-text-xs);
|
|
10
|
+
gap: var(--helix-space-sm);
|
|
11
|
+
line-height: var(--helix-leading-tight);
|
|
12
|
+
padding: var(--helix-space-2xs) var(--helix-space-sm);
|
|
13
|
+
|
|
14
|
+
user-select: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
slot:first-child + * {
|
|
18
|
+
margin-inline-start: auto;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
[part="caret"] {
|
|
22
|
+
font-variant-numeric: tabular-nums;
|
|
23
|
+
}`);
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { HelixElement } from '@fusion.dev/helix-core';
|
|
2
|
+
import type { CSSResultGroup, TemplateResult } from 'lit';
|
|
3
|
+
/**
|
|
4
|
+
* @summary Reports where the cursor is and what is being edited.
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* Slotted into a sandbox, which feeds it: the editor dispatches `helix-caret`
|
|
8
|
+
* on every keystroke and every arrow press, the sandbox hears it and writes the
|
|
9
|
+
* position here. Nothing about that reaches the consumer's framework, which is
|
|
10
|
+
* the point. A caret position routed through React state would re-render the
|
|
11
|
+
* workbench on every cursor move, to update two numbers.
|
|
12
|
+
*
|
|
13
|
+
* **Not a live region.** The readout changes on every keystroke, so announcing
|
|
14
|
+
* it would talk over the reader continuously while they type. It is text they
|
|
15
|
+
* can navigate to, which is what a status bar is in every editor that has one.
|
|
16
|
+
*
|
|
17
|
+
* A readout with nothing to say is not rendered at all rather than rendered
|
|
18
|
+
* empty, or the bar keeps a gap where a value is not.
|
|
19
|
+
*
|
|
20
|
+
* @since 0.1.0
|
|
21
|
+
* @status experimental
|
|
22
|
+
* @aliases Status line
|
|
23
|
+
* @documentation https://helix.fusion.dev/sandbox/status-bar
|
|
24
|
+
*
|
|
25
|
+
* @slot - Items at the start of the bar.
|
|
26
|
+
* @slot end - Items after the readouts, at the end of the bar.
|
|
27
|
+
*
|
|
28
|
+
* @csspart caret - The line and column readout.
|
|
29
|
+
* @csspart language - The language readout.
|
|
30
|
+
*
|
|
31
|
+
* @cssproperty --sandbox-status-bar-color - Color of the bar's text.
|
|
32
|
+
*/
|
|
33
|
+
export declare class HelixSandboxStatusBar extends HelixElement {
|
|
34
|
+
/**
|
|
35
|
+
* One-based column of the cursor.
|
|
36
|
+
*
|
|
37
|
+
* Absent shows no readout.
|
|
38
|
+
*/
|
|
39
|
+
column?: number;
|
|
40
|
+
/**
|
|
41
|
+
* The language being edited, as a name or one the editor knows.
|
|
42
|
+
*/
|
|
43
|
+
language?: string;
|
|
44
|
+
/**
|
|
45
|
+
* One-based line of the cursor.
|
|
46
|
+
*
|
|
47
|
+
* Absent shows no readout.
|
|
48
|
+
*/
|
|
49
|
+
line?: number;
|
|
50
|
+
/** How the position reads, or nothing when there is no cursor to report. */
|
|
51
|
+
private get position();
|
|
52
|
+
protected render(): TemplateResult;
|
|
53
|
+
static styles: CSSResultGroup;
|
|
54
|
+
}
|
|
55
|
+
declare global {
|
|
56
|
+
interface HTMLElementTagNameMap {
|
|
57
|
+
'helix-sandbox-status-bar': HelixSandboxStatusBar;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { customElement, HelixElement } from '@fusion.dev/helix-core';
|
|
8
|
+
import { html, nothing } from 'lit';
|
|
9
|
+
import { property } from 'lit/decorators.js';
|
|
10
|
+
import { styles } from './sandbox-status-bar.css.js';
|
|
11
|
+
/**
|
|
12
|
+
* How a language is written out, for the ones an editor knows.
|
|
13
|
+
*
|
|
14
|
+
* A map rather than the raw value, because `html` in a status bar reads as a
|
|
15
|
+
* variable name where `HTML` reads as a language. Anything unlisted shows as
|
|
16
|
+
* given, so a consumer naming their own language is not silently blanked.
|
|
17
|
+
*/
|
|
18
|
+
const LABELS = {
|
|
19
|
+
css: 'CSS',
|
|
20
|
+
html: 'HTML',
|
|
21
|
+
javascript: 'JavaScript',
|
|
22
|
+
tsx: 'TSX',
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* @summary Reports where the cursor is and what is being edited.
|
|
26
|
+
*
|
|
27
|
+
* @description
|
|
28
|
+
* Slotted into a sandbox, which feeds it: the editor dispatches `helix-caret`
|
|
29
|
+
* on every keystroke and every arrow press, the sandbox hears it and writes the
|
|
30
|
+
* position here. Nothing about that reaches the consumer's framework, which is
|
|
31
|
+
* the point. A caret position routed through React state would re-render the
|
|
32
|
+
* workbench on every cursor move, to update two numbers.
|
|
33
|
+
*
|
|
34
|
+
* **Not a live region.** The readout changes on every keystroke, so announcing
|
|
35
|
+
* it would talk over the reader continuously while they type. It is text they
|
|
36
|
+
* can navigate to, which is what a status bar is in every editor that has one.
|
|
37
|
+
*
|
|
38
|
+
* A readout with nothing to say is not rendered at all rather than rendered
|
|
39
|
+
* empty, or the bar keeps a gap where a value is not.
|
|
40
|
+
*
|
|
41
|
+
* @since 0.1.0
|
|
42
|
+
* @status experimental
|
|
43
|
+
* @aliases Status line
|
|
44
|
+
* @documentation https://helix.fusion.dev/sandbox/status-bar
|
|
45
|
+
*
|
|
46
|
+
* @slot - Items at the start of the bar.
|
|
47
|
+
* @slot end - Items after the readouts, at the end of the bar.
|
|
48
|
+
*
|
|
49
|
+
* @csspart caret - The line and column readout.
|
|
50
|
+
* @csspart language - The language readout.
|
|
51
|
+
*
|
|
52
|
+
* @cssproperty --sandbox-status-bar-color - Color of the bar's text.
|
|
53
|
+
*/
|
|
54
|
+
let HelixSandboxStatusBar = class HelixSandboxStatusBar extends HelixElement {
|
|
55
|
+
/** How the position reads, or nothing when there is no cursor to report. */
|
|
56
|
+
get position() {
|
|
57
|
+
if (this.line === undefined || this.column === undefined) {
|
|
58
|
+
return undefined;
|
|
59
|
+
}
|
|
60
|
+
return `Ln ${this.line}, Col ${this.column}`;
|
|
61
|
+
}
|
|
62
|
+
render() {
|
|
63
|
+
const language = this.language;
|
|
64
|
+
const position = this.position;
|
|
65
|
+
return html `<slot></slot>
|
|
66
|
+
${position === undefined ? nothing : html `<span part="caret">${position}</span>`}
|
|
67
|
+
${language === undefined
|
|
68
|
+
? nothing
|
|
69
|
+
: html `<span part="language">${LABELS[language] ?? language}</span>`}
|
|
70
|
+
<slot name="end"></slot>`;
|
|
71
|
+
}
|
|
72
|
+
static { this.styles = styles; }
|
|
73
|
+
};
|
|
74
|
+
__decorate([
|
|
75
|
+
property({ type: Number })
|
|
76
|
+
], HelixSandboxStatusBar.prototype, "column", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
property()
|
|
79
|
+
], HelixSandboxStatusBar.prototype, "language", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
property({ type: Number })
|
|
82
|
+
], HelixSandboxStatusBar.prototype, "line", void 0);
|
|
83
|
+
HelixSandboxStatusBar = __decorate([
|
|
84
|
+
customElement('helix-sandbox-status-bar')
|
|
85
|
+
], HelixSandboxStatusBar);
|
|
86
|
+
export { HelixSandboxStatusBar };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// Generated from src/sandbox/terminal/sandbox-terminal.css by `bun run styles`. Do not edit.
|
|
2
|
+
import { createSheet } from '@fusion.dev/helix-core';
|
|
3
|
+
export const styles = createSheet(`:host {
|
|
4
|
+
|
|
5
|
+
block-size: var(--sandbox-terminal-size, 100%);
|
|
6
|
+
display: grid;
|
|
7
|
+
grid-template-rows: minmax(0, 1fr);
|
|
8
|
+
min-block-size: 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
[part="log"] {
|
|
12
|
+
font-family: var(--helix-font-mono);
|
|
13
|
+
font-size: var(--helix-text-xs);
|
|
14
|
+
line-height: var(--helix-leading-normal);
|
|
15
|
+
overflow: auto;
|
|
16
|
+
padding: var(--helix-space-xs) var(--helix-space-sm);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
[part="log"]:focus-visible {
|
|
20
|
+
outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
|
|
21
|
+
outline-offset: calc(var(--helix-size-focus-offset) * -1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
[part="empty"] {
|
|
25
|
+
color: var(--helix-color-foreground-subtle);
|
|
26
|
+
margin: var(--helix-space-none);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
[part="entry"] {
|
|
30
|
+
align-items: baseline;
|
|
31
|
+
color: var(--helix-color-foreground-muted);
|
|
32
|
+
display: grid;
|
|
33
|
+
gap: var(--helix-space-xs);
|
|
34
|
+
grid-template-columns: 3.5rem minmax(0, 1fr) auto;
|
|
35
|
+
padding-block: var(--helix-space-2xs);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
[part="level"] {
|
|
39
|
+
color: var(--helix-color-foreground-subtle);
|
|
40
|
+
text-transform: uppercase;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
[part="message"] {
|
|
44
|
+
white-space: pre-wrap;
|
|
45
|
+
word-break: break-word;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
[part="count"] {
|
|
49
|
+
background-color: var(--helix-color-surface-sunken);
|
|
50
|
+
border-radius: var(--helix-radii-full);
|
|
51
|
+
color: var(--helix-color-foreground-subtle);
|
|
52
|
+
padding-inline: var(--helix-space-2xs);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
[part="entry"][data-level="warn"] {
|
|
56
|
+
color: var(--helix-color-warning);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
[part="entry"][data-level="warn"] [part="level"] {
|
|
60
|
+
color: var(--helix-color-warning);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
[part="entry"][data-level="error"] {
|
|
64
|
+
color: var(--helix-color-danger);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
[part="entry"][data-level="error"] [part="level"] {
|
|
68
|
+
color: var(--helix-color-danger);
|
|
69
|
+
}`);
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { type ConsoleDetail, HelixElement } from '@fusion.dev/helix-core';
|
|
2
|
+
import type { CSSResultGroup, TemplateResult } from 'lit';
|
|
3
|
+
/**
|
|
4
|
+
* @summary Shows what the previewed example wrote to the console.
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* Fed by the sandbox, which hears `helix-console` from the preview and hands it
|
|
8
|
+
* here. The preview is a separate document, so what arrives has already crossed
|
|
9
|
+
* `postMessage`: text, not values.
|
|
10
|
+
*
|
|
11
|
+
* **Repeats collapse.** An example with a render loop can write the same
|
|
12
|
+
* warning hundreds of times, and two hundred identical lines say nothing that
|
|
13
|
+
* one line and a count does not. Only consecutive repeats collapse, so the
|
|
14
|
+
* order of what happened survives.
|
|
15
|
+
*
|
|
16
|
+
* A `role="log"` rather than a live region by hand. It is the semantic for an
|
|
17
|
+
* append-only stream, and it means a reader is told about new output without
|
|
18
|
+
* the whole panel being re-announced each time.
|
|
19
|
+
*
|
|
20
|
+
* @since 0.1.0
|
|
21
|
+
* @status experimental
|
|
22
|
+
* @aliases Console, Output
|
|
23
|
+
* @documentation https://helix.fusion.dev/sandbox/terminal
|
|
24
|
+
*
|
|
25
|
+
* @csspart count - How many times a repeated line arrived.
|
|
26
|
+
* @csspart empty - Shown while nothing has been written.
|
|
27
|
+
* @csspart entry - One line.
|
|
28
|
+
* @csspart level - The level a line came in at.
|
|
29
|
+
* @csspart log - The scrolling region.
|
|
30
|
+
* @csspart message - The text of a line.
|
|
31
|
+
*
|
|
32
|
+
* @cssproperty --sandbox-terminal-size - Height of the scrolling region.
|
|
33
|
+
*/
|
|
34
|
+
export declare class HelixSandboxTerminal extends HelixElement {
|
|
35
|
+
/**
|
|
36
|
+
* What to show before anything has been written.
|
|
37
|
+
*/
|
|
38
|
+
emptyLabel: string;
|
|
39
|
+
/**
|
|
40
|
+
* Accessible name for the log.
|
|
41
|
+
*/
|
|
42
|
+
label: string;
|
|
43
|
+
private entries;
|
|
44
|
+
/**
|
|
45
|
+
* Whether the reader is at the bottom, and so wants to follow new output.
|
|
46
|
+
*
|
|
47
|
+
* Read before the render that adds a line and applied after it. Scrolling to
|
|
48
|
+
* the bottom on every line would drag a reader off whatever they had scrolled
|
|
49
|
+
* up to look at, which for a log of errors is the one thing they are doing.
|
|
50
|
+
*/
|
|
51
|
+
private following;
|
|
52
|
+
private get log();
|
|
53
|
+
/**
|
|
54
|
+
* Adds a line, collapsing it into the one above when they are identical.
|
|
55
|
+
*
|
|
56
|
+
* `write` rather than `append`, which every element already has from
|
|
57
|
+
* `ParentNode` and which takes nodes. Shadowing it would break
|
|
58
|
+
* `terminal.append(node)` for anyone who reasonably expected the DOM method.
|
|
59
|
+
*/
|
|
60
|
+
write(detail: ConsoleDetail): void;
|
|
61
|
+
/** Empties the log. */
|
|
62
|
+
clear(): void;
|
|
63
|
+
protected updated(): void;
|
|
64
|
+
protected render(): TemplateResult;
|
|
65
|
+
static styles: CSSResultGroup;
|
|
66
|
+
}
|
|
67
|
+
declare global {
|
|
68
|
+
interface HTMLElementTagNameMap {
|
|
69
|
+
'helix-sandbox-terminal': HelixSandboxTerminal;
|
|
70
|
+
}
|
|
71
|
+
}
|