@hyperframes/parsers 0.8.43 → 0.8.44
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/index.d.ts +5 -14
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -136,23 +136,14 @@ declare function unrollComputedTimeline(script: string): string;
|
|
|
136
136
|
declare function queryByAttr(root: ParentNode, attr: string, value: string, tag?: string): Element | null;
|
|
137
137
|
|
|
138
138
|
/**
|
|
139
|
-
* Where a scaffolded project's canvas resolution lives besides the
|
|
140
|
-
*
|
|
141
|
-
* height }` CSS block and the `<meta name="viewport">` `content` attribute.
|
|
142
|
-
* `@hyperframes/cli`'s `applyResolutionPreset` rewrites those same two places
|
|
143
|
-
* when a project scaffolds with `--resolution`, but keeps its own
|
|
144
|
-
* prefix-capturing regexes for that replace — these are a separate read-only
|
|
145
|
-
* definition of the same locations, not the literal patterns it uses.
|
|
146
|
-
*
|
|
147
|
-
* Lives in `@hyperframes/parsers` rather than `@hyperframes/cli` because
|
|
148
|
-
* `@hyperframes/lint` cannot depend on `cli` (`cli` depends on `lint`, not the
|
|
149
|
-
* reverse), and `parsers` is a dependency both already share.
|
|
139
|
+
* Where a scaffolded project's canvas resolution lives besides the root's own
|
|
140
|
+
* data-width/data-height: the html/body CSS size and the meta viewport content.
|
|
150
141
|
*/
|
|
151
|
-
/**
|
|
142
|
+
/** html/body CSS, width first. Groups 1/3 are the surrounding text, 2/4 the digits. */
|
|
152
143
|
declare const HTML_BODY_CSS_WIDTH_FIRST_RE: RegExp;
|
|
153
|
-
/**
|
|
144
|
+
/** Same block, height authored first. */
|
|
154
145
|
declare const HTML_BODY_CSS_HEIGHT_FIRST_RE: RegExp;
|
|
155
|
-
/**
|
|
146
|
+
/** Viewport meta content. Shared by lint (reads groups 2/4) and cli (replaces via 1/3). */
|
|
156
147
|
declare const VIEWPORT_META_SIZE_RE: RegExp;
|
|
157
148
|
|
|
158
149
|
interface MediaSrcMutation {
|
package/dist/index.js
CHANGED
|
@@ -3522,9 +3522,9 @@ function unrollComputedTimeline(script) {
|
|
|
3522
3522
|
}
|
|
3523
3523
|
|
|
3524
3524
|
// src/canvasScaffoldPatterns.ts
|
|
3525
|
-
var HTML_BODY_CSS_WIDTH_FIRST_RE = /html\s*,\s*body\s*\{[^}]*?width:\s*(\d+)px[^}]*?height:\s*(\d+)px/i;
|
|
3526
|
-
var HTML_BODY_CSS_HEIGHT_FIRST_RE = /html\s*,\s*body\s*\{[^}]*?height:\s*(\d+)px[^}]*?width:\s*(\d+)px/i;
|
|
3527
|
-
var VIEWPORT_META_SIZE_RE =
|
|
3525
|
+
var HTML_BODY_CSS_WIDTH_FIRST_RE = /(html\s*,\s*body\s*\{[^}]*?width:\s*)(\d+)px([^}]*?height:\s*)(\d+)px/i;
|
|
3526
|
+
var HTML_BODY_CSS_HEIGHT_FIRST_RE = /(html\s*,\s*body\s*\{[^}]*?height:\s*)(\d+)px([^}]*?width:\s*)(\d+)px/i;
|
|
3527
|
+
var VIEWPORT_META_SIZE_RE = /(<meta[^>]*name=["']viewport["'][^>]*content=["']width=)(\d+)(,\s*height=)(\d+)/i;
|
|
3528
3528
|
|
|
3529
3529
|
// src/utils/urlPath.ts
|
|
3530
3530
|
function decodeUrlPathVariants(path) {
|