@dxos/react-ui-editor 0.3.11-main.ff3a851 → 0.3.11-next.e28df4f

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.
@@ -1,7 +1,6 @@
1
1
  // packages/ui/react-ui-editor/src/index.ts
2
2
  import { TextKind } from "@dxos/protocols/proto/dxos/echo/model/text";
3
3
  import { Doc, YText, YXmlFragment } from "@dxos/text-model";
4
- import { keymap as keymap7 } from "@codemirror/view";
5
4
 
6
5
  // packages/ui/react-ui-editor/src/components/TextEditor/index.ts
7
6
  import { tags as tags2 } from "@lezer/highlight";
@@ -14,7 +13,7 @@ import defaultsDeep2 from "lodash.defaultsdeep";
14
13
  import React, { forwardRef, useCallback, useEffect as useEffect2, useImperativeHandle, useRef, useState } from "react";
15
14
  import { log as log2 } from "@dxos/log";
16
15
  import { useThemeContext } from "@dxos/react-ui";
17
- import { focusRing, mx as mx3 } from "@dxos/react-ui-theme";
16
+ import { attentionSurface, mx as mx3 } from "@dxos/react-ui-theme";
18
17
  import { isNotFalsy as isNotFalsy3 } from "@dxos/util";
19
18
 
20
19
  // packages/ui/react-ui-editor/src/extensions/autocomplete.ts
@@ -783,7 +782,7 @@ var Blaster = class {
783
782
  initialize() {
784
783
  invariant(!this._canvas && !this._ctx, void 0, {
785
784
  F: __dxlog_file,
786
- L: 141,
785
+ L: 138,
787
786
  S: this,
788
787
  A: [
789
788
  "!this._canvas && !this._ctx",
@@ -820,7 +819,7 @@ var Blaster = class {
820
819
  start() {
821
820
  invariant(this._canvas && this._ctx, void 0, {
822
821
  F: __dxlog_file,
823
- L: 180,
822
+ L: 177,
824
823
  S: this,
825
824
  A: [
826
825
  "this._canvas && this._ctx",
@@ -2607,11 +2606,8 @@ var defaultTheme = {
2607
2606
  "&dark .cm-cursor, &dark .cm-dropCursor": {
2608
2607
  borderLeft: "2px solid white"
2609
2608
  },
2610
- "&light .cm-placeholder": {
2611
- color: get3(tokens, "extend.semanticColors.description.light", "rgba(0,0,0,.2)")
2612
- },
2613
- "&dark .cm-placeholder": {
2614
- color: get3(tokens, "extend.semanticColors.description.dark", "rgba(255,255,255,.2)")
2609
+ ".cm-placeholder": {
2610
+ fontWeight: 100
2615
2611
  },
2616
2612
  //
2617
2613
  // line
@@ -2952,10 +2948,11 @@ var MarkdownEditor = /* @__PURE__ */ forwardRef(({ readonly, placeholder: placeh
2952
2948
  });
2953
2949
  var defaultSlots = {
2954
2950
  root: {
2955
- className: mx3("grow", focusRing)
2951
+ // TODO(burdon): Add focusRing by default/as property?
2952
+ className: mx3("flex flex-col grow overflow-y-auto", attentionSurface)
2956
2953
  },
2957
2954
  editor: {
2958
- className: "bs-full"
2955
+ className: "h-full p-2"
2959
2956
  }
2960
2957
  };
2961
2958
  var defaultTextSlots = {
@@ -3415,19 +3412,10 @@ var useTextModel = (props) => {
3415
3412
  ]);
3416
3413
  return model;
3417
3414
  };
3418
- var useInMemoryTextModel = ({ id, defaultContent }) => {
3419
- const [content, setContent] = useState4(defaultContent ?? "");
3420
- return {
3421
- id,
3422
- content,
3423
- setContent,
3424
- text: () => content
3425
- };
3426
- };
3427
3415
  var createModel = ({ space, identity, text }) => {
3428
3416
  invariant3(isAutomergeObject(text), void 0, {
3429
3417
  F: __dxlog_file6,
3430
- L: 50,
3418
+ L: 34,
3431
3419
  S: void 0,
3432
3420
  A: [
3433
3421
  "isAutomergeObject(text)",
@@ -3511,7 +3499,6 @@ export {
3511
3499
  image,
3512
3500
  insertCodeblock,
3513
3501
  insertTable,
3514
- keymap7 as keymap,
3515
3502
  link,
3516
3503
  listener,
3517
3504
  logChanges,
@@ -3538,7 +3525,6 @@ export {
3538
3525
  useActionHandler,
3539
3526
  useComments,
3540
3527
  useEditorView,
3541
- useInMemoryTextModel,
3542
3528
  useTextEditor,
3543
3529
  useTextModel,
3544
3530
  useToolbarContext