@popclip/types 1.4636.1 → 1.4666.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/package.json +1 -1
- package/popclip.d.ts +19 -10
package/package.json
CHANGED
package/popclip.d.ts
CHANGED
|
@@ -974,16 +974,25 @@ interface PopClip {
|
|
|
974
974
|
* popclip.openUrl(`mailto:support@pilotmoon.com?subject=${encodeURIComponent("What's up?")}`); // open mailto link in the default mail application
|
|
975
975
|
* ```
|
|
976
976
|
*
|
|
977
|
-
* @param url
|
|
977
|
+
* @param url URL string, or an object with a `href` property. (If the latter is passed,
|
|
978
|
+
* the `href` property is used as the URL but with `+` characters replaced with `%20`.)
|
|
978
979
|
* @param options Options.
|
|
979
980
|
*/
|
|
980
981
|
openUrl: (
|
|
981
|
-
url: string,
|
|
982
|
+
url: string | { href: string },
|
|
982
983
|
options?: {
|
|
983
984
|
/**
|
|
984
985
|
* Bundle identifier of the app to open the URL with. For example `"com.google.Chrome"`.
|
|
985
986
|
*/
|
|
986
987
|
app?: string;
|
|
988
|
+
/**
|
|
989
|
+
* Whether to request that macOS activate the target app. (Default: `true`)
|
|
990
|
+
*/
|
|
991
|
+
activate?: boolean;
|
|
992
|
+
/**
|
|
993
|
+
* Whether to open the URL in a background browser tab, where supported. (Default: `false`)
|
|
994
|
+
*/
|
|
995
|
+
backgroundTab?: boolean;
|
|
987
996
|
},
|
|
988
997
|
) => void;
|
|
989
998
|
|
|
@@ -1026,7 +1035,7 @@ interface Util {
|
|
|
1026
1035
|
* @param string The string to localize.
|
|
1027
1036
|
* @return The localized string, or the original string if no localized version was avaiable.
|
|
1028
1037
|
*/
|
|
1029
|
-
localize
|
|
1038
|
+
localize(string: string): string;
|
|
1030
1039
|
|
|
1031
1040
|
/**
|
|
1032
1041
|
Get information about the current locale as configures in macOS settings.
|
|
@@ -1051,7 +1060,7 @@ interface Util {
|
|
|
1051
1060
|
daylightSaving: boolean;
|
|
1052
1061
|
};
|
|
1053
1062
|
|
|
1054
|
-
htmlToRtf
|
|
1063
|
+
htmlToRtf(html: string): string | undefined;
|
|
1055
1064
|
|
|
1056
1065
|
/**
|
|
1057
1066
|
* Encode a string as UTF-8 then Base-64 encode the result.
|
|
@@ -1059,7 +1068,7 @@ interface Util {
|
|
|
1059
1068
|
* @param string The string to encode.
|
|
1060
1069
|
* @param options
|
|
1061
1070
|
*/
|
|
1062
|
-
base64Encode
|
|
1071
|
+
base64Encode(
|
|
1063
1072
|
string: string,
|
|
1064
1073
|
options?: {
|
|
1065
1074
|
/**
|
|
@@ -1071,7 +1080,7 @@ interface Util {
|
|
|
1071
1080
|
*/
|
|
1072
1081
|
trimmed?: boolean;
|
|
1073
1082
|
},
|
|
1074
|
-
)
|
|
1083
|
+
): string;
|
|
1075
1084
|
|
|
1076
1085
|
/**
|
|
1077
1086
|
* Decode a Base-64 string and interpret the result as a UTF-8 string.
|
|
@@ -1082,7 +1091,7 @@ interface Util {
|
|
|
1082
1091
|
* @param string
|
|
1083
1092
|
* @returns The decoded string
|
|
1084
1093
|
*/
|
|
1085
|
-
base64Decode
|
|
1094
|
+
base64Decode(string: string): string;
|
|
1086
1095
|
|
|
1087
1096
|
/* Build a URL from a base URL and additional query parameters */
|
|
1088
1097
|
buildQueryUrl: (baseUrl: string, params: { [key: string]: string }) => string;
|
|
@@ -1094,13 +1103,13 @@ interface Util {
|
|
|
1094
1103
|
parseQuery: (query: string) => any;
|
|
1095
1104
|
|
|
1096
1105
|
/** Decipher a JSON object that has been lightly obscured to prevent constants such as
|
|
1097
|
-
* API
|
|
1106
|
+
* API client identifiers appearing in plaintext in the source files.
|
|
1098
1107
|
*
|
|
1099
1108
|
* This function will ROT13 decipher the text, apply Base64 decoding, and parse the result as JSON. */
|
|
1100
|
-
clarify
|
|
1109
|
+
clarify(obscuredString: string): any;
|
|
1101
1110
|
|
|
1102
1111
|
// same as global sleep()
|
|
1103
|
-
sleep
|
|
1112
|
+
sleep(durationMilliseconds: number): Promise<void>;
|
|
1104
1113
|
|
|
1105
1114
|
/**
|
|
1106
1115
|
* Fill the provided `TypedArray` with cryptographically secure random values.
|