bbang-react-editor 0.1.5 → 0.1.6
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 +1 -1
- package/dist/index.mjs +1 -1
- package/dist/style.css +212 -25
- package/package.json +1 -1
package/dist/style.css
CHANGED
|
@@ -453,10 +453,6 @@ ne-image-wrap {
|
|
|
453
453
|
transition: box-shadow 0.15s;
|
|
454
454
|
}
|
|
455
455
|
|
|
456
|
-
ne-image-wrap:hover {
|
|
457
|
-
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
|
|
458
|
-
}
|
|
459
|
-
|
|
460
456
|
ne-image-wrap[data-align="center"] {
|
|
461
457
|
margin-left: auto;
|
|
462
458
|
margin-right: auto;
|
|
@@ -507,18 +503,26 @@ ne-image-wrap[data-loaded="true"] > .ne-image-fallback {
|
|
|
507
503
|
display: none;
|
|
508
504
|
}
|
|
509
505
|
|
|
510
|
-
/* ── Image
|
|
506
|
+
/* ── Image Style Effects ── */
|
|
507
|
+
ne-image-wrap[data-image-style="border"] img {
|
|
508
|
+
border: 1px solid #e5e7eb;
|
|
509
|
+
}
|
|
510
|
+
ne-image-wrap[data-image-style="shadow"] img {
|
|
511
|
+
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/* ── Image Toolbar (hover-visible, 语雀 style) ── */
|
|
511
515
|
.ne-image-toolbar {
|
|
512
516
|
position: absolute;
|
|
513
517
|
left: 50%;
|
|
514
|
-
top:
|
|
518
|
+
top: 8px;
|
|
515
519
|
transform: translateX(-50%);
|
|
516
520
|
display: flex;
|
|
517
521
|
align-items: center;
|
|
518
522
|
gap: 2px;
|
|
519
523
|
background: #fff;
|
|
520
524
|
border: 1px solid #e5e7eb;
|
|
521
|
-
border-radius:
|
|
525
|
+
border-radius: 8px;
|
|
522
526
|
padding: 3px 4px;
|
|
523
527
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
524
528
|
z-index: 20;
|
|
@@ -529,16 +533,9 @@ ne-image-wrap[data-loaded="true"] > .ne-image-fallback {
|
|
|
529
533
|
white-space: nowrap;
|
|
530
534
|
}
|
|
531
535
|
|
|
532
|
-
ne-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
top: -50px;
|
|
536
|
-
left: 0;
|
|
537
|
-
right: 0;
|
|
538
|
-
height: 50px;
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
ne-block[data-block-type="image"]:hover .ne-image-toolbar {
|
|
536
|
+
ne-image-wrap:hover > .ne-image-toolbar,
|
|
537
|
+
.ne-image-toolbar:hover,
|
|
538
|
+
.ne-image-toolbar.has-open-popup {
|
|
542
539
|
opacity: 1;
|
|
543
540
|
pointer-events: auto;
|
|
544
541
|
}
|
|
@@ -557,7 +554,8 @@ ne-block[data-block-type="image"]:hover .ne-image-toolbar {
|
|
|
557
554
|
cursor: pointer;
|
|
558
555
|
white-space: nowrap;
|
|
559
556
|
min-width: 28px;
|
|
560
|
-
height:
|
|
557
|
+
height: 28px;
|
|
558
|
+
line-height: 1;
|
|
561
559
|
}
|
|
562
560
|
|
|
563
561
|
.ne-image-toolbar-btn:hover {
|
|
@@ -569,6 +567,24 @@ ne-block[data-block-type="image"]:hover .ne-image-toolbar {
|
|
|
569
567
|
color: #2383e2;
|
|
570
568
|
}
|
|
571
569
|
|
|
570
|
+
.ne-image-toolbar-btn.disabled {
|
|
571
|
+
opacity: 0.35;
|
|
572
|
+
cursor: not-allowed;
|
|
573
|
+
pointer-events: none;
|
|
574
|
+
display: none;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
.ne-image-toolbar-btn .ne-toolbar-btn-icon {
|
|
578
|
+
display: flex;
|
|
579
|
+
align-items: center;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.ne-toolbar-arrow {
|
|
583
|
+
font-size: 10px;
|
|
584
|
+
margin-left: 1px;
|
|
585
|
+
opacity: 0.5;
|
|
586
|
+
}
|
|
587
|
+
|
|
572
588
|
.ne-image-toolbar-sep {
|
|
573
589
|
width: 1px;
|
|
574
590
|
height: 20px;
|
|
@@ -577,18 +593,189 @@ ne-block[data-block-type="image"]:hover .ne-image-toolbar {
|
|
|
577
593
|
flex-shrink: 0;
|
|
578
594
|
}
|
|
579
595
|
|
|
580
|
-
|
|
596
|
+
/* ── Image Toolbar Popups ── */
|
|
597
|
+
.ne-image-toolbar-popup {
|
|
598
|
+
background: #fff;
|
|
599
|
+
border: 1px solid #e5e7eb;
|
|
600
|
+
border-radius: 8px;
|
|
601
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
|
|
602
|
+
z-index: 30;
|
|
603
|
+
padding: 12px;
|
|
604
|
+
min-width: 200px;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
/* ── Src (link) popup ── */
|
|
608
|
+
.ne-image-popup-src {
|
|
609
|
+
display: flex;
|
|
610
|
+
flex-direction: column;
|
|
611
|
+
gap: 8px;
|
|
612
|
+
width: 320px;
|
|
613
|
+
max-width: calc(100vw - 32px);
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
.ne-image-popup-input {
|
|
617
|
+
width: 100%;
|
|
618
|
+
box-sizing: border-box;
|
|
619
|
+
padding: 6px 10px;
|
|
620
|
+
border: 1px solid #e5e7eb;
|
|
621
|
+
border-radius: 6px;
|
|
622
|
+
font-size: 14px;
|
|
623
|
+
color: #37352f;
|
|
624
|
+
outline: none;
|
|
625
|
+
transition: border-color 0.15s;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
.ne-image-popup-input:focus {
|
|
629
|
+
border-color: #2383e2;
|
|
630
|
+
box-shadow: 0 0 0 2px rgba(35, 131, 226, 0.15);
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
.ne-image-popup-input::placeholder {
|
|
634
|
+
color: #9ca3af;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
.ne-image-popup-submit {
|
|
638
|
+
align-self: flex-end;
|
|
639
|
+
padding: 6px 16px;
|
|
640
|
+
border: none;
|
|
641
|
+
border-radius: 6px;
|
|
642
|
+
background: #2383e2;
|
|
643
|
+
color: #fff;
|
|
644
|
+
font-size: 13px;
|
|
645
|
+
font-weight: 500;
|
|
646
|
+
cursor: pointer;
|
|
647
|
+
transition: background 0.15s;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
.ne-image-popup-submit:hover {
|
|
651
|
+
background: #1a6fc4;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
/* ── Size popup ── */
|
|
655
|
+
.ne-image-popup-size {
|
|
656
|
+
display: flex;
|
|
657
|
+
flex-direction: column;
|
|
658
|
+
gap: 10px;
|
|
659
|
+
width: 280px;
|
|
660
|
+
max-width: calc(100vw - 32px);
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
.ne-image-size-row {
|
|
581
664
|
display: flex;
|
|
582
665
|
align-items: center;
|
|
583
|
-
gap:
|
|
666
|
+
gap: 8px;
|
|
584
667
|
}
|
|
585
668
|
|
|
586
|
-
.ne-image-
|
|
587
|
-
font-size:
|
|
669
|
+
.ne-image-size-label {
|
|
670
|
+
font-size: 13px;
|
|
671
|
+
color: #6b7280;
|
|
672
|
+
flex-shrink: 0;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
.ne-image-size-input {
|
|
676
|
+
width: 80px;
|
|
677
|
+
box-sizing: border-box;
|
|
678
|
+
padding: 5px 8px;
|
|
679
|
+
border: 1px solid #e5e7eb;
|
|
680
|
+
border-radius: 6px;
|
|
681
|
+
font-size: 14px;
|
|
588
682
|
color: #37352f;
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
683
|
+
outline: none;
|
|
684
|
+
transition: border-color 0.15s;
|
|
685
|
+
-moz-appearance: textfield;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
.ne-image-size-input::-webkit-inner-spin-button,
|
|
689
|
+
.ne-image-size-input::-webkit-outer-spin-button {
|
|
690
|
+
-webkit-appearance: none;
|
|
691
|
+
margin: 0;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
.ne-image-size-input:focus {
|
|
695
|
+
border-color: #2383e2;
|
|
696
|
+
box-shadow: 0 0 0 2px rgba(35, 131, 226, 0.15);
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
.ne-image-size-presets {
|
|
700
|
+
display: flex;
|
|
701
|
+
gap: 0;
|
|
702
|
+
border: 1px solid #e5e7eb;
|
|
703
|
+
border-radius: 6px;
|
|
704
|
+
overflow: hidden;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
.ne-image-size-preset-btn {
|
|
708
|
+
flex: 1;
|
|
709
|
+
padding: 5px 0;
|
|
710
|
+
border: none;
|
|
711
|
+
border-right: 1px solid #e5e7eb;
|
|
712
|
+
background: #fff;
|
|
713
|
+
font-size: 13px;
|
|
714
|
+
color: #37352f;
|
|
715
|
+
cursor: pointer;
|
|
716
|
+
transition: background 0.15s;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
.ne-image-size-preset-btn:last-child {
|
|
720
|
+
border-right: none;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
.ne-image-size-preset-btn:hover {
|
|
724
|
+
background: rgba(55, 53, 47, 0.06);
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
.ne-image-size-preset-btn.active {
|
|
728
|
+
background: rgba(35, 131, 226, 0.12);
|
|
729
|
+
color: #2383e2;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
/* ── Dropdown (align / style) ── */
|
|
733
|
+
.ne-image-dropdown {
|
|
734
|
+
display: flex;
|
|
735
|
+
flex-direction: column;
|
|
736
|
+
min-width: 140px;
|
|
737
|
+
padding: 4px 0;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
.ne-image-dropdown-item {
|
|
741
|
+
display: flex;
|
|
742
|
+
align-items: center;
|
|
743
|
+
gap: 8px;
|
|
744
|
+
padding: 6px 12px;
|
|
745
|
+
font-size: 14px;
|
|
746
|
+
color: #37352f;
|
|
747
|
+
cursor: pointer;
|
|
748
|
+
border-radius: 4px;
|
|
749
|
+
transition: background 0.1s;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
.ne-image-dropdown-item:hover {
|
|
753
|
+
background: rgba(55, 53, 47, 0.06);
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
.ne-image-dropdown-item.active {
|
|
757
|
+
color: #2383e2;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
.ne-image-dropdown-check {
|
|
761
|
+
width: 14px;
|
|
762
|
+
height: 14px;
|
|
763
|
+
display: flex;
|
|
764
|
+
align-items: center;
|
|
765
|
+
justify-content: center;
|
|
766
|
+
flex-shrink: 0;
|
|
767
|
+
color: #2383e2;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
.ne-image-dropdown-icon {
|
|
771
|
+
display: flex;
|
|
772
|
+
align-items: center;
|
|
773
|
+
flex-shrink: 0;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
.ne-image-popup-input::selection,
|
|
777
|
+
.ne-image-size-input::selection {
|
|
778
|
+
background: highlight;
|
|
592
779
|
}
|
|
593
780
|
|
|
594
781
|
/* Legacy inline ne-image (deprecated, kept for backward compat) */
|