@softistx/material 3.248.0 → 3.249.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 +24 -0
- package/README.md +6 -2
- 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-BbAylWQW.js} +16711 -20831
- 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-C-lAK_LC.js} +2 -2
- package/dist/embed-chunks/{emoji-picker-BSYBi_C8.js → emoji-picker-BWDQFdQu.js} +4 -4
- package/dist/embed-chunks/{mention-list-NW43QcRq.js → mention-list-CdUr0h3X.js} +3 -3
- package/dist/embed-chunks/{nxgt-theme-provider-B1aeqDja.js → nxgt-theme-provider-DdDsiEPj.js} +2 -2
- package/dist/embed-chunks/{switch-control-ChcowM3u.js → switch-control-B95ZWvna.js} +1 -1
- package/dist/embed-chunks/{tabs-root-CY-uLp1C.js → tabs-root-MF9lEHbq.js} +2 -2
- package/dist/embed-chunks/{use-shape-morph-NrJQMv7i.js → use-shape-morph-D1MOoQ4T.js} +110 -2
- package/dist/embed-chunks/{useLatest-B57qw3XH.js → useLatest-RGIW0nya.js} +1 -1
- package/dist/embed.js +626 -613
- 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 +1124 -848
- 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/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 +2 -0
- 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/guides/capture.md +248 -0
- package/docs/guides/csp.md +1 -1
- package/docs/guides/embed.md +50 -2
- package/docs/roadmap.md +2 -1
- package/docs/troubleshooting.md +56 -0
- package/package.json +18 -1
- 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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @nxgt/material
|
|
2
2
|
|
|
3
|
+
## 3.249.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#5308](https://github.com/softistx/nxgt-material/pull/5308) [`a7510af`](https://github.com/softistx/nxgt-material/commit/a7510af9e13e247bf1e2e2510f1b9133e0ba5e0a) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `@softistx/material/capture-toolbar`: a capture can now be edited before it is handed over. `ScreenCaptureToolbar` opens the markup editor on the result by default (`edit`, set it to `false` to skip): floating tools, Crop and the numbered step marker, Done returns the edited PNG to `onCapture` (`edited: true`), Cancel or Esc returns to the page with nothing. It works for every mode and both engines, and the editor is a lazy chunk fetched only when a capture opens it. `useScreenCapture({ edit: true })` exposes `editor` (and the `editing` status) to render with the new `CaptureEditor`; `edit` is off by default there. The region loupe now keeps clear of the size pill and the Cancel and Capture buttons (it moves to another side of the pointer, and hides while the pointer is over them), and the toolbar's chip-row edge fades follow a `ResizeObserver` instead of the window alone. New `material.capture.editor`, `editor-loading`, `editing` and `done` texts in English and French. `ScreenCaptureResult` gains an `edited` flag.
|
|
8
|
+
|
|
9
|
+
The image editor's floating tool pill now attaches its scroll-edge fade once the image is ready, so a pill wider than the screen fades its clipped edge.
|
|
10
|
+
|
|
11
|
+
- [#5308](https://github.com/softistx/nxgt-material/pull/5308) [`a7510af`](https://github.com/softistx/nxgt-material/commit/a7510af9e13e247bf1e2e2510f1b9133e0ba5e0a) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `@softistx/material/capture` gains an engine layer beside `captureScreen`, which is unchanged. `captureElement(target?, options?)` and `captureRegion(rect, options?)` render an element or a viewport rect to a canvas (`{ canvas, scale, engine }`), with `canvasToBlob`, `canvasToBitmap` and `cropCanvas` as helpers. The default DOM engine loads the new optional peer `@zumer/snapdom` (`^3.7.1`) with `import()` only when it captures: no permission prompt, shadow roots, web fonts, pseudo-elements, and cross-origin media as neutral boxes. The `system` engine wraps `getDisplayMedia` (window, tab or screen) and crops afterwards. Elements with `data-capture-exclude` are left out; masking is opt-in (`mask: true`) and paints `data-capture-mask` elements, and optionally text, as opaque boxes.
|
|
12
|
+
|
|
13
|
+
- [#5308](https://github.com/softistx/nxgt-material/pull/5308) [`a7510af`](https://github.com/softistx/nxgt-material/commit/a7510af9e13e247bf1e2e2510f1b9133e0ba5e0a) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `@softistx/material/capture` gains the capture modes, as plain functions. `captureVisible()` takes the viewport; `captureFullPage({ target? })` takes the whole content of the main scroll container (found by `findMainScroller()`, else the document; `target` overrides it), stretching it while it renders so a sticky header is drawn once; `pickElement()` outlines the element under the pointer and resolves the one clicked; `countdown(3 | 5 | 10)` ticks down with an on-screen number (`CAPTURE_DELAYS`). `captureMode('visible' | 'element' | 'full-page', { delay })` runs any of them, with the timer in front. Esc or an `AbortSignal` cancels a pick or a countdown with a `cancelled` `CaptureEngineError`; the tool's own overlays carry `data-capture-exclude`.
|
|
14
|
+
|
|
15
|
+
- [#5308](https://github.com/softistx/nxgt-material/pull/5308) [`a7510af`](https://github.com/softistx/nxgt-material/commit/a7510af9e13e247bf1e2e2510f1b9133e0ba5e0a) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `ScreenCaptureToolbar` takes `outputs` (it turns on the `review` step): after a capture, a row to Copy (clipboard, PNG), Download, Share (Web Share with files, only where supported) and Upload through a `FileSource`, with WebP or JPEG and a quality option, toasts and inline status. `useScreenCapture({ review: true })` exposes the same step headless, and `CaptureOutputs` plus the helpers (`encodeCapture`, `copyCapture`, `downloadCapture`, `shareCapture`, `uploadCapture`, `canCopyCapture`, `canShareCapture`, `captureFileName`, the `CaptureFormat` type and `CaptureOutputError`) are exported from `@softistx/material/capture-toolbar`. Texts are `material.capture.*` in English and French.
|
|
16
|
+
|
|
17
|
+
- [#5308](https://github.com/softistx/nxgt-material/pull/5308) [`a7510af`](https://github.com/softistx/nxgt-material/commit/a7510af9e13e247bf1e2e2510f1b9133e0ba5e0a) Thanks [@SteveGT96](https://github.com/SteveGT96)! - New entry `@softistx/material/capture-toolbar`: `ScreenCaptureToolbar`, a floating tinted pill with a chip per capture mode (visible area, region, element, full page, system window), the timer as a menu (no timer, 3, 5 or 10 s) and a round Capture button, built on the capture engines and modes; `useScreenCapture` for the same state headless; and `RegionOverlay`, the region selection (drag or click to snap to the element under the pointer, a 3 px outline with eight handles, a "W × H px" pill, a 4x magnifying loupe with coordinates, from one lazy snapshot, on a fine pointer, arrows with Shift to step and Alt to resize, Enter and Esc, touch drag). `onCapture` receives a PNG `Blob`. There is no default shortcut: pass `shortcut="Alt+Shift+S"` to opt in. The toolbar and its overlays carry `data-capture-exclude`, so they are never in the image. Texts are `material.capture.*` in English and French. In a Shadow DOM, wrap it in a `PortalContainerProvider` and adopt the new `@softistx/material/capture-toolbar.css`. Element mode now registers its touch listeners as non-passive, so a tap no longer reaches the page.
|
|
18
|
+
|
|
19
|
+
- [#5307](https://github.com/softistx/nxgt-material/pull/5307) [`5ed97b7`](https://github.com/softistx/nxgt-material/commit/5ed97b7ef39d74c755a487208d6e7f67c8ace735) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `@softistx/material/embed` exports `NonceProvider`, so a widget under a strict `style-src 'nonce-…'` can give the scroll area of `ChatMessageList` / `ChatThread` its nonce. `AttachmentList` no longer prints "0 B" for a file whose `size` is unknown; it omits the size.
|
|
20
|
+
|
|
21
|
+
- [#5308](https://github.com/softistx/nxgt-material/pull/5308) [`a7510af`](https://github.com/softistx/nxgt-material/commit/a7510af9e13e247bf1e2e2510f1b9133e0ba5e0a) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `@softistx/material/image-editor`: a numbered step-marker tool (`'step'`: a click drops a round pin numbered 1, 2, 3 in the current colour, a drag moves it, deleting one renumbers the rest; the number is white or dark by the colour's luminance; Enter on the stage drops one with the keyboard). **Behaviour change for embed consumers:** `EMBED_MARKUP_TOOLS` now includes `'step'`, so an embed that uses the constant as is shows the Step tool in its Markup panel; filter it out (`EMBED_MARKUP_TOOLS.filter((t) => t !== 'step')`) to keep the old set. The default `ImageEditor` Markup panel's tool picker gains the Step tool too. `ImageMarkupEditor` takes `crop` to add the Crop panel, and `ImageEditor` / `ImageMarkupEditor` take `toolbar="floating"`, an opt-in annotate mode: a pill of tools floating over the image whose active tool shows its name, a text Cancel and a primary Done (`saveLabel`) in the top bar. In that mode the Crop controls are a compact strip under the image, and the pill fades at its edges when it scrolls. On screen a step marker never shows smaller than 24 px (exports keep the image-relative size). Default layout unchanged.
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- [#5308](https://github.com/softistx/nxgt-material/pull/5308) [`a7510af`](https://github.com/softistx/nxgt-material/commit/a7510af9e13e247bf1e2e2510f1b9133e0ba5e0a) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `@softistx/material/capture` and `/capture-toolbar`, review fixes. The capture editor makes the page behind it `inert`. When a run ends (done, cancel, error or Esc) focus returns to the Capture button. Element mode works from the keyboard: arrow keys and Tab move the outline (`pickElement` also takes `describe` and `announce`), Enter or Space picks, and a live region names the outlined element. `encodeCapture` re-encodes a non-PNG blob asked as PNG, so Copy never labels WebP or JPEG bytes as `image/png`. The system engine waits one frame after hiding the toolbar. A result is announced once, by the inline status; the toolbar no longer also shows a toast. The SSR check covers `capture-toolbar.js`.
|
|
26
|
+
|
|
3
27
|
## 3.248.0
|
|
4
28
|
|
|
5
29
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -143,6 +143,7 @@ or a failed resolve of `<package>` at the app's build (Vite), see
|
|
|
143
143
|
| `/pdf-form` | `pdf-lib` | `^1.17.1` | when a signature is saved (a lazy `import()`): `PdfFormLoadError`, `Saving a signature needs pdf-lib (^1.17.1)` |
|
|
144
144
|
| `/editor/collab` | `yjs` | `^13.5.38` | at import |
|
|
145
145
|
| `/editor/collab` | `y-protocols` | `^1.0.1` | not imported by the entry: the awareness your provider passes to `collaboration()` comes from it |
|
|
146
|
+
| `/capture`, `/capture-toolbar` | `@zumer/snapdom` | `^3.7.1` | when a DOM capture runs (a lazy `import()`): `CaptureEngineError` `peer-missing`, `@zumer/snapdom (^3.7.1) could not be loaded` |
|
|
146
147
|
| `/media-hls` | `hls.js` | `^1.6.0` | at the app's build when its bundler resolves the lazy `import()`, otherwise when a stream loads: `hls.js (^1.6.0) could not be loaded…` |
|
|
147
148
|
| `/passkey` | `@simplewebauthn/browser` | `^14.0.0` | when `run` first loads it (a lazy `import()`): `usePasskey needs @simplewebauthn/browser (^14.0.0)` |
|
|
148
149
|
| `/vite` | `@fontsource-variable/inter` | `>=5` | never: `nxgtMaterial()` warns and keeps the system font (`fonts: { sans: false }` silences it) |
|
|
@@ -152,6 +153,7 @@ bun add @react-pdf/renderer@^4.9.0 react-pdf-tailwind@^3.0.0 # for /print
|
|
|
152
153
|
bun add maplibre-gl@^6.18.0 # for /map
|
|
153
154
|
bun add terra-draw@^1.39.0 terra-draw-maplibre-gl-adapter@^1.5.0 # for /map/draw
|
|
154
155
|
bun add yjs@^13.5.38 y-protocols@^1.0.1 # for /editor/collab
|
|
156
|
+
bun add @zumer/snapdom@^3.7.1 # for /capture, DOM capture
|
|
155
157
|
bun add hls.js@^1.6.0 # for /media-hls
|
|
156
158
|
bun add @simplewebauthn/browser@^14.0.0 # for /passkey
|
|
157
159
|
bun add pdf-lib@^1.17.1 # for /pdf-form, to save a signature
|
|
@@ -293,7 +295,7 @@ reads `duotone.svg`, the file that exists (it used to ask for the missing
|
|
|
293
295
|
| `@softistx/material/charts` | Native SVG charts (d3-scale and d3-shape for the maths only) with keyboard point navigation, a screen-reader summary, a "View data" table and `patterns`: `LineChart` and `AreaChart` (`LineChartProps`, `AreaChartProps`, `ChartCurve`), `BarChart` (`BarChartProps`, `BarLayout`, `BarOrientation`), `PieChart` (`PieChartProps`), `DonutChart` (`DonutChartProps`), `Gauge` (`GaugeProps`, `GaugeSize`), `RadialBarChart` (`RadialBarChartProps`), `FunnelChart` (`FunnelChartProps`), `PopulationPyramid` (`PopulationPyramidProps`, `PyramidBand`, `PyramidSide`: two groups back to back by band on one scale, `onSelect`), `HeatmapChart` (`HeatmapChartProps`, `HeatColumn`), `RadarChart` (`RadarChartProps`), `ScatterChart` (`ScatterChartProps`, `ScatterSeries`, `ScatterPoint`), `ComboChart` (`ComboChartProps`, `ComboSeries`: bars, areas and lines, each on a left or a right axis), `labelWidth` and `wrapLabels` (a horizontal `BarChart`'s category labels), `maskedLabel` (a `HeatmapChart`'s missing cells), `zoom` (a mini overview with a window and two slider handles that picks the rows shown; `range`, `defaultRange`, `onRangeChange`) and `scroll` (a dense plot scrolls sideways on a phone, the value axis pinned) on the line, area, bar and combo charts (`ChartRangeProps`, `ChartZoomOptions`, `ChartScrollOptions`, `ChartRange`), `bands` (shaded ranges), `thresholds` (labelled lines) and `pointTone` (a ringed point with its word, `toneLabels`) on the line and area charts, read against the value axis and carried into the tooltip, the summary and the "View data" table (`ChartBand`, `ChartThreshold`), `onPointClick` on every chart but `Gauge`, `palette` (`'soft'`: the soft palette, or `data-chart-palette="soft"` on an ancestor; `ChartPalette`) on every chart, and the shared types (`ChartSlice`, `ChartRow`, `ChartValue`, `ChartColor`, `ChartShape`, `ChartSeries`, `ChartAxis`, `ChartXAxis`, `ChartPoint`, `ChartBaseProps`). `categoryLabel` names the "View data" table's category column: on Line, Area, Bar and Combo it defaults to the x axis label, on Radar and Heatmap it is always "Category" unless set. **Its own entry, client-only** (import it from a `'use client'` file), not in the barrel above; replaces the Nivo charts (removed in 3.0) of `/components` ([guide](https://github.com/softistx/nxgt-material/blob/develop/packages/material/docs/guides/charts.md)) |
|
|
294
296
|
| `@softistx/material/barcode` | `Barcode` (Code 128 and Data Matrix as accessible SVG that follows the theme and dark mode, black on white in print; no runtime dependency) and `LabelSheet` / `Label` (label size, columns, rows, gaps and a start offset for a printed sheet of labels), plus `barcodeGeometry` and `BarcodeError` — **its own entry** ([barcode guide](https://github.com/softistx/nxgt-material/blob/develop/packages/material/docs/guides/barcode.md)) |
|
|
295
297
|
| `@softistx/material/embed` | The lean entry for a widget in a third-party page: `Dialog` and its parts, `Button`, `TextField`, `TextareaField`, `EmailField` (`EmailFieldProps`) and their React Hook Form wrappers (`TextFormField`, `EmailFormField`, `TextareaFormField`), `Checkbox` (`CheckboxProps`) and `CheckboxFormField`, `Input`, `Textarea`, `Alert`, `Tabs`, `ChipGroupField`, `Badge`, `ListRow`, `EmptyState`, `Skeleton`, `SkeletonText`, `Spinner`, `ChatThread`, `ChatMessageList`, `ChatMessage` (with a plain-text `text` mode), `ChatMessageSeparator` and `ChatComposer`, `AttachmentList` (`AttachmentItem`), `I18nProvider` (`I18nProviderProps`), `NxgtThemeProvider`, `PortalContainerProvider`, `adoptStyles`. No global set on import; `@softistx/material/embed.css` is its shadow-root-ready stylesheet ([embed guide](https://github.com/softistx/nxgt-material/blob/develop/packages/material/docs/guides/embed.md)) |
|
|
296
|
-
| `@softistx/material/image-editor` | The photo editor for a widget in a third-party page: `ImageEditor`, `ImageMarkupEditor` (pen, highlighter, arrow, rectangle, text and redact over a screenshot, no adjust, filters or download) and `EMBED_MARKUP_TOOLS`, with `NxgtThemeProvider`, `PortalContainerProvider` and `adoptStyles`; `decode="bitmap"` decodes with `createImageBitmap` (no `<img>`, no object URL). No global set on import; `@softistx/material/image-editor.css` is its shadow-root-ready stylesheet ([guide](https://github.com/softistx/nxgt-material/blob/develop/packages/material/docs/guides/embed.md#the-photo-editor)) |
|
|
298
|
+
| `@softistx/material/image-editor` | The photo editor for a widget in a third-party page: `ImageEditor`, `ImageMarkupEditor` (pen, highlighter, arrow, rectangle, text, numbered step markers and redact over a screenshot, `crop` to add the Crop panel, `toolbar="floating"` for the annotate-mode pill; no adjust, filters or download) and `EMBED_MARKUP_TOOLS`, with `NxgtThemeProvider`, `PortalContainerProvider` and `adoptStyles`; `decode="bitmap"` decodes with `createImageBitmap` (no `<img>`, no object URL). No global set on import; `@softistx/material/image-editor.css` is its shadow-root-ready stylesheet ([guide](https://github.com/softistx/nxgt-material/blob/develop/packages/material/docs/guides/embed.md#the-photo-editor)) |
|
|
297
299
|
| `@softistx/material/embed-css` | Build-time helpers for an embed's own CSS (Bun or Node, never in a browser bundle): `withPropertyFallbacks(css)`, `propertyInitials`, `propertyFallbacks` and `PROPERTY_LAYER`, which restore the `@property` initial values a shadow root ignores ([embed guide](https://github.com/softistx/nxgt-material/blob/develop/packages/material/docs/guides/embed.md#your-own-css)) |
|
|
298
300
|
| `@softistx/material/calculator` | `Calculator`: exact decimal arithmetic with the usual precedence, a large display, a shaped keypad, a tape of past results, a memory, the physical keyboard, copy and paste, screen-reader announcements and a variant switcher (Standard, Scientific, Point of sale, Financial, Conversion and Programmer) — **its own entry** ([calculator guide](https://github.com/softistx/nxgt-material/blob/develop/packages/material/docs/guides/calculator.md)) |
|
|
299
301
|
| `@softistx/material/calculator-field` | `CalculatorField` and `CalculatorFormField`: a number field (a currency field with `currency`) whose button opens the calculator, seeded with its number, in a popover or a phone's bottom sheet; Apply writes the rounded result — **its own entry** ([calculator guide](https://github.com/softistx/nxgt-material/blob/develop/packages/material/docs/guides/calculator.md#in-a-form-calculatorfield)) |
|
|
@@ -302,6 +304,8 @@ reads `duotone.svg`, the file that exists (it used to ask for the missing
|
|
|
302
304
|
| `@softistx/material/draw/sketch` | The sketchy, hand-drawn style for a drawing: `Sketch` (`seed`, `roughness`, `bowing`, `fill`: `hachure`, `cross-hatch`, `solid` or `none`, `hachureAngle`, `hachureGap`, `strokeWidth`) wraps a `Drawing`, or primitives inside one, and draws shapes as double wobbling strokes with hatched fills; `sketch(sceneOrNode, options)` does it to plain data for `toSVG`. Seeded, so the server and the client draw the same lines; ids, labels, focus rings and events keep working. **Its own entry, client-only** (render `Sketch` from a `'use client'` file), not in the barrel above ([drawing guide](https://github.com/softistx/nxgt-material/blob/develop/packages/material/docs/guides/drawing.md#sketch)) |
|
|
303
305
|
| `@softistx/material/map` | `MapView` (markers as buttons, or as clustered GL symbols above `glThreshold` markers, 500 by default, with `render`: `auto` (default), `dom` or `gl`, where `gl` ignores `icon` and `renderMarker`; in GL mode "View data" replaces "List"), `MapLayer` (GeoJSON points, lines and polygons in a tone, `type="choropleth"` regions in classes or categories, or `type="heatmap"` density of points (`weight`, `radius`, `intensity`, `tone` / `color`, `pointsFrom`), with hover, selection, a popup and a "View data" list), `MapLegend` (the legend of a data layer, steps or gradient, also standalone), `MapRoute` (a LineString or MultiLineString you supply, drawn with direction arrows, start and end markers and numbered keyboard-reachable stops, a travelled part (`progress`)), `MapTracked` (objects your app moves, fed from any transport: they glide to each new position over `glideDuration` ms, turn with their `heading`, keep a bounded `trail`, show a `status` by text and tone, and can be followed by the camera until a gesture), `MapExplorer` (a list synced with the map, a bottom sheet on a phone), `LocationField` / `LocationFormField` (address search, "My position", a draggable pin), `configureMap`, `useGeolocation`, and `captureMap(options?)` on the view's `ref` (a PNG `Blob` or data URL with its attribution, for print and export; options type `MapCaptureOptions`): a MapLibre GL map with Calm, Streets and Tinted presets coloured from your theme, on keyless OpenFreeMap tiles — **its own entry, not in the barrel; safe to import on a server (a preview renders there), MapLibre loads in the browser** ([maps guide](https://github.com/softistx/nxgt-material/blob/develop/packages/material/docs/guides/maps.md)) |
|
|
304
306
|
| `@softistx/material/map-static` | `StaticMap`: a map as an image from a `StaticMapSource` you plug (`@softistx/material-core/map-static`; no renderer is bundled; a URL template's values are URL-encoded and points are `lat,lng`, a source of your own takes another format), with its attribution, and a preview drawn as SVG without tiles when there is no source or the image fails, named by an `alt` that says the centre and the places; for lists, documents and print — **its own entry; safe to import on a server, no MapLibre** ([maps guide](https://github.com/softistx/nxgt-material/blob/develop/packages/material/docs/guides/maps.md#static-maps-and-capture)) |
|
|
307
|
+
| `@softistx/material/capture` | `canCaptureScreen()` and `captureScreen({ maskText?, unmaskSelector?, type?, quality? })` (one frame of the screen as a `Blob`, with opaque boxes burned over text and field values for `maskText`; `CaptureScreenError`), the engines `captureElement`, `captureRegion` and `getCaptureEngine` (a DOM engine that loads the optional `@zumer/snapdom` peer only when it captures, or the browser's own screen capture), the modes `captureMode`, `captureVisible`, `captureFullPage`, `pickElement` (also from the keyboard) and `countdown`, and the canvas and rect helpers; **a lean entry, no React, safe to import on a server** ([capture guide](https://github.com/softistx/nxgt-material/blob/develop/packages/material/docs/guides/capture.md)) |
|
|
308
|
+
| `@softistx/material/capture-toolbar` | `ScreenCaptureToolbar` (a floating tinted pill: mode chips for the visible area, a region, an element, the full page and a system window, a timer menu of 3, 5 or 10 s, a round Capture button; `onCapture({ blob, mode, edited })`, `modes`, `position`, an opt-in `shortcut`, and `edit` (on by default): the capture opens in the markup editor, with floating tools, Crop and numbered step markers, and Done returns the edited image; `outputs` adds a row after the capture to Copy, Download (PNG, WebP or JPEG with a quality), Share and Upload through a `FileSource`, each only where configured or supported), `useScreenCapture` (the same, headless; `edit`, `review`, `CaptureEditor`, `CaptureOutputs`), the output helpers `encodeCapture`, `copyCapture`, `downloadCapture`, `shareCapture`, `uploadCapture`, `canCopyCapture`, `canShareCapture`, `captureFileName`, the `CaptureFormat` type and `CaptureOutputError`, and `RegionOverlay` (draw or snap an area, eight handles, a size readout, a loupe, keyboard and touch), and element mode from the keyboard (arrow keys, Tab, Enter); the tool's own UI is left out of the image; `material.capture.*` in English and French; it also re-exports `PortalContainerProvider`, `adoptStyles`, `I18nProvider` and `NxgtThemeProvider`; pair it with `@softistx/material/capture-toolbar.css` in a Shadow DOM and wrap it in a `PortalContainerProvider` ([capture guide](https://github.com/softistx/nxgt-material/blob/develop/packages/material/docs/guides/capture.md#the-toolbar-softistxmaterialcapture-toolbar)) |
|
|
305
309
|
| `@softistx/material/map/draw` | drawing on a `MapView` with Terra Draw: `MapDrawProvider` attaches an instance to the map it is in (`useMapDrawContext`, `useMapDraw`), `loadTerraDraw()`, GeoJSON in and out, and `MapDraw`, a floating toolbar of point, line, polygon, rectangle, circle, freehand, select (vertex editing), delete and undo/redo, `modes` to pick the tools, and `MapMeasure`, the distance, area and perimeter of the drawing by locale units with a typed-coordinates keyboard alternative — **its own entry; optional `terra-draw` and `terra-draw-maplibre-gl-adapter` peers, loaded lazily** ([maps guide](https://github.com/softistx/nxgt-material/blob/develop/packages/material/docs/guides/maps.md#drawing-mapdraw)) |
|
|
306
310
|
| `@softistx/material/map/zone-field` | `ZoneField` and `ZoneFormField` (React Hook Form): a form field for a zone, a GeoJSON `Polygon` (or a `MultiPolygon` with `multiple`), drawn on a map with polygon, rectangle, circle and freehand tools or typed as an editable list of latitude/longitude points (the keyboard alternative), with an area and perimeter readout in units by locale and `validateZone` (minimum points, no self-intersection, `maxArea`) — **its own entry, safe to import on a server; same optional `maplibre-gl`, `terra-draw` and `terra-draw-maplibre-gl-adapter` peers, loaded lazily** ([maps guide](https://github.com/softistx/nxgt-material/blob/develop/packages/material/docs/guides/maps.md#a-zone-in-a-form-zonefield)) |
|
|
307
311
|
| `@softistx/material/map/zone-events` | zone events for the objects of a `MapTracked`: `MapZoneEvents` (`onEnter` and `onLeave` as an object crosses a zone from the positions you feed, once per crossing, the zone highlighted in a theme tone and a polite sentence) and `useZoneEvents` (the logic alone) — **its own entry; no peer, safe to import on a server** ([maps guide](https://github.com/softistx/nxgt-material/blob/develop/packages/material/docs/guides/maps.md#zone-events-mapzones)) |
|
|
@@ -834,7 +838,7 @@ createRoot(shadow).render(
|
|
|
834
838
|
);
|
|
835
839
|
```
|
|
836
840
|
|
|
837
|
-
The [embed guide](https://github.com/softistx/nxgt-material/blob/develop/packages/material/docs/guides/embed.md) has the full example, the size and fonts, and a section on the photo editor (`@softistx/material/image-editor`: `ImageMarkupEditor`, `markupTools`, `decode="bitmap"`).
|
|
841
|
+
The [embed guide](https://github.com/softistx/nxgt-material/blob/develop/packages/material/docs/guides/embed.md) has the full example, the size and fonts, and a section on the photo editor (`@softistx/material/image-editor`: `ImageMarkupEditor`, `markupTools`, `crop`, `toolbar`, `decode="bitmap"`).
|
|
838
842
|
|
|
839
843
|
#### Your own utilities in the shadow root
|
|
840
844
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region lib/lib/adopt-styles.ts
|
|
2
|
+
function e(e, r) {
|
|
3
|
+
let i = t.get(e) ?? /* @__PURE__ */ new Map();
|
|
4
|
+
t.set(e, i);
|
|
5
|
+
let a = i.get(r);
|
|
6
|
+
if (a) return a;
|
|
7
|
+
let o = n(e, r), s = () => {
|
|
8
|
+
o(), i.delete(r);
|
|
9
|
+
};
|
|
10
|
+
return i.set(r, s), s;
|
|
11
|
+
}
|
|
12
|
+
var t = /* @__PURE__ */ new WeakMap();
|
|
13
|
+
function n(e, t) {
|
|
14
|
+
let n = new CSSStyleSheet();
|
|
15
|
+
return n.replaceSync(t), e.adoptedStyleSheets = [...e.adoptedStyleSheets, n], () => {
|
|
16
|
+
e.adoptedStyleSheets = e.adoptedStyleSheets.filter((e) => e !== n);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { e as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as e, r as t, s as n, u as r } from "./translator-
|
|
1
|
+
import { l as e, r as t, s as n, u as r } from "./translator-CrIFDzAz.js";
|
|
2
2
|
import { t as i } from "./_baseIsEqual-C6ksIHya.js";
|
|
3
3
|
import { useMemo as a } from "react";
|
|
4
4
|
import { asyncThunkCreator as o, buildCreateSlice as s } from "@reduxjs/toolkit";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
|
-
import { t } from "./use-material-translation-
|
|
3
|
-
import { t as n } from "./icon-button-
|
|
4
|
-
import { B as r, F as i, I as a, J as o, T as s, _ as c, b as l, d as u, l as d, m as f, n as p, o as m, p as h, s as g, t as _, u as v } from "./media-surface-
|
|
2
|
+
import { t } from "./use-material-translation-ZEUtduro.js";
|
|
3
|
+
import { t as n } from "./icon-button-D-gi4Plg.js";
|
|
4
|
+
import { B as r, F as i, I as a, J as o, T as s, _ as c, b as l, d as u, l as d, m as f, n as p, o as m, p as h, s as g, t as _, u as v } from "./media-surface-BJsdNynm.js";
|
|
5
5
|
import { memo as y, useEffect as b, useMemo as x, useRef as S, useState as C } from "react";
|
|
6
6
|
import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
7
7
|
import { Music as D, SkipBack as O, SkipForward as k } from "lucide-react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./audio-player-
|
|
2
|
-
import { t } from "./use-media-viewer-
|
|
1
|
+
import { t as e } from "./audio-player-DMYszRGT.js";
|
|
2
|
+
import { t } from "./use-media-viewer-DViJNx75.js";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
4
|
//#region lib/components/ui/media/audio-player/audio-player-viewer.tsx
|
|
5
5
|
function r(r) {
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
2
|
import { o as t } from "./dist-DVRQkaTK.js";
|
|
3
|
-
import { S as n, _ as r, b as i, g as a, v as o, x as s, y as c } from "./spinner-
|
|
3
|
+
import { S as n, _ as r, b as i, g as a, v as o, x as s, y as c } from "./spinner-DpB6XvJJ.js";
|
|
4
4
|
import { n as l } from "./use-portal-container-DIbEFxRE.js";
|
|
5
5
|
import { a as u } from "./use-inert-others-C2jaI7YC.js";
|
|
6
6
|
import { A as d, C as f, D as p, E as m, O as h, S as g, T as _, _ as v, b as y, f as b, g as x, h as S, k as C, m as w, p as T, r as E, v as D, w as O, x as k, y as A } from "./floating-ui.dom-KkZSW8_E.js";
|
|
7
7
|
import { t as j } from "./label-DyK0TmBd.js";
|
|
8
|
-
import { t as M } from "./button-
|
|
8
|
+
import { t as M } from "./button-RsWgka2v.js";
|
|
9
9
|
import { h as N } from "./get-CTzJAwfc.js";
|
|
10
|
-
import { t as P } from "./use-material-translation-
|
|
10
|
+
import { t as P } from "./use-material-translation-ZEUtduro.js";
|
|
11
11
|
import { t as F } from "./option-item-classes-CO7nfu0n.js";
|
|
12
12
|
import { t as I } from "./option-mark-DtabAxhq.js";
|
|
13
13
|
import { n as L } from "./field-blur-context-DRjpIam5.js";
|
|
14
14
|
import { t as R } from "./helper-text-BUgvZUy4.js";
|
|
15
15
|
import { a as ee, n as z, r as te, t as ne } from "./use-list-side-BX5K53p6.js";
|
|
16
|
-
import {
|
|
16
|
+
import { n as re, r as ie, t as B } from "./field-box-BXN-uyrv.js";
|
|
17
17
|
import { t as V } from "./useLatest-C2PnQEeD.js";
|
|
18
18
|
import { t as ae } from "./separator-CAwh2D9n.js";
|
|
19
19
|
import { n as oe, t as se } from "./with-selector-CD2yIRse.js";
|
|
20
20
|
import { t as ce } from "./compose-refs-G4J4kaUA.js";
|
|
21
|
-
import { n as le, r as ue, t as de } from "./chip-
|
|
22
|
-
import { i as fe, n as pe, t as me } from "./input-group-
|
|
23
|
-
import { t as he } from "./empty-state-
|
|
21
|
+
import { n as le, r as ue, t as de } from "./chip-tyDM0lpO.js";
|
|
22
|
+
import { i as fe, n as pe, t as me } from "./input-group-Bb8sAFRF.js";
|
|
23
|
+
import { t as he } from "./empty-state-BylD7RYH.js";
|
|
24
24
|
import { t as ge } from "./option-list-loading-DgP76WRu.js";
|
|
25
25
|
import * as H from "react";
|
|
26
26
|
import { createContext as _e, createElement as ve, useCallback as ye, useContext as be, useEffect as xe, useId as Se, useLayoutEffect as Ce, useMemo as we, useRef as Te, useState as Ee } from "react";
|
|
@@ -5464,12 +5464,12 @@ function oc({ className: t, ref: n, children: r, showTrigger: i = !0, showClear:
|
|
|
5464
5464
|
let u = H.useContext(Qs);
|
|
5465
5465
|
return /* @__PURE__ */ Oe(qs, {
|
|
5466
5466
|
"data-slot": "combobox-chips",
|
|
5467
|
-
...
|
|
5467
|
+
...ie({
|
|
5468
5468
|
list: rc(),
|
|
5469
5469
|
disabled: o
|
|
5470
5470
|
}),
|
|
5471
5471
|
ref: ce(n, u ?? void 0),
|
|
5472
|
-
className: e(
|
|
5472
|
+
className: e(B, "flex min-h-11 w-full items-start gap-1.5 py-1.5 ps-2 pe-1.5 text-base md:text-sm", t),
|
|
5473
5473
|
...l,
|
|
5474
5474
|
children: [/* @__PURE__ */ U("span", {
|
|
5475
5475
|
"data-slot": "combobox-chips-values",
|
|
@@ -5559,7 +5559,7 @@ function mc({ className: n, side: r = "bottom", sideOffset: i, align: a = "start
|
|
|
5559
5559
|
ref: g ? _ : f,
|
|
5560
5560
|
"data-slot": "combobox-content",
|
|
5561
5561
|
"data-chips": !!s,
|
|
5562
|
-
className: e("group/combobox-content pointer-events-auto relative max-h-96 w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width))] origin-(--transform-origin) overflow-hidden bg-popover text-popover-foreground duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-closed:pointer-events-none data-ending-style:pointer-events-none", uc, d && "data-closed:hidden", g ?
|
|
5562
|
+
className: e("group/combobox-content pointer-events-auto relative max-h-96 w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width))] origin-(--transform-origin) overflow-hidden bg-popover text-popover-foreground duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-closed:pointer-events-none data-ending-style:pointer-events-none", uc, d && "data-closed:hidden", g ? re : "rounded shadow-md ring-1 ring-foreground/10", n),
|
|
5563
5563
|
...p
|
|
5564
5564
|
})
|
|
5565
5565
|
})
|
|
@@ -5598,7 +5598,7 @@ function vc({ className: t, children: n, disabled: r = !1, showTrigger: i = !0,
|
|
|
5598
5598
|
let f = H.useContext(Qs), p = rc();
|
|
5599
5599
|
return /* @__PURE__ */ Oe(me, {
|
|
5600
5600
|
ref: ce(u, f ?? void 0),
|
|
5601
|
-
...
|
|
5601
|
+
...ie({
|
|
5602
5602
|
size: o,
|
|
5603
5603
|
list: p
|
|
5604
5604
|
}),
|
|
@@ -3,7 +3,7 @@ import { t } from "./utils-BLfntITJ.js";
|
|
|
3
3
|
import { t as n } from "./shape-DydxpoXq.js";
|
|
4
4
|
import { a as r, r as i } from "./dist-BpL4VNX6.js";
|
|
5
5
|
import { n as a, t as o } from "./dist-xkPAZeNa.js";
|
|
6
|
-
import { t as s } from "./use-material-translation-
|
|
6
|
+
import { t as s } from "./use-material-translation-ZEUtduro.js";
|
|
7
7
|
import * as c from "react";
|
|
8
8
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
9
9
|
//#region ../../node_modules/@radix-ui/react-avatar/dist/index.mjs
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var e = /* @__PURE__ */ new Set([
|
|
2
|
+
"checkbox",
|
|
3
|
+
"radio",
|
|
4
|
+
"file",
|
|
5
|
+
"range",
|
|
6
|
+
"color",
|
|
7
|
+
"hidden",
|
|
8
|
+
"button",
|
|
9
|
+
"submit",
|
|
10
|
+
"reset",
|
|
11
|
+
"image"
|
|
12
|
+
]);
|
|
13
|
+
function t(t, n = "text") {
|
|
14
|
+
return t || (e.has(n) ? void 0 : " ");
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { t };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
2
|
import { n as t, t as n } from "./dist-DVRQkaTK.js";
|
|
3
3
|
import { a as r, i, n as a } from "./dist-BpL4VNX6.js";
|
|
4
|
-
import { i as o, t as s } from "./spinner-
|
|
4
|
+
import { i as o, t as s } from "./spinner-DpB6XvJJ.js";
|
|
5
5
|
import { n as c } from "./dist-xkPAZeNa.js";
|
|
6
6
|
import { n as l } from "./use-portal-container-DIbEFxRE.js";
|
|
7
7
|
import { i as u, r as d, t as f } from "./use-inert-others-C2jaI7YC.js";
|
|
8
|
-
import { A as p, B as m, D as h, E as g, F as _, I as v, L as y, M as b, N as ee, O as x, P as S, R as C, T as w, h as te, j as ne, k as re, m as ie, p as ae, z as oe } from "./dropdown-menu-
|
|
8
|
+
import { A as p, B as m, D as h, E as g, F as _, I as v, L as y, M as b, N as ee, O as x, P as S, R as C, T as w, h as te, j as ne, k as re, m as ie, p as ae, z as oe } from "./dropdown-menu-D-PRbHaP.js";
|
|
9
9
|
import { t as se } from "./icon--cTIDybi.js";
|
|
10
10
|
import { n as ce } from "./link-component-provider-BTes-PfF.js";
|
|
11
|
-
import { o as le, t as ue } from "./button-
|
|
12
|
-
import { t as T } from "./use-material-translation-
|
|
13
|
-
import { t as de } from "./icon-button-
|
|
11
|
+
import { o as le, t as ue } from "./button-RsWgka2v.js";
|
|
12
|
+
import { t as T } from "./use-material-translation-ZEUtduro.js";
|
|
13
|
+
import { t as de } from "./icon-button-D-gi4Plg.js";
|
|
14
14
|
import { t as fe } from "./use-ssr-media-query-BSBGww0x.js";
|
|
15
15
|
import { a as pe, s as E } from "./option-item-classes-CO7nfu0n.js";
|
|
16
16
|
import { t as D } from "./option-mark-DtabAxhq.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
2
|
import { n as t, t as n } from "./dist-DVRQkaTK.js";
|
|
3
3
|
import { t as r } from "./dist-BpL4VNX6.js";
|
|
4
|
-
import { i, r as a, t as o } from "./spinner-
|
|
4
|
+
import { i, r as a, t as o } from "./spinner-DpB6XvJJ.js";
|
|
5
5
|
import { t as s } from "./icon-context-ocOSLVYr.js";
|
|
6
6
|
import { t as c } from "./is-production-GLw59WU8.js";
|
|
7
7
|
import { t as l } from "./button-group-context-CaP0X5p_.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
|
-
import { D as t, c as n, n as r, t as i } from "./tabs-root-
|
|
3
|
-
import { t as a } from "./button-
|
|
4
|
-
import { t as o } from "./use-material-translation-
|
|
5
|
-
import { t as s } from "./icon-button-
|
|
2
|
+
import { D as t, c as n, n as r, t as i } from "./tabs-root-C2n3K_Yv.js";
|
|
3
|
+
import { t as a } from "./button-RsWgka2v.js";
|
|
4
|
+
import { t as o } from "./use-material-translation-ZEUtduro.js";
|
|
5
|
+
import { t as s } from "./icon-button-D-gi4Plg.js";
|
|
6
6
|
import { t as c } from "./copy-to-clipboard-Be5Ffvs_.js";
|
|
7
7
|
import { t as l } from "./live-status-BGPaN8r8.js";
|
|
8
8
|
import { n as u } from "./use-slice-reducer-BGkeGtML.js";
|
|
9
9
|
import { t as d } from "./skeleton-DSdtr2qc.js";
|
|
10
10
|
import { n as f, t as p } from "./calculator-context-BugcKuVG.js";
|
|
11
11
|
import { a as m, c as h, i as g, l as _, n as v, o as y, r as b, s as ee } from "./calculator-announce-2-evm09M.js";
|
|
12
|
-
import { i as x, t as te } from "./pos-types-
|
|
13
|
-
import { n as ne, t as re } from "./use-calculator-keyboard-
|
|
12
|
+
import { i as x, t as te } from "./pos-types-BPPae99i.js";
|
|
13
|
+
import { n as ne, t as re } from "./use-calculator-keyboard-BWkYuIw5.js";
|
|
14
14
|
import { i as ie, n as ae } from "./key-layout-D2goCDkD.js";
|
|
15
15
|
import { t as oe } from "./standard-layout-DTr9yy8Z.js";
|
|
16
16
|
import { n as S, r as se, t as C } from "./programmer-word-CNCF7DJF.js";
|
|
@@ -118,11 +118,11 @@ function Ee({ helpId: e }) {
|
|
|
118
118
|
//#endregion
|
|
119
119
|
//#region lib/components/ui/widgets/calculator/variants/variant-loader.ts
|
|
120
120
|
var De = {
|
|
121
|
-
scientific: () => import("./scientific-variant-
|
|
122
|
-
pos: () => import("./pos-variant-
|
|
123
|
-
programmer: () => import("./programmer-variant-
|
|
124
|
-
financial: () => import("./financial-variant-
|
|
125
|
-
conversion: () => import("./conversion-variant-
|
|
121
|
+
scientific: () => import("./scientific-variant-DCgApH87.js"),
|
|
122
|
+
pos: () => import("./pos-variant-D6bDUqwV.js"),
|
|
123
|
+
programmer: () => import("./programmer-variant-CDlFE24o.js"),
|
|
124
|
+
financial: () => import("./financial-variant-ljdP0JL4.js"),
|
|
125
|
+
conversion: () => import("./conversion-variant-MWTjnFnG.js")
|
|
126
126
|
}, B = "failed", V = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), U = /* @__PURE__ */ new Set(), W = () => {
|
|
127
127
|
for (let e of U) e();
|
|
128
128
|
};
|
package/dist/calculator-field.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
|
-
import { t } from "./button-
|
|
3
|
-
import { t as n } from "./use-material-translation-
|
|
4
|
-
import { t as r } from "./icon-button-
|
|
5
|
-
import { a as i, i as a, n as o, r as s, t as c } from "./picker-surface-
|
|
6
|
-
import { r as l, t as u } from "./currency-field-
|
|
2
|
+
import { t } from "./button-RsWgka2v.js";
|
|
3
|
+
import { t as n } from "./use-material-translation-ZEUtduro.js";
|
|
4
|
+
import { t as r } from "./icon-button-D-gi4Plg.js";
|
|
5
|
+
import { a as i, i as a, n as o, r as s, t as c } from "./picker-surface-THexE1OU.js";
|
|
6
|
+
import { r as l, t as u } from "./currency-field-Bd9od1Ee.js";
|
|
7
7
|
import { n as d } from "./use-field-blur-QH8hNCj5.js";
|
|
8
8
|
import { t as f } from "./field-blur-B1VG5x7c.js";
|
|
9
|
-
import { t as p } from "./calculator-
|
|
9
|
+
import { t as p } from "./calculator-DPHCuAZy.js";
|
|
10
10
|
import { useId 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 { Calculator as y } from "lucide-react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./use-material-translation-
|
|
1
|
+
import { t as e } from "./use-material-translation-ZEUtduro.js";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
3
|
//#region lib/components/ui/widgets/calculator/partials/calculator-segment.tsx
|
|
4
4
|
function n({ label: n, choices: r, value: i, nameKey: a, onChange: o }) {
|
package/dist/calculator.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./calculator-
|
|
1
|
+
import { n as e, t } from "./calculator-DPHCuAZy.js";
|
|
2
2
|
export { e as CALCULATOR_VARIANTS, t as Calculator };
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
//#region lib/capture/mask-text.ts
|
|
2
|
+
var e = "[data-capture-unmask]", t = /* @__PURE__ */ new Set([
|
|
3
|
+
"SCRIPT",
|
|
4
|
+
"STYLE",
|
|
5
|
+
"NOSCRIPT",
|
|
6
|
+
"TEMPLATE"
|
|
7
|
+
]), n = /* @__PURE__ */ new Set([
|
|
8
|
+
"checkbox",
|
|
9
|
+
"radio",
|
|
10
|
+
"button",
|
|
11
|
+
"submit",
|
|
12
|
+
"reset",
|
|
13
|
+
"image",
|
|
14
|
+
"hidden",
|
|
15
|
+
"range",
|
|
16
|
+
"color"
|
|
17
|
+
]), r = 1;
|
|
18
|
+
function i(e, t) {
|
|
19
|
+
t.width <= 0 || t.height <= 0 || e.push({
|
|
20
|
+
x: t.left - r,
|
|
21
|
+
y: t.top - r,
|
|
22
|
+
w: t.width + 2 * r,
|
|
23
|
+
h: t.height + 2 * r
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function a(e) {
|
|
27
|
+
return e instanceof HTMLSelectElement ? !0 : e instanceof HTMLTextAreaElement ? e.value !== "" || e.placeholder !== "" : e instanceof HTMLInputElement ? e.type === "file" ? (e.files?.length ?? 0) > 0 : n.has(e.type) ? !1 : e.value !== "" || e.placeholder !== "" : !1;
|
|
28
|
+
}
|
|
29
|
+
function o(e, t) {
|
|
30
|
+
if (!e.data.trim()) return;
|
|
31
|
+
let n = e.ownerDocument.createRange();
|
|
32
|
+
n.selectNodeContents(e);
|
|
33
|
+
for (let e of Array.from(n.getClientRects())) i(t, e);
|
|
34
|
+
n.detach();
|
|
35
|
+
}
|
|
36
|
+
function s(e, n, r) {
|
|
37
|
+
if (e.nodeType === Node.TEXT_NODE) {
|
|
38
|
+
o(e, r);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
if (!(!(e instanceof Element) && !(e instanceof ShadowRoot))) {
|
|
42
|
+
if (e instanceof Element) {
|
|
43
|
+
if (t.has(e.tagName.toUpperCase()) || n && e.matches(n)) return;
|
|
44
|
+
if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement) {
|
|
45
|
+
a(e) && i(r, e.getBoundingClientRect());
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
e.shadowRoot && s(e.shadowRoot, n, r);
|
|
49
|
+
}
|
|
50
|
+
for (let t of Array.from(e.childNodes)) s(t, n, r);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function c(t, n = e) {
|
|
54
|
+
let r = [];
|
|
55
|
+
return s(t, n, r), r;
|
|
56
|
+
}
|
|
57
|
+
function l(e, t, n, r) {
|
|
58
|
+
e.save(), e.globalAlpha = 1, e.globalCompositeOperation = "source-over", e.fillStyle = "#000000";
|
|
59
|
+
for (let i of t) {
|
|
60
|
+
let t = Math.floor(i.x * n), a = Math.floor(i.y * r), o = Math.ceil((i.x + i.w) * n), s = Math.ceil((i.y + i.h) * r);
|
|
61
|
+
e.fillRect(t, a, o - t, s - a);
|
|
62
|
+
}
|
|
63
|
+
e.restore();
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region lib/capture/engine/rect.ts
|
|
67
|
+
function u(e) {
|
|
68
|
+
return !(e.w > 0 && e.h > 0) || ![
|
|
69
|
+
e.x,
|
|
70
|
+
e.y,
|
|
71
|
+
e.w,
|
|
72
|
+
e.h
|
|
73
|
+
].every(Number.isFinite);
|
|
74
|
+
}
|
|
75
|
+
function d(e, t) {
|
|
76
|
+
return {
|
|
77
|
+
x: Math.min(e.x, t.x),
|
|
78
|
+
y: Math.min(e.y, t.y),
|
|
79
|
+
w: Math.abs(e.x - t.x),
|
|
80
|
+
h: Math.abs(e.y - t.y)
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function f(e, t) {
|
|
84
|
+
let n = Math.max(e.x, t.x), r = Math.max(e.y, t.y), i = Math.min(e.x + e.w, t.x + t.w), a = Math.min(e.y + e.h, t.y + t.h);
|
|
85
|
+
return i > n && a > r ? {
|
|
86
|
+
x: n,
|
|
87
|
+
y: r,
|
|
88
|
+
w: i - n,
|
|
89
|
+
h: a - r
|
|
90
|
+
} : null;
|
|
91
|
+
}
|
|
92
|
+
function p(e, t) {
|
|
93
|
+
return {
|
|
94
|
+
x: e.x - t.x,
|
|
95
|
+
y: e.y - t.y,
|
|
96
|
+
w: e.w,
|
|
97
|
+
h: e.h
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
function m(e, t, n, r) {
|
|
101
|
+
let i = Math.max(0, Math.floor(e.x * t)), a = Math.max(0, Math.floor(e.y * n)), o = Math.min(r.width, Math.ceil((e.x + e.w) * t)), s = Math.min(r.height, Math.ceil((e.y + e.h) * n));
|
|
102
|
+
return o > i && s > a ? {
|
|
103
|
+
x: i,
|
|
104
|
+
y: a,
|
|
105
|
+
w: o - i,
|
|
106
|
+
h: s - a
|
|
107
|
+
} : null;
|
|
108
|
+
}
|
|
109
|
+
//#endregion
|
|
110
|
+
//#region lib/capture/engine/types.ts
|
|
111
|
+
var h = class extends Error {
|
|
112
|
+
code;
|
|
113
|
+
constructor(e, t, n) {
|
|
114
|
+
super(t), n !== void 0 && (this.cause = n), this.name = "CaptureEngineError", this.code = e;
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region lib/capture/engine/canvas.ts
|
|
119
|
+
function g(e, t) {
|
|
120
|
+
let n = document.createElement("canvas");
|
|
121
|
+
return n.width = e, n.height = t, n;
|
|
122
|
+
}
|
|
123
|
+
function _(e) {
|
|
124
|
+
let t = e.getContext("2d");
|
|
125
|
+
if (!t) throw new h("failed", "No 2D canvas");
|
|
126
|
+
return t;
|
|
127
|
+
}
|
|
128
|
+
function v(e, t, n, r = n) {
|
|
129
|
+
let i = m(t, n, r, e);
|
|
130
|
+
if (!i) throw new h("invalid-target", "The region is outside the image");
|
|
131
|
+
let a = g(i.w, i.h);
|
|
132
|
+
return _(a).drawImage(e, i.x, i.y, i.w, i.h, 0, 0, i.w, i.h), a;
|
|
133
|
+
}
|
|
134
|
+
function y(e, t, n, r = n) {
|
|
135
|
+
t.length && l(_(e), t, n, r);
|
|
136
|
+
}
|
|
137
|
+
function b(e, t = "image/png", n) {
|
|
138
|
+
return new Promise((r, i) => e.toBlob((e) => e ? r(e) : i(new h("failed", "The image was not encoded")), t, n));
|
|
139
|
+
}
|
|
140
|
+
function x(e) {
|
|
141
|
+
return createImageBitmap(e);
|
|
142
|
+
}
|
|
143
|
+
//#endregion
|
|
144
|
+
export { v as a, f as c, p as d, e as f, _ as i, u as l, c as m, x as n, g as o, l as p, b as r, h as s, y as t, d as u };
|