@pipelex/mthds-ui 0.5.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.
@@ -0,0 +1,1333 @@
1
+ import {
2
+ __spreadProps,
3
+ __spreadValues
4
+ } from "../chunk-DDAAVRWG.js";
5
+
6
+ // src/shiki/highlighter.ts
7
+ import {
8
+ createHighlighterCore
9
+ } from "@shikijs/core";
10
+ import { createOnigurumaEngine } from "@shikijs/engine-oniguruma";
11
+ import darkPlus from "@shikijs/themes/dark-plus";
12
+ import dracula from "@shikijs/themes/dracula";
13
+ import monokai from "@shikijs/themes/monokai";
14
+ import oneDarkPro from "@shikijs/themes/one-dark-pro";
15
+
16
+ // src/shiki/mthds.tmLanguage.json
17
+ var mthds_tmLanguage_default = {
18
+ version: "1.0.0",
19
+ scopeName: "source.mthds",
20
+ uuid: "8b4e5008-c50d-11ea-a91b-54ee75aeeb97",
21
+ information_for_contributors: [
22
+ "Originally was maintained by aster (galaster@foxmail.com). This notice is only kept here for the record, please don't send e-mails about bugs and other issues."
23
+ ],
24
+ patterns: [
25
+ {
26
+ include: "#commentDirective"
27
+ },
28
+ {
29
+ include: "#comment"
30
+ },
31
+ {
32
+ include: "#table"
33
+ },
34
+ {
35
+ include: "#entryBegin"
36
+ },
37
+ {
38
+ include: "#value"
39
+ }
40
+ ],
41
+ repository: {
42
+ comment: {
43
+ captures: {
44
+ "1": {
45
+ name: "comment.line.number-sign.mthds"
46
+ },
47
+ "2": {
48
+ name: "punctuation.definition.comment.mthds"
49
+ }
50
+ },
51
+ comment: "Comments",
52
+ match: "\\s*((#).*)$"
53
+ },
54
+ commentDirective: {
55
+ captures: {
56
+ "1": {
57
+ name: "meta.preprocessor.mthds"
58
+ },
59
+ "2": {
60
+ name: "punctuation.definition.meta.preprocessor.mthds"
61
+ }
62
+ },
63
+ comment: "Comments",
64
+ match: "\\s*((#):.*)$"
65
+ },
66
+ table: {
67
+ patterns: [
68
+ {
69
+ name: "meta.table.concept.mthds",
70
+ match: "^\\s*(\\[)\\s*(concept(?:\\.[A-Z][A-Za-z0-9]*)?)\\s*(\\])",
71
+ captures: {
72
+ "1": {
73
+ name: "punctuation.definition.table.mthds"
74
+ },
75
+ "2": {
76
+ patterns: [
77
+ {
78
+ match: "concept",
79
+ name: "entity.name.type.concept.mthds"
80
+ },
81
+ {
82
+ match: "\\.",
83
+ name: "punctuation.separator.dot.mthds"
84
+ },
85
+ {
86
+ match: "[A-Z][A-Za-z0-9]*",
87
+ name: "entity.name.type.concept.mthds"
88
+ }
89
+ ]
90
+ },
91
+ "3": {
92
+ name: "punctuation.definition.table.mthds"
93
+ }
94
+ }
95
+ },
96
+ {
97
+ name: "meta.table.pipe.mthds",
98
+ match: "^\\s*(\\[)\\s*(pipe(?:\\.[a-z][a-z0-9_]*)?)\\s*(\\])",
99
+ captures: {
100
+ "1": {
101
+ name: "punctuation.definition.table.mthds"
102
+ },
103
+ "2": {
104
+ patterns: [
105
+ {
106
+ match: "pipe",
107
+ name: "entity.name.tag.pipe.mthds"
108
+ },
109
+ {
110
+ match: "\\.",
111
+ name: "punctuation.separator.dot.mthds"
112
+ },
113
+ {
114
+ match: "[a-z][a-z0-9_]*",
115
+ name: "entity.name.tag.pipe.mthds"
116
+ }
117
+ ]
118
+ },
119
+ "3": {
120
+ name: "punctuation.definition.table.mthds"
121
+ }
122
+ }
123
+ },
124
+ {
125
+ name: "meta.table.mthds",
126
+ match: `^\\s*(\\[)\\s*((?:(?:(?:(?:[A-Za-z0-9_+-]+))|(?:"[^"]+")|(?:'[^']+'))\\s*\\.?\\s*)+)\\s*(\\])`,
127
+ captures: {
128
+ "1": {
129
+ name: "punctuation.definition.table.mthds"
130
+ },
131
+ "2": {
132
+ patterns: [
133
+ {
134
+ match: `(?:(?:[A-Za-z0-9_+-]+))|(?:"[^"]+")|(?:'[^']+')`,
135
+ name: "support.type.property-name.table.mthds"
136
+ },
137
+ {
138
+ match: "\\.",
139
+ name: "punctuation.separator.dot.mthds"
140
+ }
141
+ ]
142
+ },
143
+ "3": {
144
+ name: "punctuation.definition.table.mthds"
145
+ }
146
+ }
147
+ },
148
+ {
149
+ name: "meta.array.table.mthds",
150
+ match: `^\\s*(\\[\\[)\\s*((?:(?:(?:(?:[A-Za-z0-9_+-]+))|(?:"[^"]+")|(?:'[^']+'))\\s*\\.?\\s*)+)\\s*(\\]\\])`,
151
+ captures: {
152
+ "1": {
153
+ name: "punctuation.definition.array.table.mthds"
154
+ },
155
+ "2": {
156
+ patterns: [
157
+ {
158
+ match: `(?:(?:[A-Za-z0-9_+-]+))|(?:"[^"]+")|(?:'[^']+')`,
159
+ name: "support.type.property-name.array.mthds"
160
+ },
161
+ {
162
+ match: "\\.",
163
+ name: "punctuation.separator.dot.mthds"
164
+ }
165
+ ]
166
+ },
167
+ "3": {
168
+ name: "punctuation.definition.array.table.mthds"
169
+ }
170
+ }
171
+ },
172
+ {
173
+ begin: "(\\{)",
174
+ end: "(\\})",
175
+ name: "meta.table.inline.mthds",
176
+ beginCaptures: {
177
+ "1": {
178
+ name: "punctuation.definition.table.inline.mthds"
179
+ }
180
+ },
181
+ endCaptures: {
182
+ "1": {
183
+ name: "punctuation.definition.table.inline.mthds"
184
+ }
185
+ },
186
+ patterns: [
187
+ {
188
+ include: "#comment"
189
+ },
190
+ {
191
+ match: ",",
192
+ name: "punctuation.separator.table.inline.mthds"
193
+ },
194
+ {
195
+ include: "#entryBegin"
196
+ },
197
+ {
198
+ include: "#value"
199
+ }
200
+ ]
201
+ }
202
+ ]
203
+ },
204
+ entryBegin: {
205
+ patterns: [
206
+ {
207
+ name: "meta.entry.pipe-ref-package.mthds",
208
+ match: '\\s*(pipe)\\s*(=)\\s*(")([a-z][a-z0-9.-]*(?:/[A-Za-z][A-Za-z0-9_-]*){2})(/[a-z][a-z0-9_]*)(->)(?:([a-z][a-z0-9_]*(?:\\.[a-z][a-z0-9_]*)*)(\\.))?([a-z][a-z0-9_]*)(")',
209
+ captures: {
210
+ "1": {
211
+ name: "support.type.property-name.mthds"
212
+ },
213
+ "2": {
214
+ name: "punctuation.eq.mthds"
215
+ },
216
+ "3": {
217
+ name: "punctuation.definition.string.begin.mthds"
218
+ },
219
+ "4": {
220
+ name: "punctuation.separator.namespace.mthds"
221
+ },
222
+ "5": {
223
+ name: "punctuation.separator.namespace.mthds"
224
+ },
225
+ "6": {
226
+ name: "keyword.operator.arrow.mthds"
227
+ },
228
+ "7": {
229
+ name: "punctuation.separator.namespace.mthds"
230
+ },
231
+ "8": {
232
+ name: "punctuation.separator.dot.mthds"
233
+ },
234
+ "9": {
235
+ name: "entity.name.tag.pipe-name.mthds"
236
+ },
237
+ "10": {
238
+ name: "punctuation.definition.string.end.mthds"
239
+ }
240
+ }
241
+ },
242
+ {
243
+ name: "meta.entry.pipe-ref.mthds",
244
+ match: '\\s*(pipe)\\s*(=)\\s*(")(?:([a-z][a-z0-9_]*(?:\\.[a-z][a-z0-9_]*)*)(\\.))?([a-z][a-z0-9_]*)(")',
245
+ captures: {
246
+ "1": {
247
+ name: "support.type.property-name.mthds"
248
+ },
249
+ "2": {
250
+ name: "punctuation.eq.mthds"
251
+ },
252
+ "3": {
253
+ name: "punctuation.definition.string.begin.mthds"
254
+ },
255
+ "4": {
256
+ name: "punctuation.separator.namespace.mthds"
257
+ },
258
+ "5": {
259
+ name: "punctuation.separator.dot.mthds"
260
+ },
261
+ "6": {
262
+ name: "entity.name.tag.pipe-name.mthds"
263
+ },
264
+ "7": {
265
+ name: "punctuation.definition.string.end.mthds"
266
+ }
267
+ }
268
+ },
269
+ {
270
+ name: "meta.entry.pipe.mthds",
271
+ match: `^\\s*(pipe(?:\\.(?:[A-Za-z0-9_+-]+|"[^"]+"|'[^']+'))?)\\s*(=)`,
272
+ captures: {
273
+ "1": {
274
+ patterns: [
275
+ {
276
+ match: "pipe",
277
+ name: "entity.name.tag.pipe.mthds"
278
+ },
279
+ {
280
+ match: "\\.",
281
+ name: "punctuation.separator.dot.mthds"
282
+ },
283
+ {
284
+ match: `(?:(?:[A-Za-z0-9_+-]+))|(?:"[^"]+")|(?:'[^']+')`,
285
+ name: "entity.name.tag.pipe.mthds"
286
+ }
287
+ ]
288
+ },
289
+ "2": {
290
+ name: "punctuation.eq.mthds"
291
+ }
292
+ }
293
+ },
294
+ {
295
+ name: "meta.entry.output-type.mthds",
296
+ match: '\\s*(output)\\s*(=)\\s*(")(?:([a-z][a-z0-9_]*)(\\.))?([A-Z][A-Za-z0-9]*)(\\[\\d*\\])?(")',
297
+ captures: {
298
+ "1": {
299
+ name: "support.type.property-name.mthds"
300
+ },
301
+ "2": {
302
+ name: "punctuation.eq.mthds"
303
+ },
304
+ "3": {
305
+ name: "punctuation.definition.string.begin.mthds"
306
+ },
307
+ "4": {
308
+ name: "punctuation.separator.namespace.mthds"
309
+ },
310
+ "5": {
311
+ name: "punctuation.separator.dot.mthds"
312
+ },
313
+ "6": {
314
+ name: "entity.name.type.concept.mthds"
315
+ },
316
+ "7": {
317
+ name: "punctuation.definition.multiplicity.mthds"
318
+ },
319
+ "8": {
320
+ name: "punctuation.definition.string.end.mthds"
321
+ }
322
+ }
323
+ },
324
+ {
325
+ name: "meta.entry.refines-type.mthds",
326
+ match: '\\s*(refines)\\s*(=)\\s*(")(?:([a-z][a-z0-9_]*)(\\.))?([A-Z][A-Za-z0-9]*)(\\[\\d*\\])?(")',
327
+ captures: {
328
+ "1": {
329
+ name: "support.type.property-name.mthds"
330
+ },
331
+ "2": {
332
+ name: "punctuation.eq.mthds"
333
+ },
334
+ "3": {
335
+ name: "punctuation.definition.string.begin.mthds"
336
+ },
337
+ "4": {
338
+ name: "punctuation.separator.namespace.mthds"
339
+ },
340
+ "5": {
341
+ name: "punctuation.separator.dot.mthds"
342
+ },
343
+ "6": {
344
+ name: "entity.name.type.concept.mthds"
345
+ },
346
+ "7": {
347
+ name: "punctuation.definition.multiplicity.mthds"
348
+ },
349
+ "8": {
350
+ name: "punctuation.definition.string.end.mthds"
351
+ }
352
+ }
353
+ },
354
+ {
355
+ name: "meta.entry.type.mthds",
356
+ match: '\\s*(type)\\s*(=)\\s*(")(Pipe[A-Z][A-Za-z0-9]*)(")',
357
+ captures: {
358
+ "1": {
359
+ name: "support.type.property-name.mthds"
360
+ },
361
+ "2": {
362
+ name: "punctuation.eq.mthds"
363
+ },
364
+ "3": {
365
+ name: "punctuation.definition.string.begin.mthds"
366
+ },
367
+ "4": {
368
+ name: "entity.name.tag.pipe-type.mthds"
369
+ },
370
+ "5": {
371
+ name: "punctuation.definition.string.end.mthds"
372
+ }
373
+ }
374
+ },
375
+ {
376
+ name: "meta.entry.model.mthds",
377
+ match: '\\s*(model)\\s*(=)\\s*(")([$@~#])([a-zA-Z][a-zA-Z0-9_-]*)(")',
378
+ captures: {
379
+ "1": {
380
+ name: "support.type.property-name.mthds"
381
+ },
382
+ "2": {
383
+ name: "punctuation.eq.mthds"
384
+ },
385
+ "3": {
386
+ name: "punctuation.definition.string.begin.mthds"
387
+ },
388
+ "4": {
389
+ name: "storage.modifier.mthds"
390
+ },
391
+ "5": {
392
+ name: "constant.other.symbol.mthds"
393
+ },
394
+ "6": {
395
+ name: "punctuation.definition.string.end.mthds"
396
+ }
397
+ }
398
+ },
399
+ {
400
+ name: "meta.entry.model.mthds",
401
+ match: '\\s*(model)\\s*(=)\\s*(")([a-zA-Z][a-zA-Z0-9_.:-]*)(")',
402
+ captures: {
403
+ "1": {
404
+ name: "support.type.property-name.mthds"
405
+ },
406
+ "2": {
407
+ name: "punctuation.eq.mthds"
408
+ },
409
+ "3": {
410
+ name: "punctuation.definition.string.begin.mthds"
411
+ },
412
+ "4": {
413
+ name: "constant.other.symbol.mthds"
414
+ },
415
+ "5": {
416
+ name: "punctuation.definition.string.end.mthds"
417
+ }
418
+ }
419
+ },
420
+ {
421
+ name: "meta.entry.jinja2-template.mthds",
422
+ begin: '\\s*(jinja2)\\s*(=)\\s*(""")',
423
+ end: '(""")',
424
+ beginCaptures: {
425
+ "1": {
426
+ name: "support.type.property-name.mthds"
427
+ },
428
+ "2": {
429
+ name: "punctuation.eq.mthds"
430
+ },
431
+ "3": {
432
+ name: "punctuation.definition.string.begin.mthds"
433
+ }
434
+ },
435
+ endCaptures: {
436
+ "1": {
437
+ name: "punctuation.definition.string.end.mthds"
438
+ }
439
+ },
440
+ contentName: "string.quoted.triple.basic.block.jinja2.mthds",
441
+ patterns: [
442
+ {
443
+ include: "#jinjaTemplateContent"
444
+ },
445
+ {
446
+ include: "#htmlContent"
447
+ },
448
+ {
449
+ include: "#stringEscapes"
450
+ },
451
+ {
452
+ include: "#dataInjection"
453
+ },
454
+ {
455
+ include: "#templateVariable"
456
+ }
457
+ ]
458
+ },
459
+ {
460
+ name: "meta.entry.jinja2-template-line.mthds",
461
+ begin: '\\s*(jinja2)\\s*(=)\\s*(")',
462
+ end: '(")',
463
+ beginCaptures: {
464
+ "1": {
465
+ name: "support.type.property-name.mthds"
466
+ },
467
+ "2": {
468
+ name: "punctuation.eq.mthds"
469
+ },
470
+ "3": {
471
+ name: "punctuation.definition.string.begin.mthds"
472
+ }
473
+ },
474
+ endCaptures: {
475
+ "1": {
476
+ name: "punctuation.definition.string.end.mthds"
477
+ }
478
+ },
479
+ contentName: "string.quoted.single.basic.line.jinja2.mthds",
480
+ patterns: [
481
+ {
482
+ include: "#jinjaTemplateContent"
483
+ },
484
+ {
485
+ include: "#htmlContent"
486
+ },
487
+ {
488
+ include: "#stringEscapes"
489
+ },
490
+ {
491
+ include: "#dataInjection"
492
+ },
493
+ {
494
+ include: "#templateVariable"
495
+ }
496
+ ]
497
+ },
498
+ {
499
+ name: "meta.entry.prompt-template.mthds",
500
+ begin: '\\s*(prompt_template)\\s*(=)\\s*(""")',
501
+ end: '(""")',
502
+ beginCaptures: {
503
+ "1": {
504
+ name: "support.type.property-name.mthds"
505
+ },
506
+ "2": {
507
+ name: "punctuation.eq.mthds"
508
+ },
509
+ "3": {
510
+ name: "punctuation.definition.string.begin.mthds"
511
+ }
512
+ },
513
+ endCaptures: {
514
+ "1": {
515
+ name: "punctuation.definition.string.end.mthds"
516
+ }
517
+ },
518
+ contentName: "string.quoted.triple.basic.block.prompt.mthds",
519
+ patterns: [
520
+ {
521
+ include: "#jinjaTemplateContent"
522
+ },
523
+ {
524
+ include: "#stringEscapes"
525
+ },
526
+ {
527
+ include: "#dataInjection"
528
+ },
529
+ {
530
+ include: "#templateVariable"
531
+ }
532
+ ]
533
+ },
534
+ {
535
+ name: "meta.entry.prompt-template-line.mthds",
536
+ begin: '\\s*(prompt_template)\\s*(=)\\s*(")',
537
+ end: '(")',
538
+ beginCaptures: {
539
+ "1": {
540
+ name: "support.type.property-name.mthds"
541
+ },
542
+ "2": {
543
+ name: "punctuation.eq.mthds"
544
+ },
545
+ "3": {
546
+ name: "punctuation.definition.string.begin.mthds"
547
+ }
548
+ },
549
+ endCaptures: {
550
+ "1": {
551
+ name: "punctuation.definition.string.end.mthds"
552
+ }
553
+ },
554
+ contentName: "string.quoted.single.basic.line.prompt.mthds",
555
+ patterns: [
556
+ {
557
+ include: "#jinjaTemplateContent"
558
+ },
559
+ {
560
+ include: "#stringEscapes"
561
+ },
562
+ {
563
+ include: "#dataInjection"
564
+ },
565
+ {
566
+ include: "#templateVariable"
567
+ }
568
+ ]
569
+ },
570
+ {
571
+ name: "meta.entry.concept-value.mthds",
572
+ match: '\\s*((?!(?:description|prompt|system_prompt|name|model_to_structure)\\b)[a-z][a-z0-9_]*)\\s*(=)\\s*(")(?:([a-z][a-z0-9_]*)(\\.))?([A-Z][A-Za-z0-9]*)(\\[\\d*\\])?(")',
573
+ captures: {
574
+ "1": {
575
+ name: "support.type.property-name.mthds"
576
+ },
577
+ "2": {
578
+ name: "punctuation.eq.mthds"
579
+ },
580
+ "3": {
581
+ name: "punctuation.definition.string.begin.mthds"
582
+ },
583
+ "4": {
584
+ name: "punctuation.separator.namespace.mthds"
585
+ },
586
+ "5": {
587
+ name: "punctuation.separator.dot.mthds"
588
+ },
589
+ "6": {
590
+ name: "entity.name.type.concept.mthds"
591
+ },
592
+ "7": {
593
+ name: "punctuation.definition.multiplicity.mthds"
594
+ },
595
+ "8": {
596
+ name: "punctuation.definition.string.end.mthds"
597
+ }
598
+ }
599
+ },
600
+ {
601
+ name: "meta.entry.mthds",
602
+ match: `\\s*((?:(?:(?:(?:[A-Za-z0-9_+-]+))|(?:"[^"]+")|(?:'[^']+'))\\s*\\.?\\s*)+)\\s*(=)`,
603
+ captures: {
604
+ "1": {
605
+ patterns: [
606
+ {
607
+ match: `(?:(?:[A-Za-z0-9_+-]+))|(?:"[^"]+")|(?:'[^']+')`,
608
+ name: "support.type.property-name.mthds"
609
+ },
610
+ {
611
+ match: "\\.",
612
+ name: "punctuation.separator.dot.mthds"
613
+ }
614
+ ]
615
+ },
616
+ "2": {
617
+ name: "punctuation.eq.mthds"
618
+ }
619
+ }
620
+ }
621
+ ]
622
+ },
623
+ value: {
624
+ patterns: [
625
+ {
626
+ name: "string.quoted.triple.basic.block.mthds",
627
+ begin: '"""',
628
+ end: '"""',
629
+ patterns: [
630
+ {
631
+ include: "#jinjaTemplateContent"
632
+ },
633
+ {
634
+ include: "#htmlContent"
635
+ },
636
+ {
637
+ include: "#stringEscapes"
638
+ },
639
+ {
640
+ include: "#dataInjection"
641
+ },
642
+ {
643
+ include: "#templateVariable"
644
+ }
645
+ ]
646
+ },
647
+ {
648
+ name: "string.quoted.single.basic.line.mthds",
649
+ begin: '"',
650
+ end: '"',
651
+ patterns: [
652
+ {
653
+ include: "#jinjaTemplateContent"
654
+ },
655
+ {
656
+ include: "#htmlContent"
657
+ },
658
+ {
659
+ include: "#stringEscapes"
660
+ },
661
+ {
662
+ include: "#dataInjection"
663
+ },
664
+ {
665
+ include: "#templateVariable"
666
+ }
667
+ ]
668
+ },
669
+ {
670
+ name: "string.quoted.triple.literal.block.mthds",
671
+ begin: "'''",
672
+ end: "'''"
673
+ },
674
+ {
675
+ name: "string.quoted.single.literal.line.mthds",
676
+ begin: "'",
677
+ end: "'"
678
+ },
679
+ {
680
+ captures: {
681
+ "1": {
682
+ name: "constant.other.time.datetime.offset.mthds"
683
+ }
684
+ },
685
+ match: "(?<!\\w)(\\d{4}\\-\\d{2}\\-\\d{2}[T ]\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[\\+\\-]\\d{2}:\\d{2}))(?!\\w)"
686
+ },
687
+ {
688
+ captures: {
689
+ "1": {
690
+ name: "constant.other.time.datetime.local.mthds"
691
+ }
692
+ },
693
+ match: "(\\d{4}\\-\\d{2}\\-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?)"
694
+ },
695
+ {
696
+ name: "constant.other.time.date.mthds",
697
+ match: "\\d{4}\\-\\d{2}\\-\\d{2}"
698
+ },
699
+ {
700
+ name: "constant.other.time.time.mthds",
701
+ match: "\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?"
702
+ },
703
+ {
704
+ match: "(?<!\\w)(true|false)(?!\\w)",
705
+ captures: {
706
+ "1": {
707
+ name: "constant.language.boolean.mthds"
708
+ }
709
+ }
710
+ },
711
+ {
712
+ match: "(?<!\\w)([\\+\\-]?(0|([1-9](([0-9]|_[0-9])+)?))(?:(?:\\.([0-9]+))?[eE][\\+\\-]?[1-9]_?[0-9]*|(?:\\.[0-9_]*)))(?!\\w)",
713
+ captures: {
714
+ "1": {
715
+ name: "constant.numeric.float.mthds"
716
+ }
717
+ }
718
+ },
719
+ {
720
+ match: "(?<!\\w)((?:[\\+\\-]?(0|([1-9](([0-9]|_[0-9])+)?))))(?!\\w)",
721
+ captures: {
722
+ "1": {
723
+ name: "constant.numeric.integer.mthds"
724
+ }
725
+ }
726
+ },
727
+ {
728
+ match: "(?<!\\w)([\\+\\-]?inf)(?!\\w)",
729
+ captures: {
730
+ "1": {
731
+ name: "constant.numeric.inf.mthds"
732
+ }
733
+ }
734
+ },
735
+ {
736
+ match: "(?<!\\w)([\\+\\-]?nan)(?!\\w)",
737
+ captures: {
738
+ "1": {
739
+ name: "constant.numeric.nan.mthds"
740
+ }
741
+ }
742
+ },
743
+ {
744
+ match: "(?<!\\w)((?:0x(([0-9a-fA-F](([0-9a-fA-F]|_[0-9a-fA-F])+)?))))(?!\\w)",
745
+ captures: {
746
+ "1": {
747
+ name: "constant.numeric.hex.mthds"
748
+ }
749
+ }
750
+ },
751
+ {
752
+ match: "(?<!\\w)(0o[0-7](_?[0-7])*)(?!\\w)",
753
+ captures: {
754
+ "1": {
755
+ name: "constant.numeric.oct.mthds"
756
+ }
757
+ }
758
+ },
759
+ {
760
+ match: "(?<!\\w)(0b[01](_?[01])*)(?!\\w)",
761
+ captures: {
762
+ "1": {
763
+ name: "constant.numeric.bin.mthds"
764
+ }
765
+ }
766
+ },
767
+ {
768
+ name: "meta.array.mthds",
769
+ begin: "(?<!\\w)(\\[)\\s*",
770
+ end: "\\s*(\\])(?!\\w)",
771
+ beginCaptures: {
772
+ "1": {
773
+ name: "punctuation.definition.array.mthds"
774
+ }
775
+ },
776
+ endCaptures: {
777
+ "1": {
778
+ name: "punctuation.definition.array.mthds"
779
+ }
780
+ },
781
+ patterns: [
782
+ {
783
+ match: ",",
784
+ name: "punctuation.separator.array.mthds"
785
+ },
786
+ {
787
+ include: "#comment"
788
+ },
789
+ {
790
+ include: "#value"
791
+ }
792
+ ]
793
+ },
794
+ {
795
+ begin: "(\\{)",
796
+ end: "(\\})",
797
+ name: "meta.table.inline.mthds",
798
+ beginCaptures: {
799
+ "1": {
800
+ name: "punctuation.definition.table.inline.mthds"
801
+ }
802
+ },
803
+ endCaptures: {
804
+ "1": {
805
+ name: "punctuation.definition.table.inline.mthds"
806
+ }
807
+ },
808
+ patterns: [
809
+ {
810
+ include: "#comment"
811
+ },
812
+ {
813
+ match: ",",
814
+ name: "punctuation.separator.table.inline.mthds"
815
+ },
816
+ {
817
+ include: "#entryBegin"
818
+ },
819
+ {
820
+ include: "#value"
821
+ }
822
+ ]
823
+ }
824
+ ]
825
+ },
826
+ jinjaTemplateContent: {
827
+ patterns: [
828
+ {
829
+ name: "meta.embedded.block.jinja.mthds",
830
+ begin: "(\\{%)",
831
+ end: "(%\\})",
832
+ beginCaptures: {
833
+ "1": {
834
+ name: "punctuation.definition.jinja.mthds"
835
+ }
836
+ },
837
+ endCaptures: {
838
+ "1": {
839
+ name: "punctuation.definition.jinja.mthds"
840
+ }
841
+ },
842
+ patterns: [
843
+ {
844
+ include: "#jinjaStatements"
845
+ }
846
+ ]
847
+ },
848
+ {
849
+ name: "meta.embedded.expression.jinja.mthds",
850
+ begin: "(\\{\\{)",
851
+ end: "(\\}\\})",
852
+ beginCaptures: {
853
+ "1": {
854
+ name: "punctuation.definition.jinja.mthds"
855
+ }
856
+ },
857
+ endCaptures: {
858
+ "1": {
859
+ name: "punctuation.definition.jinja.mthds"
860
+ }
861
+ },
862
+ patterns: [
863
+ {
864
+ include: "#jinjaExpressions"
865
+ }
866
+ ]
867
+ },
868
+ {
869
+ name: "comment.block.jinja.mthds",
870
+ begin: "(\\{#)",
871
+ end: "(#\\})",
872
+ beginCaptures: {
873
+ "1": {
874
+ name: "punctuation.definition.comment.begin.jinja.mthds"
875
+ }
876
+ },
877
+ endCaptures: {
878
+ "1": {
879
+ name: "punctuation.definition.comment.end.jinja.mthds"
880
+ }
881
+ }
882
+ }
883
+ ]
884
+ },
885
+ jinjaStatements: {
886
+ patterns: [
887
+ {
888
+ match: "\\b(if|elif|else|endif|for|endfor|set|with|endwith|block|endblock|macro|endmacro|call|endcall|filter|endfilter|autoescape|endautoescape|raw|endraw|extends|include|import|from)\\b",
889
+ name: "keyword.control.jinja.mthds"
890
+ },
891
+ {
892
+ match: "\\b(and|or|not|in|is|true|false|none)\\b",
893
+ name: "keyword.operator.jinja.mthds"
894
+ },
895
+ {
896
+ match: "\\b(selectattr|rejectattr|map|select|reject|join|list|sort|reverse|length|first|last|random|min|max|sum|abs|round|int|float|string)\\b",
897
+ name: "support.function.jinja.mthds"
898
+ },
899
+ {
900
+ match: "[a-zA-Z_][a-zA-Z0-9_]*",
901
+ name: "variable.other.jinja.mthds"
902
+ },
903
+ {
904
+ match: "\\.",
905
+ name: "punctuation.accessor.jinja.mthds"
906
+ },
907
+ {
908
+ match: "\\|",
909
+ name: "punctuation.separator.filter.jinja.mthds"
910
+ }
911
+ ]
912
+ },
913
+ jinjaExpressions: {
914
+ patterns: [
915
+ {
916
+ match: "\\b(and|or|not|in|is|true|false|none)\\b",
917
+ name: "keyword.operator.jinja.mthds"
918
+ },
919
+ {
920
+ match: "\\b(selectattr|rejectattr|map|select|reject|join|list|sort|reverse|length|first|last|random|min|max|sum|abs|round|int|float|string|equalto)\\b",
921
+ name: "support.function.jinja.mthds"
922
+ },
923
+ {
924
+ match: "[a-zA-Z_][a-zA-Z0-9_]*",
925
+ name: "variable.other.jinja.mthds"
926
+ },
927
+ {
928
+ match: "\\.",
929
+ name: "punctuation.accessor.jinja.mthds"
930
+ },
931
+ {
932
+ match: "\\|",
933
+ name: "punctuation.separator.filter.jinja.mthds"
934
+ },
935
+ {
936
+ match: '"[^"]*"',
937
+ name: "string.quoted.double.jinja.mthds"
938
+ },
939
+ {
940
+ match: "'[^']*'",
941
+ name: "string.quoted.single.jinja.mthds"
942
+ },
943
+ {
944
+ match: "\\d+",
945
+ name: "constant.numeric.jinja.mthds"
946
+ }
947
+ ]
948
+ },
949
+ htmlContent: {
950
+ patterns: [
951
+ {
952
+ name: "meta.tag.html.mthds",
953
+ begin: "(<)([a-zA-Z][a-zA-Z0-9]*)",
954
+ end: "(>)",
955
+ beginCaptures: {
956
+ "1": {
957
+ name: "punctuation.definition.tag.begin.html.mthds"
958
+ },
959
+ "2": {
960
+ name: "entity.name.tag.html.mthds"
961
+ }
962
+ },
963
+ endCaptures: {
964
+ "1": {
965
+ name: "punctuation.definition.tag.end.html.mthds"
966
+ }
967
+ },
968
+ patterns: [
969
+ {
970
+ include: "#htmlAttributes"
971
+ }
972
+ ]
973
+ },
974
+ {
975
+ name: "meta.tag.html.mthds",
976
+ begin: "(</)([a-zA-Z][a-zA-Z0-9]*)",
977
+ end: "(>)",
978
+ beginCaptures: {
979
+ "1": {
980
+ name: "punctuation.definition.tag.begin.html.mthds"
981
+ },
982
+ "2": {
983
+ name: "entity.name.tag.html.mthds"
984
+ }
985
+ },
986
+ endCaptures: {
987
+ "1": {
988
+ name: "punctuation.definition.tag.end.html.mthds"
989
+ }
990
+ }
991
+ },
992
+ {
993
+ name: "comment.block.html.mthds",
994
+ begin: "(<!--)",
995
+ end: "(-->)",
996
+ beginCaptures: {
997
+ "1": {
998
+ name: "punctuation.definition.comment.begin.html.mthds"
999
+ }
1000
+ },
1001
+ endCaptures: {
1002
+ "1": {
1003
+ name: "punctuation.definition.comment.end.html.mthds"
1004
+ }
1005
+ }
1006
+ }
1007
+ ]
1008
+ },
1009
+ htmlAttributes: {
1010
+ patterns: [
1011
+ {
1012
+ match: `([a-zA-Z-]+)(=)("[^"]*"|'[^']*')`,
1013
+ captures: {
1014
+ "1": {
1015
+ name: "entity.other.attribute-name.html.mthds"
1016
+ },
1017
+ "2": {
1018
+ name: "punctuation.separator.key-value.html.mthds"
1019
+ },
1020
+ "3": {
1021
+ name: "string.quoted.html.mthds"
1022
+ }
1023
+ }
1024
+ },
1025
+ {
1026
+ match: "[a-zA-Z-]+",
1027
+ name: "entity.other.attribute-name.html.mthds"
1028
+ }
1029
+ ]
1030
+ },
1031
+ dataInjection: {
1032
+ match: "(@)([a-z][a-zA-Z0-9_]*(?:\\.[a-z][a-zA-Z0-9_]*)*)",
1033
+ captures: {
1034
+ "1": {
1035
+ name: "storage.modifier.mthds"
1036
+ },
1037
+ "2": {
1038
+ name: "variable.other.readwrite.mthds"
1039
+ }
1040
+ }
1041
+ },
1042
+ templateVariable: {
1043
+ match: "(\\$)([a-z][a-zA-Z0-9_]*(?:\\.[a-z][a-zA-Z0-9_]*)*)",
1044
+ captures: {
1045
+ "1": {
1046
+ name: "storage.modifier.mthds"
1047
+ },
1048
+ "2": {
1049
+ name: "variable.other.readwrite.mthds"
1050
+ }
1051
+ }
1052
+ },
1053
+ stringEscapes: {
1054
+ patterns: [
1055
+ {
1056
+ match: '\\\\([btnfr"\\\\\\n/ ]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})',
1057
+ name: "constant.character.escape.mthds"
1058
+ },
1059
+ {
1060
+ match: '\\\\[^btnfr/"\\\\\\n]',
1061
+ name: "invalid.illegal.escape.mthds"
1062
+ }
1063
+ ]
1064
+ }
1065
+ }
1066
+ };
1067
+
1068
+ // src/shiki/pipelexDarkTheme.ts
1069
+ var pipelexDarkTheme = {
1070
+ name: "pipelex-dark",
1071
+ type: "dark",
1072
+ colors: {
1073
+ "editor.background": "#1e1e1e",
1074
+ "editor.foreground": "#d4d4d4"
1075
+ },
1076
+ settings: [
1077
+ // Default text
1078
+ {
1079
+ scope: [],
1080
+ settings: {
1081
+ foreground: "#d4d4d4"
1082
+ }
1083
+ },
1084
+ // ── Coral Red #FF6B6B bold ──────────────────────────────
1085
+ // Pipe sections, pipe types, pipe names
1086
+ {
1087
+ scope: [
1088
+ "entity.name.tag.pipe.mthds",
1089
+ "entity.name.tag.pipe-type.mthds",
1090
+ "entity.name.tag.pipe-name.mthds"
1091
+ ],
1092
+ settings: {
1093
+ foreground: "#FF6B6B",
1094
+ fontStyle: "bold"
1095
+ }
1096
+ },
1097
+ // ── Teal #4ECDC4 bold ───────────────────────────────────
1098
+ // Concept sections, concept types
1099
+ {
1100
+ scope: ["entity.name.type.concept.mthds"],
1101
+ settings: {
1102
+ foreground: "#4ECDC4",
1103
+ fontStyle: "bold"
1104
+ }
1105
+ },
1106
+ // ── Pale Green #98FB98 bold ─────────────────────────────
1107
+ // Data variables
1108
+ {
1109
+ scope: ["variable.other.readwrite.mthds"],
1110
+ settings: {
1111
+ foreground: "#98FB98",
1112
+ fontStyle: "bold"
1113
+ }
1114
+ },
1115
+ // ── Magenta #FF79C6 (no bold) ───────────────────────────
1116
+ // Template markers, sigils, escape sequences
1117
+ {
1118
+ scope: ["storage.modifier.mthds", "constant.character.escape.mthds"],
1119
+ settings: {
1120
+ foreground: "#FF79C6"
1121
+ }
1122
+ },
1123
+ // ── Magenta #FF79C6 bold (Jinja keywords) ───────────────
1124
+ {
1125
+ scope: ["keyword.control.jinja.mthds"],
1126
+ settings: {
1127
+ foreground: "#FF79C6",
1128
+ fontStyle: "bold"
1129
+ }
1130
+ },
1131
+ // ── Magenta #FF79C6 (Jinja operators) ───────────────────
1132
+ {
1133
+ scope: ["keyword.operator.jinja.mthds"],
1134
+ settings: {
1135
+ foreground: "#FF79C6"
1136
+ }
1137
+ },
1138
+ // ── Magenta #FF79C6 (HTML tags) ─────────────────────────
1139
+ {
1140
+ scope: ["entity.name.tag.html.mthds"],
1141
+ settings: {
1142
+ foreground: "#FF79C6"
1143
+ }
1144
+ },
1145
+ // ── Orange #FFB86C bold (model refs) ────────────────────
1146
+ {
1147
+ scope: ["constant.other.symbol.mthds"],
1148
+ settings: {
1149
+ foreground: "#FFB86C",
1150
+ fontStyle: "bold"
1151
+ }
1152
+ },
1153
+ // ── Orange #FFB86C (Jinja delimiters) ───────────────────
1154
+ {
1155
+ scope: ["punctuation.definition.jinja.mthds"],
1156
+ settings: {
1157
+ foreground: "#FFB86C"
1158
+ }
1159
+ },
1160
+ // ── Salmon #ce9178 (strings) ────────────────────────────
1161
+ {
1162
+ scope: [
1163
+ "string.quoted.triple.basic.block.mthds",
1164
+ "string.quoted.single.basic.line.mthds",
1165
+ "string.quoted.triple.literal.block.mthds",
1166
+ "string.quoted.single.literal.line.mthds",
1167
+ "string.quoted.triple.basic.block.jinja2.mthds",
1168
+ "string.quoted.single.basic.line.jinja2.mthds",
1169
+ "string.quoted.triple.basic.block.prompt.mthds",
1170
+ "string.quoted.single.basic.line.prompt.mthds",
1171
+ "string.quoted.html.mthds"
1172
+ ],
1173
+ settings: {
1174
+ foreground: "#ce9178"
1175
+ }
1176
+ },
1177
+ // ── Green #6a9955 italic (comments) ─────────────────────
1178
+ {
1179
+ scope: [
1180
+ "comment",
1181
+ "comment.line.number-sign.mthds",
1182
+ "comment.block.jinja.mthds",
1183
+ "comment.block.html.mthds"
1184
+ ],
1185
+ settings: {
1186
+ foreground: "#6a9955",
1187
+ fontStyle: "italic"
1188
+ }
1189
+ },
1190
+ // ── Green #6a9955 italic (preprocessor directives) ──────
1191
+ {
1192
+ scope: ["meta.preprocessor.mthds"],
1193
+ settings: {
1194
+ foreground: "#6a9955",
1195
+ fontStyle: "italic"
1196
+ }
1197
+ },
1198
+ // ── Light Blue #9cdcfe (generic property names) ─────────
1199
+ {
1200
+ scope: ["support.type.property-name.mthds"],
1201
+ settings: {
1202
+ foreground: "#9cdcfe"
1203
+ }
1204
+ },
1205
+ // ── Blue #569cd6 (booleans) ───────────────────────────
1206
+ {
1207
+ scope: ["constant.language.boolean.mthds"],
1208
+ settings: {
1209
+ foreground: "#569cd6"
1210
+ }
1211
+ },
1212
+ // ── Light Green #b5cea8 (numbers) ─────────────────────
1213
+ {
1214
+ scope: ["constant.numeric", "constant.other.time"],
1215
+ settings: {
1216
+ foreground: "#b5cea8"
1217
+ }
1218
+ },
1219
+ // ── Light Blue #9cdcfe (table/array property names) ──────
1220
+ {
1221
+ scope: ["support.type.property-name.table.mthds", "support.type.property-name.array.mthds"],
1222
+ settings: {
1223
+ foreground: "#9cdcfe"
1224
+ }
1225
+ },
1226
+ // ── Yellow #dcdcaa (Jinja functions, HTML attributes) ────
1227
+ {
1228
+ scope: ["support.function.jinja.mthds", "entity.other.attribute-name.html.mthds"],
1229
+ settings: {
1230
+ foreground: "#dcdcaa"
1231
+ }
1232
+ },
1233
+ // ── Light Blue #9cdcfe (Jinja variables) ────────────────
1234
+ {
1235
+ scope: ["variable.other.jinja.mthds"],
1236
+ settings: {
1237
+ foreground: "#9cdcfe"
1238
+ }
1239
+ },
1240
+ // ── Standard foreground #d4d4d4 (punctuation) ───────────
1241
+ {
1242
+ scope: [
1243
+ "punctuation.definition.table.mthds",
1244
+ "punctuation.definition.array.table.mthds",
1245
+ "punctuation.definition.array.mthds",
1246
+ "punctuation.definition.table.inline.mthds",
1247
+ "punctuation.separator.dot.mthds",
1248
+ "punctuation.separator.array.mthds",
1249
+ "punctuation.separator.table.inline.mthds",
1250
+ "punctuation.eq.mthds",
1251
+ "punctuation.definition.string.begin.mthds",
1252
+ "punctuation.definition.string.end.mthds"
1253
+ ],
1254
+ settings: {
1255
+ foreground: "#d4d4d4"
1256
+ }
1257
+ },
1258
+ // ── Pink #FF79C6 (pipe ref arrow) ───────────────────────
1259
+ {
1260
+ scope: ["keyword.operator.arrow.mthds"],
1261
+ settings: {
1262
+ foreground: "#FF79C6"
1263
+ }
1264
+ },
1265
+ // ── Muted slate #7C7C9C (namespace/package address) ───
1266
+ {
1267
+ scope: ["punctuation.separator.namespace.mthds"],
1268
+ settings: {
1269
+ foreground: "#7C7C9C"
1270
+ }
1271
+ },
1272
+ // ── Red #FF5555 underline (invalid) ─────────────────────
1273
+ {
1274
+ scope: ["invalid.illegal.escape.mthds"],
1275
+ settings: {
1276
+ foreground: "#FF5555",
1277
+ fontStyle: "underline"
1278
+ }
1279
+ }
1280
+ ]
1281
+ };
1282
+
1283
+ // src/shiki/themes.ts
1284
+ var MTHDS_THEMES = [
1285
+ "pipelex-dark",
1286
+ "dark-plus",
1287
+ "monokai",
1288
+ "dracula",
1289
+ "one-dark-pro"
1290
+ ];
1291
+
1292
+ // src/shiki/highlighter.ts
1293
+ var mthdsLang = __spreadProps(__spreadValues({}, mthds_tmLanguage_default), {
1294
+ name: "mthds"
1295
+ });
1296
+ var highlighterPromise = null;
1297
+ function getHighlighter() {
1298
+ if (!highlighterPromise) {
1299
+ highlighterPromise = createHighlighterCore({
1300
+ engine: createOnigurumaEngine(import("@shikijs/engine-oniguruma/wasm-inlined")),
1301
+ themes: [pipelexDarkTheme, darkPlus, monokai, dracula, oneDarkPro],
1302
+ langs: [mthdsLang]
1303
+ }).catch((err) => {
1304
+ highlighterPromise = null;
1305
+ throw err;
1306
+ });
1307
+ }
1308
+ return highlighterPromise;
1309
+ }
1310
+ async function highlightMthds(code, theme = "pipelex-dark") {
1311
+ const highlighter = await getHighlighter();
1312
+ return highlighter.codeToHtml(code, {
1313
+ lang: "mthds",
1314
+ theme
1315
+ });
1316
+ }
1317
+ function getAvailableThemes() {
1318
+ return [...MTHDS_THEMES];
1319
+ }
1320
+ function getMthdsGrammar() {
1321
+ return mthdsLang;
1322
+ }
1323
+ function getMthdsTheme() {
1324
+ return pipelexDarkTheme;
1325
+ }
1326
+ export {
1327
+ getAvailableThemes,
1328
+ getMthdsGrammar,
1329
+ getMthdsTheme,
1330
+ highlightMthds,
1331
+ pipelexDarkTheme
1332
+ };
1333
+ //# sourceMappingURL=index.js.map