one
Version:
One is a React framework for web, iOS, and Android apps.
1 lines • 1.33 kB
Source Map (JSON)
{"version":3,"file":"linking.js","names":[],"sources":["esm/link/linking.js"],"sourcesContent":["import { getPathFromState } from \"../fork/getPathFromState\";\nimport { getStateFromPath } from \"../fork/getStateFromPath\";\nfunction getInitialURL() {\n if (typeof window === \"undefined\") {\n return \"\";\n }\n return window.location?.href || \"\";\n}\nfunction getRootURL() {\n return \"/\";\n}\nfunction getDefaultLinkingPrefixes() {\n return [];\n}\nfunction addEventListener(listener) {\n if (typeof window === \"undefined\") {\n return () => {\n };\n }\n const callback = () => {\n listener(window.location.href);\n };\n window.addEventListener(\"popstate\", callback);\n return () => {\n window.removeEventListener(\"popstate\", callback);\n };\n}\nexport {\n addEventListener,\n getDefaultLinkingPrefixes,\n getInitialURL,\n getPathFromState,\n getRootURL,\n getStateFromPath\n};\n//# sourceMappingURL=linking.js.map\n"],"mappings":";;;;AAEA,SAAS,gBAAgB;CACvB,IAAI,OAAO,WAAW,aAAa;EACjC,OAAO;CACT;CACA,OAAO,OAAO,UAAU,QAAQ;AAClC;AACA,SAAS,aAAa;CACpB,OAAO;AACT;AACA,SAAS,4BAA4B;CACnC,OAAO,CAAC;AACV;AACA,SAAS,iBAAiB,UAAU;CAClC,IAAI,OAAO,WAAW,aAAa;EACjC,aAAa,CACb;CACF;CACA,MAAM,iBAAiB;EACrB,SAAS,OAAO,SAAS,IAAI;CAC/B;CACA,OAAO,iBAAiB,YAAY,QAAQ;CAC5C,aAAa;EACX,OAAO,oBAAoB,YAAY,QAAQ;CACjD;AACF"}