@hyperframes/core 0.7.105 → 0.7.107
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/htmlBundler.d.ts.map +1 -1
- package/dist/compiler/htmlBundler.js +8 -1
- package/dist/compiler/htmlBundler.js.map +1 -1
- package/dist/compiler/inlineSubCompositions.d.ts.map +1 -1
- package/dist/compiler/inlineSubCompositions.js +9 -0
- package/dist/compiler/inlineSubCompositions.js.map +1 -1
- package/dist/generated/runtime-inline.js +1 -1
- package/dist/generated/runtime-inline.js.map +1 -1
- package/dist/hyperframe.runtime.iife.js +24 -24
- package/dist/runtime/getVariables.d.ts +3 -0
- package/dist/runtime/getVariables.d.ts.map +1 -1
- package/dist/runtime/getVariables.js +114 -18
- package/dist/runtime/getVariables.js.map +1 -1
- package/dist/runtime/media.d.ts.map +1 -1
- package/dist/runtime/media.js +7 -1
- package/dist/runtime/media.js.map +1 -1
- package/dist/runtime/mediaVolumeEnvelope.d.ts +9 -2
- package/dist/runtime/mediaVolumeEnvelope.d.ts.map +1 -1
- package/dist/runtime/mediaVolumeEnvelope.js +13 -3
- package/dist/runtime/mediaVolumeEnvelope.js.map +1 -1
- package/dist/utils/richTextSanitize.d.ts +32 -0
- package/dist/utils/richTextSanitize.d.ts.map +1 -0
- package/dist/utils/richTextSanitize.js +227 -0
- package/dist/utils/richTextSanitize.js.map +1 -0
- package/package.json +8 -4
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What inline formatting a composition file is allowed to receive.
|
|
3
|
+
*
|
|
4
|
+
* Editing text in the Studio preview can style a run of characters, which means
|
|
5
|
+
* markup now travels from a contenteditable element into a file on disk. This
|
|
6
|
+
* module is the only thing deciding what may make that trip. The server write
|
|
7
|
+
* boundary applies it unconditionally before returning composition bytes.
|
|
8
|
+
*
|
|
9
|
+
* One module rather than two implementations. Two would drift, and the drift
|
|
10
|
+
* would be a security bug rather than an inconsistency.
|
|
11
|
+
*
|
|
12
|
+
* It works on an element's subtree in place. Untrusted markup must be parsed in
|
|
13
|
+
* an inert document before this function receives it.
|
|
14
|
+
*/
|
|
15
|
+
/** Tags an inline text edit may contain. Everything else is not text styling. */
|
|
16
|
+
const FORMATTING_TAGS = new Set(["SPAN", "B", "STRONG", "I", "EM", "U", "BR"]);
|
|
17
|
+
/**
|
|
18
|
+
* Style properties a formatting tag may carry.
|
|
19
|
+
*
|
|
20
|
+
* This was paint-only, on the reasoning that a property which moves or resizes
|
|
21
|
+
* text would let an edit inside one element change the composition's layout,
|
|
22
|
+
* and layout is the design panel's job. The reasoning was wrong about who was
|
|
23
|
+
* being restricted: the design panel writes exactly these typography
|
|
24
|
+
* properties onto exactly these spans, as its text layers. Sanitizing them
|
|
25
|
+
* away did not stop text from changing layout, it deleted the layout the user
|
|
26
|
+
* had already set — colouring one word silently dropped a sibling layer's font
|
|
27
|
+
* size. The line that matters is the one below, values that reach outside the
|
|
28
|
+
* stylesheet, not which of its own properties the editor is allowed to keep.
|
|
29
|
+
*/
|
|
30
|
+
const FORMATTING_STYLE_PROPS = new Set([
|
|
31
|
+
"color",
|
|
32
|
+
"background-color",
|
|
33
|
+
"font-weight",
|
|
34
|
+
"font-style",
|
|
35
|
+
"text-decoration-line",
|
|
36
|
+
"font-family",
|
|
37
|
+
"font-size",
|
|
38
|
+
"letter-spacing",
|
|
39
|
+
"line-height",
|
|
40
|
+
// Paints the glyph fill and inherits, so an ancestor that sets it wins over
|
|
41
|
+
// any `color` below. The editor mirrors a run's colour into it when that is
|
|
42
|
+
// happening, and stripping it here would put the colour back to invisible.
|
|
43
|
+
"-webkit-text-fill-color",
|
|
44
|
+
]);
|
|
45
|
+
// Keep this list limited to properties whose grammar cannot fetch a resource.
|
|
46
|
+
// Adding a URL-consuming property also requires decoding CSS escapes before
|
|
47
|
+
// UNSAFE_VALUE can be a sufficient guard.
|
|
48
|
+
/**
|
|
49
|
+
* Attributes a formatting tag may carry.
|
|
50
|
+
*
|
|
51
|
+
* The identity a text layer is tracked by. Everything else is dropped: a
|
|
52
|
+
* contenteditable is a paste target, and an event handler or an id that
|
|
53
|
+
* shadows a composition's own is not formatting.
|
|
54
|
+
*/
|
|
55
|
+
const FORMATTING_ATTRS = new Set(["data-hf-text-key", "data-hf-id"]);
|
|
56
|
+
/**
|
|
57
|
+
* What those attributes are allowed to look like: a bare token, nothing else.
|
|
58
|
+
* `:` is deliberate because text keys use selector-like tokens such as
|
|
59
|
+
* `child:1`; neither allowed attribute is interpreted as a URL.
|
|
60
|
+
*/
|
|
61
|
+
const SAFE_ATTR_VALUE = /^[A-Za-z0-9_:-]+$/;
|
|
62
|
+
/**
|
|
63
|
+
* Tags dropped whole rather than unwrapped.
|
|
64
|
+
*
|
|
65
|
+
* Everything else is unwrapped, so an unexpected tag costs the user its
|
|
66
|
+
* formatting and not their words. These are the ones whose contents are not
|
|
67
|
+
* words: unwrapping a script would turn its source into visible text.
|
|
68
|
+
*/
|
|
69
|
+
const OPAQUE_TAGS = new Set([
|
|
70
|
+
"SCRIPT",
|
|
71
|
+
"STYLE",
|
|
72
|
+
"TEMPLATE",
|
|
73
|
+
"NOSCRIPT",
|
|
74
|
+
"IFRAME",
|
|
75
|
+
"OBJECT",
|
|
76
|
+
"EMBED",
|
|
77
|
+
"SVG",
|
|
78
|
+
"MATH",
|
|
79
|
+
]);
|
|
80
|
+
/** Anything that reaches out of the stylesheet, in a property that should not. */
|
|
81
|
+
const UNSAFE_VALUE = /url\(|expression\(|javascript:|vbscript:|@import|<\//i;
|
|
82
|
+
const ELEMENT_NODE = 1;
|
|
83
|
+
const TEXT_NODE = 3;
|
|
84
|
+
export function isRichTextFormattingTag(tagName) {
|
|
85
|
+
return FORMATTING_TAGS.has(tagName.toUpperCase());
|
|
86
|
+
}
|
|
87
|
+
/** Whether an attribute survives the rich-text persistence boundary. */
|
|
88
|
+
export function isRichTextFormattingAttribute(name, value) {
|
|
89
|
+
return FORMATTING_ATTRS.has(name.toLowerCase()) && SAFE_ATTR_VALUE.test(value);
|
|
90
|
+
}
|
|
91
|
+
/** Whether a declaration survives the rich-text persistence boundary. */
|
|
92
|
+
export function isRichTextFormattingStyle(property, value) {
|
|
93
|
+
return (FORMATTING_STYLE_PROPS.has(property.toLowerCase()) &&
|
|
94
|
+
value.length > 0 &&
|
|
95
|
+
!UNSAFE_VALUE.test(value));
|
|
96
|
+
}
|
|
97
|
+
function isElementNode(node) {
|
|
98
|
+
return node.nodeType === ELEMENT_NODE;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Strip everything but allowed formatting from an element's contents, in place.
|
|
102
|
+
*
|
|
103
|
+
* The element itself is never touched, only what is inside it. Callers own the
|
|
104
|
+
* element, and it is the composition's, not the editor's, to rewrite.
|
|
105
|
+
*
|
|
106
|
+
* When the children came from untrusted markup, callers must parse that markup
|
|
107
|
+
* into an inert document (for example linkedom or a detached DOMParser document)
|
|
108
|
+
* first. Never assign untrusted HTML to a live DOM element and then call this
|
|
109
|
+
* function: active content can run before sanitization begins.
|
|
110
|
+
*/
|
|
111
|
+
export function sanitizeRichTextChildren(parent) {
|
|
112
|
+
const pending = Array.from(parent.childNodes, (node) => ({ phase: "visit", node })).reverse();
|
|
113
|
+
// Post-order without recursion: adversarially deep pasted markup must not
|
|
114
|
+
// exhaust either the server or browser call stack.
|
|
115
|
+
for (let frame = pending.pop(); frame; frame = pending.pop()) {
|
|
116
|
+
if (frame.phase === "sanitize") {
|
|
117
|
+
if (!FORMATTING_TAGS.has(frame.tag))
|
|
118
|
+
unwrap(frame.element);
|
|
119
|
+
else
|
|
120
|
+
stripAttributes(frame.element);
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
const child = frame.node;
|
|
124
|
+
if (child.nodeType === TEXT_NODE)
|
|
125
|
+
continue;
|
|
126
|
+
if (!isElementNode(child)) {
|
|
127
|
+
// Comments and processing instructions are neither words nor formatting.
|
|
128
|
+
child.parentNode?.removeChild(child);
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
const element = child;
|
|
132
|
+
const tag = element.tagName.toUpperCase();
|
|
133
|
+
if (OPAQUE_TAGS.has(tag)) {
|
|
134
|
+
element.parentNode?.removeChild(element);
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
pending.push({ phase: "sanitize", element, tag });
|
|
138
|
+
for (const descendant of Array.from(element.childNodes).reverse()) {
|
|
139
|
+
pending.push({ phase: "visit", node: descendant });
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
/** Replace an element with its own children, keeping their order and place. */
|
|
144
|
+
function unwrap(element) {
|
|
145
|
+
const parent = element.parentNode;
|
|
146
|
+
if (!parent)
|
|
147
|
+
return;
|
|
148
|
+
while (element.firstChild)
|
|
149
|
+
parent.insertBefore(element.firstChild, element);
|
|
150
|
+
parent.removeChild(element);
|
|
151
|
+
}
|
|
152
|
+
/** Leave a kept tag with a filtered style attribute and its identity, no more. */
|
|
153
|
+
function stripAttributes(element) {
|
|
154
|
+
const style = element.getAttribute("style");
|
|
155
|
+
for (const name of Array.from(element.getAttributeNames())) {
|
|
156
|
+
const value = element.getAttribute(name) ?? "";
|
|
157
|
+
if (isRichTextFormattingAttribute(name, value))
|
|
158
|
+
continue;
|
|
159
|
+
element.removeAttribute(name);
|
|
160
|
+
}
|
|
161
|
+
if (style === null)
|
|
162
|
+
return;
|
|
163
|
+
const safe = filterStyle(style);
|
|
164
|
+
if (safe)
|
|
165
|
+
element.setAttribute("style", safe);
|
|
166
|
+
else
|
|
167
|
+
element.removeAttribute("style");
|
|
168
|
+
}
|
|
169
|
+
/** Keep only the allowlisted declarations, and only if their values are inert. */
|
|
170
|
+
function filterStyle(style) {
|
|
171
|
+
return splitDeclarations(style)
|
|
172
|
+
.map((declaration) => {
|
|
173
|
+
const colon = declaration.indexOf(":");
|
|
174
|
+
if (colon === -1)
|
|
175
|
+
return null;
|
|
176
|
+
const property = declaration.slice(0, colon).trim().toLowerCase();
|
|
177
|
+
const value = declaration.slice(colon + 1).trim();
|
|
178
|
+
if (!isRichTextFormattingStyle(property, value))
|
|
179
|
+
return null;
|
|
180
|
+
return `${property}: ${value}`;
|
|
181
|
+
})
|
|
182
|
+
.filter((declaration) => declaration !== null)
|
|
183
|
+
.join("; ");
|
|
184
|
+
}
|
|
185
|
+
function isQuoteDelimiter(char) {
|
|
186
|
+
return char === "'" || char === '"';
|
|
187
|
+
}
|
|
188
|
+
function nextParenthesisDepth(depth, char) {
|
|
189
|
+
if (char === "(")
|
|
190
|
+
return depth + 1;
|
|
191
|
+
if (char === ")")
|
|
192
|
+
return Math.max(0, depth - 1);
|
|
193
|
+
return depth;
|
|
194
|
+
}
|
|
195
|
+
function isDeclarationSeparator(char, depth, quote) {
|
|
196
|
+
return char === ";" && depth === 0 && quote === null;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Split on the semicolons that separate declarations, not the ones inside a
|
|
200
|
+
* value. `color: rgb(1, 2, 3)` is one declaration however many separators its
|
|
201
|
+
* value contains.
|
|
202
|
+
*/
|
|
203
|
+
function splitDeclarations(style) {
|
|
204
|
+
const declarations = [];
|
|
205
|
+
let current = "";
|
|
206
|
+
let depth = 0;
|
|
207
|
+
let quote = null;
|
|
208
|
+
for (const char of style) {
|
|
209
|
+
if (char === quote)
|
|
210
|
+
quote = null;
|
|
211
|
+
else if (quote === null && isQuoteDelimiter(char))
|
|
212
|
+
quote = char;
|
|
213
|
+
else if (isDeclarationSeparator(char, depth, quote)) {
|
|
214
|
+
declarations.push(current);
|
|
215
|
+
current = "";
|
|
216
|
+
continue;
|
|
217
|
+
}
|
|
218
|
+
else if (quote === null) {
|
|
219
|
+
depth = nextParenthesisDepth(depth, char);
|
|
220
|
+
}
|
|
221
|
+
current += char;
|
|
222
|
+
}
|
|
223
|
+
if (current.trim())
|
|
224
|
+
declarations.push(current);
|
|
225
|
+
return declarations;
|
|
226
|
+
}
|
|
227
|
+
//# sourceMappingURL=richTextSanitize.js.map
|
|
@@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YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/C,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/core",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.107",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -42,6 +42,10 @@
|
|
|
42
42
|
"import": "./dist/utils/htmlAttrSafety.js",
|
|
43
43
|
"types": "./dist/utils/htmlAttrSafety.d.ts"
|
|
44
44
|
},
|
|
45
|
+
"./rich-text-sanitize": {
|
|
46
|
+
"import": "./dist/utils/richTextSanitize.js",
|
|
47
|
+
"types": "./dist/utils/richTextSanitize.d.ts"
|
|
48
|
+
},
|
|
45
49
|
"./composition-contract": {
|
|
46
50
|
"import": "./dist/compositionContract.js",
|
|
47
51
|
"types": "./dist/compositionContract.d.ts"
|
|
@@ -218,9 +222,9 @@
|
|
|
218
222
|
"bpm-detective": "^2.0.5",
|
|
219
223
|
"linkedom": "^0.18.12",
|
|
220
224
|
"postcss": "^8.5.8",
|
|
221
|
-
"@hyperframes/lint": "0.7.
|
|
222
|
-
"@hyperframes/studio-server": "0.7.
|
|
223
|
-
"@hyperframes/parsers": "0.7.
|
|
225
|
+
"@hyperframes/lint": "0.7.107",
|
|
226
|
+
"@hyperframes/studio-server": "0.7.107",
|
|
227
|
+
"@hyperframes/parsers": "0.7.107"
|
|
224
228
|
},
|
|
225
229
|
"devDependencies": {
|
|
226
230
|
"@types/jsdom": "^28.0.0",
|