@donotdev/core 0.3.3 → 0.3.4
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/i18n/locales/lazy/auth_ar.json +7 -1
- package/i18n/locales/lazy/auth_da.json +7 -1
- package/i18n/locales/lazy/auth_de.json +7 -1
- package/i18n/locales/lazy/auth_en.json +7 -1
- package/i18n/locales/lazy/auth_es.json +7 -1
- package/i18n/locales/lazy/auth_fr.json +7 -1
- package/i18n/locales/lazy/auth_it.json +7 -1
- package/i18n/locales/lazy/auth_ja.json +7 -1
- package/i18n/locales/lazy/auth_ko.json +7 -1
- package/i18n/locales/lazy/auth_nl.json +7 -1
- package/i18n/locales/lazy/auth_pl.json +7 -1
- package/i18n/locales/lazy/auth_pt.json +7 -1
- package/i18n/locales/lazy/auth_zh.json +7 -1
- package/index.d.ts +304 -50
- package/index.js +5 -5
- package/next/index.d.ts +15 -9
- package/next/index.js +137 -132
- package/next/runtime.js +2 -2
- package/package.json +2 -2
- package/server.d.ts +170 -25
- package/shared.js +2 -2
- package/symbol-index.json +1 -1
- package/vite/index.d.ts +1 -1
- package/vite/index.js +149 -149
package/next/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Metadata } from 'next';
|
|
3
|
-
import { LanguageRouting, EntitySeoOptions, AnyEntity, EntitySeoRecord, EntitySeo, languageUrl, buildBreadcrumbJsonLd, dndevSchema, formatTrailingSlash, ICrudAdapter, languageUrls, OperationSchemas } from '@donotdev/core/server';
|
|
3
|
+
import { LanguageRouting, EntitySeoOptions, AnyEntity, EntitySeoRecord, EntitySeo, languageUrl, buildBreadcrumbJsonLd, BreadcrumbRoute, dndevSchema, formatTrailingSlash, ICrudAdapter, languageUrls, OperationSchemas } from '@donotdev/core/server';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Footer mode constants - DRY single source of truth
|
|
@@ -449,7 +449,7 @@ interface SEOConfig {
|
|
|
449
449
|
speculationRules?: boolean;
|
|
450
450
|
/** Emit hreflang alternate links when i18n has 2+ languages (default: true). No-op for monolingual apps. Set to false to disable. */
|
|
451
451
|
hreflang?: boolean;
|
|
452
|
-
/** Auto-generate BreadcrumbList JSON-LD
|
|
452
|
+
/** Auto-generate BreadcrumbList JSON-LD: the site, the page's ancestors (`routeAncestors`: URL prefixes that are pages, PageMeta `parent`) and the page, by page title (default: true). Set to false to disable. */
|
|
453
453
|
breadcrumbSchema?: boolean;
|
|
454
454
|
/** Auto-generate WebSite JSON-LD with SearchAction for sitelinks search box (default: true). Set to false to disable. */
|
|
455
455
|
websiteSchema?: boolean;
|
|
@@ -1081,11 +1081,9 @@ interface NextConfigOptions {
|
|
|
1081
1081
|
serverShim?: ServerShimOptions;
|
|
1082
1082
|
/**
|
|
1083
1083
|
* Standard Next.js config options, passed through to Next (which validates them).
|
|
1084
|
-
* `rewrites`, `redirects
|
|
1085
|
-
*
|
|
1086
|
-
*
|
|
1087
|
-
* destructuring fix). The framework sets no `webpack` config (Next 16 builds with
|
|
1088
|
-
* Turbopack): an app's own passes through. Prefer
|
|
1084
|
+
* `rewrites`, `redirects` and `headers` are composed with the framework's: `headers` rules
|
|
1085
|
+
* come after the framework header policy (last wins). The framework sets no `webpack` or
|
|
1086
|
+
* `compiler` config (Next 16 builds with Turbopack): an app's own passes through. Prefer
|
|
1089
1087
|
* `appConfig.headers` for CSP sources and cache overrides (same option on Vite).
|
|
1090
1088
|
*/
|
|
1091
1089
|
[key: string]: any;
|
|
@@ -1419,6 +1417,14 @@ interface EntityPageContext {
|
|
|
1419
1417
|
languageUrl: typeof languageUrl;
|
|
1420
1418
|
/** `buildBreadcrumbJsonLd` from @donotdev/core/server (BreadcrumbList ending with the record title) */
|
|
1421
1419
|
buildBreadcrumbJsonLd: typeof buildBreadcrumbJsonLd;
|
|
1420
|
+
/**
|
|
1421
|
+
* Routes the BreadcrumbList reads: the page's route and its ancestors (`routeAncestors`:
|
|
1422
|
+
* URL prefixes that are routes, PageMeta `parent`) with their PageMeta `namespace`,
|
|
1423
|
+
* `seo` and `parent` (the generated page embeds them; the Vite build passes the manifest)
|
|
1424
|
+
*/
|
|
1425
|
+
routes: readonly BreadcrumbRoute[];
|
|
1426
|
+
/** `appConfig.seo.defaultNamespace` (`home`): labels of ancestors without a namespace (`routeLabel`) */
|
|
1427
|
+
defaultNamespace: string;
|
|
1422
1428
|
}
|
|
1423
1429
|
|
|
1424
1430
|
/** Server identity of one entity page. */
|
|
@@ -1434,8 +1440,8 @@ interface EntityPageSeo {
|
|
|
1434
1440
|
/** Product JSON-LD (`type: 'product'`), null otherwise */
|
|
1435
1441
|
jsonLd: Record<string, unknown> | null;
|
|
1436
1442
|
/**
|
|
1437
|
-
* BreadcrumbList JSON-LD: site home, the
|
|
1438
|
-
* them, the record title last (null without a record title). AutoMetaTags emits no
|
|
1443
|
+
* BreadcrumbList JSON-LD: site home, the page's ancestors named by their titles as the
|
|
1444
|
+
* visible breadcrumb names them, the record title last (null without a record title). AutoMetaTags emits no
|
|
1439
1445
|
* breadcrumb on these routes (`routes.manifest.recordBreadcrumbPaths`).
|
|
1440
1446
|
*/
|
|
1441
1447
|
breadcrumb: Record<string, unknown> | null;
|