@kerebron/editor-react 0.4.5 → 0.4.9

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 (85) hide show
  1. package/esm/{editor-react/src/EditorContent.d.ts → EditorContent.d.ts} +1 -1
  2. package/esm/EditorContent.d.ts.map +1 -0
  3. package/esm/{editor-react/src/mod.d.ts → mod.d.ts} +1 -1
  4. package/esm/mod.d.ts.map +1 -0
  5. package/esm/{editor-react/src/mod.js → mod.js} +1 -1
  6. package/esm/{editor-react/src/useEditor.d.ts → useEditor.d.ts} +2 -2
  7. package/esm/useEditor.d.ts.map +1 -0
  8. package/esm/{editor-react/src/useEditor.js → useEditor.js} +2 -2
  9. package/package.json +5 -11
  10. package/esm/editor/src/CoreEditor.d.ts +0 -40
  11. package/esm/editor/src/CoreEditor.d.ts.map +0 -1
  12. package/esm/editor/src/CoreEditor.js +0 -252
  13. package/esm/editor/src/DummyEditorView.d.ts +0 -60
  14. package/esm/editor/src/DummyEditorView.d.ts.map +0 -1
  15. package/esm/editor/src/DummyEditorView.js +0 -277
  16. package/esm/editor/src/Extension.d.ts +0 -31
  17. package/esm/editor/src/Extension.d.ts.map +0 -1
  18. package/esm/editor/src/Extension.js +0 -53
  19. package/esm/editor/src/ExtensionManager.d.ts +0 -32
  20. package/esm/editor/src/ExtensionManager.d.ts.map +0 -1
  21. package/esm/editor/src/ExtensionManager.js +0 -260
  22. package/esm/editor/src/Mark.d.ts +0 -23
  23. package/esm/editor/src/Mark.d.ts.map +0 -1
  24. package/esm/editor/src/Mark.js +0 -51
  25. package/esm/editor/src/Node.d.ts +0 -32
  26. package/esm/editor/src/Node.d.ts.map +0 -1
  27. package/esm/editor/src/Node.js +0 -60
  28. package/esm/editor/src/commands/CommandManager.d.ts +0 -23
  29. package/esm/editor/src/commands/CommandManager.d.ts.map +0 -1
  30. package/esm/editor/src/commands/CommandManager.js +0 -118
  31. package/esm/editor/src/commands/baseCommandFactories.d.ts +0 -3
  32. package/esm/editor/src/commands/baseCommandFactories.d.ts.map +0 -1
  33. package/esm/editor/src/commands/baseCommandFactories.js +0 -836
  34. package/esm/editor/src/commands/createChainableState.d.ts +0 -3
  35. package/esm/editor/src/commands/createChainableState.d.ts.map +0 -1
  36. package/esm/editor/src/commands/createChainableState.js +0 -29
  37. package/esm/editor/src/commands/keyCommandFactories.d.ts +0 -3
  38. package/esm/editor/src/commands/keyCommandFactories.d.ts.map +0 -1
  39. package/esm/editor/src/commands/keyCommandFactories.js +0 -10
  40. package/esm/editor/src/commands/mod.d.ts +0 -7
  41. package/esm/editor/src/commands/mod.d.ts.map +0 -1
  42. package/esm/editor/src/commands/mod.js +0 -76
  43. package/esm/editor/src/commands/replaceCommandFactories.d.ts +0 -3
  44. package/esm/editor/src/commands/replaceCommandFactories.d.ts.map +0 -1
  45. package/esm/editor/src/commands/replaceCommandFactories.js +0 -94
  46. package/esm/editor/src/commands/types.d.ts +0 -18
  47. package/esm/editor/src/commands/types.d.ts.map +0 -1
  48. package/esm/editor/src/commands/types.js +0 -1
  49. package/esm/editor/src/mod.d.ts +0 -9
  50. package/esm/editor/src/mod.d.ts.map +0 -1
  51. package/esm/editor/src/mod.js +0 -8
  52. package/esm/editor/src/nodeToTreeString.d.ts +0 -10
  53. package/esm/editor/src/nodeToTreeString.d.ts.map +0 -1
  54. package/esm/editor/src/nodeToTreeString.js +0 -74
  55. package/esm/editor/src/plugins/TrackSelecionPlugin.d.ts +0 -6
  56. package/esm/editor/src/plugins/TrackSelecionPlugin.d.ts.map +0 -1
  57. package/esm/editor/src/plugins/TrackSelecionPlugin.js +0 -24
  58. package/esm/editor/src/plugins/input-rules/InputRulesPlugin.d.ts +0 -23
  59. package/esm/editor/src/plugins/input-rules/InputRulesPlugin.d.ts.map +0 -1
  60. package/esm/editor/src/plugins/input-rules/InputRulesPlugin.js +0 -163
  61. package/esm/editor/src/plugins/keymap/keymap.d.ts +0 -11
  62. package/esm/editor/src/plugins/keymap/keymap.d.ts.map +0 -1
  63. package/esm/editor/src/plugins/keymap/keymap.js +0 -125
  64. package/esm/editor/src/plugins/keymap/w3c-keyname.d.ts +0 -4
  65. package/esm/editor/src/plugins/keymap/w3c-keyname.d.ts.map +0 -1
  66. package/esm/editor/src/plugins/keymap/w3c-keyname.js +0 -124
  67. package/esm/editor/src/types.d.ts +0 -52
  68. package/esm/editor/src/types.d.ts.map +0 -1
  69. package/esm/editor/src/types.js +0 -1
  70. package/esm/editor/src/ui.d.ts +0 -15
  71. package/esm/editor/src/ui.d.ts.map +0 -1
  72. package/esm/editor/src/ui.js +0 -16
  73. package/esm/editor/src/utilities/SmartOutput.d.ts +0 -41
  74. package/esm/editor/src/utilities/SmartOutput.d.ts.map +0 -1
  75. package/esm/editor/src/utilities/SmartOutput.js +0 -228
  76. package/esm/editor/src/utilities/createNodeFromContent.d.ts +0 -9
  77. package/esm/editor/src/utilities/createNodeFromContent.d.ts.map +0 -1
  78. package/esm/editor/src/utilities/createNodeFromContent.js +0 -32
  79. package/esm/editor/src/utilities/getHtmlAttributes.d.ts +0 -9
  80. package/esm/editor/src/utilities/getHtmlAttributes.d.ts.map +0 -1
  81. package/esm/editor/src/utilities/getHtmlAttributes.js +0 -47
  82. package/esm/editor-react/src/EditorContent.d.ts.map +0 -1
  83. package/esm/editor-react/src/mod.d.ts.map +0 -1
  84. package/esm/editor-react/src/useEditor.d.ts.map +0 -1
  85. /package/esm/{editor-react/src/EditorContent.js → EditorContent.js} +0 -0
@@ -1,9 +0,0 @@
1
- import type { MarkSpec, Node as ProseMirrorNode, NodeSpec } from 'prosemirror-model';
2
- import type { Mark } from '../Mark.js';
3
- import type { Node } from '../Node.js';
4
- type MarkOfNode = Mark | Node;
5
- export declare function getHtmlAttributes(extension: MarkOfNode, node: ProseMirrorNode): Record<string, any>;
6
- export declare function setHtmlAttributes(extension: MarkOfNode, element: HTMLElement): Record<string, any>;
7
- export declare function addAttributesToSchema(spec: MarkSpec | NodeSpec, extension: MarkOfNode): void;
8
- export {};
9
- //# sourceMappingURL=getHtmlAttributes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getHtmlAttributes.d.ts","sourceRoot":"","sources":["../../../../src/editor/src/utilities/getHtmlAttributes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,IAAI,IAAI,eAAe,EACvB,QAAQ,EACT,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC,KAAK,UAAU,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9B,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,UAAU,EACrB,IAAI,EAAE,eAAe,uBAmBtB;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,uBAc5E;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,QAAQ,GAAG,QAAQ,EACzB,SAAS,EAAE,UAAU,QAetB"}
@@ -1,47 +0,0 @@
1
- export function getHtmlAttributes(extension, node) {
2
- const attrs = {};
3
- if (extension.attributes) {
4
- for (const [key, value] of Object.entries(extension.attributes)) {
5
- if ('undefined' !== typeof node.attrs[key]) {
6
- attrs[key] = node.attrs[key];
7
- }
8
- else {
9
- if (value.toDom) {
10
- attrs[key] = value.toDom(node);
11
- }
12
- else {
13
- attrs[key] = value.default;
14
- }
15
- }
16
- }
17
- }
18
- return attrs;
19
- }
20
- export function setHtmlAttributes(extension, element) {
21
- const attrs = {};
22
- if (extension.attributes) {
23
- for (const [key, value] of Object.entries(extension.attributes)) {
24
- if (value.fromDom) {
25
- attrs[key] = value.fromDom(element);
26
- }
27
- else {
28
- attrs[key] = value.default;
29
- }
30
- }
31
- }
32
- return attrs;
33
- }
34
- export function addAttributesToSchema(spec, extension) {
35
- const attrs = {};
36
- if (extension.attributes) {
37
- if (!spec.attrs) {
38
- spec.attrs = {};
39
- }
40
- for (const [key, value] of Object.entries(extension.attributes)) {
41
- spec.attrs[key] = value;
42
- if (!value.toDom) {
43
- value.toDom = (node) => node.attrs[key];
44
- }
45
- }
46
- }
47
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"EditorContent.d.ts","sourceRoot":"","sources":["../../../src/editor-react/src/EditorContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAKN,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,WAAW,kBAAkB;IACjC,yCAAyC;IACzC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IAC1B,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,MAAM,WAAW,gBAAgB;IAC/B,gCAAgC;IAChC,UAAU,EAAE,MAAM,cAAc,GAAG,IAAI,CAAC;CACzC;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,6FAkCzB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/editor-react/src/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EACL,aAAa,EACb,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,GACtB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useEditor.d.ts","sourceRoot":"","sources":["../../../src/editor-react/src/useEditor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAA+B,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;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