{"version":3,"names":["CSPContext","CSPProvider","props","contextValue","nonce","disableStyleElements","children"],"sources":["csp-provider.tsx"],"sourcesContent":["import type { JSX } from \"@solidjs/web\";\n\nimport { CSPContext, type CSPContextValue } from \"./csp-context.ts\";\n\nexport interface CSPProviderProps {\n\tchildren?: JSX.Element;\n\t/**\n\t * The nonce value to apply to inline `<style>` and `<script>` tags\n\t * injected by Base UI components for CSP compliance.\n\t */\n\tnonce?: string | undefined;\n\t/**\n\t * When `true`, descendants skip injecting inline `<style>` elements\n\t * (e.g. the scroll-area's disable-scrollbar stylesheet). Use when your\n\t * CSP forbids inline styles outright, even with a valid nonce, and\n\t * provide the styles through an external stylesheet instead.\n\t *\n\t * @default false\n\t */\n\tdisableStyleElements?: boolean | undefined;\n}\n\n/**\n * Provides a Content Security Policy (CSP) nonce that Base UI components\n * attach to inline `<style>` and `<script>` tags.\n *\n * Solid 2 uses the context value itself as the provider component (no\n * `.Provider`). The context value is a plain object with a getter so the\n * `nonce` accessor tracks `props.nonce` without a top-level reactive read.\n */\nexport function CSPProvider(props: CSPProviderProps): JSX.Element {\n\tconst contextValue: CSPContextValue = {\n\t\tnonce: () => props.nonce,\n\t\tdisableStyleElements: () => props.disableStyleElements === true,\n\t};\n\n\treturn <CSPContext value={contextValue}>{props.children}</CSPContext>;\n}\n"],"mappings":"AAEA,SAASA,UAAU,QAA8B,kBAAkB;AAoBnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CAACC,KAAuB,EAAe;EACjE,MAAMC,YAA6B,GAAG;IACrCC,KAAK,EAAEA,CAAA,KAAMF,KAAK,CAACE,KAAK;IACxBC,oBAAoB,EAAEA,CAAA,KAAMH,KAAK,CAACG,oBAAoB,KAAK;EAC5D,CAAC;EAED,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAACF,YAAY,CAAC,CAAC,CAACD,KAAK,CAACI,QAAQ,CAAC,EAAE,UAAU,CAAC;AACtE","ignoreList":[]}