@esportsplus/template 0.16.9 → 0.16.11

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.
@@ -61,7 +61,7 @@ const parse = (literals) => {
61
61
  if (char === ' ') {
62
62
  if (attribute && attribute in ATTRIBUTE_DELIMITERS) {
63
63
  s[attribute] ??= '';
64
- s[attribute] += `${buffer && s[attribute] ? ATTRIBUTE_DELIMITERS[attribute] : ''}${buffer}`;
64
+ s[attribute] += char + buffer;
65
65
  }
66
66
  buffer = '';
67
67
  }
@@ -79,7 +79,7 @@ const parse = (literals) => {
79
79
  else if (quote === char) {
80
80
  if (attribute && attribute in ATTRIBUTE_DELIMITERS) {
81
81
  s[attribute] ??= '';
82
- s[attribute] += `${buffer && s[attribute] ? ATTRIBUTE_DELIMITERS[attribute] : ''}${buffer}`;
82
+ s[attribute] += ` ${buffer}`;
83
83
  }
84
84
  attribute = '';
85
85
  buffer = '';
@@ -155,7 +155,8 @@ const parse = (literals) => {
155
155
  }
156
156
  buffer = buffer
157
157
  .replace(REGEX_EVENTS, '')
158
- .replace(REGEX_EMPTY_ATTRIBUTES, '');
158
+ .replace(REGEX_EMPTY_ATTRIBUTES, '')
159
+ .replace(REGEX_CLEANUP_WHITESPACE, ' ');
159
160
  return {
160
161
  html: buffer,
161
162
  slots: slots.length ? slots : null
@@ -9,6 +9,7 @@ const DIRECT_ATTACH_EVENTS = new Set([
9
9
  'onerror',
10
10
  'onfocus', 'onfocusin', 'onfocusout',
11
11
  'onload',
12
+ 'onmouseenter', 'onmouseleave',
12
13
  'onplay', 'onpause', 'onended', 'ontimeupdate',
13
14
  'onreset',
14
15
  'onscroll', 'onsubmit'
package/package.json CHANGED
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "type": "module",
41
41
  "types": "./build/index.d.ts",
42
- "version": "0.16.9",
42
+ "version": "0.16.11",
43
43
  "scripts": {
44
44
  "build": "tsc",
45
45
  "test": "vitest run",
@@ -114,7 +114,7 @@ const parse = (literals: string[]) => {
114
114
  if (char === ' ') {
115
115
  if (attribute && attribute in ATTRIBUTE_DELIMITERS) {
116
116
  s[attribute] ??= '';
117
- s[attribute] += `${buffer && s[attribute] ? ATTRIBUTE_DELIMITERS[attribute] : ''}${buffer}`;
117
+ s[attribute] += char + buffer;
118
118
  }
119
119
 
120
120
  buffer = '';
@@ -133,7 +133,7 @@ const parse = (literals: string[]) => {
133
133
  else if (quote === char) {
134
134
  if (attribute && attribute in ATTRIBUTE_DELIMITERS) {
135
135
  s[attribute] ??= '';
136
- s[attribute] += `${buffer && s[attribute] ? ATTRIBUTE_DELIMITERS[attribute] : ''}${buffer}`;
136
+ s[attribute] += ` ${buffer}`;
137
137
  }
138
138
 
139
139
  attribute = '';
@@ -230,7 +230,8 @@ const parse = (literals: string[]) => {
230
230
 
231
231
  buffer = buffer
232
232
  .replace(REGEX_EVENTS, '')
233
- .replace(REGEX_EMPTY_ATTRIBUTES, '');
233
+ .replace(REGEX_EMPTY_ATTRIBUTES, '')
234
+ .replace(REGEX_CLEANUP_WHITESPACE, ' ');
234
235
 
235
236
  return {
236
237
  html: buffer,
package/src/constants.ts CHANGED
@@ -12,6 +12,7 @@ const DIRECT_ATTACH_EVENTS = new Set<string>([
12
12
  'onerror',
13
13
  'onfocus', 'onfocusin', 'onfocusout',
14
14
  'onload',
15
+ 'onmouseenter', 'onmouseleave',
15
16
  'onplay', 'onpause', 'onended', 'ontimeupdate',
16
17
  'onreset',
17
18
  'onscroll', 'onsubmit'