notation_site library

A site of notation files held in memory (pages/.txt, components/.txt, site.json): read and expanded by the rules of the command-line expand <site folder>, with no file system.

Classes

NotationSiteExpander
Expands a site's files with what the site and a design system give them (see the library's comment), as the tool's NotationExpander does.
NotationSiteFiles
A site's files as the expander reads them.
OverlayScoping
What scopeOverlays did and what it could not do.

Constants

notationSiteDefaults → const NotationSiteSettings
The settings expand <site folder> has with no flag: pages 1440 wide.
notationSiteManifestPath → const String
The path of a site's manifest as a project keeps it (at its root).

Functions

isOverlayEvent(String? event) → bool
Whether event is one scopeOverlays gave a component.
notationCallsIn(String text, Set<String> types) → Set<String>
The names of types that text calls: a line written with one as its word (Card#c "…", Card.compact), or type=Card.
notationComponentType(String text) → String?
The type a component's notation text declares (component Name "…", its first line that is not blank or a comment); null when it is not one.
notationIsDefinitions(String text) → bool
Whether text is definitions: its first line that is not blank or a // comment starts with define or primitive .
notationSitePath(String path) → String
path with / between its parts and none before the first.
pageScopedId(String id, String page) → String
The id page page's overlay id is given when it is made the page's own: nav--board.
scopeOverlays(List<ScopedPage> pages, List<ScopedComponent> components, {Map<String, ({Json document, String path})> otherComponents = const {}}) → OverlayScoping
Makes the overlays of pages that two or more pages write with one id and draw differently each page's own, and what names them follow (see the head of this file). components are the site's notation components (changed too); otherComponents the types of the site's components that are not (JSON ones): an open of a per-page overlay in one of those is said. pages and components hold documents changed in place.
unscopeOverlays(Json document) → Json
document as its notation wrote it, before scopeOverlays: a page's overlays made its own named as written again (and what names them), a component's events for them its actions again, and the calls' reactions to those events gone. document itself when it has none of them.
writtenOverlayId(String id, String page, Json? canvas) → String?
The id as written of canvas id of a page whose canvas is page when it is one made the page's own (pageScopedId) and its node canvas keeps the written id as its name; else null.

Typedefs

ExpandedNotationSite = ({Map<String, NotationResult> componentResults, List<ScopedComponent> components, List<ScopedPage> pages, List<NotationResult> results, OverlayScoping scoping})
A site expanded whole (NotationSiteExpander.expandAll).
NotationComponentSource = ({String path, String text, String type})
A component written in the notation: its type (the name on its component line), its file and its text.
NotationSiteProblem = ({int? line, String message, String path})
Something of a site's file that is not read, or must be said: the file, its line when it has one, and what to write.
NotationSiteSettings = ({bool named, bool nearestColors, bool open, bool reflow, NotationVocabulary vocabulary, double width})
How NotationSiteExpander expands each file: the tool's flags.
ScopedComponent = ({Json document, String path, String type})
One notation component of a site: its type, its source file and its document (changed in place).
ScopedPage = ({Json document, String name, String path})
One page of a site: its name (its canvas id), its source file and its document (changed in place).