clone

a browser-first diagram editor with live svg previews, local drafts and encrypted, accountless sharing

refactor: promote shared diagram corpus

Dami committed 335a4cf
Move live examples out of the legacy CI hierarchy and make the editor and renderer tests consume one canonical corpus.

Remove the duplicate editor copies, unused changelog helper, inactive Deno Vega service, and orphaned blocked-at dependency so JavaScript development uses npm and Node alone.
commit
335a4cf1841e3f784526e3ebd126a205e479b229
parent
e8d88a806306ecf1206a2ed2afc0773c7c937fb2
author
Dami <dami.etoile@gmail.com>
83 files changed, +48 -2587
MREADME.md3+-
Dci/tasks/changelog.js81---
Ddeno.lock18-
Mdiagramzip-python-units/wireviz-translator/test/test_render.py6+-
Mdiagramzip-render/scripts/smoke-units.mjs8+-
Mdiagramzip-render/test/umlet.test.ts8+-
Ddiagramzip/examples/bpmn.bpmn82---
Ddiagramzip/examples/bytefield.bf6-
Ddiagramzip/examples/d2.d29-
Ddiagramzip/examples/dbml.dbml23-
Ddiagramzip/examples/diagramsnet.drawio1-
Ddiagramzip/examples/erd.erd13-
Ddiagramzip/examples/goat.goat24-
Ddiagramzip/examples/nomnoml.nomnoml13-
Ddiagramzip/examples/nwdiag.diag16-
Ddiagramzip/examples/packetdiag.diag22-
Ddiagramzip/examples/pikchr.pikchr5-
Ddiagramzip/examples/rackdiag.diag10-
Ddiagramzip/examples/svgbob.bob9-
Ddiagramzip/examples/symbolator.sv16-
Ddiagramzip/examples/umlet.uxf353--------------
Ddiagramzip/examples/vega.json95----
Ddiagramzip/examples/vegalite.json129-----
Ddiagramzip/examples/wavedrom.json57-
Ddiagramzip/examples/wireviz.yaml26-
Mdiagramzip/src/examples.js42+-
Mdiagramzip/test/examples.test.js7+-
Mdiagramzip/test/state.test.js2+-
Aexamples/README.md9+
Rci/tests/diagrams/actions.diag → examples/diagrams/actions.diag0
Rci/tests/diagrams/architecture.puml → examples/diagrams/architecture.puml0
Rci/tests/diagrams/banking-system.puml → examples/diagrams/banking-system.puml0
Rci/tests/diagrams/bar-chart.vega → examples/diagrams/bar-chart.vega0
Rci/tests/diagrams/bitfield.json5 → examples/diagrams/bitfield.json50
Rci/tests/diagrams/bytefield.bf → examples/diagrams/bytefield.bf0
Rci/tests/diagrams/chinese.puml → examples/diagrams/chinese.puml0
Rci/tests/diagrams/class.puml → examples/diagrams/class.puml0
Rci/tests/diagrams/cloud.bob → examples/diagrams/cloud.bob0
Rci/tests/diagrams/component.sv → examples/diagrams/component.sv0
Rci/tests/diagrams/components.ditaa → examples/diagrams/components.ditaa0
Rci/tests/diagrams/components.goat → examples/diagrams/components.goat0
Rci/tests/diagrams/connections.d2 → examples/diagrams/connections.d20
Rci/tests/diagrams/contribute.mmd → examples/diagrams/contribute.mmd0
Rci/tests/diagrams/dbml.dbml → examples/diagrams/dbml.dbml0
Rci/tests/diagrams/diagramsnet-infography.xml → examples/diagrams/diagramsnet-infography.xml0
Rci/tests/diagrams/diagramsnet-mindmap.xml → examples/diagrams/diagramsnet-mindmap.xml0
Rci/tests/diagrams/diagramsnet-network.xml → examples/diagrams/diagramsnet-network.xml0
Rci/tests/diagrams/diagramsnet-ui.xml → examples/diagrams/diagramsnet-ui.xml0
Rci/tests/diagrams/diagramsnet-venn.xml → examples/diagrams/diagramsnet-venn.xml0
Rci/tests/diagrams/diamond.pikchr → examples/diagrams/diamond.pikchr0
Rci/tests/diagrams/discretizing-scale.vlite → examples/diagrams/discretizing-scale.vlite0
Rci/tests/diagrams/empty-message.mmd → examples/diagrams/empty-message.mmd0
Rci/tests/diagrams/example.bpmn → examples/diagrams/example.bpmn0
Rdiagramzip/examples/excalidraw.excalidraw → examples/diagrams/excalidraw.excalidraw0
Rci/tests/diagrams/gettingstarted.structurizr → examples/diagrams/gettingstarted.structurizr0
Rci/tests/diagrams/hello.dot → examples/diagrams/hello.dot0
Rci/tests/diagrams/japanese.mermaid → examples/diagrams/japanese.mermaid0
Rci/tests/diagrams/kroki.diag → examples/diagrams/kroki.diag0
Rci/tests/diagrams/network.diag → examples/diagrams/network.diag0
Rci/tests/diagrams/packet.diag → examples/diagrams/packet.diag0
Rci/tests/diagrams/periodic-table.tex → examples/diagrams/periodic-table.tex0
Rci/tests/diagrams/pirate.nomnoml → examples/diagrams/pirate.nomnoml0
Rci/tests/diagrams/rack.diag → examples/diagrams/rack.diag0
Rci/tests/diagrams/schema.erd → examples/diagrams/schema.erd0
Rci/tests/diagrams/sequence.diag → examples/diagrams/sequence.diag0
Rci/tests/diagrams/sqlite-architecture.pikchr → examples/diagrams/sqlite-architecture.pikchr0
Rdiagramzip/examples/tikz.tex → examples/diagrams/tikz.tex0
Rci/tests/diagrams/umlet.xml → examples/diagrams/umlet.xml0
Rci/tests/diagrams/venn.excalidraw → examples/diagrams/venn.excalidraw0
Rci/tests/diagrams/wavedrom.json5 → examples/diagrams/wavedrom.json50
Rci/tests/diagrams/wireviz.yaml → examples/diagrams/wireviz.yaml0
Mpackage-lock.json7-
Mpackage.json1-
Dvega/.dockerignore1-
Dvega/.gitignore1-
Dvega/deno.json20-
Dvega/deno.lock783------------------------------
Dvega/packages/libjpeg62-turbo_2.1.5-4_amd64.debbin
Dvega/packages/libjpeg62-turbo_2.1.5-4_arm64.debbin
Dvega/src/convert.js144------
Dvega/src/main.ts82---
Dvega/tests/fixtures/diag.vlite129-----
Dvega/tests/test.js424----------------
M README.md +2 -1
D ci/tasks/changelog.js +0 -81
@@ -1,81 +0,0 @@
1-#!/usr/bin/env node2-// Changelog automation for the release workflow.3-//4-// Usage:5-// node ci/tasks/changelog.js release <version> Roll "## [Unreleased]" into a dated6-// "## [<version>]" section and start a7-// fresh, empty "## [Unreleased]" section.8-// node ci/tasks/changelog.js notes <version> Print the body of the "## [<version>]"9-// section to stdout (used as release notes).10-//11-// The changelog follows the "Keep a Changelog" format.12-13-import { readFileSync, writeFileSync } from 'node:fs'14-import { dirname, join } from 'node:path'15-import { fileURLToPath } from 'node:url'16-17-const CHANGELOG_PATH = join(18- dirname(fileURLToPath(import.meta.url)),19- '..',20- '..',21- 'CHANGELOG.md',22-)23-const UNRELEASED_HEADING = '## [Unreleased]'24-25-function fail(message) {26- console.error(`changelog: ${message}`)27- process.exit(1)28-}29-30-function today() {31- return new Date().toISOString().slice(0, 10)32-}33-34-function release(version) {35- const content = readFileSync(CHANGELOG_PATH, 'utf8')36- if (!content.includes(UNRELEASED_HEADING)) {37- fail(`no "${UNRELEASED_HEADING}" section found in CHANGELOG.md`)38- }39- if (content.includes(`## [${version}]`)) {40- fail(`a section for version ${version} already exists in CHANGELOG.md`)41- }42- // Keep an empty Unreleased section on top and move its current content under the new version.43- const updated = content.replace(44- UNRELEASED_HEADING,45- `${UNRELEASED_HEADING}\n\n## [${version}] - ${today()}`,46- )47- writeFileSync(CHANGELOG_PATH, updated)48- console.error(`changelog: released ${version}`)49-}50-51-function notes(version) {52- const lines = readFileSync(CHANGELOG_PATH, 'utf8').split('\n')53- const start = lines.findIndex((line) => line.startsWith(`## [${version}]`))54- if (start === -1) {55- fail(`no section for version ${version} found in CHANGELOG.md`)56- }57- let end = lines.findIndex(58- (line, index) => index > start && line.startsWith('## '),59- )60- if (end === -1) {61- end = lines.length62- }63- process.stdout.write(64- `${lines65- .slice(start + 1, end)66- .join('\n')67- .trim()}\n`,68- )69-}70-71-const [command, version] = process.argv.slice(2)72-if (!version) {73- fail(`usage: node ci/tasks/changelog.js <release|notes> <version>`)74-}75-if (command === 'release') {76- release(version)77-} else if (command === 'notes') {78- notes(version)79-} else {80- fail(`unknown command "${command}" (expected "release" or "notes")`)81-}\ No newline at end of file
D deno.lock +0 -18
M diagramzip-python-units/wireviz-translator/test/test_render.py +3 -3
M diagramzip-render/scripts/smoke-units.mjs +4 -4
M diagramzip-render/test/umlet.test.ts +4 -4
D diagramzip/examples/bpmn.bpmn +0 -82
@@ -1,82 +0,0 @@
1-<?xml version="1.0" encoding="UTF-8"?>2-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:qa="http://some-company/schema/bpmn/qa" id="_RdgBELNaEeSYkoSLDs6j-w" targetNamespace="http://activiti.org/bpmn">3- <bpmn2:process id="Process_1">4- <bpmn2:task id="Task_1" name="Examine Situation" qa:suitable="0.7">5- <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>6- <bpmn2:extensionElements>7- <qa:analysisDetails lastChecked="2015-01-20" nextCheck="2015-07-15">8- <qa:comment author="Klaus">9- Our operators always have a hard time to figure out, what they need to do here.10- </qa:comment>11- <qa:comment author="Walter">12- I believe this can be split up in a number of activities and partly automated.13- </qa:comment>14- </qa:analysisDetails>15- </bpmn2:extensionElements>16- </bpmn2:task>17- <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="Task_1" targetRef="ExclusiveGateway_1"/>18- <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="Things OK?">19- <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>20- <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>21- <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>22- </bpmn2:exclusiveGateway>23- <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="ExclusiveGateway_1" targetRef="EndEvent_1"/>24- <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ExclusiveGateway_1" targetRef="EndEvent_2"/>25- <bpmn2:endEvent id="EndEvent_1" name="Notification Sent">26- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>27- <bpmn2:messageEventDefinition id="MessageEventDefinition_1"/>28- </bpmn2:endEvent>29- <bpmn2:endEvent id="EndEvent_2" name="Error Propagated">30- <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>31- <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>32- </bpmn2:endEvent>33- </bpmn2:process>34- <bpmndi:BPMNDiagram id="BPMNDiagram_1">35- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">36- <bpmndi:BPMNShape id="_BPMNShape_Task_2" bpmnElement="Task_1">37- <dc:Bounds height="80.0" width="100.0" x="96.0" y="196.0"/>38- </bpmndi:BPMNShape>39- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_2" bpmnElement="EndEvent_1">40- <dc:Bounds height="36.0" width="36.0" x="396.0" y="300.0"/>41- <bpmndi:BPMNLabel>42- <dc:Bounds height="0.0" width="0.0" x="414.0" y="341.0"/>43- </bpmndi:BPMNLabel>44- </bpmndi:BPMNShape>45- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_2" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">46- <dc:Bounds height="50.0" width="50.0" x="276.0" y="210.0"/>47- <bpmndi:BPMNLabel>48- <dc:Bounds height="21.0" width="74.0" x="333.0" y="226.0"/>49- </bpmndi:BPMNLabel>50- </bpmndi:BPMNShape>51- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_Task_2" targetElement="_BPMNShape_ExclusiveGateway_2">52- <di:waypoint xsi:type="dc:Point" x="196.0" y="236.0"/>53- <di:waypoint xsi:type="dc:Point" x="276.0" y="235.0"/>54- <bpmndi:BPMNLabel>55- <dc:Bounds height="6.0" width="6.0" x="214.0" y="236.0"/>56- </bpmndi:BPMNLabel>57- </bpmndi:BPMNEdge>58- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ExclusiveGateway_2" targetElement="_BPMNShape_EndEvent_2">59- <di:waypoint xsi:type="dc:Point" x="301.0" y="260.0"/>60- <di:waypoint xsi:type="dc:Point" x="301.0" y="318.0"/>61- <di:waypoint xsi:type="dc:Point" x="396.0" y="318.0"/>62- <bpmndi:BPMNLabel>63- <dc:Bounds height="6.0" width="6.0" x="298.0" y="301.0"/>64- </bpmndi:BPMNLabel>65- </bpmndi:BPMNEdge>66- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_3" bpmnElement="EndEvent_2">67- <dc:Bounds height="36.0" width="36.0" x="396.0" y="132.0"/>68- <bpmndi:BPMNLabel>69- <dc:Bounds height="0.0" width="0.0" x="414.0" y="173.0"/>70- </bpmndi:BPMNLabel>71- </bpmndi:BPMNShape>72- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ExclusiveGateway_2" targetElement="_BPMNShape_EndEvent_3">73- <di:waypoint xsi:type="dc:Point" x="301.0" y="210.0"/>74- <di:waypoint xsi:type="dc:Point" x="301.0" y="150.0"/>75- <di:waypoint xsi:type="dc:Point" x="396.0" y="150.0"/>76- <bpmndi:BPMNLabel>77- <dc:Bounds height="6.0" width="6.0" x="333.0" y="150.0"/>78- </bpmndi:BPMNLabel>79- </bpmndi:BPMNEdge>80- </bpmndi:BPMNPlane>81- </bpmndi:BPMNDiagram>82-</bpmn2:definitions>
D diagramzip/examples/bytefield.bf +0 -6
D diagramzip/examples/d2.d2 +0 -9
D diagramzip/examples/dbml.dbml +0 -23
D diagramzip/examples/diagramsnet.drawio +0 -1
@@ -1 +0,0 @@
1-<mxfile host="localhost" modified="2021-05-13T15:13:49.065Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" etag="wSTZ0NLKJqQDPf-wjMNB" version="@DRAWIO-VERSION@" type="device"><diagram id="3228e29e-7158-1315-38df-8450db1d8a1d" name="Page-1">3VpdU+s4DP01PK5HtiTLfmwL3H3ZJ3Zmn0Mb2s4tTSeEBfbXr0LT2wbncvkI7WYDMzSy3CTnyEeSwxlObh+/ldlm8Ucxy1dnDmaPZ3h+5pwlCPqntjxtLUKNYV4uZ43T3nC1/CdvjNBY75ez/K7lWBXFqlpu2sZpsV7n06ply8qyeGi73RSr9lU32TxPDFfTbJVa/1rOqkVjtT7uB37Pl/NFc+ngZDtwnU2/z8vift1cb12s8+3Ibbb7muYZ7xbZrHg4MOHFGU7Koqi2n24fJ/mqhnWH2Hbe5U9Gf9xyma+rt0xwlqmZ9He2um+evLm36mkHhU5S1PVk/LBYVvnVJpvWIw9KvNrKosqqZbFWy28IarhZrlaTYlWUz7PxEoIAq73QecuqDgdfu91VZfE93zk+o4TjRXW70jOrH9OH2d1qXlb544GpebhveXGbV+WTujSj6MAgWYsueI8hNAw1EenYG+/QEgs7jLaJz4c92zrFQAAOzlvhgNFvXRYHvFv9FhSOFAOCOAqNT9bE3/zHXe2J0A8NFz/nxfXIi0VOebkI7PUqp+DFW2fIO6+/7NFjygt7G0J0IZLeJSbE2MgmgKOamaAnMeXFARknMQrqohUl0fbDC36Wlxc0uEsey+QkNDBYDd0YrUdG8YDU5gHZOOuDJ3ZgrfPp+hDoWBAE/SBNPSNt3Wg0fqsQHa4e7h15wmgsB+s9K7awg/ZpB6s1KkkcKIJlQKAEeRetcQREEFXYkEQ6iHA9EcF9pgjqSBGCfjIKJ1kDpBIfiFBCtFFUcNpMeDQYFGjkCACRO4hgQ6A5RKcCk0TqIALEuEBWPFJEiNH1w4tPeBklxCgMVY1kDex6/mexqTl4zgbFurpq/GB3vq3CLLVhrocOE/rz0RP84gy3IbdBARUBDwGDIHfITofq9BXrkmA6HhqmwvACUw1Qzaiq7xIFNBKjHBXTkGA6GRqmAYLRYkUlNWrVwbEt2FpenjJmY4Lv+dDw9ULtUqQdvwLGa65UB4xoO2T4C+FlSOC9GBq8TIkkxHaN4Y4qCZx2naPBaQIzGZF6wQNq+xjbpYPKrDlunKYd43hwmIrnpB44pbZy2u6Nhoeqd+EVdXXxpAinbd54MjiB1S75FYQRgxGwQThErjeLjgpw2r6N/2/4hlPWt5z2YePhFWBRO12P2gVLBPL2RbWApF2yDb7eM6r37Y6Kb0dPdj68CE67MutMjBEic0Br/XGrhbQpGw0uaElrLF37pFAK2wD+Remgw0E1g2zUoCXXscH/hQB3dGWDC1ptD14pcYlOKbs+7cvS7a8370t27ErefPDF1bzMZst8z0njccggfy1tCrFhODhebFcwGl06on21hQAdyyLWwrQ/OvY0lfrgg3gR0gN3+eKznKZ9Ybr99hlO8w++9Do2eW0dg1/wRR2rTEtOiFrb67L1tfpRPwSlTWbaDb3v/dcNX8t0aIywN6CwkmZuAXkrJWLIqVoGbbL0x0o/lKQtaprI3/miLMuuPyB8J6WEgA1GrVRBIvlgO7rYIy6TtKlNc/9ndEzQT7MPvDH77yQhYjIuIEBg9BARO8rfX6chdXFgRbkTFUfaFV3voE9P9/9w8zx28A9NePEv</diagram></mxfile>\ No newline at end of file
D diagramzip/examples/erd.erd +0 -13
D diagramzip/examples/goat.goat +0 -24
D diagramzip/examples/nomnoml.nomnoml +0 -13
D diagramzip/examples/nwdiag.diag +0 -16
D diagramzip/examples/packetdiag.diag +0 -22
D diagramzip/examples/pikchr.pikchr +0 -5
D diagramzip/examples/rackdiag.diag +0 -10
D diagramzip/examples/svgbob.bob +0 -9
D diagramzip/examples/symbolator.sv +0 -16
D diagramzip/examples/umlet.uxf +0 -353
@@ -1,353 +0,0 @@
1-<?xml version="1.0" encoding="UTF-8"?>2-<umlet_diagram>3- <element>4- <type>com.umlet.element.base.Relation</type>5- <coordinates>6- <x>739</x>7- <y>16</y>8- <w>232</w>9- <h>264</h>10- </coordinates>11- <panel_attributes>lt=&lt;-12- when(spidersensor="rotate")13- /block spider14- </panel_attributes>15- <additional_attributes>161;244;161;34;71;34;71;74</additional_attributes>16- </element>17- <element>18- <type>com.umlet.element.custom.FinalState</type>19- <coordinates>20- <x>890</x>21- <y>260</y>22- <w>20</w>23- <h>20</h>24- </coordinates>25- <panel_attributes></panel_attributes>26- <additional_attributes>transparentSelection=false</additional_attributes>27- </element>28- <element>29- <type>com.umlet.element.base.Relation</type>30- <coordinates>31- <x>750</x>32- <y>170</y>33- <w>160</w>34- <h>137</h>35- </coordinates>36- <panel_attributes>lt=&lt;-37- after (10s)38- / block spider39- </panel_attributes>40- <additional_attributes>140;100;66;100;66;20</additional_attributes>41- </element>42- <element>43- <type>com.umlet.element.custom.State</type>44- <coordinates>45- <x>340</x>46- <y>420</y>47- <w>100</w>48- <h>40</h>49- </coordinates>50- <panel_attributes>wait</panel_attributes>51- <additional_attributes>transparentSelection=false</additional_attributes>52- </element>53- <element>54- <type>com.umlet.element.custom.HistoryState</type>55- <coordinates>56- <x>230</x>57- <y>440</y>58- <w>20</w>59- <h>20</h>60- </coordinates>61- <panel_attributes></panel_attributes>62- <additional_attributes>transparentSelection=false</additional_attributes>63- </element>64- <element>65- <type>com.umlet.element.base.Relation</type>66- <coordinates>67- <x>230</x>68- <y>416</y>69- <w>130</w>70- <h>54</h>71- </coordinates>72- <panel_attributes>lt=&lt;-73- restart74- </panel_attributes>75- <additional_attributes>20;34;110;34</additional_attributes>76- </element>77- <element>78- <type>com.umlet.element.base.Relation</type>79- <coordinates>80- <x>270</x>81- <y>396</y>82- <w>90</w>83- <h>54</h>84- </coordinates>85- <panel_attributes>lt=&lt;-86- pause87- </panel_attributes>88- <additional_attributes>70;34;20;34</additional_attributes>89- </element>90- <element>91- <type>com.umlet.element.custom.FinalState</type>92- <coordinates>93- <x>90</x>94- <y>400</y>95- <w>20</w>96- <h>20</h>97- </coordinates>98- <panel_attributes></panel_attributes>99- <additional_attributes>transparentSelection=false</additional_attributes>100- </element>101- <element>102- <type>com.umlet.element.base.Relation</type>103- <coordinates>104- <x>46</x>105- <y>256</y>106- <w>114</w>107- <h>164</h>108- </coordinates>109- <panel_attributes>lt=&lt;-110- after (10s)111- /timeout112- </panel_attributes>113- <additional_attributes>54;144;54;34;94;34</additional_attributes>114- </element>115- <element>116- <type>com.umlet.element.base.Relation</type>117- <coordinates>118- <x>230</x>119- <y>110</y>120- <w>190</w>121- <h>170</h>122- </coordinates>123- <panel_attributes>lt=&lt;-124- timeout125- </panel_attributes>126- <additional_attributes>20;150;110;150;110;20;170;20</additional_attributes>127- </element>128- <element>129- <type>com.umlet.element.custom.State</type>130- <coordinates>131- <x>700</x>132- <y>90</y>133- <w>180</w>134- <h>100</h>135- </coordinates>136- <panel_attributes>accept137- boarding pass138- --139- entry/ release card140- do/release spider141- </panel_attributes>142- <additional_attributes>transparentSelection=true</additional_attributes>143- </element>144- <element>145- <type>com.umlet.element.base.Relation</type>146- <coordinates>147- <x>540</x>148- <y>140</y>149- <w>205</w>150- <h>100</h>151- </coordinates>152- <panel_attributes>lt=&lt;-153- [passenger booked]154- </panel_attributes>155- <additional_attributes>160;20;120;80;20;80</additional_attributes>156- </element>157- <element>158- <type>com.umlet.element.base.Relation</type>159- <coordinates>160- <x>450</x>161- <y>210</y>162- <w>239</w>163- <h>190</h>164- </coordinates>165- <panel_attributes>lt=&lt;-166- [passenger not booked]167- </panel_attributes>168- <additional_attributes>219;170;99;170;99;20</additional_attributes>169- </element>170- <element>171- <type>com.umlet.element.custom.State</type>172- <coordinates>173- <x>670</x>174- <y>350</y>175- <w>120</w>176- <h>50</h>177- </coordinates>178- <panel_attributes>reject179- boarding pass180- </panel_attributes>181- <additional_attributes>transparentSelection=false</additional_attributes>182- </element>183- <element>184- <type>com.umlet.element.base.Relation</type>185- <coordinates>186- <x>480</x>187- <y>130</y>188- <w>142</w>189- <h>100</h>190- </coordinates>191- <panel_attributes>lt=&lt;-192- result of search193- </panel_attributes>194- <additional_attributes>71;80;71;20</additional_attributes>195- </element>196- <element>197- <type>com.umlet.element.base.Relation</type>198- <coordinates>199- <x>270</x>200- <y>70</y>201- <w>150</w>202- <h>40</h>203- </coordinates>204- <panel_attributes>lt=&lt;-</panel_attributes>205- <additional_attributes>130;20;20;20</additional_attributes>206- </element>207- <element>208- <type>com.umlet.element.custom.ThreeWayRelation</type>209- <coordinates>210- <x>540</x>211- <y>210</y>212- <w>20</w>213- <h>20</h>214- </coordinates>215- <panel_attributes></panel_attributes>216- <additional_attributes>transparentSelection=false</additional_attributes>217- </element>218- <element>219- <type>com.umlet.element.custom.State</type>220- <coordinates>221- <x>140</x>222- <y>60</y>223- <w>150</w>224- <h>420</h>225- </coordinates>226- <panel_attributes>read boarding pass227- --228- </panel_attributes>229- <additional_attributes>transparentSelection=true</additional_attributes>230- </element>231- <element>232- <type>com.umlet.element.custom.State</type>233- <coordinates>234- <x>400</x>235- <y>60</y>236- <w>180</w>237- <h>90</h>238- </coordinates>239- <panel_attributes>check passenger240- --241- entry/start search242- do/blink lamp243- </panel_attributes>244- <additional_attributes>transparentSelection=true</additional_attributes>245- </element>246- <element>247- <type>com.umlet.element.custom.FinalState</type>248- <coordinates>249- <x>170</x>250- <y>410</y>251- <w>20</w>252- <h>20</h>253- </coordinates>254- <panel_attributes></panel_attributes>255- <additional_attributes>transparentSelection=false</additional_attributes>256- </element>257- <element>258- <type>com.umlet.element.custom.State</type>259- <coordinates>260- <x>150</x>261- <y>240</y>262- <w>100</w>263- <h>40</h>264- </coordinates>265- <panel_attributes>read266- passenger ID267- </panel_attributes>268- <additional_attributes>transparentSelection=false</additional_attributes>269- </element>270- <element>271- <type>com.umlet.element.custom.State</type>272- <coordinates>273- <x>150</x>274- <y>330</y>275- <w>100</w>276- <h>40</h>277- </coordinates>278- <panel_attributes>identify279- passenger280- </panel_attributes>281- <additional_attributes>transparentSelection=false</additional_attributes>282- </element>283- <element>284- <type>com.umlet.element.base.Relation</type>285- <coordinates>286- <x>160</x>287- <y>260</y>288- <w>40</w>289- <h>90</h>290- </coordinates>291- <panel_attributes>lt=&lt;-</panel_attributes>292- <additional_attributes>20;70;20;20</additional_attributes>293- </element>294- <element>295- <type>com.umlet.element.base.Relation</type>296- <coordinates>297- <x>160</x>298- <y>100</y>299- <w>40</w>300- <h>70</h>301- </coordinates>302- <panel_attributes>lt=&lt;-</panel_attributes>303- <additional_attributes>20;50;20;20</additional_attributes>304- </element>305- <element>306- <type>com.umlet.element.base.Relation</type>307- <coordinates>308- <x>160</x>309- <y>350</y>310- <w>40</w>311- <h>80</h>312- </coordinates>313- <panel_attributes>lt=&lt;-</panel_attributes>314- <additional_attributes>20;60;20;20</additional_attributes>315- </element>316- <element>317- <type>com.umlet.element.base.Relation</type>318- <coordinates>319- <x>140</x>320- <y>170</y>321- <w>78</w>322- <h>90</h>323- </coordinates>324- <panel_attributes>lt=&lt;-325- [valid]326- </panel_attributes>327- <additional_attributes>39;70;39;20</additional_attributes>328- </element>329- <element>330- <type>com.umlet.element.custom.State</type>331- <coordinates>332- <x>150</x>333- <y>150</y>334- <w>100</w>335- <h>40</h>336- </coordinates>337- <panel_attributes>check338- validity339- </panel_attributes>340- <additional_attributes>transparentSelection=false</additional_attributes>341- </element>342- <element>343- <type>com.umlet.element.custom.InitialState</type>344- <coordinates>345- <x>170</x>346- <y>100</y>347- <w>20</w>348- <h>20</h>349- </coordinates>350- <panel_attributes></panel_attributes>351- <additional_attributes>transparentSelection=false</additional_attributes>352- </element>353-</umlet_diagram>
D diagramzip/examples/vega.json +0 -95
@@ -1,95 +0,0 @@
1-{2- "$schema": "https://vega.github.io/schema/vega/v5.json",3- "width": 400,4- "height": 200,5- "padding": 5,6-7- "data": [8- {9- "name": "table",10- "values": [11- {"category": "A", "amount": 28},12- {"category": "B", "amount": 55},13- {"category": "C", "amount": 43},14- {"category": "D", "amount": 91},15- {"category": "E", "amount": 81},16- {"category": "F", "amount": 53},17- {"category": "G", "amount": 19},18- {"category": "H", "amount": 87}19- ]20- }21- ],22-23- "signals": [24- {25- "name": "tooltip",26- "value": {},27- "on": [28- {"events": "rect:mouseover", "update": "datum"},29- {"events": "rect:mouseout", "update": "{}"}30- ]31- }32- ],33-34- "scales": [35- {36- "name": "xscale",37- "type": "band",38- "domain": {"data": "table", "field": "category"},39- "range": "width",40- "padding": 0.05,41- "round": true42- },43- {44- "name": "yscale",45- "domain": {"data": "table", "field": "amount"},46- "nice": true,47- "range": "height"48- }49- ],50-51- "axes": [52- { "orient": "bottom", "scale": "xscale" },53- { "orient": "left", "scale": "yscale" }54- ],55-56- "marks": [57- {58- "type": "rect",59- "from": {"data":"table"},60- "encode": {61- "enter": {62- "x": {"scale": "xscale", "field": "category"},63- "width": {"scale": "xscale", "band": 1},64- "y": {"scale": "yscale", "field": "amount"},65- "y2": {"scale": "yscale", "value": 0}66- },67- "update": {68- "fill": {"value": "steelblue"}69- },70- "hover": {71- "fill": {"value": "red"}72- }73- }74- },75- {76- "type": "text",77- "encode": {78- "enter": {79- "align": {"value": "center"},80- "baseline": {"value": "bottom"},81- "fill": {"value": "#333"}82- },83- "update": {84- "x": {"scale": "xscale", "signal": "tooltip.category", "band": 0.5},85- "y": {"scale": "yscale", "signal": "tooltip.amount", "offset": -2},86- "text": {"signal": "tooltip.amount"},87- "fillOpacity": [88- {"test": "datum === tooltip", "value": 0},89- {"value": 1}90- ]91- }92- }93- }94- ]95-}
D diagramzip/examples/vegalite.json +0 -129
@@ -1,129 +0,0 @@
1-{2- "$schema": "https://vega.github.io/schema/vega-lite/v4.json",3- "description": "Horizontally concatenated charts that show different types of discretizing scales.",4- "data": {5- "values": [6- {"a": "A", "b": 28},7- {"a": "B", "b": 55},8- {"a": "C", "b": 43},9- {"a": "D", "b": 91},10- {"a": "E", "b": 81},11- {"a": "F", "b": 53},12- {"a": "G", "b": 19},13- {"a": "H", "b": 87},14- {"a": "I", "b": 52}15- ]16- },17- "hconcat": [18- {19- "mark": "circle",20- "encoding": {21- "y": {22- "field": "b",23- "type": "nominal",24- "sort": null,25- "axis": {26- "ticks": false,27- "domain": false,28- "title": null29- }30- },31- "size": {32- "field": "b",33- "type": "quantitative",34- "scale": {35- "type": "quantize"36- }37- },38- "color": {39- "field": "b",40- "type": "quantitative",41- "scale": {42- "type": "quantize",43- "zero": true44- },45- "legend": {46- "title": "Quantize"47- }48- }49- }50- },51- {52- "mark": "circle",53- "encoding": {54- "y": {55- "field": "b",56- "type": "nominal",57- "sort": null,58- "axis": {59- "ticks": false,60- "domain": false,61- "title": null62- }63- },64- "size": {65- "field": "b",66- "type": "quantitative",67- "scale": {68- "type": "quantile",69- "range": [80, 160, 240, 320, 400]70- }71- },72- "color": {73- "field": "b",74- "type": "quantitative",75- "scale": {76- "type": "quantile",77- "scheme": "magma"78- },79- "legend": {80- "format": "d",81- "title": "Quantile"82- }83- }84- }85- },86- {87- "mark": "circle",88- "encoding": {89- "y": {90- "field": "b",91- "type": "nominal",92- "sort": null,93- "axis": {94- "ticks": false,95- "domain": false,96- "title": null97- }98- },99- "size": {100- "field": "b",101- "type": "quantitative",102- "scale": {103- "type": "threshold",104- "domain": [30, 70],105- "range": [80, 200, 320]106- }107- },108- "color": {109- "field": "b",110- "type": "quantitative",111- "scale": {112- "type": "threshold",113- "domain": [30, 70],114- "scheme": "viridis"115- },116- "legend": {117- "title": "Threshold"118- }119- }120- }121- }122- ],123- "resolve": {124- "scale": {125- "color": "independent",126- "size": "independent"127- }128- }129-}
D diagramzip/examples/wavedrom.json5 +0 -7
D diagramzip/examples/wireviz.yaml +0 -26
M diagramzip/src/examples.js +21 -21
@@ -1,24 +1,24 @@
1-import bpmn from '../examples/bpmn.bpmn?raw'2-import bytefield from '../examples/bytefield.bf?raw'3-import d2 from '../examples/d2.d2?raw'4-import dbml from '../examples/dbml.dbml?raw'5-import diagramsnet from '../examples/diagramsnet.drawio?raw'6-import erd from '../examples/erd.erd?raw'7-import excalidraw from '../examples/excalidraw.excalidraw?raw'8-import goat from '../examples/goat.goat?raw'9-import nomnoml from '../examples/nomnoml.nomnoml?raw'10-import nwdiag from '../examples/nwdiag.diag?raw'11-import packetdiag from '../examples/packetdiag.diag?raw'12-import pikchr from '../examples/pikchr.pikchr?raw'13-import rackdiag from '../examples/rackdiag.diag?raw'14-import svgbob from '../examples/svgbob.bob?raw'15-import symbolator from '../examples/symbolator.sv?raw'16-import tikz from '../examples/tikz.tex?raw'17-import umlet from '../examples/umlet.uxf?raw'18-import vega from '../examples/vega.json?raw'19-import vegalite from '../examples/vegalite.json?raw'20-import wavedrom from '../examples/wavedrom.json5?raw'21-import wireviz from '../examples/wireviz.yaml?raw'1+import bpmn from '../../examples/diagrams/example.bpmn?raw'2+import bytefield from '../../examples/diagrams/bytefield.bf?raw'3+import d2 from '../../examples/diagrams/connections.d2?raw'4+import dbml from '../../examples/diagrams/dbml.dbml?raw'5+import diagramsnet from '../../examples/diagrams/diagramsnet-venn.xml?raw'6+import erd from '../../examples/diagrams/schema.erd?raw'7+import excalidraw from '../../examples/diagrams/excalidraw.excalidraw?raw'8+import goat from '../../examples/diagrams/components.goat?raw'9+import nomnoml from '../../examples/diagrams/pirate.nomnoml?raw'10+import nwdiag from '../../examples/diagrams/network.diag?raw'11+import packetdiag from '../../examples/diagrams/packet.diag?raw'12+import pikchr from '../../examples/diagrams/diamond.pikchr?raw'13+import rackdiag from '../../examples/diagrams/rack.diag?raw'14+import svgbob from '../../examples/diagrams/cloud.bob?raw'15+import symbolator from '../../examples/diagrams/component.sv?raw'16+import tikz from '../../examples/diagrams/tikz.tex?raw'17+import umlet from '../../examples/diagrams/umlet.xml?raw'18+import vega from '../../examples/diagrams/bar-chart.vega?raw'19+import vegalite from '../../examples/diagrams/discretizing-scale.vlite?raw'20+import wavedrom from '../../examples/diagrams/wavedrom.json5?raw'21+import wireviz from '../../examples/diagrams/wireviz.yaml?raw'2222 import { diagramTypes } from './diagram-types.js'2323 import { exampleVariant } from './example-variants.js'2424 import { DEFAULT_SOURCE } from './state.js'
M diagramzip/test/examples.test.js +4 -3
M diagramzip/test/state.test.js +1 -1
A examples/README.md +9 -0
R ci/tests/diagrams/actions.diag → examples/diagrams/actions.diag +0 -0

No content changes.

R ci/tests/diagrams/architecture.puml → examples/diagrams/architecture.puml +0 -0

No content changes.

R ci/tests/diagrams/banking-system.puml → examples/diagrams/banking-system.puml +0 -0

No content changes.

R ci/tests/diagrams/bar-chart.vega → examples/diagrams/bar-chart.vega +0 -0

No content changes.

R ci/tests/diagrams/bitfield.json5 → examples/diagrams/bitfield.json5 +0 -0

No content changes.

R ci/tests/diagrams/bytefield.bf → examples/diagrams/bytefield.bf +0 -0

No content changes.

R ci/tests/diagrams/chinese.puml → examples/diagrams/chinese.puml +0 -0

No content changes.

R ci/tests/diagrams/class.puml → examples/diagrams/class.puml +0 -0

No content changes.

R ci/tests/diagrams/cloud.bob → examples/diagrams/cloud.bob +0 -0

No content changes.

R ci/tests/diagrams/component.sv → examples/diagrams/component.sv +0 -0

No content changes.

R ci/tests/diagrams/components.ditaa → examples/diagrams/components.ditaa +0 -0

No content changes.

R ci/tests/diagrams/components.goat → examples/diagrams/components.goat +0 -0

No content changes.

R ci/tests/diagrams/connections.d2 → examples/diagrams/connections.d2 +0 -0

No content changes.

R ci/tests/diagrams/contribute.mmd → examples/diagrams/contribute.mmd +0 -0

No content changes.

R ci/tests/diagrams/dbml.dbml → examples/diagrams/dbml.dbml +0 -0

No content changes.

R ci/tests/diagrams/diagramsnet-infography.xml → examples/diagrams/diagramsnet-infography.xml +0 -0

No content changes.

R ci/tests/diagrams/diagramsnet-mindmap.xml → examples/diagrams/diagramsnet-mindmap.xml +0 -0

No content changes.

R ci/tests/diagrams/diagramsnet-network.xml → examples/diagrams/diagramsnet-network.xml +0 -0

No content changes.

R ci/tests/diagrams/diagramsnet-ui.xml → examples/diagrams/diagramsnet-ui.xml +0 -0

No content changes.

R ci/tests/diagrams/diagramsnet-venn.xml → examples/diagrams/diagramsnet-venn.xml +0 -0

No content changes.

R ci/tests/diagrams/diamond.pikchr → examples/diagrams/diamond.pikchr +0 -0

No content changes.

R ci/tests/diagrams/discretizing-scale.vlite → examples/diagrams/discretizing-scale.vlite +0 -0

No content changes.

R ci/tests/diagrams/empty-message.mmd → examples/diagrams/empty-message.mmd +0 -0

No content changes.

R ci/tests/diagrams/example.bpmn → examples/diagrams/example.bpmn +0 -0

No content changes.

R diagramzip/examples/excalidraw.excalidraw → examples/diagrams/excalidraw.excalidraw +0 -0

No content changes.

R ci/tests/diagrams/gettingstarted.structurizr → examples/diagrams/gettingstarted.structurizr +0 -0

No content changes.

R ci/tests/diagrams/hello.dot → examples/diagrams/hello.dot +0 -0

No content changes.

R ci/tests/diagrams/japanese.mermaid → examples/diagrams/japanese.mermaid +0 -0

No content changes.

R ci/tests/diagrams/kroki.diag → examples/diagrams/kroki.diag +0 -0

No content changes.

R ci/tests/diagrams/network.diag → examples/diagrams/network.diag +0 -0

No content changes.

R ci/tests/diagrams/packet.diag → examples/diagrams/packet.diag +0 -0

No content changes.

R ci/tests/diagrams/periodic-table.tex → examples/diagrams/periodic-table.tex +0 -0

No content changes.

R ci/tests/diagrams/pirate.nomnoml → examples/diagrams/pirate.nomnoml +0 -0

No content changes.

R ci/tests/diagrams/rack.diag → examples/diagrams/rack.diag +0 -0

No content changes.

R ci/tests/diagrams/schema.erd → examples/diagrams/schema.erd +0 -0

No content changes.

R ci/tests/diagrams/sequence.diag → examples/diagrams/sequence.diag +0 -0

No content changes.

R ci/tests/diagrams/sqlite-architecture.pikchr → examples/diagrams/sqlite-architecture.pikchr +0 -0

No content changes.

R diagramzip/examples/tikz.tex → examples/diagrams/tikz.tex +0 -0

No content changes.

R ci/tests/diagrams/umlet.xml → examples/diagrams/umlet.xml +0 -0

No content changes.

R ci/tests/diagrams/venn.excalidraw → examples/diagrams/venn.excalidraw +0 -0

No content changes.

R ci/tests/diagrams/wavedrom.json5 → examples/diagrams/wavedrom.json5 +0 -0

No content changes.

R ci/tests/diagrams/wireviz.yaml → examples/diagrams/wireviz.yaml +0 -0

No content changes.

M package-lock.json +0 -7
M package.json +0 -1
D vega/.dockerignore +0 -1
@@ -1 +0,0 @@
1-node_modules/
D vega/.gitignore +0 -1
@@ -1 +0,0 @@
1-node_modules/
D vega/deno.json +0 -20
D vega/deno.lock +0 -783
@@ -1,783 +0,0 @@
1-{2- "version": "5",3- "specifiers": {4- "jsr:@std/cli@1.0.32": "1.0.32",5- "npm:canvas@3.2.3": "3.2.3",6- "npm:sinon@22.1.0": "22.1.0",7- "npm:vega-canvas@2.0.0": "2.0.0",8- "npm:vega-lite@6.4.3": "6.4.3_vega@6.3.1",9- "npm:vega@6.3.1": "6.3.1"10- },11- "jsr": {12- "@std/cli@1.0.32": {13- "integrity": "188b3a100d6202d64e3f5bd3d799c7fa4f6d77f92cc65eb7f641c1fa0aa92a66"14- }15- },16- "npm": {17- "@sinonjs/commons@3.0.1": {18- "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==",19- "dependencies": [20- "type-detect@4.0.8"21- ]22- },23- "@sinonjs/fake-timers@15.4.0": {24- "integrity": "sha512-DsG+8/LscQIQg68J6Ef3dv10u6nVyetYn923s3/sus5eaGfTo1of5WMZSLf0UJc9KDuKPilPH0UDJCjvNbDNCA==",25- "dependencies": [26- "@sinonjs/commons"27- ]28- },29- "@sinonjs/samsam@10.0.2": {30- "integrity": "sha512-8lVwD1Df1BmzoaOLhMcGGcz/Jyr5QY2KSB75/YK1QgKzoabTeLdIVyhXNZK9ojfSKSdirbXqdbsXXqP9/Ve8+A==",31- "dependencies": [32- "@sinonjs/commons",33- "type-detect@4.1.0"34- ]35- },36- "@types/estree@1.0.9": {37- "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg=="38- },39- "@types/geojson@7946.0.16": {40- "integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg=="41- },42- "ansi-regex@6.2.2": {43- "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="44- },45- "ansi-styles@6.2.3": {46- "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="47- },48- "base64-js@1.5.1": {49- "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="50- },51- "bl@4.1.0": {52- "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",53- "dependencies": [54- "buffer",55- "inherits",56- "readable-stream"57- ]58- },59- "buffer@5.7.1": {60- "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",61- "dependencies": [62- "base64-js",63- "ieee754"64- ]65- },66- "canvas@3.2.3": {67- "integrity": "sha512-PzE5nJZPz72YUAfo8oTp0u3fqqY7IzlTubneAihqDYAUcBk7ryeCmBbdJBEdaH0bptSOe2VT2Zwcb3UaFyaSWw==",68- "dependencies": [69- "node-addon-api",70- "prebuild-install"71- ],72- "scripts": true73- },74- "chownr@1.1.4": {75- "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="76- },77- "cliui@9.0.1": {78- "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==",79- "dependencies": [80- "string-width",81- "strip-ansi",82- "wrap-ansi"83- ]84- },85- "commander@2.20.3": {86- "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="87- },88- "commander@7.2.0": {89- "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw=="90- },91- "d3-array@3.2.4": {92- "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==",93- "dependencies": [94- "internmap"95- ]96- },97- "d3-color@3.1.0": {98- "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA=="99- },100- "d3-delaunay@6.0.4": {101- "integrity": "sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==",102- "dependencies": [103- "delaunator"104- ]105- },106- "d3-dispatch@3.0.1": {107- "integrity": "sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg=="108- },109- "d3-dsv@3.0.1": {110- "integrity": "sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==",111- "dependencies": [112- "commander@7.2.0",113- "iconv-lite",114- "rw"115- ],116- "bin": true117- },118- "d3-force@3.0.0": {119- "integrity": "sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==",120- "dependencies": [121- "d3-dispatch",122- "d3-quadtree",123- "d3-timer"124- ]125- },126- "d3-format@3.1.2": {127- "integrity": "sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg=="128- },129- "d3-geo-projection@4.0.0": {130- "integrity": "sha512-p0bK60CEzph1iqmnxut7d/1kyTmm3UWtPlwdkM31AU+LW+BXazd5zJdoCn7VFxNCHXRngPHRnsNn5uGjLRGndg==",131- "dependencies": [132- "commander@7.2.0",133- "d3-array",134- "d3-geo"135- ],136- "bin": true137- },138- "d3-geo@3.1.1": {139- "integrity": "sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==",140- "dependencies": [141- "d3-array"142- ]143- },144- "d3-hierarchy@3.1.2": {145- "integrity": "sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA=="146- },147- "d3-interpolate@3.0.1": {148- "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==",149- "dependencies": [150- "d3-color"151- ]152- },153- "d3-path@3.1.0": {154- "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ=="155- },156- "d3-quadtree@3.0.1": {157- "integrity": "sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw=="158- },159- "d3-scale-chromatic@3.1.0": {160- "integrity": "sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==",161- "dependencies": [162- "d3-color",163- "d3-interpolate"164- ]165- },166- "d3-scale@4.0.2": {167- "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==",168- "dependencies": [169- "d3-array",170- "d3-format",171- "d3-interpolate",172- "d3-time",173- "d3-time-format"174- ]175- },176- "d3-shape@3.2.0": {177- "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==",178- "dependencies": [179- "d3-path"180- ]181- },182- "d3-time-format@4.1.0": {183- "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==",184- "dependencies": [185- "d3-time"186- ]187- },188- "d3-time@3.1.0": {189- "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==",190- "dependencies": [191- "d3-array"192- ]193- },194- "d3-timer@3.0.1": {195- "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA=="196- },197- "decompress-response@6.0.0": {198- "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",199- "dependencies": [200- "mimic-response"201- ]202- },203- "deep-extend@0.6.0": {204- "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="205- },206- "delaunator@5.1.0": {207- "integrity": "sha512-AGrQ4QSgssa1NGmWmLPqN5NY2KajF5MqxetNEO+o0n3ZwZZeTmt7bBnvzHWrmkZFxGgr4HdyFgelzgi06otLuQ==",208- "dependencies": [209- "robust-predicates"210- ]211- },212- "detect-libc@2.1.2": {213- "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="214- },215- "diff@9.0.0": {216- "integrity": "sha512-svtcdpS8CgJyqAjEQIXdb3OjhFVVYjzGAPO8WGCmRbrml64SPw/jJD4GoE98aR7r25A0XcgrK3F02yw9R/vhQw=="217- },218- "emoji-regex@10.6.0": {219- "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A=="220- },221- "end-of-stream@1.4.5": {222- "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==",223- "dependencies": [224- "once"225- ]226- },227- "escalade@3.2.0": {228- "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="229- },230- "expand-template@2.0.3": {231- "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg=="232- },233- "fs-constants@1.0.0": {234- "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="235- },236- "get-caller-file@2.0.5": {237- "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="238- },239- "get-east-asian-width@1.6.0": {240- "integrity": "sha512-QRbvDIbx6YklUe6RxeTeleMR0yv3cYH6PsPZHcnVn7xv7zO1BHN8r0XETu8n6Ye3Q+ahtSarc3WgtNWmehIBfA=="241- },242- "github-from-package@0.0.0": {243- "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw=="244- },245- "iconv-lite@0.6.3": {246- "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",247- "dependencies": [248- "safer-buffer"249- ]250- },251- "ieee754@1.2.1": {252- "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="253- },254- "inherits@2.0.4": {255- "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="256- },257- "ini@1.3.8": {258- "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="259- },260- "internmap@2.0.3": {261- "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg=="262- },263- "json-stringify-pretty-compact@4.0.0": {264- "integrity": "sha512-3CNZ2DnrpByG9Nqj6Xo8vqbjT4F6N+tb4Gb28ESAZjYZ5yqvmc56J+/kuIwkaAMOyblTQhUW7PxMkUb8Q36N3Q=="265- },266- "mimic-response@3.1.0": {267- "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ=="268- },269- "minimist@1.2.8": {270- "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="271- },272- "mkdirp-classic@0.5.3": {273- "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="274- },275- "napi-build-utils@2.0.0": {276- "integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA=="277- },278- "node-abi@3.94.0": {279- "integrity": "sha512-W5ZNO5KRPB5TkYmGVD9F6YqhsglXJzE6etpbmT+f6EQElhiX/UTG551cnsRGvLG3fyZEg9HwaDmNmj5nwJ4z9g==",280- "dependencies": [281- "semver"282- ]283- },284- "node-addon-api@7.1.1": {285- "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ=="286- },287- "once@1.4.0": {288- "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",289- "dependencies": [290- "wrappy"291- ]292- },293- "prebuild-install@7.1.3": {294- "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==",295- "dependencies": [296- "detect-libc",297- "expand-template",298- "github-from-package",299- "minimist",300- "mkdirp-classic",301- "napi-build-utils",302- "node-abi",303- "pump",304- "rc",305- "simple-get",306- "tar-fs",307- "tunnel-agent"308- ],309- "deprecated": true,310- "bin": true311- },312- "pump@3.0.4": {313- "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==",314- "dependencies": [315- "end-of-stream",316- "once"317- ]318- },319- "rc@1.2.8": {320- "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",321- "dependencies": [322- "deep-extend",323- "ini",324- "minimist",325- "strip-json-comments"326- ],327- "bin": true328- },329- "readable-stream@3.6.2": {330- "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",331- "dependencies": [332- "inherits",333- "string_decoder",334- "util-deprecate"335- ]336- },337- "robust-predicates@3.0.3": {338- "integrity": "sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA=="339- },340- "rw@1.3.3": {341- "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ=="342- },343- "safe-buffer@5.2.1": {344- "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="345- },346- "safer-buffer@2.1.2": {347- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="348- },349- "semver@7.8.5": {350- "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",351- "bin": true352- },353- "simple-concat@1.0.1": {354- "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q=="355- },356- "simple-get@4.0.1": {357- "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==",358- "dependencies": [359- "decompress-response",360- "once",361- "simple-concat"362- ]363- },364- "sinon@22.1.0": {365- "integrity": "sha512-n1ajF2rBWMTtEwbKcw4UdFg4nCnDdq/U6RDoxtOd7oapOlRoJ5ynwFx60owROyhDpA9QhMZi0pCO/xtmwFjG7w==",366- "dependencies": [367- "@sinonjs/commons",368- "@sinonjs/fake-timers",369- "@sinonjs/samsam",370- "diff"371- ]372- },373- "string-width@7.2.0": {374- "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==",375- "dependencies": [376- "emoji-regex",377- "get-east-asian-width",378- "strip-ansi"379- ]380- },381- "string_decoder@1.3.0": {382- "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",383- "dependencies": [384- "safe-buffer"385- ]386- },387- "strip-ansi@7.2.0": {388- "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==",389- "dependencies": [390- "ansi-regex"391- ]392- },393- "strip-json-comments@2.0.1": {394- "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ=="395- },396- "tar-fs@2.1.5": {397- "integrity": "sha512-OboTd8mmMhZDNPV+UjQcK9yKAatXu2aJ+r1w4im1Otd4M4fl2hwvdoXUxIYHFTHWK/3y3FarBP70v3vwmGlOxw==",398- "dependencies": [399- "chownr",400- "mkdirp-classic",401- "pump",402- "tar-stream"403- ]404- },405- "tar-stream@2.2.0": {406- "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",407- "dependencies": [408- "bl",409- "end-of-stream",410- "fs-constants",411- "inherits",412- "readable-stream"413- ]414- },415- "topojson-client@3.1.0": {416- "integrity": "sha512-605uxS6bcYxGXw9qi62XyrV6Q3xwbndjachmNxu8HWTtVPxZfEJN9fd/SZS1Q54Sn2y0TMyMxFj/cJINqGHrKw==",417- "dependencies": [418- "commander@2.20.3"419- ],420- "bin": true421- },422- "tslib@2.8.1": {423- "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="424- },425- "tunnel-agent@0.6.0": {426- "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",427- "dependencies": [428- "safe-buffer"429- ]430- },431- "type-detect@4.0.8": {432- "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g=="433- },434- "type-detect@4.1.0": {435- "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw=="436- },437- "util-deprecate@1.0.2": {438- "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="439- },440- "vega-canvas@2.0.0": {441- "integrity": "sha512-9x+4TTw/USYST5nx4yN272sy9WcqSRjAR0tkQYZJ4cQIeon7uVsnohvoPQK1JZu7K1QXGUqzj08z0u/UegBVMA=="442- },443- "vega-crossfilter@5.1.2": {444- "integrity": "sha512-K14PtfBxQzb7UJq5rL1IuwDdPov6lucoHVzRaraGiBBnfc963jkWHQNfRFAuEj/nIt5BIixXBiqIrGKgfScjSA==",445- "dependencies": [446- "d3-array",447- "vega-dataflow",448- "vega-util"449- ]450- },451- "vega-dataflow@6.1.2": {452- "integrity": "sha512-0/HBBlzPERh0wV5kUOh/N4aAAmb3rB18Kfpej+nWvDIjPk3dixTapNkVVkoA9CsB5dY5bY+HNqiM/Pp4XPduGQ==",453- "dependencies": [454- "vega-format",455- "vega-loader",456- "vega-util"457- ]458- },459- "vega-encode@5.2.1": {460- "integrity": "sha512-YuvJ66z6FQRtu0n0IYxsJp7BpliXVgaxNsur0Fqic10/a5TLMQmDYURPUcrtWViAMpqKgdNMyxnmr0ZQ4bjwCA==",461- "dependencies": [462- "d3-array",463- "d3-interpolate",464- "vega-dataflow",465- "vega-scale",466- "vega-util"467- ]468- },469- "vega-event-selector@4.0.0": {470- "integrity": "sha512-CcWF4m4KL/al1Oa5qSzZ5R776q8lRxCj3IafCHs5xipoEHrkgu1BWa7F/IH5HrDNXeIDnqOpSV1pFsAWRak4gQ=="471- },472- "vega-expression@6.1.0": {473- "integrity": "sha512-hHgNx/fQ1Vn1u6vHSamH7lRMsOa/yQeHGGcWVmh8fZafLdwdhCM91kZD9p7+AleNpgwiwzfGogtpATFaMmDFYg==",474- "dependencies": [475- "@types/estree",476- "vega-util"477- ]478- },479- "vega-expression@6.2.1": {480- "integrity": "sha512-AK4EYh9ErCC7KU8vGigsetwG66S1wLLfPFnfjkOdydRaN4kNJp129qp4jos0wA/r7F/lIlhM3uIzw+KSA2cZEg==",481- "dependencies": [482- "@types/estree",483- "vega-util"484- ]485- },486- "vega-force@5.1.2": {487- "integrity": "sha512-693paaBvACvAtUO8vp4m/KUJ0F3tKaoXixzw+ExpP4qKkqJ/Me2MGWsVrEJh/f6KuU9bp7xv+g7OPNhqnVrpoQ==",488- "dependencies": [489- "d3-force",490- "vega-dataflow",491- "vega-util"492- ]493- },494- "vega-format@2.1.2": {495- "integrity": "sha512-cJ2oqGEGYJ2NbkIIUDic03ZZX1meE+sq330gq4HFf3CvzSupTwHLWQj3/H5zug5DrqEQhLCLkiRwvmMe4pEqfg==",496- "dependencies": [497- "d3-array",498- "d3-format",499- "d3-time-format",500- "vega-time",501- "vega-util"502- ]503- },504- "vega-functions@6.1.3": {505- "integrity": "sha512-WOgWVxGg1T1tuICyylIppxXWXWEtl7P81Xnj0vQtoIn11VvQ0mrsBZr1aia4g8Sw0fEH1mUO7Dtj7v3o8BgBmQ==",506- "dependencies": [507- "d3-array",508- "d3-color",509- "d3-geo",510- "vega-dataflow",511- "vega-expression@6.2.1",512- "vega-scale",513- "vega-scenegraph",514- "vega-selections",515- "vega-statistics",516- "vega-time",517- "vega-util"518- ]519- },520- "vega-geo@5.1.2": {521- "integrity": "sha512-tls2+IVuKaIOxEqdshuSk2Til8qcF7SUNaWkATKu5hwWqQEY3cp7tfdXosuTMaDTkLp+Nw84iWfe5BzfoxDYMA==",522- "dependencies": [523- "d3-array",524- "d3-color",525- "d3-geo",526- "vega-canvas",527- "vega-dataflow",528- "vega-projection",529- "vega-statistics",530- "vega-util"531- ]532- },533- "vega-hierarchy@5.1.2": {534- "integrity": "sha512-7a72/lA6j50HU6PQe5ChbomftHi29V1oCcibaQpDozZncHuAnsQummqfiPyTMPpNMrSRtyZy18do0IEoOvrbMg==",535- "dependencies": [536- "d3-hierarchy",537- "vega-dataflow",538- "vega-util"539- ]540- },541- "vega-label@2.1.2": {542- "integrity": "sha512-MFsOKOCG6a5QwP5atoFFi+R58IP/Q7//65UvgrSeankX2QrDcWjBtzIqS6JlYBOAdyjoiAAghx7pnIAj5nAO6A==",543- "dependencies": [544- "vega-canvas",545- "vega-dataflow",546- "vega-scenegraph",547- "vega-util"548- ]549- },550- "vega-lite@6.4.3_vega@6.3.1": {551- "integrity": "sha512-d/7hPjfz560UERaQuTmGgIVfXAe3g2hJWeC+igDeaGohUdEoNrHLXgR/yTOBT8vV/lIuuKnw+0/xWWblkDwkMQ==",552- "dependencies": [553- "json-stringify-pretty-compact",554- "tslib",555- "vega",556- "vega-event-selector",557- "vega-expression@6.1.0",558- "vega-util",559- "yargs"560- ],561- "bin": true562- },563- "vega-loader@5.1.2": {564- "integrity": "sha512-O29bKHsSJBi391H88OZXH8vgUdopWMorC5ZJ/8XjTq8TIXVdeUrNnI8dMkUyv7yQg3ywMTji+5fHhov1TOkkyA==",565- "dependencies": [566- "d3-dsv",567- "topojson-client",568- "vega-format",569- "vega-util"570- ]571- },572- "vega-parser@7.1.2": {573- "integrity": "sha512-88HNkVrEwWbMmbbhPCmFHPrl/ClTcvThRv2UMZqMJJ5IqgjWLUolCA1fhAvnAbvRPe+Z1j+GbV/WWjYWAjEuyw==",574- "dependencies": [575- "vega-dataflow",576- "vega-event-selector",577- "vega-functions",578- "vega-scale",579- "vega-util"580- ]581- },582- "vega-projection@2.1.2": {583- "integrity": "sha512-HL+FS9AgYSOa1UOIJfhOD39RMT4tDODkMcN6MCRsdlRNnukVm1+JhrixDnciBjqiZLxDhUjESJwgLQtXx8cUyw==",584- "dependencies": [585- "d3-geo",586- "d3-geo-projection",587- "vega-scale"588- ]589- },590- "vega-regression@2.1.2": {591- "integrity": "sha512-2dyb2sT6cxdTK5K87uNDYpW7LbTP90lplxW62imjfLAwKUq1wL74X8y03a0W5tpRfV8+f3ai+cYTv+HXB3XmDQ==",592- "dependencies": [593- "d3-array",594- "vega-dataflow",595- "vega-statistics",596- "vega-util"597- ]598- },599- "vega-runtime@7.1.2": {600- "integrity": "sha512-MMfm7FeWLX2XqaY26i99GrlToexO/EWYqT7MRqEkpw+0nYgKh4zpQ47j04LB3ishnSZAj2AL0HNl9uPZLxgFhg==",601- "dependencies": [602- "vega-dataflow",603- "vega-util"604- ]605- },606- "vega-scale@8.1.2": {607- "integrity": "sha512-ADCGgdSmhcZyHxtHbrVcDrG76er2s2eXowO3qDg0vx2eclHdXL4YNaEjTHrosNG/1TAI5LAe7aQ2BGssJFfAXA==",608- "dependencies": [609- "d3-array",610- "d3-interpolate",611- "d3-scale",612- "d3-scale-chromatic",613- "vega-time",614- "vega-util"615- ]616- },617- "vega-scenegraph@5.2.1": {618- "integrity": "sha512-tWolI3s/cjU5g8evEjpxJqgqKQ2IJv1FoPXqvNuviLNdylP1I/h5iF5RY08Cz4jkuP9zircSskFEBsHylD1dgQ==",619- "dependencies": [620- "d3-path",621- "d3-shape",622- "vega-canvas",623- "vega-loader",624- "vega-scale",625- "vega-util"626- ]627- },628- "vega-selections@6.1.4": {629- "integrity": "sha512-qR5feBL8xq5BjoG3rf7e2WKle/cn5Fa9pBFMBnzoOYp4nTA0GYDoKuOjZkftibsQcmdST0HzPjSrS14jH3TCQw==",630- "dependencies": [631- "d3-array",632- "vega-expression@6.2.1",633- "vega-util"634- ]635- },636- "vega-statistics@2.0.0": {637- "integrity": "sha512-dGPfDXnBlgXbZF3oxtkb8JfeRXd5TYHx25Z/tIoaa9jWua4Vf/AoW2wwh8J1qmMy8J03/29aowkp1yk4DOPazQ==",638- "dependencies": [639- "d3-array"640- ]641- },642- "vega-time@3.2.1": {643- "integrity": "sha512-SXo1klLYPsmBdSj9itYSuFMmCpwnnIvQS8jWFxsCTnyWcPaBQKz0kf2M7DqTysi34KTk+6ws4kqZg11XMWnIYA==",644- "dependencies": [645- "d3-array",646- "d3-time",647- "vega-util"648- ]649- },650- "vega-transforms@5.2.1": {651- "integrity": "sha512-csKiYXJFa0YY5lubP1wc8b99SJ8nHLG/sOWvKFpW3CfDfjp8LoB0exrxgtIoClCsngAguKiuZVDwQZxBhPJZwA==",652- "dependencies": [653- "d3-array",654- "vega-dataflow",655- "vega-statistics",656- "vega-time",657- "vega-util"658- ]659- },660- "vega-typings@2.2.0": {661- "integrity": "sha512-pX7LsqgMpzMPOyydg/drYbIjh+mmvLfKtuKr75OpCu/ZYKJ2i8UjSmNlpARYeYGLaXfuNUAM3hMN8NPZPDYiBQ==",662- "dependencies": [663- "@types/geojson",664- "vega-event-selector",665- "vega-expression@6.2.1",666- "vega-util"667- ]668- },669- "vega-util@2.1.2": {670- "integrity": "sha512-Mdvv33BUlx4no5gz2VHdue4bJ6ejWmInuieID3JGnAXwewHKrPWE/Xr2vVWA+xS9Om1eHvj/0wVsiBGJ61v2uQ=="671- },672- "vega-view-transforms@5.2.1": {673- "integrity": "sha512-TiguoCJ6BB7TEV+s3nNMoCoH4+q5A6XQsDMEzbVuRaSWmfIJxvWUlbZQqn4CUt65VMDr63Fy21Xpb0ntlaU5LQ==",674- "dependencies": [675- "vega-dataflow",676- "vega-scenegraph",677- "vega-util"678- ]679- },680- "vega-view@6.1.2": {681- "integrity": "sha512-BG/Kqd1csdK4uKdJ4hv72msgQX3Ry5SzCV1ngbytkn6QwuQPpFWzya/f0OSWyMQP9S79avdHXqdLCxjSeiDQRw==",682- "dependencies": [683- "d3-array",684- "d3-timer",685- "vega-dataflow",686- "vega-format",687- "vega-functions",688- "vega-runtime",689- "vega-scenegraph",690- "vega-util"691- ]692- },693- "vega-voronoi@5.1.2": {694- "integrity": "sha512-8BgKb6aF/42L/PrFi3Idqag7FtbzNqDVhvPD4SfswSzGYlRDcxcn1eQQsa//q72qIZk4i5rsHeAiH2QbIjPSBg==",695- "dependencies": [696- "d3-delaunay",697- "vega-dataflow",698- "vega-util"699- ]700- },701- "vega-wordcloud@5.1.2": {702- "integrity": "sha512-ZSw6fupf4qx4hBzL9q/oVUKPVbVePjJ/FSgfxxgRcKvE1VoYq3HWfx9qg+CQMvgDS+oGDsn2WoQJuNLYx9T3AQ==",703- "dependencies": [704- "vega-canvas",705- "vega-dataflow",706- "vega-scale",707- "vega-statistics",708- "vega-util"709- ]710- },711- "vega@6.3.1": {712- "integrity": "sha512-mX5tvY3ISCSiPPmunuZyQfccq0XlUvJd2t5oyc6SNS0N0TwnPNoklx0mVod5n+qbzuUoiuxl7Ve/SvoRqH4RzA==",713- "dependencies": [714- "vega-crossfilter",715- "vega-dataflow",716- "vega-encode",717- "vega-event-selector",718- "vega-expression@6.2.1",719- "vega-force",720- "vega-format",721- "vega-functions",722- "vega-geo",723- "vega-hierarchy",724- "vega-label",725- "vega-loader",726- "vega-parser",727- "vega-projection",728- "vega-regression",729- "vega-runtime",730- "vega-scale",731- "vega-scenegraph",732- "vega-statistics",733- "vega-time",734- "vega-transforms",735- "vega-typings",736- "vega-util",737- "vega-view",738- "vega-view-transforms",739- "vega-voronoi",740- "vega-wordcloud"741- ]742- },743- "wrap-ansi@9.0.2": {744- "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==",745- "dependencies": [746- "ansi-styles",747- "string-width",748- "strip-ansi"749- ]750- },751- "wrappy@1.0.2": {752- "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="753- },754- "y18n@5.0.8": {755- "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA=="756- },757- "yargs-parser@22.0.0": {758- "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw=="759- },760- "yargs@18.0.0": {761- "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==",762- "dependencies": [763- "cliui",764- "escalade",765- "get-caller-file",766- "string-width",767- "y18n",768- "yargs-parser"769- ]770- }771- },772- "workspace": {773- "dependencies": [774- "jsr:@std/assert@^1.0.19",775- "jsr:@std/cli@1.0.32",776- "npm:canvas@3.2.3",777- "npm:sinon@22.1.0",778- "npm:vega-canvas@2.0.0",779- "npm:vega-lite@6.4.3",780- "npm:vega@6.3.1"781- ]782- }783-}
D vega/packages/libjpeg62-turbo_2.1.5-4_amd64.deb +0 -0

Binary file.

D vega/packages/libjpeg62-turbo_2.1.5-4_arm64.deb +0 -0

Binary file.

D vega/src/convert.js +0 -144
@@ -1,144 +0,0 @@
1-import { parse, View } from "vega";2-import { compile } from "vega-lite";3-4-class UnsafeIncludeError extends Error {5- constructor(message) {6- super(message);7- this.name = "UnsafeIncludeError";8- }9-}10-11-class IllegalArgumentError extends Error {12- constructor(message) {13- super(message);14- this.name = "IllegalArgumentError";15- }16-}17-18-/**19- * Suppress non-critical messages (i.e., warning, info and debug messages) to prevent writing on stderr or stdout.20- */21-const nullLogger = {22- warn: (_) => {},23- info: (_) => {},24- debug: (_) => {},25-};26-27-/**28- * Whether a `data` definition (either a single object, as found on29- * `spec.data` or `mark.encode.*`, or an array of them, as found on30- * `spec.data` or `mark.data`) includes a `url` attribute.31- * @param data32- * @returns {boolean}33- */34-function dataHasUrl(data) {35- if (!data) {36- return false;37- }38- if (Array.isArray(data)) {39- return data.some((item) => item && item.url);40- }41- return typeof data === "object" && !!data.url;42-}43-44-/**45- * Whether a mark's `encode` block sets a `url` on any of its property46- * sets (e.g. `enter`, `update`, `exit`, `hover`). Image marks load this47- * URL directly through the renderer, independently of `data`.48- * @param encode49- * @returns {boolean}50- */51-function encodeHasUrl(encode) {52- if (!encode || typeof encode !== "object") {53- return false;54- }55- return Object.values(encode).some((entry) => dataHasUrl(entry));56-}57-58-/**59- * Whether any mark in the given array (including those nested inside60- * group marks, since Vega allows group marks to be nested arbitrarily61- * deep) references a URL, either through its `data` or through an62- * image mark's `encode.*.url`.63- * @param marks64- * @returns {boolean}65- */66-function marksHaveUnsafeUrl(marks) {67- return marks.some((mark) => {68- if (!mark) {69- return false;70- }71- if (dataHasUrl(mark.data) || encodeHasUrl(mark.encode)) {72- return true;73- }74- return Array.isArray(mark.marks) && marksHaveUnsafeUrl(mark.marks);75- });76-}77-78-/**79- * Whether a parsed Vega/Vega-Lite spec references a URL anywhere secure80- * mode must block: top-level `data`, or `data`/`encode.*.url` on any81- * mark, however deeply nested.82- * @param spec83- * @returns {boolean}84- */85-function specHasUnsafeUrl(spec) {86- if (!spec) {87- return false;88- }89- if (dataHasUrl(spec.data)) {90- return true;91- }92- return Array.isArray(spec.marks) && marksHaveUnsafeUrl(spec.marks);93-}94-95-/**96- * @param source97- * @param options98- * @returns {Promise<string|Buffer>}99- */100-export async function convert(source, options) {101- const { safeMode, specFormat, format } = options;102- let spec = JSON.parse(source);103- if (specFormat === "lite") {104- spec = compile(spec, { logger: nullLogger }).spec;105- }106- if (safeMode === "secure" && specHasUnsafeUrl(spec)) {107- throw new UnsafeIncludeError(108- `Unable to load data from an URL while running in secure mode.109-Please include your data set as 'values' or run Kroki in unsafe mode using the KROKI_SAFE_MODE environment variable.`,110- );111- }112- const view = new View(parse(spec), {113- renderer: format === "svg" ? "svg" : "canvas",114- }).finalize();115- if (format === "svg") {116- return await view.toSVG();117- }118- if (format === "png") {119- const canvas = await view.toCanvas();120- const data = [];121- return new Promise((resolve, reject) => {122- const stream = canvas.createPNGStream();123- stream.on("data", (chunk) => data.push(chunk));124- stream.on("end", () => resolve(Buffer.concat(data)));125- stream.on("error", (error) => reject(error));126- });127- }128- if (format === "pdf") {129- const canvas = await view.toCanvas(undefined, {130- type: "pdf",131- context: { textDrawingMode: "glyph" },132- });133- const data = [];134- return new Promise((resolve, reject) => {135- const stream = canvas.createPDFStream();136- stream.on("data", (chunk) => data.push(chunk));137- stream.on("end", () => resolve(Buffer.concat(data)));138- stream.on("error", (error) => reject(error));139- });140- }141- throw new IllegalArgumentError(142- `Unknown output format: ${format}. Must be one of: svg, png or pdf.`,143- );144-}
D vega/src/main.ts +0 -82
@@ -1,82 +0,0 @@
1-import { convert as convertVega } from "./convert.js";2-import { parseArgs } from "@std/parse-args";3-import { stdin, stdout } from "node:process";4-import pkg from "../deno.json" with { type: "json" };5-6-const encoding = "utf-8";7-let data: string;8-let format = "svg";9-let safeMode = "secure";10-let specFormat = "default";11-12-async function convert() {13- const source = data.toString();14- if (source === "") {15- return;16- }17- try {18- const result = await convertVega(source, {19- specFormat,20- safeMode,21- format,22- });23- if (result) {24- stdout.write(result);25- }26- } catch (err) {27- if (err instanceof Error && err.name) {28- if (err.name === "UnsafeIncludeError") {29- console.error(err.message);30- Deno.exit(13); // permission denied31- } else if (err.name === "IllegalArgumentError") {32- console.error(err.message);33- Deno.exit(22); // invalid argument34- }35- }36- console.error(err);37- Deno.exit(1);38- }39-}40-41-function main() {42- const argv = parseArgs(Deno.args);43-44- if (argv.version) {45- console.log(`vega ${pkg.imports["vega"].replace("npm:vega@", "")}`);46- Deno.exit(0);47- }48- if (argv["output-format"]) {49- format = argv["output-format"];50- }51- if (argv["safe-mode"]) {52- safeMode = argv["safe-mode"].toLowerCase();53- }54- if (argv["spec-format"]) {55- specFormat = argv["spec-format"].toLowerCase();56- }57-58- // Accepting piped content. E.g.:59- // echo "pass in this string as input" | ./example-script60- data = "";61- stdin.setEncoding(encoding);62-63- stdin.on("readable", function () {64- let chunk = stdin.read();65- while (chunk) {66- data += chunk;67- chunk = stdin.read();68- }69- });70-71- stdin.on("end", async function () {72- // There will be a trailing \n from the user hitting enter. Get rid of it.73- data = data.replace(/\n$/, "");74- await convert();75- });76-}77-78-/**79- * Run CLI.80- */81-82-main();
D vega/tests/fixtures/diag.vlite +0 -129
@@ -1,129 +0,0 @@
1-{2- "$schema": "https://vega.github.io/schema/vega-lite/v4.json",3- "description": "Horizontally concatenated charts that show different types of discretizing scales.",4- "data": {5- "values": [6- {"a": "A", "b": 28},7- {"a": "B", "b": 55},8- {"a": "C", "b": 43},9- {"a": "D", "b": 91},10- {"a": "E", "b": 81},11- {"a": "F", "b": 53},12- {"a": "G", "b": 19},13- {"a": "H", "b": 87},14- {"a": "I", "b": 52}15- ]16- },17- "hconcat": [18- {19- "mark": "circle",20- "encoding": {21- "y": {22- "field": "b",23- "type": "nominal",24- "sort": null,25- "axis": {26- "ticks": false,27- "domain": false,28- "title": null29- }30- },31- "size": {32- "field": "b",33- "type": "quantitative",34- "scale": {35- "type": "quantize"36- }37- },38- "color": {39- "field": "b",40- "type": "quantitative",41- "scale": {42- "type": "quantize",43- "zero": true44- },45- "legend": {46- "title": "Quantize"47- }48- }49- }50- },51- {52- "mark": "circle",53- "encoding": {54- "y": {55- "field": "b",56- "type": "nominal",57- "sort": null,58- "axis": {59- "ticks": false,60- "domain": false,61- "title": null62- }63- },64- "size": {65- "field": "b",66- "type": "quantitative",67- "scale": {68- "type": "quantile",69- "range": [80, 160, 240, 320, 400]70- }71- },72- "color": {73- "field": "b",74- "type": "quantitative",75- "scale": {76- "type": "quantile",77- "scheme": "magma"78- },79- "legend": {80- "format": "d",81- "title": "Quantile"82- }83- }84- }85- },86- {87- "mark": "circle",88- "encoding": {89- "y": {90- "field": "b",91- "type": "nominal",92- "sort": null,93- "axis": {94- "ticks": false,95- "domain": false,96- "title": null97- }98- },99- "size": {100- "field": "b",101- "type": "quantitative",102- "scale": {103- "type": "threshold",104- "domain": [30, 70],105- "range": [80, 200, 320]106- }107- },108- "color": {109- "field": "b",110- "type": "quantitative",111- "scale": {112- "type": "threshold",113- "domain": [30, 70],114- "scheme": "viridis"115- },116- "legend": {117- "title": "Threshold"118- }119- }120- }121- }122- ],123- "resolve": {124- "scale": {125- "color": "independent",126- "size": "independent"127- }128- }129-}
D vega/tests/test.js +0 -424
@@ -1,424 +0,0 @@
1-"use strict";2-3-import { describe, it } from "node:test";4-5-import { convert } from "../src/convert.js";6-import sinon from "sinon";7-import ospath from "node:path";8-import { deepEqual, fail } from "node:assert";9-10-const __dirname = import.meta.dirname;11-12-describe("#convert", function () {13- it("should throw UnsafeIncludeError in secure mode when the Vega-Lite specification contains data[].url", async function () {14- const input = `{15- "data": {"url": "data/cars.json"},16- "mark": "point",17- "encoding": {18- "x": {"field": "Horsepower", "type": "quantitative"},19- "y": {"field": "Miles_per_Gallon", "type": "quantitative"}20- }21-}`;22- try {23- await convert(input, {24- specFormat: "lite",25- safeMode: "secure",26- format: "svg",27- });28- fail(29- "It should throw an error in secure mode when the Vega-Lite specification contains data.url",30- );31- } catch (err) {32- deepEqual(err.name, "UnsafeIncludeError");33- }34- });35- it("should throw UnsafeIncludeError in secure mode when the Vega specification contains data.url", async () => {36- const input = `{37- "$schema": "https://vega.github.io/schema/vega/v5.json",38- "width": 500,39- "height": 200,40- "data": {41- "name": "passwd",42- "url": "file:///etc/passwd",43- "format": {44- "type": "dsv",45- "delimiter": ":",46- "header": [47- "username",48- "password",49- "uid",50- "gid",51- "comment",52- "home",53- "shell"54- ]55- }56- },57- "marks": [58- {59- "type": "text",60- "from": {61- "data": "passwd"62- },63- "encode": {64- "enter": {65- "text": {66- "signal": "datum.username + ':' + datum.password + ':' + datum.uid + ':' + datum.gid + ':' + datum.comment + ':' + datum.home + ':' + datum.shell"67- }68- }69- }70- }71- ],72- "scales": [73- {74- "name": "yscale",75- "type": "linear",76- "domain": {77- "data": "passwd",78- "field": "index"79- },80- "range": [81- 0,82- 100083- ]84- }85- ]86-}`;87- try {88- await convert(input, {89- specFormat: "",90- safeMode: "secure",91- format: "svg",92- });93- fail(94- "",95- "",96- "It should throw an error in secure mode when the Vega-Lite specification contains data.url",97- );98- } catch (err) {99- deepEqual(err.name, "UnsafeIncludeError");100- }101- });102- it("should throw UnsafeIncludeError in secure mode when the Vega specification contains marks[].data[].url", async function () {103- const input = `{104- "marks": [105- {106- "type": "group",107- "data": [108- {109- "url": "data/cars.json"110- }111- ]112- }113- ]114-}`;115- try {116- await convert(input, {117- specFormat: "",118- safeMode: "secure",119- format: "svg",120- });121- fail(122- "",123- "",124- "It should throw an error in secure mode when the Vega-Lite specification contains data.url",125- );126- } catch (err) {127- deepEqual(err.name, "UnsafeIncludeError");128- }129- });130- it("should throw UnsafeIncludeError in secure mode when the Vega specification contains marks[].marks[].data[].url (nested group marks)", async function () {131- const input = `{132- "marks": [133- {134- "type": "group",135- "marks": [136- {137- "type": "group",138- "data": [139- {140- "url": "data/cars.json"141- }142- ]143- }144- ]145- }146- ]147-}`;148- try {149- await convert(input, {150- specFormat: "",151- safeMode: "secure",152- format: "svg",153- });154- fail(155- "",156- "",157- "It should throw an error in secure mode when the Vega specification contains marks[].marks[].data[].url",158- );159- } catch (err) {160- deepEqual(err.name, "UnsafeIncludeError");161- }162- });163- it("should throw UnsafeIncludeError in secure mode when the Vega specification contains an image mark with encode.*.url", async function () {164- const input = `{165- "marks": [166- {167- "type": "image",168- "encode": {169- "enter": {170- "url": { "value": "http://169.254.169.254/latest/meta-data/" },171- "x": { "value": 0 },172- "y": { "value": 0 },173- "width": { "value": 100 },174- "height": { "value": 100 }175- }176- }177- }178- ]179-}`;180- try {181- await convert(input, {182- specFormat: "",183- safeMode: "secure",184- format: "svg",185- });186- fail(187- "",188- "",189- "It should throw an error in secure mode when the Vega specification contains an image mark with encode.*.url",190- );191- } catch (err) {192- deepEqual(err.name, "UnsafeIncludeError");193- }194- });195- it("should throw UnsafeIncludeError for deeply nested mark data URLs", async function () {196- const input = `{197- "marks": [198- {199- "type": "group",200- "marks": [201- {202- "type": "group",203- "marks": [204- {205- "type": "group",206- "marks": [207- {208- "type": "text",209- "data": {210- "url": "file:///etc/passwd"211- }212- }213- ]214- }215- ]216- }217- ]218- }219- ]220-}`;221- try {222- await convert(input, {223- specFormat: "",224- safeMode: "secure",225- format: "svg",226- });227- fail("Deeply nested mark data URLs should be rejected in secure mode");228- } catch (err) {229- deepEqual(err.name, "UnsafeIncludeError");230- }231- });232- it("should throw UnsafeIncludeError for nested image encode signal URLs", async function () {233- const input = `{234- "marks": [235- {236- "type": "group",237- "marks": [238- {239- "type": "group",240- "marks": [241- {242- "type": "image",243- "encode": {244- "update": {245- "url": {246- "signal": "'http://169.254.169.254/latest/meta-data/'"247- },248- "x": {"value": 0},249- "y": {"value": 0},250- "width": {"value": 100},251- "height": {"value": 100}252- }253- }254- }255- ]256- }257- ]258- }259- ]260-}`;261- try {262- await convert(input, {263- specFormat: "",264- safeMode: "secure",265- format: "svg",266- });267- fail("Nested image encode URLs should be rejected in secure mode");268- } catch (err) {269- deepEqual(err.name, "UnsafeIncludeError");270- }271- });272- it("should allow inline values in secure mode", async function () {273- const input = `{274- "width": 100,275- "height": 100,276- "data": {277- "values": [278- {"x": 10, "y": 10}279- ]280- },281- "marks": [282- {283- "type": "rect",284- "encode": {285- "enter": {286- "x": {"field": "x"},287- "y": {"field": "y"},288- "width": {"value": 20},289- "height": {"value": 20}290- }291- }292- }293- ]294-}`;295- const result = await convert(input, {296- specFormat: "",297- safeMode: "secure",298- format: "svg",299- });300- deepEqual(result.includes("<svg"), true);301- });302- it("should throw IllegalArgumentError when output format is not supported", async function () {303- const input = `{304- "data": {305- "values": "a\\n1\\n2\\n3\\n4",306- "format": {307- "type": "csv"308- }309- },310- "mark": "point",311- "encoding": {312- "y": {"field": "a", "type": "quantitative"}313- }314-}`;315- try {316- await convert(input, {317- specFormat: "lite",318- safeMode: "safe",319- format: "txt",320- });321- fail("It should throw an error when output format is not supported");322- } catch (err) {323- deepEqual(err.name, "IllegalArgumentError");324- }325- });326- it("should not output warning to stdout", async function () {327- sinon.stub(process.stdout, "write");328- sinon.stub(process.stderr, "write");329- try {330- const input = `{331- "mark": "rect",332- "encoding": {333- "x": {"value": 1},334- "text": {"value":"foo"}335- }336-}`;337- const result = await convert(input, {338- specFormat: "lite",339- safeMode: "safe",340- format: "svg",341- });342- deepEqual(343- result.includes('<svg xmlns="http://www.w3.org/2000/svg"'),344- true,345- "generated SVG must include <svg> start tag",346- );347- deepEqual(348- result.includes("</svg>"),349- true,350- "generated SVG must include <svg> end tag",351- );352- const stdoutWriteCalls = process.stdout.write.getCalls();353- const stderrWriteCalls = process.stderr.write.getCalls();354- deepEqual(355- stdoutWriteCalls.length === 0,356- true,357- `It should not output warning messages to stdout but process.stdout.write('${358- stdoutWriteCalls && stdoutWriteCalls[0] &&359- stdoutWriteCalls[0].args.join(" ")360- }') was called`,361- );362- deepEqual(363- stderrWriteCalls.length === 0,364- true,365- `It should not output warning messages to stderr but process.stderr.write('${366- stderrWriteCalls && stderrWriteCalls[0] &&367- stderrWriteCalls[0].args.join(" ")368- }') was called`,369- );370- } finally {371- process.stdout.write.restore();372- process.stderr.write.restore();373- }374- });375- it("should convert a Vega-Lite definition to PNG", async function () {376- const decoder = new TextDecoder("utf-8");377- const input = await Deno.readFile(378- ospath.join(__dirname, "fixtures", "diag.vlite"),379- );380- const pngBuffer = await convert(decoder.decode(input), {381- specFormat: "lite",382- safeMode: "safe",383- format: "png",384- });385- deepEqual(386- Buffer.byteLength(pngBuffer) > 10000,387- true,388- "generated PNG image must be greater than 20000 bytes",389- );390- });391- it("should convert a Vega-Lite definition to PDF", async function () {392- const decoder = new TextDecoder("utf-8");393- const input = await Deno.readFile(394- ospath.join(__dirname, "fixtures", "diag.vlite"),395- );396- const pdfBuffer = await convert(decoder.decode(input), {397- specFormat: "lite",398- safeMode: "safe",399- format: "pdf",400- });401- deepEqual(402- Buffer.byteLength(pdfBuffer) > 10000,403- true,404- "generated PDF file must be greater than 10000 bytes",405- );406- // REMIND: unable to strictly compare the PDF because it contains metadata! (more specifically the creation date!)407- });408- it("should convert a Vega-Lite definition to SVG", async function () {409- const decoder = new TextDecoder("utf-8");410- const input = await Deno.readFile(411- ospath.join(__dirname, "fixtures", "diag.vlite"),412- );413- const svg = await convert(decoder.decode(input), {414- specFormat: "lite",415- safeMode: "safe",416- format: "svg",417- });418- deepEqual(419- svg.length > 20000,420- true,421- "generated SVG image must be greater than 20000 bytes",422- );423- });424-});