@mittwald/flow-remote-core 0.2.0-alpha.4 → 0.2.0-alpha.41
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 +1 -1
- package/dist/index.js +31 -25
- package/dist/types/connection/connectHostIframe.d.ts +1 -0
- package/dist/types/connection/connectHostIframe.d.ts.map +1 -0
- package/dist/types/connection/connectRemoteIframe.d.ts +1 -0
- package/dist/types/connection/connectRemoteIframe.d.ts.map +1 -0
- package/dist/types/events/FlowRemoteEvent.d.ts +1 -0
- package/dist/types/events/FlowRemoteEvent.d.ts.map +1 -0
- package/dist/types/events/index.d.ts +1 -0
- package/dist/types/events/index.d.ts.map +1 -0
- package/dist/types/events/serializers.d.ts +1 -0
- package/dist/types/events/serializers.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +17 -14
package/README.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,44 +1,50 @@
|
|
|
1
|
-
import { ThreadIframe as
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
4
|
-
import { isObjectType as
|
|
1
|
+
import { ThreadIframe as a, ThreadNestedIframe as m } from "@quilted/threads";
|
|
2
|
+
import { RemoteElement as j, RemoteEvent as k } from "@remote-dom/core/elements";
|
|
3
|
+
import * as o from "remeda";
|
|
4
|
+
import { isObjectType as p, isString as d, isNumber as b, isBoolean as l } from "remeda";
|
|
5
5
|
const f = (e) => {
|
|
6
|
-
const t = new
|
|
6
|
+
const t = new a(e.iframe);
|
|
7
7
|
return t.imports.render(e.connection), t;
|
|
8
|
-
},
|
|
8
|
+
}, v = (e) => (t) => {
|
|
9
9
|
t && !("__remoteConnectionEstablished" in t) && (Object.assign(t, { __remoteConnectionEstablished: !0 }), f({
|
|
10
10
|
iframe: t,
|
|
11
11
|
connection: e
|
|
12
12
|
}));
|
|
13
|
-
},
|
|
14
|
-
new
|
|
13
|
+
}, u = (e) => {
|
|
14
|
+
new m({
|
|
15
15
|
exports: {
|
|
16
16
|
render: (t) => {
|
|
17
|
-
|
|
17
|
+
import("@remote-dom/core/elements").then(
|
|
18
|
+
({ RemoteMutationObserver: r }) => {
|
|
19
|
+
new r(t).observe(e);
|
|
20
|
+
}
|
|
21
|
+
);
|
|
18
22
|
}
|
|
19
23
|
}
|
|
20
24
|
});
|
|
21
|
-
},
|
|
22
|
-
e && !("__remoteConnectionEstablished" in e) && (Object.assign(e, { __remoteConnectionEstablished: !0 }),
|
|
23
|
-
},
|
|
24
|
-
const
|
|
25
|
-
return e(
|
|
25
|
+
}, I = (e) => {
|
|
26
|
+
e && !("__remoteConnectionEstablished" in e) && (Object.assign(e, { __remoteConnectionEstablished: !0 }), u(e));
|
|
27
|
+
}, s = (e) => d(e) || b(e) || l(e) || o.isArray(e) && e.every(s), i = (e) => o.isArray(e) ? e.map(i) : p(e) ? o.pickBy(e, s) : e, y = (...e) => (t) => o.pick(t, e), E = i, C = (e, t, r = {}) => (n) => {
|
|
28
|
+
const c = r[t] ?? E;
|
|
29
|
+
return e(c(n));
|
|
26
30
|
};
|
|
27
|
-
class
|
|
28
|
-
constructor(t,
|
|
31
|
+
class h extends CustomEvent {
|
|
32
|
+
constructor(t, r) {
|
|
29
33
|
super(t, {
|
|
30
|
-
detail:
|
|
34
|
+
detail: r
|
|
31
35
|
});
|
|
32
36
|
}
|
|
33
37
|
}
|
|
34
38
|
export {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
39
|
+
h as FlowRemoteEvent,
|
|
40
|
+
j as RemoteElement,
|
|
41
|
+
k as RemoteEvent,
|
|
42
|
+
u as connectHostIframe,
|
|
43
|
+
I as connectHostIframeRef,
|
|
38
44
|
f as connectRemoteIframe,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
45
|
+
v as connectRemoteIframeRef,
|
|
46
|
+
C as mapEventHandler,
|
|
47
|
+
y as pick,
|
|
48
|
+
i as primitiveFlat,
|
|
49
|
+
E as standard
|
|
44
50
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connectHostIframe.d.ts","sourceRoot":"","sources":["../../../src/connection/connectHostIframe.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,WAAY,iBAAiB,SAa1D,CAAC;AAEF,eAAO,MAAM,oBAAoB,QAAS,iBAAiB,GAAG,IAAI,SAKjE,CAAC"}
|
|
@@ -10,3 +10,4 @@ interface ThreadIframeTarget {
|
|
|
10
10
|
export declare const connectRemoteIframe: (opts: Opts) => ThreadIframe<ThreadIframeTarget, Record<string, never>>;
|
|
11
11
|
export declare const connectRemoteIframeRef: (connection: RemoteConnection) => (ref: HTMLIFrameElement | null) => void;
|
|
12
12
|
export {};
|
|
13
|
+
//# sourceMappingURL=connectRemoteIframe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connectRemoteIframe.d.ts","sourceRoot":"","sources":["../../../src/connection/connectRemoteIframe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAElE,UAAU,IAAI;IACZ,UAAU,EAAE,gBAAgB,CAAC;IAC7B,MAAM,EAAE,iBAAiB,CAAC;CAC3B;AAED,UAAU,kBAAkB;IAC1B,MAAM,EAAE,CAAC,UAAU,EAAE,gBAAgB,KAAK,aAAa,CAAC,OAAO,CAAC,CAAC;CAClE;AAED,eAAO,MAAM,mBAAmB,SAAU,IAAI,4DAI7C,CAAC;AAEF,eAAO,MAAM,sBAAsB,eACpB,gBAAgB,WAAW,iBAAiB,GAAG,IAAI,SAQ/D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -2,3 +2,4 @@ export type EventHandler = (event: unknown) => void;
|
|
|
2
2
|
export declare const mapEventHandler: (eventHandler: EventHandler, eventName: string, eventSerialization?: EventSerializationMap) => (event: unknown) => void;
|
|
3
3
|
export type EventSerialization = (event: unknown) => unknown;
|
|
4
4
|
export type EventSerializationMap = Record<string, EventSerialization>;
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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,iBAEV,YAAY,aACf,MAAM,uBACG,qBAAqB,aAEnC,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"}
|
|
@@ -0,0 +1 @@
|
|
|
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,aACJ,MAAM,EAAE,KAAG,kBAGrB,CAAC;AAEJ,eAAO,MAAM,QAAQ,oBAAgB,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,3 +3,5 @@ export * from './connection/connectHostIframe';
|
|
|
3
3
|
export * from './events';
|
|
4
4
|
export * from './events/FlowRemoteEvent';
|
|
5
5
|
export * from './events/serializers';
|
|
6
|
+
export { RemoteElement, RemoteEvent, type RemoteElementConstructor, } from '@remote-dom/core/elements';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,UAAU,CAAC;AACzB,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACL,aAAa,EACb,WAAW,EACX,KAAK,wBAAwB,GAC9B,MAAM,2BAA2B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-remote-core",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.41",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Core functionality to setup a remote/host environment",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -18,25 +18,28 @@
|
|
|
18
18
|
"node": ">=20.11"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
|
-
"build": "
|
|
22
|
-
"
|
|
23
|
-
"test": "",
|
|
24
|
-
"test:compile": "
|
|
21
|
+
"build": "vite build --config vite.build.config.ts",
|
|
22
|
+
"clean": "rimraf dist",
|
|
23
|
+
"test": "exit 0",
|
|
24
|
+
"test:compile": "tsc --noEmit"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@quilted/threads": "^3.1.2",
|
|
28
|
-
"@remote-dom/core": "
|
|
29
|
-
"remeda": "^2.
|
|
28
|
+
"@remote-dom/core": "1.5.1",
|
|
29
|
+
"remeda": "^2.20.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@
|
|
33
|
-
"
|
|
34
|
-
"
|
|
32
|
+
"@mittwald/typescript-config": "workspace:*",
|
|
33
|
+
"@types/node": "^22.13.4",
|
|
34
|
+
"nx": "^20.4.4",
|
|
35
|
+
"prettier": "^3.5.1",
|
|
36
|
+
"rimraf": "^6.0.1",
|
|
37
|
+
"rollup-preserve-directives": "^1.1.3",
|
|
35
38
|
"typescript": "^5.7.3",
|
|
36
|
-
"vite": "^
|
|
39
|
+
"vite": "^6.1.0",
|
|
37
40
|
"vite-plugin-checker": "^0.8.0",
|
|
38
|
-
"vite-plugin-dts": "^4.
|
|
39
|
-
"vite-plugin-externalize-deps": "^0.
|
|
41
|
+
"vite-plugin-dts": "^4.5.0",
|
|
42
|
+
"vite-plugin-externalize-deps": "^0.9.0"
|
|
40
43
|
},
|
|
41
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "7ba077584e5d333b91062a1803d69c42edc28829"
|
|
42
45
|
}
|