@kong-ui-public/document-viewer 2.1.10 → 2.1.11
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/document-viewer.es.js +5 -6
- package/dist/{prism-bash.min-DDo5CyRs.js → prism-bash.min-DadFsM4Z.js} +1 -2
- package/dist/{prism-http.min-CsU3-jB8.js → prism-http.min-BtDAy7ye.js} +5 -6
- package/dist/{prism-markdown.min-B7US-xc7.js → prism-markdown.min-F3U-vPBi.js} +14 -17
- package/dist/{prism-rust.min-Cb-Mi-h0.js → prism-rust.min-Cvu3IdfR.js} +3 -4
- package/package.json +2 -2
|
@@ -1228,21 +1228,21 @@ const J = /* @__PURE__ */ Me(ze), Re = /* @__PURE__ */ T({
|
|
|
1228
1228
|
return xe(() => u.lang, async () => {
|
|
1229
1229
|
try {
|
|
1230
1230
|
await Promise.all([
|
|
1231
|
-
import("./prism-bash.min-
|
|
1231
|
+
import("./prism-bash.min-DadFsM4Z.js"),
|
|
1232
1232
|
import("./prism-css.min-BrrzZC7b.js"),
|
|
1233
1233
|
import("./prism-docker.min-DnIEokC3.js"),
|
|
1234
1234
|
import("./prism-go.min-C7UmK6TW.js"),
|
|
1235
|
-
import("./prism-http.min-
|
|
1235
|
+
import("./prism-http.min-BtDAy7ye.js"),
|
|
1236
1236
|
import("./prism-javascript.min-CEqHqgbm.js"),
|
|
1237
1237
|
import("./prism-jq.min-Q555vXZm.js"),
|
|
1238
1238
|
import("./prism-json.min-B1GJqK1k.js"),
|
|
1239
1239
|
import("./prism-log.min-SDopTpKN.js"),
|
|
1240
1240
|
import("./prism-lua.min-DwRnUVfS.js"),
|
|
1241
1241
|
import("./prism-makefile.min-DyutknhE.js"),
|
|
1242
|
-
import("./prism-markdown.min-
|
|
1242
|
+
import("./prism-markdown.min-F3U-vPBi.js"),
|
|
1243
1243
|
import("./prism-python.min-BIfpAh5K.js"),
|
|
1244
1244
|
import("./prism-regex.min-f8DNqi8X.js"),
|
|
1245
|
-
import("./prism-rust.min-
|
|
1245
|
+
import("./prism-rust.min-Cvu3IdfR.js"),
|
|
1246
1246
|
import("./prism-rest.min-B6veHRJF.js"),
|
|
1247
1247
|
import("./prism-scss.min-B0csyGJo.js"),
|
|
1248
1248
|
import("./prism-sql.min-BHXzX-c_.js"),
|
|
@@ -1600,8 +1600,7 @@ function Bt(t, u = "") {
|
|
|
1600
1600
|
return t.toLowerCase().trim().replace(/ /g, "-").replace(/[^\w-]+/g, "") + u;
|
|
1601
1601
|
}
|
|
1602
1602
|
function me(t, u = /* @__PURE__ */ new Map()) {
|
|
1603
|
-
if (!t)
|
|
1604
|
-
return t;
|
|
1603
|
+
if (!t) return t;
|
|
1605
1604
|
const n = u || /* @__PURE__ */ new Map();
|
|
1606
1605
|
return t.map((l) => Ie(l) ? Pt(l, u) : (l.children && (l.children = me(l.children, n)), l));
|
|
1607
1606
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
(function(e) {
|
|
2
2
|
var a = "\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b", s = { pattern: /(^(["']?)\w+\2)[ \t]+\S.*/, lookbehind: !0, alias: "punctuation", inside: null }, t = { bash: s, environment: { pattern: RegExp("\\$" + a), alias: "constant" }, variable: [{ pattern: /\$?\(\([\s\S]+?\)\)/, greedy: !0, inside: { variable: [{ pattern: /(^\$\(\([\s\S]+)\)\)/, lookbehind: !0 }, /^\$\(\(/], number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/, operator: /--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/, punctuation: /\(\(?|\)\)?|,|;/ } }, { pattern: /\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/, greedy: !0, inside: { variable: /^\$\(|^`|\)$|`$/ } }, { pattern: /\$\{[^}]+\}/, greedy: !0, inside: { operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/, punctuation: /[\[\]]/, environment: { pattern: RegExp("(\\{)" + a), lookbehind: !0, alias: "constant" } } }, /\$(?:\w+|[#?*!@$])/], entity: /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/ };
|
|
3
3
|
e.languages.bash = { shebang: { pattern: /^#!\s*\/.*/, alias: "important" }, comment: { pattern: /(^|[^"{\\$])#.*/, lookbehind: !0 }, "function-name": [{ pattern: /(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/, lookbehind: !0, alias: "function" }, { pattern: /\b[\w-]+(?=\s*\(\s*\)\s*\{)/, alias: "function" }], "for-or-select": { pattern: /(\b(?:for|select)\s+)\w+(?=\s+in\s)/, alias: "variable", lookbehind: !0 }, "assign-left": { pattern: /(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/, inside: { environment: { pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + a), lookbehind: !0, alias: "constant" } }, alias: "variable", lookbehind: !0 }, parameter: { pattern: /(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/, alias: "variable", lookbehind: !0 }, string: [{ pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/, lookbehind: !0, greedy: !0, inside: t }, { pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/, lookbehind: !0, greedy: !0, inside: { bash: s } }, { pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/, lookbehind: !0, greedy: !0, inside: t }, { pattern: /(^|[^$\\])'[^']*'/, lookbehind: !0, greedy: !0 }, { pattern: /\$'(?:[^'\\]|\\[\s\S])*'/, greedy: !0, inside: { entity: t.entity } }], environment: { pattern: RegExp("\\$?" + a), alias: "constant" }, variable: t.variable, function: { pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/, lookbehind: !0 }, keyword: { pattern: /(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/, lookbehind: !0 }, builtin: { pattern: /(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/, lookbehind: !0, alias: "class-name" }, boolean: { pattern: /(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/, lookbehind: !0 }, "file-descriptor": { pattern: /\B&\d\b/, alias: "important" }, operator: { pattern: /\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/, inside: { "file-descriptor": { pattern: /^\d/, alias: "important" } } }, punctuation: /\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/, number: { pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/, lookbehind: !0 } }, s.inside = e.languages.bash;
|
|
4
|
-
for (var o = ["comment", "function-name", "for-or-select", "assign-left", "parameter", "string", "environment", "function", "keyword", "builtin", "boolean", "file-descriptor", "operator", "punctuation", "number"], r = t.variable[1].inside, n = 0; n < o.length; n++)
|
|
5
|
-
r[o[n]] = e.languages.bash[o[n]];
|
|
4
|
+
for (var o = ["comment", "function-name", "for-or-select", "assign-left", "parameter", "string", "environment", "function", "keyword", "builtin", "boolean", "file-descriptor", "operator", "punctuation", "number"], r = t.variable[1].inside, n = 0; n < o.length; n++) r[o[n]] = e.languages.bash[o[n]];
|
|
6
5
|
e.languages.sh = e.languages.bash, e.languages.shell = e.languages.bash;
|
|
7
6
|
})(Prism);
|
|
@@ -8,16 +8,15 @@
|
|
|
8
8
|
var d = i.replace(/^[a-z]+\//, "");
|
|
9
9
|
return "(?:" + i + "|\\w+/(?:[\\w.-]+\\+)+" + d + "(?![+\\w.-]))";
|
|
10
10
|
}
|
|
11
|
-
for (var t in r)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
n[t.replace(/\//g, "-")] = { pattern: RegExp("(content-type:\\s*" + o + `(?:(?:\r
|
|
11
|
+
for (var t in r) if (r[t]) {
|
|
12
|
+
n = n || {};
|
|
13
|
+
var o = p[t] ? l(t) : t;
|
|
14
|
+
n[t.replace(/\//g, "-")] = { pattern: RegExp("(content-type:\\s*" + o + `(?:(?:\r
|
|
16
15
|
?|
|
|
17
16
|
)[\\w-].*)*(?:\r(?:
|
|
18
17
|
|(?!
|
|
19
18
|
))|
|
|
20
19
|
))[^ \\w-][^]*`, "i"), lookbehind: !0, inside: r[t] };
|
|
21
|
-
|
|
20
|
+
}
|
|
22
21
|
n && e.languages.insertBefore("http", "header", n);
|
|
23
22
|
})(Prism);
|
|
@@ -21,18 +21,16 @@
|
|
|
21
21
|
});
|
|
22
22
|
}), n.hooks.add("after-tokenize", function(e) {
|
|
23
23
|
e.language !== "markdown" && e.language !== "md" || function t(r) {
|
|
24
|
-
if (r && typeof r != "string")
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
t(l.content);
|
|
35
|
-
}
|
|
24
|
+
if (r && typeof r != "string") for (var p = 0, b = r.length; p < b; p++) {
|
|
25
|
+
var l = r[p];
|
|
26
|
+
if (l.type === "code") {
|
|
27
|
+
var s = l.content[1], a = l.content[3];
|
|
28
|
+
if (s && a && s.type === "code-language" && a.type === "code-block" && typeof s.content == "string") {
|
|
29
|
+
var o = s.content.replace(/\b#/g, "sharp").replace(/\b\+\+/g, "pp"), i = "language-" + (o = (/[a-z][\w-]*/i.exec(o) || [""])[0].toLowerCase());
|
|
30
|
+
a.alias ? typeof a.alias == "string" ? a.alias = [a.alias, i] : a.alias.push(i) : a.alias = [i];
|
|
31
|
+
}
|
|
32
|
+
} else t(l.content);
|
|
33
|
+
}
|
|
36
34
|
}(e.tokens);
|
|
37
35
|
}), n.hooks.add("wrap", function(e) {
|
|
38
36
|
if (e.type === "code-block") {
|
|
@@ -44,11 +42,10 @@
|
|
|
44
42
|
}
|
|
45
43
|
}
|
|
46
44
|
var s = n.languages[t];
|
|
47
|
-
if (s)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}), s, t);
|
|
45
|
+
if (s) e.content = n.highlight(e.content.replace(h, "").replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(o, i) {
|
|
46
|
+
var k;
|
|
47
|
+
return (i = i.toLowerCase())[0] === "#" ? (k = i[1] === "x" ? parseInt(i.slice(2), 16) : Number(i.slice(1)), f(k)) : m[i] || o;
|
|
48
|
+
}), s, t);
|
|
52
49
|
else if (t && t !== "none" && n.plugins.autoloader) {
|
|
53
50
|
var a = "md-" + (/* @__PURE__ */ new Date()).valueOf() + "-" + Math.floor(1e16 * Math.random());
|
|
54
51
|
e.attributes.id = a, n.plugins.autoloader.loadLanguages(t, function() {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
(function(a) {
|
|
2
|
-
for (var e = "/\\*(?:[^*/]|\\*(?!/)|/(?!\\*)|<self>)*\\*/", t = 0; t < 2; t++)
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
2
|
+
for (var e = "/\\*(?:[^*/]|\\*(?!/)|/(?!\\*)|<self>)*\\*/", t = 0; t < 2; t++) e = e.replace(/<self>/g, function() {
|
|
3
|
+
return e;
|
|
4
|
+
});
|
|
6
5
|
e = e.replace(/<self>/g, function() {
|
|
7
6
|
return "[^\\s\\S]";
|
|
8
7
|
}), a.languages.rust = { comment: [{ pattern: RegExp("(^|[^\\\\])" + e), lookbehind: !0, greedy: !0 }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }], string: { pattern: /b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/, greedy: !0 }, char: { pattern: /b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/, greedy: !0 }, attribute: { pattern: /#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/, greedy: !0, alias: "attr-name", inside: { string: null } }, "closure-params": { pattern: /([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/, lookbehind: !0, greedy: !0, inside: { "closure-punctuation": { pattern: /^\||\|$/, alias: "punctuation" }, rest: null } }, "lifetime-annotation": { pattern: /'\w+/, alias: "symbol" }, "fragment-specifier": { pattern: /(\$\w+:)[a-z]+/, lookbehind: !0, alias: "punctuation" }, variable: /\$\w+/, "function-definition": { pattern: /(\bfn\s+)\w+/, lookbehind: !0, alias: "function" }, "type-definition": { pattern: /(\b(?:enum|struct|trait|type|union)\s+)\w+/, lookbehind: !0, alias: "class-name" }, "module-declaration": [{ pattern: /(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/, lookbehind: !0, alias: "namespace" }, { pattern: /(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/, lookbehind: !0, alias: "namespace", inside: { punctuation: /::/ } }], keyword: [/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/, /\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/], function: /\b[a-z_]\w*(?=\s*(?:::\s*<|\())/, macro: { pattern: /\b\w+!/, alias: "property" }, constant: /\b[A-Z_][A-Z_\d]+\b/, "class-name": /\b[A-Z]\w*\b/, namespace: { pattern: /(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/, inside: { punctuation: /::/ } }, number: /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/, boolean: /\b(?:false|true)\b/, punctuation: /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/, operator: /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/ }, a.languages.rust["closure-params"].inside.rest = a.languages.rust, a.languages.rust.attribute.inside.string = a.languages.rust.string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/document-viewer",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/document-viewer.umd.js",
|
|
6
6
|
"module": "./dist/document-viewer.es.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@kong/kongponents": "9.0.8",
|
|
30
30
|
"@types/prismjs": "^1.26.4",
|
|
31
31
|
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
|
32
|
-
"vue": "^3.4.
|
|
32
|
+
"vue": "^3.4.31"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"prismjs": "^1.29.0",
|