@mittwald/flow-remote-core 0.2.0-alpha.104 → 0.2.0-alpha.1041
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/js/_virtual/_rolldown/runtime.mjs +13 -0
- package/dist/js/index-node.mjs +21 -0
- package/dist/js/index-node.mjs.map +1 -0
- package/dist/js/index.mjs +24 -0
- package/dist/js/index.mjs.map +1 -0
- package/dist/js/node_modules/.pnpm/@quilted_events@2.1.5/node_modules/@quilted/events/build/esm/abort/NestedAbortController.mjs +35 -0
- package/dist/js/node_modules/.pnpm/@quilted_events@2.1.5/node_modules/@quilted/events/build/esm/abort/NestedAbortController.mjs.map +1 -0
- package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/Thread.mjs +173 -0
- 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 -0
- package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/constants.mjs +7 -0
- 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 -0
- package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/errors.mjs +10 -0
- 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 -0
- package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/functions/ThreadFunctionsAutomatic.mjs +70 -0
- 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 -0
- package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/nanoid.mjs +11 -0
- 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 -0
- package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/serialization/ThreadSerializationStructuredClone.mjs +132 -0
- 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 -0
- package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/serialization/shared.mjs +13 -0
- 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 -0
- package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/threads/ThreadIframe.mjs +154 -0
- 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 -0
- package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/threads/ThreadNestedIframe.mjs +78 -0
- 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 -0
- 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 +120 -0
- 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 -0
- 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 +192 -0
- 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 -0
- 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 +7 -0
- 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 -0
- package/dist/js/node_modules/.pnpm/@quilted_threads@3.3.1_patch_hash_df15ead5d86def314ee16ab6a48f9e4faa765b52aa161b10d2848_aa11bff1669c76d0bae25976909ea4eb/node_modules/@quilted/threads/build/esm/transfer.mjs +16 -0
- 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 -0
- package/dist/js/packages/remote-core/src/connection/connectHostRenderRoot.mjs +54 -0
- package/dist/js/packages/remote-core/src/connection/connectHostRenderRoot.mjs.map +1 -0
- package/dist/js/packages/remote-core/src/connection/connectRemoteIframe.mjs +77 -0
- package/dist/js/packages/remote-core/src/connection/connectRemoteIframe.mjs.map +1 -0
- package/dist/js/packages/remote-core/src/connection/index.mjs +4 -0
- package/dist/js/packages/remote-core/src/connection/types.mjs +14 -0
- package/dist/js/packages/remote-core/src/connection/types.mjs.map +1 -0
- package/dist/js/packages/remote-core/src/error.mjs +12 -0
- package/dist/js/packages/remote-core/src/error.mjs.map +1 -0
- package/dist/js/packages/remote-core/src/events/remoteEvents.mjs +17 -0
- package/dist/js/packages/remote-core/src/events/remoteEvents.mjs.map +1 -0
- package/dist/js/packages/remote-core/src/ext-bridge/getWithMergedHostConfig.mjs +12 -0
- package/dist/js/packages/remote-core/src/ext-bridge/getWithMergedHostConfig.mjs.map +1 -0
- package/dist/js/packages/remote-core/src/ext-bridge/implementation.mjs +9 -0
- package/dist/js/packages/remote-core/src/ext-bridge/implementation.mjs.map +1 -0
- package/dist/js/packages/remote-core/src/serialization/FlowThreadSerialization.mjs +50 -0
- package/dist/js/packages/remote-core/src/serialization/FlowThreadSerialization.mjs.map +1 -0
- package/dist/js/packages/remote-core/src/serialization/Serializer.mjs +32 -0
- package/dist/js/packages/remote-core/src/serialization/Serializer.mjs.map +1 -0
- package/dist/js/packages/remote-core/src/serialization/index.mjs +10 -0
- package/dist/js/packages/remote-core/src/serialization/serializers/dataTransferText.mjs +22 -0
- package/dist/js/packages/remote-core/src/serialization/serializers/dataTransferText.mjs.map +1 -0
- package/dist/js/packages/remote-core/src/serialization/serializers/date.mjs +15 -0
- package/dist/js/packages/remote-core/src/serialization/serializers/date.mjs.map +1 -0
- package/dist/js/packages/remote-core/src/serialization/serializers/file.mjs +32 -0
- package/dist/js/packages/remote-core/src/serialization/serializers/file.mjs.map +1 -0
- package/dist/js/packages/remote-core/src/serialization/serializers/fileList.mjs +20 -0
- package/dist/js/packages/remote-core/src/serialization/serializers/fileList.mjs.map +1 -0
- package/dist/js/packages/remote-core/src/serialization/serializers/formData.mjs +29 -0
- package/dist/js/packages/remote-core/src/serialization/serializers/formData.mjs.map +1 -0
- package/dist/js/packages/remote-core/src/serialization/serializers/index.mjs +23 -0
- package/dist/js/packages/remote-core/src/serialization/serializers/index.mjs.map +1 -0
- package/dist/js/packages/remote-core/src/serialization/serializers/passwordPolicy.mjs +15 -0
- package/dist/js/packages/remote-core/src/serialization/serializers/passwordPolicy.mjs.map +1 -0
- package/dist/js/packages/remote-core/src/shim.mjs +33 -0
- package/dist/js/packages/remote-core/src/shim.mjs.map +1 -0
- package/dist/types/connection/connectHostRenderRoot.d.ts +11 -2
- package/dist/types/connection/connectHostRenderRoot.d.ts.map +1 -1
- package/dist/types/connection/connectRemoteIframe.d.ts +14 -8
- package/dist/types/connection/connectRemoteIframe.d.ts.map +1 -1
- package/dist/types/connection/types.d.ts +50 -5
- package/dist/types/connection/types.d.ts.map +1 -1
- package/dist/types/events/remoteEvents.d.ts +17 -0
- package/dist/types/events/remoteEvents.d.ts.map +1 -0
- package/dist/types/events/remoteEvents.test.d.ts +2 -0
- package/dist/types/events/remoteEvents.test.d.ts.map +1 -0
- package/dist/types/ext-bridge/getWithMergedHostConfig.d.ts +4 -0
- package/dist/types/ext-bridge/getWithMergedHostConfig.d.ts.map +1 -0
- package/dist/types/ext-bridge/implementation.d.ts +2 -2
- package/dist/types/ext-bridge/implementation.d.ts.map +1 -1
- package/dist/types/index-node.d.ts +2 -0
- package/dist/types/index-node.d.ts.map +1 -0
- package/dist/types/index.d.ts +4 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/serialization/FlowThreadSerialization.d.ts +7 -0
- package/dist/types/serialization/FlowThreadSerialization.d.ts.map +1 -0
- package/dist/types/serialization/FlowThreadSerialization.test.d.ts +2 -0
- package/dist/types/serialization/FlowThreadSerialization.test.d.ts.map +1 -0
- package/dist/types/serialization/Serialization.test.d.ts +2 -0
- package/dist/types/serialization/Serialization.test.d.ts.map +1 -0
- package/dist/types/serialization/Serializer.d.ts +28 -0
- package/dist/types/serialization/Serializer.d.ts.map +1 -0
- package/dist/types/serialization/index.d.ts +4 -0
- package/dist/types/serialization/index.d.ts.map +1 -0
- package/dist/types/serialization/serializers/dataTransferText.d.ts +3 -0
- package/dist/types/serialization/serializers/dataTransferText.d.ts.map +1 -0
- package/dist/types/serialization/serializers/date.d.ts +4 -0
- package/dist/types/serialization/serializers/date.d.ts.map +1 -0
- package/dist/types/serialization/serializers/file.d.ts +12 -0
- package/dist/types/serialization/serializers/file.d.ts.map +1 -0
- package/dist/types/serialization/serializers/fileList.d.ts +4 -0
- package/dist/types/serialization/serializers/fileList.d.ts.map +1 -0
- package/dist/types/serialization/serializers/formData.d.ts +7 -0
- package/dist/types/serialization/serializers/formData.d.ts.map +1 -0
- package/dist/types/serialization/serializers/index.d.ts +7 -0
- package/dist/types/serialization/serializers/index.d.ts.map +1 -0
- package/dist/types/serialization/serializers/passwordPolicy.d.ts +4 -0
- package/dist/types/serialization/serializers/passwordPolicy.d.ts.map +1 -0
- package/dist/types/shim.d.ts +14 -0
- package/dist/types/shim.d.ts.map +1 -0
- package/dist/types/tests/utils.d.ts +2 -0
- package/dist/types/tests/utils.d.ts.map +1 -0
- package/package.json +29 -22
- package/dist/index.js +0 -100
- package/dist/types/events/FlowRemoteEvent.d.ts +0 -4
- package/dist/types/events/FlowRemoteEvent.d.ts.map +0 -1
- package/dist/types/events/index.d.ts +0 -5
- package/dist/types/events/index.d.ts.map +0 -1
- package/dist/types/events/serializers.d.ts +0 -5
- package/dist/types/events/serializers.d.ts.map +0 -1
- package/dist/types/ext-bridge/delegateExtBridgeRemoteFunctions.d.ts +0 -4
- package/dist/types/ext-bridge/delegateExtBridgeRemoteFunctions.d.ts.map +0 -1
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import { RemoteToHostConnection } from './types';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { RemoteConnection } from '@mittwald/remote-dom-core/elements';
|
|
3
|
+
interface Options {
|
|
4
|
+
root: HTMLDivElement;
|
|
5
|
+
onPathnameChanged?: (pathname: string) => void;
|
|
6
|
+
onHostError?: (error: string) => void;
|
|
7
|
+
packageVersion?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const connectRemoteReceiver: (root: HTMLDivElement, receiverConnection: RemoteConnection) => Promise<void>;
|
|
10
|
+
export declare const connectHostRenderRoot: (options: Options) => Promise<RemoteToHostConnection>;
|
|
11
|
+
export declare const connectHostRenderRootRef: (opts: Omit<Options, "root">) => (ref: HTMLDivElement | null) => Promise<RemoteToHostConnection> | undefined;
|
|
12
|
+
export {};
|
|
4
13
|
//# sourceMappingURL=connectHostRenderRoot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectHostRenderRoot.d.ts","sourceRoot":"","sources":["../../../src/connection/connectHostRenderRoot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
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,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,KAAK,cAAc,GAAG,IAAI,gDAc3D,CAAC"}
|
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
import { HostToRemoteConnection } from './types';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { HostToRemoteConnection, HostToRemoteConnectionReadyEvent, NavigationState, RemoteExtBridgeConnectionApi } from './types';
|
|
2
|
+
import { ReportedEvent } from '../events/remoteEvents';
|
|
3
|
+
import { HostConfig } from '@mittwald/ext-bridge';
|
|
4
|
+
import { RemoteConnection } from '@mittwald/remote-dom-core/elements';
|
|
5
|
+
interface Options {
|
|
5
6
|
connection: RemoteConnection;
|
|
6
7
|
iframe: HTMLIFrameElement;
|
|
7
|
-
|
|
8
|
+
hostConfig: HostConfig;
|
|
9
|
+
onReady?: (event: HostToRemoteConnectionReadyEvent) => void;
|
|
10
|
+
onLoadingChanged?: (isLoading: boolean) => void;
|
|
8
11
|
onError?: (error: string) => void;
|
|
9
|
-
|
|
12
|
+
onNavigationStateChanged?: (state: NavigationState) => void;
|
|
13
|
+
onDeprecation?: (message: string) => void;
|
|
14
|
+
onEvent?: (event: ReportedEvent) => void;
|
|
15
|
+
extBridgeImplementation?: RemoteExtBridgeConnectionApi;
|
|
10
16
|
}
|
|
11
|
-
export declare const connectRemoteIframe: (opts:
|
|
12
|
-
export declare const connectRemoteIframeRef: (opts: Omit<
|
|
17
|
+
export declare const connectRemoteIframe: (opts: Options) => HostToRemoteConnection;
|
|
18
|
+
export declare const connectRemoteIframeRef: (opts: Omit<Options, "iframe">) => (ref: HTMLIFrameElement | null) => HostToRemoteConnection | undefined;
|
|
13
19
|
export {};
|
|
14
20
|
//# sourceMappingURL=connectRemoteIframe.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectRemoteIframe.d.ts","sourceRoot":"","sources":["../../../src/connection/connectRemoteIframe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"connectRemoteIframe.d.ts","sourceRoot":"","sources":["../../../src/connection/connectRemoteIframe.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,sBAAsB,EAC3B,KAAK,gCAAgC,EACrC,KAAK,eAAe,EAEpB,KAAK,4BAA4B,EAGlC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAsB,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAI/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAG3E,UAAU,OAAO;IACf,UAAU,EAAE,gBAAgB,CAAC;IAC7B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,gCAAgC,KAAK,IAAI,CAAC;IAC5D,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,wBAAwB,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAC5D,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IACzC,uBAAuB,CAAC,EAAE,4BAA4B,CAAC;CACxD;AAkBD,eAAO,MAAM,mBAAmB,GAAI,MAAM,OAAO,KAAG,sBA0EnD,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAChC,MAAM,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,KAAK,iBAAiB,GAAG,IAAI,uCAehE,CAAC"}
|
|
@@ -1,13 +1,58 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ExtBridgeConfigInput, ExtBridgeConnectionApi, HostConfig } from '@mittwald/ext-bridge';
|
|
2
|
+
import { ReportedEvent } from '../events/remoteEvents';
|
|
3
|
+
import { RemoteConnection } from '@mittwald/remote-dom-core';
|
|
3
4
|
import { ThreadIframe, ThreadNestedIframe } from '@quilted/threads';
|
|
4
|
-
export
|
|
5
|
-
|
|
5
|
+
export type { RemoteConnection } from '@mittwald/remote-dom-core';
|
|
6
|
+
export interface NavigationState {
|
|
7
|
+
pathname: string;
|
|
8
|
+
isPending: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface RemoteReadyEvent {
|
|
11
|
+
version: Version;
|
|
12
|
+
packageVersion?: string;
|
|
13
|
+
}
|
|
14
|
+
export type RemoteReadyEventInput = Version | RemoteReadyEvent;
|
|
15
|
+
export type RemoteExtBridgeConfig = Omit<ExtBridgeConfigInput, keyof HostConfig>;
|
|
16
|
+
export interface RemoteExtBridgeConnectionApi extends Omit<ExtBridgeConnectionApi, "getConfig"> {
|
|
17
|
+
getConfig: () => Promise<RemoteExtBridgeConfig>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Breaking Change warning: Do not remove/rename/modify existing properties of
|
|
21
|
+
* this interface, as they might be used by existing extensions.
|
|
22
|
+
*
|
|
23
|
+
* When addding properties, make sure to release the host before all clients.
|
|
24
|
+
*/
|
|
25
|
+
export interface HostExports extends ExtBridgeConnectionApi {
|
|
26
|
+
setIsReady: (event?: RemoteReadyEventInput) => Promise<void>;
|
|
27
|
+
setIsLoading: (isLoading: boolean) => Promise<void>;
|
|
6
28
|
setError: (error: string) => Promise<void>;
|
|
29
|
+
setNavigationState: (state: NavigationState) => Promise<void>;
|
|
30
|
+
getHostConfig: () => Promise<HostConfig>;
|
|
31
|
+
reportDeprecation: (message: string) => Promise<void>;
|
|
32
|
+
reportEvent: (event: ReportedEvent) => Promise<void>;
|
|
7
33
|
}
|
|
8
34
|
export interface RemoteExports {
|
|
9
35
|
render: (connection: RemoteConnection) => Promise<void>;
|
|
36
|
+
setPathname: (pathname: string) => Promise<void>;
|
|
37
|
+
setHostError: (error: string) => Promise<void>;
|
|
10
38
|
}
|
|
11
39
|
export type RemoteToHostConnection = ThreadNestedIframe<HostExports, RemoteExports>;
|
|
12
|
-
export
|
|
40
|
+
export interface HostToRemoteConnection {
|
|
41
|
+
version: Version;
|
|
42
|
+
thread: ThreadIframe<RemoteExports, HostExports>;
|
|
43
|
+
updateHostPathname: (hostPathname?: string) => void;
|
|
44
|
+
reportHostError: (error: string) => Promise<void>;
|
|
45
|
+
}
|
|
46
|
+
export interface HostToRemoteConnectionReadyEvent {
|
|
47
|
+
connection: HostToRemoteConnection;
|
|
48
|
+
remoteReadyEvent: RemoteReadyEvent;
|
|
49
|
+
}
|
|
50
|
+
export declare enum Version {
|
|
51
|
+
vUnknown = 0,
|
|
52
|
+
v1 = 1,
|
|
53
|
+
v2 = 2,
|
|
54
|
+
v3 = 3,
|
|
55
|
+
v4 = 4,
|
|
56
|
+
v5 = 5
|
|
57
|
+
}
|
|
13
58
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/connection/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/connection/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,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,IAAI,CACtC,oBAAoB,EACpB,MAAM,UAAU,CACjB,CAAC;AAEF,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,WAAY,SAAQ,sBAAsB;IACzD,UAAU,EAAE,CAAC,KAAK,CAAC,EAAE,qBAAqB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,YAAY,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,kBAAkB,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,aAAa,EAAE,MAAM,OAAO,CAAC,UAAU,CAAC,CAAC;IACzC,iBAAiB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD,WAAW,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACtD;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,CAAC,UAAU,EAAE,gBAAgB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChD;AAED,MAAM,MAAM,sBAAsB,GAAG,kBAAkB,CACrD,WAAW,EACX,aAAa,CACd,CAAC;AAEF,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,YAAY,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;IACjD,kBAAkB,EAAE,CAAC,YAAY,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD;AAED,MAAM,WAAW,gCAAgC;IAC/C,UAAU,EAAE,sBAAsB,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"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const componentRenderedEventSchema: z.ZodObject<{
|
|
3
|
+
event: z.ZodLiteral<"ComponentRendered">;
|
|
4
|
+
data: z.ZodObject<{
|
|
5
|
+
component: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export declare const reportedEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
9
|
+
event: z.ZodLiteral<"ComponentRendered">;
|
|
10
|
+
data: z.ZodObject<{
|
|
11
|
+
component: z.ZodString;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
}, z.core.$strip>], "event">;
|
|
14
|
+
export type ComponentRenderedEvent = z.infer<typeof componentRenderedEventSchema>;
|
|
15
|
+
export type ReportedEvent = z.infer<typeof reportedEventSchema>;
|
|
16
|
+
export declare const parseReportedEvent: (event: unknown) => ReportedEvent | undefined;
|
|
17
|
+
//# sourceMappingURL=remoteEvents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remoteEvents.test.d.ts","sourceRoot":"","sources":["../../../src/events/remoteEvents.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { RemoteExtBridgeConnectionApi } from '../connection';
|
|
2
|
+
import { ExtBridgeConfigInput, HostConfig } from '@mittwald/ext-bridge';
|
|
3
|
+
export declare const getWithMergedHostConfig: (extBridgeConnection: RemoteExtBridgeConnectionApi, hostConfig: HostConfig) => () => Promise<ExtBridgeConfigInput>;
|
|
4
|
+
//# sourceMappingURL=getWithMergedHostConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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,CAOrC,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const emptyImplementation:
|
|
1
|
+
import { ExtBridgeConnectionApi } from '@mittwald/ext-bridge';
|
|
2
|
+
export declare const emptyImplementation: ExtBridgeConnectionApi;
|
|
3
3
|
//# sourceMappingURL=implementation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implementation.d.ts","sourceRoot":"","sources":["../../../src/ext-bridge/implementation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAUA,cAAc,SAAS,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { RemoteReceiver } from '@mittwald/remote-dom-core/receivers';
|
|
2
|
+
export { RemoteElement, RemoteEvent, type RemoteElementConstructor, } from '@mittwald/remote-dom-core/elements';
|
|
3
|
+
export * from './serialization';
|
|
2
4
|
export * from './connection';
|
|
3
5
|
export * from './error';
|
|
4
|
-
export * from './events';
|
|
5
|
-
export * from './events/FlowRemoteEvent';
|
|
6
|
-
export * from './events/serializers';
|
|
6
|
+
export * from './events/remoteEvents';
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
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"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ThreadSerializationStructuredClone } from '@quilted/threads';
|
|
2
|
+
export declare class FlowThreadSerialization extends ThreadSerializationStructuredClone {
|
|
3
|
+
constructor();
|
|
4
|
+
private isSerializableByBase;
|
|
5
|
+
private omitSerialization;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=FlowThreadSerialization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlowThreadSerialization.d.ts","sourceRoot":"","sources":["../../../src/serialization/FlowThreadSerialization.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,EAGnC,MAAM,kBAAkB,CAAC;AAS1B,qBAAa,uBAAwB,SAAQ,kCAAkC;;IAmD7E,OAAO,CAAC,oBAAoB;IAU5B,OAAO,CAAC,iBAAiB;CAG1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlowThreadSerialization.test.d.ts","sourceRoot":"","sources":["../../../src/serialization/FlowThreadSerialization.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Serialization.test.d.ts","sourceRoot":"","sources":["../../../src/serialization/Serialization.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
interface SerializationStrategy<TIn, TOut> {
|
|
2
|
+
isApplicable: (val: unknown) => val is TIn;
|
|
3
|
+
apply: (val: TIn) => TOut | Promise<TOut>;
|
|
4
|
+
}
|
|
5
|
+
declare const Key = "mittwald.flow-remote-core.serializer.name";
|
|
6
|
+
export interface SuccessfulSerializationResult<T> {
|
|
7
|
+
value: T;
|
|
8
|
+
[Key]: string;
|
|
9
|
+
}
|
|
10
|
+
export type SerializationResult<T> = {
|
|
11
|
+
applied: true;
|
|
12
|
+
result: SuccessfulSerializationResult<T>;
|
|
13
|
+
} | {
|
|
14
|
+
applied: false;
|
|
15
|
+
};
|
|
16
|
+
export declare class Serializer<TIn, TOut> {
|
|
17
|
+
private options;
|
|
18
|
+
constructor(options: {
|
|
19
|
+
name: string;
|
|
20
|
+
serialize: SerializationStrategy<TIn, TOut>;
|
|
21
|
+
deserialize: Pick<SerializationStrategy<TOut, TIn>, "apply">;
|
|
22
|
+
});
|
|
23
|
+
private apply;
|
|
24
|
+
serialize(val: unknown): Promise<SerializationResult<TOut>>;
|
|
25
|
+
deserialize(val: unknown): Promise<SerializationResult<TIn>>;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=Serializer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Serializer } from '../Serializer';
|
|
2
|
+
export interface SerializedFile {
|
|
3
|
+
name: string;
|
|
4
|
+
type: string;
|
|
5
|
+
lastModified: number;
|
|
6
|
+
content: ArrayBuffer;
|
|
7
|
+
}
|
|
8
|
+
export declare const isSerializedFile: (value: unknown) => value is SerializedFile;
|
|
9
|
+
export declare const fileSerialize: (file: File) => Promise<SerializedFile>;
|
|
10
|
+
export declare const fileDeSerialize: (file: SerializedFile) => File;
|
|
11
|
+
export declare const fileSerializer: Serializer<File, SerializedFile>;
|
|
12
|
+
//# sourceMappingURL=file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Serializer } from '../Serializer';
|
|
2
|
+
import { fileSerialize } from '.';
|
|
3
|
+
type SerializedFormDataValue = FormDataEntryValue | Awaited<ReturnType<typeof fileSerialize>>;
|
|
4
|
+
type SerializedFormDataEntries = [string, SerializedFormDataValue][];
|
|
5
|
+
export declare const formDataSerializer: Serializer<FormData, SerializedFormDataEntries>;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=formData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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,GACxB,kBAAkB,GAClB,OAAO,CAAC,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC;AAC9C,KAAK,yBAAyB,GAAG,CAAC,MAAM,EAAE,uBAAuB,CAAC,EAAE,CAAC;AAErE,eAAO,MAAM,kBAAkB,iDAuC7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Serializer } from '../Serializer';
|
|
2
|
+
import { Policy, PolicyDeclaration } from '@mittwald/flow-react-components/mittwald-password-tools-js';
|
|
3
|
+
export declare const passwordPolicySerializer: Serializer<Policy, PolicyDeclaration>;
|
|
4
|
+
//# sourceMappingURL=passwordPolicy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Installs a minimal DOM shim so modules that subclass `HTMLElement` — the
|
|
3
|
+
* remote custom elements, via the remote-dom fork's `RemoteElement` — can be
|
|
4
|
+
* evaluated in a Node/SSR context (e.g. Next.js server-rendering a client
|
|
5
|
+
* component). Guarded on a missing DOM, so it is a no-op in a real browser and
|
|
6
|
+
* can safely live on the browser entry without clobbering the native DOM.
|
|
7
|
+
*
|
|
8
|
+
* Exported as a _used binding_ rather than imported as a bare `import
|
|
9
|
+
* "./shim"`: Vite 8's Rollup reorders bare side-effect imports after binding
|
|
10
|
+
* imports, which would let `HTMLElement` be subclassed before the shim runs. A
|
|
11
|
+
* binding keeps this import in source order — first.
|
|
12
|
+
*/
|
|
13
|
+
export declare const domShimApplied: boolean;
|
|
14
|
+
//# sourceMappingURL=shim.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shim.d.ts","sourceRoot":"","sources":["../../src/shim.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,SAqBvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
package/package.json
CHANGED
|
@@ -1,54 +1,61 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-remote-core",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.1041",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Core functionality to setup a remote/host environment",
|
|
6
|
-
"homepage": "https://mittwald.
|
|
6
|
+
"homepage": "https://flow.mittwald.de",
|
|
7
7
|
"repository": "https://github.com/mittwald/flow",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./dist/types/index.d.ts",
|
|
11
|
-
"
|
|
11
|
+
"node": "./dist/js/index-node.mjs",
|
|
12
|
+
"default": "./dist/js/index.mjs"
|
|
12
13
|
}
|
|
13
14
|
},
|
|
14
15
|
"files": [
|
|
15
16
|
"dist"
|
|
16
17
|
],
|
|
17
18
|
"engines": {
|
|
18
|
-
"node": ">=
|
|
19
|
+
"node": ">=24.0.0"
|
|
19
20
|
},
|
|
20
21
|
"scripts": {
|
|
21
22
|
"build": "vite build --config vite.build.config.ts",
|
|
22
23
|
"clean": "rimraf dist",
|
|
23
|
-
"test": "
|
|
24
|
-
"test:
|
|
24
|
+
"test:compile": "tsc --noEmit",
|
|
25
|
+
"test:unit": "vitest run --passWithNoTests"
|
|
25
26
|
},
|
|
26
27
|
"dependencies": {
|
|
27
|
-
"@
|
|
28
|
-
"@
|
|
29
|
-
"
|
|
28
|
+
"@internationalized/date": "^3.12.2",
|
|
29
|
+
"@lit-labs/ssr-dom-shim": "^1.6.0",
|
|
30
|
+
"@mittwald/remote-dom-core": "1.7.0-mittwald.10",
|
|
31
|
+
"@quilted/threads": "^3.3.1",
|
|
32
|
+
"@types/invariant": "^2.2.37",
|
|
33
|
+
"invariant": "^2.2.4",
|
|
34
|
+
"remeda": "^2.39.0",
|
|
35
|
+
"zod": "^4.4.3"
|
|
30
36
|
},
|
|
31
37
|
"devDependencies": {
|
|
32
|
-
"@mittwald/ext-bridge": "0.2.0-alpha.
|
|
33
|
-
"@mittwald/
|
|
34
|
-
"@
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"rimraf": "^6.
|
|
38
|
+
"@mittwald/ext-bridge": "0.2.0-alpha.1041",
|
|
39
|
+
"@mittwald/flow-react-components": "0.2.0-alpha.1041",
|
|
40
|
+
"@mittwald/typescript-config": "0.2.0-alpha.1041",
|
|
41
|
+
"@types/node": "^25.9.3",
|
|
42
|
+
"nx": "^22.7.5",
|
|
43
|
+
"rimraf": "^6.1.3",
|
|
38
44
|
"rollup-preserve-directives": "^1.1.3",
|
|
39
|
-
"typescript": "^
|
|
40
|
-
"
|
|
41
|
-
"vite
|
|
42
|
-
"vite-plugin-
|
|
43
|
-
"
|
|
45
|
+
"typescript": "^6.0.3",
|
|
46
|
+
"unplugin-dts": "^1.0.3",
|
|
47
|
+
"vite": "^8.2.1",
|
|
48
|
+
"vite-plugin-externalize-deps": "^0.10.0",
|
|
49
|
+
"vitest": "^4.1.10"
|
|
44
50
|
},
|
|
45
51
|
"peerDependencies": {
|
|
46
|
-
"@mittwald/ext-bridge": "
|
|
52
|
+
"@mittwald/ext-bridge": "0.2.0-alpha.1041",
|
|
53
|
+
"@mittwald/flow-react-components": "0.2.0-alpha.1041"
|
|
47
54
|
},
|
|
48
55
|
"peerDependenciesMeta": {
|
|
49
56
|
"@mittwald/ext-bridge": {
|
|
50
57
|
"optional": true
|
|
51
58
|
}
|
|
52
59
|
},
|
|
53
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "b2ded274dfe269b6b2f751d42ce4624763794269"
|
|
54
61
|
}
|
package/dist/index.js
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { RemoteElement as h, RemoteEvent as A } from "@mfalkenberg/remote-dom-core/elements";
|
|
2
|
-
import { ThreadNestedIframe as u, ThreadIframe as l } from "@quilted/threads";
|
|
3
|
-
import "@mittwald/ext-bridge";
|
|
4
|
-
import * as i from "remeda";
|
|
5
|
-
import { isObjectType as R, isString as g, isNumber as f, isBoolean as y } from "remeda";
|
|
6
|
-
const E = Object.keys({
|
|
7
|
-
getSessionToken: !0,
|
|
8
|
-
getConfig: !0
|
|
9
|
-
}), x = (e) => {
|
|
10
|
-
const t = e.imports, n = E.map((o) => [o, (...c) => {
|
|
11
|
-
var s;
|
|
12
|
-
return (s = t[o]) == null ? void 0 : s.call(t, ...c);
|
|
13
|
-
}]);
|
|
14
|
-
Object.assign(mwExtBridge, Object.fromEntries(n));
|
|
15
|
-
}, _ = (e) => {
|
|
16
|
-
const t = new u({
|
|
17
|
-
exports: {
|
|
18
|
-
render: (n) => import("@mfalkenberg/remote-dom-core/elements").then(
|
|
19
|
-
({ RemoteMutationObserver: o }) => {
|
|
20
|
-
new o(n).observe(e);
|
|
21
|
-
}
|
|
22
|
-
)
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
return t.imports.setIsReady(), typeof mwExtBridge < "u" && (x(t), mwExtBridge.setIsReady()), t;
|
|
26
|
-
}, v = (e) => {
|
|
27
|
-
if (e === null)
|
|
28
|
-
return;
|
|
29
|
-
if ("__remoteConnection" in e)
|
|
30
|
-
return e.__remoteConnection;
|
|
31
|
-
const t = _(e);
|
|
32
|
-
return Object.assign(e, { __remoteConnection: t }), t;
|
|
33
|
-
};
|
|
34
|
-
class m extends Error {
|
|
35
|
-
constructor(t) {
|
|
36
|
-
super(t), this.message = t;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
m.prototype.name = "RemoteError";
|
|
40
|
-
const w = new Proxy(
|
|
41
|
-
{},
|
|
42
|
-
{
|
|
43
|
-
get() {
|
|
44
|
-
throw new m("Missing implementation for MwExtBridge");
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
), b = (e) => {
|
|
48
|
-
const {
|
|
49
|
-
connection: t,
|
|
50
|
-
iframe: n,
|
|
51
|
-
onReady: o,
|
|
52
|
-
onError: r,
|
|
53
|
-
extBridgeImplementation: c = w
|
|
54
|
-
} = e, s = new l(n, {
|
|
55
|
-
exports: {
|
|
56
|
-
...c,
|
|
57
|
-
setIsReady: async () => {
|
|
58
|
-
o == null || o();
|
|
59
|
-
},
|
|
60
|
-
setError: async (p) => {
|
|
61
|
-
r == null || r(p);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
return s.imports.render(t), s;
|
|
66
|
-
}, O = (e) => (t) => {
|
|
67
|
-
if (!t)
|
|
68
|
-
return;
|
|
69
|
-
if ("__remoteConnection" in t)
|
|
70
|
-
return t.__remoteConnection;
|
|
71
|
-
const n = b({
|
|
72
|
-
iframe: t,
|
|
73
|
-
...e
|
|
74
|
-
});
|
|
75
|
-
return Object.assign(t, { __remoteConnection: n }), n;
|
|
76
|
-
}, a = (e) => g(e) || f(e) || y(e) || i.isArray(e) && e.every(a), d = (e) => i.isArray(e) ? e.map(d) : R(e) ? i.pickBy(e, a) : e, k = (...e) => (t) => i.pick(t, e), I = d, T = (e, t, n = {}) => (o) => {
|
|
77
|
-
const r = n[t] ?? I;
|
|
78
|
-
return e(r(o));
|
|
79
|
-
};
|
|
80
|
-
class F extends CustomEvent {
|
|
81
|
-
constructor(t, n) {
|
|
82
|
-
super(t, {
|
|
83
|
-
detail: n
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
export {
|
|
88
|
-
F as FlowRemoteEvent,
|
|
89
|
-
h as RemoteElement,
|
|
90
|
-
m as RemoteError,
|
|
91
|
-
A as RemoteEvent,
|
|
92
|
-
_ as connectHostRenderRoot,
|
|
93
|
-
v as connectHostRenderRootRef,
|
|
94
|
-
b as connectRemoteIframe,
|
|
95
|
-
O as connectRemoteIframeRef,
|
|
96
|
-
T as mapEventHandler,
|
|
97
|
-
k as pick,
|
|
98
|
-
d as primitiveFlat,
|
|
99
|
-
I as standard
|
|
100
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FlowRemoteEvent.d.ts","sourceRoot":"","sources":["../../../src/events/FlowRemoteEvent.ts"],"names":[],"mappings":"AAAA,qBAAa,eAAe,CAAC,CAAC,CAAE,SAAQ,WAAW,CAAC,CAAC,CAAC;gBACjC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;CAK3C"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export type EventHandler = (event: unknown) => void;
|
|
2
|
-
export declare const mapEventHandler: (eventHandler: EventHandler, eventName: string, eventSerialization?: EventSerializationMap) => (event: unknown) => void;
|
|
3
|
-
export type EventSerialization = (event: unknown) => unknown;
|
|
4
|
-
export type EventSerializationMap = Record<string, EventSerialization>;
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/events/index.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;AAEpD,eAAO,MAAM,eAAe,GAExB,cAAc,YAAY,EAC1B,WAAW,MAAM,EACjB,qBAAoB,qBAA0B,MAE/C,OAAO,OAAO,SAGd,CAAC;AAEJ,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;AAC7D,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { EventSerialization } from './index';
|
|
2
|
-
export declare const primitiveFlat: EventSerialization;
|
|
3
|
-
export declare const pick: (...props: string[]) => EventSerialization;
|
|
4
|
-
export declare const standard: EventSerialization;
|
|
5
|
-
//# sourceMappingURL=serializers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serializers.d.ts","sourceRoot":"","sources":["../../../src/events/serializers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAUzD,eAAO,MAAM,aAAa,EAAE,kBAKf,CAAC;AAEd,eAAO,MAAM,IAAI,GACd,GAAG,OAAO,MAAM,EAAE,KAAG,kBAGrB,CAAC;AAEJ,eAAO,MAAM,QAAQ,oBAAgB,CAAC"}
|