@forsakringskassan/docs-generator 2.42.0 → 3.0.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.
@@ -90,8 +90,13 @@ export declare interface DocumentPartial {
90
90
  name: string;
91
91
  /** alternative names this document can be referenced by */
92
92
  alias: string[];
93
- /** content of this document */
94
- body: string | ((tags: string[]) => string);
93
+ /**
94
+ * Content of this document
95
+ *
96
+ * @param tags - List of tags given when including this partial.
97
+ * @param reference - Reference used when importing this partial.
98
+ */
99
+ body: string | ((tags: string[], reference: DocumentPartialReference) => string);
95
100
  /** format of body */
96
101
  format: "markdown" | "html" | "json";
97
102
  fileInfo: {
@@ -100,6 +105,18 @@ export declare interface DocumentPartial {
100
105
  };
101
106
  }
102
107
 
108
+ /**
109
+ * Reference used when including a partial.
110
+ *
111
+ * @public
112
+ */
113
+ export declare interface DocumentPartialReference {
114
+ /** the type of identifier used to include this partial */
115
+ kind: "id" | "name" | "alias";
116
+ /** the identifier used to include this partial */
117
+ reference: string;
118
+ }
119
+
103
120
  /**
104
121
  * Represents an example needing compilation.
105
122
  *
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-DX0B9T-x.mjs';
6
- import './vendor-BoRn-ubH.mjs';
5
+ export { S as SoftError, c as createMarkdownRenderer } from './create-markdown-renderer-CoqQjBrC.mjs';
6
+ import './vendor-B7bJ2okl.mjs';
7
7
  import 'node:url';
8
8
  import 'node:path';
9
9
  import 'fs';
@@ -39,6 +39,6 @@ import 'v8';
39
39
  import 'node:path/posix';
40
40
  import 'node:child_process';
41
41
  import 'vue';
42
- import './vue3-fRI2JWNs.mjs';
42
+ import './vue3-RC792pPN.mjs';
43
43
  import 'vue/compiler-sfc';
44
44
  //# sourceMappingURL=markdown.mjs.map
@@ -856,6 +856,47 @@ var require_coerce = __commonJS({
856
856
  }
857
857
  });
858
858
 
859
+ // node_modules/semver/functions/truncate.js
860
+ var require_truncate = __commonJS({
861
+ "node_modules/semver/functions/truncate.js"(exports, module) {
862
+ "use strict";
863
+ var parse = require_parse();
864
+ var constants = require_constants();
865
+ var SemVer = require_semver();
866
+ var truncate = (version, truncation, options) => {
867
+ if (!constants.RELEASE_TYPES.includes(truncation)) {
868
+ return null;
869
+ }
870
+ const clonedVersion = cloneInputVersion(version, options);
871
+ return clonedVersion && doTruncation(clonedVersion, truncation);
872
+ };
873
+ var cloneInputVersion = (version, options) => {
874
+ const versionStringToParse = version instanceof SemVer ? version.version : version;
875
+ return parse(versionStringToParse, options);
876
+ };
877
+ var doTruncation = (version, truncation) => {
878
+ if (isPrerelease(truncation)) {
879
+ return version.version;
880
+ }
881
+ version.prerelease = [];
882
+ switch (truncation) {
883
+ case "major":
884
+ version.minor = 0;
885
+ version.patch = 0;
886
+ break;
887
+ case "minor":
888
+ version.patch = 0;
889
+ break;
890
+ }
891
+ return version.format();
892
+ };
893
+ var isPrerelease = (type) => {
894
+ return type.startsWith("pre");
895
+ };
896
+ module.exports = truncate;
897
+ }
898
+ });
899
+
859
900
  // node_modules/semver/internal/lrucache.js
860
901
  var require_lrucache = __commonJS({
861
902
  "node_modules/semver/internal/lrucache.js"(exports, module) {
@@ -1890,6 +1931,7 @@ var require_semver2 = __commonJS({
1890
1931
  var lte = require_lte();
1891
1932
  var cmp = require_cmp();
1892
1933
  var coerce = require_coerce();
1934
+ var truncate = require_truncate();
1893
1935
  var Comparator = require_comparator();
1894
1936
  var Range = require_range();
1895
1937
  var satisfies = require_satisfies();
@@ -1928,6 +1970,7 @@ var require_semver2 = __commonJS({
1928
1970
  lte,
1929
1971
  cmp,
1930
1972
  coerce,
1973
+ truncate,
1931
1974
  Comparator,
1932
1975
  Range,
1933
1976
  satisfies,