@jvs-milkdown/crepe 1.2.14 → 1.2.16
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/cjs/index.js +26 -26
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/index.js +26 -26
- package/lib/esm/index.js.map +1 -1
- package/lib/theme/common/list-item.css +113 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/feature/fixed-toolbar/index.d.ts.map +1 -1
- package/lib/types/feature/fixed-toolbar/outline-panel.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/feature/fixed-toolbar/index.ts +4 -0
- package/src/feature/fixed-toolbar/outline-panel.tsx +2 -1
- package/src/theme/common/list-item.css +122 -0
package/lib/cjs/index.js
CHANGED
|
@@ -27,10 +27,10 @@ var codemirror = require('codemirror');
|
|
|
27
27
|
var cursor$1 = require('@jvs-milkdown/kit/plugin/cursor');
|
|
28
28
|
var prosemirrorVirtualCursor = require('prosemirror-virtual-cursor');
|
|
29
29
|
var diffBlock = require('@jvs-milkdown/kit/component/diff-block');
|
|
30
|
+
var view$1 = require('@jvs-milkdown/kit/prose/view');
|
|
30
31
|
var tables = require('@jvs-milkdown/kit/prose/tables');
|
|
31
32
|
var clsx = require('clsx');
|
|
32
33
|
var linkTooltip$1 = require('@jvs-milkdown/kit/component/link-tooltip');
|
|
33
|
-
var view$1 = require('@jvs-milkdown/kit/prose/view');
|
|
34
34
|
var imageInline = require('@jvs-milkdown/kit/component/image-inline');
|
|
35
35
|
var state$1 = require('@jvs-milkdown/prose/state');
|
|
36
36
|
var utils$1 = require('@jvs-milkdown/utils');
|
|
@@ -4348,29 +4348,6 @@ const diffBlockFeature = (editor, config = {}) => {
|
|
|
4348
4348
|
}).use(diffBlock.diffBlock);
|
|
4349
4349
|
};
|
|
4350
4350
|
|
|
4351
|
-
const listeners = /* @__PURE__ */ new Set();
|
|
4352
|
-
let _popupCount = 0;
|
|
4353
|
-
function getIsAnyPopupOpen() {
|
|
4354
|
-
return _popupCount > 0;
|
|
4355
|
-
}
|
|
4356
|
-
function addPopupChangeListener(fn) {
|
|
4357
|
-
listeners.add(fn);
|
|
4358
|
-
return () => listeners.delete(fn);
|
|
4359
|
-
}
|
|
4360
|
-
function incrementPopupCount() {
|
|
4361
|
-
const wasZero = _popupCount === 0;
|
|
4362
|
-
_popupCount++;
|
|
4363
|
-
if (wasZero) {
|
|
4364
|
-
listeners.forEach((fn) => fn());
|
|
4365
|
-
}
|
|
4366
|
-
}
|
|
4367
|
-
function decrementPopupCount() {
|
|
4368
|
-
_popupCount = Math.max(0, _popupCount - 1);
|
|
4369
|
-
if (_popupCount === 0) {
|
|
4370
|
-
listeners.forEach((fn) => fn());
|
|
4371
|
-
}
|
|
4372
|
-
}
|
|
4373
|
-
|
|
4374
4351
|
const remarkHighlightMarkPlugin = utils.$remark(
|
|
4375
4352
|
"remarkHighlightMark",
|
|
4376
4353
|
() => function() {
|
|
@@ -4854,6 +4831,29 @@ const underline = [
|
|
|
4854
4831
|
remarkUnderlinePlugin
|
|
4855
4832
|
];
|
|
4856
4833
|
|
|
4834
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
4835
|
+
let _popupCount = 0;
|
|
4836
|
+
function getIsAnyPopupOpen() {
|
|
4837
|
+
return _popupCount > 0;
|
|
4838
|
+
}
|
|
4839
|
+
function addPopupChangeListener(fn) {
|
|
4840
|
+
listeners.add(fn);
|
|
4841
|
+
return () => listeners.delete(fn);
|
|
4842
|
+
}
|
|
4843
|
+
function incrementPopupCount() {
|
|
4844
|
+
const wasZero = _popupCount === 0;
|
|
4845
|
+
_popupCount++;
|
|
4846
|
+
if (wasZero) {
|
|
4847
|
+
listeners.forEach((fn) => fn());
|
|
4848
|
+
}
|
|
4849
|
+
}
|
|
4850
|
+
function decrementPopupCount() {
|
|
4851
|
+
_popupCount = Math.max(0, _popupCount - 1);
|
|
4852
|
+
if (_popupCount === 0) {
|
|
4853
|
+
listeners.forEach((fn) => fn());
|
|
4854
|
+
}
|
|
4855
|
+
}
|
|
4856
|
+
|
|
4857
4857
|
function getGroups(config, ctx) {
|
|
4858
4858
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
4859
4859
|
const groupBuilder = new GroupBuilder();
|
|
@@ -9385,7 +9385,7 @@ const OutlinePanel = vue.defineComponent({
|
|
|
9385
9385
|
width: `${state.outlineWidth}px`,
|
|
9386
9386
|
minWidth: "200px",
|
|
9387
9387
|
maxWidth: "400px",
|
|
9388
|
-
backgroundColor: "var(--crepe-color-
|
|
9388
|
+
backgroundColor: state.documentBackground || "var(--crepe-color-background)",
|
|
9389
9389
|
borderRight: isLeft ? "1px solid var(--crepe-color-outline-variant, color-mix(in srgb, var(--crepe-color-outline), transparent 80%))" : "none",
|
|
9390
9390
|
borderLeft: !isLeft ? "1px solid var(--crepe-color-outline-variant, color-mix(in srgb, var(--crepe-color-outline), transparent 80%))" : "none",
|
|
9391
9391
|
boxSizing: "border-box",
|
|
@@ -9874,7 +9874,7 @@ const fixedToolbar = (editor, config) => {
|
|
|
9874
9874
|
...prev,
|
|
9875
9875
|
...mergedConfig
|
|
9876
9876
|
}));
|
|
9877
|
-
}).use(viewMenuStateCtx).use(fixedToolbarConfig).use(fixedToolbarPlugin);
|
|
9877
|
+
}).use(viewMenuStateCtx).use(fixedToolbarConfig).use(underline).use(highlightMark).use(fixedToolbarPlugin);
|
|
9878
9878
|
};
|
|
9879
9879
|
|
|
9880
9880
|
const imageBlock = (editor, config) => {
|