fuma 2.0.8 → 2.0.10

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,2 +1,2 @@
1
1
  import z from 'zod';
2
- export declare function parseQuery<Shape extends z.core.$ZodShape>(url: URL, shape: Shape): z.z.core.$InferObjectOutput<{ -readonly [P in keyof Shape]: Shape[P]; }, {}>;
2
+ export declare function parseQuery<Shape extends z.core.$ZodShape>(url: URL, shape: Shape): z.output<z.ZodObject<Shape>>;
@@ -1,8 +1,8 @@
1
1
  <script lang="ts">
2
2
  import { tippy, type TippyProps, type TippyInstance } from '../../utils/tippy.js'
3
- import { onMount } from 'svelte'
3
+ import { onMount, type Snippet } from 'svelte'
4
4
 
5
- export let path: string
5
+ export let path: string | Snippet
6
6
  export let title = ''
7
7
  export let size = 22
8
8
  let klass = ''
@@ -35,15 +35,19 @@
35
35
  })
36
36
  </script>
37
37
 
38
- <i bind:this={icon} class="grid place-content-center fill-base-content {klass}" {style}>
39
- <svg
40
- xmlns="http://www.w3.org/2000/svg"
41
- width={size}
42
- height={size}
43
- viewBox={`0 0 ${viewWidth} ${viewHeight}`}
44
- style="display: inline-block;"
45
- class={classSVG}
46
- >
47
- <path d={path} />
48
- </svg>
38
+ <i bind:this={icon} class="fill-base-content grid place-content-center {klass}" {style}>
39
+ {#if typeof path === 'string'}
40
+ <svg
41
+ xmlns="http://www.w3.org/2000/svg"
42
+ width={size}
43
+ height={size}
44
+ viewBox={`0 0 ${viewWidth} ${viewHeight}`}
45
+ style="display: inline-block;"
46
+ class={classSVG}
47
+ >
48
+ <path d={path} />
49
+ </svg>
50
+ {:else}
51
+ {@render path()}
52
+ {/if}
49
53
  </i>
@@ -1,4 +1,5 @@
1
1
  import { type TippyProps } from '../../utils/tippy.js';
2
+ import { type Snippet } from 'svelte';
2
3
  interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
3
4
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
5
  $$bindings?: Bindings;
@@ -13,7 +14,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
13
14
  z_$$bindings?: Bindings;
14
15
  }
15
16
  declare const Icon: $$__sveltets_2_IsomorphicComponent<{
16
- path: string;
17
+ path: string | Snippet;
17
18
  title?: string;
18
19
  size?: number;
19
20
  class?: string;
@@ -1,7 +1,8 @@
1
+ import type { Snippet } from 'svelte';
1
2
  export type Option = {
2
3
  value: string;
3
4
  label: string;
4
- icon?: string;
5
+ icon?: string | Snippet;
5
6
  };
6
7
  export type OptionRecord<Values extends string> = Record<Values, Omit<Option, 'value'>>;
7
8
  export type Options = string | string[] | Option[] | Record<string, string> | OptionRecord<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fuma",
3
- "version": "2.0.8",
3
+ "version": "2.0.10",
4
4
  "description": "My fullstack material build with sveltekit, daisyui, zod, prisma, lucia",
5
5
  "author": {
6
6
  "name": "Jonas Voisard",