@fuzdev/fuz_ui 0.215.0 → 0.216.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.
@@ -1,5 +1,5 @@
1
1
  import { type ColorScheme } from '@fuzdev/fuz_css/theme.ts';
2
- import type { Theme } from '@fuzdev/fuz_css/variable.ts';
2
+ import { type Theme } from '@fuzdev/fuz_css/variable.ts';
3
3
  export interface ThemeStateJson {
4
4
  theme: Theme;
5
5
  color_scheme: ColorScheme;
@@ -1 +1 @@
1
- {"version":3,"file":"theme_state.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/theme_state.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAOzD,MAAM,WAAW,cAAc;IAC9B,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,EAAE,WAAW,CAAC;CAC1B;AAED,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAExD,qBAAa,UAAU;IACtB,KAAK,EAAE,KAAK,CAAiB;IAC7B,YAAY,EAAE,WAAW,CAAiB;gBAE9B,OAAO,CAAC,EAAE,iBAAiB;IAUvC,MAAM,IAAI,cAAc;CAMxB;AACD,eAAO,MAAM,mBAAmB;2CAAwB,UAAU;4BAAV,UAAU;uBAAV,UAAU,WAAV,UAAU;CAAG,CAAC;AAEtE,eAAO,MAAM,iBAAiB,GAAI,cAAc,WAAW,GAAG,IAAI,KAAG,IAOpE,CAAC;AAEF,eAAO,MAAM,wBAAwB,qBAAqB,CAAC;AAC3D,eAAO,MAAM,iBAAiB,cAAc,CAAC;AAE7C,eAAO,MAAM,iBAAiB,GAC7B,cAAc,WAAW,GAAG,IAAI,EAChC,YAA8B,KAC5B,IAEF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC7B,WAAU,WAAoB,E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,MAAM,UAAU,GAAI,WAAU,KAA0B,EAAE,YAAuB,KAAG,KACrC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { color_schemes } from '@fuzdev/fuz_css/theme.ts';
2
+ import { parse_theme } from '@fuzdev/fuz_css/variable.ts';
2
3
  import { default_themes } from '@fuzdev/fuz_css/themes.ts';
3
4
  import { BROWSER } from 'esm-env';
4
5
  import { create_context } from './context_helpers.js';
@@ -40,6 +41,6 @@ export const load_color_scheme = (fallback = 'auto', key = COLOR_SCHEME_STORAGE_
40
41
  export const save_theme = (theme, key = THEME_STORAGE_KEY) => {
41
42
  save_to_storage(key, theme, true);
42
43
  };
43
- export const load_theme = (fallback = default_themes[0], key = THEME_STORAGE_KEY) => load_from_storage(key, true) ?? fallback; // TODO use `parse_theme` from fuz_css
44
+ export const load_theme = (fallback = default_themes[0], key = THEME_STORAGE_KEY) => load_from_storage(key, true, parse_theme) ?? fallback;
44
45
  // TODO move to fuz_css
45
46
  const parse_color_scheme = (value) => color_schemes.includes(value) ? value : null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fuzdev/fuz_ui",
3
- "version": "0.215.0",
3
+ "version": "0.216.1",
4
4
  "description": "Svelte UI library",
5
5
  "tagline": "friendly user zystem",
6
6
  "glyph": "🧶",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@fuzdev/fuz_code": ">=0.46.0",
41
- "@fuzdev/fuz_css": ">=0.67.0",
41
+ "@fuzdev/fuz_css": ">=0.68.0",
42
42
  "@fuzdev/fuz_util": ">=0.72.0",
43
43
  "@fuzdev/gro": ">=0.214.0",
44
44
  "@fuzdev/mdz": ">=0.2.0",
@@ -64,12 +64,12 @@
64
64
  "@changesets/changelog-git": "^0.2.1",
65
65
  "@fuzdev/blake3-wasm": "^0.2.0",
66
66
  "@fuzdev/fuz_code": "^0.53.0",
67
- "@fuzdev/fuz_css": "^0.67.0",
68
- "@fuzdev/fuz_schema": "^0.2.2",
69
- "@fuzdev/fuz_util": "^0.75.0",
70
- "@fuzdev/gro": "^0.218.0",
67
+ "@fuzdev/fuz_css": "^0.69.0",
68
+ "@fuzdev/fuz_schema": "^0.4.0",
69
+ "@fuzdev/fuz_util": "^0.76.0",
70
+ "@fuzdev/gro": "^0.219.0",
71
71
  "@fuzdev/mdz": "^0.5.0",
72
- "@ryanatkn/eslint-config": "^0.13.0",
72
+ "@ryanatkn/eslint-config": "^0.13.1",
73
73
  "@sveltejs/adapter-static": "^4.0.0",
74
74
  "@sveltejs/kit": "^3.0.1",
75
75
  "@sveltejs/package": "^3.0.0",
@@ -87,8 +87,7 @@
87
87
  "typescript": "^6.0.3",
88
88
  "typescript-eslint": "^8.71.1",
89
89
  "vite": "^8.3.4",
90
- "vitest": "^5.0.0",
91
- "zod": "^4.3.6"
90
+ "vitest": "^5.0.0"
92
91
  },
93
92
  "sideEffects": [
94
93
  "**/*.css"
@@ -1,5 +1,5 @@
1
1
  import { color_schemes, type ColorScheme } from '@fuzdev/fuz_css/theme.ts';
2
- import type { Theme } from '@fuzdev/fuz_css/variable.ts';
2
+ import { parse_theme, type Theme } from '@fuzdev/fuz_css/variable.ts';
3
3
  import { default_themes } from '@fuzdev/fuz_css/themes.ts';
4
4
  import { BROWSER } from 'esm-env';
5
5
 
@@ -65,7 +65,7 @@ export const save_theme = (theme: Theme | null, key = THEME_STORAGE_KEY): void =
65
65
  };
66
66
 
67
67
  export const load_theme = (fallback: Theme = default_themes[0]!, key = THEME_STORAGE_KEY): Theme =>
68
- load_from_storage<Theme>(key, true) ?? fallback; // TODO use `parse_theme` from fuz_css
68
+ load_from_storage(key, true, parse_theme) ?? fallback;
69
69
 
70
70
  // TODO move to fuz_css
71
71
  const parse_color_scheme = (value: unknown): ColorScheme | null =>