Member Junction
    Preparing search index...

    Platform-agnostic component registry. Manages compiled React components with namespace isolation and lifecycle management.

    Index

    Constructors

    Properties

    registryId: string

    Methods

    • Clear all components in a specific namespace

      Parameters

      • namespace: string = 'Global'

        Namespace to clear (default: 'Global')

      Returns number

      Number of components removed

    • Gets a component from the registry

      Parameters

      • name: string

        Component name

      • namespace: string = 'Global'

        Component namespace

      • Optionalversion: string

        Component version

      • OptionalcontentHash: string

        Optional content fingerprint. When provided, looks up the exact (name, namespace, version, contentHash) entry. When omitted, falls back to the most recently registered entry matching the other keys (existing behavior).

      Returns ComponentObject | undefined

      The component object if found, undefined otherwise

    • Gets all components in a namespace and version as a map

      Parameters

      • namespace: string = 'Global'

        Namespace to query (default: 'Global')

      • version: string = 'v1'

        Version to query (default: 'v1')

      Returns Record<string, ComponentObject>

      Object mapping component names to component objects

    • Gets registry statistics

      Returns {
          namespaces: number;
          newestComponent?: Date;
          oldestComponent?: Date;
          totalComponents: number;
          totalRefCount: number;
      }

      Object containing registry stats

    • Checks if a component exists in the registry

      Parameters

      • name: string

        Component name

      • namespace: string = 'Global'

        Component namespace

      • Optionalversion: string

        Component version

      • OptionalcontentHash: string

        Optional content fingerprint (see get)

      Returns boolean

      true if the component exists

    • Registers a compiled component

      Parameters

      • name: string

        Component name

      • component: ComponentObject

        Compiled component object

      • namespace: string = 'Global'

        Component namespace (default: 'Global')

      • version: string = 'v1'

        Component version (default: 'v1')

      • OptionalcontentHash: string

        Optional content fingerprint. When provided, the entry is keyed by (name, namespace, version, contentHash) so multiple specs that share (name, namespace, version) but carry different code (e.g. a registry-reference stub vs. an inline-code Studio export of the same artifact) coexist in the cache instead of clobbering each other.

      • Optionaltags: string[]

        Optional tags for categorization

      Returns ComponentMetadata

      The registered component's metadata

    • Decrements reference count for a component

      Parameters

      • name: string

        Component name

      • namespace: string = 'Global'

        Component namespace

      • Optionalversion: string

        Component version

      • OptionalcontentHash: string

        Optional content fingerprint (see get)

      Returns void

    • Removes a component from the registry

      Parameters

      • name: string

        Component name

      • namespace: string = 'Global'

        Component namespace

      • Optionalversion: string

        Component version

      • OptionalcontentHash: string

        Optional content fingerprint (see get)

      Returns boolean

      true if the component was removed