{
  "id": "@typed/ui#Collection.byDomOrder",
  "canonicalId": "@typed/ui/Collection#byDomOrder",
  "symbol": {
    "id": "@typed/ui#Collection.byDomOrder",
    "packageName": "@typed/ui",
    "moduleName": ".",
    "exportName": "Collection.byDomOrder",
    "kind": "function",
    "signatures": [
      "export declare function byDomOrder<ItemType extends Item<unknown, object>>(items: readonly ItemType[]): readonly ItemType[];"
    ],
    "summary": "Returns a sorted copy using compareDocumentPosition; items without comparable mounted elements\nretain an equivalent ordering position.",
    "sections": {
      "Why": "Separating this deterministic policy from event wiring lets applications test it directly and\nreuse it in custom composites.",
      "Ownership and lifetime": "This is a synchronous calculation. It acquires no resources and does not mutate the input array,\nstate, event, or DOM."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import * as Collection from \"@typed/ui/Collection\";\n\nconst ordered = Collection.byDomOrder([{ id: \"body\", element: document.body }]);"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/ui/src/Collection.ts",
      "line": 305
    },
    "since": "1.0.0",
    "category": "Collection ordering"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/ui#Collection.byDomOrder",
    "packageName": "@typed/ui",
    "packageVersion": "1.0.0-beta.13",
    "moduleName": ".",
    "consumerSpecifier": "@typed/ui",
    "exportName": "Collection",
    "qualifiedName": "Collection.byDomOrder",
    "declarationKey": "declaration:8226ff9a74e76d6772b4350f",
    "family": "function",
    "signatures": [
      "export declare function byDomOrder<ItemType extends Item<unknown, object>>(items: readonly ItemType[]): readonly ItemType[];"
    ],
    "sourceSpans": [
      {
        "file": "packages/ui/src/Collection.ts",
        "start": {
          "line": 305,
          "column": 1
        },
        "end": {
          "line": 318,
          "column": 2
        }
      }
    ],
    "aliases": [
      "@typed/ui/Collection#byDomOrder",
      "@typed/ui/index#Collection.byDomOrder"
    ],
    "isAlias": true,
    "parentId": "@typed/ui#Collection",
    "static": false,
    "importedFrom": "declaration:8226ff9a74e76d6772b4350f"
  },
  "declaration": {
    "declarationKey": "declaration:8226ff9a74e76d6772b4350f",
    "name": "byDomOrder",
    "family": "function",
    "facets": [
      {
        "family": "function",
        "syntaxKind": "FunctionDeclaration",
        "signatures": [
          "export declare function byDomOrder<ItemType extends Item<unknown, object>>(items: readonly ItemType[]): readonly ItemType[];"
        ],
        "typeParameters": [
          "ItemType extends Item<unknown, object>"
        ],
        "sourceSpans": [
          {
            "file": "packages/ui/src/Collection.ts",
            "start": {
              "line": 305,
              "column": 1
            },
            "end": {
              "line": 318,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare function byDomOrder<ItemType extends Item<unknown, object>>(items: readonly ItemType[]): readonly ItemType[];"
    ],
    "typeParameters": [
      "ItemType extends Item<unknown, object>"
    ],
    "summary": "Returns a sorted copy using compareDocumentPosition; items without comparable mounted elements\nretain an equivalent ordering position.",
    "sections": {
      "Why": "Separating this deterministic policy from event wiring lets applications test it directly and\nreuse it in custom composites.",
      "Ownership and lifetime": "This is a synchronous calculation. It acquires no resources and does not mutate the input array,\nstate, event, or DOM."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import * as Collection from \"@typed/ui/Collection\";\n\nconst ordered = Collection.byDomOrder([{ id: \"body\", element: document.body }]);"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/ui/src/Collection.ts",
        "start": {
          "line": 305,
          "column": 1
        },
        "end": {
          "line": 318,
          "column": 2
        }
      }
    ],
    "since": "1.0.0",
    "category": "Collection ordering"
  }
}
