@stacksjs/stx 0.2.157 → 0.2.159

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.
@@ -326,13 +326,13 @@ export async function extractVariables(scriptContent, context, filePath, options
326
326
  context.__stxClientPayload = declared;
327
327
  }
328
328
  const useRoute = () => {
329
- const serveCtx = context.__stxServeContext, search = context.__stxServeSearch ?? serveCtx?.search ?? "", path = serveCtx?.path ?? "";
329
+ const serveCtx = context.__stxServeContext, search = context.__stxServeSearch ?? serveCtx?.search ?? "", path = serveCtx?.path ?? "", parsed = Object.fromEntries(new URLSearchParams(search)), supplied = context.query, query = Object.keys(parsed).length > 0 ? parsed : supplied ?? {}, suffix = search || (Object.keys(query).length > 0 ? `?${new URLSearchParams(query).toString()}` : "");
330
330
  return {
331
331
  params: context.params ?? {},
332
- query: Object.fromEntries(new URLSearchParams(search)),
332
+ query,
333
333
  path,
334
334
  name: "",
335
- fullPath: path + search,
335
+ fullPath: path + suffix,
336
336
  hash: "",
337
337
  matched: []
338
338
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/stx",
3
3
  "type": "module",
4
- "version": "0.2.157",
4
+ "version": "0.2.159",
5
5
  "description": "A performant UI Framework. Powered by Bun.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
@@ -117,12 +117,12 @@
117
117
  "dependencies": {
118
118
  "@cwcss/crosswind": "^0.2.14",
119
119
  "@stacksjs/clapp": "^0.2.0",
120
- "@stacksjs/desktop": "0.2.157",
121
- "@stacksjs/sanitizer": "0.2.157",
120
+ "@stacksjs/desktop": "0.2.159",
121
+ "@stacksjs/sanitizer": "0.2.159",
122
122
  "@stacksjs/ts-i18n": "^0.1.11",
123
- "bun-plugin-stx": "0.2.157",
123
+ "bun-plugin-stx": "0.2.159",
124
124
  "bunfig": "^0.15.17",
125
- "stx-router": "0.2.157",
125
+ "stx-router": "0.2.159",
126
126
  "ts-broadcasting": "^0.0.9",
127
127
  "ts-images": "^0.1.9",
128
128
  "ts-syntax-highlighter": "^0.2.1"