namespace / @typed/ui

Collection

Public namespace exposed as Collection from @typed/ui.

Learn this UI primitive →

Package version
1.0.0-beta.7
Category
namespace

Import

import { Collection } from "@typed/ui";

This public exposure is a re-export. Its import path is supported; declaration documentation is shared with the other public exposures below.

Signatures

export * as Collection from "./Collection.js";

Members

  • Collection.Item

    Public Collection.Item behavioral model.

  • Collection.State

    Complete renderer-independent state for Collection.

  • Collection.byDomOrder

    Returns a sorted copy using compareDocumentPosition; items without comparable mounted elements retain an equivalent ordering position.

  • Collection.enabledItems

    Returns a new array excluding only items whose disabled flag is exactly true.

  • Collection.makeState

    Creates hydrated Collection state. The collection starts with the supplied immutable item array, or empty.

  • Collection.ref

    Registers a mounted element and removes it automatically with the Scope in which the returned Effect is run.

  • Collection.register

    Upserts an item immediately and installs a finalizer in the Scope that runs this Effect; the finalizer removes only that exact registration.

  • Collection.unregister

    Removes every registered item with the supplied id and retains the remaining order.

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source