canny-ui-react 6.3.3 → 6.4.0

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.
@@ -0,0 +1,11 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface CspNonceProviderProps {
3
+ /**
4
+ * The per-request CSP nonce — the same value carried in the response's
5
+ * `Content-Security-Policy` header. Applied to every scoped `<style>` element
6
+ * the library emits. `undefined` renders those elements without a nonce
7
+ * attribute (identical to having no provider).
8
+ */
9
+ nonce: string | undefined;
10
+ children?: ReactNode;
11
+ }
@@ -0,0 +1,15 @@
1
+ import type { CspNonceProviderProps } from './CspNonce.types';
2
+ /**
3
+ * Supplies the page's CSP nonce to every scoped `<style>` element Canny-UI
4
+ * emits: responsive `sx` on `Box` and on `withSx`-based components (e.g.
5
+ * `Divider`), `CannyLoader`'s keyframes, and the styles Radix overlays inject
6
+ * (the `Select` viewport's scrollbar rule and the scroll lock of every
7
+ * overlay). Under a nonce-based `style-src` / `style-src-elem` policy the
8
+ * browser blocks those elements unless they carry the nonce. Mount once near
9
+ * the root, with the nonce from the response's Content-Security-Policy
10
+ * header. Without a provider the elements render exactly as before (no nonce
11
+ * attribute).
12
+ */
13
+ export declare function CspNonceProvider({ nonce, children }: CspNonceProviderProps): import("react/jsx-runtime").JSX.Element;
14
+ /** The nonce from the nearest `CspNonceProvider`, or `undefined` outside one. */
15
+ export declare function useCspNonce(): string | undefined;
@@ -0,0 +1,2 @@
1
+ export { CspNonceProvider, useCspNonce } from './CspNonceProvider';
2
+ export type { CspNonceProviderProps } from './CspNonce.types';