@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.
- package/CHANGELOG.md +34 -0
- package/README.md +8 -4
- package/dist/adopt-styles-C3MfGnxE.js +20 -0
- package/dist/{async-slice-C5HfFq1M.js → async-slice-DdEr7vFx.js} +1 -1
- package/dist/{audio-player-2kKst8lH.js → audio-player-DMYszRGT.js} +3 -3
- package/dist/{audio-player-viewer-D9DsYBcy.js → audio-player-viewer-z13yCjo4.js} +2 -2
- package/dist/{autocomplete-JuRCjl48.js → autocomplete-Bgf_AJ6U.js} +11 -11
- package/dist/{avatar-CvvdaBu4.js → avatar-WvTropuJ.js} +1 -1
- package/dist/blank-placeholder-DZIFJ0DG.js +17 -0
- package/dist/{breadcrumb-DacRqg91.js → breadcrumb-DYa6pVsq.js} +5 -5
- package/dist/{button-CpUMPIdk.js → button-RsWgka2v.js} +1 -1
- package/dist/{calculator-BYgFgWHL.js → calculator-DPHCuAZy.js} +11 -11
- package/dist/calculator-field.js +6 -6
- package/dist/{calculator-segment-DCHWZy6b.js → calculator-segment-Ckn9Fua9.js} +1 -1
- package/dist/calculator.js +1 -1
- package/dist/canvas-BShNj4yp.js +144 -0
- package/dist/capture-outputs-qcYUPW6K.js +174 -0
- package/dist/capture-toolbar.css +2 -0
- package/dist/capture-toolbar.js +858 -0
- package/dist/capture.js +53 -139
- package/dist/charts.js +3 -3
- package/dist/{chip-CjJPmAYO.js → chip-tyDM0lpO.js} +2 -2
- package/dist/{code-editor-nNcxtslA.js → code-editor-gHHXEwF-.js} +6 -6
- package/dist/code-editor.js +6 -6
- package/dist/{code-file-viewer-CcESl49v.js → code-file-viewer-CYQcskvt.js} +4 -4
- package/dist/{code-language-items-CW8_Si05.js → code-language-items-DDFuDf_E.js} +2 -2
- package/dist/{components-BdMaUeOm.js → components-DUvKQIBi.js} +16714 -20832
- package/dist/components.js +83 -79
- package/dist/{confirm-dialog-B2eonW2X.js → confirm-dialog-IHvPA3O2.js} +4 -4
- package/dist/{conversion-variant-DZm_xgUK.js → conversion-variant-MWTjnFnG.js} +5 -5
- package/dist/{currency-field-UIkYAlvP.js → currency-field-Bd9od1Ee.js} +5 -5
- package/dist/{detail-panel-header-CL2_tUG0.js → detail-panel-header-D2a63Sk3.js} +1 -1
- package/dist/{details-content-CPzj3vUr.js → details-content-CnN_ukTA.js} +6 -6
- package/dist/{details-header-band-D-CyB_Xx.js → details-header-band-wcgmC7qC.js} +5 -5
- package/dist/{details-host-BvYgFIWx.js → details-host-DKEaGH4P.js} +1 -1
- package/dist/{details-sheet-D4PTV_jR.js → details-sheet-CtNM4oDU.js} +2 -2
- package/dist/{details-shell-D4XoPRBu.js → details-shell-DZ80h6mN.js} +1 -1
- package/dist/{dialog-CleLsHkZ.js → dialog-DwUxG2-o.js} +1 -1
- package/dist/{dialog-app-bar-CLC990e6.js → dialog-app-bar-BsJ4UwKb.js} +2 -2
- package/dist/dist-Cb17ixQs.js +16 -0
- package/dist/dist-CyqFzDZ6.js +11 -0
- package/dist/dnd.js +1 -1
- package/dist/draw.js +1 -1
- package/dist/{drop-overlay-BTkVfscF.js → drop-overlay-B26hx0-T.js} +2 -2
- package/dist/{dropdown-menu-BoJC2DEH.js → dropdown-menu-D-PRbHaP.js} +1 -1
- package/dist/{editable-section-CTRGfbLJ.js → editable-section-DPmF1flG.js} +3 -3
- package/dist/editor.js +14 -14
- package/dist/embed-chunks/{avatar-GlGqPU7B.js → avatar-CSDtFCum.js} +1 -1
- package/dist/embed-chunks/{dist-BrYZYfsJ.js → dist-BVPJSDov.js} +2 -2
- package/dist/embed-chunks/{emoji-picker-BSYBi_C8.js → emoji-picker-CrIXB9pF.js} +23 -23
- package/dist/embed-chunks/{mention-list-NW43QcRq.js → mention-list-9hwOYNND.js} +3 -3
- package/dist/embed-chunks/{nxgt-theme-provider-B1aeqDja.js → nxgt-theme-provider-Cjl7Eb8v.js} +703 -592
- package/dist/embed-chunks/switch-control-BrwJRN_V.js +207 -0
- package/dist/embed-chunks/{tabs-root-CY-uLp1C.js → tabs-root-BvPc1aaV.js} +6 -6
- package/dist/embed-chunks/{use-shape-morph-NrJQMv7i.js → use-shape-morph-D1MOoQ4T.js} +110 -2
- package/dist/embed-chunks/{useLatest-B57qw3XH.js → useLatest-CbcU5ozz.js} +323 -323
- package/dist/embed.css +2 -2
- package/dist/embed.js +1280 -741
- package/dist/{emoji-picker-DZbTd3Fr.js → emoji-picker-DabgsEVQ.js} +7 -7
- package/dist/{empty-state-DBSJDLKL.js → empty-state-BylD7RYH.js} +1 -1
- package/dist/{error-state-kauz4If4.js → error-state-BTe_NzTC.js} +2 -2
- package/dist/fab-DUnGwNE7.js +41 -0
- package/dist/fab-dock-By2pLVh7.js +49 -0
- package/dist/{feature-popup-CcXMGFES.js → feature-popup-CW7VS2fx.js} +1 -1
- package/dist/{blank-placeholder-DeDn5Xor.js → field-box-BXN-uyrv.js} +1 -16
- package/dist/{field-group-BpV74Ttu.js → field-group-B2Ozd5Jn.js} +1 -1
- package/dist/{file-dialogs-CbdvmY__.js → file-dialogs-CgEXaCev.js} +7 -7
- package/dist/{file-manager-shell-DLaJ5Z_L.js → file-manager-shell-Tqduf5lh.js} +21 -21
- package/dist/{file-preview-host-RhZvGGqC.js → file-preview-host-CM4pV3ZD.js} +2367 -2384
- package/dist/{file-viewer-body-DM3RkXGn.js → file-viewer-body-DrWFmnp4.js} +3 -3
- package/dist/{file-viewer-dialog-impl-ei5EYj8k.js → file-viewer-dialog-impl-DZpuZZ7x.js} +2 -2
- package/dist/files-drop.js +1 -1
- package/dist/files-picker.js +8 -8
- package/dist/files.js +3 -3
- package/dist/{financial-variant-BNdOqzA5.js → financial-variant-ljdP0JL4.js} +5 -5
- package/dist/{flow-diagram-BBB6r8--.js → flow-diagram-DwUnyl0u.js} +1 -1
- package/dist/{gallery-CIIJHpmj.js → gallery-DfN2KE4Y.js} +11 -11
- package/dist/{gallery-file-viewer-DkshswFr.js → gallery-file-viewer-BfFWfLIF.js} +3 -3
- package/dist/{gl-markers-abqcNuYT.js → gl-markers-CBNFeWIk.js} +3 -3
- package/dist/{hooks-D6lOSXA5.js → hooks-DiAhgchz.js} +3 -3
- package/dist/hooks.js +3 -3
- package/dist/i18n.js +3 -3
- package/dist/{icon-button-GKYj7uC4.js → icon-button-D-gi4Plg.js} +1 -1
- package/dist/image-editor-mmhbsqs-.js +4423 -0
- package/dist/image-editor.css +1 -1
- package/dist/image-editor.js +1157 -996
- package/dist/image-markup-editor-D-QkZWKf.js +24 -0
- package/dist/input-CWf3Apid.js +18 -0
- package/dist/input-box-moFuoMt0.js +15 -0
- package/dist/{input-group-CKO68Pyi.js → input-group-Bb8sAFRF.js} +3 -2
- package/dist/{item-details-l_-rk3Hj.js → item-details-BWdHMfsS.js} +7 -7
- package/dist/keypad.js +2 -2
- package/dist/lib/capture/engine/canvas.d.ts +17 -0
- package/dist/lib/capture/engine/capture.d.ts +19 -0
- package/dist/lib/capture/engine/filters.d.ts +27 -0
- package/dist/lib/capture/engine/rect.d.ts +26 -0
- package/dist/lib/capture/engine/types.d.ts +66 -0
- package/dist/lib/capture/index.d.ts +16 -0
- package/dist/lib/capture/modes/capture-mode.d.ts +24 -0
- package/dist/lib/capture/modes/countdown.d.ts +16 -0
- package/dist/lib/capture/modes/full-page.d.ts +14 -0
- package/dist/lib/capture/modes/pick-element.d.ts +22 -0
- package/dist/lib/capture/modes/scroller.d.ts +13 -0
- package/dist/lib/capture/modes/visible.d.ts +3 -0
- package/dist/lib/capture-toolbar/index.d.ts +25 -0
- package/dist/lib/capture-toolbar/lazy-capture-outputs.d.ts +2 -0
- package/dist/lib/capture-toolbar/outputs-encode.d.ts +25 -0
- package/dist/lib/capture-toolbar/outputs.d.ts +38 -0
- package/dist/lib/capture-toolbar/partials/capture-editor.d.ts +11 -0
- package/dist/lib/capture-toolbar/partials/capture-outputs.d.ts +16 -0
- package/dist/lib/capture-toolbar/region-overlay.d.ts +15 -0
- package/dist/lib/capture-toolbar/screen-capture-toolbar.d.ts +31 -0
- package/dist/lib/capture-toolbar/types.d.ts +117 -0
- package/dist/lib/capture-toolbar/use-screen-capture.d.ts +16 -0
- package/dist/lib/components/ui/layout/account-frame/account-frame.d.ts +2 -2
- package/dist/lib/components/ui/media/attachment-list/attachment-list.d.ts +2 -2
- package/dist/lib/components/ui/media/image-editor/image-markup-editor.d.ts +11 -3
- package/dist/lib/components/ui/media/image-editor/types-edits.d.ts +7 -0
- package/dist/lib/components/ui/media/image-editor/types-session.d.ts +1 -1
- package/dist/lib/components/ui/media/image-editor/types.d.ts +8 -0
- package/dist/lib/embed/index.d.ts +6 -1
- package/dist/lib/i18n/resources/resources.d.ts +108 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib/image-editor/index.d.ts +1 -1
- package/dist/lib.js +38 -56
- package/dist/{list-sheet-D22J9I-K.js → list-sheet-CejfrKJr.js} +1 -1
- package/dist/{loading-indicator-sDzxZg8f.js → loading-indicator-BBjOF25N.js} +1 -1
- package/dist/main.js +103 -98
- package/dist/{map-draw-DfbfT0eJ.js → map-draw-DyRy9SSV.js} +2 -2
- package/dist/map-draw.js +5 -5
- package/dist/map-static.js +1 -1
- package/dist/{map-view-DAx2zvV-.js → map-view-YfuYD3zS.js} +9 -9
- package/dist/map-zone-events.js +1 -1
- package/dist/map-zone-field.js +7 -7
- package/dist/map.js +10 -10
- package/dist/{marker-button-D7hEvEZD.js → marker-button-CXBaToHp.js} +1 -1
- package/dist/{marker-count-image-CWS3G-k8.js → marker-count-image-DHuzSev9.js} +1 -1
- package/dist/material.css +1 -1
- package/dist/{measure-manual-Bfvu8B_R.js → measure-manual-CcESmV1d.js} +3 -3
- package/dist/{measurement-B-OeWv7j.js → measurement-D2or6yM_.js} +1 -1
- package/dist/{media-player-DGXmWK7W.js → media-player-qW9RXFuO.js} +451 -567
- package/dist/{media-player-viewer-C3vXYcd8.js → media-player-viewer-DozPiF6T.js} +2 -2
- package/dist/{media-surface-BySonDjv.js → media-surface-BJsdNynm.js} +6 -6
- package/dist/{mention-list-BpoZHwO6.js → mention-list-z1wnlJgs.js} +2 -2
- package/dist/{native-select-Dg4bc7aC.js → native-select-BnDOVnER.js} +1 -1
- package/dist/{nxgt-theme-Ob-uFqU_.js → nxgt-theme-EYZ5aFHi.js} +6 -15
- package/dist/nxgt-theme-provider-BPXd3h82.js +40 -0
- package/dist/outputs-DF-aVqUO.js +81 -0
- package/dist/passkey.js +1 -1
- package/dist/{pdf-form-filler-DgH52W2Q.js → pdf-form-filler-Ct4eexhZ.js} +34 -34
- package/dist/pdf-form.js +2 -2
- package/dist/{pdf-reader-Bilz5foK.js → pdf-reader-khpMMEjU.js} +16 -16
- package/dist/{pdf-reader-viewer-DwQP2IpV.js → pdf-reader-viewer-B3_TdFOn.js} +2 -2
- package/dist/pdf-reader.js +2 -2
- package/dist/{percent-field-Ldc7K2wC.js → percent-field-Bu-PmCNR.js} +2 -2
- package/dist/{picker-surface-DZQbBgvA.js → picker-surface-THexE1OU.js} +3 -3
- package/dist/{popover-DwsaHFrK.js → popover-osl5duoA.js} +1 -1
- package/dist/portal-container-provider-fZFUk-ZB.js +11 -0
- package/dist/{pos-types-CKDG7pZA.js → pos-types-BPPae99i.js} +1 -1
- package/dist/{pos-variant-9nhz-ZzW.js → pos-variant-D6bDUqwV.js} +4 -4
- package/dist/print.js +1 -1
- package/dist/{programmer-variant-BzwfeMGC.js → programmer-variant-CDlFE24o.js} +2 -2
- package/dist/{progress-BBfp7sMi.js → progress-DjHnanxA.js} +2 -2
- package/dist/{progress-linear-BOJbHnzd.js → progress-linear-CTJ_U6kY.js} +1 -1
- package/dist/{public-I8nb8pCC.js → public-u9u2Osmx.js} +6 -6
- package/dist/{rendition-stage-A1nHXYrA.js → rendition-stage-BXjQpfKK.js} +2 -2
- package/dist/{rich-code-block-BJERY3N3.js → rich-code-block-DWSzyQRw.js} +5 -5
- package/dist/{scientific-variant-st2NBm1K.js → scientific-variant-DCgApH87.js} +2 -2
- package/dist/{scroll-area-B3XstZU2.js → scroll-area-BxKiT4Dn.js} +155 -164
- package/dist/{search-field-D3AOJr7s.js → search-field-Cgqa2bQf.js} +2 -2
- package/dist/{select-DhfzCkun.js → select-BGhRlBh4.js} +166 -179
- package/dist/{sheet-B8cO1T5K.js → sheet-BvNVroog.js} +1 -1
- package/dist/{signature-dialog-BNLMPgao.js → signature-dialog-x--_QWRB.js} +5 -5
- package/dist/signature.js +1 -1
- package/dist/{site-footer-cta-Cx7zsvkq.js → site-footer-cta-B3Kfqpep.js} +4 -4
- package/dist/{site-footer-link-Di8IMIw0.js → site-footer-link-SFHrO4ld.js} +1 -1
- package/dist/{size-slot-D1cKqb09.js → size-slot-Cb-W2Zm4.js} +1 -1
- package/dist/{sortable-provider-DrLnoygf.js → sortable-provider-KRScvvYx.js} +2 -2
- package/dist/{spinner-BpH9tE8R.js → spinner-DpB6XvJJ.js} +1 -1
- package/dist/switch-c_6OtXzW.js +125 -0
- package/dist/{tabs-root-BUnIfDah.js → tabs-root-C2n3K_Yv.js} +1 -1
- package/dist/{tags-form-BwqR4UVj.js → tags-form-BKB9fP03.js} +5 -5
- package/dist/{text-field-CFCHo07X.js → text-field-Dl7xTxZe.js} +2 -2
- package/dist/{textarea-B_iMDYgM.js → textarea-C3BGZELU.js} +1 -1
- package/dist/{textarea-field-DIOGxyUd.js → textarea-field-mqWhhbis.js} +2 -2
- package/dist/theme-picker.js +5 -4
- package/dist/{theme-toggle-CsBe64lm.js → theme-toggle-K-n5eq0T.js} +3 -3
- package/dist/theme-value-CD2nDrj_.js +12 -0
- package/dist/themes.js +15 -48
- package/dist/{toasts-McZnLRHP.js → toasts-DFLecXh0.js} +5 -5
- package/dist/{toggle-group-DKN1XLBS.js → toggle-group-DMDjNJWx.js} +1 -1
- package/dist/{toolbar-group-BmzGP_JO.js → toolbar-group-bttMdvg4.js} +1 -1
- package/dist/{toolbar-item-slot-BnqQLkVd.js → toolbar-item-slot-CBn3YjeE.js} +1 -1
- package/dist/{toolbar-items-C9uasXZ2.js → toolbar-items-zL5TYLf2.js} +4 -4
- package/dist/{toolbar-keep-focus-Vc5V-dX2.js → toolbar-keep-focus-C6bnzvpE.js} +2 -2
- package/dist/{tracked-layer-CjCXB_O6.js → tracked-layer-CYdLWRK-.js} +4 -4
- package/dist/{translate-material-C-qVvGLn.js → translate-material-DZNgWjYu.js} +1 -1
- package/dist/{translator-BrzI307E.js → translator-CrIFDzAz.js} +110 -2
- package/dist/{tree-DOAs456A.js → tree-CFXDccIe.js} +1 -1
- package/dist/{upload-host-ZpSSql8v.js → upload-host-DDktVohu.js} +9 -8
- package/dist/{use-calculator-keyboard-Ss25SRoM.js → use-calculator-keyboard-BWkYuIw5.js} +1 -1
- package/dist/{use-chat-composer-DopDN-zP.js → use-chat-composer-C1Qlnw2i.js} +20 -20
- package/dist/{use-file-meta-DyJX0JVs.js → use-file-meta-DcfQCh52.js} +1 -1
- package/dist/{use-heading-spy-CA2IAqMe.js → use-heading-spy-B9xEMHbZ.js} +2 -2
- package/dist/use-image-preview-BNq_RQm5.js +20 -0
- package/dist/{use-item-entries-CYbS5otl.js → use-item-entries-BKQHcWFx.js} +1 -1
- package/dist/{use-material-translation-eYySryw3.js → use-material-translation-ZEUtduro.js} +1 -1
- package/dist/{use-media-viewer-DoNdrzhN.js → use-media-viewer-DViJNx75.js} +1 -1
- package/dist/{use-text-preview-BQE4U9cT.js → use-text-preview-Ci97JKKo.js} +2 -2
- package/dist/{use-unsaved-guard-CSfDvdxd.js → use-unsaved-guard-CWlHEvjN.js} +2 -2
- package/dist/{viewer-CXF1dAv0.js → viewer-DDPJOxBt.js} +5 -5
- package/dist/{viewer-stage-class-CpyA8o-M.js → viewer-stage-class-DJ1uod4l.js} +4 -4
- package/dist/{viewer-states-BXyCdNhE.js → viewer-states-DkaPBkK4.js} +3 -3
- package/dist/{virtual-layer-rows-DHy8vAup.js → virtual-layer-rows-DKejQ_Jd.js} +1 -1
- package/dist/visible-B-IFZ4Nv.js +475 -0
- package/docs/components/media-and-files.md +1 -1
- package/docs/components/navigation-and-layout.md +2 -2
- package/docs/guides/capture.md +248 -0
- package/docs/guides/csp.md +1 -1
- package/docs/guides/embed.md +94 -2
- package/docs/roadmap.md +2 -1
- package/docs/troubleshooting.md +56 -0
- package/package.json +18 -1
- package/dist/embed-chunks/bubble-input-yXAeW84_.js +0 -29
- package/dist/embed-chunks/switch-control-ChcowM3u.js +0 -181
- package/dist/fab-dock-DqwbI-5n.js +0 -86
- package/dist/input-BaBE_MR_.js +0 -27
- /package/dist/{dist-B1qFabLJ.js → dist-B1qFabLJ2.js} +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { t as e } from "./image-editor-mmhbsqs-.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
//#region lib/components/ui/media/image-editor/image-markup-editor.tsx
|
|
4
|
+
var n = [
|
|
5
|
+
"pen",
|
|
6
|
+
"highlighter",
|
|
7
|
+
"arrow",
|
|
8
|
+
"rect",
|
|
9
|
+
"text",
|
|
10
|
+
"step",
|
|
11
|
+
"redact"
|
|
12
|
+
];
|
|
13
|
+
function r({ markupTools: r = n, decode: i = "bitmap", crop: a = !1, ...o }) {
|
|
14
|
+
return /* @__PURE__ */ t(e, {
|
|
15
|
+
...o,
|
|
16
|
+
tools: a ? ["markup", "crop"] : ["markup"],
|
|
17
|
+
defaultTool: "markup",
|
|
18
|
+
markupTools: r,
|
|
19
|
+
decode: i,
|
|
20
|
+
hideDownload: !0
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { r as ImageMarkupEditor };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
|
+
import { t } from "./blank-placeholder-DZIFJ0DG.js";
|
|
3
|
+
import { t as n } from "./input-box-moFuoMt0.js";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
//#region lib/components/ui/primitives/input/input.tsx
|
|
6
|
+
var i = n;
|
|
7
|
+
function a({ className: n, type: a = "text", ...o }) {
|
|
8
|
+
return /* @__PURE__ */ r("input", {
|
|
9
|
+
type: a,
|
|
10
|
+
"data-slot": "input",
|
|
11
|
+
className: e(i, n),
|
|
12
|
+
"data-pw": o.name ?? "input",
|
|
13
|
+
...o,
|
|
14
|
+
placeholder: t(o.placeholder, a)
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { i as n, a as t };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { t as e } from "./field-box-BXN-uyrv.js";
|
|
2
|
+
//#region lib/components/ui/primitives/input/input-box.ts
|
|
3
|
+
var t = "selection:bg-primary selection:text-primary-foreground", n = [
|
|
4
|
+
"inline-flex gap-2 items-center h-11 max-h-full w-full min-w-0",
|
|
5
|
+
"px-2 py-1 text-base md:text-sm outline-none",
|
|
6
|
+
"placeholder:text-muted-foreground",
|
|
7
|
+
"file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-muted-foreground",
|
|
8
|
+
"disabled:pointer-events-none"
|
|
9
|
+
], r = [
|
|
10
|
+
...n,
|
|
11
|
+
t,
|
|
12
|
+
e
|
|
13
|
+
], i = [...n, e];
|
|
14
|
+
//#endregion
|
|
15
|
+
export { i as n, r as t };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
2
|
import { t } from "./dist-BpL4VNX6.js";
|
|
3
|
-
import { t as n } from "./icon-button-
|
|
4
|
-
import {
|
|
3
|
+
import { t as n } from "./icon-button-D-gi4Plg.js";
|
|
4
|
+
import { t as r } from "./field-box-BXN-uyrv.js";
|
|
5
|
+
import { t as i } from "./blank-placeholder-DZIFJ0DG.js";
|
|
5
6
|
import { jsx as a } from "react/jsx-runtime";
|
|
6
7
|
//#region lib/components/ui/primitives/input-group/input-group.tsx
|
|
7
8
|
function o({ className: t, ...n }) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { t as e } from "./button-
|
|
2
|
-
import { t } from "./use-material-translation-
|
|
1
|
+
import { t as e } from "./button-RsWgka2v.js";
|
|
2
|
+
import { t } from "./use-material-translation-ZEUtduro.js";
|
|
3
3
|
import { t as n } from "./live-status-BGPaN8r8.js";
|
|
4
|
-
import { t as r } from "./text-field-
|
|
5
|
-
import { t as i } from "./textarea-field-
|
|
4
|
+
import { t as r } from "./text-field-Dl7xTxZe.js";
|
|
5
|
+
import { t as i } from "./textarea-field-mqWhhbis.js";
|
|
6
6
|
import { a, t as o } from "./description-list-C6qh1YS4.js";
|
|
7
7
|
import { n as s } from "./file-manager-context-Cj4-ZGI5.js";
|
|
8
|
-
import { t as c } from "./use-file-meta-
|
|
9
|
-
import { n as l } from "./details-shell-
|
|
8
|
+
import { t as c } from "./use-file-meta-DcfQCh52.js";
|
|
9
|
+
import { n as l } from "./details-shell-DZ80h6mN.js";
|
|
10
10
|
import { Suspense as u, lazy as d, useEffect as f, useId as p, useRef as m, useState as h } from "react";
|
|
11
11
|
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
12
12
|
import { createPortal as y } from "react-dom";
|
|
@@ -178,7 +178,7 @@ function E({ fields: e, stored: n }) {
|
|
|
178
178
|
}
|
|
179
179
|
//#endregion
|
|
180
180
|
//#region lib/files/file-manager/partials/item-details.tsx
|
|
181
|
-
var D = d(() => import("./tags-form-
|
|
181
|
+
var D = d(() => import("./tags-form-BKB9fP03.js").then((e) => ({ default: e.TagsForm })));
|
|
182
182
|
function O({ item: e, hideName: n, hideKind: r }) {
|
|
183
183
|
let { t: i } = t(), l = s(), d = c(), f = l.details?.(e), p = e.type === "file" ? l.metadataFields ?? [] : [];
|
|
184
184
|
return /* @__PURE__ */ v("div", {
|
package/dist/keypad.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
|
-
import { t } from "./use-material-translation-
|
|
2
|
+
import { t } from "./use-material-translation-ZEUtduro.js";
|
|
3
3
|
import { t as n } from "./live-status-BGPaN8r8.js";
|
|
4
|
-
import { n as r, t as i } from "./use-calculator-keyboard-
|
|
4
|
+
import { n as r, t as i } from "./use-calculator-keyboard-BWkYuIw5.js";
|
|
5
5
|
import { i as a, o, r as s, t as c } from "./key-layout-D2goCDkD.js";
|
|
6
6
|
import { useCallback as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
7
7
|
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MaskRect } from '../mask-text.js';
|
|
2
|
+
import { CaptureRect } from './types.js';
|
|
3
|
+
/** Image output helpers shared by the engines. No import beyond the capture folder. */
|
|
4
|
+
export declare function newCanvas(width: number, height: number): HTMLCanvasElement;
|
|
5
|
+
export declare function context2d(canvas: HTMLCanvasElement): CanvasRenderingContext2D;
|
|
6
|
+
/**
|
|
7
|
+
* A new canvas holding `rect` of `source`. `rect` is in the CSS pixels the
|
|
8
|
+
* source was drawn from (its origin at the source's top-left); `scaleX` and
|
|
9
|
+
* `scaleY` map them to canvas pixels.
|
|
10
|
+
*/
|
|
11
|
+
export declare function cropCanvas(source: HTMLCanvasElement, rect: CaptureRect, scaleX: number, scaleY?: number): HTMLCanvasElement;
|
|
12
|
+
/** Burns opaque boxes (`rects` in the canvas' CSS pixels) over `canvas`. */
|
|
13
|
+
export declare function burnBoxes(canvas: HTMLCanvasElement, rects: readonly MaskRect[], scaleX: number, scaleY?: number): void;
|
|
14
|
+
/** Encodes a canvas. Default `image/png`; `quality` (0 to 1) is for jpeg and webp. */
|
|
15
|
+
export declare function canvasToBlob(canvas: HTMLCanvasElement, type?: 'image/png' | 'image/jpeg' | 'image/webp', quality?: number): Promise<Blob>;
|
|
16
|
+
/** The canvas as an `ImageBitmap` (a copy: the canvas stays usable). */
|
|
17
|
+
export declare function canvasToBitmap(canvas: HTMLCanvasElement): Promise<ImageBitmap>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CaptureEngine, CaptureOptions, CaptureRect, CaptureResult } from './types.js';
|
|
2
|
+
/** The built-in engine called `name`. */
|
|
3
|
+
export declare function getCaptureEngine(name: 'dom' | 'system'): CaptureEngine;
|
|
4
|
+
/**
|
|
5
|
+
* Renders `target` (default `document.documentElement`) to a canvas. DOM
|
|
6
|
+
* engine by default: no permission prompt, shadow roots, web fonts and
|
|
7
|
+
* pseudo-elements, cross-origin media as neutral boxes, elements marked
|
|
8
|
+
* `data-capture-exclude` left out. With the system engine, a `target` crops
|
|
9
|
+
* the frame to its bounding box (current tab only, like `rect`).
|
|
10
|
+
* Call `canvasToBlob(result.canvas)` for a file.
|
|
11
|
+
*/
|
|
12
|
+
export declare function captureElement(target?: Element, options?: CaptureOptions): Promise<CaptureResult>;
|
|
13
|
+
/**
|
|
14
|
+
* Captures `rect` (viewport CSS pixels, as `getBoundingClientRect` returns
|
|
15
|
+
* them) of `target` (default the page). The result is the cropped canvas.
|
|
16
|
+
*/
|
|
17
|
+
export declare function captureRegion(rect: CaptureRect, options?: CaptureOptions & {
|
|
18
|
+
target?: Element;
|
|
19
|
+
}): Promise<CaptureResult>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { MaskRect } from '../mask-text.js';
|
|
2
|
+
import { CaptureMaskOptions } from './types.js';
|
|
3
|
+
/** An element carrying it is left out of every capture (the tool's own UI). */
|
|
4
|
+
export declare const CAPTURE_EXCLUDE_ATTRIBUTE = "data-capture-exclude";
|
|
5
|
+
/** An element carrying it is painted as an opaque box when masking is on. */
|
|
6
|
+
export declare const CAPTURE_MASK_ATTRIBUTE = "data-capture-mask";
|
|
7
|
+
export declare const EXCLUDE_SELECTOR = "[data-capture-exclude]";
|
|
8
|
+
export declare const DEFAULT_MASK_SELECTOR = "[data-capture-mask]";
|
|
9
|
+
export type ResolvedMask = {
|
|
10
|
+
selector: string;
|
|
11
|
+
text: Element | null;
|
|
12
|
+
unmaskSelector: string;
|
|
13
|
+
};
|
|
14
|
+
/** `mask` option to settings; `null` when masking is off (the default). */
|
|
15
|
+
export declare function resolveMask(mask: boolean | CaptureMaskOptions | undefined, fallbackRoot: Element): ResolvedMask | null;
|
|
16
|
+
/** Every element under `root` matching `selector`, open shadow roots included. */
|
|
17
|
+
export declare function queryDeep(root: Element | Document, selector: string): Element[];
|
|
18
|
+
/** The boxes to burn, in viewport CSS pixels. */
|
|
19
|
+
export declare function collectMasks(mask: ResolvedMask, root: Element): MaskRect[];
|
|
20
|
+
/**
|
|
21
|
+
* Hides the excluded elements (`visibility: hidden`: the layout does not
|
|
22
|
+
* move) and returns the function that restores them. For the system engine,
|
|
23
|
+
* which cannot skip an element in a frame it did not draw.
|
|
24
|
+
*/
|
|
25
|
+
export declare function hideExcluded(root?: Element | Document): () => void;
|
|
26
|
+
/** Whether `el` is, or sits inside, an excluded element. */
|
|
27
|
+
export declare function isExcluded(el: Element): boolean;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { CaptureRect } from './types.js';
|
|
2
|
+
/** Pure rectangle maths of the engines: no DOM, no import but a type. */
|
|
3
|
+
export declare function isEmptyRect(r: CaptureRect): boolean;
|
|
4
|
+
/** A rect from two corners in any order (a drag in any direction). */
|
|
5
|
+
export declare function rectFromPoints(a: {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
}, b: {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
}): CaptureRect;
|
|
12
|
+
/** The overlap of two rects, or `null` when they do not overlap. */
|
|
13
|
+
export declare function intersectRects(a: CaptureRect, b: CaptureRect): CaptureRect | null;
|
|
14
|
+
/** The same rect moved so that `origin` becomes (0, 0). */
|
|
15
|
+
export declare function translateRect(r: CaptureRect, origin: {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
}): CaptureRect;
|
|
19
|
+
/**
|
|
20
|
+
* The rect in canvas pixels: snapped outward to whole pixels so no edge is
|
|
21
|
+
* lost, and clamped to the canvas. `null` when nothing is left.
|
|
22
|
+
*/
|
|
23
|
+
export declare function toPixelRect(r: CaptureRect, scaleX: number, scaleY: number, canvas: {
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
}): CaptureRect | null;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { MaskRect } from '../mask-text.js';
|
|
2
|
+
/** A rectangle in CSS pixels of the viewport (what `getBoundingClientRect` returns). */
|
|
3
|
+
export type CaptureRect = {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
w: number;
|
|
7
|
+
h: number;
|
|
8
|
+
};
|
|
9
|
+
export type CaptureEngineName = 'dom' | 'system';
|
|
10
|
+
export type CaptureEngineErrorCode = 'unsupported' | 'denied' | 'peer-missing' | 'invalid-target' | 'cancelled' | 'failed';
|
|
11
|
+
/**
|
|
12
|
+
* `unsupported`: the engine cannot run here (no `getDisplayMedia`, a server).
|
|
13
|
+
* `denied`: the person refused or closed the picker. `peer-missing`: the
|
|
14
|
+
* optional `@zumer/snapdom` peer is not installed. `invalid-target`: the
|
|
15
|
+
* element is detached or the region is empty. `cancelled`: the person
|
|
16
|
+
* pressed Esc (or an `AbortSignal` fired) during a pick or a countdown. `failed`: no image came out.
|
|
17
|
+
*/
|
|
18
|
+
export declare class CaptureEngineError extends Error {
|
|
19
|
+
readonly code: CaptureEngineErrorCode;
|
|
20
|
+
constructor(code: CaptureEngineErrorCode, message: string, cause?: unknown);
|
|
21
|
+
}
|
|
22
|
+
export type CaptureMaskOptions = {
|
|
23
|
+
/** Elements matching it are painted as opaque boxes. Default `[data-capture-mask]`. */
|
|
24
|
+
selector?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Also box the text under this element (`true`: the captured target), as
|
|
27
|
+
* `captureScreen`'s `maskText` does.
|
|
28
|
+
*/
|
|
29
|
+
text?: boolean | Element;
|
|
30
|
+
/** What `text` leaves readable. Default `[data-capture-unmask]`. */
|
|
31
|
+
unmaskSelector?: string;
|
|
32
|
+
};
|
|
33
|
+
export type CaptureOptions = {
|
|
34
|
+
/** `'dom'` (default), `'system'` or an engine of your own. */
|
|
35
|
+
engine?: CaptureEngineName | CaptureEngine;
|
|
36
|
+
/** Opt-in masking: `true` for the defaults. Off by default. */
|
|
37
|
+
mask?: boolean | CaptureMaskOptions;
|
|
38
|
+
/**
|
|
39
|
+
* Pixels per CSS pixel. Default `devicePixelRatio` (DOM engine); the
|
|
40
|
+
* system engine keeps the frame's own resolution.
|
|
41
|
+
*/
|
|
42
|
+
scale?: number;
|
|
43
|
+
/** Fill behind transparent areas (DOM engine). Default none. */
|
|
44
|
+
backgroundColor?: string;
|
|
45
|
+
};
|
|
46
|
+
/** What an engine receives: the options are already merged with the defaults. */
|
|
47
|
+
export type CaptureRequest = {
|
|
48
|
+
/** The element to render. Default `document.documentElement`. */
|
|
49
|
+
target?: Element;
|
|
50
|
+
/** Crop, in viewport CSS pixels. Default: the whole target. */
|
|
51
|
+
rect?: CaptureRect;
|
|
52
|
+
options: CaptureOptions;
|
|
53
|
+
};
|
|
54
|
+
export type CaptureResult = {
|
|
55
|
+
canvas: HTMLCanvasElement;
|
|
56
|
+
/** Canvas pixels per CSS pixel. */
|
|
57
|
+
scale: number;
|
|
58
|
+
engine: CaptureEngineName | 'custom';
|
|
59
|
+
};
|
|
60
|
+
export interface CaptureEngine {
|
|
61
|
+
readonly name: CaptureEngineName | 'custom';
|
|
62
|
+
/** Cheap and synchronous: loads nothing. */
|
|
63
|
+
isAvailable(): boolean;
|
|
64
|
+
capture(request: CaptureRequest): Promise<CaptureResult>;
|
|
65
|
+
}
|
|
66
|
+
export type { MaskRect };
|
|
@@ -8,7 +8,23 @@
|
|
|
8
8
|
* library, and the DOM is touched only when a function is called, so importing
|
|
9
9
|
* it on a server is safe and a widget embedded in a third-party page pays for
|
|
10
10
|
* nothing else.
|
|
11
|
+
*
|
|
12
|
+
* The engine layer (`captureElement`, `captureRegion`, `getCaptureEngine`)
|
|
13
|
+
* renders an element or a region to a canvas: the DOM engine loads the optional
|
|
14
|
+
* `@zumer/snapdom` peer with `import()` only when it captures; the system
|
|
15
|
+
* engine wraps `getDisplayMedia`.
|
|
11
16
|
*/
|
|
12
17
|
export { canCaptureScreen } from './can-capture-screen.js';
|
|
13
18
|
export { CaptureScreenError, type CaptureScreenErrorCode, type CaptureScreenOptions, captureScreen, } from './capture-screen.js';
|
|
19
|
+
export { canvasToBitmap, canvasToBlob, cropCanvas, } from './engine/canvas.js';
|
|
20
|
+
export { captureElement, captureRegion, getCaptureEngine, } from './engine/capture.js';
|
|
21
|
+
export { CAPTURE_EXCLUDE_ATTRIBUTE, CAPTURE_MASK_ATTRIBUTE, } from './engine/filters.js';
|
|
22
|
+
export { intersectRects, rectFromPoints } from './engine/rect.js';
|
|
23
|
+
export { type CaptureEngine, CaptureEngineError, type CaptureEngineErrorCode, type CaptureEngineName, type CaptureMaskOptions, type CaptureOptions, type CaptureRect, type CaptureRequest, type CaptureResult, } from './engine/types.js';
|
|
14
24
|
export { DEFAULT_UNMASK_SELECTOR } from './mask-text.js';
|
|
25
|
+
export { type CaptureMode, type CaptureModeOptions, captureMode, } from './modes/capture-mode.js';
|
|
26
|
+
export { CAPTURE_DELAYS, type CaptureDelay, type CountdownOptions, countdown, } from './modes/countdown.js';
|
|
27
|
+
export { captureFullPage, type FullPageOptions } from './modes/full-page.js';
|
|
28
|
+
export { type PickElementOptions, pickElement } from './modes/pick-element.js';
|
|
29
|
+
export { findMainScroller } from './modes/scroller.js';
|
|
30
|
+
export { captureVisible } from './modes/visible.js';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CaptureOptions, CaptureResult } from '../engine/types.js';
|
|
2
|
+
import { CaptureDelay } from './countdown.js';
|
|
3
|
+
import { PickElementOptions } from './pick-element.js';
|
|
4
|
+
export type CaptureMode = 'visible' | 'element' | 'full-page';
|
|
5
|
+
export type CaptureModeOptions = CaptureOptions & {
|
|
6
|
+
/** Full page only: the scroller to capture instead of the detected one. */
|
|
7
|
+
target?: HTMLElement;
|
|
8
|
+
/** Timer: wait 3, 5 or 10 s (with a countdown) before the capture starts. */
|
|
9
|
+
delay?: CaptureDelay;
|
|
10
|
+
/** Cancels the countdown or the pick. */
|
|
11
|
+
signal?: AbortSignal;
|
|
12
|
+
/** Called with the seconds left during the delay. */
|
|
13
|
+
onTick?: (left: number) => void;
|
|
14
|
+
/** `false` to draw your own countdown number and element outline. */
|
|
15
|
+
overlay?: boolean;
|
|
16
|
+
/** Element mode: see `pickElement`. */
|
|
17
|
+
pick?: Omit<PickElementOptions, 'signal' | 'outline'>;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* One call for the modes. `delay` adds the timer in front of any of them
|
|
21
|
+
* (for `element`, the pick starts once it ends, so a menu can be opened
|
|
22
|
+
* meanwhile). Rejects with a `cancelled` `CaptureEngineError` on Esc.
|
|
23
|
+
*/
|
|
24
|
+
export declare function captureMode(mode: CaptureMode, options?: CaptureModeOptions): Promise<CaptureResult>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** The delays the timer mode offers, in seconds. */
|
|
2
|
+
export declare const CAPTURE_DELAYS: readonly [3, 5, 10];
|
|
3
|
+
export type CaptureDelay = (typeof CAPTURE_DELAYS)[number];
|
|
4
|
+
export type CountdownOptions = {
|
|
5
|
+
/** Called with the seconds left: `seconds`, then down to 1. */
|
|
6
|
+
onTick?: (left: number) => void;
|
|
7
|
+
signal?: AbortSignal;
|
|
8
|
+
/** `false` for no built-in number on screen (the caller shows its own). */
|
|
9
|
+
overlay?: boolean;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Counts `seconds` down, one tick per second, and resolves at zero. Esc or the
|
|
13
|
+
* signal rejects with a `cancelled` `CaptureEngineError`. The number is gone
|
|
14
|
+
* from the page when the promise settles.
|
|
15
|
+
*/
|
|
16
|
+
export declare function countdown(seconds: number, options?: CountdownOptions): Promise<void>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CaptureOptions, CaptureResult } from '../engine/types.js';
|
|
2
|
+
export type FullPageOptions = CaptureOptions & {
|
|
3
|
+
/** The scroller to capture. Default: the main scroll container, else the document. */
|
|
4
|
+
target?: HTMLElement;
|
|
5
|
+
};
|
|
6
|
+
/** The element `captureFullPage` renders when no `target` is given. */
|
|
7
|
+
export declare function resolveFullPageTarget(target?: HTMLElement): HTMLElement;
|
|
8
|
+
/**
|
|
9
|
+
* The whole content of the main scroll container (or of the document), not
|
|
10
|
+
* only its visible part. The container is stretched to its content while it
|
|
11
|
+
* renders and restored after, so a sticky header is drawn once, on top.
|
|
12
|
+
* DOM engine only: the system engine can only grab what is on screen.
|
|
13
|
+
*/
|
|
14
|
+
export declare function captureFullPage(options?: FullPageOptions): Promise<CaptureResult>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type PickElementOptions = {
|
|
2
|
+
/** An element that may not be picked (and what is inside). Default: anything. */
|
|
3
|
+
filter?: (el: Element) => boolean;
|
|
4
|
+
/** Called as the pointer moves over a new element (or leaves, `null`). */
|
|
5
|
+
onHover?: (el: Element | null) => void;
|
|
6
|
+
signal?: AbortSignal;
|
|
7
|
+
/** `false` for no built-in outline (the caller draws its own). */
|
|
8
|
+
outline?: boolean;
|
|
9
|
+
/** The spoken name of an outlined element. Default: its label or text, else its tag. */
|
|
10
|
+
describe?: (el: Element) => string;
|
|
11
|
+
/** `false` for no built-in live region (the caller announces the outline). */
|
|
12
|
+
announce?: boolean;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Element mode: outlines the element under the pointer; a click (or a tap)
|
|
16
|
+
* resolves it without reaching the page. The keyboard works too: the arrow
|
|
17
|
+
* keys move the outline (Up to the parent, Down to the first child, Left and
|
|
18
|
+
* Right between siblings), Tab and Shift+Tab step through the page, and Enter
|
|
19
|
+
* or Space picks the outlined element, which a live region announces. Esc or
|
|
20
|
+
* the signal rejects with a `cancelled` `CaptureEngineError`.
|
|
21
|
+
*/
|
|
22
|
+
export declare function pickElement(options?: PickElementOptions): Promise<Element>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Finds the element that scrolls the page's content, pure DOM reads. */
|
|
2
|
+
/**
|
|
3
|
+
* The main scroll container: the largest element, at least a third of the
|
|
4
|
+
* viewport in area, that scrolls vertically (a layout's main area). `null`
|
|
5
|
+
* when the document itself scrolls, which is the fallback.
|
|
6
|
+
*/
|
|
7
|
+
export declare function findMainScroller(root?: ParentNode): HTMLElement | null;
|
|
8
|
+
/**
|
|
9
|
+
* Lets `el` grow to its whole content and scrolls it to the top, so a render
|
|
10
|
+
* sees everything once, a sticky header at its starting place. Returns the
|
|
11
|
+
* function that puts everything back.
|
|
12
|
+
*/
|
|
13
|
+
export declare function expandForCapture(el: HTMLElement): () => void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@softistx/material/capture-toolbar` — the interface of the screen capture
|
|
3
|
+
* tool: `ScreenCaptureToolbar` (a floating pill with the modes, the timer and a
|
|
4
|
+
* capture button), `useScreenCapture` (the same, headless), and
|
|
5
|
+
* `RegionOverlay` (the area selection of the region mode). The engines and
|
|
6
|
+
* modes they drive are in `@softistx/material/capture`.
|
|
7
|
+
*
|
|
8
|
+
* Every export is imported from its own file, never from a barrel, so the
|
|
9
|
+
* entry reaches no barcode, router, rich text, chart or PDF code. Inside a
|
|
10
|
+
* Shadow DOM, wrap it in a `PortalContainerProvider` and pair it with
|
|
11
|
+
* `@softistx/material/capture-toolbar.css`.
|
|
12
|
+
*
|
|
13
|
+
* Own entry, not exported from `./components` or `./main`.
|
|
14
|
+
*/
|
|
15
|
+
export { PortalContainerProvider, type PortalContainerProviderProps, } from '../components/ui/primitives/portal-container-provider/portal-container-provider.js';
|
|
16
|
+
export { I18nProvider, type I18nProviderProps } from '../i18n/i18n-provider.js';
|
|
17
|
+
export { adoptStyles } from '../lib/adopt-styles.js';
|
|
18
|
+
export { NxgtThemeProvider, type NxgtThemeProviderProps, } from '../themes/nxgt-theme-provider.js';
|
|
19
|
+
export { CaptureOutputs, type CaptureOutputsProps, } from './lazy-capture-outputs.js';
|
|
20
|
+
export { type CaptureEncodeOptions, type CaptureFormat, CaptureOutputError, type CaptureOutputErrorCode, type CaptureUploadOptions, canCopyCapture, canShareCapture, captureFileName, copyCapture, downloadCapture, encodeCapture, shareCapture, uploadCapture, } from './outputs.js';
|
|
21
|
+
export { CaptureEditor, type CaptureEditorProps, } from './partials/capture-editor.js';
|
|
22
|
+
export { RegionOverlay, type RegionOverlayProps } from './region-overlay.js';
|
|
23
|
+
export { ScreenCaptureToolbar, type ScreenCaptureToolbarProps, } from './screen-capture-toolbar.js';
|
|
24
|
+
export { type CaptureEditorHandlers, type CaptureReviewHandlers, type RegionHandlers, SCREEN_CAPTURE_MODES, type ScreenCaptureController, type ScreenCaptureMode, type ScreenCaptureOutputs, type ScreenCaptureResult, type ScreenCaptureStatus, type UseScreenCaptureOptions, } from './types.js';
|
|
25
|
+
export { useScreenCapture } from './use-screen-capture.js';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** The image formats a capture can be saved in. PNG is lossless; WebP and JPEG take a `quality`. */
|
|
2
|
+
export type CaptureFormat = 'png' | 'webp' | 'jpeg';
|
|
3
|
+
export declare const MIME: Record<CaptureFormat, 'image/png' | 'image/webp' | 'image/jpeg'>;
|
|
4
|
+
export type CaptureEncodeOptions = {
|
|
5
|
+
/** Default `png`. */
|
|
6
|
+
format?: CaptureFormat;
|
|
7
|
+
/** 0 to 1, for `webp` and `jpeg` (default 0.92). Ignored for `png`. */
|
|
8
|
+
quality?: number;
|
|
9
|
+
};
|
|
10
|
+
export type CaptureOutputErrorCode = 'unsupported' | 'failed';
|
|
11
|
+
/** What an output throws: `unsupported` when the browser lacks the API. */
|
|
12
|
+
export declare class CaptureOutputError extends Error {
|
|
13
|
+
readonly code: CaptureOutputErrorCode;
|
|
14
|
+
cause?: unknown;
|
|
15
|
+
constructor(code: CaptureOutputErrorCode, message: string, cause?: unknown);
|
|
16
|
+
}
|
|
17
|
+
/** `name` with the extension of `format` (`capture` and `png` give `capture.png`). */
|
|
18
|
+
export declare function captureFileName(name?: string, format?: CaptureFormat): string;
|
|
19
|
+
/**
|
|
20
|
+
* The capture in `format`. A blob that already is a PNG comes back as is when
|
|
21
|
+
* `format` is `png`; any other blob (an edited image can be WebP or JPEG) and
|
|
22
|
+
* every WebP or JPEG request is drawn again and encoded at `quality` (JPEG on
|
|
23
|
+
* a white ground, it has no alpha).
|
|
24
|
+
*/
|
|
25
|
+
export declare function encodeCapture(blob: Blob, { format, quality }?: CaptureEncodeOptions): Promise<Blob>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { FileConflictPolicy, FileSource, FileSourceItem } from '@softistx/material-core/files';
|
|
2
|
+
/**
|
|
3
|
+
* Where a capture goes once it is taken: the clipboard, a file, the share
|
|
4
|
+
* sheet or a `FileSource`. Plain functions on a `Blob`, no React: use them from
|
|
5
|
+
* your own buttons, or let `ScreenCaptureToolbar` show them with `outputs`.
|
|
6
|
+
*/
|
|
7
|
+
/** `true` when the browser can put an image on the clipboard. */
|
|
8
|
+
export declare function canCopyCapture(): boolean;
|
|
9
|
+
/** Copies the capture to the clipboard as a PNG (the one image type every browser accepts). */
|
|
10
|
+
export declare function copyCapture(blob: Blob): Promise<void>;
|
|
11
|
+
/** Saves the capture as a file through a temporary link. */
|
|
12
|
+
export declare function downloadCapture(blob: Blob, fileName?: string): void;
|
|
13
|
+
/** `true` when the browser can share this capture as a file (hide the action otherwise). */
|
|
14
|
+
export declare function canShareCapture(blob: Blob, fileName?: string): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Opens the share sheet with the capture. Resolves `false` when the person
|
|
17
|
+
* closed the sheet (not an error), `true` when it was shared.
|
|
18
|
+
*/
|
|
19
|
+
export declare function shareCapture(blob: Blob, fileName?: string, data?: {
|
|
20
|
+
title?: string;
|
|
21
|
+
text?: string;
|
|
22
|
+
}): Promise<boolean>;
|
|
23
|
+
export type CaptureUploadOptions = {
|
|
24
|
+
/** The folder to upload into; the root when absent. */
|
|
25
|
+
parentId?: string | null;
|
|
26
|
+
/** What to do when the name is taken (see `FileConflictPolicy`). */
|
|
27
|
+
onConflict?: FileConflictPolicy;
|
|
28
|
+
/** Called with 0..1 while the bytes go up. */
|
|
29
|
+
onProgress?: (fraction: number) => void;
|
|
30
|
+
signal?: AbortSignal;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Uploads the capture through a `FileSource` (the adapter `/files` uses) that
|
|
34
|
+
* has `upload`. Rejects with the source's own error, a `FileSourceError`
|
|
35
|
+
* included; with `unsupported` when the source cannot upload.
|
|
36
|
+
*/
|
|
37
|
+
export declare function uploadCapture(source: FileSource, blob: Blob, fileName?: string, options?: CaptureUploadOptions): Promise<FileSourceItem>;
|
|
38
|
+
export { type CaptureEncodeOptions, type CaptureFormat, CaptureOutputError, type CaptureOutputErrorCode, captureFileName, encodeCapture, } from './outputs-encode.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CaptureEditorHandlers } from '../types.js';
|
|
2
|
+
export type CaptureEditorProps = CaptureEditorHandlers;
|
|
3
|
+
/**
|
|
4
|
+
* The capture preset of the markup editor, full screen over the page: floating
|
|
5
|
+
* tools, Crop, the numbered step marker, a text Cancel and a primary Done.
|
|
6
|
+
* Done hands the edited image to `onDone`; Cancel and Esc (outside a text
|
|
7
|
+
* field) call `onCancel`. The page behind it is `inert`. Render it
|
|
8
|
+
* with `useScreenCapture({ edit: true })`'s `editor`; `ScreenCaptureToolbar`
|
|
9
|
+
* does it itself.
|
|
10
|
+
*/
|
|
11
|
+
export declare function CaptureEditor({ blob, onDone, onCancel }: CaptureEditorProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ScreenCaptureOutputs, ScreenCaptureResult } from '../types.js';
|
|
2
|
+
export type CaptureOutputsProps = {
|
|
3
|
+
result: ScreenCaptureResult;
|
|
4
|
+
outputs: ScreenCaptureOutputs;
|
|
5
|
+
/** Close: back to the page. */
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* The output step of a capture, a pill like the toolbar's: a thumbnail, then
|
|
10
|
+
* Copy, Download, Share and Upload where they are on and the browser can, and
|
|
11
|
+
* Close. Each outcome is announced once, by a live-region message, and the
|
|
12
|
+
* button itself shows a short "Copied" state; an error stays under the row until the next
|
|
13
|
+
* try. `ScreenCaptureToolbar` renders it with `outputs`; use it alone with
|
|
14
|
+
* `useScreenCapture({ review: true })`'s `review`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function CaptureOutputs({ result, outputs, onClose, }: CaptureOutputsProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CaptureRect } from '../capture/engine/types.js';
|
|
2
|
+
export type RegionOverlayProps = {
|
|
3
|
+
/** Called with the area, in viewport CSS pixels, when it is confirmed. */
|
|
4
|
+
onSelect: (rect: CaptureRect) => void;
|
|
5
|
+
/** Called on Esc or the Cancel button. */
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Region mode's full-screen overlay: drag to draw an area (or click to snap to
|
|
10
|
+
* the element under the pointer), then move it, resize it by its eight handles
|
|
11
|
+
* or with the arrow keys (Shift steps by 10 px, Alt resizes), and confirm with
|
|
12
|
+
* Enter or the Capture button. Esc cancels. It carries the capture-exclude
|
|
13
|
+
* attribute, so it never appears in the image. Touch drag works as the mouse's.
|
|
14
|
+
*/
|
|
15
|
+
export declare function RegionOverlay({ onSelect, onCancel }: RegionOverlayProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ScreenCaptureMode, ScreenCaptureOutputs, UseScreenCaptureOptions } from './types.js';
|
|
2
|
+
export type ScreenCaptureToolbarProps = UseScreenCaptureOptions & {
|
|
3
|
+
/** The modes offered, in order. Default: all; `system` only where the browser can. */
|
|
4
|
+
modes?: readonly ScreenCaptureMode[];
|
|
5
|
+
/**
|
|
6
|
+
* Opens the markup editor (floating tools, crop, step marker) on the
|
|
7
|
+
* capture: Done passes the edited image to `onCapture`, Cancel returns to
|
|
8
|
+
* the page with nothing. Default `true`; `false` skips it and keeps the
|
|
9
|
+
* editor out of the page's loads.
|
|
10
|
+
*/
|
|
11
|
+
edit?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Shows Copy, Download, Share and Upload after the capture (after Done
|
|
14
|
+
* when `edit` is on), each only where it is on and the browser can, with a
|
|
15
|
+
* Close. Absent: no output step, `onCapture` is the only output. See
|
|
16
|
+
* `ScreenCaptureOutputs` for the format, quality, file name and upload.
|
|
17
|
+
*/
|
|
18
|
+
outputs?: ScreenCaptureOutputs;
|
|
19
|
+
/** `bottom` (default) or `top` of the viewport. */
|
|
20
|
+
position?: 'bottom' | 'top';
|
|
21
|
+
className?: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* A floating tinted pill to take a screen capture: mode chips (visible area,
|
|
25
|
+
* region, element, full page, system window), the timer as a menu and a round
|
|
26
|
+
* capture button. The region mode draws its own overlay. The toolbar and every
|
|
27
|
+
* overlay carry `data-capture-exclude`, so none of them is in the image.
|
|
28
|
+
* Inside a Shadow DOM, wrap it in a `PortalContainerProvider` so the timer
|
|
29
|
+
* menu renders in the shadow root.
|
|
30
|
+
*/
|
|
31
|
+
export declare function ScreenCaptureToolbar({ modes, position, className, edit, outputs, ...options }: ScreenCaptureToolbarProps): import("react").JSX.Element;
|