@emailmaker/extensions-sandbox 1.0.111-dev.4 → 1.0.111-dev.6
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/index.js +1 -1
- package/package.json +1 -1
- package/types.d.ts +44 -1
package/index.js
CHANGED
|
@@ -60,7 +60,7 @@ var t = e("SandboxApp"), n = e("IframePluginRegistry");
|
|
|
60
60
|
n.packages[e.id] = e, n.validateAll();
|
|
61
61
|
}, t.__compat.registerPackage({
|
|
62
62
|
id: "extensions-sandbox",
|
|
63
|
-
version: "1.0.111-dev.
|
|
63
|
+
version: "1.0.111-dev.6",
|
|
64
64
|
requires: { host: "^1.0.105" }
|
|
65
65
|
});
|
|
66
66
|
}
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -962,6 +962,24 @@ export interface IRange {
|
|
|
962
962
|
/**
|
|
963
963
|
* Provides mapping functionalities for document text.
|
|
964
964
|
*/
|
|
965
|
+
export interface MatcherRange {
|
|
966
|
+
start: number;
|
|
967
|
+
end: number;
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
export interface MatcherRuleConfig {
|
|
971
|
+
match(text: string): MatcherRange[];
|
|
972
|
+
mapFn(text: string, isInAttribute: '"' | "'" | '' | undefined, isInTag: boolean): string | false;
|
|
973
|
+
isVariable?: boolean;
|
|
974
|
+
overrideBuiltins?: boolean;
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
export interface MatcherPairConfig {
|
|
978
|
+
syntax?: string;
|
|
979
|
+
escape: MatcherRuleConfig;
|
|
980
|
+
unescape: MatcherRuleConfig;
|
|
981
|
+
}
|
|
982
|
+
|
|
965
983
|
export interface DocumentMapping {
|
|
966
984
|
/**
|
|
967
985
|
* Corrects an offset within the document.
|
|
@@ -986,12 +1004,27 @@ export interface DocumentMapping {
|
|
|
986
1004
|
*/
|
|
987
1005
|
isMappedElementInPosition(position: number): boolean;
|
|
988
1006
|
|
|
1007
|
+
/**
|
|
1008
|
+
* Returns the mapped replacement range containing the given mapped-document position.
|
|
1009
|
+
* @param position The mapped-document position to check.
|
|
1010
|
+
* @returns The mapped replacement range or null when the position is outside replacement mappings.
|
|
1011
|
+
*/
|
|
1012
|
+
getMappedReplacementRangeAtPosition(position: number): IRange | null;
|
|
1013
|
+
|
|
1014
|
+
/**
|
|
1015
|
+
* Checks whether the given mapped-document range intersects a replacement mapping.
|
|
1016
|
+
* @param range The mapped-document range to check.
|
|
1017
|
+
* @returns true if the range intersects a replacement mapping, otherwise false.
|
|
1018
|
+
*/
|
|
1019
|
+
hasMappedReplacementRangeInRange(range: IRange): boolean;
|
|
1020
|
+
|
|
989
1021
|
/**
|
|
990
1022
|
* Escapes special characters in the given text.
|
|
991
1023
|
* @param text The text to escape.
|
|
1024
|
+
* @param forceAttributes Treat the text as if it were always inside an attribute value.
|
|
992
1025
|
* @returns The escaped text.
|
|
993
1026
|
*/
|
|
994
|
-
escape(text: string): string;
|
|
1027
|
+
escape(text: string, forceAttributes?: boolean): string;
|
|
995
1028
|
|
|
996
1029
|
/**
|
|
997
1030
|
* Unescapes special characters in the given text.
|
|
@@ -999,4 +1032,14 @@ export interface DocumentMapping {
|
|
|
999
1032
|
* @returns The unescaped text.
|
|
1000
1033
|
*/
|
|
1001
1034
|
unescape(text: string): string;
|
|
1035
|
+
|
|
1036
|
+
/**
|
|
1037
|
+
* Registers a runtime matcher pair and rebuilds the mapped document from Monaco text.
|
|
1038
|
+
*/
|
|
1039
|
+
registerMatcherPair(config: MatcherPairConfig): IDisposable;
|
|
1040
|
+
|
|
1041
|
+
/**
|
|
1042
|
+
* Rebuilds the mapped document from the base Monaco text using the current mapping rules.
|
|
1043
|
+
*/
|
|
1044
|
+
rebuildFromBase(): void;
|
|
1002
1045
|
}
|