@valerius_petrini/corekit-ui 0.1.27 → 0.1.28

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.
@@ -1,7 +1,8 @@
1
1
  <script lang="ts">
2
2
  import { page } from '$app/state'
3
+ import type { AnalyticsProps } from '../types/Analytics.js';
3
4
 
4
- let { measurementId } = $props();
5
+ let { measurementId }: AnalyticsProps = $props();
5
6
 
6
7
  const ANALYTICS_URL = $derived(`https://www.googletagmanager.com/gtag/js?id=${measurementId}`);
7
8
 
@@ -1,5 +1,4 @@
1
- declare const Analytics: import("svelte").Component<{
2
- measurementId: any;
3
- }, {}, "">;
1
+ import type { AnalyticsProps } from '../types/Analytics.js';
2
+ declare const Analytics: import("svelte").Component<AnalyticsProps, {}, "">;
4
3
  type Analytics = ReturnType<typeof Analytics>;
5
4
  export default Analytics;
@@ -1,4 +1,5 @@
1
1
  <script lang="ts">
2
+ import type { ButtonProps } from "../types/Button.js";
2
3
  import { twMerge } from "tailwind-merge";
3
4
 
4
5
  let {
@@ -8,7 +9,7 @@
8
9
  icon = false,
9
10
  href = undefined,
10
11
  ...restProps
11
- } = $props();
12
+ }: ButtonProps = $props();
12
13
 
13
14
  let pillClass = "rounded-full";
14
15
  let iconClass = "rounded-full p-2 flex-center";
@@ -1,9 +1,4 @@
1
- declare const Button: import("svelte").Component<{
2
- children?: any;
3
- class?: string;
4
- pill?: boolean;
5
- icon?: boolean;
6
- href?: any;
7
- } & Record<string, any>, {}, "">;
1
+ import type { ButtonProps } from "../types/Button.js";
2
+ declare const Button: import("svelte").Component<ButtonProps, {}, "">;
8
3
  type Button = ReturnType<typeof Button>;
9
4
  export default Button;
@@ -1,18 +1,17 @@
1
1
  <script lang="ts">
2
2
  import { page } from '$app/state';
3
+ import type { SEOProps } from '../types/SEO.js';
3
4
 
4
5
  const DEFAULT_TITLE = "My SvelteKit App";
5
6
  const DEFAULT_DESCRIPTION = "Description of your website.";
6
7
  const DEFAULT_IMAGE = "/favicon.png";
7
-
8
- interface SEOProps {
9
- websiteName: string;
10
- title?: string;
11
- description?: string;
12
- image?: any;
13
- }
14
8
 
15
- let { websiteName, title = DEFAULT_TITLE, description = DEFAULT_DESCRIPTION, image = DEFAULT_IMAGE }: SEOProps = $props();
9
+ let {
10
+ websiteName,
11
+ title = DEFAULT_TITLE,
12
+ description = DEFAULT_DESCRIPTION,
13
+ image = DEFAULT_IMAGE
14
+ }: SEOProps = $props();
16
15
 
17
16
  let fullUrl = $derived(`${websiteName}${page.url.pathname.toString()}`);
18
17
  </script>
@@ -1,9 +1,4 @@
1
- interface SEOProps {
2
- websiteName: string;
3
- title?: string;
4
- description?: string;
5
- image?: any;
6
- }
1
+ import type { SEOProps } from '../types/SEO.js';
7
2
  declare const SEO: import("svelte").Component<SEOProps, {}, "">;
8
3
  type SEO = ReturnType<typeof SEO>;
9
4
  export default SEO;
@@ -2,9 +2,13 @@
2
2
  import { twMerge } from "tailwind-merge";
3
3
  import { onMount } from "svelte";
4
4
 
5
- import type { DisplaySegment, TypewriterAction } from "../types/Typewriter.d.js";
5
+ import type { DisplaySegment, TypewriterProps } from "../types/Typewriter.d.js";
6
6
 
7
- let { actions = [] as TypewriterAction[], class: className = "" } = $props();
7
+ let {
8
+ actions,
9
+ class: className = "",
10
+ ...restProps
11
+ }: TypewriterProps = $props();
8
12
 
9
13
  let displaySegments = $state<DisplaySegment[]>([]);
10
14
 
@@ -59,7 +63,7 @@
59
63
  let combinedClass = $derived(twMerge("typewriter w-fit", className));
60
64
  </script>
61
65
 
62
- <div class={combinedClass}>
66
+ <div class={combinedClass} {...restProps}>
63
67
  {#each displaySegments as segment}
64
68
  {#key segment}
65
69
  <span style="color: {segment.color}">{segment.text}</span>
@@ -1,7 +1,4 @@
1
- import type { TypewriterAction } from "../types/Typewriter.d.ts";
2
- declare const Typewriter: import("svelte").Component<{
3
- actions?: TypewriterAction[];
4
- class?: string;
5
- }, {}, "">;
1
+ import type { TypewriterProps } from "../types/Typewriter.d.ts";
2
+ declare const Typewriter: import("svelte").Component<TypewriterProps, {}, "">;
6
3
  type Typewriter = ReturnType<typeof Typewriter>;
7
4
  export default Typewriter;
@@ -0,0 +1,3 @@
1
+ export interface AnalyticsProps {
2
+ measurementId: string;
3
+ }
@@ -0,0 +1,8 @@
1
+ export interface ButtonProps {
2
+ children?: any;
3
+ class?: string;
4
+ pill?: boolean;
5
+ icon?: boolean;
6
+ href?: string;
7
+ [key: string]: any;
8
+ }
@@ -0,0 +1,6 @@
1
+ export interface SEOProps {
2
+ websiteName: string;
3
+ title?: string;
4
+ description?: string;
5
+ image?: any;
6
+ }
@@ -8,4 +8,10 @@ export interface DisplaySegment {
8
8
  text: string;
9
9
  color?: string;
10
10
  label?: string;
11
- };
11
+ };
12
+
13
+ export interface TypewriterProps {
14
+ actions: TypewriterAction[];
15
+ class?: string;
16
+ [key: string]: any;
17
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valerius_petrini/corekit-ui",
3
- "version": "0.1.27",
3
+ "version": "0.1.28",
4
4
  "description": "Component Library used across all my projects",
5
5
  "author": "Valerius Petrini Jr.",
6
6
  "license": "MIT",