snice 4.0.1 → 4.0.2
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.cjs +2 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +2 -19
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +2 -19
- package/dist/index.iife.js.map +1 -1
- package/dist/symbols.cjs +1 -1
- package/dist/symbols.esm.js +1 -1
- package/dist/transitions.cjs +1 -1
- package/dist/transitions.esm.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* snice v4.0.
|
|
2
|
+
* snice v4.0.1
|
|
3
3
|
* Imperative TypeScript framework for building vanilla web components with decorators, differential rendering, routing, and controllers. No virtual DOM, no build complexity.
|
|
4
4
|
* (c) 2024
|
|
5
5
|
* Released under the MIT License.
|
|
@@ -990,21 +990,6 @@ function prepareTemplate(result) {
|
|
|
990
990
|
const attrNamesForParts = [];
|
|
991
991
|
for (let i = 0; i < strings.length; i++) {
|
|
992
992
|
let str = strings[i];
|
|
993
|
-
// Encode slashes in attribute names to prevent browser from splitting them
|
|
994
|
-
// HTML doesn't allow / in attribute names - browser treats it as whitespace
|
|
995
|
-
// Replace / with __SLASH__ in attribute context only (before = sign, after last >)
|
|
996
|
-
if (i < strings.length - 1) {
|
|
997
|
-
const lastEquals = str.lastIndexOf('=');
|
|
998
|
-
const lastCloseTag = str.lastIndexOf('>');
|
|
999
|
-
if (lastEquals > lastCloseTag) {
|
|
1000
|
-
// We're in an attribute context - encode slashes in the attribute name
|
|
1001
|
-
const beforeEquals = str.substring(0, lastEquals);
|
|
1002
|
-
const attrStartIdx = beforeEquals.lastIndexOf('>') + 1;
|
|
1003
|
-
const attrPart = beforeEquals.substring(attrStartIdx);
|
|
1004
|
-
const encodedAttrPart = attrPart.replace(/\//g, '__SLASH__');
|
|
1005
|
-
str = beforeEquals.substring(0, attrStartIdx) + encodedAttrPart + str.substring(lastEquals);
|
|
1006
|
-
}
|
|
1007
|
-
}
|
|
1008
993
|
htmlParts.push(str);
|
|
1009
994
|
if (i < strings.length - 1) {
|
|
1010
995
|
// Check if we're in an attribute context
|
|
@@ -1018,9 +1003,7 @@ function prepareTemplate(result) {
|
|
|
1018
1003
|
attrStart--;
|
|
1019
1004
|
}
|
|
1020
1005
|
const attrName = str.substring(attrStart + 1, lastEquals).trim();
|
|
1021
|
-
|
|
1022
|
-
const originalAttrName = attrName.replace(/__SLASH__/g, '/');
|
|
1023
|
-
attrNamesForParts.push(originalAttrName);
|
|
1006
|
+
attrNamesForParts.push(attrName);
|
|
1024
1007
|
htmlParts.push(marker);
|
|
1025
1008
|
}
|
|
1026
1009
|
else {
|