@vonage/vivid 5.9.0 → 5.10.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/bundled/affix.js +1 -1
- package/bundled/anchored.cjs +1 -1
- package/bundled/anchored.js +6 -6
- package/bundled/definition10.js +4 -4
- package/bundled/definition7.js +3 -3
- package/bundled/host-semantics.js +4 -4
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +14 -12
- package/bundled/mixins.cjs +2 -2
- package/bundled/mixins.js +6 -6
- package/bundled/{feature.cjs → slottable-request.cjs} +3 -3
- package/bundled/{feature.js → slottable-request.js} +63 -42
- package/bundled/vivid-element.cjs +1 -1
- package/bundled/vivid-element.js +1 -1
- package/card/definition.cjs +1 -1
- package/card/definition.js +1 -1
- package/card/index.cjs +10 -10
- package/card/index.js +42 -42
- package/country/definition.cjs +340 -0
- package/country/definition.js +334 -0
- package/country/index.cjs +12 -0
- package/country/index.js +317 -0
- package/custom-elements.json +12745 -9921
- package/index.cjs +26 -14
- package/index.js +4 -2
- package/lib/components.d.ts +3 -1
- package/lib/country/countries-data.d.ts +6 -0
- package/lib/country/country-code-to-flag-icon.d.ts +5 -0
- package/lib/country/country.d.ts +5 -0
- package/lib/country/country.template.d.ts +3 -0
- package/lib/country/definition.d.ts +3 -0
- package/lib/rich-text-editor/locale.d.ts +2 -0
- package/lib/rich-text-editor/popover.d.ts +1 -0
- package/lib/rich-text-editor/rte/config.d.ts +2 -1
- package/lib/rich-text-editor/rte/exports.d.ts +4 -0
- package/lib/rich-text-editor/rte/feature.d.ts +7 -1
- package/lib/rich-text-editor/rte/features/internal/basic-text-blocks.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/internal/foreign-html.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/internal/history.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/internal/input-rules.d.ts +15 -0
- package/lib/rich-text-editor/rte/instance.d.ts +4 -2
- package/lib/rich-text-editor/rte/utils/feature-state.d.ts +8 -0
- package/lib/rich-text-editor/rte/utils/text-before-cursor.d.ts +2 -0
- package/lib/rich-text-editor/rte/utils/ui.d.ts +2 -0
- package/lib/rich-text-editor/rte/view.d.ts +2 -2
- package/lib/rich-text-view/definition.d.ts +1 -0
- package/lib/rich-text-view/rich-text-view.d.ts +4 -0
- package/lib/selectable-box/selectable-box.d.ts +1 -0
- package/lib/status/definition.d.ts +4 -0
- package/lib/status/status.d.ts +388 -0
- package/lib/status/status.template.d.ts +3 -0
- package/lib/{data-table → table}/definition.d.ts +1 -1
- package/lib/tag/tag.d.ts +1 -1
- package/lib/tag-name-map.d.ts +3 -1
- package/locales/de-DE.cjs +3 -1
- package/locales/de-DE.js +3 -1
- package/locales/en-GB.cjs +3 -1
- package/locales/en-GB.js +3 -1
- package/locales/en-US.cjs +3 -1
- package/locales/en-US.js +3 -1
- package/locales/ja-JP.cjs +3 -1
- package/locales/ja-JP.js +3 -1
- package/locales/zh-CN.cjs +3 -1
- package/locales/zh-CN.js +3 -1
- package/package.json +8 -7
- package/rich-text-editor/definition.cjs +3217 -2195
- package/rich-text-editor/definition.js +3074 -2056
- package/rich-text-editor/index.cjs +20 -19
- package/rich-text-editor/index.js +3834 -3082
- package/rich-text-view/definition.cjs +30 -18
- package/rich-text-view/definition.js +22 -10
- package/rich-text-view/index.cjs +1 -1
- package/rich-text-view/index.js +46 -38
- package/selectable-box/definition.cjs +16 -5
- package/selectable-box/definition.js +16 -5
- package/selectable-box/index.cjs +11 -9
- package/selectable-box/index.js +86 -78
- package/shared/utils/slottable-request.d.ts +7 -0
- package/status/definition.cjs +76 -0
- package/status/definition.js +70 -0
- package/status/index.cjs +11 -0
- package/status/index.js +55 -0
- package/styles/core/all.css +2 -2
- package/styles/core/theme.css +2 -2
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/{data-table → table}/definition.cjs +21 -57
- package/{data-table → table}/definition.js +21 -57
- package/{data-table → table}/index.cjs +8 -8
- package/{data-table → table}/index.js +43 -79
- package/tag/definition.cjs +1 -1
- package/tag/definition.js +1 -1
- package/tag/index.cjs +24 -24
- package/tag/index.js +89 -89
- package/unbundled/{feature.cjs → slottable-request.cjs} +24 -0
- package/unbundled/{feature.js → slottable-request.js} +23 -1
- package/unbundled/vivid-element.cjs +1 -1
- package/unbundled/vivid-element.js +1 -1
- package/vivid.api.json +505 -26
- /package/lib/{data-table → table}/table-body.d.ts +0 -0
- /package/lib/{data-table → table}/table-body.template.d.ts +0 -0
- /package/lib/{data-table → table}/table-cell.d.ts +0 -0
- /package/lib/{data-table → table}/table-cell.template.d.ts +0 -0
- /package/lib/{data-table → table}/table-head.d.ts +0 -0
- /package/lib/{data-table → table}/table-head.template.d.ts +0 -0
- /package/lib/{data-table → table}/table-header-cell.d.ts +0 -0
- /package/lib/{data-table → table}/table-header-cell.template.d.ts +0 -0
- /package/lib/{data-table → table}/table-row.d.ts +0 -0
- /package/lib/{data-table → table}/table-row.template.d.ts +0 -0
- /package/lib/{data-table → table}/table.d.ts +0 -0
- /package/lib/{data-table → table}/table.template.d.ts +0 -0
package/index.cjs
CHANGED
|
@@ -24,8 +24,9 @@ const checkbox_definition = require('./checkbox/definition.cjs');
|
|
|
24
24
|
const colorPicker_definition = require('./color-picker/definition.cjs');
|
|
25
25
|
const combobox_definition = require('./combobox/definition.cjs');
|
|
26
26
|
const contextualHelp_definition = require('./contextual-help/definition.cjs');
|
|
27
|
+
const country_definition = require('./country/definition.cjs');
|
|
27
28
|
const dataGrid_definition = require('./data-grid/definition.cjs');
|
|
28
|
-
const
|
|
29
|
+
const table_definition = require('./table/definition.cjs');
|
|
29
30
|
const datePicker_definition = require('./date-picker/definition.cjs');
|
|
30
31
|
const dateRangePicker_definition = require('./date-range-picker/definition.cjs');
|
|
31
32
|
const dateTimePicker_definition = require('./date-time-picker/definition.cjs');
|
|
@@ -63,6 +64,7 @@ const sideDrawer_definition = require('./side-drawer/definition.cjs');
|
|
|
63
64
|
const simpleColorPicker_definition = require('./simple-color-picker/definition.cjs');
|
|
64
65
|
const slider_definition = require('./slider/definition.cjs');
|
|
65
66
|
const splitButton_definition = require('./split-button/definition.cjs');
|
|
67
|
+
const status_definition = require('./status/definition.cjs');
|
|
66
68
|
const switch_definition = require('./switch/definition.cjs');
|
|
67
69
|
const tabPanel_definition = require('./tab-panel/definition.cjs');
|
|
68
70
|
const tab_definition = require('./tab/definition.cjs');
|
|
@@ -149,6 +151,9 @@ exports.registerCombobox = combobox_definition.registerCombobox;
|
|
|
149
151
|
exports.VwcContextualHelpElement = contextualHelp_definition.VwcContextualHelpElement;
|
|
150
152
|
exports.contextualHelpDefinition = contextualHelp_definition.contextualHelpDefinition;
|
|
151
153
|
exports.registerContextualHelp = contextualHelp_definition.registerContextualHelp;
|
|
154
|
+
exports.VwcCountryElement = country_definition.VwcCountryElement;
|
|
155
|
+
exports.countryDefinition = country_definition.countryDefinition;
|
|
156
|
+
exports.registerCountry = country_definition.registerCountry;
|
|
152
157
|
exports.VwcDataGridCellElement = dataGrid_definition.VwcDataGridCellElement;
|
|
153
158
|
exports.VwcDataGridElement = dataGrid_definition.VwcDataGridElement;
|
|
154
159
|
exports.VwcDataGridRowElement = dataGrid_definition.VwcDataGridRowElement;
|
|
@@ -156,19 +161,19 @@ exports.dataGridCellDefinition = dataGrid_definition.dataGridCellDefinition;
|
|
|
156
161
|
exports.dataGridDefinition = dataGrid_definition.dataGridDefinition;
|
|
157
162
|
exports.dataGridRowDefinition = dataGrid_definition.dataGridRowDefinition;
|
|
158
163
|
exports.registerDataGrid = dataGrid_definition.registerDataGrid;
|
|
159
|
-
exports.VwcTableBodyElement =
|
|
160
|
-
exports.VwcTableCellElement =
|
|
161
|
-
exports.VwcTableElement =
|
|
162
|
-
exports.VwcTableHeadElement =
|
|
163
|
-
exports.VwcTableHeaderCellElement =
|
|
164
|
-
exports.VwcTableRowElement =
|
|
165
|
-
exports.
|
|
166
|
-
exports.tableBodyDefinition =
|
|
167
|
-
exports.tableCellDefinition =
|
|
168
|
-
exports.tableDefinition =
|
|
169
|
-
exports.tableHeadDefinition =
|
|
170
|
-
exports.tableHeaderCellDefinition =
|
|
171
|
-
exports.tableRowDefinition =
|
|
164
|
+
exports.VwcTableBodyElement = table_definition.VwcTableBodyElement;
|
|
165
|
+
exports.VwcTableCellElement = table_definition.VwcTableCellElement;
|
|
166
|
+
exports.VwcTableElement = table_definition.VwcTableElement;
|
|
167
|
+
exports.VwcTableHeadElement = table_definition.VwcTableHeadElement;
|
|
168
|
+
exports.VwcTableHeaderCellElement = table_definition.VwcTableHeaderCellElement;
|
|
169
|
+
exports.VwcTableRowElement = table_definition.VwcTableRowElement;
|
|
170
|
+
exports.registerTable = table_definition.registerTable;
|
|
171
|
+
exports.tableBodyDefinition = table_definition.tableBodyDefinition;
|
|
172
|
+
exports.tableCellDefinition = table_definition.tableCellDefinition;
|
|
173
|
+
exports.tableDefinition = table_definition.tableDefinition;
|
|
174
|
+
exports.tableHeadDefinition = table_definition.tableHeadDefinition;
|
|
175
|
+
exports.tableHeaderCellDefinition = table_definition.tableHeaderCellDefinition;
|
|
176
|
+
exports.tableRowDefinition = table_definition.tableRowDefinition;
|
|
172
177
|
exports.VwcDatePickerElement = datePicker_definition.VwcDatePickerElement;
|
|
173
178
|
exports.datePickerDefinition = datePicker_definition.datePickerDefinition;
|
|
174
179
|
exports.registerDatePicker = datePicker_definition.registerDatePicker;
|
|
@@ -252,6 +257,7 @@ exports.VwcRangeSliderElement = rangeSlider_definition.VwcRangeSliderElement;
|
|
|
252
257
|
exports.rangeSliderDefinition = rangeSlider_definition.rangeSliderDefinition;
|
|
253
258
|
exports.registerRangeSlider = rangeSlider_definition.registerRangeSlider;
|
|
254
259
|
exports.RteAlignmentFeature = richTextEditor_definition.RteAlignmentFeature;
|
|
260
|
+
exports.RteAtomFeature = richTextEditor_definition.RteAtomFeature;
|
|
255
261
|
exports.RteBase = richTextEditor_definition.RteBase;
|
|
256
262
|
exports.RteBoldFeature = richTextEditor_definition.RteBoldFeature;
|
|
257
263
|
exports.RteConfig = richTextEditor_definition.RteConfig;
|
|
@@ -262,14 +268,17 @@ exports.RteHardBreakFeature = richTextEditor_definition.RteHardBreakFeature;
|
|
|
262
268
|
exports.RteHtmlParser = richTextEditor_definition.RteHtmlParser;
|
|
263
269
|
exports.RteHtmlSerializer = richTextEditor_definition.RteHtmlSerializer;
|
|
264
270
|
exports.RteInlineImageFeature = richTextEditor_definition.RteInlineImageFeature;
|
|
271
|
+
exports.RteInputRuleFeature = richTextEditor_definition.RteInputRuleFeature;
|
|
265
272
|
exports.RteItalicFeature = richTextEditor_definition.RteItalicFeature;
|
|
266
273
|
exports.RteLinkFeature = richTextEditor_definition.RteLinkFeature;
|
|
267
274
|
exports.RteListFeature = richTextEditor_definition.RteListFeature;
|
|
268
275
|
exports.RteMonospaceFeature = richTextEditor_definition.RteMonospaceFeature;
|
|
269
276
|
exports.RtePlaceholderFeature = richTextEditor_definition.RtePlaceholderFeature;
|
|
270
277
|
exports.RteStrikethroughFeature = richTextEditor_definition.RteStrikethroughFeature;
|
|
278
|
+
exports.RteSuggestFeature = richTextEditor_definition.RteSuggestFeature;
|
|
271
279
|
exports.RteTextBlockPickerFeature = richTextEditor_definition.RteTextBlockPickerFeature;
|
|
272
280
|
exports.RteTextColorPickerFeature = richTextEditor_definition.RteTextColorPickerFeature;
|
|
281
|
+
exports.RteToolbarButtonFeature = richTextEditor_definition.RteToolbarButtonFeature;
|
|
273
282
|
exports.RteToolbarFeature = richTextEditor_definition.RteToolbarFeature;
|
|
274
283
|
exports.RteUnderlineFeature = richTextEditor_definition.RteUnderlineFeature;
|
|
275
284
|
exports.VwcRichTextEditorElement = richTextEditor_definition.VwcRichTextEditorElement;
|
|
@@ -298,6 +307,9 @@ exports.sliderDefinition = slider_definition.sliderDefinition;
|
|
|
298
307
|
exports.VwcSplitButtonElement = splitButton_definition.VwcSplitButtonElement;
|
|
299
308
|
exports.registerSplitButton = splitButton_definition.registerSplitButton;
|
|
300
309
|
exports.splitButtonDefinition = splitButton_definition.splitButtonDefinition;
|
|
310
|
+
exports.VwcStatusElement = status_definition.VwcStatusElement;
|
|
311
|
+
exports.registerStatus = status_definition.registerStatus;
|
|
312
|
+
exports.statusDefinition = status_definition.statusDefinition;
|
|
301
313
|
exports.VwcSwitchElement = switch_definition.VwcSwitchElement;
|
|
302
314
|
exports.registerSwitch = switch_definition.registerSwitch;
|
|
303
315
|
exports.switchDefinition = switch_definition.switchDefinition;
|
package/index.js
CHANGED
|
@@ -20,8 +20,9 @@ export { VwcCheckboxElement, checkboxDefinition, registerCheckbox } from './chec
|
|
|
20
20
|
export { VwcColorPickerElement, colorPickerDefinition, registerColorPicker } from './color-picker/definition.js';
|
|
21
21
|
export { VwcComboboxElement, comboboxDefinition, registerCombobox } from './combobox/definition.js';
|
|
22
22
|
export { VwcContextualHelpElement, contextualHelpDefinition, registerContextualHelp } from './contextual-help/definition.js';
|
|
23
|
+
export { VwcCountryElement, countryDefinition, registerCountry } from './country/definition.js';
|
|
23
24
|
export { VwcDataGridCellElement, VwcDataGridElement, VwcDataGridRowElement, dataGridCellDefinition, dataGridDefinition, dataGridRowDefinition, registerDataGrid } from './data-grid/definition.js';
|
|
24
|
-
export { VwcTableBodyElement, VwcTableCellElement, VwcTableElement, VwcTableHeadElement, VwcTableHeaderCellElement, VwcTableRowElement,
|
|
25
|
+
export { VwcTableBodyElement, VwcTableCellElement, VwcTableElement, VwcTableHeadElement, VwcTableHeaderCellElement, VwcTableRowElement, registerTable, tableBodyDefinition, tableCellDefinition, tableDefinition, tableHeadDefinition, tableHeaderCellDefinition, tableRowDefinition } from './table/definition.js';
|
|
25
26
|
export { VwcDatePickerElement, datePickerDefinition, registerDatePicker } from './date-picker/definition.js';
|
|
26
27
|
export { VwcDateRangePickerElement, dateRangePickerDefinition, registerDateRangePicker } from './date-range-picker/definition.js';
|
|
27
28
|
export { VwcDateTimePickerElement, dateTimePickerDefinition, registerDateTimePicker } from './date-time-picker/definition.js';
|
|
@@ -50,7 +51,7 @@ export { VwcProgressElement, progressDefinition, registerProgress } from './prog
|
|
|
50
51
|
export { VwcRadioGroupElement, radioGroupDefinition, registerRadioGroup } from './radio-group/definition.js';
|
|
51
52
|
export { VwcRadioElement, radioDefinition, registerRadio } from './radio/definition.js';
|
|
52
53
|
export { VwcRangeSliderElement, rangeSliderDefinition, registerRangeSlider } from './range-slider/definition.js';
|
|
53
|
-
export { RteAlignmentFeature, RteBase, RteBoldFeature, RteConfig, RteDropHandlerFeature, RteFileHandlerFeature, RteFontSizePickerFeature, RteHardBreakFeature, RteHtmlParser, RteHtmlSerializer, RteInlineImageFeature, RteItalicFeature, RteLinkFeature, RteListFeature, RteMonospaceFeature, RtePlaceholderFeature, RteStrikethroughFeature, RteTextBlockPickerFeature, RteTextColorPickerFeature, RteToolbarFeature, RteUnderlineFeature, VwcRichTextEditorElement, registerRichTextEditor, richTextEditorDefinition } from './rich-text-editor/definition.js';
|
|
54
|
+
export { RteAlignmentFeature, RteAtomFeature, RteBase, RteBoldFeature, RteConfig, RteDropHandlerFeature, RteFileHandlerFeature, RteFontSizePickerFeature, RteHardBreakFeature, RteHtmlParser, RteHtmlSerializer, RteInlineImageFeature, RteInputRuleFeature, RteItalicFeature, RteLinkFeature, RteListFeature, RteMonospaceFeature, RtePlaceholderFeature, RteStrikethroughFeature, RteSuggestFeature, RteTextBlockPickerFeature, RteTextColorPickerFeature, RteToolbarButtonFeature, RteToolbarFeature, RteUnderlineFeature, VwcRichTextEditorElement, registerRichTextEditor, richTextEditorDefinition } from './rich-text-editor/definition.js';
|
|
54
55
|
export { VwcRichTextViewElement, registerRichTextView, richTextViewDefinition } from './rich-text-view/definition.js';
|
|
55
56
|
export { VwcSearchableSelectElement, registerSearchableSelect } from './searchable-select/definition.js';
|
|
56
57
|
export { VwcSelectElement, registerSelect, selectDefinition } from './select/definition.js';
|
|
@@ -59,6 +60,7 @@ export { VwcSideDrawerElement, registerSideDrawer, sideDrawerDefinition } from '
|
|
|
59
60
|
export { VwcSimpleColorPickerElement, registerSimpleColorPicker, simpleColorPickerDefinition } from './simple-color-picker/definition.js';
|
|
60
61
|
export { VwcSliderElement, registerSlider, sliderDefinition } from './slider/definition.js';
|
|
61
62
|
export { VwcSplitButtonElement, registerSplitButton, splitButtonDefinition } from './split-button/definition.js';
|
|
63
|
+
export { VwcStatusElement, registerStatus, statusDefinition } from './status/definition.js';
|
|
62
64
|
export { VwcSwitchElement, registerSwitch, switchDefinition } from './switch/definition.js';
|
|
63
65
|
export { VwcTabPanelElement, registerTabPanel, tabPanelDefinition } from './tab-panel/definition.js';
|
|
64
66
|
export { VwcTabElement, registerTab, tabDefinition } from './tab/definition.js';
|
package/lib/components.d.ts
CHANGED
|
@@ -16,8 +16,9 @@ export * from './checkbox/definition';
|
|
|
16
16
|
export * from './color-picker/definition';
|
|
17
17
|
export * from './combobox/definition';
|
|
18
18
|
export * from './contextual-help/definition';
|
|
19
|
+
export * from './country/definition';
|
|
19
20
|
export * from './data-grid/definition';
|
|
20
|
-
export * from './
|
|
21
|
+
export * from './table/definition';
|
|
21
22
|
export * from './date-picker/definition';
|
|
22
23
|
export * from './date-range-picker/definition';
|
|
23
24
|
export * from './date-time-picker/definition';
|
|
@@ -54,6 +55,7 @@ export * from './side-drawer/definition';
|
|
|
54
55
|
export * from './simple-color-picker/definition';
|
|
55
56
|
export * from './slider/definition';
|
|
56
57
|
export * from './split-button/definition';
|
|
58
|
+
export * from './status/definition';
|
|
57
59
|
export * from './switch/definition';
|
|
58
60
|
export * from './tab-panel/definition';
|
|
59
61
|
export * from './tab/definition';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { countries, type Country } from './countries-data';
|
|
2
|
+
export type { Country };
|
|
3
|
+
export { countries };
|
|
4
|
+
export declare function getDialCode(countryCode: string | undefined): string | undefined;
|
|
5
|
+
export declare function getFlagIconName(countryCode: string | undefined): string | undefined;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { VividElementDefinitionContext } from '../../shared/design-system/defineVividComponent';
|
|
2
|
+
import type { Country } from './country';
|
|
3
|
+
export declare const CountryTemplate: (context: VividElementDefinitionContext) => import("@microsoft/fast-element").ViewTemplate<Country, any>;
|
|
@@ -2,6 +2,7 @@ import { VividElement } from '../../shared/foundation/vivid-element/vivid-elemen
|
|
|
2
2
|
export declare class Popover extends VividElement {
|
|
3
3
|
#private;
|
|
4
4
|
static setBlockPopover(onElement: HTMLElement, block: boolean): void;
|
|
5
|
+
kind: 'default' | 'autocomplete';
|
|
5
6
|
offset?: number;
|
|
6
7
|
anchorBlocksPopover: boolean;
|
|
7
8
|
onAnchorBlockPopoverChanged: () => void;
|
|
@@ -15,7 +15,8 @@ export declare class RteConfigImpl {
|
|
|
15
15
|
schema: Schema;
|
|
16
16
|
textblockAttrs: TextblockAttrs;
|
|
17
17
|
textblockMarks: TextblockMarks;
|
|
18
|
-
|
|
18
|
+
featureFacadesMap: Map<Constructor<RteFeature>, RteFeatureImpl[]>;
|
|
19
|
+
featureMap: Map<string, RteFeatureImpl>;
|
|
19
20
|
features: RteFeatureImpl[];
|
|
20
21
|
constructor(featuresFacades: RteFeature[]);
|
|
21
22
|
}
|
|
@@ -17,6 +17,10 @@ export { RteLinkFeature } from './features/link';
|
|
|
17
17
|
export { RteInlineImageFeature } from './features/inline-image';
|
|
18
18
|
export { RteFileHandlerFeature } from './features/file-handler';
|
|
19
19
|
export { RteDropHandlerFeature } from './features/drop-handler';
|
|
20
|
+
export { RteToolbarButtonFeature } from './features/toolbar-button';
|
|
21
|
+
export { RteAtomFeature } from './features/atom';
|
|
22
|
+
export { RteInputRuleFeature } from './features/input-rule';
|
|
23
|
+
export { RteSuggestFeature } from './features/suggest';
|
|
20
24
|
export { RteHtmlParser } from './html-parser';
|
|
21
25
|
export { RteHtmlSerializer } from './html-serializer';
|
|
22
26
|
export type { RteInstance } from './instance';
|
|
@@ -6,6 +6,7 @@ import { TextblockAttrs, type TextblockAttrSpec } from './utils/textblock-attrs'
|
|
|
6
6
|
import { impl } from './utils/impl';
|
|
7
7
|
import type { ToolbarItemSpec } from './features/toolbar';
|
|
8
8
|
import { TextblockMarks, type TextblockMarkSpec } from './utils/textblock-marks';
|
|
9
|
+
import type { InputRuleSpec } from './features/internal/input-rules';
|
|
9
10
|
type Contribution<T> = {
|
|
10
11
|
priority: number;
|
|
11
12
|
featureName: string;
|
|
@@ -25,10 +26,12 @@ export type TextblockAttrContribution = Contribution<TextblockAttrSpec>;
|
|
|
25
26
|
export type TextblockMarkContribution = Contribution<TextblockMarkSpec>;
|
|
26
27
|
export type PluginContribution = Contribution<Plugin>;
|
|
27
28
|
export type ToolbarItemContribution = Contribution<ToolbarItemSpec>;
|
|
29
|
+
export type InputRuleContribution = Contribution<InputRuleSpec>;
|
|
28
30
|
export declare abstract class RteFeature {
|
|
29
31
|
}
|
|
30
32
|
export declare abstract class RteFeatureImpl {
|
|
31
|
-
|
|
33
|
+
abstract name: string;
|
|
34
|
+
featureId?: string;
|
|
32
35
|
protected contribution<T>(value: T, order?: number): Contribution<T>;
|
|
33
36
|
getStyles(): StyleContribution[];
|
|
34
37
|
getSchema(textblockAttrs: TextblockAttrs, textblockMarks: TextblockMarks): SchemaContribution[];
|
|
@@ -36,11 +39,14 @@ export declare abstract class RteFeatureImpl {
|
|
|
36
39
|
getTextblockMarks(): TextblockMarkContribution[];
|
|
37
40
|
getPlugins(rte: RteInstanceImpl): PluginContribution[];
|
|
38
41
|
getToolbarItems(rte: RteInstanceImpl): ToolbarItemContribution[];
|
|
42
|
+
getInputRules(rte: RteInstanceImpl): InputRuleContribution[];
|
|
39
43
|
getFeatures(): RteFeatureImpl[];
|
|
44
|
+
getPublicInterface(rte: RteInstanceImpl): any;
|
|
40
45
|
}
|
|
41
46
|
export declare const featureFacade: <T extends RteFeatureImpl, C extends Constructor<T>>(FeatureImpl: C) => {
|
|
42
47
|
new (...args: ConstructorParameters<C>): {
|
|
43
48
|
[impl]: T;
|
|
44
49
|
};
|
|
45
50
|
};
|
|
51
|
+
export declare function getPublicInterface(facade: Constructor<RteFeature>): unknown;
|
|
46
52
|
export {};
|
|
@@ -12,7 +12,7 @@ type EnabledBlocks = {
|
|
|
12
12
|
};
|
|
13
13
|
export declare class RteBasicTextBlocksImpl extends RteFeatureImpl {
|
|
14
14
|
protected enabledBlocks: EnabledBlocks;
|
|
15
|
-
|
|
15
|
+
name: string;
|
|
16
16
|
constructor(enabledBlocks: EnabledBlocks);
|
|
17
17
|
getStyles(): {
|
|
18
18
|
priority: number;
|
|
@@ -2,7 +2,7 @@ import { Plugin } from 'prosemirror-state';
|
|
|
2
2
|
import { RteFeatureImpl } from '../../feature';
|
|
3
3
|
import type { RteInstanceImpl } from '../../instance';
|
|
4
4
|
export declare class RteForeignHtmlFeatureImpl extends RteFeatureImpl {
|
|
5
|
-
|
|
5
|
+
name: string;
|
|
6
6
|
getPlugins(rte: RteInstanceImpl): {
|
|
7
7
|
priority: number;
|
|
8
8
|
featureName: string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type InputRule } from 'prosemirror-inputrules';
|
|
2
|
+
import { type EditorState, type Transaction } from 'prosemirror-state';
|
|
3
|
+
import { type PluginContribution, RteFeatureImpl } from '../../feature';
|
|
4
|
+
import type { RteInstanceImpl } from '../../instance';
|
|
5
|
+
export interface InputRuleSpec {
|
|
6
|
+
rule: InputRule;
|
|
7
|
+
enterHandler?: {
|
|
8
|
+
regex: RegExp;
|
|
9
|
+
handler: (state: EditorState, match: RegExpMatchArray, start: number, end: number) => Transaction | null;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export declare class RteInputRulesFeatureImpl extends RteFeatureImpl {
|
|
13
|
+
name: string;
|
|
14
|
+
getPlugins(rte: RteInstanceImpl): PluginContribution[];
|
|
15
|
+
}
|
|
@@ -6,7 +6,7 @@ import type { Constructor } from '../../../shared/utils/mixins';
|
|
|
6
6
|
import type { Locale } from '../../../shared/localization/Locale';
|
|
7
7
|
import { RteConfig, RteConfigImpl } from './config';
|
|
8
8
|
import { type HostState } from './features/internal/core';
|
|
9
|
-
import { RteFeatureImpl } from './feature';
|
|
9
|
+
import { type getPublicInterface, type RteFeature, type RteFeatureImpl } from './feature';
|
|
10
10
|
import type { RteDocument, RteFragment } from './document';
|
|
11
11
|
import type { TextblockAttrs } from './utils/textblock-attrs';
|
|
12
12
|
import { RteHtmlParser } from './html-parser';
|
|
@@ -30,6 +30,7 @@ export declare class RteInstance {
|
|
|
30
30
|
cursorPlacement?: 'start' | 'end';
|
|
31
31
|
selectContent?: boolean;
|
|
32
32
|
}): void;
|
|
33
|
+
feature: typeof getPublicInterface;
|
|
33
34
|
}
|
|
34
35
|
export declare class RteInstanceImpl {
|
|
35
36
|
readonly options?: RteInstanceOptions | undefined;
|
|
@@ -41,7 +42,8 @@ export declare class RteInstanceImpl {
|
|
|
41
42
|
readonly styles: ElementStyles;
|
|
42
43
|
readonly foreignHtmlParser: RteHtmlParser;
|
|
43
44
|
readonly foreignHtmlSerializer: RteHtmlSerializer;
|
|
44
|
-
getFeature<T extends RteFeatureImpl>(
|
|
45
|
+
getFeature<T extends RteFeatureImpl>(name: string): T;
|
|
46
|
+
getPublicInterface(Feature: Constructor<RteFeature>, featureId?: string): any;
|
|
45
47
|
constructor(configFacade: RteConfig, options?: RteInstanceOptions | undefined);
|
|
46
48
|
protected initState(initialDoc?: RteDocument): void;
|
|
47
49
|
reset(initialDocument?: RteDocument): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Plugin } from 'prosemirror-state';
|
|
2
|
+
import type { RteInstanceImpl } from '../instance';
|
|
3
|
+
export declare class FeatureState<T> {
|
|
4
|
+
plugin: Plugin<T>;
|
|
5
|
+
constructor(initialValue: T);
|
|
6
|
+
getValue(rte: RteInstanceImpl): T;
|
|
7
|
+
setValue(rte: RteInstanceImpl, newValue: T): void;
|
|
8
|
+
}
|
|
@@ -3,7 +3,7 @@ import type { RteDocument, RteMark, RteNode } from './document';
|
|
|
3
3
|
import { impl } from './utils/impl';
|
|
4
4
|
export type RteView = ({
|
|
5
5
|
type: 'node';
|
|
6
|
-
node:
|
|
6
|
+
node: RteNode;
|
|
7
7
|
children: RteView;
|
|
8
8
|
} | {
|
|
9
9
|
type: 'mark';
|
|
@@ -25,6 +25,6 @@ export type RteViewOptions = {
|
|
|
25
25
|
}) => {
|
|
26
26
|
dom: HTMLElement;
|
|
27
27
|
contentDom?: HTMLElement;
|
|
28
|
-
} | false;
|
|
28
|
+
} | true | false;
|
|
29
29
|
};
|
|
30
30
|
export declare const convertToView: (doc: RteDocument, ctx: RteViewCtx) => RteView;
|
|
@@ -2,3 +2,4 @@ import { RichTextView } from './rich-text-view';
|
|
|
2
2
|
export declare const richTextViewDefinition: import("../../shared/design-system/defineVividComponent").VividComponentDefinition;
|
|
3
3
|
export declare const registerRichTextView: (prefix?: string) => void;
|
|
4
4
|
export { RichTextView as VwcRichTextViewElement };
|
|
5
|
+
export type { RteChildSlotProps } from './rich-text-view';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { VividElement } from '../../shared/foundation/vivid-element/vivid-element';
|
|
2
2
|
import type { RteView } from '../rich-text-editor/rte/view';
|
|
3
|
+
export type RteChildSlotProps = {
|
|
4
|
+
view: RteView;
|
|
5
|
+
};
|
|
3
6
|
export declare class RichTextView extends VividElement {
|
|
4
7
|
view?: RteView;
|
|
5
8
|
private _styles?;
|
|
@@ -7,6 +10,7 @@ export declare class RichTextView extends VividElement {
|
|
|
7
10
|
private _removeStyles;
|
|
8
11
|
private _slotCounter;
|
|
9
12
|
private _slottedChildren;
|
|
13
|
+
private _slotRequests;
|
|
10
14
|
private _cleanupLightDom;
|
|
11
15
|
private _updateView;
|
|
12
16
|
private _renderView;
|