@particle-academy/react-fancy 5.65.0 → 5.66.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 (59) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/{PastePills.types-CDyotkUb.d.cts → PastePills.types-CpXzsuwJ.d.cts} +2 -0
  3. package/dist/{PastePills.types-CDyotkUb.d.ts → PastePills.types-CpXzsuwJ.d.ts} +2 -0
  4. package/dist/{PastedFilesInput-CrgNoEBd.d.ts → PastedFilesInput-Bt3KSTVN.d.ts} +1 -1
  5. package/dist/{PastedFilesInput-DQ1eZaHk.d.cts → PastedFilesInput-CUQeOeOA.d.cts} +1 -1
  6. package/dist/{chunk-SZH7TFME.js → chunk-4EUDW2WU.js} +3 -3
  7. package/dist/{chunk-SZH7TFME.js.map → chunk-4EUDW2WU.js.map} +1 -1
  8. package/dist/{chunk-CMC2TOEQ.cjs → chunk-6CAXLP7D.cjs} +6 -6
  9. package/dist/{chunk-CMC2TOEQ.cjs.map → chunk-6CAXLP7D.cjs.map} +1 -1
  10. package/dist/{chunk-TQGRXJ74.cjs → chunk-7FYRFNPX.cjs} +9 -9
  11. package/dist/{chunk-TQGRXJ74.cjs.map → chunk-7FYRFNPX.cjs.map} +1 -1
  12. package/dist/{chunk-4XHG6Q42.cjs → chunk-7HXFEYOV.cjs} +8 -8
  13. package/dist/{chunk-4XHG6Q42.cjs.map → chunk-7HXFEYOV.cjs.map} +1 -1
  14. package/dist/{chunk-MVVHUTXA.js → chunk-B4LVQ4QI.js} +3 -3
  15. package/dist/{chunk-MVVHUTXA.js.map → chunk-B4LVQ4QI.js.map} +1 -1
  16. package/dist/{chunk-QNQNGARW.cjs → chunk-HFK5SBNM.cjs} +27 -9
  17. package/dist/chunk-HFK5SBNM.cjs.map +1 -0
  18. package/dist/{chunk-COXHFZR6.js → chunk-J44EV6SP.js} +13 -7
  19. package/dist/chunk-J44EV6SP.js.map +1 -0
  20. package/dist/{chunk-C463C4MM.cjs → chunk-MCQWTOTV.cjs} +18 -12
  21. package/dist/chunk-MCQWTOTV.cjs.map +1 -0
  22. package/dist/{chunk-ELFTEJBT.js → chunk-QSGAFKK2.js} +3 -3
  23. package/dist/{chunk-ELFTEJBT.js.map → chunk-QSGAFKK2.js.map} +1 -1
  24. package/dist/{chunk-NILA2LZY.js → chunk-YIKXJWO4.js} +27 -9
  25. package/dist/chunk-YIKXJWO4.js.map +1 -0
  26. package/dist/composer.cjs +4 -4
  27. package/dist/composer.d.cts +2 -2
  28. package/dist/composer.d.ts +2 -2
  29. package/dist/composer.js +2 -2
  30. package/dist/{index-DRlltbdV.d.ts → index-DWtSViJ3.d.cts} +7 -1
  31. package/dist/{index-CCJVT9Hu.d.cts → index-XR5t8bTq.d.ts} +7 -1
  32. package/dist/index.cjs +30 -30
  33. package/dist/index.d.cts +3 -3
  34. package/dist/index.d.ts +3 -3
  35. package/dist/index.js +5 -5
  36. package/dist/input.cjs +3 -3
  37. package/dist/input.d.cts +1 -1
  38. package/dist/input.d.ts +1 -1
  39. package/dist/input.js +2 -2
  40. package/dist/inputs.cjs +3 -3
  41. package/dist/inputs.d.cts +1 -1
  42. package/dist/inputs.d.ts +1 -1
  43. package/dist/inputs.js +2 -2
  44. package/dist/json-editor.cjs +14 -14
  45. package/dist/json-editor.js +3 -3
  46. package/dist/paste-pills.cjs +14 -14
  47. package/dist/paste-pills.d.cts +3 -3
  48. package/dist/paste-pills.d.ts +3 -3
  49. package/dist/paste-pills.js +1 -1
  50. package/dist/prompt-input.cjs +5 -5
  51. package/dist/prompt-input.d.cts +2 -2
  52. package/dist/prompt-input.d.ts +2 -2
  53. package/dist/prompt-input.js +2 -2
  54. package/docs/PromptInput.md +24 -1
  55. package/package.json +1 -1
  56. package/dist/chunk-C463C4MM.cjs.map +0 -1
  57. package/dist/chunk-COXHFZR6.js.map +0 -1
  58. package/dist/chunk-NILA2LZY.js.map +0 -1
  59. package/dist/chunk-QNQNGARW.cjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -11,6 +11,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
 
12
12
  ## [Unreleased]
13
13
 
14
+ ## [5.66.0] - 2026-10-27
15
+
16
+ ### Added
17
+
18
+ - **`PromptInput`: text paste pills take an optional `label`** (genie#1280).
19
+ A text pill (`{ kind: "text", id, text, label? }` in `PromptDraft`) shows its
20
+ `label` in place of `Pasted text · N characters`. This mirrors the label image
21
+ pills already have. It lets a host that inserts a pill itself, such as Genie
22
+ sending a plan step into the chat, show which step it is.
23
+ - The label is display only. The submitted value still expands the pill to
24
+ the full `text`.
25
+ - The accessible name becomes `Insert this pasted text: <label>, N characters`,
26
+ so it still says the pill is pasted text.
27
+ - The label is drawn as plain text, never HTML. Whitespace, control characters
28
+ and U+FFFC are flattened to single spaces, and the label is capped at 80
29
+ characters with `…`. If it is blank or not a string, the generic text is
30
+ shown. A non-string `label` is dropped when a draft is read.
31
+ - It round-trips through `getDraft` / `setDraft`, `defaultDraft`, a controlled
32
+ `draft` and `onDraftChange`. `HeldPaste` (the `Composer` / `usePastePills`
33
+ shape) gains the same optional `label`.
34
+ - Additive. With no `label` the markup is unchanged, so you need do nothing.
35
+
14
36
  ## [5.65.0] - 2026-10-27
15
37
 
16
38
  ### Added
@@ -9,6 +9,8 @@
9
9
  interface HeldPaste {
10
10
  id: string;
11
11
  text: string;
12
+ /** Shown on the pill instead of `Pasted text · N characters`. Display only. */
13
+ label?: string;
12
14
  }
13
15
  /**
14
16
  * The minimum of a clipboard event this hook touches.
@@ -9,6 +9,8 @@
9
9
  interface HeldPaste {
10
10
  id: string;
11
11
  text: string;
12
+ /** Shown on the pill instead of `Pasted text · N characters`. Display only. */
13
+ label?: string;
12
14
  }
13
15
  /**
14
16
  * The minimum of a clipboard event this hook touches.
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, RefObject } from 'react';
3
- import { C as ComposerPastePreview, a as ComposerPasteClassNames, b as HeldPaste, H as HeldImage, f as UsePastePillsResult } from './PastePills.types-CDyotkUb.js';
3
+ import { C as ComposerPastePreview, a as ComposerPasteClassNames, b as HeldPaste, H as HeldImage, f as UsePastePillsResult } from './PastePills.types-CpXzsuwJ.js';
4
4
 
5
5
  /** The attribute on the placeholder span a pill is portalled into. */
6
6
  declare const HOST_ATTR = "data-react-fancy-composer-paste-host";
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, RefObject } from 'react';
3
- import { C as ComposerPastePreview, a as ComposerPasteClassNames, b as HeldPaste, H as HeldImage, f as UsePastePillsResult } from './PastePills.types-CDyotkUb.cjs';
3
+ import { C as ComposerPastePreview, a as ComposerPasteClassNames, b as HeldPaste, H as HeldImage, f as UsePastePillsResult } from './PastePills.types-CpXzsuwJ.cjs';
4
4
 
5
5
  /** The attribute on the placeholder span a pill is portalled into. */
6
6
  declare const HOST_ATTR = "data-react-fancy-composer-paste-host";
@@ -1,6 +1,6 @@
1
1
  import { Switch } from './chunk-DXZCKDYS.js';
2
2
  import { DatePicker } from './chunk-2UTN3EFK.js';
3
- import { Input } from './chunk-MVVHUTXA.js';
3
+ import { Input } from './chunk-B4LVQ4QI.js';
4
4
  import { Select } from './chunk-FVI4JDLA.js';
5
5
  import { Textarea } from './chunk-UVUBV4VZ.js';
6
6
  import { DisplayValue } from './chunk-WX5XYDVN.js';
@@ -1337,5 +1337,5 @@ function buildItems({
1337
1337
  }
1338
1338
 
1339
1339
  export { JSON_FIELD_TYPES, JsonEditor, applyJsonEdit, describeEdit, findJsonConflicts, getAtPath, inferType, parseKeyMap, parsePath, pathToString, resolveKeyRule, typeMatches };
1340
- //# sourceMappingURL=chunk-SZH7TFME.js.map
1341
- //# sourceMappingURL=chunk-SZH7TFME.js.map
1340
+ //# sourceMappingURL=chunk-4EUDW2WU.js.map
1341
+ //# sourceMappingURL=chunk-4EUDW2WU.js.map