@mpen/jsxhtml 0.2.1 → 0.2.2
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/custom-components.d.ts +1 -1
- package/dist/jsx-dev-runtime.d.ts +1 -0
- package/dist/jsx-runtime.d.ts +1 -0
- package/dist/jsx.d.ts +29 -4
- package/package.json +2 -2
|
@@ -16,7 +16,7 @@ export declare function DocType(props: DocTypeProps): JsxDocType;
|
|
|
16
16
|
/**
|
|
17
17
|
* `<!DOCTYPE html><html ...>{children}</html>`
|
|
18
18
|
*/
|
|
19
|
-
export declare function HtmlDocument({ children, ...htmlAttrs }: AnyAttributes): import("./jsx
|
|
19
|
+
export declare function HtmlDocument({ children, ...htmlAttrs }: AnyAttributes): import("./jsx").JSX.Element;
|
|
20
20
|
/**
|
|
21
21
|
* No output.
|
|
22
22
|
*/
|
|
@@ -2,3 +2,4 @@ import type { AnyAttributes, JsxComponent } from './jsx-types';
|
|
|
2
2
|
import type { JsxNode } from './jsx-node';
|
|
3
3
|
export { jsx, Fragment } from './jsx-runtime';
|
|
4
4
|
export declare function jsxDEV(tag: string | JsxComponent, props: AnyAttributes, key: unknown, isStaticChildren: unknown, source: unknown, self: unknown): JsxNode;
|
|
5
|
+
export { JSX } from './jsx';
|
package/dist/jsx-runtime.d.ts
CHANGED
|
@@ -4,3 +4,4 @@ import type { JsxNode } from './jsx-node';
|
|
|
4
4
|
export declare function jsx(tag: string | JsxComponent, props: AnyAttributes, key?: unknown, isStaticChildren?: unknown, source?: unknown, self?: unknown): JsxNode;
|
|
5
5
|
export declare function jsxs(...args: Parameters<typeof jsx>): JsxNode;
|
|
6
6
|
export declare function Fragment({ children }: ChildrenOnly): JsxFragment;
|
|
7
|
+
export { JSX } from './jsx';
|
package/dist/jsx.d.ts
CHANGED
|
@@ -1,8 +1,33 @@
|
|
|
1
1
|
/// <reference no-default-lib="true"/>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { JsxNode } from './jsx-node';
|
|
3
|
+
import * as instrinsic from './htmlspec/IntrinsicElements';
|
|
4
|
+
export type ComponentType<P = {}> = FunctionComponent<P>;
|
|
5
|
+
export type JsxChild = string | number | boolean | null | undefined | JsxNode | JsxNode[];
|
|
6
|
+
export interface FunctionComponent<P = {}> {
|
|
7
|
+
(props: P): JsxChild;
|
|
8
|
+
displayName?: string | undefined;
|
|
9
|
+
}
|
|
10
|
+
export declare namespace JSX {
|
|
11
|
+
type ElementType<P = any, Tag extends keyof IntrinsicElements = keyof IntrinsicElements> = {
|
|
12
|
+
[K in Tag]: P extends IntrinsicElements[K] ? K : never;
|
|
13
|
+
}[Tag] | ComponentType<P>;
|
|
14
|
+
interface Element extends JsxNode {
|
|
15
|
+
}
|
|
16
|
+
type ElementClass = never;
|
|
17
|
+
interface ElementAttributesProperty {
|
|
18
|
+
props: {};
|
|
19
|
+
}
|
|
5
20
|
interface ElementChildrenAttribute {
|
|
6
|
-
children:
|
|
21
|
+
children: {};
|
|
22
|
+
}
|
|
23
|
+
type LibraryManagedAttributes<Component, Props> = Props;
|
|
24
|
+
interface IntrinsicAttributes {
|
|
25
|
+
}
|
|
26
|
+
interface IntrinsicClassAttributes<T> {
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Attributes specific to intrinsic elements (lowercase tags).
|
|
30
|
+
*/
|
|
31
|
+
interface IntrinsicElements extends instrinsic.IntrinsicElements {
|
|
7
32
|
}
|
|
8
33
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mpen/jsxhtml",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"packageManager": "bun@1.2.9",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"_dev:serve": "serve -l tcp://0.0.0.0:8080",
|
|
43
43
|
"dev": "run-p \"dev:**\"",
|
|
44
44
|
"dev:serve": "bun run --hot src/dev.tsx",
|
|
45
|
-
"test": "bun test",
|
|
45
|
+
"test": "NODE_ENV=production bun test",
|
|
46
46
|
"bundle:clean": "rm -rf dist/",
|
|
47
47
|
"bundle:build": "NODE_ENV=production rollup -c",
|
|
48
48
|
"bundle": "run-s bundle:clean bundle:build",
|