@hyperframes/studio 0.6.0-alpha.1 → 0.6.0-alpha.11
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-DjsVzYFP.js +418 -0
- package/dist/assets/index-FWg79aJz.css +1 -0
- package/dist/assets/index-xyVaWqe2.js +108 -0
- package/dist/index.html +2 -2
- package/package.json +4 -4
- package/src/App.tsx +422 -71
- package/src/components/editor/PropertyPanel.test.ts +49 -0
- package/src/components/editor/PropertyPanel.tsx +277 -337
- package/src/components/editor/domEditing.test.ts +248 -0
- package/src/components/editor/domEditing.ts +126 -2
- package/src/components/editor/manualEditingAvailability.test.ts +15 -4
- package/src/components/editor/manualEditingAvailability.ts +4 -2
- package/src/components/editor/manualEdits.ts +15 -3
- package/src/components/nle/NLELayout.test.ts +12 -0
- package/src/components/nle/NLELayout.tsx +63 -24
- package/src/components/nle/NLEPreview.tsx +6 -0
- package/src/components/renders/RenderQueue.tsx +56 -4
- package/src/components/renders/useRenderQueue.ts +30 -6
- package/src/components/sidebar/LeftSidebar.tsx +186 -186
- package/src/player/components/Player.test.ts +58 -0
- package/src/player/components/Player.tsx +71 -4
- package/src/player/components/PlayerControls.tsx +20 -7
- package/src/player/components/Timeline.tsx +45 -20
- package/src/utils/timelineDiscovery.ts +1 -1
- package/dist/assets/hyperframes-player-Cd8vYWxP.js +0 -198
- package/dist/assets/index-D04_ZoMm.js +0 -107
- package/dist/assets/index-UWFaHilT.css +0 -1
|
@@ -4,8 +4,10 @@ import {
|
|
|
4
4
|
buildStrokeWidthStyleUpdates,
|
|
5
5
|
getClipPathInsetPx,
|
|
6
6
|
getCssFilterFunctionPx,
|
|
7
|
+
getPropertyPanelVisibleSections,
|
|
7
8
|
inferBoxShadowPreset,
|
|
8
9
|
inferClipPathPreset,
|
|
10
|
+
isPropertyPanelMediaLikeSelection,
|
|
9
11
|
normalizePanelPxValue,
|
|
10
12
|
setCssFilterFunctionPx,
|
|
11
13
|
} from "./PropertyPanel";
|
|
@@ -64,4 +66,51 @@ describe("PropertyPanel style helpers", () => {
|
|
|
64
66
|
expect(buildStrokeStyleUpdates("none", "4px")).toEqual([["border-style", "none"]]);
|
|
65
67
|
expect(buildStrokeStyleUpdates("solid", "4px")).toEqual([["border-style", "solid"]]);
|
|
66
68
|
});
|
|
69
|
+
|
|
70
|
+
it("orders the simplified default inspector sections around high-confidence edits", () => {
|
|
71
|
+
expect(
|
|
72
|
+
getPropertyPanelVisibleSections({
|
|
73
|
+
hasSelection: true,
|
|
74
|
+
canEditStyles: true,
|
|
75
|
+
hasTextControls: true,
|
|
76
|
+
hasColorControls: true,
|
|
77
|
+
}),
|
|
78
|
+
).toEqual(["Text", "Layout", "Colors", "Radius", "Shadow"]);
|
|
79
|
+
|
|
80
|
+
expect(
|
|
81
|
+
getPropertyPanelVisibleSections({
|
|
82
|
+
hasSelection: true,
|
|
83
|
+
canEditStyles: true,
|
|
84
|
+
hasTextControls: false,
|
|
85
|
+
hasColorControls: false,
|
|
86
|
+
}),
|
|
87
|
+
).toEqual(["Layout", "Radius", "Shadow"]);
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
it("treats media tags and background-image layers as image-like controls", () => {
|
|
91
|
+
expect(
|
|
92
|
+
isPropertyPanelMediaLikeSelection({
|
|
93
|
+
tagName: "img",
|
|
94
|
+
styles: {},
|
|
95
|
+
}),
|
|
96
|
+
).toBe(true);
|
|
97
|
+
|
|
98
|
+
expect(
|
|
99
|
+
isPropertyPanelMediaLikeSelection({
|
|
100
|
+
tagName: "div",
|
|
101
|
+
styles: {
|
|
102
|
+
"background-image": "url(/assets/studio.png)",
|
|
103
|
+
},
|
|
104
|
+
}),
|
|
105
|
+
).toBe(true);
|
|
106
|
+
|
|
107
|
+
expect(
|
|
108
|
+
isPropertyPanelMediaLikeSelection({
|
|
109
|
+
tagName: "div",
|
|
110
|
+
styles: {
|
|
111
|
+
"background-image": "none",
|
|
112
|
+
},
|
|
113
|
+
}),
|
|
114
|
+
).toBe(false);
|
|
115
|
+
});
|
|
67
116
|
});
|