bits-ui 1.0.0-next.93 → 1.0.0-next.94

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.
@@ -44,7 +44,7 @@ class CommandRootState {
44
44
  // internal state that we mutate in batches and publish to the `state` at once
45
45
  _commandState = $state(null);
46
46
  #snapshot() {
47
- return this._commandState;
47
+ return $state.snapshot(this._commandState);
48
48
  }
49
49
  #scheduleUpdate() {
50
50
  if (this.#updateScheduled)
@@ -56,7 +56,7 @@ class CommandRootState {
56
56
  const hasStateChanged = !Object.is(this.commandState, currentState);
57
57
  if (hasStateChanged) {
58
58
  this.commandState = currentState;
59
- this.opts.onStateChange?.current?.($state.snapshot(currentState));
59
+ this.opts.onStateChange?.current?.(currentState);
60
60
  }
61
61
  });
62
62
  }
@@ -319,6 +319,7 @@ declare class NavigationMenuViewportState {
319
319
  readonly "--bits-navigation-menu-viewport-width": string | undefined;
320
320
  readonly "--bits-navigation-menu-viewport-height": string | undefined;
321
321
  };
322
+ readonly "data-navigation-menu-viewport": "";
322
323
  readonly onpointerenter: () => void;
323
324
  readonly onpointerleave: () => void;
324
325
  };
@@ -26,6 +26,7 @@ const NAVIGATION_MENU_LIST_ATTR = "data-navigation-menu-list";
26
26
  const NAVIGATION_MENU_TRIGGER_ATTR = "data-navigation-menu-trigger";
27
27
  const NAVIGATION_MENU_CONTENT_ATTR = "data-navigation-menu-content";
28
28
  const NAVIGATION_MENU_LINK_ATTR = "data-navigation-menu-link";
29
+ const NAVIGATION_MENU_VIEWPORT_ATTR = "data-navigation-menu-viewport";
29
30
  class NavigationMenuProviderState {
30
31
  opts;
31
32
  indicatorTrackRef = box(null);
@@ -704,6 +705,7 @@ class NavigationMenuViewportState {
704
705
  "--bits-navigation-menu-viewport-width": this.viewportWidth,
705
706
  "--bits-navigation-menu-viewport-height": this.viewportHeight,
706
707
  },
708
+ [NAVIGATION_MENU_VIEWPORT_ATTR]: "",
707
709
  onpointerenter: this.context.onContentEnter,
708
710
  onpointerleave: this.context.onContentLeave,
709
711
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bits-ui",
3
- "version": "1.0.0-next.93",
3
+ "version": "1.0.0-next.94",
4
4
  "license": "MIT",
5
5
  "repository": "github:huntabyte/bits-ui",
6
6
  "funding": "https://github.com/sponsors/huntabyte",