@popclip/types 1.4586.2 → 1.4604.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/popclip.d.ts +15 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popclip/types",
3
- "version": "1.4586.2",
3
+ "version": "1.4604.1",
4
4
  "devDependencies": {
5
5
  "typedoc": "0.25.13",
6
6
  "typescript": "5.4.5"
package/popclip.d.ts CHANGED
@@ -152,7 +152,7 @@ interface AssociatedApp {
152
152
  * @param context Information about the context surrounding the selection. (Same object as {@link PopClip.context}.)
153
153
  * @returns A single action, an array of actions.
154
154
  */
155
- type PopulationFunction<CustomOptions extends Options = Options> = (
155
+ type PopulationFunction<CustomOptions = Options> = (
156
156
  input: Input,
157
157
  options: CustomOptions,
158
158
  context: Context,
@@ -413,7 +413,7 @@ interface ActionProperties extends IconProperties {
413
413
  * @param options Current values of the options for this extension. (Same object as {@link PopClip.options}.)
414
414
  * @param context Information about the context surrounding the selection. (Same object as {@link PopClip.context}.)
415
415
  */
416
- type ActionFunction<CustomOptions extends Options = Options> = (
416
+ type ActionFunction<CustomOptions = Options> = (
417
417
  input: Input,
418
418
  options: CustomOptions & AuthOptions,
419
419
  context: Context,
@@ -423,8 +423,7 @@ type ActionFunction<CustomOptions extends Options = Options> = (
423
423
  * **Action** represents the properties of a single action.
424
424
  * If `code` is omitted, the action displays a disabled title/icon only.
425
425
  */
426
- interface Action<CustomOptions extends Options = Options>
427
- extends ActionProperties {
426
+ interface Action<CustomOptions = Options> extends ActionProperties {
428
427
  code?: ActionFunction<CustomOptions>;
429
428
  }
430
429
 
@@ -831,17 +830,22 @@ interface PopClip {
831
830
  ) => void;
832
831
 
833
832
  /**
834
- * Display text inside PopClip's popup, with option to make the display a clickable button to
835
- * paste the text.
836
- * @param text The text to display. It will be truncated to 160 characters when shown.
837
- * @param options
833
+ * Display text to the user.
834
+ * @param text The text to display.
835
+ * @param options Options.
838
836
  */
839
837
  showText: (
840
838
  text: string,
841
839
  options?: {
842
840
  /**
843
- * If `true`, and the app's Paste command is available, the displayed text will be in a cickable button,
844
- * which clicked, pastes the full text.
841
+ * Display style:
842
+ * - `compact` (default): Show the text inside PopClip's popup. It will be truncated to 160 characters when shown.
843
+ * - `large`: Show as "Large Type" in full screen.
844
+ */
845
+ style?: "compact" | "large";
846
+ /**
847
+ * Applies to `compact` display mode only. If `true`, and the app's Paste command is available,
848
+ * the displayed text will be in a clickable button, which clicked, pastes the full text.
845
849
  */
846
850
  preview?: boolean;
847
851
  },
@@ -1249,6 +1253,6 @@ declare function sleep(durationMilliseconds: number): Promise<void>;
1249
1253
  *
1250
1254
  * @param extension The extension object to export.
1251
1255
  */
1252
- declare function defineExtension<CustomOptions extends Options = Options>(
1256
+ declare function defineExtension<CustomOptions = Options>(
1253
1257
  extension: Extension<CustomOptions>,
1254
1258
  ): void;