@wsxjs/wsx-core 0.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.
- package/LICENSE +21 -0
- package/dist/chunk-3CJEWYVF.mjs +197 -0
- package/dist/chunk-5JVEHB6H.mjs +197 -0
- package/dist/chunk-7E7KJQSW.mjs +210 -0
- package/dist/chunk-A5GYVTI3.mjs +222 -0
- package/dist/chunk-A5GYVTI3.mjs.map +1 -0
- package/dist/chunk-BV2V6BVN.mjs +221 -0
- package/dist/chunk-K6N3JDTI.mjs +216 -0
- package/dist/chunk-RVGKV4GP.mjs +79 -0
- package/dist/chunk-S3O776FY.mjs +173 -0
- package/dist/chunk-VNK4B3FW.mjs +217 -0
- package/dist/chunk-YNUVFDKT.mjs +222 -0
- package/dist/chunk-YNUVFDKT.mjs.map +1 -0
- package/dist/index.d.mts +235 -0
- package/dist/index.d.ts +235 -0
- package/dist/index.js +755 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +524 -0
- package/dist/index.mjs.map +1 -0
- package/dist/jsx-factory-pFUwL2Dz.d.mts +26 -0
- package/dist/jsx-factory-pFUwL2Dz.d.ts +26 -0
- package/dist/jsx-pFUwL2Dz.d.mts +26 -0
- package/dist/jsx-pFUwL2Dz.d.ts +26 -0
- package/dist/jsx-runtime-pFUwL2Dz.d.mts +26 -0
- package/dist/jsx-runtime-pFUwL2Dz.d.ts +26 -0
- package/dist/jsx-runtime.d.mts +1 -0
- package/dist/jsx-runtime.d.ts +1 -0
- package/dist/jsx-runtime.js +248 -0
- package/dist/jsx-runtime.js.map +1 -0
- package/dist/jsx-runtime.mjs +10 -0
- package/dist/jsx-runtime.mjs.map +1 -0
- package/dist/jsx.d.mts +66 -0
- package/dist/jsx.d.ts +66 -0
- package/dist/jsx.js +224 -0
- package/dist/jsx.js.map +1 -0
- package/dist/jsx.mjs +8 -0
- package/dist/jsx.mjs.map +1 -0
- package/package.json +49 -0
- package/src/auto-register.ts +149 -0
- package/src/index.ts +17 -0
- package/src/jsx-factory.ts +222 -0
- package/src/jsx-runtime.ts +6 -0
- package/src/jsx.ts +90 -0
- package/src/reactive-component.ts +171 -0
- package/src/styles/style-manager.ts +54 -0
- package/src/utils/logger.ts +69 -0
- package/src/utils/reactive.ts +214 -0
- package/src/utils/svg-utils.ts +184 -0
- package/src/web-component.ts +250 -0
- package/types/css-inline.d.ts +4 -0
- package/types/index.d.ts +32 -0
- package/types/jsx-runtime.d.ts +2 -0
- package/types/jsx.d.ts +28 -0
- package/types/wsx-types.d.ts +43 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WSX TypeScript 声明文件
|
|
3
|
+
* 支持 JSX 语法和其他 WSX 特性
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// WSX 文件支持 - 将 .wsx 文件视为 TypeScript 模块
|
|
7
|
+
declare module "*.wsx" {
|
|
8
|
+
const Component: unknown;
|
|
9
|
+
export default Component;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// JSX 命名空间
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
14
|
+
declare namespace JSX {
|
|
15
|
+
interface IntrinsicElements {
|
|
16
|
+
[elemName: string]: Record<string, unknown>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
type Element = HTMLElement;
|
|
20
|
+
|
|
21
|
+
interface ElementClass {
|
|
22
|
+
render(): HTMLElement;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface ElementAttributesProperty {
|
|
26
|
+
props: Record<string, unknown>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface ElementChildrenAttribute {
|
|
30
|
+
children: unknown[];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// JSX 工厂函数类型
|
|
35
|
+
declare function h(
|
|
36
|
+
type: string | ((props: Record<string, unknown> | null, children: unknown[]) => HTMLElement),
|
|
37
|
+
props?: Record<string, unknown> | null,
|
|
38
|
+
...children: unknown[]
|
|
39
|
+
): HTMLElement;
|
|
40
|
+
|
|
41
|
+
declare const Fragment: (props: Record<string, unknown>, children: unknown[]) => DocumentFragment;
|
|
42
|
+
|
|
43
|
+
export { h, Fragment };
|