@solidjs/html 2.0.0-experimental.5 → 2.0.0-experimental.6
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/html.cjs +3 -3
- package/dist/html.js +3 -3
- package/package.json +3 -3
package/dist/html.cjs
CHANGED
|
@@ -168,7 +168,7 @@ const attrSeeker = new RegExp(tagName + attrName + attrPartials + "+)([ " + spac
|
|
|
168
168
|
const findAttributes = new RegExp("(" + attrName + "\\s*=\\s*)(<!--#-->|['\"(]([\\w\\s]*<!--#-->[\\w\\s]*)*['\")])", "gi");
|
|
169
169
|
const selfClosing = new RegExp(tagName + attrName + attrPartials + "*)([ " + spaces + "]*/>)", "g");
|
|
170
170
|
const marker = "<!--#-->";
|
|
171
|
-
const reservedNameSpaces = new Set(["class", "on", "style", "use", "prop"
|
|
171
|
+
const reservedNameSpaces = new Set(["class", "on", "style", "use", "prop"]);
|
|
172
172
|
function attrReplacer($0, $1, $2, $3) {
|
|
173
173
|
return "<" + $1 + $2.replace(findAttributes, replaceAttributes) + $3;
|
|
174
174
|
}
|
|
@@ -253,8 +253,8 @@ function createHTML(r, {
|
|
|
253
253
|
options.exprs.push(`r.style(${tag},${expr},_$p)`);
|
|
254
254
|
} else if (name === "class") {
|
|
255
255
|
options.exprs.push(`r.className(${tag},${expr},${isSVG},_$p)`);
|
|
256
|
-
} else if (
|
|
257
|
-
options.exprs.push(`${tag}.${
|
|
256
|
+
} else if (isChildProp || !isSVG && isProp || namespace === "prop") {
|
|
257
|
+
options.exprs.push(`${tag}.${name} = ${expr}`);
|
|
258
258
|
} else {
|
|
259
259
|
const ns = isSVG && name.indexOf(":") > -1 && r.SVGNamespace[name.split(":")[0]];
|
|
260
260
|
if (ns) options.exprs.push(`r.setAttributeNS(${tag},"${ns}","${name}",${expr})`);else options.exprs.push(`r.setAttribute(${tag},"${name}",${expr})`);
|
package/dist/html.js
CHANGED
|
@@ -166,7 +166,7 @@ const attrSeeker = new RegExp(tagName + attrName + attrPartials + "+)([ " + spac
|
|
|
166
166
|
const findAttributes = new RegExp("(" + attrName + "\\s*=\\s*)(<!--#-->|['\"(]([\\w\\s]*<!--#-->[\\w\\s]*)*['\")])", "gi");
|
|
167
167
|
const selfClosing = new RegExp(tagName + attrName + attrPartials + "*)([ " + spaces + "]*/>)", "g");
|
|
168
168
|
const marker = "<!--#-->";
|
|
169
|
-
const reservedNameSpaces = new Set(["class", "on", "style", "use", "prop"
|
|
169
|
+
const reservedNameSpaces = new Set(["class", "on", "style", "use", "prop"]);
|
|
170
170
|
function attrReplacer($0, $1, $2, $3) {
|
|
171
171
|
return "<" + $1 + $2.replace(findAttributes, replaceAttributes) + $3;
|
|
172
172
|
}
|
|
@@ -251,8 +251,8 @@ function createHTML(r, {
|
|
|
251
251
|
options.exprs.push(`r.style(${tag},${expr},_$p)`);
|
|
252
252
|
} else if (name === "class") {
|
|
253
253
|
options.exprs.push(`r.className(${tag},${expr},${isSVG},_$p)`);
|
|
254
|
-
} else if (
|
|
255
|
-
options.exprs.push(`${tag}.${
|
|
254
|
+
} else if (isChildProp || !isSVG && isProp || namespace === "prop") {
|
|
255
|
+
options.exprs.push(`${tag}.${name} = ${expr}`);
|
|
256
256
|
} else {
|
|
257
257
|
const ns = isSVG && name.indexOf(":") > -1 && r.SVGNamespace[name.split(":")[0]];
|
|
258
258
|
if (ns) options.exprs.push(`r.setAttributeNS(${tag},"${ns}","${name}",${expr})`);else options.exprs.push(`r.setAttribute(${tag},"${name}",${expr})`);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solidjs/html",
|
|
3
3
|
"description": "Build-less Tagged-Template-Literal Templating for Solid",
|
|
4
|
-
"version": "2.0.0-experimental.
|
|
4
|
+
"version": "2.0.0-experimental.6",
|
|
5
5
|
"author": "Ryan Carniato",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://solidjs.com",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"./dist/*": "./dist/*"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@solidjs/web": "^2.0.0-experimental.
|
|
34
|
+
"@solidjs/web": "^2.0.0-experimental.6"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@solidjs/web": "2.0.0-experimental.
|
|
37
|
+
"@solidjs/web": "2.0.0-experimental.6"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "npm-run-all -nl build:*",
|