@voiceflow/dtos-interact 2.7.1-5bcfac066d.14 → 2.8.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.
|
@@ -1,35 +1,39 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
|
+
import type { Enum } from '../utils/enum.util.js';
|
|
2
3
|
export interface SlateTextColor {
|
|
3
4
|
r: number;
|
|
4
5
|
g: number;
|
|
5
6
|
b: number;
|
|
6
7
|
a: number;
|
|
7
8
|
}
|
|
8
|
-
export declare
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
9
|
+
export declare const SlateTextProperty: {
|
|
10
|
+
readonly COLOR: "color";
|
|
11
|
+
readonly ITALIC: "italic";
|
|
12
|
+
readonly UNDERLINE: "underline";
|
|
13
|
+
readonly FONT_WEIGHT: "fontWeight";
|
|
14
|
+
readonly FONT_FAMILY: "fontFamily";
|
|
15
|
+
readonly STRIKE_THROUGH: "strikeThrough";
|
|
16
|
+
readonly BACKGROUND_COLOR: "backgroundColor";
|
|
17
|
+
};
|
|
18
|
+
export type SlateTextProperty = Enum<typeof SlateTextProperty>;
|
|
19
|
+
export declare const SlateTextElementType: {
|
|
20
|
+
readonly LINK: "link";
|
|
21
|
+
readonly VARIABLE: "variable";
|
|
22
|
+
};
|
|
23
|
+
export type SlateTextElementType = Enum<typeof SlateTextElementType>;
|
|
24
|
+
export declare const SlateTextElementProperty: {
|
|
25
|
+
readonly TEXT_ALIGN: "textAlign";
|
|
26
|
+
};
|
|
27
|
+
export type SlateTextElementProperty = Enum<typeof SlateTextElementProperty>;
|
|
24
28
|
export interface SlateText {
|
|
25
29
|
text: string;
|
|
26
|
-
[SlateTextProperty.BACKGROUND_COLOR]?: SlateTextColor;
|
|
27
30
|
[SlateTextProperty.COLOR]?: SlateTextColor;
|
|
28
31
|
[SlateTextProperty.ITALIC]?: boolean;
|
|
29
32
|
[SlateTextProperty.UNDERLINE]?: boolean;
|
|
30
33
|
[SlateTextProperty.FONT_WEIGHT]?: string;
|
|
31
34
|
[SlateTextProperty.FONT_FAMILY]?: string;
|
|
32
35
|
[SlateTextProperty.STRIKE_THROUGH]?: boolean;
|
|
36
|
+
[SlateTextProperty.BACKGROUND_COLOR]?: SlateTextColor;
|
|
33
37
|
}
|
|
34
38
|
export interface SlateTextElement {
|
|
35
39
|
type?: string;
|
|
@@ -37,11 +41,11 @@ export interface SlateTextElement {
|
|
|
37
41
|
[SlateTextElementProperty.TEXT_ALIGN]?: string;
|
|
38
42
|
}
|
|
39
43
|
export interface SlateTextLinkElement extends SlateTextElement {
|
|
40
|
-
type: SlateTextElementType.LINK;
|
|
44
|
+
type: typeof SlateTextElementType.LINK;
|
|
41
45
|
url?: string;
|
|
42
46
|
}
|
|
43
47
|
export interface SlateTextVariableElement extends SlateTextElement {
|
|
44
|
-
type: SlateTextElementType.VARIABLE;
|
|
48
|
+
type: typeof SlateTextElementType.VARIABLE;
|
|
45
49
|
id: string;
|
|
46
50
|
path?: string;
|
|
47
51
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.dto.d.ts","sourceRoot":"","sources":["../../../src/text/text.dto.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,WAAW,cAAc;IAC7B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,
|
|
1
|
+
{"version":3,"file":"text.dto.d.ts","sourceRoot":"","sources":["../../../src/text/text.dto.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,KAAK,EAAE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AgB;IAC5D,IAAI,EAAE,OAAO,oBAAoB,CAAC,IAAI,CAAC;IACvC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,wBAAyB,SAAQ,gBAAgB;IAChE,IAAI,EAAE,OAAO,oBAAoB,CAAC,QAAQ,CAAC;IAC3C,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,GAAG,oBAAoB,GAAG,wBAAwB,CAAC;AAErG,MAAM,MAAM,UAAU,GAAG,mBAAmB,GAAG,SAAS,CAAC;AAEzD,eAAO,MAAM,0BAA0B,GAAI,SAAS,gBAAgB,KAAG,OAAO,IAAI,wBAClC,CAAC;AAEjD,eAAO,MAAM,sBAAsB,GAAI,SAAS,gBAAgB,KAAG,OAAO,IAAI,oBAClC,CAAC;AAG7C,eAAO,MAAM,iBAAiB,sIAA2D,CAAC;AAE1F,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -1,29 +1,22 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
SlateTextProperty["STRIKE_THROUGH"] = "strikeThrough";
|
|
11
|
-
})(SlateTextProperty || (SlateTextProperty = {}));
|
|
12
|
-
export var SlateTextElementType;
|
|
13
|
-
(function (SlateTextElementType) {
|
|
14
|
-
SlateTextElementType["LINK"] = "link";
|
|
15
|
-
SlateTextElementType["VARIABLE"] = "variable";
|
|
16
|
-
})(SlateTextElementType || (SlateTextElementType = {}));
|
|
17
|
-
export var SlateTextElementProperty;
|
|
18
|
-
(function (SlateTextElementProperty) {
|
|
19
|
-
SlateTextElementProperty["TEXT_ALIGN"] = "textAlign";
|
|
20
|
-
})(SlateTextElementProperty || (SlateTextElementProperty = {}));
|
|
21
|
-
export const isSlateTextVariableElement = (element) => {
|
|
22
|
-
return element.type === SlateTextElementType.VARIABLE;
|
|
2
|
+
export const SlateTextProperty = {
|
|
3
|
+
COLOR: 'color',
|
|
4
|
+
ITALIC: 'italic',
|
|
5
|
+
UNDERLINE: 'underline',
|
|
6
|
+
FONT_WEIGHT: 'fontWeight',
|
|
7
|
+
FONT_FAMILY: 'fontFamily',
|
|
8
|
+
STRIKE_THROUGH: 'strikeThrough',
|
|
9
|
+
BACKGROUND_COLOR: 'backgroundColor',
|
|
23
10
|
};
|
|
24
|
-
export const
|
|
25
|
-
|
|
11
|
+
export const SlateTextElementType = {
|
|
12
|
+
LINK: 'link',
|
|
13
|
+
VARIABLE: 'variable',
|
|
26
14
|
};
|
|
15
|
+
export const SlateTextElementProperty = {
|
|
16
|
+
TEXT_ALIGN: 'textAlign',
|
|
17
|
+
};
|
|
18
|
+
export const isSlateTextVariableElement = (element) => element.type === SlateTextElementType.VARIABLE;
|
|
19
|
+
export const isSlateTextLinkElement = (element) => element.type === SlateTextElementType.LINK;
|
|
27
20
|
// TODO: define and manage later
|
|
28
21
|
export const SlateTextValueDTO = z.array(z.any().transform((value) => value));
|
|
29
22
|
//# sourceMappingURL=text.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.dto.js","sourceRoot":"","sources":["../../../src/text/text.dto.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"text.dto.js","sourceRoot":"","sources":["../../../src/text/text.dto.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAWpB,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,WAAW;IACtB,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,YAAY;IACzB,cAAc,EAAE,eAAe;IAC/B,gBAAgB,EAAE,iBAAiB;CAC3B,CAAC;AAIX,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;CACZ,CAAC;AAIX,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,UAAU,EAAE,WAAW;CACf,CAAC;AAuCX,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,OAAyB,EAAuC,EAAE,CAC3G,OAAO,CAAC,IAAI,KAAK,oBAAoB,CAAC,QAAQ,CAAC;AAEjD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,OAAyB,EAAmC,EAAE,CACnG,OAAO,CAAC,IAAI,KAAK,oBAAoB,CAAC,IAAI,CAAC;AAE7C,gCAAgC;AAChC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,KAAiB,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voiceflow/dtos-interact",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"build"
|
|
6
6
|
],
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"volta": {
|
|
42
42
|
"extends": "../../package.json"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "f8f993d1db478b67579a2d960aed2016b41aa019"
|
|
45
45
|
}
|