@spaethtech/svelte-ui 0.7.1-dev.45.41387ea → 0.7.1-dev.46.8e420d1

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.
@@ -216,8 +216,13 @@
216
216
  return active;
217
217
  }
218
218
 
219
- // SSR-safe default the effect below corrects on mount.
220
- let currentMode = $state<SideBarMenuMode>("expanded");
219
+ // Resolve the mode synchronously on the CLIENT at init (from the real viewport width) so the first
220
+ // client render is already correct — no post-hydration flash from `expanded` → the actual mode. On
221
+ // the server `window` is undefined, so SSR emits `expanded`; the client corrects during hydration
222
+ // (not via a delayed effect). The effect below keeps it in sync on subsequent viewport changes.
223
+ let currentMode = $state<SideBarMenuMode>(
224
+ typeof window !== "undefined" ? resolveMode(effectiveModes, window.innerWidth) : "expanded",
225
+ );
221
226
 
222
227
  $effect(() => {
223
228
  const map = effectiveModes;
package/dist/index.d.ts CHANGED
@@ -41,7 +41,7 @@ export type { Columns, Gap } from "./components/field-group.js";
41
41
  export { default as Disclosure } from "./components/Disclosure.svelte";
42
42
  export { default as Accordion } from "./components/Accordion.svelte";
43
43
  export { default as SideBarMenu } from "./components/SideBarMenu/SideBarMenu.svelte";
44
- export type { SideBarMenuItem, SideBarMenuBadge, SideBarMenuBadgeVariant, SideBarMenuApi, } from "./components/SideBarMenu/SideBarMenu.svelte";
44
+ export type { SideBarMenuItem, SideBarMenuBadge, SideBarMenuBadgeVariant, SideBarMenuApi, SideBarMenuMode, } from "./components/SideBarMenu/SideBarMenu.svelte";
45
45
  export { default as TabStrip } from "./components/TabStrip/TabStrip.svelte";
46
46
  export type { TabDefinition } from "./components/TabStrip/TabStrip.svelte";
47
47
  export { default as DataTable } from "./components/DataTable.svelte";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaethtech/svelte-ui",
3
- "version": "0.7.1-dev.45.41387ea",
3
+ "version": "0.7.1-dev.46.8e420d1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/spaethtech/svelte-ui.git"