lakelib 0.1.16 → 0.1.17
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 +3 -3
- package/dist/lake.css +121 -1
- package/dist/lake.min.js +29 -22
- package/dist/lake.min.js.map +1 -1
- package/lib/lake.css +121 -1
- package/lib/lake.js +280 -88
- package/lib/lake.js.map +1 -1
- package/lib/types/boxes/equation.d.ts +2 -0
- package/lib/types/css/index.d.ts +2 -0
- package/lib/types/editor.d.ts +1 -2
- package/lib/types/i18n/en-US/index.d.ts +5 -0
- package/lib/types/i18n/ja/index.d.ts +5 -0
- package/lib/types/i18n/ko/index.d.ts +5 -0
- package/lib/types/i18n/types.d.ts +28 -0
- package/lib/types/i18n/zh-CN/index.d.ts +5 -0
- package/lib/types/index.d.ts +1 -1
- package/lib/types/models/box.d.ts +1 -2
- package/lib/types/models/fragment.d.ts +1 -2
- package/lib/types/models/nodes.d.ts +10 -11
- package/lib/types/models/range.d.ts +1 -1
- package/lib/types/operations/insert-node.d.ts +1 -2
- package/lib/types/parsers/html-parser.d.ts +0 -1
- package/lib/types/plugins/equation.d.ts +3 -0
- package/lib/types/plugins/special-character.d.ts +3 -0
- package/lib/types/types/commands.d.ts +20 -0
- package/lib/types/types/native.d.ts +0 -23
- package/lib/types/ui/commands-popup.d.ts +24 -0
- package/lib/types/ui/toolbar.d.ts +1 -2
- package/lib/types/utils/get-box.d.ts +1 -2
- package/lib/types/utils/query.d.ts +1 -2
- package/lib/types/utils/to-node-list.d.ts +1 -2
- package/package.json +4 -2
package/lib/lake.css
CHANGED
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
color: inherit;
|
|
61
61
|
background: var(--selection-background-color);
|
|
62
62
|
}
|
|
63
|
-
.lake-container.lake-
|
|
63
|
+
.lake-container.lake-placeholder::before {
|
|
64
64
|
position: absolute;
|
|
65
65
|
top: 8px;
|
|
66
66
|
left: 12px;
|
|
@@ -231,6 +231,7 @@ button.lake-button {
|
|
|
231
231
|
padding: 0;
|
|
232
232
|
margin: 0 1px;
|
|
233
233
|
line-height: 0;
|
|
234
|
+
white-space: nowrap;
|
|
234
235
|
cursor: pointer;
|
|
235
236
|
user-select: none;
|
|
236
237
|
}
|
|
@@ -1151,6 +1152,9 @@ lake-box[name="video"] .lake-box-hovered .lake-resizer {
|
|
|
1151
1152
|
cursor: pointer;
|
|
1152
1153
|
user-select: auto;
|
|
1153
1154
|
}
|
|
1155
|
+
lake-box[name="file"] .lake-box-strip {
|
|
1156
|
+
align-self: center;
|
|
1157
|
+
}
|
|
1154
1158
|
.lake-file .lake-file-info {
|
|
1155
1159
|
display: flex;
|
|
1156
1160
|
align-items: center;
|
|
@@ -1216,6 +1220,69 @@ lake-box[name="emoji"] .lake-box-focused .lake-emoji {
|
|
|
1216
1220
|
background-color: var(--selection-background-color);
|
|
1217
1221
|
}
|
|
1218
1222
|
|
|
1223
|
+
.lake-equation {
|
|
1224
|
+
position: relative;
|
|
1225
|
+
font-weight: normal;
|
|
1226
|
+
border: 1px solid transparent;
|
|
1227
|
+
border-radius: 4px;
|
|
1228
|
+
}
|
|
1229
|
+
.lake-container[contenteditable="true"] .lake-equation {
|
|
1230
|
+
user-select: none;
|
|
1231
|
+
}
|
|
1232
|
+
lake-box[name="equation"] .lake-box-strip {
|
|
1233
|
+
align-self: center;
|
|
1234
|
+
}
|
|
1235
|
+
lake-box[name="equation"] .lake-box-selected .lake-equation {
|
|
1236
|
+
background-color: var(--selection-background-color);
|
|
1237
|
+
}
|
|
1238
|
+
lake-box[name="equation"] .lake-box-focused .lake-equation {
|
|
1239
|
+
background-color: var(--selection-background-color);
|
|
1240
|
+
}
|
|
1241
|
+
.lake-equation .lake-equation-view {
|
|
1242
|
+
padding: 0 6px;
|
|
1243
|
+
}
|
|
1244
|
+
.lake-equation .lake-equation-form {
|
|
1245
|
+
position: absolute;
|
|
1246
|
+
top: 28px;
|
|
1247
|
+
left: 0;
|
|
1248
|
+
z-index: 1;
|
|
1249
|
+
box-sizing: content-box;
|
|
1250
|
+
border: 1px solid var(--border-color);
|
|
1251
|
+
border-radius: 5px;
|
|
1252
|
+
padding: 16px;
|
|
1253
|
+
width: fit-content;
|
|
1254
|
+
background-color: #fff;
|
|
1255
|
+
box-shadow: var(--popup-shadow);
|
|
1256
|
+
display: none;
|
|
1257
|
+
}
|
|
1258
|
+
lake-box[name="equation"] .lake-box-focused .lake-equation-form,
|
|
1259
|
+
lake-box[name="equation"] .lake-box-activated .lake-equation-form {
|
|
1260
|
+
display: flex;
|
|
1261
|
+
}
|
|
1262
|
+
.lake-equation .lake-equation-form textarea {
|
|
1263
|
+
border: 0;
|
|
1264
|
+
box-sizing: border-box;
|
|
1265
|
+
font-family: Consolas, Courier, monospace;
|
|
1266
|
+
font-size: 14px;
|
|
1267
|
+
color: var(--text-color);
|
|
1268
|
+
padding: 0;
|
|
1269
|
+
margin-right: 8px;
|
|
1270
|
+
width: 300px;
|
|
1271
|
+
height: 80px;
|
|
1272
|
+
resize: none;
|
|
1273
|
+
scrollbar-width: thin;
|
|
1274
|
+
}
|
|
1275
|
+
.lake-equation .lake-equation-form textarea:focus-visible {
|
|
1276
|
+
outline: 0;
|
|
1277
|
+
}
|
|
1278
|
+
/* error status */
|
|
1279
|
+
.lake-equation-error {
|
|
1280
|
+
padding: 0 6px;
|
|
1281
|
+
font-size: 14px;
|
|
1282
|
+
color: var(--error-color);
|
|
1283
|
+
background-color: var(--box-background-color);
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1219
1286
|
.lake-toolbar {
|
|
1220
1287
|
font-family: var(--font-family);
|
|
1221
1288
|
font-size: 14px;
|
|
@@ -1240,3 +1307,56 @@ lake-box[name="emoji"] .lake-box-focused .lake-emoji {
|
|
|
1240
1307
|
.lake-toolbar .lake-upload input[type="file"] {
|
|
1241
1308
|
display: none;
|
|
1242
1309
|
}
|
|
1310
|
+
|
|
1311
|
+
.lake-commands-popup {
|
|
1312
|
+
position: absolute;
|
|
1313
|
+
top: 0;
|
|
1314
|
+
left: 0;
|
|
1315
|
+
z-index: 1;
|
|
1316
|
+
box-sizing: content-box;
|
|
1317
|
+
border: 1px solid var(--border-color);
|
|
1318
|
+
border-radius: 5px;
|
|
1319
|
+
padding: 4px 8px;
|
|
1320
|
+
width: fit-content;
|
|
1321
|
+
font-family: var(--font-family);
|
|
1322
|
+
font-size: 14px;
|
|
1323
|
+
color: var(--text-color);
|
|
1324
|
+
background-color: #fff;
|
|
1325
|
+
box-shadow: var(--popup-shadow);
|
|
1326
|
+
display: none;
|
|
1327
|
+
height: 380px;
|
|
1328
|
+
overflow-y: scroll;
|
|
1329
|
+
scrollbar-width: thin;
|
|
1330
|
+
}
|
|
1331
|
+
.lake-commands-popup .lake-commands-item {
|
|
1332
|
+
display: flex;
|
|
1333
|
+
cursor: pointer;
|
|
1334
|
+
padding: 4px 8px;
|
|
1335
|
+
border-radius: 5px;
|
|
1336
|
+
}
|
|
1337
|
+
.lake-commands-popup .lake-commands-item-selected {
|
|
1338
|
+
background-color: var(--background-active-color);
|
|
1339
|
+
}
|
|
1340
|
+
.lake-commands-popup .lake-commands-icon {
|
|
1341
|
+
margin-right: 8px;
|
|
1342
|
+
border-radius: 5px;
|
|
1343
|
+
border: 1px solid var(--border-color);
|
|
1344
|
+
background-color: #fff;
|
|
1345
|
+
}
|
|
1346
|
+
.lake-commands-popup .lake-commands-icon svg {
|
|
1347
|
+
width: 32px;
|
|
1348
|
+
height: 32px;
|
|
1349
|
+
margin: 6px;
|
|
1350
|
+
}
|
|
1351
|
+
.lake-commands-popup .lake-commands-text {
|
|
1352
|
+
display: flex;
|
|
1353
|
+
flex-direction: column;
|
|
1354
|
+
justify-content: center;
|
|
1355
|
+
}
|
|
1356
|
+
.lake-commands-popup .lake-commands-title {
|
|
1357
|
+
font-weight: 500;
|
|
1358
|
+
color: var(--text-color);
|
|
1359
|
+
}
|
|
1360
|
+
.lake-commands-popup .lake-commands-description {
|
|
1361
|
+
color: var(--secondary-text-color);
|
|
1362
|
+
}
|