astraeus 0.7.0 → 0.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 +176 -0
- package/README.md +185 -37
- package/package.json +5 -4
- package/src/api/AstraeusScene.d.ts +21 -5
- package/src/api/AstraeusScene.js +34 -10
- package/src/api/AstraeusScene.node.js +34 -10
- package/src/api/assembleScene.d.ts +36 -0
- package/src/api/assembleScene.js +175 -0
- package/src/api/bodySetChecks.d.ts +10 -0
- package/src/api/bodySetChecks.js +117 -0
- package/src/api/bodySetInput.d.ts +81 -0
- package/src/api/bodySetInput.js +1 -0
- package/src/api/containingBlock.d.ts +6 -0
- package/src/api/containingBlock.js +16 -0
- package/src/api/data.d.ts +17 -5
- package/src/api/data.js +28 -10
- package/src/api/definitionOf.d.ts +16 -0
- package/src/api/definitionOf.js +20 -0
- package/src/api/errors.d.ts +61 -1
- package/src/api/frozenCopy.d.ts +6 -0
- package/src/api/frozenCopy.js +26 -0
- package/src/api/group.d.ts +8 -2
- package/src/api/group.js +24 -5
- package/src/api/index.d.ts +18 -7
- package/src/api/index.js +2 -2
- package/src/api/index.node.js +2 -2
- package/src/api/listeners.d.ts +5 -0
- package/src/api/listeners.js +25 -0
- package/src/api/look.d.ts +47 -0
- package/src/api/look.js +1 -0
- package/src/api/lookInput.d.ts +3 -0
- package/src/api/lookInput.js +41 -0
- package/src/api/moonPanelInput.d.ts +60 -0
- package/src/api/moonPanelInput.js +1 -0
- package/src/api/mount.d.ts +9 -19
- package/src/api/mount.js +27 -13
- package/src/api/mount.node.js +27 -13
- package/src/api/pathProvenance.js +1 -1
- package/src/api/pickerInput.d.ts +25 -0
- package/src/api/pickerInput.js +1 -0
- package/src/api/planBodies.d.ts +72 -0
- package/src/api/planBodies.js +300 -0
- package/src/api/planBodySets.d.ts +68 -0
- package/src/api/planBodySets.js +234 -0
- package/src/api/planCamera.d.ts +83 -0
- package/src/api/planCamera.js +184 -0
- package/src/api/planGroups.d.ts +36 -0
- package/src/api/planGroups.js +103 -0
- package/src/api/planMoonPanel.d.ts +19 -0
- package/src/api/planMoonPanel.js +104 -0
- package/src/api/planPaths.d.ts +40 -0
- package/src/api/planPaths.js +212 -0
- package/src/api/planPicker.d.ts +12 -0
- package/src/api/planPicker.js +40 -0
- package/src/api/planPlaces.d.ts +16 -0
- package/src/api/planPlaces.js +99 -0
- package/src/api/planStory.d.ts +26 -0
- package/src/api/planStory.js +66 -0
- package/src/api/planTimeline.d.ts +27 -0
- package/src/api/planTimeline.js +68 -0
- package/src/api/planViews.d.ts +25 -0
- package/src/api/planViews.js +35 -0
- package/src/api/prepared.js +4 -1
- package/src/api/renamedInputs.d.ts +15 -0
- package/src/api/renamedInputs.js +39 -0
- package/src/api/scene.d.ts +162 -68
- package/src/api/scene.js +247 -793
- package/src/api/sceneFreeze.d.ts +4 -0
- package/src/api/sceneFreeze.js +10 -0
- package/src/api/sceneReads.d.ts +171 -0
- package/src/api/sceneReads.js +6 -0
- package/src/api/story.d.ts +49 -19
- package/src/api/story.js +54 -22
- package/src/api/sunOrbit.js +9 -11
- package/src/api/time.d.ts +2 -1
- package/src/api/time.js +2 -1
- package/src/api/viewerCamera.d.ts +22 -0
- package/src/api/viewerCamera.js +84 -0
- package/src/api/viewerClock.d.ts +30 -0
- package/src/api/viewerClock.js +85 -0
- package/src/api/viewerFirstDraw.d.ts +14 -0
- package/src/api/viewerFirstDraw.js +26 -0
- package/src/api/viewerHandle.d.ts +79 -0
- package/src/api/viewerHandle.js +31 -0
- package/src/api/viewerLink.d.ts +87 -15
- package/src/api/viewerLink.js +111 -75
- package/src/api/viewerLooks.d.ts +19 -0
- package/src/api/viewerLooks.js +37 -0
- package/src/api/viewerPicker.d.ts +22 -0
- package/src/api/viewerPicker.js +49 -0
- package/src/api/viewerSelection.d.ts +25 -0
- package/src/api/viewerSelection.js +31 -0
- package/src/api/viewerViews.d.ts +10 -0
- package/src/api/viewerViews.js +18 -0
- package/src/api/viewerZones.d.ts +20 -0
- package/src/api/viewerZones.js +47 -0
- package/src/api/views.d.ts +4 -5
- package/src/api/views.js +7 -5
- package/src/app/App.d.ts +5 -3
- package/src/app/App.js +191 -82
- package/src/app/App.node.js +191 -82
- package/src/app/AstraeusScene.d.ts +16 -2
- package/src/app/AstraeusScene.js +4 -4
- package/src/app/BodyView.d.ts +4 -1
- package/src/app/BodyView.js +2 -2
- package/src/app/CameraController.d.ts +6 -0
- package/src/app/DeveloperSettings.d.ts +1 -4
- package/src/app/DeveloperSettings.js +6 -10
- package/src/app/FeatureMarkers.d.ts +4 -3
- package/src/app/FeatureMarkers.js +8 -13
- package/src/app/FrameRateSection.js +2 -1
- package/src/app/OrbitSetView.js +1 -1
- package/src/app/SettingControls.d.ts +11 -3
- package/src/app/SettingControls.js +10 -2
- package/src/app/SkyView.d.ts +3 -10
- package/src/app/SkyView.js +6 -28
- package/src/app/address.d.ts +16 -0
- package/src/app/address.js +31 -0
- package/src/app/bodyDraw.d.ts +10 -7
- package/src/app/bodyDraw.js +12 -32
- package/src/app/bodyMetrics.js +2 -2
- package/src/app/bodySet.d.ts +4 -20
- package/src/app/bodySet.js +5 -16
- package/src/app/debugReadout.js +1 -1
- package/src/app/displaySwitches.d.ts +4 -0
- package/src/app/displaySwitches.js +6 -0
- package/src/app/experienceDefinition.d.ts +11 -23
- package/src/app/listSwitch.d.ts +8 -14
- package/src/app/listSwitch.js +3 -10
- package/src/app/liveLook.d.ts +39 -0
- package/src/app/liveLook.js +66 -0
- package/src/app/look.d.ts +36 -0
- package/src/app/look.js +61 -0
- package/src/app/mission.d.ts +1 -1
- package/src/app/mission.js +1 -1
- package/src/app/openClock.d.ts +3 -2
- package/src/app/openClock.js +3 -3
- package/src/app/sceneCamera.js +9 -0
- package/src/app/sceneFrame.d.ts +4 -4
- package/src/app/sceneFrame.js +13 -8
- package/src/app/sceneHooks.js +3 -2
- package/src/app/style.css +114 -139
- package/src/app/trackedMetrics.d.ts +10 -3
- package/src/app/trackedMetrics.js +22 -11
- package/src/app/viewLink.d.ts +10 -32
- package/src/app/viewLink.js +10 -49
- package/src/app/viewerPort.d.ts +50 -0
- package/src/app/views.d.ts +1 -0
- package/src/assets/bodies/galileanMoons.js +1 -2
- package/src/assets/bodies/io.js +2 -2
- package/src/assets/bodies/listedMoons.d.ts +1 -1
- package/src/assets/bodies/listedMoons.js +2 -3
- package/src/assets/bodies/planetSystemMaps.js +2 -3
- package/src/assets/bodies/venus.js +2 -6
- package/src/assets/catalogue.js +1 -2
- package/src/assets/licence.d.ts +3 -3
- package/src/assets/licence.js +3 -3
- package/src/assets/pictures.d.ts +15 -12
- package/src/assets/pictures.js +24 -20
- package/src/assets/sky.d.ts +6 -5
- package/src/assets/sky.js +6 -9
- package/src/assets/visual.d.ts +4 -0
- package/src/core/bodies/index.d.ts +0 -4
- package/src/core/bodies/index.js +1 -6
- package/src/core/bodies/jupiterData.d.ts +0 -1
- package/src/core/bodies/jupiterData.js +2 -5
- package/src/core/bodies/moonSystem.d.ts +1 -1
- package/src/core/bodies/moonSystem.js +102 -55
- package/src/core/bodies/outerPlanetRingData.js +2 -2
- package/src/core/bodies/planetTrajectory.js +1 -1
- package/src/core/bodySetFamilies.d.ts +20 -0
- package/src/core/bodySetFamilies.js +14 -0
- package/src/core/chebyshevEphemeris.js +1 -1
- package/src/core/elementsBody.d.ts +8 -4
- package/src/core/elementsBody.js +32 -11
- package/src/core/elementsGroup.d.ts +27 -0
- package/src/core/elementsGroup.js +85 -0
- package/src/core/events.d.ts +2 -0
- package/src/core/events.js +2 -0
- package/src/core/illumination.js +1 -1
- package/src/core/listedOrbitGroup.d.ts +2 -0
- package/src/core/listedOrbitGroup.js +11 -7
- package/src/core/moonListText.d.ts +6 -0
- package/src/core/moonListText.js +19 -0
- package/src/core/moonTrajectory.js +1 -1
- package/src/core/pacing.d.ts +38 -3
- package/src/core/pacing.js +55 -4
- package/src/core/planetModels.js +2 -2
- package/src/core/planetSeries.d.ts +8 -0
- package/src/core/planetSeries.js +16 -2
- package/src/core/pointGroup.js +1 -1
- package/src/core/provenance.d.ts +2 -1
- package/src/core/provenance.js +2 -2
- package/src/core/referenceCenters.js +5 -5
- package/src/core/sampledTrajectory.js +1 -1
- package/src/core/scalePolicy.d.ts +1 -0
- package/src/core/startView.d.ts +19 -0
- package/src/core/startView.js +28 -0
- package/src/core/state.d.ts +6 -2
- package/src/core/state.js +3 -3
- package/src/core/storyPanels.d.ts +63 -0
- package/src/core/storyPanels.js +111 -0
- package/src/core/sunCentredSources.d.ts +4 -0
- package/src/core/sunCentredSources.js +9 -2
- package/src/core/timeInput.d.ts +4 -0
- package/src/core/timeInput.js +4 -0
- package/src/shell/AstraeusShell.d.ts +5 -1
- package/src/shell/AstraeusShell.js +20 -11
- package/src/shell/AstraeusShell.node.js +20 -11
- package/src/shell/Collapsible.d.ts +4 -3
- package/src/shell/Collapsible.js +5 -5
- package/src/shell/ControlsDrawer.d.ts +1 -1
- package/src/shell/ControlsDrawer.js +3 -1
- package/src/shell/DisplaySwitches.js +2 -1
- package/src/shell/InfoPanel.d.ts +3 -1
- package/src/shell/InfoPanel.js +5 -4
- package/src/shell/MoonFamilyPanel.js +1 -1
- package/src/shell/ObjectControls.d.ts +3 -1
- package/src/shell/ObjectControls.js +2 -2
- package/src/shell/Sources.d.ts +5 -3
- package/src/shell/Sources.js +5 -5
- package/src/shell/StoryPanelView.d.ts +4 -3
- package/src/shell/StoryPanelView.js +8 -6
- package/src/shell/SwitchControl.d.ts +5 -11
- package/src/shell/SwitchControl.js +2 -20
- package/src/shell/TimelineBar.css +81 -81
- package/src/shell/TimelineBar.d.ts +5 -2
- package/src/shell/TimelineBar.js +9 -8
- package/src/shell/TimelineBar.node.js +9 -8
- package/src/shell/TopBar.css +22 -22
- package/src/shell/TopBar.d.ts +5 -1
- package/src/shell/TopBar.js +2 -2
- package/src/shell/TopBar.node.js +2 -2
- package/src/shell/bootLoader.d.ts +4 -10
- package/src/shell/bootLoader.js +6 -52
- package/src/shell/embedded.css +18 -18
- package/src/shell/experience.d.ts +1 -1
- package/src/shell/moonFamilies.d.ts +2 -6
- package/src/shell/moonFamilies.js +2 -18
- package/src/shell/phone.css +58 -58
- package/src/shell/storyPanels.d.ts +2 -53
- package/src/shell/storyPanels.js +1 -106
- package/src/shell/style.css +153 -134
- package/src/shell/useDrawers.d.ts +3 -2
- package/src/shell/useDrawers.js +4 -3
- package/src/shell/viewerKeys.d.ts +8 -0
- package/src/shell/viewerKeys.js +16 -0
- package/src/synthetic/syntheticDefinition.js +20 -24
- package/src/synthetic/syntheticJourneyScene.js +3 -3
- package/src/synthetic/syntheticProbeDefinition.js +2 -1
- package/src/synthetic/syntheticViewsDefinition.d.ts +0 -3
- package/src/synthetic/syntheticViewsDefinition.js +10 -16
- package/data/moons/jupiter.json +0 -3333
- package/data/moons/neptune.json +0 -555
- package/data/moons/pluto.json +0 -205
- package/data/moons/saturn.json +0 -8267
- package/data/moons/uranus.json +0 -887
- package/src/app/addressNavigation.d.ts +0 -17
- package/src/app/addressNavigation.js +0 -16
- package/src/assets/bodies/jupiterMoonCatalogue.d.ts +0 -3
- package/src/assets/bodies/jupiterMoonCatalogue.js +0 -4
- package/src/assets/bodies/outerPlanetCatalogues.d.ts +0 -7
- package/src/assets/bodies/outerPlanetCatalogues.js +0 -8
- package/src/assets/bodies/swiftTuttle.d.ts +0 -12
- package/src/assets/bodies/swiftTuttle.js +0 -13
- package/src/assets/moonCatalogue.d.ts +0 -49
- package/src/assets/moonCatalogue.js +0 -80
- package/src/core/bodies/outerPlanetData.d.ts +0 -4
- package/src/core/bodies/outerPlanetData.js +0 -13
- package/src/core/bodies/swiftTuttle.d.ts +0 -46
- package/src/core/bodies/swiftTuttle.js +0 -106
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* The timeline bar: one slim line on larger screens, two lines on phones and tablets (T-080, O-020). Its rules live here, beside TimelineBar.tsx. */
|
|
2
|
-
.timeline-bar {
|
|
2
|
+
.astraeus-shell .timeline-bar {
|
|
3
3
|
position: absolute;
|
|
4
4
|
z-index: 3;
|
|
5
5
|
right: 12px;
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
backdrop-filter: blur(10px);
|
|
15
15
|
}
|
|
16
16
|
/* The open Events list rises over the panel rather than hiding behind it. */
|
|
17
|
-
.timeline-bar:has(.timeline-event-list[open]) { z-index: 5; }
|
|
17
|
+
.astraeus-shell .timeline-bar:has(.timeline-event-list[open]) { z-index: 5; }
|
|
18
18
|
/* An open marker group lists above the bar; the bar rises over the phone information sheet (z-index 8) so each item stays reachable (O-050 T-217). */
|
|
19
|
-
.timeline-bar:has(.timeline-group-list),
|
|
20
|
-
[data-phone="true"] .timeline-bar:has(.timeline-group-list) { z-index: 9; }
|
|
19
|
+
.astraeus-shell .timeline-bar:has(.timeline-group-list),
|
|
20
|
+
.astraeus-shell[data-phone="true"] .timeline-bar:has(.timeline-group-list) { z-index: 9; }
|
|
21
21
|
|
|
22
|
-
.timeline-main-row { display: flex; align-items: center; gap: 14px; min-width: 0; }
|
|
23
|
-
.timeline-transport { display: flex; flex: 0 0 auto; gap: 4px; }
|
|
24
|
-
.timeline-time {
|
|
22
|
+
.astraeus-shell .timeline-main-row { display: flex; align-items: center; gap: 14px; min-width: 0; }
|
|
23
|
+
.astraeus-shell .timeline-transport { display: flex; flex: 0 0 auto; gap: 4px; }
|
|
24
|
+
.astraeus-shell .timeline-time {
|
|
25
25
|
/* A fixed width: the stamp changes length as it plays (milliseconds appear and vanish) and must not shift the scrubber beside it. */
|
|
26
26
|
flex: 0 0 24ch;
|
|
27
27
|
width: 24ch;
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
font-variant-numeric: tabular-nums;
|
|
30
30
|
white-space: nowrap;
|
|
31
31
|
}
|
|
32
|
-
.timeline-time-short { display: none; }
|
|
33
|
-
.timeline-speed { display: flex; flex: 0 0 auto; align-items: center; color: var(--ui-muted, #c7bdb3); }
|
|
34
|
-
.timeline-speed > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
|
|
35
|
-
.timeline-bar .timeline-speed select { width: 210px; max-width: 30vw; }
|
|
36
|
-
.timeline-scrubber { display: flex; flex: 1 1 0; flex-direction: column; gap: 1px; min-width: 0; }
|
|
32
|
+
.astraeus-shell .timeline-time-short { display: none; }
|
|
33
|
+
.astraeus-shell .timeline-speed { display: flex; flex: 0 0 auto; align-items: center; color: var(--ui-muted, #c7bdb3); }
|
|
34
|
+
.astraeus-shell .timeline-speed > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
|
|
35
|
+
.astraeus-shell .timeline-bar .timeline-speed select { width: 210px; max-width: 30vw; }
|
|
36
|
+
.astraeus-shell .timeline-scrubber { display: flex; flex: 1 1 0; flex-direction: column; gap: 1px; min-width: 0; }
|
|
37
37
|
|
|
38
38
|
/* Events: a button on the line; what just happened, what is next and the full list open above it. */
|
|
39
|
-
.timeline-event-list { position: relative; flex: 0 0 auto; }
|
|
40
|
-
.timeline-event-list summary span { color: var(--ui-data, #b1a1df); }
|
|
41
|
-
.timeline-expanded {
|
|
39
|
+
.astraeus-shell .timeline-event-list { position: relative; flex: 0 0 auto; }
|
|
40
|
+
.astraeus-shell .timeline-event-list summary span { color: var(--ui-data, #b1a1df); }
|
|
41
|
+
.astraeus-shell .timeline-expanded {
|
|
42
42
|
position: absolute;
|
|
43
43
|
z-index: 6;
|
|
44
44
|
right: 0;
|
|
@@ -55,88 +55,88 @@
|
|
|
55
55
|
background: rgba(13, 13, 13, .97);
|
|
56
56
|
box-shadow: 0 8px 24px rgba(0, 0, 0, .42);
|
|
57
57
|
}
|
|
58
|
-
.timeline-expanded ol { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
|
|
59
|
-
.timeline-expanded li { margin: 0; padding: 0; }
|
|
60
|
-
.timeline-expanded li button { justify-content: flex-start; align-items: baseline; gap: 10px; }
|
|
61
|
-
.timeline-expanded li time { flex: 0 0 auto; color: var(--ui-data, #b1a1df); font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
|
|
62
|
-
.timeline-expanded li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
63
|
-
.timeline-event-context { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 2px 4px 6px; border-bottom: 1px solid #2b2927; color: var(--ui-muted, #c7bdb3); }
|
|
64
|
-
.timeline-event-context > span { padding: 2px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
58
|
+
.astraeus-shell .timeline-expanded ol { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
|
|
59
|
+
.astraeus-shell .timeline-expanded li { margin: 0; padding: 0; }
|
|
60
|
+
.astraeus-shell :where(.timeline-expanded) li button { justify-content: flex-start; align-items: baseline; gap: 10px; }
|
|
61
|
+
.astraeus-shell .timeline-expanded li time { flex: 0 0 auto; color: var(--ui-data, #b1a1df); font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
|
|
62
|
+
.astraeus-shell .timeline-expanded li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
63
|
+
.astraeus-shell .timeline-event-context { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 2px 4px 6px; border-bottom: 1px solid #2b2927; color: var(--ui-muted, #c7bdb3); }
|
|
64
|
+
.astraeus-shell .timeline-event-context > span { padding: 2px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
65
65
|
.astraeus-shell .timeline-event-current { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
66
|
-
.timeline-event-current span { color: var(--ui-data, #b1a1df); }
|
|
67
|
-
.timeline-event-context strong { color: var(--ui-color, #f0e6da); font-weight: 600; }
|
|
66
|
+
.astraeus-shell .timeline-event-current span { color: var(--ui-data, #b1a1df); }
|
|
67
|
+
.astraeus-shell .timeline-event-context strong { color: var(--ui-color, #f0e6da); font-weight: 600; }
|
|
68
68
|
|
|
69
69
|
/* The scrubber, its event marks and the activity glow. */
|
|
70
|
-
.timeline-track { position: relative; display: flex; align-items: center; height: 22px; }
|
|
71
|
-
.timeline-track input[type="range"] { position: relative; z-index: 1; width: 100%; height: 22px; margin: 0; accent-color: var(--ui-accent, #fc6323); background: transparent; cursor: pointer; }
|
|
72
|
-
.timeline-markers { position: absolute; z-index: 2; inset: 0 8px; pointer-events: none; }
|
|
73
|
-
.timeline-marker { position: absolute; top: calc(50% - 10px); width: 18px; min-height: 20px !important; height: 20px; padding: 0 !important; border: 0 !important; border-radius: 3px !important; background: transparent !important; opacity: .9; transform: translateX(-50%); pointer-events: auto; }
|
|
74
|
-
.timeline-marker::after { display: block; width: 2px; height: 14px; margin: auto; border-radius: 2px; background: var(--ui-data, #b1a1df); content: ""; }
|
|
75
|
-
.timeline-marker:hover::after,
|
|
76
|
-
.timeline-marker:focus-visible::after { background: var(--ui-accent, #fc6323); }
|
|
70
|
+
.astraeus-shell .timeline-track { position: relative; display: flex; align-items: center; height: 22px; }
|
|
71
|
+
.astraeus-shell :where(.timeline-track) input[type="range"] { position: relative; z-index: 1; width: 100%; height: 22px; margin: 0; accent-color: var(--ui-accent, #fc6323); background: transparent; cursor: pointer; }
|
|
72
|
+
.astraeus-shell .timeline-markers { position: absolute; z-index: 2; inset: 0 8px; pointer-events: none; }
|
|
73
|
+
.astraeus-shell .timeline-marker { position: absolute; top: calc(50% - 10px); width: 18px; min-height: 20px !important; height: 20px; padding: 0 !important; border: 0 !important; border-radius: 3px !important; background: transparent !important; opacity: .9; transform: translateX(-50%); pointer-events: auto; }
|
|
74
|
+
.astraeus-shell .timeline-marker::after { display: block; width: 2px; height: 14px; margin: auto; border-radius: 2px; background: var(--ui-data, #b1a1df); content: ""; }
|
|
75
|
+
.astraeus-shell .timeline-marker:hover::after,
|
|
76
|
+
.astraeus-shell .timeline-marker:focus-visible::after { background: var(--ui-accent, #fc6323); }
|
|
77
77
|
/* T-084: the activity is a glow inside the track. The input's own track turns transparent; the glow (brightness follows the rate) sits behind it, the played part keeps the accent colour, and the thumb stays a clear disc. */
|
|
78
|
-
.timeline-glow { position: absolute; z-index: 0; top: 50%; right: 8px; left: 8px; height: var(--glow-thickness, 6px); transform: translateY(-50%); border-radius: 999px; pointer-events: none; }
|
|
79
|
-
.timeline-glow-ahead,
|
|
80
|
-
.timeline-glow-line { position: absolute; inset: 0; border-radius: inherit; background: var(--glow-ahead); }
|
|
81
|
-
.timeline-glow-ahead::after,
|
|
82
|
-
.timeline-glow-line::after { position: absolute; inset: 0; border-radius: inherit; background: inherit; filter: blur(var(--glow-halo, 7px)); content: ""; }
|
|
78
|
+
.astraeus-shell .timeline-glow { position: absolute; z-index: 0; top: 50%; right: 8px; left: 8px; height: var(--glow-thickness, 6px); transform: translateY(-50%); border-radius: 999px; pointer-events: none; }
|
|
79
|
+
.astraeus-shell .timeline-glow-ahead,
|
|
80
|
+
.astraeus-shell .timeline-glow-line { position: absolute; inset: 0; border-radius: inherit; background: var(--glow-ahead); }
|
|
81
|
+
.astraeus-shell .timeline-glow-ahead::after,
|
|
82
|
+
.astraeus-shell .timeline-glow-line::after { position: absolute; inset: 0; border-radius: inherit; background: inherit; filter: blur(var(--glow-halo, 7px)); content: ""; }
|
|
83
83
|
/* The played part is the same shape in the accent colour, clipped at the playhead (the clip leaves room above and below for the halo). */
|
|
84
|
-
.timeline-glow-played { position: absolute; inset: 0; clip-path: inset(-24px var(--glow-played-edge, 100%) -24px -24px); }
|
|
85
|
-
.timeline-glow-line { background: var(--glow-played); }
|
|
84
|
+
.astraeus-shell .timeline-glow-played { position: absolute; inset: 0; clip-path: inset(-24px var(--glow-played-edge, 100%) -24px -24px); }
|
|
85
|
+
.astraeus-shell .timeline-glow-line { background: var(--glow-played); }
|
|
86
86
|
/* The peak mark rides above the line (diamond and a short stem), so an event or story-panel mark that falls on the peak stays pressable at the line itself. */
|
|
87
|
-
.timeline-marker.timeline-window-peak { top: calc(50% - 18px); width: 16px; min-height: 12px !important; height: 12px; }
|
|
88
|
-
.timeline-window-peak::before { position: absolute; top: 7px; left: 50%; height: 9px; border-left: 1px solid var(--ui-accent, #fc6323); content: ""; }
|
|
89
|
-
.timeline-window-peak::after { width: 9px !important; height: 9px !important; margin-top: 1.5px !important; border-radius: 1px !important; background: var(--ui-accent, #fc6323) !important; box-shadow: 0 0 0 2px rgba(13, 13, 13, .8); transform: rotate(45deg); }
|
|
90
|
-
.timeline-track .timeline-marker::after { background: var(--ui-color, #f0e6da); box-shadow: 0 0 0 1px rgba(13, 13, 13, .6); }
|
|
91
|
-
.timeline-track .timeline-marker:hover::after,
|
|
92
|
-
.timeline-track .timeline-marker:focus-visible::after { background: var(--ui-accent, #fc6323); }
|
|
93
|
-
.timeline-track input[type="range"] { -webkit-appearance: none; appearance: none; }
|
|
94
|
-
.timeline-track input[type="range"]::-webkit-slider-runnable-track { height: 22px; background: transparent; border: 0; }
|
|
95
|
-
.timeline-track input[type="range"]::-moz-range-track { height: 22px; background: transparent; border: 0; }
|
|
96
|
-
.timeline-track input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: 3px; border: 2px solid var(--ui-accent, #fc6323); border-radius: 50%; background: var(--ui-color, #f0e6da); box-shadow: 0 0 0 2px rgba(13, 13, 13, .85), 0 1px 6px rgba(0, 0, 0, .6); }
|
|
97
|
-
.timeline-track input[type="range"]::-moz-range-thumb { box-sizing: border-box; width: 16px; height: 16px; border: 2px solid var(--ui-accent, #fc6323); border-radius: 50%; background: var(--ui-color, #f0e6da); box-shadow: 0 0 0 2px rgba(13, 13, 13, .85), 0 1px 6px rgba(0, 0, 0, .6); }
|
|
98
|
-
.timeline-track input[type="range"]:focus-visible { outline: 2px solid var(--ui-accent, #fc6323); outline-offset: 2px; border-radius: 8px; }
|
|
99
|
-
.timeline-bar .timeline-marker-label { display: none; bottom: calc(100% + 6px); left: 50%; max-width: min(300px, 65vw); color: var(--ui-color, #f0e6da); transform: translateX(-50%); }
|
|
100
|
-
.timeline-bar .timeline-marker:hover .timeline-marker-label,
|
|
101
|
-
.timeline-bar .timeline-marker:focus .timeline-marker-label { display: block; }
|
|
102
|
-
.timeline-bounds { display: none; justify-content: space-between; color: var(--ui-subtle, #a99e94); font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }
|
|
103
|
-
.timeline-panel-marker::after { width: 8px !important; height: 8px !important; border: 1.5px solid var(--ui-accent, #fc6323); border-radius: 50% !important; background: rgba(0, 0, 0, .55) !important; }
|
|
104
|
-
.timeline-panel-marker[aria-pressed="true"]::after { background: var(--ui-accent, #fc6323) !important; }
|
|
87
|
+
.astraeus-shell .timeline-marker.timeline-window-peak { top: calc(50% - 18px); width: 16px; min-height: 12px !important; height: 12px; }
|
|
88
|
+
.astraeus-shell .timeline-window-peak::before { position: absolute; top: 7px; left: 50%; height: 9px; border-left: 1px solid var(--ui-accent, #fc6323); content: ""; }
|
|
89
|
+
.astraeus-shell .timeline-window-peak::after { width: 9px !important; height: 9px !important; margin-top: 1.5px !important; border-radius: 1px !important; background: var(--ui-accent, #fc6323) !important; box-shadow: 0 0 0 2px rgba(13, 13, 13, .8); transform: rotate(45deg); }
|
|
90
|
+
.astraeus-shell .timeline-track .timeline-marker::after { background: var(--ui-color, #f0e6da); box-shadow: 0 0 0 1px rgba(13, 13, 13, .6); }
|
|
91
|
+
.astraeus-shell .timeline-track .timeline-marker:hover::after,
|
|
92
|
+
.astraeus-shell .timeline-track .timeline-marker:focus-visible::after { background: var(--ui-accent, #fc6323); }
|
|
93
|
+
.astraeus-shell .timeline-track input[type="range"] { -webkit-appearance: none; appearance: none; }
|
|
94
|
+
.astraeus-shell .timeline-track input[type="range"]::-webkit-slider-runnable-track { height: 22px; background: transparent; border: 0; }
|
|
95
|
+
.astraeus-shell .timeline-track input[type="range"]::-moz-range-track { height: 22px; background: transparent; border: 0; }
|
|
96
|
+
.astraeus-shell .timeline-track input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: 3px; border: 2px solid var(--ui-accent, #fc6323); border-radius: 50%; background: var(--ui-color, #f0e6da); box-shadow: 0 0 0 2px rgba(13, 13, 13, .85), 0 1px 6px rgba(0, 0, 0, .6); }
|
|
97
|
+
.astraeus-shell .timeline-track input[type="range"]::-moz-range-thumb { box-sizing: border-box; width: 16px; height: 16px; border: 2px solid var(--ui-accent, #fc6323); border-radius: 50%; background: var(--ui-color, #f0e6da); box-shadow: 0 0 0 2px rgba(13, 13, 13, .85), 0 1px 6px rgba(0, 0, 0, .6); }
|
|
98
|
+
.astraeus-shell :where(.timeline-track) input[type="range"]:focus-visible { outline: 2px solid var(--ui-accent, #fc6323); outline-offset: 2px; border-radius: 8px; }
|
|
99
|
+
.astraeus-shell .timeline-bar .timeline-marker-label { display: none; bottom: calc(100% + 6px); left: 50%; max-width: min(300px, 65vw); color: var(--ui-color, #f0e6da); transform: translateX(-50%); }
|
|
100
|
+
.astraeus-shell .timeline-bar .timeline-marker:hover .timeline-marker-label,
|
|
101
|
+
.astraeus-shell .timeline-bar .timeline-marker:focus .timeline-marker-label { display: block; }
|
|
102
|
+
.astraeus-shell .timeline-bounds { display: none; justify-content: space-between; color: var(--ui-subtle, #a99e94); font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }
|
|
103
|
+
.astraeus-shell .timeline-panel-marker::after { width: 8px !important; height: 8px !important; border: 1.5px solid var(--ui-accent, #fc6323); border-radius: 50% !important; background: rgba(0, 0, 0, .55) !important; }
|
|
104
|
+
.astraeus-shell .timeline-panel-marker[aria-pressed="true"]::after { background: var(--ui-accent, #fc6323) !important; }
|
|
105
105
|
.astraeus-shell:has(.timeline-bar) .shell-top { --shell-timeline-space: 84px; }
|
|
106
106
|
|
|
107
107
|
/* Tablets and phones: two lines. Transport, time and speed above; scrubber and Events below. Sizes of the controls come from controls.css. */
|
|
108
108
|
@media (max-width: 900px) {
|
|
109
|
-
.timeline-bar { right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); left: 8px; padding: 8px; }
|
|
110
|
-
.timeline-main-row { flex-wrap: wrap; gap: 4px 6px; }
|
|
111
|
-
.timeline-transport { gap: 0; }
|
|
112
|
-
.timeline-time { margin-left: auto; font-size: 12px; }
|
|
113
|
-
.timeline-bar .timeline-speed select { width: 180px; }
|
|
109
|
+
.astraeus-shell .timeline-bar { right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); left: 8px; padding: 8px; }
|
|
110
|
+
.astraeus-shell .timeline-main-row { flex-wrap: wrap; gap: 4px 6px; }
|
|
111
|
+
.astraeus-shell .timeline-transport { gap: 0; }
|
|
112
|
+
.astraeus-shell .timeline-time { margin-left: auto; font-size: 12px; }
|
|
113
|
+
.astraeus-shell .timeline-bar .timeline-speed select { width: 180px; }
|
|
114
114
|
/* Line two (scrubber, Events) starts on its own row: the scrubber is too wide to share line one. */
|
|
115
|
-
.timeline-scrubber { order: 4; flex: 1 1 calc(100% - 128px); }
|
|
116
|
-
.timeline-event-list { order: 5; }
|
|
117
|
-
.timeline-track { height: 44px; }
|
|
118
|
-
.timeline-track input[type="range"] { height: 44px; }
|
|
115
|
+
.astraeus-shell .timeline-scrubber { order: 4; flex: 1 1 calc(100% - 128px); }
|
|
116
|
+
.astraeus-shell .timeline-event-list { order: 5; }
|
|
117
|
+
.astraeus-shell .timeline-track { height: 44px; }
|
|
118
|
+
.astraeus-shell .timeline-track input[type="range"] { height: 44px; }
|
|
119
119
|
.astraeus-shell:has(.timeline-bar) .shell-top { --shell-timeline-space: 150px; }
|
|
120
120
|
}
|
|
121
121
|
@media (prefers-reduced-motion: reduce) {
|
|
122
|
-
.timeline-bar { scroll-behavior: auto; transition: none !important; }
|
|
122
|
+
.astraeus-shell .timeline-bar { scroll-behavior: auto; transition: none !important; }
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
/* No timeline (experience.hideTimeline): nothing sits at the bottom, so nothing is reserved for it on a wide or a phone screen. */
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
.astraeus-shell:is(main)[data-timeline-hidden="true"] { --timeline-space: 0px; }
|
|
127
|
+
.astraeus-shell:is(main)[data-timeline-hidden="true"] .shell-top { --shell-timeline-space: 0px; }
|
|
128
128
|
|
|
129
129
|
/* Markers that sit closer than the minimum spacing gather under one numbered mark; pressing it lists them, each a full-size button. The list opens above the track, aligned to the screen side the mark is near so it stays on a phone. */
|
|
130
|
-
.timeline-marker-group { position: absolute; top: 0; height: 100%; width: 18px; transform: translateX(-50%); pointer-events: none; }
|
|
131
|
-
.timeline-marker-group .timeline-group-toggle { left: 0; width: 100%; pointer-events: auto; }
|
|
132
|
-
.timeline-marker-group .timeline-group-toggle::after { display: none; }
|
|
133
|
-
.timeline-group-count { display: block; width: 18px; height: 18px; border: 1.5px solid var(--ui-accent, #fc6323); border-radius: 50%; background: rgba(13, 13, 13, .85); color: var(--ui-color, #f0e6da); font: 600 11px/15px ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; }
|
|
134
|
-
.timeline-group-toggle:hover .timeline-group-count,
|
|
135
|
-
.timeline-group-toggle:focus-visible .timeline-group-count,
|
|
136
|
-
.timeline-group-toggle[aria-expanded="true"] .timeline-group-count { background: var(--ui-accent, #fc6323); color: #0d0d0d; }
|
|
137
|
-
.timeline-group-list { position: absolute; z-index: 3; bottom: calc(100% + 6px); left: 50%; display: flex; flex-direction: column; gap: 2px; width: max-content; max-width: min(300px, calc(100vw - 32px)); max-height: 40vh; margin: 0; padding: 4px; overflow-y: auto; border: 1px solid #2b2927; border-radius: 6px; background: rgba(13, 13, 13, .95); list-style: none; transform: translateX(-50%); pointer-events: auto; }
|
|
138
|
-
.timeline-marker-group[data-align="start"] .timeline-group-list { left: 0; transform: none; }
|
|
139
|
-
.timeline-marker-group[data-align="end"] .timeline-group-list { right: 0; left: auto; transform: none; }
|
|
140
|
-
.timeline-group-item { display: block; width: 100%; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 4px; background: transparent; color: var(--ui-color, #f0e6da); font: inherit; text-align: left; white-space: normal; cursor: pointer; }
|
|
141
|
-
.timeline-group-item:hover,
|
|
142
|
-
.timeline-group-item:focus-visible { background: #2b2927; }
|
|
130
|
+
.astraeus-shell .timeline-marker-group { position: absolute; top: 0; height: 100%; width: 18px; transform: translateX(-50%); pointer-events: none; }
|
|
131
|
+
.astraeus-shell .timeline-marker-group .timeline-group-toggle { left: 0; width: 100%; pointer-events: auto; }
|
|
132
|
+
.astraeus-shell .timeline-marker-group .timeline-group-toggle::after { display: none; }
|
|
133
|
+
.astraeus-shell .timeline-group-count { display: block; width: 18px; height: 18px; border: 1.5px solid var(--ui-accent, #fc6323); border-radius: 50%; background: rgba(13, 13, 13, .85); color: var(--ui-color, #f0e6da); font: 600 11px/15px ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; }
|
|
134
|
+
.astraeus-shell .timeline-group-toggle:hover .timeline-group-count,
|
|
135
|
+
.astraeus-shell .timeline-group-toggle:focus-visible .timeline-group-count,
|
|
136
|
+
.astraeus-shell .timeline-group-toggle[aria-expanded="true"] .timeline-group-count { background: var(--ui-accent, #fc6323); color: #0d0d0d; }
|
|
137
|
+
.astraeus-shell .timeline-group-list { position: absolute; z-index: 3; bottom: calc(100% + 6px); left: 50%; display: flex; flex-direction: column; gap: 2px; width: max-content; max-width: min(300px, calc(100vw - 32px)); max-height: 40vh; margin: 0; padding: 4px; overflow-y: auto; border: 1px solid #2b2927; border-radius: 6px; background: rgba(13, 13, 13, .95); list-style: none; transform: translateX(-50%); pointer-events: auto; }
|
|
138
|
+
.astraeus-shell .timeline-marker-group[data-align="start"] .timeline-group-list { left: 0; transform: none; }
|
|
139
|
+
.astraeus-shell .timeline-marker-group[data-align="end"] .timeline-group-list { right: 0; left: auto; transform: none; }
|
|
140
|
+
.astraeus-shell :where(.timeline-group-item) { display: block; width: 100%; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 4px; background: transparent; color: var(--ui-color, #f0e6da); font: inherit; text-align: left; white-space: normal; cursor: pointer; }
|
|
141
|
+
.astraeus-shell .timeline-group-item:hover,
|
|
142
|
+
.astraeus-shell .timeline-group-item:focus-visible { background: #2b2927; }
|
|
@@ -33,18 +33,21 @@ interface Props {
|
|
|
33
33
|
readonly onOpenChange: (open: boolean) => void;
|
|
34
34
|
readonly swipeThresholdPx: number;
|
|
35
35
|
};
|
|
36
|
+
/** The id of the information panel the event buttons open, made once per viewer by the shell. */
|
|
37
|
+
readonly infoPanelId: string;
|
|
36
38
|
}
|
|
37
|
-
export declare function TimelineBar({ experience, snapshot, onTogglePlayback, onRateChange, paceAuto, onSeek, panels, openPanelId, onPanelOpen, onEventSeek, onEventInfo, onWindowSeek, onWindowInfo, glowLook, drawer }: Props): import("react").JSX.Element;
|
|
39
|
+
export declare function TimelineBar({ experience, snapshot, onTogglePlayback, onRateChange, paceAuto, onSeek, panels, openPanelId, onPanelOpen, onEventSeek, onEventInfo, onWindowSeek, onWindowInfo, glowLook, drawer, infoPanelId }: Props): import("react").JSX.Element;
|
|
38
40
|
interface ExpandedProps {
|
|
39
41
|
readonly experience: ExperienceConfig;
|
|
40
42
|
readonly snapshot: ClockSnapshot;
|
|
41
43
|
readonly onEventSeek: (event: TimelineEvent) => void;
|
|
42
44
|
readonly onEventInfo: (event: TimelineEvent) => void;
|
|
43
45
|
readonly onWindowInfo: (window: TimelineWindow) => void;
|
|
46
|
+
readonly infoPanelId: string;
|
|
44
47
|
}
|
|
45
48
|
/**
|
|
46
49
|
* The timeline's expanded content: "Just happened / Up next / Inside" and the full event list.
|
|
47
50
|
* On larger screens it opens from the Events button; the phone drawer shows the same content when expanded.
|
|
48
51
|
*/
|
|
49
|
-
export declare function TimelineExpanded({ experience, snapshot, onEventSeek, onEventInfo, onWindowInfo }: ExpandedProps): import("react").JSX.Element;
|
|
52
|
+
export declare function TimelineExpanded({ experience, snapshot, onEventSeek, onEventInfo, onWindowInfo, infoPanelId }: ExpandedProps): import("react").JSX.Element;
|
|
50
53
|
export {};
|
package/src/shell/TimelineBar.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useMemo, useRef, useState } from "react";
|
|
2
|
+
import { useEffect, useId, useMemo, useRef, useState } from "react";
|
|
3
3
|
import { eventContextAt, formatUtcTimestamp, formatWindowRate, navigationStops, windowContextAt, timePositionPercent, speedsOf, TIMELINE_STEP_MS, clampToBounds, formatRateCompact, formatRate, groupMarkers } from "./timelineModel.js";
|
|
4
4
|
import { activityAt, DEFAULT_TIMELINE_GLOW, glowDescription, glowGradient, glowProfile, glowTooltip } from "./timelineGlow.js";
|
|
5
5
|
import { Label } from "./Label.js";
|
|
@@ -19,7 +19,8 @@ function seekValueText(timeUtcMs, activityNow) {
|
|
|
19
19
|
return formatUtcTimestamp(timeUtcMs);
|
|
20
20
|
return `${formatUtcTimestamp(timeUtcMs)}, ${activityNow.window.label}: ${formatWindowRate(activityNow.rate, activityNow.window.rate.unit)}`;
|
|
21
21
|
}
|
|
22
|
-
export function TimelineBar({ experience, snapshot, onTogglePlayback, onRateChange, paceAuto, onSeek, panels = [], openPanelId = null, onPanelOpen, onEventSeek, onEventInfo, onWindowSeek, onWindowInfo, glowLook = DEFAULT_TIMELINE_GLOW, drawer }) {
|
|
22
|
+
export function TimelineBar({ experience, snapshot, onTogglePlayback, onRateChange, paceAuto, onSeek, panels = [], openPanelId = null, onPanelOpen, onEventSeek, onEventInfo, onWindowSeek, onWindowInfo, glowLook = DEFAULT_TIMELINE_GLOW, drawer, infoPanelId }) {
|
|
23
|
+
const drawerId = `${useId()}-timeline-drawer`;
|
|
23
24
|
const windows = experience.windows ?? [];
|
|
24
25
|
const profile = useMemo(() => glowProfile(windows, experience.window), [windows, experience.window]);
|
|
25
26
|
const gradients = useMemo(() => ({ ahead: glowGradient(profile, glowLook, "ahead"), played: glowGradient(profile, glowLook, "played") }), [profile, glowLook]);
|
|
@@ -86,11 +87,11 @@ export function TimelineBar({ experience, snapshot, onTogglePlayback, onRateChan
|
|
|
86
87
|
? renderMarker(group.members[0], group.positionPercent)
|
|
87
88
|
: (_jsxs("div", { className: "timeline-marker-group", "data-align": group.positionPercent < 25 ? "start" : group.positionPercent > 75 ? "end" : "middle", style: { left: `${group.positionPercent}%` }, onKeyDown: (event) => { if (event.key === "Escape")
|
|
88
89
|
setOpenGroup(null); }, children: [_jsx("button", { type: "button", className: "timeline-marker timeline-group-toggle", "aria-expanded": openGroup === group.members[0].key, "aria-label": `${group.members.length} markers close together: show list`, title: `${group.members.length} markers`, onClick: () => setOpenGroup((open) => (open === group.members[0].key ? null : group.members[0].key)), children: _jsx("span", { className: "timeline-group-count", children: group.members.length }) }), openGroup === group.members[0].key && (_jsx("ul", { className: "timeline-group-list", "aria-label": "Markers close together", children: group.members.map((member) => (_jsx("li", { children: _jsx("button", { type: "button", className: "timeline-group-item", "aria-label": member.ariaLabel, "data-time-utc-ms": member.timeUtcMs, "data-panel-id": member.kind === "panel" ? member.key : undefined, onClick: () => { member.activate(); setOpenGroup(null); }, children: member.text }) }, member.key))) }))] }, `group-${group.members[0].key}`))) }), _jsx("input", { type: "range", "aria-label": "Seek timeline", "aria-valuetext": valueText, min: experience.window.startUtcMs, max: experience.window.endUtcMs, step: TIMELINE_STEP_MS, value: clampToBounds(snapshot.timeUtcMs, experience.window), onChange: (event) => onSeek(Number(event.target.value)) })] }), _jsxs("div", { className: "timeline-bounds", "aria-hidden": "true", children: [_jsx("time", { dateTime: formatUtcTimestamp(experience.window.startUtcMs), children: formatUtcTimestamp(experience.window.startUtcMs).slice(0, 10) }), _jsx("time", { dateTime: formatUtcTimestamp(experience.window.endUtcMs), children: formatUtcTimestamp(experience.window.endUtcMs).slice(0, 10) })] })] }));
|
|
89
|
-
return (_jsxs("section", { className: "timeline-bar", "aria-label": "Timeline controls", "data-drawer-open": drawer?.open, children: [drawer !== undefined && (_jsx("button", { type: "button", className: "drawer-handle drawer-handle-top ui-bare", "aria-label": "Timeline drawer", "aria-expanded": drawer.open, "aria-controls":
|
|
90
|
+
return (_jsxs("section", { className: "timeline-bar", "aria-label": "Timeline controls", "data-drawer-open": drawer?.open, children: [drawer !== undefined && (_jsx("button", { type: "button", className: "drawer-handle drawer-handle-top ui-bare", "aria-label": "Timeline drawer", "aria-expanded": drawer.open, "aria-controls": drawerId, ...handle, children: _jsx("span", {}) })), _jsxs("div", { className: "timeline-main-row", children: [_jsxs("div", { className: "timeline-transport", children: [_jsx("button", { type: "button", className: "timeline-play ui-icon ui-accent", title: snapshot.playing ? "Pause" : "Play", onClick: onTogglePlayback, "aria-label": snapshot.playing ? "Pause playback" : "Play playback", children: snapshot.playing ? _jsx(Symbol, { path: "M7 5h3.5v14H7zM13.5 5H17v14h-3.5z" }) : _jsx(Symbol, { path: "M7 5v14l12-7z" }) }), _jsx("button", { type: "button", className: "timeline-previous ui-icon ui-ghost", "aria-label": stopLabel("Previous", navigation.previous), title: stopLabel("Previous", navigation.previous), disabled: navigation.previous === null, onClick: () => { if (navigation.previous !== null)
|
|
90
91
|
goToStop(navigation.previous); }, children: _jsx(Symbol, { path: "M6 5h2v14H6zM19 5v14L9 12z" }) }), _jsx("button", { type: "button", className: "timeline-next ui-icon ui-ghost", "aria-label": stopLabel("Next", navigation.next), title: stopLabel("Next", navigation.next), disabled: navigation.next === null, onClick: () => { if (navigation.next !== null)
|
|
91
|
-
goToStop(navigation.next); }, children: _jsx(Symbol, { path: "M16 5h2v14h-2zM5 5v14l10-7z" }) })] }), _jsxs("time", { className: "timeline-time", dateTime: timestamp, "aria-label": timestamp, children: [_jsx("span", { className: "timeline-time-full", children: timestamp }), _jsx("span", { className: "timeline-time-short", "aria-hidden": "true", children: timestamp.slice(0, 16).replace("T", " ") })] }), _jsx(SpeedMenu, { speeds: speeds, rate: snapshot.rate, paceAuto: paceAuto, compact: drawer !== undefined, onRateChange: onRateChange }), scrubber, drawer === undefined && (_jsxs("details", { className: "timeline-event-list", children: [_jsxs("summary", { className: "ui-button", title: "Events: what just happened, what is next, and the full list", children: ["Events ", _jsxs("span", { children: ["(", experience.events.length, ")"] })] }), _jsx(TimelineExpanded, { experience: experience, snapshot: snapshot, onEventSeek: onEventSeek, onEventInfo: onEventInfo, onWindowInfo: onWindowInfo })] }))] }), drawer !== undefined && (_jsx("div", { id:
|
|
92
|
+
goToStop(navigation.next); }, children: _jsx(Symbol, { path: "M16 5h2v14h-2zM5 5v14l10-7z" }) })] }), _jsxs("time", { className: "timeline-time", dateTime: timestamp, "aria-label": timestamp, children: [_jsx("span", { className: "timeline-time-full", children: timestamp }), _jsx("span", { className: "timeline-time-short", "aria-hidden": "true", children: timestamp.slice(0, 16).replace("T", " ") })] }), _jsx(SpeedMenu, { speeds: speeds, rate: snapshot.rate, paceAuto: paceAuto, compact: drawer !== undefined, onRateChange: onRateChange }), scrubber, drawer === undefined && (_jsxs("details", { className: "timeline-event-list", children: [_jsxs("summary", { className: "ui-button", title: "Events: what just happened, what is next, and the full list", children: ["Events ", _jsxs("span", { children: ["(", experience.events.length, ")"] })] }), _jsx(TimelineExpanded, { experience: experience, snapshot: snapshot, onEventSeek: onEventSeek, onEventInfo: onEventInfo, onWindowInfo: onWindowInfo, infoPanelId: infoPanelId })] }))] }), drawer !== undefined && (_jsx("div", { id: drawerId, className: "timeline-drawer", role: "region", "aria-label": "Timeline details", "data-open": drawer.open, onClick: (event) => { const closer = event.target.closest("[data-closes-drawer]"); if (closer !== null && closer.tagName !== "SELECT")
|
|
92
93
|
drawer.onOpenChange(false); }, children: _jsxs("div", { className: "timeline-drawer-body", children: [_jsxs("div", { className: "timeline-speed-slider", children: [_jsx("span", { "aria-hidden": "true", children: "Playback speed" }), _jsx("input", { type: "range", "aria-label": "Speed slider", "aria-valuetext": speedText, min: 0, max: speeds.length - 1, step: 1, value: speedIndex, onChange: (event) => { const next = speeds[Number(event.target.value)]; if (next !== undefined)
|
|
93
|
-
onRateChange(next.rate); } }), _jsx("output", { children: speedText })] }), _jsx(TimelineExpanded, { experience: experience, snapshot: snapshot, onEventSeek: onEventSeek, onEventInfo: onEventInfo, onWindowInfo: onWindowInfo })] }) }))] }));
|
|
94
|
+
onRateChange(next.rate); } }), _jsx("output", { children: speedText })] }), _jsx(TimelineExpanded, { experience: experience, snapshot: snapshot, onEventSeek: onEventSeek, onEventInfo: onEventInfo, onWindowInfo: onWindowInfo, infoPanelId: infoPanelId })] }) }))] }));
|
|
94
95
|
}
|
|
95
96
|
/** A 24x24 filled symbol; the button around it carries the accessible name and tooltip. */
|
|
96
97
|
function Symbol({ path }) {
|
|
@@ -100,11 +101,11 @@ function Symbol({ path }) {
|
|
|
100
101
|
* The timeline's expanded content: "Just happened / Up next / Inside" and the full event list.
|
|
101
102
|
* On larger screens it opens from the Events button; the phone drawer shows the same content when expanded.
|
|
102
103
|
*/
|
|
103
|
-
export function TimelineExpanded({ experience, snapshot, onEventSeek, onEventInfo, onWindowInfo }) {
|
|
104
|
+
export function TimelineExpanded({ experience, snapshot, onEventSeek, onEventInfo, onWindowInfo, infoPanelId }) {
|
|
104
105
|
const context = eventContextAt(experience.events, snapshot.timeUtcMs);
|
|
105
106
|
const inside = windowContextAt(experience.windows ?? [], snapshot.timeUtcMs);
|
|
106
107
|
return (_jsxs("div", { className: "timeline-expanded", children: [_jsxs("div", { className: "timeline-event-context", "aria-label": "Event context", children: [context.current === null
|
|
107
108
|
? _jsxs("span", { children: [_jsx("strong", { children: "Just happened:" }), " No event yet"] })
|
|
108
|
-
: (_jsxs("button", { type: "button", className: "timeline-event-current ui-row", "data-closes-drawer": "", "aria-label": `Information about ${context.current.label}`, "aria-controls":
|
|
109
|
-
onEventInfo(context.current); }, children: [_jsx("strong", { children: "Just happened:" }), " ", context.current.label, " ", _jsx("span", { "aria-hidden": "true", children: "\u24D8" })] })), _jsxs("span", { children: [_jsx("strong", { children: "Up next:" }), " ", context.next?.label ?? "No upcoming event"] }), inside.map(({ window, rate }) => (_jsxs("button", { type: "button", className: "timeline-event-current timeline-window-current ui-row", "data-closes-drawer": "", "aria-label": `Information about ${window.label}`, "aria-controls":
|
|
109
|
+
: (_jsxs("button", { type: "button", className: "timeline-event-current ui-row", "data-closes-drawer": "", "aria-label": `Information about ${context.current.label}`, "aria-controls": infoPanelId, onClick: () => { if (context.current !== null)
|
|
110
|
+
onEventInfo(context.current); }, children: [_jsx("strong", { children: "Just happened:" }), " ", context.current.label, " ", _jsx("span", { "aria-hidden": "true", children: "\u24D8" })] })), _jsxs("span", { children: [_jsx("strong", { children: "Up next:" }), " ", context.next?.label ?? "No upcoming event"] }), inside.map(({ window, rate }) => (_jsxs("button", { type: "button", className: "timeline-event-current timeline-window-current ui-row", "data-closes-drawer": "", "aria-label": `Information about ${window.label}`, "aria-controls": infoPanelId, onClick: () => onWindowInfo(window), children: [_jsx("strong", { children: "Inside:" }), " ", window.label, rate !== null && window.rate !== undefined && _jsxs(_Fragment, { children: [" \u2014 ", formatWindowRate(rate, window.rate.unit)] }), " ", _jsx("span", { "aria-hidden": "true", children: "\u24D8" })] }, window.id)))] }), _jsx("ol", { children: experience.events.map((event) => (_jsx("li", { children: _jsxs("button", { type: "button", className: "ui-row", "data-closes-drawer": "", "aria-current": context.current?.id === event.id ? "time" : undefined, onClick: () => { onEventSeek(event); onEventInfo(event); }, children: [_jsx("time", { dateTime: formatUtcTimestamp(event.timeUtcMs), children: formatUtcTimestamp(event.timeUtcMs) }), _jsx("span", { children: event.label })] }) }, event.id))) })] }));
|
|
110
111
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useMemo, useRef, useState } from "react";
|
|
2
|
+
import { useEffect, useId, useMemo, useRef, useState } from "react";
|
|
3
3
|
import { eventContextAt, formatUtcTimestamp, formatWindowRate, navigationStops, windowContextAt, timePositionPercent, speedsOf, TIMELINE_STEP_MS, clampToBounds, formatRateCompact, formatRate, groupMarkers } from "./timelineModel.js";
|
|
4
4
|
import { activityAt, DEFAULT_TIMELINE_GLOW, glowDescription, glowGradient, glowProfile, glowTooltip } from "./timelineGlow.js";
|
|
5
5
|
import { Label } from "./Label.js";
|
|
@@ -18,7 +18,8 @@ function seekValueText(timeUtcMs, activityNow) {
|
|
|
18
18
|
return formatUtcTimestamp(timeUtcMs);
|
|
19
19
|
return `${formatUtcTimestamp(timeUtcMs)}, ${activityNow.window.label}: ${formatWindowRate(activityNow.rate, activityNow.window.rate.unit)}`;
|
|
20
20
|
}
|
|
21
|
-
export function TimelineBar({ experience, snapshot, onTogglePlayback, onRateChange, paceAuto, onSeek, panels = [], openPanelId = null, onPanelOpen, onEventSeek, onEventInfo, onWindowSeek, onWindowInfo, glowLook = DEFAULT_TIMELINE_GLOW, drawer }) {
|
|
21
|
+
export function TimelineBar({ experience, snapshot, onTogglePlayback, onRateChange, paceAuto, onSeek, panels = [], openPanelId = null, onPanelOpen, onEventSeek, onEventInfo, onWindowSeek, onWindowInfo, glowLook = DEFAULT_TIMELINE_GLOW, drawer, infoPanelId }) {
|
|
22
|
+
const drawerId = `${useId()}-timeline-drawer`;
|
|
22
23
|
const windows = experience.windows ?? [];
|
|
23
24
|
const profile = useMemo(() => glowProfile(windows, experience.window), [windows, experience.window]);
|
|
24
25
|
const gradients = useMemo(() => ({ ahead: glowGradient(profile, glowLook, "ahead"), played: glowGradient(profile, glowLook, "played") }), [profile, glowLook]);
|
|
@@ -85,11 +86,11 @@ export function TimelineBar({ experience, snapshot, onTogglePlayback, onRateChan
|
|
|
85
86
|
? renderMarker(group.members[0], group.positionPercent)
|
|
86
87
|
: (_jsxs("div", { className: "timeline-marker-group", "data-align": group.positionPercent < 25 ? "start" : group.positionPercent > 75 ? "end" : "middle", style: { left: `${group.positionPercent}%` }, onKeyDown: (event) => { if (event.key === "Escape")
|
|
87
88
|
setOpenGroup(null); }, children: [_jsx("button", { type: "button", className: "timeline-marker timeline-group-toggle", "aria-expanded": openGroup === group.members[0].key, "aria-label": `${group.members.length} markers close together: show list`, title: `${group.members.length} markers`, onClick: () => setOpenGroup((open) => (open === group.members[0].key ? null : group.members[0].key)), children: _jsx("span", { className: "timeline-group-count", children: group.members.length }) }), openGroup === group.members[0].key && (_jsx("ul", { className: "timeline-group-list", "aria-label": "Markers close together", children: group.members.map((member) => (_jsx("li", { children: _jsx("button", { type: "button", className: "timeline-group-item", "aria-label": member.ariaLabel, "data-time-utc-ms": member.timeUtcMs, "data-panel-id": member.kind === "panel" ? member.key : undefined, onClick: () => { member.activate(); setOpenGroup(null); }, children: member.text }) }, member.key))) }))] }, `group-${group.members[0].key}`))) }), _jsx("input", { type: "range", "aria-label": "Seek timeline", "aria-valuetext": valueText, min: experience.window.startUtcMs, max: experience.window.endUtcMs, step: TIMELINE_STEP_MS, value: clampToBounds(snapshot.timeUtcMs, experience.window), onChange: (event) => onSeek(Number(event.target.value)) })] }), _jsxs("div", { className: "timeline-bounds", "aria-hidden": "true", children: [_jsx("time", { dateTime: formatUtcTimestamp(experience.window.startUtcMs), children: formatUtcTimestamp(experience.window.startUtcMs).slice(0, 10) }), _jsx("time", { dateTime: formatUtcTimestamp(experience.window.endUtcMs), children: formatUtcTimestamp(experience.window.endUtcMs).slice(0, 10) })] })] }));
|
|
88
|
-
return (_jsxs("section", { className: "timeline-bar", "aria-label": "Timeline controls", "data-drawer-open": drawer?.open, children: [drawer !== undefined && (_jsx("button", { type: "button", className: "drawer-handle drawer-handle-top ui-bare", "aria-label": "Timeline drawer", "aria-expanded": drawer.open, "aria-controls":
|
|
89
|
+
return (_jsxs("section", { className: "timeline-bar", "aria-label": "Timeline controls", "data-drawer-open": drawer?.open, children: [drawer !== undefined && (_jsx("button", { type: "button", className: "drawer-handle drawer-handle-top ui-bare", "aria-label": "Timeline drawer", "aria-expanded": drawer.open, "aria-controls": drawerId, ...handle, children: _jsx("span", {}) })), _jsxs("div", { className: "timeline-main-row", children: [_jsxs("div", { className: "timeline-transport", children: [_jsx("button", { type: "button", className: "timeline-play ui-icon ui-accent", title: snapshot.playing ? "Pause" : "Play", onClick: onTogglePlayback, "aria-label": snapshot.playing ? "Pause playback" : "Play playback", children: snapshot.playing ? _jsx(Symbol, { path: "M7 5h3.5v14H7zM13.5 5H17v14h-3.5z" }) : _jsx(Symbol, { path: "M7 5v14l12-7z" }) }), _jsx("button", { type: "button", className: "timeline-previous ui-icon ui-ghost", "aria-label": stopLabel("Previous", navigation.previous), title: stopLabel("Previous", navigation.previous), disabled: navigation.previous === null, onClick: () => { if (navigation.previous !== null)
|
|
89
90
|
goToStop(navigation.previous); }, children: _jsx(Symbol, { path: "M6 5h2v14H6zM19 5v14L9 12z" }) }), _jsx("button", { type: "button", className: "timeline-next ui-icon ui-ghost", "aria-label": stopLabel("Next", navigation.next), title: stopLabel("Next", navigation.next), disabled: navigation.next === null, onClick: () => { if (navigation.next !== null)
|
|
90
|
-
goToStop(navigation.next); }, children: _jsx(Symbol, { path: "M16 5h2v14h-2zM5 5v14l10-7z" }) })] }), _jsxs("time", { className: "timeline-time", dateTime: timestamp, "aria-label": timestamp, children: [_jsx("span", { className: "timeline-time-full", children: timestamp }), _jsx("span", { className: "timeline-time-short", "aria-hidden": "true", children: timestamp.slice(0, 16).replace("T", " ") })] }), _jsx(SpeedMenu, { speeds: speeds, rate: snapshot.rate, paceAuto: paceAuto, compact: drawer !== undefined, onRateChange: onRateChange }), scrubber, drawer === undefined && (_jsxs("details", { className: "timeline-event-list", children: [_jsxs("summary", { className: "ui-button", title: "Events: what just happened, what is next, and the full list", children: ["Events ", _jsxs("span", { children: ["(", experience.events.length, ")"] })] }), _jsx(TimelineExpanded, { experience: experience, snapshot: snapshot, onEventSeek: onEventSeek, onEventInfo: onEventInfo, onWindowInfo: onWindowInfo })] }))] }), drawer !== undefined && (_jsx("div", { id:
|
|
91
|
+
goToStop(navigation.next); }, children: _jsx(Symbol, { path: "M16 5h2v14h-2zM5 5v14l10-7z" }) })] }), _jsxs("time", { className: "timeline-time", dateTime: timestamp, "aria-label": timestamp, children: [_jsx("span", { className: "timeline-time-full", children: timestamp }), _jsx("span", { className: "timeline-time-short", "aria-hidden": "true", children: timestamp.slice(0, 16).replace("T", " ") })] }), _jsx(SpeedMenu, { speeds: speeds, rate: snapshot.rate, paceAuto: paceAuto, compact: drawer !== undefined, onRateChange: onRateChange }), scrubber, drawer === undefined && (_jsxs("details", { className: "timeline-event-list", children: [_jsxs("summary", { className: "ui-button", title: "Events: what just happened, what is next, and the full list", children: ["Events ", _jsxs("span", { children: ["(", experience.events.length, ")"] })] }), _jsx(TimelineExpanded, { experience: experience, snapshot: snapshot, onEventSeek: onEventSeek, onEventInfo: onEventInfo, onWindowInfo: onWindowInfo, infoPanelId: infoPanelId })] }))] }), drawer !== undefined && (_jsx("div", { id: drawerId, className: "timeline-drawer", role: "region", "aria-label": "Timeline details", "data-open": drawer.open, onClick: (event) => { const closer = event.target.closest("[data-closes-drawer]"); if (closer !== null && closer.tagName !== "SELECT")
|
|
91
92
|
drawer.onOpenChange(false); }, children: _jsxs("div", { className: "timeline-drawer-body", children: [_jsxs("div", { className: "timeline-speed-slider", children: [_jsx("span", { "aria-hidden": "true", children: "Playback speed" }), _jsx("input", { type: "range", "aria-label": "Speed slider", "aria-valuetext": speedText, min: 0, max: speeds.length - 1, step: 1, value: speedIndex, onChange: (event) => { const next = speeds[Number(event.target.value)]; if (next !== undefined)
|
|
92
|
-
onRateChange(next.rate); } }), _jsx("output", { children: speedText })] }), _jsx(TimelineExpanded, { experience: experience, snapshot: snapshot, onEventSeek: onEventSeek, onEventInfo: onEventInfo, onWindowInfo: onWindowInfo })] }) }))] }));
|
|
93
|
+
onRateChange(next.rate); } }), _jsx("output", { children: speedText })] }), _jsx(TimelineExpanded, { experience: experience, snapshot: snapshot, onEventSeek: onEventSeek, onEventInfo: onEventInfo, onWindowInfo: onWindowInfo, infoPanelId: infoPanelId })] }) }))] }));
|
|
93
94
|
}
|
|
94
95
|
/** A 24x24 filled symbol; the button around it carries the accessible name and tooltip. */
|
|
95
96
|
function Symbol({ path }) {
|
|
@@ -99,11 +100,11 @@ function Symbol({ path }) {
|
|
|
99
100
|
* The timeline's expanded content: "Just happened / Up next / Inside" and the full event list.
|
|
100
101
|
* On larger screens it opens from the Events button; the phone drawer shows the same content when expanded.
|
|
101
102
|
*/
|
|
102
|
-
export function TimelineExpanded({ experience, snapshot, onEventSeek, onEventInfo, onWindowInfo }) {
|
|
103
|
+
export function TimelineExpanded({ experience, snapshot, onEventSeek, onEventInfo, onWindowInfo, infoPanelId }) {
|
|
103
104
|
const context = eventContextAt(experience.events, snapshot.timeUtcMs);
|
|
104
105
|
const inside = windowContextAt(experience.windows ?? [], snapshot.timeUtcMs);
|
|
105
106
|
return (_jsxs("div", { className: "timeline-expanded", children: [_jsxs("div", { className: "timeline-event-context", "aria-label": "Event context", children: [context.current === null
|
|
106
107
|
? _jsxs("span", { children: [_jsx("strong", { children: "Just happened:" }), " No event yet"] })
|
|
107
|
-
: (_jsxs("button", { type: "button", className: "timeline-event-current ui-row", "data-closes-drawer": "", "aria-label": `Information about ${context.current.label}`, "aria-controls":
|
|
108
|
-
onEventInfo(context.current); }, children: [_jsx("strong", { children: "Just happened:" }), " ", context.current.label, " ", _jsx("span", { "aria-hidden": "true", children: "\u24D8" })] })), _jsxs("span", { children: [_jsx("strong", { children: "Up next:" }), " ", context.next?.label ?? "No upcoming event"] }), inside.map(({ window, rate }) => (_jsxs("button", { type: "button", className: "timeline-event-current timeline-window-current ui-row", "data-closes-drawer": "", "aria-label": `Information about ${window.label}`, "aria-controls":
|
|
108
|
+
: (_jsxs("button", { type: "button", className: "timeline-event-current ui-row", "data-closes-drawer": "", "aria-label": `Information about ${context.current.label}`, "aria-controls": infoPanelId, onClick: () => { if (context.current !== null)
|
|
109
|
+
onEventInfo(context.current); }, children: [_jsx("strong", { children: "Just happened:" }), " ", context.current.label, " ", _jsx("span", { "aria-hidden": "true", children: "\u24D8" })] })), _jsxs("span", { children: [_jsx("strong", { children: "Up next:" }), " ", context.next?.label ?? "No upcoming event"] }), inside.map(({ window, rate }) => (_jsxs("button", { type: "button", className: "timeline-event-current timeline-window-current ui-row", "data-closes-drawer": "", "aria-label": `Information about ${window.label}`, "aria-controls": infoPanelId, onClick: () => onWindowInfo(window), children: [_jsx("strong", { children: "Inside:" }), " ", window.label, rate !== null && window.rate !== undefined && _jsxs(_Fragment, { children: [" \u2014 ", formatWindowRate(rate, window.rate.unit)] }), " ", _jsx("span", { "aria-hidden": "true", children: "\u24D8" })] }, window.id)))] }), _jsx("ol", { children: experience.events.map((event) => (_jsx("li", { children: _jsxs("button", { type: "button", className: "ui-row", "data-closes-drawer": "", "aria-current": context.current?.id === event.id ? "time" : undefined, onClick: () => { onEventSeek(event); onEventInfo(event); }, children: [_jsx("time", { dateTime: formatUtcTimestamp(event.timeUtcMs), children: formatUtcTimestamp(event.timeUtcMs) }), _jsx("span", { children: event.label })] }) }, event.id))) })] }));
|
|
109
110
|
}
|
package/src/shell/TopBar.css
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* The top bar: one compact row of icon buttons at the top left, and the Developer cog on its own at the top right. */
|
|
2
2
|
|
|
3
|
-
.shell-toolbar { position: relative; z-index: 1; max-width: 100%; }
|
|
3
|
+
.astraeus-shell .shell-toolbar { position: relative; z-index: 1; max-width: 100%; }
|
|
4
4
|
|
|
5
|
-
.top-bar {
|
|
5
|
+
.astraeus-shell .top-bar {
|
|
6
6
|
display: flex;
|
|
7
7
|
align-items: center;
|
|
8
8
|
gap: 6px;
|
|
@@ -13,19 +13,19 @@
|
|
|
13
13
|
box-shadow: 0 8px 24px rgba(0, 0, 0, .24);
|
|
14
14
|
backdrop-filter: blur(8px);
|
|
15
15
|
}
|
|
16
|
-
.top-bar .object-controls,
|
|
17
|
-
.top-bar .scale-control,
|
|
18
|
-
.top-bar .switch-control { display: contents; }
|
|
19
|
-
.object-camera-actions { display: flex; align-items: center; gap: 6px; }
|
|
20
|
-
.top-bar-divider { flex: 0 0 auto; width: 1px; height: 22px; margin: 0 4px; background: var(--ui-border, rgba(240, 230, 218, .18)); }
|
|
16
|
+
.astraeus-shell .top-bar .object-controls,
|
|
17
|
+
.astraeus-shell .top-bar .scale-control,
|
|
18
|
+
.astraeus-shell .top-bar .switch-control { display: contents; }
|
|
19
|
+
.astraeus-shell .object-camera-actions { display: flex; align-items: center; gap: 6px; }
|
|
20
|
+
.astraeus-shell .top-bar-divider { flex: 0 0 auto; width: 1px; height: 22px; margin: 0 4px; background: var(--ui-border, rgba(240, 230, 218, .18)); }
|
|
21
21
|
|
|
22
22
|
.astraeus-shell .object-picker { min-width: 0; max-width: 220px; }
|
|
23
|
-
.top-bar-button-text { display: none; }
|
|
23
|
+
.astraeus-shell .top-bar-button-text { display: none; }
|
|
24
24
|
|
|
25
|
-
.scale-control { position: relative; }
|
|
25
|
+
.astraeus-shell .scale-control { position: relative; }
|
|
26
26
|
.astraeus-shell .scale-toggle { width: auto; white-space: nowrap; }
|
|
27
27
|
|
|
28
|
-
.scale-menu {
|
|
28
|
+
.astraeus-shell .scale-menu {
|
|
29
29
|
position: absolute;
|
|
30
30
|
z-index: 6;
|
|
31
31
|
top: calc(100% + 8px);
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
background: rgba(13, 13, 13, .97);
|
|
40
40
|
box-shadow: 0 8px 24px rgba(0, 0, 0, .42);
|
|
41
41
|
}
|
|
42
|
-
.scale-menu[hidden] { display: none !important; }
|
|
42
|
+
.astraeus-shell .scale-menu[hidden] { display: none !important; }
|
|
43
43
|
|
|
44
|
-
.top-bar .scale-explanation { display: contents; }
|
|
45
|
-
.scale-explanation-panel {
|
|
44
|
+
.astraeus-shell .top-bar .scale-explanation { display: contents; }
|
|
45
|
+
.astraeus-shell .scale-explanation-panel {
|
|
46
46
|
position: absolute;
|
|
47
47
|
z-index: 6;
|
|
48
48
|
top: calc(100% + 8px);
|
|
@@ -56,11 +56,11 @@
|
|
|
56
56
|
font-size: 13px;
|
|
57
57
|
line-height: 1.45;
|
|
58
58
|
}
|
|
59
|
-
.scale-explanation-panel[hidden] { display: none !important; }
|
|
60
|
-
.scale-explanation-panel p { margin: 0 0 8px; }
|
|
61
|
-
.scale-explanation-panel .scale-explanation-note { margin: 0; opacity: .75; }
|
|
59
|
+
.astraeus-shell .scale-explanation-panel[hidden] { display: none !important; }
|
|
60
|
+
.astraeus-shell .scale-explanation-panel p { margin: 0 0 8px; }
|
|
61
|
+
.astraeus-shell .scale-explanation-panel .scale-explanation-note { margin: 0; opacity: .75; }
|
|
62
62
|
|
|
63
|
-
.developer-mode-toggle {
|
|
63
|
+
.astraeus-shell .developer-mode-toggle {
|
|
64
64
|
position: absolute;
|
|
65
65
|
z-index: 5;
|
|
66
66
|
/* Level with the row of controls in the bar beside it (the bar's 12 px offset, its border and its padding). */
|
|
@@ -70,13 +70,13 @@
|
|
|
70
70
|
|
|
71
71
|
/* The tablet band keeps the row; its 44 px targets come from the shared control stylesheet. */
|
|
72
72
|
@media (min-width: 701px) and (max-width: 900px) {
|
|
73
|
-
.shell-toolbar { max-width: calc(100vw - 72px); }
|
|
73
|
+
.astraeus-shell .shell-toolbar { max-width: calc(100vw - 72px); }
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
/* Display switches a story placed: buttons in the bar, and one small panel opened from a Display button (same look as the scale menu). */
|
|
77
|
-
.top-bar .display-switches,
|
|
78
|
-
.top-bar .switch-panel-host { display: contents; }
|
|
79
|
-
.switch-panel {
|
|
77
|
+
.astraeus-shell .top-bar .display-switches,
|
|
78
|
+
.astraeus-shell .top-bar .switch-panel-host { display: contents; }
|
|
79
|
+
.astraeus-shell .switch-panel {
|
|
80
80
|
position: absolute;
|
|
81
81
|
z-index: 6;
|
|
82
82
|
top: calc(100% + 8px);
|
|
@@ -91,4 +91,4 @@
|
|
|
91
91
|
background: rgba(13, 13, 13, .97);
|
|
92
92
|
box-shadow: 0 8px 24px rgba(0, 0, 0, .42);
|
|
93
93
|
}
|
|
94
|
-
.switch-panel[hidden] { display: none !important; }
|
|
94
|
+
.astraeus-shell .switch-panel[hidden] { display: none !important; }
|
package/src/shell/TopBar.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ interface Props {
|
|
|
12
12
|
readonly onCameraPreset: (preset: ExperienceCameraPreset) => void;
|
|
13
13
|
readonly infoOpen: boolean;
|
|
14
14
|
readonly onToggleInfo: () => void;
|
|
15
|
+
/** The id of the information panel the Info button opens, made once per viewer by the shell. */
|
|
16
|
+
readonly infoPanelId: string;
|
|
15
17
|
readonly scaleId: ScaleId;
|
|
16
18
|
readonly onScaleChange: (id: ScaleId) => void;
|
|
17
19
|
readonly scaleChoices?: readonly ScaleChoice[];
|
|
@@ -23,11 +25,13 @@ interface Props {
|
|
|
23
25
|
readonly viewChoice?: ViewChoice;
|
|
24
26
|
}
|
|
25
27
|
interface DeveloperProps {
|
|
28
|
+
/** The id of the drawer this cog opens, made once per viewer by the shell. */
|
|
29
|
+
readonly drawerId: string;
|
|
26
30
|
readonly developerMode: boolean;
|
|
27
31
|
readonly onDeveloperModeChange: (enabled: boolean) => void;
|
|
28
32
|
}
|
|
29
33
|
/** The single compact bar: body picker, Info, camera buttons and Scale in one row. */
|
|
30
34
|
export declare function TopBar({ scaleId, onScaleChange, scaleChoices, switcher, displaySwitches, viewChoice, ...objectControls }: Props): import("react").JSX.Element;
|
|
31
35
|
/** Developer mode stays public, as a cog on its own at the top right of the shell. */
|
|
32
|
-
export declare function DeveloperToggle({ developerMode, onDeveloperModeChange }: DeveloperProps): import("react").JSX.Element;
|
|
36
|
+
export declare function DeveloperToggle({ developerMode, onDeveloperModeChange, drawerId }: DeveloperProps): import("react").JSX.Element;
|
|
33
37
|
export {};
|
package/src/shell/TopBar.js
CHANGED
|
@@ -10,6 +10,6 @@ export function TopBar({ scaleId, onScaleChange, scaleChoices, switcher, display
|
|
|
10
10
|
return (_jsx("div", { className: "shell-toolbar", children: _jsxs("div", { className: "top-bar", children: [switcher !== undefined && switcher.options.length > 1 && (_jsxs(_Fragment, { children: [_jsx(SwitchControl, { choice: switcher }), _jsx("span", { className: "top-bar-divider", "aria-hidden": "true" })] })), viewChoice !== undefined && viewChoice.place === "top-bar" && viewChoice.options.length > 1 && (_jsxs(_Fragment, { children: [_jsx(ViewButtons, { choice: viewChoice }), _jsx("span", { className: "top-bar-divider", "aria-hidden": "true" })] })), _jsx(ObjectControls, { ...objectControls }), _jsx("span", { className: "top-bar-divider", "aria-hidden": "true" }), _jsx(ScaleControl, { scaleId: scaleId, onScaleChange: onScaleChange, choices: scaleChoices }), (displaySwitches.length > 0 || viewChoiceInPanel(viewChoice)) && (_jsxs(_Fragment, { children: [_jsx("span", { className: "top-bar-divider", "aria-hidden": "true" }), _jsx(DisplaySwitches, { switches: displaySwitches, viewChoice: viewChoice })] }))] }) }));
|
|
11
11
|
}
|
|
12
12
|
/** Developer mode stays public, as a cog on its own at the top right of the shell. */
|
|
13
|
-
export function DeveloperToggle({ developerMode, onDeveloperModeChange }) {
|
|
14
|
-
return (_jsx("button", { className: "developer-mode-toggle ui-icon ui-pill", type: "button", "aria-label": "Developer mode", title: "Developer mode", "aria-pressed": developerMode, "aria-expanded": developerMode, "aria-controls":
|
|
13
|
+
export function DeveloperToggle({ developerMode, onDeveloperModeChange, drawerId }) {
|
|
14
|
+
return (_jsx("button", { className: "developer-mode-toggle ui-icon ui-pill", type: "button", "aria-label": "Developer mode", title: "Developer mode", "aria-pressed": developerMode, "aria-expanded": developerMode, "aria-controls": drawerId, onClick: () => onDeveloperModeChange(!developerMode), children: _jsx(CogIcon, {}) }));
|
|
15
15
|
}
|
package/src/shell/TopBar.node.js
CHANGED
|
@@ -9,6 +9,6 @@ export function TopBar({ scaleId, onScaleChange, scaleChoices, switcher, display
|
|
|
9
9
|
return (_jsx("div", { className: "shell-toolbar", children: _jsxs("div", { className: "top-bar", children: [switcher !== undefined && switcher.options.length > 1 && (_jsxs(_Fragment, { children: [_jsx(SwitchControl, { choice: switcher }), _jsx("span", { className: "top-bar-divider", "aria-hidden": "true" })] })), viewChoice !== undefined && viewChoice.place === "top-bar" && viewChoice.options.length > 1 && (_jsxs(_Fragment, { children: [_jsx(ViewButtons, { choice: viewChoice }), _jsx("span", { className: "top-bar-divider", "aria-hidden": "true" })] })), _jsx(ObjectControls, { ...objectControls }), _jsx("span", { className: "top-bar-divider", "aria-hidden": "true" }), _jsx(ScaleControl, { scaleId: scaleId, onScaleChange: onScaleChange, choices: scaleChoices }), (displaySwitches.length > 0 || viewChoiceInPanel(viewChoice)) && (_jsxs(_Fragment, { children: [_jsx("span", { className: "top-bar-divider", "aria-hidden": "true" }), _jsx(DisplaySwitches, { switches: displaySwitches, viewChoice: viewChoice })] }))] }) }));
|
|
10
10
|
}
|
|
11
11
|
/** Developer mode stays public, as a cog on its own at the top right of the shell. */
|
|
12
|
-
export function DeveloperToggle({ developerMode, onDeveloperModeChange }) {
|
|
13
|
-
return (_jsx("button", { className: "developer-mode-toggle ui-icon ui-pill", type: "button", "aria-label": "Developer mode", title: "Developer mode", "aria-pressed": developerMode, "aria-expanded": developerMode, "aria-controls":
|
|
12
|
+
export function DeveloperToggle({ developerMode, onDeveloperModeChange, drawerId }) {
|
|
13
|
+
return (_jsx("button", { className: "developer-mode-toggle ui-icon ui-pill", type: "button", "aria-label": "Developer mode", title: "Developer mode", "aria-pressed": developerMode, "aria-expanded": developerMode, "aria-controls": drawerId, onClick: () => onDeveloperModeChange(!developerMode), children: _jsx(CogIcon, {}) }));
|
|
14
14
|
}
|
|
@@ -3,15 +3,9 @@ export declare const BOOT_FADE_LIMITS: {
|
|
|
3
3
|
readonly min: 0;
|
|
4
4
|
readonly max: 3;
|
|
5
5
|
};
|
|
6
|
-
/** The fade time in force:
|
|
7
|
-
export declare function bootFadeSeconds(
|
|
6
|
+
/** The fade time in force: the look's `loadFadeSeconds` (the scene's, or the address's over it), else the saved setting, else the default. */
|
|
7
|
+
export declare function bootFadeSeconds(look?: {
|
|
8
|
+
readonly loadFadeSeconds?: number;
|
|
9
|
+
}): number;
|
|
8
10
|
/** Saves the fade time for the next load. */
|
|
9
11
|
export declare function saveBootFadeSeconds(seconds: number): void;
|
|
10
|
-
/** The cover's current showing; a scene notes it when it mounts and hands it to `hideBootLoader`. */
|
|
11
|
-
export declare function bootShowing(): number;
|
|
12
|
-
/** Brings the loading cover back (a switch inside the page); a no-op when the page never had one. Hidden again by `hideBootLoader` on the next scene's first frame. */
|
|
13
|
-
export declare function showBootLoader(): void;
|
|
14
|
-
/** Fades the loader out and removes it. Safe to call more than once. A scene passes the showing it mounted under; a later showing is not its to hide. */
|
|
15
|
-
export declare function hideBootLoader(showing?: number): void;
|
|
16
|
-
/** Replaces the loader's animation with its failure message. */
|
|
17
|
-
export declare function failBootLoader(): void;
|