@nakshi/genui-blocks 0.0.0-stage → 1.0.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 +202 -0
- package/README.md +59 -2
- package/dist/index.d.ts +1152 -0
- package/dist/index.js +250 -0
- package/dist/react/chart.d.ts +13 -0
- package/dist/react/index.d.ts +24 -0
- package/dist/react/index.js +916 -0
- package/dist/react/style.d.ts +16 -0
- package/dist/react/views.d.ts +86 -0
- package/package.json +54 -4
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The views take their look from the page: text inherits its colour and font,
|
|
4
|
+
* lines are a tint of the text colour, so they sit right in light and dark
|
|
5
|
+
* themes. Override any of these custom properties on a parent to restyle them.
|
|
6
|
+
*/
|
|
7
|
+
export declare const tokens: {
|
|
8
|
+
readonly border: "var(--genui-border, color-mix(in srgb, currentColor 16%, transparent))";
|
|
9
|
+
readonly subtle: "var(--genui-subtle, color-mix(in srgb, currentColor 6%, transparent))";
|
|
10
|
+
readonly accent: "var(--genui-accent, #257de0)";
|
|
11
|
+
readonly radius: "var(--genui-radius, 12px)";
|
|
12
|
+
};
|
|
13
|
+
export declare const card: CSSProperties;
|
|
14
|
+
export declare const heading: CSSProperties;
|
|
15
|
+
export declare const muted: CSSProperties;
|
|
16
|
+
export declare const note: CSSProperties;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { type BlockViewProps } from '@nakshi/genui-react';
|
|
2
|
+
export declare function StepsView({ data }: BlockViewProps<{
|
|
3
|
+
title?: string;
|
|
4
|
+
steps: Array<{
|
|
5
|
+
title: string;
|
|
6
|
+
detail?: string;
|
|
7
|
+
time?: string;
|
|
8
|
+
}>;
|
|
9
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function ChecklistView({ data }: BlockViewProps<{
|
|
11
|
+
title?: string;
|
|
12
|
+
groups: Array<{
|
|
13
|
+
label?: string;
|
|
14
|
+
items: string[];
|
|
15
|
+
}>;
|
|
16
|
+
note?: string;
|
|
17
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function RecipeView({ data, }: BlockViewProps<{
|
|
19
|
+
title: string;
|
|
20
|
+
servings: number;
|
|
21
|
+
time?: string;
|
|
22
|
+
ingredients: Array<{
|
|
23
|
+
item: string;
|
|
24
|
+
qty?: number;
|
|
25
|
+
unit?: string;
|
|
26
|
+
note?: string;
|
|
27
|
+
}>;
|
|
28
|
+
note?: string;
|
|
29
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare function StatsView({ data }: BlockViewProps<{
|
|
31
|
+
title?: string;
|
|
32
|
+
items: Array<{
|
|
33
|
+
label: string;
|
|
34
|
+
value: string;
|
|
35
|
+
sub?: string;
|
|
36
|
+
}>;
|
|
37
|
+
note?: string;
|
|
38
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare function CompareView({ data, }: BlockViewProps<{
|
|
40
|
+
title?: string;
|
|
41
|
+
columns: Array<{
|
|
42
|
+
name: string;
|
|
43
|
+
subtitle?: string;
|
|
44
|
+
}>;
|
|
45
|
+
rows: Array<{
|
|
46
|
+
label: string;
|
|
47
|
+
values: string[];
|
|
48
|
+
best?: number[];
|
|
49
|
+
}>;
|
|
50
|
+
note?: string;
|
|
51
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
export declare function CardsView({ data }: BlockViewProps<{
|
|
53
|
+
title?: string;
|
|
54
|
+
items: Array<{
|
|
55
|
+
title: string;
|
|
56
|
+
text?: string;
|
|
57
|
+
points?: string[];
|
|
58
|
+
}>;
|
|
59
|
+
note?: string;
|
|
60
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export declare function CalloutView({ data }: BlockViewProps<{
|
|
62
|
+
tone?: 'info' | 'tip' | 'warning';
|
|
63
|
+
title?: string;
|
|
64
|
+
text: string;
|
|
65
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
export declare function TabsView({ data }: BlockViewProps<{
|
|
67
|
+
title?: string;
|
|
68
|
+
tabs: Array<{
|
|
69
|
+
label: string;
|
|
70
|
+
body: string;
|
|
71
|
+
}>;
|
|
72
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
export declare function AccordionView({ data }: BlockViewProps<{
|
|
74
|
+
title?: string;
|
|
75
|
+
items: Array<{
|
|
76
|
+
title: string;
|
|
77
|
+
body: string;
|
|
78
|
+
open?: boolean;
|
|
79
|
+
}>;
|
|
80
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
export declare function CodeView({ data }: BlockViewProps<{
|
|
82
|
+
title?: string;
|
|
83
|
+
language?: string;
|
|
84
|
+
code: string;
|
|
85
|
+
note?: string;
|
|
86
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,56 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nakshi/genui-blocks",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A starter set of blocks for @nakshi/genui: steps, checklist, recipe, stats, chart, compare, cards, callout, tabs, accordion, code — with React views",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"default": "./dist/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./react": {
|
|
17
|
+
"types": "./dist/react/index.d.ts",
|
|
18
|
+
"import": "./dist/react/index.js",
|
|
19
|
+
"default": "./dist/react/index.js"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"LICENSE",
|
|
25
|
+
"README.md"
|
|
26
|
+
],
|
|
27
|
+
"homepage": "https://nakshi.ai/blog/generative-ui",
|
|
28
|
+
"keywords": [
|
|
29
|
+
"generative-ui",
|
|
30
|
+
"genui",
|
|
31
|
+
"llm",
|
|
32
|
+
"streaming",
|
|
33
|
+
"markdown",
|
|
34
|
+
"components",
|
|
35
|
+
"ai"
|
|
36
|
+
],
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@nakshi/genui": "^1.0.0",
|
|
39
|
+
"zod": "^3.24.0"
|
|
40
|
+
},
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"@nakshi/genui-react": "^1.0.0",
|
|
43
|
+
"react": "^18.0.0 || ^19.0.0"
|
|
44
|
+
},
|
|
45
|
+
"peerDependenciesMeta": {
|
|
46
|
+
"@nakshi/genui-react": {
|
|
47
|
+
"optional": true
|
|
48
|
+
},
|
|
49
|
+
"react": {
|
|
50
|
+
"optional": true
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"publishConfig": {
|
|
54
|
+
"access": "public"
|
|
55
|
+
}
|
|
56
|
+
}
|