typed-dom
Advanced tools
Comparing version 0.0.332 to 0.0.333
@@ -28,3 +28,3 @@ declare global { | ||
SVG = "SVG", | ||
MathML = "MathML" | ||
Math = "MathML" | ||
} | ||
@@ -50,6 +50,7 @@ interface NodeEvent<N extends Node> extends Event { | ||
export declare const svg: Factory<SVGElementTagNameMap>; | ||
export declare const math: Factory<MathMLElementTagNameMap>; | ||
export declare function text(source: string): Text; | ||
export declare function element<M extends HTMLElementTagNameMap>(context: Document | ShadowRoot, ns: NS.HTML): Factory<M>; | ||
export declare function element<M extends SVGElementTagNameMap>(context: Document | ShadowRoot, ns: NS.SVG): Factory<M>; | ||
export declare function element<M extends TagNameMap>(context: Document | ShadowRoot, ns: NS.MathML): Factory<M>; | ||
export declare function element<M extends MathMLElementTagNameMap>(context: Document | ShadowRoot, ns: NS.Math): Factory<M>; | ||
export declare function define<E extends Element>(el: E, attrs?: Attrs<E>, children?: Children): E; | ||
@@ -56,0 +57,0 @@ export declare function define<E extends Element | DocumentFragment | ShadowRoot>(node: E, children?: Children): E; |
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.332 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! typed-dom v0.0.333 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -119,3 +119,3 @@ if(typeof exports === 'object' && typeof module === 'object') | ||
})); | ||
exports.defrag = exports.prepend = exports.append = exports.isChildren = exports.define = exports.element = exports.text = exports.svg = exports.html = exports.frag = exports.shadow = void 0; | ||
exports.defrag = exports.prepend = exports.append = exports.isChildren = exports.define = exports.element = exports.text = exports.math = exports.svg = exports.html = exports.frag = exports.shadow = void 0; | ||
const alias_1 = __webpack_require__(5406); | ||
@@ -145,2 +145,3 @@ const memoize_1 = __webpack_require__(1808); | ||
exports.svg = element(document, "SVG" /* NS.SVG */); | ||
exports.math = element(document, "MathML" /* NS.Math */); | ||
function text(source) { | ||
@@ -166,3 +167,3 @@ return document.createTextNode(source); | ||
return context.createElementNS('http://www.w3.org/2000/svg', tag, opts); | ||
case "MathML" /* NS.MathML */: | ||
case "MathML" /* NS.Math */: | ||
return context.createElementNS('http://www.w3.org/1998/Math/MathML', tag, opts); | ||
@@ -169,0 +170,0 @@ } |
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.332 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! typed-dom v0.0.333 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -3,0 +3,0 @@ if(typeof exports === 'object' && typeof module === 'object') |
export type { El } from './src/proxy'; | ||
export { API, Shadow, HTML, SVG } from './src/builder'; | ||
export { API, Shadow, HTML, SVG, Math } from './src/builder'; | ||
export { NS, Attrs, Children, Factory } from './src/util/dom'; | ||
export { shadow, frag, html, svg, text, element, define, append, prepend, defrag } from './src/util/dom'; | ||
export { shadow, frag, html, svg, math, text, element, define, append, prepend, defrag } from './src/util/dom'; | ||
export { listen, delegate, bind, once, currentTarget } from './src/util/listener'; | ||
export { querySelectorAll, querySelectorWith, querySelectorAllWith } from './src/util/query'; | ||
export { identity } from './src/util/identity'; |
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.332 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! typed-dom v0.0.333 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -651,3 +651,3 @@ if(typeof exports === 'object' && typeof module === 'object') | ||
})); | ||
exports.SVG = exports.HTML = exports.Shadow = exports.API = void 0; | ||
exports.Math = exports.SVG = exports.HTML = exports.Shadow = exports.API = void 0; | ||
const proxy_1 = __webpack_require__(3965); | ||
@@ -662,2 +662,3 @@ const dom_1 = __webpack_require__(7521); | ||
exports.SVG = API(dom_1.svg); | ||
exports.Math = API(dom_1.math); | ||
function handle(baseFactory, container) { | ||
@@ -1043,3 +1044,3 @@ return { | ||
})); | ||
exports.defrag = exports.prepend = exports.append = exports.isChildren = exports.define = exports.element = exports.text = exports.svg = exports.html = exports.frag = exports.shadow = void 0; | ||
exports.defrag = exports.prepend = exports.append = exports.isChildren = exports.define = exports.element = exports.text = exports.math = exports.svg = exports.html = exports.frag = exports.shadow = void 0; | ||
const alias_1 = __webpack_require__(5406); | ||
@@ -1069,2 +1070,3 @@ const memoize_1 = __webpack_require__(1808); | ||
exports.svg = element(document, "SVG" /* NS.SVG */); | ||
exports.math = element(document, "MathML" /* NS.Math */); | ||
function text(source) { | ||
@@ -1090,3 +1092,3 @@ return document.createTextNode(source); | ||
return context.createElementNS('http://www.w3.org/2000/svg', tag, opts); | ||
case "MathML" /* NS.MathML */: | ||
case "MathML" /* NS.Math */: | ||
return context.createElementNS('http://www.w3.org/1998/Math/MathML', tag, opts); | ||
@@ -1425,3 +1427,3 @@ } | ||
})); | ||
exports.identity = exports.querySelectorAllWith = exports.querySelectorWith = exports.querySelectorAll = exports.currentTarget = exports.once = exports.bind = exports.delegate = exports.listen = exports.defrag = exports.prepend = exports.append = exports.define = exports.element = exports.text = exports.svg = exports.html = exports.frag = exports.shadow = exports.SVG = exports.HTML = exports.Shadow = exports.API = void 0; | ||
exports.identity = exports.querySelectorAllWith = exports.querySelectorWith = exports.querySelectorAll = exports.currentTarget = exports.once = exports.bind = exports.delegate = exports.listen = exports.defrag = exports.prepend = exports.append = exports.define = exports.element = exports.text = exports.math = exports.svg = exports.html = exports.frag = exports.shadow = exports.Math = exports.SVG = exports.HTML = exports.Shadow = exports.API = void 0; | ||
var builder_1 = __webpack_require__(9048); | ||
@@ -1452,2 +1454,8 @@ Object.defineProperty(exports, "API", ({ | ||
})); | ||
Object.defineProperty(exports, "Math", ({ | ||
enumerable: true, | ||
get: function () { | ||
return builder_1.Math; | ||
} | ||
})); | ||
var dom_1 = __webpack_require__(7521); | ||
@@ -1478,2 +1486,8 @@ Object.defineProperty(exports, "shadow", ({ | ||
})); | ||
Object.defineProperty(exports, "math", ({ | ||
enumerable: true, | ||
get: function () { | ||
return dom_1.math; | ||
} | ||
})); | ||
Object.defineProperty(exports, "text", ({ | ||
@@ -1480,0 +1494,0 @@ enumerable: true, |
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.332 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! typed-dom v0.0.333 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -3,0 +3,0 @@ if(typeof exports === 'object' && typeof module === 'object') |
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.332 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! typed-dom v0.0.333 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -651,3 +651,3 @@ if(typeof exports === 'object' && typeof module === 'object') | ||
})); | ||
exports.SVG = exports.HTML = exports.Shadow = exports.API = void 0; | ||
exports.Math = exports.SVG = exports.HTML = exports.Shadow = exports.API = void 0; | ||
const proxy_1 = __webpack_require__(3965); | ||
@@ -662,2 +662,3 @@ const dom_1 = __webpack_require__(7521); | ||
exports.SVG = API(dom_1.svg); | ||
exports.Math = API(dom_1.math); | ||
function handle(baseFactory, container) { | ||
@@ -1043,3 +1044,3 @@ return { | ||
})); | ||
exports.defrag = exports.prepend = exports.append = exports.isChildren = exports.define = exports.element = exports.text = exports.svg = exports.html = exports.frag = exports.shadow = void 0; | ||
exports.defrag = exports.prepend = exports.append = exports.isChildren = exports.define = exports.element = exports.text = exports.math = exports.svg = exports.html = exports.frag = exports.shadow = void 0; | ||
const alias_1 = __webpack_require__(5406); | ||
@@ -1069,2 +1070,3 @@ const memoize_1 = __webpack_require__(1808); | ||
exports.svg = element(document, "SVG" /* NS.SVG */); | ||
exports.math = element(document, "MathML" /* NS.Math */); | ||
function text(source) { | ||
@@ -1090,3 +1092,3 @@ return document.createTextNode(source); | ||
return context.createElementNS('http://www.w3.org/2000/svg', tag, opts); | ||
case "MathML" /* NS.MathML */: | ||
case "MathML" /* NS.Math */: | ||
return context.createElementNS('http://www.w3.org/1998/Math/MathML', tag, opts); | ||
@@ -1093,0 +1095,0 @@ } |
import type { ParseSelector } from 'typed-query-selector/parser'; | ||
export declare function querySelectorWith<T extends keyof HTMLElementTagNameMap>(node: ParentNode, selector: T): HTMLElementTagNameMap[T] | null; | ||
export declare function querySelectorWith<T extends keyof SVGElementTagNameMap>(node: ParentNode, selector: T): SVGElementTagNameMap[T] | null; | ||
export declare function querySelectorWith<T extends keyof MathMLElementTagNameMap>(node: ParentNode, selector: T): MathMLElementTagNameMap[T] | null; | ||
export declare function querySelectorWith<T extends string>(node: ParentNode, selector: T): ParseSelector<T>; | ||
@@ -8,2 +9,3 @@ export declare function querySelectorWith<T extends Element>(node: ParentNode, selector: string): T | null; | ||
export declare function querySelectorAllWith<T extends keyof SVGElementTagNameMap>(node: ParentNode, selector: T): SVGElementTagNameMap[T][]; | ||
export declare function querySelectorAllWith<T extends keyof MathMLElementTagNameMap>(node: ParentNode, selector: T): MathMLElementTagNameMap[T][]; | ||
export declare function querySelectorAllWith<T extends string>(node: ParentNode, selector: T): ParseSelector<T>[]; | ||
@@ -13,3 +15,4 @@ export declare function querySelectorAllWith<T extends Element>(node: ParentNode, selector: string): T[]; | ||
export declare function querySelectorAll<T extends keyof SVGElementTagNameMap>(node: ParentNode, selector: T): SVGElementTagNameMap[T][]; | ||
export declare function querySelectorAll<T extends keyof MathMLElementTagNameMap>(node: ParentNode, selector: T): MathMLElementTagNameMap[T][]; | ||
export declare function querySelectorAll<T extends string>(node: ParentNode, selector: T): ParseSelector<T>[]; | ||
export declare function querySelectorAll<T extends Element>(node: ParentNode, selector: string): T[]; |
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.332 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! typed-dom v0.0.333 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -3,0 +3,0 @@ if(typeof exports === 'object' && typeof module === 'object') |
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.332 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! typed-dom v0.0.333 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -119,3 +119,3 @@ if(typeof exports === 'object' && typeof module === 'object') | ||
})); | ||
exports.defrag = exports.prepend = exports.append = exports.isChildren = exports.define = exports.element = exports.text = exports.svg = exports.html = exports.frag = exports.shadow = void 0; | ||
exports.defrag = exports.prepend = exports.append = exports.isChildren = exports.define = exports.element = exports.text = exports.math = exports.svg = exports.html = exports.frag = exports.shadow = void 0; | ||
const alias_1 = __webpack_require__(5406); | ||
@@ -145,2 +145,3 @@ const memoize_1 = __webpack_require__(1808); | ||
exports.svg = element(document, "SVG" /* NS.SVG */); | ||
exports.math = element(document, "MathML" /* NS.Math */); | ||
function text(source) { | ||
@@ -166,3 +167,3 @@ return document.createTextNode(source); | ||
return context.createElementNS('http://www.w3.org/2000/svg', tag, opts); | ||
case "MathML" /* NS.MathML */: | ||
case "MathML" /* NS.Math */: | ||
return context.createElementNS('http://www.w3.org/1998/Math/MathML', tag, opts); | ||
@@ -169,0 +170,0 @@ } |
@@ -10,2 +10,3 @@ import { El } from './proxy'; | ||
export declare const SVG: API<SVGElementTagNameMap>; | ||
export declare const Math: API<MathMLElementTagNameMap>; | ||
type K<M> = keyof M & string; | ||
@@ -12,0 +13,0 @@ type E<V> = Extract<V, Element>; |
@@ -28,3 +28,3 @@ declare global { | ||
SVG = "SVG", | ||
MathML = "MathML" | ||
Math = "MathML" | ||
} | ||
@@ -50,6 +50,7 @@ interface NodeEvent<N extends Node> extends Event { | ||
export declare const svg: Factory<SVGElementTagNameMap>; | ||
export declare const math: Factory<MathMLElementTagNameMap>; | ||
export declare function text(source: string): Text; | ||
export declare function element<M extends HTMLElementTagNameMap>(context: Document | ShadowRoot, ns: NS.HTML): Factory<M>; | ||
export declare function element<M extends SVGElementTagNameMap>(context: Document | ShadowRoot, ns: NS.SVG): Factory<M>; | ||
export declare function element<M extends TagNameMap>(context: Document | ShadowRoot, ns: NS.MathML): Factory<M>; | ||
export declare function element<M extends MathMLElementTagNameMap>(context: Document | ShadowRoot, ns: NS.Math): Factory<M>; | ||
export declare function define<E extends Element>(el: E, attrs?: Attrs<E>, children?: Children): E; | ||
@@ -56,0 +57,0 @@ export declare function define<E extends Element | DocumentFragment | ShadowRoot>(node: E, children?: Children): E; |
import type { ParseSelector } from 'typed-query-selector/parser'; | ||
export declare function querySelectorWith<T extends keyof HTMLElementTagNameMap>(node: ParentNode, selector: T): HTMLElementTagNameMap[T] | null; | ||
export declare function querySelectorWith<T extends keyof SVGElementTagNameMap>(node: ParentNode, selector: T): SVGElementTagNameMap[T] | null; | ||
export declare function querySelectorWith<T extends keyof MathMLElementTagNameMap>(node: ParentNode, selector: T): MathMLElementTagNameMap[T] | null; | ||
export declare function querySelectorWith<T extends string>(node: ParentNode, selector: T): ParseSelector<T>; | ||
@@ -8,2 +9,3 @@ export declare function querySelectorWith<T extends Element>(node: ParentNode, selector: string): T | null; | ||
export declare function querySelectorAllWith<T extends keyof SVGElementTagNameMap>(node: ParentNode, selector: T): SVGElementTagNameMap[T][]; | ||
export declare function querySelectorAllWith<T extends keyof MathMLElementTagNameMap>(node: ParentNode, selector: T): MathMLElementTagNameMap[T][]; | ||
export declare function querySelectorAllWith<T extends string>(node: ParentNode, selector: T): ParseSelector<T>[]; | ||
@@ -13,3 +15,4 @@ export declare function querySelectorAllWith<T extends Element>(node: ParentNode, selector: string): T[]; | ||
export declare function querySelectorAll<T extends keyof SVGElementTagNameMap>(node: ParentNode, selector: T): SVGElementTagNameMap[T][]; | ||
export declare function querySelectorAll<T extends keyof MathMLElementTagNameMap>(node: ParentNode, selector: T): MathMLElementTagNameMap[T][]; | ||
export declare function querySelectorAll<T extends string>(node: ParentNode, selector: T): ParseSelector<T>[]; | ||
export declare function querySelectorAll<T extends Element>(node: ParentNode, selector: string): T[]; |
@@ -28,3 +28,3 @@ declare global { | ||
SVG = "SVG", | ||
MathML = "MathML" | ||
Math = "MathML" | ||
} | ||
@@ -50,6 +50,7 @@ interface NodeEvent<N extends Node> extends Event { | ||
export declare const svg: Factory<SVGElementTagNameMap>; | ||
export declare const math: Factory<MathMLElementTagNameMap>; | ||
export declare function text(source: string): Text; | ||
export declare function element<M extends HTMLElementTagNameMap>(context: Document | ShadowRoot, ns: NS.HTML): Factory<M>; | ||
export declare function element<M extends SVGElementTagNameMap>(context: Document | ShadowRoot, ns: NS.SVG): Factory<M>; | ||
export declare function element<M extends TagNameMap>(context: Document | ShadowRoot, ns: NS.MathML): Factory<M>; | ||
export declare function element<M extends MathMLElementTagNameMap>(context: Document | ShadowRoot, ns: NS.Math): Factory<M>; | ||
export declare function define<E extends Element>(el: E, attrs?: Attrs<E>, children?: Children): E; | ||
@@ -56,0 +57,0 @@ export declare function define<E extends Element | DocumentFragment | ShadowRoot>(node: E, children?: Children): E; |
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.332 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! typed-dom v0.0.333 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -119,3 +119,3 @@ if(typeof exports === 'object' && typeof module === 'object') | ||
})); | ||
exports.defrag = exports.prepend = exports.append = exports.isChildren = exports.define = exports.element = exports.text = exports.svg = exports.html = exports.frag = exports.shadow = void 0; | ||
exports.defrag = exports.prepend = exports.append = exports.isChildren = exports.define = exports.element = exports.text = exports.math = exports.svg = exports.html = exports.frag = exports.shadow = void 0; | ||
const alias_1 = __webpack_require__(5406); | ||
@@ -145,2 +145,3 @@ const memoize_1 = __webpack_require__(1808); | ||
exports.svg = element(document, "SVG" /* NS.SVG */); | ||
exports.math = element(document, "MathML" /* NS.Math */); | ||
function text(source) { | ||
@@ -166,3 +167,3 @@ return document.createTextNode(source); | ||
return context.createElementNS('http://www.w3.org/2000/svg', tag, opts); | ||
case "MathML" /* NS.MathML */: | ||
case "MathML" /* NS.Math */: | ||
return context.createElementNS('http://www.w3.org/1998/Math/MathML', tag, opts); | ||
@@ -169,0 +170,0 @@ } |
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.332 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! typed-dom v0.0.333 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -3,0 +3,0 @@ if(typeof exports === 'object' && typeof module === 'object') |
export type { El } from './src/proxy'; | ||
export { API, Shadow, HTML, SVG } from './src/builder'; | ||
export { API, Shadow, HTML, SVG, Math } from './src/builder'; | ||
export { NS, Attrs, Children, Factory } from './src/util/dom'; | ||
export { shadow, frag, html, svg, text, element, define, append, prepend, defrag } from './src/util/dom'; | ||
export { shadow, frag, html, svg, math, text, element, define, append, prepend, defrag } from './src/util/dom'; | ||
export { listen, delegate, bind, once, currentTarget } from './src/util/listener'; | ||
export { querySelectorAll, querySelectorWith, querySelectorAllWith } from './src/util/query'; | ||
export { identity } from './src/util/identity'; |
24
index.js
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.332 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! typed-dom v0.0.333 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -651,3 +651,3 @@ if(typeof exports === 'object' && typeof module === 'object') | ||
})); | ||
exports.SVG = exports.HTML = exports.Shadow = exports.API = void 0; | ||
exports.Math = exports.SVG = exports.HTML = exports.Shadow = exports.API = void 0; | ||
const proxy_1 = __webpack_require__(3965); | ||
@@ -662,2 +662,3 @@ const dom_1 = __webpack_require__(7521); | ||
exports.SVG = API(dom_1.svg); | ||
exports.Math = API(dom_1.math); | ||
function handle(baseFactory, container) { | ||
@@ -1043,3 +1044,3 @@ return { | ||
})); | ||
exports.defrag = exports.prepend = exports.append = exports.isChildren = exports.define = exports.element = exports.text = exports.svg = exports.html = exports.frag = exports.shadow = void 0; | ||
exports.defrag = exports.prepend = exports.append = exports.isChildren = exports.define = exports.element = exports.text = exports.math = exports.svg = exports.html = exports.frag = exports.shadow = void 0; | ||
const alias_1 = __webpack_require__(5406); | ||
@@ -1069,2 +1070,3 @@ const memoize_1 = __webpack_require__(1808); | ||
exports.svg = element(document, "SVG" /* NS.SVG */); | ||
exports.math = element(document, "MathML" /* NS.Math */); | ||
function text(source) { | ||
@@ -1090,3 +1092,3 @@ return document.createTextNode(source); | ||
return context.createElementNS('http://www.w3.org/2000/svg', tag, opts); | ||
case "MathML" /* NS.MathML */: | ||
case "MathML" /* NS.Math */: | ||
return context.createElementNS('http://www.w3.org/1998/Math/MathML', tag, opts); | ||
@@ -1425,3 +1427,3 @@ } | ||
})); | ||
exports.identity = exports.querySelectorAllWith = exports.querySelectorWith = exports.querySelectorAll = exports.currentTarget = exports.once = exports.bind = exports.delegate = exports.listen = exports.defrag = exports.prepend = exports.append = exports.define = exports.element = exports.text = exports.svg = exports.html = exports.frag = exports.shadow = exports.SVG = exports.HTML = exports.Shadow = exports.API = void 0; | ||
exports.identity = exports.querySelectorAllWith = exports.querySelectorWith = exports.querySelectorAll = exports.currentTarget = exports.once = exports.bind = exports.delegate = exports.listen = exports.defrag = exports.prepend = exports.append = exports.define = exports.element = exports.text = exports.math = exports.svg = exports.html = exports.frag = exports.shadow = exports.Math = exports.SVG = exports.HTML = exports.Shadow = exports.API = void 0; | ||
var builder_1 = __webpack_require__(9048); | ||
@@ -1452,2 +1454,8 @@ Object.defineProperty(exports, "API", ({ | ||
})); | ||
Object.defineProperty(exports, "Math", ({ | ||
enumerable: true, | ||
get: function () { | ||
return builder_1.Math; | ||
} | ||
})); | ||
var dom_1 = __webpack_require__(7521); | ||
@@ -1478,2 +1486,8 @@ Object.defineProperty(exports, "shadow", ({ | ||
})); | ||
Object.defineProperty(exports, "math", ({ | ||
enumerable: true, | ||
get: function () { | ||
return dom_1.math; | ||
} | ||
})); | ||
Object.defineProperty(exports, "text", ({ | ||
@@ -1480,0 +1494,0 @@ enumerable: true, |
export type { El } from './src/proxy'; | ||
export { API, Shadow, HTML, SVG } from './src/builder'; | ||
export { API, Shadow, HTML, SVG, Math } from './src/builder'; | ||
export { NS, Attrs, Children, Factory } from './src/util/dom'; | ||
export { shadow, frag, html, svg, text, element, define, append, prepend, defrag } from './src/util/dom'; | ||
export { shadow, frag, html, svg, math, text, element, define, append, prepend, defrag } from './src/util/dom'; | ||
export { listen, delegate, bind, once, currentTarget } from './src/util/listener'; | ||
export { querySelectorAll, querySelectorWith, querySelectorAllWith } from './src/util/query'; | ||
export { identity } from './src/util/identity'; |
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.332 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! typed-dom v0.0.333 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -3,0 +3,0 @@ if(typeof exports === 'object' && typeof module === 'object') |
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.332 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! typed-dom v0.0.333 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -651,3 +651,3 @@ if(typeof exports === 'object' && typeof module === 'object') | ||
})); | ||
exports.SVG = exports.HTML = exports.Shadow = exports.API = void 0; | ||
exports.Math = exports.SVG = exports.HTML = exports.Shadow = exports.API = void 0; | ||
const proxy_1 = __webpack_require__(3965); | ||
@@ -662,2 +662,3 @@ const dom_1 = __webpack_require__(7521); | ||
exports.SVG = API(dom_1.svg); | ||
exports.Math = API(dom_1.math); | ||
function handle(baseFactory, container) { | ||
@@ -1043,3 +1044,3 @@ return { | ||
})); | ||
exports.defrag = exports.prepend = exports.append = exports.isChildren = exports.define = exports.element = exports.text = exports.svg = exports.html = exports.frag = exports.shadow = void 0; | ||
exports.defrag = exports.prepend = exports.append = exports.isChildren = exports.define = exports.element = exports.text = exports.math = exports.svg = exports.html = exports.frag = exports.shadow = void 0; | ||
const alias_1 = __webpack_require__(5406); | ||
@@ -1069,2 +1070,3 @@ const memoize_1 = __webpack_require__(1808); | ||
exports.svg = element(document, "SVG" /* NS.SVG */); | ||
exports.math = element(document, "MathML" /* NS.Math */); | ||
function text(source) { | ||
@@ -1090,3 +1092,3 @@ return document.createTextNode(source); | ||
return context.createElementNS('http://www.w3.org/2000/svg', tag, opts); | ||
case "MathML" /* NS.MathML */: | ||
case "MathML" /* NS.Math */: | ||
return context.createElementNS('http://www.w3.org/1998/Math/MathML', tag, opts); | ||
@@ -1093,0 +1095,0 @@ } |
{ | ||
"name": "typed-dom", | ||
"version": "0.0.332", | ||
"version": "0.0.333", | ||
"description": "A value-level and type-level DOM builder.", | ||
@@ -5,0 +5,0 @@ "private": false, |
import type { ParseSelector } from 'typed-query-selector/parser'; | ||
export declare function querySelectorWith<T extends keyof HTMLElementTagNameMap>(node: ParentNode, selector: T): HTMLElementTagNameMap[T] | null; | ||
export declare function querySelectorWith<T extends keyof SVGElementTagNameMap>(node: ParentNode, selector: T): SVGElementTagNameMap[T] | null; | ||
export declare function querySelectorWith<T extends keyof MathMLElementTagNameMap>(node: ParentNode, selector: T): MathMLElementTagNameMap[T] | null; | ||
export declare function querySelectorWith<T extends string>(node: ParentNode, selector: T): ParseSelector<T>; | ||
@@ -8,2 +9,3 @@ export declare function querySelectorWith<T extends Element>(node: ParentNode, selector: string): T | null; | ||
export declare function querySelectorAllWith<T extends keyof SVGElementTagNameMap>(node: ParentNode, selector: T): SVGElementTagNameMap[T][]; | ||
export declare function querySelectorAllWith<T extends keyof MathMLElementTagNameMap>(node: ParentNode, selector: T): MathMLElementTagNameMap[T][]; | ||
export declare function querySelectorAllWith<T extends string>(node: ParentNode, selector: T): ParseSelector<T>[]; | ||
@@ -13,3 +15,4 @@ export declare function querySelectorAllWith<T extends Element>(node: ParentNode, selector: string): T[]; | ||
export declare function querySelectorAll<T extends keyof SVGElementTagNameMap>(node: ParentNode, selector: T): SVGElementTagNameMap[T][]; | ||
export declare function querySelectorAll<T extends keyof MathMLElementTagNameMap>(node: ParentNode, selector: T): MathMLElementTagNameMap[T][]; | ||
export declare function querySelectorAll<T extends string>(node: ParentNode, selector: T): ParseSelector<T>[]; | ||
export declare function querySelectorAll<T extends Element>(node: ParentNode, selector: string): T[]; |
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.332 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! typed-dom v0.0.333 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -3,0 +3,0 @@ if(typeof exports === 'object' && typeof module === 'object') |
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.332 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! typed-dom v0.0.333 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -119,3 +119,3 @@ if(typeof exports === 'object' && typeof module === 'object') | ||
})); | ||
exports.defrag = exports.prepend = exports.append = exports.isChildren = exports.define = exports.element = exports.text = exports.svg = exports.html = exports.frag = exports.shadow = void 0; | ||
exports.defrag = exports.prepend = exports.append = exports.isChildren = exports.define = exports.element = exports.text = exports.math = exports.svg = exports.html = exports.frag = exports.shadow = void 0; | ||
const alias_1 = __webpack_require__(5406); | ||
@@ -145,2 +145,3 @@ const memoize_1 = __webpack_require__(1808); | ||
exports.svg = element(document, "SVG" /* NS.SVG */); | ||
exports.math = element(document, "MathML" /* NS.Math */); | ||
function text(source) { | ||
@@ -166,3 +167,3 @@ return document.createTextNode(source); | ||
return context.createElementNS('http://www.w3.org/2000/svg', tag, opts); | ||
case "MathML" /* NS.MathML */: | ||
case "MathML" /* NS.Math */: | ||
return context.createElementNS('http://www.w3.org/1998/Math/MathML', tag, opts); | ||
@@ -169,0 +170,0 @@ } |
@@ -325,2 +325,16 @@ # typed-dom | ||
### Math: { [tag]: (attrs?, children?, factory?) => El; (tag: string, ...): El; }; | ||
Create an MathML element proxy. | ||
- attrs: Record<string, string | EventListener | null | undefined> | ||
- children: undefined | string | El[] | Record<string, El> | DocumentFragment | ||
- factory: (svg, tag, attrs, children) => MathMLElement | ||
```ts | ||
import { Math } from 'typed-dom'; | ||
Math.math(); | ||
``` | ||
### Shadow: { [tag]: (attrs?, children?, factory?) => El; (tag: string, ...): El; }; | ||
@@ -351,2 +365,3 @@ | ||
const svg = element<SVGElementTagNameMap>(document, NS.SVG); | ||
const math = element<MathMLElementTagNameMap>(document, NS.Math); | ||
@@ -356,2 +371,3 @@ const Shadow = API<ShadowHostHTMLElementTagNameMap>(html, shadow); | ||
const SVG = API<SVGElementTagNameMap>(svg); | ||
const Math = API<MathMLElementTagNameMap>(math); | ||
``` | ||
@@ -442,2 +458,3 @@ | ||
- svg | ||
- math | ||
- text | ||
@@ -444,0 +461,0 @@ - define |
import { El, ElementProxy } from './proxy'; | ||
import { Factory, TagNameMap, Attrs, shadow, html, svg, define } from './util/dom'; | ||
import { Factory, TagNameMap, Attrs, shadow, html, svg, math, define } from './util/dom'; | ||
@@ -17,2 +17,3 @@ export type API | ||
export const SVG = API<SVGElementTagNameMap>(svg); | ||
export const Math = API<MathMLElementTagNameMap>(math); | ||
@@ -19,0 +20,0 @@ type K<M> = keyof M & string; |
@@ -32,3 +32,3 @@ import { isArray, hasOwnProperty } from 'spica/alias'; | ||
SVG = 'SVG', | ||
MathML = 'MathML', | ||
Math = 'MathML', | ||
} | ||
@@ -82,2 +82,3 @@ | ||
export const svg = element<SVGElementTagNameMap>(document, NS.SVG); | ||
export const math = element<MathMLElementTagNameMap>(document, NS.Math); | ||
@@ -90,3 +91,3 @@ export function text(source: string): Text { | ||
export function element<M extends SVGElementTagNameMap>(context: Document | ShadowRoot, ns: NS.SVG): Factory<M>; | ||
export function element<M extends TagNameMap>(context: Document | ShadowRoot, ns: NS.MathML): Factory<M>; | ||
export function element<M extends MathMLElementTagNameMap>(context: Document | ShadowRoot, ns: NS.Math): Factory<M>; | ||
export function element<M extends TagNameMap>(context: Document | ShadowRoot, ns: NS): Factory<M> { | ||
@@ -108,3 +109,3 @@ return (tag: string, attrs?: Attrs | Children, children?: Children) => { | ||
return context.createElementNS('http://www.w3.org/2000/svg', tag, opts); | ||
case NS.MathML: | ||
case NS.Math: | ||
return context.createElementNS('http://www.w3.org/1998/Math/MathML', tag, opts); | ||
@@ -111,0 +112,0 @@ } |
@@ -5,2 +5,3 @@ import type { ParseSelector } from 'typed-query-selector/parser'; | ||
export function querySelectorWith<T extends keyof SVGElementTagNameMap>(node: ParentNode, selector: T): SVGElementTagNameMap[T] | null; | ||
export function querySelectorWith<T extends keyof MathMLElementTagNameMap>(node: ParentNode, selector: T): MathMLElementTagNameMap[T] | null; | ||
export function querySelectorWith<T extends string>(node: ParentNode, selector: T): ParseSelector<T>; | ||
@@ -16,2 +17,3 @@ export function querySelectorWith<T extends Element>(node: ParentNode, selector: string): T | null; | ||
export function querySelectorAllWith<T extends keyof SVGElementTagNameMap>(node: ParentNode, selector: T): SVGElementTagNameMap[T][]; | ||
export function querySelectorAllWith<T extends keyof MathMLElementTagNameMap>(node: ParentNode, selector: T): MathMLElementTagNameMap[T][]; | ||
export function querySelectorAllWith<T extends string>(node: ParentNode, selector: T): ParseSelector<T>[]; | ||
@@ -33,2 +35,3 @@ export function querySelectorAllWith<T extends Element>(node: ParentNode, selector: string): T[]; | ||
export function querySelectorAll<T extends keyof SVGElementTagNameMap>(node: ParentNode, selector: T): SVGElementTagNameMap[T][]; | ||
export function querySelectorAll<T extends keyof MathMLElementTagNameMap>(node: ParentNode, selector: T): MathMLElementTagNameMap[T][]; | ||
export function querySelectorAll<T extends string>(node: ParentNode, selector: T): ParseSelector<T>[]; | ||
@@ -35,0 +38,0 @@ export function querySelectorAll<T extends Element>(node: ParentNode, selector: string): T[]; |
import { | ||
API, Shadow, HTML, SVG, NS, | ||
shadow, frag, html, svg, text, element, define, append, prepend, defrag, | ||
API, Shadow, HTML, SVG, Math, NS, | ||
shadow, frag, html, svg, math, text, element, define, append, prepend, defrag, | ||
listen, once, bind, delegate, currentTarget, | ||
@@ -28,2 +28,6 @@ querySelectorAll, querySelectorWith, querySelectorAllWith, | ||
it('Math', function () { | ||
assert(typeof Math === 'function'); | ||
}); | ||
}); | ||
@@ -53,2 +57,6 @@ | ||
it('math', function () { | ||
assert(typeof math === 'function'); | ||
}); | ||
it('text', function () { | ||
@@ -55,0 +63,0 @@ assert(typeof text === 'function'); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
669886
15644
485