├── .gitignore
├── LICENSE
├── README.md
├── build.sh
├── dev.sh
├── docs
├── .gitignore
├── .nojekyll
├── app.js
├── examples
│ ├── clusters.dot
│ ├── color-dots-graph.dot
│ ├── color-dots.dot
│ ├── data_structs.dot
│ ├── fsm.dot
│ ├── kuratowski.dot
│ ├── lalr.dot
│ ├── network.dot
│ ├── prof.dot
│ ├── projects.dot
│ ├── records.dot
│ ├── switch.dot
│ └── unix.dot
├── favicon.png
├── favicon.svg
├── graphviz.js
├── graphviz.js.map
├── iframe-proxy.html
├── index.css
├── index.html
├── serve.py
├── touchicon.png
└── viz-worker.js
├── package-lock.json
├── package.json
├── src
├── figplug.d.ts
├── graphviz.json
├── graphviz.ts
├── viz.d.ts
└── viz.js
└── tsconfig.json
/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | /_*
3 | node_modules
4 | .DS_Store
5 | .vscode
6 | *~
7 | *.sublime*
8 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2019 Rasmus Andersson
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Graphviz in the browser
2 |
3 | Provides a very small JS library
4 |
5 | - Exposes a global variable `graphvis`
6 | - Very fast
7 | - Runs graphviz compiled as WebAssembly in a background Worker thread
8 | - Timeouts for preventing run-away "huge graph" computations
9 |
10 |
11 | ## Usage
12 |
13 | ```html
14 |
15 |
16 |
17 |
18 |
19 |
30 |
31 | ```
32 |
33 | ## API
34 |
35 | ```ts
36 | namespace graphviz {
37 | // Version string of this library (e.g. "1.2.3")
38 | export const version :string
39 |
40 | // Error raised on timeout
41 | export const TimeoutError :Error
42 |
43 | // layout performs Graphviz layout
44 | export function layout(
45 | source :string, // dot source code
46 | format? :Format, // Output format. Defaults to "svg"
47 | engine? :Engine, // Default engine type. Defaults to "dot"
48 | timeout? :number, // Optional timeout in milliseconds
49 | ) :Promise
50 |
51 | // Output formats
52 | export type Format = "dot"
53 | | "json"
54 | | "json0"
55 | | "plain"
56 | | "plain-ext"
57 | | "ps"
58 | | "ps2"
59 | | "svg"
60 | | "xdot"
61 |
62 | // Layout engine types
63 | export type Engine = "circo" // for circular layout of graphs
64 | | "dot" // for drawing directed graphs
65 | | "fdp" // for drawing undirected graphs
66 | | "neato" // for drawing undirected graphs
67 | | "osage" // for drawing large undirected graphs
68 | | "twopi" // for radial layouts of graphs
69 | }
70 | ```
71 |
72 |
73 | ## Notes
74 |
75 | This is essentially a wrapper around [viz.js](https://github.com/mdaines/viz.js).
76 |
77 | See [Graphviz documentation here](https://www.graphviz.org/doc/info/attrs.html)
78 |
--------------------------------------------------------------------------------
/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -e
2 | cd "$(dirname "$0")"
3 |
4 | FIGPLUG_ARGS=( \
5 | -no-manifest \
6 | -v \
7 | )
8 | RELEASE_MODE=false
9 |
10 | function usage {
11 | echo "usage: $0 [options]"
12 | echo "options:"
13 | echo " -h, --help Show help message."
14 | echo " -O Build optimizied release build."
15 | echo " -w Watch source files for changes and rebuild continously."
16 | }
17 |
18 | while (( "$#" )); do
19 | case "$1" in
20 | -O)
21 | RELEASE_MODE=true
22 | shift
23 | ;;
24 | -w)
25 | FIGPLUG_ARGS+=( "-w" )
26 | shift
27 | ;;
28 | -h|--help)
29 | usage
30 | exit 0
31 | ;;
32 | --) # end argument parsing
33 | shift
34 | break
35 | ;;
36 | -*|--*)
37 | echo "Error: unexpected argument $1" >&2
38 | usage
39 | exit 1
40 | ;;
41 | *) # preserve positional arguments
42 | PARAMS="$PARAMS $1"
43 | shift
44 | ;;
45 | esac
46 | done
47 |
48 | if $RELEASE_MODE; then
49 | FIGPLUG_ARGS+=( "-O" )
50 | else
51 | FIGPLUG_ARGS+=( "-g" )
52 | fi
53 |
54 | VERSION=$(node -e 'process.stdout.write(require("./package.json").version)')
55 |
56 | # figplug=~/src/figplug/bin/figplug.g
57 | figplug=./node_modules/.bin/figplug
58 |
59 | # update version
60 | sed -E 's/let VERSION = "[^"]+"/let VERSION = "'"$VERSION"'"/g' docs/app.js > docs/.app.js
61 | mv -f docs/.app.js docs/app.js
62 |
63 | sed -E 's/\?v=[^"]+/?v='"$VERSION"'/g' docs/index.html > docs/.index.html
64 | mv -f docs/.index.html docs/index.html
65 |
66 | # optimize images
67 | pushd docs >/dev/null
68 | for f in *.svg; do
69 | svgo --multipass -q "$f" &
70 | done
71 | for f in *.png; do
72 | TMPNAME=.$f.tmp
73 | (pngcrush -q "$f" "$TMPNAME" && mv -f "$TMPNAME" "$f") &
74 | done
75 | popd >/dev/null
76 |
77 | # build
78 | $figplug build "${FIGPLUG_ARGS[@]}" src/graphviz.json:docs
79 |
80 | wait
81 |
--------------------------------------------------------------------------------
/dev.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -e
2 | cd "$(dirname "$0")"
3 |
4 |
5 | pids=()
6 | function cleanup {
7 | # echo "Stopping subprocesses"
8 | for pid in ${pids[*]}; do
9 | kill $pid
10 | wait $pid
11 | done
12 | }
13 | trap cleanup EXIT
14 |
15 |
16 | bash build.sh -w &
17 | pids+=( $! )
18 |
19 | ./docs/serve.py
20 |
--------------------------------------------------------------------------------
/docs/.gitignore:
--------------------------------------------------------------------------------
1 | /.*cache
2 |
--------------------------------------------------------------------------------
/docs/.nojekyll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsms/graphviz/ea35b3eb7c565ab586256ac036f5fdcbbfa62069/docs/.nojekyll
--------------------------------------------------------------------------------
/docs/app.js:
--------------------------------------------------------------------------------
1 | let VERSION = "1.0.7"
2 |
3 | let iOS = navigator.userAgent.indexOf("iPhone") != -1
4 |
5 | let editor = document.querySelector("#editor")
6 | let textArea = editor.querySelector("textarea")
7 | let lineNumbers = editor.querySelector(".line-numbers")
8 | let genButton = editor.querySelector('button[name="generate"]')
9 | let copyButton = editor.querySelector('button[name="copy"]')
10 | let exampleButton = editor.querySelector('button[name="next-example"]')
11 | let presentation = document.querySelector("#presentation")
12 | let updateDot = document.querySelector("#update-dot")
13 | let liveUpdate = document.querySelector('input[name="liveUpdate"]')
14 |
15 | let lastValidOutput = ""
16 |
17 | let examples = [
18 | "color-dots.dot",
19 | "color-dots-graph.dot",
20 | "fsm.dot",
21 | "clusters.dot",
22 | "data_structs.dot",
23 | "lalr.dot",
24 | "prof.dot",
25 | "projects.dot",
26 | "records.dot",
27 | "kuratowski.dot",
28 | "switch.dot",
29 | "unix.dot",
30 | "network.dot",
31 | ]
32 |
33 | let regenWhenDone = false
34 | let isGenerating = false
35 |
36 | // this helps work around a difference in behavior between Firefox and other web browsers,
37 | // where setting textArea.value="bla" causes change events in Safari and Chrome, but not in FF.
38 | let isSwappingOutEditorValue = false
39 |
40 | function generateGraph() {
41 | let e = new Error()
42 | if (isSwappingOutEditorValue) {
43 | return
44 | }
45 | // bounce to prevent flooding worker with messages
46 | if (isGenerating) {
47 | regenWhenDone = true
48 | return
49 | }
50 | isGenerating = true
51 | showUpdateDot()
52 | let clearGraphTimer = setTimeout(() => {
53 | presentation.querySelector(".graph").innerText = ""
54 | }, 200)
55 |
56 | const timeout = 30000
57 |
58 | function onEnd() {
59 | clearTimeout(clearGraphTimer)
60 | hideUpdateDot()
61 | isGenerating = false
62 | if (regenWhenDone) {
63 | regenWhenDone = false
64 | generateGraph()
65 | }
66 | }
67 |
68 | presentation.classList.remove("error")
69 |
70 | let source = textArea.value.trim()
71 | source = source.replace(/fontname\s*=\s*(?:"Inter"|'Inter'|Inter)/g, 'fontname="Courier,Inter"')
72 |
73 | let addedGraphDirective = false
74 | if (!source.match(/\b(?:di)?graph(?:\s+[^\{\r\n]+|)[\r\n\s]*\{/m)) {
75 | // definitely no graph type directive
76 | source = wrapInGraphDirective(source)
77 | addedGraphDirective = true
78 | }
79 |
80 | function render() {
81 | return graphviz.layout(source, "svg", "dot", timeout).then(svg => {
82 | // let dataUrl = "data:image/svg+xml;base64," + btoa(svg)
83 | // presentation.querySelector(".graph").style.backgroundImage = `url(${dataUrl})`
84 | presentation.querySelector(".graph").innerHTML = svg
85 | lastValidOutput = svg
86 | onEnd()
87 | }).catch(err => {
88 | //console.log("render() ERROR", err.stack||String(err)) // XXX DEBUG
89 | if (!addedGraphDirective &&
90 | err.message &&
91 | (err.message+"").toLowerCase().indexOf("syntax error") != -1
92 | ) {
93 | // try and see if adding graph directive fixes it
94 | source = wrapInGraphDirective(source)
95 | addedGraphDirective = true
96 | return render()
97 | }
98 | console.error(err.stack||String(err))
99 | presentation.querySelector(".error").innerText = String(err)
100 | presentation.classList.add("error")
101 | onEnd()
102 | })
103 | }
104 | render()
105 | }
106 |
107 |
108 | function wrapInGraphDirective(s) {
109 | return (
110 | 'digraph {\n' +
111 | ' graph [fontname="Courier,Inter" bgcolor=transparent];\n' +
112 | ' node [fontname="Courier,Inter"];\n' +
113 | ' edge [fontname="Courier,Inter"];\n' +
114 | s +
115 | '\n}\n'
116 | )
117 | }
118 |
119 |
120 | let updateDotTimer = null
121 |
122 | function hideUpdateDot() {
123 | clearTimeout(updateDotTimer)
124 | updateDotTimer = setTimeout(() => { updateDot.classList.remove("visible") }, 120)
125 | }
126 |
127 | function showUpdateDot() {
128 | clearTimeout(updateDotTimer)
129 | updateDot.classList.add("visible")
130 | }
131 |
132 | function updateLineNumbers() {
133 | let nlines = textArea.value.split("\n").length
134 | let s = ""
135 | for (let i = 1; i <= nlines; i++) {
136 | s += i + "\n"
137 | }
138 | lineNumbers.innerText = s
139 | }
140 |
141 |
142 | function focusEditor() {
143 | if (!iOS) {
144 | textArea.focus()
145 | }
146 | }
147 |
148 |
149 | let currentExample = -1
150 |
151 | function loadNextExample() {
152 | presentation.querySelector(".graph").innerText = ""
153 | currentExample = ++currentExample % examples.length
154 | let url = "examples/" + examples[currentExample] + "?v=" + VERSION
155 | fetch(url).then(r => r.text()).then(setSource)
156 | }
157 |
158 |
159 | function setSource(source) {
160 | // bug workaround: adding an extra space and removing it with execCommand
161 | // causes the flexbox layout to be correctly updated.
162 | isSwappingOutEditorValue = true
163 | textArea.value = source + " "
164 | document.execCommand("delete")
165 |
166 | setTimeout(() => {
167 | // workaround for Firefox
168 | isSwappingOutEditorValue = false
169 | generateGraph()
170 | updateLineNumbers()
171 | },0)
172 |
173 | focusEditor()
174 | setTimeout(() => {
175 | try {
176 | textArea.selectionStart = textArea.selectionEnd = 0
177 | } catch(_) {}
178 | },1)
179 | }
180 |
181 |
182 | function updateGenButtonAvailability() {
183 | genButton.disabled = liveUpdate.checked
184 | genButton.classList.toggle("disabled", genButton.disabled)
185 | }
186 |
187 |
188 | let copyTimer = null
189 | let copyButtonRestingLabel = copyButton.innerText
190 |
191 | function copyOutputToClipboard() {
192 | if (copyTimer !== null) {
193 | clearTimeout(copyTimer)
194 | copyButton.innerText = copyButtonRestingLabel
195 | }
196 | let ta = document.createElement("textarea")
197 | ta.style.position = "fixed"
198 | ta.style.pointerEvents = "none"
199 | ta.style.opacity = "0"
200 | document.body.appendChild(ta)
201 | ta.value = lastValidOutput
202 | ta.focus()
203 | ta.select()
204 | document.execCommand("copy")
205 | document.body.removeChild(ta)
206 | copyButton.innerHTML = "✓ Copied "
207 | copyTimer = setTimeout(() => {
208 | copyTimer = null
209 | copyButton.innerText = copyButtonRestingLabel
210 | }, 1000)
211 | }
212 |
213 |
214 | // event handlers
215 |
216 | editor.onclick = ev => {
217 | ev.target !== textArea && focusEditor()
218 | }
219 |
220 | textArea.oninput = () => {
221 | updateLineNumbers()
222 | if (liveUpdate.checked) {
223 | generateGraph()
224 | }
225 | }
226 |
227 | exampleButton.onclick = loadNextExample
228 | liveUpdate.onchange = updateGenButtonAvailability
229 | genButton.onclick = generateGraph
230 | copyButton.onclick = copyOutputToClipboard
231 |
232 |
233 | function getSelectedLineIndex() {
234 | let s = textArea.value
235 | let start = textArea.selectionStart
236 | while (start >= 0) {
237 | if (s.charCodeAt(start) == 0x0A) {
238 | start++
239 | break
240 | }
241 | start--
242 | }
243 | let end = textArea.selectionEnd
244 | while (end < s.length && s.charCodeAt(end) != 0x0A) {
245 | end++
246 | }
247 | let lineIndex = [start]
248 | let i = start
249 | while (i < end) {
250 | if (s.charCodeAt(i++) == 0x0A) {
251 | lineIndex.push(i)
252 | }
253 | }
254 | return lineIndex
255 | }
256 |
257 |
258 | let indentWidth = 2
259 | let indent = " ".substr(0, indentWidth)
260 |
261 |
262 | function indentSelectedLines() {
263 | let s = textArea.value
264 | let lineIndex = getSelectedLineIndex()
265 | let origSel = { start: textArea.selectionStart, end: textArea.selectionEnd }
266 | let offset = 0
267 | let firstOffset = undefined
268 | for (let i of lineIndex) {
269 | // console.log(`i=${i} + offset=${offset} => ${JSON.stringify(textArea.value[i + offset])}`)
270 | textArea.selectionEnd = textArea.selectionStart = i + offset
271 | document.execCommand("insertText", false, indent)
272 | offset += indentWidth
273 | if (firstOffset === undefined) {
274 | firstOffset = indentWidth
275 | }
276 | }
277 | textArea.selectionStart = origSel.start + firstOffset
278 | textArea.selectionEnd = origSel.end + offset
279 | }
280 |
281 |
282 | function dedentSelectedLines() {
283 | // this is a little buggy, but it will do.
284 | let s = textArea.value
285 | let lineIndex = getSelectedLineIndex()
286 | let origSel = { start: textArea.selectionStart, end: textArea.selectionEnd }
287 | let offset = 0
288 | let firstOffset = undefined
289 |
290 | for (let i of lineIndex) {
291 | // console.log(`i=${i} + offset=${offset} => ${JSON.stringify(textArea.value[i + offset])}`)
292 | let end = i
293 | while (end < i + indentWidth) {
294 | let c = s.charCodeAt(end)
295 | if (c != 0x20 && c != 0x09) {
296 | break
297 | }
298 | end++
299 | }
300 | if (end > i) {
301 | textArea.selectionStart = i + offset
302 | textArea.selectionEnd = end + offset
303 | let w = end - i
304 | offset -= w
305 | if (firstOffset === undefined) {
306 | firstOffset = w
307 | }
308 | document.execCommand("delete")
309 | }
310 | }
311 |
312 | textArea.selectionStart = origSel.start - firstOffset
313 | textArea.selectionEnd = origSel.end + offset
314 | }
315 |
316 |
317 | textArea.onkeydown = ev => {
318 | if (((key, ctrlOrMeta) => {
319 | if (ctrlOrMeta && key == "[") {
320 | return dedentSelectedLines(), true
321 | }
322 | if (ctrlOrMeta && key == "]") {
323 | return indentSelectedLines(), true
324 | }
325 | if (key == "Tab" && !ctrlOrMeta) {
326 | ev.stopPropagation()
327 | ev.preventDefault()
328 | if (ev.altKey) {
329 | document.execCommand("insertText", false, "\t")
330 | } else if (ev.shiftKey) {
331 | dedentSelectedLines()
332 | } else {
333 | indentSelectedLines()
334 | }
335 | }
336 | })(ev.key, ev.ctrlKey || ev.metaKey)) {
337 | ev.stopPropagation()
338 | ev.preventDefault()
339 | }
340 | }
341 |
342 | document.onkeydown = ev => {
343 | if ((ev.ctrlKey || ev.metaKey) && (ev.key == "Enter" || ev.key == "s")) {
344 | ev.stopPropagation()
345 | ev.preventDefault()
346 | generateGraph()
347 | }
348 | }
349 |
350 | if (navigator.platform.indexOf("Mac") != -1) {
351 | genButton.title = "⌘↩ or ⌘S"
352 | }
353 |
354 |
355 | let initialWindowWidthRatio = window.outerWidth - window.innerWidth
356 | let initialWindowHeightRatio = window.outerHeight - window.innerHeight
357 | let updateWindowSizeTimer = null
358 |
359 | function updateWindowSize() {
360 | clearTimeout(updateWindowSizeTimer)
361 | let wrd = Math.abs(initialWindowWidthRatio - (window.outerWidth - window.innerWidth))
362 | let hrd = Math.abs(initialWindowHeightRatio - (window.outerHeight - window.innerHeight))
363 | if (wrd > 1 || hrd > 1) {
364 | // probably a zoom thing going on. Check again in a moment since resize events
365 | // are throttled and often the "last" one is not delivered in Safari.
366 | updateWindowSizeTimer = setTimeout(updateWindowSize)
367 | return
368 | }
369 | let s = document.documentElement.style
370 | s.setProperty("--winWidth", window.innerWidth + "px")
371 | s.setProperty("--winHeight", window.innerHeight + "px")
372 | }
373 | window.addEventListener("resize", updateWindowSize, {passive:true})
374 |
375 |
376 | let qs = {}
377 | location.search && location.search.substr(1).split("&").map(function (p) {
378 | let kv = p.split("=")
379 | let k = decodeURIComponent(kv[0])
380 | let v = kv.length == 1 ? "1" : decodeURIComponent(kv[1])
381 | qs[k] = v
382 | })
383 |
384 |
385 | let userSource = qs["source"] || ""
386 |
387 |
388 | updateWindowSize()
389 | if (userSource) {
390 | setSource(userSource)
391 | } else {
392 | loadNextExample()
393 | }
394 | updateGenButtonAvailability()
395 | updateLineNumbers()
396 | focusEditor()
397 |
--------------------------------------------------------------------------------
/docs/examples/clusters.dot:
--------------------------------------------------------------------------------
1 | digraph clusters {
2 | fontname="Inter"
3 | bgcolor=transparent
4 | node [shape=rect, fontname="Inter"]
5 | edge [color="#00994455"]
6 |
7 | subgraph cluster_0 {
8 | style = filled;
9 | color = lightblue;
10 | node [style=filled,color=white,fontname=Georgia];
11 | a0 -> a1 -> a2 -> a3;
12 | label = "process #1";
13 | }
14 |
15 | subgraph cluster_1 {
16 | node [style=filled];
17 | b0 -> b1 -> b2 -> b3;
18 | label = "process #2";
19 | color = hotpink
20 | }
21 |
22 | start -> a0;
23 | start -> b0;
24 | a1 -> b3;
25 | b2 -> a3;
26 | a3 -> a0;
27 | a3 -> end;
28 | b3 -> end;
29 |
30 | start [shape=Mdiamond];
31 | end [shape=Msquare];
32 | }
33 |
--------------------------------------------------------------------------------
/docs/examples/color-dots-graph.dot:
--------------------------------------------------------------------------------
1 | # Example of an undirected graph
2 | graph colors {
3 | # Attributes in here apply to the graph itself.
4 | pad="1"
5 | outputorder=edgesfirst
6 | bgcolor=transparent
7 |
8 | # layout= specifies a layout engine:
9 | # circo — for circular layout of graphs
10 | # dot — for drawing directed graphs (the default)
11 | # fdp — for drawing undirected graphs
12 | # neato — for drawing undirected graphs
13 | # osage — for drawing large undirected graphs
14 | # twopi — for radial layouts of graphs
15 | layout=fdp
16 | #layout=neato
17 | #layout=twopi
18 | #layout=circo
19 |
20 | # Default node attributes
21 | node [
22 | shape = circle
23 | style="filled,bold"
24 | color=black
25 | fontname=Inter
26 | ]
27 |
28 | # Uncomment this to hide labels
29 | #node [ label="" ]
30 |
31 | # Uncomment this to arrange nodes in a grid
32 | #layout=osage outputorder=edgesfirst edge [style=invis]
33 |
34 | # Edges
35 | A -- C
36 | B -- { C, D, F }
37 | C -- H
38 | D -- { F, G }
39 | E -- { F, G, J }
40 | F -- I
41 | G -- L
42 | H -- K
43 | I -- K
44 | J -- M
45 | K -- N
46 | L -- N
47 | M -- N
48 | N -- O
49 |
50 | # Node attributes
51 | A [ fillcolor = "#ECD1C9" ]
52 | B [ fillcolor = "#FBB5AE" ]
53 | C [ fillcolor = "#FFEFBC" ]
54 | D [ fillcolor = "#B7D1DF" ]
55 | E [ fillcolor = "#D1E2CE" ]
56 | F [ fillcolor = "#FADAE5" ]
57 | G [ fillcolor = "#ECE3D5" ]
58 | H [ fillcolor = "#F2F2F2" ]
59 | I [ fillcolor = "#ECE3C1" ]
60 | J [ fillcolor = "#BEDFC8" ]
61 | K [ fillcolor = "#F9F2B6" ]
62 | L [ fillcolor = "#EFD0BD" ]
63 | M [ fillcolor = "#DDD0E5" ]
64 | N [ fillcolor = "#F2E4C8" ]
65 | O [ fillcolor = "#CBCBCB" ]
66 | }
67 |
--------------------------------------------------------------------------------
/docs/examples/color-dots.dot:
--------------------------------------------------------------------------------
1 | # Example of a directed graph.
2 | # Click "next example" button for more examples.
3 | # "digraph" is the default graph type.
4 |
5 | # Attributes in here apply to the graph itself.
6 | pad="1"
7 | outputorder=edgesfirst
8 | bgcolor=transparent
9 |
10 | # layout= specifies a layout engine:
11 | # circo — for circular layout of graphs
12 | # dot — for drawing directed graphs (the default)
13 | # fdp — for drawing undirected graphs
14 | # neato — for drawing undirected graphs
15 | # osage — for drawing large undirected graphs
16 | # twopi — for radial layouts of graphs
17 | layout=neato
18 | #layout=dot
19 | #layout=twopi
20 |
21 | # Default node attributes
22 | node [
23 | shape = circle
24 | style="filled,bold"
25 | color=black
26 | fillcolor="#F2F2F2"
27 | fontname=Inter
28 | ]
29 |
30 | # Uncomment this to hide labels
31 | #node [ label="" ]
32 |
33 | # Uncomment this to arrange nodes in a grid
34 | #layout=osage edge [style=invis]
35 |
36 | # Edges
37 | A -> C
38 | B -> { C, D, F }
39 | C -> H
40 | D -> { F, G }
41 | E -> { F, G, J }
42 | F -> I
43 | G -> L
44 | H -> K
45 | I -> K
46 | J -> M
47 | K -> N
48 | L -> N
49 | M -> N
50 | N -> O
51 |
52 | # Node attributes
53 | A [ fillcolor = "#ECD1C9" ]
54 | B [ fillcolor = "#FBB5AE" ]
55 | C [ fillcolor = "#FFEFBC" ]
56 | D [ fillcolor = "#B7D1DF" ]
57 | E [ fillcolor = "#D1E2CE" ]
58 | F [ fillcolor = "#FADAE5" ]
59 | G [ fillcolor = "#ECE3D5" ]
60 | H [ fillcolor = "#F2F2F2" ]
61 | I [ fillcolor = "#ECE3C1" ]
62 | J [ fillcolor = "#BEDFC8" ]
63 | K [ fillcolor = "#F9F2B6" ]
64 | L [ fillcolor = "#EFD0BD" ]
65 | M [ fillcolor = "#DDD0E5" ]
66 | N [ fillcolor = "#F2E4C8" ]
67 | O [ fillcolor = "#CBCBCB" ]
68 |
69 |
--------------------------------------------------------------------------------
/docs/examples/data_structs.dot:
--------------------------------------------------------------------------------
1 | digraph data_structs {
2 | graph [ rankdir="LR"];
3 | node [ fontname="Inter" ];
4 | edge [];
5 |
6 | "node0" [ label = " 0x10ba8| ", shape = "record"];
7 | "node1" [ label = " 0xf7fc4380| | |-1", shape = "record"];
8 | "node2" [ label = " 0xf7fc44b8| | |2", shape = "record"];
9 | "node3" [ label = " 3.43322790286038071e-06|44.79998779296875|0", shape = "record"];
10 | "node4" [ label = " 0xf7fc4380| | |2", shape = "record"];
11 | "node5" [ label = " (nil)| | |-1", shape = "record"];
12 | "node6" [ label = " 0xf7fc4380| | |1", shape = "record"];
13 | "node7" [ label = " 0xf7fc4380| | |2", shape = "record"];
14 | "node8" [ label = " (nil)| | |-1", shape = "record"];
15 | "node9" [ label = " (nil)| | |-1", shape = "record"];
16 | "node10" [ label = " (nil)| | |-1", shape = "record"];
17 | "node11" [ label = " (nil)| | |-1", shape = "record"];
18 | "node12" [ label = " 0xf7fc43e0| | |1", shape = "record"];
19 |
20 | "node0":f0 -> "node1":f0 [ id = 0];
21 | "node0":f1 -> "node2":f0 [ id = 1];
22 | "node1":f0 -> "node3":f0 [ id = 2];
23 | "node1":f1 -> "node4":f0 [ id = 3];
24 | "node1":f2 -> "node5":f0 [ id = 4];
25 | "node4":f0 -> "node3":f0 [ id = 5];
26 | "node4":f1 -> "node6":f0 [ id = 6];
27 | "node4":f2 -> "node10":f0 [ id = 7];
28 | "node6":f0 -> "node3":f0 [ id = 8];
29 | "node6":f1 -> "node7":f0 [ id = 9];
30 | "node6":f2 -> "node9":f0 [ id = 10];
31 | "node7":f0 -> "node3":f0 [ id = 11];
32 | "node7":f1 -> "node1":f0 [ id = 12];
33 | "node7":f2 -> "node8":f0 [ id = 13];
34 | "node10":f1 -> "node11":f0 [ id = 14];
35 | "node10":f2 -> "node12":f0 [ id = 15];
36 | "node11":f2 -> "node1":f0 [ id = 16];
37 | }
--------------------------------------------------------------------------------
/docs/examples/fsm.dot:
--------------------------------------------------------------------------------
1 | rankdir=LR
2 | bgcolor=transparent
3 | node [fontname=Inter]
4 | edge [fontname=Inter]
5 | node [shape = doublecircle] LR_0 LR_3 LR_4 LR_8
6 | node [shape = square] LR_6
7 | node [shape = circle]
8 |
9 | LR_0 -> LR_2 [ label = "SS(B)" ]
10 | LR_0 -> LR_1 [ label = "SS(S)" ]
11 | LR_1 -> LR_3 [ label = "S($end)" ]
12 | LR_2 -> LR_6 [ label = "SS(b)" ]
13 | LR_2 -> LR_5 [ label = "SS(a)" ]
14 | LR_2 -> LR_4 [ label = "S(A)" ]
15 | LR_5 -> LR_7 [ label = "S(b)" ]
16 | LR_5 -> LR_5 [ label = "S(a)" ]
17 | LR_6 -> LR_6 [ label = "S(b)" ]
18 | LR_6 -> LR_5 [ label = "S(a)" ]
19 | LR_7 -> LR_8 [ label = "S(b)" ]
20 | LR_7 -> LR_5 [ label = "S(a)" ]
21 | LR_8 -> LR_6 [ label = "S(b)" ]
22 | LR_8 -> LR_5 [ label = "S(a)" ]
23 |
--------------------------------------------------------------------------------
/docs/examples/kuratowski.dot:
--------------------------------------------------------------------------------
1 | graph kuratowski {
2 | label="Minimal nonplanar graphs (9 edges / 5 nodes)"
3 | URL="http://en.wikipedia.org/wiki/Kuratowski_theorem#Kuratowski_subgraphs"
4 | tooltip="Kuratowski theorem"
5 | fontname=Inter
6 | node [style=filled fontname=Inter]
7 |
8 | subgraph cluster_0 {
9 | label="K_3,3" color=lightblue style=filled
10 | node [color=white]
11 | {A B C} -- {D E F}
12 | }
13 |
14 | subgraph cluster_1 {
15 | label=K_5 color=blue
16 | node [color=yellow shape=box]
17 | 1 -- {2 -- {3 -- {4 -- 5}}}}
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/docs/examples/lalr.dot:
--------------------------------------------------------------------------------
1 | digraph LALR {
2 | #layout=twopi
3 | #layout=neato
4 | fontsize=30
5 | labelloc="t"
6 | label=""
7 | splines=true
8 | overlap=false
9 | rankdir = "LR"
10 | ratio = auto
11 | fontname=Inter
12 | node [fontname=Inter, fillcolor = "white", shape = "Mrecord", penwidth = 1]
13 | edge [fontname=Inter]
14 |
15 | "state0" [
16 | style = "filled, bold" penwidth = 5
17 | label =<
18 | State #0
19 | (0) s -> •e $
20 | (1) e -> •l '=' r
21 | (2) e -> •r
22 | (3) l -> •'*' r
23 | (4) l -> •'n'
24 | (5) r -> •l
25 |
>
26 | ];
27 | "state1" [
28 | style = "filled"
29 | label =<
30 | State #1
31 | (3) l -> •'*' r
32 | (3) l -> '*' •r
33 | (4) l -> •'n'
34 | (5) r -> •l
35 |
>
36 | ];
37 | "state2" [
38 | style = "filled"
39 | label =<
40 | State #2
41 | (4) l -> 'n' • =$
42 |
>
43 | ];
44 | "state3" [
45 | style = "filled"
46 | label =<
47 | State #3
48 | (5) r -> l • =$
49 |
>
50 | ];
51 | "state4" [
52 | style = "filled"
53 | label =<
54 | State #4
55 | (3) l -> '*' r • =$
56 |
>
57 | ];
58 | "state5" [
59 | style = "filled" fillcolor = "black"
60 | label =<
61 | State #5
62 | (0) s -> e •$
63 |
>
64 | ];
65 | "state6" [
66 | style = "filled"
67 | label =<
68 | State #6
69 | (1) e -> l •'=' r
70 | (5) r -> l • $
71 |
>
72 | ];
73 | "state7" [
74 | style = "filled"
75 | label =<
76 | State #7
77 | (1) e -> l '=' •r
78 | (3) l -> •'*' r
79 | (4) l -> •'n'
80 | (5) r -> •l
81 |
>
82 | ];
83 | "state8" [
84 | style = "filled"
85 | label =<
86 | State #8
87 | (1) e -> l '=' r • $
88 |
>
89 | ];
90 | "state9" [
91 | style = "filled"
92 | label =<
93 | State #9
94 | (2) e -> r • $
95 |
>
96 | ];
97 |
98 | state0 -> state5 [ penwidth = 5 fontsize = 28 fontcolor = "black" label = "e" ];
99 | state0 -> state6 [ penwidth = 5 fontsize = 28 fontcolor = "black" label = "l" ];
100 | state0 -> state9 [ penwidth = 5 fontsize = 28 fontcolor = "black" label = "r" ];
101 | state0 -> state1 [ fontsize = 14 fontcolor = "grey28" label = "'*'" ];
102 | state0 -> state2 [ fontsize = 14 fontcolor = "grey28" label = "'n'" ];
103 | state1 -> state1 [ fontsize = 14 fontcolor = "grey28" label = "'*'" ];
104 | state1 -> state4 [ penwidth = 5 fontsize = 28 fontcolor = "black" label = "r" ];
105 | state1 -> state2 [ fontsize = 14 fontcolor = "grey28" label = "'n'" ];
106 | state1 -> state3 [ penwidth = 5 fontsize = 28 fontcolor = "black" label = "l" ];
107 | state6 -> state7 [ fontsize = 14 fontcolor = "grey28" label = "'='" ];
108 | state7 -> state8 [ penwidth = 5 fontsize = 28 fontcolor = "black" label = "r" ];
109 | state7 -> state1 [ fontsize = 14 fontcolor = "grey28" label = "'*'" ];
110 | state7 -> state2 [ fontsize = 14 fontcolor = "grey28" label = "'n'" ];
111 | state7 -> state3 [ penwidth = 5 fontsize = 28 fontcolor = "black" label = "l" ];
112 | }
--------------------------------------------------------------------------------
/docs/examples/prof.dot:
--------------------------------------------------------------------------------
1 | digraph prof {
2 | ratio = fill;
3 | graph [bgcolor=transparent];
4 | node [style=filled,fontname="Inter"];
5 |
6 | start -> main [color="0.002 0.999 0.999"];
7 | start -> on_exit [color="0.649 0.701 0.701"];
8 | main -> sort [color="0.348 0.839 0.839"];
9 | main -> merge [color="0.515 0.762 0.762"];
10 | main -> term [color="0.647 0.702 0.702"];
11 | main -> signal [color="0.650 0.700 0.700"];
12 | main -> sbrk [color="0.650 0.700 0.700"];
13 | main -> unlink [color="0.650 0.700 0.700"];
14 | main -> newfile [color="0.650 0.700 0.700"];
15 | main -> fclose [color="0.650 0.700 0.700"];
16 | main -> close [color="0.650 0.700 0.700"];
17 | main -> brk [color="0.650 0.700 0.700"];
18 | main -> setbuf [color="0.650 0.700 0.700"];
19 | main -> copyproto [color="0.650 0.700 0.700"];
20 | main -> initree [color="0.650 0.700 0.700"];
21 | main -> safeoutfil [color="0.650 0.700 0.700"];
22 | main -> getpid [color="0.650 0.700 0.700"];
23 | main -> sprintf [color="0.650 0.700 0.700"];
24 | main -> creat [color="0.650 0.700 0.700"];
25 | main -> rem [color="0.650 0.700 0.700"];
26 | main -> oldfile [color="0.650 0.700 0.700"];
27 | sort -> msort [color="0.619 0.714 0.714"];
28 | sort -> filbuf [color="0.650 0.700 0.700"];
29 | sort -> newfile [color="0.650 0.700 0.700"];
30 | sort -> fclose [color="0.650 0.700 0.700"];
31 | sort -> setbuf [color="0.650 0.700 0.700"];
32 | sort -> setfil [color="0.650 0.700 0.700"];
33 | msort -> qsort [color="0.650 0.700 0.700"];
34 | msort -> insert [color="0.650 0.700 0.700"];
35 | msort -> wline [color="0.650 0.700 0.700"];
36 | msort -> div [color="0.650 0.700 0.700"];
37 | msort -> cmpsave [color="0.650 0.700 0.700"];
38 | merge -> insert [color="0.650 0.700 0.700"];
39 | merge -> rline [color="0.650 0.700 0.700"];
40 | merge -> wline [color="0.650 0.700 0.700"];
41 | merge -> unlink [color="0.650 0.700 0.700"];
42 | merge -> fopen [color="0.650 0.700 0.700"];
43 | merge -> fclose [color="0.650 0.700 0.700"];
44 | merge -> setfil [color="0.650 0.700 0.700"];
45 | merge -> mul [color="0.650 0.700 0.700"];
46 | merge -> setbuf [color="0.650 0.700 0.700"];
47 | merge -> cmpsave [color="0.650 0.700 0.700"];
48 | insert -> cmpa [color="0.650 0.700 0.700"];
49 | wline -> flsbuf [color="0.649 0.700 0.700"];
50 | qsort -> cmpa [color="0.650 0.700 0.700"];
51 | rline -> filbuf [color="0.649 0.700 0.700"];
52 | xflsbuf -> write [color="0.650 0.700 0.700"];
53 | flsbuf -> xflsbuf [color="0.649 0.700 0.700"];
54 | filbuf -> read [color="0.650 0.700 0.700"];
55 | term -> unlink [color="0.650 0.700 0.700"];
56 | term -> signal [color="0.650 0.700 0.700"];
57 | term -> setfil [color="0.650 0.700 0.700"];
58 | term -> exit [color="0.650 0.700 0.700"];
59 | endopen -> open [color="0.650 0.700 0.700"];
60 | fopen -> endopen [color="0.639 0.705 0.705"];
61 | fopen -> findiop [color="0.650 0.700 0.700"];
62 | newfile -> fopen [color="0.634 0.707 0.707"];
63 | newfile -> setfil [color="0.650 0.700 0.700"];
64 | fclose -> fflush [color="0.642 0.704 0.704"];
65 | fclose -> close [color="0.650 0.700 0.700"];
66 | fflush -> xflsbuf [color="0.635 0.707 0.707"];
67 | malloc -> morecore [color="0.325 0.850 0.850"];
68 | malloc -> demote [color="0.650 0.700 0.700"];
69 | morecore -> sbrk [color="0.650 0.700 0.700"];
70 | morecore -> getfreehdr [color="0.650 0.700 0.700"];
71 | morecore -> free [color="0.650 0.700 0.700"];
72 | morecore -> getpagesize [color="0.650 0.700 0.700"];
73 | morecore -> putfreehdr [color="0.650 0.700 0.700"];
74 | morecore -> udiv [color="0.650 0.700 0.700"];
75 | morecore -> umul [color="0.650 0.700 0.700"];
76 | on_exit -> malloc [color="0.325 0.850 0.850"];
77 | signal -> sigvec [color="0.650 0.700 0.700"];
78 | moncontrol -> profil [color="0.650 0.700 0.700"];
79 | getfreehdr -> sbrk [color="0.650 0.700 0.700"];
80 | free -> insert [color="0.650 0.700 0.700"];
81 | insert -> getfreehdr [color="0.650 0.700 0.700"];
82 | setfil -> div [color="0.650 0.700 0.700"];
83 | setfil -> rem [color="0.650 0.700 0.700"];
84 | sigvec -> sigblock [color="0.650 0.700 0.700"];
85 | sigvec -> sigsetmask [color="0.650 0.700 0.700"];
86 | doprnt -> urem [color="0.650 0.700 0.700"];
87 | doprnt -> udiv [color="0.650 0.700 0.700"];
88 | doprnt -> strlen [color="0.650 0.700 0.700"];
89 | doprnt -> localeconv [color="0.650 0.700 0.700"];
90 | sprintf -> doprnt [color="0.650 0.700 0.700"];
91 |
92 | // Node attributes
93 | cmpa [color="0.000 1.000 1.000"];
94 | wline [color="0.201 0.753 1.000"];
95 | insert [color="0.305 0.625 1.000"];
96 | rline [color="0.355 0.563 1.000"];
97 | sort [color="0.408 0.498 1.000"];
98 | qsort [color="0.449 0.447 1.000"];
99 | write [color="0.499 0.386 1.000"];
100 | read [color="0.578 0.289 1.000"];
101 | msort [color="0.590 0.273 1.000"];
102 | merge [color="0.603 0.258 1.000"];
103 | unlink [color="0.628 0.227 1.000"];
104 | filbuf [color="0.641 0.212 1.000"];
105 | open [color="0.641 0.212 1.000"];
106 | sbrk [color="0.647 0.204 1.000"];
107 | signal [color="0.647 0.204 1.000"];
108 | moncontrol [color="0.647 0.204 1.000"];
109 | xflsbuf [color="0.650 0.200 1.000"];
110 | flsbuf [color="0.650 0.200 1.000"];
111 | div [color="0.650 0.200 1.000"];
112 | cmpsave [color="0.650 0.200 1.000"];
113 | rem [color="0.650 0.200 1.000"];
114 | setfil [color="0.650 0.200 1.000"];
115 | close [color="0.650 0.200 1.000"];
116 | fclose [color="0.650 0.200 1.000"];
117 | fflush [color="0.650 0.200 1.000"];
118 | setbuf [color="0.650 0.200 1.000"];
119 | endopen [color="0.650 0.200 1.000"];
120 | findiop [color="0.650 0.200 1.000"];
121 | fopen [color="0.650 0.200 1.000"];
122 | mul [color="0.650 0.200 1.000"];
123 | newfile [color="0.650 0.200 1.000"];
124 | sigblock [color="0.650 0.200 1.000"];
125 | sigsetmask [color="0.650 0.200 1.000"];
126 | sigvec [color="0.650 0.200 1.000"];
127 | udiv [color="0.650 0.200 1.000"];
128 | urem [color="0.650 0.200 1.000"];
129 | brk [color="0.650 0.200 1.000"];
130 | getfreehdr [color="0.650 0.200 1.000"];
131 | strlen [color="0.650 0.200 1.000"];
132 | umul [color="0.650 0.200 1.000"];
133 | doprnt [color="0.650 0.200 1.000"];
134 | copyproto [color="0.650 0.200 1.000"];
135 | creat [color="0.650 0.200 1.000"];
136 | demote [color="0.650 0.200 1.000"];
137 | exit [color="0.650 0.200 1.000"];
138 | free [color="0.650 0.200 1.000"];
139 | getpagesize [color="0.650 0.200 1.000"];
140 | getpid [color="0.650 0.200 1.000"];
141 | initree [color="0.650 0.200 1.000"];
142 | insert [color="0.650 0.200 1.000"];
143 | localeconv [color="0.650 0.200 1.000"];
144 | main [color="0.650 0.200 1.000"];
145 | malloc [color="0.650 0.200 1.000"];
146 | morecore [color="0.650 0.200 1.000"];
147 | oldfile [color="0.650 0.200 1.000"];
148 | on_exit [color="0.650 0.200 1.000"];
149 | profil [color="0.650 0.200 1.000"];
150 | putfreehdr [color="0.650 0.200 1.000"];
151 | safeoutfil [color="0.650 0.200 1.000"];
152 | sprintf [color="0.650 0.200 1.000"];
153 | term [color="0.650 0.200 1.000"];
154 | }
155 |
--------------------------------------------------------------------------------
/docs/examples/projects.dot:
--------------------------------------------------------------------------------
1 | digraph Projects {
2 |
3 | node [shape=plaintext fontname="Helvetica" fontsize="8"];
4 |
5 | task_menu [ label=<
6 |
7 | Task 1
8 | Choose Menu
9 | done
10 |
>];
11 |
12 | task_ingredients [ label=<
13 |
14 | Task 2
15 | Buy ingredients
16 | done
17 |
>];
18 |
19 | task_invitation [ label=<
20 |
21 | Task 4
22 | Send invitation
23 | done
24 |
>];
25 |
26 | task_cook [ label=<
27 |
28 | Task 5
29 | Cook
30 | todo
31 |
>];
32 |
33 | task_table[ label=<
34 |
35 | Task 3
36 | Lay table
37 | todo
38 |
>];
39 |
40 | task_eat[ label=<
41 |
42 | Task 6
43 | Eat
44 | todo
45 |
>];
46 |
47 |
48 | task_menu -> task_ingredients;
49 | task_ingredients -> task_cook;
50 | task_invitation -> task_cook;
51 | task_table -> task_eat;
52 | task_cook -> task_eat;
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/docs/examples/records.dot:
--------------------------------------------------------------------------------
1 |
2 | A [shape=record
3 | label="UID
4 | |{A-net (bit 0-15)
5 | |Addr (bit 16-31)
6 | |DataLen (bit 32-63)}
7 | |Data"];
8 |
9 | B [shape=record
10 | label="Validated UID
11 | |{A-net (bit 0-15)
12 | |Addr (bit 16-31)
13 | |DataLen (bit 32-63)}
14 | |Data
15 | |Checksum"];
16 |
17 | C [shape=record
18 | label="Invalid UID
19 | |{A-net (bit 0-15)
20 | |Addr (bit 16-31)}"];
21 |
22 | Filter [shape=diamond
23 | label="Valid"]
24 |
25 | A -> Filter
26 | Filter -> B [label="yes"]
27 | Filter -> C [label="No"]
28 |
--------------------------------------------------------------------------------
/docs/examples/switch.dot:
--------------------------------------------------------------------------------
1 | graph [center=1 rankdir=LR bgcolor="#808080"]
2 | edge [dir=none]
3 | node [width=0.3 height=0.3 label=""]
4 | { node [shape=circle style=invis]
5 | 1 2 3 4 5 6 7 8 10 20 30 40 50 60 70 80
6 | }
7 | { node [shape=circle]
8 | a b c d e f g h i j k l m n o p q r s t u v w x
9 | }
10 | { node [shape=diamond]
11 | A B C D E F G H I J K L M N O P Q R S T U V W X
12 | }
13 | 1 -> a -> {A B} [color="#0000ff"]
14 | // 1 -> a -> {A B} [color="#c0c0ff"]
15 | 2 -> b -> {B A} [color="#ff0000"]
16 | 3 -> c -> {C D} [color="#ffff00"]
17 | 4 -> d -> {D C} [color="#00ff00"]
18 | 5 -> e -> {E F} [color="#000000"]
19 | 6 -> f -> {F E} [color="#00ffff"]
20 | 7 -> g -> {G H} [color="#ffffff"]
21 | 8 -> h -> {H G} [color="#ff00ff"]
22 | { edge [color="#ff0000:#0000ff"]
23 | A -> i -> {I K}
24 | B -> j -> {J L}
25 | }
26 | { edge [color="#00ff00:#ffff00"]
27 | C -> k -> {K I}
28 | D -> l -> {L J}
29 | }
30 | { edge [color="#00ffff:#000000"]
31 | E -> m -> {M O}
32 | F -> n -> {N P}
33 | }
34 | { edge [color="#ff00ff:#ffffff"]
35 | G -> o -> {O M}
36 | H -> p -> {P N}
37 | }
38 | { edge [color="#00ff00:#ffff00:#ff0000:#0000ff"]
39 | I -> q -> {Q U}
40 | J -> r -> {R V}
41 | K -> s -> {S W}
42 | L -> t -> {T X}
43 | }
44 | { edge [color="#ff00ff:#ffffff:#00ffff:#000000"]
45 | M -> u -> {U Q}
46 | N -> v -> {V R}
47 | O -> w -> {W S}
48 | P -> x -> {X T}
49 | }
50 | { edge [color="#ff00ff:#ffffff:#00ffff:#000000:#00ff00:#ffff00:#ff0000:#0000ff"]
51 | Q -> 10
52 | R -> 20
53 | S -> 30
54 | T -> 40
55 | U -> 50
56 | V -> 60
57 | W -> 70
58 | X -> 80
59 | }
60 |
--------------------------------------------------------------------------------
/docs/examples/unix.dot:
--------------------------------------------------------------------------------
1 | digraph "unix" {
2 | graph [
3 | fontname = "Helvetica-Oblique",
4 | fontsize = 36,
5 | label = "\n\n\n\nObject Oriented Graphs\nStephen North, 3/19/93",
6 | size = "12,12",
7 | bgcolor = transparent
8 | ];
9 | node [ shape = polygon,
10 | sides = 4,
11 | distortion = "0.0",
12 | orientation = "0.0",
13 | skew = "0.0",
14 | color = white,
15 | style = filled ];
16 | "5th Edition" [sides=9, distortion="0.936354", orientation=28, skew="-0.126818", color=salmon2];
17 | "6th Edition" [sides=5, distortion="0.238792", orientation=11, skew="0.995935", color=deepskyblue];
18 | "PWB 1.0" [sides=8, distortion="0.019636", orientation=79, skew="-0.440424", color=goldenrod2];
19 | LSX [sides=9, distortion="-0.698271", orientation=22, skew="-0.195492", color=burlywood2];
20 | "1 BSD" [sides=7, distortion="0.265084", orientation=26, skew="0.403659", color=gold1];
21 | "Mini Unix" [distortion="0.039386", orientation=2, skew="-0.461120", color=greenyellow];
22 | Wollongong [sides=5, distortion="0.228564", orientation=63, skew="-0.062846", color=darkseagreen];
23 | Interdata [distortion="0.624013", orientation=56, skew="0.101396", color=dodgerblue1];
24 | "Unix/TS 3.0" [sides=8, distortion="0.731383", orientation=43, skew="-0.824612", color=thistle2];
25 | "PWB 2.0" [sides=6, distortion="0.592100", orientation=34, skew="-0.719269", color=darkolivegreen3];
26 | "7th Edition" [sides=10, distortion="0.298417", orientation=65, skew="0.310367", color=chocolate];
27 | "8th Edition" [distortion="-0.997093", orientation=50, skew="-0.061117", color=turquoise3];
28 | "32V" [sides=7, distortion="0.878516", orientation=19, skew="0.592905", color=steelblue3];
29 | V7M [sides=10, distortion="-0.960249", orientation=32, skew="0.460424", color=navy];
30 | "Ultrix-11" [sides=10, distortion="-0.633186", orientation=10, skew="0.333125", color=darkseagreen4];
31 | Xenix [sides=8, distortion="-0.337997", orientation=52, skew="-0.760726", color=coral];
32 | "UniPlus+" [sides=7, distortion="0.788483", orientation=39, skew="-0.526284", color=darkolivegreen3];
33 | "9th Edition" [sides=7, distortion="0.138690", orientation=55, skew="0.554049", color=coral3];
34 | "2 BSD" [sides=7, distortion="-0.010661", orientation=84, skew="0.179249", color=blanchedalmond];
35 | "2.8 BSD" [distortion="-0.239422", orientation=44, skew="0.053841", color=lightskyblue1];
36 | "2.9 BSD" [distortion="-0.843381", orientation=70, skew="-0.601395", color=aquamarine2];
37 | "3 BSD" [sides=10, distortion="0.251820", orientation=18, skew="-0.530618", color=lemonchiffon];
38 | "4 BSD" [sides=5, distortion="-0.772300", orientation=24, skew="-0.028475", color=darkorange1];
39 | "4.1 BSD" [distortion="-0.226170", orientation=38, skew="0.504053", color=lightyellow1];
40 | "4.2 BSD" [sides=10, distortion="-0.807349", orientation=50, skew="-0.908842", color=darkorchid4];
41 | "4.3 BSD" [sides=10, distortion="-0.030619", orientation=76, skew="0.985021", color=lemonchiffon2];
42 | "Ultrix-32" [distortion="-0.644209", orientation=21, skew="0.307836", color=goldenrod3];
43 | "PWB 1.2" [sides=7, distortion="0.640971", orientation=84, skew="-0.768455", color=cyan];
44 | "USG 1.0" [distortion="0.758942", orientation=42, skew="0.039886", color=blue];
45 | "CB Unix 1" [sides=9, distortion="-0.348692", orientation=42, skew="0.767058", color=firebrick];
46 | "USG 2.0" [distortion="0.748625", orientation=74, skew="-0.647656", color=chartreuse4];
47 | "CB Unix 2" [sides=10, distortion="0.851818", orientation=32, skew="-0.020120", color=greenyellow];
48 | "CB Unix 3" [sides=10, distortion="0.992237", orientation=29, skew="0.256102", color=bisque4];
49 | "Unix/TS++" [sides=6, distortion="0.545461", orientation=16, skew="0.313589", color=mistyrose2];
50 | "PDP-11 Sys V" [sides=9, distortion="-0.267769", orientation=40, skew="0.271226", color=cadetblue1];
51 | "USG 3.0" [distortion="-0.848455", orientation=44, skew="0.267152", color=bisque2];
52 | "Unix/TS 1.0" [distortion="0.305594", orientation=75, skew="0.070516", color=orangered];
53 | "TS 4.0" [sides=10, distortion="-0.641701", orientation=50, skew="-0.952502", color=crimson];
54 | "System V.0" [sides=9, distortion="0.021556", orientation=26, skew="-0.729938", color=darkorange1];
55 | "System V.2" [sides=6, distortion="0.985153", orientation=33, skew="-0.399752", color=darkolivegreen4];
56 | "System V.3" [sides=7, distortion="-0.687574", orientation=58, skew="-0.180116", color=lightsteelblue1];
57 | "5th Edition" -> "6th Edition";
58 | "5th Edition" -> "PWB 1.0";
59 | "6th Edition" -> LSX;
60 | "6th Edition" -> "1 BSD";
61 | "6th Edition" -> "Mini Unix";
62 | "6th Edition" -> Wollongong;
63 | "6th Edition" -> Interdata;
64 | Interdata -> "Unix/TS 3.0";
65 | Interdata -> "PWB 2.0";
66 | Interdata -> "7th Edition";
67 | "7th Edition" -> "8th Edition";
68 | "7th Edition" -> "32V";
69 | "7th Edition" -> V7M;
70 | "7th Edition" -> "Ultrix-11";
71 | "7th Edition" -> Xenix;
72 | "7th Edition" -> "UniPlus+";
73 | V7M -> "Ultrix-11";
74 | "8th Edition" -> "9th Edition";
75 | "1 BSD" -> "2 BSD";
76 | "2 BSD" -> "2.8 BSD";
77 | "2.8 BSD" -> "Ultrix-11";
78 | "2.8 BSD" -> "2.9 BSD";
79 | "32V" -> "3 BSD";
80 | "3 BSD" -> "4 BSD";
81 | "4 BSD" -> "4.1 BSD";
82 | "4.1 BSD" -> "4.2 BSD";
83 | "4.1 BSD" -> "2.8 BSD";
84 | "4.1 BSD" -> "8th Edition";
85 | "4.2 BSD" -> "4.3 BSD";
86 | "4.2 BSD" -> "Ultrix-32";
87 | "PWB 1.0" -> "PWB 1.2";
88 | "PWB 1.0" -> "USG 1.0";
89 | "PWB 1.2" -> "PWB 2.0";
90 | "USG 1.0" -> "CB Unix 1";
91 | "USG 1.0" -> "USG 2.0";
92 | "CB Unix 1" -> "CB Unix 2";
93 | "CB Unix 2" -> "CB Unix 3";
94 | "CB Unix 3" -> "Unix/TS++";
95 | "CB Unix 3" -> "PDP-11 Sys V";
96 | "USG 2.0" -> "USG 3.0";
97 | "USG 3.0" -> "Unix/TS 3.0";
98 | "PWB 2.0" -> "Unix/TS 3.0";
99 | "Unix/TS 1.0" -> "Unix/TS 3.0";
100 | "Unix/TS 3.0" -> "TS 4.0";
101 | "Unix/TS++" -> "TS 4.0";
102 | "CB Unix 3" -> "TS 4.0";
103 | "TS 4.0" -> "System V.0";
104 | "System V.0" -> "System V.2";
105 | "System V.2" -> "System V.3";
106 | }
107 |
--------------------------------------------------------------------------------
/docs/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsms/graphviz/ea35b3eb7c565ab586256ac036f5fdcbbfa62069/docs/favicon.png
--------------------------------------------------------------------------------
/docs/favicon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/graphviz.js:
--------------------------------------------------------------------------------
1 | /* docs/graphviz.js 1.0.7 */
2 | !function(e){"use strict";var t,r,n,i,o,a,s,d=void 0!==d?d:"undefined"!=typeof window?window:this;function l(){return"devicePixelRatio"in window&&window.devicePixelRatio>1?window.devicePixelRatio:1}console.log.bind(console),Object.defineProperty(e,"__esModule",{value:!0}),t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},n=function(){function e(e,t){var r,n;for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},n=t.workerURL,i=t.worker,s=t.Module,d=t.render;if(r(this,e),void 0!==n)this.wrapper=new o(new Worker(n));else if(void 0!==i)this.wrapper=new o(i);else if(void 0!==s&&void 0!==d)this.wrapper=new a(s,d);else{if(void 0===e.Module||void 0===e.render)throw new Error("Must specify workerURL or worker option, Module and render options, or include one of full.render.js or lite.render.js after viz.js.");this.wrapper=new a(e.Module,e.render)}}return n(e,[{key:"renderString",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.format,i=void 0===n?"svg":n,o=r.engine,a=void 0===o?"dot":o,s=r.files,d=void 0===s?[]:s,l=r.images,c=void 0===l?[]:l,u=r.yInvert,h=void 0!==u&&u,f=r.nop,m=void 0===f?0:f;for(t=0;t\n\n '});return this.wrapper.render(e,{format:i,engine:a,files:d,images:c,yInvert:h,nop:m})}},{key:"renderSVGElement",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.renderString(e,i({},t,{format:"svg"})).then(function(e){return(new DOMParser).parseFromString(e,"image/svg+xml").documentElement})}},{key:"renderImageElement",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.scale,o=r.mimeType,a=r.quality;return this.renderString(e,i({},r,{format:"svg"})).then(function(e){return"object"===("undefined"==typeof fabric?"undefined":t(fabric))&&fabric.loadSVGFromString?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.scale,n=void 0===r?l():r,i=t.mimeType,o=void 0===i?"image/png":i,a=t.quality,s=void 0===a?1:a,d=n,c=void 0;return"image/jpeg"==o?c="jpeg":"image/png"==o&&(c="png"),new Promise(function(t,r){fabric.loadSVGFromString(e,function(e,n){var i,o,a,l;0==e.length&&r(new Error("Error loading SVG with Fabric")),(i=document.createElement("canvas")).width=n.width,i.height=n.height,o=new fabric.Canvas(i,{enableRetinaScaling:!1}),a=fabric.util.groupSVGElements(e,n),o.add(a).renderAll(),(l=new Image).src=o.toDataURL({format:c,multiplier:d,quality:s}),l.width=n.width,l.height=n.height,t(l)})})}(e,{scale:n,mimeType:o,quality:a}):function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.scale,n=void 0===r?l():r,i=t.mimeType,o=void 0===i?"image/png":i,a=t.quality,s=void 0===a?1:a;return new Promise(function(t,r){var i=new Image;i.onload=function(){var e=document.createElement("canvas");e.width=i.width*n,e.height=i.height*n,e.getContext("2d").drawImage(i,0,0,e.width,e.height),e.toBlob(function(e){var r=new Image;r.src=URL.createObjectURL(e),r.width=i.width,r.height=i.height,t(r)},o,s)},i.onerror=function(e){var t;t="error"in e?e.error:new Error("Error loading SVG"),r(t)},i.src="data:image/svg+xml;base64,"+btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}))})}(e,{scale:n,mimeType:o,quality:a})})}},{key:"renderJSONObject",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.format;return"json"===r&&"json0"===r||(r="json"),this.renderString(e,i({},t,{format:r})).then(function(e){return JSON.parse(e)})}}]),e}();const c="1.0.7",u=new Error("timeout"),h=(e=>{let t=(e?e.src:"").match(/^[^\?]+\//);return t?t[0]:"https://rsms.me/graphviz/"})(document.currentScript),f=-1!=document.location.pathname.indexOf("iframe-proxy.html")||document.location.protocol in{"http:":1,"https:":1}?null:new class{constructor(){this.nextTrID=0,this.trans=new Map;const e=setTimeout(()=>{this.reject(new Error("proxy timeout"))},3e4);this.loadp=new Promise((t,r)=>{this.resolve=(()=>{(Date.now()-0).toFixed(0),clearTimeout(e),t()}),this.reject=(e=>{r(e)})}),window.addEventListener("message",e=>{e.data;let t=e.data;if(t&&"object"==typeof t)switch(t.type){case"graphviz.proxy.ready":e.stopPropagation(),this.resolve();break;case"graphviz.proxy.response":{let r=this.trans.get(t.trid);r&&(this.trans.delete(t.trid),t.error?r.reject(new Error(String(t.error))):r.resolve(t.result)),e.stopPropagation();break}}}),this.createIframe()}transaction(e){return this.loadp.then(()=>new Promise((t,r)=>{let n={id:this.nextTrID++,resolve:t,reject:r};this.trans.set(n.id,n),this.w.postMessage({...e,trid:n.id},"*")}))}layout(e,t,r,n){return this.transaction({type:"layout",args:[e,t,r,n]})}createIframe(){let e=h+"iframe-proxy.html?v="+c,t=this.iframe=document.createElement("iframe");t.style.position="fixed",t.style.visibility="hidden",t.style.pointerEvents="none",t.src=e,t.sandbox="allow-same-origin allow-scripts allow-popups allow-forms allow-modals",t.border="0",document.documentElement.appendChild(t),this.w=t.contentWindow,this.w}},m=f?f.layout.bind(f):(()=>{let e;function t(){e&&e.wrapper.worker.terminate(),(e=new s({workerURL:h+"viz-worker.js?v="+c})).renderString("digraph G {}",{format:"svg",engine:"dot"}).catch(()=>{})}return t(),(r,n,i,o)=>new Promise((a,s)=>{let d;return o&&o>0&&(d=setTimeout(()=>{t(),s(u)},o)),e.renderString(r,{format:n||"svg",engine:i||"dot"}).then(a).catch(e=>{clearTimeout(d),t(),s(e)})})})();e.TimeoutError=u,e.layout=m,e.version=c}("undefined"!=typeof exports?exports:("undefined"!=typeof global?global:"undefined"!=typeof self?self:this).graphviz={});
3 | //#sourceMappingURL=graphviz.js.map
4 |
--------------------------------------------------------------------------------
/docs/graphviz.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["viz.js","graphviz.ts"],"names":["_typeof","classCallCheck","createClass","_extends","WorkerWrapper","ModuleWrapper","Viz","defaultScale","window","devicePixelRatio","Symbol","iterator","obj","constructor","prototype","instance","Constructor","TypeError","defineProperties","target","props","i","descriptor","length","enumerable","configurable","writable","Object","defineProperty","key","protoProps","staticProps","assign","source","arguments","hasOwnProperty","call","worker","_this","this","listeners","nextId","addEventListener","event","id","data","error","result","value","src","options","_this2","Promise","resolve","reject","Error","message","fileName","lineNumber","postMessage","module","render","_ref3","undefined","workerURL","Module","wrapper","Worker","_ref4","_ref4$format","format","_ref4$engine","engine","_ref4$files","files","_ref4$images","images","_ref4$yInvert","yInvert","_ref4$nop","nop","push","path","width","height","renderString","then","str","DOMParser","parseFromString","documentElement","scale","mimeType","quality","fabric","loadSVGFromString","svgXml","_ref2","_ref2$scale","_ref2$mimeType","_ref2$quality","multiplier","objects","element","canvas","image","document","createElement","Canvas","enableRetinaScaling","util","groupSVGElements","add","renderAll","Image","toDataURL","svgXmlToImageElementFabric","_ref","_ref$scale","_ref$mimeType","_ref$quality","svgImage","onload","getContext","drawImage","toBlob","blob","URL","createObjectURL","onerror","e","btoa","encodeURIComponent","replace","match","p1","String","fromCharCode","svgXmlToImageElement","JSON","parse","version","TimeoutError","urlBase","s","m","currentScript","proxy","location","pathname","indexOf","protocol","http:","https:","[object Object]","nextTrID","trans","Map","timeoutTimer","setTimeout","loadp","Date","now","toFixed","clearTimeout","ev","msg","type","stopPropagation","t","get","trid","delete","createIframe","set","w","timeout","transaction","args","proxyUrl","iframe","style","position","visibility","pointerEvents","sandbox","border","appendChild","contentWindow","layout","bind","_viz","restartWorker","terminate","catch","err"],"mappings":"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","file":"graphviz.js","sourceRoot":"../src"}
--------------------------------------------------------------------------------
/docs/iframe-proxy.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Graphviz iframe proxy
4 |
5 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/docs/index.css:
--------------------------------------------------------------------------------
1 | @import url("https://rsms.me/inter/inter.css");
2 | @import url("https://rsms.me/res/fonts/iaw.css");
3 |
4 | /* reset */
5 | /** { font-family: inherit; line-height: inherit; font-synthesis: none; }*/
6 | * { font-synthesis: none; }
7 | a, abbr, acronym, address, applet, article, aside, audio, b, big, blockquote,
8 | body, canvas, caption, center, cite, code, dd, del, details, dfn, div, dl, dt,
9 | em, embed, fieldset, figcaption, figure, footer, form, grid, h1, h2, h3, h4, h5,
10 | h6, header, hgroup, hr, html, i, iframe, img, ins, kbd, label, legend, li, main,
11 | mark, menu, nav, noscript, object, ol, output, p, pre, q, s, samp, section,
12 | small, span, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th,
13 | thead, time, tr, tt, u, ul, var, video {
14 | margin: 0;
15 | padding: 0;
16 | border: 0;
17 | vertical-align: baseline;
18 | }
19 | blockquote, q { quotes: none; }
20 | blockquote:before, blockquote:after, q:before, q:after {
21 | content: "";
22 | content: none;
23 | }
24 | table {
25 | border-collapse: collapse;
26 | border-spacing: 0;
27 | }
28 | a, a:active, a:visited { color: inherit; }
29 | /* end of reset */
30 |
31 | :root {
32 | --blue: #0088ff;
33 | --fontSize: 11px;
34 | --editorFontSize: var(--fontSize);
35 | --fontFamily: Inter;
36 | --editorFontFamily: 'iaw-quattro';
37 | --editorWidth: 420px;
38 | --toolbarHeight: 40px;
39 | --buttonHeight: 24px;
40 | }
41 | @supports (font-variation-settings: normal) { :root {
42 | --fontFamily: "Inter var";
43 | --editorFontFamily: 'iaw-quattro-var';
44 | }}
45 |
46 | body {
47 | background: transparent;
48 | color: #222;
49 | font: var(--fontSize)/1.4 var(--fontFamily), system-ui, -system-ui, sans-serif;
50 | overflow: hidden;
51 | }
52 |
53 | #editor {
54 | display: flex;
55 | flex-direction: column;
56 | /*border-right: 1px solid #ccc;*/
57 | width: var(--editorWidth);
58 | flex: 1 1 auto;
59 | position: fixed;
60 | left:0; top:0; bottom:0;
61 | }
62 |
63 | #editor .scroll-view {
64 | flex: 1 1 auto;
65 | -webkit-overflow-scrolling: touch;
66 | overflow: auto;
67 | overflow-x: hidden;
68 | overflow-y: auto;
69 | }
70 |
71 | #editor .code {
72 | flex: 1 1 auto;
73 | display: flex;
74 | align-items: stretch;
75 | justify-content: stretch;
76 | }
77 |
78 | #editor .code .line-numbers {
79 | color: #ccc;
80 | text-align: right;
81 | flex: 0 0 auto;
82 | display: flex;
83 | white-space: pre;
84 | width: 32px;
85 | padding-left:8px;
86 | /*overflow: hidden;*/
87 | user-select:none; -webkit-user-select:none;
88 | cursor: default;
89 | /*pointer-events: none;*/
90 | }
91 |
92 | #editor .code textarea {
93 | flex: 1 1 auto;
94 | min-height:100px;
95 | margin:0;
96 | border: none;
97 | outline: none;
98 | padding-left: 4px;
99 | padding-right: 8px;
100 | resize: none;
101 | overflow-y: hidden;
102 | }
103 |
104 | #editor .code .line-numbers,
105 | #editor .code textarea {
106 | font-family: var(--editorFontFamily);
107 | font-size: var(--editorFontSize);
108 | line-height: 1.4;
109 | padding-top: 8px;
110 | padding-bottom: 8px;
111 | }
112 |
113 | #editor .toolbar {
114 | flex: 0 0 auto;
115 | height: var(--toolbarHeight);
116 | box-shadow: 0 -1px 0 0 rgba(0,0,0,0.1);
117 | padding: 0 8px;
118 | display: flex;
119 | align-items: center;
120 | z-index: 1;
121 | }
122 |
123 | #editor .toolbar button {
124 | font: inherit;
125 | font-weight: 450;
126 | line-height: 1;
127 | box-sizing: border-box;
128 | height: var(--buttonHeight);
129 | padding: 0 8px;
130 | margin:0;
131 | /*border: 1px solid #ccc;*/
132 | border: none;
133 | background: none;
134 | background: rgba(0,0,0,0.1);
135 | letter-spacing:0.02em;
136 | border-radius: 5px;
137 | margin-left: 8px;
138 | }
139 | #editor .toolbar button:hover {
140 | background: rgba(0,0,0,0.2);
141 | }
142 | #editor .toolbar button:active {
143 | background: rgba(0,0,200,0.5);
144 | }
145 | #editor .toolbar button.disabled {
146 | display: none;
147 | }
148 | #editor .toolbar label {
149 | user-select:none; -webkit-user-select:none;
150 | }
151 | #editor .toolbar button[name="copy"] {
152 | width:73px; /* fixed size because we swap out label temporarily */
153 | padding:0;
154 | }
155 | #editor .toolbar .source {
156 | flex: 1 1 auto;
157 | display: flex;
158 | justify-content: flex-end;
159 | }
160 | #editor .toolbar .source a {
161 | display: block;
162 | height: var(--buttonHeight);
163 | line-height: var(--buttonHeight);
164 | padding: 0 8px;
165 | text-decoration: none;
166 | }
167 | #editor .toolbar .source a:hover {
168 | text-decoration: underline;
169 | }
170 |
171 |
172 | #presentation {
173 | position: fixed;
174 | left: var(--editorWidth); top:0; bottom:0; right:0;
175 | /*background: white;*/
176 | display: flex;
177 | justify-content: center;
178 | align-items: center;
179 | overflow: hidden;
180 | border-left: 1px solid rgba(0,0,0,0.1);
181 | }
182 |
183 | #presentation .graph {
184 | flex: 0 0 auto;
185 | display: flex;
186 | /*background-position: center;
187 | background-repeat: no-repeat;
188 | background-size: contain;*/
189 | padding: 32px;
190 | position: absolute;
191 | left:0; top:0; right:0; bottom:0;
192 | overflow: hidden;
193 | align-items: center;
194 | justify-content: center;
195 | }
196 |
197 | svg {
198 | flex: 1 1 auto;
199 | object-position: 50% 50%;
200 | object-fit: contain;
201 | width:100%;
202 | height:100%;
203 | }
204 | /*svg *[font-family="Times,serif"],*/
205 | svg *[font-family="Arial,Inter"],
206 | svg *[font-family="Courier,Inter"] {
207 | font-family: var(--fontFamily);
208 | }
209 |
210 | #presentation .error {
211 | --errorMsgHeight: 32px;
212 | --errorMsgBottomMargin: 16px;
213 | display: flex;
214 | align-items: center;
215 | height: var(--errorMsgHeight);
216 | z-index: 2;
217 | background-color: #FFE310;
218 | background-color: color(display-p3 1 0.87 0.05);
219 | color: black;
220 | padding: 0 12px;
221 | border-radius: 3px;
222 | margin-bottom: var(--errorMsgBottomMargin);
223 | font-family: var(--editorFontFamily);
224 | font-size: var(--editorFontSize);
225 | position: absolute; bottom:0;
226 | opacity: 0;
227 | pointer-events: none;
228 | transition: all 220ms ease-in-out;
229 | transform: translate(0, calc(var(--errorMsgHeight) + var(--errorMsgBottomMargin)));
230 | }
231 | #presentation.error .error {
232 | opacity: 1;
233 | pointer-events: all;
234 | transform: translate(0, 0);
235 | transition: all 30ms ease-out;
236 | }
237 |
238 |
239 |
240 | #update-dot {
241 | position: fixed;
242 | top:16px;
243 | left:calc(var(--editorWidth) + 16px);
244 | width:8px;
245 | height:8px;
246 | border-radius:8px;
247 | background: rgba(0,0,0,0.8);
248 | transition: opacity 100ms ease-out;
249 | opacity: 0;
250 | pointer-events: none;
251 | z-index:9;
252 | }
253 | #update-dot.visible {
254 | opacity: 1;
255 | transition: opacity 0ms ease-out;
256 | }
257 |
258 |
259 | @media only screen and (max-width: 800px) {
260 | :root {
261 | --editorWidth: 50vw;
262 | }
263 | }
264 |
265 |
266 | /* for window width <= 600 */
267 | @media only screen and (max-width: 600px) {
268 | :root {
269 | --editorWidth: 100vw;
270 | }
271 | #editor {
272 | top: initial;
273 | height: calc(var(--winHeight) * 0.5);
274 | box-shadow: 0 -1px 0 0 rgba(0,0,0,0.1);
275 | }
276 | #presentation {
277 | left: 0; top: 0; right:0; bottom: initial;
278 | height: calc(var(--winHeight) * 0.5);
279 | }
280 | }
281 |
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Graphviz
4 |
5 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
50 |
51 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/docs/serve.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | from __future__ import print_function, absolute_import
3 | import os, sys
4 | import signal
5 | import socket
6 | import http.server
7 | from os.path import dirname, abspath, join as pjoin
8 |
9 | def sighandler(signum, frame):
10 | sys.stdout.write('\n')
11 | sys.stdout.flush()
12 | sys.exit(1)
13 |
14 |
15 | class HTTPServer(http.server.HTTPServer):
16 | def __init__(self, addr):
17 | http.server.HTTPServer.__init__(
18 | self, addr, http.server.SimpleHTTPRequestHandler)
19 |
20 | def server_bind(self):
21 | self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
22 | http.server.HTTPServer.server_bind(self)
23 |
24 | addr = ("127.0.0.1", 3009)
25 |
26 | if len(sys.argv) > 1:
27 | if sys.argv[1] == '-h':
28 | print('usage: %s [-h | --bind-any]' % sys.argv[0], file=sys.stdout)
29 | sys.exit(0)
30 | elif sys.argv[1] == '--bind-any':
31 | addr = ("0.0.0.0", addr[1])
32 |
33 | # make ^C instantly exit program
34 | signal.signal(signal.SIGINT, sighandler)
35 |
36 | os.chdir(os.path.dirname(os.path.abspath(__file__)))
37 |
38 | httpd = HTTPServer(addr)
39 | print("serving %s at http://%s:%d/" % (os.getcwd(), addr[0], addr[1]))
40 | httpd.serve_forever()
41 |
--------------------------------------------------------------------------------
/docs/touchicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsms/graphviz/ea35b3eb7c565ab586256ac036f5fdcbbfa62069/docs/touchicon.png
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@rsms/graphviz",
3 | "version": "1.0.2",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "@types/estree": {
8 | "version": "0.0.39",
9 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
10 | "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==",
11 | "dev": true
12 | },
13 | "@types/node": {
14 | "version": "12.12.3",
15 | "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.3.tgz",
16 | "integrity": "sha512-opgSsy+cEF9N8MgaVPnWVtdJ3o4mV2aMHvDq7thkQUFt0EuOHJon4rQpJfhjmNHB+ikl0Cd6WhWIErOyQ+f7tw==",
17 | "dev": true
18 | },
19 | "@types/q": {
20 | "version": "1.5.2",
21 | "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz",
22 | "integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==",
23 | "dev": true
24 | },
25 | "@types/resolve": {
26 | "version": "0.0.8",
27 | "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz",
28 | "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==",
29 | "dev": true,
30 | "requires": {
31 | "@types/node": "*"
32 | }
33 | },
34 | "acorn": {
35 | "version": "7.1.0",
36 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz",
37 | "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==",
38 | "dev": true
39 | },
40 | "ansi-styles": {
41 | "version": "3.2.1",
42 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
43 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
44 | "dev": true,
45 | "requires": {
46 | "color-convert": "^1.9.0"
47 | }
48 | },
49 | "argparse": {
50 | "version": "1.0.10",
51 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
52 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
53 | "dev": true,
54 | "requires": {
55 | "sprintf-js": "~1.0.2"
56 | }
57 | },
58 | "arr-diff": {
59 | "version": "4.0.0",
60 | "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
61 | "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=",
62 | "dev": true
63 | },
64 | "arr-flatten": {
65 | "version": "1.1.0",
66 | "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
67 | "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==",
68 | "dev": true
69 | },
70 | "arr-union": {
71 | "version": "3.1.0",
72 | "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
73 | "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
74 | "dev": true
75 | },
76 | "array-unique": {
77 | "version": "0.3.2",
78 | "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
79 | "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
80 | "dev": true
81 | },
82 | "assign-symbols": {
83 | "version": "1.0.0",
84 | "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
85 | "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
86 | "dev": true
87 | },
88 | "atob": {
89 | "version": "2.1.2",
90 | "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
91 | "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
92 | "dev": true
93 | },
94 | "base": {
95 | "version": "0.11.2",
96 | "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
97 | "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
98 | "dev": true,
99 | "requires": {
100 | "cache-base": "^1.0.1",
101 | "class-utils": "^0.3.5",
102 | "component-emitter": "^1.2.1",
103 | "define-property": "^1.0.0",
104 | "isobject": "^3.0.1",
105 | "mixin-deep": "^1.2.0",
106 | "pascalcase": "^0.1.1"
107 | },
108 | "dependencies": {
109 | "define-property": {
110 | "version": "1.0.0",
111 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
112 | "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
113 | "dev": true,
114 | "requires": {
115 | "is-descriptor": "^1.0.0"
116 | }
117 | },
118 | "is-accessor-descriptor": {
119 | "version": "1.0.0",
120 | "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
121 | "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
122 | "dev": true,
123 | "requires": {
124 | "kind-of": "^6.0.0"
125 | }
126 | },
127 | "is-data-descriptor": {
128 | "version": "1.0.0",
129 | "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
130 | "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
131 | "dev": true,
132 | "requires": {
133 | "kind-of": "^6.0.0"
134 | }
135 | },
136 | "is-descriptor": {
137 | "version": "1.0.2",
138 | "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
139 | "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
140 | "dev": true,
141 | "requires": {
142 | "is-accessor-descriptor": "^1.0.0",
143 | "is-data-descriptor": "^1.0.0",
144 | "kind-of": "^6.0.2"
145 | }
146 | }
147 | }
148 | },
149 | "boolbase": {
150 | "version": "1.0.0",
151 | "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
152 | "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=",
153 | "dev": true
154 | },
155 | "braces": {
156 | "version": "2.3.2",
157 | "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
158 | "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
159 | "dev": true,
160 | "requires": {
161 | "arr-flatten": "^1.1.0",
162 | "array-unique": "^0.3.2",
163 | "extend-shallow": "^2.0.1",
164 | "fill-range": "^4.0.0",
165 | "isobject": "^3.0.1",
166 | "repeat-element": "^1.1.2",
167 | "snapdragon": "^0.8.1",
168 | "snapdragon-node": "^2.0.1",
169 | "split-string": "^3.0.2",
170 | "to-regex": "^3.0.1"
171 | },
172 | "dependencies": {
173 | "extend-shallow": {
174 | "version": "2.0.1",
175 | "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
176 | "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
177 | "dev": true,
178 | "requires": {
179 | "is-extendable": "^0.1.0"
180 | }
181 | }
182 | }
183 | },
184 | "builtin-modules": {
185 | "version": "3.1.0",
186 | "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz",
187 | "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==",
188 | "dev": true
189 | },
190 | "cache-base": {
191 | "version": "1.0.1",
192 | "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
193 | "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==",
194 | "dev": true,
195 | "requires": {
196 | "collection-visit": "^1.0.0",
197 | "component-emitter": "^1.2.1",
198 | "get-value": "^2.0.6",
199 | "has-value": "^1.0.0",
200 | "isobject": "^3.0.1",
201 | "set-value": "^2.0.0",
202 | "to-object-path": "^0.3.0",
203 | "union-value": "^1.0.0",
204 | "unset-value": "^1.0.0"
205 | }
206 | },
207 | "chalk": {
208 | "version": "2.4.2",
209 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
210 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
211 | "dev": true,
212 | "requires": {
213 | "ansi-styles": "^3.2.1",
214 | "escape-string-regexp": "^1.0.5",
215 | "supports-color": "^5.3.0"
216 | },
217 | "dependencies": {
218 | "supports-color": {
219 | "version": "5.5.0",
220 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
221 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
222 | "dev": true,
223 | "requires": {
224 | "has-flag": "^3.0.0"
225 | }
226 | }
227 | }
228 | },
229 | "class-utils": {
230 | "version": "0.3.6",
231 | "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
232 | "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==",
233 | "dev": true,
234 | "requires": {
235 | "arr-union": "^3.1.0",
236 | "define-property": "^0.2.5",
237 | "isobject": "^3.0.0",
238 | "static-extend": "^0.1.1"
239 | },
240 | "dependencies": {
241 | "define-property": {
242 | "version": "0.2.5",
243 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
244 | "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
245 | "dev": true,
246 | "requires": {
247 | "is-descriptor": "^0.1.0"
248 | }
249 | }
250 | }
251 | },
252 | "coa": {
253 | "version": "2.0.2",
254 | "resolved": "https://registry.npmjs.org/coa/-/coa-2.0.2.tgz",
255 | "integrity": "sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA==",
256 | "dev": true,
257 | "requires": {
258 | "@types/q": "^1.5.1",
259 | "chalk": "^2.4.1",
260 | "q": "^1.1.2"
261 | }
262 | },
263 | "collection-visit": {
264 | "version": "1.0.0",
265 | "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
266 | "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=",
267 | "dev": true,
268 | "requires": {
269 | "map-visit": "^1.0.0",
270 | "object-visit": "^1.0.0"
271 | }
272 | },
273 | "color-convert": {
274 | "version": "1.9.3",
275 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
276 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
277 | "dev": true,
278 | "requires": {
279 | "color-name": "1.1.3"
280 | }
281 | },
282 | "color-name": {
283 | "version": "1.1.3",
284 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
285 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
286 | "dev": true
287 | },
288 | "component-emitter": {
289 | "version": "1.3.0",
290 | "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
291 | "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==",
292 | "dev": true
293 | },
294 | "copy-descriptor": {
295 | "version": "0.1.1",
296 | "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
297 | "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=",
298 | "dev": true
299 | },
300 | "css-select": {
301 | "version": "2.0.2",
302 | "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.0.2.tgz",
303 | "integrity": "sha512-dSpYaDVoWaELjvZ3mS6IKZM/y2PMPa/XYoEfYNZePL4U/XgyxZNroHEHReDx/d+VgXh9VbCTtFqLkFbmeqeaRQ==",
304 | "dev": true,
305 | "requires": {
306 | "boolbase": "^1.0.0",
307 | "css-what": "^2.1.2",
308 | "domutils": "^1.7.0",
309 | "nth-check": "^1.0.2"
310 | }
311 | },
312 | "css-select-base-adapter": {
313 | "version": "0.1.1",
314 | "resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz",
315 | "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==",
316 | "dev": true
317 | },
318 | "css-tree": {
319 | "version": "1.0.0-alpha.37",
320 | "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz",
321 | "integrity": "sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg==",
322 | "dev": true,
323 | "requires": {
324 | "mdn-data": "2.0.4",
325 | "source-map": "^0.6.1"
326 | }
327 | },
328 | "css-what": {
329 | "version": "2.1.3",
330 | "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz",
331 | "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==",
332 | "dev": true
333 | },
334 | "csso": {
335 | "version": "4.0.2",
336 | "resolved": "https://registry.npmjs.org/csso/-/csso-4.0.2.tgz",
337 | "integrity": "sha512-kS7/oeNVXkHWxby5tHVxlhjizRCSv8QdU7hB2FpdAibDU8FjTAolhNjKNTiLzXtUrKT6HwClE81yXwEk1309wg==",
338 | "dev": true,
339 | "requires": {
340 | "css-tree": "1.0.0-alpha.37"
341 | }
342 | },
343 | "debug": {
344 | "version": "2.6.9",
345 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
346 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
347 | "dev": true,
348 | "requires": {
349 | "ms": "2.0.0"
350 | }
351 | },
352 | "decode-uri-component": {
353 | "version": "0.2.0",
354 | "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
355 | "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
356 | "dev": true
357 | },
358 | "define-properties": {
359 | "version": "1.1.3",
360 | "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
361 | "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
362 | "dev": true,
363 | "requires": {
364 | "object-keys": "^1.0.12"
365 | }
366 | },
367 | "define-property": {
368 | "version": "2.0.2",
369 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
370 | "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==",
371 | "dev": true,
372 | "requires": {
373 | "is-descriptor": "^1.0.2",
374 | "isobject": "^3.0.1"
375 | },
376 | "dependencies": {
377 | "is-accessor-descriptor": {
378 | "version": "1.0.0",
379 | "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
380 | "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
381 | "dev": true,
382 | "requires": {
383 | "kind-of": "^6.0.0"
384 | }
385 | },
386 | "is-data-descriptor": {
387 | "version": "1.0.0",
388 | "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
389 | "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
390 | "dev": true,
391 | "requires": {
392 | "kind-of": "^6.0.0"
393 | }
394 | },
395 | "is-descriptor": {
396 | "version": "1.0.2",
397 | "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
398 | "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
399 | "dev": true,
400 | "requires": {
401 | "is-accessor-descriptor": "^1.0.0",
402 | "is-data-descriptor": "^1.0.0",
403 | "kind-of": "^6.0.2"
404 | }
405 | }
406 | }
407 | },
408 | "dom-serializer": {
409 | "version": "0.2.1",
410 | "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.1.tgz",
411 | "integrity": "sha512-sK3ujri04WyjwQXVoK4PU3y8ula1stq10GJZpqHIUgoGZdsGzAGu65BnU3d08aTVSvO7mGPZUc0wTEDL+qGE0Q==",
412 | "dev": true,
413 | "requires": {
414 | "domelementtype": "^2.0.1",
415 | "entities": "^2.0.0"
416 | },
417 | "dependencies": {
418 | "domelementtype": {
419 | "version": "2.0.1",
420 | "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz",
421 | "integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==",
422 | "dev": true
423 | }
424 | }
425 | },
426 | "domelementtype": {
427 | "version": "1.3.1",
428 | "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz",
429 | "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==",
430 | "dev": true
431 | },
432 | "domutils": {
433 | "version": "1.7.0",
434 | "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz",
435 | "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==",
436 | "dev": true,
437 | "requires": {
438 | "dom-serializer": "0",
439 | "domelementtype": "1"
440 | }
441 | },
442 | "entities": {
443 | "version": "2.0.0",
444 | "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz",
445 | "integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==",
446 | "dev": true
447 | },
448 | "es-abstract": {
449 | "version": "1.16.0",
450 | "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.16.0.tgz",
451 | "integrity": "sha512-xdQnfykZ9JMEiasTAJZJdMWCQ1Vm00NBw79/AWi7ELfZuuPCSOMDZbT9mkOfSctVtfhb+sAAzrm+j//GjjLHLg==",
452 | "dev": true,
453 | "requires": {
454 | "es-to-primitive": "^1.2.0",
455 | "function-bind": "^1.1.1",
456 | "has": "^1.0.3",
457 | "has-symbols": "^1.0.0",
458 | "is-callable": "^1.1.4",
459 | "is-regex": "^1.0.4",
460 | "object-inspect": "^1.6.0",
461 | "object-keys": "^1.1.1",
462 | "string.prototype.trimleft": "^2.1.0",
463 | "string.prototype.trimright": "^2.1.0"
464 | }
465 | },
466 | "es-to-primitive": {
467 | "version": "1.2.0",
468 | "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz",
469 | "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==",
470 | "dev": true,
471 | "requires": {
472 | "is-callable": "^1.1.4",
473 | "is-date-object": "^1.0.1",
474 | "is-symbol": "^1.0.2"
475 | }
476 | },
477 | "escape-string-regexp": {
478 | "version": "1.0.5",
479 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
480 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
481 | "dev": true
482 | },
483 | "esprima": {
484 | "version": "4.0.1",
485 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
486 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
487 | "dev": true
488 | },
489 | "estree-walker": {
490 | "version": "0.6.1",
491 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz",
492 | "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==",
493 | "dev": true
494 | },
495 | "expand-brackets": {
496 | "version": "2.1.4",
497 | "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
498 | "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
499 | "dev": true,
500 | "requires": {
501 | "debug": "^2.3.3",
502 | "define-property": "^0.2.5",
503 | "extend-shallow": "^2.0.1",
504 | "posix-character-classes": "^0.1.0",
505 | "regex-not": "^1.0.0",
506 | "snapdragon": "^0.8.1",
507 | "to-regex": "^3.0.1"
508 | },
509 | "dependencies": {
510 | "define-property": {
511 | "version": "0.2.5",
512 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
513 | "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
514 | "dev": true,
515 | "requires": {
516 | "is-descriptor": "^0.1.0"
517 | }
518 | },
519 | "extend-shallow": {
520 | "version": "2.0.1",
521 | "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
522 | "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
523 | "dev": true,
524 | "requires": {
525 | "is-extendable": "^0.1.0"
526 | }
527 | }
528 | }
529 | },
530 | "extend-shallow": {
531 | "version": "3.0.2",
532 | "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
533 | "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
534 | "dev": true,
535 | "requires": {
536 | "assign-symbols": "^1.0.0",
537 | "is-extendable": "^1.0.1"
538 | },
539 | "dependencies": {
540 | "is-extendable": {
541 | "version": "1.0.1",
542 | "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
543 | "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
544 | "dev": true,
545 | "requires": {
546 | "is-plain-object": "^2.0.4"
547 | }
548 | }
549 | }
550 | },
551 | "extglob": {
552 | "version": "2.0.4",
553 | "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
554 | "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
555 | "dev": true,
556 | "requires": {
557 | "array-unique": "^0.3.2",
558 | "define-property": "^1.0.0",
559 | "expand-brackets": "^2.1.4",
560 | "extend-shallow": "^2.0.1",
561 | "fragment-cache": "^0.2.1",
562 | "regex-not": "^1.0.0",
563 | "snapdragon": "^0.8.1",
564 | "to-regex": "^3.0.1"
565 | },
566 | "dependencies": {
567 | "define-property": {
568 | "version": "1.0.0",
569 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
570 | "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
571 | "dev": true,
572 | "requires": {
573 | "is-descriptor": "^1.0.0"
574 | }
575 | },
576 | "extend-shallow": {
577 | "version": "2.0.1",
578 | "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
579 | "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
580 | "dev": true,
581 | "requires": {
582 | "is-extendable": "^0.1.0"
583 | }
584 | },
585 | "is-accessor-descriptor": {
586 | "version": "1.0.0",
587 | "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
588 | "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
589 | "dev": true,
590 | "requires": {
591 | "kind-of": "^6.0.0"
592 | }
593 | },
594 | "is-data-descriptor": {
595 | "version": "1.0.0",
596 | "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
597 | "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
598 | "dev": true,
599 | "requires": {
600 | "kind-of": "^6.0.0"
601 | }
602 | },
603 | "is-descriptor": {
604 | "version": "1.0.2",
605 | "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
606 | "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
607 | "dev": true,
608 | "requires": {
609 | "is-accessor-descriptor": "^1.0.0",
610 | "is-data-descriptor": "^1.0.0",
611 | "kind-of": "^6.0.2"
612 | }
613 | }
614 | }
615 | },
616 | "figplug": {
617 | "version": "0.1.12",
618 | "resolved": "https://registry.npmjs.org/figplug/-/figplug-0.1.12.tgz",
619 | "integrity": "sha512-Bic91eropAVKN/YuC1Vp7JQSvBdF7kX+o7heTCHtM9HrKRDWZ5ZunetSbndPidGHXoxPIpPj1xPwYfjSN8w0Pw==",
620 | "dev": true,
621 | "requires": {
622 | "postcss-nesting": "^7.0.0",
623 | "rollup": "^1.14.4",
624 | "rollup-plugin-commonjs": "^10.0.0",
625 | "rollup-plugin-node-resolve": "^5.0.1",
626 | "rollup-plugin-typescript2": "^0.21.1",
627 | "svgo": "^1.2.2",
628 | "typescript": "^3.5.1"
629 | }
630 | },
631 | "fill-range": {
632 | "version": "4.0.0",
633 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
634 | "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
635 | "dev": true,
636 | "requires": {
637 | "extend-shallow": "^2.0.1",
638 | "is-number": "^3.0.0",
639 | "repeat-string": "^1.6.1",
640 | "to-regex-range": "^2.1.0"
641 | },
642 | "dependencies": {
643 | "extend-shallow": {
644 | "version": "2.0.1",
645 | "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
646 | "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
647 | "dev": true,
648 | "requires": {
649 | "is-extendable": "^0.1.0"
650 | }
651 | }
652 | }
653 | },
654 | "for-in": {
655 | "version": "1.0.2",
656 | "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
657 | "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=",
658 | "dev": true
659 | },
660 | "fragment-cache": {
661 | "version": "0.2.1",
662 | "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
663 | "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=",
664 | "dev": true,
665 | "requires": {
666 | "map-cache": "^0.2.2"
667 | }
668 | },
669 | "fs-extra": {
670 | "version": "7.0.1",
671 | "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz",
672 | "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==",
673 | "dev": true,
674 | "requires": {
675 | "graceful-fs": "^4.1.2",
676 | "jsonfile": "^4.0.0",
677 | "universalify": "^0.1.0"
678 | }
679 | },
680 | "function-bind": {
681 | "version": "1.1.1",
682 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
683 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
684 | "dev": true
685 | },
686 | "get-value": {
687 | "version": "2.0.6",
688 | "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
689 | "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=",
690 | "dev": true
691 | },
692 | "graceful-fs": {
693 | "version": "4.2.3",
694 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
695 | "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==",
696 | "dev": true
697 | },
698 | "has": {
699 | "version": "1.0.3",
700 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
701 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
702 | "dev": true,
703 | "requires": {
704 | "function-bind": "^1.1.1"
705 | }
706 | },
707 | "has-flag": {
708 | "version": "3.0.0",
709 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
710 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
711 | "dev": true
712 | },
713 | "has-symbols": {
714 | "version": "1.0.0",
715 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz",
716 | "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=",
717 | "dev": true
718 | },
719 | "has-value": {
720 | "version": "1.0.0",
721 | "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
722 | "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=",
723 | "dev": true,
724 | "requires": {
725 | "get-value": "^2.0.6",
726 | "has-values": "^1.0.0",
727 | "isobject": "^3.0.0"
728 | }
729 | },
730 | "has-values": {
731 | "version": "1.0.0",
732 | "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz",
733 | "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=",
734 | "dev": true,
735 | "requires": {
736 | "is-number": "^3.0.0",
737 | "kind-of": "^4.0.0"
738 | },
739 | "dependencies": {
740 | "kind-of": {
741 | "version": "4.0.0",
742 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
743 | "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
744 | "dev": true,
745 | "requires": {
746 | "is-buffer": "^1.1.5"
747 | }
748 | }
749 | }
750 | },
751 | "is-accessor-descriptor": {
752 | "version": "0.1.6",
753 | "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
754 | "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
755 | "dev": true,
756 | "requires": {
757 | "kind-of": "^3.0.2"
758 | },
759 | "dependencies": {
760 | "kind-of": {
761 | "version": "3.2.2",
762 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
763 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
764 | "dev": true,
765 | "requires": {
766 | "is-buffer": "^1.1.5"
767 | }
768 | }
769 | }
770 | },
771 | "is-buffer": {
772 | "version": "1.1.6",
773 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
774 | "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
775 | "dev": true
776 | },
777 | "is-callable": {
778 | "version": "1.1.4",
779 | "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz",
780 | "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==",
781 | "dev": true
782 | },
783 | "is-data-descriptor": {
784 | "version": "0.1.4",
785 | "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
786 | "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
787 | "dev": true,
788 | "requires": {
789 | "kind-of": "^3.0.2"
790 | },
791 | "dependencies": {
792 | "kind-of": {
793 | "version": "3.2.2",
794 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
795 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
796 | "dev": true,
797 | "requires": {
798 | "is-buffer": "^1.1.5"
799 | }
800 | }
801 | }
802 | },
803 | "is-date-object": {
804 | "version": "1.0.1",
805 | "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
806 | "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=",
807 | "dev": true
808 | },
809 | "is-descriptor": {
810 | "version": "0.1.6",
811 | "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
812 | "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
813 | "dev": true,
814 | "requires": {
815 | "is-accessor-descriptor": "^0.1.6",
816 | "is-data-descriptor": "^0.1.4",
817 | "kind-of": "^5.0.0"
818 | },
819 | "dependencies": {
820 | "kind-of": {
821 | "version": "5.1.0",
822 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
823 | "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
824 | "dev": true
825 | }
826 | }
827 | },
828 | "is-extendable": {
829 | "version": "0.1.1",
830 | "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
831 | "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
832 | "dev": true
833 | },
834 | "is-module": {
835 | "version": "1.0.0",
836 | "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz",
837 | "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=",
838 | "dev": true
839 | },
840 | "is-number": {
841 | "version": "3.0.0",
842 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
843 | "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
844 | "dev": true,
845 | "requires": {
846 | "kind-of": "^3.0.2"
847 | },
848 | "dependencies": {
849 | "kind-of": {
850 | "version": "3.2.2",
851 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
852 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
853 | "dev": true,
854 | "requires": {
855 | "is-buffer": "^1.1.5"
856 | }
857 | }
858 | }
859 | },
860 | "is-plain-object": {
861 | "version": "2.0.4",
862 | "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
863 | "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
864 | "dev": true,
865 | "requires": {
866 | "isobject": "^3.0.1"
867 | }
868 | },
869 | "is-reference": {
870 | "version": "1.1.4",
871 | "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.4.tgz",
872 | "integrity": "sha512-uJA/CDPO3Tao3GTrxYn6AwkM4nUPJiGGYu5+cB8qbC7WGFlrKZbiRo7SFKxUAEpFUfiHofWCXBUNhvYJMh+6zw==",
873 | "dev": true,
874 | "requires": {
875 | "@types/estree": "0.0.39"
876 | }
877 | },
878 | "is-regex": {
879 | "version": "1.0.4",
880 | "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
881 | "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
882 | "dev": true,
883 | "requires": {
884 | "has": "^1.0.1"
885 | }
886 | },
887 | "is-symbol": {
888 | "version": "1.0.2",
889 | "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz",
890 | "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==",
891 | "dev": true,
892 | "requires": {
893 | "has-symbols": "^1.0.0"
894 | }
895 | },
896 | "is-windows": {
897 | "version": "1.0.2",
898 | "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
899 | "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
900 | "dev": true
901 | },
902 | "isarray": {
903 | "version": "1.0.0",
904 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
905 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
906 | "dev": true
907 | },
908 | "isobject": {
909 | "version": "3.0.1",
910 | "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
911 | "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
912 | "dev": true
913 | },
914 | "js-yaml": {
915 | "version": "3.13.1",
916 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
917 | "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
918 | "dev": true,
919 | "requires": {
920 | "argparse": "^1.0.7",
921 | "esprima": "^4.0.0"
922 | }
923 | },
924 | "jsonfile": {
925 | "version": "4.0.0",
926 | "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
927 | "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
928 | "dev": true,
929 | "requires": {
930 | "graceful-fs": "^4.1.6"
931 | }
932 | },
933 | "kind-of": {
934 | "version": "6.0.2",
935 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
936 | "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
937 | "dev": true
938 | },
939 | "magic-string": {
940 | "version": "0.25.4",
941 | "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.4.tgz",
942 | "integrity": "sha512-oycWO9nEVAP2RVPbIoDoA4Y7LFIJ3xRYov93gAyJhZkET1tNuB0u7uWkZS2LpBWTJUWnmau/To8ECWRC+jKNfw==",
943 | "dev": true,
944 | "requires": {
945 | "sourcemap-codec": "^1.4.4"
946 | }
947 | },
948 | "map-cache": {
949 | "version": "0.2.2",
950 | "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
951 | "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=",
952 | "dev": true
953 | },
954 | "map-visit": {
955 | "version": "1.0.0",
956 | "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz",
957 | "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=",
958 | "dev": true,
959 | "requires": {
960 | "object-visit": "^1.0.0"
961 | }
962 | },
963 | "mdn-data": {
964 | "version": "2.0.4",
965 | "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz",
966 | "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==",
967 | "dev": true
968 | },
969 | "micromatch": {
970 | "version": "3.1.10",
971 | "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
972 | "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
973 | "dev": true,
974 | "requires": {
975 | "arr-diff": "^4.0.0",
976 | "array-unique": "^0.3.2",
977 | "braces": "^2.3.1",
978 | "define-property": "^2.0.2",
979 | "extend-shallow": "^3.0.2",
980 | "extglob": "^2.0.4",
981 | "fragment-cache": "^0.2.1",
982 | "kind-of": "^6.0.2",
983 | "nanomatch": "^1.2.9",
984 | "object.pick": "^1.3.0",
985 | "regex-not": "^1.0.0",
986 | "snapdragon": "^0.8.1",
987 | "to-regex": "^3.0.2"
988 | }
989 | },
990 | "minimist": {
991 | "version": "0.0.8",
992 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
993 | "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
994 | "dev": true
995 | },
996 | "mixin-deep": {
997 | "version": "1.3.2",
998 | "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
999 | "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==",
1000 | "dev": true,
1001 | "requires": {
1002 | "for-in": "^1.0.2",
1003 | "is-extendable": "^1.0.1"
1004 | },
1005 | "dependencies": {
1006 | "is-extendable": {
1007 | "version": "1.0.1",
1008 | "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
1009 | "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
1010 | "dev": true,
1011 | "requires": {
1012 | "is-plain-object": "^2.0.4"
1013 | }
1014 | }
1015 | }
1016 | },
1017 | "mkdirp": {
1018 | "version": "0.5.1",
1019 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
1020 | "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
1021 | "dev": true,
1022 | "requires": {
1023 | "minimist": "0.0.8"
1024 | }
1025 | },
1026 | "ms": {
1027 | "version": "2.0.0",
1028 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
1029 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
1030 | "dev": true
1031 | },
1032 | "nanomatch": {
1033 | "version": "1.2.13",
1034 | "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
1035 | "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==",
1036 | "dev": true,
1037 | "requires": {
1038 | "arr-diff": "^4.0.0",
1039 | "array-unique": "^0.3.2",
1040 | "define-property": "^2.0.2",
1041 | "extend-shallow": "^3.0.2",
1042 | "fragment-cache": "^0.2.1",
1043 | "is-windows": "^1.0.2",
1044 | "kind-of": "^6.0.2",
1045 | "object.pick": "^1.3.0",
1046 | "regex-not": "^1.0.0",
1047 | "snapdragon": "^0.8.1",
1048 | "to-regex": "^3.0.1"
1049 | }
1050 | },
1051 | "nth-check": {
1052 | "version": "1.0.2",
1053 | "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz",
1054 | "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==",
1055 | "dev": true,
1056 | "requires": {
1057 | "boolbase": "~1.0.0"
1058 | }
1059 | },
1060 | "object-copy": {
1061 | "version": "0.1.0",
1062 | "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
1063 | "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=",
1064 | "dev": true,
1065 | "requires": {
1066 | "copy-descriptor": "^0.1.0",
1067 | "define-property": "^0.2.5",
1068 | "kind-of": "^3.0.3"
1069 | },
1070 | "dependencies": {
1071 | "define-property": {
1072 | "version": "0.2.5",
1073 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
1074 | "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
1075 | "dev": true,
1076 | "requires": {
1077 | "is-descriptor": "^0.1.0"
1078 | }
1079 | },
1080 | "kind-of": {
1081 | "version": "3.2.2",
1082 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
1083 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
1084 | "dev": true,
1085 | "requires": {
1086 | "is-buffer": "^1.1.5"
1087 | }
1088 | }
1089 | }
1090 | },
1091 | "object-inspect": {
1092 | "version": "1.6.0",
1093 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz",
1094 | "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==",
1095 | "dev": true
1096 | },
1097 | "object-keys": {
1098 | "version": "1.1.1",
1099 | "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
1100 | "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
1101 | "dev": true
1102 | },
1103 | "object-visit": {
1104 | "version": "1.0.1",
1105 | "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
1106 | "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=",
1107 | "dev": true,
1108 | "requires": {
1109 | "isobject": "^3.0.0"
1110 | }
1111 | },
1112 | "object.getownpropertydescriptors": {
1113 | "version": "2.0.3",
1114 | "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz",
1115 | "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=",
1116 | "dev": true,
1117 | "requires": {
1118 | "define-properties": "^1.1.2",
1119 | "es-abstract": "^1.5.1"
1120 | }
1121 | },
1122 | "object.pick": {
1123 | "version": "1.3.0",
1124 | "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz",
1125 | "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=",
1126 | "dev": true,
1127 | "requires": {
1128 | "isobject": "^3.0.1"
1129 | }
1130 | },
1131 | "object.values": {
1132 | "version": "1.1.0",
1133 | "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.0.tgz",
1134 | "integrity": "sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg==",
1135 | "dev": true,
1136 | "requires": {
1137 | "define-properties": "^1.1.3",
1138 | "es-abstract": "^1.12.0",
1139 | "function-bind": "^1.1.1",
1140 | "has": "^1.0.3"
1141 | }
1142 | },
1143 | "pascalcase": {
1144 | "version": "0.1.1",
1145 | "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
1146 | "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=",
1147 | "dev": true
1148 | },
1149 | "path-parse": {
1150 | "version": "1.0.6",
1151 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
1152 | "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
1153 | "dev": true
1154 | },
1155 | "posix-character-classes": {
1156 | "version": "0.1.1",
1157 | "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
1158 | "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=",
1159 | "dev": true
1160 | },
1161 | "postcss": {
1162 | "version": "7.0.21",
1163 | "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.21.tgz",
1164 | "integrity": "sha512-uIFtJElxJo29QC753JzhidoAhvp/e/Exezkdhfmt8AymWT6/5B7W1WmponYWkHk2eg6sONyTch0A3nkMPun3SQ==",
1165 | "dev": true,
1166 | "requires": {
1167 | "chalk": "^2.4.2",
1168 | "source-map": "^0.6.1",
1169 | "supports-color": "^6.1.0"
1170 | }
1171 | },
1172 | "postcss-nesting": {
1173 | "version": "7.0.1",
1174 | "resolved": "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-7.0.1.tgz",
1175 | "integrity": "sha512-FrorPb0H3nuVq0Sff7W2rnc3SmIcruVC6YwpcS+k687VxyxO33iE1amna7wHuRVzM8vfiYofXSBHNAZ3QhLvYg==",
1176 | "dev": true,
1177 | "requires": {
1178 | "postcss": "^7.0.2"
1179 | }
1180 | },
1181 | "q": {
1182 | "version": "1.5.1",
1183 | "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
1184 | "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
1185 | "dev": true
1186 | },
1187 | "regex-not": {
1188 | "version": "1.0.2",
1189 | "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
1190 | "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==",
1191 | "dev": true,
1192 | "requires": {
1193 | "extend-shallow": "^3.0.2",
1194 | "safe-regex": "^1.1.0"
1195 | }
1196 | },
1197 | "repeat-element": {
1198 | "version": "1.1.3",
1199 | "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz",
1200 | "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==",
1201 | "dev": true
1202 | },
1203 | "repeat-string": {
1204 | "version": "1.6.1",
1205 | "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
1206 | "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
1207 | "dev": true
1208 | },
1209 | "resolve": {
1210 | "version": "1.12.0",
1211 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz",
1212 | "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==",
1213 | "dev": true,
1214 | "requires": {
1215 | "path-parse": "^1.0.6"
1216 | }
1217 | },
1218 | "resolve-url": {
1219 | "version": "0.2.1",
1220 | "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
1221 | "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=",
1222 | "dev": true
1223 | },
1224 | "ret": {
1225 | "version": "0.1.15",
1226 | "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
1227 | "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==",
1228 | "dev": true
1229 | },
1230 | "rollup": {
1231 | "version": "1.26.0",
1232 | "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.26.0.tgz",
1233 | "integrity": "sha512-5HljNYn9icFvXX+Oe97qY5TWvnWhKqgGT0HGeWWqFPx7w7+Anzg7dfHMtUif7YYy6QxAgynDSwK6uxbgcrVUxw==",
1234 | "dev": true,
1235 | "requires": {
1236 | "@types/estree": "*",
1237 | "@types/node": "*",
1238 | "acorn": "^7.1.0"
1239 | }
1240 | },
1241 | "rollup-plugin-commonjs": {
1242 | "version": "10.1.0",
1243 | "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-10.1.0.tgz",
1244 | "integrity": "sha512-jlXbjZSQg8EIeAAvepNwhJj++qJWNJw1Cl0YnOqKtP5Djx+fFGkp3WRh+W0ASCaFG5w1jhmzDxgu3SJuVxPF4Q==",
1245 | "dev": true,
1246 | "requires": {
1247 | "estree-walker": "^0.6.1",
1248 | "is-reference": "^1.1.2",
1249 | "magic-string": "^0.25.2",
1250 | "resolve": "^1.11.0",
1251 | "rollup-pluginutils": "^2.8.1"
1252 | }
1253 | },
1254 | "rollup-plugin-node-resolve": {
1255 | "version": "5.2.0",
1256 | "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz",
1257 | "integrity": "sha512-jUlyaDXts7TW2CqQ4GaO5VJ4PwwaV8VUGA7+km3n6k6xtOEacf61u0VXwN80phY/evMcaS+9eIeJ9MOyDxt5Zw==",
1258 | "dev": true,
1259 | "requires": {
1260 | "@types/resolve": "0.0.8",
1261 | "builtin-modules": "^3.1.0",
1262 | "is-module": "^1.0.0",
1263 | "resolve": "^1.11.1",
1264 | "rollup-pluginutils": "^2.8.1"
1265 | }
1266 | },
1267 | "rollup-plugin-typescript2": {
1268 | "version": "0.21.2",
1269 | "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.21.2.tgz",
1270 | "integrity": "sha512-TfX+HLJ99p/P8kYZJdNYp9iGVWFCrj+G/V56LbEYtBqVMVHbGkrSoDH8AJjDtyRp6J9VosaKKmnBDBxhDo7TZw==",
1271 | "dev": true,
1272 | "requires": {
1273 | "fs-extra": "7.0.1",
1274 | "resolve": "1.10.1",
1275 | "rollup-pluginutils": "2.6.0",
1276 | "tslib": "1.9.3"
1277 | },
1278 | "dependencies": {
1279 | "resolve": {
1280 | "version": "1.10.1",
1281 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.1.tgz",
1282 | "integrity": "sha512-KuIe4mf++td/eFb6wkaPbMDnP6kObCaEtIDuHOUED6MNUo4K670KZUHuuvYPZDxNF0WVLw49n06M2m2dXphEzA==",
1283 | "dev": true,
1284 | "requires": {
1285 | "path-parse": "^1.0.6"
1286 | }
1287 | },
1288 | "rollup-pluginutils": {
1289 | "version": "2.6.0",
1290 | "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.6.0.tgz",
1291 | "integrity": "sha512-aGQwspEF8oPKvg37u3p7h0cYNwmJR1sCBMZGZ5b9qy8HGtETknqjzcxrDRrcAnJNXN18lBH4Q9vZYth/p4n8jQ==",
1292 | "dev": true,
1293 | "requires": {
1294 | "estree-walker": "^0.6.0",
1295 | "micromatch": "^3.1.10"
1296 | }
1297 | }
1298 | }
1299 | },
1300 | "rollup-pluginutils": {
1301 | "version": "2.8.2",
1302 | "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz",
1303 | "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==",
1304 | "dev": true,
1305 | "requires": {
1306 | "estree-walker": "^0.6.1"
1307 | }
1308 | },
1309 | "safe-regex": {
1310 | "version": "1.1.0",
1311 | "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
1312 | "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
1313 | "dev": true,
1314 | "requires": {
1315 | "ret": "~0.1.10"
1316 | }
1317 | },
1318 | "sax": {
1319 | "version": "1.2.4",
1320 | "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
1321 | "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
1322 | "dev": true
1323 | },
1324 | "set-value": {
1325 | "version": "2.0.1",
1326 | "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
1327 | "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==",
1328 | "dev": true,
1329 | "requires": {
1330 | "extend-shallow": "^2.0.1",
1331 | "is-extendable": "^0.1.1",
1332 | "is-plain-object": "^2.0.3",
1333 | "split-string": "^3.0.1"
1334 | },
1335 | "dependencies": {
1336 | "extend-shallow": {
1337 | "version": "2.0.1",
1338 | "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
1339 | "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
1340 | "dev": true,
1341 | "requires": {
1342 | "is-extendable": "^0.1.0"
1343 | }
1344 | }
1345 | }
1346 | },
1347 | "snapdragon": {
1348 | "version": "0.8.2",
1349 | "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
1350 | "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==",
1351 | "dev": true,
1352 | "requires": {
1353 | "base": "^0.11.1",
1354 | "debug": "^2.2.0",
1355 | "define-property": "^0.2.5",
1356 | "extend-shallow": "^2.0.1",
1357 | "map-cache": "^0.2.2",
1358 | "source-map": "^0.5.6",
1359 | "source-map-resolve": "^0.5.0",
1360 | "use": "^3.1.0"
1361 | },
1362 | "dependencies": {
1363 | "define-property": {
1364 | "version": "0.2.5",
1365 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
1366 | "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
1367 | "dev": true,
1368 | "requires": {
1369 | "is-descriptor": "^0.1.0"
1370 | }
1371 | },
1372 | "extend-shallow": {
1373 | "version": "2.0.1",
1374 | "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
1375 | "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
1376 | "dev": true,
1377 | "requires": {
1378 | "is-extendable": "^0.1.0"
1379 | }
1380 | },
1381 | "source-map": {
1382 | "version": "0.5.7",
1383 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
1384 | "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
1385 | "dev": true
1386 | }
1387 | }
1388 | },
1389 | "snapdragon-node": {
1390 | "version": "2.1.1",
1391 | "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
1392 | "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==",
1393 | "dev": true,
1394 | "requires": {
1395 | "define-property": "^1.0.0",
1396 | "isobject": "^3.0.0",
1397 | "snapdragon-util": "^3.0.1"
1398 | },
1399 | "dependencies": {
1400 | "define-property": {
1401 | "version": "1.0.0",
1402 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
1403 | "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
1404 | "dev": true,
1405 | "requires": {
1406 | "is-descriptor": "^1.0.0"
1407 | }
1408 | },
1409 | "is-accessor-descriptor": {
1410 | "version": "1.0.0",
1411 | "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
1412 | "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
1413 | "dev": true,
1414 | "requires": {
1415 | "kind-of": "^6.0.0"
1416 | }
1417 | },
1418 | "is-data-descriptor": {
1419 | "version": "1.0.0",
1420 | "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
1421 | "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
1422 | "dev": true,
1423 | "requires": {
1424 | "kind-of": "^6.0.0"
1425 | }
1426 | },
1427 | "is-descriptor": {
1428 | "version": "1.0.2",
1429 | "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
1430 | "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
1431 | "dev": true,
1432 | "requires": {
1433 | "is-accessor-descriptor": "^1.0.0",
1434 | "is-data-descriptor": "^1.0.0",
1435 | "kind-of": "^6.0.2"
1436 | }
1437 | }
1438 | }
1439 | },
1440 | "snapdragon-util": {
1441 | "version": "3.0.1",
1442 | "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
1443 | "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==",
1444 | "dev": true,
1445 | "requires": {
1446 | "kind-of": "^3.2.0"
1447 | },
1448 | "dependencies": {
1449 | "kind-of": {
1450 | "version": "3.2.2",
1451 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
1452 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
1453 | "dev": true,
1454 | "requires": {
1455 | "is-buffer": "^1.1.5"
1456 | }
1457 | }
1458 | }
1459 | },
1460 | "source-map": {
1461 | "version": "0.6.1",
1462 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
1463 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
1464 | "dev": true
1465 | },
1466 | "source-map-resolve": {
1467 | "version": "0.5.2",
1468 | "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz",
1469 | "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==",
1470 | "dev": true,
1471 | "requires": {
1472 | "atob": "^2.1.1",
1473 | "decode-uri-component": "^0.2.0",
1474 | "resolve-url": "^0.2.1",
1475 | "source-map-url": "^0.4.0",
1476 | "urix": "^0.1.0"
1477 | }
1478 | },
1479 | "source-map-url": {
1480 | "version": "0.4.0",
1481 | "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz",
1482 | "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=",
1483 | "dev": true
1484 | },
1485 | "sourcemap-codec": {
1486 | "version": "1.4.6",
1487 | "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.6.tgz",
1488 | "integrity": "sha512-1ZooVLYFxC448piVLBbtOxFcXwnymH9oUF8nRd3CuYDVvkRBxRl6pB4Mtas5a4drtL+E8LDgFkQNcgIw6tc8Hg==",
1489 | "dev": true
1490 | },
1491 | "split-string": {
1492 | "version": "3.1.0",
1493 | "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
1494 | "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==",
1495 | "dev": true,
1496 | "requires": {
1497 | "extend-shallow": "^3.0.0"
1498 | }
1499 | },
1500 | "sprintf-js": {
1501 | "version": "1.0.3",
1502 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
1503 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
1504 | "dev": true
1505 | },
1506 | "stable": {
1507 | "version": "0.1.8",
1508 | "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz",
1509 | "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==",
1510 | "dev": true
1511 | },
1512 | "static-extend": {
1513 | "version": "0.1.2",
1514 | "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
1515 | "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=",
1516 | "dev": true,
1517 | "requires": {
1518 | "define-property": "^0.2.5",
1519 | "object-copy": "^0.1.0"
1520 | },
1521 | "dependencies": {
1522 | "define-property": {
1523 | "version": "0.2.5",
1524 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
1525 | "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
1526 | "dev": true,
1527 | "requires": {
1528 | "is-descriptor": "^0.1.0"
1529 | }
1530 | }
1531 | }
1532 | },
1533 | "string.prototype.trimleft": {
1534 | "version": "2.1.0",
1535 | "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz",
1536 | "integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==",
1537 | "dev": true,
1538 | "requires": {
1539 | "define-properties": "^1.1.3",
1540 | "function-bind": "^1.1.1"
1541 | }
1542 | },
1543 | "string.prototype.trimright": {
1544 | "version": "2.1.0",
1545 | "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz",
1546 | "integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==",
1547 | "dev": true,
1548 | "requires": {
1549 | "define-properties": "^1.1.3",
1550 | "function-bind": "^1.1.1"
1551 | }
1552 | },
1553 | "supports-color": {
1554 | "version": "6.1.0",
1555 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
1556 | "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
1557 | "dev": true,
1558 | "requires": {
1559 | "has-flag": "^3.0.0"
1560 | }
1561 | },
1562 | "svgo": {
1563 | "version": "1.3.2",
1564 | "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz",
1565 | "integrity": "sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw==",
1566 | "dev": true,
1567 | "requires": {
1568 | "chalk": "^2.4.1",
1569 | "coa": "^2.0.2",
1570 | "css-select": "^2.0.0",
1571 | "css-select-base-adapter": "^0.1.1",
1572 | "css-tree": "1.0.0-alpha.37",
1573 | "csso": "^4.0.2",
1574 | "js-yaml": "^3.13.1",
1575 | "mkdirp": "~0.5.1",
1576 | "object.values": "^1.1.0",
1577 | "sax": "~1.2.4",
1578 | "stable": "^0.1.8",
1579 | "unquote": "~1.1.1",
1580 | "util.promisify": "~1.0.0"
1581 | }
1582 | },
1583 | "to-object-path": {
1584 | "version": "0.3.0",
1585 | "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
1586 | "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=",
1587 | "dev": true,
1588 | "requires": {
1589 | "kind-of": "^3.0.2"
1590 | },
1591 | "dependencies": {
1592 | "kind-of": {
1593 | "version": "3.2.2",
1594 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
1595 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
1596 | "dev": true,
1597 | "requires": {
1598 | "is-buffer": "^1.1.5"
1599 | }
1600 | }
1601 | }
1602 | },
1603 | "to-regex": {
1604 | "version": "3.0.2",
1605 | "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz",
1606 | "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==",
1607 | "dev": true,
1608 | "requires": {
1609 | "define-property": "^2.0.2",
1610 | "extend-shallow": "^3.0.2",
1611 | "regex-not": "^1.0.2",
1612 | "safe-regex": "^1.1.0"
1613 | }
1614 | },
1615 | "to-regex-range": {
1616 | "version": "2.1.1",
1617 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
1618 | "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
1619 | "dev": true,
1620 | "requires": {
1621 | "is-number": "^3.0.0",
1622 | "repeat-string": "^1.6.1"
1623 | }
1624 | },
1625 | "tslib": {
1626 | "version": "1.9.3",
1627 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
1628 | "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==",
1629 | "dev": true
1630 | },
1631 | "typescript": {
1632 | "version": "3.6.4",
1633 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.4.tgz",
1634 | "integrity": "sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg==",
1635 | "dev": true
1636 | },
1637 | "union-value": {
1638 | "version": "1.0.1",
1639 | "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
1640 | "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==",
1641 | "dev": true,
1642 | "requires": {
1643 | "arr-union": "^3.1.0",
1644 | "get-value": "^2.0.6",
1645 | "is-extendable": "^0.1.1",
1646 | "set-value": "^2.0.1"
1647 | }
1648 | },
1649 | "universalify": {
1650 | "version": "0.1.2",
1651 | "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
1652 | "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
1653 | "dev": true
1654 | },
1655 | "unquote": {
1656 | "version": "1.1.1",
1657 | "resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz",
1658 | "integrity": "sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=",
1659 | "dev": true
1660 | },
1661 | "unset-value": {
1662 | "version": "1.0.0",
1663 | "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
1664 | "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=",
1665 | "dev": true,
1666 | "requires": {
1667 | "has-value": "^0.3.1",
1668 | "isobject": "^3.0.0"
1669 | },
1670 | "dependencies": {
1671 | "has-value": {
1672 | "version": "0.3.1",
1673 | "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz",
1674 | "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=",
1675 | "dev": true,
1676 | "requires": {
1677 | "get-value": "^2.0.3",
1678 | "has-values": "^0.1.4",
1679 | "isobject": "^2.0.0"
1680 | },
1681 | "dependencies": {
1682 | "isobject": {
1683 | "version": "2.1.0",
1684 | "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
1685 | "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
1686 | "dev": true,
1687 | "requires": {
1688 | "isarray": "1.0.0"
1689 | }
1690 | }
1691 | }
1692 | },
1693 | "has-values": {
1694 | "version": "0.1.4",
1695 | "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz",
1696 | "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=",
1697 | "dev": true
1698 | }
1699 | }
1700 | },
1701 | "urix": {
1702 | "version": "0.1.0",
1703 | "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
1704 | "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=",
1705 | "dev": true
1706 | },
1707 | "use": {
1708 | "version": "3.1.1",
1709 | "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
1710 | "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==",
1711 | "dev": true
1712 | },
1713 | "util.promisify": {
1714 | "version": "1.0.0",
1715 | "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz",
1716 | "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==",
1717 | "dev": true,
1718 | "requires": {
1719 | "define-properties": "^1.1.2",
1720 | "object.getownpropertydescriptors": "^2.0.3"
1721 | }
1722 | }
1723 | }
1724 | }
1725 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@rsms/graphviz",
3 | "version": "1.0.7",
4 | "description": "Graphviz web app",
5 | "main": "docs/graphviz.js",
6 | "scripts": {
7 | "build": "./build.sh -O",
8 | "build-g": "./build.sh",
9 | "dev": "./dev.sh"
10 | },
11 | "author": "rsms",
12 | "license": "MIT",
13 | "devDependencies": {
14 | "figplug": "0.1.12"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/figplug.d.ts:
--------------------------------------------------------------------------------
1 | // Helpers provided automatically, as needed, by figplug.
2 |
3 | // symbolic type aliases
4 | type int = number
5 | type float = number
6 | type byte = number
7 | type bool = boolean
8 |
9 | // compile-time constants
10 | declare const DEBUG :boolean
11 | declare const VERSION :string
12 |
13 | // global namespace. Same as `window` in a regular web context.
14 | declare const global :{[k:string]:any}
15 |
16 | // panic prints a message, stack trace and exits the process
17 | //
18 | declare function panic(msg :any, ...v :any[]) :void
19 |
20 | // repr returns a detailed string representation of the input
21 | //
22 | declare function repr(obj :any) :string
23 |
24 | // print works just like console.log
25 | declare function print(msg :any, ...v :any[]) :void
26 |
27 | // dlog works just like console.log but is stripped out from non-debug builds
28 | declare function dlog(msg :any, ...v :any[]) :void
29 |
30 | // assert checks the condition for truth, and if false, prints an optional
31 | // message, stack trace and exits the process.
32 | // assert is removed in release builds
33 | declare var assert :AssertFun
34 | declare var AssertionError :ErrorConstructor
35 | declare interface AssertFun {
36 | (cond :any, msg? :string, cons? :Function) :void
37 |
38 | // throws can be set to true to cause assertions to be thrown as exceptions,
39 | // or set to false to cause the process to exit.
40 | // Only has an effect in Nodejs-like environments.
41 | // false by default.
42 | throws :bool
43 | }
44 |
--------------------------------------------------------------------------------
/src/graphviz.json:
--------------------------------------------------------------------------------
1 | {
2 | "api": "1.0.0",
3 | "name": "graphviz",
4 | "main": "graphviz.ts"
5 | }
6 |
--------------------------------------------------------------------------------
/src/graphviz.ts:
--------------------------------------------------------------------------------
1 | import Viz from "./viz"
2 | import { Format, Engine, RenderOptions } from "./viz"
3 |
4 | declare const DEBUG :boolean
5 | declare const VERSION :string
6 |
7 | export const version = DEBUG ? "dev-" + Date.now().toString(36) : VERSION
8 | export const TimeoutError = new Error("timeout")
9 |
10 | // force use of iframe proxy, even when not necessary (only active when DEBUG=true)
11 | const DEBUG_FORCE_PROXY = false
12 |
13 |
14 | // Workers needs to use absolute URLs, also used for iframe proxy
15 | const urlBase = ((s :HTMLScriptElement) => {
16 | let m = (s ? s.src : "").match(/^[^\?]+\//)
17 | return m ? m[0]
18 | : DEBUG ? "http://127.0.0.1:3009/"
19 | : "https://rsms.me/graphviz/"
20 | })(document.currentScript as HTMLScriptElement)
21 |
22 |
23 | interface ProxyMsg {
24 | readonly type :string
25 | [k:string] :any
26 | }
27 |
28 | interface ProxyTransaction {
29 | readonly id :number
30 | readonly resolve :(result:T)=>void
31 | readonly reject :(reason:any)=>void
32 | }
33 |
34 |
35 | // Use an iframe proxy when served over a non-http url, like file:, data: or blob:
36 | // where Worker is restricted.
37 | const proxy = (
38 | document.location.pathname.indexOf("iframe-proxy.html") == -1 &&
39 | ( (DEBUG && DEBUG_FORCE_PROXY) || !(document.location.protocol in {"http:":1,"https:":1}) )
40 | ) ? new class {
41 | loadp :Promise
42 | iframe :HTMLIFrameElement
43 | w :Window
44 | resolve :()=>void
45 | reject :(e:Error)=>void
46 | nextTrID :number = 0
47 | trans = new Map>() // id => tr
48 |
49 | constructor() {
50 | const timeStart = DEBUG ? Date.now() : 0
51 | const timeoutTimer = setTimeout(() => { this.reject(new Error("proxy timeout")) }, 30000)
52 | this.loadp = new Promise((resolve, reject) => {
53 | this.resolve = () => {
54 | dlog(`proxy loaded in ${(Date.now() - timeStart).toFixed(0)}ms`)
55 | clearTimeout(timeoutTimer)
56 | resolve()
57 | }
58 | this.reject = e => {
59 | reject(e)
60 | }
61 | })
62 | // hook up message event listener
63 | window.addEventListener("message", ev => {
64 | dlog("[gv] got message from proxy:", ev.data)
65 | let msg = ev.data
66 | if (msg && typeof msg == "object") switch (msg.type) {
67 |
68 | case "graphviz.proxy.ready":
69 | ev.stopPropagation()
70 | this.resolve()
71 | break
72 |
73 | case "graphviz.proxy.response": {
74 | let t = this.trans.get(msg.trid)
75 | if (t) {
76 | this.trans.delete(msg.trid)
77 | if (msg.error) {
78 | t.reject(new Error(String(msg.error)))
79 | } else {
80 | t.resolve(msg.result)
81 | }
82 | }
83 | ev.stopPropagation()
84 | break
85 | }
86 |
87 | }
88 | })
89 | this.createIframe()
90 | }
91 |
92 | transaction(msg :ProxyMsg) :Promise {
93 | return this.loadp.then(() =>
94 | new Promise((resolve, reject) => {
95 | let t :ProxyTransaction = { id: this.nextTrID++, resolve, reject }
96 | this.trans.set(t.id, t)
97 | this.w.postMessage({ ...msg, trid: t.id }, "*")
98 | })
99 | )
100 | }
101 |
102 | layout(source :string, format? :Format, engine? :Engine, timeout? :number) :Promise {
103 | return this.transaction({
104 | type: "layout",
105 | args: [source, format, engine, timeout]
106 | })
107 | }
108 |
109 | createIframe() {
110 | let proxyUrl = urlBase + "iframe-proxy.html?v=" + version
111 | let iframe = this.iframe = document.createElement("iframe")
112 | iframe.style.position = "fixed"
113 | iframe.style.visibility = "hidden"
114 | iframe.style.pointerEvents = "none"
115 | iframe.src = proxyUrl
116 | ;(iframe as any).sandbox =
117 | "allow-same-origin allow-scripts allow-popups allow-forms allow-modals"
118 | ;(iframe as any).border = "0"
119 | document.documentElement.appendChild(iframe)
120 | this.w = iframe.contentWindow!
121 | assert(this.w)
122 | }
123 | } : null; // proxy
124 |
125 |
126 | // main API function
127 | export const layout : (
128 | source :string,
129 | format? :Format, // defaults to "svg"
130 | engine? :Engine, // defaults to "dot"
131 | timeout? :number, // milliseconds
132 | ) => Promise = proxy ? proxy.layout.bind(proxy) : (() => {
133 | let _viz :Viz
134 |
135 | function restartWorker() {
136 | if (_viz) {
137 | // kill existing worker
138 | _viz.wrapper.worker.terminate()
139 | }
140 | _viz = new Viz({ workerURL: urlBase + "viz-worker.js?v=" + version })
141 | // warm up
142 | _viz.renderString("digraph G {}", { format: "svg", engine: "dot" }).catch(() => {})
143 | }
144 |
145 | restartWorker()
146 |
147 | return (source :string, format? :Format, engine? :Engine, timeout? :number) =>
148 | new Promise((resolve, reject) => {
149 |
150 | let timeoutTimer :any
151 | if (timeout && timeout > 0) {
152 | timeoutTimer = setTimeout(() => {
153 | restartWorker()
154 | reject(TimeoutError)
155 | }, timeout)
156 | }
157 |
158 | return _viz.renderString(source, {
159 | format: format || "svg",
160 | engine: engine || "dot",
161 | }).then(resolve).catch(err => {
162 | clearTimeout(timeoutTimer)
163 | restartWorker()
164 | reject(err)
165 | })
166 |
167 | })
168 |
169 | })()
170 |
--------------------------------------------------------------------------------
/src/viz.d.ts:
--------------------------------------------------------------------------------
1 | // constructed based on https://github.com/mdaines/viz.js/wiki/API
2 |
3 | export type Format = "dot"
4 | | "json"
5 | | "json0"
6 | | "plain"
7 | | "plain-ext"
8 | | "ps"
9 | | "ps2"
10 | | "svg"
11 | | "xdot"
12 |
13 | export type Engine = "circo" // for circular layout of graphs
14 | | "dot" // for drawing directed graphs
15 | | "fdp" // for drawing undirected graphs
16 | | "neato" // for drawing undirected graphs
17 | | "osage" // for drawing large undirected graphs
18 | | "twopi" // for radial layouts of graphs
19 |
20 | export default class Viz {
21 | readonly wrapper :{
22 | readonly worker :Worker
23 | }
24 | constructor(options? :{ workerURL :string})
25 | renderString(source :string, options? :RenderOptions) :Promise
26 | }
27 |
28 |
29 | export interface RenderOptions {
30 | /** Layout engine */
31 | engine? :Engine
32 |
33 | /** Output format */
34 | format? :Format
35 |
36 | /**
37 | * Invert the y coordinate in generic output formats (dot, xdot, plain, plain-ext).
38 | * This is equivalent to specifying -y when invoking Graphviz from the command-line.
39 | */
40 | yInvert? :boolean
41 |
42 | /** Image dimensions to use when rendering nodes with image attributes. */
43 | images? :Object[]
44 |
45 | /** Files to make available to Graphviz using Emscripten's in-memory filesystem. */
46 | files? :Object[]
47 |
48 | /**
49 | * "No layout" mode for the neato engine.
50 | * This is equivalent to specifying the -n option when invoking Graphviz from the command-line.
51 | */
52 | nop? :number
53 | }
54 |
--------------------------------------------------------------------------------
/src/viz.js:
--------------------------------------------------------------------------------
1 | /*
2 | Viz.js 2.1.2 (Graphviz 2.40.1, Expat 2.2.5, Emscripten 1.37.36)
3 | https://github.com/mdaines/viz.js
4 |
5 | Copyright (c) 2014-2018 Michael Daines
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 |
25 | This distribution contains other software in object code form:
26 |
27 | Graphviz
28 | Licensed under Eclipse Public License - v 1.0
29 | http://www.graphviz.org
30 |
31 | Expat
32 | Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd and Clark Cooper
33 | Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.
34 | Licensed under MIT license
35 | http://www.libexpat.org
36 |
37 | zlib
38 | Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
39 | http://www.zlib.net/zlib_license.html
40 | */
41 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
42 | return typeof obj;
43 | } : function (obj) {
44 | return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
45 | };
46 |
47 | var classCallCheck = function (instance, Constructor) {
48 | if (!(instance instanceof Constructor)) {
49 | throw new TypeError("Cannot call a class as a function");
50 | }
51 | };
52 |
53 | var createClass = function () {
54 | function defineProperties(target, props) {
55 | for (var i = 0; i < props.length; i++) {
56 | var descriptor = props[i];
57 | descriptor.enumerable = descriptor.enumerable || false;
58 | descriptor.configurable = true;
59 | if ("value" in descriptor) descriptor.writable = true;
60 | Object.defineProperty(target, descriptor.key, descriptor);
61 | }
62 | }
63 |
64 | return function (Constructor, protoProps, staticProps) {
65 | if (protoProps) defineProperties(Constructor.prototype, protoProps);
66 | if (staticProps) defineProperties(Constructor, staticProps);
67 | return Constructor;
68 | };
69 | }();
70 |
71 | var _extends = Object.assign || function (target) {
72 | for (var i = 1; i < arguments.length; i++) {
73 | var source = arguments[i];
74 |
75 | for (var key in source) {
76 | if (Object.prototype.hasOwnProperty.call(source, key)) {
77 | target[key] = source[key];
78 | }
79 | }
80 | }
81 |
82 | return target;
83 | };
84 |
85 | var WorkerWrapper = function () {
86 | function WorkerWrapper(worker) {
87 | var _this = this;
88 |
89 | classCallCheck(this, WorkerWrapper);
90 |
91 | this.worker = worker;
92 | this.listeners = [];
93 | this.nextId = 0;
94 |
95 | this.worker.addEventListener('message', function (event) {
96 | var id = event.data.id;
97 | var error = event.data.error;
98 | var result = event.data.result;
99 |
100 | _this.listeners[id](error, result);
101 | delete _this.listeners[id];
102 | });
103 | }
104 |
105 | createClass(WorkerWrapper, [{
106 | key: 'render',
107 | value: function render(src, options) {
108 | var _this2 = this;
109 |
110 | return new Promise(function (resolve, reject) {
111 | var id = _this2.nextId++;
112 |
113 | _this2.listeners[id] = function (error, result) {
114 | if (error) {
115 | reject(new Error(error.message, error.fileName, error.lineNumber));
116 | return;
117 | }
118 | resolve(result);
119 | };
120 |
121 | _this2.worker.postMessage({ id: id, src: src, options: options });
122 | });
123 | }
124 | }]);
125 | return WorkerWrapper;
126 | }();
127 |
128 | var ModuleWrapper = function ModuleWrapper(module, render) {
129 | classCallCheck(this, ModuleWrapper);
130 |
131 | var instance = module();
132 | this.render = function (src, options) {
133 | return new Promise(function (resolve, reject) {
134 | try {
135 | resolve(render(instance, src, options));
136 | } catch (error) {
137 | reject(error);
138 | }
139 | });
140 | };
141 | };
142 |
143 | // https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding
144 |
145 |
146 | function b64EncodeUnicode(str) {
147 | return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p1) {
148 | return String.fromCharCode('0x' + p1);
149 | }));
150 | }
151 |
152 | function defaultScale() {
153 | if ('devicePixelRatio' in window && window.devicePixelRatio > 1) {
154 | return window.devicePixelRatio;
155 | } else {
156 | return 1;
157 | }
158 | }
159 |
160 | function svgXmlToImageElement(svgXml) {
161 | var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
162 | _ref$scale = _ref.scale,
163 | scale = _ref$scale === undefined ? defaultScale() : _ref$scale,
164 | _ref$mimeType = _ref.mimeType,
165 | mimeType = _ref$mimeType === undefined ? "image/png" : _ref$mimeType,
166 | _ref$quality = _ref.quality,
167 | quality = _ref$quality === undefined ? 1 : _ref$quality;
168 |
169 | return new Promise(function (resolve, reject) {
170 | var svgImage = new Image();
171 |
172 | svgImage.onload = function () {
173 | var canvas = document.createElement('canvas');
174 | canvas.width = svgImage.width * scale;
175 | canvas.height = svgImage.height * scale;
176 |
177 | var context = canvas.getContext("2d");
178 | context.drawImage(svgImage, 0, 0, canvas.width, canvas.height);
179 |
180 | canvas.toBlob(function (blob) {
181 | var image = new Image();
182 | image.src = URL.createObjectURL(blob);
183 | image.width = svgImage.width;
184 | image.height = svgImage.height;
185 |
186 | resolve(image);
187 | }, mimeType, quality);
188 | };
189 |
190 | svgImage.onerror = function (e) {
191 | var error;
192 |
193 | if ('error' in e) {
194 | error = e.error;
195 | } else {
196 | error = new Error('Error loading SVG');
197 | }
198 |
199 | reject(error);
200 | };
201 |
202 | svgImage.src = 'data:image/svg+xml;base64,' + b64EncodeUnicode(svgXml);
203 | });
204 | }
205 |
206 | function svgXmlToImageElementFabric(svgXml) {
207 | var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
208 | _ref2$scale = _ref2.scale,
209 | scale = _ref2$scale === undefined ? defaultScale() : _ref2$scale,
210 | _ref2$mimeType = _ref2.mimeType,
211 | mimeType = _ref2$mimeType === undefined ? 'image/png' : _ref2$mimeType,
212 | _ref2$quality = _ref2.quality,
213 | quality = _ref2$quality === undefined ? 1 : _ref2$quality;
214 |
215 | var multiplier = scale;
216 |
217 | var format = void 0;
218 | if (mimeType == 'image/jpeg') {
219 | format = 'jpeg';
220 | } else if (mimeType == 'image/png') {
221 | format = 'png';
222 | }
223 |
224 | return new Promise(function (resolve, reject) {
225 | fabric.loadSVGFromString(svgXml, function (objects, options) {
226 | // If there's something wrong with the SVG, Fabric may return an empty array of objects. Graphviz appears to give us at least one element back even given an empty graph, so we will assume an error in this case.
227 | if (objects.length == 0) {
228 | reject(new Error('Error loading SVG with Fabric'));
229 | }
230 |
231 | var element = document.createElement("canvas");
232 | element.width = options.width;
233 | element.height = options.height;
234 |
235 | var canvas = new fabric.Canvas(element, { enableRetinaScaling: false });
236 | var obj = fabric.util.groupSVGElements(objects, options);
237 | canvas.add(obj).renderAll();
238 |
239 | var image = new Image();
240 | image.src = canvas.toDataURL({ format: format, multiplier: multiplier, quality: quality });
241 | image.width = options.width;
242 | image.height = options.height;
243 |
244 | resolve(image);
245 | });
246 | });
247 | }
248 |
249 | var Viz = function () {
250 | function Viz() {
251 | var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
252 | workerURL = _ref3.workerURL,
253 | worker = _ref3.worker,
254 | Module = _ref3.Module,
255 | render = _ref3.render;
256 |
257 | classCallCheck(this, Viz);
258 |
259 | if (typeof workerURL !== 'undefined') {
260 | this.wrapper = new WorkerWrapper(new Worker(workerURL));
261 | } else if (typeof worker !== 'undefined') {
262 | this.wrapper = new WorkerWrapper(worker);
263 | } else if (typeof Module !== 'undefined' && typeof render !== 'undefined') {
264 | this.wrapper = new ModuleWrapper(Module, render);
265 | } else if (typeof Viz.Module !== 'undefined' && typeof Viz.render !== 'undefined') {
266 | this.wrapper = new ModuleWrapper(Viz.Module, Viz.render);
267 | } else {
268 | throw new Error('Must specify workerURL or worker option, Module and render options, or include one of full.render.js or lite.render.js after viz.js.');
269 | }
270 | }
271 |
272 | createClass(Viz, [{
273 | key: 'renderString',
274 | value: function renderString(src) {
275 | var _ref4 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
276 | _ref4$format = _ref4.format,
277 | format = _ref4$format === undefined ? 'svg' : _ref4$format,
278 | _ref4$engine = _ref4.engine,
279 | engine = _ref4$engine === undefined ? 'dot' : _ref4$engine,
280 | _ref4$files = _ref4.files,
281 | files = _ref4$files === undefined ? [] : _ref4$files,
282 | _ref4$images = _ref4.images,
283 | images = _ref4$images === undefined ? [] : _ref4$images,
284 | _ref4$yInvert = _ref4.yInvert,
285 | yInvert = _ref4$yInvert === undefined ? false : _ref4$yInvert,
286 | _ref4$nop = _ref4.nop,
287 | nop = _ref4$nop === undefined ? 0 : _ref4$nop;
288 |
289 | for (var i = 0; i < images.length; i++) {
290 | files.push({
291 | path: images[i].path,
292 | data: '\n\n '
293 | });
294 | }
295 |
296 | return this.wrapper.render(src, { format: format, engine: engine, files: files, images: images, yInvert: yInvert, nop: nop });
297 | }
298 | }, {
299 | key: 'renderSVGElement',
300 | value: function renderSVGElement(src) {
301 | var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
302 |
303 | return this.renderString(src, _extends({}, options, { format: 'svg' })).then(function (str) {
304 | var parser = new DOMParser();
305 | return parser.parseFromString(str, 'image/svg+xml').documentElement;
306 | });
307 | }
308 | }, {
309 | key: 'renderImageElement',
310 | value: function renderImageElement(src) {
311 | var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
312 | var scale = options.scale,
313 | mimeType = options.mimeType,
314 | quality = options.quality;
315 |
316 |
317 | return this.renderString(src, _extends({}, options, { format: 'svg' })).then(function (str) {
318 | if ((typeof fabric === 'undefined' ? 'undefined' : _typeof(fabric)) === "object" && fabric.loadSVGFromString) {
319 | return svgXmlToImageElementFabric(str, { scale: scale, mimeType: mimeType, quality: quality });
320 | } else {
321 | return svgXmlToImageElement(str, { scale: scale, mimeType: mimeType, quality: quality });
322 | }
323 | });
324 | }
325 | }, {
326 | key: 'renderJSONObject',
327 | value: function renderJSONObject(src) {
328 | var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
329 | var format = options.format;
330 |
331 |
332 | if (format !== 'json' || format !== 'json0') {
333 | format = 'json';
334 | }
335 |
336 | return this.renderString(src, _extends({}, options, { format: format })).then(function (str) {
337 | return JSON.parse(str);
338 | });
339 | }
340 | }]);
341 | return Viz;
342 | }();
343 |
344 | export default Viz;
345 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "forceConsistentCasingInFileNames": true,
4 | "allowSyntheticDefaultImports": true,
5 | "strictNullChecks": true,
6 | "noImplicitReturns": true,
7 | "noImplicitThis": true,
8 | "newLine": "LF",
9 | "sourceMap": true,
10 | "module": "esnext",
11 | "moduleResolution": "node",
12 | "target": "es2017",
13 | "lib": [
14 | "esnext",
15 | "webworker"
16 | ],
17 | "baseUrl": "src",
18 | "outDir": "docs"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------