@voiceflow/base-types 2.11.1 → 2.12.1
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.
|
@@ -48,3 +48,5 @@ export interface VariableElement extends Element {
|
|
|
48
48
|
export declare type AnyElement = Element | LinkElement | VariableElement;
|
|
49
49
|
export declare type Descendant = AnyElement | Text;
|
|
50
50
|
export declare type SlateTextValue = Descendant[];
|
|
51
|
+
export declare const isVariableElement: (element: Element) => element is VariableElement;
|
|
52
|
+
export declare const isLinkElement: (element: Element) => element is LinkElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ElementProperty = exports.ElementType = exports.TextProperty = void 0;
|
|
3
|
+
exports.isLinkElement = exports.isVariableElement = exports.ElementProperty = exports.ElementType = exports.TextProperty = void 0;
|
|
4
4
|
var TextProperty;
|
|
5
5
|
(function (TextProperty) {
|
|
6
6
|
TextProperty["BACKGROUND_COLOR"] = "backgroundColor";
|
|
@@ -20,4 +20,12 @@ var ElementProperty;
|
|
|
20
20
|
(function (ElementProperty) {
|
|
21
21
|
ElementProperty["TEXT_ALIGN"] = "textAlign";
|
|
22
22
|
})(ElementProperty = exports.ElementProperty || (exports.ElementProperty = {}));
|
|
23
|
+
const isVariableElement = (element) => {
|
|
24
|
+
return element.type === ElementType.VARIABLE;
|
|
25
|
+
};
|
|
26
|
+
exports.isVariableElement = isVariableElement;
|
|
27
|
+
const isLinkElement = (element) => {
|
|
28
|
+
return element.type === ElementType.LINK;
|
|
29
|
+
};
|
|
30
|
+
exports.isLinkElement = isLinkElement;
|
|
23
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/text/index.ts"],"names":[],"mappings":";;;AASA,IAAY,YAQX;AARD,WAAY,YAAY;IACtB,oDAAoC,CAAA;IACpC,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AAW,CAAC,IAAI,CAAC;AAC3C,CAAC,CAAC;AAFW,QAAA,aAAa,iBAExB"}
|
|
@@ -48,3 +48,5 @@ export interface VariableElement extends Element {
|
|
|
48
48
|
export declare type AnyElement = Element | LinkElement | VariableElement;
|
|
49
49
|
export declare type Descendant = AnyElement | Text;
|
|
50
50
|
export declare type SlateTextValue = Descendant[];
|
|
51
|
+
export declare const isVariableElement: (element: Element) => element is VariableElement;
|
|
52
|
+
export declare const isLinkElement: (element: Element) => element is LinkElement;
|
package/build/esm/text/index.js
CHANGED
|
@@ -17,4 +17,10 @@ export var ElementProperty;
|
|
|
17
17
|
(function (ElementProperty) {
|
|
18
18
|
ElementProperty["TEXT_ALIGN"] = "textAlign";
|
|
19
19
|
})(ElementProperty || (ElementProperty = {}));
|
|
20
|
+
export const isVariableElement = (element) => {
|
|
21
|
+
return element.type === ElementType.VARIABLE;
|
|
22
|
+
};
|
|
23
|
+
export const isLinkElement = (element) => {
|
|
24
|
+
return element.type === ElementType.LINK;
|
|
25
|
+
};
|
|
20
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/text/index.ts"],"names":[],"mappings":"AASA,MAAM,CAAN,IAAY,YAQX;AARD,WAAY,YAAY;IACtB,oDAAoC,CAAA;IACpC,+BAAe,CAAA;IACf,iCAAiB,CAAA;IACjB,uCAAuB,CAAA;IACvB,0CAA0B,CAAA;IAC1B,0CAA0B,CAAA;IAC1B,gDAAgC,CAAA;AAClC,CAAC,EARW,YAAY,KAAZ,YAAY,QAQvB;AAED,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,oCAAqB,CAAA;AACvB,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB;AAED,MAAM,CAAN,IAAY,eAEX;AAFD,WAAY,eAAe;IACzB,2CAAwB,CAAA;AAC1B,CAAC,EAFW,eAAe,KAAf,eAAe,QAE1B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/text/index.ts"],"names":[],"mappings":"AASA,MAAM,CAAN,IAAY,YAQX;AARD,WAAY,YAAY;IACtB,oDAAoC,CAAA;IACpC,+BAAe,CAAA;IACf,iCAAiB,CAAA;IACjB,uCAAuB,CAAA;IACvB,0CAA0B,CAAA;IAC1B,0CAA0B,CAAA;IAC1B,gDAAgC,CAAA;AAClC,CAAC,EARW,YAAY,KAAZ,YAAY,QAQvB;AAED,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,oCAAqB,CAAA;AACvB,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB;AAED,MAAM,CAAN,IAAY,eAEX;AAFD,WAAY,eAAe;IACzB,2CAAwB,CAAA;AAC1B,CAAC,EAFW,eAAe,KAAf,eAAe,QAE1B;AAoCD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,OAAgB,EAA8B,EAAE;IAChF,OAAO,OAAO,CAAC,IAAI,KAAK,WAAW,CAAC,QAAQ,CAAC;AAC/C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAgB,EAA0B,EAAE;IACxE,OAAO,OAAO,CAAC,IAAI,KAAK,WAAW,CAAC,IAAI,CAAC;AAC3C,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voiceflow/base-types",
|
|
3
3
|
"description": "Voiceflow base project types",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.12.1",
|
|
5
5
|
"author": "Voiceflow",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/voiceflow/libs/issues"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@voiceflow/common": "^7.
|
|
10
|
+
"@voiceflow/common": "^7.21.0",
|
|
11
11
|
"slate": "0.63.0"
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
"license": "ISC",
|
|
22
22
|
"main": "build/common/index.js",
|
|
23
23
|
"module": "build/esm/index.js",
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
24
27
|
"repository": {
|
|
25
28
|
"type": "git",
|
|
26
29
|
"url": "git+https://github.com/voiceflow/libs.git"
|
|
@@ -39,5 +42,5 @@
|
|
|
39
42
|
"test:integration": "exit 0",
|
|
40
43
|
"test:unit": "exit 0"
|
|
41
44
|
},
|
|
42
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "4f265e2cd11970e42817b7e40dbf7612a53ea385"
|
|
43
46
|
}
|