@hyperframes/studio 0.8.82 → 0.8.84
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-zGIbZhLJ.js → hyperframes-player-Dd74fv7B.js} +3 -3
- package/dist/assets/{index-DStmfnpZ.js → index-D9dmtDap.js} +1 -1
- package/dist/assets/{index-BiLCTunu.js → index-DFcIBFM8.js} +1 -1
- package/dist/assets/{index-DSazIt7R.js → index-gjbSm-vt.js} +193 -193
- package/dist/{chunk-I7XNAIOF.js → chunk-3IOCVWB6.js} +6 -97
- package/dist/chunk-3IOCVWB6.js.map +1 -0
- package/dist/chunk-62DDWOSH.js +189 -0
- package/dist/chunk-62DDWOSH.js.map +1 -0
- package/dist/chunk-7VDQIGOU.js +1871 -0
- package/dist/chunk-7VDQIGOU.js.map +1 -0
- package/dist/chunk-QZ6HNNFG.js +934 -0
- package/dist/chunk-QZ6HNNFG.js.map +1 -0
- package/dist/chunk-S65AQH6M.js +101 -0
- package/dist/chunk-S65AQH6M.js.map +1 -0
- package/dist/{domEditingLayers-MHFDKAQ7.js → domEditingLayers-ZOOMN7CQ.js} +3 -2
- package/dist/index.d.ts +669 -330
- package/dist/index.html +1 -1
- package/dist/index.js +20512 -23172
- package/dist/index.js.map +1 -1
- package/dist/player.d.ts +30 -0
- package/dist/player.js +10 -0
- package/dist/player.js.map +1 -0
- package/dist/ui.d.ts +294 -0
- package/dist/ui.js +66 -0
- package/dist/ui.js.map +1 -0
- package/package.json +16 -8
- package/src/components/StudioHeader.tsx +1 -121
- package/src/components/editor/CanvasContextMenu.test.tsx +3 -3
- package/src/components/editor/CanvasContextMenu.tsx +1 -1
- package/src/components/editor/ConnectedDomEditOverlay.test.tsx +163 -0
- package/src/components/editor/ConnectedDomEditOverlay.tsx +206 -0
- package/src/components/editor/DomEditOverlay.tsx +36 -21
- package/src/components/editor/LayersPanel.tsx +1 -1
- package/src/components/editor/MarqueeOverlay.tsx +1 -1
- package/src/components/editor/SnapGuideOverlay.tsx +1 -1
- package/src/components/editor/clipAudioClock.test.ts +61 -0
- package/src/components/editor/clipAudioClock.ts +78 -0
- package/src/components/editor/marqueeCommit.ts +100 -37
- package/src/components/editor/previewReadOnly.overlay.test.tsx +234 -17
- package/src/components/editor/propertyPanelAudioFxGroup.test.tsx +135 -0
- package/src/components/editor/useFxCarve.ts +11 -15
- package/src/components/editor/useFxCarveNodes.ts +27 -15
- package/src/components/editor/useFxLevelling.ts +7 -43
- package/src/components/editor/useInlineTextEditing.tsx +35 -19
- package/src/components/feedback/projectProvenance.ts +2 -3
- package/src/components/nle/PreviewOverlays.tsx +7 -188
- package/src/components/nle/PreviewOverlaysTestMocks.ts +2 -2
- package/src/components/nle/useCanvasZOrderTimelineMirror.ts +1 -1
- package/src/components/ui/HyperframesLogo.tsx +120 -0
- package/src/domEditExports.test.tsx +69 -0
- package/src/editorGesturesExports.test.tsx +236 -0
- package/src/hooks/useDomEditCommits.ts +1 -0
- package/src/hooks/useDomEditTextCommits.test.tsx +36 -0
- package/src/hooks/useDomEditTextCommits.ts +8 -0
- package/src/hooks/useElementLifecycleOps.ts +1 -1
- package/src/hooks/useInlineTextEdit.test.tsx +39 -0
- package/src/hooks/useInlineTextEdit.ts +5 -9
- package/src/hooks/useKeyframeKeyboard.test.tsx +99 -0
- package/src/hooks/useKeyframeKeyboard.ts +9 -71
- package/src/hooks/usePreviewPersistence.ts +1 -1
- package/src/index.ts +45 -32
- package/src/lightEntries.test.ts +32 -0
- package/src/player/components/TimelineClipFades.test.tsx +31 -10
- package/src/player/components/TimelineClipFades.tsx +2 -1
- package/src/player/components/TimelineTypes.ts +4 -2
- package/src/player/components/studioShortcuts.ts +8 -5
- package/src/player/components/timelineClipChildren.test.ts +34 -1
- package/src/player/components/timelineClipChildren.tsx +7 -4
- package/src/player/components/timelineClipDragGestureLifecycle.test.ts +141 -85
- package/src/player/components/timelineClipDragGestureLifecycle.ts +2 -0
- package/src/player/components/timelinePointerRelease.ts +4 -0
- package/src/player/components/useTimelineProviderState.tsx +4 -0
- package/src/player/components/useTimelineStackingSync.test.tsx +46 -0
- package/src/player/components/useTimelineStackingSync.ts +18 -11
- package/src/player/hooks/timelinePlayerSync.test.ts +1 -0
- package/src/player/hooks/timelinePlayerSync.ts +1 -0
- package/src/player/lib/timelineDOM.test.ts +41 -7
- package/src/player/lib/timelineElementHelpers.ts +7 -7
- package/src/playerEntry.ts +1 -0
- package/src/timelineStackingSyncExport.test.tsx +67 -0
- package/src/ui.ts +31 -0
- package/src/utils/mediaTypes.test.ts +33 -0
- package/src/utils/mediaTypes.ts +12 -5
- package/dist/chunk-I7XNAIOF.js.map +0 -1
- /package/dist/{domEditingLayers-MHFDKAQ7.js.map → domEditingLayers-ZOOMN7CQ.js.map} +0 -0
package/dist/player.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
|
|
3
|
+
interface PlayerProps {
|
|
4
|
+
projectId?: string;
|
|
5
|
+
directUrl?: string;
|
|
6
|
+
onLoad: () => void;
|
|
7
|
+
/** Fires once the loaded document is painted and every loader (shader, assets) has cleared. */
|
|
8
|
+
onReadyToShowChange?: (ready: boolean) => void;
|
|
9
|
+
onPreviewError?: (message: string) => void;
|
|
10
|
+
onCompositionLoadingChange?: (loading: boolean) => void;
|
|
11
|
+
onPainted?: (details: {
|
|
12
|
+
iframe: HTMLIFrameElement;
|
|
13
|
+
startedAt: number;
|
|
14
|
+
loadId: number;
|
|
15
|
+
}) => void;
|
|
16
|
+
portrait?: boolean;
|
|
17
|
+
style?: React.CSSProperties;
|
|
18
|
+
suppressLoadingOverlay?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Renders a composition preview using the <hyperframes-player> web component.
|
|
22
|
+
*
|
|
23
|
+
* The web component handles iframe scaling, dimension detection, and
|
|
24
|
+
* ResizeObserver internally. This wrapper bridges its inner iframe to the
|
|
25
|
+
* forwarded ref so useTimelinePlayer can access it for clip manifest parsing,
|
|
26
|
+
* timeline probing, and DOM inspection.
|
|
27
|
+
*/
|
|
28
|
+
declare const Player: react.ForwardRefExoticComponent<PlayerProps & react.RefAttributes<HTMLIFrameElement>>;
|
|
29
|
+
|
|
30
|
+
export { Player };
|
package/dist/player.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/ui.d.ts
ADDED
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ButtonHTMLAttributes, ReactNode, ElementType, ComponentPropsWithoutRef, ReactElement } from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
import { Tabs as Tabs$1 } from '@base-ui/react/tabs';
|
|
5
|
+
import * as node_modules_cn_dist_types from 'node_modules/cn/dist/types';
|
|
6
|
+
import { ContextMenu as ContextMenu$1 } from '@base-ui/react/context-menu';
|
|
7
|
+
import { Menu as Menu$1 } from '@base-ui/react/menu';
|
|
8
|
+
import { Popover as Popover$1 } from '@base-ui/react/popover';
|
|
9
|
+
|
|
10
|
+
type ButtonVariant = "primary" | "secondary" | "danger" | "ghost";
|
|
11
|
+
type ButtonSize = "sm" | "md" | "lg";
|
|
12
|
+
/** Forces one interactive look for a gallery shot. CSS-only; see the header. */
|
|
13
|
+
type PreviewState = "hover" | "active" | "focus";
|
|
14
|
+
interface ButtonBaseProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
15
|
+
variant?: ButtonVariant;
|
|
16
|
+
size?: ButtonSize;
|
|
17
|
+
"data-preview-state"?: PreviewState;
|
|
18
|
+
}
|
|
19
|
+
interface ButtonProps extends ButtonBaseProps {
|
|
20
|
+
loading?: boolean;
|
|
21
|
+
icon?: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Shared by Button and IconButton. `disabled:` keeps pointer events alive so a
|
|
25
|
+
* wrapping Tooltip can still explain why the control is disabled.
|
|
26
|
+
*/
|
|
27
|
+
declare const buttonBase: string;
|
|
28
|
+
/**
|
|
29
|
+
* One entry per variant. The `data-[preview-state=…]` half of each string
|
|
30
|
+
* repeats the `hover:` and `active:` half exactly; the test pairs them.
|
|
31
|
+
*/
|
|
32
|
+
declare const buttonVariants: Record<ButtonVariant, string>;
|
|
33
|
+
/**
|
|
34
|
+
* The three control heights, 24 / 28 / 32 px, from `--spacing-ctl-*`.
|
|
35
|
+
* Exported so the Capture download `<a href>` can wear the same recipe as a Button.
|
|
36
|
+
*/
|
|
37
|
+
declare const buttonSizes: Record<ButtonSize, string>;
|
|
38
|
+
declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
39
|
+
|
|
40
|
+
declare function HyperframesLogo(): react_jsx_runtime.JSX.Element;
|
|
41
|
+
|
|
42
|
+
interface IconButtonProps extends ButtonBaseProps {
|
|
43
|
+
icon: ReactNode;
|
|
44
|
+
"aria-label": string;
|
|
45
|
+
}
|
|
46
|
+
declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Base UI lets `className` be a function of the part's state. Studio's parts
|
|
50
|
+
* merge a string with `cn`, so the string form is the one they accept.
|
|
51
|
+
*/
|
|
52
|
+
type StyledProps$1<T extends ElementType> = Omit<ComponentPropsWithoutRef<T>, "className"> & {
|
|
53
|
+
className?: string;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Groups a tab list with its panels. Uncontrolled by default; pass `value` and
|
|
57
|
+
* `onValueChange` for a strip whose selection lives in a store.
|
|
58
|
+
*/
|
|
59
|
+
declare function Tabs(props: ComponentPropsWithoutRef<typeof Tabs$1.Root>): react_jsx_runtime.JSX.Element;
|
|
60
|
+
/** The strip. Give it an `aria-label`: a tablist with no name is unlabelled. */
|
|
61
|
+
declare function TabsList({ className, ...props }: StyledProps$1<typeof Tabs$1.List>): react_jsx_runtime.JSX.Element;
|
|
62
|
+
interface TabProps extends StyledProps$1<typeof Tabs$1.Tab> {
|
|
63
|
+
value: string;
|
|
64
|
+
"data-preview-state"?: PreviewState;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* aria-selected drives the selected look (Base UI sets it) so assistive tech
|
|
68
|
+
* and sighted users match. data-preview-state is for gallery shots only.
|
|
69
|
+
*/
|
|
70
|
+
declare function Tab({ value, className, ...props }: TabProps): react_jsx_runtime.JSX.Element;
|
|
71
|
+
/** The panel for one tab. Base UI wires `aria-labelledby` back to its tab. */
|
|
72
|
+
declare function TabPanel({ className, ...props }: StyledProps$1<typeof Tabs$1.Panel>): react_jsx_runtime.JSX.Element;
|
|
73
|
+
|
|
74
|
+
interface HyperframesLoaderProps {
|
|
75
|
+
/** Status text shown below the mark. */
|
|
76
|
+
title: string;
|
|
77
|
+
/** Optional secondary detail line. */
|
|
78
|
+
detail?: string;
|
|
79
|
+
/** Optional monospace third line for IDs, counts, or percentages. */
|
|
80
|
+
mono?: string;
|
|
81
|
+
/** Pixel size of the mark itself; status text scales independently. */
|
|
82
|
+
size?: number;
|
|
83
|
+
/** Optional normalized progress value from 0 to 1. */
|
|
84
|
+
progress?: number;
|
|
85
|
+
}
|
|
86
|
+
declare function HyperframesLoader({ title, detail, mono, size, progress, }: HyperframesLoaderProps): react_jsx_runtime.JSX.Element;
|
|
87
|
+
|
|
88
|
+
interface TooltipProps {
|
|
89
|
+
label: string;
|
|
90
|
+
/** A single element, wrapped in a box-less span so a disabled one still gets hover. */
|
|
91
|
+
children: ReactElement<{
|
|
92
|
+
"aria-describedby"?: string;
|
|
93
|
+
}>;
|
|
94
|
+
/** Hover delay in ms. */
|
|
95
|
+
delay?: number;
|
|
96
|
+
side?: "top" | "bottom" | "left" | "right";
|
|
97
|
+
}
|
|
98
|
+
declare function Tooltip({ label, children, delay, side }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Studio's tailwind-merge config: teaches it the two scales `theme.css`
|
|
102
|
+
* invents (`text-step-*`, `ctl`/`ctl-sm`/`ctl-lg`) so overrides replace, not stack.
|
|
103
|
+
*/
|
|
104
|
+
declare const cn: node_modules_cn_dist_types.CnFunction;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Base UI lets `className` be a function of the part's state. Studio's parts
|
|
108
|
+
* merge a string with `cn`, so the string form is the one they accept.
|
|
109
|
+
*/
|
|
110
|
+
type StyledProps<T extends ElementType> = Omit<ComponentPropsWithoutRef<T>, "className"> & {
|
|
111
|
+
className?: string;
|
|
112
|
+
};
|
|
113
|
+
/** Forces the settled open look for a gallery shot; CSS-only, open state stays controlled. */
|
|
114
|
+
type PopupPreviewState = "open";
|
|
115
|
+
/** Where the portal puts the popup. `null` keeps it inline, next to its trigger. */
|
|
116
|
+
type PortalContainer$1 = ComponentPropsWithoutRef<typeof Menu$1.Portal>["container"];
|
|
117
|
+
/**
|
|
118
|
+
* Chrome shared by every floating panel (`Popover` too); callers add their own shadow token.
|
|
119
|
+
*/
|
|
120
|
+
declare const popupSurface: string;
|
|
121
|
+
type MenuItemTone = "default" | "danger";
|
|
122
|
+
interface PositionedProps {
|
|
123
|
+
side?: "top" | "bottom" | "left" | "right";
|
|
124
|
+
align?: "start" | "center" | "end";
|
|
125
|
+
sideOffset?: number;
|
|
126
|
+
/** Portal target. Pass the shadow root when the trigger lives in one. */
|
|
127
|
+
container?: PortalContainer$1;
|
|
128
|
+
/** Names the popup for assistive tech. A menu with no name is unlabelled. */
|
|
129
|
+
"aria-label"?: string;
|
|
130
|
+
className?: string;
|
|
131
|
+
"data-preview-state"?: PopupPreviewState;
|
|
132
|
+
}
|
|
133
|
+
interface MenuProps extends PositionedProps, Omit<ComponentPropsWithoutRef<typeof Menu$1.Root>, "children"> {
|
|
134
|
+
/** A single element. It becomes the trigger; no wrapper is added around it. */
|
|
135
|
+
trigger: ReactElement;
|
|
136
|
+
/** The items: `MenuItem`, `MenuRadioGroup`, `MenuSeparator`. */
|
|
137
|
+
children: ReactNode;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* A menu opened by its trigger. Uncontrolled by default; pass `open` and
|
|
141
|
+
* `onOpenChange` for a menu whose state lives in a store.
|
|
142
|
+
*/
|
|
143
|
+
declare function Menu({ trigger, children, side, align, sideOffset, container, className, "aria-label": ariaLabel, "data-preview-state": previewState, ...root }: MenuProps): react_jsx_runtime.JSX.Element;
|
|
144
|
+
interface ContextMenuProps extends PositionedProps, Omit<ComponentPropsWithoutRef<typeof ContextMenu$1.Root>, "children"> {
|
|
145
|
+
/**
|
|
146
|
+
* The right-clickable area, as the caller's own element. Its children are
|
|
147
|
+
* kept: the trigger renders that element rather than wrapping it.
|
|
148
|
+
*/
|
|
149
|
+
trigger: ReactElement;
|
|
150
|
+
children: ReactNode;
|
|
151
|
+
}
|
|
152
|
+
/** Opened by right click or long press at the pointer, so `side` and `align` are not offered. */
|
|
153
|
+
declare function ContextMenu({ trigger, children, container, className, "aria-label": ariaLabel, "data-preview-state": previewState, ...root }: Omit<ContextMenuProps, "side" | "align" | "sideOffset">): react_jsx_runtime.JSX.Element;
|
|
154
|
+
/** Keyboard shortcut hint, mono and tabular; exported for hints that are not a plain string. */
|
|
155
|
+
declare function MenuShortcut({ className, ...props }: StyledProps<"span">): react_jsx_runtime.JSX.Element;
|
|
156
|
+
interface MenuItemProps extends StyledProps<typeof Menu$1.Item> {
|
|
157
|
+
/** Rendered as a dim mono hint on the trailing edge. Decorative. */
|
|
158
|
+
shortcut?: string;
|
|
159
|
+
/** `danger` for a destructive action (Delete, Remove). */
|
|
160
|
+
tone?: MenuItemTone;
|
|
161
|
+
"data-preview-state"?: "hover";
|
|
162
|
+
}
|
|
163
|
+
/** One action. `disabled` items are skipped by the arrow keys, not just dimmed. */
|
|
164
|
+
declare function MenuItem({ shortcut, tone, className, children, ...props }: MenuItemProps): react_jsx_runtime.JSX.Element;
|
|
165
|
+
/** Single-choice group; selection is `aria-checked` on each item, which the dot indicator draws from. */
|
|
166
|
+
declare function MenuRadioGroup(props: ComponentPropsWithoutRef<typeof Menu$1.RadioGroup>): react_jsx_runtime.JSX.Element;
|
|
167
|
+
interface MenuRadioItemProps extends StyledProps<typeof Menu$1.RadioItem> {
|
|
168
|
+
"data-preview-state"?: "hover";
|
|
169
|
+
}
|
|
170
|
+
/** One choice in a `MenuRadioGroup`. The dot renders only while it is checked. */
|
|
171
|
+
declare function MenuRadioItem({ className, children, ...props }: MenuRadioItemProps): react_jsx_runtime.JSX.Element;
|
|
172
|
+
/** A hairline between two groups of items. */
|
|
173
|
+
declare function MenuSeparator({ className, ...props }: StyledProps<typeof Menu$1.Separator>): react_jsx_runtime.JSX.Element;
|
|
174
|
+
|
|
175
|
+
type PortalContainer = ComponentPropsWithoutRef<typeof Popover$1.Portal>["container"];
|
|
176
|
+
interface PopoverProps extends Omit<ComponentPropsWithoutRef<typeof Popover$1.Root>, "children"> {
|
|
177
|
+
/** A single element. It becomes the trigger; no wrapper is added around it. */
|
|
178
|
+
trigger: ReactElement;
|
|
179
|
+
/** Arbitrary content. The popover owns none of its keys. */
|
|
180
|
+
children: ReactNode;
|
|
181
|
+
side?: "top" | "bottom" | "left" | "right";
|
|
182
|
+
align?: "start" | "center" | "end";
|
|
183
|
+
sideOffset?: number;
|
|
184
|
+
/** Portal target. Pass the shadow root when the trigger lives in one. */
|
|
185
|
+
container?: PortalContainer;
|
|
186
|
+
/** Names the popup for assistive tech. */
|
|
187
|
+
"aria-label"?: string;
|
|
188
|
+
/**
|
|
189
|
+
* What to focus on open. Defaults to Base UI's behaviour (the first tabbable
|
|
190
|
+
* element), which is what a rename field wants.
|
|
191
|
+
*/
|
|
192
|
+
initialFocus?: ComponentPropsWithoutRef<typeof Popover$1.Popup>["initialFocus"];
|
|
193
|
+
className?: string;
|
|
194
|
+
"data-preview-state"?: PopupPreviewState;
|
|
195
|
+
}
|
|
196
|
+
declare function Popover({ trigger, children, side, align, sideOffset, container, className, initialFocus, "aria-label": ariaLabel, "data-preview-state": previewState, ...root }: PopoverProps): react_jsx_runtime.JSX.Element;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Shared field look (also used by NumberField and Select). Each interactive state is written
|
|
200
|
+
* twice, real and `data-[preview-state=...]`; `valueControls.test.tsx` asserts the lists match.
|
|
201
|
+
*/
|
|
202
|
+
declare const fieldBase: string;
|
|
203
|
+
/** The text itself, inside the box. The box owns the border and the ring. */
|
|
204
|
+
declare const fieldText: string;
|
|
205
|
+
interface InputProps extends Omit<ComponentPropsWithoutRef<"input">, "value" | "onChange" | "className"> {
|
|
206
|
+
/** The committed value. A draft lives inside until Enter or blur. */
|
|
207
|
+
value: string;
|
|
208
|
+
/** Called with the draft on Enter and on blur, only when it really changed. */
|
|
209
|
+
onCommit: (next: string) => void;
|
|
210
|
+
/** Called once per committed change, for design-input telemetry. */
|
|
211
|
+
onTrack?: () => void;
|
|
212
|
+
/** Marks the field invalid: red boundary and `aria-invalid`. */
|
|
213
|
+
invalid?: boolean;
|
|
214
|
+
className?: string;
|
|
215
|
+
"data-preview-state"?: PreviewState;
|
|
216
|
+
}
|
|
217
|
+
declare function Input({ value, onCommit, onTrack, invalid, disabled, className, "data-preview-state": previewState, ...props }: InputProps): react_jsx_runtime.JSX.Element;
|
|
218
|
+
|
|
219
|
+
interface NumberFieldProps {
|
|
220
|
+
/** Accessible name. The inspector's row label is the usual one. */
|
|
221
|
+
label: string;
|
|
222
|
+
/** The committed value. */
|
|
223
|
+
value: number;
|
|
224
|
+
/** Called when a commit boundary produces a value different from `value`. */
|
|
225
|
+
onCommit: (next: number) => void;
|
|
226
|
+
/** Called once per committed change, for design-input telemetry. */
|
|
227
|
+
onTrack?: () => void;
|
|
228
|
+
/** Rendered beside the number: "px", "%", "deg". Never part of the text. */
|
|
229
|
+
unit?: string;
|
|
230
|
+
min?: number;
|
|
231
|
+
max?: number;
|
|
232
|
+
step?: number;
|
|
233
|
+
disabled?: boolean;
|
|
234
|
+
className?: string;
|
|
235
|
+
"data-preview-state"?: PreviewState;
|
|
236
|
+
}
|
|
237
|
+
declare function NumberField({ label, value, onCommit, onTrack, unit, min, max, step, disabled, className, "data-preview-state": previewState, }: NumberFieldProps): react_jsx_runtime.JSX.Element;
|
|
238
|
+
|
|
239
|
+
interface SelectOption {
|
|
240
|
+
label: string;
|
|
241
|
+
value: string;
|
|
242
|
+
/** Offered but not choosable; the label stays visible so the reason stays visible too. */
|
|
243
|
+
disabled?: boolean;
|
|
244
|
+
}
|
|
245
|
+
interface SelectProps {
|
|
246
|
+
/** Accessible name for the trigger. */
|
|
247
|
+
label: string;
|
|
248
|
+
value: string;
|
|
249
|
+
options: SelectOption[];
|
|
250
|
+
/** Called when a different option is chosen. */
|
|
251
|
+
onCommit: (next: string) => void;
|
|
252
|
+
/** Called once per committed change, for design-input telemetry. */
|
|
253
|
+
onTrack?: () => void;
|
|
254
|
+
disabled?: boolean;
|
|
255
|
+
className?: string;
|
|
256
|
+
"data-preview-state"?: PreviewState;
|
|
257
|
+
}
|
|
258
|
+
declare function Select({ label, value, options, onCommit, onTrack, disabled, className, "data-preview-state": previewState, }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
259
|
+
|
|
260
|
+
interface SliderProps {
|
|
261
|
+
/** Accessible name for the thumb. The inspector's row label is the usual one. */
|
|
262
|
+
label: string;
|
|
263
|
+
/** The committed value. */
|
|
264
|
+
value: number;
|
|
265
|
+
min: number;
|
|
266
|
+
max: number;
|
|
267
|
+
step?: number;
|
|
268
|
+
/** Every intermediate value while dragging or stepping. Not a commit. */
|
|
269
|
+
onPreview?: (next: number) => void;
|
|
270
|
+
/** Called at a commit boundary when the value really changed. */
|
|
271
|
+
onCommit: (next: number) => void;
|
|
272
|
+
/** Called once per commit boundary, for design-input telemetry. */
|
|
273
|
+
onTrack?: () => void;
|
|
274
|
+
disabled?: boolean;
|
|
275
|
+
className?: string;
|
|
276
|
+
"data-preview-state"?: PreviewState;
|
|
277
|
+
}
|
|
278
|
+
declare function Slider({ label, value, min, max, step, onPreview, onCommit, onTrack, disabled, className, "data-preview-state": previewState, }: SliderProps): react_jsx_runtime.JSX.Element;
|
|
279
|
+
|
|
280
|
+
interface ToggleProps {
|
|
281
|
+
/** Accessible name. */
|
|
282
|
+
label: string;
|
|
283
|
+
checked: boolean;
|
|
284
|
+
/** Called on every flip. */
|
|
285
|
+
onCommit: (next: boolean) => void;
|
|
286
|
+
/** Called once per flip, for design-input telemetry. */
|
|
287
|
+
onTrack?: () => void;
|
|
288
|
+
disabled?: boolean;
|
|
289
|
+
className?: string;
|
|
290
|
+
"data-preview-state"?: PreviewState;
|
|
291
|
+
}
|
|
292
|
+
declare function Toggle({ label, checked, onCommit, onTrack, disabled, className, "data-preview-state": previewState, }: ToggleProps): react_jsx_runtime.JSX.Element;
|
|
293
|
+
|
|
294
|
+
export { Button, type ButtonSize, type ButtonVariant, ContextMenu, HyperframesLoader, type HyperframesLoaderProps, HyperframesLogo, IconButton, Input, type InputProps, Menu, MenuItem, type MenuItemTone, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuShortcut, NumberField, type NumberFieldProps, Popover, type PopupPreviewState, type PreviewState, Select, type SelectOption, type SelectProps, Slider, type SliderProps, Tab, TabPanel, Tabs, TabsList, Toggle, type ToggleProps, Tooltip, buttonBase, buttonSizes, buttonVariants, cn, fieldBase, fieldText, popupSurface };
|
package/dist/ui.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import {
|
|
2
|
+
HyperframesLogo
|
|
3
|
+
} from "./chunk-62DDWOSH.js";
|
|
4
|
+
import {
|
|
5
|
+
Button,
|
|
6
|
+
ContextMenu,
|
|
7
|
+
HyperframesLoader,
|
|
8
|
+
IconButton,
|
|
9
|
+
Input,
|
|
10
|
+
Menu,
|
|
11
|
+
MenuItem,
|
|
12
|
+
MenuRadioGroup,
|
|
13
|
+
MenuRadioItem,
|
|
14
|
+
MenuSeparator,
|
|
15
|
+
MenuShortcut,
|
|
16
|
+
NumberField,
|
|
17
|
+
Popover,
|
|
18
|
+
Select,
|
|
19
|
+
Slider,
|
|
20
|
+
Tab,
|
|
21
|
+
TabPanel,
|
|
22
|
+
Tabs,
|
|
23
|
+
TabsList,
|
|
24
|
+
Toggle,
|
|
25
|
+
Tooltip,
|
|
26
|
+
buttonBase,
|
|
27
|
+
buttonSizes,
|
|
28
|
+
buttonVariants,
|
|
29
|
+
cn,
|
|
30
|
+
fieldBase,
|
|
31
|
+
fieldText,
|
|
32
|
+
popupSurface
|
|
33
|
+
} from "./chunk-QZ6HNNFG.js";
|
|
34
|
+
import "./chunk-PZ5AY32C.js";
|
|
35
|
+
export {
|
|
36
|
+
Button,
|
|
37
|
+
ContextMenu,
|
|
38
|
+
HyperframesLoader,
|
|
39
|
+
HyperframesLogo,
|
|
40
|
+
IconButton,
|
|
41
|
+
Input,
|
|
42
|
+
Menu,
|
|
43
|
+
MenuItem,
|
|
44
|
+
MenuRadioGroup,
|
|
45
|
+
MenuRadioItem,
|
|
46
|
+
MenuSeparator,
|
|
47
|
+
MenuShortcut,
|
|
48
|
+
NumberField,
|
|
49
|
+
Popover,
|
|
50
|
+
Select,
|
|
51
|
+
Slider,
|
|
52
|
+
Tab,
|
|
53
|
+
TabPanel,
|
|
54
|
+
Tabs,
|
|
55
|
+
TabsList,
|
|
56
|
+
Toggle,
|
|
57
|
+
Tooltip,
|
|
58
|
+
buttonBase,
|
|
59
|
+
buttonSizes,
|
|
60
|
+
buttonVariants,
|
|
61
|
+
cn,
|
|
62
|
+
fieldBase,
|
|
63
|
+
fieldText,
|
|
64
|
+
popupSurface
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=ui.js.map
|
package/dist/ui.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/studio",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.84",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -19,6 +19,14 @@
|
|
|
19
19
|
"import": "./dist/index.js",
|
|
20
20
|
"types": "./dist/index.d.ts"
|
|
21
21
|
},
|
|
22
|
+
"./ui": {
|
|
23
|
+
"import": "./dist/ui.js",
|
|
24
|
+
"types": "./dist/ui.d.ts"
|
|
25
|
+
},
|
|
26
|
+
"./player": {
|
|
27
|
+
"import": "./dist/player.js",
|
|
28
|
+
"types": "./dist/player.d.ts"
|
|
29
|
+
},
|
|
22
30
|
"./tailwind-preset": {
|
|
23
31
|
"import": "./dist/styles/tailwind-preset.js",
|
|
24
32
|
"types": "./dist/styles/tailwind-preset.d.ts"
|
|
@@ -52,12 +60,12 @@
|
|
|
52
60
|
"dockview-react": "8.3.1",
|
|
53
61
|
"gsap": "^3.13.0",
|
|
54
62
|
"mediabunny": "^1.45.3",
|
|
55
|
-
"@hyperframes/core": "0.8.
|
|
56
|
-
"@hyperframes/parsers": "0.8.
|
|
57
|
-
"@hyperframes/player": "0.8.
|
|
58
|
-
"@hyperframes/
|
|
59
|
-
"@hyperframes/
|
|
60
|
-
"@hyperframes/
|
|
63
|
+
"@hyperframes/core": "0.8.84",
|
|
64
|
+
"@hyperframes/parsers": "0.8.84",
|
|
65
|
+
"@hyperframes/player": "0.8.84",
|
|
66
|
+
"@hyperframes/shader-transitions": "0.8.84",
|
|
67
|
+
"@hyperframes/studio-server": "0.8.84",
|
|
68
|
+
"@hyperframes/sdk": "0.8.84"
|
|
61
69
|
},
|
|
62
70
|
"devDependencies": {
|
|
63
71
|
"@tailwindcss/vite": "^4.3.3",
|
|
@@ -73,7 +81,7 @@
|
|
|
73
81
|
"vite": "^6.4.2",
|
|
74
82
|
"vitest": "^4.1.11",
|
|
75
83
|
"zustand": "^5.0.0",
|
|
76
|
-
"@hyperframes/producer": "0.8.
|
|
84
|
+
"@hyperframes/producer": "0.8.84"
|
|
77
85
|
},
|
|
78
86
|
"peerDependencies": {
|
|
79
87
|
"react": "19",
|
|
@@ -6,6 +6,7 @@ import { trackStudioEvent } from "../utils/studioTelemetry";
|
|
|
6
6
|
import { Button, buttonBase, buttonSizes, buttonVariants, cn, Tooltip } from "./ui";
|
|
7
7
|
import { Dock } from "./dock/Dock";
|
|
8
8
|
import { InspectorIcon } from "./icons/InspectorIcon";
|
|
9
|
+
import { HyperframesLogo } from "./ui/HyperframesLogo";
|
|
9
10
|
|
|
10
11
|
export interface StudioHeaderProps {
|
|
11
12
|
captureFrameHref: string;
|
|
@@ -18,127 +19,6 @@ export interface StudioHeaderProps {
|
|
|
18
19
|
onExport?: () => void;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
|
-
export function HyperframesLogo() {
|
|
22
|
-
// Full logo from logo-dark.svg (263×79): heygen label + gradient mark + hyperframes wordmark.
|
|
23
|
-
// All fill="black" paths inverted to white for the dark header.
|
|
24
|
-
const height = 28;
|
|
25
|
-
const width = Math.round(height * (263 / 79));
|
|
26
|
-
return (
|
|
27
|
-
<svg
|
|
28
|
-
width={width}
|
|
29
|
-
height={height}
|
|
30
|
-
viewBox="0 0 263 79"
|
|
31
|
-
fill="none"
|
|
32
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
33
|
-
aria-label="Hyperframes"
|
|
34
|
-
>
|
|
35
|
-
<defs>
|
|
36
|
-
<linearGradient
|
|
37
|
-
id="hf-g0"
|
|
38
|
-
x1="225.869"
|
|
39
|
-
y1="0"
|
|
40
|
-
x2="222.845"
|
|
41
|
-
y2="37.482"
|
|
42
|
-
gradientUnits="userSpaceOnUse"
|
|
43
|
-
>
|
|
44
|
-
<stop stopColor="var(--color-brand-gradient-from)" />
|
|
45
|
-
<stop offset="1" stopColor="var(--color-brand-gradient-to)" />
|
|
46
|
-
</linearGradient>
|
|
47
|
-
<linearGradient
|
|
48
|
-
id="hf-g1"
|
|
49
|
-
x1="230.87"
|
|
50
|
-
y1="39"
|
|
51
|
-
x2="244.661"
|
|
52
|
-
y2="6.303"
|
|
53
|
-
gradientUnits="userSpaceOnUse"
|
|
54
|
-
>
|
|
55
|
-
<stop stopColor="var(--color-brand-gradient-from)" />
|
|
56
|
-
<stop offset="1" stopColor="var(--color-brand-gradient-to)" />
|
|
57
|
-
</linearGradient>
|
|
58
|
-
</defs>
|
|
59
|
-
{/* heygen label */}
|
|
60
|
-
<path
|
|
61
|
-
d="M0 16.6738H4.96V23.3838H11.53V16.6738H16.49V35.4538H11.53V27.6738H4.96V35.4538H0V16.6738Z"
|
|
62
|
-
fill="white"
|
|
63
|
-
/>
|
|
64
|
-
<path
|
|
65
|
-
d="M17.8899 28.0137C17.8899 23.4237 21.2399 20.0237 25.7999 20.0237C30.0099 20.0237 32.9399 23.0837 32.9399 27.5637C32.9399 28.2037 32.8599 28.8237 32.8299 29.3337H22.6099C23.0399 31.1337 24.6199 32.1237 27.1399 32.1237C28.7199 32.1237 30.2199 31.7237 31.2999 31.0237V34.6737C30.1699 35.3937 28.2999 35.8537 26.3599 35.8537C21.2599 35.8537 17.8799 32.6037 17.8799 28.0237L17.8899 28.0137ZM28.5699 26.1937C28.4899 24.5337 27.3899 23.5637 25.7499 23.5637C24.1099 23.5637 22.9599 24.5337 22.6099 26.1937H28.5699Z"
|
|
66
|
-
fill="white"
|
|
67
|
-
/>
|
|
68
|
-
<path
|
|
69
|
-
d="M37.85 33.8638L32 20.4238H37.29L40.46 28.1538L43.6 20.4238H48.48L40.33 39.5738H35.26L37.86 33.8638H37.85Z"
|
|
70
|
-
fill="white"
|
|
71
|
-
/>
|
|
72
|
-
<path
|
|
73
|
-
d="M48.1797 26.1138C48.1797 20.4238 52.7097 16.2438 58.9397 16.2438C61.2997 16.2438 63.5297 16.8038 64.8197 17.7238V21.9338C63.5597 20.9138 61.6797 20.2938 59.7497 20.2938C55.7797 20.2938 53.2597 22.6238 53.2597 26.1438C53.2597 29.6638 55.5697 31.8838 58.8897 31.8838C59.6397 31.8838 60.4997 31.7538 61.1997 31.5038V27.8838H57.4697V24.2338H65.5197V33.7038C63.6697 35.0938 61.1997 35.8738 58.5997 35.8738C52.5397 35.8738 48.1897 31.7438 48.1897 26.1138H48.1797Z"
|
|
74
|
-
fill="white"
|
|
75
|
-
/>
|
|
76
|
-
<path
|
|
77
|
-
d="M66.6604 28.0137C66.6604 23.4237 70.0104 20.0237 74.5704 20.0237C78.7804 20.0237 81.7104 23.0837 81.7104 27.5637C81.7104 28.2037 81.6304 28.8237 81.6004 29.3337H71.3804C71.8104 31.1337 73.3904 32.1237 75.9104 32.1237C77.4904 32.1237 78.9904 31.7237 80.0704 31.0237V34.6737C78.9404 35.3937 77.0704 35.8537 75.1304 35.8537C70.0304 35.8537 66.6504 32.6037 66.6504 28.0237L66.6604 28.0137ZM77.3404 26.1937C77.2604 24.5337 76.1604 23.5637 74.5204 23.5637C72.8804 23.5637 71.7304 24.5337 71.3804 26.1937H77.3404Z"
|
|
78
|
-
fill="white"
|
|
79
|
-
/>
|
|
80
|
-
<path
|
|
81
|
-
d="M82.9688 20.4238H87.8488V22.4138C88.7588 20.9638 90.3488 20.1038 92.3288 20.1038C95.4988 20.1038 97.3988 22.3338 97.3988 25.8138V35.4438H92.5188V26.8638C92.5188 25.0438 91.8188 24.1838 90.4788 24.1838C88.9488 24.1838 87.8488 25.3638 87.8488 27.2638V35.4438H82.9688V20.4238Z"
|
|
82
|
-
fill="white"
|
|
83
|
-
/>
|
|
84
|
-
{/* gradient icon mark */}
|
|
85
|
-
<path
|
|
86
|
-
d="M195.219 26.1937L213.529 38.9937C216.009 40.7237 220.239 38.7637 221.009 35.5337L228.419 4.33374C229.189 1.10374 225.879 -0.856262 222.589 0.873738L198.199 13.6737C192.649 16.5837 191.059 23.2837 195.219 26.1937Z"
|
|
87
|
-
fill="url(#hf-g0)"
|
|
88
|
-
/>
|
|
89
|
-
<path
|
|
90
|
-
d="M256.97 25.9638L232.58 38.7638C229.28 40.4938 225.98 38.5338 226.75 35.3038L234.16 4.10376C234.93 0.873757 239.16 -1.08624 241.64 0.643757L259.95 13.4438C264.12 16.3538 262.52 23.0538 256.97 25.9638Z"
|
|
91
|
-
fill="url(#hf-g1)"
|
|
92
|
-
/>
|
|
93
|
-
{/* hyperframes wordmark */}
|
|
94
|
-
<path
|
|
95
|
-
d="M0 71.9996V42.7256H7.7367V53.1806H17.9826V42.7256H25.7193V71.9996H17.9826V59.8718H7.7367V71.9996H0Z"
|
|
96
|
-
fill="white"
|
|
97
|
-
/>
|
|
98
|
-
<path
|
|
99
|
-
d="M31.9606 78.4405L36.0171 69.5329L26.9004 48.5811H35.1389L40.0737 60.6252L44.9666 48.5811H52.5779L39.8646 78.4405H31.9606Z"
|
|
100
|
-
fill="white"
|
|
101
|
-
/>
|
|
102
|
-
<path
|
|
103
|
-
d="M53.3711 78.4404V48.5809H60.9823V52.052C62.446 49.501 65.0807 48.0791 68.3008 48.0791C74.3647 48.0791 78.9649 53.3066 78.9649 60.2487C78.9649 67.2745 74.3229 72.4602 68.259 72.4602C65.0807 72.4602 62.446 71.1637 60.9823 68.78V78.4404H53.3711ZM66.1262 66.1872C69.2627 66.1872 71.3119 63.7616 71.3119 60.2905C71.3119 56.8195 69.2627 54.4357 66.1262 54.4357C62.7388 54.4357 60.9823 57.2795 60.9823 59.7051V60.9178C60.9823 63.3434 62.7388 66.1872 66.1262 66.1872Z"
|
|
104
|
-
fill="white"
|
|
105
|
-
/>
|
|
106
|
-
<path
|
|
107
|
-
d="M93.4397 72.6269C85.4939 72.6269 80.2246 67.5667 80.2246 60.4155C80.2246 53.2643 85.4521 47.9531 92.5615 47.9531C99.1273 47.9531 103.686 52.7206 103.686 59.7045C103.686 60.7082 103.56 61.6701 103.518 62.4647H87.5849C88.2541 65.2666 90.7214 66.8139 94.6525 66.8139C97.1199 66.8139 99.4618 66.1866 101.135 65.0993V70.7868C99.3782 71.916 96.4508 72.6269 93.4397 72.6269ZM87.5849 57.5717H96.869C96.7435 54.9789 95.0289 53.4734 92.4779 53.4734C89.9687 53.4734 88.1286 54.9789 87.5849 57.5717Z"
|
|
108
|
-
fill="white"
|
|
109
|
-
/>
|
|
110
|
-
<path
|
|
111
|
-
d="M105.645 72V48.5808H113.214V52.9719C114.218 50.0445 116.183 48.2881 118.692 48.2881C119.361 48.2881 119.989 48.4135 120.407 48.6645V55.8993C119.822 55.5648 119.111 55.4393 118.274 55.4393C115.138 55.4393 113.256 57.6558 113.256 61.2941V72H105.645Z"
|
|
112
|
-
fill="white"
|
|
113
|
-
/>
|
|
114
|
-
<path
|
|
115
|
-
d="M122.643 71.9996V42.7256H139.371V49.124H130.379V54.477H138.911V60.5827H130.379V71.9996H122.643Z"
|
|
116
|
-
fill="white"
|
|
117
|
-
/>
|
|
118
|
-
<path
|
|
119
|
-
d="M141.258 72V48.5808H148.827V52.9719C149.831 50.0445 151.796 48.2881 154.306 48.2881C154.975 48.2881 155.602 48.4135 156.02 48.6645V55.8993C155.435 55.5648 154.724 55.4393 153.887 55.4393C150.751 55.4393 148.869 57.6558 148.869 61.2941V72H141.258Z"
|
|
120
|
-
fill="white"
|
|
121
|
-
/>
|
|
122
|
-
<path
|
|
123
|
-
d="M167.26 72.4602C161.154 72.4602 156.596 67.2745 156.596 60.3324C156.596 53.3066 161.196 48.0791 167.302 48.0791C170.438 48.0791 173.031 49.4173 174.536 51.8429V48.5809H182.148V72.0001H174.536V68.4873C173.031 71.0801 170.438 72.4602 167.26 72.4602ZM169.393 66.1872C172.78 66.1872 174.536 63.3434 174.536 60.876V59.6632C174.536 57.2377 172.78 54.4357 169.393 54.4357C166.298 54.4357 164.207 56.7777 164.207 60.2905C164.207 63.7616 166.298 66.1872 169.393 66.1872Z"
|
|
124
|
-
fill="white"
|
|
125
|
-
/>
|
|
126
|
-
<path
|
|
127
|
-
d="M184.998 72.0001V48.5809H192.609V51.6756C193.989 49.4173 196.373 48.0791 199.426 48.0791C202.521 48.0791 204.779 49.5428 206.075 52.052C207.497 49.5846 210.132 48.0791 213.352 48.0791C218.245 48.0791 221.214 51.592 221.214 57.0286V72.0001H213.603V58.5341C213.603 55.774 212.557 54.4357 210.634 54.4357C208.459 54.4357 206.912 56.234 206.912 59.0778V72.0001H199.3V58.5341C199.3 55.774 198.255 54.4357 196.373 54.4357C194.157 54.4357 192.609 56.234 192.609 59.0778V72.0001H184.998Z"
|
|
128
|
-
fill="white"
|
|
129
|
-
/>
|
|
130
|
-
<path
|
|
131
|
-
d="M236.338 72.6269C228.392 72.6269 223.123 67.5667 223.123 60.4155C223.123 53.2643 228.351 47.9531 235.46 47.9531C242.026 47.9531 246.584 52.7206 246.584 59.7045C246.584 60.7082 246.459 61.6701 246.417 62.4647H230.483C231.152 65.2666 233.62 66.8139 237.551 66.8139C240.018 66.8139 242.36 66.1866 244.033 65.0993V70.7868C242.277 71.916 239.349 72.6269 236.338 72.6269ZM230.483 57.5717H239.767C239.642 54.9789 237.927 53.4734 235.376 53.4734C232.867 53.4734 231.027 54.9789 230.483 57.5717Z"
|
|
132
|
-
fill="white"
|
|
133
|
-
/>
|
|
134
|
-
<path
|
|
135
|
-
d="M252.115 72.502C250.192 72.502 248.268 72.0838 246.93 71.3728V65.6853C247.808 66.3126 248.937 66.689 250.066 66.689C251.739 66.689 252.784 65.8526 252.784 64.5562C252.784 63.8452 252.492 63.0925 251.655 62.0888L249.899 59.956C248.728 58.4923 248.226 56.9031 248.226 55.2721C248.226 51.0065 251.864 48.0791 256.883 48.0791C258.723 48.0791 260.438 48.4555 261.65 49.0828V54.7703C260.898 54.2266 259.768 53.8503 258.723 53.8503C257.092 53.8503 256.046 54.6867 256.046 55.8994C256.046 56.6522 256.423 57.405 257.259 58.4086L258.974 60.4996C260.187 62.047 260.73 63.5943 260.73 65.2671C260.73 69.5746 257.05 72.502 252.115 72.502Z"
|
|
136
|
-
fill="white"
|
|
137
|
-
/>
|
|
138
|
-
</svg>
|
|
139
|
-
);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
22
|
/**
|
|
143
23
|
* Does the header's Inspector button open the panel, or close it?
|
|
144
24
|
*
|
|
@@ -3,7 +3,7 @@ import React, { act } from "react";
|
|
|
3
3
|
import { createRoot, type Root } from "react-dom/client";
|
|
4
4
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
5
5
|
import { installReactActEnvironment, makeSelection } from "../../hooks/domSelectionTestHarness";
|
|
6
|
-
import { resolveZIndexEntries } from "
|
|
6
|
+
import { resolveZIndexEntries } from "./ConnectedDomEditOverlay";
|
|
7
7
|
import { useElementLifecycleOps } from "../../hooks/useElementLifecycleOps";
|
|
8
8
|
import { makeLifecycleOpsParams } from "../../hooks/elementLifecycleOpsTestUtils";
|
|
9
9
|
import type { DomEditPatchBatch } from "../../hooks/domEditCommitTypes";
|
|
@@ -138,7 +138,7 @@ describe("CanvasContextMenu — handler gating", () => {
|
|
|
138
138
|
});
|
|
139
139
|
});
|
|
140
140
|
|
|
141
|
-
// ── Menu z-action → commit path (wired the way
|
|
141
|
+
// ── Menu z-action → commit path (wired the way ConnectedDomEditOverlay wires the app) ──
|
|
142
142
|
|
|
143
143
|
function pressMenuItem(label: string) {
|
|
144
144
|
const button = zOrderButtons().find((b) => b.textContent === label);
|
|
@@ -200,7 +200,7 @@ describe("CanvasContextMenu — z-action commit path", () => {
|
|
|
200
200
|
const captured: CapturedBatchCall[] = [];
|
|
201
201
|
const { commit, cleanup } = renderCommitHook(captured);
|
|
202
202
|
|
|
203
|
-
// Wire onApplyZIndex the way the app does (
|
|
203
|
+
// Wire onApplyZIndex the way the app does (ConnectedDomEditOverlay → the commit
|
|
204
204
|
// hook), asserting the menu has NOT touched the DOM when it fires — the
|
|
205
205
|
// hook must capture true pre-change styles for its rollback.
|
|
206
206
|
const stylesAtApply: Array<{ zIndex: string; position: string }> = [];
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* flow, and captures the TRUE prior styles for its failure rollback.
|
|
17
17
|
*
|
|
18
18
|
* The prop MUST be wired at the call site to route through the full persist
|
|
19
|
-
* path.
|
|
19
|
+
* path. ConnectedDomEditOverlay.tsx builds the per-patch PatchTargets (the selected
|
|
20
20
|
* element carries its full selection identity; sibling elements are iframe DOM
|
|
21
21
|
* nodes, so their id / selector are derived from the node and they share the
|
|
22
22
|
* selection's sourceFile) and forwards them to handleDomZIndexReorderCommit.
|