{
  "id": "@typed/ui#Composite.makeState",
  "canonicalId": "@typed/ui/Composite#makeState",
  "symbol": {
    "id": "@typed/ui#Composite.makeState",
    "packageName": "@typed/ui",
    "moduleName": ".",
    "exportName": "Composite.makeState",
    "kind": "function",
    "signatures": [
      "export declare function makeState(initial?: InitialState): Effect.Effect<RefSubject.HydratedRefSubject<{\n    readonly activeId: string | null;\n    readonly orientation: \"horizontal\" | \"vertical\" | \"both\";\n    readonly loop: boolean;\n    readonly rtl: boolean;\n    readonly virtualFocus: boolean;\n}, Schema.SchemaError, never, never>, never, import(\"effect/Scope\").Scope>;"
    ],
    "summary": "Creates hydrated Composite state. activeId defaults to null, orientation to horizontal, loop to\ntrue, RTL and virtual focus to false.",
    "sections": {
      "Why": "State and collection ownership can be composed and tested independently from any renderer.",
      "Ownership and lifetime": "The returned Effect creates the RefSubject when run. That state is renderer-independent;\ncollection registrations belong to the separate Scope that runs register or ref, not to state\ncreation."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import * as Effect from \"effect/Effect\";\nimport * as Collection from \"@typed/ui/Collection\";\nimport * as Composite from \"@typed/ui/Composite\";\n\nconst program = Effect.scoped(\n  Effect.gen(function* () {\n    const state = yield* Composite.makeState({});\n    const collection = yield* Collection.makeState<string>();\n    return { state: yield* state, collection: yield* collection };\n  }),\n);"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/ui/src/Composite.ts",
      "line": 418
    },
    "since": "1.0.0",
    "category": "Active item state"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/ui#Composite.makeState",
    "packageName": "@typed/ui",
    "packageVersion": "1.0.0-beta.7",
    "moduleName": ".",
    "consumerSpecifier": "@typed/ui",
    "exportName": "Composite",
    "qualifiedName": "Composite.makeState",
    "declarationKey": "declaration:b96c28b8c2c77b9474bd1650",
    "family": "function",
    "signatures": [
      "export declare function makeState(initial?: InitialState): Effect.Effect<RefSubject.HydratedRefSubject<{\n    readonly activeId: string | null;\n    readonly orientation: \"horizontal\" | \"vertical\" | \"both\";\n    readonly loop: boolean;\n    readonly rtl: boolean;\n    readonly virtualFocus: boolean;\n}, Schema.SchemaError, never, never>, never, import(\"effect/Scope\").Scope>;"
    ],
    "sourceSpans": [
      {
        "file": "packages/ui/src/Composite.ts",
        "start": {
          "line": 418,
          "column": 1
        },
        "end": {
          "line": 426,
          "column": 2
        }
      }
    ],
    "aliases": [
      "@typed/ui/Composite#makeState",
      "@typed/ui/index#Composite.makeState"
    ],
    "isAlias": true,
    "parentId": "@typed/ui#Composite",
    "static": false,
    "importedFrom": "declaration:b96c28b8c2c77b9474bd1650"
  },
  "declaration": {
    "declarationKey": "declaration:b96c28b8c2c77b9474bd1650",
    "name": "makeState",
    "family": "function",
    "facets": [
      {
        "family": "function",
        "syntaxKind": "FunctionDeclaration",
        "signatures": [
          "export declare function makeState(initial?: InitialState): Effect.Effect<RefSubject.HydratedRefSubject<{\n    readonly activeId: string | null;\n    readonly orientation: \"horizontal\" | \"vertical\" | \"both\";\n    readonly loop: boolean;\n    readonly rtl: boolean;\n    readonly virtualFocus: boolean;\n}, Schema.SchemaError, never, never>, never, import(\"effect/Scope\").Scope>;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/ui/src/Composite.ts",
            "start": {
              "line": 418,
              "column": 1
            },
            "end": {
              "line": 426,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare function makeState(initial?: InitialState): Effect.Effect<RefSubject.HydratedRefSubject<{\n    readonly activeId: string | null;\n    readonly orientation: \"horizontal\" | \"vertical\" | \"both\";\n    readonly loop: boolean;\n    readonly rtl: boolean;\n    readonly virtualFocus: boolean;\n}, Schema.SchemaError, never, never>, never, import(\"effect/Scope\").Scope>;"
    ],
    "typeParameters": [],
    "summary": "Creates hydrated Composite state. activeId defaults to null, orientation to horizontal, loop to\ntrue, RTL and virtual focus to false.",
    "sections": {
      "Why": "State and collection ownership can be composed and tested independently from any renderer.",
      "Ownership and lifetime": "The returned Effect creates the RefSubject when run. That state is renderer-independent;\ncollection registrations belong to the separate Scope that runs register or ref, not to state\ncreation."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import * as Effect from \"effect/Effect\";\nimport * as Collection from \"@typed/ui/Collection\";\nimport * as Composite from \"@typed/ui/Composite\";\n\nconst program = Effect.scoped(\n  Effect.gen(function* () {\n    const state = yield* Composite.makeState({});\n    const collection = yield* Collection.makeState<string>();\n    return { state: yield* state, collection: yield* collection };\n  }),\n);"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/ui/src/Composite.ts",
        "start": {
          "line": 418,
          "column": 1
        },
        "end": {
          "line": 426,
          "column": 2
        }
      }
    ],
    "since": "1.0.0",
    "category": "Active item state"
  }
}
