velloo 0.0.0 → 0.2.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/BUN-LICENSE.md +91 -0
- package/LICENSE +202 -0
- package/NOTICE +9 -0
- package/README.md +288 -2
- package/THIRD-PARTY-NOTICES.md +467 -0
- package/assets/elsewhere-alps-9fqhv029.jpg +0 -0
- package/assets/elsewhere-bali-vp60g115.jpg +0 -0
- package/assets/elsewhere-forest-xgn23zrj.jpg +0 -0
- package/assets/elsewhere-japan-qs7qkbr2.jpg +0 -0
- package/assets/elsewhere-kyoto-map-n2bvkrya.svg +1 -0
- package/assets/elsewhere-kyoto-qemtn6nk.jpg +0 -0
- package/assets/elsewhere-room-g1gaw7cs.jpg +0 -0
- package/canvas/apple-touch-icon.png +0 -0
- package/canvas/assets/index-BCvDZiBo.css +2 -0
- package/canvas/assets/index-ClaBqcaS.js +28 -0
- package/canvas/assets/lucide-all-iIF-pmzN.js +1 -0
- package/canvas/assets/radix-C3HaOB-d.js +41 -0
- package/canvas/assets/react-D0Ec-185.js +9 -0
- package/canvas/assets/rolldown-runtime-hePW80VL.js +1 -0
- package/canvas/assets/vendor-CKmQ-Zst.js +53 -0
- package/canvas/favicon.ico +0 -0
- package/canvas/favicon.svg +12 -0
- package/canvas/fonts/OFL-1.1.txt +93 -0
- package/canvas/fonts/poppins-700.woff2 +0 -0
- package/canvas/icon-192.png +0 -0
- package/canvas/icon-512.png +0 -0
- package/canvas/index.html +22 -0
- package/canvas/site.webmanifest +11 -0
- package/chunk-08sv3k41.js +4 -0
- package/chunk-0fe83yzt.js +2 -0
- package/chunk-0t68szgr.js +3 -0
- package/chunk-1h55s5he.js +2 -0
- package/chunk-2c7jbx46.js +2 -0
- package/chunk-2smsg2ct.js +7 -0
- package/chunk-308ynsxd.js +2 -0
- package/chunk-3e8vez4d.js +1229 -0
- package/chunk-40xgcth8.js +63 -0
- package/chunk-4dn75m6t.js +3 -0
- package/chunk-4fj5tahv.js +3 -0
- package/chunk-6nqghjda.js +3 -0
- package/chunk-6tx68d90.js +3 -0
- package/chunk-6w6ch4ce.js +2 -0
- package/chunk-735ezz23.js +86 -0
- package/chunk-7eq7nx37.js +7 -0
- package/chunk-7eyb8yrf.js +6 -0
- package/chunk-80fjfyha.js +86 -0
- package/chunk-80r93t2e.js +4 -0
- package/chunk-94vx1yb0.js +3 -0
- package/chunk-9vg3yafz.js +3 -0
- package/chunk-a84n72m2.js +4 -0
- package/chunk-ampmdzz4.js +10 -0
- package/chunk-avns4dbf.js +2 -0
- package/chunk-ayrb3qnm.js +3 -0
- package/chunk-bwnvcncx.js +3 -0
- package/chunk-ccszg02q.js +5 -0
- package/chunk-cvn689d5.js +3 -0
- package/chunk-cxe6jjwj.js +3 -0
- package/chunk-dg6z4vdd.js +3 -0
- package/chunk-dgwjpbp9.js +3 -0
- package/chunk-dy41n60j.js +52 -0
- package/chunk-ek71z2fv.js +226 -0
- package/chunk-er1fxb7d.js +2 -0
- package/chunk-eyr8hrzf.js +2 -0
- package/chunk-fjbzk4sw.js +3 -0
- package/chunk-fsbsksga.js +3 -0
- package/chunk-h6gchare.js +3 -0
- package/chunk-hcb68zt7.js +85 -0
- package/chunk-hggap8fq.js +3 -0
- package/chunk-j11fyeqh.js +2 -0
- package/chunk-jb21jkp1.js +8 -0
- package/chunk-jfx9xjmr.js +18 -0
- package/chunk-jr0ss0mm.js +303 -0
- package/chunk-jrsknzjt.js +3 -0
- package/chunk-jv0xggh0.js +2 -0
- package/chunk-k17gfwq3.js +2 -0
- package/chunk-mh2pr7cq.js +5 -0
- package/chunk-mnapdp1y.js +2 -0
- package/chunk-mzhdrawd.js +3 -0
- package/chunk-n9gs6yx9.js +2 -0
- package/chunk-ngnymg2q.js +3 -0
- package/chunk-nwx5700b.js +3 -0
- package/chunk-pjtg3wnm.js +4 -0
- package/chunk-pp86v6m6.js +3 -0
- package/chunk-r22epxz2.js +3 -0
- package/chunk-rgasy862.js +5 -0
- package/chunk-rpwpeph5.js +3 -0
- package/chunk-s23gtejf.js +3 -0
- package/chunk-sjgqnykd.js +6 -0
- package/chunk-sn3x2m0m.js +6 -0
- package/chunk-t448rrfr.js +2 -0
- package/chunk-tdsk5wxa.js +451 -0
- package/chunk-v40fn08f.js +442 -0
- package/chunk-vbk1qhdz.js +3 -0
- package/chunk-vdkrbzh1.js +2 -0
- package/chunk-vgmr98cv.js +40 -0
- package/chunk-vsv8z729.js +6 -0
- package/chunk-x4f4k9pp.js +26 -0
- package/chunk-xt5ayg7g.js +4 -0
- package/chunk-ydhwv29b.js +244 -0
- package/chunk-zb6hc1y0.js +2 -0
- package/cli.js +3 -0
- package/launcher.cjs +97 -0
- package/package.json +58 -5
- package/pkgs/helpers/src/box.tsx +21 -0
- package/pkgs/helpers/src/cn.ts +32 -0
- package/pkgs/helpers/src/descriptors.ts +270 -0
- package/pkgs/helpers/src/divider.tsx +123 -0
- package/pkgs/helpers/src/gradient.tsx +90 -0
- package/pkgs/helpers/src/heading.tsx +20 -0
- package/pkgs/helpers/src/icon-data.ts +8009 -0
- package/pkgs/helpers/src/icon.tsx +53 -0
- package/pkgs/helpers/src/image.tsx +111 -0
- package/pkgs/helpers/src/index.ts +29 -0
- package/pkgs/helpers/src/layer.tsx +61 -0
- package/pkgs/helpers/src/lowering.ts +53 -0
- package/pkgs/helpers/src/paths.ts +47 -0
- package/pkgs/helpers/src/placeholder.tsx +88 -0
- package/pkgs/helpers/src/prose.tsx +42 -0
- package/pkgs/helpers/src/registry.ts +41 -0
- package/pkgs/helpers/src/svg.tsx +62 -0
- package/pkgs/helpers/src/text.tsx +16 -0
- package/pkgs/provider-antd/src/index.ts +78 -0
- package/pkgs/provider-antd/src/intro.ts +14 -0
- package/pkgs/provider-antd/src/manifest.ts +439 -0
- package/pkgs/provider-antd/src/overlays.ts +176 -0
- package/pkgs/provider-antd/src/registry.ts +104 -0
- package/pkgs/provider-antd/src/render-pass.ts +43 -0
- package/pkgs/provider-antd/src/tailwind-entry.css +21 -0
- package/pkgs/provider-antd/src/theme.ts +132 -0
- package/pkgs/provider-antd/src/version.ts +8 -0
- package/pkgs/provider-chakra/src/index.ts +80 -0
- package/pkgs/provider-chakra/src/intro.ts +14 -0
- package/pkgs/provider-chakra/src/manifest.ts +421 -0
- package/pkgs/provider-chakra/src/overlays.ts +246 -0
- package/pkgs/provider-chakra/src/registry.ts +227 -0
- package/pkgs/provider-chakra/src/render-pass.ts +55 -0
- package/pkgs/provider-chakra/src/tailwind-entry.css +21 -0
- package/pkgs/provider-chakra/src/theme.ts +180 -0
- package/pkgs/provider-chakra/src/version.ts +8 -0
- package/pkgs/provider-mui/src/index.ts +117 -0
- package/pkgs/provider-mui/src/intro.ts +12 -0
- package/pkgs/provider-mui/src/manifest.ts +263 -0
- package/pkgs/provider-mui/src/overlays.ts +124 -0
- package/pkgs/provider-mui/src/registry.ts +120 -0
- package/pkgs/provider-mui/src/render-pass.ts +36 -0
- package/pkgs/provider-mui/src/tailwind-entry.css +21 -0
- package/pkgs/provider-mui/src/theme.ts +129 -0
- package/pkgs/provider-mui/src/version.ts +8 -0
- package/pkgs/provider-none/src/components-inline.tsx +204 -0
- package/pkgs/provider-none/src/components.tsx +155 -0
- package/pkgs/provider-none/src/index.ts +57 -0
- package/pkgs/provider-none/src/intro.ts +18 -0
- package/pkgs/provider-none/src/manifest.ts +163 -0
- package/pkgs/provider-none/src/registry-inline.ts +36 -0
- package/pkgs/provider-none/src/registry.ts +39 -0
- package/pkgs/provider-none/src/tailwind-entry.css +57 -0
- package/pkgs/provider-none/src/version.ts +10 -0
- package/pkgs/schema/src/annotation.ts +120 -0
- package/pkgs/schema/src/asset.ts +66 -0
- package/pkgs/schema/src/board.ts +71 -0
- package/pkgs/schema/src/comment.ts +107 -0
- package/pkgs/schema/src/config.ts +185 -0
- package/pkgs/schema/src/css-sanitize.ts +56 -0
- package/pkgs/schema/src/extension.ts +105 -0
- package/pkgs/schema/src/fonts.ts +690 -0
- package/pkgs/schema/src/frame.ts +40 -0
- package/pkgs/schema/src/icon-name.ts +21 -0
- package/pkgs/schema/src/ids.ts +14 -0
- package/pkgs/schema/src/index.ts +169 -0
- package/pkgs/schema/src/migrate.ts +297 -0
- package/pkgs/schema/src/node.ts +229 -0
- package/pkgs/schema/src/paths.ts +28 -0
- package/pkgs/schema/src/repo.ts +134 -0
- package/pkgs/schema/src/screen.ts +30 -0
- package/pkgs/schema/src/snippet-resolve.ts +193 -0
- package/pkgs/schema/src/snippet.ts +104 -0
- package/pkgs/schema/src/svg-sanitize.ts +487 -0
- package/pkgs/schema/src/theme.ts +218 -0
- package/pkgs/schema/src/typeset.ts +693 -0
- package/pkgs/schema/src/validate-ids.ts +46 -0
- package/pkgs/schema/src/viewport.ts +8 -0
- package/pkgs/shadcn-snapshot/dist/manifest.json +8109 -0
- package/pkgs/shadcn-snapshot/src/components/canvas-portal.tsx +55 -0
- package/pkgs/shadcn-snapshot/src/components/ui/accordion.tsx +122 -0
- package/pkgs/shadcn-snapshot/src/components/ui/alert-dialog.tsx +164 -0
- package/pkgs/shadcn-snapshot/src/components/ui/alert.tsx +74 -0
- package/pkgs/shadcn-snapshot/src/components/ui/aspect-ratio.tsx +13 -0
- package/pkgs/shadcn-snapshot/src/components/ui/attachment.tsx +197 -0
- package/pkgs/shadcn-snapshot/src/components/ui/avatar.tsx +100 -0
- package/pkgs/shadcn-snapshot/src/components/ui/badge.tsx +50 -0
- package/pkgs/shadcn-snapshot/src/components/ui/breadcrumb.tsx +109 -0
- package/pkgs/shadcn-snapshot/src/components/ui/bubble.tsx +130 -0
- package/pkgs/shadcn-snapshot/src/components/ui/button-group.tsx +82 -0
- package/pkgs/shadcn-snapshot/src/components/ui/button.tsx +72 -0
- package/pkgs/shadcn-snapshot/src/components/ui/calendar.tsx +229 -0
- package/pkgs/shadcn-snapshot/src/components/ui/card.tsx +92 -0
- package/pkgs/shadcn-snapshot/src/components/ui/carousel.tsx +235 -0
- package/pkgs/shadcn-snapshot/src/components/ui/chart-option.ts +250 -0
- package/pkgs/shadcn-snapshot/src/components/ui/chart.tsx +177 -0
- package/pkgs/shadcn-snapshot/src/components/ui/checkbox.tsx +41 -0
- package/pkgs/shadcn-snapshot/src/components/ui/collapsible.tsx +32 -0
- package/pkgs/shadcn-snapshot/src/components/ui/combobox.tsx +196 -0
- package/pkgs/shadcn-snapshot/src/components/ui/context-menu.tsx +227 -0
- package/pkgs/shadcn-snapshot/src/components/ui/dialog.tsx +131 -0
- package/pkgs/shadcn-snapshot/src/components/ui/direction.tsx +24 -0
- package/pkgs/shadcn-snapshot/src/components/ui/drawer.tsx +112 -0
- package/pkgs/shadcn-snapshot/src/components/ui/dropdown-menu.tsx +205 -0
- package/pkgs/shadcn-snapshot/src/components/ui/empty.tsx +98 -0
- package/pkgs/shadcn-snapshot/src/components/ui/field.tsx +228 -0
- package/pkgs/shadcn-snapshot/src/components/ui/hover-card.tsx +51 -0
- package/pkgs/shadcn-snapshot/src/components/ui/input-group.tsx +148 -0
- package/pkgs/shadcn-snapshot/src/components/ui/input.tsx +43 -0
- package/pkgs/shadcn-snapshot/src/components/ui/item.tsx +187 -0
- package/pkgs/shadcn-snapshot/src/components/ui/kbd.tsx +30 -0
- package/pkgs/shadcn-snapshot/src/components/ui/label.tsx +25 -0
- package/pkgs/shadcn-snapshot/src/components/ui/marker.tsx +71 -0
- package/pkgs/shadcn-snapshot/src/components/ui/menubar.tsx +243 -0
- package/pkgs/shadcn-snapshot/src/components/ui/message.tsx +89 -0
- package/pkgs/shadcn-snapshot/src/components/ui/native-select.tsx +60 -0
- package/pkgs/shadcn-snapshot/src/components/ui/navigation-menu.tsx +165 -0
- package/pkgs/shadcn-snapshot/src/components/ui/pagination.tsx +117 -0
- package/pkgs/shadcn-snapshot/src/components/ui/popover.tsx +66 -0
- package/pkgs/shadcn-snapshot/src/components/ui/progress.tsx +35 -0
- package/pkgs/shadcn-snapshot/src/components/ui/radio-group.tsx +48 -0
- package/pkgs/shadcn-snapshot/src/components/ui/scroll-area.tsx +59 -0
- package/pkgs/shadcn-snapshot/src/components/ui/select.tsx +180 -0
- package/pkgs/shadcn-snapshot/src/components/ui/separator.tsx +32 -0
- package/pkgs/shadcn-snapshot/src/components/ui/sheet.tsx +107 -0
- package/pkgs/shadcn-snapshot/src/components/ui/skeleton.tsx +17 -0
- package/pkgs/shadcn-snapshot/src/components/ui/slider.tsx +68 -0
- package/pkgs/shadcn-snapshot/src/components/ui/sonner.tsx +91 -0
- package/pkgs/shadcn-snapshot/src/components/ui/spinner.tsx +21 -0
- package/pkgs/shadcn-snapshot/src/components/ui/switch.tsx +41 -0
- package/pkgs/shadcn-snapshot/src/components/ui/table.tsx +93 -0
- package/pkgs/shadcn-snapshot/src/components/ui/tabs.tsx +84 -0
- package/pkgs/shadcn-snapshot/src/components/ui/textarea.tsx +24 -0
- package/pkgs/shadcn-snapshot/src/components/ui/toggle-group.tsx +94 -0
- package/pkgs/shadcn-snapshot/src/components/ui/toggle.tsx +50 -0
- package/pkgs/shadcn-snapshot/src/components/ui/tooltip.tsx +47 -0
- package/pkgs/shadcn-snapshot/src/examples.ts +36 -0
- package/pkgs/shadcn-snapshot/src/groups.ts +87 -0
- package/pkgs/shadcn-snapshot/src/index.ts +43 -0
- package/pkgs/shadcn-snapshot/src/lib/utils.ts +4 -0
- package/pkgs/shadcn-snapshot/src/manifest.ts +12 -0
- package/pkgs/shadcn-snapshot/src/notes.ts +97 -0
- package/pkgs/shadcn-snapshot/src/paths.ts +47 -0
- package/pkgs/shadcn-snapshot/src/registry-files.ts +293 -0
- package/pkgs/shadcn-snapshot/src/registry.ts +631 -0
- package/pkgs/shadcn-snapshot/src/shadcn-tailwind.css +632 -0
- package/pkgs/shadcn-snapshot/src/tailwind-entry.css +159 -0
- package/pkgs/shadcn-snapshot/src/version.ts +8 -0
- package/plugins/claude/velloo/.claude-plugin/plugin.json +6 -0
- package/plugins/claude/velloo/agents/velloo-design-reviewer.md +33 -0
- package/plugins/claude/velloo/agents/velloo-designer.md +39 -0
- package/plugins/claude/velloo/commands/design.md +11 -0
- package/plugins/claude/velloo/commands/implement.md +10 -0
- package/plugins/claude/velloo/commands/review.md +8 -0
- package/plugins/gemini/GEMINI.md +31 -0
- package/plugins/gemini/commands/velloo/design.toml +10 -0
- package/plugins/gemini/commands/velloo/implement.toml +9 -0
- package/plugins/gemini/gemini-extension.json +9 -0
- package/skills/velloo-brand/SKILL.md +124 -0
- package/skills/velloo-design/SKILL.md +144 -0
- package/skills/velloo-design-system/SKILL.md +90 -0
- package/skills/velloo-implement/SKILL.md +101 -0
- package/skills/velloo-logo/SKILL.md +93 -0
- package/skills/velloo-setup/SKILL.md +156 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { dirname, join } from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import {
|
|
4
|
+
catalogFromManifest,
|
|
5
|
+
type FrameworkAdapter,
|
|
6
|
+
type Manifest,
|
|
7
|
+
STYLE_PROP,
|
|
8
|
+
} from "@velloo/provider";
|
|
9
|
+
import { resolveProviderSrcDir } from "@velloo/provider/src-dir";
|
|
10
|
+
import { ANTD_INTRO } from "./intro.ts";
|
|
11
|
+
import { ANTD_MANIFEST } from "./manifest.ts";
|
|
12
|
+
import { registry } from "./registry.ts";
|
|
13
|
+
import { makeRenderPass } from "./render-pass.ts";
|
|
14
|
+
import { antdThemeOptions } from "./theme.ts";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Ant Design v5 provider — a first-class FrameworkAdapter. antd ships as a
|
|
18
|
+
* velloo dependency (pre-bundled), so its components SSR in-process against
|
|
19
|
+
* the shared monorepo React; the adapter's cssinjs `renderPass` extracts the
|
|
20
|
+
* style sheet. antd has no `sx` — per-node styling is the inline `style`
|
|
21
|
+
* object (no Tailwind JIT), with antd tokens reachable as CSS variables via
|
|
22
|
+
* the theme's `cssVar` mode. Canvas-safe overlays
|
|
23
|
+
* (Modal/Drawer/Popover/Tooltip/Dropdown), `"antd"` codegen, a ConfigProvider
|
|
24
|
+
* `ThemeConfig` theme emit, `velloo init --library=antd`, and the catalog are
|
|
25
|
+
* all wired.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
export { ANTD_VERSION } from "./version.ts";
|
|
29
|
+
|
|
30
|
+
import { ANTD_VERSION } from "./version.ts";
|
|
31
|
+
|
|
32
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
33
|
+
|
|
34
|
+
/** Resolve the provider src (Tailwind entry + sources), from dev + the bundled CLI. */
|
|
35
|
+
const srcDir = resolveProviderSrcDir(here, "provider-antd", process.env.VELLOO_ANTD_SRC);
|
|
36
|
+
|
|
37
|
+
export function createProvider(): FrameworkAdapter {
|
|
38
|
+
return {
|
|
39
|
+
id: "antd",
|
|
40
|
+
version: ANTD_VERSION,
|
|
41
|
+
label: "Ant Design v5",
|
|
42
|
+
componentsDir: srcDir,
|
|
43
|
+
styleEntryPath: join(srcDir, "tailwind-entry.css"),
|
|
44
|
+
registry,
|
|
45
|
+
loadManifest: async (): Promise<Manifest> => ANTD_MANIFEST,
|
|
46
|
+
// The catalog is the antd *library* surface — every curated antd
|
|
47
|
+
// component, all installed (bundled). The reused velloo helpers (source
|
|
48
|
+
// "velloo", e.g. Icon→lucide) are always-available built-ins, not library
|
|
49
|
+
// components to install, so they're excluded.
|
|
50
|
+
catalog: async () =>
|
|
51
|
+
catalogFromManifest(
|
|
52
|
+
ANTD_MANIFEST.filter((c) => c.source === "antd"),
|
|
53
|
+
{ importPath: "antd" },
|
|
54
|
+
),
|
|
55
|
+
styleChannel: STYLE_PROP,
|
|
56
|
+
styleChannels: ["style"],
|
|
57
|
+
mcpIntro: () => [...ANTD_INTRO],
|
|
58
|
+
renderPass: (theme, dark) => makeRenderPass(theme, dark ?? false),
|
|
59
|
+
codegenModule: "antd",
|
|
60
|
+
themeToNative: (theme, dark) => antdThemeOptions(theme, dark),
|
|
61
|
+
themeModule: {
|
|
62
|
+
importLines: ['import { theme as antdTheme } from "antd";'],
|
|
63
|
+
factory: null,
|
|
64
|
+
defaultPath: "antd-theme.ts",
|
|
65
|
+
},
|
|
66
|
+
// canvasBundleSpec is deliberately absent in v1: the server's bundle-entry
|
|
67
|
+
// builder only implements the emotion style runtime, so antd folders render
|
|
68
|
+
// via the in-process cssinjs SSR path. Extending it means a new
|
|
69
|
+
// `CanvasStyleRuntime` union member (kind: "cssinjs") in
|
|
70
|
+
// packages/provider/src/adapter.ts plus a branch in
|
|
71
|
+
// packages/server/src/live/canvas-bundle.ts.
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** The id used in `Library.id` to select this provider. */
|
|
76
|
+
export const ANTD_PROVIDER_ID = "antd" as const;
|
|
77
|
+
|
|
78
|
+
export { antdThemeConfig, antdThemeOptions } from "./theme.ts";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP instruction framing for an antd folder (`FrameworkAdapter.mcpIntro`).
|
|
3
|
+
*
|
|
4
|
+
* The server's base brief is framework-neutral, so this states the vocabulary
|
|
5
|
+
* and the style channel positively rather than correcting a shadcn claim.
|
|
6
|
+
*/
|
|
7
|
+
export const ANTD_INTRO: readonly string[] = [
|
|
8
|
+
"**This folder targets Ant Design v5.** Components are real antd: `Flex`/`Space`/`Row`+`Col` for layout, `Card`, `TypographyTitle`/`TypographyText`/`TypographyParagraph` (ALL text — these are antd's `Typography.Title/Text/Paragraph` under flat ids), `Button`, `Input`/`Select`/`Checkbox`/`Radio`/`Switch`/`Segmented`/`Slider`/`Rate`, `Tag`/`Badge`/`Avatar`/`Alert`/`Statistic`/`Progress`/`Skeleton`/`Empty`, `Table`/`List`+`ListItem`/`Tabs`/`Steps`/`Breadcrumb`/`Pagination`/`Menu` (data components take `items`/`columns` arrays — no render functions), and the overlay surface `Modal`/`Drawer`/`Popover`/`Tooltip`/`Dropdown` (rendered open + inline in design mode). Call `list_components` for the full set and per-component `example` props.",
|
|
9
|
+
"",
|
|
10
|
+
'**Style through the inline `style` object.** `update_props { style: { display: "flex", alignItems: "center", gap: "16px", padding: "24px" } }` — a plain React style object (merges shallowly; an inner `null` drops a key, `style: null` clears). The theme runs in antd\'s `cssVar` mode, so antd tokens are CSS variables: inside any antd component subtree you can reference `var(--ant-color-primary)`, `var(--ant-color-text-secondary)`, `var(--ant-color-bg-container)`, `var(--ant-border-radius)` etc. to stay themable; plain CSS values always work. Prefer component props (`type`, `size`, `gap`) over style overrides where they exist.',
|
|
11
|
+
"",
|
|
12
|
+
'`emit_code` emits idiomatic antd JSX with `style={{…}}` — components import from `"antd"`. The flat typography/list ids map to dotted antd exports: destructure them when writing real code (`const { Title: TypographyTitle, Text: TypographyText, Paragraph: TypographyParagraph } = Typography;` and `const ListItem = List.Item; const ListItemMeta = List.Item.Meta;`) or rename the JSX tags to the dotted form. `emit_theme` emits a ConfigProvider `ThemeConfig` module (default `antd-theme.ts`) — wire it with `<ConfigProvider theme={theme}>`. Tailwind utility diagnostics do not apply here.',
|
|
13
|
+
"",
|
|
14
|
+
];
|
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
import type { ComponentDescriptor, Manifest, PropDescriptor } from "@velloo/provider";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Hand-authored antd manifest for the shipped registry — curated to the props
|
|
5
|
+
* an agent actually sets (type/size/items, the inline `style` channel,
|
|
6
|
+
* children), which reads far better than a generated dump of antd's vast type
|
|
7
|
+
* surface. Mirrors the MUI adapter's curated-manifest stance; this stays the
|
|
8
|
+
* source of truth.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const style: PropDescriptor = {
|
|
12
|
+
name: "style",
|
|
13
|
+
type: "CSSProperties | undefined",
|
|
14
|
+
optional: true,
|
|
15
|
+
control: "string",
|
|
16
|
+
};
|
|
17
|
+
const children: PropDescriptor = {
|
|
18
|
+
name: "children",
|
|
19
|
+
type: "ReactNode",
|
|
20
|
+
optional: true,
|
|
21
|
+
control: "string",
|
|
22
|
+
};
|
|
23
|
+
const enumProp = (
|
|
24
|
+
name: string,
|
|
25
|
+
values: (string | number)[],
|
|
26
|
+
defaultValue?: string,
|
|
27
|
+
): PropDescriptor => ({
|
|
28
|
+
name,
|
|
29
|
+
type: values.map((v) => (typeof v === "string" ? `"${v}"` : `${v}`)).join(" | "),
|
|
30
|
+
optional: true,
|
|
31
|
+
control: "enum",
|
|
32
|
+
enumValues: values,
|
|
33
|
+
defaultValue,
|
|
34
|
+
});
|
|
35
|
+
const str = (name: string, optional = true): PropDescriptor => ({
|
|
36
|
+
name,
|
|
37
|
+
type: "string",
|
|
38
|
+
optional,
|
|
39
|
+
control: "string",
|
|
40
|
+
});
|
|
41
|
+
const num = (name: string): PropDescriptor => ({
|
|
42
|
+
name,
|
|
43
|
+
type: "number",
|
|
44
|
+
optional: true,
|
|
45
|
+
control: "number",
|
|
46
|
+
});
|
|
47
|
+
const bool = (name: string): PropDescriptor => ({
|
|
48
|
+
name,
|
|
49
|
+
type: "boolean",
|
|
50
|
+
optional: true,
|
|
51
|
+
control: "boolean",
|
|
52
|
+
});
|
|
53
|
+
const node = (name: string): PropDescriptor => ({
|
|
54
|
+
name,
|
|
55
|
+
type: "ReactNode",
|
|
56
|
+
optional: true,
|
|
57
|
+
control: "string",
|
|
58
|
+
});
|
|
59
|
+
const json = (name: string, type: string): PropDescriptor => ({
|
|
60
|
+
name,
|
|
61
|
+
type,
|
|
62
|
+
optional: true,
|
|
63
|
+
control: "string",
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
function ui(
|
|
67
|
+
id: string,
|
|
68
|
+
props: PropDescriptor[],
|
|
69
|
+
notes?: string,
|
|
70
|
+
example?: Record<string, unknown>,
|
|
71
|
+
): ComponentDescriptor {
|
|
72
|
+
return {
|
|
73
|
+
id,
|
|
74
|
+
category: "ui",
|
|
75
|
+
source: "antd",
|
|
76
|
+
props: [...props, style],
|
|
77
|
+
designModeNotes: notes,
|
|
78
|
+
example,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const className: PropDescriptor = {
|
|
83
|
+
name: "className",
|
|
84
|
+
type: "string | undefined",
|
|
85
|
+
optional: true,
|
|
86
|
+
control: "string",
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
/** A reused framework-neutral velloo helper (source "velloo") — styled via className, not the antd style channel. */
|
|
90
|
+
function helper(
|
|
91
|
+
id: string,
|
|
92
|
+
props: PropDescriptor[],
|
|
93
|
+
notes?: string,
|
|
94
|
+
example?: Record<string, unknown>,
|
|
95
|
+
): ComponentDescriptor {
|
|
96
|
+
return {
|
|
97
|
+
id,
|
|
98
|
+
category: "ui",
|
|
99
|
+
source: "velloo",
|
|
100
|
+
props: [...props, className],
|
|
101
|
+
designModeNotes: notes,
|
|
102
|
+
example,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export const ANTD_MANIFEST: Manifest = [
|
|
107
|
+
// --- layout ---
|
|
108
|
+
ui(
|
|
109
|
+
"Flex",
|
|
110
|
+
[
|
|
111
|
+
children,
|
|
112
|
+
bool("vertical"),
|
|
113
|
+
json("gap", '"small" | "middle" | "large" | number'),
|
|
114
|
+
str("align"),
|
|
115
|
+
str("justify"),
|
|
116
|
+
bool("wrap"),
|
|
117
|
+
],
|
|
118
|
+
"The flex layout primitive — use it for every row/column wrapper.",
|
|
119
|
+
{ vertical: false, gap: "middle", align: "center" },
|
|
120
|
+
),
|
|
121
|
+
ui(
|
|
122
|
+
"Space",
|
|
123
|
+
[
|
|
124
|
+
children,
|
|
125
|
+
enumProp("direction", ["horizontal", "vertical"], "horizontal"),
|
|
126
|
+
json("size", '"small" | "middle" | "large" | number'),
|
|
127
|
+
],
|
|
128
|
+
"Inline spacing between adjacent items (buttons, tags).",
|
|
129
|
+
{ size: "middle" },
|
|
130
|
+
),
|
|
131
|
+
ui("Row", [children, num("gutter")], "Grid row; pair with Col spans (24-column grid).", {
|
|
132
|
+
gutter: 16,
|
|
133
|
+
}),
|
|
134
|
+
ui("Col", [children, num("span")], "Grid column inside a Row; span is out of 24.", { span: 12 }),
|
|
135
|
+
|
|
136
|
+
// --- surfaces + data display ---
|
|
137
|
+
ui(
|
|
138
|
+
"Card",
|
|
139
|
+
[children, node("title"), node("extra"), enumProp("size", ["default", "small"], "default")],
|
|
140
|
+
"Card surface with an optional title bar.",
|
|
141
|
+
{ title: "Team" },
|
|
142
|
+
),
|
|
143
|
+
ui(
|
|
144
|
+
"Alert",
|
|
145
|
+
[
|
|
146
|
+
node("message"),
|
|
147
|
+
node("description"),
|
|
148
|
+
enumProp("type", ["success", "info", "warning", "error"], "info"),
|
|
149
|
+
bool("showIcon"),
|
|
150
|
+
],
|
|
151
|
+
"Inline alert banner. `message` is the headline; `description` the body.",
|
|
152
|
+
{ type: "info", message: "Workspace synced", showIcon: true },
|
|
153
|
+
),
|
|
154
|
+
ui(
|
|
155
|
+
"Tag",
|
|
156
|
+
[children, str("color")],
|
|
157
|
+
'Label chip. `color` takes a preset ("success", "processing", "error", "warning") or any CSS color.',
|
|
158
|
+
{ color: "success", children: "Active" },
|
|
159
|
+
),
|
|
160
|
+
ui(
|
|
161
|
+
"Badge",
|
|
162
|
+
[children, num("count"), bool("dot"), num("overflowCount")],
|
|
163
|
+
"Count/dot indicator wrapping its child (an Avatar, an icon).",
|
|
164
|
+
{ count: 5 },
|
|
165
|
+
),
|
|
166
|
+
ui("Avatar", [children, str("src"), num("size")], "Avatar — `src` image or text children.", {
|
|
167
|
+
children: "AB",
|
|
168
|
+
}),
|
|
169
|
+
ui("Divider", [children, enumProp("type", ["horizontal", "vertical"], "horizontal")]),
|
|
170
|
+
ui("Skeleton", [bool("active"), bool("avatar")], "Loading placeholder blocks.", {
|
|
171
|
+
active: true,
|
|
172
|
+
}),
|
|
173
|
+
ui("Empty", [node("description")], "Empty-state illustration + caption.", {
|
|
174
|
+
description: "No data yet",
|
|
175
|
+
}),
|
|
176
|
+
ui(
|
|
177
|
+
"Statistic",
|
|
178
|
+
[node("title"), json("value", "string | number"), node("prefix"), node("suffix")],
|
|
179
|
+
"A KPI number with a label.",
|
|
180
|
+
{ title: "Active users", value: 112893 },
|
|
181
|
+
),
|
|
182
|
+
ui(
|
|
183
|
+
"Progress",
|
|
184
|
+
[
|
|
185
|
+
num("percent"),
|
|
186
|
+
enumProp("type", ["line", "circle", "dashboard"], "line"),
|
|
187
|
+
enumProp("status", ["normal", "active", "success", "exception"]),
|
|
188
|
+
],
|
|
189
|
+
undefined,
|
|
190
|
+
{ percent: 62 },
|
|
191
|
+
),
|
|
192
|
+
|
|
193
|
+
// --- typography (antd's Typography.* exposed as flat ids) ---
|
|
194
|
+
ui(
|
|
195
|
+
"TypographyTitle",
|
|
196
|
+
[children, enumProp("level", [1, 2, 3, 4, 5], "1")],
|
|
197
|
+
"A heading — antd's Typography.Title. Pick `level` for the scale (1 largest).",
|
|
198
|
+
{ level: 2, children: "Team analytics" },
|
|
199
|
+
),
|
|
200
|
+
ui(
|
|
201
|
+
"TypographyText",
|
|
202
|
+
[
|
|
203
|
+
children,
|
|
204
|
+
enumProp("type", ["secondary", "success", "warning", "danger"]),
|
|
205
|
+
bool("strong"),
|
|
206
|
+
bool("code"),
|
|
207
|
+
],
|
|
208
|
+
"Inline text — antd's Typography.Text. `type` picks the semantic tone.",
|
|
209
|
+
{ type: "secondary", children: "Updated 2 hours ago" },
|
|
210
|
+
),
|
|
211
|
+
ui(
|
|
212
|
+
"TypographyParagraph",
|
|
213
|
+
[children, enumProp("type", ["secondary", "success", "warning", "danger"])],
|
|
214
|
+
"Block paragraph — antd's Typography.Paragraph.",
|
|
215
|
+
{ children: "Body copy for a section." },
|
|
216
|
+
),
|
|
217
|
+
|
|
218
|
+
// --- controls ---
|
|
219
|
+
ui(
|
|
220
|
+
"Button",
|
|
221
|
+
[
|
|
222
|
+
children,
|
|
223
|
+
enumProp("type", ["primary", "default", "dashed", "text", "link"], "default"),
|
|
224
|
+
bool("danger"),
|
|
225
|
+
enumProp("size", ["small", "middle", "large"], "middle"),
|
|
226
|
+
bool("block"),
|
|
227
|
+
],
|
|
228
|
+
"Action button.",
|
|
229
|
+
{ type: "primary", children: "Submit" },
|
|
230
|
+
),
|
|
231
|
+
ui(
|
|
232
|
+
"Input",
|
|
233
|
+
[str("placeholder"), str("value"), enumProp("size", ["small", "middle", "large"], "middle")],
|
|
234
|
+
undefined,
|
|
235
|
+
{ placeholder: "Email address" },
|
|
236
|
+
),
|
|
237
|
+
ui(
|
|
238
|
+
"Select",
|
|
239
|
+
[
|
|
240
|
+
str("placeholder"),
|
|
241
|
+
str("value"),
|
|
242
|
+
json("options", "{ value: string; label: string }[]"),
|
|
243
|
+
enumProp("size", ["small", "middle", "large"], "middle"),
|
|
244
|
+
],
|
|
245
|
+
"Closed select field in design mode (the dropdown is a portal).",
|
|
246
|
+
{
|
|
247
|
+
placeholder: "Pick a role",
|
|
248
|
+
options: [
|
|
249
|
+
{ value: "admin", label: "Admin" },
|
|
250
|
+
{ value: "viewer", label: "Viewer" },
|
|
251
|
+
],
|
|
252
|
+
},
|
|
253
|
+
),
|
|
254
|
+
ui("Checkbox", [children, bool("checked")], undefined, {
|
|
255
|
+
checked: true,
|
|
256
|
+
children: "Remember me",
|
|
257
|
+
}),
|
|
258
|
+
ui("Radio", [children, bool("checked")], undefined, { checked: true, children: "Monthly" }),
|
|
259
|
+
ui("Switch", [bool("checked"), enumProp("size", ["default", "small"], "default")], undefined, {
|
|
260
|
+
checked: true,
|
|
261
|
+
}),
|
|
262
|
+
ui(
|
|
263
|
+
"Segmented",
|
|
264
|
+
[json("options", "(string | number)[]"), json("value", "string | number")],
|
|
265
|
+
"Segmented control.",
|
|
266
|
+
{ options: ["Daily", "Weekly", "Monthly"], value: "Weekly" },
|
|
267
|
+
),
|
|
268
|
+
ui("Slider", [num("value"), num("min"), num("max")], undefined, { value: 30 }),
|
|
269
|
+
ui("Rate", [num("value"), num("count")], "Star rating.", { value: 4 }),
|
|
270
|
+
|
|
271
|
+
// --- data ---
|
|
272
|
+
ui(
|
|
273
|
+
"Table",
|
|
274
|
+
[
|
|
275
|
+
json("columns", "{ title: string; dataIndex: string; key: string }[]"),
|
|
276
|
+
json("dataSource", "Record<string, ReactNode>[] (each row needs a `key`)"),
|
|
277
|
+
enumProp("size", ["large", "middle", "small"], "large"),
|
|
278
|
+
json("pagination", "false | object"),
|
|
279
|
+
],
|
|
280
|
+
"Data table — drive it with `columns` + `dataSource` (no render functions in design JSON).",
|
|
281
|
+
{
|
|
282
|
+
columns: [
|
|
283
|
+
{ title: "Name", dataIndex: "name", key: "name" },
|
|
284
|
+
{ title: "Role", dataIndex: "role", key: "role" },
|
|
285
|
+
],
|
|
286
|
+
dataSource: [
|
|
287
|
+
{ key: "1", name: "Ada Lovelace", role: "Admin" },
|
|
288
|
+
{ key: "2", name: "Grace Hopper", role: "Member" },
|
|
289
|
+
],
|
|
290
|
+
pagination: false,
|
|
291
|
+
},
|
|
292
|
+
),
|
|
293
|
+
ui(
|
|
294
|
+
"List",
|
|
295
|
+
[children, enumProp("size", ["default", "small", "large"], "default"), bool("bordered")],
|
|
296
|
+
"Compose with ListItem children (skip `dataSource`/`renderItem` — functions don't fit design JSON).",
|
|
297
|
+
{ bordered: true },
|
|
298
|
+
),
|
|
299
|
+
ui("ListItem", [children], "One row inside a List — antd's List.Item."),
|
|
300
|
+
ui(
|
|
301
|
+
"ListItemMeta",
|
|
302
|
+
[node("title"), node("description"), node("avatar")],
|
|
303
|
+
"Title/description/avatar layout inside a ListItem — antd's List.Item.Meta.",
|
|
304
|
+
{ title: "Deploy finished", description: "2 minutes ago" },
|
|
305
|
+
),
|
|
306
|
+
ui(
|
|
307
|
+
"Tabs",
|
|
308
|
+
[json("items", "{ key: string; label: string; children?: ReactNode }[]"), str("activeKey")],
|
|
309
|
+
"Tab bar + active pane, driven by `items`.",
|
|
310
|
+
{
|
|
311
|
+
items: [
|
|
312
|
+
{ key: "1", label: "Overview", children: "Overview content" },
|
|
313
|
+
{ key: "2", label: "Settings", children: "Settings content" },
|
|
314
|
+
],
|
|
315
|
+
},
|
|
316
|
+
),
|
|
317
|
+
ui(
|
|
318
|
+
"Steps",
|
|
319
|
+
[num("current"), json("items", "{ title: string; description?: string }[]")],
|
|
320
|
+
undefined,
|
|
321
|
+
{ current: 1, items: [{ title: "Build" }, { title: "Review" }, { title: "Ship" }] },
|
|
322
|
+
),
|
|
323
|
+
ui("Breadcrumb", [json("items", "{ title: ReactNode }[]")], undefined, {
|
|
324
|
+
items: [{ title: "Home" }, { title: "Reports" }],
|
|
325
|
+
}),
|
|
326
|
+
ui("Pagination", [num("current"), num("total"), num("pageSize")], undefined, {
|
|
327
|
+
current: 1,
|
|
328
|
+
total: 50,
|
|
329
|
+
}),
|
|
330
|
+
ui(
|
|
331
|
+
"Menu",
|
|
332
|
+
[
|
|
333
|
+
json("items", "{ key: string; label: ReactNode; icon?: ReactNode }[]"),
|
|
334
|
+
enumProp("mode", ["vertical", "horizontal", "inline"], "vertical"),
|
|
335
|
+
json("selectedKeys", "string[]"),
|
|
336
|
+
],
|
|
337
|
+
"Navigation menu driven by `items` (antd v5 dropped JSX children menus).",
|
|
338
|
+
{
|
|
339
|
+
mode: "inline",
|
|
340
|
+
items: [
|
|
341
|
+
{ key: "home", label: "Home" },
|
|
342
|
+
{ key: "reports", label: "Reports" },
|
|
343
|
+
],
|
|
344
|
+
selectedKeys: ["home"],
|
|
345
|
+
},
|
|
346
|
+
),
|
|
347
|
+
|
|
348
|
+
// --- overlay surface — canvas-safe: rendered OPEN + inline in design mode
|
|
349
|
+
// (antd's own overlays portal and SSR to nothing), so build the content
|
|
350
|
+
// directly inside them. ---
|
|
351
|
+
ui(
|
|
352
|
+
"Modal",
|
|
353
|
+
[children, node("title"), num("width"), node("footer")],
|
|
354
|
+
"Modal dialog surface — renders open + inline in design mode. Put the body in children; `footer` renders as a right-aligned action row.",
|
|
355
|
+
{ title: "Delete item?" },
|
|
356
|
+
),
|
|
357
|
+
ui(
|
|
358
|
+
"Drawer",
|
|
359
|
+
[children, node("title")],
|
|
360
|
+
"A side panel — renders inline as a fixed-width column in design mode.",
|
|
361
|
+
{ title: "Filters" },
|
|
362
|
+
),
|
|
363
|
+
ui(
|
|
364
|
+
"Popover",
|
|
365
|
+
[children, node("title"), node("content")],
|
|
366
|
+
"A popover — the trigger child renders inline with the surface pinned open below it.",
|
|
367
|
+
{ title: "Details", content: "Popover body" },
|
|
368
|
+
),
|
|
369
|
+
ui(
|
|
370
|
+
"Tooltip",
|
|
371
|
+
[children, node("title")],
|
|
372
|
+
"The trigger child renders inline; `title` shows beside it as a dark pill in design mode.",
|
|
373
|
+
{ title: "Copy to clipboard" },
|
|
374
|
+
),
|
|
375
|
+
ui(
|
|
376
|
+
"Dropdown",
|
|
377
|
+
[children, json("menu", "{ items: { key: string; label: ReactNode }[] }")],
|
|
378
|
+
"The trigger child renders inline with the menu surface pinned open below it.",
|
|
379
|
+
{
|
|
380
|
+
menu: {
|
|
381
|
+
items: [
|
|
382
|
+
{ key: "edit", label: "Edit" },
|
|
383
|
+
{ key: "delete", label: "Delete" },
|
|
384
|
+
],
|
|
385
|
+
},
|
|
386
|
+
},
|
|
387
|
+
),
|
|
388
|
+
|
|
389
|
+
// Framework-neutral velloo helpers (antd's @ant-design/icons isn't shipped).
|
|
390
|
+
// source:"velloo" — sized/styled via props (NOT the antd style channel or
|
|
391
|
+
// Tailwind: an antd folder has no JIT). `Icon` emits a lucide-react import
|
|
392
|
+
// in codegen.
|
|
393
|
+
helper(
|
|
394
|
+
"Icon",
|
|
395
|
+
[
|
|
396
|
+
{ name: "name", type: "string", optional: false, control: "icon" },
|
|
397
|
+
{ name: "size", type: "number", optional: true, control: "number" },
|
|
398
|
+
],
|
|
399
|
+
"A lucide icon — antd's icon set isn't bundled. Set the pixel `size` prop (not Tailwind). `name` is a lucide id (PascalCase or kebab). Emits a `lucide-react` import.",
|
|
400
|
+
{ name: "ArrowRight", size: 20 },
|
|
401
|
+
),
|
|
402
|
+
helper(
|
|
403
|
+
"Image",
|
|
404
|
+
[
|
|
405
|
+
{ name: "src", type: "string", optional: false, control: "string" },
|
|
406
|
+
{ name: "alt", type: "string", optional: false, control: "string" },
|
|
407
|
+
],
|
|
408
|
+
"An image. Use velloo assets (`/assets/…`) or a URL.",
|
|
409
|
+
),
|
|
410
|
+
helper(
|
|
411
|
+
"Placeholder",
|
|
412
|
+
[{ name: "label", type: "string", optional: true, control: "string" }],
|
|
413
|
+
"A labeled placeholder box for imagery you haven't authored yet (avatars, hero shots).",
|
|
414
|
+
),
|
|
415
|
+
helper(
|
|
416
|
+
"SVG",
|
|
417
|
+
[
|
|
418
|
+
{ name: "content", type: "string", optional: false, control: "string" },
|
|
419
|
+
{ name: "viewBox", type: "string", optional: false, control: "string" },
|
|
420
|
+
],
|
|
421
|
+
"Raw inline SVG markup.",
|
|
422
|
+
),
|
|
423
|
+
helper("Layer", [children], "An absolutely-positioned overlay layer for stacked composition."),
|
|
424
|
+
helper(
|
|
425
|
+
"Gradient",
|
|
426
|
+
[{ name: "from", type: "string", optional: true, control: "color" }],
|
|
427
|
+
"A gradient fill block.",
|
|
428
|
+
),
|
|
429
|
+
helper(
|
|
430
|
+
"Prose",
|
|
431
|
+
[
|
|
432
|
+
children,
|
|
433
|
+
{ name: "preset", type: "string", optional: true, control: "string" },
|
|
434
|
+
{ name: "as", type: "string", optional: true, control: "string" },
|
|
435
|
+
],
|
|
436
|
+
"A long-form content region. Everything inside — Typography, headings, lists, quotes, code, tables — picks up the theme typeset's proportions and vertical rhythm automatically. `preset` selects a named typeset (see set_typeset). Reach for this for articles, docs, and marketing copy instead of setting sizes block by block.",
|
|
437
|
+
{ as: "article" },
|
|
438
|
+
),
|
|
439
|
+
];
|