canvas-ui-sdk 0.1.6 → 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/dist/cli/index.js +516 -0
- package/dist/index.d.ts +67 -3
- package/dist/index.js +2588 -301
- package/dist/index.js.map +1 -1
- package/mcp/dist/index.js +5 -1
- package/package.json +18 -2
- package/registry/blocks/activity-feed.json +19 -0
- package/registry/blocks/blog-cards.json +16 -0
- package/registry/blocks/bottom-input-chat-widget.json +19 -0
- package/registry/blocks/canvas-item.json +18 -0
- package/registry/blocks/category-grid.json +16 -0
- package/registry/blocks/centered-hero.json +14 -0
- package/registry/blocks/chat-message.json +18 -0
- package/registry/blocks/circular-progress-bar-list.json +18 -0
- package/registry/blocks/component-palette.json +21 -0
- package/registry/blocks/component-search.json +19 -0
- package/registry/blocks/content-dropzone.json +16 -0
- package/registry/blocks/content-with-image.json +14 -0
- package/registry/blocks/core-values-grid.json +16 -0
- package/registry/blocks/credit-card-display.json +16 -0
- package/registry/blocks/cta-banner.json +14 -0
- package/registry/blocks/custom-component-helper.json +19 -0
- package/registry/blocks/destination-cards.json +16 -0
- package/registry/blocks/empty-state.json +16 -0
- package/registry/blocks/faq-accordion.json +16 -0
- package/registry/blocks/faqs-table.json +18 -0
- package/registry/blocks/feature-with-image.json +16 -0
- package/registry/blocks/featured-news-cards.json +16 -0
- package/registry/blocks/featured-places.json +16 -0
- package/registry/blocks/features-comparison.json +16 -0
- package/registry/blocks/filter-popover.json +28 -0
- package/registry/blocks/fixed-column-data-table.json +20 -0
- package/registry/blocks/flair-banner.json +16 -0
- package/registry/blocks/footer-navbar.json +17 -0
- package/registry/blocks/form-group.json +29 -0
- package/registry/blocks/gallery-section.json +14 -0
- package/registry/blocks/gradient-banner.json +16 -0
- package/registry/blocks/graph-metric-tiles.json +20 -0
- package/registry/blocks/grid-tiles-list.json +20 -0
- package/registry/blocks/hero-dark-centered.json +16 -0
- package/registry/blocks/hero-dark-with-image.json +16 -0
- package/registry/blocks/hero-fullwidth-image.json +16 -0
- package/registry/blocks/hero-section.json +16 -0
- package/registry/blocks/how-it-works.json +16 -0
- package/registry/blocks/image-feed-with-nested-comments.json +20 -0
- package/registry/blocks/infinity-canvas.json +58 -0
- package/registry/blocks/large-image-labels-list.json +19 -0
- package/registry/blocks/loader.json +19 -0
- package/registry/blocks/login-branding-panel.json +16 -0
- package/registry/blocks/menu-section.json +18 -0
- package/registry/blocks/menufocus-template.json +19 -0
- package/registry/blocks/messenger-sidebar.json +19 -0
- package/registry/blocks/metrics-section.json +14 -0
- package/registry/blocks/mobile-bottom-nav.json +18 -0
- package/registry/blocks/monthly-calendar-widget.json +20 -0
- package/registry/blocks/nested-comments-table.json +21 -0
- package/registry/blocks/nested-data-table.json +22 -0
- package/registry/blocks/office-locations.json +14 -0
- package/registry/blocks/page-header-section.json +17 -0
- package/registry/blocks/page-previews.json +29 -0
- package/registry/blocks/pagination.json +20 -0
- package/registry/blocks/participant-list.json +17 -0
- package/registry/blocks/persona-card.json +18 -0
- package/registry/blocks/pill-tabs.json +19 -0
- package/registry/blocks/pricing-cards.json +16 -0
- package/registry/blocks/pricing-cta.json +14 -0
- package/registry/blocks/profile-card.json +20 -0
- package/registry/blocks/profile-grid-tiles-list.json +21 -0
- package/registry/blocks/profile-image-uploader.json +19 -0
- package/registry/blocks/profile-info-cards.json +19 -0
- package/registry/blocks/progress-bar.json +16 -0
- package/registry/blocks/prompt-template.json +18 -0
- package/registry/blocks/reviews-grid.json +14 -0
- package/registry/blocks/reviews-table.json +19 -0
- package/registry/blocks/screen-flowchart.json +19 -0
- package/registry/blocks/screen-prompt-builder.json +19 -0
- package/registry/blocks/screen-prompt-template.json +18 -0
- package/registry/blocks/search-bar.json +19 -0
- package/registry/blocks/search-sidebar.json +25 -0
- package/registry/blocks/settings-list-row.json +20 -0
- package/registry/blocks/sidebar-cards.json +18 -0
- package/registry/blocks/sidebar-profile-card.json +21 -0
- package/registry/blocks/slideshow-grid-tiles.json +21 -0
- package/registry/blocks/social-feed.json +20 -0
- package/registry/blocks/social-proof.json +14 -0
- package/registry/blocks/standard-data-table.json +20 -0
- package/registry/blocks/standard-list-with-image.json +17 -0
- package/registry/blocks/step-tracker.json +16 -0
- package/registry/blocks/team-cards-grid.json +16 -0
- package/registry/blocks/team-circular-grid.json +16 -0
- package/registry/blocks/testimonial-carousel.json +16 -0
- package/registry/blocks/upvoting-posts-table.json +22 -0
- package/registry/blocks/vertical-how-it-works.json +16 -0
- package/registry/blocks/vertical-step-tracker.json +17 -0
- package/registry/blocks/video-chat-controls.json +18 -0
- package/registry/blocks/video-content-section.json +16 -0
- package/registry/blocks/video-playlist.json +18 -0
- package/registry/blocks/webcam-preview.json +18 -0
- package/registry/blocks/youtube-player.json +16 -0
- package/registry/hooks/use-css-variable-sync.json +14 -0
- package/registry/hooks/use-mobile.json +14 -0
- package/registry/index.json +730 -0
- package/registry/layout/account-settings-shell.json +20 -0
- package/registry/layout/dashboard-shell.json +23 -0
- package/registry/layout/double-sidebar-shell.json +23 -0
- package/registry/layout/double-sidebar.json +20 -0
- package/registry/layout/header.json +22 -0
- package/registry/layout/icon-sidebar-shell.json +23 -0
- package/registry/layout/icon-sidebar.json +19 -0
- package/registry/layout/mobile-menu-shell.json +19 -0
- package/registry/layout/multistep-progressbar-shell.json +23 -0
- package/registry/layout/multistep-shell.json +21 -0
- package/registry/layout/multistep-sidebar-shell.json +22 -0
- package/registry/layout/project-context-shell.json +20 -0
- package/registry/layout/search-bar-shell.json +22 -0
- package/registry/layout/sidebar-nav.json +18 -0
- package/registry/layout/sidebar.json +20 -0
- package/registry/layout/standard-page-shell.json +21 -0
- package/registry/layout/vertical-multistep-shell.json +23 -0
- package/registry/lib/utils.json +17 -0
- package/registry/ui/avatar.json +18 -0
- package/registry/ui/button.json +19 -0
- package/registry/ui/calendar.json +20 -0
- package/registry/ui/checkbox.json +19 -0
- package/registry/ui/date-input.json +18 -0
- package/registry/ui/dialog.json +19 -0
- package/registry/ui/dropdown-menu.json +19 -0
- package/registry/ui/file-uploader.json +18 -0
- package/registry/ui/image-uploader.json +18 -0
- package/registry/ui/input.json +16 -0
- package/registry/ui/label.json +18 -0
- package/registry/ui/line-tabs.json +16 -0
- package/registry/ui/multiselect-checkbox-field.json +18 -0
- package/registry/ui/multiselect-tags.json +18 -0
- package/registry/ui/popover.json +18 -0
- package/registry/ui/radio-group.json +19 -0
- package/registry/ui/range-input.json +17 -0
- package/registry/ui/scroll-area.json +18 -0
- package/registry/ui/searchbox.json +18 -0
- package/registry/ui/select.json +20 -0
- package/registry/ui/selectable-pills.json +16 -0
- package/registry/ui/separator.json +18 -0
- package/registry/ui/sheet.json +19 -0
- package/registry/ui/sidebar.json +27 -0
- package/registry/ui/skeleton.json +16 -0
- package/registry/ui/slider.json +18 -0
- package/registry/ui/switch.json +18 -0
- package/registry/ui/tabs.json +18 -0
- package/registry/ui/text-input.json +16 -0
- package/registry/ui/textarea.json +18 -0
- package/registry/ui/tooltip.json +18 -0
- package/registry/ui/typography.json +16 -0
- package/styles/tokens.reference.css +35 -3
|
@@ -0,0 +1,516 @@
|
|
|
1
|
+
// cli/src/index.ts
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
|
|
4
|
+
// cli/src/commands/init.ts
|
|
5
|
+
import fs2 from "fs-extra";
|
|
6
|
+
import path2 from "path";
|
|
7
|
+
import chalk from "chalk";
|
|
8
|
+
import ora from "ora";
|
|
9
|
+
import prompts from "prompts";
|
|
10
|
+
|
|
11
|
+
// cli/src/types.ts
|
|
12
|
+
var DEFAULT_CONFIG = {
|
|
13
|
+
aliases: {
|
|
14
|
+
components: "@/components",
|
|
15
|
+
ui: "@/components/ui",
|
|
16
|
+
lib: "@/lib",
|
|
17
|
+
hooks: "@/hooks"
|
|
18
|
+
},
|
|
19
|
+
tailwind: {
|
|
20
|
+
css: "src/app/globals.css"
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
// cli/src/utils/installer.ts
|
|
25
|
+
import { execa } from "execa";
|
|
26
|
+
import fs from "fs-extra";
|
|
27
|
+
import path from "path";
|
|
28
|
+
function detectPackageManager(cwd) {
|
|
29
|
+
if (fs.existsSync(path.join(cwd, "bun.lockb")) || fs.existsSync(path.join(cwd, "bun.lock"))) return "bun";
|
|
30
|
+
if (fs.existsSync(path.join(cwd, "pnpm-lock.yaml"))) return "pnpm";
|
|
31
|
+
if (fs.existsSync(path.join(cwd, "yarn.lock"))) return "yarn";
|
|
32
|
+
return "npm";
|
|
33
|
+
}
|
|
34
|
+
async function installPackages(packages, cwd) {
|
|
35
|
+
if (packages.length === 0) return;
|
|
36
|
+
const pm = detectPackageManager(cwd);
|
|
37
|
+
const args = pm === "npm" ? ["install", ...packages] : pm === "yarn" ? ["add", ...packages] : pm === "pnpm" ? ["add", ...packages] : ["add", ...packages];
|
|
38
|
+
await execa(pm, args, { cwd, stdio: "pipe" });
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// cli/src/commands/init.ts
|
|
42
|
+
var CONFIG_FILE = "canvas-ui.json";
|
|
43
|
+
async function init() {
|
|
44
|
+
const cwd = process.cwd();
|
|
45
|
+
if (fs2.existsSync(path2.join(cwd, CONFIG_FILE))) {
|
|
46
|
+
const { overwrite } = await prompts({
|
|
47
|
+
type: "confirm",
|
|
48
|
+
name: "overwrite",
|
|
49
|
+
message: `${CONFIG_FILE} already exists. Overwrite?`,
|
|
50
|
+
initial: false
|
|
51
|
+
});
|
|
52
|
+
if (!overwrite) {
|
|
53
|
+
console.log("Aborted.");
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if (!fs2.existsSync(path2.join(cwd, "package.json"))) {
|
|
58
|
+
console.log(
|
|
59
|
+
chalk.red("No package.json found. Please run this in a project directory.")
|
|
60
|
+
);
|
|
61
|
+
process.exit(1);
|
|
62
|
+
}
|
|
63
|
+
console.log(chalk.bold("\nInitializing Canvas UI SDK...\n"));
|
|
64
|
+
const answers = await prompts([
|
|
65
|
+
{
|
|
66
|
+
type: "text",
|
|
67
|
+
name: "cssPath",
|
|
68
|
+
message: "Where is your global CSS file?",
|
|
69
|
+
initial: DEFAULT_CONFIG.tailwind.css
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
type: "text",
|
|
73
|
+
name: "componentsAlias",
|
|
74
|
+
message: "Components import alias:",
|
|
75
|
+
initial: DEFAULT_CONFIG.aliases.components
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
type: "text",
|
|
79
|
+
name: "libAlias",
|
|
80
|
+
message: "Lib/utils import alias:",
|
|
81
|
+
initial: DEFAULT_CONFIG.aliases.lib
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
type: "text",
|
|
85
|
+
name: "hooksAlias",
|
|
86
|
+
message: "Hooks import alias:",
|
|
87
|
+
initial: DEFAULT_CONFIG.aliases.hooks
|
|
88
|
+
}
|
|
89
|
+
]);
|
|
90
|
+
if (!answers.cssPath) {
|
|
91
|
+
console.log("Aborted.");
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
const config = {
|
|
95
|
+
aliases: {
|
|
96
|
+
components: answers.componentsAlias,
|
|
97
|
+
ui: `${answers.componentsAlias}/ui`,
|
|
98
|
+
lib: answers.libAlias,
|
|
99
|
+
hooks: answers.hooksAlias
|
|
100
|
+
},
|
|
101
|
+
tailwind: {
|
|
102
|
+
css: answers.cssPath
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
const spinner = ora("Writing configuration...").start();
|
|
106
|
+
await fs2.writeJSON(path2.join(cwd, CONFIG_FILE), config, { spaces: 2 });
|
|
107
|
+
spinner.succeed("Created canvas-ui.json");
|
|
108
|
+
const pm = detectPackageManager(cwd);
|
|
109
|
+
spinner.start(`Installing canvas-ui-sdk via ${pm}...`);
|
|
110
|
+
try {
|
|
111
|
+
await installPackages(["canvas-ui-sdk"], cwd);
|
|
112
|
+
spinner.succeed("Installed canvas-ui-sdk");
|
|
113
|
+
} catch {
|
|
114
|
+
spinner.warn(
|
|
115
|
+
"Could not install canvas-ui-sdk automatically. Run: npm install canvas-ui-sdk"
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
spinner.start("Installing base dependencies...");
|
|
119
|
+
try {
|
|
120
|
+
await installPackages(["clsx", "tailwind-merge"], cwd);
|
|
121
|
+
spinner.succeed("Installed clsx and tailwind-merge");
|
|
122
|
+
} catch {
|
|
123
|
+
spinner.warn(
|
|
124
|
+
"Could not install base deps. Run: npm install clsx tailwind-merge"
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
spinner.start("Creating directory structure...");
|
|
128
|
+
const dirs = [
|
|
129
|
+
resolveAlias(config.aliases.ui, cwd),
|
|
130
|
+
path2.join(resolveAlias(config.aliases.components, cwd), "blocks"),
|
|
131
|
+
path2.join(resolveAlias(config.aliases.components, cwd), "layout"),
|
|
132
|
+
resolveAlias(config.aliases.lib, cwd),
|
|
133
|
+
resolveAlias(config.aliases.hooks, cwd)
|
|
134
|
+
];
|
|
135
|
+
for (const dir of dirs) {
|
|
136
|
+
await fs2.ensureDir(dir);
|
|
137
|
+
}
|
|
138
|
+
spinner.succeed("Created component directories");
|
|
139
|
+
const cssPath = path2.join(cwd, config.tailwind.css);
|
|
140
|
+
if (fs2.existsSync(cssPath)) {
|
|
141
|
+
spinner.start("Updating globals.css...");
|
|
142
|
+
let css = await fs2.readFile(cssPath, "utf-8");
|
|
143
|
+
const importsToAdd = [
|
|
144
|
+
'@import "canvas-ui-sdk/tailwind";',
|
|
145
|
+
'@import "canvas-ui-sdk/styles";'
|
|
146
|
+
];
|
|
147
|
+
let modified = false;
|
|
148
|
+
for (const imp of importsToAdd) {
|
|
149
|
+
if (!css.includes(imp)) {
|
|
150
|
+
const tailwindImport = '@import "tailwindcss"';
|
|
151
|
+
if (css.includes(tailwindImport)) {
|
|
152
|
+
const idx = css.indexOf(tailwindImport);
|
|
153
|
+
const lineEnd = css.indexOf("\n", idx);
|
|
154
|
+
css = css.slice(0, lineEnd + 1) + imp + "\n" + css.slice(lineEnd + 1);
|
|
155
|
+
} else {
|
|
156
|
+
css = imp + "\n" + css;
|
|
157
|
+
}
|
|
158
|
+
modified = true;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
const sourceDirective = '@source "./components";';
|
|
162
|
+
if (!css.includes(sourceDirective) && !css.includes("@source")) {
|
|
163
|
+
const lastImport = css.lastIndexOf("@import");
|
|
164
|
+
if (lastImport !== -1) {
|
|
165
|
+
const lineEnd = css.indexOf("\n", css.indexOf(";", lastImport));
|
|
166
|
+
css = css.slice(0, lineEnd + 1) + sourceDirective + "\n" + css.slice(lineEnd + 1);
|
|
167
|
+
} else {
|
|
168
|
+
css = sourceDirective + "\n" + css;
|
|
169
|
+
}
|
|
170
|
+
modified = true;
|
|
171
|
+
}
|
|
172
|
+
if (modified) {
|
|
173
|
+
await fs2.writeFile(cssPath, css);
|
|
174
|
+
spinner.succeed("Updated globals.css with Canvas UI imports");
|
|
175
|
+
} else {
|
|
176
|
+
spinner.succeed("globals.css already has Canvas UI imports");
|
|
177
|
+
}
|
|
178
|
+
} else {
|
|
179
|
+
spinner.info(
|
|
180
|
+
`globals.css not found at ${config.tailwind.css}. You'll need to add the imports manually.`
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
spinner.start("Copying lib/utils.ts...");
|
|
184
|
+
const utilsContent = `import { clsx, type ClassValue } from "clsx"
|
|
185
|
+
import { twMerge } from "tailwind-merge"
|
|
186
|
+
|
|
187
|
+
export function cn(...inputs: ClassValue[]) {
|
|
188
|
+
return twMerge(clsx(inputs))
|
|
189
|
+
}
|
|
190
|
+
`;
|
|
191
|
+
const utilsPath = path2.join(
|
|
192
|
+
resolveAlias(config.aliases.lib, cwd),
|
|
193
|
+
"utils.ts"
|
|
194
|
+
);
|
|
195
|
+
await fs2.writeFile(utilsPath, utilsContent);
|
|
196
|
+
spinner.succeed("Created lib/utils.ts");
|
|
197
|
+
console.log(
|
|
198
|
+
chalk.green("\n\u2713 Canvas UI SDK initialized successfully!\n")
|
|
199
|
+
);
|
|
200
|
+
console.log("Next steps:");
|
|
201
|
+
console.log(
|
|
202
|
+
` ${chalk.cyan("npx canvas-ui add button")} Add a component`
|
|
203
|
+
);
|
|
204
|
+
console.log(
|
|
205
|
+
` ${chalk.cyan("npx canvas-ui add dashboard-shell")} Add a layout shell`
|
|
206
|
+
);
|
|
207
|
+
console.log();
|
|
208
|
+
}
|
|
209
|
+
function resolveAlias(alias, cwd) {
|
|
210
|
+
const stripped = alias.replace(/^@\//, "").replace(/^~\//, "");
|
|
211
|
+
return path2.join(cwd, "src", stripped);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// cli/src/commands/add.ts
|
|
215
|
+
import fs4 from "fs-extra";
|
|
216
|
+
import path4 from "path";
|
|
217
|
+
import chalk2 from "chalk";
|
|
218
|
+
import ora2 from "ora";
|
|
219
|
+
|
|
220
|
+
// cli/src/utils/registry.ts
|
|
221
|
+
import fs3 from "fs-extra";
|
|
222
|
+
import path3 from "path";
|
|
223
|
+
function getRegistryDir() {
|
|
224
|
+
const candidates = [
|
|
225
|
+
path3.resolve(import.meta.dirname, "../../registry"),
|
|
226
|
+
path3.resolve(import.meta.dirname, "../../../registry"),
|
|
227
|
+
path3.resolve(process.cwd(), "node_modules/canvas-ui-sdk/registry")
|
|
228
|
+
];
|
|
229
|
+
for (const candidate of candidates) {
|
|
230
|
+
if (fs3.existsSync(path3.join(candidate, "index.json"))) {
|
|
231
|
+
return candidate;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
throw new Error(
|
|
235
|
+
"Could not find canvas-ui registry. Make sure canvas-ui-sdk is installed."
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
async function loadRegistryIndex() {
|
|
239
|
+
const registryDir = getRegistryDir();
|
|
240
|
+
const indexPath = path3.join(registryDir, "index.json");
|
|
241
|
+
return fs3.readJSON(indexPath);
|
|
242
|
+
}
|
|
243
|
+
async function loadRegistryItem(name) {
|
|
244
|
+
const registryDir = getRegistryDir();
|
|
245
|
+
for (const subdir of ["ui", "blocks", "layout", "hooks", "lib"]) {
|
|
246
|
+
const itemPath = path3.join(registryDir, subdir, `${name}.json`);
|
|
247
|
+
if (fs3.existsSync(itemPath)) {
|
|
248
|
+
return fs3.readJSON(itemPath);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
return null;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// cli/src/utils/resolver.ts
|
|
255
|
+
async function resolveAll(names) {
|
|
256
|
+
const resolved = /* @__PURE__ */ new Map();
|
|
257
|
+
const npmDeps = /* @__PURE__ */ new Set();
|
|
258
|
+
async function resolve(name) {
|
|
259
|
+
if (resolved.has(name)) return;
|
|
260
|
+
const item = await loadRegistryItem(name);
|
|
261
|
+
if (!item) {
|
|
262
|
+
console.warn(` Warning: component "${name}" not found in registry, skipping`);
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
resolved.set(name, item);
|
|
266
|
+
for (const dep of item.dependencies) {
|
|
267
|
+
npmDeps.add(dep);
|
|
268
|
+
}
|
|
269
|
+
for (const dep of item.registryDependencies) {
|
|
270
|
+
await resolve(dep);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
for (const name of names) {
|
|
274
|
+
await resolve(name);
|
|
275
|
+
}
|
|
276
|
+
if (!resolved.has("utils")) {
|
|
277
|
+
await resolve("utils");
|
|
278
|
+
}
|
|
279
|
+
return {
|
|
280
|
+
items: [...resolved.values()],
|
|
281
|
+
npmDeps: [...npmDeps]
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// cli/src/utils/transform.ts
|
|
286
|
+
var NPM_PACKAGE_REWRITES = {
|
|
287
|
+
"../../context/theme-context": {
|
|
288
|
+
pkg: "canvas-ui-sdk",
|
|
289
|
+
named: true
|
|
290
|
+
},
|
|
291
|
+
"../../lib/theme-defaults": {
|
|
292
|
+
pkg: "canvas-ui-sdk",
|
|
293
|
+
named: true
|
|
294
|
+
},
|
|
295
|
+
"../../lib/css-variable-sync": {
|
|
296
|
+
pkg: "canvas-ui-sdk",
|
|
297
|
+
named: true
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
function transformSource(content, filePath, config) {
|
|
301
|
+
let result = content;
|
|
302
|
+
for (const [from, to] of Object.entries(NPM_PACKAGE_REWRITES)) {
|
|
303
|
+
result = result.replace(
|
|
304
|
+
new RegExp(`from\\s+["']${escapeRegex(from)}["']`, "g"),
|
|
305
|
+
`from "${to.pkg}"`
|
|
306
|
+
);
|
|
307
|
+
}
|
|
308
|
+
result = result.replace(
|
|
309
|
+
/from\s+["']\.\.\/\.\.\/lib\/(\w+)["']/g,
|
|
310
|
+
`from "${config.aliases.lib}/$1"`
|
|
311
|
+
);
|
|
312
|
+
result = result.replace(
|
|
313
|
+
/from\s+["']\.\.\/\.\.\/hooks\/([\w-]+)["']/g,
|
|
314
|
+
`from "${config.aliases.hooks}/$1"`
|
|
315
|
+
);
|
|
316
|
+
result = result.replace(
|
|
317
|
+
/from\s+["']\.\.\/ui\/([\w-]+)["']/g,
|
|
318
|
+
`from "${config.aliases.ui}/$1"`
|
|
319
|
+
);
|
|
320
|
+
result = result.replace(
|
|
321
|
+
/from\s+["']\.\.\/blocks\/([\w-]+)["']/g,
|
|
322
|
+
`from "${config.aliases.components}/blocks/$1"`
|
|
323
|
+
);
|
|
324
|
+
if (filePath.startsWith("components/layout/")) {
|
|
325
|
+
result = result.replace(
|
|
326
|
+
/from\s+["']\.\/([\w-]+)["']/g,
|
|
327
|
+
`from "${config.aliases.components}/layout/$1"`
|
|
328
|
+
);
|
|
329
|
+
} else if (filePath.startsWith("components/blocks/marketing/")) {
|
|
330
|
+
result = result.replace(
|
|
331
|
+
/from\s+["']\.\/([\w-]+)["']/g,
|
|
332
|
+
`from "${config.aliases.components}/blocks/marketing/$1"`
|
|
333
|
+
);
|
|
334
|
+
} else if (filePath.startsWith("components/blocks/pricing/")) {
|
|
335
|
+
result = result.replace(
|
|
336
|
+
/from\s+["']\.\/([\w-]+)["']/g,
|
|
337
|
+
`from "${config.aliases.components}/blocks/pricing/$1"`
|
|
338
|
+
);
|
|
339
|
+
} else if (filePath.startsWith("components/blocks/")) {
|
|
340
|
+
result = result.replace(
|
|
341
|
+
/from\s+["']\.\/([\w-]+)["']/g,
|
|
342
|
+
`from "${config.aliases.components}/blocks/$1"`
|
|
343
|
+
);
|
|
344
|
+
}
|
|
345
|
+
return result;
|
|
346
|
+
}
|
|
347
|
+
function escapeRegex(str) {
|
|
348
|
+
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
// cli/src/commands/add.ts
|
|
352
|
+
var CONFIG_FILE2 = "canvas-ui.json";
|
|
353
|
+
async function add(componentNames) {
|
|
354
|
+
const cwd = process.cwd();
|
|
355
|
+
const configPath = path4.join(cwd, CONFIG_FILE2);
|
|
356
|
+
if (!fs4.existsSync(configPath)) {
|
|
357
|
+
console.log(
|
|
358
|
+
chalk2.red(
|
|
359
|
+
`No ${CONFIG_FILE2} found. Run ${chalk2.cyan("npx canvas-ui init")} first.`
|
|
360
|
+
)
|
|
361
|
+
);
|
|
362
|
+
process.exit(1);
|
|
363
|
+
}
|
|
364
|
+
const config = await fs4.readJSON(configPath);
|
|
365
|
+
if (componentNames.length === 0) {
|
|
366
|
+
console.log(chalk2.red("Please specify at least one component to add."));
|
|
367
|
+
console.log(`
|
|
368
|
+
Usage: ${chalk2.cyan("npx canvas-ui add <component> [component...]")}`);
|
|
369
|
+
console.log(`
|
|
370
|
+
Run ${chalk2.cyan("npx canvas-ui list")} to see available components.`);
|
|
371
|
+
process.exit(1);
|
|
372
|
+
}
|
|
373
|
+
const spinner = ora2("Loading registry...").start();
|
|
374
|
+
const index = await loadRegistryIndex();
|
|
375
|
+
const validNames = new Set(index.items.map((i) => i.name));
|
|
376
|
+
const invalid = componentNames.filter((n) => !validNames.has(n));
|
|
377
|
+
if (invalid.length > 0) {
|
|
378
|
+
spinner.fail(`Unknown components: ${invalid.join(", ")}`);
|
|
379
|
+
console.log(`
|
|
380
|
+
Run ${chalk2.cyan("npx canvas-ui list")} to see available components.`);
|
|
381
|
+
process.exit(1);
|
|
382
|
+
}
|
|
383
|
+
spinner.succeed("Registry loaded");
|
|
384
|
+
spinner.start("Resolving dependencies...");
|
|
385
|
+
const { items, npmDeps } = await resolveAll(componentNames);
|
|
386
|
+
spinner.succeed(
|
|
387
|
+
`Resolved ${items.length} components (${items.length - componentNames.length} dependencies)`
|
|
388
|
+
);
|
|
389
|
+
const existing = [];
|
|
390
|
+
const toWrite = [];
|
|
391
|
+
for (const item of items) {
|
|
392
|
+
for (const file of item.files) {
|
|
393
|
+
const targetPath = resolveFilePath(file.path, config, cwd);
|
|
394
|
+
if (fs4.existsSync(targetPath)) {
|
|
395
|
+
existing.push(file.path);
|
|
396
|
+
}
|
|
397
|
+
toWrite.push({ item, targetPath });
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
if (existing.length > 0) {
|
|
401
|
+
console.log(
|
|
402
|
+
chalk2.yellow(`
|
|
403
|
+
Files that already exist (will be overwritten):`)
|
|
404
|
+
);
|
|
405
|
+
for (const f of existing) {
|
|
406
|
+
console.log(chalk2.dim(` ${f}`));
|
|
407
|
+
}
|
|
408
|
+
console.log();
|
|
409
|
+
}
|
|
410
|
+
spinner.start("Writing component files...");
|
|
411
|
+
let filesWritten = 0;
|
|
412
|
+
for (const { item, targetPath } of toWrite) {
|
|
413
|
+
for (const file of item.files) {
|
|
414
|
+
const transformed = transformSource(file.content, file.path, config);
|
|
415
|
+
await fs4.ensureDir(path4.dirname(targetPath));
|
|
416
|
+
await fs4.writeFile(targetPath, transformed);
|
|
417
|
+
filesWritten++;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
spinner.succeed(`Wrote ${filesWritten} files`);
|
|
421
|
+
if (npmDeps.length > 0) {
|
|
422
|
+
const pkgJsonPath = path4.join(cwd, "package.json");
|
|
423
|
+
let installed = /* @__PURE__ */ new Set();
|
|
424
|
+
if (fs4.existsSync(pkgJsonPath)) {
|
|
425
|
+
const pkgJson = await fs4.readJSON(pkgJsonPath);
|
|
426
|
+
installed = /* @__PURE__ */ new Set([
|
|
427
|
+
...Object.keys(pkgJson.dependencies || {}),
|
|
428
|
+
...Object.keys(pkgJson.devDependencies || {})
|
|
429
|
+
]);
|
|
430
|
+
}
|
|
431
|
+
const toInstall = npmDeps.filter((dep) => !installed.has(dep));
|
|
432
|
+
if (toInstall.length > 0) {
|
|
433
|
+
spinner.start(`Installing ${toInstall.length} npm packages...`);
|
|
434
|
+
try {
|
|
435
|
+
await installPackages(toInstall, cwd);
|
|
436
|
+
spinner.succeed(`Installed: ${toInstall.join(", ")}`);
|
|
437
|
+
} catch (err) {
|
|
438
|
+
spinner.warn(
|
|
439
|
+
`Could not auto-install packages. Run manually:
|
|
440
|
+
npm install ${toInstall.join(" ")}`
|
|
441
|
+
);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
console.log(chalk2.green("\n\u2713 Components added successfully!\n"));
|
|
446
|
+
const requested = new Set(componentNames);
|
|
447
|
+
const deps = items.filter((i) => !requested.has(i.name));
|
|
448
|
+
for (const name of componentNames) {
|
|
449
|
+
const item = items.find((i) => i.name === name);
|
|
450
|
+
if (item) {
|
|
451
|
+
console.log(
|
|
452
|
+
` ${chalk2.green("+")} ${chalk2.bold(name)} ${chalk2.dim(`\u2192 ${item.files[0]?.path}`)}`
|
|
453
|
+
);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
if (deps.length > 0) {
|
|
457
|
+
console.log(chalk2.dim("\n Dependencies:"));
|
|
458
|
+
for (const dep of deps) {
|
|
459
|
+
console.log(
|
|
460
|
+
` ${chalk2.green("+")} ${dep.name} ${chalk2.dim(`\u2192 ${dep.files[0]?.path}`)}`
|
|
461
|
+
);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
console.log();
|
|
465
|
+
}
|
|
466
|
+
async function list() {
|
|
467
|
+
const spinner = ora2("Loading registry...").start();
|
|
468
|
+
const index = await loadRegistryIndex();
|
|
469
|
+
spinner.stop();
|
|
470
|
+
const byType = {};
|
|
471
|
+
for (const item of index.items) {
|
|
472
|
+
const type = item.type.replace("registry:", "");
|
|
473
|
+
if (!byType[type]) byType[type] = [];
|
|
474
|
+
byType[type].push(item);
|
|
475
|
+
}
|
|
476
|
+
const typeLabels = {
|
|
477
|
+
ui: "UI Primitives",
|
|
478
|
+
block: "Blocks",
|
|
479
|
+
layout: "Layout Shells",
|
|
480
|
+
hook: "Hooks",
|
|
481
|
+
lib: "Utilities"
|
|
482
|
+
};
|
|
483
|
+
for (const [type, items] of Object.entries(byType)) {
|
|
484
|
+
console.log(chalk2.bold(`
|
|
485
|
+
${typeLabels[type] || type} (${items.length})`));
|
|
486
|
+
for (const item of items) {
|
|
487
|
+
const desc = item.description ? chalk2.dim(` \u2014 ${item.description.slice(0, 60)}`) : "";
|
|
488
|
+
console.log(` ${chalk2.cyan(item.name)}${desc}`);
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
console.log();
|
|
492
|
+
}
|
|
493
|
+
function resolveFilePath(registryPath, config, cwd) {
|
|
494
|
+
const aliasPrefix = config.aliases.components.replace(/^@\//, "").replace(/^~\//, "");
|
|
495
|
+
const libPrefix = config.aliases.lib.replace(/^@\//, "").replace(/^~\//, "");
|
|
496
|
+
const hooksPrefix = config.aliases.hooks.replace(/^@\//, "").replace(/^~\//, "");
|
|
497
|
+
let resolved;
|
|
498
|
+
if (registryPath.startsWith("components/")) {
|
|
499
|
+
resolved = registryPath.replace("components/", `${aliasPrefix}/`);
|
|
500
|
+
} else if (registryPath.startsWith("lib/")) {
|
|
501
|
+
resolved = registryPath.replace("lib/", `${libPrefix}/`);
|
|
502
|
+
} else if (registryPath.startsWith("hooks/")) {
|
|
503
|
+
resolved = registryPath.replace("hooks/", `${hooksPrefix}/`);
|
|
504
|
+
} else {
|
|
505
|
+
resolved = registryPath;
|
|
506
|
+
}
|
|
507
|
+
return path4.join(cwd, "src", resolved);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
// cli/src/index.ts
|
|
511
|
+
var program = new Command();
|
|
512
|
+
program.name("canvas-ui").description("CLI for adding Canvas UI SDK components to your project").version("0.1.0");
|
|
513
|
+
program.command("init").description("Initialize Canvas UI SDK in your project").action(init);
|
|
514
|
+
program.command("add").description("Add components to your project").argument("<components...>", "Component names to add").action(add);
|
|
515
|
+
program.command("list").description("List all available components").action(list);
|
|
516
|
+
program.parse();
|
package/dist/index.d.ts
CHANGED
|
@@ -4704,16 +4704,80 @@ interface ThemeProviderProps {
|
|
|
4704
4704
|
*/
|
|
4705
4705
|
declare function ThemeProvider({ children, images, branding, brandAssets, }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
4706
4706
|
|
|
4707
|
-
|
|
4707
|
+
interface BrandingState {
|
|
4708
|
+
iconShape: IconShapeId$1;
|
|
4709
|
+
iconName: string;
|
|
4710
|
+
bgColor: string;
|
|
4711
|
+
iconColor: string;
|
|
4712
|
+
wordmark: string;
|
|
4713
|
+
}
|
|
4714
|
+
interface ThemeState {
|
|
4715
|
+
variables: Record<string, string>;
|
|
4716
|
+
overrides: Record<string, string>;
|
|
4717
|
+
isDirty: boolean;
|
|
4718
|
+
unsavedChangesCount: number;
|
|
4719
|
+
setVariable: (name: string, value: string) => void;
|
|
4720
|
+
resetCategory: (prefix: string) => void;
|
|
4721
|
+
resetAll: () => void;
|
|
4722
|
+
exportCSS: () => string;
|
|
4723
|
+
exportJSON: () => string;
|
|
4724
|
+
importJSON: (json: string) => boolean;
|
|
4725
|
+
branding: BrandingState;
|
|
4726
|
+
setBranding: (updates: Partial<BrandingState>) => void;
|
|
4727
|
+
images: Record<ImageKey, string>;
|
|
4728
|
+
setImage: (key: ImageKey, url: string) => void;
|
|
4729
|
+
deleteImage: (key: ImageKey) => void;
|
|
4730
|
+
customButtonStyles: CustomButtonStyle[];
|
|
4731
|
+
addCustomButtonStyle: () => void;
|
|
4732
|
+
updateCustomButtonStyle: (id: string, updates: Partial<CustomButtonStyle>) => void;
|
|
4733
|
+
deleteCustomButtonStyle: (id: string) => void;
|
|
4734
|
+
brandHue: number;
|
|
4735
|
+
brandVibrancy: number;
|
|
4736
|
+
syncRelatedColors: boolean;
|
|
4737
|
+
setBrandHue: (hue: number) => void;
|
|
4738
|
+
setBrandVibrancy: (vibrancy: number) => void;
|
|
4739
|
+
setSyncRelatedColors: (sync: boolean) => void;
|
|
4740
|
+
applyBrandHueVibrancy: (hue: number, vibrancy: number, skipPrimary?: boolean) => void;
|
|
4741
|
+
}
|
|
4742
|
+
|
|
4743
|
+
type PanelId = "colors" | "images" | "typography" | "buttons" | "inputs" | "export";
|
|
4708
4744
|
interface ThemeDrawerProps {
|
|
4709
4745
|
devOnly?: boolean;
|
|
4710
4746
|
triggerPosition?: "bottom-right" | "bottom-left";
|
|
4711
4747
|
defaultOpen?: boolean;
|
|
4712
4748
|
panels?: PanelId[];
|
|
4713
4749
|
onThemeChange?: (overrides: Record<string, string>) => void;
|
|
4750
|
+
onBrandingChange?: (branding: BrandingState) => void;
|
|
4751
|
+
onImagesChange?: (images: Record<ImageKey, string>) => void;
|
|
4752
|
+
onImageUpload?: (key: ImageKey, file: File) => Promise<string>;
|
|
4714
4753
|
initialOverrides?: Record<string, string>;
|
|
4715
4754
|
storageKey?: string;
|
|
4755
|
+
title?: string;
|
|
4756
|
+
width?: number;
|
|
4757
|
+
}
|
|
4758
|
+
declare function ThemeDrawer({ devOnly, triggerPosition, defaultOpen, panels: enabledPanels, onThemeChange, onBrandingChange, onImagesChange, onImageUpload, initialOverrides, storageKey, title, width, }: ThemeDrawerProps): react_jsx_runtime.JSX.Element | null;
|
|
4759
|
+
|
|
4760
|
+
interface HslColorPickerProps {
|
|
4761
|
+
value: string;
|
|
4762
|
+
onChange: (hex: string) => void;
|
|
4763
|
+
}
|
|
4764
|
+
declare function HslColorPicker({ value, onChange }: HslColorPickerProps): react_jsx_runtime.JSX.Element;
|
|
4765
|
+
|
|
4766
|
+
interface VariableOption {
|
|
4767
|
+
value: string;
|
|
4768
|
+
label: string;
|
|
4716
4769
|
}
|
|
4717
|
-
|
|
4770
|
+
interface ColorInputRowProps {
|
|
4771
|
+
label: string;
|
|
4772
|
+
value: string;
|
|
4773
|
+
onChange: (value: string) => void;
|
|
4774
|
+
variableOptions?: VariableOption[];
|
|
4775
|
+
}
|
|
4776
|
+
/**
|
|
4777
|
+
* Reusable color row: swatch (opens HSL picker) + label + hex input.
|
|
4778
|
+
* When variableOptions is provided, shows a dropdown for CSS variable references
|
|
4779
|
+
* with a "Custom Color" option that enables the HSL picker.
|
|
4780
|
+
*/
|
|
4781
|
+
declare function ColorInputRow({ label, value, onChange, variableOptions, }: ColorInputRowProps): react_jsx_runtime.JSX.Element;
|
|
4718
4782
|
|
|
4719
|
-
export { AccountSettingsShell, type AccountTab, ActivityFeed, Avatar, AvatarFallback, AvatarImage, BadgesCard, BlogCards, BottomInputChatWidget, type BrandAsset, Button, Calendar, CanvasItem, CategoryGrid, CenteredHero, ChatBubble, type ChatBubbleMessage, ChatDateSeparator, ChatInput, ChatMessageList, Checkbox, CheckboxWithLabel, CircularProgressBar, CircularProgressBarList, type CircularProgressBarListProps, type CircularProgressBarProps, ComponentPalette, ComponentSearch, ContentDropzone, ContentWithImage, CoreValuesGrid, CreditCardDisplay, CtaBanner, type CustomButtonStyle, CustomComponentHelper, DashboardShell, DateInput, DescriptionCard, DestinationCards, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DoubleSidebar, type DoubleSidebarSection, DoubleSidebarShell, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, FaqAccordion, FaqsTable, FeatureWithImage, FeaturedNewsCards, FeaturedPlaces, FeaturesComparison, FileUploader, type FilterCheckboxGroupConfig, type FilterDateRangeConfig, type FilterDropdownConfig, type FilterOption$c as FilterOption, FilterPopover, type FilterState, FixedColumnDataTable, FlairBanner, FooterNavbar, FormGroup, GallerySection, GradientBanner, GridTilesList, Header, HeroDarkCentered, HeroDarkWithImage, HeroFullwidthImage, HeroSection, HowItWorks, type IconNavItemConfig, type IconShapeId, IconSidebar, IconSidebarShell, ImageFeedWithNestedComments, type ImageKey, ImageUploader, InfoCard, type InfoCardProps, Input, Label, LargeImageLabelsList, Sidebar as LayoutSidebar, type LineTab, LineTabs, type LinkItem, LinksCard, type LinksCardProps, Loader, LoginBrandingPanel, MenuSection, type MenufocusItem, MenufocusTemplate, type MenufocusTemplateProps, MessengerInput, MessengerSidebar, MetricsSection, MobileBottomNav, MobileMenuShell, type MobileNavTabConfig, MonthlyCalendarWidget, MultiselectCheckboxField, MultiselectTags, MultistepProgressBarShell, type MultistepProgressBarShellProps, type MultistepProgressBarStep, MultistepShell, MultistepSidebarShell, type NavItem, type NavSection, type NavTab, NestedCommentsTable, NestedDataTable, OfficeLocations, PageHeaderSection, Pagination, ParticipantList, type Persona, PersonaCard, PersonaGrid, PillTabs, type PillTabsProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortfolioCard, PreviewBrandingContext, PricingCards, PricingCta, ProfileCard, ProfileGridTilesList, ProfileImageUploader, ProgressBar, type ProjectContext, ProjectContextShell, type ProjectContextTab, PromptChipsRow, PromptTemplate, RadioGroup, RadioGroupItem, RangeInput, ReviewsGrid, ReviewsTable, type Screen, type ScreenConnection, ScreenFlowchart, ScreenPromptBuilder, ScreenPromptTemplate, type ScreenStatus, type ScreenType, ScrollArea, ScrollBar, SearchBar, SearchBarShell, SearchSidebar, Searchbox, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectablePills, Separator, SettingsListRow, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar$1 as Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarNav, SidebarProfileCard, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, SkillsCard, Slider, SlideshowGridTiles, SocialFeed, SocialProof, type SortOption$b as SortOption, StandardDataTable, StandardListWithImage, StandardPageShell, StatsCard, type Step, StepTracker, Switch, type TableColumn, type TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TeamCardsGrid, TeamCircularGrid, TestimonialCarousel, TextInput, Textarea, type ThemeBranding, ThemeContext, ThemeDrawer, type ThemeImages, ThemeProvider, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Typography, UpvotingPostsTable, VerticalHowItWorks, VerticalMultistepShell, VerticalStepTracker, VideoChatControls, VideoContentSection, VideoPlaylistCard, VideoPlaylistItem, WebcamPreview, YouTubePlayer, accountTabs, allColorVariables, blocks, broadcastCSSVariables, buttonVariants, canvasBlocks, cn, colorVariables, defaultBranding, defaultButtonColorStyles, defaultButtonColors, defaultButtonSizes, defaultColors, defaultCustomButtonStyles, defaultDoubleSidebarSections, defaultIconNavItems, defaultImages, defaultInputSizes, defaultProgressBarSteps, defaultSteps, defaultSupportLinks, defaultTypography, defaultVerticalSteps, getChildScreens, getScreenUrl, getTopLevelScreens, groupModalDrawerBlocks, layoutPrimitives, layoutShells, marketingBlocks, pageTemplates, pricingBlocks, removeCSSVariables, setCSSVariable, setCSSVariables, setupCSSVariableListener, useCSSVariableSync, useIsMobile, usePreviewBranding, useSidebar, useThemeBrandAssets, useThemeBranding, useThemeImages, videoBlocks };
|
|
4783
|
+
export { AccountSettingsShell, type AccountTab, ActivityFeed, Avatar, AvatarFallback, AvatarImage, BadgesCard, BlogCards, BottomInputChatWidget, type BrandAsset, type BrandingState, Button, Calendar, CanvasItem, CategoryGrid, CenteredHero, ChatBubble, type ChatBubbleMessage, ChatDateSeparator, ChatInput, ChatMessageList, Checkbox, CheckboxWithLabel, CircularProgressBar, CircularProgressBarList, type CircularProgressBarListProps, type CircularProgressBarProps, ColorInputRow, ComponentPalette, ComponentSearch, ContentDropzone, ContentWithImage, CoreValuesGrid, CreditCardDisplay, CtaBanner, type CustomButtonStyle, CustomComponentHelper, DashboardShell, DateInput, DescriptionCard, DestinationCards, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DoubleSidebar, type DoubleSidebarSection, DoubleSidebarShell, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, FaqAccordion, FaqsTable, FeatureWithImage, FeaturedNewsCards, FeaturedPlaces, FeaturesComparison, FileUploader, type FilterCheckboxGroupConfig, type FilterDateRangeConfig, type FilterDropdownConfig, type FilterOption$c as FilterOption, FilterPopover, type FilterState, FixedColumnDataTable, FlairBanner, FooterNavbar, FormGroup, GallerySection, GradientBanner, GridTilesList, Header, HeroDarkCentered, HeroDarkWithImage, HeroFullwidthImage, HeroSection, HowItWorks, HslColorPicker, type IconNavItemConfig, type IconShapeId, IconSidebar, IconSidebarShell, ImageFeedWithNestedComments, type ImageKey, ImageUploader, InfoCard, type InfoCardProps, Input, Label, LargeImageLabelsList, Sidebar as LayoutSidebar, type LineTab, LineTabs, type LinkItem, LinksCard, type LinksCardProps, Loader, LoginBrandingPanel, MenuSection, type MenufocusItem, MenufocusTemplate, type MenufocusTemplateProps, MessengerInput, MessengerSidebar, MetricsSection, MobileBottomNav, MobileMenuShell, type MobileNavTabConfig, MonthlyCalendarWidget, MultiselectCheckboxField, MultiselectTags, MultistepProgressBarShell, type MultistepProgressBarShellProps, type MultistepProgressBarStep, MultistepShell, MultistepSidebarShell, type NavItem, type NavSection, type NavTab, NestedCommentsTable, NestedDataTable, OfficeLocations, PageHeaderSection, Pagination, ParticipantList, type Persona, PersonaCard, PersonaGrid, PillTabs, type PillTabsProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortfolioCard, PreviewBrandingContext, PricingCards, PricingCta, ProfileCard, ProfileGridTilesList, ProfileImageUploader, ProgressBar, type ProjectContext, ProjectContextShell, type ProjectContextTab, PromptChipsRow, PromptTemplate, RadioGroup, RadioGroupItem, RangeInput, ReviewsGrid, ReviewsTable, type Screen, type ScreenConnection, ScreenFlowchart, ScreenPromptBuilder, ScreenPromptTemplate, type ScreenStatus, type ScreenType, ScrollArea, ScrollBar, SearchBar, SearchBarShell, SearchSidebar, Searchbox, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectablePills, Separator, SettingsListRow, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar$1 as Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarNav, SidebarProfileCard, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, SkillsCard, Slider, SlideshowGridTiles, SocialFeed, SocialProof, type SortOption$b as SortOption, StandardDataTable, StandardListWithImage, StandardPageShell, StatsCard, type Step, StepTracker, Switch, type TableColumn, type TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TeamCardsGrid, TeamCircularGrid, TestimonialCarousel, TextInput, Textarea, type ThemeBranding, ThemeContext, ThemeDrawer, type ThemeImages, ThemeProvider, type ThemeState, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Typography, UpvotingPostsTable, type VariableOption, VerticalHowItWorks, VerticalMultistepShell, VerticalStepTracker, VideoChatControls, VideoContentSection, VideoPlaylistCard, VideoPlaylistItem, WebcamPreview, YouTubePlayer, accountTabs, allColorVariables, blocks, broadcastCSSVariables, buttonVariants, canvasBlocks, cn, colorVariables, defaultBranding, defaultButtonColorStyles, defaultButtonColors, defaultButtonSizes, defaultColors, defaultCustomButtonStyles, defaultDoubleSidebarSections, defaultIconNavItems, defaultImages, defaultInputSizes, defaultProgressBarSteps, defaultSteps, defaultSupportLinks, defaultTypography, defaultVerticalSteps, getChildScreens, getScreenUrl, getTopLevelScreens, groupModalDrawerBlocks, layoutPrimitives, layoutShells, marketingBlocks, pageTemplates, pricingBlocks, removeCSSVariables, setCSSVariable, setCSSVariables, setupCSSVariableListener, useCSSVariableSync, useIsMobile, usePreviewBranding, useSidebar, useThemeBrandAssets, useThemeBranding, useThemeImages, videoBlocks };
|