@dimina-kit/devtools 0.4.0-dev.20260728110120 → 0.4.0-dev.20260729062524

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.
@@ -539,32 +539,6 @@ function compressImage({ src, quality = 80, success, fail, complete }) {
539
539
  };
540
540
  img.src = src;
541
541
  }
542
- function saveCanvasTempFile({ dataURL, success, fail, complete }) {
543
- const { onSuccess, onFail, onComplete } = bindCallbacks(this, { success, fail, complete });
544
- if (!dataURL) {
545
- onFail?.({ errMsg: "canvasToTempFilePath:fail missing dataURL" });
546
- onComplete?.();
547
- return;
548
- }
549
- const match = /^data:([^;]+);base64,(.+)$/.exec(dataURL);
550
- if (!match) {
551
- onFail?.({ errMsg: "canvasToTempFilePath:fail invalid data URL" });
552
- onComplete?.();
553
- return;
554
- }
555
- try {
556
- const mimeType = match[1];
557
- const raw = atob(match[2]);
558
- const bytes = new Uint8Array(raw.length);
559
- for (let i = 0; i < raw.length; i++) bytes[i] = raw.charCodeAt(i);
560
- const blob = new Blob([bytes], { type: mimeType });
561
- const tempFilePath = createTempFilePath(blob);
562
- onSuccess?.({ tempFilePath, errMsg: "canvasToTempFilePath:ok" });
563
- } catch (error) {
564
- onFail?.({ errMsg: `canvasToTempFilePath:fail ${error.message}` });
565
- }
566
- onComplete?.();
567
- }
568
542
  function saveImageToPhotosAlbum({ filePath, success, fail, complete }) {
569
543
  const { onSuccess, onFail, onComplete } = bindCallbacks(this, { success, fail, complete });
570
544
  try {
@@ -1722,72 +1696,6 @@ function showActionSheet(opts = {}) {
1722
1696
  }
1723
1697
  });
1724
1698
  }
1725
- function share(opts = {}) {
1726
- const { onSuccess, onFail, onComplete } = bindCallbacks(this, opts);
1727
- let settled = false;
1728
- const shareType = opts.type === "image" ? "image" : "link";
1729
- uiOverlayBus.showDialog({
1730
- kind: "share",
1731
- type: shareType,
1732
- title: opts.title ?? "",
1733
- desc: opts.desc ?? "",
1734
- url: opts.url ?? "",
1735
- cover: opts.cover ?? "",
1736
- image: opts.image ?? "",
1737
- onSelect: (index) => {
1738
- if (settled) return;
1739
- settled = true;
1740
- uiOverlayBus.hideDialog();
1741
- if (index === -1) {
1742
- onFail?.({ errMsg: "share:fail cancel" });
1743
- } else {
1744
- onSuccess?.({ errMsg: "share:ok" });
1745
- }
1746
- onComplete?.();
1747
- }
1748
- });
1749
- }
1750
- function openPost(opts = {}) {
1751
- const { onSuccess, onFail, onComplete } = bindCallbacks(this, opts);
1752
- let settled = false;
1753
- uiOverlayBus.showDialog({
1754
- kind: "openPost",
1755
- islandName: opts.islandName ?? "",
1756
- islandImage: opts.islandImage ?? "",
1757
- onResult: (confirmed) => {
1758
- if (settled) return;
1759
- settled = true;
1760
- uiOverlayBus.hideDialog();
1761
- if (confirmed) {
1762
- onSuccess?.({ islandId: opts.islandId ?? "", errMsg: "openPost:ok" });
1763
- } else {
1764
- onFail?.({ errMsg: "openPost:fail cancel" });
1765
- }
1766
- onComplete?.();
1767
- }
1768
- });
1769
- }
1770
- function joinIsland(opts = {}) {
1771
- const { onSuccess, onFail, onComplete } = bindCallbacks(this, opts);
1772
- let settled = false;
1773
- uiOverlayBus.showDialog({
1774
- kind: "halfSheet",
1775
- islandName: opts.islandName ?? "Mock Island",
1776
- islandAvatar: opts.islandAvatar ?? "",
1777
- memberCount: opts.memberCount ?? "128",
1778
- onResult: (confirmed) => {
1779
- if (settled) return;
1780
- settled = true;
1781
- uiOverlayBus.hideDialog();
1782
- if (confirmed) {
1783
- onSuccess?.({ errMsg: "joinIsland:ok" });
1784
- } else {
1785
- onFail?.({ errMsg: "joinIsland:fail cancel" });
1786
- }
1787
- onComplete?.();
1788
- }
1789
- });
1790
- }
1791
1699
 
1792
1700
  // src/simulator/simulator-api.ts
1793
1701
  function canIUse({ success, complete }) {
@@ -1914,9 +1822,6 @@ var simulatorApis = {
1914
1822
  hideLoading,
1915
1823
  showModal,
1916
1824
  showActionSheet,
1917
- share,
1918
- openPost,
1919
- joinIsland,
1920
1825
  // Network
1921
1826
  downloadFile,
1922
1827
  uploadFile,
@@ -1951,7 +1856,6 @@ var simulatorApis = {
1951
1856
  chooseImage,
1952
1857
  previewImage,
1953
1858
  compressImage,
1954
- saveCanvasTempFile,
1955
1859
  saveImageToPhotosAlbum,
1956
1860
  getImageInfo,
1957
1861
  // Media: Video