@forsakringskassan/docs-generator 1.30.2 → 1.30.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.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var vendor = require('./vendor-xbC24N4h.js');
|
|
4
4
|
var path = require('node:path/posix');
|
|
5
|
-
require('node:path');
|
|
5
|
+
var path$1 = require('node:path');
|
|
6
6
|
require('crypto');
|
|
7
7
|
var crypto = require('node:crypto');
|
|
8
8
|
|
|
@@ -243,6 +243,13 @@ function getClassModifier(tags) {
|
|
|
243
243
|
}
|
|
244
244
|
return "code-preview--default";
|
|
245
245
|
}
|
|
246
|
+
function getStandalonePath(output) {
|
|
247
|
+
if (!output) {
|
|
248
|
+
return null;
|
|
249
|
+
}
|
|
250
|
+
const { dir, name } = path$1.parse(output);
|
|
251
|
+
return path$1.join(dir, `${name}.html`);
|
|
252
|
+
}
|
|
246
253
|
function codePreview(options) {
|
|
247
254
|
const { generateExample } = options;
|
|
248
255
|
return (md) => {
|
|
@@ -276,7 +283,8 @@ function codePreview(options) {
|
|
|
276
283
|
const noMarkup = tags.includes("nomarkup");
|
|
277
284
|
const fullscreen = tags.includes("fullscreen");
|
|
278
285
|
const modifier = getClassModifier(tags);
|
|
279
|
-
const
|
|
286
|
+
const standalonePath = getStandalonePath(example.output);
|
|
287
|
+
const showFullscreen = Boolean(standalonePath) && fullscreen;
|
|
280
288
|
const testIdAttr = testId ? `data-test="${testId}"` : "";
|
|
281
289
|
const filteredTags = tags.filter((it) => {
|
|
282
290
|
if (it.startsWith("test-id=")) {
|
|
@@ -349,10 +357,10 @@ function codePreview(options) {
|
|
|
349
357
|
</button>
|
|
350
358
|
`
|
|
351
359
|
);
|
|
352
|
-
const toggleFullscreen =
|
|
360
|
+
const toggleFullscreen = showFullscreen ? (
|
|
353
361
|
/* HTML */
|
|
354
362
|
`
|
|
355
|
-
<a href="${
|
|
363
|
+
<a href="${standalonePath}" class="code-preview__fullscreen">
|
|
356
364
|
<i class="icon icon--fullscreen"></i>
|
|
357
365
|
Helsk\xE4rm
|
|
358
366
|
</a>
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var fs = require('node:fs/promises');
|
|
4
4
|
var path = require('node:path');
|
|
5
5
|
var vendor = require('./vendor-xbC24N4h.js');
|
|
6
|
-
var createMarkdownRenderer = require('./create-markdown-renderer-
|
|
6
|
+
var createMarkdownRenderer = require('./create-markdown-renderer-BqpKJRXy.js');
|
|
7
7
|
var require$$1 = require('crypto');
|
|
8
8
|
require('node:crypto');
|
|
9
9
|
var vueDocgenApi = require('vue-docgen-api');
|
package/dist/markdown.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forsakringskassan/docs-generator",
|
|
3
|
-
"version": "1.30.
|
|
3
|
+
"version": "1.30.4",
|
|
4
4
|
"description": "Documentation generator",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"documentation"
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"livereload-js": "4.0.2",
|
|
55
55
|
"nunjucks": "3.2.4",
|
|
56
|
-
"piscina": "4.
|
|
56
|
+
"piscina": "4.6.0",
|
|
57
57
|
"vue-docgen-api": "4.78.0"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|