cronus-ui 0.6.10 → 0.6.12
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 +2 -2
- package/dist/compose/gold-path.d.ts +1 -1
- package/dist/compose/gold-path.js +16 -11
- package/dist/config.d.ts +2 -2
- package/dist/config.js +1 -1
- package/package.json +2 -2
- package/templates/apps/admin.json +2 -2
- package/templates/apps/saas.json +2 -2
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ Notes that match the commander surface:
|
|
|
49
49
|
`packages/cli/scripts/build-registry.ts` — each item carries its source, its npm
|
|
50
50
|
`dependencies`, and its `registryDependencies` (other components it imports),
|
|
51
51
|
derived by parsing imports.
|
|
52
|
-
- The default registry is pinned to the CLI package version (`v0.6.
|
|
52
|
+
- The default registry is pinned to the CLI package version (`v0.6.12` here), not
|
|
53
53
|
mutable `main`, so a published CLI reads the registry snapshot it was released
|
|
54
54
|
with. Use `-r, --registry ./registry` when testing local registry changes before
|
|
55
55
|
a release tag exists.
|
|
@@ -80,7 +80,7 @@ Notes that match the commander surface:
|
|
|
80
80
|
"lib": "lib",
|
|
81
81
|
"blocks": "components/blocks"
|
|
82
82
|
},
|
|
83
|
-
"registry": "https://raw.githubusercontent.com/pedrogbraz/cronus-ui/v0.6.
|
|
83
|
+
"registry": "https://raw.githubusercontent.com/pedrogbraz/cronus-ui/v0.6.12/registry"
|
|
84
84
|
}
|
|
85
85
|
```
|
|
86
86
|
|
|
@@ -35,7 +35,7 @@ export declare function goldPathLayout(config: CronusUIConfig): GoldPathLayout;
|
|
|
35
35
|
* anchors are missing and nothing else can be patched.
|
|
36
36
|
*/
|
|
37
37
|
export declare function patchChromeSource(source: string, workspaceImport: string, inviteImport: string, sessionImport?: string): string | undefined;
|
|
38
|
-
/** Insert ItemsPanel
|
|
38
|
+
/** Insert ItemsPanel and drop catalog dashboard/stats from a generated home. */
|
|
39
39
|
export declare function patchHomePageSource(source: string, itemsImport: string): string | undefined;
|
|
40
40
|
/**
|
|
41
41
|
* Replace the catalog TeamBlock on a generated /team page with MembersPanel.
|
|
@@ -1115,25 +1115,30 @@ const nextConfig = {
|
|
|
1115
1115
|
export default nextConfig;
|
|
1116
1116
|
`;
|
|
1117
1117
|
}
|
|
1118
|
-
/**
|
|
1118
|
+
/**
|
|
1119
|
+
* Catalog demo surfaces that compose stacks on `/` for saas/admin. Gold path
|
|
1120
|
+
* keeps the files installed but the live home is ItemsPanel only.
|
|
1121
|
+
*/
|
|
1122
|
+
const CATALOG_HOME_BLOCKS = [
|
|
1123
|
+
"DashboardAnalyticsBlock",
|
|
1124
|
+
"DashboardAdminOverviewBlock",
|
|
1125
|
+
"StatsBlock",
|
|
1126
|
+
"DashboardBlock",
|
|
1127
|
+
];
|
|
1128
|
+
/** Insert ItemsPanel and drop catalog dashboard/stats from a generated home. */
|
|
1119
1129
|
export function patchHomePageSource(source, itemsImport) {
|
|
1120
1130
|
if (!/<main\b/.test(source))
|
|
1121
1131
|
return undefined;
|
|
1122
1132
|
let out = source;
|
|
1123
|
-
|
|
1124
|
-
if (!out.includes(importLine)) {
|
|
1125
|
-
const match = out.match(/^import .+$/m);
|
|
1126
|
-
if (match?.index !== undefined) {
|
|
1127
|
-
out = `${out.slice(0, match.index)}${importLine}\n${out.slice(match.index)}`;
|
|
1128
|
-
}
|
|
1129
|
-
else {
|
|
1130
|
-
out = `${importLine}\n${out}`;
|
|
1131
|
-
}
|
|
1132
|
-
}
|
|
1133
|
+
out = insertImport(out, `import { ItemsPanel } from ${JSON.stringify(itemsImport)};`);
|
|
1133
1134
|
out = out.replace(/export default(?! async) function/, "export default async function");
|
|
1134
1135
|
if (!/<ItemsPanel\s*\/>/.test(out)) {
|
|
1135
1136
|
out = out.replace(/(<main\b[^>]*>)/, "$1\n <ItemsPanel />");
|
|
1136
1137
|
}
|
|
1138
|
+
for (const name of CATALOG_HOME_BLOCKS) {
|
|
1139
|
+
out = out.replace(new RegExp(`\\n\\s*<${name}\\s*/>`, "g"), "");
|
|
1140
|
+
out = out.replace(new RegExp(`import \\{ ${name} \\} from "[^"]+";\\n`), "");
|
|
1141
|
+
}
|
|
1137
1142
|
return out;
|
|
1138
1143
|
}
|
|
1139
1144
|
/**
|
package/dist/config.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const CONFIG_FILE = "cronus-ui.json";
|
|
2
|
-
export declare const CLI_VERSION = "0.6.
|
|
3
|
-
export declare const DEFAULT_REGISTRY = "https://raw.githubusercontent.com/pedrogbraz/cronus-ui/v0.6.
|
|
2
|
+
export declare const CLI_VERSION = "0.6.12";
|
|
3
|
+
export declare const DEFAULT_REGISTRY = "https://raw.githubusercontent.com/pedrogbraz/cronus-ui/v0.6.12/registry";
|
|
4
4
|
/** Manifest entry `add`/`upgrade` record per installed registry item. */
|
|
5
5
|
export interface InstalledRecord {
|
|
6
6
|
/** Registry release the files came from (git tag without the leading "v"). */
|
package/dist/config.js
CHANGED
|
@@ -2,7 +2,7 @@ import { existsSync } from "node:fs";
|
|
|
2
2
|
import { readFile, writeFile } from "node:fs/promises";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
export const CONFIG_FILE = "cronus-ui.json";
|
|
5
|
-
export const CLI_VERSION = "0.6.
|
|
5
|
+
export const CLI_VERSION = "0.6.12";
|
|
6
6
|
export const DEFAULT_REGISTRY = `https://raw.githubusercontent.com/pedrogbraz/cronus-ui/v${CLI_VERSION}/registry`;
|
|
7
7
|
export const DEFAULT_CONFIG = {
|
|
8
8
|
aliases: { ui: "@/components/ui", lib: "@/lib", blocks: "@/components/blocks" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cronus-ui",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.12",
|
|
4
4
|
"description": "cronus-ui — add Cronus UI components to your project, shadcn-style (copy-paste registry).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"registry:check": "bun run scripts/check-registry.ts"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@cronus-ui/ai-kit": "0.6.
|
|
57
|
+
"@cronus-ui/ai-kit": "0.6.12",
|
|
58
58
|
"commander": "^15.0.0",
|
|
59
59
|
"picocolors": "^1.1.1"
|
|
60
60
|
},
|