@thangph2146/nextjs-editor 1.0.5 → 1.0.9
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/README.md +18 -11
- package/dist/editor-utilities-raw.css +25 -15
- package/dist/editor-utilities-scoped.css +25 -15
- package/dist/index.cjs +53 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +53 -25
- package/dist/index.js.map +1 -1
- package/dist/styles.css +56 -15
- package/package.json +3 -2
package/dist/styles.css
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
/* Dùng @layer nextjs-editor để app có thể đặt SCSS/CSS trong layer khác và tránh ghi đè editor. Xem README. */
|
|
2
2
|
@layer nextjs-editor {
|
|
3
|
+
/* Fallback CSS variables cho #editor-x khi app chưa định nghĩa */
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Fallback CSS variables cho #editor-x khi app chưa định nghĩa (vd. playground).
|
|
7
|
+
* App có :root { --background, ... } sẽ kế thừa; không có thì dùng giá trị dưới đây.
|
|
8
|
+
*/
|
|
9
|
+
#editor-x {
|
|
10
|
+
--background: var(--background, #ffffff);
|
|
11
|
+
--foreground: var(--foreground, #0a0a0a);
|
|
12
|
+
--primary: var(--primary, #171717);
|
|
13
|
+
--primary-foreground: var(--primary-foreground, #fafafa);
|
|
14
|
+
--muted: var(--muted, #f5f5f5);
|
|
15
|
+
--muted-foreground: var(--muted-foreground, #737373);
|
|
16
|
+
--accent: var(--accent, #f5f5f5);
|
|
17
|
+
--accent-foreground: var(--accent-foreground, #171717);
|
|
18
|
+
--border: var(--border, #e5e5e5);
|
|
19
|
+
--ring: var(--ring, #171717);
|
|
20
|
+
--destructive: var(--destructive, #ef4444);
|
|
21
|
+
--destructive-foreground: var(--destructive-foreground, #fafafa);
|
|
22
|
+
--card: var(--card, #ffffff);
|
|
23
|
+
--card-foreground: var(--card-foreground, #0a0a0a);
|
|
24
|
+
--popover: var(--popover, #ffffff);
|
|
25
|
+
--popover-foreground: var(--popover-foreground, #0a0a0a);
|
|
26
|
+
--input: var(--input, #e5e5e5);
|
|
27
|
+
--secondary: var(--secondary, #f5f5f5);
|
|
28
|
+
--secondary-foreground: var(--secondary-foreground, #171717);
|
|
29
|
+
--ring-offset: var(--ring-offset, #ffffff);
|
|
30
|
+
--radius: var(--radius, 0.5rem);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
3
34
|
/* nextjs-editor: theme + scoped utilities */
|
|
4
35
|
|
|
5
36
|
.EditorTheme__code {
|
|
@@ -987,6 +1018,9 @@ div.border.border-dashed .editor-image img {
|
|
|
987
1018
|
#editor-x .h-\[var\(--radix-select-trigger-height\)\] {
|
|
988
1019
|
height: var(--radix-select-trigger-height);
|
|
989
1020
|
}
|
|
1021
|
+
#editor-x .h-auto {
|
|
1022
|
+
height: auto;
|
|
1023
|
+
}
|
|
990
1024
|
#editor-x .h-full {
|
|
991
1025
|
height: 100%;
|
|
992
1026
|
}
|
|
@@ -1044,9 +1078,6 @@ div.border.border-dashed .editor-image img {
|
|
|
1044
1078
|
#editor-x .min-h-\[54px\] {
|
|
1045
1079
|
min-height: 54px;
|
|
1046
1080
|
}
|
|
1047
|
-
#editor-x .min-h-\[70vh\] {
|
|
1048
|
-
min-height: 70vh;
|
|
1049
|
-
}
|
|
1050
1081
|
#editor-x .min-h-\[300px\] {
|
|
1051
1082
|
min-height: 300px;
|
|
1052
1083
|
}
|
|
@@ -1531,6 +1562,10 @@ div.border.border-dashed .editor-image img {
|
|
|
1531
1562
|
border-start-end-radius: 0;
|
|
1532
1563
|
border-end-end-radius: 0;
|
|
1533
1564
|
}
|
|
1565
|
+
#editor-x .rounded-t-xl {
|
|
1566
|
+
border-top-left-radius: var(--radius-xl);
|
|
1567
|
+
border-top-right-radius: var(--radius-xl);
|
|
1568
|
+
}
|
|
1534
1569
|
#editor-x .rounded-b-xl {
|
|
1535
1570
|
border-bottom-right-radius: var(--radius-xl);
|
|
1536
1571
|
border-bottom-left-radius: var(--radius-xl);
|
|
@@ -1658,10 +1693,10 @@ div.border.border-dashed .editor-image img {
|
|
|
1658
1693
|
background-color: color-mix(in oklab, var(--background) 95%, transparent);
|
|
1659
1694
|
}
|
|
1660
1695
|
}
|
|
1661
|
-
#editor-x .bg-black\/
|
|
1662
|
-
background-color: color-mix(in srgb, #000
|
|
1696
|
+
#editor-x .bg-black\/10 {
|
|
1697
|
+
background-color: color-mix(in srgb, #000 10%, transparent);
|
|
1663
1698
|
@supports (color: color-mix(in lab, red, red)) {
|
|
1664
|
-
background-color: color-mix(in oklab, var(--color-black)
|
|
1699
|
+
background-color: color-mix(in oklab, var(--color-black) 10%, transparent);
|
|
1665
1700
|
}
|
|
1666
1701
|
}
|
|
1667
1702
|
#editor-x .bg-black\/60 {
|
|
@@ -1724,12 +1759,6 @@ div.border.border-dashed .editor-image img {
|
|
|
1724
1759
|
background-color: color-mix(in oklab, var(--muted) 20%, transparent);
|
|
1725
1760
|
}
|
|
1726
1761
|
}
|
|
1727
|
-
#editor-x .bg-muted\/30 {
|
|
1728
|
-
background-color: var(--muted);
|
|
1729
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
1730
|
-
background-color: color-mix(in oklab, var(--muted) 30%, transparent);
|
|
1731
|
-
}
|
|
1732
|
-
}
|
|
1733
1762
|
#editor-x .bg-muted\/40 {
|
|
1734
1763
|
background-color: var(--muted);
|
|
1735
1764
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -1923,12 +1952,12 @@ div.border.border-dashed .editor-image img {
|
|
|
1923
1952
|
#editor-x .pt-0 {
|
|
1924
1953
|
padding-top: calc(var(--spacing) * 0);
|
|
1925
1954
|
}
|
|
1955
|
+
#editor-x .pt-3 {
|
|
1956
|
+
padding-top: calc(var(--spacing) * 3);
|
|
1957
|
+
}
|
|
1926
1958
|
#editor-x .pt-4 {
|
|
1927
1959
|
padding-top: calc(var(--spacing) * 4);
|
|
1928
1960
|
}
|
|
1929
|
-
#editor-x .pt-5 {
|
|
1930
|
-
padding-top: calc(var(--spacing) * 5);
|
|
1931
|
-
}
|
|
1932
1961
|
#editor-x .pt-6 {
|
|
1933
1962
|
padding-top: calc(var(--spacing) * 6);
|
|
1934
1963
|
}
|
|
@@ -1938,6 +1967,9 @@ div.border.border-dashed .editor-image img {
|
|
|
1938
1967
|
#editor-x .pr-10 {
|
|
1939
1968
|
padding-right: calc(var(--spacing) * 10);
|
|
1940
1969
|
}
|
|
1970
|
+
#editor-x .pr-12 {
|
|
1971
|
+
padding-right: calc(var(--spacing) * 12);
|
|
1972
|
+
}
|
|
1941
1973
|
#editor-x .pb-2 {
|
|
1942
1974
|
padding-bottom: calc(var(--spacing) * 2);
|
|
1943
1975
|
}
|
|
@@ -2207,6 +2239,10 @@ div.border.border-dashed .editor-image img {
|
|
|
2207
2239
|
--tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
2208
2240
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
2209
2241
|
}
|
|
2242
|
+
#editor-x .shadow-none {
|
|
2243
|
+
--tw-shadow: 0 0 #0000;
|
|
2244
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
2245
|
+
}
|
|
2210
2246
|
#editor-x .shadow-sm {
|
|
2211
2247
|
--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
2212
2248
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -3283,6 +3319,11 @@ div.border.border-dashed .editor-image img {
|
|
|
3283
3319
|
padding-block: calc(var(--spacing) * 6);
|
|
3284
3320
|
}
|
|
3285
3321
|
}
|
|
3322
|
+
#editor-x .sm\:text-center {
|
|
3323
|
+
@media (width >= 40rem) {
|
|
3324
|
+
text-align: center;
|
|
3325
|
+
}
|
|
3326
|
+
}
|
|
3286
3327
|
#editor-x .sm\:text-left {
|
|
3287
3328
|
@media (width >= 40rem) {
|
|
3288
3329
|
text-align: left;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thangph2146/nextjs-editor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "Rich text editor for Next.js built on Lexical",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"./styles.css": "./dist/styles.css"
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
|
-
"dist"
|
|
23
|
+
"dist",
|
|
24
|
+
"README.md"
|
|
24
25
|
],
|
|
25
26
|
"scripts": {
|
|
26
27
|
"build": "tsup && node scripts/build-editor-css.mjs",
|