@hyperframes/core 0.7.14 → 0.7.15
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/compiler/staticGuard.js +1 -1
- package/dist/compiler/staticGuard.js.map +1 -1
- package/dist/core.types.d.ts +2 -369
- package/dist/core.types.d.ts.map +1 -1
- package/dist/core.types.js +1 -84
- package/dist/core.types.js.map +1 -1
- package/dist/generators/hyperframes.d.ts +1 -1
- package/dist/generators/hyperframes.d.ts.map +1 -1
- package/dist/generators/hyperframes.js +1 -1
- package/dist/generators/hyperframes.js.map +1 -1
- package/dist/index.d.ts +5 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/lint/index.d.ts +2 -2
- package/dist/lint/index.d.ts.map +1 -1
- package/dist/lint/index.js +2 -1
- package/dist/lint/index.js.map +1 -1
- package/dist/parsers/gsapConstants.d.ts +2 -12
- package/dist/parsers/gsapConstants.d.ts.map +1 -1
- package/dist/parsers/gsapConstants.js +2 -110
- package/dist/parsers/gsapConstants.js.map +1 -1
- package/dist/parsers/gsapParserAcorn.d.ts +2 -48
- package/dist/parsers/gsapParserAcorn.d.ts.map +1 -1
- package/dist/parsers/gsapParserAcorn.js +2 -1057
- package/dist/parsers/gsapParserAcorn.js.map +1 -1
- package/dist/parsers/gsapParserExports.d.ts +2 -20
- package/dist/parsers/gsapParserExports.d.ts.map +1 -1
- package/dist/parsers/gsapParserExports.js +2 -8
- package/dist/parsers/gsapParserExports.js.map +1 -1
- package/dist/parsers/gsapWriterAcorn.d.ts +2 -90
- package/dist/parsers/gsapWriterAcorn.d.ts.map +1 -1
- package/dist/parsers/gsapWriterAcorn.js +2 -2016
- package/dist/parsers/gsapWriterAcorn.js.map +1 -1
- package/dist/parsers/hfIds.d.ts +2 -16
- package/dist/parsers/hfIds.d.ts.map +1 -1
- package/dist/parsers/hfIds.js +2 -127
- package/dist/parsers/hfIds.js.map +1 -1
- package/dist/parsers/springEase.d.ts +2 -28
- package/dist/parsers/springEase.d.ts.map +1 -1
- package/dist/parsers/springEase.js +2 -69
- package/dist/parsers/springEase.js.map +1 -1
- package/dist/slideshow/index.d.ts +1 -0
- package/dist/slideshow/index.d.ts.map +1 -1
- package/dist/slideshow/index.js +1 -0
- package/dist/slideshow/index.js.map +1 -1
- package/dist/studio-api/helpers/draftMarkers.d.ts +2 -10
- package/dist/studio-api/helpers/draftMarkers.d.ts.map +1 -1
- package/dist/studio-api/helpers/draftMarkers.js +2 -10
- package/dist/studio-api/helpers/draftMarkers.js.map +1 -1
- package/dist/studio-api/helpers/finiteMutation.d.ts +2 -10
- package/dist/studio-api/helpers/finiteMutation.d.ts.map +1 -1
- package/dist/studio-api/helpers/finiteMutation.js +2 -20
- package/dist/studio-api/helpers/finiteMutation.js.map +1 -1
- package/dist/studio-api/helpers/manualEditsRenderScript.d.ts +2 -12
- package/dist/studio-api/helpers/manualEditsRenderScript.d.ts.map +1 -1
- package/dist/studio-api/helpers/manualEditsRenderScript.js +2 -632
- package/dist/studio-api/helpers/manualEditsRenderScript.js.map +1 -1
- package/dist/studio-api/helpers/screenshotClip.d.ts +2 -7
- package/dist/studio-api/helpers/screenshotClip.d.ts.map +1 -1
- package/dist/studio-api/helpers/screenshotClip.js +2 -21
- package/dist/studio-api/helpers/screenshotClip.js.map +1 -1
- package/dist/studio-api/helpers/studioMotionRenderScript.d.ts +2 -8
- package/dist/studio-api/helpers/studioMotionRenderScript.d.ts.map +1 -1
- package/dist/studio-api/helpers/studioMotionRenderScript.js +2 -207
- package/dist/studio-api/helpers/studioMotionRenderScript.js.map +1 -1
- package/dist/studio-api/index.d.ts +2 -9
- package/dist/studio-api/index.d.ts.map +1 -1
- package/dist/studio-api/index.js +2 -8
- package/dist/studio-api/index.js.map +1 -1
- package/package.json +16 -18
- package/dist/generated/runtime-inline.js +0 -11
- package/dist/hyperframe.manifest.json +0 -22
- package/dist/hyperframe.runtime.mjs +0 -325
- package/dist/lint/context.d.ts +0 -17
- package/dist/lint/context.d.ts.map +0 -1
- package/dist/lint/context.js +0 -37
- package/dist/lint/context.js.map +0 -1
- package/dist/lint/hyperframeLinter.d.ts +0 -14
- package/dist/lint/hyperframeLinter.d.ts.map +0 -1
- package/dist/lint/hyperframeLinter.js +0 -132
- package/dist/lint/hyperframeLinter.js.map +0 -1
- package/dist/lint/rules/adapters.d.ts +0 -3
- package/dist/lint/rules/adapters.d.ts.map +0 -1
- package/dist/lint/rules/adapters.js +0 -40
- package/dist/lint/rules/adapters.js.map +0 -1
- package/dist/lint/rules/captions.d.ts +0 -3
- package/dist/lint/rules/captions.d.ts.map +0 -1
- package/dist/lint/rules/captions.js +0 -242
- package/dist/lint/rules/captions.js.map +0 -1
- package/dist/lint/rules/composition.d.ts +0 -5
- package/dist/lint/rules/composition.d.ts.map +0 -1
- package/dist/lint/rules/composition.js +0 -694
- package/dist/lint/rules/composition.js.map +0 -1
- package/dist/lint/rules/core.d.ts +0 -3
- package/dist/lint/rules/core.d.ts.map +0 -1
- package/dist/lint/rules/core.js +0 -432
- package/dist/lint/rules/core.js.map +0 -1
- package/dist/lint/rules/fonts.d.ts +0 -3
- package/dist/lint/rules/fonts.d.ts.map +0 -1
- package/dist/lint/rules/fonts.js +0 -205
- package/dist/lint/rules/fonts.js.map +0 -1
- package/dist/lint/rules/gsap.d.ts +0 -4
- package/dist/lint/rules/gsap.d.ts.map +0 -1
- package/dist/lint/rules/gsap.js +0 -1039
- package/dist/lint/rules/gsap.js.map +0 -1
- package/dist/lint/rules/media.d.ts +0 -3
- package/dist/lint/rules/media.d.ts.map +0 -1
- package/dist/lint/rules/media.js +0 -491
- package/dist/lint/rules/media.js.map +0 -1
- package/dist/lint/rules/slideshow.d.ts +0 -4
- package/dist/lint/rules/slideshow.d.ts.map +0 -1
- package/dist/lint/rules/slideshow.js +0 -74
- package/dist/lint/rules/slideshow.js.map +0 -1
- package/dist/lint/rules/textures.d.ts +0 -3
- package/dist/lint/rules/textures.d.ts.map +0 -1
- package/dist/lint/rules/textures.js +0 -192
- package/dist/lint/rules/textures.js.map +0 -1
- package/dist/lint/types.d.ts +0 -36
- package/dist/lint/types.d.ts.map +0 -1
- package/dist/lint/types.js +0 -2
- package/dist/lint/types.js.map +0 -1
- package/dist/lint/utils.d.ts +0 -55
- package/dist/lint/utils.d.ts.map +0 -1
- package/dist/lint/utils.js +0 -264
- package/dist/lint/utils.js.map +0 -1
- package/dist/parsers/gsapInline.d.ts +0 -47
- package/dist/parsers/gsapInline.d.ts.map +0 -1
- package/dist/parsers/gsapInline.js +0 -513
- package/dist/parsers/gsapInline.js.map +0 -1
- package/dist/parsers/gsapParser.d.ts +0 -158
- package/dist/parsers/gsapParser.d.ts.map +0 -1
- package/dist/parsers/gsapParser.js +0 -2634
- package/dist/parsers/gsapParser.js.map +0 -1
- package/dist/parsers/gsapParser.test-helpers.d.ts +0 -49
- package/dist/parsers/gsapParser.test-helpers.d.ts.map +0 -1
- package/dist/parsers/gsapParser.test-helpers.js +0 -97
- package/dist/parsers/gsapParser.test-helpers.js.map +0 -1
- package/dist/parsers/gsapSerialize.d.ts +0 -191
- package/dist/parsers/gsapSerialize.d.ts.map +0 -1
- package/dist/parsers/gsapSerialize.js +0 -410
- package/dist/parsers/gsapSerialize.js.map +0 -1
- package/dist/parsers/gsapUnroll.d.ts +0 -7
- package/dist/parsers/gsapUnroll.d.ts.map +0 -1
- package/dist/parsers/gsapUnroll.js +0 -137
- package/dist/parsers/gsapUnroll.js.map +0 -1
- package/dist/parsers/htmlParser.d.ts +0 -27
- package/dist/parsers/htmlParser.d.ts.map +0 -1
- package/dist/parsers/htmlParser.js +0 -731
- package/dist/parsers/htmlParser.js.map +0 -1
- package/dist/studio-api/createStudioApi.d.ts +0 -10
- package/dist/studio-api/createStudioApi.d.ts.map +0 -1
- package/dist/studio-api/createStudioApi.js +0 -32
- package/dist/studio-api/createStudioApi.js.map +0 -1
- package/dist/studio-api/helpers/backupJournal.d.ts +0 -9
- package/dist/studio-api/helpers/backupJournal.d.ts.map +0 -1
- package/dist/studio-api/helpers/backupJournal.js +0 -81
- package/dist/studio-api/helpers/backupJournal.js.map +0 -1
- package/dist/studio-api/helpers/hfIdPersist.d.ts +0 -11
- package/dist/studio-api/helpers/hfIdPersist.d.ts.map +0 -1
- package/dist/studio-api/helpers/hfIdPersist.js +0 -39
- package/dist/studio-api/helpers/hfIdPersist.js.map +0 -1
- package/dist/studio-api/helpers/mediaValidation.d.ts +0 -20
- package/dist/studio-api/helpers/mediaValidation.d.ts.map +0 -1
- package/dist/studio-api/helpers/mediaValidation.js +0 -56
- package/dist/studio-api/helpers/mediaValidation.js.map +0 -1
- package/dist/studio-api/helpers/mime.d.ts +0 -4
- package/dist/studio-api/helpers/mime.d.ts.map +0 -1
- package/dist/studio-api/helpers/mime.js +0 -39
- package/dist/studio-api/helpers/mime.js.map +0 -1
- package/dist/studio-api/helpers/previewAdapter.d.ts +0 -43
- package/dist/studio-api/helpers/previewAdapter.d.ts.map +0 -1
- package/dist/studio-api/helpers/previewAdapter.js +0 -118
- package/dist/studio-api/helpers/previewAdapter.js.map +0 -1
- package/dist/studio-api/helpers/projectSignature.d.ts +0 -5
- package/dist/studio-api/helpers/projectSignature.d.ts.map +0 -1
- package/dist/studio-api/helpers/projectSignature.js +0 -154
- package/dist/studio-api/helpers/projectSignature.js.map +0 -1
- package/dist/studio-api/helpers/safePath.d.ts +0 -12
- package/dist/studio-api/helpers/safePath.d.ts.map +0 -1
- package/dist/studio-api/helpers/safePath.js +0 -38
- package/dist/studio-api/helpers/safePath.js.map +0 -1
- package/dist/studio-api/helpers/sourceMutation.d.ts +0 -28
- package/dist/studio-api/helpers/sourceMutation.d.ts.map +0 -1
- package/dist/studio-api/helpers/sourceMutation.js +0 -339
- package/dist/studio-api/helpers/sourceMutation.js.map +0 -1
- package/dist/studio-api/helpers/subComposition.d.ts +0 -20
- package/dist/studio-api/helpers/subComposition.d.ts.map +0 -1
- package/dist/studio-api/helpers/subComposition.js +0 -289
- package/dist/studio-api/helpers/subComposition.js.map +0 -1
- package/dist/studio-api/helpers/waveform.d.ts +0 -4
- package/dist/studio-api/helpers/waveform.d.ts.map +0 -1
- package/dist/studio-api/helpers/waveform.js +0 -80
- package/dist/studio-api/helpers/waveform.js.map +0 -1
- package/dist/studio-api/routes/files.d.ts +0 -4
- package/dist/studio-api/routes/files.d.ts.map +0 -1
- package/dist/studio-api/routes/files.js +0 -1200
- package/dist/studio-api/routes/files.js.map +0 -1
- package/dist/studio-api/routes/fonts.d.ts +0 -3
- package/dist/studio-api/routes/fonts.d.ts.map +0 -1
- package/dist/studio-api/routes/fonts.js +0 -157
- package/dist/studio-api/routes/fonts.js.map +0 -1
- package/dist/studio-api/routes/lint.d.ts +0 -4
- package/dist/studio-api/routes/lint.d.ts.map +0 -1
- package/dist/studio-api/routes/lint.js +0 -29
- package/dist/studio-api/routes/lint.js.map +0 -1
- package/dist/studio-api/routes/preview.d.ts +0 -4
- package/dist/studio-api/routes/preview.d.ts.map +0 -1
- package/dist/studio-api/routes/preview.js +0 -331
- package/dist/studio-api/routes/preview.js.map +0 -1
- package/dist/studio-api/routes/projects.d.ts +0 -4
- package/dist/studio-api/routes/projects.d.ts.map +0 -1
- package/dist/studio-api/routes/projects.js +0 -45
- package/dist/studio-api/routes/projects.js.map +0 -1
- package/dist/studio-api/routes/registry.d.ts +0 -4
- package/dist/studio-api/routes/registry.d.ts.map +0 -1
- package/dist/studio-api/routes/registry.js +0 -31
- package/dist/studio-api/routes/registry.js.map +0 -1
- package/dist/studio-api/routes/render.d.ts +0 -4
- package/dist/studio-api/routes/render.d.ts.map +0 -1
- package/dist/studio-api/routes/render.js +0 -269
- package/dist/studio-api/routes/render.js.map +0 -1
- package/dist/studio-api/routes/storyboard.d.ts +0 -4
- package/dist/studio-api/routes/storyboard.d.ts.map +0 -1
- package/dist/studio-api/routes/storyboard.js +0 -65
- package/dist/studio-api/routes/storyboard.js.map +0 -1
- package/dist/studio-api/routes/thumbnail.d.ts +0 -4
- package/dist/studio-api/routes/thumbnail.d.ts.map +0 -1
- package/dist/studio-api/routes/thumbnail.js +0 -107
- package/dist/studio-api/routes/thumbnail.js.map +0 -1
- package/dist/studio-api/routes/waveform.d.ts +0 -4
- package/dist/studio-api/routes/waveform.d.ts.map +0 -1
- package/dist/studio-api/routes/waveform.js +0 -41
- package/dist/studio-api/routes/waveform.js.map +0 -1
- package/dist/studio-api/types.d.ts +0 -120
- package/dist/studio-api/types.d.ts.map +0 -1
- package/dist/studio-api/types.js +0 -2
- package/dist/studio-api/types.js.map +0 -1
package/dist/lint/context.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { HyperframeLintFinding, HyperframeLinterOptions } from "./types";
|
|
2
|
-
import type { OpenTag, ExtractedBlock } from "./utils";
|
|
3
|
-
export type { OpenTag, ExtractedBlock };
|
|
4
|
-
export type LintContext = {
|
|
5
|
-
source: string;
|
|
6
|
-
rawSource: string;
|
|
7
|
-
tags: OpenTag[];
|
|
8
|
-
styles: ExtractedBlock[];
|
|
9
|
-
scripts: ExtractedBlock[];
|
|
10
|
-
compositionIds: Set<string>;
|
|
11
|
-
rootTag: OpenTag | null;
|
|
12
|
-
rootCompositionId: string | null;
|
|
13
|
-
options: HyperframeLinterOptions;
|
|
14
|
-
};
|
|
15
|
-
export type { HyperframeLintFinding };
|
|
16
|
-
export declare function buildLintContext(html: string, options?: HyperframeLinterOptions): LintContext;
|
|
17
|
-
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/lint/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAW9E,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEvD,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;AAExC,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACxB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,OAAO,EAAE,uBAAuB,CAAC;CAClC,CAAC;AAGF,YAAY,EAAE,qBAAqB,EAAE,CAAC;AAEtC,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,uBAA4B,GAAG,WAAW,CAmCjG"}
|
package/dist/lint/context.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { extractBlocks, extractOpenTags, findRootTag, collectCompositionIds, readAttr, stripHtmlComments, STYLE_BLOCK_PATTERN, SCRIPT_BLOCK_PATTERN, } from "./utils.js";
|
|
2
|
-
export function buildLintContext(html, options = {}) {
|
|
3
|
-
const rawSource = html || "";
|
|
4
|
-
// Strip HTML comments before scanning so a commented-out <template> or tag can't
|
|
5
|
-
// hijack the boundary match below. Linear + fixpoint (see stripHtmlComments) to
|
|
6
|
-
// stay ReDoS-free and catch markers that re-form when a comment is removed.
|
|
7
|
-
let source = stripHtmlComments(rawSource);
|
|
8
|
-
const templateMatch = source.match(/<template[^>]*>([\s\S]*)<\/template>/i);
|
|
9
|
-
if (templateMatch?.[1])
|
|
10
|
-
source = templateMatch[1];
|
|
11
|
-
const tags = extractOpenTags(source);
|
|
12
|
-
const styles = [
|
|
13
|
-
...extractBlocks(source, STYLE_BLOCK_PATTERN),
|
|
14
|
-
...(options.externalStyles ?? []).map((style) => ({
|
|
15
|
-
attrs: `href="${style.href}"`,
|
|
16
|
-
content: style.content,
|
|
17
|
-
raw: style.content,
|
|
18
|
-
index: -1,
|
|
19
|
-
})),
|
|
20
|
-
];
|
|
21
|
-
const scripts = extractBlocks(source, SCRIPT_BLOCK_PATTERN);
|
|
22
|
-
const compositionIds = collectCompositionIds(tags);
|
|
23
|
-
const rootTag = findRootTag(source);
|
|
24
|
-
const rootCompositionId = readAttr(rootTag?.raw || "", "data-composition-id");
|
|
25
|
-
return {
|
|
26
|
-
source,
|
|
27
|
-
rawSource,
|
|
28
|
-
tags,
|
|
29
|
-
styles,
|
|
30
|
-
scripts,
|
|
31
|
-
compositionIds,
|
|
32
|
-
rootTag,
|
|
33
|
-
rootCompositionId,
|
|
34
|
-
options,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=context.js.map
|
package/dist/lint/context.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/lint/context.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,eAAe,EACf,WAAW,EACX,qBAAqB,EACrB,QAAQ,EACR,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,SAAS,CAAC;AAoBjB,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,UAAmC,EAAE;IAClF,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;IAC7B,iFAAiF;IACjF,gFAAgF;IAChF,4EAA4E;IAC5E,IAAI,MAAM,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC1C,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAC5E,IAAI,aAAa,EAAE,CAAC,CAAC,CAAC;QAAE,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;IAElD,MAAM,IAAI,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;IACrC,MAAM,MAAM,GAAG;QACb,GAAG,aAAa,CAAC,MAAM,EAAE,mBAAmB,CAAC;QAC7C,GAAG,CAAC,OAAO,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YAChD,KAAK,EAAE,SAAS,KAAK,CAAC,IAAI,GAAG;YAC7B,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,GAAG,EAAE,KAAK,CAAC,OAAO;YAClB,KAAK,EAAE,CAAC,CAAC;SACV,CAAC,CAAC;KACJ,CAAC;IACF,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IAC5D,MAAM,cAAc,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;IACnD,MAAM,OAAO,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE,qBAAqB,CAAC,CAAC;IAE9E,OAAO;QACL,MAAM;QACN,SAAS;QACT,IAAI;QACJ,MAAM;QACN,OAAO;QACP,cAAc;QACd,OAAO;QACP,iBAAiB;QACjB,OAAO;KACR,CAAC;AACJ,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { HyperframeLintFinding, HyperframeLintResult, HyperframeLinterOptions } from "./types";
|
|
2
|
-
export declare function lintHyperframeHtml(html: string, options?: HyperframeLinterOptions): Promise<HyperframeLintResult>;
|
|
3
|
-
/**
|
|
4
|
-
* Async lint pass: HEAD-checks every remote media URL in the HTML.
|
|
5
|
-
* Returns findings for URLs that are unreachable (non-2xx status or network error).
|
|
6
|
-
*
|
|
7
|
-
* Call this after `lintHyperframeHtml()` and merge the findings.
|
|
8
|
-
*
|
|
9
|
-
* @param timeoutMs - per-request timeout (default 8000ms)
|
|
10
|
-
*/
|
|
11
|
-
export declare function lintMediaUrls(html: string, options?: {
|
|
12
|
-
timeoutMs?: number;
|
|
13
|
-
}): Promise<HyperframeLintFinding[]>;
|
|
14
|
-
//# sourceMappingURL=hyperframeLinter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hyperframeLinter.d.ts","sourceRoot":"","sources":["../../src/lint/hyperframeLinter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAyBpG,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,oBAAoB,CAAC,CA+B/B;AAmCD;;;;;;;GAOG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,GACnC,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAiDlC"}
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import { buildLintContext } from "./context.js";
|
|
2
|
-
import { readAttr, truncateSnippet } from "./utils.js";
|
|
3
|
-
import { coreRules } from "./rules/core.js";
|
|
4
|
-
import { mediaRules } from "./rules/media.js";
|
|
5
|
-
import { gsapRules } from "./rules/gsap.js";
|
|
6
|
-
import { captionRules } from "./rules/captions.js";
|
|
7
|
-
import { compositionRules } from "./rules/composition.js";
|
|
8
|
-
import { adapterRules } from "./rules/adapters.js";
|
|
9
|
-
import { textureRules } from "./rules/textures.js";
|
|
10
|
-
import { fontRules } from "./rules/fonts.js";
|
|
11
|
-
import { slideshowRules } from "./rules/slideshow.js";
|
|
12
|
-
const ALL_RULES = [
|
|
13
|
-
...coreRules,
|
|
14
|
-
...mediaRules,
|
|
15
|
-
...gsapRules,
|
|
16
|
-
...captionRules,
|
|
17
|
-
...compositionRules,
|
|
18
|
-
...adapterRules,
|
|
19
|
-
...textureRules,
|
|
20
|
-
...fontRules,
|
|
21
|
-
...slideshowRules,
|
|
22
|
-
];
|
|
23
|
-
export async function lintHyperframeHtml(html, options = {}) {
|
|
24
|
-
const ctx = buildLintContext(html, options);
|
|
25
|
-
const findings = [];
|
|
26
|
-
const seen = new Set();
|
|
27
|
-
for (const rule of ALL_RULES) {
|
|
28
|
-
for (const finding of await Promise.resolve(rule(ctx))) {
|
|
29
|
-
const dedupeKey = [
|
|
30
|
-
finding.code,
|
|
31
|
-
finding.severity,
|
|
32
|
-
finding.selector || "",
|
|
33
|
-
finding.elementId || "",
|
|
34
|
-
finding.message,
|
|
35
|
-
].join("|");
|
|
36
|
-
if (seen.has(dedupeKey))
|
|
37
|
-
continue;
|
|
38
|
-
seen.add(dedupeKey);
|
|
39
|
-
findings.push(options.filePath ? { ...finding, file: options.filePath } : finding);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
const errorCount = findings.filter((f) => f.severity === "error").length;
|
|
43
|
-
const warningCount = findings.filter((f) => f.severity === "warning").length;
|
|
44
|
-
const infoCount = findings.filter((f) => f.severity === "info").length;
|
|
45
|
-
return {
|
|
46
|
-
ok: errorCount === 0,
|
|
47
|
-
errorCount,
|
|
48
|
-
warningCount,
|
|
49
|
-
infoCount,
|
|
50
|
-
findings,
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
// ── Async media URL accessibility checker ─────────────────────────────────
|
|
54
|
-
function extractMediaUrls(html) {
|
|
55
|
-
const results = [];
|
|
56
|
-
const tagRe = /<(video|audio|img|source)\b[^>]*>/gi;
|
|
57
|
-
let match;
|
|
58
|
-
while ((match = tagRe.exec(html)) !== null) {
|
|
59
|
-
const tagName = (match[1] ?? "").toLowerCase();
|
|
60
|
-
const raw = match[0];
|
|
61
|
-
const src = readAttr(raw, "src");
|
|
62
|
-
if (!src)
|
|
63
|
-
continue;
|
|
64
|
-
if (/^https?:\/\//i.test(src)) {
|
|
65
|
-
results.push({
|
|
66
|
-
url: src,
|
|
67
|
-
tagName,
|
|
68
|
-
elementId: readAttr(raw, "id") || undefined,
|
|
69
|
-
snippet: truncateSnippet(raw) ?? "",
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
return results;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Async lint pass: HEAD-checks every remote media URL in the HTML.
|
|
77
|
-
* Returns findings for URLs that are unreachable (non-2xx status or network error).
|
|
78
|
-
*
|
|
79
|
-
* Call this after `lintHyperframeHtml()` and merge the findings.
|
|
80
|
-
*
|
|
81
|
-
* @param timeoutMs - per-request timeout (default 8000ms)
|
|
82
|
-
*/
|
|
83
|
-
export async function lintMediaUrls(html, options = {}) {
|
|
84
|
-
const urls = extractMediaUrls(html);
|
|
85
|
-
if (urls.length === 0)
|
|
86
|
-
return [];
|
|
87
|
-
const timeout = options.timeoutMs ?? 8000;
|
|
88
|
-
const findings = [];
|
|
89
|
-
const seen = new Set();
|
|
90
|
-
const unique = urls.filter((u) => {
|
|
91
|
-
if (seen.has(u.url))
|
|
92
|
-
return false;
|
|
93
|
-
seen.add(u.url);
|
|
94
|
-
return true;
|
|
95
|
-
});
|
|
96
|
-
const checks = unique.map(async ({ url, tagName, elementId, snippet }) => {
|
|
97
|
-
try {
|
|
98
|
-
const controller = new AbortController();
|
|
99
|
-
const timer = setTimeout(() => controller.abort(), timeout);
|
|
100
|
-
const resp = await fetch(url, {
|
|
101
|
-
method: "HEAD",
|
|
102
|
-
signal: controller.signal,
|
|
103
|
-
redirect: "follow",
|
|
104
|
-
});
|
|
105
|
-
clearTimeout(timer);
|
|
106
|
-
if (!resp.ok) {
|
|
107
|
-
findings.push({
|
|
108
|
-
code: "inaccessible_media_url",
|
|
109
|
-
severity: "error",
|
|
110
|
-
message: `<${tagName}${elementId ? ` id="${elementId}"` : ""}> references a URL that returned HTTP ${resp.status}: ${url.slice(0, 100)}`,
|
|
111
|
-
elementId,
|
|
112
|
-
fixHint: "This URL is not accessible. Replace with a valid, reachable media URL.",
|
|
113
|
-
snippet,
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
catch (err) {
|
|
118
|
-
const reason = err instanceof Error ? err.name : "unknown";
|
|
119
|
-
findings.push({
|
|
120
|
-
code: "inaccessible_media_url",
|
|
121
|
-
severity: "error",
|
|
122
|
-
message: `<${tagName}${elementId ? ` id="${elementId}"` : ""}> references an unreachable URL (${reason}): ${url.slice(0, 100)}`,
|
|
123
|
-
elementId,
|
|
124
|
-
fixHint: "This URL is not accessible. Replace with a valid, reachable media URL.",
|
|
125
|
-
snippet,
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
await Promise.all(checks);
|
|
130
|
-
return findings;
|
|
131
|
-
}
|
|
132
|
-
//# sourceMappingURL=hyperframeLinter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hyperframeLinter.js","sourceRoot":"","sources":["../../src/lint/hyperframeLinter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,SAAS,GAAG;IAChB,GAAG,SAAS;IACZ,GAAG,UAAU;IACb,GAAG,SAAS;IACZ,GAAG,YAAY;IACf,GAAG,gBAAgB;IACnB,GAAG,YAAY;IACf,GAAG,YAAY;IACf,GAAG,SAAS;IACZ,GAAG,cAAc;CAClB,CA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I,SAAS;oBACT,OAAO,EAAE,wEAAwE;oBACjF,OAAO;iBACR,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,MAAM,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;YAC3D,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,wBAAwB;gBAC9B,QAAQ,EAAE,OAAO;gBACjB,OAAO,EAAE,IAAI,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC,QAAQ,SAAS,GAAG,CAAC,CAAC,CAAC,EAAE,oCAAoC,MAAM,MAAM,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE;gBAC/H,SAAS;gBACT,OAAO,EAAE,wEAAwE;gBACjF,OAAO;aACR,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,MAAM,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC1B,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapters.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/adapters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAGrE,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,CAAC,GAAG,EAAE,WAAW,KAAK,qBAAqB,EAAE,CAmD7E,CAAC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { readAttr, extractScriptTextsAndSrcs } from "../utils.js";
|
|
2
|
-
export const adapterRules = [
|
|
3
|
-
// missing_lottie_script
|
|
4
|
-
({ tags, scripts }) => {
|
|
5
|
-
const { texts, srcs } = extractScriptTextsAndSrcs(scripts);
|
|
6
|
-
const hasLottieAttr = tags.some((t) => readAttr(t.raw, "data-lottie-src") !== null);
|
|
7
|
-
const usesLottieApi = texts.some((t) => /lottie\.(loadAnimation|setSpeed|play|stop|destroy)\b/.test(t));
|
|
8
|
-
const hasLottieScript = srcs.some((src) => /lottie/i.test(src));
|
|
9
|
-
if (!(hasLottieAttr || usesLottieApi) || hasLottieScript)
|
|
10
|
-
return [];
|
|
11
|
-
return [
|
|
12
|
-
{
|
|
13
|
-
code: "missing_lottie_script",
|
|
14
|
-
severity: "error",
|
|
15
|
-
message: "Composition uses Lottie but no Lottie script is loaded. The animation will not render.",
|
|
16
|
-
fixHint: 'Add <script src="https://cdn.jsdelivr.net/npm/lottie-web@5/build/player/lottie.min.js"></script> before your Lottie code.',
|
|
17
|
-
},
|
|
18
|
-
];
|
|
19
|
-
},
|
|
20
|
-
// missing_three_script
|
|
21
|
-
({ scripts }) => {
|
|
22
|
-
const { texts, srcs } = extractScriptTextsAndSrcs(scripts);
|
|
23
|
-
const usesThree = texts.some((t) => /\bTHREE\./.test(t));
|
|
24
|
-
const hasThreeScript = srcs.some((src) => /three/i.test(src));
|
|
25
|
-
const hasThreeImportMap = texts.some((t) => /["']three["']/.test(t) &&
|
|
26
|
-
/importmap/.test(scripts.find((s) => s.content === t)?.attrs || ""));
|
|
27
|
-
const hasThreeModuleImport = texts.some((t) => /\bimport\b.*['"]three['"]/.test(t) || /\bfrom\s+['"]three['"]/.test(t));
|
|
28
|
-
if (!usesThree || hasThreeScript || hasThreeImportMap || hasThreeModuleImport)
|
|
29
|
-
return [];
|
|
30
|
-
return [
|
|
31
|
-
{
|
|
32
|
-
code: "missing_three_script",
|
|
33
|
-
severity: "error",
|
|
34
|
-
message: "Composition uses Three.js but no Three.js script is loaded. The 3D scene will not render.",
|
|
35
|
-
fixHint: 'Add <script src="https://cdn.jsdelivr.net/npm/three@0.160/build/three.min.js"></script> before your Three.js code.',
|
|
36
|
-
},
|
|
37
|
-
];
|
|
38
|
-
},
|
|
39
|
-
];
|
|
40
|
-
//# sourceMappingURL=adapters.js.map
|
|
@@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CAAC,CAAC,CAAC,CAAC,CAAC;QACzD,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,KAAK,CAAC,IAAI,CAClC,CAAC,CAAC,EAAE,EAAE,CACJ,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;YACvB,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,EAAE,KAAK,IAAI,EAAE,CAAC,CACtE,CAAC;QACF,MAAM,oBAAoB,GAAG,KAAK,CAAC,IAAI,CACrC,CAAC,CAAC,EAAE,EAAE,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,wBAAwB,CAAC,IAAI,CAAC,CAAC,CAAC,CAC/E,CAAC;QAEF,IAAI,CAAC,SAAS,IAAI,cAAc,IAAI,iBAAiB,IAAI,oBAAoB;YAAE,OAAO,EAAE,CAAC;QACzF,OAAO;YACL;gBACE,IAAI,EAAE,sBAAsB;gBAC5B,QAAQ,EAAE,OAAO;gBACjB,OAAO,EACL,2FAA2F;gBAC7F,OAAO,EACL,oHAAoH;aACvH;SACF,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"captions.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/captions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AA8BrE,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,CAAC,GAAG,EAAE,WAAW,KAAK,qBAAqB,EAAE,CAgP7E,CAAC"}
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
/** Extract a bracket-balanced array literal starting at the `[` found by `varMatch`. */
|
|
2
|
-
// fallow-ignore-next-line complexity
|
|
3
|
-
function extractArrayLiteral(src, varMatch) {
|
|
4
|
-
const openIdx = varMatch.index + varMatch[0].length - 1;
|
|
5
|
-
let depth = 0;
|
|
6
|
-
let inStr = false;
|
|
7
|
-
let strChar = "";
|
|
8
|
-
for (let i = openIdx; i < src.length; i++) {
|
|
9
|
-
const c = src[i];
|
|
10
|
-
if (inStr) {
|
|
11
|
-
if (c === "\\") {
|
|
12
|
-
i++;
|
|
13
|
-
continue;
|
|
14
|
-
}
|
|
15
|
-
if (c === strChar)
|
|
16
|
-
inStr = false;
|
|
17
|
-
}
|
|
18
|
-
else if (c === '"' || c === "'") {
|
|
19
|
-
inStr = true;
|
|
20
|
-
strChar = c;
|
|
21
|
-
}
|
|
22
|
-
else if (c === "[") {
|
|
23
|
-
depth++;
|
|
24
|
-
}
|
|
25
|
-
else if (c === "]") {
|
|
26
|
-
depth--;
|
|
27
|
-
if (depth === 0)
|
|
28
|
-
return src.slice(openIdx, i + 1);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
export const captionRules = [
|
|
34
|
-
// caption_exit_missing_hard_kill
|
|
35
|
-
({ scripts, styles, options, rootCompositionId }) => {
|
|
36
|
-
const findings = [];
|
|
37
|
-
// Only the ACTUAL captions composition. A content frame that merely mentions
|
|
38
|
-
// "karaoke" / "caption-*" in a comment (or uses an unrelated forEach + opacity:0
|
|
39
|
-
// screen-swap) is NOT captions — gating here prevents the false positive that fired
|
|
40
|
-
// on a content frame whose only caption signal was a descriptive comment.
|
|
41
|
-
const isCaptionComposition = Boolean(options.filePath && /caption/i.test(options.filePath)) ||
|
|
42
|
-
rootCompositionId === "captions" ||
|
|
43
|
-
styles.some((s) => /\.caption[-_]?(?:group|word|line|block)\b|\.cg-/.test(s.content));
|
|
44
|
-
if (!isCaptionComposition)
|
|
45
|
-
return findings;
|
|
46
|
-
for (const script of scripts) {
|
|
47
|
-
const content = script.content;
|
|
48
|
-
const hasExitTween = /\.to\s*\([^,]+,\s*\{[^}]*opacity\s*:\s*0/.test(content);
|
|
49
|
-
const hasHardKill = /\.set\s*\([^,]+,\s*\{[^}]*(?:visibility\s*:\s*["']hidden["']|opacity\s*:\s*0)/.test(content);
|
|
50
|
-
const hasCaptionLoop = /forEach|\.forEach\s*\(/.test(content) &&
|
|
51
|
-
/karaoke|caption[-_]?(?:group|word|line|block)|cg-/.test(content);
|
|
52
|
-
if (hasCaptionLoop && hasExitTween && !hasHardKill) {
|
|
53
|
-
findings.push({
|
|
54
|
-
code: "caption_exit_missing_hard_kill",
|
|
55
|
-
severity: "error",
|
|
56
|
-
message: "Caption exit animations (tl.to with opacity: 0) detected without a hard tl.set kill. " +
|
|
57
|
-
"Exit tweens can fail when karaoke word-level tweens conflict, leaving captions stuck on screen.",
|
|
58
|
-
fixHint: 'Add `tl.set(groupEl, { opacity: 0, visibility: "hidden" }, group.end)` after every ' +
|
|
59
|
-
"exit tl.to animation as a deterministic kill.",
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
return findings;
|
|
64
|
-
},
|
|
65
|
-
// caption_text_overflow_risk
|
|
66
|
-
({ styles }) => {
|
|
67
|
-
const findings = [];
|
|
68
|
-
for (const style of styles) {
|
|
69
|
-
const captionBlocks = style.content.matchAll(/(\.caption[-_]?(?:group|container|text|line|word)|#caption[-_]?container)\s*\{([^}]+)\}/gi);
|
|
70
|
-
for (const [, selector, body] of captionBlocks) {
|
|
71
|
-
if (!body)
|
|
72
|
-
continue;
|
|
73
|
-
const hasNowrap = /white-space\s*:\s*nowrap/i.test(body);
|
|
74
|
-
const hasMaxWidth = /max-width/i.test(body);
|
|
75
|
-
if (hasNowrap && !hasMaxWidth) {
|
|
76
|
-
findings.push({
|
|
77
|
-
code: "caption_text_overflow_risk",
|
|
78
|
-
severity: "warning",
|
|
79
|
-
selector: (selector ?? "").trim(),
|
|
80
|
-
message: `Caption selector "${(selector ?? "").trim()}" has white-space: nowrap but no max-width. Long phrases will clip off-screen.`,
|
|
81
|
-
fixHint: "Add max-width: 1600px (landscape) or max-width: 900px (portrait) and overflow: hidden.",
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
return findings;
|
|
87
|
-
},
|
|
88
|
-
// caption_transcript_not_inline
|
|
89
|
-
// fallow-ignore-next-line complexity
|
|
90
|
-
({ scripts, styles, options }) => {
|
|
91
|
-
const findings = [];
|
|
92
|
-
// Only check files that look like caption compositions
|
|
93
|
-
const isCaptionFile = (options.filePath && /caption/i.test(options.filePath)) ||
|
|
94
|
-
styles.some((s) => /\.caption[-_]?(?:group|word)/i.test(s.content));
|
|
95
|
-
if (!isCaptionFile)
|
|
96
|
-
return findings;
|
|
97
|
-
const allScript = scripts.map((s) => s.content).join("\n");
|
|
98
|
-
const hasInlineTranscript = /(?:const|let|var)\s+(?:TRANSCRIPT|script)\s*=\s*\[/.test(allScript);
|
|
99
|
-
const hasFetchTranscript = /fetch\s*\(\s*["'][^"']*transcript/i.test(allScript);
|
|
100
|
-
if (!hasInlineTranscript && hasFetchTranscript) {
|
|
101
|
-
findings.push({
|
|
102
|
-
code: "caption_transcript_not_inline",
|
|
103
|
-
severity: "error",
|
|
104
|
-
message: "Captions composition loads transcript via fetch(). The studio caption editor " +
|
|
105
|
-
"requires an inline `var TRANSCRIPT = [...]` array to detect and edit captions.",
|
|
106
|
-
fixHint: 'Embed the transcript as `var TRANSCRIPT = [{ "text": "...", "start": 0, "end": 1 }, ...]` ' +
|
|
107
|
-
"with JSON-quoted property keys. See the captions skill for details.",
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
if (hasInlineTranscript) {
|
|
111
|
-
// Verify the inline transcript can be parsed.
|
|
112
|
-
// Use a balanced-bracket scan instead of a regex to correctly handle
|
|
113
|
-
// nested arrays (e.g. word-level timing arrays inside each entry).
|
|
114
|
-
const varStart = /(?:const|let|var)\s+(?:TRANSCRIPT|script)\s*=\s*\[/.exec(allScript);
|
|
115
|
-
const transcriptJson = varStart ? extractArrayLiteral(allScript, varStart) : null;
|
|
116
|
-
if (transcriptJson) {
|
|
117
|
-
try {
|
|
118
|
-
JSON.parse(transcriptJson);
|
|
119
|
-
}
|
|
120
|
-
catch {
|
|
121
|
-
findings.push({
|
|
122
|
-
code: "caption_transcript_parse_error",
|
|
123
|
-
severity: "error",
|
|
124
|
-
message: "Inline TRANSCRIPT array is not valid JSON. The studio caption editor may fail " +
|
|
125
|
-
"to parse it. Common cause: unquoted property keys with apostrophes in text.",
|
|
126
|
-
fixHint: 'Use JSON-quoted keys: { "text": "don\'t", "start": 0, "end": 1 } instead of ' +
|
|
127
|
-
'{ text: "don\'t", start: 0, end: 1 }.',
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
return findings;
|
|
133
|
-
},
|
|
134
|
-
// caption_container_relative_position
|
|
135
|
-
({ styles }) => {
|
|
136
|
-
const findings = [];
|
|
137
|
-
for (const style of styles) {
|
|
138
|
-
const captionBlocks = style.content.matchAll(/(\.caption[-_]?(?:group|container|text|line)|#caption[-_]?container)\s*\{([^}]+)\}/gi);
|
|
139
|
-
for (const [, selector, body] of captionBlocks) {
|
|
140
|
-
if (!body)
|
|
141
|
-
continue;
|
|
142
|
-
if (/position\s*:\s*relative/i.test(body)) {
|
|
143
|
-
findings.push({
|
|
144
|
-
code: "caption_container_relative_position",
|
|
145
|
-
severity: "error",
|
|
146
|
-
selector: (selector ?? "").trim(),
|
|
147
|
-
message: `Caption selector "${(selector ?? "").trim()}" uses position: relative which causes overflow and breaks caption stacking.`,
|
|
148
|
-
fixHint: "Use position: absolute for all caption elements.",
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
return findings;
|
|
154
|
-
},
|
|
155
|
-
// caption_overflow_clips_scaled_words
|
|
156
|
-
({ styles, scripts }) => {
|
|
157
|
-
const findings = [];
|
|
158
|
-
const hasScaledWords = scripts.some((s) => /scale\s*:\s*1\.[2-9]/.test(s.content) && /caption|word|cg-/.test(s.content));
|
|
159
|
-
if (!hasScaledWords)
|
|
160
|
-
return findings;
|
|
161
|
-
for (const style of styles) {
|
|
162
|
-
const captionBlocks = style.content.matchAll(/(\.caption[-_]?(?:group|container)|#caption[-_]?(?:layer|container))\s*\{([^}]+)\}/gi);
|
|
163
|
-
for (const [, selector, body] of captionBlocks) {
|
|
164
|
-
if (!body)
|
|
165
|
-
continue;
|
|
166
|
-
if (/overflow\s*:\s*hidden/i.test(body)) {
|
|
167
|
-
findings.push({
|
|
168
|
-
code: "caption_overflow_clips_scaled_words",
|
|
169
|
-
severity: "error",
|
|
170
|
-
selector: (selector ?? "").trim(),
|
|
171
|
-
message: `"${(selector ?? "").trim()}" has overflow: hidden but GSAP scales caption words above 1.0x. Scaled emphasis words and their glow effects will be clipped.`,
|
|
172
|
-
fixHint: "Use overflow: visible on caption containers. Rely on fitTextFontSize with reduced maxWidth to prevent overflow instead.",
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
return findings;
|
|
178
|
-
},
|
|
179
|
-
// caption_textshadow_on_group_container
|
|
180
|
-
({ scripts, styles }) => {
|
|
181
|
-
const findings = [];
|
|
182
|
-
const isCaptionFile = styles.some((s) => /\.caption[-_]?(?:group|word)/i.test(s.content));
|
|
183
|
-
if (!isCaptionFile)
|
|
184
|
-
return findings;
|
|
185
|
-
for (const script of scripts) {
|
|
186
|
-
// Detect textShadow tweened on a group container (div with child word spans)
|
|
187
|
-
const groupShadowPattern = /\.to\s*\(\s*(?:div|groupEl|el|captionEl|document\.getElementById\s*\(\s*["']cg-)\s*[^,]*,\s*\{[^}]*textShadow/g;
|
|
188
|
-
// Also catch selector-based targeting of group containers
|
|
189
|
-
const selectorShadowPattern = /\.to\s*\(\s*["'](?:#cg-\d+|\.caption[-_]?group)["']\s*,\s*\{[^}]*textShadow/g;
|
|
190
|
-
if (groupShadowPattern.test(script.content) || selectorShadowPattern.test(script.content)) {
|
|
191
|
-
findings.push({
|
|
192
|
-
code: "caption_textshadow_on_group_container",
|
|
193
|
-
severity: "warning",
|
|
194
|
-
message: "textShadow is tweened on a caption group container. When children have semi-transparent " +
|
|
195
|
-
"color (e.g., inactive karaoke words at rgba opacity), the glow renders as a visible " +
|
|
196
|
-
"rectangle behind the entire group.",
|
|
197
|
-
fixHint: "Apply textShadow to individual active word elements instead of the group container. " +
|
|
198
|
-
"Use scale on the group for bass-reactive pulsing.",
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
return findings;
|
|
203
|
-
},
|
|
204
|
-
// caption_fittext_scale_mismatch
|
|
205
|
-
// fallow-ignore-next-line complexity
|
|
206
|
-
({ scripts }) => {
|
|
207
|
-
const findings = [];
|
|
208
|
-
for (const script of scripts) {
|
|
209
|
-
const content = script.content;
|
|
210
|
-
const fitTextMatch = content.match(/fitTextFontSize\s*\([^)]*maxWidth\s*:\s*(\d+)/);
|
|
211
|
-
if (!fitTextMatch)
|
|
212
|
-
continue;
|
|
213
|
-
const maxWidth = parseInt(fitTextMatch[1] ?? "0", 10);
|
|
214
|
-
if (!maxWidth)
|
|
215
|
-
continue;
|
|
216
|
-
// Find max scale on caption words
|
|
217
|
-
const scaleMatches = [...content.matchAll(/scale\s*:\s*(1\.\d+)/g)];
|
|
218
|
-
const captionContext = /caption|word|cg-|karaoke/i.test(content);
|
|
219
|
-
if (!captionContext || scaleMatches.length === 0)
|
|
220
|
-
continue;
|
|
221
|
-
let maxScale = 1;
|
|
222
|
-
for (const m of scaleMatches) {
|
|
223
|
-
const val = parseFloat(m[1] ?? "1");
|
|
224
|
-
if (val > maxScale)
|
|
225
|
-
maxScale = val;
|
|
226
|
-
}
|
|
227
|
-
// Check if maxWidth * maxScale exceeds safe bounds (1920 - reasonable margins)
|
|
228
|
-
const effectiveWidth = maxWidth * maxScale;
|
|
229
|
-
if (effectiveWidth > 1760) {
|
|
230
|
-
findings.push({
|
|
231
|
-
code: "caption_fittext_scale_mismatch",
|
|
232
|
-
severity: "warning",
|
|
233
|
-
message: `fitTextFontSize uses maxWidth: ${maxWidth}px but emphasis words scale up to ${maxScale}x. ` +
|
|
234
|
-
`Effective width ${Math.round(effectiveWidth)}px may overflow the composition (1920px minus margins).`,
|
|
235
|
-
fixHint: `Reduce maxWidth to ${Math.floor(1700 / maxScale)}px to leave headroom for scaled emphasis words.`,
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
return findings;
|
|
240
|
-
},
|
|
241
|
-
];
|
|
242
|
-
//# sourceMappingURL=captions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"captions.js","sourceRoot":"","sources":["../../../src/lint/rules/captions.ts"],"names":[],"mappings":"AAEA,wFAAwF;AACxF,qCAAqC;AACrC,SAAS,mBAAmB,CAAC,GAAW,EAAE,QAAyB;IACjE,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;IACxD,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,KAAK,GAAG,KAAK,CAAC;IAClB,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,KAAK,IAAI,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC1C,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAE,CAAC;QAClB,IAAI,KAAK,EAAE,CAAC;YACV,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;gBACf,CAAC,EAAE,CAAC;gBACJ,SAAS;YACX,CAAC;YACD,IAAI,CAAC,KAAK,OAAO;gBAAE,KAAK,GAAG,KAAK,CAAC;QACnC,CAAC;aAAM,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,E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AC;YACjE,IAAI,CAAC,cAAc,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;gBAAE,SAAS;YAE3D,IAAI,QAAQ,GAAG,CAAC,CAAC;YACjB,KAAK,MAAM,CAAC,IAAI,YAAY,EAAE,CAAC;gBAC7B,MAAM,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC;gBACpC,IAAI,GAAG,GAAG,QAAQ;oBAAE,QAAQ,GAAG,GAAG,CAAC;YACrC,CAAC;YAED,+EAA+E;YAC/E,MAAM,cAAc,GAAG,QAAQ,GAAG,QAAQ,CAAC;YAC3C,IAAI,cAAc,GAAG,IAAI,EAAE,CAAC;gBAC1B,QAAQ,CAAC,IAAI,CAAC;oBACZ,IAAI,EAAE,gCAAgC;oBACtC,QAAQ,EAAE,SAAS;oBACnB,OAAO,EACL,kCAAkC,QAAQ,qCAAqC,QAAQ,KAAK;wBAC5F,mBAAmB,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,yDAAyD;oBACxG,OAAO,EAAE,sBAAsB,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,iDAAiD;iBAC5G,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { LintContext, HyperframeLintFinding } from "../context";
|
|
2
|
-
export declare function isRegistrySourceFile(filePath?: string): boolean;
|
|
3
|
-
export declare function isRegistryInstalledFile(rawSource: string): boolean;
|
|
4
|
-
export declare const compositionRules: Array<(ctx: LintContext) => HyperframeLintFinding[]>;
|
|
5
|
-
//# sourceMappingURL=composition.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"composition.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/composition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAkB,MAAM,YAAY,CAAC;AAsBrF,wBAAgB,oBAAoB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAK/D;AAED,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAElE;AA+DD,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,CAAC,GAAG,EAAE,WAAW,KAAK,qBAAqB,EAAE,CAonBjF,CAAC"}
|