@estiva-app/ui 0.88.0 → 0.89.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/BlockNodes.d.ts.map +1 -1
- package/dist/ComposerTriggers.d.ts.map +1 -1
- package/dist/archivedLine.d.ts +11 -8
- package/dist/archivedLine.d.ts.map +1 -1
- package/dist/editor.js +129 -120
- package/dist/editor.js.map +4 -4
- package/dist/index.js +13 -6
- package/dist/index.js.map +4 -4
- package/package.json +3 -3
- package/registry.json +1 -1
- package/src/BlockNodes.tsx +3 -0
- package/src/ComposerTriggers.test.tsx +83 -0
- package/src/ComposerTriggers.tsx +18 -1
- package/src/archivedLine.ts +14 -11
- package/src/archivedLine.test.ts +0 -34
package/dist/BlockNodes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockNodes.d.ts","sourceRoot":"","sources":["../src/BlockNodes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAc,MAAM,OAAO,CAAA;AACtD,OAAO,EAAE,SAAS,EAAa,IAAI,EAAe,MAAM,cAAc,CAAA;AAEtE,OAAO,EAAuC,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAMxF,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"BlockNodes.d.ts","sourceRoot":"","sources":["../src/BlockNodes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAc,MAAM,OAAO,CAAA;AACtD,OAAO,EAAE,SAAS,EAAa,IAAI,EAAe,MAAM,cAAc,CAAA;AAEtE,OAAO,EAAuC,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAMxF,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AA6QtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,eAAO,MAAM,OA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AAG,WAAW,GAAG,MAAM,GAAG,SAAS,CAAA;AAElJ,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,QAAQ,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,kGAAkG;IAClG,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,mGAAmG;IACnG,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,SAAS,SAAS,EAQvC,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,SAAS,EAIhD,CAAA;AAED,gEAAgE;AAChE,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE3C;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,GAAE,UAAqB,GAAG,OAAO,CA2D9F;AAgBD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,GAAE,UAAqB,GAAG,YAAY,CAavE;AAED,8EAA8E;AAC9E,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,CAM9D;AAMD,4FAA4F;AAC5F,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,SAAS,YAAY,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,YAAY,EAAE,CAGpG;AAED,MAAM,WAAW,oBAAoB;IACnC,+EAA+E;IAC/E,QAAQ,EAAE,SAAS,YAAY,EAAE,CAAA;CAClC;AAID;;;;GAIG;AACH,eAAO,MAAM,aAAa,sCAgCxB,CAAA"}
|
package/dist/archivedLine.d.ts
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* archivedLine, the one sentence every app shows on an archived file (PEEKM-2).
|
|
3
|
-
*/
|
|
4
1
|
/**
|
|
5
2
|
* The line in the comment box's place on an archived file (CommentBox's
|
|
6
3
|
* `closed.reason`), in every app's words alike.
|
|
7
4
|
*
|
|
8
5
|
* A file archived itself says so; one archived with a file above it names the
|
|
9
6
|
* closest archived one by its kind — "Unarchive the page to comment." — so a
|
|
10
|
-
* person unarchives the right thing
|
|
11
|
-
*
|
|
12
|
-
*
|
|
7
|
+
* person unarchives the right thing. `options.in` names where to unarchive, for
|
|
8
|
+
* an app with no Unarchive of its own; `options.to` is what waits, "comment"
|
|
9
|
+
* unless said.
|
|
10
|
+
*
|
|
11
|
+
* Typed here rather than inferred, so this package's types never point at
|
|
12
|
+
* @estiva-app/conversation (bundled, not a dependency of an app's).
|
|
13
13
|
*
|
|
14
14
|
* why: https://github.com/estiva-app/estiva-docs/blob/main/decisions/a-file-is-archived-with-the-closest-archived-file-above-it.md
|
|
15
15
|
*/
|
|
16
|
-
export declare
|
|
16
|
+
export declare const archivedLine: (archive: {
|
|
17
17
|
with?: string;
|
|
18
|
-
} | undefined, noun?: string
|
|
18
|
+
} | undefined, noun?: string, options?: {
|
|
19
|
+
in?: string;
|
|
20
|
+
to?: string;
|
|
21
|
+
}) => string | undefined;
|
|
19
22
|
//# sourceMappingURL=archivedLine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archivedLine.d.ts","sourceRoot":"","sources":["../src/archivedLine.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"archivedLine.d.ts","sourceRoot":"","sources":["../src/archivedLine.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,YAAY,EAAE,CACzB,OAAO,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,EACtC,IAAI,CAAC,EAAE,MAAM,EACb,OAAO,CAAC,EAAE;IAAE,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,KACnC,MAAM,GAAG,SAAoB,CAAA"}
|
package/dist/editor.js
CHANGED
|
@@ -309,7 +309,7 @@ import { Extension as Extension6, InputRule, Node as Node2 } from "@tiptap/core"
|
|
|
309
309
|
import { DOMSerializer } from "@tiptap/pm/model";
|
|
310
310
|
import { Plugin as Plugin6, PluginKey as PluginKey6 } from "@tiptap/pm/state";
|
|
311
311
|
import { Mapping, ReplaceAroundStep } from "@tiptap/pm/transform";
|
|
312
|
-
import { NodeViewWrapper, ReactNodeViewRenderer, ReactRenderer } from "@tiptap/react";
|
|
312
|
+
import { NodeViewWrapper, ReactNodeViewRenderer, ReactRenderer as ReactRenderer2 } from "@tiptap/react";
|
|
313
313
|
import { Checkbox } from "@estiva-app/ui";
|
|
314
314
|
import { calloutLook } from "@estiva-app/ui";
|
|
315
315
|
|
|
@@ -955,8 +955,120 @@ function ReferenceMenuView({ editor }) {
|
|
|
955
955
|
);
|
|
956
956
|
}
|
|
957
957
|
|
|
958
|
-
// src/
|
|
958
|
+
// src/suggestionPopup.tsx
|
|
959
|
+
import { forwardRef, useRef as useRef2, useImperativeHandle } from "react";
|
|
960
|
+
import { ReactRenderer } from "@tiptap/react";
|
|
961
|
+
import { exitSuggestion } from "@tiptap/suggestion";
|
|
962
|
+
import { SuggestionMenu } from "@estiva-app/ui";
|
|
959
963
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
964
|
+
var openCount = 0;
|
|
965
|
+
var lastClose = 0;
|
|
966
|
+
function isSuggestionActive() {
|
|
967
|
+
return openCount > 0 || Date.now() - lastClose < 100;
|
|
968
|
+
}
|
|
969
|
+
function isSuggestionOpen() {
|
|
970
|
+
return openCount > 0;
|
|
971
|
+
}
|
|
972
|
+
var Popup = forwardRef(function Popup2({ options, ...props }, handle) {
|
|
973
|
+
const menu = useRef2(null);
|
|
974
|
+
useImperativeHandle(handle, () => ({ onKeyDown: (event) => menu.current?.onKeyDown(event) ?? false }));
|
|
975
|
+
const sections = options.sections ? options.sections(props.items, props.query) : [{ items: props.items }];
|
|
976
|
+
return /* @__PURE__ */ jsx3(
|
|
977
|
+
SuggestionMenu,
|
|
978
|
+
{
|
|
979
|
+
handle: menu,
|
|
980
|
+
rect: props.clientRect?.() ?? null,
|
|
981
|
+
editorElement: props.editor.view.dom,
|
|
982
|
+
ariaLabel: options.ariaLabel,
|
|
983
|
+
width: options.width,
|
|
984
|
+
maxHeight: options.maxHeight,
|
|
985
|
+
sections,
|
|
986
|
+
itemKey: options.itemKey,
|
|
987
|
+
row: options.row,
|
|
988
|
+
onSelect: (item) => props.command(item)
|
|
989
|
+
}
|
|
990
|
+
);
|
|
991
|
+
});
|
|
992
|
+
function suggestionPopup(options) {
|
|
993
|
+
return () => {
|
|
994
|
+
let component = null;
|
|
995
|
+
let container = null;
|
|
996
|
+
let last = null;
|
|
997
|
+
let unsubscribe;
|
|
998
|
+
let counted = false;
|
|
999
|
+
let unlisten;
|
|
1000
|
+
const count = (shown) => {
|
|
1001
|
+
if (shown === counted) return;
|
|
1002
|
+
counted = shown;
|
|
1003
|
+
openCount = shown ? openCount + 1 : Math.max(0, openCount - 1);
|
|
1004
|
+
};
|
|
1005
|
+
const listen = (props) => {
|
|
1006
|
+
const { view } = props.editor;
|
|
1007
|
+
const dom = view.dom;
|
|
1008
|
+
const onBlur = () => {
|
|
1009
|
+
if (dom.contains(document.activeElement) || !last) return;
|
|
1010
|
+
const from = last.range.from;
|
|
1011
|
+
count(false);
|
|
1012
|
+
for (const plugin of view.state.plugins) {
|
|
1013
|
+
const state = plugin.getState(view.state);
|
|
1014
|
+
if (state?.active && state.range?.from === from && plugin.spec.key) exitSuggestion(view, plugin.spec.key);
|
|
1015
|
+
}
|
|
1016
|
+
};
|
|
1017
|
+
dom.addEventListener("blur", onBlur);
|
|
1018
|
+
unlisten = () => dom.removeEventListener("blur", onBlur);
|
|
1019
|
+
};
|
|
1020
|
+
const exit = () => {
|
|
1021
|
+
unsubscribe?.();
|
|
1022
|
+
unsubscribe = void 0;
|
|
1023
|
+
unlisten?.();
|
|
1024
|
+
unlisten = void 0;
|
|
1025
|
+
last = null;
|
|
1026
|
+
if (counted) lastClose = Date.now();
|
|
1027
|
+
count(false);
|
|
1028
|
+
if (!component) return;
|
|
1029
|
+
component.destroy();
|
|
1030
|
+
container?.remove();
|
|
1031
|
+
component = null;
|
|
1032
|
+
container = null;
|
|
1033
|
+
};
|
|
1034
|
+
return {
|
|
1035
|
+
onStart: (props) => {
|
|
1036
|
+
count(props.items.length > 0);
|
|
1037
|
+
component = new ReactRenderer(Popup, { props: { ...props, options }, editor: props.editor });
|
|
1038
|
+
container = document.createElement("div");
|
|
1039
|
+
document.body.appendChild(container);
|
|
1040
|
+
container.appendChild(component.element);
|
|
1041
|
+
last = props;
|
|
1042
|
+
listen(props);
|
|
1043
|
+
const { subscribe, refresh } = options;
|
|
1044
|
+
if (subscribe && refresh) {
|
|
1045
|
+
unsubscribe = subscribe(() => {
|
|
1046
|
+
if (!last || !component) return;
|
|
1047
|
+
last = { ...last, items: refresh(last.query) };
|
|
1048
|
+
count(last.items.length > 0);
|
|
1049
|
+
component.updateProps({ ...last, options });
|
|
1050
|
+
});
|
|
1051
|
+
}
|
|
1052
|
+
},
|
|
1053
|
+
onUpdate: (props) => {
|
|
1054
|
+
last = props;
|
|
1055
|
+
count(props.items.length > 0);
|
|
1056
|
+
component?.updateProps({ ...props, options });
|
|
1057
|
+
},
|
|
1058
|
+
onKeyDown: ({ event }) => {
|
|
1059
|
+
if (event.key === "Escape") {
|
|
1060
|
+
exit();
|
|
1061
|
+
return true;
|
|
1062
|
+
}
|
|
1063
|
+
return component?.ref?.onKeyDown(event) ?? false;
|
|
1064
|
+
},
|
|
1065
|
+
onExit: exit
|
|
1066
|
+
};
|
|
1067
|
+
};
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
// src/BlockNodes.tsx
|
|
1071
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
960
1072
|
var BLOCK_TYPES = [
|
|
961
1073
|
"paragraph",
|
|
962
1074
|
"heading",
|
|
@@ -1203,7 +1315,7 @@ var ReferenceNode = Node2.create({
|
|
|
1203
1315
|
const uri = String(node.attrs.uri ?? "");
|
|
1204
1316
|
const href = typeof node.attrs.href === "string" && node.attrs.href ? node.attrs.href : void 0;
|
|
1205
1317
|
const place2 = placeOf(decorations);
|
|
1206
|
-
return /* @__PURE__ */
|
|
1318
|
+
return /* @__PURE__ */ jsx4(
|
|
1207
1319
|
NodeViewWrapper,
|
|
1208
1320
|
{
|
|
1209
1321
|
as: "span",
|
|
@@ -1218,7 +1330,7 @@ var ReferenceNode = Node2.create({
|
|
|
1218
1330
|
event.preventDefault();
|
|
1219
1331
|
event.stopPropagation();
|
|
1220
1332
|
},
|
|
1221
|
-
children: uri ? /* @__PURE__ */
|
|
1333
|
+
children: uri ? /* @__PURE__ */ jsx4(View, { uri, ...href ? { href } : {}, place: place2, editing: editor.isEditable }) : /* @__PURE__ */ jsx4("span", { children: href })
|
|
1222
1334
|
}
|
|
1223
1335
|
);
|
|
1224
1336
|
}, {
|
|
@@ -1255,7 +1367,7 @@ var UnknownBlock = Node2.create({
|
|
|
1255
1367
|
function UnknownBlockView({ node }) {
|
|
1256
1368
|
const source = node.attrs.source;
|
|
1257
1369
|
const text = String(node.attrs.text ?? "");
|
|
1258
|
-
return /* @__PURE__ */
|
|
1370
|
+
return /* @__PURE__ */ jsx4(
|
|
1259
1371
|
NodeViewWrapper,
|
|
1260
1372
|
{
|
|
1261
1373
|
"data-block-id": source?.id,
|
|
@@ -1295,7 +1407,7 @@ var AttachmentNode = Node2.create({
|
|
|
1295
1407
|
addNodeView() {
|
|
1296
1408
|
const View = this.options.view;
|
|
1297
1409
|
if (!View) return null;
|
|
1298
|
-
return ReactNodeViewRenderer(({ node }) => /* @__PURE__ */
|
|
1410
|
+
return ReactNodeViewRenderer(({ node }) => /* @__PURE__ */ jsx4(NodeViewWrapper, { className: "my-2", children: /* @__PURE__ */ jsx4(View, { attrs: node.attrs }) }));
|
|
1299
1411
|
}
|
|
1300
1412
|
});
|
|
1301
1413
|
var TICK = "checklistTick";
|
|
@@ -1332,7 +1444,7 @@ function listItemView(editor, node, view, getPos) {
|
|
|
1332
1444
|
};
|
|
1333
1445
|
let words = node.firstChild?.textContent.trim() || "Item";
|
|
1334
1446
|
const props = () => ({ checked, onChange: view.editable ? tick : void 0, "aria-label": words });
|
|
1335
|
-
const renderer = new
|
|
1447
|
+
const renderer = new ReactRenderer2(Checkbox, { editor, props: props(), as: "span" });
|
|
1336
1448
|
box.appendChild(renderer.element);
|
|
1337
1449
|
let drawn = "";
|
|
1338
1450
|
const sync = () => {
|
|
@@ -1404,6 +1516,7 @@ var Checklist = Extension6.create({
|
|
|
1404
1516
|
addKeyboardShortcuts() {
|
|
1405
1517
|
return {
|
|
1406
1518
|
Enter: () => {
|
|
1519
|
+
if (isSuggestionOpen()) return false;
|
|
1407
1520
|
const { state } = this.editor;
|
|
1408
1521
|
const item = itemAtCaret(state);
|
|
1409
1522
|
const { $from, empty } = state.selection;
|
|
@@ -1476,118 +1589,6 @@ import { ScrollArea } from "@estiva-app/ui";
|
|
|
1476
1589
|
var FLOATING_SURFACE_CLASSES = "rounded-lg border border-border-default bg-bg-elevated shadow-lg";
|
|
1477
1590
|
var WRITING_BOX_CLASSES = "relative bg-bg-inset border border-border-default rounded-lg p-3 flex flex-col gap-4 signal:transition-shadow signal:focus-within:border-border-focus signal:focus-within:shadow-focus-ring";
|
|
1478
1591
|
|
|
1479
|
-
// src/suggestionPopup.tsx
|
|
1480
|
-
import { forwardRef, useRef as useRef2, useImperativeHandle } from "react";
|
|
1481
|
-
import { ReactRenderer as ReactRenderer2 } from "@tiptap/react";
|
|
1482
|
-
import { exitSuggestion } from "@tiptap/suggestion";
|
|
1483
|
-
import { SuggestionMenu } from "@estiva-app/ui";
|
|
1484
|
-
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
1485
|
-
var openCount = 0;
|
|
1486
|
-
var lastClose = 0;
|
|
1487
|
-
function isSuggestionActive() {
|
|
1488
|
-
return openCount > 0 || Date.now() - lastClose < 100;
|
|
1489
|
-
}
|
|
1490
|
-
function isSuggestionOpen() {
|
|
1491
|
-
return openCount > 0;
|
|
1492
|
-
}
|
|
1493
|
-
var Popup = forwardRef(function Popup2({ options, ...props }, handle) {
|
|
1494
|
-
const menu = useRef2(null);
|
|
1495
|
-
useImperativeHandle(handle, () => ({ onKeyDown: (event) => menu.current?.onKeyDown(event) ?? false }));
|
|
1496
|
-
const sections = options.sections ? options.sections(props.items, props.query) : [{ items: props.items }];
|
|
1497
|
-
return /* @__PURE__ */ jsx4(
|
|
1498
|
-
SuggestionMenu,
|
|
1499
|
-
{
|
|
1500
|
-
handle: menu,
|
|
1501
|
-
rect: props.clientRect?.() ?? null,
|
|
1502
|
-
editorElement: props.editor.view.dom,
|
|
1503
|
-
ariaLabel: options.ariaLabel,
|
|
1504
|
-
width: options.width,
|
|
1505
|
-
maxHeight: options.maxHeight,
|
|
1506
|
-
sections,
|
|
1507
|
-
itemKey: options.itemKey,
|
|
1508
|
-
row: options.row,
|
|
1509
|
-
onSelect: (item) => props.command(item)
|
|
1510
|
-
}
|
|
1511
|
-
);
|
|
1512
|
-
});
|
|
1513
|
-
function suggestionPopup(options) {
|
|
1514
|
-
return () => {
|
|
1515
|
-
let component = null;
|
|
1516
|
-
let container = null;
|
|
1517
|
-
let last = null;
|
|
1518
|
-
let unsubscribe;
|
|
1519
|
-
let counted = false;
|
|
1520
|
-
let unlisten;
|
|
1521
|
-
const count = (shown) => {
|
|
1522
|
-
if (shown === counted) return;
|
|
1523
|
-
counted = shown;
|
|
1524
|
-
openCount = shown ? openCount + 1 : Math.max(0, openCount - 1);
|
|
1525
|
-
};
|
|
1526
|
-
const listen = (props) => {
|
|
1527
|
-
const { view } = props.editor;
|
|
1528
|
-
const dom = view.dom;
|
|
1529
|
-
const onBlur = () => {
|
|
1530
|
-
if (dom.contains(document.activeElement) || !last) return;
|
|
1531
|
-
const from = last.range.from;
|
|
1532
|
-
count(false);
|
|
1533
|
-
for (const plugin of view.state.plugins) {
|
|
1534
|
-
const state = plugin.getState(view.state);
|
|
1535
|
-
if (state?.active && state.range?.from === from && plugin.spec.key) exitSuggestion(view, plugin.spec.key);
|
|
1536
|
-
}
|
|
1537
|
-
};
|
|
1538
|
-
dom.addEventListener("blur", onBlur);
|
|
1539
|
-
unlisten = () => dom.removeEventListener("blur", onBlur);
|
|
1540
|
-
};
|
|
1541
|
-
const exit = () => {
|
|
1542
|
-
unsubscribe?.();
|
|
1543
|
-
unsubscribe = void 0;
|
|
1544
|
-
unlisten?.();
|
|
1545
|
-
unlisten = void 0;
|
|
1546
|
-
last = null;
|
|
1547
|
-
if (counted) lastClose = Date.now();
|
|
1548
|
-
count(false);
|
|
1549
|
-
if (!component) return;
|
|
1550
|
-
component.destroy();
|
|
1551
|
-
container?.remove();
|
|
1552
|
-
component = null;
|
|
1553
|
-
container = null;
|
|
1554
|
-
};
|
|
1555
|
-
return {
|
|
1556
|
-
onStart: (props) => {
|
|
1557
|
-
count(props.items.length > 0);
|
|
1558
|
-
component = new ReactRenderer2(Popup, { props: { ...props, options }, editor: props.editor });
|
|
1559
|
-
container = document.createElement("div");
|
|
1560
|
-
document.body.appendChild(container);
|
|
1561
|
-
container.appendChild(component.element);
|
|
1562
|
-
last = props;
|
|
1563
|
-
listen(props);
|
|
1564
|
-
const { subscribe, refresh } = options;
|
|
1565
|
-
if (subscribe && refresh) {
|
|
1566
|
-
unsubscribe = subscribe(() => {
|
|
1567
|
-
if (!last || !component) return;
|
|
1568
|
-
last = { ...last, items: refresh(last.query) };
|
|
1569
|
-
count(last.items.length > 0);
|
|
1570
|
-
component.updateProps({ ...last, options });
|
|
1571
|
-
});
|
|
1572
|
-
}
|
|
1573
|
-
},
|
|
1574
|
-
onUpdate: (props) => {
|
|
1575
|
-
last = props;
|
|
1576
|
-
count(props.items.length > 0);
|
|
1577
|
-
component?.updateProps({ ...props, options });
|
|
1578
|
-
},
|
|
1579
|
-
onKeyDown: ({ event }) => {
|
|
1580
|
-
if (event.key === "Escape") {
|
|
1581
|
-
exit();
|
|
1582
|
-
return true;
|
|
1583
|
-
}
|
|
1584
|
-
return component?.ref?.onKeyDown(event) ?? false;
|
|
1585
|
-
},
|
|
1586
|
-
onExit: exit
|
|
1587
|
-
};
|
|
1588
|
-
};
|
|
1589
|
-
}
|
|
1590
|
-
|
|
1591
1592
|
// src/commentBoxFrame.tsx
|
|
1592
1593
|
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1593
1594
|
var COMPOSE_EDITOR_CLASSES = richTextClassName("default", "outline-none w-full bg-transparent min-h-[20px] [&>p+p]:-mt-1");
|
|
@@ -1984,11 +1985,17 @@ var DOCUMENT_FORMATS = [
|
|
|
1984
1985
|
{ id: "warning", label: "Warning" }
|
|
1985
1986
|
];
|
|
1986
1987
|
function applyFormat(editor, id, code = "inline") {
|
|
1987
|
-
const chain = editor.chain().focus();
|
|
1988
1988
|
const run = (command, ...args) => {
|
|
1989
|
+
const chain = editor.chain().focus();
|
|
1989
1990
|
const named2 = chain[command];
|
|
1990
1991
|
return named2 ? named2(...args).run() : false;
|
|
1991
1992
|
};
|
|
1993
|
+
const leaveList = () => {
|
|
1994
|
+
if (!editor.schema.nodes.blockquote) return false;
|
|
1995
|
+
let left = false;
|
|
1996
|
+
while (editor.isActive("listItem") && run("liftListItem", "listItem")) left = true;
|
|
1997
|
+
return left;
|
|
1998
|
+
};
|
|
1992
1999
|
switch (id) {
|
|
1993
2000
|
case "paragraph":
|
|
1994
2001
|
return run("setParagraph");
|
|
@@ -1997,6 +2004,7 @@ function applyFormat(editor, id, code = "inline") {
|
|
|
1997
2004
|
case "subheading":
|
|
1998
2005
|
return run("setHeading", { level: 2 });
|
|
1999
2006
|
case "quote":
|
|
2007
|
+
if (leaveList() && editor.isActive("blockquote")) return true;
|
|
2000
2008
|
return run("toggleBlockquote");
|
|
2001
2009
|
case "bulletList":
|
|
2002
2010
|
return run("toggleBulletList");
|
|
@@ -2011,6 +2019,7 @@ function applyFormat(editor, id, code = "inline") {
|
|
|
2011
2019
|
}
|
|
2012
2020
|
case "note":
|
|
2013
2021
|
case "warning": {
|
|
2022
|
+
leaveList();
|
|
2014
2023
|
if (!editor.isActive("blockquote") && !run("toggleBlockquote")) return false;
|
|
2015
2024
|
return editor.chain().updateAttributes("blockquote", { tone: id }).run();
|
|
2016
2025
|
}
|