@vonage/vivid 5.8.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/data-grid.options.cjs +1 -0
- package/bundled/data-grid.options.js +29 -0
- package/bundled/definition10.js +4 -4
- package/bundled/definition2.cjs +1 -1
- package/bundled/definition2.js +1 -1
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +1 -1
- package/bundled/definition7.js +3 -3
- package/bundled/definition9.cjs +9 -9
- package/bundled/definition9.js +113 -1342
- package/bundled/floating-ui.dom.cjs +1 -0
- package/bundled/floating-ui.dom.js +1242 -0
- package/bundled/host-semantics.js +4 -4
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +21 -16
- package/bundled/mixins.cjs +2 -2
- package/bundled/mixins.js +6 -6
- package/bundled/slottable-request.cjs +4 -0
- package/bundled/slottable-request.js +2907 -0
- package/bundled/vivid-element.cjs +3 -3
- package/bundled/vivid-element.js +89 -69
- 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/combobox/definition.cjs +14 -15
- package/combobox/definition.js +15 -16
- package/combobox/index.cjs +4 -4
- package/combobox/index.js +82 -87
- 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 +4835 -613
- package/data-grid/definition.cjs +23 -49
- package/data-grid/definition.js +1 -27
- package/data-grid/index.cjs +27 -27
- package/data-grid/index.js +44 -64
- package/file-picker/definition.cjs +10 -8
- package/file-picker/definition.js +10 -8
- package/file-picker/index.cjs +5 -5
- package/file-picker/index.js +12 -12
- package/icon/definition.cjs +1 -1
- package/icon/definition.js +1 -1
- package/index.cjs +38 -4
- package/index.js +7 -2
- package/lib/components.d.ts +6 -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/popover/definition.d.ts +4 -0
- package/lib/popover/locale.d.ts +3 -0
- package/lib/popover/popover.d.ts +781 -0
- package/lib/popover/popover.template.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 +5 -1
- package/lib/rich-text-editor/rte/document.d.ts +2 -0
- package/lib/rich-text-editor/rte/exports.d.ts +5 -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 +30 -0
- package/lib/rich-text-view/definition.d.ts +5 -0
- package/lib/rich-text-view/rich-text-view.d.ts +19 -0
- package/lib/rich-text-view/rich-text-view.template.d.ts +3 -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/table/definition.d.ts +8 -0
- package/lib/table/table-body.d.ts +3 -0
- package/lib/table/table-body.template.d.ts +3 -0
- package/lib/table/table-cell.d.ts +381 -0
- package/lib/table/table-cell.template.d.ts +3 -0
- package/lib/table/table-head.d.ts +3 -0
- package/lib/table/table-head.template.d.ts +3 -0
- package/lib/table/table-header-cell.d.ts +381 -0
- package/lib/table/table-header-cell.template.d.ts +3 -0
- package/lib/table/table-row.d.ts +381 -0
- package/lib/table/table-row.template.d.ts +3 -0
- package/lib/table/table.d.ts +3 -0
- package/lib/table/table.template.d.ts +3 -0
- package/lib/tag/tag.d.ts +1 -1
- package/lib/tag-name-map.d.ts +11 -1
- package/locales/de-DE.cjs +6 -1
- package/locales/de-DE.js +6 -1
- package/locales/en-GB.cjs +6 -1
- package/locales/en-GB.js +6 -1
- package/locales/en-US.cjs +6 -1
- package/locales/en-US.js +6 -1
- package/locales/ja-JP.cjs +6 -1
- package/locales/ja-JP.js +6 -1
- package/locales/zh-CN.cjs +6 -1
- package/locales/zh-CN.js +6 -1
- package/package.json +10 -9
- package/popover/definition.cjs +363 -0
- package/popover/definition.js +357 -0
- package/popover/index.cjs +27 -0
- package/popover/index.js +263 -0
- package/rich-text-editor/definition.cjs +12125 -14657
- package/rich-text-editor/definition.js +8876 -11412
- package/rich-text-editor/index.cjs +20 -22
- package/rich-text-editor/index.js +5046 -7096
- package/rich-text-view/definition.cjs +171 -0
- package/rich-text-view/definition.js +165 -0
- package/rich-text-view/index.cjs +1 -0
- package/rich-text-view/index.js +103 -0
- 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/localization/Locale.d.ts +2 -0
- 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/table/definition.cjs +168 -0
- package/table/definition.js +152 -0
- package/table/index.cjs +37 -0
- package/table/index.js +107 -0
- 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/_commonjsHelpers.cjs +26 -0
- package/unbundled/_commonjsHelpers.js +26 -1
- package/unbundled/data-grid.options.cjs +34 -0
- package/unbundled/data-grid.options.js +28 -0
- package/unbundled/definition.cjs +1 -1
- package/unbundled/definition.js +1 -1
- package/unbundled/slottable-request.cjs +3702 -0
- package/unbundled/slottable-request.js +3684 -0
- package/unbundled/vivid-element.cjs +1 -1
- package/unbundled/vivid-element.js +1 -1
- package/video-player/definition.cjs +11 -1
- package/video-player/definition.js +12 -2
- package/video-player/index.cjs +30 -30
- package/video-player/index.js +705 -702
- package/vivid.api.json +1957 -143
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { VividElementDefinitionContext } from '../../shared/design-system/defineVividComponent';
|
|
2
|
+
import { Popover } from './popover';
|
|
3
|
+
export declare const popoverTemplate: (context: VividElementDefinitionContext) => import("@microsoft/fast-element").ViewTemplate<Popover, 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;
|
|
@@ -4,15 +4,19 @@ import { RteInstance, type RteInstanceOptions } from './instance';
|
|
|
4
4
|
import { RteFeature, RteFeatureImpl } from './feature';
|
|
5
5
|
import { TextblockAttrs } from './utils/textblock-attrs';
|
|
6
6
|
import { TextblockMarks } from './utils/textblock-marks';
|
|
7
|
+
import type { RteDocument } from './document';
|
|
8
|
+
import { type RteView, type RteViewOptions } from './view';
|
|
7
9
|
export declare class RteConfig {
|
|
8
10
|
constructor(features: RteFeature[]);
|
|
9
11
|
instantiateEditor(options?: RteInstanceOptions): RteInstance;
|
|
12
|
+
instantiateView(document: RteDocument, options?: RteViewOptions): RteView;
|
|
10
13
|
}
|
|
11
14
|
export declare class RteConfigImpl {
|
|
12
15
|
schema: Schema;
|
|
13
16
|
textblockAttrs: TextblockAttrs;
|
|
14
17
|
textblockMarks: TextblockMarks;
|
|
15
|
-
|
|
18
|
+
featureFacadesMap: Map<Constructor<RteFeature>, RteFeatureImpl[]>;
|
|
19
|
+
featureMap: Map<string, RteFeatureImpl>;
|
|
16
20
|
features: RteFeatureImpl[];
|
|
17
21
|
constructor(featuresFacades: RteFeature[]);
|
|
18
22
|
}
|
|
@@ -21,6 +21,8 @@ type RegularNode = {
|
|
|
21
21
|
marks?: Mark[];
|
|
22
22
|
content?: Array<RteNode>;
|
|
23
23
|
};
|
|
24
|
+
export type RteTextNode = TextNode;
|
|
25
|
+
export type RteRegularNode = RegularNode;
|
|
24
26
|
export type RteNode = TextNode | RegularNode;
|
|
25
27
|
export type RteMark = Mark;
|
|
26
28
|
export type RteDocument = Doc;
|
|
@@ -17,7 +17,12 @@ 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';
|
|
23
27
|
export type { RteDocument, RteFragment, RteNode, RteMark } from './document';
|
|
28
|
+
export type { RteView, RteViewOptions } from './view';
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { RteConfig } from './config';
|
|
2
|
+
import type { RteDocument, RteMark, RteNode } from './document';
|
|
3
|
+
import { impl } from './utils/impl';
|
|
4
|
+
export type RteView = ({
|
|
5
|
+
type: 'node';
|
|
6
|
+
node: RteNode;
|
|
7
|
+
children: RteView;
|
|
8
|
+
} | {
|
|
9
|
+
type: 'mark';
|
|
10
|
+
mark: RteMark;
|
|
11
|
+
children: RteView;
|
|
12
|
+
} | {
|
|
13
|
+
type: 'fragment';
|
|
14
|
+
content: RteView[];
|
|
15
|
+
}) & {
|
|
16
|
+
[impl]: RteViewCtx;
|
|
17
|
+
};
|
|
18
|
+
export type RteViewCtx = {
|
|
19
|
+
config: RteConfig;
|
|
20
|
+
options: RteViewOptions;
|
|
21
|
+
};
|
|
22
|
+
export type RteViewOptions = {
|
|
23
|
+
renderChildView?: (view: RteView & {
|
|
24
|
+
type: 'node' | 'mark';
|
|
25
|
+
}) => {
|
|
26
|
+
dom: HTMLElement;
|
|
27
|
+
contentDom?: HTMLElement;
|
|
28
|
+
} | true | false;
|
|
29
|
+
};
|
|
30
|
+
export declare const convertToView: (doc: RteDocument, ctx: RteViewCtx) => RteView;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RichTextView } from './rich-text-view';
|
|
2
|
+
export declare const richTextViewDefinition: import("../../shared/design-system/defineVividComponent").VividComponentDefinition;
|
|
3
|
+
export declare const registerRichTextView: (prefix?: string) => void;
|
|
4
|
+
export { RichTextView as VwcRichTextViewElement };
|
|
5
|
+
export type { RteChildSlotProps } from './rich-text-view';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { VividElement } from '../../shared/foundation/vivid-element/vivid-element';
|
|
2
|
+
import type { RteView } from '../rich-text-editor/rte/view';
|
|
3
|
+
export type RteChildSlotProps = {
|
|
4
|
+
view: RteView;
|
|
5
|
+
};
|
|
6
|
+
export declare class RichTextView extends VividElement {
|
|
7
|
+
view?: RteView;
|
|
8
|
+
private _styles?;
|
|
9
|
+
private _addStyles;
|
|
10
|
+
private _removeStyles;
|
|
11
|
+
private _slotCounter;
|
|
12
|
+
private _slottedChildren;
|
|
13
|
+
private _slotRequests;
|
|
14
|
+
private _cleanupLightDom;
|
|
15
|
+
private _updateView;
|
|
16
|
+
private _renderView;
|
|
17
|
+
private _handleCustomRender;
|
|
18
|
+
private _renderDefault;
|
|
19
|
+
}
|