@hyperframes/studio 0.8.104 → 0.8.105
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-DAoaajuM.js → hyperframes-player-tnfCiVdR.js} +1 -1
- package/dist/assets/{index-BDK4rTMb.js → index-Ca6LZlVb.js} +1 -1
- package/dist/assets/index-Cre9X4RS.css +1 -0
- package/dist/assets/{index-De2aO4XM.js → index-DEDhPmPD.js} +205 -205
- package/dist/assets/{index-WV9LroAD.js → index-zpe332hb.js} +1 -1
- package/dist/{chunk-62DDWOSH.js → chunk-EEXSYY5F.js} +19 -18
- package/dist/chunk-EEXSYY5F.js.map +1 -0
- package/dist/{chunk-6GAO75IU.js → chunk-NCUBAVGK.js} +10 -8
- package/dist/chunk-NCUBAVGK.js.map +1 -0
- package/dist/{chunk-HIGHVWYD.js → chunk-QADHJFDF.js} +2 -2
- package/dist/index.css +6 -1
- package/dist/index.css.map +1 -1
- package/dist/index.html +2 -2
- package/dist/index.js +614 -638
- package/dist/index.js.map +1 -1
- package/dist/player.js +2 -2
- package/dist/styles/tailwind-preset.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/ui.js +2 -2
- package/package.json +8 -8
- package/src/captions/components/CaptionAnimationPanel.tsx +2 -2
- package/src/captions/components/CaptionPropertyPanel.tsx +2 -2
- package/src/captions/components/CaptionTimeline.tsx +3 -3
- package/src/components/AskAgentModal.tsx +1 -1
- package/src/components/LintModal.tsx +35 -35
- package/src/components/StudioErrorBoundary.tsx +1 -1
- package/src/components/StudioHeader.dom.test.tsx +4 -4
- package/src/components/StudioHeader.tsx +2 -1
- package/src/components/StudioToast.tsx +7 -16
- package/src/components/TimelineToolPicker.tsx +1 -1
- package/src/components/TimelineToolbar.tsx +11 -11
- package/src/components/dock/Dock.tsx +1 -1
- package/src/components/dock/dock.css +9 -1
- package/src/components/editor/AnimationCard.tsx +5 -5
- package/src/components/editor/AnimationCardParts.tsx +1 -1
- package/src/components/editor/BlockParamsPanel.tsx +3 -3
- package/src/components/editor/BorderRadiusEditor.tsx +8 -15
- package/src/components/editor/CanvasContextMenu.tsx +1 -1
- package/src/components/editor/ComputedTweenNotice.tsx +1 -1
- package/src/components/editor/DomEditRotateHandle.tsx +1 -1
- package/src/components/editor/EaseCurveSection.tsx +14 -19
- package/src/components/editor/EaseModeControls.tsx +2 -2
- package/src/components/editor/EaseParamFields.tsx +8 -8
- package/src/components/editor/FileTree.tsx +1 -1
- package/src/components/editor/FileTreeIcons.tsx +47 -26
- package/src/components/editor/FileTreeNodes.tsx +11 -8
- package/src/components/editor/GestureRecordControl.tsx +3 -3
- package/src/components/editor/GsapAddAnimationControl.tsx +1 -1
- package/src/components/editor/GsapAnimationSection.tsx +2 -2
- package/src/components/editor/InlineTextToolbar.tsx +4 -4
- package/src/components/editor/InspectorHeaderActions.tsx +1 -1
- package/src/components/editor/KeyframeDiamond.tsx +6 -4
- package/src/components/editor/KeyframeNavigation.tsx +4 -4
- package/src/components/editor/LayersPanel.tsx +3 -3
- package/src/components/editor/PromotableControl.tsx +2 -2
- package/src/components/editor/PropertyPanelEmptyState.tsx +4 -4
- package/src/components/editor/PropertyPanelFlatFooter.tsx +2 -2
- package/src/components/editor/PropertyPanelFlatHeader.test.tsx +1 -1
- package/src/components/editor/PropertyPanelFlatHeader.tsx +2 -2
- package/src/components/editor/SnapToolbar.tsx +5 -5
- package/src/components/editor/TimelineFxPopover.tsx +4 -4
- package/src/components/editor/Transform3DCube.tsx +1 -1
- package/src/components/editor/anchoredResizeReleaseShift.test.ts +0 -84
- package/src/components/editor/easeCurveSvg.tsx +1 -1
- package/src/components/editor/manualEditsDom.ts +3 -3
- package/src/components/editor/manualEditsDomPatches.test.ts +2 -86
- package/src/components/editor/manualEditsDomPatches.ts +0 -30
- package/src/components/editor/manualEditsSnapshot.ts +1 -0
- package/src/components/editor/persistSeam.integration.test.ts +0 -18
- package/src/components/editor/plainTranslate.ts +34 -3
- package/src/components/editor/propertyPanelColorCurveGraph.tsx +2 -2
- package/src/components/editor/propertyPanelColorGradingControls.tsx +1 -1
- package/src/components/editor/propertyPanelColorGradingSection.tsx +8 -8
- package/src/components/editor/propertyPanelColorGradingSlider.tsx +1 -1
- package/src/components/editor/propertyPanelColorSecondary.tsx +4 -4
- package/src/components/editor/propertyPanelFill.tsx +6 -6
- package/src/components/editor/propertyPanelFlatColorGradingAccessory.tsx +3 -3
- package/src/components/editor/propertyPanelFlatColorGradingSection.test.tsx +1 -1
- package/src/components/editor/propertyPanelFlatColorGradingSection.tsx +6 -9
- package/src/components/editor/propertyPanelFlatEffectsSection.tsx +4 -4
- package/src/components/editor/propertyPanelFlatMediaSection.tsx +2 -2
- package/src/components/editor/propertyPanelFlatMotionSection.tsx +2 -2
- package/src/components/editor/propertyPanelFlatOverlaysSection.tsx +2 -2
- package/src/components/editor/propertyPanelFlatPrimitives.test.tsx +4 -3
- package/src/components/editor/propertyPanelFlatPrimitives.tsx +1 -1
- package/src/components/editor/propertyPanelFlatSliderReadout.tsx +1 -1
- package/src/components/editor/propertyPanelFont.tsx +2 -2
- package/src/components/editor/propertyPanelFxCarveModule.tsx +1 -1
- package/src/components/editor/propertyPanelFxControls.tsx +2 -2
- package/src/components/editor/propertyPanelFxEqModule.tsx +2 -2
- package/src/components/editor/propertyPanelFxNodeRow.tsx +1 -1
- package/src/components/editor/propertyPanelFxPresetRun.tsx +1 -1
- package/src/components/editor/propertyPanelMediaSection.tsx +1 -1
- package/src/components/editor/propertyPanelPrimitives.tsx +1 -1
- package/src/components/editor/propertyPanelSections.tsx +2 -2
- package/src/components/editor/propertyPanelValueTier.test.ts +1 -1
- package/src/components/editor/propertyPanelValueTier.ts +1 -1
- package/src/components/feedback/StudioFeedbackCard.tsx +11 -23
- package/src/components/nle/AssetPreviewOverlay.tsx +1 -1
- package/src/components/nle/AudioMeterStrip.tsx +2 -2
- package/src/components/nle/NLEPreview.test.ts +8 -4
- package/src/components/nle/PreviewOverlays.tsx +1 -1
- package/src/components/nle/PreviewPane.tsx +3 -3
- package/src/components/nle/PreviewPoster.tsx +29 -1
- package/src/components/nle/PreviewZoomOverlay.tsx +1 -1
- package/src/components/panels/SlideshowPanel.tsx +4 -4
- package/src/components/panels/SlideshowSubPanels.tsx +19 -21
- package/src/components/panels/VariablesBindElement.tsx +1 -1
- package/src/components/panels/VariablesDeclarationForm.tsx +1 -1
- package/src/components/panels/VariablesPanel.tsx +4 -6
- package/src/components/panels/VariablesRowAction.tsx +1 -1
- package/src/components/renders/FfmpegRequiredNotice.tsx +4 -4
- package/src/components/renders/RenderQueue.tsx +2 -2
- package/src/components/renders/RenderQueueItem.tsx +3 -3
- package/src/components/sidebar/AssetCard.tsx +3 -3
- package/src/components/sidebar/AssetContextMenu.tsx +7 -7
- package/src/components/sidebar/AssetsTab.tsx +6 -6
- package/src/components/sidebar/AudioRow.tsx +5 -3
- package/src/components/sidebar/BlocksTab.tsx +6 -6
- package/src/components/sidebar/CompositionsTab.drag.test.tsx +3 -69
- package/src/components/sidebar/CompositionsTab.rootBadge.test.tsx +4 -50
- package/src/components/sidebar/CompositionsTab.thumbnails.test.tsx +256 -0
- package/src/components/sidebar/CompositionsTab.tsx +65 -12
- package/src/components/sidebar/PromptPreviewModal.tsx +3 -3
- package/src/components/sidebar/SidebarLintButton.tsx +3 -3
- package/src/components/sidebar/compositionsTabTestUtils.tsx +39 -0
- package/src/components/timelineToolbarStyles.ts +3 -3
- package/src/components/ui/Button.tsx +4 -4
- package/src/components/ui/HyperframesLogo.tsx +19 -18
- package/src/components/ui/Input.tsx +1 -1
- package/src/components/ui/Menu.tsx +4 -2
- package/src/hooks/elementOffsetStager.ts +8 -7
- package/src/hooks/useClipboard.source.test.ts +42 -4
- package/src/hooks/useClipboard.ts +13 -3
- package/src/hooks/useDomEditCommits.ts +0 -3
- package/src/hooks/useDomGeometryCommit.test.tsx +4 -1
- package/src/hooks/useDomGeometryCommit.ts +0 -1
- package/src/hooks/useDomGeometryCommits.test.tsx +177 -32
- package/src/hooks/useDomGeometryCommits.ts +4 -49
- package/src/player/components/ClipContextMenu.tsx +1 -1
- package/src/player/components/CompositionThumbnail.tsx +23 -11
- package/src/player/components/EditModal.tsx +6 -6
- package/src/player/components/KeyframeDiamondContextMenu.tsx +2 -2
- package/src/player/components/PlayerControls.tsx +3 -3
- package/src/player/components/ShortcutsPanel.tsx +8 -20
- package/src/player/components/TimelineCanvas.tsx +1 -1
- package/src/player/components/TimelineClip.tsx +2 -2
- package/src/player/components/TimelineEmptyState.tsx +2 -2
- package/src/player/components/TimelineLanes.tsx +0 -1
- package/src/player/components/TrackClipCount.tsx +1 -1
- package/src/player/components/VolumeControl.tsx +1 -1
- package/src/player/components/timelineClipChildren.tsx +1 -1
- package/src/player/components/timelineMotionStyles.test.ts +6 -22
- package/src/player/components/trackHeaderLabelRows.tsx +16 -16
- package/src/player/lib/thumbnailScheduler.ts +4 -5
- package/src/player/lib/timelineViewportBudgets.test.ts +1 -1
- package/src/player/lib/timelineViewportBudgets.ts +1 -1
- package/src/styles/hex-baseline.json +7 -19
- package/src/styles/studio.css +0 -9
- package/src/styles/tailwind-preset.shared.js +2 -1
- package/src/styles/theme.css +204 -147
- package/src/styles/theme.test.ts +13 -9
- package/src/utils/blockCategories.ts +41 -9
- package/src/utils/clipboardPayload.ts +2 -0
- package/dist/assets/index-CQN3M56N.css +0 -1
- package/dist/chunk-62DDWOSH.js.map +0 -1
- package/dist/chunk-6GAO75IU.js.map +0 -1
- package/src/hooks/gsapTargetCache.ts +0 -62
- /package/dist/{chunk-HIGHVWYD.js.map → chunk-QADHJFDF.js.map} +0 -0
package/src/styles/theme.test.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
/** Guards the ways `theme.css` can silently break: a dropped CSS custom
|
|
4
4
|
* property, a utility that stops compiling, the stock Tailwind palette
|
|
5
|
-
* leaking back in, or the
|
|
5
|
+
* leaking back in, or the legacy colours drifting from it. */
|
|
6
6
|
|
|
7
7
|
import { readFileSync } from "node:fs";
|
|
8
8
|
import path from "node:path";
|
|
@@ -11,7 +11,6 @@ import { createRoot } from "react-dom/client";
|
|
|
11
11
|
import { Gear, IconContext } from "@phosphor-icons/react";
|
|
12
12
|
import { compile } from "tailwindcss";
|
|
13
13
|
import { afterEach, describe, expect, it } from "vitest";
|
|
14
|
-
import studioPreset from "./tailwind-preset.shared.js";
|
|
15
14
|
import { readIconTokens } from "./iconTokens";
|
|
16
15
|
import { loadStylesheet, STYLES_DIR, TAILWIND_DIR } from "./styleSources";
|
|
17
16
|
|
|
@@ -52,7 +51,9 @@ describe("studio theme", () => {
|
|
|
52
51
|
it("emits the semantic palette as custom properties and as utilities", async () => {
|
|
53
52
|
const css = await build("studio.css", ["bg-accent", "text-text-2", "border-border"]);
|
|
54
53
|
|
|
55
|
-
expect(rootVariables(css).get("--color-accent")).toBe(
|
|
54
|
+
expect(rootVariables(css).get("--color-accent")).toBe(
|
|
55
|
+
"light-dark(oklch(0.536 0.114 164), oklch(0.82 0.159 164))",
|
|
56
|
+
);
|
|
56
57
|
expect(css).toContain(".bg-accent {");
|
|
57
58
|
expect(css).toContain("background-color: var(--color-accent)");
|
|
58
59
|
});
|
|
@@ -127,7 +128,7 @@ describe("studio theme", () => {
|
|
|
127
128
|
expect(css).toContain(".duration-open {");
|
|
128
129
|
});
|
|
129
130
|
|
|
130
|
-
it("keeps every legacy Tailwind palette entry at its upstream
|
|
131
|
+
it("keeps every legacy Tailwind palette entry that is not a role at its upstream value", async () => {
|
|
131
132
|
// These are copies of Tailwind's own values, kept only so existing markup
|
|
132
133
|
// renders unchanged. A Tailwind upgrade that moves one of them would
|
|
133
134
|
// otherwise silently change Studio's colors.
|
|
@@ -138,7 +139,9 @@ describe("studio theme", () => {
|
|
|
138
139
|
),
|
|
139
140
|
].map(([, name, value]) => [name, value.trim()]),
|
|
140
141
|
);
|
|
141
|
-
const legacy = [
|
|
142
|
+
const legacy = [
|
|
143
|
+
...themeSource.matchAll(/\n\s*(--color-[a-z]+-(?:50|\d00|950)):\s*([^;]+);/g),
|
|
144
|
+
].filter(([, , value]) => !value.trim().startsWith("var("));
|
|
142
145
|
|
|
143
146
|
expect(legacy.length).toBeGreaterThan(0);
|
|
144
147
|
for (const [, name, value] of legacy) {
|
|
@@ -147,11 +150,12 @@ describe("studio theme", () => {
|
|
|
147
150
|
}
|
|
148
151
|
});
|
|
149
152
|
|
|
150
|
-
it("
|
|
151
|
-
const
|
|
153
|
+
it("maps every neutral step onto a Graphite role, so the stock scale follows the theme", () => {
|
|
154
|
+
const steps = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
152
155
|
|
|
153
|
-
|
|
154
|
-
|
|
156
|
+
for (const step of steps) {
|
|
157
|
+
expect(declaredValue(`--color-neutral-${step}`)).toMatch(/^var\(--color-[a-z0-9-]+\)$/);
|
|
158
|
+
}
|
|
155
159
|
});
|
|
156
160
|
|
|
157
161
|
it("reads the icon defaults off the theme rather than hard-coding them", () => {
|
|
@@ -8,15 +8,47 @@ export type { BlockCategory };
|
|
|
8
8
|
export { BLOCK_CATEGORIES, resolveBlockCategory };
|
|
9
9
|
|
|
10
10
|
const COLOR_MAP: Record<BlockCategory, { bg: string; text: string; dot: string }> = {
|
|
11
|
-
transitions: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
transitions: {
|
|
12
|
+
bg: "bg-blue-500/15",
|
|
13
|
+
text: "text-[light-dark(oklch(0.48_0.12_255),var(--color-blue-400))]",
|
|
14
|
+
dot: "bg-[light-dark(oklch(0.48_0.12_255),var(--color-blue-400))]",
|
|
15
|
+
},
|
|
16
|
+
vfx: {
|
|
17
|
+
bg: "bg-purple-500/15",
|
|
18
|
+
text: "text-[light-dark(oklch(0.48_0.12_305),var(--color-purple-400))]",
|
|
19
|
+
dot: "bg-[light-dark(oklch(0.48_0.12_305),var(--color-purple-400))]",
|
|
20
|
+
},
|
|
21
|
+
social: {
|
|
22
|
+
bg: "bg-pink-500/15",
|
|
23
|
+
text: "text-[light-dark(oklch(0.48_0.12_350),var(--color-pink-400))]",
|
|
24
|
+
dot: "bg-[light-dark(oklch(0.48_0.12_350),var(--color-pink-400))]",
|
|
25
|
+
},
|
|
26
|
+
data: {
|
|
27
|
+
bg: "bg-green-500/15",
|
|
28
|
+
text: "text-[light-dark(oklch(0.48_0.12_152),var(--color-green-400))]",
|
|
29
|
+
dot: "bg-[light-dark(oklch(0.48_0.12_152),var(--color-green-400))]",
|
|
30
|
+
},
|
|
31
|
+
scenes: { bg: "bg-amber-500/15", text: "text-warning-ink", dot: "bg-warning-ink" },
|
|
32
|
+
captions: {
|
|
33
|
+
bg: "bg-cyan-500/15",
|
|
34
|
+
text: "text-[light-dark(oklch(0.48_0.12_212),var(--color-cyan-400))]",
|
|
35
|
+
dot: "bg-[light-dark(oklch(0.48_0.12_212),var(--color-cyan-400))]",
|
|
36
|
+
},
|
|
37
|
+
effects: {
|
|
38
|
+
bg: "bg-rose-500/15",
|
|
39
|
+
text: "text-[light-dark(oklch(0.48_0.12_13),var(--color-rose-400))]",
|
|
40
|
+
dot: "bg-[light-dark(oklch(0.48_0.12_13),var(--color-rose-400))]",
|
|
41
|
+
},
|
|
42
|
+
"text-effects": {
|
|
43
|
+
bg: "bg-violet-500/15",
|
|
44
|
+
text: "text-[light-dark(oklch(0.48_0.12_294),var(--color-violet-400))]",
|
|
45
|
+
dot: "bg-[light-dark(oklch(0.48_0.12_294),var(--color-violet-400))]",
|
|
46
|
+
},
|
|
47
|
+
"code-animation": {
|
|
48
|
+
bg: "bg-emerald-500/15",
|
|
49
|
+
text: "text-[light-dark(oklch(0.48_0.12_163),var(--color-emerald-400))]",
|
|
50
|
+
dot: "bg-[light-dark(oklch(0.48_0.12_163),var(--color-emerald-400))]",
|
|
51
|
+
},
|
|
20
52
|
};
|
|
21
53
|
|
|
22
54
|
export function getCategoryColors(category: BlockCategory) {
|
|
@@ -22,6 +22,7 @@ export type ClipboardPayload =
|
|
|
22
22
|
kind: "dom-element";
|
|
23
23
|
html: string;
|
|
24
24
|
sourceFile: string;
|
|
25
|
+
projectId?: string;
|
|
25
26
|
originSelector?: string;
|
|
26
27
|
originSelectorIndex?: number;
|
|
27
28
|
};
|
|
@@ -70,6 +71,7 @@ export function deserializeClipboardPayload(json: string): ClipboardPayload | nu
|
|
|
70
71
|
kind: "dom-element",
|
|
71
72
|
html: obj.html,
|
|
72
73
|
sourceFile: obj.sourceFile,
|
|
74
|
+
projectId: typeof obj.projectId === "string" ? obj.projectId : undefined,
|
|
73
75
|
originSelector: typeof obj.originSelector === "string" ? obj.originSelector : undefined,
|
|
74
76
|
originSelectorIndex:
|
|
75
77
|
typeof obj.originSelectorIndex === "number" ? obj.originSelectorIndex : undefined,
|