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.
Files changed (267) hide show
  1. package/BUN-LICENSE.md +91 -0
  2. package/LICENSE +202 -0
  3. package/NOTICE +9 -0
  4. package/README.md +288 -2
  5. package/THIRD-PARTY-NOTICES.md +467 -0
  6. package/assets/elsewhere-alps-9fqhv029.jpg +0 -0
  7. package/assets/elsewhere-bali-vp60g115.jpg +0 -0
  8. package/assets/elsewhere-forest-xgn23zrj.jpg +0 -0
  9. package/assets/elsewhere-japan-qs7qkbr2.jpg +0 -0
  10. package/assets/elsewhere-kyoto-map-n2bvkrya.svg +1 -0
  11. package/assets/elsewhere-kyoto-qemtn6nk.jpg +0 -0
  12. package/assets/elsewhere-room-g1gaw7cs.jpg +0 -0
  13. package/canvas/apple-touch-icon.png +0 -0
  14. package/canvas/assets/index-BCvDZiBo.css +2 -0
  15. package/canvas/assets/index-ClaBqcaS.js +28 -0
  16. package/canvas/assets/lucide-all-iIF-pmzN.js +1 -0
  17. package/canvas/assets/radix-C3HaOB-d.js +41 -0
  18. package/canvas/assets/react-D0Ec-185.js +9 -0
  19. package/canvas/assets/rolldown-runtime-hePW80VL.js +1 -0
  20. package/canvas/assets/vendor-CKmQ-Zst.js +53 -0
  21. package/canvas/favicon.ico +0 -0
  22. package/canvas/favicon.svg +12 -0
  23. package/canvas/fonts/OFL-1.1.txt +93 -0
  24. package/canvas/fonts/poppins-700.woff2 +0 -0
  25. package/canvas/icon-192.png +0 -0
  26. package/canvas/icon-512.png +0 -0
  27. package/canvas/index.html +22 -0
  28. package/canvas/site.webmanifest +11 -0
  29. package/chunk-08sv3k41.js +4 -0
  30. package/chunk-0fe83yzt.js +2 -0
  31. package/chunk-0t68szgr.js +3 -0
  32. package/chunk-1h55s5he.js +2 -0
  33. package/chunk-2c7jbx46.js +2 -0
  34. package/chunk-2smsg2ct.js +7 -0
  35. package/chunk-308ynsxd.js +2 -0
  36. package/chunk-3e8vez4d.js +1229 -0
  37. package/chunk-40xgcth8.js +63 -0
  38. package/chunk-4dn75m6t.js +3 -0
  39. package/chunk-4fj5tahv.js +3 -0
  40. package/chunk-6nqghjda.js +3 -0
  41. package/chunk-6tx68d90.js +3 -0
  42. package/chunk-6w6ch4ce.js +2 -0
  43. package/chunk-735ezz23.js +86 -0
  44. package/chunk-7eq7nx37.js +7 -0
  45. package/chunk-7eyb8yrf.js +6 -0
  46. package/chunk-80fjfyha.js +86 -0
  47. package/chunk-80r93t2e.js +4 -0
  48. package/chunk-94vx1yb0.js +3 -0
  49. package/chunk-9vg3yafz.js +3 -0
  50. package/chunk-a84n72m2.js +4 -0
  51. package/chunk-ampmdzz4.js +10 -0
  52. package/chunk-avns4dbf.js +2 -0
  53. package/chunk-ayrb3qnm.js +3 -0
  54. package/chunk-bwnvcncx.js +3 -0
  55. package/chunk-ccszg02q.js +5 -0
  56. package/chunk-cvn689d5.js +3 -0
  57. package/chunk-cxe6jjwj.js +3 -0
  58. package/chunk-dg6z4vdd.js +3 -0
  59. package/chunk-dgwjpbp9.js +3 -0
  60. package/chunk-dy41n60j.js +52 -0
  61. package/chunk-ek71z2fv.js +226 -0
  62. package/chunk-er1fxb7d.js +2 -0
  63. package/chunk-eyr8hrzf.js +2 -0
  64. package/chunk-fjbzk4sw.js +3 -0
  65. package/chunk-fsbsksga.js +3 -0
  66. package/chunk-h6gchare.js +3 -0
  67. package/chunk-hcb68zt7.js +85 -0
  68. package/chunk-hggap8fq.js +3 -0
  69. package/chunk-j11fyeqh.js +2 -0
  70. package/chunk-jb21jkp1.js +8 -0
  71. package/chunk-jfx9xjmr.js +18 -0
  72. package/chunk-jr0ss0mm.js +303 -0
  73. package/chunk-jrsknzjt.js +3 -0
  74. package/chunk-jv0xggh0.js +2 -0
  75. package/chunk-k17gfwq3.js +2 -0
  76. package/chunk-mh2pr7cq.js +5 -0
  77. package/chunk-mnapdp1y.js +2 -0
  78. package/chunk-mzhdrawd.js +3 -0
  79. package/chunk-n9gs6yx9.js +2 -0
  80. package/chunk-ngnymg2q.js +3 -0
  81. package/chunk-nwx5700b.js +3 -0
  82. package/chunk-pjtg3wnm.js +4 -0
  83. package/chunk-pp86v6m6.js +3 -0
  84. package/chunk-r22epxz2.js +3 -0
  85. package/chunk-rgasy862.js +5 -0
  86. package/chunk-rpwpeph5.js +3 -0
  87. package/chunk-s23gtejf.js +3 -0
  88. package/chunk-sjgqnykd.js +6 -0
  89. package/chunk-sn3x2m0m.js +6 -0
  90. package/chunk-t448rrfr.js +2 -0
  91. package/chunk-tdsk5wxa.js +451 -0
  92. package/chunk-v40fn08f.js +442 -0
  93. package/chunk-vbk1qhdz.js +3 -0
  94. package/chunk-vdkrbzh1.js +2 -0
  95. package/chunk-vgmr98cv.js +40 -0
  96. package/chunk-vsv8z729.js +6 -0
  97. package/chunk-x4f4k9pp.js +26 -0
  98. package/chunk-xt5ayg7g.js +4 -0
  99. package/chunk-ydhwv29b.js +244 -0
  100. package/chunk-zb6hc1y0.js +2 -0
  101. package/cli.js +3 -0
  102. package/launcher.cjs +97 -0
  103. package/package.json +58 -5
  104. package/pkgs/helpers/src/box.tsx +21 -0
  105. package/pkgs/helpers/src/cn.ts +32 -0
  106. package/pkgs/helpers/src/descriptors.ts +270 -0
  107. package/pkgs/helpers/src/divider.tsx +123 -0
  108. package/pkgs/helpers/src/gradient.tsx +90 -0
  109. package/pkgs/helpers/src/heading.tsx +20 -0
  110. package/pkgs/helpers/src/icon-data.ts +8009 -0
  111. package/pkgs/helpers/src/icon.tsx +53 -0
  112. package/pkgs/helpers/src/image.tsx +111 -0
  113. package/pkgs/helpers/src/index.ts +29 -0
  114. package/pkgs/helpers/src/layer.tsx +61 -0
  115. package/pkgs/helpers/src/lowering.ts +53 -0
  116. package/pkgs/helpers/src/paths.ts +47 -0
  117. package/pkgs/helpers/src/placeholder.tsx +88 -0
  118. package/pkgs/helpers/src/prose.tsx +42 -0
  119. package/pkgs/helpers/src/registry.ts +41 -0
  120. package/pkgs/helpers/src/svg.tsx +62 -0
  121. package/pkgs/helpers/src/text.tsx +16 -0
  122. package/pkgs/provider-antd/src/index.ts +78 -0
  123. package/pkgs/provider-antd/src/intro.ts +14 -0
  124. package/pkgs/provider-antd/src/manifest.ts +439 -0
  125. package/pkgs/provider-antd/src/overlays.ts +176 -0
  126. package/pkgs/provider-antd/src/registry.ts +104 -0
  127. package/pkgs/provider-antd/src/render-pass.ts +43 -0
  128. package/pkgs/provider-antd/src/tailwind-entry.css +21 -0
  129. package/pkgs/provider-antd/src/theme.ts +132 -0
  130. package/pkgs/provider-antd/src/version.ts +8 -0
  131. package/pkgs/provider-chakra/src/index.ts +80 -0
  132. package/pkgs/provider-chakra/src/intro.ts +14 -0
  133. package/pkgs/provider-chakra/src/manifest.ts +421 -0
  134. package/pkgs/provider-chakra/src/overlays.ts +246 -0
  135. package/pkgs/provider-chakra/src/registry.ts +227 -0
  136. package/pkgs/provider-chakra/src/render-pass.ts +55 -0
  137. package/pkgs/provider-chakra/src/tailwind-entry.css +21 -0
  138. package/pkgs/provider-chakra/src/theme.ts +180 -0
  139. package/pkgs/provider-chakra/src/version.ts +8 -0
  140. package/pkgs/provider-mui/src/index.ts +117 -0
  141. package/pkgs/provider-mui/src/intro.ts +12 -0
  142. package/pkgs/provider-mui/src/manifest.ts +263 -0
  143. package/pkgs/provider-mui/src/overlays.ts +124 -0
  144. package/pkgs/provider-mui/src/registry.ts +120 -0
  145. package/pkgs/provider-mui/src/render-pass.ts +36 -0
  146. package/pkgs/provider-mui/src/tailwind-entry.css +21 -0
  147. package/pkgs/provider-mui/src/theme.ts +129 -0
  148. package/pkgs/provider-mui/src/version.ts +8 -0
  149. package/pkgs/provider-none/src/components-inline.tsx +204 -0
  150. package/pkgs/provider-none/src/components.tsx +155 -0
  151. package/pkgs/provider-none/src/index.ts +57 -0
  152. package/pkgs/provider-none/src/intro.ts +18 -0
  153. package/pkgs/provider-none/src/manifest.ts +163 -0
  154. package/pkgs/provider-none/src/registry-inline.ts +36 -0
  155. package/pkgs/provider-none/src/registry.ts +39 -0
  156. package/pkgs/provider-none/src/tailwind-entry.css +57 -0
  157. package/pkgs/provider-none/src/version.ts +10 -0
  158. package/pkgs/schema/src/annotation.ts +120 -0
  159. package/pkgs/schema/src/asset.ts +66 -0
  160. package/pkgs/schema/src/board.ts +71 -0
  161. package/pkgs/schema/src/comment.ts +107 -0
  162. package/pkgs/schema/src/config.ts +185 -0
  163. package/pkgs/schema/src/css-sanitize.ts +56 -0
  164. package/pkgs/schema/src/extension.ts +105 -0
  165. package/pkgs/schema/src/fonts.ts +690 -0
  166. package/pkgs/schema/src/frame.ts +40 -0
  167. package/pkgs/schema/src/icon-name.ts +21 -0
  168. package/pkgs/schema/src/ids.ts +14 -0
  169. package/pkgs/schema/src/index.ts +169 -0
  170. package/pkgs/schema/src/migrate.ts +297 -0
  171. package/pkgs/schema/src/node.ts +229 -0
  172. package/pkgs/schema/src/paths.ts +28 -0
  173. package/pkgs/schema/src/repo.ts +134 -0
  174. package/pkgs/schema/src/screen.ts +30 -0
  175. package/pkgs/schema/src/snippet-resolve.ts +193 -0
  176. package/pkgs/schema/src/snippet.ts +104 -0
  177. package/pkgs/schema/src/svg-sanitize.ts +487 -0
  178. package/pkgs/schema/src/theme.ts +218 -0
  179. package/pkgs/schema/src/typeset.ts +693 -0
  180. package/pkgs/schema/src/validate-ids.ts +46 -0
  181. package/pkgs/schema/src/viewport.ts +8 -0
  182. package/pkgs/shadcn-snapshot/dist/manifest.json +8109 -0
  183. package/pkgs/shadcn-snapshot/src/components/canvas-portal.tsx +55 -0
  184. package/pkgs/shadcn-snapshot/src/components/ui/accordion.tsx +122 -0
  185. package/pkgs/shadcn-snapshot/src/components/ui/alert-dialog.tsx +164 -0
  186. package/pkgs/shadcn-snapshot/src/components/ui/alert.tsx +74 -0
  187. package/pkgs/shadcn-snapshot/src/components/ui/aspect-ratio.tsx +13 -0
  188. package/pkgs/shadcn-snapshot/src/components/ui/attachment.tsx +197 -0
  189. package/pkgs/shadcn-snapshot/src/components/ui/avatar.tsx +100 -0
  190. package/pkgs/shadcn-snapshot/src/components/ui/badge.tsx +50 -0
  191. package/pkgs/shadcn-snapshot/src/components/ui/breadcrumb.tsx +109 -0
  192. package/pkgs/shadcn-snapshot/src/components/ui/bubble.tsx +130 -0
  193. package/pkgs/shadcn-snapshot/src/components/ui/button-group.tsx +82 -0
  194. package/pkgs/shadcn-snapshot/src/components/ui/button.tsx +72 -0
  195. package/pkgs/shadcn-snapshot/src/components/ui/calendar.tsx +229 -0
  196. package/pkgs/shadcn-snapshot/src/components/ui/card.tsx +92 -0
  197. package/pkgs/shadcn-snapshot/src/components/ui/carousel.tsx +235 -0
  198. package/pkgs/shadcn-snapshot/src/components/ui/chart-option.ts +250 -0
  199. package/pkgs/shadcn-snapshot/src/components/ui/chart.tsx +177 -0
  200. package/pkgs/shadcn-snapshot/src/components/ui/checkbox.tsx +41 -0
  201. package/pkgs/shadcn-snapshot/src/components/ui/collapsible.tsx +32 -0
  202. package/pkgs/shadcn-snapshot/src/components/ui/combobox.tsx +196 -0
  203. package/pkgs/shadcn-snapshot/src/components/ui/context-menu.tsx +227 -0
  204. package/pkgs/shadcn-snapshot/src/components/ui/dialog.tsx +131 -0
  205. package/pkgs/shadcn-snapshot/src/components/ui/direction.tsx +24 -0
  206. package/pkgs/shadcn-snapshot/src/components/ui/drawer.tsx +112 -0
  207. package/pkgs/shadcn-snapshot/src/components/ui/dropdown-menu.tsx +205 -0
  208. package/pkgs/shadcn-snapshot/src/components/ui/empty.tsx +98 -0
  209. package/pkgs/shadcn-snapshot/src/components/ui/field.tsx +228 -0
  210. package/pkgs/shadcn-snapshot/src/components/ui/hover-card.tsx +51 -0
  211. package/pkgs/shadcn-snapshot/src/components/ui/input-group.tsx +148 -0
  212. package/pkgs/shadcn-snapshot/src/components/ui/input.tsx +43 -0
  213. package/pkgs/shadcn-snapshot/src/components/ui/item.tsx +187 -0
  214. package/pkgs/shadcn-snapshot/src/components/ui/kbd.tsx +30 -0
  215. package/pkgs/shadcn-snapshot/src/components/ui/label.tsx +25 -0
  216. package/pkgs/shadcn-snapshot/src/components/ui/marker.tsx +71 -0
  217. package/pkgs/shadcn-snapshot/src/components/ui/menubar.tsx +243 -0
  218. package/pkgs/shadcn-snapshot/src/components/ui/message.tsx +89 -0
  219. package/pkgs/shadcn-snapshot/src/components/ui/native-select.tsx +60 -0
  220. package/pkgs/shadcn-snapshot/src/components/ui/navigation-menu.tsx +165 -0
  221. package/pkgs/shadcn-snapshot/src/components/ui/pagination.tsx +117 -0
  222. package/pkgs/shadcn-snapshot/src/components/ui/popover.tsx +66 -0
  223. package/pkgs/shadcn-snapshot/src/components/ui/progress.tsx +35 -0
  224. package/pkgs/shadcn-snapshot/src/components/ui/radio-group.tsx +48 -0
  225. package/pkgs/shadcn-snapshot/src/components/ui/scroll-area.tsx +59 -0
  226. package/pkgs/shadcn-snapshot/src/components/ui/select.tsx +180 -0
  227. package/pkgs/shadcn-snapshot/src/components/ui/separator.tsx +32 -0
  228. package/pkgs/shadcn-snapshot/src/components/ui/sheet.tsx +107 -0
  229. package/pkgs/shadcn-snapshot/src/components/ui/skeleton.tsx +17 -0
  230. package/pkgs/shadcn-snapshot/src/components/ui/slider.tsx +68 -0
  231. package/pkgs/shadcn-snapshot/src/components/ui/sonner.tsx +91 -0
  232. package/pkgs/shadcn-snapshot/src/components/ui/spinner.tsx +21 -0
  233. package/pkgs/shadcn-snapshot/src/components/ui/switch.tsx +41 -0
  234. package/pkgs/shadcn-snapshot/src/components/ui/table.tsx +93 -0
  235. package/pkgs/shadcn-snapshot/src/components/ui/tabs.tsx +84 -0
  236. package/pkgs/shadcn-snapshot/src/components/ui/textarea.tsx +24 -0
  237. package/pkgs/shadcn-snapshot/src/components/ui/toggle-group.tsx +94 -0
  238. package/pkgs/shadcn-snapshot/src/components/ui/toggle.tsx +50 -0
  239. package/pkgs/shadcn-snapshot/src/components/ui/tooltip.tsx +47 -0
  240. package/pkgs/shadcn-snapshot/src/examples.ts +36 -0
  241. package/pkgs/shadcn-snapshot/src/groups.ts +87 -0
  242. package/pkgs/shadcn-snapshot/src/index.ts +43 -0
  243. package/pkgs/shadcn-snapshot/src/lib/utils.ts +4 -0
  244. package/pkgs/shadcn-snapshot/src/manifest.ts +12 -0
  245. package/pkgs/shadcn-snapshot/src/notes.ts +97 -0
  246. package/pkgs/shadcn-snapshot/src/paths.ts +47 -0
  247. package/pkgs/shadcn-snapshot/src/registry-files.ts +293 -0
  248. package/pkgs/shadcn-snapshot/src/registry.ts +631 -0
  249. package/pkgs/shadcn-snapshot/src/shadcn-tailwind.css +632 -0
  250. package/pkgs/shadcn-snapshot/src/tailwind-entry.css +159 -0
  251. package/pkgs/shadcn-snapshot/src/version.ts +8 -0
  252. package/plugins/claude/velloo/.claude-plugin/plugin.json +6 -0
  253. package/plugins/claude/velloo/agents/velloo-design-reviewer.md +33 -0
  254. package/plugins/claude/velloo/agents/velloo-designer.md +39 -0
  255. package/plugins/claude/velloo/commands/design.md +11 -0
  256. package/plugins/claude/velloo/commands/implement.md +10 -0
  257. package/plugins/claude/velloo/commands/review.md +8 -0
  258. package/plugins/gemini/GEMINI.md +31 -0
  259. package/plugins/gemini/commands/velloo/design.toml +10 -0
  260. package/plugins/gemini/commands/velloo/implement.toml +9 -0
  261. package/plugins/gemini/gemini-extension.json +9 -0
  262. package/skills/velloo-brand/SKILL.md +124 -0
  263. package/skills/velloo-design/SKILL.md +144 -0
  264. package/skills/velloo-design-system/SKILL.md +90 -0
  265. package/skills/velloo-implement/SKILL.md +101 -0
  266. package/skills/velloo-logo/SKILL.md +93 -0
  267. package/skills/velloo-setup/SKILL.md +156 -0
@@ -0,0 +1,227 @@
1
+ // Vendored from shadcn-ui (https://ui.shadcn.com/docs/components/radix/context-menu).
2
+ // Snapshot version: see packages/shadcn-snapshot/package.json#snapshotVersion.
3
+ // Canvas-safe: see ../canvas-portal.tsx. A context menu only opens on
4
+ // right-click and portals to the body, so a static render would show the
5
+ // trigger and nothing else. Everything from Content inward is a plain element —
6
+ // Radix's menu parts read a context Portal/Content sets up, so they can't
7
+ // render standalone, and the popup has to be inline for the design surface to
8
+ // see it. Classes track upstream except for the ones that depend on Radix's
9
+ // runtime positioning vars (`--radix-context-menu-*`) or animate on open, which
10
+ // would leave screenshots catching a mid-transition frame.
11
+ "use client";
12
+
13
+ import { CheckIcon, ChevronRightIcon } from "lucide-react";
14
+ import { ContextMenu as ContextMenuPrimitive } from "radix-ui";
15
+ import type * as React from "react";
16
+ import { cn } from "../../lib/utils.ts";
17
+ import { inlineOpenAttrs, pinOpenInDesignMode } from "../canvas-portal.tsx";
18
+
19
+ const POPUP =
20
+ "cn-menu-target cn-menu-translucent z-50 rounded-lg bg-popover p-1 text-popover-foreground";
21
+
22
+ const ITEM =
23
+ "relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
24
+
25
+ const CHECKABLE_ITEM =
26
+ "relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
27
+
28
+ const INDICATOR = "pointer-events-none absolute right-2";
29
+
30
+ export function ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>) {
31
+ return <ContextMenuPrimitive.Root data-slot="context-menu" {...pinOpenInDesignMode(props)} />;
32
+ }
33
+
34
+ export function ContextMenuTrigger({
35
+ className,
36
+ ...props
37
+ }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>) {
38
+ return (
39
+ <ContextMenuPrimitive.Trigger
40
+ data-slot="context-menu-trigger"
41
+ className={cn("select-none", className)}
42
+ {...props}
43
+ />
44
+ );
45
+ }
46
+
47
+ export function ContextMenuGroup({ className, ...props }: React.ComponentProps<"div">) {
48
+ return <div data-slot="context-menu-group" className={className} {...props} />;
49
+ }
50
+
51
+ /** Upstream's Portal, neutralized: children render where they sit. */
52
+ export function ContextMenuPortal({ children }: React.ComponentProps<"div">) {
53
+ return <>{children}</>;
54
+ }
55
+
56
+ export function ContextMenuSub({
57
+ ...props
58
+ }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>) {
59
+ return <ContextMenuPrimitive.Sub data-slot="context-menu-sub" {...props} />;
60
+ }
61
+
62
+ export function ContextMenuRadioGroup({ ...props }: React.ComponentProps<"div">) {
63
+ return <div data-slot="context-menu-radio-group" {...props} />;
64
+ }
65
+
66
+ export function ContextMenuContent({
67
+ className,
68
+ side: _side,
69
+ sideOffset: _sideOffset,
70
+ align: _align,
71
+ alignOffset: _alignOffset,
72
+ collisionPadding: _collisionPadding,
73
+ ...props
74
+ }: React.ComponentProps<"div"> & {
75
+ side?: string;
76
+ sideOffset?: number;
77
+ align?: string;
78
+ alignOffset?: number;
79
+ collisionPadding?: number;
80
+ }) {
81
+ return (
82
+ <div
83
+ data-slot="context-menu-content"
84
+ {...inlineOpenAttrs()}
85
+ className={cn(
86
+ POPUP,
87
+ "min-w-36 overflow-x-hidden overflow-y-auto shadow-md ring-1 ring-foreground/10",
88
+ className,
89
+ )}
90
+ {...props}
91
+ />
92
+ );
93
+ }
94
+
95
+ export function ContextMenuItem({
96
+ className,
97
+ inset,
98
+ variant = "default",
99
+ ...props
100
+ }: React.ComponentProps<"div"> & { inset?: boolean; variant?: "default" | "destructive" }) {
101
+ return (
102
+ <div
103
+ data-slot="context-menu-item"
104
+ data-inset={inset}
105
+ data-variant={variant}
106
+ className={cn(
107
+ "group/context-menu-item",
108
+ ITEM,
109
+ "focus:*:[svg]:text-accent-foreground 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 data-[variant=destructive]:*:[svg]:text-destructive",
110
+ className,
111
+ )}
112
+ {...props}
113
+ />
114
+ );
115
+ }
116
+
117
+ export function ContextMenuSubTrigger({
118
+ className,
119
+ inset,
120
+ children,
121
+ ...props
122
+ }: React.ComponentProps<"div"> & { inset?: boolean }) {
123
+ return (
124
+ <div
125
+ data-slot="context-menu-sub-trigger"
126
+ data-inset={inset}
127
+ className={cn(ITEM, "data-open:bg-accent data-open:text-accent-foreground", className)}
128
+ {...props}
129
+ >
130
+ {children}
131
+ <ChevronRightIcon className="cn-rtl-flip ml-auto" />
132
+ </div>
133
+ );
134
+ }
135
+
136
+ export function ContextMenuSubContent({ className, ...props }: React.ComponentProps<"div">) {
137
+ return (
138
+ <div
139
+ data-slot="context-menu-sub-content"
140
+ className={cn(POPUP, "min-w-32 overflow-hidden border shadow-lg", className)}
141
+ {...props}
142
+ />
143
+ );
144
+ }
145
+
146
+ export function ContextMenuCheckboxItem({
147
+ className,
148
+ children,
149
+ checked,
150
+ inset,
151
+ ...props
152
+ }: React.ComponentProps<"div"> & { checked?: boolean; inset?: boolean }) {
153
+ return (
154
+ <div
155
+ data-slot="context-menu-checkbox-item"
156
+ data-inset={inset}
157
+ data-state={checked ? "checked" : "unchecked"}
158
+ className={cn(CHECKABLE_ITEM, className)}
159
+ {...props}
160
+ >
161
+ <span className={INDICATOR}>{checked ? <CheckIcon /> : null}</span>
162
+ {children}
163
+ </div>
164
+ );
165
+ }
166
+
167
+ export function ContextMenuRadioItem({
168
+ className,
169
+ children,
170
+ checked,
171
+ inset,
172
+ ...props
173
+ }: React.ComponentProps<"div"> & { checked?: boolean; inset?: boolean }) {
174
+ return (
175
+ <div
176
+ data-slot="context-menu-radio-item"
177
+ data-inset={inset}
178
+ data-state={checked ? "checked" : "unchecked"}
179
+ className={cn(CHECKABLE_ITEM, className)}
180
+ {...props}
181
+ >
182
+ <span className={INDICATOR}>{checked ? <CheckIcon /> : null}</span>
183
+ {children}
184
+ </div>
185
+ );
186
+ }
187
+
188
+ export function ContextMenuLabel({
189
+ className,
190
+ inset,
191
+ ...props
192
+ }: React.ComponentProps<"div"> & { inset?: boolean }) {
193
+ return (
194
+ <div
195
+ data-slot="context-menu-label"
196
+ data-inset={inset}
197
+ className={cn(
198
+ "px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",
199
+ className,
200
+ )}
201
+ {...props}
202
+ />
203
+ );
204
+ }
205
+
206
+ export function ContextMenuSeparator({ className, ...props }: React.ComponentProps<"div">) {
207
+ return (
208
+ <div
209
+ data-slot="context-menu-separator"
210
+ className={cn("-mx-1 my-1 h-px bg-border", className)}
211
+ {...props}
212
+ />
213
+ );
214
+ }
215
+
216
+ export function ContextMenuShortcut({ className, ...props }: React.ComponentProps<"span">) {
217
+ return (
218
+ <span
219
+ data-slot="context-menu-shortcut"
220
+ className={cn(
221
+ "ml-auto text-xs tracking-widest text-muted-foreground group-focus/context-menu-item:text-accent-foreground",
222
+ className,
223
+ )}
224
+ {...props}
225
+ />
226
+ );
227
+ }
@@ -0,0 +1,131 @@
1
+ // Vendored from shadcn-ui (https://ui.shadcn.com/docs/components/radix/dialog).
2
+ // Snapshot version: see packages/shadcn-snapshot/package.json#snapshotVersion.
3
+ // Canvas-safe: see ../canvas-portal.tsx. Content is a plain card sitting in the
4
+ // page flow — not a portaled, viewport-centered layer — and it no longer pulls
5
+ // the Overlay in with it, because a full-bleed backdrop would dim the whole
6
+ // design surface. The close affordances are plain buttons rather than Radix
7
+ // Close, so a Content placed on the canvas without its Root still renders.
8
+ // Classes track upstream minus the open/close animations: we pin
9
+ // `data-state="open"`, so those would replay on every render and screenshots
10
+ // would catch a mid-transition frame.
11
+ "use client";
12
+
13
+ import { XIcon } from "lucide-react";
14
+ import { Dialog as DialogPrimitive } from "radix-ui";
15
+ import type * as React from "react";
16
+ import { cn } from "../../lib/utils.ts";
17
+ import { inlineOpenAttrs, pinOpenInDesignMode } from "../canvas-portal.tsx";
18
+ import { Button } from "./button.tsx";
19
+
20
+ export function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {
21
+ return <DialogPrimitive.Root data-slot="dialog" {...pinOpenInDesignMode(props)} />;
22
+ }
23
+
24
+ export function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
25
+ return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />;
26
+ }
27
+
28
+ export function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {
29
+ return <DialogPrimitive.Close data-slot="dialog-close" {...props} />;
30
+ }
31
+
32
+ /** Upstream's Portal, neutralized: children render where they sit. */
33
+ export function DialogPortal({ children }: React.ComponentProps<"div">) {
34
+ return <>{children}</>;
35
+ }
36
+
37
+ export function DialogOverlay({ className, ...props }: React.ComponentProps<"div">) {
38
+ return (
39
+ <div
40
+ data-slot="dialog-overlay"
41
+ {...inlineOpenAttrs()}
42
+ className={cn(
43
+ "fixed inset-0 isolate z-50 bg-black/10 supports-backdrop-filter:backdrop-blur-xs",
44
+ className,
45
+ )}
46
+ {...props}
47
+ />
48
+ );
49
+ }
50
+
51
+ export function DialogContent({
52
+ className,
53
+ children,
54
+ showCloseButton = true,
55
+ ...props
56
+ }: React.ComponentProps<"div"> & { showCloseButton?: boolean }) {
57
+ return (
58
+ <div
59
+ data-slot="dialog-content"
60
+ {...inlineOpenAttrs()}
61
+ className={cn(
62
+ "relative z-50 grid w-full max-w-[calc(100%-2rem)] gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 outline-none sm:max-w-sm",
63
+ className,
64
+ )}
65
+ {...props}
66
+ >
67
+ {children}
68
+ {showCloseButton && (
69
+ <Button
70
+ data-slot="dialog-close"
71
+ variant="ghost"
72
+ className="absolute top-2 right-2"
73
+ size="icon-sm"
74
+ >
75
+ <XIcon />
76
+ <span className="sr-only">Close</span>
77
+ </Button>
78
+ )}
79
+ </div>
80
+ );
81
+ }
82
+
83
+ export function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
84
+ return (
85
+ <div data-slot="dialog-header" className={cn("flex flex-col gap-2", className)} {...props} />
86
+ );
87
+ }
88
+
89
+ export function DialogFooter({
90
+ className,
91
+ showCloseButton = false,
92
+ children,
93
+ ...props
94
+ }: React.ComponentProps<"div"> & { showCloseButton?: boolean }) {
95
+ return (
96
+ <div
97
+ data-slot="dialog-footer"
98
+ className={cn(
99
+ "-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",
100
+ className,
101
+ )}
102
+ {...props}
103
+ >
104
+ {children}
105
+ {showCloseButton && <Button variant="outline">Close</Button>}
106
+ </div>
107
+ );
108
+ }
109
+
110
+ export function DialogTitle({ className, ...props }: React.ComponentProps<"h2">) {
111
+ return (
112
+ <h2
113
+ data-slot="dialog-title"
114
+ className={cn("cn-font-heading text-base leading-none font-medium", className)}
115
+ {...props}
116
+ />
117
+ );
118
+ }
119
+
120
+ export function DialogDescription({ className, ...props }: React.ComponentProps<"p">) {
121
+ return (
122
+ <p
123
+ data-slot="dialog-description"
124
+ className={cn(
125
+ "text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
126
+ className,
127
+ )}
128
+ {...props}
129
+ />
130
+ );
131
+ }
@@ -0,0 +1,24 @@
1
+ // Vendored from shadcn-ui (https://ui.shadcn.com/docs/components/radix/direction).
2
+ // Snapshot version: see packages/shadcn-snapshot/package.json#snapshotVersion.
3
+ // Regenerate with `bun run vendor` — do not hand-edit unless you are adding a
4
+ // canvas adaptation, in which case add the id to vendor.ts's ADAPTED set.
5
+ "use client";
6
+
7
+ import { Direction } from "radix-ui";
8
+ import type * as React from "react";
9
+
10
+ function DirectionProvider({
11
+ dir,
12
+ direction,
13
+ children,
14
+ }: React.ComponentProps<typeof Direction.DirectionProvider> & {
15
+ direction?: React.ComponentProps<typeof Direction.DirectionProvider>["dir"];
16
+ }) {
17
+ return (
18
+ <Direction.DirectionProvider dir={direction ?? dir}>{children}</Direction.DirectionProvider>
19
+ );
20
+ }
21
+
22
+ const useDirection = Direction.useDirection;
23
+
24
+ export { DirectionProvider, useDirection };
@@ -0,0 +1,112 @@
1
+ // Vendored from shadcn-ui (https://ui.shadcn.com/docs/components/radix/drawer).
2
+ // Snapshot version: see packages/shadcn-snapshot/package.json#snapshotVersion.
3
+ //
4
+ // Canvas-safe: see ../canvas-portal.tsx. Upstream builds on vaul, whose Root
5
+ // owns a drag gesture and portals Content to the body once open — neither
6
+ // survives a static render, so nothing of the drawer would reach the design
7
+ // surface. The whole family is plain elements here, which also keeps vaul out
8
+ // of the dependency tree; `emit_code` still emits `Drawer`, so the user's app
9
+ // gets the real one from its own components/ui/drawer.
10
+ //
11
+ // `data-vaul-drawer-direction` is preserved because upstream's entire layout
12
+ // hangs off it — the direction the caller asked for still styles correctly.
13
+ "use client";
14
+
15
+ import type * as React from "react";
16
+ import { cn } from "../../lib/utils.ts";
17
+ import { inlineOpenAttrs } from "../canvas-portal.tsx";
18
+
19
+ type Direction = "top" | "bottom" | "left" | "right";
20
+
21
+ export function Drawer({ ...props }: React.ComponentProps<"div">) {
22
+ return <div data-slot="drawer" {...props} />;
23
+ }
24
+
25
+ export function DrawerTrigger({ ...props }: React.ComponentProps<"button">) {
26
+ return <button type="button" data-slot="drawer-trigger" {...props} />;
27
+ }
28
+
29
+ export function DrawerPortal({ children }: React.ComponentProps<"div">) {
30
+ return <>{children}</>;
31
+ }
32
+
33
+ export function DrawerClose({ ...props }: React.ComponentProps<"button">) {
34
+ return <button type="button" data-slot="drawer-close" {...props} />;
35
+ }
36
+
37
+ export function DrawerOverlay({ className, ...props }: React.ComponentProps<"div">) {
38
+ return (
39
+ <div
40
+ data-slot="drawer-overlay"
41
+ {...inlineOpenAttrs()}
42
+ className={cn("absolute inset-0 z-40 bg-black/10", className)}
43
+ {...props}
44
+ />
45
+ );
46
+ }
47
+
48
+ export function DrawerContent({
49
+ className,
50
+ children,
51
+ direction = "bottom",
52
+ ...props
53
+ }: React.ComponentProps<"div"> & { direction?: Direction }) {
54
+ return (
55
+ <div
56
+ data-slot="drawer-content"
57
+ data-vaul-drawer-direction={direction}
58
+ {...inlineOpenAttrs()}
59
+ className={cn(
60
+ "group/drawer-content z-50 flex h-auto flex-col bg-popover text-sm text-popover-foreground data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:rounded-r-xl data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:rounded-l-xl data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:rounded-b-xl data-[vaul-drawer-direction=top]:border-b data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm",
61
+ className,
62
+ )}
63
+ {...props}
64
+ >
65
+ <div className="mx-auto mt-4 hidden h-1 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block" />
66
+ {children}
67
+ </div>
68
+ );
69
+ }
70
+
71
+ export function DrawerHeader({ className, ...props }: React.ComponentProps<"div">) {
72
+ return (
73
+ <div
74
+ data-slot="drawer-header"
75
+ className={cn(
76
+ "flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:text-left",
77
+ className,
78
+ )}
79
+ {...props}
80
+ />
81
+ );
82
+ }
83
+
84
+ export function DrawerFooter({ className, ...props }: React.ComponentProps<"div">) {
85
+ return (
86
+ <div
87
+ data-slot="drawer-footer"
88
+ className={cn("mt-auto flex flex-col gap-2 p-4", className)}
89
+ {...props}
90
+ />
91
+ );
92
+ }
93
+
94
+ export function DrawerTitle({ className, ...props }: React.ComponentProps<"div">) {
95
+ return (
96
+ <div
97
+ data-slot="drawer-title"
98
+ className={cn("cn-font-heading font-medium", className)}
99
+ {...props}
100
+ />
101
+ );
102
+ }
103
+
104
+ export function DrawerDescription({ className, ...props }: React.ComponentProps<"p">) {
105
+ return (
106
+ <p
107
+ data-slot="drawer-description"
108
+ className={cn("text-sm text-muted-foreground", className)}
109
+ {...props}
110
+ />
111
+ );
112
+ }
@@ -0,0 +1,205 @@
1
+ // Vendored from shadcn-ui (https://ui.shadcn.com/docs/components/radix/dropdown-menu).
2
+ // Snapshot version: see packages/shadcn-snapshot/package.json#snapshotVersion.
3
+ // Canvas-safe: see ../canvas-portal.tsx. Everything from Content inward is a
4
+ // plain element — Radix's menu parts read a context Portal/Content sets up, so
5
+ // they can't render standalone, and the popup has to be inline for the design
6
+ // surface to see it. Classes track upstream except for the ones that depend on
7
+ // Radix's runtime positioning vars (`--radix-dropdown-menu-*`) or animate on
8
+ // open, which would leave screenshots catching a mid-transition frame.
9
+ "use client";
10
+
11
+ import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
12
+ import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
13
+ import type * as React from "react";
14
+ import { cn } from "../../lib/utils.ts";
15
+ import { inlineOpenAttrs, pinOpenInDesignMode } from "../canvas-portal.tsx";
16
+
17
+ const POPUP =
18
+ "cn-menu-target cn-menu-translucent z-50 min-w-32 overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground ring-1 ring-foreground/10";
19
+
20
+ const ITEM =
21
+ "relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
22
+
23
+ const CHECKABLE_ITEM =
24
+ "relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground 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";
25
+
26
+ export function DropdownMenu({
27
+ ...props
28
+ }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
29
+ return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...pinOpenInDesignMode(props)} />;
30
+ }
31
+
32
+ export function DropdownMenuTrigger({
33
+ ...props
34
+ }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {
35
+ return <DropdownMenuPrimitive.Trigger data-slot="dropdown-menu-trigger" {...props} />;
36
+ }
37
+
38
+ /** Upstream's Portal, neutralized: children render where they sit. */
39
+ export function DropdownMenuPortal({ children }: React.ComponentProps<"div">) {
40
+ return <>{children}</>;
41
+ }
42
+
43
+ export function DropdownMenuContent({
44
+ className,
45
+ sideOffset: _sideOffset,
46
+ align: _align,
47
+ ...props
48
+ }: React.ComponentProps<"div"> & { sideOffset?: number; align?: string }) {
49
+ return (
50
+ <div
51
+ data-slot="dropdown-menu-content"
52
+ {...inlineOpenAttrs()}
53
+ className={cn(POPUP, className)}
54
+ {...props}
55
+ />
56
+ );
57
+ }
58
+
59
+ export function DropdownMenuGroup({ className, ...props }: React.ComponentProps<"div">) {
60
+ return <div data-slot="dropdown-menu-group" className={className} {...props} />;
61
+ }
62
+
63
+ export function DropdownMenuItem({
64
+ className,
65
+ inset,
66
+ variant = "default",
67
+ ...props
68
+ }: React.ComponentProps<"div"> & { inset?: boolean; variant?: "default" | "destructive" }) {
69
+ return (
70
+ <div
71
+ data-slot="dropdown-menu-item"
72
+ data-inset={inset}
73
+ data-variant={variant}
74
+ className={cn(
75
+ "group/dropdown-menu-item",
76
+ ITEM,
77
+ "not-data-[variant=destructive]:focus:**:text-accent-foreground 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 data-[variant=destructive]:*:[svg]:text-destructive",
78
+ className,
79
+ )}
80
+ {...props}
81
+ />
82
+ );
83
+ }
84
+
85
+ export function DropdownMenuCheckboxItem({
86
+ className,
87
+ children,
88
+ checked,
89
+ ...props
90
+ }: React.ComponentProps<"div"> & { checked?: boolean }) {
91
+ return (
92
+ <div
93
+ data-slot="dropdown-menu-checkbox-item"
94
+ data-state={checked ? "checked" : "unchecked"}
95
+ className={cn(CHECKABLE_ITEM, className)}
96
+ {...props}
97
+ >
98
+ <span className="pointer-events-none absolute right-2 flex size-3.5 items-center justify-center">
99
+ {checked ? <CheckIcon className="size-4" /> : null}
100
+ </span>
101
+ {children}
102
+ </div>
103
+ );
104
+ }
105
+
106
+ export function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<"div">) {
107
+ return <div data-slot="dropdown-menu-radio-group" {...props} />;
108
+ }
109
+
110
+ export function DropdownMenuRadioItem({
111
+ className,
112
+ children,
113
+ checked,
114
+ ...props
115
+ }: React.ComponentProps<"div"> & { checked?: boolean }) {
116
+ return (
117
+ <div
118
+ data-slot="dropdown-menu-radio-item"
119
+ data-state={checked ? "checked" : "unchecked"}
120
+ className={cn(CHECKABLE_ITEM, className)}
121
+ {...props}
122
+ >
123
+ <span className="pointer-events-none absolute right-2 flex size-3.5 items-center justify-center">
124
+ {checked ? <CircleIcon className="size-2 fill-current" /> : null}
125
+ </span>
126
+ {children}
127
+ </div>
128
+ );
129
+ }
130
+
131
+ export function DropdownMenuLabel({
132
+ className,
133
+ inset,
134
+ ...props
135
+ }: React.ComponentProps<"div"> & { inset?: boolean }) {
136
+ return (
137
+ <div
138
+ data-slot="dropdown-menu-label"
139
+ data-inset={inset}
140
+ className={cn(
141
+ "px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",
142
+ className,
143
+ )}
144
+ {...props}
145
+ />
146
+ );
147
+ }
148
+
149
+ export function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<"div">) {
150
+ return (
151
+ <div
152
+ data-slot="dropdown-menu-separator"
153
+ className={cn("-mx-1 my-1 h-px bg-border", className)}
154
+ {...props}
155
+ />
156
+ );
157
+ }
158
+
159
+ export function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">) {
160
+ return (
161
+ <span
162
+ data-slot="dropdown-menu-shortcut"
163
+ className={cn(
164
+ "ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",
165
+ className,
166
+ )}
167
+ {...props}
168
+ />
169
+ );
170
+ }
171
+
172
+ export function DropdownMenuSub({
173
+ ...props
174
+ }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {
175
+ return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props} />;
176
+ }
177
+
178
+ export function DropdownMenuSubTrigger({
179
+ className,
180
+ inset,
181
+ children,
182
+ ...props
183
+ }: React.ComponentProps<"div"> & { inset?: boolean }) {
184
+ return (
185
+ <div
186
+ data-slot="dropdown-menu-sub-trigger"
187
+ data-inset={inset}
188
+ className={cn(ITEM, "data-open:bg-accent data-open:text-accent-foreground", className)}
189
+ {...props}
190
+ >
191
+ {children}
192
+ <ChevronRightIcon className="ml-auto size-4" />
193
+ </div>
194
+ );
195
+ }
196
+
197
+ export function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<"div">) {
198
+ return (
199
+ <div
200
+ data-slot="dropdown-menu-sub-content"
201
+ className={cn(POPUP, "min-w-[96px] shadow-lg", className)}
202
+ {...props}
203
+ />
204
+ );
205
+ }