@c15t/react 3.0.0-alpha.1 → 3.0.0-alpha.2
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/AGENTS.md +3 -1
- package/dist/aggregate-components.js +1 -1
- package/dist/component-hooks/use-manager.js +1 -1
- package/dist/components/consent-gate/atoms.js +1 -0
- package/dist/components/consent-gate/consent-gate.js +2 -0
- package/dist/components/consent-gate/index.js +2 -0
- package/dist/components/preferences/atoms/accordion.js +1 -1
- package/dist/components/preferences/atoms/vendor-list.js +1 -0
- package/dist/components/preferences/index.js +1 -1
- package/dist/consent-gate.js +2 -0
- package/dist/draft.js +1 -1
- package/dist/external-iab-context.js +1 -1
- package/dist/hooks.js +1 -1
- package/dist/index.js +1 -1
- package/dist/provider.js +1 -1
- package/dist/styles.tw3.css +6 -3
- package/dist/utils/deferred-module.js +2 -0
- package/dist/version.js +1 -1
- package/dist-types/aggregate-components.d.ts +2 -2
- package/dist-types/component-hooks/use-headless-iab-consent-ui.d.ts +1 -1
- package/dist-types/component-hooks/use-manager.d.ts +6 -1
- package/dist-types/components/consent-gate/atoms.d.ts +11 -0
- package/dist-types/components/consent-gate/consent-gate.d.ts +2 -0
- package/dist-types/components/consent-gate/index.d.ts +41 -0
- package/dist-types/components/{frame → consent-gate}/types.d.ts +7 -7
- package/dist-types/components/consent-preferences-link/consent-preferences-link.d.ts +1 -1
- package/dist-types/components/consent-preferences-link/index.d.ts +1 -1
- package/dist-types/components/iab-panel/atoms/purpose-item.d.ts +1 -1
- package/dist-types/components/iab-panel/atoms/stack-item.d.ts +1 -1
- package/dist-types/components/iab-panel/atoms/vendor-list.d.ts +1 -1
- package/dist-types/components/iab-panel/iab-panel.d.ts +1 -1
- package/dist-types/components/iab-panel/index.d.ts +24 -24
- package/dist-types/components/iab-prompt/index.d.ts +17 -17
- package/dist-types/components/panel/atoms/card.d.ts +4 -4
- package/dist-types/components/panel/atoms/overlay.d.ts +1 -1
- package/dist-types/components/panel/index.d.ts +7 -7
- package/dist-types/components/panel/panel.d.ts +2 -2
- package/dist-types/components/panel-link/index.d.ts +1 -1
- package/dist-types/components/panel-trigger/atoms/button.d.ts +1 -1
- package/dist-types/components/panel-trigger/atoms/icon.d.ts +1 -1
- package/dist-types/components/panel-trigger/atoms/root.d.ts +2 -2
- package/dist-types/components/panel-trigger/atoms/toolbar.d.ts +2 -2
- package/dist-types/components/panel-trigger/index.d.ts +4 -4
- package/dist-types/components/panel-trigger/panel-trigger-toolbar.d.ts +1 -1
- package/dist-types/components/panel-trigger/panel-trigger.d.ts +9 -9
- package/dist-types/components/panel-trigger/types.d.ts +1 -1
- package/dist-types/components/preferences/atoms/accordion.d.ts +6 -4
- package/dist-types/components/preferences/atoms/button.d.ts +1 -1
- package/dist-types/components/preferences/atoms/footer.d.ts +1 -1
- package/dist-types/components/preferences/atoms/root.d.ts +1 -1
- package/dist-types/components/preferences/atoms/vendor-list.d.ts +23 -0
- package/dist-types/components/preferences/index.d.ts +13 -11
- package/dist-types/components/preferences/policy-actions.d.ts +2 -2
- package/dist-types/components/preferences/preferences.d.ts +1 -1
- package/dist-types/components/preferences/types.d.ts +1 -1
- package/dist-types/components/prompt/components.d.ts +3 -3
- package/dist-types/components/prompt/index.d.ts +11 -11
- package/dist-types/components/prompt/policy-actions.d.ts +2 -2
- package/dist-types/components/prompt/prompt.d.ts +1 -1
- package/dist-types/components/shared/policy-actions.d.ts +2 -2
- package/dist-types/components/shared/primitives/box.d.ts +1 -1
- package/dist-types/components/shared/primitives/button.d.ts +2 -2
- package/dist-types/components/shared/primitives/button.types.d.ts +1 -1
- package/dist-types/components/shared/ui/accordion/accordion.d.ts +2 -2
- package/dist-types/components/shared/ui/accordion/index.d.ts +2 -2
- package/dist-types/components/shared/ui/animated-collapse/index.d.ts +2 -2
- package/dist-types/components/shared/ui/branding.d.ts +1 -1
- package/dist-types/components/shared/ui/button/button.d.ts +1 -1
- package/dist-types/components/shared/ui/button/index.d.ts +2 -2
- package/dist-types/components/shared/ui/collapsible/index.d.ts +1 -1
- package/dist-types/components/shared/ui/dialog/index.d.ts +1 -1
- package/dist-types/components/shared/ui/preference-item/index.d.ts +1 -1
- package/dist-types/components/shared/ui/switch/index.d.ts +2 -2
- package/dist-types/components/shared/ui/switch/switch.d.ts +1 -1
- package/dist-types/components/shared/ui/tabs/index.d.ts +1 -1
- package/dist-types/consent-gate.d.ts +1 -0
- package/dist-types/context/index.d.ts +3 -3
- package/dist-types/context/theme-context.d.ts +1 -1
- package/dist-types/draft.d.ts +53 -1
- package/dist-types/headless.d.ts +7 -7
- package/dist-types/hooks/use-headless-iab-consent-ui.d.ts +1 -1
- package/dist-types/hooks/use-iab-manager.d.ts +1 -1
- package/dist-types/hooks/use-theme.d.ts +1 -1
- package/dist-types/hooks.d.ts +28 -1
- package/dist-types/iab.d.ts +5 -5
- package/dist-types/index.d.ts +25 -25
- package/dist-types/module-hooks.d.ts +4 -4
- package/dist-types/panel-link.d.ts +1 -1
- package/dist-types/panel-trigger.d.ts +1 -1
- package/dist-types/panel.d.ts +1 -1
- package/dist-types/preferences.d.ts +1 -1
- package/dist-types/primitives/accordion.d.ts +1 -1
- package/dist-types/primitives/button.d.ts +1 -1
- package/dist-types/primitives/collapsible.d.ts +1 -1
- package/dist-types/primitives/dialog.d.ts +1 -1
- package/dist-types/primitives/preference-item.d.ts +1 -1
- package/dist-types/primitives/switch.d.ts +1 -1
- package/dist-types/primitives/tabs.d.ts +1 -1
- package/dist-types/primitives.d.ts +7 -7
- package/dist-types/prompt.d.ts +1 -1
- package/dist-types/provider.d.ts +22 -5
- package/dist-types/server/fetch-ssr-data.d.ts +1 -1
- package/dist-types/server/index.d.ts +5 -5
- package/dist-types/theme-provider.d.ts +2 -2
- package/dist-types/types/index.d.ts +3 -3
- package/dist-types/types/manager.d.ts +1 -1
- package/dist-types/types/theme/index.d.ts +1 -1
- package/dist-types/ui-config-context.d.ts +1 -1
- package/dist-types/utils/deferred-module.d.ts +11 -0
- package/dist-types/utils/index.d.ts +4 -4
- package/dist-types/utils/merge-slot-props.d.ts +2 -2
- package/dist-types/utils/merge-styles.d.ts +1 -1
- package/dist-types/utils/theme-utils.d.ts +1 -1
- package/dist-types/version.d.ts +1 -1
- package/docs/README.md +3 -1
- package/docs/frameworks/react/components/consent-dialog.md +1 -1
- package/docs/frameworks/react/components/{frame.md → consent-gate.md} +27 -27
- package/docs/frameworks/react/components/consent-manager-provider.md +5 -1
- package/docs/frameworks/react/components/consent-widget.md +39 -6
- package/docs/frameworks/react/concepts/consent-categories.md +31 -2
- package/docs/guides/deployment-modes.md +12 -0
- package/docs/integrations/building-integrations.md +5 -0
- package/docs/integrations/cloudflare-zaraz.md +399 -0
- package/docs/integrations/google-maps.md +20 -20
- package/docs/integrations/granular-consent.md +208 -0
- package/docs/integrations/overview.md +5 -4
- package/docs/integrations/youtube.md +26 -21
- package/docs/upgrade-v3.md +47 -0
- package/package.json +26 -16
- package/dist/components/frame/atoms.js +0 -1
- package/dist/components/frame/frame.js +0 -2
- package/dist/components/frame/index.js +0 -2
- package/dist/frame.js +0 -2
- package/dist-types/components/frame/atoms.d.ts +0 -11
- package/dist-types/components/frame/frame.d.ts +0 -2
- package/dist-types/components/frame/index.d.ts +0 -24
- package/dist-types/frame.d.ts +0 -1
- package/readme.json +0 -48
- package/src/iab/styles.css +0 -11
- package/src/styles.css +0 -10
- /package/dist/components/{frame → consent-gate}/types.js +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AccordionType } from '@c15t/ui/primitives/accordion';
|
|
2
2
|
import type { ButtonHTMLAttributes, ElementType, HTMLAttributes } from 'react';
|
|
3
|
-
import type { PolymorphicComponentProps } from '../../libs/polymorphic';
|
|
4
|
-
import type { ThemeValue } from '../../../../types/theme';
|
|
3
|
+
import type { PolymorphicComponentProps } from '../../libs/polymorphic.js';
|
|
4
|
+
import type { ThemeValue } from '../../../../types/theme/index.js';
|
|
5
5
|
export type AccordionVariant = 'default' | 'bordered';
|
|
6
6
|
export type AccordionSize = 'medium' | 'small';
|
|
7
7
|
export interface AccordionVariantsProps {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './accordion';
|
|
2
|
-
export * from './accordion.types';
|
|
1
|
+
export * from './accordion.js';
|
|
2
|
+
export * from './accordion.types.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { AnimatedCollapseProps } from './animated-collapse';
|
|
2
|
-
export { AnimatedCollapse } from './animated-collapse';
|
|
1
|
+
export type { AnimatedCollapseProps } from './animated-collapse.js';
|
|
2
|
+
export { AnimatedCollapse } from './animated-collapse.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Branding } from '@c15t/core';
|
|
2
2
|
import type { SVGProps } from 'react';
|
|
3
|
-
import type { CSSPropertiesWithVars } from '../../../types/theme';
|
|
3
|
+
import type { CSSPropertiesWithVars } from '../../../types/theme/index.js';
|
|
4
4
|
export type ResolvedBranding = 'c15t' | 'inth' | 'none';
|
|
5
5
|
export type BrandingVariant = 'footer' | 'dialog-tag' | 'banner-tag';
|
|
6
6
|
export type BrandingSlotContext = 'banner' | 'dialog' | 'manager' | 'iab-banner' | 'iab-dialog';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ButtonHTMLAttributes, ElementType } from 'react';
|
|
2
|
-
import type { PolymorphicComponentProps } from '../../libs/polymorphic';
|
|
2
|
+
import type { PolymorphicComponentProps } from '../../libs/polymorphic.js';
|
|
3
3
|
export type ButtonVariant = 'primary' | 'neutral' | 'secondary';
|
|
4
4
|
export type ButtonMode = 'filled' | 'stroke' | 'lighter' | 'ghost';
|
|
5
5
|
export type ButtonSize = 'medium' | 'small' | 'xsmall' | 'xxsmall';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './button';
|
|
2
|
-
export * from './button.types';
|
|
1
|
+
export * from './button.js';
|
|
2
|
+
export * from './button.types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './collapsible';
|
|
1
|
+
export * from './collapsible.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './dialog';
|
|
1
|
+
export * from './dialog.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './preference-item';
|
|
1
|
+
export * from './preference-item.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './switch';
|
|
2
|
-
export type { SwitchCSSVariables, SwitchRootCSSVariables, SwitchThumbCSSVariables, SwitchTrackCSSVariables, } from './switch.types';
|
|
1
|
+
export * from './switch.js';
|
|
2
|
+
export type { SwitchCSSVariables, SwitchRootCSSVariables, SwitchThumbCSSVariables, SwitchTrackCSSVariables, } from './switch.types.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ButtonHTMLAttributes } from 'react';
|
|
2
|
-
import type { ThemeValue } from '../../../../types/theme';
|
|
2
|
+
import type { ThemeValue } from '../../../../types/theme/index.js';
|
|
3
3
|
export type SwitchSize = 'medium' | 'small';
|
|
4
4
|
export interface SwitchVariantsProps {
|
|
5
5
|
size?: SwitchSize;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './tabs';
|
|
1
|
+
export * from './tabs.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/consent-gate/index.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from '../context';
|
|
2
|
-
export * from './consent-tracking-context';
|
|
3
|
-
export * from './theme-context';
|
|
1
|
+
export * from '../context.js';
|
|
2
|
+
export * from './consent-tracking-context.js';
|
|
3
|
+
export * from './theme-context.js';
|
package/dist-types/draft.d.ts
CHANGED
|
@@ -4,11 +4,24 @@ import type { ReactNode } from 'react';
|
|
|
4
4
|
export interface ConsentDraftHandle {
|
|
5
5
|
values: Readonly<ConsentState>;
|
|
6
6
|
displayedCategories: readonly AllConsentNames[];
|
|
7
|
+
/**
|
|
8
|
+
* Granted flag per declared vendor. Seeded from the denials the gate
|
|
9
|
+
* honors, so a vendor declared `disabled` reads `true` whatever an older
|
|
10
|
+
* record says; every vendor not denied is `true`. Empty under an `iab`
|
|
11
|
+
* policy.
|
|
12
|
+
*/
|
|
13
|
+
vendors: Readonly<Record<string, boolean>>;
|
|
7
14
|
isDirty: boolean;
|
|
8
|
-
/** A
|
|
15
|
+
/** A policy or displayed-category change requires reset and review before saving. */
|
|
9
16
|
isStale: boolean;
|
|
10
17
|
set: (category: AllConsentNames, value: boolean) => void;
|
|
11
18
|
update: (patch: Partial<ConsentState>) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Stage one vendor's grant. Recorded by the next save. Ignored for a
|
|
21
|
+
* vendor that is not declared or is declared `disabled`, since the kernel
|
|
22
|
+
* would drop the grant on save.
|
|
23
|
+
*/
|
|
24
|
+
setVendor: (vendorId: string, granted: boolean) => void;
|
|
12
25
|
acceptAll: () => void;
|
|
13
26
|
rejectAll: () => void;
|
|
14
27
|
save: () => Promise<SaveResult>;
|
|
@@ -29,3 +42,42 @@ export declare const useConsentManagerDraft: () => {
|
|
|
29
42
|
};
|
|
30
43
|
/** Read and edit displayed choices without replacing masked effective permissions. */
|
|
31
44
|
export declare const useConsentDraft: () => ConsentDraftHandle;
|
|
45
|
+
/** The vendor slice of the consent draft, for a custom vendor control. */
|
|
46
|
+
export interface VendorDraftHandle {
|
|
47
|
+
/** Granted flag per declared vendor. See {@link ConsentDraftHandle.vendors}. */
|
|
48
|
+
vendors: Readonly<Record<string, boolean>>;
|
|
49
|
+
/** Stage one vendor's grant for the next save. See {@link ConsentDraftHandle.setVendor}. */
|
|
50
|
+
setVendor: (vendorId: string, granted: boolean) => void;
|
|
51
|
+
/** Whether any draft value, category or vendor, differs from the record. */
|
|
52
|
+
isDirty: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Whether the policy or the vendor surface changed under an unsaved edit.
|
|
55
|
+
* `save` refuses a stale draft. See {@link ConsentDraftHandle.isStale}.
|
|
56
|
+
*/
|
|
57
|
+
isStale: boolean;
|
|
58
|
+
/** Confirm the draft, categories and vendors together. */
|
|
59
|
+
save: () => Promise<SaveResult>;
|
|
60
|
+
/** Discard staged edits and reseed from the record. See {@link ConsentDraftHandle.reset}. */
|
|
61
|
+
reset: () => void;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Read and stage vendor grants on the same draft the category switches use.
|
|
65
|
+
* A custom vendor toggle needs only this; the categories stay where the
|
|
66
|
+
* stock widget or `useConsentDraft()` left them, and one save confirms both.
|
|
67
|
+
* When the policy or the vendor list changes under a staged edit the draft
|
|
68
|
+
* turns stale and `save` refuses it; `reset` reseeds it from the record.
|
|
69
|
+
*
|
|
70
|
+
* @returns The draft's vendor map, the setter, the dirty and stale flags,
|
|
71
|
+
* the save and the reset.
|
|
72
|
+
* @example
|
|
73
|
+
* ```tsx
|
|
74
|
+
* const { vendors, setVendor, isStale, reset, save } = useVendorDraft();
|
|
75
|
+
* <Switch
|
|
76
|
+
* checked={vendors['meta-pixel'] ?? true}
|
|
77
|
+
* onCheckedChange={(on) => setVendor('meta-pixel', on)}
|
|
78
|
+
* />;
|
|
79
|
+
* {isStale && <button onClick={reset}>Review again</button>}
|
|
80
|
+
* ```
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
export declare const useVendorDraft: () => VendorDraftHandle;
|
package/dist-types/headless.d.ts
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* Pair with `ConsentProvider` from `@c15t/react` (or `@c15t/react/provider`).
|
|
6
6
|
*/
|
|
7
7
|
export { defaultTranslationConfig, detectBrowserLanguage, mergeTranslationConfigs, prepareTranslationConfig, } from '@c15t/core';
|
|
8
|
-
export { type ConsentDialogTriggerVisibility, type UseConsentDialogTriggerOptions, type UseConsentDialogTriggerResult, useConsentDialogTrigger, } from './component-hooks/use-panel-trigger';
|
|
9
|
-
export { useConsentManager } from './component-hooks/use-manager';
|
|
10
|
-
export { type HeadlessConsentBannerAction, type HeadlessConsentBannerState, type HeadlessConsentDialogAction, type HeadlessConsentDialogState, type HeadlessConsentSurface, type HeadlessConsentSurfaceAction, type HeadlessConsentSurfaceState, type HeadlessConsentWriteAction, useHeadlessConsentUI, } from './component-hooks/use-headless-consent-ui';
|
|
11
|
-
export { useTranslations } from './component-hooks/use-translations';
|
|
12
|
-
export { useColorScheme } from './hooks/use-color-scheme';
|
|
13
|
-
export { useFocusTrap } from './hooks/use-focus-trap';
|
|
14
|
-
export type { ReactUIOptions } from './types/manager';
|
|
8
|
+
export { type ConsentDialogTriggerVisibility, type UseConsentDialogTriggerOptions, type UseConsentDialogTriggerResult, useConsentDialogTrigger, } from './component-hooks/use-panel-trigger.js';
|
|
9
|
+
export { useConsentManager } from './component-hooks/use-manager.js';
|
|
10
|
+
export { type HeadlessConsentBannerAction, type HeadlessConsentBannerState, type HeadlessConsentDialogAction, type HeadlessConsentDialogState, type HeadlessConsentSurface, type HeadlessConsentSurfaceAction, type HeadlessConsentSurfaceState, type HeadlessConsentWriteAction, useHeadlessConsentUI, } from './component-hooks/use-headless-consent-ui.js';
|
|
11
|
+
export { useTranslations } from './component-hooks/use-translations.js';
|
|
12
|
+
export { useColorScheme } from './hooks/use-color-scheme.js';
|
|
13
|
+
export { useFocusTrap } from './hooks/use-focus-trap.js';
|
|
14
|
+
export type { ReactUIOptions } from './types/manager.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HeadlessIABBannerAction, HeadlessIABDialogAction, HeadlessIABPreferenceTab } from '@c15t/iab/headless';
|
|
2
|
-
import { useIABConsentManager } from './use-iab-manager';
|
|
2
|
+
import { useIABConsentManager } from './use-iab-manager.js';
|
|
3
3
|
export type { HeadlessIABBannerAction, HeadlessIABDialogAction, HeadlessIABPreferenceTab, };
|
|
4
4
|
export interface HeadlessIABBannerState {
|
|
5
5
|
isVisible: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ActiveUI, ConsentPresentation, TranslationConfig } from '@c15t/core';
|
|
2
2
|
export declare const useIABConsentManager: (overrides?: ConsentPresentation) => {
|
|
3
3
|
activeUI: ActiveUI;
|
|
4
|
-
iab: import("../iab-context").ReactIABState | null;
|
|
4
|
+
iab: import("../iab-context.js").ReactIABState | null;
|
|
5
5
|
model: import("@c15t/core").KernelModel | null;
|
|
6
6
|
policyBanner: {
|
|
7
7
|
allowedActions: import("@c15t/core").PresentationAction[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ThemeContextValue } from '../context/theme-context';
|
|
1
|
+
import type { ThemeContextValue } from '../context/theme-context.js';
|
|
2
2
|
export declare const useTheme: () => ThemeContextValue;
|
package/dist-types/hooks.d.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* observed through the selector hooks, whose subscription model handles
|
|
18
18
|
* invalidation correctly.
|
|
19
19
|
*/
|
|
20
|
-
import type { AllConsentNames, ConsentKernel, PromptPresentation, PreferencesPresentation, ConsentSnapshot, ConsentState, KernelActiveUI, KernelBranding, KernelIABState, KernelModel, KernelOverrides, KernelTranslations, KernelUser, LocationResponse, PolicyScopeMode } from '@c15t/core';
|
|
20
|
+
import type { AllConsentNames, ConsentKernel, PromptPresentation, PreferencesPresentation, ConsentSnapshot, ConsentState, KernelActiveUI, KernelBranding, KernelIABState, KernelModel, KernelOverrides, KernelTranslations, KernelUser, LocationResponse, PolicyScopeMode, ResolvedVendor, VendorChoice } from '@c15t/core';
|
|
21
21
|
/**
|
|
22
22
|
* Full snapshot accessor. Escape hatch for consumers that genuinely need
|
|
23
23
|
* multiple slices. Prefer narrow hooks for re-render isolation.
|
|
@@ -91,6 +91,33 @@ export declare const usePurposeConsent: (purposeId: number) => boolean;
|
|
|
91
91
|
export declare const useSpecialFeatureOptIn: (featureId: number) => boolean;
|
|
92
92
|
/** Latest TCF string. `null` until the IAB module encodes one. */
|
|
93
93
|
export declare const useTCString: () => string | null;
|
|
94
|
+
/**
|
|
95
|
+
* Vendors declared for vendor-level consent outside IAB, merged from the
|
|
96
|
+
* provider's `vendors` option, the backend and script slugs. Empty under an
|
|
97
|
+
* `iab` policy, where the TC string decides and vendor rows are not shown.
|
|
98
|
+
*/
|
|
99
|
+
export declare const useDeclaredVendors: () => readonly ResolvedVendor[];
|
|
100
|
+
/**
|
|
101
|
+
* The visitor's recorded vendor decision.
|
|
102
|
+
*
|
|
103
|
+
* @returns The decision, whose `denied` list may be empty after a bulk
|
|
104
|
+
* action lifted every denial, or `null` when no vendor decision was ever
|
|
105
|
+
* recorded.
|
|
106
|
+
*/
|
|
107
|
+
export declare const useVendorChoice: () => Readonly<VendorChoice> | null;
|
|
108
|
+
/**
|
|
109
|
+
* Whether one vendor is allowed: its category condition passes and the
|
|
110
|
+
* visitor has not turned it off.
|
|
111
|
+
*
|
|
112
|
+
* @param vendorId - Vendor slug as declared in `vendors` or on a script.
|
|
113
|
+
* @returns `false` while the vendor is denied outside `iab`, otherwise the
|
|
114
|
+
* result of its declared category condition. An undeclared id is `true`:
|
|
115
|
+
* nothing is known about its category, and a denial only exists for a vendor
|
|
116
|
+
* the visitor saw.
|
|
117
|
+
*/
|
|
118
|
+
export declare const useVendorAllowed: (vendorId: string) => boolean;
|
|
119
|
+
/** Register categories used by scripts, frames, or other integrations. */
|
|
120
|
+
export declare const useRegisterConsentCategories: () => (categories: readonly AllConsentNames[]) => void;
|
|
94
121
|
/**
|
|
95
122
|
* Sync mutation: apply overrides (country, region, language, GPC).
|
|
96
123
|
*/
|
package/dist-types/iab.d.ts
CHANGED
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
*
|
|
24
24
|
* @packageDocumentation
|
|
25
25
|
*/
|
|
26
|
-
export { IABConsentBanner, type IABConsentBannerProps, } from './components/iab-prompt';
|
|
27
|
-
export { IABConsentDialog, type IABConsentDialogProps, } from './components/iab-panel';
|
|
28
|
-
export { type HeadlessIABBannerAction, type HeadlessIABBannerState, type HeadlessIABDialogAction, type HeadlessIABDialogState, type HeadlessIABPreferenceTab, type UseHeadlessIABConsentUIResult, useHeadlessIABConsentUI, } from './hooks/use-headless-iab-consent-ui';
|
|
29
|
-
export { IABProvider } from './iab-context';
|
|
30
|
-
export type { IABProviderProps } from './iab-context';
|
|
26
|
+
export { IABConsentBanner, type IABConsentBannerProps, } from './components/iab-prompt/index.js';
|
|
27
|
+
export { IABConsentDialog, type IABConsentDialogProps, } from './components/iab-panel/index.js';
|
|
28
|
+
export { type HeadlessIABBannerAction, type HeadlessIABBannerState, type HeadlessIABDialogAction, type HeadlessIABDialogState, type HeadlessIABPreferenceTab, type UseHeadlessIABConsentUIResult, useHeadlessIABConsentUI, } from './hooks/use-headless-iab-consent-ui.js';
|
|
29
|
+
export { IABProvider } from './iab-context.js';
|
|
30
|
+
export type { IABProviderProps } from './iab-context.js';
|
package/dist-types/index.d.ts
CHANGED
|
@@ -33,29 +33,29 @@
|
|
|
33
33
|
*/
|
|
34
34
|
export type { ConsentKernel, ConsentSnapshot, ConsentState, HostedTransportOptions, InitContext, InitResponse, InitResult, KernelConfig, KernelEvent, KernelOverrides, KernelTransport, KernelUser, Listener, HostedModeOptions, ProviderTransportContext, ProviderTransportFactory, ProviderTransportKind, SavePayload, SaveResult, Unsubscribe, } from '@c15t/core';
|
|
35
35
|
export { createConsentKernel, custom, hosted } from '@c15t/core';
|
|
36
|
-
export type { OfflineModeOptions } from './transports/offline';
|
|
37
|
-
export { offline } from './transports/offline';
|
|
38
|
-
export { ConsentDialog, ConsentWidget } from './aggregate-components';
|
|
39
|
-
export type { ConsentBannerButton, ConsentBannerLayout, ConsentBannerProps, ConsentBannerRight, ConsentBannerRightLinkProps, ConsentBannerRightsProps, ConsentBannerSurface, } from './components/prompt';
|
|
40
|
-
export { ConsentBanner, type ConsentBannerCompoundComponent, useConsentBannerSurface, } from './components/prompt';
|
|
41
|
-
export type { ConsentDialogCompoundComponent, ConsentDialogProps, } from './components/panel';
|
|
42
|
-
export type { ConsentDialogLinkProps } from './components/panel-link';
|
|
43
|
-
export { ConsentDialogLink } from './components/panel-link';
|
|
44
|
-
export type { ConsentDialogTriggerProps, ConsentDialogTriggerToolbarAction, ConsentDialogTriggerToolbarPreferences, ConsentDialogTriggerToolbarProps, TriggerOrientation, } from './components/panel-trigger';
|
|
45
|
-
export { ConsentDialogTrigger, ConsentDialogTriggerToolbar, } from './components/panel-trigger';
|
|
46
|
-
export type { ConsentWidgetCompoundComponent, ConsentWidgetProps, } from './components/preferences';
|
|
47
|
-
export type { FrameProps } from './components/
|
|
48
|
-
export { Frame } from './components/
|
|
49
|
-
export type { ConsentDraftHandle, ConsentDraftProviderProps } from './draft';
|
|
50
|
-
export { ConsentDraftProvider, useConsentDraft } from './draft';
|
|
51
|
-
export { useConsentManager } from './component-hooks/use-manager';
|
|
52
|
-
export { useTranslations } from './component-hooks/use-translations';
|
|
53
|
-
export { useActiveUI, useBranding, useConsent, useConsents, useHasConsentPolicy, useHasConsentUI, useIABEnabled, useIABSnapshot, useIdentify, useInit, useLocation, useModel, useOverrides, usePromptPresentation, usePolicyCategories, usePreferencesPresentation, usePolicyScopeMode, usePurposeConsent, useSaveConsents, useSetActiveUI, useSetLanguage, useSetOverrides, useSnapshot, useSpecialFeatureOptIn, useTCString, useUser, useVendorConsent, } from './hooks';
|
|
54
|
-
export type { UseIframeBlockerOptions, UseNetworkBlockerOptions, UsePersistenceOptions, UseScriptLoaderOptions, } from './module-hooks';
|
|
55
|
-
export { useIframeBlocker, useNetworkBlocker, usePersistence, useScriptLoader, } from './module-hooks';
|
|
56
|
-
export type { ConsentProviderOptions, ConsentProviderCallbacks, ConsentProviderPrefetch, ConsentProviderProps, ExternalRuntimeProviderOptions, ExternalRuntimeProviderProps, OwnedRuntimeProviderProps, } from './provider';
|
|
57
|
-
export { ConsentProvider } from './provider';
|
|
58
|
-
export type { ReactUIOptions } from './types/manager';
|
|
59
|
-
export { defineTheme, type Theme } from './types/theme';
|
|
60
|
-
export { useExplicitChoice, useEffectivePermissions, usePromptRequirement, useNoticeDismissal, usePrivacySignals, useOptOutDirectives, usePolicyResolution, usePolicyRule, useRestrictions, useDismissNotice, } from './hooks';
|
|
36
|
+
export type { OfflineModeOptions } from './transports/offline.js';
|
|
37
|
+
export { offline } from './transports/offline.js';
|
|
38
|
+
export { ConsentDialog, ConsentWidget } from './aggregate-components.js';
|
|
39
|
+
export type { ConsentBannerButton, ConsentBannerLayout, ConsentBannerProps, ConsentBannerRight, ConsentBannerRightLinkProps, ConsentBannerRightsProps, ConsentBannerSurface, } from './components/prompt/index.js';
|
|
40
|
+
export { ConsentBanner, type ConsentBannerCompoundComponent, useConsentBannerSurface, } from './components/prompt/index.js';
|
|
41
|
+
export type { ConsentDialogCompoundComponent, ConsentDialogProps, } from './components/panel/index.js';
|
|
42
|
+
export type { ConsentDialogLinkProps } from './components/panel-link/index.js';
|
|
43
|
+
export { ConsentDialogLink } from './components/panel-link/index.js';
|
|
44
|
+
export type { ConsentDialogTriggerProps, ConsentDialogTriggerToolbarAction, ConsentDialogTriggerToolbarPreferences, ConsentDialogTriggerToolbarProps, TriggerOrientation, } from './components/panel-trigger/index.js';
|
|
45
|
+
export { ConsentDialogTrigger, ConsentDialogTriggerToolbar, } from './components/panel-trigger/index.js';
|
|
46
|
+
export type { ConsentWidgetCompoundComponent, ConsentWidgetProps, } from './components/preferences/index.js';
|
|
47
|
+
export type { ConsentGateProps, FrameProps } from './components/consent-gate/index.js';
|
|
48
|
+
export { ConsentGate, Frame } from './components/consent-gate/index.js';
|
|
49
|
+
export type { ConsentDraftHandle, ConsentDraftProviderProps, VendorDraftHandle, } from './draft.js';
|
|
50
|
+
export { ConsentDraftProvider, useConsentDraft, useVendorDraft } from './draft.js';
|
|
51
|
+
export { useConsentManager } from './component-hooks/use-manager.js';
|
|
52
|
+
export { useTranslations } from './component-hooks/use-translations.js';
|
|
53
|
+
export { useActiveUI, useBranding, useConsent, useConsents, useHasConsentPolicy, useHasConsentUI, useIABEnabled, useIABSnapshot, useIdentify, useInit, useLocation, useModel, useOverrides, usePromptPresentation, usePolicyCategories, usePreferencesPresentation, usePolicyScopeMode, usePurposeConsent, useSaveConsents, useSetActiveUI, useSetLanguage, useSetOverrides, useSnapshot, useSpecialFeatureOptIn, useTCString, useUser, useDeclaredVendors, useVendorAllowed, useVendorChoice, useVendorConsent, } from './hooks.js';
|
|
54
|
+
export type { UseIframeBlockerOptions, UseNetworkBlockerOptions, UsePersistenceOptions, UseScriptLoaderOptions, } from './module-hooks.js';
|
|
55
|
+
export { useIframeBlocker, useNetworkBlocker, usePersistence, useScriptLoader, } from './module-hooks.js';
|
|
56
|
+
export type { ConsentProviderOptions, ConsentProviderCallbacks, ConsentProviderPrefetch, ConsentProviderProps, ExternalRuntimeProviderOptions, ExternalRuntimeProviderProps, OwnedRuntimeProviderProps, } from './provider.js';
|
|
57
|
+
export { ConsentProvider } from './provider.js';
|
|
58
|
+
export type { ReactUIOptions } from './types/manager.js';
|
|
59
|
+
export { defineTheme, type Theme } from './types/theme/index.js';
|
|
60
|
+
export { useExplicitChoice, useEffectivePermissions, usePromptRequirement, useNoticeDismissal, usePrivacySignals, useOptOutDirectives, usePolicyResolution, usePolicyRule, useRestrictions, useDismissNotice, } from './hooks.js';
|
|
61
61
|
export type { ConsentPresentation, PromptPresentation, PreferencesPresentation, PresentationAction, PromptPosition, PromptVariant, ResolvedConsentPresentation, } from '@c15t/core';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { type IframeBlockerHandle, type UseIframeBlockerOptions, useIframeBlocker, } from './module-hooks/iframe-blocker';
|
|
2
|
-
export { type BlockedRequestInfo, type NetworkBlockerHandle, type NetworkBlockerRule, type UseNetworkBlockerOptions, useNetworkBlocker, } from './module-hooks/network-blocker';
|
|
3
|
-
export { type PersistenceHandle, type PersistenceOptions, type UsePersistenceOptions, usePersistence, } from './module-hooks/persistence';
|
|
4
|
-
export { type Script, type ScriptLoaderDebugEvent, type ScriptLoaderHandle, type UseScriptLoaderOptions, useScriptLoader, } from './module-hooks/script-loader';
|
|
1
|
+
export { type IframeBlockerHandle, type UseIframeBlockerOptions, useIframeBlocker, } from './module-hooks/iframe-blocker.js';
|
|
2
|
+
export { type BlockedRequestInfo, type NetworkBlockerHandle, type NetworkBlockerRule, type UseNetworkBlockerOptions, useNetworkBlocker, } from './module-hooks/network-blocker.js';
|
|
3
|
+
export { type PersistenceHandle, type PersistenceOptions, type UsePersistenceOptions, usePersistence, } from './module-hooks/persistence.js';
|
|
4
|
+
export { type Script, type ScriptLoaderDebugEvent, type ScriptLoaderHandle, type UseScriptLoaderOptions, useScriptLoader, } from './module-hooks/script-loader.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './components/panel-link';
|
|
1
|
+
export * from './components/panel-link/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './components/panel-trigger';
|
|
1
|
+
export * from './components/panel-trigger/index.js';
|
package/dist-types/panel.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './components/panel';
|
|
1
|
+
export * from './components/panel/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './components/preferences';
|
|
1
|
+
export * from './components/preferences/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../components/shared/ui/accordion';
|
|
1
|
+
export * from '../components/shared/ui/accordion/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../components/shared/ui/button';
|
|
1
|
+
export * from '../components/shared/ui/button/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../components/shared/ui/collapsible';
|
|
1
|
+
export * from '../components/shared/ui/collapsible/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../components/shared/ui/dialog';
|
|
1
|
+
export * from '../components/shared/ui/dialog/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../components/shared/ui/preference-item';
|
|
1
|
+
export * from '../components/shared/ui/preference-item/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../components/shared/ui/switch';
|
|
1
|
+
export * from '../components/shared/ui/switch/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../components/shared/ui/tabs';
|
|
1
|
+
export * from '../components/shared/ui/tabs/index.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * as Accordion from './components/shared/ui/accordion';
|
|
2
|
-
export * as Button from './components/shared/ui/button';
|
|
3
|
-
export * as Collapsible from './components/shared/ui/collapsible';
|
|
4
|
-
export * as Dialog from './components/shared/ui/dialog';
|
|
5
|
-
export * as PreferenceItem from './components/shared/ui/preference-item';
|
|
6
|
-
export * as Switch from './components/shared/ui/switch';
|
|
7
|
-
export * as Tabs from './components/shared/ui/tabs';
|
|
1
|
+
export * as Accordion from './components/shared/ui/accordion/index.js';
|
|
2
|
+
export * as Button from './components/shared/ui/button/index.js';
|
|
3
|
+
export * as Collapsible from './components/shared/ui/collapsible/index.js';
|
|
4
|
+
export * as Dialog from './components/shared/ui/dialog/index.js';
|
|
5
|
+
export * as PreferenceItem from './components/shared/ui/preference-item/index.js';
|
|
6
|
+
export * as Switch from './components/shared/ui/switch/index.js';
|
|
7
|
+
export * as Tabs from './components/shared/ui/tabs/index.js';
|
package/dist-types/prompt.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './components/prompt';
|
|
1
|
+
export * from './components/prompt/index.js';
|
package/dist-types/provider.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { AllConsentNames, ClearOnRevocationConfig, ConsentPresentation, Callbacks, I18nConfig, KernelConfig, KernelOverrides, KernelUser, LegalLinks, ProviderTransportFactory, StorageConfig, User } from '@c15t/core';
|
|
1
|
+
import type { AllConsentNames, ClearOnRevocationConfig, ConsentPresentation, Callbacks, I18nConfig, KernelConfig, KernelOverrides, KernelUser, LegalLinks, ProviderTransportFactory, StorageConfig, User, Vendor } from '@c15t/core';
|
|
2
2
|
import type { Script } from '@c15t/core/modules/script-loader';
|
|
3
3
|
import type { ConsentRuntime } from '@c15t/core/runtime';
|
|
4
4
|
import type { ReactNode } from 'react';
|
|
5
|
-
import type { UseNetworkBlockerOptions, UsePersistenceOptions, UseScriptLoaderOptions } from './module-hooks';
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
5
|
+
import type { UseNetworkBlockerOptions, UsePersistenceOptions, UseScriptLoaderOptions } from './module-hooks.js';
|
|
6
|
+
import type { UseIframeBlockerOptions } from './module-hooks/iframe-blocker.js';
|
|
7
|
+
import type { ReactUIOptions } from './types/manager.js';
|
|
8
|
+
import type { ReactComponentSlots } from './types/slots.js';
|
|
8
9
|
/** Events emitted by the mounted provider without snapshot-derived consent aliases. */
|
|
9
10
|
export type ConsentProviderCallbacks = Pick<Callbacks, 'onChoiceRecorded' | 'onPermissionsChanged' | 'onError'>;
|
|
10
11
|
/** Prepared policy and records; legacy consent projections are not provider inputs. */
|
|
@@ -83,10 +84,21 @@ export interface ConsentProviderOptions extends Pick<ReactUIOptions, 'colorSchem
|
|
|
83
84
|
*/
|
|
84
85
|
clearOnRevocation?: ClearOnRevocationConfig;
|
|
85
86
|
scripts?: Script[];
|
|
87
|
+
/**
|
|
88
|
+
* Vendors offered for vendor-level consent outside IAB. Each sits inside a
|
|
89
|
+
* category; a visitor can grant the category and still turn one vendor
|
|
90
|
+
* off. Scripts, network rules and iframes name a vendor through `vendor`
|
|
91
|
+
* or `data-vendor`. Merged with vendors the backend returns and with slugs
|
|
92
|
+
* found on scripts and rules; presentation declared here wins.
|
|
93
|
+
*/
|
|
94
|
+
vendors?: Vendor[];
|
|
86
95
|
scriptLoader?: UseScriptLoaderOptions;
|
|
87
96
|
networkBlocker?: UseNetworkBlockerOptions | false;
|
|
97
|
+
/** Discover and gate DOM iframes with data-category. Enabled by default. */
|
|
98
|
+
iframeBlocker?: UseIframeBlockerOptions | false;
|
|
88
99
|
persistence?: boolean | UsePersistenceOptions;
|
|
89
100
|
i18n?: Partial<I18nConfig>;
|
|
101
|
+
/** Categories to offer alongside discovered integration categories, within policy scope. */
|
|
90
102
|
consentCategories?: AllConsentNames[];
|
|
91
103
|
/** Per-component slot attribute overrides (shared contract with @c15t/vue). */
|
|
92
104
|
components?: ReactComponentSlots;
|
|
@@ -104,8 +116,13 @@ export interface ConsentProviderOptions extends Pick<ReactUIOptions, 'colorSchem
|
|
|
104
116
|
* Everything the component tree still owns — theme, slots, legal links —
|
|
105
117
|
* is unchanged.
|
|
106
118
|
*/
|
|
107
|
-
export type ExternalRuntimeProviderOptions = Omit<ConsentProviderOptions, 'mode'> & {
|
|
119
|
+
export type ExternalRuntimeProviderOptions = Omit<ConsentProviderOptions, 'mode' | 'vendors'> & {
|
|
108
120
|
mode?: ConsentProviderOptions['mode'];
|
|
121
|
+
/**
|
|
122
|
+
* Not accepted here: the runtime owner declares vendors through
|
|
123
|
+
* `createConsentRuntime({ vendors })`, and the kernel carries them.
|
|
124
|
+
*/
|
|
125
|
+
vendors?: never;
|
|
109
126
|
};
|
|
110
127
|
/** The provider builds and owns its own kernel. */
|
|
111
128
|
export interface OwnedRuntimeProviderProps {
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
*
|
|
25
25
|
* @packageDocumentation
|
|
26
26
|
*/
|
|
27
|
-
export { fetchSSRData } from './fetch-ssr-data';
|
|
28
|
-
export { extractRelevantHeaders } from './headers';
|
|
29
|
-
export { createSSRInitCacheKey } from './init-cache-key';
|
|
30
|
-
export { normalizeBackendURL, validateBackendURL } from './normalize-url';
|
|
31
|
-
export type { FetchSSRDataOptions, FetchSSRDataOptionsBase, FetchSSRDataResult, } from './types';
|
|
27
|
+
export { fetchSSRData } from './fetch-ssr-data.js';
|
|
28
|
+
export { extractRelevantHeaders } from './headers.js';
|
|
29
|
+
export { createSSRInitCacheKey } from './init-cache-key.js';
|
|
30
|
+
export { normalizeBackendURL, validateBackendURL } from './normalize-url.js';
|
|
31
|
+
export type { FetchSSRDataOptions, FetchSSRDataOptionsBase, FetchSSRDataResult, } from './types.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { ThemeContextValue } from './context/theme-context';
|
|
3
|
-
import type { V3UIConfigValue } from './ui-config-context';
|
|
2
|
+
import type { ThemeContextValue } from './context/theme-context.js';
|
|
3
|
+
import type { V3UIConfigValue } from './ui-config-context.js';
|
|
4
4
|
interface V3ThemeProviderProps {
|
|
5
5
|
themeConfig: ThemeContextValue;
|
|
6
6
|
uiConfig: V3UIConfigValue;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './manager';
|
|
2
|
-
export * from './slots';
|
|
3
|
-
export * from './theme';
|
|
1
|
+
export * from './manager.js';
|
|
2
|
+
export * from './slots.js';
|
|
3
|
+
export * from './theme/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './style-types';
|
|
1
|
+
export * from './style-types.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LegalLinks, ConsentPresentation } from '@c15t/core';
|
|
2
|
-
import type { ReactComponentSlots } from './types/slots';
|
|
2
|
+
import type { ReactComponentSlots } from './types/slots.js';
|
|
3
3
|
export interface V3UIConfigValue {
|
|
4
4
|
components?: ReactComponentSlots;
|
|
5
5
|
presentation?: ConsentPresentation;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Share an on-demand module across exports and intent preloading. Ready client
|
|
4
|
+
* retries run synchronously; Suspense retains server rendering and hydration.
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare const createDeferredModule: <ModuleType>(importModule: () => Promise<ModuleType>) => {
|
|
9
|
+
component<Props extends object>(select: (module: ModuleType) => ComponentType<Props>): ComponentType<Props>;
|
|
10
|
+
preload(): Promise<void>;
|
|
11
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './cn';
|
|
2
|
-
export * from './default-translation-config';
|
|
3
|
-
export * from './merge-styles';
|
|
4
|
-
export * from './theme-utils';
|
|
1
|
+
export * from './cn.js';
|
|
2
|
+
export * from './default-translation-config.js';
|
|
3
|
+
export * from './merge-styles.js';
|
|
4
|
+
export * from './theme-utils.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ConsentComponentSlotKey } from '@c15t/schema/config';
|
|
2
2
|
import type { ClassValue } from '@c15t/ui/utils';
|
|
3
|
-
import type { ReactComponentSlots, ReactSlotProps } from '../types/slots';
|
|
4
|
-
import type { CSSPropertiesWithVars } from '../types/theme';
|
|
3
|
+
import type { ReactComponentSlots, ReactSlotProps } from '../types/slots.js';
|
|
4
|
+
import type { CSSPropertiesWithVars } from '../types/theme/index.js';
|
|
5
5
|
type MergeSlotPropsInput = ReactSlotProps & {
|
|
6
6
|
baseClassName?: ClassValue;
|
|
7
7
|
noStyle?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ClassNameStyle, ThemeValue } from '../types/theme';
|
|
1
|
+
import type { ClassNameStyle, ThemeValue } from '../types/theme/index.js';
|
|
2
2
|
/**
|
|
3
3
|
* Merges two styles objects, handling theme values and style properties.
|
|
4
4
|
* This React version uses React-specific types but uses the core logic from @c15t/ui.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Handles token-to-CSS variable conversion and dark mode overrides.
|
|
4
4
|
*/
|
|
5
5
|
import type { ThemeCSSVariables } from '@c15t/ui/theme';
|
|
6
|
-
import type { Theme } from '../types/theme/style-types';
|
|
6
|
+
import type { Theme } from '../types/theme/style-types.js';
|
|
7
7
|
/**
|
|
8
8
|
* Default design tokens for the v2 theme system.
|
|
9
9
|
*/
|
package/dist-types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "3.0.0-alpha.
|
|
1
|
+
export declare const version = "3.0.0-alpha.2";
|