hyperframes 0.8.150 → 0.8.152
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-3ZIFEN2U.js → add-SA33REHW.js} +14 -14
- package/dist/{animatedGifPrep-77LPFLKJ.js → animatedGifPrep-3YXJQZ7L.js} +9 -9
- package/dist/api.js +19 -19
- package/dist/{asset-EYSZEHM6.js → asset-PUVPTWPD.js} +2 -2
- package/dist/{assetCataloger-KX3HD7ZI.js → assetCataloger-VWE2PLBX.js} +4 -4
- package/dist/{auth-L6IWNRXY.js → auth-PS3M6AI7.js} +1 -1
- package/dist/{autoUpdate-2O3HZB65.js → autoUpdate-CMO4SHWU.js} +2 -2
- package/dist/{backgroundChecks-BH2LMJYE.js → backgroundChecks-EDZ2A55J.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-ZBKAYLWU.js → batchRender-7PLJISCN.js} +5 -5
- package/dist/{beats-IVLF2566.js → beats-2MDSIOE7.js} +15 -15
- package/dist/{benchmark-SYZFW2G7.js → benchmark-KBBXAPI4.js} +10 -10
- package/dist/{browser-OSW3L25S.js → browser-OMWKZRSW.js} +5 -5
- package/dist/{bundleWithLocalizedFonts-I4CWOXLK.js → bundleWithLocalizedFonts-76DMCRIW.js} +2 -2
- package/dist/{capture-AZOQ57TM.js → capture-LRUUXH5Q.js} +2 -2
- package/dist/{capture-V5ICGSVJ.js → capture-YGDC7GN3.js} +13 -13
- package/dist/{catalog-VBJOA2Y5.js → catalog-SMEBKEVO.js} +14 -14
- package/dist/{catch-up-TKSEDNJK.js → catch-up-OMILX3WE.js} +4 -4
- package/dist/{check-3HFISKDB.js → check-NUZ62LIW.js} +288 -64
- package/dist/{checkBrowser-MXBDNZJB.js → checkBrowser-MSTVEL4V.js} +181 -38
- package/dist/{chunk-73RBX2E7.js → chunk-3DZBQ7MH.js} +3 -3
- package/dist/{chunk-6QB7F2II.js → chunk-3E4OCOC5.js} +1 -1
- package/dist/{chunk-OQ7XMM3S.js → chunk-3HPJM5IQ.js} +1 -1
- package/dist/{chunk-UJB7356Y.js → chunk-3LO7BBJX.js} +3 -3
- package/dist/{chunk-APDLWWFG.js → chunk-3VGU2SH7.js} +1 -1
- package/dist/{chunk-DUUFDLC4.js → chunk-4MLYMDQ4.js} +1 -1
- package/dist/{chunk-AXPNVC3N.js → chunk-4UMKAUZI.js} +1 -1
- package/dist/{chunk-XPQSL5VS.js → chunk-54DMWFQZ.js} +8 -1
- package/dist/chunk-57GN6KWT.js +179 -0
- package/dist/{chunk-374QQGBQ.js → chunk-5CS4T6C6.js} +63 -12
- package/dist/{chunk-PCWOSS7G.js → chunk-5ERVRJMV.js} +3 -3
- package/dist/{chunk-TZPZE5PS.js → chunk-5VMSUW4Z.js} +6 -3
- package/dist/{chunk-M6UDJ2E7.js → chunk-6Z4YJ5Q3.js} +3 -3
- package/dist/{chunk-FJWEYVEM.js → chunk-7FYFEXD2.js} +658 -198
- package/dist/{chunk-UQYQ7TBA.js → chunk-7NPSXBIN.js} +2 -2
- package/dist/chunk-7TASSBN2.js +215 -0
- package/dist/{chunk-F2RLIE7P.js → chunk-ANS56TPS.js} +11 -11
- package/dist/{chunk-DOVJRUFM.js → chunk-BQK3J7XO.js} +1 -1
- package/dist/{chunk-FPAT5HTI.js → chunk-BYJYQWEX.js} +10 -10
- package/dist/{chunk-XXPYZBZ3.js → chunk-C6TPGUWD.js} +2 -2
- package/dist/{chunk-XQMEGSHG.js → chunk-D6RJXQLD.js} +1 -1
- package/dist/{chunk-RW7NLGPD.js → chunk-DFXK7KUO.js} +25 -17
- package/dist/{chunk-6SFPQ2RZ.js → chunk-E6EYZ33P.js} +2 -2
- package/dist/{chunk-AKYQGZLU.js → chunk-EVTHG34H.js} +2 -2
- package/dist/{chunk-5NAYNDBT.js → chunk-EXH6L2XZ.js} +6 -2
- package/dist/{chunk-AIJS74LG.js → chunk-FFDC5OWV.js} +8 -2
- package/dist/{chunk-4WFNTWKZ.js → chunk-FNN5QINS.js} +2 -2
- package/dist/{chunk-DMKI64EZ.js → chunk-FSZAFCU7.js} +1 -1
- package/dist/{chunk-S5F26DUL.js → chunk-GQETH4PE.js} +3 -3
- package/dist/{chunk-3UAIVF4L.js → chunk-H2SGM2V2.js} +1 -1
- package/dist/{chunk-O4DC5CHF.js → chunk-H7FXBK3Q.js} +1 -1
- package/dist/{chunk-UVVI2NJQ.js → chunk-HBCRRCTX.js} +109 -31
- package/dist/{chunk-NFQY7EIC.js → chunk-IBYC3VUA.js} +1 -1
- package/dist/{chunk-2KAL22B5.js → chunk-IEDT4EXE.js} +1 -1
- package/dist/{chunk-I6DATIHC.js → chunk-IZIRIDJH.js} +2 -2
- package/dist/{chunk-Z6WZDGCS.js → chunk-IZKXUYZE.js} +2 -2
- package/dist/chunk-KCFF4ENE.js +24 -0
- package/dist/{chunk-6KWA3XPS.js → chunk-KZ3L3W4Q.js} +1 -1
- package/dist/{chunk-7IEGPJ4P.js → chunk-LBT4AMSF.js} +1 -1
- package/dist/{chunk-7JTFPUMA.js → chunk-LECTCGGS.js} +1 -1
- package/dist/{chunk-7E4VHPKJ.js → chunk-LVPSWUS6.js} +5 -5
- package/dist/{chunk-6NPFJ255.js → chunk-MNHPG2UO.js} +1 -1
- package/dist/{chunk-FN6KAS7A.js → chunk-NHAG2KCE.js} +7 -7
- package/dist/{chunk-423DJVX2.js → chunk-PKO2EWO7.js} +1 -1
- package/dist/{chunk-ZNHAJCEA.js → chunk-PRXAOZWZ.js} +28 -13
- package/dist/{chunk-VQ7YIURZ.js → chunk-PTXZDSW5.js} +5 -5
- package/dist/{chunk-XANZ4R4P.js → chunk-QECEOV6W.js} +3 -3
- package/dist/{chunk-BLRJKBKP.js → chunk-QESSGUKX.js} +1 -1
- package/dist/{chunk-WLIUULZQ.js → chunk-RN5I2DP5.js} +29 -15
- package/dist/chunk-S3RCK56N.js +3795 -0
- package/dist/{chunk-UAIUVPZE.js → chunk-SWCSL6WS.js} +6 -6
- package/dist/{chunk-2PSPARWP.js → chunk-TYXH3EKP.js} +4 -0
- package/dist/{chunk-FMNVTKX2.js → chunk-U3BCDVZO.js} +1 -1
- package/dist/{chunk-LW5VFBSY.js → chunk-VS732BUG.js} +1 -1
- package/dist/{chunk-LFNQDTSH.js → chunk-VYKPBRCB.js} +63 -12
- package/dist/{chunk-M5B42RL5.js → chunk-WUUOFMHU.js} +3 -3
- package/dist/{chunk-A6ZO4BX7.js → chunk-XEFFJRYX.js} +2 -2
- package/dist/{chunk-EL5QVJEG.js → chunk-XINGD6MS.js} +4 -4
- package/dist/chunk-XSEGMQYA.js +30 -0
- package/dist/{chunk-CZQLCBWY.js → chunk-YG2Y55KF.js} +1 -1
- package/dist/{chunk-B3XLIBFL.js → chunk-YIJMVFEJ.js} +1 -1
- package/dist/{chunk-JDB65PPT.js → chunk-YOEGUBBY.js} +13 -12
- package/dist/{chunk-AFRXL75S.js → chunk-YYEYOFHW.js} +1 -1
- package/dist/{chunk-R5A7454P.js → chunk-ZTM3RMAD.js} +2 -2
- package/dist/{clean-7HU7S7DT.js → clean-F75G45BI.js} +56 -35
- package/dist/cli.js +53 -53
- package/dist/{cloud-HAXHBO25.js → cloud-KVJAOUWH.js} +4 -4
- package/dist/{cloudrun-A3PIJ6DX.js → cloudrun-Q7Q7O4GY.js} +6 -6
- package/dist/{compare-6IPSQMSM.js → compare-DGUJ4QWU.js} +30 -30
- package/dist/{compiler-UQP2VXN6.js → compiler-NCN6PTVH.js} +6 -6
- package/dist/{component-FF3AU24M.js → component-PSYGT3JV.js} +3 -3
- package/dist/{compositions-JSH4MZXB.js → compositions-J3GAETIC.js} +13 -13
- package/dist/{delete-G763SW64.js → delete-MR7LRGRP.js} +2 -2
- package/dist/{deterministicFonts-C5JQLCTS.js → deterministicFonts-EOMDR6ZF.js} +3 -3
- package/dist/{dist-HUMFCJ6T.js → dist-2YYJYYPY.js} +3 -3
- package/dist/{dist-Z7Q3JS7K.js → dist-3MHXG6EJ.js} +4 -4
- package/dist/{doctor-WZB6WMBY.js → doctor-JOUGR5UK.js} +15 -15
- package/dist/{events-T4YFQC5G.js → events-63BKDWVO.js} +3 -3
- package/dist/{events-MUWJJCC7.js → events-FZFBJCIH.js} +2 -2
- package/dist/{feedback-AUTHQNN2.js → feedback-QLKWUDXR.js} +8 -8
- package/dist/{ffmpeg-TZB5WAYE.js → ffmpeg-MJFMBBSF.js} +2 -2
- package/dist/{figma-NBG6WBI7.js → figma-YJ7HGVQC.js} +3 -3
- package/dist/fontLocalizeCli.js +12 -12
- package/dist/{get-OXBJLKLV.js → get-54MUUXMR.js} +2 -2
- package/dist/{gpuPolicy-HBCCEQUS.js → gpuPolicy-5OVNR75D.js} +9 -9
- package/dist/{grade-compare-2LX4FDH7.js → grade-compare-7IDUF673.js} +32 -32
- package/dist/{gsapParserAcorn-VXZ3ZIF2.js → gsapParserAcorn-7NCK2LVT.js} +2 -2
- package/dist/{help-LJI46EDO.js → help-GQFYO5LU.js} +1 -1
- package/dist/{history-MFKAQEHU.js → history-UI3O7CSO.js} +77 -205
- package/dist/hyperframe-runtime.js +54 -54
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +54 -54
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/{info-D6Y5O2QE.js → info-VQV3APEX.js} +9 -9
- package/dist/{init-47NZPEBI.js → init-2UBFV5D7.js} +31 -31
- package/dist/{inspect-U5UXJK5D.js → inspect-36ACJ3CO.js} +31 -31
- package/dist/{installer-AW7VFVTQ.js → installer-GDUZDJG4.js} +7 -7
- package/dist/{keyframes-5G334NWB.js → keyframes-GPBU34BG.js} +227 -82
- package/dist/{lambda-GASGXN3A.js → lambda-CBJVLTHY.js} +7 -7
- package/dist/{layout-OXAQFLJS.js → layout-2IHFV6EI.js} +31 -31
- package/dist/{lint-F36QFSNF.js → lint-IR6IYCEO.js} +9 -9
- package/dist/{lintProject-SSEXWCH6.js → lintProject-XQWXJYSC.js} +3 -3
- package/dist/{list-TR6QCI53.js → list-UAGKWARH.js} +2 -2
- package/dist/{login-6LA2RWTC.js → login-2GYCNCZF.js} +4 -4
- package/dist/{manager-ES2UFT4X.js → manager-X44GKUEL.js} +3 -3
- package/dist/{manager-GWU5J6RJ.js → manager-ZLJD3EAY.js} +2 -2
- package/dist/{media-treatment-BOHYDWVY.js → media-treatment-Z553F7XI.js} +14 -14
- package/dist/{models-6GW5Q3IW.js → models-6AZTNNSO.js} +15 -15
- package/dist/{motionShot-O7AOMPUN.js → motionShot-ARRL7WXT.js} +29 -16
- package/dist/{normalize-audio-UO5B4O76.js → normalize-audio-CME4NUB6.js} +6 -6
- package/dist/{open-JV2EHVKM.js → open-HU2VXUFD.js} +4 -4
- package/dist/{parakeetRunner-23DZUF6G.js → parakeetRunner-X5MKFMCB.js} +16 -16
- package/dist/{pipeline-KTICSIK7.js → pipeline-MNFTEBJU.js} +11 -11
- package/dist/{play-CMUYPXBC.js → play-2BBJDDAZ.js} +24 -24
- package/dist/{preflight-JOD4OXGC.js → preflight-JYOX64YP.js} +4 -4
- package/dist/{present-ZDT5FM2H.js → present-OE2WL2NY.js} +20 -20
- package/dist/{preview-ASHLGKDD.js → preview-RYSCCAWJ.js} +21 -21
- package/dist/{producer-FFH2KUAZ.js → producer-SQWNRO66.js} +1 -1
- package/dist/{projectConfig-FHIAOPKW.js → projectConfig-B55Z7YKQ.js} +9 -9
- package/dist/{publication-WO5ZXURT.js → publication-MDZCOBJP.js} +4 -4
- package/dist/{publish-QWO2W7FB.js → publish-AILV36BO.js} +12 -12
- package/dist/{remove-background-BO5MQR25.js → remove-background-6F72LKHG.js} +12 -12
- package/dist/{render-XTJKGT3G.js → render-2MZKU3L5.js} +10 -10
- package/dist/{render-SDHFXL3Y.js → render-5EREH6YD.js} +95 -37
- package/dist/{render-HS3YOLSD.js → render-6GH5FSXU.js} +5 -5
- package/dist/{render-batch-J64AJHQY.js → render-batch-UMBUQWWS.js} +5 -5
- package/dist/renderSetupWorker.js +6 -6
- package/dist/{resolver-IHNWMDJA.js → resolver-KO6WWO5P.js} +6 -6
- package/dist/{sherpa-FXBBYMDR.js → sherpa-DADGYWNR.js} +15 -15
- package/dist/skills/hyperframes/references/frame-worker-core.md +11 -9
- package/dist/skills/hyperframes/references/subagent-dispatch.md +1 -1
- package/dist/skills/hyperframes-cli/SKILL.md +3 -0
- package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +5 -1
- package/dist/skills/media-use/audio/scripts/lib/tts.cleanup.test.mjs +175 -0
- package/dist/skills/media-use/audio/scripts/lib/tts.mjs +24 -19
- package/dist/skills/media-use/references/grading.md +1 -2
- package/dist/skills/media-use/references/meta.md +17 -17
- package/dist/skills/media-use/references/operations.md +6 -6
- package/dist/skills/media-use/references/setup-providers.md +3 -4
- package/dist/skills/media-use/scripts/lib/cutlist.mjs +9 -2
- package/dist/skills/media-use/scripts/lib/cutlist.test.mjs +12 -0
- package/dist/skills/media-use/scripts/lib/telemetry.mjs +4 -1
- package/dist/skills/media-use/scripts/lib/telemetry.test.mjs +20 -0
- package/dist/skills/media-use/scripts/transcript-cut.mjs +23 -4
- package/dist/skills/media-use/scripts/transcript-cut.test.mjs +224 -0
- package/dist/{skills-ALLSN7TB.js → skills-QLKSNU4Y.js} +5 -5
- package/dist/{skillsUpdateCheck-EIT5NWM6.js → skillsUpdateCheck-Z2QQGF2W.js} +3 -3
- package/dist/{snapshot-Y3I76OIZ.js → snapshot-D5BBFXOS.js} +342 -154
- package/dist/{src-7V6LBC56.js → src-AVQBAECC.js} +10 -8
- package/dist/{src-S5IZVJUX.js → src-V7263E47.js} +11 -11
- package/dist/{staticProjectServer-QLWWGHZE.js → staticProjectServer-HNWSVEWN.js} +20 -20
- package/dist/studio/assets/{hyperframes-player-kup62bDR.js → hyperframes-player-0BY7-PK7.js} +1 -1
- package/dist/studio/assets/{index-B8BBYY8L.js → index-COrWdzlj.js} +1 -1
- package/dist/studio/assets/{index-CS_m0TkX.js → index-p-VXwuJ2.js} +132 -132
- package/dist/studio/assets/{index-DQ5jGodF.js → index-rmD5k_ES.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-UBFLZ3DA.js → studio-api-UXKTDWLT.js} +30 -16
- package/dist/{studioServer-REOVCIFP.js → studioServer-JOVR24O3.js} +51 -51
- package/dist/{synthesize-22B7L5GX.js → synthesize-MBDVUSH3.js} +2 -1
- package/dist/{telemetry-C3GDIXHO.js → telemetry-UW7XAM5W.js} +3 -3
- package/dist/{timeline-H42EGLMT.js → timeline-JSGTZ3AN.js} +73 -20
- package/dist/{tokens-2K7ISTKV.js → tokens-ADDBGTQ7.js} +2 -2
- package/dist/{transcribe-NUPASAUP.js → transcribe-FEHOK626.js} +14 -14
- package/dist/{transcribe-DVM7UFZZ.js → transcribe-P6MJGSZJ.js} +20 -20
- package/dist/{tts-QSAQZVEZ.js → tts-POI553RG.js} +1 -1
- package/dist/{updateCheck-3RWFSEZD.js → updateCheck-IBWMLXQ4.js} +2 -2
- package/dist/{upgrade-YKKL36N7.js → upgrade-NHZ7AYPO.js} +2 -2
- package/dist/{urlDownloader-6JNJYLPN.js → urlDownloader-ULDRBWS5.js} +8 -8
- package/dist/{validate-Z7KQT7GO.js → validate-NVWNXNBV.js} +25 -25
- package/dist/{video-EXL2JDSL.js → video-74DRD2DN.js} +9 -9
- package/package.json +1 -1
- package/dist/chunk-CEND6BLF.js +0 -3795
- package/dist/chunk-WBLXWOYK.js +0 -15
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./chunk-5ETJX6WM.js";
|
|
17
17
|
import {
|
|
18
18
|
runEnvironmentChecks
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-WUUOFMHU.js";
|
|
20
20
|
import {
|
|
21
21
|
getAvailableMemoryMb,
|
|
22
22
|
getFreeDiskMb,
|
|
@@ -32,21 +32,21 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
getUpdateMeta,
|
|
34
34
|
withMeta
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-YYEYOFHW.js";
|
|
36
36
|
import {
|
|
37
37
|
CONFIG_PATH,
|
|
38
38
|
withFileLock
|
|
39
39
|
} from "./chunk-XUXGIA7H.js";
|
|
40
40
|
import {
|
|
41
41
|
VERSION
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-IZIRIDJH.js";
|
|
43
43
|
import {
|
|
44
44
|
OPTIONAL_PACKAGES,
|
|
45
45
|
installedOptionalPackageVersion
|
|
46
46
|
} from "./chunk-3DKN5WKL.js";
|
|
47
47
|
import {
|
|
48
48
|
resolveExtractCacheDir
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-EXH6L2XZ.js";
|
|
50
50
|
import {
|
|
51
51
|
normalizeErrorMessage
|
|
52
52
|
} from "./chunk-KNU5COPB.js";
|
|
@@ -232,7 +232,7 @@ function checkEnvironment() {
|
|
|
232
232
|
return { ok: true, detail: parts.join(" \xB7 ") };
|
|
233
233
|
}
|
|
234
234
|
async function checkWhisper() {
|
|
235
|
-
const { findWhisper, getInstallInstructions } = await import("./manager-
|
|
235
|
+
const { findWhisper, getInstallInstructions } = await import("./manager-X44GKUEL.js");
|
|
236
236
|
const result = findWhisper();
|
|
237
237
|
if (result) {
|
|
238
238
|
return { ok: true, detail: result.executablePath };
|
|
@@ -6,18 +6,18 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
stoppedByCancelSignal
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FNN5QINS.js";
|
|
10
10
|
import {
|
|
11
11
|
DEFAULT_MODEL,
|
|
12
12
|
ensureModel,
|
|
13
13
|
ensureWhisper,
|
|
14
14
|
hasFFmpeg
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-YG2Y55KF.js";
|
|
16
16
|
import {
|
|
17
17
|
findFFmpeg,
|
|
18
18
|
findFFprobe,
|
|
19
19
|
getFFmpegInstallHint
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-4MLYMDQ4.js";
|
|
21
21
|
import {
|
|
22
22
|
findWavChunk
|
|
23
23
|
} from "./chunk-UOFAE5RF.js";
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
stripEmbeddedRuntimeScripts,
|
|
40
40
|
styleElementsFor,
|
|
41
41
|
warnUnknownEnumValues
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-S3RCK56N.js";
|
|
43
43
|
import {
|
|
44
44
|
cssVariableName
|
|
45
45
|
} from "./chunk-VC76R6W2.js";
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
} from "./chunk-OFQWTKPW.js";
|
|
50
50
|
import {
|
|
51
51
|
lintHyperframeHtml
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-YOEGUBBY.js";
|
|
53
53
|
import {
|
|
54
54
|
checkSubCompositionUsability,
|
|
55
55
|
resolveSubCompositionContent
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
} from "./chunk-SDYDNHEE.js";
|
|
73
73
|
import {
|
|
74
74
|
parse
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-TYXH3EKP.js";
|
|
76
76
|
|
|
77
77
|
// ../core/dist/compiler/htmlCompiler.js
|
|
78
78
|
import { resolve } from "path";
|
|
@@ -127,6 +127,9 @@ async function clampProbedMedia(html, projectDir, probeMediaDuration) {
|
|
|
127
127
|
return html;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
+
// ../core/dist/compiler/htmlBundler.js
|
|
131
|
+
import { createHash } from "crypto";
|
|
132
|
+
|
|
130
133
|
// ../core/dist/sceneParts.js
|
|
131
134
|
var SCENE_PART_ATTR = "data-hf-scene";
|
|
132
135
|
var SCENE_PARTS_META = "hf-scene-parts";
|
|
@@ -2408,7 +2411,7 @@ function pushRun(runs, scene, chunk) {
|
|
|
2408
2411
|
else
|
|
2409
2412
|
runs.push({ scene, chunks: [chunk] });
|
|
2410
2413
|
}
|
|
2411
|
-
function coalesceHeadStylesAndBodyScripts(document) {
|
|
2414
|
+
function coalesceHeadStylesAndBodyScripts(document, provenance) {
|
|
2412
2415
|
const allHeadStyles = [...document.querySelectorAll("head style")];
|
|
2413
2416
|
const isScenePart = (el) => el.hasAttribute(SCENE_PART_ATTR);
|
|
2414
2417
|
for (const run of allHeadStyles.length > 1 ? headStyleRuns(allHeadStyles, isScenePart) : []) {
|
|
@@ -2426,7 +2429,7 @@ function coalesceHeadStylesAndBodyScripts(document) {
|
|
|
2426
2429
|
const mergedJs = joinJsChunks(members.map((el) => el.textContent || ""));
|
|
2427
2430
|
if (mergedJs && !parsesAsScript(mergedJs)) {
|
|
2428
2431
|
for (const el of members)
|
|
2429
|
-
el.textContent = inlineScriptSource(el.textContent || "");
|
|
2432
|
+
el.textContent = inlineScriptSource(el.textContent || "", provenance);
|
|
2430
2433
|
continue;
|
|
2431
2434
|
}
|
|
2432
2435
|
for (const el of members)
|
|
@@ -2434,7 +2437,7 @@ function coalesceHeadStylesAndBodyScripts(document) {
|
|
|
2434
2437
|
if (!mergedJs)
|
|
2435
2438
|
continue;
|
|
2436
2439
|
const inlineScript = document.createElement("script");
|
|
2437
|
-
inlineScript.textContent = inlineScriptSource(mergedJs);
|
|
2440
|
+
inlineScript.textContent = inlineScriptSource(mergedJs, provenance);
|
|
2438
2441
|
if (anchor)
|
|
2439
2442
|
anchor.before(inlineScript);
|
|
2440
2443
|
else
|
|
@@ -2463,18 +2466,29 @@ function parsesAsScript(source) {
|
|
|
2463
2466
|
return false;
|
|
2464
2467
|
}
|
|
2465
2468
|
}
|
|
2466
|
-
function stripJsCommentsParserSafe(source) {
|
|
2469
|
+
function stripJsCommentsParserSafe(source, provenance) {
|
|
2467
2470
|
if (!source)
|
|
2468
2471
|
return source;
|
|
2469
2472
|
try {
|
|
2470
|
-
const result = transformSync(source, {
|
|
2473
|
+
const result = transformSync(source, {
|
|
2474
|
+
loader: "js",
|
|
2475
|
+
minify: false,
|
|
2476
|
+
legalComments: "none",
|
|
2477
|
+
...provenance ? { sourcemap: "external", sourcefile: "hf-authored-bundle.js" } : {}
|
|
2478
|
+
});
|
|
2479
|
+
if (provenance) {
|
|
2480
|
+
const sourceURL = `hf-inspect-${createHash("sha256").update(source).digest("hex")}.js`;
|
|
2481
|
+
provenance({ input: source, output: result.code.trim(), sourceMap: result.map, sourceURL });
|
|
2482
|
+
return `${result.code.trim()}
|
|
2483
|
+
//# sourceURL=${sourceURL}`;
|
|
2484
|
+
}
|
|
2471
2485
|
return result.code.trim();
|
|
2472
2486
|
} catch {
|
|
2473
2487
|
return source;
|
|
2474
2488
|
}
|
|
2475
2489
|
}
|
|
2476
|
-
function inlineScriptSource(js) {
|
|
2477
|
-
return escapeInlineScriptSource(stripJsCommentsParserSafe(js));
|
|
2490
|
+
function inlineScriptSource(js, provenance) {
|
|
2491
|
+
return escapeInlineScriptSource(stripJsCommentsParserSafe(js, provenance));
|
|
2478
2492
|
}
|
|
2479
2493
|
function preserveLocalScriptIntegrity(doc, src, resolvePath) {
|
|
2480
2494
|
const path = resolvePath(src);
|
|
@@ -2804,7 +2818,7 @@ async function bundleProject(projectDir, options) {
|
|
|
2804
2818
|
const script = document.createElement("script");
|
|
2805
2819
|
if (scene)
|
|
2806
2820
|
script.setAttribute(SCENE_PART_ATTR, scene);
|
|
2807
|
-
script.textContent = skipsRunMerge ? inlineScriptSource(text) : text;
|
|
2821
|
+
script.textContent = skipsRunMerge ? inlineScriptSource(text, options?.scriptProvenance) : text;
|
|
2808
2822
|
document.body.appendChild(script);
|
|
2809
2823
|
}
|
|
2810
2824
|
}
|
|
@@ -2812,10 +2826,10 @@ async function bundleProject(projectDir, options) {
|
|
|
2812
2826
|
emitRootCompositionVariableStyles(document, compVariablesByComp);
|
|
2813
2827
|
enforceCompositionPixelSizing(document);
|
|
2814
2828
|
autoHealMissingCompositionIds(document);
|
|
2815
|
-
coalesceHeadStylesAndBodyScripts(document);
|
|
2829
|
+
coalesceHeadStylesAndBodyScripts(document, options?.scriptProvenance);
|
|
2816
2830
|
for (const el of document.querySelectorAll(`script[${INLINED_FILE_ATTR}]`)) {
|
|
2817
2831
|
const js = el.textContent ?? "";
|
|
2818
|
-
el.textContent = escapeInlineScriptSource(isJavaScriptType(el) ? stripJsCommentsParserSafe(js) : js);
|
|
2832
|
+
el.textContent = escapeInlineScriptSource(isJavaScriptType(el) ? stripJsCommentsParserSafe(js, options?.scriptProvenance) : js);
|
|
2819
2833
|
}
|
|
2820
2834
|
deferScriptsUntilFonts(document, (el) => el.hasAttribute(RUNTIME_BOOTSTRAP_ATTR));
|
|
2821
2835
|
injectTextRenderingRule(document);
|
|
@@ -3068,8 +3082,8 @@ function extractCompiledHtmlParityContract(html) {
|
|
|
3068
3082
|
}
|
|
3069
3083
|
|
|
3070
3084
|
// ../core/dist/compiler/scenePartsManifest.js
|
|
3071
|
-
import { createHash } from "crypto";
|
|
3072
|
-
var hash = (text) =>
|
|
3085
|
+
import { createHash as createHash2 } from "crypto";
|
|
3086
|
+
var hash = (text) => createHash2("sha1").update(text).digest("hex").slice(0, 16);
|
|
3073
3087
|
function addScenePartsManifest(html, ignore = []) {
|
|
3074
3088
|
const doc = parseHTMLContent(html);
|
|
3075
3089
|
const parts = [...doc.querySelectorAll(`[${SCENE_PART_ATTR}]`)];
|