@dxos/react-ui-editor 0.7.5-labs.071a3e2 → 0.7.5-labs.401163d

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.
@@ -459,11 +459,10 @@ var defaultTheme = {
459
459
  /**
460
460
  * Gutters
461
461
  * NOTE: Gutters should have the same top margin as the content.
462
- * NOTE: They can't be transparent since the content needs to scroll below.
463
462
  */
464
463
  ".cm-gutters": {
465
- background: "var(--surface-bg)",
466
- borderRight: "none"
464
+ borderRight: "none",
465
+ background: "transparent"
467
466
  },
468
467
  ".cm-gutter": {},
469
468
  ".cm-gutter.cm-lineNumbers .cm-gutterElement": {
@@ -2047,7 +2046,7 @@ import sortBy from "lodash.sortby";
2047
2046
  import { useEffect, useMemo as useMemo2 } from "react";
2048
2047
  import { debounce as debounce2 } from "@dxos/async";
2049
2048
  import { log as log4 } from "@dxos/log";
2050
- import { nonNullable } from "@dxos/util";
2049
+ import { isNonNullable } from "@dxos/util";
2051
2050
 
2052
2051
  // packages/ui/react-ui-editor/src/extensions/selection.ts
2053
2052
  import { Transaction } from "@codemirror/state";
@@ -2172,7 +2171,7 @@ var commentsState = StateField4.define({
2172
2171
  comment,
2173
2172
  range
2174
2173
  };
2175
- }).filter(nonNullable);
2174
+ }).filter(isNonNullable);
2176
2175
  return {
2177
2176
  ...value,
2178
2177
  comments: commentStates
@@ -2224,7 +2223,7 @@ var commentsDecorations = EditorView9.decorations.compute([
2224
2223
  }
2225
2224
  const mark = createCommentMark(comment.comment.id, comment.comment.id === current);
2226
2225
  return mark.range(range.from, range.to);
2227
- }).filter(nonNullable);
2226
+ }).filter(isNonNullable);
2228
2227
  return Decoration4.set(decorations);
2229
2228
  });
2230
2229
  var commentClickedEffect = StateEffect3.define();
@@ -2495,7 +2494,7 @@ var comments = (options = {}) => {
2495
2494
  }
2496
2495
  }),
2497
2496
  options.onUpdate && trackPastedComments(options.onUpdate)
2498
- ].filter(nonNullable);
2497
+ ].filter(isNonNullable);
2499
2498
  };
2500
2499
  var scrollThreadIntoView = (view, id, center = true) => {
2501
2500
  const comment = view.state.field(commentsState).comments.find((range2) => range2.comment.id === id);
@@ -2665,7 +2664,6 @@ import defaultsDeep2 from "lodash.defaultsdeep";
2665
2664
  import merge from "lodash.merge";
2666
2665
  import { generateName } from "@dxos/display-name";
2667
2666
  import { log as log5 } from "@dxos/log";
2668
- import { hueTokens } from "@dxos/react-ui-theme";
2669
2667
  import { hexToHue, isNotFalsy as isNotFalsy3 } from "@dxos/util";
2670
2668
 
2671
2669
  // packages/ui/react-ui-editor/src/extensions/focus.ts
@@ -2795,15 +2793,15 @@ var createDataExtensions = ({ id, text, space, identity }) => {
2795
2793
  }
2796
2794
  if (space && identity) {
2797
2795
  const peerId = identity?.identityKey.toHex();
2798
- const { cursorLightValue, cursorDarkValue } = hueTokens[identity?.profile?.data?.hue ?? hexToHue(peerId ?? "0")];
2796
+ const hue = identity?.profile?.data?.hue ?? hexToHue(peerId ?? "0");
2799
2797
  extensions.push(awareness(new SpaceAwarenessProvider({
2800
2798
  space,
2801
2799
  channel: `awareness.${id}`,
2802
2800
  peerId: identity.identityKey.toHex(),
2803
2801
  info: {
2804
2802
  displayName: identity.profile?.displayName ?? generateName(identity.identityKey.toHex()),
2805
- darkColor: cursorDarkValue,
2806
- lightColor: cursorLightValue
2803
+ darkColor: `var(--dx-${hue}Cursor)`,
2804
+ lightColor: `var(--dx-${hue}Cursor)`
2807
2805
  }
2808
2806
  })));
2809
2807
  }