@omnia/fx 8.0.264-dev → 8.0.266-dev

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. package/internal-do-not-import-from-here/manifests/omnia.fx.manifest.json +1 -1
  2. package/internal-do-not-import-from-here/stores/{markdown/MarkdownPluginStore.d.ts → floweditor/FlowEditorPluginStore.d.ts} +12 -11
  3. package/internal-do-not-import-from-here/stores/{markdown/MarkdownToolbarStateStore.d.ts → floweditor/FlowEditorToolbarStateStore.d.ts} +1 -1
  4. package/internal-do-not-import-from-here/stores/floweditor/index.d.ts +2 -0
  5. package/internal-do-not-import-from-here/stores/index.d.ts +1 -1
  6. package/internal-do-not-import-from-here/ux/appprovisioning/appimageinput/AppImageInput.d.ts +4 -0
  7. package/internal-do-not-import-from-here/ux/aurora/designkits/default/DefinitionRegistrations.d.ts +0 -1
  8. package/internal-do-not-import-from-here/ux/aurora/designkits/pages/DefinitionRegistrations.d.ts +0 -1
  9. package/internal-do-not-import-from-here/ux/aurora/store/SpacingBlueprintStore.d.ts +36 -0
  10. package/internal-do-not-import-from-here/ux/aurora/store/TypographyBlueprintStore.d.ts +36 -0
  11. package/internal-do-not-import-from-here/ux/features/FeatureActivation.d.ts +3 -14
  12. package/internal-do-not-import-from-here/ux/features/models/FeatureAction.d.ts +3 -0
  13. package/internal-do-not-import-from-here/ux/features/models/VDataGridItemScopedSlot.d.ts +13 -0
  14. package/internal-do-not-import-from-here/ux/features/models/index.d.ts +2 -0
  15. package/internal-do-not-import-from-here/ux/features/shared/FeatureActions.d.ts +2 -0
  16. package/internal-do-not-import-from-here/ux/features/shared/index.d.ts +1 -0
  17. package/internal-do-not-import-from-here/ux/features/stores/FeatureJourneyStore.d.ts +2 -3
  18. package/internal-do-not-import-from-here/ux/floweditor/FlowEditor.css.d.ts +6 -0
  19. package/internal-do-not-import-from-here/ux/{markdown2/MarkdownEditorFuture.d.ts → floweditor/FlowEditor.d.ts} +4 -4
  20. package/internal-do-not-import-from-here/ux/{markdown2/MarkdownToolbar.css.d.ts → floweditor/FlowEditorToolbar.css.d.ts} +1 -1
  21. package/internal-do-not-import-from-here/ux/floweditor/commands/EditorCommands.d.ts +99 -0
  22. package/internal-do-not-import-from-here/ux/floweditor/commands/helpers/EditorNodeHelper.d.ts +6 -0
  23. package/internal-do-not-import-from-here/ux/floweditor/commands/helpers/Editorhelper.d.ts +15 -0
  24. package/internal-do-not-import-from-here/ux/floweditor/commands/helpers/HtmlNodehelper.d.ts +25 -0
  25. package/internal-do-not-import-from-here/ux/floweditor/models/Constants.d.ts +14 -0
  26. package/internal-do-not-import-from-here/ux/floweditor/models/EditorModels.d.ts +21 -0
  27. package/internal-do-not-import-from-here/ux/floweditor/models/EditorPlugin.d.ts +40 -0
  28. package/internal-do-not-import-from-here/ux/floweditor/parsers/HtmlParser.d.ts +8 -0
  29. package/internal-do-not-import-from-here/ux/floweditor/parsers/JSONParser.d.ts +8 -0
  30. package/internal-do-not-import-from-here/ux/{markdown2 → floweditor}/plugins/DefineEditorPlugin.d.ts +2 -2
  31. package/internal-do-not-import-from-here/ux/{markdown2 → floweditor}/plugins/bold/BoldPlugin.d.ts +1 -1
  32. package/internal-do-not-import-from-here/ux/{markdown2 → floweditor}/plugins/colorstyle/ColorButton.d.ts +2 -2
  33. package/internal-do-not-import-from-here/ux/{markdown2 → floweditor}/plugins/colorstyle/ColorStylePlugin.d.ts +1 -1
  34. package/internal-do-not-import-from-here/ux/floweditor/plugins/elements/ElementPlugin.d.ts +7 -0
  35. package/internal-do-not-import-from-here/ux/floweditor/plugins/eventhandlers/EditorEvents.d.ts +4 -0
  36. package/internal-do-not-import-from-here/ux/floweditor/plugins/eventhandlers/KeyboardEvents.d.ts +4 -0
  37. package/internal-do-not-import-from-here/ux/floweditor/plugins/eventhandlers/handlers/BackspaceHandler.d.ts +4 -0
  38. package/internal-do-not-import-from-here/ux/floweditor/plugins/eventhandlers/handlers/ClipboardHandler.d.ts +4 -0
  39. package/internal-do-not-import-from-here/ux/floweditor/plugins/eventhandlers/handlers/EnterHandler.d.ts +4 -0
  40. package/internal-do-not-import-from-here/ux/{markdown2 → floweditor}/plugins/italic/ItalicPlugin.d.ts +1 -1
  41. package/internal-do-not-import-from-here/ux/floweditor/plugins/sourceeditor/SourceEditorPlugin.d.ts +4 -0
  42. package/internal-do-not-import-from-here/ux/floweditor/plugins/testdata/TestDataPlugin.d.ts +4 -0
  43. package/internal-do-not-import-from-here/ux/floweditor/plugins/text/TextPlugin.d.ts +3 -0
  44. package/internal-do-not-import-from-here/ux/{markdown2 → floweditor}/plugins/typography/TypographyButton.d.ts +2 -2
  45. package/internal-do-not-import-from-here/ux/{markdown2 → floweditor}/plugins/typography/TypographyPlugin.d.ts +1 -1
  46. package/internal-do-not-import-from-here/ux/{markdown2 → floweditor}/plugins/velcron/VelcronPlugin.d.ts +3 -3
  47. package/internal-do-not-import-from-here/ux/floweditor/rules/EditorRules.d.ts +7 -0
  48. package/internal-do-not-import-from-here/ux/floweditor/stores/FlowEditorStore.d.ts +370 -0
  49. package/internal-do-not-import-from-here/ux/floweditor/stores/FlowEditorToolbarStore.d.ts +1901 -0
  50. package/internal-do-not-import-from-here/ux/hub/feed/definitions/CommunityUpdate.d.ts +0 -2
  51. package/internal-do-not-import-from-here/ux/hub/feed/definitions/DefinitionRegistrations.d.ts +0 -1
  52. package/internal-do-not-import-from-here/ux/hub/feed/definitions/DocumentReview.d.ts +0 -2
  53. package/internal-do-not-import-from-here/ux/hub/feed/definitions/NewsArticleTemplate.d.ts +0 -2
  54. package/internal-do-not-import-from-here/ux/hub/feed/definitions/QuickPoll.d.ts +0 -2
  55. package/internal-do-not-import-from-here/ux/hub/feed/definitions/Reach.d.ts +0 -2
  56. package/internal-do-not-import-from-here/ux/hub/feed/definitions/UpdatedProcess.d.ts +0 -2
  57. package/internal-do-not-import-from-here/ux/identities/loc/Localize.d.ts +1 -0
  58. package/internal-do-not-import-from-here/ux/markdown/stores/MarkdownEditorStore.d.ts +7 -7
  59. package/internal-do-not-import-from-here/ux/oxide/select/Select.d.ts +1 -1
  60. package/internal-do-not-import-from-here/ux/properties/builtins/identity/IdentityDisplay.d.ts +1 -1
  61. package/internal-do-not-import-from-here/ux/properties/builtins/tags/TagsDisplay.d.ts +4 -1
  62. package/internal-do-not-import-from-here/ux/properties/property-picker/PropertyPicker.d.ts +18 -1
  63. package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew/stores/ContentEditorStore.d.ts +5 -5
  64. package/internal-do-not-import-from-here/ux/velcron/components/definitionpicker/VelcronDefinitionPicker.d.ts +5 -1
  65. package/internal-do-not-import-from-here/ux/velcron/core/models/VelcronDefinitions.d.ts +5 -5
  66. package/internal-do-not-import-from-here/ux/velcron/core/models/VelcronPropertyEditorDefinitions.d.ts +3 -3
  67. package/internal-do-not-import-from-here/ux/velcron/core/parser/VelcronConstants.d.ts +1 -1
  68. package/internal-do-not-import-from-here/ux/velcron/core/templatebuilder/VelcronEditorBuilder.d.ts +1 -1
  69. package/internal-do-not-import-from-here/ux/velcron/{components/contenteditor/models → definitions}/VelcronDefinitionIds.d.ts +1 -1
  70. package/internal-do-not-import-from-here/ux/velcron/definitions/index.d.ts +1 -1
  71. package/internal-do-not-import-from-here/ux/velcron/editor/models/ComponentDescriptors.d.ts +1 -1
  72. package/internal-do-not-import-from-here/ux/velcron/editor/stores/VelcronEditorStore.d.ts +7 -7
  73. package/internal-do-not-import-from-here/ux/velcron/renderer/components/{Markdown.d.ts → Flow.d.ts} +6 -6
  74. package/internal-do-not-import-from-here/ux/velcron/renderer/components/Property.d.ts +5 -5
  75. package/internal-do-not-import-from-here/ux/velcron/renderer/editors/MarkdownEditor.d.ts +6 -6
  76. package/internal-do-not-import-from-here/ux/velcron/renderer/editors/PropertyResolverEditor.d.ts +5 -5
  77. package/internal-do-not-import-from-here/ux/velcron/stores/VelcronDefinitionStore.d.ts +47 -7
  78. package/internal-do-not-import-from-here/wctypings.d.ts +10 -32
  79. package/package.json +2 -2
  80. package/internal-do-not-import-from-here/stores/markdown/index.d.ts +0 -2
  81. package/internal-do-not-import-from-here/ux/markdown2/MarkdownEditorFuture.css.d.ts +0 -6
  82. package/internal-do-not-import-from-here/ux/markdown2/commands/ClipboardCommands.d.ts +0 -4
  83. package/internal-do-not-import-from-here/ux/markdown2/commands/EditorCommands.d.ts +0 -52
  84. package/internal-do-not-import-from-here/ux/markdown2/commands/helpers/EditorNodeHelper.d.ts +0 -5
  85. package/internal-do-not-import-from-here/ux/markdown2/commands/helpers/Editorhelper.d.ts +0 -7
  86. package/internal-do-not-import-from-here/ux/markdown2/commands/helpers/HtmlNodehelper.d.ts +0 -9
  87. package/internal-do-not-import-from-here/ux/markdown2/markdowntester/MarkdownTester.css.d.ts +0 -6
  88. package/internal-do-not-import-from-here/ux/markdown2/markdowntester/MarkdownTester.d.ts +0 -16
  89. package/internal-do-not-import-from-here/ux/markdown2/models/EditorModels.d.ts +0 -21
  90. package/internal-do-not-import-from-here/ux/markdown2/models/EditorPlugin.d.ts +0 -18
  91. package/internal-do-not-import-from-here/ux/markdown2/parsers/HtmlParser.d.ts +0 -8
  92. package/internal-do-not-import-from-here/ux/markdown2/parsers/JSONParser.d.ts +0 -8
  93. package/internal-do-not-import-from-here/ux/markdown2/parsers/markdownparser_old/MarkdownParser_engine.d.ts +0 -0
  94. package/internal-do-not-import-from-here/ux/markdown2/parsers/markdownparser_old/component.d.ts +0 -0
  95. package/internal-do-not-import-from-here/ux/markdown2/parsers/markdownparser_old/tags.d.ts +0 -0
  96. package/internal-do-not-import-from-here/ux/markdown2/parsers/markdownparser_old/textParser.d.ts +0 -0
  97. package/internal-do-not-import-from-here/ux/markdown2/plugins/sourceeditor/SourceEditorPlugin.d.ts +0 -3
  98. package/internal-do-not-import-from-here/ux/markdown2/plugins/testdata/TestDataPlugin.d.ts +0 -3
  99. package/internal-do-not-import-from-here/ux/markdown2/plugins/text/TextPlugin.d.ts +0 -7
  100. package/internal-do-not-import-from-here/ux/markdown2/stores/MarkdownStore.d.ts +0 -200
  101. package/internal-do-not-import-from-here/ux/markdown2/stores/MarkdownToolbarStore.d.ts +0 -1051
  102. package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/VelcronContentEditor.css.d.ts +0 -6
  103. package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/VelcronContentEditor.d.ts +0 -949
  104. package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/definitions/content/Quote.d.ts +0 -2
  105. package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/definitions/index.d.ts +0 -2
  106. package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/definitions/social/Image.d.ts +0 -2
  107. package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/definitions/social/MicroBlog.d.ts +0 -3
  108. package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/definitions/social/MicroBlog2.d.ts +0 -3
  109. package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/definitions/social/Praise.d.ts +0 -2
  110. package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/definitions/social/SocialText.d.ts +0 -2
  111. package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/definitions/social/index.d.ts +0 -4
  112. package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/models/ContentDefinitionRegistration.d.ts +0 -9
  113. package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/models/index.d.ts +0 -2
  114. package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/stores/ContentEditorStore.d.ts +0 -180
  115. package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew/definitions/index.d.ts +0 -1
  116. package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/VelcronContentEditor.css.d.ts +0 -5
  117. package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/VelcronContentEditor.d.ts +0 -1133
  118. package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/VelcronContentRenderer.d.ts +0 -80
  119. package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/components/ActionMenu.css.d.ts +0 -4
  120. package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/components/ActionMenu.d.ts +0 -11
  121. package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/components/BorderSelector copy.d.ts +0 -11
  122. package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/components/BorderSelector.css.d.ts +0 -12
  123. package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/components/BorderSelector.d.ts +0 -11
  124. package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/components/DefinitionToolbar copy.d.ts +0 -14
  125. package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/components/DefinitionToolbar.css.d.ts +0 -4
  126. package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/components/DefinitionToolbar.d.ts +0 -14
  127. package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/definitions/DefinitionRegistrations.d.ts +0 -1
  128. package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/definitions/index.d.ts +0 -1
  129. package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/editorHooks/ContentEditorHooks.css.d.ts +0 -6
  130. package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/editorHooks/ContentEditorHooks.d.ts +0 -2
  131. package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/models/EditorRenderingHooks.d.ts +0 -24
  132. package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/models/index.d.ts +0 -1
  133. package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/stores/ContentEditorStore.d.ts +0 -222
  134. /package/internal-do-not-import-from-here/ux/{markdown2/MarkdownToolbar.d.ts → floweditor/FlowEditorToolbar.d.ts} +0 -0
  135. /package/internal-do-not-import-from-here/ux/{markdown2 → floweditor}/PluginRegistrationHandler.d.ts +0 -0
  136. /package/internal-do-not-import-from-here/ux/{markdown2 → floweditor}/plugins/registrations/PluginRegistrations.d.ts +0 -0
  137. /package/internal-do-not-import-from-here/ux/{markdown2 → floweditor}/plugins/sourceeditor/SourceEditorButton.d.ts +0 -0
  138. /package/internal-do-not-import-from-here/ux/{aurora/RegistrationHandlerDefinitions.d.ts → velcron/apis/VelcronCategoriesHandler.d.ts} +0 -0
  139. /package/internal-do-not-import-from-here/ux/velcron/{components/contenteditor/DefinitionRegistrations.d.ts → apis/VelcronDefinitionsHandler.d.ts} +0 -0
  140. /package/internal-do-not-import-from-here/ux/velcron/{registrations → definitions}/CategoryRegistrations.d.ts +0 -0
  141. /package/internal-do-not-import-from-here/ux/velcron/{components/contenteditor/definitions → definitions}/content/Image.d.ts +0 -0
  142. /package/internal-do-not-import-from-here/ux/velcron/{components/contenteditor/definitions → definitions}/content/ImageText.d.ts +0 -0
  143. /package/internal-do-not-import-from-here/ux/velcron/{components/contenteditorNew/definitions/DefinitionRegistrations.d.ts → definitions/content/Quote.d.ts} +0 -0
  144. /package/internal-do-not-import-from-here/ux/velcron/{components/contenteditor/definitions → definitions}/content/Text.d.ts +0 -0
  145. /package/internal-do-not-import-from-here/ux/velcron/{components/contenteditor/definitions → definitions}/content/index.d.ts +0 -0
  146. /package/internal-do-not-import-from-here/ux/{aurora/designkits/default/definitions/content → velcron/definitions/social}/Image.d.ts +0 -0
  147. /package/internal-do-not-import-from-here/ux/{aurora/designkits/default/definitions/content/ImageText.d.ts → velcron/definitions/social/MicroBlog.d.ts} +0 -0
  148. /package/internal-do-not-import-from-here/ux/{aurora/designkits/default/definitions/content/Quote.d.ts → velcron/definitions/social/MicroBlog2.d.ts} +0 -0
  149. /package/internal-do-not-import-from-here/ux/{aurora/designkits/default/definitions/content/Text.d.ts → velcron/definitions/social/Praise.d.ts} +0 -0
  150. /package/internal-do-not-import-from-here/ux/{aurora/designkits/default/definitions/content/index.d.ts → velcron/definitions/social/SocialText.d.ts} +0 -0
  151. /package/internal-do-not-import-from-here/ux/{markdown2/parsers/markdownparser_old/MarkdownParser.d.ts → velcron/definitions/social/index.d.ts} +0 -0
@@ -0,0 +1,99 @@
1
+ import { FlowContent, NodeSelection } from "../models/EditorModels";
2
+ import { FlowEditorPlugin, FlowEditorPluginContext } from "../models/EditorPlugin";
3
+ export type builtIndataTypes = "text" | "formatting";
4
+ export declare function useEditorCommands(state: {
5
+ editor: HTMLDivElement;
6
+ selectedRange: Range;
7
+ maxNodeId: number;
8
+ editorContent: FlowContent;
9
+ nodeSelection: NodeSelection;
10
+ plugins: Array<FlowEditorPlugin>;
11
+ pluginContext: FlowEditorPluginContext;
12
+ }): {
13
+ content: {
14
+ convert: (element: HTMLElement) => void;
15
+ };
16
+ ensure: {
17
+ lastElement: () => void;
18
+ unique: {
19
+ ids: (element: HTMLElement) => void;
20
+ };
21
+ };
22
+ selection: {
23
+ get: {
24
+ byPluginType: (pluginType: string) => import("../models/EditorModels").FlowNodeReference[];
25
+ };
26
+ };
27
+ cursor: {
28
+ isAfterEndOfContent: (range: Range, container: HTMLElement) => boolean;
29
+ isBeforeContent: (range: Range, container: HTMLElement) => boolean;
30
+ };
31
+ actions: {
32
+ setSelection: () => void;
33
+ };
34
+ formatting: {
35
+ add: (element: HTMLElement) => void;
36
+ remove: (dataType: string | HTMLElement) => void;
37
+ has: (dataType: string | HTMLElement) => boolean;
38
+ };
39
+ element: {
40
+ clean: (element: HTMLElement) => void;
41
+ add: (element: HTMLElement) => void;
42
+ create: (tagName: string, dataType: builtIndataTypes | string) => HTMLElement;
43
+ createText: () => HTMLParagraphElement;
44
+ createTextNode: (data: any) => Text;
45
+ createComponent: (componentName: string) => HTMLDivElement;
46
+ insert: {
47
+ text: (element: Node, text: string, offset: any) => void;
48
+ };
49
+ ids: {
50
+ unique: (element: HTMLElement) => void;
51
+ };
52
+ };
53
+ helpers: {
54
+ editor: {
55
+ ensure: {
56
+ uniqueIds: (element: HTMLElement, state: {
57
+ maxNodeId: number;
58
+ }) => HTMLElement;
59
+ selectionIsInEditor: (range: Range) => void;
60
+ };
61
+ cursor: {
62
+ storePosition: (state: {
63
+ selectedRange: Range;
64
+ }) => void;
65
+ isAfterEndOfContent: (range: Range, container: HTMLElement) => boolean;
66
+ isBeforeContent: (range: Range, container: HTMLElement) => boolean;
67
+ };
68
+ };
69
+ editorNode: {
70
+ get: {
71
+ nodesInArrayByPluginType: (nodes: Array<import("../models/EditorModels").FlowNodeReference>, dataType: string) => Array<import("../models/EditorModels").FlowNodeReference>;
72
+ };
73
+ };
74
+ htmlNode: {
75
+ copy: {
76
+ children: (from: HTMLElement, to: HTMLElement) => void;
77
+ };
78
+ insert: {
79
+ text: (element: Node, text: string, offset: any) => void;
80
+ elementInContainer: (element: HTMLElement, container: HTMLElement) => void;
81
+ };
82
+ get: {
83
+ topContainerForContent: (element: HTMLElement) => HTMLElement;
84
+ nodeSelectionForRange: (range: Range) => NodeSelection;
85
+ htmlElementInStructureById: (id: number, currentElement: HTMLElement) => HTMLElement;
86
+ };
87
+ remove: {
88
+ nodes: (nodes2Remove: Array<import("../models/EditorModels").FlowNodeReference>, editor: HTMLElement) => void;
89
+ };
90
+ strip: {
91
+ after: (element: HTMLElement, splitter: string) => void;
92
+ before: (element: HTMLElement, splitter: string) => void;
93
+ };
94
+ surround: {
95
+ selectionWithElement: (element: HTMLElement, range: Range) => void;
96
+ };
97
+ };
98
+ };
99
+ };
@@ -0,0 +1,6 @@
1
+ import { FlowNodeReference } from "../../models/EditorModels";
2
+ export declare function useEditorNodeHelper(): {
3
+ get: {
4
+ nodesInArrayByPluginType: (nodes: Array<FlowNodeReference>, dataType: string) => Array<FlowNodeReference>;
5
+ };
6
+ };
@@ -0,0 +1,15 @@
1
+ export declare function useEditorHelper(): {
2
+ ensure: {
3
+ uniqueIds: (element: HTMLElement, state: {
4
+ maxNodeId: number;
5
+ }) => HTMLElement;
6
+ selectionIsInEditor: (range: Range) => void;
7
+ };
8
+ cursor: {
9
+ storePosition: (state: {
10
+ selectedRange: Range;
11
+ }) => void;
12
+ isAfterEndOfContent: (range: Range, container: HTMLElement) => boolean;
13
+ isBeforeContent: (range: Range, container: HTMLElement) => boolean;
14
+ };
15
+ };
@@ -0,0 +1,25 @@
1
+ import { FlowNodeReference, NodeSelection } from "../../models/EditorModels";
2
+ export declare function useHtmlNodeHelper(): {
3
+ copy: {
4
+ children: (from: HTMLElement, to: HTMLElement) => void;
5
+ };
6
+ insert: {
7
+ text: (element: Node, text: string, offset: any) => void;
8
+ elementInContainer: (element: HTMLElement, container: HTMLElement) => void;
9
+ };
10
+ get: {
11
+ topContainerForContent: (element: HTMLElement) => HTMLElement;
12
+ nodeSelectionForRange: (range: Range) => NodeSelection;
13
+ htmlElementInStructureById: (id: number, currentElement: HTMLElement) => HTMLElement;
14
+ };
15
+ remove: {
16
+ nodes: (nodes2Remove: Array<FlowNodeReference>, editor: HTMLElement) => void;
17
+ };
18
+ strip: {
19
+ after: (element: HTMLElement, splitter: string) => void;
20
+ before: (element: HTMLElement, splitter: string) => void;
21
+ };
22
+ surround: {
23
+ selectionWithElement: (element: HTMLElement, range: Range) => void;
24
+ };
25
+ };
@@ -0,0 +1,14 @@
1
+ export declare const FlowEditorConstants: {
2
+ node: {
3
+ attributes: {
4
+ pluginType: string;
5
+ Id: string;
6
+ };
7
+ };
8
+ editor: {
9
+ container: string;
10
+ };
11
+ clipboard: {
12
+ container: string;
13
+ };
14
+ };
@@ -0,0 +1,21 @@
1
+ export interface FlowContent {
2
+ version: string;
3
+ nodes: FlowNode[];
4
+ }
5
+ export interface FlowNode {
6
+ type: string;
7
+ children?: FlowNode[];
8
+ }
9
+ export interface FlowTextNode extends FlowNode {
10
+ value?: string;
11
+ }
12
+ export interface FlowNodeReference {
13
+ type: string;
14
+ id: number;
15
+ element: HTMLElement;
16
+ }
17
+ export interface NodeSelection {
18
+ commonAncestorContainer: FlowNodeReference;
19
+ formatters: FlowNodeReference[];
20
+ nodes: FlowNodeReference[];
21
+ }
@@ -0,0 +1,40 @@
1
+ import { FlowEditorActionRegistration } from "@omnia/fx-models";
2
+ import { FlowNode } from "./EditorModels";
3
+ import { useFlowEditorStore } from "../stores/FlowEditorStore";
4
+ import { useFlowEditorToolbarStore } from "../stores/FlowEditorToolbarStore";
5
+ export interface FlowEditorPlugin {
6
+ name: string;
7
+ commands?: object;
8
+ eventListeners?: Array<FlowEditorEventListener>;
9
+ actions?: Array<FlowEditorActionRegistration>;
10
+ }
11
+ export interface FlowEditorEventListener {
12
+ event?: keyof HTMLElementEventMap | Array<keyof HTMLElementEventMap>;
13
+ action: (event: Event, context: FlowEditorPluginContext) => void;
14
+ }
15
+ export interface FlowRenderingContext {
16
+ parentElement: HTMLElement;
17
+ }
18
+ export interface FlowToHtmlContext {
19
+ node: FlowNode;
20
+ pluginContext: FlowEditorPluginContext;
21
+ renderingContext: FlowRenderingContext;
22
+ }
23
+ export interface FlowToJsonContext {
24
+ element: HTMLElement;
25
+ parent: FlowNode;
26
+ }
27
+ export interface ElementConverter {
28
+ canConvert: (el: HTMLElement) => boolean;
29
+ convert: (el: HTMLElement, pluginContext: FlowEditorPluginContext) => HTMLElement;
30
+ }
31
+ export interface FlowEditorContentPlugin extends FlowEditorPlugin {
32
+ toJSON: (context: FlowToJsonContext) => FlowNode;
33
+ toHtml: (context: FlowToHtmlContext) => HTMLElement;
34
+ elementConverter?: ElementConverter;
35
+ }
36
+ export interface FlowEditorPluginContext {
37
+ componentCreator?: (componentDef: any, props: {}, el: HTMLElement) => void;
38
+ editorStore: ReturnType<typeof useFlowEditorStore>;
39
+ toolbarStore: ReturnType<typeof useFlowEditorToolbarStore>;
40
+ }
@@ -0,0 +1,8 @@
1
+ import { FlowEditorPlugin } from "../models/EditorPlugin";
2
+ import { FlowContent } from "../models/EditorModels";
3
+ export declare function useHtmlParser(state: {
4
+ editor: HTMLDivElement;
5
+ plugins: Array<FlowEditorPlugin>;
6
+ }): {
7
+ toJSON: () => FlowContent;
8
+ };
@@ -0,0 +1,8 @@
1
+ import { FlowContent } from "../models/EditorModels";
2
+ import { FlowEditorPlugin, FlowEditorPluginContext } from "../models/EditorPlugin";
3
+ export declare function useJSONParser(state: {
4
+ editor: HTMLDivElement;
5
+ plugins: Array<FlowEditorPlugin>;
6
+ }, pluginContext: FlowEditorPluginContext): {
7
+ loadJSONToEditor: (editorContent: FlowContent) => any;
8
+ };
@@ -1,8 +1,8 @@
1
1
  import { SetupFactoryContext } from "@omnia/fx";
2
- import { EditorFormattingPlugin, EditorPlugin } from "../models/EditorPlugin";
2
+ import { FlowEditorContentPlugin, FlowEditorPlugin } from "../models/EditorPlugin";
3
3
  interface SetupEditorPluginContext extends SetupFactoryContext {
4
4
  }
5
- export declare function defineEditorPlugin<TArgs extends any[]>(setup: (ctx: SetupEditorPluginContext) => EditorPlugin | EditorFormattingPlugin): () => EditorPlugin & {
5
+ export declare function defineEditorPlugin<TArgs extends any[]>(setup: (ctx: SetupEditorPluginContext) => FlowEditorPlugin | FlowEditorContentPlugin): () => FlowEditorPlugin & {
6
6
  dispose?: () => void;
7
7
  };
8
8
  export {};
@@ -1,3 +1,3 @@
1
- export declare const boldPlugin: () => import("../../models/EditorPlugin").EditorPlugin & {
1
+ export declare const boldPlugin: () => import("../../models/EditorPlugin").FlowEditorPlugin & {
2
2
  dispose?: () => void;
3
3
  };
@@ -1,6 +1,6 @@
1
1
  import { ColorValue } from "@omnia/fx-models";
2
- import { ContentNode } from "../../models/EditorModels";
3
- export interface ColorFormatNode extends ContentNode {
2
+ import { FlowNode } from "../../models/EditorModels";
3
+ export interface ColorFormatNode extends FlowNode {
4
4
  data: ColorValue;
5
5
  }
6
6
  declare const _default: (props: import("@omnia/fx/ux").ConstructComponentProps<{}>) => any;
@@ -1,3 +1,3 @@
1
- export declare const colorStylePlugin: () => import("../../models/EditorPlugin").EditorPlugin & {
1
+ export declare const colorStylePlugin: () => import("../../models/EditorPlugin").FlowEditorPlugin & {
2
2
  dispose?: () => void;
3
3
  };
@@ -0,0 +1,7 @@
1
+ import { FlowNode } from "../../models/EditorModels";
2
+ export interface ElementNode extends FlowNode {
3
+ name: "br";
4
+ }
5
+ export declare const elementPlugin: () => import("../../models/EditorPlugin").FlowEditorPlugin & {
6
+ dispose?: () => void;
7
+ };
@@ -0,0 +1,4 @@
1
+ import { FlowEditorPlugin } from "../../models/EditorPlugin";
2
+ export declare const editorEventsPlugin: () => FlowEditorPlugin & {
3
+ dispose?: () => void;
4
+ };
@@ -0,0 +1,4 @@
1
+ import { FlowEditorPlugin } from "../../models/EditorPlugin";
2
+ export declare const keyboardEventsPlugin: () => FlowEditorPlugin & {
3
+ dispose?: () => void;
4
+ };
@@ -0,0 +1,4 @@
1
+ import { useFlowEditorStore } from "../../../stores/FlowEditorStore";
2
+ export declare function useBackspaceHandler(): {
3
+ handle: (store: ReturnType<typeof useFlowEditorStore>) => void;
4
+ };
@@ -0,0 +1,4 @@
1
+ import { useFlowEditorStore } from "../../../stores/FlowEditorStore";
2
+ export declare function useClipboardHandler(): {
3
+ paste: (ev: ClipboardEvent, editorStore: ReturnType<typeof useFlowEditorStore>) => void;
4
+ };
@@ -0,0 +1,4 @@
1
+ import { useFlowEditorStore } from "../../../stores/FlowEditorStore";
2
+ export declare function useEnterHandler(): {
3
+ handle: (store: ReturnType<typeof useFlowEditorStore>) => void;
4
+ };
@@ -1,3 +1,3 @@
1
- export declare const italicPlugin: () => import("../../models/EditorPlugin").EditorPlugin & {
1
+ export declare const italicPlugin: () => import("../../models/EditorPlugin").FlowEditorPlugin & {
2
2
  dispose?: () => void;
3
3
  };
@@ -0,0 +1,4 @@
1
+ import { FlowEditorPlugin } from "../../models/EditorPlugin";
2
+ export declare const sourceEditorPlugin: () => FlowEditorPlugin & {
3
+ dispose?: () => void;
4
+ };
@@ -0,0 +1,4 @@
1
+ import { FlowEditorPlugin } from "../../models/EditorPlugin";
2
+ export declare const testDataPlugin: () => FlowEditorPlugin & {
3
+ dispose?: () => void;
4
+ };
@@ -0,0 +1,3 @@
1
+ export declare const textPlugin: () => import("../../models/EditorPlugin").FlowEditorPlugin & {
2
+ dispose?: () => void;
3
+ };
@@ -1,6 +1,6 @@
1
1
  import { TypographyValue } from "@omnia/fx-models";
2
- import { ContentNode } from "../../models/EditorModels";
3
- export interface TypographyFormatNode extends ContentNode {
2
+ import { FlowNode } from "../../models/EditorModels";
3
+ export interface TypographyFormatNode extends FlowNode {
4
4
  data: TypographyValue;
5
5
  }
6
6
  declare const _default: (props: import("@omnia/fx/ux").ConstructComponentProps<{}>) => any;
@@ -1,3 +1,3 @@
1
- export declare const typographyPlugin: () => import("../../models/EditorPlugin").EditorPlugin & {
1
+ export declare const typographyPlugin: () => import("../../models/EditorPlugin").FlowEditorPlugin & {
2
2
  dispose?: () => void;
3
3
  };
@@ -1,8 +1,8 @@
1
1
  import { VelcronAppDefinition } from "@omnia/fx-models";
2
- import { ContentNode } from "../../models/EditorModels";
3
- export interface VelcronContentNode extends ContentNode {
2
+ import { FlowNode } from "../../models/EditorModels";
3
+ export interface VelcronContentNode extends FlowNode {
4
4
  definition: VelcronAppDefinition;
5
5
  }
6
- export declare const velcronRendererPlugin: () => import("../../models/EditorPlugin").EditorPlugin & {
6
+ export declare const velcronRendererPlugin: () => import("../../models/EditorPlugin").FlowEditorPlugin & {
7
7
  dispose?: () => void;
8
8
  };
@@ -0,0 +1,7 @@
1
+ export declare function useFlowEditorRules(): {
2
+ is: {
3
+ topContainer: (node: HTMLElement) => boolean;
4
+ editorNode: (node: HTMLElement) => boolean;
5
+ clipboardContainer: (node: HTMLElement) => boolean;
6
+ };
7
+ };