testomatio-editor-blocks 0.1.2 → 0.2.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 (36) hide show
  1. package/README.md +13 -6
  2. package/package/editor/blocks/markdown.d.ts +5 -0
  3. package/package/editor/blocks/markdown.js +160 -0
  4. package/package/editor/blocks/snippet.d.ts +38 -0
  5. package/package/editor/blocks/snippet.js +65 -0
  6. package/package/editor/blocks/step.d.ts +32 -0
  7. package/package/editor/blocks/step.js +97 -0
  8. package/package/editor/blocks/stepField.d.ts +26 -0
  9. package/package/editor/blocks/stepField.js +316 -0
  10. package/package/editor/customMarkdownConverter.js +111 -80
  11. package/package/editor/customSchema.d.ts +31 -45
  12. package/package/editor/customSchema.js +6 -616
  13. package/package/editor/snippetAutocomplete.d.ts +28 -0
  14. package/package/editor/snippetAutocomplete.js +94 -0
  15. package/package/editor/stepAutocomplete.d.ts +1 -1
  16. package/package/editor/stepAutocomplete.js +1 -1
  17. package/package/index.d.ts +1 -1
  18. package/package/index.js +1 -1
  19. package/package/styles.css +57 -0
  20. package/package.json +1 -1
  21. package/src/App.tsx +143 -41
  22. package/src/editor/blocks/blocks.test.ts +22 -0
  23. package/src/editor/blocks/markdown.ts +199 -0
  24. package/src/editor/blocks/snippet.tsx +109 -0
  25. package/src/editor/blocks/step.tsx +175 -0
  26. package/src/editor/blocks/stepField.tsx +487 -0
  27. package/src/editor/customMarkdownConverter.test.ts +121 -36
  28. package/src/editor/customMarkdownConverter.ts +128 -85
  29. package/src/editor/customSchema.tsx +6 -935
  30. package/src/editor/snippetAutocomplete.test.ts +54 -0
  31. package/src/editor/snippetAutocomplete.ts +133 -0
  32. package/src/editor/stepAutocomplete.test.ts +3 -3
  33. package/src/editor/stepAutocomplete.tsx +1 -1
  34. package/src/editor/styles.css +57 -0
  35. package/src/index.ts +1 -1
  36. package/src/editor/customSchema.test.ts +0 -47
@@ -1,84 +1,71 @@
1
1
  import { BlockNoteSchema } from "@blocknote/core";
2
- declare function markdownToHtml(markdown: string): string;
3
- declare function htmlToMarkdown(html: string): string;
4
- declare const statusOptions: readonly ["draft", "ready", "blocked"];
5
- type Status = (typeof statusOptions)[number];
2
+ import { htmlToMarkdown, markdownToHtml } from "./blocks/markdown";
6
3
  export declare const customSchema: BlockNoteSchema<import("@blocknote/core").BlockSchemaFromSpecs<{
7
- testCase: {
4
+ testStep: {
8
5
  config: {
9
- readonly type: "testCase";
10
- readonly content: "inline";
6
+ readonly type: "testStep";
7
+ readonly content: "none";
11
8
  readonly propSchema: {
12
- readonly textAlignment: {
13
- default: "left";
14
- values: readonly ["left", "center", "right", "justify"];
15
- };
16
- readonly textColor: {
17
- default: "default";
18
- };
19
- readonly backgroundColor: {
20
- default: "default";
9
+ readonly stepTitle: {
10
+ readonly default: "";
21
11
  };
22
- readonly status: {
23
- readonly default: Status;
24
- readonly values: ("draft" | "ready" | "blocked")[];
12
+ readonly stepData: {
13
+ readonly default: "";
25
14
  };
26
- readonly reference: {
15
+ readonly expectedResult: {
27
16
  readonly default: "";
28
17
  };
29
18
  };
30
19
  };
31
20
  implementation: import("@blocknote/core").TiptapBlockImplementation<{
32
- readonly type: "testCase";
33
- readonly content: "inline";
21
+ readonly type: "testStep";
22
+ readonly content: "none";
34
23
  readonly propSchema: {
35
- readonly textAlignment: {
36
- default: "left";
37
- values: readonly ["left", "center", "right", "justify"];
38
- };
39
- readonly textColor: {
40
- default: "default";
41
- };
42
- readonly backgroundColor: {
43
- default: "default";
24
+ readonly stepTitle: {
25
+ readonly default: "";
44
26
  };
45
- readonly status: {
46
- readonly default: Status;
47
- readonly values: ("draft" | "ready" | "blocked")[];
27
+ readonly stepData: {
28
+ readonly default: "";
48
29
  };
49
- readonly reference: {
30
+ readonly expectedResult: {
50
31
  readonly default: "";
51
32
  };
52
33
  };
53
34
  }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
54
35
  };
55
- testStep: {
36
+ snippet: {
56
37
  config: {
57
- readonly type: "testStep";
38
+ readonly type: "snippet";
58
39
  readonly content: "none";
59
40
  readonly propSchema: {
60
- readonly stepTitle: {
41
+ readonly snippetId: {
61
42
  readonly default: "";
62
43
  };
63
- readonly stepData: {
44
+ readonly snippetTitle: {
64
45
  readonly default: "";
65
46
  };
66
- readonly expectedResult: {
47
+ readonly snippetData: {
48
+ readonly default: "";
49
+ };
50
+ readonly snippetExpectedResult: {
67
51
  readonly default: "";
68
52
  };
69
53
  };
70
54
  };
71
55
  implementation: import("@blocknote/core").TiptapBlockImplementation<{
72
- readonly type: "testStep";
56
+ readonly type: "snippet";
73
57
  readonly content: "none";
74
58
  readonly propSchema: {
75
- readonly stepTitle: {
59
+ readonly snippetId: {
76
60
  readonly default: "";
77
61
  };
78
- readonly stepData: {
62
+ readonly snippetTitle: {
79
63
  readonly default: "";
80
64
  };
81
- readonly expectedResult: {
65
+ readonly snippetData: {
66
+ readonly default: "";
67
+ };
68
+ readonly snippetExpectedResult: {
82
69
  readonly default: "";
83
70
  };
84
71
  };
@@ -633,4 +620,3 @@ export declare const __markdownTestUtils: {
633
620
  markdownToHtml: typeof markdownToHtml;
634
621
  htmlToMarkdown: typeof htmlToMarkdown;
635
622
  };
636
- export {};