@yoyaflow/yoya-ui 0.3.3 → 0.4.0
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/README.md +305 -261
- package/README.zh-CN.md +269 -225
- package/dist/yoya.core.chunk.js +4275 -0
- package/dist/yoya.core.chunk.min.js +9 -0
- package/dist/yoya.core.js +3 -2338
- package/dist/yoya.core.min.js +1 -0
- package/dist/yoya.devtools.js +3 -223
- package/dist/yoya.devtools.min.js +1 -0
- package/dist/yoya.echart.js +182 -849
- package/dist/yoya.echart.min.js +1 -0
- package/dist/yoya.router.full.js +5271 -0
- package/dist/yoya.router.full.min.js +43 -0
- package/dist/yoya.router.js +1330 -0
- package/dist/yoya.router.min.js +35 -0
- package/dist/yoya.three.js +360 -0
- package/dist/yoya.three.min.js +1 -0
- package/dist/yoya.ui-router.full.js +21843 -0
- package/dist/yoya.ui-router.full.min.js +43 -0
- package/dist/yoya.ui-router.umd.js +43 -0
- package/dist/yoya.ui-router.umd.min.js +43 -0
- package/dist/yoya.ui.css +9 -0
- package/dist/yoya.ui.full.js +20169 -0
- package/dist/yoya.ui.full.min.js +1 -0
- package/dist/yoya.ui.js +12106 -9840
- package/dist/yoya.ui.min.js +1 -0
- package/package.json +18 -14
- package/types/index.d.ts +1 -1
- package/types/three.d.ts +77 -0
- package/types/yoya.router.d.ts +7 -0
- package/types/yoya.three.d.ts +4 -0
- package/types/yoya.ui-router.d.ts +19 -0
- package/types/yoya.ui.d.ts +2 -7
- package/dist/yoya-ui.umd.js +0 -35
- package/dist/yoya.ssr.js +0 -3444
- package/types/yoya.ssr.d.ts +0 -9
package/package.json
CHANGED
|
@@ -1,38 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoyaflow/yoya-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "A browser-native JS UI library with declarative HTML authoring: component library, router, i18n, theming and layout, works with or without a build tool, SSR-ready.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
7
|
-
"main": "./dist/yoya-
|
|
8
|
-
"module": "./dist/yoya.ui.js",
|
|
7
|
+
"main": "./dist/yoya.ui-router.umd.js",
|
|
8
|
+
"module": "./dist/yoya.ui-router.full.js",
|
|
9
9
|
"style": "./dist/yoya.ui.css",
|
|
10
10
|
"types": "./types/index.d.ts",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
13
|
"types": "./types/index.d.ts",
|
|
14
|
-
"import": "./dist/yoya.ui.js"
|
|
15
|
-
"require": "./dist/yoya-ui.umd.js"
|
|
14
|
+
"import": "./dist/yoya.ui-router.full.js"
|
|
16
15
|
},
|
|
17
16
|
"./core": {
|
|
18
17
|
"types": "./types/yoya.core.d.ts",
|
|
19
18
|
"import": "./dist/yoya.core.js"
|
|
20
19
|
},
|
|
21
|
-
"./
|
|
22
|
-
"types": "./types/yoya.
|
|
23
|
-
"import": "./dist/yoya.
|
|
20
|
+
"./ui": {
|
|
21
|
+
"types": "./types/yoya.ui.d.ts",
|
|
22
|
+
"import": "./dist/yoya.ui.js"
|
|
23
|
+
},
|
|
24
|
+
"./router": {
|
|
25
|
+
"types": "./types/yoya.router.d.ts",
|
|
26
|
+
"import": "./dist/yoya.router.js"
|
|
24
27
|
},
|
|
25
28
|
"./echart": {
|
|
26
29
|
"types": "./types/yoya.echart.d.ts",
|
|
27
30
|
"import": "./dist/yoya.echart.js"
|
|
28
31
|
},
|
|
29
|
-
"./
|
|
30
|
-
"types": "./types/yoya.
|
|
31
|
-
"import": "./dist/yoya.
|
|
32
|
+
"./three": {
|
|
33
|
+
"types": "./types/yoya.three.d.ts",
|
|
34
|
+
"import": "./dist/yoya.three.js"
|
|
32
35
|
},
|
|
33
|
-
"./
|
|
34
|
-
"types": "./types/
|
|
35
|
-
"import": "./dist/yoya.
|
|
36
|
+
"./devtools": {
|
|
37
|
+
"types": "./types/yoya.devtools.d.ts",
|
|
38
|
+
"import": "./dist/yoya.devtools.js"
|
|
36
39
|
},
|
|
37
40
|
"./ui.css": "./dist/yoya.ui.css",
|
|
38
41
|
"./package.json": "./package.json"
|
|
@@ -99,6 +102,7 @@
|
|
|
99
102
|
"leaflet": "^1.9.4",
|
|
100
103
|
"prettier": "^3.9.6",
|
|
101
104
|
"quill": "^2.0.3",
|
|
105
|
+
"three": "^0.185.1",
|
|
102
106
|
"typescript": "^7.0.2",
|
|
103
107
|
"vite": "^8.2.0",
|
|
104
108
|
"vitest": "^4.1.10"
|
package/types/index.d.ts
CHANGED
package/types/three.d.ts
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { ElementFactory, ElementOptions, SetupCallback, SetupInput } from './core.js';
|
|
2
|
+
import type { HtmlElementNode } from './html.js';
|
|
3
|
+
|
|
4
|
+
/** Minimal Three.js module shape accepted by threeLib(). */
|
|
5
|
+
export interface ThreeLib {
|
|
6
|
+
PerspectiveCamera: new (...args: any[]) => any;
|
|
7
|
+
Scene: new (...args: any[]) => any;
|
|
8
|
+
WebGLRenderer: new (options?: Record<string, any>) => ThreeRenderer;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** Renderer surface used by the component. */
|
|
13
|
+
export interface ThreeRenderer {
|
|
14
|
+
domElement: HTMLCanvasElement;
|
|
15
|
+
dispose(): void;
|
|
16
|
+
render(scene: any, camera: any): void;
|
|
17
|
+
setPixelRatio(value: number): void;
|
|
18
|
+
setSize(width: number, height: number): void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** Handed to onReady / onFrame callbacks after the renderer mounts. */
|
|
22
|
+
export interface ThreeInstanceApi {
|
|
23
|
+
camera: any;
|
|
24
|
+
renderer: ThreeRenderer;
|
|
25
|
+
scene: any;
|
|
26
|
+
threeLib: ThreeLib;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** Reported by onResize callbacks. */
|
|
30
|
+
export interface ThreeResizeSize {
|
|
31
|
+
height: number;
|
|
32
|
+
width: number;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** Three.js scene host (the three library itself is not bundled). */
|
|
36
|
+
export class VThree extends HtmlElementNode {
|
|
37
|
+
threeLib(lib: ThreeLib): VThree;
|
|
38
|
+
getThreeLib(): ThreeLib | null;
|
|
39
|
+
scene(): any;
|
|
40
|
+
scene(value: any): VThree;
|
|
41
|
+
getScene(): any;
|
|
42
|
+
camera(): any;
|
|
43
|
+
camera(value: any): VThree;
|
|
44
|
+
getCamera(): any;
|
|
45
|
+
rendererOptions(): Record<string, any>;
|
|
46
|
+
rendererOptions(value: Record<string, any>): VThree;
|
|
47
|
+
width(): number | string;
|
|
48
|
+
width(value: number | string): VThree;
|
|
49
|
+
height(): number | string;
|
|
50
|
+
height(value: number | string): VThree;
|
|
51
|
+
devicePixelRatio(): number | null;
|
|
52
|
+
devicePixelRatio(value: number | null): VThree;
|
|
53
|
+
autoResize(): boolean;
|
|
54
|
+
autoResize(value: boolean): VThree;
|
|
55
|
+
autoRender(): boolean;
|
|
56
|
+
autoRender(value: boolean): VThree;
|
|
57
|
+
onReady(callback: (api: ThreeInstanceApi) => void): VThree;
|
|
58
|
+
onResize(callback: (size: ThreeResizeSize) => void): VThree;
|
|
59
|
+
onFrame(callback: (api: ThreeInstanceApi) => void): VThree;
|
|
60
|
+
getRenderer(): ThreeRenderer | null;
|
|
61
|
+
start(): VThree;
|
|
62
|
+
stop(): VThree;
|
|
63
|
+
render(): VThree;
|
|
64
|
+
resize(): VThree;
|
|
65
|
+
dispose(): VThree;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export const vThree: ElementFactory<VThree> & {
|
|
69
|
+
(first?: SetupInput<VThree> | null, callback?: SetupCallback<VThree>): VThree;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/** Parent-shortcut surface merged onto HtmlElementNode. */
|
|
73
|
+
export interface ThreeParentShortcuts {
|
|
74
|
+
vThree(first?: SetupInput<VThree> | null, callback?: SetupCallback<VThree>): VThree;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export type { ElementOptions };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Entry types for the self-contained `yoya.ui-router.full` bundle:
|
|
3
|
+
* core + ui (components / layout / theme) + router + SSR primitives.
|
|
4
|
+
*/
|
|
5
|
+
export * from './core.js';
|
|
6
|
+
export * from './html.js';
|
|
7
|
+
export * from './svg.js';
|
|
8
|
+
export * from './layout.js';
|
|
9
|
+
export * from './actions.js';
|
|
10
|
+
export * from './navigation.js';
|
|
11
|
+
export * from './feedback.js';
|
|
12
|
+
export * from './form.js';
|
|
13
|
+
export * from './data-display.js';
|
|
14
|
+
export * from './async.js';
|
|
15
|
+
export * from './i18n.js';
|
|
16
|
+
export * from './theme.js';
|
|
17
|
+
export * from './router.js';
|
|
18
|
+
export * from './effects.js';
|
|
19
|
+
export * from './ssr.js';
|
package/types/yoya.ui.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Entry types for
|
|
2
|
+
* Entry types for `yoya-ui/ui`: components + layout + theme.
|
|
3
|
+
* Core is provided by `yoya-ui/core`; router/SSR by `yoya-ui/router`.
|
|
3
4
|
*/
|
|
4
|
-
export * from './core.js';
|
|
5
|
-
export * from './html.js';
|
|
6
|
-
export * from './svg.js';
|
|
7
5
|
export * from './layout.js';
|
|
8
6
|
export * from './actions.js';
|
|
9
7
|
export * from './navigation.js';
|
|
@@ -13,7 +11,4 @@ export * from './data-display.js';
|
|
|
13
11
|
export * from './async.js';
|
|
14
12
|
export * from './i18n.js';
|
|
15
13
|
export * from './theme.js';
|
|
16
|
-
export * from './router.js';
|
|
17
14
|
export * from './effects.js';
|
|
18
|
-
export { VEchart, vEchart } from './chart.js';
|
|
19
|
-
export * from './ssr.js';
|