@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,306 @@
|
|
|
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
|
+
var HelixSandboxPreview_1;
|
|
8
|
+
import { customElement, HelixConsoleEvent, HelixElement, HelixResizeEvent, } from '@fusion.dev/helix-core';
|
|
9
|
+
/**
|
|
10
|
+
* How long the source has to stop changing before the frame is asked to render,
|
|
11
|
+
* in milliseconds.
|
|
12
|
+
*
|
|
13
|
+
* Long enough that a run of keystrokes is one render, short enough that letting
|
|
14
|
+
* go of the keyboard and looking up finds the preview already there.
|
|
15
|
+
*/
|
|
16
|
+
const SETTLE = 120;
|
|
17
|
+
import { html } from 'lit';
|
|
18
|
+
import { property } from 'lit/decorators.js';
|
|
19
|
+
import { styles as sheet } from './sandbox-preview.css.js';
|
|
20
|
+
/**
|
|
21
|
+
* @summary Renders sandbox source in a frame of its own.
|
|
22
|
+
*
|
|
23
|
+
* @description
|
|
24
|
+
* A sandboxed `<iframe>` pointed at `src`, which is a document the consumer
|
|
25
|
+
* provides. That document imports whatever the examples need, listens for a
|
|
26
|
+
* render message, and writes the markup into itself.
|
|
27
|
+
*
|
|
28
|
+
* **A frame rather than the page.** Rendering into the page meant an example
|
|
29
|
+
* was styled by whatever surrounded it, which flatters the preview and lies
|
|
30
|
+
* about it: an example that restyles `helix-card` restyled the sandbox too, a
|
|
31
|
+
* script in an example ran against the real document, and a stray
|
|
32
|
+
* `position: fixed` escaped the pane. It also left nothing to capture console
|
|
33
|
+
* output from, and the terminal has to come from somewhere.
|
|
34
|
+
*
|
|
35
|
+
* The cost is that the frame starts empty. Styles and element definitions do
|
|
36
|
+
* not cross into it, because a document has its own stylesheets and a window
|
|
37
|
+
* has its own custom element registry, so `src` has to load them. That is the
|
|
38
|
+
* consumer's document rather than something guessed at here.
|
|
39
|
+
*
|
|
40
|
+
* **The source is not trusted, and the frame is what makes that safe.**
|
|
41
|
+
* `fullscreen` is granted for the same reason and found the same way: a video
|
|
42
|
+
* in the preview offered a fullscreen button that did nothing at all, because
|
|
43
|
+
* the policy default is `self`, this frame is not `self`, and a denied request
|
|
44
|
+
* rejects a promise nobody was watching. Two capabilities now, both explicit,
|
|
45
|
+
* both starred.
|
|
46
|
+
*
|
|
47
|
+
* `allow="clipboard-write *"` is granted explicitly, and the star matters: the
|
|
48
|
+
* policy defaults to `self` and this frame has an opaque origin, so it is not
|
|
49
|
+
* `self` and the default denies it. A component inside the preview that copies
|
|
50
|
+
* to the clipboard is otherwise a control that silently does nothing, which is
|
|
51
|
+
* how this was found. Nothing else is granted, and a copy still needs the
|
|
52
|
+
* reader's own gesture.
|
|
53
|
+
*
|
|
54
|
+
* `sandbox="allow-scripts"` and no `allow-same-origin`, so the document runs on
|
|
55
|
+
* an opaque origin: script in an example cannot reach this page, its storage,
|
|
56
|
+
* its cookies, or the editor the source was typed into. Without it they could,
|
|
57
|
+
* measured, through an `onerror` handler on an image that fails to load, which
|
|
58
|
+
* `innerHTML` does not strip the way it refuses a `<script>` tag.
|
|
59
|
+
*
|
|
60
|
+
* That is what lets a sandbox hold markup a reader pasted from somewhere, or
|
|
61
|
+
* one day arrived in a shared link, rather than only what its owner typed.
|
|
62
|
+
*
|
|
63
|
+
* `allow-forms` is granted because examples have forms in them and a submit
|
|
64
|
+
* that silently does nothing is a worse lie than one that navigates a frame
|
|
65
|
+
* nobody is looking at. Top-level navigation, popups and modals are not.
|
|
66
|
+
*
|
|
67
|
+
* @since 0.1.0
|
|
68
|
+
* @status experimental
|
|
69
|
+
* @aliases Result, Output
|
|
70
|
+
* @documentation https://helix.fusion.dev/sandbox/preview
|
|
71
|
+
*
|
|
72
|
+
* @event {HelixConsoleEvent} helix-console - Relayed from the frame, one per console call.
|
|
73
|
+
* @event {HelixResizeEvent} helix-resize - How tall the frame's content is, whenever it changes.
|
|
74
|
+
*
|
|
75
|
+
* @csspart frame - The iframe.
|
|
76
|
+
*/
|
|
77
|
+
let HelixSandboxPreview = class HelixSandboxPreview extends HelixElement {
|
|
78
|
+
constructor() {
|
|
79
|
+
super(...arguments);
|
|
80
|
+
/**
|
|
81
|
+
* Document the frame loads, which brings the styles and the elements.
|
|
82
|
+
*/
|
|
83
|
+
this.src = '';
|
|
84
|
+
/**
|
|
85
|
+
* Markup to render.
|
|
86
|
+
*/
|
|
87
|
+
this.source = '';
|
|
88
|
+
/**
|
|
89
|
+
* Stylesheet applied inside the frame, alongside the markup.
|
|
90
|
+
*/
|
|
91
|
+
this.styles = '';
|
|
92
|
+
/**
|
|
93
|
+
* Accessible name for the frame.
|
|
94
|
+
*/
|
|
95
|
+
this.label = 'Preview';
|
|
96
|
+
/** Whether the frame has said it is listening. */
|
|
97
|
+
this.ready = false;
|
|
98
|
+
/**
|
|
99
|
+
* The frame's document has finished loading, so its listener exists.
|
|
100
|
+
*
|
|
101
|
+
* **The announcement is one shot and the parent can miss it.** The frame
|
|
102
|
+
* posts `helix-preview-ready` at the end of its own module evaluation and
|
|
103
|
+
* never repeats it, and `handleMessage` drops anything whose `source` is not
|
|
104
|
+
* `this.frame?.contentWindow`. That getter reads the render root, so it is
|
|
105
|
+
* null until this element has rendered once. A frame that loads before that
|
|
106
|
+
* render commits therefore announces into a guard that refuses it, `ready`
|
|
107
|
+
* stays false, and `send` returns early forever: the source is set, the
|
|
108
|
+
* markup is correct, and the preview is blank with nothing logged.
|
|
109
|
+
*
|
|
110
|
+
* **It is a race, so it hides in the one place nobody looks.** The frame is
|
|
111
|
+
* only fast enough to win when its document and its bundle are already in the
|
|
112
|
+
* HTTP cache, which is a client-side navigation and never a cold load.
|
|
113
|
+
* Measured on the theme builder reached by clicking a link: `ready` false, a
|
|
114
|
+
* 9,382 character `source` in place, and an empty preview, where the same
|
|
115
|
+
* page loaded directly rendered correctly.
|
|
116
|
+
*
|
|
117
|
+
* `load` closes it without a retry protocol and without weakening either
|
|
118
|
+
* check on the way in. The frame's script is `defer`, so it has run by the
|
|
119
|
+
* time this fires, which makes the event a guarantee that the listener is
|
|
120
|
+
* there rather than a guess that it might be. The message path stays, because
|
|
121
|
+
* it is the one that works when the frame is slower than the render, and
|
|
122
|
+
* either arriving is enough.
|
|
123
|
+
*/
|
|
124
|
+
this.handleFrameLoad = () => {
|
|
125
|
+
this.ready = true;
|
|
126
|
+
this.send();
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Takes messages from the frame.
|
|
130
|
+
*
|
|
131
|
+
* Two checks, and both earn their place.
|
|
132
|
+
*
|
|
133
|
+
* The window is the identity: `event.source` is a reference the sender cannot
|
|
134
|
+
* forge, and this frame's `contentWindow` is one only this element holds.
|
|
135
|
+
*
|
|
136
|
+
* The origin has to be opaque. The frame is sandboxed, so every message it
|
|
137
|
+
* sends arrives as `"null"`, measured. A real origin therefore means the
|
|
138
|
+
* frame is no longer showing the document it was given: `allow-scripts` lets
|
|
139
|
+
* an example navigate its own frame, and whatever it navigated to inherits
|
|
140
|
+
* `contentWindow` and could otherwise write lines into the terminal as though
|
|
141
|
+
* the example had logged them.
|
|
142
|
+
*/
|
|
143
|
+
this.handleMessage = (event) => {
|
|
144
|
+
if (event.source !== this.frame?.contentWindow || event.origin !== 'null') {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
if (event.data?.type === 'helix-preview-ready') {
|
|
148
|
+
this.ready = true;
|
|
149
|
+
this.send();
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
if (event.data?.type === 'helix-preview-console') {
|
|
153
|
+
this.dispatchEvent(new HelixConsoleEvent({ level: event.data.level, text: event.data.text }));
|
|
154
|
+
}
|
|
155
|
+
/* Relayed rather than acted on. What the frame measured is a fact about the
|
|
156
|
+
example; how much room to give it is a decision, and it belongs to
|
|
157
|
+
whatever laid this element out. A preview that resized itself would be
|
|
158
|
+
deciding for the page it sits in, and the workbench and a reference page
|
|
159
|
+
want opposite things from the same number. */
|
|
160
|
+
if (event.data?.type === 'helix-preview-size') {
|
|
161
|
+
this.dispatchEvent(new HelixResizeEvent({ size: event.data.size }));
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
static { HelixSandboxPreview_1 = this; }
|
|
166
|
+
get frame() {
|
|
167
|
+
return this.renderRoot.querySelector('iframe');
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Where messages to the frame are addressed.
|
|
171
|
+
*
|
|
172
|
+
* `'*'`, because there is nothing else to say: a sandboxed document has an
|
|
173
|
+
* opaque origin and `postMessage` has no target string that names one.
|
|
174
|
+
*
|
|
175
|
+
* It costs nothing. What is sent is the example's own source and stylesheet,
|
|
176
|
+
* to the document that is about to render them, and that document is the one
|
|
177
|
+
* thing on the page already entitled to both.
|
|
178
|
+
*/
|
|
179
|
+
static { this.target = '*'; }
|
|
180
|
+
/**
|
|
181
|
+
* Sends once the typing stops, replacing anything already waiting.
|
|
182
|
+
*
|
|
183
|
+
* A frame was tried first and is the wrong unit. Keystrokes arrive fifty to a
|
|
184
|
+
* hundred and fifty milliseconds apart, so each one lands in a frame of its
|
|
185
|
+
* own and coalescing by frame coalesces nothing: the example was still being
|
|
186
|
+
* rebuilt per character. The delay has to be longer than the gap between
|
|
187
|
+
* keystrokes to catch a burst, and short enough to read as immediate when the
|
|
188
|
+
* typing stops.
|
|
189
|
+
*/
|
|
190
|
+
scheduleSend() {
|
|
191
|
+
clearTimeout(this.pending);
|
|
192
|
+
this.pending = setTimeout(() => {
|
|
193
|
+
this.pending = undefined;
|
|
194
|
+
this.send();
|
|
195
|
+
}, SETTLE);
|
|
196
|
+
}
|
|
197
|
+
/** Sends the current source to the frame, once it is listening. */
|
|
198
|
+
send() {
|
|
199
|
+
if (!this.ready) {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
const message = {
|
|
203
|
+
...(this.colorMode ? { colorMode: this.colorMode } : {}),
|
|
204
|
+
direction: this.direction ?? 'ltr',
|
|
205
|
+
layout: this.layout ?? 'padded',
|
|
206
|
+
source: this.source,
|
|
207
|
+
styles: this.styles,
|
|
208
|
+
type: 'helix-preview-render',
|
|
209
|
+
};
|
|
210
|
+
this.frame?.contentWindow?.postMessage(message, HelixSandboxPreview_1.target);
|
|
211
|
+
}
|
|
212
|
+
connectedCallback() {
|
|
213
|
+
super.connectedCallback();
|
|
214
|
+
window.addEventListener('message', this.handleMessage);
|
|
215
|
+
}
|
|
216
|
+
disconnectedCallback() {
|
|
217
|
+
super.disconnectedCallback();
|
|
218
|
+
clearTimeout(this.pending);
|
|
219
|
+
this.pending = undefined;
|
|
220
|
+
window.removeEventListener('message', this.handleMessage);
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Loads the frame's document again, and re-sends the example to it.
|
|
224
|
+
*
|
|
225
|
+
* For a bundle that has changed underneath a page nobody reloaded. The frame
|
|
226
|
+
* carries its own build of the component library, as a classic script it ran
|
|
227
|
+
* once at load, so a rebuilt bundle reaches a tab that is already open
|
|
228
|
+
* exactly never: the sandbox around it hot-reloads and the preview inside it
|
|
229
|
+
* keeps running whatever it started with, which reads as a component fix that
|
|
230
|
+
* did not work.
|
|
231
|
+
*
|
|
232
|
+
* Nothing needs to be resent by the caller. Clearing `ready` and reassigning
|
|
233
|
+
* `src` puts this back in the state it was in before the first load, and the
|
|
234
|
+
* new document announces itself the same way the first one did.
|
|
235
|
+
*/
|
|
236
|
+
reload() {
|
|
237
|
+
const frame = this.frame;
|
|
238
|
+
if (!frame) {
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
this.ready = false;
|
|
242
|
+
frame.src = this.src;
|
|
243
|
+
}
|
|
244
|
+
updated(changed) {
|
|
245
|
+
super.updated(changed);
|
|
246
|
+
// A new document has to say it is listening again before anything is sent.
|
|
247
|
+
if (changed.has('src')) {
|
|
248
|
+
this.ready = false;
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
/* Typing is coalesced; a setting is not.
|
|
252
|
+
*
|
|
253
|
+
* The frame renders by assigning `innerHTML`, which throws away the example
|
|
254
|
+
* and builds it again, and every custom element in it disconnects and
|
|
255
|
+
* upgrades a second time. Sent on each update, that happened once per
|
|
256
|
+
* keystroke: an example of any size was being torn down and rebuilt for
|
|
257
|
+
* every character, and the work grows with the example while the typing
|
|
258
|
+
* does not.
|
|
259
|
+
*
|
|
260
|
+
* A frame is short enough to feel immediate and long enough that a burst of
|
|
261
|
+
* keystrokes is one render. Layout, direction and the color mode go
|
|
262
|
+
* straight out: they arrive one at a time from a menu, there is nothing to
|
|
263
|
+
* coalesce, and a delay there is a delay a reader can see. */
|
|
264
|
+
if (changed.has('source') || changed.has('styles')) {
|
|
265
|
+
this.scheduleSend();
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
this.send();
|
|
269
|
+
}
|
|
270
|
+
render() {
|
|
271
|
+
return html `<iframe
|
|
272
|
+
part="frame"
|
|
273
|
+
@load=${this.handleFrameLoad}
|
|
274
|
+
src=${this.src}
|
|
275
|
+
title=${this.label}
|
|
276
|
+
allow="clipboard-write *; fullscreen *"
|
|
277
|
+
sandbox="allow-scripts allow-forms"
|
|
278
|
+
></iframe>`;
|
|
279
|
+
}
|
|
280
|
+
static { this.styles = sheet; }
|
|
281
|
+
};
|
|
282
|
+
__decorate([
|
|
283
|
+
property({ attribute: 'color-mode' })
|
|
284
|
+
], HelixSandboxPreview.prototype, "colorMode", void 0);
|
|
285
|
+
__decorate([
|
|
286
|
+
property()
|
|
287
|
+
], HelixSandboxPreview.prototype, "src", void 0);
|
|
288
|
+
__decorate([
|
|
289
|
+
property()
|
|
290
|
+
], HelixSandboxPreview.prototype, "source", void 0);
|
|
291
|
+
__decorate([
|
|
292
|
+
property()
|
|
293
|
+
], HelixSandboxPreview.prototype, "styles", void 0);
|
|
294
|
+
__decorate([
|
|
295
|
+
property()
|
|
296
|
+
], HelixSandboxPreview.prototype, "label", void 0);
|
|
297
|
+
__decorate([
|
|
298
|
+
property({ reflect: true })
|
|
299
|
+
], HelixSandboxPreview.prototype, "direction", void 0);
|
|
300
|
+
__decorate([
|
|
301
|
+
property({ reflect: true })
|
|
302
|
+
], HelixSandboxPreview.prototype, "layout", void 0);
|
|
303
|
+
HelixSandboxPreview = HelixSandboxPreview_1 = __decorate([
|
|
304
|
+
customElement('helix-sandbox-preview')
|
|
305
|
+
], HelixSandboxPreview);
|
|
306
|
+
export { HelixSandboxPreview };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// Generated from src/sandbox/root/sandbox-root.css by `bun run styles`. Do not edit.
|
|
2
|
+
import { createSheet } from '@fusion.dev/helix-core';
|
|
3
|
+
export const styles = createSheet(`:host {
|
|
4
|
+
background-color: var(--helix-color-background);
|
|
5
|
+
display: grid;
|
|
6
|
+
grid-template-rows: auto minmax(0, 1fr) auto;
|
|
7
|
+
min-block-size: var(--sandbox-min-block-size, 20rem);
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
::slotted([slot="toolbar"]) {
|
|
12
|
+
grid-row: 1;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
[part="body"] {
|
|
16
|
+
grid-row: 2;
|
|
17
|
+
min-block-size: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
::slotted([slot="status"]) {
|
|
21
|
+
grid-row: 3;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
[part="body"],
|
|
25
|
+
[part="panes"] {
|
|
26
|
+
--splitter-color: var(--sandbox-separator-color, var(--helix-color-border));
|
|
27
|
+
--splitter-target: calc(var(--sandbox-grab, var(--helix-space-2xs)) * 2);
|
|
28
|
+
min-block-size: 0;
|
|
29
|
+
min-inline-size: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
[part="panes"] {
|
|
33
|
+
block-size: 100%;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
[part="body"]:not([data-panel])::part(separator) {
|
|
37
|
+
display: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
[part="body"]:not([data-panel])::part(corner) {
|
|
41
|
+
display: none;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
[part="pane"] {
|
|
45
|
+
block-size: 100%;
|
|
46
|
+
min-block-size: 0;
|
|
47
|
+
min-inline-size: 0;
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
[part="panel"] {
|
|
52
|
+
block-size: 100%;
|
|
53
|
+
min-block-size: 0;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
::slotted([slot="panel"]) {
|
|
58
|
+
block-size: 100%;
|
|
59
|
+
min-block-size: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
::slotted(helix-sandbox-preview) {
|
|
63
|
+
background-color: var(--helix-color-background);
|
|
64
|
+
block-size: 100%;
|
|
65
|
+
color: var(--helix-color-foreground);
|
|
66
|
+
display: block;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@media print {
|
|
70
|
+
:host {
|
|
71
|
+
display: none;
|
|
72
|
+
}
|
|
73
|
+
}`);
|