Skip to content

resolveEditSlot

resolveEditSlot<TComponent>(props): object

Defined in: packages/core/src/components/resolve.ts:168

Resolves ONE flat edit.* slot id by merging built-ins, then the root-level config, then the collection/global-level config (decision 14 — G’s existing root→resource merge model, reused for H’s slots). Built-ins seed the additive list first so a project can hide one with { id: "vex.save", hidden: true } at either level, and order/before/after reorder freely from there — only array position (among same-order entries) reflects the builtins-then-root-then-resource merge order.

Override chains merge per built-in id: root’s chain composes first (outermost, decision 15), the resource’s chain’s entries follow. Every resolved override key must name the id of a contribution that survived into the resolved contributions list — the renderer cannot wrap a built-in a hide directive already removed, or a plugin id that was never contributed here.

TComponent extends ComponentHKT

ComponentContributionInput<TComponent, EditSlotProps>[]

EditSlotConfigInput<TComponent>

EditSlotConfigInput<TComponent>

SlotId

object

The slot’s final ordered contributions, and its overrides keyed by built-in id.

contributions: ResolvedComponentContribution<TComponent, EditSlotProps>[]

overrides: Record<string, ResolvedComponentOverride<TComponent, EditSlotProps>[]>

From resolveComponentContributions on a genuine duplicate contribution id; from resolveComponentOverrides on a duplicate override id within one built-in’s merged chain; or when an override key names an id absent from the resolved contributions list (decision 16).