@c15t/react 0.0.1-rc.10 → 0.0.1-rc.12
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/dist/components/consent-manager-dialog/__tests__/styles.spec.cjs +4 -10
- package/dist/components/consent-manager-dialog/__tests__/utils.cjs +7 -4
- package/dist/components/consent-manager-dialog/__tests__/utils.d.ts.map +1 -1
- package/dist/components/consent-manager-dialog/__tests__/utils.js +5 -0
- package/dist/components/consent-manager-dialog/atoms/dialog-card.cjs +12 -18
- package/dist/components/consent-manager-dialog/atoms/dialog-card.d.ts.map +1 -1
- package/dist/components/consent-manager-dialog/atoms/overlay.cjs +6 -12
- package/dist/components/consent-manager-dialog/consent-manager-dialog.cjs +4 -10
- package/dist/components/consent-manager-dialog/consent-manager-dialog.module.cjs +2 -4
- package/dist/components/consent-manager-dialog/consent-manager-dialog_module.css +5 -5
- package/dist/components/consent-manager-dialog/index.cjs +11 -13
- package/dist/components/consent-manager-widget/__tests__/styles.spec.cjs +4 -10
- package/dist/components/consent-manager-widget/__tests__/utils.cjs +7 -4
- package/dist/components/consent-manager-widget/__tests__/utils.d.ts.map +1 -1
- package/dist/components/consent-manager-widget/__tests__/utils.js +5 -0
- package/dist/components/consent-manager-widget/atoms/accordion.cjs +14 -20
- package/dist/components/consent-manager-widget/atoms/accordion.d.ts.map +1 -1
- package/dist/components/consent-manager-widget/atoms/button.cjs +7 -9
- package/dist/components/consent-manager-widget/atoms/footer.cjs +7 -13
- package/dist/components/consent-manager-widget/atoms/logo.cjs +2 -4
- package/dist/components/consent-manager-widget/atoms/logo.d.ts.map +1 -1
- package/dist/components/consent-manager-widget/atoms/root.cjs +2 -4
- package/dist/components/consent-manager-widget/consent-manager-widget.cjs +2 -4
- package/dist/components/consent-manager-widget/consent-manager-widget.d.ts.map +1 -1
- package/dist/components/consent-manager-widget/consent-manager-widget.module.cjs +2 -4
- package/dist/components/consent-manager-widget/consent-manager-widget_module.css +13 -13
- package/dist/components/consent-manager-widget/index.cjs +23 -25
- package/dist/components/cookie-banner/__tests__/styles.spec.cjs +4 -10
- package/dist/components/cookie-banner/__tests__/utils.cjs +7 -4
- package/dist/components/cookie-banner/__tests__/utils.d.ts.map +1 -1
- package/dist/components/cookie-banner/__tests__/utils.js +5 -0
- package/dist/components/cookie-banner/atoms/overlay.cjs +4 -10
- package/dist/components/cookie-banner/atoms/root.cjs +4 -10
- package/dist/components/cookie-banner/components.cjs +15 -21
- package/dist/components/cookie-banner/cookie-banner.cjs +2 -4
- package/dist/components/cookie-banner/cookie-banner.module.cjs +2 -4
- package/dist/components/cookie-banner/cookie-banner_module.css +7 -7
- package/dist/components/cookie-banner/error-boundary.cjs +2 -4
- package/dist/components/cookie-banner/error-boundary.d.ts +1 -1
- package/dist/components/cookie-banner/index.cjs +17 -19
- package/dist/components/shared/libs/recursive-clone-children.cjs +2 -4
- package/dist/components/shared/primitives/box.cjs +3 -5
- package/dist/components/shared/primitives/box.d.ts.map +1 -1
- package/dist/components/shared/primitives/box.js +1 -1
- package/dist/components/shared/primitives/button.cjs +54 -6
- package/dist/components/shared/primitives/button.d.ts.map +1 -1
- package/dist/components/shared/primitives/button.js +52 -2
- package/dist/components/shared/ui/accordion/accordion.cjs +6 -12
- package/dist/components/shared/ui/accordion/accordion.d.ts.map +1 -1
- package/dist/components/shared/ui/accordion/accordion.module.cjs +2 -4
- package/dist/components/shared/ui/accordion/accordion_module.css +9 -9
- package/dist/components/shared/ui/accordion/index.cjs +4 -10
- package/dist/components/shared/ui/button/button.cjs +6 -12
- package/dist/components/shared/ui/button/button.module.cjs +2 -4
- package/dist/components/shared/ui/button/button_module.css +17 -17
- package/dist/components/shared/ui/button/index.cjs +4 -10
- package/dist/components/shared/ui/icon.cjs +2 -4
- package/dist/components/shared/ui/icon.d.ts.map +1 -1
- package/dist/components/shared/ui/logo.cjs +9 -53
- package/dist/components/shared/ui/logo.d.ts.map +1 -1
- package/dist/components/shared/ui/logo.js +7 -49
- package/dist/components/shared/ui/switch/index.cjs +4 -10
- package/dist/components/shared/ui/switch/switch.cjs +4 -10
- package/dist/components/shared/ui/switch/switch.module.cjs +2 -4
- package/dist/components/shared/ui/switch/switch_module.css +11 -11
- package/dist/context/consent-manager-context.cjs +3 -5
- package/dist/context/consent-manager-context.d.ts +29 -10
- package/dist/context/consent-manager-context.d.ts.map +1 -1
- package/dist/context/consent-manager-context.js +1 -1
- package/dist/context/theme-context.cjs +9 -5
- package/dist/context/theme-context.d.ts +1 -1
- package/dist/context/theme-context.d.ts.map +1 -1
- package/dist/context/theme-context.js +7 -1
- package/dist/hooks/index.cjs +4 -10
- package/dist/hooks/use-color-scheme.cjs +64 -0
- package/dist/hooks/use-color-scheme.d.ts +16 -0
- package/dist/hooks/use-color-scheme.d.ts.map +1 -0
- package/dist/hooks/use-color-scheme.js +32 -0
- package/dist/hooks/use-consent-client.cjs +41 -0
- package/dist/hooks/use-consent-client.d.ts +26 -0
- package/dist/hooks/use-consent-client.d.ts.map +1 -0
- package/dist/hooks/use-consent-client.js +9 -0
- package/dist/hooks/use-consent-manager.cjs +7 -5
- package/dist/hooks/use-consent-manager.d.ts +7 -1
- package/dist/hooks/use-consent-manager.d.ts.map +1 -1
- package/dist/hooks/use-consent-manager.js +5 -1
- package/dist/hooks/use-focus-trap.cjs +2 -4
- package/dist/hooks/use-scroll-lock.cjs +2 -4
- package/dist/hooks/use-theme.cjs +2 -4
- package/dist/hooks/use-translations.cjs +2 -4
- package/dist/index.cjs +44 -26
- package/dist/index.d.ts +8 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -4
- package/dist/providers/consent-manager-provider.cjs +14 -10
- package/dist/providers/consent-manager-provider.d.ts +6 -2
- package/dist/providers/consent-manager-provider.d.ts.map +1 -1
- package/dist/providers/consent-manager-provider.js +12 -6
- package/dist/types/consent-manager.d.ts +62 -83
- package/dist/types/consent-manager.d.ts.map +1 -1
- package/dist/types/theme/index.cjs +4 -10
- package/dist/utils/cn.cjs +4 -10
- package/dist/utils/merge-styles.cjs +2 -4
- package/dist/utils/translations.cjs +2 -4
- package/dist/utils/use-styles.cjs +2 -4
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
export { CookieBanner } from './components/cookie-banner/cookie-banner';
|
|
2
2
|
export type { CookieBannerProps } from './components/cookie-banner/cookie-banner';
|
|
3
|
-
export type { CookieBannerTheme } from './components/cookie-banner/theme';
|
|
4
|
-
export { ConsentManagerDialog } from './components/consent-manager-dialog/consent-manager-dialog';
|
|
5
|
-
export type { ConsentManagerDialogProps } from './components/consent-manager-dialog/consent-manager-dialog';
|
|
6
|
-
export type { ConsentManagerDialogTheme } from './components/consent-manager-dialog/theme';
|
|
7
3
|
export { ConsentManagerWidget } from './components/consent-manager-widget/consent-manager-widget';
|
|
8
4
|
export type { ConsentManagerWidgetProps } from './components/consent-manager-widget/types';
|
|
9
|
-
export
|
|
10
|
-
export
|
|
5
|
+
export { ConsentManagerDialog } from './components/consent-manager-dialog/consent-manager-dialog';
|
|
6
|
+
export type { ConsentManagerDialogProps } from './components/consent-manager-dialog/consent-manager-dialog';
|
|
11
7
|
export { ConsentManagerProvider } from './providers/consent-manager-provider';
|
|
12
|
-
export
|
|
8
|
+
export { useConsentManager } from './hooks/use-consent-manager';
|
|
9
|
+
export { useTranslations } from './hooks/use-translations';
|
|
10
|
+
export { useColorScheme } from './hooks/use-color-scheme';
|
|
11
|
+
export { useConsentClient } from './hooks/use-consent-client';
|
|
12
|
+
export { createConsentClient, type c15tClient, type c15tClientOptions, } from 'c15t';
|
|
13
13
|
export type { ConsentManagerProviderProps } from './types/consent-manager';
|
|
14
|
-
export
|
|
15
|
-
export type { CallbackFunction, Callbacks, AllConsentNames, ConsentType, ConsentState, ComplianceRegion, ComplianceSettings, PrivacySettings, HasConsentedProps, } from 'c15t';
|
|
14
|
+
export * from './utils/translations';
|
|
16
15
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,YAAY,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAClF,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,YAAY,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,4DAA4D,CAAC;AAClG,YAAY,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AAC3F,OAAO,EAAE,oBAAoB,EAAE,MAAM,4DAA4D,CAAC;AAClG,YAAY,EAAE,yBAAyB,EAAE,MAAM,4DAA4D,CAAC;AAC5G,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAG9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAG9D,OAAO,EACN,mBAAmB,EACnB,KAAK,UAAU,EACf,KAAK,iBAAiB,GACtB,MAAM,MAAM,CAAC;AAGd,YAAY,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAG3E,cAAc,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import * as __WEBPACK_EXTERNAL_MODULE__components_cookie_banner_cookie_banner_js_aba0c776__ from "./components/cookie-banner/cookie-banner.js";
|
|
2
|
-
import * as __WEBPACK_EXTERNAL_MODULE__components_consent_manager_dialog_consent_manager_dialog_js_d74113dd__ from "./components/consent-manager-dialog/consent-manager-dialog.js";
|
|
3
2
|
import * as __WEBPACK_EXTERNAL_MODULE__components_consent_manager_widget_consent_manager_widget_js_080fb908__ from "./components/consent-manager-widget/consent-manager-widget.js";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__components_consent_manager_dialog_consent_manager_dialog_js_d74113dd__ from "./components/consent-manager-dialog/consent-manager-dialog.js";
|
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE__providers_consent_manager_provider_js_7459f585__ from "./providers/consent-manager-provider.js";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__hooks_use_consent_manager_js_2b895421__ from "./hooks/use-consent-manager.js";
|
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE__hooks_use_translations_js_78932b91__ from "./hooks/use-translations.js";
|
|
7
|
+
import * as __WEBPACK_EXTERNAL_MODULE__hooks_use_color_scheme_js_41dc75de__ from "./hooks/use-color-scheme.js";
|
|
8
|
+
import * as __WEBPACK_EXTERNAL_MODULE__hooks_use_consent_client_js_2afe8c6b__ from "./hooks/use-consent-client.js";
|
|
5
9
|
import * as __WEBPACK_EXTERNAL_MODULE_c15t__ from "c15t";
|
|
6
|
-
export * from "./
|
|
10
|
+
export * from "./utils/translations.js";
|
|
7
11
|
var __webpack_exports__ConsentManagerDialog = __WEBPACK_EXTERNAL_MODULE__components_consent_manager_dialog_consent_manager_dialog_js_d74113dd__.ConsentManagerDialog;
|
|
8
12
|
var __webpack_exports__ConsentManagerProvider = __WEBPACK_EXTERNAL_MODULE__providers_consent_manager_provider_js_7459f585__.ConsentManagerProvider;
|
|
9
13
|
var __webpack_exports__ConsentManagerWidget = __WEBPACK_EXTERNAL_MODULE__components_consent_manager_widget_consent_manager_widget_js_080fb908__.ConsentManagerWidget;
|
|
10
14
|
var __webpack_exports__CookieBanner = __WEBPACK_EXTERNAL_MODULE__components_cookie_banner_cookie_banner_js_aba0c776__.CookieBanner;
|
|
11
|
-
var
|
|
12
|
-
|
|
15
|
+
var __webpack_exports__createConsentClient = __WEBPACK_EXTERNAL_MODULE_c15t__.createConsentClient;
|
|
16
|
+
var __webpack_exports__useColorScheme = __WEBPACK_EXTERNAL_MODULE__hooks_use_color_scheme_js_41dc75de__.useColorScheme;
|
|
17
|
+
var __webpack_exports__useConsentClient = __WEBPACK_EXTERNAL_MODULE__hooks_use_consent_client_js_2afe8c6b__.useConsentClient;
|
|
18
|
+
var __webpack_exports__useConsentManager = __WEBPACK_EXTERNAL_MODULE__hooks_use_consent_manager_js_2b895421__.useConsentManager;
|
|
19
|
+
var __webpack_exports__useTranslations = __WEBPACK_EXTERNAL_MODULE__hooks_use_translations_js_78932b91__.useTranslations;
|
|
20
|
+
export { __webpack_exports__ConsentManagerDialog as ConsentManagerDialog, __webpack_exports__ConsentManagerProvider as ConsentManagerProvider, __webpack_exports__ConsentManagerWidget as ConsentManagerWidget, __webpack_exports__CookieBanner as CookieBanner, __webpack_exports__createConsentClient as createConsentClient, __webpack_exports__useColorScheme as useColorScheme, __webpack_exports__useConsentClient as useConsentClient, __webpack_exports__useConsentManager as useConsentManager, __webpack_exports__useTranslations as useTranslations };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_require__ = {};
|
|
4
4
|
(()=>{
|
|
5
|
-
__webpack_require__.d =
|
|
5
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
6
6
|
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: definition[key]
|
|
@@ -10,9 +10,7 @@ var __webpack_require__ = {};
|
|
|
10
10
|
};
|
|
11
11
|
})();
|
|
12
12
|
(()=>{
|
|
13
|
-
__webpack_require__.o =
|
|
14
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
15
|
-
};
|
|
13
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
16
14
|
})();
|
|
17
15
|
(()=>{
|
|
18
16
|
__webpack_require__.r = function(exports1) {
|
|
@@ -35,7 +33,8 @@ const external_react_namespaceObject = require("react");
|
|
|
35
33
|
const consent_manager_context_cjs_namespaceObject = require("../context/consent-manager-context.cjs");
|
|
36
34
|
const translations_cjs_namespaceObject = require("../utils/translations.cjs");
|
|
37
35
|
const theme_context_cjs_namespaceObject = require("../context/theme-context.cjs");
|
|
38
|
-
|
|
36
|
+
const use_color_scheme_cjs_namespaceObject = require("../hooks/use-color-scheme.cjs");
|
|
37
|
+
function ConsentManagerProvider({ children, initialGdprTypes, initialComplianceSettings, namespace = 'c15tStore', noStyle = false, translationConfig, trackingBlockerConfig, client, theme, disableAnimation = false, scrollLock = false, trapFocus = true, colorScheme = 'system' }) {
|
|
39
38
|
const preparedTranslationConfig = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
40
39
|
const mergedConfig = (0, translations_cjs_namespaceObject.mergeTranslationConfigs)(external_c15t_namespaceObject.defaultTranslationConfig, translationConfig);
|
|
41
40
|
const defaultLanguage = (0, translations_cjs_namespaceObject.detectBrowserLanguage)(mergedConfig.translations, mergedConfig.defaultLanguage, mergedConfig.disableAutoLanguageSwitch);
|
|
@@ -47,15 +46,17 @@ function ConsentManagerProvider({ children, initialGdprTypes, initialComplianceS
|
|
|
47
46
|
translationConfig
|
|
48
47
|
]);
|
|
49
48
|
const store = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
50
|
-
const
|
|
49
|
+
const storeConfig = {
|
|
51
50
|
trackingBlockerConfig
|
|
52
|
-
}
|
|
51
|
+
};
|
|
52
|
+
const store = (0, external_c15t_namespaceObject.createConsentManagerStore)(client, namespace, storeConfig);
|
|
53
53
|
store.getState().setTranslationConfig(preparedTranslationConfig);
|
|
54
54
|
return store;
|
|
55
55
|
}, [
|
|
56
56
|
namespace,
|
|
57
57
|
preparedTranslationConfig,
|
|
58
|
-
trackingBlockerConfig
|
|
58
|
+
trackingBlockerConfig,
|
|
59
|
+
client
|
|
59
60
|
]);
|
|
60
61
|
const [state, setState] = (0, external_react_namespaceObject.useState)(store.getState());
|
|
61
62
|
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
@@ -77,10 +78,12 @@ function ConsentManagerProvider({ children, initialGdprTypes, initialComplianceS
|
|
|
77
78
|
]);
|
|
78
79
|
const contextValue = (0, external_react_namespaceObject.useMemo)(()=>({
|
|
79
80
|
state,
|
|
80
|
-
store
|
|
81
|
+
store,
|
|
82
|
+
client
|
|
81
83
|
}), [
|
|
82
84
|
state,
|
|
83
|
-
store
|
|
85
|
+
store,
|
|
86
|
+
client
|
|
84
87
|
]);
|
|
85
88
|
const themeContextValue = (0, external_react_namespaceObject.useMemo)(()=>({
|
|
86
89
|
theme,
|
|
@@ -95,6 +98,7 @@ function ConsentManagerProvider({ children, initialGdprTypes, initialComplianceS
|
|
|
95
98
|
scrollLock,
|
|
96
99
|
trapFocus
|
|
97
100
|
]);
|
|
101
|
+
(0, use_color_scheme_cjs_namespaceObject.useColorScheme)(colorScheme);
|
|
98
102
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(consent_manager_context_cjs_namespaceObject.ConsentStateContext.Provider, {
|
|
99
103
|
value: contextValue,
|
|
100
104
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(theme_context_cjs_namespaceObject.GlobalThemeContext.Provider, {
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import type { ConsentManagerProviderProps } from '../types/consent-manager';
|
|
2
|
+
/**
|
|
3
|
+
* @packageDocumentation
|
|
4
|
+
* Provider component for consent management functionality.
|
|
5
|
+
*/
|
|
2
6
|
/**
|
|
3
7
|
* Provider component for consent management functionality.
|
|
4
8
|
*
|
|
5
9
|
* @remarks
|
|
6
10
|
* This component initializes and manages the consent management system, including:
|
|
7
11
|
* - Setting up the consent store with initial configuration
|
|
12
|
+
* - Using the provided API client instance
|
|
8
13
|
* - Detecting user's region for compliance
|
|
9
14
|
* - Managing consent state updates
|
|
10
15
|
* - Providing access to consent management throughout the app
|
|
11
|
-
* - Injecting default styles (unless noStyle is true)
|
|
12
16
|
*
|
|
13
17
|
* @public
|
|
14
18
|
*/
|
|
15
|
-
export declare function ConsentManagerProvider({ children, initialGdprTypes, initialComplianceSettings, namespace, noStyle, translationConfig, trackingBlockerConfig, theme, disableAnimation, scrollLock, trapFocus, }: ConsentManagerProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function ConsentManagerProvider({ children, initialGdprTypes, initialComplianceSettings, namespace, noStyle, translationConfig, trackingBlockerConfig, client, theme, disableAnimation, scrollLock, trapFocus, colorScheme, }: ConsentManagerProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
16
20
|
//# sourceMappingURL=consent-manager-provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent-manager-provider.d.ts","sourceRoot":"","sources":["../../src/providers/consent-manager-provider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"consent-manager-provider.d.ts","sourceRoot":"","sources":["../../src/providers/consent-manager-provider.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAQ5E;;;GAGG;AAEH;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CAAC,EACtC,QAAQ,EACR,gBAAgB,EAChB,yBAAyB,EACzB,SAAuB,EACvB,OAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,MAAM,EACN,KAAK,EACL,gBAAwB,EACxB,UAAkB,EAClB,SAAgB,EAChB,WAAsB,GACtB,EAAE,2BAA2B,2CAmG7B"}
|
|
@@ -5,7 +5,8 @@ import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE__context_consent_manager_context_js_ee8f06d2__ from "../context/consent-manager-context.js";
|
|
6
6
|
import * as __WEBPACK_EXTERNAL_MODULE__utils_translations_js_c2629c1f__ from "../utils/translations.js";
|
|
7
7
|
import * as __WEBPACK_EXTERNAL_MODULE__context_theme_context_js_fbb05439__ from "../context/theme-context.js";
|
|
8
|
-
|
|
8
|
+
import * as __WEBPACK_EXTERNAL_MODULE__hooks_use_color_scheme_js_939e374b__ from "../hooks/use-color-scheme.js";
|
|
9
|
+
function ConsentManagerProvider({ children, initialGdprTypes, initialComplianceSettings, namespace = 'c15tStore', noStyle = false, translationConfig, trackingBlockerConfig, client, theme, disableAnimation = false, scrollLock = false, trapFocus = true, colorScheme = 'system' }) {
|
|
9
10
|
const preparedTranslationConfig = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
10
11
|
const mergedConfig = (0, __WEBPACK_EXTERNAL_MODULE__utils_translations_js_c2629c1f__.mergeTranslationConfigs)(__WEBPACK_EXTERNAL_MODULE_c15t__.defaultTranslationConfig, translationConfig);
|
|
11
12
|
const defaultLanguage = (0, __WEBPACK_EXTERNAL_MODULE__utils_translations_js_c2629c1f__.detectBrowserLanguage)(mergedConfig.translations, mergedConfig.defaultLanguage, mergedConfig.disableAutoLanguageSwitch);
|
|
@@ -17,15 +18,17 @@ function ConsentManagerProvider({ children, initialGdprTypes, initialComplianceS
|
|
|
17
18
|
translationConfig
|
|
18
19
|
]);
|
|
19
20
|
const store = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
20
|
-
const
|
|
21
|
+
const storeConfig = {
|
|
21
22
|
trackingBlockerConfig
|
|
22
|
-
}
|
|
23
|
+
};
|
|
24
|
+
const store = (0, __WEBPACK_EXTERNAL_MODULE_c15t__.createConsentManagerStore)(client, namespace, storeConfig);
|
|
23
25
|
store.getState().setTranslationConfig(preparedTranslationConfig);
|
|
24
26
|
return store;
|
|
25
27
|
}, [
|
|
26
28
|
namespace,
|
|
27
29
|
preparedTranslationConfig,
|
|
28
|
-
trackingBlockerConfig
|
|
30
|
+
trackingBlockerConfig,
|
|
31
|
+
client
|
|
29
32
|
]);
|
|
30
33
|
const [state, setState] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(store.getState());
|
|
31
34
|
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
@@ -47,10 +50,12 @@ function ConsentManagerProvider({ children, initialGdprTypes, initialComplianceS
|
|
|
47
50
|
]);
|
|
48
51
|
const contextValue = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>({
|
|
49
52
|
state,
|
|
50
|
-
store
|
|
53
|
+
store,
|
|
54
|
+
client
|
|
51
55
|
}), [
|
|
52
56
|
state,
|
|
53
|
-
store
|
|
57
|
+
store,
|
|
58
|
+
client
|
|
54
59
|
]);
|
|
55
60
|
const themeContextValue = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>({
|
|
56
61
|
theme,
|
|
@@ -65,6 +70,7 @@ function ConsentManagerProvider({ children, initialGdprTypes, initialComplianceS
|
|
|
65
70
|
scrollLock,
|
|
66
71
|
trapFocus
|
|
67
72
|
]);
|
|
73
|
+
(0, __WEBPACK_EXTERNAL_MODULE__hooks_use_color_scheme_js_939e374b__.useColorScheme)(colorScheme);
|
|
68
74
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__context_consent_manager_context_js_ee8f06d2__.ConsentStateContext.Provider, {
|
|
69
75
|
value: contextValue,
|
|
70
76
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__context_theme_context_js_fbb05439__.GlobalThemeContext.Provider, {
|
|
@@ -1,120 +1,99 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* Type definitions for the consent manager components.
|
|
4
|
+
*/
|
|
5
|
+
import type { AllConsentNames, ComplianceSettings, TrackingBlockerConfig, TranslationConfig, c15tClient } from 'c15t';
|
|
2
6
|
import type { ReactNode } from 'react';
|
|
3
|
-
import type { ConsentManagerDialogTheme } from '../components/consent-manager-dialog/theme';
|
|
4
|
-
import type { CookieBannerTheme } from '../components/cookie-banner/theme';
|
|
5
7
|
/**
|
|
6
|
-
* Configuration options for the ConsentManagerProvider
|
|
7
|
-
*
|
|
8
|
-
* @remarks
|
|
9
|
-
* These props allow you to configure the initial state and behavior of the consent manager,
|
|
10
|
-
* including GDPR types, compliance settings, and namespace configuration.
|
|
8
|
+
* Configuration options for the ConsentManagerProvider.
|
|
11
9
|
*
|
|
12
10
|
* @public
|
|
13
11
|
*/
|
|
14
|
-
export interface ConsentManagerProviderProps
|
|
12
|
+
export interface ConsentManagerProviderProps {
|
|
15
13
|
/**
|
|
16
|
-
*
|
|
17
|
-
* React elements to be rendered within the consent manager context.
|
|
14
|
+
* React children to render within the provider.
|
|
18
15
|
*/
|
|
19
16
|
children: ReactNode;
|
|
20
17
|
/**
|
|
21
|
-
*
|
|
22
|
-
* Array of consent types to be pre-configured for GDPR compliance.
|
|
23
|
-
* These types define what kinds of cookies and tracking are initially allowed.
|
|
18
|
+
* Initial GDPR consent types to activate.
|
|
24
19
|
*/
|
|
25
20
|
initialGdprTypes?: AllConsentNames[];
|
|
26
21
|
/**
|
|
27
|
-
*
|
|
28
|
-
* Region-specific compliance settings that define how the consent manager
|
|
29
|
-
* should behave in different geographical regions.
|
|
22
|
+
* Initial compliance settings for different regions.
|
|
30
23
|
*/
|
|
31
|
-
initialComplianceSettings?: Record<
|
|
24
|
+
initialComplianceSettings?: Record<string, Partial<ComplianceSettings>>;
|
|
32
25
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* @default false
|
|
26
|
+
* Custom namespace for the store instance.
|
|
27
|
+
* @default 'c15tStore'
|
|
36
28
|
*/
|
|
37
|
-
|
|
29
|
+
namespace?: string;
|
|
38
30
|
/**
|
|
39
|
-
*
|
|
40
|
-
* Whether to disable animations
|
|
31
|
+
* Whether to disable default styles.
|
|
41
32
|
* @default false
|
|
42
33
|
*/
|
|
43
|
-
|
|
34
|
+
noStyle?: boolean;
|
|
44
35
|
/**
|
|
45
|
-
*
|
|
46
|
-
* Theme configuration for the consent manager
|
|
47
|
-
*/
|
|
48
|
-
theme?: CookieBannerTheme & ConsentManagerDialogTheme;
|
|
49
|
-
/**
|
|
50
|
-
* @remarks
|
|
51
|
-
* The configuration allows you to:
|
|
52
|
-
* - Define translations for multiple languages through the translations object
|
|
53
|
-
* - Set a default language via defaultLanguage prop
|
|
54
|
-
* - Control automatic language switching based on browser settings with disableAutoLanguageSwitch
|
|
55
|
-
* - Override specific translation keys while keeping defaults for others
|
|
56
|
-
*
|
|
57
|
-
* @example
|
|
58
|
-
* ```tsx
|
|
59
|
-
* <ConsentManagerProvider
|
|
60
|
-
* translationConfig={{
|
|
61
|
-
* translations: {
|
|
62
|
-
* de: {
|
|
63
|
-
* cookieBanner: {
|
|
64
|
-
* title: 'Cookie-Einstellungen',
|
|
65
|
-
* description: 'Wir verwenden Cookies...'
|
|
66
|
-
* }
|
|
67
|
-
* }
|
|
68
|
-
* },
|
|
69
|
-
* defaultLanguage: 'en',
|
|
70
|
-
* disableAutoLanguageSwitch: false
|
|
71
|
-
* }}
|
|
72
|
-
* >
|
|
73
|
-
* {children}
|
|
74
|
-
* </ConsentManagerProvider>
|
|
75
|
-
* ```
|
|
36
|
+
* Custom translation configuration.
|
|
76
37
|
*/
|
|
77
38
|
translationConfig?: Partial<TranslationConfig>;
|
|
78
39
|
/**
|
|
79
|
-
*
|
|
80
|
-
* The configuration allows you to:
|
|
81
|
-
* - Define translations for multiple languages through the translations object
|
|
82
|
-
* - Set a default language via defaultLanguage prop
|
|
83
|
-
* - Control automatic language switching based on browser settings with disableAutoLanguageSwitch
|
|
84
|
-
* - Override specific translation keys while keeping defaults for others
|
|
85
|
-
*
|
|
86
|
-
* @example
|
|
87
|
-
* ```tsx
|
|
88
|
-
* <ConsentManagerProvider
|
|
89
|
-
* trackingBlockerConfig={{}}
|
|
90
|
-
* />
|
|
40
|
+
* Configuration for the tracking blocker.
|
|
91
41
|
*/
|
|
92
42
|
trackingBlockerConfig?: TrackingBlockerConfig;
|
|
93
43
|
/**
|
|
94
|
-
*
|
|
95
|
-
*
|
|
44
|
+
* An existing c15tClient instance to use.
|
|
45
|
+
* This is required for the provider to work properly.
|
|
46
|
+
*/
|
|
47
|
+
client: c15tClient;
|
|
48
|
+
/**
|
|
49
|
+
* Visual theme to apply.
|
|
50
|
+
*/
|
|
51
|
+
theme?: 'light' | 'dark';
|
|
52
|
+
/**
|
|
53
|
+
* Whether to disable animations.
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
56
|
+
disableAnimation?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Whether to lock scroll when dialogs are open.
|
|
96
59
|
* @default false
|
|
97
60
|
*/
|
|
98
61
|
scrollLock?: boolean;
|
|
99
62
|
/**
|
|
100
|
-
* Whether to trap focus
|
|
63
|
+
* Whether to trap focus within dialogs.
|
|
101
64
|
* @default true
|
|
102
65
|
*/
|
|
103
66
|
trapFocus?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Color scheme preference.
|
|
69
|
+
* @default 'system'
|
|
70
|
+
*/
|
|
71
|
+
colorScheme?: 'light' | 'dark' | 'system';
|
|
104
72
|
}
|
|
105
73
|
/**
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
* @remarks
|
|
109
|
-
* Combines both the current state and store instance for complete
|
|
110
|
-
* consent management functionality.
|
|
111
|
-
*
|
|
112
|
-
* @internal
|
|
74
|
+
* Props for components that need to check consent status.
|
|
113
75
|
*/
|
|
114
|
-
export interface
|
|
115
|
-
/**
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
76
|
+
export interface HasConsentedProps {
|
|
77
|
+
/**
|
|
78
|
+
* The consent type to check for.
|
|
79
|
+
*/
|
|
80
|
+
consentType?: AllConsentNames;
|
|
81
|
+
/**
|
|
82
|
+
* Content to render when consent is granted.
|
|
83
|
+
*/
|
|
84
|
+
children: ReactNode;
|
|
85
|
+
/**
|
|
86
|
+
* Optional content to render when consent is not granted.
|
|
87
|
+
*/
|
|
88
|
+
fallback?: ReactNode;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Props for components that need to access a specific store namespace.
|
|
92
|
+
*/
|
|
93
|
+
export interface NamespaceProps {
|
|
94
|
+
/**
|
|
95
|
+
* Namespace for the consent store instance.
|
|
96
|
+
*/
|
|
97
|
+
namespace?: string;
|
|
119
98
|
}
|
|
120
99
|
//# sourceMappingURL=consent-manager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent-manager.d.ts","sourceRoot":"","sources":["../../src/types/consent-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"consent-manager.d.ts","sourceRoot":"","sources":["../../src/types/consent-manager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,UAAU,EACV,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC3C;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IAErC;;OAEG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAExE;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAE/C;;OAEG;IACH,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;IAE9C;;;OAGG;IACH,MAAM,EAAE,UAAU,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAEzB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;IAE9B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -18,12 +18,8 @@ function __webpack_require__(moduleId) {
|
|
|
18
18
|
return module.exports;
|
|
19
19
|
}
|
|
20
20
|
(()=>{
|
|
21
|
-
__webpack_require__.n =
|
|
22
|
-
var getter = module && module.__esModule ?
|
|
23
|
-
return module['default'];
|
|
24
|
-
} : function() {
|
|
25
|
-
return module;
|
|
26
|
-
};
|
|
21
|
+
__webpack_require__.n = (module)=>{
|
|
22
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
27
23
|
__webpack_require__.d(getter, {
|
|
28
24
|
a: getter
|
|
29
25
|
});
|
|
@@ -31,7 +27,7 @@ function __webpack_require__(moduleId) {
|
|
|
31
27
|
};
|
|
32
28
|
})();
|
|
33
29
|
(()=>{
|
|
34
|
-
__webpack_require__.d =
|
|
30
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
35
31
|
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
36
32
|
enumerable: true,
|
|
37
33
|
get: definition[key]
|
|
@@ -39,9 +35,7 @@ function __webpack_require__(moduleId) {
|
|
|
39
35
|
};
|
|
40
36
|
})();
|
|
41
37
|
(()=>{
|
|
42
|
-
__webpack_require__.o =
|
|
43
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
44
|
-
};
|
|
38
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
45
39
|
})();
|
|
46
40
|
(()=>{
|
|
47
41
|
__webpack_require__.r = function(exports1) {
|
package/dist/utils/cn.cjs
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
(()=>{
|
|
4
|
-
__webpack_require__.n =
|
|
5
|
-
var getter = module && module.__esModule ?
|
|
6
|
-
return module['default'];
|
|
7
|
-
} : function() {
|
|
8
|
-
return module;
|
|
9
|
-
};
|
|
4
|
+
__webpack_require__.n = (module)=>{
|
|
5
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
10
6
|
__webpack_require__.d(getter, {
|
|
11
7
|
a: getter
|
|
12
8
|
});
|
|
@@ -14,7 +10,7 @@ var __webpack_require__ = {};
|
|
|
14
10
|
};
|
|
15
11
|
})();
|
|
16
12
|
(()=>{
|
|
17
|
-
__webpack_require__.d =
|
|
13
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
18
14
|
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
19
15
|
enumerable: true,
|
|
20
16
|
get: definition[key]
|
|
@@ -22,9 +18,7 @@ var __webpack_require__ = {};
|
|
|
22
18
|
};
|
|
23
19
|
})();
|
|
24
20
|
(()=>{
|
|
25
|
-
__webpack_require__.o =
|
|
26
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
27
|
-
};
|
|
21
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
28
22
|
})();
|
|
29
23
|
(()=>{
|
|
30
24
|
__webpack_require__.r = function(exports1) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
(()=>{
|
|
4
|
-
__webpack_require__.d =
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
5
|
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
6
|
enumerable: true,
|
|
7
7
|
get: definition[key]
|
|
@@ -9,9 +9,7 @@ var __webpack_require__ = {};
|
|
|
9
9
|
};
|
|
10
10
|
})();
|
|
11
11
|
(()=>{
|
|
12
|
-
__webpack_require__.o =
|
|
13
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
-
};
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
15
13
|
})();
|
|
16
14
|
(()=>{
|
|
17
15
|
__webpack_require__.r = function(exports1) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_require__ = {};
|
|
4
4
|
(()=>{
|
|
5
|
-
__webpack_require__.d =
|
|
5
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
6
6
|
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: definition[key]
|
|
@@ -10,9 +10,7 @@ var __webpack_require__ = {};
|
|
|
10
10
|
};
|
|
11
11
|
})();
|
|
12
12
|
(()=>{
|
|
13
|
-
__webpack_require__.o =
|
|
14
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
15
|
-
};
|
|
13
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
16
14
|
})();
|
|
17
15
|
(()=>{
|
|
18
16
|
__webpack_require__.r = function(exports1) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_require__ = {};
|
|
4
4
|
(()=>{
|
|
5
|
-
__webpack_require__.d =
|
|
5
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
6
6
|
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: definition[key]
|
|
@@ -10,9 +10,7 @@ var __webpack_require__ = {};
|
|
|
10
10
|
};
|
|
11
11
|
})();
|
|
12
12
|
(()=>{
|
|
13
|
-
__webpack_require__.o =
|
|
14
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
15
|
-
};
|
|
13
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
16
14
|
})();
|
|
17
15
|
(()=>{
|
|
18
16
|
__webpack_require__.r = function(exports1) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c15t/react",
|
|
3
|
-
"version": "0.0.1-rc.
|
|
3
|
+
"version": "0.0.1-rc.12",
|
|
4
4
|
"license": "GPL-3.0-only",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -62,10 +62,10 @@
|
|
|
62
62
|
"@radix-ui/react-slot": "1.1.2",
|
|
63
63
|
"@radix-ui/react-switch": "1.1.3",
|
|
64
64
|
"clsx": "2.1.1",
|
|
65
|
-
"motion": "^12.4.
|
|
65
|
+
"motion": "^12.4.10",
|
|
66
66
|
"tailwind-variants": "^0.3.1",
|
|
67
67
|
"zustand": "^5.0.3",
|
|
68
|
-
"c15t": "0.0.1-rc.
|
|
68
|
+
"c15t": "0.0.1-rc.12"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@c15t/typescript-config": "0.0.1-beta.1"
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"build": "rslib build",
|
|
82
82
|
"check-types": "tsc --noEmit",
|
|
83
83
|
"dev": "rslib build --watch",
|
|
84
|
-
"fmt": "pnpm biome format --write .",
|
|
84
|
+
"fmt": "pnpm biome format --write . && biome check --formatter-enabled=false --linter-enabled=false --organize-imports-enabled=true --write",
|
|
85
85
|
"lint": "pnpm biome lint ./src",
|
|
86
86
|
"test": "vitest run",
|
|
87
87
|
"test:coverage": "vitest run --coverage",
|