{"version":3,"file":"plugin-path.mjs","names":[],"sources":["../../src/ui/plugin-path.ts"],"sourcesContent":["/**\n * Escape hatch for navigation to plugin-owned paths. Composed plugin routes\n * are not part of the core Register, so literal paths to them fail TanStack's\n * strict Link/redirect typing even though they resolve at runtime once the\n * plugin tree composes in. Routing the literal through a string-typed\n * boundary states the contract explicitly: the path is valid only while the\n * owning plugin ui is composed in — core-only fallbacks 404 by design.\n */\nexport function pluginPath(path: string): string {\n  return path;\n}\n\n/**\n * Plugin-owned href with query params — usable via the `href` option of\n * Link/Navigate/redirect when the path's search schema lives in the plugin\n * (the core cannot type-check it).\n */\nexport function pluginHref(path: string, search?: Record<string, string | undefined>): string {\n  const params = new URLSearchParams();\n  for (const [key, value] of Object.entries(search ?? {})) {\n    if (value !== undefined) params.set(key, value);\n  }\n  const query = params.toString();\n  return `${pluginPath(path)}${query ? `?${query}` : \"\"}`;\n}\n\n/**\n * Search params for a plugin-owned route used through the typed `search`\n * option — the core cannot type-check them, so they widen to the router's\n * full search schema union.\n */\nexport function pluginSearch(search: Record<string, unknown>): never {\n  return search as never;\n}\n"],"mappings":";;;;;;;;;AAQA,SAAgB,WAAW,MAAsB;CAC/C,OAAO;AACT;;;;;;AAOA,SAAgB,WAAW,MAAc,QAAqD;CAC5F,MAAM,SAAS,IAAI,gBAAgB;CACnC,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,UAAU,CAAC,CAAC,GACpD,IAAI,UAAU,QAAW,OAAO,IAAI,KAAK,KAAK;CAEhD,MAAM,QAAQ,OAAO,SAAS;CAC9B,OAAO,GAAG,WAAW,IAAI,IAAI,QAAQ,IAAI,UAAU;AACrD;;;;;;AAOA,SAAgB,aAAa,QAAwC;CACnE,OAAO;AACT"}