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,93 @@
|
|
|
1
|
+
Copyright 2020 The Poppins Project Authors (https://github.com/itfoundry/Poppins)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created using
|
|
78
|
+
the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
7
|
+
<link rel="alternate icon" href="/favicon.ico" sizes="16x16 32x32 48x48" />
|
|
8
|
+
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
|
9
|
+
<link rel="manifest" href="/site.webmanifest" />
|
|
10
|
+
<meta name="theme-color" content="#0d0c0a" />
|
|
11
|
+
<title>velloo</title>
|
|
12
|
+
<script type="module" crossorigin src="/assets/index-ClaBqcaS.js"></script>
|
|
13
|
+
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="/assets/react-D0Ec-185.js">
|
|
15
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-CKmQ-Zst.js">
|
|
16
|
+
<link rel="modulepreload" crossorigin href="/assets/radix-C3HaOB-d.js">
|
|
17
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BCvDZiBo.css">
|
|
18
|
+
</head>
|
|
19
|
+
<body>
|
|
20
|
+
<div id="root"></div>
|
|
21
|
+
</body>
|
|
22
|
+
</html>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Velloo",
|
|
3
|
+
"short_name": "Velloo",
|
|
4
|
+
"icons": [
|
|
5
|
+
{ "src": "/icon-192.png", "sizes": "192x192", "type": "image/png" },
|
|
6
|
+
{ "src": "/icon-512.png", "sizes": "512x512", "type": "image/png" }
|
|
7
|
+
],
|
|
8
|
+
"theme_color": "#0d0c0a",
|
|
9
|
+
"background_color": "#0d0c0a",
|
|
10
|
+
"display": "standalone"
|
|
11
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{isCancel,confirm}from"./chunk-80fjfyha.js";import{CHROMIUM_INSTALL_ARGV,CHROMIUM_INSTALL_CMD,CHROMIUM_DEPS_INSTALL_ARGV,CHROMIUM_DEPS_INSTALL_CMD,BrowserMissingError}from"./chunk-3e8vez4d.js";import{fail}from"./chunk-s23gtejf.js";import{require_picocolors}from"./chunk-jrsknzjt.js";import{__toESM}from"./chunk-2smsg2ct.js";var import_picocolors=__toESM(require_picocolors(),1);var BROWSER_PROMPT_DETAIL=import_picocolors.default.dim("Headless Chromium \u2014 powers the agent's screenshot tool, velloo render --to=png, and PNG/PDF export. The canvas itself never needs it."),BROWSER_PROMPT_SIZE="(~110MB, one-time)";async function runChromiumInstall(){let proc=Bun.spawn([...CHROMIUM_INSTALL_ARGV],{stdout:"pipe",stderr:"pipe",stdin:"inherit"}),captured="",pump=async(stream,out)=>{let decoder=new TextDecoder;for await(let chunk of stream)out.write(chunk),captured+=decoder.decode(chunk,{stream:!0})},[,,code]=await Promise.all([pump(proc.stdout,process.stdout),pump(proc.stderr,process.stderr),proc.exited]),missingSystemLibs=/missing dependencies to run browsers|Missing libraries:/i.test(captured);return{ok:code===0&&!missingSystemLibs,missingSystemLibs}}async function installChromiumInteractive(){let result=await runChromiumInstall();if(result.ok)return!0;if(!result.missingSystemLibs)return!1;console.log(""),console.log(` ${import_picocolors.default.yellow("\u26A0")} Browser downloaded, but your system is missing libraries it needs to run.`);let proceed=await confirm({message:`Install the missing system libraries now? ${import_picocolors.default.dim(`(${CHROMIUM_DEPS_INSTALL_CMD} \u2014 uses your distro's package manager, needs root/sudo)`)}`,initialValue:!0});if(isCancel(proceed)||!proceed)return console.log(import_picocolors.default.dim(` Install them later with: ${import_picocolors.default.cyan(CHROMIUM_DEPS_INSTALL_CMD)}`)),!1;if(await Bun.spawn([...CHROMIUM_DEPS_INSTALL_ARGV],{stdout:"inherit",stderr:"inherit",stdin:"inherit"}).exited!==0)return console.log(import_picocolors.default.dim(` That didn't finish \u2014 run it manually: ${import_picocolors.default.cyan(`sudo ${CHROMIUM_DEPS_INSTALL_CMD}`)}`)),!1;return!0}async function captureWithBrowserSetup(cmd,capture){try{await capture();return}catch(e){if(!(e instanceof BrowserMissingError))throw e;if(!process.stdin.isTTY)fail(cmd,e.message);let proceed=await confirm({message:`Chromium isn't installed \u2014 \`${CHROMIUM_INSTALL_CMD}\` now? ${BROWSER_PROMPT_SIZE}
|
|
3
|
+
${BROWSER_PROMPT_DETAIL}`,initialValue:!0});if(isCancel(proceed)||!proceed)fail(cmd,e.message);if(!await installChromiumInteractive())fail(cmd,"the browser isn't usable yet \u2014 see the output above.")}await capture()}
|
|
4
|
+
export{BROWSER_PROMPT_DETAIL,BROWSER_PROMPT_SIZE,installChromiumInteractive,captureWithBrowserSetup};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"./chunk-t448rrfr.js";import"./chunk-40xgcth8.js";import{normalizeCloudUrl,loadCredential,deleteCredential,clearCredentials}from"./chunk-80r93t2e.js";import{defaultCloudUrl}from"./chunk-pp86v6m6.js";import{defineCommand}from"./chunk-2smsg2ct.js";var logout_default=defineCommand({meta:{name:"logout",description:"Log out of velloo-cloud (removes the saved CLI token)"},args:{url:{type:"string",description:"velloo-cloud base URL (default: $VELLOO_CLOUD_URL or the built-in default)"},all:{type:"boolean",default:!1,description:"Remove saved credentials for every cloud"}},async run({args}){if(args.all){let count=await clearCredentials();console.log(count>0?`velloo logout: removed credentials for ${count} cloud${count===1?"":"s"}`:"velloo logout: no saved credentials");return}let cloudUrl=args.url?normalizeCloudUrl(args.url):defaultCloudUrl(),existing=await loadCredential(cloudUrl);if(await deleteCredential(cloudUrl))console.log(`velloo logout: logged out of ${cloudUrl}${existing?.email?` (${existing.email})`:""}`);else console.log(`velloo logout: not logged in to ${cloudUrl}`)}});export{logout_default as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"./chunk-40xgcth8.js";import{signInRequired,boardLimitReached,topUpTokens,createServer}from"./chunk-tdsk5wxa.js";import{boardLimitFrom,describeCloudError}from"./chunk-t448rrfr.js";import"./chunk-3e8vez4d.js";import{loadCredential,saveCredential,deleteCredential}from"./chunk-80r93t2e.js";import{listPublishedDesigns,unpublishDesign,listPublishDestinations,describePublishError,PUBLISH_VIEWPORT,gitContext,listTeams,publishDesign}from"./chunk-rgasy862.js";import{TOOL_VERSION}from"./chunk-dg6z4vdd.js";import{updateStatus,upgradeInstalledVelloo}from"./chunk-xt5ayg7g.js";import{assertLoopbackHost,daemonRoot,writeLock,removeLock,readRememberedPort,rememberPort,portCandidates,registryUpsert,registryRemove}from"./chunk-sjgqnykd.js";import{fetchAccount,performDeviceLogin}from"./chunk-bwnvcncx.js";import{defaultCloudUrl,fetchCloudAppUrl}from"./chunk-pp86v6m6.js";import{defineCommand}from"./chunk-2smsg2ct.js";import{existsSync as existsSync2}from"fs";import{existsSync}from"fs";import{dirname,join}from"path";import{fileURLToPath}from"url";var here=dirname(fileURLToPath(import.meta.url));function resolveCanvasDist(){let devLayout=join(here,"..","dist");return[process.env.VELLOO_CANVAS_DIST,join(here,"canvas"),devLayout].filter((p)=>Boolean(p)).find((p)=>existsSync(join(p,"index.html")))??devLayout}var canvasDistPath=resolveCanvasDist();var ACCOUNT_TTL_MS=60000,ACCOUNT_TIMEOUT_MS=5000;function createCanvasAuth(cloudUrl,dependencies={}){let runDeviceLogin=dependencies.performDeviceLogin??performDeviceLogin,login={state:"idle"},pending=null,cached=null,cachedApp=null,describe=async(token,email)=>{if(cached&&cached.token===token&&Date.now()-cached.at<ACCOUNT_TTL_MS)return{account:cached.account,verified:cached.verified};let found=await fetchAccount(cloudUrl,token,ACCOUNT_TIMEOUT_MS),resolved=found.status==="ok"?{account:found.account,verified:!0}:{account:{email},verified:found.status==="rejected"?!1:null};return cached={token,at:Date.now(),...resolved},resolved},resolveAppUrl=async()=>{if(cachedApp&&Date.now()-cachedApp.at<ACCOUNT_TTL_MS)return cachedApp.url;let url=await fetchCloudAppUrl(cloudUrl,ACCOUNT_TIMEOUT_MS);return cachedApp={at:Date.now(),url},url},status=async()=>{let cred=await loadCredential(cloudUrl),appUrlP=resolveAppUrl();if(!cred?.token)return{loggedIn:!1,cloudUrl,appUrl:await appUrlP,verified:null,login};let[{account,verified},appUrl]=await Promise.all([describe(cred.token,cred.email),appUrlP]);return{loggedIn:!0,cloudUrl,appUrl,verified,login,...account?{account}:{}}};return{status,async beginLogin(){if(login.state==="pending")return status();let attempt=new AbortController;pending=attempt,login={state:"idle"};let settle=()=>{},ready=new Promise((resolve)=>{settle=resolve});return runDeviceLogin(cloudUrl,({verificationUrl,userCode,expiresIn})=>{login={state:"pending",userCode,verificationUrl,expiresAt:new Date(Date.now()+expiresIn*1000).toISOString()},settle()},attempt.signal).then(async(result)=>{await saveCredential(cloudUrl,result),cached=null,login={state:"idle"},await topUpTokens({url:cloudUrl,token:result.token},10).catch(()=>{return})}).catch((err)=>{login=attempt.signal.aborted?{state:"idle"}:{state:"error",message:err instanceof Error?err.message:String(err)}}).finally(()=>{if(pending===attempt)pending=null;settle()}),await ready,status()},async cancelLogin(){pending?.abort(),pending=null,login={state:"idle"}},async logout(){pending?.abort(),pending=null,login={state:"idle"},cached=null,await deleteCredential(cloudUrl)}}}function createCanvasPublish(cloudUrl,auth){let tokenFor=async()=>(await loadCredential(cloudUrl))?.token,access=async()=>{if(!await tokenFor())return{state:"signed-out"};return(await auth.status().catch(()=>null))?.verified===!1?{state:"expired"}:{state:"ready"}},rejection=(error)=>error.kind==="LoggedOut"?signInRequired("expired",describeCloudError(error)):Error(describeCloudError(error)),publishedAt=(value)=>{let parsed=value?Date.parse(value):Number.NaN;return Number.isFinite(parsed)?parsed:Number.NEGATIVE_INFINITY};return{access,async teams(){let token=await tokenFor();if(!token)return[];let listed=await listTeams(cloudUrl,token);return listed.ok?listed.value:[]},async published(){let token=await tokenFor();if(!token)throw signInRequired("signed-out","not signed in to velloo-cloud");let listed=await listPublishedDesigns({baseUrl:cloudUrl,token});if(!listed.ok)throw rejection(listed.error);return listed.value.map((design)=>({slug:design.slug,title:design.title??"",url:design.url,visibility:design.visibility,passwordProtected:design.passwordProtected,canManage:design.canManage,lastPublishedAt:design.lastPublishedAt})).sort((left,right)=>publishedAt(right.lastPublishedAt)-publishedAt(left.lastPublishedAt))},async unpublish(slug){let token=await tokenFor();if(!token)throw signInRequired("signed-out","not signed in to velloo-cloud");let removed=await unpublishDesign({baseUrl:cloudUrl,token,slug});if(!removed.ok)throw rejection(removed.error)},async destinations(host){let token=await tokenFor();if(!token)throw signInRequired("signed-out","not signed in to velloo-cloud");let provenance=gitContext(host.folder.root),folderId=host.folder.config.folderId;if(!folderId){let teams=await listTeams(cloudUrl,token);if(!teams.ok)throw rejection(teams.error);return{effectiveTeamId:teams.value.find((team)=>team.isDefault)?.id??null,provenance,slots:[]}}let listed=await listPublishDestinations({baseUrl:cloudUrl,token,folderId});if(!listed.ok)throw rejection(listed.error);return{...listed.value,provenance}},async run(host,request,onProgress,onWarning){let token=await tokenFor();if(!token)throw signInRequired("signed-out","not signed in to velloo-cloud \u2014 sign in from the account menu first.");let step="start",message="starting",published=await publishDesign({baseUrl:cloudUrl,token},{folder:host.folder,providers:host.providers,defaultProvider:host.defaultProvider,snapshotCss:host.snapshotCss},{boardIds:request.boardIds,...request.title?{title:request.title}:{},visibility:request.visibility,...request.password?{password:request.password}:{},destination:request.destination,...request.teamId?{teamId:request.teamId}:{},provenance:gitContext(host.folder.root),viewport:PUBLISH_VIEWPORT},(event)=>{if(event.kind==="warn"){onWarning(event.message);return}if(event.kind==="note"){onWarning(event.message);return}if(event.kind==="info")return;if(event.kind==="capture"){onProgress({step,message,capture:{done:event.done,total:event.total}});return}step=event.step,message=event.message,onProgress({step,message})});if(!published.ok){let reason=describePublishError(published.error);if(published.error.kind==="LoggedOut")throw signInRequired("expired",reason);let limit=published.error.kind==="HttpFailure"?boardLimitFrom(published.error):null;if(limit)throw boardLimitReached(limit,reason);throw Error(reason)}let outcome=published.value;return{shareUrl:outcome.shareUrl,visibility:outcome.visibility,passwordProtected:outcome.passwordProtected,files:outcome.files,bytes:outcome.bytes,screenshots:outcome.screenshots,boards:outcome.boards,screens:outcome.screens,created:outcome.created,...outcome.tier!==void 0?{tier:outcome.tier}:{},...outcome.history!==void 0?{history:outcome.history}:{}}}}}function createCanvasUpdates(){return{async status(opts={}){let status=await updateStatus(opts);return{current:status.current,latest:status.latest,available:status.available,method:status.method,channel:status.channel,upgradable:status.upgradable,...status.reason===void 0?{}:{reason:status.reason}}},async upgrade(){let outcome=await upgradeInstalledVelloo();return{upgraded:outcome.upgraded,from:outcome.from,to:outcome.to,restartRequired:outcome.upgraded}}}}var IDLE_MS=300000;function portFree(port,host){try{return Bun.serve({port,hostname:host,fetch:()=>new Response("")}).stop(!0),!0}catch{return!1}}var daemon_default=defineCommand({meta:{name:"__daemon",hidden:!0,description:"(internal) Run the persistent canvas daemon. Spawned by `velloo run` / `velloo mcp`."},args:{folder:{type:"positional",required:!0,description:"Design folder (absolute)"},port:{type:"string",description:"Preferred canvas port"},host:{type:"string",description:"Bind hostname (default 127.0.0.1)"}},async run({args}){let root=daemonRoot(args.folder),host=args.host??"127.0.0.1";assertLoopbackHost(host);let cloudUrl=defaultCloudUrl(),cred=await loadCredential(cloudUrl),cloud={url:cloudUrl,token:cred?.token,resolveToken:async()=>(await loadCredential(cloudUrl))?.token},auth=createCanvasAuth(cloudUrl),publish=createCanvasPublish(cloudUrl,auth),updates=createCanvasUpdates(),canvasPort=portCandidates({explicit:args.port?Number(args.port):void 0,remembered:await readRememberedPort(root),root}).find((port)=>portFree(port,host))??0,handle;try{handle=await createServer({folder:root,port:canvasPort,host,mcp:{transport:"http",port:0},canvasDist:canvasDistPath,cloud,auth,publish,updates})}catch(err){if(canvasPort===0)throw err;handle=await createServer({folder:root,port:0,host,mcp:{transport:"http",port:0},canvasDist:canvasDistPath,cloud,auth,publish,updates})}let rec={root,pid:process.pid,canvasUrl:handle.url,canvasPort:handle.port,mcpUrl:handle.mcpUrl??"",mcpPort:handle.mcpPort??0,cloudUrl,version:TOOL_VERSION,startedAt:new Date().toISOString()};await writeLock(rec),await registryUpsert(rec),await rememberPort(root,handle.port).catch(()=>{return}),console.error(`velloo: canvas daemon up at ${handle.url} (mcp ${handle.mcpUrl}), pid ${process.pid}`);let stopped=!1,shutdown=async()=>{if(stopped)return;stopped=!0,removeLock(root),await registryRemove(root).catch(()=>{return}),await handle.close(),process.exit(0)};process.on("SIGTERM",shutdown),process.on("SIGINT",shutdown);let rootMissing=0;setInterval(()=>{if(existsSync2(root)){rootMissing=0;return}if(rootMissing+=1,rootMissing>=2)console.error(`velloo: design folder ${root} is gone \u2014 shutting down.`),shutdown()},1e4);let idleSince=Date.now();setInterval(()=>{let{canvas,mcp}=handle.connections();if(canvas+mcp>0){idleSince=null;return}if(idleSince===null){idleSince=Date.now();return}if(Date.now()-idleSince>=IDLE_MS)console.error("velloo: canvas idle for 5 min \u2014 shutting down."),shutdown()},30000),await new Promise(()=>{})}});export{daemon_default as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{TAILWIND_CLASSNAME,helperSourcePath}from"./chunk-tdsk5wxa.js";import{snapshotVersion2,entryCssPath2,componentsDir2}from"./chunk-cvn689d5.js";import{registry2}from"./chunk-hcb68zt7.js";import"./chunk-jb21jkp1.js";import{readFile}from"fs/promises";import{join}from"path";async function readManifest(cacheDir){let raw=await readFile(join(cacheDir,"manifest.json"),"utf8");return JSON.parse(raw)}import{existsSync as existsSync4}from"fs";import{join as join5}from"path";import{existsSync as existsSync3,readFileSync as readFileSync3}from"fs";import{join as join4}from"path";import{existsSync,readFileSync}from"fs";import{join as join2}from"path";function exportsName(source,id){let name=id.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(new RegExp(`\\bexport\\s+(?:async\\s+)?(?:function|const|let|var|class)\\s+${name}\\b`).test(source))return!0;for(let match of source.matchAll(/\bexport\s*\{([^}]*)\}/g)){let clause=match[1]??"";for(let part of clause.split(",")){let local=part.trim().split(/\s+as\s+/);if((local.length>1?local[1]:local[0])?.trim()===id)return!0}}return/\bexport\s+\*\s+from\b/.test(source)}function hostComponentFile(uiDir,addName,id){for(let extension of["tsx","ts","jsx","js"]){let path=join2(uiDir,`${addName}.${extension}`);if(!existsSync(path))continue;try{return exportsName(readFileSync(path,"utf8"),id)?path:null}catch{return null}}return null}import{existsSync as existsSync2,readdirSync,readFileSync as readFileSync2}from"fs";import{join as join3,resolve}from"path";function kebab(id){return id.replace(/(?<!^)(?=[A-Z])/g,"-").toLowerCase()}function addNameIndex(manifest){let byId=new Map(manifest.flatMap((c)=>c.registryName?[[c.id,c.registryName]]:[]));return(id)=>byId.get(id)??kebab(id)}function findUiDir(hostAppRoot){let candidates=[];try{let cj=JSON.parse(readFileSync2(join3(hostAppRoot,"components.json"),"utf8")),fromAlias=(alias,suffix="")=>{if(!alias)return;let srcBase=existsSync2(join3(hostAppRoot,"src"))?"src":"",rel=alias.replace(/^@\//,srcBase?`${srcBase}/`:"")+suffix;candidates.push(resolve(hostAppRoot,rel))};fromAlias(cj.aliases?.ui),fromAlias(cj.aliases?.components,"/ui")}catch{}candidates.push(resolve(hostAppRoot,"src/components/ui"),resolve(hostAppRoot,"components/ui"),resolve(hostAppRoot,"app/components/ui"));for(let dir of candidates)if(existsSync2(dir))return dir;return null}function installedAddNames(hostAppRoot){let dir=findUiDir(hostAppRoot);if(!dir)return new Set;try{return new Set(readdirSync(dir).filter((f)=>f.endsWith(".tsx")||f.endsWith(".ts")).map((f)=>f.replace(/\.(tsx|ts)$/,"")))}catch{return new Set}}function enrichManifestFromHost(manifest,uiDir){if(!uiDir)return manifest;let addNameOf=addNameIndex(manifest),byFile=new Map,read=(addName)=>{if(byFile.has(addName))return byFile.get(addName)??null;for(let ext of["tsx","ts","jsx","js"]){let path=join4(uiDir,`${addName}.${ext}`);if(!existsSync3(path))continue;let source=readFileSync3(path,"utf8");return byFile.set(addName,source),source}return byFile.set(addName,""),null};return manifest.map((descriptor)=>{if(descriptor.source==="velloo")return descriptor;let source=read(addNameOf(descriptor.id));if(!source||!exportsName(source,descriptor.id))return descriptor;let additions=[...variantPropsFor(source,descriptor.id===descriptor.family),...declaredPropsFor(source,descriptor.id)];if(additions.length===0)return descriptor;let props=[...descriptor.props];for(let addition of additions){let index=props.findIndex((prop)=>prop.name===addition.name);if(index>=0)props[index]={...props[index],...addition};else props.push(addition)}return{...descriptor,props,designModeNotes:appendNote(descriptor.designModeNotes,"Props include variants detected from the app's component source.")}})}function appendNote(current,next){return current?`${current} ${next}`:next}function variantPropsFor(source,primary){let out=[];if(!primary)return out;let variantsAt=source.indexOf("variants:");if(variantsAt<0)return out;let open=source.indexOf("{",variantsAt),block=balancedBlock(source,open);if(!block)return out;for(let[name,value]of objectEntries(block.slice(1,-1))){let values=objectEntries(value.slice(1,-1)).map(([key])=>key);if(values.length===0)continue;out.push({name,type:`${values.map((value)=>JSON.stringify(value)).join(" | ")} | undefined`,optional:!0,control:"enum",enumValues:values,...defaultVariant(source,name)?{defaultValue:defaultVariant(source,name)}:{}})}return out}function defaultVariant(source,name){let at=source.indexOf("defaultVariants:");if(at<0)return;let open=source.indexOf("{",at),block=balancedBlock(source,open);if(!block)return;return objectEntries(block.slice(1,-1)).find(([key])=>key===name)?.[1].replace(/["'`\s]/g,"")}function declaredPropsFor(source,componentId){let match=[new RegExp(`interface\\s+${componentId}Props(?:\\s+extends[^\\{]+)?\\s*\\{`,"m"),new RegExp(`type\\s+${componentId}Props\\s*=.*?&\\s*\\{`,"m")].map((pattern)=>pattern.exec(source)).find(Boolean);if(!match||match.index===void 0)return[];let open=source.indexOf("{",match.index),block=balancedBlock(source,open);if(!block)return[];let out=[],property=/(?:^|[;{\n])\s*([A-Za-z_$][\w$]*)(\?)?\s*:\s*([^;\n}]+)/gm;for(let found of block.slice(1,-1).matchAll(property)){let name=found[1],raw=found[3]?.trim();if(!name||!raw||name==="children")continue;let enumValues=[...raw.matchAll(/["']([^"']+)["']/g)].map((value)=>value[1]),optional=found[2]==="?"||raw.includes("undefined");out.push({name,type:optional&&!raw.includes("undefined")?`${raw} | undefined`:raw,optional,control:enumValues.length>0?"enum":/boolean/.test(raw)?"boolean":/number/.test(raw)?"number":"string",...enumValues.length>0?{enumValues}:{}})}return out}function balancedBlock(source,open){if(open<0||source[open]!=="{")return null;let depth=0,quote="";for(let index=open;index<source.length;index++){let char=source[index],prev=source[index-1];if(quote){if(char===quote&&prev!=="\\")quote="";continue}if(char==='"'||char==="'"||char==="`"){quote=char;continue}if(char==="{")depth++;if(char==="}"&&--depth===0)return source.slice(open,index+1)}return null}function objectEntries(body){let out=[],index=0;while(index<body.length){while(index<body.length&&/[\s,]/.test(body[index]))index++;let keyMatch=/^(?:["']([^"']+)["']|([A-Za-z_$][\w$-]*))\s*:/.exec(body.slice(index));if(!keyMatch)break;let key=keyMatch[1]??keyMatch[2];if(!key)break;index+=keyMatch[0].length;while(/\s/.test(body[index]??""))index++;if(body[index]==="{"){let block=balancedBlock(body,index);if(!block)break;out.push([key,block]),index+=block.length;continue}let end=body.indexOf(",",index),value=body.slice(index,end<0?body.length:end).trim();out.push([key,value]),index=end<0?body.length:end+1}return out}function createProvider(opts={}){let cacheDir=opts.cacheDir,plannedUiDir=cacheDir?join5(cacheDir,"ui"):void 0,hostUiDir=()=>plannedUiDir&&existsSync4(plannedUiDir)?plannedUiDir:opts.hostAppRoot?findUiDir(opts.hostAppRoot):null,componentsDir=componentsDir2,version=opts.version??snapshotVersion2,hostAppRoot=opts.hostAppRoot,loadManifest=async()=>{if(cacheDir&&existsSync4(join5(cacheDir,"manifest.json")))return enrichManifestFromHost(await readManifest(cacheDir),hostUiDir());let{loadManifest:snapshotManifest}=await import("./chunk-zb6hc1y0.js");return enrichManifestFromHost(await snapshotManifest(),hostUiDir())};return{id:"shadcn-upstream",version,componentsDir,styleEntryPath:entryCssPath2,registry:registry2,loadManifest,label:`shadcn (upstream @ ${version})`,styleChannel:TAILWIND_CLASSNAME,styleChannels:["tailwind-classname"],mcpIntro:()=>['**This folder targets shadcn/ui with Tailwind.** The canvas imports client-safe components directly from the app, uses named canvas-safe adaptations for portal/state-heavy families, and falls back per component when a host file is missing or cannot compile. Velloo helpers (`Box`, `Heading`, `Text`, `Icon`, `Image`, `Gradient`, `Layer`, `SVG`, `Divider`, `Placeholder`, `Prose`) remain canvas primitives. Style through `update_props { style: "flex gap-4 p-6" }` \u2014 a Tailwind className string. Call `list_components` for the catalog and `component_status` before making a fidelity claim.',""],catalog:async()=>{let manifest=await loadManifest(),addNameOf=addNameIndex(manifest),shadcn=manifest.filter((c)=>c.source!=="velloo"),present=hostAppRoot?installedAddNames(hostAppRoot):new Set;return shadcn.map((c)=>{let addName=addNameOf(c.id);return{id:c.id,installed:present.has(addName),importPath:`@/components/ui/${addName}`}})},canvasBundleSpec:{styleRuntime:{kind:"none"},components:async(ids)=>{let manifest=await loadManifest(),addNameOf=addNameIndex(manifest),sourceById=new Map(manifest.map((entry)=>[entry.id,entry.source])),uiDir=hostUiDir();return ids.flatMap((id)=>{if(sourceById.get(id)==="velloo"){let path=helperSourcePath(id);return path?[{id,sources:[{importPath:path,exportName:id,fidelity:"fallback",note:"Velloo helper used alongside repo-backed shadcn components."}]}]:[]}if(!sourceById.has(id))return[];let addName=addNameOf(id),snapshotPath=join5(componentsDir2,"ui",`${addName}.tsx`);if(CANVAS_ADAPTED_FAMILIES.has(addName))return[{id,sources:[{importPath:snapshotPath,exportName:id,fidelity:"adapted",note:"The app component uses portals or runtime state; Velloo renders its canvas-safe counterpart inline."}]}];let hostPath=uiDir?hostComponentFile(uiDir,addName,id):null;return[{id,sources:[...hostPath?[{importPath:hostPath,exportName:id,fidelity:"exact",preflight:!0,note:"Rendered directly from the app's shadcn source file."}]:[],{importPath:snapshotPath,exportName:id,fidelity:"fallback",note:hostPath?"The app source did not compile for the browser canvas; using the bundled canvas fallback.":"The app does not install this component under this name (it may be renamed in its own file); using the bundled canvas fallback."}]}]})},sourceDirs:()=>{let uiDir=hostUiDir()??plannedUiDir;return uiDir?[uiDir]:[]}}}}var CANVAS_ADAPTED_FAMILIES=new Set(["alert-dialog","calendar","carousel","chart","dialog","dropdown-menu","popover","select","sheet","sonner","tooltip"]);export{createProvider};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var __create=Object.create;var{getPrototypeOf:__getProtoOf,defineProperty:__defProp,getOwnPropertyNames:__getOwnPropNames}=Object;var __hasOwnProp=Object.prototype.hasOwnProperty;function __accessProp(key){return this[key]}var __toESMCache_node,__toESMCache_esm,__toESM=(mod,isNodeMode,target)=>{var canCache=mod!=null&&typeof mod==="object";if(canCache){var cache=isNodeMode?__toESMCache_node??=new WeakMap:__toESMCache_esm??=new WeakMap,cached=cache.get(mod);if(cached)return cached}target=mod!=null?__create(__getProtoOf(mod)):{};let to=isNodeMode||!mod||!mod.__esModule||!__hasOwnProp.call(mod,"default")?__defProp(target,"default",{value:mod,enumerable:!0}):target;if(mod&&typeof mod==="object"||typeof mod==="function"){for(let key of __getOwnPropNames(mod))if(!__hasOwnProp.call(to,key))__defProp(to,key,{get:__accessProp.bind(mod,key),enumerable:!0})}if(canCache)cache.set(mod,to);return to};var __commonJS=(cb,mod)=>()=>(mod||cb((mod={exports:{}}).exports,mod),mod.exports);var __returnValue=(v)=>v;function __exportSetter(name,newValue){this[name]=__returnValue.bind(null,newValue)}var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0,configurable:!0,set:__exportSetter.bind(all,name)})};var __exportCjs=(target,getters,setters)=>{for(var name in getters)__defProp(target,name,{get:getters[name],set:setters[name],enumerable:!0,configurable:!0})},__require=import.meta.require;var NUMBER_CHAR_RE=/\d/,STR_SPLITTERS=["-","_","/","."];function isUppercase(char=""){if(NUMBER_CHAR_RE.test(char))return;return char!==char.toLowerCase()}function splitByCase(str,separators){let splitters=separators??STR_SPLITTERS,parts=[];if(!str||typeof str!=="string")return parts;let buff="",previousUpper,previousSplitter;for(let char of str){let isSplitter=splitters.includes(char);if(isSplitter===!0){parts.push(buff),buff="",previousUpper=void 0;continue}let isUpper=isUppercase(char);if(previousSplitter===!1){if(previousUpper===!1&&isUpper===!0){parts.push(buff),buff=char,previousUpper=isUpper;continue}if(previousUpper===!0&&isUpper===!1&&buff.length>1){let lastChar=buff.at(-1);parts.push(buff.slice(0,Math.max(0,buff.length-1))),buff=lastChar+char,previousUpper=isUpper;continue}}buff+=char,previousUpper=isUpper,previousSplitter=isSplitter}return parts.push(buff),parts}function upperFirst(str){return str?str[0].toUpperCase()+str.slice(1):""}function lowerFirst(str){return str?str[0].toLowerCase()+str.slice(1):""}function pascalCase(str,opts){return str?(Array.isArray(str)?str:splitByCase(str)).map((p)=>upperFirst(opts?.normalize?p.toLowerCase():p)).join(""):""}function camelCase(str,opts){return lowerFirst(pascalCase(str||"",opts))}function kebabCase(str,joiner){return str?(Array.isArray(str)?str:splitByCase(str)).map((p)=>p.toLowerCase()).join(joiner??"-"):""}function snakeCase(str){return kebabCase(str||"","_")}import{parseArgs as parseArgs$1}from"util";function toArray(val){if(Array.isArray(val))return val;return val===void 0?[]:[val]}function formatLineColumns(lines,linePrefix=""){let maxLength=[];for(let line of lines)for(let[i,element]of line.entries())maxLength[i]=Math.max(maxLength[i]||0,element.length);return lines.map((l)=>l.map((c,i)=>linePrefix+c[i===0?"padStart":"padEnd"](maxLength[i])).join(" ")).join(`
|
|
3
|
+
`)}function resolveValue(input){return typeof input==="function"?input():input}var CLIError=class extends Error{code;constructor(message,code){super(message);this.name="CLIError",this.code=code}};function parseRawArgs(args=[],opts={}){let booleans=new Set(opts.boolean||[]),strings=new Set(opts.string||[]),aliasMap=opts.alias||{},defaults=opts.default||{},aliasToMain=new Map,mainToAliases=new Map;for(let[key,value]of Object.entries(aliasMap)){let targets=value;for(let target of targets){if(aliasToMain.set(key,target),!mainToAliases.has(target))mainToAliases.set(target,[]);if(mainToAliases.get(target).push(key),aliasToMain.set(target,key),!mainToAliases.has(key))mainToAliases.set(key,[]);mainToAliases.get(key).push(target)}}let options={};function getType(name){if(booleans.has(name))return"boolean";let aliases=mainToAliases.get(name)||[];for(let alias of aliases)if(booleans.has(alias))return"boolean";return"string"}function isStringType(name){if(strings.has(name))return!0;let aliases=mainToAliases.get(name)||[];for(let alias of aliases)if(strings.has(alias))return!0;return!1}let allOptions=new Set([...booleans,...strings,...Object.keys(aliasMap),...Object.values(aliasMap).flat(),...Object.keys(defaults)]);for(let name of allOptions)if(!options[name])options[name]={type:getType(name),default:defaults[name]};for(let[alias,main]of aliasToMain.entries())if(alias.length===1&&options[main]&&!options[main].short)options[main].short=alias;let processedArgs=[],negatedFlags={};for(let i=0;i<args.length;i++){let arg=args[i];if(arg==="--"){processedArgs.push(...args.slice(i));break}if(arg.startsWith("--no-")){let flagName=arg.slice(5);negatedFlags[flagName]=!0;continue}processedArgs.push(arg)}let parsed;try{parsed=parseArgs$1({args:processedArgs,options:Object.keys(options).length>0?options:void 0,allowPositionals:!0,strict:!1})}catch{parsed={values:{},positionals:processedArgs}}let out={_:[]};out._=parsed.positionals;for(let[key,value]of Object.entries(parsed.values)){let coerced=value;if(getType(key)==="boolean"&&typeof value==="string")coerced=value!=="false";else if(isStringType(key)&&typeof value==="boolean")coerced="";out[key]=coerced}for(let[name]of Object.entries(negatedFlags)){out[name]=!1;let mainName=aliasToMain.get(name);if(mainName)out[mainName]=!1;let aliases=mainToAliases.get(name);if(aliases)for(let alias of aliases)out[alias]=!1}for(let[alias,main]of aliasToMain.entries()){if(out[alias]!==void 0&&out[main]===void 0)out[main]=out[alias];if(out[main]!==void 0&&out[alias]===void 0)out[alias]=out[main];if(out[alias]!==out[main]&&defaults[main]===out[main])out[main]=out[alias]}return out}var noColor=(()=>{let env=globalThis.process?.env??{};return env.NO_COLOR==="1"||env.TERM==="dumb"||env.TEST||env.CI})(),_c=(c,r=39)=>(t)=>noColor?t:`\x1B[${c}m${t}\x1B[${r}m`,bold=_c(1,22),cyan=_c(36),gray=_c(90),underline=_c(4,24);function parseArgs(rawArgs,argsDef){let parseOptions={boolean:[],string:[],alias:{},default:{}},args=resolveArgs(argsDef);for(let arg of args){if(arg.type==="positional")continue;if(arg.type==="string"||arg.type==="enum")parseOptions.string.push(arg.name);else if(arg.type==="boolean")parseOptions.boolean.push(arg.name);if(arg.default!==void 0)parseOptions.default[arg.name]=arg.default;if(arg.alias)parseOptions.alias[arg.name]=arg.alias;let camelName=camelCase(arg.name),kebabName=kebabCase(arg.name);if(camelName!==arg.name||kebabName!==arg.name){let existingAliases=toArray(parseOptions.alias[arg.name]||[]);if(camelName!==arg.name&&!existingAliases.includes(camelName))existingAliases.push(camelName);if(kebabName!==arg.name&&!existingAliases.includes(kebabName))existingAliases.push(kebabName);if(existingAliases.length>0)parseOptions.alias[arg.name]=existingAliases}}let parsed=parseRawArgs(rawArgs,parseOptions),[...positionalArguments]=parsed._,parsedArgsProxy=new Proxy(parsed,{get(target,prop){return target[prop]??target[camelCase(prop)]??target[kebabCase(prop)]}});for(let[,arg]of args.entries())if(arg.type==="positional"){let nextPositionalArgument=positionalArguments.shift();if(nextPositionalArgument!==void 0)parsedArgsProxy[arg.name]=nextPositionalArgument;else if(arg.default===void 0&&arg.required!==!1)throw new CLIError(`Missing required positional argument: ${arg.name.toUpperCase()}`,"EARG");else parsedArgsProxy[arg.name]=arg.default}else if(arg.type==="enum"){let argument=parsedArgsProxy[arg.name],options=arg.options||[];if(argument!==void 0&&options.length>0&&!options.includes(argument))throw new CLIError(`Invalid value for argument: ${cyan(`--${arg.name}`)} (${cyan(argument)}). Expected one of: ${options.map((o)=>cyan(o)).join(", ")}.`,"EARG")}else if(arg.required&&parsedArgsProxy[arg.name]===void 0)throw new CLIError(`Missing required argument: --${arg.name}`,"EARG");return parsedArgsProxy}function resolveArgs(argsDef){let args=[];for(let[name,argDef]of Object.entries(argsDef||{}))args.push({...argDef,name,alias:toArray(argDef.alias)});return args}async function resolvePlugins(plugins){return Promise.all(plugins.map((p)=>resolveValue(p)))}function defineCommand(def){return def}async function runCommand(cmd,opts){let cmdArgs=await resolveValue(cmd.args||{}),parsedArgs=parseArgs(opts.rawArgs,cmdArgs),context={rawArgs:opts.rawArgs,args:parsedArgs,data:opts.data,cmd},plugins=await resolvePlugins(cmd.plugins??[]),result,runError;try{for(let plugin of plugins)await plugin.setup?.(context);if(typeof cmd.setup==="function")await cmd.setup(context);let subCommands=await resolveValue(cmd.subCommands);if(subCommands&&Object.keys(subCommands).length>0){let subCommandArgIndex=findSubCommandIndex(opts.rawArgs,cmdArgs),explicitName=opts.rawArgs[subCommandArgIndex];if(explicitName){let subCommand=await _findSubCommand(subCommands,explicitName);if(!subCommand)throw new CLIError(`Unknown command ${cyan(explicitName)}`,"E_UNKNOWN_COMMAND");await runCommand(subCommand,{rawArgs:opts.rawArgs.slice(subCommandArgIndex+1)})}else{let defaultSubCommand=await resolveValue(cmd.default);if(defaultSubCommand){if(cmd.run)throw new CLIError("Cannot specify both 'run' and 'default' on the same command.","E_DEFAULT_CONFLICT");let subCommand=await _findSubCommand(subCommands,defaultSubCommand);if(!subCommand)throw new CLIError(`Default sub command ${cyan(defaultSubCommand)} not found in subCommands.`,"E_UNKNOWN_COMMAND");await runCommand(subCommand,{rawArgs:opts.rawArgs})}else if(!cmd.run)throw new CLIError("No command specified.","E_NO_COMMAND")}}if(typeof cmd.run==="function")result=await cmd.run(context)}catch(error){runError=error}let cleanupErrors=[];if(typeof cmd.cleanup==="function")try{await cmd.cleanup(context)}catch(error){cleanupErrors.push(error)}for(let plugin of[...plugins].reverse())try{await plugin.cleanup?.(context)}catch(error){cleanupErrors.push(error)}if(runError)throw runError;if(cleanupErrors.length===1)throw cleanupErrors[0];if(cleanupErrors.length>1)throw Error("Multiple cleanup errors",{cause:cleanupErrors});return{result}}async function resolveSubCommand(cmd,rawArgs,parent){let subCommands=await resolveValue(cmd.subCommands);if(subCommands&&Object.keys(subCommands).length>0){let subCommandArgIndex=findSubCommandIndex(rawArgs,await resolveValue(cmd.args||{})),subCommandName=rawArgs[subCommandArgIndex],subCommand=await _findSubCommand(subCommands,subCommandName);if(subCommand)return resolveSubCommand(subCommand,rawArgs.slice(subCommandArgIndex+1),cmd)}return[cmd,parent]}async function _findSubCommand(subCommands,name){if(name in subCommands)return resolveValue(subCommands[name]);for(let sub of Object.values(subCommands)){let resolved=await resolveValue(sub),meta=await resolveValue(resolved?.meta);if(meta?.alias){if(toArray(meta.alias).includes(name))return resolved}}}function findSubCommandIndex(rawArgs,argsDef){for(let i=0;i<rawArgs.length;i++){let arg=rawArgs[i];if(arg==="--")return-1;if(arg.startsWith("-")){if(!arg.includes("=")&&_isValueFlag(arg,argsDef))i++;continue}return i}return-1}function _isValueFlag(flag,argsDef){let name=flag.replace(/^-{1,2}/,""),normalized=camelCase(name);for(let[key,def]of Object.entries(argsDef)){if(def.type!=="string"&&def.type!=="enum")continue;if(normalized===camelCase(key))return!0;if((Array.isArray(def.alias)?def.alias:def.alias?[def.alias]:[]).includes(name))return!0}return!1}async function showUsage(cmd,parent){try{console.log(await renderUsage(cmd,parent)+`
|
|
4
|
+
`)}catch(error){console.error(error)}}var negativePrefixRe=/^no[-A-Z]/;async function renderUsage(cmd,parent){let cmdMeta=await resolveValue(cmd.meta||{}),cmdArgs=resolveArgs(await resolveValue(cmd.args||{})),parentMeta=await resolveValue(parent?.meta||{}),commandName=`${parentMeta.name?`${parentMeta.name} `:""}`+(cmdMeta.name||process.argv[1]),argLines=[],posLines=[],commandsLines=[],usageLine=[];for(let arg of cmdArgs)if(arg.type==="positional"){let name=arg.name.toUpperCase(),isRequired=arg.required!==!1&&arg.default===void 0;posLines.push([cyan(name+renderValueHint(arg)),renderDescription(arg,isRequired)]),usageLine.push(isRequired?`<${name}>`:`[${name}]`)}else{let isRequired=arg.required===!0&&arg.default===void 0,argStr=[...(arg.alias||[]).map((a)=>`-${a}`),`--${arg.name}`].join(", ")+renderValueHint(arg);if(argLines.push([cyan(argStr),renderDescription(arg,isRequired)]),arg.type==="boolean"&&(arg.default===!0||arg.negativeDescription)&&!negativePrefixRe.test(arg.name)){let negativeArgStr=[...(arg.alias||[]).map((a)=>`--no-${a}`),`--no-${arg.name}`].join(", ");argLines.push([cyan(negativeArgStr),[arg.negativeDescription,isRequired?gray("(Required)"):""].filter(Boolean).join(" ")])}if(isRequired)usageLine.push(`--${arg.name}`+renderValueHint(arg))}if(cmd.subCommands){let commandNames=[],subCommands=await resolveValue(cmd.subCommands);for(let[name,sub]of Object.entries(subCommands)){let meta=await resolveValue((await resolveValue(sub))?.meta);if(meta?.hidden)continue;let aliases=toArray(meta?.alias),label=[name,...aliases].join(", ");commandsLines.push([cyan(label),meta?.description||""]),commandNames.push(name,...aliases)}usageLine.push(commandNames.join("|"))}let usageLines=[],version=cmdMeta.version||parentMeta.version;usageLines.push(gray(`${cmdMeta.description} (${commandName+(version?` v${version}`:"")})`),"");let hasOptions=argLines.length>0||posLines.length>0;if(usageLines.push(`${underline(bold("USAGE"))} ${cyan(`${commandName}${hasOptions?" [OPTIONS]":""} ${usageLine.join(" ")}`)}`,""),posLines.length>0)usageLines.push(underline(bold("ARGUMENTS")),""),usageLines.push(formatLineColumns(posLines," ")),usageLines.push("");if(argLines.length>0)usageLines.push(underline(bold("OPTIONS")),""),usageLines.push(formatLineColumns(argLines," ")),usageLines.push("");if(commandsLines.length>0)usageLines.push(underline(bold("COMMANDS")),""),usageLines.push(formatLineColumns(commandsLines," ")),usageLines.push("",`Use ${cyan(`${commandName} <command> --help`)} for more information about a command.`);return usageLines.filter((l)=>typeof l==="string").join(`
|
|
5
|
+
`)}function renderValueHint(arg){let valueHint=arg.valueHint?`=<${arg.valueHint}>`:"",fallbackValueHint=valueHint||`=<${snakeCase(arg.name)}>`;if(!arg.type||arg.type==="positional"||arg.type==="boolean")return valueHint;if(arg.type==="enum"&&arg.options?.length)return`=<${arg.options.join("|")}>`;return fallbackValueHint}function renderDescription(arg,required){let requiredHint=required?gray("(Required)"):"",defaultHint=arg.default===void 0?"":gray(`(Default: ${arg.default})`);return[arg.description,requiredHint,defaultHint].filter(Boolean).join(" ")}async function runMain(cmd,opts={}){let rawArgs=opts.rawArgs||process.argv.slice(2),showUsage$1=opts.showUsage||showUsage;try{let builtinFlags=await _resolveBuiltinFlags(cmd);if(builtinFlags.help.length>0&&rawArgs.some((arg)=>builtinFlags.help.includes(arg)))await showUsage$1(...await resolveSubCommand(cmd,rawArgs)),process.exit(0);else if(rawArgs.length===1&&builtinFlags.version.includes(rawArgs[0])){let meta=typeof cmd.meta==="function"?await cmd.meta():await cmd.meta;if(!meta?.version)throw new CLIError("No version specified","E_NO_VERSION");console.log(meta.version)}else await runCommand(cmd,{rawArgs})}catch(error){if(error instanceof CLIError)await showUsage$1(...await resolveSubCommand(cmd,rawArgs)),console.error(error.message);else console.error(error,`
|
|
6
|
+
`);process.exit(1)}}async function _resolveBuiltinFlags(cmd){let argsDef=await resolveValue(cmd.args||{}),userNames=new Set,userAliases=new Set;for(let[name,def]of Object.entries(argsDef)){userNames.add(name);for(let alias of toArray(def.alias))userAliases.add(alias)}return{help:_getBuiltinFlags("help","h",userNames,userAliases),version:_getBuiltinFlags("version","v",userNames,userAliases)}}function _getBuiltinFlags(long,short,userNames,userAliases){if(userNames.has(long)||userAliases.has(long))return[];if(userNames.has(short)||userAliases.has(short))return[`--${long}`];return[`--${long}`,`-${short}`]}
|
|
7
|
+
export{__toESM,__commonJS,__export,__exportCjs,__require,defineCommand,runMain};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{upgrade_default,migrateFolder2}from"./chunk-4dn75m6t.js";import"./chunk-pjtg3wnm.js";import"./chunk-vgmr98cv.js";import"./chunk-7eq7nx37.js";import"./chunk-vsv8z729.js";import"./chunk-sjgqnykd.js";import"./chunk-80fjfyha.js";import"./chunk-tdsk5wxa.js";import"./chunk-3e8vez4d.js";import"./chunk-pp86v6m6.js";import"./chunk-t448rrfr.js";import"./chunk-xt5ayg7g.js";import"./chunk-dg6z4vdd.js";import"./chunk-s23gtejf.js";import"./chunk-40xgcth8.js";export{upgrade_default as default,migrateFolder2 as migrateFolder};
|