@tinytars/frame 0.1.27 → 0.1.29
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/AccountMenu.svelte +1 -1
- package/Onboarding.svelte +1 -1
- package/OrgFooter.svelte +25 -0
- package/attach-controller.ts +1 -1
- package/brand.ts +10 -3
- package/footer.css +37 -0
- package/package.json +4 -1
- package/theme.css +1 -1
package/AccountMenu.svelte
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
// About is app-level, not provider/patient-specific, so it's offered in both modes.
|
|
39
39
|
onAbout?: () => void;
|
|
40
40
|
// Copy, all domain-flavorable — defaults are generic, callers override with their own vocabulary
|
|
41
|
-
// (e.g.
|
|
41
|
+
// (e.g. "patient"/"roster") rather than this package assuming one.
|
|
42
42
|
providerBadgeLabel?: string;
|
|
43
43
|
subjectFallback?: string;
|
|
44
44
|
viewingSubjectLabel?: string;
|
package/Onboarding.svelte
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
// (what to ask, and each field's own validity rule) is entirely caller-supplied — a number field
|
|
23
23
|
// is optional and omitted from the create payload when left blank or when the user skips; a
|
|
24
24
|
// select field always has a value and is always included. Everything the caller collects is
|
|
25
|
-
// stored wherever it wants (
|
|
25
|
+
// stored wherever it wants (e.g. an encrypted vault, never the server).
|
|
26
26
|
let {
|
|
27
27
|
productName,
|
|
28
28
|
subheading = "Welcome. A couple of details help tailor your results — or skip and add them later.",
|
package/OrgFooter.svelte
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { deriveLegalLinks, type OrgIdentity } from "@tinytars/frame/brand";
|
|
3
|
+
|
|
4
|
+
let { org }: { org: OrgIdentity } = $props();
|
|
5
|
+
const links = $derived(deriveLegalLinks(org.legalBase, org.legalPaths));
|
|
6
|
+
const year = new Date().getFullYear();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<footer class="frame-footer">
|
|
10
|
+
<div class="frame-footer__row">
|
|
11
|
+
<div>
|
|
12
|
+
{org.status}
|
|
13
|
+
<br />© {year} {org.name}
|
|
14
|
+
</div>
|
|
15
|
+
<nav class="frame-footer__links" aria-label="Legal">
|
|
16
|
+
{#each links as link (link.href)}
|
|
17
|
+
{#if org.legalBase}
|
|
18
|
+
<a href={link.href} target="_blank" rel="noopener">{link.label}</a>
|
|
19
|
+
{:else}
|
|
20
|
+
<a href={link.href}>{link.label}</a>
|
|
21
|
+
{/if}
|
|
22
|
+
{/each}
|
|
23
|
+
</nav>
|
|
24
|
+
</div>
|
|
25
|
+
</footer>
|
package/attach-controller.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
export type AttachMode = "camera" | "library" | "files";
|
|
6
6
|
|
|
7
7
|
// Everything. A leaf's Attach is storage, not import: whatever you attach is kept, shown, and — if
|
|
8
|
-
// it is a PDF or a text file — read so
|
|
8
|
+
// it is a PDF or a text file — read so the host app can quote it. Anything else simply attaches and sits
|
|
9
9
|
// there, which is strictly better than a file picker that greys the file out with no explanation.
|
|
10
10
|
//
|
|
11
11
|
// The narrow "image/*,application/pdf,.xlsx,.xls" this replaces meant a .docx, a .csv or a .heic
|
package/brand.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
// MEDICAL_DISCLAIMER, ...) stay in packages/brand, which is not a dependency any other app takes.
|
|
1
|
+
// The shape of an organization's brand, not its values: each host app declares its own
|
|
2
|
+
// OrgIdentity (see ARCHITECTURE.md, "Entity neutrality").
|
|
4
3
|
export type LegalLink = { path: string; label: string };
|
|
5
4
|
|
|
5
|
+
export type OrgIdentity = {
|
|
6
|
+
name: string;
|
|
7
|
+
status: string;
|
|
8
|
+
/** Origin the legal pages live on; "" when they are served by the host app itself. */
|
|
9
|
+
legalBase: string;
|
|
10
|
+
legalPaths: LegalLink[];
|
|
11
|
+
};
|
|
12
|
+
|
|
6
13
|
export function deriveLegalLinks(base: string, paths: LegalLink[]): { href: string; label: string }[] {
|
|
7
14
|
return paths.map((l) => ({ href: `${base}${l.path}`, label: l.label }));
|
|
8
15
|
}
|
package/footer.css
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* Markup contract for OrgFooter.svelte, and for any non-Svelte host (e.g. an Astro site) rendering
|
|
2
|
+
the same .frame-footer markup. Every value falls back to a default, so it works without theme.css;
|
|
3
|
+
a host themes it through the --frame-footer-* properties or overrides the classes directly. */
|
|
4
|
+
.frame-footer {
|
|
5
|
+
border-top: 1px solid var(--border, #e5e7eb);
|
|
6
|
+
color: var(--muted, #6b7280);
|
|
7
|
+
font-size: var(--frame-footer-font-size, 0.85rem);
|
|
8
|
+
font-family: var(--frame-font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
|
|
9
|
+
background: var(--frame-footer-bg, #fff);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.frame-footer__row {
|
|
13
|
+
max-width: var(--frame-footer-max, 64rem);
|
|
14
|
+
margin: 0 auto;
|
|
15
|
+
padding: 1.25rem 1.25rem;
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-wrap: wrap;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: space-between;
|
|
20
|
+
gap: 0.75rem;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.frame-footer__links {
|
|
24
|
+
display: inline-flex;
|
|
25
|
+
flex-wrap: wrap;
|
|
26
|
+
gap: 1rem;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.frame-footer__links a {
|
|
30
|
+
color: var(--muted, #6b7280);
|
|
31
|
+
text-decoration: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.frame-footer__links a:hover {
|
|
35
|
+
color: var(--frame-footer-accent, currentColor);
|
|
36
|
+
text-decoration: underline;
|
|
37
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinytars/frame",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.29",
|
|
4
4
|
"description": "Domain-neutral Svelte app-shell: session/auth controllers, account chrome, and menu/card/modal primitives built on @tinytars/vault.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"files": [
|
|
25
25
|
"*.ts",
|
|
26
26
|
"!*.test.ts",
|
|
27
|
+
"!vitest.config.ts",
|
|
27
28
|
"*.svelte",
|
|
28
29
|
"*.css"
|
|
29
30
|
],
|
|
@@ -45,6 +46,7 @@
|
|
|
45
46
|
"./ExportTab.svelte": "./ExportTab.svelte",
|
|
46
47
|
"./Field.svelte": "./Field.svelte",
|
|
47
48
|
"./filter": "./filter.ts",
|
|
49
|
+
"./footer.css": "./footer.css",
|
|
48
50
|
"./FormGrid.svelte": "./FormGrid.svelte",
|
|
49
51
|
"./group-filter": "./group-filter.ts",
|
|
50
52
|
"./LeafActionMenu.svelte": "./LeafActionMenu.svelte",
|
|
@@ -55,6 +57,7 @@
|
|
|
55
57
|
"./Modal.svelte": "./Modal.svelte",
|
|
56
58
|
"./ModalActions.svelte": "./ModalActions.svelte",
|
|
57
59
|
"./Onboarding.svelte": "./Onboarding.svelte",
|
|
60
|
+
"./OrgFooter.svelte": "./OrgFooter.svelte",
|
|
58
61
|
"./pdf-render": "./pdf-render.ts",
|
|
59
62
|
"./PdfThumbnail.svelte": "./PdfThumbnail.svelte",
|
|
60
63
|
"./persisted-json": "./persisted-json.ts",
|
package/theme.css
CHANGED