@mittwald/flow-remote-core 1.2.0-next.9 → 2.0.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_fa797cdfb8346ba050fd5d6367ccd451df47806c6ea34421e45e8_e52b779d86bc12aeba80f9d7805f6a15/node_modules/@quilted/threads/build/esm/Thread.mjs.map +1 -1
  2. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_fa797cdfb8346ba050fd5d6367ccd451df47806c6ea34421e45e8_e52b779d86bc12aeba80f9d7805f6a15/node_modules/@quilted/threads/build/esm/functions/ThreadFunctionsAutomatic.mjs.map +1 -1
  3. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_fa797cdfb8346ba050fd5d6367ccd451df47806c6ea34421e45e8_e52b779d86bc12aeba80f9d7805f6a15/node_modules/@quilted/threads/build/esm/serialization/ThreadSerializationStructuredClone.mjs.map +1 -1
  4. package/dist/types/connection/connectHostRenderRoot.d.ts +0 -1
  5. package/dist/types/connection/connectRemoteIframe.d.ts +0 -1
  6. package/dist/types/connection/index.d.ts +0 -1
  7. package/dist/types/connection/types.d.ts +0 -1
  8. package/dist/types/error.d.ts +0 -1
  9. package/dist/types/events/remoteEvents.d.ts +0 -1
  10. package/dist/types/ext-bridge/getWithMergedHostConfig.d.ts +0 -1
  11. package/dist/types/ext-bridge/implementation.d.ts +0 -1
  12. package/dist/types/index-node.d.ts +0 -1
  13. package/dist/types/index.d.ts +0 -1
  14. package/dist/types/serialization/FlowThreadSerialization.d.ts +0 -1
  15. package/dist/types/serialization/Serializer.d.ts +0 -1
  16. package/dist/types/serialization/index.d.ts +0 -1
  17. package/dist/types/serialization/serializers/dataTransferText.d.ts +0 -1
  18. package/dist/types/serialization/serializers/date.d.ts +0 -1
  19. package/dist/types/serialization/serializers/file.d.ts +0 -1
  20. package/dist/types/serialization/serializers/fileList.d.ts +0 -1
  21. package/dist/types/serialization/serializers/formData.d.ts +0 -1
  22. package/dist/types/serialization/serializers/index.d.ts +0 -1
  23. package/dist/types/serialization/serializers/passwordPolicy.d.ts +0 -1
  24. package/dist/types/shim.d.ts +0 -1
  25. package/package.json +9 -7
  26. package/dist/types/connection/connectHostRenderRoot.d.ts.map +0 -1
  27. package/dist/types/connection/connectRemoteIframe.d.ts.map +0 -1
  28. package/dist/types/connection/index.d.ts.map +0 -1
  29. package/dist/types/connection/threadMessageOrder.test.d.ts +0 -2
  30. package/dist/types/connection/threadMessageOrder.test.d.ts.map +0 -1
  31. package/dist/types/connection/types.d.ts.map +0 -1
  32. package/dist/types/error.d.ts.map +0 -1
  33. package/dist/types/events/remoteEvents.d.ts.map +0 -1
  34. package/dist/types/events/remoteEvents.test.d.ts +0 -2
  35. package/dist/types/events/remoteEvents.test.d.ts.map +0 -1
  36. package/dist/types/ext-bridge/getWithMergedHostConfig.d.ts.map +0 -1
  37. package/dist/types/ext-bridge/implementation.d.ts.map +0 -1
  38. package/dist/types/index-node.d.ts.map +0 -1
  39. package/dist/types/index.d.ts.map +0 -1
  40. package/dist/types/serialization/FlowThreadSerialization.d.ts.map +0 -1
  41. package/dist/types/serialization/FlowThreadSerialization.test.d.ts +0 -2
  42. package/dist/types/serialization/FlowThreadSerialization.test.d.ts.map +0 -1
  43. package/dist/types/serialization/Serialization.test.d.ts +0 -2
  44. package/dist/types/serialization/Serialization.test.d.ts.map +0 -1
  45. package/dist/types/serialization/Serializer.d.ts.map +0 -1
  46. package/dist/types/serialization/index.d.ts.map +0 -1
  47. package/dist/types/serialization/serializers/dataTransferText.d.ts.map +0 -1
  48. package/dist/types/serialization/serializers/date.d.ts.map +0 -1
  49. package/dist/types/serialization/serializers/file.d.ts.map +0 -1
  50. package/dist/types/serialization/serializers/fileList.d.ts.map +0 -1
  51. package/dist/types/serialization/serializers/formData.d.ts.map +0 -1
  52. package/dist/types/serialization/serializers/index.d.ts.map +0 -1
  53. package/dist/types/serialization/serializers/passwordPolicy.d.ts.map +0 -1
  54. package/dist/types/shim.d.ts.map +0 -1
  55. package/dist/types/tests/utils.d.ts +0 -2
  56. package/dist/types/tests/utils.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Thread.mjs","names":["#abort","#handlerForCall","#idsToResolver","#resolveCall","#callLocal","#waitForResult","#sendQueue","#receiveQueue"],"sources":["../../../../../../../../../../../../node_modules/.pnpm/@quilted+threads@3.3.1_patch_hash=fa797cdfb8346ba050fd5d6367ccd451df47806c6ea34421e45e8_e52b779d86bc12aeba80f9d7805f6a15/node_modules/@quilted/threads/build/esm/Thread.mjs"],"sourcesContent":["import { NestedAbortController } from '@quilted/events';\nimport { ThreadClosedError } from './errors.mjs';\nimport { nanoid } from './nanoid.mjs';\nimport { MESSAGE_FUNCTION_RELEASE, MESSAGE_FUNCTION_RESULT, MESSAGE_CALL_RESULT, MESSAGE_FUNCTION_CALL, MESSAGE_CALL } from './constants.mjs';\nimport { ThreadFunctionsAutomatic } from './functions/ThreadFunctionsAutomatic.mjs';\nimport { ThreadSerializationStructuredClone } from './serialization/ThreadSerializationStructuredClone.mjs';\n\n/**\n * A thread represents a target JavaScript environment that exposes a set\n * of callable, asynchronous methods. The thread takes care of automatically\n * encoding and decoding its arguments and return values, so you can interact\n * with it as if its methods were implemented in the same environment as your\n * own code.\n */\nclass Thread {\n get signal() {\n return this.#abort.signal;\n }\n\n get closed() {\n return this.#abort.signal.aborted;\n }\n\n #abort;\n #idsToResolver = (() => new Map())();\n\n /*\n * Serialization is async in this build, and the number of microtask turns a\n * payload takes is proportional to its size. Upstream is synchronous, so a\n * message was posted in the same stack frame as the call that produced it and\n * order came for free. Here two calls made in one task race, and the one whose\n * payload serializes in fewer turns wins — a larger batch followed by a smaller\n * one arrives second. For a stream of remote-DOM mutations that silently\n * applies the tree in the wrong order.\n *\n * So both directions get a queue. #sendQueue keeps `serialize` then post\n * atomic per call, #receiveQueue keeps `deserialize` then invoke atomic per\n * message. Each is a promise chain that never rejects, so one failed call\n * cannot wedge the thread.\n */\n #sendQueue = (() => Promise.resolve())();\n #receiveQueue = (() => Promise.resolve())();\n\n constructor(messages, {\n imports,\n exports,\n functions = new ThreadFunctionsAutomatic(),\n serialization = new ThreadSerializationStructuredClone(),\n signal\n } = {}) {\n this.messages = messages;\n this.#abort = signal ? new NestedAbortController(signal) : new AbortController();\n this.exports = exports ?? {};\n this.imports = createThreadImports(this.#handlerForCall.bind(this), imports);\n this.functions = functions;\n this.serialization = serialization;\n\n this.functions.start?.(this);\n this.serialization.start?.(this);\n\n this.signal.addEventListener('abort', () => {\n for (const id of this.#idsToResolver.keys()) {\n this.#resolveCall(id, undefined, new ThreadClosedError());\n }\n this.#idsToResolver.clear();\n }, { once: true });\n\n messages.listen(async (rawData) => {\n const isThreadMessageData = Array.isArray(rawData) && typeof rawData[0] === 'number';\n if (!isThreadMessageData) return;\n\n const data = rawData;\n\n switch (data[0]) {\n case MESSAGE_CALL: {\n const [, id, property, args] = data;\n const func = this.exports[property] ?? (() => {\n throw new Error(`No '${property}' method is exported from this thread`);\n });\n\n await this.#callLocal(func, args, (value, error, transferable) => {\n this.messages.send([MESSAGE_CALL_RESULT, id, value, error], transferable);\n });\n\n break;\n }\n\n case MESSAGE_FUNCTION_CALL: {\n const [, callID, funcID, args] = data;\n const func = this.functions.get(funcID, this) ?? missingThreadFunction;\n\n await this.#callLocal(func, args, (value, error, transferable) => {\n this.messages.send([MESSAGE_FUNCTION_RESULT, callID, value, error], transferable);\n });\n\n break;\n }\n\n case MESSAGE_CALL_RESULT:\n case MESSAGE_FUNCTION_RESULT: {\n this.#resolveCall(...data.slice(1));\n break;\n }\n\n case MESSAGE_FUNCTION_RELEASE: {\n const id = data[1];\n this.functions.release(id, this);\n break;\n }\n }\n }, { signal: this.signal });\n }\n\n close() {\n this.#abort.abort();\n }\n\n call(func, args) {\n if (this.closed) {\n return Promise.reject(new ThreadClosedError());\n }\n\n // Claim the id and its resolver before yielding, so the ids reflect call\n // order and a result cannot arrive before there is something to receive it.\n const id = nanoid();\n const done = this.#waitForResult(id);\n\n this.#sendQueue = this.#sendQueue.then(async () => {\n try {\n const transferable = [];\n const serialized = await this.serialization.serialize(args, this, transferable);\n\n func(id, serialized, transferable);\n } catch (error) {\n // Serializing the arguments failed, so nothing was sent and no result\n // will ever come back. Reject this call and leave the queue usable.\n this.#resolveCall(id, undefined, error);\n }\n });\n\n return done;\n }\n\n async #callLocal(func, args, withResult) {\n /*\n * The queue is handed on as soon as the function has been *invoked*, not\n * when it settles. Ordering only needs the calls to start in message order;\n * waiting for completion would let one slow export stall every later\n * message, and deadlock outright if that export awaits a call back to the\n * paired thread.\n */\n let releaseQueue;\n const invoked = new Promise((resolve) => {\n releaseQueue = resolve;\n });\n\n const predecessor = this.#receiveQueue;\n this.#receiveQueue = invoked;\n\n try {\n await predecessor;\n\n const pendingResult = this.functions.call\n ? this.functions.call(func, args, this) // keep original contract\n : func(...(await this.serialization.deserialize(args, this)));\n\n releaseQueue();\n\n const result = await pendingResult;\n\n const transferable = [];\n const serialized = await this.serialization.serialize(result, this, transferable);\n\n withResult(serialized, undefined, transferable);\n } catch (error) {\n releaseQueue();\n withResult(undefined, await this.serialization.serialize(error, this));\n }\n }\n\n #handlerForCall(property) {\n return (...args) => {\n try {\n if (typeof property !== 'string' && typeof property !== 'number') {\n throw new Error(`Can’t call a symbol method on a thread: ${property.toString()}`);\n }\n\n return this.call((id, serializedArgs, transferable) => {\n this.messages.send([MESSAGE_CALL, id, property, serializedArgs], transferable);\n }, args);\n } catch (error) {\n return Promise.reject(error);\n }\n };\n }\n\n #resolveCall(...args) {\n const callID = args[0];\n const resolver = this.#idsToResolver.get(callID);\n\n if (resolver) {\n resolver(...args);\n this.#idsToResolver.delete(callID);\n }\n }\n\n #waitForResult(id) {\n const promise = new Promise((resolve, reject) => {\n this.#idsToResolver.set(id, async (_, value, error) => {\n try {\n if (error == null) {\n resolve(await this.serialization.deserialize(value, this));\n } else {\n reject(await this.serialization.deserialize(error, this));\n }\n } catch (deserializeError) {\n reject(deserializeError);\n }\n });\n });\n\n Object.defineProperty(promise, Symbol.asyncIterator, {\n async *value() {\n const result = await promise;\n\n Object.defineProperty(result, Symbol.asyncIterator, {\n value: () => result\n });\n\n yield* result;\n }\n });\n\n return promise;\n }\n}\n\nfunction createThreadImports(handlerForImport, imported) {\n let call;\n\n if (imported == null) {\n if (typeof Proxy !== 'function') {\n throw new Error(`You must pass an array of callable methods in environments without Proxies.`);\n }\n\n const cache = new Map();\n\n call = new Proxy({}, {\n get(_target, property) {\n if (cache.has(property)) {\n return cache.get(property);\n }\n\n const handler = handlerForImport(property);\n cache.set(property, handler);\n return handler;\n }\n });\n } else {\n call = {};\n\n for (const method of imported) {\n Object.defineProperty(call, method, {\n value: handlerForImport(method),\n writable: false,\n configurable: true,\n enumerable: true\n });\n }\n }\n\n return call;\n}\n\nfunction missingThreadFunction() {\n throw new Error(`You attempted to call a function that is not stored. It may have already been released.`);\n}\n\nexport { Thread };\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;AAcA,IAAM,SAAN,MAAa;CACX,IAAI,SAAS;EACX,OAAO,KAAKA,OAAO;CACrB;CAEA,IAAI,SAAS;EACX,OAAO,KAAKA,OAAO,OAAO;CAC5B;CAEA;CACA,wCAAwB,IAAI,IAAI,EAAA,CAAG;CAgBnC,oBAAoB,QAAQ,QAAQ,EAAA,CAAG;CACvC,uBAAuB,QAAQ,QAAQ,EAAA,CAAG;CAE1C,YAAY,UAAU,EACpB,SACA,SACA,YAAY,IAAI,yBAAyB,GACzC,gBAAgB,IAAI,mCAAmC,GACvD,WACE,CAAC,GAAG;EACN,KAAK,WAAW;EAChB,KAAKA,SAAS,SAAS,IAAI,sBAAsB,MAAM,IAAI,IAAI,gBAAgB;EAC/E,KAAK,UAAU,WAAW,CAAC;EAC3B,KAAK,UAAU,oBAAoB,KAAKC,gBAAgB,KAAK,IAAI,GAAG,OAAO;EAC3E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UACnB,OAAO,eAAe,MAAM,QAAQ;GAClC,OAAO,iBAAiB,MAAM;GAC9B,UAAU;GACV,cAAc;GACd,YAAY;EACd,CAAC;CAEL;CAEA,OAAO;AACT;AAEA,SAAS,wBAAwB;CAC/B,MAAM,IAAI,MAAM,yFAAyF;AAC3G"}
1
+ {"version":3,"file":"Thread.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/@quilted+threads@3.3.1_patch_hash=fa797cdfb8346ba050fd5d6367ccd451df47806c6ea34421e45e8_e52b779d86bc12aeba80f9d7805f6a15/node_modules/@quilted/threads/build/esm/Thread.mjs"],"sourcesContent":["import { NestedAbortController } from '@quilted/events';\nimport { ThreadClosedError } from './errors.mjs';\nimport { nanoid } from './nanoid.mjs';\nimport { MESSAGE_FUNCTION_RELEASE, MESSAGE_FUNCTION_RESULT, MESSAGE_CALL_RESULT, MESSAGE_FUNCTION_CALL, MESSAGE_CALL } from './constants.mjs';\nimport { ThreadFunctionsAutomatic } from './functions/ThreadFunctionsAutomatic.mjs';\nimport { ThreadSerializationStructuredClone } from './serialization/ThreadSerializationStructuredClone.mjs';\n\n/**\n * A thread represents a target JavaScript environment that exposes a set\n * of callable, asynchronous methods. The thread takes care of automatically\n * encoding and decoding its arguments and return values, so you can interact\n * with it as if its methods were implemented in the same environment as your\n * own code.\n */\nclass Thread {\n get signal() {\n return this.#abort.signal;\n }\n\n get closed() {\n return this.#abort.signal.aborted;\n }\n\n #abort;\n #idsToResolver = (() => new Map())();\n\n /*\n * Serialization is async in this build, and the number of microtask turns a\n * payload takes is proportional to its size. Upstream is synchronous, so a\n * message was posted in the same stack frame as the call that produced it and\n * order came for free. Here two calls made in one task race, and the one whose\n * payload serializes in fewer turns wins — a larger batch followed by a smaller\n * one arrives second. For a stream of remote-DOM mutations that silently\n * applies the tree in the wrong order.\n *\n * So both directions get a queue. #sendQueue keeps `serialize` then post\n * atomic per call, #receiveQueue keeps `deserialize` then invoke atomic per\n * message. Each is a promise chain that never rejects, so one failed call\n * cannot wedge the thread.\n */\n #sendQueue = (() => Promise.resolve())();\n #receiveQueue = (() => Promise.resolve())();\n\n constructor(messages, {\n imports,\n exports,\n functions = new ThreadFunctionsAutomatic(),\n serialization = new ThreadSerializationStructuredClone(),\n signal\n } = {}) {\n this.messages = messages;\n this.#abort = signal ? new NestedAbortController(signal) : new AbortController();\n this.exports = exports ?? {};\n this.imports = createThreadImports(this.#handlerForCall.bind(this), imports);\n this.functions = functions;\n this.serialization = serialization;\n\n this.functions.start?.(this);\n this.serialization.start?.(this);\n\n this.signal.addEventListener('abort', () => {\n for (const id of this.#idsToResolver.keys()) {\n this.#resolveCall(id, undefined, new ThreadClosedError());\n }\n this.#idsToResolver.clear();\n }, { once: true });\n\n messages.listen(async (rawData) => {\n const isThreadMessageData = Array.isArray(rawData) && typeof rawData[0] === 'number';\n if (!isThreadMessageData) return;\n\n const data = rawData;\n\n switch (data[0]) {\n case MESSAGE_CALL: {\n const [, id, property, args] = data;\n const func = this.exports[property] ?? (() => {\n throw new Error(`No '${property}' method is exported from this thread`);\n });\n\n await this.#callLocal(func, args, (value, error, transferable) => {\n this.messages.send([MESSAGE_CALL_RESULT, id, value, error], transferable);\n });\n\n break;\n }\n\n case MESSAGE_FUNCTION_CALL: {\n const [, callID, funcID, args] = data;\n const func = this.functions.get(funcID, this) ?? missingThreadFunction;\n\n await this.#callLocal(func, args, (value, error, transferable) => {\n this.messages.send([MESSAGE_FUNCTION_RESULT, callID, value, error], transferable);\n });\n\n break;\n }\n\n case MESSAGE_CALL_RESULT:\n case MESSAGE_FUNCTION_RESULT: {\n this.#resolveCall(...data.slice(1));\n break;\n }\n\n case MESSAGE_FUNCTION_RELEASE: {\n const id = data[1];\n this.functions.release(id, this);\n break;\n }\n }\n }, { signal: this.signal });\n }\n\n close() {\n this.#abort.abort();\n }\n\n call(func, args) {\n if (this.closed) {\n return Promise.reject(new ThreadClosedError());\n }\n\n // Claim the id and its resolver before yielding, so the ids reflect call\n // order and a result cannot arrive before there is something to receive it.\n const id = nanoid();\n const done = this.#waitForResult(id);\n\n this.#sendQueue = this.#sendQueue.then(async () => {\n try {\n const transferable = [];\n const serialized = await this.serialization.serialize(args, this, transferable);\n\n func(id, serialized, transferable);\n } catch (error) {\n // Serializing the arguments failed, so nothing was sent and no result\n // will ever come back. Reject this call and leave the queue usable.\n this.#resolveCall(id, undefined, error);\n }\n });\n\n return done;\n }\n\n async #callLocal(func, args, withResult) {\n /*\n * The queue is handed on as soon as the function has been *invoked*, not\n * when it settles. Ordering only needs the calls to start in message order;\n * waiting for completion would let one slow export stall every later\n * message, and deadlock outright if that export awaits a call back to the\n * paired thread.\n */\n let releaseQueue;\n const invoked = new Promise((resolve) => {\n releaseQueue = resolve;\n });\n\n const predecessor = this.#receiveQueue;\n this.#receiveQueue = invoked;\n\n try {\n await predecessor;\n\n const pendingResult = this.functions.call\n ? this.functions.call(func, args, this) // keep original contract\n : func(...(await this.serialization.deserialize(args, this)));\n\n releaseQueue();\n\n const result = await pendingResult;\n\n const transferable = [];\n const serialized = await this.serialization.serialize(result, this, transferable);\n\n withResult(serialized, undefined, transferable);\n } catch (error) {\n releaseQueue();\n withResult(undefined, await this.serialization.serialize(error, this));\n }\n }\n\n #handlerForCall(property) {\n return (...args) => {\n try {\n if (typeof property !== 'string' && typeof property !== 'number') {\n throw new Error(`Can’t call a symbol method on a thread: ${property.toString()}`);\n }\n\n return this.call((id, serializedArgs, transferable) => {\n this.messages.send([MESSAGE_CALL, id, property, serializedArgs], transferable);\n }, args);\n } catch (error) {\n return Promise.reject(error);\n }\n };\n }\n\n #resolveCall(...args) {\n const callID = args[0];\n const resolver = this.#idsToResolver.get(callID);\n\n if (resolver) {\n resolver(...args);\n this.#idsToResolver.delete(callID);\n }\n }\n\n #waitForResult(id) {\n const promise = new Promise((resolve, reject) => {\n this.#idsToResolver.set(id, async (_, value, error) => {\n try {\n if (error == null) {\n resolve(await this.serialization.deserialize(value, this));\n } else {\n reject(await this.serialization.deserialize(error, this));\n }\n } catch (deserializeError) {\n reject(deserializeError);\n }\n });\n });\n\n Object.defineProperty(promise, Symbol.asyncIterator, {\n async *value() {\n const result = await promise;\n\n Object.defineProperty(result, Symbol.asyncIterator, {\n value: () => result\n });\n\n yield* result;\n }\n });\n\n return promise;\n }\n}\n\nfunction createThreadImports(handlerForImport, imported) {\n let call;\n\n if (imported == null) {\n if (typeof Proxy !== 'function') {\n throw new Error(`You must pass an array of callable methods in environments without Proxies.`);\n }\n\n const cache = new Map();\n\n call = new Proxy({}, {\n get(_target, property) {\n if (cache.has(property)) {\n return cache.get(property);\n }\n\n const handler = handlerForImport(property);\n cache.set(property, handler);\n return handler;\n }\n });\n } else {\n call = {};\n\n for (const method of imported) {\n Object.defineProperty(call, method, {\n value: handlerForImport(method),\n writable: false,\n configurable: true,\n enumerable: true\n });\n }\n }\n\n return call;\n}\n\nfunction missingThreadFunction() {\n throw new Error(`You attempted to call a function that is not stored. It may have already been released.`);\n}\n\nexport { Thread };\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;AAcA,IAAM,SAAN,MAAa;CACX,IAAI,SAAS;EACX,OAAO,KAAK,OAAO;CACrB;CAEA,IAAI,SAAS;EACX,OAAO,KAAK,OAAO,OAAO;CAC5B;CAEA;CACA,wCAAwB,IAAI,IAAI,EAAA,CAAG;CAgBnC,oBAAoB,QAAQ,QAAQ,EAAA,CAAG;CACvC,uBAAuB,QAAQ,QAAQ,EAAA,CAAG;CAE1C,YAAY,UAAU,EACpB,SACA,SACA,YAAY,IAAI,yBAAyB,GACzC,gBAAgB,IAAI,mCAAmC,GACvD,WACE,CAAC,GAAG;EACN,KAAK,WAAW;EAChB,KAAK,SAAS,SAAS,IAAI,sBAAsB,MAAM,IAAI,IAAI,gBAAgB;EAC/E,KAAK,UAAU,WAAW,CAAC;EAC3B,KAAK,UAAU,oBAAoB,KAAK,gBAAgB,KAAK,IAAI,GAAG,OAAO;EAC3E,KAAK,YAAY;EACjB,KAAK,gBAAgB;EAErB,K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9B,UAAU;GACV,cAAc;GACd,YAAY;EACd,CAAC;CAEL;CAEA,OAAO;AACT;AAEA,SAAS,wBAAwB;CAC/B,MAAM,IAAI,MAAM,yFAAyF;AAC3G"}
@@ -1 +1 @@
1
- {"version":3,"file":"ThreadFunctionsAutomatic.mjs","names":["#idsToFunction","#functionsToId","#idsToProxy","#finalizationRegistry","#finalization"],"sources":["../../../../../../../../../../../../../node_modules/.pnpm/@quilted+threads@3.3.1_patch_hash=fa797cdfb8346ba050fd5d6367ccd451df47806c6ea34421e45e8_e52b779d86bc12aeba80f9d7805f6a15/node_modules/@quilted/threads/build/esm/functions/ThreadFunctionsAutomatic.mjs"],"sourcesContent":["import { MESSAGE_FUNCTION_CALL, MESSAGE_FUNCTION_RELEASE } from '../constants.mjs';\nimport { nanoid } from '../nanoid.mjs';\n\n/**\n * A strategy for managing functions across threads that automatically releases\n * functions when they are no longer needed. This is done by deserializing functions\n * into a proxy that can be called, and wrapping that proxy in a `FinalizationRegistry`,\n * which allows us to send a message to the parent thread when the function is no\n * longer used.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry\n */\nclass ThreadFunctionsAutomatic {\n #functionsToId = (() => new Map())();\n #idsToFunction = (() => new Map())();\n #idsToProxy = (() => new Map())();\n #finalization = (() => new WeakMap())();\n get(id) {\n return this.#idsToFunction.get(id);\n }\n release(id) {\n const func = this.#idsToFunction.get(id);\n if (func) {\n this.#idsToFunction.delete(id);\n this.#functionsToId.delete(func);\n }\n return Boolean(func);\n }\n serialize(func) {\n let id = this.#functionsToId.get(func);\n if (id == null) {\n id = nanoid();\n this.#functionsToId.set(func, id);\n this.#idsToFunction.set(id, func);\n }\n return id;\n }\n deserialize(id, thread) {\n let proxy = this.#idsToProxy.get(id)?.deref();\n if (proxy) return proxy;\n proxy = (...args) => {\n if (!this.#idsToProxy.has(id)) {\n throw new Error('You attempted to call a function that was already revoked.');\n }\n return thread.call((callID, args, transferable) => {\n thread.messages.send([MESSAGE_FUNCTION_CALL, callID, id, args], transferable);\n }, args);\n };\n this.#finalizationRegistry(thread)?.register(proxy, id);\n this.#idsToProxy.set(id, new WeakRef(proxy));\n return proxy;\n }\n #finalizationRegistry(thread) {\n let finalization = this.#finalization.get(thread);\n if (typeof FinalizationRegistry === 'undefined') {\n return undefined;\n }\n if (!finalization) {\n finalization = new FinalizationRegistry(id => {\n thread.messages.send([MESSAGE_FUNCTION_RELEASE, id]);\n });\n this.#finalization.set(thread, finalization);\n }\n return finalization;\n }\n}\n\nexport { ThreadFunctionsAutomatic };\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;AAYA,IAAM,2BAAN,MAA+B;CAC7B,wCAAwB,IAAI,IAAI,EAAA,CAAG;CACnC,wCAAwB,IAAI,IAAI,EAAA,CAAG;CACnC,qCAAqB,IAAI,IAAI,EAAA,CAAG;CAChC,uCAAuB,IAAI,QAAQ,EAAA,CAAG;CACtC,IAAI,IAAI;EACN,OAAO,KAAKA,eAAe,IAAI,EAAE;CACnC;CACA,QAAQ,IAAI;EACV,MAAM,OAAO,KAAKA,eAAe,IAAI,EAAE;EACvC,IAAI,MAAM;GACR,KAAKA,eAAe,OAAO,EAAE;GAC7B,KAAKC,eAAe,OAAO,IAAI;EACjC;EACA,OAAO,QAAQ,IAAI;CACrB;CACA,UAAU,MAAM;EACd,IAAI,KAAK,KAAKA,eAAe,IAAI,IAAI;EACrC,IAAI,MAAM,MAAM;GACd,KAAK,OAAO;GACZ,KAAKA,eAAe,IAAI,MAAM,EAAE;GAChC,KAAKD,eAAe,IAAI,IAAI,IAAI;EAClC;EACA,OAAO;CACT;CACA,YAAY,IAAI,QAAQ;EACtB,IAAI,QAAQ,KAAKE,YAAY,IAAI,EAAE,CAAC,EAAE,MAAM;EAC5C,IAAI,OAAO,OAAO;EAClB,SAAS,GAAG,SAAS;GACnB,IAAI,CAAC,KAAKA,YAAY,IAAI,EAAE,GAC1B,MAAM,IAAI,MAAM,4DAA4D;GAE9E,OAAO,OAAO,MAAM,QAAQ,MAAM,iBAAiB;IACjD,OAAO,SAAS,KAAK;;KAAwB;KAAQ;KAAI;IAAI,GAAG,YAAY;GAC9E,GAAG,IAAI;EACT;EACA,KAAKC,sBAAsB,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE;EACtD,KAAKD,YAAY,IAAI,IAAI,IAAI,QAAQ,KAAK,CAAC;EAC3C,OAAO;CACT;CACA,sBAAsB,QAAQ;EAC5B,IAAI,eAAe,KAAKE,cAAc,IAAI,MAAM;EAChD,IAAI,OAAO,yBAAyB,aAClC;EAEF,IAAI,CAAC,cAAc;GACjB,eAAe,IAAI,sBAAqB,OAAM;IAC5C,OAAO,SAAS,KAAK,CAAA,GAA2B,EAAE,CAAC;GACrD,CAAC;GACD,KAAKA,cAAc,IAAI,QAAQ,YAAY;EAC7C;EACA,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"ThreadFunctionsAutomatic.mjs","names":[],"sources":["../../../../../../../../../../../../../node_modules/.pnpm/@quilted+threads@3.3.1_patch_hash=fa797cdfb8346ba050fd5d6367ccd451df47806c6ea34421e45e8_e52b779d86bc12aeba80f9d7805f6a15/node_modules/@quilted/threads/build/esm/functions/ThreadFunctionsAutomatic.mjs"],"sourcesContent":["import { MESSAGE_FUNCTION_CALL, MESSAGE_FUNCTION_RELEASE } from '../constants.mjs';\nimport { nanoid } from '../nanoid.mjs';\n\n/**\n * A strategy for managing functions across threads that automatically releases\n * functions when they are no longer needed. This is done by deserializing functions\n * into a proxy that can be called, and wrapping that proxy in a `FinalizationRegistry`,\n * which allows us to send a message to the parent thread when the function is no\n * longer used.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry\n */\nclass ThreadFunctionsAutomatic {\n #functionsToId = (() => new Map())();\n #idsToFunction = (() => new Map())();\n #idsToProxy = (() => new Map())();\n #finalization = (() => new WeakMap())();\n get(id) {\n return this.#idsToFunction.get(id);\n }\n release(id) {\n const func = this.#idsToFunction.get(id);\n if (func) {\n this.#idsToFunction.delete(id);\n this.#functionsToId.delete(func);\n }\n return Boolean(func);\n }\n serialize(func) {\n let id = this.#functionsToId.get(func);\n if (id == null) {\n id = nanoid();\n this.#functionsToId.set(func, id);\n this.#idsToFunction.set(id, func);\n }\n return id;\n }\n deserialize(id, thread) {\n let proxy = this.#idsToProxy.get(id)?.deref();\n if (proxy) return proxy;\n proxy = (...args) => {\n if (!this.#idsToProxy.has(id)) {\n throw new Error('You attempted to call a function that was already revoked.');\n }\n return thread.call((callID, args, transferable) => {\n thread.messages.send([MESSAGE_FUNCTION_CALL, callID, id, args], transferable);\n }, args);\n };\n this.#finalizationRegistry(thread)?.register(proxy, id);\n this.#idsToProxy.set(id, new WeakRef(proxy));\n return proxy;\n }\n #finalizationRegistry(thread) {\n let finalization = this.#finalization.get(thread);\n if (typeof FinalizationRegistry === 'undefined') {\n return undefined;\n }\n if (!finalization) {\n finalization = new FinalizationRegistry(id => {\n thread.messages.send([MESSAGE_FUNCTION_RELEASE, id]);\n });\n this.#finalization.set(thread, finalization);\n }\n return finalization;\n }\n}\n\nexport { ThreadFunctionsAutomatic };\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;AAYA,IAAM,2BAAN,MAA+B;CAC7B,wCAAwB,IAAI,IAAI,EAAA,CAAG;CACnC,wCAAwB,IAAI,IAAI,EAAA,CAAG;CACnC,qCAAqB,IAAI,IAAI,EAAA,CAAG;CAChC,uCAAuB,IAAI,QAAQ,EAAA,CAAG;CACtC,IAAI,IAAI;EACN,OAAO,KAAK,eAAe,IAAI,EAAE;CACnC;CACA,QAAQ,IAAI;EACV,MAAM,OAAO,KAAK,eAAe,IAAI,EAAE;EACvC,IAAI,MAAM;GACR,KAAK,eAAe,OAAO,EAAE;GAC7B,KAAK,eAAe,OAAO,IAAI;EACjC;EACA,OAAO,QAAQ,IAAI;CACrB;CACA,UAAU,MAAM;EACd,IAAI,KAAK,KAAK,eAAe,IAAI,IAAI;EACrC,IAAI,MAAM,MAAM;GACd,KAAK,OAAO;GACZ,KAAK,eAAe,IAAI,MAAM,EAAE;GAChC,KAAK,eAAe,IAAI,IAAI,IAAI;EAClC;EACA,OAAO;CACT;CACA,YAAY,IAAI,QAAQ;EACtB,IAAI,QAAQ,KAAK,YAAY,IAAI,EAAE,CAAC,EAAE,MAAM;EAC5C,IAAI,OAAO,OAAO;EAClB,SAAS,GAAG,SAAS;GACnB,IAAI,CAAC,KAAK,YAAY,IAAI,EAAE,GAC1B,MAAM,IAAI,MAAM,4DAA4D;GAE9E,OAAO,OAAO,MAAM,QAAQ,MAAM,iBAAiB;IACjD,OAAO,SAAS,KAAK;;KAAwB;KAAQ;KAAI;IAAI,GAAG,YAAY;GAC9E,GAAG,IAAI;EACT;EACA,KAAK,sBAAsB,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE;EACtD,KAAK,YAAY,IAAI,IAAI,IAAI,QAAQ,KAAK,CAAC;EAC3C,OAAO;CACT;CACA,sBAAsB,QAAQ;EAC5B,IAAI,eAAe,KAAK,cAAc,IAAI,MAAM;EAChD,IAAI,OAAO,yBAAyB,aAClC;EAEF,IAAI,CAAC,cAAc;GACjB,eAAe,IAAI,sBAAqB,OAAM;IAC5C,OAAO,SAAS,KAAK,CAAA,GAA2B,EAAE,CAAC;GACrD,CAAC;GACD,KAAK,cAAc,IAAI,QAAQ,YAAY;EAC7C;EACA,OAAO;CACT;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"ThreadSerializationStructuredClone.mjs","names":["#customSerializer","#customDeserializer","#serializeInternal","#deserializeInternal"],"sources":["../../../../../../../../../../../../../node_modules/.pnpm/@quilted+threads@3.3.1_patch_hash=fa797cdfb8346ba050fd5d6367ccd451df47806c6ea34421e45e8_e52b779d86bc12aeba80f9d7805f6a15/node_modules/@quilted/threads/build/esm/serialization/ThreadSerializationStructuredClone.mjs"],"sourcesContent":["import { TRANSFERABLE, SERIALIZE_METHOD } from '../constants.mjs';\nimport { isIterator, isBasicObject } from './shared.mjs';\n\nconst FUNCTION = '_@f';\nconst ASYNC_ITERATOR = '_@i';\n\n/**\n * A thread encoder that can transfer supports a wide variety of JavaScript types by\n * converting them to a format that the [`structuredClone`](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm)\n * algorithm can process. This\n *\n * Additionally, this encoder will convert functions into a JSON-friendly representation.\n * These functions will use a manual memory management technique to ensure they can be\n * garbage collected by default, but can be configured to use a `WeakRef`-based automatic\n * memory management system by setting the `garbageCollection: 'weak-ref'` option.\n */\nclass ThreadSerializationStructuredClone {\n #customSerializer;\n #customDeserializer;\n\n constructor(options) {\n this.#customSerializer = options?.serialize;\n this.#customDeserializer = options?.deserialize;\n }\n\n /**\n * Serializes a value into a structured cloning-compatible format that can be transferred between threads.\n */\n async serialize(value, thread, transferable) {\n return this.#serializeInternal(value, thread, transferable);\n }\n\n async #serializeInternal(value, thread, transferable, seen = new Map(), isApplyingDefault = false) {\n if (value == null) return value;\n if (seen.has(value)) return seen.get(value);\n\n /*\n * Prevent circular references. `undefined` parks a placeholder so a value\n * that reaches itself terminates instead of recursing forever; the real\n * result overwrites it once this frame is done.\n *\n * This only holds while serialization visits one value at a time. Upstream\n * is synchronous, so that is free. This build is async (Flow's serializers\n * await File reads), which makes it a rule the traversal has to keep: every\n * container below walks its members sequentially. Serialize them\n * concurrently and a second reference reaching the same value from a\n * parallel branch reads the placeholder while the first branch is still in\n * flight, and silently serializes to `undefined`.\n */\n seen.set(value, undefined);\n\n if (typeof value === 'object') {\n if (this.#customSerializer && !isApplyingDefault) {\n const customValue = await this.#customSerializer(\n value,\n (value) => this.#serializeInternal(value, thread, transferable, seen, true),\n thread,\n transferable,\n );\n\n if (customValue !== undefined) {\n seen.set(value, customValue);\n return customValue;\n }\n }\n\n if (value[TRANSFERABLE]) {\n transferable?.push(value);\n seen.set(value, value);\n return value;\n }\n\n const serializeValue = (value) => {\n return this.#serializeInternal(value, thread, transferable, seen);\n };\n\n if (typeof value[SERIALIZE_METHOD] === 'function') {\n const result = await value[SERIALIZE_METHOD]({\n serialize: serializeValue,\n });\n\n seen.set(value, result);\n return result;\n }\n\n if (Array.isArray(value)) {\n const result = [];\n\n for (const item of value) {\n result.push(await serializeValue(item));\n }\n\n seen.set(value, result);\n return result;\n }\n\n if (value instanceof Map) {\n const entries = [];\n\n for (const [entryKey, entryValue] of value.entries()) {\n entries.push([\n await serializeValue(entryKey),\n await serializeValue(entryValue),\n ]);\n }\n\n const result = new Map(entries);\n seen.set(value, result);\n return result;\n }\n\n if (value instanceof Set) {\n const entries = [];\n\n for (const entry of value) {\n entries.push(await serializeValue(entry));\n }\n\n const result = new Set(entries);\n seen.set(value, result);\n return result;\n }\n\n const valueIsIterator = isIterator(value);\n\n if (isBasicObject(value) || valueIsIterator) {\n const result = {};\n\n for (const key of Object.keys(value)) {\n result[key] = await serializeValue(value[key]);\n }\n\n if (valueIsIterator) {\n result.next ??= await serializeValue(value.next.bind(value));\n result.return ??= await serializeValue(value.return.bind(value));\n result.throw ??= await serializeValue(value.throw.bind(value));\n result[ASYNC_ITERATOR] = true;\n }\n\n seen.set(value, result);\n return result;\n }\n }\n\n if (typeof value === 'function') {\n const serialized = thread.functions.serialize(value, thread, transferable);\n const result = { [FUNCTION]: serialized };\n\n seen.set(value, result);\n return result;\n }\n\n seen.set(value, value);\n return value;\n }\n\n /**\n * Deserializes a structured cloning-compatible value from another thread.\n */\n async deserialize(value, thread) {\n return this.#deserializeInternal(value, thread);\n }\n\n async #deserializeInternal(value, thread, isApplyingDefault = false) {\n if (value == null) return value;\n\n if (typeof value === 'object') {\n if (this.#customDeserializer && !isApplyingDefault) {\n const customValue = await this.#customDeserializer(\n value,\n (value) => this.#deserializeInternal(value, thread, true),\n thread,\n );\n\n if (customValue !== undefined) {\n return customValue;\n }\n }\n\n if (value == null) {\n return value;\n }\n\n if (Array.isArray(value)) {\n return Promise.all(value.map((value) => this.#deserializeInternal(value, thread)));\n }\n\n if (value instanceof Map) {\n const entries = await Promise.all(\n [...value].map(async ([key, value]) => [\n await this.#deserializeInternal(key, thread),\n await this.#deserializeInternal(value, thread),\n ]),\n );\n\n return new Map(entries);\n }\n\n if (value instanceof Set) {\n const entries = await Promise.all(\n [...value].map((entry) => this.#deserializeInternal(entry, thread)),\n );\n\n return new Set(entries);\n }\n\n if (FUNCTION in value) {\n const func = thread.functions.deserialize(value[FUNCTION], thread);\n return func;\n }\n\n if (!isBasicObject(value)) {\n return value;\n }\n\n const result = {};\n\n for (const key of Object.keys(value)) {\n if (key === ASYNC_ITERATOR) {\n result[Symbol.asyncIterator] = () => result;\n } else {\n result[key] = await this.#deserializeInternal(value[key], thread);\n }\n }\n\n return result;\n }\n\n return value;\n }\n}\n\nexport { ThreadSerializationStructuredClone };\n"],"x_google_ignoreList":[0],"mappings":";;;AAGA,IAAM,WAAW;AACjB,IAAM,iBAAiB;;;;;;;;;;;AAYvB,IAAM,qCAAN,MAAyC;CACvC;CACA;CAEA,YAAY,SAAS;EACnB,KAAKA,oBAAoB,SAAS;EAClC,KAAKC,sBAAsB,SAAS;CACtC;;;;CAKA,MAAM,UAAU,OAAO,QAAQ,cAAc;EAC3C,OAAO,KAAKC,mBAAmB,OAAO,QAAQ,YAAY;CAC5D;CAEA,MAAMA,mBAAmB,OAAO,QAAQ,cAAc,uBAAO,IAAI,IAAI,GAAG,oBAAoB,OAAO;EACjG,IAAI,SAAS,MAAM,OAAO;EAC1B,IAAI,KAAK,IAAI,KAAK,GAAG,OAAO,KAAK,IAAI,KAAK;EAe1C,KAAK,IAAI,OAAO,KAAA,CAAS;EAEzB,IAAI,OAAO,UAAU,UAAU;GAC7B,IAAI,KAAKF,qBAAqB,CAAC,mBAAmB;IAChD,MAAM,cAAc,MAAM,KAAKA,kBAC7B,QACC,UAAU,KAAKE,mBAAmB,OAAO,QAAQ,cAAc,MAAM,IAAI,GAC1E,QACA,YACF;IAEA,IAAI,gBAAgB,KAAA,GAAW;KAC7B,KAAK,IAAI,OAAO,WAA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;GACxB;GAEA,IAAI,iBAAiB,KAAK;IACxB,MAAM,UAAU,MAAM,QAAQ,IAC5B,CAAC,GAAG,KAAK,CAAC,CAAC,KAAK,UAAU,KAAKA,qBAAqB,OAAO,MAAM,CAAC,CACpE;IAEA,OAAO,IAAI,IAAI,OAAO;GACxB;GAEA,IAAI,YAAY,OAEd,OADa,OAAO,UAAU,YAAY,MAAM,WAAW,MACjD;GAGZ,IAAI,CAAC,cAAc,KAAK,GACtB,OAAO;GAGT,MAAM,SAAS,CAAC;GAEhB,KAAK,MAAM,OAAO,OAAO,KAAK,KAAK,GACjC,IAAI,QAAQ,gBACV,OAAO,OAAO,uBAAuB;QAErC,OAAO,OAAO,MAAM,KAAKA,qBAAqB,MAAM,MAAM,MAAM;GAIpE,OAAO;EACT;EAEA,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"ThreadSerializationStructuredClone.mjs","names":[],"sources":["../../../../../../../../../../../../../node_modules/.pnpm/@quilted+threads@3.3.1_patch_hash=fa797cdfb8346ba050fd5d6367ccd451df47806c6ea34421e45e8_e52b779d86bc12aeba80f9d7805f6a15/node_modules/@quilted/threads/build/esm/serialization/ThreadSerializationStructuredClone.mjs"],"sourcesContent":["import { TRANSFERABLE, SERIALIZE_METHOD } from '../constants.mjs';\nimport { isIterator, isBasicObject } from './shared.mjs';\n\nconst FUNCTION = '_@f';\nconst ASYNC_ITERATOR = '_@i';\n\n/**\n * A thread encoder that can transfer supports a wide variety of JavaScript types by\n * converting them to a format that the [`structuredClone`](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm)\n * algorithm can process. This\n *\n * Additionally, this encoder will convert functions into a JSON-friendly representation.\n * These functions will use a manual memory management technique to ensure they can be\n * garbage collected by default, but can be configured to use a `WeakRef`-based automatic\n * memory management system by setting the `garbageCollection: 'weak-ref'` option.\n */\nclass ThreadSerializationStructuredClone {\n #customSerializer;\n #customDeserializer;\n\n constructor(options) {\n this.#customSerializer = options?.serialize;\n this.#customDeserializer = options?.deserialize;\n }\n\n /**\n * Serializes a value into a structured cloning-compatible format that can be transferred between threads.\n */\n async serialize(value, thread, transferable) {\n return this.#serializeInternal(value, thread, transferable);\n }\n\n async #serializeInternal(value, thread, transferable, seen = new Map(), isApplyingDefault = false) {\n if (value == null) return value;\n if (seen.has(value)) return seen.get(value);\n\n /*\n * Prevent circular references. `undefined` parks a placeholder so a value\n * that reaches itself terminates instead of recursing forever; the real\n * result overwrites it once this frame is done.\n *\n * This only holds while serialization visits one value at a time. Upstream\n * is synchronous, so that is free. This build is async (Flow's serializers\n * await File reads), which makes it a rule the traversal has to keep: every\n * container below walks its members sequentially. Serialize them\n * concurrently and a second reference reaching the same value from a\n * parallel branch reads the placeholder while the first branch is still in\n * flight, and silently serializes to `undefined`.\n */\n seen.set(value, undefined);\n\n if (typeof value === 'object') {\n if (this.#customSerializer && !isApplyingDefault) {\n const customValue = await this.#customSerializer(\n value,\n (value) => this.#serializeInternal(value, thread, transferable, seen, true),\n thread,\n transferable,\n );\n\n if (customValue !== undefined) {\n seen.set(value, customValue);\n return customValue;\n }\n }\n\n if (value[TRANSFERABLE]) {\n transferable?.push(value);\n seen.set(value, value);\n return value;\n }\n\n const serializeValue = (value) => {\n return this.#serializeInternal(value, thread, transferable, seen);\n };\n\n if (typeof value[SERIALIZE_METHOD] === 'function') {\n const result = await value[SERIALIZE_METHOD]({\n serialize: serializeValue,\n });\n\n seen.set(value, result);\n return result;\n }\n\n if (Array.isArray(value)) {\n const result = [];\n\n for (const item of value) {\n result.push(await serializeValue(item));\n }\n\n seen.set(value, result);\n return result;\n }\n\n if (value instanceof Map) {\n const entries = [];\n\n for (const [entryKey, entryValue] of value.entries()) {\n entries.push([\n await serializeValue(entryKey),\n await serializeValue(entryValue),\n ]);\n }\n\n const result = new Map(entries);\n seen.set(value, result);\n return result;\n }\n\n if (value instanceof Set) {\n const entries = [];\n\n for (const entry of value) {\n entries.push(await serializeValue(entry));\n }\n\n const result = new Set(entries);\n seen.set(value, result);\n return result;\n }\n\n const valueIsIterator = isIterator(value);\n\n if (isBasicObject(value) || valueIsIterator) {\n const result = {};\n\n for (const key of Object.keys(value)) {\n result[key] = await serializeValue(value[key]);\n }\n\n if (valueIsIterator) {\n result.next ??= await serializeValue(value.next.bind(value));\n result.return ??= await serializeValue(value.return.bind(value));\n result.throw ??= await serializeValue(value.throw.bind(value));\n result[ASYNC_ITERATOR] = true;\n }\n\n seen.set(value, result);\n return result;\n }\n }\n\n if (typeof value === 'function') {\n const serialized = thread.functions.serialize(value, thread, transferable);\n const result = { [FUNCTION]: serialized };\n\n seen.set(value, result);\n return result;\n }\n\n seen.set(value, value);\n return value;\n }\n\n /**\n * Deserializes a structured cloning-compatible value from another thread.\n */\n async deserialize(value, thread) {\n return this.#deserializeInternal(value, thread);\n }\n\n async #deserializeInternal(value, thread, isApplyingDefault = false) {\n if (value == null) return value;\n\n if (typeof value === 'object') {\n if (this.#customDeserializer && !isApplyingDefault) {\n const customValue = await this.#customDeserializer(\n value,\n (value) => this.#deserializeInternal(value, thread, true),\n thread,\n );\n\n if (customValue !== undefined) {\n return customValue;\n }\n }\n\n if (value == null) {\n return value;\n }\n\n if (Array.isArray(value)) {\n return Promise.all(value.map((value) => this.#deserializeInternal(value, thread)));\n }\n\n if (value instanceof Map) {\n const entries = await Promise.all(\n [...value].map(async ([key, value]) => [\n await this.#deserializeInternal(key, thread),\n await this.#deserializeInternal(value, thread),\n ]),\n );\n\n return new Map(entries);\n }\n\n if (value instanceof Set) {\n const entries = await Promise.all(\n [...value].map((entry) => this.#deserializeInternal(entry, thread)),\n );\n\n return new Set(entries);\n }\n\n if (FUNCTION in value) {\n const func = thread.functions.deserialize(value[FUNCTION], thread);\n return func;\n }\n\n if (!isBasicObject(value)) {\n return value;\n }\n\n const result = {};\n\n for (const key of Object.keys(value)) {\n if (key === ASYNC_ITERATOR) {\n result[Symbol.asyncIterator] = () => result;\n } else {\n result[key] = await this.#deserializeInternal(value[key], thread);\n }\n }\n\n return result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MAAM,MAAM,MAAM;GAIpE,OAAO;EACT;EAEA,OAAO;CACT;AACF"}
@@ -10,4 +10,3 @@ export declare const connectRemoteReceiver: (root: HTMLDivElement, receiverConne
10
10
  export declare const connectHostRenderRoot: (options: Options) => Promise<RemoteToHostConnection>;
11
11
  export declare const connectHostRenderRootRef: (opts: Omit<Options, "root">) => (ref: HTMLDivElement | null) => Promise<RemoteToHostConnection> | undefined;
12
12
  export {};
13
- //# sourceMappingURL=connectHostRenderRoot.d.ts.map
@@ -17,4 +17,3 @@ interface Options {
17
17
  export declare const connectRemoteIframe: (opts: Options) => HostToRemoteConnection;
18
18
  export declare const connectRemoteIframeRef: (opts: Omit<Options, "iframe">) => (ref: HTMLIFrameElement | null) => HostToRemoteConnection | undefined;
19
19
  export {};
20
- //# sourceMappingURL=connectRemoteIframe.d.ts.map
@@ -1,4 +1,3 @@
1
1
  export * from './connectHostRenderRoot';
2
2
  export * from './connectRemoteIframe';
3
3
  export * from './types';
4
- //# sourceMappingURL=index.d.ts.map
@@ -55,4 +55,3 @@ export declare enum Version {
55
55
  v4 = 4,
56
56
  v5 = 5
57
57
  }
58
- //# sourceMappingURL=types.d.ts.map
@@ -1,4 +1,3 @@
1
1
  export declare class RemoteError extends Error {
2
2
  constructor(message: string);
3
3
  }
4
- //# sourceMappingURL=error.d.ts.map
@@ -14,4 +14,3 @@ export declare const reportedEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
14
14
  export type ComponentRenderedEvent = z.infer<typeof componentRenderedEventSchema>;
15
15
  export type ReportedEvent = z.infer<typeof reportedEventSchema>;
16
16
  export declare const parseReportedEvent: (event: unknown) => ReportedEvent | undefined;
17
- //# sourceMappingURL=remoteEvents.d.ts.map
@@ -1,4 +1,3 @@
1
1
  import { RemoteExtBridgeConnectionApi } from '../connection';
2
2
  import { ExtBridgeConfigInput, HostConfig } from '@mittwald/ext-bridge';
3
3
  export declare const getWithMergedHostConfig: (extBridgeConnection: RemoteExtBridgeConnectionApi, hostConfig: HostConfig) => () => Promise<ExtBridgeConfigInput>;
4
- //# sourceMappingURL=getWithMergedHostConfig.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import { ExtBridgeConnectionApi } from '@mittwald/ext-bridge';
2
2
  export declare const emptyImplementation: ExtBridgeConnectionApi;
3
- //# sourceMappingURL=implementation.d.ts.map
@@ -1,2 +1 @@
1
1
  export * from './index';
2
- //# sourceMappingURL=index-node.d.ts.map
@@ -4,4 +4,3 @@ export * from './serialization';
4
4
  export * from './connection';
5
5
  export * from './error';
6
6
  export * from './events/remoteEvents';
7
- //# sourceMappingURL=index.d.ts.map
@@ -10,4 +10,3 @@ export declare class FlowThreadSerialization extends ThreadSerializationStructur
10
10
  */
11
11
  private warnAboutReactValue;
12
12
  }
13
- //# sourceMappingURL=FlowThreadSerialization.d.ts.map
@@ -25,4 +25,3 @@ export declare class Serializer<TIn, TOut> {
25
25
  deserialize(val: unknown): Promise<SerializationResult<TIn>>;
26
26
  }
27
27
  export {};
28
- //# sourceMappingURL=Serializer.d.ts.map
@@ -1,4 +1,3 @@
1
1
  export * from './serializers';
2
2
  export * from './FlowThreadSerialization';
3
3
  export * from './Serializer';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import { Serializer } from '../Serializer';
2
2
  export declare const dataTransferTextSerializer: Serializer<DataTransfer, string>;
3
- //# sourceMappingURL=dataTransferText.d.ts.map
@@ -1,4 +1,3 @@
1
1
  import { CalendarDate } from '@internationalized/date';
2
2
  import { Serializer } from '../Serializer';
3
3
  export declare const calendarDateSerializer: Serializer<CalendarDate, string>;
4
- //# sourceMappingURL=date.d.ts.map
@@ -9,4 +9,3 @@ export declare const isSerializedFile: (value: unknown) => value is SerializedFi
9
9
  export declare const fileSerialize: (file: File) => Promise<SerializedFile>;
10
10
  export declare const fileDeSerialize: (file: SerializedFile) => File;
11
11
  export declare const fileSerializer: Serializer<File, SerializedFile>;
12
- //# sourceMappingURL=file.d.ts.map
@@ -1,4 +1,3 @@
1
1
  import { Serializer } from '../Serializer';
2
2
  import { SerializedFile } from '.';
3
3
  export declare const fileListSerializer: Serializer<FileList, SerializedFile[]>;
4
- //# sourceMappingURL=fileList.d.ts.map
@@ -4,4 +4,3 @@ type SerializedFormDataValue = FormDataEntryValue | Awaited<ReturnType<typeof fi
4
4
  type SerializedFormDataEntries = [string, SerializedFormDataValue][];
5
5
  export declare const formDataSerializer: Serializer<FormData, SerializedFormDataEntries>;
6
6
  export {};
7
- //# sourceMappingURL=formData.d.ts.map
@@ -4,4 +4,3 @@ export * from './fileList';
4
4
  export * from './dataTransferText';
5
5
  export * from './formData';
6
6
  export * from './passwordPolicy';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,3 @@
1
1
  import { Serializer } from '../Serializer';
2
2
  import { Policy, PolicyDeclaration } from '@mittwald/flow-react-components/mittwald-password-tools-js';
3
3
  export declare const passwordPolicySerializer: Serializer<Policy, PolicyDeclaration>;
4
- //# sourceMappingURL=passwordPolicy.d.ts.map
@@ -11,4 +11,3 @@
11
11
  * binding keeps this import in source order — first.
12
12
  */
13
13
  export declare const domShimApplied: boolean;
14
- //# sourceMappingURL=shim.d.ts.map
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@mittwald/flow-remote-core",
3
- "version": "1.2.0-next.9",
3
+ "version": "2.0.0-next.0",
4
4
  "type": "module",
5
5
  "description": "Core functionality to setup a remote/host environment",
6
6
  "homepage": "https://flow.mittwald.de",
7
7
  "repository": "https://github.com/mittwald/flow",
8
+ "license": "MIT",
8
9
  "exports": {
9
10
  ".": {
10
11
  "types": "./dist/types/index.d.ts",
@@ -35,9 +36,10 @@
35
36
  "zod": "^4.4.3"
36
37
  },
37
38
  "devDependencies": {
38
- "@mittwald/ext-bridge": "1.2.0-next.9",
39
- "@mittwald/flow-react-components": "1.2.0-next.9",
40
- "@mittwald/typescript-config": "1.2.0-next.9",
39
+ "@mittwald/ext-bridge": "2.0.0-next.0",
40
+ "@mittwald/flow-core": "2.0.0-next.0",
41
+ "@mittwald/flow-react-components": "2.0.0-next.0",
42
+ "@mittwald/typescript-config": "2.0.0-next.0",
41
43
  "@types/node": "^25.9.3",
42
44
  "nx": "^22.7.5",
43
45
  "rimraf": "^6.1.3",
@@ -49,13 +51,13 @@
49
51
  "vitest": "^4.1.11"
50
52
  },
51
53
  "peerDependencies": {
52
- "@mittwald/ext-bridge": "1.2.0-next.9",
53
- "@mittwald/flow-react-components": "1.2.0-next.9"
54
+ "@mittwald/ext-bridge": "2.0.0-next.0",
55
+ "@mittwald/flow-react-components": "2.0.0-next.0"
54
56
  },
55
57
  "peerDependenciesMeta": {
56
58
  "@mittwald/ext-bridge": {
57
59
  "optional": true
58
60
  }
59
61
  },
60
- "gitHead": "f63082035b7e221f573463c84fea6b7b4a89f56d"
62
+ "gitHead": "08f1ba9b272fb8a4857a78f1b4dc034f2cbb441f"
61
63
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"connectHostRenderRoot.d.ts","sourceRoot":"","sources":["../../../src/connection/connectHostRenderRoot.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,sBAAsB,EAC5B,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAG3E,UAAU,OAAO;IACf,IAAI,EAAE,cAAc,CAAC;IACrB,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAKD,eAAO,MAAM,qBAAqB,GAChC,MAAM,cAAc,EACpB,oBAAoB,gBAAgB,kBAOnC,CAAC;AAEJ,eAAO,MAAM,qBAAqB,GAChC,SAAS,OAAO,KACf,OAAO,CAAC,sBAAsB,CA0ChC,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAClC,MAAM,IA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AehE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/connection/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,SAAS,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=threadMessageOrder.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"threadMessageOrder.test.d.ts","sourceRoot":"","sources":["../../../src/connection/threadMessageOrder.test.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/connection/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qCAAqC,EACrC,sBAAsB,EACtB,UAAU,EACX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACzE,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAElE,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,gBAAgB,CAAC;AAE/D,MAAM,MAAM,qBAAqB,GAAG,qCAAqC,CAAC;AAE1E,MAAM,WAAW,4BAA6B,SAAQ,IAAI,CACxD,sBAAsB,EACtB,WAAW,CACZ;IACC,SAAS,EAAE,MAAM,OAAO,CAAC,qBAAqB,CAAC,CAAC;CACjD;AAED;;;;;GAKG;AACH,MAAM,WAAW,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,CAAC;IACnC,gBAAgB,EAAE,gBAAgB,CAAC;CACpC;AAED,oBAAY,OAAO;IACjB,QAAQ,IAAI;IACZ,EAAE,IAAI;IACN,EAAE,IAAI;IACN,EAAE,IAAI;IACN,EAAE,IAAI;IACN,EAAE,IAAI;CACP"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/error.ts"],"names":[],"mappings":"AAAA,qBAAa,WAAY,SAAQ,KAAK;gBACxB,OAAO,EAAE,MAAM;CAI5B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"remoteEvents.d.ts","sourceRoot":"","sources":["../../../src/events/remoteEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,4BAA4B;;;;;iBAMvC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;4BAE9B,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,kBAAkB,GAC7B,OAAO,OAAO,KACb,aAAa,GAAG,SAGlB,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=remoteEvents.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remoteEvents.test.d.ts","sourceRoot":"","sources":["../../../src/events/remoteEvents.test.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getWithMergedHostConfig.d.ts","sourceRoot":"","sources":["../../../src/ext-bridge/getWithMergedHostConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAE7E,eAAO,MAAM,uBAAuB,GACjC,qBAAqB,4BAA4B,EAAE,YAAY,UAAU,WAChE,OAAO,CAAC,oBAAoB,CAYrC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"implementation.d.ts","sourceRoot":"","sources":["../../../src/ext-bridge/implementation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAEnE,eAAO,MAAM,mBAAmB,EAO3B,sBAAsB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAUA,cAAc,SAAS,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EACL,aAAa,EACb,WAAW,EACX,KAAK,wBAAwB,GAC9B,MAAM,oCAAoC,CAAC;AAC5C,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FlowThreadSerialization.d.ts","sourceRoot":"","sources":["../../../src/serialization/FlowThreadSerialization.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,EAGnC,MAAM,kBAAkB,CAAC;AAsD1B,qBAAa,uBAAwB,SAAQ,kCAAkC;IAC7E,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAqB;;IAwD5D,OAAO,CAAC,oBAAoB;IAU5B,OAAO,CAAC,iBAAiB;IAIzB;;;OAGG;IACH,OAAO,CAAC,mBAAmB;CAY5B"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=FlowThreadSerialization.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FlowThreadSerialization.test.d.ts","sourceRoot":"","sources":["../../../src/serialization/FlowThreadSerialization.test.tsx"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=Serialization.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Serialization.test.d.ts","sourceRoot":"","sources":["../../../src/serialization/Serialization.test.tsx"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Serializer.d.ts","sourceRoot":"","sources":["../../../src/serialization/Serializer.ts"],"names":[],"mappings":"AAAA,UAAU,qBAAqB,CAAC,GAAG,EAAE,IAAI;IACvC,YAAY,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,GAAG,IAAI,GAAG,CAAC;IAC3C,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3C;AAED,QAAA,MAAM,GAAG,8CAA8C,CAAC;AAExD,MAAM,WAAW,6BAA6B,CAAC,CAAC;IAC9C,KAAK,EAAE,CAAC,CAAC;IACT,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAC7B;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,6BAA6B,CAAC,CAAC,CAAC,CAAA;CAAE,GAC3D;IAAE,OAAO,EAAE,KAAK,CAAA;CAAE,CAAC;AAEvB,qBAAa,UAAU,CAAC,GAAG,EAAE,IAAI;IAE7B,OAAO,CAAC,OAAO;gBAAP,OAAO,EAAE;QACf,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,qBAAqB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAC5C,WAAW,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;KAC9D;YAGW,KAAK;IAmBN,SAAS,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAI3D,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;CAa1E"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/serialization/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,cAAc,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"dataTransferText.d.ts","sourceRoot":"","sources":["../../../../src/serialization/serializers/dataTransferText.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,eAAO,MAAM,0BAA0B,kCAoBrC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../../../src/serialization/serializers/date.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,eAAO,MAAM,sBAAsB,kCASjC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../../src/serialization/serializers/file.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,eAAO,MAAM,gBAAgB,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,cAS1D,CAAC;AAEF,eAAO,MAAM,aAAa,GAAU,MAAM,IAAI,KAAG,OAAO,CAAC,cAAc,CAOtE,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,MAAM,cAAc,SAKnD,CAAC;AAEF,eAAO,MAAM,cAAc,kCASzB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"fileList.d.ts","sourceRoot":"","sources":["../../../../src/serialization/serializers/fileList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,6BAA6B,CAAC;AAErC,eAAO,MAAM,kBAAkB,wCAiB7B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"formData.d.ts","sourceRoot":"","sources":["../../../../src/serialization/serializers/formData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAEL,aAAa,EAEd,MAAM,6BAA6B,CAAC;AAErC,KAAK,uBAAuB,GAC1B,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC;AACjE,KAAK,yBAAyB,GAAG,CAAC,MAAM,EAAE,uBAAuB,CAAC,EAAE,CAAC;AAErE,eAAO,MAAM,kBAAkB,iDAuC7B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/serialization/serializers/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"passwordPolicy.d.ts","sourceRoot":"","sources":["../../../../src/serialization/serializers/passwordPolicy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EACL,MAAM,EACN,KAAK,iBAAiB,EACvB,MAAM,4DAA4D,CAAC;AAEpE,eAAO,MAAM,wBAAwB,uCAYnC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"shim.d.ts","sourceRoot":"","sources":["../../src/shim.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,SAqBvB,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const createFileList: (files: File[]) => FileList;
2
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/tests/utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,GAAI,OAAO,IAAI,EAAE,KAAG,QAyB9C,CAAC"}