@owlmeans/web-consent 0.1.18-rc.40 → 0.1.18-rc.41
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/README.md +1 -1
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/web-consent/SKILL.md +1 -1
- package/build/consent/component.d.ts +1 -1
- package/build/consent/component.d.ts.map +1 -1
- package/build/consent/component.js +2 -20
- package/build/consent/component.js.map +1 -1
- package/build/consent/consts.local.d.ts +20 -0
- package/build/consent/consts.local.d.ts.map +1 -0
- package/build/consent/consts.local.js +20 -0
- package/build/consent/consts.local.js.map +1 -0
- package/build/consent/toggle.d.ts +1 -10
- package/build/consent/toggle.d.ts.map +1 -1
- package/build/consent/toggle.js.map +1 -1
- package/build/consent/types.d.ts +11 -0
- package/build/consent/types.d.ts.map +1 -0
- package/build/consent/types.js +2 -0
- package/build/consent/types.js.map +1 -0
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js.map +1 -1
- package/build/policy/component.d.ts.map +1 -1
- package/build/policy/component.js.map +1 -1
- package/build/policy/types.local.d.ts +11 -0
- package/build/policy/types.local.d.ts.map +1 -0
- package/build/policy/types.local.js +2 -0
- package/build/policy/types.local.js.map +1 -0
- package/package.json +12 -12
- package/src/consent/component.tsx +3 -26
- package/src/consent/consts.local.ts +19 -0
- package/src/consent/toggle.tsx +1 -11
- package/src/consent/types.ts +10 -0
- package/src/index.ts +1 -0
- package/src/policy/component.tsx +1 -12
- package/src/policy/types.local.ts +12 -0
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
6
6
|
your project's skill store (`.agents/skills/`):
|
|
7
7
|
|
|
8
8
|
```sh
|
|
9
|
-
npx @owlmeans/agent-skills@^0.1.18-rc.
|
|
9
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.48
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
The embedded files are version-matched to this package release. Do not edit them
|
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/web-consent",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-10-
|
|
4
|
+
"version": "0.1.18-rc.41",
|
|
5
|
+
"generatedAt": "2026-10-05T08:32:19.121Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -8,7 +8,7 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/web-consent
|
|
9
9
|
|
|
10
10
|
**Layer:** Web (React)
|
|
11
|
-
**Install:** `"@owlmeans/web-consent": "^0.1.18-rc.
|
|
11
|
+
**Install:** `"@owlmeans/web-consent": "^0.1.18-rc.41"` in `dependencies`
|
|
12
12
|
|
|
13
13
|
The browser components of the consent set. The model — categories, storage, migration, the store,
|
|
14
14
|
Consent Mode signalling — is `@owlmeans/consent`, and this package re-exports a **named selection**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/consent/component.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/consent/component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAA;AAMjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAerD,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CA0IhD,CAAA"}
|
|
@@ -1,29 +1,11 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useState } from 'react';
|
|
3
3
|
import { Cookie } from 'lucide-react';
|
|
4
|
-
import { DEFAULT_CONSENT_CATEGORIES, defaultConsentTranslate, interpolate, readConsent
|
|
4
|
+
import { DEFAULT_CONSENT_CATEGORIES, defaultConsentTranslate, interpolate, readConsent } from '@owlmeans/consent';
|
|
5
5
|
import { cn, disclosedDomains } from '../lib/utils.js';
|
|
6
6
|
import { useConsent } from '../hooks.js';
|
|
7
7
|
import { ConsentToggle } from './toggle.js';
|
|
8
|
-
|
|
9
|
-
* The cookie preferences dialog, and the button that brings it back.
|
|
10
|
-
*
|
|
11
|
-
* Deliberately built from raw elements rather than shadcn primitives. One of the three surfaces
|
|
12
|
-
* this serves is an Astro island on a site that vendors its own component library, and requiring a
|
|
13
|
-
* consumer to install a UI family in order to render a consent notice would put the notice out of
|
|
14
|
-
* reach of the site that needs it most.
|
|
15
|
-
*
|
|
16
|
-
* Flat by rule, because it is the first thing every new visitor of a generated app sees: the
|
|
17
|
-
* surface and every colour come from the host's theme tokens (ground, ink, muted, hairline, one
|
|
18
|
-
* accent), depth comes from a hairline border and the overlay alone, and nothing paints a
|
|
19
|
-
* gradient, a shadow, a glow or a `backdrop-filter`. The accept action is the one accent pill,
|
|
20
|
-
* the others are outlined pills; every control is at least 44px tall and shows a 3px focus ring.
|
|
21
|
-
*/
|
|
22
|
-
/**
|
|
23
|
-
* The focus ring every control here shows: 3px solid in the theme's ring colour, 3px off the
|
|
24
|
-
* element. An outline rather than a box-shadow ring, so it survives a host that zeroes shadows.
|
|
25
|
-
*/
|
|
26
|
-
const FOCUS = 'focus-visible:outline-3 focus-visible:outline-offset-3 focus-visible:outline-ring';
|
|
8
|
+
import { FOCUS } from './consts.local.js';
|
|
27
9
|
/** A pill button: 44px tall at minimum, full width on a phone, sharing the row above that. */
|
|
28
10
|
const PILL = cn('inline-flex min-h-11 flex-1 items-center justify-center rounded-full px-6 py-2.5 text-[15px] transition-colors motion-safe:active:scale-[0.98]', FOCUS);
|
|
29
11
|
/** A text link: muted, underlined at rest (colour is never the only signal), 44px tall to tap. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../src/consent/component.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../src/consent/component.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAW,MAAM,OAAO,CAAA;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,0BAA0B,EAAE,uBAAuB,EAAE,WAAW,EAAE,WAAW,EAAsB,MAAM,mBAAmB,CAAA;AACrI,OAAO,EAAE,EAAE,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAE3C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEzC,8FAA8F;AAC9F,MAAM,IAAI,GAAG,EAAE,CACb,gJAAgJ,EAChJ,KAAK,CACN,CAAA;AAED,kGAAkG;AAClG,MAAM,IAAI,GAAG,EAAE,CACb,sJAAsJ,EACtJ,KAAK,CACN,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAA2B,KAAK,CAAC,EAAE;IAC3D,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,IAAI,0BAA0B,CAAA;IACjE,MAAM,CAAC,GAAG,KAAK,CAAC,SAAS,IAAI,uBAAuB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAElE,MAAM,WAAW,GAAG;QAClB,UAAU;QACV,GAAG,CAAC,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACrE,GAAG,CAAC,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC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C,UAAU,EAAE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB,EAAC,SAAS,EAAE,IAAI,YACjF,CAAC,CAAC,YAAY,EAAE,eAAe,CAAC,GAAK,EACtC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,YACR,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB,EAAC,SAAS,EAAE,IAAI,YAC1F,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,IAD9B,IAAI,CAAC,IAAI,CAC0B,CAAC,IACvC,IACF,GACF,EAUL,KAAK,CAAC,cAAc,KAAK,IAAI,IAAI,OAAO,CAAC,MAAM,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,iBAC3E,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,gBAC7C,CAAC,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,+BAEtD,SAAS,EAAE,EAAE,CAAC,2OAA2O,EAAE,KAAK,CAAC,YAEjQ,KAAC,MAAM,IAAC,SAAS,EAAC,SAAS,iBAAa,MAAM,GAAG,GAC1C,IACR,CAAA;AACL,CAAC,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The cookie preferences dialog, and the button that brings it back.
|
|
3
|
+
*
|
|
4
|
+
* Deliberately built from raw elements rather than shadcn primitives. One of the three surfaces
|
|
5
|
+
* this serves is an Astro island on a site that vendors its own component library, and requiring a
|
|
6
|
+
* consumer to install a UI family in order to render a consent notice would put the notice out of
|
|
7
|
+
* reach of the site that needs it most.
|
|
8
|
+
*
|
|
9
|
+
* Flat by rule, because it is the first thing every new visitor of a generated app sees: the
|
|
10
|
+
* surface and every colour come from the host's theme tokens (ground, ink, muted, hairline, one
|
|
11
|
+
* accent), depth comes from a hairline border and the overlay alone, and nothing paints a
|
|
12
|
+
* gradient, a shadow, a glow or a `backdrop-filter`. The accept action is the one accent pill,
|
|
13
|
+
* the others are outlined pills; every control is at least 44px tall and shows a 3px focus ring.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* The focus ring every control here shows: 3px solid in the theme's ring colour, 3px off the
|
|
17
|
+
* element. An outline rather than a box-shadow ring, so it survives a host that zeroes shadows.
|
|
18
|
+
*/
|
|
19
|
+
export declare const FOCUS = "focus-visible:outline-3 focus-visible:outline-offset-3 focus-visible:outline-ring";
|
|
20
|
+
//# sourceMappingURL=consts.local.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.local.d.ts","sourceRoot":"","sources":["../../src/consent/consts.local.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH;;;GAGG;AACH,eAAO,MAAM,KAAK,sFAAsF,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The cookie preferences dialog, and the button that brings it back.
|
|
3
|
+
*
|
|
4
|
+
* Deliberately built from raw elements rather than shadcn primitives. One of the three surfaces
|
|
5
|
+
* this serves is an Astro island on a site that vendors its own component library, and requiring a
|
|
6
|
+
* consumer to install a UI family in order to render a consent notice would put the notice out of
|
|
7
|
+
* reach of the site that needs it most.
|
|
8
|
+
*
|
|
9
|
+
* Flat by rule, because it is the first thing every new visitor of a generated app sees: the
|
|
10
|
+
* surface and every colour come from the host's theme tokens (ground, ink, muted, hairline, one
|
|
11
|
+
* accent), depth comes from a hairline border and the overlay alone, and nothing paints a
|
|
12
|
+
* gradient, a shadow, a glow or a `backdrop-filter`. The accept action is the one accent pill,
|
|
13
|
+
* the others are outlined pills; every control is at least 44px tall and shows a 3px focus ring.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* The focus ring every control here shows: 3px solid in the theme's ring colour, 3px off the
|
|
17
|
+
* element. An outline rather than a box-shadow ring, so it survives a host that zeroes shadows.
|
|
18
|
+
*/
|
|
19
|
+
export const FOCUS = 'focus-visible:outline-3 focus-visible:outline-offset-3 focus-visible:outline-ring';
|
|
20
|
+
//# sourceMappingURL=consts.local.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.local.js","sourceRoot":"","sources":["../../src/consent/consts.local.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH;;;GAGG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,mFAAmF,CAAA"}
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
|
-
|
|
3
|
-
id: string;
|
|
4
|
-
label: string;
|
|
5
|
-
description: string;
|
|
6
|
-
checked: boolean;
|
|
7
|
-
/** A required category is disclosure, not a question: locked on, and labelled as such. */
|
|
8
|
-
required?: boolean;
|
|
9
|
-
requiredLabel: string;
|
|
10
|
-
onChange: (value: boolean) => void;
|
|
11
|
-
}
|
|
2
|
+
import type { ConsentToggleProps } from './types.js';
|
|
12
3
|
/**
|
|
13
4
|
* One category row: a hairline card with the label, the description and a switch.
|
|
14
5
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../src/consent/toggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../src/consent/toggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAE/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAEpD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CA+ChD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.js","sourceRoot":"","sources":["../../src/consent/toggle.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"toggle.js","sourceRoot":"","sources":["../../src/consent/toggle.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAA;AAGpC;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,aAAa,GAA2B,CACnD,EAAE,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,EACtE,EAAE;IACF,MAAM,SAAS,GAAG;QAChB,GAAG,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAChD,GAAG,CAAC,WAAW,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KAC9C,CAAA;IAED,OAAO,CACL,eAAK,SAAS,EAAC,8EAA8E,aAC3F,eAAK,SAAS,EAAC,gBAAgB,aAC7B,eAAK,SAAS,EAAC,8EAA8E,aAC3F,eAAM,EAAE,EAAE,GAAG,EAAE,QAAQ,YAAG,KAAK,GAAQ,EACtC,QAAQ,KAAK,IAAI,IAAI,eACpB,EAAE,EAAE,GAAG,EAAE,WAAW,EAAE,SAAS,EAAC,iEAAiE,YACjG,aAAa,GAAQ,IACnB,EACL,WAAW,KAAK,EAAE,IAAI,YACrB,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,SAAS,EAAC,2DAA2D,YACvF,WAAW,GAAK,IACd,EACN,iBAAO,SAAS,EAAE,EAAE,CAClB,0EAA0E,EAC1E,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,gBAAgB,CACvE,aACC,gBACE,EAAE,EAAE,EAAE,EACN,IAAI,EAAC,UAAU,qBACE,GAAG,EAAE,QAAQ,KAC1B,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC7E,SAAS,EAAC,cAAc,EACxB,OAAO,EAAE,OAAO,IAAI,QAAQ,KAAK,IAAI,EACrC,QAAQ,EAAE,QAAQ,KAAK,IAAI,EAC3B,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GACjD,EACF,eAAM,SAAS,EAAE,EAAE,CACjB,gKAAgK,EAChK,OAAO,IAAI,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,wBAAwB,CACvE,YACC,eAAM,SAAS,EAAE,EAAE,CACjB,yFAAyF,EACzF,OAAO,IAAI,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,iBAAiB,CACnE,GAAI,GACA,IACD,IACJ,CACP,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ConsentToggleProps {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
description: string;
|
|
5
|
+
checked: boolean;
|
|
6
|
+
/** A required category is disclosure, not a question: locked on, and labelled as such. */
|
|
7
|
+
required?: boolean;
|
|
8
|
+
requiredLabel: string;
|
|
9
|
+
onChange: (value: boolean) => void;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/consent/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;CACnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/consent/types.ts"],"names":[],"mappings":""}
|
package/build/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from './hooks.js';
|
|
|
3
3
|
export * from './consent/component.js';
|
|
4
4
|
export * from './consent/widget.js';
|
|
5
5
|
export * from './consent/toggle.js';
|
|
6
|
+
export type * from './consent/types.js';
|
|
6
7
|
export * from './policy/component.js';
|
|
7
8
|
export { consentStore, openConsent, isConsented, readConsent, writeConsent, clearConsent, migrateConsent, applyConsent, pushConsentDefaults, consentBootstrapScript, consentDefaults, consentUpdate, gtagConsent, DEFAULT_CONSENT_CATEGORIES, DEFAULT_CONSENT_MESSAGES, defaultConsentTranslate, interpolate, CONSENT_KEY, CONSENT_COOKIE_DAYS, CONSENT_SCHEMA_VERSION, CONSENT_LOCALES, CONSENT_ESSENTIAL, CONSENT_ANALYTICS, CONSENT_MARKETING, registerConsentPlugin, consentPlugins, decorateConsentUrl, consentDomains, adoptConsent, startConsentPlugins, adoptConsentLanguage, writeConsentLanguage, CONSENT_LANGUAGE_KEY, CONSENT_EVENT, consentLinker, encodeConsentLink, decodeConsentLink, stripConsentLinkParam, consentLinkerScript, CONSENT_LINK_PARAM, CONSENT_LINK_MAX_AGE, CONSENT_LINK_SKEW, } from '@owlmeans/consent';
|
|
8
9
|
export type { ConsentCategory, ConsentOptions, ConsentReason, ConsentRecord, ConsentService, ConsentSignal, ConsentState, ConsentStore, ConsentLocale, ConsentLinkerOptions, ConsentLinkerLanguage, ConsentPlugin, ConsentLinkPayload, } from '@owlmeans/consent';
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,YAAY,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AAErC,OAAO,EACL,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAC/E,cAAc,EAAE,YAAY,EAAE,mBAAmB,EAAE,sBAAsB,EACzE,eAAe,EAAE,aAAa,EAAE,WAAW,EAC3C,0BAA0B,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,WAAW,EAC1F,WAAW,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,eAAe,EACzE,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,EACvD,qBAAqB,EAAE,cAAc,EAAE,kBAAkB,EAAE,cAAc,EAAE,YAAY,EACvF,mBAAmB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,oBAAoB,EACrF,aAAa,EACb,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,mBAAmB,EAC/F,kBAAkB,EAAE,oBAAoB,EAAE,iBAAiB,GAC5D,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EACV,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAC5F,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,aAAa,EAAE,kBAAkB,GAC1H,MAAM,mBAAmB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,YAAY,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,mBAAmB,oBAAoB,CAAA;AACvC,cAAc,uBAAuB,CAAA;AAErC,OAAO,EACL,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAC/E,cAAc,EAAE,YAAY,EAAE,mBAAmB,EAAE,sBAAsB,EACzE,eAAe,EAAE,aAAa,EAAE,WAAW,EAC3C,0BAA0B,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,WAAW,EAC1F,WAAW,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,eAAe,EACzE,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,EACvD,qBAAqB,EAAE,cAAc,EAAE,kBAAkB,EAAE,cAAc,EAAE,YAAY,EACvF,mBAAmB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,oBAAoB,EACrF,aAAa,EACb,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,mBAAmB,EAC/F,kBAAkB,EAAE,oBAAoB,EAAE,iBAAiB,GAC5D,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EACV,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAC5F,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,aAAa,EAAE,kBAAkB,GAC1H,MAAM,mBAAmB,CAAA"}
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAA;AAC1B,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAA;AAC1B,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AAEnC,cAAc,uBAAuB,CAAA;AAErC,OAAO,EACL,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAC/E,cAAc,EAAE,YAAY,EAAE,mBAAmB,EAAE,sBAAsB,EACzE,eAAe,EAAE,aAAa,EAAE,WAAW,EAC3C,0BAA0B,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,WAAW,EAC1F,WAAW,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,eAAe,EACzE,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,EACvD,qBAAqB,EAAE,cAAc,EAAE,kBAAkB,EAAE,cAAc,EAAE,YAAY,EACvF,mBAAmB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,oBAAoB,EACrF,aAAa,EACb,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,mBAAmB,EAC/F,kBAAkB,EAAE,oBAAoB,EAAE,iBAAiB,GAC5D,MAAM,mBAAmB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/policy/component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/policy/component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAM/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAwCpD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA+E9C,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../src/policy/component.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,mBAAmB,EAAE,WAAW,EAAE,0BAA0B,EAC5D,uBAAuB,EAAE,WAAW,EAAE,WAAW,GAClD,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../src/policy/component.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,mBAAmB,EAAE,WAAW,EAAE,0BAA0B,EAC5D,uBAAuB,EAAE,WAAW,EAAE,WAAW,GAClD,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,EAAE,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAItD;;;;;;GAMG;AACH,MAAM,WAAW,GAAyB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,CAC7E,2BACc,WAAW,CAAC,CAAC,CAAC,kBAAkB,EAAE,yBAAyB,CAAC,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,iCACjE,QAAQ,IAAI,EAAE,YAE1C,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,6DAChC,2BAAS,OAAO,CAAC,IAAI,GAAU,EAC/B,yBACE,0BACE,uBAAK,CAAC,CAAC,gBAAgB,EAAE,UAAU,CAAC,GAAM,EAC1C,uBAAK,OAAO,CAAC,QAAQ,GAAM,IACvB,EACL,OAAO,CAAC,OAAO,IAAI,IAAI,IAAI,OAAO,CAAC,OAAO,KAAK,EAAE,IAAI,0BACpD,uBAAK,CAAC,CAAC,eAAe,EAAE,SAAS,CAAC,GAAM,EACxC,uBAAK,OAAO,CAAC,OAAO,GAAM,IACtB,EACL,OAAO,CAAC,OAAO,IAAI,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,0BACxD,uBAAK,CAAC,CAAC,eAAe,EAAE,SAAS,CAAC,GAAM,EACxC,uBAAK,OAAO,CAA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AE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB,YAChE,CAAC,CAAC,OAAO,EAAE,oBAAoB,CAAC,GAAK,IACrC,EAEJ,sBACE,iBACE,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,qCAClD,SAAS,EAAC,kSAAkS,YAE3S,CAAC,CAAC,QAAQ,EAAE,oBAAoB,CAAC,GAC3B,GACP,IACI,CAAA;AACZ,CAAC,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ConsentService } from '@owlmeans/consent';
|
|
2
|
+
export type Translate = (key: string, defaultValue: string) => string;
|
|
3
|
+
export interface ServiceListProps {
|
|
4
|
+
services: ConsentService[];
|
|
5
|
+
/** The category's own label, already resolved — it names the list for assistive technology. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** The category key, for tests and CSS; absent for the trailing group of unmatched services. */
|
|
8
|
+
category?: string;
|
|
9
|
+
t: Translate;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=types.local.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.local.d.ts","sourceRoot":"","sources":["../../src/policy/types.local.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,KAAK,MAAM,CAAA;AAErE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,cAAc,EAAE,CAAA;IAC1B,+FAA+F;IAC/F,KAAK,EAAE,MAAM,CAAA;IACb,gGAAgG;IAChG,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,CAAC,EAAE,SAAS,CAAA;CACb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.local.js","sourceRoot":"","sources":["../../src/policy/types.local.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/web-consent",
|
|
3
|
-
"version": "0.1.18-rc.
|
|
3
|
+
"version": "0.1.18-rc.41",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@owlmeans/consent": "^0.1.18-rc.
|
|
25
|
+
"@owlmeans/consent": "^0.1.18-rc.10"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"clsx": "*",
|
|
@@ -33,20 +33,20 @@
|
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@owlmeans/dep-config": "workspace:*",
|
|
36
|
-
"@owlmeans/test-ui": "^0.1.18-rc.
|
|
37
|
-
"@tailwindcss/vite": "^4.
|
|
38
|
-
"@types/bun": "^1.4.
|
|
39
|
-
"@types/react": "^19.
|
|
40
|
-
"@types/react-dom": "^19.
|
|
41
|
-
"@vitejs/plugin-react": "^6.
|
|
36
|
+
"@owlmeans/test-ui": "^0.1.18-rc.48",
|
|
37
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
38
|
+
"@types/bun": "^1.4.2",
|
|
39
|
+
"@types/react": "^19.3.0",
|
|
40
|
+
"@types/react-dom": "^19.3.0",
|
|
41
|
+
"@vitejs/plugin-react": "^6.1.1",
|
|
42
42
|
"axe-core": "^4.13.0",
|
|
43
43
|
"clsx": "^2.1.1",
|
|
44
|
-
"lucide-react": "^
|
|
44
|
+
"lucide-react": "^1.52.0",
|
|
45
45
|
"nodemon": "^3.1.14",
|
|
46
|
-
"react-dom": "^19.
|
|
47
|
-
"tailwind-merge": "^3.
|
|
46
|
+
"react-dom": "^19.3.0",
|
|
47
|
+
"tailwind-merge": "^3.7.0",
|
|
48
48
|
"typescript": "^7.0.2",
|
|
49
|
-
"vite": "^8.
|
|
49
|
+
"vite": "^8.3.2"
|
|
50
50
|
},
|
|
51
51
|
"publishConfig": {
|
|
52
52
|
"access": "public"
|
|
@@ -1,34 +1,11 @@
|
|
|
1
|
-
import { useCallback, useEffect, useState } from 'react'
|
|
2
|
-
import type { FC } from 'react'
|
|
1
|
+
import { useCallback, useEffect, useState, type FC } from 'react'
|
|
3
2
|
import { Cookie } from 'lucide-react'
|
|
4
|
-
import {
|
|
5
|
-
DEFAULT_CONSENT_CATEGORIES, defaultConsentTranslate, interpolate, readConsent,
|
|
6
|
-
} from '@owlmeans/consent'
|
|
7
|
-
import type { ConsentRecord } from '@owlmeans/consent'
|
|
3
|
+
import { DEFAULT_CONSENT_CATEGORIES, defaultConsentTranslate, interpolate, readConsent, type ConsentRecord } from '@owlmeans/consent'
|
|
8
4
|
import { cn, disclosedDomains } from '../lib/utils.js'
|
|
9
5
|
import { useConsent } from '../hooks.js'
|
|
10
6
|
import { ConsentToggle } from './toggle.js'
|
|
11
7
|
import type { CookieConsentProps } from '../types.js'
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* The cookie preferences dialog, and the button that brings it back.
|
|
15
|
-
*
|
|
16
|
-
* Deliberately built from raw elements rather than shadcn primitives. One of the three surfaces
|
|
17
|
-
* this serves is an Astro island on a site that vendors its own component library, and requiring a
|
|
18
|
-
* consumer to install a UI family in order to render a consent notice would put the notice out of
|
|
19
|
-
* reach of the site that needs it most.
|
|
20
|
-
*
|
|
21
|
-
* Flat by rule, because it is the first thing every new visitor of a generated app sees: the
|
|
22
|
-
* surface and every colour come from the host's theme tokens (ground, ink, muted, hairline, one
|
|
23
|
-
* accent), depth comes from a hairline border and the overlay alone, and nothing paints a
|
|
24
|
-
* gradient, a shadow, a glow or a `backdrop-filter`. The accept action is the one accent pill,
|
|
25
|
-
* the others are outlined pills; every control is at least 44px tall and shows a 3px focus ring.
|
|
26
|
-
*/
|
|
27
|
-
/**
|
|
28
|
-
* The focus ring every control here shows: 3px solid in the theme's ring colour, 3px off the
|
|
29
|
-
* element. An outline rather than a box-shadow ring, so it survives a host that zeroes shadows.
|
|
30
|
-
*/
|
|
31
|
-
const FOCUS = 'focus-visible:outline-3 focus-visible:outline-offset-3 focus-visible:outline-ring'
|
|
8
|
+
import { FOCUS } from './consts.local.js'
|
|
32
9
|
|
|
33
10
|
/** A pill button: 44px tall at minimum, full width on a phone, sharing the row above that. */
|
|
34
11
|
const PILL = cn(
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The cookie preferences dialog, and the button that brings it back.
|
|
3
|
+
*
|
|
4
|
+
* Deliberately built from raw elements rather than shadcn primitives. One of the three surfaces
|
|
5
|
+
* this serves is an Astro island on a site that vendors its own component library, and requiring a
|
|
6
|
+
* consumer to install a UI family in order to render a consent notice would put the notice out of
|
|
7
|
+
* reach of the site that needs it most.
|
|
8
|
+
*
|
|
9
|
+
* Flat by rule, because it is the first thing every new visitor of a generated app sees: the
|
|
10
|
+
* surface and every colour come from the host's theme tokens (ground, ink, muted, hairline, one
|
|
11
|
+
* accent), depth comes from a hairline border and the overlay alone, and nothing paints a
|
|
12
|
+
* gradient, a shadow, a glow or a `backdrop-filter`. The accept action is the one accent pill,
|
|
13
|
+
* the others are outlined pills; every control is at least 44px tall and shows a 3px focus ring.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* The focus ring every control here shows: 3px solid in the theme's ring colour, 3px off the
|
|
17
|
+
* element. An outline rather than a box-shadow ring, so it survives a host that zeroes shadows.
|
|
18
|
+
*/
|
|
19
|
+
export const FOCUS = 'focus-visible:outline-3 focus-visible:outline-offset-3 focus-visible:outline-ring'
|
package/src/consent/toggle.tsx
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
import type { FC } from 'react'
|
|
2
2
|
import { cn } from '../lib/utils.js'
|
|
3
|
-
|
|
4
|
-
export interface ConsentToggleProps {
|
|
5
|
-
id: string
|
|
6
|
-
label: string
|
|
7
|
-
description: string
|
|
8
|
-
checked: boolean
|
|
9
|
-
/** A required category is disclosure, not a question: locked on, and labelled as such. */
|
|
10
|
-
required?: boolean
|
|
11
|
-
requiredLabel: string
|
|
12
|
-
onChange: (value: boolean) => void
|
|
13
|
-
}
|
|
3
|
+
import type { ConsentToggleProps } from './types.js'
|
|
14
4
|
|
|
15
5
|
/**
|
|
16
6
|
* One category row: a hairline card with the label, the description and a switch.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface ConsentToggleProps {
|
|
2
|
+
id: string
|
|
3
|
+
label: string
|
|
4
|
+
description: string
|
|
5
|
+
checked: boolean
|
|
6
|
+
/** A required category is disclosure, not a question: locked on, and labelled as such. */
|
|
7
|
+
required?: boolean
|
|
8
|
+
requiredLabel: string
|
|
9
|
+
onChange: (value: boolean) => void
|
|
10
|
+
}
|
package/src/index.ts
CHANGED
package/src/policy/component.tsx
CHANGED
|
@@ -3,20 +3,9 @@ import {
|
|
|
3
3
|
CONSENT_COOKIE_DAYS, CONSENT_KEY, DEFAULT_CONSENT_CATEGORIES,
|
|
4
4
|
defaultConsentTranslate, interpolate, openConsent,
|
|
5
5
|
} from '@owlmeans/consent'
|
|
6
|
-
import type { ConsentService } from '@owlmeans/consent'
|
|
7
6
|
import { cn, disclosedDomains } from '../lib/utils.js'
|
|
8
7
|
import type { CookiePolicyProps } from '../types.js'
|
|
9
|
-
|
|
10
|
-
type Translate = (key: string, defaultValue: string) => string
|
|
11
|
-
|
|
12
|
-
interface ServiceListProps {
|
|
13
|
-
services: ConsentService[]
|
|
14
|
-
/** The category's own label, already resolved — it names the list for assistive technology. */
|
|
15
|
-
label: string
|
|
16
|
-
/** The category key, for tests and CSS; absent for the trailing group of unmatched services. */
|
|
17
|
-
category?: string
|
|
18
|
-
t: Translate
|
|
19
|
-
}
|
|
8
|
+
import type { ServiceListProps } from './types.local.js'
|
|
20
9
|
|
|
21
10
|
/**
|
|
22
11
|
* The services one category gates, as a nested list inside that category's item.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ConsentService } from '@owlmeans/consent'
|
|
2
|
+
|
|
3
|
+
export type Translate = (key: string, defaultValue: string) => string
|
|
4
|
+
|
|
5
|
+
export interface ServiceListProps {
|
|
6
|
+
services: ConsentService[]
|
|
7
|
+
/** The category's own label, already resolved — it names the list for assistive technology. */
|
|
8
|
+
label: string
|
|
9
|
+
/** The category key, for tests and CSS; absent for the trailing group of unmatched services. */
|
|
10
|
+
category?: string
|
|
11
|
+
t: Translate
|
|
12
|
+
}
|