@unisim/sdk 0.115.0 → 0.117.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 +34 -10
- package/dist/PrivacyNote.d.ts.map +1 -1
- package/dist/PrivacyNote.js +35 -21
- package/dist/PrivacyNote.js.map +1 -1
- package/package.json +1 -1
package/dist/PrivacyNote.d.ts
CHANGED
|
@@ -14,10 +14,15 @@ import type { CSSProperties, ReactNode } from 'react';
|
|
|
14
14
|
* information.
|
|
15
15
|
*
|
|
16
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
|
|
17
|
+
* is a claim about a claim. This one opens the app's own evidence, which is
|
|
18
18
|
* the only guarantee anybody can actually check — so the word that makes
|
|
19
|
-
* the promise is the word that hands over the
|
|
20
|
-
*
|
|
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.
|
|
21
26
|
*
|
|
22
27
|
* 3. ⚠️ **`except` is what keeps the sentence true.** Several apps in the
|
|
23
28
|
* suite CAN send a file off the device — hosted backup ("Store with
|
|
@@ -49,10 +54,27 @@ import type { CSSProperties, ReactNode } from 'react';
|
|
|
49
54
|
*/
|
|
50
55
|
export interface PrivacyNoteProps {
|
|
51
56
|
/**
|
|
52
|
-
* The app's own repository
|
|
57
|
+
* The app's own repository. Required: see note 2. This is the fallback for
|
|
58
|
+
* what "Guaranteed" opens, and the honest floor — an app with source anyone
|
|
59
|
+
* can read can always be checked, even if nobody has written the short
|
|
60
|
+
* version yet.
|
|
53
61
|
* e.g. 'https://github.com/universal-simulation-ltd/Universal_PDF'
|
|
54
62
|
*/
|
|
55
63
|
repo: string;
|
|
64
|
+
/**
|
|
65
|
+
* The app's PRIVACY.md — what "Guaranteed" opens WHEN IT EXISTS.
|
|
66
|
+
*
|
|
67
|
+
* ⚠️ This is the whole point of the word, and `repo` alone was not
|
|
68
|
+
* delivering it. "Guaranteed" invites a non-developer to go and check, and
|
|
69
|
+
* a repository root answers that invitation with a README, a file tree and
|
|
70
|
+
* a licence — i.e. with homework. The reader who most needs the guarantee
|
|
71
|
+
* is the one least able to read `hostedStore.ts`, so the link has to land
|
|
72
|
+
* on a page written for them, which then hands on to the exact source
|
|
73
|
+
* files for anyone who wants to go further.
|
|
74
|
+
*
|
|
75
|
+
* e.g. 'https://github.com/universal-simulation-ltd/Universal_PDF/blob/main/PRIVACY.md'
|
|
76
|
+
*/
|
|
77
|
+
proof?: string;
|
|
56
78
|
/** What this app is handed, in the reader's words — "Your PDF", "Your images". */
|
|
57
79
|
subject?: string;
|
|
58
80
|
/**
|
|
@@ -72,15 +94,17 @@ export interface PrivacyNoteProps {
|
|
|
72
94
|
*/
|
|
73
95
|
headline?: ReactNode;
|
|
74
96
|
/**
|
|
75
|
-
*
|
|
76
|
-
*
|
|
97
|
+
* ⚠️ Required for any app with a dark mode — Universal Video is the first.
|
|
98
|
+
* These are inline styles, so they cannot answer a `.dark` class or a
|
|
99
|
+
* `prefers-color-scheme` query the way the apps' Tailwind does; left on
|
|
100
|
+
* 'light' the note renders as a pale green card on a dark page.
|
|
77
101
|
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
102
|
+
* Pass the app's RESOLVED theme, not its preference: 'system' has to become
|
|
103
|
+
* 'light' or 'dark' before it gets here.
|
|
80
104
|
*/
|
|
81
|
-
|
|
105
|
+
theme?: 'light' | 'dark';
|
|
82
106
|
className?: string;
|
|
83
107
|
style?: CSSProperties;
|
|
84
108
|
}
|
|
85
|
-
export declare function PrivacyNote({ repo, subject, plural, except, headline,
|
|
109
|
+
export declare function PrivacyNote({ repo, proof, subject, plural, except, headline, theme, className, style, }: PrivacyNoteProps): import("react/jsx-runtime").JSX.Element;
|
|
86
110
|
//# sourceMappingURL=PrivacyNote.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivacyNote.d.ts","sourceRoot":"","sources":["../src/PrivacyNote.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAErD
|
|
1
|
+
{"version":3,"file":"PrivacyNote.d.ts","sourceRoot":"","sources":["../src/PrivacyNote.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,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,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,SAAS,EACT,KAAK,GACN,EAAE,gBAAgB,2CA4GlB"}
|
package/dist/PrivacyNote.js
CHANGED
|
@@ -1,37 +1,51 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
export function PrivacyNote({ repo, subject = 'Your file', plural = false, except = null, headline = 'Other companies upload your files to view them and scrape your data.',
|
|
3
|
+
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', className, style, }) {
|
|
4
|
+
const dark = theme === 'dark';
|
|
5
|
+
// `proof` when the app has written its plain-English page, `repo` when it
|
|
6
|
+
// has not. Never nothing: see note 2.
|
|
7
|
+
const href = proof || repo;
|
|
8
|
+
const hint = proof
|
|
9
|
+
? 'Exactly what this app does with your file, in plain English — and the source that proves it'
|
|
10
|
+
: 'Every line of this app is public — read the source on GitHub';
|
|
11
|
+
const c = dark
|
|
12
|
+
? {
|
|
13
|
+
border: 'rgba(47, 158, 87, 0.35)',
|
|
14
|
+
bg: 'rgba(47, 158, 87, 0.14)',
|
|
15
|
+
shield: '#4ade80',
|
|
16
|
+
head: '#dcfce7',
|
|
17
|
+
body: '#bbf7d0',
|
|
18
|
+
link: '#86efac',
|
|
19
|
+
rule: 'rgba(134, 239, 172, 0.5)',
|
|
20
|
+
}
|
|
21
|
+
: {
|
|
22
|
+
border: 'rgba(47, 158, 87, 0.25)',
|
|
23
|
+
bg: 'rgba(47, 158, 87, 0.10)',
|
|
24
|
+
shield: '#2F9E57',
|
|
25
|
+
head: '#14532d',
|
|
26
|
+
body: '#166534',
|
|
27
|
+
link: '#14532d',
|
|
28
|
+
rule: 'rgba(47, 158, 87, 0.55)',
|
|
29
|
+
};
|
|
4
30
|
return (_jsxs("div", { className: className, style: {
|
|
5
31
|
display: 'flex',
|
|
6
32
|
gap: '0.75rem',
|
|
7
33
|
padding: '0.75rem 0.875rem',
|
|
8
|
-
border:
|
|
34
|
+
border: `1px solid ${c.border}`,
|
|
9
35
|
borderRadius: '0.75rem',
|
|
10
|
-
background:
|
|
36
|
+
background: c.bg,
|
|
11
37
|
...style,
|
|
12
|
-
}, children: [_jsxs("svg", { viewBox: "0 0 24 24", width: "20", height: "20", style: { marginTop: '2px', flexShrink: 0, color:
|
|
38
|
+
}, children: [_jsxs("svg", { viewBox: "0 0 24 24", width: "20", height: "20", style: { marginTop: '2px', flexShrink: 0, color: c.shield }, fill: "none", stroke: "currentColor", strokeWidth: "1.7", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [_jsx("path", { d: "M12 3 5 6v5.5c0 4.3 2.9 8.2 7 9.5 4.1-1.3 7-5.2 7-9.5V6z" }), _jsx("path", { d: "m9.2 11.8 2 2 3.6-3.9" })] }), _jsxs("div", { style: { flex: 1, minWidth: 0, fontSize: '12.5px', lineHeight: 1.45 }, children: [_jsx("p", { style: { margin: 0, fontWeight: 600, color: c.head }, children: headline }), _jsxs("p", { style: { margin: '2px 0 0', color: c.body }, children: ["We don\u2019t. ", subject, " never ", plural ? 'leave' : 'leaves', " this computer", except ? ` unless you choose it to (e.g. ${except})` : '', ".", ' ', _jsxs("a", { href: href, target: "_blank", rel: "noopener noreferrer", title: hint, style: {
|
|
13
39
|
whiteSpace: 'nowrap',
|
|
14
40
|
fontWeight: 700,
|
|
15
|
-
color:
|
|
41
|
+
color: c.link,
|
|
16
42
|
textDecoration: 'underline',
|
|
17
|
-
textDecorationColor:
|
|
43
|
+
textDecorationColor: c.rule,
|
|
18
44
|
textUnderlineOffset: '2px',
|
|
19
45
|
}, onMouseEnter: (e) => {
|
|
20
|
-
e.currentTarget.style.textDecorationColor =
|
|
46
|
+
e.currentTarget.style.textDecorationColor = c.link;
|
|
21
47
|
}, onMouseLeave: (e) => {
|
|
22
|
-
e.currentTarget.style.textDecorationColor =
|
|
23
|
-
}, 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" }) })] })] })] })
|
|
24
|
-
flexShrink: 0,
|
|
25
|
-
alignSelf: 'flex-start',
|
|
26
|
-
marginTop: '1px',
|
|
27
|
-
padding: '0.125rem 0.625rem',
|
|
28
|
-
borderRadius: '9999px',
|
|
29
|
-
border: '1px solid #e2e8f0',
|
|
30
|
-
background: '#ffffff',
|
|
31
|
-
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace',
|
|
32
|
-
fontSize: '10.5px',
|
|
33
|
-
color: '#475569',
|
|
34
|
-
whiteSpace: 'nowrap',
|
|
35
|
-
}, children: badge }))] }));
|
|
48
|
+
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" }) })] })] })] })] }));
|
|
36
50
|
}
|
|
37
51
|
//# 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;;AAgHZ,MAAM,UAAU,WAAW,CAAC,EAC1B,IAAI,EACJ,KAAK,EACL,OAAO,GAAG,WAAW,EACrB,MAAM,GAAG,KAAK,EACd,MAAM,GAAG,IAAI,EACb,QAAQ,GAAG,sEAAsE,EACjF,KAAK,GAAG,OAAO,EACf,SAAS,EACT,KAAK,GACY;IACjB,MAAM,I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