@v12-engine/client/kit
Core
What a game meets first.
| Name | Kind | What |
|---|---|---|
| Button | function | A 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 |
| Checkbox | value | A box to tick, as CheckboxBox, with Ark's parts (Checkbox.Root, Checkbox.Indicator...) for one put together otherwise |
| cn | function | The parts that are there, as one class list |
| ColorField | function | A colour, shown, and picked in what opens under it: Ark's colour picker, put together. For one put together otherwise, ColorPicker has its parts |
| Dialog | value | A dialog over everything, as DialogBox, with its parts (Dialog.Root, Dialog.Content...) for one put together otherwise |
| Field | function | A row of a form: a label, what it is about, and a note under it |
| kit | value | The 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 |
| Label | function | A 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 |
| Menu | value | Ark'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 |
| Meter | function | A 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 |
| NumberField | value | A number to type, step and drag, as NumberFieldBox, with Ark's parts (NumberField.Root, NumberField.Input...) for one put together otherwise |
| Panel | function | A panel: stone with an edge. tone: default, raised, flat; selected; padding: none, sm, md, lg |
| Popover | value | Something 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 |
| ScrollArea | function | A list that can grow long, with thin scroll bars |
| SearchField | function | Words 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 |
| Select | value | One of a few options from a list, as SelectBox, with Ark's parts (Select.Root, Select.Trigger...) for one put together otherwise |
| Slider | value | A slider with its value shown next to it, as SliderBox, with Ark's parts (Slider.Root, Slider.Thumb...) for one put together otherwise |
| Tabs | value | Tabs, one shown at a time, as TabsBox, with Ark's parts (Tabs.Root, Tabs.Trigger...) for one put together otherwise |
| TextField | function | Words to type |
| Toggle | value | An on-off switch, as ToggleBox, with Ark's parts (Toggle.Root, Toggle.Thumb...) for one put together otherwise |
| Tooltip | value | A tooltip around something, as TooltipBox, with Ark's parts (Tooltip.Root, Tooltip.Content...) for one put together otherwise |
Advanced
Interfaces
| Name | What |
|---|---|
| CheckboxProps beta | What a Checkbox is given: whether it is ticked, what is next to it, and what to do when it is clicked |
| ColorFieldProps beta | What a ColorField is given: the colour, what to tell when it is picked, swatches, and where it opens |
| DialogButton beta | A button of a dialog: its label, what pressing it answers and how it looks |
| DialogProps beta | What a Dialog is given: whether it is open, its title, its content and buttons, and how it is placed |
| HighlightProps beta | What 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 beta | What a search of items is narrowed to (searchItems): a tier, a calling they suit, tags they all have |
| ListPanelProps beta | What a list panel is given of each item: its id, what it says (searched, typed to), and how it is drawn |
| ListWindow beta | A 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 beta | One line of a menu: its words and what choosing it does |
| MenuOptions beta | How a menu of the kit's that is put together already opens (MenuButton, ContextMenu, MenuAt) |
| NumberFieldProps beta | What a NumberField is given: the number, what to tell when it changes, its limits and its look |
| OverlayPlace beta | Where 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 beta | What 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 beta | What a Popover is given: what opens it, what it holds, where it goes and whether it is open |
| PresenceProps beta | What a Presence is given: whether it is there, how it moves, and what to do when it has gone |
| Reorder beta | What 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 beta | What a row is dragged by (Reorder.handle) |
| ReorderTarget beta | What a row is dropped on (Reorder.target): with where the line is shown (data-reorder-over) |
| ScreenTransitionProps beta | What a ScreenTransition is given: the screen shown, how it moves, and how to draw a screen of a key |
| Search beta | A search over a list, with its index kept between keystrokes (createSearch) |
| SearchHit beta | An item a search found: how well, and where |
| SearchKey beta | One 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 beta | Where the words typed were found in one of an item's keys: for a Highlight |
| SearchOption beta | A line of a SearchSelect: what it is, what it says, and more words it is found by |
| SearchOptions beta | What a search is made with: what it reads of each item, how far a typo may go, how many it gives back |
| ShownTip beta | A tooltip that shows: of what, what it says, and where by it |
| SliderProps beta | What a Slider is given: its value, range and step, and what to tell of it |
| StaggerProps beta | What a Stagger is given: the attributes of its box, and the delay between its children |
| TabsProps beta | What a Tabs is given: the tabs, the one shown and what is under each |
| TaggedQuery beta | What 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 beta | A key a timeline's host may register, by the action's id: the host says what it is called and when it counts |
| TimelineDragOptions beta | How a timeline's drag goes where a host wants other than the Cinematic panel's way |
| TimelineInOut beta | The stretch between a timeline's in and out points |
| TimelineItem beta | A key or a clip on a lane, as data |
| TimelineItems beta | What a timeline's drag reads of what it shows, and where it says what is to be done |
| TimelineLane beta | A lane, as data |
| TimelineMarker beta | A marker on a timeline's ruler |
| TimelinePointer beta | Where 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 beta | What a Timeline is given. Anything else goes on its element |
| TimelineRowLayout beta | A 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 beta | How 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 beta | What a Toggle is given: whether it is on, and what to do when it is flipped |
| TooltipProps beta | What a Tooltip is given: what it says, what it is about and where it goes |
Functions
| Name | What |
|---|---|
| applyTokens beta | Writes values onto an element as its variables: what is under it looks that way |
| ContextMenu beta | What is inside, with a menu on a right click (a long press, on a touch screen) |
| createOverlays beta | Makes the toasts, dialogs and menu of one place, to give to an OverlayRoot; call clear when the place goes |
| createReorder beta | Rows 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 beta | A 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 beta | A timeline's drag over an adapter of what it shows |
| createWindow beta | A window over a long list: see ListWindow. page is 200 when left out |
| DialogButtons beta | The buttons of a dialog opened from code (openDialog) |
| drawPiece beta | Puts 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 beta | A 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 beta | The 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 beta | What 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 beta | The 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 beta | How 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 beta | Whether the game said a piece of its own: a component, or a mount |
| Highlight_2 beta | A 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 beta | A square button with an icon (or a letter) and a tooltip that says what it is for, also as its label |
| Kbd beta | A key on the keyboard, as a hint |
| ListPanel beta | A 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 beta | Whether 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 beta | A menu open by an element or at a point of the screen, until it is closed: what openMenu shows |
| MenuButton beta | A 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 beta | The lines of a menu, from a list (MenuItem): inside a Menu.Content |
| mergeRanges beta | The ranges in order, those that touch or overlap made one |
| Mounted beta | An 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 beta | Moves an item of a list to another index: the list as it is after (a copy) |
| movement beta | How 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 beta | What 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 beta | A 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 beta | Asks 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 beta | A point on the screen, as something to float by: where a right click was, for a menu |
| Presence beta | What 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 beta | The 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 beta | How 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 beta | Adds a theme anyone can then name: its values over those of base (classic, the engine's, when left out) |
| render beta | Puts 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 beta | The 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 beta | One 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 beta | Searches 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 beta | One 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 beta | A 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 beta | Takes 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 beta | What 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 beta | A 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 beta | Words in one of the kit's kinds: title, heading, label, note, body |
| TextArea beta | Lines of words to type: the kit's field, or none but its own classes (bare) |
| themeNamed beta | A theme by name. Throws for one nobody added, saying which there are |
| Timeline beta | Lanes 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 beta | The edit a key of a timeline asks (timelineActions), from what is selected and where the playhead is |
| timelineActions beta | The 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 beta | A clip on a lane: width in pixels (ruled), or from at to a time (fitted) |
| TimelineEdge beta | An edge of a clip, by which it is trimmed |
| TimelineKeyframe beta | A key on a lane |
| TimelineRow beta | A lane's row of a ruled timeline: where its items go |
| tip beta | The same, as a ref for Solid: <button ref={tip('Attack')}> |
| TitleCard beta | A 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 beta | Gives 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 beta | Where a component's popovers and dialogs go: its game's element, or the page's body |
| useOverlays beta | The 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 beta | Plays a sound of the interface, as the screen it is on has them (UiSounds): nothing where none is given |
| variants beta | A 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 beta | The 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 beta | The words typed, lower case, with nothing between them |
Values
| Name | What |
|---|---|
| Collapsible beta | What folds away under what is pressed: Collapsible.Root, Collapsible.Trigger, Collapsible.Content, Collapsible.Indicator |
| ColorPicker beta | A 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 beta | A 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 beta | What 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 beta | The context that holds the place a component is in; read with useOverlays and useOverlayMount |
| skins beta | The 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 beta | Panes that share their room, with a bar between two to drag: Splitter.Root, Splitter.Panel, Splitter.ResizeTrigger |
| Tour beta | A 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 beta | A 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 beta | What plays a sound of the interface where it is (useUiSound): the app's screens and a game's HUD each give one |
Types
| Name | What |
|---|---|
| ButtonProps beta | What a Button is given: the attributes of an HTML button, with its look (variant, size), pressed, a tooltip and a hotkey |
| ClassValue beta | A 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 beta | What of the game a search of items reads: its items, and its tags' names (Rules.tags): its registry |
| MatchRange beta | A run of letters of a text that the words typed were found in: from the first (counted in) to after the last |
| SearchFieldProps beta | What SearchField takes: words typed, told of each change, with a clear button, and the keys that focus it |
| SearchSelectProps beta | What a SearchSelect is given: the options, the one picked, how they are found by typing and what to tell when one is picked |
| SearchValue beta | What a thing says of itself under one key: a text, a number, several (its tags), or nothing |
| SelectProps beta | What a Select is given: the options, the one picked and what to tell when another is |
| TimelineDrag beta | What is grabbed in a timeline, as the pointer goes down, until it goes up |
| TimelineDragMachine beta | A timeline's drag (createTimelineDrag) |
| TimelineEdit beta | What 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 beta | How 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 beta | What 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 beta | What 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 beta | Where by what it belongs to: a side, and which end of it |
Namespaces
| Name | What |
|---|---|
| classes |