@pineui/react 0.1.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/LICENSE +168 -0
- package/README.md +144 -0
- package/dist/PineUI.d.ts +10 -0
- package/dist/components/AppBar.d.ts +12 -0
- package/dist/components/Avatar.d.ts +11 -0
- package/dist/components/Badge.d.ts +9 -0
- package/dist/components/BottomNav.d.ts +17 -0
- package/dist/components/Button.d.ts +16 -0
- package/dist/components/Card.d.ts +13 -0
- package/dist/components/Chip.d.ts +12 -0
- package/dist/components/Collection.d.ts +21 -0
- package/dist/components/ConditionalRender.d.ts +14 -0
- package/dist/components/Divider.d.ts +8 -0
- package/dist/components/ErrorBoundary.d.ts +17 -0
- package/dist/components/Grid.d.ts +12 -0
- package/dist/components/Icon.d.ts +12 -0
- package/dist/components/Image.d.ts +15 -0
- package/dist/components/Input.d.ts +17 -0
- package/dist/components/Layout.d.ts +29 -0
- package/dist/components/Modal.d.ts +24 -0
- package/dist/components/Progress.d.ts +10 -0
- package/dist/components/Scaffold.d.ts +13 -0
- package/dist/components/Snackbar.d.ts +17 -0
- package/dist/components/Table.d.ts +17 -0
- package/dist/components/Tabs.d.ts +17 -0
- package/dist/components/Text.d.ts +14 -0
- package/dist/components/View.d.ts +12 -0
- package/dist/index.d.ts +5 -0
- package/dist/loader/imports.d.ts +3 -0
- package/dist/pineui.es.js +1117 -0
- package/dist/pineui.standalone.js +45 -0
- package/dist/pineui.umd.js +14 -0
- package/dist/renderer/Renderer.d.ts +9 -0
- package/dist/renderer/bindings.d.ts +5 -0
- package/dist/style.css +1 -0
- package/dist/types.d.ts +65 -0
- package/package.json +65 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export interface PineUISchema {
|
|
2
|
+
schemaVersion: string;
|
|
3
|
+
imports?: {
|
|
4
|
+
components?: string[];
|
|
5
|
+
views?: string[];
|
|
6
|
+
};
|
|
7
|
+
state?: Record<string, any>;
|
|
8
|
+
screen: ComponentNode;
|
|
9
|
+
components?: Record<string, ComponentDefinition>;
|
|
10
|
+
views?: Record<string, ViewDefinition>;
|
|
11
|
+
overlays?: Record<string, OverlayDefinition>;
|
|
12
|
+
intents?: Record<string, IntentDefinition>;
|
|
13
|
+
telemetry?: TelemetryConfig;
|
|
14
|
+
}
|
|
15
|
+
export interface ComponentNode {
|
|
16
|
+
type: string;
|
|
17
|
+
id?: string;
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}
|
|
20
|
+
export interface ComponentDefinition {
|
|
21
|
+
type: string;
|
|
22
|
+
definition: ComponentNode;
|
|
23
|
+
}
|
|
24
|
+
export interface ViewDefinition {
|
|
25
|
+
source?: string;
|
|
26
|
+
screen: ComponentNode;
|
|
27
|
+
state?: Record<string, any>;
|
|
28
|
+
}
|
|
29
|
+
export interface OverlayDefinition {
|
|
30
|
+
type: string;
|
|
31
|
+
presentation?: 'modal' | 'bottomSheet' | 'dialog';
|
|
32
|
+
dismissible?: boolean;
|
|
33
|
+
child: ComponentNode;
|
|
34
|
+
}
|
|
35
|
+
export interface IntentDefinition {
|
|
36
|
+
handler: ActionNode;
|
|
37
|
+
}
|
|
38
|
+
export interface ActionNode {
|
|
39
|
+
type: string;
|
|
40
|
+
[key: string]: any;
|
|
41
|
+
}
|
|
42
|
+
export interface TelemetryConfig {
|
|
43
|
+
screenView?: {
|
|
44
|
+
event: string;
|
|
45
|
+
properties: Record<string, any>;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export interface RenderContext {
|
|
49
|
+
state: Record<string, any>;
|
|
50
|
+
data: Record<string, any>;
|
|
51
|
+
components: Record<string, ComponentDefinition>;
|
|
52
|
+
views: Record<string, ViewDefinition>;
|
|
53
|
+
intents: Record<string, IntentDefinition>;
|
|
54
|
+
schema: PineUISchema;
|
|
55
|
+
executeAction: (action: ActionNode, context?: any) => Promise<void>;
|
|
56
|
+
executeIntent: (intentName: string, params?: any) => Promise<void>;
|
|
57
|
+
}
|
|
58
|
+
export interface PineUIConfig {
|
|
59
|
+
target: string | HTMLElement;
|
|
60
|
+
schema?: PineUISchema;
|
|
61
|
+
schemaUrl?: string;
|
|
62
|
+
baseUrl?: string;
|
|
63
|
+
onReady?: () => void;
|
|
64
|
+
onError?: (error: Error) => void;
|
|
65
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pineui/react",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Server-Driven UI framework for AI-native applications. Build dynamic, multi-platform interfaces from JSON schemas.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"server-driven-ui",
|
|
7
|
+
"ai-native",
|
|
8
|
+
"react",
|
|
9
|
+
"json-schema",
|
|
10
|
+
"material-design",
|
|
11
|
+
"declarative-ui",
|
|
12
|
+
"cross-platform"
|
|
13
|
+
],
|
|
14
|
+
"author": "David Ruiz <wupsbr@gmail.com>",
|
|
15
|
+
"license": "Apache-2.0 WITH Commons-Clause",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/PineUI/PineUI.git",
|
|
19
|
+
"directory": "packages/react"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://pineui.github.io/PineUI/",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/PineUI/PineUI/issues"
|
|
24
|
+
},
|
|
25
|
+
"type": "module",
|
|
26
|
+
"main": "./dist/pineui.umd.js",
|
|
27
|
+
"module": "./dist/pineui.es.js",
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"import": "./dist/pineui.es.js",
|
|
32
|
+
"require": "./dist/pineui.umd.js",
|
|
33
|
+
"types": "./dist/index.d.ts"
|
|
34
|
+
},
|
|
35
|
+
"./dist/style.css": "./dist/style.css"
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"dist",
|
|
39
|
+
"LICENSE",
|
|
40
|
+
"README.md"
|
|
41
|
+
],
|
|
42
|
+
"scripts": {
|
|
43
|
+
"dev": "vite",
|
|
44
|
+
"build": "tsc && vite build && vite build --config vite.config.standalone.ts",
|
|
45
|
+
"build:standalone": "vite build --config vite.config.standalone.ts",
|
|
46
|
+
"preview": "vite preview"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"react": "^18.2.0",
|
|
50
|
+
"react-dom": "^18.2.0"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@types/react": "^18.2.48",
|
|
54
|
+
"@types/react-dom": "^18.2.18",
|
|
55
|
+
"@vitejs/plugin-react": "^4.2.1",
|
|
56
|
+
"react": "^18.2.0",
|
|
57
|
+
"react-dom": "^18.2.0",
|
|
58
|
+
"typescript": "^5.3.3",
|
|
59
|
+
"vite": "^5.0.12",
|
|
60
|
+
"vite-plugin-dts": "^3.7.0"
|
|
61
|
+
},
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"clsx": "^2.1.0"
|
|
64
|
+
}
|
|
65
|
+
}
|