nextgen-block-editor 0.3.1 → 0.4.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.
package/dist/styles.css CHANGED
@@ -2117,6 +2117,21 @@
2117
2117
  0 10px 15px -3px rgba(0, 0, 0, 0.1),
2118
2118
  0 4px 6px -4px rgba(0, 0, 0, 0.1);
2119
2119
  padding: 4px;
2120
+ overflow-x: hidden;
2121
+ }
2122
+
2123
+ .nextgen-editor-shell .ce-popover__items {
2124
+ overflow-x: hidden;
2125
+ scrollbar-width: none;
2126
+ -ms-overflow-style: none;
2127
+ }
2128
+
2129
+ .nextgen-editor-shell .ce-popover__items::-webkit-scrollbar {
2130
+ display: none;
2131
+ }
2132
+
2133
+ .nextgen-editor-shell .ce-popover-item-separator {
2134
+ display: none;
2120
2135
  }
2121
2136
 
2122
2137
  .nextgen-editor-shell .ce-popover__search {
@@ -2615,6 +2630,12 @@
2615
2630
  overflow-x: auto;
2616
2631
  scroll-snap-type: x mandatory;
2617
2632
  padding-bottom: 8px;
2633
+ scrollbar-width: none;
2634
+ -ms-overflow-style: none;
2635
+ }
2636
+
2637
+ .editor-music-carousel-track::-webkit-scrollbar {
2638
+ display: none;
2618
2639
  }
2619
2640
 
2620
2641
  .editor-audio-card.is-compact {
@@ -3792,84 +3813,535 @@ html[data-ng-theme] body {
3792
3813
  --ng-ring: #d4d4d8;
3793
3814
  }
3794
3815
 
3795
- [data-ng-theme='catppuccin-mocha'] {
3796
- --ng-background: #1e1e2e;
3797
- --ng-foreground: #cdd6f4;
3798
- --ng-card: #181825;
3799
- --ng-card-foreground: #cdd6f4;
3800
- --ng-popover: #181825;
3801
- --ng-popover-foreground: #cdd6f4;
3802
- --ng-primary: #cba6f7;
3803
- --ng-primary-foreground: #11111b;
3804
- --ng-secondary: #313244;
3805
- --ng-secondary-foreground: #cdd6f4;
3806
- --ng-muted: #313244;
3807
- --ng-muted-foreground: #a6adc8;
3808
- --ng-accent: #313244;
3809
- --ng-accent-foreground: #cdd6f4;
3810
- --ng-border: #45475a;
3811
- --ng-input: #45475a;
3812
- --ng-ring: #cba6f7;
3813
- }
3814
-
3815
- [data-ng-theme='catppuccin-macchiato'] {
3816
- --ng-background: #24273a;
3817
- --ng-foreground: #cad3f5;
3818
- --ng-card: #1e2030;
3819
- --ng-card-foreground: #cad3f5;
3820
- --ng-popover: #1e2030;
3821
- --ng-popover-foreground: #cad3f5;
3822
- --ng-primary: #c6a0f6;
3823
- --ng-primary-foreground: #181926;
3824
- --ng-secondary: #363a4f;
3825
- --ng-secondary-foreground: #cad3f5;
3826
- --ng-muted: #363a4f;
3827
- --ng-muted-foreground: #a5adcb;
3828
- --ng-accent: #363a4f;
3829
- --ng-accent-foreground: #cad3f5;
3830
- --ng-border: #494d64;
3831
- --ng-input: #494d64;
3832
- --ng-ring: #c6a0f6;
3833
- }
3834
-
3835
- [data-ng-theme='catppuccin-frappe'] {
3836
- --ng-background: #303446;
3837
- --ng-foreground: #c6d0f5;
3838
- --ng-card: #292c3c;
3839
- --ng-card-foreground: #c6d0f5;
3840
- --ng-popover: #292c3c;
3841
- --ng-popover-foreground: #c6d0f5;
3842
- --ng-primary: #ca9ee6;
3843
- --ng-primary-foreground: #232634;
3844
- --ng-secondary: #414559;
3845
- --ng-secondary-foreground: #c6d0f5;
3846
- --ng-muted: #414559;
3847
- --ng-muted-foreground: #a5adce;
3848
- --ng-accent: #414559;
3849
- --ng-accent-foreground: #c6d0f5;
3850
- --ng-border: #51576d;
3851
- --ng-input: #51576d;
3852
- --ng-ring: #ca9ee6;
3853
- }
3854
-
3855
- [data-ng-theme='catppuccin-latte'] {
3856
- --ng-background: #eff1f5;
3857
- --ng-foreground: #4c4f69;
3858
- --ng-card: #e6e9ef;
3859
- --ng-card-foreground: #4c4f69;
3860
- --ng-popover: #e6e9ef;
3861
- --ng-popover-foreground: #4c4f69;
3862
- --ng-primary: #8839ef;
3863
- --ng-primary-foreground: #eff1f5;
3864
- --ng-secondary: #ccd0da;
3865
- --ng-secondary-foreground: #4c4f69;
3866
- --ng-muted: #ccd0da;
3867
- --ng-muted-foreground: #6c6f85;
3868
- --ng-accent: #ccd0da;
3869
- --ng-accent-foreground: #4c4f69;
3870
- --ng-border: #bcc0cc;
3871
- --ng-input: #bcc0cc;
3872
- --ng-ring: #8839ef;
3816
+ /* ── Document Width Presets ─────────────────────────────────────── */
3817
+ .nextgen-editor-shell[data-ng-width='narrow'] #editorjs {
3818
+ max-width: 680px;
3819
+ margin-left: auto;
3820
+ margin-right: auto;
3821
+ }
3822
+
3823
+ .nextgen-editor-shell[data-ng-width='standard'] #editorjs {
3824
+ max-width: 920px;
3825
+ margin-left: auto;
3826
+ margin-right: auto;
3827
+ }
3828
+
3829
+ .nextgen-editor-shell[data-ng-width='full'] #editorjs {
3830
+ max-width: none;
3831
+ }
3832
+
3833
+ /* ── Reading Progress Bar ───────────────────────────────────────── */
3834
+ .ng-reading-progress {
3835
+ position: sticky;
3836
+ top: 0;
3837
+ left: 0;
3838
+ width: 100%;
3839
+ height: 3px;
3840
+ background: transparent;
3841
+ z-index: 40;
3842
+ pointer-events: none;
3843
+ }
3844
+
3845
+ .ng-reading-progress-fill {
3846
+ height: 100%;
3847
+ width: 0%;
3848
+ background: var(--ng-foreground);
3849
+ transition: width 80ms linear;
3850
+ }
3851
+
3852
+ /* ── Mermaid Diagram Block ──────────────────────────────────────── */
3853
+ .editor-mermaid-tool,
3854
+ .editor-mermaid-block {
3855
+ background: var(--ng-card);
3856
+ color: var(--ng-card-foreground);
3857
+ border: 1px solid var(--ng-border);
3858
+ border-radius: var(--ng-radius);
3859
+ padding: 12px;
3860
+ margin: 12px 0;
3861
+ }
3862
+
3863
+ .editor-mermaid-head {
3864
+ display: flex;
3865
+ align-items: center;
3866
+ justify-content: space-between;
3867
+ gap: 8px;
3868
+ margin-bottom: 8px;
3869
+ }
3870
+
3871
+ .editor-mermaid-label {
3872
+ font-size: 12px;
3873
+ font-weight: 600;
3874
+ color: var(--ng-muted-foreground);
3875
+ text-transform: uppercase;
3876
+ letter-spacing: 0.04em;
3877
+ }
3878
+
3879
+ .editor-mermaid-presets {
3880
+ display: flex;
3881
+ gap: 6px;
3882
+ flex-wrap: wrap;
3883
+ }
3884
+
3885
+ .editor-mermaid-preset-btn {
3886
+ padding: 2px 8px;
3887
+ font-size: 11px;
3888
+ border-radius: 6px;
3889
+ border: 1px solid var(--ng-border);
3890
+ background: var(--ng-background);
3891
+ color: var(--ng-foreground);
3892
+ cursor: pointer;
3893
+ }
3894
+
3895
+ .editor-mermaid-preset-btn:hover {
3896
+ background: var(--ng-accent);
3897
+ }
3898
+
3899
+ .editor-mermaid-input {
3900
+ width: 100%;
3901
+ box-sizing: border-box;
3902
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
3903
+ font-size: 12px;
3904
+ padding: 8px;
3905
+ border: 1px solid var(--ng-border);
3906
+ border-radius: 6px;
3907
+ background: var(--ng-background);
3908
+ color: var(--ng-foreground);
3909
+ resize: vertical;
3910
+ margin-bottom: 10px;
3911
+ }
3912
+
3913
+ .editor-mermaid-preview,
3914
+ .editor-mermaid-diagram {
3915
+ display: flex;
3916
+ justify-content: center;
3917
+ align-items: center;
3918
+ overflow-x: auto;
3919
+ padding: 8px 0;
3920
+ }
3921
+
3922
+ .editor-mermaid-preview svg,
3923
+ .editor-mermaid-diagram svg {
3924
+ max-width: 100%;
3925
+ height: auto;
3926
+ }
3927
+
3928
+ .editor-mermaid-error {
3929
+ font-size: 12px;
3930
+ color: #dc2626;
3931
+ white-space: pre-wrap;
3932
+ margin: 0;
3933
+ }
3934
+
3935
+ .editor-mermaid-block figcaption {
3936
+ text-align: center;
3937
+ font-size: 12px;
3938
+ color: var(--ng-muted-foreground);
3939
+ margin-top: 6px;
3940
+ }
3941
+
3942
+ /* ── Extra Blocks (Bookmark, Steps, Diff, Video, Changelog, Social) */
3943
+ .editor-extra-card,
3944
+ .editor-diff-block,
3945
+ .editor-changelog-block,
3946
+ .editor-social-card {
3947
+ background: var(--ng-card);
3948
+ color: var(--ng-card-foreground);
3949
+ border: 1px solid var(--ng-border);
3950
+ border-radius: var(--ng-radius);
3951
+ padding: 12px;
3952
+ margin: 12px 0;
3953
+ display: flex;
3954
+ flex-direction: column;
3955
+ gap: 8px;
3956
+ }
3957
+
3958
+ .editor-extra-head {
3959
+ font-size: 12px;
3960
+ font-weight: 600;
3961
+ color: var(--ng-muted-foreground);
3962
+ text-transform: uppercase;
3963
+ letter-spacing: 0.04em;
3964
+ }
3965
+
3966
+ .editor-extra-grid {
3967
+ display: grid;
3968
+ grid-template-columns: repeat(2, minmax(0, 1fr));
3969
+ gap: 8px;
3970
+ }
3971
+
3972
+ .editor-bookmark-card {
3973
+ display: flex;
3974
+ justify-content: space-between;
3975
+ gap: 12px;
3976
+ padding: 12px;
3977
+ border: 1px solid var(--ng-border);
3978
+ border-radius: var(--ng-radius);
3979
+ background: var(--ng-background);
3980
+ color: var(--ng-foreground);
3981
+ text-decoration: none;
3982
+ margin: 10px 0;
3983
+ }
3984
+
3985
+ .editor-bookmark-card:hover {
3986
+ background: var(--ng-accent);
3987
+ }
3988
+
3989
+ .editor-bookmark-title {
3990
+ font-weight: 600;
3991
+ font-size: 14px;
3992
+ }
3993
+
3994
+ .editor-bookmark-desc {
3995
+ font-size: 12px;
3996
+ color: var(--ng-muted-foreground);
3997
+ margin-top: 2px;
3998
+ }
3999
+
4000
+ .editor-bookmark-url {
4001
+ font-size: 11px;
4002
+ color: var(--ng-muted-foreground);
4003
+ margin-top: 6px;
4004
+ }
4005
+
4006
+ .editor-bookmark-thumb {
4007
+ width: 84px;
4008
+ height: 64px;
4009
+ object-fit: cover;
4010
+ border-radius: 6px;
4011
+ flex-shrink: 0;
4012
+ }
4013
+
4014
+ .editor-steps-editor-list,
4015
+ .editor-steps-list {
4016
+ display: flex;
4017
+ flex-direction: column;
4018
+ gap: 10px;
4019
+ list-style: none;
4020
+ padding: 0;
4021
+ margin: 12px 0;
4022
+ }
4023
+
4024
+ .editor-step-editor-row,
4025
+ .editor-step-item {
4026
+ display: flex;
4027
+ align-items: flex-start;
4028
+ gap: 10px;
4029
+ }
4030
+
4031
+ .editor-step-badge {
4032
+ width: 24px;
4033
+ height: 24px;
4034
+ border-radius: 999px;
4035
+ background: var(--ng-foreground);
4036
+ color: var(--ng-background);
4037
+ font-size: 12px;
4038
+ font-weight: 700;
4039
+ display: inline-flex;
4040
+ align-items: center;
4041
+ justify-content: center;
4042
+ flex-shrink: 0;
4043
+ margin-top: 2px;
4044
+ }
4045
+
4046
+ .editor-step-editor-fields,
4047
+ .editor-step-content {
4048
+ flex: 1;
4049
+ display: flex;
4050
+ flex-direction: column;
4051
+ gap: 4px;
4052
+ }
4053
+
4054
+ .editor-step-content h4 {
4055
+ margin: 0;
4056
+ font-size: 14px;
4057
+ font-weight: 600;
4058
+ }
4059
+
4060
+ .editor-step-content p {
4061
+ margin: 0;
4062
+ font-size: 13px;
4063
+ color: var(--ng-muted-foreground);
4064
+ }
4065
+
4066
+ .editor-diff-inputs {
4067
+ display: grid;
4068
+ grid-template-columns: repeat(2, minmax(0, 1fr));
4069
+ gap: 8px;
4070
+ }
4071
+
4072
+ .editor-diff-filename {
4073
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
4074
+ font-size: 11px;
4075
+ color: var(--ng-muted-foreground);
4076
+ }
4077
+
4078
+ .editor-diff-preview {
4079
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
4080
+ font-size: 12px;
4081
+ background: var(--ng-background);
4082
+ border: 1px solid var(--ng-border);
4083
+ border-radius: 6px;
4084
+ padding: 8px;
4085
+ margin: 0;
4086
+ overflow-x: auto;
4087
+ }
4088
+
4089
+ .editor-diff-line {
4090
+ display: block;
4091
+ padding: 1px 4px;
4092
+ }
4093
+
4094
+ .editor-diff-line.is-add {
4095
+ background: rgba(34, 197, 94, 0.14);
4096
+ }
4097
+
4098
+ .editor-diff-line.is-del {
4099
+ background: rgba(239, 68, 68, 0.14);
4100
+ }
4101
+
4102
+ .editor-video-el {
4103
+ width: 100%;
4104
+ border-radius: 8px;
4105
+ max-height: 440px;
4106
+ background: #000;
4107
+ }
4108
+
4109
+ .editor-video-block figcaption {
4110
+ text-align: center;
4111
+ font-size: 12px;
4112
+ color: var(--ng-muted-foreground);
4113
+ margin-top: 6px;
4114
+ }
4115
+
4116
+ .editor-changelog-row {
4117
+ display: grid;
4118
+ grid-template-columns: 110px 1fr auto;
4119
+ gap: 8px;
4120
+ align-items: center;
4121
+ }
4122
+
4123
+ .editor-changelog-head {
4124
+ display: flex;
4125
+ align-items: center;
4126
+ gap: 10px;
4127
+ }
4128
+
4129
+ .editor-changelog-version {
4130
+ font-weight: 700;
4131
+ font-size: 14px;
4132
+ }
4133
+
4134
+ .editor-changelog-date {
4135
+ font-size: 12px;
4136
+ color: var(--ng-muted-foreground);
4137
+ }
4138
+
4139
+ .editor-changelog-list {
4140
+ list-style: none;
4141
+ padding: 0;
4142
+ margin: 0;
4143
+ display: flex;
4144
+ flex-direction: column;
4145
+ gap: 6px;
4146
+ }
4147
+
4148
+ .editor-changelog-list li {
4149
+ display: flex;
4150
+ align-items: center;
4151
+ gap: 8px;
4152
+ font-size: 13px;
4153
+ }
4154
+
4155
+ .editor-changelog-badge {
4156
+ font-size: 10px;
4157
+ font-weight: 700;
4158
+ padding: 2px 6px;
4159
+ border-radius: 999px;
4160
+ border: 1px solid var(--ng-border);
4161
+ }
4162
+
4163
+ .editor-social-head {
4164
+ display: flex;
4165
+ gap: 6px;
4166
+ align-items: baseline;
4167
+ font-size: 13px;
4168
+ }
4169
+
4170
+ .editor-social-head span {
4171
+ color: var(--ng-muted-foreground);
4172
+ font-size: 12px;
4173
+ }
4174
+
4175
+ .editor-social-text {
4176
+ margin: 0;
4177
+ font-size: 14px;
4178
+ line-height: 1.5;
4179
+ }
4180
+
4181
+ .editor-social-link {
4182
+ font-size: 12px;
4183
+ color: var(--ng-foreground);
4184
+ text-decoration: underline;
4185
+ }
4186
+
4187
+ /* ── Inline AI Rewrite, Color Swatches, Smart Mention & /today ─── */
4188
+ .ng-inline-ai-actions,
4189
+ .ng-inline-color-actions,
4190
+ .ng-mention-popover {
4191
+ padding: 8px;
4192
+ border-top: 1px solid var(--ng-border);
4193
+ display: flex;
4194
+ flex-direction: column;
4195
+ gap: 6px;
4196
+ background: var(--ng-popover);
4197
+ }
4198
+
4199
+ .ng-mention-popover {
4200
+ flex-direction: row;
4201
+ align-items: center;
4202
+ }
4203
+
4204
+ .ng-inline-ai-row,
4205
+ .ng-inline-swatch-row {
4206
+ display: flex;
4207
+ align-items: center;
4208
+ gap: 4px;
4209
+ flex-wrap: wrap;
4210
+ }
4211
+
4212
+ .ng-inline-action-btn {
4213
+ padding: 3px 8px;
4214
+ font-size: 11px;
4215
+ font-weight: 500;
4216
+ border-radius: 6px;
4217
+ border: 1px solid var(--ng-border);
4218
+ background: var(--ng-background);
4219
+ color: var(--ng-foreground);
4220
+ cursor: pointer;
4221
+ }
4222
+
4223
+ .ng-inline-action-btn:hover {
4224
+ background: var(--ng-accent);
4225
+ }
4226
+
4227
+ .ng-inline-ai-status {
4228
+ font-size: 11px;
4229
+ color: var(--ng-muted-foreground);
4230
+ }
4231
+
4232
+ .ng-inline-swatch-label {
4233
+ font-size: 10px;
4234
+ font-weight: 600;
4235
+ color: var(--ng-muted-foreground);
4236
+ width: 28px;
4237
+ }
4238
+
4239
+ .ng-inline-swatch {
4240
+ width: 18px;
4241
+ height: 18px;
4242
+ border-radius: 999px;
4243
+ border: 1px solid var(--ng-border);
4244
+ cursor: pointer;
4245
+ display: inline-flex;
4246
+ align-items: center;
4247
+ justify-content: center;
4248
+ font-size: 11px;
4249
+ color: var(--ng-foreground);
4250
+ padding: 0;
4251
+ }
4252
+
4253
+ .editor-today-pill {
4254
+ display: inline-flex;
4255
+ align-items: center;
4256
+ gap: 8px;
4257
+ margin: 6px 0;
4258
+ }
4259
+
4260
+ .editor-today-badge {
4261
+ display: inline-flex;
4262
+ align-items: center;
4263
+ padding: 4px 10px;
4264
+ border-radius: 999px;
4265
+ border: 1px solid var(--ng-border);
4266
+ background: var(--ng-card);
4267
+ color: var(--ng-foreground);
4268
+ font-size: 12px;
4269
+ font-weight: 500;
4270
+ }
4271
+
4272
+ .ng-dev-access-bar {
4273
+ background: var(--ng-muted);
4274
+ color: var(--ng-foreground);
4275
+ border: 1px solid var(--ng-border);
4276
+ border-radius: var(--ng-radius);
4277
+ padding: 10px 12px;
4278
+ font-size: 12px;
4279
+ line-height: 1.45;
4280
+ margin-bottom: 10px;
4281
+ }
4282
+
4283
+ .ng-tool-chip.is-locked {
4284
+ opacity: 0.85;
4285
+ cursor: default;
4286
+ }
4287
+
4288
+ /* ── Embed Alignment & Size Controls ────────────────────────────── */
4289
+ .custom-embed-preview,
4290
+ .editor-embed-wrap {
4291
+ display: flex;
4292
+ width: 100%;
4293
+ margin: 12px 0;
4294
+ }
4295
+
4296
+ .custom-embed-preview[data-align='left'],
4297
+ .editor-embed-wrap[data-align='left'] {
4298
+ justify-content: flex-start;
4299
+ }
4300
+
4301
+ .custom-embed-preview[data-align='center'],
4302
+ .editor-embed-wrap[data-align='center'] {
4303
+ justify-content: center;
4304
+ }
4305
+
4306
+ .custom-embed-preview[data-align='right'],
4307
+ .editor-embed-wrap[data-align='right'] {
4308
+ justify-content: flex-end;
4309
+ }
4310
+
4311
+ .custom-embed-preview iframe,
4312
+ .editor-embed-wrap iframe {
4313
+ border: 1px solid var(--ng-border);
4314
+ border-radius: var(--ng-radius);
4315
+ aspect-ratio: 16 / 9;
4316
+ width: 75%;
4317
+ height: auto;
4318
+ }
4319
+
4320
+ .custom-embed-preview[data-size='small'] iframe,
4321
+ .editor-embed-wrap[data-size='small'] iframe {
4322
+ width: 50%;
4323
+ }
4324
+
4325
+ .custom-embed-preview[data-size='medium'] iframe,
4326
+ .editor-embed-wrap[data-size='medium'] iframe {
4327
+ width: 75%;
4328
+ }
4329
+
4330
+ .custom-embed-preview[data-size='large'] iframe,
4331
+ .editor-embed-wrap[data-size='large'] iframe {
4332
+ width: 90%;
4333
+ }
4334
+
4335
+ .custom-embed-preview[data-size='full'] iframe,
4336
+ .editor-embed-wrap[data-size='full'] iframe {
4337
+ width: 100%;
4338
+ }
4339
+
4340
+ /* ── Glassmorphism Inline Toolbar ───────────────────────────────── */
4341
+ .nextgen-editor-shell .ce-inline-toolbar {
4342
+ background: color-mix(in srgb, var(--ng-popover) 85%, transparent);
4343
+ backdrop-filter: blur(10px);
4344
+ -webkit-backdrop-filter: blur(10px);
3873
4345
  }
3874
4346
 
3875
4347
  /* ── Tighter Toolbar & Plus/Settings Positioning ────────────────── */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextgen-block-editor",
3
- "version": "0.3.1",
3
+ "version": "0.4.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": [
@@ -48,7 +48,8 @@
48
48
  "chart.js": "^4.6.2",
49
49
  "editorjs-drag-drop": "^1.1.16",
50
50
  "editorjs-undo": "^2.0.28",
51
- "katex": "^0.19.1"
51
+ "katex": "^0.19.1",
52
+ "mermaid": "^12.4.0"
52
53
  },
53
54
  "devDependencies": {
54
55
  "@types/katex": "^0.16.8",