@hyperframes/studio 0.8.51 → 0.8.53-desktop.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/dist/assets/{hyperframes-player-Cn_PpHqP.js → hyperframes-player-PTEnAHhg.js} +1 -1
- package/dist/assets/{index-CPS3Cvj8.js → index--myXp8ui.js} +1 -1
- package/dist/assets/{index-Clrb11lj.js → index-BjslOS9g.js} +1 -1
- package/dist/assets/index-BnXZuIJD.css +1 -0
- package/dist/assets/index-CNyviK_l.js +390 -0
- package/dist/index.css +29 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +808 -12
- package/dist/index.html +2 -2
- package/dist/index.js +8109 -7583
- package/dist/index.js.map +1 -1
- package/package.json +9 -7
- package/src/App.tsx +45 -50
- package/src/captions/components/CaptionOverlay.sender.test.tsx +52 -0
- package/src/captions/components/CaptionOverlay.tsx +8 -4
- package/src/components/EditorShell.selectionSync.test.tsx +9 -4
- package/src/components/EditorShell.tsx +56 -56
- package/src/components/RightPanelTabs.test.tsx +151 -0
- package/src/components/RightPanelTabs.tsx +59 -0
- package/src/components/StudioHeader.dom.test.tsx +181 -0
- package/src/components/StudioHeader.test.ts +0 -12
- package/src/components/StudioHeader.tsx +117 -160
- package/src/components/StudioLeftPanels.tsx +202 -0
- package/src/components/{StudioRightPanel.tsx → StudioRightPanels.tsx} +57 -194
- package/src/components/{StudioRightPanel.types.ts → StudioRightPanels.types.ts} +4 -3
- package/src/components/TimelineHistoryButtons.dom.test.tsx +117 -0
- package/src/components/TimelineHistoryButtons.tsx +54 -0
- package/src/components/TimelineToolbar.test.tsx +8 -0
- package/src/components/TimelineToolbar.tsx +3 -7
- package/src/components/dock/Dock.test.tsx +100 -18
- package/src/components/dock/Dock.tsx +32 -5
- package/src/components/dock/dock.css +5 -0
- package/src/components/dock/dockAccessibility.test.ts +166 -0
- package/src/components/dock/dockAccessibility.ts +98 -0
- package/src/components/dock/dockLayout.test.ts +134 -0
- package/src/components/dock/dockLayout.ts +53 -6
- package/src/components/dock/dockLayoutStore.test.ts +28 -0
- package/src/components/dock/dockLayoutStore.ts +21 -4
- package/src/components/dock/dockTestHarness.ts +11 -0
- package/src/components/editor/LayersPanel.test.ts +97 -1
- package/src/components/editor/LayersPanel.tsx +4 -2
- package/src/components/editor/PreviewGuides.tsx +1 -1
- package/src/components/editor/SnapToolbar.test.tsx +0 -3
- package/src/components/editor/TopologyLens.test.tsx +28 -0
- package/src/components/editor/TopologyLens.tsx +3 -1
- package/src/components/editor/useColorGradingController.test.ts +38 -0
- package/src/components/editor/useColorGradingController.ts +9 -1
- package/src/components/editor/useColorGradingPreviews.test.ts +76 -0
- package/src/components/editor/useColorGradingPreviews.ts +11 -1
- package/src/components/editor/usePreviewCompositionRect.test.tsx +95 -0
- package/src/components/editor/usePreviewCompositionRect.ts +21 -0
- package/src/components/nle/NLEContext.tsx +0 -43
- package/src/components/nle/NLEPreview.tsx +1 -1
- package/src/components/nle/PreviewPane.tsx +1 -1
- package/src/components/nle/TimelinePane.tsx +53 -67
- package/src/components/panels/SlideshowPanel.tsx +1 -1
- package/src/components/panels/VariablesPanel.tsx +1 -1
- package/src/components/pointerTargetSize.test.tsx +8 -0
- package/src/components/renders/RenderQueue.tsx +1 -1
- package/src/components/renders/RenderQueuePanel.tsx +1 -1
- package/src/components/sidebar/{LeftSidebar.masterComposition.test.tsx → CompositionsPanel.masterComposition.test.tsx} +6 -9
- package/src/components/sidebar/CompositionsPanel.tsx +15 -0
- package/src/components/sidebar/{LeftSidebar.lintBadge.test.tsx → SidebarLintButton.test.tsx} +6 -11
- package/src/components/sidebar/SidebarLintButton.tsx +50 -0
- package/src/components/timelineToolbarStyles.ts +5 -0
- package/src/components/ui/Button.test.tsx +222 -30
- package/src/components/ui/Button.tsx +88 -125
- package/src/components/ui/IconButton.tsx +38 -0
- package/src/components/ui/Input.tsx +115 -0
- package/src/components/ui/Menu.test.tsx +374 -0
- package/src/components/ui/Menu.tsx +213 -0
- package/src/components/ui/NumberField.tsx +122 -0
- package/src/components/ui/Popover.tsx +74 -0
- package/src/components/ui/Select.tsx +100 -0
- package/src/components/ui/Slider.tsx +153 -0
- package/src/components/ui/Tabs.test.tsx +98 -0
- package/src/components/ui/Tabs.tsx +71 -0
- package/src/components/ui/Toggle.tsx +63 -0
- package/src/components/ui/Tooltip.test.tsx +110 -0
- package/src/components/ui/Tooltip.tsx +38 -112
- package/src/components/ui/cn.test.ts +30 -0
- package/src/components/ui/cn.ts +25 -0
- package/src/components/ui/index.ts +29 -2
- package/src/components/ui/mountHost.testHelpers.ts +24 -0
- package/src/components/ui/valueControls.test.tsx +524 -0
- package/src/contexts/PanelLayoutContext.tsx +3 -57
- package/src/hooks/appHotkeysDispatch.ts +3 -4
- package/src/hooks/timelineEditPermission.ts +31 -0
- package/src/hooks/useAppHotkeys.previewForwarding.test.tsx +0 -2
- package/src/hooks/useAppHotkeys.test.ts +0 -1
- package/src/hooks/useAppHotkeys.textEditing.test.tsx +0 -3
- package/src/hooks/useAppHotkeys.ts +20 -83
- package/src/hooks/useCaptionDetection.sender.test.tsx +46 -0
- package/src/hooks/useCaptionDetection.ts +3 -1
- package/src/hooks/useDomEditPreviewSync.ts +4 -6
- package/src/hooks/useDomEditSession.ts +0 -7
- package/src/hooks/useDomEditWiring.ts +4 -9
- package/src/hooks/useEditHistoryActions.test.tsx +90 -0
- package/src/hooks/useEditHistoryActions.ts +106 -0
- package/src/hooks/useFileManager.ts +21 -123
- package/src/hooks/usePanelLayout.test.ts +108 -296
- package/src/hooks/usePanelLayout.ts +50 -255
- package/src/hooks/usePersistentEditHistory.ts +1 -1
- package/src/hooks/useProjectFileWriter.ts +150 -0
- package/src/hooks/useRightPanelIntents.test.ts +181 -0
- package/src/hooks/useRightPanelIntents.ts +63 -0
- package/src/hooks/useServerConnection.hashProject.test.tsx +94 -0
- package/src/hooks/useServerConnection.ts +43 -10
- package/src/hooks/useSlideshowTabState.test.ts +9 -31
- package/src/hooks/useSlideshowTabState.ts +6 -19
- package/src/hooks/useStudioContextValue.test.ts +6 -18
- package/src/hooks/useStudioContextValue.ts +5 -26
- package/src/hooks/useTimelineDeleteOps.test.tsx +111 -0
- package/src/hooks/useTimelineEditing.test.tsx +322 -3
- package/src/hooks/useTimelineEditing.ts +103 -16
- package/src/hooks/useTimelineEditingTypes.ts +3 -0
- package/src/hooks/useTrackPendingTimelineEdit.test.tsx +62 -0
- package/src/hooks/useTrackPendingTimelineEdit.ts +22 -0
- package/src/hostMount.test.tsx +222 -0
- package/src/index.ts +87 -0
- package/src/player/components/AutomationSelectionMenu.tsx +1 -1
- package/src/player/components/Timeline.tsx +1 -1
- package/src/player/components/TimelineCanvas.tsx +4 -4
- package/src/player/components/TimelineClip.tsx +0 -1
- package/src/player/components/TimelineTrackHeader.test.tsx +26 -5
- package/src/player/components/TimelineTrackHeader.tsx +1 -1
- package/src/player/components/timelineTheme.test.ts +4 -4
- package/src/player/components/timelineTheme.ts +30 -30
- package/src/player/lib/playbackShortcuts.ts +2 -0
- package/src/player/lib/timelinePerformanceDiagnostics.test.ts +3 -2
- package/src/player/lib/timelinePerformanceDiagnostics.ts +1 -1
- package/src/player/store/previewIframeStore.notify.test.tsx +75 -0
- package/src/player/store/previewIframeStore.test.tsx +29 -0
- package/src/player/store/previewIframeStore.ts +25 -0
- package/src/renderQueueExports.test.tsx +58 -0
- package/src/styles/classCandidates.test.ts +105 -0
- package/src/styles/classCandidates.ts +281 -0
- package/src/styles/hex-baseline.json +84 -0
- package/src/styles/hexRatchet.test.ts +201 -0
- package/src/styles/styleSources.test.ts +20 -0
- package/src/styles/styleSources.ts +47 -0
- package/src/styles/theme.css +57 -0
- package/src/styles/theme.test.ts +2 -15
- package/src/styles/tokenGate.test.ts +109 -0
- package/src/utils/sourcePatcher.ts +1 -1
- package/src/utils/studioHelpers.test.ts +18 -0
- package/src/utils/studioHelpers.ts +11 -8
- package/src/utils/studioUiPreferences.test.ts +10 -16
- package/src/utils/studioUiPreferences.ts +0 -16
- package/src/utils/typingTarget.ts +4 -0
- package/dist/assets/index-C05SNrvY.js +0 -360
- package/dist/assets/index-DUR9qzQM.css +0 -1
- package/src/components/PanelTabButton.tsx +0 -31
- package/src/components/StudioLeftSidebar.tsx +0 -207
- package/src/components/nle/TimelineResizeDivider.tsx +0 -101
- package/src/components/sidebar/LeftSidebar.storage.test.ts +0 -28
- package/src/components/sidebar/LeftSidebar.tsx +0 -348
- package/src/hooks/useInspectorSplitResize.ts +0 -51
- package/src/utils/fitPanels.test.ts +0 -164
- package/src/utils/fitPanels.ts +0 -151
package/src/utils/fitPanels.ts
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Panel reconciliation for the Studio shell.
|
|
3
|
-
*
|
|
4
|
-
* The shell is `[sidebar | preview | inspector]` over a full-width timeline.
|
|
5
|
-
* Only the preview is flexible (`flex-1 min-w-0`), so without an explicit floor
|
|
6
|
-
* it absorbs every squeeze: at a 560px window the old 240/320 panel floors alone
|
|
7
|
-
* overflowed the viewport and the preview rendered at 2px, on a *fresh* load.
|
|
8
|
-
* The same held vertically once the window was resized after mount.
|
|
9
|
-
*
|
|
10
|
-
* Every caller (mount, resize, drag, keyboard nudge, preference restore) routes
|
|
11
|
-
* through {@link fitPanelWidths} / {@link fitTimelineHeight} so exactly one place
|
|
12
|
-
* decides who yields. The rule is: the preview gets its floor first, panels
|
|
13
|
-
* shrink toward their minimums, then collapse to rails.
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
/** Smallest preview box worth editing in. Chosen, not derived — see the plan. */
|
|
17
|
-
export const MIN_PREVIEW_W = 360;
|
|
18
|
-
export const MIN_PREVIEW_H = 200;
|
|
19
|
-
|
|
20
|
-
const MIN_LEFT = 200;
|
|
21
|
-
const MIN_RIGHT = 280;
|
|
22
|
-
/**
|
|
23
|
-
* Collapsed sidebar rail, as a layout FOOTPRINT: the `w-10` box (40) plus the
|
|
24
|
-
* `mr-0.5` gap (2) it contributes to the flex row. Measured in the browser at a
|
|
25
|
-
* 760px window: rail box 40, margin-right 2, preview starts at x=43.
|
|
26
|
-
*/
|
|
27
|
-
export const RAIL_W = 42;
|
|
28
|
-
export const MIN_TIMELINE_H = 100;
|
|
29
|
-
|
|
30
|
-
/** The two 3px resize seams between the three top-row panels. */
|
|
31
|
-
const PANEL_SEAM_W = 6;
|
|
32
|
-
|
|
33
|
-
/** No single panel may claim more than this share of the window. */
|
|
34
|
-
const PANEL_MAX_RATIO = 0.4;
|
|
35
|
-
|
|
36
|
-
/*
|
|
37
|
-
* Thresholds below are DERIVED from the minimums above, not chosen:
|
|
38
|
-
*
|
|
39
|
-
* MIN_LEFT 200 + MIN_RIGHT 280 + MIN_PREVIEW_W 360 + PANEL_SEAM_W 6 = 846
|
|
40
|
-
* -> below ~860 the sidebar can no longer fit at its minimum.
|
|
41
|
-
* RAIL_W 40 + MIN_RIGHT 280 + MIN_PREVIEW_W 360 + PANEL_SEAM_W 6 = 686
|
|
42
|
-
* -> below ~700 the inspector can no longer fit either.
|
|
43
|
-
*
|
|
44
|
-
* Change a minimum and move the matching threshold with it.
|
|
45
|
-
*/
|
|
46
|
-
const RAIL_LEFT_BELOW = 860;
|
|
47
|
-
const RAIL_RIGHT_BELOW = 700;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* True when the window is narrow enough to force at least one panel to a rail.
|
|
51
|
-
* The sidebar threshold is the wider of the two, so it is the whole condition.
|
|
52
|
-
*/
|
|
53
|
-
export function railsEngaged(viewportWidth: number): boolean {
|
|
54
|
-
return viewportWidth < RAIL_LEFT_BELOW;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface PanelWidths {
|
|
58
|
-
left: number;
|
|
59
|
-
right: number;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export interface FittedPanelWidths extends PanelWidths {
|
|
63
|
-
preview: number;
|
|
64
|
-
/**
|
|
65
|
-
* Width-driven collapse. Derived per render; NEVER persisted and never written
|
|
66
|
-
* back to the user's own collapse preference — `leftCollapsed` lives in
|
|
67
|
-
* localStorage and `rightCollapsed` is synced into the shareable Studio URL,
|
|
68
|
-
* so a ten-second window drag must not rewrite either.
|
|
69
|
-
*/
|
|
70
|
-
autoCollapseLeft: boolean;
|
|
71
|
-
autoCollapseRight: boolean;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function clamp(value: number, min: number, max: number): number {
|
|
75
|
-
return Math.max(min, Math.min(max, value));
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* The width each panel wants on a given viewport, before reconciliation.
|
|
80
|
-
* Upper bounds (384 / 424) are unchanged from the original implementation, which
|
|
81
|
-
* is what keeps windows at or above 1280px byte-identical to before.
|
|
82
|
-
*/
|
|
83
|
-
export function defaultPanelWidths(viewportWidth: number): PanelWidths {
|
|
84
|
-
return {
|
|
85
|
-
left: Math.max(MIN_LEFT, Math.min(384, Math.round(viewportWidth * 0.257))),
|
|
86
|
-
right: Math.max(MIN_RIGHT, Math.min(424, Math.round(viewportWidth * 0.284))),
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Resolve preferred panel widths against the viewport, reserving the preview.
|
|
92
|
-
*
|
|
93
|
-
* Order of yielding: window-relative cap, then the inspector shrinks toward its
|
|
94
|
-
* minimum, then the sidebar, then rails. A viewport of 0 (element not measured
|
|
95
|
-
* yet) returns the preferences untouched so a pre-measurement frame cannot
|
|
96
|
-
* clobber a real preference.
|
|
97
|
-
*/
|
|
98
|
-
// fallow-ignore-next-line complexity
|
|
99
|
-
export function fitPanelWidths(
|
|
100
|
-
viewportWidth: number,
|
|
101
|
-
preferred: PanelWidths,
|
|
102
|
-
/**
|
|
103
|
-
* Sides the user explicitly reopened while the window was narrow. A side
|
|
104
|
-
* listed here keeps its real width instead of the rail: without this the
|
|
105
|
-
* panel would render expanded at 42px and squash its own content.
|
|
106
|
-
*/
|
|
107
|
-
reopened: { left: boolean; right: boolean } = { left: false, right: false },
|
|
108
|
-
): FittedPanelWidths {
|
|
109
|
-
const vw = Number.isFinite(viewportWidth) ? Math.max(0, viewportWidth) : 0;
|
|
110
|
-
if (vw <= 0) {
|
|
111
|
-
return { ...preferred, preview: 0, autoCollapseLeft: false, autoCollapseRight: false };
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
const autoCollapseLeft = vw < RAIL_LEFT_BELOW && !reopened.left;
|
|
115
|
-
const autoCollapseRight = vw < RAIL_RIGHT_BELOW && !reopened.right;
|
|
116
|
-
const cap = Math.floor(vw * PANEL_MAX_RATIO);
|
|
117
|
-
|
|
118
|
-
// A railed panel's floor is its rail width; an open panel's floor is its
|
|
119
|
-
// minimum usable width. Without this split the squeeze fallback below would
|
|
120
|
-
// drive an *expanded* sidebar down to 40px and render its content unusable.
|
|
121
|
-
const leftFloor = autoCollapseLeft ? RAIL_W : MIN_LEFT;
|
|
122
|
-
const rightFloor = autoCollapseRight ? 0 : MIN_RIGHT;
|
|
123
|
-
|
|
124
|
-
let left = autoCollapseLeft ? RAIL_W : clamp(preferred.left, MIN_LEFT, Math.max(MIN_LEFT, cap));
|
|
125
|
-
let right = autoCollapseRight ? 0 : clamp(preferred.right, MIN_RIGHT, Math.max(MIN_RIGHT, cap));
|
|
126
|
-
|
|
127
|
-
const budget = vw - MIN_PREVIEW_W - PANEL_SEAM_W;
|
|
128
|
-
if (left + right > budget) right = Math.max(rightFloor, budget - left);
|
|
129
|
-
if (left + right > budget) left = Math.max(leftFloor, budget - right);
|
|
130
|
-
|
|
131
|
-
return {
|
|
132
|
-
left,
|
|
133
|
-
right,
|
|
134
|
-
preview: Math.max(0, vw - left - right - PANEL_SEAM_W),
|
|
135
|
-
autoCollapseLeft,
|
|
136
|
-
autoCollapseRight,
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Resolve a preferred timeline height against the shell's measured height.
|
|
142
|
-
*
|
|
143
|
-
* Subsumes the clamping that used to be inlined in TimelineResizeDivider's
|
|
144
|
-
* pointer and keyboard handlers and duplicated (mount-only) in NLEContext.
|
|
145
|
-
*/
|
|
146
|
-
export function fitTimelineHeight(containerHeight: number, preferred: number): number {
|
|
147
|
-
const h = Number.isFinite(containerHeight) ? containerHeight : 0;
|
|
148
|
-
const wanted = Number.isFinite(preferred) ? preferred : MIN_TIMELINE_H;
|
|
149
|
-
if (h <= 0) return Math.max(MIN_TIMELINE_H, wanted);
|
|
150
|
-
return clamp(wanted, MIN_TIMELINE_H, Math.max(MIN_TIMELINE_H, h - MIN_PREVIEW_H));
|
|
151
|
-
}
|