Skip to content

v1.0.2

Latest

Choose a tag to compare

@github-actions github-actions released this 29 Jul 01:28
8412889

Overview

🔧 Bug Fixes

  • Breadcrumbs: collapsed crumbs no longer strand focusable links in the accessibility tree, and the ellipsis can opt into a disclosure toggle (#614)
  • utilities: isArray now preserves element types, tuples and readonly when narrowing (#744)
  • utilities: isObject narrows to Record<string, any> so interfaces and negative branches work (#723)
  • Button,Toggle,Pagination: activate non-native as elements on Enter/Space (#645)
  • useProxyModel: keep a v-model value whose item has not rendered yet (#727)
  • v0: accept Vue 3.6 prereleases and surface npm discovery metadata (#720)
  • useResizeObserver: report border-box measurements so the box option is no longer a silent no-op (#724)

Other Commits

  • Collapsible: cover keyboard toggle for non-native activator elements (#641)

Patch Changes

  • #634 b8ae3be Thanks @sridhar-3009! - fix(Breadcrumbs): collapsed crumbs no longer strand focusable links in the accessibility tree, and the ellipsis can opt into a disclosure toggle (#614)

    Truncated crumbs are now marked inert rather than relying on display: none alone. Renderless consumers who bind attrs onto their own markup were shipping links that assistive technology could not see but the keyboard could still reach.

    A new Breadcrumbs.Activator reveals the collapsed crumbs. Place one inside Breadcrumbs.Ellipsis and the ellipsis becomes a disclosure — the ellipsis stays the list item and the Activator is the control, so the trail keeps a valid list structure. It ships aria-expanded, a count-aware label, and a data-state hook for styling.

    The default is unchanged — an ellipsis with no Activator stays hidden from assistive technology, so opt in where the collapsed levels matter.

  • #745 560c6f5 Thanks @johnleider! - fix(utilities): isArray now preserves element types, tuples and readonly when narrowing (#744)

    isArray narrowed everything to unknown[], which erased the element type of arrays whose elements involve any, turned readonly array unions into an intersection that is not an array of anything, and left the array constituent in place in the else branch. Guarding a readonly string[] | string gave you neither readonly string[] in the if nor string in the else.

    Narrowing is now exact: element types, tuple arity and readonly survive the guard, and the else branch drops exactly the array constituents. unknown and any inputs narrow as before (unknown[] and any[]), so mutation and assignment to unknown[] keep compiling.

    Not breaking — runtime is unchanged, and every input either narrows identically or more precisely than before.

  • #746 b6a90b6 Thanks @johnleider! - fix(utilities): isObject narrows to Record<string, any> so interfaces and negative branches work (#723)

    isObject previously narrowed to Record<string, unknown>. That destroyed known property types on interface-typed values (TypeScript never grants interfaces an implicit index signature) and left Record<string, any> members alive in the else branch of a union. Both are incorrect narrowing, not a strictness win.

    The predicate is now Record<string, any>. Runtime is unchanged. Not breaking — the widened predicate is assignable from the old one for any program that already typechecked.

  • #645 1cf1ce3 Thanks @sridhar-3009! - fix(Button,Toggle,Pagination): activate non-native as elements on Enter/Space (#645)

    ButtonRoot, ToggleRoot, and PaginationItem expose role="button" and tabindex when rendered with a non-native as element (e.g. as="div"), but browsers only synthesize a click from Enter/Space for native <button> elements — for everything else those were dead keys. All three now wire an onKeydown handler (only when as !== 'button') so keyboard users can activate them.

  • #727 adaace9 Thanks @johnleider! - fix(useProxyModel): keep a v-model value whose item has not rendered yet

    Setting a v-model to a value whose item registers later — selecting a tab that is only rendered once it becomes active, or an option in a list that has not mounted — was immediately reverted to the previous selection. useProxyModel already defers such values so late-registering items resolve them, but the same tick wrote the old selection back over the model, discarding the value before its item could register. When the model is a writable computed, that write ran the setter, so the revert also fired the consumer's own side effects.

    Values with no registered item are now held until their item registers; a value whose item exists but was refused (disabled, or blocked by mandatory) still reverts as before.

  • #720 6c157ff Thanks @johnleider! - fix(v0): accept Vue 3.6 prereleases and surface npm discovery metadata

    @vuetify/v0 now installs cleanly alongside vue@3.6.0-rc.x. The previous vue peer range of >=3.5.0 excluded prereleases per semver, so any project on a 3.6 release candidate hit ERESOLVE; the range is now >=3.5.0 || >=3.6.0-0. No change for projects on stable Vue.

    The package also publishes keywords, homepage, and bugs for the first time, and the description now leads with what the package is — headless, unstyled, accessible Vue 3 primitives and composables.

  • #725 6791e7b Thanks @johnleider! - fix(useResizeObserver): report border-box measurements so the box option is no longer a silent no-op (#724)

    useResizeObserver accepted box: 'border-box' but every entry it reported was content-box, so any element with padding or a border measured short by exactly that amount — with no type error and no warning. Entries now also carry borderBoxSize and contentBoxSize, matching the native ResizeObserverEntry:

    useResizeObserver(
      el,
      ([entry]) => {
        entry.contentRect.height; // 30 — content box, as before
        entry.borderBoxSize[0].blockSize; // 40 — with 4px padding and a 1px border
      },
      { box: "border-box" }
    );

    Both arrays are present on every entry regardless of box, so you can read the border box without changing any option. Unlike getBoundingClientRect(), they are layout values and are not scaled by CSS transforms.

    contentRect is unchanged — existing callbacks keep working as-is.

  • #641 497b328 Thanks @sridhar-3009! - test(Collapsible): cover keyboard toggle for non-native activator elements (#641)

    CollapsibleActivator already handles Enter/Space and sets role="button" for non-native as elements, but no test asserted that a non-native activator actually toggles the collapsible on Enter/Space. Adds two tests covering that gap.