lithesome 0.23.4 → 0.23.6

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.
@@ -27,13 +27,7 @@
27
27
  let ctx = createDropzoneRootContext({
28
28
  id: stateValue(() => id),
29
29
  ref: stateValue(() => ref!),
30
- files: stateValue(
31
- () => files,
32
- (v) => {
33
- files = v;
34
- onFilesChanged?.(v);
35
- }
36
- ),
30
+ files: stateValue(() => files),
37
31
  disabled: stateValue(
38
32
  () => disabled,
39
33
  (v) => (disabled = v)
@@ -43,7 +37,8 @@
43
37
  accept: stateValue(() => accept),
44
38
  onError,
45
39
  onSuccess,
46
- validate
40
+ validate,
41
+ onFilesChanged
47
42
  });
48
43
  </script>
49
44
 
@@ -10,6 +10,10 @@ class DropzoneRoot {
10
10
  sharedIds = new SvelteMap();
11
11
  constructor(props) {
12
12
  this.$$ = props;
13
+ $effect(() => {
14
+ this.$$.onFilesChanged?.($state.snapshot(this.$$.files.val));
15
+ this.errorsFound = false;
16
+ });
13
17
  }
14
18
  checkFileType = (file) => {
15
19
  const fileExtension = file.name.split('.').pop()?.toLowerCase();
@@ -25,4 +25,4 @@
25
25
  });
26
26
  </script>
27
27
 
28
- <Element bind:ref {children} {custom} {ctx} {...props} />
28
+ <Element bind:ref as="button" {children} {custom} {ctx} {...props} />
@@ -1,6 +1,5 @@
1
1
  import { on } from 'svelte/events';
2
2
  import { isBrowser, isObject } from './is.js';
3
- import { log } from './log.js';
4
3
  /**
5
4
  * Calculates the index position of the action given.
6
5
  * @param action Which direction to navigate the index.
package/package.json CHANGED
@@ -1,75 +1,75 @@
1
- {
2
- "name": "lithesome",
3
- "version": "0.23.4",
4
- "scripts": {
5
- "dev": "vite dev",
6
- "build": "bun --bun vite build && npm run prepack",
7
- "preview": "bun --bun vite preview",
8
- "prepare": "svelte-kit sync || echo ''",
9
- "prepack": "svelte-kit sync && svelte-package && publint",
10
- "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
11
- "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
12
- "format": "prettier --write .",
13
- "lint": "prettier --check ."
14
- },
15
- "files": [
16
- "dist",
17
- "!dist/**/*.test.*",
18
- "!dist/**/*.spec.*"
19
- ],
20
- "sideEffects": [
21
- "**/*.css"
22
- ],
23
- "svelte": "./dist/index.js",
24
- "types": "./dist/index.d.ts",
25
- "type": "module",
26
- "exports": {
27
- ".": {
28
- "types": "./dist/index.d.ts",
29
- "svelte": "./dist/index.js"
30
- },
31
- "./types": {
32
- "types": "./dist/types/index.d.ts"
33
- }
34
- },
35
- "peerDependencies": {
36
- "svelte": "^5.0.0"
37
- },
38
- "devDependencies": {
39
- "@lucide/svelte": "^0.541.0",
40
- "@prgm/sveltekit-progress-bar": "^3.0.2",
41
- "@sveltejs/adapter-vercel": "^5.6.3",
42
- "@sveltejs/kit": "^2.22.0",
43
- "@sveltejs/package": "^2.0.0",
44
- "@sveltejs/vite-plugin-svelte": "^6.0.0",
45
- "@tailwindcss/typography": "^0.5.16",
46
- "@tailwindcss/vite": "^4.0.0",
47
- "@types/node": "^24.3.0",
48
- "clsx": "^2.1.1",
49
- "gray-matter": "^4.0.3",
50
- "mdsvex": "^0.12.6",
51
- "mode-watcher": "^1.1.0",
52
- "prettier": "^3.4.2",
53
- "prettier-plugin-imports": "^4.3.3",
54
- "prettier-plugin-svelte": "^3.3.3",
55
- "prettier-plugin-tailwindcss": "^0.6.11",
56
- "publint": "^0.3.2",
57
- "rehype-external-links": "^3.0.0",
58
- "rehype-slug": "^6.0.0",
59
- "shiki": "^3.11.0",
60
- "svelte": "^5.0.0",
61
- "svelte-check": "^4.0.0",
62
- "tailwind-merge": "^3.3.1",
63
- "tailwindcss": "^4.0.0",
64
- "typescript": "^5.0.0",
65
- "unist-util-visit": "^5.0.0",
66
- "vite": "^7.0.4"
67
- },
68
- "keywords": [
69
- "svelte"
70
- ],
71
- "dependencies": {
72
- "@floating-ui/dom": "^1.7.4",
73
- "focus-trap": "^7.6.5"
74
- }
75
- }
1
+ {
2
+ "name": "lithesome",
3
+ "version": "0.23.6",
4
+ "scripts": {
5
+ "dev": "vite dev",
6
+ "build": "bun --bun vite build && npm run prepack",
7
+ "preview": "bun --bun vite preview",
8
+ "prepare": "svelte-kit sync || echo ''",
9
+ "prepack": "svelte-kit sync && svelte-package && publint",
10
+ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
11
+ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
12
+ "format": "prettier --write .",
13
+ "lint": "prettier --check ."
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "!dist/**/*.test.*",
18
+ "!dist/**/*.spec.*"
19
+ ],
20
+ "sideEffects": [
21
+ "**/*.css"
22
+ ],
23
+ "svelte": "./dist/index.js",
24
+ "types": "./dist/index.d.ts",
25
+ "type": "module",
26
+ "exports": {
27
+ ".": {
28
+ "types": "./dist/index.d.ts",
29
+ "svelte": "./dist/index.js"
30
+ },
31
+ "./types": {
32
+ "types": "./dist/types/index.d.ts"
33
+ }
34
+ },
35
+ "peerDependencies": {
36
+ "svelte": "^5.53.12"
37
+ },
38
+ "devDependencies": {
39
+ "@lucide/svelte": "^0.577.0",
40
+ "@prgm/sveltekit-progress-bar": "^3.0.2",
41
+ "@sveltejs/adapter-vercel": "^6.3.3",
42
+ "@sveltejs/kit": "^2.55.0",
43
+ "@sveltejs/package": "^2.5.7",
44
+ "@sveltejs/vite-plugin-svelte": "^7.0.0",
45
+ "@tailwindcss/typography": "^0.5.19",
46
+ "@tailwindcss/vite": "^4.2.1",
47
+ "@types/node": "^25.5.0",
48
+ "clsx": "^2.1.1",
49
+ "gray-matter": "^4.0.3",
50
+ "mdsvex": "^0.12.7",
51
+ "mode-watcher": "^1.1.0",
52
+ "prettier": "^3.8.1",
53
+ "prettier-plugin-imports": "^4.3.3",
54
+ "prettier-plugin-svelte": "^3.5.1",
55
+ "prettier-plugin-tailwindcss": "^0.7.2",
56
+ "publint": "^0.3.18",
57
+ "rehype-external-links": "^3.0.0",
58
+ "rehype-slug": "^6.0.0",
59
+ "shiki": "^4.0.2",
60
+ "svelte": "^5.53.12",
61
+ "svelte-check": "^4.4.5",
62
+ "tailwind-merge": "^3.5.0",
63
+ "tailwindcss": "^4.2.1",
64
+ "typescript": "^5.9.3",
65
+ "unist-util-visit": "^5.1.0",
66
+ "vite": "^8.0.0"
67
+ },
68
+ "keywords": [
69
+ "svelte"
70
+ ],
71
+ "dependencies": {
72
+ "@floating-ui/dom": "^1.7.6",
73
+ "focus-trap": "^8.0.0"
74
+ }
75
+ }