@uniformdev/project-map 20.49.1 → 20.49.3-alpha.47

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
@@ -294,14 +294,15 @@ interface components$1 {
294
294
  path?: string;
295
295
  /** @description Last segment of the url in this locale */
296
296
  pathSegment: string;
297
- /** @description When false, the node explicitly defines a locale-specific path segment.
297
+ /**
298
+ * @description When false, the node explicitly defines a locale-specific path segment.
298
299
  *
299
300
  * When true, an ancestor defines a locale-specific path segment,
300
301
  * which makes its descendants resolvable using that segment.
301
302
  * This node does not define a locale-specific path segment.
302
303
  *
303
304
  * Only included if requested with the expanded flag. Without the expanded flag, inherited locales are not included in the response
304
- * */
305
+ */
305
306
  inherited?: boolean;
306
307
  };
307
308
  ProjectMapSourceRedirectData: {
@@ -318,9 +319,10 @@ interface components$1 {
318
319
  */
319
320
  id?: string;
320
321
  }[];
321
- /** @description Basic information about the linked composition from the context of a project map node.
322
+ /**
323
+ * @description Basic information about the linked composition from the context of a project map node.
322
324
  * If the linked composition has editions, the editions are included in the `editions` property.
323
- * */
325
+ */
324
326
  ProjectMapNodeCompositionData: {
325
327
  /** @description Type of the linked composition (id of its definition) */
326
328
  type: string;
@@ -333,7 +335,6 @@ interface components$1 {
333
335
  * Format: uuid
334
336
  * @description The edition UUID underneath the linked composition
335
337
  * This is only present if the composition has not been published, but an edition has
336
- *
337
338
  */
338
339
  editionId?: string;
339
340
  /** @description Slug pattern of the linked composition or edition */
@@ -353,24 +354,25 @@ interface components$1 {
353
354
  icon?: string;
354
355
  /** @description Friendly name of this Composition's Definition */
355
356
  typeName?: string;
356
- /** @description List of locales that the composition _or any of its editions_ is available in.
357
+ /**
358
+ * @description List of locales that the composition _or any of its editions_ is available in.
357
359
  * If empty, available in all locales.
358
- * */
360
+ */
359
361
  locales: string[];
360
362
  /** @description Priority of the composition relative to any editions */
361
363
  editionPriority?: number;
362
364
  /** @description Friendly name of the edition */
363
365
  editionName?: string;
364
- /** @description List of editions available for this composition. The composition is included in the list, it is the edition
366
+ /**
367
+ * @description List of editions available for this composition. The composition is included in the list, it is the edition
365
368
  * where the editionID equals the node's compositionID. NOTE: this is not sent if only one edition is available
366
- * */
369
+ */
367
370
  editions?: components$1["schemas"]["ProjectMapNodeCompositionEditionData"][];
368
371
  /**
369
372
  * Format: date-time
370
373
  * @description Date and time the composition was last modified (or created if never modified).
371
374
  * Uses ISO-8859-1 formatting and UTC timezone.
372
375
  * IMPORTANT: if the composition has more than one edition, this is the modified date of the default edition. Each edition has its own modified date in the `editions` array.
373
- *
374
376
  */
375
377
  modified?: string;
376
378
  };
@@ -457,10 +459,11 @@ interface components$1 {
457
459
  isSearchHit?: boolean;
458
460
  /** @description Query strings that are allowed to be passed to the node */
459
461
  queryStrings?: components$1["schemas"]["ProjectMapNodeAllowedQueryString"][];
460
- /** @description For dynamic nodes, this is the preview value for the dynamic value.
462
+ /**
463
+ * @description For dynamic nodes, this is the preview value for the dynamic value.
461
464
  * The preview value is used when editing a connected composition, and is the default
462
465
  * dynamic node value unless the author has explicitly chosen a different value
463
- * */
466
+ */
464
467
  previewValue?: string;
465
468
  };
466
469
  ProjectMapNodeAllowedQueryString: {
@@ -501,7 +504,17 @@ interface paths {
501
504
  path?: never;
502
505
  cookie?: never;
503
506
  };
504
- /** @description Called to get a list of nodes belonging to a specific path or Id */
507
+ /**
508
+ * @description Called to get a list of nodes belonging to a specific path or Id.
509
+ *
510
+ * Note on branch-scoped permissions: if the caller's role has a
511
+ * branch-scoped PrmNodeRead policy (i.e. read access is configured for
512
+ * specific project map branches only), the response is filtered
513
+ * server-side to nodes within those branches. Consumers should not
514
+ * assume the response contains the entire project map. Users with
515
+ * unscoped PrmNodeRead, PrmSchema, or composition-level read permissions
516
+ * receive the full set (backward-compatible behavior).
517
+ */
505
518
  get: {
506
519
  parameters: {
507
520
  query: {
@@ -509,13 +522,14 @@ interface paths {
509
522
  projectMapId?: string;
510
523
  /** @description The project id that contains the project map tree that this node belongs to */
511
524
  projectId: string;
512
- /** @description The ID of a release to fetch the composition data for.
525
+ /**
526
+ * @description The ID of a release to fetch the composition data for.
513
527
  *
514
528
  * - When unspecified, composition data is fetched from base.
515
529
  * - When specified, all content is returned as it would appear in the release if it was released now. This includes both content copied to the release and changed, as well as content that is not part of the release.
516
530
  *
517
531
  * Content copied to a release can be differentiated from base content by the `releaseId` property on the content. If the content is not copied to the release, this property will not be defined
518
- * */
532
+ */
519
533
  releaseId?: string;
520
534
  /** @description The id of the node to retrieve, cannot have both this parameter and `path` */
521
535
  id?: string;
@@ -535,9 +549,10 @@ interface paths {
535
549
  tree?: boolean;
536
550
  /** @description text search filter */
537
551
  search?: string;
538
- /** @description Modifies the results to include all ancestors of matched nodes, in addition to the nodes themselves.
552
+ /**
553
+ * @description Modifies the results to include all ancestors of matched nodes, in addition to the nodes themselves.
539
554
  * Results are sorted by path. If multiple nodes are selected, ancestors are not duplicated
540
- * */
555
+ */
541
556
  includeAncestors?: boolean;
542
557
  /** @description include expanded helper computed properties, including `isLeaf`, `parentPath`, `pathSegment` etc */
543
558
  expanded?: boolean;
@@ -547,7 +562,6 @@ interface paths {
547
562
  * @deprecated
548
563
  * @description Returns the UI status string of the composition.
549
564
  * This internal status is subject to change without notice and is thus marked deprecated to discourage the use of internal data
550
- *
551
565
  */
552
566
  withCompositionUIStatus?: boolean;
553
567
  /** @description Include basic redirect information */
@@ -743,10 +757,11 @@ interface components {
743
757
  isSearchHit?: boolean;
744
758
  /** @description Query strings that are allowed to be passed to the node */
745
759
  queryStrings?: components["schemas"]["ProjectMapNodeAllowedQueryString"][];
746
- /** @description For dynamic nodes, this is the preview value for the dynamic value.
760
+ /**
761
+ * @description For dynamic nodes, this is the preview value for the dynamic value.
747
762
  * The preview value is used when editing a connected composition, and is the default
748
763
  * dynamic node value unless the author has explicitly chosen a different value
749
- * */
764
+ */
750
765
  previewValue?: string;
751
766
  };
752
767
  /** @description Basic information about a composition edition from the context of a project map node */
@@ -792,9 +807,10 @@ interface components {
792
807
  */
793
808
  modified?: string;
794
809
  };
795
- /** @description Basic information about the linked composition from the context of a project map node.
810
+ /**
811
+ * @description Basic information about the linked composition from the context of a project map node.
796
812
  * If the linked composition has editions, the editions are included in the `editions` property.
797
- * */
813
+ */
798
814
  ProjectMapNodeCompositionData: {
799
815
  /** @description Type of the linked composition (id of its definition) */
800
816
  type: string;
@@ -807,7 +823,6 @@ interface components {
807
823
  * Format: uuid
808
824
  * @description The edition UUID underneath the linked composition
809
825
  * This is only present if the composition has not been published, but an edition has
810
- *
811
826
  */
812
827
  editionId?: string;
813
828
  /** @description Slug pattern of the linked composition or edition */
@@ -827,24 +842,25 @@ interface components {
827
842
  icon?: string;
828
843
  /** @description Friendly name of this Composition's Definition */
829
844
  typeName?: string;
830
- /** @description List of locales that the composition _or any of its editions_ is available in.
845
+ /**
846
+ * @description List of locales that the composition _or any of its editions_ is available in.
831
847
  * If empty, available in all locales.
832
- * */
848
+ */
833
849
  locales: string[];
834
850
  /** @description Priority of the composition relative to any editions */
835
851
  editionPriority?: number;
836
852
  /** @description Friendly name of the edition */
837
853
  editionName?: string;
838
- /** @description List of editions available for this composition. The composition is included in the list, it is the edition
854
+ /**
855
+ * @description List of editions available for this composition. The composition is included in the list, it is the edition
839
856
  * where the editionID equals the node's compositionID. NOTE: this is not sent if only one edition is available
840
- * */
857
+ */
841
858
  editions?: components["schemas"]["ProjectMapNodeCompositionEditionData"][];
842
859
  /**
843
860
  * Format: date-time
844
861
  * @description Date and time the composition was last modified (or created if never modified).
845
862
  * Uses ISO-8859-1 formatting and UTC timezone.
846
863
  * IMPORTANT: if the composition has more than one edition, this is the modified date of the default edition. Each edition has its own modified date in the `editions` array.
847
- *
848
864
  */
849
865
  modified?: string;
850
866
  };
@@ -869,14 +885,15 @@ interface components {
869
885
  path?: string;
870
886
  /** @description Last segment of the url in this locale */
871
887
  pathSegment: string;
872
- /** @description When false, the node explicitly defines a locale-specific path segment.
888
+ /**
889
+ * @description When false, the node explicitly defines a locale-specific path segment.
873
890
  *
874
891
  * When true, an ancestor defines a locale-specific path segment,
875
892
  * which makes its descendants resolvable using that segment.
876
893
  * This node does not define a locale-specific path segment.
877
894
  *
878
895
  * Only included if requested with the expanded flag. Without the expanded flag, inherited locales are not included in the response
879
- * */
896
+ */
880
897
  inherited?: boolean;
881
898
  };
882
899
  ProjectMapNodeDefinition: {
@@ -1208,6 +1225,18 @@ declare class Route {
1208
1225
  */
1209
1226
  expand(options?: ExpandOptions): string;
1210
1227
  static getDynamicRouteSegmentName(segment: string): string | undefined;
1228
+ /**
1229
+ * Splits a path into the path portion and an optional `#fragment`
1230
+ * (everything after the first `#`).
1231
+ *
1232
+ * Variable expressions (`${...}`) may legitimately contain `#` characters
1233
+ * (e.g. JSON-pointer tokens like `${#jptr:/foo/_slug}`), so the fragment
1234
+ * delimiter is the first `#` that falls outside of a variable expression.
1235
+ */
1236
+ static splitFragment(path: string): {
1237
+ path: string;
1238
+ fragment: string | undefined;
1239
+ };
1211
1240
  static dynamicSegmentPrefix: string;
1212
1241
  }
1213
1242
 
package/dist/index.d.ts CHANGED
@@ -294,14 +294,15 @@ interface components$1 {
294
294
  path?: string;
295
295
  /** @description Last segment of the url in this locale */
296
296
  pathSegment: string;
297
- /** @description When false, the node explicitly defines a locale-specific path segment.
297
+ /**
298
+ * @description When false, the node explicitly defines a locale-specific path segment.
298
299
  *
299
300
  * When true, an ancestor defines a locale-specific path segment,
300
301
  * which makes its descendants resolvable using that segment.
301
302
  * This node does not define a locale-specific path segment.
302
303
  *
303
304
  * Only included if requested with the expanded flag. Without the expanded flag, inherited locales are not included in the response
304
- * */
305
+ */
305
306
  inherited?: boolean;
306
307
  };
307
308
  ProjectMapSourceRedirectData: {
@@ -318,9 +319,10 @@ interface components$1 {
318
319
  */
319
320
  id?: string;
320
321
  }[];
321
- /** @description Basic information about the linked composition from the context of a project map node.
322
+ /**
323
+ * @description Basic information about the linked composition from the context of a project map node.
322
324
  * If the linked composition has editions, the editions are included in the `editions` property.
323
- * */
325
+ */
324
326
  ProjectMapNodeCompositionData: {
325
327
  /** @description Type of the linked composition (id of its definition) */
326
328
  type: string;
@@ -333,7 +335,6 @@ interface components$1 {
333
335
  * Format: uuid
334
336
  * @description The edition UUID underneath the linked composition
335
337
  * This is only present if the composition has not been published, but an edition has
336
- *
337
338
  */
338
339
  editionId?: string;
339
340
  /** @description Slug pattern of the linked composition or edition */
@@ -353,24 +354,25 @@ interface components$1 {
353
354
  icon?: string;
354
355
  /** @description Friendly name of this Composition's Definition */
355
356
  typeName?: string;
356
- /** @description List of locales that the composition _or any of its editions_ is available in.
357
+ /**
358
+ * @description List of locales that the composition _or any of its editions_ is available in.
357
359
  * If empty, available in all locales.
358
- * */
360
+ */
359
361
  locales: string[];
360
362
  /** @description Priority of the composition relative to any editions */
361
363
  editionPriority?: number;
362
364
  /** @description Friendly name of the edition */
363
365
  editionName?: string;
364
- /** @description List of editions available for this composition. The composition is included in the list, it is the edition
366
+ /**
367
+ * @description List of editions available for this composition. The composition is included in the list, it is the edition
365
368
  * where the editionID equals the node's compositionID. NOTE: this is not sent if only one edition is available
366
- * */
369
+ */
367
370
  editions?: components$1["schemas"]["ProjectMapNodeCompositionEditionData"][];
368
371
  /**
369
372
  * Format: date-time
370
373
  * @description Date and time the composition was last modified (or created if never modified).
371
374
  * Uses ISO-8859-1 formatting and UTC timezone.
372
375
  * IMPORTANT: if the composition has more than one edition, this is the modified date of the default edition. Each edition has its own modified date in the `editions` array.
373
- *
374
376
  */
375
377
  modified?: string;
376
378
  };
@@ -457,10 +459,11 @@ interface components$1 {
457
459
  isSearchHit?: boolean;
458
460
  /** @description Query strings that are allowed to be passed to the node */
459
461
  queryStrings?: components$1["schemas"]["ProjectMapNodeAllowedQueryString"][];
460
- /** @description For dynamic nodes, this is the preview value for the dynamic value.
462
+ /**
463
+ * @description For dynamic nodes, this is the preview value for the dynamic value.
461
464
  * The preview value is used when editing a connected composition, and is the default
462
465
  * dynamic node value unless the author has explicitly chosen a different value
463
- * */
466
+ */
464
467
  previewValue?: string;
465
468
  };
466
469
  ProjectMapNodeAllowedQueryString: {
@@ -501,7 +504,17 @@ interface paths {
501
504
  path?: never;
502
505
  cookie?: never;
503
506
  };
504
- /** @description Called to get a list of nodes belonging to a specific path or Id */
507
+ /**
508
+ * @description Called to get a list of nodes belonging to a specific path or Id.
509
+ *
510
+ * Note on branch-scoped permissions: if the caller's role has a
511
+ * branch-scoped PrmNodeRead policy (i.e. read access is configured for
512
+ * specific project map branches only), the response is filtered
513
+ * server-side to nodes within those branches. Consumers should not
514
+ * assume the response contains the entire project map. Users with
515
+ * unscoped PrmNodeRead, PrmSchema, or composition-level read permissions
516
+ * receive the full set (backward-compatible behavior).
517
+ */
505
518
  get: {
506
519
  parameters: {
507
520
  query: {
@@ -509,13 +522,14 @@ interface paths {
509
522
  projectMapId?: string;
510
523
  /** @description The project id that contains the project map tree that this node belongs to */
511
524
  projectId: string;
512
- /** @description The ID of a release to fetch the composition data for.
525
+ /**
526
+ * @description The ID of a release to fetch the composition data for.
513
527
  *
514
528
  * - When unspecified, composition data is fetched from base.
515
529
  * - When specified, all content is returned as it would appear in the release if it was released now. This includes both content copied to the release and changed, as well as content that is not part of the release.
516
530
  *
517
531
  * Content copied to a release can be differentiated from base content by the `releaseId` property on the content. If the content is not copied to the release, this property will not be defined
518
- * */
532
+ */
519
533
  releaseId?: string;
520
534
  /** @description The id of the node to retrieve, cannot have both this parameter and `path` */
521
535
  id?: string;
@@ -535,9 +549,10 @@ interface paths {
535
549
  tree?: boolean;
536
550
  /** @description text search filter */
537
551
  search?: string;
538
- /** @description Modifies the results to include all ancestors of matched nodes, in addition to the nodes themselves.
552
+ /**
553
+ * @description Modifies the results to include all ancestors of matched nodes, in addition to the nodes themselves.
539
554
  * Results are sorted by path. If multiple nodes are selected, ancestors are not duplicated
540
- * */
555
+ */
541
556
  includeAncestors?: boolean;
542
557
  /** @description include expanded helper computed properties, including `isLeaf`, `parentPath`, `pathSegment` etc */
543
558
  expanded?: boolean;
@@ -547,7 +562,6 @@ interface paths {
547
562
  * @deprecated
548
563
  * @description Returns the UI status string of the composition.
549
564
  * This internal status is subject to change without notice and is thus marked deprecated to discourage the use of internal data
550
- *
551
565
  */
552
566
  withCompositionUIStatus?: boolean;
553
567
  /** @description Include basic redirect information */
@@ -743,10 +757,11 @@ interface components {
743
757
  isSearchHit?: boolean;
744
758
  /** @description Query strings that are allowed to be passed to the node */
745
759
  queryStrings?: components["schemas"]["ProjectMapNodeAllowedQueryString"][];
746
- /** @description For dynamic nodes, this is the preview value for the dynamic value.
760
+ /**
761
+ * @description For dynamic nodes, this is the preview value for the dynamic value.
747
762
  * The preview value is used when editing a connected composition, and is the default
748
763
  * dynamic node value unless the author has explicitly chosen a different value
749
- * */
764
+ */
750
765
  previewValue?: string;
751
766
  };
752
767
  /** @description Basic information about a composition edition from the context of a project map node */
@@ -792,9 +807,10 @@ interface components {
792
807
  */
793
808
  modified?: string;
794
809
  };
795
- /** @description Basic information about the linked composition from the context of a project map node.
810
+ /**
811
+ * @description Basic information about the linked composition from the context of a project map node.
796
812
  * If the linked composition has editions, the editions are included in the `editions` property.
797
- * */
813
+ */
798
814
  ProjectMapNodeCompositionData: {
799
815
  /** @description Type of the linked composition (id of its definition) */
800
816
  type: string;
@@ -807,7 +823,6 @@ interface components {
807
823
  * Format: uuid
808
824
  * @description The edition UUID underneath the linked composition
809
825
  * This is only present if the composition has not been published, but an edition has
810
- *
811
826
  */
812
827
  editionId?: string;
813
828
  /** @description Slug pattern of the linked composition or edition */
@@ -827,24 +842,25 @@ interface components {
827
842
  icon?: string;
828
843
  /** @description Friendly name of this Composition's Definition */
829
844
  typeName?: string;
830
- /** @description List of locales that the composition _or any of its editions_ is available in.
845
+ /**
846
+ * @description List of locales that the composition _or any of its editions_ is available in.
831
847
  * If empty, available in all locales.
832
- * */
848
+ */
833
849
  locales: string[];
834
850
  /** @description Priority of the composition relative to any editions */
835
851
  editionPriority?: number;
836
852
  /** @description Friendly name of the edition */
837
853
  editionName?: string;
838
- /** @description List of editions available for this composition. The composition is included in the list, it is the edition
854
+ /**
855
+ * @description List of editions available for this composition. The composition is included in the list, it is the edition
839
856
  * where the editionID equals the node's compositionID. NOTE: this is not sent if only one edition is available
840
- * */
857
+ */
841
858
  editions?: components["schemas"]["ProjectMapNodeCompositionEditionData"][];
842
859
  /**
843
860
  * Format: date-time
844
861
  * @description Date and time the composition was last modified (or created if never modified).
845
862
  * Uses ISO-8859-1 formatting and UTC timezone.
846
863
  * IMPORTANT: if the composition has more than one edition, this is the modified date of the default edition. Each edition has its own modified date in the `editions` array.
847
- *
848
864
  */
849
865
  modified?: string;
850
866
  };
@@ -869,14 +885,15 @@ interface components {
869
885
  path?: string;
870
886
  /** @description Last segment of the url in this locale */
871
887
  pathSegment: string;
872
- /** @description When false, the node explicitly defines a locale-specific path segment.
888
+ /**
889
+ * @description When false, the node explicitly defines a locale-specific path segment.
873
890
  *
874
891
  * When true, an ancestor defines a locale-specific path segment,
875
892
  * which makes its descendants resolvable using that segment.
876
893
  * This node does not define a locale-specific path segment.
877
894
  *
878
895
  * Only included if requested with the expanded flag. Without the expanded flag, inherited locales are not included in the response
879
- * */
896
+ */
880
897
  inherited?: boolean;
881
898
  };
882
899
  ProjectMapNodeDefinition: {
@@ -1208,6 +1225,18 @@ declare class Route {
1208
1225
  */
1209
1226
  expand(options?: ExpandOptions): string;
1210
1227
  static getDynamicRouteSegmentName(segment: string): string | undefined;
1228
+ /**
1229
+ * Splits a path into the path portion and an optional `#fragment`
1230
+ * (everything after the first `#`).
1231
+ *
1232
+ * Variable expressions (`${...}`) may legitimately contain `#` characters
1233
+ * (e.g. JSON-pointer tokens like `${#jptr:/foo/_slug}`), so the fragment
1234
+ * delimiter is the first `#` that falls outside of a variable expression.
1235
+ */
1236
+ static splitFragment(path: string): {
1237
+ path: string;
1238
+ fragment: string | undefined;
1239
+ };
1211
1240
  static dynamicSegmentPrefix: string;
1212
1241
  }
1213
1242
 
package/dist/index.esm.js CHANGED
@@ -336,6 +336,35 @@ var _Route = class _Route {
336
336
  }
337
337
  return segment.slice(_Route.dynamicSegmentPrefix.length);
338
338
  }
339
+ /**
340
+ * Splits a path into the path portion and an optional `#fragment`
341
+ * (everything after the first `#`).
342
+ *
343
+ * Variable expressions (`${...}`) may legitimately contain `#` characters
344
+ * (e.g. JSON-pointer tokens like `${#jptr:/foo/_slug}`), so the fragment
345
+ * delimiter is the first `#` that falls outside of a variable expression.
346
+ */
347
+ static splitFragment(path) {
348
+ let fragmentIndex = -1;
349
+ parseVariableExpression(path, (token, type, offset) => {
350
+ if (type === "variable") {
351
+ return;
352
+ }
353
+ const hashOffset = token.indexOf("#");
354
+ if (hashOffset === -1) {
355
+ return;
356
+ }
357
+ fragmentIndex = offset + hashOffset;
358
+ return false;
359
+ });
360
+ if (fragmentIndex === -1) {
361
+ return { path, fragment: void 0 };
362
+ }
363
+ return {
364
+ path: path.slice(0, fragmentIndex),
365
+ fragment: path.slice(fragmentIndex + 1)
366
+ };
367
+ }
339
368
  };
340
369
  _routeInfo = new WeakMap();
341
370
  _Route_static = new WeakSet();
package/dist/index.js CHANGED
@@ -26,8 +26,8 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
26
26
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
27
27
 
28
28
  // src/index.ts
29
- var src_exports = {};
30
- __export(src_exports, {
29
+ var index_exports = {};
30
+ __export(index_exports, {
31
31
  ProjectMapClient: () => ProjectMapClient,
32
32
  ROOT_NODE_PATH: () => ROOT_NODE_PATH,
33
33
  Route: () => Route,
@@ -38,7 +38,7 @@ __export(src_exports, {
38
38
  getNodeLocalePath: () => getNodeLocalePath,
39
39
  getRouteAlternateLocalesUrls: () => getRouteAlternateLocalesUrls
40
40
  });
41
- module.exports = __toCommonJS(src_exports);
41
+ module.exports = __toCommonJS(index_exports);
42
42
 
43
43
  // src/projectMapClient.ts
44
44
  var import_api = require("@uniformdev/context/api");
@@ -369,6 +369,35 @@ var _Route = class _Route {
369
369
  }
370
370
  return segment.slice(_Route.dynamicSegmentPrefix.length);
371
371
  }
372
+ /**
373
+ * Splits a path into the path portion and an optional `#fragment`
374
+ * (everything after the first `#`).
375
+ *
376
+ * Variable expressions (`${...}`) may legitimately contain `#` characters
377
+ * (e.g. JSON-pointer tokens like `${#jptr:/foo/_slug}`), so the fragment
378
+ * delimiter is the first `#` that falls outside of a variable expression.
379
+ */
380
+ static splitFragment(path) {
381
+ let fragmentIndex = -1;
382
+ (0, import_canvas.parseVariableExpression)(path, (token, type, offset) => {
383
+ if (type === "variable") {
384
+ return;
385
+ }
386
+ const hashOffset = token.indexOf("#");
387
+ if (hashOffset === -1) {
388
+ return;
389
+ }
390
+ fragmentIndex = offset + hashOffset;
391
+ return false;
392
+ });
393
+ if (fragmentIndex === -1) {
394
+ return { path, fragment: void 0 };
395
+ }
396
+ return {
397
+ path: path.slice(0, fragmentIndex),
398
+ fragment: path.slice(fragmentIndex + 1)
399
+ };
400
+ }
372
401
  };
373
402
  _routeInfo = new WeakMap();
374
403
  _Route_static = new WeakSet();
package/dist/index.mjs CHANGED
@@ -336,6 +336,35 @@ var _Route = class _Route {
336
336
  }
337
337
  return segment.slice(_Route.dynamicSegmentPrefix.length);
338
338
  }
339
+ /**
340
+ * Splits a path into the path portion and an optional `#fragment`
341
+ * (everything after the first `#`).
342
+ *
343
+ * Variable expressions (`${...}`) may legitimately contain `#` characters
344
+ * (e.g. JSON-pointer tokens like `${#jptr:/foo/_slug}`), so the fragment
345
+ * delimiter is the first `#` that falls outside of a variable expression.
346
+ */
347
+ static splitFragment(path) {
348
+ let fragmentIndex = -1;
349
+ parseVariableExpression(path, (token, type, offset) => {
350
+ if (type === "variable") {
351
+ return;
352
+ }
353
+ const hashOffset = token.indexOf("#");
354
+ if (hashOffset === -1) {
355
+ return;
356
+ }
357
+ fragmentIndex = offset + hashOffset;
358
+ return false;
359
+ });
360
+ if (fragmentIndex === -1) {
361
+ return { path, fragment: void 0 };
362
+ }
363
+ return {
364
+ path: path.slice(0, fragmentIndex),
365
+ fragment: path.slice(fragmentIndex + 1)
366
+ };
367
+ }
339
368
  };
340
369
  _routeInfo = new WeakMap();
341
370
  _Route_static = new WeakSet();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/project-map",
3
- "version": "20.49.1",
3
+ "version": "20.49.3-alpha.47+9aed70a64d",
4
4
  "description": "Uniform Project Map",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -24,20 +24,19 @@
24
24
  "dev:ts": "tsup --watch",
25
25
  "clean": "rimraf dist",
26
26
  "test": "vitest run",
27
- "lint": "eslint \"src/**/*.{js,ts,tsx}\"",
28
27
  "format": "prettier --write \"src/**/*.{js,ts,tsx}\"",
29
28
  "update-openapi": "tsx ./scripts/update-openapi.cts",
30
- "document:prebuild": "api-extractor run --local"
29
+ "apidocs-extract": "api-extractor run --local"
31
30
  },
32
31
  "files": [
33
32
  "/dist"
34
33
  ],
35
34
  "dependencies": {
36
- "@uniformdev/canvas": "20.49.1",
37
- "@uniformdev/context": "20.49.1"
35
+ "@uniformdev/canvas": "20.49.3-alpha.47+9aed70a64d",
36
+ "@uniformdev/context": "20.49.3-alpha.47+9aed70a64d"
38
37
  },
39
38
  "publishConfig": {
40
39
  "access": "public"
41
40
  },
42
- "gitHead": "5ecbefb8d8bf62b69600ebe59ed73a0d466438f5"
41
+ "gitHead": "9aed70a64de0ca177d27ea99dc25f1ad053f87ad"
43
42
  }