You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
openersFor(tools, kind, address, surface): the rows of an "Open with" menu for a world (kind: 'world') or one element of it ('element'), in order, each { id, name, href, state }. First the site's own row (onlyworlds.com, the world's or the element's page on www.onlyworlds.com, never a word), then one row per tools list row, in the list's order, that is listed and has an open link for this kind; a tool with only a world link is offered on an element as opening its world. surface is what the page knows, and nothing is guessed: audience (member or public, required; the public sees only rows whose open.needs is null), signedIn (true, false, or null when the page cannot know), browser (default true), phone (default false) and tool, the page's own client name. state is the first that holds: "You are here" (the row whose client is tool), "Opens in your browser" (needs an account, outside a browser), "Sign in to first" (needs an account, signed out), "Needs the world on this phone" (needs the world on the device, on a phone), "Opens the world" (a world link on an element), else null. An address with no world, or with a slug for it, refuses with OwAddressError (no_world, bad_world); an element's rows from an address with no element, an unknown kind, a missing audience, and an unknown key on the address or the surface are a TypeError. Pure and DOM-free; the Python package's openers_for answers the same shared fixture (41 cases) row for row.
TOOLS: the OnlyWorlds tools list (github.com/OnlyWorlds/tools, tools.json format 1) as of this release, the keys openersFor reads (id, name, url, client, rung, open), with the types OwTool, OwToolOpen, OwToolNeeds, OwOpener, OwOpenerKind, OwOpenerState and OwOpenerSurface. It is generated by codegen/tools.mjs from a copy vendored byte for byte at a pinned commit (codegen/tools-pin.json, the commit and the file's sha256), and npm run codegen:check now also fails when the copy or the generated module is stale. A tool listed after a release is offered from the next one.