mountain-ui 1.0.136 → 1.0.137

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mountain-ui",
3
3
  "private": false,
4
- "version": "1.0.136",
4
+ "version": "1.0.137",
5
5
  "description": "A comprehensive UI component library for ERP systems with field types, entities, and registry management built with Svelte",
6
6
  "type": "module",
7
7
  "module": "index.js",
@@ -8,6 +8,7 @@
8
8
  import Icon from '../../../components/Icons/Icon.svelte';
9
9
  import { projectRegistry } from '../../projectRegistry/registry.svelte';
10
10
  import NavbarIcon from './NavbarIcon.svelte';
11
+ import { onMount } from 'svelte';
11
12
 
12
13
  let {} = $props();
13
14
 
@@ -6,9 +6,10 @@ function createNavigationRegistry() {
6
6
  const tinyWidth = 50
7
7
  const bigWidth = 255
8
8
 
9
+
9
10
  const navbarState = writable({
10
- isOpen: false,
11
- width: 0,
11
+ isOpen:false,
12
+ width:0,
12
13
  })
13
14
 
14
15
  const all = derived(store, ($navigation_element) => Object.values($navigation_element));
@@ -6,6 +6,7 @@ import { projectRegistry } from "./registry.svelte";
6
6
  import { navigationRegistry } from "../navigationRegistry/registry.svelte";
7
7
  import { registerNavigation } from "../navigationRegistry/registerNavigation";
8
8
  import { registerWidgetTypes } from "../widgetTypeRegistry/registerWidgetTypes";
9
+ import { get } from "svelte/store";
9
10
 
10
11
  export function createProject(config = {}) {
11
12
  const project = {
@@ -107,6 +108,23 @@ export function createProject(config = {}) {
107
108
  await registerNavigation()
108
109
 
109
110
  navigationRegistry.enableNavbar()
111
+
112
+
113
+ const isOpen = localStorage.getItem('navbar_mountain_ui_is_open') === 'true';
114
+
115
+ if (isOpen) {
116
+ navigationRegistry.toggleNavbar();
117
+ }
118
+
119
+
120
+ const navigation = navigationRegistry.selectNavbarState()
121
+
122
+ console.log(get(navigation));
123
+
124
+
125
+ navigation.subscribe((val)=>{
126
+ localStorage.setItem('navbar_mountain_ui_is_open', val.isOpen)
127
+ })
110
128
  };
111
129
 
112
130
  project.getPercent = () => {
@@ -59,8 +59,6 @@
59
59
 
60
60
  await project.init(`/exemple/${$page.params.project_normalized_name}`);
61
61
 
62
- navigationRegistry.enableNavbar();
63
-
64
62
  loading = false;
65
63
 
66
64
  () => {