@tanglemedia/svelte-starter-auth-shadcn 0.1.0 → 1.0.0-next.0

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.
@@ -10,6 +10,7 @@
10
10
  xl: 'size-24',
11
11
  '2xl': 'size-32',
12
12
  '3xl': 'size-40',
13
+ dynamic: '',
13
14
  },
14
15
  },
15
16
  defaultVariants: {
@@ -26,6 +27,7 @@
26
27
  xl: 'text-5xl',
27
28
  '2xl': 'text-6xl',
28
29
  '3xl': 'text-9xl',
30
+ dynamic: '',
29
31
  },
30
32
  },
31
33
  defaultVariants: {
@@ -57,6 +59,7 @@
57
59
  <script lang="ts">
58
60
  import { cn } from '@tanglemedia/svelte-starter-ui-shadcn';
59
61
  import type { Snippet } from 'svelte';
62
+ import type { HTMLImgAttributes } from 'svelte/elements';
60
63
 
61
64
  type Props = {
62
65
  children?: Snippet<[]>;
@@ -66,6 +69,8 @@
66
69
  href?: string;
67
70
  size?: AuthLogoSize;
68
71
  align?: AuthLogoAlign;
72
+ logo?: Snippet<[{ props: HTMLImgAttributes }]>;
73
+ square?: boolean;
69
74
  };
70
75
 
71
76
  const {
@@ -76,9 +81,23 @@
76
81
  href,
77
82
  size,
78
83
  align,
84
+ logo,
85
+ square,
79
86
  }: Props = $props();
80
87
 
81
88
  // cn(authLogoVariants({ size }));
89
+
90
+ const imgCls = $derived.by(() => {
91
+ let base = '';
92
+
93
+ if (typeof square === 'undefined') {
94
+ base = size === 'dynamic' ? '' : 'aspect-square';
95
+ } else {
96
+ base = square ? 'aspect-square' : '';
97
+ }
98
+
99
+ return cn('size-full', base, logoClass);
100
+ });
82
101
  </script>
83
102
 
84
103
  <svelte:element
@@ -86,9 +105,13 @@
86
105
  class={cn(authLogoAlignVariants({ align }), cls)}
87
106
  {href}
88
107
  >
89
- <div class={cn(authLogoSizeVariants({ size }))}>
108
+ <div class={cn('w-full',authLogoSizeVariants({ size }))}>
90
109
  {#if src}
91
- <img {src} alt="logo" class={cn('aspect-square size-full', logoClass)} />
110
+ {#if logo}
111
+ {@render logo({ props: { class: logoClass, src: `${src}` } })}
112
+ {:else}
113
+ <img {src} alt="logo" class={imgCls} />
114
+ {/if}
92
115
  {/if}
93
116
  </div>
94
117
  {#if children}
@@ -6,6 +6,7 @@ declare const authLogoSizeVariants: import("tailwind-variants").TVReturnType<{
6
6
  xl: string;
7
7
  '2xl': string;
8
8
  '3xl': string;
9
+ dynamic: string;
9
10
  };
10
11
  }, undefined, "flex shrink-0 overflow-hidden rounded-lg", {
11
12
  size: {
@@ -14,6 +15,7 @@ declare const authLogoSizeVariants: import("tailwind-variants").TVReturnType<{
14
15
  xl: string;
15
16
  '2xl': string;
16
17
  '3xl': string;
18
+ dynamic: string;
17
19
  };
18
20
  }, undefined, import("tailwind-variants").TVReturnType<{
19
21
  size: {
@@ -22,6 +24,7 @@ declare const authLogoSizeVariants: import("tailwind-variants").TVReturnType<{
22
24
  xl: string;
23
25
  '2xl': string;
24
26
  '3xl': string;
27
+ dynamic: string;
25
28
  };
26
29
  }, undefined, "flex shrink-0 overflow-hidden rounded-lg", unknown, unknown, undefined>>;
27
30
  declare const authLogoAlignVariants: import("tailwind-variants").TVReturnType<{
@@ -49,6 +52,7 @@ declare const authLogoAlignVariants: import("tailwind-variants").TVReturnType<{
49
52
  export type AuthLogoSize = VariantProps<typeof authLogoSizeVariants>['size'];
50
53
  export type AuthLogoAlign = VariantProps<typeof authLogoAlignVariants>['align'];
51
54
  import type { Snippet } from 'svelte';
55
+ import type { HTMLImgAttributes } from 'svelte/elements';
52
56
  type Props = {
53
57
  children?: Snippet<[]>;
54
58
  class?: string;
@@ -57,6 +61,10 @@ type Props = {
57
61
  href?: string;
58
62
  size?: AuthLogoSize;
59
63
  align?: AuthLogoAlign;
64
+ logo?: Snippet<[{
65
+ props: HTMLImgAttributes;
66
+ }]>;
67
+ square?: boolean;
60
68
  };
61
69
  declare const AuthLayoutLogo: import("svelte").Component<Props, {}, "">;
62
70
  type AuthLayoutLogo = ReturnType<typeof AuthLayoutLogo>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanglemedia/svelte-starter-auth-shadcn",
3
- "version": "0.1.0",
3
+ "version": "1.0.0-next.0",
4
4
  "main": "./src/index.ts",
5
5
  "types": "./src/index.ts",
6
6
  "description": "Auth features and components for use in svelte websites",
@@ -20,37 +20,37 @@
20
20
  }
21
21
  },
22
22
  "devDependencies": {
23
- "@lucide/svelte": "^0.561.0",
24
- "@sveltejs/adapter-auto": "^7.0.0",
25
- "@sveltejs/kit": "^2.49.2",
23
+ "@lucide/svelte": "^0.577.0",
24
+ "@sveltejs/adapter-auto": "^7.0.1",
25
+ "@sveltejs/kit": "^2.57.1",
26
26
  "@sveltejs/package": "^2.5.7",
27
- "@sveltejs/vite-plugin-svelte": "^6.2.1",
28
- "@tailwindcss/postcss": "^4.1.18",
29
- "@tailwindcss/vite": "^4.1.18",
27
+ "@sveltejs/vite-plugin-svelte": "^7.0.0",
28
+ "@tailwindcss/postcss": "^4.2.2",
29
+ "@tailwindcss/vite": "^4.2.2",
30
30
  "@testing-library/jest-dom": "^6.9.1",
31
31
  "@testing-library/svelte": "^5.3.0",
32
- "@vitest/coverage-v8": "^3.2.4",
32
+ "@vitest/coverage-v8": "^4.1.0",
33
33
  "autoprefixer": "^10.4.21",
34
- "bits-ui": "^2.14.3",
34
+ "bits-ui": "^2.16.3",
35
35
  "clsx": "^2.1.1",
36
- "globals": "^16.4.0",
36
+ "globals": "^17.4.0",
37
37
  "jsdom": "^27.0.0",
38
- "msw": "^2.11.3",
38
+ "msw": "^2.12.7",
39
39
  "postcss": "^8.5.6",
40
- "svelte": "^5.46.1",
41
- "svelte-check": "^4.3.5",
42
- "tailwind-merge": "^3.3.1",
40
+ "svelte": "^5.55.3",
41
+ "svelte-check": "^4.4.6",
42
+ "tailwind-merge": "^3.5.0",
43
43
  "tailwind-variants": "^3.1.1",
44
- "tailwindcss": "^4.1.18",
44
+ "tailwindcss": "^4.2.2",
45
45
  "tw-animate-css": "^1.4.0",
46
46
  "typescript": "^5.9.3",
47
- "typescript-eslint": "^8.49.0",
48
- "vite": "^7.3.0",
49
- "vitest": "^4.0.16",
47
+ "typescript-eslint": "^8.54.0",
48
+ "vite": "^8.0.8",
49
+ "vitest": "^4.1.4",
50
50
  "@internal/eslint-config": "0.0.0",
51
- "@tanglemedia/svelte-starter-core": "3.0.0",
52
- "@tanglemedia/svelte-starter-form-shadcn": "0.1.0",
53
- "@tanglemedia/svelte-starter-ui-shadcn": "0.1.0"
51
+ "@tanglemedia/svelte-starter-core": "4.0.0-next.0",
52
+ "@tanglemedia/svelte-starter-ui-shadcn": "1.0.0-next.0",
53
+ "@tanglemedia/svelte-starter-form-shadcn": "1.0.0-next.0"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@sveltejs/kit": ">=2 <3",
@@ -59,8 +59,8 @@
59
59
  "dependencies": {
60
60
  "formsnap": "^2.0.1",
61
61
  "svelte-toolbelt": "^0.10.6",
62
- "sveltekit-superforms": "^2.29.1",
63
- "zod": "^4.2.1"
62
+ "sveltekit-superforms": "^2.30.1",
63
+ "zod": "^4.3.6"
64
64
  },
65
65
  "scripts": {
66
66
  "build": "svelte-package --input ./src --output ./dist",
@@ -10,6 +10,7 @@
10
10
  xl: 'size-24',
11
11
  '2xl': 'size-32',
12
12
  '3xl': 'size-40',
13
+ dynamic: '',
13
14
  },
14
15
  },
15
16
  defaultVariants: {
@@ -26,6 +27,7 @@
26
27
  xl: 'text-5xl',
27
28
  '2xl': 'text-6xl',
28
29
  '3xl': 'text-9xl',
30
+ dynamic: '',
29
31
  },
30
32
  },
31
33
  defaultVariants: {
@@ -57,6 +59,7 @@
57
59
  <script lang="ts">
58
60
  import { cn } from '@tanglemedia/svelte-starter-ui-shadcn';
59
61
  import type { Snippet } from 'svelte';
62
+ import type { HTMLImgAttributes } from 'svelte/elements';
60
63
 
61
64
  type Props = {
62
65
  children?: Snippet<[]>;
@@ -66,6 +69,8 @@
66
69
  href?: string;
67
70
  size?: AuthLogoSize;
68
71
  align?: AuthLogoAlign;
72
+ logo?: Snippet<[{ props: HTMLImgAttributes }]>;
73
+ square?: boolean;
69
74
  };
70
75
 
71
76
  const {
@@ -76,9 +81,23 @@
76
81
  href,
77
82
  size,
78
83
  align,
84
+ logo,
85
+ square,
79
86
  }: Props = $props();
80
87
 
81
88
  // cn(authLogoVariants({ size }));
89
+
90
+ const imgCls = $derived.by(() => {
91
+ let base = '';
92
+
93
+ if (typeof square === 'undefined') {
94
+ base = size === 'dynamic' ? '' : 'aspect-square';
95
+ } else {
96
+ base = square ? 'aspect-square' : '';
97
+ }
98
+
99
+ return cn('size-full', base, logoClass);
100
+ });
82
101
  </script>
83
102
 
84
103
  <svelte:element
@@ -86,9 +105,13 @@
86
105
  class={cn(authLogoAlignVariants({ align }), cls)}
87
106
  {href}
88
107
  >
89
- <div class={cn(authLogoSizeVariants({ size }))}>
108
+ <div class={cn('w-full',authLogoSizeVariants({ size }))}>
90
109
  {#if src}
91
- <img {src} alt="logo" class={cn('aspect-square size-full', logoClass)} />
110
+ {#if logo}
111
+ {@render logo({ props: { class: logoClass, src: `${src}` } })}
112
+ {:else}
113
+ <img {src} alt="logo" class={imgCls} />
114
+ {/if}
92
115
  {/if}
93
116
  </div>
94
117
  {#if children}