@hyperframes/studio 0.9.40 → 0.9.42
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/{codec-BPK_2CLL.js → codec-CKqLGYc6.js} +1 -1
- package/dist/assets/{hyperframes-player-D7qTTDIp.js → hyperframes-player-DoEYqOIa.js} +1 -1
- package/dist/assets/{index-CdA00Ybn.js → index-DLyQ91Ek.js} +166 -166
- package/dist/assets/{index-QS-DuxAU.js → index-s9iqoWnr.js} +1 -1
- package/dist/assets/{pausedVideoDecoder-Byzz98Gb.js → pausedVideoDecoder-B-ReRg6i.js} +1 -1
- package/dist/{chunk-KF6YVXJP.js → chunk-4QQMX4BX.js} +6 -3
- package/dist/{chunk-VZ5MD32A.js → chunk-GVW7AU57.js} +190 -254
- package/dist/{chunk-AV2PV7NE.js → chunk-VHV2ZDKY.js} +4 -40
- package/dist/{domEditingLayers-4KRREI5C.js → domEditingLayers-SA5KLSSS.js} +4 -2
- package/dist/index.d.ts +12 -0
- package/dist/index.html +1 -1
- package/dist/index.js +1501 -818
- package/dist/player.js +2 -2
- package/package.json +10 -10
- package/src/components/editor/DomEditOverlay.tsx +3 -15
- package/src/components/editor/LayersPanel.opaque.test.ts +176 -0
- package/src/components/editor/LayersPanel.tsx +41 -10
- package/src/components/editor/clickAfterPreventedPress.test.tsx +17 -1
- package/src/components/editor/domEditInlineText.ts +1 -16
- package/src/components/editor/domEditOverlayBasis.ts +7 -2
- package/src/components/editor/domEditOverlayCrop.test.ts +1 -1
- package/src/components/editor/domEditOverlayCrop.ts +17 -3
- package/src/components/editor/domEditOverlayGeometry.ts +64 -139
- package/src/components/editor/domEditSelectionRules.ts +138 -0
- package/src/components/editor/domEditing.test.ts +6 -28
- package/src/components/editor/domEditingDom.preview.test.ts +3 -3
- package/src/components/editor/domEditingDom.ts +3 -76
- package/src/components/editor/domEditingElement.ts +19 -240
- package/src/components/editor/domEditingGroups.ts +0 -31
- package/src/components/editor/domEditingLayers.ts +95 -100
- package/src/components/editor/domEditingRootLayer.ts +35 -30
- package/src/components/editor/domEditingTypes.ts +10 -0
- package/src/components/editor/gestureUndoRevert.ts +18 -1
- package/src/components/editor/inlineTextStyleRange.fill.test.ts +129 -0
- package/src/components/editor/inlineTextStyleRange.test.ts +0 -82
- package/src/components/editor/layerKind.ts +2 -19
- package/src/components/editor/layersPanelSort.ts +2 -2
- package/src/components/editor/manualEdits.ts +1 -0
- package/src/components/editor/manualEditsSnapshot.ts +10 -0
- package/src/components/editor/manualOffsetDrag.test.ts +1 -1
- package/src/components/editor/manualOffsetDrag.ts +7 -1
- package/src/components/editor/marqueeCommit.ts +47 -4
- package/src/components/editor/plainTranslate.ts +35 -16
- package/src/components/editor/previewDrafts.test.ts +263 -0
- package/src/components/editor/previewDrafts.ts +73 -0
- package/src/components/editor/previewGestureStarts.ts +73 -10
- package/src/components/editor/previewLayers.test.ts +308 -0
- package/src/components/editor/previewLayers.ts +164 -0
- package/src/components/editor/previewOverlayRects.test.ts +316 -0
- package/src/components/editor/previewOverlayRects.ts +150 -0
- package/src/components/editor/previewPointerTargets.test.ts +327 -0
- package/src/components/editor/previewSelection.test.ts +481 -0
- package/src/components/editor/previewSelection.ts +516 -0
- package/src/components/editor/probeSourceElement.ts +19 -1
- package/src/components/editor/propertyPanelFill.tsx +5 -1
- package/src/components/editor/resizeDraft.ts +38 -0
- package/src/components/editor/useDomEditOverlayGestures.ts +2 -2
- package/src/components/editor/useDomEditOverlayRects.ts +80 -1
- package/src/components/editor/useInlineTextEditing.tsx +1 -6
- package/src/components/editor/useLayerDrag.ts +1 -1
- package/src/components/nle/NLEPreview.slowBoot.test.ts +0 -1
- package/src/hooks/domEditDeleteMembers.test.ts +7 -0
- package/src/hooks/domSelectionTestHarness.ts +1 -1
- package/src/hooks/domSelectionTimelineMirror.ts +3 -1
- package/src/hooks/timelineTimingSync.ts +4 -1
- package/src/hooks/useDomEditSession.test.tsx +23 -1
- package/src/hooks/useDomEditSession.ts +2 -1
- package/src/hooks/useDomSelection.ts +63 -47
- package/src/hooks/useEditorSave.test.tsx +22 -1
- package/src/hooks/useEditorSave.ts +3 -1
- package/src/hooks/useGsapSelectionHandlers.test.tsx +17 -0
- package/src/hooks/useGsapSelectionHandlers.ts +2 -1
- package/src/hooks/usePreviewInteraction.test.ts +10 -2
- package/src/hooks/usePreviewInteraction.ts +9 -5
- package/src/hooks/useProjectFileWriter.ts +7 -3
- package/src/hooks/useStudioSelectionPublisher.test.tsx +50 -0
- package/src/hooks/useStudioSelectionPublisher.ts +9 -7
- package/src/hooks/useTimelineSelectionPreviewSync.test.tsx +30 -0
- package/src/hooks/useTimelineSelectionPreviewSync.ts +7 -2
- package/src/player/lib/layerOrdering.ts +2 -11
- package/src/player/lib/previewChannel.ts +4 -3
- package/src/player/lib/previewElements.ts +143 -3
- package/src/styles/hex-baseline.json +1 -2
- package/src/test-setup.ts +2 -0
- package/src/utils/gsapSoftReload.ts +1 -1
- package/src/utils/studioFileHistory.ts +1 -1
- package/src/utils/studioHelpers.ts +27 -17
- package/src/utils/studioPreviewHelpers.test.ts +8 -8
- package/src/utils/studioPreviewHelpers.ts +26 -242
- package/src/utils/studioSaveDiagnostics.test.ts +34 -0
- package/src/utils/studioSaveDiagnostics.ts +35 -6
- package/src/utils/timelineCompositionInsert.ts +3 -1
- package/src/components/editor/domEditOverlayTransform.ts +0 -126
|
@@ -46,11 +46,11 @@ function getSourceScopedSelectorIndex(doc, el, selector, sourceFile, resolveSour
|
|
|
46
46
|
|
|
47
47
|
// src/components/editor/domEditingDom.ts
|
|
48
48
|
import { getLogicalOpacity } from "@hyperframes/core/studio-preview-mark";
|
|
49
|
-
import { COLOR_GRADING_SOURCE_HIDDEN_ATTR } from "@hyperframes/core/color-grading";
|
|
50
49
|
import {
|
|
51
50
|
buildStableSelector,
|
|
52
51
|
escapeCssString,
|
|
53
52
|
getPreferredClassSelector,
|
|
53
|
+
isElementVisibleThroughAncestors,
|
|
54
54
|
readElementSource
|
|
55
55
|
} from "@hyperframes/core/runtime/editing-port";
|
|
56
56
|
|
|
@@ -112,32 +112,6 @@ function isTextBearingTag(tagName) {
|
|
|
112
112
|
function isEditableTextLeaf(el) {
|
|
113
113
|
return isTextBearingTag(el.tagName.toLowerCase()) && el.children.length === 0;
|
|
114
114
|
}
|
|
115
|
-
function elementRendersItself(win, el) {
|
|
116
|
-
const computed = win.getComputedStyle(el);
|
|
117
|
-
if (computed.display === "none" || computed.visibility === "hidden") return false;
|
|
118
|
-
const opacity = Number.parseFloat(getLogicalOpacity(el, computed));
|
|
119
|
-
return !(Number.isFinite(opacity) && opacity <= 0.01 && !el.hasAttribute(COLOR_GRADING_SOURCE_HIDDEN_ATTR));
|
|
120
|
-
}
|
|
121
|
-
function isElementVisibleThroughAncestors(el, memo) {
|
|
122
|
-
const win = el.ownerDocument.defaultView;
|
|
123
|
-
if (!win) return true;
|
|
124
|
-
const pending = [];
|
|
125
|
-
let inherited = true;
|
|
126
|
-
for (let node = el; node; node = node.parentElement) {
|
|
127
|
-
const answered = memo?.get(node);
|
|
128
|
-
if (answered !== void 0) {
|
|
129
|
-
inherited = answered;
|
|
130
|
-
break;
|
|
131
|
-
}
|
|
132
|
-
pending.push(node);
|
|
133
|
-
}
|
|
134
|
-
for (let i = pending.length - 1; i >= 0; i -= 1) {
|
|
135
|
-
const node = pending[i];
|
|
136
|
-
inherited = inherited && elementRendersItself(win, node);
|
|
137
|
-
memo?.set(node, inherited);
|
|
138
|
-
}
|
|
139
|
-
return inherited;
|
|
140
|
-
}
|
|
141
115
|
function getCuratedComputedStyles(el) {
|
|
142
116
|
const styles = {};
|
|
143
117
|
const computed = el.ownerDocument.defaultView?.getComputedStyle(el);
|
|
@@ -165,17 +139,6 @@ function getDataAttributes(el) {
|
|
|
165
139
|
}
|
|
166
140
|
return attrs;
|
|
167
141
|
}
|
|
168
|
-
function findClosestByAttribute(el, attributeNames) {
|
|
169
|
-
let current = el;
|
|
170
|
-
while (current) {
|
|
171
|
-
const candidate = current;
|
|
172
|
-
if (attributeNames.some((attribute) => candidate.hasAttribute(attribute))) {
|
|
173
|
-
return candidate;
|
|
174
|
-
}
|
|
175
|
-
current = current.parentElement;
|
|
176
|
-
}
|
|
177
|
-
return null;
|
|
178
|
-
}
|
|
179
142
|
var compositionSourceMap = /* @__PURE__ */ new Map();
|
|
180
143
|
var compositionSourceMapRevision = 0;
|
|
181
144
|
function setCompositionSourceMap(map) {
|
|
@@ -1099,18 +1062,19 @@ export {
|
|
|
1099
1062
|
rgbToHsv,
|
|
1100
1063
|
hsvToRgb,
|
|
1101
1064
|
withSelectorIndexPass,
|
|
1065
|
+
CURATED_STYLE_PROPERTIES,
|
|
1102
1066
|
getLogicalOpacity,
|
|
1103
1067
|
buildStableSelector,
|
|
1104
1068
|
escapeCssString,
|
|
1069
|
+
isElementVisibleThroughAncestors,
|
|
1105
1070
|
isHtmlElement,
|
|
1106
1071
|
isEditableTextLeaf,
|
|
1107
|
-
isElementVisibleThroughAncestors,
|
|
1108
1072
|
getCuratedComputedStyles,
|
|
1109
1073
|
getInlineStyles,
|
|
1110
1074
|
getDataAttributes,
|
|
1111
|
-
findClosestByAttribute,
|
|
1112
1075
|
setCompositionSourceMap,
|
|
1113
1076
|
getCompositionSourceMapRevision,
|
|
1077
|
+
resolveElementSourceFile,
|
|
1114
1078
|
getSourceFileForElement,
|
|
1115
1079
|
normalizeTimelineCompositionSource,
|
|
1116
1080
|
querySelectorAllSafely,
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
buildDomEditStylePatchOperation,
|
|
6
6
|
buildDomEditTextPatchOperation,
|
|
7
7
|
buildTextFieldChildLocator,
|
|
8
|
+
capabilityFacts,
|
|
8
9
|
collectDomEditLayerItems,
|
|
9
10
|
collectDomEditTextFields,
|
|
10
11
|
countDomEditChildLayers,
|
|
@@ -19,8 +20,8 @@ import {
|
|
|
19
20
|
resolveDomEditCapabilities,
|
|
20
21
|
resolveDomEditSelection,
|
|
21
22
|
serializeDomEditTextFields
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-GVW7AU57.js";
|
|
24
|
+
import "./chunk-VHV2ZDKY.js";
|
|
24
25
|
import "./chunk-MLKGABMK.js";
|
|
25
26
|
export {
|
|
26
27
|
buildDefaultDomEditTextField,
|
|
@@ -29,6 +30,7 @@ export {
|
|
|
29
30
|
buildDomEditStylePatchOperation,
|
|
30
31
|
buildDomEditTextPatchOperation,
|
|
31
32
|
buildTextFieldChildLocator,
|
|
33
|
+
capabilityFacts,
|
|
32
34
|
collectDomEditLayerItems,
|
|
33
35
|
collectDomEditTextFields,
|
|
34
36
|
countDomEditChildLayers,
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { RefObject, MutableRefObject, ReactNode, DragEventHandler, ComponentProp
|
|
|
4
4
|
import { RuntimeTimelineClipIdentity, PlaybackHeldBy, HyperframePickerElementInfo } from '@hyperframes/core';
|
|
5
5
|
import { GsapAnimation, ParsedGsap, PropertyGroupName } from '@hyperframes/core/gsap-parser';
|
|
6
6
|
import { GsapAnimation as GsapAnimation$1, ArcPathSegment } from '@hyperframes/parsers/gsap-parser';
|
|
7
|
+
import { EditingElementHandle, LayerKind } from '@hyperframes/core/runtime/editing-port';
|
|
7
8
|
import { Composition } from '@hyperframes/sdk';
|
|
8
9
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
10
|
import { S as StudioKeys, a as StudioKeyAction } from './keys-CaWcxUST.js';
|
|
@@ -772,6 +773,9 @@ interface DomEditTextField {
|
|
|
772
773
|
}
|
|
773
774
|
interface DomEditSelection extends PatchTarget {
|
|
774
775
|
element: HTMLElement;
|
|
776
|
+
handle?: EditingElementHandle;
|
|
777
|
+
hasAudio?: boolean;
|
|
778
|
+
src?: string | null;
|
|
775
779
|
label: string;
|
|
776
780
|
tagName: string;
|
|
777
781
|
sourceFile: string;
|
|
@@ -806,6 +810,12 @@ interface DomEditLayerItem {
|
|
|
806
810
|
selector?: string;
|
|
807
811
|
selectorIndex?: number;
|
|
808
812
|
sourceFile: string;
|
|
813
|
+
preview?: {
|
|
814
|
+
handle: string;
|
|
815
|
+
zIndex: number;
|
|
816
|
+
kind: LayerKind;
|
|
817
|
+
dataAttributes: Record<string, string>;
|
|
818
|
+
};
|
|
809
819
|
}
|
|
810
820
|
interface DomEditContextOptions {
|
|
811
821
|
activeCompositionPath: string | null;
|
|
@@ -1003,8 +1013,10 @@ type TimelineMoveUpdates = Pick<TimelineElement, "start" | "track"> & {
|
|
|
1003
1013
|
declare class StudioSaveHttpError extends Error {
|
|
1004
1014
|
readonly statusCode: number;
|
|
1005
1015
|
readonly alreadyToasted: boolean;
|
|
1016
|
+
readonly heldFile: boolean;
|
|
1006
1017
|
constructor(message: string, statusCode: number, options?: {
|
|
1007
1018
|
alreadyToasted?: boolean;
|
|
1019
|
+
heldFile?: boolean;
|
|
1008
1020
|
});
|
|
1009
1021
|
}
|
|
1010
1022
|
declare class StudioFileConflictError extends StudioSaveHttpError {
|
package/dist/index.html
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
document.documentElement.dataset.theme = "paper";
|
|
15
15
|
}
|
|
16
16
|
</script>
|
|
17
|
-
<script type="module" crossorigin src="/assets/index-
|
|
17
|
+
<script type="module" crossorigin src="/assets/index-DLyQ91Ek.js"></script>
|
|
18
18
|
<link rel="stylesheet" crossorigin href="/assets/index-4VGEAZyf.css">
|
|
19
19
|
</head>
|
|
20
20
|
<body>
|