@editorcn/editor 0.3.2 → 0.3.4
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.cjs +1222 -810
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +1199 -787
- package/dist/index.js.map +1 -1
- package/dist/style.css +119 -6
- package/package.json +6 -4
package/dist/style.css
CHANGED
|
@@ -173,8 +173,8 @@ button.rte-control-button:active {
|
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
.rte-content .ProseMirror pre {
|
|
176
|
-
background
|
|
177
|
-
color:
|
|
176
|
+
background: #1e1e2e;
|
|
177
|
+
color: #cdd6f4;
|
|
178
178
|
border-radius: var(--radius);
|
|
179
179
|
border: 1px solid var(--border);
|
|
180
180
|
padding: 1rem;
|
|
@@ -216,10 +216,6 @@ button.rte-control-button:active {
|
|
|
216
216
|
text-decoration-color: color-mix(in srgb, var(--primary) 80%, transparent);
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
.rte-content .ProseMirror ::selection {
|
|
220
|
-
background-color: color-mix(in srgb, var(--primary) 15%, transparent);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
219
|
/* Syntax Highlighting */
|
|
224
220
|
.rte-content .ProseMirror pre .hljs-comment,
|
|
225
221
|
.rte-content .ProseMirror pre .hljs-quote {
|
|
@@ -1241,6 +1237,123 @@ button.rte-control-button:active {
|
|
|
1241
1237
|
color: var(--primary);
|
|
1242
1238
|
}
|
|
1243
1239
|
|
|
1240
|
+
.rte-bubble-dropdown-divider {
|
|
1241
|
+
height: 1px;
|
|
1242
|
+
background: var(--border);
|
|
1243
|
+
margin: 0.25rem 0;
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
.rte-bubble-dropdown--color {
|
|
1247
|
+
min-width: auto;
|
|
1248
|
+
padding: 0.5rem;
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
.rte-bubble-dropdown--color .rte-bubble-dropdown-divider {
|
|
1252
|
+
margin: 0.5rem 0 0.375rem;
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
.rte-bubble-color-section {
|
|
1256
|
+
display: flex;
|
|
1257
|
+
flex-direction: column;
|
|
1258
|
+
gap: 0.5rem;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
.rte-bubble-color-label {
|
|
1262
|
+
padding: 0 0.125rem;
|
|
1263
|
+
color: var(--muted-foreground);
|
|
1264
|
+
font-size: 0.75rem;
|
|
1265
|
+
font-weight: 700;
|
|
1266
|
+
line-height: 1;
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
.rte-bubble-color-grid {
|
|
1270
|
+
display: grid;
|
|
1271
|
+
grid-template-columns: repeat(5, 1.5rem);
|
|
1272
|
+
justify-content: center;
|
|
1273
|
+
gap: 0.375rem;
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
.rte-bubble-color-recent {
|
|
1277
|
+
display: flex;
|
|
1278
|
+
flex-wrap: wrap;
|
|
1279
|
+
justify-content: center;
|
|
1280
|
+
gap: 0.375rem;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
.rte-bubble-color-swatch {
|
|
1284
|
+
display: inline-flex;
|
|
1285
|
+
align-items: center;
|
|
1286
|
+
justify-content: center;
|
|
1287
|
+
width: 1.5rem;
|
|
1288
|
+
height: 1.5rem;
|
|
1289
|
+
padding: 0;
|
|
1290
|
+
border-radius: 999px;
|
|
1291
|
+
border: 1px solid transparent;
|
|
1292
|
+
cursor: pointer;
|
|
1293
|
+
transition:
|
|
1294
|
+
transform 120ms cubic-bezier(0.34, 1.56, 0.64, 1),
|
|
1295
|
+
background-color 100ms ease-out,
|
|
1296
|
+
border-color 100ms ease-out,
|
|
1297
|
+
color 100ms ease-out,
|
|
1298
|
+
box-shadow 120ms ease-out;
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
.rte-bubble-color-swatch:hover {
|
|
1302
|
+
transform: scale(1.1);
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
.rte-bubble-color-swatch:active {
|
|
1306
|
+
transform: scale(0.96);
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
.rte-bubble-color-swatch:focus-visible {
|
|
1310
|
+
outline: 2px solid var(--ring);
|
|
1311
|
+
outline-offset: 1px;
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
.rte-bubble-color-swatch--text {
|
|
1315
|
+
background: transparent;
|
|
1316
|
+
border-color: var(--swatch-color);
|
|
1317
|
+
color: var(--swatch-color);
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
.rte-bubble-color-swatch--text.rte-bubble-color-swatch--active {
|
|
1321
|
+
background: var(--swatch-color);
|
|
1322
|
+
border-color: var(--swatch-color);
|
|
1323
|
+
color: var(--swatch-check);
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
.rte-bubble-color-swatch--highlight {
|
|
1327
|
+
background: var(--swatch-color);
|
|
1328
|
+
border-color: transparent;
|
|
1329
|
+
color: var(--swatch-check);
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
.rte-bubble-color-swatch--highlight.rte-bubble-color-swatch--active {
|
|
1333
|
+
box-shadow: 0 0 0 2px
|
|
1334
|
+
color-mix(in srgb, var(--swatch-color) 55%, var(--popover-foreground));
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
.rte-bubble-color-glyph {
|
|
1338
|
+
font-size: 0.625rem;
|
|
1339
|
+
font-weight: 700;
|
|
1340
|
+
line-height: 1;
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
.rte-bubble-color-check {
|
|
1344
|
+
display: flex;
|
|
1345
|
+
align-items: center;
|
|
1346
|
+
justify-content: center;
|
|
1347
|
+
width: 0.75rem;
|
|
1348
|
+
height: 0.75rem;
|
|
1349
|
+
color: var(--swatch-check);
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
.rte-bubble-color-check svg {
|
|
1353
|
+
width: 100%;
|
|
1354
|
+
height: 100%;
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1244
1357
|
/* ── Suppress transitions on theme switch ── */
|
|
1245
1358
|
.rte-theme-transitioning *,
|
|
1246
1359
|
.rte-theme-transitioning *::before,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@editorcn/editor",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -31,6 +31,11 @@
|
|
|
31
31
|
"tailwind-merge": "^3.0.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
+
"@hugeicons/core-free-icons": "^4.3.5",
|
|
35
|
+
"@hugeicons/react": "^1.1.10",
|
|
36
|
+
"@phosphor-icons/react": "^2.1.10",
|
|
37
|
+
"@remixicon/react": "^4.9.0",
|
|
38
|
+
"@tabler/icons-react": "^3.48.0",
|
|
34
39
|
"@types/react": "^19",
|
|
35
40
|
"tsup": "^8.4.0",
|
|
36
41
|
"typescript": "^5"
|
|
@@ -52,9 +57,6 @@
|
|
|
52
57
|
"react-dom": "^18 || ^19"
|
|
53
58
|
},
|
|
54
59
|
"peerDependenciesMeta": {
|
|
55
|
-
"@tiptap/extension-code-block-lowlight": {
|
|
56
|
-
"optional": true
|
|
57
|
-
},
|
|
58
60
|
"lowlight": {
|
|
59
61
|
"optional": true
|
|
60
62
|
},
|