nextgen-block-editor 0.4.0 → 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.
Files changed (4) hide show
  1. package/dist/index.cjs +4139 -3508
  2. package/dist/index.js +4139 -3508
  3. package/dist/styles.css +430 -1
  4. package/package.json +1 -1
package/dist/styles.css CHANGED
@@ -3916,7 +3916,22 @@ html[data-ng-theme] body {
3916
3916
  justify-content: center;
3917
3917
  align-items: center;
3918
3918
  overflow-x: auto;
3919
- padding: 8px 0;
3919
+ padding: 4px 0;
3920
+ }
3921
+
3922
+ .editor-mermaid-preview[data-align='left'],
3923
+ .editor-mermaid-block[data-align='left'] .editor-mermaid-diagram {
3924
+ justify-content: flex-start;
3925
+ }
3926
+
3927
+ .editor-mermaid-preview[data-align='center'],
3928
+ .editor-mermaid-block[data-align='center'] .editor-mermaid-diagram {
3929
+ justify-content: center;
3930
+ }
3931
+
3932
+ .editor-mermaid-preview[data-align='right'],
3933
+ .editor-mermaid-block[data-align='right'] .editor-mermaid-diagram {
3934
+ justify-content: flex-end;
3920
3935
  }
3921
3936
 
3922
3937
  .editor-mermaid-preview svg,
@@ -3925,6 +3940,44 @@ html[data-ng-theme] body {
3925
3940
  height: auto;
3926
3941
  }
3927
3942
 
3943
+ .editor-mermaid-preview[data-size='small'] svg,
3944
+ .editor-mermaid-block[data-size='small'] .editor-mermaid-diagram svg {
3945
+ max-width: 340px;
3946
+ max-height: 220px;
3947
+ }
3948
+
3949
+ .editor-mermaid-preview[data-size='medium'] svg,
3950
+ .editor-mermaid-block[data-size='medium'] .editor-mermaid-diagram svg {
3951
+ max-width: 540px;
3952
+ max-height: 340px;
3953
+ }
3954
+
3955
+ .editor-mermaid-preview[data-size='large'] svg,
3956
+ .editor-mermaid-block[data-size='large'] .editor-mermaid-diagram svg {
3957
+ max-width: 760px;
3958
+ max-height: 480px;
3959
+ }
3960
+
3961
+ .editor-mermaid-preview[data-size='full'] svg,
3962
+ .editor-mermaid-block[data-size='full'] .editor-mermaid-diagram svg {
3963
+ max-width: 100%;
3964
+ max-height: none;
3965
+ }
3966
+
3967
+ .editor-spotify-card {
3968
+ padding: 0;
3969
+ overflow: hidden;
3970
+ border: none;
3971
+ background: transparent;
3972
+ }
3973
+
3974
+ .editor-spotify-card iframe {
3975
+ width: 100%;
3976
+ height: 152px;
3977
+ border: 0;
3978
+ border-radius: 12px;
3979
+ }
3980
+
3928
3981
  .editor-mermaid-error {
3929
3982
  font-size: 12px;
3930
3983
  color: #dc2626;
@@ -4433,6 +4486,12 @@ html[data-ng-theme] body {
4433
4486
  border-radius: 3px;
4434
4487
  }
4435
4488
 
4489
+ .nextgen-editor-shell ::selection,
4490
+ .nextgen-editor-article ::selection {
4491
+ background: var(--ng-foreground);
4492
+ color: var(--ng-background);
4493
+ }
4494
+
4436
4495
  .nextgen-editor-shell b,
4437
4496
  .nextgen-editor-shell strong,
4438
4497
  .nextgen-editor-article b,
@@ -5606,3 +5665,373 @@ html[data-ng-theme] body {
5606
5665
  gap: 6px;
5607
5666
  align-items: center;
5608
5667
  }
5668
+
5669
+ /* ── Floating Pinned Components ─────────────────────────────────── */
5670
+ .ng-pinnable {
5671
+ position: relative;
5672
+ }
5673
+
5674
+ .ng-pin-btn {
5675
+ position: absolute;
5676
+ top: 8px;
5677
+ right: 8px;
5678
+ z-index: 10;
5679
+ padding: 3px 8px;
5680
+ font-size: 11px;
5681
+ font-weight: 600;
5682
+ border-radius: 999px;
5683
+ border: 1px solid var(--ng-border);
5684
+ background: color-mix(in srgb, var(--ng-background) 88%, transparent);
5685
+ color: var(--ng-foreground);
5686
+ cursor: pointer;
5687
+ opacity: 0;
5688
+ transition: opacity 140ms ease;
5689
+ }
5690
+
5691
+ .ng-pinnable:hover .ng-pin-btn,
5692
+ .ng-pinnable.is-pinned-floating .ng-pin-btn {
5693
+ opacity: 1;
5694
+ }
5695
+
5696
+ .ng-pinnable.is-pinned-floating {
5697
+ position: fixed;
5698
+ bottom: 20px;
5699
+ right: 20px;
5700
+ width: 380px;
5701
+ max-width: calc(100vw - 32px);
5702
+ max-height: 68vh;
5703
+ overflow: auto;
5704
+ z-index: 70;
5705
+ margin: 0;
5706
+ background: var(--ng-card);
5707
+ border: 1px solid var(--ng-border);
5708
+ border-radius: var(--ng-radius);
5709
+ padding: 12px;
5710
+ box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.35);
5711
+ }
5712
+
5713
+ /* ── /frame Device Mockups ──────────────────────────────────────── */
5714
+ .editor-frame-controls {
5715
+ display: grid;
5716
+ grid-template-columns: repeat(2, minmax(0, 1fr));
5717
+ gap: 8px;
5718
+ }
5719
+
5720
+ .editor-frame-block {
5721
+ display: flex;
5722
+ flex-direction: column;
5723
+ align-items: center;
5724
+ margin: 16px 0;
5725
+ }
5726
+
5727
+ .editor-frame-shell {
5728
+ position: relative;
5729
+ background: #09090b;
5730
+ border: 2px solid #27272a;
5731
+ overflow: hidden;
5732
+ box-shadow: 0 18px 36px -14px rgba(0, 0, 0, 0.35);
5733
+ }
5734
+
5735
+ .editor-frame-shell.is-iphone {
5736
+ width: 280px;
5737
+ border-radius: 38px;
5738
+ padding: 14px 10px 12px;
5739
+ }
5740
+
5741
+ .editor-frame-island {
5742
+ width: 78px;
5743
+ height: 18px;
5744
+ background: #000;
5745
+ border-radius: 999px;
5746
+ margin: 0 auto 10px;
5747
+ }
5748
+
5749
+ .editor-frame-shell.is-samsung {
5750
+ width: 280px;
5751
+ border-radius: 24px;
5752
+ padding: 10px 8px;
5753
+ }
5754
+
5755
+ .editor-frame-punch {
5756
+ width: 10px;
5757
+ height: 10px;
5758
+ border-radius: 999px;
5759
+ background: #27272a;
5760
+ margin: 0 auto 8px;
5761
+ }
5762
+
5763
+ .editor-frame-shell.is-macbook,
5764
+ .editor-frame-shell.is-laptop {
5765
+ width: min(640px, 100%);
5766
+ border-radius: 14px 14px 4px 4px;
5767
+ padding: 16px 12px 12px;
5768
+ }
5769
+
5770
+ .editor-frame-cam {
5771
+ width: 7px;
5772
+ height: 7px;
5773
+ border-radius: 999px;
5774
+ background: #3f3f46;
5775
+ margin: -8px auto 8px;
5776
+ }
5777
+
5778
+ .editor-frame-base {
5779
+ width: min(700px, 104%);
5780
+ height: 12px;
5781
+ background: linear-gradient(180deg, #d4d4d8, #a1a1aa);
5782
+ border-radius: 0 0 10px 10px;
5783
+ }
5784
+
5785
+ .editor-frame-shell.is-browser {
5786
+ width: min(680px, 100%);
5787
+ border-radius: 10px;
5788
+ background: var(--ng-card);
5789
+ border: 1px solid var(--ng-border);
5790
+ }
5791
+
5792
+ .editor-frame-browser-bar {
5793
+ display: flex;
5794
+ align-items: center;
5795
+ gap: 10px;
5796
+ padding: 8px 12px;
5797
+ background: var(--ng-muted);
5798
+ border-bottom: 1px solid var(--ng-border);
5799
+ }
5800
+
5801
+ .editor-frame-dots {
5802
+ display: inline-flex;
5803
+ gap: 5px;
5804
+ }
5805
+
5806
+ .editor-frame-dots i {
5807
+ width: 9px;
5808
+ height: 9px;
5809
+ border-radius: 999px;
5810
+ background: var(--ng-muted-foreground);
5811
+ opacity: 0.45;
5812
+ display: inline-block;
5813
+ }
5814
+
5815
+ .editor-frame-addr {
5816
+ font-size: 11px;
5817
+ color: var(--ng-muted-foreground);
5818
+ background: var(--ng-background);
5819
+ border: 1px solid var(--ng-border);
5820
+ border-radius: 6px;
5821
+ padding: 2px 10px;
5822
+ flex: 1;
5823
+ overflow: hidden;
5824
+ text-overflow: ellipsis;
5825
+ white-space: nowrap;
5826
+ }
5827
+
5828
+ .editor-frame-screen {
5829
+ background: var(--ng-background);
5830
+ border-radius: 10px;
5831
+ overflow: hidden;
5832
+ }
5833
+
5834
+ .editor-frame-shell.is-browser .editor-frame-screen {
5835
+ border-radius: 0;
5836
+ }
5837
+
5838
+ .editor-frame-screen img {
5839
+ width: 100%;
5840
+ display: block;
5841
+ object-fit: cover;
5842
+ }
5843
+
5844
+ .editor-frame-screen iframe {
5845
+ width: 100%;
5846
+ height: 360px;
5847
+ border: 0;
5848
+ display: block;
5849
+ }
5850
+
5851
+ .editor-frame-empty {
5852
+ padding: 40px 16px;
5853
+ text-align: center;
5854
+ font-size: 12px;
5855
+ color: var(--ng-muted-foreground);
5856
+ }
5857
+
5858
+ .editor-frame-caption {
5859
+ font-size: 12px;
5860
+ color: var(--ng-muted-foreground);
5861
+ margin-top: 8px;
5862
+ }
5863
+
5864
+ /* ── Customizable Slides Background, Text Tone & Alignment ──────── */
5865
+ .editor-slides[data-slide-bg='white'] .editor-slides-stage,
5866
+ .editor-slides-tool-card[data-slide-bg='white'] textarea {
5867
+ background: #ffffff;
5868
+ }
5869
+
5870
+ .editor-slides[data-slide-bg='zinc'] .editor-slides-stage,
5871
+ .editor-slides-tool-card[data-slide-bg='zinc'] textarea {
5872
+ background: #f4f4f5;
5873
+ }
5874
+
5875
+ .editor-slides[data-slide-bg='dark'] .editor-slides-stage,
5876
+ .editor-slides-tool-card[data-slide-bg='dark'] textarea {
5877
+ background: #09090b;
5878
+ }
5879
+
5880
+ .editor-slides[data-slide-bg='gradient'] .editor-slides-stage,
5881
+ .editor-slides-tool-card[data-slide-bg='gradient'] textarea {
5882
+ background: linear-gradient(135deg, #18181b 0%, #3f3f46 100%);
5883
+ }
5884
+
5885
+ .editor-slides[data-slide-text='light'] .editor-slide-panel,
5886
+ .editor-slides[data-slide-text='light'] .editor-slide-panel h3,
5887
+ .editor-slides[data-slide-text='light'] .editor-slide-panel h4,
5888
+ .editor-slides[data-slide-text='light'] .editor-slide-panel p,
5889
+ .editor-slides-tool-card[data-slide-text='light'] textarea {
5890
+ color: #fafafa;
5891
+ }
5892
+
5893
+ .editor-slides[data-slide-text='dark'] .editor-slide-panel,
5894
+ .editor-slides[data-slide-text='dark'] .editor-slide-panel h3,
5895
+ .editor-slides[data-slide-text='dark'] .editor-slide-panel h4,
5896
+ .editor-slides[data-slide-text='dark'] .editor-slide-panel p,
5897
+ .editor-slides-tool-card[data-slide-text='dark'] textarea {
5898
+ color: #18181b;
5899
+ }
5900
+
5901
+ .editor-slides[data-slide-align='center'] .editor-slide-panel,
5902
+ .editor-slides-tool-card[data-slide-align='center'] textarea {
5903
+ text-align: center;
5904
+ }
5905
+
5906
+ .editor-slides[data-slide-align='right'] .editor-slide-panel,
5907
+ .editor-slides-tool-card[data-slide-align='right'] textarea {
5908
+ text-align: right;
5909
+ }
5910
+
5911
+ /* ── Social Media Post Formats & Alignment ──────────────────────── */
5912
+ .editor-social-wrap {
5913
+ display: flex;
5914
+ width: 100%;
5915
+ margin: 12px 0;
5916
+ }
5917
+
5918
+ .editor-social-wrap[data-align='left'] {
5919
+ justify-content: flex-start;
5920
+ }
5921
+
5922
+ .editor-social-wrap[data-align='center'] {
5923
+ justify-content: center;
5924
+ }
5925
+
5926
+ .editor-social-wrap[data-align='right'] {
5927
+ justify-content: flex-end;
5928
+ }
5929
+
5930
+ .editor-social-card {
5931
+ width: min(520px, 100%);
5932
+ margin: 0;
5933
+ }
5934
+
5935
+ .editor-social-top {
5936
+ display: flex;
5937
+ align-items: center;
5938
+ gap: 10px;
5939
+ }
5940
+
5941
+ .editor-social-avatar {
5942
+ width: 34px;
5943
+ height: 34px;
5944
+ border-radius: 999px;
5945
+ background: var(--ng-foreground);
5946
+ color: var(--ng-background);
5947
+ font-size: 12px;
5948
+ font-weight: 700;
5949
+ display: inline-flex;
5950
+ align-items: center;
5951
+ justify-content: center;
5952
+ flex-shrink: 0;
5953
+ }
5954
+
5955
+ .editor-social-meta {
5956
+ display: flex;
5957
+ flex-direction: column;
5958
+ flex: 1;
5959
+ min-width: 0;
5960
+ }
5961
+
5962
+ .editor-social-meta strong {
5963
+ font-size: 13px;
5964
+ }
5965
+
5966
+ .editor-social-meta span {
5967
+ font-size: 11px;
5968
+ color: var(--ng-muted-foreground);
5969
+ }
5970
+
5971
+ .editor-social-platform {
5972
+ font-size: 11px;
5973
+ font-weight: 600;
5974
+ padding: 2px 8px;
5975
+ border-radius: 999px;
5976
+ border: 1px solid var(--ng-border);
5977
+ background: var(--ng-background);
5978
+ }
5979
+
5980
+ .editor-social-media {
5981
+ width: 100%;
5982
+ max-height: 320px;
5983
+ object-fit: cover;
5984
+ border-radius: 8px;
5985
+ }
5986
+
5987
+ .editor-social-foot {
5988
+ display: flex;
5989
+ align-items: center;
5990
+ justify-content: space-between;
5991
+ font-size: 11px;
5992
+ color: var(--ng-muted-foreground);
5993
+ padding-top: 6px;
5994
+ border-top: 1px solid var(--ng-border);
5995
+ }
5996
+
5997
+ /* ── Upgraded /export Modal Cards ───────────────────────────────── */
5998
+ .ng-export-grid {
5999
+ display: grid;
6000
+ grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
6001
+ gap: 10px;
6002
+ }
6003
+
6004
+ .ng-export-card {
6005
+ background: var(--ng-card);
6006
+ border: 1px solid var(--ng-border);
6007
+ border-radius: var(--ng-radius);
6008
+ padding: 12px;
6009
+ display: flex;
6010
+ flex-direction: column;
6011
+ gap: 8px;
6012
+ }
6013
+
6014
+ .ng-export-card-title {
6015
+ font-size: 13px;
6016
+ font-weight: 700;
6017
+ }
6018
+
6019
+ .ng-export-card-desc {
6020
+ font-size: 11px;
6021
+ color: var(--ng-muted-foreground);
6022
+ margin: 0;
6023
+ flex: 1;
6024
+ }
6025
+
6026
+ .ng-export-preview {
6027
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
6028
+ font-size: 11px;
6029
+ background: var(--ng-muted);
6030
+ border: 1px solid var(--ng-border);
6031
+ border-radius: var(--ng-radius);
6032
+ padding: 10px;
6033
+ max-height: 200px;
6034
+ overflow: auto;
6035
+ margin: 0;
6036
+ white-space: pre-wrap;
6037
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextgen-block-editor",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "A modular, block-based React + TypeScript rich text editor built on Editor.js with Bento grids, Carousels, Before/After sliders, Lightbox galleries, Slides, Tabs, Accordions, Toggle headings, Alerts, and more.",
5
5
  "type": "module",
6
6
  "sideEffects": [