hyperframes 0.7.63 → 0.7.64
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/cli.js +415 -75
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/studio/assets/{hyperframes-player-BO2UXx-E.js → hyperframes-player-D4jpio27.js} +1 -1
- package/dist/studio/assets/{index-C_7k3kwr.js → index-BOMWJSjh.js} +175 -175
- package/dist/studio/assets/{index-_72wCKSP.js → index-CqjWmIbE.js} +1 -1
- package/dist/studio/assets/{index-C0A0DlLk.js → index-srObT-DA.js} +1 -1
- package/dist/studio/chunk-PZ5AY32C.js +10 -0
- package/dist/studio/{domEditingLayers-2CKWGEHS.js → domEditingLayers-AT7G6F4L.js} +2 -1
- package/dist/studio/domEditingLayers-AT7G6F4L.js.map +1 -0
- package/dist/studio/index.html +1 -1
- package/dist/studio/index.js +121 -42
- package/dist/studio/index.js.map +1 -1
- package/dist/studio/styles/tailwind-preset.js +2 -0
- package/dist/studio/styles/tailwind-preset.js.map +1 -1
- package/package.json +1 -1
- /package/dist/studio/{domEditingLayers-2CKWGEHS.js.map → chunk-PZ5AY32C.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as P}from"./index-
|
|
1
|
+
import{g as P}from"./index-BOMWJSjh.js";function j(c,d){for(var s=0;s<d.length;s++){const a=d[s];if(typeof a!="string"&&!Array.isArray(a)){for(const i in a)if(i!=="default"&&!(i in c)){const l=Object.getOwnPropertyDescriptor(a,i);l&&Object.defineProperty(c,i,l.get?l:{enumerable:!0,get:()=>a[i]})}}}return Object.freeze(Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}))}var v={},w;function k(){if(w)return v;w=1,Object.defineProperty(v,"__esModule",{value:!0}),v.default=d;var c=window.OfflineAudioContext||window.webkitOfflineAudioContext;function d(e){var r=a(e);return r.start(0),[i,y,O(e.sampleRate),s].reduce(function(t,o){return o(t)},r.buffer.getChannelData(0))}function s(e){return e.sort(function(r,t){return t.count-r.count}).splice(0,5)[0].tempo}function a(e){var r=e.length,t=e.numberOfChannels,o=e.sampleRate,n=new c(t,r,o),u=n.createBufferSource();u.buffer=e;var f=n.createBiquadFilter();return f.type="lowpass",u.connect(f),f.connect(n.destination),u}function i(e){for(var r=[],t=.9,o=.3,n=15;r.length<n&&t>=o;)r=l(e,t),t-=.05;if(r.length<n)throw new Error("Could not find enough samples for a reliable detection.");return r}function l(e,r){for(var t=[],o=0,n=e.length;o<n;o+=1)e[o]>r&&(t.push(o),o+=1e4);return t}function y(e){var r=[];return e.forEach(function(t,o){for(var n=function(x){var g=e[o+x]-t,_=r.some(function(h){if(h.interval===g)return h.count+=1});_||r.push({interval:g,count:1})},u=0;u<10;u+=1)n(u)}),r}function O(e){return function(r){var t=[];return r.forEach(function(o){if(o.interval!==0){for(var n=60/(o.interval/e);n<90;)n*=2;for(;n>180;)n/=2;n=Math.round(n);var u=t.some(function(f){if(f.tempo===n)return f.count+=o.count});u||t.push({tempo:n,count:o.count})}}),t}}return v}var p,b;function q(){return b||(b=1,p=k().default),p}var m=q();const A=P(m),D=j({__proto__:null,default:A},[m]);export{D as i};
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
resolveDomEditSelection,
|
|
20
20
|
serializeDomEditTextFields
|
|
21
21
|
} from "./chunk-OBAG3GWK.js";
|
|
22
|
+
import "./chunk-PZ5AY32C.js";
|
|
22
23
|
export {
|
|
23
24
|
buildDefaultDomEditTextField,
|
|
24
25
|
buildDomEditPatchTarget,
|
|
@@ -40,4 +41,4 @@ export {
|
|
|
40
41
|
resolveDomEditSelection,
|
|
41
42
|
serializeDomEditTextFields
|
|
42
43
|
};
|
|
43
|
-
//# sourceMappingURL=domEditingLayers-
|
|
44
|
+
//# sourceMappingURL=domEditingLayers-AT7G6F4L.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/studio/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-BOMWJSjh.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-Ceyz8Qt2.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/dist/studio/index.js
CHANGED
|
@@ -24,6 +24,9 @@ import {
|
|
|
24
24
|
serializeDomEditTextFields,
|
|
25
25
|
setCompositionSourceMap
|
|
26
26
|
} from "./chunk-OBAG3GWK.js";
|
|
27
|
+
import {
|
|
28
|
+
__export
|
|
29
|
+
} from "./chunk-PZ5AY32C.js";
|
|
27
30
|
|
|
28
31
|
// src/components/EditorShell.tsx
|
|
29
32
|
import { useCallback as useCallback45 } from "react";
|
|
@@ -6527,6 +6530,48 @@ function clampGroupMoveDelta(rawDelta, memberStarts) {
|
|
|
6527
6530
|
return rawDelta < minDelta ? minDelta : rawDelta;
|
|
6528
6531
|
}
|
|
6529
6532
|
|
|
6533
|
+
// src/components/editor/manualEditingAvailability.ts
|
|
6534
|
+
var manualEditingAvailability_exports = {};
|
|
6535
|
+
__export(manualEditingAvailability_exports, {
|
|
6536
|
+
STUDIO_BLOCKS_PANEL_ENABLED: () => STUDIO_BLOCKS_PANEL_ENABLED,
|
|
6537
|
+
STUDIO_FLAT_INSPECTOR_ENABLED: () => STUDIO_FLAT_INSPECTOR_ENABLED,
|
|
6538
|
+
STUDIO_GSAP_PANEL_ENABLED: () => STUDIO_GSAP_PANEL_ENABLED,
|
|
6539
|
+
STUDIO_INSPECTOR_PANELS_ENABLED: () => STUDIO_INSPECTOR_PANELS_ENABLED,
|
|
6540
|
+
STUDIO_KEYFRAMES_ENABLED: () => STUDIO_KEYFRAMES_ENABLED,
|
|
6541
|
+
STUDIO_MANUAL_EDITING_DISABLED_TITLE: () => STUDIO_MANUAL_EDITING_DISABLED_TITLE,
|
|
6542
|
+
STUDIO_PREVIEW_MANUAL_EDITING_ENABLED: () => STUDIO_PREVIEW_MANUAL_EDITING_ENABLED,
|
|
6543
|
+
STUDIO_PREVIEW_SELECTION_ENABLED: () => STUDIO_PREVIEW_SELECTION_ENABLED,
|
|
6544
|
+
STUDIO_RAZOR_TOOL_ENABLED: () => STUDIO_RAZOR_TOOL_ENABLED,
|
|
6545
|
+
STUDIO_SDK_CUTOVER_ENABLED: () => STUDIO_SDK_CUTOVER_ENABLED,
|
|
6546
|
+
STUDIO_SDK_CUTOVER_FAMILIES: () => STUDIO_SDK_CUTOVER_FAMILIES,
|
|
6547
|
+
STUDIO_SDK_RESOLVER_SHADOW_ENABLED: () => STUDIO_SDK_RESOLVER_SHADOW_ENABLED,
|
|
6548
|
+
resolveStudioBooleanEnvFlag: () => resolveStudioBooleanEnvFlag
|
|
6549
|
+
});
|
|
6550
|
+
|
|
6551
|
+
// src/utils/sdkCutoverPolicy.ts
|
|
6552
|
+
var STUDIO_SDK_OPERATION_FAMILIES = [
|
|
6553
|
+
"dom",
|
|
6554
|
+
"timing",
|
|
6555
|
+
"gsap-animation",
|
|
6556
|
+
"gsap-keyframe",
|
|
6557
|
+
"lifecycle"
|
|
6558
|
+
];
|
|
6559
|
+
function resolveEnabledSdkFamilies(env2, masterEnabled) {
|
|
6560
|
+
if (!masterEnabled) return /* @__PURE__ */ new Set();
|
|
6561
|
+
const raw = env2["VITE_STUDIO_SDK_CUTOVER_FAMILIES"];
|
|
6562
|
+
if (typeof raw !== "string" || raw.trim() === "") return /* @__PURE__ */ new Set();
|
|
6563
|
+
const requested = raw.split(",").map((family) => family.trim()).filter(Boolean);
|
|
6564
|
+
const known = new Set(STUDIO_SDK_OPERATION_FAMILIES);
|
|
6565
|
+
const unknown = requested.filter((family) => !known.has(family));
|
|
6566
|
+
if (unknown.length > 0) {
|
|
6567
|
+
throw new Error(`Unknown Studio SDK cutover families: ${unknown.join(", ")}`);
|
|
6568
|
+
}
|
|
6569
|
+
return new Set(requested);
|
|
6570
|
+
}
|
|
6571
|
+
function isSdkFamilyEnabled(masterEnabled, configured, family) {
|
|
6572
|
+
return masterEnabled && (configured?.has(family) ?? true);
|
|
6573
|
+
}
|
|
6574
|
+
|
|
6530
6575
|
// src/components/editor/manualEditingAvailability.ts
|
|
6531
6576
|
var STUDIO_PREVIEW_MANUAL_DRAGGING_ENV = "VITE_STUDIO_ENABLE_PREVIEW_MANUAL_DRAGGING";
|
|
6532
6577
|
var STUDIO_INSPECTOR_PANELS_ENV = "VITE_STUDIO_ENABLE_INSPECTOR_PANELS";
|
|
@@ -6582,6 +6627,10 @@ var STUDIO_SDK_CUTOVER_ENABLED = resolveStudioBooleanEnvFlag(
|
|
|
6582
6627
|
["VITE_STUDIO_SDK_CUTOVER_ENABLED"],
|
|
6583
6628
|
false
|
|
6584
6629
|
);
|
|
6630
|
+
var STUDIO_SDK_CUTOVER_FAMILIES = resolveEnabledSdkFamilies(
|
|
6631
|
+
env,
|
|
6632
|
+
STUDIO_SDK_CUTOVER_ENABLED
|
|
6633
|
+
);
|
|
6585
6634
|
var STUDIO_SDK_RESOLVER_SHADOW_ENABLED = resolveStudioBooleanEnvFlag(
|
|
6586
6635
|
env,
|
|
6587
6636
|
["VITE_STUDIO_SDK_RESOLVER_SHADOW_ENABLED"],
|
|
@@ -7911,6 +7960,12 @@ function findTimelineElementInIframe(iframe, element, activeCompositionPath = nu
|
|
|
7911
7960
|
try {
|
|
7912
7961
|
const doc = iframe?.contentDocument;
|
|
7913
7962
|
if (!doc) return null;
|
|
7963
|
+
if (element.kind === "composition" && element.compositionSrc) {
|
|
7964
|
+
return findElementForTimelineElement(doc, element, {
|
|
7965
|
+
activeCompositionPath,
|
|
7966
|
+
isMasterView: true
|
|
7967
|
+
});
|
|
7968
|
+
}
|
|
7914
7969
|
return findElementForSelection(
|
|
7915
7970
|
doc,
|
|
7916
7971
|
{
|
|
@@ -17822,7 +17877,7 @@ function OffCanvasIndicators({
|
|
|
17822
17877
|
const selectOffCanvas = async () => {
|
|
17823
17878
|
const el = elements.current.get(r.key);
|
|
17824
17879
|
if (!el) return;
|
|
17825
|
-
const { resolveDomEditSelection: resolveDomEditSelection2 } = await import("./domEditingLayers-
|
|
17880
|
+
const { resolveDomEditSelection: resolveDomEditSelection2 } = await import("./domEditingLayers-AT7G6F4L.js");
|
|
17826
17881
|
const acp = activeCompositionPathRef.current ?? "index.html";
|
|
17827
17882
|
const sel = await resolveDomEditSelection2(el, {
|
|
17828
17883
|
activeCompositionPath: acp,
|
|
@@ -17864,7 +17919,7 @@ import {
|
|
|
17864
17919
|
STUDIO_WIDTH_PROP,
|
|
17865
17920
|
STUDIO_HEIGHT_PROP,
|
|
17866
17921
|
STUDIO_MANUAL_EDIT_GESTURE_ATTR
|
|
17867
|
-
} from "@hyperframes/
|
|
17922
|
+
} from "@hyperframes/core/editing/draft-markers";
|
|
17868
17923
|
var STUDIO_ROTATION_PROP = "--hf-studio-rotation";
|
|
17869
17924
|
var STUDIO_PATH_OFFSET_ATTR = "data-hf-studio-path-offset";
|
|
17870
17925
|
var STUDIO_BOX_SIZE_ATTR = "data-hf-studio-box-size";
|
|
@@ -24804,6 +24859,20 @@ async function persistSdkSerialize(buildAfter, targetPath, originalContent, deps
|
|
|
24804
24859
|
}
|
|
24805
24860
|
|
|
24806
24861
|
// src/utils/sdkCutover.ts
|
|
24862
|
+
function sdkFamilyEnabled(family) {
|
|
24863
|
+
const configured = Object.prototype.hasOwnProperty.call(
|
|
24864
|
+
manualEditingAvailability_exports,
|
|
24865
|
+
"STUDIO_SDK_CUTOVER_FAMILIES"
|
|
24866
|
+
) ? STUDIO_SDK_CUTOVER_FAMILIES : void 0;
|
|
24867
|
+
return isSdkFamilyEnabled(STUDIO_SDK_CUTOVER_ENABLED, configured, family);
|
|
24868
|
+
}
|
|
24869
|
+
function trackCutoverResult(result, context) {
|
|
24870
|
+
if (result.status === "committed") {
|
|
24871
|
+
trackStudioEvent("sdk_cutover_success", context);
|
|
24872
|
+
} else if (result.status === "failed") {
|
|
24873
|
+
trackStudioEvent("sdk_cutover_failed", { ...context, error: result.error.message });
|
|
24874
|
+
}
|
|
24875
|
+
}
|
|
24807
24876
|
function wrongCompositionFile(deps, targetPath) {
|
|
24808
24877
|
return deps.compositionPath != null && targetPath !== deps.compositionPath;
|
|
24809
24878
|
}
|
|
@@ -24812,7 +24881,7 @@ function gsapReadSource(deps, targetPath) {
|
|
|
24812
24881
|
return read ? () => read(targetPath) : void 0;
|
|
24813
24882
|
}
|
|
24814
24883
|
async function sdkCutoverPersist(selection, ops, originalContent, targetPath, sdkSession, deps, options) {
|
|
24815
|
-
if (!shouldUseSdkCutover(
|
|
24884
|
+
if (!shouldUseSdkCutover(sdkFamilyEnabled("dom"), !!sdkSession, selection.hfId, ops))
|
|
24816
24885
|
return declinedCutover("ineligible_operation");
|
|
24817
24886
|
if (!sdkSession) return declinedCutover("session_unavailable");
|
|
24818
24887
|
const hfId = selection.hfId;
|
|
@@ -24832,11 +24901,7 @@ async function sdkCutoverPersist(selection, ops, originalContent, targetPath, sd
|
|
|
24832
24901
|
},
|
|
24833
24902
|
options
|
|
24834
24903
|
);
|
|
24835
|
-
|
|
24836
|
-
trackStudioEvent("sdk_cutover_success", { hfId, opCount: ops.length });
|
|
24837
|
-
} else if (result.status === "failed") {
|
|
24838
|
-
trackStudioEvent("sdk_cutover_failed", { hfId, error: result.error.message });
|
|
24839
|
-
}
|
|
24904
|
+
trackCutoverResult(result, { hfId, opCount: ops.length });
|
|
24840
24905
|
return result;
|
|
24841
24906
|
}
|
|
24842
24907
|
async function sdkTimingPersist(hfId, targetPath, timingUpdate, sdkSession, deps, options) {
|
|
@@ -24848,7 +24913,7 @@ async function sdkTimingPersist(hfId, targetPath, timingUpdate, sdkSession, deps
|
|
|
24848
24913
|
timingSrc ? () => timingSrc(targetPath) : void 0,
|
|
24849
24914
|
{ targetPath, compositionPath: deps.compositionPath }
|
|
24850
24915
|
);
|
|
24851
|
-
if (!
|
|
24916
|
+
if (!sdkFamilyEnabled("timing")) return declinedCutover("feature_disabled");
|
|
24852
24917
|
if (!sdkSession) return declinedCutover("session_unavailable");
|
|
24853
24918
|
if (!sdkSession.getElement(hfId)) return declinedCutover("target_not_found");
|
|
24854
24919
|
if (wrongCompositionFile(deps, targetPath)) return declinedCutover("wrong_composition_file");
|
|
@@ -24863,11 +24928,7 @@ async function sdkTimingPersist(hfId, targetPath, timingUpdate, sdkSession, deps
|
|
|
24863
24928
|
options,
|
|
24864
24929
|
serializedBefore
|
|
24865
24930
|
);
|
|
24866
|
-
|
|
24867
|
-
trackStudioEvent("sdk_cutover_success", { hfId, opCount: 1 });
|
|
24868
|
-
} else if (result.status === "failed") {
|
|
24869
|
-
trackStudioEvent("sdk_cutover_failed", { hfId, error: result.error.message });
|
|
24870
|
-
}
|
|
24931
|
+
trackCutoverResult(result, { hfId, opCount: 1 });
|
|
24871
24932
|
return result;
|
|
24872
24933
|
} catch (error) {
|
|
24873
24934
|
const failed2 = { status: "failed", error: asCutoverError(error) };
|
|
@@ -24886,7 +24947,7 @@ async function sdkTimingBatchPersist(changes, targetPath, sdkSession, deps, opti
|
|
|
24886
24947
|
{ targetPath, compositionPath: deps.compositionPath }
|
|
24887
24948
|
);
|
|
24888
24949
|
}
|
|
24889
|
-
if (!
|
|
24950
|
+
if (!sdkFamilyEnabled("timing")) return declinedCutover("feature_disabled");
|
|
24890
24951
|
if (!sdkSession) return declinedCutover("session_unavailable");
|
|
24891
24952
|
if (wrongCompositionFile(deps, targetPath)) return declinedCutover("wrong_composition_file");
|
|
24892
24953
|
if (changes.some((change) => !sdkSession.getElement(change.hfId)))
|
|
@@ -24944,10 +25005,11 @@ function sdkGsapTweenPersist(targetPath, op, sdkSession, deps, options) {
|
|
|
24944
25005
|
{ targetPath, compositionPath: deps.compositionPath }
|
|
24945
25006
|
);
|
|
24946
25007
|
}
|
|
24947
|
-
if (!
|
|
25008
|
+
if (!sdkFamilyEnabled("gsap-animation"))
|
|
25009
|
+
return Promise.resolve(declinedCutover("feature_disabled"));
|
|
24948
25010
|
if (op.kind === "add" && sdkSession && !sdkSession.getElement(op.target))
|
|
24949
25011
|
return Promise.resolve(declinedCutover("target_not_found"));
|
|
24950
|
-
return dispatchGsapOpAndPersist(targetPath, sdkSession, deps, options, (s) => {
|
|
25012
|
+
return dispatchGsapOpAndPersist("gsap-animation", targetPath, sdkSession, deps, options, (s) => {
|
|
24951
25013
|
s.batch(() => {
|
|
24952
25014
|
if (op.kind === "add") {
|
|
24953
25015
|
s.addGsapTween(op.target, op.spec);
|
|
@@ -24959,7 +25021,7 @@ function sdkGsapTweenPersist(targetPath, op, sdkSession, deps, options) {
|
|
|
24959
25021
|
});
|
|
24960
25022
|
});
|
|
24961
25023
|
}
|
|
24962
|
-
async function dispatchGsapOpAndPersist(targetPath, sdkSession, deps, options, dispatch, resolverTarget) {
|
|
25024
|
+
async function dispatchGsapOpAndPersist(family, targetPath, sdkSession, deps, options, dispatch, resolverTarget) {
|
|
24963
25025
|
if (resolverTarget) {
|
|
24964
25026
|
void recordAnimationResolverParity(
|
|
24965
25027
|
sdkSession,
|
|
@@ -24969,7 +25031,7 @@ async function dispatchGsapOpAndPersist(targetPath, sdkSession, deps, options, d
|
|
|
24969
25031
|
{ targetPath, compositionPath: deps.compositionPath }
|
|
24970
25032
|
);
|
|
24971
25033
|
}
|
|
24972
|
-
if (!
|
|
25034
|
+
if (!sdkFamilyEnabled(family)) return declinedCutover("feature_disabled");
|
|
24973
25035
|
if (!sdkSession) return declinedCutover("session_unavailable");
|
|
24974
25036
|
if (wrongCompositionFile(deps, targetPath)) return declinedCutover("wrong_composition_file");
|
|
24975
25037
|
const session = sdkSession;
|
|
@@ -24998,6 +25060,7 @@ async function dispatchGsapOpAndPersist(targetPath, sdkSession, deps, options, d
|
|
|
24998
25060
|
}
|
|
24999
25061
|
function sdkGsapKeyframePersist(targetPath, animationId, position, value, sdkSession, deps, options) {
|
|
25000
25062
|
return dispatchGsapOpAndPersist(
|
|
25063
|
+
"gsap-keyframe",
|
|
25001
25064
|
targetPath,
|
|
25002
25065
|
sdkSession,
|
|
25003
25066
|
deps,
|
|
@@ -25008,6 +25071,7 @@ function sdkGsapKeyframePersist(targetPath, animationId, position, value, sdkSes
|
|
|
25008
25071
|
}
|
|
25009
25072
|
function sdkGsapRemoveKeyframePersist(targetPath, animationId, percentage, sdkSession, deps, options) {
|
|
25010
25073
|
return dispatchGsapOpAndPersist(
|
|
25074
|
+
"gsap-keyframe",
|
|
25011
25075
|
targetPath,
|
|
25012
25076
|
sdkSession,
|
|
25013
25077
|
deps,
|
|
@@ -25018,6 +25082,7 @@ function sdkGsapRemoveKeyframePersist(targetPath, animationId, percentage, sdkSe
|
|
|
25018
25082
|
}
|
|
25019
25083
|
function sdkGsapRemovePropertyPersist(targetPath, animationId, property, from, sdkSession, deps, options) {
|
|
25020
25084
|
return dispatchGsapOpAndPersist(
|
|
25085
|
+
"gsap-animation",
|
|
25021
25086
|
targetPath,
|
|
25022
25087
|
sdkSession,
|
|
25023
25088
|
deps,
|
|
@@ -25028,6 +25093,7 @@ function sdkGsapRemovePropertyPersist(targetPath, animationId, property, from, s
|
|
|
25028
25093
|
}
|
|
25029
25094
|
function sdkGsapDeleteAllForSelectorPersist(targetPath, selector, sdkSession, deps, options) {
|
|
25030
25095
|
return dispatchGsapOpAndPersist(
|
|
25096
|
+
"gsap-animation",
|
|
25031
25097
|
targetPath,
|
|
25032
25098
|
sdkSession,
|
|
25033
25099
|
deps,
|
|
@@ -25037,6 +25103,7 @@ function sdkGsapDeleteAllForSelectorPersist(targetPath, selector, sdkSession, de
|
|
|
25037
25103
|
}
|
|
25038
25104
|
function sdkGsapRemoveAllKeyframesPersist(targetPath, animationId, sdkSession, deps, options) {
|
|
25039
25105
|
return dispatchGsapOpAndPersist(
|
|
25106
|
+
"gsap-keyframe",
|
|
25040
25107
|
targetPath,
|
|
25041
25108
|
sdkSession,
|
|
25042
25109
|
deps,
|
|
@@ -25047,6 +25114,7 @@ function sdkGsapRemoveAllKeyframesPersist(targetPath, animationId, sdkSession, d
|
|
|
25047
25114
|
}
|
|
25048
25115
|
function sdkGsapConvertToKeyframesPersist(targetPath, animationId, resolvedFromValues, sdkSession, deps, options) {
|
|
25049
25116
|
return dispatchGsapOpAndPersist(
|
|
25117
|
+
"gsap-keyframe",
|
|
25050
25118
|
targetPath,
|
|
25051
25119
|
sdkSession,
|
|
25052
25120
|
deps,
|
|
@@ -25055,6 +25123,9 @@ function sdkGsapConvertToKeyframesPersist(targetPath, animationId, resolvedFromV
|
|
|
25055
25123
|
{ animationId, opLabel: "convertToKeyframes" }
|
|
25056
25124
|
);
|
|
25057
25125
|
}
|
|
25126
|
+
function keyframesPayload(targetSelector, position, duration, keyframes, ease) {
|
|
25127
|
+
return { targetSelector, position, duration, keyframes, ...ease ? { ease } : {} };
|
|
25128
|
+
}
|
|
25058
25129
|
function dispatchWithKeyframes(s, payload, animationId) {
|
|
25059
25130
|
if (animationId !== void 0) {
|
|
25060
25131
|
s.dispatch({ type: "replaceWithKeyframes", animationId, ...payload });
|
|
@@ -25062,38 +25133,50 @@ function dispatchWithKeyframes(s, payload, animationId) {
|
|
|
25062
25133
|
s.dispatch({ type: "addWithKeyframes", ...payload });
|
|
25063
25134
|
}
|
|
25064
25135
|
}
|
|
25136
|
+
function persistKeyframesOperation(input) {
|
|
25137
|
+
const payload = keyframesPayload(
|
|
25138
|
+
input.targetSelector,
|
|
25139
|
+
input.position,
|
|
25140
|
+
input.duration,
|
|
25141
|
+
input.keyframes,
|
|
25142
|
+
input.ease
|
|
25143
|
+
);
|
|
25144
|
+
return dispatchGsapOpAndPersist(
|
|
25145
|
+
"gsap-keyframe",
|
|
25146
|
+
input.targetPath,
|
|
25147
|
+
input.sdkSession,
|
|
25148
|
+
input.deps,
|
|
25149
|
+
input.options,
|
|
25150
|
+
(session) => dispatchWithKeyframes(session, payload, input.animationId),
|
|
25151
|
+
input.animationId ? { animationId: input.animationId, opLabel: "replaceWithKeyframes" } : void 0
|
|
25152
|
+
);
|
|
25153
|
+
}
|
|
25065
25154
|
function sdkAddWithKeyframesPersist(targetPath, targetSelector, position, duration, keyframes, ease, sdkSession, deps, options) {
|
|
25066
|
-
|
|
25155
|
+
return persistKeyframesOperation({
|
|
25156
|
+
targetPath,
|
|
25067
25157
|
targetSelector,
|
|
25068
25158
|
position,
|
|
25069
25159
|
duration,
|
|
25070
25160
|
keyframes,
|
|
25071
|
-
|
|
25072
|
-
};
|
|
25073
|
-
return dispatchGsapOpAndPersist(
|
|
25074
|
-
targetPath,
|
|
25161
|
+
ease,
|
|
25075
25162
|
sdkSession,
|
|
25076
25163
|
deps,
|
|
25077
|
-
options
|
|
25078
|
-
|
|
25079
|
-
);
|
|
25164
|
+
options
|
|
25165
|
+
});
|
|
25080
25166
|
}
|
|
25081
25167
|
function sdkReplaceWithKeyframesPersist(targetPath, animationId, targetSelector, position, duration, keyframes, ease, sdkSession, deps, options) {
|
|
25082
|
-
|
|
25168
|
+
return persistKeyframesOperation({
|
|
25169
|
+
targetPath,
|
|
25170
|
+
animationId,
|
|
25083
25171
|
targetSelector,
|
|
25084
25172
|
position,
|
|
25085
25173
|
duration,
|
|
25086
25174
|
keyframes,
|
|
25087
|
-
|
|
25088
|
-
};
|
|
25089
|
-
return dispatchGsapOpAndPersist(
|
|
25090
|
-
targetPath,
|
|
25175
|
+
ease,
|
|
25091
25176
|
sdkSession,
|
|
25092
25177
|
deps,
|
|
25093
|
-
options
|
|
25094
|
-
|
|
25095
|
-
{ animationId, opLabel: "replaceWithKeyframes" }
|
|
25096
|
-
);
|
|
25178
|
+
options
|
|
25179
|
+
});
|
|
25097
25180
|
}
|
|
25098
25181
|
async function sdkDeletePersist(hfId, originalContent, targetPath, sdkSession, deps) {
|
|
25099
25182
|
void recordResolverParity(
|
|
@@ -25103,7 +25186,7 @@ async function sdkDeletePersist(hfId, originalContent, targetPath, sdkSession, d
|
|
|
25103
25186
|
() => Promise.resolve(originalContent),
|
|
25104
25187
|
{ targetPath, compositionPath: deps.compositionPath }
|
|
25105
25188
|
);
|
|
25106
|
-
if (!
|
|
25189
|
+
if (!sdkFamilyEnabled("lifecycle")) return declinedCutover("feature_disabled");
|
|
25107
25190
|
if (!sdkSession) return declinedCutover("session_unavailable");
|
|
25108
25191
|
if (!sdkSession.getElement(hfId)) return declinedCutover("target_not_found");
|
|
25109
25192
|
if (wrongCompositionFile(deps, targetPath)) return declinedCutover("wrong_composition_file");
|
|
@@ -25115,11 +25198,7 @@ async function sdkDeletePersist(hfId, originalContent, targetPath, sdkSession, d
|
|
|
25115
25198
|
(session) => session.removeElement(hfId),
|
|
25116
25199
|
{ label: "Delete element" }
|
|
25117
25200
|
);
|
|
25118
|
-
|
|
25119
|
-
trackStudioEvent("sdk_cutover_success", { hfId, opCount: 1 });
|
|
25120
|
-
} else if (result.status === "failed") {
|
|
25121
|
-
trackStudioEvent("sdk_cutover_failed", { hfId, error: result.error.message });
|
|
25122
|
-
}
|
|
25201
|
+
trackCutoverResult(result, { hfId, opCount: 1 });
|
|
25123
25202
|
return result;
|
|
25124
25203
|
}
|
|
25125
25204
|
|