@@ -14,6 +14,7 @@ import { setLink, type RegisteredLinkProps } from "../link";
1414import "../assets/dsfr_plus_icons.scss" ;
1515// eslint-disable-next-line @typescript-eslint/no-unused-vars -- used in doc
1616import { type startReactDsfr } from "./zz_internal/start" ;
17+ import { DEFAULT_TRUSTED_TYPES_POLICY_NAME } from "../tools/trustedTypesPolicy/config" ;
1718
1819export type DsfrHeadProps = {
1920 /** If not provided no fonts are preloaded.
@@ -25,7 +26,7 @@ export type DsfrHeadProps = {
2526 /**
2627 * When set, the value will be used as the nonce attribute of subsequent script tags.
2728 *
28- * Don't forget to add `checkNonce : true` in {@link startReactDsfr} options.
29+ * Don't forget to add `doCheckNonce : true` in {@link startReactDsfr} options.
2930 *
3031 * @see https://developer.mozilla.org/fr/docs/Web/HTML/Global_attributes/nonce
3132 */
@@ -36,6 +37,7 @@ export type DsfrHeadProps = {
3637 * Don't forget to add `trustedTypesPolicyName` in {@link startReactDsfr} options.
3738 *
3839 * @see https://developer.mozilla.org/fr/docs/Web/HTTP/Headers/Content-Security-Policy/trusted-types
40+ * @see {@link DEFAULT_TRUSTED_TYPES_POLICY_NAME }
3941 * @default "react-dsfr"
4042 */
4143 trustedTypesPolicyName ?: string ;
@@ -44,7 +46,12 @@ export type DsfrHeadProps = {
4446const isProduction = process . env . NODE_ENV !== "development" ;
4547
4648export function DsfrHead ( props : DsfrHeadProps ) {
47- const { preloadFonts = [ ] , Link, nonce, trustedTypesPolicyName } = props ;
49+ const {
50+ preloadFonts = [ ] ,
51+ Link,
52+ nonce,
53+ trustedTypesPolicyName = DEFAULT_TRUSTED_TYPES_POLICY_NAME
54+ } = props ;
4855
4956 const defaultColorScheme = getDefaultColorSchemeServerSide ( ) ;
5057
0 commit comments