@forsakringskassan/docs-generator 2.28.5 → 2.28.6

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/index.mjs CHANGED
@@ -4,8 +4,8 @@ const require = $createRequire(import.meta.url);
4
4
 
5
5
  import fs from 'node:fs/promises';
6
6
  import path from 'node:path/posix';
7
- import { g as globSync, m as minimatch, M as MarkdownIt, d as dedent, e as closest, f as distance, h as fm, i as isCI, j as glob, k as moduleImporter, l as cliProgress, t as tinylr, w as watch, n as createInstance, o as fse } from './vendor-zQuDI2ju.mjs';
8
- import { g as generateId, p as parseInfostring, i as isDocumentPage, n as normalizePath, a as getFingerprint, h as hasTag, f as findTag, b as getOutputFilePath, d as htmlencode, e as exampleWorkerUrl, c as createMarkdownRenderer, j as generateExample } from './create-markdown-renderer-CnFakUB4.mjs';
7
+ import { g as globSync, m as minimatch, M as MarkdownIt, d as dedent, e as closest, f as distance, h as fm, i as isCI, j as glob, k as moduleImporter, l as cliProgress, t as tinylr, w as watch, n as createInstance, o as fse } from './vendor-G1gaI4j7.mjs';
8
+ import { g as generateId, p as parseInfostring, i as isDocumentPage, n as normalizePath, a as getFingerprint, h as hasTag, f as findTag, b as getOutputFilePath, d as htmlencode, e as exampleWorkerUrl, c as createMarkdownRenderer, j as generateExample } from './create-markdown-renderer-DIiF_B56.mjs';
9
9
  import path$1 from 'node:path';
10
10
  import require$$1 from 'crypto';
11
11
  import 'node:crypto';
@@ -48,7 +48,7 @@ import 'tls';
48
48
  import 'tty';
49
49
  import 'querystring';
50
50
  import 'vue';
51
- import './vue3-BruEOIIk.mjs';
51
+ import './vue3-xv_K1Yuq.mjs';
52
52
 
53
53
  function toArray$2(value) {
54
54
  return Array.isArray(value) ? value : [value];
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-CnFakUB4.mjs';
6
- import './vendor-zQuDI2ju.mjs';
5
+ export { S as SoftError, c as createMarkdownRenderer } from './create-markdown-renderer-DIiF_B56.mjs';
6
+ import './vendor-G1gaI4j7.mjs';
7
7
  import 'node:url';
8
8
  import 'node:path';
9
9
  import 'fs';
@@ -37,5 +37,5 @@ import 'node:path/posix';
37
37
  import 'node:crypto';
38
38
  import 'node:child_process';
39
39
  import 'vue';
40
- import './vue3-BruEOIIk.mjs';
40
+ import './vue3-xv_K1Yuq.mjs';
41
41
  //# sourceMappingURL=markdown.mjs.map
@@ -25168,12 +25168,10 @@ class Interpolator {
25168
25168
  clonedOptions = clonedOptions.replace && !isString(clonedOptions.replace) ? clonedOptions.replace : clonedOptions;
25169
25169
  clonedOptions.applyPostProcessor = false;
25170
25170
  delete clonedOptions.defaultValue;
25171
- let doReduce = false;
25172
- if (match[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(match[1])) {
25173
- const r = match[1].split(this.formatSeparator).map(elem => elem.trim());
25174
- match[1] = r.shift();
25175
- formatters = r;
25176
- doReduce = true;
25171
+ const keyEndIndex = /{.*}/.test(match[1]) ? match[1].lastIndexOf('}') + 1 : match[1].indexOf(this.formatSeparator);
25172
+ if (keyEndIndex !== -1) {
25173
+ formatters = match[1].slice(keyEndIndex).split(this.formatSeparator).map(elem => elem.trim()).filter(Boolean);
25174
+ match[1] = match[1].slice(0, keyEndIndex);
25177
25175
  }
25178
25176
  value = fc(handleHasOptions.call(this, match[1].trim(), clonedOptions), clonedOptions);
25179
25177
  if (value && match[0] === str && !isString(value)) return value;
@@ -25182,7 +25180,7 @@ class Interpolator {
25182
25180
  this.logger.warn(`missed to resolve ${match[1]} for nesting ${str}`);
25183
25181
  value = '';
25184
25182
  }
25185
- if (doReduce) {
25183
+ if (formatters.length) {
25186
25184
  value = formatters.reduce((v, f) => this.format(v, f, options.lng, {
25187
25185
  ...options,
25188
25186
  interpolationkey: match[1].trim()
@@ -26021,8 +26019,16 @@ class I18n extends EventEmitter {
26021
26019
  dir(lng) {
26022
26020
  if (!lng) lng = this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language);
26023
26021
  if (!lng) return 'rtl';
26022
+ if (Intl.Locale) {
26023
+ const l = new Intl.Locale(lng);
26024
+ if (l && l.getTextInfo) {
26025
+ const ti = l.getTextInfo();
26026
+ if (ti && ti.direction) return ti.direction;
26027
+ }
26028
+ }
26024
26029
  const rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam', 'ckb'];
26025
26030
  const languageUtils = this.services?.languageUtils || new LanguageUtil(get$1());
26031
+ if (lng.toLowerCase().indexOf('-latn') > 1) return 'ltr';
26026
26032
  return rtlLngs.indexOf(languageUtils.getLanguagePartFromCode(lng)) > -1 || lng.toLowerCase().indexOf('-arab') > 1 ? 'rtl' : 'ltr';
26027
26033
  }
26028
26034
  static createInstance(options = {}, callback) {
@@ -56121,4 +56127,4 @@ var srcExports = requireSrc();
56121
56127
  var tinylr = /*@__PURE__*/getDefaultExportFromCjs(srcExports);
56122
56128
 
56123
56129
  export { HighlightJS as H, MarkdownIt as M, createTwoFilesPatch as a, deflist_plugin as b, commonjsRequire as c, dedent as d, closest as e, distance as f, globSync as g, fm as h, isCI as i, glob as j, moduleImporter as k, cliProgress as l, minimatch as m, createInstance as n, fse as o, tinylr as t, watch$1 as w };
56124
- //# sourceMappingURL=vendor-zQuDI2ju.mjs.map
56130
+ //# sourceMappingURL=vendor-G1gaI4j7.mjs.map