@elytracms/next 0.0.102 → 0.0.104
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.js +8 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { registerComponents, createRenderContext, renderDocumentBodyItems, docum
|
|
|
2
2
|
import { isBlockSequenceValueShape } from '@elytracms/core/rich-text';
|
|
3
3
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
4
4
|
import { cacheTags, isDocumentHistory, assetWithoutUrlIssue, assetMetaDriftIssue, resolvedAsset, parseDeliveredDocuments, parseDeliveredRedirects, createContentClient, createContentContext } from '@elytracms/core/content';
|
|
5
|
-
import { DEFAULT_SEO_FIELD, parseLocaleConfig, documentKey, readLiveRedirects, SEO_SUBFIELDS, DRAFT_PERSPECTIVE, splitPath, localeUrlPath, variantOf, DRAFT_VARIANT, createRouter, splitLocalePath, deliverCompositionProps, presentationBodyFields, validateLocale } from '@elytracms/core/cms-core';
|
|
5
|
+
import { DEFAULT_SEO_FIELD, parseLocaleConfig, documentKey, readLiveRedirects, SEO_SUBFIELDS, DRAFT_PERSPECTIVE, splitPath, staticRoutePath, localeUrlPath, variantOf, DRAFT_VARIANT, createRouter, splitLocalePath, deliverCompositionProps, presentationBodyFields, validateLocale } from '@elytracms/core/cms-core';
|
|
6
6
|
export { DRAFT_PERSPECTIVE, documentSchema, localeConfigSchema, localeUrlPath, parseLocaleConfig, redirectRecordSchema, resolveLocale, routeRecordSchema, splitLocalePath, textDirection, variantOf } from '@elytracms/core/cms-core';
|
|
7
7
|
import { assetMetaLens, assetMetaDrift, assetReadLocale, redirectRecordKind } from '@elytracms/core/persistence';
|
|
8
8
|
import { propFieldLookupOf } from '@elytracms/core/component-registry';
|
|
@@ -739,12 +739,17 @@ function canvasSitemapEntries(source, options) {
|
|
|
739
739
|
}
|
|
740
740
|
for (const route of routes) {
|
|
741
741
|
if (route.document || splitPath(route.pattern).some((segment) => segment.startsWith(":"))) continue;
|
|
742
|
+
const routePath = staticRoutePath(route.pattern);
|
|
743
|
+
if (routePath === void 0) {
|
|
744
|
+
skip(route, `"${route.pattern}" is refused by the route gate \u2014 it is not a path of URL text (a "%", "?", "#", "." or ".." segment, or half a character)`);
|
|
745
|
+
continue;
|
|
746
|
+
}
|
|
742
747
|
for (const locale of route.locale ? [route.locale] : locales.locales) {
|
|
743
|
-
const { urlPath, addressable } = localeUrlPath(
|
|
748
|
+
const { urlPath, addressable } = localeUrlPath(routePath, locale, locales);
|
|
744
749
|
candidates.push({
|
|
745
750
|
route,
|
|
746
751
|
locale,
|
|
747
|
-
routePath
|
|
752
|
+
routePath,
|
|
748
753
|
path: urlPath,
|
|
749
754
|
addressable,
|
|
750
755
|
group: `${route.id}${COMPOSITE_KEY_SEPARATOR}path${COMPOSITE_KEY_SEPARATOR}${route.pattern}`
|