@forsakringskassan/docs-generator 1.24.0 → 1.25.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/dist/generator.js CHANGED
@@ -81727,6 +81727,7 @@ function generateCode2(options) {
81727
81727
  <style>
81728
81728
  ${styleContent}
81729
81729
  </style>
81730
+ <!-- [html-validate-disable-next require-sri -- technical debt, should generate integrity but we don't know the hash of the compiled file yet] -->
81730
81731
  <script defer src="./${asset}"></script>
81731
81732
  `
81732
81733
  );
@@ -83380,8 +83381,10 @@ function searchProcessor() {
83380
83381
  const index = generateIndex(entries);
83381
83382
  const body = JSON.stringify(index);
83382
83383
  const fingerprint = getFingerprint(body);
83384
+ const integrity = getIntegrity(body);
83383
83385
  const outputName = `search-data-${fingerprint}.json`;
83384
83386
  context.setTemplateData("searchDataUrl", outputName);
83387
+ context.setTemplateData("searchDataIntegrity", integrity);
83385
83388
  context.addDocument({
83386
83389
  id: "search:data",
83387
83390
  name: "search-data",
package/dist/runtime.js CHANGED
@@ -12650,8 +12650,17 @@ var init_katex = __esm({
12650
12650
  return value2;
12651
12651
  };
12652
12652
  protocolFromUrl = function protocolFromUrl2(url2) {
12653
- var protocol = /^\s*([^\\/#]*?)(?::|&#0*58|&#x0*3a)/i.exec(url2);
12654
- return protocol != null ? protocol[1] : "_relative";
12653
+ var protocol = /^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(url2);
12654
+ if (!protocol) {
12655
+ return "_relative";
12656
+ }
12657
+ if (protocol[2] !== ":") {
12658
+ return null;
12659
+ }
12660
+ if (!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(protocol[1])) {
12661
+ return null;
12662
+ }
12663
+ return protocol[1].toLowerCase();
12655
12664
  };
12656
12665
  utils = {
12657
12666
  contains,
@@ -12834,7 +12843,11 @@ var init_katex = __esm({
12834
12843
  */
12835
12844
  isTrusted(context) {
12836
12845
  if (context.url && !context.protocol) {
12837
- context.protocol = utils.protocolFromUrl(context.url);
12846
+ var protocol = utils.protocolFromUrl(context.url);
12847
+ if (protocol == null) {
12848
+ return false;
12849
+ }
12850
+ context.protocol = protocol;
12838
12851
  }
12839
12852
  var trust = typeof this.trust === "function" ? this.trust(context) : this.trust;
12840
12853
  return Boolean(trust);
@@ -15926,7 +15939,7 @@ var init_katex = __esm({
15926
15939
  return node3;
15927
15940
  }
15928
15941
  toMarkup() {
15929
- var markup = "<img src='" + this.src + " 'alt='" + this.alt + "' ";
15942
+ var markup = '<img src="' + utils.escape(this.src) + '"' + (' alt="' + utils.escape(this.alt) + '"');
15930
15943
  var styles12 = "";
15931
15944
  for (var style in this.style) {
15932
15945
  if (this.style.hasOwnProperty(style)) {
@@ -16066,7 +16079,7 @@ var init_katex = __esm({
16066
16079
  var markup = '<svg xmlns="http://www.w3.org/2000/svg"';
16067
16080
  for (var attr in this.attributes) {
16068
16081
  if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
16069
- markup += " " + attr + "='" + this.attributes[attr] + "'";
16082
+ markup += " " + attr + '="' + utils.escape(this.attributes[attr]) + '"';
16070
16083
  }
16071
16084
  }
16072
16085
  markup += ">";
@@ -16096,9 +16109,9 @@ var init_katex = __esm({
16096
16109
  }
16097
16110
  toMarkup() {
16098
16111
  if (this.alternate) {
16099
- return "<path d='" + this.alternate + "'/>";
16112
+ return '<path d="' + utils.escape(this.alternate) + '"/>';
16100
16113
  } else {
16101
- return "<path d='" + path2[this.pathName] + "'/>";
16114
+ return '<path d="' + utils.escape(path2[this.pathName]) + '"/>';
16102
16115
  }
16103
16116
  }
16104
16117
  };
@@ -16121,7 +16134,7 @@ var init_katex = __esm({
16121
16134
  var markup = "<line";
16122
16135
  for (var attr in this.attributes) {
16123
16136
  if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
16124
- markup += " " + attr + "='" + this.attributes[attr] + "'";
16137
+ markup += " " + attr + '="' + utils.escape(this.attributes[attr]) + '"';
16125
16138
  }
16126
16139
  }
16127
16140
  markup += "/>";
@@ -24625,6 +24638,16 @@ var init_katex = __esm({
24625
24638
  }
24626
24639
  return args;
24627
24640
  }
24641
+ /**
24642
+ * Increment `expansionCount` by the specified amount.
24643
+ * Throw an error if it exceeds `maxExpand`.
24644
+ */
24645
+ countExpansion(amount) {
24646
+ this.expansionCount += amount;
24647
+ if (this.expansionCount > this.settings.maxExpand) {
24648
+ throw new ParseError("Too many expansions: infinite loop or need to increase maxExpand setting");
24649
+ }
24650
+ }
24628
24651
  /**
24629
24652
  * Expand the next token only once if possible.
24630
24653
  *
@@ -24655,10 +24678,7 @@ var init_katex = __esm({
24655
24678
  this.pushToken(topToken);
24656
24679
  return false;
24657
24680
  }
24658
- this.expansionCount++;
24659
- if (this.expansionCount > this.settings.maxExpand) {
24660
- throw new ParseError("Too many expansions: infinite loop or need to increase maxExpand setting");
24661
- }
24681
+ this.countExpansion(1);
24662
24682
  var tokens = expansion.tokens;
24663
24683
  var args = this.consumeArgs(expansion.numArgs, expansion.delimiters);
24664
24684
  if (expansion.numArgs) {
@@ -24734,6 +24754,7 @@ var init_katex = __esm({
24734
24754
  output.push(token2);
24735
24755
  }
24736
24756
  }
24757
+ this.countExpansion(output.length);
24737
24758
  return output;
24738
24759
  }
24739
24760
  /**
@@ -25583,8 +25604,9 @@ var init_katex = __esm({
25583
25604
  body: primes
25584
25605
  };
25585
25606
  } else if (uSubsAndSups[lex2.text]) {
25586
- var str2 = uSubsAndSups[lex2.text];
25587
25607
  var isSub = unicodeSubRegEx.test(lex2.text);
25608
+ var subsupTokens = [];
25609
+ subsupTokens.push(new Token(uSubsAndSups[lex2.text]));
25588
25610
  this.consume();
25589
25611
  while (true) {
25590
25612
  var token2 = this.fetch().text;
@@ -25594,10 +25616,10 @@ var init_katex = __esm({
25594
25616
  if (unicodeSubRegEx.test(token2) !== isSub) {
25595
25617
  break;
25596
25618
  }
25619
+ subsupTokens.unshift(new Token(uSubsAndSups[token2]));
25597
25620
  this.consume();
25598
- str2 += uSubsAndSups[token2];
25599
25621
  }
25600
- var body = new _Parser(str2, this.settings).parse();
25622
+ var body = this.subparse(subsupTokens);
25601
25623
  if (isSub) {
25602
25624
  subscript = {
25603
25625
  type: "ordgroup",
@@ -26174,7 +26196,7 @@ var init_katex = __esm({
26174
26196
  /**
26175
26197
  * Current KaTeX version
26176
26198
  */
26177
- version: "0.16.9",
26199
+ version: "0.16.10",
26178
26200
  /**
26179
26201
  * Renders the given LaTeX into an HTML+MathML combination, and adds
26180
26202
  * it as a child to the specified DOM node.
@@ -5,7 +5,7 @@ h3,
5
5
  h4,
6
6
  h5,
7
7
  h6 {
8
- font-weight: var(--f-font-weight-bold);
8
+ font-weight: var(--docs-font-weight);
9
9
  line-height: var(--f-line-height-medium);
10
10
  margin-top: 0;
11
11
  margin-bottom: 0.25rem;
@@ -416,18 +416,15 @@ p:not(.code-preview p) {
416
416
  main h1:not(.code-preview--default h1) {
417
417
  font-size: 2.5rem;
418
418
  color: #1b1e23;
419
- font-weight: var(--f-font-weight-medium);
420
419
  }
421
420
 
422
421
  main h2:not(.code-preview--default h2) {
423
422
  font-size: 1.5rem;
424
- font-weight: var(--f-font-weight-medium);
425
423
  margin-top: 3rem;
426
424
  }
427
425
 
428
426
  main h3:not(.code-preview--default h3) {
429
427
  font-size: 1.2rem;
430
- font-weight: var(--f-font-weight-medium);
431
428
  }
432
429
 
433
430
  main h4:not(.code-preview--default h4) {
@@ -5,7 +5,7 @@ h3,
5
5
  h4,
6
6
  h5,
7
7
  h6 {
8
- font-weight: var(--f-font-weight-bold);
8
+ font-weight: var(--docs-font-weight);
9
9
  line-height: var(--f-line-height-medium);
10
10
  margin-top: 0;
11
11
  margin-bottom: 0.25rem;
@@ -416,18 +416,15 @@ p:not(.code-preview p) {
416
416
  main h1:not(.code-preview--default h1) {
417
417
  font-size: 2.5rem;
418
418
  color: #1b1e23;
419
- font-weight: var(--f-font-weight-medium);
420
419
  }
421
420
 
422
421
  main h2:not(.code-preview--default h2) {
423
422
  font-size: 1.5rem;
424
- font-weight: var(--f-font-weight-medium);
425
423
  margin-top: 3rem;
426
424
  }
427
425
 
428
426
  main h3:not(.code-preview--default h3) {
429
427
  font-size: 1.2rem;
430
- font-weight: var(--f-font-weight-medium);
431
428
  }
432
429
 
433
430
  main h4:not(.code-preview--default h4) {
@@ -900,7 +897,8 @@ textarea {
900
897
  }
901
898
 
902
899
  html {
903
- --docs-font-family: -apple-system, blinkmacsystemfont, "Segoe UI", roboto, "Helvetica Neue", ubuntu, arial, sans-serif;
900
+ --docs-font-family: arial, "Helvetica Neue", sans-serif;
901
+ --docs-font-weight: normal;
904
902
  --docs-menu-width-expanded: 230px;
905
903
  scroll-behavior: smooth;
906
904
  }
@@ -908,7 +906,7 @@ html {
908
906
  html,
909
907
  body {
910
908
  font-family: var(--docs-font-family);
911
- font-weight: normal;
909
+ font-weight: var(--docs-font-weight);
912
910
  font-size: var(--f-font-size-default-rem);
913
911
  min-width: 400px;
914
912
  }
@@ -922,6 +920,6 @@ body {
922
920
  body {
923
921
  color: var(--f-text-color-default);
924
922
  font-size: var(--f-font-size-standard);
925
- font-weight: var(--f-font-weight-normal);
923
+ font-weight: var(--docs-font-weight);
926
924
  line-height: var(--f-line-height-large);
927
925
  }
@@ -59,7 +59,8 @@ textarea {
59
59
  }
60
60
 
61
61
  html {
62
- --docs-font-family: -apple-system, blinkmacsystemfont, "Segoe UI", roboto, "Helvetica Neue", ubuntu, arial, sans-serif;
62
+ --docs-font-family: arial, "Helvetica Neue", sans-serif;
63
+ --docs-font-weight: normal;
63
64
  --docs-menu-width-expanded: 230px;
64
65
  scroll-behavior: smooth;
65
66
  }
@@ -67,7 +68,7 @@ html {
67
68
  html,
68
69
  body {
69
70
  font-family: var(--docs-font-family);
70
- font-weight: normal;
71
+ font-weight: var(--docs-font-weight);
71
72
  font-size: var(--f-font-size-default-rem);
72
73
  min-width: 400px;
73
74
  }
@@ -81,6 +82,6 @@ body {
81
82
  body {
82
83
  color: var(--f-text-color-default);
83
84
  font-size: var(--f-font-size-standard);
84
- font-weight: var(--f-font-weight-normal);
85
+ font-weight: var(--docs-font-weight);
85
86
  line-height: var(--f-line-height-large);
86
87
  }
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.43.0"
8
+ "packageVersion": "7.43.1"
9
9
  }
10
10
  ]
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forsakringskassan/docs-generator",
3
- "version": "1.24.0",
3
+ "version": "1.25.1",
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": "2.2.0",
56
+ "piscina": "4.4.0",
57
57
  "vue-docgen-api": "4.78.0"
58
58
  },
59
59
  "peerDependencies": {
@@ -34,7 +34,14 @@
34
34
  <!-- prettier-ignore -->
35
35
  {% container "head" %}
36
36
 
37
- <link rel="preload" href="{{ searchDataUrl | relative(doc) }}" as="fetch" crossorigin id="search-data" />
37
+ <link
38
+ rel="preload"
39
+ href="{{ searchDataUrl | relative(doc) }}"
40
+ as="fetch"
41
+ crossorigin
42
+ integrity="{{ searchDataIntegrity }}"
43
+ id="search-data"
44
+ />
38
45
  </head>
39
46
  <body>
40
47
  <!-- prettier-ignore -->
@@ -53,7 +60,11 @@
53
60
 
54
61
  <!-- prettier-ignore -->
55
62
  {%- for asset in vendors %}
56
- <script src="{{ asset.publicPath | relative(doc) }}"></script>
63
+ <script
64
+ src="{{ asset.publicPath | relative(doc) }}"
65
+ crossorigin
66
+ integrity="{{ asset.integrity }}"
67
+ ></script>
57
68
  {%- endfor %}
58
69
 
59
70
  <!-- prettier-ignore -->