@plasmicapp/host
Advanced tools
Comparing version 1.0.176 to 1.0.177
@@ -341,2 +341,22 @@ 'use client'; | ||
} | ||
/** | ||
* This transforms `{ "...slug": "a/b/c" }` into `{ "slug": ["a", "b", "c"] }. | ||
*/ | ||
function fixCatchallParams(params) { | ||
var newParams = {}; | ||
for (var _i = 0, _a = Object.entries(params); _i < _a.length; _i++) { | ||
var _b = _a[_i], key = _b[0], value = _b[1]; | ||
if (!value) { | ||
continue; | ||
} | ||
if (key.startsWith("...")) { | ||
newParams[key.slice(3)] = | ||
typeof value === "string" ? value.split("/") : value; | ||
} | ||
else { | ||
newParams[key] = value; | ||
} | ||
} | ||
return newParams; | ||
} | ||
function mkPathFromRouteAndParams(route, params) { | ||
@@ -361,2 +381,3 @@ if (!params) { | ||
route = route !== null && route !== void 0 ? route : deprecatedRoute; | ||
params = fixCatchallParams(params); | ||
var $ctx = useDataEnv() || {}; | ||
@@ -541,3 +562,3 @@ var path = route ? mkPathFromRouteAndParams(route, params) : undefined; | ||
var hostVersion = "1.0.176"; | ||
var hostVersion = "1.0.177"; | ||
@@ -544,0 +565,0 @@ var _a; |
@@ -363,2 +363,22 @@ 'use client'; | ||
} | ||
/** | ||
* This transforms `{ "...slug": "a/b/c" }` into `{ "slug": ["a", "b", "c"] }. | ||
*/ | ||
function fixCatchallParams(params) { | ||
var newParams = {}; | ||
for (var _i = 0, _a = Object.entries(params); _i < _a.length; _i++) { | ||
var _b = _a[_i], key = _b[0], value = _b[1]; | ||
if (!value) { | ||
continue; | ||
} | ||
if (key.startsWith("...")) { | ||
newParams[key.slice(3)] = | ||
typeof value === "string" ? value.split("/") : value; | ||
} | ||
else { | ||
newParams[key] = value; | ||
} | ||
} | ||
return newParams; | ||
} | ||
function mkPathFromRouteAndParams(route, params) { | ||
@@ -383,2 +403,3 @@ if (!params) { | ||
route = route !== null && route !== void 0 ? route : deprecatedRoute; | ||
params = fixCatchallParams(params); | ||
var $ctx = useDataEnv() || {}; | ||
@@ -563,3 +584,3 @@ var path = route ? mkPathFromRouteAndParams(route, params) : undefined; | ||
var hostVersion = "1.0.176"; | ||
var hostVersion = "1.0.177"; | ||
@@ -566,0 +587,0 @@ var _a; |
@@ -1,1 +0,1 @@ | ||
export declare const hostVersion = "1.0.176"; | ||
export declare const hostVersion = "1.0.177"; |
{ | ||
"name": "@plasmicapp/host", | ||
"version": "1.0.176", | ||
"version": "1.0.177", | ||
"description": "plasmic library for app hosting", | ||
@@ -76,3 +76,3 @@ "main": "dist/index.cjs.js", | ||
}, | ||
"gitHead": "a1b8fe28a787b0a7cb46518b9d8491de2bca9f22" | ||
"gitHead": "cb170c2bd81daed2ffb1758c82e49b48086aaef0" | ||
} |
@@ -1,1 +0,1 @@ | ||
export declare const hostVersion = "1.0.176"; | ||
export declare const hostVersion = "1.0.177"; |
@@ -1,1 +0,1 @@ | ||
export declare const hostVersion = "1.0.176"; | ||
export declare const hostVersion = "1.0.177"; |
@@ -1,1 +0,1 @@ | ||
export declare const hostVersion = "1.0.176"; | ||
export declare const hostVersion = "1.0.177"; |
@@ -1,1 +0,1 @@ | ||
export declare const hostVersion = "1.0.176"; | ||
export declare const hostVersion = "1.0.177"; |
@@ -1,1 +0,1 @@ | ||
export declare const hostVersion = "1.0.176"; | ||
export declare const hostVersion = "1.0.177"; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
524293
8831