@uniformdev/project-map 19.35.3-alpha.82 → 19.36.1-alpha.7

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.mts CHANGED
@@ -619,8 +619,6 @@ type UnmatchedRoute = {
619
619
  type ExpandOptions = {
620
620
  dynamicInputValues?: Record<string, string>;
621
621
  allowedQueryParams?: Array<string>;
622
- /** Prevents URL-escaping of variable expressions of the form ${...} in the expand result */
623
- doNotEscapeVariables?: boolean;
624
622
  };
625
623
  declare class Route {
626
624
  #private;
package/dist/index.d.ts CHANGED
@@ -619,8 +619,6 @@ type UnmatchedRoute = {
619
619
  type ExpandOptions = {
620
620
  dynamicInputValues?: Record<string, string>;
621
621
  allowedQueryParams?: Array<string>;
622
- /** Prevents URL-escaping of variable expressions of the form ${...} in the expand result */
623
- doNotEscapeVariables?: boolean;
624
622
  };
625
623
  declare class Route {
626
624
  #private;
package/dist/index.esm.js CHANGED
@@ -193,7 +193,6 @@ var cutReferences = (node) => node ? {
193
193
  } : void 0;
194
194
 
195
195
  // src/util/Route.ts
196
- import { createVariableReference, parseVariableExpression } from "@uniformdev/canvas";
197
196
  var _routeInfo, _parseRouteOrPath, parseRouteOrPath_fn, _isDynamicRouteSegment, isDynamicRouteSegment_fn;
198
197
  var _Route = class _Route {
199
198
  constructor(route) {
@@ -245,7 +244,7 @@ var _Route = class _Route {
245
244
  * Creates an expanded path value for this route given dynamic input values and allowed query string values
246
245
  */
247
246
  expand(options) {
248
- const { dynamicInputValues = {}, allowedQueryParams = [], doNotEscapeVariables = false } = options != null ? options : {};
247
+ const { dynamicInputValues = {}, allowedQueryParams = [] } = options != null ? options : {};
249
248
  const path = __privateGet(this, _routeInfo).segments.map((segment) => {
250
249
  const dynamicSegmentName = _Route.getDynamicRouteSegmentName(segment);
251
250
  if (!dynamicSegmentName) {
@@ -262,14 +261,9 @@ var _Route = class _Route {
262
261
  );
263
262
  return segment;
264
263
  }
265
- return encodeRouteComponent(dynamicSegmentValue, doNotEscapeVariables);
264
+ return encodeURIComponent(dynamicSegmentValue);
266
265
  }).join("/");
267
- const queries = allowedQueryParams.filter((qs) => typeof dynamicInputValues[qs] === "string").map(
268
- (qs) => `${encodeRouteComponent(qs, doNotEscapeVariables)}=${encodeRouteComponent(
269
- dynamicInputValues[qs],
270
- doNotEscapeVariables
271
- )}`
272
- );
266
+ const queries = allowedQueryParams.filter((qs) => typeof dynamicInputValues[qs] === "string").map((qs) => `${encodeURIComponent(qs)}=${encodeURIComponent(dynamicInputValues[qs])}`);
273
267
  const query = queries.length ? `?${queries.join("&")}` : "";
274
268
  return `/${path}${query}`;
275
269
  }
@@ -301,20 +295,6 @@ __privateAdd(_Route, _parseRouteOrPath);
301
295
  __privateAdd(_Route, _isDynamicRouteSegment);
302
296
  _Route.dynamicSegmentPrefix = ":";
303
297
  var Route = _Route;
304
- function encodeRouteComponent(value, doNotEscapeVariables) {
305
- if (!doNotEscapeVariables) {
306
- return encodeURIComponent(value);
307
- }
308
- const result = [];
309
- parseVariableExpression(value, (token, type) => {
310
- if (type === "variable") {
311
- result.push(createVariableReference(token));
312
- } else {
313
- result.push(encodeURIComponent(token));
314
- }
315
- });
316
- return result.join("");
317
- }
318
298
  export {
319
299
  ProjectMapClient,
320
300
  ROOT_NODE_PATH,
package/dist/index.js CHANGED
@@ -221,7 +221,6 @@ var cutReferences = (node) => node ? {
221
221
  } : void 0;
222
222
 
223
223
  // src/util/Route.ts
224
- var import_canvas = require("@uniformdev/canvas");
225
224
  var _routeInfo, _parseRouteOrPath, parseRouteOrPath_fn, _isDynamicRouteSegment, isDynamicRouteSegment_fn;
226
225
  var _Route = class _Route {
227
226
  constructor(route) {
@@ -273,7 +272,7 @@ var _Route = class _Route {
273
272
  * Creates an expanded path value for this route given dynamic input values and allowed query string values
274
273
  */
275
274
  expand(options) {
276
- const { dynamicInputValues = {}, allowedQueryParams = [], doNotEscapeVariables = false } = options != null ? options : {};
275
+ const { dynamicInputValues = {}, allowedQueryParams = [] } = options != null ? options : {};
277
276
  const path = __privateGet(this, _routeInfo).segments.map((segment) => {
278
277
  const dynamicSegmentName = _Route.getDynamicRouteSegmentName(segment);
279
278
  if (!dynamicSegmentName) {
@@ -290,14 +289,9 @@ var _Route = class _Route {
290
289
  );
291
290
  return segment;
292
291
  }
293
- return encodeRouteComponent(dynamicSegmentValue, doNotEscapeVariables);
292
+ return encodeURIComponent(dynamicSegmentValue);
294
293
  }).join("/");
295
- const queries = allowedQueryParams.filter((qs) => typeof dynamicInputValues[qs] === "string").map(
296
- (qs) => `${encodeRouteComponent(qs, doNotEscapeVariables)}=${encodeRouteComponent(
297
- dynamicInputValues[qs],
298
- doNotEscapeVariables
299
- )}`
300
- );
294
+ const queries = allowedQueryParams.filter((qs) => typeof dynamicInputValues[qs] === "string").map((qs) => `${encodeURIComponent(qs)}=${encodeURIComponent(dynamicInputValues[qs])}`);
301
295
  const query = queries.length ? `?${queries.join("&")}` : "";
302
296
  return `/${path}${query}`;
303
297
  }
@@ -329,20 +323,6 @@ __privateAdd(_Route, _parseRouteOrPath);
329
323
  __privateAdd(_Route, _isDynamicRouteSegment);
330
324
  _Route.dynamicSegmentPrefix = ":";
331
325
  var Route = _Route;
332
- function encodeRouteComponent(value, doNotEscapeVariables) {
333
- if (!doNotEscapeVariables) {
334
- return encodeURIComponent(value);
335
- }
336
- const result = [];
337
- (0, import_canvas.parseVariableExpression)(value, (token, type) => {
338
- if (type === "variable") {
339
- result.push((0, import_canvas.createVariableReference)(token));
340
- } else {
341
- result.push(encodeURIComponent(token));
342
- }
343
- });
344
- return result.join("");
345
- }
346
326
  // Annotate the CommonJS export names for ESM import in node:
347
327
  0 && (module.exports = {
348
328
  ProjectMapClient,
package/dist/index.mjs CHANGED
@@ -193,7 +193,6 @@ var cutReferences = (node) => node ? {
193
193
  } : void 0;
194
194
 
195
195
  // src/util/Route.ts
196
- import { createVariableReference, parseVariableExpression } from "@uniformdev/canvas";
197
196
  var _routeInfo, _parseRouteOrPath, parseRouteOrPath_fn, _isDynamicRouteSegment, isDynamicRouteSegment_fn;
198
197
  var _Route = class _Route {
199
198
  constructor(route) {
@@ -245,7 +244,7 @@ var _Route = class _Route {
245
244
  * Creates an expanded path value for this route given dynamic input values and allowed query string values
246
245
  */
247
246
  expand(options) {
248
- const { dynamicInputValues = {}, allowedQueryParams = [], doNotEscapeVariables = false } = options != null ? options : {};
247
+ const { dynamicInputValues = {}, allowedQueryParams = [] } = options != null ? options : {};
249
248
  const path = __privateGet(this, _routeInfo).segments.map((segment) => {
250
249
  const dynamicSegmentName = _Route.getDynamicRouteSegmentName(segment);
251
250
  if (!dynamicSegmentName) {
@@ -262,14 +261,9 @@ var _Route = class _Route {
262
261
  );
263
262
  return segment;
264
263
  }
265
- return encodeRouteComponent(dynamicSegmentValue, doNotEscapeVariables);
264
+ return encodeURIComponent(dynamicSegmentValue);
266
265
  }).join("/");
267
- const queries = allowedQueryParams.filter((qs) => typeof dynamicInputValues[qs] === "string").map(
268
- (qs) => `${encodeRouteComponent(qs, doNotEscapeVariables)}=${encodeRouteComponent(
269
- dynamicInputValues[qs],
270
- doNotEscapeVariables
271
- )}`
272
- );
266
+ const queries = allowedQueryParams.filter((qs) => typeof dynamicInputValues[qs] === "string").map((qs) => `${encodeURIComponent(qs)}=${encodeURIComponent(dynamicInputValues[qs])}`);
273
267
  const query = queries.length ? `?${queries.join("&")}` : "";
274
268
  return `/${path}${query}`;
275
269
  }
@@ -301,20 +295,6 @@ __privateAdd(_Route, _parseRouteOrPath);
301
295
  __privateAdd(_Route, _isDynamicRouteSegment);
302
296
  _Route.dynamicSegmentPrefix = ":";
303
297
  var Route = _Route;
304
- function encodeRouteComponent(value, doNotEscapeVariables) {
305
- if (!doNotEscapeVariables) {
306
- return encodeURIComponent(value);
307
- }
308
- const result = [];
309
- parseVariableExpression(value, (token, type) => {
310
- if (type === "variable") {
311
- result.push(createVariableReference(token));
312
- } else {
313
- result.push(encodeURIComponent(token));
314
- }
315
- });
316
- return result.join("");
317
- }
318
298
  export {
319
299
  ProjectMapClient,
320
300
  ROOT_NODE_PATH,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/project-map",
3
- "version": "19.35.3-alpha.82+4bc341093",
3
+ "version": "19.36.1-alpha.7+859ce3f29",
4
4
  "description": "Uniform Project Map",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -32,11 +32,11 @@
32
32
  "/dist"
33
33
  ],
34
34
  "dependencies": {
35
- "@uniformdev/canvas": "19.35.3-alpha.82+4bc341093",
36
- "@uniformdev/context": "19.35.3-alpha.82+4bc341093"
35
+ "@uniformdev/canvas": "19.36.1-alpha.7+859ce3f29",
36
+ "@uniformdev/context": "19.36.1-alpha.7+859ce3f29"
37
37
  },
38
38
  "publishConfig": {
39
39
  "access": "public"
40
40
  },
41
- "gitHead": "4bc341093bc946900df2646fe53eca4bcddc693c"
41
+ "gitHead": "859ce3f295642c78d0308620f988a51ce933bd64"
42
42
  }