hyperframes 0.8.213 → 0.8.214
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/{add-GRJ6BQMO.js → add-U2N4ZWNB.js} +12 -12
- package/dist/{agentPromptGenerator-2HTUGEKK.js → agentPromptGenerator-EK7NEFV6.js} +7 -7
- package/dist/{animatedGifPrep-7KPZBZXD.js → animatedGifPrep-X3FLFGCC.js} +7 -7
- package/dist/api.js +17 -17
- package/dist/{asset-YVIFFWCU.js → asset-3CSXQ7JI.js} +2 -2
- package/dist/{assetCataloger-IZW7LPCT.js → assetCataloger-FG2VTSSR.js} +8 -8
- package/dist/{audio-X7274SUF.js → audio-US7IUDFM.js} +14 -14
- package/dist/{auth-II6SIDJD.js → auth-IMXNGPGR.js} +1 -1
- package/dist/{autoUpdate-WJIT74BG.js → autoUpdate-IGZP5HIX.js} +2 -2
- package/dist/{backgroundChecks-NMKJAES7.js → backgroundChecks-UGU6SRCU.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-I7GRY73M.js → batchRender-5JS4SAGR.js} +4 -4
- package/dist/{beats-6VXALJZT.js → beats-2F7ZW7QB.js} +9 -9
- package/dist/{benchmark-RLIRA74V.js → benchmark-Y25FBDO7.js} +9 -9
- package/dist/{browser-7T3JMNTR.js → browser-43AS35ZL.js} +3 -3
- package/dist/{bundleWithLocalizedFonts-C2LP6QZZ.js → bundleWithLocalizedFonts-6VHTVRO3.js} +2 -2
- package/dist/{capture-OZFDTN4A.js → capture-CMP4DHPY.js} +12 -12
- package/dist/{capture-V4HWHG7C.js → capture-N5AMWY4S.js} +3 -3
- package/dist/{captureCompositionFrame-WZAVXCRQ.js → captureCompositionFrame-PQT4GNR2.js} +12 -12
- package/dist/{catalog-UFC7JS4T.js → catalog-SZPWUZ75.js} +12 -12
- package/dist/{catch-up-YBNKJDWJ.js → catch-up-OYYHR2UB.js} +4 -4
- package/dist/{check-ESQJHRGA.js → check-MBW4AYV6.js} +38 -38
- package/dist/{checkAudio-OIIBWFBF.js → checkAudio-DIJNBWAF.js} +11 -11
- package/dist/{checkBrowser-WAWL6TKX.js → checkBrowser-NYBDUAT2.js} +32 -32
- package/dist/{chunk-ZSRNM6LP.js → chunk-245CC6JT.js} +1 -1
- package/dist/{chunk-7LOVQRUJ.js → chunk-3AAAA3KH.js} +3 -3
- package/dist/{chunk-Z7QHOT65.js → chunk-3ZNAP65U.js} +1 -1
- package/dist/{chunk-AJ3QW6RX.js → chunk-4HMG5CQJ.js} +3 -3
- package/dist/{chunk-H3I2VLLL.js → chunk-4NJ57TSE.js} +1 -1
- package/dist/{chunk-BVHNFPRF.js → chunk-53ERMOK2.js} +2 -2
- package/dist/{chunk-MBSESQED.js → chunk-6UUPTWUG.js} +1 -1
- package/dist/{chunk-ENE4IKFX.js → chunk-7W4DJKZA.js} +9 -9
- package/dist/{chunk-FHO3FXTW.js → chunk-7Y4TTOLE.js} +2 -2
- package/dist/{chunk-WSEPFRJV.js → chunk-7YUYG6S6.js} +1 -1
- package/dist/{chunk-KL2UJXCY.js → chunk-A3ZRV44X.js} +2 -2
- package/dist/{chunk-D3Q2TABU.js → chunk-A7UJGIMA.js} +1 -1
- package/dist/{chunk-DQ26IA5P.js → chunk-BRTWBGFE.js} +1 -1
- package/dist/{chunk-4BXPCS5B.js → chunk-CATLCEDQ.js} +14 -14
- package/dist/{chunk-KSMCX5EP.js → chunk-DFQM3XMK.js} +3 -3
- package/dist/{chunk-VTX27LET.js → chunk-EJCCJTUH.js} +3 -3
- package/dist/{chunk-ISMOBMWF.js → chunk-ENV35BSH.js} +10 -10
- package/dist/chunk-FBQVRYMD.js +5061 -0
- package/dist/{chunk-NP4G4WPP.js → chunk-FC6BAQV5.js} +9 -9
- package/dist/{chunk-76T7KAYD.js → chunk-FI3JWR34.js} +1 -1
- package/dist/{chunk-5ODMV7X6.js → chunk-FQO3RV6O.js} +2 -2
- package/dist/{chunk-PAZ7WUYZ.js → chunk-G7CFMNRO.js} +2 -2
- package/dist/{chunk-KY67MTBH.js → chunk-GFA5ZCVI.js} +332 -3
- package/dist/{chunk-BE6XXZAR.js → chunk-GRCS7WRH.js} +10 -10
- package/dist/{chunk-SZOCI3JJ.js → chunk-GSYZG4E7.js} +2 -2
- package/dist/{chunk-N3MOQTRS.js → chunk-GVHEOOGM.js} +8 -8
- package/dist/{chunk-ZGG53XZX.js → chunk-HNYTTRLR.js} +7 -7
- package/dist/{chunk-I3G45TWG.js → chunk-HQRI2NT3.js} +1 -1
- package/dist/{chunk-V2H5UABS.js → chunk-HVQDDVN4.js} +3 -3
- package/dist/{chunk-EQ66MVWZ.js → chunk-I5LDGNYX.js} +1 -1
- package/dist/{chunk-L34IH4SH.js → chunk-ISTUBRV3.js} +4 -4
- package/dist/{chunk-4645UHJF.js → chunk-JF3RF6GS.js} +3 -2
- package/dist/{chunk-STK62RL7.js → chunk-JMSS47CW.js} +1 -1
- package/dist/{chunk-X4SBDDLS.js → chunk-KSC4O2RY.js} +4 -0
- package/dist/{chunk-TDNPJHEQ.js → chunk-KSV2PMFA.js} +7 -7
- package/dist/{chunk-2GS2RUVI.js → chunk-LBS4AS7G.js} +2 -2
- package/dist/{chunk-KVFOQ3EM.js → chunk-LIOE46OG.js} +16 -7
- package/dist/{chunk-IHYWP4V5.js → chunk-LRYNDYAE.js} +1 -1
- package/dist/{chunk-Z65ZQYBW.js → chunk-LWWTOBZ6.js} +3 -3
- package/dist/{chunk-CLA4XSBO.js → chunk-MGUA3DUS.js} +3 -3
- package/dist/{chunk-LYON3VGF.js → chunk-MP7DZH5M.js} +2 -2
- package/dist/{chunk-LTQXIYNL.js → chunk-MYDM4PQL.js} +3 -3
- package/dist/{chunk-TWCICOCI.js → chunk-MZHYAXUV.js} +1 -1
- package/dist/{chunk-GNSNCIHF.js → chunk-PT47MVXR.js} +13 -13
- package/dist/{chunk-2WELGDXU.js → chunk-QCCPXMKP.js} +5 -5
- package/dist/{chunk-LGDRKQKL.js → chunk-QL7ITOPE.js} +1 -1
- package/dist/{chunk-7JWRVKN4.js → chunk-S6WDNIUG.js} +1 -1
- package/dist/{chunk-46HYDDZ5.js → chunk-T6SMQ4L7.js} +1 -1
- package/dist/{chunk-FGIMC5I4.js → chunk-TNKPBI63.js} +5 -5
- package/dist/{chunk-DKEZSH6M.js → chunk-TYMD647L.js} +3 -3
- package/dist/{chunk-HWHPYCBZ.js → chunk-UR6QODTY.js} +1 -1
- package/dist/{chunk-3OYLHBQZ.js → chunk-URD4QIQS.js} +1 -1
- package/dist/{chunk-TCCCAEZD.js → chunk-VAOROEWU.js} +3 -3
- package/dist/{chunk-TLXK5A2N.js → chunk-VC6GEQ7P.js} +18 -18
- package/dist/{chunk-QHWVCKC5.js → chunk-VEWR5HXT.js} +1 -1
- package/dist/{chunk-ZTCILR3V.js → chunk-VILE6GFD.js} +1 -1
- package/dist/{chunk-S3ZWVEGQ.js → chunk-VW57BBGU.js} +1 -1
- package/dist/{chunk-CTZJSMGU.js → chunk-VZBJ5BQF.js} +1 -1
- package/dist/{chunk-DJFEYX23.js → chunk-WJRYQYOM.js} +1 -1
- package/dist/{chunk-7I5N36JA.js → chunk-XESW4XN7.js} +2 -2
- package/dist/{chunk-NGJS5H5E.js → chunk-XM3NMXLX.js} +1 -1
- package/dist/{chunk-O63A26XQ.js → chunk-XWMY7FIW.js} +1 -1
- package/dist/{chunk-CCLBOLYU.js → chunk-YBNF5ZOC.js} +1 -1
- package/dist/{chunk-F4EX52FU.js → chunk-YDHXPY23.js} +1 -1
- package/dist/{chunk-53VXGZ3L.js → chunk-YLEEVMBV.js} +2 -2
- package/dist/{chunk-XNY2KI2Z.js → chunk-YQCDSSIK.js} +1 -1
- package/dist/{chunk-MFC2PE7D.js → chunk-ZMKRQ4HE.js} +1 -1
- package/dist/{chunk-LALMFSLB.js → chunk-ZXQNWUDY.js} +5 -5
- package/dist/{clean-XBQ54UZX.js → clean-RDKZTFDC.js} +18 -18
- package/dist/cli.js +53 -53
- package/dist/{cloud-E2GUGXXL.js → cloud-2MGM3NSJ.js} +4 -4
- package/dist/{cloudrun-IAPFT66T.js → cloudrun-YQONSO6B.js} +5 -5
- package/dist/{compare-2VPIOCLV.js → compare-HAMCTSXR.js} +29 -29
- package/dist/{compiler-3ED6KJYN.js → compiler-YUM2ODOP.js} +4 -4
- package/dist/{component-IH2KSDNM.js → component-2MDTLX6B.js} +3 -3
- package/dist/{compositions-MIMF2GM3.js → compositions-EEXADRKF.js} +11 -11
- package/dist/{delete-5H5EYSYK.js → delete-X4I63WKN.js} +2 -2
- package/dist/{deploy-DMQT34K2.js → deploy-BBGSS4I3.js} +1 -1
- package/dist/{dist-OKQM7BQ3.js → dist-KXFW5H5Q.js} +2 -2
- package/dist/{dist-ANQ2CIIO.js → dist-ZE5X6MWG.js} +17 -3
- package/dist/{doctor-MTRZJQZZ.js → doctor-BNZ6D33R.js} +11 -11
- package/dist/{events-2GNMM2YS.js → events-6DI3CND6.js} +2 -2
- package/dist/{events-TBKM6B5H.js → events-BYOF33UK.js} +3 -3
- package/dist/{feedback-6NNSKXQP.js → feedback-Z3JOC7TX.js} +8 -8
- package/dist/{ffmpeg-622QCJLB.js → ffmpeg-S44OTBCI.js} +7 -7
- package/dist/{figma-TFHZ3N5A.js → figma-TVX2H5B3.js} +3 -3
- package/dist/fontLocalizeCli.js +10 -10
- package/dist/{get-P6RA7MAU.js → get-DWKTDVP7.js} +2 -2
- package/dist/{gpuPolicy-CK2XDEAM.js → gpuPolicy-GTBFSUHB.js} +7 -7
- package/dist/{grade-compare-LK6U7OJD.js → grade-compare-S4P6Z265.js} +30 -30
- package/dist/{heifImagePrep-3OXKQUEZ.js → heifImagePrep-RKQP2Y73.js} +8 -8
- package/dist/{help-YENCFXYK.js → help-WIC6DHOF.js} +1 -1
- package/dist/{history-V3E4UCMY.js → history-UBRUPAHH.js} +6 -6
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +64 -64
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-ZGKQMX3Z.js → info-F5LTDQ6I.js} +8 -8
- package/dist/{init-D6PJI2TA.js → init-6L4WQKOD.js} +27 -27
- package/dist/{inspect-UCHLILOX.js → inspect-DUIBB263.js} +30 -30
- package/dist/{installer-CV2OKJFW.js → installer-JKZ5N47B.js} +5 -5
- package/dist/{keyframes-2IJTDJ7K.js → keyframes-5FQNFJFE.js} +6 -6
- package/dist/{lambda-GKZBKWTK.js → lambda-YTO6N2QH.js} +11 -11
- package/dist/{layout-KKPRCTME.js → layout-H3F2LW62.js} +30 -30
- package/dist/{lint-NAC6M4NT.js → lint-WUWLVCJQ.js} +8 -8
- package/dist/{lintProject-MSATZIK7.js → lintProject-SZIPPOJR.js} +2 -2
- package/dist/{list-QRMXOTNB.js → list-3EFECRWU.js} +2 -2
- package/dist/{localPage-KMXALM7A.js → localPage-C3267GRQ.js} +7 -7
- package/dist/{login-GBN5ZMEA.js → login-W5L64YRM.js} +4 -4
- package/dist/{manager-GPDDRQIW.js → manager-46MZB3HK.js} +8 -8
- package/dist/{media-treatment-4Q7G27JJ.js → media-treatment-XBQWOU5U.js} +15 -15
- package/dist/{models-7KJF4LYJ.js → models-ZHNV44XV.js} +11 -11
- package/dist/{motionShot-DQAX2QTZ.js → motionShot-DO4EQ2U3.js} +15 -15
- package/dist/{normalize-audio-K7VCJQYJ.js → normalize-audio-2EXTDNBF.js} +10 -10
- package/dist/{open-ZSBVR3KC.js → open-7ZOY3KI6.js} +12 -12
- package/dist/{parakeetRunner-XXZHJYKO.js → parakeetRunner-H3B4QP6W.js} +12 -12
- package/dist/{pipeline-KNLOS5CL.js → pipeline-7OKHNKGP.js} +10 -10
- package/dist/{play-GQWF7MU5.js → play-B5NNOJN7.js} +21 -21
- package/dist/{preflight-UMKQ5C5W.js → preflight-R26JZQJU.js} +8 -8
- package/dist/{present-X7BPH35M.js → present-Y2SEWKGO.js} +17 -17
- package/dist/{preview-5Q7HPEOF.js → preview-7CZX4A5T.js} +18 -18
- package/dist/{producer-IXOPGETH.js → producer-WTO6XYGU.js} +1 -1
- package/dist/{projectConfig-YGI5AINR.js → projectConfig-SJ5NIYUO.js} +7 -7
- package/dist/{publication-ZSDCS2ST.js → publication-47KNSXP7.js} +3 -3
- package/dist/{publish-S2IIRPFZ.js → publish-4J4EKKQN.js} +11 -11
- package/dist/{remove-background-F2WFDCNM.js → remove-background-UKC6NKDH.js} +11 -11
- package/dist/{render-NVHUPEDG.js → render-DBELH4AC.js} +15 -15
- package/dist/{render-WYBQO4SR.js → render-S2FJRE3H.js} +6 -6
- package/dist/{render-CHRSSQNM.js → render-TABKCTMF.js} +29 -29
- package/dist/{render-batch-SDGA2643.js → render-batch-6YJMWHZ4.js} +6 -6
- package/dist/renderSetupWorker.js +2 -2
- package/dist/{resolver-3W2OPVGC.js → resolver-EDI3JND5.js} +5 -5
- package/dist/{sherpa-HCPAOYGA.js → sherpa-R6HDRJCA.js} +11 -11
- package/dist/{skills-KOVM4OP5.js → skills-2QIW3EOJ.js} +5 -5
- package/dist/{skillsUpdateCheck-ISMQFMPY.js → skillsUpdateCheck-XG5FPCU5.js} +3 -3
- package/dist/{snapshot-K7LVZDHG.js → snapshot-C5XBKYEF.js} +34 -34
- package/dist/{src-FUMXFZYG.js → src-CT2X45TD.js} +9 -9
- package/dist/{src-QEFKMRH7.js → src-E467QUBK.js} +6 -6
- package/dist/{staticProjectServer-MF57NBIU.js → staticProjectServer-G54Z4BH7.js} +19 -19
- package/dist/studio/assets/{hyperframes-player-Bb6n05RB.js → hyperframes-player-H1DIJsJZ.js} +1 -1
- package/dist/studio/assets/{index-pq574E5O.js → index-BftVE_0y.js} +117 -117
- package/dist/studio/assets/{index-DOtf09XR.js → index-v_hWj6Kv.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-Y4S3W7XE.js → studio-api-O52RPXZC.js} +11 -11
- package/dist/{studioServer-5LUZQOQV.js → studioServer-WDTS6ZDI.js} +49 -49
- package/dist/{telemetry-TJMB5BTF.js → telemetry-GEHWCV7C.js} +3 -3
- package/dist/{timeline-CU6CIWYL.js → timeline-IVQDNGWZ.js} +19 -19
- package/dist/{tokens-7P4N2FWN.js → tokens-EN5PVV3Y.js} +2 -2
- package/dist/{transcribe-TFDEQFMG.js → transcribe-HKS3PZAF.js} +10 -10
- package/dist/{transcribe-FZ7JK6QS.js → transcribe-NXMIBNLX.js} +16 -16
- package/dist/{updateCheck-HUDVZHVM.js → updateCheck-35TT5GRF.js} +2 -2
- package/dist/{upgrade-KP4RQZKY.js → upgrade-G6EOHGUS.js} +2 -2
- package/dist/{urlDownloader-5SHSHWMB.js → urlDownloader-X7V63HCF.js} +6 -6
- package/dist/{validate-VWX423M4.js → validate-4JUCRS64.js} +24 -24
- package/dist/{video-K4L2YFU2.js → video-SWQXDG7J.js} +8 -8
- package/dist/warmCheck.js +38 -38
- package/package.json +1 -1
- package/dist/chunk-N3ZAIZF3.js +0 -4870
|
@@ -10,19 +10,19 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
pageNavigationTimeoutMs,
|
|
12
12
|
windowsChromeCrashRemediation
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3AAAA3KH.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveCompositionViewportFromHtml
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-XM3NMXLX.js";
|
|
17
17
|
import {
|
|
18
18
|
launchManagedBrowser,
|
|
19
19
|
resolveManagedGpuMode,
|
|
20
20
|
rethrowAfterBrowserCleanup
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-53ERMOK2.js";
|
|
22
22
|
import {
|
|
23
23
|
resolveLocalBrowserGpuMode,
|
|
24
24
|
resolveLocalWebGpu
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-MP7DZH5M.js";
|
|
26
26
|
import {
|
|
27
27
|
c
|
|
28
28
|
} from "./chunk-2GICKZ3I.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
assertWebGpuAdapterAvailable,
|
|
31
31
|
compositionRequiresWebGpu,
|
|
32
32
|
oneProcessOverPipe
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-LIOE46OG.js";
|
|
34
34
|
import {
|
|
35
35
|
normalizeErrorMessage
|
|
36
36
|
} from "./chunk-E63BDV4Z.js";
|
|
@@ -138,7 +138,7 @@ async function waitForCompositionSettle(page, options) {
|
|
|
138
138
|
console.warn(` ${c.warn("\u26A0")} Shader transitions did not finish pre-rendering`);
|
|
139
139
|
});
|
|
140
140
|
await waitForLateSubresources(page, options.lateSubresourceTimeoutMs ?? CAPTURE_SETTLE_MS);
|
|
141
|
-
const { resolveConfig, waitForImagesReady } = await import("./src-
|
|
141
|
+
const { resolveConfig, waitForImagesReady } = await import("./src-E467QUBK.js");
|
|
142
142
|
const imageTimeoutMs = resolveConfig().playerReadyTimeout;
|
|
143
143
|
await waitForImagesReady(
|
|
144
144
|
page,
|
|
@@ -187,7 +187,7 @@ async function installPageFunctionGuard(page) {
|
|
|
187
187
|
async function openSettledCompositionPage(html, url, options) {
|
|
188
188
|
const viewport = resolveCompositionViewportFromHtml(html);
|
|
189
189
|
const requiresWebGpu = compositionRequiresWebGpu(html);
|
|
190
|
-
const answer = (await import("./staticProjectServer-
|
|
190
|
+
const answer = (await import("./staticProjectServer-G54Z4BH7.js")).inProcessAnswer(url);
|
|
191
191
|
const noListen = answer !== void 0;
|
|
192
192
|
let chromeBrowser;
|
|
193
193
|
try {
|
|
@@ -198,7 +198,7 @@ async function openSettledCompositionPage(html, url, options) {
|
|
|
198
198
|
options.onBrowserReady?.();
|
|
199
199
|
const page = await chromeBrowser.newPage();
|
|
200
200
|
await installPageFunctionGuard(page);
|
|
201
|
-
const { installMediaRenderIdBridge, forcePreservedDrawingBuffer } = await import("./src-
|
|
201
|
+
const { installMediaRenderIdBridge, forcePreservedDrawingBuffer } = await import("./src-E467QUBK.js");
|
|
202
202
|
await installMediaRenderIdBridge(page);
|
|
203
203
|
await page.evaluateOnNewDocument(forcePreservedDrawingBuffer);
|
|
204
204
|
await page.setViewport(viewport);
|
|
@@ -218,7 +218,7 @@ async function launchCompositionBrowser(html, noListen, options) {
|
|
|
218
218
|
const { ensureBrowser, findSystemBrowser } = await import("./manager-IZIK7BHN.js");
|
|
219
219
|
const browser = await ensureBrowser({ signal: options.signal });
|
|
220
220
|
const puppeteer = await import("puppeteer-core");
|
|
221
|
-
const { buildChromeArgs } = await import("./src-
|
|
221
|
+
const { buildChromeArgs } = await import("./src-E467QUBK.js");
|
|
222
222
|
const requestedGpuMode = options.browserGpuMode ?? resolveCliChromeGpuMode();
|
|
223
223
|
const requiresWebGpu = compositionRequiresWebGpu(html);
|
|
224
224
|
let softwareWebGpu = false;
|
|
@@ -6,14 +6,14 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
loadProducer
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VW57BBGU.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveProjectRelativeSrc
|
|
12
12
|
} from "./chunk-PBNWRWKA.js";
|
|
13
13
|
|
|
14
14
|
// src/utils/projectMedia.ts
|
|
15
15
|
async function collectProjectMedia(projectDir) {
|
|
16
|
-
const { bundleToSingleHtml } = await import("./compiler-
|
|
16
|
+
const { bundleToSingleHtml } = await import("./compiler-YUM2ODOP.js");
|
|
17
17
|
const html = await bundleToSingleHtml(projectDir);
|
|
18
18
|
const producer = await loadProducer();
|
|
19
19
|
if (!producer.collectRenderMedia) throw new Error("Render media collector unavailable");
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
DEFAULT_VP9_CPU_USED,
|
|
9
9
|
isHttpUrl,
|
|
10
10
|
runFfmpeg
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-LIOE46OG.js";
|
|
12
12
|
import {
|
|
13
13
|
renameWithRetry
|
|
14
14
|
} from "./chunk-YWRUQ7XZ.js";
|
|
15
15
|
import {
|
|
16
16
|
parseAnimatedGifMetadata
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-GFA5ZCVI.js";
|
|
18
18
|
import {
|
|
19
19
|
parseHTML
|
|
20
20
|
} from "./chunk-GWTIFRF5.js";
|
|
@@ -5,12 +5,27 @@ var require = __hf_createRequire(import.meta.url);
|
|
|
5
5
|
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
|
+
HF_COLOR_CURVE_LUT_SIZE,
|
|
9
|
+
HF_COLOR_GRADING_ACTIVE_EFFECT_KEYS,
|
|
10
|
+
HF_COLOR_GRADING_ATTR,
|
|
11
|
+
HF_COLOR_GRADING_SOURCE_TAGS,
|
|
12
|
+
calculateHfColorGradingSecondaryMask,
|
|
13
|
+
compileHfColorCurve,
|
|
14
|
+
compileHfHueCurve,
|
|
15
|
+
hasHfColorGradingHueCurveValues,
|
|
16
|
+
hasHfColorGradingRgbCurveValues,
|
|
17
|
+
hasHfColorGradingSecondaryValues,
|
|
8
18
|
isMediaElement as isMediaElement2,
|
|
19
|
+
normalizeHfColorGrading,
|
|
20
|
+
packCubeLutToRgba8,
|
|
9
21
|
parseStrictFiniteTimingNumber,
|
|
10
22
|
resolveNaturalMediaTimelineDuration,
|
|
11
|
-
resolveTimedImageDurationSeconds
|
|
12
|
-
|
|
23
|
+
resolveTimedImageDurationSeconds,
|
|
24
|
+
unitFloatToByte
|
|
25
|
+
} from "./chunk-FBQVRYMD.js";
|
|
13
26
|
import {
|
|
27
|
+
COLOR_GROUP_ATTR,
|
|
28
|
+
COLOR_GROUP_TAG,
|
|
14
29
|
COMPOSITION_ATTRIBUTES,
|
|
15
30
|
MEDIA_START_BASIS_ATTR,
|
|
16
31
|
compositionOriginSeconds,
|
|
@@ -21,7 +36,7 @@ import {
|
|
|
21
36
|
parseStartExpression,
|
|
22
37
|
resolveMediaStartSeconds,
|
|
23
38
|
sameInstant
|
|
24
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-KSC4O2RY.js";
|
|
25
40
|
import {
|
|
26
41
|
CANVAS_DIMENSIONS,
|
|
27
42
|
isCompositionElement,
|
|
@@ -1200,6 +1215,313 @@ function clearGifFramesBeforeNext(bytes) {
|
|
|
1200
1215
|
return true;
|
|
1201
1216
|
}
|
|
1202
1217
|
|
|
1218
|
+
// ../core/dist/colorGroups.js
|
|
1219
|
+
var HF_COLOR_GROUP_TAG = COLOR_GROUP_TAG;
|
|
1220
|
+
var HF_COLOR_GROUP_ATTR = COLOR_GROUP_ATTR;
|
|
1221
|
+
function colorGroupOf(el) {
|
|
1222
|
+
if (typeof el.tagName !== "string" || typeof el.getAttribute !== "function")
|
|
1223
|
+
return null;
|
|
1224
|
+
if (!HF_COLOR_GRADING_SOURCE_TAGS.includes(el.tagName.toLowerCase())) {
|
|
1225
|
+
return null;
|
|
1226
|
+
}
|
|
1227
|
+
return el.getAttribute(HF_COLOR_GROUP_ATTR) || null;
|
|
1228
|
+
}
|
|
1229
|
+
function resolveColorGroupElement(root, groupId) {
|
|
1230
|
+
const el = root?.getElementById(groupId) ?? null;
|
|
1231
|
+
return el?.tagName.toLowerCase() === HF_COLOR_GROUP_TAG ? el : null;
|
|
1232
|
+
}
|
|
1233
|
+
function effectiveColorGrading(el, root) {
|
|
1234
|
+
const own = el.getAttribute(HF_COLOR_GRADING_ATTR);
|
|
1235
|
+
if (own !== null)
|
|
1236
|
+
return own;
|
|
1237
|
+
const groupId = colorGroupOf(el);
|
|
1238
|
+
if (!groupId)
|
|
1239
|
+
return null;
|
|
1240
|
+
return resolveColorGroupElement(root, groupId)?.getAttribute(HF_COLOR_GRADING_ATTR) ?? null;
|
|
1241
|
+
}
|
|
1242
|
+
function ensureColorGroupInertStyle(doc) {
|
|
1243
|
+
const styleId = "__hf-color-group-inert";
|
|
1244
|
+
if (!doc?.head || doc.getElementById(styleId))
|
|
1245
|
+
return;
|
|
1246
|
+
const style = doc.createElement("style");
|
|
1247
|
+
style.id = styleId;
|
|
1248
|
+
style.textContent = `${HF_COLOR_GROUP_TAG}{display:contents!important}`;
|
|
1249
|
+
doc.head.appendChild(style);
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
// ../core/dist/colorGradingBake.js
|
|
1253
|
+
var LUMA_WEIGHTS = [0.2126, 0.7152, 0.0722];
|
|
1254
|
+
var CURVE_MAX_INDEX = HF_COLOR_CURVE_LUT_SIZE - 1;
|
|
1255
|
+
var luma = (c) => c[0] * LUMA_WEIGHTS[0] + c[1] * LUMA_WEIGHTS[1] + c[2] * LUMA_WEIGHTS[2];
|
|
1256
|
+
var clamp = (value, min, max) => Math.min(max, Math.max(min, value));
|
|
1257
|
+
var clampRgb = (c) => [clamp(c[0], 0, 1), clamp(c[1], 0, 1), clamp(c[2], 0, 1)];
|
|
1258
|
+
var fract = (value) => value - Math.floor(value);
|
|
1259
|
+
var mod = (value, divisor2) => value - divisor2 * Math.floor(value / divisor2);
|
|
1260
|
+
var mix = (a, b, t) => a + (b - a) * t;
|
|
1261
|
+
var mixRgb = (a, b, t) => [
|
|
1262
|
+
mix(a[0], b[0], t),
|
|
1263
|
+
mix(a[1], b[1], t),
|
|
1264
|
+
mix(a[2], b[2], t)
|
|
1265
|
+
];
|
|
1266
|
+
var smoothstep = (edge0, edge1, value) => {
|
|
1267
|
+
const t = clamp((value - edge0) / (edge1 - edge0), 0, 1);
|
|
1268
|
+
return t * t * (3 - 2 * t);
|
|
1269
|
+
};
|
|
1270
|
+
var towardLuma = (c, base, amount) => [
|
|
1271
|
+
mix(base, c[0], amount),
|
|
1272
|
+
mix(base, c[1], amount),
|
|
1273
|
+
mix(base, c[2], amount)
|
|
1274
|
+
];
|
|
1275
|
+
var texel = (value) => unitFloatToByte(Math.fround(value)) / 255;
|
|
1276
|
+
var signedUnit = (value, range) => Math.min(1, Math.max(1 / 255, (value * (127 / range) + 128) / 255));
|
|
1277
|
+
var decodeSigned = (value) => (value * 255 - 128) / 127;
|
|
1278
|
+
var signedTexel = (value, range) => decodeSigned(texel(signedUnit(value, range)));
|
|
1279
|
+
function rgbToHsv(c) {
|
|
1280
|
+
const maximum = Math.max(c[0], c[1], c[2]);
|
|
1281
|
+
const minimum = Math.min(c[0], c[1], c[2]);
|
|
1282
|
+
const delta = maximum - minimum;
|
|
1283
|
+
let hue = 0;
|
|
1284
|
+
if (delta > 1e-5) {
|
|
1285
|
+
if (maximum === c[0])
|
|
1286
|
+
hue = mod((c[1] - c[2]) / delta, 6);
|
|
1287
|
+
else if (maximum === c[1])
|
|
1288
|
+
hue = (c[2] - c[0]) / delta + 2;
|
|
1289
|
+
else
|
|
1290
|
+
hue = (c[0] - c[1]) / delta + 4;
|
|
1291
|
+
hue = fract(hue / 6);
|
|
1292
|
+
}
|
|
1293
|
+
return [hue, maximum > 1e-5 ? delta / maximum : 0, maximum];
|
|
1294
|
+
}
|
|
1295
|
+
function hsvToRgb([hue, saturation, value]) {
|
|
1296
|
+
const channel = (offset2) => {
|
|
1297
|
+
const band = Math.abs(fract(hue + offset2) * 6 - 3);
|
|
1298
|
+
return value * mix(1, clamp(band - 1, 0, 1), saturation);
|
|
1299
|
+
};
|
|
1300
|
+
return [channel(0), channel(0.6666667), channel(0.3333333)];
|
|
1301
|
+
}
|
|
1302
|
+
function applyPrimaryGrade(input, adjust) {
|
|
1303
|
+
const gain = 2 ** adjust.exposure;
|
|
1304
|
+
let c = [input[0] * gain, input[1] * gain, input[2] * gain];
|
|
1305
|
+
const y = luma(c);
|
|
1306
|
+
const lift = adjust.shadows * 0.35 * (1 - smoothstep(0, 0.65, y)) + adjust.highlights * 0.35 * smoothstep(0.35, 1, y);
|
|
1307
|
+
const blackPoint = clamp(adjust.blacks * 0.18, -0.18, 0.18);
|
|
1308
|
+
const whitePoint = clamp(1 - adjust.whites * 0.18, 0.82, 1.18);
|
|
1309
|
+
const range = Math.max(whitePoint - blackPoint, 0.2);
|
|
1310
|
+
c = c.map((value) => (value + lift - blackPoint) / range);
|
|
1311
|
+
c[0] += adjust.temperature * 0.08 + adjust.tint * 0.04;
|
|
1312
|
+
c[2] -= adjust.temperature * 0.08 - adjust.tint * 0.04;
|
|
1313
|
+
c[1] -= adjust.tint * 0.08;
|
|
1314
|
+
const contrast = Math.max(0, 1 + adjust.contrast);
|
|
1315
|
+
c = c.map((value) => (value - 0.5) * contrast + 0.5);
|
|
1316
|
+
const satLuma = luma(c);
|
|
1317
|
+
const currentSat = clamp(Math.max(...c) - Math.min(...c), 0, 1);
|
|
1318
|
+
const skinLike = smoothstep(0.02, 0.18, c[0] - c[1]) * smoothstep(0, 0.16, c[1] - c[2]) * smoothstep(0.18, 0.82, satLuma);
|
|
1319
|
+
const vibranceWeight = (1 - currentSat * 0.72) * mix(1, 0.55, skinLike);
|
|
1320
|
+
c = towardLuma(c, satLuma, Math.max(0, 1 + adjust.vibrance * vibranceWeight));
|
|
1321
|
+
return towardLuma(c, satLuma, Math.max(0, 1 + adjust.saturation));
|
|
1322
|
+
}
|
|
1323
|
+
function wheelDirection(hue) {
|
|
1324
|
+
const direction = hsvToRgb([fract(hue), 1, 1]);
|
|
1325
|
+
const y = luma(direction);
|
|
1326
|
+
const centred = direction.map((value) => value - y);
|
|
1327
|
+
const scale = Math.max(Math.abs(centred[0]), Math.abs(centred[1]), Math.abs(centred[2]), 1e-4);
|
|
1328
|
+
return centred.map((value) => value / scale);
|
|
1329
|
+
}
|
|
1330
|
+
function applyTonalWheels(color, wheels) {
|
|
1331
|
+
const y = luma(color);
|
|
1332
|
+
const shadows = 1 - smoothstep(0, 0.6, y);
|
|
1333
|
+
const highlights = smoothstep(0.4, 1, y);
|
|
1334
|
+
const midtones = Math.max(0, 1 - shadows - highlights);
|
|
1335
|
+
const total = Math.max(shadows + midtones + highlights, 1e-4);
|
|
1336
|
+
const c = [...color];
|
|
1337
|
+
for (const [wheel, weight] of [
|
|
1338
|
+
[wheels.shadows, shadows / total],
|
|
1339
|
+
[wheels.midtones, midtones / total],
|
|
1340
|
+
[wheels.highlights, highlights / total]
|
|
1341
|
+
]) {
|
|
1342
|
+
const direction = wheelDirection(wheel.hue / 360);
|
|
1343
|
+
for (let channel = 0; channel < 3; channel += 1) {
|
|
1344
|
+
c[channel] = (c[channel] ?? 0) + (direction[channel] ?? 0) * wheel.amount * weight * 0.18 + wheel.level * weight * 0.25;
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
return c;
|
|
1348
|
+
}
|
|
1349
|
+
function quantisedCurve(samples) {
|
|
1350
|
+
return Float64Array.from(samples, texel);
|
|
1351
|
+
}
|
|
1352
|
+
function sampleCurve(samples, coordinate) {
|
|
1353
|
+
const position = clamp(coordinate, 0, 1) * CURVE_MAX_INDEX;
|
|
1354
|
+
const lower = Math.floor(position);
|
|
1355
|
+
const upper = Math.min(lower + 1, CURVE_MAX_INDEX);
|
|
1356
|
+
return mix(samples[lower] ?? 0, samples[upper] ?? 0, position - lower);
|
|
1357
|
+
}
|
|
1358
|
+
function applyRgbCurves(c, curves) {
|
|
1359
|
+
return [
|
|
1360
|
+
sampleCurve(curves.red, sampleCurve(curves.master, c[0])),
|
|
1361
|
+
sampleCurve(curves.green, sampleCurve(curves.master, c[1])),
|
|
1362
|
+
sampleCurve(curves.blue, sampleCurve(curves.master, c[2]))
|
|
1363
|
+
];
|
|
1364
|
+
}
|
|
1365
|
+
function signedHueCurve(points, outputMin, outputMax) {
|
|
1366
|
+
const samples = points.length >= 3 ? compileHfHueCurve(points, outputMin, outputMax) : new Float32Array(HF_COLOR_CURVE_LUT_SIZE);
|
|
1367
|
+
return Float64Array.from(samples, (value) => signedTexel(value, outputMax));
|
|
1368
|
+
}
|
|
1369
|
+
function sampleHueCurve(samples, hue) {
|
|
1370
|
+
const position = fract(hue) * HF_COLOR_CURVE_LUT_SIZE;
|
|
1371
|
+
const lower = Math.floor(position);
|
|
1372
|
+
const upper = (lower + 1) % HF_COLOR_CURVE_LUT_SIZE;
|
|
1373
|
+
return mix(samples[lower] ?? 0, samples[upper] ?? 0, position - lower);
|
|
1374
|
+
}
|
|
1375
|
+
function applyHueCurves(c, curves) {
|
|
1376
|
+
const hsv = rgbToHsv(clampRgb(c));
|
|
1377
|
+
const originalLuma = luma(c);
|
|
1378
|
+
const hueShift = sampleHueCurve(curves.hue, hsv[0]);
|
|
1379
|
+
const saturation = sampleHueCurve(curves.saturation, hsv[0]);
|
|
1380
|
+
const lumaShift = sampleHueCurve(curves.luma, hsv[0]);
|
|
1381
|
+
const shifted = hsvToRgb([
|
|
1382
|
+
fract(hsv[0] + hueShift * 0.5),
|
|
1383
|
+
clamp(hsv[1] * Math.max(0, 1 + saturation), 0, 1),
|
|
1384
|
+
hsv[2]
|
|
1385
|
+
]);
|
|
1386
|
+
const offset2 = originalLuma - luma(shifted) + lumaShift;
|
|
1387
|
+
return shifted.map((value) => value + offset2);
|
|
1388
|
+
}
|
|
1389
|
+
function quantisedSecondary({ key, correction }) {
|
|
1390
|
+
const range = (soft) => ({
|
|
1391
|
+
min: texel(soft.min),
|
|
1392
|
+
max: texel(soft.max),
|
|
1393
|
+
softness: texel(soft.softness / 0.5) * 0.5
|
|
1394
|
+
});
|
|
1395
|
+
return {
|
|
1396
|
+
key: {
|
|
1397
|
+
hue: {
|
|
1398
|
+
center: texel(key.hue.center / 360) * 360,
|
|
1399
|
+
range: texel(key.hue.range / 180) * 180,
|
|
1400
|
+
softness: texel(key.hue.softness / 180) * 180
|
|
1401
|
+
},
|
|
1402
|
+
saturation: range(key.saturation),
|
|
1403
|
+
luma: range(key.luma)
|
|
1404
|
+
},
|
|
1405
|
+
hueShift: signedTexel(correction.hueShift, 180),
|
|
1406
|
+
saturation: signedTexel(correction.saturation, 1),
|
|
1407
|
+
luma: signedTexel(correction.luma, 1),
|
|
1408
|
+
temperature: signedTexel(correction.temperature, 1),
|
|
1409
|
+
tint: signedTexel(correction.tint, 1)
|
|
1410
|
+
};
|
|
1411
|
+
}
|
|
1412
|
+
function applySecondary(c, secondary) {
|
|
1413
|
+
const hsv = rgbToHsv(clampRgb(c));
|
|
1414
|
+
const mask = calculateHfColorGradingSecondaryMask(hsv[0] * 360, hsv[1], luma(c), secondary.key);
|
|
1415
|
+
if (mask <= 0)
|
|
1416
|
+
return c;
|
|
1417
|
+
const rotated = hsvToRgb([fract(hsv[0] + secondary.hueShift * 0.5), hsv[1], hsv[2]]);
|
|
1418
|
+
const corrected = towardLuma(rotated, luma(rotated), Math.max(0, 1 + secondary.saturation)).map((value) => value + secondary.luma);
|
|
1419
|
+
corrected[0] += secondary.temperature * 0.08 + secondary.tint * 0.04;
|
|
1420
|
+
corrected[2] -= secondary.temperature * 0.08 - secondary.tint * 0.04;
|
|
1421
|
+
corrected[1] -= secondary.tint * 0.08;
|
|
1422
|
+
return mixRgb(c, corrected, mask);
|
|
1423
|
+
}
|
|
1424
|
+
function sampleLut(lut, r, g, b) {
|
|
1425
|
+
const index = (g * lut.width + b * lut.size + r) * 4;
|
|
1426
|
+
return [
|
|
1427
|
+
(lut.data[index] ?? 0) / 255,
|
|
1428
|
+
(lut.data[index + 1] ?? 0) / 255,
|
|
1429
|
+
(lut.data[index + 2] ?? 0) / 255
|
|
1430
|
+
];
|
|
1431
|
+
}
|
|
1432
|
+
function applyLut(color, lut) {
|
|
1433
|
+
const top = lut.size - 1;
|
|
1434
|
+
const scaled = color.map((value, channel) => clamp((value - (lut.domainMin[channel] ?? 0)) / (lut.span[channel] ?? 1), 0, 1) * top);
|
|
1435
|
+
const lo = scaled.map(Math.floor);
|
|
1436
|
+
const hi = lo.map((value) => Math.min(value + 1, top));
|
|
1437
|
+
const f = scaled.map((value, channel) => value - (lo[channel] ?? 0));
|
|
1438
|
+
const c00 = mixRgb(sampleLut(lut, lo[0], lo[1], lo[2]), sampleLut(lut, hi[0], lo[1], lo[2]), f[0]);
|
|
1439
|
+
const c10 = mixRgb(sampleLut(lut, lo[0], hi[1], lo[2]), sampleLut(lut, hi[0], hi[1], lo[2]), f[0]);
|
|
1440
|
+
const c01 = mixRgb(sampleLut(lut, lo[0], lo[1], hi[2]), sampleLut(lut, hi[0], lo[1], hi[2]), f[0]);
|
|
1441
|
+
const c11 = mixRgb(sampleLut(lut, lo[0], hi[1], hi[2]), sampleLut(lut, hi[0], hi[1], hi[2]), f[0]);
|
|
1442
|
+
const lutColor = mixRgb(mixRgb(c00, c10, f[1]), mixRgb(c01, c11, f[1]), f[2]);
|
|
1443
|
+
return mixRgb(color, lutColor, clamp(lut.intensity, 0, 1));
|
|
1444
|
+
}
|
|
1445
|
+
function spatialStages(grading) {
|
|
1446
|
+
const details = ["vignette", "grain"].filter((key) => Math.abs(grading.details[key]) > 1e-4).map((key) => `details.${key}`);
|
|
1447
|
+
const effects = HF_COLOR_GRADING_ACTIVE_EFFECT_KEYS.filter((key) => Math.abs(grading.effects[key]) > 1e-4).map((key) => `effects.${key}`);
|
|
1448
|
+
return [...details, ...effects];
|
|
1449
|
+
}
|
|
1450
|
+
function compileLut(grading, lut) {
|
|
1451
|
+
if (!grading.lut || grading.lut.intensity === 0)
|
|
1452
|
+
return null;
|
|
1453
|
+
if (!lut) {
|
|
1454
|
+
throw new Error(`The grading applies the LUT ${grading.lut.src}; pass its parsed .cube as options.lut to bake it.`);
|
|
1455
|
+
}
|
|
1456
|
+
const packed = packCubeLutToRgba8(lut);
|
|
1457
|
+
return {
|
|
1458
|
+
size: Math.max(lut.size, 2),
|
|
1459
|
+
width: packed.width,
|
|
1460
|
+
data: packed.data,
|
|
1461
|
+
domainMin: [...lut.domainMin],
|
|
1462
|
+
span: lut.domainMax.map((max, channel) => Math.max(max - (lut.domainMin[channel] ?? 0), 1e-5)),
|
|
1463
|
+
intensity: grading.lut.intensity ?? 0
|
|
1464
|
+
};
|
|
1465
|
+
}
|
|
1466
|
+
function compileGrade(grading, lut) {
|
|
1467
|
+
const spatial = spatialStages(grading);
|
|
1468
|
+
if (spatial.length > 0) {
|
|
1469
|
+
throw new Error(`A 3D LUT holds only colour; this grading also has spatial stages: ${spatial.join(", ")}.`);
|
|
1470
|
+
}
|
|
1471
|
+
const { curves, hueCurves, secondaries } = grading;
|
|
1472
|
+
return {
|
|
1473
|
+
grading,
|
|
1474
|
+
curves: hasHfColorGradingRgbCurveValues(curves) ? {
|
|
1475
|
+
red: quantisedCurve(compileHfColorCurve(curves.red)),
|
|
1476
|
+
green: quantisedCurve(compileHfColorCurve(curves.green)),
|
|
1477
|
+
blue: quantisedCurve(compileHfColorCurve(curves.blue)),
|
|
1478
|
+
master: quantisedCurve(compileHfColorCurve(curves.master))
|
|
1479
|
+
} : null,
|
|
1480
|
+
hueCurves: hasHfColorGradingHueCurveValues(hueCurves) ? {
|
|
1481
|
+
hue: signedHueCurve(hueCurves.hueVsHue, -180, 180),
|
|
1482
|
+
saturation: signedHueCurve(hueCurves.hueVsSaturation, -1, 1),
|
|
1483
|
+
luma: signedHueCurve(hueCurves.hueVsLuma, -1, 1)
|
|
1484
|
+
} : null,
|
|
1485
|
+
secondaries: hasHfColorGradingSecondaryValues(secondaries) ? secondaries.filter((secondary) => secondary.enabled).map(quantisedSecondary) : [],
|
|
1486
|
+
lut: compileLut(grading, lut)
|
|
1487
|
+
};
|
|
1488
|
+
}
|
|
1489
|
+
function gradeColor(input, grade) {
|
|
1490
|
+
let c = applyPrimaryGrade(input, grade.grading.adjust);
|
|
1491
|
+
c = applyTonalWheels(c, grade.grading.wheels);
|
|
1492
|
+
if (grade.curves)
|
|
1493
|
+
c = applyRgbCurves(c, grade.curves);
|
|
1494
|
+
if (grade.hueCurves)
|
|
1495
|
+
c = applyHueCurves(c, grade.hueCurves);
|
|
1496
|
+
for (const secondary of grade.secondaries)
|
|
1497
|
+
c = applySecondary(c, secondary);
|
|
1498
|
+
c = clampRgb(c);
|
|
1499
|
+
if (grade.lut)
|
|
1500
|
+
c = clampRgb(applyLut(c, grade.lut));
|
|
1501
|
+
return clampRgb(mixRgb(input, c, grade.grading.intensity));
|
|
1502
|
+
}
|
|
1503
|
+
function bakeHfColorGradingCube(grading, options = {}) {
|
|
1504
|
+
const size = options.size ?? 33;
|
|
1505
|
+
if (!Number.isInteger(size) || size < 2 || size > 256) {
|
|
1506
|
+
throw new RangeError(`A .cube size must be a whole number from 2 to 256, not ${size}.`);
|
|
1507
|
+
}
|
|
1508
|
+
const resolved = normalizeHfColorGrading(grading);
|
|
1509
|
+
const grade = resolved ? compileGrade(resolved, options.lut) : null;
|
|
1510
|
+
const step = size - 1;
|
|
1511
|
+
const lines = [`LUT_3D_SIZE ${size}`, "DOMAIN_MIN 0 0 0", "DOMAIN_MAX 1 1 1"];
|
|
1512
|
+
for (let b = 0; b < size; b += 1) {
|
|
1513
|
+
for (let g = 0; g < size; g += 1) {
|
|
1514
|
+
for (let r = 0; r < size; r += 1) {
|
|
1515
|
+
const input = [r / step, g / step, b / step];
|
|
1516
|
+
const output = grade ? gradeColor(input, grade) : input;
|
|
1517
|
+
lines.push(output.map((value) => value.toFixed(6)).join(" "));
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
return `${lines.join("\n")}
|
|
1522
|
+
`;
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1203
1525
|
// ../core/dist/hdrToneMap.js
|
|
1204
1526
|
function known(value) {
|
|
1205
1527
|
return value && value !== "unknown" && value !== "reserved" ? value : void 0;
|
|
@@ -5645,6 +5967,13 @@ export {
|
|
|
5645
5967
|
parseAnimatedGifMetadata,
|
|
5646
5968
|
gifClearsAfterLeavingFrameInPlace,
|
|
5647
5969
|
clearGifFramesBeforeNext,
|
|
5970
|
+
HF_COLOR_GROUP_TAG,
|
|
5971
|
+
HF_COLOR_GROUP_ATTR,
|
|
5972
|
+
colorGroupOf,
|
|
5973
|
+
resolveColorGroupElement,
|
|
5974
|
+
effectiveColorGrading,
|
|
5975
|
+
ensureColorGroupInertStyle,
|
|
5976
|
+
bakeHfColorGradingCube,
|
|
5648
5977
|
hdrToSdrToneMapFilter,
|
|
5649
5978
|
firstFrameColourArgs,
|
|
5650
5979
|
parseFirstFrameColour,
|
|
@@ -19,11 +19,11 @@ import {
|
|
|
19
19
|
splitElementInHtml,
|
|
20
20
|
unwrapElementsFromHtml,
|
|
21
21
|
wrapElementsInHtml
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-QCCPXMKP.js";
|
|
23
23
|
import {
|
|
24
24
|
MEDIA_LINK_ATTR,
|
|
25
25
|
relinkSplitHalves
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-VZBJ5BQF.js";
|
|
27
27
|
import {
|
|
28
28
|
DEFAULT_TARGET_LUFS,
|
|
29
29
|
absoluteLoudnessPlan,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
requestedProjectPath,
|
|
33
33
|
requiredFfmpeg,
|
|
34
34
|
resolveLocalAudioPath
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-TYMD647L.js";
|
|
36
36
|
import {
|
|
37
37
|
HistoryBusyError,
|
|
38
38
|
MAX_WINDOW_IDLE_MS,
|
|
@@ -70,11 +70,11 @@ import {
|
|
|
70
70
|
scanProjectMedia,
|
|
71
71
|
shouldPrewarmProxy,
|
|
72
72
|
waitForProxy
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-VAOROEWU.js";
|
|
74
74
|
import {
|
|
75
75
|
probeAudioTrack,
|
|
76
76
|
probeMediaMetadata
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-LRYNDYAE.js";
|
|
78
78
|
import {
|
|
79
79
|
STUDIO_MOTION_PATH,
|
|
80
80
|
createStudioMotionRenderBodyScript,
|
|
@@ -115,7 +115,7 @@ import {
|
|
|
115
115
|
ensureHfIds,
|
|
116
116
|
stampHfIdsInPlace,
|
|
117
117
|
stripSdrPngColourTags
|
|
118
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-4HMG5CQJ.js";
|
|
119
119
|
import {
|
|
120
120
|
GSAP_BASE_URL_META,
|
|
121
121
|
PREVIEW_PROXY_BOX_PARAM,
|
|
@@ -132,7 +132,7 @@ import {
|
|
|
132
132
|
normalizeGsapLocalRoot,
|
|
133
133
|
parseFps,
|
|
134
134
|
parsePreviewProxyBox
|
|
135
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-GFA5ZCVI.js";
|
|
136
136
|
import {
|
|
137
137
|
AFTER_FONTS_SCRIPT_TYPE,
|
|
138
138
|
RUNTIME_BOOTSTRAP_ATTR,
|
|
@@ -147,7 +147,7 @@ import {
|
|
|
147
147
|
resolveRateSpec,
|
|
148
148
|
sourceTimeAt,
|
|
149
149
|
stripEmbeddedRuntimeScripts
|
|
150
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-FBQVRYMD.js";
|
|
151
151
|
import {
|
|
152
152
|
ProjectRootMissingError,
|
|
153
153
|
folderGone,
|
|
@@ -174,7 +174,7 @@ import {
|
|
|
174
174
|
rewriteCssAssetUrls,
|
|
175
175
|
rewriteInlineStyleAssetUrls,
|
|
176
176
|
sameInstant
|
|
177
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-KSC4O2RY.js";
|
|
178
178
|
import {
|
|
179
179
|
HTML_ATTRIBUTE_ENTITIES,
|
|
180
180
|
MagicString,
|
|
@@ -5592,7 +5592,7 @@ async function prepareGsapMutationScript(c, res, firstMutation) {
|
|
|
5592
5592
|
let block = extractGsapScriptBlock(html);
|
|
5593
5593
|
if (!block && (firstMutation.type === "add" || firstMutation.type === "add-with-keyframes")) {
|
|
5594
5594
|
const compId = html.match(/data-composition-id="([^"]+)"/)?.[1] ?? "main";
|
|
5595
|
-
const { GSAP_CDN } = await import("./dist-
|
|
5595
|
+
const { GSAP_CDN } = await import("./dist-ZE5X6MWG.js");
|
|
5596
5596
|
const bootstrap = [
|
|
5597
5597
|
`<script src="${GSAP_CDN}"></script>`,
|
|
5598
5598
|
"<script>",
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
typeDirPath,
|
|
21
21
|
updateRecord,
|
|
22
22
|
withFigmaErrors
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-WJRYQYOM.js";
|
|
24
24
|
import {
|
|
25
25
|
defineCommand
|
|
26
26
|
} from "./chunk-DL4OD7IA.js";
|
|
@@ -229,7 +229,7 @@ var asset_default = defineCommand({
|
|
|
229
229
|
rendered > 0 ? `(${results.length} nodes, ${rendered} rendered in 1 figma request)` : `(${results.length} nodes, all reused from cache \u2014 no figma request)`
|
|
230
230
|
);
|
|
231
231
|
}
|
|
232
|
-
const { trackFigmaImport } = await import("./telemetry-
|
|
232
|
+
const { trackFigmaImport } = await import("./telemetry-GEHWCV7C.js");
|
|
233
233
|
trackFigmaImport({
|
|
234
234
|
phase: "asset",
|
|
235
235
|
reused: results.every((r) => r.reused),
|
|
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
getMimeType,
|
|
9
9
|
injectMediaCodecMapIntoHtml
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GRCS7WRH.js";
|
|
11
11
|
import {
|
|
12
12
|
PROXY_VARIANT_CONFIG,
|
|
13
13
|
ProxyCapacityError,
|
|
@@ -18,26 +18,26 @@ import {
|
|
|
18
18
|
recordProxyRequest,
|
|
19
19
|
resolveProxy,
|
|
20
20
|
resolveProxyVariantRequest
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-VAOROEWU.js";
|
|
22
22
|
import {
|
|
23
23
|
findStageProxyBox
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-XM3NMXLX.js";
|
|
25
25
|
import {
|
|
26
26
|
resolveAutoProxy
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-VEWR5HXT.js";
|
|
28
28
|
import {
|
|
29
29
|
listenOnBrowserSafePort
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-LIOE46OG.js";
|
|
31
31
|
import {
|
|
32
32
|
stripSdrPngColourTags
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-4HMG5CQJ.js";
|
|
34
34
|
import {
|
|
35
35
|
PREVIEW_PROXY_BOX_PARAM,
|
|
36
36
|
parsePreviewProxyBox
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-GFA5ZCVI.js";
|
|
38
38
|
import {
|
|
39
39
|
decodeWellFormedEscapes
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-KSC4O2RY.js";
|
|
41
41
|
|
|
42
42
|
// src/utils/staticProjectServer.ts
|
|
43
43
|
import { createServer, request as httpRequest } from "http";
|
|
@@ -11,31 +11,31 @@ import {
|
|
|
11
11
|
findSyncPartner,
|
|
12
12
|
readLinkTiming,
|
|
13
13
|
syncOffsetFrames
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-VZBJ5BQF.js";
|
|
15
15
|
import {
|
|
16
16
|
readCompositionFps
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-6UUPTWUG.js";
|
|
18
18
|
import {
|
|
19
19
|
HF_AUDIO_GROUP_ATTR,
|
|
20
20
|
extractAudioMetadata,
|
|
21
21
|
extractMediaMetadata
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-LIOE46OG.js";
|
|
23
23
|
import {
|
|
24
24
|
byStart,
|
|
25
25
|
fpsToNumber,
|
|
26
26
|
parseFpsWithDefault
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-GFA5ZCVI.js";
|
|
28
28
|
import {
|
|
29
29
|
HF_AUDIO_AUTOMATION_ATTR,
|
|
30
30
|
HF_AUDIO_FX_ATTR,
|
|
31
31
|
parseAudioFxChain,
|
|
32
32
|
parseAutomation,
|
|
33
33
|
resolveAutomation
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-FBQVRYMD.js";
|
|
35
35
|
import {
|
|
36
36
|
resolveReferencedDuration,
|
|
37
37
|
resolveReferencedStart
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-JF3RF6GS.js";
|
|
39
39
|
import {
|
|
40
40
|
resolveAuthoredAssetFile
|
|
41
41
|
} from "./chunk-PBNWRWKA.js";
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
readPlaybackRate,
|
|
49
49
|
resolveMediaDuration,
|
|
50
50
|
resolveMediaStartSeconds
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-KSC4O2RY.js";
|
|
52
52
|
import {
|
|
53
53
|
isSubCompositionHost,
|
|
54
54
|
topLevelElements,
|