@mittwald/flow-remote-react-components 0.2.0-alpha.166 → 0.2.0-alpha.167
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/dist/js/RemoteRoot.mjs +14 -3
- package/dist/js/RemoteRoot.mjs.map +1 -1
- package/dist/js/hooks/useWatchPathname.mjs +26 -0
- package/dist/js/hooks/useWatchPathname.mjs.map +1 -0
- package/dist/types/components/RemoteRoot.d.ts +4 -1
- package/dist/types/components/RemoteRoot.d.ts.map +1 -1
- package/dist/types/hooks/useWatchPathname.d.ts +4 -0
- package/dist/types/hooks/useWatchPathname.d.ts.map +1 -0
- package/package.json +6 -6
package/dist/js/RemoteRoot.mjs
CHANGED
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
import * as index$1 from './auto-generated/index.mjs';
|
|
6
6
|
import * as index from './views/index.mjs';
|
|
7
|
+
import { useWatchPathname } from './hooks/useWatchPathname.mjs';
|
|
7
8
|
import { stringifyError } from './lib/stringifyError.mjs';
|
|
8
9
|
import { ViewComponentContextProvider } from '@mittwald/flow-react-components/internal';
|
|
9
10
|
import { connectHostRenderRootRef } from '@mittwald/flow-remote-core';
|
|
10
|
-
import { useRef, useState, Suspense } from 'react';
|
|
11
|
+
import { useRef, useState, useTransition, Suspense } from 'react';
|
|
11
12
|
import { ErrorBoundary } from 'react-error-boundary';
|
|
12
13
|
|
|
13
14
|
const viewComponents = {
|
|
@@ -15,22 +16,32 @@ const viewComponents = {
|
|
|
15
16
|
...index
|
|
16
17
|
};
|
|
17
18
|
const RemoteRoot = (props) => {
|
|
18
|
-
const { children } = props;
|
|
19
|
+
const { children, onHostPathnameChanged } = props;
|
|
19
20
|
const connectionRef = useRef(void 0);
|
|
20
21
|
const [connectionError, setConnectionError] = useState(null);
|
|
22
|
+
const [pathnameChangedPending, startPathnameChangedTransition] = useTransition();
|
|
21
23
|
const renderErrorRef = useRef(void 0);
|
|
22
24
|
const handleRenderError = (error) => {
|
|
23
25
|
renderErrorRef.current = error;
|
|
24
26
|
connectionRef.current?.imports.setError(stringifyError(error));
|
|
25
27
|
};
|
|
28
|
+
useWatchPathname(
|
|
29
|
+
(pathname) => connectionRef.current?.imports.setNavigationState({
|
|
30
|
+
pathname,
|
|
31
|
+
isPending: pathnameChangedPending
|
|
32
|
+
})
|
|
33
|
+
);
|
|
26
34
|
if (connectionError) {
|
|
27
35
|
throw connectionError;
|
|
28
36
|
}
|
|
37
|
+
const connect = connectHostRenderRootRef({
|
|
38
|
+
onPathnameChanged: (pathname) => startPathnameChangedTransition(() => onHostPathnameChanged?.(pathname))
|
|
39
|
+
});
|
|
29
40
|
return /* @__PURE__ */ jsx(
|
|
30
41
|
"div",
|
|
31
42
|
{
|
|
32
43
|
ref: (div) => {
|
|
33
|
-
|
|
44
|
+
connect(div)?.then((connection) => {
|
|
34
45
|
connectionRef.current = connection;
|
|
35
46
|
}).catch((error) => {
|
|
36
47
|
setConnectionError(error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteRoot.mjs","sources":["../../src/components/RemoteRoot.tsx"],"sourcesContent":["\"use client\";\nimport * as remoteComponents from \"@/auto-generated\";\nimport * as customViewComponents from \"@/views\";\nimport { stringifyError } from \"@/lib/stringifyError\";\nimport { ViewComponentContextProvider } from \"@mittwald/flow-react-components/internal\";\nimport {\n connectHostRenderRootRef,\n type RemoteToHostConnection,\n} from \"@mittwald/flow-remote-core\";\nimport {\n Suspense,\n useRef,\n useState,\n type FC,\n type PropsWithChildren,\n} from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nconst viewComponents = {\n ...remoteComponents,\n ...customViewComponents,\n} as FlowViewComponents;\n\nexport const RemoteRoot: FC<
|
|
1
|
+
{"version":3,"file":"RemoteRoot.mjs","sources":["../../src/components/RemoteRoot.tsx"],"sourcesContent":["\"use client\";\nimport * as remoteComponents from \"@/auto-generated\";\nimport * as customViewComponents from \"@/views\";\nimport { useWatchPathname } from \"@/hooks/useWatchPathname\";\nimport { stringifyError } from \"@/lib/stringifyError\";\nimport { ViewComponentContextProvider } from \"@mittwald/flow-react-components/internal\";\nimport {\n connectHostRenderRootRef,\n type RemoteToHostConnection,\n} from \"@mittwald/flow-remote-core\";\nimport {\n Suspense,\n useRef,\n useState,\n useTransition,\n type FC,\n type PropsWithChildren,\n} from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nconst viewComponents = {\n ...remoteComponents,\n ...customViewComponents,\n} as FlowViewComponents;\n\nexport interface RemoteRootProps extends PropsWithChildren {\n onHostPathnameChanged?: (pathname: string) => void;\n}\n\nexport const RemoteRoot: FC<RemoteRootProps> = (props) => {\n const { children, onHostPathnameChanged } = props;\n\n const connectionRef = useRef<RemoteToHostConnection>(undefined);\n const [connectionError, setConnectionError] = useState(null);\n\n const [pathnameChangedPending, startPathnameChangedTransition] =\n useTransition();\n\n const renderErrorRef = useRef<unknown>(undefined);\n\n const handleRenderError = (error: unknown) => {\n renderErrorRef.current = error;\n connectionRef.current?.imports.setError(stringifyError(error));\n };\n\n useWatchPathname((pathname) =>\n connectionRef.current?.imports.setNavigationState({\n pathname,\n isPending: pathnameChangedPending,\n }),\n );\n\n if (connectionError) {\n throw connectionError;\n }\n\n const connect = connectHostRenderRootRef({\n onPathnameChanged: (pathname) =>\n startPathnameChangedTransition(() => onHostPathnameChanged?.(pathname)),\n });\n\n return (\n <div\n ref={(div) => {\n connect(div)\n ?.then((connection) => {\n connectionRef.current = connection;\n })\n .catch((error) => {\n setConnectionError(error);\n });\n\n if (renderErrorRef.current) {\n handleRenderError(renderErrorRef.current);\n }\n }}\n >\n <ErrorBoundary\n fallbackRender={({ error }) => {\n handleRenderError(error);\n return null;\n }}\n >\n <Suspense>\n <ViewComponentContextProvider components={viewComponents}>\n {children}\n </ViewComponentContextProvider>\n </Suspense>\n </ErrorBoundary>\n </div>\n );\n};\n\nexport default RemoteRoot;\n"],"names":["remoteCompon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AA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACF,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AAEJ,CAAA;;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import { useRef, useEffect } from 'react';
|
|
4
|
+
|
|
5
|
+
const useWatchPathname = (callback) => {
|
|
6
|
+
if (typeof location === "undefined") {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
const storedHref = useRef(location.href);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
const checker = setInterval(() => {
|
|
12
|
+
const href = location.href;
|
|
13
|
+
if (href !== storedHref.current) {
|
|
14
|
+
const url = new URL(href);
|
|
15
|
+
callback(url.pathname);
|
|
16
|
+
storedHref.current = href;
|
|
17
|
+
}
|
|
18
|
+
}, 50);
|
|
19
|
+
return () => {
|
|
20
|
+
clearInterval(checker);
|
|
21
|
+
};
|
|
22
|
+
}, [storedHref]);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { useWatchPathname };
|
|
26
|
+
//# sourceMappingURL=useWatchPathname.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWatchPathname.mjs","sources":["../../../src/hooks/useWatchPathname.ts"],"sourcesContent":["import { useEffect, useRef } from \"react\";\n\ntype Callback = (pathname: string) => void;\n\nexport const useWatchPathname = (callback: Callback) => {\n if (typeof location === \"undefined\") {\n return;\n }\n\n const storedHref = useRef(location.href);\n\n useEffect(() => {\n /** Need to poll here, because no appropriate browser API exists */\n const checker = setInterval(() => {\n const href = location.href;\n if (href !== storedHref.current) {\n const url = new URL(href);\n callback(url.pathname);\n storedHref.current = href;\n }\n }, 50);\n\n return () => {\n clearInterval(checker);\n };\n }, [storedHref]);\n};\n"],"names":[],"mappings":";;AAIa,MAAA,gBAAA,GAAmB,CAAC,QAAuB,KAAA;AACtD,EAAI,IAAA,OAAO,aAAa,WAAa,EAAA;AACnC,IAAA;AAAA;AAGF,EAAM,MAAA,UAAA,GAAa,MAAO,CAAA,QAAA,CAAS,IAAI,CAAA;AAEvC,EAAA,SAAA,CAAU,MAAM;AAEd,IAAM,MAAA,OAAA,GAAU,YAAY,MAAM;AAChC,MAAA,MAAM,OAAO,QAAS,CAAA,IAAA;AACtB,MAAI,IAAA,IAAA,KAAS,WAAW,OAAS,EAAA;AAC/B,QAAM,MAAA,GAAA,GAAM,IAAI,GAAA,CAAI,IAAI,CAAA;AACxB,QAAA,QAAA,CAAS,IAAI,QAAQ,CAAA;AACrB,QAAA,UAAA,CAAW,OAAU,GAAA,IAAA;AAAA;AACvB,OACC,EAAE,CAAA;AAEL,IAAA,OAAO,MAAM;AACX,MAAA,aAAA,CAAc,OAAO,CAAA;AAAA,KACvB;AAAA,GACF,EAAG,CAAC,UAAU,CAAC,CAAA;AACjB;;;;"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export interface RemoteRootProps extends PropsWithChildren {
|
|
3
|
+
onHostPathnameChanged?: (pathname: string) => void;
|
|
4
|
+
}
|
|
5
|
+
export declare const RemoteRoot: FC<RemoteRootProps>;
|
|
3
6
|
export default RemoteRoot;
|
|
4
7
|
//# sourceMappingURL=RemoteRoot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteRoot.d.ts","sourceRoot":"","sources":["../../../src/components/RemoteRoot.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RemoteRoot.d.ts","sourceRoot":"","sources":["../../../src/components/RemoteRoot.tsx"],"names":[],"mappings":"AAUA,OAAO,EAKL,KAAK,EAAE,EACP,KAAK,iBAAiB,EACvB,MAAM,OAAO,CAAC;AAQf,MAAM,WAAW,eAAgB,SAAQ,iBAAiB;IACxD,qBAAqB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACpD;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA8D1C,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWatchPathname.d.ts","sourceRoot":"","sources":["../../../src/hooks/useWatchPathname.ts"],"names":[],"mappings":"AAEA,KAAK,QAAQ,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;AAE3C,eAAO,MAAM,gBAAgB,GAAI,UAAU,QAAQ,SAsBlD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-remote-react-components",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.167",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "React components that can be used in a remote environment",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
"test:compile": "tsc --noEmit"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@mittwald/flow-react-components": "0.2.0-alpha.
|
|
36
|
-
"@mittwald/flow-remote-core": "0.2.0-alpha.
|
|
37
|
-
"@mittwald/flow-remote-elements": "0.2.0-alpha.
|
|
35
|
+
"@mittwald/flow-react-components": "0.2.0-alpha.167",
|
|
36
|
+
"@mittwald/flow-remote-core": "0.2.0-alpha.167",
|
|
37
|
+
"@mittwald/flow-remote-elements": "0.2.0-alpha.167",
|
|
38
38
|
"@mittwald/remote-dom-react": "1.2.2-mittwald.3",
|
|
39
39
|
"@types/react": "^19",
|
|
40
40
|
"react-error-boundary": "^5.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@mittwald/ext-bridge": "0.2.0-alpha.
|
|
43
|
+
"@mittwald/ext-bridge": "0.2.0-alpha.167",
|
|
44
44
|
"@mittwald/typescript-config": "",
|
|
45
45
|
"@types/node": "^22.13.10",
|
|
46
46
|
"nx": "^20.5.0",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"optional": true
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "1927f615a0de12f79fd3b7062161c91f6efa4d7c"
|
|
74
74
|
}
|