@tc96/cli 0.27.0 → 0.28.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 +4 -4
- package/cli.js +82 -27
- package/package.json +1 -1
- package/registry/agenda-1.json +1297 -0
- package/registry/aggregate.json +1 -1
- package/registry/ai-chat-1.json +91 -0
- package/registry/checklist.json +21 -7
- package/registry/collection.json +624 -351
- package/registry/crm-1.json +1317 -0
- package/registry/crm-2.json +1400 -0
- package/registry/dashboard-5.json +167 -0
- package/registry/dashboard-6.json +143 -0
- package/registry/dashboard-7.json +188 -0
- package/registry/documents-1.json +1322 -0
- package/registry/finance-1.json +845 -0
- package/registry/finance-2.json +973 -0
- package/registry/finance-3.json +1436 -0
- package/registry/{workflow-editor.json → flow-1.json} +37 -37
- package/registry/{agent-builder.json → flow-2.json} +55 -55
- package/registry/{run-monitor.json → flow-3.json} +16 -16
- package/registry/{impact-map.json → flow-4.json} +16 -16
- package/registry/inbox-1.json +1184 -0
- package/registry/inventory-1.json +828 -0
- package/registry/inventory-2.json +956 -0
- package/registry/legal-1.json +1345 -0
- package/registry/legal-2.json +1279 -0
- package/registry/legal-3.json +1273 -0
- package/registry/legal-4.json +1273 -0
- package/registry/legal-5.json +1393 -0
- package/registry/legal-6.json +1309 -0
- package/registry/legal-7.json +1315 -0
- package/registry/legal-8.json +1358 -0
- package/registry/legal-9.json +1381 -0
- package/registry/marketing-1.json +833 -0
- package/registry/marketing-2.json +961 -0
- package/registry/navbar-1.json +6 -6
- package/registry/navbar-10.json +50 -0
- package/registry/navbar-11.json +48 -0
- package/registry/navbar-12.json +48 -0
- package/registry/navbar-6.json +48 -0
- package/registry/navbar-7.json +72 -0
- package/registry/navbar-8.json +50 -0
- package/registry/navbar-9.json +54 -0
- package/registry/projects-1.json +865 -0
- package/registry/projects-2.json +993 -0
- package/registry/projects-3.json +1346 -0
- package/registry/properties.json +65 -58
- package/registry/record-group.json +5 -1
- package/registry/revenue-1.json +834 -0
- package/registry/revenue-2.json +968 -0
- package/registry/revenue-3.json +821 -0
- package/registry/revenue-4.json +949 -0
- package/registry/rich-text-editor-1.json +172 -0
- package/registry/rich-text-editor-2.json +158 -0
- package/registry/rich-text-editor-3.json +198 -0
- package/registry/rich-text-editor-4.json +200 -0
- package/registry/rich-text-editor-5.json +237 -0
- package/registry/rich-text-editor.json +27 -7
- package/registry/{settings-1.json → settings-account-1.json} +17 -17
- package/registry/{settings-23.json → settings-account-2.json} +17 -17
- package/registry/{settings-7.json → settings-catalog-1.json} +17 -17
- package/registry/{settings-16.json → settings-catalog-10.json} +17 -17
- package/registry/{settings-8.json → settings-catalog-2.json} +17 -17
- package/registry/{settings-9.json → settings-catalog-3.json} +17 -17
- package/registry/{settings-10.json → settings-catalog-4.json} +29 -20
- package/registry/{settings-11.json → settings-catalog-5.json} +17 -17
- package/registry/{settings-12.json → settings-catalog-6.json} +17 -17
- package/registry/{settings-13.json → settings-catalog-7.json} +17 -17
- package/registry/{settings-14.json → settings-catalog-8.json} +29 -19
- package/registry/{settings-15.json → settings-catalog-9.json} +28 -18
- package/registry/{settings-19.json → settings-integration-1.json} +17 -17
- package/registry/settings-integration-2.json +122 -0
- package/registry/{settings-22.json → settings-integration-3.json} +17 -17
- package/registry/settings-integration-4.json +129 -0
- package/registry/settings-integration-5.json +122 -0
- package/registry/settings-integration-6.json +92 -0
- package/registry/{settings-21.json → settings-integration-7.json} +23 -17
- package/registry/settings-integration-8.json +593 -0
- package/registry/{settings-20.json → settings-notification-channel-1.json} +17 -17
- package/registry/{settings-2.json → settings-preference-1.json} +17 -17
- package/registry/{settings-3.json → settings-preference-2.json} +17 -17
- package/registry/{settings-4.json → settings-preference-3.json} +17 -17
- package/registry/{settings-18.json → settings-role-permission-1.json} +17 -17
- package/registry/{settings-17.json → settings-security-1.json} +17 -17
- package/registry/{settings-5.json → settings-workspace-1.json} +28 -28
- package/registry/{settings-6.json → settings-workspace-2.json} +31 -31
- package/registry/support-1.json +853 -0
- package/registry/support-2.json +981 -0
- package/registry/support-3.json +762 -0
- package/registry/support-4.json +538 -0
- package/registry/team-1.json +829 -0
- package/registry/team-2.json +957 -0
- package/registry/ui/gauge.json +1 -1
- package/registry/ui/menu.json +1 -1
- package/registry/ui/property-meta.json +16 -0
- package/registry/ui/property-tone.json +12 -0
- package/registry/ui/scroll-area.json +1 -1
- package/registry/ui/select.json +1 -1
- package/registry/view.json +624 -351
- package/registry/app-shell-5.json +0 -106
- package/registry/bulk-import-1.json +0 -151
- package/registry/collection-layouts.json +0 -836
- package/registry/collection-views.json +0 -836
- package/registry/detail-sheet.json +0 -54
- package/registry/icon-row.json +0 -52
- package/registry/lookup-create-1.json +0 -157
- package/registry/next-steps-1.json +0 -147
- package/registry/settings-shell.json +0 -60
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
2
|
+
"name": "flow-4",
|
|
3
3
|
"type": "registry:block",
|
|
4
4
|
"files": [
|
|
5
5
|
{
|
|
6
|
-
"path": "blocks/
|
|
6
|
+
"path": "blocks/application/flow/flow-4/flow-4-skeleton.tsx",
|
|
7
7
|
"type": "registry:file",
|
|
8
|
-
"content": "import { Skeleton } from '@tc96/ui/skeleton'\nimport { cn } from '@tc96/utils'\n\nexport function
|
|
9
|
-
"target": "~/packages/ui/src/blocks/
|
|
8
|
+
"content": "import { Skeleton } from '@tc96/ui/skeleton'\nimport { cn } from '@tc96/utils'\n\nexport function Flow4Skeleton({\n className,\n label,\n title,\n}: Readonly<{ className?: string; label: string; title: string }>) {\n return (\n <section\n aria-busy=\"true\"\n aria-label={label}\n className={cn('grid gap-4', className)}\n >\n <h3 className=\"font-medium text-base\">{title}</h3>\n <div className=\"grid justify-items-center gap-10 rounded-xl border p-6\">\n <Skeleton className=\"h-24 w-56 rounded-xl\" />\n <div className=\"flex gap-6\">\n <Skeleton className=\"h-24 w-56 rounded-xl\" />\n <Skeleton className=\"h-24 w-56 rounded-xl\" />\n </div>\n <div className=\"flex gap-6\">\n <Skeleton className=\"h-24 w-56 rounded-xl\" />\n <Skeleton className=\"h-24 w-56 rounded-xl\" />\n <Skeleton className=\"h-24 w-56 rounded-xl\" />\n </div>\n </div>\n </section>\n )\n}\n",
|
|
9
|
+
"target": "~/packages/ui/src/blocks/application/flow/flow-4/flow-4-skeleton.tsx"
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
|
-
"path": "blocks/
|
|
12
|
+
"path": "blocks/application/flow/flow-4/flow-4.tsx",
|
|
13
13
|
"type": "registry:file",
|
|
14
|
-
"content": "'use client'\n\nimport { Avatar, AvatarFallback } from '@tc96/ui/avatar'\nimport { Badge } from '@tc96/ui/badge'\nimport { Button } from '@tc96/ui/button'\nimport { getInitials } from '@tc96/ui/helpers/initials'\nimport { type FlowStep, tidyTree } from '@tc96/ui/patterns/flow/canvas/core'\nimport { StateSurface } from '@tc96/ui/patterns/surfaces/state/composition/state-surface/state-surface'\nimport { Progress } from '@tc96/ui/progress'\nimport { cn } from '@tc96/utils'\nimport { type ReactElement, useMemo } from 'react'\nimport {
|
|
15
|
-
"target": "~/packages/ui/src/blocks/
|
|
14
|
+
"content": "'use client'\n\nimport { Avatar, AvatarFallback } from '@tc96/ui/avatar'\nimport { Badge } from '@tc96/ui/badge'\nimport { Button } from '@tc96/ui/button'\nimport { getInitials } from '@tc96/ui/helpers/initials'\nimport { type FlowStep, tidyTree } from '@tc96/ui/patterns/flow/canvas/core'\nimport { StateSurface } from '@tc96/ui/patterns/surfaces/state/composition/state-surface/state-surface'\nimport { Progress } from '@tc96/ui/progress'\nimport { cn } from '@tc96/utils'\nimport { type ReactElement, useMemo } from 'react'\nimport { Flow4Skeleton } from './flow-4-skeleton'\nimport { defaultFlow4Labels } from './labels'\nimport type { Flow4Node, Flow4Props } from './types'\n\nconst nodeSize = [224, 112] as const\nconst gap = [32, 64] as const\nconst padding = 24\n\nfunction clampProgress(value: number): number {\n return Math.min(100, Math.max(0, Math.round(value)))\n}\n\nfunction layout(nodes: Flow4Node[], links: Flow4Props['links']) {\n const steps: FlowStep[] = nodes.map((node) => ({\n id: node.id,\n name: node.title,\n position: { x: 0, y: 0 },\n type: node.kind,\n }))\n const placed = tidyTree(\n steps,\n links.map((link) => ({\n id: link.id,\n source: link.target,\n target: link.source,\n })),\n { direction: 'vertical', gap, nodeSize },\n )\n const positions = new Map(placed.map((step) => [step.id, step.position]))\n const width =\n Math.max(0, ...placed.map((step) => step.position.x)) + nodeSize[0]\n const height =\n Math.max(0, ...placed.map((step) => step.position.y)) + nodeSize[1]\n return { height, positions, width }\n}\n\nexport function Flow4({\n className,\n error = false,\n labels: labelsProp,\n links,\n nodes,\n onNodeSelect,\n onRetry,\n pending = false,\n selectedId = null,\n}: Readonly<Flow4Props>): ReactElement {\n const labels = { ...defaultFlow4Labels, ...labelsProp }\n const tree = useMemo(() => layout(nodes, links), [nodes, links])\n\n if (pending) {\n return (\n <Flow4Skeleton\n className={className}\n label={labels.loading}\n title={labels.title}\n />\n )\n }\n\n const edges = links.flatMap((link) => {\n const from = tree.positions.get(link.source)\n const to = tree.positions.get(link.target)\n if (!from || !to) return []\n const x1 = from.x + nodeSize[0] / 2\n const y1 = from.y\n const x2 = to.x + nodeSize[0] / 2\n const y2 = to.y + nodeSize[1]\n const middle = (y1 + y2) / 2\n return [\n {\n d: `M ${x1} ${y1} C ${x1} ${middle}, ${x2} ${middle}, ${x2} ${y2}`,\n id: link.id,\n },\n ]\n })\n\n return (\n <section\n aria-label={labels.title}\n className={cn('grid gap-4', className)}\n data-slot=\"flow-4\"\n >\n <h3 className=\"font-medium text-base\">{labels.title}</h3>\n {error ? (\n <StateSurface\n actions={\n onRetry ? (\n <Button onClick={onRetry} size=\"sm\" variant=\"outline\">\n {labels.retry}\n </Button>\n ) : undefined\n }\n description={labels.errorDescription}\n kind=\"error\"\n title={labels.errorTitle}\n />\n ) : nodes.length === 0 ? (\n <StateSurface\n description={labels.emptyDescription}\n kind=\"empty\"\n title={labels.emptyTitle}\n />\n ) : (\n <div className=\"overflow-auto rounded-xl border bg-background\">\n <div\n className=\"relative mx-auto\"\n style={{\n height: tree.height + padding * 2,\n width: tree.width + padding * 2,\n }}\n >\n <svg\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute inset-0 size-full\"\n data-slot=\"flow-4-edges\"\n >\n <g transform={`translate(${padding} ${padding})`}>\n {edges.map((edge) => (\n <path\n className=\"fill-none stroke-2 stroke-border\"\n d={edge.d}\n key={edge.id}\n />\n ))}\n </g>\n </svg>\n <ul aria-label={labels.map} className=\"m-0 list-none p-0\">\n {nodes.map((node) => {\n const position = tree.positions.get(node.id)\n if (!position) return null\n const selected = node.id === selectedId\n const progress = clampProgress(node.progress)\n return (\n <li\n className=\"absolute\"\n key={node.id}\n style={{\n height: nodeSize[1],\n left: position.x + padding,\n top: position.y + padding,\n width: nodeSize[0],\n }}\n >\n <button\n aria-pressed={selected}\n className={cn(\n 'grid size-full content-between gap-2 rounded-xl border bg-card p-3 text-start text-card-foreground outline-none transition-shadow focus-visible:ring-2 focus-visible:ring-ring',\n selected &&\n 'border-primary bg-accent ring-2 ring-primary',\n )}\n data-kind={node.kind}\n data-node={node.id}\n data-selected={selected || undefined}\n onClick={() => onNodeSelect?.(node.id)}\n type=\"button\"\n >\n <span className=\"flex items-start gap-2\">\n <span className=\"grid min-w-0 flex-1 gap-1\">\n <span className=\"text-muted-foreground text-xs\">\n {labels.kinds[node.kind]}\n </span>\n <span className=\"truncate font-medium text-sm\">\n {node.title}\n </span>\n </span>\n {node.owner ? (\n <Avatar\n aria-label={labels.owner(node.owner)}\n className=\"[--avatar-size:--spacing(6)]\"\n role=\"img\"\n >\n <AvatarFallback>\n {getInitials(node.owner)}\n </AvatarFallback>\n </Avatar>\n ) : null}\n </span>\n <span className=\"grid gap-1.5\">\n <Progress\n aria-label={labels.progress(node.title, progress)}\n value={progress}\n />\n <span className=\"flex items-center justify-between text-muted-foreground text-xs tabular-nums\">\n <span>{progress}%</span>\n {node.valueText ? (\n <Badge variant=\"outline\">{node.valueText}</Badge>\n ) : null}\n </span>\n </span>\n </button>\n </li>\n )\n })}\n </ul>\n </div>\n </div>\n )}\n </section>\n )\n}\n",
|
|
15
|
+
"target": "~/packages/ui/src/blocks/application/flow/flow-4/flow-4.tsx"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
|
-
"path": "blocks/
|
|
18
|
+
"path": "blocks/application/flow/flow-4/index.ts",
|
|
19
19
|
"type": "registry:file",
|
|
20
|
-
"content": "export {
|
|
21
|
-
"target": "~/packages/ui/src/blocks/
|
|
20
|
+
"content": "export { Flow4 } from './flow-4'\nexport type {\n Flow4Kind,\n Flow4Labels,\n Flow4Link,\n Flow4Node,\n Flow4Props,\n} from './types'\n",
|
|
21
|
+
"target": "~/packages/ui/src/blocks/application/flow/flow-4/index.ts"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
"path": "blocks/
|
|
24
|
+
"path": "blocks/application/flow/flow-4/labels.ts",
|
|
25
25
|
"type": "registry:file",
|
|
26
|
-
"content": "import type {
|
|
27
|
-
"target": "~/packages/ui/src/blocks/
|
|
26
|
+
"content": "import type { Flow4Labels } from './types'\n\nexport const defaultFlow4Labels: Flow4Labels = {\n emptyDescription:\n 'Os nós aparecem aqui assim que houver iniciativas e métricas.',\n emptyTitle: 'Nenhum nó no mapa',\n errorDescription: 'Tente novamente em instantes.',\n errorTitle: 'Não foi possível carregar o mapa de impacto',\n kinds: {\n initiative: 'Iniciativa',\n metric: 'Métrica',\n 'north-star': 'North star',\n },\n loading: 'Carregando mapa de impacto',\n map: 'Árvore de impacto',\n owner: (name) => `Responsável: ${name}`,\n progress: (title, value) => `Progresso de ${title}: ${value}%`,\n retry: 'Tentar novamente',\n title: 'Mapa de impacto de crescimento',\n}\n",
|
|
27
|
+
"target": "~/packages/ui/src/blocks/application/flow/flow-4/labels.ts"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
"path": "blocks/
|
|
30
|
+
"path": "blocks/application/flow/flow-4/types.ts",
|
|
31
31
|
"type": "registry:file",
|
|
32
|
-
"content": "export type
|
|
33
|
-
"target": "~/packages/ui/src/blocks/
|
|
32
|
+
"content": "export type Flow4Kind = 'initiative' | 'metric' | 'north-star'\n\nexport interface Flow4Node {\n id: string\n kind: Flow4Kind\n owner?: string\n progress: number\n title: string\n valueText?: string\n}\n\nexport interface Flow4Link {\n id: string\n source: string\n target: string\n}\n\nexport interface Flow4Labels {\n emptyDescription: string\n emptyTitle: string\n errorDescription: string\n errorTitle: string\n kinds: Record<Flow4Kind, string>\n loading: string\n map: string\n owner: (name: string) => string\n progress: (title: string, value: number) => string\n retry: string\n title: string\n}\n\nexport interface Flow4Props {\n className?: string\n error?: boolean\n labels?: Partial<Flow4Labels>\n links: Flow4Link[]\n nodes: Flow4Node[]\n onNodeSelect?: (id: string) => void\n onRetry?: () => void\n pending?: boolean\n selectedId?: string | null\n}\n",
|
|
33
|
+
"target": "~/packages/ui/src/blocks/application/flow/flow-4/types.ts"
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
"path": "helpers/initials.ts",
|