@forsakringskassan/docs-generator 2.18.0 → 2.19.0

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.
@@ -1,4 +1,7 @@
1
- declare interface Component {
1
+ /**
2
+ * @public
3
+ */
4
+ export declare interface ComponentAttribute {
2
5
  /** component name */
3
6
  name: string;
4
7
  /** optional hint (glob pattern) how to find the component */
@@ -13,25 +16,7 @@ export declare function createMarkdownRenderer(options: MarkdownOptions): Markdo
13
16
  /**
14
17
  * @public
15
18
  */
16
- declare interface Document_2 {
17
- /** unique identifier for this document */
18
- id: string;
19
- /** human-readable pseudo-identifier for this document (consider it unique but there is no contraint enforcing this) */
20
- name: string;
21
- /** alternative names this document can be referenced by */
22
- alias: string[];
23
- /** true if document should be visible in menu and similar sources */
24
- visible: boolean;
25
- attributes: NormalizedDocumentAttributes;
26
- body: string;
27
- /** Document outline (i.e. the heading structure) */
28
- outline: DocumentOutline;
29
- /** format of body */
30
- format: "markdown" | "html" | "json" | "redirect";
31
- tags: string[];
32
- template: string;
33
- fileInfo: FileInfo;
34
- }
19
+ declare type Document_2 = DocumentPage | DocumentPartial;
35
20
  export { Document_2 as Document }
36
21
 
37
22
  /**
@@ -62,6 +47,59 @@ export declare interface DocumentOutlineEntry {
62
47
  subheadings: DocumentOutline;
63
48
  }
64
49
 
50
+ /**
51
+ * @public
52
+ */
53
+ export declare interface DocumentPage {
54
+ /** discriminator */
55
+ kind: "page";
56
+ /** unique identifier for this document */
57
+ id: string;
58
+ /** human-readable pseudo-identifier for this document (consider it unique but there is no contraint enforcing this) */
59
+ name: string;
60
+ /** alternative names this document can be referenced by */
61
+ alias: string[];
62
+ /** true if document should be visible in menu and similar sources */
63
+ visible: boolean;
64
+ attributes: NormalizedDocumentAttributes;
65
+ /** content of this document */
66
+ body: string;
67
+ /** Document outline (i.e. the heading structure) */
68
+ outline: DocumentOutline;
69
+ /** format of body */
70
+ format: "markdown" | "html" | "json" | "redirect";
71
+ tags: string[];
72
+ template: string;
73
+ fileInfo: FileInfo;
74
+ }
75
+
76
+ /**
77
+ * A partial document for inclusion in other documents.
78
+ *
79
+ * A partial document will never have an output file and only a limited number
80
+ * of parameters.
81
+ *
82
+ * @public
83
+ */
84
+ export declare interface DocumentPartial {
85
+ /** discriminator */
86
+ kind: "partial";
87
+ /** unique identifier for this document */
88
+ id: string;
89
+ /** human-readable pseudo-identifier for this document (consider it unique but there is no contraint enforcing this) */
90
+ name: string;
91
+ /** alternative names this document can be referenced by */
92
+ alias: string[];
93
+ /** content of this document */
94
+ body: string | ((tags: string[]) => string);
95
+ /** format of body */
96
+ format: "markdown" | "html" | "json";
97
+ fileInfo: {
98
+ /** original source of this document, if available */
99
+ fullPath: string | undefined;
100
+ };
101
+ }
102
+
65
103
  /**
66
104
  * Represents an example needing compilation.
67
105
  *
@@ -205,7 +243,7 @@ export declare interface MarkdownRenderer {
205
243
  * @param content - Markdown content to render.
206
244
  * @returns HTML rendered from markdown content.
207
245
  */
208
- render(doc: Document_2, content: string): string;
246
+ render(doc: DocumentPage, content: string): string;
209
247
  }
210
248
 
211
249
  /**
@@ -217,7 +255,7 @@ export declare interface NormalizedDocumentAttributes {
217
255
  layout?: string;
218
256
  status?: string;
219
257
  badge?: DocumentBadge;
220
- component?: Component[];
258
+ component?: ComponentAttribute[];
221
259
  href?: string;
222
260
  /** normalized sortorder (defaults to Infinity) */
223
261
  sortorder: number;
@@ -250,6 +288,11 @@ export declare interface SoftErrorDetails {
250
288
  title: string;
251
289
  };
252
290
  ELINKFORMAT: undefined;
291
+ ELINKPARTIAL: {
292
+ key: string;
293
+ hash: string;
294
+ title: string;
295
+ };
253
296
  EINCLUDETARGET: {
254
297
  id: string;
255
298
  };
package/dist/markdown.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var createMarkdownRenderer = require('./create-markdown-renderer-CaJTFjAd.js');
4
- require('./vendor-Bagon7WF.js');
3
+ var createMarkdownRenderer = require('./create-markdown-renderer-CbE5KJoX.js');
4
+ require('./vendor-BHA4LIog.js');
5
5
  require('node:url');
6
6
  require('node:path');
7
7
  require('fs');
@@ -37,9 +37,10 @@ require('querystring');
37
37
  require('node:path/posix');
38
38
  require('node:crypto');
39
39
  require('vue');
40
- require('./vue3-CEAR7ggN.js');
40
+ require('./vue3-BhdC7RZQ.js');
41
41
 
42
42
 
43
43
 
44
44
  exports.SoftError = createMarkdownRenderer.SoftError;
45
45
  exports.createMarkdownRenderer = createMarkdownRenderer.createMarkdownRenderer;
46
+ //# sourceMappingURL=markdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -78,6 +78,7 @@ var require_re = __commonJS({
78
78
  var re = exports.re = [];
79
79
  var safeRe = exports.safeRe = [];
80
80
  var src = exports.src = [];
81
+ var safeSrc = exports.safeSrc = [];
81
82
  var t = exports.t = {};
82
83
  var R = 0;
83
84
  var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
@@ -98,6 +99,7 @@ var require_re = __commonJS({
98
99
  debug(name, index, value);
99
100
  t[name] = index;
100
101
  src[index] = value;
102
+ safeSrc[index] = safe;
101
103
  re[index] = new RegExp(value, isGlobal ? "g" : void 0);
102
104
  safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
103
105
  };
@@ -194,7 +196,7 @@ var require_semver = __commonJS({
194
196
  "node_modules/semver/classes/semver.js"(exports, module2) {
195
197
  var debug = require_debug();
196
198
  var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
197
- var { safeRe: re, t } = require_re();
199
+ var { safeRe: re, safeSrc: src, t } = require_re();
198
200
  var parseOptions = require_parse_options();
199
201
  var { compareIdentifiers } = require_identifiers();
200
202
  var SemVer = class _SemVer {
@@ -339,7 +341,8 @@ var require_semver = __commonJS({
339
341
  throw new Error("invalid increment argument: identifier is empty");
340
342
  }
341
343
  if (identifier) {
342
- const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
344
+ const r = new RegExp(`^${this.options.loose ? src[t.PRERELEASELOOSE] : src[t.PRERELEASE]}$`);
345
+ const match = `-${identifier}`.match(r);
343
346
  if (!match || match[1] !== identifier) {
344
347
  throw new Error(`invalid identifier: ${identifier}`);
345
348
  }
@@ -663,7 +663,7 @@ const decodeMap = new Map([
663
663
  */
664
664
  const fromCodePoint$1 =
665
665
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins
666
- (_a = String.fromCodePoint) !== null && _a !== undefined ? _a : function (codePoint) {
666
+ (_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : function (codePoint) {
667
667
  let output = "";
668
668
  if (codePoint > 0xffff) {
669
669
  codePoint -= 0x10000;
@@ -683,7 +683,7 @@ function replaceCodePoint(codePoint) {
683
683
  if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) {
684
684
  return 0xfffd;
685
685
  }
686
- return (_a = decodeMap.get(codePoint)) !== null && _a !== undefined ? _a : codePoint;
686
+ return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint;
687
687
  }
688
688
 
689
689
  var CharCodes;
@@ -927,7 +927,7 @@ class EntityDecoder {
927
927
  var _a;
928
928
  // Ensure we consumed at least one digit.
929
929
  if (this.consumed <= expectedLength) {
930
- (_a = this.errors) === null || _a === undefined ? undefined : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
930
+ (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
931
931
  return 0;
932
932
  }
933
933
  // Figure out if this is a legit end of the entity
@@ -1002,7 +1002,7 @@ class EntityDecoder {
1002
1002
  const { result, decodeTree } = this;
1003
1003
  const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;
1004
1004
  this.emitNamedEntityData(result, valueLength, this.consumed);
1005
- (_a = this.errors) === null || _a === undefined ? undefined : _a.missingSemicolonAfterCharacterReference();
1005
+ (_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference();
1006
1006
  return this.consumed;
1007
1007
  }
1008
1008
  /**
@@ -1051,7 +1051,7 @@ class EntityDecoder {
1051
1051
  return this.emitNumericEntity(0, 3);
1052
1052
  }
1053
1053
  case EntityDecoderState.NumericStart: {
1054
- (_a = this.errors) === null || _a === undefined ? undefined : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
1054
+ (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
1055
1055
  return 0;
1056
1056
  }
1057
1057
  case EntityDecoderState.EntityStart: {
@@ -25544,7 +25544,7 @@ Diff.prototype = {
25544
25544
  if (options.maxEditLength != null) {
25545
25545
  maxEditLength = Math.min(maxEditLength, options.maxEditLength);
25546
25546
  }
25547
- var maxExecutionTime = (_options$timeout = options.timeout) !== null && _options$timeout !== undefined ? _options$timeout : Infinity;
25547
+ var maxExecutionTime = (_options$timeout = options.timeout) !== null && _options$timeout !== void 0 ? _options$timeout : Infinity;
25548
25548
  var abortAfterTimestamp = Date.now() + maxExecutionTime;
25549
25549
  var bestPath = [{
25550
25550
  oldPos: -1,
@@ -25581,7 +25581,7 @@ Diff.prototype = {
25581
25581
  // Main worker method. checks all permutations of a given edit length for acceptance.
25582
25582
  function execEditLength() {
25583
25583
  for (var diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) {
25584
- var basePath = undefined;
25584
+ var basePath = void 0;
25585
25585
  var removePath = bestPath[diagonalPath - 1],
25586
25586
  addPath = bestPath[diagonalPath + 1];
25587
25587
  if (removePath) {
@@ -26212,7 +26212,7 @@ function _objectSpread2(e) {
26212
26212
  function _toPrimitive(t, r) {
26213
26213
  if ("object" != typeof t || !t) return t;
26214
26214
  var e = t[Symbol.toPrimitive];
26215
- if (undefined !== e) {
26215
+ if (void 0 !== e) {
26216
26216
  var i = e.call(t, r);
26217
26217
  if ("object" != typeof i) return i;
26218
26218
  throw new TypeError("@@toPrimitive must return a primitive value.");
@@ -26280,7 +26280,7 @@ jsonDiff.tokenize = lineDiff.tokenize;
26280
26280
  jsonDiff.castInput = function (value, options) {
26281
26281
  var undefinedReplacement = options.undefinedReplacement,
26282
26282
  _options$stringifyRep = options.stringifyReplacer,
26283
- stringifyReplacer = _options$stringifyRep === undefined ? function (k, v) {
26283
+ stringifyReplacer = _options$stringifyRep === void 0 ? function (k, v) {
26284
26284
  return typeof v === 'undefined' ? undefinedReplacement : v;
26285
26285
  } : _options$stringifyRep;
26286
26286
  return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' ');
@@ -26520,7 +26520,7 @@ function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader
26520
26520
  callback: options
26521
26521
  };
26522
26522
  }
26523
- if (!((_options2 = options) !== null && _options2 !== undefined && _options2.callback)) {
26523
+ if (!((_options2 = options) !== null && _options2 !== void 0 && _options2.callback)) {
26524
26524
  var patchObj = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options);
26525
26525
  if (!patchObj) {
26526
26526
  return;
@@ -45766,15 +45766,15 @@ function requireRing_buffer () {
45766
45766
  };
45767
45767
 
45768
45768
  RingBuffer.prototype.peek = function() {
45769
- if (this.length === 0) return undefined;
45769
+ if (this.length === 0) return void 0;
45770
45770
  return this._buffer[this._head];
45771
45771
  };
45772
45772
 
45773
45773
  RingBuffer.prototype.shift = function() {
45774
- if (this.length === 0) return undefined;
45774
+ if (this.length === 0) return void 0;
45775
45775
 
45776
45776
  var value = this._buffer[this._head];
45777
- this._buffer[this._head] = undefined;
45777
+ this._buffer[this._head] = void 0;
45778
45778
  this.length -= 1;
45779
45779
  this._ringOffset -= 1;
45780
45780
 
@@ -50830,7 +50830,7 @@ function requireGetIntrinsic () {
50830
50830
  if (!allowMissing) {
50831
50831
  throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
50832
50832
  }
50833
- return undefined;
50833
+ return void 0;
50834
50834
  }
50835
50835
  if ($gOPD && (i + 1) >= parts.length) {
50836
50836
  var desc = $gOPD(value, part);
@@ -52203,7 +52203,7 @@ function requireStringify () {
52203
52203
  var tmpSc = sideChannel;
52204
52204
  var step = 0;
52205
52205
  var findFlag = false;
52206
- while ((tmpSc = tmpSc.get(sentinel)) !== undefined && !findFlag) {
52206
+ while ((tmpSc = tmpSc.get(sentinel)) !== void 0 && !findFlag) {
52207
52207
  // Where object last appeared in the ref tree
52208
52208
  var pos = tmpSc.get(object);
52209
52209
  step += 1;
@@ -52260,7 +52260,7 @@ function requireStringify () {
52260
52260
  if (encodeValuesOnly && encoder) {
52261
52261
  obj = utils.maybeMap(obj, encoder);
52262
52262
  }
52263
- objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : undefined }];
52263
+ objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void 0 }];
52264
52264
  } else if (isArray(filter)) {
52265
52265
  objKeys = filter;
52266
52266
  } else {
@@ -53177,7 +53177,7 @@ function requireServer () {
53177
53177
  }, {
53178
53178
  key: 'param',
53179
53179
  value: function param(name, req) {
53180
- var param = undefined;
53180
+ var param = void 0;
53181
53181
  if (req.body && req.body[name]) param = req.body[name];else if (req.params && req.params[name]) param = req.params[name];else if (req.query && req.query[name]) param = req.query[name];
53182
53182
 
53183
53183
  // normalize files array
@@ -53287,3 +53287,4 @@ exports.minimatch = minimatch;
53287
53287
  exports.spawn = spawn;
53288
53288
  exports.tinylr = tinylr;
53289
53289
  exports.watch = watch$1;
53290
+ //# sourceMappingURL=vendor-BHA4LIog.js.map