@catalystsoftware/ui 1.0.15 → 1.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -1
- package/dist/components/catalyst-ui/data/chat-data.tsx +336 -0
- package/dist/components/catalyst-ui/data/code-data.tsx +1 -74
- package/dist/components/catalyst-ui/data/core-data.tsx +679 -7
- package/dist/components/catalyst-ui/data/crm-data.tsx +2 -2
- package/dist/components/catalyst-ui/data/forms-data.tsx +5 -5
- package/dist/components/catalyst-ui/data/media-data.tsx +66 -3
- package/dist/components/catalyst-ui/data/overlay-data.tsx +5 -3
- package/dist/components/catalyst-ui/data/primitive-data.tsx +18 -128
- package/dist/components/catalyst-ui/data/sidebars-data.tsx +38 -38
- package/dist/components/catalyst-ui/data/tools-data.tsx +1 -1
- package/dist/components/catalyst-ui/data/utils-data.tsx +27 -9
- package/dist/components/catalyst-ui/marketing/sections/header.tsx +1 -0
- package/dist/components/catalyst-ui/overlays/sidebar-props.tsx +1 -1
- package/dist/components/catalyst-ui/primitives/alert.tsx +1 -1
- package/dist/components/catalyst-ui/tools/md-badge-builder.tsx +1 -1
- package/dist/components/catalyst-ui/tools/monaco-sidebar.tsx +935 -331
- package/dist/components/catalyst-ui/tools/monaco.tsx +66 -66
- package/dist/components/catalyst-ui/tools/snippets.tsx +844 -0
- package/dist/data/tailwind.config.js +1 -1
- package/dist/data/tailwind.config.ngin.ts +1 -1
- package/dist/index.js +45 -3
- package/package.json +2 -1
|
@@ -20,7 +20,7 @@ const SELECTED_PRESET = 'MODERN'
|
|
|
20
20
|
// Serif: Merriweather | Playfair Display | Lora | Source Serif 4 | Libre Baskerville | Space Grotesk | PT Serif | Fraunces | Cormorant Garamond | Crimson Pro | EB Garamond | Newsreader | DM Serif Display | Prata | Bodoni Moda | Young Serif
|
|
21
21
|
// Mono: JetBrains Mono | Fira Code | Geist Mono | IBM Plex Mono | Roboto Mono | Space Mono | Source Code Pro | Ubuntu Mono | Red Hat Mono | Nanum Gothic Coding | Cutive Mono
|
|
22
22
|
// Sand-Serif ( display & experimental ): Sora | Bricolage Grotesque | Clash Display | Syne | Unbounded | Cabinet Grotesk | Righteous | Lexend | Kanit
|
|
23
|
-
const SELECTED_FONT = '
|
|
23
|
+
const SELECTED_FONT = 'Fira Code'
|
|
24
24
|
|
|
25
25
|
// ==================================================================== THEME ============================================================================
|
|
26
26
|
// Themes: marshmallow | art-deco | vs-code | spotify | summer | material-design | marvel | valorant | ghibli-studio | modern-minimal | nature | elegant-luxury | neo-brutalism | pastel-dreams | clean-slate | midnight-bloom | sunset-horizon | claude | caffeine | corporate | slack | perplexity | neutral | red | rose | orange | green | blue | yellow | violet | amber | lime | emerald | fuchsia | cyan | indigo | lime | darkBlue
|
|
@@ -20,7 +20,7 @@ const SELECTED_PRESET = 'MODERN'
|
|
|
20
20
|
// Serif: Merriweather | Playfair Display | Lora | Source Serif 4 | Libre Baskerville | Space Grotesk | PT Serif | Fraunces | Cormorant Garamond | Crimson Pro | EB Garamond | Newsreader | DM Serif Display | Prata | Bodoni Moda | Young Serif
|
|
21
21
|
// Mono: JetBrains Mono | Fira Code | Geist Mono | IBM Plex Mono | Roboto Mono | Space Mono | Source Code Pro | Ubuntu Mono | Red Hat Mono | Nanum Gothic Coding | Cutive Mono
|
|
22
22
|
// Sand-Serif ( display & experimental ): Sora | Bricolage Grotesque | Clash Display | Syne | Unbounded | Cabinet Grotesk | Righteous | Lexend | Kanit
|
|
23
|
-
const SELECTED_FONT = '
|
|
23
|
+
const SELECTED_FONT = 'Fira Code'
|
|
24
24
|
|
|
25
25
|
// ==================================================================== THEME ============================================================================
|
|
26
26
|
// Themes: marshmallow | art-deco | vs-code | spotify | summer | material-design | marvel | valorant | ghibli-studio | modern-minimal | nature | elegant-luxury | neo-brutalism | pastel-dreams | clean-slate | midnight-bloom | sunset-horizon | claude | caffeine | corporate | slack | perplexity | neutral | red | rose | orange | green | blue | yellow | violet | amber | lime | emerald | fuchsia | cyan | indigo | lime | darkBlue
|
package/dist/index.js
CHANGED
|
@@ -200595,7 +200595,7 @@ var DEFAULT_CONFIG = {
|
|
|
200595
200595
|
components: "app/"
|
|
200596
200596
|
};
|
|
200597
200597
|
async function loadConfig() {
|
|
200598
|
-
const configPath = path2.join(process.cwd(), "
|
|
200598
|
+
const configPath = path2.join(process.cwd(), "config.catalyst");
|
|
200599
200599
|
try {
|
|
200600
200600
|
await fs.access(configPath);
|
|
200601
200601
|
const content = await fs.readFile(configPath, "utf-8");
|
|
@@ -200607,7 +200607,7 @@ async function loadConfig() {
|
|
|
200607
200607
|
}
|
|
200608
200608
|
}
|
|
200609
200609
|
async function createConfig() {
|
|
200610
|
-
const configPath = path2.join(process.cwd(), "
|
|
200610
|
+
const configPath = path2.join(process.cwd(), "config.catalyst");
|
|
200611
200611
|
const configContent = `
|
|
200612
200612
|
{
|
|
200613
200613
|
"theme": "blue",
|
|
@@ -200623,7 +200623,7 @@ async function createConfig() {
|
|
|
200623
200623
|
"components": "app/"
|
|
200624
200624
|
}`;
|
|
200625
200625
|
await fs.writeFile(configPath, configContent, "utf-8");
|
|
200626
|
-
console.log(source_default.green("\u2713 Created
|
|
200626
|
+
console.log(source_default.green("\u2713 Created config.catalyst"));
|
|
200627
200627
|
}
|
|
200628
200628
|
var API_URL = "https://catalyst-software.vercel.app/Catalyst/UI/code/verify/premium";
|
|
200629
200629
|
var API_TIMEOUT = 5000;
|
|
@@ -200695,6 +200695,7 @@ async function showPremiumMenu() {
|
|
|
200695
200695
|
{ name: `${source_default.bold("Configure Only")} ${source_default.gray("\u2192 Tailwind + PostCSS setup")}`, value: "configure-tailwind-postcss" },
|
|
200696
200696
|
{ name: `${source_default.bold("Configure with Ngin")} ${source_default.gray("\u2192 Tailwind + PostCSS + Ngin preset")}`, value: "configure-ngin" },
|
|
200697
200697
|
{ name: `${source_default.bold("Create Config")} ${source_default.gray("\u2192 Configure installation options with pre-configured config file")}`, value: "create-config" },
|
|
200698
|
+
{ name: `${source_default.bold("Configure Import Call")} ${source_default.gray("\u2192 Allows the use of #catalyst & #icons")}`, value: "import-call" },
|
|
200698
200699
|
{ name: `${source_default.red("\u2717 Exit")}`, value: "exit" }
|
|
200699
200700
|
];
|
|
200700
200701
|
const notToggled = "\u25C7";
|
|
@@ -200725,6 +200726,7 @@ async function showFreeMenu() {
|
|
|
200725
200726
|
{ name: `${source_default.bold("Configure Only")} ${source_default.gray("\u2192 Tailwind + PostCSS setup")}`, value: "configure-tailwind-postcss" },
|
|
200726
200727
|
{ name: `${source_default.bold("Configure with Ngin")} ${source_default.gray("\u2192 Tailwind + PostCSS + Ngin preset")}`, value: "configure-ngin" },
|
|
200727
200728
|
{ name: `${source_default.bold("Create Config")} ${source_default.gray("\u2192 Configure installation options with pre-configured config file")}`, value: "create-config" },
|
|
200729
|
+
{ name: `${source_default.bold("Configure Import Call")} ${source_default.gray("\u2192 Allows the use of #catalyst & #icons")}`, value: "import-call" },
|
|
200728
200730
|
{ name: `${source_default.red("\u2717 Exit")}`, value: "exit" }
|
|
200729
200731
|
];
|
|
200730
200732
|
const notToggled = "\u25C7";
|
|
@@ -200801,6 +200803,7 @@ async function installAllComponents(includePremium, config) {
|
|
|
200801
200803
|
}
|
|
200802
200804
|
spinner.succeed(source_default.green(`Installed ${installed} components`));
|
|
200803
200805
|
await createIndexFiles();
|
|
200806
|
+
await configureProjectPaths();
|
|
200804
200807
|
}
|
|
200805
200808
|
async function createIndexFiles() {
|
|
200806
200809
|
const spinner = ora2({ frames: ["\u28F7", "\u28EF", "\u28DF", "\u287F", "\u28BF", "\u28FB", "\u28FD", "\u28FE"], suffixText: "Creating index files..." }).start();
|
|
@@ -201029,6 +201032,42 @@ async function selectComponentsInteractive(includePremium) {
|
|
|
201029
201032
|
await createIndexFiles();
|
|
201030
201033
|
spinner.succeed(source_default.green(`Installed ${selectedComponents.length} components`));
|
|
201031
201034
|
}
|
|
201035
|
+
async function configureProjectPaths() {
|
|
201036
|
+
const spinner = ora2("Configuring project paths...").start();
|
|
201037
|
+
const pathsToAdd = {
|
|
201038
|
+
"#catalyst/*": "./app/components/catalyst-ui/*",
|
|
201039
|
+
"#icons": "@catalystsoftware/icons",
|
|
201040
|
+
"#utils/*": "./app/components/catalyst-ui/utils/*",
|
|
201041
|
+
"#prisma": "./app/components/catalyst-ui/utils/prisma.ts",
|
|
201042
|
+
"#auth": "./app/components/catalyst-ui/utils/auth.ts",
|
|
201043
|
+
"#auth_session": "./app/components/catalyst-ui/utils/auth_session.ts",
|
|
201044
|
+
"#access": "./app/components/catalyst-ui/utils/user-based-access-rules.tsx",
|
|
201045
|
+
"#blocks": "./app/components/catalyst-ui/blocks/index.ts",
|
|
201046
|
+
"#hooks": "./app/components/catalyst-ui/hooks/index.ts"
|
|
201047
|
+
};
|
|
201048
|
+
try {
|
|
201049
|
+
const pkgPath = path2.join(process.cwd(), "package.json");
|
|
201050
|
+
const pkg = JSON.parse(await fs.readFile(pkgPath, "utf-8"));
|
|
201051
|
+
pkg.imports = { ...pkg.imports, ...pathsToAdd };
|
|
201052
|
+
await fs.writeFile(pkgPath, JSON.stringify(pkg, null, 2));
|
|
201053
|
+
const tsPath = path2.join(process.cwd(), "tsconfig.json");
|
|
201054
|
+
const tsConfigText = await fs.readFile(tsPath, "utf-8");
|
|
201055
|
+
const tsConfig = JSON.parse(tsConfigText);
|
|
201056
|
+
if (!tsConfig.compilerOptions)
|
|
201057
|
+
tsConfig.compilerOptions = {};
|
|
201058
|
+
if (!tsConfig.compilerOptions.paths)
|
|
201059
|
+
tsConfig.compilerOptions.paths = {};
|
|
201060
|
+
Object.entries(pathsToAdd).forEach(([key, val]) => {
|
|
201061
|
+
const tsVal = key === "#icons" ? ["node_modules/@catalystsoftware/icons"] : [val];
|
|
201062
|
+
tsConfig.compilerOptions.paths[key] = tsVal;
|
|
201063
|
+
});
|
|
201064
|
+
await fs.writeFile(tsPath, JSON.stringify(tsConfig, null, 2));
|
|
201065
|
+
spinner.succeed(source_default.green("Project paths configured successfully"));
|
|
201066
|
+
} catch (error) {
|
|
201067
|
+
spinner.fail(source_default.red("Failed to configure project paths"));
|
|
201068
|
+
console.error(error);
|
|
201069
|
+
}
|
|
201070
|
+
}
|
|
201032
201071
|
async function handleAction(action, isPremium) {
|
|
201033
201072
|
let spinner;
|
|
201034
201073
|
try {
|
|
@@ -201084,6 +201123,9 @@ async function handleAction(action, isPremium) {
|
|
|
201084
201123
|
case "select-all-components":
|
|
201085
201124
|
await selectComponentsInteractive(true);
|
|
201086
201125
|
break;
|
|
201126
|
+
case "import-call":
|
|
201127
|
+
await configureProjectPaths();
|
|
201128
|
+
break;
|
|
201087
201129
|
case "exit":
|
|
201088
201130
|
console.log(source_default.cyan(`
|
|
201089
201131
|
Goodbye!`));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@catalystsoftware/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.17",
|
|
4
4
|
"description": "Catalyst UI Component Library CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"ora": "^7.0.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
+
"@types/bun": "^1.3.6",
|
|
42
43
|
"@types/inquirer": "^9.0.7",
|
|
43
44
|
"@types/node": "^20.10.5",
|
|
44
45
|
"esbuild": "^0.19.10",
|