prosekit 0.0.0-next-20230627094841
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/LICENSE +21 -0
- package/README.md +13 -0
- package/dist/basic/style.css +133 -0
- package/dist/chunk-23S3SZFA.js +46 -0
- package/dist/chunk-2MVHS73Q.js +709 -0
- package/dist/chunk-4GDRVRDP.js +0 -0
- package/dist/chunk-5PFF57NB.js +1546 -0
- package/dist/chunk-6A2XHVFY.js +46 -0
- package/dist/chunk-7OYIOTDD.js +16472 -0
- package/dist/chunk-ARJTWYPA.js +1321 -0
- package/dist/chunk-CDGN4JUS.js +1546 -0
- package/dist/chunk-CG5B6PMC.js +973 -0
- package/dist/chunk-DDN3TFRH.js +185 -0
- package/dist/chunk-EQV3CWHZ.js +2213 -0
- package/dist/chunk-ERNIDFFW.js +1711 -0
- package/dist/chunk-FAVXZAF7.js +3279 -0
- package/dist/chunk-HSPTUO6P.js +53 -0
- package/dist/chunk-JMNJUDT7.js +165 -0
- package/dist/chunk-LXCCO2LO.js +52 -0
- package/dist/chunk-MIPON3OH.js +922 -0
- package/dist/chunk-NAWSCY5F.js +166 -0
- package/dist/chunk-S64NFSV2.js +236 -0
- package/dist/chunk-S65R2BUY.js +15 -0
- package/dist/chunk-T2V5UU6H.js +204 -0
- package/dist/chunk-TWIMWRRZ.js +57 -0
- package/dist/chunk-US2P3K6I.js +185 -0
- package/dist/chunk-UTNVEPBA.js +950 -0
- package/dist/chunk-UWHQRU5N.js +4883 -0
- package/dist/chunk-VIKPJJET.js +662 -0
- package/dist/chunk-WAMZOD5I.js +67 -0
- package/dist/chunk-YUY5I2TY.js +236 -0
- package/dist/core/style.css +54 -0
- package/dist/extension-list/style.css +78 -0
- package/dist/pm/view/style/prosemirror.css +52 -0
- package/dist/prosekit-basic.js +2 -0
- package/dist/prosekit-core.js +2 -0
- package/dist/prosekit-extension-blockquote.js +2 -0
- package/dist/prosekit-extension-bold.js +2 -0
- package/dist/prosekit-extension-code-block.js +2 -0
- package/dist/prosekit-extension-code.js +2 -0
- package/dist/prosekit-extension-heading.js +2 -0
- package/dist/prosekit-extension-horizontal-rule.js +2 -0
- package/dist/prosekit-extension-italic.js +2 -0
- package/dist/prosekit-extension-list.js +2 -0
- package/dist/prosekit-extension-suggestion.js +2 -0
- package/dist/prosekit-lit-elements-menu-item.js +2 -0
- package/dist/prosekit-lit-elements-menu.js +2 -0
- package/dist/prosekit-lit-elements-popover.js +2 -0
- package/dist/prosekit-lit.js +2 -0
- package/dist/prosekit-pm-commands.js +2 -0
- package/dist/prosekit-pm-inputrules.js +2 -0
- package/dist/prosekit-pm-keymap.js +2 -0
- package/dist/prosekit-pm-model.js +2 -0
- package/dist/prosekit-pm-state.js +2 -0
- package/dist/prosekit-pm-transform.js +2 -0
- package/dist/prosekit-pm-view.js +2 -0
- package/dist/prosekit-pm.js +2 -0
- package/dist/prosekit-react-components-menu-item.js +2 -0
- package/dist/prosekit-react-components-menu.js +2 -0
- package/dist/prosekit-react-components-popover-suggestion.js +2 -0
- package/dist/prosekit-react-components-popover.js +2 -0
- package/dist/prosekit-react.js +2 -0
- package/dist/prosekit-vue-components-menu-item.js +2 -0
- package/dist/prosekit-vue-components-menu.js +2 -0
- package/dist/prosekit-vue-components-popover-suggestion.js +2 -0
- package/dist/prosekit-vue-components-popover.js +2 -0
- package/dist/prosekit-vue.js +2 -0
- package/dist/prosekit.js +0 -0
- package/package.json +262 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// ../../node_modules/.pnpm/@lit-labs+react@1.2.0/node_modules/@lit-labs/react/node/create-component.js
|
|
2
|
+
var t = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "className"]);
|
|
3
|
+
var e = /* @__PURE__ */ new WeakMap();
|
|
4
|
+
var n = (t2, n2, i2, s2, o) => {
|
|
5
|
+
const l = null == o ? void 0 : o[n2];
|
|
6
|
+
void 0 === l || i2 === s2 ? null == i2 && n2 in HTMLElement.prototype ? t2.removeAttribute(n2) : t2[n2] = i2 : ((t3, n3, i3) => {
|
|
7
|
+
let s3 = e.get(t3);
|
|
8
|
+
void 0 === s3 && e.set(t3, s3 = /* @__PURE__ */ new Map());
|
|
9
|
+
let o2 = s3.get(n3);
|
|
10
|
+
void 0 !== i3 ? void 0 === o2 ? (s3.set(n3, o2 = { handleEvent: i3 }), t3.addEventListener(n3, o2)) : o2.handleEvent = i3 : void 0 !== o2 && (s3.delete(n3), t3.removeEventListener(n3, o2));
|
|
11
|
+
})(t2, l, i2);
|
|
12
|
+
};
|
|
13
|
+
var i = (t2, e2) => {
|
|
14
|
+
"function" == typeof t2 ? t2(e2) : t2.current = e2;
|
|
15
|
+
};
|
|
16
|
+
function s(e2 = window.React, s2, o, l, d) {
|
|
17
|
+
let a, c, r;
|
|
18
|
+
if (void 0 === s2) {
|
|
19
|
+
const t2 = e2;
|
|
20
|
+
({ tagName: c, elementClass: r, events: l, displayName: d } = t2), a = t2.react;
|
|
21
|
+
} else
|
|
22
|
+
a = e2, r = o, c = s2;
|
|
23
|
+
const h = a.Component, u = a.createElement, f = new Set(Object.keys(null != l ? l : {}));
|
|
24
|
+
class v extends h {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments), this.o = null;
|
|
27
|
+
}
|
|
28
|
+
t(t2) {
|
|
29
|
+
if (null !== this.o)
|
|
30
|
+
for (const e3 in this.i)
|
|
31
|
+
n(this.o, e3, this.props[e3], t2 ? t2[e3] : void 0, l);
|
|
32
|
+
}
|
|
33
|
+
componentDidMount() {
|
|
34
|
+
var t2;
|
|
35
|
+
this.t(), null === (t2 = this.o) || void 0 === t2 || t2.removeAttribute("defer-hydration");
|
|
36
|
+
}
|
|
37
|
+
componentDidUpdate(t2) {
|
|
38
|
+
this.t(t2);
|
|
39
|
+
}
|
|
40
|
+
render() {
|
|
41
|
+
const { _$Gl: e3, ...n2 } = this.props;
|
|
42
|
+
this.h !== e3 && (this.u = (t2) => {
|
|
43
|
+
null !== e3 && i(e3, t2), this.o = t2, this.h = e3;
|
|
44
|
+
}), this.i = {};
|
|
45
|
+
const s3 = { ref: this.u };
|
|
46
|
+
for (const [e4, i2] of Object.entries(n2))
|
|
47
|
+
t.has(e4) ? s3["className" === e4 ? "class" : e4] = i2 : f.has(e4) || e4 in r.prototype ? this.i[e4] = i2 : s3[e4] = i2;
|
|
48
|
+
return "litPatchedCreateElement" === u.name && Object.keys(this.i).length ? (s3._$litProps$ = this.i, u(c, s3)) : (s3.suppressHydrationWarning = true, u(c, s3));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
v.displayName = null != d ? d : r.name;
|
|
52
|
+
const m = a.forwardRef((t2, e3) => u(v, { ...t2, _$Gl: e3 }, null == t2 ? void 0 : t2.children));
|
|
53
|
+
return m.displayName = v.displayName, m;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export {
|
|
57
|
+
s
|
|
58
|
+
};
|
|
59
|
+
/*! Bundled license information:
|
|
60
|
+
|
|
61
|
+
@lit-labs/react/node/create-component.js:
|
|
62
|
+
(**
|
|
63
|
+
* @license
|
|
64
|
+
* Copyright 2018 Google LLC
|
|
65
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
66
|
+
*)
|
|
67
|
+
*/
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import {
|
|
2
|
+
flip,
|
|
3
|
+
inline,
|
|
4
|
+
offset,
|
|
5
|
+
shift,
|
|
6
|
+
size
|
|
7
|
+
} from "./chunk-5PFF57NB.js";
|
|
8
|
+
import {
|
|
9
|
+
b,
|
|
10
|
+
blockComponentStyles,
|
|
11
|
+
e,
|
|
12
|
+
n,
|
|
13
|
+
r,
|
|
14
|
+
s,
|
|
15
|
+
t
|
|
16
|
+
} from "./chunk-CG5B6PMC.js";
|
|
17
|
+
import {
|
|
18
|
+
addSuggestion
|
|
19
|
+
} from "./chunk-NAWSCY5F.js";
|
|
20
|
+
import {
|
|
21
|
+
ProseKitError
|
|
22
|
+
} from "./chunk-2MVHS73Q.js";
|
|
23
|
+
import {
|
|
24
|
+
__decorateClass
|
|
25
|
+
} from "./chunk-HSPTUO6P.js";
|
|
26
|
+
|
|
27
|
+
// ../lit/src/utils/is-menu.ts
|
|
28
|
+
function isMenu(element) {
|
|
29
|
+
var _a, _b;
|
|
30
|
+
return ((_a = element == null ? void 0 : element.tagName) == null ? void 0 : _a.toLowerCase()) === "prosekit-menu" || ["menu"].includes((_b = element == null ? void 0 : element.getAttribute("role")) != null ? _b : "");
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// ../lit/src/elements/popover-suggestion/controller.ts
|
|
34
|
+
var PopoverSuggestionController = class {
|
|
35
|
+
constructor(host, editor, rules, onContext) {
|
|
36
|
+
this.host = host;
|
|
37
|
+
this.editor = editor;
|
|
38
|
+
this.rules = rules;
|
|
39
|
+
this.onContext = onContext;
|
|
40
|
+
this.connected = false;
|
|
41
|
+
this.reference = null;
|
|
42
|
+
this.removeExtension = null;
|
|
43
|
+
if (!editor) {
|
|
44
|
+
throw new ProseKitError("Missing 'editor' property");
|
|
45
|
+
}
|
|
46
|
+
if (!rules) {
|
|
47
|
+
throw new ProseKitError("Missing 'rules' property");
|
|
48
|
+
}
|
|
49
|
+
this.host.addController(this);
|
|
50
|
+
}
|
|
51
|
+
hostUpdated() {
|
|
52
|
+
var _a;
|
|
53
|
+
if (this.connected)
|
|
54
|
+
return;
|
|
55
|
+
this.connected = true;
|
|
56
|
+
const editor = this.editor;
|
|
57
|
+
if (!editor) {
|
|
58
|
+
throw new ProseKitError("Missing 'editor' property");
|
|
59
|
+
}
|
|
60
|
+
if (!this.rules) {
|
|
61
|
+
throw new ProseKitError("Missing 'rules' property");
|
|
62
|
+
}
|
|
63
|
+
const extension = addSuggestion({
|
|
64
|
+
rules: this.rules,
|
|
65
|
+
onMatch: ({ dismiss, deleteMatch, match, matchAfter }) => {
|
|
66
|
+
var _a2, _b;
|
|
67
|
+
const span = editor.view.dom.querySelector(
|
|
68
|
+
".prosemirror-prediction-match"
|
|
69
|
+
);
|
|
70
|
+
if (span) {
|
|
71
|
+
this.reference = span;
|
|
72
|
+
}
|
|
73
|
+
const matchText = match[0] + ((_a2 = matchAfter == null ? void 0 : matchAfter[0]) != null ? _a2 : "");
|
|
74
|
+
(_b = this.onContext) == null ? void 0 : _b.call(this, {
|
|
75
|
+
active: true,
|
|
76
|
+
query: matchText,
|
|
77
|
+
onDismiss: () => {
|
|
78
|
+
dismiss();
|
|
79
|
+
},
|
|
80
|
+
onSubmit: () => {
|
|
81
|
+
deleteMatch();
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
onDeactivate: () => {
|
|
86
|
+
this.reference = null;
|
|
87
|
+
setTimeout(() => {
|
|
88
|
+
var _a2;
|
|
89
|
+
(_a2 = this.onContext) == null ? void 0 : _a2.call(this, {
|
|
90
|
+
active: false
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
(_a = this.removeExtension) == null ? void 0 : _a.call(this);
|
|
96
|
+
this.removeExtension = editor.use(extension);
|
|
97
|
+
}
|
|
98
|
+
hostDisconnected() {
|
|
99
|
+
var _a;
|
|
100
|
+
this.connected = false;
|
|
101
|
+
(_a = this.removeExtension) == null ? void 0 : _a.call(this);
|
|
102
|
+
this.removeExtension = null;
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
// ../lit/src/elements/popover-suggestion/options.ts
|
|
107
|
+
var defaultDetectOverflowOptions = {
|
|
108
|
+
// Make sure the popover is always at least 8px away from the boundary
|
|
109
|
+
padding: 8
|
|
110
|
+
};
|
|
111
|
+
var defaultPopoverOptions = {
|
|
112
|
+
placement: "bottom-end",
|
|
113
|
+
middleware: [
|
|
114
|
+
offset(({ rects }) => ({
|
|
115
|
+
// Put the popover at the bottom right corner
|
|
116
|
+
alignmentAxis: -rects.floating.width,
|
|
117
|
+
// Move down the popover by 4px
|
|
118
|
+
mainAxis: 4
|
|
119
|
+
})),
|
|
120
|
+
size({
|
|
121
|
+
apply: ({ availableHeight, elements }) => {
|
|
122
|
+
const style = {
|
|
123
|
+
// Minimum acceptable height is 100px.
|
|
124
|
+
// `flip` will then take over.
|
|
125
|
+
maxHeight: `${Math.max(100, availableHeight)}px`,
|
|
126
|
+
overflowY: "auto"
|
|
127
|
+
};
|
|
128
|
+
Object.assign(elements.floating.style, style);
|
|
129
|
+
},
|
|
130
|
+
...defaultDetectOverflowOptions
|
|
131
|
+
}),
|
|
132
|
+
// Flip the popover to the top if it's overflowing the viewport
|
|
133
|
+
flip({
|
|
134
|
+
fallbackStrategy: "initialPlacement",
|
|
135
|
+
fallbackAxisSideDirection: "start",
|
|
136
|
+
crossAxis: false,
|
|
137
|
+
...defaultDetectOverflowOptions
|
|
138
|
+
}),
|
|
139
|
+
shift({
|
|
140
|
+
...defaultDetectOverflowOptions
|
|
141
|
+
}),
|
|
142
|
+
// Use the text caret as the reference point
|
|
143
|
+
inline()
|
|
144
|
+
]
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
// ../lit/src/elements/popover-suggestion/popover-suggestion.ts
|
|
148
|
+
var PopoverSuggestion = class extends s {
|
|
149
|
+
/** @hidden */
|
|
150
|
+
constructor() {
|
|
151
|
+
super();
|
|
152
|
+
this.popoverOptions = defaultPopoverOptions;
|
|
153
|
+
this.context = { active: false };
|
|
154
|
+
}
|
|
155
|
+
/** @hidden */
|
|
156
|
+
firstUpdated() {
|
|
157
|
+
setTimeout(() => {
|
|
158
|
+
this.controller = new PopoverSuggestionController(
|
|
159
|
+
this,
|
|
160
|
+
this.editor,
|
|
161
|
+
this.rules,
|
|
162
|
+
(context) => {
|
|
163
|
+
var _a;
|
|
164
|
+
(_a = this.onContext) == null ? void 0 : _a.call(this, context);
|
|
165
|
+
this.context = context;
|
|
166
|
+
requestAnimationFrame(() => {
|
|
167
|
+
var _a2, _b;
|
|
168
|
+
(_b = (_a2 = this.queryMenu()) == null ? void 0 : _a2.ensureFocusedItem) == null ? void 0 : _b.call(_a2);
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
/** @hidden */
|
|
175
|
+
get active() {
|
|
176
|
+
var _a;
|
|
177
|
+
return !!((_a = this.controller) == null ? void 0 : _a.reference);
|
|
178
|
+
}
|
|
179
|
+
/** @hidden */
|
|
180
|
+
queryMenu() {
|
|
181
|
+
var _a, _b, _c;
|
|
182
|
+
return (_c = (_b = (_a = this.defaultSlot) == null ? void 0 : _a.assignedElements({ flatten: true })) == null ? void 0 : _b.find(isMenu)) != null ? _c : null;
|
|
183
|
+
}
|
|
184
|
+
/** @hidden */
|
|
185
|
+
render() {
|
|
186
|
+
var _a, _b;
|
|
187
|
+
return b`
|
|
188
|
+
<prosekit-popover
|
|
189
|
+
.active=${this.active}
|
|
190
|
+
.reference=${(_b = (_a = this.controller) == null ? void 0 : _a.reference) != null ? _b : void 0}
|
|
191
|
+
.options=${this.popoverOptions}
|
|
192
|
+
>
|
|
193
|
+
<slot
|
|
194
|
+
@menu-dismiss=${() => {
|
|
195
|
+
var _a2, _b2;
|
|
196
|
+
return (_b2 = (_a2 = this.context) == null ? void 0 : _a2.onDismiss) == null ? void 0 : _b2.call(_a2);
|
|
197
|
+
}}
|
|
198
|
+
@menu-select=${() => {
|
|
199
|
+
var _a2, _b2;
|
|
200
|
+
return (_b2 = (_a2 = this.context) == null ? void 0 : _a2.onSubmit) == null ? void 0 : _b2.call(_a2);
|
|
201
|
+
}}
|
|
202
|
+
></slot>
|
|
203
|
+
</prosekit-popover>
|
|
204
|
+
`;
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
/** @hidden */
|
|
208
|
+
PopoverSuggestion.styles = blockComponentStyles;
|
|
209
|
+
__decorateClass([
|
|
210
|
+
n({ attribute: false })
|
|
211
|
+
], PopoverSuggestion.prototype, "editor", 2);
|
|
212
|
+
__decorateClass([
|
|
213
|
+
n({ attribute: false })
|
|
214
|
+
], PopoverSuggestion.prototype, "popoverOptions", 2);
|
|
215
|
+
__decorateClass([
|
|
216
|
+
n({ attribute: false })
|
|
217
|
+
], PopoverSuggestion.prototype, "rules", 2);
|
|
218
|
+
__decorateClass([
|
|
219
|
+
t()
|
|
220
|
+
], PopoverSuggestion.prototype, "context", 2);
|
|
221
|
+
__decorateClass([
|
|
222
|
+
n({ attribute: false })
|
|
223
|
+
], PopoverSuggestion.prototype, "onContext", 2);
|
|
224
|
+
__decorateClass([
|
|
225
|
+
t()
|
|
226
|
+
], PopoverSuggestion.prototype, "controller", 2);
|
|
227
|
+
__decorateClass([
|
|
228
|
+
r("slot")
|
|
229
|
+
], PopoverSuggestion.prototype, "defaultSlot", 2);
|
|
230
|
+
PopoverSuggestion = __decorateClass([
|
|
231
|
+
e("prosekit-popover-suggestion")
|
|
232
|
+
], PopoverSuggestion);
|
|
233
|
+
|
|
234
|
+
export {
|
|
235
|
+
PopoverSuggestion
|
|
236
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/* ../../node_modules/.pnpm/prosemirror-view@1.31.5/node_modules/prosemirror-view/style/prosemirror.css */
|
|
2
|
+
.ProseMirror {
|
|
3
|
+
position: relative;
|
|
4
|
+
}
|
|
5
|
+
.ProseMirror {
|
|
6
|
+
word-wrap: break-word;
|
|
7
|
+
white-space: pre-wrap;
|
|
8
|
+
white-space: break-spaces;
|
|
9
|
+
-webkit-font-variant-ligatures: none;
|
|
10
|
+
font-variant-ligatures: none;
|
|
11
|
+
font-feature-settings: "liga" 0;
|
|
12
|
+
}
|
|
13
|
+
.ProseMirror pre {
|
|
14
|
+
white-space: pre-wrap;
|
|
15
|
+
}
|
|
16
|
+
.ProseMirror li {
|
|
17
|
+
position: relative;
|
|
18
|
+
}
|
|
19
|
+
.ProseMirror-hideselection *::selection {
|
|
20
|
+
background: transparent;
|
|
21
|
+
}
|
|
22
|
+
.ProseMirror-hideselection *::-moz-selection {
|
|
23
|
+
background: transparent;
|
|
24
|
+
}
|
|
25
|
+
.ProseMirror-hideselection {
|
|
26
|
+
caret-color: transparent;
|
|
27
|
+
}
|
|
28
|
+
.ProseMirror-selectednode {
|
|
29
|
+
outline: 2px solid #8cf;
|
|
30
|
+
}
|
|
31
|
+
li.ProseMirror-selectednode {
|
|
32
|
+
outline: none;
|
|
33
|
+
}
|
|
34
|
+
li.ProseMirror-selectednode:after {
|
|
35
|
+
content: "";
|
|
36
|
+
position: absolute;
|
|
37
|
+
left: -32px;
|
|
38
|
+
right: -2px;
|
|
39
|
+
top: -2px;
|
|
40
|
+
bottom: -2px;
|
|
41
|
+
border: 2px solid #8cf;
|
|
42
|
+
pointer-events: none;
|
|
43
|
+
}
|
|
44
|
+
img.ProseMirror-separator {
|
|
45
|
+
display: inline !important;
|
|
46
|
+
border: none !important;
|
|
47
|
+
margin: 0 !important;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* ../pm/src/view/style/prosemirror.css */
|
|
51
|
+
|
|
52
|
+
/* ../core/src/style.css */
|
|
53
|
+
|
|
54
|
+
/* src/core/style.css */
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/* ../../node_modules/.pnpm/prosemirror-flat-list@0.3.13/node_modules/prosemirror-flat-list/dist/style.css */
|
|
2
|
+
.prosemirror-flat-list {
|
|
3
|
+
padding: 0;
|
|
4
|
+
margin-top: 0;
|
|
5
|
+
margin-bottom: 0;
|
|
6
|
+
margin-left: 32px;
|
|
7
|
+
margin-bottom: 0;
|
|
8
|
+
position: relative;
|
|
9
|
+
display: list-item;
|
|
10
|
+
list-style: none;
|
|
11
|
+
}
|
|
12
|
+
.prosemirror-flat-list.ProseMirror-selectednode {
|
|
13
|
+
outline: none;
|
|
14
|
+
}
|
|
15
|
+
.prosemirror-flat-list.ProseMirror-selectednode:after {
|
|
16
|
+
content: "";
|
|
17
|
+
position: absolute;
|
|
18
|
+
left: -32px;
|
|
19
|
+
right: -2px;
|
|
20
|
+
top: -2px;
|
|
21
|
+
bottom: -2px;
|
|
22
|
+
border: 2px solid #8cf;
|
|
23
|
+
pointer-events: none;
|
|
24
|
+
}
|
|
25
|
+
.prosemirror-flat-list[data-list-kind=bullet] {
|
|
26
|
+
list-style: disc;
|
|
27
|
+
}
|
|
28
|
+
.prosemirror-flat-list[data-list-kind=ordered] {
|
|
29
|
+
counter-reset: prosemirror-flat-list-counter;
|
|
30
|
+
counter-increment: prosemirror-flat-list-counter;
|
|
31
|
+
}
|
|
32
|
+
.prosemirror-flat-list[data-list-kind=ordered] + .prosemirror-flat-list[data-list-kind=ordered] {
|
|
33
|
+
counter-reset: none;
|
|
34
|
+
}
|
|
35
|
+
.prosemirror-flat-list[data-list-kind=ordered]::before {
|
|
36
|
+
position: absolute;
|
|
37
|
+
right: 100%;
|
|
38
|
+
font-variant-numeric: tabular-nums;
|
|
39
|
+
content: counter(prosemirror-flat-list-counter, decimal) ". ";
|
|
40
|
+
}
|
|
41
|
+
.prosemirror-flat-list[data-list-kind=task] > .list-marker {
|
|
42
|
+
position: absolute;
|
|
43
|
+
right: 100%;
|
|
44
|
+
text-align: center;
|
|
45
|
+
width: 1.5em;
|
|
46
|
+
width: 1lh;
|
|
47
|
+
}
|
|
48
|
+
.prosemirror-flat-list[data-list-kind=task] > .list-marker,
|
|
49
|
+
.prosemirror-flat-list[data-list-kind=task] > .list-marker * {
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
}
|
|
52
|
+
.prosemirror-flat-list[data-list-kind=toggle] > .list-marker {
|
|
53
|
+
position: absolute;
|
|
54
|
+
right: 100%;
|
|
55
|
+
text-align: center;
|
|
56
|
+
width: 1.5em;
|
|
57
|
+
width: 1lh;
|
|
58
|
+
}
|
|
59
|
+
.prosemirror-flat-list[data-list-kind=toggle] > .list-marker::before {
|
|
60
|
+
content: "\23f7";
|
|
61
|
+
}
|
|
62
|
+
.prosemirror-flat-list[data-list-kind=toggle][data-list-collapsable][data-list-collapsed] > .list-marker::before {
|
|
63
|
+
content: "\23f5";
|
|
64
|
+
}
|
|
65
|
+
.prosemirror-flat-list[data-list-kind=toggle][data-list-collapsable] > .list-marker {
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
}
|
|
68
|
+
.prosemirror-flat-list[data-list-kind=toggle]:not([data-list-collapsable]) > .list-marker {
|
|
69
|
+
opacity: 40%;
|
|
70
|
+
pointer-events: none;
|
|
71
|
+
}
|
|
72
|
+
.prosemirror-flat-list[data-list-kind=toggle][data-list-collapsable][data-list-collapsed] > .list-content > *:nth-child(n + 2) {
|
|
73
|
+
display: none;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* ../extension-list/src/style.css */
|
|
77
|
+
|
|
78
|
+
/* src/extension-list/style.css */
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/* ../../node_modules/.pnpm/prosemirror-view@1.31.5/node_modules/prosemirror-view/style/prosemirror.css */
|
|
2
|
+
.ProseMirror {
|
|
3
|
+
position: relative;
|
|
4
|
+
}
|
|
5
|
+
.ProseMirror {
|
|
6
|
+
word-wrap: break-word;
|
|
7
|
+
white-space: pre-wrap;
|
|
8
|
+
white-space: break-spaces;
|
|
9
|
+
-webkit-font-variant-ligatures: none;
|
|
10
|
+
font-variant-ligatures: none;
|
|
11
|
+
font-feature-settings: "liga" 0;
|
|
12
|
+
}
|
|
13
|
+
.ProseMirror pre {
|
|
14
|
+
white-space: pre-wrap;
|
|
15
|
+
}
|
|
16
|
+
.ProseMirror li {
|
|
17
|
+
position: relative;
|
|
18
|
+
}
|
|
19
|
+
.ProseMirror-hideselection *::selection {
|
|
20
|
+
background: transparent;
|
|
21
|
+
}
|
|
22
|
+
.ProseMirror-hideselection *::-moz-selection {
|
|
23
|
+
background: transparent;
|
|
24
|
+
}
|
|
25
|
+
.ProseMirror-hideselection {
|
|
26
|
+
caret-color: transparent;
|
|
27
|
+
}
|
|
28
|
+
.ProseMirror-selectednode {
|
|
29
|
+
outline: 2px solid #8cf;
|
|
30
|
+
}
|
|
31
|
+
li.ProseMirror-selectednode {
|
|
32
|
+
outline: none;
|
|
33
|
+
}
|
|
34
|
+
li.ProseMirror-selectednode:after {
|
|
35
|
+
content: "";
|
|
36
|
+
position: absolute;
|
|
37
|
+
left: -32px;
|
|
38
|
+
right: -2px;
|
|
39
|
+
top: -2px;
|
|
40
|
+
bottom: -2px;
|
|
41
|
+
border: 2px solid #8cf;
|
|
42
|
+
pointer-events: none;
|
|
43
|
+
}
|
|
44
|
+
img.ProseMirror-separator {
|
|
45
|
+
display: inline !important;
|
|
46
|
+
border: none !important;
|
|
47
|
+
margin: 0 !important;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* ../pm/src/view/style/prosemirror.css */
|
|
51
|
+
|
|
52
|
+
/* src/pm/view/style/prosemirror.css */
|
package/dist/prosekit.js
ADDED
|
File without changes
|