@ampcode/plugin 0.0.0-20261028001330-gaedc463 → 0.0.0-20261029001459-g185813a

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/index.d.ts +15 -1
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -1717,8 +1717,13 @@ declare module '@ampcode/plugin' {
1717
1717
  * steps: for example "open the sign-in page", then "paste the URL it ends on". When the
1718
1718
  * only field is one link, the user must open it before they can confirm: the primary
1719
1719
  * button opens the link, then becomes the confirm button.
1720
+ *
1721
+ * Checkbox fields show a box the user can tick, with `label` as its text, such as "Always
1722
+ * allow replies in this thread". `value` is `'true'` to start ticked. The returned value is
1723
+ * always `'true'` or `'false'`; it is `'false'` when the client could not show the box, so
1724
+ * treat only `'true'` as the user's choice.
1720
1725
  */
1721
- type?: 'text' | 'image' | 'link' | 'file' | 'attachment'
1726
+ type?: 'text' | 'image' | 'link' | 'file' | 'attachment' | 'checkbox'
1722
1727
 
1723
1728
  /**
1724
1729
  * File extensions a file field's picker offers, such as `['.p8']`. Advisory: the user can
@@ -1757,6 +1762,15 @@ declare module '@ampcode/plugin' {
1757
1762
  */
1758
1763
  removable?: boolean
1759
1764
 
1765
+ /**
1766
+ * Show a text field's `value` as plain text the user can read but not edit, such as the
1767
+ * message an email replies to. The web client shows the first few lines in a box that
1768
+ * scrolls; line breaks are kept and Markdown is not rendered. A read-only field is omitted
1769
+ * from the returned values and never blocks confirmation. Clients without read-only text
1770
+ * show an editable field whose edits are ignored.
1771
+ */
1772
+ readOnly?: boolean
1773
+
1760
1774
  /** Allow a text field to be left empty. Text fields are required unless this is set. */
1761
1775
  optional?: boolean
1762
1776
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampcode/plugin",
3
- "version": "0.0.0-20261028001330-gaedc463",
3
+ "version": "0.0.0-20261029001459-g185813a",
4
4
  "description": "Amp Plugin API",
5
5
  "license": "Amp Commercial License",
6
6
  "homepage": "https://ampcode.com/docs/plugin-api",
@@ -30,7 +30,7 @@
30
30
  "sideEffects": false,
31
31
  "scripts": {
32
32
  "build": "tsgo -b",
33
- "format:check": "oxfmt --check index.d.ts",
33
+ "format:check": "bun fmt --check index.d.ts",
34
34
  "test": "echo 'No tests'",
35
35
  "lint": "biome check --config-path=../.. index.d.ts",
36
36
  "typecheck": "tsgo -b"