Comparing version
@@ -6,2 +6,3 @@ /** | ||
export * from './apply/apply.js'; | ||
export * from './builder/builder.js'; | ||
export * from './components/components.js'; | ||
@@ -8,0 +9,0 @@ export * from './element/element.js'; |
@@ -22,2 +22,3 @@ "use strict"; | ||
__exportStar(require("./apply/apply.js"), exports); | ||
__exportStar(require("./builder/builder.js"), exports); | ||
__exportStar(require("./components/components.js"), exports); | ||
@@ -24,0 +25,0 @@ __exportStar(require("./element/element.js"), exports); |
@@ -16,9 +16,10 @@ /** | ||
} | ||
export type IElement = string | number | { | ||
[key in keyof HTMLElementTagNameMap]?: string | number | IElement[] | { | ||
0?: IAttrs; | ||
1?: IElement | IElement[]; | ||
2?: IComponent | object | (IComponent | object)[]; | ||
}; | ||
export type IElementContent = { | ||
0?: IAttrs; | ||
1?: IElement | IElement[]; | ||
2?: IComponent | object | (IComponent | object)[]; | ||
}; | ||
export type IElement = { | ||
[key in keyof HTMLElementTagNameMap]?: IElementContent | IElement[] | string | number; | ||
} | string | number; | ||
/** | ||
@@ -71,3 +72,3 @@ * Render the IElement to text. Use on the server. | ||
* // object form: | ||
* { ul: [{ class: 'list1' }, items([1,2,3,4,5,6,7,8,9])] }, | ||
* { ul: { 0: { class: 'list1' }, 1: items([1,2,3,4,5,6,7,8,9]) } }, | ||
* | ||
@@ -74,0 +75,0 @@ * // text form: |
@@ -89,3 +89,3 @@ "use strict"; | ||
* // object form: | ||
* { ul: [{ class: 'list1' }, items([1,2,3,4,5,6,7,8,9])] }, | ||
* { ul: { 0: { class: 'list1' }, 1: items([1,2,3,4,5,6,7,8,9]) } }, | ||
* | ||
@@ -92,0 +92,0 @@ * // text form: |
@@ -6,2 +6,3 @@ /** | ||
export * from './apply/apply.js'; | ||
export * from './builder/builder.js'; | ||
export * from './components/components.js'; | ||
@@ -8,0 +9,0 @@ export * from './element/element.js'; |
@@ -6,2 +6,3 @@ /** | ||
export * from './apply/apply.js'; | ||
export * from './builder/builder.js'; | ||
export * from './components/components.js'; | ||
@@ -8,0 +9,0 @@ export * from './element/element.js'; |
@@ -16,9 +16,10 @@ /** | ||
} | ||
export type IElement = string | number | { | ||
[key in keyof HTMLElementTagNameMap]?: string | number | IElement[] | { | ||
0?: IAttrs; | ||
1?: IElement | IElement[]; | ||
2?: IComponent | object | (IComponent | object)[]; | ||
}; | ||
export type IElementContent = { | ||
0?: IAttrs; | ||
1?: IElement | IElement[]; | ||
2?: IComponent | object | (IComponent | object)[]; | ||
}; | ||
export type IElement = { | ||
[key in keyof HTMLElementTagNameMap]?: IElementContent | IElement[] | string | number; | ||
} | string | number; | ||
/** | ||
@@ -71,3 +72,3 @@ * Render the IElement to text. Use on the server. | ||
* // object form: | ||
* { ul: [{ class: 'list1' }, items([1,2,3,4,5,6,7,8,9])] }, | ||
* { ul: { 0: { class: 'list1' }, 1: items([1,2,3,4,5,6,7,8,9]) } }, | ||
* | ||
@@ -74,0 +75,0 @@ * // text form: |
@@ -85,3 +85,3 @@ /** | ||
* // object form: | ||
* { ul: [{ class: 'list1' }, items([1,2,3,4,5,6,7,8,9])] }, | ||
* { ul: { 0: { class: 'list1' }, 1: items([1,2,3,4,5,6,7,8,9]) } }, | ||
* | ||
@@ -88,0 +88,0 @@ * // text form: |
{ | ||
"name": "deleight", | ||
"version": "5.6.3", | ||
"version": "5.7.0", | ||
"description": "A library with 9 modules for writing more expressive web applications with traditional HTML, CSS and JavaScript.", | ||
@@ -27,2 +27,6 @@ "type": "module", | ||
}, | ||
"./dom/builder": { | ||
"require": "./dist/cjs/dom/builder/builder.js", | ||
"default": "./dist/esm/dom/builder/builder.js" | ||
}, | ||
"./dom/components": { | ||
@@ -29,0 +33,0 @@ "require": "./dist/cjs/dom/components/components.js", |
@@ -1,2 +0,2 @@ | ||
# Deleight (v5.6.3) | ||
# Deleight (v5.7.0) | ||
@@ -82,3 +82,7 @@  | ||
## New in v5.7.0 | ||
Added `deleight/dom/builder` submodule which provides a better DX, more safety and more versatility than both `deleight/dom/element` and `deleight/dom/html` for building elements or rendering their text representations. | ||
## Documentation | ||
@@ -85,0 +89,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
214
1.9%584428
-1.89%201
-5.63%16485
-3.02%