@jvs-milkdown/crepe 1.2.14 → 1.2.15

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/lib/esm/index.js CHANGED
@@ -25,10 +25,10 @@ import { basicSetup } from 'codemirror';
25
25
  import { dropIndicatorConfig, cursor as cursor$1 } from '@jvs-milkdown/kit/plugin/cursor';
26
26
  import { createVirtualCursor } from 'prosemirror-virtual-cursor';
27
27
  import { diffBlockConfig, diffBlock } from '@jvs-milkdown/kit/component/diff-block';
28
+ import { Decoration, DecorationSet, EditorView } from '@jvs-milkdown/kit/prose/view';
28
29
  import { mergeCells, splitCell, CellSelection, selectedRect, splitCellWithType } from '@jvs-milkdown/kit/prose/tables';
29
30
  import clsx from 'clsx';
30
31
  import { toggleLinkCommand, configureLinkTooltip, linkTooltipConfig, linkTooltipPlugin } from '@jvs-milkdown/kit/component/link-tooltip';
31
- import { Decoration, DecorationSet, EditorView } from '@jvs-milkdown/kit/prose/view';
32
32
  import { inlineImageConfig, imageInlineComponent } from '@jvs-milkdown/kit/component/image-inline';
33
33
  import { Plugin as Plugin$1 } from '@jvs-milkdown/prose/state';
34
34
  import { $prose as $prose$1 } from '@jvs-milkdown/utils';
@@ -4327,29 +4327,6 @@ const diffBlockFeature = (editor, config = {}) => {
4327
4327
  }).use(diffBlock);
4328
4328
  };
4329
4329
 
4330
- const listeners = /* @__PURE__ */ new Set();
4331
- let _popupCount = 0;
4332
- function getIsAnyPopupOpen() {
4333
- return _popupCount > 0;
4334
- }
4335
- function addPopupChangeListener(fn) {
4336
- listeners.add(fn);
4337
- return () => listeners.delete(fn);
4338
- }
4339
- function incrementPopupCount() {
4340
- const wasZero = _popupCount === 0;
4341
- _popupCount++;
4342
- if (wasZero) {
4343
- listeners.forEach((fn) => fn());
4344
- }
4345
- }
4346
- function decrementPopupCount() {
4347
- _popupCount = Math.max(0, _popupCount - 1);
4348
- if (_popupCount === 0) {
4349
- listeners.forEach((fn) => fn());
4350
- }
4351
- }
4352
-
4353
4330
  const remarkHighlightMarkPlugin = $remark(
4354
4331
  "remarkHighlightMark",
4355
4332
  () => function() {
@@ -4833,6 +4810,29 @@ const underline = [
4833
4810
  remarkUnderlinePlugin
4834
4811
  ];
4835
4812
 
4813
+ const listeners = /* @__PURE__ */ new Set();
4814
+ let _popupCount = 0;
4815
+ function getIsAnyPopupOpen() {
4816
+ return _popupCount > 0;
4817
+ }
4818
+ function addPopupChangeListener(fn) {
4819
+ listeners.add(fn);
4820
+ return () => listeners.delete(fn);
4821
+ }
4822
+ function incrementPopupCount() {
4823
+ const wasZero = _popupCount === 0;
4824
+ _popupCount++;
4825
+ if (wasZero) {
4826
+ listeners.forEach((fn) => fn());
4827
+ }
4828
+ }
4829
+ function decrementPopupCount() {
4830
+ _popupCount = Math.max(0, _popupCount - 1);
4831
+ if (_popupCount === 0) {
4832
+ listeners.forEach((fn) => fn());
4833
+ }
4834
+ }
4835
+
4836
4836
  function getGroups(config, ctx) {
4837
4837
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
4838
4838
  const groupBuilder = new GroupBuilder();
@@ -9364,7 +9364,7 @@ const OutlinePanel = defineComponent({
9364
9364
  width: `${state.outlineWidth}px`,
9365
9365
  minWidth: "200px",
9366
9366
  maxWidth: "400px",
9367
- backgroundColor: "var(--crepe-color-surface)",
9367
+ backgroundColor: state.documentBackground || "var(--crepe-color-background)",
9368
9368
  borderRight: isLeft ? "1px solid var(--crepe-color-outline-variant, color-mix(in srgb, var(--crepe-color-outline), transparent 80%))" : "none",
9369
9369
  borderLeft: !isLeft ? "1px solid var(--crepe-color-outline-variant, color-mix(in srgb, var(--crepe-color-outline), transparent 80%))" : "none",
9370
9370
  boxSizing: "border-box",
@@ -9853,7 +9853,7 @@ const fixedToolbar = (editor, config) => {
9853
9853
  ...prev,
9854
9854
  ...mergedConfig
9855
9855
  }));
9856
- }).use(viewMenuStateCtx).use(fixedToolbarConfig).use(fixedToolbarPlugin);
9856
+ }).use(viewMenuStateCtx).use(fixedToolbarConfig).use(underline).use(highlightMark).use(fixedToolbarPlugin);
9857
9857
  };
9858
9858
 
9859
9859
  const imageBlock = (editor, config) => {