@ansiversa/components 0.0.130 → 0.0.131

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/index.ts CHANGED
@@ -39,6 +39,8 @@ export { default as ResumeBuilderSummary } from './src/Summary/ResumeBuilderSumm
39
39
  export { default as PortfolioCreatorSummary } from './src/Summary/PortfolioCreatorSummary.astro';
40
40
  export { default as AvImageUploader } from "./src/components/media/AvImageUploader.astro";
41
41
  export { default as AvAiAssist } from "./src/components/Ai/AvAiAssist.astro";
42
+ export { AppLogo } from "./src/Logo";
43
+ export type { AppLogoProps } from "./src/Logo";
42
44
  export { default as ResumeBuilderShell } from './src/resume-templates/ResumeBuilderShell.astro';
43
45
  export { default as ResumeTemplateClassic } from './src/resume-templates/ResumeTemplateClassic.astro';
44
46
  export { default as ResumeTemplateModernTwoTone } from './src/resume-templates/ResumeTemplateModernTwoTone.astro';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ansiversa/components",
3
- "version": "0.0.130",
3
+ "version": "0.0.131",
4
4
  "description": "Shared UI components and layouts for the Ansiversa ecosystem",
5
5
  "type": "module",
6
6
  "exports": {
@@ -0,0 +1,39 @@
1
+ import type { JSX } from "astro/jsx-runtime";
2
+ import AppLogoDefault from "./logos/AppLogoDefault";
3
+ import AppLogoFlashNote from "./logos/AppLogoFlashNote";
4
+ import AppLogoPortfolioCreator from "./logos/AppLogoPortfolioCreator";
5
+ import AppLogoQuiz from "./logos/AppLogoQuiz";
6
+ import AppLogoResumeBuilder from "./logos/AppLogoResumeBuilder";
7
+
8
+ type LogoComponentProps = {
9
+ size: number;
10
+ class?: string;
11
+ title?: string;
12
+ };
13
+
14
+ type LogoComponent = (props: LogoComponentProps) => JSX.Element;
15
+
16
+ export type AppLogoProps = {
17
+ appId: string;
18
+ size?: "xs" | "sm" | "md";
19
+ class?: string;
20
+ title?: string;
21
+ };
22
+
23
+ const SIZE_MAP: Record<NonNullable<AppLogoProps["size"]>, number> = {
24
+ xs: 16,
25
+ sm: 18,
26
+ md: 20,
27
+ };
28
+
29
+ const LOGO_REGISTRY: Record<string, LogoComponent> = {
30
+ quiz: AppLogoQuiz,
31
+ "resume-builder": AppLogoResumeBuilder,
32
+ "portfolio-creator": AppLogoPortfolioCreator,
33
+ flashnote: AppLogoFlashNote,
34
+ };
35
+
36
+ export default function AppLogo({ appId, size = "sm", class: className, title }: AppLogoProps) {
37
+ const Logo = LOGO_REGISTRY[appId] ?? AppLogoDefault;
38
+ return <Logo size={SIZE_MAP[size]} class={className} title={title} />;
39
+ }
@@ -0,0 +1,7 @@
1
+ export { default as AppLogo } from "./AppLogo";
2
+ export { default as AppLogoDefault } from "./logos/AppLogoDefault";
3
+ export { default as AppLogoFlashNote } from "./logos/AppLogoFlashNote";
4
+ export { default as AppLogoPortfolioCreator } from "./logos/AppLogoPortfolioCreator";
5
+ export { default as AppLogoQuiz } from "./logos/AppLogoQuiz";
6
+ export { default as AppLogoResumeBuilder } from "./logos/AppLogoResumeBuilder";
7
+ export type { AppLogoProps } from "./AppLogo";
@@ -0,0 +1,25 @@
1
+ import type { AppLogoGlyphProps } from "./AppLogoQuiz";
2
+
3
+ export default function AppLogoDefault({ size, class: className, title }: AppLogoGlyphProps) {
4
+ return (
5
+ <svg
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ viewBox="0 0 24 24"
8
+ width={size}
9
+ height={size}
10
+ fill="none"
11
+ stroke="currentColor"
12
+ stroke-width="1.75"
13
+ stroke-linecap="round"
14
+ stroke-linejoin="round"
15
+ class={className}
16
+ aria-hidden={title ? undefined : "true"}
17
+ role={title ? "img" : "presentation"}
18
+ >
19
+ {title ? <title>{title}</title> : null}
20
+ <circle cx="12" cy="12" r="9" />
21
+ <path d="M12 8v8" />
22
+ <path d="M8 12h8" />
23
+ </svg>
24
+ );
25
+ }
@@ -0,0 +1,23 @@
1
+ import type { AppLogoGlyphProps } from "./AppLogoQuiz";
2
+
3
+ export default function AppLogoFlashNote({ size, class: className, title }: AppLogoGlyphProps) {
4
+ return (
5
+ <svg
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ viewBox="0 0 24 24"
8
+ width={size}
9
+ height={size}
10
+ fill="none"
11
+ stroke="currentColor"
12
+ stroke-width="1.75"
13
+ stroke-linecap="round"
14
+ stroke-linejoin="round"
15
+ class={className}
16
+ aria-hidden={title ? undefined : "true"}
17
+ role={title ? "img" : "presentation"}
18
+ >
19
+ {title ? <title>{title}</title> : null}
20
+ <path d="M12 2.8L4.5 12H10l-1 9.2L19.5 10H14l1-7.2Z" />
21
+ </svg>
22
+ );
23
+ }
@@ -0,0 +1,26 @@
1
+ import type { AppLogoGlyphProps } from "./AppLogoQuiz";
2
+
3
+ export default function AppLogoPortfolioCreator({ size, class: className, title }: AppLogoGlyphProps) {
4
+ return (
5
+ <svg
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ viewBox="0 0 24 24"
8
+ width={size}
9
+ height={size}
10
+ fill="none"
11
+ stroke="currentColor"
12
+ stroke-width="1.75"
13
+ stroke-linecap="round"
14
+ stroke-linejoin="round"
15
+ class={className}
16
+ aria-hidden={title ? undefined : "true"}
17
+ role={title ? "img" : "presentation"}
18
+ >
19
+ {title ? <title>{title}</title> : null}
20
+ <rect x="3" y="5" width="18" height="14" rx="2.5" />
21
+ <path d="M8.5 5V4a1.5 1.5 0 0 1 1.5-1.5h4A1.5 1.5 0 0 1 15.5 4v1" />
22
+ <path d="M3 11h18" />
23
+ <path d="M11 14.5h2" />
24
+ </svg>
25
+ );
26
+ }
@@ -0,0 +1,30 @@
1
+ export type AppLogoGlyphProps = {
2
+ size: number;
3
+ class?: string;
4
+ title?: string;
5
+ };
6
+
7
+ export default function AppLogoQuiz({ size, class: className, title }: AppLogoGlyphProps) {
8
+ return (
9
+ <svg
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ viewBox="0 0 24 24"
12
+ width={size}
13
+ height={size}
14
+ fill="none"
15
+ stroke="currentColor"
16
+ stroke-width="1.75"
17
+ stroke-linecap="round"
18
+ stroke-linejoin="round"
19
+ class={className}
20
+ aria-hidden={title ? undefined : "true"}
21
+ role={title ? "img" : "presentation"}
22
+ >
23
+ {title ? <title>{title}</title> : null}
24
+ <circle cx="11" cy="11" r="7" />
25
+ <path d="M21 21l-4.2-4.2" />
26
+ <path d="M8.6 9.2a2.6 2.6 0 1 1 4.8 1.3c-.7.8-1.8 1.4-1.8 2.4" />
27
+ <path d="M11.5 16h0" />
28
+ </svg>
29
+ );
30
+ }
@@ -0,0 +1,26 @@
1
+ import type { AppLogoGlyphProps } from "./AppLogoQuiz";
2
+
3
+ export default function AppLogoResumeBuilder({ size, class: className, title }: AppLogoGlyphProps) {
4
+ return (
5
+ <svg
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ viewBox="0 0 24 24"
8
+ width={size}
9
+ height={size}
10
+ fill="none"
11
+ stroke="currentColor"
12
+ stroke-width="1.75"
13
+ stroke-linecap="round"
14
+ stroke-linejoin="round"
15
+ class={className}
16
+ aria-hidden={title ? undefined : "true"}
17
+ role={title ? "img" : "presentation"}
18
+ >
19
+ {title ? <title>{title}</title> : null}
20
+ <rect x="4" y="3.5" width="16" height="17" rx="2.5" />
21
+ <path d="M8 8.5h8" />
22
+ <path d="M8 12h8" />
23
+ <path d="M8 15.5h5" />
24
+ </svg>
25
+ );
26
+ }