@popclip/types 1.4604.1 → 1.4615.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.
Files changed (2) hide show
  1. package/package.json +6 -2
  2. package/popclip.d.ts +23 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popclip/types",
3
- "version": "1.4604.1",
3
+ "version": "1.4615.0",
4
4
  "devDependencies": {
5
5
  "typedoc": "0.25.13",
6
6
  "typescript": "5.4.5"
@@ -10,5 +10,9 @@
10
10
  "check": "tsc --noEmit",
11
11
  "docs": "typedoc"
12
12
  },
13
- "types": "./popclip.d.ts"
13
+ "types": "./popclip.d.ts",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "https://github.com/pilotmoon/popclip-types"
17
+ }
14
18
  }
package/popclip.d.ts CHANGED
@@ -433,8 +433,7 @@ type Entitlement = "network" | "dynamic";
433
433
  /**
434
434
  * The Extension object defines the PopClip extension.
435
435
  */
436
- interface Extension<CustomOptions extends Options = Options>
437
- extends ActionProperties {
436
+ interface Extension<CustomOptions = Options> extends ActionProperties {
438
437
  /**
439
438
  * The display name of this extension.
440
439
  */
@@ -479,6 +478,9 @@ interface Extension<CustomOptions extends Options = Options>
479
478
  module?: string;
480
479
  }
481
480
 
481
+ /**
482
+ * The possible values for `type` of {@link Option}.
483
+ */
482
484
  type OptionType =
483
485
  | "string"
484
486
  | "boolean"
@@ -528,6 +530,9 @@ interface OptionBase {
528
530
  inset?: boolean;
529
531
  }
530
532
 
533
+ /**
534
+ A string-valued option.
535
+ */
531
536
  interface StringOption extends OptionBase {
532
537
  type: "string";
533
538
  /**
@@ -536,6 +541,9 @@ interface StringOption extends OptionBase {
536
541
  defaultValue?: string;
537
542
  }
538
543
 
544
+ /**
545
+ * A multiple-choice option.
546
+ */
539
547
  interface MultipleOption extends OptionBase {
540
548
  type: "multiple";
541
549
  /**
@@ -549,12 +557,15 @@ interface MultipleOption extends OptionBase {
549
557
  values?: string[];
550
558
 
551
559
  /**
552
- * Display names corresponding to the entries in the {@link values} array. These are shown in the option UI.
560
+ * Display names corresponding to the entries in the {@link values} array. These are shown in the option UI.
553
561
  * If ommitted, the raw value strings are shown instead.
554
562
  */
555
563
  valueLabels?: LocalizableString[];
556
564
  }
557
565
 
566
+ /**
567
+ * A boolean option.
568
+ */
558
569
  interface BooleanOption extends OptionBase {
559
570
  type: "boolean";
560
571
  /**
@@ -567,14 +578,23 @@ interface BooleanOption extends OptionBase {
567
578
  icon?: string;
568
579
  }
569
580
 
581
+ /**
582
+ * A concealed string option.
583
+ */
570
584
  interface PasswordOption extends OptionBase {
571
585
  type: "password" | "secret";
572
586
  }
573
587
 
588
+ /**
589
+ * A heading option, which does not define an actual option, but adds a heading in the preferences window.
590
+ */
574
591
  interface HeadingOption extends OptionBase {
575
592
  type: "heading";
576
593
  }
577
594
 
595
+ /**
596
+ Represents a single option in the extension's preferences.
597
+ */
578
598
  type Option =
579
599
  | StringOption
580
600
  | MultipleOption