@jvs-milkdown/prose 1.2.9 → 1.2.11

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,2 +1,2 @@
1
1
  export * from 'prosemirror-changeset';
2
- //# sourceMappingURL=changeset.d.ts.map
2
+ //# sourceMappingURL=changeset.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"changeset.d.ts","sources":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"changeset.d.ts","sourceRoot":"","sources":["../src/changeset.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
package/lib/commands.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export * from 'prosemirror-commands';
2
- //# sourceMappingURL=commands.d.ts.map
2
+ //# sourceMappingURL=commands.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"commands.d.ts","sources":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA"}
@@ -1,2 +1,2 @@
1
1
  export * from 'prosemirror-dropcursor';
2
- //# sourceMappingURL=dropcursor.d.ts.map
2
+ //# sourceMappingURL=dropcursor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropcursor.d.ts","sources":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"dropcursor.d.ts","sourceRoot":"","sources":["../src/dropcursor.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA"}
@@ -1,2 +1,2 @@
1
1
  export * from 'prosemirror-gapcursor';
2
- //# sourceMappingURL=gapcursor.d.ts.map
2
+ //# sourceMappingURL=gapcursor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gapcursor.d.ts","sources":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"gapcursor.d.ts","sourceRoot":"","sources":["../src/gapcursor.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
package/lib/history.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export * from 'prosemirror-history';
2
- //# sourceMappingURL=history.d.ts.map
2
+ //# sourceMappingURL=history.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"history.d.ts","sources":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../src/history.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA"}
package/lib/index.d.ts CHANGED
@@ -1,132 +1,2 @@
1
- import { InputRule } from 'prosemirror-inputrules';
2
- import { Plugin, PluginKey, Transaction, EditorState, Selection } from 'prosemirror-state';
3
- import { Attrs, MarkType, NodeType, Node, Slice, ResolvedPos, Schema } from 'prosemirror-model';
4
- import { EditorView } from 'prosemirror-view';
5
-
6
- /**
7
- * Copy paste from:
8
- * https://github.com/ProseMirror/prosemirror-view/blob/master/src/browser.ts
9
- */
10
- declare const ie: boolean;
11
- declare const ie_version: unknown;
12
- declare const gecko: boolean;
13
- declare const gecko_version: number | false;
14
- declare const chrome: boolean;
15
- declare const chrome_version: number;
16
- declare const safari: boolean;
17
- declare const ios: boolean;
18
- declare const mac: boolean;
19
- declare const android: boolean;
20
- declare const webkit: boolean;
21
- declare const webkit_version: number;
22
-
23
- declare const browser_android: typeof android;
24
- declare const browser_chrome: typeof chrome;
25
- declare const browser_chrome_version: typeof chrome_version;
26
- declare const browser_gecko: typeof gecko;
27
- declare const browser_gecko_version: typeof gecko_version;
28
- declare const browser_ie: typeof ie;
29
- declare const browser_ie_version: typeof ie_version;
30
- declare const browser_ios: typeof ios;
31
- declare const browser_mac: typeof mac;
32
- declare const browser_safari: typeof safari;
33
- declare const browser_webkit: typeof webkit;
34
- declare const browser_webkit_version: typeof webkit_version;
35
- declare namespace browser {
36
- export {
37
- browser_android as android,
38
- browser_chrome as chrome,
39
- browser_chrome_version as chrome_version,
40
- browser_gecko as gecko,
41
- browser_gecko_version as gecko_version,
42
- browser_ie as ie,
43
- browser_ie_version as ie_version,
44
- browser_ios as ios,
45
- browser_mac as mac,
46
- browser_safari as safari,
47
- browser_webkit as webkit,
48
- browser_webkit_version as webkit_version,
49
- };
50
- }
51
-
52
- declare const customInputRulesKey: PluginKey<any>;
53
- declare function customInputRules({ rules }: {
54
- rules: InputRule[];
55
- }): Plugin;
56
-
57
- interface Captured {
58
- group: string | undefined;
59
- fullMatch: string;
60
- start: number;
61
- end: number;
62
- }
63
- interface BeforeDispatch {
64
- match: string[];
65
- start: number;
66
- end: number;
67
- tr: Transaction;
68
- }
69
- interface Options {
70
- getAttr?: (match: RegExpMatchArray) => Attrs;
71
- updateCaptured?: (captured: Captured) => Partial<Captured>;
72
- beforeDispatch?: (options: BeforeDispatch) => void;
73
- }
74
-
75
- declare function markRule(regexp: RegExp, markType: MarkType, options?: Options): InputRule;
76
-
77
- declare function nodeRule(regexp: RegExp, nodeType: NodeType, options?: Options): InputRule;
78
-
79
- type Point = [top: number, left: number];
80
- declare function calculateNodePosition(view: EditorView, target: HTMLElement, handler: (selectedRect: DOMRect, targetRect: DOMRect, parentRect: DOMRect) => Point): void;
81
- interface Rect {
82
- left: number;
83
- right: number;
84
- top: number;
85
- bottom: number;
86
- }
87
- declare function calculateTextPosition(view: EditorView, target: HTMLElement, handler: (start: Rect, end: Rect, targetRect: DOMRect, parentRect: DOMRect) => Point): void;
88
- declare function posToDOMRect(view: EditorView, from: number, to: number): DOMRect;
89
-
90
- declare function cloneTr(tr: Transaction): Transaction;
91
- declare function equalNodeType(nodeType: NodeType | NodeType[], node: Node): boolean;
92
- declare function isTextOnlySlice(slice: Slice): Node | false;
93
-
94
- type Predicate = (node: Node) => boolean;
95
-
96
- interface NodeWithPos {
97
- pos: number;
98
- node: Node;
99
- }
100
- interface NodeWithFromTo {
101
- from: number;
102
- to: number;
103
- node: Node;
104
- }
105
- declare function flatten(node: Node, descend?: boolean): NodeWithPos[];
106
- declare function findChildren(predicate: Predicate): (node: Node, descend?: boolean) => NodeWithPos[];
107
- declare function findChildrenByMark(node: Node, markType: MarkType, descend?: boolean): NodeWithPos[];
108
- declare function findParent(predicate: Predicate): ($pos: ResolvedPos) => NodeWithFromTo | undefined;
109
- declare function findParentNodeType($pos: ResolvedPos, nodeType: NodeType): NodeWithFromTo | undefined;
110
-
111
- declare function getNodeFromSchema(type: string, schema: Schema): NodeType;
112
- declare function getMarkFromSchema(type: string, schema: Schema): MarkType;
113
-
114
- interface ContentNodeWithPos {
115
- pos: number;
116
- start: number;
117
- depth: number;
118
- node: Node;
119
- }
120
- declare function findParentNodeClosestToPos(predicate: Predicate): ($pos: ResolvedPos) => ContentNodeWithPos | undefined;
121
- declare function findParentNode(predicate: Predicate): (selection: Selection) => ContentNodeWithPos | undefined;
122
- declare function findSelectedNodeOfType(selection: Selection, nodeType: NodeType): ContentNodeWithPos | undefined;
123
- type FindNodeInSelectionResult = {
124
- hasNode: boolean;
125
- pos: number;
126
- target: Node | null;
127
- };
128
- declare const findNodeInSelection: (state: EditorState, node: NodeType) => FindNodeInSelectionResult;
129
-
130
- export { browser, calculateNodePosition, calculateTextPosition, cloneTr, customInputRules, customInputRulesKey, equalNodeType, findChildren, findChildrenByMark, findNodeInSelection, findParent, findParentNode, findParentNodeClosestToPos, findParentNodeType, findSelectedNodeOfType, flatten, getMarkFromSchema, getNodeFromSchema, isTextOnlySlice, markRule, nodeRule, posToDOMRect };
131
- export type { BeforeDispatch, Captured, ContentNodeWithPos, FindNodeInSelectionResult, NodeWithFromTo, NodeWithPos, Options };
132
- //# sourceMappingURL=index.d.ts.map
1
+ export * from './toolkit';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sources":["../src/toolkit/browser.ts","../src/toolkit/input-rules/custom-input-rules.ts","../src/toolkit/input-rules/common.ts","../src/toolkit/input-rules/mark-rule.ts","../src/toolkit/input-rules/node-rule.ts","../src/toolkit/position/index.ts","../src/toolkit/prose/helper.ts","../src/toolkit/prose/types.ts","../src/toolkit/prose/node.ts","../src/toolkit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AGA,IAAS;;ACHzD,KAAK,SAAS,UAAU,IAAI;;ACC5B,UAAU,WAAW;AACrB;AACA,UAAU,IAAI;AACd;AACA,UAAU,cAAc;AACxB;AACA;AACA,UAAU,IAAI;AACd;AACA,iBAAiB,OAAO,OAAO,IAAI,sBAAsB,WAAW;AACpE,iBAAiB,YAAY,YAAY,SAAS,UAAU,IAAI,wBAAwB,WAAW;AACnG,iBAAiB,kBAAkB,OAAO,IAAI,YAAY,QAAQ,sBAAsB,WAAW;AACnG,iBAAiB,UAAU,YAAY,SAAS,UAAU,WAAW,KAAK,cAAc;AACxF,iBAAiB,kBAAkB,OAAO,WAAW,YAAY,QAAQ,GAAG,cAAc;;ACd1F,iBAAiB,iBAAiB,uBAAuB,MAAM,GAAG,QAAQ;AAC1E,iBAAiB,iBAAiB,uBAAuB,MAAM,GAAG,QAAQ;;ACC1E,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA,UAAUA,IAAS;AACnB;AACA,iBAAiB,0BAA0B,YAAY,SAAS,UAAU,WAAW,KAAK,kBAAkB;AAC5G,iBAAiB,cAAc,YAAY,SAAS,eAAe,SAAS,KAAK,kBAAkB;AACnG,iBAAiB,sBAAsB,YAAY,SAAS,YAAY,QAAQ,GAAG,kBAAkB;AACrG,KAAK,yBAAyB;AAC9B;AACA;AACA,YAAYA,IAAS;AACrB;AACA,cAAc,mBAAmB,UAAU,WAAW,QAAQ,QAAQ,KAAK,yBAAyB;;;;","names":["ProseNode"]}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA"}
@@ -1,2 +1,2 @@
1
1
  export * from 'prosemirror-inputrules';
2
- //# sourceMappingURL=inputrules.d.ts.map
2
+ //# sourceMappingURL=inputrules.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"inputrules.d.ts","sources":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"inputrules.d.ts","sourceRoot":"","sources":["../src/inputrules.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA"}
package/lib/keymap.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export * from 'prosemirror-keymap';
2
- //# sourceMappingURL=keymap.d.ts.map
2
+ //# sourceMappingURL=keymap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"keymap.d.ts","sources":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"keymap.d.ts","sourceRoot":"","sources":["../src/keymap.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
package/lib/model.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export * from 'prosemirror-model';
2
- //# sourceMappingURL=model.d.ts.map
2
+ //# sourceMappingURL=model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","sources":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA"}
@@ -1,2 +1,2 @@
1
1
  export * from 'prosemirror-schema-list';
2
- //# sourceMappingURL=schema-list.d.ts.map
2
+ //# sourceMappingURL=schema-list.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema-list.d.ts","sources":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"schema-list.d.ts","sourceRoot":"","sources":["../src/schema-list.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA"}
package/lib/state.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export * from 'prosemirror-state';
2
- //# sourceMappingURL=state.d.ts.map
2
+ //# sourceMappingURL=state.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"state.d.ts","sources":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA"}
package/lib/tables.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export * from 'prosemirror-tables';
2
- //# sourceMappingURL=tables.d.ts.map
2
+ //# sourceMappingURL=tables.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tables.d.ts","sources":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"tables.d.ts","sourceRoot":"","sources":["../src/tables.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,2 +1,2 @@
1
1
  export * from 'prosemirror-transform';
2
- //# sourceMappingURL=transform.d.ts.map
2
+ //# sourceMappingURL=transform.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transform.d.ts","sources":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../src/transform.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
package/lib/view.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export * from 'prosemirror-view';
2
- //# sourceMappingURL=view.d.ts.map
2
+ //# sourceMappingURL=view.d.ts.map
package/lib/view.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"view.d.ts","sources":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../src/view.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jvs-milkdown/prose",
3
- "version": "1.2.9",
3
+ "version": "1.2.11",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -76,7 +76,7 @@
76
76
  "./gapcursor/style/gapcursor.css": "./lib/style/gapcursor.css"
77
77
  },
78
78
  "dependencies": {
79
- "@jvs-milkdown/exception": "^1.2.9",
79
+ "@jvs-milkdown/exception": "^1.2.11",
80
80
  "prosemirror-changeset": "^2.3.1",
81
81
  "prosemirror-commands": "^1.7.1",
82
82
  "prosemirror-dropcursor": "^1.8.2",