@uibot/registry 0.19.0 → 0.20.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/dist/component-replacement.d.ts +10 -0
- package/dist/index.js +7 -7
- package/dist/resources.d.ts +1 -0
- package/dist/resources.js +3 -3
- package/dist/shadcn/r/admin-shell.json +16 -3
- package/dist/shadcn/r/charts.json +44 -17
- package/dist/shadcn/r/chat-workspace.json +1 -1
- package/dist/shadcn/r/collection-cell-editor.json +1 -1
- package/dist/shadcn/r/collection-panel-drawer.json +1 -1
- package/dist/shadcn/r/collection-record-menu.json +1 -1
- package/dist/shadcn/r/collection-shared.json +1 -1
- package/dist/shadcn/r/commerce-workspace.json +1 -1
- package/dist/shadcn/r/console-page.json +1 -1
- package/dist/shadcn/r/console-shell.json +1 -1
- package/dist/shadcn/r/creation-html-generation.json +2 -2
- package/dist/shadcn/r/creation-reference-generation.json +2 -2
- package/dist/shadcn/r/creation-revision-export.json +2 -2
- package/dist/shadcn/r/creation-shared.json +2 -2
- package/dist/shadcn/r/creation-variant-compare.json +3 -3
- package/dist/shadcn/r/creation-workspace.json +3 -3
- package/dist/shadcn/r/crm-workspace.json +1 -1
- package/dist/shadcn/r/dashboard-01.json +78 -0
- package/dist/shadcn/r/dashboard.json +113 -3
- package/dist/shadcn/r/data-table.json +120 -10
- package/dist/shadcn/r/data.json +9 -2
- package/dist/shadcn/r/document-assistant.json +1 -1
- package/dist/shadcn/r/document-workspace.json +1 -1
- package/dist/shadcn/r/drilldown-menu.json +1 -1
- package/dist/shadcn/r/education-workspace.json +1 -1
- package/dist/shadcn/r/feedback.json +15 -2
- package/dist/shadcn/r/form.json +1 -1
- package/dist/shadcn/r/layout.json +27 -8
- package/dist/shadcn/r/nav.json +38 -10
- package/dist/shadcn/r/shadcn-admin.json +1 -1
- package/dist/shadcn/r/sidebar-primitives.json +1 -1
- package/dist/shadcn/r/workspace.json +9 -2
- package/dist/shadcn/registry.json +55 -27
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
3
|
"name": "charts",
|
|
4
4
|
"type": "registry:ui",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "SVG line/area chart: shared axes, pointer/keyboard values and crosshair. Alias: LineChart.",
|
|
6
6
|
"dependencies": [
|
|
7
7
|
"react@19.3.0"
|
|
8
8
|
],
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
{
|
|
14
14
|
"path": "components/uibot/charts.tsx",
|
|
15
15
|
"target": "components/uibot/charts.tsx",
|
|
16
|
-
"content": "import type { RendererComponent } from \"@/lib/uibot-renderer\";\nimport { cn } from \"@/lib/utils\";\n\ninterface Series {\n name?: string;\n points: number[];\n area?: boolean;\n}\n\nfunction parseSeries(raw: unknown): Series[] {\n if (!Array.isArray(raw)) return [];\n return raw\n .map((s) => {\n if (!s || typeof s !== \"object\") return null;\n const rec = s as Record<string, unknown>;\n const points = Array.isArray(rec[\"points\"])\n ? rec[\"points\"].map((p) => (typeof p === \"number\" ? p : Number(p) || 0))\n : [];\n return {\n name: typeof rec[\"name\"] === \"string\" ? rec[\"name\"] : undefined,\n points,\n area: rec[\"area\"] === true,\n } as Series;\n })\n .filter((s): s is Series => s !== null && s.points.length > 0);\n}\n\n// Padding reserved around the plot so strokes are not clipped at the edges.\nconst PAD = 8;\n\n// Map a series' points into an SVG polyline `points` string. min/max are taken\n// across every series so all lines share one vertical scale.\nfunction toPolyline(points: number[], w: number, h: number, min: number, max: number): string {\n const range = max - min || 1;\n const innerW = w - PAD * 2;\n const innerH = h - PAD * 2;\n const step = points.length > 1 ? innerW / (points.length - 1) : 0;\n return points\n .map((value, i) => {\n const x = PAD + step * i;\n const y = PAD + innerH - ((value - min) / range) * innerH;\n return `${x.toFixed(1)},${y.toFixed(1)}`;\n })\n .join(\" \");\n}\n\n// A small palette of theme-token colours, cycled per series.\nconst STROKE = [\"text-primary\", \"text-sky-500\", \"text-emerald-500\", \"text-amber-500\"];\n\n/**\n * Pure-SVG line / area chart. No third-party charting dependency (keeps the\n * package peerDeps-only). Intended for small dogfood datasets (≤ ~200 points\n * per series); larger inputs produce heavy DOM.\n */\nexport const TrendChart: RendererComponent = (props) => {\n const series = parseSeries(props[\"series\"]);\n const title = typeof props[\"title\"] === \"string\" ? props[\"title\"] : \"\";\n const w = typeof props[\"width\"] === \"number\" ? props[\"width\"] : 480;\n const h = typeof props[\"height\"] === \"number\" ? props[\"height\"] : 160;\n\n const all = series.flatMap((s) => s.points);\n const min = all.length ? Math.min(...all) : 0;\n const max = all.length ? Math.max(...all) : 1;\n\n return (\n <div\n className=\"uibot-trendchart bg-card text-card-foreground rounded-xl border p-4 shadow-sm\"\n data-uibot-type=\"TrendChart\"\n >\n {title && <h3 className=\"mb-2 text-sm font-medium\">{title}</h3>}\n {series.length === 0 ? (\n <p className=\"py-6 text-center text-sm text-muted-foreground\">No data</p>\n ) : (\n <svg\n viewBox={`0 0 ${w} ${h}`}\n className=\"h-auto w-full\"\n role=\"img\"\n aria-label={title || \"Trend chart\"}\n preserveAspectRatio=\"none\"\n >\n {/* baseline grid lines */}\n {[0, 0.25, 0.5, 0.75, 1].map((t) => {\n const y = PAD + (h - PAD * 2) * t;\n return (\n <line\n key={t}\n x1={PAD}\n x2={w - PAD}\n y1={y}\n y2={y}\n className=\"text-border\"\n stroke=\"currentColor\"\n strokeWidth={0.5}\n />\n );\n })}\n {series.map((s, i) => {\n const pts = toPolyline(s.points, w, h, min, max);\n const colour = STROKE[i % STROKE.length];\n return (\n <g key={i} className={colour}>\n {s.area && (\n <polygon\n fill=\"currentColor\"\n fillOpacity={0.12}\n points={`${PAD},${h - PAD} ${pts} ${w - PAD},${h - PAD}`}\n />\n )}\n <polyline\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n points={pts}\n />\n </g>\n );\n })}\n </svg>\n )}\n {series.some((s) => s.name) && (\n <ul className=\"mt-3 flex flex-wrap gap-4\">\n {series.map((s, i) => (\n <li key={i} className=\"flex items-center gap-1.5 text-xs text-muted-foreground\">\n <span className={cn(\"h-2 w-2 rounded-full bg-current\", STROKE[i % STROKE.length])} />\n {s.name ?? `Series ${i + 1}`}\n </li>\n ))}\n </ul>\n )}\n </div>\n );\n};\n\n/** Alias of {@link TrendChart} for specs that prefer the LineChart name. */\nexport const LineChart = TrendChart;\n",
|
|
16
|
+
"content": "import { useId, useState, type KeyboardEvent, type PointerEvent } from \"react\";\nimport { cn } from \"@/lib/utils\";\nimport type { RendererComponent } from \"@/lib/uibot-renderer\";\n\ninterface Series {\n name?: string;\n points: number[];\n area?: boolean;\n}\nfunction parseSeries(raw: unknown): Series[] {\n if (!Array.isArray(raw)) return [];\n return raw\n .map((s) => {\n if (!s || typeof s !== \"object\") return null;\n const rec = s as Record<string, unknown>;\n const points = Array.isArray(rec.points)\n ? rec.points.map((p) => {\n const value = Number(p);\n return Number.isFinite(value) ? value : 0;\n })\n : [];\n return {\n name: typeof rec.name === \"string\" ? rec.name : undefined,\n points,\n area: rec.area === true,\n } as Series;\n })\n .filter((s): s is Series => s !== null && s.points.length > 0);\n}\nconst PAD = 8;\nconst STROKE = [\"text-primary\", \"text-sky-500\", \"text-emerald-500\", \"text-amber-500\"];\n\n/** Small SVG charts share one time axis and vertical scale. Inspection is local. */\nfunction TrendChartView({ props }: { props: Record<string, unknown> }) {\n const [inspection, setInspection] = useState<{ index: number; keyboard: boolean } | null>(null);\n const tooltipId = useId();\n const instructionsId = useId();\n const series = parseSeries(props.series);\n const title = typeof props.title === \"string\" ? props.title : \"\";\n const w = typeof props.width === \"number\" ? Math.max(32, props.width) : 480;\n const h = typeof props.height === \"number\" ? Math.max(32, props.height) : 160;\n const labels = Array.isArray(props.labels) ? props.labels.map(String) : [];\n const plain = props.variant === \"plain\";\n const count = Math.max(0, ...series.map((s) => s.points.length));\n const all = series.flatMap((s) => s.points);\n const min = all.length ? Math.min(...all) : 0;\n const max = all.length ? Math.max(...all) : 1;\n const pointX = (i: number) => PAD + (count > 1 ? i / (count - 1) : 0) * (w - PAD * 2);\n const pointY = (value: number) => PAD + (h - PAD * 2) * (1 - (value - min) / (max - min || 1));\n const index = inspection?.index ?? null;\n const inspectPointer = (event: PointerEvent<SVGSVGElement>) => {\n const rect = event.currentTarget.getBoundingClientRect();\n if (!rect.width) return;\n const position = (((event.clientX - rect.left) / rect.width) * w - PAD) / (w - PAD * 2);\n setInspection({\n index: Math.max(0, Math.min(count - 1, Math.round(position * (count - 1)))),\n keyboard: false,\n });\n };\n const inspectKey = (event: KeyboardEvent<SVGSVGElement>) => {\n if (event.key === \"Escape\") {\n setInspection(null);\n return;\n }\n let next: number;\n if (event.key === \"Home\") next = 0;\n else if (event.key === \"End\") next = count - 1;\n else if (event.key === \"ArrowLeft\") next = (index ?? 1) - 1;\n else if (event.key === \"ArrowRight\") next = (index ?? -1) + 1;\n else return;\n event.preventDefault();\n setInspection({ index: Math.max(0, Math.min(count - 1, next)), keyboard: true });\n };\n return (\n <div\n className={cn(\n \"uibot-trendchart min-w-0\",\n !plain && \"bg-card text-card-foreground rounded-xl border p-4 shadow-sm\",\n )}\n data-uibot-type=\"TrendChart\"\n >\n {title && <h3 className={plain ? \"sr-only\" : \"mb-2 text-sm font-medium\"}>{title}</h3>}\n {series.length === 0 ? (\n <p className=\"py-6 text-center text-sm text-muted-foreground\">No data</p>\n ) : (\n <div className=\"relative\">\n <span id={instructionsId} className=\"sr-only\">\n Use Left and Right arrows to inspect values, Home and End to jump, and Escape to\n dismiss.\n </span>\n <svg\n viewBox={`0 0 ${w} ${h}`}\n className=\"h-auto w-full rounded-sm outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n style={plain ? { height: h } : undefined}\n role=\"img\"\n aria-label={title || \"Trend chart\"}\n preserveAspectRatio=\"none\"\n tabIndex={0}\n onPointerMove={inspectPointer}\n onPointerDown={inspectPointer}\n onPointerLeave={() => {\n if (!inspection?.keyboard) setInspection(null);\n }}\n onPointerCancel={() => setInspection(null)}\n onFocus={() => setInspection((current) => current ?? { index: 0, keyboard: true })}\n onBlur={() => setInspection(null)}\n onKeyDown={inspectKey}\n aria-describedby={`${instructionsId}${index === null ? \"\" : ` ${tooltipId}`}`}\n >\n {[0, 0.25, 0.5, 0.75, 1].map((t) => (\n <line\n key={t}\n x1={PAD}\n x2={w - PAD}\n y1={PAD + (h - PAD * 2) * t}\n y2={PAD + (h - PAD * 2) * t}\n className=\"text-border\"\n stroke=\"currentColor\"\n strokeWidth={0.5}\n />\n ))}\n {series.map((s, i) => {\n const pts = s.points\n .map((value, j) => `${pointX(j).toFixed(1)},${pointY(value).toFixed(1)}`)\n .join(\" \");\n return (\n <g key={i} className={STROKE[i % STROKE.length]}>\n {s.area && (\n <polygon\n fill=\"currentColor\"\n fillOpacity={0.12}\n points={`${PAD},${h - PAD} ${pts} ${pointX(s.points.length - 1)},${h - PAD}`}\n />\n )}\n <polyline\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n points={pts}\n />\n </g>\n );\n })}\n {index !== null && (\n <g aria-hidden=\"true\" pointerEvents=\"none\">\n <line\n x1={pointX(index)}\n x2={pointX(index)}\n y1={PAD}\n y2={h - PAD}\n className=\"text-muted-foreground\"\n stroke=\"currentColor\"\n strokeWidth={1}\n strokeDasharray=\"4 4\"\n vectorEffect=\"non-scaling-stroke\"\n />\n {series.map((s, i) =>\n s.points[index] === undefined ? null : (\n <circle\n key={i}\n data-chart-point=\"active\"\n cx={pointX(index)}\n cy={pointY(s.points[index] ?? 0)}\n r={4}\n className={STROKE[i % STROKE.length]}\n fill=\"currentColor\"\n stroke=\"var(--background)\"\n strokeWidth={2}\n vectorEffect=\"non-scaling-stroke\"\n />\n ),\n )}\n </g>\n )}\n </svg>\n {index !== null && (\n <div\n id={tooltipId}\n role=\"tooltip\"\n aria-live={inspection?.keyboard ? \"polite\" : \"off\"}\n className=\"pointer-events-none absolute top-3 z-10 min-w-36 rounded-lg border bg-popover px-3 py-2.5 text-xs text-popover-foreground shadow-md\"\n style={{\n ...(index < count / 2 ? { right: 12 } : { left: 12 }),\n maxWidth: \"calc(100% - 24px)\",\n }}\n >\n <div className=\"mb-2 font-medium\">{labels[index] ?? `Point ${index + 1}`}</div>\n <div className=\"space-y-1.5\">\n {series.map((s, i) =>\n s.points[index] === undefined ? null : (\n <div key={i} className=\"flex items-center gap-2\">\n <span\n className={cn(\n \"h-2 w-2 shrink-0 rounded-sm bg-current\",\n STROKE[i % STROKE.length],\n )}\n aria-hidden=\"true\"\n />\n <span className=\"text-muted-foreground\">{s.name ?? `Series ${i + 1}`}</span>\n <span className=\"ms-auto ps-3 font-medium tabular-nums\">\n {s.points[index]?.toLocaleString(\"en-US\")}\n </span>\n </div>\n ),\n )}\n </div>\n </div>\n )}\n </div>\n )}\n {labels.length > 0 && series.length > 0 && (\n <div\n className=\"mt-2 flex justify-between gap-2 text-xs text-muted-foreground\"\n aria-hidden=\"true\"\n >\n {labels\n .filter(\n (_, i) =>\n i < count &&\n (i === 0 || i === count - 1 || i % Math.max(1, Math.ceil(count / 5)) === 0),\n )\n .map((label, i) => (\n <span key={i}>{label}</span>\n ))}\n </div>\n )}\n {series.some((s) => s.name) && (\n <ul className=\"mt-3 flex flex-wrap gap-4\">\n {series.map((s, i) => (\n <li key={i} className=\"flex items-center gap-1.5 text-xs text-muted-foreground\">\n <span className={cn(\"h-2 w-2 rounded-full bg-current\", STROKE[i % STROKE.length])} />\n {s.name ?? `Series ${i + 1}`}\n </li>\n ))}\n </ul>\n )}\n </div>\n );\n}\nexport const TrendChart: RendererComponent = (props) => (\n <TrendChartView key={JSON.stringify([props.series, props.labels])} props={props} />\n);\n/** Alias for specs that prefer the LineChart name. */\nexport const LineChart = TrendChart;\n",
|
|
17
17
|
"type": "registry:ui"
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"path": "components/uibot/charts.uibot.json",
|
|
21
21
|
"target": "components/uibot/charts.uibot.json",
|
|
22
|
-
"content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"charts\",\n \"channel\": \"public\",\n \"components\": [\n {\n \"name\": \"LineChart\",\n \"export\": \"LineChart\",\n \"module\": \"charts.tsx\",\n \"catalog\": {\n \"name\": \"LineChart\",\n \"description\": \"Alias of TrendChart
|
|
22
|
+
"content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"charts\",\n \"channel\": \"public\",\n \"components\": [\n {\n \"name\": \"LineChart\",\n \"export\": \"LineChart\",\n \"module\": \"charts.tsx\",\n \"catalog\": {\n \"name\": \"LineChart\",\n \"description\": \"Alias of TrendChart, including pointer/keyboard inspection.\",\n \"category\": \"composite\",\n \"level\": \"L2\",\n \"tags\": [\n \"chart\",\n \"line\",\n \"svg\"\n ],\n \"props\": {\n \"variant\": {\n \"type\": \"string\",\n \"enum\": [\n \"card\",\n \"plain\"\n ],\n \"default\": \"card\"\n },\n \"labels\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"title\": {\n \"type\": \"string\"\n },\n \"series\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"points\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"number\"\n }\n },\n \"area\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n }\n }\n },\n \"width\": {\n \"type\": \"integer\",\n \"default\": 480\n },\n \"height\": {\n \"type\": \"integer\",\n \"default\": 160\n }\n },\n \"usageScenarios\": [\n \"Same as TrendChart; use whichever name reads better in the spec\"\n ],\n \"constraints\": [\n \"Same as TrendChart\"\n ]\n }\n },\n {\n \"name\": \"TrendChart\",\n \"export\": \"TrendChart\",\n \"module\": \"charts.tsx\",\n \"catalog\": {\n \"name\": \"TrendChart\",\n \"description\": \"SVG line/area chart: shared axes, pointer/keyboard values and crosshair. Alias: LineChart.\",\n \"category\": \"composite\",\n \"level\": \"L2\",\n \"tags\": [\n \"chart\",\n \"trend\",\n \"line\",\n \"svg\"\n ],\n \"props\": {\n \"variant\": {\n \"type\": \"string\",\n \"enum\": [\n \"card\",\n \"plain\"\n ],\n \"default\": \"card\"\n },\n \"title\": {\n \"type\": \"string\"\n },\n \"series\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"points\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"number\"\n }\n },\n \"area\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n }\n }\n },\n \"labels\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"width\": {\n \"type\": \"integer\",\n \"default\": 480\n },\n \"height\": {\n \"type\": \"integer\",\n \"default\": 160\n }\n },\n \"usageScenarios\": [\n \"Evolution score trend over versions\",\n \"Daily active users line chart\"\n ],\n \"constraints\": [\n \"Max ~200 points/series\"\n ]\n }\n }\n ]\n}\n",
|
|
23
23
|
"type": "registry:ui"
|
|
24
24
|
}
|
|
25
25
|
],
|
|
@@ -27,6 +27,14 @@
|
|
|
27
27
|
"category": "composite",
|
|
28
28
|
"level": "L2",
|
|
29
29
|
"props": {
|
|
30
|
+
"variant": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"enum": [
|
|
33
|
+
"card",
|
|
34
|
+
"plain"
|
|
35
|
+
],
|
|
36
|
+
"default": "card"
|
|
37
|
+
},
|
|
30
38
|
"title": {
|
|
31
39
|
"type": "string"
|
|
32
40
|
},
|
|
@@ -49,15 +57,13 @@
|
|
|
49
57
|
"default": false
|
|
50
58
|
}
|
|
51
59
|
}
|
|
52
|
-
}
|
|
53
|
-
"description": "[{name, points:number[], area?}]"
|
|
60
|
+
}
|
|
54
61
|
},
|
|
55
62
|
"labels": {
|
|
56
63
|
"type": "array",
|
|
57
64
|
"items": {
|
|
58
65
|
"type": "string"
|
|
59
|
-
}
|
|
60
|
-
"description": "Optional x-axis labels"
|
|
66
|
+
}
|
|
61
67
|
},
|
|
62
68
|
"width": {
|
|
63
69
|
"type": "integer",
|
|
@@ -73,7 +79,7 @@
|
|
|
73
79
|
"Daily active users line chart"
|
|
74
80
|
],
|
|
75
81
|
"constraints": [
|
|
76
|
-
"
|
|
82
|
+
"Max ~200 points/series"
|
|
77
83
|
],
|
|
78
84
|
"provides": [
|
|
79
85
|
"TrendChart",
|
|
@@ -90,7 +96,7 @@
|
|
|
90
96
|
"module": "charts.tsx",
|
|
91
97
|
"catalog": {
|
|
92
98
|
"name": "LineChart",
|
|
93
|
-
"description": "Alias of TrendChart
|
|
99
|
+
"description": "Alias of TrendChart, including pointer/keyboard inspection.",
|
|
94
100
|
"category": "composite",
|
|
95
101
|
"level": "L2",
|
|
96
102
|
"tags": [
|
|
@@ -99,6 +105,20 @@
|
|
|
99
105
|
"svg"
|
|
100
106
|
],
|
|
101
107
|
"props": {
|
|
108
|
+
"variant": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"enum": [
|
|
111
|
+
"card",
|
|
112
|
+
"plain"
|
|
113
|
+
],
|
|
114
|
+
"default": "card"
|
|
115
|
+
},
|
|
116
|
+
"labels": {
|
|
117
|
+
"type": "array",
|
|
118
|
+
"items": {
|
|
119
|
+
"type": "string"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
102
122
|
"title": {
|
|
103
123
|
"type": "string"
|
|
104
124
|
},
|
|
@@ -117,7 +137,8 @@
|
|
|
117
137
|
}
|
|
118
138
|
},
|
|
119
139
|
"area": {
|
|
120
|
-
"type": "boolean"
|
|
140
|
+
"type": "boolean",
|
|
141
|
+
"default": false
|
|
121
142
|
}
|
|
122
143
|
}
|
|
123
144
|
}
|
|
@@ -135,7 +156,7 @@
|
|
|
135
156
|
"Same as TrendChart; use whichever name reads better in the spec"
|
|
136
157
|
],
|
|
137
158
|
"constraints": [
|
|
138
|
-
"
|
|
159
|
+
"Same as TrendChart"
|
|
139
160
|
]
|
|
140
161
|
}
|
|
141
162
|
},
|
|
@@ -145,7 +166,7 @@
|
|
|
145
166
|
"module": "charts.tsx",
|
|
146
167
|
"catalog": {
|
|
147
168
|
"name": "TrendChart",
|
|
148
|
-
"description": "
|
|
169
|
+
"description": "SVG line/area chart: shared axes, pointer/keyboard values and crosshair. Alias: LineChart.",
|
|
149
170
|
"category": "composite",
|
|
150
171
|
"level": "L2",
|
|
151
172
|
"tags": [
|
|
@@ -155,6 +176,14 @@
|
|
|
155
176
|
"svg"
|
|
156
177
|
],
|
|
157
178
|
"props": {
|
|
179
|
+
"variant": {
|
|
180
|
+
"type": "string",
|
|
181
|
+
"enum": [
|
|
182
|
+
"card",
|
|
183
|
+
"plain"
|
|
184
|
+
],
|
|
185
|
+
"default": "card"
|
|
186
|
+
},
|
|
158
187
|
"title": {
|
|
159
188
|
"type": "string"
|
|
160
189
|
},
|
|
@@ -177,15 +206,13 @@
|
|
|
177
206
|
"default": false
|
|
178
207
|
}
|
|
179
208
|
}
|
|
180
|
-
}
|
|
181
|
-
"description": "[{name, points:number[], area?}]"
|
|
209
|
+
}
|
|
182
210
|
},
|
|
183
211
|
"labels": {
|
|
184
212
|
"type": "array",
|
|
185
213
|
"items": {
|
|
186
214
|
"type": "string"
|
|
187
|
-
}
|
|
188
|
-
"description": "Optional x-axis labels"
|
|
215
|
+
}
|
|
189
216
|
},
|
|
190
217
|
"width": {
|
|
191
218
|
"type": "integer",
|
|
@@ -201,7 +228,7 @@
|
|
|
201
228
|
"Daily active users line chart"
|
|
202
229
|
],
|
|
203
230
|
"constraints": [
|
|
204
|
-
"
|
|
231
|
+
"Max ~200 points/series"
|
|
205
232
|
]
|
|
206
233
|
}
|
|
207
234
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"description": "Design-system cell editors for PagedCollectionGrid's renderCellEditor: text, number, long text, checkbox, single/multiple select, calendar dates (timestamps keep their time) and a searchable relation picker.",
|
|
6
6
|
"dependencies": [
|
|
7
7
|
"react@19.3.0",
|
|
8
|
-
"@uibot/renderer-react@0.
|
|
8
|
+
"@uibot/renderer-react@0.20.0",
|
|
9
9
|
"cmdk@1.1.1",
|
|
10
10
|
"date-fns@4.4.0",
|
|
11
11
|
"lucide-react@1.56.0",
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"description": "Right-hand drawer for PagedCollectionWorkspace's renderPanel; a busy panel stays open and unsaved edits ask before closing.",
|
|
6
6
|
"dependencies": [
|
|
7
7
|
"react@19.3.0",
|
|
8
|
-
"@uibot/renderer-react@0.
|
|
8
|
+
"@uibot/renderer-react@0.20.0"
|
|
9
9
|
],
|
|
10
10
|
"registryDependencies": [
|
|
11
11
|
"button",
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"description": "Right-click record actions (expand, duplicate, copy cells, delete) for renderRecordContextMenu.",
|
|
6
6
|
"dependencies": [
|
|
7
7
|
"react@19.3.0",
|
|
8
|
-
"@uibot/renderer-react@0.
|
|
8
|
+
"@uibot/renderer-react@0.20.0"
|
|
9
9
|
],
|
|
10
10
|
"registryDependencies": [
|
|
11
11
|
"context-menu",
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"description": "Copy (zh/en), editor prop types and Tab-commit helper shared by the UIBot collection blocks.",
|
|
6
6
|
"dependencies": [
|
|
7
7
|
"react@19.3.0",
|
|
8
|
-
"@uibot/renderer-react@0.
|
|
8
|
+
"@uibot/renderer-react@0.20.0"
|
|
9
9
|
],
|
|
10
10
|
"registryDependencies": [],
|
|
11
11
|
"files": [
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
{
|
|
18
18
|
"path": "lib/uibot/templates/commerce-workspace.uibot.yaml",
|
|
19
19
|
"target": "lib/uibot/templates/commerce-workspace.uibot.yaml",
|
|
20
|
-
"content": "version: \"2.0\"\npages:\n - id: ecommerce\n path: /\n title: Shop — All products\n blocks:\n - type: PageLayout\n props:\n title: Atelier\n slots:\n headerActions:\n - type: Link\n props:\n label: Cart · 2\n href: \"#\"\n variant: button\n children:\n - type: Box\n props:\n className: flex items-end justify-between mb-4 border-b border-border pb-4\n children:\n - type: Box\n children:\n - type: Heading\n props:\n level: 2\n text: New arrivals\n - type: Paragraph\n props:\n size: sm\n muted: true\n text: Demo catalog · 4 sample SKUs · photos not attached\n - type: Box\n props:\n className: w-48\n children:\n - type: Form\n children:\n - type: Form.Select\n props:\n name: sort\n options:\n - value: featured\n label: Featured\n - value: price-asc\n label: \"Price: low to high\"\n - value: newest\n label: Newest\n - type: Form.Submit\n props:\n label: Apply\n variant: ghost\n - type: Grid\n props:\n cols: \"4\"\n responsive: true\n gap: lg\n children:\n - type: Card\n props:\n className: rounded-none border border-border shadow-none\n children:\n - type: Box\n props:\n className: h-40 -mx-6 -mt-6 mb-3 border-b border-border bg-muted/40 flex\n items-center justify-center\n children:\n - type: Paragraph\n props:\n size: sm\n muted: true\n text: No image\n - type: BadgeGroup\n props:\n items:\n - label: New\n tone: success\n - type: Heading\n props:\n level: 4\n text: Linen Overshirt\n - type: Stat\n props:\n value: $128\n description: sample price\n - type: Button\n props:\n label: Add to cart\n full: true\n - type: Card\n props:\n className: rounded-none border border-border shadow-none\n children:\n - type: Box\n props:\n className: h-40 -mx-6 -mt-6 mb-3 border-b border-border bg-muted/40 flex\n items-center justify-center\n children:\n - type: Paragraph\n props:\n size: sm\n muted: true\n text: No image\n - type: Heading\n props:\n level: 4\n text: Wool Trousers\n - type: Stat\n props:\n value: $96\n change: $120\n description: was $120 · sample\n - type: Button\n props:\n label: Add to cart\n full: true\n - type: Card\n props:\n className: rounded-none border border-border shadow-none\n children:\n - type: Box\n props:\n className: h-40 -mx-6 -mt-6 mb-3 border-b border-border bg-muted/40 flex\n items-center justify-center\n children:\n - type: Paragraph\n props:\n size: sm\n muted: true\n text: No image\n - type: Heading\n props:\n level: 4\n text: Canvas Tote\n - type: Stat\n props:\n value: $54\n description: sample price\n - type: Button\n props:\n label: Add to cart\n full: true\n - type: Card\n props:\n className: rounded-none border border-border shadow-none\n children:\n - type: Box\n props:\n className: h-40 -mx-6 -mt-6 mb-3 border-b border-border bg-muted/40 flex\n items-center justify-center\n children:\n - type: Paragraph\n props:\n size: sm\n muted: true\n text: No image\n - type: BadgeGroup\n props:\n items:\n - label: Low stock\n tone: warning\n - type: Heading\n props:\n level: 4\n text: Leather Belt\n - type: Stat\n props:\n value: $72\n description: 2 left in demo\n - type: Button\n props:\n label: Add to cart\n full: true\n - id: chat-support\n path: /chat-support\n title: Support conversations\n blocks:\n - id: chat-support-surface\n type: ChatWorkspace\n props:\n bindingId: chat\n variant: support\n title: Support conversations\n showSuggestions: true\n previewState: ready\ncomposition:\n schema: uibot.solution-composition.v1\n pages:\n - resourceId: template:chat-support\n version: 0.
|
|
20
|
+
"content": "version: \"2.0\"\npages:\n - id: ecommerce\n path: /\n title: Shop — All products\n blocks:\n - type: PageLayout\n props:\n title: Atelier\n slots:\n headerActions:\n - type: Link\n props:\n label: Cart · 2\n href: \"#\"\n variant: button\n children:\n - type: Box\n props:\n className: flex items-end justify-between mb-4 border-b border-border pb-4\n children:\n - type: Box\n children:\n - type: Heading\n props:\n level: 2\n text: New arrivals\n - type: Paragraph\n props:\n size: sm\n muted: true\n text: Demo catalog · 4 sample SKUs · photos not attached\n - type: Box\n props:\n className: w-48\n children:\n - type: Form\n children:\n - type: Form.Select\n props:\n name: sort\n options:\n - value: featured\n label: Featured\n - value: price-asc\n label: \"Price: low to high\"\n - value: newest\n label: Newest\n - type: Form.Submit\n props:\n label: Apply\n variant: ghost\n - type: Grid\n props:\n cols: \"4\"\n responsive: true\n gap: lg\n children:\n - type: Card\n props:\n className: rounded-none border border-border shadow-none\n children:\n - type: Box\n props:\n className: h-40 -mx-6 -mt-6 mb-3 border-b border-border bg-muted/40 flex\n items-center justify-center\n children:\n - type: Paragraph\n props:\n size: sm\n muted: true\n text: No image\n - type: BadgeGroup\n props:\n items:\n - label: New\n tone: success\n - type: Heading\n props:\n level: 4\n text: Linen Overshirt\n - type: Stat\n props:\n value: $128\n description: sample price\n - type: Button\n props:\n label: Add to cart\n full: true\n - type: Card\n props:\n className: rounded-none border border-border shadow-none\n children:\n - type: Box\n props:\n className: h-40 -mx-6 -mt-6 mb-3 border-b border-border bg-muted/40 flex\n items-center justify-center\n children:\n - type: Paragraph\n props:\n size: sm\n muted: true\n text: No image\n - type: Heading\n props:\n level: 4\n text: Wool Trousers\n - type: Stat\n props:\n value: $96\n change: $120\n description: was $120 · sample\n - type: Button\n props:\n label: Add to cart\n full: true\n - type: Card\n props:\n className: rounded-none border border-border shadow-none\n children:\n - type: Box\n props:\n className: h-40 -mx-6 -mt-6 mb-3 border-b border-border bg-muted/40 flex\n items-center justify-center\n children:\n - type: Paragraph\n props:\n size: sm\n muted: true\n text: No image\n - type: Heading\n props:\n level: 4\n text: Canvas Tote\n - type: Stat\n props:\n value: $54\n description: sample price\n - type: Button\n props:\n label: Add to cart\n full: true\n - type: Card\n props:\n className: rounded-none border border-border shadow-none\n children:\n - type: Box\n props:\n className: h-40 -mx-6 -mt-6 mb-3 border-b border-border bg-muted/40 flex\n items-center justify-center\n children:\n - type: Paragraph\n props:\n size: sm\n muted: true\n text: No image\n - type: BadgeGroup\n props:\n items:\n - label: Low stock\n tone: warning\n - type: Heading\n props:\n level: 4\n text: Leather Belt\n - type: Stat\n props:\n value: $72\n description: 2 left in demo\n - type: Button\n props:\n label: Add to cart\n full: true\n - id: chat-support\n path: /chat-support\n title: Support conversations\n blocks:\n - id: chat-support-surface\n type: ChatWorkspace\n props:\n bindingId: chat\n variant: support\n title: Support conversations\n showSuggestions: true\n previewState: ready\ncomposition:\n schema: uibot.solution-composition.v1\n pages:\n - resourceId: template:chat-support\n version: 0.20.0\n sourceHash: e86dd97ddda9b61b68d1aed048251edff8cc9f2987f1254ff9e4f0032a6cd033\n sourcePageId: chat-support\n targetPageId: chat-support\n baseline:\n id: chat-support\n path: /chat-support\n title: Support conversations\n blocks:\n - id: chat-support-surface\n type: ChatWorkspace\n props:\n bindingId: chat\n variant: support\n title: Support conversations\n showSuggestions: true\n previewState: ready\n bindings:\n paths: {}\n connections: {}\n layout: source\nmenus:\n items:\n - key: ecommerce\n label: Shop — All products\n path: /\n - key: chat-support\n label: Support conversations\n path: /chat-support\n",
|
|
21
21
|
"type": "registry:lib"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
{
|
|
77
77
|
"path": "components/uibot/sidebars/ui-dropdown-menu.tsx",
|
|
78
78
|
"target": "components/uibot/sidebars/ui-dropdown-menu.tsx",
|
|
79
|
-
"content": "// Adapted from shadcn/ui (MIT). See THIRD_PARTY_LICENSE and provenance.json.\n\"use client\";\n\nimport type * as React from \"react\";\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"./utils\";\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from \"lucide-react\";\nimport { DropdownMenu as DropdownMenuPrimitive } from \"radix-ui\";\n\nfunction DropdownMenu({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />;\n}\n\nfunction DropdownMenuTrigger({\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 4,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n \"z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nfunction DropdownMenuGroup({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: \"default\" | \"destructive\";\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction DropdownMenuRadioGroup({\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn(\"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8\", className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSub({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n \"z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n};\n",
|
|
79
|
+
"content": "// Adapted from shadcn/ui (MIT). See THIRD_PARTY_LICENSE and provenance.json.\n\"use client\";\n\nimport type * as React from \"react\";\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"./utils\";\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from \"lucide-react\";\nimport { DropdownMenu as DropdownMenuPrimitive } from \"radix-ui\";\n\nfunction DropdownMenu({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />;\n}\n\nfunction DropdownMenuTrigger({\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 4,\n container,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.Content> & {\n container?: ComponentProps<typeof DropdownMenuPrimitive.Portal>[\"container\"];\n}) {\n return (\n <DropdownMenuPrimitive.Portal {...(container ? { container } : {})}>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n \"z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nfunction DropdownMenuGroup({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: \"default\" | \"destructive\";\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction DropdownMenuRadioGroup({\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn(\"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8\", className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSub({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n \"z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n};\n",
|
|
80
80
|
"type": "registry:ui"
|
|
81
81
|
},
|
|
82
82
|
{
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
{
|
|
13
13
|
"path": "components/uibot/console/shell.tsx",
|
|
14
14
|
"target": "components/uibot/console/shell.tsx",
|
|
15
|
-
"content": "\"use client\";\n\nimport { useState, type ReactNode, type Ref } from \"react\";\nimport { Dialog } from \"radix-ui\";\nimport { CONSOLE_SHELL_CSS } from \"./shell-styles\";\n\nexport interface ConsoleShellProps {\n brand?: ReactNode;\n navigation?: ReactNode;\n workspace?: ReactNode;\n account?: ReactNode;\n search?: ReactNode;\n headerActions?: ReactNode;\n footer?: ReactNode;\n children?: ReactNode;\n className?: string;\n rootRef?: Ref<HTMLDivElement>;\n copy?: Partial<{ openNavigation: string; closeNavigation: string; navigation: string }>;\n}\n\n/** Presentation only. Host-provided slots own routing, identity and all business actions. */\nexport function ConsoleShell({\n brand,\n navigation,\n workspace,\n account,\n search,\n headerActions,\n footer,\n children,\n className = \"\",\n rootRef,\n copy,\n}: ConsoleShellProps) {\n const [open, setOpen] = useState(false);\n const hasSidebar = navigation != null || workspace != null || account != null || footer != null;\n const openLabel = copy?.openNavigation ?? \"Open navigation\";\n const closeLabel = copy?.closeNavigation ?? \"Close\";\n const sidebar = (\n <>\n {workspace != null && <div className=\"csl-shell-workspace\">{workspace}</div>}\n {navigation != null && <div className=\"csl-sidebar-navigation\">{navigation}</div>}\n {footer != null && <div className=\"csl-shell-footer\">{footer}</div>}\n {account != null && <div className=\"csl-sidebar-account\">{account}</div>}\n </>\n );\n return (\n <Dialog.Root open={open && hasSidebar} onOpenChange={setOpen}>\n <div\n ref={rootRef}\n className={`uibot-page-layout uibot-console csl-shell ${className}`}\n data-uibot-type=\"PageLayout\"\n data-appearance=\"console\"\n >\n <style>{CONSOLE_SHELL_CSS}</style>\n <header className=\"csl-topbar\">\n {hasSidebar && (\n <Dialog.Trigger asChild>\n <button\n type=\"button\"\n className=\"csl-icon-button csl-mobile-trigger\"\n aria-label={openLabel}\n title={openLabel}\n >\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n aria-hidden=\"true\"\n >\n <path d=\"M4 6h16M4 12h16M4 18h16\" />\n </svg>\n </button>\n </Dialog.Trigger>\n )}\n {brand}\n {search}\n {headerActions != null && <div className=\"csl-topbar-actions\">{headerActions}</div>}\n </header>\n <div className=\"csl-body\">\n {hasSidebar && <aside className=\"csl-sidebar\">{sidebar}</aside>}\n <main className=\"csl-main\">{children}</main>\n </div>\n {hasSidebar && (\n <Dialog.Portal>\n <Dialog.Overlay className=\"csl-shell-overlay\" />\n <Dialog.Content\n className=\"uibot-console csl-shell-drawer\"\n aria-describedby={undefined}\n onEscapeKeyDown={(event) => {\n // Nested controls opt in while their bubble handler can consume Escape.\n if (\n event.target instanceof Element &&\n event.target.closest(\"[data-uibot-escape-boundary]\")\n )\n event.preventDefault();\n }}\n onClick={(event) => {\n if (\n event.target instanceof Element &&\n event.target.closest(
|
|
15
|
+
"content": "\"use client\";\n\nimport { useState, type ReactNode, type Ref } from \"react\";\nimport { Dialog } from \"radix-ui\";\nimport { CONSOLE_SHELL_CSS } from \"./shell-styles\";\n\nexport interface ConsoleShellProps {\n brand?: ReactNode;\n navigation?: ReactNode;\n workspace?: ReactNode;\n account?: ReactNode;\n search?: ReactNode;\n headerActions?: ReactNode;\n footer?: ReactNode;\n children?: ReactNode;\n className?: string;\n rootRef?: Ref<HTMLDivElement>;\n copy?: Partial<{ openNavigation: string; closeNavigation: string; navigation: string }>;\n}\n\n/** Presentation only. Host-provided slots own routing, identity and all business actions. */\nexport function ConsoleShell({\n brand,\n navigation,\n workspace,\n account,\n search,\n headerActions,\n footer,\n children,\n className = \"\",\n rootRef,\n copy,\n}: ConsoleShellProps) {\n const [open, setOpen] = useState(false);\n const hasSidebar = navigation != null || workspace != null || account != null || footer != null;\n const openLabel = copy?.openNavigation ?? \"Open navigation\";\n const closeLabel = copy?.closeNavigation ?? \"Close\";\n const sidebar = (\n <>\n {workspace != null && <div className=\"csl-shell-workspace\">{workspace}</div>}\n {navigation != null && <div className=\"csl-sidebar-navigation\">{navigation}</div>}\n {footer != null && <div className=\"csl-shell-footer\">{footer}</div>}\n {account != null && <div className=\"csl-sidebar-account\">{account}</div>}\n </>\n );\n return (\n <Dialog.Root open={open && hasSidebar} onOpenChange={setOpen}>\n <div\n ref={rootRef}\n className={`uibot-page-layout uibot-console csl-shell ${className}`}\n data-uibot-type=\"PageLayout\"\n data-appearance=\"console\"\n >\n <style>{CONSOLE_SHELL_CSS}</style>\n <header className=\"csl-topbar\">\n {hasSidebar && (\n <Dialog.Trigger asChild>\n <button\n type=\"button\"\n className=\"csl-icon-button csl-mobile-trigger\"\n aria-label={openLabel}\n title={openLabel}\n >\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n aria-hidden=\"true\"\n >\n <path d=\"M4 6h16M4 12h16M4 18h16\" />\n </svg>\n </button>\n </Dialog.Trigger>\n )}\n {brand}\n {search}\n {headerActions != null && <div className=\"csl-topbar-actions\">{headerActions}</div>}\n </header>\n <div className=\"csl-body\">\n {hasSidebar && <aside className=\"csl-sidebar\">{sidebar}</aside>}\n <main className=\"csl-main\">{children}</main>\n </div>\n {hasSidebar && (\n <Dialog.Portal>\n <Dialog.Overlay className=\"csl-shell-overlay\" />\n <Dialog.Content\n className=\"uibot-console csl-shell-drawer\"\n aria-describedby={undefined}\n onEscapeKeyDown={(event) => {\n // Nested controls opt in while their bubble handler can consume Escape.\n if (\n event.target instanceof Element &&\n event.target.closest(\"[data-uibot-escape-boundary]\")\n )\n event.preventDefault();\n }}\n onClick={(event) => {\n if (\n event.target instanceof Element &&\n event.target.closest('a, button[data-uibot-type=\"MenuLink\"]') &&\n !event.metaKey &&\n !event.ctrlKey &&\n !event.shiftKey &&\n !event.altKey &&\n event.button === 0\n )\n setOpen(false);\n }}\n >\n <Dialog.Title className=\"csl-shell-sr-only\">\n {copy?.navigation ?? \"Navigation\"}\n </Dialog.Title>\n <Dialog.Close asChild>\n <button type=\"button\" className=\"csl-shell-close\" aria-label={closeLabel}>\n {closeLabel}\n </button>\n </Dialog.Close>\n <div className=\"csl-mobile-sidebar\">{sidebar}</div>\n </Dialog.Content>\n </Dialog.Portal>\n )}\n </div>\n </Dialog.Root>\n );\n}\n",
|
|
16
16
|
"type": "registry:component"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
"description": "Generate a new HTML artifact or rewrite the current revision, with at-most-once dispatch and reconcile from @uibot/creation-kit.",
|
|
6
6
|
"dependencies": [
|
|
7
7
|
"react@19.3.0",
|
|
8
|
-
"@uibot/contracts@0.
|
|
9
|
-
"@uibot/creation-kit@0.
|
|
8
|
+
"@uibot/contracts@0.20.0",
|
|
9
|
+
"@uibot/creation-kit@0.20.0"
|
|
10
10
|
],
|
|
11
11
|
"registryDependencies": [
|
|
12
12
|
"button",
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
"description": "Generate a presentation from an explicitly chosen saved HTML revision.",
|
|
6
6
|
"dependencies": [
|
|
7
7
|
"react@19.3.0",
|
|
8
|
-
"@uibot/contracts@0.
|
|
9
|
-
"@uibot/creation-kit@0.
|
|
8
|
+
"@uibot/contracts@0.20.0",
|
|
9
|
+
"@uibot/creation-kit@0.20.0"
|
|
10
10
|
],
|
|
11
11
|
"registryDependencies": [
|
|
12
12
|
"button",
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
"description": "Download a saved HTML revision (PPTX for presentations) once no model request is open; the host supplies the export transport.",
|
|
6
6
|
"dependencies": [
|
|
7
7
|
"react@19.3.0",
|
|
8
|
-
"@uibot/contracts@0.
|
|
9
|
-
"@uibot/creation-kit@0.
|
|
8
|
+
"@uibot/contracts@0.20.0",
|
|
9
|
+
"@uibot/creation-kit@0.20.0"
|
|
10
10
|
],
|
|
11
11
|
"registryDependencies": [
|
|
12
12
|
"button",
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
"description": "Copy (zh/en), domain filters and run checks shared by the UIBot creation blocks.",
|
|
6
6
|
"dependencies": [
|
|
7
7
|
"react@19.3.0",
|
|
8
|
-
"@uibot/contracts@0.
|
|
9
|
-
"@uibot/creation-kit@0.
|
|
8
|
+
"@uibot/contracts@0.20.0",
|
|
9
|
+
"@uibot/creation-kit@0.20.0"
|
|
10
10
|
],
|
|
11
11
|
"registryDependencies": [],
|
|
12
12
|
"files": [
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
"description": "Generate two or three HTML candidates side by side (project design, design guides or custom directions) and adopt one as the next revision, over useCreationVariants.",
|
|
6
6
|
"dependencies": [
|
|
7
7
|
"react@19.3.0",
|
|
8
|
-
"@uibot/contracts@0.
|
|
9
|
-
"@uibot/creation-kit@0.
|
|
10
|
-
"@uibot/web-preview@0.
|
|
8
|
+
"@uibot/contracts@0.20.0",
|
|
9
|
+
"@uibot/creation-kit@0.20.0",
|
|
10
|
+
"@uibot/web-preview@0.20.0"
|
|
11
11
|
],
|
|
12
12
|
"registryDependencies": [
|
|
13
13
|
"button",
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
"description": "Manual HTML creation workspace (projects, artifacts, CAS saves with a conflict step, generation, export) over useCreationWorkspace; the host renders the editor.",
|
|
6
6
|
"dependencies": [
|
|
7
7
|
"react@19.3.0",
|
|
8
|
-
"@uibot/contracts@0.
|
|
9
|
-
"@uibot/creation-kit@0.
|
|
10
|
-
"@uibot/web-preview@0.
|
|
8
|
+
"@uibot/contracts@0.20.0",
|
|
9
|
+
"@uibot/creation-kit@0.20.0",
|
|
10
|
+
"@uibot/web-preview@0.20.0"
|
|
11
11
|
],
|
|
12
12
|
"registryDependencies": [
|
|
13
13
|
"button",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
{
|
|
19
19
|
"path": "lib/uibot/templates/crm-workspace.uibot.yaml",
|
|
20
20
|
"target": "lib/uibot/templates/crm-workspace.uibot.yaml",
|
|
21
|
-
"content": "version: \"2.0\"\npages:\n - id: crm\n path: /\n title: Pipeline — CRM\n blocks:\n - type: PageLayout\n props:\n title: Relate CRM\n variant: sidebar\n collapsible: none\n slots:\n sidebar:\n - type: PageSiderMenu\n props:\n title: Sales\n children:\n - type: MenuLink\n props:\n label: Pipeline\n href: \"#\"\n icon: ◫\n active: true\n - type: MenuLink\n props:\n label: Contacts\n href: \"#\"\n icon: ◍\n badge: \"5\"\n - type: MenuLink\n props:\n label: Deals\n href: \"#\"\n icon: ◆\n - type: MenuLink\n props:\n label: Reports\n href: \"#\"\n icon: ◔\n badge: n/a\n headerActions:\n - type: Button\n props:\n label: + Add lead\n size: sm\n children:\n - type: Box\n props:\n className: flex items-end justify-between gap-4 mb-3 border-b border-border pb-3\n children:\n - type: Box\n children:\n - type: Heading\n props:\n level: 2\n text: Pipeline\n - type: Paragraph\n props:\n size: sm\n muted: true\n text: Demo workspace · sample deals, not live ARR\n - type: BadgeGroup\n props:\n items:\n - label: 1 hot deal\n tone: warning\n - label: Forecast n/a\n tone: info\n - type: Toast\n props:\n level: warning\n title: Status first\n message: Umbrella Inc is marked hot. Pipeline dollars below are demo labels —\n live forecast stays n/a.\n - type: StatGrid\n props:\n cols: \"3\"\n items:\n - label: Open pipeline (demo)\n value: $1.24M\n change: sample board\n trend: up\n - label: Win rate (demo)\n value: 32%\n change: +3pt sample\n trend: up\n - label: Live forecast\n value: n/a\n description: CRM source offline\n - type: Card\n props:\n title: Pipeline by stage\n description: Five sample cards · hairline board\n className: rounded-none border border-border shadow-none\n children:\n - type: KanbanBoard\n props:\n columns:\n - id: lead\n title: Lead\n - id: qualified\n title: Qualified\n - id: proposal\n title: Proposal\n - id: won\n title: Won\n cards:\n - id: c1\n column: lead\n title: Globex Corp\n subtitle: $22,000 · demo\n badge: New\n - id: c2\n column: lead\n title: Initech\n subtitle: $8,400 · demo\n - id: c3\n column: qualified\n title: Umbrella Inc\n subtitle: $54,000 · demo\n badge: Hot\n - id: c4\n column: proposal\n title: Stark Industries\n subtitle: $140,000 · demo\n - id: c5\n column: won\n title: Wayne Enterprises\n subtitle: $96,000 · demo\n badge: Closed\n - type: Card\n props:\n title: Recent contacts\n description: Empty state is wired if the demo rows are cleared\n className: rounded-none border border-border shadow-none\n children:\n - type: Table\n props:\n emptyText: No contacts in this window.\n striped: true\n columns:\n - key: name\n label: Name\n - key: company\n label: Company\n - key: stage\n label: Stage\n - key: value\n label: Value\n align: right\n rows:\n - name: Marcus Webb\n company: Globex Corp\n stage: Lead\n value: $22,000\n - name: Lena Park\n company: Umbrella Inc\n stage: Qualified\n value: $54,000\n - name: Omar Haddad\n company: Stark Industries\n stage: Proposal\n value: $140,000\n - id: chat-history\n path: /chat-history\n title: Conversation workspace\n blocks:\n - id: chat-history-surface\n type: ChatWorkspace\n props:\n bindingId: chat\n variant: history\n title: Conversation workspace\n showSuggestions: true\n previewState: ready\n - id: document-writing\n path: /document-writing\n title: Focused writing\n blocks:\n - id: document-writing-editor\n type: DocumentWorkspace\n props:\n bindingId: document\n title: Focused writing\n markdown: |-\n # Project notes\n\n Capture the decisions behind your next idea.\n\n ## Overview\n\n Write, select text, and explore the formatting controls.\n\n ## Next steps\n\n - Review the draft\n - Connect your document host\n readOnly: false\n autoSaveMs: 1500\n locale: zh-CN\n previewState: ready\n variant: writing\ncomposition:\n schema: uibot.solution-composition.v1\n pages:\n - resourceId: template:chat-history\n version: 0.
|
|
21
|
+
"content": "version: \"2.0\"\npages:\n - id: crm\n path: /\n title: Pipeline — CRM\n blocks:\n - type: PageLayout\n props:\n title: Relate CRM\n variant: sidebar\n collapsible: none\n slots:\n sidebar:\n - type: PageSiderMenu\n props:\n title: Sales\n children:\n - type: MenuLink\n props:\n label: Pipeline\n href: \"#\"\n icon: ◫\n active: true\n - type: MenuLink\n props:\n label: Contacts\n href: \"#\"\n icon: ◍\n badge: \"5\"\n - type: MenuLink\n props:\n label: Deals\n href: \"#\"\n icon: ◆\n - type: MenuLink\n props:\n label: Reports\n href: \"#\"\n icon: ◔\n badge: n/a\n headerActions:\n - type: Button\n props:\n label: + Add lead\n size: sm\n children:\n - type: Box\n props:\n className: flex items-end justify-between gap-4 mb-3 border-b border-border pb-3\n children:\n - type: Box\n children:\n - type: Heading\n props:\n level: 2\n text: Pipeline\n - type: Paragraph\n props:\n size: sm\n muted: true\n text: Demo workspace · sample deals, not live ARR\n - type: BadgeGroup\n props:\n items:\n - label: 1 hot deal\n tone: warning\n - label: Forecast n/a\n tone: info\n - type: Toast\n props:\n level: warning\n title: Status first\n message: Umbrella Inc is marked hot. Pipeline dollars below are demo labels —\n live forecast stays n/a.\n - type: StatGrid\n props:\n cols: \"3\"\n items:\n - label: Open pipeline (demo)\n value: $1.24M\n change: sample board\n trend: up\n - label: Win rate (demo)\n value: 32%\n change: +3pt sample\n trend: up\n - label: Live forecast\n value: n/a\n description: CRM source offline\n - type: Card\n props:\n title: Pipeline by stage\n description: Five sample cards · hairline board\n className: rounded-none border border-border shadow-none\n children:\n - type: KanbanBoard\n props:\n columns:\n - id: lead\n title: Lead\n - id: qualified\n title: Qualified\n - id: proposal\n title: Proposal\n - id: won\n title: Won\n cards:\n - id: c1\n column: lead\n title: Globex Corp\n subtitle: $22,000 · demo\n badge: New\n - id: c2\n column: lead\n title: Initech\n subtitle: $8,400 · demo\n - id: c3\n column: qualified\n title: Umbrella Inc\n subtitle: $54,000 · demo\n badge: Hot\n - id: c4\n column: proposal\n title: Stark Industries\n subtitle: $140,000 · demo\n - id: c5\n column: won\n title: Wayne Enterprises\n subtitle: $96,000 · demo\n badge: Closed\n - type: Card\n props:\n title: Recent contacts\n description: Empty state is wired if the demo rows are cleared\n className: rounded-none border border-border shadow-none\n children:\n - type: Table\n props:\n emptyText: No contacts in this window.\n striped: true\n columns:\n - key: name\n label: Name\n - key: company\n label: Company\n - key: stage\n label: Stage\n - key: value\n label: Value\n align: right\n rows:\n - name: Marcus Webb\n company: Globex Corp\n stage: Lead\n value: $22,000\n - name: Lena Park\n company: Umbrella Inc\n stage: Qualified\n value: $54,000\n - name: Omar Haddad\n company: Stark Industries\n stage: Proposal\n value: $140,000\n - id: chat-history\n path: /chat-history\n title: Conversation workspace\n blocks:\n - id: chat-history-surface\n type: ChatWorkspace\n props:\n bindingId: chat\n variant: history\n title: Conversation workspace\n showSuggestions: true\n previewState: ready\n - id: document-writing\n path: /document-writing\n title: Focused writing\n blocks:\n - id: document-writing-editor\n type: DocumentWorkspace\n props:\n bindingId: document\n title: Focused writing\n markdown: |-\n # Project notes\n\n Capture the decisions behind your next idea.\n\n ## Overview\n\n Write, select text, and explore the formatting controls.\n\n ## Next steps\n\n - Review the draft\n - Connect your document host\n readOnly: false\n autoSaveMs: 1500\n locale: zh-CN\n previewState: ready\n variant: writing\ncomposition:\n schema: uibot.solution-composition.v1\n pages:\n - resourceId: template:chat-history\n version: 0.20.0\n sourceHash: 0cf2b52c4fe098bbc2412b931b5a37981bb1727a42f2a50067ff4ddab51444eb\n sourcePageId: chat-history\n targetPageId: chat-history\n baseline:\n id: chat-history\n path: /chat-history\n title: Conversation workspace\n blocks:\n - id: chat-history-surface\n type: ChatWorkspace\n props:\n bindingId: chat\n variant: history\n title: Conversation workspace\n showSuggestions: true\n previewState: ready\n bindings:\n paths: {}\n connections: {}\n layout: source\n - resourceId: template:document-writing\n version: 0.20.0\n sourceHash: 574a264ba29e0e4a712896288dca56a3cb67d3ee202da6e0df3532a5507ed9cf\n sourcePageId: document-writing\n targetPageId: document-writing\n baseline:\n id: document-writing\n path: /document-writing\n title: Focused writing\n blocks:\n - id: document-writing-editor\n type: DocumentWorkspace\n props:\n bindingId: document\n title: Focused writing\n markdown: |-\n # Project notes\n\n Capture the decisions behind your next idea.\n\n ## Overview\n\n Write, select text, and explore the formatting controls.\n\n ## Next steps\n\n - Review the draft\n - Connect your document host\n readOnly: false\n autoSaveMs: 1500\n locale: zh-CN\n previewState: ready\n variant: writing\n bindings:\n paths: {}\n connections: {}\n layout: source\nmenus:\n items:\n - key: crm\n label: Pipeline — CRM\n path: /\n - key: chat-history\n label: Conversation workspace\n path: /chat-history\n - key: document-writing\n label: Focused writing\n path: /document-writing\n",
|
|
22
22
|
"type": "registry:lib"
|
|
23
23
|
},
|
|
24
24
|
{
|