hyperframes 0.8.141 → 0.8.143
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-KH2CF4FD.js → add-Q5EYDUAY.js} +18 -17
- package/dist/{animatedGifPrep-QO4BSKR7.js → animatedGifPrep-H2DUQEZ3.js} +15 -15
- package/dist/{asset-4RDZILVJ.js → asset-C7JBYYX4.js} +4 -4
- package/dist/{assetCataloger-WGR4LYYN.js → assetCataloger-FRO4G6OU.js} +8 -7
- package/dist/{auth-WYQCOYE5.js → auth-FRWLCO36.js} +5 -4
- package/dist/{autoUpdate-PC5TN3NL.js → autoUpdate-E4OZXQK6.js} +2 -2
- package/dist/{backgroundChecks-7M3T44EP.js → backgroundChecks-FSUVHN5L.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-GOLLOE4V.js → batchRender-4U73BYTU.js} +11 -10
- package/dist/{beats-XJ7WP6QS.js → beats-U6KJWF35.js} +32 -28
- package/dist/{benchmark-HCGFBEZJ.js → benchmark-5ONT7V7B.js} +15 -14
- package/dist/{browser-VQKO2FKG.js → browser-R4DU46IE.js} +4 -4
- package/dist/{bundleWithLocalizedFonts-FH7PHTTX.js → bundleWithLocalizedFonts-VH55VOAL.js} +2 -2
- package/dist/{capture-TFZZSF6F.js → capture-26G2DPSI.js} +83 -41
- package/dist/{capture-XD3P3YQR.js → capture-OGQAEYKO.js} +24 -8
- package/dist/{catalog-4S33QWJJ.js → catalog-RKORTIUE.js} +19 -18
- package/dist/{catch-up-RW7YXXNT.js → catch-up-4OBERRQO.js} +5 -5
- package/dist/{check-XVTRRN4Y.js → check-P2XDN57S.js} +89 -85
- package/dist/{checkBrowser-HZXJ2EDU.js → checkBrowser-NTGJGAEA.js} +42 -42
- package/dist/{chunk-AVWEIOEN.js → chunk-2LBBHMKT.js} +1 -1
- package/dist/{chunk-E6SDW5FV.js → chunk-33RZPZ4K.js} +192 -45
- package/dist/{chunk-6IFXWJDX.js → chunk-3NE7ZYU2.js} +2 -2
- package/dist/{chunk-TQFG7HTI.js → chunk-3RM2ETQT.js} +0 -168
- package/dist/{chunk-PFCFR3KZ.js → chunk-442JNXRM.js} +1 -1
- package/dist/{chunk-6E6CM7WS.js → chunk-4M4EC7JX.js} +19 -12
- package/dist/{chunk-HKCNZITN.js → chunk-4OA4LDTU.js} +2 -2
- package/dist/{chunk-XTFJOR3K.js → chunk-4SFGME7K.js} +1 -1
- package/dist/{chunk-34TXESM7.js → chunk-5FISWJ37.js} +12 -4
- package/dist/{chunk-JYYOAKHS.js → chunk-6IIGT7BX.js} +1 -1
- package/dist/chunk-6TPZSTCL.js +3681 -0
- package/dist/{chunk-P6E4HFFU.js → chunk-6XMFEICO.js} +263 -75
- package/dist/{chunk-6Q6FR4KH.js → chunk-7UYBQ6NF.js} +296 -89
- package/dist/{chunk-BRITLL56.js → chunk-B4P5VDFQ.js} +1 -1
- package/dist/{chunk-U7E736AJ.js → chunk-BFDJ63J5.js} +32 -14
- package/dist/{chunk-WCJGTLPF.js → chunk-BHVFTYSI.js} +6 -3
- package/dist/{chunk-IO7ZIDRP.js → chunk-BT27OYYX.js} +53 -12
- package/dist/{chunk-KFH6UD26.js → chunk-BYK73CR7.js} +4 -4
- package/dist/{chunk-L3JSAB4L.js → chunk-CLOH4LIB.js} +3 -3
- package/dist/{chunk-R7UDXKI3.js → chunk-DF2BHILQ.js} +3 -3
- package/dist/{chunk-246MOR5U.js → chunk-DKSDVDXG.js} +175 -162
- package/dist/{chunk-35RSNI77.js → chunk-F26LCYRY.js} +42 -34
- package/dist/{chunk-5Z63TBTX.js → chunk-FH7WODJH.js} +1 -1
- package/dist/{chunk-NORZWWLK.js → chunk-FVYXDXEV.js} +2 -2
- package/dist/{chunk-YURXPGAM.js → chunk-GNBGPUJ7.js} +6 -8
- package/dist/{chunk-RVCWIIZ7.js → chunk-GV5R5B7Q.js} +1 -1
- package/dist/{chunk-GS6FE3IW.js → chunk-HC7EVDEL.js} +1 -1
- package/dist/{chunk-K2GOFLTX.js → chunk-HLYOEIWM.js} +14 -6
- package/dist/{chunk-XDSOIJC3.js → chunk-HMT2RPZU.js} +6 -6
- package/dist/{chunk-IKVBTDLO.js → chunk-HW4AKJ5F.js} +1 -1
- package/dist/{chunk-OLDDJS3S.js → chunk-I7QGQAZM.js} +8 -8
- package/dist/{chunk-JFKL3WAE.js → chunk-IWFLMU2N.js} +104 -19
- package/dist/{chunk-IHFUKJOR.js → chunk-K2FLNJVB.js} +8 -2
- package/dist/chunk-KJJLA674.js +121 -0
- package/dist/{chunk-XWVGSEUT.js → chunk-KO5QBV73.js} +1 -1
- package/dist/{chunk-INI3TM6I.js → chunk-KQLGTGE5.js} +3 -3
- package/dist/{chunk-E4BSCXMU.js → chunk-LVX6NK36.js} +3 -3
- package/dist/{chunk-BM5PX3DJ.js → chunk-LW6HO6U3.js} +4 -4
- package/dist/{chunk-OZUQF4NB.js → chunk-MQZVBHEY.js} +123 -8
- package/dist/{chunk-IV7EI5E2.js → chunk-N3DQEVSI.js} +2 -2
- package/dist/{chunk-A4KQZXZI.js → chunk-NE55C6S5.js} +4 -2
- package/dist/{chunk-EDYBFSPE.js → chunk-OBXQRJWQ.js} +7 -10
- package/dist/{chunk-RCFCZT5O.js → chunk-OSSHSIMD.js} +1 -1
- package/dist/chunk-P36MALQF.js +15 -0
- package/dist/{chunk-EKA4ZZBI.js → chunk-P7THMINS.js} +3 -3
- package/dist/{chunk-3NBKW2QJ.js → chunk-PAGIICKN.js} +2 -2
- package/dist/{chunk-O3SKIXQK.js → chunk-PJU63L6W.js} +1 -1
- package/dist/{chunk-RPYPW5NN.js → chunk-POLR33RB.js} +20 -13
- package/dist/{chunk-7M4KAPAA.js → chunk-PUGIRFPX.js} +2 -2
- package/dist/{chunk-7XTZVLE6.js → chunk-QFN7NVWM.js} +1 -1
- package/dist/{chunk-D2KNWIQ6.js → chunk-QFSCCQIR.js} +1 -1
- package/dist/{chunk-J5IPIQU2.js → chunk-QRKLPWEX.js} +1 -1
- package/dist/{chunk-N77KD7ZZ.js → chunk-QVYVUCWD.js} +1 -1
- package/dist/{chunk-GK4AIFIH.js → chunk-SDYDNHEE.js} +34 -3
- package/dist/{chunk-2NCHQUPX.js → chunk-SQLK7SJL.js} +1 -1
- package/dist/{chunk-PMRBLBUP.js → chunk-T42U2W2R.js} +14 -2
- package/dist/{chunk-Q65ZQFF2.js → chunk-TAMQYQGJ.js} +1 -1
- package/dist/{chunk-PXSM4HPB.js → chunk-U3X3TPBW.js} +1 -1
- package/dist/{chunk-3A5AAPMP.js → chunk-UICWP23D.js} +1 -1
- package/dist/{chunk-A7YQNIQT.js → chunk-UM2GRYM3.js} +113 -10
- package/dist/{chunk-TC2FBZJZ.js → chunk-VIVBA6E6.js} +2 -2
- package/dist/{chunk-W6HTOVHU.js → chunk-W35EKBS6.js} +2 -2
- package/dist/{chunk-YEIFI443.js → chunk-WPNE5NEP.js} +1 -1
- package/dist/{chunk-WY5OODN5.js → chunk-XONFUK3M.js} +3693 -28
- package/dist/{chunk-IYFKBFTW.js → chunk-Y6QL2LGO.js} +8 -5
- package/dist/{chunk-THXFSPLV.js → chunk-ZIRIDSDB.js} +1 -1
- package/dist/chunk-ZLW2V65P.js +209 -0
- package/dist/{chunk-4BB7V6AI.js → chunk-ZQQ3SEIE.js} +33 -32
- package/dist/{clean-L2E4VD57.js → clean-YHGPY33K.js} +23 -23
- package/dist/cli.js +57 -159
- package/dist/{cloud-IDUQRYLO.js → cloud-DOFI5ISR.js} +4 -4
- package/dist/{cloudrun-R3JXWXGG.js → cloudrun-KTZ4XDHL.js} +13 -12
- package/dist/commands/contrast-audit.browser.js +60 -4
- package/dist/commands/layout-audit.browser.js +88 -20
- package/dist/{compare-VYBWSP3Y.js → compare-SMMIZN2C.js} +37 -37
- package/dist/{compiler-ACHWOU5N.js → compiler-TEXQWW6N.js} +14 -11
- package/dist/{component-PYYV2V3F.js → component-B3GCNGSS.js} +5 -5
- package/dist/{compositions-B5GQSXH7.js → compositions-OQNZZTKF.js} +38 -34
- package/dist/{delete-EAX2U3WI.js → delete-EL5LVSEP.js} +6 -6
- package/dist/{deterministicFonts-F6WIVL2W.js → deterministicFonts-U2BIMGPG.js} +3 -3
- package/dist/{dist-NZSQCYOF.js → dist-5UVIRMSM.js} +7 -7
- package/dist/{dist-ROUDWGLO.js → dist-XN234YFQ.js} +41 -39
- package/dist/{doctor-PJX7MLFG.js → doctor-UOL3OI2A.js} +17 -17
- package/dist/{dom-IROKGVJI.js → dom-37K6YOH4.js} +2 -2
- package/dist/{events-SBC54MHO.js → events-K2DB2PBC.js} +2 -2
- package/dist/{events-YFFXKAQQ.js → events-NIZBS6S7.js} +3 -3
- package/dist/{feedback-UETLWREV.js → feedback-QMP4E6L7.js} +16 -15
- package/dist/{figma-QDSJPIRW.js → figma-2AUJRNVC.js} +3 -3
- package/dist/fontLocalizeCli.js +18 -18
- package/dist/{get-B5TS6C7H.js → get-P5NC7SRM.js} +6 -6
- package/dist/{gpuPolicy-LYOVBAJP.js → gpuPolicy-7N5MCE2G.js} +15 -15
- package/dist/{grade-compare-LBIHMAUN.js → grade-compare-HV5AFZ6P.js} +37 -37
- package/dist/{help-XBP6A6LT.js → help-3TSTXBLN.js} +1 -1
- package/dist/{history-2S42ZXKL.js → history-D65XFJ6D.js} +6 -6
- package/dist/hyperframe-runtime.js +25 -25
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +25 -25
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/hyperframes-slideshow.global.js +23 -23
- package/dist/{info-I2VDAWT7.js → info-TXV7MLFO.js} +17 -16
- package/dist/{init-BGHSDODI.js → init-OSDMJZJV.js} +38 -38
- package/dist/{inspect-MZK5B5RP.js → inspect-RQQSAYIJ.js} +38 -38
- package/dist/{installer-LL4QAKFW.js → installer-CDOB32HE.js} +11 -10
- package/dist/{keyframes-2EBF7OSS.js → keyframes-V75Q6GRM.js} +10 -10
- package/dist/{lambda-XKFPAOFE.js → lambda-RODV4RCX.js} +12 -11
- package/dist/{layout-TP5ERKEF.js → layout-IZAI5SFC.js} +38 -38
- package/dist/{lint-FQ6CEI7E.js → lint-PLXOXY5R.js} +14 -14
- package/dist/{lintProject-LM3XZRPZ.js → lintProject-OQ6H6XBR.js} +7 -7
- package/dist/{list-FRNUJXZ3.js → list-BQBPNKDZ.js} +7 -7
- package/dist/{login-C25QU3BQ.js → login-NP6F4FHC.js} +20 -24
- package/dist/{logout-GJXZQKOA.js → logout-B4KS4A7S.js} +6 -6
- package/dist/{manager-DXB7JDHU.js → manager-GXYF4AVO.js} +2 -2
- package/dist/{manager-524RPYO7.js → manager-RFZNG5YT.js} +2 -2
- package/dist/{media-treatment-DCANGWSV.js → media-treatment-PXGMZ4A4.js} +55 -34
- package/dist/{models-GOD6ARB3.js → models-CEZM6XZ7.js} +17 -17
- package/dist/{motionShot-FSKETANX.js → motionShot-R4GHYWYM.js} +25 -25
- package/dist/{normalize-IGLHCWTF.js → normalize-H6KUHHEI.js} +18 -7
- package/dist/{normalize-audio-C2IM7OID.js → normalize-audio-MQ7NFCOV.js} +10 -6
- package/dist/{open-VVISXIII.js → open-AKQTGNXF.js} +5 -5
- package/dist/{pipeline-7YHZPYIS.js → pipeline-SYJYP2RM.js} +17 -17
- package/dist/{play-DSELK7G3.js → play-NBH4B7PL.js} +31 -30
- package/dist/{present-N72YFDKP.js → present-XAX55CFS.js} +26 -26
- package/dist/{preview-XTYN4NJ2.js → preview-OLANKNFA.js} +26 -26
- package/dist/{producer-NDCU3MHK.js → producer-Q6YNZZUJ.js} +1 -1
- package/dist/{projectConfig-MH4QU4AC.js → projectConfig-EM26P45P.js} +13 -12
- package/dist/{publication-KUSHI5MG.js → publication-OXWJZKSX.js} +8 -7
- package/dist/{publish-3XEEFWMF.js → publish-4VBWP2UB.js} +23 -22
- package/dist/{refresh-MFITBIKV.js → refresh-PVHBEABE.js} +2 -2
- package/dist/{remove-background-2QKJ7XOD.js → remove-background-REB7427G.js} +19 -19
- package/dist/{render-75E342ZU.js → render-3CVZ2SZG.js} +13 -12
- package/dist/{render-S73DW4KK.js → render-K25YOG3M.js} +22 -21
- package/dist/{render-2DVYTVLQ.js → render-TSE75QUL.js} +35 -35
- package/dist/{render-batch-YURBS54Q.js → render-batch-GGUOK3DS.js} +13 -12
- package/dist/{renderCancellation-373ASJTO.js → renderCancellation-PZRWB53I.js} +15 -15
- package/dist/renderSetupWorker.js +7 -7
- package/dist/{resolver-FE3GBZ4T.js → resolver-S5VK6UCB.js} +10 -9
- package/dist/{screenshotCapture-ECBTLCU6.js → screenshotCapture-TEUIWXWN.js} +53 -33
- package/dist/{sherpa-B2D3AGP6.js → sherpa-LVIUEAGF.js} +18 -18
- package/dist/skills/hyperframes-cli/references/cloud.md +1 -1
- package/dist/skills/hyperframes-cli/references/doctor-browser.md +24 -1
- package/dist/skills/media-use/references/grading.md +4 -2
- package/dist/skills/media-use/scripts/lib/cache.mjs +28 -14
- package/dist/skills/media-use/scripts/lib/cache.test.mjs +110 -0
- package/dist/skills/media-use/scripts/lib/duck.mjs +2 -1
- package/dist/skills/media-use/scripts/lib/duck.test.mjs +87 -0
- package/dist/skills/media-use/scripts/lib/probe.mjs +6 -1
- package/dist/skills/media-use/scripts/lib/probe.test.mjs +73 -0
- package/dist/skills/media-use/scripts/lib/words.mjs +1 -1
- package/dist/{skills-ICJ22CZZ.js → skills-I65FU5HD.js} +5 -5
- package/dist/{skillsUpdateCheck-GXZN56I5.js → skillsUpdateCheck-J57RNNIV.js} +3 -3
- package/dist/{slideshow-EJ4IMY6P.js → slideshow-4OJEPWNZ.js} +1 -1
- package/dist/{snapshot-XHKOAWF4.js → snapshot-YROOGY22.js} +42 -39
- package/dist/{src-I7UC3JTL.js → src-JO5JOV7Y.js} +16 -14
- package/dist/{src-74PFDTDX.js → src-X426BZAG.js} +17 -17
- package/dist/{staticProjectServer-2DGKD6TF.js → staticProjectServer-5VMBS262.js} +23 -23
- package/dist/{status-JA6SKQVH.js → status-LXPGSSKY.js} +6 -4
- package/dist/studio/assets/{hyperframes-player-5Vx2AiUz.js → hyperframes-player-BXSuksFh.js} +3 -3
- package/dist/studio/assets/{index-BAnh7cSQ.js → index-BgOVCqjo.js} +1 -1
- package/dist/studio/assets/{index-P8fgj_Xa.js → index-FgyO_5Kv.js} +1 -1
- package/dist/studio/assets/{index-C0thd4eM.js → index-J7jpL4pj.js} +157 -157
- package/dist/studio/index.html +1 -1
- package/dist/studio/index.js +148 -175
- package/dist/studio/index.js.map +1 -1
- package/dist/{studio-api-PROBO7JG.js → studio-api-VRBZUGAE.js} +22 -18
- package/dist/{studioServer-ID6UV2NE.js → studioServer-DBNKZ6I6.js} +50 -50
- package/dist/{synthesize-77PTU6C5.js → synthesize-C3IWDAXF.js} +2 -2
- package/dist/{telemetry-65LFHIWH.js → telemetry-CXAX3TO3.js} +3 -3
- package/dist/{timeline-6UV3JJXD.js → timeline-VQ34WH7J.js} +91 -70
- package/dist/{tokens-HIL4TZXI.js → tokens-62R7VFAZ.js} +4 -4
- package/dist/{transcribe-TIO6W3EQ.js → transcribe-7KR7IPJA.js} +18 -18
- package/dist/{transcribe-V7F6QDSN.js → transcribe-XOHPPL2O.js} +11 -11
- package/dist/{tts-TOHSPWEG.js → tts-MUV42JXT.js} +6 -6
- package/dist/{updateCheck-GZELANMA.js → updateCheck-POYNH3B5.js} +2 -2
- package/dist/{upgrade-BX3KDDZJ.js → upgrade-NBNOT7J2.js} +2 -2
- package/dist/{urlDownloader-R76OHFIE.js → urlDownloader-3NS63A7B.js} +14 -14
- package/dist/{validate-7UX4I443.js → validate-Y2QDHAEP.js} +40 -28
- package/dist/{video-RVGYEFQU.js → video-SJDMTSTL.js} +15 -15
- package/package.json +1 -1
- package/dist/chunk-24OWOBQH.js +0 -3656
- package/dist/chunk-SYKKFAUW.js +0 -3711
- /package/dist/{chunk-HBBJFK6I.js → chunk-APDLWWFG.js} +0 -0
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
typeDirPath,
|
|
21
21
|
updateRecord,
|
|
22
22
|
withFigmaErrors
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-LVX6NK36.js";
|
|
24
24
|
import {
|
|
25
25
|
defineCommand
|
|
26
26
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -119,7 +119,13 @@ async function runAssetImportMany(refInputs, opts, deps) {
|
|
|
119
119
|
const slots = refs.map(
|
|
120
120
|
(r) => reuseExisting(fileKey, r.nodeId, opts, version, deps, description, entity)
|
|
121
121
|
);
|
|
122
|
-
const
|
|
122
|
+
const nodeIndexes = /* @__PURE__ */ new Map();
|
|
123
|
+
const missIndexes = [];
|
|
124
|
+
for (const [i, ref] of refs.entries()) {
|
|
125
|
+
if (nodeIndexes.has(ref.nodeId)) continue;
|
|
126
|
+
nodeIndexes.set(ref.nodeId, i);
|
|
127
|
+
if (slots[i] === null) missIndexes.push(i);
|
|
128
|
+
}
|
|
123
129
|
try {
|
|
124
130
|
if (missIndexes.length > 0) {
|
|
125
131
|
const missNodeIds = missIndexes.map((i) => refs[i].nodeId);
|
|
@@ -151,9 +157,11 @@ async function runAssetImportMany(refInputs, opts, deps) {
|
|
|
151
157
|
} finally {
|
|
152
158
|
safeRegenerateIndex(deps.projectDir);
|
|
153
159
|
}
|
|
154
|
-
return
|
|
155
|
-
|
|
156
|
-
|
|
160
|
+
return refs.map((ref, i) => {
|
|
161
|
+
const firstIndex = nodeIndexes.get(ref.nodeId) ?? i;
|
|
162
|
+
const result = slots[firstIndex];
|
|
163
|
+
if (!result) throw new Error(`figma asset import produced no result for "${refInputs[i]}"`);
|
|
164
|
+
return firstIndex === i ? result : { ...result, reused: true };
|
|
157
165
|
});
|
|
158
166
|
}
|
|
159
167
|
function normalizeMeta(value) {
|
|
@@ -221,7 +229,7 @@ var asset_default = defineCommand({
|
|
|
221
229
|
rendered > 0 ? `(${results.length} nodes, ${rendered} rendered in 1 figma request)` : `(${results.length} nodes, all reused from cache \u2014 no figma request)`
|
|
222
230
|
);
|
|
223
231
|
}
|
|
224
|
-
const { trackFigmaImport } = await import("./telemetry-
|
|
232
|
+
const { trackFigmaImport } = await import("./telemetry-CXAX3TO3.js");
|
|
225
233
|
trackFigmaImport({
|
|
226
234
|
phase: "asset",
|
|
227
235
|
reused: results.every((r) => r.reused),
|
|
@@ -6,22 +6,22 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
resolveCompositionViewportFromHtml
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FH7WODJH.js";
|
|
10
10
|
import {
|
|
11
11
|
launchManagedBrowser,
|
|
12
12
|
resolveManagedGpuMode
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-PJU63L6W.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveDiagnosticNavigationTimeoutMs,
|
|
16
16
|
windowsChromeCrashRemediation
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-P7THMINS.js";
|
|
18
18
|
import {
|
|
19
19
|
resolveLocalBrowserGpuMode
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-QRKLPWEX.js";
|
|
21
21
|
import {
|
|
22
22
|
assertWebGpuAdapterAvailable,
|
|
23
23
|
compositionRequiresWebGpu
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-33RZPZ4K.js";
|
|
25
25
|
import {
|
|
26
26
|
normalizeErrorMessage
|
|
27
27
|
} from "./chunk-KNU5COPB.js";
|
|
@@ -103,7 +103,7 @@ async function openSettledCompositionPage(html, url, options) {
|
|
|
103
103
|
const { ensureBrowser, findSystemBrowser } = await import("./manager-CT3D67CG.js");
|
|
104
104
|
const browser = await ensureBrowser();
|
|
105
105
|
const puppeteer = await import("puppeteer-core");
|
|
106
|
-
const { buildChromeArgs } = await import("./src-
|
|
106
|
+
const { buildChromeArgs } = await import("./src-JO5JOV7Y.js");
|
|
107
107
|
const requestedGpuMode = options.browserGpuMode ?? resolveCliChromeGpuMode();
|
|
108
108
|
const requiresWebGpu = compositionRequiresWebGpu(html);
|
|
109
109
|
const launch = async (executablePath) => {
|
|
@@ -7,29 +7,29 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
RegistryCompatibilityError,
|
|
9
9
|
gateRegistryItemsCompatibility
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KO5QBV73.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-2LBBHMKT.js";
|
|
18
18
|
import {
|
|
19
19
|
resolveItemWithDependencies,
|
|
20
20
|
resolveItemsByTag
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-HW4AKJ5F.js";
|
|
22
22
|
import {
|
|
23
23
|
InvalidVariableValuesError,
|
|
24
24
|
prepareItem,
|
|
25
25
|
publishItem
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-CLOH4LIB.js";
|
|
27
27
|
import {
|
|
28
28
|
DEFAULT_REGISTRY_URL
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-TAMQYQGJ.js";
|
|
30
30
|
import {
|
|
31
31
|
trackRegistryItemAdded
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-QFN7NVWM.js";
|
|
33
33
|
import {
|
|
34
34
|
defineCommand
|
|
35
35
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -38,14 +38,14 @@ import {
|
|
|
38
38
|
} from "./chunk-PBN6GBJE.js";
|
|
39
39
|
import {
|
|
40
40
|
ITEM_TYPE_DIRS
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-4M4EC7JX.js";
|
|
42
42
|
import {
|
|
43
43
|
isProjectRootMissing,
|
|
44
44
|
realpath
|
|
45
45
|
} from "./chunk-OFQWTKPW.js";
|
|
46
46
|
import {
|
|
47
47
|
parseHTML
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-SDYDNHEE.js";
|
|
49
49
|
import {
|
|
50
50
|
c
|
|
51
51
|
} from "./chunk-ZTZA4UWZ.js";
|
|
@@ -4,18 +4,110 @@ import { dirname as __hf_dirname } from "node:path";
|
|
|
4
4
|
var require = __hf_createRequire(import.meta.url);
|
|
5
5
|
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
|
+
import {
|
|
8
|
+
decodeHTMLAttribute
|
|
9
|
+
} from "./chunk-SDYDNHEE.js";
|
|
7
10
|
|
|
8
11
|
// ../parsers/dist/assetResolution.js
|
|
9
12
|
import { closeSync, constants, existsSync, fstatSync, openSync, readFileSync } from "fs";
|
|
10
13
|
import { isAbsolute, join, posix, relative, resolve, sep } from "path";
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
function readAttributeValue(html, at) {
|
|
15
|
+
while (/[\t\n\f\r ]/.test(html.charAt(at))) at++;
|
|
16
|
+
const quote = ['"', "'"].includes(html.charAt(at)) ? html.charAt(at) : "";
|
|
17
|
+
if (quote) at++;
|
|
18
|
+
const valueStart = at;
|
|
19
|
+
if (quote) {
|
|
20
|
+
const closing = html.indexOf(quote, at);
|
|
21
|
+
at = closing === -1 ? html.length : closing;
|
|
22
|
+
} else {
|
|
23
|
+
while (at < html.length && !/[\t\n\f\r >]/.test(html[at])) at++;
|
|
24
|
+
}
|
|
25
|
+
const valueEnd = at;
|
|
26
|
+
const end = quote ? Math.min(valueEnd + 1, html.length) : valueEnd;
|
|
27
|
+
return { value: html.slice(valueStart, valueEnd), valueStart, valueEnd, quote, end };
|
|
28
|
+
}
|
|
29
|
+
function readAttribute(html, start) {
|
|
30
|
+
let at = start;
|
|
31
|
+
while (at < html.length && !/[\t\n\f\r =/>]/.test(html[at])) at++;
|
|
32
|
+
if (at === start) return null;
|
|
33
|
+
const name = html.slice(start, at).toLowerCase();
|
|
34
|
+
const nameEnd = at;
|
|
35
|
+
while (/[\t\n\f\r ]/.test(html[at] ?? "")) at++;
|
|
36
|
+
if (html[at] !== "=") return { kind: "boolean", name, start, end: nameEnd };
|
|
37
|
+
return { kind: "value", name, start, ...readAttributeValue(html, at + 1) };
|
|
38
|
+
}
|
|
39
|
+
function readOpeningTag(html, start, name, at) {
|
|
40
|
+
const attributes = [];
|
|
41
|
+
while (at < html.length) {
|
|
42
|
+
while (/[\t\n\f\r /]/.test(html[at] ?? "")) at++;
|
|
43
|
+
if (at >= html.length || html[at] === ">") break;
|
|
44
|
+
const attribute = readAttribute(html, at);
|
|
45
|
+
if (attribute === null) {
|
|
46
|
+
at++;
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
attributes.push(attribute);
|
|
50
|
+
at = attribute.end;
|
|
51
|
+
}
|
|
52
|
+
const closed = html[at] === ">";
|
|
53
|
+
return {
|
|
54
|
+
name: name.toLowerCase(),
|
|
55
|
+
start,
|
|
56
|
+
bodyEnd: at,
|
|
57
|
+
end: closed ? at + 1 : at,
|
|
58
|
+
closed,
|
|
59
|
+
rawTextEnd: null,
|
|
60
|
+
attributes
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
function scanHtmlOpeningTags(html) {
|
|
64
|
+
const tags = [];
|
|
65
|
+
const opening = /<!--[\s\S]*?(?:--!?>|$)|<([a-z][^\t\n\f\r />]*)/gi;
|
|
66
|
+
let match;
|
|
67
|
+
while ((match = opening.exec(html)) !== null) {
|
|
68
|
+
if (!match[1]) continue;
|
|
69
|
+
const tag = readOpeningTag(html, match.index, match[1], opening.lastIndex);
|
|
70
|
+
tags.push(tag);
|
|
71
|
+
opening.lastIndex = tag.end;
|
|
72
|
+
if ([
|
|
73
|
+
"script",
|
|
74
|
+
"style",
|
|
75
|
+
"textarea",
|
|
76
|
+
"title",
|
|
77
|
+
"xmp",
|
|
78
|
+
"iframe",
|
|
79
|
+
"noembed",
|
|
80
|
+
"noframes",
|
|
81
|
+
"plaintext"
|
|
82
|
+
].includes(tag.name)) {
|
|
83
|
+
if (tag.name === "plaintext") {
|
|
84
|
+
tag.rawTextEnd = html.length;
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
const closing = new RegExp(`</${tag.name}(?=[\\t\\n\\f\\r />])`, "gi");
|
|
88
|
+
closing.lastIndex = tag.end;
|
|
89
|
+
const end = closing.exec(html);
|
|
90
|
+
tag.rawTextEnd = end?.index ?? html.length;
|
|
91
|
+
opening.lastIndex = tag.rawTextEnd;
|
|
92
|
+
}
|
|
17
93
|
}
|
|
18
|
-
return
|
|
94
|
+
return tags;
|
|
95
|
+
}
|
|
96
|
+
function decodeAuthoredAttribute(value) {
|
|
97
|
+
return decodeHTMLAttribute(value);
|
|
98
|
+
}
|
|
99
|
+
function decodeUrlPathVariants(path) {
|
|
100
|
+
const decoded = decodeWellFormedEscapes(path);
|
|
101
|
+
return decoded === path ? [path] : [decoded, path];
|
|
102
|
+
}
|
|
103
|
+
function decodeWellFormedEscapes(path) {
|
|
104
|
+
return path.replace(/(?:%[0-9A-Fa-f]{2})+/g, (run) => {
|
|
105
|
+
try {
|
|
106
|
+
return decodeURIComponent(run);
|
|
107
|
+
} catch {
|
|
108
|
+
return run;
|
|
109
|
+
}
|
|
110
|
+
});
|
|
19
111
|
}
|
|
20
112
|
function isRemoteOrInlineUrl(url) {
|
|
21
113
|
return /^(https?:|data:|blob:|\/\/|#)/i.test(url);
|
|
@@ -26,21 +118,14 @@ function hasUnresolvedTemplatingToken(url) {
|
|
|
26
118
|
function isUnresolvedAssetPlaceholder(rawSrc) {
|
|
27
119
|
return /^__[A-Z_]+__$/.test(rawSrc.trim()) || hasUnresolvedTemplatingToken(rawSrc);
|
|
28
120
|
}
|
|
29
|
-
var COMPOSITION_SRC_ATTR = /\bdata-composition-src\s*=\s*["']([^"']+)["']/i;
|
|
30
121
|
function collectSubCompositionSrcs(html) {
|
|
31
|
-
const scannable = maskNonScannableRanges(html);
|
|
32
122
|
const srcs = [];
|
|
33
123
|
const seen = /* @__PURE__ */ new Set();
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
if (
|
|
38
|
-
const
|
|
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();
|
|
124
|
+
for (const tag of scanHtmlOpeningTags(html)) {
|
|
125
|
+
if (!tag.closed) continue;
|
|
126
|
+
const attribute = tag.attributes.find((attr) => attr.name === "data-composition-src");
|
|
127
|
+
if (attribute?.kind !== "value") continue;
|
|
128
|
+
const src = decodeAuthoredAttribute(attribute.value).trim();
|
|
44
129
|
if (!src || seen.has(src)) continue;
|
|
45
130
|
if (isUnresolvedAssetPlaceholder(src)) continue;
|
|
46
131
|
if (isRemoteOrInlineUrl(src)) continue;
|
|
@@ -53,8 +53,14 @@ function formatRenderPipelineDetail(input) {
|
|
|
53
53
|
return parts.length > 0 ? parts.join(" \xB7 ") : void 0;
|
|
54
54
|
}
|
|
55
55
|
function formatScreenshotFallbackHint(input) {
|
|
56
|
-
if (input.platform !== "linux" || input.requestedGpuMode !== "auto"
|
|
57
|
-
|
|
56
|
+
if (input.platform !== "linux" || input.requestedGpuMode !== "auto" && input.requestedGpuMode !== "hardware") {
|
|
57
|
+
return void 0;
|
|
58
|
+
}
|
|
59
|
+
if (input.captureMode !== "screenshot") return void 0;
|
|
60
|
+
if (input.browserGpuMode === "hardware") {
|
|
61
|
+
return "Screenshot capture (slower): BeginFrame did not run. Needs chrome-headless-shell and no --resolution upscale. A BeginFrame probe timeout can occur when browsers start together on one GPU; fewer --workers may help.";
|
|
62
|
+
}
|
|
63
|
+
if (input.browserGpuMode !== "software" || input.requestedGpuMode !== "auto") return void 0;
|
|
58
64
|
return "Screenshot capture (slower): BeginFrame did not run. Needs chrome-headless-shell and no --resolution upscale. Heavy compositions can stall on software GL.";
|
|
59
65
|
}
|
|
60
66
|
function label(name, value) {
|
|
@@ -0,0 +1,121 @@
|
|
|
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
|
+
import {
|
|
8
|
+
isTextFile
|
|
9
|
+
} from "./chunk-K4WKGXRC.js";
|
|
10
|
+
import {
|
|
11
|
+
CliUsageError
|
|
12
|
+
} from "./chunk-PBN6GBJE.js";
|
|
13
|
+
|
|
14
|
+
// src/utils/reject-extra-positionals.ts
|
|
15
|
+
var ACCEPTS_EXTRA_POSITIONALS = /* @__PURE__ */ new Set([
|
|
16
|
+
"compare",
|
|
17
|
+
"figma asset",
|
|
18
|
+
"skills update",
|
|
19
|
+
"timeline set"
|
|
20
|
+
]);
|
|
21
|
+
var JOINS_EXTRA_POSITIONALS = /* @__PURE__ */ new Set(["catalog", "tts"]);
|
|
22
|
+
var EXTRA_POSITIONAL_HINTS = {
|
|
23
|
+
add: "Run add once per item, or pass a single tag to install every item tagged with it."
|
|
24
|
+
};
|
|
25
|
+
function wantsJson(value) {
|
|
26
|
+
return value === true || typeof value === "string" && value !== "false" && value !== "0";
|
|
27
|
+
}
|
|
28
|
+
function declaredArgs(cmd) {
|
|
29
|
+
const raw = cmd.args;
|
|
30
|
+
return raw && typeof raw === "object" ? raw : {};
|
|
31
|
+
}
|
|
32
|
+
function usageLine(path, args) {
|
|
33
|
+
const parts = ["hyperframes", path];
|
|
34
|
+
let hasOptions = false;
|
|
35
|
+
for (const [name, def] of Object.entries(args)) {
|
|
36
|
+
if (def.type !== "positional") {
|
|
37
|
+
hasOptions = true;
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
const optional = def.required === false || def.default !== void 0;
|
|
41
|
+
parts.push(optional ? `[${name.toUpperCase()}]` : `<${name.toUpperCase()}>`);
|
|
42
|
+
}
|
|
43
|
+
if (hasOptions) parts.push("[OPTIONS]");
|
|
44
|
+
return parts.join(" ");
|
|
45
|
+
}
|
|
46
|
+
function resolveExtraPositionals(cmd, path, parsed) {
|
|
47
|
+
if (ACCEPTS_EXTRA_POSITIONALS.has(path)) return;
|
|
48
|
+
const args = declaredArgs(cmd);
|
|
49
|
+
const positionals = Object.entries(args).filter(([, def]) => def.type === "positional");
|
|
50
|
+
const given = (Array.isArray(parsed?._) ? parsed._ : []).map(String);
|
|
51
|
+
const extra = given.slice(positionals.length);
|
|
52
|
+
if (extra.length === 0) return;
|
|
53
|
+
const last = positionals.at(-1)?.[0];
|
|
54
|
+
const words = given.slice(positionals.length - 1);
|
|
55
|
+
const ttsFile = path === "tts" && isTextFile(words[0]);
|
|
56
|
+
if (parsed && last && JOINS_EXTRA_POSITIONALS.has(path) && !ttsFile) {
|
|
57
|
+
parsed[last] = words.join(" ");
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const plural = extra.length === 1 ? "" : "s";
|
|
61
|
+
const message = `Unexpected extra argument${plural} for hyperframes ${path}: ${extra.join(", ")}
|
|
62
|
+
Usage: ${usageLine(path, args)}` + (EXTRA_POSITIONAL_HINTS[path] ? `
|
|
63
|
+
${EXTRA_POSITIONAL_HINTS[path]}` : "");
|
|
64
|
+
if (wantsJson(parsed?.json)) console.log(JSON.stringify({ ok: false, error: message }));
|
|
65
|
+
else console.error(message);
|
|
66
|
+
throw new CliUsageError(
|
|
67
|
+
`${extra.length} unexpected extra argument${plural} for hyperframes ${path}`,
|
|
68
|
+
{
|
|
69
|
+
presented: true
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// src/utils/reject-unknown-flags.ts
|
|
75
|
+
var ALWAYS_KNOWN = /* @__PURE__ */ new Set(["help", "h", "version", "v", "json"]);
|
|
76
|
+
function nameVariants(name) {
|
|
77
|
+
const kebab = name.replace(/[A-Z]/g, (c) => "-" + c.toLowerCase());
|
|
78
|
+
const camel = name.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
|
|
79
|
+
return [name, kebab, camel];
|
|
80
|
+
}
|
|
81
|
+
function knownFlags(args) {
|
|
82
|
+
const known = new Set(ALWAYS_KNOWN);
|
|
83
|
+
for (const [name, def] of Object.entries(args ?? {})) {
|
|
84
|
+
for (const v of nameVariants(name)) known.add(v);
|
|
85
|
+
const alias = def?.alias;
|
|
86
|
+
if (typeof alias === "string") known.add(alias);
|
|
87
|
+
else if (Array.isArray(alias)) for (const a of alias) known.add(a);
|
|
88
|
+
}
|
|
89
|
+
return known;
|
|
90
|
+
}
|
|
91
|
+
function longFlagName(tok) {
|
|
92
|
+
const name = tok.slice(2).split("=")[0] ?? "";
|
|
93
|
+
return name.startsWith("no-") ? name.slice(3) : name;
|
|
94
|
+
}
|
|
95
|
+
function unknownFlagIn(tok, known) {
|
|
96
|
+
if (tok === "-" || !tok.startsWith("-")) return null;
|
|
97
|
+
if (tok.startsWith("--")) {
|
|
98
|
+
const name = longFlagName(tok);
|
|
99
|
+
return name && !known.has(name) ? `--${name}` : null;
|
|
100
|
+
}
|
|
101
|
+
for (const ch of tok.slice(1).split("=")[0] ?? "") {
|
|
102
|
+
if (!known.has(ch)) return `-${ch}`;
|
|
103
|
+
}
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
function assertKnownFlags(cmd, rawArgs) {
|
|
107
|
+
if (!Array.isArray(rawArgs)) return;
|
|
108
|
+
const rawDef = cmd.args;
|
|
109
|
+
const args = rawDef && typeof rawDef === "object" ? rawDef : void 0;
|
|
110
|
+
const known = knownFlags(args);
|
|
111
|
+
for (const tok of rawArgs) {
|
|
112
|
+
if (tok === "--") break;
|
|
113
|
+
const bad = unknownFlagIn(tok, known);
|
|
114
|
+
if (bad) throw new Error(`Unknown flag: ${bad}`);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export {
|
|
119
|
+
resolveExtraPositionals,
|
|
120
|
+
assertKnownFlags
|
|
121
|
+
};
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
VERSION
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-W35EKBS6.js";
|
|
10
10
|
|
|
11
11
|
// src/registry/compatibility.ts
|
|
12
12
|
import { compareVersions } from "compare-versions";
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
DEFAULT_VP9_CPU_USED,
|
|
9
9
|
isHttpUrl,
|
|
10
10
|
runFfmpeg
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-33RZPZ4K.js";
|
|
12
12
|
import {
|
|
13
13
|
parseAnimatedGifMetadata
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-4M4EC7JX.js";
|
|
15
15
|
import {
|
|
16
16
|
parseHTML
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SDYDNHEE.js";
|
|
18
18
|
|
|
19
19
|
// ../producer/src/services/animatedGifPrep.ts
|
|
20
20
|
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
|
errorBox
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-K2FLNJVB.js";
|
|
10
10
|
import {
|
|
11
11
|
failCommand
|
|
12
12
|
} from "./chunk-PBN6GBJE.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./chunk-VC76R6W2.js";
|
|
17
17
|
import {
|
|
18
18
|
DOMParser
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-SDYDNHEE.js";
|
|
20
20
|
|
|
21
21
|
// ../core/dist/figma/client.js
|
|
22
22
|
var FigmaClientError = class extends Error {
|
|
@@ -1278,7 +1278,7 @@ async function withFigmaErrors(command, fn) {
|
|
|
1278
1278
|
} catch (err) {
|
|
1279
1279
|
if (err instanceof Error) {
|
|
1280
1280
|
try {
|
|
1281
|
-
const { trackCommandFailure } = await import("./events-
|
|
1281
|
+
const { trackCommandFailure } = await import("./events-NIZBS6S7.js");
|
|
1282
1282
|
trackCommandFailure(
|
|
1283
1283
|
command,
|
|
1284
1284
|
err,
|
|
@@ -6,20 +6,20 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
errorBox
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-K2FLNJVB.js";
|
|
10
10
|
import {
|
|
11
11
|
ensureDOMParser
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-442JNXRM.js";
|
|
13
13
|
import {
|
|
14
14
|
failCommand
|
|
15
15
|
} from "./chunk-PBN6GBJE.js";
|
|
16
16
|
import {
|
|
17
17
|
formatVariableValidationIssue,
|
|
18
18
|
validateVariables
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-4M4EC7JX.js";
|
|
20
20
|
import {
|
|
21
21
|
extractCompositionMetadata
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-MQZVBHEY.js";
|
|
23
23
|
import {
|
|
24
24
|
c
|
|
25
25
|
} from "./chunk-ZTZA4UWZ.js";
|
|
@@ -8,6 +8,9 @@ import {
|
|
|
8
8
|
require_lib,
|
|
9
9
|
require_main
|
|
10
10
|
} from "./chunk-DPVXBVLL.js";
|
|
11
|
+
import {
|
|
12
|
+
decodeHTMLAttribute
|
|
13
|
+
} from "./chunk-SDYDNHEE.js";
|
|
11
14
|
import {
|
|
12
15
|
ancestor,
|
|
13
16
|
full,
|
|
@@ -4623,13 +4626,29 @@ function trackKindOf(node) {
|
|
|
4623
4626
|
return { kind: "graphics", source: "tag" };
|
|
4624
4627
|
}
|
|
4625
4628
|
function decodeUrlPathVariants(path) {
|
|
4626
|
-
const
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
}
|
|
4631
|
-
|
|
4632
|
-
|
|
4629
|
+
const decoded = decodeWellFormedEscapes(path);
|
|
4630
|
+
return decoded === path ? [path] : [decoded, path];
|
|
4631
|
+
}
|
|
4632
|
+
function decodeWellFormedEscapes(path) {
|
|
4633
|
+
return path.replace(/(?:%[0-9A-Fa-f]{2})+/g, (run) => {
|
|
4634
|
+
try {
|
|
4635
|
+
return decodeURIComponent(run);
|
|
4636
|
+
} catch {
|
|
4637
|
+
return run;
|
|
4638
|
+
}
|
|
4639
|
+
});
|
|
4640
|
+
}
|
|
4641
|
+
function splitUrlSuffix(urlValue) {
|
|
4642
|
+
const queryIdx = urlValue.indexOf("?");
|
|
4643
|
+
const hashIdx = urlValue.indexOf("#");
|
|
4644
|
+
if (queryIdx < 0 && hashIdx < 0) return { basePath: urlValue, suffix: "" };
|
|
4645
|
+
let cutIdx = urlValue.length;
|
|
4646
|
+
if (queryIdx >= 0) cutIdx = Math.min(cutIdx, queryIdx);
|
|
4647
|
+
if (hashIdx >= 0) cutIdx = Math.min(cutIdx, hashIdx);
|
|
4648
|
+
return { basePath: urlValue.slice(0, cutIdx), suffix: urlValue.slice(cutIdx) };
|
|
4649
|
+
}
|
|
4650
|
+
function decodedUrlPath(url) {
|
|
4651
|
+
return decodeWellFormedEscapes(splitUrlSuffix(url).basePath);
|
|
4633
4652
|
}
|
|
4634
4653
|
function parseProgram2(script) {
|
|
4635
4654
|
try {
|
|
@@ -4805,6 +4824,98 @@ function resolveAliasDisplayName(alias) {
|
|
|
4805
4824
|
if (!slug) return void 0;
|
|
4806
4825
|
return CANONICAL_FONT_DISPLAY_NAMES[slug];
|
|
4807
4826
|
}
|
|
4827
|
+
function readAttributeValue(html, at) {
|
|
4828
|
+
while (/[\t\n\f\r ]/.test(html.charAt(at))) at++;
|
|
4829
|
+
const quote = ['"', "'"].includes(html.charAt(at)) ? html.charAt(at) : "";
|
|
4830
|
+
if (quote) at++;
|
|
4831
|
+
const valueStart = at;
|
|
4832
|
+
if (quote) {
|
|
4833
|
+
const closing = html.indexOf(quote, at);
|
|
4834
|
+
at = closing === -1 ? html.length : closing;
|
|
4835
|
+
} else {
|
|
4836
|
+
while (at < html.length && !/[\t\n\f\r >]/.test(html[at])) at++;
|
|
4837
|
+
}
|
|
4838
|
+
const valueEnd = at;
|
|
4839
|
+
const end = quote ? Math.min(valueEnd + 1, html.length) : valueEnd;
|
|
4840
|
+
return { value: html.slice(valueStart, valueEnd), valueStart, valueEnd, quote, end };
|
|
4841
|
+
}
|
|
4842
|
+
function readAttribute(html, start) {
|
|
4843
|
+
let at = start;
|
|
4844
|
+
while (at < html.length && !/[\t\n\f\r =/>]/.test(html[at])) at++;
|
|
4845
|
+
if (at === start) return null;
|
|
4846
|
+
const name = html.slice(start, at).toLowerCase();
|
|
4847
|
+
const nameEnd = at;
|
|
4848
|
+
while (/[\t\n\f\r ]/.test(html[at] ?? "")) at++;
|
|
4849
|
+
if (html[at] !== "=") return { kind: "boolean", name, start, end: nameEnd };
|
|
4850
|
+
return { kind: "value", name, start, ...readAttributeValue(html, at + 1) };
|
|
4851
|
+
}
|
|
4852
|
+
function readOpeningTag(html, start, name, at) {
|
|
4853
|
+
const attributes = [];
|
|
4854
|
+
while (at < html.length) {
|
|
4855
|
+
while (/[\t\n\f\r /]/.test(html[at] ?? "")) at++;
|
|
4856
|
+
if (at >= html.length || html[at] === ">") break;
|
|
4857
|
+
const attribute = readAttribute(html, at);
|
|
4858
|
+
if (attribute === null) {
|
|
4859
|
+
at++;
|
|
4860
|
+
continue;
|
|
4861
|
+
}
|
|
4862
|
+
attributes.push(attribute);
|
|
4863
|
+
at = attribute.end;
|
|
4864
|
+
}
|
|
4865
|
+
const closed = html[at] === ">";
|
|
4866
|
+
return {
|
|
4867
|
+
name: name.toLowerCase(),
|
|
4868
|
+
start,
|
|
4869
|
+
bodyEnd: at,
|
|
4870
|
+
end: closed ? at + 1 : at,
|
|
4871
|
+
closed,
|
|
4872
|
+
rawTextEnd: null,
|
|
4873
|
+
attributes
|
|
4874
|
+
};
|
|
4875
|
+
}
|
|
4876
|
+
function scanHtmlOpeningTags(html) {
|
|
4877
|
+
const tags = [];
|
|
4878
|
+
const opening = /<!--[\s\S]*?(?:--!?>|$)|<([a-z][^\t\n\f\r />]*)/gi;
|
|
4879
|
+
let match;
|
|
4880
|
+
while ((match = opening.exec(html)) !== null) {
|
|
4881
|
+
if (!match[1]) continue;
|
|
4882
|
+
const tag = readOpeningTag(html, match.index, match[1], opening.lastIndex);
|
|
4883
|
+
tags.push(tag);
|
|
4884
|
+
opening.lastIndex = tag.end;
|
|
4885
|
+
if ([
|
|
4886
|
+
"script",
|
|
4887
|
+
"style",
|
|
4888
|
+
"textarea",
|
|
4889
|
+
"title",
|
|
4890
|
+
"xmp",
|
|
4891
|
+
"iframe",
|
|
4892
|
+
"noembed",
|
|
4893
|
+
"noframes",
|
|
4894
|
+
"plaintext"
|
|
4895
|
+
].includes(tag.name)) {
|
|
4896
|
+
if (tag.name === "plaintext") {
|
|
4897
|
+
tag.rawTextEnd = html.length;
|
|
4898
|
+
break;
|
|
4899
|
+
}
|
|
4900
|
+
const closing = new RegExp(`</${tag.name}(?=[\\t\\n\\f\\r />])`, "gi");
|
|
4901
|
+
closing.lastIndex = tag.end;
|
|
4902
|
+
const end = closing.exec(html);
|
|
4903
|
+
tag.rawTextEnd = end?.index ?? html.length;
|
|
4904
|
+
opening.lastIndex = tag.rawTextEnd;
|
|
4905
|
+
}
|
|
4906
|
+
}
|
|
4907
|
+
return tags;
|
|
4908
|
+
}
|
|
4909
|
+
var HTML_ATTRIBUTE_ENTITIES = {
|
|
4910
|
+
"&": ["&"],
|
|
4911
|
+
'"': ["""],
|
|
4912
|
+
"'": ["'", "'"],
|
|
4913
|
+
"<": ["<"],
|
|
4914
|
+
">": [">"]
|
|
4915
|
+
};
|
|
4916
|
+
function decodeAuthoredAttribute(value) {
|
|
4917
|
+
return decodeHTMLAttribute(value);
|
|
4918
|
+
}
|
|
4808
4919
|
|
|
4809
4920
|
export {
|
|
4810
4921
|
MagicString,
|
|
@@ -4841,8 +4952,12 @@ export {
|
|
|
4841
4952
|
topLevelElements,
|
|
4842
4953
|
trackKindOf,
|
|
4843
4954
|
decodeUrlPathVariants,
|
|
4955
|
+
decodedUrlPath,
|
|
4844
4956
|
extractMediaSrcMutations,
|
|
4845
4957
|
FONT_ALIAS_MAP,
|
|
4846
4958
|
FONT_ALIAS_KEYS,
|
|
4847
|
-
resolveAliasDisplayName
|
|
4959
|
+
resolveAliasDisplayName,
|
|
4960
|
+
scanHtmlOpeningTags,
|
|
4961
|
+
HTML_ATTRIBUTE_ENTITIES,
|
|
4962
|
+
decodeAuthoredAttribute
|
|
4848
4963
|
};
|