@zeyos/zx 5.7.1 → 5.8.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/CHANGELOG.md +296 -0
- package/README.md +47 -9
- package/dist/types/components/activity-item/activity-item.d.ts +14 -3
- package/dist/types/components/agent-avatar/agent-avatar.d.ts +165 -0
- package/dist/types/components/agent-avatar/agent-face.d.ts +93 -0
- package/dist/types/components/agent-thread/ag-ui.d.ts +21 -9
- package/dist/types/components/agent-thread/agent-thread.d.ts +26 -0
- package/dist/types/components/agent-thread/ui-message-stream.d.ts +3 -1
- package/dist/types/components/approval-card/approval-card.d.ts +31 -2
- package/dist/types/components/aurora/aurora.d.ts +31 -5
- package/dist/types/components/calendar/calendar.d.ts +39 -26
- package/dist/types/components/chart/chart.d.ts +250 -20
- package/dist/types/components/chart/color.d.ts +66 -0
- package/dist/types/components/chart/svg-adapter.d.ts +103 -0
- package/dist/types/components/chart/svg-geometry.d.ts +203 -0
- package/dist/types/components/check-button/check-button.d.ts +1 -4
- package/dist/types/components/checklist/checklist.d.ts +19 -5
- package/dist/types/components/code-editor/code-editor.d.ts +55 -1
- package/dist/types/components/composer/composer.d.ts +41 -6
- package/dist/types/components/context-menu/context-menu.d.ts +36 -8
- package/dist/types/components/copy/copy-button.d.ts +6 -0
- package/dist/types/components/copy/copy-input.d.ts +1 -0
- package/dist/types/components/date-picker/date-picker.d.ts +14 -0
- package/dist/types/components/date-picker/time-picker.d.ts +26 -17
- package/dist/types/components/datebox/datebox.d.ts +8 -4
- package/dist/types/components/dialog/dialog.d.ts +13 -2
- package/dist/types/components/empty-state/empty-state.d.ts +10 -1
- package/dist/types/components/field/field.d.ts +4 -2
- package/dist/types/components/form/form.d.ts +2 -1
- package/dist/types/components/kanban-view/kanban-card.d.ts +7 -0
- package/dist/types/components/kanban-view/kanban-view.d.ts +15 -3
- package/dist/types/components/launcher/launcher.d.ts +26 -0
- package/dist/types/components/master-panel/master-panel.d.ts +9 -4
- package/dist/types/components/menu-button/menu-button.d.ts +29 -5
- package/dist/types/components/message/message.d.ts +308 -5
- package/dist/types/components/modal/modal.d.ts +11 -0
- package/dist/types/components/modal/native-dialog.d.ts +40 -0
- package/dist/types/components/module-bar/module-bar.d.ts +9 -2
- package/dist/types/components/multi-value-editor/multi-value-editor.d.ts +5 -4
- package/dist/types/components/number-field/number-field.d.ts +7 -0
- package/dist/types/components/pagination/pagination.d.ts +341 -19
- package/dist/types/components/run-status/run-status.d.ts +26 -0
- package/dist/types/components/run-trace/run-trace.d.ts +10 -6
- package/dist/types/components/search/search.d.ts +16 -4
- package/dist/types/components/select/select.d.ts +19 -1
- package/dist/types/components/sheet/sheet.d.ts +18 -4
- package/dist/types/components/slider/slider.d.ts +2 -1
- package/dist/types/components/stat-tile/stat-tile.d.ts +20 -3
- package/dist/types/components/stepper/stepper.d.ts +17 -4
- package/dist/types/components/surface/catalog.d.ts +61 -17
- package/dist/types/components/surface/surface.d.ts +6 -4
- package/dist/types/components/table/table.d.ts +207 -5
- package/dist/types/components/table/window.d.ts +25 -1
- package/dist/types/components/toggle/toggle.d.ts +38 -6
- package/dist/types/components/tooltip/tooltip.d.ts +5 -4
- package/dist/types/components/tree/tree.d.ts +43 -6
- package/dist/types/components/truncate/truncate.d.ts +4 -2
- package/dist/types/components/value-list/value-list.d.ts +9 -2
- package/dist/types/core/date.d.ts +2 -1
- package/dist/types/core/drag-axis.d.ts +10 -5
- package/dist/types/core/export.d.ts +2 -2
- package/dist/types/core/format.d.ts +3 -1
- package/dist/types/core/icons.d.ts +36 -3
- package/dist/types/core/keyboard.d.ts +7 -3
- package/dist/types/core/messages.d.ts +3 -0
- package/dist/types/core/storage.d.ts +4 -3
- package/dist/types/core/util.d.ts +3 -1
- package/dist/types/elements/define.d.ts +5 -2
- package/dist/types/index.d.ts +6 -4
- package/dist/types/internal/agent-model.d.ts +99 -0
- package/dist/types/internal/app-rail.d.ts +37 -2
- package/dist/types/internal/collections.d.ts +18 -0
- package/dist/types/internal/menu-items.d.ts +27 -0
- package/dist/types/internal/overlay-content.d.ts +23 -0
- package/dist/types/internal/presence-loop.d.ts +5 -2
- package/dist/types/locales/index.d.ts +3 -0
- package/dist/types/zeyos/calendar.d.ts +43 -7
- package/dist/types/zeyos/connect.d.ts +4 -0
- package/dist/types/zeyos/form.d.ts +13 -5
- package/dist/types/zeyos/select.d.ts +5 -2
- package/dist/types/zeyos/table.d.ts +16 -8
- package/dist/types/zeyos/view.d.ts +2 -1
- package/dist/zx-zeyos.esm.js +2998 -451
- package/dist/zx-zeyos.esm.min.js +4 -4
- package/dist/zx.core.css +4 -0
- package/dist/zx.core.min.css +1 -1
- package/dist/zx.css +948 -48
- package/dist/zx.esm.js +7432 -3408
- package/dist/zx.esm.min.js +26 -26
- package/dist/zx.global.js +7432 -3408
- package/dist/zx.global.min.js +26 -26
- package/dist/zx.layered.css +950 -48
- package/dist/zx.layered.min.css +1 -1
- package/dist/zx.min.css +1 -1
- package/docs/agent-catalog.json +159 -1
- package/docs/agent-surfaces.md +21 -21
- package/docs/api.json +3122 -528
- package/docs/components/account-menu.md +24 -0
- package/docs/components/activity-item.md +23 -0
- package/docs/components/activity-list.md +28 -0
- package/docs/components/agent-avatar.md +59 -0
- package/docs/components/agent-thread.md +275 -0
- package/docs/components/app-icon.md +36 -0
- package/docs/components/app-sidebar.md +92 -0
- package/docs/components/approval-card.md +71 -0
- package/docs/components/aurora.md +34 -0
- package/docs/components/avatar.md +37 -0
- package/docs/components/badge.md +36 -0
- package/docs/components/block-view.md +34 -0
- package/docs/components/breadcrumb.md +20 -0
- package/docs/components/button.md +23 -0
- package/docs/components/calendar.md +68 -0
- package/docs/components/card-view.md +73 -0
- package/docs/components/card.md +25 -0
- package/docs/components/chart.md +109 -0
- package/docs/components/check-button.md +16 -0
- package/docs/components/checklist.md +19 -0
- package/docs/components/code-editor.md +38 -0
- package/docs/components/composer.md +107 -0
- package/docs/components/context-menu.md +32 -0
- package/docs/components/copy.md +37 -0
- package/docs/components/data-filter.md +16 -0
- package/docs/components/date-picker.md +31 -0
- package/docs/components/date-range.md +21 -0
- package/docs/components/datebox.md +31 -0
- package/docs/components/dialog.md +25 -0
- package/docs/components/dock.md +57 -0
- package/docs/components/dropdown.md +39 -0
- package/docs/components/elements.md +63 -0
- package/docs/components/empty-state.md +17 -0
- package/docs/components/entity-ref.md +26 -0
- package/docs/components/field-upload.md +18 -0
- package/docs/components/file-item.md +27 -0
- package/docs/components/file-list.md +23 -0
- package/docs/components/filter-panel.md +45 -0
- package/docs/components/filter.md +47 -0
- package/docs/components/finder.md +25 -0
- package/docs/components/form-widgets.md +42 -0
- package/docs/components/form.md +80 -0
- package/docs/components/grid.md +26 -0
- package/docs/components/groupbox.md +11 -0
- package/docs/components/helpers.md +359 -0
- package/docs/components/icons.md +87 -0
- package/docs/components/index.md +99 -0
- package/docs/components/kanban-view.md +42 -0
- package/docs/components/kbd.md +23 -0
- package/docs/components/kernel.md +41 -0
- package/docs/components/launcher.md +66 -0
- package/docs/components/layout.md +33 -0
- package/docs/components/list-toolbar.md +38 -0
- package/docs/components/loading.md +48 -0
- package/docs/components/menu-button.md +47 -0
- package/docs/components/message.md +76 -0
- package/docs/components/modal.md +27 -0
- package/docs/components/module-bar.md +71 -0
- package/docs/components/multi-value-editor.md +16 -0
- package/docs/components/navigation-bar.md +22 -0
- package/docs/components/number-field.md +34 -0
- package/docs/components/pagination.md +73 -0
- package/docs/components/panel.md +28 -0
- package/docs/components/prompt-starters.md +40 -0
- package/docs/components/prose.md +38 -0
- package/docs/components/questionnaire.md +115 -0
- package/docs/components/rating.md +19 -0
- package/docs/components/run-status.md +50 -0
- package/docs/components/run-trace.md +72 -0
- package/docs/components/search.md +11 -0
- package/docs/components/select.md +129 -0
- package/docs/components/sheet-stack.md +39 -0
- package/docs/components/sheet.md +77 -0
- package/docs/components/skeleton.md +27 -0
- package/docs/components/slider.md +29 -0
- package/docs/components/sort-control.md +21 -0
- package/docs/components/source-list.md +30 -0
- package/docs/components/split-view.md +12 -0
- package/docs/components/stat-tile.md +49 -0
- package/docs/components/stepper.md +27 -0
- package/docs/components/surface.md +152 -0
- package/docs/components/tabbox.md +33 -0
- package/docs/components/table-view.md +43 -0
- package/docs/components/table.md +232 -0
- package/docs/components/tag-picker.md +39 -0
- package/docs/components/timebox.md +16 -0
- package/docs/components/toggle.md +21 -0
- package/docs/components/tokens.md +82 -0
- package/docs/components/toolbar.md +26 -0
- package/docs/components/tooltip.md +16 -0
- package/docs/components/tree.md +48 -0
- package/docs/components/truncate.md +21 -0
- package/docs/components/value-list.md +14 -0
- package/docs/components/view-settings.md +56 -0
- package/docs/components/workspace-switcher.md +42 -0
- package/docs/components/zeyos.md +196 -0
- package/docs/llms-small.txt +299 -0
- package/docs/llms.md +697 -100
- package/docs/llms.txt +46 -19
- package/package.json +9 -4
- package/src/components/activity-item/activity-item.js +21 -2
- package/src/components/agent-avatar/agent-avatar.css +195 -0
- package/src/components/agent-avatar/agent-avatar.js +333 -0
- package/src/components/agent-avatar/agent-face.js +292 -0
- package/src/components/agent-thread/ag-ui.js +44 -11
- package/src/components/agent-thread/agent-thread.js +103 -11
- package/src/components/agent-thread/ui-message-stream.js +3 -1
- package/src/components/app-rail/app-rail.css +5 -0
- package/src/components/app-sidebar/app-sidebar.css +3 -0
- package/src/components/app-sidebar/app-sidebar.js +4 -3
- package/src/components/approval-card/approval-card.css +6 -0
- package/src/components/approval-card/approval-card.js +55 -7
- package/src/components/aurora/aurora.css +149 -14
- package/src/components/aurora/aurora.js +49 -6
- package/src/components/calendar/calendar.css +6 -2
- package/src/components/calendar/calendar.js +127 -47
- package/src/components/card-view/card-view.js +5 -6
- package/src/components/chart/chart.css +159 -1
- package/src/components/chart/chart.js +450 -62
- package/src/components/chart/color.js +297 -0
- package/src/components/chart/svg-adapter.js +576 -0
- package/src/components/chart/svg-geometry.js +323 -0
- package/src/components/check-button/check-button.js +3 -18
- package/src/components/checklist/checklist.js +46 -17
- package/src/components/checklist/field-adapter.js +4 -1
- package/src/components/code-editor/code-editor.css +33 -0
- package/src/components/code-editor/code-editor.js +97 -8
- package/src/components/code-editor/field-adapter.js +3 -0
- package/src/components/composer/composer.css +3 -0
- package/src/components/composer/composer.js +100 -22
- package/src/components/context-menu/context-menu.js +41 -5
- package/src/components/copy/copy-button.js +9 -1
- package/src/components/copy/copy-input.js +5 -0
- package/src/components/data-filter/filter-core.js +0 -1
- package/src/components/date-picker/date-picker.css +8 -0
- package/src/components/date-picker/date-picker.js +47 -8
- package/src/components/date-picker/date-range-picker.js +1 -1
- package/src/components/date-picker/month-picker.js +19 -3
- package/src/components/date-picker/time-picker.js +54 -19
- package/src/components/datebox/date-range-box.js +7 -3
- package/src/components/datebox/datebox.js +32 -6
- package/src/components/dialog/dialog.css +6 -0
- package/src/components/dialog/dialog.js +22 -30
- package/src/components/dropdown/dropdown.js +1 -18
- package/src/components/empty-state/empty-state.js +21 -2
- package/src/components/field/field.js +19 -3
- package/src/components/fieldset/fieldset.js +3 -1
- package/src/components/filter/filter.js +9 -0
- package/src/components/form/form.js +19 -2
- package/src/components/kanban-view/kanban-card.js +15 -2
- package/src/components/kanban-view/kanban-view.css +21 -0
- package/src/components/kanban-view/kanban-view.js +29 -16
- package/src/components/launcher/launcher.css +14 -0
- package/src/components/launcher/launcher.js +54 -9
- package/src/components/master-panel/master-panel.js +24 -22
- package/src/components/menu-button/menu-button.js +26 -4
- package/src/components/message/message.css +228 -29
- package/src/components/message/message.js +664 -30
- package/src/components/modal/modal.js +70 -25
- package/src/components/modal/native-dialog.js +91 -0
- package/src/components/module-bar/module-bar.css +3 -0
- package/src/components/module-bar/module-bar.js +17 -4
- package/src/components/multi-value-editor/multi-value-editor.css +7 -2
- package/src/components/multi-value-editor/multi-value-editor.js +3 -2
- package/src/components/navigation-bar/navigation-bar.js +13 -1
- package/src/components/number-field/field-adapter.js +3 -0
- package/src/components/number-field/number-field.js +2 -1
- package/src/components/pagination/pagination.css +26 -2
- package/src/components/pagination/pagination.js +551 -65
- package/src/components/prose/prose.js +7 -1
- package/src/components/rating/field-adapter.js +3 -0
- package/src/components/run-status/run-status.js +43 -3
- package/src/components/run-trace/run-trace.js +15 -7
- package/src/components/search/search.js +3 -18
- package/src/components/select/field-adapter.js +8 -1
- package/src/components/select/select.js +68 -13
- package/src/components/sheet/sheet.js +27 -8
- package/src/components/slider/field-adapter.js +3 -0
- package/src/components/slider/slider.js +4 -6
- package/src/components/stat-tile/stat-tile.js +24 -9
- package/src/components/stepper/stepper.css +15 -0
- package/src/components/stepper/stepper.js +34 -2
- package/src/components/surface/catalog.js +185 -28
- package/src/components/surface/surface.js +10 -5
- package/src/components/tabbox/tabbox.js +13 -1
- package/src/components/table/table.css +160 -2
- package/src/components/table/table.js +479 -52
- package/src/components/table/window.js +46 -4
- package/src/components/table-view/table-view.js +1 -10
- package/src/components/tag-picker/field-adapter.js +3 -0
- package/src/components/tag-picker/tag-picker.js +2 -0
- package/src/components/timebox/field-adapter.js +3 -0
- package/src/components/toggle/toggle.js +51 -27
- package/src/components/tooltip/tooltip.js +21 -14
- package/src/components/tree/tree.js +87 -14
- package/src/components/truncate/truncate.js +21 -5
- package/src/components/value-list/value-list.js +37 -9
- package/src/components/view-settings/view-settings.js +1 -5
- package/src/core/component.js +34 -2
- package/src/core/date.js +5 -4
- package/src/core/drag-axis.js +24 -7
- package/src/core/export.js +4 -4
- package/src/core/fontawesome.js +34 -3
- package/src/core/format.js +3 -1
- package/src/core/http.js +23 -11
- package/src/core/icons.js +51 -10
- package/src/core/keyboard.js +83 -9
- package/src/core/messages.js +3 -0
- package/src/core/position.js +2 -2
- package/src/core/storage.js +80 -31
- package/src/core/util.js +16 -5
- package/src/elements/define.js +82 -47
- package/src/elements/kit.js +46 -35
- package/src/index.js +8 -4
- package/src/internal/agent-model.js +152 -0
- package/src/internal/app-rail.js +53 -2
- package/src/internal/collections.js +25 -0
- package/src/internal/menu-items.js +59 -0
- package/src/internal/overlay-content.js +35 -0
- package/src/internal/presence-loop.js +61 -14
- package/src/locales/de.js +3 -0
- package/src/zeyos/calendar.js +81 -19
- package/src/zeyos/connect.js +5 -1
- package/src/zeyos/form.js +29 -10
- package/src/zeyos/select.js +36 -12
- package/src/zeyos/table.js +43 -11
- package/src/zeyos/view.js +2 -1
- package/styles/tokens/semantic.css +7 -1
- package/styles/zx.css +1 -0
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
--zx-aurora-faint-2: color-mix(in srgb, var(--zx-aurora-color-2) var(--zx-aurora-faint), transparent);
|
|
21
21
|
--zx-aurora-faint-3: color-mix(in srgb, var(--zx-aurora-color-3) var(--zx-aurora-faint), transparent);
|
|
22
22
|
--zx-aurora-faint-4: color-mix(in srgb, var(--zx-aurora-color-4) var(--zx-aurora-faint), transparent);
|
|
23
|
+
--zx-aurora-image: none;
|
|
24
|
+
/* One cycle of the slowest drift; `flow` turns once in three. Long enough to be felt, not watched. */
|
|
25
|
+
--zx-aurora-duration: 18s;
|
|
23
26
|
position: relative;
|
|
24
27
|
isolation: isolate;
|
|
25
28
|
}
|
|
@@ -54,64 +57,194 @@
|
|
|
54
57
|
--zx-aurora-faint: 7%;
|
|
55
58
|
}
|
|
56
59
|
|
|
60
|
+
/* The static field. Every preset writes its gradients into `--zx-aurora-image`, so the motion
|
|
61
|
+
layer below can paint the same field and move it. */
|
|
57
62
|
.zx-aurora::before {
|
|
58
63
|
content: "";
|
|
59
64
|
position: absolute;
|
|
60
65
|
z-index: -1;
|
|
61
66
|
inset: 0;
|
|
62
67
|
border-radius: inherit;
|
|
68
|
+
background-image: var(--zx-aurora-image);
|
|
63
69
|
background-repeat: no-repeat;
|
|
64
70
|
pointer-events: none;
|
|
65
71
|
}
|
|
66
72
|
|
|
67
|
-
.zx-aurora[data-preset="source"]
|
|
68
|
-
|
|
73
|
+
.zx-aurora[data-preset="source"] {
|
|
74
|
+
--zx-aurora-image:
|
|
69
75
|
radial-gradient(94% 78% at 0% 0%, var(--zx-aurora-core-1) 0%, var(--zx-aurora-wash-1) 34%, transparent 72%),
|
|
70
76
|
radial-gradient(68% 54% at 72% 0%, var(--zx-aurora-wash-2) 0%, var(--zx-aurora-faint-2) 42%, transparent 74%),
|
|
71
77
|
radial-gradient(62% 74% at 100% 82%, var(--zx-aurora-wash-3) 0%, transparent 68%),
|
|
72
78
|
radial-gradient(58% 42% at 38% 100%, var(--zx-aurora-faint-4) 0%, transparent 72%);
|
|
73
79
|
}
|
|
74
80
|
|
|
75
|
-
.zx-aurora[data-preset="confluence"]
|
|
76
|
-
|
|
81
|
+
.zx-aurora[data-preset="confluence"] {
|
|
82
|
+
--zx-aurora-image:
|
|
77
83
|
radial-gradient(108% 84% at 0% 0%, var(--zx-aurora-core-1) 0%, var(--zx-aurora-wash-1) 34%, transparent 70%),
|
|
78
84
|
radial-gradient(92% 72% at 100% 0%, var(--zx-aurora-core-2) 0%, var(--zx-aurora-wash-2) 36%, transparent 72%),
|
|
79
85
|
radial-gradient(78% 62% at 0% 100%, var(--zx-aurora-wash-3) 0%, transparent 70%),
|
|
80
86
|
radial-gradient(72% 64% at 100% 100%, var(--zx-aurora-wash-4) 0%, transparent 72%);
|
|
81
87
|
}
|
|
82
88
|
|
|
83
|
-
.zx-aurora[data-preset="horizon"]
|
|
84
|
-
|
|
89
|
+
.zx-aurora[data-preset="horizon"] {
|
|
90
|
+
--zx-aurora-image:
|
|
85
91
|
radial-gradient(72% 28% at 8% 19%, var(--zx-aurora-core-1) 0%, var(--zx-aurora-wash-1) 48%, transparent 78%),
|
|
86
92
|
radial-gradient(68% 24% at 42% 23%, var(--zx-aurora-core-2) 0%, var(--zx-aurora-wash-2) 44%, transparent 78%),
|
|
87
93
|
radial-gradient(72% 26% at 76% 18%, var(--zx-aurora-core-3) 0%, var(--zx-aurora-wash-3) 46%, transparent 80%),
|
|
88
94
|
radial-gradient(54% 22% at 100% 26%, var(--zx-aurora-wash-4) 0%, transparent 78%);
|
|
89
95
|
}
|
|
90
96
|
|
|
91
|
-
.zx-aurora[data-preset="diagonal"]
|
|
92
|
-
|
|
97
|
+
.zx-aurora[data-preset="diagonal"] {
|
|
98
|
+
--zx-aurora-image:
|
|
93
99
|
linear-gradient(126deg, var(--zx-aurora-core-1) 0%, var(--zx-aurora-wash-1) 18%, transparent 44%),
|
|
94
100
|
linear-gradient(126deg, transparent 18%, var(--zx-aurora-wash-2) 42%, transparent 63%),
|
|
95
101
|
linear-gradient(126deg, transparent 44%, var(--zx-aurora-wash-3) 67%, transparent 84%),
|
|
96
102
|
linear-gradient(126deg, transparent 68%, var(--zx-aurora-wash-4) 90%, transparent 100%);
|
|
97
103
|
}
|
|
98
104
|
|
|
99
|
-
.zx-aurora[data-preset="edge"]
|
|
100
|
-
|
|
105
|
+
.zx-aurora[data-preset="edge"] {
|
|
106
|
+
--zx-aurora-image:
|
|
101
107
|
radial-gradient(38% 108% at 0% 18%, var(--zx-aurora-core-1) 0%, var(--zx-aurora-faint-1) 52%, transparent 78%),
|
|
102
108
|
radial-gradient(72% 34% at 72% 0%, var(--zx-aurora-wash-2) 0%, transparent 74%),
|
|
103
109
|
radial-gradient(38% 106% at 100% 84%, var(--zx-aurora-wash-3) 0%, transparent 74%),
|
|
104
110
|
radial-gradient(76% 32% at 32% 100%, var(--zx-aurora-wash-4) 0%, transparent 76%);
|
|
105
111
|
}
|
|
106
112
|
|
|
107
|
-
.zx-aurora[data-preset="curtain"]
|
|
108
|
-
|
|
113
|
+
.zx-aurora[data-preset="curtain"] {
|
|
114
|
+
--zx-aurora-image:
|
|
109
115
|
radial-gradient(28% 112% at 10% 0%, var(--zx-aurora-core-1) 0%, var(--zx-aurora-faint-1) 52%, transparent 78%),
|
|
110
116
|
radial-gradient(26% 104% at 38% 0%, var(--zx-aurora-core-2) 0%, var(--zx-aurora-faint-2) 48%, transparent 76%),
|
|
111
117
|
radial-gradient(28% 110% at 67% 0%, var(--zx-aurora-core-3) 0%, var(--zx-aurora-faint-3) 50%, transparent 78%),
|
|
112
118
|
radial-gradient(26% 106% at 92% 0%, var(--zx-aurora-core-4) 0%, var(--zx-aurora-faint-4) 48%, transparent 76%);
|
|
113
119
|
}
|
|
114
120
|
|
|
121
|
+
/* A soft mesh: four fields meeting off-centre, with a fifth wash binding them in the middle. */
|
|
122
|
+
.zx-aurora[data-preset="mesh"] {
|
|
123
|
+
--zx-aurora-image:
|
|
124
|
+
radial-gradient(58% 66% at 14% 20%, var(--zx-aurora-core-1) 0%, var(--zx-aurora-wash-1) 38%, transparent 72%),
|
|
125
|
+
radial-gradient(54% 62% at 86% 14%, var(--zx-aurora-core-2) 0%, var(--zx-aurora-wash-2) 36%, transparent 70%),
|
|
126
|
+
radial-gradient(60% 68% at 80% 90%, var(--zx-aurora-core-3) 0%, var(--zx-aurora-wash-3) 38%, transparent 72%),
|
|
127
|
+
radial-gradient(52% 58% at 16% 92%, var(--zx-aurora-wash-4) 0%, var(--zx-aurora-faint-4) 44%, transparent 72%),
|
|
128
|
+
radial-gradient(42% 46% at 52% 52%, var(--zx-aurora-wash-2) 0%, transparent 76%);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* Ribbons: two arcs of light hanging from above the top edge, crossing as they fall. */
|
|
132
|
+
.zx-aurora[data-preset="ribbon"] {
|
|
133
|
+
--zx-aurora-image:
|
|
134
|
+
radial-gradient(140% 100% at 22% -42%, transparent 56%, var(--zx-aurora-faint-1) 61%, var(--zx-aurora-core-1) 66%,
|
|
135
|
+
var(--zx-aurora-wash-2) 70%, var(--zx-aurora-faint-2) 75%, transparent 82%),
|
|
136
|
+
radial-gradient(130% 110% at 84% -56%, transparent 58%, var(--zx-aurora-faint-3) 64%, var(--zx-aurora-wash-3) 68%,
|
|
137
|
+
var(--zx-aurora-core-4) 72%, var(--zx-aurora-faint-4) 77%, transparent 84%),
|
|
138
|
+
radial-gradient(80% 46% at 50% 0%, var(--zx-aurora-faint-1) 0%, transparent 78%);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* Bloom: a sunrise from below the bottom edge, its colours fanning out to the sides. */
|
|
142
|
+
.zx-aurora[data-preset="bloom"] {
|
|
143
|
+
--zx-aurora-image:
|
|
144
|
+
radial-gradient(62% 58% at 50% 112%, var(--zx-aurora-core-1) 0%, var(--zx-aurora-wash-1) 42%, transparent 74%),
|
|
145
|
+
radial-gradient(48% 52% at 14% 100%, var(--zx-aurora-core-2) 0%, var(--zx-aurora-faint-2) 50%, transparent 76%),
|
|
146
|
+
radial-gradient(48% 52% at 86% 100%, var(--zx-aurora-core-3) 0%, var(--zx-aurora-faint-3) 50%, transparent 76%),
|
|
147
|
+
radial-gradient(96% 40% at 50% 0%, var(--zx-aurora-faint-4) 0%, transparent 80%);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* ----------------------------------------------------------------- motion -- */
|
|
151
|
+
|
|
152
|
+
/*
|
|
153
|
+
* Motion lives in one decorative element Aurora adds for `motion: 'drift'|'flow'`. It clips its two
|
|
154
|
+
* layers to the surface and moves them by transform alone, so the compositor animates them and
|
|
155
|
+
* nothing repaints. Without the element, or for a reader who asked for less motion, the static
|
|
156
|
+
* field above stays.
|
|
157
|
+
*/
|
|
158
|
+
.zx-aurora__motion {
|
|
159
|
+
display: none;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
163
|
+
.zx-aurora > .zx-aurora__motion {
|
|
164
|
+
display: block;
|
|
165
|
+
position: absolute;
|
|
166
|
+
z-index: -1;
|
|
167
|
+
inset: 0;
|
|
168
|
+
overflow: hidden;
|
|
169
|
+
border-radius: inherit;
|
|
170
|
+
pointer-events: none;
|
|
171
|
+
contain: strict;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/* The moving copy replaces the static field rather than doubling it. */
|
|
175
|
+
.zx-aurora:has(> .zx-aurora__motion)::before {
|
|
176
|
+
visibility: hidden;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.zx-aurora__motion::before,
|
|
180
|
+
.zx-aurora__motion::after {
|
|
181
|
+
content: "";
|
|
182
|
+
position: absolute;
|
|
183
|
+
background-repeat: no-repeat;
|
|
184
|
+
will-change: transform;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* The field breathes: it swells and leans a little, never far enough to bare an edge. */
|
|
188
|
+
.zx-aurora__motion::before {
|
|
189
|
+
inset: 0;
|
|
190
|
+
background-image: var(--zx-aurora-image);
|
|
191
|
+
animation: zx-aurora-breathe var(--zx-aurora-duration) ease-in-out infinite alternate;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/* Drift: two lights wander slowly across the field. */
|
|
195
|
+
.zx-aurora[data-motion="drift"] > .zx-aurora__motion::after {
|
|
196
|
+
inset: -30%;
|
|
197
|
+
background-image:
|
|
198
|
+
radial-gradient(22% 26% at 34% 40%, var(--zx-aurora-wash-2) 0%, transparent 72%),
|
|
199
|
+
radial-gradient(20% 24% at 66% 62%, var(--zx-aurora-wash-3) 0%, transparent 72%);
|
|
200
|
+
animation: zx-aurora-wander calc(var(--zx-aurora-duration) * 1.6) ease-in-out infinite alternate;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* Flow: a disc of colour turns slowly behind the field, sweeping each hue across the surface.
|
|
204
|
+
Its centre and rim fade out, so neither the turning point nor an edge ever shows. */
|
|
205
|
+
.zx-aurora[data-motion="flow"] > .zx-aurora__motion::after {
|
|
206
|
+
inset-block-start: 50%;
|
|
207
|
+
inset-inline-start: 50%;
|
|
208
|
+
inline-size: 200%;
|
|
209
|
+
aspect-ratio: 1;
|
|
210
|
+
translate: -50% -50%;
|
|
211
|
+
background-image: conic-gradient(from 0deg, var(--zx-aurora-wash-1), var(--zx-aurora-faint-2) 25%,
|
|
212
|
+
var(--zx-aurora-wash-3) 50%, var(--zx-aurora-faint-4) 75%, var(--zx-aurora-wash-1));
|
|
213
|
+
mask-image: radial-gradient(closest-side, transparent 6%, currentColor 34%, currentColor 58%, transparent 100%);
|
|
214
|
+
animation: zx-aurora-turn calc(var(--zx-aurora-duration) * 3) linear infinite;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
@keyframes zx-aurora-breathe {
|
|
219
|
+
from {
|
|
220
|
+
transform: scale(1);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
to {
|
|
224
|
+
transform: scale(1.08) translate(-1.8%, 1.4%);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
@keyframes zx-aurora-wander {
|
|
229
|
+
0% {
|
|
230
|
+
transform: translate(-6%, 4%);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
50% {
|
|
234
|
+
transform: translate(5%, -3%);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
100% {
|
|
238
|
+
transform: translate(-2%, -6%);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
@keyframes zx-aurora-turn {
|
|
243
|
+
to {
|
|
244
|
+
rotate: 1turn;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
115
248
|
@media (prefers-color-scheme: dark) {
|
|
116
249
|
:is([data-zx-theme="auto"] .zx-aurora, .zx-aurora[data-zx-theme="auto"]) {
|
|
117
250
|
--zx-aurora-core: 12%;
|
|
@@ -133,13 +266,15 @@
|
|
|
133
266
|
}
|
|
134
267
|
|
|
135
268
|
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
|
|
136
|
-
.zx-aurora::before
|
|
269
|
+
.zx-aurora::before,
|
|
270
|
+
.zx-aurora > .zx-aurora__motion {
|
|
137
271
|
display: none;
|
|
138
272
|
}
|
|
139
273
|
}
|
|
140
274
|
|
|
141
275
|
@media (prefers-contrast: more) {
|
|
142
|
-
.zx-aurora::before
|
|
276
|
+
.zx-aurora::before,
|
|
277
|
+
.zx-aurora > .zx-aurora__motion {
|
|
143
278
|
opacity: .35;
|
|
144
279
|
}
|
|
145
280
|
}
|
|
@@ -2,26 +2,38 @@ import { Component } from '../../core/component.js';
|
|
|
2
2
|
import { h, restoreTarget, snapshotTarget } from '../../core/dom.js';
|
|
3
3
|
import { isCssColor } from '../../core/util.js';
|
|
4
4
|
|
|
5
|
-
const PRESETS = Object.freeze([
|
|
5
|
+
const PRESETS = Object.freeze([
|
|
6
|
+
'source', 'confluence', 'horizon', 'diagonal', 'edge', 'curtain', 'mesh', 'ribbon', 'bloom'
|
|
7
|
+
]);
|
|
6
8
|
const INTENSITIES = Object.freeze(['subtle', 'balanced', 'vivid']);
|
|
9
|
+
const MOTIONS = Object.freeze(['none', 'drift', 'flow']);
|
|
7
10
|
const COLOR_PROPERTIES = Object.freeze([
|
|
8
11
|
'--zx-aurora-color-1', '--zx-aurora-color-2',
|
|
9
12
|
'--zx-aurora-color-3', '--zx-aurora-color-4'
|
|
10
13
|
]);
|
|
11
14
|
|
|
15
|
+
/** @typedef {'source'|'confluence'|'horizon'|'diagonal'|'edge'|'curtain'|'mesh'|'ribbon'|'bloom'} AuroraPreset */
|
|
16
|
+
/** @typedef {'none'|'drift'|'flow'} AuroraMotion */
|
|
17
|
+
|
|
12
18
|
/**
|
|
13
19
|
* @typedef {Object} AuroraOptions
|
|
14
|
-
* @property {
|
|
15
|
-
* Geometry of the ambient light field.
|
|
20
|
+
* @property {AuroraPreset} [preset='source'] Geometry of the ambient light field.
|
|
16
21
|
* @property {string[]} [colors=[]] Zero to four concrete CSS colours. An empty list uses semantic
|
|
17
22
|
* Zx colours; shorter palettes repeat across the four gradient fields.
|
|
18
23
|
* @property {'subtle'|'balanced'|'vivid'} [intensity='subtle'] Strength of the light field.
|
|
24
|
+
* @property {AuroraMotion} [motion='none'] Slow ambient movement: `drift` lets the field breathe
|
|
25
|
+
* while two lights wander across it, `flow` turns a disc of colour behind it. Shown only to readers
|
|
26
|
+
* who have not asked for reduced motion; `--zx-aurora-duration` (18s) sets the pace.
|
|
19
27
|
*/
|
|
20
28
|
|
|
21
29
|
/**
|
|
22
30
|
* Decorative multicolour ambient light for an existing application surface.
|
|
23
31
|
* Aurora owns no application content or interaction: it enhances the target in place and renders
|
|
24
32
|
* its pointer-transparent light field behind the target's existing children.
|
|
33
|
+
*
|
|
34
|
+
* With `motion`, Aurora adds one decorative element as the target's first child —
|
|
35
|
+
* `<span class="zx-aurora__motion" aria-hidden="true">`, absolutely positioned and clipped to the
|
|
36
|
+
* surface — whose layers move by transform alone. `setMotion('none')` and `destroy()` remove it.
|
|
25
37
|
* @extends {Component<AuroraOptions>}
|
|
26
38
|
*/
|
|
27
39
|
export class Aurora extends Component {
|
|
@@ -31,7 +43,8 @@ export class Aurora extends Component {
|
|
|
31
43
|
static defaults = {
|
|
32
44
|
preset: 'source',
|
|
33
45
|
colors: [],
|
|
34
|
-
intensity: 'subtle'
|
|
46
|
+
intensity: 'subtle',
|
|
47
|
+
motion: 'none'
|
|
35
48
|
};
|
|
36
49
|
|
|
37
50
|
/**
|
|
@@ -57,13 +70,34 @@ export class Aurora extends Component {
|
|
|
57
70
|
priority: root.style.getPropertyPriority(property)
|
|
58
71
|
}));
|
|
59
72
|
this._colors = [];
|
|
73
|
+
/** @type {HTMLElement|null} The motion layer, while `motion` is not `none`. */
|
|
74
|
+
this._motion = null;
|
|
60
75
|
|
|
61
76
|
this.setPreset(this.options.preset);
|
|
62
77
|
this.setIntensity(this.options.intensity);
|
|
63
78
|
this.setColors(this.options.colors);
|
|
79
|
+
this.setMotion(this.options.motion);
|
|
64
80
|
return root;
|
|
65
81
|
}
|
|
66
82
|
|
|
83
|
+
/**
|
|
84
|
+
* Starts, changes, or stops the ambient movement without replacing surface content.
|
|
85
|
+
* @param {string} motion `none`, `drift`, or `flow`.
|
|
86
|
+
* @returns {this}
|
|
87
|
+
*/
|
|
88
|
+
setMotion(motion) {
|
|
89
|
+
const value = normalizeAuroraMotion(motion);
|
|
90
|
+
this.el.dataset.motion = value;
|
|
91
|
+
if (value === 'none') {
|
|
92
|
+
this._motion?.remove();
|
|
93
|
+
this._motion = null;
|
|
94
|
+
} else if (!this._motion?.isConnected) {
|
|
95
|
+
this._motion = h('span', { class: 'zx-aurora__motion', ariaHidden: 'true' });
|
|
96
|
+
this.el.prepend(this._motion);
|
|
97
|
+
}
|
|
98
|
+
return this;
|
|
99
|
+
}
|
|
100
|
+
|
|
67
101
|
/** Sets the light-field geometry without replacing surface content. @param {string} preset @returns {this} */
|
|
68
102
|
setPreset(preset) {
|
|
69
103
|
this.el.dataset.preset = normalizeAuroraPreset(preset);
|
|
@@ -100,16 +134,25 @@ export class Aurora extends Component {
|
|
|
100
134
|
destroy() {
|
|
101
135
|
if (this._cleaned) return;
|
|
102
136
|
this._cleaned = true;
|
|
137
|
+
this._motion?.remove();
|
|
138
|
+
this._motion = null;
|
|
103
139
|
super.destroy();
|
|
104
140
|
if (!this._createdRoot) restoreTarget(this.el, this._original);
|
|
105
141
|
}
|
|
106
142
|
}
|
|
107
143
|
|
|
108
|
-
/** @param {unknown} value @returns {
|
|
144
|
+
/** @param {unknown} value @returns {AuroraPreset} */
|
|
109
145
|
export function normalizeAuroraPreset(value) {
|
|
110
146
|
const preset = String(value ?? '').trim().toLowerCase();
|
|
111
147
|
if (!PRESETS.includes(preset)) throw new TypeError(`Unknown Aurora preset: ${value}`);
|
|
112
|
-
return /** @type {
|
|
148
|
+
return /** @type {AuroraPreset} */ (preset);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/** @param {unknown} value @returns {AuroraMotion} `none` for null or undefined. */
|
|
152
|
+
export function normalizeAuroraMotion(value) {
|
|
153
|
+
const motion = String(value ?? 'none').trim().toLowerCase();
|
|
154
|
+
if (!MOTIONS.includes(motion)) throw new TypeError(`Unknown Aurora motion: ${value}`);
|
|
155
|
+
return /** @type {AuroraMotion} */ (motion);
|
|
113
156
|
}
|
|
114
157
|
|
|
115
158
|
/** @param {unknown} value @returns {'subtle'|'balanced'|'vivid'} */
|
|
@@ -556,8 +556,12 @@
|
|
|
556
556
|
gap: var(--zx-space-5);
|
|
557
557
|
padding: var(--zx-space-5);
|
|
558
558
|
}
|
|
559
|
-
|
|
560
|
-
|
|
559
|
+
/* A month: its name, then a grid of rows, the weekday names first. Every row lays out the same
|
|
560
|
+
seven columns, so the days line up exactly as in one seven-column grid. */
|
|
561
|
+
.zx-calendar__year-month { display: grid; gap: 2px; align-content: start; }
|
|
562
|
+
.zx-calendar__year-grid { display: grid; gap: 2px; }
|
|
563
|
+
.zx-calendar__year-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
|
|
564
|
+
.zx-calendar__year-heading { margin: 0 0 var(--zx-space-2); font-size: var(--zx-text-md); font-weight: var(--zx-weight-semibold); }
|
|
561
565
|
.zx-calendar__year-weekday { color: var(--zx-color-text-muted); font-size: var(--zx-text-xs); font-weight: var(--zx-weight-medium); text-align: center; }
|
|
562
566
|
.zx-calendar__year-day,
|
|
563
567
|
.zx-calendar__year-blank { aspect-ratio: 1; }
|