@limetech/lime-elements 37.64.3 → 37.65.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.
- package/CHANGELOG.md +31 -0
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-breadcrumbs_5.cjs.entry.js +1 -1
- package/dist/cjs/limel-breadcrumbs_5.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/limel-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-dynamic-label_4.cjs.entry.js +3 -3
- package/dist/cjs/limel-dynamic-label_4.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-markdown.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +197 -5
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-switch.cjs.entry.js +1 -1
- package/dist/cjs/limel-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-text-editor.cjs.entry.js +6 -2
- package/dist/cjs/limel-text-editor.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/markdown-parser-ba7cc71e.js.map +1 -1
- package/dist/collection/components/checkbox/checkbox.css +9 -0
- package/dist/collection/components/dynamic-label/dynamic-label.css +4 -64
- package/dist/collection/components/dynamic-label/dynamic-label.js +1 -1
- package/dist/collection/components/dynamic-label/dynamic-label.js.map +1 -1
- package/dist/collection/components/list/list.css +18 -0
- package/dist/collection/components/markdown/markdown-parser.js.map +1 -1
- package/dist/collection/components/markdown/markdown.js +3 -3
- package/dist/collection/components/markdown/markdown.js.map +1 -1
- package/dist/collection/components/menu-list/menu-list.css +18 -0
- package/dist/collection/components/switch/switch.css +7 -3
- package/dist/collection/components/text-editor/prosemirror-adapter/plugins/trigger/factory.js +142 -0
- package/dist/collection/components/text-editor/prosemirror-adapter/plugins/trigger/factory.js.map +1 -0
- package/dist/collection/components/text-editor/prosemirror-adapter/plugins/trigger/inserter.js +51 -0
- package/dist/collection/components/text-editor/prosemirror-adapter/plugins/trigger/inserter.js.map +1 -0
- package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js +39 -9
- package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js.map +1 -1
- package/dist/collection/components/text-editor/text-editor.js +114 -7
- package/dist/collection/components/text-editor/text-editor.js.map +1 -1
- package/dist/collection/components/text-editor/text-editor.types.js +2 -0
- package/dist/collection/components/text-editor/text-editor.types.js.map +1 -0
- package/dist/collection/components/text-editor/types.js.map +1 -1
- package/dist/collection/components/text-editor/utils/markdown-converter.js.map +1 -1
- package/dist/collection/components/text-editor/utils/plugin-factory.js.map +1 -1
- package/dist/collection/global/shared-types/custom-element.types.js.map +1 -1
- package/dist/collection/interface.js +1 -0
- package/dist/collection/interface.js.map +1 -1
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-breadcrumbs_5.entry.js +1 -1
- package/dist/esm/limel-breadcrumbs_5.entry.js.map +1 -1
- package/dist/esm/limel-checkbox.entry.js +1 -1
- package/dist/esm/limel-checkbox.entry.js.map +1 -1
- package/dist/esm/limel-dynamic-label_4.entry.js +3 -3
- package/dist/esm/limel-dynamic-label_4.entry.js.map +1 -1
- package/dist/esm/limel-markdown.entry.js.map +1 -1
- package/dist/esm/limel-prosemirror-adapter.entry.js +197 -5
- package/dist/esm/limel-prosemirror-adapter.entry.js.map +1 -1
- package/dist/esm/limel-switch.entry.js +1 -1
- package/dist/esm/limel-switch.entry.js.map +1 -1
- package/dist/esm/limel-text-editor.entry.js +6 -2
- package/dist/esm/limel-text-editor.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/markdown-parser-3c0af898.js.map +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js.map +1 -1
- package/dist/lime-elements/p-086509a5.js.map +1 -1
- package/dist/lime-elements/p-0ec43bbc.entry.js +134 -0
- package/dist/lime-elements/{p-56f23a19.entry.js.map → p-0ec43bbc.entry.js.map} +1 -1
- package/dist/lime-elements/{p-20440a35.entry.js → p-27cc1f9e.entry.js} +3 -3
- package/dist/lime-elements/{p-20440a35.entry.js.map → p-27cc1f9e.entry.js.map} +1 -1
- package/dist/lime-elements/p-732daad9.entry.js +68 -0
- package/dist/lime-elements/{p-9d5436bb.entry.js.map → p-732daad9.entry.js.map} +1 -1
- package/dist/lime-elements/{p-6c1c51bd.entry.js → p-8d388c5c.entry.js} +2 -2
- package/dist/lime-elements/p-8d388c5c.entry.js.map +1 -0
- package/dist/lime-elements/p-d49faced.entry.js +2 -0
- package/dist/lime-elements/p-d49faced.entry.js.map +1 -0
- package/dist/lime-elements/p-da20ff72.entry.js.map +1 -1
- package/dist/lime-elements/{p-2ab02bd9.entry.js → p-daecb14f.entry.js} +2 -2
- package/dist/lime-elements/p-daecb14f.entry.js.map +1 -0
- package/dist/types/components/markdown/markdown-parser.d.ts +2 -2
- package/dist/types/components/markdown/markdown.d.ts +2 -2
- package/dist/types/components/text-editor/prosemirror-adapter/plugins/trigger/factory.d.ts +4 -0
- package/dist/types/components/text-editor/prosemirror-adapter/plugins/trigger/inserter.d.ts +4 -0
- package/dist/types/components/text-editor/prosemirror-adapter/prosemirror-adapter.d.ts +10 -2
- package/dist/types/components/text-editor/text-editor.d.ts +41 -3
- package/dist/types/components/text-editor/text-editor.types.d.ts +47 -0
- package/dist/types/components/text-editor/types.d.ts +2 -2
- package/dist/types/components/text-editor/utils/markdown-converter.d.ts +2 -2
- package/dist/types/components/text-editor/utils/plugin-factory.d.ts +2 -2
- package/dist/types/components.d.ts +64 -16
- package/dist/types/global/shared-types/custom-element.types.d.ts +15 -2
- package/dist/types/interface.d.ts +1 -0
- package/package.json +1 -1
- package/dist/lime-elements/p-2ab02bd9.entry.js.map +0 -1
- package/dist/lime-elements/p-56f23a19.entry.js +0 -134
- package/dist/lime-elements/p-6c1c51bd.entry.js.map +0 -1
- package/dist/lime-elements/p-9d5436bb.entry.js +0 -68
- package/dist/lime-elements/p-b5dba995.entry.js +0 -2
- package/dist/lime-elements/p-b5dba995.entry.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CustomElementDefinition } from '../../global/shared-types/custom-element.types';
|
|
2
2
|
/**
|
|
3
3
|
* Takes a string as input and returns a new string
|
|
4
4
|
* where the text has been converted to HTML.
|
|
@@ -22,6 +22,6 @@ export interface markdownToHTMLOptions {
|
|
|
22
22
|
* Set to `true` to convert all soft line breaks to hard line breaks.
|
|
23
23
|
*/
|
|
24
24
|
forceHardLineBreaks?: boolean;
|
|
25
|
-
whitelist?:
|
|
25
|
+
whitelist?: CustomElementDefinition[];
|
|
26
26
|
}
|
|
27
27
|
//# sourceMappingURL=markdown-parser.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CustomElementDefinition } from '../../global/shared-types/custom-element.types';
|
|
2
2
|
/**
|
|
3
3
|
* The Markdown component receives markdown syntax
|
|
4
4
|
* and renders it as HTML.
|
|
@@ -30,7 +30,7 @@ export declare class Markdown {
|
|
|
30
30
|
* Any custom element added here will not be sanitized and thus rendered.
|
|
31
31
|
* @alpha
|
|
32
32
|
*/
|
|
33
|
-
whitelist?:
|
|
33
|
+
whitelist?: CustomElementDefinition[];
|
|
34
34
|
textChanged(): Promise<void>;
|
|
35
35
|
componentDidLoad(): Promise<void>;
|
|
36
36
|
private rootElement;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Languages } from '../../date-picker/date.types';
|
|
2
|
-
import {
|
|
2
|
+
import { CustomElementDefinition } from '../../../global/shared-types/custom-element.types';
|
|
3
|
+
import { TriggerCharacter } from '../text-editor.types';
|
|
3
4
|
/**
|
|
4
5
|
* The ProseMirror adapter offers a rich text editing experience with markdown support.
|
|
5
6
|
* [Read more...](https://prosemirror.net/)
|
|
@@ -30,7 +31,14 @@ export declare class ProsemirrorAdapter {
|
|
|
30
31
|
* @private
|
|
31
32
|
* @alpha
|
|
32
33
|
*/
|
|
33
|
-
|
|
34
|
+
customElements: CustomElementDefinition[];
|
|
35
|
+
/**
|
|
36
|
+
* set to private to avoid usage while under development
|
|
37
|
+
*
|
|
38
|
+
* @private
|
|
39
|
+
* @alpha
|
|
40
|
+
*/
|
|
41
|
+
triggerCharacters: TriggerCharacter[];
|
|
34
42
|
private host;
|
|
35
43
|
private portalId;
|
|
36
44
|
private view;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
2
|
import { FormComponent } from '../form/form.types';
|
|
3
3
|
import { Languages } from '../date-picker/date.types';
|
|
4
|
-
import {
|
|
4
|
+
import { CustomElementDefinition } from '../../global/shared-types/custom-element.types';
|
|
5
|
+
import { TriggerCharacter, TriggerEventDetail } from './text-editor.types';
|
|
5
6
|
/**
|
|
6
7
|
* A rich text editor that offers a rich text editing experience with markdown support,
|
|
7
8
|
* in the sense that you can easily type markdown syntax and see the rendered
|
|
@@ -20,6 +21,7 @@ import { CustomElement } from '../../global/shared-types/custom-element.types';
|
|
|
20
21
|
* @exampleComponent limel-example-text-editor-ui
|
|
21
22
|
* @exampleComponent limel-example-text-editor-composite
|
|
22
23
|
* @exampleComponent limel-example-text-editor-custom-element
|
|
24
|
+
* @exampleComponent limel-example-text-editor-triggers
|
|
23
25
|
* @beta
|
|
24
26
|
*/
|
|
25
27
|
export declare class TextEditor implements FormComponent<string> {
|
|
@@ -72,12 +74,25 @@ export declare class TextEditor implements FormComponent<string> {
|
|
|
72
74
|
*/
|
|
73
75
|
value: string;
|
|
74
76
|
/**
|
|
75
|
-
*
|
|
77
|
+
* A list of custom elements
|
|
78
|
+
*
|
|
79
|
+
* Any `CustomElement` that should be used inside the text editor needs
|
|
80
|
+
* to be defined here.
|
|
76
81
|
*
|
|
77
82
|
* @private
|
|
78
83
|
* @alpha
|
|
79
84
|
*/
|
|
80
|
-
|
|
85
|
+
customElements: CustomElementDefinition[];
|
|
86
|
+
/**
|
|
87
|
+
* A set of trigger characters
|
|
88
|
+
*
|
|
89
|
+
* Defining a character here will enable trigger events to be sent if the
|
|
90
|
+
* character is detected in the editor.
|
|
91
|
+
*
|
|
92
|
+
* @private
|
|
93
|
+
* @alpha
|
|
94
|
+
*/
|
|
95
|
+
triggers: TriggerCharacter[];
|
|
81
96
|
/**
|
|
82
97
|
* Set to `true` to indicate that the field is required.
|
|
83
98
|
*
|
|
@@ -107,6 +122,29 @@ export declare class TextEditor implements FormComponent<string> {
|
|
|
107
122
|
* Dispatched when a change is made to the editor
|
|
108
123
|
*/
|
|
109
124
|
change: EventEmitter<string>;
|
|
125
|
+
/**
|
|
126
|
+
* Dispatched if a trigger character is detected.
|
|
127
|
+
*
|
|
128
|
+
* @private
|
|
129
|
+
* @alpha
|
|
130
|
+
*/
|
|
131
|
+
triggerStart: EventEmitter<TriggerEventDetail>;
|
|
132
|
+
/**
|
|
133
|
+
* Dispatched if a trigger session is ended. That is if the selection
|
|
134
|
+
* goes outside the trigger input or if something is inserted using the
|
|
135
|
+
* supplied `TextEditor` insert function.
|
|
136
|
+
*
|
|
137
|
+
* @private
|
|
138
|
+
* @alpha
|
|
139
|
+
*/
|
|
140
|
+
triggerStop: EventEmitter<TriggerEventDetail>;
|
|
141
|
+
/**
|
|
142
|
+
* Dispatched if a input is changed during an active trigger.
|
|
143
|
+
*
|
|
144
|
+
* @private
|
|
145
|
+
* @alpha
|
|
146
|
+
*/
|
|
147
|
+
triggerChange: EventEmitter<TriggerEventDetail>;
|
|
110
148
|
private helperTextId;
|
|
111
149
|
private editorId;
|
|
112
150
|
constructor();
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { CustomElement } from '../../global/shared-types/custom-element.types';
|
|
2
|
+
/**
|
|
3
|
+
* @alpha
|
|
4
|
+
*/
|
|
5
|
+
export type TriggerCharacter = '@' | '#' | '$' | '!' | '?' | '&' | '*' | '%' | '+' | '-' | '=' | '/' | '\\' | '^' | '~' | '`' | ':' | ';' | '|' | '.' | ',' | '<' | '>' | '[' | ']' | '{' | '}' | '(' | ')' | "'";
|
|
6
|
+
/**
|
|
7
|
+
* @alpha
|
|
8
|
+
*/
|
|
9
|
+
export type TextEditorNode = {
|
|
10
|
+
/**
|
|
11
|
+
* The top node
|
|
12
|
+
*/
|
|
13
|
+
node: CustomElement | string;
|
|
14
|
+
/**
|
|
15
|
+
* One more more children under the top node
|
|
16
|
+
*/
|
|
17
|
+
children?: Array<TextEditorNode | string>;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* @alpha
|
|
21
|
+
*/
|
|
22
|
+
export interface TextEditor {
|
|
23
|
+
/**
|
|
24
|
+
* Method to insert either text or a node at the cursor position
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
insert: (input: TextEditorNode | string) => void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @alpha
|
|
31
|
+
*/
|
|
32
|
+
export interface TriggerEventDetail {
|
|
33
|
+
/**
|
|
34
|
+
* The trigger that triggered this event
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
trigger: TriggerCharacter;
|
|
38
|
+
/**
|
|
39
|
+
* The text editor
|
|
40
|
+
*/
|
|
41
|
+
textEditor: TextEditor;
|
|
42
|
+
/**
|
|
43
|
+
* Current value of the trigger
|
|
44
|
+
*/
|
|
45
|
+
value: string;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=text-editor.types.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CustomElementDefinition } from '../../global/shared-types/custom-element.types';
|
|
2
2
|
/**
|
|
3
3
|
* @private
|
|
4
4
|
* set to private to avoid usage while under development
|
|
5
5
|
*/
|
|
6
6
|
export type TextEditorPlugin = {
|
|
7
|
-
node:
|
|
7
|
+
node: CustomElementDefinition[];
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ContentTypeConverter } from './content-type-converter';
|
|
2
2
|
import { EditorView } from 'prosemirror-view';
|
|
3
|
-
import {
|
|
3
|
+
import { CustomElementDefinition } from '../../../global/shared-types/custom-element.types';
|
|
4
4
|
/**
|
|
5
5
|
* @private
|
|
6
6
|
*/
|
|
7
7
|
export declare class MarkdownConverter implements ContentTypeConverter {
|
|
8
8
|
private markdownSerializer;
|
|
9
9
|
private customNodes;
|
|
10
|
-
constructor(plugins:
|
|
10
|
+
constructor(plugins: CustomElementDefinition[]);
|
|
11
11
|
parseAsHTML: (text: string) => Promise<string>;
|
|
12
12
|
serialize: (view: EditorView) => string;
|
|
13
13
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NodeSpec } from 'prosemirror-model';
|
|
2
|
-
import {
|
|
3
|
-
type NodeSpecFactory = (config:
|
|
2
|
+
import { CustomElementDefinition } from '../../../global/shared-types/custom-element.types';
|
|
3
|
+
type NodeSpecFactory = (config: CustomElementDefinition) => NodeSpec;
|
|
4
4
|
export declare const createNodeSpec: NodeSpecFactory;
|
|
5
5
|
export {};
|
|
6
6
|
//# sourceMappingURL=plugin-factory.d.ts.map
|
|
@@ -32,12 +32,13 @@ import { IconSize } from "./components/icon/icon.types";
|
|
|
32
32
|
import { InfoTileProgress } from "./components/info-tile/info-tile.types";
|
|
33
33
|
import { InputType } from "./components/input-field/input-field.types";
|
|
34
34
|
import { ListType } from "./components/list/list.types";
|
|
35
|
-
import {
|
|
35
|
+
import { CustomElementDefinition } from "./global/shared-types/custom-element.types";
|
|
36
36
|
import { MenuListType } from "./components/menu-list/menu-list.types";
|
|
37
37
|
import { PickerValue } from "./components/picker/value.types";
|
|
38
38
|
import { Searcher } from "./components/picker/searcher.types";
|
|
39
39
|
import { ActionPosition, ActionScrollBehavior } from "./components/picker/actions.types";
|
|
40
40
|
import { FlowItem } from "./components/progress-flow/progress-flow.types";
|
|
41
|
+
import { TriggerCharacter, TriggerEventDetail } from "./components/text-editor/text-editor.types";
|
|
41
42
|
import { Option } from "./components/select/option.types";
|
|
42
43
|
import { SpinnerSize } from "./components/spinner/spinner.types";
|
|
43
44
|
import { Tab } from "./components/tab-bar/tab.types";
|
|
@@ -71,12 +72,13 @@ export { IconSize } from "./components/icon/icon.types";
|
|
|
71
72
|
export { InfoTileProgress } from "./components/info-tile/info-tile.types";
|
|
72
73
|
export { InputType } from "./components/input-field/input-field.types";
|
|
73
74
|
export { ListType } from "./components/list/list.types";
|
|
74
|
-
export {
|
|
75
|
+
export { CustomElementDefinition } from "./global/shared-types/custom-element.types";
|
|
75
76
|
export { MenuListType } from "./components/menu-list/menu-list.types";
|
|
76
77
|
export { PickerValue } from "./components/picker/value.types";
|
|
77
78
|
export { Searcher } from "./components/picker/searcher.types";
|
|
78
79
|
export { ActionPosition, ActionScrollBehavior } from "./components/picker/actions.types";
|
|
79
80
|
export { FlowItem } from "./components/progress-flow/progress-flow.types";
|
|
81
|
+
export { TriggerCharacter, TriggerEventDetail } from "./components/text-editor/text-editor.types";
|
|
80
82
|
export { Option } from "./components/select/option.types";
|
|
81
83
|
export { SpinnerSize } from "./components/spinner/spinner.types";
|
|
82
84
|
export { Tab } from "./components/tab-bar/tab.types";
|
|
@@ -1754,7 +1756,7 @@ export namespace Components {
|
|
|
1754
1756
|
* Whitelisted html elements. Any custom element added here will not be sanitized and thus rendered.
|
|
1755
1757
|
* @alpha
|
|
1756
1758
|
*/
|
|
1757
|
-
"whitelist"?:
|
|
1759
|
+
"whitelist"?: CustomElementDefinition[];
|
|
1758
1760
|
}
|
|
1759
1761
|
/**
|
|
1760
1762
|
* @exampleComponent limel-example-menu-basic
|
|
@@ -2119,6 +2121,12 @@ export namespace Components {
|
|
|
2119
2121
|
* The type of content that the editor should handle and emit, defaults to `markdown` Assumed to be set only once, so not reactive to changes
|
|
2120
2122
|
*/
|
|
2121
2123
|
"contentType": 'markdown' | 'html';
|
|
2124
|
+
/**
|
|
2125
|
+
* set to private to avoid usage while under development
|
|
2126
|
+
* @private
|
|
2127
|
+
* @alpha
|
|
2128
|
+
*/
|
|
2129
|
+
"customElements": CustomElementDefinition[];
|
|
2122
2130
|
/**
|
|
2123
2131
|
* Defines the language for translations.
|
|
2124
2132
|
*/
|
|
@@ -2128,7 +2136,7 @@ export namespace Components {
|
|
|
2128
2136
|
* @private
|
|
2129
2137
|
* @alpha
|
|
2130
2138
|
*/
|
|
2131
|
-
"
|
|
2139
|
+
"triggerCharacters": TriggerCharacter[];
|
|
2132
2140
|
/**
|
|
2133
2141
|
* The value of the editor, expected to be markdown
|
|
2134
2142
|
*/
|
|
@@ -2571,6 +2579,7 @@ export namespace Components {
|
|
|
2571
2579
|
* @exampleComponent limel-example-text-editor-ui
|
|
2572
2580
|
* @exampleComponent limel-example-text-editor-composite
|
|
2573
2581
|
* @exampleComponent limel-example-text-editor-custom-element
|
|
2582
|
+
* @exampleComponent limel-example-text-editor-triggers
|
|
2574
2583
|
* @beta
|
|
2575
2584
|
*/
|
|
2576
2585
|
interface LimelTextEditor {
|
|
@@ -2582,6 +2591,12 @@ export namespace Components {
|
|
|
2582
2591
|
* The type of content that the editor should handle and emit, defaults to `markdown` Assumed to be set only once, so not reactive to changes
|
|
2583
2592
|
*/
|
|
2584
2593
|
"contentType": 'markdown' | 'html';
|
|
2594
|
+
/**
|
|
2595
|
+
* A list of custom elements Any `CustomElement` that should be used inside the text editor needs to be defined here.
|
|
2596
|
+
* @private
|
|
2597
|
+
* @alpha
|
|
2598
|
+
*/
|
|
2599
|
+
"customElements": CustomElementDefinition[];
|
|
2585
2600
|
/**
|
|
2586
2601
|
* Set to `true` to disable the field. Use `disabled` to indicate that the field can normally be interacted with, but is currently disabled. This tells the user that if certain requirements are met, the field may become enabled again.
|
|
2587
2602
|
*/
|
|
@@ -2606,12 +2621,6 @@ export namespace Components {
|
|
|
2606
2621
|
* The placeholder text shown inside the input field, when the field is empty.
|
|
2607
2622
|
*/
|
|
2608
2623
|
"placeholder"?: string;
|
|
2609
|
-
/**
|
|
2610
|
-
* set to private to avoid usage while under development
|
|
2611
|
-
* @private
|
|
2612
|
-
* @alpha
|
|
2613
|
-
*/
|
|
2614
|
-
"plugins": CustomElement[];
|
|
2615
2624
|
/**
|
|
2616
2625
|
* Set to `true` to make the component read-only. Use `readonly` when the field is only there to present the data it holds, and will not become possible for the current user to edit. :::note Consider that it might be better to use `limel-markdown` instead of `limel-text-editor` when the goal is visualizing data. :::
|
|
2617
2626
|
*/
|
|
@@ -2620,6 +2629,12 @@ export namespace Components {
|
|
|
2620
2629
|
* Set to `true` to indicate that the field is required. :::important An empty but required field is not automatically considered invalid. You must make sure to check the validity of the field on your own, and properly handle the `invalid` state. :::
|
|
2621
2630
|
*/
|
|
2622
2631
|
"required"?: boolean;
|
|
2632
|
+
/**
|
|
2633
|
+
* A set of trigger characters Defining a character here will enable trigger events to be sent if the character is detected in the editor.
|
|
2634
|
+
* @private
|
|
2635
|
+
* @alpha
|
|
2636
|
+
*/
|
|
2637
|
+
"triggers": TriggerCharacter[];
|
|
2623
2638
|
/**
|
|
2624
2639
|
* Specifies the visual appearance of the editor. - `standard`: The default editor appearance with a full toolbar and standard layout. - `minimal`: A compact editor appearance, ideal for limited space scenarios such as mobile devices. In this mode, the toolbar is hidden until the editor is focused.
|
|
2625
2640
|
*/
|
|
@@ -4188,6 +4203,7 @@ declare global {
|
|
|
4188
4203
|
* @exampleComponent limel-example-text-editor-ui
|
|
4189
4204
|
* @exampleComponent limel-example-text-editor-composite
|
|
4190
4205
|
* @exampleComponent limel-example-text-editor-custom-element
|
|
4206
|
+
* @exampleComponent limel-example-text-editor-triggers
|
|
4191
4207
|
* @beta
|
|
4192
4208
|
*/
|
|
4193
4209
|
interface HTMLLimelTextEditorElement extends Components.LimelTextEditor, HTMLStencilElement {
|
|
@@ -6151,7 +6167,7 @@ declare namespace LocalJSX {
|
|
|
6151
6167
|
* Whitelisted html elements. Any custom element added here will not be sanitized and thus rendered.
|
|
6152
6168
|
* @alpha
|
|
6153
6169
|
*/
|
|
6154
|
-
"whitelist"?:
|
|
6170
|
+
"whitelist"?: CustomElementDefinition[];
|
|
6155
6171
|
}
|
|
6156
6172
|
/**
|
|
6157
6173
|
* @exampleComponent limel-example-menu-basic
|
|
@@ -6552,6 +6568,12 @@ declare namespace LocalJSX {
|
|
|
6552
6568
|
* The type of content that the editor should handle and emit, defaults to `markdown` Assumed to be set only once, so not reactive to changes
|
|
6553
6569
|
*/
|
|
6554
6570
|
"contentType"?: 'markdown' | 'html';
|
|
6571
|
+
/**
|
|
6572
|
+
* set to private to avoid usage while under development
|
|
6573
|
+
* @private
|
|
6574
|
+
* @alpha
|
|
6575
|
+
*/
|
|
6576
|
+
"customElements"?: CustomElementDefinition[];
|
|
6555
6577
|
/**
|
|
6556
6578
|
* Defines the language for translations.
|
|
6557
6579
|
*/
|
|
@@ -6565,7 +6587,7 @@ declare namespace LocalJSX {
|
|
|
6565
6587
|
* @private
|
|
6566
6588
|
* @alpha
|
|
6567
6589
|
*/
|
|
6568
|
-
"
|
|
6590
|
+
"triggerCharacters"?: TriggerCharacter[];
|
|
6569
6591
|
/**
|
|
6570
6592
|
* The value of the editor, expected to be markdown
|
|
6571
6593
|
*/
|
|
@@ -7063,6 +7085,7 @@ declare namespace LocalJSX {
|
|
|
7063
7085
|
* @exampleComponent limel-example-text-editor-ui
|
|
7064
7086
|
* @exampleComponent limel-example-text-editor-composite
|
|
7065
7087
|
* @exampleComponent limel-example-text-editor-custom-element
|
|
7088
|
+
* @exampleComponent limel-example-text-editor-triggers
|
|
7066
7089
|
* @beta
|
|
7067
7090
|
*/
|
|
7068
7091
|
interface LimelTextEditor {
|
|
@@ -7074,6 +7097,12 @@ declare namespace LocalJSX {
|
|
|
7074
7097
|
* The type of content that the editor should handle and emit, defaults to `markdown` Assumed to be set only once, so not reactive to changes
|
|
7075
7098
|
*/
|
|
7076
7099
|
"contentType"?: 'markdown' | 'html';
|
|
7100
|
+
/**
|
|
7101
|
+
* A list of custom elements Any `CustomElement` that should be used inside the text editor needs to be defined here.
|
|
7102
|
+
* @private
|
|
7103
|
+
* @alpha
|
|
7104
|
+
*/
|
|
7105
|
+
"customElements"?: CustomElementDefinition[];
|
|
7077
7106
|
/**
|
|
7078
7107
|
* Set to `true` to disable the field. Use `disabled` to indicate that the field can normally be interacted with, but is currently disabled. This tells the user that if certain requirements are met, the field may become enabled again.
|
|
7079
7108
|
*/
|
|
@@ -7099,15 +7128,27 @@ declare namespace LocalJSX {
|
|
|
7099
7128
|
*/
|
|
7100
7129
|
"onChange"?: (event: LimelTextEditorCustomEvent<string>) => void;
|
|
7101
7130
|
/**
|
|
7102
|
-
*
|
|
7131
|
+
* Dispatched if a input is changed during an active trigger.
|
|
7132
|
+
* @private
|
|
7133
|
+
* @alpha
|
|
7103
7134
|
*/
|
|
7104
|
-
"
|
|
7135
|
+
"onTriggerChange"?: (event: LimelTextEditorCustomEvent<TriggerEventDetail>) => void;
|
|
7105
7136
|
/**
|
|
7106
|
-
*
|
|
7137
|
+
* Dispatched if a trigger character is detected.
|
|
7138
|
+
* @private
|
|
7139
|
+
* @alpha
|
|
7140
|
+
*/
|
|
7141
|
+
"onTriggerStart"?: (event: LimelTextEditorCustomEvent<TriggerEventDetail>) => void;
|
|
7142
|
+
/**
|
|
7143
|
+
* Dispatched if a trigger session is ended. That is if the selection goes outside the trigger input or if something is inserted using the supplied `TextEditor` insert function.
|
|
7107
7144
|
* @private
|
|
7108
7145
|
* @alpha
|
|
7109
7146
|
*/
|
|
7110
|
-
"
|
|
7147
|
+
"onTriggerStop"?: (event: LimelTextEditorCustomEvent<TriggerEventDetail>) => void;
|
|
7148
|
+
/**
|
|
7149
|
+
* The placeholder text shown inside the input field, when the field is empty.
|
|
7150
|
+
*/
|
|
7151
|
+
"placeholder"?: string;
|
|
7111
7152
|
/**
|
|
7112
7153
|
* Set to `true` to make the component read-only. Use `readonly` when the field is only there to present the data it holds, and will not become possible for the current user to edit. :::note Consider that it might be better to use `limel-markdown` instead of `limel-text-editor` when the goal is visualizing data. :::
|
|
7113
7154
|
*/
|
|
@@ -7116,6 +7157,12 @@ declare namespace LocalJSX {
|
|
|
7116
7157
|
* Set to `true` to indicate that the field is required. :::important An empty but required field is not automatically considered invalid. You must make sure to check the validity of the field on your own, and properly handle the `invalid` state. :::
|
|
7117
7158
|
*/
|
|
7118
7159
|
"required"?: boolean;
|
|
7160
|
+
/**
|
|
7161
|
+
* A set of trigger characters Defining a character here will enable trigger events to be sent if the character is detected in the editor.
|
|
7162
|
+
* @private
|
|
7163
|
+
* @alpha
|
|
7164
|
+
*/
|
|
7165
|
+
"triggers"?: TriggerCharacter[];
|
|
7119
7166
|
/**
|
|
7120
7167
|
* Specifies the visual appearance of the editor. - `standard`: The default editor appearance with a full toolbar and standard layout. - `minimal`: A compact editor appearance, ideal for limited space scenarios such as mobile devices. In this mode, the toolbar is hidden until the editor is focused.
|
|
7121
7168
|
*/
|
|
@@ -8289,6 +8336,7 @@ declare module "@stencil/core" {
|
|
|
8289
8336
|
* @exampleComponent limel-example-text-editor-ui
|
|
8290
8337
|
* @exampleComponent limel-example-text-editor-composite
|
|
8291
8338
|
* @exampleComponent limel-example-text-editor-custom-element
|
|
8339
|
+
* @exampleComponent limel-example-text-editor-triggers
|
|
8292
8340
|
* @beta
|
|
8293
8341
|
*/
|
|
8294
8342
|
"limel-text-editor": LocalJSX.LimelTextEditor & JSXBase.HTMLAttributes<HTMLLimelTextEditorElement>;
|
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Custom Element
|
|
2
|
+
* Custom Element definition
|
|
3
|
+
*
|
|
4
|
+
* Used to define a Custom Element
|
|
3
5
|
*
|
|
4
6
|
* @alpha
|
|
5
7
|
*/
|
|
6
|
-
export interface
|
|
8
|
+
export interface CustomElementDefinition {
|
|
7
9
|
tagName: string;
|
|
8
10
|
attributes: string[];
|
|
9
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Custom Element
|
|
14
|
+
*
|
|
15
|
+
* @alpha
|
|
16
|
+
*/
|
|
17
|
+
export type CustomElement = Omit<CustomElementDefinition, 'attributes'> & {
|
|
18
|
+
/**
|
|
19
|
+
* Record of attributes and values to apply to the node
|
|
20
|
+
*/
|
|
21
|
+
attributes: Record<string, any>;
|
|
22
|
+
};
|
|
10
23
|
//# sourceMappingURL=custom-element.types.d.ts.map
|
|
@@ -32,4 +32,5 @@ export * from './components/table/table.types';
|
|
|
32
32
|
export * from './global/shared-types/separator.types';
|
|
33
33
|
export * from './global/shared-types/icon.types';
|
|
34
34
|
export * from './global/shared-types/image.types';
|
|
35
|
+
export * from './components/text-editor/text-editor.types';
|
|
35
36
|
//# sourceMappingURL=interface.d.ts.map
|