jsx-repl 0.0.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.
@@ -0,0 +1,591 @@
1
+ .CodeMirror-dialog {
2
+ position: absolute;
3
+ left: 0; right: 0;
4
+ background: inherit;
5
+ z-index: 15;
6
+ padding: .1em .8em;
7
+ overflow: hidden;
8
+ color: inherit;
9
+ }
10
+
11
+ .CodeMirror-dialog-top {
12
+ border-bottom: 1px solid #eee;
13
+ top: 0;
14
+ }
15
+
16
+ .CodeMirror-dialog-bottom {
17
+ border-top: 1px solid #eee;
18
+ bottom: 0;
19
+ }
20
+
21
+ .CodeMirror-dialog input {
22
+ border: none;
23
+ outline: none;
24
+ background: transparent;
25
+ width: 20em;
26
+ color: inherit;
27
+ font-family: monospace;
28
+ }
29
+
30
+ .CodeMirror-dialog button {
31
+ font-size: 70%;
32
+ }
33
+ /* BASICS */
34
+
35
+ .CodeMirror {
36
+ color: var(--symbols);
37
+ --symbols: #777;
38
+ --base: #545281;
39
+ --comment: hsl(210, 25%, 60%);
40
+ --keyword: #af4ab1;
41
+ --variable: var(--base);
42
+ --function: #c25205;
43
+ --string: #2ba46d;
44
+ --number: #c25205;
45
+ --tags: #dd0000;
46
+ --brackets: var(--comment);
47
+ --qualifier: #ff6032;
48
+ --important: var(--string);
49
+ --attribute: #9c3eda;
50
+ --property: #6182b8;
51
+
52
+ --selected-bg: #d7d4f0;
53
+ --selected-bg-non-focus: #d9d9d9;
54
+ --cursor: #000;
55
+
56
+ direction: ltr;
57
+ font-family: var(--font-code);
58
+ height: auto;
59
+ }
60
+
61
+ .dark .CodeMirror {
62
+ color: var(--symbols);
63
+ --symbols: #89ddff;
64
+ --base: #a6accd;
65
+ --comment: #6d6d6d;
66
+ --keyword: #89ddff;
67
+ --string: #c3e88d;
68
+ --variable: #82aaff;
69
+ --number: #f78c6c;
70
+ --tags: #f07178;
71
+ --brackets: var(--symbols);
72
+ --property: #f07178;
73
+ --attribute: #c792ea;
74
+ --cursor: #fff;
75
+
76
+ --selected-bg: rgba(255, 255, 255, 0.1);
77
+ --selected-bg-non-focus: rgba(255, 255, 255, 0.15);
78
+ }
79
+
80
+ /* PADDING */
81
+
82
+ .CodeMirror-lines {
83
+ padding: 4px 0; /* Vertical padding around content */
84
+ }
85
+ .CodeMirror pre {
86
+ padding: 0 4px; /* Horizontal padding of content */
87
+ }
88
+
89
+ .CodeMirror-scrollbar-filler,
90
+ .CodeMirror-gutter-filler {
91
+ background-color: white; /* The little square between H and V scrollbars */
92
+ }
93
+
94
+ /* GUTTER */
95
+
96
+ .CodeMirror-gutters {
97
+ border-right: 1px solid var(--border);
98
+ background-color: transparent;
99
+ white-space: nowrap;
100
+ }
101
+ .CodeMirror-linenumber {
102
+ padding: 0 3px 0 5px;
103
+ min-width: 20px;
104
+ text-align: right;
105
+ color: var(--comment);
106
+ white-space: nowrap;
107
+ opacity: 0.6;
108
+ }
109
+
110
+ .CodeMirror-guttermarker {
111
+ color: black;
112
+ }
113
+ .CodeMirror-guttermarker-subtle {
114
+ color: #999;
115
+ }
116
+
117
+ /* FOLD GUTTER */
118
+
119
+ .CodeMirror-foldmarker {
120
+ color: #414141;
121
+ text-shadow:
122
+ #ff9966 1px 1px 2px,
123
+ #ff9966 -1px -1px 2px,
124
+ #ff9966 1px -1px 2px,
125
+ #ff9966 -1px 1px 2px;
126
+ font-family: arial;
127
+ line-height: 0.3;
128
+ cursor: pointer;
129
+ }
130
+ .CodeMirror-foldgutter {
131
+ width: 0.7em;
132
+ }
133
+ .CodeMirror-foldgutter-open,
134
+ .CodeMirror-foldgutter-folded {
135
+ cursor: pointer;
136
+ }
137
+ .CodeMirror-foldgutter-open:after,
138
+ .CodeMirror-foldgutter-folded:after {
139
+ content: '>';
140
+ font-size: 0.8em;
141
+ opacity: 0.8;
142
+ transition: transform 0.2s;
143
+ display: inline-block;
144
+ top: -0.1em;
145
+ position: relative;
146
+ transform: rotate(90deg);
147
+ }
148
+ .CodeMirror-foldgutter-folded:after {
149
+ transform: none;
150
+ }
151
+
152
+ /* CURSOR */
153
+
154
+ .CodeMirror-cursor {
155
+ border-left: 1px solid var(--cursor);
156
+ border-right: none;
157
+ width: 0;
158
+ }
159
+ /* Shown when moving in bi-directional text */
160
+ .CodeMirror div.CodeMirror-secondarycursor {
161
+ border-left: 1px solid silver;
162
+ }
163
+ .cm-fat-cursor .CodeMirror-cursor {
164
+ width: auto;
165
+ border: 0 !important;
166
+ background: #7e7;
167
+ }
168
+ .cm-fat-cursor div.CodeMirror-cursors {
169
+ z-index: 1;
170
+ }
171
+ .cm-fat-cursor-mark {
172
+ background-color: rgba(20, 255, 20, 0.5);
173
+ -webkit-animation: blink 1.06s steps(1) infinite;
174
+ -moz-animation: blink 1.06s steps(1) infinite;
175
+ animation: blink 1.06s steps(1) infinite;
176
+ }
177
+ .cm-animate-fat-cursor {
178
+ width: auto;
179
+ border: 0;
180
+ -webkit-animation: blink 1.06s steps(1) infinite;
181
+ -moz-animation: blink 1.06s steps(1) infinite;
182
+ animation: blink 1.06s steps(1) infinite;
183
+ background-color: #7e7;
184
+ }
185
+ @-moz-keyframes blink {
186
+ 0% {
187
+ }
188
+ 50% {
189
+ background-color: transparent;
190
+ }
191
+ 100% {
192
+ }
193
+ }
194
+ @-webkit-keyframes blink {
195
+ 0% {
196
+ }
197
+ 50% {
198
+ background-color: transparent;
199
+ }
200
+ 100% {
201
+ }
202
+ }
203
+ @keyframes blink {
204
+ 0% {
205
+ }
206
+ 50% {
207
+ background-color: transparent;
208
+ }
209
+ 100% {
210
+ }
211
+ }
212
+
213
+ .cm-tab {
214
+ display: inline-block;
215
+ text-decoration: inherit;
216
+ }
217
+
218
+ .CodeMirror-rulers {
219
+ position: absolute;
220
+ left: 0;
221
+ right: 0;
222
+ top: -50px;
223
+ bottom: -20px;
224
+ overflow: hidden;
225
+ }
226
+ .CodeMirror-ruler {
227
+ border-left: 1px solid #ccc;
228
+ top: 0;
229
+ bottom: 0;
230
+ position: absolute;
231
+ }
232
+
233
+ /* DEFAULT THEME */
234
+ .cm-s-default.CodeMirror {
235
+ background-color: transparent;
236
+ }
237
+ .cm-s-default .cm-header {
238
+ color: blue;
239
+ }
240
+ .cm-s-default .cm-quote {
241
+ color: #090;
242
+ }
243
+ .cm-negative {
244
+ color: #d44;
245
+ }
246
+ .cm-positive {
247
+ color: #292;
248
+ }
249
+ .cm-header,
250
+ .cm-strong {
251
+ font-weight: bold;
252
+ }
253
+ .cm-em {
254
+ font-style: italic;
255
+ }
256
+ .cm-link {
257
+ text-decoration: underline;
258
+ }
259
+ .cm-strikethrough {
260
+ text-decoration: line-through;
261
+ }
262
+
263
+ .cm-s-default .cm-atom,
264
+ .cm-s-default .cm-def,
265
+ .cm-s-default .cm-variable-2,
266
+ .cm-s-default .cm-variable-3,
267
+ .cm-s-default .cm-punctuation {
268
+ color: var(--base);
269
+ }
270
+ .cm-s-default .cm-property {
271
+ color: var(--property);
272
+ }
273
+ .cm-s-default .cm-hr,
274
+ .cm-s-default .cm-comment {
275
+ color: var(--comment);
276
+ }
277
+ .cm-s-default .cm-attribute {
278
+ color: var(--attribute);
279
+ }
280
+ .cm-s-default .cm-keyword {
281
+ color: var(--keyword);
282
+ }
283
+ .cm-s-default .cm-variable {
284
+ color: var(--variable);
285
+ }
286
+ .cm-s-default .cm-tag {
287
+ color: var(--tags);
288
+ }
289
+ .cm-s-default .cm-bracket {
290
+ color: var(--brackets);
291
+ }
292
+ .cm-s-default .cm-number {
293
+ color: var(--number);
294
+ }
295
+ .cm-s-default .cm-string,
296
+ .cm-s-default .cm-string-2 {
297
+ color: var(--string);
298
+ }
299
+ .cm-s-default .cm-type {
300
+ color: rgb(255, 208, 0);
301
+ }
302
+ .cm-s-default .cm-meta {
303
+ color: #555;
304
+ }
305
+ .cm-s-default .cm-qualifier {
306
+ color: var(--qualifier);
307
+ }
308
+ .cm-s-default .cm-builtin {
309
+ color: #7539ff;
310
+ }
311
+ .cm-s-default .cm-link {
312
+ color: var(--flash);
313
+ }
314
+ .cm-s-default .cm-error {
315
+ color: #ff008c;
316
+ }
317
+ .cm-invalidchar {
318
+ color: #ff008c;
319
+ }
320
+
321
+ .CodeMirror-composing {
322
+ border-bottom: 2px solid;
323
+ }
324
+
325
+ /* Default styles for common addons */
326
+
327
+ div.CodeMirror span.CodeMirror-matchingbracket {
328
+ color: #0b0;
329
+ }
330
+ div.CodeMirror span.CodeMirror-nonmatchingbracket {
331
+ color: #a22;
332
+ }
333
+ .CodeMirror-matchingtag {
334
+ background: rgba(255, 150, 0, 0.3);
335
+ }
336
+ .CodeMirror-activeline-background {
337
+ background: #e8f2ff;
338
+ }
339
+
340
+ /* STOP */
341
+
342
+ /* The rest of this file contains styles related to the mechanics of
343
+ the editor. You probably shouldn't touch them. */
344
+
345
+ .CodeMirror {
346
+ position: relative;
347
+ overflow: hidden;
348
+ background: white;
349
+ }
350
+
351
+ .CodeMirror-scroll {
352
+ overflow: scroll !important; /* Things will break if this is overridden */
353
+ /* 30px is the magic margin used to hide the element's real scrollbars */
354
+ /* See overflow: hidden in .CodeMirror */
355
+ margin-bottom: -30px;
356
+ margin-right: -30px;
357
+ padding-bottom: 30px;
358
+ height: 100%;
359
+ outline: none; /* Prevent dragging from highlighting the element */
360
+ position: relative;
361
+ }
362
+ .CodeMirror-sizer {
363
+ position: relative;
364
+ border-right: 30px solid transparent;
365
+ }
366
+
367
+ /* The fake, visible scrollbars. Used to force redraw during scrolling
368
+ before actual scrolling happens, thus preventing shaking and
369
+ flickering artifacts. */
370
+ .CodeMirror-vscrollbar,
371
+ .CodeMirror-hscrollbar,
372
+ .CodeMirror-scrollbar-filler,
373
+ .CodeMirror-gutter-filler {
374
+ position: absolute;
375
+ z-index: 6;
376
+ display: none;
377
+ }
378
+ .CodeMirror-vscrollbar {
379
+ right: 0;
380
+ top: 0;
381
+ overflow-x: hidden;
382
+ overflow-y: scroll;
383
+ }
384
+ .CodeMirror-hscrollbar {
385
+ bottom: 0;
386
+ left: 0;
387
+ overflow-y: hidden;
388
+ overflow-x: scroll;
389
+ }
390
+ .CodeMirror-scrollbar-filler {
391
+ right: 0;
392
+ bottom: 0;
393
+ }
394
+ .CodeMirror-gutter-filler {
395
+ left: 0;
396
+ bottom: 0;
397
+ }
398
+
399
+ .CodeMirror-gutters {
400
+ position: absolute;
401
+ left: 0;
402
+ top: 0;
403
+ min-height: 100%;
404
+ z-index: 3;
405
+ }
406
+ .CodeMirror-gutter {
407
+ white-space: normal;
408
+ height: 100%;
409
+ display: inline-block;
410
+ vertical-align: top;
411
+ margin-bottom: -30px;
412
+ }
413
+ .CodeMirror-gutter-wrapper {
414
+ position: absolute;
415
+ z-index: 4;
416
+ background: none !important;
417
+ border: none !important;
418
+ }
419
+ .CodeMirror-gutter-background {
420
+ position: absolute;
421
+ top: 0;
422
+ bottom: 0;
423
+ z-index: 4;
424
+ }
425
+ .CodeMirror-gutter-elt {
426
+ position: absolute;
427
+ cursor: default;
428
+ z-index: 4;
429
+ }
430
+ .CodeMirror-gutter-wrapper ::selection {
431
+ background-color: transparent;
432
+ }
433
+ .CodeMirror-gutter-wrapper ::-moz-selection {
434
+ background-color: transparent;
435
+ }
436
+
437
+ .CodeMirror-lines {
438
+ cursor: text;
439
+ min-height: 1px; /* prevents collapsing before first draw */
440
+ }
441
+ .CodeMirror pre {
442
+ /* Reset some styles that the rest of the page might have set */
443
+ -moz-border-radius: 0;
444
+ -webkit-border-radius: 0;
445
+ border-radius: 0;
446
+ border-width: 0;
447
+ background: transparent;
448
+ font-family: inherit;
449
+ font-size: inherit;
450
+ margin: 0;
451
+ white-space: pre;
452
+ word-wrap: normal;
453
+ line-height: inherit;
454
+ color: inherit;
455
+ z-index: 2;
456
+ position: relative;
457
+ overflow: visible;
458
+ -webkit-tap-highlight-color: transparent;
459
+ -webkit-font-variant-ligatures: contextual;
460
+ font-variant-ligatures: contextual;
461
+ }
462
+ .CodeMirror-wrap pre {
463
+ word-wrap: break-word;
464
+ white-space: pre-wrap;
465
+ word-break: normal;
466
+ }
467
+
468
+ .CodeMirror-linebackground {
469
+ position: absolute;
470
+ left: 0;
471
+ right: 0;
472
+ top: 0;
473
+ bottom: 0;
474
+ z-index: 0;
475
+ }
476
+
477
+ .CodeMirror-linewidget {
478
+ position: relative;
479
+ z-index: 2;
480
+ padding: 0.1px; /* Force widget margins to stay inside of the container */
481
+ }
482
+
483
+ .CodeMirror-rtl pre {
484
+ direction: rtl;
485
+ }
486
+
487
+ .CodeMirror-code {
488
+ outline: none;
489
+ }
490
+
491
+ /* Force content-box sizing for the elements where we expect it */
492
+ .CodeMirror-scroll,
493
+ .CodeMirror-sizer,
494
+ .CodeMirror-gutter,
495
+ .CodeMirror-gutters,
496
+ .CodeMirror-linenumber {
497
+ -moz-box-sizing: content-box;
498
+ box-sizing: content-box;
499
+ }
500
+
501
+ .CodeMirror-measure {
502
+ position: absolute;
503
+ width: 100%;
504
+ height: 0;
505
+ overflow: hidden;
506
+ visibility: hidden;
507
+ }
508
+
509
+ .CodeMirror-cursor {
510
+ position: absolute;
511
+ pointer-events: none;
512
+ }
513
+ .CodeMirror-measure pre {
514
+ position: static;
515
+ }
516
+
517
+ div.CodeMirror-cursors {
518
+ visibility: hidden;
519
+ position: relative;
520
+ z-index: 3;
521
+ }
522
+ div.CodeMirror-dragcursors {
523
+ visibility: visible;
524
+ }
525
+
526
+ .CodeMirror-focused div.CodeMirror-cursors {
527
+ visibility: visible;
528
+ }
529
+
530
+ .CodeMirror-selected {
531
+ background: var(--selected-bg-non-focus);
532
+ }
533
+ .CodeMirror-focused .CodeMirror-selected {
534
+ background: var(--selected-bg);
535
+ }
536
+ .CodeMirror-crosshair {
537
+ cursor: crosshair;
538
+ }
539
+ .CodeMirror-line::selection,
540
+ .CodeMirror-line > span::selection,
541
+ .CodeMirror-line > span > span::selection {
542
+ background: var(--selected-bg);
543
+ }
544
+ .CodeMirror-line::-moz-selection,
545
+ .CodeMirror-line > span::-moz-selection,
546
+ .CodeMirror-line > span > span::-moz-selection {
547
+ background: var(--selected-bg);
548
+ }
549
+
550
+ .cm-searching {
551
+ background-color: #ffa;
552
+ background-color: rgba(255, 255, 0, 0.4);
553
+ }
554
+
555
+ /* Used to force a border model for a node */
556
+ .cm-force-border {
557
+ padding-right: 0.1px;
558
+ }
559
+
560
+ @media print {
561
+ /* Hide the cursor when printing */
562
+ .CodeMirror div.CodeMirror-cursors {
563
+ visibility: hidden;
564
+ }
565
+ }
566
+
567
+ /* See issue #2901 */
568
+ .cm-tab-wrap-hack:after {
569
+ content: '';
570
+ }
571
+
572
+ /* Help users use markselection to safely style text background */
573
+ span.CodeMirror-selectedtext {
574
+ background: none;
575
+ }
576
+
577
+ .CodeMirror-dialog {
578
+ background-color: var(--bg);
579
+ }
580
+
581
+ .editor {
582
+ position: relative;
583
+ height: 100%;
584
+ width: 100%;
585
+ overflow: hidden;
586
+ }
587
+ .CodeMirror {
588
+ font-family: var(--font-code);
589
+ line-height: 1.5;
590
+ height: 100%;
591
+ }
@@ -0,0 +1,22 @@
1
+ import { ComponentOptionsMixin } from 'vue';
2
+ import { ComponentProvideOptions } from 'vue';
3
+ import { DefineComponent } from 'vue';
4
+ import { PublicProps } from 'vue';
5
+
6
+ declare const _default: DefineComponent<EditorProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
7
+ change: (code: string) => any;
8
+ }, string, PublicProps, Readonly<EditorProps> & Readonly<{
9
+ onChange?: ((code: string) => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
11
+ export default _default;
12
+
13
+ declare type EditorMode = 'js' | 'css' | 'ssr';
14
+
15
+ declare interface EditorProps {
16
+ value: string;
17
+ filename: string;
18
+ readonly?: boolean;
19
+ mode?: EditorMode;
20
+ }
21
+
22
+ export { }