@unisim/sdk 0.119.0 → 0.121.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/dist/PrivacyNote.d.ts +10 -54
- package/dist/PrivacyNote.d.ts.map +1 -1
- package/dist/PrivacyNote.js +247 -16
- package/dist/PrivacyNote.js.map +1 -1
- package/package.json +1 -1
package/dist/PrivacyNote.d.ts
CHANGED
|
@@ -1,57 +1,4 @@
|
|
|
1
1
|
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* The suite's privacy claim, stated where the anxiety is — beside the thing
|
|
4
|
-
* that takes your file, at the moment you are deciding whether to hand a web
|
|
5
|
-
* page a document.
|
|
6
|
-
*
|
|
7
|
-
* Four deliberate choices, all of them load-bearing:
|
|
8
|
-
*
|
|
9
|
-
* 1. **It names the alternative.** "Everything stays on your device" was
|
|
10
|
-
* already on most of these landing pages two or three times over, and read
|
|
11
|
-
* as boilerplate — every upload-and-scrape site says something similar.
|
|
12
|
-
* Naming what the other tools do, and *why* they do it (to render your file
|
|
13
|
-
* on their server, and mine what is in it), is the half that carries
|
|
14
|
-
* information.
|
|
15
|
-
*
|
|
16
|
-
* 2. **"Guaranteed" is the link, not a badge.** A trust seal you cannot click
|
|
17
|
-
* is a claim about a claim. This one opens the app's own evidence, which is
|
|
18
|
-
* the only guarantee anybody can actually check — so the word that makes
|
|
19
|
-
* the promise is the word that hands over the proof. `repo` is required for
|
|
20
|
-
* exactly that reason: a note with nothing to open is the badge.
|
|
21
|
-
*
|
|
22
|
-
* ⚠️ Prefer `proof` (the app's PRIVACY.md) over `repo` alone. The word
|
|
23
|
-
* invites a non-developer to go and look, and a repository root answers
|
|
24
|
-
* that invitation with a file tree — which is only evidence to someone who
|
|
25
|
-
* could already have read the source without being asked.
|
|
26
|
-
*
|
|
27
|
-
* 3. ⚠️ **`except` is what keeps the sentence true.** Several apps in the
|
|
28
|
-
* suite CAN send a file off the device — hosted backup ("Store with
|
|
29
|
-
* UNI·SIM") and, in PDF, "Send to sign". An unqualified "never leaves this
|
|
30
|
-
* computer" would be false for those, and false in the exact place the
|
|
31
|
-
* Guaranteed link invites people to go and look. Work out what YOUR app can
|
|
32
|
-
* send and say it. `except={null}` is for an app that genuinely never sends
|
|
33
|
-
* anything — the claim is then unqualified because it is unqualified, not
|
|
34
|
-
* because the caveat was inconvenient.
|
|
35
|
-
*
|
|
36
|
-
* 4. **`subject` is per-app, not a generic "your file".** "Your PDF", "Your
|
|
37
|
-
* images", "Your recording" name the actual thing in front of the reader,
|
|
38
|
-
* and a concrete noun is what makes a promise feel like it is about them.
|
|
39
|
-
* It is also not optional dressing: several apps in the suite never touch a
|
|
40
|
-
* file at all — QR builds a code from what you type, BlackBook holds
|
|
41
|
-
* contacts — so "your file" would simply be wrong there.
|
|
42
|
-
*
|
|
43
|
-
* 5. **Green, not the brand orange — and not slate.** Inherited from the
|
|
44
|
-
* PrivacyStrip that Universal Compress and Universal Converter already
|
|
45
|
-
* shipped, whose reasoning holds: this is a reassurance, and an orange
|
|
46
|
-
* strip reads as a warning at a glance. #2F9E57 is the suite's semantic
|
|
47
|
-
* "good" (BRANDING.md). The shield does NOT become their padlock, though —
|
|
48
|
-
* a padlock is the browser's own mark for "this connection is encrypted",
|
|
49
|
-
* a promise about the wire rather than about where the file went.
|
|
50
|
-
*
|
|
51
|
-
* ⚠️ Inline styles, not Tailwind classes: this ships inside node_modules and
|
|
52
|
-
* the apps' Tailwind builds do not scan it. Classes here would silently render
|
|
53
|
-
* unstyled. Same reason DropRing and DropAnywhere are written this way.
|
|
54
|
-
*/
|
|
55
2
|
export interface PrivacyNoteProps {
|
|
56
3
|
/**
|
|
57
4
|
* The app's own repository. Required: see note 2. This is the fallback for
|
|
@@ -103,8 +50,17 @@ export interface PrivacyNoteProps {
|
|
|
103
50
|
* 'light' or 'dark' before it gets here.
|
|
104
51
|
*/
|
|
105
52
|
theme?: 'light' | 'dark';
|
|
53
|
+
/**
|
|
54
|
+
* The X. On by default: see note 6. Pass `false` only for a surface where
|
|
55
|
+
* the claim is the point of the page rather than a reminder on the way past
|
|
56
|
+
* it — a PRIVACY page, an About panel — never merely to keep the note in
|
|
57
|
+
* front of someone who has already closed it elsewhere.
|
|
58
|
+
*/
|
|
59
|
+
dismissible?: boolean;
|
|
60
|
+
/** Called after the note is dismissed, in case the app wants to reflow. */
|
|
61
|
+
onDismiss?: () => void;
|
|
106
62
|
className?: string;
|
|
107
63
|
style?: CSSProperties;
|
|
108
64
|
}
|
|
109
|
-
export declare function PrivacyNote({ repo, proof, subject, plural, except, headline, theme, className, style, }: PrivacyNoteProps): import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
export declare function PrivacyNote({ repo, proof, subject, plural, except, headline, theme, dismissible, onDismiss, className, style, }: PrivacyNoteProps): import("react/jsx-runtime").JSX.Element | null;
|
|
110
66
|
//# sourceMappingURL=PrivacyNote.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivacyNote.d.ts","sourceRoot":"","sources":["../src/PrivacyNote.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PrivacyNote.d.ts","sourceRoot":"","sources":["../src/PrivacyNote.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AA0KrD,MAAM,WAAW,gBAAgB;IAC/B;;;;;;OAMG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kFAAkF;IAClF,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,iFAAiF;IACjF,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACxB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB;AAED,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,KAAK,EACL,OAAqB,EACrB,MAAc,EACd,MAAa,EACb,QAAiF,EACjF,KAAe,EACf,WAAkB,EAClB,SAAS,EACT,SAAS,EACT,KAAK,GACN,EAAE,gBAAgB,kDAyMlB"}
|
package/dist/PrivacyNote.js
CHANGED
|
@@ -1,6 +1,200 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
4
|
+
import { BRAND, DARK_THEME, NEUTRAL } from './brand.js';
|
|
5
|
+
/**
|
|
6
|
+
* The suite's privacy claim, stated where the anxiety is — beside the thing
|
|
7
|
+
* that takes your file, at the moment you are deciding whether to hand a web
|
|
8
|
+
* page a document.
|
|
9
|
+
*
|
|
10
|
+
* Four deliberate choices, all of them load-bearing:
|
|
11
|
+
*
|
|
12
|
+
* 1. **It names the alternative.** "Everything stays on your device" was
|
|
13
|
+
* already on most of these landing pages two or three times over, and read
|
|
14
|
+
* as boilerplate — every upload-and-scrape site says something similar.
|
|
15
|
+
* Naming what the other tools do, and *why* they do it (to render your file
|
|
16
|
+
* on their server, and mine what is in it), is the half that carries
|
|
17
|
+
* information.
|
|
18
|
+
*
|
|
19
|
+
* 2. **"Guaranteed" is the link, not a badge.** A trust seal you cannot click
|
|
20
|
+
* is a claim about a claim. This one opens the app's own evidence, which is
|
|
21
|
+
* the only guarantee anybody can actually check — so the word that makes
|
|
22
|
+
* the promise is the word that hands over the proof. `repo` is required for
|
|
23
|
+
* exactly that reason: a note with nothing to open is the badge.
|
|
24
|
+
*
|
|
25
|
+
* ⚠️ Prefer `proof` (the app's PRIVACY.md) over `repo` alone. The word
|
|
26
|
+
* invites a non-developer to go and look, and a repository root answers
|
|
27
|
+
* that invitation with a file tree — which is only evidence to someone who
|
|
28
|
+
* could already have read the source without being asked.
|
|
29
|
+
*
|
|
30
|
+
* 3. ⚠️ **`except` is what keeps the sentence true.** Several apps in the
|
|
31
|
+
* suite CAN send a file off the device — hosted backup ("Store with
|
|
32
|
+
* UNI·SIM") and, in PDF, "Send to sign". An unqualified "never leaves this
|
|
33
|
+
* computer" would be false for those, and false in the exact place the
|
|
34
|
+
* Guaranteed link invites people to go and look. Work out what YOUR app can
|
|
35
|
+
* send and say it. `except={null}` is for an app that genuinely never sends
|
|
36
|
+
* anything — the claim is then unqualified because it is unqualified, not
|
|
37
|
+
* because the caveat was inconvenient.
|
|
38
|
+
*
|
|
39
|
+
* 4. **`subject` is per-app, not a generic "your file".** "Your PDF", "Your
|
|
40
|
+
* images", "Your recording" name the actual thing in front of the reader,
|
|
41
|
+
* and a concrete noun is what makes a promise feel like it is about them.
|
|
42
|
+
* It is also not optional dressing: several apps in the suite never touch a
|
|
43
|
+
* file at all — QR builds a code from what you type, BlackBook holds
|
|
44
|
+
* contacts — so "your file" would simply be wrong there.
|
|
45
|
+
*
|
|
46
|
+
* 5. **Neutral grey, with the brand orange carrying the link.** James's call,
|
|
47
|
+
* 2026-08-28, and it overturns what this component shipped with.
|
|
48
|
+
*
|
|
49
|
+
* It was green, inherited from the PrivacyStrip that Compress and Converter
|
|
50
|
+
* already had, on the argument that "a reassurance rendered grey or orange
|
|
51
|
+
* reads as a warning at a glance". That argument is recorded here rather
|
|
52
|
+
* than deleted, because it is not silly — but a whole green card also reads
|
|
53
|
+
* as a *status banner*, something the app is telling you went right, and
|
|
54
|
+
* this is neither a status nor an alert. It is the page's own standing
|
|
55
|
+
* promise. Grey lets it sit as part of the furniture and puts the only
|
|
56
|
+
* colour on the one thing that is meant to be clicked.
|
|
57
|
+
*
|
|
58
|
+
* ⚠️ **The two oranges here are different on purpose, and swapping them
|
|
59
|
+
* breaks contrast.** `BRAND.orangeText` (#c2410c, 5.18:1 on white) is used
|
|
60
|
+
* where the orange IS TEXT; the brand orange #fe8c01 measures 2.34:1 and
|
|
61
|
+
* `orangeDeep` 3.84:1, both under AA's 4.5:1 — the exact bug that got the
|
|
62
|
+
* navbar's "100%" flagged on every page of every app. The shield is a
|
|
63
|
+
* glyph, not text, so it answers the 3:1 non-text rule and takes
|
|
64
|
+
* `orangeDeep`. See `brand.ts`.
|
|
65
|
+
*
|
|
66
|
+
* The shield still does NOT become a padlock — a padlock is the browser's
|
|
67
|
+
* own mark for "this connection is encrypted", a promise about the wire
|
|
68
|
+
* rather than about where the file went.
|
|
69
|
+
*
|
|
70
|
+
* 6. **It can be dismissed, and the dismissal is suite-wide.** James's call,
|
|
71
|
+
* 2026-08-29. The note is aimed at a first-time reader deciding whether to
|
|
72
|
+
* trust the page; to somebody who already uses four of these apps it is
|
|
73
|
+
* furniture they have read four times. The X closes it *everywhere* — see
|
|
74
|
+
* `writeDismissed()` for how a single click carries across the suite — and
|
|
75
|
+
* the wording of the tooltip says so, because a close button that only
|
|
76
|
+
* silences this one card would be a worse promise than no button at all.
|
|
77
|
+
*
|
|
78
|
+
* ⚠️ Dismissal must never be the *only* place the claim is made. The X
|
|
79
|
+
* hides a reminder, not the guarantee; the app's PRIVACY.md and the About /
|
|
80
|
+
* settings surfaces still carry it for anyone who comes looking later.
|
|
81
|
+
*
|
|
82
|
+
* ⚠️ Inline styles, not Tailwind classes: this ships inside node_modules and
|
|
83
|
+
* the apps' Tailwind builds do not scan it. Classes here would silently render
|
|
84
|
+
* unstyled. Same reason DropRing and DropAnywhere are written this way.
|
|
85
|
+
*/
|
|
86
|
+
// ──────────────────────────────────────────────────────────────────────────────
|
|
87
|
+
// "Don't show again" — one click, honoured by every Universal app.
|
|
88
|
+
//
|
|
89
|
+
// Two stores on purpose, because the suite spans two kinds of origin:
|
|
90
|
+
//
|
|
91
|
+
// • **A cookie on `.unisim.co.uk`** is what makes the promise in the tooltip
|
|
92
|
+
// true. localStorage is origin-scoped, so it would only ever cover the one
|
|
93
|
+
// host — fine today, when every Universal App lives at
|
|
94
|
+
// `opensource.unisim.co.uk/<app>` and therefore shares an origin, but that
|
|
95
|
+
// is an accident of routing rather than a guarantee, and the first app to
|
|
96
|
+
// get its own subdomain would silently start showing the note again to
|
|
97
|
+
// somebody who had already closed it. The cookie survives that move.
|
|
98
|
+
//
|
|
99
|
+
// • **localStorage** is the fallback that covers what a cookie on the zone
|
|
100
|
+
// cannot reach: the packaged desktop builds (Electron, `file://`) and
|
|
101
|
+
// `localhost` dev. There the dismissal is per-app, which is the honest
|
|
102
|
+
// limit — there is no shared origin to hang it on.
|
|
103
|
+
//
|
|
104
|
+
// Reading checks both, so whichever one the click could write is the one that
|
|
105
|
+
// answers. Neither is treated as required: storage throws outright in some
|
|
106
|
+
// privacy modes, and a note that crashes the landing page rather than render
|
|
107
|
+
// one extra time is not a trade worth making.
|
|
108
|
+
// ──────────────────────────────────────────────────────────────────────────────
|
|
109
|
+
const DISMISS_KEY = 'universal:privacy_note_dismissed';
|
|
110
|
+
/**
|
|
111
|
+
* Fired on `window` when the note is dismissed, so every other copy mounted on
|
|
112
|
+
* the same page disappears with it. Compress and Converter each render one on
|
|
113
|
+
* the landing screen and another inside the studio; without this, closing one
|
|
114
|
+
* would leave the other sitting there until a reload.
|
|
115
|
+
*/
|
|
116
|
+
const DISMISS_EVENT = 'unisim:privacy-note-dismissed';
|
|
117
|
+
/** Effectively forever. A preference like this should not quietly expire. */
|
|
118
|
+
const DISMISS_MAX_AGE = 60 * 60 * 24 * 365 * 10;
|
|
119
|
+
/**
|
|
120
|
+
* The zone to hang the cookie on, or `null` when there isn't one — desktop
|
|
121
|
+
* builds, `localhost`, and any preview host that isn't ours.
|
|
122
|
+
*/
|
|
123
|
+
function suiteCookieDomain() {
|
|
124
|
+
if (typeof window === 'undefined')
|
|
125
|
+
return null;
|
|
126
|
+
const host = window.location.hostname;
|
|
127
|
+
return host === 'unisim.co.uk' || host.endsWith('.unisim.co.uk')
|
|
128
|
+
? '.unisim.co.uk'
|
|
129
|
+
: null;
|
|
130
|
+
}
|
|
131
|
+
function readDismissed() {
|
|
132
|
+
if (typeof window === 'undefined')
|
|
133
|
+
return false;
|
|
134
|
+
try {
|
|
135
|
+
if (window.localStorage.getItem(DISMISS_KEY) === '1')
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
catch {
|
|
139
|
+
// Storage disabled (Safari private mode, hardened profiles). Fall through
|
|
140
|
+
// to the cookie rather than taking the page down with it.
|
|
141
|
+
}
|
|
142
|
+
if (typeof document === 'undefined')
|
|
143
|
+
return false;
|
|
144
|
+
const name = encodeURIComponent(DISMISS_KEY);
|
|
145
|
+
return document.cookie
|
|
146
|
+
.split('; ')
|
|
147
|
+
.some((entry) => entry.slice(0, entry.indexOf('=')) === name);
|
|
148
|
+
}
|
|
149
|
+
function writeDismissed() {
|
|
150
|
+
if (typeof window === 'undefined')
|
|
151
|
+
return;
|
|
152
|
+
try {
|
|
153
|
+
window.localStorage.setItem(DISMISS_KEY, '1');
|
|
154
|
+
}
|
|
155
|
+
catch {
|
|
156
|
+
// As above — the cookie below is the one that matters in production.
|
|
157
|
+
}
|
|
158
|
+
const domain = suiteCookieDomain();
|
|
159
|
+
if (domain && typeof document !== 'undefined') {
|
|
160
|
+
const parts = [
|
|
161
|
+
`${encodeURIComponent(DISMISS_KEY)}=1`,
|
|
162
|
+
'path=/',
|
|
163
|
+
`domain=${domain}`,
|
|
164
|
+
`max-age=${DISMISS_MAX_AGE}`,
|
|
165
|
+
'SameSite=Lax',
|
|
166
|
+
];
|
|
167
|
+
if (window.location.protocol === 'https:')
|
|
168
|
+
parts.push('Secure');
|
|
169
|
+
document.cookie = parts.join('; ');
|
|
170
|
+
}
|
|
171
|
+
window.dispatchEvent(new Event(DISMISS_EVENT));
|
|
172
|
+
}
|
|
173
|
+
export function PrivacyNote({ repo, proof, subject = 'Your file', plural = false, except = null, headline = 'Other companies upload your files to view them and scrape your data.', theme = 'light', dismissible = true, onDismiss, className, style, }) {
|
|
174
|
+
// Read synchronously so a returning user never sees the note flash in and
|
|
175
|
+
// out. Every host of this component is a client-rendered SPA, so there is no
|
|
176
|
+
// server markup to mismatch; the effect below re-reads on mount anyway,
|
|
177
|
+
// which is what would settle it if one of them ever gained SSR.
|
|
178
|
+
const [dismissed, setDismissed] = useState(() => dismissible && readDismissed());
|
|
179
|
+
useEffect(() => {
|
|
180
|
+
if (!dismissible)
|
|
181
|
+
return;
|
|
182
|
+
const sync = () => setDismissed(readDismissed());
|
|
183
|
+
sync();
|
|
184
|
+
// The custom event covers other copies on this page; `storage` covers the
|
|
185
|
+
// app's other tabs, which is the same decision arriving from elsewhere.
|
|
186
|
+
window.addEventListener(DISMISS_EVENT, sync);
|
|
187
|
+
window.addEventListener('storage', sync);
|
|
188
|
+
return () => {
|
|
189
|
+
window.removeEventListener(DISMISS_EVENT, sync);
|
|
190
|
+
window.removeEventListener('storage', sync);
|
|
191
|
+
};
|
|
192
|
+
}, [dismissible]);
|
|
193
|
+
const dismiss = useCallback(() => {
|
|
194
|
+
writeDismissed();
|
|
195
|
+
setDismissed(true);
|
|
196
|
+
onDismiss?.();
|
|
197
|
+
}, [onDismiss]);
|
|
4
198
|
const dark = theme === 'dark';
|
|
5
199
|
// `proof` when the app has written its plain-English page, `repo` when it
|
|
6
200
|
// has not. Never nothing: see note 2.
|
|
@@ -8,25 +202,42 @@ export function PrivacyNote({ repo, proof, subject = 'Your file', plural = false
|
|
|
8
202
|
const hint = proof
|
|
9
203
|
? 'Exactly what this app does with your file, in plain English — and the source that proves it'
|
|
10
204
|
: 'Every line of this app is public — read the source on GitHub';
|
|
205
|
+
// Tokens rather than hex, so the note cannot drift from the rest of the
|
|
206
|
+
// suite. The alphas below are the only derived colours: a token set carries
|
|
207
|
+
// no 50%-opacity underline.
|
|
11
208
|
const c = dark
|
|
12
209
|
? {
|
|
13
|
-
border:
|
|
14
|
-
bg:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
210
|
+
border: NEUTRAL.slate700,
|
|
211
|
+
bg: DARK_THEME.surface2,
|
|
212
|
+
// The dark accent, not `orangeDeep`: brand.ts lifts it precisely
|
|
213
|
+
// because #e05504 loses contrast against a dark ground.
|
|
214
|
+
shield: DARK_THEME.accent,
|
|
215
|
+
head: DARK_THEME.text,
|
|
216
|
+
body: DARK_THEME.textSoft,
|
|
217
|
+
link: DARK_THEME.accent,
|
|
218
|
+
rule: 'rgba(255, 154, 31, 0.5)',
|
|
219
|
+
// The X is a glyph, and a quiet one: it must be findable without
|
|
220
|
+
// competing with the only thing on the card meant to be clicked.
|
|
221
|
+
close: NEUTRAL.slate400,
|
|
222
|
+
closeHover: DARK_THEME.text,
|
|
20
223
|
}
|
|
21
224
|
: {
|
|
22
|
-
border:
|
|
23
|
-
bg:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
225
|
+
border: NEUTRAL.slate200,
|
|
226
|
+
bg: NEUTRAL.slate100,
|
|
227
|
+
// A glyph, so the 3:1 non-text rule applies and `orangeDeep` passes.
|
|
228
|
+
shield: BRAND.orangeDeep,
|
|
229
|
+
head: NEUTRAL.slate900,
|
|
230
|
+
body: NEUTRAL.slate600,
|
|
231
|
+
// ⚠️ TEXT. Must be `orangeText`, never `orange` / `orangeDeep`.
|
|
232
|
+
link: BRAND.orangeText,
|
|
233
|
+
rule: 'rgba(194, 65, 12, 0.5)',
|
|
234
|
+
close: NEUTRAL.slate400,
|
|
235
|
+
closeHover: NEUTRAL.slate900,
|
|
29
236
|
};
|
|
237
|
+
// After the hooks, never before: the early return has to sit below them or
|
|
238
|
+
// the first render of a dismissed note changes the hook count.
|
|
239
|
+
if (dismissed)
|
|
240
|
+
return null;
|
|
30
241
|
return (_jsxs("div", { className: className, style: {
|
|
31
242
|
display: 'flex',
|
|
32
243
|
gap: '0.75rem',
|
|
@@ -46,6 +257,26 @@ export function PrivacyNote({ repo, proof, subject = 'Your file', plural = false
|
|
|
46
257
|
e.currentTarget.style.textDecorationColor = c.link;
|
|
47
258
|
}, onMouseLeave: (e) => {
|
|
48
259
|
e.currentTarget.style.textDecorationColor = c.rule;
|
|
49
|
-
}, children: ["Guaranteed", _jsx("svg", { viewBox: "0 0 24 24", width: "12", height: "12", style: { marginLeft: '2px', display: 'inline', verticalAlign: '-1px' }, fill: "none", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: _jsx("path", { d: "M7 17 17 7M9 7h8v8" }) })] })] })] })
|
|
260
|
+
}, children: ["Guaranteed", _jsx("svg", { viewBox: "0 0 24 24", width: "12", height: "12", style: { marginLeft: '2px', display: 'inline', verticalAlign: '-1px' }, fill: "none", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: _jsx("path", { d: "M7 17 17 7M9 7h8v8" }) })] })] })] }), dismissible && (_jsx("button", { type: "button", onClick: dismiss, title: "Don't show this again in any Universal app", "aria-label": "Don't show this again in any Universal app", style: {
|
|
261
|
+
flexShrink: 0,
|
|
262
|
+
alignSelf: 'flex-start',
|
|
263
|
+
display: 'flex',
|
|
264
|
+
alignItems: 'center',
|
|
265
|
+
justifyContent: 'center',
|
|
266
|
+
width: '20px',
|
|
267
|
+
height: '20px',
|
|
268
|
+
margin: '-1px -3px 0 0',
|
|
269
|
+
padding: 0,
|
|
270
|
+
border: 'none',
|
|
271
|
+
borderRadius: '0.375rem',
|
|
272
|
+
background: 'transparent',
|
|
273
|
+
color: c.close,
|
|
274
|
+
cursor: 'pointer',
|
|
275
|
+
lineHeight: 0,
|
|
276
|
+
}, onMouseEnter: (e) => {
|
|
277
|
+
e.currentTarget.style.color = c.closeHover;
|
|
278
|
+
}, onMouseLeave: (e) => {
|
|
279
|
+
e.currentTarget.style.color = c.close;
|
|
280
|
+
}, children: _jsx("svg", { viewBox: "0 0 24 24", width: "14", height: "14", fill: "none", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: _jsx("path", { d: "M6 6 18 18M18 6 6 18" }) }) }))] }));
|
|
50
281
|
}
|
|
51
282
|
//# sourceMappingURL=PrivacyNote.js.map
|
package/dist/PrivacyNote.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivacyNote.js","sourceRoot":"","sources":["../src/PrivacyNote.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;
|
|
1
|
+
{"version":3,"file":"PrivacyNote.js","sourceRoot":"","sources":["../src/PrivacyNote.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAExD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgFG;AAEH,iFAAiF;AACjF,mEAAmE;AACnE,EAAE;AACF,sEAAsE;AACtE,EAAE;AACF,+EAA+E;AAC/E,+EAA+E;AAC/E,2DAA2D;AAC3D,+EAA+E;AAC/E,8EAA8E;AAC9E,2EAA2E;AAC3E,yEAAyE;AACzE,EAAE;AACF,6EAA6E;AAC7E,0EAA0E;AAC1E,2EAA2E;AAC3E,uDAAuD;AACvD,EAAE;AACF,8EAA8E;AAC9E,2EAA2E;AAC3E,6EAA6E;AAC7E,8CAA8C;AAC9C,iFAAiF;AAEjF,MAAM,WAAW,GAAG,kCAAkC,CAAA;AAEtD;;;;;GAKG;AACH,MAAM,aAAa,GAAG,+BAA+B,CAAA;AAErD,6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