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
NotationExpanderdoes. - 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
eventis one scopeOverlays gave a component. -
notationCallsIn(
String text, Set< String> types) → Set<String> -
The names of
typesthattextcalls: a line written with one as its word (Card#c "…",Card.compact), ortype=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
textis definitions: its first line that is not blank or a//comment starts withdefineorprimitive. -
notationSitePath(
String path) → String -
pathwith/between its parts and none before the first. -
pageScopedId(
String id, String page) → String -
The id page
page's overlayidis 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
pagesthat 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).componentsare the site's notation components (changed too);otherComponentsthe types of the site's components that are not (JSON ones): anopenof a per-page overlay in one of those is said.pagesandcomponentshold documents changed in place. -
unscopeOverlays(
Json document) → Json -
documentas 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.documentitself when it has none of them. -
writtenOverlayId(
String id, String page, Json? canvas) → String? -
The id as written of canvas
idof a page whose canvas ispagewhen it is one made the page's own (pageScopedId) and its nodecanvaskeeps 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
componentline), 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).