snice 4.0.1 → 4.1.0

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.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * snice v4.0.0
2
+ * snice v4.0.2
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.
@@ -988,21 +988,6 @@ function prepareTemplate(result) {
988
988
  const attrNamesForParts = [];
989
989
  for (let i = 0; i < strings.length; i++) {
990
990
  let str = strings[i];
991
- // Encode slashes in attribute names to prevent browser from splitting them
992
- // HTML doesn't allow / in attribute names - browser treats it as whitespace
993
- // Replace / with __SLASH__ in attribute context only (before = sign, after last >)
994
- if (i < strings.length - 1) {
995
- const lastEquals = str.lastIndexOf('=');
996
- const lastCloseTag = str.lastIndexOf('>');
997
- if (lastEquals > lastCloseTag) {
998
- // We're in an attribute context - encode slashes in the attribute name
999
- const beforeEquals = str.substring(0, lastEquals);
1000
- const attrStartIdx = beforeEquals.lastIndexOf('>') + 1;
1001
- const attrPart = beforeEquals.substring(attrStartIdx);
1002
- const encodedAttrPart = attrPart.replace(/\//g, '__SLASH__');
1003
- str = beforeEquals.substring(0, attrStartIdx) + encodedAttrPart + str.substring(lastEquals);
1004
- }
1005
- }
1006
991
  htmlParts.push(str);
1007
992
  if (i < strings.length - 1) {
1008
993
  // Check if we're in an attribute context
@@ -1016,9 +1001,7 @@ function prepareTemplate(result) {
1016
1001
  attrStart--;
1017
1002
  }
1018
1003
  const attrName = str.substring(attrStart + 1, lastEquals).trim();
1019
- // Decode the slash encoding to get original name
1020
- const originalAttrName = attrName.replace(/__SLASH__/g, '/');
1021
- attrNamesForParts.push(originalAttrName);
1004
+ attrNamesForParts.push(attrName);
1022
1005
  htmlParts.push(marker);
1023
1006
  }
1024
1007
  else {