web-manager 4.0.26 → 4.0.27

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/README.md CHANGED
@@ -286,9 +286,12 @@ Web Manager includes a powerful data binding system that automatically updates y
286
286
  <!-- Hide element when condition is true -->
287
287
  <div data-wm-bind="@hide auth.user">Please log in</div>
288
288
 
289
+ <!-- Or, show element when condition is false -->
290
+ <div data-wm-bind="@show !auth.user">Please log in</div>
291
+
289
292
  <!-- Comparisons -->
290
293
  <div data-wm-bind="@show auth.account.subscription.plan === 'premium'">Premium features</div>
291
- <div data-wm-bind="@hide settings.notifications === false">Notifications enabled</div>
294
+ <div data-wm-bind="@hide settings.custom === 'value">Notifications enabled</div>
292
295
  ```
293
296
 
294
297
  #### Usage in JavaScript
@@ -300,13 +303,9 @@ Manager.auth().listen({ account: true }, (result) => {
300
303
 
301
304
  // Update bindings with custom data
302
305
  Manager.bindings().update({
303
- settings: { theme: 'dark', language: 'en' },
304
- subscription: { plan: 'premium', expiresAt: '2024-12-31' }
306
+ settings: { custom: 'value' },
305
307
  });
306
308
 
307
- // Set individual properties
308
- Manager.bindings().set('currentPage', 'dashboard');
309
-
310
309
  // Get current binding context
311
310
  const context = Manager.bindings().getContext();
312
311
 
package/dist/index.js CHANGED
@@ -108,6 +108,9 @@ class Manager {
108
108
  // Old IE force polyfill
109
109
  // await this._loadPolyfillsIfNeeded();
110
110
 
111
+ // Update bindings with config
112
+ this.bindings().update({ config: this.config });
113
+
111
114
  return this;
112
115
  } catch (error) {
113
116
  console.error('Manager initialization error:', error);
@@ -13,7 +13,7 @@ class Bindings {
13
13
  ...data
14
14
  };
15
15
 
16
- // Get the top-level keys that were updated
16
+ // Get the top-level keys that were updating
17
17
  const updatedKeys = Object.keys(data);
18
18
 
19
19
  this._updateBindings(this._context, updatedKeys);
@@ -38,7 +38,6 @@ class Bindings {
38
38
  /* @dev-only:start */
39
39
  {
40
40
  console.log('[Bindings] Updating bindings', context, updatedKeys);
41
-
42
41
  }
43
42
  /* @dev-only:end */
44
43
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-manager",
3
- "version": "4.0.26",
3
+ "version": "4.0.27",
4
4
  "description": "Easily access important variables such as the query string, current domain, and current page in a single object.",
5
5
  "main": "dist/index.js",
6
6
  "module": "src/index.js",