@particle-academy/react-fancy 5.42.0 → 5.43.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.
- package/CHANGELOG.md +62 -0
- package/dist/button.cjs +3 -3
- package/dist/button.js +1 -1
- package/dist/{chunk-FQLL2JI7.js → chunk-G4WYCWIQ.js} +3 -3
- package/dist/{chunk-FQLL2JI7.js.map → chunk-G4WYCWIQ.js.map} +1 -1
- package/dist/{chunk-RMJGF7MN.cjs → chunk-ICQJ6475.cjs} +7 -6
- package/dist/chunk-ICQJ6475.cjs.map +1 -0
- package/dist/{chunk-46IPQEUP.js → chunk-JJRD3WX3.js} +7 -6
- package/dist/chunk-JJRD3WX3.js.map +1 -0
- package/dist/{chunk-DCDW3LW6.js → chunk-JVGJHIIQ.js} +3 -3
- package/dist/{chunk-DCDW3LW6.js.map → chunk-JVGJHIIQ.js.map} +1 -1
- package/dist/{chunk-IWQ3ZFLZ.cjs → chunk-K4NHVCY6.cjs} +15 -15
- package/dist/{chunk-IWQ3ZFLZ.cjs.map → chunk-K4NHVCY6.cjs.map} +1 -1
- package/dist/{chunk-MTUH2X3W.cjs → chunk-MQ4ULIOU.cjs} +4 -4
- package/dist/{chunk-MTUH2X3W.cjs.map → chunk-MQ4ULIOU.cjs.map} +1 -1
- package/dist/{chunk-5Q7EQQTT.cjs → chunk-MRARASNZ.cjs} +4 -4
- package/dist/{chunk-5Q7EQQTT.cjs.map → chunk-MRARASNZ.cjs.map} +1 -1
- package/dist/{chunk-2OMB3OOR.js → chunk-P7WMYJ5I.js} +3 -3
- package/dist/{chunk-2OMB3OOR.js.map → chunk-P7WMYJ5I.js.map} +1 -1
- package/dist/{chunk-YLPVTEUH.js → chunk-SF5OAVGD.js} +3 -3
- package/dist/{chunk-YLPVTEUH.js.map → chunk-SF5OAVGD.js.map} +1 -1
- package/dist/{chunk-FJ2GMQLC.cjs → chunk-UUBHUSUP.cjs} +6 -6
- package/dist/{chunk-FJ2GMQLC.cjs.map → chunk-UUBHUSUP.cjs.map} +1 -1
- package/dist/{chunk-7VLRHXLQ.cjs → chunk-WN45ZE37.cjs} +171 -50
- package/dist/chunk-WN45ZE37.cjs.map +1 -0
- package/dist/{chunk-NUPQJ5SJ.js → chunk-ZVXOL5H3.js} +173 -52
- package/dist/chunk-ZVXOL5H3.js.map +1 -0
- package/dist/index.cjs +33 -33
- package/dist/index.js +7 -7
- package/dist/json-editor.cjs +13 -13
- package/dist/json-editor.js +2 -2
- package/dist/magic-wand.cjs +3 -3
- package/dist/magic-wand.js +2 -2
- package/dist/prompt-input.cjs +3 -3
- package/dist/prompt-input.js +2 -2
- package/dist/reason-tag.cjs +3 -3
- package/dist/reason-tag.js +2 -2
- package/dist/tree-nav.cjs +4 -3
- package/dist/tree-nav.d.cts +14 -7
- package/dist/tree-nav.d.ts +14 -7
- package/dist/tree-nav.js +2 -1
- package/package.json +1 -1
- package/dist/chunk-46IPQEUP.js.map +0 -1
- package/dist/chunk-7VLRHXLQ.cjs.map +0 -1
- package/dist/chunk-NUPQJ5SJ.js.map +0 -1
- package/dist/chunk-RMJGF7MN.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,68 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
11
11
|
|
|
12
12
|
## [Unreleased]
|
|
13
13
|
|
|
14
|
+
## [5.43.0] - 2026-10-17
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- **A click in a big `TreeNav` no longer re-renders the whole tree.** Selection,
|
|
19
|
+
expansion and drag state lived in one context that every row read, so one click
|
|
20
|
+
re-rendered every row. Measured in a real browser on Genie 2's file browser
|
|
21
|
+
shape (5,000 nodes, 6 levels, all expanded): **175–267 ms per click before,
|
|
22
|
+
17–20 ms after**, with no change to your code. Rows now subscribe to their own
|
|
23
|
+
slice (am I selected / expanded / the drop target?), handlers are stable, and
|
|
24
|
+
expansion is a Set lookup instead of an array scan per row.
|
|
25
|
+
|
|
26
|
+
`useTreeNav()` is unchanged and still live: a component that reads it gets
|
|
27
|
+
current `selectedId` / `expandedIds` exactly as before.
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
|
|
31
|
+
- **`<TreeNav virtualize height={600}>` renders only the rows in view.** The
|
|
32
|
+
visible rows (expanded folders only) are flattened and windowed by
|
|
33
|
+
`VirtualList`; selection, expansion, context menus and drag-and-drop behave as
|
|
34
|
+
in the nested tree. Same tree, all expanded: **33 rows in the DOM instead of
|
|
35
|
+
5,000, and 30 ms to mount instead of 614 ms.** `rowHeight` seeds the row
|
|
36
|
+
estimate (default 26). The nested DOM wrapper
|
|
37
|
+
`data-react-fancy-tree-node-children` does not exist in this mode — rows are
|
|
38
|
+
flat, indented by `paddingLeft`.
|
|
39
|
+
|
|
40
|
+
- **`TreeNav` has tests.** It had none, which is why a refactor this size starts
|
|
41
|
+
with them: selection, toggling, lazy mounting, `useTreeNav`, virtual rows and
|
|
42
|
+
drag-and-drop in both modes.
|
|
43
|
+
|
|
44
|
+
**What you must DO: nothing.** `virtualize` is off by default and the nested tree
|
|
45
|
+
renders the same DOM as before. Collapsed folders were already cheap — their
|
|
46
|
+
children are not mounted until expanded — and still are.
|
|
47
|
+
|
|
48
|
+
## [5.42.1] - 2026-10-17
|
|
49
|
+
|
|
50
|
+
### Fixed
|
|
51
|
+
|
|
52
|
+
- **A filled `Button`'s icon and badge now take the label's colour** (react-fancy#34,
|
|
53
|
+
from the MOIC estate). They were hard-coded `text-white`, so on
|
|
54
|
+
`color="brand"` with a host's per-mode pair (pale blue `#BFD7EA` with navy
|
|
55
|
+
`#003057` contrast) the label turned navy and the icon stayed WHITE on pale
|
|
56
|
+
blue — nearly invisible. The same bug hit **every host** on `amber`, `yellow`
|
|
57
|
+
and `lime`, whose labels are dark: white icons on yellow. The icon is now
|
|
58
|
+
`text-current` and the badge `bg-current/20 text-current`, following the
|
|
59
|
+
colour's own text class. White-label colours (`blue`, `red`, …) look exactly
|
|
60
|
+
as before.
|
|
61
|
+
- **A `badge` or `avatar` no longer renders twice.** With `badgeTrailing` /
|
|
62
|
+
`avatarTrailing` unset, the check `badgeTrailing ?? trailing` was true in BOTH
|
|
63
|
+
the leading and trailing passes, so every badge appeared before and after the
|
|
64
|
+
label. They now render once, leading unless the `…Trailing` prop says
|
|
65
|
+
otherwise, as the docs and `alertIconTrailing` already had it.
|
|
66
|
+
|
|
67
|
+
### Added
|
|
68
|
+
|
|
69
|
+
- `data-action-icon` (`leading` / `trailing`) on a Button's icon wrapper, beside
|
|
70
|
+
the existing `data-action-badge` / `data-action-avatar` handles.
|
|
71
|
+
|
|
72
|
+
**What you must DO: nothing.** If you had added a `className` to force a dark
|
|
73
|
+
icon onto a light-filled button, you can remove it; if you had hidden one of
|
|
74
|
+
the two duplicate badges with CSS, remove that too.
|
|
75
|
+
|
|
14
76
|
## [5.42.0] - 2026-10-17
|
|
15
77
|
|
|
16
78
|
### Fixed
|
package/dist/button.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('./chunk-M5MUGSON.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkICQJ6475_cjs = require('./chunk-ICQJ6475.cjs');
|
|
5
5
|
require('./chunk-BFKCVSNK.cjs');
|
|
6
6
|
require('./chunk-XCZZVRBY.cjs');
|
|
7
7
|
require('./chunk-QKFOJKVE.cjs');
|
|
@@ -11,11 +11,11 @@ require('./chunk-ZU5Q77OT.cjs');
|
|
|
11
11
|
|
|
12
12
|
Object.defineProperty(exports, "Action", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkICQJ6475_cjs.Action; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "Button", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkICQJ6475_cjs.Button; }
|
|
19
19
|
});
|
|
20
20
|
//# sourceMappingURL=button.cjs.map
|
|
21
21
|
//# sourceMappingURL=button.cjs.map
|
package/dist/button.js
CHANGED
|
@@ -7,7 +7,7 @@ import { DisplayValue } from './chunk-KKWNKBKR.js';
|
|
|
7
7
|
import { resolveOption } from './chunk-GFYSELJF.js';
|
|
8
8
|
import { ColorPicker } from './chunk-F2GAZZVS.js';
|
|
9
9
|
import { Badge } from './chunk-6FCQD2KQ.js';
|
|
10
|
-
import { Button } from './chunk-
|
|
10
|
+
import { Button } from './chunk-JJRD3WX3.js';
|
|
11
11
|
import { Callout } from './chunk-ZXZJYVWP.js';
|
|
12
12
|
import { Text } from './chunk-5RLP77KK.js';
|
|
13
13
|
import { useInlineEdit } from './chunk-OL53XYHF.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-
|
|
1341
|
-
//# sourceMappingURL=chunk-
|
|
1340
|
+
//# sourceMappingURL=chunk-G4WYCWIQ.js.map
|
|
1341
|
+
//# sourceMappingURL=chunk-G4WYCWIQ.js.map
|