@omnia/fx 8.0.264-dev → 8.0.266-dev
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.
- package/internal-do-not-import-from-here/manifests/omnia.fx.manifest.json +1 -1
- package/internal-do-not-import-from-here/stores/{markdown/MarkdownPluginStore.d.ts → floweditor/FlowEditorPluginStore.d.ts} +12 -11
- package/internal-do-not-import-from-here/stores/{markdown/MarkdownToolbarStateStore.d.ts → floweditor/FlowEditorToolbarStateStore.d.ts} +1 -1
- package/internal-do-not-import-from-here/stores/floweditor/index.d.ts +2 -0
- package/internal-do-not-import-from-here/stores/index.d.ts +1 -1
- package/internal-do-not-import-from-here/ux/appprovisioning/appimageinput/AppImageInput.d.ts +4 -0
- package/internal-do-not-import-from-here/ux/aurora/designkits/default/DefinitionRegistrations.d.ts +0 -1
- package/internal-do-not-import-from-here/ux/aurora/designkits/pages/DefinitionRegistrations.d.ts +0 -1
- package/internal-do-not-import-from-here/ux/aurora/store/SpacingBlueprintStore.d.ts +36 -0
- package/internal-do-not-import-from-here/ux/aurora/store/TypographyBlueprintStore.d.ts +36 -0
- package/internal-do-not-import-from-here/ux/features/FeatureActivation.d.ts +3 -14
- package/internal-do-not-import-from-here/ux/features/models/FeatureAction.d.ts +3 -0
- package/internal-do-not-import-from-here/ux/features/models/VDataGridItemScopedSlot.d.ts +13 -0
- package/internal-do-not-import-from-here/ux/features/models/index.d.ts +2 -0
- package/internal-do-not-import-from-here/ux/features/shared/FeatureActions.d.ts +2 -0
- package/internal-do-not-import-from-here/ux/features/shared/index.d.ts +1 -0
- package/internal-do-not-import-from-here/ux/features/stores/FeatureJourneyStore.d.ts +2 -3
- package/internal-do-not-import-from-here/ux/floweditor/FlowEditor.css.d.ts +6 -0
- package/internal-do-not-import-from-here/ux/{markdown2/MarkdownEditorFuture.d.ts → floweditor/FlowEditor.d.ts} +4 -4
- package/internal-do-not-import-from-here/ux/{markdown2/MarkdownToolbar.css.d.ts → floweditor/FlowEditorToolbar.css.d.ts} +1 -1
- package/internal-do-not-import-from-here/ux/floweditor/commands/EditorCommands.d.ts +99 -0
- package/internal-do-not-import-from-here/ux/floweditor/commands/helpers/EditorNodeHelper.d.ts +6 -0
- package/internal-do-not-import-from-here/ux/floweditor/commands/helpers/Editorhelper.d.ts +15 -0
- package/internal-do-not-import-from-here/ux/floweditor/commands/helpers/HtmlNodehelper.d.ts +25 -0
- package/internal-do-not-import-from-here/ux/floweditor/models/Constants.d.ts +14 -0
- package/internal-do-not-import-from-here/ux/floweditor/models/EditorModels.d.ts +21 -0
- package/internal-do-not-import-from-here/ux/floweditor/models/EditorPlugin.d.ts +40 -0
- package/internal-do-not-import-from-here/ux/floweditor/parsers/HtmlParser.d.ts +8 -0
- package/internal-do-not-import-from-here/ux/floweditor/parsers/JSONParser.d.ts +8 -0
- package/internal-do-not-import-from-here/ux/{markdown2 → floweditor}/plugins/DefineEditorPlugin.d.ts +2 -2
- package/internal-do-not-import-from-here/ux/{markdown2 → floweditor}/plugins/bold/BoldPlugin.d.ts +1 -1
- package/internal-do-not-import-from-here/ux/{markdown2 → floweditor}/plugins/colorstyle/ColorButton.d.ts +2 -2
- package/internal-do-not-import-from-here/ux/{markdown2 → floweditor}/plugins/colorstyle/ColorStylePlugin.d.ts +1 -1
- package/internal-do-not-import-from-here/ux/floweditor/plugins/elements/ElementPlugin.d.ts +7 -0
- package/internal-do-not-import-from-here/ux/floweditor/plugins/eventhandlers/EditorEvents.d.ts +4 -0
- package/internal-do-not-import-from-here/ux/floweditor/plugins/eventhandlers/KeyboardEvents.d.ts +4 -0
- package/internal-do-not-import-from-here/ux/floweditor/plugins/eventhandlers/handlers/BackspaceHandler.d.ts +4 -0
- package/internal-do-not-import-from-here/ux/floweditor/plugins/eventhandlers/handlers/ClipboardHandler.d.ts +4 -0
- package/internal-do-not-import-from-here/ux/floweditor/plugins/eventhandlers/handlers/EnterHandler.d.ts +4 -0
- package/internal-do-not-import-from-here/ux/{markdown2 → floweditor}/plugins/italic/ItalicPlugin.d.ts +1 -1
- package/internal-do-not-import-from-here/ux/floweditor/plugins/sourceeditor/SourceEditorPlugin.d.ts +4 -0
- package/internal-do-not-import-from-here/ux/floweditor/plugins/testdata/TestDataPlugin.d.ts +4 -0
- package/internal-do-not-import-from-here/ux/floweditor/plugins/text/TextPlugin.d.ts +3 -0
- package/internal-do-not-import-from-here/ux/{markdown2 → floweditor}/plugins/typography/TypographyButton.d.ts +2 -2
- package/internal-do-not-import-from-here/ux/{markdown2 → floweditor}/plugins/typography/TypographyPlugin.d.ts +1 -1
- package/internal-do-not-import-from-here/ux/{markdown2 → floweditor}/plugins/velcron/VelcronPlugin.d.ts +3 -3
- package/internal-do-not-import-from-here/ux/floweditor/rules/EditorRules.d.ts +7 -0
- package/internal-do-not-import-from-here/ux/floweditor/stores/FlowEditorStore.d.ts +370 -0
- package/internal-do-not-import-from-here/ux/floweditor/stores/FlowEditorToolbarStore.d.ts +1901 -0
- package/internal-do-not-import-from-here/ux/hub/feed/definitions/CommunityUpdate.d.ts +0 -2
- package/internal-do-not-import-from-here/ux/hub/feed/definitions/DefinitionRegistrations.d.ts +0 -1
- package/internal-do-not-import-from-here/ux/hub/feed/definitions/DocumentReview.d.ts +0 -2
- package/internal-do-not-import-from-here/ux/hub/feed/definitions/NewsArticleTemplate.d.ts +0 -2
- package/internal-do-not-import-from-here/ux/hub/feed/definitions/QuickPoll.d.ts +0 -2
- package/internal-do-not-import-from-here/ux/hub/feed/definitions/Reach.d.ts +0 -2
- package/internal-do-not-import-from-here/ux/hub/feed/definitions/UpdatedProcess.d.ts +0 -2
- package/internal-do-not-import-from-here/ux/identities/loc/Localize.d.ts +1 -0
- package/internal-do-not-import-from-here/ux/markdown/stores/MarkdownEditorStore.d.ts +7 -7
- package/internal-do-not-import-from-here/ux/oxide/select/Select.d.ts +1 -1
- package/internal-do-not-import-from-here/ux/properties/builtins/identity/IdentityDisplay.d.ts +1 -1
- package/internal-do-not-import-from-here/ux/properties/builtins/tags/TagsDisplay.d.ts +4 -1
- package/internal-do-not-import-from-here/ux/properties/property-picker/PropertyPicker.d.ts +18 -1
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew/stores/ContentEditorStore.d.ts +5 -5
- package/internal-do-not-import-from-here/ux/velcron/components/definitionpicker/VelcronDefinitionPicker.d.ts +5 -1
- package/internal-do-not-import-from-here/ux/velcron/core/models/VelcronDefinitions.d.ts +5 -5
- package/internal-do-not-import-from-here/ux/velcron/core/models/VelcronPropertyEditorDefinitions.d.ts +3 -3
- package/internal-do-not-import-from-here/ux/velcron/core/parser/VelcronConstants.d.ts +1 -1
- package/internal-do-not-import-from-here/ux/velcron/core/templatebuilder/VelcronEditorBuilder.d.ts +1 -1
- package/internal-do-not-import-from-here/ux/velcron/{components/contenteditor/models → definitions}/VelcronDefinitionIds.d.ts +1 -1
- package/internal-do-not-import-from-here/ux/velcron/definitions/index.d.ts +1 -1
- package/internal-do-not-import-from-here/ux/velcron/editor/models/ComponentDescriptors.d.ts +1 -1
- package/internal-do-not-import-from-here/ux/velcron/editor/stores/VelcronEditorStore.d.ts +7 -7
- package/internal-do-not-import-from-here/ux/velcron/renderer/components/{Markdown.d.ts → Flow.d.ts} +6 -6
- package/internal-do-not-import-from-here/ux/velcron/renderer/components/Property.d.ts +5 -5
- package/internal-do-not-import-from-here/ux/velcron/renderer/editors/MarkdownEditor.d.ts +6 -6
- package/internal-do-not-import-from-here/ux/velcron/renderer/editors/PropertyResolverEditor.d.ts +5 -5
- package/internal-do-not-import-from-here/ux/velcron/stores/VelcronDefinitionStore.d.ts +47 -7
- package/internal-do-not-import-from-here/wctypings.d.ts +10 -32
- package/package.json +2 -2
- package/internal-do-not-import-from-here/stores/markdown/index.d.ts +0 -2
- package/internal-do-not-import-from-here/ux/markdown2/MarkdownEditorFuture.css.d.ts +0 -6
- package/internal-do-not-import-from-here/ux/markdown2/commands/ClipboardCommands.d.ts +0 -4
- package/internal-do-not-import-from-here/ux/markdown2/commands/EditorCommands.d.ts +0 -52
- package/internal-do-not-import-from-here/ux/markdown2/commands/helpers/EditorNodeHelper.d.ts +0 -5
- package/internal-do-not-import-from-here/ux/markdown2/commands/helpers/Editorhelper.d.ts +0 -7
- package/internal-do-not-import-from-here/ux/markdown2/commands/helpers/HtmlNodehelper.d.ts +0 -9
- package/internal-do-not-import-from-here/ux/markdown2/markdowntester/MarkdownTester.css.d.ts +0 -6
- package/internal-do-not-import-from-here/ux/markdown2/markdowntester/MarkdownTester.d.ts +0 -16
- package/internal-do-not-import-from-here/ux/markdown2/models/EditorModels.d.ts +0 -21
- package/internal-do-not-import-from-here/ux/markdown2/models/EditorPlugin.d.ts +0 -18
- package/internal-do-not-import-from-here/ux/markdown2/parsers/HtmlParser.d.ts +0 -8
- package/internal-do-not-import-from-here/ux/markdown2/parsers/JSONParser.d.ts +0 -8
- package/internal-do-not-import-from-here/ux/markdown2/parsers/markdownparser_old/MarkdownParser_engine.d.ts +0 -0
- package/internal-do-not-import-from-here/ux/markdown2/parsers/markdownparser_old/component.d.ts +0 -0
- package/internal-do-not-import-from-here/ux/markdown2/parsers/markdownparser_old/tags.d.ts +0 -0
- package/internal-do-not-import-from-here/ux/markdown2/parsers/markdownparser_old/textParser.d.ts +0 -0
- package/internal-do-not-import-from-here/ux/markdown2/plugins/sourceeditor/SourceEditorPlugin.d.ts +0 -3
- package/internal-do-not-import-from-here/ux/markdown2/plugins/testdata/TestDataPlugin.d.ts +0 -3
- package/internal-do-not-import-from-here/ux/markdown2/plugins/text/TextPlugin.d.ts +0 -7
- package/internal-do-not-import-from-here/ux/markdown2/stores/MarkdownStore.d.ts +0 -200
- package/internal-do-not-import-from-here/ux/markdown2/stores/MarkdownToolbarStore.d.ts +0 -1051
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/VelcronContentEditor.css.d.ts +0 -6
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/VelcronContentEditor.d.ts +0 -949
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/definitions/content/Quote.d.ts +0 -2
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/definitions/index.d.ts +0 -2
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/definitions/social/Image.d.ts +0 -2
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/definitions/social/MicroBlog.d.ts +0 -3
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/definitions/social/MicroBlog2.d.ts +0 -3
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/definitions/social/Praise.d.ts +0 -2
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/definitions/social/SocialText.d.ts +0 -2
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/definitions/social/index.d.ts +0 -4
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/models/ContentDefinitionRegistration.d.ts +0 -9
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/models/index.d.ts +0 -2
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditor/stores/ContentEditorStore.d.ts +0 -180
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew/definitions/index.d.ts +0 -1
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/VelcronContentEditor.css.d.ts +0 -5
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/VelcronContentEditor.d.ts +0 -1133
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/VelcronContentRenderer.d.ts +0 -80
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/components/ActionMenu.css.d.ts +0 -4
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/components/ActionMenu.d.ts +0 -11
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/components/BorderSelector copy.d.ts +0 -11
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/components/BorderSelector.css.d.ts +0 -12
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/components/BorderSelector.d.ts +0 -11
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/components/DefinitionToolbar copy.d.ts +0 -14
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/components/DefinitionToolbar.css.d.ts +0 -4
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/components/DefinitionToolbar.d.ts +0 -14
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/definitions/DefinitionRegistrations.d.ts +0 -1
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/definitions/index.d.ts +0 -1
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/editorHooks/ContentEditorHooks.css.d.ts +0 -6
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/editorHooks/ContentEditorHooks.d.ts +0 -2
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/models/EditorRenderingHooks.d.ts +0 -24
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/models/index.d.ts +0 -1
- package/internal-do-not-import-from-here/ux/velcron/components/contenteditorNew_bak/stores/ContentEditorStore.d.ts +0 -222
- /package/internal-do-not-import-from-here/ux/{markdown2/MarkdownToolbar.d.ts → floweditor/FlowEditorToolbar.d.ts} +0 -0
- /package/internal-do-not-import-from-here/ux/{markdown2 → floweditor}/PluginRegistrationHandler.d.ts +0 -0
- /package/internal-do-not-import-from-here/ux/{markdown2 → floweditor}/plugins/registrations/PluginRegistrations.d.ts +0 -0
- /package/internal-do-not-import-from-here/ux/{markdown2 → floweditor}/plugins/sourceeditor/SourceEditorButton.d.ts +0 -0
- /package/internal-do-not-import-from-here/ux/{aurora/RegistrationHandlerDefinitions.d.ts → velcron/apis/VelcronCategoriesHandler.d.ts} +0 -0
- /package/internal-do-not-import-from-here/ux/velcron/{components/contenteditor/DefinitionRegistrations.d.ts → apis/VelcronDefinitionsHandler.d.ts} +0 -0
- /package/internal-do-not-import-from-here/ux/velcron/{registrations → definitions}/CategoryRegistrations.d.ts +0 -0
- /package/internal-do-not-import-from-here/ux/velcron/{components/contenteditor/definitions → definitions}/content/Image.d.ts +0 -0
- /package/internal-do-not-import-from-here/ux/velcron/{components/contenteditor/definitions → definitions}/content/ImageText.d.ts +0 -0
- /package/internal-do-not-import-from-here/ux/velcron/{components/contenteditorNew/definitions/DefinitionRegistrations.d.ts → definitions/content/Quote.d.ts} +0 -0
- /package/internal-do-not-import-from-here/ux/velcron/{components/contenteditor/definitions → definitions}/content/Text.d.ts +0 -0
- /package/internal-do-not-import-from-here/ux/velcron/{components/contenteditor/definitions → definitions}/content/index.d.ts +0 -0
- /package/internal-do-not-import-from-here/ux/{aurora/designkits/default/definitions/content → velcron/definitions/social}/Image.d.ts +0 -0
- /package/internal-do-not-import-from-here/ux/{aurora/designkits/default/definitions/content/ImageText.d.ts → velcron/definitions/social/MicroBlog.d.ts} +0 -0
- /package/internal-do-not-import-from-here/ux/{aurora/designkits/default/definitions/content/Quote.d.ts → velcron/definitions/social/MicroBlog2.d.ts} +0 -0
- /package/internal-do-not-import-from-here/ux/{aurora/designkits/default/definitions/content/Text.d.ts → velcron/definitions/social/Praise.d.ts} +0 -0
- /package/internal-do-not-import-from-here/ux/{aurora/designkits/default/definitions/content/index.d.ts → velcron/definitions/social/SocialText.d.ts} +0 -0
- /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,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,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
|
+
};
|
package/internal-do-not-import-from-here/ux/{markdown2 → floweditor}/plugins/DefineEditorPlugin.d.ts
RENAMED
@@ -1,8 +1,8 @@
|
|
1
1
|
import { SetupFactoryContext } from "@omnia/fx";
|
2
|
-
import {
|
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) =>
|
5
|
+
export declare function defineEditorPlugin<TArgs extends any[]>(setup: (ctx: SetupEditorPluginContext) => FlowEditorPlugin | FlowEditorContentPlugin): () => FlowEditorPlugin & {
|
6
6
|
dispose?: () => void;
|
7
7
|
};
|
8
8
|
export {};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ColorValue } from "@omnia/fx-models";
|
2
|
-
import {
|
3
|
-
export interface ColorFormatNode extends
|
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,6 +1,6 @@
|
|
1
1
|
import { TypographyValue } from "@omnia/fx-models";
|
2
|
-
import {
|
3
|
-
export interface TypographyFormatNode extends
|
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,8 +1,8 @@
|
|
1
1
|
import { VelcronAppDefinition } from "@omnia/fx-models";
|
2
|
-
import {
|
3
|
-
export interface VelcronContentNode extends
|
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").
|
6
|
+
export declare const velcronRendererPlugin: () => import("../../models/EditorPlugin").FlowEditorPlugin & {
|
7
7
|
dispose?: () => void;
|
8
8
|
};
|