@readme/syntax-highlighter 15.0.2 → 16.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.
- package/dist/index.js +2 -47606
- package/dist/index.js.LICENSE.txt +66 -0
- package/dist/index.node.js +1 -394
- package/package.json +7 -4
- package/.babelrc +0 -13
- package/LICENSES +0 -23
- package/knip.ts +0 -22
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -7
- package/public/index.js +0 -170
- package/public/index.legacy.js +0 -169
- package/src/codeEditor/cm.options.ts +0 -11
- package/src/codeEditor/index.tsx +0 -55
- package/src/codeEditor/style.scss +0 -6
- package/src/codeMirror/index.jsx +0 -260
- package/src/codeMirror/style.scss +0 -104
- package/src/index.js +0 -68
- package/src/index.node.ts +0 -5
- package/src/utils/canonical.ts +0 -65
- package/src/utils/cm-mode-imports.js +0 -33
- package/src/utils/index.ts +0 -5
- package/src/utils/modes/solidity.js +0 -605
- package/src/utils/modes.ts +0 -104
- package/src/utils/uppercase.ts +0 -111
- package/tsconfig.json +0 -13
- package/webpack.config.dev.js +0 -45
- package/webpack.config.js +0 -80
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* This mode has been adapted from the source of `codemirror-solidity` as the way that library is
|
|
13
|
+
* structured makes it impossible for us load as an isolated mode for our Codemirror needs. The
|
|
14
|
+
* source is mostly presented as-is with the exception of a few areas adapted into to our coding
|
|
15
|
+
* standards (such as using `const` instead of `let` for immutable data).
|
|
16
|
+
*
|
|
17
|
+
* @license MIT
|
|
18
|
+
* @see {@link https://github.com/alincode/codemirror-solidity}
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Vendored from `codemirror-graphql`'s `esm/mode.js`. Vendoring this mode (rather than depending
|
|
23
|
+
* on the `codemirror-graphql` package) lets us pull in only the ~600 lines this mode actually
|
|
24
|
+
* needs from `graphql-language-service`'s parser, instead of the full `graphql-language-service`
|
|
25
|
+
* package and its `graphql` peer dependency (whose validation rules alone account for several
|
|
26
|
+
* hundred KB of the published bundle).
|
|
27
|
+
*
|
|
28
|
+
* @license MIT
|
|
29
|
+
* @see {@link https://github.com/graphql/graphiql/blob/main/packages/codemirror-graphql/src/mode.ts}
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Vendored from `codemirror-graphql`'s `esm/utils/mode-indent.js`, stripped of its TypeScript
|
|
34
|
+
* types.
|
|
35
|
+
*
|
|
36
|
+
* @license MIT
|
|
37
|
+
* @see {@link https://github.com/graphql/graphiql/blob/main/packages/codemirror-graphql/src/utils/mode-indent.ts}
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Vendored from `graphql-language-service`'s `esm/parser/RuleHelpers.js`, stripped of its
|
|
42
|
+
* TypeScript types.
|
|
43
|
+
*
|
|
44
|
+
* @license MIT
|
|
45
|
+
* @see {@link https://github.com/graphql/graphiql/blob/main/packages/graphql-language-service/src/parser/RuleHelpers.ts}
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Vendored from `graphql-language-service`'s `esm/parser/Rules.js`, stripped of its TypeScript
|
|
50
|
+
* types. The only thing this file needed from the `graphql` package was a handful of `Kind`
|
|
51
|
+
* string constants (`Document`, `FragmentDefinition`, `SchemaExtension`, etc.), which we've
|
|
52
|
+
* inlined below instead of pulling in all of `graphql` (and its validation rules) just for a mode.
|
|
53
|
+
*
|
|
54
|
+
* @license MIT
|
|
55
|
+
* @see {@link https://github.com/graphql/graphiql/blob/main/packages/graphql-language-service/src/parser/Rules.ts}
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Vendored from `graphql-language-service`'s `esm/parser/onlineParser.js`, stripped of its
|
|
60
|
+
* TypeScript types. The only thing this file needed from the `graphql` package was the
|
|
61
|
+
* `Kind.DOCUMENT` string constant (`'Document'`), which is inlined below instead of pulling in
|
|
62
|
+
* all of `graphql` (and its validation rules) just for a mode.
|
|
63
|
+
*
|
|
64
|
+
* @license MIT
|
|
65
|
+
* @see {@link https://github.com/graphql/graphiql/blob/main/packages/graphql-language-service/src/parser/onlineParser.ts}
|
|
66
|
+
*/
|
package/dist/index.node.js
CHANGED
|
@@ -1,394 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/******/ "use strict";
|
|
3
|
-
/******/ var __webpack_modules__ = ({
|
|
4
|
-
|
|
5
|
-
/***/ 638
|
|
6
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var __importDefault = this && this.__importDefault || function (mod) {
|
|
11
|
-
return mod && mod.__esModule ? mod : {
|
|
12
|
-
"default": mod
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
16
|
-
value: true
|
|
17
|
-
}));
|
|
18
|
-
exports.getMode = exports.modes = exports.canonical = exports.uppercase = void 0;
|
|
19
|
-
var canonical_1 = __importDefault(__webpack_require__(42));
|
|
20
|
-
exports.canonical = canonical_1.default;
|
|
21
|
-
var modes_1 = __webpack_require__(476);
|
|
22
|
-
Object.defineProperty(exports, "modes", ({
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: function get() {
|
|
25
|
-
return modes_1.modes;
|
|
26
|
-
}
|
|
27
|
-
}));
|
|
28
|
-
Object.defineProperty(exports, "getMode", ({
|
|
29
|
-
enumerable: true,
|
|
30
|
-
get: function get() {
|
|
31
|
-
return modes_1.getMode;
|
|
32
|
-
}
|
|
33
|
-
}));
|
|
34
|
-
var uppercase_1 = __importDefault(__webpack_require__(704));
|
|
35
|
-
exports.uppercase = uppercase_1.default;
|
|
36
|
-
|
|
37
|
-
/***/ },
|
|
38
|
-
|
|
39
|
-
/***/ 42
|
|
40
|
-
(__unused_webpack_module, exports) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
45
|
-
value: true
|
|
46
|
-
}));
|
|
47
|
-
var modeAliases = {
|
|
48
|
-
aspx: 'asp',
|
|
49
|
-
bash: 'shell',
|
|
50
|
-
'c++': 'cplusplus',
|
|
51
|
-
'c#': 'csharp',
|
|
52
|
-
clj: 'clojure',
|
|
53
|
-
cljc: 'clojure',
|
|
54
|
-
cljx: 'clojure',
|
|
55
|
-
coffeescript: 'javascript',
|
|
56
|
-
cpp: 'cplusplus',
|
|
57
|
-
cql: 'sql',
|
|
58
|
-
cs: 'csharp',
|
|
59
|
-
docker: 'dockerfile',
|
|
60
|
-
ecmascript: 'javascript',
|
|
61
|
-
erl: 'erlang',
|
|
62
|
-
gql: 'graphql',
|
|
63
|
-
gradle: 'groovy',
|
|
64
|
-
handlebars: 'html',
|
|
65
|
-
hbs: 'html',
|
|
66
|
-
jl: 'julia',
|
|
67
|
-
jruby: 'ruby',
|
|
68
|
-
js: 'javascript',
|
|
69
|
-
kt: 'kotlin',
|
|
70
|
-
less: 'css',
|
|
71
|
-
macruby: 'ruby',
|
|
72
|
-
md: 'markdown',
|
|
73
|
-
ml: 'ocaml',
|
|
74
|
-
mssql: 'sql',
|
|
75
|
-
mysql: 'sql',
|
|
76
|
-
node: 'javascript',
|
|
77
|
-
'obj-c': 'objectivec',
|
|
78
|
-
'obj-c++': 'objectivecplusplus',
|
|
79
|
-
'objc++': 'objectivecplusplus',
|
|
80
|
-
objc: 'objectivec',
|
|
81
|
-
objcpp: 'objectivecplusplus',
|
|
82
|
-
objectivecpp: 'objectivecplusplus',
|
|
83
|
-
pgsql: 'sql',
|
|
84
|
-
pl: 'perl',
|
|
85
|
-
plsql: 'sql',
|
|
86
|
-
postgres: 'sql',
|
|
87
|
-
postgresql: 'sql',
|
|
88
|
-
ps1: 'powershell',
|
|
89
|
-
py: 'python',
|
|
90
|
-
rake: 'ruby',
|
|
91
|
-
rb: 'ruby',
|
|
92
|
-
rbx: 'ruby',
|
|
93
|
-
rs: 'rust',
|
|
94
|
-
sass: 'css',
|
|
95
|
-
scss: 'css',
|
|
96
|
-
sh: 'shell',
|
|
97
|
-
solidity: 'sol',
|
|
98
|
-
sqlite: 'sql',
|
|
99
|
-
styl: 'css',
|
|
100
|
-
stylus: 'css',
|
|
101
|
-
xhtml: 'html',
|
|
102
|
-
yml: 'yaml',
|
|
103
|
-
zsh: 'shell'
|
|
104
|
-
};
|
|
105
|
-
var canonical = function canonical(language) {
|
|
106
|
-
if (language in modeAliases) return modeAliases[language];
|
|
107
|
-
return language;
|
|
108
|
-
};
|
|
109
|
-
exports["default"] = canonical;
|
|
110
|
-
|
|
111
|
-
/***/ },
|
|
112
|
-
|
|
113
|
-
/***/ 476
|
|
114
|
-
(__unused_webpack_module, exports) {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
119
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
120
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
121
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
122
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
123
|
-
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
124
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
125
|
-
value: true
|
|
126
|
-
}));
|
|
127
|
-
exports.modes = void 0;
|
|
128
|
-
exports.getMode = getMode;
|
|
129
|
-
// This is a mapping of languages that we support, but aren't directly loading the mode extension
|
|
130
|
-
// Within `/src/codeMirror/index.jsx` and /src/codeEditor.index.jsx
|
|
131
|
-
//
|
|
132
|
-
// This list also includes a number of language aliases, as because of the way we're using
|
|
133
|
-
// `CodeMirror.runMode` we can't take advantage of its known aliases in the mode extensions that
|
|
134
|
-
// we're loading.
|
|
135
|
-
//
|
|
136
|
-
// There are 2 types of lookup, single and array. e.g. `html` needs to be rendered using
|
|
137
|
-
// `htmlmixed`, but `java`, needs to be rendered using the `clike` mode.
|
|
138
|
-
//
|
|
139
|
-
exports.modes = {
|
|
140
|
-
asp: 'clike',
|
|
141
|
-
aspx: 'clike',
|
|
142
|
-
bash: 'shell',
|
|
143
|
-
c: 'clike',
|
|
144
|
-
'c#': ['clike', 'text/x-csharp'],
|
|
145
|
-
'c++': ['clike', 'text/x-c++src'],
|
|
146
|
-
clj: 'clojure',
|
|
147
|
-
cljc: 'clojure',
|
|
148
|
-
cljx: 'clojure',
|
|
149
|
-
coffeescript: 'javascript',
|
|
150
|
-
cplusplus: ['clike', 'text/x-c++src'],
|
|
151
|
-
cpp: ['clike', 'text/x-c++src'],
|
|
152
|
-
cql: ['sql', 'text/x-cassandra'],
|
|
153
|
-
cs: ['clike', 'text/x-csharp'],
|
|
154
|
-
csharp: ['clike', 'text/x-csharp'],
|
|
155
|
-
curl: 'shell',
|
|
156
|
-
d: 'd',
|
|
157
|
-
diff: 'diff',
|
|
158
|
-
ecmascript: 'javascript',
|
|
159
|
-
erl: 'erlang',
|
|
160
|
-
go: ['go', 'text/x-go'],
|
|
161
|
-
gradle: 'groovy',
|
|
162
|
-
gql: 'graphql',
|
|
163
|
-
handlebars: 'htmlmixed',
|
|
164
|
-
hbs: 'htmlmixed',
|
|
165
|
-
html: 'htmlmixed',
|
|
166
|
-
java: ['clike', 'text/x-java'],
|
|
167
|
-
jl: 'julia',
|
|
168
|
-
js: 'javascript',
|
|
169
|
-
jsx: 'jsx',
|
|
170
|
-
json: ['javascript', 'application/ld+json'],
|
|
171
|
-
jruby: 'ruby',
|
|
172
|
-
kotlin: ['clike', 'text/x-kotlin'],
|
|
173
|
-
kt: ['clike', 'text/x-kotlin'],
|
|
174
|
-
less: 'css',
|
|
175
|
-
liquid: 'htmlmixed',
|
|
176
|
-
lua: 'lua',
|
|
177
|
-
node: 'javascript',
|
|
178
|
-
macruby: 'ruby',
|
|
179
|
-
markdown: 'gfm',
|
|
180
|
-
md: 'gfm',
|
|
181
|
-
ml: ['mllike', 'text/x-ocaml'],
|
|
182
|
-
mssql: ['sql', 'text/x-mssql'],
|
|
183
|
-
mysql: ['sql', 'text/x-mysql'],
|
|
184
|
-
objc: ['clike', 'text/x-objectivec'],
|
|
185
|
-
'objc++': ['clike', 'text/x-objectivec++'],
|
|
186
|
-
objcpp: ['clike', 'text/x-objectivec++'],
|
|
187
|
-
objectivec: ['clike', 'text/x-objectivec'],
|
|
188
|
-
objectivecpp: ['clike', 'text/x-objectivec++'],
|
|
189
|
-
objectivecplusplus: ['clike', 'text/x-objectivec++'],
|
|
190
|
-
ocaml: ['mllike', 'text/x-ocaml'],
|
|
191
|
-
php: ['php', 'text/x-php'],
|
|
192
|
-
pgsql: ['sql', 'text/x-pgsql'],
|
|
193
|
-
pl: 'perl',
|
|
194
|
-
plsql: ['sql', 'text/x-plsql'],
|
|
195
|
-
postgres: ['sql', 'text/x-pgsql'],
|
|
196
|
-
postgresql: ['sql', 'text/x-pgsql'],
|
|
197
|
-
ps1: 'powershell',
|
|
198
|
-
py: 'python',
|
|
199
|
-
r: 'r',
|
|
200
|
-
rake: 'ruby',
|
|
201
|
-
rb: 'ruby',
|
|
202
|
-
rbx: 'ruby',
|
|
203
|
-
rs: 'rust',
|
|
204
|
-
sass: 'css',
|
|
205
|
-
scala: ['clike', 'text/x-scala'],
|
|
206
|
-
scss: 'css',
|
|
207
|
-
sh: 'shell',
|
|
208
|
-
sol: 'solidity',
|
|
209
|
-
solidity: 'solidity',
|
|
210
|
-
sql: ['sql', 'text/x-sql'],
|
|
211
|
-
sqlite: ['sql', 'text/x-sqlite'],
|
|
212
|
-
styl: 'css',
|
|
213
|
-
stylus: 'css',
|
|
214
|
-
text: ['null', 'text/plain'],
|
|
215
|
-
ts: ['javascript', 'text/typescript'],
|
|
216
|
-
typescript: ['javascript', 'text/typescript'],
|
|
217
|
-
xhtml: 'htmlmixed',
|
|
218
|
-
yml: 'yaml',
|
|
219
|
-
zsh: 'shell'
|
|
220
|
-
};
|
|
221
|
-
function getMode(lang) {
|
|
222
|
-
var mode = lang;
|
|
223
|
-
if (mode in exports.modes) {
|
|
224
|
-
mode = exports.modes[mode];
|
|
225
|
-
if (Array.isArray(mode)) {
|
|
226
|
-
var _mode = mode;
|
|
227
|
-
var _mode2 = _slicedToArray(_mode, 2);
|
|
228
|
-
mode = _mode2[1];
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
return mode;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
/***/ },
|
|
235
|
-
|
|
236
|
-
/***/ 704
|
|
237
|
-
(__unused_webpack_module, exports) {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
242
|
-
value: true
|
|
243
|
-
}));
|
|
244
|
-
exports["default"] = uppercase;
|
|
245
|
-
var codeTypes = {
|
|
246
|
-
asp: 'ASP.NET',
|
|
247
|
-
aspx: 'ASP.NET',
|
|
248
|
-
bash: 'Bash',
|
|
249
|
-
c: 'C',
|
|
250
|
-
'c#': 'C#',
|
|
251
|
-
'c++': 'C++',
|
|
252
|
-
coffeescript: 'CoffeeScript',
|
|
253
|
-
clj: 'Clojure',
|
|
254
|
-
cljc: 'Clojure',
|
|
255
|
-
cljx: 'Clojure',
|
|
256
|
-
clojure: 'Clojure',
|
|
257
|
-
cplusplus: 'C++',
|
|
258
|
-
cpp: 'C++',
|
|
259
|
-
cql: 'Cassandra',
|
|
260
|
-
cs: 'C#',
|
|
261
|
-
csharp: 'C#',
|
|
262
|
-
css: 'CSS',
|
|
263
|
-
curl: 'cURL',
|
|
264
|
-
d: 'D',
|
|
265
|
-
dart: 'Dart',
|
|
266
|
-
diff: 'Diff',
|
|
267
|
-
dockerfile: 'Dockerfile',
|
|
268
|
-
ecmascript: 'ECMAScript',
|
|
269
|
-
erl: 'Erlang',
|
|
270
|
-
erlang: 'Erlang',
|
|
271
|
-
go: 'Go',
|
|
272
|
-
gql: 'GraphQL',
|
|
273
|
-
gradle: 'Gradle',
|
|
274
|
-
graphql: 'GraphQL',
|
|
275
|
-
groovy: 'Groovy',
|
|
276
|
-
handlebars: 'Handlebars',
|
|
277
|
-
hbs: 'Handlebars',
|
|
278
|
-
haml: 'HAML',
|
|
279
|
-
haxe: 'Haxe',
|
|
280
|
-
html: 'HTML',
|
|
281
|
-
http: 'HTTP',
|
|
282
|
-
java: 'Java',
|
|
283
|
-
javascript: 'JavaScript',
|
|
284
|
-
jinja2: 'Jinja2',
|
|
285
|
-
jl: 'Julia',
|
|
286
|
-
jruby: 'JRuby',
|
|
287
|
-
js: 'JavaScript',
|
|
288
|
-
json: 'JSON',
|
|
289
|
-
jsx: 'JSX',
|
|
290
|
-
julia: 'Julia',
|
|
291
|
-
kotlin: 'Kotlin',
|
|
292
|
-
kt: 'Kotlin',
|
|
293
|
-
less: 'LESS',
|
|
294
|
-
liquid: 'Liquid',
|
|
295
|
-
lua: 'Lua',
|
|
296
|
-
macruby: 'MacRuby',
|
|
297
|
-
markdown: 'Markdown',
|
|
298
|
-
md: 'Markdown',
|
|
299
|
-
mermaid: 'Mermaid',
|
|
300
|
-
// syntax highlighting not supported yet
|
|
301
|
-
ml: 'OCaml',
|
|
302
|
-
mssql: 'SQL Server',
|
|
303
|
-
mysql: 'MySQL',
|
|
304
|
-
node: 'Node',
|
|
305
|
-
objc: 'Objective-C',
|
|
306
|
-
'objc++': 'Objective-C++',
|
|
307
|
-
objcpp: 'Objective-C++',
|
|
308
|
-
objectivec: 'Objective-C',
|
|
309
|
-
objectivecpp: 'Objective-C++',
|
|
310
|
-
objectivecplusplus: 'Objective-C++',
|
|
311
|
-
ocaml: 'OCaml',
|
|
312
|
-
perl: 'Perl',
|
|
313
|
-
php: 'PHP',
|
|
314
|
-
pl: 'Perl',
|
|
315
|
-
pgsql: 'PL/pgSQL',
|
|
316
|
-
plsql: 'PL/SQL',
|
|
317
|
-
postgres: 'PostgreSQL',
|
|
318
|
-
postgresql: 'PostgreSQL',
|
|
319
|
-
powershell: 'PowerShell',
|
|
320
|
-
ps1: 'PowerShell',
|
|
321
|
-
python: 'Python',
|
|
322
|
-
py: 'Python',
|
|
323
|
-
r: 'R',
|
|
324
|
-
rake: 'Rake',
|
|
325
|
-
rb: 'Ruby',
|
|
326
|
-
rbx: 'Rubinius',
|
|
327
|
-
rs: 'Rust',
|
|
328
|
-
ruby: 'Ruby',
|
|
329
|
-
rust: 'Rust',
|
|
330
|
-
sass: 'Sass',
|
|
331
|
-
scala: 'Scala',
|
|
332
|
-
scss: 'SCSS',
|
|
333
|
-
sh: 'Shell',
|
|
334
|
-
shell: 'Shell',
|
|
335
|
-
smarty: 'Smarty',
|
|
336
|
-
solidity: 'Solidity',
|
|
337
|
-
sql: 'SQL',
|
|
338
|
-
sqlite: 'SQLite',
|
|
339
|
-
stylus: 'Stylus',
|
|
340
|
-
styl: 'Stylus',
|
|
341
|
-
swift: 'Swift',
|
|
342
|
-
text: 'Text',
|
|
343
|
-
toml: 'TOML',
|
|
344
|
-
twig: 'Twig',
|
|
345
|
-
typescript: 'TypeScript',
|
|
346
|
-
xhtml: 'XHTML',
|
|
347
|
-
xml: 'XML',
|
|
348
|
-
yaml: 'YAML',
|
|
349
|
-
yml: 'YAML',
|
|
350
|
-
zsh: 'Zsh'
|
|
351
|
-
};
|
|
352
|
-
function uppercase(language) {
|
|
353
|
-
if (language in codeTypes) return codeTypes[language];
|
|
354
|
-
return language;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
/***/ }
|
|
358
|
-
|
|
359
|
-
/******/ });
|
|
360
|
-
/************************************************************************/
|
|
361
|
-
/******/ // The module cache
|
|
362
|
-
/******/ var __webpack_module_cache__ = {};
|
|
363
|
-
/******/
|
|
364
|
-
/******/ // The require function
|
|
365
|
-
/******/ function __webpack_require__(moduleId) {
|
|
366
|
-
/******/ // Check if module is in cache
|
|
367
|
-
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
368
|
-
/******/ if (cachedModule !== undefined) {
|
|
369
|
-
/******/ return cachedModule.exports;
|
|
370
|
-
/******/ }
|
|
371
|
-
/******/ // Create a new module (and put it into the cache)
|
|
372
|
-
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
373
|
-
/******/ // no module.id needed
|
|
374
|
-
/******/ // no module.loaded needed
|
|
375
|
-
/******/ exports: {}
|
|
376
|
-
/******/ };
|
|
377
|
-
/******/
|
|
378
|
-
/******/ // Execute the module function
|
|
379
|
-
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
380
|
-
/******/
|
|
381
|
-
/******/ // Return the exports of the module
|
|
382
|
-
/******/ return module.exports;
|
|
383
|
-
/******/ }
|
|
384
|
-
/******/
|
|
385
|
-
/************************************************************************/
|
|
386
|
-
/******/
|
|
387
|
-
/******/ // startup
|
|
388
|
-
/******/ // Load entry module and return exports
|
|
389
|
-
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
390
|
-
/******/ var __webpack_exports__ = __webpack_require__(638);
|
|
391
|
-
/******/ module.exports = __webpack_exports__;
|
|
392
|
-
/******/
|
|
393
|
-
/******/ })()
|
|
394
|
-
;
|
|
1
|
+
(()=>{"use strict";var e={638(e,l,t){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(l,"__esModule",{value:!0}),l.getMode=l.modes=l.canonical=l.uppercase=void 0;var r=s(t(42));l.canonical=r.default;var c=t(476);Object.defineProperty(l,"modes",{enumerable:!0,get:function(){return c.modes}}),Object.defineProperty(l,"getMode",{enumerable:!0,get:function(){return c.getMode}});var a=s(t(704));l.uppercase=a.default},42(e,l){Object.defineProperty(l,"__esModule",{value:!0});var t={aspx:"asp",bash:"shell","c++":"cplusplus","c#":"csharp",clj:"clojure",cljc:"clojure",cljx:"clojure",coffeescript:"javascript",cpp:"cplusplus",cql:"sql",cs:"csharp",docker:"dockerfile",ecmascript:"javascript",erl:"erlang",gql:"graphql",gradle:"groovy",handlebars:"html",hbs:"html",jl:"julia",jruby:"ruby",js:"javascript",kt:"kotlin",less:"css",macruby:"ruby",md:"markdown",ml:"ocaml",mssql:"sql",mysql:"sql",node:"javascript","obj-c":"objectivec","obj-c++":"objectivecplusplus","objc++":"objectivecplusplus",objc:"objectivec",objcpp:"objectivecplusplus",objectivecpp:"objectivecplusplus",pgsql:"sql",pl:"perl",plsql:"sql",postgres:"sql",postgresql:"sql",ps1:"powershell",py:"python",rake:"ruby",rb:"ruby",rbx:"ruby",rs:"rust",sass:"css",scss:"css",sh:"shell",solidity:"sol",sqlite:"sql",styl:"css",stylus:"css",xhtml:"html",yml:"yaml",zsh:"shell"};l.default=function(e){return e in t?t[e]:e}},476(e,l){function t(e,l){(null==l||l>e.length)&&(l=e.length);for(var t=0,s=Array(l);t<l;t++)s[t]=e[t];return s}Object.defineProperty(l,"__esModule",{value:!0}),l.modes=void 0,l.getMode=function(e){var s,r,c=e;return c in l.modes&&(c=l.modes[c],Array.isArray(c)&&(c=(s=c,r=2,function(e){if(Array.isArray(e))return e}(s)||function(e,l){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var s,r,c,a,o=[],i=!0,p=!1;try{if(c=(t=t.call(e)).next,0===l){if(Object(t)!==t)return;i=!1}else for(;!(i=(s=c.call(t)).done)&&(o.push(s.value),o.length!==l);i=!0);}catch(e){p=!0,r=e}finally{try{if(!i&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(p)throw r}}return o}}(s,r)||function(e,l){if(e){if("string"==typeof e)return t(e,l);var s={}.toString.call(e).slice(8,-1);return"Object"===s&&e.constructor&&(s=e.constructor.name),"Map"===s||"Set"===s?Array.from(e):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?t(e,l):void 0}}(s,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1])),c},l.modes={asp:"clike",aspx:"clike",bash:"shell",c:"clike","c#":["clike","text/x-csharp"],"c++":["clike","text/x-c++src"],clj:"clojure",cljc:"clojure",cljx:"clojure",coffeescript:"javascript",cplusplus:["clike","text/x-c++src"],cpp:["clike","text/x-c++src"],cql:["sql","text/x-cassandra"],cs:["clike","text/x-csharp"],csharp:["clike","text/x-csharp"],curl:"shell",d:"d",diff:"diff",ecmascript:"javascript",erl:"erlang",go:["go","text/x-go"],gradle:"groovy",gql:"graphql",handlebars:"htmlmixed",hbs:"htmlmixed",html:"htmlmixed",java:["clike","text/x-java"],jl:"julia",js:"javascript",jsx:"jsx",json:["javascript","application/ld+json"],jruby:"ruby",kotlin:["clike","text/x-kotlin"],kt:["clike","text/x-kotlin"],less:"css",liquid:"htmlmixed",lua:"lua",node:"javascript",macruby:"ruby",markdown:"gfm",md:"gfm",ml:["mllike","text/x-ocaml"],mssql:["sql","text/x-mssql"],mysql:["sql","text/x-mysql"],objc:["clike","text/x-objectivec"],"objc++":["clike","text/x-objectivec++"],objcpp:["clike","text/x-objectivec++"],objectivec:["clike","text/x-objectivec"],objectivecpp:["clike","text/x-objectivec++"],objectivecplusplus:["clike","text/x-objectivec++"],ocaml:["mllike","text/x-ocaml"],php:["php","text/x-php"],pgsql:["sql","text/x-pgsql"],pl:"perl",plsql:["sql","text/x-plsql"],postgres:["sql","text/x-pgsql"],postgresql:["sql","text/x-pgsql"],ps1:"powershell",py:"python",r:"r",rake:"ruby",rb:"ruby",rbx:"ruby",rs:"rust",sass:"css",scala:["clike","text/x-scala"],scss:"css",sh:"shell",sol:"solidity",solidity:"solidity",sql:["sql","text/x-sql"],sqlite:["sql","text/x-sqlite"],styl:"css",stylus:"css",text:["null","text/plain"],ts:["javascript","text/typescript"],typescript:["javascript","text/typescript"],xhtml:"htmlmixed",yml:"yaml",zsh:"shell"}},704(e,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=function(e){return e in t?t[e]:e};var t={asp:"ASP.NET",aspx:"ASP.NET",bash:"Bash",c:"C","c#":"C#","c++":"C++",coffeescript:"CoffeeScript",clj:"Clojure",cljc:"Clojure",cljx:"Clojure",clojure:"Clojure",cplusplus:"C++",cpp:"C++",cql:"Cassandra",cs:"C#",csharp:"C#",css:"CSS",curl:"cURL",d:"D",dart:"Dart",diff:"Diff",dockerfile:"Dockerfile",ecmascript:"ECMAScript",erl:"Erlang",erlang:"Erlang",go:"Go",gql:"GraphQL",gradle:"Gradle",graphql:"GraphQL",groovy:"Groovy",handlebars:"Handlebars",hbs:"Handlebars",haml:"HAML",haxe:"Haxe",html:"HTML",http:"HTTP",java:"Java",javascript:"JavaScript",jinja2:"Jinja2",jl:"Julia",jruby:"JRuby",js:"JavaScript",json:"JSON",jsx:"JSX",julia:"Julia",kotlin:"Kotlin",kt:"Kotlin",less:"LESS",liquid:"Liquid",lua:"Lua",macruby:"MacRuby",markdown:"Markdown",md:"Markdown",mermaid:"Mermaid",ml:"OCaml",mssql:"SQL Server",mysql:"MySQL",node:"Node",objc:"Objective-C","objc++":"Objective-C++",objcpp:"Objective-C++",objectivec:"Objective-C",objectivecpp:"Objective-C++",objectivecplusplus:"Objective-C++",ocaml:"OCaml",perl:"Perl",php:"PHP",pl:"Perl",pgsql:"PL/pgSQL",plsql:"PL/SQL",postgres:"PostgreSQL",postgresql:"PostgreSQL",powershell:"PowerShell",ps1:"PowerShell",python:"Python",py:"Python",r:"R",rake:"Rake",rb:"Ruby",rbx:"Rubinius",rs:"Rust",ruby:"Ruby",rust:"Rust",sass:"Sass",scala:"Scala",scss:"SCSS",sh:"Shell",shell:"Shell",smarty:"Smarty",solidity:"Solidity",sql:"SQL",sqlite:"SQLite",stylus:"Stylus",styl:"Stylus",swift:"Swift",text:"Text",toml:"TOML",twig:"Twig",typescript:"TypeScript",xhtml:"XHTML",xml:"XML",yaml:"YAML",yml:"YAML",zsh:"Zsh"}}};const l={};let t=function t(s){const r=l[s];if(void 0!==r)return r.exports;const c=l[s]={exports:{}};return e[s].call(c.exports,c,c.exports,t),c.exports}(638);module.exports=t})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@readme/syntax-highlighter",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.0.0",
|
|
4
4
|
"description": "ReadMe's React-based syntax highlighter",
|
|
5
5
|
"homepage": "https://readmeio.github.io/syntax-highlighter/",
|
|
6
6
|
"license": "ISC",
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/readmeio/syntax-highlighter.git"
|
|
10
10
|
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"dist-utils"
|
|
14
|
+
],
|
|
11
15
|
"main": "dist/index.node.js",
|
|
12
16
|
"browser": "dist/index.js",
|
|
13
17
|
"exports": {
|
|
@@ -39,7 +43,6 @@
|
|
|
39
43
|
},
|
|
40
44
|
"dependencies": {
|
|
41
45
|
"codemirror": "^5.54.0",
|
|
42
|
-
"codemirror-graphql": "1.3.2",
|
|
43
46
|
"prop-types": "^15.7.2",
|
|
44
47
|
"react-codemirror2": "^8.0.0"
|
|
45
48
|
},
|
|
@@ -50,14 +53,14 @@
|
|
|
50
53
|
"@readme/oxlint-config": "^1.1.2",
|
|
51
54
|
"@testing-library/jest-dom": "^6.4.2",
|
|
52
55
|
"@testing-library/react": "^16.3.0",
|
|
53
|
-
"@types/node": "^
|
|
56
|
+
"@types/node": "^26.1.0",
|
|
54
57
|
"@vitest/coverage-v8": "^4.1.5",
|
|
55
58
|
"babel-loader": "^10.0.0",
|
|
56
59
|
"css-loader": "^7.1.1",
|
|
57
60
|
"html-webpack-plugin": "^5.6.0",
|
|
58
61
|
"jsdom": "^29.1.1",
|
|
59
62
|
"knip": "^6.10.0",
|
|
60
|
-
"oxfmt": "^0.
|
|
63
|
+
"oxfmt": "^0.57.0",
|
|
61
64
|
"oxlint": "^1.62.0",
|
|
62
65
|
"sass": "^1.89.2",
|
|
63
66
|
"sass-loader": "^13.3.2",
|
package/.babelrc
DELETED
package/LICENSES
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# https://github.com/leachim6/hello-world/
|
|
2
|
-
|
|
3
|
-
MIT License
|
|
4
|
-
|
|
5
|
-
Copyright (c) 2018 Mike Donaghy [leachim6]
|
|
6
|
-
|
|
7
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
-
in the Software without restriction, including without limitation the rights
|
|
10
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
furnished to do so, subject to the following conditions:
|
|
13
|
-
|
|
14
|
-
The above copyright notice and this permission notice shall be included in all
|
|
15
|
-
copies or substantial portions of the Software.
|
|
16
|
-
|
|
17
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
-
SOFTWARE.
|
package/knip.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { KnipConfig } from 'knip';
|
|
2
|
-
|
|
3
|
-
const config: KnipConfig = {
|
|
4
|
-
entry: ['public/index.js', 'public/index.legacy.js'],
|
|
5
|
-
ignore: ['test/__fixtures__/**'],
|
|
6
|
-
ignoreDependencies: [
|
|
7
|
-
'@csstools/css-parser-algorithms', // required in order to get vitest/jsdom running in CI
|
|
8
|
-
'eslint-plugin-readme', // pulled in and used by oxlint
|
|
9
|
-
],
|
|
10
|
-
oxfmt: {
|
|
11
|
-
config: ['oxfmt.config.ts'],
|
|
12
|
-
},
|
|
13
|
-
oxlint: {
|
|
14
|
-
config: ['oxlint.config.ts'],
|
|
15
|
-
},
|
|
16
|
-
vitest: {
|
|
17
|
-
config: ['vitest.config.ts'],
|
|
18
|
-
entry: ['test/**/*.ts(x)?'],
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export default config;
|
package/public/favicon.ico
DELETED
|
Binary file
|