@impermeable/waterproof-editor 0.12.0 → 0.14.0

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.
Files changed (101) hide show
  1. package/dist/api/InputAreaStatus.d.ts +7 -7
  2. package/dist/api/InputAreaStatus.d.ts.map +1 -1
  3. package/dist/api/MessageHandlerEditor.d.ts +29 -0
  4. package/dist/api/MessageHandlerEditor.d.ts.map +1 -0
  5. package/dist/api/index.d.ts +6 -7
  6. package/dist/api/index.d.ts.map +1 -1
  7. package/dist/api/types.d.ts +125 -58
  8. package/dist/api/types.d.ts.map +1 -1
  9. package/dist/autocomplete/renderSymbol.d.ts +1 -2
  10. package/dist/autocomplete/renderSymbol.d.ts.map +1 -1
  11. package/dist/codeview/busy-indicator.d.ts +113 -0
  12. package/dist/codeview/busy-indicator.d.ts.map +1 -0
  13. package/dist/codeview/code-plugin.d.ts +6 -5
  14. package/dist/codeview/code-plugin.d.ts.map +1 -1
  15. package/dist/codeview/nodeview.d.ts +24 -15
  16. package/dist/codeview/nodeview.d.ts.map +1 -1
  17. package/dist/commands/command-helpers.d.ts +7 -22
  18. package/dist/commands/command-helpers.d.ts.map +1 -1
  19. package/dist/commands/commands.d.ts +6 -28
  20. package/dist/commands/commands.d.ts.map +1 -1
  21. package/dist/commands/index.d.ts +1 -2
  22. package/dist/commands/index.d.ts.map +1 -1
  23. package/dist/commands/insert-command.d.ts +7 -33
  24. package/dist/commands/insert-command.d.ts.map +1 -1
  25. package/dist/commands/types.d.ts +2 -2
  26. package/dist/commands/types.d.ts.map +1 -1
  27. package/dist/commands/utils.d.ts +16 -0
  28. package/dist/commands/utils.d.ts.map +1 -0
  29. package/dist/document/blocks/block.d.ts +12 -6
  30. package/dist/document/blocks/block.d.ts.map +1 -1
  31. package/dist/document/blocks/blocktypes.d.ts +78 -35
  32. package/dist/document/blocks/blocktypes.d.ts.map +1 -1
  33. package/dist/document/blocks/index.d.ts +2 -1
  34. package/dist/document/blocks/index.d.ts.map +1 -1
  35. package/dist/document/blocks/schema.d.ts +4 -7
  36. package/dist/document/blocks/schema.d.ts.map +1 -1
  37. package/dist/document/blocks/typeguards.d.ts +4 -5
  38. package/dist/document/blocks/typeguards.d.ts.map +1 -1
  39. package/dist/document/utils.d.ts +6 -10
  40. package/dist/document/utils.d.ts.map +1 -1
  41. package/dist/edit-utils.d.ts +10 -0
  42. package/dist/edit-utils.d.ts.map +1 -0
  43. package/dist/editor.d.ts +88 -34
  44. package/dist/editor.d.ts.map +1 -1
  45. package/dist/embedded-codemirror/embedded-codemirror-keymap.d.ts.map +1 -1
  46. package/dist/embedded-codemirror/embeddedCodemirror.d.ts +2 -2
  47. package/dist/embedded-codemirror/embeddedCodemirror.d.ts.map +1 -1
  48. package/dist/hinting/hint-plugin.d.ts +1 -2
  49. package/dist/hinting/hint-plugin.d.ts.map +1 -1
  50. package/dist/index.css +2 -2
  51. package/dist/index.d.ts +6 -1
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +62 -81
  54. package/dist/inputArea.d.ts +2 -3
  55. package/dist/inputArea.d.ts.map +1 -1
  56. package/dist/mapping/Tree.d.ts +91 -0
  57. package/dist/mapping/Tree.d.ts.map +1 -0
  58. package/dist/mapping/helper-functions.d.ts +4 -0
  59. package/dist/mapping/helper-functions.d.ts.map +1 -0
  60. package/dist/mapping/index.d.ts +4 -0
  61. package/dist/mapping/index.d.ts.map +1 -0
  62. package/dist/mapping/mapping.d.ts +82 -0
  63. package/dist/mapping/mapping.d.ts.map +1 -0
  64. package/dist/mapping/nodeUpdate.d.ts +27 -0
  65. package/dist/mapping/nodeUpdate.d.ts.map +1 -0
  66. package/dist/mapping/textUpdate.d.ts +16 -0
  67. package/dist/mapping/textUpdate.d.ts.map +1 -0
  68. package/dist/mapping/types.d.ts +22 -0
  69. package/dist/mapping/types.d.ts.map +1 -0
  70. package/dist/markdown-defaults/index.d.ts +4 -0
  71. package/dist/markdown-defaults/index.d.ts.map +1 -0
  72. package/dist/markdown-defaults/statemachine.d.ts +23 -0
  73. package/dist/markdown-defaults/statemachine.d.ts.map +1 -0
  74. package/dist/markup-views/SwitchableViewPlugin.d.ts +22 -0
  75. package/dist/markup-views/SwitchableViewPlugin.d.ts.map +1 -0
  76. package/dist/markup-views/index.d.ts +1 -4
  77. package/dist/markup-views/index.d.ts.map +1 -1
  78. package/dist/markup-views/switchable-view/EditableView.d.ts.map +1 -1
  79. package/dist/markup-views/switchable-view/RenderedView.d.ts +1 -1
  80. package/dist/markup-views/switchable-view/RenderedView.d.ts.map +1 -1
  81. package/dist/markup-views/switchable-view/SwitchableView.d.ts +5 -8
  82. package/dist/markup-views/switchable-view/SwitchableView.d.ts.map +1 -1
  83. package/dist/menubar/menubar.d.ts +2 -4
  84. package/dist/menubar/menubar.d.ts.map +1 -1
  85. package/dist/progressBar.d.ts +31 -11
  86. package/dist/progressBar.d.ts.map +1 -1
  87. package/dist/qedStatus.d.ts.map +1 -1
  88. package/dist/schema/schema.d.ts +4 -3
  89. package/dist/schema/schema.d.ts.map +1 -1
  90. package/dist/serialization/DocumentSerializer.d.ts +127 -0
  91. package/dist/serialization/DocumentSerializer.d.ts.map +1 -0
  92. package/dist/styles/index.d.ts +3 -5
  93. package/dist/styles/index.d.ts.map +1 -1
  94. package/dist/styles/waterproof-defaults.css +2 -0
  95. package/dist/translation/index.d.ts +1 -1
  96. package/dist/translation/index.d.ts.map +1 -1
  97. package/dist/translation/toMarkdownTranslation.d.ts +3 -0
  98. package/dist/translation/toMarkdownTranslation.d.ts.map +1 -0
  99. package/impermeable-waterproof-editor-0.14.0.tgz +0 -0
  100. package/package.json +33 -10
  101. package/tsconfig.test.json +14 -0
@@ -0,0 +1,127 @@
1
+ import { Fragment, Node } from "prosemirror-model";
2
+ import { TagConfiguration } from "../api";
3
+ export declare function makeNeighbors(above: Node | null | undefined, twoAbove: Node | null | undefined, below: Node | null | undefined, twoBelow: Node | null | undefined): (skipNewlines: boolean) => {
4
+ nodeAbove: string | null;
5
+ nodeBelow: string | null;
6
+ };
7
+ export declare class SerializationError extends Error {
8
+ constructor(message: string);
9
+ }
10
+ export declare abstract class DocumentSerializer {
11
+ /**
12
+ * Describes how to turn a code node into a string representation.
13
+ * @param codeNode The code node that is going to be serialized
14
+ * @param parentNode The parent node of this node (if it has one)
15
+ * @param neighbors Function that upon calling will return the neighbors of the node being serialized. When `skipNewlines` is set and the *direct* neighbors
16
+ * of the node are newline nodes they will be skipped and the next nodes will be returned (if they exist).
17
+ */
18
+ abstract serializeCode(codeNode: Node, parentNode: string | null, neighbors: (skipNewlines: boolean) => {
19
+ nodeAbove: string | null;
20
+ nodeBelow: string | null;
21
+ }): string;
22
+ /**
23
+ * Describes how to turn a math node into a string representation.
24
+ * @param mathNode The math node that is going to be serialized
25
+ * @param parentNode The parent node of this node (if it has one)
26
+ * @param neighbors Function that upon calling will return the neighbors of the node being serialized. When `skipNewlines` is set and the *direct* neighbors
27
+ * of the node are newline nodes they will be skipped and the next nodes will be returned (if they exist).
28
+ */
29
+ abstract serializeMath(mathNode: Node, parentNode: string | null, neighbors: (skipNewlines: boolean) => {
30
+ nodeAbove: string | null;
31
+ nodeBelow: string | null;
32
+ }): string;
33
+ /**
34
+ * Describes how to turn a markdown node into a string representation.
35
+ * @param codeNode The markdown node that is going to be serialized
36
+ * @param parentNode The parent node of this node (if it has one)
37
+ * @param neighbors Function that upon calling will return the neighbors of the node being serialized. When `skipNewlines` is set and the *direct* neighbors
38
+ * of the node are newline nodes they will be skipped and the next nodes will be returned (if they exist).
39
+ */
40
+ abstract serializeMarkdown(markdownNode: Node, parentNode: string | null, neighbors: (skipNewlines: boolean) => {
41
+ nodeAbove: string | null;
42
+ nodeBelow: string | null;
43
+ }): string;
44
+ /**
45
+ * Describes how to turn a input node into a string representation.
46
+ * This node can have children, so you probably want to call `this.serializeNode` on every child node using
47
+ * `inputNde.forEach((child) => {...})`
48
+ * @param inputNode The input node that is going to be serialized
49
+ * @param parentNode The parent node of this node (if it has one)
50
+ * @param neighbors Function that upon calling will return the neighbors of the node being serialized. When `skipNewlines` is set and the *direct* neighbors
51
+ * of the node are newline nodes they will be skipped and the next nodes will be returned (if they exist).
52
+ */
53
+ abstract serializeInput(inputNode: Node, parentNode: string | null, neighbors: (skipNewlines: boolean) => {
54
+ nodeAbove: string | null;
55
+ nodeBelow: string | null;
56
+ }): string;
57
+ /**
58
+ * Describes how to turn a hint node into a string representation. This function can query the title of the node via
59
+ * `hint.attrs.title`. This node can have children, so you probably want to call `this.serializeNode` on every child node using
60
+ * `hintNode.forEach((child) => {...})`
61
+ * @param hintNode The hint node that is going to be serialized
62
+ * @param parentNode The parent node of this node (if it has one)
63
+ * @param neighbors Function that upon calling will return the neighbors of the node being serialized. When `skipNewlines` is set and the *direct* neighbors
64
+ * of the node are newline nodes they will be skipped and the next nodes will be returned (if they exist).
65
+ */
66
+ abstract serializeHint(hintNode: Node, parentNode: string | null, neighbors: (skipNewlines: boolean) => {
67
+ nodeAbove: string | null;
68
+ nodeBelow: string | null;
69
+ }): string;
70
+ /**
71
+ * Describes how to turn a container node into a string representation.
72
+ * This node can have children (including input areas and hints), so you probably want to call `this.serializeNode` on every child node.
73
+ * The container's name can be retrieved via `containerNode.attrs.name`.
74
+ * @param containerNode The container node that is going to be serialized
75
+ * @param parentNode The parent node of this node (if it has one)
76
+ * @param neighbors Function that upon calling will return the neighbors of the node being serialized.
77
+ */
78
+ abstract serializeContainer(containerNode: Node, parentNode: string | null, neighbors: (skipNewlines: boolean) => {
79
+ nodeAbove: string | null;
80
+ nodeBelow: string | null;
81
+ }): string;
82
+ serializeText(node: Node): string;
83
+ serializeNewline(): string;
84
+ /**
85
+ * Serializes a node to its string representation.
86
+ * @param node The node to serialize.
87
+ * @param parent The type name of the parent node, or null if the node is at root level.
88
+ * @param neighbors A function that returns the node types above and below the current node, with an option to skip newline nodes.
89
+ * @returns The serialized (string) representation of the node.
90
+ * @throws A {@linkcode SerializationError} when the node type is not supported.
91
+ */
92
+ serializeNode(node: Node, parent: string | null, neighbors: (skipNewlines: boolean) => {
93
+ nodeAbove: string | null;
94
+ nodeBelow: string | null;
95
+ }): string;
96
+ /**
97
+ * Serializes a fragment of nodes into a string representation.
98
+ *
99
+ * This method iterates through each child node in the fragment and serializes it individually.
100
+ * For each node, it provides context about neighboring nodes to the serialization function,
101
+ * with an option to skip newline nodes when determining context.
102
+ * @param fragment The node content fragment to serialize
103
+ * @param parent The parent node name, or null if there is no parent
104
+ * @returns The serialized string representation of the fragment
105
+ * @throws A {@linkcode SerializationError} when the document contains a node type that is not supported by the serializer.
106
+ */
107
+ serializeFragment(fragment: Fragment, parent: string | null): string;
108
+ /**
109
+ * Serializes the whole ProseMirror document into its string representation.
110
+ *
111
+ * @param node The document node to serialize, this should probably be the root (`doc`) node of the ProseMirror document.
112
+ * @returns The string representation of the document
113
+ * @throws A {@linkcode SerializationError} when the document contains a node type that is not supported by the serializer.
114
+ */
115
+ serializeDocument(node: Node): string;
116
+ }
117
+ export declare class DefaultTagSerializer extends DocumentSerializer {
118
+ private readonly tagConf;
119
+ constructor(tagConf: TagConfiguration);
120
+ serializeCode(node: Node): string;
121
+ serializeMath(node: Node): string;
122
+ serializeMarkdown(node: Node): string;
123
+ serializeInput(node: Node): string;
124
+ serializeHint(node: Node): string;
125
+ serializeContainer(node: Node): string;
126
+ }
127
+ //# sourceMappingURL=DocumentSerializer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocumentSerializer.d.ts","sourceRoot":"","sources":["../../src/serialization/DocumentSerializer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1C,wBAAgB,aAAa,CACzB,KAAK,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,EAC9B,QAAQ,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,EACjC,KAAK,EAAE,IAAI,GAAG,IAAI,G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G,MAAM;IAIjC,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAIjC,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAIrC,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAUlC,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAWjC,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;CAIzC"}
@@ -1,17 +1,15 @@
1
1
  import "./math.css";
2
2
  import "./style.css";
3
3
  import "./hints.css";
4
+ import "./container.css";
4
5
  import "./menubar.css";
5
6
  import "./input-area.css";
6
7
  import "./markdown.css";
7
8
  import "./notifications.css";
8
- import "./coqdoc.css";
9
- import "./progressBar.css";
9
+ import "./progress.css";
10
10
  import "./documentProgressDecorator.css";
11
- import "./spinner.css";
12
- import "./freeze.css";
13
11
  import "./context-menu.css";
14
12
  import "./autocomplete.css";
15
- import "./waterproof.css";
16
13
  import "./magic.css";
14
+ import "./busy-indicator.css";
17
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/styles/index.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,CAAC;AAGpB,OAAO,aAAa,CAAC;AAGrB,OAAO,aAAa,CAAC;AAGrB,OAAO,eAAe,CAAC;AAGvB,OAAO,kBAAkB,CAAC;AAG1B,OAAO,gBAAgB,CAAC;AAGxB,OAAO,qBAAqB,CAAC;AAG7B,OAAO,cAAc,CAAC;AAGtB,OAAO,mBAAmB,CAAC;AAG3B,OAAO,iCAAiC,CAAC;AAGzC,OAAO,eAAe,CAAC;AAGvB,OAAO,cAAc,CAAC;AAGtB,OAAO,oBAAoB,CAAC;AAG5B,OAAO,oBAAoB,CAAC;AAG5B,OAAO,kBAAkB,CAAC;AAG1B,OAAO,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/styles/index.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,CAAC;AAGpB,OAAO,aAAa,CAAC;AAGrB,OAAO,aAAa,CAAC;AAGrB,OAAO,iBAAiB,CAAC;AAGzB,OAAO,eAAe,CAAC;AAGvB,OAAO,kBAAkB,CAAC;AAG1B,OAAO,gBAAgB,CAAC;AAGxB,OAAO,qBAAqB,CAAC;AAG7B,OAAO,gBAAgB,CAAC;AAGxB,OAAO,iCAAiC,CAAC;AAGzC,OAAO,oBAAoB,CAAC;AAG5B,OAAO,oBAAoB,CAAC;AAG5B,OAAO,aAAa,CAAC;AAGrB,OAAO,sBAAsB,CAAC"}
@@ -0,0 +1,2 @@
1
+ :root{--wp-buttonBackground: #2b3990;--wp-buttonBorder: #ffffff;--wp-buttonForeground: #ffffff;--wp-buttonHoverBackground: #232d73;--wp-buttonSecondaryBackground: #2b3990;--wp-dropdownBorder: #cecece;--wp-dropdownListBackground: #ffffff;--wp-editorBackground: #eceeff;--wp-editorFontFamily: "Droid Sans Mono", monospace;--wp-editorFontSize: 14px;--wp-editorFontWeight: normal;--wp-editorHintForeground: #0da0ba;--wp-editorInlayHintBackground: rgba(255, 255, 255, .1);--wp-editorInlayHintForeground: #969696;--wp-editorLightBulbForeground: #e0af68;--wp-editorLineHighlightBackground: rgba(182, 182, 182, .28);--wp-editorSelectionBackground: rgba(172, 176, 208, .48);--wp-editorSelectionForeground: #000000;--wp-errorForeground: #ffffff;--wp-fontFamily: system-ui, "Ubuntu", "Droid Sans", sans-serif;--wp-fontSize: 13px;--wp-fontWeight: normal;--wp-foreground: #000000;--wp-inputBackground: #eceeff;--wp-inputBorder: #eceeff;--wp-inputForeground: #000000;--wp-listActiveselectionBackground: #5561a6;--wp-listActiveselectionForeground: #ffffff;--wp-listDropBackground: #1e202e;--wp-listFilterWidgetBackground: #f8f8f8;--wp-listHighlightForeground: #668ac4;--wp-menuBackground: #eceeff;--wp-menuForeground: #000000;--wp-menuSelectionBackground: #2b3990;--wp-menuSelectionBorder: #101014;--wp-menuSelectionForeground: #ffffff;--wp-menuSeparatorBackground: #d4d4d4;--wp-hintOutline: #acb0d0;--wp-notificationsBackground: #2b3990;--wp-notificationsForeground: #ffffff;--wp-quickInputBackground:#ffffff;--wp-quickInputForeground: #787c99;--wp-terminalAnsiGreen: #73daca;--wp-terminalAnsiRed: #f7768e;--wp-terminalAnsiYellow: #e0af68;--wp-textCodeBlockBackground: #aab0d3;--wp-textSeparatorForeground: #363b54}
2
+ /*# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3JjL3N0eWxlcy93YXRlcnByb29mLWRlZmF1bHRzLmNzcyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsiLyogVGhlc2Ugc3R5bGUgbmFtZXMgYXJlIGlucHNpcmVkIGJ5IHRoZSBwcm9wZXJ0aWVzIGZyb20gVlNDb2RlIHdlIG9yaWdpbmFsbHkgdXNlZCAqL1xuOnJvb3Qge1xuICAtLXdwLWJ1dHRvbkJhY2tncm91bmQ6ICMyYjM5OTA7XG4gIC0td3AtYnV0dG9uQm9yZGVyOiAjZmZmZmZmO1xuICAtLXdwLWJ1dHRvbkZvcmVncm91bmQ6ICNmZmZmZmY7XG4gIC0td3AtYnV0dG9uSG92ZXJCYWNrZ3JvdW5kOiAjMjMyZDczO1xuICAtLXdwLWJ1dHRvblNlY29uZGFyeUJhY2tncm91bmQ6ICMyYjM5OTA7XG4gIC0td3AtZHJvcGRvd25Cb3JkZXI6ICNjZWNlY2U7XG4gIC0td3AtZHJvcGRvd25MaXN0QmFja2dyb3VuZDogI2ZmZmZmZjtcbiAgLS13cC1lZGl0b3JCYWNrZ3JvdW5kOiAjZWNlZWZmO1xuICAtLXdwLWVkaXRvckZvbnRGYW1pbHk6ICdEcm9pZCBTYW5zIE1vbm8nLCBtb25vc3BhY2U7XG4gIC0td3AtZWRpdG9yRm9udFNpemU6IDE0cHg7XG4gIC0td3AtZWRpdG9yRm9udFdlaWdodDogbm9ybWFsO1xu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FDckIsNkJBQTZCLFFBQzdCLHVCQUF1QixRQUN2Qix1QkFBdUIsaUJBQWlCLEVBQUUsVUFDMUMscUJBQXFCLEtBQ3JCLHVCQUF1QixPQUN2QiwyQkFBMkIsUUFDM0IsZ0NBQWdDLEtBQUssR0FBRyxFQUFFLEdBQUcsRUFBRSxHQUFHLEVBQUUsSUFDcEQsZ0NBQWdDLFFBQ2hDLGdDQUFnQyxRQUNoQyxvQ0FBb0MsS0FBSyxHQUFHLEVBQUUsR0FBRyxFQUFFLEdBQUcsRUFBRSxLQUN4RCxnQ0FBZ0MsS0FBSyxHQUFHLEVBQUUsR0FBRyxFQUFFLEdBQUcsRUFBRSxLQUNwRCxnQ0FBZ0MsUUFDaEMsc0JBQXNCLFFBQ3RCLGlCQUFpQixTQUFTLEVBQUUsUUFBUSxFQUFFLFlBQVksRUFBRSxXQUNwRCxlQUFlLEtBQ2YsaUJBQWlCLE9BQ2pCLGlCQUFpQixRQUNqQixzQkFBc0IsUUFDdEIsa0JBQWtCLFFBQ2xCLHNCQUFzQixRQUN0QixvQ0FBb0MsUUFDcEMsb0NBQW9DLFFBQ3BDLHlCQUF5QixRQUN6QixpQ0FBaUMsUUFDakMsOEJBQThCLFFBQzlCLHFCQUFxQixRQUNyQixxQkFBcUIsUUFDckIsOEJBQThCLFFBQzlCLDBCQUEwQixRQUMxQiw4QkFBOEIsUUFDOUIsOEJBQThCLFFBQzlCLGtCQUFrQixRQUNsQiw4QkFBOEIsUUFDOUIsOEJBQThCLFFBQzlCLDBCQUEwQixRQUMxQiwyQkFBMkIsUUFDM0Isd0JBQXdCLFFBQ3hCLHNCQUFzQixRQUN0Qix5QkFBeUIsUUFDekIsOEJBQThCLFFBQzlCLDhCQUE4QixPQUNoQyIsCiAgIm5hbWVzIjogW10KfQo= */
@@ -1,2 +1,2 @@
1
- export { FileTranslator } from "./Translator";
1
+ export { toMathInline, defaultToMarkdown } from "./toMarkdownTranslation";
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/translation/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/translation/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function toMathInline(input: string): string;
2
+ export declare const defaultToMarkdown: typeof toMathInline;
3
+ //# sourceMappingURL=toMarkdownTranslation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toMarkdownTranslation.d.ts","sourceRoot":"","sources":["../../src/translation/toMarkdownTranslation.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,eAAO,MAAM,iBAAiB,qBAAe,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@impermeable/waterproof-editor",
3
- "version": "0.12.0",
3
+ "version": "0.14.0",
4
4
  "description": "Waterproof Editor ",
5
5
  "homepage": "https://github.com/impermeable/waterproof-editor#readme",
6
6
  "bugs": {
@@ -15,7 +15,8 @@
15
15
  "main": "./dist/index.js",
16
16
  "exports": {
17
17
  ".": "./dist/index.js",
18
- "./styles.css": "./dist/index.css"
18
+ "./styles.css": "./dist/index.css",
19
+ "./waterproof-defaults.css": "./dist/styles/waterproof-defaults.css"
19
20
  },
20
21
  "typesVersions": {
21
22
  "*": {
@@ -26,46 +27,51 @@
26
27
  },
27
28
  "scripts": {
28
29
  "watch:esbuild": "node esbuild.mjs --watch",
30
+ "watch:esbuild-debug": "node esbuild.mjs --watch --debug",
29
31
  "watch:tsc": "npx tsc -b --watch",
30
32
  "test": "npm run unit-tests",
31
33
  "unit-tests": "npx jest",
32
34
  "unit-tests-cov": "npx jest --coverage --collectCoverageFrom=src/**/*.ts",
33
35
  "lezer-generator": "npx lezer-generator ./src/codeview/lang-pack/syntax.grammar -o ./src/codeview/lang-pack/syntax.ts --typeScript",
36
+ "lezer-generator-verbose": "npx lezer-generator ./src/codeview/lang-pack-verbose/syntax.grammar -o ./src/codeview/lang-pack-verbose/syntax.ts --typeScript",
34
37
  "typecheck": "npx tsc -b",
35
38
  "build": "npm run typecheck && node esbuild.mjs --minify",
36
39
  "lint": "npx eslint .",
37
40
  "lint-fix": "npx eslint . --fix"
38
41
  },
39
42
  "devDependencies": {
43
+ "@codemirror/autocomplete": "6.18.1",
44
+ "@codemirror/commands": "6.6.2",
45
+ "@codemirror/language": "6.12.2",
46
+ "@codemirror/lint": "6.9.2",
47
+ "@codemirror/state": "~6.5.3",
48
+ "@codemirror/view": "6.38.8",
40
49
  "@eslint/js": "^9.18.0",
41
50
  "@lezer/generator": "^1.2.3",
42
51
  "@types/glob": "^7.1.1",
43
52
  "@types/jest": "^29.5.1",
44
53
  "@types/jquery": "^3.5.16",
54
+ "@types/markdown-it": "^14.1.2",
45
55
  "@types/mocha": "^10.0.1",
46
56
  "@types/node": "^16.11.7",
47
57
  "esbuild": "^0.25.9",
48
58
  "eslint": "^9.18.0",
49
59
  "jest": "^29.5.0",
50
- "jest-environment-jsdom": "^29.7.0",
51
- "mocha": "^10.2.0",
60
+ "jest-environment-jsdom": "^30.2.0",
61
+ "mocha": "^11.7.5",
52
62
  "prettier": "^2.8.1",
63
+ "prosemirror-dev-tools": "^4.2.0",
53
64
  "ts-jest": "^29.1.0",
54
65
  "typescript": "^5.1.3",
55
66
  "typescript-eslint": "^8.20.0"
56
67
  },
57
68
  "dependencies": {
58
69
  "@benrbray/prosemirror-math": "1.0.0",
59
- "@codemirror/autocomplete": "6.18.1",
60
- "@codemirror/commands": "6.6.2",
61
- "@codemirror/language": "6.10.3",
62
- "@codemirror/lint": "6.8.2",
63
- "@codemirror/view": "6.27.0",
64
70
  "@lezer/highlight": "1.2.1",
65
71
  "@lezer/lr": "1.4.2",
66
72
  "jquery": "3.7.1",
67
73
  "katex": "^0.16.22",
68
- "markdown-it": "13.0.2",
74
+ "markdown-it": "^14.1.1",
69
75
  "prosemirror-commands": "1.6.0",
70
76
  "prosemirror-history": "1.4.1",
71
77
  "prosemirror-inputrules": "1.4.0",
@@ -75,5 +81,22 @@
75
81
  "prosemirror-state": "1.4.3",
76
82
  "prosemirror-transform": "1.10.0",
77
83
  "prosemirror-view": "1.34.3"
84
+ },
85
+ "overrides": {
86
+ "mocha": {
87
+ "serialize-javascript": "7.0.5",
88
+ "diff": "8.0.3"
89
+ },
90
+ "eslint": {
91
+ "brace-expansion": "2.1.0"
92
+ }
93
+ },
94
+ "peerDependencies": {
95
+ "@codemirror/autocomplete": "6.18.1",
96
+ "@codemirror/commands": "6.6.2",
97
+ "@codemirror/language": "6.12.2",
98
+ "@codemirror/lint": "6.9.2",
99
+ "@codemirror/state": "~6.5.2",
100
+ "@codemirror/view": "6.38.8"
78
101
  }
79
102
  }
@@ -0,0 +1,14 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "rootDir": ".",
5
+ "outDir": "./dist-test",
6
+ "module": "nodenext",
7
+ "moduleResolution": "nodenext",
8
+ "isolatedModules": true,
9
+ "emitDeclarationOnly": false,
10
+ "declaration": false,
11
+ "declarationMap": false
12
+ },
13
+ "include": ["src/**/*.ts", "src/**/*.json", "__tests__/**/*.ts"]
14
+ }