@fusion.dev/helix 0.145.0 → 0.147.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 +13218 -3717
- package/dist/accordion/item/accordion-item.css.js +4 -92
- package/dist/accordion/item/accordion-item.d.ts +8 -0
- package/dist/accordion/root/accordion-root.css.js +2 -28
- package/dist/announcement/root/announcement-root.css.js +10 -154
- package/dist/announcement/root/announcement-root.d.ts +3 -0
- package/dist/app-header/root/app-header-root.css.js +2 -118
- package/dist/area-chart/root/area-chart-root.css.js +4 -94
- package/dist/area-chart/root/area-chart-root.d.ts +1 -0
- package/dist/aura/root/aura-root.css.js +2 -54
- package/dist/aura/root/aura-root.d.ts +21 -9
- package/dist/aura/root/aura-root.js +23 -12
- package/dist/avatar/group/avatar-group.css.js +5 -36
- package/dist/avatar/group/avatar-group.d.ts +3 -0
- package/dist/avatar/root/avatar-root.css.js +1 -53
- package/dist/avatar/root/avatar-root.d.ts +2 -0
- package/dist/badge/root/badge-root.css.js +17 -142
- package/dist/badge/root/badge-root.d.ts +20 -0
- package/dist/badge/root/badge-root.js +6 -0
- package/dist/bar-chart/root/bar-chart-root.css.js +8 -292
- package/dist/blockquote/root/blockquote-root.css.js +1 -43
- package/dist/blockquote/root/blockquote-root.d.ts +2 -0
- package/dist/breadcrumbs/breadcrumb/breadcrumb.css.js +13 -98
- package/dist/breadcrumbs/root/breadcrumbs-root.css.js +7 -21
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +18 -0
- package/dist/breadcrumbs/root/breadcrumbs-root.js +4 -0
- package/dist/button/root/button-root.css.js +16 -196
- package/dist/button/root/button-root.d.ts +3 -0
- package/dist/button-group/root/button-group-root.css.js +2 -52
- package/dist/callout/root/callout-root.css.js +5 -137
- package/dist/callout/root/callout-root.d.ts +8 -2
- package/dist/canvas/node/canvas-node.css.js +10 -367
- package/dist/canvas/root/canvas-root.css.js +7 -270
- package/dist/card/root/card-root.css.js +5 -134
- package/dist/card/root/card-root.d.ts +6 -0
- package/dist/carousel/root/carousel-root.css.js +20 -386
- package/dist/chat/composer/chat-composer.css.js +4 -105
- package/dist/chat/message/chat-message.css.js +5 -301
- package/dist/chat/message/chat-message.d.ts +5 -0
- package/dist/chat/message/chat-message.js +2 -1
- package/dist/chat/root/chat-root.css.js +5 -155
- package/dist/chat/root/chat-root.d.ts +2 -0
- package/dist/chat/root/chat-root.js +2 -1
- package/dist/chat/typing.css.d.ts +1 -0
- package/dist/chat/typing.css.js +25 -0
- package/dist/checkbox/root/checkbox-root.css.js +12 -162
- package/dist/checkbox/root/checkbox-root.d.ts +2 -1
- package/dist/checkbox-group/root/checkbox-group-root.css.js +1 -27
- package/dist/code/root/code-root.css.js +3 -25
- package/dist/code/root/code-root.d.ts +2 -0
- package/dist/code-block/root/code-block-root.css.js +9 -250
- package/dist/code-block/root/code-block-root.d.ts +2 -1
- package/dist/color-input/root/color-input-root.css.js +5 -104
- package/dist/color-picker/root/color-picker-root.css.js +39 -329
- package/dist/color-picker/root/color-picker-root.d.ts +3 -0
- package/dist/combobox/root/combobox-root.css.js +8 -147
- package/dist/command/root/command-root.css.js +3 -74
- package/dist/copy-button/root/copy-button-root.css.js +5 -36
- package/dist/copy-button/root/copy-button-root.d.ts +7 -0
- package/dist/data-table/root/data-table-root.css.js +24 -241
- package/dist/data-table/root/data-table-root.d.ts +12 -0
- package/dist/date-input/root/date-input-root.css.js +8 -93
- package/dist/date-picker/root/date-picker-root.css.js +16 -278
- package/dist/date-picker/root/date-picker-root.d.ts +1 -0
- package/dist/description-list/item/description-list-item.css.js +1 -41
- package/dist/description-list/item/description-list-item.d.ts +7 -0
- package/dist/description-list/root/description-list-root.css.js +1 -34
- package/dist/description-list/root/description-list-root.d.ts +1 -0
- package/dist/dialog/root/dialog-root.css.js +7 -221
- package/dist/dialog/root/dialog-root.d.ts +3 -0
- package/dist/divider/root/divider-root.css.js +6 -81
- package/dist/donut-chart/root/donut-chart-root.css.js +7 -174
- package/dist/donut-chart/root/donut-chart-root.d.ts +3 -0
- package/dist/drawer/root/drawer-root.css.js +14 -193
- package/dist/drawer/root/drawer-root.d.ts +5 -0
- package/dist/drilldown/item/drilldown-item.css.js +4 -51
- package/dist/drilldown/item/drilldown-item.d.ts +7 -0
- package/dist/drilldown/root/drilldown-root.css.js +8 -109
- package/dist/drilldown/root/drilldown-root.d.ts +10 -0
- package/dist/element-events.generated.js +19 -6
- package/dist/empty/root/empty-root.css.js +2 -42
- package/dist/file-input/root/file-input-root.css.js +7 -172
- package/dist/file-input/root/file-input-root.d.ts +15 -0
- package/dist/filter-input/chip/filter-chip.css.js +2 -84
- package/dist/filter-input/field/filter-field.css.js +1 -3
- package/dist/filter-input/menu/filter-menu.css.js +1 -3
- package/dist/filter-input/operator/filter-operator.css.js +1 -3
- package/dist/filter-input/root/filter-input-root.css.js +6 -112
- package/dist/filter-input/root/filter-input-root.d.ts +5 -0
- package/dist/flex/root/flex-root.css.js +4 -198
- package/dist/flex/root/flex-root.d.ts +19 -8
- package/dist/format-date/root/format-date-root.css.js +1 -13
- package/dist/graph/root/graph-root.css.js +12 -444
- package/dist/graph/root/graph-root.d.ts +8 -0
- package/dist/grid/root/grid-root.css.js +1 -171
- package/dist/grid/root/grid-root.d.ts +4 -1
- package/dist/heatmap/root/heatmap-root.css.js +8 -155
- package/dist/heatmap/root/heatmap-root.d.ts +2 -0
- package/dist/icon/index.d.ts +1 -1
- package/dist/icon/root/icon-root.css.js +1 -18
- package/dist/icon/root/index.d.ts +1 -1
- package/dist/icon-button/root/icon-button-root.css.js +63 -186
- package/dist/icon-button/root/icon-button-root.d.ts +5 -0
- package/dist/image/root/image-root.css.js +7 -65
- package/dist/image/root/image-root.d.ts +3 -0
- package/dist/input/root/input-root.css.js +6 -79
- package/dist/kbd/root/kbd-root.css.js +2 -44
- package/dist/kbd/root/kbd-root.d.ts +9 -0
- package/dist/legend/root/legend-root.css.js +9 -106
- package/dist/legend/root/legend-root.d.ts +2 -0
- package/dist/lightbox/item/lightbox-item.css.js +1 -33
- package/dist/lightbox/root/lightbox-root.css.js +40 -144
- package/dist/line-chart/root/line-chart-root.css.js +4 -154
- package/dist/line-chart/root/line-chart-root.d.ts +3 -0
- package/dist/list/item/list-item.css.js +2 -94
- package/dist/list/root/list-root.css.js +4 -88
- package/dist/listbox/root/listbox-root.css.js +4 -102
- package/dist/listbox/root/listbox-root.d.ts +1 -0
- package/dist/loader/root/loader-root.css.js +5 -171
- package/dist/loader/root/loader-root.d.ts +2 -0
- package/dist/map/area/map-area.css.js +1 -23
- package/dist/map/buildings/map-buildings.css.js +1 -26
- package/dist/map/contours/map-contours.css.js +2 -5
- package/dist/map/landcover/map-landcover.css.js +1 -4
- package/dist/map/marker/map-marker.css.js +14 -327
- package/dist/map/points/map-points.css.js +1 -86
- package/dist/map/position/map-position.css.js +8 -227
- package/dist/map/raster/map-raster.css.js +1 -3
- package/dist/map/root/map-root.css.js +10 -352
- package/dist/map/route/map-route.css.js +1 -24
- package/dist/map/terrain/map-terrain.css.js +3 -7
- package/dist/megamenu/root/megamenu-root.css.js +15 -163
- package/dist/megamenu/root/megamenu-root.d.ts +19 -0
- package/dist/menu/item/menu-item.css.js +9 -111
- package/dist/menu/item/menu-item.d.ts +1 -0
- package/dist/menu/root/menu-root.css.js +1 -110
- package/dist/menu/section/menu-section.css.js +1 -13
- package/dist/meter/root/meter-root.css.js +20 -207
- package/dist/meter/root/meter-root.d.ts +4 -0
- package/dist/navigation/root/navigation-root.css.js +2 -54
- package/dist/navigation/root/navigation-root.d.ts +7 -0
- package/dist/notifications/group/notification-group.css.js +1 -61
- package/dist/notifications/notification/notification.css.js +17 -264
- package/dist/notifications/root/notifications-root.css.js +7 -119
- package/dist/notifications/root/notifications-root.d.ts +3 -1
- package/dist/number-input/root/number-input-root.css.js +10 -100
- package/dist/number-input/root/number-input-root.d.ts +8 -0
- package/dist/object-inspector/root/object-inspector-root.css.js +11 -166
- package/dist/option/group/option-group.css.js +1 -22
- package/dist/option/index.d.ts +1 -0
- package/dist/option/index.js +1 -0
- package/dist/option/root/option-root.css.js +3 -85
- package/dist/option/separator/option-separator.css.d.ts +1 -0
- package/dist/option/separator/option-separator.css.js +3 -0
- package/dist/option/separator/option-separator.d.ts +26 -0
- package/dist/option/separator/option-separator.js +16 -0
- package/dist/orb/root/orb-root.css.js +1 -41
- package/dist/orb/root/orb-root.d.ts +14 -6
- package/dist/orb/root/orb-root.js +16 -27
- package/dist/outline/root/outline-root.css.js +24 -122
- package/dist/outline/root/outline-root.d.ts +17 -4
- package/dist/pagination/root/pagination-root.css.js +9 -105
- package/dist/pagination/size/pagination-size.css.js +1 -22
- package/dist/pagination/summary/pagination-summary.css.js +1 -7
- package/dist/pin-input/root/pin-input-root.css.js +2 -73
- package/dist/pin-input/root/pin-input-root.d.ts +12 -2
- package/dist/popover/root/popover-root.css.js +6 -127
- package/dist/progress/root/progress-root.css.js +7 -228
- package/dist/progress/root/progress-root.d.ts +5 -0
- package/dist/qr-code/root/qr-code-root.css.js +1 -57
- package/dist/quote/root/quote-root.css.js +1 -17
- package/dist/quote/root/quote-root.d.ts +2 -0
- package/dist/radio/group/radio-group.css.js +1 -21
- package/dist/radio/root/radio-root.css.js +5 -192
- package/dist/radio/root/radio-root.d.ts +2 -1
- package/dist/rating/root/rating-root.css.js +4 -117
- package/dist/sandbox/frame.d.ts +5 -3
- package/dist/sandbox/frame.js +20 -6
- package/dist/sandbox/index.d.ts +1 -0
- package/dist/sandbox/preview/sandbox-preview.css.js +1 -12
- package/dist/sandbox/preview/sandbox-preview.d.ts +19 -3
- package/dist/sandbox/preview/sandbox-preview.js +17 -11
- package/dist/sandbox/root/sandbox-root.css.js +3 -70
- package/dist/sandbox/root/sandbox-root.d.ts +16 -4
- package/dist/sandbox/root/sandbox-root.js +29 -50
- package/dist/sandbox/source/sandbox-source.css.js +3 -25
- package/dist/sandbox/source/sandbox-source.d.ts +40 -0
- package/dist/sandbox/source/sandbox-source.js +22 -0
- package/dist/sandbox/status-bar/sandbox-status-bar.css.js +1 -21
- package/dist/sandbox/terminal/sandbox-terminal.css.js +5 -106
- package/dist/sandbox/terminal/sandbox-terminal.d.ts +14 -2
- package/dist/sandbox/terminal/sandbox-terminal.js +20 -6
- package/dist/sandbox/tokens.d.ts +39 -0
- package/dist/sandbox/tokens.js +9 -0
- package/dist/sandbox/toolbar/sandbox-toolbar.css.js +1 -36
- package/dist/scatter-chart/root/scatter-chart-root.css.js +11 -137
- package/dist/scatter-chart/root/scatter-chart-root.d.ts +3 -0
- package/dist/scroll-area/root/scroll-area-root.css.js +14 -181
- package/dist/select/root/select-root.css.js +4 -124
- package/dist/shared/chart/series.css.js +1 -36
- package/dist/shared/chart/terminus.css.js +1 -47
- package/dist/shared/chart/tooltip.css.js +1 -68
- package/dist/shared/collection/state.css.js +1 -9
- package/dist/shared/field/field-frame.css.js +3 -33
- package/dist/shared/field/field-inline.css.js +1 -4
- package/dist/shared/field/field-segments.css.js +1 -39
- package/dist/shared/field/field-stacked.css.js +1 -5
- package/dist/shared/field/field.css.js +3 -57
- package/dist/shared/floating/entrance.css.js +3 -34
- package/dist/shared/floating/panel.css.js +2 -17
- package/dist/shared/glyph/glyph.css.js +1 -5
- package/dist/shared/live/live.css.js +1 -8
- package/dist/shared/tags/tags.css.js +1 -39
- package/dist/shared/viewport/viewport.css.js +8 -135
- package/dist/skeleton/root/skeleton-root.css.js +12 -120
- package/dist/skeleton/root/skeleton-root.d.ts +1 -0
- package/dist/skip-link/root/skip-link-root.css.js +2 -35
- package/dist/skip-link/root/skip-link-root.d.ts +3 -3
- package/dist/slider/root/slider-root.css.js +35 -320
- package/dist/slider/root/slider-root.d.ts +2 -0
- package/dist/sparkline/root/sparkline-root.css.js +10 -96
- package/dist/sparkline/root/sparkline-root.d.ts +8 -0
- package/dist/sparkline/root/sparkline-root.js +2 -1
- package/dist/speed-dial/item/speed-dial-item.css.js +6 -74
- package/dist/speed-dial/item/speed-dial-item.d.ts +3 -0
- package/dist/speed-dial/root/speed-dial-root.css.js +3 -144
- package/dist/speed-dial/root/speed-dial-root.d.ts +7 -1
- package/dist/speed-dial/root/speed-dial-root.js +0 -1
- package/dist/splitter/root/splitter-root.css.js +11 -176
- package/dist/stat/group/stat-group.css.js +1 -36
- package/dist/stat/root/stat-root.css.js +3 -58
- package/dist/steps/root/steps-root.css.js +13 -70
- package/dist/steps/root/steps-root.d.ts +5 -0
- package/dist/steps/step/step.css.js +5 -156
- package/dist/switch/root/switch-root.css.js +2 -110
- package/dist/table/cell/table-cell.css.js +1 -33
- package/dist/table/column/table-column.css.js +7 -105
- package/dist/table/root/table-root.css.js +1 -43
- package/dist/table/row/table-row.css.js +6 -18
- package/dist/table/row/table-row.d.ts +2 -0
- package/dist/tabs/panel/tab-panel.css.js +2 -17
- package/dist/tabs/root/tabs-root.css.js +6 -177
- package/dist/tabs/root/tabs-root.d.ts +4 -0
- package/dist/tabs/tab/tab.css.js +10 -51
- package/dist/tabs/tab/tab.d.ts +7 -0
- package/dist/tag/group/tag-group.css.js +1 -5
- package/dist/tag/root/tag-root.css.js +1 -166
- package/dist/tag/root/tag-root.d.ts +2 -0
- package/dist/text/clamp.d.ts +5 -2
- package/dist/text/clamp.js +3 -1
- package/dist/text/root/text-root.css.js +11 -206
- package/dist/text/root/text-root.d.ts +2 -1
- package/dist/textarea/root/textarea-root.css.js +3 -44
- package/dist/time-input/root/time-input-root.css.js +7 -106
- package/dist/time-picker/root/time-picker-root.css.js +10 -134
- package/dist/time-picker/root/time-picker-root.d.ts +1 -0
- package/dist/timeline/group/timeline-group.css.js +1 -31
- package/dist/timeline/item/timeline-item.css.js +3 -134
- package/dist/timeline/root/timeline-root.css.js +1 -66
- package/dist/toast/item/toast-item.css.js +8 -240
- package/dist/toast/root/toast-root.css.js +1 -85
- package/dist/toast/root/toast-root.d.ts +1 -0
- package/dist/toast/root/toast-root.js +3 -1
- package/dist/toggle/group/toggle-group.css.js +9 -125
- package/dist/toggle/group/toggle-group.d.ts +6 -1
- package/dist/toggle/root/toggle-root.css.js +1 -23
- package/dist/toggle/root/toggle-root.d.ts +6 -0
- package/dist/toolbar/root/toolbar-root.css.js +1 -35
- package/dist/toolbar/root/toolbar-root.d.ts +4 -0
- package/dist/tooltip/root/tooltip-root.css.js +5 -101
- package/dist/tooltip/root/tooltip-root.d.ts +6 -0
- package/dist/tour/root/tour-root.css.js +2 -28
- package/dist/tour/stop/tour-stop.css.js +2 -109
- package/dist/tree/item/tree-item.css.js +14 -230
- package/dist/tree/item/tree-item.d.ts +9 -0
- package/dist/tree/root/tree-root.css.js +1 -40
- package/dist/trend/root/trend-root.css.js +5 -55
- package/dist/trend/root/trend-root.d.ts +2 -2
- package/dist/video/root/video-root.css.js +16 -398
- package/dist/video-playlist/item/video-playlist-item.css.js +12 -86
- package/dist/video-playlist/item/video-playlist-item.d.ts +12 -0
- package/dist/video-playlist/menu/video-playlist-menu.css.js +1 -41
- package/dist/video-playlist/root/video-playlist-root.css.js +1 -19
- package/dist/video-playlist/root/video-playlist-root.d.ts +2 -0
- package/dist/virtual-list/root/virtual-list-root.css.js +5 -28
- package/dist/virtual-list/root/virtual-list-root.d.ts +7 -1
- package/lint.json +1 -1
- package/package.json +9 -9
- package/types/jsx.d.ts +6997 -1154
- package/types/svelte.d.ts +1 -0
- package/types/vue.d.ts +2081 -271
|
@@ -1,179 +1,24 @@
|
|
|
1
1
|
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
|
-
export const styles = createSheet(`:host {
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
font-size: var(--helix-text-sm);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
[part="header"] {
|
|
9
|
-
align-items: center;
|
|
10
|
-
background-color: var(
|
|
2
|
+
export const styles = createSheet(`:host {display: flex;flex-direction: column;font-size: var(--helix-text-sm);}[part="header"] {align-items: center;background-color: var(
|
|
11
3
|
--object-inspector-header-background-color,
|
|
12
4
|
var(--helix-color-surface-raised)
|
|
13
|
-
);
|
|
14
|
-
border: var(--helix-border-thin) solid
|
|
15
|
-
var(--object-inspector-border-color, var(--helix-color-border));
|
|
16
|
-
border-block-end: none;
|
|
17
|
-
border-start-end-radius: var(--
|
|
18
|
-
border-start-start-radius: var(--object-inspector-radius, var(--helix-radii-lg));
|
|
19
|
-
display: flex;
|
|
20
|
-
padding-block: var(--helix-space-xs);
|
|
21
|
-
padding-inline: var(--helix-space-md);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
[part="label"] {
|
|
25
|
-
color: var(--helix-color-foreground-muted);
|
|
26
|
-
font-family: var(--helix-font-sans);
|
|
27
|
-
font-size: var(--helix-text-xs);
|
|
28
|
-
font-weight: var(--helix-weight-medium);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
[part="frame"] {
|
|
32
|
-
position: relative;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
[part="tree"] {
|
|
36
|
-
background-color: var(--object-inspector-background-color, var(--helix-color-background));
|
|
37
|
-
border: var(--helix-border-thin) solid
|
|
38
|
-
var(--object-inspector-border-color, var(--helix-color-border));
|
|
39
|
-
border-radius: var(--object-inspector-radius, var(--helix-radii-lg));
|
|
40
|
-
font-family: var(--helix-font-mono);
|
|
41
|
-
line-height: var(--helix-leading-normal);
|
|
42
|
-
padding-block: var(--helix-space-xs);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
[part="search-field"] {
|
|
46
|
-
appearance: none;
|
|
47
|
-
background-color: var(--object-inspector-background-color, var(--helix-color-background));
|
|
48
|
-
border: var(--helix-border-thin) solid
|
|
49
|
-
var(--object-inspector-border-color, var(--helix-color-border));
|
|
50
|
-
border-block-end: none;
|
|
51
|
-
border-start-end-radius: var(--object-inspector-radius, var(--helix-radii-lg));
|
|
52
|
-
border-start-start-radius: var(--object-inspector-radius, var(--helix-radii-lg));
|
|
53
|
-
box-sizing: border-box;
|
|
54
|
-
color: var(--helix-color-foreground);
|
|
55
|
-
font-family: var(--helix-font-sans);
|
|
56
|
-
font-size: var(--helix-text-sm);
|
|
57
|
-
inline-size: 100%;
|
|
58
|
-
margin: 0;
|
|
59
|
-
padding-block: var(--helix-space-xs);
|
|
60
|
-
padding-inline: var(--helix-space-md);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
[part="search-field"]:focus-visible {
|
|
64
|
-
outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
|
|
65
|
-
outline-offset: calc(var(--helix-size-focus-offset) * -1);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
[part="header"] + [part="search-field"],
|
|
69
|
-
:is([part="header"], [part="search-field"]) ~ [part="frame"] [part="tree"] {
|
|
70
|
-
border-start-end-radius: var(--helix-radii-none);
|
|
71
|
-
border-start-start-radius: var(--helix-radii-none);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
:host([windowed]) [part="tree"] {
|
|
75
|
-
block-size: var(--object-inspector-block-size, 24em);
|
|
76
|
-
overflow-y: auto;
|
|
77
|
-
overscroll-behavior: contain;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
[part="tree"]:focus-visible {
|
|
81
|
-
outline: none;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
[part~="row"] {
|
|
85
|
-
cursor: default;
|
|
86
|
-
overflow: hidden;
|
|
87
|
-
padding-inline-end: var(--helix-space-2xl);
|
|
88
|
-
padding-inline-start: calc(
|
|
5
|
+
);border: var(--helix-border-thin) solid
|
|
6
|
+
var(--object-inspector-border-color, var(--helix-color-border));border-block-end: none;border-start-end-radius: var(--object-inspector-radius, var(--helix-radii-lg));border-start-start-radius: var(--object-inspector-radius, var(--helix-radii-lg));display: flex;padding-block: var(--helix-space-xs);padding-inline: var(--helix-space-md);}[part="label"] {color: var(--helix-color-foreground-muted);font-family: var(--helix-font-sans);font-size: var(--helix-text-xs);font-weight: var(--helix-weight-medium);}[part="frame"] {position: relative;}[part="tree"] {background-color: var(--object-inspector-background-color, var(--helix-color-background));border: var(--helix-border-thin) solid
|
|
7
|
+
var(--object-inspector-border-color, var(--helix-color-border));border-radius: var(--object-inspector-radius, var(--helix-radii-lg));font-family: var(--helix-font-mono);line-height: var(--helix-leading-normal);padding-block: var(--helix-space-xs);}[part="search-field"] {appearance: none;background-color: var(--object-inspector-background-color, var(--helix-color-background));border: var(--helix-border-thin) solid
|
|
8
|
+
var(--object-inspector-border-color, var(--helix-color-border));border-block-end: none;border-start-end-radius: var(--object-inspector-radius, var(--helix-radii-lg));border-start-start-radius: var(--object-inspector-radius, var(--helix-radii-lg));box-sizing: border-box;color: var(--helix-color-foreground);font-family: var(--helix-font-sans);font-size: var(--helix-text-sm);inline-size: 100%;margin: 0;padding-block: var(--helix-space-xs);padding-inline: var(--helix-space-md);}[part="search-field"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: calc(var(--helix-size-focus-offset) * -1);}[part="header"] + [part="search-field"],
|
|
9
|
+
:is([part="header"], [part="search-field"]) ~ [part="frame"] [part="tree"] {border-start-end-radius: var(--helix-radii-none);border-start-start-radius: var(--helix-radii-none);}:host([windowed]) [part="tree"] {block-size: var(--object-inspector-block-size, 24em);overflow-y: auto;overscroll-behavior: contain;}[part~="row"] {cursor: default;overflow: hidden;padding-inline-end: var(--helix-space-2xl);padding-inline-start: calc(
|
|
89
10
|
var(--object-inspector-level) *
|
|
90
11
|
var(--helix-space-lg) +
|
|
91
12
|
var(--helix-space-sm) +
|
|
92
13
|
1em +
|
|
93
14
|
var(--helix-space-2xs)
|
|
94
|
-
);
|
|
95
|
-
text-overflow: ellipsis;
|
|
96
|
-
white-space: nowrap;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
[part~="row"][aria-expanded] {
|
|
100
|
-
cursor: pointer;
|
|
101
|
-
padding-inline-start: calc(
|
|
15
|
+
);text-overflow: ellipsis;white-space: nowrap;}[part~="row"][aria-expanded] {cursor: pointer;padding-inline-start: calc(
|
|
102
16
|
var(--object-inspector-level) *
|
|
103
17
|
var(--helix-space-lg) +
|
|
104
18
|
var(--helix-space-sm)
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
[part="tree"]:focus [part~="row-active"] {
|
|
109
|
-
background-color: var(--helix-color-surface-sunken);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
[part="tree"]:focus-visible [part~="row-active"] {
|
|
113
|
-
outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
|
|
114
|
-
outline-offset: calc(var(--helix-size-focus-offset) * -1);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
[part~="row-match"] {
|
|
118
|
-
background-color: var(
|
|
19
|
+
);}[part="tree"]:focus-within [part~="row-active"] {background-color: var(--helix-color-surface-sunken);}[part~="row"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: calc(var(--helix-size-focus-offset) * -1);}[part~="row-match"] {background-color: var(
|
|
119
20
|
--object-inspector-match-background-color,
|
|
120
21
|
var(--helix-color-accent-subtle)
|
|
121
|
-
);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
[part="toggle"] {
|
|
125
|
-
block-size: 1em;
|
|
126
|
-
color: var(--helix-color-foreground-muted);
|
|
127
|
-
inline-size: 1em;
|
|
128
|
-
margin-inline-end: var(--helix-space-2xs);
|
|
129
|
-
vertical-align: -0.125em;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
[part="key"] {
|
|
133
|
-
color: var(--helix-color-syntax-name);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
[part~="row-match"] [part="key"] {
|
|
137
|
-
color: var(--helix-color-foreground);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
[part="string"] {
|
|
141
|
-
color: var(--helix-color-syntax-string);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
[part="number"] {
|
|
145
|
-
color: var(--helix-color-syntax-constant);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
[part="boolean"],
|
|
149
|
-
[part="null"] {
|
|
150
|
-
color: var(--helix-color-syntax-keyword);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
[part="summary"],
|
|
154
|
-
[part="count"] {
|
|
155
|
-
color: var(--helix-color-foreground-muted);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
[part="count"] {
|
|
159
|
-
font-family: var(--helix-font-sans);
|
|
160
|
-
font-size: var(--helix-text-xs);
|
|
161
|
-
margin-inline-start: var(--helix-space-xs);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
[part="copy"] {
|
|
165
|
-
inset-block-start: var(--helix-space-2xs);
|
|
166
|
-
inset-inline-end: var(--helix-space-2xs);
|
|
167
|
-
position: absolute;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
@media print {
|
|
171
|
-
[part="tree"] {
|
|
172
|
-
block-size: auto;
|
|
173
|
-
overflow: visible;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
[part="copy"] {
|
|
177
|
-
display: none;
|
|
178
|
-
}
|
|
179
|
-
}`);
|
|
22
|
+
);}[part="toggle"] {block-size: 1em;color: var(--helix-color-foreground-muted);inline-size: 1em;margin-inline-end: var(--helix-space-2xs);vertical-align: -0.125em;}[part="key"] {color: var(--helix-color-syntax-name);}[part~="row-match"] [part="key"] {color: var(--helix-color-foreground);}[part="string"] {color: var(--helix-color-syntax-string);}[part="number"] {color: var(--helix-color-syntax-constant);}[part="boolean"],
|
|
23
|
+
[part="null"] {color: var(--helix-color-syntax-keyword);}[part="summary"],
|
|
24
|
+
[part="count"] {color: var(--helix-color-foreground-muted);}[part="count"] {font-family: var(--helix-font-sans);font-size: var(--helix-text-xs);margin-inline-start: var(--helix-space-xs);}[part="copy"] {inset-block-start: var(--helix-space-2xs);inset-inline-end: var(--helix-space-2xs);position: absolute;}@media print {[part="tree"] {block-size: auto;overflow: visible;}[part="copy"] {display: none;}}`);
|
|
@@ -1,23 +1,2 @@
|
|
|
1
1
|
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
|
-
export const styles = createSheet(`:host {
|
|
3
|
-
display: block;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
:host(:not(:first-of-type)) {
|
|
7
|
-
margin-block-start: var(--helix-space-xs);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
:host([hidden]) {
|
|
11
|
-
display: none;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
[part="label"] {
|
|
15
|
-
color: var(--helix-color-foreground-subtle);
|
|
16
|
-
display: block;
|
|
17
|
-
font-family: var(--helix-font-sans);
|
|
18
|
-
font-size: var(--helix-text-xs);
|
|
19
|
-
font-weight: var(--helix-weight-medium);
|
|
20
|
-
padding-block: var(--helix-space-2xs);
|
|
21
|
-
|
|
22
|
-
padding-inline: var(--option-padding, var(--helix-space-xs));
|
|
23
|
-
}`);
|
|
2
|
+
export const styles = createSheet(`:host {display: block;}:host(:not(:first-of-type)) {margin-block-start: var(--helix-space-xs);}:host([hidden]) {display: none;}[part="label"] {color: var(--helix-color-foreground-subtle);display: block;font-family: var(--helix-font-sans);font-size: var(--helix-text-xs);font-weight: var(--helix-weight-medium);padding-block: var(--helix-space-2xs);padding-inline: var(--option-padding, var(--helix-space-xs));}`);
|
package/dist/option/index.d.ts
CHANGED
package/dist/option/index.js
CHANGED
|
@@ -1,91 +1,9 @@
|
|
|
1
1
|
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
|
-
export const styles = createSheet(`:host {
|
|
3
|
-
|
|
4
|
-
--_option-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M104 192a8 8 0 0 1-5.7-2.3l-56-56a8 8 0 0 1 11.4-11.4L104 172.7 210.3 66.3a8 8 0 0 1 11.4 11.4l-112 112A8 8 0 0 1 104 192Z'/%3E%3C/svg%3E");
|
|
5
|
-
display: block;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
:host([hidden]) {
|
|
9
|
-
display: none;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
[part~="item"] {
|
|
13
|
-
align-items: center;
|
|
14
|
-
|
|
15
|
-
border-radius: var(--option-radius, var(--helix-radii-sm));
|
|
16
|
-
color: var(--helix-color-foreground);
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
display: flex;
|
|
19
|
-
font-family: var(--helix-font-sans);
|
|
20
|
-
font-size: var(--helix-text-sm);
|
|
21
|
-
gap: var(--helix-space-xs);
|
|
22
|
-
|
|
23
|
-
min-block-size: var(--helix-size-control-tight);
|
|
24
|
-
box-sizing: border-box;
|
|
25
|
-
|
|
26
|
-
padding-block: var(--option-block-padding, var(--helix-space-2xs));
|
|
27
|
-
|
|
28
|
-
padding-inline: var(--option-padding, var(--helix-space-xs));
|
|
29
|
-
|
|
30
|
-
user-select: none;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
[part="text"] {
|
|
34
|
-
display: flex;
|
|
35
|
-
flex: 1 1 auto;
|
|
36
|
-
flex-direction: column;
|
|
37
|
-
min-inline-size: 0;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
[part="description"] {
|
|
41
|
-
color: var(--helix-color-foreground-muted);
|
|
42
|
-
font-size: var(--helix-text-xs);
|
|
43
|
-
line-height: var(--helix-leading-tight);
|
|
44
|
-
overflow: hidden;
|
|
45
|
-
text-overflow: ellipsis;
|
|
46
|
-
white-space: nowrap;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
[part="label"] {
|
|
50
|
-
min-inline-size: 0;
|
|
51
|
-
|
|
52
|
-
overflow: hidden;
|
|
53
|
-
text-overflow: ellipsis;
|
|
54
|
-
white-space: nowrap;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
:host(:state(selected)) [part~="item"]::after {
|
|
58
|
-
content: "";
|
|
59
|
-
background-color: currentColor;
|
|
60
|
-
block-size: var(--helix-size-icon-tight);
|
|
61
|
-
flex: 0 0 auto;
|
|
62
|
-
inline-size: var(--helix-size-icon-tight);
|
|
63
|
-
margin-inline-start: auto;
|
|
64
|
-
mask-image: var(--_option-check);
|
|
65
|
-
mask-position: center;
|
|
66
|
-
mask-repeat: no-repeat;
|
|
67
|
-
mask-size: contain;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
:host([data-active]) [part~="item"],
|
|
71
|
-
:host(:not([disabled])) [part~="item"]:hover {
|
|
72
|
-
|
|
73
|
-
background-color: var(
|
|
2
|
+
export const styles = createSheet(`:host {--_option-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M104 192a8 8 0 0 1-5.7-2.3l-56-56a8 8 0 0 1 11.4-11.4L104 172.7 210.3 66.3a8 8 0 0 1 11.4 11.4l-112 112A8 8 0 0 1 104 192Z'/%3E%3C/svg%3E");display: block;}:host([hidden]) {display: none;}[part~="item"] {align-items: center;border-radius: var(--option-radius, var(--helix-radii-sm));color: var(--helix-color-foreground);cursor: pointer;display: flex;font-family: var(--helix-font-sans);font-size: var(--helix-text-sm);gap: var(--helix-space-xs);min-block-size: var(--helix-size-control-tight);box-sizing: border-box;padding-block: var(--option-block-padding, var(--helix-space-2xs));padding-inline: var(--option-padding, var(--helix-space-xs));user-select: none;}[part="text"] {display: flex;flex: 1 1 auto;flex-direction: column;min-inline-size: 0;}[part="description"] {color: var(--helix-color-foreground-muted);font-size: var(--helix-text-xs);line-height: var(--helix-leading-tight);overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}[part="label"] {min-inline-size: 0;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}:host(:state(selected)) [part~="item"]::after {content: "";background-color: currentColor;block-size: var(--helix-size-icon-tight);flex: 0 0 auto;inline-size: var(--helix-size-icon-tight);margin-inline-start: auto;mask-image: var(--_option-check);mask-position: center;mask-repeat: no-repeat;mask-size: contain;}:host(:state(active)) [part~="item"],
|
|
3
|
+
:host(:not([disabled])) [part~="item"]:hover {background-color: var(
|
|
74
4
|
--option-active-color,
|
|
75
5
|
light-dark(
|
|
76
6
|
color-mix(in oklab, var(--helix-color-foreground) 8%, transparent),
|
|
77
7
|
color-mix(in oklab, var(--helix-color-foreground) 12%, transparent)
|
|
78
8
|
)
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
:host([disabled]) [part~="item"] {
|
|
83
|
-
cursor: default;
|
|
84
|
-
opacity: 0.5;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
@media print {
|
|
88
|
-
:host {
|
|
89
|
-
print-color-adjust: exact;
|
|
90
|
-
}
|
|
91
|
-
}`);
|
|
9
|
+
);}:host([disabled]) [part~="item"] {cursor: default;opacity: 0.5;}@media print {:host {print-color-adjust: exact;}}`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
|
+
export const styles = createSheet(`:host {border-block-start: var(--option-separator-thickness, var(--helix-border-thin)) solid
|
|
3
|
+
var(--option-separator-color, var(--helix-color-border));display: block;margin-block: var(--option-separator-space, var(--helix-space-2xs));}:host([hidden]) {display: none;}`);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { HelixHeadlessOptionSeparator } from '@fusion.dev/helix-headless/option';
|
|
2
|
+
import type { CSSResultGroup } from 'lit';
|
|
3
|
+
/**
|
|
4
|
+
* @summary A rule between options or groups inside a listbox.
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* A hairline across the panel in the list's border color, with a little air
|
|
8
|
+
* either side.
|
|
9
|
+
*
|
|
10
|
+
* @since 0.1.0
|
|
11
|
+
* @status stable
|
|
12
|
+
* @aliases Divider, ListBoxSeparator
|
|
13
|
+
* @documentation https://fusion.dev/helix/components/option
|
|
14
|
+
*
|
|
15
|
+
* @cssproperty --option-separator-color - The rule's color.
|
|
16
|
+
* @cssproperty --option-separator-space - The space above and below the rule.
|
|
17
|
+
* @cssproperty --option-separator-thickness - The rule's thickness.
|
|
18
|
+
*/
|
|
19
|
+
export declare class HelixOptionSeparator extends HelixHeadlessOptionSeparator {
|
|
20
|
+
static styles: CSSResultGroup;
|
|
21
|
+
}
|
|
22
|
+
declare global {
|
|
23
|
+
interface HTMLElementTagNameMap {
|
|
24
|
+
'helix-option-separator': HelixOptionSeparator;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
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 } from '@fusion.dev/helix-core';
|
|
8
|
+
import { HelixHeadlessOptionSeparator } from '@fusion.dev/helix-headless/option';
|
|
9
|
+
import { styles } from './option-separator.css.js';
|
|
10
|
+
let HelixOptionSeparator = class HelixOptionSeparator extends HelixHeadlessOptionSeparator {
|
|
11
|
+
static { this.styles = styles; }
|
|
12
|
+
};
|
|
13
|
+
HelixOptionSeparator = __decorate([
|
|
14
|
+
customElement('helix-option-separator')
|
|
15
|
+
], HelixOptionSeparator);
|
|
16
|
+
export { HelixOptionSeparator };
|
|
@@ -1,42 +1,2 @@
|
|
|
1
1
|
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
|
-
export const styles = createSheet(`:host {
|
|
3
|
-
|
|
4
|
-
--_orb-size: calc(var(--helix-size-loader-lg) * 1.5);
|
|
5
|
-
|
|
6
|
-
--_orb-color: var(--orb-color, currentColor);
|
|
7
|
-
--_orb-ground: var(--orb-ground, var(--helix-color-background));
|
|
8
|
-
|
|
9
|
-
block-size: var(--orb-size, var(--_orb-size));
|
|
10
|
-
|
|
11
|
-
display: inline-block;
|
|
12
|
-
flex-shrink: 0;
|
|
13
|
-
inline-size: var(--orb-size, var(--_orb-size));
|
|
14
|
-
vertical-align: middle;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
:host([size="sm"]) {
|
|
18
|
-
--_orb-size: var(--helix-size-loader-md);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
:host([size="lg"]) {
|
|
22
|
-
--_orb-size: calc(var(--helix-size-loader-lg) * 2);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
[part="canvas"] {
|
|
26
|
-
block-size: 100%;
|
|
27
|
-
|
|
28
|
-
color: var(--_orb-color);
|
|
29
|
-
display: block;
|
|
30
|
-
inline-size: 100%;
|
|
31
|
-
text-decoration-color: var(--_orb-ground);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
[part="canvas"][hidden] {
|
|
35
|
-
display: none;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
@media print {
|
|
39
|
-
:host {
|
|
40
|
-
display: none;
|
|
41
|
-
}
|
|
42
|
-
}`);
|
|
2
|
+
export const styles = createSheet(`:host {--_orb-size: calc(var(--helix-size-loader-lg) * 1.5);--_orb-color: var(--orb-color, currentColor);--_orb-ground: var(--orb-ground, var(--helix-color-background));block-size: var(--orb-size, var(--_orb-size));display: inline-block;flex-shrink: 0;inline-size: var(--orb-size, var(--_orb-size));vertical-align: middle;}:host([size="sm"]) {--_orb-size: var(--helix-size-loader-md);}:host([size="lg"]) {--_orb-size: calc(var(--helix-size-loader-lg) * 2);}[part="canvas"] {block-size: 100%;color: var(--_orb-color);display: block;inline-size: 100%;text-decoration-color: var(--_orb-ground);}[part="canvas"][hidden] {display: none;}@media print {:host {display: none;}}`);
|
|
@@ -31,7 +31,8 @@ import { type OrbState } from '../shapes.js';
|
|
|
31
31
|
* `prefers-reduced-motion`, it draws one still frame.
|
|
32
32
|
*
|
|
33
33
|
* The orb is styled only and has behavior, which the tier split does not
|
|
34
|
-
* otherwise allow. Its role, name and busy state follow `state`,
|
|
34
|
+
* otherwise allow. Its role, name and busy state follow `state`, unless
|
|
35
|
+
* `announce` makes it a status region, and the rest
|
|
35
36
|
* is drawing dots to a canvas, so there is no structure to restyle. For a
|
|
36
37
|
* drawing of your own, the headless `Loader` holds the same busy progress bar
|
|
37
38
|
* and its name.
|
|
@@ -47,7 +48,7 @@ import { type OrbState } from '../shapes.js';
|
|
|
47
48
|
* @documentation https://fusion.dev/helix/components/orb
|
|
48
49
|
*
|
|
49
50
|
* @csspart canvas - The canvas the dots are drawn on.
|
|
50
|
-
* @csspart live - The
|
|
51
|
+
* @csspart live - The word for the state, which the orb says as it changes when `announce` is set. Rendered only then, and clipped out of view.
|
|
51
52
|
*
|
|
52
53
|
* @cssproperty --orb-color - The color of the nearest dots. Defaults to `currentColor`.
|
|
53
54
|
* @cssproperty --orb-ground - The color the farthest dots fade toward. Defaults to the page's background.
|
|
@@ -64,8 +65,13 @@ import { type OrbState } from '../shapes.js';
|
|
|
64
65
|
export declare class HelixOrb extends HelixElement {
|
|
65
66
|
static styles: CSSResultGroup;
|
|
66
67
|
/**
|
|
67
|
-
* Says each new state
|
|
68
|
-
*
|
|
68
|
+
* Says each new state politely, such as "Working" and then "Done".
|
|
69
|
+
*
|
|
70
|
+
* **The orb becomes the live region**: its role is `status` rather than
|
|
71
|
+
* `progressbar` or `img`, and it holds the state's word. A region inside a
|
|
72
|
+
* progress bar or an image may never be heard, because assistive technology
|
|
73
|
+
* treats what those two hold as presentation. The name is still `label` or
|
|
74
|
+
* the state's word.
|
|
69
75
|
*
|
|
70
76
|
* Off by default, because the name and the busy state already change with
|
|
71
77
|
* the state, and an orb beside a stream of messages would otherwise talk
|
|
@@ -118,8 +124,6 @@ export declare class HelixOrb extends HelixElement {
|
|
|
118
124
|
* markup and plain HTML can carry the words too.
|
|
119
125
|
*/
|
|
120
126
|
stateLabels: Partial<Record<OrbState, string>>;
|
|
121
|
-
/** The region `announce` speaks in. */
|
|
122
|
-
private readonly status;
|
|
123
127
|
private canvas;
|
|
124
128
|
private context;
|
|
125
129
|
/**
|
|
@@ -161,6 +165,10 @@ export declare class HelixOrb extends HelixElement {
|
|
|
161
165
|
*/
|
|
162
166
|
private phase;
|
|
163
167
|
protected willUpdate(changed: PropertyValues): void;
|
|
168
|
+
/** The state drawn: `state`, or `thinking` for one it does not draw. */
|
|
169
|
+
private get shown();
|
|
170
|
+
/** The word for the state drawn, in the page's words where it gave them. */
|
|
171
|
+
private get word();
|
|
164
172
|
protected render(): TemplateResult;
|
|
165
173
|
protected firstUpdated(changed: PropertyValues): void;
|
|
166
174
|
connectedCallback(): void;
|
|
@@ -4,8 +4,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
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
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { customElement,
|
|
8
|
-
import { html } from 'lit';
|
|
7
|
+
import { customElement, HelixElement, hostAria, PaintGateController, readColor, wordsConverter, } from '@fusion.dev/helix-core';
|
|
8
|
+
import { html, nothing } from 'lit';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
10
|
import { styles as liveStyles } from '../../shared/live/live.css.js';
|
|
11
11
|
import { blendStaged, evenSphere, fibonacci, meshFor, ORB_STATES, orbPoint, paramsFor, project, smoother, stateDistance, TRAIL, } from '../shapes.js';
|
|
@@ -23,19 +23,6 @@ const LABELS = {
|
|
|
23
23
|
waiting: 'Waiting',
|
|
24
24
|
working: 'Working',
|
|
25
25
|
};
|
|
26
|
-
const labelsConverter = {
|
|
27
|
-
fromAttribute: (value) => {
|
|
28
|
-
try {
|
|
29
|
-
const parsed = JSON.parse(value ?? '');
|
|
30
|
-
return parsed && typeof parsed === 'object' && !Array.isArray(parsed)
|
|
31
|
-
? parsed
|
|
32
|
-
: {};
|
|
33
|
-
}
|
|
34
|
-
catch {
|
|
35
|
-
return {};
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
26
|
const GRAY = [128, 128, 128];
|
|
40
27
|
let HelixOrb = class HelixOrb extends HelixElement {
|
|
41
28
|
constructor() {
|
|
@@ -44,7 +31,6 @@ let HelixOrb = class HelixOrb extends HelixElement {
|
|
|
44
31
|
this.label = '';
|
|
45
32
|
this.state = 'thinking';
|
|
46
33
|
this.stateLabels = {};
|
|
47
|
-
this.status = new StatusController(this);
|
|
48
34
|
this.context = null;
|
|
49
35
|
this.gate = new PaintGateController(this, {
|
|
50
36
|
canRun: () => !!this.context && !this.lost,
|
|
@@ -86,14 +72,12 @@ let HelixOrb = class HelixOrb extends HelixElement {
|
|
|
86
72
|
static { this.styles = [liveStyles, styles]; }
|
|
87
73
|
willUpdate(changed) {
|
|
88
74
|
super.willUpdate(changed);
|
|
89
|
-
const state =
|
|
90
|
-
? this.state
|
|
91
|
-
: 'thinking';
|
|
75
|
+
const state = this.shown;
|
|
92
76
|
hostAria(this.internals, {
|
|
93
|
-
label: this.label || this.
|
|
94
|
-
role: state === 'done' ? 'img' : 'progressbar',
|
|
77
|
+
label: this.label || this.word,
|
|
78
|
+
role: this.announce ? 'status' : state === 'done' ? 'img' : 'progressbar',
|
|
95
79
|
});
|
|
96
|
-
this.internals.ariaBusy = state === 'done' ? 'false' : 'true';
|
|
80
|
+
this.internals.ariaBusy = this.announce ? null : state === 'done' ? 'false' : 'true';
|
|
97
81
|
this.toggleState('connecting', state === 'connecting');
|
|
98
82
|
this.toggleState('done', state === 'done');
|
|
99
83
|
this.toggleState('fetching', state === 'fetching');
|
|
@@ -103,13 +87,18 @@ let HelixOrb = class HelixOrb extends HelixElement {
|
|
|
103
87
|
this.toggleState('working', state === 'working');
|
|
104
88
|
if (changed.has('state') && changed.get('state') !== undefined) {
|
|
105
89
|
this.turn();
|
|
106
|
-
if (this.announce) {
|
|
107
|
-
this.status.say(this.label || this.stateLabels[state] || LABELS[state]);
|
|
108
|
-
}
|
|
109
90
|
}
|
|
110
91
|
}
|
|
92
|
+
get shown() {
|
|
93
|
+
return ORB_STATES.includes(this.state)
|
|
94
|
+
? this.state
|
|
95
|
+
: 'thinking';
|
|
96
|
+
}
|
|
97
|
+
get word() {
|
|
98
|
+
return this.stateLabels?.[this.shown] || LABELS[this.shown];
|
|
99
|
+
}
|
|
111
100
|
render() {
|
|
112
|
-
return html `<canvas part="canvas" aria-hidden="true"></canvas>${
|
|
101
|
+
return html `<canvas part="canvas" aria-hidden="true"></canvas>${this.announce ? html `<span part="live">${this.word}</span>` : nothing}`;
|
|
113
102
|
}
|
|
114
103
|
firstUpdated(changed) {
|
|
115
104
|
super.firstUpdated(changed);
|
|
@@ -275,7 +264,7 @@ __decorate([
|
|
|
275
264
|
property()
|
|
276
265
|
], HelixOrb.prototype, "state", void 0);
|
|
277
266
|
__decorate([
|
|
278
|
-
property({ attribute: 'state-labels', converter:
|
|
267
|
+
property({ attribute: 'state-labels', converter: wordsConverter })
|
|
279
268
|
], HelixOrb.prototype, "stateLabels", void 0);
|
|
280
269
|
HelixOrb = __decorate([
|
|
281
270
|
customElement('helix-orb')
|