@radioactive-labs/plutonium 0.1.13 → 0.1.15
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/package.json +2 -1
- package/src/css/easymde.css +105 -28
- package/src/css/slim_select.css +6 -0
- package/src/dist/css/plutonium.css +1 -1
- package/src/dist/js/plutonium.js +3509 -261
- package/src/dist/js/plutonium.js.map +4 -4
- package/src/dist/js/plutonium.min.js +65 -6
- package/src/dist/js/plutonium.min.js.map +4 -4
- package/src/js/controllers/easymde_controller.js +33 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@radioactive-labs/plutonium",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "Core assets for the Plutonium gem",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/js/core.js",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@hotwired/stimulus": "^3.2.2",
|
|
22
22
|
"@hotwired/turbo": "^8.0.4",
|
|
23
|
+
"dompurify": "^3.2.2",
|
|
23
24
|
"flowbite": "^2.3.0",
|
|
24
25
|
"lodash.debounce": "^4.0.8"
|
|
25
26
|
},
|
package/src/css/easymde.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* EasyMDE + CodeMirror Styles
|
|
3
|
-
* Based on easymde
|
|
4
|
-
* Adapted for
|
|
3
|
+
* Based on https://cdn.jsdelivr.net/npm/easymde@2.18.0/dist/easymde.min.css
|
|
4
|
+
* Adapted for Flowbite with dark mode support
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
@layer components {
|
|
@@ -304,47 +304,68 @@
|
|
|
304
304
|
}
|
|
305
305
|
|
|
306
306
|
.cm-s-easymde .cm-quote {
|
|
307
|
-
@apply text-
|
|
307
|
+
@apply text-gray-900 dark:text-white;
|
|
308
308
|
}
|
|
309
309
|
|
|
310
310
|
.cm-s-easymde .cm-keyword {
|
|
311
|
-
@apply text-
|
|
311
|
+
@apply text-gray-900 dark:text-white;
|
|
312
312
|
}
|
|
313
313
|
|
|
314
314
|
.cm-s-easymde .cm-atom {
|
|
315
|
-
@apply text-
|
|
315
|
+
@apply text-gray-900 dark:text-white;
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
.cm-s-easymde .cm-number {
|
|
319
|
-
@apply text-
|
|
319
|
+
@apply text-gray-900 dark:text-white;
|
|
320
320
|
}
|
|
321
321
|
|
|
322
322
|
.cm-s-easymde .cm-def {
|
|
323
|
-
@apply text-
|
|
323
|
+
@apply text-gray-900 dark:text-white;
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
.cm-s-easymde .cm-variable {
|
|
327
|
-
@apply text-gray-
|
|
327
|
+
@apply text-gray-900 dark:text-white;
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
.cm-s-easymde .cm-variable-2 {
|
|
331
|
-
@apply text-
|
|
331
|
+
@apply text-gray-900 dark:text-white;
|
|
332
332
|
}
|
|
333
333
|
|
|
334
334
|
.cm-s-easymde .cm-variable-3 {
|
|
335
|
-
@apply text-
|
|
335
|
+
@apply text-gray-900 dark:text-white;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.cm-formatting.cm-formatting-list {
|
|
339
|
+
@apply text-gray-900 dark:text-white;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.cm-formatting.cm-formatting-link {
|
|
343
|
+
@apply text-secondary-900 dark:text-secondary-400 !important;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.cm-formatting.cm-formatting-link-string {
|
|
347
|
+
@apply text-secondary-900 dark:text-secondary-400 !important;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
.cm-s-easymde .cm-string {
|
|
352
|
+
@apply text-accent-600 dark:text-accent-400;
|
|
336
353
|
}
|
|
337
354
|
|
|
338
|
-
.cm-s-easymde .cm-
|
|
339
|
-
@apply text-
|
|
355
|
+
.cm-s-easymde .cm-string.cm-url {
|
|
356
|
+
@apply text-accent-600 dark:text-accent-400;
|
|
340
357
|
}
|
|
341
358
|
|
|
359
|
+
/* .cm-s-easymde .cm-link {
|
|
360
|
+
@apply text-accent-600 dark:text-accent-400;
|
|
361
|
+
} */
|
|
362
|
+
|
|
342
363
|
.cm-s-easymde .cm-url {
|
|
343
|
-
@apply text-
|
|
364
|
+
@apply text-gray-900 dark:text-white;
|
|
344
365
|
}
|
|
345
366
|
|
|
346
367
|
.cm-s-easymde .cm-string-2 {
|
|
347
|
-
@apply text-
|
|
368
|
+
@apply text-gray-900 dark:text-white;
|
|
348
369
|
}
|
|
349
370
|
|
|
350
371
|
.cm-s-easymde .cm-comment {
|
|
@@ -360,7 +381,7 @@
|
|
|
360
381
|
}
|
|
361
382
|
|
|
362
383
|
.cm-s-easymde .cm-attribute {
|
|
363
|
-
|
|
384
|
+
@apply text-secondary-600 dark:text-secondary-400;
|
|
364
385
|
}
|
|
365
386
|
|
|
366
387
|
.cm-s-easymde .cm-error {
|
|
@@ -467,19 +488,6 @@
|
|
|
467
488
|
direction: rtl;
|
|
468
489
|
}
|
|
469
490
|
|
|
470
|
-
/* Selection Styles */
|
|
471
|
-
/* .CodeMirror-line::selection,
|
|
472
|
-
.CodeMirror-line>span::selection,
|
|
473
|
-
.CodeMirror-line>span>span::selection {
|
|
474
|
-
@apply bg-accent-100 dark:bg-accent-900/30;
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
.CodeMirror-line::-moz-selection,
|
|
478
|
-
.CodeMirror-line>span::-moz-selection,
|
|
479
|
-
.CodeMirror-line>span>span::-moz-selection {
|
|
480
|
-
@apply bg-accent-100 dark:bg-accent-900/30;
|
|
481
|
-
} */
|
|
482
|
-
|
|
483
491
|
.CodeMirror-selectedtext {
|
|
484
492
|
@apply bg-gray-200/70 dark:bg-gray-600/50;
|
|
485
493
|
}
|
|
@@ -553,6 +561,10 @@
|
|
|
553
561
|
@apply outline-none;
|
|
554
562
|
}
|
|
555
563
|
|
|
564
|
+
.cm-tab {
|
|
565
|
+
@apply inline-block no-underline;
|
|
566
|
+
}
|
|
567
|
+
|
|
556
568
|
/* Fix for tab character rendering */
|
|
557
569
|
.cm-tab-wrap-hack:after {
|
|
558
570
|
content: '';
|
|
@@ -646,4 +658,69 @@
|
|
|
646
658
|
-webkit-font-smoothing: antialiased;
|
|
647
659
|
-moz-osx-font-smoothing: grayscale;
|
|
648
660
|
}
|
|
661
|
+
|
|
662
|
+
/* Typography Styles */
|
|
663
|
+
.cm-s-easymde .cm-header {
|
|
664
|
+
@apply text-gray-900 dark:text-white;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
/* Focus/Selection Styles */
|
|
668
|
+
.CodeMirror-line::selection,
|
|
669
|
+
.CodeMirror-line>span::selection,
|
|
670
|
+
.CodeMirror-line>span>span::selection {
|
|
671
|
+
@apply bg-primary-100 dark:bg-primary-900/30;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.CodeMirror-line::-moz-selection,
|
|
675
|
+
.CodeMirror-line>span::-moz-selection,
|
|
676
|
+
.CodeMirror-line>span>span::-moz-selection {
|
|
677
|
+
@apply bg-primary-100 dark:bg-primary-900/30;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
/* Tag Match Styles */
|
|
681
|
+
.CodeMirror-matchingtag {
|
|
682
|
+
@apply bg-yellow-200/30 dark:bg-yellow-900/30;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
/* Search Highlight Styles */
|
|
686
|
+
.cm-searching {
|
|
687
|
+
@apply bg-yellow-200/40 dark:bg-yellow-900/40;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
/* Ruler Styles */
|
|
691
|
+
.CodeMirror-rulers {
|
|
692
|
+
@apply absolute inset-x-0 -top-[50px] bottom-0 overflow-hidden;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
.CodeMirror-ruler {
|
|
696
|
+
@apply border-l border-gray-300 dark:border-gray-600 top-0 bottom-0 absolute;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
/* Editor Preview Full */
|
|
700
|
+
.editor-preview-full {
|
|
701
|
+
@apply absolute w-full h-full top-0 left-0 z-[7] overflow-auto hidden box-border;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
/* Add active state for full preview */
|
|
705
|
+
.editor-preview-active {
|
|
706
|
+
@apply block;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
/* Preview content specific styles */
|
|
710
|
+
.editor-preview-full {
|
|
711
|
+
@apply p-2.5 bg-gray-50 dark:bg-gray-900 format dark:format-invert format-primary max-w-none;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
.editor-preview-full>p {
|
|
715
|
+
@apply mt-0;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
.editor-preview-full pre {
|
|
719
|
+
@apply bg-gray-100 dark:bg-gray-800 mb-2.5;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
.editor-preview-full table td,
|
|
723
|
+
.editor-preview-full table th {
|
|
724
|
+
@apply border border-gray-300 dark:border-gray-600 p-1.5;
|
|
725
|
+
}
|
|
649
726
|
}
|
package/src/css/slim_select.css
CHANGED