@mittwald/flow-remote-core 0.2.0-alpha.1032 → 0.2.0-alpha.1034

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 (74) hide show
  1. package/dist/js/_virtual/_rolldown/runtime.mjs +13 -0
  2. package/dist/js/index-node.mjs +21 -17
  3. package/dist/js/index-node.mjs.map +1 -1
  4. package/dist/js/index.mjs +24 -16
  5. package/dist/js/index.mjs.map +1 -1
  6. package/dist/js/node_modules/.pnpm/@quilted_events@2.1.5/node_modules/@quilted/events/build/esm/abort/NestedAbortController.mjs +33 -36
  7. package/dist/js/node_modules/.pnpm/@quilted_events@2.1.5/node_modules/@quilted/events/build/esm/abort/NestedAbortController.mjs.map +1 -1
  8. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/Thread.mjs +167 -225
  9. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/Thread.mjs.map +1 -1
  10. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/constants.mjs +6 -9
  11. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/constants.mjs.map +1 -1
  12. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/errors.mjs +9 -7
  13. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/errors.mjs.map +1 -1
  14. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/functions/ThreadFunctionsAutomatic.mjs +68 -67
  15. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/functions/ThreadFunctionsAutomatic.mjs.map +1 -1
  16. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/nanoid.mjs +8 -8
  17. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/nanoid.mjs.map +1 -1
  18. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/serialization/ThreadSerializationStructuredClone.mjs +130 -210
  19. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/serialization/ThreadSerializationStructuredClone.mjs.map +1 -1
  20. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/serialization/shared.mjs +8 -6
  21. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/serialization/shared.mjs.map +1 -1
  22. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/threads/ThreadIframe.mjs +152 -159
  23. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/threads/ThreadIframe.mjs.map +1 -1
  24. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/threads/ThreadNestedIframe.mjs +76 -84
  25. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/threads/ThreadNestedIframe.mjs.map +1 -1
  26. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/threads/window/ThreadNestedWindow.mjs +117 -137
  27. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/threads/window/ThreadNestedWindow.mjs.map +1 -1
  28. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/threads/window/ThreadWindow.mjs +189 -208
  29. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/threads/window/ThreadWindow.mjs.map +1 -1
  30. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/threads/window/shared.mjs +6 -4
  31. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/threads/window/shared.mjs.map +1 -1
  32. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/transfer.mjs +12 -13
  33. package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/transfer.mjs.map +1 -1
  34. package/dist/js/packages/remote-core/src/connection/connectHostRenderRoot.mjs +51 -61
  35. package/dist/js/packages/remote-core/src/connection/connectHostRenderRoot.mjs.map +1 -1
  36. package/dist/js/packages/remote-core/src/connection/connectRemoteIframe.mjs +73 -101
  37. package/dist/js/packages/remote-core/src/connection/connectRemoteIframe.mjs.map +1 -1
  38. package/dist/js/packages/remote-core/src/connection/index.mjs +4 -0
  39. package/dist/js/packages/remote-core/src/connection/types.mjs +13 -11
  40. package/dist/js/packages/remote-core/src/connection/types.mjs.map +1 -1
  41. package/dist/js/packages/remote-core/src/error.mjs +10 -8
  42. package/dist/js/packages/remote-core/src/error.mjs.map +1 -1
  43. package/dist/js/packages/remote-core/src/events/remoteEvents.mjs +14 -16
  44. package/dist/js/packages/remote-core/src/events/remoteEvents.mjs.map +1 -1
  45. package/dist/js/packages/remote-core/src/ext-bridge/getWithMergedHostConfig.mjs +10 -8
  46. package/dist/js/packages/remote-core/src/ext-bridge/getWithMergedHostConfig.mjs.map +1 -1
  47. package/dist/js/packages/remote-core/src/ext-bridge/implementation.mjs +8 -12
  48. package/dist/js/packages/remote-core/src/ext-bridge/implementation.mjs.map +1 -1
  49. package/dist/js/packages/remote-core/src/serialization/FlowThreadSerialization.mjs +49 -61
  50. package/dist/js/packages/remote-core/src/serialization/FlowThreadSerialization.mjs.map +1 -1
  51. package/dist/js/packages/remote-core/src/serialization/Serializer.mjs +31 -31
  52. package/dist/js/packages/remote-core/src/serialization/Serializer.mjs.map +1 -1
  53. package/dist/js/packages/remote-core/src/serialization/index.mjs +10 -0
  54. package/dist/js/packages/remote-core/src/serialization/serializers/dataTransferText.mjs +20 -21
  55. package/dist/js/packages/remote-core/src/serialization/serializers/dataTransferText.mjs.map +1 -1
  56. package/dist/js/packages/remote-core/src/serialization/serializers/date.mjs +13 -14
  57. package/dist/js/packages/remote-core/src/serialization/serializers/date.mjs.map +1 -1
  58. package/dist/js/packages/remote-core/src/serialization/serializers/file.mjs +27 -28
  59. package/dist/js/packages/remote-core/src/serialization/serializers/file.mjs.map +1 -1
  60. package/dist/js/packages/remote-core/src/serialization/serializers/fileList.mjs +18 -22
  61. package/dist/js/packages/remote-core/src/serialization/serializers/fileList.mjs.map +1 -1
  62. package/dist/js/packages/remote-core/src/serialization/serializers/formData.mjs +27 -34
  63. package/dist/js/packages/remote-core/src/serialization/serializers/formData.mjs.map +1 -1
  64. package/dist/js/packages/remote-core/src/serialization/serializers/index.mjs +23 -7
  65. package/dist/js/packages/remote-core/src/serialization/serializers/index.mjs.map +1 -1
  66. package/dist/js/packages/remote-core/src/serialization/serializers/passwordPolicy.mjs +13 -14
  67. package/dist/js/packages/remote-core/src/serialization/serializers/passwordPolicy.mjs.map +1 -1
  68. package/dist/js/packages/remote-core/src/shim.mjs +32 -15
  69. package/dist/js/packages/remote-core/src/shim.mjs.map +1 -1
  70. package/dist/types/index-node.d.ts.map +1 -1
  71. package/dist/types/index.d.ts.map +1 -1
  72. package/dist/types/shim.d.ts +13 -1
  73. package/dist/types/shim.d.ts.map +1 -1
  74. package/package.json +9 -11
@@ -0,0 +1,13 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __defProp = Object.defineProperty;
3
+ var __exportAll = (all, no_symbols) => {
4
+ let target = {};
5
+ for (var name in all) __defProp(target, name, {
6
+ get: all[name],
7
+ enumerable: true
8
+ });
9
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
10
+ return target;
11
+ };
12
+ //#endregion
13
+ export { __exportAll };
@@ -1,17 +1,21 @@
1
- import './packages/remote-core/src/shim.mjs';
2
- export { RemoteReceiver } from '@mittwald/remote-dom-core/receivers';
3
- export { RemoteElement, RemoteEvent } from '@mittwald/remote-dom-core/elements';
4
- export { calendarDateSerializer } from './packages/remote-core/src/serialization/serializers/date.mjs';
5
- export { fileDeSerialize, fileSerialize, fileSerializer, isSerializedFile } from './packages/remote-core/src/serialization/serializers/file.mjs';
6
- export { fileListSerializer } from './packages/remote-core/src/serialization/serializers/fileList.mjs';
7
- export { dataTransferTextSerializer } from './packages/remote-core/src/serialization/serializers/dataTransferText.mjs';
8
- export { formDataSerializer } from './packages/remote-core/src/serialization/serializers/formData.mjs';
9
- export { passwordPolicySerializer } from './packages/remote-core/src/serialization/serializers/passwordPolicy.mjs';
10
- export { FlowThreadSerialization } from './packages/remote-core/src/serialization/FlowThreadSerialization.mjs';
11
- export { Serializer } from './packages/remote-core/src/serialization/Serializer.mjs';
12
- export { connectHostRenderRoot, connectHostRenderRootRef, connectRemoteReceiver } from './packages/remote-core/src/connection/connectHostRenderRoot.mjs';
13
- export { connectRemoteIframe, connectRemoteIframeRef } from './packages/remote-core/src/connection/connectRemoteIframe.mjs';
14
- export { Version } from './packages/remote-core/src/connection/types.mjs';
15
- export { RemoteError } from './packages/remote-core/src/error.mjs';
16
- export { componentRenderedEventSchema, parseReportedEvent, reportedEventSchema } from './packages/remote-core/src/events/remoteEvents.mjs';
17
- //# sourceMappingURL=index-node.mjs.map
1
+ import { domShimApplied } from "./packages/remote-core/src/shim.mjs";
2
+ import { Serializer } from "./packages/remote-core/src/serialization/Serializer.mjs";
3
+ import { calendarDateSerializer } from "./packages/remote-core/src/serialization/serializers/date.mjs";
4
+ import { fileDeSerialize, fileSerialize, fileSerializer, isSerializedFile } from "./packages/remote-core/src/serialization/serializers/file.mjs";
5
+ import { fileListSerializer } from "./packages/remote-core/src/serialization/serializers/fileList.mjs";
6
+ import { dataTransferTextSerializer } from "./packages/remote-core/src/serialization/serializers/dataTransferText.mjs";
7
+ import { formDataSerializer } from "./packages/remote-core/src/serialization/serializers/formData.mjs";
8
+ import { passwordPolicySerializer } from "./packages/remote-core/src/serialization/serializers/passwordPolicy.mjs";
9
+ import { FlowThreadSerialization } from "./packages/remote-core/src/serialization/FlowThreadSerialization.mjs";
10
+ import { Version } from "./packages/remote-core/src/connection/types.mjs";
11
+ import { RemoteError } from "./packages/remote-core/src/error.mjs";
12
+ import { connectHostRenderRoot, connectHostRenderRootRef, connectRemoteReceiver } from "./packages/remote-core/src/connection/connectHostRenderRoot.mjs";
13
+ import { componentRenderedEventSchema, parseReportedEvent, reportedEventSchema } from "./packages/remote-core/src/events/remoteEvents.mjs";
14
+ import { connectRemoteIframe, connectRemoteIframeRef } from "./packages/remote-core/src/connection/connectRemoteIframe.mjs";
15
+ import { RemoteElement, RemoteEvent, RemoteReceiver } from "./index.mjs";
16
+ //#region src/index-node.ts
17
+ if (!domShimApplied) throw new Error("remote-core DOM shim failed to initialize");
18
+ //#endregion
19
+ export { FlowThreadSerialization, RemoteElement, RemoteError, RemoteEvent, RemoteReceiver, Serializer, Version, calendarDateSerializer, componentRenderedEventSchema, connectHostRenderRoot, connectHostRenderRootRef, connectRemoteIframe, connectRemoteIframeRef, connectRemoteReceiver, dataTransferTextSerializer, fileDeSerialize, fileListSerializer, fileSerialize, fileSerializer, formDataSerializer, isSerializedFile, parseReportedEvent, passwordPolicySerializer, reportedEventSchema };
20
+
21
+ //# sourceMappingURL=index-node.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-node.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index-node.mjs","names":[],"sources":["../../src/index-node.ts"],"sourcesContent":["// The `node` export condition resolves here. The shim must be the very first\n// import so the DOM globals exist before any sibling module transitively pulls\n// in RemoteElement (which subclasses HTMLElement). Do NOT simplify this to a\n// bare `import \"./shim\"` or a plain `export * from \"./index\"`: Rollup then hoists\n// the remote-dom import ahead of the shim and SSR breaks with \"HTMLElement is\n// not defined\". Importing the shim as a used binding keeps it first.\nimport { domShimApplied } from \"./shim\";\nif (!domShimApplied) {\n throw new Error(\"remote-core DOM shim failed to initialize\");\n}\nexport * from \"./index\";\n"],"mappings":";;;;;;;;;;;;;;;;AAOA,IAAI,CAAC,gBACH,MAAM,IAAI,MAAM,2CAA2C"}
package/dist/js/index.mjs CHANGED
@@ -1,16 +1,24 @@
1
- export { RemoteReceiver } from '@mittwald/remote-dom-core/receivers';
2
- export { RemoteElement, RemoteEvent } from '@mittwald/remote-dom-core/elements';
3
- export { calendarDateSerializer } from './packages/remote-core/src/serialization/serializers/date.mjs';
4
- export { fileDeSerialize, fileSerialize, fileSerializer, isSerializedFile } from './packages/remote-core/src/serialization/serializers/file.mjs';
5
- export { fileListSerializer } from './packages/remote-core/src/serialization/serializers/fileList.mjs';
6
- export { dataTransferTextSerializer } from './packages/remote-core/src/serialization/serializers/dataTransferText.mjs';
7
- export { formDataSerializer } from './packages/remote-core/src/serialization/serializers/formData.mjs';
8
- export { passwordPolicySerializer } from './packages/remote-core/src/serialization/serializers/passwordPolicy.mjs';
9
- export { FlowThreadSerialization } from './packages/remote-core/src/serialization/FlowThreadSerialization.mjs';
10
- export { Serializer } from './packages/remote-core/src/serialization/Serializer.mjs';
11
- export { connectHostRenderRoot, connectHostRenderRootRef, connectRemoteReceiver } from './packages/remote-core/src/connection/connectHostRenderRoot.mjs';
12
- export { connectRemoteIframe, connectRemoteIframeRef } from './packages/remote-core/src/connection/connectRemoteIframe.mjs';
13
- export { Version } from './packages/remote-core/src/connection/types.mjs';
14
- export { RemoteError } from './packages/remote-core/src/error.mjs';
15
- export { componentRenderedEventSchema, parseReportedEvent, reportedEventSchema } from './packages/remote-core/src/events/remoteEvents.mjs';
16
- //# sourceMappingURL=index.mjs.map
1
+ import { domShimApplied } from "./packages/remote-core/src/shim.mjs";
2
+ import { Serializer } from "./packages/remote-core/src/serialization/Serializer.mjs";
3
+ import { calendarDateSerializer } from "./packages/remote-core/src/serialization/serializers/date.mjs";
4
+ import { fileDeSerialize, fileSerialize, fileSerializer, isSerializedFile } from "./packages/remote-core/src/serialization/serializers/file.mjs";
5
+ import { fileListSerializer } from "./packages/remote-core/src/serialization/serializers/fileList.mjs";
6
+ import { dataTransferTextSerializer } from "./packages/remote-core/src/serialization/serializers/dataTransferText.mjs";
7
+ import { formDataSerializer } from "./packages/remote-core/src/serialization/serializers/formData.mjs";
8
+ import { passwordPolicySerializer } from "./packages/remote-core/src/serialization/serializers/passwordPolicy.mjs";
9
+ import { FlowThreadSerialization } from "./packages/remote-core/src/serialization/FlowThreadSerialization.mjs";
10
+ import "./packages/remote-core/src/serialization/index.mjs";
11
+ import { Version } from "./packages/remote-core/src/connection/types.mjs";
12
+ import { RemoteError } from "./packages/remote-core/src/error.mjs";
13
+ import { connectHostRenderRoot, connectHostRenderRootRef, connectRemoteReceiver } from "./packages/remote-core/src/connection/connectHostRenderRoot.mjs";
14
+ import { componentRenderedEventSchema, parseReportedEvent, reportedEventSchema } from "./packages/remote-core/src/events/remoteEvents.mjs";
15
+ import { connectRemoteIframe, connectRemoteIframeRef } from "./packages/remote-core/src/connection/connectRemoteIframe.mjs";
16
+ import "./packages/remote-core/src/connection/index.mjs";
17
+ import { RemoteReceiver } from "@mittwald/remote-dom-core/receivers";
18
+ import { RemoteElement, RemoteEvent } from "@mittwald/remote-dom-core/elements";
19
+ //#region src/index.ts
20
+ if (!domShimApplied) throw new Error("remote-core DOM shim failed to initialize");
21
+ //#endregion
22
+ export { FlowThreadSerialization, RemoteElement, RemoteError, RemoteEvent, RemoteReceiver, Serializer, Version, calendarDateSerializer, componentRenderedEventSchema, connectHostRenderRoot, connectHostRenderRootRef, connectRemoteIframe, connectRemoteIframeRef, connectRemoteReceiver, dataTransferTextSerializer, fileDeSerialize, fileListSerializer, fileSerialize, fileSerializer, formDataSerializer, isSerializedFile, parseReportedEvent, passwordPolicySerializer, reportedEventSchema };
23
+
24
+ //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/index.ts"],"sourcesContent":["import { domShimApplied } from \"./shim\";\n\nexport { RemoteReceiver } from \"@mittwald/remote-dom-core/receivers\";\nexport {\n RemoteElement,\n RemoteEvent,\n type RemoteElementConstructor,\n} from \"@mittwald/remote-dom-core/elements\";\nexport * from \"./serialization\";\nexport * from \"./connection\";\nexport * from \"./error\";\nexport * from \"./events/remoteEvents\";\n\n// The DOM shim above must be evaluated before RemoteElement (which subclasses\n// HTMLElement) is imported. Referencing the binding keeps the import from being\n// tree-shaken or reordered after the remote-dom re-export.\nif (!domShimApplied) {\n throw new Error(\"remote-core DOM shim failed to initialize\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAgBA,IAAI,CAAC,gBACH,MAAM,IAAI,MAAM,2CAA2C"}
@@ -1,38 +1,35 @@
1
+ //#region ../../node_modules/.pnpm/@quilted+events@2.1.5/node_modules/@quilted/events/build/esm/abort/NestedAbortController.mjs
1
2
  /**
2
- * An `AbortController` that will automatically abort when any of
3
- * its "parent" `AbortController`s abort. This is useful for when
4
- * you have nested asynchronous operations that may abort independently.
5
- * The `AbortController` can also be independently aborted.
6
- *
7
- * To associate the parent `AbortController`s, pass their signals
8
- * as arguments to the constructor.
9
- *
10
- * @example
11
- * import {NestedAbortController} from '@shopify/events';
12
- *
13
- * const parent = new AbortController();
14
- * const nested = new NestedAbortController(parent.signal);
15
- *
16
- * parent.abort();
17
- * nested.signal.aborted; // true
18
- */
19
- class NestedAbortController extends AbortController {
20
- constructor(...parents) {
21
- super();
22
- const abortedSignal = parents.find(signal => signal.aborted);
23
- if (abortedSignal) {
24
- this.abort(abortedSignal.reason);
25
- } else {
26
- const abort = event => this.abort(event.target.reason);
27
- const options = {
28
- signal: this.signal
29
- };
30
- for (const signal of parents) {
31
- signal.addEventListener('abort', abort, options);
32
- }
33
- }
34
- }
35
- }
36
-
3
+ * An `AbortController` that will automatically abort when any of
4
+ * its "parent" `AbortController`s abort. This is useful for when
5
+ * you have nested asynchronous operations that may abort independently.
6
+ * The `AbortController` can also be independently aborted.
7
+ *
8
+ * To associate the parent `AbortController`s, pass their signals
9
+ * as arguments to the constructor.
10
+ *
11
+ * @example
12
+ * import {NestedAbortController} from '@shopify/events';
13
+ *
14
+ * const parent = new AbortController();
15
+ * const nested = new NestedAbortController(parent.signal);
16
+ *
17
+ * parent.abort();
18
+ * nested.signal.aborted; // true
19
+ */
20
+ var NestedAbortController = class extends AbortController {
21
+ constructor(...parents) {
22
+ super();
23
+ const abortedSignal = parents.find((signal) => signal.aborted);
24
+ if (abortedSignal) this.abort(abortedSignal.reason);
25
+ else {
26
+ const abort = (event) => this.abort(event.target.reason);
27
+ const options = { signal: this.signal };
28
+ for (const signal of parents) signal.addEventListener("abort", abort, options);
29
+ }
30
+ }
31
+ };
32
+ //#endregion
37
33
  export { NestedAbortController };
38
- //# sourceMappingURL=NestedAbortController.mjs.map
34
+
35
+ //# sourceMappingURL=NestedAbortController.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NestedAbortController.mjs","sources":["../../../../../../../../../../../../../node_modules/.pnpm/@quilted+events@2.1.5/node_modules/@quilted/events/build/esm/abort/NestedAbortController.mjs"],"sourcesContent":["/**\n * An `AbortController` that will automatically abort when any of\n * its \"parent\" `AbortController`s abort. This is useful for when\n * you have nested asynchronous operations that may abort independently.\n * The `AbortController` can also be independently aborted.\n *\n * To associate the parent `AbortController`s, pass their signals\n * as arguments to the constructor.\n *\n * @example\n * import {NestedAbortController} from '@shopify/events';\n *\n * const parent = new AbortController();\n * const nested = new NestedAbortController(parent.signal);\n *\n * parent.abort();\n * nested.signal.aborted; // true\n */\nclass NestedAbortController extends AbortController {\n constructor(...parents) {\n super();\n const abortedSignal = parents.find(signal => signal.aborted);\n if (abortedSignal) {\n this.abort(abortedSignal.reason);\n } else {\n const abort = event => this.abort(event.target.reason);\n const options = {\n signal: this.signal\n };\n for (const signal of parents) {\n signal.addEventListener('abort', abort, options);\n }\n }\n }\n}\n\nexport { NestedAbortController };\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,qBAAqB,SAAS,eAAe,CAAC;AACpD,EAAE,WAAW,CAAC,GAAG,OAAO,EAAE;AAC1B,IAAI,KAAK,EAAE;AACX,IAAI,MAAM,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,OAAO,CAAC;AAChE,IAAI,IAAI,aAAa,EAAE;AACvB,MAAM,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC;AACtC,IAAI,CAAC,MAAM;AACX,MAAM,MAAM,KAAK,GAAG,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC;AAC5D,MAAM,MAAM,OAAO,GAAG;AACtB,QAAQ,MAAM,EAAE,IAAI,CAAC;AACrB,OAAO;AACP,MAAM,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;AACpC,QAAQ,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC;AACxD,MAAM;AACN,IAAI;AACJ,EAAE;AACF;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"NestedAbortController.mjs","names":[],"sources":["../../../../../../../../../../../../../node_modules/.pnpm/@quilted+events@2.1.5/node_modules/@quilted/events/build/esm/abort/NestedAbortController.mjs"],"sourcesContent":["/**\n * An `AbortController` that will automatically abort when any of\n * its \"parent\" `AbortController`s abort. This is useful for when\n * you have nested asynchronous operations that may abort independently.\n * The `AbortController` can also be independently aborted.\n *\n * To associate the parent `AbortController`s, pass their signals\n * as arguments to the constructor.\n *\n * @example\n * import {NestedAbortController} from '@shopify/events';\n *\n * const parent = new AbortController();\n * const nested = new NestedAbortController(parent.signal);\n *\n * parent.abort();\n * nested.signal.aborted; // true\n */\nclass NestedAbortController extends AbortController {\n constructor(...parents) {\n super();\n const abortedSignal = parents.find(signal => signal.aborted);\n if (abortedSignal) {\n this.abort(abortedSignal.reason);\n } else {\n const abort = event => this.abort(event.target.reason);\n const options = {\n signal: this.signal\n };\n for (const signal of parents) {\n signal.addEventListener('abort', abort, options);\n }\n }\n }\n}\n\nexport { NestedAbortController };\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;AAkBA,IAAM,wBAAN,cAAoC,gBAAgB;CAClD,YAAY,GAAG,SAAS;EACtB,MAAM;EACN,MAAM,gBAAgB,QAAQ,MAAK,WAAU,OAAO,OAAO;EAC3D,IAAI,eACF,KAAK,MAAM,cAAc,MAAM;OAC1B;GACL,MAAM,SAAQ,UAAS,KAAK,MAAM,MAAM,OAAO,MAAM;GACrD,MAAM,UAAU,EACd,QAAQ,KAAK,OACf;GACA,KAAK,MAAM,UAAU,SACnB,OAAO,iBAAiB,SAAS,OAAO,OAAO;EAEnD;CACF;AACF"}
@@ -1,231 +1,173 @@
1
- import { ThreadClosedError } from './errors.mjs';
2
- import { nanoid } from './nanoid.mjs';
3
- import { MESSAGE_FUNCTION_RELEASE, MESSAGE_FUNCTION_RESULT, MESSAGE_CALL_RESULT, MESSAGE_FUNCTION_CALL, MESSAGE_CALL } from './constants.mjs';
4
- import { ThreadFunctionsAutomatic } from './functions/ThreadFunctionsAutomatic.mjs';
5
- import { ThreadSerializationStructuredClone } from './serialization/ThreadSerializationStructuredClone.mjs';
6
- import { NestedAbortController } from '../../../../../../@quilted_events@2.1.5/node_modules/@quilted/events/build/esm/abort/NestedAbortController.mjs';
7
-
1
+ import { NestedAbortController } from "../../../../../../@quilted_events@2.1.5/node_modules/@quilted/events/build/esm/abort/NestedAbortController.mjs";
2
+ import { ThreadClosedError } from "./errors.mjs";
3
+ import { nanoid } from "./nanoid.mjs";
4
+ import { ThreadFunctionsAutomatic } from "./functions/ThreadFunctionsAutomatic.mjs";
5
+ import { ThreadSerializationStructuredClone } from "./serialization/ThreadSerializationStructuredClone.mjs";
6
+ //#region ../../node_modules/.pnpm/@quilted+threads@3.3.1_patch_hash=df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/Thread.mjs
8
7
  /**
9
- * A thread represents a target JavaScript environment that exposes a set
10
- * of callable, asynchronous methods. The thread takes care of automatically
11
- * encoding and decoding its arguments and return values, so you can interact
12
- * with it as if its methods were implemented in the same environment as your
13
- * own code.
14
- */
15
- class Thread {
16
- get signal() {
17
- return this.#abort.signal;
18
- }
19
-
20
- get closed() {
21
- return this.#abort.signal.aborted;
22
- }
23
-
24
- #abort;
25
- #idsToResolver = (() => new Map())();
26
-
27
- constructor(messages, {
28
- imports,
29
- exports,
30
- functions = new ThreadFunctionsAutomatic(),
31
- serialization = new ThreadSerializationStructuredClone(),
32
- signal
33
- } = {}) {
34
- this.messages = messages;
35
- this.#abort = signal ? new NestedAbortController(signal) : new AbortController();
36
- this.exports = exports ?? {};
37
- this.imports = createThreadImports(this.#handlerForCall.bind(this), imports);
38
- this.functions = functions;
39
- this.serialization = serialization;
40
-
41
- this.functions.start?.(this);
42
- this.serialization.start?.(this);
43
-
44
- this.signal.addEventListener('abort', () => {
45
- for (const id of this.#idsToResolver.keys()) {
46
- this.#resolveCall(id, undefined, new ThreadClosedError());
47
- }
48
- this.#idsToResolver.clear();
49
- }, { once: true });
50
-
51
- messages.listen(async (rawData) => {
52
- const isThreadMessageData = Array.isArray(rawData) && typeof rawData[0] === 'number';
53
- if (!isThreadMessageData) return;
54
-
55
- const data = rawData;
56
-
57
- switch (data[0]) {
58
- case MESSAGE_CALL: {
59
- const [, id, property, args] = data;
60
- const func = this.exports[property] ?? (() => {
61
- throw new Error(`No '${property}' method is exported from this thread`);
62
- });
63
-
64
- await this.#callLocal(func, args, (value, error, transferable) => {
65
- this.messages.send([MESSAGE_CALL_RESULT, id, value, error], transferable);
66
- });
67
-
68
- break;
69
- }
70
-
71
- case MESSAGE_FUNCTION_CALL: {
72
- const [, callID, funcID, args] = data;
73
- const func = this.functions.get(funcID, this) ?? missingThreadFunction;
74
-
75
- await this.#callLocal(func, args, (value, error, transferable) => {
76
- this.messages.send([MESSAGE_FUNCTION_RESULT, callID, value, error], transferable);
77
- });
78
-
79
- break;
80
- }
81
-
82
- case MESSAGE_CALL_RESULT:
83
- case MESSAGE_FUNCTION_RESULT: {
84
- this.#resolveCall(...data.slice(1));
85
- break;
86
- }
87
-
88
- case MESSAGE_FUNCTION_RELEASE: {
89
- const id = data[1];
90
- this.functions.release(id, this);
91
- break;
92
- }
93
- }
94
- }, { signal: this.signal });
95
- }
96
-
97
- close() {
98
- this.#abort.abort();
99
- }
100
-
101
- async call(func, args) {
102
- if (this.closed) {
103
- return Promise.reject(new ThreadClosedError());
104
- }
105
-
106
- const transferable = [];
107
- const serialized = await this.serialization.serialize(args, this, transferable);
108
-
109
- const id = nanoid();
110
- const done = this.#waitForResult(id);
111
-
112
- func(id, serialized, transferable);
113
-
114
- return done;
115
- }
116
-
117
- async #callLocal(func, args, withResult) {
118
- try {
119
- const result = this.functions.call
120
- ? await this.functions.call(func, args, this) // keep original contract
121
- : await func(...(await this.serialization.deserialize(args, this)));
122
-
123
- const transferable = [];
124
- const serialized = await this.serialization.serialize(result, this, transferable);
125
-
126
- withResult(serialized, undefined, transferable);
127
- } catch (error) {
128
- withResult(undefined, await this.serialization.serialize(error, this));
129
- }
130
- }
131
-
132
- #handlerForCall(property) {
133
- return (...args) => {
134
- try {
135
- if (typeof property !== 'string' && typeof property !== 'number') {
136
- throw new Error(`Can’t call a symbol method on a thread: ${property.toString()}`);
137
- }
138
-
139
- return this.call((id, serializedArgs, transferable) => {
140
- this.messages.send([MESSAGE_CALL, id, property, serializedArgs], transferable);
141
- }, args);
142
- } catch (error) {
143
- return Promise.reject(error);
144
- }
145
- };
146
- }
147
-
148
- #resolveCall(...args) {
149
- const callID = args[0];
150
- const resolver = this.#idsToResolver.get(callID);
151
-
152
- if (resolver) {
153
- resolver(...args);
154
- this.#idsToResolver.delete(callID);
155
- }
156
- }
157
-
158
- #waitForResult(id) {
159
- const promise = new Promise((resolve, reject) => {
160
- this.#idsToResolver.set(id, async (_, value, error) => {
161
- try {
162
- if (error == null) {
163
- resolve(await this.serialization.deserialize(value, this));
164
- } else {
165
- reject(await this.serialization.deserialize(error, this));
166
- }
167
- } catch (deserializeError) {
168
- reject(deserializeError);
169
- }
170
- });
171
- });
172
-
173
- Object.defineProperty(promise, Symbol.asyncIterator, {
174
- async *value() {
175
- const result = await promise;
176
-
177
- Object.defineProperty(result, Symbol.asyncIterator, {
178
- value: () => result
179
- });
180
-
181
- yield* result;
182
- }
183
- });
184
-
185
- return promise;
186
- }
187
- }
188
-
8
+ * A thread represents a target JavaScript environment that exposes a set
9
+ * of callable, asynchronous methods. The thread takes care of automatically
10
+ * encoding and decoding its arguments and return values, so you can interact
11
+ * with it as if its methods were implemented in the same environment as your
12
+ * own code.
13
+ */
14
+ var Thread = class {
15
+ get signal() {
16
+ return this.#abort.signal;
17
+ }
18
+ get closed() {
19
+ return this.#abort.signal.aborted;
20
+ }
21
+ #abort;
22
+ #idsToResolver = (() => /* @__PURE__ */ new Map())();
23
+ constructor(messages, { imports, exports, functions = new ThreadFunctionsAutomatic(), serialization = new ThreadSerializationStructuredClone(), signal } = {}) {
24
+ this.messages = messages;
25
+ this.#abort = signal ? new NestedAbortController(signal) : new AbortController();
26
+ this.exports = exports ?? {};
27
+ this.imports = createThreadImports(this.#handlerForCall.bind(this), imports);
28
+ this.functions = functions;
29
+ this.serialization = serialization;
30
+ this.functions.start?.(this);
31
+ this.serialization.start?.(this);
32
+ this.signal.addEventListener("abort", () => {
33
+ for (const id of this.#idsToResolver.keys()) this.#resolveCall(id, void 0, new ThreadClosedError());
34
+ this.#idsToResolver.clear();
35
+ }, { once: true });
36
+ messages.listen(async (rawData) => {
37
+ if (!(Array.isArray(rawData) && typeof rawData[0] === "number")) return;
38
+ const data = rawData;
39
+ switch (data[0]) {
40
+ case 1: {
41
+ const [, id, property, args] = data;
42
+ const func = this.exports[property] ?? (() => {
43
+ throw new Error(`No '${property}' method is exported from this thread`);
44
+ });
45
+ await this.#callLocal(func, args, (value, error, transferable) => {
46
+ this.messages.send([
47
+ 2,
48
+ id,
49
+ value,
50
+ error
51
+ ], transferable);
52
+ });
53
+ break;
54
+ }
55
+ case 3: {
56
+ const [, callID, funcID, args] = data;
57
+ const func = this.functions.get(funcID, this) ?? missingThreadFunction;
58
+ await this.#callLocal(func, args, (value, error, transferable) => {
59
+ this.messages.send([
60
+ 4,
61
+ callID,
62
+ value,
63
+ error
64
+ ], transferable);
65
+ });
66
+ break;
67
+ }
68
+ case 2:
69
+ case 4:
70
+ this.#resolveCall(...data.slice(1));
71
+ break;
72
+ case 5: {
73
+ const id = data[1];
74
+ this.functions.release(id, this);
75
+ break;
76
+ }
77
+ }
78
+ }, { signal: this.signal });
79
+ }
80
+ close() {
81
+ this.#abort.abort();
82
+ }
83
+ async call(func, args) {
84
+ if (this.closed) return Promise.reject(new ThreadClosedError());
85
+ const transferable = [];
86
+ const serialized = await this.serialization.serialize(args, this, transferable);
87
+ const id = nanoid();
88
+ const done = this.#waitForResult(id);
89
+ func(id, serialized, transferable);
90
+ return done;
91
+ }
92
+ async #callLocal(func, args, withResult) {
93
+ try {
94
+ const result = this.functions.call ? await this.functions.call(func, args, this) : await func(...await this.serialization.deserialize(args, this));
95
+ const transferable = [];
96
+ withResult(await this.serialization.serialize(result, this, transferable), void 0, transferable);
97
+ } catch (error) {
98
+ withResult(void 0, await this.serialization.serialize(error, this));
99
+ }
100
+ }
101
+ #handlerForCall(property) {
102
+ return (...args) => {
103
+ try {
104
+ if (typeof property !== "string" && typeof property !== "number") throw new Error(`Can’t call a symbol method on a thread: ${property.toString()}`);
105
+ return this.call((id, serializedArgs, transferable) => {
106
+ this.messages.send([
107
+ 1,
108
+ id,
109
+ property,
110
+ serializedArgs
111
+ ], transferable);
112
+ }, args);
113
+ } catch (error) {
114
+ return Promise.reject(error);
115
+ }
116
+ };
117
+ }
118
+ #resolveCall(...args) {
119
+ const callID = args[0];
120
+ const resolver = this.#idsToResolver.get(callID);
121
+ if (resolver) {
122
+ resolver(...args);
123
+ this.#idsToResolver.delete(callID);
124
+ }
125
+ }
126
+ #waitForResult(id) {
127
+ const promise = new Promise((resolve, reject) => {
128
+ this.#idsToResolver.set(id, async (_, value, error) => {
129
+ try {
130
+ if (error == null) resolve(await this.serialization.deserialize(value, this));
131
+ else reject(await this.serialization.deserialize(error, this));
132
+ } catch (deserializeError) {
133
+ reject(deserializeError);
134
+ }
135
+ });
136
+ });
137
+ Object.defineProperty(promise, Symbol.asyncIterator, { async *value() {
138
+ const result = await promise;
139
+ Object.defineProperty(result, Symbol.asyncIterator, { value: () => result });
140
+ yield* result;
141
+ } });
142
+ return promise;
143
+ }
144
+ };
189
145
  function createThreadImports(handlerForImport, imported) {
190
- let call;
191
-
192
- if (imported == null) {
193
- if (typeof Proxy !== 'function') {
194
- throw new Error(`You must pass an array of callable methods in environments without Proxies.`);
195
- }
196
-
197
- const cache = new Map();
198
-
199
- call = new Proxy({}, {
200
- get(_target, property) {
201
- if (cache.has(property)) {
202
- return cache.get(property);
203
- }
204
-
205
- const handler = handlerForImport(property);
206
- cache.set(property, handler);
207
- return handler;
208
- }
209
- });
210
- } else {
211
- call = {};
212
-
213
- for (const method of imported) {
214
- Object.defineProperty(call, method, {
215
- value: handlerForImport(method),
216
- writable: false,
217
- configurable: true,
218
- enumerable: true
219
- });
220
- }
221
- }
222
-
223
- return call;
146
+ let call;
147
+ if (imported == null) {
148
+ if (typeof Proxy !== "function") throw new Error(`You must pass an array of callable methods in environments without Proxies.`);
149
+ const cache = /* @__PURE__ */ new Map();
150
+ call = new Proxy({}, { get(_target, property) {
151
+ if (cache.has(property)) return cache.get(property);
152
+ const handler = handlerForImport(property);
153
+ cache.set(property, handler);
154
+ return handler;
155
+ } });
156
+ } else {
157
+ call = {};
158
+ for (const method of imported) Object.defineProperty(call, method, {
159
+ value: handlerForImport(method),
160
+ writable: false,
161
+ configurable: true,
162
+ enumerable: true
163
+ });
164
+ }
165
+ return call;
224
166
  }
225
-
226
167
  function missingThreadFunction() {
227
- throw new Error(`You attempted to call a function that is not stored. It may have already been released.`);
168
+ throw new Error(`You attempted to call a function that is not stored. It may have already been released.`);
228
169
  }
229
-
170
+ //#endregion
230
171
  export { Thread };
231
- //# sourceMappingURL=Thread.mjs.map
172
+
173
+ //# sourceMappingURL=Thread.mjs.map