@fusion.dev/helix 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +256 -256
- package/dist/accordion/item/accordion-item.css.js +0 -1
- package/dist/accordion/item/accordion-item.js +0 -29
- package/dist/accordion/root/accordion-root.css.js +0 -1
- package/dist/accordion/root/accordion-root.js +0 -20
- package/dist/announcement/root/announcement-root.css.js +0 -1
- package/dist/announcement/root/announcement-root.js +0 -16
- package/dist/app-header/root/app-header-root.css.js +0 -1
- package/dist/app-header/root/app-header-root.js +0 -45
- package/dist/aura/root/aura-axis.js +0 -58
- package/dist/aura/root/aura-root.css.js +0 -1
- package/dist/aura/root/aura-root.js +0 -520
- package/dist/aura/root/aura-shader.js +0 -35
- package/dist/avatar/group/avatar-group.css.js +0 -1
- package/dist/avatar/group/avatar-group.js +0 -24
- package/dist/avatar/root/avatar-root.css.js +0 -1
- package/dist/avatar/root/avatar-root.js +0 -23
- package/dist/badge/root/badge-root.css.js +0 -1
- package/dist/badge/root/badge-root.d.ts +2 -6
- package/dist/badge/root/badge-root.js +0 -18
- package/dist/bar-chart/root/bar-chart-root.css.js +0 -1
- package/dist/bar-chart/root/bar-chart-root.js +0 -50
- package/dist/blockquote/root/blockquote-root.css.js +0 -1
- package/dist/blockquote/root/blockquote-root.js +0 -17
- package/dist/breadcrumbs/breadcrumb/breadcrumb.css.js +0 -1
- package/dist/breadcrumbs/breadcrumb/breadcrumb.js +0 -28
- package/dist/breadcrumbs/root/breadcrumbs-root.css.js +0 -1
- package/dist/breadcrumbs/root/breadcrumbs-root.js +0 -19
- package/dist/button/root/button-root.css.js +0 -1
- package/dist/button/root/button-root.js +0 -38
- package/dist/button-group/root/button-group-root.css.js +0 -1
- package/dist/button-group/root/button-group-root.js +0 -24
- package/dist/callout/root/callout-root.css.js +0 -1
- package/dist/callout/root/callout-root.js +0 -26
- package/dist/card/root/card-root.css.js +0 -1
- package/dist/card/root/card-root.js +0 -45
- package/dist/carousel/root/carousel-root.css.js +0 -1
- package/dist/carousel/root/carousel-root.js +0 -24
- package/dist/chat/composer/chat-composer.css.js +0 -1
- package/dist/chat/composer/chat-composer.js +0 -26
- package/dist/chat/message/chat-message.css.js +0 -1
- package/dist/chat/message/chat-message.js +0 -29
- package/dist/chat/root/chat-root.css.js +0 -1
- package/dist/chat/root/chat-root.js +0 -38
- package/dist/checkbox/root/checkbox-root.css.js +0 -1
- package/dist/checkbox/root/checkbox-root.js +0 -26
- package/dist/checkbox-group/root/checkbox-group-root.css.js +0 -1
- package/dist/checkbox-group/root/checkbox-group-root.js +0 -15
- package/dist/code/root/code-root.css.js +0 -1
- package/dist/code/root/code-root.js +0 -21
- package/dist/code-block/root/code-block-root.css.js +0 -1
- package/dist/code-block/root/code-block-root.js +0 -19
- package/dist/color-input/root/color-input-root.css.js +0 -1
- package/dist/color-input/root/color-input-root.js +0 -42
- package/dist/color-picker/root/color-picker-root.css.js +0 -1
- package/dist/color-picker/root/color-picker-root.js +0 -42
- package/dist/combobox/root/combobox-root.css.js +0 -1
- package/dist/combobox/root/combobox-root.js +0 -28
- package/dist/command/root/command-root.css.js +0 -1
- package/dist/command/root/command-root.js +0 -21
- package/dist/copy-button/root/copy-button-root.css.js +0 -1
- package/dist/copy-button/root/copy-button-root.js +0 -14
- package/dist/data-table/root/data-table-root.css.js +0 -1
- package/dist/data-table/root/data-table-root.js +0 -39
- package/dist/date-input/root/date-input-root.css.js +0 -1
- package/dist/date-input/root/date-input-root.js +0 -38
- package/dist/date-picker/root/date-picker-root.css.js +0 -1
- package/dist/date-picker/root/date-picker-root.js +0 -28
- package/dist/dialog/root/dialog-root.css.js +0 -1
- package/dist/dialog/root/dialog-root.js +0 -31
- package/dist/divider/root/divider-root.css.js +0 -1
- package/dist/divider/root/divider-root.js +0 -24
- package/dist/donut-chart/root/donut-chart-root.css.js +0 -1
- package/dist/donut-chart/root/donut-chart-root.js +0 -49
- package/dist/drawer/root/drawer-root.css.js +0 -1
- package/dist/drawer/root/drawer-root.js +0 -38
- package/dist/drilldown/item/drilldown-item.css.js +0 -1
- package/dist/drilldown/item/drilldown-item.js +0 -15
- package/dist/drilldown/root/drilldown-root.css.js +0 -1
- package/dist/drilldown/root/drilldown-root.js +0 -23
- package/dist/element-events.generated.js +0 -5
- package/dist/empty/root/empty-root.css.js +0 -1
- package/dist/empty/root/empty-root.js +0 -16
- package/dist/file-input/root/file-input-root.css.js +0 -1
- package/dist/file-input/root/file-input-root.js +0 -30
- package/dist/flex/root/flex-root.css.js +0 -1
- package/dist/flex/root/flex-root.js +0 -32
- package/dist/format-date/root/format-date-root.css.js +0 -1
- package/dist/format-date/root/format-date-root.js +0 -17
- package/dist/grid/root/grid-root.css.js +0 -1
- package/dist/grid/root/grid-root.js +0 -69
- package/dist/heatmap/root/heatmap-root.css.js +0 -1
- package/dist/heatmap/root/heatmap-root.d.ts +9 -11
- package/dist/heatmap/root/heatmap-root.js +0 -73
- package/dist/icon/glyph.css.js +0 -1
- package/dist/icon/root/icon-root.css.js +0 -1
- package/dist/icon/root/icon-root.js +0 -19
- package/dist/icon-button/root/icon-button-root.css.js +0 -1
- package/dist/icon-button/root/icon-button-root.js +0 -35
- package/dist/image/root/image-root.css.js +0 -1
- package/dist/image/root/image-root.js +0 -28
- package/dist/index.js +0 -5
- package/dist/input/root/input-root.css.js +0 -1
- package/dist/input/root/input-root.js +0 -28
- package/dist/kbd/root/kbd-root.css.js +0 -1
- package/dist/kbd/root/kbd-root.js +0 -20
- package/dist/legend/root/legend-root.css.js +0 -1
- package/dist/legend/root/legend-root.js +0 -35
- package/dist/line-chart/root/line-chart-root.css.js +0 -1
- package/dist/line-chart/root/line-chart-root.js +0 -47
- package/dist/list/item/list-item.css.js +0 -1
- package/dist/list/item/list-item.js +0 -38
- package/dist/list/root/list-root.css.js +0 -1
- package/dist/list/root/list-root.js +0 -23
- package/dist/listbox/root/listbox-root.css.js +0 -1
- package/dist/listbox/root/listbox-root.js +0 -22
- package/dist/loader/root/loader-root.css.js +0 -1
- package/dist/loader/root/loader-root.js +0 -19
- package/dist/megamenu/root/megamenu-root.css.js +0 -1
- package/dist/megamenu/root/megamenu-root.js +0 -24
- package/dist/menu/item/menu-item.css.js +0 -1
- package/dist/menu/item/menu-item.js +0 -16
- package/dist/menu/root/menu-root.css.js +0 -1
- package/dist/menu/root/menu-root.js +0 -26
- package/dist/meter/root/meter-root.css.js +0 -1
- package/dist/meter/root/meter-root.js +0 -50
- package/dist/mixins/mixin-control-surface/mixin-control-surface.js +0 -3
- package/dist/navigation/root/navigation-root.css.js +0 -1
- package/dist/navigation/root/navigation-root.js +0 -18
- package/dist/notifications/notification/notification.css.js +0 -1
- package/dist/notifications/notification/notification.js +0 -53
- package/dist/notifications/root/notifications-root.css.js +0 -1
- package/dist/notifications/root/notifications-root.js +0 -31
- package/dist/number-input/root/number-input-root.css.js +0 -1
- package/dist/number-input/root/number-input-root.js +0 -31
- package/dist/option/group/option-group.css.js +0 -1
- package/dist/option/group/option-group.js +0 -13
- package/dist/option/root/option-root.css.js +0 -1
- package/dist/option/root/option-root.js +0 -20
- package/dist/outline/root/outline-root.css.js +0 -1
- package/dist/outline/root/outline-root.js +0 -21
- package/dist/pagination/root/pagination-root.css.js +0 -1
- package/dist/pagination/root/pagination-root.js +0 -49
- package/dist/pagination/size/pagination-size.css.js +0 -1
- package/dist/pagination/size/pagination-size.js +0 -25
- package/dist/pagination/summary/pagination-summary.css.js +0 -1
- package/dist/pagination/summary/pagination-summary.js +0 -13
- package/dist/pin-input/root/pin-input-root.css.js +0 -1
- package/dist/pin-input/root/pin-input-root.js +0 -27
- package/dist/popover/root/popover-root.css.js +0 -1
- package/dist/popover/root/popover-root.js +0 -30
- package/dist/progress/root/progress-root.css.js +0 -1
- package/dist/progress/root/progress-root.js +0 -25
- package/dist/qr-code/root/qr-code-root.css.js +0 -1
- package/dist/qr-code/root/qr-code-root.js +0 -27
- package/dist/quote/root/quote-root.css.js +0 -1
- package/dist/quote/root/quote-root.js +0 -15
- package/dist/radio/group/radio-group.css.js +0 -1
- package/dist/radio/group/radio-group.js +0 -16
- package/dist/radio/root/radio-root.css.js +0 -1
- package/dist/radio/root/radio-root.js +0 -46
- package/dist/rating/root/rating-root.css.js +0 -1
- package/dist/rating/root/rating-root.js +0 -22
- package/dist/sandbox/index.js +0 -14
- package/dist/sandbox/preview/sandbox-preview.css.js +0 -1
- package/dist/sandbox/preview/sandbox-preview.js +0 -182
- package/dist/sandbox/root/sandbox-root.css.js +0 -1
- package/dist/sandbox/root/sandbox-root.js +1 -295
- package/dist/sandbox/source/sandbox-source.css.js +0 -1
- package/dist/sandbox/source/sandbox-source.js +0 -77
- package/dist/sandbox/status-bar/sandbox-status-bar.css.js +0 -1
- package/dist/sandbox/status-bar/sandbox-status-bar.js +0 -38
- package/dist/sandbox/terminal/sandbox-terminal.css.js +0 -1
- package/dist/sandbox/terminal/sandbox-terminal.js +0 -54
- package/dist/sandbox/toolbar/sandbox-toolbar.css.js +0 -1
- package/dist/sandbox/toolbar/sandbox-toolbar.js +0 -29
- package/dist/scroll-area/root/scroll-area-root.css.js +0 -1
- package/dist/scroll-area/root/scroll-area-root.js +0 -24
- package/dist/select/root/select-root.css.js +0 -1
- package/dist/select/root/select-root.js +0 -33
- package/dist/shared/chart/series.css.js +0 -1
- package/dist/shared/chart/terminus.css.js +0 -1
- package/dist/shared/field/field-inline.css.js +0 -1
- package/dist/shared/field/field-stacked.css.js +0 -1
- package/dist/shared/field/field.css.js +0 -1
- package/dist/skeleton/root/skeleton-root.css.js +0 -1
- package/dist/skeleton/root/skeleton-root.js +0 -18
- package/dist/slider/root/slider-root.css.js +0 -1
- package/dist/slider/root/slider-root.js +0 -32
- package/dist/sparkline/root/sparkline-root.css.js +0 -1
- package/dist/sparkline/root/sparkline-root.js +0 -40
- package/dist/speed-dial/item/speed-dial-item.css.js +0 -1
- package/dist/speed-dial/item/speed-dial-item.js +0 -16
- package/dist/speed-dial/root/speed-dial-root.css.js +0 -1
- package/dist/speed-dial/root/speed-dial-root.js +0 -16
- package/dist/splitter/root/splitter-root.css.js +0 -1
- package/dist/splitter/root/splitter-root.js +0 -50
- package/dist/stat/group/stat-group.css.js +0 -1
- package/dist/stat/group/stat-group.js +0 -19
- package/dist/stat/root/stat-root.css.js +0 -1
- package/dist/stat/root/stat-root.js +0 -17
- package/dist/steps/root/steps-root.css.js +0 -1
- package/dist/steps/root/steps-root.js +0 -26
- package/dist/steps/step/step.css.js +0 -1
- package/dist/steps/step/step.js +0 -12
- package/dist/switch/root/switch-root.css.js +0 -1
- package/dist/switch/root/switch-root.js +0 -32
- package/dist/table/cell/table-cell.css.js +0 -1
- package/dist/table/cell/table-cell.js +0 -14
- package/dist/table/column/table-column.css.js +0 -1
- package/dist/table/column/table-column.js +0 -13
- package/dist/table/root/table-root.css.js +0 -1
- package/dist/table/root/table-root.js +0 -19
- package/dist/table/row/table-row.css.js +0 -1
- package/dist/table/row/table-row.js +0 -14
- package/dist/tabs/panel/tab-panel.css.js +0 -1
- package/dist/tabs/panel/tab-panel.js +0 -16
- package/dist/tabs/root/tabs-root.css.js +0 -1
- package/dist/tabs/root/tabs-root.js +0 -19
- package/dist/tabs/tab/tab.css.js +0 -1
- package/dist/tabs/tab/tab.js +0 -16
- package/dist/tag/root/tag-root.css.js +0 -1
- package/dist/tag/root/tag-root.js +0 -25
- package/dist/text/root/text-root.css.js +0 -1
- package/dist/text/root/text-root.js +0 -48
- package/dist/textarea/root/textarea-root.css.js +0 -1
- package/dist/textarea/root/textarea-root.js +0 -17
- package/dist/time-input/root/time-input-root.css.js +0 -1
- package/dist/time-input/root/time-input-root.js +0 -31
- package/dist/time-picker/root/time-picker-root.css.js +0 -1
- package/dist/time-picker/root/time-picker-root.js +0 -29
- package/dist/timeline/item/timeline-item.css.js +0 -1
- package/dist/timeline/item/timeline-item.js +0 -17
- package/dist/timeline/root/timeline-root.css.js +0 -1
- package/dist/timeline/root/timeline-root.js +0 -15
- package/dist/toast/item/toast-item.css.js +0 -1
- package/dist/toast/item/toast-item.js +0 -21
- package/dist/toast/root/toast-root.css.js +0 -1
- package/dist/toast/root/toast-root.js +0 -27
- package/dist/toggle/group/toggle-group.css.js +0 -1
- package/dist/toggle/group/toggle-group.js +0 -25
- package/dist/toggle/root/toggle-root.css.js +0 -1
- package/dist/toggle/root/toggle-root.js +0 -18
- package/dist/toolbar/root/toolbar-root.css.js +0 -1
- package/dist/toolbar/root/toolbar-root.js +0 -19
- package/dist/tooltip/root/tooltip-root.css.js +0 -1
- package/dist/tooltip/root/tooltip-root.js +0 -22
- package/dist/tour/root/tour-root.css.js +0 -1
- package/dist/tour/root/tour-root.js +0 -14
- package/dist/tour/stop/tour-stop.css.js +0 -1
- package/dist/tour/stop/tour-stop.js +0 -22
- package/dist/tree/item/tree-item.css.js +0 -1
- package/dist/tree/item/tree-item.js +0 -34
- package/dist/tree/root/tree-root.css.js +0 -1
- package/dist/tree/root/tree-root.js +0 -27
- package/dist/trend/root/trend-root.css.js +0 -1
- package/dist/trend/root/trend-root.js +0 -34
- package/dist/video/root/video-root.css.js +0 -1
- package/dist/video/root/video-root.js +0 -37
- package/dist/video-playlist/item/video-playlist-item.css.js +0 -1
- package/dist/video-playlist/item/video-playlist-item.js +0 -15
- package/dist/video-playlist/menu/video-playlist-menu.css.js +0 -1
- package/dist/video-playlist/menu/video-playlist-menu.js +0 -36
- package/dist/video-playlist/root/video-playlist-root.css.js +0 -1
- package/dist/video-playlist/root/video-playlist-root.js +0 -16
- package/dist/virtual-list/root/virtual-list-root.css.js +0 -1
- package/dist/virtual-list/root/virtual-list-root.js +0 -21
- package/jsx.d.ts +1538 -2818
- package/package.json +7 -7
- package/vue.d.ts +3 -7
|
@@ -7,35 +7,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { customElement } from '@fusion.dev/helix-core';
|
|
8
8
|
import { HelixHeadlessAccordionItem } from '@fusion.dev/helix-headless/accordion';
|
|
9
9
|
import { styles } from './accordion-item.css.js';
|
|
10
|
-
/**
|
|
11
|
-
* @summary One collapsible section of an accordion.
|
|
12
|
-
*
|
|
13
|
-
* @description
|
|
14
|
-
* The open and close transition animates `grid-template-rows` from `0fr` to
|
|
15
|
-
* `1fr`, which is the only technique that reaches the content's intrinsic
|
|
16
|
-
* height without measuring it in JavaScript. It is disabled under
|
|
17
|
-
* `prefers-reduced-motion`.
|
|
18
|
-
*
|
|
19
|
-
* Usable on its own as a disclosure, with no accordion around it.
|
|
20
|
-
*
|
|
21
|
-
* @since 0.1.0
|
|
22
|
-
* @status experimental
|
|
23
|
-
* @aliases Collapsible, Expander, Disclosure
|
|
24
|
-
* @documentation https://helix.fusion.dev/components/accordion
|
|
25
|
-
*
|
|
26
|
-
* @slot - The content revealed when open.
|
|
27
|
-
* @slot summary - The always-visible trigger content.
|
|
28
|
-
*
|
|
29
|
-
* @event {HelixBeforeOpenEvent} helix-before-open - Fired before the item opens or closes. Cancelable: refusing it takes the decision and nothing moves.
|
|
30
|
-
*
|
|
31
|
-
* @csspart chevron - The open and close indicator.
|
|
32
|
-
* @csspart container - The outer wrapper.
|
|
33
|
-
* @csspart content - The revealed region.
|
|
34
|
-
* @csspart content-inner - Padding wrapper inside the animated region.
|
|
35
|
-
* @csspart trigger - The clickable summary row.
|
|
36
|
-
*
|
|
37
|
-
* @cssproperty --accordion-item-padding - Inset of the trigger and content.
|
|
38
|
-
*/
|
|
39
10
|
let HelixAccordionItem = class HelixAccordionItem extends HelixHeadlessAccordionItem {
|
|
40
11
|
static { this.styles = styles; }
|
|
41
12
|
};
|
|
@@ -8,26 +8,6 @@ import { customElement } from '@fusion.dev/helix-core';
|
|
|
8
8
|
import { HelixHeadlessAccordion } from '@fusion.dev/helix-headless/accordion';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
10
|
import { styles } from './accordion-root.css.js';
|
|
11
|
-
/**
|
|
12
|
-
* @summary Groups collapsible sections, one open at a time by default.
|
|
13
|
-
*
|
|
14
|
-
* @description
|
|
15
|
-
* Items share one rule between neighbors rather than each drawing its own, so
|
|
16
|
-
* the seam between two items is one pixel and not two. Those seams are what
|
|
17
|
-
* carry the grouping, which is why the surrounding frame is opt-in rather than
|
|
18
|
-
* the default: an accordion is a list, where a card is a surface.
|
|
19
|
-
*
|
|
20
|
-
* @since 0.1.0
|
|
21
|
-
* @status experimental
|
|
22
|
-
* @category layout
|
|
23
|
-
* @aliases Collapse, Expander group
|
|
24
|
-
* @documentation https://helix.fusion.dev/components/accordion
|
|
25
|
-
*
|
|
26
|
-
* @slot - The accordion's items.
|
|
27
|
-
*
|
|
28
|
-
* @cssproperty --accordion-border-color - Color of the seams, and of the frame when outlined.
|
|
29
|
-
* @cssproperty --accordion-radius - Corner radius of the stack, when outlined.
|
|
30
|
-
*/
|
|
31
11
|
let HelixAccordion = class HelixAccordion extends HelixHeadlessAccordion {
|
|
32
12
|
static { this.styles = styles; }
|
|
33
13
|
};
|
|
@@ -7,22 +7,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { customElement } from '@fusion.dev/helix-core';
|
|
8
8
|
import { HelixHeadlessAnnouncement } from '@fusion.dev/helix-headless/announcement';
|
|
9
9
|
import { styles } from './announcement-root.css.js';
|
|
10
|
-
/**
|
|
11
|
-
* @summary A page-level message above the masthead, which can be dismissed.
|
|
12
|
-
*
|
|
13
|
-
* @description
|
|
14
|
-
* Full width and flat, with the severity carried by a tinted fill and a
|
|
15
|
-
* hairline beneath rather than by a border on four sides: an announcement is a
|
|
16
|
-
* band across the top of the page, not a box that happens to be wide.
|
|
17
|
-
*
|
|
18
|
-
* @since 0.1.0
|
|
19
|
-
* @status stable
|
|
20
|
-
* @category feedback
|
|
21
|
-
* @aliases Banner, Notification bar, Alert bar
|
|
22
|
-
* @documentation https://helix.fusion.dev/components/announcement
|
|
23
|
-
*
|
|
24
|
-
* @cssproperty --announcement-inset - Inline padding, matched to the page.
|
|
25
|
-
*/
|
|
26
10
|
let HelixAnnouncement = class HelixAnnouncement extends HelixHeadlessAnnouncement {
|
|
27
11
|
static { this.styles = styles; }
|
|
28
12
|
};
|
|
@@ -8,54 +8,9 @@ import { customElement } from '@fusion.dev/helix-core';
|
|
|
8
8
|
import { HelixHeadlessAppHeader } from '@fusion.dev/helix-headless/app-header';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
10
|
import { styles } from './app-header-root.css.js';
|
|
11
|
-
/**
|
|
12
|
-
* @summary Page-level banner holding brand, navigation, and actions.
|
|
13
|
-
*
|
|
14
|
-
* @description
|
|
15
|
-
* Flat, opaque, and in the flow. Both of the interesting things a banner can do
|
|
16
|
-
* are opt-in: `sticky` because following the reader is a decision about the
|
|
17
|
-
* page rather than about the bar, and `material` because a backdrop filter
|
|
18
|
-
* makes the header a containing block for `position: fixed` descendants, so an
|
|
19
|
-
* overlay rendered inside a material header is placed against the header rather
|
|
20
|
-
* than the viewport.
|
|
21
|
-
*
|
|
22
|
-
* The separating rule appears only once the page has scrolled, which keeps the
|
|
23
|
-
* banner flat against a hero and lifts it off the content afterwards. There is
|
|
24
|
-
* no shadow: the rule is the whole of it.
|
|
25
|
-
*
|
|
26
|
-
* @since 0.1.0
|
|
27
|
-
* @status stable
|
|
28
|
-
* @category navigation
|
|
29
|
-
* @aliases Masthead, Navbar, TopBar
|
|
30
|
-
* @documentation https://helix.fusion.dev/components/app-header
|
|
31
|
-
*
|
|
32
|
-
* @slot - Primary navigation.
|
|
33
|
-
* @slot actions - Trailing actions, such as a call to action.
|
|
34
|
-
* @slot brand - Wordmark or logo, at the inline start.
|
|
35
|
-
*
|
|
36
|
-
* @csspart content - The centered row inside the banner.
|
|
37
|
-
*
|
|
38
|
-
* @cssproperty --app-header-backdrop - The filter behind it. `none` to pair it with a panel.
|
|
39
|
-
* @cssproperty --app-header-background-color - Fill behind the banner.
|
|
40
|
-
* @cssproperty --app-header-block-size - Height of the banner.
|
|
41
|
-
* @cssproperty --app-header-border-color - The line under the bar. None by default.
|
|
42
|
-
* @cssproperty --app-header-max-inline-size - Width the content is centered in.
|
|
43
|
-
* @cssproperty --app-header-padding - Inline padding of the banner.
|
|
44
|
-
*/
|
|
45
11
|
let HelixAppHeader = class HelixAppHeader extends HelixHeadlessAppHeader {
|
|
46
12
|
constructor() {
|
|
47
13
|
super(...arguments);
|
|
48
|
-
/**
|
|
49
|
-
* Whether the banner sticks to the top of the viewport.
|
|
50
|
-
*
|
|
51
|
-
* Opt in, because following the reader is a decision about the page rather
|
|
52
|
-
* than about the bar, and because a reflected `true` writes an attribute the
|
|
53
|
-
* server's markup does not have. Every default here is the absent attribute.
|
|
54
|
-
*
|
|
55
|
-
* It pairs with `material`: a bar that does not stick is only ever over the
|
|
56
|
-
* top of the page, so `glass` and `transparent` have nothing to be
|
|
57
|
-
* translucent against and the `scrolled` state never lands.
|
|
58
|
-
*/
|
|
59
14
|
this.sticky = false;
|
|
60
15
|
}
|
|
61
16
|
static { this.styles = styles; }
|
|
@@ -1,66 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Where the axis leaves the top edge, and the tilt that puts it there.
|
|
3
|
-
*
|
|
4
|
-
* **Two functions, and the pair is the point.** `exitOf` is a model of what the
|
|
5
|
-
* shader does; `tiltFor` is the solve a consumer's `terminus` goes through. One
|
|
6
|
-
* is the inverse of the other, so a spec can go round the loop and catch either
|
|
7
|
-
* one moving without the other. Nothing else can: `bearing` is private, its
|
|
8
|
-
* output is a uniform, and what that uniform does is a WebGL draw.
|
|
9
|
-
*
|
|
10
|
-
* That guard is the whole reason this file exists. `terminus` was wrong twice
|
|
11
|
-
* while its docstring said otherwise, the arithmetic living inside a getter
|
|
12
|
-
* beside a sentence describing different arithmetic with nothing comparing the
|
|
13
|
-
* two.
|
|
14
|
-
*
|
|
15
|
-
* **`exitOf` mirrors the shader step by step rather than stating the closed
|
|
16
|
-
* form**, which is deliberate and is what makes the round trip worth running.
|
|
17
|
-
* A closed form checked against its own algebra proves only that the algebra
|
|
18
|
-
* was inverted correctly. Written as the same three operations `main()`
|
|
19
|
-
* performs, in the same order, it is a claim about `aura-shader.ts`, and the
|
|
20
|
-
* day someone changes how that file handles the aspect this stops agreeing.
|
|
21
|
-
*/
|
|
22
|
-
/** Degrees to radians, which both directions need. */
|
|
23
1
|
const RADIANS = Math.PI / 180;
|
|
24
|
-
/**
|
|
25
|
-
* Where the shader's axis crosses the top edge, as a fraction of the width.
|
|
26
|
-
*
|
|
27
|
-
* Follows `main()` in `aura-shader.ts`:
|
|
28
|
-
*
|
|
29
|
-
* 1. `p.x *= aspect` stretches the frame before anything rotates, so the tilt
|
|
30
|
-
* the rotation takes is a slope in the stretched frame rather than on
|
|
31
|
-
* screen.
|
|
32
|
-
* 2. `float a = atan(sin(want), cos(want) * aspect)` is the angle it actually
|
|
33
|
-
* turns by, which is the asked-for screen angle converted into that frame.
|
|
34
|
-
* 3. `mat2 turn = mat2(cos(a), sin(a), -sin(a), cos(a))` rotates, and the axis
|
|
35
|
-
* is the line the rotated x is zero on: `cos(a) * x - sin(a) * y = 0`.
|
|
36
|
-
*
|
|
37
|
-
* At the top edge `y` is 1, so the crossing is at `x = tan(a)` in the stretched
|
|
38
|
-
* frame, and dividing the stretch back out puts it on screen. The aspect is
|
|
39
|
-
* therefore paid twice, once going into the rotation and once coming out, which
|
|
40
|
-
* is why it appears squared when the three steps are collapsed.
|
|
41
|
-
*
|
|
42
|
-
* @param tilt - The angle handed to the shader, in degrees.
|
|
43
|
-
* @param aspect - The box's width over its height.
|
|
44
|
-
* @returns The crossing, `0` at the left edge and `1` at the right.
|
|
45
|
-
*/
|
|
46
2
|
export const exitOf = (tilt, aspect) => {
|
|
47
3
|
const want = tilt * RADIANS;
|
|
48
4
|
const turned = Math.atan2(Math.sin(want), Math.cos(want) * aspect);
|
|
49
5
|
const stretched = Math.tan(turned);
|
|
50
6
|
return (stretched / aspect + 1) / 2;
|
|
51
7
|
};
|
|
52
|
-
/**
|
|
53
|
-
* The tilt, in degrees, whose axis crosses the top edge at `terminus`.
|
|
54
|
-
*
|
|
55
|
-
* The inverse of `exitOf`, solved rather than fitted: collapsing its three
|
|
56
|
-
* steps gives `terminus = 0.5 + tan(tilt) / (2 * aspect^2)`, and rearranging
|
|
57
|
-
* for the tilt gives what is below.
|
|
58
|
-
*
|
|
59
|
-
* The contract `terminus` claims: `0` is the left edge, `0.5` the middle and
|
|
60
|
-
* `1` the right edge, in every box.
|
|
61
|
-
*
|
|
62
|
-
* @param terminus - The crossing wanted, as a fraction of the width.
|
|
63
|
-
* @param aspect - The box's width over its height.
|
|
64
|
-
* @returns The tilt to hand the shader, in degrees.
|
|
65
|
-
*/
|
|
66
8
|
export const tiltFor = (terminus, aspect) => Math.atan(2 * (terminus - 0.5) * aspect * aspect) / RADIANS;
|