svelte-prism-action 1.1.2 → 1.1.4
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/README.md +7 -0
- package/package.json +9 -5
- package/src/actions/svelte-prism-action.js +7 -7
- package/src/actions/types/components.d.ts +635 -0
- package/src/actions/types/components.d.ts.map +1 -0
- package/src/actions/types/svelte-prism-action.d.ts +28 -0
- package/src/actions/types/svelte-prism-action.d.ts.map +1 -0
- package/src/index.d.ts +1 -0
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
[](https://www.npmjs.com/package/svelte-prism-action)
|
|
2
|
+
|
|
1
3
|
# svelte-prism-action
|
|
2
4
|
|
|
3
5
|
[Svelte](https://svelte.dev) action for **lazy loading** [Prism.js](https://prismjs.com) code highlighting languages from remote or local path.
|
|
@@ -83,6 +85,11 @@ You can also change the IntersectionObserver options. For more information on wh
|
|
|
83
85
|
|
|
84
86
|
## Changelog
|
|
85
87
|
|
|
88
|
+
### 1.1.3 (2024-04-17)
|
|
89
|
+
|
|
90
|
+
- Add: Typescript support (generated types from JSDoc)
|
|
91
|
+
- make svelte a peer dependency and version less restrictive (because should work with svelte version >= 3)
|
|
92
|
+
|
|
86
93
|
### 1.1.2 (2023-03-16)
|
|
87
94
|
|
|
88
95
|
- Fix: highlight fails when `prism-markup.js` import not finished
|
package/package.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-prism-action",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "Svelte action for lazy render code blocks with prism.js.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
|
+
"module": "src/index.js",
|
|
6
7
|
"scripts": {
|
|
7
8
|
"dev": "rollup -c -w",
|
|
8
|
-
"build": "npm run build:components && npm run build:example",
|
|
9
|
+
"build": "npm run build:components && npm run build:example && npm run generate-types",
|
|
9
10
|
"build:components": "node ./src/scripts/buildComponents.js",
|
|
10
11
|
"build:example": "rollup -c",
|
|
12
|
+
"generate-types": "npx -p typescript tsc src/actions/svelte-prism-action.js --declaration --allowJs --emitDeclarationOnly --declarationMap --outDir src/actions/types",
|
|
11
13
|
"start": "sirv public",
|
|
12
14
|
"test": "./node_modules/.bin/cypress run",
|
|
13
15
|
"cypress:open": "./node_modules/.bin/cypress open"
|
|
@@ -24,7 +26,7 @@
|
|
|
24
26
|
"type": "git",
|
|
25
27
|
"url": "https://github.com/thurti/svelte-prism-action"
|
|
26
28
|
},
|
|
27
|
-
"homepage": "",
|
|
29
|
+
"homepage": "https://thurti.github.io/svelte-prism-action/public/",
|
|
28
30
|
"bugs": {
|
|
29
31
|
"url": "https://github.com/thurti/svelte-prism-action/issues"
|
|
30
32
|
},
|
|
@@ -40,7 +42,9 @@
|
|
|
40
42
|
"sirv-cli": "^1.0.14"
|
|
41
43
|
},
|
|
42
44
|
"dependencies": {
|
|
43
|
-
"prismjs": "^1.29.0"
|
|
44
|
-
|
|
45
|
+
"prismjs": "^1.29.0"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"svelte": ">=3"
|
|
45
49
|
}
|
|
46
50
|
}
|
|
@@ -20,13 +20,13 @@ export const defaults = {
|
|
|
20
20
|
/**
|
|
21
21
|
* Svelte action for lazy render code blocks with prism.js.
|
|
22
22
|
*
|
|
23
|
-
* @param {
|
|
24
|
-
* @param {
|
|
25
|
-
* @param {
|
|
26
|
-
* @param {string}
|
|
27
|
-
* @param {number}
|
|
28
|
-
* @param {string}
|
|
29
|
-
* @param {
|
|
23
|
+
* @param {HTMLElement} node
|
|
24
|
+
* @param {Object} params
|
|
25
|
+
* @param {HTMLElement} [params.root=null] Root element for IntersectionObserver.
|
|
26
|
+
* @param {string} [params.rootMargin="100px"] Margin around root element.
|
|
27
|
+
* @param {number} [params.threshold=0] Threshold for IntersectionObserver.
|
|
28
|
+
* @param {string} [params.componentsUrl="https://unpkg.com/prismjs@1.22.0/components"] URL to prism.js component folder.
|
|
29
|
+
* @param {Object} [params.thirdPartyUrls={}] Object with third party language urls, eg. `{svelte: "https://url.to/prism-svelte/index.js"}`.
|
|
30
30
|
*/
|
|
31
31
|
export function prism(node, params) {
|
|
32
32
|
//merge params with defaults
|
|
@@ -0,0 +1,635 @@
|
|
|
1
|
+
export namespace components {
|
|
2
|
+
let languages: {
|
|
3
|
+
markup: {
|
|
4
|
+
alias: string[];
|
|
5
|
+
};
|
|
6
|
+
css: {};
|
|
7
|
+
clike: {};
|
|
8
|
+
javascript: {
|
|
9
|
+
alias: string;
|
|
10
|
+
require: string;
|
|
11
|
+
};
|
|
12
|
+
abap: {};
|
|
13
|
+
abnf: {};
|
|
14
|
+
actionscript: {
|
|
15
|
+
require: string;
|
|
16
|
+
};
|
|
17
|
+
ada: {};
|
|
18
|
+
agda: {};
|
|
19
|
+
al: {};
|
|
20
|
+
antlr4: {
|
|
21
|
+
alias: string;
|
|
22
|
+
};
|
|
23
|
+
apacheconf: {};
|
|
24
|
+
apex: {
|
|
25
|
+
require: string[];
|
|
26
|
+
};
|
|
27
|
+
apl: {};
|
|
28
|
+
applescript: {};
|
|
29
|
+
aql: {};
|
|
30
|
+
arduino: {
|
|
31
|
+
alias: string;
|
|
32
|
+
require: string;
|
|
33
|
+
};
|
|
34
|
+
arff: {};
|
|
35
|
+
armasm: {
|
|
36
|
+
alias: string;
|
|
37
|
+
};
|
|
38
|
+
arturo: {
|
|
39
|
+
alias: string;
|
|
40
|
+
};
|
|
41
|
+
asciidoc: {
|
|
42
|
+
alias: string;
|
|
43
|
+
};
|
|
44
|
+
aspnet: {
|
|
45
|
+
require: string[];
|
|
46
|
+
};
|
|
47
|
+
asm6502: {};
|
|
48
|
+
asmatmel: {};
|
|
49
|
+
autohotkey: {};
|
|
50
|
+
autoit: {};
|
|
51
|
+
avisynth: {
|
|
52
|
+
alias: string;
|
|
53
|
+
};
|
|
54
|
+
"avro-idl": {
|
|
55
|
+
alias: string;
|
|
56
|
+
};
|
|
57
|
+
awk: {
|
|
58
|
+
alias: string;
|
|
59
|
+
};
|
|
60
|
+
bash: {
|
|
61
|
+
alias: string[];
|
|
62
|
+
};
|
|
63
|
+
basic: {};
|
|
64
|
+
batch: {};
|
|
65
|
+
bbcode: {
|
|
66
|
+
alias: string;
|
|
67
|
+
};
|
|
68
|
+
bbj: {};
|
|
69
|
+
bicep: {};
|
|
70
|
+
birb: {
|
|
71
|
+
require: string;
|
|
72
|
+
};
|
|
73
|
+
bison: {
|
|
74
|
+
require: string;
|
|
75
|
+
};
|
|
76
|
+
bnf: {
|
|
77
|
+
alias: string;
|
|
78
|
+
};
|
|
79
|
+
bqn: {};
|
|
80
|
+
brainfuck: {};
|
|
81
|
+
brightscript: {};
|
|
82
|
+
bro: {};
|
|
83
|
+
bsl: {
|
|
84
|
+
alias: string;
|
|
85
|
+
};
|
|
86
|
+
c: {
|
|
87
|
+
require: string;
|
|
88
|
+
};
|
|
89
|
+
csharp: {
|
|
90
|
+
alias: string[];
|
|
91
|
+
require: string;
|
|
92
|
+
};
|
|
93
|
+
cpp: {
|
|
94
|
+
require: string;
|
|
95
|
+
};
|
|
96
|
+
cfscript: {
|
|
97
|
+
alias: string;
|
|
98
|
+
require: string;
|
|
99
|
+
};
|
|
100
|
+
chaiscript: {
|
|
101
|
+
require: string[];
|
|
102
|
+
};
|
|
103
|
+
cil: {};
|
|
104
|
+
cilkc: {
|
|
105
|
+
alias: string;
|
|
106
|
+
require: string;
|
|
107
|
+
};
|
|
108
|
+
cilkcpp: {
|
|
109
|
+
alias: string[];
|
|
110
|
+
require: string;
|
|
111
|
+
};
|
|
112
|
+
clojure: {};
|
|
113
|
+
cmake: {};
|
|
114
|
+
cobol: {};
|
|
115
|
+
coffeescript: {
|
|
116
|
+
alias: string;
|
|
117
|
+
require: string;
|
|
118
|
+
};
|
|
119
|
+
concurnas: {
|
|
120
|
+
alias: string;
|
|
121
|
+
};
|
|
122
|
+
csp: {};
|
|
123
|
+
cooklang: {};
|
|
124
|
+
coq: {};
|
|
125
|
+
crystal: {
|
|
126
|
+
require: string;
|
|
127
|
+
};
|
|
128
|
+
"css-extras": {
|
|
129
|
+
require: string;
|
|
130
|
+
};
|
|
131
|
+
csv: {};
|
|
132
|
+
cue: {};
|
|
133
|
+
cypher: {};
|
|
134
|
+
d: {
|
|
135
|
+
require: string;
|
|
136
|
+
};
|
|
137
|
+
dart: {
|
|
138
|
+
require: string;
|
|
139
|
+
};
|
|
140
|
+
dataweave: {};
|
|
141
|
+
dax: {};
|
|
142
|
+
dhall: {};
|
|
143
|
+
diff: {};
|
|
144
|
+
django: {
|
|
145
|
+
alias: string;
|
|
146
|
+
require: string;
|
|
147
|
+
};
|
|
148
|
+
"dns-zone-file": {
|
|
149
|
+
alias: string;
|
|
150
|
+
};
|
|
151
|
+
docker: {
|
|
152
|
+
alias: string;
|
|
153
|
+
};
|
|
154
|
+
dot: {
|
|
155
|
+
alias: string;
|
|
156
|
+
};
|
|
157
|
+
ebnf: {};
|
|
158
|
+
editorconfig: {};
|
|
159
|
+
eiffel: {};
|
|
160
|
+
ejs: {
|
|
161
|
+
alias: string;
|
|
162
|
+
require: string[];
|
|
163
|
+
};
|
|
164
|
+
elixir: {};
|
|
165
|
+
elm: {};
|
|
166
|
+
etlua: {
|
|
167
|
+
require: string[];
|
|
168
|
+
};
|
|
169
|
+
erb: {
|
|
170
|
+
require: string[];
|
|
171
|
+
};
|
|
172
|
+
erlang: {};
|
|
173
|
+
"excel-formula": {
|
|
174
|
+
alias: string[];
|
|
175
|
+
};
|
|
176
|
+
fsharp: {
|
|
177
|
+
require: string;
|
|
178
|
+
};
|
|
179
|
+
factor: {};
|
|
180
|
+
false: {};
|
|
181
|
+
"firestore-security-rules": {
|
|
182
|
+
require: string;
|
|
183
|
+
};
|
|
184
|
+
flow: {
|
|
185
|
+
require: string;
|
|
186
|
+
};
|
|
187
|
+
fortran: {};
|
|
188
|
+
ftl: {
|
|
189
|
+
require: string;
|
|
190
|
+
};
|
|
191
|
+
gml: {
|
|
192
|
+
alias: string;
|
|
193
|
+
require: string;
|
|
194
|
+
};
|
|
195
|
+
gap: {};
|
|
196
|
+
gcode: {};
|
|
197
|
+
gdscript: {};
|
|
198
|
+
gedcom: {};
|
|
199
|
+
gettext: {
|
|
200
|
+
alias: string;
|
|
201
|
+
};
|
|
202
|
+
gherkin: {};
|
|
203
|
+
git: {};
|
|
204
|
+
glsl: {
|
|
205
|
+
require: string;
|
|
206
|
+
};
|
|
207
|
+
gn: {
|
|
208
|
+
alias: string;
|
|
209
|
+
};
|
|
210
|
+
"linker-script": {
|
|
211
|
+
alias: string;
|
|
212
|
+
};
|
|
213
|
+
go: {
|
|
214
|
+
require: string;
|
|
215
|
+
};
|
|
216
|
+
"go-module": {
|
|
217
|
+
alias: string;
|
|
218
|
+
};
|
|
219
|
+
gradle: {
|
|
220
|
+
require: string;
|
|
221
|
+
};
|
|
222
|
+
graphql: {};
|
|
223
|
+
groovy: {
|
|
224
|
+
require: string;
|
|
225
|
+
};
|
|
226
|
+
haml: {
|
|
227
|
+
require: string;
|
|
228
|
+
};
|
|
229
|
+
handlebars: {
|
|
230
|
+
alias: string[];
|
|
231
|
+
require: string;
|
|
232
|
+
};
|
|
233
|
+
haskell: {
|
|
234
|
+
alias: string;
|
|
235
|
+
};
|
|
236
|
+
haxe: {
|
|
237
|
+
require: string;
|
|
238
|
+
};
|
|
239
|
+
hcl: {};
|
|
240
|
+
hlsl: {
|
|
241
|
+
require: string;
|
|
242
|
+
};
|
|
243
|
+
hoon: {};
|
|
244
|
+
http: {};
|
|
245
|
+
hpkp: {};
|
|
246
|
+
hsts: {};
|
|
247
|
+
ichigojam: {};
|
|
248
|
+
icon: {};
|
|
249
|
+
"icu-message-format": {};
|
|
250
|
+
idris: {
|
|
251
|
+
alias: string;
|
|
252
|
+
require: string;
|
|
253
|
+
};
|
|
254
|
+
ignore: {
|
|
255
|
+
alias: string[];
|
|
256
|
+
};
|
|
257
|
+
inform7: {};
|
|
258
|
+
ini: {};
|
|
259
|
+
io: {};
|
|
260
|
+
j: {};
|
|
261
|
+
java: {
|
|
262
|
+
require: string;
|
|
263
|
+
};
|
|
264
|
+
javadoc: {
|
|
265
|
+
require: string[];
|
|
266
|
+
};
|
|
267
|
+
javadoclike: {};
|
|
268
|
+
javastacktrace: {};
|
|
269
|
+
jexl: {};
|
|
270
|
+
jolie: {
|
|
271
|
+
require: string;
|
|
272
|
+
};
|
|
273
|
+
jq: {};
|
|
274
|
+
jsdoc: {
|
|
275
|
+
require: string[];
|
|
276
|
+
};
|
|
277
|
+
"js-extras": {
|
|
278
|
+
require: string;
|
|
279
|
+
};
|
|
280
|
+
json: {
|
|
281
|
+
alias: string;
|
|
282
|
+
};
|
|
283
|
+
json5: {
|
|
284
|
+
require: string;
|
|
285
|
+
};
|
|
286
|
+
jsonp: {
|
|
287
|
+
require: string;
|
|
288
|
+
};
|
|
289
|
+
jsstacktrace: {};
|
|
290
|
+
"js-templates": {
|
|
291
|
+
require: string;
|
|
292
|
+
};
|
|
293
|
+
julia: {};
|
|
294
|
+
keepalived: {};
|
|
295
|
+
keyman: {};
|
|
296
|
+
kotlin: {
|
|
297
|
+
alias: string[];
|
|
298
|
+
require: string;
|
|
299
|
+
};
|
|
300
|
+
kumir: {
|
|
301
|
+
alias: string;
|
|
302
|
+
};
|
|
303
|
+
kusto: {};
|
|
304
|
+
latex: {
|
|
305
|
+
alias: string[];
|
|
306
|
+
};
|
|
307
|
+
latte: {
|
|
308
|
+
require: string[];
|
|
309
|
+
};
|
|
310
|
+
less: {
|
|
311
|
+
require: string;
|
|
312
|
+
};
|
|
313
|
+
lilypond: {
|
|
314
|
+
alias: string;
|
|
315
|
+
require: string;
|
|
316
|
+
};
|
|
317
|
+
liquid: {
|
|
318
|
+
require: string;
|
|
319
|
+
};
|
|
320
|
+
lisp: {
|
|
321
|
+
alias: string[];
|
|
322
|
+
};
|
|
323
|
+
livescript: {};
|
|
324
|
+
llvm: {};
|
|
325
|
+
log: {};
|
|
326
|
+
lolcode: {};
|
|
327
|
+
lua: {};
|
|
328
|
+
magma: {};
|
|
329
|
+
makefile: {};
|
|
330
|
+
markdown: {
|
|
331
|
+
alias: string;
|
|
332
|
+
require: string;
|
|
333
|
+
};
|
|
334
|
+
"markup-templating": {
|
|
335
|
+
require: string;
|
|
336
|
+
};
|
|
337
|
+
mata: {};
|
|
338
|
+
matlab: {};
|
|
339
|
+
maxscript: {};
|
|
340
|
+
mel: {};
|
|
341
|
+
mermaid: {};
|
|
342
|
+
metafont: {};
|
|
343
|
+
mizar: {};
|
|
344
|
+
mongodb: {
|
|
345
|
+
require: string;
|
|
346
|
+
};
|
|
347
|
+
monkey: {};
|
|
348
|
+
moonscript: {
|
|
349
|
+
alias: string;
|
|
350
|
+
};
|
|
351
|
+
n1ql: {};
|
|
352
|
+
n4js: {
|
|
353
|
+
alias: string;
|
|
354
|
+
require: string;
|
|
355
|
+
};
|
|
356
|
+
"nand2tetris-hdl": {};
|
|
357
|
+
naniscript: {
|
|
358
|
+
alias: string;
|
|
359
|
+
};
|
|
360
|
+
nasm: {};
|
|
361
|
+
neon: {};
|
|
362
|
+
nevod: {};
|
|
363
|
+
nginx: {};
|
|
364
|
+
nim: {};
|
|
365
|
+
nix: {};
|
|
366
|
+
nsis: {};
|
|
367
|
+
objectivec: {
|
|
368
|
+
alias: string;
|
|
369
|
+
require: string;
|
|
370
|
+
};
|
|
371
|
+
ocaml: {};
|
|
372
|
+
odin: {};
|
|
373
|
+
opencl: {
|
|
374
|
+
require: string;
|
|
375
|
+
};
|
|
376
|
+
openqasm: {
|
|
377
|
+
alias: string;
|
|
378
|
+
};
|
|
379
|
+
oz: {};
|
|
380
|
+
parigp: {};
|
|
381
|
+
parser: {
|
|
382
|
+
require: string;
|
|
383
|
+
};
|
|
384
|
+
pascal: {
|
|
385
|
+
alias: string;
|
|
386
|
+
};
|
|
387
|
+
pascaligo: {};
|
|
388
|
+
psl: {};
|
|
389
|
+
pcaxis: {
|
|
390
|
+
alias: string;
|
|
391
|
+
};
|
|
392
|
+
peoplecode: {
|
|
393
|
+
alias: string;
|
|
394
|
+
};
|
|
395
|
+
perl: {};
|
|
396
|
+
php: {
|
|
397
|
+
require: string;
|
|
398
|
+
};
|
|
399
|
+
phpdoc: {
|
|
400
|
+
require: string[];
|
|
401
|
+
};
|
|
402
|
+
"php-extras": {
|
|
403
|
+
require: string;
|
|
404
|
+
};
|
|
405
|
+
"plant-uml": {
|
|
406
|
+
alias: string;
|
|
407
|
+
};
|
|
408
|
+
plsql: {
|
|
409
|
+
require: string;
|
|
410
|
+
};
|
|
411
|
+
powerquery: {
|
|
412
|
+
alias: string[];
|
|
413
|
+
};
|
|
414
|
+
powershell: {};
|
|
415
|
+
processing: {
|
|
416
|
+
require: string;
|
|
417
|
+
};
|
|
418
|
+
prolog: {};
|
|
419
|
+
promql: {};
|
|
420
|
+
properties: {};
|
|
421
|
+
protobuf: {
|
|
422
|
+
require: string;
|
|
423
|
+
};
|
|
424
|
+
pug: {
|
|
425
|
+
require: string[];
|
|
426
|
+
};
|
|
427
|
+
puppet: {};
|
|
428
|
+
pure: {};
|
|
429
|
+
purebasic: {
|
|
430
|
+
alias: string;
|
|
431
|
+
require: string;
|
|
432
|
+
};
|
|
433
|
+
purescript: {
|
|
434
|
+
alias: string;
|
|
435
|
+
require: string;
|
|
436
|
+
};
|
|
437
|
+
python: {
|
|
438
|
+
alias: string;
|
|
439
|
+
};
|
|
440
|
+
qsharp: {
|
|
441
|
+
alias: string;
|
|
442
|
+
require: string;
|
|
443
|
+
};
|
|
444
|
+
q: {};
|
|
445
|
+
qml: {
|
|
446
|
+
require: string;
|
|
447
|
+
};
|
|
448
|
+
qore: {
|
|
449
|
+
require: string;
|
|
450
|
+
};
|
|
451
|
+
r: {};
|
|
452
|
+
racket: {
|
|
453
|
+
alias: string;
|
|
454
|
+
require: string;
|
|
455
|
+
};
|
|
456
|
+
cshtml: {
|
|
457
|
+
alias: string;
|
|
458
|
+
require: string[];
|
|
459
|
+
};
|
|
460
|
+
jsx: {
|
|
461
|
+
require: string[];
|
|
462
|
+
};
|
|
463
|
+
tsx: {
|
|
464
|
+
require: string[];
|
|
465
|
+
};
|
|
466
|
+
reason: {
|
|
467
|
+
require: string;
|
|
468
|
+
};
|
|
469
|
+
regex: {};
|
|
470
|
+
rego: {};
|
|
471
|
+
renpy: {
|
|
472
|
+
alias: string;
|
|
473
|
+
};
|
|
474
|
+
rescript: {
|
|
475
|
+
alias: string;
|
|
476
|
+
};
|
|
477
|
+
rest: {};
|
|
478
|
+
rip: {};
|
|
479
|
+
roboconf: {};
|
|
480
|
+
robotframework: {
|
|
481
|
+
alias: string;
|
|
482
|
+
};
|
|
483
|
+
ruby: {
|
|
484
|
+
alias: string;
|
|
485
|
+
require: string;
|
|
486
|
+
};
|
|
487
|
+
rust: {};
|
|
488
|
+
sas: {};
|
|
489
|
+
sass: {
|
|
490
|
+
require: string;
|
|
491
|
+
};
|
|
492
|
+
scss: {
|
|
493
|
+
require: string;
|
|
494
|
+
};
|
|
495
|
+
scala: {
|
|
496
|
+
require: string;
|
|
497
|
+
};
|
|
498
|
+
scheme: {};
|
|
499
|
+
"shell-session": {
|
|
500
|
+
alias: string[];
|
|
501
|
+
require: string;
|
|
502
|
+
};
|
|
503
|
+
smali: {};
|
|
504
|
+
smalltalk: {};
|
|
505
|
+
smarty: {
|
|
506
|
+
require: string;
|
|
507
|
+
};
|
|
508
|
+
sml: {
|
|
509
|
+
alias: string;
|
|
510
|
+
};
|
|
511
|
+
solidity: {
|
|
512
|
+
alias: string;
|
|
513
|
+
require: string;
|
|
514
|
+
};
|
|
515
|
+
"solution-file": {
|
|
516
|
+
alias: string;
|
|
517
|
+
};
|
|
518
|
+
soy: {
|
|
519
|
+
require: string;
|
|
520
|
+
};
|
|
521
|
+
sparql: {
|
|
522
|
+
alias: string;
|
|
523
|
+
require: string;
|
|
524
|
+
};
|
|
525
|
+
"splunk-spl": {};
|
|
526
|
+
sqf: {
|
|
527
|
+
require: string;
|
|
528
|
+
};
|
|
529
|
+
sql: {};
|
|
530
|
+
squirrel: {
|
|
531
|
+
require: string;
|
|
532
|
+
};
|
|
533
|
+
stan: {};
|
|
534
|
+
stata: {
|
|
535
|
+
require: string[];
|
|
536
|
+
};
|
|
537
|
+
iecst: {};
|
|
538
|
+
stylus: {};
|
|
539
|
+
supercollider: {
|
|
540
|
+
alias: string;
|
|
541
|
+
};
|
|
542
|
+
swift: {};
|
|
543
|
+
systemd: {};
|
|
544
|
+
"t4-templating": {};
|
|
545
|
+
"t4-cs": {
|
|
546
|
+
alias: string;
|
|
547
|
+
require: string[];
|
|
548
|
+
};
|
|
549
|
+
"t4-vb": {
|
|
550
|
+
require: string[];
|
|
551
|
+
};
|
|
552
|
+
tap: {
|
|
553
|
+
require: string;
|
|
554
|
+
};
|
|
555
|
+
tcl: {};
|
|
556
|
+
tt2: {
|
|
557
|
+
require: string[];
|
|
558
|
+
};
|
|
559
|
+
textile: {
|
|
560
|
+
require: string;
|
|
561
|
+
};
|
|
562
|
+
toml: {};
|
|
563
|
+
tremor: {
|
|
564
|
+
alias: string[];
|
|
565
|
+
};
|
|
566
|
+
turtle: {
|
|
567
|
+
alias: string;
|
|
568
|
+
};
|
|
569
|
+
twig: {
|
|
570
|
+
require: string;
|
|
571
|
+
};
|
|
572
|
+
typescript: {
|
|
573
|
+
alias: string;
|
|
574
|
+
require: string;
|
|
575
|
+
};
|
|
576
|
+
typoscript: {
|
|
577
|
+
alias: string;
|
|
578
|
+
};
|
|
579
|
+
unrealscript: {
|
|
580
|
+
alias: string[];
|
|
581
|
+
};
|
|
582
|
+
uorazor: {};
|
|
583
|
+
uri: {
|
|
584
|
+
alias: string;
|
|
585
|
+
};
|
|
586
|
+
v: {
|
|
587
|
+
require: string;
|
|
588
|
+
};
|
|
589
|
+
vala: {
|
|
590
|
+
require: string;
|
|
591
|
+
};
|
|
592
|
+
vbnet: {
|
|
593
|
+
require: string;
|
|
594
|
+
};
|
|
595
|
+
velocity: {
|
|
596
|
+
require: string;
|
|
597
|
+
};
|
|
598
|
+
verilog: {};
|
|
599
|
+
vhdl: {};
|
|
600
|
+
vim: {};
|
|
601
|
+
"visual-basic": {
|
|
602
|
+
alias: string[];
|
|
603
|
+
};
|
|
604
|
+
warpscript: {};
|
|
605
|
+
wasm: {};
|
|
606
|
+
"web-idl": {
|
|
607
|
+
alias: string;
|
|
608
|
+
};
|
|
609
|
+
wgsl: {};
|
|
610
|
+
wiki: {
|
|
611
|
+
require: string;
|
|
612
|
+
};
|
|
613
|
+
wolfram: {
|
|
614
|
+
alias: string[];
|
|
615
|
+
};
|
|
616
|
+
wren: {};
|
|
617
|
+
xeora: {
|
|
618
|
+
alias: string;
|
|
619
|
+
require: string;
|
|
620
|
+
};
|
|
621
|
+
"xml-doc": {
|
|
622
|
+
require: string;
|
|
623
|
+
};
|
|
624
|
+
xojo: {};
|
|
625
|
+
xquery: {
|
|
626
|
+
require: string;
|
|
627
|
+
};
|
|
628
|
+
yaml: {
|
|
629
|
+
alias: string;
|
|
630
|
+
};
|
|
631
|
+
yang: {};
|
|
632
|
+
zig: {};
|
|
633
|
+
};
|
|
634
|
+
}
|
|
635
|
+
//# sourceMappingURL=components.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../components.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Svelte action for lazy render code blocks with prism.js.
|
|
3
|
+
*
|
|
4
|
+
* @param {HTMLElement} node
|
|
5
|
+
* @param {Object} params
|
|
6
|
+
* @param {HTMLElement} [params.root=null] Root element for IntersectionObserver.
|
|
7
|
+
* @param {string} [params.rootMargin="100px"] Margin around root element.
|
|
8
|
+
* @param {number} [params.threshold=0] Threshold for IntersectionObserver.
|
|
9
|
+
* @param {string} [params.componentsUrl="https://unpkg.com/prismjs@1.22.0/components"] URL to prism.js component folder.
|
|
10
|
+
* @param {Object} [params.thirdPartyUrls={}] Object with third party language urls, eg. `{svelte: "https://url.to/prism-svelte/index.js"}`.
|
|
11
|
+
*/
|
|
12
|
+
export function prism(node: HTMLElement, params: {
|
|
13
|
+
root?: HTMLElement;
|
|
14
|
+
rootMargin?: string;
|
|
15
|
+
threshold?: number;
|
|
16
|
+
componentsUrl?: string;
|
|
17
|
+
thirdPartyUrls?: any;
|
|
18
|
+
}): {
|
|
19
|
+
destroy(): void;
|
|
20
|
+
};
|
|
21
|
+
export namespace defaults {
|
|
22
|
+
let root: any;
|
|
23
|
+
let rootMargin: string;
|
|
24
|
+
let threshold: number;
|
|
25
|
+
let componentsUrl: string;
|
|
26
|
+
let thirdPartyUrls: {};
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=svelte-prism-action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svelte-prism-action.d.ts","sourceRoot":"","sources":["../svelte-prism-action.js"],"names":[],"mappings":"AAmBA;;;;;;;;;;GAUG;AACH,4BARW,WAAW;IAEU,IAAI,GAAzB,WAAW;IACK,UAAU,GAA1B,MAAM;IACU,SAAS,GAAzB,MAAM;IACU,aAAa,GAA7B,MAAM;IACU,cAAc;;;EAmIxC"}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./actions/types/svelte-prism-action";
|