hyperframes 0.8.139 → 0.8.141
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-VYJQ4S3P.js → add-KH2CF4FD.js} +20 -22
- package/dist/{animatedGifPrep-IBMW6FZB.js → animatedGifPrep-QO4BSKR7.js} +15 -8
- package/dist/{asset-FLSUS73X.js → asset-4RDZILVJ.js} +3 -3
- package/dist/{assetCataloger-TGD7TRCR.js → assetCataloger-WGR4LYYN.js} +6 -3
- package/dist/{auth-EZXIN4M4.js → auth-WYQCOYE5.js} +7 -7
- package/dist/{autoUpdate-ZPMY5T3X.js → autoUpdate-PC5TN3NL.js} +2 -2
- package/dist/{backgroundChecks-JIDTAUFE.js → backgroundChecks-7M3T44EP.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-FNZ6TJYY.js → batchRender-GOLLOE4V.js} +11 -8
- package/dist/beat-analyzer.global.js +5 -2
- package/dist/{beats-EAA4U3YN.js → beats-XJ7WP6QS.js} +24 -17
- package/dist/{benchmark-KKZQVK2Y.js → benchmark-HCGFBEZJ.js} +20 -23
- package/dist/{browser-ZIVVJLJT.js → browser-VQKO2FKG.js} +14 -28
- package/dist/{bundleWithLocalizedFonts-2XWC3PEM.js → bundleWithLocalizedFonts-FH7PHTTX.js} +5 -5
- package/dist/{capture-EFYPXI42.js → capture-TFZZSF6F.js} +22 -15
- package/dist/{capture-MKJHABUL.js → capture-XD3P3YQR.js} +2 -2
- package/dist/{catalog-EWX4BBI2.js → catalog-4S33QWJJ.js} +28 -30
- package/dist/{catch-up-FJFH7T4W.js → catch-up-RW7YXXNT.js} +11 -25
- package/dist/{check-YJNVDCBP.js → check-XVTRRN4Y.js} +72 -54
- package/dist/{checkBrowser-I6SPPEGD.js → checkBrowser-HZXJ2EDU.js} +81 -36
- package/dist/chunk-24OWOBQH.js +3656 -0
- package/dist/{chunk-OENM2JVZ.js → chunk-34TXESM7.js} +3 -3
- package/dist/{chunk-GWV2Y36Q.js → chunk-35RSNI77.js} +5 -106
- package/dist/{chunk-BC3OY2ED.js → chunk-3A5AAPMP.js} +1 -1
- package/dist/{chunk-U3HX7WE6.js → chunk-3NBKW2QJ.js} +1 -1
- package/dist/{chunk-A4X2YWNQ.js → chunk-4BB7V6AI.js} +38 -301
- package/dist/{chunk-EJ7OWYF2.js → chunk-6E6CM7WS.js} +19 -163
- package/dist/{chunk-CDMB3PRC.js → chunk-6IFXWJDX.js} +7 -7
- package/dist/{chunk-Z67RZ4XO.js → chunk-6Q6FR4KH.js} +279 -1968
- package/dist/{chunk-R4QIE6UY.js → chunk-7M4KAPAA.js} +92 -31
- package/dist/{chunk-25DHUDOK.js → chunk-7XTZVLE6.js} +12 -3
- package/dist/chunk-A4KQZXZI.js +116 -0
- package/dist/{chunk-DUQJF7FK.js → chunk-A7YQNIQT.js} +8 -8
- package/dist/{chunk-XOZ3J3LB.js → chunk-AVWEIOEN.js} +1 -1
- package/dist/{chunk-UQXOHEQ7.js → chunk-BM5PX3DJ.js} +4 -4
- package/dist/{chunk-SHB5VDMH.js → chunk-BRITLL56.js} +1 -1
- package/dist/{chunk-JX7Y57YY.js → chunk-E4BSCXMU.js} +1 -1
- package/dist/{chunk-QXOFUKBF.js → chunk-E6SDW5FV.js} +168 -165
- package/dist/{chunk-JH556Q42.js → chunk-EDYBFSPE.js} +2 -2
- package/dist/{chunk-R7LWDIKB.js → chunk-EKA4ZZBI.js} +1 -1
- package/dist/chunk-FXMKHHPO.js +123 -0
- package/dist/chunk-G75ENCEZ.js +283 -0
- package/dist/{chunk-PLNWWGE7.js → chunk-GQJZORQP.js} +1 -1
- package/dist/{chunk-U3GEXWI5.js → chunk-GS6FE3IW.js} +1 -1
- package/dist/{chunk-Y6W4DVPS.js → chunk-HKCNZITN.js} +1 -1
- package/dist/{chunk-HOIHGPWO.js → chunk-IKVBTDLO.js} +1 -1
- package/dist/{chunk-YOL4QRSL.js → chunk-INI3TM6I.js} +2 -2
- package/dist/{chunk-SIKMUO45.js → chunk-IO7ZIDRP.js} +12 -12
- package/dist/{chunk-W7SAWBQC.js → chunk-IV7EI5E2.js} +1 -1
- package/dist/{chunk-TCWL4BKK.js → chunk-IYFKBFTW.js} +1 -1
- package/dist/{chunk-JIIIBTN2.js → chunk-J5IPIQU2.js} +1 -1
- package/dist/chunk-JFKL3WAE.js +161 -0
- package/dist/{chunk-IBRZUVTH.js → chunk-K2GOFLTX.js} +2 -2
- package/dist/{chunk-X3TMMIDP.js → chunk-KFH6UD26.js} +8 -8
- package/dist/{chunk-O6K5DWXM.js → chunk-KOEWEFHK.js} +1 -1
- package/dist/{chunk-VTVS4IIP.js → chunk-L3JSAB4L.js} +2 -2
- package/dist/{chunk-3RT6D4P6.js → chunk-N77KD7ZZ.js} +1 -1
- package/dist/{chunk-FLRCVYNE.js → chunk-NORZWWLK.js} +2 -2
- package/dist/{chunk-4VZBKOQJ.js → chunk-O3SKIXQK.js} +1 -1
- package/dist/{chunk-PFI3VD77.js → chunk-OLDDJS3S.js} +10 -10
- package/dist/{chunk-UGI77E35.js → chunk-P6E4HFFU.js} +167 -61
- package/dist/{chunk-GIDHR5OL.js → chunk-Q65ZQFF2.js} +1 -1
- package/dist/chunk-QZ3AZTXI.js +1740 -0
- package/dist/{chunk-NTIOLSFE.js → chunk-R7UDXKI3.js} +3 -3
- package/dist/{chunk-7SI7GCX6.js → chunk-RCFCZT5O.js} +6 -6
- package/dist/{chunk-DW32KBHN.js → chunk-RPYPW5NN.js} +13 -13
- package/dist/chunk-SYKKFAUW.js +3711 -0
- package/dist/chunk-T76PLPD6.js +57 -0
- package/dist/{chunk-JTAYFSLO.js → chunk-TC2FBZJZ.js} +1 -1
- package/dist/{chunk-Q73ISOVQ.js → chunk-U7E736AJ.js} +1 -1
- package/dist/chunk-USDEMXXL.js +110 -0
- package/dist/{chunk-UMWROSIP.js → chunk-W6HTOVHU.js} +2 -2
- package/dist/{chunk-STA43FMY.js → chunk-WY5OODN5.js} +71 -3855
- package/dist/{chunk-EZ2P7LAP.js → chunk-XDSOIJC3.js} +8 -8
- package/dist/{chunk-ZTZ7NCJT.js → chunk-XTFJOR3K.js} +1 -1
- package/dist/{chunk-CDJ7FPPJ.js → chunk-XWVGSEUT.js} +1 -1
- package/dist/chunk-YA62XGXS.js +45 -0
- package/dist/{chunk-EH4VUY27.js → chunk-YURXPGAM.js} +2 -2
- package/dist/{clean-P4KTCOUA.js → clean-L2E4VD57.js} +29 -20
- package/dist/cli.js +55 -55
- package/dist/{cloud-PDY7S4HU.js → cloud-IDUQRYLO.js} +7 -7
- package/dist/{cloudrun-54MA2W5H.js → cloudrun-R3JXWXGG.js} +11 -8
- package/dist/commands/layout-audit.browser.js +37 -8
- package/dist/commands/motion-signature.browser.js +51 -2
- package/dist/{compare-LDWVSPC5.js → compare-VYBWSP3Y.js} +40 -31
- package/dist/{compiler-CWSZ4W7J.js → compiler-ACHWOU5N.js} +7 -3
- package/dist/{component-FIEGC22U.js → component-PYYV2V3F.js} +4 -4
- package/dist/{compositions-JR7PX356.js → compositions-B5GQSXH7.js} +23 -16
- package/dist/{delete-FXA2IHOS.js → delete-EAX2U3WI.js} +8 -8
- package/dist/{deterministicFonts-GTITFRSJ.js → deterministicFonts-F6WIVL2W.js} +1 -1
- package/dist/{dist-OJTEVNJR.js → dist-NZSQCYOF.js} +3 -1
- package/dist/{dist-4JZWRWS6.js → dist-ROUDWGLO.js} +27 -15
- package/dist/{doctor-OTDHPM6K.js → doctor-PJX7MLFG.js} +20 -13
- package/dist/{events-UAFTI24U.js → events-SBC54MHO.js} +6 -22
- package/dist/{events-6T7M2VCO.js → events-YFFXKAQQ.js} +10 -23
- package/dist/{feedback-ZGZODHB6.js → feedback-UETLWREV.js} +67 -45
- package/dist/{figma-D26EJ7ZB.js → figma-QDSJPIRW.js} +6 -6
- package/dist/fontLocalizeCli.js +18 -11
- package/dist/{get-IAREU7IK.js → get-B5TS6C7H.js} +8 -8
- package/dist/{gpuPolicy-NS7WZRDJ.js → gpuPolicy-LYOVBAJP.js} +15 -8
- package/dist/{grade-compare-ZXHFHCD2.js → grade-compare-LBIHMAUN.js} +40 -31
- package/dist/{help-RVNYHW3N.js → help-XBP6A6LT.js} +4 -4
- package/dist/{history-THP4VNMF.js → history-2S42ZXKL.js} +12 -30
- package/dist/hyperframe-runtime.js +59 -59
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +59 -59
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/{info-EOFRHN5A.js → info-I2VDAWT7.js} +17 -20
- package/dist/{init-YLIJE4CG.js → init-BGHSDODI.js} +48 -41
- package/dist/{inspect-3D56ONJD.js → inspect-MZK5B5RP.js} +39 -30
- package/dist/{installer-GRR2GDZK.js → installer-LL4QAKFW.js} +8 -5
- package/dist/{keyframes-NXNCTQPK.js → keyframes-2EBF7OSS.js} +14 -25
- package/dist/{lambda-VGRZD7TR.js → lambda-XKFPAOFE.js} +16 -13
- package/dist/{layout-Z5DOS6DU.js → layout-TP5ERKEF.js} +39 -30
- package/dist/{lint-YD6NJGR2.js → lint-FQ6CEI7E.js} +17 -23
- package/dist/{lintProject-ANMPLBIT.js → lintProject-LM3XZRPZ.js} +3 -1
- package/dist/{list-XGDKILYN.js → list-FRNUJXZ3.js} +8 -8
- package/dist/{login-GD5SA4RD.js → login-C25QU3BQ.js} +9 -9
- package/dist/{logout-Q654A3SI.js → logout-GJXZQKOA.js} +5 -5
- package/dist/{media-treatment-TY4X4GQQ.js → media-treatment-DCANGWSV.js} +21 -20
- package/dist/{models-MXRDH4WJ.js → models-GOD6ARB3.js} +19 -12
- package/dist/{motionShot-6LKR3C2E.js → motionShot-FSKETANX.js} +22 -15
- package/dist/{normalize-O76AC4HE.js → normalize-IGLHCWTF.js} +0 -4
- package/dist/{normalize-audio-5ADDZKPJ.js → normalize-audio-C2IM7OID.js} +13 -26
- package/dist/{open-JXAMO325.js → open-VVISXIII.js} +11 -25
- package/dist/{pipeline-Q5MOPIIX.js → pipeline-7YHZPYIS.js} +15 -8
- package/dist/{play-3SPH5GWZ.js → play-DSELK7G3.js} +38 -32
- package/dist/{preflight-2PWAPKWC.js → preflight-Y5DN5D37.js} +3 -18
- package/dist/{present-ZTJQDKXZ.js → present-N72YFDKP.js} +32 -26
- package/dist/{preview-4A3XZR6J.js → preview-XTYN4NJ2.js} +33 -26
- package/dist/{producer-5ZKKKQPB.js → producer-NDCU3MHK.js} +1 -1
- package/dist/{projectConfig-WA4CS4SN.js → projectConfig-MH4QU4AC.js} +10 -7
- package/dist/{publication-CLG2FRRI.js → publication-KUSHI5MG.js} +6 -3
- package/dist/{publish-YTT2WMXO.js → publish-3XEEFWMF.js} +27 -20
- package/dist/{refresh-K24ETHMA.js → refresh-MFITBIKV.js} +5 -5
- package/dist/{remove-background-W35INR3B.js → remove-background-2QKJ7XOD.js} +22 -15
- package/dist/{render-WUBFQMAH.js → render-2DVYTVLQ.js} +52 -32
- package/dist/{render-7A4P5WMU.js → render-75E342ZU.js} +10 -7
- package/dist/{render-KICXUPNR.js → render-S73DW4KK.js} +23 -26
- package/dist/{render-batch-N7EFGE6S.js → render-batch-YURBS54Q.js} +11 -8
- package/dist/{renderCancellation-LYQPPFAO.js → renderCancellation-373ASJTO.js} +15 -8
- package/dist/renderSetupWorker.js +4 -2
- package/dist/{resolver-YTT2NENF.js → resolver-FE3GBZ4T.js} +8 -5
- package/dist/{sherpa-353MW4UV.js → sherpa-B2D3AGP6.js} +16 -9
- package/dist/skills/hyperframes/references/capability-menu.md +1 -1
- package/dist/skills/hyperframes-cli/SKILL.md +5 -0
- package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +1 -1
- package/dist/skills/hyperframes-cli/references/preview-render.md +1 -1
- package/dist/skills/media-use/SKILL.md +9 -5
- package/dist/skills/media-use/audio/scripts/lib/heygen.mjs +47 -4
- package/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +125 -18
- package/dist/skills/media-use/audio/scripts/lib/host-audio.mjs +28 -0
- package/dist/skills/media-use/audio/scripts/lib/host-audio.test.mjs +106 -0
- package/dist/skills/media-use/references/setup-providers.md +16 -2
- package/dist/skills/media-use/scripts/lib/heygen-cli.mjs +21 -1
- package/dist/skills/media-use/scripts/lib/heygen-cli.test.mjs +14 -0
- package/dist/skills/media-use/scripts/resolve.mjs +11 -6
- package/dist/{skills-2XJIOEBT.js → skills-ICJ22CZZ.js} +15 -30
- package/dist/{skillsUpdateCheck-LMCCWGNO.js → skillsUpdateCheck-GXZN56I5.js} +3 -3
- package/dist/{snapshot-WBRSTLJ2.js → snapshot-XHKOAWF4.js} +41 -32
- package/dist/{src-ZS3BLTZ5.js → src-74PFDTDX.js} +17 -10
- package/dist/{src-YWFJILQF.js → src-I7UC3JTL.js} +19 -11
- package/dist/{staticProjectServer-4VKVHPNG.js → staticProjectServer-2DGKD6TF.js} +24 -16
- package/dist/{status-73MBN37B.js → status-JA6SKQVH.js} +7 -24
- package/dist/studio/assets/hyperframes-player-5Vx2AiUz.js +473 -0
- package/dist/studio/assets/{index-DsEkE5_G.js → index-BAnh7cSQ.js} +1 -1
- package/dist/studio/assets/{index-Br1Whc0f.js → index-C0thd4eM.js} +204 -204
- package/dist/studio/assets/{index-BmIPrb8I.js → index-P8fgj_Xa.js} +1 -1
- package/dist/studio/{chunk-E422JDF5.js → chunk-H2DUOXTF.js} +2 -1
- package/dist/studio/index.d.ts +19 -3
- package/dist/studio/index.html +1 -1
- package/dist/studio/index.js +6518 -5813
- package/dist/studio/index.js.map +1 -1
- package/dist/studio/player.js +1 -1
- package/dist/{studio-api-5V4TVSQV.js → studio-api-PROBO7JG.js} +40 -28
- package/dist/{studioServer-M5XY3HYC.js → studioServer-ID6UV2NE.js} +100 -69
- package/dist/{system-RCRNX5VF.js → system-OQLOGGPJ.js} +2 -19
- package/dist/{telemetry-LOBRQGUD.js → telemetry-65LFHIWH.js} +8 -23
- package/dist/{timeline-3JCP6PXU.js → timeline-6UV3JJXD.js} +32 -22
- package/dist/{tokens-MLMIJBVF.js → tokens-HIL4TZXI.js} +3 -3
- package/dist/{transcribe-KNFXDEAX.js → transcribe-TIO6W3EQ.js} +16 -9
- package/dist/{transcribe-POH25ZPX.js → transcribe-V7F6QDSN.js} +20 -44
- package/dist/{updateCheck-5ITBSBST.js → updateCheck-GZELANMA.js} +2 -2
- package/dist/{upgrade-K6OK4FKT.js → upgrade-BX3KDDZJ.js} +5 -5
- package/dist/{urlDownloader-TJJQKADT.js → urlDownloader-R76OHFIE.js} +14 -7
- package/dist/{validate-PPPOBJHB.js → validate-7UX4I443.js} +26 -19
- package/dist/{video-OB22HWXZ.js → video-RVGYEFQU.js} +18 -11
- package/package.json +1 -1
- package/dist/chunk-HYYSJI5D.js +0 -3742
- package/dist/studio/assets/hyperframes-player-CckOoCJ8.js +0 -473
- package/dist/{chunk-I465DBM6.js → chunk-246MOR5U.js} +3 -3
- package/dist/{deploy-MX76RZ36.js → deploy-5G4Z6LPA.js} +1 -1
- package/dist/{destroy-H2TZBYHH.js → destroy-GFQLTIY3.js} +1 -1
- package/dist/{docs-QAPJEGLS.js → docs-MPOM3PHH.js} +3 -3
- package/dist/{policies-FSDZVS2E.js → policies-4FEXMXPK.js} +3 -3
- package/dist/{progress-FBIEEB7Y.js → progress-5AM2MZ7V.js} +3 -3
- package/dist/{sites-TNVKZS73.js → sites-HZMADOA3.js} +1 -1
- package/dist/studio/{chunk-E422JDF5.js.map → chunk-H2DUOXTF.js.map} +0 -0
- package/dist/{telemetry-2YC4SGQU.js → telemetry-W5AKPI4R.js} +3 -3
- package/dist/{tts-FU35O6YB.js → tts-TOHSPWEG.js} +4 -4
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { createRequire as __hf_createRequire } from "node:module";
|
|
2
|
+
import { fileURLToPath as __hf_fileURLToPath } from "node:url";
|
|
3
|
+
import { dirname as __hf_dirname } from "node:path";
|
|
4
|
+
var require = __hf_createRequire(import.meta.url);
|
|
5
|
+
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = __hf_dirname(__filename);
|
|
7
|
+
|
|
8
|
+
// ../parsers/dist/assetResolution.js
|
|
9
|
+
import { closeSync, constants, existsSync, fstatSync, openSync, readFileSync } from "fs";
|
|
10
|
+
import { isAbsolute, join, posix, relative, resolve, sep } from "path";
|
|
11
|
+
function decodeUrlPathVariants(path) {
|
|
12
|
+
const variants = [path];
|
|
13
|
+
try {
|
|
14
|
+
const decoded = decodeURIComponent(path);
|
|
15
|
+
if (decoded !== path) variants.unshift(decoded);
|
|
16
|
+
} catch {
|
|
17
|
+
}
|
|
18
|
+
return variants;
|
|
19
|
+
}
|
|
20
|
+
function isRemoteOrInlineUrl(url) {
|
|
21
|
+
return /^(https?:|data:|blob:|\/\/|#)/i.test(url);
|
|
22
|
+
}
|
|
23
|
+
function hasUnresolvedTemplatingToken(url) {
|
|
24
|
+
return /<<[^<>]+>>|\{\{[^{}]+\}\}|\$\{[^{}]+\}/.test(url);
|
|
25
|
+
}
|
|
26
|
+
function isUnresolvedAssetPlaceholder(rawSrc) {
|
|
27
|
+
return /^__[A-Z_]+__$/.test(rawSrc.trim()) || hasUnresolvedTemplatingToken(rawSrc);
|
|
28
|
+
}
|
|
29
|
+
var COMPOSITION_SRC_ATTR = /\bdata-composition-src\s*=\s*["']([^"']+)["']/i;
|
|
30
|
+
function collectSubCompositionSrcs(html) {
|
|
31
|
+
const scannable = maskNonScannableRanges(html);
|
|
32
|
+
const srcs = [];
|
|
33
|
+
const seen = /* @__PURE__ */ new Set();
|
|
34
|
+
let cursor = 0;
|
|
35
|
+
while (cursor < scannable.length) {
|
|
36
|
+
const open = scannable.indexOf("<", cursor);
|
|
37
|
+
if (open === -1) break;
|
|
38
|
+
const close = scannable.indexOf(">", open + 1);
|
|
39
|
+
if (close === -1) break;
|
|
40
|
+
cursor = close + 1;
|
|
41
|
+
const match = COMPOSITION_SRC_ATTR.exec(scannable.slice(open, cursor));
|
|
42
|
+
if (!match) continue;
|
|
43
|
+
const src = (match[1] ?? "").trim();
|
|
44
|
+
if (!src || seen.has(src)) continue;
|
|
45
|
+
if (isUnresolvedAssetPlaceholder(src)) continue;
|
|
46
|
+
if (isRemoteOrInlineUrl(src)) continue;
|
|
47
|
+
seen.add(src);
|
|
48
|
+
srcs.push(src);
|
|
49
|
+
}
|
|
50
|
+
return srcs;
|
|
51
|
+
}
|
|
52
|
+
function cleanAssetUrl(url) {
|
|
53
|
+
return url.trim().split(/[?#]/, 1)[0] ?? "";
|
|
54
|
+
}
|
|
55
|
+
function isWithinProjectRoot(projectDir, candidate, pathModule = { resolve, relative, isAbsolute }) {
|
|
56
|
+
const projectRoot = pathModule.resolve(projectDir);
|
|
57
|
+
const relativePath = pathModule.relative(projectRoot, candidate);
|
|
58
|
+
return relativePath === "" || !relativePath.startsWith("..") && !pathModule.isAbsolute(relativePath);
|
|
59
|
+
}
|
|
60
|
+
function addCandidate(candidates, candidate) {
|
|
61
|
+
if (!candidates.includes(candidate)) candidates.push(candidate);
|
|
62
|
+
}
|
|
63
|
+
function resolveLocalAssetCandidates(projectDir, url) {
|
|
64
|
+
const cleanUrl = cleanAssetUrl(url);
|
|
65
|
+
const projectRoot = resolve(projectDir);
|
|
66
|
+
const candidates = [];
|
|
67
|
+
for (const variant of decodeUrlPathVariants(cleanUrl)) {
|
|
68
|
+
const projectRelative = variant.startsWith("/") ? variant.slice(1) : variant;
|
|
69
|
+
const resolved = resolve(projectRoot, projectRelative);
|
|
70
|
+
if (isWithinProjectRoot(projectRoot, resolved)) {
|
|
71
|
+
addCandidate(candidates, resolved);
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
const normalized = posix.normalize(projectRelative.replace(/\\/g, "/"));
|
|
75
|
+
const clamped = normalized.replace(/^(\.\.\/)+/, "");
|
|
76
|
+
if (clamped && !clamped.startsWith("..")) {
|
|
77
|
+
addCandidate(candidates, resolve(projectRoot, clamped));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return candidates;
|
|
81
|
+
}
|
|
82
|
+
function resolveExistingLocalAsset(projectDir, url) {
|
|
83
|
+
const projectRoot = resolve(projectDir);
|
|
84
|
+
const resolved = resolveLocalAssetCandidates(projectRoot, url).find(existsSync);
|
|
85
|
+
if (!resolved) return null;
|
|
86
|
+
return { resolved, rootRelativePath: relative(projectRoot, resolved) };
|
|
87
|
+
}
|
|
88
|
+
function reanchoredCandidates(variant, baseDir, compiledDir) {
|
|
89
|
+
const baseAbs = resolve(baseDir);
|
|
90
|
+
const joinedAbs = resolve(join(baseDir, variant));
|
|
91
|
+
if (joinedAbs === baseAbs || joinedAbs.startsWith(baseAbs + sep)) return [];
|
|
92
|
+
const stripped = posix.normalize(variant.replace(/\\/g, "/")).replace(/^(\.\.\/)+/, "");
|
|
93
|
+
if (!stripped || stripped === variant || stripped.startsWith("..")) return [];
|
|
94
|
+
return compiledDir ? [join(compiledDir, stripped), join(baseDir, stripped)] : [join(baseDir, stripped)];
|
|
95
|
+
}
|
|
96
|
+
function resolveProjectRelativeSrc(src, baseDir, compiledDir) {
|
|
97
|
+
const cleanSrc = cleanAssetUrl(src);
|
|
98
|
+
if (isAbsolute(cleanSrc) && existsSync(cleanSrc)) return cleanSrc;
|
|
99
|
+
const candidates = /* @__PURE__ */ new Set();
|
|
100
|
+
for (const variant of decodeUrlPathVariants(cleanSrc)) {
|
|
101
|
+
for (const candidate of reanchoredCandidates(variant, baseDir, compiledDir)) {
|
|
102
|
+
candidates.add(candidate);
|
|
103
|
+
}
|
|
104
|
+
if (compiledDir) candidates.add(join(compiledDir, variant));
|
|
105
|
+
candidates.add(join(baseDir, variant));
|
|
106
|
+
}
|
|
107
|
+
return [...candidates].find(existsSync) ?? join(baseDir, cleanSrc);
|
|
108
|
+
}
|
|
109
|
+
function maskRange(src, pattern) {
|
|
110
|
+
return src.replace(pattern, (m) => " ".repeat(m.length));
|
|
111
|
+
}
|
|
112
|
+
function maskHtmlComments(src) {
|
|
113
|
+
const chunks = [];
|
|
114
|
+
let cursor = 0;
|
|
115
|
+
while (true) {
|
|
116
|
+
const start = src.indexOf("<!--", cursor);
|
|
117
|
+
if (start === -1) break;
|
|
118
|
+
const end = src.indexOf("-->", start + 4);
|
|
119
|
+
if (end === -1) break;
|
|
120
|
+
const afterComment = end + 3;
|
|
121
|
+
chunks.push(src.slice(cursor, start), " ".repeat(afterComment - start));
|
|
122
|
+
cursor = afterComment;
|
|
123
|
+
}
|
|
124
|
+
return chunks.length === 0 ? src : chunks.join("") + src.slice(cursor);
|
|
125
|
+
}
|
|
126
|
+
function maskNonScannableRanges(html) {
|
|
127
|
+
let out = maskHtmlComments(html);
|
|
128
|
+
out = maskRange(out, /<style\b[^>]*>[\s\S]*?<\/style\b[^>]*>/gi);
|
|
129
|
+
out = maskRange(out, /<script\b[^>]*>[\s\S]*?<\/script\b[^>]*>/gi);
|
|
130
|
+
return out;
|
|
131
|
+
}
|
|
132
|
+
function readProjectFile(path) {
|
|
133
|
+
let fd;
|
|
134
|
+
try {
|
|
135
|
+
fd = openSync(path, constants.O_RDONLY | (constants.O_NONBLOCK ?? 0), 384);
|
|
136
|
+
} catch (error) {
|
|
137
|
+
const code = error.code ?? "";
|
|
138
|
+
if (["EISDIR", "ENXIO"].includes(code)) return { kind: "folder" };
|
|
139
|
+
if (["ENOENT", "ENOTDIR", "ELOOP", "ENAMETOOLONG"].includes(code)) return { kind: "missing" };
|
|
140
|
+
throw error;
|
|
141
|
+
}
|
|
142
|
+
try {
|
|
143
|
+
if (!fstatSync(fd).isFile()) return { kind: "folder" };
|
|
144
|
+
return { kind: "file", text: readFileSync(fd, "utf-8") };
|
|
145
|
+
} finally {
|
|
146
|
+
closeSync(fd);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export {
|
|
151
|
+
isRemoteOrInlineUrl,
|
|
152
|
+
isUnresolvedAssetPlaceholder,
|
|
153
|
+
collectSubCompositionSrcs,
|
|
154
|
+
cleanAssetUrl,
|
|
155
|
+
isWithinProjectRoot,
|
|
156
|
+
resolveLocalAssetCandidates,
|
|
157
|
+
resolveExistingLocalAsset,
|
|
158
|
+
resolveProjectRelativeSrc,
|
|
159
|
+
maskNonScannableRanges,
|
|
160
|
+
readProjectFile
|
|
161
|
+
};
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
typeDirPath,
|
|
21
21
|
updateRecord,
|
|
22
22
|
withFigmaErrors
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-E4BSCXMU.js";
|
|
24
24
|
import {
|
|
25
25
|
defineCommand
|
|
26
26
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -221,7 +221,7 @@ var asset_default = defineCommand({
|
|
|
221
221
|
rendered > 0 ? `(${results.length} nodes, ${rendered} rendered in 1 figma request)` : `(${results.length} nodes, all reused from cache \u2014 no figma request)`
|
|
222
222
|
);
|
|
223
223
|
}
|
|
224
|
-
const { trackFigmaImport } = await import("./telemetry-
|
|
224
|
+
const { trackFigmaImport } = await import("./telemetry-65LFHIWH.js");
|
|
225
225
|
trackFigmaImport({
|
|
226
226
|
phase: "asset",
|
|
227
227
|
reused: results.every((r) => r.reused),
|
|
@@ -20,36 +20,36 @@ import {
|
|
|
20
20
|
} from "./chunk-3DKN5WKL.js";
|
|
21
21
|
import {
|
|
22
22
|
runEnvironmentChecks
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import {
|
|
25
|
-
c
|
|
26
|
-
} from "./chunk-ZTZA4UWZ.js";
|
|
23
|
+
} from "./chunk-KOEWEFHK.js";
|
|
27
24
|
import {
|
|
28
25
|
getAvailableMemoryMb,
|
|
29
26
|
getFreeDiskMb,
|
|
30
27
|
getShmSizeMb,
|
|
31
28
|
getSystemMeta
|
|
32
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-GQJZORQP.js";
|
|
33
30
|
import {
|
|
34
31
|
defineCommand
|
|
35
32
|
} from "./chunk-S3S4TGEH.js";
|
|
36
33
|
import {
|
|
37
34
|
resolveExtractCacheDir
|
|
38
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-E6SDW5FV.js";
|
|
39
36
|
import {
|
|
40
37
|
getUpdateMeta,
|
|
41
38
|
withMeta
|
|
42
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-IYFKBFTW.js";
|
|
43
40
|
import {
|
|
44
41
|
CONFIG_PATH,
|
|
45
42
|
withFileLock
|
|
46
43
|
} from "./chunk-XUXGIA7H.js";
|
|
47
44
|
import {
|
|
48
45
|
VERSION
|
|
49
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-W6HTOVHU.js";
|
|
50
47
|
import {
|
|
51
48
|
normalizeErrorMessage
|
|
52
49
|
} from "./chunk-KNU5COPB.js";
|
|
50
|
+
import {
|
|
51
|
+
c
|
|
52
|
+
} from "./chunk-ZTZA4UWZ.js";
|
|
53
53
|
|
|
54
54
|
// src/commands/doctor.ts
|
|
55
55
|
import { execFileSync, execSync } from "child_process";
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
DEFAULT_REGISTRY_URL,
|
|
9
9
|
fetchItemFile,
|
|
10
10
|
validRegistryItem
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-Q65ZQFF2.js";
|
|
12
12
|
import {
|
|
13
13
|
publishRegistryFile,
|
|
14
14
|
registryTargetPath
|
|
15
15
|
} from "./chunk-GMECXFAN.js";
|
|
16
16
|
import {
|
|
17
17
|
validateVariables
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-6E6CM7WS.js";
|
|
19
19
|
import {
|
|
20
20
|
realProjectRoot
|
|
21
21
|
} from "./chunk-OFQWTKPW.js";
|
|
@@ -6,10 +6,10 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
getMimeType
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6Q6FR4KH.js";
|
|
10
10
|
import {
|
|
11
11
|
injectTagsAtHeadStart
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-SYKKFAUW.js";
|
|
13
13
|
|
|
14
14
|
// src/utils/compositionServer.ts
|
|
15
15
|
import { createHash } from "crypto";
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
resolveCaptureBrowserGpuMode
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-J5IPIQU2.js";
|
|
10
10
|
import {
|
|
11
11
|
requestCliExit
|
|
12
12
|
} from "./chunk-PBN6GBJE.js";
|
|
@@ -7,32 +7,29 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
RegistryCompatibilityError,
|
|
9
9
|
gateRegistryItemsCompatibility
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XWVGSEUT.js";
|
|
11
11
|
import {
|
|
12
12
|
DEFAULT_PROJECT_CONFIG,
|
|
13
13
|
createProjectConfig,
|
|
14
14
|
loadProjectConfig,
|
|
15
15
|
projectConfigPath,
|
|
16
16
|
recordProjectRegistryItems
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-AVWEIOEN.js";
|
|
18
18
|
import {
|
|
19
19
|
resolveItemWithDependencies,
|
|
20
20
|
resolveItemsByTag
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-IKVBTDLO.js";
|
|
22
22
|
import {
|
|
23
23
|
InvalidVariableValuesError,
|
|
24
24
|
prepareItem,
|
|
25
25
|
publishItem
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-L3JSAB4L.js";
|
|
27
27
|
import {
|
|
28
28
|
DEFAULT_REGISTRY_URL
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-Q65ZQFF2.js";
|
|
30
30
|
import {
|
|
31
31
|
trackRegistryItemAdded
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import {
|
|
34
|
-
c
|
|
35
|
-
} from "./chunk-ZTZA4UWZ.js";
|
|
32
|
+
} from "./chunk-7XTZVLE6.js";
|
|
36
33
|
import {
|
|
37
34
|
defineCommand
|
|
38
35
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -41,7 +38,7 @@ import {
|
|
|
41
38
|
} from "./chunk-PBN6GBJE.js";
|
|
42
39
|
import {
|
|
43
40
|
ITEM_TYPE_DIRS
|
|
44
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-6E6CM7WS.js";
|
|
45
42
|
import {
|
|
46
43
|
isProjectRootMissing,
|
|
47
44
|
realpath
|
|
@@ -49,6 +46,9 @@ import {
|
|
|
49
46
|
import {
|
|
50
47
|
parseHTML
|
|
51
48
|
} from "./chunk-GK4AIFIH.js";
|
|
49
|
+
import {
|
|
50
|
+
c
|
|
51
|
+
} from "./chunk-ZTZA4UWZ.js";
|
|
52
52
|
|
|
53
53
|
// src/commands/add.ts
|
|
54
54
|
import { existsSync, readFileSync } from "fs";
|