cronus-ui 0.6.17 → 0.6.18

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 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.17` here), not
52
+ - The default registry is pinned to the CLI package version (`v0.6.18` 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.17/registry"
83
+ "registry": "https://raw.githubusercontent.com/pedrogbraz/cronus-ui/v0.6.18/registry"
84
84
  }
85
85
  ```
86
86
 
@@ -20,7 +20,7 @@
20
20
  */
21
21
  import { existsSync } from "node:fs";
22
22
  import { rm } from "node:fs/promises";
23
- import { goldPatchAppShellChrome, goldPatchShellLayout, goldPatchTeamPage, isGoldPathTemplate, } from "../compose/gold-path.js";
23
+ import { goldPatchAppShellChrome, goldPatchHomePage, goldPatchShellLayout, goldPatchTeamPage, isGoldPathTemplate, } from "../compose/gold-path.js";
24
24
  import { blockRefParts } from "../compose/manifest.js";
25
25
  import { buildComposePlan, ComposePlanError, } from "../compose/plan.js";
26
26
  import { baseSnapshotDir, reloadManifest } from "../compose/reload.js";
@@ -235,12 +235,19 @@ export async function addPage(options) {
235
235
  }
236
236
  else {
237
237
  let content = renderPage(planPage, config);
238
- // saas/admin: compose gold-patches /team (MembersPanel). Writing the
239
- // catalog TeamBlock would undo that — re-apply the same idempotent patch.
240
- if (isGoldPathTemplate(appName) && planPage.route === "/team" && chromeGroup === "shell") {
241
- const patched = goldPatchTeamPage(content);
242
- if (patched !== undefined)
243
- content = patched;
238
+ // saas/admin: compose gold-patches / (ItemsPanel) and /team (MembersPanel).
239
+ // Writing the catalog dashboard/stats or TeamBlock would undo that.
240
+ if (isGoldPathTemplate(appName) && chromeGroup === "shell") {
241
+ if (planPage.route === "/") {
242
+ const patched = goldPatchHomePage(content);
243
+ if (patched !== undefined)
244
+ content = patched;
245
+ }
246
+ else if (planPage.route === "/team") {
247
+ const patched = goldPatchTeamPage(content);
248
+ if (patched !== undefined)
249
+ content = patched;
250
+ }
244
251
  }
245
252
  await writeFileEnsured(pageDest, content);
246
253
  generatedFiles.push(pageRel);
@@ -5,7 +5,7 @@ import { tmpdir } from "node:os";
5
5
  import { join } from "node:path";
6
6
  import { createInterface } from "node:readline/promises";
7
7
  import pc from "picocolors";
8
- import { goldPatchAppShellChrome, goldPatchShellLayout, goldPatchTeamPage, isGoldPathTemplate, } from "../compose/gold-path.js";
8
+ import { goldPatchAppShellChrome, goldPatchHomePage, goldPatchShellLayout, goldPatchTeamPage, isGoldPathTemplate, } from "../compose/gold-path.js";
9
9
  import { buildComposePlan } from "../compose/plan.js";
10
10
  import { baseSnapshotDest, filterManifestToComposedPages, listBaseSnapshotRels, readBaseSnapshot, reloadManifest, } from "../compose/reload.js";
11
11
  import { renderPlan } from "../compose/render.js";
@@ -423,7 +423,7 @@ function statusLabel(plan) {
423
423
  }
424
424
  /**
425
425
  * saas/admin: upgrade 3-ways chrome against the catalog item (Mara) and
426
- * layout/team against the catalog compose render. After any write (or a
426
+ * layout/team/home against the catalog compose render. After any write (or a
427
427
  * catalog file already on disk), re-apply the gold-path identity. Idempotent;
428
428
  * skipped when conflict markers are present.
429
429
  */
@@ -457,6 +457,8 @@ function goldPathSurfaceRels(cwd, composed) {
457
457
  "src/app/(shell)/layout.tsx",
458
458
  "app/(shell)/team/page.tsx",
459
459
  "src/app/(shell)/team/page.tsx",
460
+ "app/(shell)/page.tsx",
461
+ "src/app/(shell)/page.tsx",
460
462
  ]) {
461
463
  if (existsSync(join(cwd, rel)))
462
464
  rels.add(rel);
@@ -475,6 +477,9 @@ async function repatchGoldPathSurfaces(cwd, config, composed) {
475
477
  if (/(^|\/)\(shell\)\/team\/page\.tsx$/.test(rel)) {
476
478
  await repatchGoldPathFile(cwd, rel, goldPatchTeamPage, "MembersPanel");
477
479
  }
480
+ if (/(^|\/)\(shell\)\/page\.tsx$/.test(rel)) {
481
+ await repatchGoldPathFile(cwd, rel, goldPatchHomePage, "ItemsPanel");
482
+ }
478
483
  }
479
484
  }
480
485
  /** Statuses that write the planned content to disk unconditionally. */
@@ -20,6 +20,11 @@ export declare function goldPatchShellLayout(source: string, authImport?: string
20
20
  * Idempotent. Used by add-page --overwrite /team and upgrade.
21
21
  */
22
22
  export declare function goldPatchTeamPage(source: string, membersImport?: string): string | undefined;
23
+ /**
24
+ * Re-apply ItemsPanel onto a catalog saas/admin home (drop dashboard/stats).
25
+ * Idempotent. Used by add-page --overwrite / and upgrade.
26
+ */
27
+ export declare function goldPatchHomePage(source: string, itemsImport?: string): string | undefined;
23
28
  /** Production npm specs installed with the gold path (devDeps are merged into package.json). */
24
29
  export declare const GOLD_PATH_DEPENDENCIES: readonly ["drizzle-orm@^0.45.2", "better-sqlite3@^12.0.0", "better-auth@^1.7.2"];
25
30
  export interface GoldPathLayout {
@@ -17,6 +17,7 @@ const GOLD_INVITE_IMPORT = "@/components/invite-member";
17
17
  const GOLD_SESSION_IMPORT = "@/components/session-user";
18
18
  const GOLD_AUTH_IMPORT = "@/lib/auth";
19
19
  const GOLD_MEMBERS_IMPORT = "@/components/members-panel";
20
+ const GOLD_ITEMS_IMPORT = "@/components/items-panel";
20
21
  /**
21
22
  * Re-apply WorkspaceMenu / InviteMember / SessionUser onto catalog app-shell-chrome.
22
23
  * Idempotent. Used by add-page --nav and upgrade so neither restores Mara.
@@ -38,6 +39,13 @@ export function goldPatchShellLayout(source, authImport = GOLD_AUTH_IMPORT) {
38
39
  export function goldPatchTeamPage(source, membersImport = GOLD_MEMBERS_IMPORT) {
39
40
  return patchTeamPageSource(source, membersImport);
40
41
  }
42
+ /**
43
+ * Re-apply ItemsPanel onto a catalog saas/admin home (drop dashboard/stats).
44
+ * Idempotent. Used by add-page --overwrite / and upgrade.
45
+ */
46
+ export function goldPatchHomePage(source, itemsImport = GOLD_ITEMS_IMPORT) {
47
+ return patchHomePageSource(source, itemsImport);
48
+ }
41
49
  /** Production npm specs installed with the gold path (devDeps are merged into package.json). */
42
50
  export const GOLD_PATH_DEPENDENCIES = [
43
51
  "drizzle-orm@^0.45.2",
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.17";
3
- export declare const DEFAULT_REGISTRY = "https://raw.githubusercontent.com/pedrogbraz/cronus-ui/v0.6.17/registry";
2
+ export declare const CLI_VERSION = "0.6.18";
3
+ export declare const DEFAULT_REGISTRY = "https://raw.githubusercontent.com/pedrogbraz/cronus-ui/v0.6.18/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.17";
5
+ export const CLI_VERSION = "0.6.18";
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.17",
3
+ "version": "0.6.18",
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.17",
57
+ "@cronus-ui/ai-kit": "0.6.18",
58
58
  "commander": "^15.0.0",
59
59
  "picocolors": "^1.1.1"
60
60
  },