@particle-academy/react-fancy 5.60.2 → 5.61.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 +42 -0
- package/dist/autocomplete.cjs +4 -3
- package/dist/autocomplete.js +3 -2
- package/dist/{chunk-EEMNTO7L.cjs → chunk-3DMVK74Q.cjs} +4 -4
- package/dist/{chunk-EEMNTO7L.cjs.map → chunk-3DMVK74Q.cjs.map} +1 -1
- package/dist/{chunk-M77BB2QI.cjs → chunk-3I6PE2US.cjs} +12 -12
- package/dist/{chunk-M77BB2QI.cjs.map → chunk-3I6PE2US.cjs.map} +1 -1
- package/dist/{chunk-TGBLDJ72.js → chunk-4FJWHVC7.js} +3 -3
- package/dist/{chunk-TGBLDJ72.js.map → chunk-4FJWHVC7.js.map} +1 -1
- package/dist/{chunk-EXQ33MJR.cjs → chunk-4HUD33OP.cjs} +4 -4
- package/dist/{chunk-EXQ33MJR.cjs.map → chunk-4HUD33OP.cjs.map} +1 -1
- package/dist/chunk-4JLFIPHZ.js +43 -0
- package/dist/chunk-4JLFIPHZ.js.map +1 -0
- package/dist/{chunk-XAQQX7J2.cjs → chunk-4TTBPEQX.cjs} +48 -13
- package/dist/chunk-4TTBPEQX.cjs.map +1 -0
- package/dist/{chunk-YQTKTEWS.js → chunk-5JFA7NYE.js} +3 -3
- package/dist/{chunk-YQTKTEWS.js.map → chunk-5JFA7NYE.js.map} +1 -1
- package/dist/chunk-5VMILVWD.js +3 -0
- package/dist/chunk-5VMILVWD.js.map +1 -0
- package/dist/{chunk-DN244T6G.cjs → chunk-6GBO7R25.cjs} +4 -4
- package/dist/{chunk-DN244T6G.cjs.map → chunk-6GBO7R25.cjs.map} +1 -1
- package/dist/{chunk-4FZOH7BJ.js → chunk-74MEJWMH.js} +3 -3
- package/dist/{chunk-4FZOH7BJ.js.map → chunk-74MEJWMH.js.map} +1 -1
- package/dist/{chunk-4DGXL6JC.cjs → chunk-7KTBVKNO.cjs} +4 -4
- package/dist/{chunk-4DGXL6JC.cjs.map → chunk-7KTBVKNO.cjs.map} +1 -1
- package/dist/{chunk-XQDGUXMS.js → chunk-BHUSI56C.js} +3 -3
- package/dist/{chunk-XQDGUXMS.js.map → chunk-BHUSI56C.js.map} +1 -1
- package/dist/{chunk-UIE5FP3A.js → chunk-BQFPC5FL.js} +3 -3
- package/dist/{chunk-UIE5FP3A.js.map → chunk-BQFPC5FL.js.map} +1 -1
- package/dist/{chunk-VD3C7IA4.js → chunk-CEZVKKYW.js} +48 -13
- package/dist/chunk-CEZVKKYW.js.map +1 -0
- package/dist/{chunk-UZG6LO4Z.cjs → chunk-FU6K7XXZ.cjs} +4 -4
- package/dist/{chunk-UZG6LO4Z.cjs.map → chunk-FU6K7XXZ.cjs.map} +1 -1
- package/dist/{chunk-5ZNOLPIJ.cjs → chunk-H2YRZYKK.cjs} +5 -5
- package/dist/{chunk-5ZNOLPIJ.cjs.map → chunk-H2YRZYKK.cjs.map} +1 -1
- package/dist/{chunk-7R7HENZG.cjs → chunk-HRYM76ZE.cjs} +9 -9
- package/dist/{chunk-7R7HENZG.cjs.map → chunk-HRYM76ZE.cjs.map} +1 -1
- package/dist/{chunk-ZGQEKDG6.js → chunk-IHQHTJNN.js} +5 -5
- package/dist/{chunk-ZGQEKDG6.js.map → chunk-IHQHTJNN.js.map} +1 -1
- package/dist/{chunk-6HJF55U7.js → chunk-IY6LVALS.js} +3 -3
- package/dist/{chunk-6HJF55U7.js.map → chunk-IY6LVALS.js.map} +1 -1
- package/dist/{chunk-HTNQ5XUR.cjs → chunk-J4FKJ4IR.cjs} +4 -4
- package/dist/{chunk-HTNQ5XUR.cjs.map → chunk-J4FKJ4IR.cjs.map} +1 -1
- package/dist/{chunk-43ZRUYJC.cjs → chunk-JOWAS5A5.cjs} +9 -9
- package/dist/{chunk-43ZRUYJC.cjs.map → chunk-JOWAS5A5.cjs.map} +1 -1
- package/dist/{chunk-JRRYYW3Y.cjs → chunk-K6NADZ7O.cjs} +6 -6
- package/dist/{chunk-JRRYYW3Y.cjs.map → chunk-K6NADZ7O.cjs.map} +1 -1
- package/dist/{chunk-5JA4ENMF.js → chunk-LMOPAY7Q.js} +3 -3
- package/dist/{chunk-5JA4ENMF.js.map → chunk-LMOPAY7Q.js.map} +1 -1
- package/dist/{chunk-DAJPPKPO.js → chunk-M52S3TFI.js} +3 -3
- package/dist/{chunk-DAJPPKPO.js.map → chunk-M52S3TFI.js.map} +1 -1
- package/dist/{chunk-GLGUQGAQ.cjs → chunk-M6MGQI6G.cjs} +4 -4
- package/dist/{chunk-GLGUQGAQ.cjs.map → chunk-M6MGQI6G.cjs.map} +1 -1
- package/dist/chunk-MKHYENKR.cjs +4 -0
- package/dist/chunk-MKHYENKR.cjs.map +1 -0
- package/dist/{chunk-NHGU2BWT.js → chunk-MSGKIWYX.js} +3 -3
- package/dist/{chunk-NHGU2BWT.js.map → chunk-MSGKIWYX.js.map} +1 -1
- package/dist/{chunk-KQYOIPHQ.js → chunk-N7KUGFRG.js} +4 -4
- package/dist/{chunk-KQYOIPHQ.js.map → chunk-N7KUGFRG.js.map} +1 -1
- package/dist/{chunk-XB3H2EEL.js → chunk-NDLESFUH.js} +3 -3
- package/dist/{chunk-XB3H2EEL.js.map → chunk-NDLESFUH.js.map} +1 -1
- package/dist/chunk-NE3BZV3F.js +224 -0
- package/dist/chunk-NE3BZV3F.js.map +1 -0
- package/dist/{chunk-XYOT75HH.js → chunk-NORVXHRU.js} +3 -3
- package/dist/{chunk-XYOT75HH.js.map → chunk-NORVXHRU.js.map} +1 -1
- package/dist/chunk-O4HZVZMY.cjs +226 -0
- package/dist/chunk-O4HZVZMY.cjs.map +1 -0
- package/dist/{chunk-5H6IUCOD.cjs → chunk-P6V4QWJK.cjs} +4 -4
- package/dist/{chunk-5H6IUCOD.cjs.map → chunk-P6V4QWJK.cjs.map} +1 -1
- package/dist/{chunk-LZHGXRFD.js → chunk-PKFEJWVI.js} +3 -3
- package/dist/{chunk-LZHGXRFD.js.map → chunk-PKFEJWVI.js.map} +1 -1
- package/dist/chunk-QMCMRQ2G.cjs +53 -0
- package/dist/chunk-QMCMRQ2G.cjs.map +1 -0
- package/dist/{chunk-BJKKW77L.cjs → chunk-QXMQVLRQ.cjs} +4 -4
- package/dist/{chunk-BJKKW77L.cjs.map → chunk-QXMQVLRQ.cjs.map} +1 -1
- package/dist/{chunk-WHEXTDPV.js → chunk-RBCMKPBX.js} +7 -5
- package/dist/chunk-RBCMKPBX.js.map +1 -0
- package/dist/{chunk-LVE6ERRS.cjs → chunk-RRMQGTVB.cjs} +6 -6
- package/dist/{chunk-LVE6ERRS.cjs.map → chunk-RRMQGTVB.cjs.map} +1 -1
- package/dist/{chunk-T67FLC55.js → chunk-SHF44YGG.js} +3 -3
- package/dist/{chunk-T67FLC55.js.map → chunk-SHF44YGG.js.map} +1 -1
- package/dist/{chunk-NBZC6LOB.cjs → chunk-TI7D4QDM.cjs} +6 -3
- package/dist/chunk-TI7D4QDM.cjs.map +1 -0
- package/dist/{chunk-5JK2VDWY.cjs → chunk-TYTENEJQ.cjs} +6 -6
- package/dist/{chunk-5JK2VDWY.cjs.map → chunk-TYTENEJQ.cjs.map} +1 -1
- package/dist/{chunk-WW56U3RV.js → chunk-UBEOB55O.js} +3 -3
- package/dist/{chunk-WW56U3RV.js.map → chunk-UBEOB55O.js.map} +1 -1
- package/dist/chunk-UGXBTIV5.js +51 -0
- package/dist/chunk-UGXBTIV5.js.map +1 -0
- package/dist/{chunk-M6XBF2ZS.js → chunk-UJZJBHMH.js} +3 -3
- package/dist/{chunk-M6XBF2ZS.js.map → chunk-UJZJBHMH.js.map} +1 -1
- package/dist/{chunk-T45LBTXH.js → chunk-ULG4OA2T.js} +3 -3
- package/dist/{chunk-T45LBTXH.js.map → chunk-ULG4OA2T.js.map} +1 -1
- package/dist/{chunk-SIEPD6NR.cjs → chunk-UM4JXBRZ.cjs} +4 -4
- package/dist/{chunk-SIEPD6NR.cjs.map → chunk-UM4JXBRZ.cjs.map} +1 -1
- package/dist/{chunk-FGI2EC32.cjs → chunk-Z5OTOYWI.cjs} +4 -4
- package/dist/{chunk-FGI2EC32.cjs.map → chunk-Z5OTOYWI.cjs.map} +1 -1
- package/dist/chunk-ZPBCZPMD.cjs +48 -0
- package/dist/chunk-ZPBCZPMD.cjs.map +1 -0
- package/dist/command.cjs +5 -4
- package/dist/command.js +3 -2
- package/dist/composer.cjs +7 -6
- package/dist/composer.js +5 -4
- package/dist/context-menu.cjs +5 -4
- package/dist/context-menu.js +3 -2
- package/dist/drawer.cjs +5 -4
- package/dist/drawer.js +3 -2
- package/dist/dropdown.cjs +5 -4
- package/dist/dropdown.js +3 -2
- package/dist/editor.cjs +8 -3
- package/dist/editor.d.cts +53 -4
- package/dist/editor.d.ts +53 -4
- package/dist/editor.js +6 -1
- package/dist/full-screen.cjs +39 -0
- package/dist/full-screen.cjs.map +1 -0
- package/dist/full-screen.d.cts +54 -0
- package/dist/full-screen.d.ts +54 -0
- package/dist/full-screen.js +10 -0
- package/dist/full-screen.js.map +1 -0
- package/dist/index.cjs +152 -120
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +35 -31
- package/dist/index.js.map +1 -1
- package/dist/input.cjs +6 -5
- package/dist/input.js +5 -4
- package/dist/inputs.cjs +17 -16
- package/dist/inputs.js +9 -8
- package/dist/json-editor.cjs +19 -18
- package/dist/json-editor.js +8 -7
- package/dist/magic-wand.cjs +4 -3
- package/dist/magic-wand.js +3 -2
- package/dist/mobile-menu.cjs +6 -4
- package/dist/mobile-menu.js +4 -2
- package/dist/modal.cjs +5 -4
- package/dist/modal.js +3 -2
- package/dist/paste-pills.cjs +17 -16
- package/dist/paste-pills.js +4 -3
- package/dist/popover.cjs +5 -4
- package/dist/popover.js +3 -2
- package/dist/portal.cjs +7 -2
- package/dist/portal.d.cts +12 -1
- package/dist/portal.d.ts +12 -1
- package/dist/portal.js +2 -1
- package/dist/prompt-input.cjs +7 -6
- package/dist/prompt-input.js +6 -5
- package/dist/reason-tag.cjs +5 -4
- package/dist/reason-tag.js +4 -3
- package/dist/select.cjs +4 -3
- package/dist/select.js +3 -2
- package/dist/sidebar.cjs +1 -0
- package/dist/sidebar.js +1 -0
- package/dist/toast.cjs +5 -4
- package/dist/toast.js +3 -2
- package/dist/tooltip.cjs +4 -3
- package/dist/tooltip.js +3 -2
- package/dist/use-full-screen-H2j6qXDB.d.cts +85 -0
- package/dist/use-full-screen-H2j6qXDB.d.ts +85 -0
- package/docs/Editor.md +24 -0
- package/docs/FullScreen.md +95 -0
- package/package.json +11 -1
- package/dist/chunk-NBZC6LOB.cjs.map +0 -1
- package/dist/chunk-VD3C7IA4.js.map +0 -1
- package/dist/chunk-WHEXTDPV.js.map +0 -1
- package/dist/chunk-XAQQX7J2.cjs.map +0 -1
package/dist/paste-pills.cjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkTYTENEJQ_cjs = require('./chunk-TYTENEJQ.cjs');
|
|
4
|
+
require('./chunk-FU6K7XXZ.cjs');
|
|
5
5
|
require('./chunk-J2DI6RMR.cjs');
|
|
6
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-MKHYENKR.cjs');
|
|
7
|
+
require('./chunk-TI7D4QDM.cjs');
|
|
7
8
|
require('./chunk-57FQGQJK.cjs');
|
|
8
9
|
require('./chunk-RXDRYWVD.cjs');
|
|
9
10
|
require('./chunk-SNHU2AI4.cjs');
|
|
@@ -13,55 +14,55 @@ require('./chunk-ZU5Q77OT.cjs');
|
|
|
13
14
|
|
|
14
15
|
Object.defineProperty(exports, "HOST_ATTR", {
|
|
15
16
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkTYTENEJQ_cjs.HOST_ATTR; }
|
|
17
18
|
});
|
|
18
19
|
Object.defineProperty(exports, "InlinePasteEditor", {
|
|
19
20
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkTYTENEJQ_cjs.InlinePasteEditor; }
|
|
21
22
|
});
|
|
22
23
|
Object.defineProperty(exports, "InlinePill", {
|
|
23
24
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkTYTENEJQ_cjs.InlinePill; }
|
|
25
26
|
});
|
|
26
27
|
Object.defineProperty(exports, "PILL_MARK", {
|
|
27
28
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkTYTENEJQ_cjs.PILL_MARK; }
|
|
29
30
|
});
|
|
30
31
|
Object.defineProperty(exports, "PastedFilesInput", {
|
|
31
32
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkTYTENEJQ_cjs.PastedFilesInput; }
|
|
33
34
|
});
|
|
34
35
|
Object.defineProperty(exports, "endsOf", {
|
|
35
36
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkTYTENEJQ_cjs.endsOf; }
|
|
37
38
|
});
|
|
38
39
|
Object.defineProperty(exports, "expandMarkers", {
|
|
39
40
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkTYTENEJQ_cjs.expandMarkers; }
|
|
41
42
|
});
|
|
42
43
|
Object.defineProperty(exports, "markedIds", {
|
|
43
44
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkTYTENEJQ_cjs.markedIds; }
|
|
45
46
|
});
|
|
46
47
|
Object.defineProperty(exports, "pasteMarker", {
|
|
47
48
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkTYTENEJQ_cjs.pasteMarker; }
|
|
49
50
|
});
|
|
50
51
|
Object.defineProperty(exports, "segmentValue", {
|
|
51
52
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkTYTENEJQ_cjs.segmentValue; }
|
|
53
54
|
});
|
|
54
55
|
Object.defineProperty(exports, "useInlinePaste", {
|
|
55
56
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkTYTENEJQ_cjs.useInlinePaste; }
|
|
57
58
|
});
|
|
58
59
|
Object.defineProperty(exports, "usePastePills", {
|
|
59
60
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkTYTENEJQ_cjs.usePastePills; }
|
|
61
62
|
});
|
|
62
63
|
Object.defineProperty(exports, "withSeparators", {
|
|
63
64
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkTYTENEJQ_cjs.withSeparators; }
|
|
65
66
|
});
|
|
66
67
|
//# sourceMappingURL=paste-pills.cjs.map
|
|
67
68
|
//# sourceMappingURL=paste-pills.cjs.map
|
package/dist/paste-pills.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { HOST_ATTR, InlinePasteEditor, InlinePill, PILL_MARK, PastedFilesInput, endsOf, expandMarkers, markedIds, pasteMarker, segmentValue, useInlinePaste, usePastePills, withSeparators } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { HOST_ATTR, InlinePasteEditor, InlinePill, PILL_MARK, PastedFilesInput, endsOf, expandMarkers, markedIds, pasteMarker, segmentValue, useInlinePaste, usePastePills, withSeparators } from './chunk-UJZJBHMH.js';
|
|
2
|
+
import './chunk-NORVXHRU.js';
|
|
3
3
|
import './chunk-MQ6VGG62.js';
|
|
4
|
-
import './chunk-
|
|
4
|
+
import './chunk-5VMILVWD.js';
|
|
5
|
+
import './chunk-RBCMKPBX.js';
|
|
5
6
|
import './chunk-RGANGU7X.js';
|
|
6
7
|
import './chunk-JXE5XID6.js';
|
|
7
8
|
import './chunk-EDYAXGUM.js';
|
package/dist/popover.cjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkFU6K7XXZ_cjs = require('./chunk-FU6K7XXZ.cjs');
|
|
4
4
|
require('./chunk-J2DI6RMR.cjs');
|
|
5
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-MKHYENKR.cjs');
|
|
6
|
+
require('./chunk-TI7D4QDM.cjs');
|
|
6
7
|
require('./chunk-57FQGQJK.cjs');
|
|
7
8
|
require('./chunk-RXDRYWVD.cjs');
|
|
8
9
|
require('./chunk-ZU5Q77OT.cjs');
|
|
@@ -11,11 +12,11 @@ require('./chunk-ZU5Q77OT.cjs');
|
|
|
11
12
|
|
|
12
13
|
Object.defineProperty(exports, "Popover", {
|
|
13
14
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkFU6K7XXZ_cjs.Popover; }
|
|
15
16
|
});
|
|
16
17
|
Object.defineProperty(exports, "usePopover", {
|
|
17
18
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkFU6K7XXZ_cjs.usePopover; }
|
|
19
20
|
});
|
|
20
21
|
//# sourceMappingURL=popover.cjs.map
|
|
21
22
|
//# sourceMappingURL=popover.cjs.map
|
package/dist/popover.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { Popover, usePopover } from './chunk-
|
|
1
|
+
export { Popover, usePopover } from './chunk-NORVXHRU.js';
|
|
2
2
|
import './chunk-MQ6VGG62.js';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-5VMILVWD.js';
|
|
4
|
+
import './chunk-RBCMKPBX.js';
|
|
4
5
|
import './chunk-RGANGU7X.js';
|
|
5
6
|
import './chunk-JXE5XID6.js';
|
|
6
7
|
import './chunk-MMW2JGKZ.js';
|
package/dist/portal.cjs
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
require('./chunk-MKHYENKR.cjs');
|
|
4
|
+
var chunkTI7D4QDM_cjs = require('./chunk-TI7D4QDM.cjs');
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
Object.defineProperty(exports, "Portal", {
|
|
8
9
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkTI7D4QDM_cjs.Portal; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "PortalContainerContext", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkTI7D4QDM_cjs.PortalContainerContext; }
|
|
10
15
|
});
|
|
11
16
|
//# sourceMappingURL=portal.cjs.map
|
|
12
17
|
//# sourceMappingURL=portal.cjs.map
|
package/dist/portal.d.cts
CHANGED
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Where a `<Portal>` without an explicit `container` renders. `null` means
|
|
6
|
+
* `document.body`, which is what every Portal did before this existed.
|
|
7
|
+
*
|
|
8
|
+
* A full-screen surface provides its own element here while it is active. In the
|
|
9
|
+
* browser's Fullscreen API only the full-screen element's subtree is painted, so
|
|
10
|
+
* a menu, tooltip or dialog portalled to `<body>` from inside a full-screen
|
|
11
|
+
* editor would open invisibly. Redirecting keeps every react-fancy overlay a
|
|
12
|
+
* descendant of the surface without the components inside knowing.
|
|
13
|
+
*/
|
|
14
|
+
declare const PortalContainerContext: react.Context<HTMLElement | null>;
|
|
4
15
|
interface PortalProps {
|
|
5
16
|
children: ReactNode;
|
|
6
17
|
container?: HTMLElement;
|
|
7
18
|
}
|
|
8
19
|
declare function Portal({ children, container }: PortalProps): react.ReactPortal | null;
|
|
9
20
|
|
|
10
|
-
export { Portal, type PortalProps };
|
|
21
|
+
export { Portal, PortalContainerContext, type PortalProps };
|
package/dist/portal.d.ts
CHANGED
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Where a `<Portal>` without an explicit `container` renders. `null` means
|
|
6
|
+
* `document.body`, which is what every Portal did before this existed.
|
|
7
|
+
*
|
|
8
|
+
* A full-screen surface provides its own element here while it is active. In the
|
|
9
|
+
* browser's Fullscreen API only the full-screen element's subtree is painted, so
|
|
10
|
+
* a menu, tooltip or dialog portalled to `<body>` from inside a full-screen
|
|
11
|
+
* editor would open invisibly. Redirecting keeps every react-fancy overlay a
|
|
12
|
+
* descendant of the surface without the components inside knowing.
|
|
13
|
+
*/
|
|
14
|
+
declare const PortalContainerContext: react.Context<HTMLElement | null>;
|
|
4
15
|
interface PortalProps {
|
|
5
16
|
children: ReactNode;
|
|
6
17
|
container?: HTMLElement;
|
|
7
18
|
}
|
|
8
19
|
declare function Portal({ children, container }: PortalProps): react.ReactPortal | null;
|
|
9
20
|
|
|
10
|
-
export { Portal, type PortalProps };
|
|
21
|
+
export { Portal, PortalContainerContext, type PortalProps };
|
package/dist/portal.js
CHANGED
package/dist/prompt-input.cjs
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkHRYM76ZE_cjs = require('./chunk-HRYM76ZE.cjs');
|
|
4
|
+
require('./chunk-QXMQVLRQ.cjs');
|
|
5
5
|
require('./chunk-I27K6NLX.cjs');
|
|
6
6
|
require('./chunk-AIA5UNQ5.cjs');
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-TYTENEJQ.cjs');
|
|
8
|
+
require('./chunk-FU6K7XXZ.cjs');
|
|
9
9
|
require('./chunk-J2DI6RMR.cjs');
|
|
10
|
-
require('./chunk-
|
|
10
|
+
require('./chunk-MKHYENKR.cjs');
|
|
11
|
+
require('./chunk-TI7D4QDM.cjs');
|
|
11
12
|
require('./chunk-57FQGQJK.cjs');
|
|
12
13
|
require('./chunk-RXDRYWVD.cjs');
|
|
13
14
|
require('./chunk-M5MUGSON.cjs');
|
|
@@ -22,7 +23,7 @@ require('./chunk-ZU5Q77OT.cjs');
|
|
|
22
23
|
|
|
23
24
|
Object.defineProperty(exports, "PromptInput", {
|
|
24
25
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkHRYM76ZE_cjs.PromptInput; }
|
|
26
27
|
});
|
|
27
28
|
//# sourceMappingURL=prompt-input.cjs.map
|
|
28
29
|
//# sourceMappingURL=prompt-input.cjs.map
|
package/dist/prompt-input.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
export { PromptInput } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { PromptInput } from './chunk-N7KUGFRG.js';
|
|
2
|
+
import './chunk-4FJWHVC7.js';
|
|
3
3
|
import './chunk-SV5BW3IA.js';
|
|
4
4
|
import './chunk-TJ66S5K6.js';
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
5
|
+
import './chunk-UJZJBHMH.js';
|
|
6
|
+
import './chunk-NORVXHRU.js';
|
|
7
7
|
import './chunk-MQ6VGG62.js';
|
|
8
|
-
import './chunk-
|
|
8
|
+
import './chunk-5VMILVWD.js';
|
|
9
|
+
import './chunk-RBCMKPBX.js';
|
|
9
10
|
import './chunk-RGANGU7X.js';
|
|
10
11
|
import './chunk-JXE5XID6.js';
|
|
11
12
|
import './chunk-LQ4ICCN2.js';
|
package/dist/reason-tag.cjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkRRMQGTVB_cjs = require('./chunk-RRMQGTVB.cjs');
|
|
4
|
+
require('./chunk-FU6K7XXZ.cjs');
|
|
5
5
|
require('./chunk-J2DI6RMR.cjs');
|
|
6
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-MKHYENKR.cjs');
|
|
7
|
+
require('./chunk-TI7D4QDM.cjs');
|
|
7
8
|
require('./chunk-57FQGQJK.cjs');
|
|
8
9
|
require('./chunk-RXDRYWVD.cjs');
|
|
9
10
|
require('./chunk-M5MUGSON.cjs');
|
|
@@ -17,7 +18,7 @@ require('./chunk-ZU5Q77OT.cjs');
|
|
|
17
18
|
|
|
18
19
|
Object.defineProperty(exports, "ReasonTag", {
|
|
19
20
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkRRMQGTVB_cjs.ReasonTag; }
|
|
21
22
|
});
|
|
22
23
|
//# sourceMappingURL=reason-tag.cjs.map
|
|
23
24
|
//# sourceMappingURL=reason-tag.cjs.map
|
package/dist/reason-tag.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { ReasonTag } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { ReasonTag } from './chunk-74MEJWMH.js';
|
|
2
|
+
import './chunk-NORVXHRU.js';
|
|
3
3
|
import './chunk-MQ6VGG62.js';
|
|
4
|
-
import './chunk-
|
|
4
|
+
import './chunk-5VMILVWD.js';
|
|
5
|
+
import './chunk-RBCMKPBX.js';
|
|
5
6
|
import './chunk-RGANGU7X.js';
|
|
6
7
|
import './chunk-JXE5XID6.js';
|
|
7
8
|
import './chunk-LQ4ICCN2.js';
|
package/dist/select.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('./chunk-HXLSEBAL.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkM6MGQI6G_cjs = require('./chunk-M6MGQI6G.cjs');
|
|
5
5
|
require('./chunk-MRZXTL46.cjs');
|
|
6
6
|
require('./chunk-P53432AK.cjs');
|
|
7
7
|
require('./chunk-QF7CD4JH.cjs');
|
|
@@ -9,7 +9,8 @@ require('./chunk-O3F6DYWR.cjs');
|
|
|
9
9
|
require('./chunk-KJ22KE56.cjs');
|
|
10
10
|
require('./chunk-L3V3BYVS.cjs');
|
|
11
11
|
require('./chunk-J2DI6RMR.cjs');
|
|
12
|
-
require('./chunk-
|
|
12
|
+
require('./chunk-MKHYENKR.cjs');
|
|
13
|
+
require('./chunk-TI7D4QDM.cjs');
|
|
13
14
|
require('./chunk-57FQGQJK.cjs');
|
|
14
15
|
require('./chunk-RXDRYWVD.cjs');
|
|
15
16
|
require('./chunk-ZU5Q77OT.cjs');
|
|
@@ -18,7 +19,7 @@ require('./chunk-ZU5Q77OT.cjs');
|
|
|
18
19
|
|
|
19
20
|
Object.defineProperty(exports, "Select", {
|
|
20
21
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkM6MGQI6G_cjs.Select; }
|
|
22
23
|
});
|
|
23
24
|
//# sourceMappingURL=select.cjs.map
|
|
24
25
|
//# sourceMappingURL=select.cjs.map
|
package/dist/select.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './chunk-GNHQVPZP.js';
|
|
2
|
-
export { Select } from './chunk-
|
|
2
|
+
export { Select } from './chunk-ULG4OA2T.js';
|
|
3
3
|
import './chunk-KXYMMNNV.js';
|
|
4
4
|
import './chunk-WX5XYDVN.js';
|
|
5
5
|
import './chunk-5WQ6FPSP.js';
|
|
@@ -7,7 +7,8 @@ import './chunk-USWQAMI3.js';
|
|
|
7
7
|
import './chunk-OL53XYHF.js';
|
|
8
8
|
import './chunk-NRXK42LO.js';
|
|
9
9
|
import './chunk-MQ6VGG62.js';
|
|
10
|
-
import './chunk-
|
|
10
|
+
import './chunk-5VMILVWD.js';
|
|
11
|
+
import './chunk-RBCMKPBX.js';
|
|
11
12
|
import './chunk-RGANGU7X.js';
|
|
12
13
|
import './chunk-JXE5XID6.js';
|
|
13
14
|
import './chunk-MMW2JGKZ.js';
|
package/dist/sidebar.cjs
CHANGED
package/dist/sidebar.js
CHANGED
package/dist/toast.cjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkH2YRZYKK_cjs = require('./chunk-H2YRZYKK.cjs');
|
|
4
|
+
require('./chunk-MKHYENKR.cjs');
|
|
5
|
+
require('./chunk-TI7D4QDM.cjs');
|
|
5
6
|
require('./chunk-VBWRH4UW.cjs');
|
|
6
7
|
require('./chunk-MOU6O324.cjs');
|
|
7
8
|
require('./chunk-SNHU2AI4.cjs');
|
|
@@ -11,11 +12,11 @@ require('./chunk-ZU5Q77OT.cjs');
|
|
|
11
12
|
|
|
12
13
|
Object.defineProperty(exports, "Toast", {
|
|
13
14
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkH2YRZYKK_cjs.Toast; }
|
|
15
16
|
});
|
|
16
17
|
Object.defineProperty(exports, "useToast", {
|
|
17
18
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkH2YRZYKK_cjs.useToast; }
|
|
19
20
|
});
|
|
20
21
|
//# sourceMappingURL=toast.cjs.map
|
|
21
22
|
//# sourceMappingURL=toast.cjs.map
|
package/dist/toast.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { Toast, useToast } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { Toast, useToast } from './chunk-BQFPC5FL.js';
|
|
2
|
+
import './chunk-5VMILVWD.js';
|
|
3
|
+
import './chunk-RBCMKPBX.js';
|
|
3
4
|
import './chunk-IQ4KQJAO.js';
|
|
4
5
|
import './chunk-6FCQD2KQ.js';
|
|
5
6
|
import './chunk-EDYAXGUM.js';
|
package/dist/tooltip.cjs
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkQXMQVLRQ_cjs = require('./chunk-QXMQVLRQ.cjs');
|
|
4
4
|
require('./chunk-I27K6NLX.cjs');
|
|
5
5
|
require('./chunk-J2DI6RMR.cjs');
|
|
6
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-MKHYENKR.cjs');
|
|
7
|
+
require('./chunk-TI7D4QDM.cjs');
|
|
7
8
|
require('./chunk-ZU5Q77OT.cjs');
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
Object.defineProperty(exports, "Tooltip", {
|
|
12
13
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkQXMQVLRQ_cjs.Tooltip; }
|
|
14
15
|
});
|
|
15
16
|
//# sourceMappingURL=tooltip.cjs.map
|
|
16
17
|
//# sourceMappingURL=tooltip.cjs.map
|
package/dist/tooltip.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { Tooltip } from './chunk-
|
|
1
|
+
export { Tooltip } from './chunk-4FJWHVC7.js';
|
|
2
2
|
import './chunk-SV5BW3IA.js';
|
|
3
3
|
import './chunk-MQ6VGG62.js';
|
|
4
|
-
import './chunk-
|
|
4
|
+
import './chunk-5VMILVWD.js';
|
|
5
|
+
import './chunk-RBCMKPBX.js';
|
|
5
6
|
import './chunk-MMW2JGKZ.js';
|
|
6
7
|
//# sourceMappingURL=tooltip.js.map
|
|
7
8
|
//# sourceMappingURL=tooltip.js.map
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { RefObject, CSSProperties, KeyboardEvent } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* How a surface goes full screen.
|
|
5
|
+
*
|
|
6
|
+
* - `"overlay"` (default): the element itself becomes `position: fixed` over the
|
|
7
|
+
* viewport, in place. It always works: inside an iframe without
|
|
8
|
+
* `allow="fullscreen"`, inside a dialog, without a user gesture. Nothing is
|
|
9
|
+
* reparented, so an editor keeps its caret, undo stack and DOM.
|
|
10
|
+
* - `"native"`: the browser Fullscreen API (`element.requestFullscreen()`),
|
|
11
|
+
* which hides the browser chrome too. The overlay is applied first and stays
|
|
12
|
+
* if the request is rejected or the API is missing, so the user gets full
|
|
13
|
+
* screen either way; `activeMode` reports which one took.
|
|
14
|
+
*/
|
|
15
|
+
type FullScreenMode = "overlay" | "native";
|
|
16
|
+
interface UseFullScreenOptions {
|
|
17
|
+
/** Controlled flag. Pair with `onFullScreenChange`. */
|
|
18
|
+
fullScreen?: boolean;
|
|
19
|
+
/** Initial flag when uncontrolled. @default false */
|
|
20
|
+
defaultFullScreen?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Fired with the requested state — from the toggle, Escape, an agent calling
|
|
23
|
+
* `setFullScreen`, or the user leaving the browser's own full screen.
|
|
24
|
+
*/
|
|
25
|
+
onFullScreenChange?: (fullScreen: boolean) => void;
|
|
26
|
+
/** @default "overlay" */
|
|
27
|
+
mode?: FullScreenMode;
|
|
28
|
+
/** Leave full screen on Escape. @default true */
|
|
29
|
+
closeOnEscape?: boolean;
|
|
30
|
+
/** Stop the page behind from scrolling while active. @default true */
|
|
31
|
+
lockScroll?: boolean;
|
|
32
|
+
/** Stacking order of the overlay. Matches `Modal`. @default 50 */
|
|
33
|
+
zIndex?: number;
|
|
34
|
+
/** Accessible names for the toggle. */
|
|
35
|
+
labels?: {
|
|
36
|
+
enter?: string;
|
|
37
|
+
exit?: string;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
interface FullScreenTargetProps<T extends HTMLElement> {
|
|
41
|
+
ref: RefObject<T | null>;
|
|
42
|
+
"data-fullscreen": "true" | "false";
|
|
43
|
+
"data-fullscreen-mode"?: FullScreenMode;
|
|
44
|
+
style?: CSSProperties;
|
|
45
|
+
onKeyDown: (event: KeyboardEvent<T>) => void;
|
|
46
|
+
}
|
|
47
|
+
interface FullScreenToggleProps {
|
|
48
|
+
type: "button";
|
|
49
|
+
onClick: () => void;
|
|
50
|
+
"aria-pressed": boolean;
|
|
51
|
+
"aria-label": string;
|
|
52
|
+
title: string;
|
|
53
|
+
"data-react-fancy-fullscreen-toggle": "";
|
|
54
|
+
"data-fullscreen": "true" | "false";
|
|
55
|
+
}
|
|
56
|
+
interface UseFullScreenResult<T extends HTMLElement = HTMLElement> {
|
|
57
|
+
fullScreen: boolean;
|
|
58
|
+
setFullScreen: (fullScreen: boolean) => void;
|
|
59
|
+
toggle: () => void;
|
|
60
|
+
/** The mechanism in effect while active; `null` when not full screen. */
|
|
61
|
+
activeMode: FullScreenMode | null;
|
|
62
|
+
/** Attach to the element that goes full screen. Also inside `targetProps`. */
|
|
63
|
+
ref: RefObject<T | null>;
|
|
64
|
+
/**
|
|
65
|
+
* Spread onto the surface's root. Carries the ref, the `data-fullscreen`
|
|
66
|
+
* handle, the overlay style and the Escape/Tab handler. Merge your own
|
|
67
|
+
* `style` / `onKeyDown` if the root has them.
|
|
68
|
+
*/
|
|
69
|
+
targetProps: FullScreenTargetProps<T>;
|
|
70
|
+
/** Spread onto a `<button>` to make it the toggle. */
|
|
71
|
+
toggleProps: FullScreenToggleProps;
|
|
72
|
+
/**
|
|
73
|
+
* The element to portal into while active, else `null`. Provide it through
|
|
74
|
+
* `PortalContainerContext` so menus opened inside stay visible.
|
|
75
|
+
*/
|
|
76
|
+
portalContainer: HTMLElement | null;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* A controlled full-screen state for any surface: Editor today, DeckEditor and
|
|
80
|
+
* SheetWorkbook next. Render-time output is pure (no `window`/`document`), so it
|
|
81
|
+
* server-renders; everything that touches the DOM runs in effects.
|
|
82
|
+
*/
|
|
83
|
+
declare function useFullScreen<T extends HTMLElement = HTMLElement>(options?: UseFullScreenOptions): UseFullScreenResult<T>;
|
|
84
|
+
|
|
85
|
+
export { type FullScreenMode as F, type UseFullScreenOptions as U, type FullScreenTargetProps as a, type FullScreenToggleProps as b, type UseFullScreenResult as c, useFullScreen as u };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { RefObject, CSSProperties, KeyboardEvent } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* How a surface goes full screen.
|
|
5
|
+
*
|
|
6
|
+
* - `"overlay"` (default): the element itself becomes `position: fixed` over the
|
|
7
|
+
* viewport, in place. It always works: inside an iframe without
|
|
8
|
+
* `allow="fullscreen"`, inside a dialog, without a user gesture. Nothing is
|
|
9
|
+
* reparented, so an editor keeps its caret, undo stack and DOM.
|
|
10
|
+
* - `"native"`: the browser Fullscreen API (`element.requestFullscreen()`),
|
|
11
|
+
* which hides the browser chrome too. The overlay is applied first and stays
|
|
12
|
+
* if the request is rejected or the API is missing, so the user gets full
|
|
13
|
+
* screen either way; `activeMode` reports which one took.
|
|
14
|
+
*/
|
|
15
|
+
type FullScreenMode = "overlay" | "native";
|
|
16
|
+
interface UseFullScreenOptions {
|
|
17
|
+
/** Controlled flag. Pair with `onFullScreenChange`. */
|
|
18
|
+
fullScreen?: boolean;
|
|
19
|
+
/** Initial flag when uncontrolled. @default false */
|
|
20
|
+
defaultFullScreen?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Fired with the requested state — from the toggle, Escape, an agent calling
|
|
23
|
+
* `setFullScreen`, or the user leaving the browser's own full screen.
|
|
24
|
+
*/
|
|
25
|
+
onFullScreenChange?: (fullScreen: boolean) => void;
|
|
26
|
+
/** @default "overlay" */
|
|
27
|
+
mode?: FullScreenMode;
|
|
28
|
+
/** Leave full screen on Escape. @default true */
|
|
29
|
+
closeOnEscape?: boolean;
|
|
30
|
+
/** Stop the page behind from scrolling while active. @default true */
|
|
31
|
+
lockScroll?: boolean;
|
|
32
|
+
/** Stacking order of the overlay. Matches `Modal`. @default 50 */
|
|
33
|
+
zIndex?: number;
|
|
34
|
+
/** Accessible names for the toggle. */
|
|
35
|
+
labels?: {
|
|
36
|
+
enter?: string;
|
|
37
|
+
exit?: string;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
interface FullScreenTargetProps<T extends HTMLElement> {
|
|
41
|
+
ref: RefObject<T | null>;
|
|
42
|
+
"data-fullscreen": "true" | "false";
|
|
43
|
+
"data-fullscreen-mode"?: FullScreenMode;
|
|
44
|
+
style?: CSSProperties;
|
|
45
|
+
onKeyDown: (event: KeyboardEvent<T>) => void;
|
|
46
|
+
}
|
|
47
|
+
interface FullScreenToggleProps {
|
|
48
|
+
type: "button";
|
|
49
|
+
onClick: () => void;
|
|
50
|
+
"aria-pressed": boolean;
|
|
51
|
+
"aria-label": string;
|
|
52
|
+
title: string;
|
|
53
|
+
"data-react-fancy-fullscreen-toggle": "";
|
|
54
|
+
"data-fullscreen": "true" | "false";
|
|
55
|
+
}
|
|
56
|
+
interface UseFullScreenResult<T extends HTMLElement = HTMLElement> {
|
|
57
|
+
fullScreen: boolean;
|
|
58
|
+
setFullScreen: (fullScreen: boolean) => void;
|
|
59
|
+
toggle: () => void;
|
|
60
|
+
/** The mechanism in effect while active; `null` when not full screen. */
|
|
61
|
+
activeMode: FullScreenMode | null;
|
|
62
|
+
/** Attach to the element that goes full screen. Also inside `targetProps`. */
|
|
63
|
+
ref: RefObject<T | null>;
|
|
64
|
+
/**
|
|
65
|
+
* Spread onto the surface's root. Carries the ref, the `data-fullscreen`
|
|
66
|
+
* handle, the overlay style and the Escape/Tab handler. Merge your own
|
|
67
|
+
* `style` / `onKeyDown` if the root has them.
|
|
68
|
+
*/
|
|
69
|
+
targetProps: FullScreenTargetProps<T>;
|
|
70
|
+
/** Spread onto a `<button>` to make it the toggle. */
|
|
71
|
+
toggleProps: FullScreenToggleProps;
|
|
72
|
+
/**
|
|
73
|
+
* The element to portal into while active, else `null`. Provide it through
|
|
74
|
+
* `PortalContainerContext` so menus opened inside stay visible.
|
|
75
|
+
*/
|
|
76
|
+
portalContainer: HTMLElement | null;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* A controlled full-screen state for any surface: Editor today, DeckEditor and
|
|
80
|
+
* SheetWorkbook next. Render-time output is pure (no `window`/`document`), so it
|
|
81
|
+
* server-renders; everything that touches the DOM runs in effects.
|
|
82
|
+
*/
|
|
83
|
+
declare function useFullScreen<T extends HTMLElement = HTMLElement>(options?: UseFullScreenOptions): UseFullScreenResult<T>;
|
|
84
|
+
|
|
85
|
+
export { type FullScreenMode as F, type UseFullScreenOptions as U, type FullScreenTargetProps as a, type FullScreenToggleProps as b, type UseFullScreenResult as c, useFullScreen as u };
|
package/docs/Editor.md
CHANGED
|
@@ -33,6 +33,10 @@ import { Editor } from "@particle-academy/react-fancy";
|
|
|
33
33
|
| showSource | `boolean` | - | Controlled source-view flag. When `true`, the content area shows the raw `value` (in `outputFormat`) in an editable `<textarea>` |
|
|
34
34
|
| defaultShowSource | `boolean` | `false` | Initial source-view flag when uncontrolled |
|
|
35
35
|
| onShowSourceChange | `(showSource: boolean) => void` | - | Fired when the Source toggle (or an agent) flips source view on/off |
|
|
36
|
+
| fullScreen | `boolean` | - | Controlled full-screen flag. While `true` the editor covers the viewport, the toolbar stays on top and the content fills the rest |
|
|
37
|
+
| defaultFullScreen | `boolean` | `false` | Initial full-screen flag when uncontrolled |
|
|
38
|
+
| onFullScreenChange | `(fullScreen: boolean) => void` | - | Fired by the toggle, Escape, an agent, or the user leaving the browser's full screen |
|
|
39
|
+
| fullScreenMode | `"overlay" \| "native"` | `"overlay"` | `overlay` covers the viewport in place and always works; `native` uses the browser Fullscreen API and falls back to the overlay. See [FullScreen](./FullScreen.md) |
|
|
36
40
|
| className | `string` | - | Additional CSS classes |
|
|
37
41
|
|
|
38
42
|
### Editor.Toolbar
|
|
@@ -43,6 +47,7 @@ import { Editor } from "@particle-academy/react-fancy";
|
|
|
43
47
|
| onAction | `(command: string) => void` | - | Custom action handler |
|
|
44
48
|
| children | `ReactNode` | - | Custom toolbar content |
|
|
45
49
|
| showSourceToggle | `boolean` | `true` | Append a Source toggle to the default toolbar. Ignored when `children` are supplied — custom toolbars compose their own `<Editor.SourceToggle />` |
|
|
50
|
+
| showFullScreenToggle | `boolean` | `false` | Append a full-screen toggle (Lucide `maximize-2` / `minimize-2`) at the right end of the default toolbar. Ignored when `children` are supplied — use `<Editor.FullScreenToggle />` |
|
|
46
51
|
| className | `string` | - | Additional CSS classes |
|
|
47
52
|
|
|
48
53
|
#### EditorAction
|
|
@@ -70,6 +75,25 @@ A toolbar button that reveals the raw HTML/Markdown behind the editor. It is app
|
|
|
70
75
|
| activeTitle | `string` | `"Rich text"` | Accessible title in source mode (click → rich text) |
|
|
71
76
|
| className | `string` | - | Additional CSS classes |
|
|
72
77
|
|
|
78
|
+
### Editor.FullScreenToggle
|
|
79
|
+
|
|
80
|
+
Toolbar button that takes the editor full screen and back. Carries `data-react-fancy-editor-fullscreen-toggle` and the shared `data-react-fancy-fullscreen-toggle`, `aria-pressed` and an `aria-label` of "Enter full screen" / "Exit full screen".
|
|
81
|
+
|
|
82
|
+
| Prop | Type | Default | Description |
|
|
83
|
+
|------|------|---------|-------------|
|
|
84
|
+
| enterIcon | `string` | `"maximize-2"` | Lucide name shown while not full screen |
|
|
85
|
+
| exitIcon | `string` | `"minimize-2"` | Lucide name shown while full screen |
|
|
86
|
+
| className | `string` | - | Additional CSS classes |
|
|
87
|
+
|
|
88
|
+
```tsx
|
|
89
|
+
<Editor defaultValue={doc} onFullScreenChange={(on) => console.log(on)}>
|
|
90
|
+
<Editor.Toolbar showFullScreenToggle />
|
|
91
|
+
<Editor.Content maxHeight={240} />
|
|
92
|
+
</Editor>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
While full screen the root has `data-fullscreen="true"`, `maxHeight` is ignored so the content fills the screen, and Escape leaves. The editor is not remounted, so the caret, undo history and text survive the round trip.
|
|
96
|
+
|
|
73
97
|
### Editor.Content
|
|
74
98
|
|
|
75
99
|
| Prop | Type | Default | Description |
|