Skip to content

@v12-engine/client/kit ​

Core ​

What a game meets first.

NameKindWhat
ButtonfunctionA button: every button of the client's, the HUD's and the editor's (U7). variant: default, primary, ghost, danger, chosen, face, bare. size: sm, md, lg, icon, icon-sm, square, square-sm, unsized
CheckboxvalueA box to tick, as CheckboxBox, with Ark's parts (Checkbox.Root, Checkbox.Indicator...) for one put together otherwise
cnfunctionThe parts that are there, as one class list
ColorFieldfunctionA colour, shown, and picked in what opens under it: Ark's colour picker, put together. For one put together otherwise, ColorPicker has its parts
DialogvalueA dialog over everything, as DialogBox, with its parts (Dialog.Root, Dialog.Content...) for one put together otherwise
FieldfunctionA row of a form: a label, what it is about, and a note under it
kitvalueThe kit for code that builds the page itself: the looks as classes (kit.classes.button({ variant: 'primary' })), tooltips, and putting a kit component into an element. Messages, questions and menus from code are a place's overlays: an app's (StartedApp.overlays), a game's, the editor's
LabelfunctionA label of a field laid out by its own classes (Field is the kit's row of a form): a click on it is a click on what is in it
MenuvalueArk's menu with the kit's look, to put one together: Menu.Root, Menu.Trigger, Menu.ContextTrigger, Menu.Positioner, Menu.Content, Menu.Item, Menu.TriggerItem (for a menu inside a menu), Menu.Separator, Menu.ItemGroup, Menu.ItemGroupLabel, Menu.CheckboxItem, Menu.RadioItem; and Menu.Items, its lines from a list. Ark's other parts are @ark-ui/solid/menu's
MeterfunctionA bar that fills, from value out of max (1 when left out). Only its width changes as the value does, so it is fine to give it a value that changes every frame
NumberFieldvalueA number to type, step and drag, as NumberFieldBox, with Ark's parts (NumberField.Root, NumberField.Input...) for one put together otherwise
PanelfunctionA panel: stone with an edge. tone: default, raised, flat; selected; padding: none, sm, md, lg
PopovervalueSomething that opens by what is pressed and floats by it, as PopoverBox, with Ark's parts (Popover.Root, Popover.Content...) for one put together otherwise
ScrollAreafunctionA list that can grow long, with thin scroll bars
SearchFieldfunctionWords to type to search a list: a text field with a clear button, which Ctrl+F or / puts the keyboard in while its panel has it, and Escape empties (then gives the keyboard back to the panel). What every list of the editor that is searched by typing has over it, and a panel of a game's own (panel.filter()). Matching is matchWords, filterBy or rankBy
SelectvalueOne of a few options from a list, as SelectBox, with Ark's parts (Select.Root, Select.Trigger...) for one put together otherwise
SlidervalueA slider with its value shown next to it, as SliderBox, with Ark's parts (Slider.Root, Slider.Thumb...) for one put together otherwise
TabsvalueTabs, one shown at a time, as TabsBox, with Ark's parts (Tabs.Root, Tabs.Trigger...) for one put together otherwise
TextFieldfunctionWords to type
TogglevalueAn on-off switch, as ToggleBox, with Ark's parts (Toggle.Root, Toggle.Thumb...) for one put together otherwise
TooltipvalueA tooltip around something, as TooltipBox, with Ark's parts (Tooltip.Root, Tooltip.Content...) for one put together otherwise

Advanced ​

Interfaces ​

NameWhat
CheckboxProps betaWhat a Checkbox is given: whether it is ticked, what is next to it, and what to do when it is clicked
ColorFieldProps betaWhat a ColorField is given: the colour, what to tell when it is picked, swatches, and where it opens
DialogButton betaA button of a dialog: its label, what pressing it answers and how it looks
DialogProps betaWhat a Dialog is given: whether it is open, its title, its content and buttons, and how it is placed
HighlightProps betaWhat Highlight is given: a text, and the letters of it that matched, either found here from the words typed (query, as the kit's search finds them: as typed, or nearly) or given (ranges, a SearchHit's)
ItemSearchOptions betaWhat a search of items is narrowed to (searchItems): a tier, a calling they suit, tags they all have
ListPanelProps betaWhat a list panel is given of each item: its id, what it says (searched, typed to), and how it is drawn
ListWindow betaA long list drawn a page at a time (master plan FB3): shown() is the first page of the items, and a page more each time sentinel (an element put after what is drawn) comes into view; it starts over as the items change. For a grid or a list of thousands, where what is on the screen costs and the rest should cost nothing: a tile's picture is not asked for, its observer not made, until it is drawn
MenuItem betaOne line of a menu: its words and what choosing it does
MenuOptions betaHow a menu of the kit's that is put together already opens (MenuButton, ContextMenu, MenuAt)
NumberFieldProps betaWhat a NumberField is given: the number, what to tell when it changes, its limits and its look
OverlayPlace betaWhere what floats goes, for what is under it: a game's element and its own overlays, an app's, the editor's. The kit's popovers and dialogs portal there, so they are in the theme of what they are over, and go with it
Overlays betaWhat floats over one place, a game or the page: its toasts, its dialogs, its menu, which an OverlayRoot given it shows. A game has its own, gone with it (clear): what it opened does not stay over what comes after it; an app of scenes has its own over its menus (StartedApp.overlays), the editor its own. A component reaches those of where it is with useOverlays()
PopoverProps betaWhat a Popover is given: what opens it, what it holds, where it goes and whether it is open
PresenceProps betaWhat a Presence is given: whether it is there, how it moves, and what to do when it has gone
Reorder betaWhat createReorder gives a list: the props of a row it may be dragged by (row(index)), where the line it would go is shown (lineAt(index): 'before', 'after'), and the row being dragged
ReorderHandle betaWhat a row is dragged by (Reorder.handle)
ReorderTarget betaWhat a row is dropped on (Reorder.target): with where the line is shown (data-reorder-over)
ScreenTransitionProps betaWhat a ScreenTransition is given: the screen shown, how it moves, and how to draw a screen of a key
Search betaA search over a list, with its index kept between keystrokes (createSearch)
SearchHit betaAn item a search found: how well, and where
SearchKey betaOne of the things a search reads of each item: a property's name (name, tags; stats.crit goes into the item), or any name with get saying what it is
SearchMatch betaWhere the words typed were found in one of an item's keys: for a Highlight
SearchOption betaA line of a SearchSelect: what it is, what it says, and more words it is found by
SearchOptions betaWhat a search is made with: what it reads of each item, how far a typo may go, how many it gives back
ShownTip betaA tooltip that shows: of what, what it says, and where by it
SliderProps betaWhat a Slider is given: its value, range and step, and what to tell of it
StaggerProps betaWhat a Stagger is given: the attributes of its box, and the delay between its children
TabsProps betaWhat a Tabs is given: the tabs, the one shown and what is under each
TaggedQuery betaWhat is typed into a search, its tags apart (#tag, tag:tag) from its words. A tag is lower case; the words keep their order
TimelineAction betaA key a timeline's host may register, by the action's id: the host says what it is called and when it counts
TimelineDragOptions betaHow a timeline's drag goes where a host wants other than the Cinematic panel's way
TimelineInOut betaThe stretch between a timeline's in and out points
TimelineItem betaA key or a clip on a lane, as data
TimelineItems betaWhat a timeline's drag reads of what it shows, and where it says what is to be done
TimelineLane betaA lane, as data
TimelineMarker betaA marker on a timeline's ruler
TimelinePointer betaWhere the pointer is, in the timeline's own pixels (x from the start of time, y from the top of the rows, the ruler above 0), and the keys held
TimelineProps betaWhat a Timeline is given. Anything else goes on its element
TimelineRowLayout betaA lane's row as a timeline lays it out, in its pixels from the top of the rows; lanes: the lanes it stands for where a group is folded into it
TipOptions betaHow a tooltip shows: a key with it, where by its element, how long the pointer rests first, and with room for more than words
ToggleProps betaWhat a Toggle is given: whether it is on, and what to do when it is flipped
TooltipProps betaWhat a Tooltip is given: what it says, what it is about and where it goes

Functions ​

NameWhat
applyTokens betaWrites values onto an element as its variables: what is under it looks that way
ContextMenu betaWhat is inside, with a menu on a right click (a long press, on a touch screen)
createOverlays betaMakes the toasts, dialogs and menu of one place, to give to an OverlayRoot; call clear when the place goes
createReorder betaRows to be put in another order by dragging, each list on its own: onReorder(from, to) is told the row dragged and the index it is dropped at (as ListPanel.onReorder: the place it then has). Off while enabled says not
createSearch betaA search over a list, for a panel, a shop, a tool: search(query) gives the items the words typed find, the best first (SearchHit.rank), each with the letters that matched (matches, for a Highlight). Reads what keys say of each item, name over id over description over tags by their weights; a typo finds (flsh is Flash) after everything found as typed. Keeps an index between keystrokes: set(items) when the list changes (what is the same is kept). Five thousand items search in a few milliseconds
createTimelineDrag betaA timeline's drag over an adapter of what it shows
createWindow betaA window over a long list: see ListWindow. page is 200 when left out
DialogButtons betaThe buttons of a dialog opened from code (openDialog)
drawPiece betaPuts a piece into an element, from code that builds the page itself (a scene's or a panel's mount): the game's own element (mount), its component, or the client's own component when the game said neither. All are given the same. Returns what takes it away
evaluateNumber betaA sum typed into a number field (=10*3, = (64 - 8) / 2): numbers, + - * /, brackets and a sign, worked out as arithmetic is (* and / before + and -), with no eval. A leading = is let be. Nothing for what is not such a sum, or does not come to a number (a division by 0)
filterBy betaThe items every word typed is found in, by what each says of itself (textOf), in the order they came. Every item, with nothing typed. When no item has the words as typed, those that nearly have them (a typo), still in their order: a filter keeps the list's order, so what was nearly typed can be told from what was only when nothing else would show. fuzzy: false finds only what is typed
Floating betaWhat floats by an element or a point of the screen while it is there, over everything, and goes away on a press outside it or Escape (onDismiss): for what is opened from code, with nothing pressed to open it
fuzzyBy betaThe items the words typed find, the best first, with where they matched (SearchHit): createSearch for one search, its index kept while the same list is searched again. For a list of a few thousand that changes every keystroke, createSearch is the faster
fuzzyRank betaHow well a text matches the words typed, with the letters that matched: the rank is SearchHit.rank's (0 the words, 1 starts with them, 2 each word starts a word of it, 3 somewhere in it or in all, 4 and up nearly); none when a word is nowhere near. For one text at a time (a row's highlight); fuzzyBy for a list
hasOwn betaWhether the game said a piece of its own: a component, or a mount
Highlight_2 betaA text with the letters the search found marked: a row of a list searched by typing (SearchSelect, ListPanel, the palette). Given the words typed, it finds them as the kit's search does (fuzzyRank: as typed, or a typo's nearest); given ranges, it marks those
IconButton betaA square button with an icon (or a letter) and a tooltip that says what it is for, also as its label
Kbd betaA key on the keyboard, as a hint
ListPanel betaA list for a panel: searched, walked with the keys, a page at a time, picked one or many, opened, deleted, renamed, reordered, with a menu. See ListPanelProps
matchWords betaWhether every word typed is somewhere in text (case does not matter). Nothing typed matches everything. As typed: a typo matches nothing (fuzzyRank for that)
MenuAt betaA menu open by an element or at a point of the screen, until it is closed: what openMenu shows
MenuButton betaA button that opens a menu of items under it: a list, or a function asked for it each time it opens; menu says how it opens
MenuItems betaThe lines of a menu, from a list (MenuItem): inside a Menu.Content
mergeRanges betaThe ranges in order, those that touch or overlap made one
Mounted betaAn element of the page for a game to draw into (a mount): made, handed over once it is on the page, and what the mount gave back called when it goes. Everything else it is given is the element's (class, data-…)
moved betaMoves an item of a list to another index: the list as it is after (a copy)
movement betaHow much the interface moves where an element is (the theme's --vg-motion, the player's setting and the system's over it): NaN where the client's stylesheet is not on the page
OverlayRoot betaWhat the kit floats over a place, called up from code anywhere: tooltips, toasts, dialogs and menus (see overlays.ts). The app has one for the page; a game has one of its own, in its element (mount), for its own overlays and the tooltips of what is in it. Put what is under it in its place (OverlayPlaceContext) for its popovers to go there too
OwnPiece betaA piece as the game has it (Own): its element (mount, which wins), else its component, given what the piece is about. class and the rest are for the element of a mount. Nothing where the game said neither
pickFiles betaAsks the player for files of their own, as the browser's file picker does: what they picked, none if they closed it (accept: the kinds, .json,.gz; multiple: more than one)
pointAt betaA point on the screen, as something to float by: where a right click was, for a menu
Presence betaWhat comes in and goes, Ark's Presence with the kit's motion: there while present, and kept as it goes until its animation is over (onExitComplete), as long as the theme's --vg-motion says. Its data-state is open or closed, for a look of its own. Made as it is first there, and taken out once gone
rankBy betaThe items the words typed are found in, the best first (rankWords), those that rank the same in the order they came; those a typo nearly finds last. Every item, as they came, with nothing typed
rankWords betaHow well a thing matches the words typed, the lower the better: 0 its label is the words, 1 it starts with them, 2 each word starts a word of its label, 3 the words are only somewhere in what it says of itself (all: its label and the rest), 4 and up a word is only nearly there (a typo: the nearer the lower); none when a word is nowhere near. rankBy for a list (faster, by far, for thousands: it keeps the words it read), fuzzyRank for the letters that matched
registerTheme betaAdds a theme anyone can then name: its values over those of base (classic, the engine's, when left out)
render betaPuts a Solid component into an element: a panel of the game's own built with the kit. Gives back what takes it out again, which is what a panel's mount gives back
reorderLine betaThe classes of a row showing where the dragged one would go: a line of the accent above or below it, or of a chip in a line of them (axis: 'x') before or after it
ScreenTransition betaOne screen going over to the next within a scene (a menu's pages, a campaign's chapters): the one before kept as it goes, out of reach (inert), the next coming in over it in the same place. A scene coming in over the one before is the app's (SceneTransition)
searchItems betaSearches a game's items (registry.items) by what is typed: their names (first), ids, tags and the tags' names, the stats they give (crit finds what gives critChance), the callings they suit, their descriptions, with a typo found after what is found as typed (greves is Greaves). Tags typed (#lifesteal, tag:lifesteal) and tags are what every item found has; tier and calling narrow it further. Nothing typed gives every item that fits, in the game's order. Keeps its index between keystrokes, made again when the items change ts searchItems(client.registry, '#boots spe', { calling: 'ranger' }).map((hit) => hit.item.name)
SearchSelect betaOne of many, found by typing (an autocomplete): a field that shows the one picked, and a list that floats under it with every option as it opens, and those found as words are typed, the best first. Ark's combobox (Combobox of kit/more for its parts put together otherwise)
Spinner betaA ring that turns while something is waited for with nothing to count: a scene's code on its way, a game being prepared. Only its turn changes, which the browser draws without the page's thread, so it keeps turning while the page is busy
splitTags betaTakes the tags out of what is typed (#attack, tag:attack): what a search of things with tags (searchItems, the editor's Data) finds them by, the words left to search with. '#crit blade' is the tag crit and the word blade
Stagger betaWhat is in it comes in one after another, each a step after the one before (the eighth on all at once): a menu's buttons. A box of its own (classes.motion.stagger), laid out as its class says
styled betaA part of Ark's with the kit's look: the same component, taking everything it takes, with the look's classes before whatever class it is given
Text_2 betaWords in one of the kit's kinds: title, heading, label, note, body
TextArea betaLines of words to type: the kit's field, or none but its own classes (bare)
themeNamed betaA theme by name. Throws for one nobody added, saying which there are
Timeline betaLanes of keys and clips over time. Given TimelineLanes and onEdit it is whole: drawn, dragged, and what is dragged said as edits; a host with looks of its own draws the rows (lane) and gives the drag (drag)
timelineActionEdit betaThe edit a key of a timeline asks (timelineActions), from what is selected and where the playhead is
timelineActions betaThe keys of a timeline, for a host to register as its actions (it says how Ctrl or ⌘ is written with command, and labels what it calls them where it has its own words). What each asks is timelineActionEdit's
TimelineClip betaA clip on a lane: width in pixels (ruled), or from at to a time (fitted)
TimelineEdge betaAn edge of a clip, by which it is trimmed
TimelineKeyframe betaA key on a lane
TimelineRow betaA lane's row of a ruled timeline: where its items go
tip betaThe same, as a ref for Solid: <button ref={tip('Attack')}>
TitleCard betaA title card over what it is put in (campaign plan CI3): a title, words under it, a look of those registered (registerTitleLook of @v12-engine/client), faded in and out. What a cinematic's ui lane shows as its part title
tooltip betaGives an element a tooltip: words, or a function that builds what to show when it shows (so it is up to date). key is a key to show with it, placement where. Works on any element, built by Solid or not. Nothing to undo: it goes with the element
useOverlayMount betaWhere a component's popovers and dialogs go: its game's element, or the page's body
useOverlays betaThe overlays of where a component is: its game's, its app's, the editor's. Throws outside of any: what it would open would be shown by nothing
useUiSound betaPlays a sound of the interface, as the screen it is on has them (UiSounds): nothing where none is given
variants betaA look with choices, as a function of what is picked: button({ variant: 'primary', size: 'sm' }). What is not picked is the default; class is put at the end, for one more class from where it is used
WindowMore betaThe button after a list drawn a page at a time (createWindow): how many are left, and a click shows the next page. The list's own look by class; a page more comes by itself too as the end is scrolled to
wordsOf betaThe words typed, lower case, with nothing between them

Values ​

NameWhat
Collapsible betaWhat folds away under what is pressed: Collapsible.Root, Collapsible.Trigger, Collapsible.Content, Collapsible.Indicator
ColorPicker betaA colour, picked: ColorPicker.Root, ColorPicker.Control, ColorPicker.ChannelInput, ColorPicker.Trigger, ColorPicker.Positioner, ColorPicker.Content, ColorPicker.Area, ColorPicker.ChannelSlider, ColorPicker.SwatchTrigger... and parseColor for its value
Combobox betaA field that finds in a list as it is typed in: Combobox.Root (with a collection), Combobox.Control, Combobox.Input, Combobox.Trigger, Combobox.Positioner, Combobox.Content, Combobox.Item, Combobox.Empty
NUMBER_DRAG_EVENT betaWhat a number field sends up the page as it is dragged (NumberField's drag): detail 'start' as the drag begins, 'end' once it is let go of. What keeps a history makes one step of what it is told between the two (the map editor does)
OverlayPlaceContext betaThe context that holds the place a component is in; read with useOverlays and useOverlayMount
skins betaThe HUD's skins: the same frames cast in another metal, the words over them a little of its colour, its own gem, its own ornament on the corners. gilded is the engine's own (gold and a diamond, classic); iron dark iron and a red gem, claws; bone old bone and a green gem, stars; jade green bronze and a violet gem, leaves. A race names one as its look (RaceLook.theme), so the HUD is in the metal of the side its player plays
Splitter betaPanes that share their room, with a bar between two to drag: Splitter.Root, Splitter.Panel, Splitter.ResizeTrigger
Tour betaA tour of what is on the screen, a step at a time (useTour makes one, of its steps): Tour.Root, Tour.Backdrop, Tour.Spotlight, Tour.Positioner, Tour.Content, Tour.Title, Tour.Description, Tour.Actions, Tour.ActionTrigger, Tour.CloseTrigger, Tour.ProgressText
TreeView betaA tree: TreeView.Root (with a collection, of createTreeCollection), TreeView.Tree, and TreeView.Node for each of its nodes, which shows it and what is under it; or Ark's own parts, for a node drawn otherwise (TreeView.NodeProvider, TreeView.Branch, TreeView.BranchControl, TreeView.Item...)
UiSoundContext betaWhat plays a sound of the interface where it is (useUiSound): the app's screens and a game's HUD each give one

Types ​

NameWhat
ButtonProps betaWhat a Button is given: the attributes of an HTML button, with its look (variant, size), pressed, a tooltip and a hotkey
ClassValue betaA part of a class list: a string, classes each with whether it is there ({ 'opacity-50': off }), or nothing (false, null, undefined) to leave out
ItemsSource betaWhat of the game a search of items reads: its items, and its tags' names (Rules.tags): its registry
MatchRange betaA run of letters of a text that the words typed were found in: from the first (counted in) to after the last
SearchFieldProps betaWhat SearchField takes: words typed, told of each change, with a clear button, and the keys that focus it
SearchSelectProps betaWhat a SearchSelect is given: the options, the one picked, how they are found by typing and what to tell when one is picked
SearchValue betaWhat a thing says of itself under one key: a text, a number, several (its tags), or nothing
SelectProps betaWhat a Select is given: the options, the one picked and what to tell when another is
TimelineDrag betaWhat is grabbed in a timeline, as the pointer goes down, until it goes up
TimelineDragMachine betaA timeline's drag (createTimelineDrag)
TimelineEdit betaWhat a timeline asks of what it shows, as data: what its host does with each is the host's. move and trim come in phases, the rest at once
TimelineEditPhase betaHow far a drag has come, in the edits that follow it: as it starts, as it goes (shown, not yet kept), as it is let go of (kept), or called off (what it did put back)
TimelinePress betaWhat the pointer went down on in a timeline: a marker on the ruler, the ruler, an item of a lane (by an edge of it), or the rows where there is nothing
TipContent betaWhat a tooltip shows: words, or a function that makes what to show as it shows (so it is up to date): words, an element, or anything Solid draws (() => <AbilityTip ... />), which lives while the tooltip does
TipPlacement betaWhere by what it belongs to: a side, and which end of it

Namespaces ​

NameWhat
classes