@hyperframes/core 0.9.103 → 0.9.104
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/compositionScoping.js +3 -3
- package/dist/compiler/svgIdNamespacing.js +2 -2
- package/dist/fonts/authoredGoogleFonts.js +2 -2
- package/dist/fonts/deterministicFonts.js +2 -2
- package/dist/generated/runtime-inline.js +1 -1
- package/dist/hyperframe.runtime.iife.js +69 -69
- package/dist/runtime/editing/canvasKeys.d.ts +0 -1
- package/dist/runtime/editing/canvasKeys.js +4 -28
- package/dist/runtime/editing/pausedFrames.js +7 -7
- package/dist/runtime/editing/stageAct.js +3 -2
- package/dist/runtime/editing/textEdit.js +4 -3
- package/dist/runtime/editing/watchGeometry.js +8 -8
- package/dist/runtime/editingPort.d.ts +4 -1
- package/dist/runtime/editingPort.js +18 -2
- package/dist/runtime/runtimePort.d.ts +21 -0
- package/dist/runtime/runtimePort.js +122 -0
- package/dist/studioPreviewMark.d.ts +1 -0
- package/dist/studioPreviewMark.js +1 -0
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getSvgSelectorAliasesScript } from "../generated/svg-selector-aliases-inline.js";
|
|
2
|
-
import
|
|
2
|
+
import { parseCss as parseProjectCss } from "@hyperframes/parsers/postcss";
|
|
3
3
|
import { escapeCssIdentifier, replaceSelectorIdTokens } from "./selectorIdTokens.js";
|
|
4
4
|
import { SCENE_PARTS_META } from "../sceneParts.js";
|
|
5
5
|
const AUTHORED_ROOT_ID_ATTR = "data-hf-authored-id";
|
|
@@ -169,7 +169,7 @@ function scopedSelectorsBound(selectors, scope, authoredRootId) {
|
|
|
169
169
|
}
|
|
170
170
|
function parseCss(css) {
|
|
171
171
|
try {
|
|
172
|
-
return
|
|
172
|
+
return parseProjectCss(css);
|
|
173
173
|
}
|
|
174
174
|
catch {
|
|
175
175
|
return null;
|
|
@@ -287,7 +287,7 @@ function dropFontFaces(styleTexts, hoisted) {
|
|
|
287
287
|
return css;
|
|
288
288
|
let root;
|
|
289
289
|
try {
|
|
290
|
-
root =
|
|
290
|
+
root = parseProjectCss(css);
|
|
291
291
|
}
|
|
292
292
|
catch {
|
|
293
293
|
return css; // unparseable text ships as authored and takes no part
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* data-hf-authored-id for script lookup compatibility.
|
|
7
7
|
*/
|
|
8
8
|
import { replaceMatches, urlHashRefMatches } from "@hyperframes/parsers/css-url-scans";
|
|
9
|
-
import
|
|
9
|
+
import { parseCss } from "@hyperframes/parsers/postcss";
|
|
10
10
|
import { fnv1a32 } from "../canary.js";
|
|
11
11
|
import { escapeCssIdentifier, selectorIdTokens } from "./selectorIdTokens.js";
|
|
12
12
|
import { SVG_REFERENCE_ALIASES_ATTR, readSvgReferenceAliases, recordedSvgIds, rewriteSvgSelectors, } from "./svgSelectorAliases.js";
|
|
@@ -422,7 +422,7 @@ export function rewriteSvgIdReferencesInCss(css, idMap, references = [], charge)
|
|
|
422
422
|
return css;
|
|
423
423
|
let root;
|
|
424
424
|
try {
|
|
425
|
-
root =
|
|
425
|
+
root = parseCss(css);
|
|
426
426
|
}
|
|
427
427
|
catch {
|
|
428
428
|
// Unparseable CSS is the caller's problem to report; leaving it untouched
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { readPage } from "./pageTree.js";
|
|
2
|
-
import
|
|
2
|
+
import { parseCss } from "@hyperframes/parsers/postcss";
|
|
3
3
|
function screenStylesheet(media) {
|
|
4
4
|
return !media?.trim() || media.split(",").some((query) => /^(all|screen)$/i.test(query.trim()));
|
|
5
5
|
}
|
|
@@ -24,7 +24,7 @@ function importUrls(css) {
|
|
|
24
24
|
return [];
|
|
25
25
|
let root;
|
|
26
26
|
try {
|
|
27
|
-
root =
|
|
27
|
+
root = parseCss(css);
|
|
28
28
|
}
|
|
29
29
|
catch {
|
|
30
30
|
return [];
|
|
@@ -7,7 +7,7 @@ import { FONT_ALIAS_MAP, resolveAliasDisplayName } from "./aliases.js";
|
|
|
7
7
|
import { extractSfntFace } from "./sfntNames.js";
|
|
8
8
|
import { locateSystemFontVariants, SYSTEM_FONT_SIZE_LIMIT } from "./systemFontLocator.js";
|
|
9
9
|
import { forgetPage, readPage, takePage } from "./pageTree.js";
|
|
10
|
-
import
|
|
10
|
+
import { parseCss } from "@hyperframes/parsers/postcss";
|
|
11
11
|
import { EMBEDDED_FONT_DATA } from "./fontData.generated.js";
|
|
12
12
|
import { fontToDataUri } from "./fontCompression.js";
|
|
13
13
|
import { authoredGoogleFontStylesheets, withPageText } from "./authoredGoogleFonts.js";
|
|
@@ -112,7 +112,7 @@ function systemPrimaryReplacement(value, deterministicPrimary, customProperties)
|
|
|
112
112
|
}
|
|
113
113
|
function parseCssRoot(css) {
|
|
114
114
|
try {
|
|
115
|
-
return
|
|
115
|
+
return parseCss(css);
|
|
116
116
|
}
|
|
117
117
|
catch {
|
|
118
118
|
return null;
|