peachsim 0.1.2471 → 0.1.2472
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/cli/catalog/meta.ts +5 -0
- package/cli/internal-child-contract.ts +6 -0
- package/cli/internal-child.ts +38 -6
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +2 -2
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +5 -5
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +3 -3
- package/dist-lib/bundle-channel.cjs +21 -28
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +3 -3
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +3 -3
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +2 -2
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +7 -7
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +5 -5
- package/dist-lib/detox/index.cjs +2 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/esm-chunks/{acorn-SPB3XIZL.mjs → acorn-QIMLXJTI.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-FD2YXUSF.mjs → chunk-45VKM7N5.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-GH5CVSUV.mjs → chunk-4TLFZLBT.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-FBMOHCA6.mjs → chunk-4YR6CPOD.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-AQOQVXJ6.mjs → chunk-57KHHRE4.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-NPWFUWK7.mjs → chunk-BERSJG2N.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-GAIO63UI.mjs → chunk-BLJMIS4D.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-36XXBAOZ.mjs → chunk-BQ7AFT33.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-PYJSA7I6.mjs → chunk-CIRUDWWA.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-LBYHNL4Y.mjs → chunk-DBL2SPLB.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-LYDOPEBO.mjs → chunk-GJI5PS7F.mjs} +11 -11
- package/dist-lib/esm-chunks/{chunk-IHURNHG6.mjs → chunk-I4NQBHWT.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-QPYS2KN6.mjs → chunk-KY5MCRDQ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-UFL4EVBK.mjs → chunk-LODJ5JY3.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-M2RQMFY6.mjs → chunk-MER2MOVT.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-DPIPUFHI.mjs → chunk-NOIPV2UU.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-MQFECF27.mjs → chunk-NQ4WLOZ2.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-2MCZICO7.mjs → chunk-STZKGNIY.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-CJ32VJRI.mjs → chunk-TBT2N4IT.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-JR3HW7JO.mjs → chunk-WLK6TCKI.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-LNKA7KWU.mjs → chunk-ZSITGCQ4.mjs} +1 -1
- package/dist-lib/esm-chunks/{metro-layout-parser-AFD6SXWJ.mjs → metro-layout-parser-3LHDZADO.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-SD73WIK2.mjs → swift-package-prebuilt-3L57A5BV.mjs} +9 -9
- package/dist-lib/esm-chunks/{swift-sdk-app-module-RMAM2IZO.mjs → swift-sdk-app-module-IOLCLSPU.mjs} +12 -12
- package/dist-lib/esm-chunks/{swift-sdk-image-6LMFQKBB.mjs → swift-sdk-image-BDVQHA62.mjs} +12 -12
- package/dist-lib/expo-swift-bundle.cjs +19 -26
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +7 -7
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +21 -28
- package/dist-lib/host/fetch-proxy-handler.cjs +4 -4
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +3 -3
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +3 -3
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +4 -4
- package/dist-lib/native-app-identity-project.cjs +1 -1
- package/dist-lib/native-app-identity-project.mjs +14 -14
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +6 -6
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +3 -3
- package/dist-lib/pdfium-raster.cjs +33 -25
- package/dist-lib/pdfium-raster.mjs +32 -25
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +3 -3
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +75 -75
- package/dist-lib/public-origins-lib.json +69 -69
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +2 -2
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +7 -7
- package/dist-lib/skills.cjs +26 -28
- package/dist-lib/swift-compile.cjs +1 -1
- package/dist-lib/swift-compile.mjs +9 -9
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +3 -3
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +5 -5
- package/dist-lib/swift-svg-raster.cjs +1 -1
- package/dist-lib/swift-svg-raster.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
- package/dist-lib/vendor/@xmldom/xmldom.cjs +1 -1
- package/dist-lib/vendor/acorn.cjs +1 -1
- package/dist-lib/vendor/bplist-parser.cjs +1 -1
- package/dist-lib/vendor/ignore.cjs +1 -1
- package/dist-lib/vendor/magic-string.cjs +1 -1
- package/dist-lib/vendor/plist.cjs +1 -1
- package/dist-lib/vendor/smol-toml.cjs +1 -1
- package/dist-lib/vendor/stream-json.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
- package/dist-lib/vendor/sucrase.cjs +1 -1
- package/dist-lib/vendor/terser.cjs +1 -1
- package/dist-lib/vendor/valibot.cjs +1 -1
- package/dist-lib/vendor/ws.cjs +1 -1
- package/dist-lib/vendor/zod.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +3 -3
- package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/remote-stream/scene-recording.d.ts +1 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/src/pdfium-raster.ts +37 -24
- package/src/swift-pdf-raster.ts +17 -23
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
import {
|
|
3
3
|
isRecord
|
|
4
|
-
} from "./esm-chunks/chunk-
|
|
5
|
-
import "./esm-chunks/chunk-
|
|
4
|
+
} from "./esm-chunks/chunk-ZSITGCQ4.mjs";
|
|
5
|
+
import "./esm-chunks/chunk-STZKGNIY.mjs";
|
|
6
6
|
|
|
7
7
|
// src/metro-fingerprint-registry.ts
|
|
8
8
|
var RNX_METRO_FINGERPRINT_SCHEMA_VERSION = 2;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
import {
|
|
3
3
|
findBundleFooter
|
|
4
|
-
} from "./esm-chunks/chunk-
|
|
5
|
-
import "./esm-chunks/chunk-
|
|
4
|
+
} from "./esm-chunks/chunk-57KHHRE4.mjs";
|
|
5
|
+
import "./esm-chunks/chunk-STZKGNIY.mjs";
|
|
6
6
|
|
|
7
7
|
// src/metro-production-bundle.ts
|
|
8
8
|
var RNXSIM_METRO_MODULE_PATHS_PREFIX = "globalThis.__sootsimModulePaths=";
|
|
@@ -131,7 +131,7 @@ function metroCalls(expression) {
|
|
|
131
131
|
return [];
|
|
132
132
|
}
|
|
133
133
|
async function readRNXMetroBundleLayout(source) {
|
|
134
|
-
const { loadMetroLayoutParser } = await import("./esm-chunks/metro-layout-parser-
|
|
134
|
+
const { loadMetroLayoutParser } = await import("./esm-chunks/metro-layout-parser-3LHDZADO.mjs");
|
|
135
135
|
const MetroLayoutParser = await loadMetroLayoutParser();
|
|
136
136
|
const program = MetroLayoutParser.parse(source, {
|
|
137
137
|
ecmaVersion: "latest",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
import {
|
|
3
3
|
swiftNativePin
|
|
4
|
-
} from "./esm-chunks/chunk-
|
|
5
|
-
import "./esm-chunks/chunk-
|
|
4
|
+
} from "./esm-chunks/chunk-BQ7AFT33.mjs";
|
|
5
|
+
import "./esm-chunks/chunk-BERSJG2N.mjs";
|
|
6
6
|
import {
|
|
7
7
|
NATIVE_GRAPH_SDK_VERSION,
|
|
8
8
|
cacheDir,
|
|
9
9
|
privateSwiftRelease,
|
|
10
10
|
swiftEnvironment,
|
|
11
11
|
swiftToolchainBin
|
|
12
|
-
} from "./esm-chunks/chunk-
|
|
13
|
-
import "./esm-chunks/chunk-
|
|
12
|
+
} from "./esm-chunks/chunk-GJI5PS7F.mjs";
|
|
13
|
+
import "./esm-chunks/chunk-NQ4WLOZ2.mjs";
|
|
14
14
|
import {
|
|
15
15
|
SWIFT_OBJCXX_LANGUAGE_FLAG,
|
|
16
16
|
isSwiftNativeTranslationUnit,
|
|
17
17
|
moduleMapName
|
|
18
|
-
} from "./esm-chunks/chunk-
|
|
18
|
+
} from "./esm-chunks/chunk-BLJMIS4D.mjs";
|
|
19
19
|
import {
|
|
20
20
|
androidMergedResourceValuesDirectory,
|
|
21
21
|
extractNativeAppIdentityFromFiles,
|
|
@@ -33,25 +33,25 @@ import {
|
|
|
33
33
|
xcodeBuildFileBuildsForIos,
|
|
34
34
|
xcodePathResolver,
|
|
35
35
|
xcodeTargetMemberVisitor
|
|
36
|
-
} from "./esm-chunks/chunk-
|
|
37
|
-
import "./esm-chunks/chunk-
|
|
36
|
+
} from "./esm-chunks/chunk-TBT2N4IT.mjs";
|
|
37
|
+
import "./esm-chunks/chunk-4YR6CPOD.mjs";
|
|
38
38
|
import {
|
|
39
39
|
parsePlistSource,
|
|
40
40
|
require_lib,
|
|
41
41
|
require_plist
|
|
42
|
-
} from "./esm-chunks/chunk-
|
|
43
|
-
import "./esm-chunks/chunk-
|
|
44
|
-
import "./esm-chunks/chunk-
|
|
45
|
-
import "./esm-chunks/chunk-
|
|
42
|
+
} from "./esm-chunks/chunk-CIRUDWWA.mjs";
|
|
43
|
+
import "./esm-chunks/chunk-DBL2SPLB.mjs";
|
|
44
|
+
import "./esm-chunks/chunk-MER2MOVT.mjs";
|
|
45
|
+
import "./esm-chunks/chunk-57KHHRE4.mjs";
|
|
46
46
|
import {
|
|
47
47
|
isRecord
|
|
48
|
-
} from "./esm-chunks/chunk-
|
|
48
|
+
} from "./esm-chunks/chunk-ZSITGCQ4.mjs";
|
|
49
49
|
import {
|
|
50
50
|
__commonJS,
|
|
51
51
|
__publicField,
|
|
52
52
|
__require,
|
|
53
53
|
__toESM
|
|
54
|
-
} from "./esm-chunks/chunk-
|
|
54
|
+
} from "./esm-chunks/chunk-STZKGNIY.mjs";
|
|
55
55
|
|
|
56
56
|
// ../../node_modules/big-integer/BigInteger.js
|
|
57
57
|
var require_BigInteger = __commonJS({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
import {
|
|
3
3
|
NATIVE_APP_IDENTITY_HEADER,
|
|
4
4
|
applyNativeAppIdentity,
|
|
@@ -21,11 +21,11 @@ import {
|
|
|
21
21
|
readRootModuleName,
|
|
22
22
|
readSiriEntitlement,
|
|
23
23
|
selectNativeAppIdentityReader
|
|
24
|
-
} from "./esm-chunks/chunk-
|
|
25
|
-
import "./esm-chunks/chunk-
|
|
26
|
-
import "./esm-chunks/chunk-
|
|
27
|
-
import "./esm-chunks/chunk-
|
|
28
|
-
import "./esm-chunks/chunk-
|
|
24
|
+
} from "./esm-chunks/chunk-TBT2N4IT.mjs";
|
|
25
|
+
import "./esm-chunks/chunk-4YR6CPOD.mjs";
|
|
26
|
+
import "./esm-chunks/chunk-57KHHRE4.mjs";
|
|
27
|
+
import "./esm-chunks/chunk-ZSITGCQ4.mjs";
|
|
28
|
+
import "./esm-chunks/chunk-STZKGNIY.mjs";
|
|
29
29
|
export {
|
|
30
30
|
NATIVE_APP_IDENTITY_HEADER,
|
|
31
31
|
applyNativeAppIdentity,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
import {
|
|
3
3
|
findBundleFooter
|
|
4
|
-
} from "./esm-chunks/chunk-
|
|
5
|
-
import "./esm-chunks/chunk-
|
|
4
|
+
} from "./esm-chunks/chunk-57KHHRE4.mjs";
|
|
5
|
+
import "./esm-chunks/chunk-STZKGNIY.mjs";
|
|
6
6
|
|
|
7
7
|
// src/native-firebase-metadata.ts
|
|
8
8
|
var PREFIX = "globalThis.__peachNativeFirebaseConfig=";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -22,7 +22,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
22
22
|
// src/pdfium-raster.ts
|
|
23
23
|
var pdfium_raster_exports = {};
|
|
24
24
|
__export(pdfium_raster_exports, {
|
|
25
|
-
rasterizePdfBytes: () => rasterizePdfBytes
|
|
25
|
+
rasterizePdfBytes: () => rasterizePdfBytes,
|
|
26
|
+
withPdfiumRasterizer: () => withPdfiumRasterizer
|
|
26
27
|
});
|
|
27
28
|
module.exports = __toCommonJS(pdfium_raster_exports);
|
|
28
29
|
var import_inline = require("@hyzyla/pdfium/inline");
|
|
@@ -72,35 +73,42 @@ async function encodeRgbaPng(width, height, rgba) {
|
|
|
72
73
|
}
|
|
73
74
|
return png;
|
|
74
75
|
}
|
|
75
|
-
async function
|
|
76
|
-
const
|
|
76
|
+
async function rasterizePage(library, pdf, scale) {
|
|
77
|
+
const document = await library.loadDocument(pdf);
|
|
77
78
|
try {
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
`pdf page ${size.originalWidth}x${size.originalHeight} is out of range`
|
|
86
|
-
);
|
|
87
|
-
}
|
|
88
|
-
const bitmap = await document.getPage(0).render({
|
|
89
|
-
scale: 1,
|
|
90
|
-
width,
|
|
91
|
-
height,
|
|
92
|
-
render: "bitmap",
|
|
93
|
-
transparent: true
|
|
94
|
-
});
|
|
95
|
-
return await encodeRgbaPng(width, height, bitmap.data);
|
|
96
|
-
} finally {
|
|
97
|
-
document.destroy();
|
|
79
|
+
const size = document.getPage(0).getOriginalSize();
|
|
80
|
+
const width = Math.ceil(size.originalWidth * scale);
|
|
81
|
+
const height = Math.ceil(size.originalHeight * scale);
|
|
82
|
+
if (width <= 0 || height <= 0 || width > 12e3 || height > 12e3) {
|
|
83
|
+
throw new Error(
|
|
84
|
+
`pdf page ${size.originalWidth}x${size.originalHeight} is out of range`
|
|
85
|
+
);
|
|
98
86
|
}
|
|
87
|
+
const bitmap = await document.getPage(0).render({
|
|
88
|
+
scale: 1,
|
|
89
|
+
width,
|
|
90
|
+
height,
|
|
91
|
+
render: "bitmap",
|
|
92
|
+
transparent: true
|
|
93
|
+
});
|
|
94
|
+
return await encodeRgbaPng(width, height, bitmap.data);
|
|
95
|
+
} finally {
|
|
96
|
+
document.destroy();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
async function withPdfiumRasterizer(render) {
|
|
100
|
+
const library = await import_inline.PDFiumLibrary.init({ disableBase64Warning: true });
|
|
101
|
+
try {
|
|
102
|
+
return await render((pdf, scale) => rasterizePage(library, pdf, scale));
|
|
99
103
|
} finally {
|
|
100
104
|
library.destroy();
|
|
101
105
|
}
|
|
102
106
|
}
|
|
107
|
+
function rasterizePdfBytes(pdf, scale) {
|
|
108
|
+
return withPdfiumRasterizer((rasterize) => rasterize(pdf, scale));
|
|
109
|
+
}
|
|
103
110
|
// Annotate the CommonJS export names for ESM import in node:
|
|
104
111
|
0 && (module.exports = {
|
|
105
|
-
rasterizePdfBytes
|
|
112
|
+
rasterizePdfBytes,
|
|
113
|
+
withPdfiumRasterizer
|
|
106
114
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
2
|
-
import "./esm-chunks/chunk-
|
|
1
|
+
/*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
|
+
import "./esm-chunks/chunk-STZKGNIY.mjs";
|
|
3
3
|
|
|
4
4
|
// src/pdfium-raster.ts
|
|
5
5
|
import { PDFiumLibrary } from "@hyzyla/pdfium/inline";
|
|
@@ -49,34 +49,41 @@ async function encodeRgbaPng(width, height, rgba) {
|
|
|
49
49
|
}
|
|
50
50
|
return png;
|
|
51
51
|
}
|
|
52
|
-
async function
|
|
53
|
-
const
|
|
52
|
+
async function rasterizePage(library, pdf, scale) {
|
|
53
|
+
const document = await library.loadDocument(pdf);
|
|
54
54
|
try {
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
`pdf page ${size.originalWidth}x${size.originalHeight} is out of range`
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
const bitmap = await document.getPage(0).render({
|
|
66
|
-
scale: 1,
|
|
67
|
-
width,
|
|
68
|
-
height,
|
|
69
|
-
render: "bitmap",
|
|
70
|
-
transparent: true
|
|
71
|
-
});
|
|
72
|
-
return await encodeRgbaPng(width, height, bitmap.data);
|
|
73
|
-
} finally {
|
|
74
|
-
document.destroy();
|
|
55
|
+
const size = document.getPage(0).getOriginalSize();
|
|
56
|
+
const width = Math.ceil(size.originalWidth * scale);
|
|
57
|
+
const height = Math.ceil(size.originalHeight * scale);
|
|
58
|
+
if (width <= 0 || height <= 0 || width > 12e3 || height > 12e3) {
|
|
59
|
+
throw new Error(
|
|
60
|
+
`pdf page ${size.originalWidth}x${size.originalHeight} is out of range`
|
|
61
|
+
);
|
|
75
62
|
}
|
|
63
|
+
const bitmap = await document.getPage(0).render({
|
|
64
|
+
scale: 1,
|
|
65
|
+
width,
|
|
66
|
+
height,
|
|
67
|
+
render: "bitmap",
|
|
68
|
+
transparent: true
|
|
69
|
+
});
|
|
70
|
+
return await encodeRgbaPng(width, height, bitmap.data);
|
|
71
|
+
} finally {
|
|
72
|
+
document.destroy();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
async function withPdfiumRasterizer(render) {
|
|
76
|
+
const library = await PDFiumLibrary.init({ disableBase64Warning: true });
|
|
77
|
+
try {
|
|
78
|
+
return await render((pdf, scale) => rasterizePage(library, pdf, scale));
|
|
76
79
|
} finally {
|
|
77
80
|
library.destroy();
|
|
78
81
|
}
|
|
79
82
|
}
|
|
83
|
+
function rasterizePdfBytes(pdf, scale) {
|
|
84
|
+
return withPdfiumRasterizer((rasterize) => rasterize(pdf, scale));
|
|
85
|
+
}
|
|
80
86
|
export {
|
|
81
|
-
rasterizePdfBytes
|
|
87
|
+
rasterizePdfBytes,
|
|
88
|
+
withPdfiumRasterizer
|
|
82
89
|
};
|
package/dist-lib/plist.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/plist.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
import {
|
|
3
3
|
parsePlistSource
|
|
4
|
-
} from "./esm-chunks/chunk-
|
|
5
|
-
import "./esm-chunks/chunk-
|
|
4
|
+
} from "./esm-chunks/chunk-CIRUDWWA.mjs";
|
|
5
|
+
import "./esm-chunks/chunk-STZKGNIY.mjs";
|
|
6
6
|
export {
|
|
7
7
|
parsePlistSource
|
|
8
8
|
};
|
package/dist-lib/profiles.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|