@kerebron/extension-dev-toolkit 0.4.5 → 0.4.7

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 (77) hide show
  1. package/esm/{extension-dev-toolkit/src/mod.d.ts → mod.d.ts} +2 -2
  2. package/esm/mod.d.ts.map +1 -0
  3. package/esm/{extension-dev-toolkit/src/mod.js → mod.js} +1 -1
  4. package/package.json +4 -6
  5. package/esm/editor/src/CoreEditor.d.ts +0 -40
  6. package/esm/editor/src/CoreEditor.d.ts.map +0 -1
  7. package/esm/editor/src/CoreEditor.js +0 -252
  8. package/esm/editor/src/DummyEditorView.d.ts +0 -60
  9. package/esm/editor/src/DummyEditorView.d.ts.map +0 -1
  10. package/esm/editor/src/DummyEditorView.js +0 -277
  11. package/esm/editor/src/Extension.d.ts +0 -31
  12. package/esm/editor/src/Extension.d.ts.map +0 -1
  13. package/esm/editor/src/Extension.js +0 -53
  14. package/esm/editor/src/ExtensionManager.d.ts +0 -32
  15. package/esm/editor/src/ExtensionManager.d.ts.map +0 -1
  16. package/esm/editor/src/ExtensionManager.js +0 -260
  17. package/esm/editor/src/Mark.d.ts +0 -23
  18. package/esm/editor/src/Mark.d.ts.map +0 -1
  19. package/esm/editor/src/Mark.js +0 -51
  20. package/esm/editor/src/Node.d.ts +0 -32
  21. package/esm/editor/src/Node.d.ts.map +0 -1
  22. package/esm/editor/src/Node.js +0 -60
  23. package/esm/editor/src/commands/CommandManager.d.ts +0 -23
  24. package/esm/editor/src/commands/CommandManager.d.ts.map +0 -1
  25. package/esm/editor/src/commands/CommandManager.js +0 -118
  26. package/esm/editor/src/commands/baseCommandFactories.d.ts +0 -3
  27. package/esm/editor/src/commands/baseCommandFactories.d.ts.map +0 -1
  28. package/esm/editor/src/commands/baseCommandFactories.js +0 -836
  29. package/esm/editor/src/commands/createChainableState.d.ts +0 -3
  30. package/esm/editor/src/commands/createChainableState.d.ts.map +0 -1
  31. package/esm/editor/src/commands/createChainableState.js +0 -29
  32. package/esm/editor/src/commands/keyCommandFactories.d.ts +0 -3
  33. package/esm/editor/src/commands/keyCommandFactories.d.ts.map +0 -1
  34. package/esm/editor/src/commands/keyCommandFactories.js +0 -10
  35. package/esm/editor/src/commands/mod.d.ts +0 -7
  36. package/esm/editor/src/commands/mod.d.ts.map +0 -1
  37. package/esm/editor/src/commands/mod.js +0 -76
  38. package/esm/editor/src/commands/replaceCommandFactories.d.ts +0 -3
  39. package/esm/editor/src/commands/replaceCommandFactories.d.ts.map +0 -1
  40. package/esm/editor/src/commands/replaceCommandFactories.js +0 -94
  41. package/esm/editor/src/commands/types.d.ts +0 -18
  42. package/esm/editor/src/commands/types.d.ts.map +0 -1
  43. package/esm/editor/src/commands/types.js +0 -1
  44. package/esm/editor/src/mod.d.ts +0 -9
  45. package/esm/editor/src/mod.d.ts.map +0 -1
  46. package/esm/editor/src/mod.js +0 -8
  47. package/esm/editor/src/nodeToTreeString.d.ts +0 -10
  48. package/esm/editor/src/nodeToTreeString.d.ts.map +0 -1
  49. package/esm/editor/src/nodeToTreeString.js +0 -74
  50. package/esm/editor/src/plugins/TrackSelecionPlugin.d.ts +0 -6
  51. package/esm/editor/src/plugins/TrackSelecionPlugin.d.ts.map +0 -1
  52. package/esm/editor/src/plugins/TrackSelecionPlugin.js +0 -24
  53. package/esm/editor/src/plugins/input-rules/InputRulesPlugin.d.ts +0 -23
  54. package/esm/editor/src/plugins/input-rules/InputRulesPlugin.d.ts.map +0 -1
  55. package/esm/editor/src/plugins/input-rules/InputRulesPlugin.js +0 -163
  56. package/esm/editor/src/plugins/keymap/keymap.d.ts +0 -11
  57. package/esm/editor/src/plugins/keymap/keymap.d.ts.map +0 -1
  58. package/esm/editor/src/plugins/keymap/keymap.js +0 -125
  59. package/esm/editor/src/plugins/keymap/w3c-keyname.d.ts +0 -4
  60. package/esm/editor/src/plugins/keymap/w3c-keyname.d.ts.map +0 -1
  61. package/esm/editor/src/plugins/keymap/w3c-keyname.js +0 -124
  62. package/esm/editor/src/types.d.ts +0 -52
  63. package/esm/editor/src/types.d.ts.map +0 -1
  64. package/esm/editor/src/types.js +0 -1
  65. package/esm/editor/src/ui.d.ts +0 -15
  66. package/esm/editor/src/ui.d.ts.map +0 -1
  67. package/esm/editor/src/ui.js +0 -16
  68. package/esm/editor/src/utilities/SmartOutput.d.ts +0 -41
  69. package/esm/editor/src/utilities/SmartOutput.d.ts.map +0 -1
  70. package/esm/editor/src/utilities/SmartOutput.js +0 -228
  71. package/esm/editor/src/utilities/createNodeFromContent.d.ts +0 -9
  72. package/esm/editor/src/utilities/createNodeFromContent.d.ts.map +0 -1
  73. package/esm/editor/src/utilities/createNodeFromContent.js +0 -32
  74. package/esm/editor/src/utilities/getHtmlAttributes.d.ts +0 -9
  75. package/esm/editor/src/utilities/getHtmlAttributes.d.ts.map +0 -1
  76. package/esm/editor/src/utilities/getHtmlAttributes.js +0 -47
  77. package/esm/extension-dev-toolkit/src/mod.d.ts.map +0 -1
@@ -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":"mod.d.ts","sourceRoot":"","sources":["../../../src/extension-dev-toolkit/src/mod.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,KAAK,UAAU,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGpE,MAAM,WAAW,gBAAgB;CAChC;AAED,qBAAa,mBAAoB,SAAQ,SAAS;cAKjB,MAAM,EAAE,gBAAgB;IAJvD,IAAI,SAAiB;IAErB,OAAO,CAAC,OAAO,CAAS;gBAEO,MAAM,GAAE,gBAAqB;IAInD,mBAAmB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAkBlE,oBAAoB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAM3D"}