@dxos/react-ui-editor 0.6.14-staging.e15392e → 0.7.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.
@@ -2246,7 +2246,7 @@ var defaultTheme = {
2246
2246
  marginLeft: "-3px"
2247
2247
  },
2248
2248
  ".cm-tooltip.cm-tooltip-autocomplete > ul": {
2249
- maxHeight: "20em !important"
2249
+ maxHeight: "20em"
2250
2250
  },
2251
2251
  ".cm-tooltip.cm-tooltip-autocomplete > ul > li": {},
2252
2252
  ".cm-tooltip.cm-tooltip-autocomplete > ul > li[aria-selected]": {},
@@ -2492,7 +2492,7 @@ var listener = ({ onFocus, onChange }) => {
2492
2492
  return null;
2493
2493
  }));
2494
2494
  onChange && extensions.push(EditorView13.updateListener.of((update2) => {
2495
- onChange(update2.state.doc.toString());
2495
+ onChange(update2.state.doc.toString(), update2.state.facet(documentId));
2496
2496
  }));
2497
2497
  return extensions;
2498
2498
  };
@@ -4882,7 +4882,6 @@ var mention = ({ onSearch }) => {
4882
4882
  import { keymap as keymap9 } from "@codemirror/view";
4883
4883
  import { vim } from "@replit/codemirror-vim";
4884
4884
  import { vscodeKeymap } from "@replit/codemirror-vscode-keymap";
4885
- var focusEvent = "focus.container";
4886
4885
  var EditorViewModes = [
4887
4886
  "preview",
4888
4887
  "readonly",
@@ -4914,9 +4913,7 @@ var InputModeExtensions = {
4914
4913
  {
4915
4914
  key: "Alt-Escape",
4916
4915
  run: (view) => {
4917
- view.dispatch({
4918
- userEvent: focusEvent
4919
- });
4916
+ view.dom.parentElement?.focus();
4920
4917
  return true;
4921
4918
  }
4922
4919
  }
@@ -4983,7 +4980,7 @@ var typewriter = ({ delay = 75, items = defaultItems } = {}) => {
4983
4980
 
4984
4981
  // packages/ui/react-ui-editor/src/components/Toolbar/Toolbar.tsx
4985
4982
  var iconStyles = getSize(5);
4986
- var buttonStyles = "min-bs-0 p-2";
4983
+ var buttonStyles = "min-bs-0 p-1";
4987
4984
  var tooltipProps = {
4988
4985
  side: "top",
4989
4986
  classNames: "z-10"
@@ -5478,9 +5475,6 @@ var useTextEditor = (props = {}, deps = []) => {
5478
5475
  }, deps);
5479
5476
  useEffect3(() => {
5480
5477
  if (view) {
5481
- if (view.state.facet(editorInputMode).noTabster) {
5482
- parentRef.current?.removeAttribute("data-tabster");
5483
- }
5484
5478
  if (scrollTo || selection) {
5485
5479
  if (selection && selection.anchor > view.state.doc.length) {
5486
5480
  log7.warn("invalid selection", {
@@ -5489,7 +5483,7 @@ var useTextEditor = (props = {}, deps = []) => {
5489
5483
  selection
5490
5484
  }, {
5491
5485
  F: __dxlog_file11,
5492
- L: 148,
5486
+ L: 143,
5493
5487
  S: void 0,
5494
5488
  C: (f, a) => f(...a)
5495
5489
  });
@@ -5515,7 +5509,10 @@ var useTextEditor = (props = {}, deps = []) => {
5515
5509
  view
5516
5510
  ]);
5517
5511
  const focusableGroup = useFocusableGroup({
5518
- tabBehavior: "limited"
5512
+ tabBehavior: "limited",
5513
+ ignoreDefaultKeydown: {
5514
+ Escape: view?.state.facet(editorInputMode).noTabster
5515
+ }
5519
5516
  });
5520
5517
  const handleKeyUp = useCallback((event) => {
5521
5518
  const { key, target, currentTarget } = event;
@@ -5593,7 +5590,6 @@ export {
5593
5590
  editorWithToolbarLayout,
5594
5591
  flattenRect,
5595
5592
  focus,
5596
- focusEvent,
5597
5593
  focusField,
5598
5594
  folding,
5599
5595
  formattingEquals,