bits-ui 2.8.8 → 2.8.9

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.
@@ -10,7 +10,6 @@ import { type Direction, type Orientation } from "../../shared/index.js";
10
10
  import type { BitsFocusEvent, BitsKeyboardEvent, BitsMouseEvent, BitsPointerEvent, RefAttachment } from "../../internal/types.js";
11
11
  import type { FocusEventHandler, KeyboardEventHandler, MouseEventHandler, PointerEventHandler } from "svelte/elements";
12
12
  import { RovingFocusGroup } from "../../internal/roving-focus-group.js";
13
- declare const navigationMenuAttrs: import("../../internal/attrs.js").CreateBitsAttrsReturn<readonly ["root", "sub", "item", "list", "trigger", "content", "link", "viewport", "menu", "indicator"]>;
14
13
  export declare const NavigationMenuItemContext: Context<NavigationMenuItemState>;
15
14
  interface NavigationMenuProviderStateOpts extends ReadableBoxedValues<{
16
15
  dir: Direction;
@@ -122,6 +121,7 @@ export declare class NavigationMenuItemState {
122
121
  #private;
123
122
  static create(opts: NavigationMenuItemStateOpts): NavigationMenuItemState;
124
123
  readonly opts: NavigationMenuItemStateOpts;
124
+ readonly attachment: RefAttachment;
125
125
  readonly listContext: NavigationMenuListState;
126
126
  contentNode: HTMLElement | null;
127
127
  triggerNode: HTMLElement | null;
@@ -142,7 +142,6 @@ export declare class NavigationMenuItemState {
142
142
  onRootContentClose: () => void;
143
143
  onContentFocusOutside: () => void;
144
144
  props: {
145
- readonly [navigationMenuAttrs.item]: "";
146
145
  readonly id: string;
147
146
  };
148
147
  }
@@ -248,6 +248,7 @@ export class NavigationMenuItemState {
248
248
  return NavigationMenuItemContext.set(new NavigationMenuItemState(opts, NavigationMenuListContext.get()));
249
249
  }
250
250
  opts;
251
+ attachment;
251
252
  listContext;
252
253
  contentNode = $state(null);
253
254
  triggerNode = $state(null);
@@ -264,6 +265,7 @@ export class NavigationMenuItemState {
264
265
  this.opts = opts;
265
266
  this.listContext = listContext;
266
267
  this.domContext = new DOMContext(opts.ref);
268
+ this.attachment = attachRef(this.opts.ref);
267
269
  }
268
270
  #handleContentEntry = (side = "start") => {
269
271
  if (!this.contentNode)
@@ -287,6 +289,7 @@ export class NavigationMenuItemState {
287
289
  props = $derived.by(() => ({
288
290
  id: this.opts.id.current,
289
291
  [navigationMenuAttrs.item]: "",
292
+ ...this.attachment,
290
293
  }));
291
294
  }
292
295
  export class NavigationMenuTriggerState {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bits-ui",
3
- "version": "2.8.8",
3
+ "version": "2.8.9",
4
4
  "license": "MIT",
5
5
  "repository": "github:huntabyte/bits-ui",
6
6
  "funding": "https://github.com/sponsors/huntabyte",
@@ -41,8 +41,8 @@
41
41
  "@floating-ui/core": "^1.7.1",
42
42
  "@floating-ui/dom": "^1.7.1",
43
43
  "esm-env": "^1.1.2",
44
- "runed": "^0.28.0",
45
- "svelte-toolbelt": "^0.9.2",
44
+ "runed": "^0.29.1",
45
+ "svelte-toolbelt": "^0.9.3",
46
46
  "tabbable": "^6.2.0"
47
47
  },
48
48
  "peerDependencies": {