@cloudparse/up-miniapps-sdk 0.5.3 → 0.5.4

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/dist/index.cjs CHANGED
@@ -3499,7 +3499,7 @@ var RoutingService = {
3499
3499
  };
3500
3500
 
3501
3501
  // package.json
3502
- var version = "0.5.3";
3502
+ var version = "0.5.4";
3503
3503
 
3504
3504
  // src/sdk.ts
3505
3505
  function deepFreeze(obj) {
@@ -3608,6 +3608,20 @@ var MiniAppSDK = class {
3608
3608
  return this.bridge.send("REQUEST_PERMISSION", { fields, type });
3609
3609
  })
3610
3610
  });
3611
+ /**
3612
+ * Media & Gallery integration.
3613
+ */
3614
+ media = Object.freeze({
3615
+ /**
3616
+ * Saves a base64-encoded image to the device's photo gallery via the Host Shell.
3617
+ * A plain browser `<a download>` does not work inside the native WebView (no
3618
+ * download manager is wired up) — this is the only way to persist an image
3619
+ * generated inside a Mini-App (e.g. a QR code) to the device.
3620
+ * @param base64 Base64-encoded image data, with or without the `data:image/...;base64,` prefix.
3621
+ * @param filename Suggested filename (without extension).
3622
+ */
3623
+ saveImage: (base64, filename) => this.bridge.send("SAVE_IMAGE", { base64, filename })
3624
+ });
3611
3625
  /**
3612
3626
  * Payments integration.
3613
3627
  */