inserted at start/end -- this breaks stuff returned by macros...
* ...there are two ways to dance around this:
* - make filters run a bit more globaly -- per block...
* - find a local parser...
* XXX introspection:
* /stores -- DONE
* list stores...
* /info -- DONE?
* list page/store info
* /storage -- XXX
* list storage usage / limits
* XXX BUG: FF: conflict between object.run and PouchDB...
* XXX add action to reset overloaded (bootstrap/.next) pages...
* - per page
* - global
* XXX CHECK: @macro(..) and @slot(..) must overload in the same way...
* XXX DEPENDS/CACHE @macro(..) introduces a dependency on count (pattern)
* ...not sure how we track these...
* XXX revise how we handle .strict mode in page's .raw and .text...
* XXX might be a good idea to export HTML from a specific path/pattern...
*
*
*
* XXX ROADMAP:
* - run in browser
* - basics, loading -- DONE
* - test localStorage / sessionStorage -- DONE
* - test pouch -- DONE
* - render page -- DONE
* - navigation -- DONE
* - hash/anchor -- DONE
* - action redirects (see: System/delete) -- DONE
* - basic editor and interactivity -- DONE
* - export
* - json -- DONE
* - zip (json/tree) --
* - page actions
* - delete -- DONE
* - copy/move -- DONE
* - resolved (async) -- DONE
* - migrate/rewrite bootstrap --
* - store topology -- DONE
* - sync and sync conf --
* - images
* - get --
* - download --
* - upload --
* - tags
* - get tags from page --
* - show tagged pages --
* - search
* - paths
* - text
* - markdown -- DONE
* - WikiWord -- DONE
* - dom filter mechanics -- DONE
* - filters
* - markdown (???) -- ???
* this can be done in one of two ways:
* - wrapping blocks in elemens
* ...requires negative filter calls, either on -wikiword
* or a different filter like nowikiwords...
* - tags (current)
* - raw / code -- DONE?
* - nl2br --
* - nowhitespace --
* clear extra whitespace from text elements
* - dom filters:
* - editor
* basic -- DONE
* see: /System/edit
* MediumEditor (markdown-plugin)
* https://github.com/yabwe/medium-editor
* https://github.com/IonicaBizau/medium-editor-markdown
* - heavy-ish markdown plugin
* ToastUI (markdown)
* https://github.com/nhn/tui.editor
* - quite heavy
* Pen (markdown)
* https://github.com/sofish/pen
* - no npm module
* - not sure if it works on mobile
* + small
* tiptap (no-markdown, investigate y.js)
* - wikiword / path2link --
* ..do we need to be able to control this???
* - templates
* - all (tree) -- DONE
* - configuration
* - defaults
* - System/config (global)
* - pwa
* - service worker ???
* ...handle relative urls (???)
* - cli
* - basic wiki manipulations (1:1 methods)
* - import/export/sync
* - introspection/repl
* - archive old code
* - update docs
* - refactor and cleanup
* - module structure -- REVISE
* - pack as electron app (???)
*
*
*
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*
* Architecture:
*
* store
* ^
* |
* page <--> renderer
* ^
* |
* client
*
*
*
* Modules:
* pwiki/
* page - base pages and page APIs
* parser - pWiki macro parser
* path - base path API
* store/ - stores
* base - memory store and store API and utils
* file - file store
* localstorage - localStorage / sessionStorage stores
* pouchdb - PouchDB store
* ...
* filter/ - page filters
* base - base filters incl. wikiword
* markdown - markdown renderer
* ...
* pwiki2 - main cli / node entry point
* browser - browser entry point
* pwiki2-test - testing and experimenting (XXX move to test.js)
*
*
* Q: can we make this a single module with +/- some plugins??
* ...this would make things quite a bit simpler but will negate the
* use of high level libs like types...
*
*
* XXX DOC:
* - paths in pWiki behave a bit differently than traditional
* file-system paths, this is due to one key distinction:
* in pWiki there is no distinction between a file and a
* directory
* i.e. each path can both contain data as a file and at the same
* time support sub-paths etc.
* for this reason behaviour of some APIs will differ, all paths
* within a page (a-la file) are relative to its children and not
* to it's siblings. For example, for page "/a/b/c" a link to "./x"
* will resolve to "/a/b/c/x" and this is independent of whether
* the base path is given as "/a/b/c/" or "/a/b/c"
*
* NOTE: implementing things in a traditional manner would
* introduce lots of edge-cases and subtle ways to make
* mistakes, bugs and inconsistencies.
* - types of recursion
* (see: pwiki/page.js: Page.macros.include(..) notes)
* - slot