@mittwald/flow-remote-react-components 0.2.0-alpha.179 → 0.2.0-alpha.180
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.
|
@@ -1 +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,
|
|
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 + url.search);\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,QAAS,QAAA,CAAA,GAAA,CAAI,QAAW,GAAA,GAAA,CAAI,MAAM,CAAA;AAClC,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;;;;"}
|
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.180",
|
|
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.180",
|
|
36
|
+
"@mittwald/flow-remote-core": "0.2.0-alpha.180",
|
|
37
|
+
"@mittwald/flow-remote-elements": "0.2.0-alpha.180",
|
|
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.180",
|
|
44
44
|
"@mittwald/typescript-config": "",
|
|
45
45
|
"@types/node": "^22.13.10",
|
|
46
46
|
"nx": "^20.8.1",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"optional": true
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "9807472563ca01fd3025e5a36112eed0cda0c40f"
|
|
74
74
|
}
|