@htmlplus/element 2.9.7 → 2.10.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.
@@ -214,7 +214,11 @@ var udomdiff = (parentNode, a, b, get, before) => {
214
214
  // need to be added are not at the end, and in such case
215
215
  // the node to `insertBefore`, if the index is more than 0
216
216
  // must be retrieved, otherwise it's gonna be the first item.
217
- const node = bEnd < bLength ? (bStart ? get(b[bStart - 1], -0).nextSibling : get(b[bEnd - bStart], 0)) : before;
217
+ const node = bEnd < bLength
218
+ ? bStart
219
+ ? get(b[bStart - 1], -0).nextSibling
220
+ : get(b[bEnd - bStart], 0)
221
+ : before;
218
222
  while (bStart < bEnd)
219
223
  parentNode.insertBefore(get(b[bStart++], 1), node);
220
224
  }
package/jsx-runtime.d.ts CHANGED
@@ -95,7 +95,7 @@ declare namespace JSX {
95
95
  s: WithPart<'s'>;
96
96
  samp: WithPart<'samp'>;
97
97
  search: WithPart<'search'>;
98
- slot: WithPart<'slot'>;
98
+ slot: WithPart<'slot'> & { onSlotChange?: (event: Event) => void };
99
99
  script: WithPart<'script'>;
100
100
  section: WithPart<'section'>;
101
101
  select: WithPart<'select'>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htmlplus/element",
3
- "version": "2.9.7",
3
+ "version": "2.10.0",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "author": "Masood Abdolian <m.abdolian@gmail.com>",
@@ -327,6 +327,8 @@ export const customElement = (options) => {
327
327
  });
328
328
  // prettier-ignore
329
329
  const ast = template.default.ast(`
330
+ // THE FOLLOWING TYPES HAVE BEEN ADDED AUTOMATICALLY
331
+
330
332
  export interface ${context.className}Attributes {
331
333
  ${attributes.map(print).join('')}
332
334
  }