@solidjs/html 2.0.0-beta.12 → 2.0.0-beta.14
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 +2 -2
- package/dist/html.js +2 -2
- package/package.json +4 -4
- package/types/sld.d.ts +9 -163
- package/types-cjs/sld.d.cts +9 -163
package/dist/html.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var web = require('@solidjs/web');
|
|
4
4
|
|
|
5
|
-
const e=e=>t(e)||e>=48&&e<=58||e===46||e===45,t=e=>e>=65&&e<=90||e>=97&&e<=122||e===95||e===36,n=e=>e>=9&&e<=13||e===32,r=(r,i)=>{let a=[],o=0,s=``,c=0;for(let l=0;l<r.length;l++){let u=r[l],d=u.length;for(c=0;c<d;)switch(o){case 0:{s=``;let e=u.indexOf(`<`,c);e===-1?(c<d&&a.push({type:6,value:u.slice(c)}),c=d):(e>c&&a.push({type:6,value:u.slice(c,e)}),u[e+1]===`!`&&u[e+2]===`-`&&u[e+3]===`-`?(o=3,c=e+4):(a.push({type:0}),o=1,c=e+1));break}case 1:{let r=u.charCodeAt(c);if(n(r))c++;else if(r===62)i.has(s)&&a[a.length-2]?.type!==2?o=2:(o=0,s=``),a.push({type:1}),c++;else if(r===61)a.push({type:4}),c++;else if(r===47){let e=u.charCodeAt(c+1),t=u.slice(c+2).search(/\S/),n=e===47&&a[a.length-1]?.type===0&&t!==-1&&u[c+2+t]===`>`;e===47&&!n?o=4:e===42?o=5:(a.push({type:2}),c++);}else if(r===34||r===39){let e=u[c],t=u.indexOf(e,c+1);if(t===-1)throw Error(`Unterminated string`);a.push({type:5,value:u.slice(c+1,t),quote:e}),c=t+1;}else if(t(r)){let t=c;for(;c<d&&e(u.charCodeAt(c));)c++;let n=u.slice(t,c);s===``&&(s=n),a.push({type:3,value:n});}else if(r===46&&u[c+1]===`.`&&u[c+2]===`.`)a.push({type:8}),c+=3;else throw Error(`Unexpected Character: ${u[c]}`);break}case 2:{let e=RegExp(`<\\s*/\\s*${s}\\s*>`,`g`);e.lastIndex=c;let t=e.exec(u);if(t){let e=t.index;e>c&&a.push({type:6,value:u.slice(c,e)}),o=0,c=e,s=``;}else a.push({type:6,value:u.slice(c)}),c=d;break}case 3:case 4:case 5:{let e=o===4?`
|
|
6
|
-
`:o===5?`*/`:`-->`,t=u.indexOf(e,c);t===-1?c=d:(o=o===3?0:1,c=t+e.length);break}}l<r.length-1&&(o===0||o===1||o===2)&&a.push({type:7,value:l});}return a},i=e=>{let t=e.charCodeAt(0);return t>=65&&t<=90},a=(e,t)=>{let n={type:0,children:[]},r=[n],a=0,o=e.length;for(;a<o;){let n=e[a],s=r[r.length-1];switch(n.type){case 6:{let t=n.value;if(t.trim()===``){let t=e[a-1]?.type,n=e[a+1]?.type;if(t===1||n===0){a++;continue}}s.children.push({type:3,value:t}),a++;continue}case 7:s.children.push({type:4,value:n.value}),a++;continue;case 0:{let n=e[++a];if(n.type===2){let n=e[++a],i=e[++a],o=r[r.length-1];if(r.length>1&&i.type===1&&(n?.type===3&&o.name===n.value||(n?.type===7||n.type===2)&&typeof o.name==`number`)){let e=r.pop();e?.type===1&&t.has(e.name)&&(e.children=[]),a++;continue}throw Error(`Mismatched closing tag
|
|
5
|
+
const e=e=>t(e)||e>=48&&e<=58||e===46||e===45,t=e=>e>=65&&e<=90||e>=97&&e<=122||e===95||e===36,n=e=>e>=9&&e<=13||e===32,r=(r,i)=>{let a=[],o=0,s=``,c=0;for(let l=0;l<r.length;l++){let u=r[l],d=u.length;for(c=0;c<d;)switch(o){case 0:{s=``;let e=u.indexOf(`<`,c);e===-1?(c<d&&a.push({type:6,value:u.slice(c)}),c=d):(e>c&&a.push({type:6,value:u.slice(c,e)}),u[e+1]===`!`&&u[e+2]===`-`&&u[e+3]===`-`?(o=3,c=e+4):(a.push({type:0}),o=1,c=e+1));break}case 1:{let r=u.charCodeAt(c);if(n(r))c++;else if(r===62)i.has(s)&&a[a.length-2]?.type!==2?o=2:(o=0,s=``),a.push({type:1}),c++;else if(r===61)a.push({type:4}),c++;else if(r===47){let e=u.charCodeAt(c+1),t=u.slice(c+2).search(/\S/),n=e===47&&a[a.length-1]?.type===0&&t!==-1&&u[c+2+t]===`>`;e===47&&!n?o=4:e===42?o=5:(a.push({type:2}),c++);}else if(r===34||r===39){let e=u[c],t=u.indexOf(e,c+1);if(t===-1)throw Error(`Unterminated string at ${l}:${c}`);a.push({type:5,value:u.slice(c+1,t),quote:e}),c=t+1;}else if(t(r)){let t=c;for(;c<d&&e(u.charCodeAt(c));)c++;let n=u.slice(t,c);s===``&&(s=n),a.push({type:3,value:n});}else if(r===46&&u[c+1]===`.`&&u[c+2]===`.`)a.push({type:8}),c+=3;else throw Error(`Unexpected Character: ${u[c]} at ${l}:${c}`);break}case 2:{let e=RegExp(`<\\s*/\\s*${s}\\s*>`,`g`);e.lastIndex=c;let t=e.exec(u);if(t){let e=t.index;e>c&&a.push({type:6,value:u.slice(c,e)}),o=0,c=e,s=``;}else a.push({type:6,value:u.slice(c)}),c=d;break}case 3:case 4:case 5:{let e=o===4?`
|
|
6
|
+
`:o===5?`*/`:`-->`,t=u.indexOf(e,c);t===-1?c=d:(o=o===3?0:1,c=t+e.length);break}}l<r.length-1&&(o===0||o===1||o===2)&&a.push({type:7,value:l});}return a},i=e=>{let t=e.charCodeAt(0);return t>=65&&t<=90},a=(e,t)=>{let n={type:0,children:[]},r=[n],a=0,o=e.length;for(;a<o;){let n=e[a],s=r[r.length-1];switch(n.type){case 6:{let t=n.value;if(t.trim()===``){let t=e[a-1]?.type,n=e[a+1]?.type;if(t===1||n===0){a++;continue}}s.children.push({type:3,value:t}),a++;continue}case 7:s.children.push({type:4,value:n.value}),a++;continue;case 0:{let n=e[++a];if(n.type===2){let n=e[++a],i=e[++a],o=r[r.length-1];if(r.length>1&&i.type===1&&(n?.type===3&&o.name===n.value||(n?.type===7||n.type===2)&&typeof o.name==`number`)){let e=r.pop();e?.type===1&&t.has(e.name)&&(e.children=[]),a++;continue}throw Error(`Mismatched closing tag for <${o.name}>`)}if(n.type===3||n.type===7){let t=n.value,c={type:typeof t==`number`||i(t)?2:1,name:t,props:[],children:[]};for(s.children.push(c),a++;a<o;){let t=e[a];if(t.type===1||t.type===2)break;if(t.type===8){let t=e[a+1];if(t?.type===7)c.props.push({type:3,value:t.value}),a+=2;else throw Error(`Spread operator in <${c.name}> must be followed by an expression`)}else if(t.type===3){let n=t.value;if(e[a+1]?.type===4){a+=2;let t=e[a];if(t.type===7)c.props.push({name:n,type:2,value:t.value}),a++;else if(t.type===5){let e=t.quote;c.props.push({name:n,value:t.value,quote:e,type:1}),a++;}else throw Error(`Attribute value for "${n}" in <${c.name}> must be an expression or a string`)}else c.props.push({type:0,name:n,value:true}),a++;}else throw Error(`Invalid attribute in <${c.name}>`)}let l=e[a];l.type===2?a+=2:l.type===1&&(a++,r.push(c));continue}}default:throw Error(`Unexpected token: ${JSON.stringify(n)} after <${r[r.length-1].name}>`)}}if(r.length>1)throw Error(`Unclosed tag for <${r[r.length-1].name}>`);return n},o=e=>e.length===1?e[0]:e;function s(e){let t=new WeakMap,n=new Set(e.RawTextElements);n.delete(`template`);let i=document.createTreeWalker(document,129),s=t=>e.SVGElements.has(t)?document.createElementNS(`http://www.w3.org/2000/svg`,t):e.MathMLElements.has(t)?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,t):document.createElement(t),c=e=>{let t=(t,...n)=>m(l(t),n,e);return t.components=e,t.sld=t,t.define=t=>c({...e,...t}),t},l=i=>{let o=t.get(i);return o||(o=a(r(i,n),e.VoidElements),u(o,false),t.set(i,o)),o},u=(e,t)=>{if(e.type===1){if(!t){let n=document.createElement(`template`);n.content.appendChild(f(e)),e.template=n,t=true;}e.children.forEach(e=>u(e,t));}else e.type===2||e.type===0?e.children.forEach(e=>u(e,false)):e.type===3&&!t&&(d.innerHTML=e.value,e.value=d.content.textContent??``);},d=document.createElement(`template`),f=e=>{switch(e.type){case 3:return d.innerHTML=e.value,document.createTextNode(d.content.textContent??``);case 4:return document.createComment(`+`);case 2:return document.createComment(e.name);case 1:let t=false,n=s(e.name);return e.props=e.props.filter(e=>e.type===1?e.name.startsWith(`prop:`)?true:(n.setAttribute(e.name,e.value),t):e.type===0?(n.setAttribute(e.name,``),t):e.type===3?(t=true,t):true),(e.name===`template`?n.content:n).append(...e.children.map(f)),n}},p=(t,n,r)=>{switch(t.type){case 3:return t.value;case 4:return n[t.value];case 2:let i=typeof t.name==`string`?r[t.name]:n[t.name];if(i&&typeof i==`function`)return e.createComponent(i,h(t,n,r));throw Error(`Component "${t.name}" not found in registry`);case 1:t.name;let a=m(t,n,r),o=h(t,n,r);return e.spread(a,o,true),a}},m=(t,n,r)=>{if(t.type!==1||!t.template)return o(t.children.map(e=>p(e,n,r)));let a=t.template.content.firstChild.cloneNode(true);i.currentNode=a;let s=(t,i)=>{for(let a of t)if(a.type===1||a.type===4||a.type===2){let t=i.nextNode();if(a.type===4||a.type===2)e.insert(t.parentNode,p(a,n,r),t),i.currentNode=t;else {if(a.props.length){let i=h(a,n,r);e.spread(t,i,true);}s(a.children,a.name===`template`?document.createTreeWalker(t.content,129):i);}}};return s(t.children,t.name===`template`?document.createTreeWalker(a.content,129):i),a},h=(t,n,r,i={})=>{for(let r of t.props)switch(r.type){case 0:i[r.name]=true;break;case 1:i[r.name]=r.value;break;case 2:g(i,r.name,n[r.value]);break;case 3:let t=n[r.value];if(!t||typeof t!=`object`)throw Error(`Can only spread objects`);i=e.mergeProps(i,t);break}return t.type===2&&t.children.length&&Object.defineProperty(i,`children`,{get(){return m(t,n,r)}}),i},g=(e,t,n)=>{typeof n==`function`&&n.length===0&&t!==`ref`&&!t.startsWith(`on`)?Object.defineProperty(e,t,{get(){return n()},enumerable:true}):e[t]=n;};return c({})}
|
|
7
7
|
|
|
8
8
|
const html = s({
|
|
9
9
|
insert: web.insert,
|
package/dist/html.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RawTextElements, VoidElements, MathMLElements, SVGElements, mergeProps, createComponent, spread, insert } from '@solidjs/web';
|
|
2
2
|
|
|
3
|
-
const e=e=>t(e)||e>=48&&e<=58||e===46||e===45,t=e=>e>=65&&e<=90||e>=97&&e<=122||e===95||e===36,n=e=>e>=9&&e<=13||e===32,r=(r,i)=>{let a=[],o=0,s=``,c=0;for(let l=0;l<r.length;l++){let u=r[l],d=u.length;for(c=0;c<d;)switch(o){case 0:{s=``;let e=u.indexOf(`<`,c);e===-1?(c<d&&a.push({type:6,value:u.slice(c)}),c=d):(e>c&&a.push({type:6,value:u.slice(c,e)}),u[e+1]===`!`&&u[e+2]===`-`&&u[e+3]===`-`?(o=3,c=e+4):(a.push({type:0}),o=1,c=e+1));break}case 1:{let r=u.charCodeAt(c);if(n(r))c++;else if(r===62)i.has(s)&&a[a.length-2]?.type!==2?o=2:(o=0,s=``),a.push({type:1}),c++;else if(r===61)a.push({type:4}),c++;else if(r===47){let e=u.charCodeAt(c+1),t=u.slice(c+2).search(/\S/),n=e===47&&a[a.length-1]?.type===0&&t!==-1&&u[c+2+t]===`>`;e===47&&!n?o=4:e===42?o=5:(a.push({type:2}),c++);}else if(r===34||r===39){let e=u[c],t=u.indexOf(e,c+1);if(t===-1)throw Error(`Unterminated string`);a.push({type:5,value:u.slice(c+1,t),quote:e}),c=t+1;}else if(t(r)){let t=c;for(;c<d&&e(u.charCodeAt(c));)c++;let n=u.slice(t,c);s===``&&(s=n),a.push({type:3,value:n});}else if(r===46&&u[c+1]===`.`&&u[c+2]===`.`)a.push({type:8}),c+=3;else throw Error(`Unexpected Character: ${u[c]}`);break}case 2:{let e=RegExp(`<\\s*/\\s*${s}\\s*>`,`g`);e.lastIndex=c;let t=e.exec(u);if(t){let e=t.index;e>c&&a.push({type:6,value:u.slice(c,e)}),o=0,c=e,s=``;}else a.push({type:6,value:u.slice(c)}),c=d;break}case 3:case 4:case 5:{let e=o===4?`
|
|
4
|
-
`:o===5?`*/`:`-->`,t=u.indexOf(e,c);t===-1?c=d:(o=o===3?0:1,c=t+e.length);break}}l<r.length-1&&(o===0||o===1||o===2)&&a.push({type:7,value:l});}return a},i=e=>{let t=e.charCodeAt(0);return t>=65&&t<=90},a=(e,t)=>{let n={type:0,children:[]},r=[n],a=0,o=e.length;for(;a<o;){let n=e[a],s=r[r.length-1];switch(n.type){case 6:{let t=n.value;if(t.trim()===``){let t=e[a-1]?.type,n=e[a+1]?.type;if(t===1||n===0){a++;continue}}s.children.push({type:3,value:t}),a++;continue}case 7:s.children.push({type:4,value:n.value}),a++;continue;case 0:{let n=e[++a];if(n.type===2){let n=e[++a],i=e[++a],o=r[r.length-1];if(r.length>1&&i.type===1&&(n?.type===3&&o.name===n.value||(n?.type===7||n.type===2)&&typeof o.name==`number`)){let e=r.pop();e?.type===1&&t.has(e.name)&&(e.children=[]),a++;continue}throw Error(`Mismatched closing tag
|
|
3
|
+
const e=e=>t(e)||e>=48&&e<=58||e===46||e===45,t=e=>e>=65&&e<=90||e>=97&&e<=122||e===95||e===36,n=e=>e>=9&&e<=13||e===32,r=(r,i)=>{let a=[],o=0,s=``,c=0;for(let l=0;l<r.length;l++){let u=r[l],d=u.length;for(c=0;c<d;)switch(o){case 0:{s=``;let e=u.indexOf(`<`,c);e===-1?(c<d&&a.push({type:6,value:u.slice(c)}),c=d):(e>c&&a.push({type:6,value:u.slice(c,e)}),u[e+1]===`!`&&u[e+2]===`-`&&u[e+3]===`-`?(o=3,c=e+4):(a.push({type:0}),o=1,c=e+1));break}case 1:{let r=u.charCodeAt(c);if(n(r))c++;else if(r===62)i.has(s)&&a[a.length-2]?.type!==2?o=2:(o=0,s=``),a.push({type:1}),c++;else if(r===61)a.push({type:4}),c++;else if(r===47){let e=u.charCodeAt(c+1),t=u.slice(c+2).search(/\S/),n=e===47&&a[a.length-1]?.type===0&&t!==-1&&u[c+2+t]===`>`;e===47&&!n?o=4:e===42?o=5:(a.push({type:2}),c++);}else if(r===34||r===39){let e=u[c],t=u.indexOf(e,c+1);if(t===-1)throw Error(`Unterminated string at ${l}:${c}`);a.push({type:5,value:u.slice(c+1,t),quote:e}),c=t+1;}else if(t(r)){let t=c;for(;c<d&&e(u.charCodeAt(c));)c++;let n=u.slice(t,c);s===``&&(s=n),a.push({type:3,value:n});}else if(r===46&&u[c+1]===`.`&&u[c+2]===`.`)a.push({type:8}),c+=3;else throw Error(`Unexpected Character: ${u[c]} at ${l}:${c}`);break}case 2:{let e=RegExp(`<\\s*/\\s*${s}\\s*>`,`g`);e.lastIndex=c;let t=e.exec(u);if(t){let e=t.index;e>c&&a.push({type:6,value:u.slice(c,e)}),o=0,c=e,s=``;}else a.push({type:6,value:u.slice(c)}),c=d;break}case 3:case 4:case 5:{let e=o===4?`
|
|
4
|
+
`:o===5?`*/`:`-->`,t=u.indexOf(e,c);t===-1?c=d:(o=o===3?0:1,c=t+e.length);break}}l<r.length-1&&(o===0||o===1||o===2)&&a.push({type:7,value:l});}return a},i=e=>{let t=e.charCodeAt(0);return t>=65&&t<=90},a=(e,t)=>{let n={type:0,children:[]},r=[n],a=0,o=e.length;for(;a<o;){let n=e[a],s=r[r.length-1];switch(n.type){case 6:{let t=n.value;if(t.trim()===``){let t=e[a-1]?.type,n=e[a+1]?.type;if(t===1||n===0){a++;continue}}s.children.push({type:3,value:t}),a++;continue}case 7:s.children.push({type:4,value:n.value}),a++;continue;case 0:{let n=e[++a];if(n.type===2){let n=e[++a],i=e[++a],o=r[r.length-1];if(r.length>1&&i.type===1&&(n?.type===3&&o.name===n.value||(n?.type===7||n.type===2)&&typeof o.name==`number`)){let e=r.pop();e?.type===1&&t.has(e.name)&&(e.children=[]),a++;continue}throw Error(`Mismatched closing tag for <${o.name}>`)}if(n.type===3||n.type===7){let t=n.value,c={type:typeof t==`number`||i(t)?2:1,name:t,props:[],children:[]};for(s.children.push(c),a++;a<o;){let t=e[a];if(t.type===1||t.type===2)break;if(t.type===8){let t=e[a+1];if(t?.type===7)c.props.push({type:3,value:t.value}),a+=2;else throw Error(`Spread operator in <${c.name}> must be followed by an expression`)}else if(t.type===3){let n=t.value;if(e[a+1]?.type===4){a+=2;let t=e[a];if(t.type===7)c.props.push({name:n,type:2,value:t.value}),a++;else if(t.type===5){let e=t.quote;c.props.push({name:n,value:t.value,quote:e,type:1}),a++;}else throw Error(`Attribute value for "${n}" in <${c.name}> must be an expression or a string`)}else c.props.push({type:0,name:n,value:true}),a++;}else throw Error(`Invalid attribute in <${c.name}>`)}let l=e[a];l.type===2?a+=2:l.type===1&&(a++,r.push(c));continue}}default:throw Error(`Unexpected token: ${JSON.stringify(n)} after <${r[r.length-1].name}>`)}}if(r.length>1)throw Error(`Unclosed tag for <${r[r.length-1].name}>`);return n},o=e=>e.length===1?e[0]:e;function s(e){let t=new WeakMap,n=new Set(e.RawTextElements);n.delete(`template`);let i=document.createTreeWalker(document,129),s=t=>e.SVGElements.has(t)?document.createElementNS(`http://www.w3.org/2000/svg`,t):e.MathMLElements.has(t)?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,t):document.createElement(t),c=e=>{let t=(t,...n)=>m(l(t),n,e);return t.components=e,t.sld=t,t.define=t=>c({...e,...t}),t},l=i=>{let o=t.get(i);return o||(o=a(r(i,n),e.VoidElements),u(o,false),t.set(i,o)),o},u=(e,t)=>{if(e.type===1){if(!t){let n=document.createElement(`template`);n.content.appendChild(f(e)),e.template=n,t=true;}e.children.forEach(e=>u(e,t));}else e.type===2||e.type===0?e.children.forEach(e=>u(e,false)):e.type===3&&!t&&(d.innerHTML=e.value,e.value=d.content.textContent??``);},d=document.createElement(`template`),f=e=>{switch(e.type){case 3:return d.innerHTML=e.value,document.createTextNode(d.content.textContent??``);case 4:return document.createComment(`+`);case 2:return document.createComment(e.name);case 1:let t=false,n=s(e.name);return e.props=e.props.filter(e=>e.type===1?e.name.startsWith(`prop:`)?true:(n.setAttribute(e.name,e.value),t):e.type===0?(n.setAttribute(e.name,``),t):e.type===3?(t=true,t):true),(e.name===`template`?n.content:n).append(...e.children.map(f)),n}},p=(t,n,r)=>{switch(t.type){case 3:return t.value;case 4:return n[t.value];case 2:let i=typeof t.name==`string`?r[t.name]:n[t.name];if(i&&typeof i==`function`)return e.createComponent(i,h(t,n,r));throw Error(`Component "${t.name}" not found in registry`);case 1:t.name;let a=m(t,n,r),o=h(t,n,r);return e.spread(a,o,true),a}},m=(t,n,r)=>{if(t.type!==1||!t.template)return o(t.children.map(e=>p(e,n,r)));let a=t.template.content.firstChild.cloneNode(true);i.currentNode=a;let s=(t,i)=>{for(let a of t)if(a.type===1||a.type===4||a.type===2){let t=i.nextNode();if(a.type===4||a.type===2)e.insert(t.parentNode,p(a,n,r),t),i.currentNode=t;else {if(a.props.length){let i=h(a,n,r);e.spread(t,i,true);}s(a.children,a.name===`template`?document.createTreeWalker(t.content,129):i);}}};return s(t.children,t.name===`template`?document.createTreeWalker(a.content,129):i),a},h=(t,n,r,i={})=>{for(let r of t.props)switch(r.type){case 0:i[r.name]=true;break;case 1:i[r.name]=r.value;break;case 2:g(i,r.name,n[r.value]);break;case 3:let t=n[r.value];if(!t||typeof t!=`object`)throw Error(`Can only spread objects`);i=e.mergeProps(i,t);break}return t.type===2&&t.children.length&&Object.defineProperty(i,`children`,{get(){return m(t,n,r)}}),i},g=(e,t,n)=>{typeof n==`function`&&n.length===0&&t!==`ref`&&!t.startsWith(`on`)?Object.defineProperty(e,t,{get(){return n()},enumerable:true}):e[t]=n;};return c({})}
|
|
5
5
|
|
|
6
6
|
const html = s({
|
|
7
7
|
insert,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solidjs/html",
|
|
3
3
|
"description": "Tagged-template-literal templating for Solid — write components with no build step.",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.14",
|
|
5
5
|
"author": "Ryan Carniato",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://solidjs.com",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@solidjs/web": "^2.0.0-beta.
|
|
40
|
+
"@solidjs/web": "^2.0.0-beta.14"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"
|
|
44
|
-
"
|
|
43
|
+
"solid-js": "2.0.0-beta.14",
|
|
44
|
+
"@solidjs/web": "2.0.0-beta.14"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build": "npm-run-all -nl build:*",
|
package/types/sld.d.ts
CHANGED
|
@@ -9293,7 +9293,7 @@ type SkipPropsFrom = HTMLUnknownElement & HTMLElement & Element & Node;
|
|
|
9293
9293
|
* - `HTMLButtonElement.popoverTargetElement` / `commandForElement` (and the same via
|
|
9294
9294
|
* `PopoverTargetAttributes` mixin on `HTMLInputElement`)
|
|
9295
9295
|
*/
|
|
9296
|
-
type PropValue = string | number | boolean | null | MediaStream | MediaSource | Blob | File | Element;
|
|
9296
|
+
type PropValue = string | number | boolean | null | MediaStream | MediaSource | Blob | File | Date | Element;
|
|
9297
9297
|
/**
|
|
9298
9298
|
* Ergonomics widening for emitted `prop:*` value types:
|
|
9299
9299
|
*
|
|
@@ -9360,10 +9360,9 @@ type PropKey<T, K extends keyof T> = K extends keyof SkipPropsFrom ? never : K e
|
|
|
9360
9360
|
*
|
|
9361
9361
|
* - Event handlers use `camelCase` such `onClick` and will be delegated when possible, bubbling
|
|
9362
9362
|
* through the component tree, not the dom tree.
|
|
9363
|
-
* -
|
|
9364
|
-
*
|
|
9363
|
+
* - Event handlers use camelCase attributes; native listener options should be handled with `ref`
|
|
9364
|
+
* callbacks that call `addEventListener` directly.
|
|
9365
9365
|
* - A global case-insensitive event handler can be added by extending `EventHandlersElement<T>`
|
|
9366
|
-
* - A native `on:` event handler can be added by extending `CustomEvents<T>` interface
|
|
9367
9366
|
*
|
|
9368
9367
|
* ## Boolean Attributes (property setter that accepts `true | false`):
|
|
9369
9368
|
*
|
|
@@ -9479,10 +9478,6 @@ declare namespace JSX {
|
|
|
9479
9478
|
1: any;
|
|
9480
9479
|
}
|
|
9481
9480
|
type EventHandlerUnion<T, E extends Event, EHandler extends EventHandler<T, any> = EventHandler<T, E>> = EHandler | BoundEventHandler<T, E, EHandler>;
|
|
9482
|
-
interface EventHandlerWithOptions<T, E extends Event, EHandler = EventHandler<T, E>> extends AddEventListenerOptions, EventListenerOptions {
|
|
9483
|
-
handleEvent: EHandler;
|
|
9484
|
-
}
|
|
9485
|
-
type EventHandlerWithOptionsUnion<T, E extends Event, EHandler extends EventHandler<T, any> = EventHandler<T, E>> = EHandler | EventHandlerWithOptions<T, E, EHandler>;
|
|
9486
9481
|
interface InputEventHandler<T, E extends InputEvent> {
|
|
9487
9482
|
(e: E & {
|
|
9488
9483
|
currentTarget: T;
|
|
@@ -9504,7 +9499,7 @@ declare namespace JSX {
|
|
|
9504
9499
|
}): void;
|
|
9505
9500
|
}
|
|
9506
9501
|
type FocusEventHandlerUnion<T, E extends FocusEvent> = EventHandlerUnion<T, E, FocusEventHandler<T, E>>; // end event handlers
|
|
9507
|
-
type
|
|
9502
|
+
export type ClassValue = string | Record<string, boolean> | Array<string | number | boolean | null | undefined | Record<string, boolean>>;
|
|
9508
9503
|
const SERIALIZABLE: unique symbol;
|
|
9509
9504
|
interface SerializableAttributeValue {
|
|
9510
9505
|
toString(): string;
|
|
@@ -9521,9 +9516,7 @@ declare namespace JSX {
|
|
|
9521
9516
|
$ServerOnly?: boolean | undefined;
|
|
9522
9517
|
}
|
|
9523
9518
|
interface ExplicitProperties {}
|
|
9524
|
-
interface CustomEvents {}
|
|
9525
9519
|
type PropAttributes = { [Key in keyof ExplicitProperties as `prop:${Key}`]?: ExplicitProperties[Key] };
|
|
9526
|
-
type OnAttributes<T> = { [Key in keyof CustomEvents as `on:${Key}`]?: EventHandlerWithOptionsUnion<T, CustomEvents[Key]> };
|
|
9527
9520
|
/**
|
|
9528
9521
|
* Writable, element-specific DOM properties exposed as `prop:*` attributes, auto-derived
|
|
9529
9522
|
* from the element interface `T`. See `./jsx-properties.d.ts` for the filtering rules.
|
|
@@ -9536,10 +9529,6 @@ declare namespace JSX {
|
|
|
9536
9529
|
[key: `-${string}`]: string | number | undefined;
|
|
9537
9530
|
} // TODO: Should we allow this?
|
|
9538
9531
|
// type ClassKeys = `class:${string}`;
|
|
9539
|
-
// type CSSKeys = Exclude<keyof csstype.PropertiesHyphen, `-${string}`>;
|
|
9540
|
-
// type CSSAttributes = {
|
|
9541
|
-
// [key in CSSKeys as `style:${key}`]: csstype.PropertiesHyphen[key];
|
|
9542
|
-
// };
|
|
9543
9532
|
// BOOLEAN
|
|
9544
9533
|
/**
|
|
9545
9534
|
* Boolean and Pseudo-Boolean Attributes Helpers.
|
|
@@ -9870,31 +9859,7 @@ declare namespace JSX {
|
|
|
9870
9859
|
onStorage?: EventHandlerUnion<T, StorageEvent> | undefined;
|
|
9871
9860
|
onUnhandledRejection?: EventHandlerUnion<T, PromiseRejectionEvent> | undefined;
|
|
9872
9861
|
onUnload?: EventHandlerUnion<T, Event> | undefined;
|
|
9873
|
-
"on:afterprint"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
9874
|
-
"on:beforeprint"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
9875
|
-
"on:beforeunload"?: EventHandlerWithOptionsUnion<T, BeforeUnloadEvent> | undefined;
|
|
9876
|
-
"on:devicemotion"?: EventHandlerWithOptionsUnion<T, DeviceMotionEvent> | undefined;
|
|
9877
|
-
"on:deviceorientation"?: EventHandlerWithOptionsUnion<T, DeviceOrientationEvent> | undefined;
|
|
9878
|
-
"on:deviceorientationabsolute"?: EventHandlerWithOptionsUnion<T, DeviceOrientationEvent> | undefined;
|
|
9879
|
-
"on:gamepadconnected"?: EventHandlerWithOptionsUnion<T, GamepadEvent> | undefined;
|
|
9880
|
-
"on:gamepaddisconnected"?: EventHandlerWithOptionsUnion<T, GamepadEvent> | undefined;
|
|
9881
|
-
"on:hashchange"?: EventHandlerWithOptionsUnion<T, HashChangeEvent> | undefined;
|
|
9882
|
-
"on:languagechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
9883
|
-
"on:message"?: EventHandlerWithOptionsUnion<T, MessageEvent> | undefined;
|
|
9884
|
-
"on:messageerror"?: EventHandlerWithOptionsUnion<T, MessageEvent> | undefined;
|
|
9885
|
-
"on:offline"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
9886
|
-
"on:online"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
9887
9862
|
/** @deprecated Use `screen.orientation` (`ScreenOrientation.change`) instead. */
|
|
9888
|
-
"on:orientationchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
9889
|
-
"on:pagehide"?: EventHandlerWithOptionsUnion<T, PageTransitionEvent> | undefined;
|
|
9890
|
-
"on:pagereveal"?: EventHandlerWithOptionsUnion<T, PageRevealEvent> | undefined;
|
|
9891
|
-
"on:pageshow"?: EventHandlerWithOptionsUnion<T, PageTransitionEvent> | undefined;
|
|
9892
|
-
"on:pageswap"?: EventHandlerWithOptionsUnion<T, PageSwapEvent> | undefined;
|
|
9893
|
-
"on:popstate"?: EventHandlerWithOptionsUnion<T, PopStateEvent> | undefined;
|
|
9894
|
-
"on:rejectionhandled"?: EventHandlerWithOptionsUnion<T, PromiseRejectionEvent> | undefined;
|
|
9895
|
-
"on:storage"?: EventHandlerWithOptionsUnion<T, StorageEvent> | undefined;
|
|
9896
|
-
"on:unhandledrejection"?: EventHandlerWithOptionsUnion<T, PromiseRejectionEvent> | undefined;
|
|
9897
|
-
"on:unload"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
9898
9863
|
}
|
|
9899
9864
|
/**
|
|
9900
9865
|
* Global `EventHandlersElement`, defined for all tags.
|
|
@@ -10017,121 +9982,9 @@ declare namespace JSX {
|
|
|
10017
9982
|
onVolumeChange?: EventHandlerUnion<T, Event> | undefined;
|
|
10018
9983
|
onWaiting?: EventHandlerUnion<T, Event> | undefined;
|
|
10019
9984
|
onWheel?: EventHandlerUnion<T, WheelEvent> | undefined;
|
|
10020
|
-
"on:abort"?: EventHandlerWithOptionsUnion<T, UIEvent> | undefined;
|
|
10021
|
-
"on:animationcancel"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
|
|
10022
|
-
"on:animationend"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
|
|
10023
|
-
"on:animationiteration"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
|
|
10024
|
-
"on:animationstart"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
|
|
10025
|
-
"on:auxclick"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10026
|
-
"on:beforecopy"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
|
|
10027
|
-
"on:beforecut"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
|
|
10028
|
-
"on:beforeinput"?: EventHandlerWithOptionsUnion<T, InputEvent, InputEventHandler<T, InputEvent>> | undefined;
|
|
10029
|
-
"on:beforematch"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10030
|
-
"on:beforepaste"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
|
|
10031
|
-
"on:beforetoggle"?: EventHandlerWithOptionsUnion<T, ToggleEvent> | undefined;
|
|
10032
|
-
"on:beforexrselect"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10033
|
-
"on:blur"?: EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>> | undefined;
|
|
10034
|
-
"on:cancel"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10035
|
-
"on:canplay"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10036
|
-
"on:canplaythrough"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10037
|
-
"on:change"?: EventHandlerWithOptionsUnion<T, Event, ChangeEventHandler<T, Event>> | undefined;
|
|
10038
|
-
"on:click"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
10039
|
-
"on:close"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10040
|
-
"on:command"?: EventHandlerWithOptionsUnion<T, CommandEvent> | undefined;
|
|
10041
|
-
"on:compositionend"?: EventHandlerWithOptionsUnion<T, CompositionEvent> | undefined;
|
|
10042
|
-
"on:compositionstart"?: EventHandlerWithOptionsUnion<T, CompositionEvent> | undefined;
|
|
10043
|
-
"on:compositionupdate"?: EventHandlerWithOptionsUnion<T, CompositionEvent> | undefined;
|
|
10044
|
-
"on:contentvisibilityautostatechange"?: EventHandlerWithOptionsUnion<T, ContentVisibilityAutoStateChangeEvent> | undefined;
|
|
10045
|
-
"on:contextlost"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10046
|
-
"on:contextmenu"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10047
|
-
"on:contextrestored"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10048
|
-
"on:copy"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
|
|
10049
|
-
"on:cuechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10050
|
-
"on:cut"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
|
|
10051
|
-
"on:dblclick"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
10052
|
-
"on:drag"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
10053
|
-
"on:dragend"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
10054
|
-
"on:dragenter"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
10055
|
-
"on:dragexit"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
10056
|
-
"on:dragleave"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
10057
|
-
"on:dragover"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
10058
|
-
"on:dragstart"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
10059
|
-
"on:drop"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
10060
|
-
"on:durationchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10061
|
-
"on:emptied"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10062
|
-
"on:ended"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10063
|
-
"on:error"?: EventHandlerWithOptionsUnion<T, ErrorEvent> | undefined;
|
|
10064
|
-
"on:focus"?: EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>> | undefined;
|
|
10065
|
-
"on:focusin"?: EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>> | undefined;
|
|
10066
|
-
"on:focusout"?: EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>> | undefined;
|
|
10067
|
-
"on:formdata"?: EventHandlerWithOptionsUnion<T, FormDataEvent> | undefined;
|
|
10068
|
-
"on:fullscreenchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10069
|
-
"on:fullscreenerror"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10070
|
-
"on:gotpointercapture"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10071
|
-
"on:input"?: EventHandlerWithOptionsUnion<T, InputEvent, InputEventHandler<T, InputEvent>> | undefined;
|
|
10072
|
-
"on:invalid"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10073
|
-
"on:keydown"?: EventHandlerWithOptionsUnion<T, KeyboardEvent> | undefined;
|
|
10074
|
-
"on:keypress"?: EventHandlerWithOptionsUnion<T, KeyboardEvent> | undefined;
|
|
10075
|
-
"on:keyup"?: EventHandlerWithOptionsUnion<T, KeyboardEvent> | undefined;
|
|
10076
|
-
"on:load"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10077
|
-
"on:loadeddata"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10078
|
-
"on:loadedmetadata"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10079
|
-
"on:loadstart"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10080
|
-
"on:lostpointercapture"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10081
|
-
"on:mousedown"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
10082
|
-
"on:mouseenter"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
10083
|
-
"on:mouseleave"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
10084
|
-
"on:mousemove"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
10085
|
-
"on:mouseout"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
10086
|
-
"on:mouseover"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
10087
|
-
"on:mouseup"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
10088
|
-
"on:paste"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
|
|
10089
|
-
"on:pause"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10090
|
-
"on:play"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10091
|
-
"on:playing"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10092
|
-
"on:pointercancel"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10093
|
-
"on:pointerdown"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10094
|
-
"on:pointerenter"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10095
|
-
"on:pointerleave"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10096
|
-
"on:pointermove"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10097
|
-
"on:pointerout"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10098
|
-
"on:pointerover"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10099
|
-
"on:pointerrawupdate"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10100
|
-
"on:pointerup"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10101
|
-
"on:progress"?: EventHandlerWithOptionsUnion<T, ProgressEvent> | undefined;
|
|
10102
|
-
"on:ratechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10103
|
-
"on:reset"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10104
|
-
"on:resize"?: EventHandlerWithOptionsUnion<T, UIEvent> | undefined;
|
|
10105
|
-
"on:scroll"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10106
|
-
"on:scrollend"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10107
|
-
"on:scrollsnapchange"?: EventHandlerWithOptionsUnion<T, SnapEvent> | undefined;
|
|
10108
|
-
"on:scrollsnapchanging"?: EventHandlerWithOptionsUnion<T, SnapEvent> | undefined;
|
|
10109
|
-
"on:securitypolicyviolation"?: EventHandlerWithOptionsUnion<T, SecurityPolicyViolationEvent> | undefined;
|
|
10110
|
-
"on:seeked"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10111
|
-
"on:seeking"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10112
|
-
"on:select"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10113
|
-
"on:selectionchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10114
|
-
"on:selectstart"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10115
|
-
"on:slotchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10116
|
-
"on:stalled"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10117
|
-
"on:submit"?: EventHandlerWithOptionsUnion<T, SubmitEvent> | undefined;
|
|
10118
|
-
"on:suspend"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10119
|
-
"on:timeupdate"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10120
|
-
"on:toggle"?: EventHandlerWithOptionsUnion<T, ToggleEvent> | undefined;
|
|
10121
|
-
"on:touchcancel"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
|
|
10122
|
-
"on:touchend"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
|
|
10123
|
-
"on:touchmove"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
|
|
10124
|
-
"on:touchstart"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
|
|
10125
|
-
"on:transitioncancel"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
|
|
10126
|
-
"on:transitionend"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
|
|
10127
|
-
"on:transitionrun"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
|
|
10128
|
-
"on:transitionstart"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
|
|
10129
|
-
"on:volumechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10130
|
-
"on:waiting"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10131
|
-
"on:wheel"?: EventHandlerWithOptionsUnion<T, WheelEvent> | undefined;
|
|
10132
9985
|
} // EventName = "click" | "mousedown" ...
|
|
10133
|
-
type EventName = (keyof EventHandlersWindow<any> extends infer K ? K extends `on
|
|
10134
|
-
type ExtractEventType<T> = { [K in keyof T as K extends `on
|
|
9986
|
+
type EventName = (keyof EventHandlersWindow<any> extends infer K ? K extends `on${infer T}` ? Lowercase<T> : never : never) | (keyof EventHandlersElement<any> extends infer K ? K extends `on${infer T}` ? Lowercase<T> : never : never) | (string & {});
|
|
9987
|
+
type ExtractEventType<T> = { [K in keyof T as K extends `on${infer Name}` ? Name : never]: T[K] extends EventHandlerUnion<Element, infer E> ? E : never }; // EventType["click"] = MouseEvent
|
|
10135
9988
|
type EventType = ExtractEventType<EventHandlersElement<Element>> & ExtractEventType<EventHandlersWindow<Element>>; // GLOBAL ATTRIBUTES
|
|
10136
9989
|
/**
|
|
10137
9990
|
* Global `Element` + `Node` interface keys, shared by all tags regardless of their namespace:
|
|
@@ -10139,7 +9992,7 @@ declare namespace JSX {
|
|
|
10139
9992
|
* 1. That's `keys` that are defined BY ALL `HTMLElement/SVGElement/MathMLElement` interfaces.
|
|
10140
9993
|
* 2. Includes `keys` defined by `Element` and `Node` interfaces.
|
|
10141
9994
|
*/
|
|
10142
|
-
interface ElementAttributes<T> extends CustomAttributes<T>, PropAttributes,
|
|
9995
|
+
interface ElementAttributes<T> extends CustomAttributes<T>, PropAttributes, EventHandlersElement<T>, AriaAttributes {
|
|
10143
9996
|
// [key: ClassKeys]: boolean;
|
|
10144
9997
|
// properties
|
|
10145
9998
|
innerHTML?: string;
|
|
@@ -10158,7 +10011,7 @@ declare namespace JSX {
|
|
|
10158
10011
|
* with reactive values directly; manually-built strings re-run the whole
|
|
10159
10012
|
* concatenation on every change instead of toggling the affected classes.
|
|
10160
10013
|
*/
|
|
10161
|
-
class?:
|
|
10014
|
+
class?: ClassValue | RemoveAttribute;
|
|
10162
10015
|
elementtiming?: string | RemoveAttribute;
|
|
10163
10016
|
id?: string | RemoveAttribute;
|
|
10164
10017
|
nonce?: string | RemoveAttribute;
|
|
@@ -10601,9 +10454,7 @@ declare namespace JSX {
|
|
|
10601
10454
|
preload?: "none" | "metadata" | "auto" | EnumeratedAcceptsEmpty | RemoveAttribute;
|
|
10602
10455
|
src?: string | RemoveAttribute;
|
|
10603
10456
|
onEncrypted?: EventHandlerUnion<T, MediaEncryptedEvent> | undefined;
|
|
10604
|
-
"on:encrypted"?: EventHandlerWithOptionsUnion<T, MediaEncryptedEvent> | undefined;
|
|
10605
10457
|
onWaitingForKey?: EventHandlerUnion<T, Event> | undefined;
|
|
10606
|
-
"on:waitingforkey"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10607
10458
|
/** @deprecated */
|
|
10608
10459
|
mediagroup?: string | RemoveAttribute; // special cases locked to properties
|
|
10609
10460
|
muted?: BooleanProperty | RemoveProperty;
|
|
@@ -10888,9 +10739,7 @@ declare namespace JSX {
|
|
|
10888
10739
|
poster?: string | RemoveAttribute;
|
|
10889
10740
|
width?: number | string | RemoveAttribute;
|
|
10890
10741
|
onEnterPictureInPicture?: EventHandlerUnion<T, PictureInPictureEvent> | undefined;
|
|
10891
|
-
"on:enterpictureinpicture"?: EventHandlerWithOptionsUnion<T, PictureInPictureEvent> | undefined;
|
|
10892
10742
|
onLeavePictureInPicture?: EventHandlerUnion<T, PictureInPictureEvent> | undefined;
|
|
10893
|
-
"on:leavepictureinpicture"?: EventHandlerWithOptionsUnion<T, PictureInPictureEvent> | undefined;
|
|
10894
10743
|
}
|
|
10895
10744
|
interface WebViewHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
10896
10745
|
allowpopups?: BooleanAttribute | RemoveAttribute;
|
|
@@ -10932,7 +10781,7 @@ declare namespace JSX {
|
|
|
10932
10781
|
* with reactive values directly; manually-built strings re-run the whole
|
|
10933
10782
|
* concatenation on every change instead of toggling the affected classes.
|
|
10934
10783
|
*/
|
|
10935
|
-
class?:
|
|
10784
|
+
class?: ClassValue | RemoveAttribute;
|
|
10936
10785
|
style?: CSSProperties | string | RemoveAttribute;
|
|
10937
10786
|
}
|
|
10938
10787
|
interface TransformableSVGAttributes {
|
|
@@ -11039,11 +10888,8 @@ declare namespace JSX {
|
|
|
11039
10888
|
}
|
|
11040
10889
|
interface AnimationElementSVGAttributes<T> extends SVGAttributes<T>, ExternalResourceSVGAttributes, ConditionalProcessingSVGAttributes {
|
|
11041
10890
|
onBegin?: EventHandlerUnion<T, TimeEvent> | undefined;
|
|
11042
|
-
"on:begin"?: EventHandlerWithOptionsUnion<T, TimeEvent> | undefined;
|
|
11043
10891
|
onEnd?: EventHandlerUnion<T, TimeEvent> | undefined;
|
|
11044
|
-
"on:end"?: EventHandlerWithOptionsUnion<T, TimeEvent> | undefined;
|
|
11045
10892
|
onRepeat?: EventHandlerUnion<T, TimeEvent> | undefined;
|
|
11046
|
-
"on:repeat"?: EventHandlerWithOptionsUnion<T, TimeEvent> | undefined;
|
|
11047
10893
|
}
|
|
11048
10894
|
interface ContainerElementSVGAttributes<T> extends SVGAttributes<T>, ShapeElementSVGAttributes<T>, Pick<PresentationSVGAttributes, "clip-path" | "mask" | "cursor" | "opacity" | "filter" | "enable-background" | "color-interpolation" | "color-rendering"> {}
|
|
11049
10895
|
interface FilterPrimitiveElementSVGAttributes<T> extends SVGAttributes<T>, Pick<PresentationSVGAttributes, "color-interpolation-filters"> {
|
package/types-cjs/sld.d.cts
CHANGED
|
@@ -9293,7 +9293,7 @@ type SkipPropsFrom = HTMLUnknownElement & HTMLElement & Element & Node;
|
|
|
9293
9293
|
* - `HTMLButtonElement.popoverTargetElement` / `commandForElement` (and the same via
|
|
9294
9294
|
* `PopoverTargetAttributes` mixin on `HTMLInputElement`)
|
|
9295
9295
|
*/
|
|
9296
|
-
type PropValue = string | number | boolean | null | MediaStream | MediaSource | Blob | File | Element;
|
|
9296
|
+
type PropValue = string | number | boolean | null | MediaStream | MediaSource | Blob | File | Date | Element;
|
|
9297
9297
|
/**
|
|
9298
9298
|
* Ergonomics widening for emitted `prop:*` value types:
|
|
9299
9299
|
*
|
|
@@ -9360,10 +9360,9 @@ type PropKey<T, K extends keyof T> = K extends keyof SkipPropsFrom ? never : K e
|
|
|
9360
9360
|
*
|
|
9361
9361
|
* - Event handlers use `camelCase` such `onClick` and will be delegated when possible, bubbling
|
|
9362
9362
|
* through the component tree, not the dom tree.
|
|
9363
|
-
* -
|
|
9364
|
-
*
|
|
9363
|
+
* - Event handlers use camelCase attributes; native listener options should be handled with `ref`
|
|
9364
|
+
* callbacks that call `addEventListener` directly.
|
|
9365
9365
|
* - A global case-insensitive event handler can be added by extending `EventHandlersElement<T>`
|
|
9366
|
-
* - A native `on:` event handler can be added by extending `CustomEvents<T>` interface
|
|
9367
9366
|
*
|
|
9368
9367
|
* ## Boolean Attributes (property setter that accepts `true | false`):
|
|
9369
9368
|
*
|
|
@@ -9479,10 +9478,6 @@ declare namespace JSX {
|
|
|
9479
9478
|
1: any;
|
|
9480
9479
|
}
|
|
9481
9480
|
type EventHandlerUnion<T, E extends Event, EHandler extends EventHandler<T, any> = EventHandler<T, E>> = EHandler | BoundEventHandler<T, E, EHandler>;
|
|
9482
|
-
interface EventHandlerWithOptions<T, E extends Event, EHandler = EventHandler<T, E>> extends AddEventListenerOptions, EventListenerOptions {
|
|
9483
|
-
handleEvent: EHandler;
|
|
9484
|
-
}
|
|
9485
|
-
type EventHandlerWithOptionsUnion<T, E extends Event, EHandler extends EventHandler<T, any> = EventHandler<T, E>> = EHandler | EventHandlerWithOptions<T, E, EHandler>;
|
|
9486
9481
|
interface InputEventHandler<T, E extends InputEvent> {
|
|
9487
9482
|
(e: E & {
|
|
9488
9483
|
currentTarget: T;
|
|
@@ -9504,7 +9499,7 @@ declare namespace JSX {
|
|
|
9504
9499
|
}): void;
|
|
9505
9500
|
}
|
|
9506
9501
|
type FocusEventHandlerUnion<T, E extends FocusEvent> = EventHandlerUnion<T, E, FocusEventHandler<T, E>>; // end event handlers
|
|
9507
|
-
type
|
|
9502
|
+
export type ClassValue = string | Record<string, boolean> | Array<string | number | boolean | null | undefined | Record<string, boolean>>;
|
|
9508
9503
|
const SERIALIZABLE: unique symbol;
|
|
9509
9504
|
interface SerializableAttributeValue {
|
|
9510
9505
|
toString(): string;
|
|
@@ -9521,9 +9516,7 @@ declare namespace JSX {
|
|
|
9521
9516
|
$ServerOnly?: boolean | undefined;
|
|
9522
9517
|
}
|
|
9523
9518
|
interface ExplicitProperties {}
|
|
9524
|
-
interface CustomEvents {}
|
|
9525
9519
|
type PropAttributes = { [Key in keyof ExplicitProperties as `prop:${Key}`]?: ExplicitProperties[Key] };
|
|
9526
|
-
type OnAttributes<T> = { [Key in keyof CustomEvents as `on:${Key}`]?: EventHandlerWithOptionsUnion<T, CustomEvents[Key]> };
|
|
9527
9520
|
/**
|
|
9528
9521
|
* Writable, element-specific DOM properties exposed as `prop:*` attributes, auto-derived
|
|
9529
9522
|
* from the element interface `T`. See `./jsx-properties.d.ts` for the filtering rules.
|
|
@@ -9536,10 +9529,6 @@ declare namespace JSX {
|
|
|
9536
9529
|
[key: `-${string}`]: string | number | undefined;
|
|
9537
9530
|
} // TODO: Should we allow this?
|
|
9538
9531
|
// type ClassKeys = `class:${string}`;
|
|
9539
|
-
// type CSSKeys = Exclude<keyof csstype.PropertiesHyphen, `-${string}`>;
|
|
9540
|
-
// type CSSAttributes = {
|
|
9541
|
-
// [key in CSSKeys as `style:${key}`]: csstype.PropertiesHyphen[key];
|
|
9542
|
-
// };
|
|
9543
9532
|
// BOOLEAN
|
|
9544
9533
|
/**
|
|
9545
9534
|
* Boolean and Pseudo-Boolean Attributes Helpers.
|
|
@@ -9870,31 +9859,7 @@ declare namespace JSX {
|
|
|
9870
9859
|
onStorage?: EventHandlerUnion<T, StorageEvent> | undefined;
|
|
9871
9860
|
onUnhandledRejection?: EventHandlerUnion<T, PromiseRejectionEvent> | undefined;
|
|
9872
9861
|
onUnload?: EventHandlerUnion<T, Event> | undefined;
|
|
9873
|
-
"on:afterprint"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
9874
|
-
"on:beforeprint"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
9875
|
-
"on:beforeunload"?: EventHandlerWithOptionsUnion<T, BeforeUnloadEvent> | undefined;
|
|
9876
|
-
"on:devicemotion"?: EventHandlerWithOptionsUnion<T, DeviceMotionEvent> | undefined;
|
|
9877
|
-
"on:deviceorientation"?: EventHandlerWithOptionsUnion<T, DeviceOrientationEvent> | undefined;
|
|
9878
|
-
"on:deviceorientationabsolute"?: EventHandlerWithOptionsUnion<T, DeviceOrientationEvent> | undefined;
|
|
9879
|
-
"on:gamepadconnected"?: EventHandlerWithOptionsUnion<T, GamepadEvent> | undefined;
|
|
9880
|
-
"on:gamepaddisconnected"?: EventHandlerWithOptionsUnion<T, GamepadEvent> | undefined;
|
|
9881
|
-
"on:hashchange"?: EventHandlerWithOptionsUnion<T, HashChangeEvent> | undefined;
|
|
9882
|
-
"on:languagechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
9883
|
-
"on:message"?: EventHandlerWithOptionsUnion<T, MessageEvent> | undefined;
|
|
9884
|
-
"on:messageerror"?: EventHandlerWithOptionsUnion<T, MessageEvent> | undefined;
|
|
9885
|
-
"on:offline"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
9886
|
-
"on:online"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
9887
9862
|
/** @deprecated Use `screen.orientation` (`ScreenOrientation.change`) instead. */
|
|
9888
|
-
"on:orientationchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
9889
|
-
"on:pagehide"?: EventHandlerWithOptionsUnion<T, PageTransitionEvent> | undefined;
|
|
9890
|
-
"on:pagereveal"?: EventHandlerWithOptionsUnion<T, PageRevealEvent> | undefined;
|
|
9891
|
-
"on:pageshow"?: EventHandlerWithOptionsUnion<T, PageTransitionEvent> | undefined;
|
|
9892
|
-
"on:pageswap"?: EventHandlerWithOptionsUnion<T, PageSwapEvent> | undefined;
|
|
9893
|
-
"on:popstate"?: EventHandlerWithOptionsUnion<T, PopStateEvent> | undefined;
|
|
9894
|
-
"on:rejectionhandled"?: EventHandlerWithOptionsUnion<T, PromiseRejectionEvent> | undefined;
|
|
9895
|
-
"on:storage"?: EventHandlerWithOptionsUnion<T, StorageEvent> | undefined;
|
|
9896
|
-
"on:unhandledrejection"?: EventHandlerWithOptionsUnion<T, PromiseRejectionEvent> | undefined;
|
|
9897
|
-
"on:unload"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
9898
9863
|
}
|
|
9899
9864
|
/**
|
|
9900
9865
|
* Global `EventHandlersElement`, defined for all tags.
|
|
@@ -10017,121 +9982,9 @@ declare namespace JSX {
|
|
|
10017
9982
|
onVolumeChange?: EventHandlerUnion<T, Event> | undefined;
|
|
10018
9983
|
onWaiting?: EventHandlerUnion<T, Event> | undefined;
|
|
10019
9984
|
onWheel?: EventHandlerUnion<T, WheelEvent> | undefined;
|
|
10020
|
-
"on:abort"?: EventHandlerWithOptionsUnion<T, UIEvent> | undefined;
|
|
10021
|
-
"on:animationcancel"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
|
|
10022
|
-
"on:animationend"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
|
|
10023
|
-
"on:animationiteration"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
|
|
10024
|
-
"on:animationstart"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
|
|
10025
|
-
"on:auxclick"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10026
|
-
"on:beforecopy"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
|
|
10027
|
-
"on:beforecut"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
|
|
10028
|
-
"on:beforeinput"?: EventHandlerWithOptionsUnion<T, InputEvent, InputEventHandler<T, InputEvent>> | undefined;
|
|
10029
|
-
"on:beforematch"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10030
|
-
"on:beforepaste"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
|
|
10031
|
-
"on:beforetoggle"?: EventHandlerWithOptionsUnion<T, ToggleEvent> | undefined;
|
|
10032
|
-
"on:beforexrselect"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10033
|
-
"on:blur"?: EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>> | undefined;
|
|
10034
|
-
"on:cancel"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10035
|
-
"on:canplay"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10036
|
-
"on:canplaythrough"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10037
|
-
"on:change"?: EventHandlerWithOptionsUnion<T, Event, ChangeEventHandler<T, Event>> | undefined;
|
|
10038
|
-
"on:click"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
10039
|
-
"on:close"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10040
|
-
"on:command"?: EventHandlerWithOptionsUnion<T, CommandEvent> | undefined;
|
|
10041
|
-
"on:compositionend"?: EventHandlerWithOptionsUnion<T, CompositionEvent> | undefined;
|
|
10042
|
-
"on:compositionstart"?: EventHandlerWithOptionsUnion<T, CompositionEvent> | undefined;
|
|
10043
|
-
"on:compositionupdate"?: EventHandlerWithOptionsUnion<T, CompositionEvent> | undefined;
|
|
10044
|
-
"on:contentvisibilityautostatechange"?: EventHandlerWithOptionsUnion<T, ContentVisibilityAutoStateChangeEvent> | undefined;
|
|
10045
|
-
"on:contextlost"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10046
|
-
"on:contextmenu"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10047
|
-
"on:contextrestored"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10048
|
-
"on:copy"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
|
|
10049
|
-
"on:cuechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10050
|
-
"on:cut"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
|
|
10051
|
-
"on:dblclick"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
10052
|
-
"on:drag"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
10053
|
-
"on:dragend"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
10054
|
-
"on:dragenter"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
10055
|
-
"on:dragexit"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
10056
|
-
"on:dragleave"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
10057
|
-
"on:dragover"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
10058
|
-
"on:dragstart"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
10059
|
-
"on:drop"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
10060
|
-
"on:durationchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10061
|
-
"on:emptied"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10062
|
-
"on:ended"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10063
|
-
"on:error"?: EventHandlerWithOptionsUnion<T, ErrorEvent> | undefined;
|
|
10064
|
-
"on:focus"?: EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>> | undefined;
|
|
10065
|
-
"on:focusin"?: EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>> | undefined;
|
|
10066
|
-
"on:focusout"?: EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>> | undefined;
|
|
10067
|
-
"on:formdata"?: EventHandlerWithOptionsUnion<T, FormDataEvent> | undefined;
|
|
10068
|
-
"on:fullscreenchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10069
|
-
"on:fullscreenerror"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10070
|
-
"on:gotpointercapture"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10071
|
-
"on:input"?: EventHandlerWithOptionsUnion<T, InputEvent, InputEventHandler<T, InputEvent>> | undefined;
|
|
10072
|
-
"on:invalid"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10073
|
-
"on:keydown"?: EventHandlerWithOptionsUnion<T, KeyboardEvent> | undefined;
|
|
10074
|
-
"on:keypress"?: EventHandlerWithOptionsUnion<T, KeyboardEvent> | undefined;
|
|
10075
|
-
"on:keyup"?: EventHandlerWithOptionsUnion<T, KeyboardEvent> | undefined;
|
|
10076
|
-
"on:load"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10077
|
-
"on:loadeddata"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10078
|
-
"on:loadedmetadata"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10079
|
-
"on:loadstart"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10080
|
-
"on:lostpointercapture"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10081
|
-
"on:mousedown"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
10082
|
-
"on:mouseenter"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
10083
|
-
"on:mouseleave"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
10084
|
-
"on:mousemove"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
10085
|
-
"on:mouseout"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
10086
|
-
"on:mouseover"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
10087
|
-
"on:mouseup"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
10088
|
-
"on:paste"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
|
|
10089
|
-
"on:pause"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10090
|
-
"on:play"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10091
|
-
"on:playing"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10092
|
-
"on:pointercancel"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10093
|
-
"on:pointerdown"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10094
|
-
"on:pointerenter"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10095
|
-
"on:pointerleave"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10096
|
-
"on:pointermove"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10097
|
-
"on:pointerout"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10098
|
-
"on:pointerover"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10099
|
-
"on:pointerrawupdate"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10100
|
-
"on:pointerup"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
10101
|
-
"on:progress"?: EventHandlerWithOptionsUnion<T, ProgressEvent> | undefined;
|
|
10102
|
-
"on:ratechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10103
|
-
"on:reset"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10104
|
-
"on:resize"?: EventHandlerWithOptionsUnion<T, UIEvent> | undefined;
|
|
10105
|
-
"on:scroll"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10106
|
-
"on:scrollend"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10107
|
-
"on:scrollsnapchange"?: EventHandlerWithOptionsUnion<T, SnapEvent> | undefined;
|
|
10108
|
-
"on:scrollsnapchanging"?: EventHandlerWithOptionsUnion<T, SnapEvent> | undefined;
|
|
10109
|
-
"on:securitypolicyviolation"?: EventHandlerWithOptionsUnion<T, SecurityPolicyViolationEvent> | undefined;
|
|
10110
|
-
"on:seeked"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10111
|
-
"on:seeking"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10112
|
-
"on:select"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10113
|
-
"on:selectionchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10114
|
-
"on:selectstart"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10115
|
-
"on:slotchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10116
|
-
"on:stalled"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10117
|
-
"on:submit"?: EventHandlerWithOptionsUnion<T, SubmitEvent> | undefined;
|
|
10118
|
-
"on:suspend"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10119
|
-
"on:timeupdate"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10120
|
-
"on:toggle"?: EventHandlerWithOptionsUnion<T, ToggleEvent> | undefined;
|
|
10121
|
-
"on:touchcancel"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
|
|
10122
|
-
"on:touchend"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
|
|
10123
|
-
"on:touchmove"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
|
|
10124
|
-
"on:touchstart"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
|
|
10125
|
-
"on:transitioncancel"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
|
|
10126
|
-
"on:transitionend"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
|
|
10127
|
-
"on:transitionrun"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
|
|
10128
|
-
"on:transitionstart"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
|
|
10129
|
-
"on:volumechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10130
|
-
"on:waiting"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10131
|
-
"on:wheel"?: EventHandlerWithOptionsUnion<T, WheelEvent> | undefined;
|
|
10132
9985
|
} // EventName = "click" | "mousedown" ...
|
|
10133
|
-
type EventName = (keyof EventHandlersWindow<any> extends infer K ? K extends `on
|
|
10134
|
-
type ExtractEventType<T> = { [K in keyof T as K extends `on
|
|
9986
|
+
type EventName = (keyof EventHandlersWindow<any> extends infer K ? K extends `on${infer T}` ? Lowercase<T> : never : never) | (keyof EventHandlersElement<any> extends infer K ? K extends `on${infer T}` ? Lowercase<T> : never : never) | (string & {});
|
|
9987
|
+
type ExtractEventType<T> = { [K in keyof T as K extends `on${infer Name}` ? Name : never]: T[K] extends EventHandlerUnion<Element, infer E> ? E : never }; // EventType["click"] = MouseEvent
|
|
10135
9988
|
type EventType = ExtractEventType<EventHandlersElement<Element>> & ExtractEventType<EventHandlersWindow<Element>>; // GLOBAL ATTRIBUTES
|
|
10136
9989
|
/**
|
|
10137
9990
|
* Global `Element` + `Node` interface keys, shared by all tags regardless of their namespace:
|
|
@@ -10139,7 +9992,7 @@ declare namespace JSX {
|
|
|
10139
9992
|
* 1. That's `keys` that are defined BY ALL `HTMLElement/SVGElement/MathMLElement` interfaces.
|
|
10140
9993
|
* 2. Includes `keys` defined by `Element` and `Node` interfaces.
|
|
10141
9994
|
*/
|
|
10142
|
-
interface ElementAttributes<T> extends CustomAttributes<T>, PropAttributes,
|
|
9995
|
+
interface ElementAttributes<T> extends CustomAttributes<T>, PropAttributes, EventHandlersElement<T>, AriaAttributes {
|
|
10143
9996
|
// [key: ClassKeys]: boolean;
|
|
10144
9997
|
// properties
|
|
10145
9998
|
innerHTML?: string;
|
|
@@ -10158,7 +10011,7 @@ declare namespace JSX {
|
|
|
10158
10011
|
* with reactive values directly; manually-built strings re-run the whole
|
|
10159
10012
|
* concatenation on every change instead of toggling the affected classes.
|
|
10160
10013
|
*/
|
|
10161
|
-
class?:
|
|
10014
|
+
class?: ClassValue | RemoveAttribute;
|
|
10162
10015
|
elementtiming?: string | RemoveAttribute;
|
|
10163
10016
|
id?: string | RemoveAttribute;
|
|
10164
10017
|
nonce?: string | RemoveAttribute;
|
|
@@ -10601,9 +10454,7 @@ declare namespace JSX {
|
|
|
10601
10454
|
preload?: "none" | "metadata" | "auto" | EnumeratedAcceptsEmpty | RemoveAttribute;
|
|
10602
10455
|
src?: string | RemoveAttribute;
|
|
10603
10456
|
onEncrypted?: EventHandlerUnion<T, MediaEncryptedEvent> | undefined;
|
|
10604
|
-
"on:encrypted"?: EventHandlerWithOptionsUnion<T, MediaEncryptedEvent> | undefined;
|
|
10605
10457
|
onWaitingForKey?: EventHandlerUnion<T, Event> | undefined;
|
|
10606
|
-
"on:waitingforkey"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
10607
10458
|
/** @deprecated */
|
|
10608
10459
|
mediagroup?: string | RemoveAttribute; // special cases locked to properties
|
|
10609
10460
|
muted?: BooleanProperty | RemoveProperty;
|
|
@@ -10888,9 +10739,7 @@ declare namespace JSX {
|
|
|
10888
10739
|
poster?: string | RemoveAttribute;
|
|
10889
10740
|
width?: number | string | RemoveAttribute;
|
|
10890
10741
|
onEnterPictureInPicture?: EventHandlerUnion<T, PictureInPictureEvent> | undefined;
|
|
10891
|
-
"on:enterpictureinpicture"?: EventHandlerWithOptionsUnion<T, PictureInPictureEvent> | undefined;
|
|
10892
10742
|
onLeavePictureInPicture?: EventHandlerUnion<T, PictureInPictureEvent> | undefined;
|
|
10893
|
-
"on:leavepictureinpicture"?: EventHandlerWithOptionsUnion<T, PictureInPictureEvent> | undefined;
|
|
10894
10743
|
}
|
|
10895
10744
|
interface WebViewHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
10896
10745
|
allowpopups?: BooleanAttribute | RemoveAttribute;
|
|
@@ -10932,7 +10781,7 @@ declare namespace JSX {
|
|
|
10932
10781
|
* with reactive values directly; manually-built strings re-run the whole
|
|
10933
10782
|
* concatenation on every change instead of toggling the affected classes.
|
|
10934
10783
|
*/
|
|
10935
|
-
class?:
|
|
10784
|
+
class?: ClassValue | RemoveAttribute;
|
|
10936
10785
|
style?: CSSProperties | string | RemoveAttribute;
|
|
10937
10786
|
}
|
|
10938
10787
|
interface TransformableSVGAttributes {
|
|
@@ -11039,11 +10888,8 @@ declare namespace JSX {
|
|
|
11039
10888
|
}
|
|
11040
10889
|
interface AnimationElementSVGAttributes<T> extends SVGAttributes<T>, ExternalResourceSVGAttributes, ConditionalProcessingSVGAttributes {
|
|
11041
10890
|
onBegin?: EventHandlerUnion<T, TimeEvent> | undefined;
|
|
11042
|
-
"on:begin"?: EventHandlerWithOptionsUnion<T, TimeEvent> | undefined;
|
|
11043
10891
|
onEnd?: EventHandlerUnion<T, TimeEvent> | undefined;
|
|
11044
|
-
"on:end"?: EventHandlerWithOptionsUnion<T, TimeEvent> | undefined;
|
|
11045
10892
|
onRepeat?: EventHandlerUnion<T, TimeEvent> | undefined;
|
|
11046
|
-
"on:repeat"?: EventHandlerWithOptionsUnion<T, TimeEvent> | undefined;
|
|
11047
10893
|
}
|
|
11048
10894
|
interface ContainerElementSVGAttributes<T> extends SVGAttributes<T>, ShapeElementSVGAttributes<T>, Pick<PresentationSVGAttributes, "clip-path" | "mask" | "cursor" | "opacity" | "filter" | "enable-background" | "color-interpolation" | "color-rendering"> {}
|
|
11049
10895
|
interface FilterPrimitiveElementSVGAttributes<T> extends SVGAttributes<T>, Pick<PresentationSVGAttributes, "color-interpolation-filters"> {
|