@hyperframes/inspector 0.8.208 → 0.8.210
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/service.js +10 -20
- package/dist/types/core/src/compiler/compositionScoping.d.ts +2 -0
- package/dist/types/core/src/compiler/htmlDocument.d.ts +4 -0
- package/dist/types/core/src/runtime/applyVariableBindings.d.ts +6 -4
- package/dist/types/core/src/runtime/variableScope.d.ts +2 -0
- package/package.json +3 -3
|
@@ -36,4 +36,6 @@ export declare function wrapInlineScriptWithErrorBoundary(source: string, errorL
|
|
|
36
36
|
* table goes through `jsonScriptLiteral` — see there for why.
|
|
37
37
|
*/
|
|
38
38
|
export declare function buildVariablesByCompScript(variablesByComp: Record<string, Record<string, unknown>>): string | null;
|
|
39
|
+
/** Writes the table in <head>, so it exists before the composition scripts, which wait for web fonts. */
|
|
40
|
+
export declare function emitVariablesByCompScript(document: Document, variablesByComp: Record<string, Record<string, unknown>>): void;
|
|
39
41
|
export {};
|
|
@@ -9,6 +9,10 @@ export declare function parseHTMLContent(html: string): Document;
|
|
|
9
9
|
export declare function stripEmbeddedRuntimeScripts(html: string): string;
|
|
10
10
|
export declare function isRuntimeFileUrl(src: string | null | undefined): boolean;
|
|
11
11
|
export declare function escapeInlineScriptSource(source: string): string;
|
|
12
|
+
export declare function mapStartTagsAndStyles(html: string, map: {
|
|
13
|
+
tag: (tag: string) => string;
|
|
14
|
+
style: (css: string) => string;
|
|
15
|
+
}): string;
|
|
12
16
|
export declare function findStartTags(html: string, name: string): number[];
|
|
13
17
|
export declare function hasCompositionOutsideTemplates(html: string): boolean;
|
|
14
18
|
/** Insert markup before the document's own `</head>`, `</body>` or `</template>`; null if it has none. */
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
* chain the color-grading runtime uses: `__hfVariablesByComp[compId]` for
|
|
22
22
|
* inlined sub-compositions, then the top-level merged `getVariables()`.
|
|
23
23
|
*
|
|
24
|
-
*
|
|
25
|
-
* external / template sub-compositions (their
|
|
26
|
-
* values don't exist at init). Idempotent:
|
|
27
|
-
* values.
|
|
24
|
+
* Text is bound before composition scripts run; all of it at init and after
|
|
25
|
+
* the composition loader inlines external / template sub-compositions (their
|
|
26
|
+
* DOM and per-instance scoped values don't exist at init). Idempotent:
|
|
27
|
+
* re-applying writes the same values.
|
|
28
28
|
*/
|
|
29
29
|
/**
|
|
30
30
|
* Strip characters that could smuggle additional declarations or markup out of
|
|
@@ -45,3 +45,5 @@ export declare function sanitizeCssValue(value: string): string;
|
|
|
45
45
|
export declare function unproxiedMediaSrc(el: Element): string | null;
|
|
46
46
|
/** Applies the bindings in `doc`, or only those inside `within` and `within` itself. */
|
|
47
47
|
export declare function applyVariableBindings(doc: Document, within?: Element): void;
|
|
48
|
+
/** Binds only text, in `doc` or inside `within`: what composition scripts read before they run. */
|
|
49
|
+
export declare function applyTextBindings(doc: Document, within?: Element): void;
|
|
@@ -5,4 +5,6 @@
|
|
|
5
5
|
* runtime consumer of variables (color grading, declarative bindings) so the
|
|
6
6
|
* scope chain can never diverge between channels.
|
|
7
7
|
*/
|
|
8
|
+
/** The per-instance values of the inlined sub-composition an element belongs to, if any. */
|
|
9
|
+
export declare function scopedVariablesFor(element: Element): Record<string, unknown> | undefined;
|
|
8
10
|
export declare function readVariablesForElement(element: Element): Record<string, unknown>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/inspector",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.210",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/heygen-com/hyperframes",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"htmlparser2": "^10.1.0",
|
|
44
44
|
"postcss": "^8.5.8",
|
|
45
45
|
"puppeteer-core": "^25.8.0",
|
|
46
|
-
"@hyperframes/
|
|
47
|
-
"@hyperframes/
|
|
46
|
+
"@hyperframes/parsers": "0.8.210",
|
|
47
|
+
"@hyperframes/core": "0.8.210"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/node": "^25.0.10",
|