@hyperframes/studio 0.7.58 → 0.7.59
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-CtTDO63S.js → hyperframes-player-Bm07FLkl.js} +1 -1
- package/dist/assets/{index-C47jAC3Q.js → index-B995FG46.js} +1 -1
- package/dist/assets/index-CrkAdJkb.js +426 -0
- package/dist/assets/index-Dj5p8U_A.css +1 -0
- package/dist/assets/{index-DeQPzqwH.js → index-FvzmPhfG.js} +1 -1
- package/dist/index.d.ts +12 -3
- package/dist/index.html +2 -2
- package/dist/index.js +13514 -8528
- package/dist/index.js.map +1 -1
- package/dist/styles/tailwind-preset.d.ts +5 -0
- package/dist/styles/tailwind-preset.js +8 -1
- package/dist/styles/tailwind-preset.js.map +1 -1
- package/package.json +7 -7
- package/src/App.tsx +3 -3
- package/src/components/DesignPanelPromoteProvider.tsx +15 -2
- package/src/components/StudioRightPanel.tsx +29 -51
- package/src/components/editor/AnimationCard.test.tsx +134 -0
- package/src/components/editor/AnimationCard.tsx +19 -4
- package/src/components/editor/ArcPathControls.tsx +1 -0
- package/src/components/editor/GestureRecordControl.tsx +7 -1
- package/src/components/editor/GsapAnimationSection.tsx +109 -14
- package/src/components/editor/InspectorHeaderActions.tsx +42 -4
- package/src/components/editor/PropertyPanel.test.tsx +948 -0
- package/src/components/editor/PropertyPanel.tsx +144 -148
- package/src/components/editor/PropertyPanelEmptyState.test.tsx +74 -0
- package/src/components/editor/PropertyPanelEmptyState.tsx +179 -1
- package/src/components/editor/PropertyPanelFlat.tsx +580 -0
- package/src/components/editor/PropertyPanelFlatFooter.test.tsx +83 -0
- package/src/components/editor/PropertyPanelFlatFooter.tsx +73 -0
- package/src/components/editor/PropertyPanelFlatHeader.test.tsx +79 -0
- package/src/components/editor/PropertyPanelFlatHeader.tsx +112 -0
- package/src/components/editor/gsapAnimationCallbacks.ts +27 -0
- package/src/components/editor/gsapLivePreview.ts +34 -0
- package/src/components/editor/manualEditingAvailability.test.ts +10 -0
- package/src/components/editor/manualEditingAvailability.ts +9 -0
- package/src/components/editor/propertyPanel3dTransform.tsx +5 -0
- package/src/components/editor/propertyPanelColor.test.tsx +28 -0
- package/src/components/editor/propertyPanelColor.tsx +31 -1
- package/src/components/editor/propertyPanelColorGradingControls.tsx +11 -2
- package/src/components/editor/propertyPanelColorGradingSection.tsx +45 -365
- package/src/components/editor/propertyPanelColorGradingSlider.tsx +19 -5
- package/src/components/editor/propertyPanelFill.tsx +22 -5
- package/src/components/editor/propertyPanelFlatColorGradingSection.test.tsx +622 -0
- package/src/components/editor/propertyPanelFlatColorGradingSection.tsx +570 -0
- package/src/components/editor/propertyPanelFlatLayoutSection.test.tsx +293 -0
- package/src/components/editor/propertyPanelFlatLayoutSection.tsx +383 -0
- package/src/components/editor/propertyPanelFlatMaskInsetRows.tsx +102 -0
- package/src/components/editor/propertyPanelFlatMediaSection.test.tsx +436 -0
- package/src/components/editor/propertyPanelFlatMediaSection.tsx +286 -0
- package/src/components/editor/propertyPanelFlatMotionSection.test.tsx +272 -0
- package/src/components/editor/propertyPanelFlatMotionSection.tsx +315 -0
- package/src/components/editor/propertyPanelFlatPrimitives.test.tsx +1174 -0
- package/src/components/editor/propertyPanelFlatPrimitives.tsx +563 -0
- package/src/components/editor/propertyPanelFlatSelectRow.tsx +101 -0
- package/src/components/editor/propertyPanelFlatStyleHelpers.test.ts +23 -0
- package/src/components/editor/propertyPanelFlatStyleHelpers.ts +27 -0
- package/src/components/editor/propertyPanelFlatStyleSections.test.tsx +598 -0
- package/src/components/editor/propertyPanelFlatStyleSections.tsx +516 -0
- package/src/components/editor/propertyPanelFlatTextSection.test.tsx +465 -0
- package/src/components/editor/propertyPanelFlatTextSection.tsx +407 -0
- package/src/components/editor/propertyPanelFlatTimingDerivation.test.ts +71 -0
- package/src/components/editor/propertyPanelFlatTimingDerivation.ts +59 -0
- package/src/components/editor/propertyPanelFlatToggle.test.tsx +63 -0
- package/src/components/editor/propertyPanelFlatToggle.tsx +53 -0
- package/src/components/editor/propertyPanelFont.test.tsx +30 -0
- package/src/components/editor/propertyPanelFont.tsx +136 -95
- package/src/components/editor/propertyPanelHelpers.ts +73 -0
- package/src/components/editor/propertyPanelInputCoverage.test.tsx +587 -0
- package/src/components/editor/propertyPanelMediaSection.tsx +10 -0
- package/src/components/editor/propertyPanelPrimitives.tsx +60 -29
- package/src/components/editor/propertyPanelSections.test.tsx +161 -0
- package/src/components/editor/propertyPanelSections.tsx +154 -90
- package/src/components/editor/propertyPanelStyleSections.tsx +12 -1
- package/src/components/editor/propertyPanelTimingSection.tsx +1 -1
- package/src/components/editor/propertyPanelTypes.ts +14 -1
- package/src/components/editor/propertyPanelValueTier.test.ts +32 -0
- package/src/components/editor/propertyPanelValueTier.ts +28 -0
- package/src/components/editor/useColorGradingController.test.ts +418 -0
- package/src/components/editor/useColorGradingController.ts +596 -0
- package/src/components/panels/VariablesPanel.tsx +4 -0
- package/src/components/sidebar/CompositionsTab.test.ts +28 -2
- package/src/components/sidebar/CompositionsTab.tsx +3 -1
- package/src/components/storyboard/FramePoster.tsx +24 -4
- package/src/components/storyboard/StoryboardFrameFocus.tsx +4 -0
- package/src/components/storyboard/StoryboardFrameTile.tsx +30 -1
- package/src/components/storyboard/StoryboardGrid.tsx +23 -1
- package/src/components/storyboard/StoryboardLoaded.tsx +58 -2
- package/src/components/storyboard/StoryboardView.tsx +9 -2
- package/src/components/storyboard/frameComments.test.ts +95 -0
- package/src/components/storyboard/frameComments.ts +115 -0
- package/src/components/storyboard/useFrameComments.ts +82 -0
- package/src/contexts/DesignPanelInputContext.test.tsx +81 -0
- package/src/contexts/DesignPanelInputContext.tsx +48 -0
- package/src/contexts/DomEditContext.tsx +4 -0
- package/src/contexts/VariablePromoteContext.test.tsx +67 -0
- package/src/contexts/VariablePromoteContext.tsx +10 -5
- package/src/hooks/domEditCommitRunner.ts +11 -0
- package/src/hooks/gsapScriptCommitTypes.ts +6 -4
- package/src/hooks/timelineTrackVisibility.test.ts +52 -0
- package/src/hooks/timelineTrackVisibility.ts +27 -10
- package/src/hooks/useAppHotkeys.ts +9 -0
- package/src/hooks/useDomEditAttributeCommits.ts +123 -1
- package/src/hooks/useDomEditCommits.ts +29 -175
- package/src/hooks/useDomEditCommitsHelpers.ts +158 -0
- package/src/hooks/useDomEditSession.ts +17 -5
- package/src/hooks/useDomEditTextCommits.ts +14 -9
- package/src/hooks/useDomEditWiring.ts +10 -9
- package/src/hooks/useElementLifecycleOps.ts +8 -3
- package/src/hooks/useFileManager.projectOwnership.test.tsx +98 -0
- package/src/hooks/useFileManager.ts +82 -60
- package/src/hooks/useGsapAnimationOps.ts +7 -6
- package/src/hooks/useGsapKeyframeOps.ts +6 -5
- package/src/hooks/useGsapPropertyDebounce.ts +43 -28
- package/src/hooks/useGsapPropertyDebounceFlush.test.ts +35 -0
- package/src/hooks/useGsapScriptCommits.test.tsx +48 -2
- package/src/hooks/useGsapScriptCommits.ts +150 -50
- package/src/hooks/useGsapSelectionHandlers.test.tsx +116 -0
- package/src/hooks/useGsapSelectionHandlers.ts +94 -31
- package/src/hooks/useInspectorSplitResize.ts +51 -0
- package/src/hooks/usePersistentEditHistory.projectOwnership.test.tsx +60 -0
- package/src/hooks/usePersistentEditHistory.test.ts +49 -1
- package/src/hooks/usePersistentEditHistory.ts +71 -31
- package/src/hooks/useProjectCompositionVariables.ts +10 -10
- package/src/hooks/useProjectSignaturePoll.test.tsx +135 -0
- package/src/hooks/useProjectSignaturePoll.ts +68 -0
- package/src/hooks/useSdkSession.lifecycle.test.tsx +137 -0
- package/src/hooks/useSdkSession.ts +155 -14
- package/src/hooks/useSlideshowPersist.ts +7 -1
- package/src/hooks/useStoryboard.ts +23 -4
- package/src/hooks/useTimelineEditing.test.tsx +4 -1
- package/src/hooks/useTimelineEditing.ts +16 -10
- package/src/hooks/useTimelineEditingTypes.ts +3 -0
- package/src/hooks/useTimelineGroupEditing.ts +16 -2
- package/src/hooks/useVariablesPersist.ts +9 -7
- package/src/icons/SystemIcons.tsx +2 -0
- package/src/styles/studio.css +22 -0
- package/src/styles/tailwind-preset.shared.js +7 -0
- package/src/utils/designInputTracking.test.ts +97 -0
- package/src/utils/designInputTracking.ts +80 -0
- package/src/utils/sdkCutover.gate.test.ts +7 -7
- package/src/utils/sdkCutover.test.ts +490 -57
- package/src/utils/sdkCutover.ts +181 -219
- package/src/utils/sdkEditTransaction.ts +292 -0
- package/src/utils/sdkResolverAttempts.ts +94 -0
- package/src/utils/sdkResolverShadow.test.ts +148 -0
- package/src/utils/sdkResolverShadow.ts +139 -106
- package/src/utils/setSlideshowManifest.test.ts +0 -9
- package/src/utils/setSlideshowManifest.ts +20 -27
- package/src/utils/studioFileHistory.test.ts +41 -0
- package/src/utils/studioFileHistory.ts +30 -27
- package/src/utils/studioFileMutationCoordinator.ts +45 -0
- package/src/utils/studioHelpers.test.ts +45 -0
- package/src/utils/studioHelpers.ts +45 -14
- package/src/utils/studioSaveDiagnostics.ts +17 -0
- package/dist/assets/index-B_UvTX3E.js +0 -423
- package/dist/assets/index-uahwWkgw.css +0 -1
|
@@ -4,7 +4,11 @@ import { Film } from "../../icons/SystemIcons";
|
|
|
4
4
|
import { Section } from "./propertyPanelPrimitives";
|
|
5
5
|
import { ADD_METHODS, ADD_METHOD_LABELS, METHOD_TOOLTIPS } from "./gsapAnimationConstants";
|
|
6
6
|
import { AnimationCard } from "./AnimationCard";
|
|
7
|
-
import
|
|
7
|
+
import {
|
|
8
|
+
trackAnimationMetaUpdate,
|
|
9
|
+
type GsapAnimationEditCallbacks,
|
|
10
|
+
} from "./gsapAnimationCallbacks";
|
|
11
|
+
import { useTrackDesignInput } from "../../contexts/DesignPanelInputContext";
|
|
8
12
|
|
|
9
13
|
interface GsapAnimationSectionProps extends GsapAnimationEditCallbacks {
|
|
10
14
|
animations: GsapAnimation[];
|
|
@@ -34,7 +38,24 @@ export const GsapAnimationSection = memo(function GsapAnimationSection({
|
|
|
34
38
|
onSetAllKeyframeEases,
|
|
35
39
|
onUnroll,
|
|
36
40
|
}: GsapAnimationSectionProps) {
|
|
41
|
+
const track = useTrackDesignInput();
|
|
37
42
|
const [addMenuOpen, setAddMenuOpen] = useState(false);
|
|
43
|
+
const trackProperty = (property: string) => {
|
|
44
|
+
const control =
|
|
45
|
+
property === "visibility"
|
|
46
|
+
? "toggle"
|
|
47
|
+
: property === "filter" || property === "clipPath"
|
|
48
|
+
? "text"
|
|
49
|
+
: "metric";
|
|
50
|
+
track(control, property);
|
|
51
|
+
};
|
|
52
|
+
const updateMeta = (
|
|
53
|
+
animationId: string,
|
|
54
|
+
updates: { duration?: number; ease?: string; position?: number },
|
|
55
|
+
) => {
|
|
56
|
+
trackAnimationMetaUpdate(track, updates);
|
|
57
|
+
onUpdateMeta(animationId, updates);
|
|
58
|
+
};
|
|
38
59
|
|
|
39
60
|
return (
|
|
40
61
|
<Section title="Animation" icon={<Film size={15} />}>
|
|
@@ -58,21 +79,94 @@ export const GsapAnimationSection = memo(function GsapAnimationSection({
|
|
|
58
79
|
key={anim.id}
|
|
59
80
|
animation={anim}
|
|
60
81
|
defaultExpanded={index === 0}
|
|
61
|
-
onUpdateProperty={
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
82
|
+
onUpdateProperty={(animationId, property, value) => {
|
|
83
|
+
trackProperty(property);
|
|
84
|
+
onUpdateProperty(animationId, property, value);
|
|
85
|
+
}}
|
|
86
|
+
onUpdateMeta={updateMeta}
|
|
87
|
+
onDeleteAnimation={(animationId) => {
|
|
88
|
+
track("button", "Remove animation");
|
|
89
|
+
onDeleteAnimation(animationId);
|
|
90
|
+
}}
|
|
91
|
+
onAddProperty={(animationId, property) => {
|
|
92
|
+
track("select", "Add effect property");
|
|
93
|
+
onAddProperty(animationId, property);
|
|
94
|
+
}}
|
|
95
|
+
onRemoveProperty={(animationId, property) => {
|
|
96
|
+
track("button", `Remove ${property}`);
|
|
97
|
+
onRemoveProperty(animationId, property);
|
|
98
|
+
}}
|
|
99
|
+
onUpdateFromProperty={
|
|
100
|
+
onUpdateFromProperty
|
|
101
|
+
? (animationId, property, value) => {
|
|
102
|
+
trackProperty(property);
|
|
103
|
+
onUpdateFromProperty(animationId, property, value);
|
|
104
|
+
}
|
|
105
|
+
: undefined
|
|
106
|
+
}
|
|
107
|
+
onAddFromProperty={
|
|
108
|
+
onAddFromProperty
|
|
109
|
+
? (animationId, property) => {
|
|
110
|
+
track("select", "Add from property");
|
|
111
|
+
onAddFromProperty(animationId, property);
|
|
112
|
+
}
|
|
113
|
+
: undefined
|
|
114
|
+
}
|
|
115
|
+
onRemoveFromProperty={
|
|
116
|
+
onRemoveFromProperty
|
|
117
|
+
? (animationId, property) => {
|
|
118
|
+
track("button", `Remove from ${property}`);
|
|
119
|
+
onRemoveFromProperty(animationId, property);
|
|
120
|
+
}
|
|
121
|
+
: undefined
|
|
122
|
+
}
|
|
69
123
|
onLivePreview={onLivePreview}
|
|
70
124
|
onLivePreviewEnd={onLivePreviewEnd}
|
|
71
|
-
onSetArcPath={
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
125
|
+
onSetArcPath={
|
|
126
|
+
onSetArcPath
|
|
127
|
+
? (animationId, config) => {
|
|
128
|
+
track(
|
|
129
|
+
"toggle",
|
|
130
|
+
config.autoRotate !== undefined ? "Auto rotate" : "Arc motion",
|
|
131
|
+
);
|
|
132
|
+
onSetArcPath(animationId, config);
|
|
133
|
+
}
|
|
134
|
+
: undefined
|
|
135
|
+
}
|
|
136
|
+
onUpdateArcSegment={
|
|
137
|
+
onUpdateArcSegment
|
|
138
|
+
? (animationId, segmentIndex, update) => {
|
|
139
|
+
if (update.curviness === undefined) {
|
|
140
|
+
track("button", `Reset arc segment ${segmentIndex + 1}`);
|
|
141
|
+
}
|
|
142
|
+
onUpdateArcSegment(animationId, segmentIndex, update);
|
|
143
|
+
}
|
|
144
|
+
: undefined
|
|
145
|
+
}
|
|
146
|
+
onUpdateKeyframeEase={
|
|
147
|
+
onUpdateKeyframeEase
|
|
148
|
+
? (animationId, percentage, ease) => {
|
|
149
|
+
track("select", "Keyframe ease");
|
|
150
|
+
onUpdateKeyframeEase(animationId, percentage, ease);
|
|
151
|
+
}
|
|
152
|
+
: undefined
|
|
153
|
+
}
|
|
154
|
+
onSetAllKeyframeEases={
|
|
155
|
+
onSetAllKeyframeEases
|
|
156
|
+
? (animationId, ease) => {
|
|
157
|
+
track("select", "All keyframe eases");
|
|
158
|
+
onSetAllKeyframeEases(animationId, ease);
|
|
159
|
+
}
|
|
160
|
+
: undefined
|
|
161
|
+
}
|
|
162
|
+
onUnroll={
|
|
163
|
+
onUnroll
|
|
164
|
+
? (animationId) => {
|
|
165
|
+
track("button", "Unroll animation");
|
|
166
|
+
onUnroll(animationId);
|
|
167
|
+
}
|
|
168
|
+
: undefined
|
|
169
|
+
}
|
|
76
170
|
/>
|
|
77
171
|
))}
|
|
78
172
|
|
|
@@ -85,6 +179,7 @@ export const GsapAnimationSection = memo(function GsapAnimationSection({
|
|
|
85
179
|
type="button"
|
|
86
180
|
title={METHOD_TOOLTIPS[method]}
|
|
87
181
|
onClick={() => {
|
|
182
|
+
track("button", `Add ${method} animation`);
|
|
88
183
|
onAddAnimation(method);
|
|
89
184
|
setAddMenuOpen(false);
|
|
90
185
|
}}
|
|
@@ -1,26 +1,58 @@
|
|
|
1
|
+
import { Eye, EyeSlash } from "@phosphor-icons/react";
|
|
1
2
|
import { X } from "../../icons/SystemIcons";
|
|
3
|
+
import { useTrackDesignInput } from "../../contexts/DesignPanelInputContext";
|
|
2
4
|
import type { DomEditSelection } from "./domEditingTypes";
|
|
3
5
|
|
|
4
|
-
/** The action buttons in the inspector header: Ungroup (groups only), copy, clear. */
|
|
6
|
+
/** The action buttons in the inspector header: visibility, Ungroup (groups only), copy, clear. */
|
|
5
7
|
export function InspectorHeaderActions({
|
|
6
8
|
element,
|
|
7
9
|
copied,
|
|
8
10
|
onCopy,
|
|
9
11
|
onClear,
|
|
10
12
|
onUngroup,
|
|
13
|
+
selectedElementId,
|
|
14
|
+
selectedElementHidden,
|
|
15
|
+
visibilityLabel,
|
|
16
|
+
onToggleHidden,
|
|
11
17
|
}: {
|
|
12
18
|
element: DomEditSelection;
|
|
13
19
|
copied: boolean;
|
|
14
20
|
onCopy: () => void;
|
|
15
21
|
onClear: () => void;
|
|
16
22
|
onUngroup?: () => void;
|
|
23
|
+
selectedElementId?: string | null;
|
|
24
|
+
selectedElementHidden?: boolean;
|
|
25
|
+
visibilityLabel?: string;
|
|
26
|
+
onToggleHidden?: (id: string, hidden: boolean) => void;
|
|
17
27
|
}) {
|
|
28
|
+
const track = useTrackDesignInput();
|
|
18
29
|
return (
|
|
19
30
|
<div className="flex items-center gap-1">
|
|
31
|
+
{selectedElementId && onToggleHidden && (
|
|
32
|
+
<button
|
|
33
|
+
type="button"
|
|
34
|
+
aria-label={visibilityLabel}
|
|
35
|
+
title={visibilityLabel}
|
|
36
|
+
onClick={() => {
|
|
37
|
+
track("toggle", "Element visibility");
|
|
38
|
+
void onToggleHidden(selectedElementId, !selectedElementHidden);
|
|
39
|
+
}}
|
|
40
|
+
className="flex h-6 w-6 items-center justify-center rounded text-neutral-500 transition-colors hover:bg-neutral-800 hover:text-neutral-300"
|
|
41
|
+
>
|
|
42
|
+
{selectedElementHidden ? (
|
|
43
|
+
<EyeSlash size={13} weight="bold" aria-hidden="true" />
|
|
44
|
+
) : (
|
|
45
|
+
<Eye size={13} weight="bold" aria-hidden="true" />
|
|
46
|
+
)}
|
|
47
|
+
</button>
|
|
48
|
+
)}
|
|
20
49
|
{onUngroup && element.dataAttributes["hf-group"] != null && (
|
|
21
50
|
<button
|
|
22
51
|
type="button"
|
|
23
|
-
onClick={
|
|
52
|
+
onClick={() => {
|
|
53
|
+
track("button", "Ungroup");
|
|
54
|
+
onUngroup();
|
|
55
|
+
}}
|
|
24
56
|
title="Ungroup (⌘⇧G)"
|
|
25
57
|
className="flex h-6 items-center rounded px-2 text-[11px] font-medium text-neutral-400 transition-colors hover:bg-neutral-800 hover:text-neutral-200"
|
|
26
58
|
>
|
|
@@ -29,7 +61,10 @@ export function InspectorHeaderActions({
|
|
|
29
61
|
)}
|
|
30
62
|
<button
|
|
31
63
|
type="button"
|
|
32
|
-
onClick={
|
|
64
|
+
onClick={() => {
|
|
65
|
+
track("button", "Copy element info");
|
|
66
|
+
onCopy();
|
|
67
|
+
}}
|
|
33
68
|
className={`flex h-6 w-6 items-center justify-center rounded transition-colors ${
|
|
34
69
|
copied
|
|
35
70
|
? "text-studio-accent"
|
|
@@ -52,7 +87,10 @@ export function InspectorHeaderActions({
|
|
|
52
87
|
<button
|
|
53
88
|
type="button"
|
|
54
89
|
aria-label="Clear selection"
|
|
55
|
-
onClick={
|
|
90
|
+
onClick={() => {
|
|
91
|
+
track("button", "Clear selection");
|
|
92
|
+
onClear();
|
|
93
|
+
}}
|
|
56
94
|
className="flex h-6 w-6 items-center justify-center rounded text-neutral-500 transition-colors hover:bg-neutral-800 hover:text-neutral-300"
|
|
57
95
|
>
|
|
58
96
|
<X size={13} />
|