crelt 1.0.4 → 1.0.5

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.
File without changes
package/index.d.ts CHANGED
@@ -1,7 +1,4 @@
1
- interface ChildArray extends ReadonlyArray<Child> {}
1
+ type Child = string | Node | null | undefined | readonly Child[]
2
2
 
3
- type Child = string | Node | null | undefined | ChildArray
4
-
5
- export default function crelt(elt: string | HTMLElement,
6
- attrs?: Child | {[attr: string]: any},
7
- ...children: Child[]): HTMLElement
3
+ export default function crelt(elt: string | HTMLElement, attrs: {[attr: string]: any}, ...children: Child[]): HTMLElement
4
+ export default function crelt(elt: string | HTMLElement, ...children: Child[]): HTMLElement
package/package.json CHANGED
@@ -1,8 +1,13 @@
1
1
  {
2
2
  "name": "crelt",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Tiny DOM-element-creation utility",
5
- "main": "dist/index.js",
5
+ "main": "dist/index.cjs",
6
+ "type": "module",
7
+ "exports": {
8
+ "import": "./index.es.js",
9
+ "require": "./dist/index.cjs"
10
+ },
6
11
  "module": "index.es.js",
7
12
  "types": "index.d.ts",
8
13
  "scripts": {
package/rollup.config.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export default {
2
2
  input: "index.es.js",
3
3
  output: {
4
- file: "dist/index.js",
4
+ file: "dist/index.cjs",
5
5
  format: "cjs"
6
6
  }
7
7
  }