markdown-up 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/app.js +10 -6
- package/package.json +1 -1
package/lib/app.js
CHANGED
|
@@ -4,12 +4,15 @@
|
|
|
4
4
|
/** @module lib/app */
|
|
5
5
|
|
|
6
6
|
import {ElementApplication, encodeHashID, getHashID} from 'element-app/lib/app.js';
|
|
7
|
-
import {barChartCodeBlock, dataTableCodeBlock, lineChartCodeBlock} from 'markdown-charts/lib/codeBlock.js';
|
|
8
7
|
import {decodeQueryString, encodeQueryString} from 'schema-markdown/lib/encode.js';
|
|
9
8
|
import {getBaseURL, isRelativeURL, markdownElements} from 'markdown-model/lib/elements.js';
|
|
10
9
|
import {UserTypeElements} from 'schema-markdown-doc/lib/userTypeElements.js';
|
|
10
|
+
import {barChartCodeBlock} from 'markdown-charts/lib/barChart.js';
|
|
11
11
|
import {chartModel} from 'markdown-charts/lib/model.js';
|
|
12
|
+
import {dataTableCodeBlock} from 'markdown-charts/lib/dataTable.js';
|
|
13
|
+
import {drawingCodeBlock} from 'markdown-charts/lib/drawing.js';
|
|
12
14
|
import {getMarkdownTitle} from 'markdown-model/lib/markdownModel.js';
|
|
15
|
+
import {lineChartCodeBlock} from 'markdown-charts/lib/lineChart.js';
|
|
13
16
|
import {parseMarkdown} from 'markdown-model/lib/parser.js';
|
|
14
17
|
|
|
15
18
|
|
|
@@ -232,6 +235,7 @@ export class MarkdownUp extends ElementApplication {
|
|
|
232
235
|
'codeBlocks': {
|
|
233
236
|
'bar-chart': (language, lines) => barChartCodeBlock(language, lines, chartOptions),
|
|
234
237
|
'data-table': (language, lines) => dataTableCodeBlock(language, lines, chartOptions),
|
|
238
|
+
'drawing': (language, lines) => drawingCodeBlock(language, lines, chartOptions),
|
|
235
239
|
'line-chart': (language, lines) => lineChartCodeBlock(language, lines, chartOptions)
|
|
236
240
|
},
|
|
237
241
|
'hashFn': (hashURL) => {
|
|
@@ -268,6 +272,11 @@ export class MarkdownUp extends ElementApplication {
|
|
|
268
272
|
'html': 'div',
|
|
269
273
|
'attr': {'class': 'menu'},
|
|
270
274
|
'elem': [
|
|
275
|
+
{
|
|
276
|
+
'html': 'a',
|
|
277
|
+
'attr': {'href': linkCommandToggle('markdown', 1), 'aria-label': 'Show Markdown'},
|
|
278
|
+
'elem': markdownSVGElements
|
|
279
|
+
},
|
|
271
280
|
{
|
|
272
281
|
'html': 'a',
|
|
273
282
|
'attr': {'href': linkCycle('fontSize', this.fontSize, 2), 'aria-label': 'Font size'},
|
|
@@ -278,11 +287,6 @@ export class MarkdownUp extends ElementApplication {
|
|
|
278
287
|
'attr': {'href': linkCycle('lineHeight', this.lineHeight, 0.2, 1), 'aria-label': 'Line height'},
|
|
279
288
|
'elem': lineHeightSVGElements
|
|
280
289
|
},
|
|
281
|
-
{
|
|
282
|
-
'html': 'a',
|
|
283
|
-
'attr': {'href': linkCommandToggle('markdown', 1), 'aria-label': 'Show Markdown'},
|
|
284
|
-
'elem': markdownSVGElements
|
|
285
|
-
},
|
|
286
290
|
{
|
|
287
291
|
'html': 'a',
|
|
288
292
|
'attr': {'href': linkCommandToggle('help', 'Help'), 'aria-label': 'Help'},
|