@forsakringskassan/docs-generator 3.20.1 → 3.21.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/{create-markdown-renderer-Bm-yRJ38.mjs → create-markdown-renderer-CX0kOizk.mjs} +3 -3
- package/dist/{create-markdown-renderer-Bm-yRJ38.mjs.map → create-markdown-renderer-CX0kOizk.mjs.map} +1 -1
- package/dist/{format-code.worker-NI_KIDrb.mjs → format-code.worker-BsMUHGd2.mjs} +2 -2
- package/dist/{format-code.worker-NI_KIDrb.mjs.map → format-code.worker-BsMUHGd2.mjs.map} +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/dist/markdown.mjs +2 -2
- package/dist/processors/search.mjs +41 -10
- package/dist/style/core.css +1 -0
- package/dist/style/index.css +19 -1
- package/dist/style/site.css +18 -1
- package/dist/{vendor-GtJZoX7J.mjs → vendor-DBujHFR5.mjs} +9 -5
- package/dist/{vendor-GtJZoX7J.mjs.map → vendor-DBujHFR5.mjs.map} +1 -1
- package/package.json +1 -1
package/dist/markdown.mjs
CHANGED
|
@@ -2,8 +2,8 @@ import { createRequire as $createRequire } from "node:module";
|
|
|
2
2
|
|
|
3
3
|
const require = $createRequire(import.meta.url);
|
|
4
4
|
|
|
5
|
-
export { S as SoftError, c as createMarkdownRenderer } from './create-markdown-renderer-
|
|
6
|
-
import './vendor-
|
|
5
|
+
export { S as SoftError, c as createMarkdownRenderer } from './create-markdown-renderer-CX0kOizk.mjs';
|
|
6
|
+
import './vendor-DBujHFR5.mjs';
|
|
7
7
|
import 'node:url';
|
|
8
8
|
import 'node:path';
|
|
9
9
|
import 'fs';
|
|
@@ -797,6 +797,18 @@ function e2(e3, r2) {
|
|
|
797
797
|
}
|
|
798
798
|
|
|
799
799
|
// src/runtime/search.ts
|
|
800
|
+
function removeIsTouch() {
|
|
801
|
+
const searchForm = document.querySelector("#search-form");
|
|
802
|
+
if (searchForm) {
|
|
803
|
+
searchForm.classList.remove("is-touch");
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
function setIsTouch() {
|
|
807
|
+
const searchForm = document.querySelector("#search-form");
|
|
808
|
+
if (searchForm) {
|
|
809
|
+
searchForm.classList.add("is-touch");
|
|
810
|
+
}
|
|
811
|
+
}
|
|
800
812
|
function isMoreSpecific(a, b) {
|
|
801
813
|
if (b === null) {
|
|
802
814
|
return true;
|
|
@@ -920,9 +932,11 @@ function setup() {
|
|
|
920
932
|
function clickOutside(event) {
|
|
921
933
|
const rect = dialog.getBoundingClientRect();
|
|
922
934
|
const point = { x: event.clientX, y: event.clientY };
|
|
923
|
-
if (isOutside(rect, point)) {
|
|
924
|
-
|
|
935
|
+
if (!isOutside(rect, point)) {
|
|
936
|
+
return;
|
|
925
937
|
}
|
|
938
|
+
dialog.close();
|
|
939
|
+
removeIsTouch();
|
|
926
940
|
}
|
|
927
941
|
queueMicrotask(async () => {
|
|
928
942
|
try {
|
|
@@ -938,9 +952,11 @@ function setup() {
|
|
|
938
952
|
dialog.addEventListener("close", () => {
|
|
939
953
|
document.body.removeEventListener("click", clickOutside);
|
|
940
954
|
document.body.classList.remove("docs-modal-active");
|
|
955
|
+
removeIsTouch();
|
|
941
956
|
});
|
|
942
957
|
dialogCloseButton.addEventListener("click", () => {
|
|
943
958
|
dialog.close();
|
|
959
|
+
removeIsTouch();
|
|
944
960
|
});
|
|
945
961
|
input.addEventListener("input", () => {
|
|
946
962
|
searchTerm = input.value.toLowerCase();
|
|
@@ -980,6 +996,7 @@ function setup() {
|
|
|
980
996
|
if (!(event.ctrlKey && event.key === "k")) {
|
|
981
997
|
return;
|
|
982
998
|
}
|
|
999
|
+
removeIsTouch();
|
|
983
1000
|
event.preventDefault();
|
|
984
1001
|
input.value = searchTerm = "";
|
|
985
1002
|
updateResults();
|
|
@@ -994,15 +1011,29 @@ function setup() {
|
|
|
994
1011
|
return;
|
|
995
1012
|
function initButton() {
|
|
996
1013
|
const button = document.querySelector("#docs-search");
|
|
997
|
-
if (button) {
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
document.body.classList.add("docs-modal-active");
|
|
1004
|
-
});
|
|
1014
|
+
if (!button) {
|
|
1015
|
+
return;
|
|
1016
|
+
}
|
|
1017
|
+
const searchForm = document.querySelector("#search-form");
|
|
1018
|
+
if (searchForm) {
|
|
1019
|
+
removeIsTouch();
|
|
1005
1020
|
}
|
|
1021
|
+
button.addEventListener("submit", (event) => {
|
|
1022
|
+
event.preventDefault();
|
|
1023
|
+
input.value = searchTerm = "";
|
|
1024
|
+
dialog.showModal();
|
|
1025
|
+
document.body.addEventListener("click", clickOutside);
|
|
1026
|
+
document.body.classList.add("docs-modal-active");
|
|
1027
|
+
});
|
|
1028
|
+
button.addEventListener(
|
|
1029
|
+
"touchstart",
|
|
1030
|
+
() => {
|
|
1031
|
+
if (searchForm) {
|
|
1032
|
+
setIsTouch();
|
|
1033
|
+
}
|
|
1034
|
+
},
|
|
1035
|
+
{ passive: true }
|
|
1036
|
+
);
|
|
1006
1037
|
}
|
|
1007
1038
|
}
|
|
1008
1039
|
setup();
|
package/dist/style/core.css
CHANGED
package/dist/style/index.css
CHANGED
|
@@ -466,6 +466,7 @@ main {
|
|
|
466
466
|
#docs-title {
|
|
467
467
|
grid-area: title;
|
|
468
468
|
margin-top: 1.2rem;
|
|
469
|
+
margin-bottom: var(--docs-heading-margin-bottom-h1);
|
|
469
470
|
}
|
|
470
471
|
|
|
471
472
|
#docs-content {
|
|
@@ -1553,6 +1554,9 @@ textarea {
|
|
|
1553
1554
|
.docs-modal__close .icon {
|
|
1554
1555
|
min-width: 1rem;
|
|
1555
1556
|
}
|
|
1557
|
+
.docs-modal__body.is-touch p {
|
|
1558
|
+
display: none;
|
|
1559
|
+
}
|
|
1556
1560
|
.docs-modal::backdrop {
|
|
1557
1561
|
background: rgba(0, 0, 0, 0.75);
|
|
1558
1562
|
backdrop-filter: blur(5px);
|
|
@@ -1617,10 +1621,17 @@ kbd {
|
|
|
1617
1621
|
#search-dialog {
|
|
1618
1622
|
--docs-text-color-default: var(--docs-search-text-color);
|
|
1619
1623
|
margin-top: 80px;
|
|
1624
|
+
width: 580px;
|
|
1620
1625
|
background: var(--docs-search-background-color);
|
|
1621
1626
|
border: 1px solid var(--docs-search-border-color);
|
|
1622
1627
|
color: var(--docs-text-color-default);
|
|
1623
|
-
|
|
1628
|
+
}
|
|
1629
|
+
@media (width < 640px) {
|
|
1630
|
+
#search-dialog {
|
|
1631
|
+
width: auto;
|
|
1632
|
+
margin-left: 1rem;
|
|
1633
|
+
margin-right: 1rem;
|
|
1634
|
+
}
|
|
1624
1635
|
}
|
|
1625
1636
|
|
|
1626
1637
|
.docs-search-dialog__input {
|
|
@@ -1633,6 +1644,9 @@ kbd {
|
|
|
1633
1644
|
width: 100%;
|
|
1634
1645
|
margin: 0 0 1.5rem;
|
|
1635
1646
|
}
|
|
1647
|
+
.docs-modal__body.is-touch .docs-search-dialog__input {
|
|
1648
|
+
margin: 0;
|
|
1649
|
+
}
|
|
1636
1650
|
.docs-search-dialog__input:focus {
|
|
1637
1651
|
border-radius: 0;
|
|
1638
1652
|
box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #1b1e23, 0 0 0 6px #ffffff;
|
|
@@ -1651,6 +1665,10 @@ kbd {
|
|
|
1651
1665
|
margin: 0.5rem 0 1.5rem;
|
|
1652
1666
|
padding: 0.2rem;
|
|
1653
1667
|
}
|
|
1668
|
+
.docs-modal__body.is-touch .docs-search-result__list:empty {
|
|
1669
|
+
margin: 0.5rem 0;
|
|
1670
|
+
padding: 0;
|
|
1671
|
+
}
|
|
1654
1672
|
.docs-search-result__item {
|
|
1655
1673
|
display: flex;
|
|
1656
1674
|
border: 2px solid #8d8e91;
|
package/dist/style/site.css
CHANGED
|
@@ -401,6 +401,9 @@ textarea {
|
|
|
401
401
|
.docs-modal__close .icon {
|
|
402
402
|
min-width: 1rem;
|
|
403
403
|
}
|
|
404
|
+
.docs-modal__body.is-touch p {
|
|
405
|
+
display: none;
|
|
406
|
+
}
|
|
404
407
|
.docs-modal::backdrop {
|
|
405
408
|
background: rgba(0, 0, 0, 0.75);
|
|
406
409
|
backdrop-filter: blur(5px);
|
|
@@ -465,10 +468,17 @@ kbd {
|
|
|
465
468
|
#search-dialog {
|
|
466
469
|
--docs-text-color-default: var(--docs-search-text-color);
|
|
467
470
|
margin-top: 80px;
|
|
471
|
+
width: 580px;
|
|
468
472
|
background: var(--docs-search-background-color);
|
|
469
473
|
border: 1px solid var(--docs-search-border-color);
|
|
470
474
|
color: var(--docs-text-color-default);
|
|
471
|
-
|
|
475
|
+
}
|
|
476
|
+
@media (width < 640px) {
|
|
477
|
+
#search-dialog {
|
|
478
|
+
width: auto;
|
|
479
|
+
margin-left: 1rem;
|
|
480
|
+
margin-right: 1rem;
|
|
481
|
+
}
|
|
472
482
|
}
|
|
473
483
|
|
|
474
484
|
.docs-search-dialog__input {
|
|
@@ -481,6 +491,9 @@ kbd {
|
|
|
481
491
|
width: 100%;
|
|
482
492
|
margin: 0 0 1.5rem;
|
|
483
493
|
}
|
|
494
|
+
.docs-modal__body.is-touch .docs-search-dialog__input {
|
|
495
|
+
margin: 0;
|
|
496
|
+
}
|
|
484
497
|
.docs-search-dialog__input:focus {
|
|
485
498
|
border-radius: 0;
|
|
486
499
|
box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #1b1e23, 0 0 0 6px #ffffff;
|
|
@@ -499,6 +512,10 @@ kbd {
|
|
|
499
512
|
margin: 0.5rem 0 1.5rem;
|
|
500
513
|
padding: 0.2rem;
|
|
501
514
|
}
|
|
515
|
+
.docs-modal__body.is-touch .docs-search-result__list:empty {
|
|
516
|
+
margin: 0.5rem 0;
|
|
517
|
+
padding: 0;
|
|
518
|
+
}
|
|
502
519
|
.docs-search-result__item {
|
|
503
520
|
display: flex;
|
|
504
521
|
border: 2px solid #8d8e91;
|
|
@@ -16540,7 +16540,7 @@ class Interpolator {
|
|
|
16540
16540
|
};
|
|
16541
16541
|
this.regexp = getOrResetRegExp(this.regexp, `${this.prefix}(.+?)${this.suffix}`);
|
|
16542
16542
|
this.regexpUnescape = getOrResetRegExp(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`);
|
|
16543
|
-
this.nestingRegexp = getOrResetRegExp(this.nestingRegexp, `${this.nestingPrefix}((?:[^()"']
|
|
16543
|
+
this.nestingRegexp = getOrResetRegExp(this.nestingRegexp, `${this.nestingPrefix}((?:[^()"']|"[^"]*"|'[^']*'|\\((?:[^()"']|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`);
|
|
16544
16544
|
}
|
|
16545
16545
|
interpolate(str, data, lng, options) {
|
|
16546
16546
|
let match;
|
|
@@ -16644,7 +16644,10 @@ class Interpolator {
|
|
|
16644
16644
|
if (clonedOptions.defaultValue && clonedOptions.defaultValue.includes(this.prefix)) delete clonedOptions.defaultValue;
|
|
16645
16645
|
return key;
|
|
16646
16646
|
};
|
|
16647
|
-
|
|
16647
|
+
const nestingRegexp = new RegExp(this.nestingRegexp);
|
|
16648
|
+
let out = '';
|
|
16649
|
+
let lastEnd = 0;
|
|
16650
|
+
while (match = nestingRegexp.exec(str)) {
|
|
16648
16651
|
let formatters = [];
|
|
16649
16652
|
clonedOptions = {
|
|
16650
16653
|
...options
|
|
@@ -16670,10 +16673,11 @@ class Interpolator {
|
|
|
16670
16673
|
interpolationkey: match[1].trim()
|
|
16671
16674
|
}), value.trim());
|
|
16672
16675
|
}
|
|
16673
|
-
|
|
16676
|
+
out += str.slice(lastEnd, match.index) + makeString$1(value);
|
|
16677
|
+
lastEnd = nestingRegexp.lastIndex;
|
|
16674
16678
|
this.regexp.lastIndex = 0;
|
|
16675
16679
|
}
|
|
16676
|
-
return str;
|
|
16680
|
+
return lastEnd ? out + str.slice(lastEnd) : str;
|
|
16677
16681
|
}
|
|
16678
16682
|
}
|
|
16679
16683
|
|
|
@@ -69234,4 +69238,4 @@ var yaml = /*#__PURE__*/Object.freeze({
|
|
|
69234
69238
|
});
|
|
69235
69239
|
|
|
69236
69240
|
export { HighlightJS as H, MarkdownItCallable as M, Ze$b as Z, resolveConfig as a, createTwoFilesPatch$1 as b, createSyncFn as c, dedent$1 as d, deflist_plugin as e, format2 as f, fm$3 as g, strFromU8 as h, closest as i, distance as j, isCI as k, cliProgress as l, moduleImporter as m, createInstance as n, fse as o, inter as p, runAsWorker as r, strToU8 as s, tinylr as t, watch$1 as w, zlibSync as z };
|
|
69237
|
-
//# sourceMappingURL=vendor-
|
|
69241
|
+
//# sourceMappingURL=vendor-DBujHFR5.mjs.map
|