@hyperframes/studio 0.6.65 → 0.6.67
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/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
|
6
6
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
7
7
|
<title>HyperFrames Studio</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-PGTbQJF5.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-CrxThtSJ.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/studio",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.67",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"@codemirror/view": "6.40.0",
|
|
32
32
|
"@phosphor-icons/react": "^2.1.10",
|
|
33
33
|
"mediabunny": "^1.45.3",
|
|
34
|
-
"@hyperframes/
|
|
35
|
-
"@hyperframes/
|
|
34
|
+
"@hyperframes/player": "0.6.67",
|
|
35
|
+
"@hyperframes/core": "0.6.67"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/react": "19",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"vite": "^6.4.2",
|
|
47
47
|
"vitest": "^3.2.4",
|
|
48
48
|
"zustand": "^5.0.0",
|
|
49
|
-
"@hyperframes/producer": "0.6.
|
|
49
|
+
"@hyperframes/producer": "0.6.67"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"react": "19",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useCallback } from "react";
|
|
1
|
+
import { useCallback, useRef } from "react";
|
|
2
2
|
import { usePlayerStore } from "../player";
|
|
3
3
|
import { FONT_EXT } from "../utils/mediaTypes";
|
|
4
4
|
import type { PatchOperation } from "../utils/sourcePatcher";
|
|
@@ -128,6 +128,8 @@ export function useDomEditCommits({
|
|
|
128
128
|
[fileTree, projectId, importedFontAssetsRef],
|
|
129
129
|
);
|
|
130
130
|
|
|
131
|
+
const reportedUnresolvableRef = useRef(new Set<string>());
|
|
132
|
+
|
|
131
133
|
// fallow-ignore-next-line complexity
|
|
132
134
|
const persistDomEditOperations: PersistDomEditOperations = useCallback(
|
|
133
135
|
async (selection, operations, options) => {
|
|
@@ -173,11 +175,28 @@ export function useDomEditCommits({
|
|
|
173
175
|
const patchData = (await patchResponse.json()) as {
|
|
174
176
|
ok?: boolean;
|
|
175
177
|
changed?: boolean;
|
|
178
|
+
matched?: boolean;
|
|
176
179
|
content?: string;
|
|
177
180
|
};
|
|
178
181
|
|
|
179
182
|
if (!patchData.changed) {
|
|
180
|
-
|
|
183
|
+
if (patchData.matched === false) {
|
|
184
|
+
const targetKey = selection.selector ?? selection.id ?? "selection";
|
|
185
|
+
if (!reportedUnresolvableRef.current.has(targetKey)) {
|
|
186
|
+
reportedUnresolvableRef.current.add(targetKey);
|
|
187
|
+
trackStudioEvent("save_skipped_unresolvable", {
|
|
188
|
+
target_id: selection.id ?? undefined,
|
|
189
|
+
target_selector: selection.selector ?? undefined,
|
|
190
|
+
target_source_file: selection.sourceFile ?? undefined,
|
|
191
|
+
composition: activeCompPath ?? undefined,
|
|
192
|
+
});
|
|
193
|
+
console.warn(
|
|
194
|
+
`[studio] Element not found in source: ${targetKey}. ` +
|
|
195
|
+
"This element may be generated at runtime and cannot be persisted.",
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
return;
|
|
181
200
|
}
|
|
182
201
|
|
|
183
202
|
const patchedContent =
|
package/src/telemetry/system.ts
CHANGED
|
@@ -12,6 +12,7 @@ export interface BrowserSystemMeta {
|
|
|
12
12
|
device_pixel_ratio: number;
|
|
13
13
|
timezone_offset_minutes: number;
|
|
14
14
|
is_mobile: boolean;
|
|
15
|
+
studio_version: string;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
const EMPTY_META: BrowserSystemMeta = {
|
|
@@ -22,6 +23,7 @@ const EMPTY_META: BrowserSystemMeta = {
|
|
|
22
23
|
device_pixel_ratio: 0,
|
|
23
24
|
timezone_offset_minutes: 0,
|
|
24
25
|
is_mobile: false,
|
|
26
|
+
studio_version: "dev",
|
|
25
27
|
};
|
|
26
28
|
|
|
27
29
|
let cached: BrowserSystemMeta | null = null;
|
|
@@ -43,6 +45,9 @@ export function getBrowserSystemMeta(): BrowserSystemMeta {
|
|
|
43
45
|
device_pixel_ratio: window.devicePixelRatio,
|
|
44
46
|
timezone_offset_minutes: new Date().getTimezoneOffset(),
|
|
45
47
|
is_mobile: /Android|iPhone|iPad/i.test(ua),
|
|
48
|
+
studio_version: typeof __STUDIO_VERSION__ !== "undefined" ? __STUDIO_VERSION__ : "dev",
|
|
46
49
|
};
|
|
47
50
|
return cached;
|
|
48
51
|
}
|
|
52
|
+
|
|
53
|
+
declare const __STUDIO_VERSION__: string;
|