cronus-ui 0.6.7 → 0.6.8
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.js +48 -7
- package/dist/config.d.ts +2 -2
- package/dist/config.js +1 -1
- package/package.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.8` 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.8/registry"
|
|
84
84
|
}
|
|
85
85
|
```
|
|
86
86
|
|
|
@@ -834,7 +834,9 @@ export function InviteMember({ trigger }: { trigger: ReactNode }) {
|
|
|
834
834
|
function sessionUserSource(authClientImport) {
|
|
835
835
|
return `"use client";
|
|
836
836
|
|
|
837
|
-
import { Avatar, AvatarFallback, AvatarImage } from "@cronus-ui/ui";
|
|
837
|
+
import { Avatar, AvatarFallback, AvatarImage, Button } from "@cronus-ui/ui";
|
|
838
|
+
import { LogOut } from "lucide-react";
|
|
839
|
+
import { useState } from "react";
|
|
838
840
|
import { authClient } from ${JSON.stringify(authClientImport)};
|
|
839
841
|
|
|
840
842
|
function initialsOf(name: string, email: string): string {
|
|
@@ -848,6 +850,7 @@ function initialsOf(name: string, email: string): string {
|
|
|
848
850
|
|
|
849
851
|
export function SessionUser({ compact = false }: { compact?: boolean }) {
|
|
850
852
|
const { data } = authClient.useSession();
|
|
853
|
+
const [pending, setPending] = useState(false);
|
|
851
854
|
const user = data?.user;
|
|
852
855
|
if (!user) return null;
|
|
853
856
|
const name = user.name || user.email || "Account";
|
|
@@ -859,14 +862,52 @@ export function SessionUser({ compact = false }: { compact?: boolean }) {
|
|
|
859
862
|
<AvatarFallback>{initials}</AvatarFallback>
|
|
860
863
|
</Avatar>
|
|
861
864
|
);
|
|
862
|
-
|
|
865
|
+
|
|
866
|
+
async function onSignOut() {
|
|
867
|
+
setPending(true);
|
|
868
|
+
const { error } = await authClient.signOut();
|
|
869
|
+
if (error) {
|
|
870
|
+
setPending(false);
|
|
871
|
+
return;
|
|
872
|
+
}
|
|
873
|
+
window.location.assign("/login");
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
const signOutButton = (
|
|
877
|
+
<Button
|
|
878
|
+
type="button"
|
|
879
|
+
variant="ghost"
|
|
880
|
+
size={compact ? "icon-sm" : "sm"}
|
|
881
|
+
className={compact ? undefined : "w-full justify-start"}
|
|
882
|
+
disabled={pending}
|
|
883
|
+
aria-busy={pending}
|
|
884
|
+
aria-label="Sign out"
|
|
885
|
+
onClick={() => void onSignOut()}
|
|
886
|
+
>
|
|
887
|
+
<LogOut aria-hidden="true" />
|
|
888
|
+
{compact ? null : "Sign out"}
|
|
889
|
+
</Button>
|
|
890
|
+
);
|
|
891
|
+
|
|
892
|
+
if (compact) {
|
|
893
|
+
return (
|
|
894
|
+
<div className="flex items-center gap-1">
|
|
895
|
+
{avatar}
|
|
896
|
+
{signOutButton}
|
|
897
|
+
</div>
|
|
898
|
+
);
|
|
899
|
+
}
|
|
900
|
+
|
|
863
901
|
return (
|
|
864
|
-
<div className="flex
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
<
|
|
868
|
-
|
|
902
|
+
<div className="flex flex-col gap-1">
|
|
903
|
+
<div className="flex items-center gap-2 rounded-lg px-2 py-1.5">
|
|
904
|
+
{avatar}
|
|
905
|
+
<div className="flex min-w-0 flex-col">
|
|
906
|
+
<span className="truncate text-sm font-medium text-fg">{name}</span>
|
|
907
|
+
<span className="truncate text-xs text-fg-tertiary">{email}</span>
|
|
908
|
+
</div>
|
|
869
909
|
</div>
|
|
910
|
+
{signOutButton}
|
|
870
911
|
</div>
|
|
871
912
|
);
|
|
872
913
|
}
|
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.8";
|
|
3
|
+
export declare const DEFAULT_REGISTRY = "https://raw.githubusercontent.com/pedrogbraz/cronus-ui/v0.6.8/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.8";
|
|
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.8",
|
|
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.8",
|
|
58
58
|
"commander": "^15.0.0",
|
|
59
59
|
"picocolors": "^1.1.1"
|
|
60
60
|
},
|