@hyperframes/core 0.6.119 → 0.6.121
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/adapters/index.js +1 -1
- package/dist/compiler/htmlBundler.js +9 -9
- package/dist/compiler/htmlCompiler.js +1 -1
- package/dist/compiler/index.js +9 -9
- package/dist/compiler/inlineSubCompositions.js +3 -3
- package/dist/compiler/staticGuard.js +1 -1
- package/dist/generators/hyperframes.js +3 -3
- package/dist/index.js +24 -24
- package/dist/inline-scripts/hyperframe.js +2 -2
- package/dist/lint/context.js +1 -1
- package/dist/lint/hyperframeLinter.js +11 -11
- package/dist/lint/index.js +1 -1
- package/dist/lint/rules/adapters.js +1 -1
- package/dist/lint/rules/composition.js +2 -2
- package/dist/lint/rules/core.js +1 -1
- package/dist/lint/rules/fonts.js +2 -2
- package/dist/lint/rules/gsap.js +1 -1
- package/dist/lint/rules/media.js +1 -1
- package/dist/lint/rules/slideshow.js +3 -3
- package/dist/lint/rules/textures.js +1 -1
- package/dist/parsers/gsapParser.js +5 -5
- package/dist/parsers/gsapSerialize.js +1 -1
- package/dist/parsers/htmlParser.js +2 -2
- package/dist/slideshow/index.js +2 -2
- package/dist/studio-api/helpers/sourceMutation.js +1 -1
- package/dist/studio-api/routes/fonts.js +1 -1
- package/dist/templates/base.js +1 -1
- package/package.json +2 -2
package/dist/adapters/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createGSAPFrameAdapter } from "./gsap";
|
|
1
|
+
export { createGSAPFrameAdapter } from "./gsap.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,17 +2,17 @@ import { readFileSync, existsSync } from "fs";
|
|
|
2
2
|
import { join, resolve, relative, dirname, isAbsolute, sep } from "path";
|
|
3
3
|
import { CSS_URL_RE, isNonRelativeUrl } from "./assetPaths.js";
|
|
4
4
|
import { transformSync } from "esbuild";
|
|
5
|
-
import { compileHtml } from "./htmlCompiler";
|
|
6
|
-
import { RUNTIME_BOOTSTRAP_ATTR, parseHTMLContent, stripEmbeddedRuntimeScripts, } from "./htmlDocument";
|
|
5
|
+
import { compileHtml } from "./htmlCompiler.js";
|
|
6
|
+
import { RUNTIME_BOOTSTRAP_ATTR, parseHTMLContent, stripEmbeddedRuntimeScripts, } from "./htmlDocument.js";
|
|
7
7
|
// rewriteSubCompPaths functions are used by inlineSubCompositions (shared module)
|
|
8
|
-
import { scopeCssToComposition, wrapInlineScriptWithErrorBoundary, wrapScopedCompositionScript, } from "./compositionScoping";
|
|
9
|
-
import { validateHyperframeHtmlContract } from "./staticGuard";
|
|
10
|
-
import { getHyperframeRuntimeScript } from "../generated/runtime-inline";
|
|
11
|
-
import { readDeclaredDefaults } from "../runtime/getVariables";
|
|
12
|
-
import { inlineSubCompositions } from "./inlineSubCompositions";
|
|
13
|
-
import { queryByAttr } from "../utils/cssSelector";
|
|
8
|
+
import { scopeCssToComposition, wrapInlineScriptWithErrorBoundary, wrapScopedCompositionScript, } from "./compositionScoping.js";
|
|
9
|
+
import { validateHyperframeHtmlContract } from "./staticGuard.js";
|
|
10
|
+
import { getHyperframeRuntimeScript } from "../generated/runtime-inline.js";
|
|
11
|
+
import { readDeclaredDefaults } from "../runtime/getVariables.js";
|
|
12
|
+
import { inlineSubCompositions } from "./inlineSubCompositions.js";
|
|
13
|
+
import { queryByAttr } from "../utils/cssSelector.js";
|
|
14
14
|
import { isSafePath, resolveWithinProject } from "../safePath.js";
|
|
15
|
-
import { HF_COLOR_GRADING_ATTR } from "../colorGrading";
|
|
15
|
+
import { HF_COLOR_GRADING_ATTR } from "../colorGrading.js";
|
|
16
16
|
const DEFAULT_RUNTIME_SCRIPT_URL = "";
|
|
17
17
|
function getRuntimeScriptUrl() {
|
|
18
18
|
const configured = (process.env.HYPERFRAME_RUNTIME_URL || "").trim();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolve } from "path";
|
|
2
|
-
import { compileTimingAttrs, injectDurations, extractResolvedMedia, clampDurations, shouldClampMediaDuration, } from "./timingCompiler";
|
|
2
|
+
import { compileTimingAttrs, injectDurations, extractResolvedMedia, clampDurations, shouldClampMediaDuration, } from "./timingCompiler.js";
|
|
3
3
|
function resolveMediaSrc(src, projectDir) {
|
|
4
4
|
return src.startsWith("http://") || src.startsWith("https://") ? src : resolve(projectDir, src);
|
|
5
5
|
}
|
package/dist/compiler/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
// Timing resolver — shared pure resolver for word-anchored elastic timing (WS-C).
|
|
2
2
|
// Consumed by both preview (sdk) and render (timingCompiler) paths.
|
|
3
|
-
export { resolveTimings, } from "./timingResolver";
|
|
3
|
+
export { resolveTimings, } from "./timingResolver.js";
|
|
4
4
|
// Timing compiler (browser-safe)
|
|
5
|
-
export { compileTimingAttrs, injectDurations, extractResolvedMedia, clampDurations, shouldClampMediaDuration, } from "./timingCompiler";
|
|
5
|
+
export { compileTimingAttrs, injectDurations, extractResolvedMedia, clampDurations, shouldClampMediaDuration, } from "./timingCompiler.js";
|
|
6
6
|
// HTML compiler (Node.js — requires fs)
|
|
7
|
-
export { compileHtml } from "./htmlCompiler";
|
|
7
|
+
export { compileHtml } from "./htmlCompiler.js";
|
|
8
8
|
// HTML bundler (Node.js — requires fs, linkedom, esbuild)
|
|
9
|
-
export { bundleToSingleHtml, prepareFlattenedInnerRoot, FLATTENED_INNER_ROOT_STRIP_ATTRS, } from "./htmlBundler";
|
|
10
|
-
export { RUNTIME_BOOTSTRAP_ATTR, injectScriptsAtHeadStart, injectScriptsIntoHtml, parseHTMLContent, stripEmbeddedRuntimeScripts, } from "./htmlDocument";
|
|
9
|
+
export { bundleToSingleHtml, prepareFlattenedInnerRoot, FLATTENED_INNER_ROOT_STRIP_ATTRS, } from "./htmlBundler.js";
|
|
10
|
+
export { RUNTIME_BOOTSTRAP_ATTR, injectScriptsAtHeadStart, injectScriptsIntoHtml, parseHTMLContent, stripEmbeddedRuntimeScripts, } from "./htmlDocument.js";
|
|
11
11
|
// Static guard
|
|
12
|
-
export { validateHyperframeHtmlContract, } from "./staticGuard";
|
|
12
|
+
export { validateHyperframeHtmlContract, } from "./staticGuard.js";
|
|
13
13
|
// Composition isolation helpers
|
|
14
|
-
export { scopeCssToComposition, wrapScopedCompositionScript } from "./compositionScoping";
|
|
14
|
+
export { scopeCssToComposition, wrapScopedCompositionScript } from "./compositionScoping.js";
|
|
15
15
|
// Sub-composition inlining (shared between bundler and producer)
|
|
16
|
-
export { inlineSubCompositions, } from "./inlineSubCompositions";
|
|
16
|
+
export { inlineSubCompositions, } from "./inlineSubCompositions.js";
|
|
17
17
|
// Asset-path primitives (shared across core, producer, CLI)
|
|
18
|
-
export { CSS_URL_RE, PATH_ATTRS, isNonRelativeUrl, isPathInside } from "./assetPaths";
|
|
18
|
+
export { CSS_URL_RE, PATH_ATTRS, isNonRelativeUrl, isPathInside } from "./assetPaths.js";
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* divergence that previously caused bugs (e.g. producer not setting
|
|
8
8
|
* `data-composition-file`).
|
|
9
9
|
*/
|
|
10
|
-
import { rewriteAssetPaths, rewriteCssAssetUrls, rewriteInlineStyleAssetUrls, } from "./rewriteSubCompPaths";
|
|
11
|
-
import { queryByAttr } from "../utils/cssSelector";
|
|
12
|
-
import { scopeCssToComposition, wrapInlineScriptWithErrorBoundary, wrapScopedCompositionScript, } from "./compositionScoping";
|
|
10
|
+
import { rewriteAssetPaths, rewriteCssAssetUrls, rewriteInlineStyleAssetUrls, } from "./rewriteSubCompPaths.js";
|
|
11
|
+
import { queryByAttr } from "../utils/cssSelector.js";
|
|
12
|
+
import { scopeCssToComposition, wrapInlineScriptWithErrorBoundary, wrapScopedCompositionScript, } from "./compositionScoping.js";
|
|
13
13
|
// ---------------------------------------------------------------------------
|
|
14
14
|
// Default helpers
|
|
15
15
|
// ---------------------------------------------------------------------------
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { lintHyperframeHtml } from "../lint/hyperframeLinter";
|
|
1
|
+
import { lintHyperframeHtml } from "../lint/hyperframeLinter.js";
|
|
2
2
|
export async function validateHyperframeHtmlContract(html) {
|
|
3
3
|
const result = await lintHyperframeHtml(html);
|
|
4
4
|
const missingKeys = result.findings
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CANVAS_DIMENSIONS, isTextElement, isMediaElement, isCompositionElement, } from "../core.types";
|
|
2
|
-
import { serializeGsapAnimations, keyframesToGsapAnimations } from "../parsers/gsapSerialize";
|
|
3
|
-
import { GSAP_CDN, BASE_STYLES, ZOOM_CONTAINER_STYLES } from "../templates/constants";
|
|
1
|
+
import { CANVAS_DIMENSIONS, isTextElement, isMediaElement, isCompositionElement, } from "../core.types.js";
|
|
2
|
+
import { serializeGsapAnimations, keyframesToGsapAnimations } from "../parsers/gsapSerialize.js";
|
|
3
|
+
import { GSAP_CDN, BASE_STYLES, ZOOM_CONTAINER_STYLES } from "../templates/constants.js";
|
|
4
4
|
const GOOGLE_FONTS_BASE = "https://fonts.googleapis.com/css2";
|
|
5
5
|
const FONT_WEIGHTS = {
|
|
6
6
|
Inter: "400;500;600;700;800;900",
|
package/dist/index.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
export { parseSlideshowManifest, resolveSlideshow } from "./slideshow/parseSlideshow";
|
|
2
|
-
export { CANVAS_DIMENSIONS, VALID_CANVAS_RESOLUTIONS, normalizeResolutionFlag, parseFps, parseFpsWithDefault, toFps, fpsToNumber, fpsToFfmpegArg, TIMELINE_COLORS, DEFAULT_DURATIONS, COMPOSITION_VARIABLE_TYPES, isTextElement, isMediaElement, isCompositionElement, getDefaultStageZoom, } from "./core.types";
|
|
1
|
+
export { parseSlideshowManifest, resolveSlideshow } from "./slideshow/parseSlideshow.js";
|
|
2
|
+
export { CANVAS_DIMENSIONS, VALID_CANVAS_RESOLUTIONS, normalizeResolutionFlag, parseFps, parseFpsWithDefault, toFps, fpsToNumber, fpsToFfmpegArg, TIMELINE_COLORS, DEFAULT_DURATIONS, COMPOSITION_VARIABLE_TYPES, isTextElement, isMediaElement, isCompositionElement, getDefaultStageZoom, } from "./core.types.js";
|
|
3
3
|
// Templates
|
|
4
|
-
export { generateBaseHtml, getStageStyles } from "./templates/base";
|
|
5
|
-
export { GSAP_CDN, BASE_STYLES, ELEMENT_BASE_STYLES, MEDIA_STYLES, TEXT_STYLES, ZOOM_CONTAINER_STYLES, } from "./templates/constants";
|
|
6
|
-
export { serializeGsapAnimations, getAnimationsForElementId, validateCompositionGsap, keyframesToGsapAnimations, gsapAnimationsToKeyframes, } from "./parsers/gsapSerialize";
|
|
7
|
-
export { parseHtml, updateElementInHtml, addElementToHtml, removeElementFromHtml, validateCompositionHtml, extractCompositionMetadata, } from "./parsers/htmlParser";
|
|
8
|
-
export { generateHyperframesHtml, generateGsapTimelineScript, generateHyperframesStyles, } from "./generators/hyperframes";
|
|
9
|
-
export { resolveTimings } from "./compiler/timingResolver";
|
|
10
|
-
export { compileTimingAttrs, injectDurations, extractResolvedMedia, clampDurations, shouldClampMediaDuration, } from "./compiler/timingCompiler";
|
|
11
|
-
export { lintHyperframeHtml } from "./lint/hyperframeLinter";
|
|
12
|
-
export { rewriteAssetPaths, rewriteAssetPath, rewriteCssAssetUrls, } from "./compiler/rewriteSubCompPaths";
|
|
13
|
-
export { CSS_URL_RE, isNonRelativeUrl, isPathInside } from "./compiler/assetPaths";
|
|
14
|
-
export { queryByAttr } from "./utils/cssSelector";
|
|
15
|
-
export { decodeUrlPathVariants } from "./utils/urlPath";
|
|
16
|
-
export { parseAnimatedGifMetadata } from "./media/gif";
|
|
17
|
-
export { HF_COLOR_GRADING_ATTR, HF_COLOR_GRADING_ADJUST_KEYS, HF_COLOR_GRADING_COLOR_SPACE, HF_COLOR_GRADING_PRESETS, isHfColorGradingActive, normalizeHfColorGrading, normalizeHfColorGradingWithVariables, resolveHfColorGradingVariables, serializeHfColorGrading, } from "./colorGrading";
|
|
4
|
+
export { generateBaseHtml, getStageStyles } from "./templates/base.js";
|
|
5
|
+
export { GSAP_CDN, BASE_STYLES, ELEMENT_BASE_STYLES, MEDIA_STYLES, TEXT_STYLES, ZOOM_CONTAINER_STYLES, } from "./templates/constants.js";
|
|
6
|
+
export { serializeGsapAnimations, getAnimationsForElementId, validateCompositionGsap, keyframesToGsapAnimations, gsapAnimationsToKeyframes, } from "./parsers/gsapSerialize.js";
|
|
7
|
+
export { parseHtml, updateElementInHtml, addElementToHtml, removeElementFromHtml, validateCompositionHtml, extractCompositionMetadata, } from "./parsers/htmlParser.js";
|
|
8
|
+
export { generateHyperframesHtml, generateGsapTimelineScript, generateHyperframesStyles, } from "./generators/hyperframes.js";
|
|
9
|
+
export { resolveTimings } from "./compiler/timingResolver.js";
|
|
10
|
+
export { compileTimingAttrs, injectDurations, extractResolvedMedia, clampDurations, shouldClampMediaDuration, } from "./compiler/timingCompiler.js";
|
|
11
|
+
export { lintHyperframeHtml } from "./lint/hyperframeLinter.js";
|
|
12
|
+
export { rewriteAssetPaths, rewriteAssetPath, rewriteCssAssetUrls, } from "./compiler/rewriteSubCompPaths.js";
|
|
13
|
+
export { CSS_URL_RE, isNonRelativeUrl, isPathInside } from "./compiler/assetPaths.js";
|
|
14
|
+
export { queryByAttr } from "./utils/cssSelector.js";
|
|
15
|
+
export { decodeUrlPathVariants } from "./utils/urlPath.js";
|
|
16
|
+
export { parseAnimatedGifMetadata } from "./media/gif.js";
|
|
17
|
+
export { HF_COLOR_GRADING_ATTR, HF_COLOR_GRADING_ADJUST_KEYS, HF_COLOR_GRADING_COLOR_SPACE, HF_COLOR_GRADING_PRESETS, isHfColorGradingActive, normalizeHfColorGrading, normalizeHfColorGradingWithVariables, resolveHfColorGradingVariables, serializeHfColorGrading, } from "./colorGrading.js";
|
|
18
18
|
// Inline scripts
|
|
19
|
-
export { HYPERFRAME_RUNTIME_ARTIFACTS, HYPERFRAME_RUNTIME_CONTRACT, loadHyperframeRuntimeSource, } from "./inline-scripts/hyperframe";
|
|
20
|
-
export { HYPERFRAME_RUNTIME_GLOBALS, HYPERFRAME_BRIDGE_SOURCES, HYPERFRAME_CONTROL_ACTIONS, } from "./inline-scripts/runtimeContract";
|
|
21
|
-
export { getHyperframeRuntimeScript } from "./generated/runtime-inline";
|
|
22
|
-
export { buildHyperframesRuntimeScript, } from "./inline-scripts/hyperframesRuntime.engine";
|
|
23
|
-
export { MEDIA_VISUAL_STYLE_PROPERTIES, copyMediaVisualStyles, quantizeTimeToFrame, } from "./inline-scripts/parityContract";
|
|
24
|
-
export { redactTelemetryString } from "./telemetryRedaction";
|
|
25
|
-
export { isSafePath, resolveWithinProject } from "./safePath";
|
|
26
|
-
export { createGSAPFrameAdapter } from "./adapters/gsap";
|
|
19
|
+
export { HYPERFRAME_RUNTIME_ARTIFACTS, HYPERFRAME_RUNTIME_CONTRACT, loadHyperframeRuntimeSource, } from "./inline-scripts/hyperframe.js";
|
|
20
|
+
export { HYPERFRAME_RUNTIME_GLOBALS, HYPERFRAME_BRIDGE_SOURCES, HYPERFRAME_CONTROL_ACTIONS, } from "./inline-scripts/runtimeContract.js";
|
|
21
|
+
export { getHyperframeRuntimeScript } from "./generated/runtime-inline.js";
|
|
22
|
+
export { buildHyperframesRuntimeScript, } from "./inline-scripts/hyperframesRuntime.engine.js";
|
|
23
|
+
export { MEDIA_VISUAL_STYLE_PROPERTIES, copyMediaVisualStyles, quantizeTimeToFrame, } from "./inline-scripts/parityContract.js";
|
|
24
|
+
export { redactTelemetryString } from "./telemetryRedaction.js";
|
|
25
|
+
export { isSafePath, resolveWithinProject } from "./safePath.js";
|
|
26
|
+
export { createGSAPFrameAdapter } from "./adapters/gsap.js";
|
|
27
27
|
// Text measurement
|
|
28
28
|
export { fitTextFontSize } from "./text/index.js";
|
|
29
29
|
// Runtime helpers (composition-side)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { buildHyperframesRuntimeScript } from "./hyperframesRuntime.engine";
|
|
2
|
-
import { HYPERFRAME_BRIDGE_SOURCES, HYPERFRAME_RUNTIME_GLOBALS } from "./runtimeContract";
|
|
1
|
+
import { buildHyperframesRuntimeScript } from "./hyperframesRuntime.engine.js";
|
|
2
|
+
import { HYPERFRAME_BRIDGE_SOURCES, HYPERFRAME_RUNTIME_GLOBALS } from "./runtimeContract.js";
|
|
3
3
|
export const HYPERFRAME_RUNTIME_ARTIFACTS = {
|
|
4
4
|
iife: "hyperframe.runtime.iife.js",
|
|
5
5
|
esm: "hyperframe.runtime.mjs",
|
package/dist/lint/context.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { extractBlocks, extractOpenTags, findRootTag, collectCompositionIds, readAttr, STYLE_BLOCK_PATTERN, SCRIPT_BLOCK_PATTERN, } from "./utils";
|
|
1
|
+
import { extractBlocks, extractOpenTags, findRootTag, collectCompositionIds, readAttr, STYLE_BLOCK_PATTERN, SCRIPT_BLOCK_PATTERN, } from "./utils.js";
|
|
2
2
|
export function buildLintContext(html, options = {}) {
|
|
3
3
|
const rawSource = html || "";
|
|
4
4
|
let source = rawSource;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { buildLintContext } from "./context";
|
|
2
|
-
import { readAttr, truncateSnippet } from "./utils";
|
|
3
|
-
import { coreRules } from "./rules/core";
|
|
4
|
-
import { mediaRules } from "./rules/media";
|
|
5
|
-
import { gsapRules } from "./rules/gsap";
|
|
6
|
-
import { captionRules } from "./rules/captions";
|
|
7
|
-
import { compositionRules } from "./rules/composition";
|
|
8
|
-
import { adapterRules } from "./rules/adapters";
|
|
9
|
-
import { textureRules } from "./rules/textures";
|
|
10
|
-
import { fontRules } from "./rules/fonts";
|
|
11
|
-
import { slideshowRules } from "./rules/slideshow";
|
|
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
12
|
const ALL_RULES = [
|
|
13
13
|
...coreRules,
|
|
14
14
|
...mediaRules,
|
package/dist/lint/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { lintHyperframeHtml, lintMediaUrls } from "./hyperframeLinter";
|
|
1
|
+
export { lintHyperframeHtml, lintMediaUrls } from "./hyperframeLinter.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { findHtmlTag, readAttr, readJsonAttr, stripJsComments, truncateSnippet } from "../utils";
|
|
2
|
-
import { COMPOSITION_VARIABLE_TYPES } from "../../core.types";
|
|
1
|
+
import { findHtmlTag, readAttr, readJsonAttr, stripJsComments, truncateSnippet } from "../utils.js";
|
|
2
|
+
import { COMPOSITION_VARIABLE_TYPES } from "../../core.types.js";
|
|
3
3
|
// Agent guidance thresholds: warning-only nudges for files/tracks that become hard
|
|
4
4
|
// to inspect and revise reliably in a single composition.
|
|
5
5
|
const MAX_COMPOSITION_LINES = 300;
|
package/dist/lint/rules/core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import postcss from "postcss";
|
|
2
|
-
import { readAttr, truncateSnippet, stripJsComments, extractCompositionIdsFromCss, extractTimelineRegistryKeys, getInlineScriptSyntaxError, TIMELINE_REGISTRY_INIT_PATTERN, TIMELINE_REGISTRY_ASSIGN_PATTERN, INVALID_SCRIPT_CLOSE_PATTERN, } from "../utils";
|
|
2
|
+
import { readAttr, truncateSnippet, stripJsComments, extractCompositionIdsFromCss, extractTimelineRegistryKeys, getInlineScriptSyntaxError, TIMELINE_REGISTRY_INIT_PATTERN, TIMELINE_REGISTRY_ASSIGN_PATTERN, INVALID_SCRIPT_CLOSE_PATTERN, } from "../utils.js";
|
|
3
3
|
function escapeRegExp(value) {
|
|
4
4
|
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
5
5
|
}
|
package/dist/lint/rules/fonts.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FONT_ALIAS_KEYS, resolveAliasDisplayName } from "../../fonts/aliases";
|
|
2
|
-
import { isRegistrySourceFile, isRegistryInstalledFile } from "./composition";
|
|
1
|
+
import { FONT_ALIAS_KEYS, resolveAliasDisplayName } from "../../fonts/aliases.js";
|
|
2
|
+
import { isRegistrySourceFile, isRegistryInstalledFile } from "./composition.js";
|
|
3
3
|
const GENERIC_FAMILIES = new Set([
|
|
4
4
|
"serif",
|
|
5
5
|
"sans-serif",
|
package/dist/lint/rules/gsap.js
CHANGED
|
@@ -6,7 +6,7 @@ async function loadParseGsapScript() {
|
|
|
6
6
|
const mod = await import("../../parsers/gsapParserAcorn.js");
|
|
7
7
|
return mod.parseGsapScriptAcorn;
|
|
8
8
|
}
|
|
9
|
-
import { readAttr, truncateSnippet, stripJsComments, WINDOW_TIMELINE_ASSIGN_PATTERN, TIMELINE_REGISTRY_ASSIGN_PATTERN, } from "../utils";
|
|
9
|
+
import { readAttr, truncateSnippet, stripJsComments, WINDOW_TIMELINE_ASSIGN_PATTERN, TIMELINE_REGISTRY_ASSIGN_PATTERN, } from "../utils.js";
|
|
10
10
|
const SCENE_BOUNDARY_EPSILON_SECONDS = 0.05;
|
|
11
11
|
// ── GSAP parsing utilities ─────────────────────────────────────────────────
|
|
12
12
|
function countClassUsage(tags) {
|
package/dist/lint/rules/media.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { readAttr } from "../utils";
|
|
2
|
-
import { parseSlideshowManifest, resolveSlideshow } from "../../slideshow/parseSlideshow";
|
|
3
|
-
import { isSceneLikeCompositionId } from "../../slideshow/sceneId";
|
|
1
|
+
import { readAttr } from "../utils.js";
|
|
2
|
+
import { parseSlideshowManifest, resolveSlideshow } from "../../slideshow/parseSlideshow.js";
|
|
3
|
+
import { isSceneLikeCompositionId } from "../../slideshow/sceneId.js";
|
|
4
4
|
function parseTiming(raw) {
|
|
5
5
|
const startStr = readAttr(raw, "data-start");
|
|
6
6
|
if (startStr === null)
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import * as recast from "recast";
|
|
12
12
|
import { parse as babelParse } from "@babel/parser";
|
|
13
|
-
import { serializeValue as valueToCode, safeJsKey as safeKey, resolveConversionProps, } from "./gsapSerialize";
|
|
14
|
-
export { serializeGsapAnimations, getAnimationsForElementId, validateCompositionGsap, keyframesToGsapAnimations, gsapAnimationsToKeyframes, SUPPORTED_PROPS, SUPPORTED_EASES, } from "./gsapSerialize";
|
|
15
|
-
export { PROPERTY_GROUPS, classifyPropertyGroup, classifyTweenPropertyGroup, } from "./gsapConstants";
|
|
16
|
-
import { classifyPropertyGroup, classifyTweenPropertyGroup } from "./gsapConstants";
|
|
17
|
-
export { generateSpringEaseData, SPRING_PRESETS } from "./springEase";
|
|
13
|
+
import { serializeValue as valueToCode, safeJsKey as safeKey, resolveConversionProps, } from "./gsapSerialize.js";
|
|
14
|
+
export { serializeGsapAnimations, getAnimationsForElementId, validateCompositionGsap, keyframesToGsapAnimations, gsapAnimationsToKeyframes, SUPPORTED_PROPS, SUPPORTED_EASES, } from "./gsapSerialize.js";
|
|
15
|
+
export { PROPERTY_GROUPS, classifyPropertyGroup, classifyTweenPropertyGroup, } from "./gsapConstants.js";
|
|
16
|
+
import { classifyPropertyGroup, classifyTweenPropertyGroup } from "./gsapConstants.js";
|
|
17
|
+
export { generateSpringEaseData, SPRING_PRESETS } from "./springEase.js";
|
|
18
18
|
const GSAP_METHODS = new Set(["set", "to", "from", "fromTo"]);
|
|
19
19
|
function parseScript(script) {
|
|
20
20
|
return recast.parse(script, {
|
|
@@ -42,7 +42,7 @@ export function buildArcPath(coords, curviness, autoRotate, isCubic) {
|
|
|
42
42
|
}
|
|
43
43
|
return { arcPath: { enabled: true, autoRotate, segments }, waypoints };
|
|
44
44
|
}
|
|
45
|
-
export { SUPPORTED_PROPS, SUPPORTED_EASES } from "./gsapConstants";
|
|
45
|
+
export { SUPPORTED_PROPS, SUPPORTED_EASES } from "./gsapConstants.js";
|
|
46
46
|
// ── Serialization ───────────────────────────────────────────────────────────
|
|
47
47
|
export function serializeGsapAnimations(animations, timelineVar = "tl", options) {
|
|
48
48
|
const sorted = [...animations].sort((a, b) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { validateCompositionGsap } from "./gsapSerialize";
|
|
1
|
+
import { validateCompositionGsap } from "./gsapSerialize.js";
|
|
2
2
|
import { ensureHfIds } from "./hfIds.js";
|
|
3
3
|
import { parseGsapScriptAcornForWrite } from "./gsapParserAcorn.js";
|
|
4
|
-
import { queryByAttr } from "../utils/cssSelector";
|
|
4
|
+
import { queryByAttr } from "../utils/cssSelector.js";
|
|
5
5
|
import { removeAnimationFromScript } from "./gsapWriterAcorn.js";
|
|
6
6
|
const MEDIA_TYPES = new Set(["video", "image", "audio"]);
|
|
7
7
|
function getElementType(el) {
|
package/dist/slideshow/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./slideshow.types";
|
|
2
|
-
export * from "./parseSlideshow";
|
|
1
|
+
export * from "./slideshow.types.js";
|
|
2
|
+
export * from "./parseSlideshow.js";
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { parseHTML } from "linkedom";
|
|
2
2
|
import postcss from "postcss";
|
|
3
3
|
import selectorParser from "postcss-selector-parser";
|
|
4
|
-
import { isAllowedHtmlAttribute, isSafeAttributeValue } from "../../utils/htmlAttrSafety";
|
|
4
|
+
import { isAllowedHtmlAttribute, isSafeAttributeValue } from "../../utils/htmlAttrSafety.js";
|
|
5
5
|
function parseSourceDocument(source) {
|
|
6
6
|
const hasDocumentShell = /<!doctype|<html[\s>]/i.test(source);
|
|
7
7
|
if (hasDocumentShell) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { closeSync, constants, fstatSync, openSync, readSync } from "node:fs";
|
|
2
|
-
import { collectFontFileEntries, fontDirectories, getSystemProfilerFamilies, locateSystemFont, SYSTEM_FONT_SIZE_LIMIT, } from "../../fonts/systemFontLocator";
|
|
2
|
+
import { collectFontFileEntries, fontDirectories, getSystemProfilerFamilies, locateSystemFont, SYSTEM_FONT_SIZE_LIMIT, } from "../../fonts/systemFontLocator.js";
|
|
3
3
|
const MAX_FONT_RESULTS = 2000;
|
|
4
4
|
const GOOGLE_FONTS_METADATA_URL = "https://fonts.google.com/metadata/fonts";
|
|
5
5
|
const GOOGLE_FONTS_FETCH_TIMEOUT_MS = 3000;
|
package/dist/templates/base.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/core",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.121",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
"linkedom": "^0.18.12"
|
|
171
171
|
},
|
|
172
172
|
"scripts": {
|
|
173
|
-
"build": "bun run build:hyperframes-runtime && tsc",
|
|
173
|
+
"build": "bun run build:hyperframes-runtime && tsc && tsx scripts/rewrite-esm-extensions.ts",
|
|
174
174
|
"test": "vitest run",
|
|
175
175
|
"test:watch": "vitest",
|
|
176
176
|
"test:coverage": "vitest run --coverage",
|