@softistx/material 3.248.0 → 3.250.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 (228) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +8 -4
  3. package/dist/adopt-styles-C3MfGnxE.js +20 -0
  4. package/dist/{async-slice-C5HfFq1M.js → async-slice-DdEr7vFx.js} +1 -1
  5. package/dist/{audio-player-2kKst8lH.js → audio-player-DMYszRGT.js} +3 -3
  6. package/dist/{audio-player-viewer-D9DsYBcy.js → audio-player-viewer-z13yCjo4.js} +2 -2
  7. package/dist/{autocomplete-JuRCjl48.js → autocomplete-Bgf_AJ6U.js} +11 -11
  8. package/dist/{avatar-CvvdaBu4.js → avatar-WvTropuJ.js} +1 -1
  9. package/dist/blank-placeholder-DZIFJ0DG.js +17 -0
  10. package/dist/{breadcrumb-DacRqg91.js → breadcrumb-DYa6pVsq.js} +5 -5
  11. package/dist/{button-CpUMPIdk.js → button-RsWgka2v.js} +1 -1
  12. package/dist/{calculator-BYgFgWHL.js → calculator-DPHCuAZy.js} +11 -11
  13. package/dist/calculator-field.js +6 -6
  14. package/dist/{calculator-segment-DCHWZy6b.js → calculator-segment-Ckn9Fua9.js} +1 -1
  15. package/dist/calculator.js +1 -1
  16. package/dist/canvas-BShNj4yp.js +144 -0
  17. package/dist/capture-outputs-qcYUPW6K.js +174 -0
  18. package/dist/capture-toolbar.css +2 -0
  19. package/dist/capture-toolbar.js +858 -0
  20. package/dist/capture.js +53 -139
  21. package/dist/charts.js +3 -3
  22. package/dist/{chip-CjJPmAYO.js → chip-tyDM0lpO.js} +2 -2
  23. package/dist/{code-editor-nNcxtslA.js → code-editor-gHHXEwF-.js} +6 -6
  24. package/dist/code-editor.js +6 -6
  25. package/dist/{code-file-viewer-CcESl49v.js → code-file-viewer-CYQcskvt.js} +4 -4
  26. package/dist/{code-language-items-CW8_Si05.js → code-language-items-DDFuDf_E.js} +2 -2
  27. package/dist/{components-BdMaUeOm.js → components-DUvKQIBi.js} +16714 -20832
  28. package/dist/components.js +83 -79
  29. package/dist/{confirm-dialog-B2eonW2X.js → confirm-dialog-IHvPA3O2.js} +4 -4
  30. package/dist/{conversion-variant-DZm_xgUK.js → conversion-variant-MWTjnFnG.js} +5 -5
  31. package/dist/{currency-field-UIkYAlvP.js → currency-field-Bd9od1Ee.js} +5 -5
  32. package/dist/{detail-panel-header-CL2_tUG0.js → detail-panel-header-D2a63Sk3.js} +1 -1
  33. package/dist/{details-content-CPzj3vUr.js → details-content-CnN_ukTA.js} +6 -6
  34. package/dist/{details-header-band-D-CyB_Xx.js → details-header-band-wcgmC7qC.js} +5 -5
  35. package/dist/{details-host-BvYgFIWx.js → details-host-DKEaGH4P.js} +1 -1
  36. package/dist/{details-sheet-D4PTV_jR.js → details-sheet-CtNM4oDU.js} +2 -2
  37. package/dist/{details-shell-D4XoPRBu.js → details-shell-DZ80h6mN.js} +1 -1
  38. package/dist/{dialog-CleLsHkZ.js → dialog-DwUxG2-o.js} +1 -1
  39. package/dist/{dialog-app-bar-CLC990e6.js → dialog-app-bar-BsJ4UwKb.js} +2 -2
  40. package/dist/dist-Cb17ixQs.js +16 -0
  41. package/dist/dist-CyqFzDZ6.js +11 -0
  42. package/dist/dnd.js +1 -1
  43. package/dist/draw.js +1 -1
  44. package/dist/{drop-overlay-BTkVfscF.js → drop-overlay-B26hx0-T.js} +2 -2
  45. package/dist/{dropdown-menu-BoJC2DEH.js → dropdown-menu-D-PRbHaP.js} +1 -1
  46. package/dist/{editable-section-CTRGfbLJ.js → editable-section-DPmF1flG.js} +3 -3
  47. package/dist/editor.js +14 -14
  48. package/dist/embed-chunks/{avatar-GlGqPU7B.js → avatar-CSDtFCum.js} +1 -1
  49. package/dist/embed-chunks/{dist-BrYZYfsJ.js → dist-BVPJSDov.js} +2 -2
  50. package/dist/embed-chunks/{emoji-picker-BSYBi_C8.js → emoji-picker-CrIXB9pF.js} +23 -23
  51. package/dist/embed-chunks/{mention-list-NW43QcRq.js → mention-list-9hwOYNND.js} +3 -3
  52. package/dist/embed-chunks/{nxgt-theme-provider-B1aeqDja.js → nxgt-theme-provider-Cjl7Eb8v.js} +703 -592
  53. package/dist/embed-chunks/switch-control-BrwJRN_V.js +207 -0
  54. package/dist/embed-chunks/{tabs-root-CY-uLp1C.js → tabs-root-BvPc1aaV.js} +6 -6
  55. package/dist/embed-chunks/{use-shape-morph-NrJQMv7i.js → use-shape-morph-D1MOoQ4T.js} +110 -2
  56. package/dist/embed-chunks/{useLatest-B57qw3XH.js → useLatest-CbcU5ozz.js} +323 -323
  57. package/dist/embed.css +2 -2
  58. package/dist/embed.js +1280 -741
  59. package/dist/{emoji-picker-DZbTd3Fr.js → emoji-picker-DabgsEVQ.js} +7 -7
  60. package/dist/{empty-state-DBSJDLKL.js → empty-state-BylD7RYH.js} +1 -1
  61. package/dist/{error-state-kauz4If4.js → error-state-BTe_NzTC.js} +2 -2
  62. package/dist/fab-DUnGwNE7.js +41 -0
  63. package/dist/fab-dock-By2pLVh7.js +49 -0
  64. package/dist/{feature-popup-CcXMGFES.js → feature-popup-CW7VS2fx.js} +1 -1
  65. package/dist/{blank-placeholder-DeDn5Xor.js → field-box-BXN-uyrv.js} +1 -16
  66. package/dist/{field-group-BpV74Ttu.js → field-group-B2Ozd5Jn.js} +1 -1
  67. package/dist/{file-dialogs-CbdvmY__.js → file-dialogs-CgEXaCev.js} +7 -7
  68. package/dist/{file-manager-shell-DLaJ5Z_L.js → file-manager-shell-Tqduf5lh.js} +21 -21
  69. package/dist/{file-preview-host-RhZvGGqC.js → file-preview-host-CM4pV3ZD.js} +2367 -2384
  70. package/dist/{file-viewer-body-DM3RkXGn.js → file-viewer-body-DrWFmnp4.js} +3 -3
  71. package/dist/{file-viewer-dialog-impl-ei5EYj8k.js → file-viewer-dialog-impl-DZpuZZ7x.js} +2 -2
  72. package/dist/files-drop.js +1 -1
  73. package/dist/files-picker.js +8 -8
  74. package/dist/files.js +3 -3
  75. package/dist/{financial-variant-BNdOqzA5.js → financial-variant-ljdP0JL4.js} +5 -5
  76. package/dist/{flow-diagram-BBB6r8--.js → flow-diagram-DwUnyl0u.js} +1 -1
  77. package/dist/{gallery-CIIJHpmj.js → gallery-DfN2KE4Y.js} +11 -11
  78. package/dist/{gallery-file-viewer-DkshswFr.js → gallery-file-viewer-BfFWfLIF.js} +3 -3
  79. package/dist/{gl-markers-abqcNuYT.js → gl-markers-CBNFeWIk.js} +3 -3
  80. package/dist/{hooks-D6lOSXA5.js → hooks-DiAhgchz.js} +3 -3
  81. package/dist/hooks.js +3 -3
  82. package/dist/i18n.js +3 -3
  83. package/dist/{icon-button-GKYj7uC4.js → icon-button-D-gi4Plg.js} +1 -1
  84. package/dist/image-editor-mmhbsqs-.js +4423 -0
  85. package/dist/image-editor.css +1 -1
  86. package/dist/image-editor.js +1157 -996
  87. package/dist/image-markup-editor-D-QkZWKf.js +24 -0
  88. package/dist/input-CWf3Apid.js +18 -0
  89. package/dist/input-box-moFuoMt0.js +15 -0
  90. package/dist/{input-group-CKO68Pyi.js → input-group-Bb8sAFRF.js} +3 -2
  91. package/dist/{item-details-l_-rk3Hj.js → item-details-BWdHMfsS.js} +7 -7
  92. package/dist/keypad.js +2 -2
  93. package/dist/lib/capture/engine/canvas.d.ts +17 -0
  94. package/dist/lib/capture/engine/capture.d.ts +19 -0
  95. package/dist/lib/capture/engine/filters.d.ts +27 -0
  96. package/dist/lib/capture/engine/rect.d.ts +26 -0
  97. package/dist/lib/capture/engine/types.d.ts +66 -0
  98. package/dist/lib/capture/index.d.ts +16 -0
  99. package/dist/lib/capture/modes/capture-mode.d.ts +24 -0
  100. package/dist/lib/capture/modes/countdown.d.ts +16 -0
  101. package/dist/lib/capture/modes/full-page.d.ts +14 -0
  102. package/dist/lib/capture/modes/pick-element.d.ts +22 -0
  103. package/dist/lib/capture/modes/scroller.d.ts +13 -0
  104. package/dist/lib/capture/modes/visible.d.ts +3 -0
  105. package/dist/lib/capture-toolbar/index.d.ts +25 -0
  106. package/dist/lib/capture-toolbar/lazy-capture-outputs.d.ts +2 -0
  107. package/dist/lib/capture-toolbar/outputs-encode.d.ts +25 -0
  108. package/dist/lib/capture-toolbar/outputs.d.ts +38 -0
  109. package/dist/lib/capture-toolbar/partials/capture-editor.d.ts +11 -0
  110. package/dist/lib/capture-toolbar/partials/capture-outputs.d.ts +16 -0
  111. package/dist/lib/capture-toolbar/region-overlay.d.ts +15 -0
  112. package/dist/lib/capture-toolbar/screen-capture-toolbar.d.ts +31 -0
  113. package/dist/lib/capture-toolbar/types.d.ts +117 -0
  114. package/dist/lib/capture-toolbar/use-screen-capture.d.ts +16 -0
  115. package/dist/lib/components/ui/layout/account-frame/account-frame.d.ts +2 -2
  116. package/dist/lib/components/ui/media/attachment-list/attachment-list.d.ts +2 -2
  117. package/dist/lib/components/ui/media/image-editor/image-markup-editor.d.ts +11 -3
  118. package/dist/lib/components/ui/media/image-editor/types-edits.d.ts +7 -0
  119. package/dist/lib/components/ui/media/image-editor/types-session.d.ts +1 -1
  120. package/dist/lib/components/ui/media/image-editor/types.d.ts +8 -0
  121. package/dist/lib/embed/index.d.ts +6 -1
  122. package/dist/lib/i18n/resources/resources.d.ts +108 -0
  123. package/dist/lib/i18n/translator.d.ts +1 -1
  124. package/dist/lib/image-editor/index.d.ts +1 -1
  125. package/dist/lib.js +38 -56
  126. package/dist/{list-sheet-D22J9I-K.js → list-sheet-CejfrKJr.js} +1 -1
  127. package/dist/{loading-indicator-sDzxZg8f.js → loading-indicator-BBjOF25N.js} +1 -1
  128. package/dist/main.js +103 -98
  129. package/dist/{map-draw-DfbfT0eJ.js → map-draw-DyRy9SSV.js} +2 -2
  130. package/dist/map-draw.js +5 -5
  131. package/dist/map-static.js +1 -1
  132. package/dist/{map-view-DAx2zvV-.js → map-view-YfuYD3zS.js} +9 -9
  133. package/dist/map-zone-events.js +1 -1
  134. package/dist/map-zone-field.js +7 -7
  135. package/dist/map.js +10 -10
  136. package/dist/{marker-button-D7hEvEZD.js → marker-button-CXBaToHp.js} +1 -1
  137. package/dist/{marker-count-image-CWS3G-k8.js → marker-count-image-DHuzSev9.js} +1 -1
  138. package/dist/material.css +1 -1
  139. package/dist/{measure-manual-Bfvu8B_R.js → measure-manual-CcESmV1d.js} +3 -3
  140. package/dist/{measurement-B-OeWv7j.js → measurement-D2or6yM_.js} +1 -1
  141. package/dist/{media-player-DGXmWK7W.js → media-player-qW9RXFuO.js} +451 -567
  142. package/dist/{media-player-viewer-C3vXYcd8.js → media-player-viewer-DozPiF6T.js} +2 -2
  143. package/dist/{media-surface-BySonDjv.js → media-surface-BJsdNynm.js} +6 -6
  144. package/dist/{mention-list-BpoZHwO6.js → mention-list-z1wnlJgs.js} +2 -2
  145. package/dist/{native-select-Dg4bc7aC.js → native-select-BnDOVnER.js} +1 -1
  146. package/dist/{nxgt-theme-Ob-uFqU_.js → nxgt-theme-EYZ5aFHi.js} +6 -15
  147. package/dist/nxgt-theme-provider-BPXd3h82.js +40 -0
  148. package/dist/outputs-DF-aVqUO.js +81 -0
  149. package/dist/passkey.js +1 -1
  150. package/dist/{pdf-form-filler-DgH52W2Q.js → pdf-form-filler-Ct4eexhZ.js} +34 -34
  151. package/dist/pdf-form.js +2 -2
  152. package/dist/{pdf-reader-Bilz5foK.js → pdf-reader-khpMMEjU.js} +16 -16
  153. package/dist/{pdf-reader-viewer-DwQP2IpV.js → pdf-reader-viewer-B3_TdFOn.js} +2 -2
  154. package/dist/pdf-reader.js +2 -2
  155. package/dist/{percent-field-Ldc7K2wC.js → percent-field-Bu-PmCNR.js} +2 -2
  156. package/dist/{picker-surface-DZQbBgvA.js → picker-surface-THexE1OU.js} +3 -3
  157. package/dist/{popover-DwsaHFrK.js → popover-osl5duoA.js} +1 -1
  158. package/dist/portal-container-provider-fZFUk-ZB.js +11 -0
  159. package/dist/{pos-types-CKDG7pZA.js → pos-types-BPPae99i.js} +1 -1
  160. package/dist/{pos-variant-9nhz-ZzW.js → pos-variant-D6bDUqwV.js} +4 -4
  161. package/dist/print.js +1 -1
  162. package/dist/{programmer-variant-BzwfeMGC.js → programmer-variant-CDlFE24o.js} +2 -2
  163. package/dist/{progress-BBfp7sMi.js → progress-DjHnanxA.js} +2 -2
  164. package/dist/{progress-linear-BOJbHnzd.js → progress-linear-CTJ_U6kY.js} +1 -1
  165. package/dist/{public-I8nb8pCC.js → public-u9u2Osmx.js} +6 -6
  166. package/dist/{rendition-stage-A1nHXYrA.js → rendition-stage-BXjQpfKK.js} +2 -2
  167. package/dist/{rich-code-block-BJERY3N3.js → rich-code-block-DWSzyQRw.js} +5 -5
  168. package/dist/{scientific-variant-st2NBm1K.js → scientific-variant-DCgApH87.js} +2 -2
  169. package/dist/{scroll-area-B3XstZU2.js → scroll-area-BxKiT4Dn.js} +155 -164
  170. package/dist/{search-field-D3AOJr7s.js → search-field-Cgqa2bQf.js} +2 -2
  171. package/dist/{select-DhfzCkun.js → select-BGhRlBh4.js} +166 -179
  172. package/dist/{sheet-B8cO1T5K.js → sheet-BvNVroog.js} +1 -1
  173. package/dist/{signature-dialog-BNLMPgao.js → signature-dialog-x--_QWRB.js} +5 -5
  174. package/dist/signature.js +1 -1
  175. package/dist/{site-footer-cta-Cx7zsvkq.js → site-footer-cta-B3Kfqpep.js} +4 -4
  176. package/dist/{site-footer-link-Di8IMIw0.js → site-footer-link-SFHrO4ld.js} +1 -1
  177. package/dist/{size-slot-D1cKqb09.js → size-slot-Cb-W2Zm4.js} +1 -1
  178. package/dist/{sortable-provider-DrLnoygf.js → sortable-provider-KRScvvYx.js} +2 -2
  179. package/dist/{spinner-BpH9tE8R.js → spinner-DpB6XvJJ.js} +1 -1
  180. package/dist/switch-c_6OtXzW.js +125 -0
  181. package/dist/{tabs-root-BUnIfDah.js → tabs-root-C2n3K_Yv.js} +1 -1
  182. package/dist/{tags-form-BwqR4UVj.js → tags-form-BKB9fP03.js} +5 -5
  183. package/dist/{text-field-CFCHo07X.js → text-field-Dl7xTxZe.js} +2 -2
  184. package/dist/{textarea-B_iMDYgM.js → textarea-C3BGZELU.js} +1 -1
  185. package/dist/{textarea-field-DIOGxyUd.js → textarea-field-mqWhhbis.js} +2 -2
  186. package/dist/theme-picker.js +5 -4
  187. package/dist/{theme-toggle-CsBe64lm.js → theme-toggle-K-n5eq0T.js} +3 -3
  188. package/dist/theme-value-CD2nDrj_.js +12 -0
  189. package/dist/themes.js +15 -48
  190. package/dist/{toasts-McZnLRHP.js → toasts-DFLecXh0.js} +5 -5
  191. package/dist/{toggle-group-DKN1XLBS.js → toggle-group-DMDjNJWx.js} +1 -1
  192. package/dist/{toolbar-group-BmzGP_JO.js → toolbar-group-bttMdvg4.js} +1 -1
  193. package/dist/{toolbar-item-slot-BnqQLkVd.js → toolbar-item-slot-CBn3YjeE.js} +1 -1
  194. package/dist/{toolbar-items-C9uasXZ2.js → toolbar-items-zL5TYLf2.js} +4 -4
  195. package/dist/{toolbar-keep-focus-Vc5V-dX2.js → toolbar-keep-focus-C6bnzvpE.js} +2 -2
  196. package/dist/{tracked-layer-CjCXB_O6.js → tracked-layer-CYdLWRK-.js} +4 -4
  197. package/dist/{translate-material-C-qVvGLn.js → translate-material-DZNgWjYu.js} +1 -1
  198. package/dist/{translator-BrzI307E.js → translator-CrIFDzAz.js} +110 -2
  199. package/dist/{tree-DOAs456A.js → tree-CFXDccIe.js} +1 -1
  200. package/dist/{upload-host-ZpSSql8v.js → upload-host-DDktVohu.js} +9 -8
  201. package/dist/{use-calculator-keyboard-Ss25SRoM.js → use-calculator-keyboard-BWkYuIw5.js} +1 -1
  202. package/dist/{use-chat-composer-DopDN-zP.js → use-chat-composer-C1Qlnw2i.js} +20 -20
  203. package/dist/{use-file-meta-DyJX0JVs.js → use-file-meta-DcfQCh52.js} +1 -1
  204. package/dist/{use-heading-spy-CA2IAqMe.js → use-heading-spy-B9xEMHbZ.js} +2 -2
  205. package/dist/use-image-preview-BNq_RQm5.js +20 -0
  206. package/dist/{use-item-entries-CYbS5otl.js → use-item-entries-BKQHcWFx.js} +1 -1
  207. package/dist/{use-material-translation-eYySryw3.js → use-material-translation-ZEUtduro.js} +1 -1
  208. package/dist/{use-media-viewer-DoNdrzhN.js → use-media-viewer-DViJNx75.js} +1 -1
  209. package/dist/{use-text-preview-BQE4U9cT.js → use-text-preview-Ci97JKKo.js} +2 -2
  210. package/dist/{use-unsaved-guard-CSfDvdxd.js → use-unsaved-guard-CWlHEvjN.js} +2 -2
  211. package/dist/{viewer-CXF1dAv0.js → viewer-DDPJOxBt.js} +5 -5
  212. package/dist/{viewer-stage-class-CpyA8o-M.js → viewer-stage-class-DJ1uod4l.js} +4 -4
  213. package/dist/{viewer-states-BXyCdNhE.js → viewer-states-DkaPBkK4.js} +3 -3
  214. package/dist/{virtual-layer-rows-DHy8vAup.js → virtual-layer-rows-DKejQ_Jd.js} +1 -1
  215. package/dist/visible-B-IFZ4Nv.js +475 -0
  216. package/docs/components/media-and-files.md +1 -1
  217. package/docs/components/navigation-and-layout.md +2 -2
  218. package/docs/guides/capture.md +248 -0
  219. package/docs/guides/csp.md +1 -1
  220. package/docs/guides/embed.md +94 -2
  221. package/docs/roadmap.md +2 -1
  222. package/docs/troubleshooting.md +56 -0
  223. package/package.json +18 -1
  224. package/dist/embed-chunks/bubble-input-yXAeW84_.js +0 -29
  225. package/dist/embed-chunks/switch-control-ChcowM3u.js +0 -181
  226. package/dist/fab-dock-DqwbI-5n.js +0 -86
  227. package/dist/input-BaBE_MR_.js +0 -27
  228. /package/dist/{dist-B1qFabLJ.js → dist-B1qFabLJ2.js} +0 -0
@@ -0,0 +1,117 @@
1
+ import { FileSource, FileSourceItem } from '@softistx/material-core/files';
2
+ import { CaptureEngineName, CaptureOptions, CaptureRect } from '../capture/engine/types.js';
3
+ import { CaptureDelay } from '../capture/modes/countdown.js';
4
+ import { CaptureFormat, CaptureUploadOptions } from './outputs.js';
5
+ /** What the toolbar captures: `system` asks the browser for a window, tab or screen. */
6
+ export type ScreenCaptureMode = 'visible' | 'region' | 'element' | 'full-page' | 'system';
7
+ export declare const SCREEN_CAPTURE_MODES: readonly ScreenCaptureMode[];
8
+ export type ScreenCaptureStatus = 'idle' | 'reviewing' | 'counting' | 'selecting' | 'picking' | 'capturing' | 'editing';
9
+ export type ScreenCaptureResult = {
10
+ /** The PNG; the edited image when `edit` is on and the person pressed Done. */
11
+ blob: Blob;
12
+ /** `true` when `blob` went through the markup editor. */
13
+ edited: boolean;
14
+ canvas: HTMLCanvasElement;
15
+ /** Canvas pixels per CSS pixel. */
16
+ scale: number;
17
+ engine: CaptureEngineName | 'custom';
18
+ mode: ScreenCaptureMode;
19
+ };
20
+ /**
21
+ * The actions shown after Done (or after the capture, with `edit` off), and
22
+ * how the image is saved. Copy, Download and Share are on by default and shown
23
+ * only where the browser supports them; Upload shows when `upload` is set.
24
+ */
25
+ export type ScreenCaptureOutputs = {
26
+ /** Copy to the clipboard, as a PNG. Default `true`. */
27
+ copy?: boolean;
28
+ /** Download as a file. Default `true`. */
29
+ download?: boolean;
30
+ /** The native share sheet, with the image as a file. Default `true`. */
31
+ share?: boolean;
32
+ /** Upload through a `FileSource` that has `upload`. */
33
+ upload?: CaptureUploadOptions & {
34
+ source: FileSource;
35
+ /** Called with the stored item once the upload is done. */
36
+ onUploaded?: (item: FileSourceItem) => void;
37
+ };
38
+ /** Download, share and upload format. Default `png`; copy is always PNG. */
39
+ format?: CaptureFormat;
40
+ /** 0 to 1, for `webp` and `jpeg`. Default 0.92. */
41
+ quality?: number;
42
+ /** File name, with or without the extension. Default `capture`. */
43
+ fileName?: string;
44
+ };
45
+ /** What `review` carries: the capture to act on and how to close the step. */
46
+ export type CaptureReviewHandlers = {
47
+ result: ScreenCaptureResult;
48
+ onClose: () => void;
49
+ };
50
+ export type UseScreenCaptureOptions = {
51
+ /**
52
+ * Keeps the capture open after `onCapture`, with `status` `reviewing` and
53
+ * `review` set, until `review.onClose()` or `cancel()`: the step where the
54
+ * output actions show. `ScreenCaptureToolbar` sets it with `outputs`.
55
+ */
56
+ review?: boolean;
57
+ /** Called with the image once it is ready. */
58
+ onCapture?: (result: ScreenCaptureResult) => void;
59
+ /** Called when no image came out (a cancel is not an error). */
60
+ onError?: (error: unknown) => void;
61
+ /** Engine, masking, scale and background of the capture. */
62
+ capture?: Omit<CaptureOptions, 'engine'>;
63
+ /**
64
+ * Opens the markup editor on the capture (floating tools, crop, numbered
65
+ * step marker) before `onCapture`: Done hands over the edited image,
66
+ * Cancel returns to the page with nothing. The editor is loaded only when
67
+ * a capture opens it. Default `false` here (render `CaptureEditor` with
68
+ * `editor` when set), `true` on `ScreenCaptureToolbar`.
69
+ */
70
+ edit?: boolean;
71
+ /** Full page: the scroller to capture instead of the detected one. */
72
+ target?: HTMLElement;
73
+ /** The first mode. Default `visible`. */
74
+ defaultMode?: ScreenCaptureMode;
75
+ /** The first timer, in seconds; `0` for none (default). */
76
+ defaultDelay?: CaptureDelay | 0;
77
+ /**
78
+ * A global shortcut that starts a capture, such as `Alt+Shift+S`. None by
79
+ * default: the page keeps every key it has.
80
+ */
81
+ shortcut?: string;
82
+ };
83
+ export type RegionHandlers = {
84
+ /** Confirms the region. */
85
+ onSelect: (rect: CaptureRect) => void;
86
+ /** Cancels the selection. */
87
+ onCancel: () => void;
88
+ };
89
+ export type CaptureEditorHandlers = {
90
+ /** The capture to edit. */
91
+ blob: Blob;
92
+ /** Done: the edited image. */
93
+ onDone: (edited: Blob) => void;
94
+ /** Cancel: back to the page, no image. */
95
+ onCancel: () => void;
96
+ };
97
+ export type ScreenCaptureController = {
98
+ mode: ScreenCaptureMode;
99
+ setMode: (mode: ScreenCaptureMode) => void;
100
+ delay: CaptureDelay | 0;
101
+ setDelay: (delay: CaptureDelay | 0) => void;
102
+ status: ScreenCaptureStatus;
103
+ /** Seconds left while `status` is `counting`. */
104
+ left: number;
105
+ /** The last error, until the next capture. */
106
+ error: unknown;
107
+ /** Starts a capture of `mode` (the current one by default). */
108
+ start: (mode?: ScreenCaptureMode) => void;
109
+ /** Stops the countdown, the selection or the pick. */
110
+ cancel: () => void;
111
+ /** Set while the region overlay is to be shown. */
112
+ region: RegionHandlers | null;
113
+ /** Set while the markup editor is to be shown (`edit` on). */
114
+ editor: CaptureEditorHandlers | null;
115
+ /** Set while the output actions are to be shown (`review` on). */
116
+ review: CaptureReviewHandlers | null;
117
+ };
@@ -0,0 +1,16 @@
1
+ import { ScreenCaptureController, UseScreenCaptureOptions } from './types.js';
2
+ /**
3
+ * The state of a capture, headless: the mode, the timer, the status and
4
+ * `start()`. `ScreenCaptureToolbar` is built on it; use it alone to start a
5
+ * capture from your own button or menu, and render `RegionOverlay` when
6
+ * `region` is set (and `<CaptureEditor {...cap.editor} />` when `editor` is, with
7
+ * `edit: true`).
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * const cap = useScreenCapture({ onCapture: ({ blob }) => upload(blob) });
12
+ * <button onClick={() => cap.start('visible')}>Capture</button>
13
+ * {cap.region && <RegionOverlay {...cap.region} />}
14
+ * ```
15
+ */
16
+ export declare function useScreenCapture(options?: UseScreenCaptureOptions): ScreenCaptureController;
@@ -2,8 +2,8 @@ import { ComponentProps, ReactNode } from 'react';
2
2
  import { ShellBack } from '../app-shell/activity-layout-navigation.types.js';
3
3
  import { AppBreadcrumbRoot } from '../app-shell/app-breadcrumb.js';
4
4
  import { AuthCardNoticeTone } from '../auth-card/internal.js';
5
- /** The frame's width: 24rem, 32rem or 48rem. */
6
- export type AccountFrameWidth = 'sm' | 'md' | 'lg';
5
+ /** The frame's width: 24rem, 32rem, 48rem, 64rem or 80rem. */
6
+ export type AccountFrameWidth = 'sm' | 'md' | 'lg' | 'xl' | '2xl';
7
7
  export type AccountFrameProps = Omit<ComponentProps<'main'>, 'title'> & {
8
8
  /** The page's `h1`. */
9
9
  title: ReactNode;
@@ -4,8 +4,8 @@ import { DropRefusalReason } from '../../../../files-drop/drop-files.js';
4
4
  export type AttachmentItem = {
5
5
  /** A stable key (the list's key and the id `onRemove` gets). */
6
6
  id: string;
7
- /** The file, or just what is known of it (a file already uploaded: no thumbnail without the bytes). */
8
- file: Pick<File, 'name' | 'type' | 'size'> & Partial<Blob>;
7
+ /** The file, or just what is known of it (a file already uploaded: no thumbnail without the bytes, and no `size` when it is unknown: none is shown). */
8
+ file: Pick<File, 'name' | 'type'> & Partial<Blob>;
9
9
  /** Uploading, 0 to 100: a progress bar. Unset: none. */
10
10
  progress?: number;
11
11
  /** Why the file was refused (`DropOverlay`'s `refused[].refusal`), or your own sentence. */
@@ -1,11 +1,19 @@
1
1
  import { ImageEditorMarkupTool, ImageEditorProps } from './types.js';
2
2
  /** The marks an annotation widget needs: freehand, arrows, boxes, notes and redaction. */
3
3
  export declare const EMBED_MARKUP_TOOLS: ImageEditorMarkupTool[];
4
- export type ImageMarkupEditorProps = Omit<ImageEditorProps, 'tools' | 'defaultTool' | 'hideDownload'>;
4
+ export type ImageMarkupEditorProps = Omit<ImageEditorProps, 'tools' | 'defaultTool' | 'hideDownload'> & {
5
+ /**
6
+ * Adds the Crop panel beside Markup (the capture preset). Default `false`:
7
+ * Markup only.
8
+ */
9
+ crop?: boolean;
10
+ };
5
11
  /**
6
12
  * `ImageEditor` set up to annotate an image inside an embedded widget: only
7
- * the Markup panel, with `EMBED_MARKUP_TOOLS` (`markupTools` overrides them),
13
+ * the Markup panel (plus Crop with `crop`), with `EMBED_MARKUP_TOOLS`
14
+ * (pen, highlighter, arrow, rectangle, text, numbered step marker and redact;
15
+ * `markupTools` overrides them), `toolbar="floating"` for the annotate-mode pill,
8
16
  * no Download item, and the image decoded with `createImageBitmap` (`decode`
9
17
  * overrides it), so a page whose CSP `img-src` is `'self'` can edit a `Blob`.
10
18
  */
11
- export declare function ImageMarkupEditor({ markupTools, decode, ...props }: ImageMarkupEditorProps): import("react").JSX.Element;
19
+ export declare function ImageMarkupEditor({ markupTools, decode, crop, ...props }: ImageMarkupEditorProps): import("react").JSX.Element;
@@ -79,6 +79,13 @@ export type ImageEditorAnnotation = (AnnotationBase & {
79
79
  * safe for text or faces.
80
80
  */
81
81
  mode?: ImageEditorRedactMode;
82
+ }) | (AnnotationBase & {
83
+ kind: 'step';
84
+ /** The centre of the round pin. */
85
+ x: number;
86
+ y: number;
87
+ /** The number shown, from 1; removing a pin renumbers the next ones. */
88
+ n: number;
82
89
  }) | (AnnotationBase & {
83
90
  kind: 'text';
84
91
  x: number;
@@ -2,7 +2,7 @@ import { ImageEditorEdits, ImageEditorRedactMode } from './types-edits.js';
2
2
  /** The editor's panels, in the order the tool rail shows them. */
3
3
  export type ImageEditorTool = 'adjust' | 'filters' | 'crop' | 'markup';
4
4
  /** What a pointer does on the stage while the Markup panel is open. */
5
- export type ImageEditorMarkupTool = 'select' | 'pen' | 'highlighter' | 'eraser' | 'line' | 'arrow' | 'rect' | 'ellipse' | 'text' | 'redact';
5
+ export type ImageEditorMarkupTool = 'select' | 'pen' | 'highlighter' | 'eraser' | 'line' | 'arrow' | 'rect' | 'ellipse' | 'text' | 'step' | 'redact';
6
6
  export type ImageEditorExportFormat = 'image/png' | 'image/jpeg' | 'image/webp';
7
7
  export type ImageEditorExportOptions = {
8
8
  format: ImageEditorExportFormat;
@@ -52,5 +52,13 @@ export type ImageEditorProps = {
52
52
  saveLabel?: string;
53
53
  /** Hides the Download button of the export menu. */
54
54
  hideDownload?: boolean;
55
+ /**
56
+ * Where the controls sit. `'panel'` (default) is the side panel and the
57
+ * tool rail. `'floating'` is the annotate mode: a pill of tools floating
58
+ * over the image (the active tool widens to show its name), a top bar
59
+ * with a text Cancel and a primary Done (`saveLabel`), and the Crop
60
+ * controls in a card over the pill. Adjust and Filters are not offered.
61
+ */
62
+ toolbar?: 'panel' | 'floating';
55
63
  className?: string;
56
64
  };
@@ -4,12 +4,13 @@
4
4
  * fields (alone or wired to React Hook Form with `TextFormField`,
5
5
  * `EmailFormField` and `TextareaFormField`;
6
6
  * the config-driven `Field` and `FormField` carry every field type, the editors
7
- * included, so they stay in the main entry), a Checkbox (label and description, alone or wired with `CheckboxFormField`), an Alert, the
7
+ * included, so they stay in the main entry), a `ConfirmDialog` (the destructive confirm, openable from inside a `Dialog`), a Checkbox (label and description, alone or wired with `CheckboxFormField`), a `SwitchField` (the plain variant with its help text, alone or wired with `SwitchFormField`), an Alert, the
8
8
  * `AttachmentList` (the files of a `/files/drop` zone), the chat parts
9
9
  * (`ChatThread`, `ChatMessageList`, `ChatMessage` with its plain-text `text` mode,
10
10
  * `ChatMessageSeparator`, `ChatComposer`; the emoji picker and the mention list load lazily), the
11
11
  * `I18nProvider` (the language of the `AttachmentList` labels), the
12
12
  * `Tabs` (underline, pill, segmented), the single-choice `ChipGroupField` (filter chips with counts), `Badge`, `ListRow` (title, meta, badge, unread mark), the `EmptyState`, `Skeleton`, `SkeletonText` and `Spinner` states, the
13
+ * `NonceProvider` (the host's CSP nonce for the scroll area's `<style>`), the
13
14
  * portal container provider and the theme provider.
14
15
  *
15
16
  * Every export is imported from its own file, never from a barrel, so the
@@ -24,12 +25,15 @@ export { Button, type ButtonProps, } from '../components/ui/actions/button/butto
24
25
  export { ListRow, type ListRowProps, } from '../components/ui/collections/list-row/list-row.js';
25
26
  export { BadgeBase as Badge, type BadgeProps, type BadgeTone, } from '../components/ui/display/badge/badge-base.js';
26
27
  export { Alert, type AlertProps } from '../components/ui/feedback/alert/alert.js';
28
+ export { ConfirmDialog, type ConfirmDialogProps, type ConfirmTone, } from '../components/ui/feedback/confirm-dialog/confirm-dialog.js';
27
29
  export { EmptyState, type EmptyStateKind, type EmptyStateProps, } from '../components/ui/feedback/empty-state/empty-state.js';
28
30
  export { Skeleton } from '../components/ui/feedback/skeleton/skeleton.js';
29
31
  export { SkeletonText } from '../components/ui/feedback/skeleton/skeleton-text.js';
30
32
  export { Spinner, type SpinnerProps, } from '../components/ui/feedback/spinner/spinner.js';
31
33
  export { EmailField, type EmailFieldProps, } from '../components/ui/fields/email-field/email-field.js';
32
34
  export { EmailFormField } from '../components/ui/fields/email-field/email-form-field.js';
35
+ export { SwitchField, type SwitchFieldProps, } from '../components/ui/fields/switch/switch.js';
36
+ export { SwitchFormField } from '../components/ui/fields/switch/switch-form-field.js';
33
37
  export { TextField, type TextFieldProps, } from '../components/ui/fields/text-field/text-field.js';
34
38
  export { TextFormField } from '../components/ui/fields/text-field/text-form-field.js';
35
39
  export { TextareaField, type TextareaProps, } from '../components/ui/fields/textarea-field/textarea-field.js';
@@ -37,6 +41,7 @@ export { TextareaFormField } from '../components/ui/fields/textarea-field/textar
37
41
  export { type AttachmentItem, AttachmentList, type AttachmentListProps, } from '../components/ui/media/attachment-list/attachment-list.js';
38
42
  export { Dialog, DialogAside, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from '../components/ui/overlays/dialog/dialog.js';
39
43
  export { Input, type InputProps } from '../components/ui/primitives/input/input.js';
44
+ export { NonceProvider, type NonceProviderProps, } from '../components/ui/primitives/nonce-provider/nonce-provider.js';
40
45
  export { PortalContainerProvider, type PortalContainerProviderProps, } from '../components/ui/primitives/portal-container-provider/portal-container-provider.js';
41
46
  export { Tabs, TabsContent, TabsList, type TabsListProps, TabsTrigger, type TabsVariant, } from '../components/ui/primitives/tabs/tabs-embed.js';
42
47
  export { Textarea } from '../components/ui/primitives/textarea/textarea.js';
@@ -1347,6 +1347,8 @@ export declare const resources: {
1347
1347
  compare: string;
1348
1348
  reset: string;
1349
1349
  save: string;
1350
+ done: string;
1351
+ "floating-tools": string;
1350
1352
  "zoom-in": string;
1351
1353
  "zoom-out": string;
1352
1354
  "zoom-fit": string;
@@ -1427,6 +1429,7 @@ export declare const resources: {
1427
1429
  highlighter: string;
1428
1430
  eraser: string;
1429
1431
  text: string;
1432
+ step: string;
1430
1433
  line: string;
1431
1434
  arrow: string;
1432
1435
  rect: string;
@@ -1470,6 +1473,7 @@ export declare const resources: {
1470
1473
  shift: string;
1471
1474
  delete: string;
1472
1475
  esc: string;
1476
+ enter: string;
1473
1477
  };
1474
1478
  undo: string;
1475
1479
  redo: string;
@@ -1483,6 +1487,7 @@ export declare const resources: {
1483
1487
  "mark-nudge": string;
1484
1488
  "mark-move": string;
1485
1489
  "mark-drop": string;
1490
+ "mark-step": string;
1486
1491
  "crop-move": string;
1487
1492
  "crop-resize": string;
1488
1493
  };
@@ -4801,6 +4806,55 @@ export declare const resources: {
4801
4806
  "throttled-minutes": string;
4802
4807
  "throttled-end": string;
4803
4808
  };
4809
+ capture: {
4810
+ toolbar: string;
4811
+ mode: string;
4812
+ "mode-visible": string;
4813
+ "mode-region": string;
4814
+ "mode-element": string;
4815
+ "mode-full-page": string;
4816
+ "mode-system": string;
4817
+ capture: string;
4818
+ cancel: string;
4819
+ timer: string;
4820
+ "timer-off": string;
4821
+ "timer-seconds": string;
4822
+ counting: string;
4823
+ picking: string;
4824
+ capturing: string;
4825
+ error: string;
4826
+ editor: string;
4827
+ "editor-loading": string;
4828
+ editing: string;
4829
+ done: string;
4830
+ outputs: string;
4831
+ preview: string;
4832
+ copy: string;
4833
+ "copied-short": string;
4834
+ copied: string;
4835
+ "copy-failed": string;
4836
+ download: string;
4837
+ "saved-short": string;
4838
+ downloaded: string;
4839
+ "download-failed": string;
4840
+ share: string;
4841
+ "shared-short": string;
4842
+ shared: string;
4843
+ "share-failed": string;
4844
+ upload: string;
4845
+ "uploaded-short": string;
4846
+ uploaded: string;
4847
+ "upload-failed": string;
4848
+ close: string;
4849
+ region: {
4850
+ label: string;
4851
+ hint: string;
4852
+ adjust: string;
4853
+ size: string;
4854
+ snap: string;
4855
+ coords: string;
4856
+ };
4857
+ };
4804
4858
  };
4805
4859
  };
4806
4860
  fr: {
@@ -6145,6 +6199,8 @@ export declare const resources: {
6145
6199
  compare: string;
6146
6200
  reset: string;
6147
6201
  save: string;
6202
+ done: string;
6203
+ "floating-tools": string;
6148
6204
  "zoom-in": string;
6149
6205
  "zoom-out": string;
6150
6206
  "zoom-fit": string;
@@ -6225,6 +6281,7 @@ export declare const resources: {
6225
6281
  highlighter: string;
6226
6282
  eraser: string;
6227
6283
  text: string;
6284
+ step: string;
6228
6285
  line: string;
6229
6286
  arrow: string;
6230
6287
  rect: string;
@@ -6268,6 +6325,7 @@ export declare const resources: {
6268
6325
  shift: string;
6269
6326
  delete: string;
6270
6327
  esc: string;
6328
+ enter: string;
6271
6329
  };
6272
6330
  undo: string;
6273
6331
  redo: string;
@@ -6281,6 +6339,7 @@ export declare const resources: {
6281
6339
  "mark-nudge": string;
6282
6340
  "mark-move": string;
6283
6341
  "mark-drop": string;
6342
+ "mark-step": string;
6284
6343
  "crop-move": string;
6285
6344
  "crop-resize": string;
6286
6345
  };
@@ -9599,6 +9658,55 @@ export declare const resources: {
9599
9658
  "throttled-minutes": string;
9600
9659
  "throttled-end": string;
9601
9660
  };
9661
+ capture: {
9662
+ toolbar: string;
9663
+ mode: string;
9664
+ "mode-visible": string;
9665
+ "mode-region": string;
9666
+ "mode-element": string;
9667
+ "mode-full-page": string;
9668
+ "mode-system": string;
9669
+ capture: string;
9670
+ cancel: string;
9671
+ timer: string;
9672
+ "timer-off": string;
9673
+ "timer-seconds": string;
9674
+ counting: string;
9675
+ picking: string;
9676
+ capturing: string;
9677
+ error: string;
9678
+ editor: string;
9679
+ "editor-loading": string;
9680
+ editing: string;
9681
+ done: string;
9682
+ outputs: string;
9683
+ preview: string;
9684
+ copy: string;
9685
+ "copied-short": string;
9686
+ copied: string;
9687
+ "copy-failed": string;
9688
+ download: string;
9689
+ "saved-short": string;
9690
+ downloaded: string;
9691
+ "download-failed": string;
9692
+ share: string;
9693
+ "shared-short": string;
9694
+ shared: string;
9695
+ "share-failed": string;
9696
+ upload: string;
9697
+ "uploaded-short": string;
9698
+ uploaded: string;
9699
+ "upload-failed": string;
9700
+ close: string;
9701
+ region: {
9702
+ label: string;
9703
+ hint: string;
9704
+ adjust: string;
9705
+ size: string;
9706
+ snap: string;
9707
+ coords: string;
9708
+ };
9709
+ };
9602
9710
  };
9603
9711
  };
9604
9712
  };