@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.
Files changed (166) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/autocomplete.cjs +4 -3
  3. package/dist/autocomplete.js +3 -2
  4. package/dist/{chunk-EEMNTO7L.cjs → chunk-3DMVK74Q.cjs} +4 -4
  5. package/dist/{chunk-EEMNTO7L.cjs.map → chunk-3DMVK74Q.cjs.map} +1 -1
  6. package/dist/{chunk-M77BB2QI.cjs → chunk-3I6PE2US.cjs} +12 -12
  7. package/dist/{chunk-M77BB2QI.cjs.map → chunk-3I6PE2US.cjs.map} +1 -1
  8. package/dist/{chunk-TGBLDJ72.js → chunk-4FJWHVC7.js} +3 -3
  9. package/dist/{chunk-TGBLDJ72.js.map → chunk-4FJWHVC7.js.map} +1 -1
  10. package/dist/{chunk-EXQ33MJR.cjs → chunk-4HUD33OP.cjs} +4 -4
  11. package/dist/{chunk-EXQ33MJR.cjs.map → chunk-4HUD33OP.cjs.map} +1 -1
  12. package/dist/chunk-4JLFIPHZ.js +43 -0
  13. package/dist/chunk-4JLFIPHZ.js.map +1 -0
  14. package/dist/{chunk-XAQQX7J2.cjs → chunk-4TTBPEQX.cjs} +48 -13
  15. package/dist/chunk-4TTBPEQX.cjs.map +1 -0
  16. package/dist/{chunk-YQTKTEWS.js → chunk-5JFA7NYE.js} +3 -3
  17. package/dist/{chunk-YQTKTEWS.js.map → chunk-5JFA7NYE.js.map} +1 -1
  18. package/dist/chunk-5VMILVWD.js +3 -0
  19. package/dist/chunk-5VMILVWD.js.map +1 -0
  20. package/dist/{chunk-DN244T6G.cjs → chunk-6GBO7R25.cjs} +4 -4
  21. package/dist/{chunk-DN244T6G.cjs.map → chunk-6GBO7R25.cjs.map} +1 -1
  22. package/dist/{chunk-4FZOH7BJ.js → chunk-74MEJWMH.js} +3 -3
  23. package/dist/{chunk-4FZOH7BJ.js.map → chunk-74MEJWMH.js.map} +1 -1
  24. package/dist/{chunk-4DGXL6JC.cjs → chunk-7KTBVKNO.cjs} +4 -4
  25. package/dist/{chunk-4DGXL6JC.cjs.map → chunk-7KTBVKNO.cjs.map} +1 -1
  26. package/dist/{chunk-XQDGUXMS.js → chunk-BHUSI56C.js} +3 -3
  27. package/dist/{chunk-XQDGUXMS.js.map → chunk-BHUSI56C.js.map} +1 -1
  28. package/dist/{chunk-UIE5FP3A.js → chunk-BQFPC5FL.js} +3 -3
  29. package/dist/{chunk-UIE5FP3A.js.map → chunk-BQFPC5FL.js.map} +1 -1
  30. package/dist/{chunk-VD3C7IA4.js → chunk-CEZVKKYW.js} +48 -13
  31. package/dist/chunk-CEZVKKYW.js.map +1 -0
  32. package/dist/{chunk-UZG6LO4Z.cjs → chunk-FU6K7XXZ.cjs} +4 -4
  33. package/dist/{chunk-UZG6LO4Z.cjs.map → chunk-FU6K7XXZ.cjs.map} +1 -1
  34. package/dist/{chunk-5ZNOLPIJ.cjs → chunk-H2YRZYKK.cjs} +5 -5
  35. package/dist/{chunk-5ZNOLPIJ.cjs.map → chunk-H2YRZYKK.cjs.map} +1 -1
  36. package/dist/{chunk-7R7HENZG.cjs → chunk-HRYM76ZE.cjs} +9 -9
  37. package/dist/{chunk-7R7HENZG.cjs.map → chunk-HRYM76ZE.cjs.map} +1 -1
  38. package/dist/{chunk-ZGQEKDG6.js → chunk-IHQHTJNN.js} +5 -5
  39. package/dist/{chunk-ZGQEKDG6.js.map → chunk-IHQHTJNN.js.map} +1 -1
  40. package/dist/{chunk-6HJF55U7.js → chunk-IY6LVALS.js} +3 -3
  41. package/dist/{chunk-6HJF55U7.js.map → chunk-IY6LVALS.js.map} +1 -1
  42. package/dist/{chunk-HTNQ5XUR.cjs → chunk-J4FKJ4IR.cjs} +4 -4
  43. package/dist/{chunk-HTNQ5XUR.cjs.map → chunk-J4FKJ4IR.cjs.map} +1 -1
  44. package/dist/{chunk-43ZRUYJC.cjs → chunk-JOWAS5A5.cjs} +9 -9
  45. package/dist/{chunk-43ZRUYJC.cjs.map → chunk-JOWAS5A5.cjs.map} +1 -1
  46. package/dist/{chunk-JRRYYW3Y.cjs → chunk-K6NADZ7O.cjs} +6 -6
  47. package/dist/{chunk-JRRYYW3Y.cjs.map → chunk-K6NADZ7O.cjs.map} +1 -1
  48. package/dist/{chunk-5JA4ENMF.js → chunk-LMOPAY7Q.js} +3 -3
  49. package/dist/{chunk-5JA4ENMF.js.map → chunk-LMOPAY7Q.js.map} +1 -1
  50. package/dist/{chunk-DAJPPKPO.js → chunk-M52S3TFI.js} +3 -3
  51. package/dist/{chunk-DAJPPKPO.js.map → chunk-M52S3TFI.js.map} +1 -1
  52. package/dist/{chunk-GLGUQGAQ.cjs → chunk-M6MGQI6G.cjs} +4 -4
  53. package/dist/{chunk-GLGUQGAQ.cjs.map → chunk-M6MGQI6G.cjs.map} +1 -1
  54. package/dist/chunk-MKHYENKR.cjs +4 -0
  55. package/dist/chunk-MKHYENKR.cjs.map +1 -0
  56. package/dist/{chunk-NHGU2BWT.js → chunk-MSGKIWYX.js} +3 -3
  57. package/dist/{chunk-NHGU2BWT.js.map → chunk-MSGKIWYX.js.map} +1 -1
  58. package/dist/{chunk-KQYOIPHQ.js → chunk-N7KUGFRG.js} +4 -4
  59. package/dist/{chunk-KQYOIPHQ.js.map → chunk-N7KUGFRG.js.map} +1 -1
  60. package/dist/{chunk-XB3H2EEL.js → chunk-NDLESFUH.js} +3 -3
  61. package/dist/{chunk-XB3H2EEL.js.map → chunk-NDLESFUH.js.map} +1 -1
  62. package/dist/chunk-NE3BZV3F.js +224 -0
  63. package/dist/chunk-NE3BZV3F.js.map +1 -0
  64. package/dist/{chunk-XYOT75HH.js → chunk-NORVXHRU.js} +3 -3
  65. package/dist/{chunk-XYOT75HH.js.map → chunk-NORVXHRU.js.map} +1 -1
  66. package/dist/chunk-O4HZVZMY.cjs +226 -0
  67. package/dist/chunk-O4HZVZMY.cjs.map +1 -0
  68. package/dist/{chunk-5H6IUCOD.cjs → chunk-P6V4QWJK.cjs} +4 -4
  69. package/dist/{chunk-5H6IUCOD.cjs.map → chunk-P6V4QWJK.cjs.map} +1 -1
  70. package/dist/{chunk-LZHGXRFD.js → chunk-PKFEJWVI.js} +3 -3
  71. package/dist/{chunk-LZHGXRFD.js.map → chunk-PKFEJWVI.js.map} +1 -1
  72. package/dist/chunk-QMCMRQ2G.cjs +53 -0
  73. package/dist/chunk-QMCMRQ2G.cjs.map +1 -0
  74. package/dist/{chunk-BJKKW77L.cjs → chunk-QXMQVLRQ.cjs} +4 -4
  75. package/dist/{chunk-BJKKW77L.cjs.map → chunk-QXMQVLRQ.cjs.map} +1 -1
  76. package/dist/{chunk-WHEXTDPV.js → chunk-RBCMKPBX.js} +7 -5
  77. package/dist/chunk-RBCMKPBX.js.map +1 -0
  78. package/dist/{chunk-LVE6ERRS.cjs → chunk-RRMQGTVB.cjs} +6 -6
  79. package/dist/{chunk-LVE6ERRS.cjs.map → chunk-RRMQGTVB.cjs.map} +1 -1
  80. package/dist/{chunk-T67FLC55.js → chunk-SHF44YGG.js} +3 -3
  81. package/dist/{chunk-T67FLC55.js.map → chunk-SHF44YGG.js.map} +1 -1
  82. package/dist/{chunk-NBZC6LOB.cjs → chunk-TI7D4QDM.cjs} +6 -3
  83. package/dist/chunk-TI7D4QDM.cjs.map +1 -0
  84. package/dist/{chunk-5JK2VDWY.cjs → chunk-TYTENEJQ.cjs} +6 -6
  85. package/dist/{chunk-5JK2VDWY.cjs.map → chunk-TYTENEJQ.cjs.map} +1 -1
  86. package/dist/{chunk-WW56U3RV.js → chunk-UBEOB55O.js} +3 -3
  87. package/dist/{chunk-WW56U3RV.js.map → chunk-UBEOB55O.js.map} +1 -1
  88. package/dist/chunk-UGXBTIV5.js +51 -0
  89. package/dist/chunk-UGXBTIV5.js.map +1 -0
  90. package/dist/{chunk-M6XBF2ZS.js → chunk-UJZJBHMH.js} +3 -3
  91. package/dist/{chunk-M6XBF2ZS.js.map → chunk-UJZJBHMH.js.map} +1 -1
  92. package/dist/{chunk-T45LBTXH.js → chunk-ULG4OA2T.js} +3 -3
  93. package/dist/{chunk-T45LBTXH.js.map → chunk-ULG4OA2T.js.map} +1 -1
  94. package/dist/{chunk-SIEPD6NR.cjs → chunk-UM4JXBRZ.cjs} +4 -4
  95. package/dist/{chunk-SIEPD6NR.cjs.map → chunk-UM4JXBRZ.cjs.map} +1 -1
  96. package/dist/{chunk-FGI2EC32.cjs → chunk-Z5OTOYWI.cjs} +4 -4
  97. package/dist/{chunk-FGI2EC32.cjs.map → chunk-Z5OTOYWI.cjs.map} +1 -1
  98. package/dist/chunk-ZPBCZPMD.cjs +48 -0
  99. package/dist/chunk-ZPBCZPMD.cjs.map +1 -0
  100. package/dist/command.cjs +5 -4
  101. package/dist/command.js +3 -2
  102. package/dist/composer.cjs +7 -6
  103. package/dist/composer.js +5 -4
  104. package/dist/context-menu.cjs +5 -4
  105. package/dist/context-menu.js +3 -2
  106. package/dist/drawer.cjs +5 -4
  107. package/dist/drawer.js +3 -2
  108. package/dist/dropdown.cjs +5 -4
  109. package/dist/dropdown.js +3 -2
  110. package/dist/editor.cjs +8 -3
  111. package/dist/editor.d.cts +53 -4
  112. package/dist/editor.d.ts +53 -4
  113. package/dist/editor.js +6 -1
  114. package/dist/full-screen.cjs +39 -0
  115. package/dist/full-screen.cjs.map +1 -0
  116. package/dist/full-screen.d.cts +54 -0
  117. package/dist/full-screen.d.ts +54 -0
  118. package/dist/full-screen.js +10 -0
  119. package/dist/full-screen.js.map +1 -0
  120. package/dist/index.cjs +152 -120
  121. package/dist/index.cjs.map +1 -1
  122. package/dist/index.d.cts +4 -2
  123. package/dist/index.d.ts +4 -2
  124. package/dist/index.js +35 -31
  125. package/dist/index.js.map +1 -1
  126. package/dist/input.cjs +6 -5
  127. package/dist/input.js +5 -4
  128. package/dist/inputs.cjs +17 -16
  129. package/dist/inputs.js +9 -8
  130. package/dist/json-editor.cjs +19 -18
  131. package/dist/json-editor.js +8 -7
  132. package/dist/magic-wand.cjs +4 -3
  133. package/dist/magic-wand.js +3 -2
  134. package/dist/mobile-menu.cjs +6 -4
  135. package/dist/mobile-menu.js +4 -2
  136. package/dist/modal.cjs +5 -4
  137. package/dist/modal.js +3 -2
  138. package/dist/paste-pills.cjs +17 -16
  139. package/dist/paste-pills.js +4 -3
  140. package/dist/popover.cjs +5 -4
  141. package/dist/popover.js +3 -2
  142. package/dist/portal.cjs +7 -2
  143. package/dist/portal.d.cts +12 -1
  144. package/dist/portal.d.ts +12 -1
  145. package/dist/portal.js +2 -1
  146. package/dist/prompt-input.cjs +7 -6
  147. package/dist/prompt-input.js +6 -5
  148. package/dist/reason-tag.cjs +5 -4
  149. package/dist/reason-tag.js +4 -3
  150. package/dist/select.cjs +4 -3
  151. package/dist/select.js +3 -2
  152. package/dist/sidebar.cjs +1 -0
  153. package/dist/sidebar.js +1 -0
  154. package/dist/toast.cjs +5 -4
  155. package/dist/toast.js +3 -2
  156. package/dist/tooltip.cjs +4 -3
  157. package/dist/tooltip.js +3 -2
  158. package/dist/use-full-screen-H2j6qXDB.d.cts +85 -0
  159. package/dist/use-full-screen-H2j6qXDB.d.ts +85 -0
  160. package/docs/Editor.md +24 -0
  161. package/docs/FullScreen.md +95 -0
  162. package/package.json +11 -1
  163. package/dist/chunk-NBZC6LOB.cjs.map +0 -1
  164. package/dist/chunk-VD3C7IA4.js.map +0 -1
  165. package/dist/chunk-WHEXTDPV.js.map +0 -1
  166. package/dist/chunk-XAQQX7J2.cjs.map +0 -1
package/dist/editor.d.ts CHANGED
@@ -2,6 +2,7 @@ import * as react from 'react';
2
2
  import { ReactNode, RefObject } from 'react';
3
3
  import { R as RenderExtension } from './extensions-6PVd3-vB.js';
4
4
  import { F as FieldMode } from './inputs.types-DzGcqcPf.js';
5
+ import { F as FullScreenMode } from './use-full-screen-H2j6qXDB.js';
5
6
  import './types-DJI492iY.js';
6
7
 
7
8
  interface EditorAction {
@@ -23,6 +24,20 @@ interface EditorToolbarProps {
23
24
  * @default true
24
25
  */
25
26
  showSourceToggle?: boolean;
27
+ /**
28
+ * Append a full-screen toggle (Lucide `maximize-2` / `minimize-2`) at the
29
+ * right end of the default toolbar. Ignored when `children` are supplied —
30
+ * custom toolbars compose `<Editor.FullScreenToggle />` themselves.
31
+ * @default false
32
+ */
33
+ showFullScreenToggle?: boolean;
34
+ }
35
+ interface EditorFullScreenToggleProps {
36
+ className?: string;
37
+ /** Lucide name shown while NOT full screen. @default "maximize-2" */
38
+ enterIcon?: string;
39
+ /** Lucide name shown while full screen. @default "minimize-2" */
40
+ exitIcon?: string;
26
41
  }
27
42
  interface EditorContentProps {
28
43
  className?: string;
@@ -81,6 +96,24 @@ interface EditorProps {
81
96
  defaultShowSource?: boolean;
82
97
  /** Fired when the Source toggle (or an agent) flips source view on/off. */
83
98
  onShowSourceChange?: (showSource: boolean) => void;
99
+ /**
100
+ * Controlled full-screen flag. While `true` the editor covers the viewport,
101
+ * the toolbar stays at the top and the content fills the rest (a
102
+ * `<Editor.Content maxHeight>` cap is ignored). Escape, the toolbar toggle or
103
+ * the browser's own UI request `false` through `onFullScreenChange`.
104
+ */
105
+ fullScreen?: boolean;
106
+ /** Initial full-screen flag when uncontrolled. @default false */
107
+ defaultFullScreen?: boolean;
108
+ /** Fired when the toggle, Escape, an agent or the browser changes full screen. */
109
+ onFullScreenChange?: (fullScreen: boolean) => void;
110
+ /**
111
+ * `"overlay"` covers the viewport in place and always works, including in
112
+ * iframes and dialogs. `"native"` uses the browser Fullscreen API and falls
113
+ * back to the overlay when the browser refuses.
114
+ * @default "overlay"
115
+ */
116
+ fullScreenMode?: FullScreenMode;
84
117
  /**
85
118
  * Skip HTML sanitization of the initial value. By default the initial markdown/HTML
86
119
  * is sanitized to remove `<script>`, `<iframe>`, event handlers, and `javascript:`
@@ -91,7 +124,7 @@ interface EditorProps {
91
124
  unsafe?: boolean;
92
125
  }
93
126
 
94
- declare function EditorToolbar({ actions, onAction, children, className, showSourceToggle, }: EditorToolbarProps): react.JSX.Element;
127
+ declare function EditorToolbar({ actions, onAction, children, className, showSourceToggle, showFullScreenToggle, }: EditorToolbarProps): react.JSX.Element;
95
128
  declare namespace EditorToolbar {
96
129
  var displayName: string;
97
130
  }
@@ -111,18 +144,30 @@ declare namespace EditorSourceToggle {
111
144
  var displayName: string;
112
145
  }
113
146
 
114
- declare function EditorContent({ className, maxHeight, sourceClassName }: EditorContentProps): react.JSX.Element;
147
+ declare function EditorContent({ className, maxHeight: maxHeightProp, sourceClassName }: EditorContentProps): react.JSX.Element;
115
148
  declare namespace EditorContent {
116
149
  var displayName: string;
117
150
  }
118
151
 
119
- declare function EditorRoot({ children, className, value: controlledValue, defaultValue, onChange, outputFormat, valueFormat, lineSpacing, placeholder, mode: modeProp, extensions: instanceExtensions, unsafe, showSource: showSourceProp, defaultShowSource, onShowSourceChange, }: EditorProps): react.JSX.Element;
152
+ /**
153
+ * Toolbar button that takes the editor full screen and back. The shared
154
+ * `FullScreen.Toggle`, styled for the editor toolbar and carrying the editor's
155
+ * own handle (`data-react-fancy-editor-fullscreen-toggle`) next to the shared
156
+ * one (`data-react-fancy-fullscreen-toggle`).
157
+ */
158
+ declare function EditorFullScreenToggle({ className, enterIcon, exitIcon }: EditorFullScreenToggleProps): react.JSX.Element;
159
+ declare namespace EditorFullScreenToggle {
160
+ var displayName: string;
161
+ }
162
+
163
+ declare function EditorRoot({ children, className, value: controlledValue, defaultValue, onChange, outputFormat, valueFormat, lineSpacing, placeholder, mode: modeProp, extensions: instanceExtensions, unsafe, showSource: showSourceProp, defaultShowSource, onShowSourceChange, fullScreen: fullScreenProp, defaultFullScreen, onFullScreenChange, fullScreenMode, }: EditorProps): react.JSX.Element;
120
164
  declare const Editor: typeof EditorRoot & {
121
165
  Toolbar: typeof EditorToolbar & {
122
166
  Separator: typeof EditorToolbarSeparator;
123
167
  };
124
168
  Content: typeof EditorContent;
125
169
  SourceToggle: typeof EditorSourceToggle;
170
+ FullScreenToggle: typeof EditorFullScreenToggle;
126
171
  };
127
172
 
128
173
  interface EditorContextValue {
@@ -139,6 +184,10 @@ interface EditorContextValue {
139
184
  showSource: boolean;
140
185
  /** Toggle/set the raw-source view. */
141
186
  setShowSource: (showSource: boolean) => void;
187
+ /** Whether the editor currently covers the viewport. */
188
+ fullScreen: boolean;
189
+ /** Enter/leave full screen. Goes through `onFullScreenChange` when controlled. */
190
+ setFullScreen: (fullScreen: boolean) => void;
142
191
  /** Initial HTML content to load into the editor on mount */
143
192
  _initialHtml: string;
144
193
  /** @internal Called by EditorContent on input events */
@@ -150,4 +199,4 @@ interface EditorContextValue {
150
199
  }
151
200
  declare function useEditor(): EditorContextValue;
152
201
 
153
- export { Editor, type EditorAction, type EditorContentProps, type EditorContextValue, type EditorProps, type EditorSourceToggleProps, type EditorToolbarProps, useEditor };
202
+ export { Editor, type EditorAction, type EditorContentProps, type EditorContextValue, type EditorFullScreenToggleProps, type EditorProps, type EditorSourceToggleProps, type EditorToolbarProps, useEditor };
package/dist/editor.js CHANGED
@@ -1,15 +1,20 @@
1
- export { Editor, useEditor } from './chunk-VD3C7IA4.js';
1
+ export { Editor, useEditor } from './chunk-CEZVKKYW.js';
2
2
  import './chunk-2BXMMVQS.js';
3
3
  import './chunk-CPY7NHXM.js';
4
+ import './chunk-4JLFIPHZ.js';
5
+ import './chunk-NE3BZV3F.js';
4
6
  import './chunk-L24LUSEE.js';
7
+ import './chunk-TJ66S5K6.js';
5
8
  import './chunk-FBWUXSKH.js';
6
9
  import './chunk-5U2DZ7AV.js';
7
10
  import './chunk-3K2CEAI7.js';
8
11
  import './chunk-NRXK42LO.js';
9
12
  import './chunk-MQ6VGG62.js';
13
+ import './chunk-RBCMKPBX.js';
10
14
  import './chunk-RGANGU7X.js';
11
15
  import './chunk-JXE5XID6.js';
12
16
  import './chunk-6TBRBN7H.js';
17
+ import './chunk-J3A4Z2P7.js';
13
18
  import './chunk-EDYAXGUM.js';
14
19
  import './chunk-MMW2JGKZ.js';
15
20
  //# sourceMappingURL=editor.js.map
@@ -0,0 +1,39 @@
1
+ 'use strict';
2
+
3
+ var chunkQMCMRQ2G_cjs = require('./chunk-QMCMRQ2G.cjs');
4
+ var chunkZPBCZPMD_cjs = require('./chunk-ZPBCZPMD.cjs');
5
+ var chunkO4HZVZMY_cjs = require('./chunk-O4HZVZMY.cjs');
6
+ require('./chunk-AIA5UNQ5.cjs');
7
+ require('./chunk-TI7D4QDM.cjs');
8
+ require('./chunk-MXWR3T3N.cjs');
9
+ require('./chunk-SNHU2AI4.cjs');
10
+ require('./chunk-ZU5Q77OT.cjs');
11
+
12
+
13
+
14
+ Object.defineProperty(exports, "FullScreen", {
15
+ enumerable: true,
16
+ get: function () { return chunkQMCMRQ2G_cjs.FullScreen; }
17
+ });
18
+ Object.defineProperty(exports, "FullScreenContext", {
19
+ enumerable: true,
20
+ get: function () { return chunkZPBCZPMD_cjs.FullScreenContext; }
21
+ });
22
+ Object.defineProperty(exports, "FullScreenProvider", {
23
+ enumerable: true,
24
+ get: function () { return chunkZPBCZPMD_cjs.FullScreenProvider; }
25
+ });
26
+ Object.defineProperty(exports, "FullScreenToggle", {
27
+ enumerable: true,
28
+ get: function () { return chunkZPBCZPMD_cjs.FullScreenToggle; }
29
+ });
30
+ Object.defineProperty(exports, "useFullScreenContext", {
31
+ enumerable: true,
32
+ get: function () { return chunkZPBCZPMD_cjs.useFullScreenContext; }
33
+ });
34
+ Object.defineProperty(exports, "useFullScreen", {
35
+ enumerable: true,
36
+ get: function () { return chunkO4HZVZMY_cjs.useFullScreen; }
37
+ });
38
+ //# sourceMappingURL=full-screen.cjs.map
39
+ //# sourceMappingURL=full-screen.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"full-screen.cjs"}
@@ -0,0 +1,54 @@
1
+ import * as react from 'react';
2
+ import { ButtonHTMLAttributes, ReactNode, HTMLAttributes } from 'react';
3
+ import { U as UseFullScreenOptions, c as UseFullScreenResult } from './use-full-screen-H2j6qXDB.cjs';
4
+ export { F as FullScreenMode, a as FullScreenTargetProps, b as FullScreenToggleButtonProps, u as useFullScreen } from './use-full-screen-H2j6qXDB.cjs';
5
+
6
+ interface FullScreenToggleProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type" | "onClick" | "children"> {
7
+ /** Lucide name shown while NOT full screen. @default "maximize-2" */
8
+ enterIcon?: string;
9
+ /** Lucide name shown while full screen. @default "minimize-2" */
10
+ exitIcon?: string;
11
+ /** Replace the icon entirely. Receives the current state. */
12
+ children?: ReactNode | ((fullScreen: boolean) => ReactNode);
13
+ }
14
+ /**
15
+ * The toggle for the nearest `<FullScreen>` / `<FullScreenProvider>`. Renders
16
+ * nothing outside one, so a shared toolbar can include it unconditionally.
17
+ */
18
+ declare function FullScreenToggle({ enterIcon, exitIcon, children, className, ...rest }: FullScreenToggleProps): react.JSX.Element | null;
19
+ declare namespace FullScreenToggle {
20
+ var displayName: string;
21
+ }
22
+
23
+ interface FullScreenProps extends UseFullScreenOptions, Omit<HTMLAttributes<HTMLDivElement>, "children"> {
24
+ children?: ReactNode;
25
+ }
26
+ /**
27
+ * A box that can take over the viewport. Controlled with `fullScreen` +
28
+ * `onFullScreenChange`, or uncontrolled with `defaultFullScreen`; put a
29
+ * `<FullScreen.Toggle />` anywhere inside.
30
+ *
31
+ * Give it a background: while active it covers the page, and in `native` mode
32
+ * the browser paints black behind anything transparent.
33
+ */
34
+ declare function FullScreenRoot({ children, fullScreen, defaultFullScreen, onFullScreenChange, mode, closeOnEscape, lockScroll, zIndex, labels, style, onKeyDown, ...rest }: FullScreenProps): react.JSX.Element;
35
+ declare const FullScreen: typeof FullScreenRoot & {
36
+ Toggle: typeof FullScreenToggle;
37
+ };
38
+
39
+ declare const FullScreenContext: react.Context<UseFullScreenResult<HTMLElement> | null>;
40
+ /** The nearest full-screen surface's state, or `null` outside one. */
41
+ declare function useFullScreenContext(): UseFullScreenResult | null;
42
+ interface FullScreenProviderProps {
43
+ /** What `useFullScreen()` returned for the surface. */
44
+ value: UseFullScreenResult<HTMLElement> | UseFullScreenResult<HTMLDivElement>;
45
+ children?: ReactNode;
46
+ }
47
+ /**
48
+ * For a surface that owns its root and calls `useFullScreen()` itself (Editor,
49
+ * DeckEditor, SheetWorkbook). Makes `<FullScreen.Toggle />` work anywhere inside
50
+ * and redirects descendant `<Portal>`s into the surface while it is active.
51
+ */
52
+ declare function FullScreenProvider({ value, children }: FullScreenProviderProps): react.JSX.Element;
53
+
54
+ export { FullScreen, FullScreenContext, type FullScreenProps, FullScreenProvider, type FullScreenProviderProps, FullScreenToggle, type FullScreenToggleProps, UseFullScreenOptions, UseFullScreenResult, useFullScreenContext };
@@ -0,0 +1,54 @@
1
+ import * as react from 'react';
2
+ import { ButtonHTMLAttributes, ReactNode, HTMLAttributes } from 'react';
3
+ import { U as UseFullScreenOptions, c as UseFullScreenResult } from './use-full-screen-H2j6qXDB.js';
4
+ export { F as FullScreenMode, a as FullScreenTargetProps, b as FullScreenToggleButtonProps, u as useFullScreen } from './use-full-screen-H2j6qXDB.js';
5
+
6
+ interface FullScreenToggleProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type" | "onClick" | "children"> {
7
+ /** Lucide name shown while NOT full screen. @default "maximize-2" */
8
+ enterIcon?: string;
9
+ /** Lucide name shown while full screen. @default "minimize-2" */
10
+ exitIcon?: string;
11
+ /** Replace the icon entirely. Receives the current state. */
12
+ children?: ReactNode | ((fullScreen: boolean) => ReactNode);
13
+ }
14
+ /**
15
+ * The toggle for the nearest `<FullScreen>` / `<FullScreenProvider>`. Renders
16
+ * nothing outside one, so a shared toolbar can include it unconditionally.
17
+ */
18
+ declare function FullScreenToggle({ enterIcon, exitIcon, children, className, ...rest }: FullScreenToggleProps): react.JSX.Element | null;
19
+ declare namespace FullScreenToggle {
20
+ var displayName: string;
21
+ }
22
+
23
+ interface FullScreenProps extends UseFullScreenOptions, Omit<HTMLAttributes<HTMLDivElement>, "children"> {
24
+ children?: ReactNode;
25
+ }
26
+ /**
27
+ * A box that can take over the viewport. Controlled with `fullScreen` +
28
+ * `onFullScreenChange`, or uncontrolled with `defaultFullScreen`; put a
29
+ * `<FullScreen.Toggle />` anywhere inside.
30
+ *
31
+ * Give it a background: while active it covers the page, and in `native` mode
32
+ * the browser paints black behind anything transparent.
33
+ */
34
+ declare function FullScreenRoot({ children, fullScreen, defaultFullScreen, onFullScreenChange, mode, closeOnEscape, lockScroll, zIndex, labels, style, onKeyDown, ...rest }: FullScreenProps): react.JSX.Element;
35
+ declare const FullScreen: typeof FullScreenRoot & {
36
+ Toggle: typeof FullScreenToggle;
37
+ };
38
+
39
+ declare const FullScreenContext: react.Context<UseFullScreenResult<HTMLElement> | null>;
40
+ /** The nearest full-screen surface's state, or `null` outside one. */
41
+ declare function useFullScreenContext(): UseFullScreenResult | null;
42
+ interface FullScreenProviderProps {
43
+ /** What `useFullScreen()` returned for the surface. */
44
+ value: UseFullScreenResult<HTMLElement> | UseFullScreenResult<HTMLDivElement>;
45
+ children?: ReactNode;
46
+ }
47
+ /**
48
+ * For a surface that owns its root and calls `useFullScreen()` itself (Editor,
49
+ * DeckEditor, SheetWorkbook). Makes `<FullScreen.Toggle />` work anywhere inside
50
+ * and redirects descendant `<Portal>`s into the surface while it is active.
51
+ */
52
+ declare function FullScreenProvider({ value, children }: FullScreenProviderProps): react.JSX.Element;
53
+
54
+ export { FullScreen, FullScreenContext, type FullScreenProps, FullScreenProvider, type FullScreenProviderProps, FullScreenToggle, type FullScreenToggleProps, UseFullScreenOptions, UseFullScreenResult, useFullScreenContext };
@@ -0,0 +1,10 @@
1
+ export { FullScreen } from './chunk-UGXBTIV5.js';
2
+ export { FullScreenContext, FullScreenProvider, FullScreenToggle, useFullScreenContext } from './chunk-4JLFIPHZ.js';
3
+ export { useFullScreen } from './chunk-NE3BZV3F.js';
4
+ import './chunk-TJ66S5K6.js';
5
+ import './chunk-RBCMKPBX.js';
6
+ import './chunk-J3A4Z2P7.js';
7
+ import './chunk-EDYAXGUM.js';
8
+ import './chunk-MMW2JGKZ.js';
9
+ //# sourceMappingURL=full-screen.js.map
10
+ //# sourceMappingURL=full-screen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"full-screen.js"}