@pc-nexus/bridge 0.5.0-next.13 → 0.5.0-next.15

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.
@@ -147,7 +147,8 @@ class NexusRouter {
147
147
  const errorMessage = '"target" is required in router generateUrl.';
148
148
  throw new BridgeAPIError(errorMessage);
149
149
  }
150
- return await NexusBridge.call("routerGenerateUrl", { location });
150
+ const urlString = await NexusBridge.call("routerGenerateUrl", { location });
151
+ return new URL(urlString);
151
152
  }
152
153
  async reload() {
153
154
  await NexusBridge.call("routerReload", {});
@@ -731,9 +732,27 @@ function sha256(buffer) {
731
732
  return result;
732
733
  }
733
734
 
735
+ class NexusRemote {
736
+ async invoke(options) {
737
+ if (!options || typeof options !== "object") {
738
+ throw new BridgeAPIError('"options" must be an object in remote invoke.');
739
+ }
740
+ if (typeof options.path !== "string" || options.path.trim().length === 0) {
741
+ throw new BridgeAPIError('"path" is required and cannot be empty in remote invoke options.');
742
+ }
743
+ if (typeof options.method !== "string" || options.method.trim().length === 0) {
744
+ throw new BridgeAPIError('"method" is required and cannot be empty in remote invoke options.');
745
+ }
746
+ const payload = await buildPayloadByRequestInit(options);
747
+ const { status, headers, body } = await NexusBridge.call("remoteInvoke", payload);
748
+ return parseToResponseData({ status, headers, body });
749
+ }
750
+ }
751
+ const remote = new NexusRemote();
752
+
734
753
  /**
735
754
  * Generated bundle index. Do not edit.
736
755
  */
737
756
 
738
- export { api, dialog, events, i18n, invoke, router, store, view, BridgeAPIError as ɵBridgeAPIError, NexusBridge as ɵNexusBridge };
757
+ export { api, dialog, events, i18n, invoke, remote, router, store, view, BridgeAPIError as ɵBridgeAPIError, NexusBridge as ɵNexusBridge };
739
758
  //# sourceMappingURL=pc-nexus-bridge.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"pc-nexus-bridge.mjs","sources":["../../../../web/bridge/src/window.ts","../../../../web/bridge/src/bridge.ts","../../../../web/bridge/src/error.ts","../../../../web/bridge/src/dialog.ts","../../../../web/bridge/src/invoke.ts","../../../../web/bridge/src/router.ts","../../../../web/bridge/src/view.ts","../../../../web/bridge/src/utils/blob-parser.ts","../../../../web/bridge/src/events.ts","../../../../web/bridge/src/i18n.ts","../../../../web/bridge/src/utils/request.ts","../../../../web/bridge/src/api.ts","../../../../web/bridge/src/store.ts","../../../../web/bridge/src/pc-nexus-bridge.ts"],"sourcesContent":["export type SafeAny = any;\n\nexport function attachObjectToWindow<T>(key: string, value: T) {\n (window as SafeAny)[key] = value;\n}\n\nexport function getObjectFromWindow<T>(key: string) {\n return (window as SafeAny)[key];\n}\n","import { getObjectFromWindow } from \"./window\";\n\ninterface HostMessageEvent<T = unknown> {\n source: Window | null;\n origin: string;\n data: T;\n}\n\ninterface Cancelable {\n cancel: () => void;\n}\n\ninterface GlobalBridge {\n call<T>(name: string, payload?: object | undefined): Promise<T>;\n on<T>(name: string, handler: (event: HostMessageEvent<T>) => void): Cancelable;\n}\n\nfunction getBridge() {\n const bridge = getObjectFromWindow<GlobalBridge>(\"__pc_nexus_bridge__\");\n return bridge;\n}\n\nexport class NexusBridge {\n static getBridgeCall<T>(): (name: string, payload?: object) => Promise<T> {\n if (!getBridge()) {\n throw new Error(`\n Unable to establish a connection with the PingCode nexus bridge.\n If you are trying to run your app locally, Nexus apps only work in the context of PingCode products. Refer to https://developer.pingcode.com for how to tunnel when using a local development server.\n `);\n }\n return getBridge().call;\n }\n\n static async call<T>(name: string, payload?: any): Promise<T> {\n const result = await NexusBridge.getBridgeCall<T>()(name, payload);\n return result as T;\n }\n\n /**\n * 订阅宿主 host 发来的消息。\n * @param name 消息名称\n * @param handler 收到消息时的回调,event 包含 source、origin、data\n * @returns 返回带 cancel() 的对象,调用可取消订阅\n */\n static on<T>(name: string, handler: (event: HostMessageEvent<T>) => void): Cancelable {\n const bridge = getBridge();\n if (!bridge) {\n throw new Error(`\n Unable to establish a connection with the PingCode nexus bridge.\n If you are trying to run your app locally, Nexus apps only work in the context of PingCode products. Refer to https://developer.pingcode.com for how to tunnel when using a local development server.\n `);\n }\n return bridge.on(name, handler);\n }\n}\n","export class BridgeAPIError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"BridgeAPIError\";\n Object.setPrototypeOf(this, BridgeAPIError.prototype);\n }\n}\n\n// 自动注册:所有未 catch 的 Promise rejection 均以 \"Uncaught (in promise)\" 格式输出,无需用户配置\nif (typeof window !== \"undefined\") {\n window.addEventListener(\n \"unhandledrejection\",\n (event: PromiseRejectionEvent) => {\n const reason = event.reason;\n const error = reason instanceof Error ? reason : new Error(String(reason));\n const firstLine = `Uncaught (in promise) ${error.name}: ${error.message}`;\n const stack = error.stack?.replace(/^[^\\n]*\\n?/, \"\").trim() || \"\";\n console.error(stack ? `${firstLine}\\n${stack}` : firstLine);\n event.preventDefault();\n event.stopImmediatePropagation();\n },\n true,\n );\n}\n","import { NexusBridge } from \"./bridge\";\nimport { BridgeAPIError } from \"./error\";\nimport { DialogConfirmOptions, DialogOptions, DialogRef } from \"./models\";\n\nfunction validateOpenOptions(options: DialogOptions) {\n if (typeof options !== \"object\" || options === null) {\n throw new BridgeAPIError('\"options\" must be an object in dialog open.');\n }\n if (!options.resource) {\n throw new BridgeAPIError('\"resource\" is required in dialog open options.');\n }\n}\n\nfunction validateConfirmOptions(options: DialogConfirmOptions) {\n if (typeof options !== \"object\" || options === null) {\n throw new BridgeAPIError('\"options\" must be an object in dialog confirm.');\n }\n if (!options.content) {\n throw new BridgeAPIError('\"content\" is required in dialog confirm options.');\n }\n if (typeof options.onConfirm !== \"function\") {\n throw new BridgeAPIError('\"onConfirm\" must be a function in dialog confirm options.');\n }\n}\n\nclass NexusDialog {\n async open<T>(options: DialogOptions): Promise<DialogRef<T>> {\n validateOpenOptions(options);\n return await NexusBridge.call<DialogRef<T>>(\"openDialog\", options);\n }\n\n async confirm<T>(options: DialogConfirmOptions): Promise<void> {\n validateConfirmOptions(options);\n return await NexusBridge.call<void>(\"confirm\", options);\n }\n}\n\nexport const dialog = new NexusDialog();\n","import { NexusBridge } from \"./bridge\";\nimport { BridgeAPIError } from \"./error\";\nimport { InvokeFunctionParams } from \"./models\";\nimport { getObjectFromWindow } from \"./window\";\n\nfunction validatePayload<TPayload>(payload?: TPayload) {\n if (!payload) {\n return;\n }\n if (Object.values(payload).some((value) => typeof value === \"function\")) {\n throw new BridgeAPIError(\"Passing functions as part of the payload in invoke is not supported.\");\n }\n}\n\nexport async function invoke<TPayload = any, TResult = any>(functionKey: string, payload?: TPayload): Promise<TResult> {\n if (typeof functionKey !== \"string\") {\n throw new BridgeAPIError('\"functionKey\" must be a string in invoke.');\n }\n validatePayload(payload);\n\n const params: InvokeFunctionParams = {\n function: functionKey,\n payload: payload,\n tunnel_token: getObjectFromWindow(\"__TUNNEL_TOKEN__\"),\n } as InvokeFunctionParams;\n const result = await NexusBridge.call(\"invokeFunction\", params);\n return result as TResult;\n}\n","import { NexusBridge } from \"./bridge\";\nimport { BridgeAPIError } from \"./error\";\nimport { NavigationLocation } from \"./models\";\n\nclass NexusRouter {\n async navigate(urlOrLocation: string | NavigationLocation): Promise<void> {\n if (typeof urlOrLocation === \"string\") {\n await NexusBridge.call<void>(\"routerNavigate\", { urlOrLocation });\n } else {\n if (!urlOrLocation.target) {\n const errorMessage = '\"target\" is required in router navigate.';\n throw new BridgeAPIError(errorMessage);\n }\n await NexusBridge.call<void>(\"routerNavigate\", { urlOrLocation });\n }\n }\n\n async open(urlOrLocation: string | NavigationLocation): Promise<void> {\n if (typeof urlOrLocation === \"string\") {\n await NexusBridge.call<void>(\"routerOpen\", { urlOrLocation });\n } else {\n if (!urlOrLocation.target) {\n const errorMessage = '\"target\" is required in router open.';\n throw new BridgeAPIError(errorMessage);\n }\n await NexusBridge.call<void>(\"routerOpen\", { urlOrLocation });\n }\n }\n\n async generateUrl(location: NavigationLocation): Promise<URL> {\n if (!(location === null || location === void 0 ? void 0 : location.target)) {\n const errorMessage = '\"target\" is required in router generateUrl.';\n throw new BridgeAPIError(errorMessage);\n }\n return await NexusBridge.call<URL>(\"routerGenerateUrl\", { location });\n }\n\n async reload(): Promise<void> {\n await NexusBridge.call<void>(\"routerReload\", {});\n }\n}\n\nexport const router = new NexusRouter();\n","import { NexusBridge } from \"./bridge\";\nimport { BridgeAPIError } from \"./error\";\nimport { ExtensionData, NexusFullContext, NexusHistory } from \"./models\";\n\nclass NexusView {\n async getContext<T = ExtensionData>(): Promise<NexusFullContext<T>> {\n return await NexusBridge.call(\"getContext\");\n }\n\n async setWindowTitle(title: string): Promise<void> {\n if (!title) {\n throw new BridgeAPIError('\"title\" is required in view setWindowTitle.');\n }\n if (typeof title !== \"string\") {\n throw new BridgeAPIError('\"title\" must be a string in view setWindowTitle.');\n }\n\n await NexusBridge.call<void>(\"setWindowTitle\", { title });\n }\n\n async reload(): Promise<void> {\n const success = await NexusBridge.call<boolean>(\"viewReload\");\n if (success === false) {\n throw new BridgeAPIError(\"this resource's view is not reloadable.\");\n }\n }\n\n async close(payload?: unknown): Promise<void> {\n const success = await NexusBridge.call<boolean>(\"viewClose\", payload);\n if (!success) {\n const errorMessage = \"this resource's view is not closable.\";\n throw new BridgeAPIError(errorMessage);\n }\n }\n\n /**\n * 非弹窗场景调用无效。\n */\n async onClose(payload: () => Promise<void>): Promise<void> {\n if (typeof payload !== \"function\") {\n const errorMessage = '\"payload\" must be a function in view onClose.';\n throw new BridgeAPIError(errorMessage);\n }\n const success = await NexusBridge.call<boolean>(\"viewOnClose\", { payload });\n if (!success) {\n throw new BridgeAPIError(\"`onClose` failed because this resource's view is not closable.\");\n }\n }\n\n async isDialog(): Promise<boolean> {\n return await NexusBridge.call<boolean>(\"viewIsDialog\");\n }\n\n async createHistory(): Promise<NexusHistory> {\n const history = await NexusBridge.call<NexusHistory>(\"createHistory\");\n await history.listen((location, action) => {\n history.action = action;\n history.location = location;\n });\n return history;\n }\n\n async submit<T = any>(payload?: T): Promise<boolean> {\n const result = await NexusBridge.call<boolean>(\"viewSubmit\", payload);\n if (!result) {\n throw new BridgeAPIError(\"this resource's view is not submittable.\");\n }\n return result;\n }\n}\n\nexport const view = new NexusView();\n","const isPlainObject = (value: any) => {\n if (typeof value !== \"object\" || value === null) {\n return false;\n }\n if (Object.prototype.toString.call(value) !== \"[object Object]\") {\n return false;\n }\n const proto = Object.getPrototypeOf(value);\n if (proto === null) {\n return true;\n }\n const constructor = Object.prototype.hasOwnProperty.call(proto, \"constructor\") && proto.constructor;\n return (\n typeof constructor === \"function\" &&\n constructor instanceof constructor &&\n Function.prototype.call(constructor) === Function.prototype.call(value)\n );\n};\n\nconst base64ToBlob = (b64string: string, mimeType: string) => {\n if (!b64string) {\n return null;\n }\n const base64String = b64string.includes(\",\") ? b64string.split(\",\")[1] : b64string;\n const byteCharacters = atob(base64String);\n const byteNumbers = new Array(byteCharacters.length);\n for (let i = 0; i < byteCharacters.length; i++) {\n byteNumbers[i] = byteCharacters.charCodeAt(i);\n }\n\n const byteArray = new Uint8Array(byteNumbers);\n return new Blob([byteArray], { type: mimeType });\n};\n\nconst blobToBase64 = (blob: Blob) => {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n resolve(reader.result);\n };\n reader.onerror = reject;\n reader.readAsDataURL(blob);\n });\n};\n\nexport const serialiseBlobsInPayload = async (payload: any): Promise<any> => {\n if (payload instanceof Blob) {\n const base64Data = await blobToBase64(payload);\n return {\n data: base64Data,\n type: payload.type,\n __isBlobData: true,\n };\n }\n if (Array.isArray(payload)) {\n return Promise.all(payload.map((item) => serialiseBlobsInPayload(item)));\n }\n if (payload && isPlainObject(payload)) {\n const entries = await Promise.all(Object.entries(payload).map(async ([key, value]) => [key, await serialiseBlobsInPayload(value)]));\n return Object.fromEntries(entries);\n }\n return payload;\n};\n\nexport const deserialiseBlobsInPayload = (payload: any): any => {\n if (payload && isPlainObject(payload) && \"__isBlobData\" in payload) {\n const typedData = payload;\n return base64ToBlob(typedData.data, typedData.type);\n }\n if (Array.isArray(payload)) {\n return payload.map((item) => deserialiseBlobsInPayload(item));\n }\n if (payload && isPlainObject(payload)) {\n const result = {};\n for (const [key, value] of Object.entries(payload)) {\n (result as any)[key] = deserialiseBlobsInPayload(value);\n }\n return result;\n }\n return payload;\n};\n\nexport const containsBlobs = (payload: any): boolean => {\n if (payload instanceof Blob) {\n return true;\n }\n if (Array.isArray(payload)) {\n return payload.some((item) => containsBlobs(item));\n }\n if (payload && isPlainObject(payload)) {\n return Object.values(payload).some((value) => containsBlobs(value));\n }\n return false;\n};\n\nexport const containsSerialisedBlobs = (payload: any): boolean => {\n if (payload && isPlainObject(payload) && \"__isBlobData\" in payload) {\n return true;\n }\n if (Array.isArray(payload)) {\n return payload.some((item) => containsSerialisedBlobs(item));\n }\n if (payload && isPlainObject(payload)) {\n return Object.values(payload).some((value) => containsSerialisedBlobs(value));\n }\n return false;\n};\n","import { NexusBridge } from \"./bridge\";\nimport { BridgeAPIError } from \"./error\";\nimport { Subscription } from \"./models\";\nimport { containsBlobs, serialiseBlobsInPayload, containsSerialisedBlobs, deserialiseBlobsInPayload } from \"./utils\";\n\nfunction validateOnPayload<T>(eventName: string, callback: (payload?: T) => any) {\n if (!eventName) {\n throw new BridgeAPIError('\"eventName\" is required in events on.');\n }\n if (typeof eventName !== \"string\") {\n throw new BridgeAPIError('\"eventName\" must be a string in events on.');\n }\n if (!callback) {\n throw new BridgeAPIError('\"callback\" is required in events on.');\n }\n if (typeof callback !== \"function\") {\n throw new BridgeAPIError('\"callback\" must be a function in events on.');\n }\n}\n\nfunction validateEmitPayload<T>(eventName: string) {\n if (!eventName) {\n throw new BridgeAPIError('\"eventName\" is required in events emit.');\n }\n if (typeof eventName !== \"string\") {\n throw new BridgeAPIError('\"eventName\" must be a string in events emit.');\n }\n}\n\nasync function on<T = any>(eventName: string, callback: (payload?: T) => any): Promise<Subscription> {\n validateOnPayload<T>(eventName, callback);\n\n const wrappedCallback = (payload: T) => {\n let newPayload = payload;\n if (containsSerialisedBlobs(payload)) {\n newPayload = deserialiseBlobsInPayload(payload);\n }\n return callback(newPayload);\n };\n return NexusBridge.call(\"on\", { eventName, callback: wrappedCallback });\n}\n\nasync function emit<T = any>(eventName: string, payload?: T): Promise<void> {\n validateEmitPayload<T>(eventName);\n\n let newPayload = payload;\n if (containsBlobs(payload)) {\n newPayload = await serialiseBlobsInPayload(payload);\n }\n return NexusBridge.call(\"emit\", { eventName, payload: newPayload });\n}\n\nexport const events = {\n on,\n emit,\n};\n","import { Translator, GetTranslationsResult, NexusSupportedLocaleCode, TranslationResourceContent, SUPPORTED_LOCALE_CODES } from \"./models\";\nimport { view } from \"./view\";\nimport { BridgeAPIError } from \"./error\";\n\nclass NexusI18n {\n private translationsCache: Partial<Record<NexusSupportedLocaleCode, Promise<TranslationResourceContent>>> = {};\n\n private i18nFolderName = \"__LOCALES__\";\n\n async getTranslations(locale?: NexusSupportedLocaleCode): Promise<GetTranslationsResult> {\n if (!locale) {\n locale = (await view.getContext()).user.locale;\n } else {\n if (!SUPPORTED_LOCALE_CODES.includes(locale)) {\n throw new BridgeAPIError(`\"locale\" must be a valid locale code, supported codes: ${SUPPORTED_LOCALE_CODES.join(\", \")}.`);\n }\n }\n const translations = await this.loadTranslations(locale!);\n return { locale: locale!, translations };\n }\n\n async createTranslator(locale?: NexusSupportedLocaleCode): Promise<Translator> {\n if (!locale) {\n locale = (await view.getContext()).user.locale;\n } else {\n if (!SUPPORTED_LOCALE_CODES.includes(locale)) {\n throw new BridgeAPIError(`\"locale\" must be a valid locale code, supported codes: ${SUPPORTED_LOCALE_CODES.join(\", \")}.`);\n }\n }\n const translations = await this.loadTranslations(locale!);\n return {\n translate: (key: string, params: Record<string, any> = {}) => this.translate(key, translations, params),\n };\n }\n\n private loadTranslations(locale: NexusSupportedLocaleCode): Promise<TranslationResourceContent> {\n const url = `../${this.i18nFolderName}/${locale}.json`;\n if (!this.translationsCache[locale]) {\n this.translationsCache[locale] = fetch(url)\n .then((response) => response.json())\n .catch((error) => {\n // 请求失败要清理缓存\n delete this.translationsCache[locale];\n throw new BridgeAPIError(`Failed to load translations for locale ${locale}, cause: ${error}`);\n });\n }\n\n return this.translationsCache[locale]!;\n }\n\n private getValue(obj: any, path: string): any {\n return path.split(\".\").reduce((o, k) => (o != null && typeof o === \"object\" ? o[k] : undefined), obj);\n }\n\n private translate(\n key: string,\n translations: TranslationResourceContent,\n params?: Record<string, any>,\n ): TranslationResourceContent | string {\n if (!key) {\n throw new BridgeAPIError('\"key\" is required in i18n translate.');\n }\n // 获取值(扁平或嵌套)\n let value: any = translations[key] ?? this.getValue(translations, key);\n\n // key 不存在 → 返回 key\n if (value == null) return key;\n\n // 如果 value 是对象 → 直接返回\n if (typeof value === \"object\") return value;\n\n // 确保 value 是字符串\n if (typeof value !== \"string\") value = String(value);\n\n // 无参数 → 直接返回\n if (!params) return value;\n\n // 参数替换\n return value.replace(/\\{\\{\\s*(.*?)\\s*\\}\\}/g, (_: string, k: string) => {\n const paramValue = this.getValue(params, k.trim());\n return paramValue != null ? String(paramValue) : `{{${k}}}`;\n });\n }\n}\n\nexport const i18n = new NexusI18n();\n","import { RequestApiResponseData } from \"../models\";\n\nexport async function buildPayloadByRequestInit<TPayload extends RequestInit = RequestInit>(init?: TPayload) {\n const requestBody = init === null || init === void 0 ? void 0 : init.body;\n const requestMethod = init === null || init === void 0 ? void 0 : init.method;\n const requestHeaders = init === null || init === void 0 ? void 0 : init.headers;\n const req = new Request(\"\", {\n body: requestBody,\n method: requestMethod,\n headers: requestHeaders,\n });\n const headers = Object.fromEntries(req.headers.entries());\n const body = req.method !== \"GET\" ? await req.text() : undefined;\n return {\n ...init,\n body: body,\n headers,\n method: requestMethod ?? \"GET\",\n };\n}\n\nexport async function parseToResponseData(res: RequestApiResponseData): Promise<Response> {\n const response = new Response(\n res.body == null ? undefined : typeof res.body === \"object\" ? JSON.stringify(res.body) : (res.body as BodyInit),\n {\n status: res.status,\n headers: new Headers(res.headers),\n },\n );\n\n return response;\n}\n","import { NexusBridge } from \"./bridge\";\nimport { BridgeAPIError } from \"./error\";\nimport { NexusRequestInit, RequestApiResponseData } from \"./models\";\nimport { buildPayloadByRequestInit, parseToResponseData } from \"./utils/request\";\n\ninterface RequestApiParams extends NexusRequestInit {\n path: string;\n}\n\nconst validateFetchOptions = (init?: NexusRequestInit) => {\n if (!init) {\n return init;\n }\n if (\"signal\" in init) {\n const { signal: _signal, ...rest } = init;\n console.error(\"Signal is not supported in @pc-nexus/bridge and was removed from fetch options.\");\n return rest;\n }\n return init;\n};\n\nasync function callRequestBridge<TPayload extends NexusRequestInit = NexusRequestInit>(\n handlerName: string,\n payload: TPayload,\n): Promise<Response> {\n const postPayload = await buildPayloadByRequestInit<TPayload>(payload);\n const { status, headers, body } = await NexusBridge.call<RequestApiResponseData>(handlerName, postPayload);\n return parseToResponseData({ status, headers, body });\n}\n\nclass NexusRestApi {\n async request(path: string, options?: NexusRequestInit): Promise<Response> {\n if (typeof path !== \"string\") {\n throw new BridgeAPIError('\"path\" must be a string in api.request.');\n }\n\n const validatedOptions = validateFetchOptions(options);\n return callRequestBridge<RequestApiParams>(\"apiRequest\", { path, ...validatedOptions });\n }\n}\n\nexport const api = new NexusRestApi();\n","import { BridgeAPIError } from \"./error\";\nimport { invoke } from \"./invoke\";\nimport { UploadResult, DownloadResult, GetMetadataResult } from \"./models\";\n\ntype UploadInput = File | Blob;\n\ninterface GeneratedMetadata {\n size: number;\n checksum: string;\n checksum_type: \"SHA1\" | \"SHA256\" | \"CRC32\" | \"CRC32C\";\n}\n\ninterface FileMetadata extends GeneratedMetadata {\n key: string;\n ttlSeconds?: number;\n overwrite?: boolean;\n}\n\ntype PresignedURLMapping = Record<string, FileMetadata>;\n\nasync function buildObjectMetadata(file: UploadInput): Promise<GeneratedMetadata> {\n const size = file.size;\n const arrayBuffer = await file.arrayBuffer();\n let checksum: string;\n const checksum_type = \"SHA256\";\n\n // crypto.subtle 只能在安全上下文(HTTPS 或 localhost)中使用\n // sha256 兼容模拟器非安全上下文\n if (typeof crypto !== \"undefined\" && crypto.subtle) {\n const hashBuffer = await crypto.subtle.digest(\"SHA-256\", arrayBuffer);\n const hashArray = new Uint8Array(hashBuffer);\n checksum = btoa(String.fromCharCode(...hashArray));\n } else {\n const jsHash = await sha256(arrayBuffer);\n checksum = btoa(String.fromCharCode(...new Uint8Array(jsHash)));\n }\n\n return {\n size,\n checksum,\n checksum_type,\n };\n}\n\nfunction buildChecksumToFileMap(files: UploadInput[], metadata: GeneratedMetadata[]) {\n const map = new Map<string, { file: UploadInput; index: number }>();\n\n files.forEach((file, index) => {\n map.set(metadata[index].checksum, {\n file,\n index,\n });\n });\n\n return map;\n}\n\nfunction uploadFile(url: string, file: UploadInput, key: string) {\n const formData = new FormData();\n const fileName = (file as File).name || key;\n formData.append(\"file\", file, fileName);\n\n return fetch(url, {\n method: \"PUT\",\n body: formData,\n })\n .then((response) => ({\n success: response.ok,\n key,\n status: response.status,\n error: response.ok ? undefined : `Upload failed with status ${response.status}`,\n }))\n .catch((error) => ({\n success: false,\n key,\n status: 503,\n error: error instanceof Error ? error.message : \"Upload failed\",\n }));\n}\n\nclass NexusObjectStore {\n async upload(functionKey: string, objects: UploadInput[]): Promise<UploadResult[]> {\n if (!functionKey || functionKey.length === 0) {\n throw new BridgeAPIError('\"functionKey\" is required in store upload.');\n }\n if (!Array.isArray(objects) || objects.length === 0) {\n throw new BridgeAPIError('\"objects\" is required and cannot be empty in store upload.');\n }\n\n const files = objects.map((obj, index) => {\n if (obj instanceof File || obj instanceof Blob) return obj;\n throw new BridgeAPIError(`Invalid object type at index ${index}. Only Blob/File objects are accepted.`);\n });\n\n const allObjectMetadata: GeneratedMetadata[] = await Promise.all(files.map((file) => buildObjectMetadata(file)));\n\n const presignedURLsToObjectMetadata: PresignedURLMapping = await invoke(functionKey, allObjectMetadata);\n\n if (!presignedURLsToObjectMetadata || typeof presignedURLsToObjectMetadata !== \"object\") {\n throw new BridgeAPIError(\"Invalid response from functionKey\");\n }\n\n const checksumMap: Map<string, { file: UploadInput; index: number }> = buildChecksumToFileMap(files, allObjectMetadata);\n\n const uploadPromises = Object.entries(presignedURLsToObjectMetadata).map(([presignedUrl, { key, checksum }]) => {\n const fileInfo = checksumMap.get(checksum);\n\n if (!fileInfo) {\n return {\n promise: Promise.resolve({\n success: false,\n key,\n error: `File not found for checksum ${checksum}`,\n }),\n index: -1,\n };\n }\n\n const { file, index } = fileInfo;\n\n const promise = uploadFile(presignedUrl, file, key);\n\n return {\n promise,\n index,\n objectType: file.type,\n objectSize: file.size,\n };\n });\n\n return await Promise.all(uploadPromises.map((t) => t.promise));\n }\n\n async download(functionKey: string, keys: string[]): Promise<DownloadResult[]> {\n if (!functionKey || functionKey.length === 0) {\n throw new BridgeAPIError('\"functionKey\" is required in store download.');\n }\n if (!Array.isArray(keys) || keys.length === 0) {\n throw new BridgeAPIError('\"keys\" is required and cannot be empty in store download.');\n }\n\n const downloadUrlsTokeys: Record<string, string> = await invoke(functionKey, keys);\n\n if (!downloadUrlsTokeys || typeof downloadUrlsTokeys !== \"object\") {\n throw new BridgeAPIError(\"Invalid response from functionKey\");\n }\n\n const downloadPromises = Object.entries(downloadUrlsTokeys).map(async ([downloadUrl, key]) => {\n try {\n const response = await fetch(downloadUrl, {\n method: \"GET\",\n });\n if (!response.ok) {\n return {\n success: false,\n key: key,\n status: response.status,\n error: `Download failed with status ${response.status}`,\n };\n }\n const blob = await response.blob();\n const disposition = response.headers.get(\"Content-Disposition\") ?? \"\";\n const name = disposition.match(/filename\\*=UTF-8''([^;]+)/)?.[1] ?? disposition.match(/filename=\"?([^\"]+)\"?/)?.[1] ?? \"\";\n\n return {\n success: true,\n key: key,\n blob,\n name,\n status: response.status,\n };\n } catch (error) {\n return {\n success: false,\n key: key,\n status: 503,\n error: error instanceof Error ? error.message : \"Download failed\",\n };\n }\n });\n\n return await Promise.all(downloadPromises);\n }\n\n async getMetadata(functionKey: string, keys: string[]): Promise<GetMetadataResult[]> {\n if (!functionKey || functionKey.length === 0) {\n throw new BridgeAPIError('\"functionKey\" is required in store getMetadata.');\n }\n if (!Array.isArray(keys) || keys.length === 0) {\n throw new BridgeAPIError('\"keys\" is required and cannot be empty in store getMetadata.');\n }\n const results = await Promise.all(\n keys.map(async (key) => {\n const result = await invoke(functionKey, key);\n if (!result || typeof result !== \"object\") {\n return {\n key,\n error: \"Invalid response from functionKey\",\n };\n }\n return result;\n }),\n );\n\n return results;\n }\n\n async delete(functionKey: string, keys: string[]): Promise<void> {\n if (!functionKey || functionKey.length === 0) {\n throw new BridgeAPIError('\"functionKey\" is required in store delete.');\n }\n if (!Array.isArray(keys) || keys.length === 0) {\n throw new BridgeAPIError('\"keys\" is required and cannot be empty in store delete.');\n }\n await Promise.all(\n keys.map(async (key) => {\n await invoke(functionKey, key);\n }),\n );\n }\n}\n\nexport const store = new NexusObjectStore();\n\nexport function sha256(buffer: ArrayBuffer): ArrayBuffer {\n const bytes = new Uint8Array(buffer);\n const len = bytes.length;\n const blockSize = 64;\n const hashSize = 32;\n\n const K = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be,\n 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa,\n 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 0x27b70a85,\n 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,\n 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f,\n 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2,\n ]);\n\n let h0 = 0x6a09e667,\n h1 = 0xbb67ae85,\n h2 = 0x3c6ef372,\n h3 = 0xa54ff53a;\n let h4 = 0x510e527f,\n h5 = 0x9b05688c,\n h6 = 0x1f83d9ab,\n h7 = 0x5be0cd19;\n\n const totalBits = BigInt(len) * 8n;\n const paddingLen = len % blockSize < 56 ? 56 - (len % blockSize) : 120 - (len % blockSize);\n const paddedLen = len + paddingLen + 8;\n const padded = new Uint8Array(paddedLen);\n padded.set(bytes);\n padded[len] = 0x80;\n\n const view = new DataView(padded.buffer, padded.byteOffset);\n view.setUint32(paddedLen - 4, Number((totalBits >> 32n) & 0xffffffffn));\n view.setUint32(paddedLen - 8, Number(totalBits & 0xffffffffn));\n\n for (let i = 0; i < paddedLen; i += blockSize) {\n const w = new Uint32Array(64);\n for (let j = 0; j < 16; j++) {\n w[j] = view.getUint32(i + j * 4);\n }\n\n for (let j = 16; j < 64; j++) {\n const s0 = ((w[j - 15] >>> 7) | (w[j - 15] << 25)) ^ ((w[j - 15] >>> 18) | (w[j - 15] << 14)) ^ (w[j - 15] >>> 3);\n const s1 = ((w[j - 2] >>> 17) | (w[j - 2] << 15)) ^ ((w[j - 2] >>> 19) | (w[j - 2] << 13)) ^ (w[j - 2] >>> 10);\n w[j] = (w[j - 16] + s0 + w[j - 7] + s1) >>> 0;\n }\n\n let a = h0,\n b = h1,\n c = h2,\n d = h3,\n e = h4,\n f = h5,\n g = h6,\n h = h7;\n\n for (let j = 0; j < 64; j++) {\n const S1 = ((e >>> 6) | (e << 26)) ^ ((e >>> 11) | (e << 21)) ^ ((e >>> 25) | (e << 7));\n const ch = (e & f) ^ (~e & g);\n const temp1 = (h + S1 + ch + K[j] + w[j]) >>> 0;\n const S0 = ((a >>> 2) | (a << 30)) ^ ((a >>> 13) | (a << 19)) ^ ((a >>> 22) | (a << 10));\n const maj = (a & b) ^ (a & c) ^ (b & c);\n const temp2 = (S0 + maj) >>> 0;\n\n h = g;\n g = f;\n f = e;\n e = (d + temp1) >>> 0;\n d = c;\n c = b;\n b = a;\n a = (temp1 + temp2) >>> 0;\n }\n\n h0 = (h0 + a) >>> 0;\n h1 = (h1 + b) >>> 0;\n h2 = (h2 + c) >>> 0;\n h3 = (h3 + d) >>> 0;\n h4 = (h4 + e) >>> 0;\n h5 = (h5 + f) >>> 0;\n h6 = (h6 + g) >>> 0;\n h7 = (h7 + h) >>> 0;\n }\n\n const result = new ArrayBuffer(hashSize);\n const resultView = new DataView(result);\n resultView.setUint32(0, h0);\n resultView.setUint32(4, h1);\n resultView.setUint32(8, h2);\n resultView.setUint32(12, h3);\n resultView.setUint32(16, h4);\n resultView.setUint32(20, h5);\n resultView.setUint32(24, h6);\n resultView.setUint32(28, h7);\n return result;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAEM,SAAU,oBAAoB,CAAI,GAAW,EAAE,KAAQ,EAAA;AACxD,IAAA,MAAkB,CAAC,GAAG,CAAC,GAAG,KAAK;AACpC;AAEM,SAAU,mBAAmB,CAAI,GAAW,EAAA;AAC9C,IAAA,OAAQ,MAAkB,CAAC,GAAG,CAAC;AACnC;;ACSA,SAAS,SAAS,GAAA;AACd,IAAA,MAAM,MAAM,GAAG,mBAAmB,CAAe,qBAAqB,CAAC;AACvE,IAAA,OAAO,MAAM;AACjB;MAEa,WAAW,CAAA;AACpB,IAAA,OAAO,aAAa,GAAA;AAChB,QAAA,IAAI,CAAC,SAAS,EAAE,EAAE;YACd,MAAM,IAAI,KAAK,CAAC;;;AAGnB,QAAA,CAAA,CAAC;QACF;AACA,QAAA,OAAO,SAAS,EAAE,CAAC,IAAI;IAC3B;AAEA,IAAA,aAAa,IAAI,CAAI,IAAY,EAAE,OAAa,EAAA;AAC5C,QAAA,MAAM,MAAM,GAAG,MAAM,WAA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M,UAAU,GAAG,IAAI,QAAQ,CAAC,MAAM,CAAC;AACvC,IAAA,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC;AAC3B,IAAA,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC;AAC3B,IAAA,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC;AAC3B,IAAA,UAAU,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;AAC5B,IAAA,UAAU,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;AAC5B,IAAA,UAAU,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;AAC5B,IAAA,UAAU,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;AAC5B,IAAA,UAAU,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;AAC5B,IAAA,OAAO,MAAM;AACjB;;AC/TA;;AAEG;;;;"}
1
+ {"version":3,"file":"pc-nexus-bridge.mjs","sources":["../../../../web/bridge/src/window.ts","../../../../web/bridge/src/bridge.ts","../../../../web/bridge/src/error.ts","../../../../web/bridge/src/dialog.ts","../../../../web/bridge/src/invoke.ts","../../../../web/bridge/src/router.ts","../../../../web/bridge/src/view.ts","../../../../web/bridge/src/utils/blob-parser.ts","../../../../web/bridge/src/events.ts","../../../../web/bridge/src/i18n.ts","../../../../web/bridge/src/utils/request.ts","../../../../web/bridge/src/api.ts","../../../../web/bridge/src/store.ts","../../../../web/bridge/src/remote.ts","../../../../web/bridge/src/pc-nexus-bridge.ts"],"sourcesContent":["export type SafeAny = any;\n\nexport function attachObjectToWindow<T>(key: string, value: T) {\n (window as SafeAny)[key] = value;\n}\n\nexport function getObjectFromWindow<T>(key: string) {\n return (window as SafeAny)[key];\n}\n","import { getObjectFromWindow } from \"./window\";\n\ninterface HostMessageEvent<T = unknown> {\n source: Window | null;\n origin: string;\n data: T;\n}\n\ninterface Cancelable {\n cancel: () => void;\n}\n\ninterface GlobalBridge {\n call<T>(name: string, payload?: object | undefined): Promise<T>;\n on<T>(name: string, handler: (event: HostMessageEvent<T>) => void): Cancelable;\n}\n\nfunction getBridge() {\n const bridge = getObjectFromWindow<GlobalBridge>(\"__pc_nexus_bridge__\");\n return bridge;\n}\n\nexport class NexusBridge {\n static getBridgeCall<T>(): (name: string, payload?: object) => Promise<T> {\n if (!getBridge()) {\n throw new Error(`\n Unable to establish a connection with the PingCode nexus bridge.\n If you are trying to run your app locally, Nexus apps only work in the context of PingCode products. Refer to https://developer.pingcode.com for how to tunnel when using a local development server.\n `);\n }\n return getBridge().call;\n }\n\n static async call<T>(name: string, payload?: any): Promise<T> {\n const result = await NexusBridge.getBridgeCall<T>()(name, payload);\n return result as T;\n }\n\n /**\n * 订阅宿主 host 发来的消息。\n * @param name 消息名称\n * @param handler 收到消息时的回调,event 包含 source、origin、data\n * @returns 返回带 cancel() 的对象,调用可取消订阅\n */\n static on<T>(name: string, handler: (event: HostMessageEvent<T>) => void): Cancelable {\n const bridge = getBridge();\n if (!bridge) {\n throw new Error(`\n Unable to establish a connection with the PingCode nexus bridge.\n If you are trying to run your app locally, Nexus apps only work in the context of PingCode products. Refer to https://developer.pingcode.com for how to tunnel when using a local development server.\n `);\n }\n return bridge.on(name, handler);\n }\n}\n","export class BridgeAPIError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"BridgeAPIError\";\n Object.setPrototypeOf(this, BridgeAPIError.prototype);\n }\n}\n\n// 自动注册:所有未 catch 的 Promise rejection 均以 \"Uncaught (in promise)\" 格式输出,无需用户配置\nif (typeof window !== \"undefined\") {\n window.addEventListener(\n \"unhandledrejection\",\n (event: PromiseRejectionEvent) => {\n const reason = event.reason;\n const error = reason instanceof Error ? reason : new Error(String(reason));\n const firstLine = `Uncaught (in promise) ${error.name}: ${error.message}`;\n const stack = error.stack?.replace(/^[^\\n]*\\n?/, \"\").trim() || \"\";\n console.error(stack ? `${firstLine}\\n${stack}` : firstLine);\n event.preventDefault();\n event.stopImmediatePropagation();\n },\n true,\n );\n}\n","import { NexusBridge } from \"./bridge\";\nimport { BridgeAPIError } from \"./error\";\nimport { DialogConfirmOptions, DialogOptions, DialogRef } from \"./models\";\n\nfunction validateOpenOptions(options: DialogOptions) {\n if (typeof options !== \"object\" || options === null) {\n throw new BridgeAPIError('\"options\" must be an object in dialog open.');\n }\n if (!options.resource) {\n throw new BridgeAPIError('\"resource\" is required in dialog open options.');\n }\n}\n\nfunction validateConfirmOptions(options: DialogConfirmOptions) {\n if (typeof options !== \"object\" || options === null) {\n throw new BridgeAPIError('\"options\" must be an object in dialog confirm.');\n }\n if (!options.content) {\n throw new BridgeAPIError('\"content\" is required in dialog confirm options.');\n }\n if (typeof options.onConfirm !== \"function\") {\n throw new BridgeAPIError('\"onConfirm\" must be a function in dialog confirm options.');\n }\n}\n\nclass NexusDialog {\n async open<T>(options: DialogOptions): Promise<DialogRef<T>> {\n validateOpenOptions(options);\n return await NexusBridge.call<DialogRef<T>>(\"openDialog\", options);\n }\n\n async confirm<T>(options: DialogConfirmOptions): Promise<void> {\n validateConfirmOptions(options);\n return await NexusBridge.call<void>(\"confirm\", options);\n }\n}\n\nexport const dialog = new NexusDialog();\n","import { NexusBridge } from \"./bridge\";\nimport { BridgeAPIError } from \"./error\";\nimport { InvokeFunctionParams } from \"./models\";\nimport { getObjectFromWindow } from \"./window\";\n\nfunction validatePayload<TPayload>(payload?: TPayload) {\n if (!payload) {\n return;\n }\n if (Object.values(payload).some((value) => typeof value === \"function\")) {\n throw new BridgeAPIError(\"Passing functions as part of the payload in invoke is not supported.\");\n }\n}\n\nexport async function invoke<TPayload = any, TResult = any>(functionKey: string, payload?: TPayload): Promise<TResult> {\n if (typeof functionKey !== \"string\") {\n throw new BridgeAPIError('\"functionKey\" must be a string in invoke.');\n }\n validatePayload(payload);\n\n const params: InvokeFunctionParams = {\n function: functionKey,\n payload: payload,\n tunnel_token: getObjectFromWindow(\"__TUNNEL_TOKEN__\"),\n } as InvokeFunctionParams;\n const result = await NexusBridge.call(\"invokeFunction\", params);\n return result as TResult;\n}\n","import { NexusBridge } from \"./bridge\";\nimport { BridgeAPIError } from \"./error\";\nimport { NavigationLocation } from \"./models\";\n\nclass NexusRouter {\n async navigate(urlOrLocation: string | NavigationLocation): Promise<void> {\n if (typeof urlOrLocation === \"string\") {\n await NexusBridge.call<void>(\"routerNavigate\", { urlOrLocation });\n } else {\n if (!urlOrLocation.target) {\n const errorMessage = '\"target\" is required in router navigate.';\n throw new BridgeAPIError(errorMessage);\n }\n await NexusBridge.call<void>(\"routerNavigate\", { urlOrLocation });\n }\n }\n\n async open(urlOrLocation: string | NavigationLocation): Promise<void> {\n if (typeof urlOrLocation === \"string\") {\n await NexusBridge.call<void>(\"routerOpen\", { urlOrLocation });\n } else {\n if (!urlOrLocation.target) {\n const errorMessage = '\"target\" is required in router open.';\n throw new BridgeAPIError(errorMessage);\n }\n await NexusBridge.call<void>(\"routerOpen\", { urlOrLocation });\n }\n }\n\n async generateUrl(location: NavigationLocation): Promise<URL> {\n if (!(location === null || location === void 0 ? void 0 : location.target)) {\n const errorMessage = '\"target\" is required in router generateUrl.';\n throw new BridgeAPIError(errorMessage);\n }\n const urlString = await NexusBridge.call<string>(\"routerGenerateUrl\", { location });\n return new URL(urlString);\n }\n\n async reload(): Promise<void> {\n await NexusBridge.call<void>(\"routerReload\", {});\n }\n}\n\nexport const router = new NexusRouter();\n","import { NexusBridge } from \"./bridge\";\nimport { BridgeAPIError } from \"./error\";\nimport { ExtensionData, NexusFullContext, NexusHistory } from \"./models\";\n\nclass NexusView {\n async getContext<T = ExtensionData>(): Promise<NexusFullContext<T>> {\n return await NexusBridge.call(\"getContext\");\n }\n\n async setWindowTitle(title: string): Promise<void> {\n if (!title) {\n throw new BridgeAPIError('\"title\" is required in view setWindowTitle.');\n }\n if (typeof title !== \"string\") {\n throw new BridgeAPIError('\"title\" must be a string in view setWindowTitle.');\n }\n\n await NexusBridge.call<void>(\"setWindowTitle\", { title });\n }\n\n async reload(): Promise<void> {\n const success = await NexusBridge.call<boolean>(\"viewReload\");\n if (success === false) {\n throw new BridgeAPIError(\"this resource's view is not reloadable.\");\n }\n }\n\n async close(payload?: unknown): Promise<void> {\n const success = await NexusBridge.call<boolean>(\"viewClose\", payload);\n if (!success) {\n const errorMessage = \"this resource's view is not closable.\";\n throw new BridgeAPIError(errorMessage);\n }\n }\n\n /**\n * 非弹窗场景调用无效。\n */\n async onClose(payload: () => Promise<void>): Promise<void> {\n if (typeof payload !== \"function\") {\n const errorMessage = '\"payload\" must be a function in view onClose.';\n throw new BridgeAPIError(errorMessage);\n }\n const success = await NexusBridge.call<boolean>(\"viewOnClose\", { payload });\n if (!success) {\n throw new BridgeAPIError(\"`onClose` failed because this resource's view is not closable.\");\n }\n }\n\n async isDialog(): Promise<boolean> {\n return await NexusBridge.call<boolean>(\"viewIsDialog\");\n }\n\n async createHistory(): Promise<NexusHistory> {\n const history = await NexusBridge.call<NexusHistory>(\"createHistory\");\n await history.listen((location, action) => {\n history.action = action;\n history.location = location;\n });\n return history;\n }\n\n async submit<T = any>(payload?: T): Promise<boolean> {\n const result = await NexusBridge.call<boolean>(\"viewSubmit\", payload);\n if (!result) {\n throw new BridgeAPIError(\"this resource's view is not submittable.\");\n }\n return result;\n }\n}\n\nexport const view = new NexusView();\n","const isPlainObject = (value: any) => {\n if (typeof value !== \"object\" || value === null) {\n return false;\n }\n if (Object.prototype.toString.call(value) !== \"[object Object]\") {\n return false;\n }\n const proto = Object.getPrototypeOf(value);\n if (proto === null) {\n return true;\n }\n const constructor = Object.prototype.hasOwnProperty.call(proto, \"constructor\") && proto.constructor;\n return (\n typeof constructor === \"function\" &&\n constructor instanceof constructor &&\n Function.prototype.call(constructor) === Function.prototype.call(value)\n );\n};\n\nconst base64ToBlob = (b64string: string, mimeType: string) => {\n if (!b64string) {\n return null;\n }\n const base64String = b64string.includes(\",\") ? b64string.split(\",\")[1] : b64string;\n const byteCharacters = atob(base64String);\n const byteNumbers = new Array(byteCharacters.length);\n for (let i = 0; i < byteCharacters.length; i++) {\n byteNumbers[i] = byteCharacters.charCodeAt(i);\n }\n\n const byteArray = new Uint8Array(byteNumbers);\n return new Blob([byteArray], { type: mimeType });\n};\n\nconst blobToBase64 = (blob: Blob) => {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n resolve(reader.result);\n };\n reader.onerror = reject;\n reader.readAsDataURL(blob);\n });\n};\n\nexport const serialiseBlobsInPayload = async (payload: any): Promise<any> => {\n if (payload instanceof Blob) {\n const base64Data = await blobToBase64(payload);\n return {\n data: base64Data,\n type: payload.type,\n __isBlobData: true,\n };\n }\n if (Array.isArray(payload)) {\n return Promise.all(payload.map((item) => serialiseBlobsInPayload(item)));\n }\n if (payload && isPlainObject(payload)) {\n const entries = await Promise.all(Object.entries(payload).map(async ([key, value]) => [key, await serialiseBlobsInPayload(value)]));\n return Object.fromEntries(entries);\n }\n return payload;\n};\n\nexport const deserialiseBlobsInPayload = (payload: any): any => {\n if (payload && isPlainObject(payload) && \"__isBlobData\" in payload) {\n const typedData = payload;\n return base64ToBlob(typedData.data, typedData.type);\n }\n if (Array.isArray(payload)) {\n return payload.map((item) => deserialiseBlobsInPayload(item));\n }\n if (payload && isPlainObject(payload)) {\n const result = {};\n for (const [key, value] of Object.entries(payload)) {\n (result as any)[key] = deserialiseBlobsInPayload(value);\n }\n return result;\n }\n return payload;\n};\n\nexport const containsBlobs = (payload: any): boolean => {\n if (payload instanceof Blob) {\n return true;\n }\n if (Array.isArray(payload)) {\n return payload.some((item) => containsBlobs(item));\n }\n if (payload && isPlainObject(payload)) {\n return Object.values(payload).some((value) => containsBlobs(value));\n }\n return false;\n};\n\nexport const containsSerialisedBlobs = (payload: any): boolean => {\n if (payload && isPlainObject(payload) && \"__isBlobData\" in payload) {\n return true;\n }\n if (Array.isArray(payload)) {\n return payload.some((item) => containsSerialisedBlobs(item));\n }\n if (payload && isPlainObject(payload)) {\n return Object.values(payload).some((value) => containsSerialisedBlobs(value));\n }\n return false;\n};\n","import { NexusBridge } from \"./bridge\";\nimport { BridgeAPIError } from \"./error\";\nimport { Subscription } from \"./models\";\nimport { containsBlobs, serialiseBlobsInPayload, containsSerialisedBlobs, deserialiseBlobsInPayload } from \"./utils\";\n\nfunction validateOnPayload<T>(eventName: string, callback: (payload?: T) => any) {\n if (!eventName) {\n throw new BridgeAPIError('\"eventName\" is required in events on.');\n }\n if (typeof eventName !== \"string\") {\n throw new BridgeAPIError('\"eventName\" must be a string in events on.');\n }\n if (!callback) {\n throw new BridgeAPIError('\"callback\" is required in events on.');\n }\n if (typeof callback !== \"function\") {\n throw new BridgeAPIError('\"callback\" must be a function in events on.');\n }\n}\n\nfunction validateEmitPayload<T>(eventName: string) {\n if (!eventName) {\n throw new BridgeAPIError('\"eventName\" is required in events emit.');\n }\n if (typeof eventName !== \"string\") {\n throw new BridgeAPIError('\"eventName\" must be a string in events emit.');\n }\n}\n\nasync function on<T = any>(eventName: string, callback: (payload?: T) => any): Promise<Subscription> {\n validateOnPayload<T>(eventName, callback);\n\n const wrappedCallback = (payload: T) => {\n let newPayload = payload;\n if (containsSerialisedBlobs(payload)) {\n newPayload = deserialiseBlobsInPayload(payload);\n }\n return callback(newPayload);\n };\n return NexusBridge.call(\"on\", { eventName, callback: wrappedCallback });\n}\n\nasync function emit<T = any>(eventName: string, payload?: T): Promise<void> {\n validateEmitPayload<T>(eventName);\n\n let newPayload = payload;\n if (containsBlobs(payload)) {\n newPayload = await serialiseBlobsInPayload(payload);\n }\n return NexusBridge.call(\"emit\", { eventName, payload: newPayload });\n}\n\nexport const events = {\n on,\n emit,\n};\n","import { Translator, GetTranslationsResult, NexusSupportedLocaleCode, TranslationResourceContent, SUPPORTED_LOCALE_CODES } from \"./models\";\nimport { view } from \"./view\";\nimport { BridgeAPIError } from \"./error\";\n\nclass NexusI18n {\n private translationsCache: Partial<Record<NexusSupportedLocaleCode, Promise<TranslationResourceContent>>> = {};\n\n private i18nFolderName = \"__LOCALES__\";\n\n async getTranslations(locale?: NexusSupportedLocaleCode): Promise<GetTranslationsResult> {\n if (!locale) {\n locale = (await view.getContext()).user.locale;\n } else {\n if (!SUPPORTED_LOCALE_CODES.includes(locale)) {\n throw new BridgeAPIError(`\"locale\" must be a valid locale code, supported codes: ${SUPPORTED_LOCALE_CODES.join(\", \")}.`);\n }\n }\n const translations = await this.loadTranslations(locale!);\n return { locale: locale!, translations };\n }\n\n async createTranslator(locale?: NexusSupportedLocaleCode): Promise<Translator> {\n if (!locale) {\n locale = (await view.getContext()).user.locale;\n } else {\n if (!SUPPORTED_LOCALE_CODES.includes(locale)) {\n throw new BridgeAPIError(`\"locale\" must be a valid locale code, supported codes: ${SUPPORTED_LOCALE_CODES.join(\", \")}.`);\n }\n }\n const translations = await this.loadTranslations(locale!);\n return {\n translate: (key: string, params: Record<string, any> = {}) => this.translate(key, translations, params),\n };\n }\n\n private loadTranslations(locale: NexusSupportedLocaleCode): Promise<TranslationResourceContent> {\n const url = `../${this.i18nFolderName}/${locale}.json`;\n if (!this.translationsCache[locale]) {\n this.translationsCache[locale] = fetch(url)\n .then((response) => response.json())\n .catch((error) => {\n // 请求失败要清理缓存\n delete this.translationsCache[locale];\n throw new BridgeAPIError(`Failed to load translations for locale ${locale}, cause: ${error}`);\n });\n }\n\n return this.translationsCache[locale]!;\n }\n\n private getValue(obj: any, path: string): any {\n return path.split(\".\").reduce((o, k) => (o != null && typeof o === \"object\" ? o[k] : undefined), obj);\n }\n\n private translate(\n key: string,\n translations: TranslationResourceContent,\n params?: Record<string, any>,\n ): TranslationResourceContent | string {\n if (!key) {\n throw new BridgeAPIError('\"key\" is required in i18n translate.');\n }\n // 获取值(扁平或嵌套)\n let value: any = translations[key] ?? this.getValue(translations, key);\n\n // key 不存在 → 返回 key\n if (value == null) return key;\n\n // 如果 value 是对象 → 直接返回\n if (typeof value === \"object\") return value;\n\n // 确保 value 是字符串\n if (typeof value !== \"string\") value = String(value);\n\n // 无参数 → 直接返回\n if (!params) return value;\n\n // 参数替换\n return value.replace(/\\{\\{\\s*(.*?)\\s*\\}\\}/g, (_: string, k: string) => {\n const paramValue = this.getValue(params, k.trim());\n return paramValue != null ? String(paramValue) : `{{${k}}}`;\n });\n }\n}\n\nexport const i18n = new NexusI18n();\n","import { RequestApiResponseData } from \"../models\";\n\nexport async function buildPayloadByRequestInit<TPayload extends RequestInit = RequestInit>(init?: TPayload) {\n const requestBody = init === null || init === void 0 ? void 0 : init.body;\n const requestMethod = init === null || init === void 0 ? void 0 : init.method;\n const requestHeaders = init === null || init === void 0 ? void 0 : init.headers;\n const req = new Request(\"\", {\n body: requestBody,\n method: requestMethod,\n headers: requestHeaders,\n });\n const headers = Object.fromEntries(req.headers.entries());\n const body = req.method !== \"GET\" ? await req.text() : undefined;\n return {\n ...init,\n body: body,\n headers,\n method: requestMethod ?? \"GET\",\n };\n}\n\nexport async function parseToResponseData(res: RequestApiResponseData): Promise<Response> {\n const response = new Response(\n res.body == null ? undefined : typeof res.body === \"object\" ? JSON.stringify(res.body) : (res.body as BodyInit),\n {\n status: res.status,\n headers: new Headers(res.headers),\n },\n );\n\n return response;\n}\n","import { NexusBridge } from \"./bridge\";\nimport { BridgeAPIError } from \"./error\";\nimport { NexusRequestInit, RequestApiResponseData } from \"./models\";\nimport { buildPayloadByRequestInit, parseToResponseData } from \"./utils/request\";\n\ninterface RequestApiParams extends NexusRequestInit {\n path: string;\n}\n\nconst validateFetchOptions = (init?: NexusRequestInit) => {\n if (!init) {\n return init;\n }\n if (\"signal\" in init) {\n const { signal: _signal, ...rest } = init;\n console.error(\"Signal is not supported in @pc-nexus/bridge and was removed from fetch options.\");\n return rest;\n }\n return init;\n};\n\nasync function callRequestBridge<TPayload extends NexusRequestInit = NexusRequestInit>(\n handlerName: string,\n payload: TPayload,\n): Promise<Response> {\n const postPayload = await buildPayloadByRequestInit<TPayload>(payload);\n const { status, headers, body } = await NexusBridge.call<RequestApiResponseData>(handlerName, postPayload);\n return parseToResponseData({ status, headers, body });\n}\n\nclass NexusRestApi {\n async request(path: string, options?: NexusRequestInit): Promise<Response> {\n if (typeof path !== \"string\") {\n throw new BridgeAPIError('\"path\" must be a string in api.request.');\n }\n\n const validatedOptions = validateFetchOptions(options);\n return callRequestBridge<RequestApiParams>(\"apiRequest\", { path, ...validatedOptions });\n }\n}\n\nexport const api = new NexusRestApi();\n","import { BridgeAPIError } from \"./error\";\nimport { invoke } from \"./invoke\";\nimport { UploadResult, DownloadResult, GetMetadataResult } from \"./models\";\n\ntype UploadInput = File | Blob;\n\ninterface GeneratedMetadata {\n size: number;\n checksum: string;\n checksum_type: \"SHA1\" | \"SHA256\" | \"CRC32\" | \"CRC32C\";\n}\n\ninterface FileMetadata extends GeneratedMetadata {\n key: string;\n overwrite?: boolean;\n}\n\ntype PresignedURLMapping = Record<string, FileMetadata>;\n\nasync function buildObjectMetadata(file: UploadInput): Promise<GeneratedMetadata> {\n const size = file.size;\n const arrayBuffer = await file.arrayBuffer();\n let checksum: string;\n const checksum_type = \"SHA256\";\n\n // crypto.subtle 只能在安全上下文(HTTPS 或 localhost)中使用\n // sha256 兼容模拟器非安全上下文\n if (typeof crypto !== \"undefined\" && crypto.subtle) {\n const hashBuffer = await crypto.subtle.digest(\"SHA-256\", arrayBuffer);\n const hashArray = new Uint8Array(hashBuffer);\n checksum = btoa(String.fromCharCode(...hashArray));\n } else {\n const jsHash = await sha256(arrayBuffer);\n checksum = btoa(String.fromCharCode(...new Uint8Array(jsHash)));\n }\n\n return {\n size,\n checksum,\n checksum_type,\n };\n}\n\nfunction buildChecksumToFileMap(files: UploadInput[], metadata: GeneratedMetadata[]) {\n const map = new Map<string, { file: UploadInput; index: number }>();\n\n files.forEach((file, index) => {\n map.set(metadata[index].checksum, {\n file,\n index,\n });\n });\n\n return map;\n}\n\nfunction uploadFile(url: string, file: UploadInput, key: string) {\n const formData = new FormData();\n const fileName = (file as File).name || key;\n formData.append(\"file\", file, fileName);\n\n return fetch(url, {\n method: \"PUT\",\n body: formData,\n })\n .then((response) => ({\n success: response.ok,\n key,\n status: response.status,\n error: response.ok ? undefined : `Upload failed with status ${response.status}`,\n }))\n .catch((error) => ({\n success: false,\n key,\n status: 503,\n error: error instanceof Error ? error.message : \"Upload failed\",\n }));\n}\n\nclass NexusObjectStore {\n async upload(functionKey: string, objects: UploadInput[]): Promise<UploadResult[]> {\n if (!functionKey || functionKey.length === 0) {\n throw new BridgeAPIError('\"functionKey\" is required in store upload.');\n }\n if (!Array.isArray(objects) || objects.length === 0) {\n throw new BridgeAPIError('\"objects\" is required and cannot be empty in store upload.');\n }\n\n const files = objects.map((obj, index) => {\n if (obj instanceof File || obj instanceof Blob) return obj;\n throw new BridgeAPIError(`Invalid object type at index ${index}. Only Blob/File objects are accepted.`);\n });\n\n const allObjectMetadata: GeneratedMetadata[] = await Promise.all(files.map((file) => buildObjectMetadata(file)));\n\n const presignedURLsToObjectMetadata: PresignedURLMapping = await invoke(functionKey, allObjectMetadata);\n\n if (!presignedURLsToObjectMetadata || typeof presignedURLsToObjectMetadata !== \"object\") {\n throw new BridgeAPIError(\"Invalid response from functionKey\");\n }\n\n const checksumMap: Map<string, { file: UploadInput; index: number }> = buildChecksumToFileMap(files, allObjectMetadata);\n\n const uploadPromises = Object.entries(presignedURLsToObjectMetadata).map(([presignedUrl, { key, checksum }]) => {\n const fileInfo = checksumMap.get(checksum);\n\n if (!fileInfo) {\n return {\n promise: Promise.resolve({\n success: false,\n key,\n error: `File not found for checksum ${checksum}`,\n }),\n index: -1,\n };\n }\n\n const { file, index } = fileInfo;\n\n const promise = uploadFile(presignedUrl, file, key);\n\n return {\n promise,\n index,\n objectType: file.type,\n objectSize: file.size,\n };\n });\n\n return await Promise.all(uploadPromises.map((t) => t.promise));\n }\n\n async download(functionKey: string, keys: string[]): Promise<DownloadResult[]> {\n if (!functionKey || functionKey.length === 0) {\n throw new BridgeAPIError('\"functionKey\" is required in store download.');\n }\n if (!Array.isArray(keys) || keys.length === 0) {\n throw new BridgeAPIError('\"keys\" is required and cannot be empty in store download.');\n }\n\n const downloadUrlsTokeys: Record<string, string> = await invoke(functionKey, keys);\n\n if (!downloadUrlsTokeys || typeof downloadUrlsTokeys !== \"object\") {\n throw new BridgeAPIError(\"Invalid response from functionKey\");\n }\n\n const downloadPromises = Object.entries(downloadUrlsTokeys).map(async ([downloadUrl, key]) => {\n try {\n const response = await fetch(downloadUrl, {\n method: \"GET\",\n });\n if (!response.ok) {\n return {\n success: false,\n key: key,\n status: response.status,\n error: `Download failed with status ${response.status}`,\n };\n }\n const blob = await response.blob();\n const disposition = response.headers.get(\"Content-Disposition\") ?? \"\";\n const name = disposition.match(/filename\\*=UTF-8''([^;]+)/)?.[1] ?? disposition.match(/filename=\"?([^\"]+)\"?/)?.[1] ?? \"\";\n\n return {\n success: true,\n key: key,\n blob,\n name,\n status: response.status,\n };\n } catch (error) {\n return {\n success: false,\n key: key,\n status: 503,\n error: error instanceof Error ? error.message : \"Download failed\",\n };\n }\n });\n\n return await Promise.all(downloadPromises);\n }\n\n async getMetadata(functionKey: string, keys: string[]): Promise<GetMetadataResult[]> {\n if (!functionKey || functionKey.length === 0) {\n throw new BridgeAPIError('\"functionKey\" is required in store getMetadata.');\n }\n if (!Array.isArray(keys) || keys.length === 0) {\n throw new BridgeAPIError('\"keys\" is required and cannot be empty in store getMetadata.');\n }\n const results = await Promise.all(\n keys.map(async (key) => {\n const result = await invoke(functionKey, key);\n if (!result || typeof result !== \"object\") {\n return {\n key,\n error: \"Invalid response from functionKey\",\n };\n }\n return result;\n }),\n );\n\n return results;\n }\n\n async delete(functionKey: string, keys: string[]): Promise<void> {\n if (!functionKey || functionKey.length === 0) {\n throw new BridgeAPIError('\"functionKey\" is required in store delete.');\n }\n if (!Array.isArray(keys) || keys.length === 0) {\n throw new BridgeAPIError('\"keys\" is required and cannot be empty in store delete.');\n }\n await Promise.all(\n keys.map(async (key) => {\n await invoke(functionKey, key);\n }),\n );\n }\n}\n\nexport const store = new NexusObjectStore();\n\nexport function sha256(buffer: ArrayBuffer): ArrayBuffer {\n const bytes = new Uint8Array(buffer);\n const len = bytes.length;\n const blockSize = 64;\n const hashSize = 32;\n\n const K = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be,\n 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa,\n 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 0x27b70a85,\n 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,\n 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f,\n 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2,\n ]);\n\n let h0 = 0x6a09e667,\n h1 = 0xbb67ae85,\n h2 = 0x3c6ef372,\n h3 = 0xa54ff53a;\n let h4 = 0x510e527f,\n h5 = 0x9b05688c,\n h6 = 0x1f83d9ab,\n h7 = 0x5be0cd19;\n\n const totalBits = BigInt(len) * 8n;\n const paddingLen = len % blockSize < 56 ? 56 - (len % blockSize) : 120 - (len % blockSize);\n const paddedLen = len + paddingLen + 8;\n const padded = new Uint8Array(paddedLen);\n padded.set(bytes);\n padded[len] = 0x80;\n\n const view = new DataView(padded.buffer, padded.byteOffset);\n view.setUint32(paddedLen - 4, Number((totalBits >> 32n) & 0xffffffffn));\n view.setUint32(paddedLen - 8, Number(totalBits & 0xffffffffn));\n\n for (let i = 0; i < paddedLen; i += blockSize) {\n const w = new Uint32Array(64);\n for (let j = 0; j < 16; j++) {\n w[j] = view.getUint32(i + j * 4);\n }\n\n for (let j = 16; j < 64; j++) {\n const s0 = ((w[j - 15] >>> 7) | (w[j - 15] << 25)) ^ ((w[j - 15] >>> 18) | (w[j - 15] << 14)) ^ (w[j - 15] >>> 3);\n const s1 = ((w[j - 2] >>> 17) | (w[j - 2] << 15)) ^ ((w[j - 2] >>> 19) | (w[j - 2] << 13)) ^ (w[j - 2] >>> 10);\n w[j] = (w[j - 16] + s0 + w[j - 7] + s1) >>> 0;\n }\n\n let a = h0,\n b = h1,\n c = h2,\n d = h3,\n e = h4,\n f = h5,\n g = h6,\n h = h7;\n\n for (let j = 0; j < 64; j++) {\n const S1 = ((e >>> 6) | (e << 26)) ^ ((e >>> 11) | (e << 21)) ^ ((e >>> 25) | (e << 7));\n const ch = (e & f) ^ (~e & g);\n const temp1 = (h + S1 + ch + K[j] + w[j]) >>> 0;\n const S0 = ((a >>> 2) | (a << 30)) ^ ((a >>> 13) | (a << 19)) ^ ((a >>> 22) | (a << 10));\n const maj = (a & b) ^ (a & c) ^ (b & c);\n const temp2 = (S0 + maj) >>> 0;\n\n h = g;\n g = f;\n f = e;\n e = (d + temp1) >>> 0;\n d = c;\n c = b;\n b = a;\n a = (temp1 + temp2) >>> 0;\n }\n\n h0 = (h0 + a) >>> 0;\n h1 = (h1 + b) >>> 0;\n h2 = (h2 + c) >>> 0;\n h3 = (h3 + d) >>> 0;\n h4 = (h4 + e) >>> 0;\n h5 = (h5 + f) >>> 0;\n h6 = (h6 + g) >>> 0;\n h7 = (h7 + h) >>> 0;\n }\n\n const result = new ArrayBuffer(hashSize);\n const resultView = new DataView(result);\n resultView.setUint32(0, h0);\n resultView.setUint32(4, h1);\n resultView.setUint32(8, h2);\n resultView.setUint32(12, h3);\n resultView.setUint32(16, h4);\n resultView.setUint32(20, h5);\n resultView.setUint32(24, h6);\n resultView.setUint32(28, h7);\n return result;\n}\n","import { NexusBridge } from \"./bridge\";\nimport { BridgeAPIError } from \"./error\";\nimport { RemoteInvokeOptions, RequestApiResponseData } from \"./models\";\nimport { buildPayloadByRequestInit, parseToResponseData } from \"./utils/request\";\n\nclass NexusRemote {\n async invoke(options: RemoteInvokeOptions): Promise<Response> {\n if (!options || typeof options !== \"object\") {\n throw new BridgeAPIError('\"options\" must be an object in remote invoke.');\n }\n if (typeof options.path !== \"string\" || options.path.trim().length === 0) {\n throw new BridgeAPIError('\"path\" is required and cannot be empty in remote invoke options.');\n }\n if (typeof options.method !== \"string\" || options.method.trim().length === 0) {\n throw new BridgeAPIError('\"method\" is required and cannot be empty in remote invoke options.');\n }\n\n const payload = await buildPayloadByRequestInit(options);\n const { status, headers, body } = await NexusBridge.call<RequestApiResponseData>(\"remoteInvoke\", payload);\n return parseToResponseData({ status, headers, body });\n }\n}\n\nexport const remote = new NexusRemote();\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAEM,SAAU,oBAAoB,CAAI,GAAW,EAAE,KAAQ,EAAA;AACxD,IAAA,MAAkB,CAAC,GAAG,CAAC,GAAG,KAAK;AACpC;AAEM,SAAU,mBAAmB,CAAI,GAAW,EAAA;AAC9C,IAAA,OAAQ,MAAkB,CAAC,GAAG,CAAC;AACnC;;ACSA,SAAS,SAAS,GAAA;AACd,IAAA,MAAM,MAAM,GAAG,mBAAmB,CAAe,qBAAqB,CAAC;AACvE,IAAA,OAAO,MAAM;AACjB;MAEa,WAAW,CAAA;AACpB,IAAA,OAAO,aAAa,GAAA;AAChB,QAAA,IAAI,CAAC,SAAS,EAAE,EAAE;YACd,MAAM,IAAI,KAAK,CAAC;;;AAGnB,QAAA,CAAA,CAAC;QACF;AACA,QAAA,OAAO,SAAS,EAAE,CAAC,IAAI;IAC3B;AAEA,IAAA,aAAa,IAAI,CAAI,IAAY,EAA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QAClG;AAEA,QAAA,MAAM,OAAO,GAAG,MAAM,yBAAyB,CAAC,OAAO,CAAC;AACxD,QAAA,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,MAAM,WAAW,CAAC,IAAI,CAAyB,cAAc,EAAE,OAAO,CAAC;QACzG,OAAO,mBAAmB,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACzD;AACH;AAEM,MAAM,MAAM,GAAG,IAAI,WAAW;;ACvBrC;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@pc-nexus/bridge",
3
- "version": "0.5.0-next.13",
3
+ "version": "0.5.0-next.15",
4
4
  "peerDependencies": {},
5
5
  "dependencies": {
6
- "@pc-nexus/models": "0.5.0-next.13",
6
+ "@pc-nexus/models": "0.5.0-next.15",
7
7
  "tslib": "^2.3.0"
8
8
  },
9
9
  "sideEffects": false,
@@ -1,5 +1,5 @@
1
- import { DialogOptions, DialogRef, DialogConfirmOptions, NavigationLocation, ExtensionData, NexusFullContext, NexusHistory, Subscription, NexusSupportedLocaleCode, GetTranslationsResult, Translator, NexusRequestInit, UploadResult, DownloadResult, GetMetadataResult } from '@pc-nexus/models';
2
- export { DialogConfirmOptions, DialogOptions, DialogRef, DownloadResult, ExtensionData, GetMetadataResult, GetTranslationsResult, HistoryAction, LocationDescriptor, NavigationLocation, NavigationTarget, NexusFullContext, NexusHistory, NexusRequestInit, NexusSupportedLocaleCode, Subscription, TranslationResourceContent, Translator, UnlistenCallback, UploadResult, ViewportSize } from '@pc-nexus/models';
1
+ import { DialogOptions, DialogRef, DialogConfirmOptions, NavigationLocation, ExtensionData, NexusFullContext, NexusHistory, Subscription, NexusSupportedLocaleCode, GetTranslationsResult, Translator, NexusRequestInit, UploadResult, DownloadResult, GetMetadataResult, RemoteInvokeOptions } from '@pc-nexus/models';
2
+ export { DialogConfirmOptions, DialogOptions, DialogRef, DownloadResult, ExtensionData, GetMetadataResult, GetTranslationsResult, HistoryAction, LocationDescriptor, NavigationLocation, NavigationTarget, NexusFullContext, NexusHistory, NexusRequestInit, NexusSupportedLocaleCode, RemoteInvokeOptions, Subscription, TranslationResourceContent, Translator, UnlistenCallback, UploadResult, ViewportSize } from '@pc-nexus/models';
3
3
 
4
4
  interface HostMessageEvent<T = unknown> {
5
5
  source: Window | null;
@@ -88,4 +88,9 @@ declare class NexusObjectStore {
88
88
  }
89
89
  declare const store: NexusObjectStore;
90
90
 
91
- export { api, dialog, events, i18n, invoke, router, store, view, BridgeAPIError as ɵBridgeAPIError, NexusBridge as ɵNexusBridge };
91
+ declare class NexusRemote {
92
+ invoke(options: RemoteInvokeOptions): Promise<Response>;
93
+ }
94
+ declare const remote: NexusRemote;
95
+
96
+ export { api, dialog, events, i18n, invoke, remote, router, store, view, BridgeAPIError as ɵBridgeAPIError, NexusBridge as ɵNexusBridge };