lithesome 0.24.0 → 0.24.1
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/dist/components/dropzone/DropzoneInput.svelte +2 -8
- package/dist/components/pin/PinInput.svelte +2 -2
- package/dist/components/pin/PinInput.svelte.d.ts +1 -1
- package/dist/components/slider/SliderValue.svelte +2 -2
- package/dist/components/slider/SliderValue.svelte.d.ts +1 -1
- package/dist/components/tags/TagsInput.svelte +2 -2
- package/dist/components/tags/TagsInput.svelte.d.ts +1 -1
- package/dist/internals/types.d.ts +15 -2
- package/dist/types/components/dropzone.d.ts +2 -2
- package/dist/types/components/pin.d.ts +1 -1
- package/dist/types/components/slider.d.ts +1 -1
- package/dist/types/components/tags.d.ts +1 -1
- package/package.json +20 -20
|
@@ -7,13 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
const uid = $props.id();
|
|
9
9
|
|
|
10
|
-
let {
|
|
11
|
-
id = parseId(uid),
|
|
12
|
-
ref = $bindable(),
|
|
13
|
-
children,
|
|
14
|
-
custom,
|
|
15
|
-
...props
|
|
16
|
-
}: DropzoneInputProps<typeof ctx.props> = $props();
|
|
10
|
+
let { id = parseId(uid), ref = $bindable(), custom, ...props }: DropzoneInputProps<typeof ctx.props> = $props();
|
|
17
11
|
|
|
18
12
|
let ctx = useDropzoneInput({
|
|
19
13
|
id: stateValue(() => id),
|
|
@@ -21,4 +15,4 @@
|
|
|
21
15
|
});
|
|
22
16
|
</script>
|
|
23
17
|
|
|
24
|
-
<Element bind:ref as="input" {ctx} {...props} />
|
|
18
|
+
<Element bind:ref {custom} as="input" {ctx} {...props} />
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
const uid = $props.id();
|
|
8
8
|
|
|
9
|
-
let { id = parseId(uid), ref = $bindable(), ...props }: PinInputProps = $props();
|
|
9
|
+
let { id = parseId(uid), ref = $bindable(), custom, ...props }: PinInputProps = $props();
|
|
10
10
|
|
|
11
11
|
let ctx = usePinInput({
|
|
12
12
|
id: stateValue(() => id),
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
});
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
|
-
<Element bind:ref {ctx} as="input" {...props} />
|
|
17
|
+
<Element bind:ref {ctx} {custom} as="input" {...props} />
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { PinInputProps } from '../../types/index.js';
|
|
2
|
-
declare const PinInput: import("svelte").Component<PinInputProps
|
|
2
|
+
declare const PinInput: import("svelte").Component<PinInputProps<any>, {}, "ref">;
|
|
3
3
|
type PinInput = ReturnType<typeof PinInput>;
|
|
4
4
|
export default PinInput;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
const uid = $props.id();
|
|
8
8
|
|
|
9
|
-
let { id = parseId(uid), ref = $bindable(), ...props }: SliderValueProps = $props();
|
|
9
|
+
let { id = parseId(uid), ref = $bindable(), custom, ...props }: SliderValueProps = $props();
|
|
10
10
|
|
|
11
11
|
let ctx = useSliderValue({
|
|
12
12
|
id: stateValue(() => id),
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
});
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
|
-
<Element bind:ref {ctx} as="input" {...props} />
|
|
17
|
+
<Element bind:ref {custom} {ctx} as="input" {...props} />
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SliderValueProps } from '../../types/index.js';
|
|
2
|
-
declare const SliderValue: import("svelte").Component<SliderValueProps
|
|
2
|
+
declare const SliderValue: import("svelte").Component<SliderValueProps<any>, {}, "ref">;
|
|
3
3
|
type SliderValue = ReturnType<typeof SliderValue>;
|
|
4
4
|
export default SliderValue;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
const uid = $props.id();
|
|
8
8
|
|
|
9
|
-
let { id = parseId(uid), ref = $bindable(), ...props }: TagsInputProps = $props();
|
|
9
|
+
let { id = parseId(uid), custom, ref = $bindable(), ...props }: TagsInputProps = $props();
|
|
10
10
|
|
|
11
11
|
let ctx = useTagsInput({
|
|
12
12
|
id: stateValue(() => id),
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
});
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
|
-
<Element as="input" bind:ref {ctx} {...props} />
|
|
17
|
+
<Element as="input" {custom} bind:ref {ctx} {...props} />
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { TagsInputProps } from '../../types/index.js';
|
|
2
|
-
declare const TagsInput: import("svelte").Component<TagsInputProps
|
|
2
|
+
declare const TagsInput: import("svelte").Component<TagsInputProps<any>, {}, "ref">;
|
|
3
3
|
type TagsInput = ReturnType<typeof TagsInput>;
|
|
4
4
|
export default TagsInput;
|
|
@@ -59,7 +59,7 @@ export interface FloatingConfig {
|
|
|
59
59
|
sameWidth?: boolean;
|
|
60
60
|
}
|
|
61
61
|
/** Used for when render a self-closing element, such as an input. */
|
|
62
|
-
export interface
|
|
62
|
+
export interface PropsBase<E extends HTMLElement, S> {
|
|
63
63
|
/**
|
|
64
64
|
* Any CSS classes to be applied to the underlying element.
|
|
65
65
|
*
|
|
@@ -114,7 +114,7 @@ export interface PropsNoChildren<E extends HTMLElement, S> {
|
|
|
114
114
|
id?: string;
|
|
115
115
|
}
|
|
116
116
|
/** Default, used for when a component renders an element with children */
|
|
117
|
-
export interface Props<E extends HTMLElement, P, S> extends
|
|
117
|
+
export interface Props<E extends HTMLElement, P, S> extends PropsBase<E, S> {
|
|
118
118
|
/**
|
|
119
119
|
* The default snippet to render.
|
|
120
120
|
*/
|
|
@@ -133,6 +133,19 @@ export interface Props<E extends HTMLElement, P, S> extends PropsNoChildren<E, S
|
|
|
133
133
|
}
|
|
134
134
|
/** Used if the element does render wrapper element with children, but does not allow for the custom snippet. */
|
|
135
135
|
export type PropsNoCustom<E extends HTMLElement, P, S> = Omit<Props<E, P, S>, 'custom'>;
|
|
136
|
+
export interface PropsNoChildren<E extends HTMLElement, P, S> extends PropsBase<E, S> {
|
|
137
|
+
/**
|
|
138
|
+
* Snippet to be used when wanting a custom implementation.
|
|
139
|
+
*
|
|
140
|
+
* This will tell Lithesome not the render the default element and any state along with it.
|
|
141
|
+
*/
|
|
142
|
+
custom?: Snippet<[S extends Record<string, any> ? {
|
|
143
|
+
props: P;
|
|
144
|
+
state: S;
|
|
145
|
+
} : {
|
|
146
|
+
props: P;
|
|
147
|
+
}]>;
|
|
148
|
+
}
|
|
136
149
|
/** Used if the element does render children, but does not wrap said children in an element. */
|
|
137
150
|
export interface PropsNoRender<S> {
|
|
138
151
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Props } from '../../internals/index.js';
|
|
1
|
+
import type { Props, PropsNoChildren } from '../../internals/index.js';
|
|
2
2
|
export type DropzoneErrorType = 'maxSize' | 'invalidType' | 'multiple' | 'custom' | 'success';
|
|
3
3
|
export interface DropzoneEventMaxSize {
|
|
4
4
|
type: 'maxSize';
|
|
@@ -88,5 +88,5 @@ export interface DropzoneState {
|
|
|
88
88
|
*/
|
|
89
89
|
errors: boolean;
|
|
90
90
|
}
|
|
91
|
-
export interface DropzoneInputProps<P = any> extends
|
|
91
|
+
export interface DropzoneInputProps<P = any> extends PropsNoChildren<HTMLInputElement, P, any> {
|
|
92
92
|
}
|
|
@@ -37,7 +37,7 @@ export interface PinState {
|
|
|
37
37
|
*/
|
|
38
38
|
filled: boolean;
|
|
39
39
|
}
|
|
40
|
-
export interface PinInputProps extends PropsNoChildren<HTMLInputElement, PinInputState> {
|
|
40
|
+
export interface PinInputProps<P = any> extends PropsNoChildren<HTMLInputElement, P, PinInputState> {
|
|
41
41
|
}
|
|
42
42
|
export interface PinInputState {
|
|
43
43
|
/**
|
|
@@ -44,7 +44,7 @@ export interface TagsState {
|
|
|
44
44
|
*/
|
|
45
45
|
invalid: boolean;
|
|
46
46
|
}
|
|
47
|
-
export interface TagsInputProps extends PropsNoChildren<HTMLInputElement, TagsInputState> {
|
|
47
|
+
export interface TagsInputProps<P = any> extends PropsNoChildren<HTMLInputElement, P, TagsInputState> {
|
|
48
48
|
}
|
|
49
49
|
export interface TagsInputState {
|
|
50
50
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lithesome",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.1",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev",
|
|
6
6
|
"build": "bun --bun vite build && npm run prepack",
|
|
@@ -36,40 +36,40 @@
|
|
|
36
36
|
"svelte": "^5.53.12"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@lucide/svelte": "^
|
|
39
|
+
"@lucide/svelte": "^1.20.0",
|
|
40
40
|
"@prgm/sveltekit-progress-bar": "^3.0.2",
|
|
41
41
|
"@sveltejs/adapter-vercel": "^6.3.3",
|
|
42
|
-
"@sveltejs/kit": "^2.
|
|
43
|
-
"@sveltejs/package": "^2.5.
|
|
44
|
-
"@sveltejs/vite-plugin-svelte": "^7.
|
|
45
|
-
"@tailwindcss/typography": "^0.5.
|
|
46
|
-
"@tailwindcss/vite": "^4.
|
|
47
|
-
"@types/node": "^25.
|
|
42
|
+
"@sveltejs/kit": "^2.65.1",
|
|
43
|
+
"@sveltejs/package": "^2.5.8",
|
|
44
|
+
"@sveltejs/vite-plugin-svelte": "^7.1.2",
|
|
45
|
+
"@tailwindcss/typography": "^0.5.20",
|
|
46
|
+
"@tailwindcss/vite": "^4.3.1",
|
|
47
|
+
"@types/node": "^25.9.3",
|
|
48
48
|
"clsx": "^2.1.1",
|
|
49
49
|
"gray-matter": "^4.0.3",
|
|
50
50
|
"mdsvex": "^0.12.7",
|
|
51
51
|
"mode-watcher": "^1.1.0",
|
|
52
|
-
"prettier": "^3.8.
|
|
52
|
+
"prettier": "^3.8.4",
|
|
53
53
|
"prettier-plugin-imports": "^4.3.3",
|
|
54
|
-
"prettier-plugin-svelte": "^
|
|
55
|
-
"prettier-plugin-tailwindcss": "^0.
|
|
56
|
-
"publint": "^0.3.
|
|
54
|
+
"prettier-plugin-svelte": "^4.1.1",
|
|
55
|
+
"prettier-plugin-tailwindcss": "^0.8.0",
|
|
56
|
+
"publint": "^0.3.21",
|
|
57
57
|
"rehype-external-links": "^3.0.0",
|
|
58
58
|
"rehype-slug": "^6.0.0",
|
|
59
|
-
"shiki": "^4.0
|
|
60
|
-
"svelte": "^5.
|
|
61
|
-
"svelte-check": "^4.
|
|
62
|
-
"tailwind-merge": "^3.
|
|
63
|
-
"tailwindcss": "^4.
|
|
64
|
-
"typescript": "^
|
|
59
|
+
"shiki": "^4.2.0",
|
|
60
|
+
"svelte": "^5.56.3",
|
|
61
|
+
"svelte-check": "^4.6.0",
|
|
62
|
+
"tailwind-merge": "^3.6.0",
|
|
63
|
+
"tailwindcss": "^4.3.1",
|
|
64
|
+
"typescript": "^6.0.3",
|
|
65
65
|
"unist-util-visit": "^5.1.0",
|
|
66
|
-
"vite": "^8.0.
|
|
66
|
+
"vite": "^8.0.16"
|
|
67
67
|
},
|
|
68
68
|
"keywords": [
|
|
69
69
|
"svelte"
|
|
70
70
|
],
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@floating-ui/dom": "^1.7.6",
|
|
73
|
-
"focus-trap": "^8.
|
|
73
|
+
"focus-trap": "^8.2.1"
|
|
74
74
|
}
|
|
75
75
|
}
|