rj-editor 1.3.0 → 1.3.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/LexicalCodePrism.prod-aiocbvfq.js +1416 -0
- package/dist/plugins/CodeHighlightPlugin.d.ts +0 -6
- package/dist/prism-2TqtsDnJ.js +1917 -0
- package/dist/prism-bash-HogikaHd.js +175 -0
- package/dist/prism-docker-DI1lriSm.js +75 -0
- package/dist/prism-json-CPmaNewv.js +25 -0
- package/dist/prism-jsx-DCSoxYIa.js +46 -0
- package/dist/prism-tsx-BRUTQfCu.js +8 -0
- package/dist/prism-yaml-D6c5M_c9.js +68 -0
- package/dist/rj-editor.js +3604 -7300
- package/dist/rj-editor.umd.cjs +10 -10
- package/package.json +1 -1
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
//#region node_modules/prismjs/components/prism-bash.js
|
|
2
|
+
(function(e) {
|
|
3
|
+
var t = "\\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", n = {
|
|
4
|
+
pattern: /(^(["']?)\w+\2)[ \t]+\S.*/,
|
|
5
|
+
lookbehind: !0,
|
|
6
|
+
alias: "punctuation",
|
|
7
|
+
inside: null
|
|
8
|
+
}, r = {
|
|
9
|
+
bash: n,
|
|
10
|
+
environment: {
|
|
11
|
+
pattern: RegExp("\\$" + t),
|
|
12
|
+
alias: "constant"
|
|
13
|
+
},
|
|
14
|
+
variable: [
|
|
15
|
+
{
|
|
16
|
+
pattern: /\$?\(\([\s\S]+?\)\)/,
|
|
17
|
+
greedy: !0,
|
|
18
|
+
inside: {
|
|
19
|
+
variable: [{
|
|
20
|
+
pattern: /(^\$\(\([\s\S]+)\)\)/,
|
|
21
|
+
lookbehind: !0
|
|
22
|
+
}, /^\$\(\(/],
|
|
23
|
+
number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,
|
|
24
|
+
operator: /--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,
|
|
25
|
+
punctuation: /\(\(?|\)\)?|,|;/
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
pattern: /\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,
|
|
30
|
+
greedy: !0,
|
|
31
|
+
inside: { variable: /^\$\(|^`|\)$|`$/ }
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
pattern: /\$\{[^}]+\}/,
|
|
35
|
+
greedy: !0,
|
|
36
|
+
inside: {
|
|
37
|
+
operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,
|
|
38
|
+
punctuation: /[\[\]]/,
|
|
39
|
+
environment: {
|
|
40
|
+
pattern: RegExp("(\\{)" + t),
|
|
41
|
+
lookbehind: !0,
|
|
42
|
+
alias: "constant"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
/\$(?:\w+|[#?*!@$])/
|
|
47
|
+
],
|
|
48
|
+
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})/
|
|
49
|
+
};
|
|
50
|
+
globalThis.Prism.languages.bash = {
|
|
51
|
+
shebang: {
|
|
52
|
+
pattern: /^#!\s*\/.*/,
|
|
53
|
+
alias: "important"
|
|
54
|
+
},
|
|
55
|
+
comment: {
|
|
56
|
+
pattern: /(^|[^"{\\$])#.*/,
|
|
57
|
+
lookbehind: !0
|
|
58
|
+
},
|
|
59
|
+
"function-name": [{
|
|
60
|
+
pattern: /(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,
|
|
61
|
+
lookbehind: !0,
|
|
62
|
+
alias: "function"
|
|
63
|
+
}, {
|
|
64
|
+
pattern: /\b[\w-]+(?=\s*\(\s*\)\s*\{)/,
|
|
65
|
+
alias: "function"
|
|
66
|
+
}],
|
|
67
|
+
"for-or-select": {
|
|
68
|
+
pattern: /(\b(?:for|select)\s+)\w+(?=\s+in\s)/,
|
|
69
|
+
alias: "variable",
|
|
70
|
+
lookbehind: !0
|
|
71
|
+
},
|
|
72
|
+
"assign-left": {
|
|
73
|
+
pattern: /(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,
|
|
74
|
+
inside: { environment: {
|
|
75
|
+
pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + t),
|
|
76
|
+
lookbehind: !0,
|
|
77
|
+
alias: "constant"
|
|
78
|
+
} },
|
|
79
|
+
alias: "variable",
|
|
80
|
+
lookbehind: !0
|
|
81
|
+
},
|
|
82
|
+
parameter: {
|
|
83
|
+
pattern: /(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,
|
|
84
|
+
alias: "variable",
|
|
85
|
+
lookbehind: !0
|
|
86
|
+
},
|
|
87
|
+
string: [
|
|
88
|
+
{
|
|
89
|
+
pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,
|
|
90
|
+
lookbehind: !0,
|
|
91
|
+
greedy: !0,
|
|
92
|
+
inside: r
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,
|
|
96
|
+
lookbehind: !0,
|
|
97
|
+
greedy: !0,
|
|
98
|
+
inside: { bash: n }
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,
|
|
102
|
+
lookbehind: !0,
|
|
103
|
+
greedy: !0,
|
|
104
|
+
inside: r
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
pattern: /(^|[^$\\])'[^']*'/,
|
|
108
|
+
lookbehind: !0,
|
|
109
|
+
greedy: !0
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
pattern: /\$'(?:[^'\\]|\\[\s\S])*'/,
|
|
113
|
+
greedy: !0,
|
|
114
|
+
inside: { entity: r.entity }
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
environment: {
|
|
118
|
+
pattern: RegExp("\\$?" + t),
|
|
119
|
+
alias: "constant"
|
|
120
|
+
},
|
|
121
|
+
variable: r.variable,
|
|
122
|
+
function: {
|
|
123
|
+
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;|&])/,
|
|
124
|
+
lookbehind: !0
|
|
125
|
+
},
|
|
126
|
+
keyword: {
|
|
127
|
+
pattern: /(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,
|
|
128
|
+
lookbehind: !0
|
|
129
|
+
},
|
|
130
|
+
builtin: {
|
|
131
|
+
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;|&])/,
|
|
132
|
+
lookbehind: !0,
|
|
133
|
+
alias: "class-name"
|
|
134
|
+
},
|
|
135
|
+
boolean: {
|
|
136
|
+
pattern: /(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,
|
|
137
|
+
lookbehind: !0
|
|
138
|
+
},
|
|
139
|
+
"file-descriptor": {
|
|
140
|
+
pattern: /\B&\d\b/,
|
|
141
|
+
alias: "important"
|
|
142
|
+
},
|
|
143
|
+
operator: {
|
|
144
|
+
pattern: /\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,
|
|
145
|
+
inside: { "file-descriptor": {
|
|
146
|
+
pattern: /^\d/,
|
|
147
|
+
alias: "important"
|
|
148
|
+
} }
|
|
149
|
+
},
|
|
150
|
+
punctuation: /\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,
|
|
151
|
+
number: {
|
|
152
|
+
pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,
|
|
153
|
+
lookbehind: !0
|
|
154
|
+
}
|
|
155
|
+
}, n.inside = globalThis.Prism.languages.bash;
|
|
156
|
+
for (var i = [
|
|
157
|
+
"comment",
|
|
158
|
+
"function-name",
|
|
159
|
+
"for-or-select",
|
|
160
|
+
"assign-left",
|
|
161
|
+
"parameter",
|
|
162
|
+
"string",
|
|
163
|
+
"environment",
|
|
164
|
+
"function",
|
|
165
|
+
"keyword",
|
|
166
|
+
"builtin",
|
|
167
|
+
"boolean",
|
|
168
|
+
"file-descriptor",
|
|
169
|
+
"operator",
|
|
170
|
+
"punctuation",
|
|
171
|
+
"number"
|
|
172
|
+
], a = r.variable[1].inside, o = 0; o < i.length; o++) a[i[o]] = globalThis.Prism.languages.bash[i[o]];
|
|
173
|
+
globalThis.Prism.languages.sh = globalThis.Prism.languages.bash, globalThis.Prism.languages.shell = globalThis.Prism.languages.bash;
|
|
174
|
+
})(globalThis.Prism);
|
|
175
|
+
//#endregion
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
//#region node_modules/prismjs/components/prism-docker.js
|
|
2
|
+
(function(e) {
|
|
3
|
+
var t = "\\\\[\\r\\n](?:\\s|\\\\[\\r\\n]|#.*(?!.))*(?![\\s#]|\\\\[\\r\\n])", n = "(?:[ \\t]+(?![ \\t])(?:<SP_BS>)?|<SP_BS>)".replace(/<SP_BS>/g, function() {
|
|
4
|
+
return t;
|
|
5
|
+
}), r = "\"(?:[^\"\\\\\\r\\n]|\\\\(?:\\r\\n|[\\s\\S]))*\"|'(?:[^'\\\\\\r\\n]|\\\\(?:\\r\\n|[\\s\\S]))*'", i = "--[\\w-]+=(?:<STR>|(?![\"'])(?:[^\\s\\\\]|\\\\.)+)".replace(/<STR>/g, function() {
|
|
6
|
+
return r;
|
|
7
|
+
}), a = {
|
|
8
|
+
pattern: RegExp(r),
|
|
9
|
+
greedy: !0
|
|
10
|
+
}, o = {
|
|
11
|
+
pattern: /(^[ \t]*)#.*/m,
|
|
12
|
+
lookbehind: !0,
|
|
13
|
+
greedy: !0
|
|
14
|
+
};
|
|
15
|
+
function s(e, t) {
|
|
16
|
+
return e = e.replace(/<OPT>/g, function() {
|
|
17
|
+
return i;
|
|
18
|
+
}).replace(/<SP>/g, function() {
|
|
19
|
+
return n;
|
|
20
|
+
}), RegExp(e, t);
|
|
21
|
+
}
|
|
22
|
+
globalThis.Prism.languages.docker = {
|
|
23
|
+
instruction: {
|
|
24
|
+
pattern: /(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,
|
|
25
|
+
lookbehind: !0,
|
|
26
|
+
greedy: !0,
|
|
27
|
+
inside: {
|
|
28
|
+
options: {
|
|
29
|
+
pattern: s("(^(?:ONBUILD<SP>)?\\w+<SP>)<OPT>(?:<SP><OPT>)*", "i"),
|
|
30
|
+
lookbehind: !0,
|
|
31
|
+
greedy: !0,
|
|
32
|
+
inside: {
|
|
33
|
+
property: {
|
|
34
|
+
pattern: /(^|\s)--[\w-]+/,
|
|
35
|
+
lookbehind: !0
|
|
36
|
+
},
|
|
37
|
+
string: [a, {
|
|
38
|
+
pattern: /(=)(?!["'])(?:[^\s\\]|\\.)+/,
|
|
39
|
+
lookbehind: !0
|
|
40
|
+
}],
|
|
41
|
+
operator: /\\$/m,
|
|
42
|
+
punctuation: /=/
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
keyword: [
|
|
46
|
+
{
|
|
47
|
+
pattern: s("(^(?:ONBUILD<SP>)?HEALTHCHECK<SP>(?:<OPT><SP>)*)(?:CMD|NONE)\\b", "i"),
|
|
48
|
+
lookbehind: !0,
|
|
49
|
+
greedy: !0
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
pattern: s("(^(?:ONBUILD<SP>)?FROM<SP>(?:<OPT><SP>)*(?!--)[^ \\t\\\\]+<SP>)AS", "i"),
|
|
53
|
+
lookbehind: !0,
|
|
54
|
+
greedy: !0
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
pattern: s("(^ONBUILD<SP>)\\w+", "i"),
|
|
58
|
+
lookbehind: !0,
|
|
59
|
+
greedy: !0
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
pattern: /^\w+/,
|
|
63
|
+
greedy: !0
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
comment: o,
|
|
67
|
+
string: a,
|
|
68
|
+
variable: /\$(?:\w+|\{[^{}"'\\]*\})/,
|
|
69
|
+
operator: /\\$/m
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
comment: o
|
|
73
|
+
}, globalThis.Prism.languages.dockerfile = globalThis.Prism.languages.docker;
|
|
74
|
+
})(globalThis.Prism);
|
|
75
|
+
//#endregion
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
globalThis.Prism.languages.json = {
|
|
2
|
+
property: {
|
|
3
|
+
pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
|
|
4
|
+
lookbehind: !0,
|
|
5
|
+
greedy: !0
|
|
6
|
+
},
|
|
7
|
+
string: {
|
|
8
|
+
pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
|
|
9
|
+
lookbehind: !0,
|
|
10
|
+
greedy: !0
|
|
11
|
+
},
|
|
12
|
+
comment: {
|
|
13
|
+
pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
|
|
14
|
+
greedy: !0
|
|
15
|
+
},
|
|
16
|
+
number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
|
|
17
|
+
punctuation: /[{}[\],]/,
|
|
18
|
+
operator: /:/,
|
|
19
|
+
boolean: /\b(?:false|true)\b/,
|
|
20
|
+
null: {
|
|
21
|
+
pattern: /\bnull\b/,
|
|
22
|
+
alias: "keyword"
|
|
23
|
+
}
|
|
24
|
+
}, globalThis.Prism.languages.webmanifest = globalThis.Prism.languages.json;
|
|
25
|
+
//#endregion
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
//#region node_modules/prismjs/components/prism-jsx.js
|
|
2
|
+
(function(e) {
|
|
3
|
+
var t = e.util.clone(globalThis.Prism.languages.javascript), n = "(?:\\s|\\/\\/.*(?!.)|\\/\\*(?:[^*]|\\*(?!\\/))\\*\\/)", r = "(?:\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])*\\})", i = "(?:\\{<S>*\\.{3}(?:[^{}]|<BRACES>)*\\})";
|
|
4
|
+
function a(e, t) {
|
|
5
|
+
return e = e.replace(/<S>/g, function() {
|
|
6
|
+
return n;
|
|
7
|
+
}).replace(/<BRACES>/g, function() {
|
|
8
|
+
return r;
|
|
9
|
+
}).replace(/<SPREAD>/g, function() {
|
|
10
|
+
return i;
|
|
11
|
+
}), RegExp(e, t);
|
|
12
|
+
}
|
|
13
|
+
i = a(i).source, globalThis.Prism.languages.jsx = globalThis.Prism.languages.extend("markup", t), globalThis.Prism.languages.jsx.tag.pattern = a("<\\/?(?:[\\w.:-]+(?:<S>+(?:[\\w.:$-]+(?:=(?:\"(?:\\\\[\\s\\S]|[^\\\\\"])*\"|'(?:\\\\[\\s\\S]|[^\\\\'])*'|[^\\s{'\"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\\/?)?>"), globalThis.Prism.languages.jsx.tag.inside.tag.pattern = /^<\/?[^\s>\/]*/, globalThis.Prism.languages.jsx.tag.inside["attr-value"].pattern = /=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/, globalThis.Prism.languages.jsx.tag.inside.tag.inside["class-name"] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/, globalThis.Prism.languages.jsx.tag.inside.comment = t.comment, globalThis.Prism.languages.insertBefore("inside", "attr-name", { spread: {
|
|
14
|
+
pattern: a("<SPREAD>"),
|
|
15
|
+
inside: globalThis.Prism.languages.jsx
|
|
16
|
+
} }, globalThis.Prism.languages.jsx.tag), globalThis.Prism.languages.insertBefore("inside", "special-attr", { script: {
|
|
17
|
+
pattern: a("=<BRACES>"),
|
|
18
|
+
alias: "language-javascript",
|
|
19
|
+
inside: {
|
|
20
|
+
"script-punctuation": {
|
|
21
|
+
pattern: /^=(?=\{)/,
|
|
22
|
+
alias: "punctuation"
|
|
23
|
+
},
|
|
24
|
+
rest: globalThis.Prism.languages.jsx
|
|
25
|
+
}
|
|
26
|
+
} }, globalThis.Prism.languages.jsx.tag);
|
|
27
|
+
var o = function(e) {
|
|
28
|
+
return e ? typeof e == "string" ? e : typeof e.content == "string" ? e.content : e.content.map(o).join("") : "";
|
|
29
|
+
}, s = function(e) {
|
|
30
|
+
for (var t = [], n = 0; n < e.length; n++) {
|
|
31
|
+
var r = e[n], i = !1;
|
|
32
|
+
if (typeof r != "string" && (r.type === "tag" && r.content[0] && r.content[0].type === "tag" ? r.content[0].content[0].content === "</" ? t.length > 0 && t[t.length - 1].tagName === o(r.content[0].content[1]) && t.pop() : r.content[r.content.length - 1].content === "/>" || t.push({
|
|
33
|
+
tagName: o(r.content[0].content[1]),
|
|
34
|
+
openedBraces: 0
|
|
35
|
+
}) : t.length > 0 && r.type === "punctuation" && r.content === "{" ? t[t.length - 1].openedBraces++ : t.length > 0 && t[t.length - 1].openedBraces > 0 && r.type === "punctuation" && r.content === "}" ? t[t.length - 1].openedBraces-- : i = !0), (i || typeof r == "string") && t.length > 0 && t[t.length - 1].openedBraces === 0) {
|
|
36
|
+
var a = o(r);
|
|
37
|
+
n < e.length - 1 && (typeof e[n + 1] == "string" || e[n + 1].type === "plain-text") && (a += o(e[n + 1]), e.splice(n + 1, 1)), n > 0 && (typeof e[n - 1] == "string" || e[n - 1].type === "plain-text") && (a = o(e[n - 1]) + a, e.splice(n - 1, 1), n--), e[n] = new globalThis.Prism.Token("plain-text", a, null, a);
|
|
38
|
+
}
|
|
39
|
+
r.content && typeof r.content != "string" && s(r.content);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
globalThis.Prism.hooks.add("after-tokenize", function(e) {
|
|
43
|
+
e.language !== "jsx" && e.language !== "tsx" || s(e.tokens);
|
|
44
|
+
});
|
|
45
|
+
})(globalThis.Prism);
|
|
46
|
+
//#endregion
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region node_modules/prismjs/components/prism-tsx.js
|
|
2
|
+
(function(e) {
|
|
3
|
+
var t = e.util.clone(globalThis.Prism.languages.typescript);
|
|
4
|
+
globalThis.Prism.languages.tsx = globalThis.Prism.languages.extend("jsx", t), delete globalThis.Prism.languages.tsx.parameter, delete globalThis.Prism.languages.tsx["literal-property"];
|
|
5
|
+
var n = globalThis.Prism.languages.tsx.tag;
|
|
6
|
+
n.pattern = RegExp("(^|[^\\w$]|(?=<\\/))(?:" + n.pattern.source + ")", n.pattern.flags), n.lookbehind = !0;
|
|
7
|
+
})(globalThis.Prism);
|
|
8
|
+
//#endregion
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
//#region node_modules/prismjs/components/prism-yaml.js
|
|
2
|
+
(function(e) {
|
|
3
|
+
var t = /[*&][^\s[\]{},]+/, n = /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/, r = "(?:" + n.source + "(?:[ ]+" + t.source + ")?|" + t.source + "(?:[ ]+" + n.source + ")?)", i = "(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-]<PLAIN>)(?:[ \\t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*".replace(/<PLAIN>/g, function() {
|
|
4
|
+
return "[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]";
|
|
5
|
+
}), a = "\"(?:[^\"\\\\\\r\\n]|\\\\.)*\"|'(?:[^'\\\\\\r\\n]|\\\\.)*'";
|
|
6
|
+
function o(e, t) {
|
|
7
|
+
t = (t || "").replace(/m/g, "") + "m";
|
|
8
|
+
var n = "([:\\-,[{]\\s*(?:\\s<<prop>>[ \\t]+)?)(?:<<value>>)(?=[ \\t]*(?:$|,|\\]|\\}|(?:[\\r\\n]\\s*)?#))".replace(/<<prop>>/g, function() {
|
|
9
|
+
return r;
|
|
10
|
+
}).replace(/<<value>>/g, function() {
|
|
11
|
+
return e;
|
|
12
|
+
});
|
|
13
|
+
return RegExp(n, t);
|
|
14
|
+
}
|
|
15
|
+
globalThis.Prism.languages.yaml = {
|
|
16
|
+
scalar: {
|
|
17
|
+
pattern: RegExp("([\\-:]\\s*(?:\\s<<prop>>[ \\t]+)?[|>])[ \\t]*(?:((?:\\r?\\n|\\r)[ \\t]+)\\S[^\\r\\n]*(?:\\2[^\\r\\n]+)*)".replace(/<<prop>>/g, function() {
|
|
18
|
+
return r;
|
|
19
|
+
})),
|
|
20
|
+
lookbehind: !0,
|
|
21
|
+
alias: "string"
|
|
22
|
+
},
|
|
23
|
+
comment: /#.*/,
|
|
24
|
+
key: {
|
|
25
|
+
pattern: RegExp("((?:^|[:\\-,[{\\r\\n?])[ \\t]*(?:<<prop>>[ \\t]+)?)<<key>>(?=\\s*:\\s)".replace(/<<prop>>/g, function() {
|
|
26
|
+
return r;
|
|
27
|
+
}).replace(/<<key>>/g, function() {
|
|
28
|
+
return "(?:" + i + "|" + a + ")";
|
|
29
|
+
})),
|
|
30
|
+
lookbehind: !0,
|
|
31
|
+
greedy: !0,
|
|
32
|
+
alias: "atrule"
|
|
33
|
+
},
|
|
34
|
+
directive: {
|
|
35
|
+
pattern: /(^[ \t]*)%.+/m,
|
|
36
|
+
lookbehind: !0,
|
|
37
|
+
alias: "important"
|
|
38
|
+
},
|
|
39
|
+
datetime: {
|
|
40
|
+
pattern: o("\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \\t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[ \\t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?))?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?"),
|
|
41
|
+
lookbehind: !0,
|
|
42
|
+
alias: "number"
|
|
43
|
+
},
|
|
44
|
+
boolean: {
|
|
45
|
+
pattern: o("false|true", "i"),
|
|
46
|
+
lookbehind: !0,
|
|
47
|
+
alias: "important"
|
|
48
|
+
},
|
|
49
|
+
null: {
|
|
50
|
+
pattern: o("null|~", "i"),
|
|
51
|
+
lookbehind: !0,
|
|
52
|
+
alias: "important"
|
|
53
|
+
},
|
|
54
|
+
string: {
|
|
55
|
+
pattern: o(a),
|
|
56
|
+
lookbehind: !0,
|
|
57
|
+
greedy: !0
|
|
58
|
+
},
|
|
59
|
+
number: {
|
|
60
|
+
pattern: o("[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)", "i"),
|
|
61
|
+
lookbehind: !0
|
|
62
|
+
},
|
|
63
|
+
tag: n,
|
|
64
|
+
important: t,
|
|
65
|
+
punctuation: /---|[:[\]{}\-,|>?]|\.\.\./
|
|
66
|
+
}, globalThis.Prism.languages.yml = globalThis.Prism.languages.yaml;
|
|
67
|
+
})(globalThis.Prism);
|
|
68
|
+
//#endregion
|