@particle-academy/react-fancy 5.72.0 → 6.0.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 (57) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/dist/button.cjs +3 -3
  3. package/dist/button.js +1 -1
  4. package/dist/chat-thread.cjs +5 -5
  5. package/dist/chat-thread.js +3 -3
  6. package/dist/{chunk-QIH7DDRO.js → chunk-3RIBZZLT.js} +3 -3
  7. package/dist/{chunk-QIH7DDRO.js.map → chunk-3RIBZZLT.js.map} +1 -1
  8. package/dist/{chunk-C2LVHAIG.cjs → chunk-BGRVHPGP.cjs} +7 -6
  9. package/dist/chunk-BGRVHPGP.cjs.map +1 -0
  10. package/dist/{chunk-FBGCSGCE.cjs → chunk-BX6ZVWTO.cjs} +3 -2
  11. package/dist/chunk-BX6ZVWTO.cjs.map +1 -0
  12. package/dist/{chunk-VIQEWB6M.js → chunk-CWWMT57K.js} +4 -4
  13. package/dist/{chunk-VIQEWB6M.js.map → chunk-CWWMT57K.js.map} +1 -1
  14. package/dist/{chunk-2MDU3W7E.js → chunk-GBR4Q6CP.js} +3 -3
  15. package/dist/{chunk-2MDU3W7E.js.map → chunk-GBR4Q6CP.js.map} +1 -1
  16. package/dist/{chunk-5WVEW3Q5.cjs → chunk-IA6JKI4P.cjs} +10 -10
  17. package/dist/{chunk-5WVEW3Q5.cjs.map → chunk-IA6JKI4P.cjs.map} +1 -1
  18. package/dist/{chunk-A5CACIHR.cjs → chunk-JKH5ODNG.cjs} +9 -9
  19. package/dist/{chunk-A5CACIHR.cjs.map → chunk-JKH5ODNG.cjs.map} +1 -1
  20. package/dist/{chunk-EWE4TOG7.js → chunk-KOECVLC4.js} +3 -3
  21. package/dist/{chunk-EWE4TOG7.js.map → chunk-KOECVLC4.js.map} +1 -1
  22. package/dist/{chunk-TW52N55D.js → chunk-LWOA2ET6.js} +4 -3
  23. package/dist/chunk-LWOA2ET6.js.map +1 -0
  24. package/dist/{chunk-NWB6YCZY.cjs → chunk-ND5SBHGH.cjs} +4 -4
  25. package/dist/{chunk-NWB6YCZY.cjs.map → chunk-ND5SBHGH.cjs.map} +1 -1
  26. package/dist/{chunk-GUCUYDFB.js → chunk-PACFMPSX.js} +4 -4
  27. package/dist/{chunk-GUCUYDFB.js.map → chunk-PACFMPSX.js.map} +1 -1
  28. package/dist/{chunk-7DSHA4CL.cjs → chunk-VNOUXFZ2.cjs} +15 -15
  29. package/dist/{chunk-7DSHA4CL.cjs.map → chunk-VNOUXFZ2.cjs.map} +1 -1
  30. package/dist/{chunk-B6AIHYOP.js → chunk-VZ7IDHUY.js} +3 -3
  31. package/dist/{chunk-B6AIHYOP.js.map → chunk-VZ7IDHUY.js.map} +1 -1
  32. package/dist/{chunk-3KF3OYWS.js → chunk-WLDDGIGC.js} +3 -2
  33. package/dist/chunk-WLDDGIGC.js.map +1 -0
  34. package/dist/{chunk-L6TFJIFB.cjs → chunk-X354OVSC.cjs} +12 -12
  35. package/dist/{chunk-L6TFJIFB.cjs.map → chunk-X354OVSC.cjs.map} +1 -1
  36. package/dist/{chunk-KDISJ64Q.cjs → chunk-ZXGX5RI5.cjs} +4 -4
  37. package/dist/{chunk-KDISJ64Q.cjs.map → chunk-ZXGX5RI5.cjs.map} +1 -1
  38. package/dist/content-renderer.cjs +5 -5
  39. package/dist/content-renderer.js +2 -2
  40. package/dist/editor.cjs +5 -5
  41. package/dist/editor.js +3 -3
  42. package/dist/index.cjs +40 -40
  43. package/dist/index.js +8 -8
  44. package/dist/json-editor.cjs +13 -13
  45. package/dist/json-editor.js +2 -2
  46. package/dist/magic-wand.cjs +3 -3
  47. package/dist/magic-wand.js +2 -2
  48. package/dist/prompt-input.cjs +5 -5
  49. package/dist/prompt-input.js +2 -2
  50. package/dist/reason-tag.cjs +3 -3
  51. package/dist/reason-tag.js +2 -2
  52. package/docs/Button.md +13 -0
  53. package/package.json +1 -1
  54. package/dist/chunk-3KF3OYWS.js.map +0 -1
  55. package/dist/chunk-C2LVHAIG.cjs.map +0 -1
  56. package/dist/chunk-FBGCSGCE.cjs.map +0 -1
  57. package/dist/chunk-TW52N55D.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -11,6 +11,83 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
 
12
12
  ## [Unreleased]
13
13
 
14
+ ## [6.0.0] - 2026-11-01
15
+
16
+ ### Changed
17
+
18
+ - **BREAKING: `Button` defaults to `type="button"`.** A `<Button>` with no
19
+ `type` used to render a bare `<button>`, and the HTML default for a bare
20
+ `<button>` is `submit`. Every Button inside a `<form>` therefore submitted it
21
+ on click, including a Cancel, a toolbar toggle, and the kit's own internal
22
+ buttons (listed below). An explicit `type` still wins: `type="submit"`,
23
+ `type="reset"` and `type="button"` render exactly as written.
24
+ (`type={undefined}`, which a wrapper forwarding an optional prop passes, gets
25
+ the default too.)
26
+
27
+ **What a consumer must DO:** add `type="submit"` to every `<Button>` (or the
28
+ deprecated `<Action>`) that is meant to submit a form. To find candidates,
29
+ list the Buttons in every file that renders a form:
30
+
31
+ ```bash
32
+ grep -rlE '<(form|Form)\b' --include='*.tsx' --include='*.jsx' src resources/js \
33
+ | xargs grep -nE '<(Button|Action)\b'
34
+ ```
35
+
36
+ Any hit without a `type` that is the form's Save / Submit / Send / Sign in is
37
+ one to change. Also check Buttons that submit a form from OUTSIDE it with the
38
+ `form="<id>"` attribute (`grep -rnE '\bform="' --include='*.tsx' --include='*.jsx' .`):
39
+ those need `type="submit"` as well. One more effect of the same cause: per the
40
+ HTML spec, pressing Enter in a field submits through the form's first submit
41
+ button, so a form with several fields whose only submit was an untyped Button
42
+ also stops submitting on Enter. Adding `type="submit"` restores both.
43
+
44
+ **What needs no action:**
45
+ - Buttons outside any `<form>` (the large majority). `button` and `submit`
46
+ behave identically there.
47
+ - Buttons that already pass a `type`.
48
+ - Anchor-mode Buttons (`href`, not disabled): they render an `<a>`, which has
49
+ no submit behaviour, and still get no `type` attribute. A disabled Button
50
+ with an `href` falls back to a `<button>` and gets the default like any
51
+ other.
52
+ - Forms submitted from code (`form.requestSubmit()`, a fetch in `onClick`).
53
+
54
+ **Internal components whose effective button type changed** (`submit` to
55
+ `button`; none of them was meant to submit a host's form, and each one now
56
+ stops doing so):
57
+ - **`PromptInput`**: the attach button, the send button (both
58
+ `sendButton="label"` and `"icon"`), and the attachment chip's remove button
59
+ (a native `<button>` with no type; fixed directly). Sending still calls
60
+ `onSubmit` exactly as before. **If you wrapped `PromptInput` in your own
61
+ `<form>` and relied on clicking send to ALSO submit that form natively**
62
+ (for its `name` / `pasteFilesName` fields), call `form.requestSubmit()` from
63
+ your `onSubmit`. ⌘/Ctrl+Enter never submitted the enclosing form, so until
64
+ now the click did and the keyboard did not.
65
+ - **`JsonEditor`**: the pending-strip accept / reject, the add (`+`) button,
66
+ and every row button: expand toggle, add, move up / move down, remove,
67
+ pending accept / reject, and the add form's Add / Cancel.
68
+ - **`MagicWand`**: every action in the floating / pill toolbar.
69
+ - **`ReasonTag`**: the "ask follow-up" button in its popover.
70
+
71
+ Already explicit, so unchanged: `ChatThread` (load earlier, jump to latest),
72
+ `ChatMessage` proposal accept / reject, and the `ContentRenderer` copy button.
73
+ Components that render their own native `<button>` (Dropdown triggers, Modal
74
+ close, Tabs, Accordion, Pagination, Calendar navigation, ColorPicker,
75
+ Sidebar, FullScreen toggle and the rest) do not go through `Button` and
76
+ already set `type="button"`; nothing about them changed. The one exception
77
+ was the `PromptInput` attachment chip above.
78
+
79
+ Raised with the Change Council as a MAJOR change: **CC-fancy-0003**, approved
80
+ by the owner on 2026-11-01 ("consumers need to adopt and adapt").
81
+ **A `^5` range will not receive this release**, by design: npm will not cross
82
+ a major on its own. Upgrading is a deliberate `npm install
83
+ @particle-academy/react-fancy@^6`. Sibling packages that declare a peer range
84
+ capped at `<6` must widen it before a consumer can install them alongside 6.
85
+
86
+ - `docs/Button.md` documents the `type` prop and its default, with a form
87
+ example.
88
+ - The `PromptInput` markup snapshots (`tests/__snapshots__/prompt-input-draft.test.tsx.snap`)
89
+ gained `type="button"` on the attach and send buttons, and nothing else.
90
+
14
91
  ## [5.72.0] - 2026-11-01
15
92
 
16
93
  ### Added
package/dist/button.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  require('./chunk-M5MUGSON.cjs');
4
- var chunkFBGCSGCE_cjs = require('./chunk-FBGCSGCE.cjs');
4
+ var chunkBX6ZVWTO_cjs = require('./chunk-BX6ZVWTO.cjs');
5
5
  require('./chunk-XCZZVRBY.cjs');
6
6
  require('./chunk-MXWR3T3N.cjs');
7
7
  require('./chunk-ZU5Q77OT.cjs');
@@ -10,11 +10,11 @@ require('./chunk-ZU5Q77OT.cjs');
10
10
 
11
11
  Object.defineProperty(exports, "Action", {
12
12
  enumerable: true,
13
- get: function () { return chunkFBGCSGCE_cjs.Action; }
13
+ get: function () { return chunkBX6ZVWTO_cjs.Action; }
14
14
  });
15
15
  Object.defineProperty(exports, "Button", {
16
16
  enumerable: true,
17
- get: function () { return chunkFBGCSGCE_cjs.Button; }
17
+ get: function () { return chunkBX6ZVWTO_cjs.Button; }
18
18
  });
19
19
  //# sourceMappingURL=button.cjs.map
20
20
  //# sourceMappingURL=button.cjs.map
package/dist/button.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import './chunk-LQ4ICCN2.js';
2
- export { Action, Button } from './chunk-3KF3OYWS.js';
2
+ export { Action, Button } from './chunk-WLDDGIGC.js';
3
3
  import './chunk-45BBNJQD.js';
4
4
  import './chunk-J3A4Z2P7.js';
5
5
  import './chunk-MMW2JGKZ.js';
@@ -1,14 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var chunk5WVEW3Q5_cjs = require('./chunk-5WVEW3Q5.cjs');
3
+ var chunkIA6JKI4P_cjs = require('./chunk-IA6JKI4P.cjs');
4
4
  require('./chunk-S3TRSECD.cjs');
5
- require('./chunk-A5CACIHR.cjs');
5
+ require('./chunk-JKH5ODNG.cjs');
6
6
  require('./chunk-2C64OVOZ.cjs');
7
7
  require('./chunk-BJL3VDRK.cjs');
8
8
  require('./chunk-VBWRH4UW.cjs');
9
9
  require('./chunk-MOU6O324.cjs');
10
10
  require('./chunk-M5MUGSON.cjs');
11
- require('./chunk-FBGCSGCE.cjs');
11
+ require('./chunk-BX6ZVWTO.cjs');
12
12
  require('./chunk-XCZZVRBY.cjs');
13
13
  require('./chunk-MXWR3T3N.cjs');
14
14
  require('./chunk-ZU5Q77OT.cjs');
@@ -17,11 +17,11 @@ require('./chunk-ZU5Q77OT.cjs');
17
17
 
18
18
  Object.defineProperty(exports, "ChatMessage", {
19
19
  enumerable: true,
20
- get: function () { return chunk5WVEW3Q5_cjs.ChatMessage; }
20
+ get: function () { return chunkIA6JKI4P_cjs.ChatMessage; }
21
21
  });
22
22
  Object.defineProperty(exports, "ChatThread", {
23
23
  enumerable: true,
24
- get: function () { return chunk5WVEW3Q5_cjs.ChatThread; }
24
+ get: function () { return chunkIA6JKI4P_cjs.ChatThread; }
25
25
  });
26
26
  //# sourceMappingURL=chat-thread.cjs.map
27
27
  //# sourceMappingURL=chat-thread.cjs.map
@@ -1,12 +1,12 @@
1
- export { ChatMessage, ChatThread } from './chunk-GUCUYDFB.js';
1
+ export { ChatMessage, ChatThread } from './chunk-PACFMPSX.js';
2
2
  import './chunk-AUTW5O4W.js';
3
- import './chunk-2MDU3W7E.js';
3
+ import './chunk-GBR4Q6CP.js';
4
4
  import './chunk-I3LAFKJU.js';
5
5
  import './chunk-UZCR7DK5.js';
6
6
  import './chunk-IQ4KQJAO.js';
7
7
  import './chunk-6FCQD2KQ.js';
8
8
  import './chunk-LQ4ICCN2.js';
9
- import './chunk-3KF3OYWS.js';
9
+ import './chunk-WLDDGIGC.js';
10
10
  import './chunk-45BBNJQD.js';
11
11
  import './chunk-J3A4Z2P7.js';
12
12
  import './chunk-MMW2JGKZ.js';
@@ -10,7 +10,7 @@ import { ColorPicker } from './chunk-SVSQXKFL.js';
10
10
  import { useInlineEdit } from './chunk-OL53XYHF.js';
11
11
  import { isImeComposing } from './chunk-S42OGG43.js';
12
12
  import { Badge } from './chunk-6FCQD2KQ.js';
13
- import { Button } from './chunk-3KF3OYWS.js';
13
+ import { Button } from './chunk-WLDDGIGC.js';
14
14
  import { Callout } from './chunk-ZXZJYVWP.js';
15
15
  import { cn } from './chunk-MMW2JGKZ.js';
16
16
  import { createContext, forwardRef, useId, useRef, useMemo, useState, useEffect, useCallback, useContext } from 'react';
@@ -1338,5 +1338,5 @@ function buildItems({
1338
1338
  }
1339
1339
 
1340
1340
  export { JSON_FIELD_TYPES, JsonEditor, applyJsonEdit, describeEdit, findJsonConflicts, getAtPath, inferType, parseKeyMap, parsePath, pathToString, resolveKeyRule, typeMatches };
1341
- //# sourceMappingURL=chunk-QIH7DDRO.js.map
1342
- //# sourceMappingURL=chunk-QIH7DDRO.js.map
1341
+ //# sourceMappingURL=chunk-3RIBZZLT.js.map
1342
+ //# sourceMappingURL=chunk-3RIBZZLT.js.map