markdown-up 3.6.2 → 3.6.4

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/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![npm](https://img.shields.io/npm/v/markdown-up)](https://www.npmjs.com/package/markdown-up)
4
4
  [![GitHub](https://img.shields.io/github/license/craigahobbs/markdown-up)](https://github.com/craigahobbs/markdown-up/blob/main/LICENSE)
5
5
 
6
- [MarkdownUp](https://craigahobbs.github.io/markdown-up/) is a Markdown viewer.
6
+ MarkdownUp is a Markdown viewer. This is the MarkdownUp frontend application.
7
7
 
8
8
 
9
9
  ## Links
@@ -15,7 +15,7 @@
15
15
  ## View Local Markdown Files
16
16
 
17
17
  To view local Markdown files, use the
18
- [MarkdownUp launcher](https://github.com/craigahobbs/markdown-up-py#readme)
18
+ [MarkdownUp backend application](https://github.com/craigahobbs/markdown-up-py#readme)
19
19
  from a terminal prompt:
20
20
 
21
21
  ~~~
@@ -26,8 +26,8 @@ markdown-up
26
26
 
27
27
  ## Host Markdown Web Pages
28
28
 
29
- To host a Markdown resource, download the MarkdownUp application stub to the directory containing
30
- your Markdown files:
29
+ To host a Markdown resource, download the MarkdownUp application HTML stub to the directory
30
+ containing your Markdown files:
31
31
 
32
32
  ~~~
33
33
  curl -O https://craigahobbs.github.io/markdown-up/extra/index.html
@@ -52,83 +52,16 @@ application stub file, index.html. For example:
52
52
  ...
53
53
  ~~~
54
54
 
55
- To view a different Markdown resource, set the application's "url" hash parameter (i.e., "http://127.0.0.1:8000#url=other.md").
55
+ To view a different Markdown resource, set the application's "url" hash parameter (i.e.,
56
+ "http://127.0.0.1:8000#url=other.md").
56
57
 
57
58
 
58
- ## Dynamic Markdown Applications
59
+ ## MarkdownUp Applications
59
60
 
60
- Using MarkdownUp's "markdown-script" fenced code blocks, you can dynamically generate Markdown,
61
- allowing you to build lightweight, client-rendered web applications with no HTML, no CSS, and a
62
- single dependency (MarkdownUp). The "markdown-script" fenced code blocks are interpreted as the
63
- [BareScript programming language](https://craigahobbs.github.io/bare-script/language/).
64
- In addition to generating Markdown, you can fetch text and JSON resources, create SVG drawings,
65
- parse CSV, render data tables, draw line charts, and more. For more information, see the
66
- [MarkdownUp Library](https://craigahobbs.github.io/markdown-up/library/).
67
-
68
- For example:
69
-
70
- ``` markdown
71
- # Dynamic Markdown Example
72
-
73
- ~~~ markdown-script
74
- # Variable arguments
75
- helloCount = if(vCount != null, vCount, 3)
76
-
77
- # Constants
78
- width = 200
79
- height = 60
80
- borderSize = 5
81
-
82
- # Render the more/less menu
83
- markdownPrint( \
84
- '', \
85
- if(helloCount <= 1, 'Less', '[Less](#var.vCount=' + (helloCount - 1) + ')') + ' | ', \
86
- '[More](#var.vCount=' + (helloCount + 1) + ')' \
87
- )
88
-
89
- # Render many hellos
90
- ixHello = 0
91
- while ixHello < helloCount:
92
- # Render the hello title
93
- helloTitle = 'Hello #' + (ixHello + 1)
94
- markdownPrint('', '## ' + helloTitle)
95
-
96
- # Render the hello drawing
97
- drawNew(width, height)
98
- drawStyle('red', borderSize, 'blue')
99
- drawRect(0.5 * borderSize, 0.5 * borderSize, width - borderSize, height - borderSize)
100
- drawTextStyle(0.67 * height, 'white', true)
101
- drawText(helloTitle, 0.5 * width, 0.55 * height)
102
-
103
- ixHello = ixHello + 1
104
- endwhile
105
- ~~~
106
- ```
107
-
108
- Click here to [see the example in action](https://craigahobbs.github.io/markdown-up/#url=DynamicMarkdownExample.md).
109
-
110
-
111
- ### The MarkdownUp Include Library
112
-
113
- MarkdownUp provides some additional functionality that can be included at runtime. Consider the
114
- following example that uses the
115
- [unittest.bare](https://craigahobbs.github.io/markdown-up/library/include.html#var.vGroup='unittest.bare')
116
- system library:
117
-
118
- ~~~ barescript
119
- include <unittest.bare>
120
-
121
- function testSanity():
122
- unittestEqual(1 + 1, 2)
123
- endfunction
124
- unittestRunTest('testSanity')
125
-
126
- unittestReport()
127
- ~~~
128
-
129
- See the
130
- [MarkdownUp Include Library](https://craigahobbs.github.io/markdown-up/library/include.html)
131
- documentation for more information on the available include libraries.
61
+ With MarkdownUp, you can write client-rendered frontend applications and backend APIs using
62
+ [BareScript](https://craigahobbs.github.io/bare-script/language/).
63
+ These applications are called *MarkdownUp Applications*. You can learn more from the
64
+ [MarkdownUp backend application's README](https://craigahobbs.github.io/markdown-up-py/#markdownup-applications).
132
65
 
133
66
 
134
67
  ### Debug Mode
@@ -136,25 +69,9 @@ documentation for more information on the available include libraries.
136
69
  Debug mode logs the script runtime duration and runs the BareScript linter, which performs static
137
70
  code analysis on your code and reports warnings for any issues found.
138
71
 
139
- Debug mode also enables debug logging using the
140
- [systemLogDebug function](https://craigahobbs.github.io/bare-script/library/#var.vGroup='System'&systemlogdebug).
141
- For example:
142
-
143
- ~~~ barescript
144
- systemLogDebug('Hello debug')
145
- ~~~
146
-
147
72
  To turn on debug mode, click the debug button in the MarkdownUp menu in the upper-right of the page.
148
73
 
149
74
 
150
- ### Links
151
-
152
- - [MarkdownUp Application Examples](https://craigahobbs.github.io/#url=MarkdownUpApplications.md)
153
- - [The BareScript Language](https://craigahobbs.github.io/bare-script/language/)
154
- - [The MarkdownUp Library](https://craigahobbs.github.io/markdown-up/library/)
155
- - [The MarkdownUp Include Library](https://craigahobbs.github.io/markdown-up/library/include.html)
156
-
157
-
158
75
  ## The MarkdownUp Package
159
76
 
160
77
  The [markdown-up package](https://www.npmjs.com/package/markdown-up)
package/lib/lineChart.js CHANGED
@@ -268,6 +268,7 @@ export function lineChartElements(data, lineChart, options = null) {
268
268
  }
269
269
  }
270
270
  }
271
+ const linePointsReversed = linePoints.slice().reverse();
271
272
 
272
273
  // No data?
273
274
  if (xMin === null) {
@@ -585,7 +586,7 @@ export function lineChartElements(data, lineChart, options = null) {
585
586
  },
586
587
 
587
588
  // Lines
588
- linePoints.map(({color, points}) => ({
589
+ linePointsReversed.map(({color, points}) => ({
589
590
  'svg': 'path',
590
591
  'attr': {
591
592
  'stroke': color,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "markdown-up",
4
- "version": "3.6.2",
4
+ "version": "3.6.4",
5
5
  "description": "MarkdownUp is a Markdown viewer",
6
6
  "keywords": [
7
7
  "markdown",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "devDependencies": {
32
32
  "c8": "~10.1",
33
- "eslint": "~9.30",
33
+ "eslint": "~9.33",
34
34
  "jsdoc": "~4.0",
35
35
  "jsdom": "~26.1"
36
36
  }