@jini-ai/cookie-consent 0.6.19 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -8
- package/dist/banner.css +1 -0
- package/dist/client/bridges.d.ts +8 -0
- package/dist/client/bridges.js +49 -0
- package/dist/client/dom.d.ts +7 -2
- package/dist/client/dom.js +37 -0
- package/dist/client/features.d.ts +14 -0
- package/dist/client/features.js +34 -0
- package/dist/client/index.d.ts +10 -44
- package/dist/client/index.js +15 -220
- package/dist/client/runtime.d.ts +51 -0
- package/dist/client/runtime.js +275 -0
- package/dist/client/scripts.d.ts +8 -0
- package/dist/client/scripts.js +39 -0
- package/dist/client.min.js +1 -1
- package/dist/contract.d.ts +44 -0
- package/dist/contract.js +1 -3
- package/dist/contracts/consent-file.d.ts +29 -0
- package/dist/contracts/consent-file.js +62 -0
- package/dist/contracts/scripts.d.ts +15 -0
- package/dist/contracts/scripts.js +43 -0
- package/dist/extensions.min.d.ts +2 -0
- package/dist/extensions.min.js +1 -0
- package/dist/plugins.d.ts +1 -0
- package/dist/plugins.js +1 -0
- package/dist/policy.d.ts +1 -0
- package/dist/policy.js +1 -0
- package/dist/render/banner.d.ts +1 -0
- package/dist/render/banner.js +12 -3
- package/dist/render/base-css.d.ts +1 -1
- package/dist/render/base-css.js +1 -0
- package/dist/render/index.d.ts +1 -0
- package/dist/render/index.js +1 -0
- package/dist/render/scripts.d.ts +13 -0
- package/dist/render/scripts.js +15 -0
- package/dist/server/region.d.ts +3 -1
- package/dist/server/region.js +7 -2
- package/package.json +10 -7
package/dist/plugins.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
/** Compatibility entry; the shared implementation serves browser and server consumers. */
|
|
2
2
|
export * from './contracts/plugins.js';
|
|
3
|
+
export { consentBridgeContribution, declaredScriptsContribution, parseConsentContributions } from './contracts/consent-file.js';
|
|
3
4
|
//# sourceMappingURL=plugins.js.map
|
package/dist/policy.d.ts
CHANGED
package/dist/policy.js
CHANGED
package/dist/render/banner.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export interface RenderBannerOptions {
|
|
|
41
41
|
customCss?: string;
|
|
42
42
|
/** URL of dist/client.min.js as the host serves it. Omitted in a preview. */
|
|
43
43
|
clientSrc?: string;
|
|
44
|
+
extensionSrc?: string;
|
|
44
45
|
nonce?: string;
|
|
45
46
|
/** Scriptless admin preview: the banner renders open for the given region; htmlAttrs go on the iframe's <html>. */
|
|
46
47
|
preview?: {
|
package/dist/render/banner.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { declaredScriptDelivery } from './scripts.js';
|
|
1
2
|
/** @file Pure strings: no DOM, no Node. The same output feeds live pages, the static export and the admin
|
|
2
3
|
* preview iframe, so preview and live cannot drift. The markup is identical for every visitor: region and GPC
|
|
3
4
|
* variants are toggled by CSS from <html> attributes the client sets, so pages stay cacheable. */
|
|
@@ -50,8 +51,9 @@ export function renderBanner({ mode, client, copy }, options = {}) {
|
|
|
50
51
|
if (!BANNER_MODES.includes(mode))
|
|
51
52
|
return EMPTY;
|
|
52
53
|
const evidence = options.evidence ?? { mode: 'local' };
|
|
54
|
+
const delivery = clientAssets({ client, preview: Boolean(options.preview) });
|
|
53
55
|
const n = options.nonce ? ` nonce="${esc(options.nonce)}"` : '';
|
|
54
|
-
const head = `<script type="application/json" id="${CONFIG_ID}">${json({ ...client, banner: mode, evidence })}</script>${clientScript(options, n)}`;
|
|
56
|
+
const head = delivery.head + `<script type="application/json" id="${CONFIG_ID}">${json({ ...delivery.client, banner: mode, evidence })}</script>${clientScript(options, n)}`;
|
|
55
57
|
const htmlAttrs = previewAttrs(options.preview);
|
|
56
58
|
if (mode !== 'jini')
|
|
57
59
|
return { head, body: '', htmlAttrs, problems: [] };
|
|
@@ -60,8 +62,11 @@ export function renderBanner({ mode, client, copy }, options = {}) {
|
|
|
60
62
|
return { head: style + head, body: markup({ copy: resolveCopy(copy), options, evidence }), htmlAttrs, problems: compiled.problems };
|
|
61
63
|
}
|
|
62
64
|
/** A preview is scriptless: the admin iframe shows the markup, never runs the client. */
|
|
63
|
-
function clientScript({ preview, clientSrc }, nonceAttr) {
|
|
64
|
-
|
|
65
|
+
function clientScript({ preview, clientSrc, extensionSrc }, nonceAttr) {
|
|
66
|
+
if (preview || !clientSrc)
|
|
67
|
+
return '';
|
|
68
|
+
const core = `<script src="${esc(clientSrc)}" defer${nonceAttr}></script>`;
|
|
69
|
+
return core + (extensionSrc ? `<script src="${esc(extensionSrc)}" defer${nonceAttr}></script>` : '');
|
|
65
70
|
}
|
|
66
71
|
/** Attributes for the preview iframe's <html>, standing in for what the client sets on a live page. */
|
|
67
72
|
function previewAttrs(preview) {
|
|
@@ -93,4 +98,8 @@ ${b('do-not-sell', copy.doNotSellLabel, ' class="jini-consent-link" data-consent
|
|
|
93
98
|
<div class="jini-consent-actions">${b('save', copy.saveLabel)}${b('reject', copy.rejectLabel)}</div></details>
|
|
94
99
|
</section>${options.preview ? '' : reopen}`;
|
|
95
100
|
}
|
|
101
|
+
function clientAssets({ client, preview }) {
|
|
102
|
+
const delivery = declaredScriptDelivery({ scripts: client.scripts ?? [] });
|
|
103
|
+
return { head: preview ? '' : delivery.head, client: client.scripts ? { ...client, scripts: delivery.scripts } : client };
|
|
104
|
+
}
|
|
96
105
|
//# sourceMappingURL=banner.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/** Compact defaults for the Jini banner. Theme tokens (--jini-surface, --jini-text, ...) are honoured when the
|
|
2
2
|
* host page defines them; owner tokens/CSS from compileConsentCss() follow, then the engine parity block. */
|
|
3
|
-
export declare const BASE_CSS = "\n.jini-consent{--consent-bg:var(--jini-surface,var(--bg,Canvas));--consent-fg:var(--jini-text,var(--fg,CanvasText));--consent-border:var(--jini-border,var(--border,color-mix(in srgb,var(--consent-fg) 14%,var(--consent-bg))));--consent-accent:var(--jini-accent,var(--accent,var(--consent-fg)));--consent-radius:var(--jini-radius,14px);--consent-button-bg:color-mix(in srgb,var(--consent-fg) 7%,var(--consent-bg));--consent-button-hover-bg:color-mix(in srgb,var(--consent-fg) 13%,var(--consent-bg));--consent-button-border:color-mix(in srgb,var(--consent-fg) 26%,var(--consent-bg));--consent-shadow:0 1px 2px #0000000f,0 12px 32px #00000024;position:fixed;inset:auto 1rem 1rem;z-index:2147483647;margin:auto;max-width:380px;max-height:85dvh;overflow:auto;padding:14px 16px;border:1px solid var(--consent-border);border-radius:var(--consent-radius);background:var(--consent-bg);color:var(--consent-fg);box-shadow:var(--consent-shadow);font:inherit;font-size:13.5px;line-height:1.45;text-align:start;box-sizing:border-box}\n.jini-consent *,.jini-consent *::before,.jini-consent *::after{box-sizing:border-box}\n.jini-consent h2{font:inherit;font-size:15px;font-weight:650;margin:0 0 4px;color:inherit}\n.jini-consent p{margin:0 0 6px;color:inherit}\n.jini-consent-links{font-size:12.5px}\n.jini-consent-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(120px,100%),1fr));gap:8px;margin-top:10px}\n.jini-consent button,.jini-consent summary,.jini-consent-reopen{font:inherit;cursor:pointer}\n.jini-consent button{min-height:34px;padding:4px 12px;border:1px solid var(--consent-button-border);border-radius:8px;background:var(--consent-button-bg);color:inherit;font-weight:600;transition:background-color .15s ease,border-color .15s ease}\n.jini-consent button:hover{background:var(--consent-button-hover-bg)}\n.jini-consent .jini-consent-link{margin-top:10px;padding:0;min-height:0;border:0;background:transparent;font-size:12.5px;font-weight:400;text-decoration:underline;text-underline-offset:.2em}\n.jini-consent a{color:inherit;text-decoration:underline;text-underline-offset:.2em;text-decoration-thickness:1px}\n.jini-consent :focus-visible{outline:3px solid currentColor;outline-offset:2px;border-radius:8px}\n.jini-consent details{margin-top:10px}\n.jini-consent summary{display:inline-flex;align-items:center;list-style:none;font-size:12.5px;text-decoration:underline;text-underline-offset:.2em}\n.jini-consent summary::-webkit-details-marker{display:none}\n.jini-consent fieldset{margin:.25rem 0 0;padding:.25rem .875rem;border:1px solid var(--consent-border);border-radius:12px}\n.jini-consent legend{padding:0 .35rem;font-size:.8125rem;font-weight:600;color:inherit}\n.jini-consent label{display:flex;align-items:center;gap:.6rem;padding:.35rem 0;min-height:32px}\n.jini-consent input{width:1.15rem;height:1.15rem;margin:0;accent-color:var(--consent-accent)}\n#jini-consent:where([data-placement=\"bottom-left\"]){inset:auto auto 1rem 1rem}\n#jini-consent:where([data-placement=\"bottom-right\"]){inset:auto 1rem 1rem auto}\n#jini-consent:where([data-placement=\"top-bar\"]){inset:1rem 1rem auto}\n.jini-consent-reopen{display:none;position:fixed;left:1rem;bottom:1rem;z-index:2147483646;padding:.5rem 1rem;border:1px solid var(--jini-border,#0002);border-radius:999px;background:var(--jini-surface,Canvas);color:var(--jini-text,CanvasText);font-size:12.5px;box-shadow:0 1px 2px #0000000f,0 8px 20px #0000001f}\nhtml[data-consent=\"set\"]:not([data-consent-open]) .jini-consent-reopen{display:inline-flex}\n@media(max-width:640px){.jini-consent{inset:auto 0 0;padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));border-radius:var(--consent-radius) var(--consent-radius) 0 0}}\n@media(prefers-reduced-motion:reduce){.jini-consent,.jini-consent *{transition:none!important;animation:none!important}}\n";
|
|
3
|
+
export declare const BASE_CSS = "\n.jini-consent{--consent-bg:var(--jini-surface,var(--bg,Canvas));--consent-fg:var(--jini-text,var(--fg,CanvasText));--consent-border:var(--jini-border,var(--border,color-mix(in srgb,var(--consent-fg) 14%,var(--consent-bg))));--consent-accent:var(--jini-accent,var(--accent,var(--consent-fg)));--consent-radius:var(--jini-radius,14px);--consent-button-bg:color-mix(in srgb,var(--consent-fg) 7%,var(--consent-bg));--consent-button-hover-bg:color-mix(in srgb,var(--consent-fg) 13%,var(--consent-bg));--consent-button-border:color-mix(in srgb,var(--consent-fg) 26%,var(--consent-bg));--consent-shadow:0 1px 2px #0000000f,0 12px 32px #00000024;position:fixed;inset:auto 1rem 1rem;z-index:2147483647;margin:auto;max-width:380px;max-height:85dvh;overflow:auto;padding:14px 16px;border:1px solid var(--consent-border);border-radius:var(--consent-radius);background:var(--consent-bg);color:var(--consent-fg);box-shadow:var(--consent-shadow);font:inherit;font-size:13.5px;line-height:1.45;text-align:start;box-sizing:border-box}\n.jini-consent *,.jini-consent *::before,.jini-consent *::after{box-sizing:border-box}\n.jini-consent h2{font:inherit;font-size:15px;font-weight:650;margin:0 0 4px;color:inherit}\n.jini-consent p{margin:0 0 6px;color:inherit}\n.jini-consent-links{font-size:12.5px}\n.jini-consent-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(120px,100%),1fr));gap:8px;margin-top:10px}\n.jini-consent button,.jini-consent summary,.jini-consent-reopen{font:inherit;cursor:pointer}\n.jini-consent button{min-height:34px;padding:4px 12px;border:1px solid var(--consent-button-border);border-radius:8px;background:var(--consent-button-bg);color:inherit;font-weight:600;transition:background-color .15s ease,border-color .15s ease}\n.jini-consent button:hover{background:var(--consent-button-hover-bg)}\n.jini-consent .jini-consent-link{margin-top:10px;padding:0;min-height:0;border:0;background:transparent;font-size:12.5px;font-weight:400;text-decoration:underline;text-underline-offset:.2em}\n.jini-consent a{color:inherit;text-decoration:underline;text-underline-offset:.2em;text-decoration-thickness:1px}\n.jini-consent :focus-visible{outline:3px solid currentColor;outline-offset:2px;border-radius:8px}\n.jini-consent details{margin-top:10px}\n.jini-consent summary{display:inline-flex;align-items:center;list-style:none;font-size:12.5px;text-decoration:underline;text-underline-offset:.2em}\n.jini-consent summary::-webkit-details-marker{display:none}\n.jini-consent fieldset{margin:.25rem 0 0;padding:.25rem .875rem;border:1px solid var(--consent-border);border-radius:12px}\n.jini-consent legend{padding:0 .35rem;font-size:.8125rem;font-weight:600;color:inherit}\n.jini-consent label{display:flex;align-items:center;gap:.6rem;padding:.35rem 0;min-height:32px}\n.jini-consent input{width:1.15rem;height:1.15rem;margin:0;accent-color:var(--consent-accent)}\n#jini-consent:where([data-placement=\"bottom-left\"]){inset:auto auto 1rem 1rem}\n#jini-consent:where([data-placement=\"bottom-right\"]){inset:auto 1rem 1rem auto}\n#jini-consent:where([data-placement=\"top-bar\"]){inset:1rem 1rem auto}\n.jini-consent-reopen{display:none;position:fixed;left:1rem;bottom:1rem;z-index:2147483646;padding:.5rem 1rem;border:1px solid var(--jini-border,#0002);border-radius:999px;background:var(--jini-surface,Canvas);color:var(--jini-text,CanvasText);font-size:12.5px;box-shadow:0 1px 2px #0000000f,0 8px 20px #0000001f}\nhtml[data-consent=\"set\"]:not([data-consent-open]) .jini-consent-reopen{display:inline-flex}\n.jini-consent-settings{display:inline-block;margin:1rem;padding:.5rem .75rem;color:var(--jini-text,var(--fg,CanvasText));background:var(--jini-surface,var(--bg,Canvas));border:1px solid var(--jini-border,var(--border,currentColor));border-radius:var(--jini-radius,.5rem);font:inherit;text-decoration:underline}.jini-consent-settings:focus-visible{outline:2px solid currentColor;outline-offset:2px}\n@media(max-width:640px){.jini-consent{inset:auto 0 0;padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));border-radius:var(--consent-radius) var(--consent-radius) 0 0}}\n@media(prefers-reduced-motion:reduce){.jini-consent,.jini-consent *{transition:none!important;animation:none!important}}\n";
|
|
4
4
|
//# sourceMappingURL=base-css.d.ts.map
|
package/dist/render/base-css.js
CHANGED
|
@@ -29,6 +29,7 @@ export const BASE_CSS = `
|
|
|
29
29
|
#jini-consent:where([data-placement="top-bar"]){inset:1rem 1rem auto}
|
|
30
30
|
.jini-consent-reopen{display:none;position:fixed;left:1rem;bottom:1rem;z-index:2147483646;padding:.5rem 1rem;border:1px solid var(--jini-border,#0002);border-radius:999px;background:var(--jini-surface,Canvas);color:var(--jini-text,CanvasText);font-size:12.5px;box-shadow:0 1px 2px #0000000f,0 8px 20px #0000001f}
|
|
31
31
|
html[data-consent="set"]:not([data-consent-open]) .jini-consent-reopen{display:inline-flex}
|
|
32
|
+
.jini-consent-settings{display:inline-block;margin:1rem;padding:.5rem .75rem;color:var(--jini-text,var(--fg,CanvasText));background:var(--jini-surface,var(--bg,Canvas));border:1px solid var(--jini-border,var(--border,currentColor));border-radius:var(--jini-radius,.5rem);font:inherit;text-decoration:underline}.jini-consent-settings:focus-visible{outline:2px solid currentColor;outline-offset:2px}
|
|
32
33
|
@media(max-width:640px){.jini-consent{inset:auto 0 0;padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));border-radius:var(--consent-radius) var(--consent-radius) 0 0}}
|
|
33
34
|
@media(prefers-reduced-motion:reduce){.jini-consent,.jini-consent *{transition:none!important;animation:none!important}}
|
|
34
35
|
`;
|
package/dist/render/index.d.ts
CHANGED
|
@@ -4,4 +4,5 @@ export type { BannerCopy, BannerCopyInput, ConsentPlacement, RenderBannerConfig,
|
|
|
4
4
|
export { compileConsentCss, scopedSelector, parityCss, CONSENT_CSS_SCOPE, CONSENT_MAX_CSS_LENGTH } from './css.js';
|
|
5
5
|
export type { ConsentAppearanceTokens, ConsentCssProblem, ConsentCssResult } from './css.js';
|
|
6
6
|
export { BASE_CSS } from './base-css.js';
|
|
7
|
+
export { renderScriptAssets } from './scripts.js';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/render/index.js
CHANGED
|
@@ -2,4 +2,5 @@
|
|
|
2
2
|
export { renderBanner, resolveCopy, safeHref, DEFAULT_COPY, CONSENT_PLACEMENTS } from './banner.js';
|
|
3
3
|
export { compileConsentCss, scopedSelector, parityCss, CONSENT_CSS_SCOPE, CONSENT_MAX_CSS_LENGTH } from './css.js';
|
|
4
4
|
export { BASE_CSS } from './base-css.js';
|
|
5
|
+
export { renderScriptAssets } from './scripts.js';
|
|
5
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DeclaredScript } from '../contract.js';
|
|
2
|
+
/** Ordinary delivery when consent is off. Validation never reads or transforms page HTML. */
|
|
3
|
+
export declare function renderScriptAssets({ scripts }: {
|
|
4
|
+
scripts: readonly DeclaredScript[];
|
|
5
|
+
}, _optional?: {}): string;
|
|
6
|
+
/** Automatic assets never depend on context, receipts or the optional browser lifecycle. */
|
|
7
|
+
export declare function declaredScriptDelivery({ scripts }: {
|
|
8
|
+
scripts: readonly DeclaredScript[];
|
|
9
|
+
}, _optional?: {}): {
|
|
10
|
+
head: string;
|
|
11
|
+
scripts: DeclaredScript[];
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=scripts.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { allows, validateScripts } from '../contracts/scripts.js';
|
|
2
|
+
import { DENIED } from '../contracts/policy.js';
|
|
3
|
+
const attribute = (value) => value.replace(/&/g, '&').replace(/"/g, '"').replace(/</g, '<');
|
|
4
|
+
/** Ordinary delivery when consent is off. Validation never reads or transforms page HTML. */
|
|
5
|
+
export function renderScriptAssets({ scripts }, _optional = {}) {
|
|
6
|
+
return validateScripts({ scripts }).scripts.map(script => `<script data-jini-declared-script src="${attribute(script.src)}" defer></script>`).join('');
|
|
7
|
+
}
|
|
8
|
+
/** Automatic assets never depend on context, receipts or the optional browser lifecycle. */
|
|
9
|
+
export function declaredScriptDelivery({ scripts }, _optional = {}) {
|
|
10
|
+
const accepted = validateScripts({ scripts }).scripts;
|
|
11
|
+
const automatic = accepted.filter(script => allows({ state: { allowed: DENIED }, consent: script.consent }));
|
|
12
|
+
const conditional = accepted.filter(script => !allows({ state: { allowed: DENIED }, consent: script.consent }));
|
|
13
|
+
return { head: renderScriptAssets({ scripts: automatic }), scripts: conditional };
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=scripts.js.map
|
package/dist/server/region.d.ts
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
* header resolver should be registered only when that host is the site's configured ingress (a header
|
|
3
3
|
* from anywhere else can be forged by the visitor). Nothing here relaxes on a browser hint. */
|
|
4
4
|
import { type RegionHint, type RegionResolver, type RegionRequest, type SlotKind } from '../contract.js';
|
|
5
|
-
/** A trusted country header. Unknown (XX) and Tor (T1) defer to the next resolver.
|
|
5
|
+
/** A trusted country/subdivision header. Unknown (XX) and Tor (T1) defer to the next resolver.
|
|
6
|
+
* Configured countries include valid subdivision codes; exact configured subdivisions stay scoped.
|
|
7
|
+
* @complexity O(header bytes), with no I/O. */
|
|
6
8
|
export declare function headerResolver({ id, header }: {
|
|
7
9
|
id: string;
|
|
8
10
|
header: string;
|
package/dist/server/region.js
CHANGED
|
@@ -2,14 +2,19 @@
|
|
|
2
2
|
* header resolver should be registered only when that host is the site's configured ingress (a header
|
|
3
3
|
* from anywhere else can be forged by the visitor). Nothing here relaxes on a browser hint. */
|
|
4
4
|
import { REGION_KIND } from '../contract.js';
|
|
5
|
-
/** A trusted country header. Unknown (XX) and Tor (T1) defer to the next resolver.
|
|
5
|
+
/** A trusted country/subdivision header. Unknown (XX) and Tor (T1) defer to the next resolver.
|
|
6
|
+
* Configured countries include valid subdivision codes; exact configured subdivisions stay scoped.
|
|
7
|
+
* @complexity O(header bytes), with no I/O. */
|
|
6
8
|
export function headerResolver({ id, header }, { usValues = ['US'] } = {}) {
|
|
7
9
|
const us = new Set(usValues.map(v => v.toUpperCase()));
|
|
8
10
|
return { id, kind: REGION_KIND, resolve: ({ request }) => {
|
|
9
11
|
const value = request.header(header)?.trim().toUpperCase();
|
|
10
12
|
if (!value || value === 'XX' || value === 'T1')
|
|
11
13
|
return null;
|
|
12
|
-
|
|
14
|
+
if (!/^[A-Z]{2}(?:-[A-Z0-9]{1,3})?$/.test(value))
|
|
15
|
+
return 'strict';
|
|
16
|
+
const country = value.split('-')[0];
|
|
17
|
+
return us.has(value) || us.has(country) ? 'us' : 'strict';
|
|
13
18
|
} };
|
|
14
19
|
}
|
|
15
20
|
/** Accepts a live resolver (resolve()) or the data-only manifest form ({ header, usValues }). */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jini-ai/cookie-consent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Standalone, vendor-free cookie consent: a consent-state contract any banner can drive, a ~3 KB browser client, a pure-string banner renderer with owner CSS, web-standard receipts and open plugin slots.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"runtime": "universal",
|
|
15
15
|
"isolation": {
|
|
16
16
|
"entries": {
|
|
17
|
-
"./client.min.js": "client"
|
|
17
|
+
"./client.min.js": "client",
|
|
18
|
+
"./extensions.min.js": "client"
|
|
18
19
|
}
|
|
19
20
|
},
|
|
20
21
|
"entries": {
|
|
@@ -26,12 +27,14 @@
|
|
|
26
27
|
"./client.min.js": "browser",
|
|
27
28
|
"./banner.css": "browser",
|
|
28
29
|
"./server": "universal",
|
|
29
|
-
"./node": "node"
|
|
30
|
+
"./node": "node",
|
|
31
|
+
"./extensions.min.js": "browser"
|
|
30
32
|
}
|
|
31
33
|
},
|
|
32
34
|
"type": "module",
|
|
33
35
|
"sideEffects": [
|
|
34
|
-
"./dist/client.min.js"
|
|
36
|
+
"./dist/client.min.js",
|
|
37
|
+
"./dist/extensions.min.js"
|
|
35
38
|
],
|
|
36
39
|
"main": "./dist/contract.js",
|
|
37
40
|
"types": "./dist/contract.d.ts",
|
|
@@ -72,7 +75,8 @@
|
|
|
72
75
|
"types": "./dist/node/index.d.ts",
|
|
73
76
|
"import": "./dist/node/index.js",
|
|
74
77
|
"default": "./dist/node/index.js"
|
|
75
|
-
}
|
|
78
|
+
},
|
|
79
|
+
"./extensions.min.js": "./dist/extensions.min.js"
|
|
76
80
|
},
|
|
77
81
|
"files": [
|
|
78
82
|
"dist",
|
|
@@ -92,8 +96,7 @@
|
|
|
92
96
|
"esbuild": "^0.28.1",
|
|
93
97
|
"jsdom": "^25.0.1",
|
|
94
98
|
"typescript": "^5.6.0",
|
|
95
|
-
"vitest": "^2.1.0"
|
|
96
|
-
"@jini-ai/cms": "^0.6.19"
|
|
99
|
+
"vitest": "^2.1.0"
|
|
97
100
|
},
|
|
98
101
|
"scripts": {
|
|
99
102
|
"build": "tsc -p tsconfig.json && node scripts/build-client.mjs",
|