IslandServerFrame
The type an island's optional `serverFrame` declaration is checked against, read together with that island's own `editor` declaration.
The type an island’s optional serverFrame declaration is checked against, read
together with that island’s own editor declaration.
import type { IslandEditor, IslandServerFrame } from "@homepages/template-kit";
export const editor = { live: true } satisfies IslandEditor;export const serverFrame = false satisfies IslandServerFrame<typeof editor>;serverFrame answers a different question from "use client": not does this
component’s behavior need a browser — every island’s does — but does it produce
meaningful markup when called with no DOM and no effects. A component that returns
its content answers yes and says nothing; one that returns an empty mount element for
a library to draw into answers false, and the build then omits its implementation
from the renderer instead of loading a whole graph to emit an empty box.
This type resolves to true when editor.live is false, which makes the one
illegal combination a type error: an island with no server frame that also stays
static in the canvas is a permanent blank hole — it renders no markup for the editor
to show, and nothing hydrates it there to draw any. Validation refuses the same pair
at publish, for an island that declared it without this type.
Import from @homepages/template-kit or @homepages/template-kit/island-runtime.
Signature
Section titled “Signature”export type IslandServerFrame<E extends IslandEditor> = E["live"] extends false ? true : boolean;See also
Section titled “See also”deserializeIslandPropsislandIdserializeIslandPropsATTR_ISLAND_FRAMELESSATTR_ISLAND_IDATTR_ISLAND_KEYATTR_ISLAND_PROPSEDITOR_BRIDGE_PROPEDITOR_BRIDGE_PROTOCOLISLAND_CAPTURE_HOLDS_GLOBALISLAND_ELEMENTIslandPropsErrorEditorBridgeIslandEditorIslandModuleEditorBridgeSelectionEditorSelectionIslandComponentIslandEditorOptionsIslandProps