editorParts
Namespace of @v12-engine/editor
Members
addButton beta
addButton = "flex h-7 items-center justify-center gap-1.5 rounded-panel border border-dashed border-border-strong px-3 text-[13px] text-muted-foreground transition-colors hover:border-accent-line hover:text-foreground disabled:pointer-events-none disabled:opacity-40"A button that adds one more of something: a dashed edge
BRUSH_GROUPS beta
BRUSH_GROUPS: {
name: string;
brushes: BrushButton[];
}[]The brushes, in their families
brushBox beta
brushBox = "mt-2.5 grid gap-1.5 rounded-md border border-border bg-panel-deep p-2"The classes of the box that holds the brush's settings
brushLabel beta
brushLabel = "grid gap-0.5"The classes of a brush setting's label and its field, stacked
button beta
button = "rounded-panel border border-border bg-panel-deep transition-colors hover:border-border-strong hover:bg-panel-raised disabled:opacity-40 disabled:hover:border-border disabled:hover:bg-panel-deep"A dark button with a fine edge, lighter under the pointer
chip beta
chip = "rounded-panel border border-border bg-panel-deep transition-colors hover:border-border-strong hover:bg-panel-raised disabled:opacity-40 disabled:hover:border-border disabled:hover:bg-panel-deep rounded-full! px-2.5 py-0.5 text-[12px]"The classes of one chip, a rounded button
chips beta
chips = "mb-1.5 flex min-h-[26px] flex-wrap gap-[3px]"The classes of a row of chips
chosen beta
chosen = "border-accent-line! bg-accent-soft! text-accent"The same for what is picked: tinted with the accent, its edge and text
control beta
control = "rounded-panel border border-border bg-panel-deep transition-colors hover:border-border-strong hover:bg-panel-raised disabled:opacity-40 disabled:hover:border-border disabled:hover:bg-panel-deep px-2 py-1"The classes of a button of the editor's panels, with padding for a control
createDoodadGroups beta
export declare function createDoodadGroups(client: () => PanelClient): () => {
name: string;
models: string[];
}[];The models that can be put down as scenery, by where they are from and their category: the game's list, the map's own, the game's folder's and the project's shared folder's by their categories (EditorClient.assetCategoryOf), and each group of @v12-engine/assets (Nature first) or the category the game puts its files in
createDoodadModels beta
export declare function createDoodadModels(client: () => PanelClient): () => string[];Every model there is to put down as scenery: the view's, the game's and the shared ones while developing, the map's own
css beta
css: (color: readonly number[]) => stringTurns a colour of the map (RGB, 0..1 each) into a CSS rgb() colour
degrees beta
degrees: (radians: number) => numberTurns radians into degrees, rounded to a whole number
emptyBox beta
emptyBox = "rounded-md border border-dashed border-border-strong px-3.5 py-5 text-center text-[13px] text-faint-foreground"What says there is nothing yet, and how to make some: a dashed box
foldBar beta
foldBar = "h-[38px] gap-2.5! px-3 text-[14px]! transition-colors hover:bg-panel-raised hover:text-foreground! data-[state=open]:text-accent!"What opens a part of a panel that folds away, a line of its own (Collapsible.Trigger), and the part with it
foldPart beta
foldPart = "border-b border-border transition-colors duration-500 data-found:bg-accent-soft"The classes of the part of a panel that folds away; it lights for a moment when a search finds it
foldTitle beta
foldTitle = "mt-2 text-[11px]! font-bold tracking-[0.08em] text-faint-foreground! uppercase hover:text-foreground!"What opens a group that folds away (Collapsible.Trigger): a heading, with its chevron
follow beta
follow: <Client extends Pick<EditorClient, 'changes'>>(client: Client, ...kinds: [EditorChangeKind, ...EditorChangeKind[]]) => () => ClientThe editor, read again in Solid whenever one of these parts of it changes (EditorChangeKind): a panel says what it shows, and runs again for that alone (follow(editor, 'map', 'selection'))
grid beta
grid = "grid grid-cols-[1fr_1fr] gap-[3px]"The classes of a grid of two equal columns for buttons
h3 beta
h3 = "text-[11px] leading-[normal] font-bold tracking-[0.08em] text-faint-foreground uppercase leading-[normal] mt-4 mb-2"The classes of a panel's smaller heading, with space above and below
hex beta
hex: (color: readonly number[]) => stringA colour of the map's as a CSS hex, for a colour input, and back
hexa beta
hexa: (color: readonly number[]) => stringA colour that may say how much of it is seen ([r, g, b] or [r, g, b, a], 0..1 each) as a CSS hex with its alpha (#rrggbbaa), whole (ff) where it says none: for a colour picker that shows it
iconButton beta
iconButton = "grid size-7 flex-none place-content-center rounded-panel text-muted-foreground transition-colors hover:bg-panel-raised hover:text-foreground disabled:pointer-events-none disabled:opacity-40"A button with nothing on it but an icon: what it does is its tooltip and its label
input beta
input = "rounded-panel border border-border bg-panel-deep px-2 py-1 outline-none select-text focus:border-accent-line cursor-text"The classes of a text input of the editor's panels
kbd beta
kbd = "rounded-[3px] border border-border px-1 font-mono text-[11px] leading-[normal] text-faint-foreground"The classes of a key shown in words, a small boxed monospaced cap
keyOf beta
keyOf: (client: PanelClient, id: string) => stringThe key an action of the editor is on now (editor.keys), as it is shown: for words and tooltips that name a key, so that none is said by hand. It follows the keys (registries): read in Solid, a key put elsewhere is said
labelButton beta
labelButton = "rounded-panel border border-border bg-panel-deep transition-colors hover:border-border-strong hover:bg-panel-raised disabled:opacity-40 disabled:hover:border-border disabled:hover:bg-panel-deep flex h-7 min-w-0 items-center gap-2 px-2 text-left text-[13px]"A button with an icon before its words
labelButtons beta
labelButtons = "grid grid-cols-[repeat(auto-fill,minmax(118px,1fr))] gap-1"Buttons with icons and words, as many to a row as fit
listRow beta
listRow = "flex h-7 w-full min-w-0 items-center gap-2 border-l-2 border-transparent px-3 text-left text-[14px] transition-colors hover:bg-panel-raised"A line of a list: lit under the pointer, marked with the accent at its left edge when it is the one picked
listRowPicked beta
listRowPicked = "border-accent! bg-accent-soft text-accent"The classes added to a line of a list for the one picked, over listRow
note beta
note = "mt-1 text-[12px] text-faint-foreground"The classes of a small faint note under a field
openHint beta
openHint: (project: Pick<Project, 'has'>) => stringWhat a tooltip adds where the code can be opened: only with a project, whose dev server opens it
ownKey beta
export declare function ownKey(event: KeyboardEvent): void;A key a grid of a panel took is the grid's alone: the page does nothing with it and the editor's actions do not hear it (Delete on a file is not Delete on what is selected on the map). The keys it does not take stay the editor's: a marker of data-own-keys would take them all, the tools' letters and undo with them, from a tile that keeps the focus after a click
REGION_SHAPES beta
REGION_SHAPES: {
shape: AreaShape['kind'];
label: string;
hint: string;
}[]The shapes a region is drawn in
removeButton beta
removeButton = "grid size-7 flex-none place-content-center rounded-panel text-muted-foreground transition-colors hover:bg-panel-raised hover:text-foreground disabled:pointer-events-none disabled:opacity-40 hover:text-danger"A button that takes something away: an icon, red under the pointer
row beta
row = "field-row mb-1.5 flex min-w-0 items-center gap-1.5"A row of a panel: its name, then what sets it. field-row is what a panel's search finds it by (FieldFilter); in a group of two a line (FieldGroup) it is as wide as its share
rowFieldInGroup beta
rowFieldInGroup = "@min-[17rem]/fields:w-auto! @min-[17rem]/fields:min-w-0 @min-[17rem]/fields:flex-1"A field of a row that is narrow alone (a number's 110 pixels): as wide as there is room in a group of two a line (FieldGroup, where it is wide enough for two)
rowName beta
rowName = "min-w-[84px] text-muted-foreground @min-[17rem]/fields:max-w-[50%] @min-[17rem]/fields:min-w-0 @min-[17rem]/fields:flex-none @min-[17rem]/fields:truncate"The name of a row: in a group of two a line (FieldGroup, where it is wide enough for two: a container query), as wide as its words, cut short past half the row, and the field beside it as wide as there is room
rowSelect beta
rowSelect = "rounded-panel border border-border bg-panel-deep px-2 py-1 outline-none select-text focus:border-accent-line min-w-0 flex-1"The classes of a select in a row: a field that takes the room that is left
sectionHead beta
sectionHead = "mt-4 mb-2 flex items-baseline gap-2 first:mt-1"A panel's section: its heading, and what is picked of it on the right
sectionTitle beta
sectionTitle = "mt-2 mb-0.5 font-semibold text-foreground"The classes of a title for a group of rows in a panel
selectionPanel beta
selectionPanel = "relative h-full overflow-y-auto bg-panel px-3 pt-1 pb-3 text-[13px] text-foreground"The classes of a panel that shows what is selected: it fills the dock and scrolls
sliderFigure beta
sliderFigure = "w-[46px] shrink-0 text-right text-foreground tabular-nums"The classes of the figure a slider's row shows, a column of fixed width with its digits aligned
sliderName beta
sliderName = "w-[58px] shrink-0 text-muted-foreground"The name of a slider's row and the figure it is at (Scale and 1.00): two columns of their own, the same width on every such row, so the sliders start on one line whatever the figure says
sliderRow beta
sliderRow = "field-row mb-1.5 grid grid-cols-[96px_minmax(0,1fr)] @min-[17rem]/fields:grid-cols-[minmax(0,auto)_minmax(0,1fr)] items-center gap-2 [&_[data-scope=slider]>span]:w-auto! [&_[data-scope=slider]>span]:min-w-10 [&_[data-scope=slider]>span]:font-mono [&_[data-scope=slider]>span]:text-foreground"A slider of a panel: its name, then the slider with its value
squareButton beta
squareButton = "rounded-panel border border-border bg-panel-deep transition-colors hover:border-border-strong hover:bg-panel-raised disabled:opacity-40 disabled:hover:border-border disabled:hover:bg-panel-deep grid size-7 flex-none place-content-center text-muted-foreground hover:text-foreground"The same, with a face and an edge: beside fields
subject beta
subject = "mt-2 mb-2 font-display text-[19px] leading-tight font-bold text-accent"The name of what a panel is about: what is selected
swatch beta
swatch = "aspect-square min-w-[22px] rounded-panel border border-border-strong outline-2 outline-offset-1 outline-transparent transition-[outline-color,scale] active:scale-92"A swatch of a colour or a picture, ringed in the accent when it is the one picked
swatches beta
swatches = "grid grid-cols-[repeat(auto-fill,minmax(34px,1fr))] gap-1.5"Swatches, as many to a row as fit
swatchPicked beta
swatchPicked = "outline-accent"The classes added to a swatch for the one picked, over swatch: the accent ring
tiles beta
tiles = "grid grid-cols-[repeat(auto-fill,minmax(54px,1fr))] gap-1"Tiles of icons with their names, as many to a row as fit
title beta
title = "text-[11px] leading-[normal] font-bold tracking-[0.08em] text-faint-foreground uppercase leading-[normal]"The classes of a panel's heading
toolButton beta
toolButton = "rounded-panel border border-border bg-panel-deep transition-colors hover:border-border-strong hover:bg-panel-raised disabled:opacity-40 disabled:hover:border-border disabled:hover:bg-panel-deep px-2 py-1 w-full text-left"The classes of a button that fills the width of a strip of tools, its words left
typeName beta
typeName: (client: PanelClient, type: string) => stringWhat a unit type is called, or what the map calls it when the game has no such type
uiScaled beta
uiScaled = "[zoom:var(--editor-ui-scale,1)]"Drawn at the size the settings say (EditorPrefs.uiScale, EQ17): the bars, rails, panels and tool strip, by the variable the editor's element has (--editor-ui-scale)
unhex beta
unhex: (value: string) => [number, number, number]Turns a CSS hex colour (#rrggbb) into a colour of the map: RGB, 0..1 each, rounded to two places
unhexa beta
unhexa: (value: string) => [number, number, number] | [number, number, number, number]Turns a CSS hex colour with its alpha (#rrggbbaa, or #rrggbb) into a colour: RGB where it is whole (as a colour written before alpha was is), else RGBA, 0..1 each, rounded to two places
useTextures beta
export declare function useTextures(props: {
client: PanelClient;
}): () => string[];The textures there are to pick, by their path in textures/: the game's, the shared ones (while developing) and the map's own. Read in Solid, it follows the map's files