@openwebf/react-router 0.3.6 → 0.22.18
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/index.d.ts +16 -77
- package/dist/index.esm.js +34 -138
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +33 -141
- package/dist/index.js.map +1 -1
- package/dist/routes/Route.d.ts +1 -8
- package/dist/routes/Route.d.ts.map +1 -1
- package/dist/routes/Routes.d.ts +0 -30
- package/dist/routes/Routes.d.ts.map +1 -1
- package/dist/routes/utils.d.ts +13 -37
- package/dist/routes/utils.d.ts.map +1 -1
- package/dist/utils/RouterLink.d.ts +0 -1
- package/dist/utils/RouterLink.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/browser/index.d.ts +0 -88
- package/dist/browser/index.d.ts.map +0 -1
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../node_modules/tslib/tslib.es6.js","../src/routes/utils.ts","../node_modules/ahooks/es/utils/index.js","../node_modules/ahooks/es/utils/isDev.js","../node_modules/ahooks/es/useMemoizedFn/index.js","../src/utils/RouterLink.tsx","../src/routes/Route.tsx","../src/routes/Routes.tsx"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","/**\n * Router management module\n *\n * Encapsulates routing navigation functionality with route guard mechanism for permission checks\n */\n// eslint-disable-next-line no-restricted-imports\nimport { webf } from '@openwebf/webf-enterprise-typings';\n\ntype RoutePath = string;\n\n/**\n * WebF Router object - provides comprehensive navigation APIs\n * Combines web-like history management with Flutter-like navigation patterns\n */\nexport const WebFRouter = {\n /**\n * Get the current state object associated with the history entry\n */\n get state() {\n return webf.hybridHistory.state;\n },\n \n /**\n * Get the current route path\n */\n get path() {\n return webf.hybridHistory.path as RoutePath\n },\n \n /**\n * Navigate to a specified route\n * Applies route guards for permission checks before navigation\n */\n push: async <P extends RoutePath>(path: P, state?: any) => {\n\n webf.hybridHistory.pushNamed(path, { arguments: state })\n },\n \n /**\n * Replace the current route without adding to history\n * Applies route guards for permission checks before navigation\n */\n replace: async <P extends RoutePath>(path: P, state?: any) => {\n webf.hybridHistory.pushReplacementNamed(path, { arguments: state});\n },\n \n /**\n * Navigate back to the previous route\n */\n back: () => {\n webf.hybridHistory.back();\n },\n \n /**\n * Close the current screen and return to the previous one\n * Flutter-style navigation method\n */\n pop: (result?: any) => {\n webf.hybridHistory.pop(result);\n },\n \n /**\n * Pop routes until reaching a specific route\n */\n popUntil: (path: RoutePath) => {\n webf.hybridHistory.popUntil(path)\n },\n \n /**\n * Pop the current route and push a new named route\n */\n popAndPushNamed: async <T extends RoutePath>(path: T, state?: any) => {\n webf.hybridHistory.popAndPushNamed(path, {arguments: state})\n },\n \n /**\n * Push a new route and remove routes until reaching a specific route\n */\n pushNamedAndRemoveUntil: async <T extends RoutePath>(path: T, state: any, untilPath: RoutePath) => {\n webf.hybridHistory.pushNamedAndRemoveUntil(state, path, untilPath)\n },\n \n /**\n * Push a new route and remove all routes until a specific route (Flutter-style)\n */\n pushNamedAndRemoveUntilRoute: async <T extends RoutePath>(newPath: T, untilPath: RoutePath, state?: any) => {\n webf.hybridHistory.pushNamedAndRemoveUntilRoute(newPath, untilPath, { arguments: state })\n },\n \n /**\n * Check if the navigator can go back\n */\n canPop: (): boolean => {\n return webf.hybridHistory.canPop();\n },\n \n /**\n * Pop the current route if possible\n * Returns true if the pop was successful, false otherwise\n */\n maybePop: (result?: any): boolean => {\n return webf.hybridHistory.maybePop(result);\n },\n \n /**\n * Push a new state to the history stack (web-style navigation)\n */\n pushState: (state: any, name: string) => {\n webf.hybridHistory.pushState(state, name);\n },\n \n /**\n * Replace the current history entry with a new one (web-style navigation)\n */\n replaceState: (state: any, name: string) => {\n webf.hybridHistory.replaceState(state, name);\n },\n \n /**\n * Pop and push with restoration capability\n * Returns a restoration ID string\n */\n restorablePopAndPushState: (state: any, name: string): string => {\n return webf.hybridHistory.restorablePopAndPushState(state, name);\n },\n \n /**\n * Pop and push named route with restoration capability\n * Returns a restoration ID string\n */\n restorablePopAndPushNamed: async <T extends RoutePath>(path: T, state?: any): Promise<string> => {\n return webf.hybridHistory.restorablePopAndPushNamed(path, { arguments: state });\n }\n}\n\n/**\n * Route parameters extracted from dynamic routes\n */\nexport interface RouteParams {\n [key: string]: string;\n}\n\n/**\n * Route match result\n */\nexport interface RouteMatch {\n path: string;\n params: RouteParams;\n isExact: boolean;\n}\n\n/**\n * Convert a route pattern to a regular expression\n * @param pattern Route pattern like \"/user/:userId\" or \"/category/:catId/product/:prodId\"\n * @returns Object with regex and parameter names\n */\nexport function pathToRegex(pattern: string): { regex: RegExp; paramNames: string[] } {\n const paramNames: string[] = [];\n \n // Escape special regex characters except : and *\n let regexPattern = pattern.replace(/[.+?^${}()|[\\]\\\\]/g, '\\\\$&');\n \n // Replace :param with named capture groups\n regexPattern = regexPattern.replace(/:([^\\/]+)/g, (_, paramName) => {\n paramNames.push(paramName);\n return '([^/]+)';\n });\n \n // Add anchors for exact matching\n regexPattern = `^${regexPattern}$`;\n \n return {\n regex: new RegExp(regexPattern),\n paramNames\n };\n}\n\n/**\n * Match a pathname against a route pattern and extract parameters\n * @param pattern Route pattern like \"/user/:userId\"\n * @param pathname Actual pathname like \"/user/123\"\n * @returns Match result with extracted parameters or null if no match\n */\nexport function matchPath(pattern: string, pathname: string): RouteMatch | null {\n const { regex, paramNames } = pathToRegex(pattern);\n const match = pathname.match(regex);\n \n if (!match) {\n return null;\n }\n \n // Extract parameters from capture groups\n const params: RouteParams = {};\n paramNames.forEach((paramName, index) => {\n params[paramName] = match[index + 1]; // +1 because match[0] is the full match\n });\n \n return {\n path: pattern,\n params,\n isExact: true\n };\n}\n\n/**\n * Find the best matching route from a list of route patterns\n * @param routes Array of route patterns\n * @param pathname Current pathname\n * @returns Best match or null if no routes match\n */\nexport function matchRoutes(routes: string[], pathname: string): RouteMatch | null {\n for (const route of routes) {\n const match = matchPath(route, pathname);\n if (match) {\n return match;\n }\n }\n return null;\n}\n","export var isObject = function (value) {\n return value !== null && typeof value === 'object';\n};\nexport var isFunction = function (value) {\n return typeof value === 'function';\n};\nexport var isString = function (value) { return typeof value === 'string'; };\nexport var isBoolean = function (value) { return typeof value === 'boolean'; };\nexport var isNumber = function (value) { return typeof value === 'number'; };\nexport var isUndef = function (value) { return typeof value === 'undefined'; };\n","var isDev = process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test';\nexport default isDev;\n","import { useMemo, useRef } from 'react';\nimport { isFunction } from '../utils';\nimport isDev from '../utils/isDev';\nvar useMemoizedFn = function (fn) {\n if (isDev) {\n if (!isFunction(fn)) {\n console.error(\"useMemoizedFn expected parameter is a function, got \".concat(typeof fn));\n }\n }\n var fnRef = useRef(fn);\n // why not write `fnRef.current = fn`?\n // https://github.com/alibaba/hooks/issues/728\n fnRef.current = useMemo(function () { return fn; }, [fn]);\n var memoizedFn = useRef(undefined);\n if (!memoizedFn.current) {\n memoizedFn.current = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return fnRef.current.apply(this, args);\n };\n }\n return memoizedFn.current;\n};\nexport default useMemoizedFn;\n","import React, { EventHandler, FC, ReactNode, SyntheticEvent, useState } from \"react\";\nimport { createWebFComponent, WebFElementWithMethods } from \"@openwebf/react-core-ui\";\n\nexport interface HybridRouterChangeEvent extends SyntheticEvent {\n readonly state: any;\n readonly kind: 'didPushNext' | 'didPush' | 'didPop' | 'didPopNext';\n readonly path: string;\n}\n\nexport type HybridRouterChangeEventHandler = EventHandler<HybridRouterChangeEvent>;\n\nexport interface WebFHybridRouterProps {\n path: string;\n title?: string;\n theme?: 'material' | 'cupertino';\n onScreen?: HybridRouterChangeEventHandler;\n offScreen?: HybridRouterChangeEventHandler;\n children?: ReactNode;\n}\n\n// Define the element interface for WebFRouterLink\nexport interface WebFRouterLinkElement extends WebFElementWithMethods<{}> {}\n\n// Create the raw component using createWebFComponent\nconst RawWebFRouterLink = createWebFComponent<WebFRouterLinkElement, WebFHybridRouterProps>({\n tagName: 'webf-router-link',\n displayName: 'WebFRouterLink',\n\n // Map props to attributes\n attributeProps: ['path', 'title', 'theme'],\n\n // Event handlers\n events: [\n {\n propName: 'onScreen',\n eventName: 'onscreen',\n handler: (callback) => (event) => {\n // Cast through unknown first for proper type conversion\n callback(event as unknown as HybridRouterChangeEvent);\n },\n },\n {\n propName: 'offScreen',\n eventName: 'offscreen',\n handler: (callback) => (event) => {\n // Cast through unknown first for proper type conversion\n callback(event as unknown as HybridRouterChangeEvent);\n },\n },\n ],\n});\n\nexport const WebFRouterLink: FC<WebFHybridRouterProps> = function (props: WebFHybridRouterProps) {\n const [isRender, enableRender] = useState(false);\n\n const handleOnScreen = (event: HybridRouterChangeEvent) => {\n enableRender(true);\n\n if (props.onScreen) {\n props.onScreen(event);\n }\n };\n\n return (\n <RawWebFRouterLink title={props.title} path={props.path} theme={props.theme} onScreen={handleOnScreen} offScreen={props.offScreen}>\n {isRender ? props.children : null}\n </RawWebFRouterLink>\n );\n}","/**\n * Route Component\n *\n * This component is a core part of the application routing system, responsible for:\n * 1. Managing page rendering and lifecycle\n * 2. Providing route context (RouteContext)\n * 3. Handling page navigation bar (AppBar)\n * 4. Providing page lifecycle hooks\n */\n\nimport React, { useState } from 'react'\n// import { Router, RouterEvents$ } from './router'\nimport { useMemoizedFn } from 'ahooks';\nimport { WebFRouterLink } from '../utils/RouterLink';\n\n/**\n * Route component props interface\n */\nexport interface RouteProps {\n /**\n * Page title\n * Displayed in the center of the navigation bar\n */\n title?: string\n /**\n * Page path\n * Must be a member of the RoutePath enum\n */\n path: string\n /**\n * Whether to pre-render\n * If true, the page will be rendered when the app starts, rather than waiting for route navigation\n * Can be used to improve page switching performance or preload data\n *\n * @default false\n */\n prerender?: boolean\n /**\n * Page content\n * The actual page component to render\n */\n element: React.ReactNode\n /**\n * Theme for this route\n * Controls the visual style of the navigation bar and page\n *\n * @default \"material\"\n */\n theme?: 'material' | 'cupertino'\n}\n\n/**\n * Route Component\n *\n * Responsible for managing page rendering, lifecycle and navigation bar\n */\nexport function Route({path, prerender = false, element, title, theme}: RouteProps) {\n // Mark whether the page has been rendered\n const [hasRendered, updateRender] = useState(false)\n\n /**\n * Rendering control logic\n */\n const shouldPrerender = prerender;\n const shouldRenderChildren = shouldPrerender || hasRendered\n\n /**\n * Handle page display event\n */\n const handleOnScreen = useMemoizedFn(() => {\n updateRender(true);\n })\n\n /**\n * Handle page hide event\n */\n const handleOffScreen = useMemoizedFn(() => {\n })\n\n return (\n <WebFRouterLink path={path} title={title} theme={theme} onScreen={handleOnScreen} offScreen={handleOffScreen}>\n {shouldRenderChildren ? element : null}\n </WebFRouterLink>\n )\n}\n","import React, { createContext, useContext, useMemo, Children, isValidElement, useState, useEffect } from 'react';\nimport { Route } from './Route';\nimport { WebFRouter, RouteParams, matchPath } from './utils';\nimport { HybridRouterChangeEvent } from '../utils/RouterLink';\n\n/**\n * Route context interface\n *\n * Provides page route related state and methods, accessed through the useRouteContext hook\n *\n * @template S - Page state type, defaults to undefined\n */\ninterface RouteContext<S = any> {\n /**\n * Page path\n * Current route path, corresponds to RoutePath enum\n */\n path: string | undefined\n /**\n * Page state\n * State data passed during route navigation\n */\n params: S | undefined\n /**\n * Route parameters extracted from dynamic routes (e.g., :userId in /user/:userId)\n */\n routeParams: RouteParams | undefined\n /**\n * Current active path from router\n */\n activePath: string | undefined\n /**\n * Route event kind\n */\n routeEventKind?: 'didPushNext' | 'didPush' | 'didPop' | 'didPopNext'\n}\n\n/**\n * Route context default value\n */\nconst RouteContext = createContext<RouteContext>({\n path: undefined,\n params: undefined,\n routeParams: undefined,\n activePath: undefined,\n routeEventKind: undefined\n});\n\n/**\n * Hook to get route context\n *\n * Use generic parameters to specify the route path and automatically infer the corresponding state type\n *\n * @template T - Route path type, must be a member of the RoutePath enum\n * @returns Type-safe route context object\n *\n * @example\n * ```tsx\n * const { params, path, isActive } = useRouteContext();\n * ```\n */\nexport function useRouteContext() {\n const context = useContext<RouteContext>(RouteContext);\n\n // isActive is true only for push events with matching path\n const isActive = (context.routeEventKind === 'didPush' || context.routeEventKind === 'didPushNext')\n && context.path === context.activePath;\n\n return {\n ...context,\n isActive\n };\n}\n\n/**\n * Location object interface\n */\nexport interface Location {\n /**\n * The path of the current location\n */\n pathname: string;\n /**\n * The state object associated with this location\n */\n state: any;\n /**\n * A unique key for this location\n */\n key?: string;\n}\n\n/**\n * Hook to get the current location\n * \n * @returns Current location object with pathname and state\n * \n * @example\n * ```tsx\n * function MyComponent() {\n * const location = useLocation();\n * \n * console.log('Current path:', location.pathname);\n\n * console.log('Location state:', location.state);\n * console.log('Is active:', location.isActive);\n * \n * return <div>Current path: {location.pathname}</div>;\n * }\n * ```\n */\nexport function useLocation(): Location & { isActive: boolean } {\n const context = useRouteContext();\n\n // Create location object from context\n const location = useMemo(() => {\n const currentPath = context.path || context.activePath || WebFRouter.path;\n let pathname = currentPath;\n\n \n // Check if the current component's route matches the active path\n const isCurrentRoute = context.path === context.activePath;\n \n // Get state - prioritize context params, fallback to WebFRouter.state\n const state = (context.isActive || isCurrentRoute) \n ? (context.params || WebFRouter.state)\n : WebFRouter.state;\n \n return {\n pathname,\n state,\n isActive: context.isActive,\n key: `${pathname}-${Date.now()}`\n };\n }, [context.isActive, context.path, context.activePath, context.params]);\n\n return location;\n}\n\n/**\n * Hook to get route parameters from dynamic routes\n * \n * @returns Route parameters object with parameter names as keys and values as strings\n * \n * @example\n * ```tsx\n * // For route pattern \"/user/:userId\" and actual path \"/user/123\"\n * function UserPage() {\n * const params = useParams();\n * \n * console.log(params.userId); // \"123\"\n * \n * return <div>User ID: {params.userId}</div>;\n * }\n * ```\n */\nexport function useParams(): RouteParams {\n const context = useRouteContext();\n \n return useMemo(() => {\n return context.routeParams || {};\n }, [context.routeParams]);\n}\n\n/**\n * Route configuration object\n */\nexport interface RouteObject {\n /**\n * Path for the route\n */\n path: string;\n /**\n * Element to render for this route\n */\n element: React.ReactNode;\n /**\n * Whether to pre-render this route\n */\n prerender?: boolean;\n /**\n * Theme for this route\n *\n * @default \"material\"\n */\n theme?: 'material' | 'cupertino';\n /**\n * Child routes (not supported yet)\n */\n children?: RouteObject[];\n}\n\n/**\n * Props for the Routes component\n */\nexport interface RoutesProps {\n /**\n * Route components as children\n */\n children: React.ReactNode;\n}\n\n/**\n * Routes component that wraps multiple Route components and provides shared context\n * \n * @example\n * ```tsx\n * <Routes sharedData={{ user: currentUser, theme: 'dark' }}>\n * <Route path=\"/\" element={<Home />} />\n * <Route path=\"/about\" element={<About />} />\n * <Route path=\"/profile\" element={<Profile />} />\n * </Routes>\n * ```\n */\n/**\n * Route-specific context provider that only updates when the route is active\n */\nfunction RouteContextProvider({ path, children }: { path: string, children: React.ReactNode }) {\n const globalContext = useContext(RouteContext);\n\n // Create a route-specific context that only updates when this route is active\n const routeSpecificContext = useMemo(() => {\n // Check if this route pattern matches the active path\n const match = globalContext.activePath ? matchPath(path, globalContext.activePath) : null;\n \n if (match) {\n // Use route params from Flutter event if available, otherwise from local matching\n const effectiveRouteParams = globalContext.routeParams || match.params;\n \n // For matching routes, always try to get state from WebFRouter if params is undefined\n const effectiveParams = globalContext.params !== undefined ? globalContext.params : WebFRouter.state;\n \n return {\n path,\n params: effectiveParams,\n routeParams: effectiveRouteParams,\n activePath: globalContext.activePath,\n routeEventKind: globalContext.routeEventKind\n };\n }\n // Return previous values if not active\n return {\n path,\n params: undefined,\n routeParams: undefined,\n activePath: globalContext.activePath,\n routeEventKind: undefined\n };\n }, [path, globalContext.activePath, globalContext.params, globalContext.routeParams, globalContext.routeEventKind]);\n\n return (\n <RouteContext.Provider value={routeSpecificContext}>\n {children}\n </RouteContext.Provider>\n );\n}\n\nexport function Routes({ children }: RoutesProps) {\n // State to track current route information\n const [routeState, setRouteState] = useState<RouteContext>({\n path: undefined,\n activePath: WebFRouter.path, // Initialize with current path\n params: undefined,\n routeParams: undefined,\n routeEventKind: undefined\n });\n \n // Listen to hybridrouterchange event\n useEffect(() => {\n const handleRouteChange = (event: Event) => {\n const routeEvent = event as unknown as HybridRouterChangeEvent;\n \n // Check for new event detail structure with params\n const eventDetail = (event as any).detail;\n \n // Only update activePath for push events\n const newActivePath = (routeEvent.kind === 'didPushNext' || routeEvent.kind === 'didPush')\n ? routeEvent.path\n : routeState.activePath;\n\n // For dynamic routes, extract parameters from the path using registered route patterns\n let routeParams = eventDetail?.params || undefined;\n if (!routeParams && newActivePath) {\n // Try to extract parameters from registered route patterns\n const registeredRoutes = Array.from(document.querySelectorAll('webf-router-link'));\n for (const routeElement of registeredRoutes) {\n const routePath = routeElement.getAttribute('path');\n if (routePath && routePath.includes(':')) {\n const match = matchPath(routePath, newActivePath);\n if (match) {\n routeParams = match.params;\n break;\n }\n }\n }\n }\n \n const eventState = eventDetail?.state || routeEvent.state;\n\n // Update state based on event kind\n setRouteState({\n path: routeEvent.path,\n activePath: newActivePath,\n params: eventState,\n routeParams: routeParams, // Use params from Flutter if available\n routeEventKind: routeEvent.kind\n });\n };\n\n // Add event listener\n document.addEventListener('hybridrouterchange', handleRouteChange);\n\n // Cleanup on unmount\n return () => {\n document.removeEventListener('hybridrouterchange', handleRouteChange);\n };\n }, [routeState.activePath]);\n\n // Global context value\n const globalContextValue = useMemo(() => ({\n path: undefined,\n params: routeState.params,\n routeParams: routeState.routeParams, // Pass through route params from Flutter\n activePath: routeState.activePath,\n routeEventKind: routeState.routeEventKind\n }), [routeState.activePath, routeState.params, routeState.routeParams, routeState.routeEventKind]);\n\n // Wrap each Route component with its own context provider\n const wrappedChildren = useMemo(() => {\n return Children.map(children, (child: React.ReactNode) => {\n if (!isValidElement(child)) {\n return child;\n }\n\n // Ensure only Route components are direct children\n if (child.type !== Route) {\n console.warn('Routes component should only contain Route components as direct children');\n return child;\n }\n\n // Wrap each Route with its own context provider\n const routePath = child.props.path;\n return (\n <RouteContextProvider key={routePath} path={routePath}>\n {child}\n </RouteContextProvider>\n );\n });\n }, [children]);\n\n return (\n <RouteContext.Provider value={globalContextValue}>\n {wrappedChildren}\n </RouteContext.Provider>\n );\n}\n\n/**\n * Hook to create routes from a configuration object\n * \n * @param routes Array of route configuration objects\n * @returns React element tree of Routes and Route components\n * \n * @example\n * ```tsx\n * function App() {\n * const routes = useRoutes([\n * { path: '/', element: <Home /> },\n * { path: '/about', element: <About /> },\n * { path: '/users', element: <Users /> },\n * { path: '/contact', element: <Contact /> }\n * ]);\n * \n * return routes;\n * }\n * ```\n */\nexport function useRoutes(routes: RouteObject[]): React.ReactElement | null {\n // Convert route objects to Route components\n const routeElements = useMemo(() => {\n return routes.map((route) => {\n if (route.children && route.children.length > 0) {\n console.warn('Nested routes are not supported yet');\n }\n\n return (\n <Route\n key={route.path}\n path={route.path}\n element={route.element}\n prerender={route.prerender}\n theme={route.theme}\n />\n );\n });\n }, [routes]);\n\n // Return Routes component with Route children\n return <Routes>{routeElements}</Routes>;\n}\n\n\n/**\n * Navigation function type\n */\nexport interface NavigateFunction {\n (to: string, options?: NavigateOptions): void;\n (delta: number): void;\n}\n\n/**\n * Navigation options\n */\nexport interface NavigateOptions {\n replace?: boolean;\n state?: any;\n}\n\n/**\n * Extended navigation object with additional methods\n */\nexport interface NavigationMethods {\n /**\n * Navigate to a route or go back\n */\n navigate: NavigateFunction;\n\n /**\n * Close the current screen and return to the previous one\n */\n pop: (result?: any) => void;\n\n /**\n * Pop routes until reaching a specific route\n */\n popUntil: (path: string) => void;\n\n /**\n * Pop the current route and push a new route\n */\n popAndPush: (path: string, state?: any) => Promise<void>;\n\n /**\n * Push a new route and remove all routes until a specific route\n */\n pushAndRemoveUntil: (newPath: string, untilPath: string, state?: any) => Promise<void>;\n\n /**\n * Check if the navigator can go back\n */\n canPop: () => boolean;\n\n /**\n * Pop the current route if possible\n */\n maybePop: (result?: any) => boolean;\n}\n\n/**\n * Hook to navigate between routes programmatically\n * \n * @example\n * ```tsx\n * function LoginPage() {\n * const { navigate, pop, canPop } = useNavigate();\n * \n * const handleLogin = async () => {\n * await login();\n * navigate('/dashboard');\n * };\n * \n * const handleReplace = () => {\n * navigate('/home', { replace: true });\n * };\n * \n * const handleWithState = () => {\n * navigate('/profile', { state: { from: 'login' } });\n * };\n * \n * const goBack = () => {\n * if (canPop()) {\n * pop();\n * } else {\n * navigate('/');\n * }\n * };\n * }\n * ```\n */\nexport function useNavigate(): NavigationMethods {\n return useMemo(() => {\n function navigate(to: string | number, options?: NavigateOptions): void {\n if (typeof to === 'number') {\n // Handle relative navigation (e.g., -1 for back)\n if (to === -1) {\n WebFRouter.back();\n } else {\n console.warn('Relative navigation other than -1 is not supported yet');\n }\n return;\n }\n\n // Handle absolute navigation\n if (options?.replace) {\n WebFRouter.replace(to, options.state);\n } else {\n WebFRouter.push(to, options?.state);\n }\n }\n\n return {\n navigate: navigate as NavigateFunction,\n pop: WebFRouter.pop,\n popUntil: WebFRouter.popUntil,\n popAndPush: WebFRouter.popAndPushNamed,\n pushAndRemoveUntil: WebFRouter.pushNamedAndRemoveUntilRoute,\n canPop: WebFRouter.canPop,\n maybePop: WebFRouter.maybePop\n };\n }, []);\n}"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkGA;AACO,SAAS,SAAS,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;AAC7D,IAAI,SAAS,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,KAAK,YAAY,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAChH,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,EAAE,UAAU,OAAO,EAAE,MAAM,EAAE;AAC/D,QAAQ,SAAS,SAAS,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACnG,QAAQ,SAAS,QAAQ,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,I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A,IAAI,OAAO,aAAP,OAAO,KAAA,MAAA,GAAA,MAAA,GAAP,OAAO,CAAE,OAAO,EAAE;gBACpB,UAAU,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC;YACvC;iBAAO;AACL,gBAAA,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,KAAA,IAAA,IAAP,OAAO,KAAA,MAAA,GAAA,MAAA,GAAP,OAAO,CAAE,KAAK,CAAC;YACrC;QACF;QAEA,OAAO;AACL,YAAA,QAAQ,EAAE,QAA4B;YACtC,GAAG,EAAE,UAAU,CAAC,GAAG;YACnB,QAAQ,EAAE,UAAU,CAAC,QAAQ;YAC7B,UAAU,EAAE,UAAU,CAAC,eAAe;YACtC,kBAAkB,EAAE,UAAU,CAAC,4BAA4B;YAC3D,MAAM,EAAE,UAAU,CAAC,MAAM;YACzB,QAAQ,EAAE,UAAU,CAAC;SACtB;IACH,CAAC,EAAE,EAAE,CAAC;AACR;;;;","x_google_ignoreList":[0,2,3,4]}
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../node_modules/tslib/tslib.es6.js","../src/routes/utils.ts","../node_modules/ahooks/es/utils/index.js","../node_modules/ahooks/es/utils/isDev.js","../node_modules/ahooks/es/useMemoizedFn/index.js","../src/utils/RouterLink.tsx","../src/routes/Route.tsx","../src/routes/Routes.tsx"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","/**\n * Router management module\n *\n * Encapsulates routing navigation functionality with route guard mechanism for permission checks\n */\n// eslint-disable-next-line no-restricted-imports\nimport { webf } from '@openwebf/webf-enterprise-typings';\n\ntype RoutePath = string;\n\n/**\n * Single entry in the hybrid router stack.\n * Mirrors the data returned from webf.hybridHistory.buildContextStack.\n */\nexport interface HybridRouteStackEntry {\n path: RoutePath;\n state: any;\n}\n\n/**\n * WebF Router object - provides comprehensive navigation APIs\n * Combines web-like history management with Flutter-like navigation patterns\n */\nexport const WebFRouter = {\n /**\n * Get the current state object associated with the history entry\n */\n get state() {\n return webf.hybridHistory.state;\n },\n\n /**\n * Get the full hybrid router build context stack.\n * The stack is ordered from root route (index 0) to the current top route (last element).\n */\n get stack(): HybridRouteStackEntry[] {\n return webf.hybridHistory.buildContextStack;\n },\n\n /**\n * Get the current route path\n */\n get path() {\n return webf.hybridHistory.path as RoutePath\n },\n\n /**\n * Navigate to a specified route\n * Applies route guards for permission checks before navigation\n */\n push: async <P extends RoutePath>(path: P, state?: any) => {\n\n webf.hybridHistory.pushNamed(path, { arguments: state })\n },\n\n /**\n * Replace the current route without adding to history\n * Applies route guards for permission checks before navigation\n */\n replace: async <P extends RoutePath>(path: P, state?: any) => {\n webf.hybridHistory.pushReplacementNamed(path, { arguments: state});\n },\n\n /**\n * Navigate back to the previous route\n */\n back: () => {\n webf.hybridHistory.back();\n },\n\n /**\n * Close the current screen and return to the previous one\n * Flutter-style navigation method\n */\n pop: (result?: any) => {\n webf.hybridHistory.pop(result);\n },\n\n /**\n * Pop routes until reaching a specific route\n */\n popUntil: (path: RoutePath) => {\n webf.hybridHistory.popUntil(path)\n },\n\n /**\n * Pop the current route and push a new named route\n */\n popAndPushNamed: async <T extends RoutePath>(path: T, state?: any) => {\n webf.hybridHistory.popAndPushNamed(path, {arguments: state})\n },\n\n /**\n * Push a new route and remove routes until reaching a specific route\n */\n pushNamedAndRemoveUntil: async <T extends RoutePath>(path: T, state: any, untilPath: RoutePath) => {\n webf.hybridHistory.pushNamedAndRemoveUntil(state, path, untilPath)\n },\n\n /**\n * Push a new route and remove all routes until a specific route (Flutter-style)\n */\n pushNamedAndRemoveUntilRoute: async <T extends RoutePath>(newPath: T, untilPath: RoutePath, state?: any) => {\n webf.hybridHistory.pushNamedAndRemoveUntilRoute(newPath, untilPath, { arguments: state })\n },\n\n /**\n * Check if the navigator can go back\n */\n canPop: (): boolean => {\n return webf.hybridHistory.canPop();\n },\n\n /**\n * Pop the current route if possible\n * Returns true if the pop was successful, false otherwise\n */\n maybePop: (result?: any): boolean => {\n return webf.hybridHistory.maybePop(result);\n },\n\n /**\n * Push a new state to the history stack (web-style navigation)\n */\n pushState: (state: any, name: string) => {\n webf.hybridHistory.pushState(state, name);\n },\n\n /**\n * Replace the current history entry with a new one (web-style navigation)\n */\n replaceState: (state: any, name: string) => {\n webf.hybridHistory.replaceState(state, name);\n },\n\n /**\n * Pop and push with restoration capability\n * Returns a restoration ID string\n */\n restorablePopAndPushState: (state: any, name: string): string => {\n return webf.hybridHistory.restorablePopAndPushState(state, name);\n },\n\n /**\n * Pop and push named route with restoration capability\n * Returns a restoration ID string\n */\n restorablePopAndPushNamed: async <T extends RoutePath>(path: T, state?: any): Promise<string> => {\n return webf.hybridHistory.restorablePopAndPushNamed(path, { arguments: state });\n }\n}\n","export var isObject = function (value) {\n return value !== null && typeof value === 'object';\n};\nexport var isFunction = function (value) {\n return typeof value === 'function';\n};\nexport var isString = function (value) { return typeof value === 'string'; };\nexport var isBoolean = function (value) { return typeof value === 'boolean'; };\nexport var isNumber = function (value) { return typeof value === 'number'; };\nexport var isUndef = function (value) { return typeof value === 'undefined'; };\n","var isDev = process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test';\nexport default isDev;\n","import { useMemo, useRef } from 'react';\nimport { isFunction } from '../utils';\nimport isDev from '../utils/isDev';\nvar useMemoizedFn = function (fn) {\n if (isDev) {\n if (!isFunction(fn)) {\n console.error(\"useMemoizedFn expected parameter is a function, got \".concat(typeof fn));\n }\n }\n var fnRef = useRef(fn);\n // why not write `fnRef.current = fn`?\n // https://github.com/alibaba/hooks/issues/728\n fnRef.current = useMemo(function () { return fn; }, [fn]);\n var memoizedFn = useRef(undefined);\n if (!memoizedFn.current) {\n memoizedFn.current = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return fnRef.current.apply(this, args);\n };\n }\n return memoizedFn.current;\n};\nexport default useMemoizedFn;\n","import React, { EventHandler, FC, ReactNode, SyntheticEvent, useState } from \"react\";\nimport { createWebFComponent, WebFElementWithMethods } from \"@openwebf/react-core-ui\";\n\nexport interface HybridRouterChangeEvent extends SyntheticEvent {\n readonly state: any;\n readonly kind: 'didPushNext' | 'didPush' | 'didPop' | 'didPopNext';\n readonly path: string;\n}\n\nexport type HybridRouterChangeEventHandler = EventHandler<HybridRouterChangeEvent>;\n\nexport interface WebFHybridRouterProps {\n path: string;\n title?: string;\n onScreen?: HybridRouterChangeEventHandler;\n offScreen?: HybridRouterChangeEventHandler;\n children?: ReactNode;\n}\n\n// Define the element interface for WebFRouterLink\nexport interface WebFRouterLinkElement extends WebFElementWithMethods<{}> {}\n\n// Create the raw component using createWebFComponent\nconst RawWebFRouterLink = createWebFComponent<WebFRouterLinkElement, WebFHybridRouterProps>({\n tagName: 'webf-router-link',\n displayName: 'WebFRouterLink',\n \n // Map props to attributes\n attributeProps: ['path', 'title'],\n \n // Event handlers\n events: [\n {\n propName: 'onScreen',\n eventName: 'onscreen',\n handler: (callback) => (event) => {\n // Cast through unknown first for proper type conversion\n callback(event as unknown as HybridRouterChangeEvent);\n },\n },\n {\n propName: 'offScreen',\n eventName: 'offscreen',\n handler: (callback) => (event) => {\n // Cast through unknown first for proper type conversion\n callback(event as unknown as HybridRouterChangeEvent);\n },\n },\n ],\n});\n\nexport const WebFRouterLink: FC<WebFHybridRouterProps> = function (props: WebFHybridRouterProps) {\n const [isRender, enableRender] = useState(false);\n\n const handleOnScreen = (event: HybridRouterChangeEvent) => {\n enableRender(true);\n \n if (props.onScreen) {\n props.onScreen(event);\n }\n };\n\n return (\n <RawWebFRouterLink title={props.title} path={props.path} onScreen={handleOnScreen} offScreen={props.offScreen}>\n {isRender ? props.children : null}\n </RawWebFRouterLink>\n );\n}","/**\n * Route Component\n *\n * This component is a core part of the application routing system, responsible for:\n * 1. Managing page rendering and lifecycle\n * 2. Providing route context (RouteContext)\n * 3. Handling page navigation bar (AppBar)\n * 4. Providing page lifecycle hooks\n */\n\nimport React, { useState } from 'react'\n// import { Router, RouterEvents$ } from './router'\nimport { useMemoizedFn } from 'ahooks';\nimport { WebFRouterLink } from '../utils/RouterLink';\n\n/**\n * Route component props interface\n */\nexport interface RouteProps {\n /**\n * Page title\n * Displayed in the center of the navigation bar\n */\n title?: string\n /**\n * Page path\n * Must be a member of the RoutePath enum\n */\n path: string\n /**\n * Whether to pre-render\n * If true, the page will be rendered when the app starts, rather than waiting for route navigation\n * Can be used to improve page switching performance or preload data\n *\n * @default false\n */\n prerender?: boolean\n /**\n * Page content\n * The actual page component to render\n */\n element: React.ReactNode\n}\n\n/**\n * Route Component\n *\n * Responsible for managing page rendering, lifecycle and navigation bar\n */\nexport function Route({path, prerender = false, element, title }: RouteProps) {\n // Mark whether the page has been rendered\n const [hasRendered, updateRender] = useState(false)\n\n /**\n * Rendering control logic\n */\n const shouldPrerender = prerender;\n const shouldRenderChildren = shouldPrerender || hasRendered\n\n /**\n * Handle page display event\n */\n const handleOnScreen = useMemoizedFn(() => {\n updateRender(true);\n })\n\n /**\n * Handle page hide event\n */\n const handleOffScreen = useMemoizedFn(() => {\n })\n\n return (\n <WebFRouterLink path={path} title={title} onScreen={handleOnScreen} offScreen={handleOffScreen}>\n {shouldRenderChildren ? element : null}\n </WebFRouterLink>\n )\n}\n","import React, { createContext, useContext, useMemo, Children, isValidElement, useState, useEffect } from 'react';\nimport { Route } from './Route';\nimport { WebFRouter } from './utils';\nimport { HybridRouterChangeEvent } from '../utils/RouterLink';\n\n/**\n * Route context interface\n *\n * Provides page route related state and methods, accessed through the useRouteContext hook\n *\n * @template S - Page state type, defaults to undefined\n */\ninterface RouteContext<S = any> {\n /**\n * Page path\n * Current route path, corresponds to RoutePath enum\n */\n path: string | undefined\n /**\n * Page state\n * State data passed during route navigation\n */\n params: S | undefined\n /**\n * Current active path from router\n */\n activePath: string | undefined\n /**\n * Route event kind\n */\n routeEventKind?: 'didPushNext' | 'didPush' | 'didPop' | 'didPopNext'\n}\n\n/**\n * Route context default value\n */\nconst RouteContext = createContext<RouteContext>({\n path: undefined,\n params: undefined,\n activePath: undefined,\n routeEventKind: undefined\n});\n\n/**\n * Hook to get route context\n *\n * Use generic parameters to specify the route path and automatically infer the corresponding state type\n *\n * @template T - Route path type, must be a member of the RoutePath enum\n * @returns Type-safe route context object\n *\n * @example\n * ```tsx\n * const { params, path, isActive } = useRouteContext();\n * ```\n */\nexport function useRouteContext() {\n const context = useContext<RouteContext>(RouteContext);\n\n // isActive is true only for push events with matching path\n const isActive = (context.routeEventKind === 'didPush' || context.routeEventKind === 'didPushNext')\n && context.path === context.activePath;\n\n return {\n ...context,\n isActive\n };\n}\n\n/**\n * Location object interface\n */\nexport interface Location {\n /**\n * The path of the current location\n */\n pathname: string;\n /**\n * The state object associated with this location\n */\n state: any;\n /**\n * A unique key for this location\n */\n key?: string;\n}\n\n/**\n * Hook to get the current location\n * \n * @returns Current location object with pathname and state\n * \n * @example\n * ```tsx\n * function MyComponent() {\n * const location = useLocation();\n * \n * console.log('Current path:', location.pathname);\n * console.log('Location state:', location.state);\n * console.log('Is active:', location.isActive);\n * \n * return <div>Current path: {location.pathname}</div>;\n * }\n * ```\n */\nexport function useLocation(): Location & { isActive: boolean } {\n const context = useRouteContext();\n\n // Create location object from context\n const location = useMemo(() => {\n // For active routes, return the current location with state\n if (context.isActive) {\n return {\n pathname: context.path || context.activePath || WebFRouter.path,\n state: context.params,\n isActive: true,\n key: `${context.path}-active-${Date.now()}`\n };\n }\n\n // For inactive routes, return the global location without state\n return {\n pathname: context.activePath || WebFRouter.path,\n state: undefined,\n isActive: false,\n key: `${context.activePath}-inactive`\n };\n }, [context.isActive, context.path, context.activePath, context.params]);\n\n return location;\n}\n\n/**\n * Route configuration object\n */\nexport interface RouteObject {\n /**\n * Path for the route\n */\n path: string;\n /**\n * Element to render for this route\n */\n element: React.ReactNode;\n /**\n * Whether to pre-render this route\n */\n prerender?: boolean;\n /**\n * Child routes (not supported yet)\n */\n children?: RouteObject[];\n}\n\n/**\n * Props for the Routes component\n */\nexport interface RoutesProps {\n /**\n * Route components as children\n */\n children: React.ReactNode;\n}\n\n/**\n * Routes component that wraps multiple Route components and provides shared context\n * \n * @example\n * ```tsx\n * <Routes sharedData={{ user: currentUser, theme: 'dark' }}>\n * <Route path=\"/\" element={<Home />} />\n * <Route path=\"/about\" element={<About />} />\n * <Route path=\"/profile\" element={<Profile />} />\n * </Routes>\n * ```\n */\n/**\n * Route-specific context provider that only updates when the route is active\n */\nfunction RouteContextProvider({ path, children }: { path: string, children: React.ReactNode }) {\n const globalContext = useContext(RouteContext);\n\n // Create a route-specific context that only updates when this route is active\n const routeSpecificContext = useMemo(() => {\n // Only update if this route is the active one\n if (globalContext.activePath === path) {\n return {\n path,\n params: globalContext.params,\n activePath: globalContext.activePath,\n routeEventKind: globalContext.routeEventKind\n };\n }\n // Return previous values if not active\n return {\n path,\n params: undefined,\n activePath: globalContext.activePath,\n routeEventKind: undefined\n };\n }, [path, globalContext.activePath, globalContext.params, globalContext.routeEventKind]);\n\n return (\n <RouteContext.Provider value={routeSpecificContext}>\n {children}\n </RouteContext.Provider>\n );\n}\n\nexport function Routes({ children }: RoutesProps) {\n // State to track current route information\n const [routeState, setRouteState] = useState<RouteContext>({\n path: undefined,\n activePath: undefined,\n params: undefined,\n routeEventKind: undefined\n });\n\n // Listen to hybridrouterchange event\n useEffect(() => {\n const handleRouteChange = (event: Event) => {\n const routeEvent = event as unknown as HybridRouterChangeEvent;\n // Only update activePath for push events\n const newActivePath = (routeEvent.kind === 'didPushNext' || routeEvent.kind === 'didPush')\n ? routeEvent.path\n : routeState.activePath;\n\n // Update state based on event kind\n setRouteState({\n path: routeEvent.path,\n activePath: newActivePath,\n params: routeEvent.state,\n routeEventKind: routeEvent.kind\n });\n };\n\n // Add event listener\n document.addEventListener('hybridrouterchange', handleRouteChange);\n\n // Cleanup on unmount\n return () => {\n document.removeEventListener('hybridrouterchange', handleRouteChange);\n };\n }, [routeState.activePath]);\n\n // Global context value\n const globalContextValue = useMemo(() => ({\n path: undefined,\n params: routeState.params,\n activePath: routeState.activePath,\n routeEventKind: routeState.routeEventKind\n }), [routeState.activePath, routeState.params, routeState.routeEventKind]);\n\n // Wrap each Route component with its own context provider\n const wrappedChildren = useMemo(() => {\n return Children.map(children, (child: React.ReactNode) => {\n if (!isValidElement(child)) {\n return child;\n }\n\n // Ensure only Route components are direct children\n if (child.type !== Route) {\n console.warn('Routes component should only contain Route components as direct children');\n return child;\n }\n\n // Wrap each Route with its own context provider\n const routePath = child.props.path;\n return (\n <RouteContextProvider key={routePath} path={routePath}>\n {child}\n </RouteContextProvider>\n );\n });\n }, [children]);\n\n return (\n <RouteContext.Provider value={globalContextValue}>\n {wrappedChildren}\n </RouteContext.Provider>\n );\n}\n\n/**\n * Hook to create routes from a configuration object\n * \n * @param routes Array of route configuration objects\n * @returns React element tree of Routes and Route components\n * \n * @example\n * ```tsx\n * function App() {\n * const routes = useRoutes([\n * { path: '/', element: <Home /> },\n * { path: '/about', element: <About /> },\n * { path: '/users', element: <Users /> },\n * { path: '/contact', element: <Contact /> }\n * ]);\n * \n * return routes;\n * }\n * ```\n */\nexport function useRoutes(routes: RouteObject[]): React.ReactElement | null {\n // Convert route objects to Route components\n const routeElements = useMemo(() => {\n return routes.map((route) => {\n if (route.children && route.children.length > 0) {\n console.warn('Nested routes are not supported yet');\n }\n\n return (\n <Route\n key={route.path}\n path={route.path}\n element={route.element}\n prerender={route.prerender}\n />\n );\n });\n }, [routes]);\n\n // Return Routes component with Route children\n return <Routes>{routeElements}</Routes>;\n}\n\n\n/**\n * Navigation function type\n */\nexport interface NavigateFunction {\n (to: string, options?: NavigateOptions): void;\n (delta: number): void;\n}\n\n/**\n * Navigation options\n */\nexport interface NavigateOptions {\n replace?: boolean;\n state?: any;\n}\n\n/**\n * Extended navigation object with additional methods\n */\nexport interface NavigationMethods {\n /**\n * Navigate to a route or go back\n */\n navigate: NavigateFunction;\n\n /**\n * Close the current screen and return to the previous one\n */\n pop: (result?: any) => void;\n\n /**\n * Pop routes until reaching a specific route\n */\n popUntil: (path: string) => void;\n\n /**\n * Pop the current route and push a new route\n */\n popAndPush: (path: string, state?: any) => Promise<void>;\n\n /**\n * Push a new route and remove all routes until a specific route\n */\n pushAndRemoveUntil: (newPath: string, untilPath: string, state?: any) => Promise<void>;\n\n /**\n * Check if the navigator can go back\n */\n canPop: () => boolean;\n\n /**\n * Pop the current route if possible\n */\n maybePop: (result?: any) => boolean;\n}\n\n/**\n * Hook to navigate between routes programmatically\n * \n * @example\n * ```tsx\n * function LoginPage() {\n * const { navigate, pop, canPop } = useNavigate();\n * \n * const handleLogin = async () => {\n * await login();\n * navigate('/dashboard');\n * };\n * \n * const handleReplace = () => {\n * navigate('/home', { replace: true });\n * };\n * \n * const handleWithState = () => {\n * navigate('/profile', { state: { from: 'login' } });\n * };\n * \n * const goBack = () => {\n * if (canPop()) {\n * pop();\n * } else {\n * navigate('/');\n * }\n * };\n * }\n * ```\n */\nexport function useNavigate(): NavigationMethods {\n return useMemo(() => {\n function navigate(to: string | number, options?: NavigateOptions): void {\n if (typeof to === 'number') {\n // Handle relative navigation (e.g., -1 for back)\n if (to === -1) {\n WebFRouter.back();\n } else {\n console.warn('Relative navigation other than -1 is not supported yet');\n }\n return;\n }\n\n // Handle absolute navigation\n if (options?.replace) {\n WebFRouter.replace(to, options.state);\n } else {\n WebFRouter.push(to, options?.state);\n }\n }\n\n return {\n navigate: navigate as NavigateFunction,\n pop: WebFRouter.pop,\n popUntil: WebFRouter.popUntil,\n popAndPush: WebFRouter.popAndPushNamed,\n pushAndRemoveUntil: WebFRouter.pushNamedAndRemoveUntilRoute,\n canPop: WebFRouter.canPop,\n maybePop: WebFRouter.maybePop\n };\n }, []);\n}"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkGA;AACO,SAAS,SAAS,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;AAC7D,IAAI,SAAS,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,KAAK,YAAY,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAChH,IAA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AAC;gBACxE;gBACA;YACF;;YAGA,IAAI,OAAO,aAAP,OAAO,KAAA,MAAA,GAAA,MAAA,GAAP,OAAO,CAAE,OAAO,EAAE;gBACpB,UAAU,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC;YACvC;iBAAO;AACL,gBAAA,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,KAAA,IAAA,IAAP,OAAO,KAAA,MAAA,GAAA,MAAA,GAAP,OAAO,CAAE,KAAK,CAAC;YACrC;QACF;QAEA,OAAO;AACL,YAAA,QAAQ,EAAE,QAA4B;YACtC,GAAG,EAAE,UAAU,CAAC,GAAG;YACnB,QAAQ,EAAE,UAAU,CAAC,QAAQ;YAC7B,UAAU,EAAE,UAAU,CAAC,eAAe;YACtC,kBAAkB,EAAE,UAAU,CAAC,4BAA4B;YAC3D,MAAM,EAAE,UAAU,CAAC,MAAM;YACzB,QAAQ,EAAE,UAAU,CAAC;SACtB;IACH,CAAC,EAAE,EAAE,CAAC;AACR;;;;","x_google_ignoreList":[0,2,3,4]}
|
package/dist/index.js
CHANGED
|
@@ -47,6 +47,13 @@ const WebFRouter = {
|
|
|
47
47
|
get state() {
|
|
48
48
|
return webfEnterpriseTypings.webf.hybridHistory.state;
|
|
49
49
|
},
|
|
50
|
+
/**
|
|
51
|
+
* Get the full hybrid router build context stack.
|
|
52
|
+
* The stack is ordered from root route (index 0) to the current top route (last element).
|
|
53
|
+
*/
|
|
54
|
+
get stack() {
|
|
55
|
+
return webfEnterpriseTypings.webf.hybridHistory.buildContextStack;
|
|
56
|
+
},
|
|
50
57
|
/**
|
|
51
58
|
* Get the current route path
|
|
52
59
|
*/
|
|
@@ -144,65 +151,6 @@ const WebFRouter = {
|
|
|
144
151
|
return webfEnterpriseTypings.webf.hybridHistory.restorablePopAndPushNamed(path, { arguments: state });
|
|
145
152
|
})
|
|
146
153
|
};
|
|
147
|
-
/**
|
|
148
|
-
* Convert a route pattern to a regular expression
|
|
149
|
-
* @param pattern Route pattern like "/user/:userId" or "/category/:catId/product/:prodId"
|
|
150
|
-
* @returns Object with regex and parameter names
|
|
151
|
-
*/
|
|
152
|
-
function pathToRegex(pattern) {
|
|
153
|
-
const paramNames = [];
|
|
154
|
-
// Escape special regex characters except : and *
|
|
155
|
-
let regexPattern = pattern.replace(/[.+?^${}()|[\]\\]/g, '\\$&');
|
|
156
|
-
// Replace :param with named capture groups
|
|
157
|
-
regexPattern = regexPattern.replace(/:([^\/]+)/g, (_, paramName) => {
|
|
158
|
-
paramNames.push(paramName);
|
|
159
|
-
return '([^/]+)';
|
|
160
|
-
});
|
|
161
|
-
// Add anchors for exact matching
|
|
162
|
-
regexPattern = `^${regexPattern}$`;
|
|
163
|
-
return {
|
|
164
|
-
regex: new RegExp(regexPattern),
|
|
165
|
-
paramNames
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Match a pathname against a route pattern and extract parameters
|
|
170
|
-
* @param pattern Route pattern like "/user/:userId"
|
|
171
|
-
* @param pathname Actual pathname like "/user/123"
|
|
172
|
-
* @returns Match result with extracted parameters or null if no match
|
|
173
|
-
*/
|
|
174
|
-
function matchPath(pattern, pathname) {
|
|
175
|
-
const { regex, paramNames } = pathToRegex(pattern);
|
|
176
|
-
const match = pathname.match(regex);
|
|
177
|
-
if (!match) {
|
|
178
|
-
return null;
|
|
179
|
-
}
|
|
180
|
-
// Extract parameters from capture groups
|
|
181
|
-
const params = {};
|
|
182
|
-
paramNames.forEach((paramName, index) => {
|
|
183
|
-
params[paramName] = match[index + 1]; // +1 because match[0] is the full match
|
|
184
|
-
});
|
|
185
|
-
return {
|
|
186
|
-
path: pattern,
|
|
187
|
-
params,
|
|
188
|
-
isExact: true
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Find the best matching route from a list of route patterns
|
|
193
|
-
* @param routes Array of route patterns
|
|
194
|
-
* @param pathname Current pathname
|
|
195
|
-
* @returns Best match or null if no routes match
|
|
196
|
-
*/
|
|
197
|
-
function matchRoutes(routes, pathname) {
|
|
198
|
-
for (const route of routes) {
|
|
199
|
-
const match = matchPath(route, pathname);
|
|
200
|
-
if (match) {
|
|
201
|
-
return match;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
return null;
|
|
205
|
-
}
|
|
206
154
|
|
|
207
155
|
var isFunction = function (value) {
|
|
208
156
|
return typeof value === 'function';
|
|
@@ -238,7 +186,7 @@ const RawWebFRouterLink = reactCoreUi.createWebFComponent({
|
|
|
238
186
|
tagName: 'webf-router-link',
|
|
239
187
|
displayName: 'WebFRouterLink',
|
|
240
188
|
// Map props to attributes
|
|
241
|
-
attributeProps: ['path', 'title'
|
|
189
|
+
attributeProps: ['path', 'title'],
|
|
242
190
|
// Event handlers
|
|
243
191
|
events: [
|
|
244
192
|
{
|
|
@@ -267,7 +215,7 @@ const WebFRouterLink = function (props) {
|
|
|
267
215
|
props.onScreen(event);
|
|
268
216
|
}
|
|
269
217
|
};
|
|
270
|
-
return (React.createElement(RawWebFRouterLink, { title: props.title, path: props.path,
|
|
218
|
+
return (React.createElement(RawWebFRouterLink, { title: props.title, path: props.path, onScreen: handleOnScreen, offScreen: props.offScreen }, isRender ? props.children : null));
|
|
271
219
|
};
|
|
272
220
|
|
|
273
221
|
/**
|
|
@@ -284,7 +232,7 @@ const WebFRouterLink = function (props) {
|
|
|
284
232
|
*
|
|
285
233
|
* Responsible for managing page rendering, lifecycle and navigation bar
|
|
286
234
|
*/
|
|
287
|
-
function Route({ path, prerender = false, element, title
|
|
235
|
+
function Route({ path, prerender = false, element, title }) {
|
|
288
236
|
// Mark whether the page has been rendered
|
|
289
237
|
const [hasRendered, updateRender] = React.useState(false);
|
|
290
238
|
/**
|
|
@@ -303,7 +251,7 @@ function Route({ path, prerender = false, element, title, theme }) {
|
|
|
303
251
|
*/
|
|
304
252
|
const handleOffScreen = useMemoizedFn(() => {
|
|
305
253
|
});
|
|
306
|
-
return (React.createElement(WebFRouterLink, { path: path, title: title,
|
|
254
|
+
return (React.createElement(WebFRouterLink, { path: path, title: title, onScreen: handleOnScreen, offScreen: handleOffScreen }, shouldRenderChildren ? element : null));
|
|
307
255
|
}
|
|
308
256
|
|
|
309
257
|
/**
|
|
@@ -312,7 +260,6 @@ function Route({ path, prerender = false, element, title, theme }) {
|
|
|
312
260
|
const RouteContext = React.createContext({
|
|
313
261
|
path: undefined,
|
|
314
262
|
params: undefined,
|
|
315
|
-
routeParams: undefined,
|
|
316
263
|
activePath: undefined,
|
|
317
264
|
routeEventKind: undefined
|
|
318
265
|
});
|
|
@@ -347,7 +294,6 @@ function useRouteContext() {
|
|
|
347
294
|
* const location = useLocation();
|
|
348
295
|
*
|
|
349
296
|
* console.log('Current path:', location.pathname);
|
|
350
|
-
|
|
351
297
|
* console.log('Location state:', location.state);
|
|
352
298
|
* console.log('Is active:', location.isActive);
|
|
353
299
|
*
|
|
@@ -359,46 +305,25 @@ function useLocation() {
|
|
|
359
305
|
const context = useRouteContext();
|
|
360
306
|
// Create location object from context
|
|
361
307
|
const location = React.useMemo(() => {
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
308
|
+
// For active routes, return the current location with state
|
|
309
|
+
if (context.isActive) {
|
|
310
|
+
return {
|
|
311
|
+
pathname: context.path || context.activePath || WebFRouter.path,
|
|
312
|
+
state: context.params,
|
|
313
|
+
isActive: true,
|
|
314
|
+
key: `${context.path}-active-${Date.now()}`
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
// For inactive routes, return the global location without state
|
|
370
318
|
return {
|
|
371
|
-
pathname,
|
|
372
|
-
state,
|
|
373
|
-
isActive:
|
|
374
|
-
key: `${
|
|
319
|
+
pathname: context.activePath || WebFRouter.path,
|
|
320
|
+
state: undefined,
|
|
321
|
+
isActive: false,
|
|
322
|
+
key: `${context.activePath}-inactive`
|
|
375
323
|
};
|
|
376
324
|
}, [context.isActive, context.path, context.activePath, context.params]);
|
|
377
325
|
return location;
|
|
378
326
|
}
|
|
379
|
-
/**
|
|
380
|
-
* Hook to get route parameters from dynamic routes
|
|
381
|
-
*
|
|
382
|
-
* @returns Route parameters object with parameter names as keys and values as strings
|
|
383
|
-
*
|
|
384
|
-
* @example
|
|
385
|
-
* ```tsx
|
|
386
|
-
* // For route pattern "/user/:userId" and actual path "/user/123"
|
|
387
|
-
* function UserPage() {
|
|
388
|
-
* const params = useParams();
|
|
389
|
-
*
|
|
390
|
-
* console.log(params.userId); // "123"
|
|
391
|
-
*
|
|
392
|
-
* return <div>User ID: {params.userId}</div>;
|
|
393
|
-
* }
|
|
394
|
-
* ```
|
|
395
|
-
*/
|
|
396
|
-
function useParams() {
|
|
397
|
-
const context = useRouteContext();
|
|
398
|
-
return React.useMemo(() => {
|
|
399
|
-
return context.routeParams || {};
|
|
400
|
-
}, [context.routeParams]);
|
|
401
|
-
}
|
|
402
327
|
/**
|
|
403
328
|
* Routes component that wraps multiple Route components and provides shared context
|
|
404
329
|
*
|
|
@@ -418,17 +343,11 @@ function RouteContextProvider({ path, children }) {
|
|
|
418
343
|
const globalContext = React.useContext(RouteContext);
|
|
419
344
|
// Create a route-specific context that only updates when this route is active
|
|
420
345
|
const routeSpecificContext = React.useMemo(() => {
|
|
421
|
-
//
|
|
422
|
-
|
|
423
|
-
if (match) {
|
|
424
|
-
// Use route params from Flutter event if available, otherwise from local matching
|
|
425
|
-
const effectiveRouteParams = globalContext.routeParams || match.params;
|
|
426
|
-
// For matching routes, always try to get state from WebFRouter if params is undefined
|
|
427
|
-
const effectiveParams = globalContext.params !== undefined ? globalContext.params : WebFRouter.state;
|
|
346
|
+
// Only update if this route is the active one
|
|
347
|
+
if (globalContext.activePath === path) {
|
|
428
348
|
return {
|
|
429
349
|
path,
|
|
430
|
-
params:
|
|
431
|
-
routeParams: effectiveRouteParams,
|
|
350
|
+
params: globalContext.params,
|
|
432
351
|
activePath: globalContext.activePath,
|
|
433
352
|
routeEventKind: globalContext.routeEventKind
|
|
434
353
|
};
|
|
@@ -437,55 +356,33 @@ function RouteContextProvider({ path, children }) {
|
|
|
437
356
|
return {
|
|
438
357
|
path,
|
|
439
358
|
params: undefined,
|
|
440
|
-
routeParams: undefined,
|
|
441
359
|
activePath: globalContext.activePath,
|
|
442
360
|
routeEventKind: undefined
|
|
443
361
|
};
|
|
444
|
-
}, [path, globalContext.activePath, globalContext.params, globalContext.
|
|
362
|
+
}, [path, globalContext.activePath, globalContext.params, globalContext.routeEventKind]);
|
|
445
363
|
return (React.createElement(RouteContext.Provider, { value: routeSpecificContext }, children));
|
|
446
364
|
}
|
|
447
365
|
function Routes({ children }) {
|
|
448
366
|
// State to track current route information
|
|
449
367
|
const [routeState, setRouteState] = React.useState({
|
|
450
368
|
path: undefined,
|
|
451
|
-
activePath:
|
|
369
|
+
activePath: undefined,
|
|
452
370
|
params: undefined,
|
|
453
|
-
routeParams: undefined,
|
|
454
371
|
routeEventKind: undefined
|
|
455
372
|
});
|
|
456
373
|
// Listen to hybridrouterchange event
|
|
457
374
|
React.useEffect(() => {
|
|
458
375
|
const handleRouteChange = (event) => {
|
|
459
376
|
const routeEvent = event;
|
|
460
|
-
// Check for new event detail structure with params
|
|
461
|
-
const eventDetail = event.detail;
|
|
462
377
|
// Only update activePath for push events
|
|
463
378
|
const newActivePath = (routeEvent.kind === 'didPushNext' || routeEvent.kind === 'didPush')
|
|
464
379
|
? routeEvent.path
|
|
465
380
|
: routeState.activePath;
|
|
466
|
-
// For dynamic routes, extract parameters from the path using registered route patterns
|
|
467
|
-
let routeParams = (eventDetail === null || eventDetail === void 0 ? void 0 : eventDetail.params) || undefined;
|
|
468
|
-
if (!routeParams && newActivePath) {
|
|
469
|
-
// Try to extract parameters from registered route patterns
|
|
470
|
-
const registeredRoutes = Array.from(document.querySelectorAll('webf-router-link'));
|
|
471
|
-
for (const routeElement of registeredRoutes) {
|
|
472
|
-
const routePath = routeElement.getAttribute('path');
|
|
473
|
-
if (routePath && routePath.includes(':')) {
|
|
474
|
-
const match = matchPath(routePath, newActivePath);
|
|
475
|
-
if (match) {
|
|
476
|
-
routeParams = match.params;
|
|
477
|
-
break;
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
const eventState = (eventDetail === null || eventDetail === void 0 ? void 0 : eventDetail.state) || routeEvent.state;
|
|
483
381
|
// Update state based on event kind
|
|
484
382
|
setRouteState({
|
|
485
383
|
path: routeEvent.path,
|
|
486
384
|
activePath: newActivePath,
|
|
487
|
-
params:
|
|
488
|
-
routeParams: routeParams, // Use params from Flutter if available
|
|
385
|
+
params: routeEvent.state,
|
|
489
386
|
routeEventKind: routeEvent.kind
|
|
490
387
|
});
|
|
491
388
|
};
|
|
@@ -500,10 +397,9 @@ function Routes({ children }) {
|
|
|
500
397
|
const globalContextValue = React.useMemo(() => ({
|
|
501
398
|
path: undefined,
|
|
502
399
|
params: routeState.params,
|
|
503
|
-
routeParams: routeState.routeParams, // Pass through route params from Flutter
|
|
504
400
|
activePath: routeState.activePath,
|
|
505
401
|
routeEventKind: routeState.routeEventKind
|
|
506
|
-
}), [routeState.activePath, routeState.params, routeState.
|
|
402
|
+
}), [routeState.activePath, routeState.params, routeState.routeEventKind]);
|
|
507
403
|
// Wrap each Route component with its own context provider
|
|
508
404
|
const wrappedChildren = React.useMemo(() => {
|
|
509
405
|
return React.Children.map(children, (child) => {
|
|
@@ -549,7 +445,7 @@ function useRoutes(routes) {
|
|
|
549
445
|
if (route.children && route.children.length > 0) {
|
|
550
446
|
console.warn('Nested routes are not supported yet');
|
|
551
447
|
}
|
|
552
|
-
return (React.createElement(Route, { key: route.path, path: route.path, element: route.element, prerender: route.prerender
|
|
448
|
+
return (React.createElement(Route, { key: route.path, path: route.path, element: route.element, prerender: route.prerender }));
|
|
553
449
|
});
|
|
554
450
|
}, [routes]);
|
|
555
451
|
// Return Routes component with Route children
|
|
@@ -623,12 +519,8 @@ exports.Route = Route;
|
|
|
623
519
|
exports.Routes = Routes;
|
|
624
520
|
exports.WebFRouter = WebFRouter;
|
|
625
521
|
exports.WebFRouterLink = WebFRouterLink;
|
|
626
|
-
exports.matchPath = matchPath;
|
|
627
|
-
exports.matchRoutes = matchRoutes;
|
|
628
|
-
exports.pathToRegex = pathToRegex;
|
|
629
522
|
exports.useLocation = useLocation;
|
|
630
523
|
exports.useNavigate = useNavigate;
|
|
631
|
-
exports.useParams = useParams;
|
|
632
524
|
exports.useRouteContext = useRouteContext;
|
|
633
525
|
exports.useRoutes = useRoutes;
|
|
634
526
|
//# sourceMappingURL=index.js.map
|