@milesroxas/design-hub 0.8.0 → 0.9.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 +7 -2
- package/core/prototype.test.ts +83 -0
- package/core/prototype.ts +84 -0
- package/core/review/model.ts +20 -2
- package/core/review/policy.test.ts +4 -2
- package/core/review/policy.ts +4 -2
- package/core/review/service.test.ts +200 -16
- package/core/review/service.ts +91 -5
- package/core/review/store.ts +10 -1
- package/dist/core/prototype.d.ts +35 -0
- package/dist/core/prototype.js +84 -0
- package/dist/core/review/model.d.ts +13 -2
- package/dist/core/review/model.js +13 -0
- package/dist/core/review/policy.d.ts +1 -1
- package/dist/core/review/policy.js +1 -0
- package/dist/core/review/service.d.ts +24 -2
- package/dist/core/review/service.js +81 -6
- package/dist/core/review/store.d.ts +10 -1
- package/dist/core/review/store.js +10 -1
- package/dist/scripts/comments.js +4 -3
- package/dist/scripts/lib/cdp.js +6 -1
- package/dist/scripts/lib/export-smoke.d.ts +18 -0
- package/dist/scripts/lib/export-smoke.js +73 -0
- package/dist/scripts/new.js +5 -2
- package/dist/scripts/release-check.d.ts +5 -3
- package/dist/scripts/release-check.js +17 -4
- package/dist/scripts/share.d.ts +2 -2
- package/dist/server/api.js +8 -0
- package/dist/server/session.d.ts +5 -1
- package/dist/server/session.js +39 -21
- package/dist/vercel/proxy.js +44 -8
- package/dist/vite/boundary.d.ts +93 -0
- package/dist/vite/boundary.js +218 -0
- package/dist/vite/css-boundary.d.ts +39 -0
- package/dist/vite/css-boundary.js +167 -0
- package/dist/vite/kit.js +15 -6
- package/dist/vite/leaks.d.ts +37 -0
- package/dist/vite/leaks.js +331 -0
- package/dist/vite/plugin.js +2 -1
- package/dist/vite/registry.d.ts +15 -4
- package/dist/vite/registry.js +531 -27
- package/dist/vite/settle.d.ts +27 -0
- package/dist/vite/settle.js +185 -0
- package/package.json +4 -3
- package/shell/ClientViewNote.tsx +18 -0
- package/shell/Guide.tsx +17 -2
- package/shell/Index.tsx +257 -25
- package/shell/audience.test.ts +63 -0
- package/shell/audience.ts +47 -0
- package/shell/hub.ts +36 -0
- package/shell/main.tsx +39 -5
- package/shell/registry.ts +28 -7
- package/shell/registry.virtual.d.ts +12 -4
- package/shell/review/Pins.tsx +8 -6
- package/shell/review/Review.tsx +8 -4
- package/shell/review/ThreadCard.tsx +6 -14
- package/shell/review/client.ts +16 -4
- package/shell/review/review.css +37 -24
- package/shell/shell.css +50 -3
- package/shell/system.css +5 -0
- package/skills/miles-deploy/SKILL.md +17 -0
- package/skills/miles-new-feature/SKILL.md +1 -1
- package/skills/miles-prototype/SKILL.md +14 -1
- package/skills/miles-review/SKILL.md +1 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import { test } from 'node:test';
|
|
3
|
+
import {
|
|
4
|
+
AUDIENCE_LABEL,
|
|
5
|
+
audienceIn,
|
|
6
|
+
emptyState,
|
|
7
|
+
hiddenFor,
|
|
8
|
+
lensOf,
|
|
9
|
+
slugsFor,
|
|
10
|
+
withAudience,
|
|
11
|
+
} from './audience.ts';
|
|
12
|
+
|
|
13
|
+
const studio = { kind: 'studio' as const };
|
|
14
|
+
const client = { kind: 'client' as const };
|
|
15
|
+
|
|
16
|
+
test('a prototype is client-facing only when the server lists it', () => {
|
|
17
|
+
assert.equal(audienceIn(['a', 'b'], 'a'), 'client');
|
|
18
|
+
assert.equal(audienceIn(['a', 'b'], 'c'), 'internal');
|
|
19
|
+
assert.equal(audienceIn([], 'a'), 'internal');
|
|
20
|
+
assert.deepEqual(AUDIENCE_LABEL, { internal: 'Internal', client: 'Client-facing' });
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
test('switching one prototype changes only it, and switching back restores the list', () => {
|
|
24
|
+
const start = ['b', 'd'];
|
|
25
|
+
const on = withAudience(start, 'c', 'client');
|
|
26
|
+
assert.deepEqual(on, ['b', 'c', 'd']);
|
|
27
|
+
assert.deepEqual(withAudience(on, 'c', 'client'), ['b', 'c', 'd']);
|
|
28
|
+
assert.deepEqual(withAudience(on, 'c', 'internal'), start);
|
|
29
|
+
assert.deepEqual(withAudience(start, 'x', 'internal'), start);
|
|
30
|
+
// The rollback after a failed switch is the switch the other way.
|
|
31
|
+
assert.deepEqual(withAudience(withAudience(start, 'b', 'internal'), 'b', 'client'), start);
|
|
32
|
+
assert.deepEqual(start, ['b', 'd']);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
test('Studio’s view loads every slug; a Client’s view only the client-facing', () => {
|
|
36
|
+
const all = ['a', 'b', 'c'];
|
|
37
|
+
assert.deepEqual(slugsFor({ view: 'studio', clientFacing: ['b'] }, all), all);
|
|
38
|
+
assert.deepEqual(slugsFor({ view: 'client', clientFacing: ['b'] }, all), ['b']);
|
|
39
|
+
assert.deepEqual(slugsFor({ view: 'client', clientFacing: [] }, all), []);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
test('Studio’s controls show outside Client view only; the Client view note for Studio only', () => {
|
|
43
|
+
assert.deepEqual(lensOf(studio, 'studio'), { controls: true, clientView: false });
|
|
44
|
+
assert.deepEqual(lensOf(studio, 'client'), { controls: false, clientView: true });
|
|
45
|
+
assert.deepEqual(lensOf(client, 'client'), { controls: false, clientView: false });
|
|
46
|
+
// A Client's stored Client view changes nothing; nobody signed in gets neither.
|
|
47
|
+
assert.deepEqual(lensOf(client, 'studio'), { controls: false, clientView: false });
|
|
48
|
+
assert.deepEqual(lensOf(null, 'studio'), { controls: false, clientView: false });
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
test('the empty index speaks to its view', () => {
|
|
52
|
+
assert.equal(emptyState('studio', 0), 'studio');
|
|
53
|
+
assert.equal(emptyState('client', 0), 'client');
|
|
54
|
+
assert.equal(emptyState('client', 2), null);
|
|
55
|
+
assert.equal(emptyState('studio', 1), null);
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
test('in Client view an internal prototype’s page reads as missing; no answer hides nothing', () => {
|
|
59
|
+
assert.equal(hiddenFor({ view: 'client', clientFacing: ['a'] }, 'b'), true);
|
|
60
|
+
assert.equal(hiddenFor({ view: 'client', clientFacing: ['a'] }, 'a'), false);
|
|
61
|
+
assert.equal(hiddenFor({ view: 'studio', clientFacing: [] }, 'b'), false);
|
|
62
|
+
assert.equal(hiddenFor(null, 'b'), false);
|
|
63
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// What the index decides from the server's answer, kept pure so it is
|
|
2
|
+
// tested (shell/audience.test.ts). The answer is the view the person gets
|
|
3
|
+
// and the client-facing slugs; the server and the gate decide what reaches
|
|
4
|
+
// whom, and nothing here is the boundary.
|
|
5
|
+
import type { Audience, Person, PersonKind } from '../core/review/model';
|
|
6
|
+
|
|
7
|
+
/** The index read (`prototypes`): the view the caller gets, and every client-facing slug. */
|
|
8
|
+
export type HubAnswer = { view: PersonKind; clientFacing: string[] };
|
|
9
|
+
|
|
10
|
+
export const AUDIENCE_LABEL: Record<Audience, string> = { internal: 'Internal', client: 'Client-facing' };
|
|
11
|
+
|
|
12
|
+
export const audienceIn = (clientFacing: readonly string[], slug: string): Audience =>
|
|
13
|
+
clientFacing.includes(slug) ? 'client' : 'internal';
|
|
14
|
+
|
|
15
|
+
/** The client-facing list after one prototype is switched, sorted, each slug once. */
|
|
16
|
+
export function withAudience(clientFacing: readonly string[], slug: string, audience: Audience): string[] {
|
|
17
|
+
const rest = clientFacing.filter((s) => s !== slug);
|
|
18
|
+
return audience === 'client' ? [...rest, slug].sort() : rest;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** Which slugs the index loads: every one in Studio's view, only the client-facing in a Client's. */
|
|
22
|
+
export const slugsFor = (answer: HubAnswer, all: readonly string[]): string[] =>
|
|
23
|
+
answer.view === 'studio' ? [...all] : [...answer.clientFacing];
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* How the index treats the person: Studio outside Client view sees each
|
|
27
|
+
* prototype's audience and its switch; Studio in Client view sees what a
|
|
28
|
+
* Client sees, with the note to leave it; anyone else sees neither.
|
|
29
|
+
*/
|
|
30
|
+
export function lensOf(me: Pick<Person, 'kind'> | null, view: PersonKind) {
|
|
31
|
+
const studio = me?.kind === 'studio';
|
|
32
|
+
return { controls: studio && view === 'studio', clientView: studio && view === 'client' };
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** The empty index, by view: Studio's says how to start one; a Client's says nothing is shared yet. Null when not empty. */
|
|
36
|
+
export function emptyState(view: PersonKind, total: number): 'studio' | 'client' | null {
|
|
37
|
+
if (total > 0) return null;
|
|
38
|
+
return view === 'studio' ? 'studio' : 'client';
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Whether a prototype's page shows as missing: in Client view (or for a
|
|
43
|
+
* Client), when the prototype is not client-facing. No answer hides nothing,
|
|
44
|
+
* since the gate already refused it to a Client.
|
|
45
|
+
*/
|
|
46
|
+
export const hiddenFor = (answer: HubAnswer | null, slug: string): boolean =>
|
|
47
|
+
!!answer && answer.view === 'client' && !answer.clientFacing.includes(slug);
|
package/shell/hub.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// The index's one read and its one write, over the review API. The index is
|
|
2
|
+
// built from the server's answer (shell/audience.ts): Studio's view loads
|
|
3
|
+
// every slug, then each entry; a Client's view loads only the client-facing
|
|
4
|
+
// entries. An entry that is not there is skipped; one that fails otherwise is counted. Nothing here filters as
|
|
5
|
+
// the boundary: the server and the gate decide what reaches whom.
|
|
6
|
+
import type { Audience, PersonKind } from '../core/review/model';
|
|
7
|
+
import { type HubAnswer, slugsFor } from './audience';
|
|
8
|
+
import { type Entry, everySlug, getEntries } from './registry';
|
|
9
|
+
import { call, type Me, noApi } from './review/client';
|
|
10
|
+
|
|
11
|
+
/** `failed` counts entries that did not load for a reason other than not being there. */
|
|
12
|
+
export type Hub = HubAnswer & { me: Me | null; entries: Entry[]; failed: number };
|
|
13
|
+
|
|
14
|
+
/** Who is signed in and the index read. With no review API at all (a local preview of the build), Studio's view. */
|
|
15
|
+
export async function readHub(viewAs?: PersonKind): Promise<HubAnswer & { me: Me | null }> {
|
|
16
|
+
try {
|
|
17
|
+
const { person } = await call<{ person: Me | null }>('me');
|
|
18
|
+
const answer = await call<HubAnswer>('prototypes', undefined, viewAs ? { viewAs } : {});
|
|
19
|
+
return { me: person, ...answer };
|
|
20
|
+
} catch (error) {
|
|
21
|
+
if (noApi(error)) return { me: null, view: 'studio', clientFacing: [] };
|
|
22
|
+
throw error;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** The index, as the server says this person sees it: Client view when `clientView` is on. */
|
|
27
|
+
export async function loadHub(clientView: boolean): Promise<Hub> {
|
|
28
|
+
const answer = await readHub(clientView ? 'client' : undefined);
|
|
29
|
+
// Studio's list failing to load is an error, never an empty index.
|
|
30
|
+
const all = answer.view === 'studio' ? await everySlug() : [];
|
|
31
|
+
return { ...answer, ...(await getEntries(slugsFor(answer, all))) };
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** Studio's switch: marks one prototype client-facing or internal. */
|
|
35
|
+
export const saveAudience = (prototype: string, audience: Audience) =>
|
|
36
|
+
call<{ prototype: string; audience: Audience }>('prototype.audience', { prototype, audience });
|
package/shell/main.tsx
CHANGED
|
@@ -2,13 +2,17 @@ import { setGuide } from '@kit/dials';
|
|
|
2
2
|
import '@kit/tokens.css';
|
|
3
3
|
import '@kit/base.css';
|
|
4
4
|
import './system.css';
|
|
5
|
-
import { attachLapse } from '@kit/prefs';
|
|
5
|
+
import { attachLapse, isClientView, setClientView } from '@kit/prefs';
|
|
6
6
|
import { lazy, type ReactNode, StrictMode, Suspense } from 'react';
|
|
7
7
|
import { createRoot } from 'react-dom/client';
|
|
8
8
|
import { guideHref } from '../core/feature';
|
|
9
|
+
import { hiddenFor } from './audience';
|
|
10
|
+
import { ClientViewNote } from './ClientViewNote';
|
|
11
|
+
import { readHub } from './hub';
|
|
9
12
|
import { Index } from './Index';
|
|
13
|
+
import { Notice } from './Notice';
|
|
10
14
|
import { Prototype } from './Prototype';
|
|
11
|
-
import {
|
|
15
|
+
import { getEntry, guides } from './registry';
|
|
12
16
|
|
|
13
17
|
const params = new URLSearchParams(location.search);
|
|
14
18
|
// `design-hub export` opens a prototype with ?export: its artboards alone, no
|
|
@@ -29,10 +33,40 @@ if (import.meta.env.DEV && !exporting && params.get('a11y') !== '0') {
|
|
|
29
33
|
}
|
|
30
34
|
|
|
31
35
|
// /<slug>/ is a prototype; /guide/<feature>/ is that feature's walkthrough.
|
|
32
|
-
//
|
|
36
|
+
// `guide`, `api` and `assets` belong to the hub (core/prototype.ts; new.ts refuses them).
|
|
33
37
|
const [slug, sub] = location.pathname.split('/').filter(Boolean);
|
|
34
38
|
const Guide = lazy(() => import('./Guide'));
|
|
35
39
|
|
|
40
|
+
/**
|
|
41
|
+
* The prototype a page opens, or none, and whether Studio's Client view is
|
|
42
|
+
* what hides it: one a client cannot open reads as missing there, as it does
|
|
43
|
+
* for them (the gate refuses it to a Client).
|
|
44
|
+
*/
|
|
45
|
+
async function pageEntry(name: string) {
|
|
46
|
+
const entry = await getEntry(name);
|
|
47
|
+
if (!entry || !isClientView()) return { entry, hidden: false };
|
|
48
|
+
const answer = await readHub('client').catch(() => null);
|
|
49
|
+
const hidden = hiddenFor(answer, name) && answer?.me?.kind === 'studio';
|
|
50
|
+
return { entry: hidden ? undefined : entry, hidden };
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Studio in Client view on a prototype a client cannot open: the missing page, with the way back. */
|
|
54
|
+
function HiddenInClientView({ name }: { name: string }) {
|
|
55
|
+
const leave = () => {
|
|
56
|
+
setClientView(false);
|
|
57
|
+
location.reload();
|
|
58
|
+
};
|
|
59
|
+
return (
|
|
60
|
+
<>
|
|
61
|
+
<Notice
|
|
62
|
+
title={`No prototype called “${name}”`}
|
|
63
|
+
body="Check the link, or open one from all prototypes."
|
|
64
|
+
/>
|
|
65
|
+
<ClientViewNote onLeave={leave} />
|
|
66
|
+
</>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
36
70
|
let page: ReactNode;
|
|
37
71
|
// Hub pages wear the neutral system look; a prototype keeps the project's tokens.
|
|
38
72
|
if (!slug || slug === 'guide') document.documentElement.classList.add('sys');
|
|
@@ -43,9 +77,9 @@ if (slug === 'guide') {
|
|
|
43
77
|
</Suspense>
|
|
44
78
|
);
|
|
45
79
|
} else if (slug) {
|
|
46
|
-
const entry =
|
|
80
|
+
const { entry, hidden } = await pageEntry(slug);
|
|
47
81
|
if (entry?.feature && guides.has(entry.feature)) setGuide(guideHref(entry.feature));
|
|
48
|
-
page = <Prototype slug={slug} entry={entry} />;
|
|
82
|
+
page = hidden ? <HiddenInClientView name={slug} /> : <Prototype slug={slug} entry={entry} />;
|
|
49
83
|
if (entry && !exporting) {
|
|
50
84
|
const { mountReview } = await import('./review/mount');
|
|
51
85
|
mountReview({ prototype: slug, feature: entry.feature, states: (entry.states ?? []).map((s) => s.name) });
|
package/shell/registry.ts
CHANGED
|
@@ -1,21 +1,42 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { allSlugs, entryOf, guideDocs } from 'virtual:design-hub/registry';
|
|
2
2
|
import type { ComponentType } from 'react';
|
|
3
3
|
import { byIndexOrder, type Meta, readMeta } from '../core/catalog';
|
|
4
|
+
import { isPrototypeSlug } from '../core/prototype';
|
|
4
5
|
import type { Doc } from './doc';
|
|
5
6
|
|
|
6
7
|
export type Entry = Meta & { load?: () => Promise<{ default: ComponentType }> };
|
|
7
8
|
|
|
8
9
|
// The registry module is written by the Vite plugin (vite/registry.ts) from
|
|
9
|
-
// the project's prototypes/ and docs/sprints/ folders.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
.sort(byIndexOrder);
|
|
10
|
+
// the project's prototypes/ and docs/sprints/ folders. In a build every
|
|
11
|
+
// prototype is a file of its own, fetched by path, so what reaches this page
|
|
12
|
+
// is what the gate let through.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
/** One prototype's entry; undefined when the name is no slug or there is none (the gate refused it). Any other failure throws. */
|
|
15
|
+
async function readEntry(slug: string): Promise<Entry | undefined> {
|
|
16
|
+
if (!isPrototypeSlug(slug)) return undefined;
|
|
17
|
+
const found = await entryOf(slug);
|
|
18
|
+
return found ? { ...readMeta(slug, found.readme), load: found.load } : undefined;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** One prototype's entry for its page; undefined when it is not there or did not load. */
|
|
22
|
+
export const getEntry = (slug: string): Promise<Entry | undefined> => readEntry(slug).catch(() => undefined);
|
|
23
|
+
|
|
24
|
+
/** The entries for these slugs, in index order: one that is not there is skipped, one that fails otherwise is counted. */
|
|
25
|
+
export async function getEntries(slugs: readonly string[]): Promise<{ entries: Entry[]; failed: number }> {
|
|
26
|
+
const loaded = await Promise.allSettled(slugs.map(readEntry));
|
|
27
|
+
const entries = loaded
|
|
28
|
+
.map((r) => (r.status === 'fulfilled' ? r.value : undefined))
|
|
29
|
+
.filter((e): e is Entry => e !== undefined)
|
|
30
|
+
.sort(byIndexOrder);
|
|
31
|
+
return { entries, failed: loaded.filter((r) => r.status === 'rejected').length };
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** Every slug, for Studio's view. Built, `_p/all.js` is Studio's alone; a failure to load it throws. */
|
|
35
|
+
export const everySlug = (): Promise<string[]> => allSlugs();
|
|
15
36
|
|
|
16
37
|
export const guides = new Map<string, () => Promise<Doc>>(Object.entries(guideDocs));
|
|
17
38
|
|
|
18
39
|
// The prototype a feature's walkthrough opens: the sprint itself, else the first one listed.
|
|
19
|
-
export const featureEntry = (feature: string) =>
|
|
40
|
+
export const featureEntry = (entries: readonly Entry[], feature: string) =>
|
|
20
41
|
entries.find((e) => e.feature === feature && e.kind === 'sprint') ??
|
|
21
42
|
entries.find((e) => e.feature === feature);
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
declare module 'virtual:design-hub/registry' {
|
|
2
2
|
import type { ComponentType } from 'react';
|
|
3
3
|
import type { Doc } from './doc';
|
|
4
|
-
/**
|
|
5
|
-
export
|
|
6
|
-
/**
|
|
7
|
-
|
|
4
|
+
/** One prototype's entry: its README text, and its module loader, absent when the folder has no index.tsx. */
|
|
5
|
+
export type RegistryEntry = { readme: string; load?: () => Promise<{ default: ComponentType }> };
|
|
6
|
+
/**
|
|
7
|
+
* Every prototype's slug. Built, this loads `_p/all.js`, which the gate
|
|
8
|
+
* gives Studio only; for a Client it fails.
|
|
9
|
+
*/
|
|
10
|
+
export function allSlugs(): Promise<string[]>;
|
|
11
|
+
/**
|
|
12
|
+
* One prototype's entry. Served, null for a slug with no prototype. Built,
|
|
13
|
+
* it loads `_p/<slug>/entry.js` and fails where the gate refuses it or there is none.
|
|
14
|
+
*/
|
|
15
|
+
export function entryOf(slug: string): Promise<RegistryEntry | null>;
|
|
8
16
|
/** Each feature's compiled walkthrough loader, by feature. */
|
|
9
17
|
export const guideDocs: Record<string, () => Promise<Doc>>;
|
|
10
18
|
}
|
package/shell/review/Pins.tsx
CHANGED
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
// button in the tab order. The button is the hit area and never changes size;
|
|
4
4
|
// the face inside it is what presses and lifts, so a press near the edge
|
|
5
5
|
// still ends on the pin. An open thread's pin is solid and numbered; an
|
|
6
|
-
// open internal one is numbered
|
|
7
|
-
// resolved one is pale and carries a check.
|
|
8
|
-
// never its place in the list.
|
|
6
|
+
// open internal one is numbered on amber, the colour of an internal note, its
|
|
7
|
+
// colour alone telling it apart; a resolved one is pale and carries a check.
|
|
8
|
+
// The number is the thread's own, never its place in the list. The label read
|
|
9
|
+
// out (Comment I2) keeps the I, so two threads never sound alike.
|
|
9
10
|
import { Icon } from '@kit/Icon';
|
|
10
11
|
import { useEffect, useRef } from 'react';
|
|
11
|
-
import type
|
|
12
|
+
import { type Comment, threadLabel } from '../../core/review/model';
|
|
12
13
|
import { pinPoint } from './anchor';
|
|
13
14
|
import { draftPoint } from './PickLayer';
|
|
14
15
|
import type { Draft } from './view';
|
|
@@ -18,10 +19,11 @@ const moveTo = (el: HTMLElement, at: { x: number; y: number } | null) => {
|
|
|
18
19
|
if (at) el.style.transform = `translate(${at.x}px, ${at.y}px)`;
|
|
19
20
|
};
|
|
20
21
|
|
|
21
|
-
/** "Comment
|
|
22
|
+
/** "Comment I3, internal, resolved, by Rae": the label when it has one, then what the face shows. */
|
|
22
23
|
function pinLabel(c: Comment): string {
|
|
24
|
+
const label = threadLabel(c);
|
|
23
25
|
const words = [
|
|
24
|
-
|
|
26
|
+
label ? `Comment ${label}` : 'Comment',
|
|
25
27
|
c.audience === 'internal' && 'internal',
|
|
26
28
|
c.status === 'resolved' && 'resolved',
|
|
27
29
|
];
|
package/shell/review/Review.tsx
CHANGED
|
@@ -382,7 +382,7 @@ const AUDIENCES: { value: Audience; label: string; title: string }[] = [
|
|
|
382
382
|
{ value: 'client', label: 'Client-facing', title: 'Everyone sees it, the client included' },
|
|
383
383
|
];
|
|
384
384
|
|
|
385
|
-
/** Studio's choice on a new thread. Fixed once posted: to tell the client later, write a new one. */
|
|
385
|
+
/** Studio's choice on a new thread, in the head beside the title. Fixed once posted: to tell the client later, write a new one. */
|
|
386
386
|
function AudienceChoice({ value, onChange }: { value: Audience; onChange: (a: Audience) => void }) {
|
|
387
387
|
return (
|
|
388
388
|
// biome-ignore lint/a11y/useSemanticElements: a fieldset brings a border and a legend the card does not want
|
|
@@ -420,10 +420,15 @@ function DraftCard({
|
|
|
420
420
|
const [chosen, setChosen] = useState<Audience>('internal');
|
|
421
421
|
const sent = audience === 'choose' ? chosen : audience;
|
|
422
422
|
return (
|
|
423
|
-
|
|
423
|
+
// The highlight shows sighted people what it is on; the label tells everyone else.
|
|
424
|
+
<Card
|
|
425
|
+
at={draftPoint(draft)}
|
|
426
|
+
label={`New comment on ${describe(draft.target)}`}
|
|
427
|
+
onDismiss={() => dispatch({ type: 'close' })}
|
|
428
|
+
>
|
|
424
429
|
<header className="rv-card-head">
|
|
425
430
|
<h2 className="rv-title">New comment</h2>
|
|
426
|
-
<
|
|
431
|
+
{audience === 'choose' && <AudienceChoice value={chosen} onChange={setChosen} />}
|
|
427
432
|
<span className="rv-spacer" />
|
|
428
433
|
<Button
|
|
429
434
|
kind="tertiary"
|
|
@@ -434,7 +439,6 @@ function DraftCard({
|
|
|
434
439
|
onClick={() => dispatch({ type: 'close' })}
|
|
435
440
|
/>
|
|
436
441
|
</header>
|
|
437
|
-
{audience === 'choose' && <AudienceChoice value={chosen} onChange={setChosen} />}
|
|
438
442
|
<div className="rv-card-foot">
|
|
439
443
|
<Field
|
|
440
444
|
label="New comment"
|
|
@@ -8,12 +8,11 @@
|
|
|
8
8
|
import { Icon } from '@kit/Icon';
|
|
9
9
|
import { Button, type MenuEntry, useMenu } from '@kit/ui';
|
|
10
10
|
import { type KeyboardEvent, useEffect, useState } from 'react';
|
|
11
|
-
import { type Audience, type Comment, KINDS, type Kind, LIMITS } from '../../core/review/model';
|
|
11
|
+
import { type Audience, type Comment, KINDS, type Kind, LIMITS, threadLabel } from '../../core/review/model';
|
|
12
12
|
import { can } from '../../core/review/policy';
|
|
13
13
|
import { Action, Card } from './Card';
|
|
14
14
|
import { act, type Me, type ReviewStore } from './client';
|
|
15
15
|
import { Field, useTextBox } from './Field';
|
|
16
|
-
import { describe } from './PickLayer';
|
|
17
16
|
|
|
18
17
|
const KIND_LABEL: Record<Kind, string> = { bug: 'Bug', taste: 'Taste', copy: 'Copy' };
|
|
19
18
|
const AUDIENCE_LABEL: Record<Audience, string> = { internal: 'Internal', client: 'Client-facing' };
|
|
@@ -33,14 +32,6 @@ function ago(iso: string): string {
|
|
|
33
32
|
return 'just now';
|
|
34
33
|
}
|
|
35
34
|
|
|
36
|
-
/** What the comment is on, in a few words. */
|
|
37
|
-
function about(root: Comment): string {
|
|
38
|
-
const target = root.anchor?.target;
|
|
39
|
-
if (!target) return 'On the page';
|
|
40
|
-
const el = document.querySelector(target);
|
|
41
|
-
return el ? `On ${describe(el)}` : 'On another view';
|
|
42
|
-
}
|
|
43
|
-
|
|
44
35
|
function Avatar({ name }: { name: string }) {
|
|
45
36
|
const initials = name
|
|
46
37
|
.split(/[\s-]+/)
|
|
@@ -398,7 +389,7 @@ type HeadProps = {
|
|
|
398
389
|
onDelete: () => void;
|
|
399
390
|
};
|
|
400
391
|
|
|
401
|
-
/**
|
|
392
|
+
/** Its number and who it is for, then its one decision and the rest. The pin beside the card already shows what it is on. */
|
|
402
393
|
function ThreadHead({
|
|
403
394
|
store,
|
|
404
395
|
root,
|
|
@@ -416,15 +407,15 @@ function ThreadHead({
|
|
|
416
407
|
}: HeadProps) {
|
|
417
408
|
return (
|
|
418
409
|
<header className="rv-card-head">
|
|
419
|
-
<span className="rv-no" aria-hidden="true">
|
|
410
|
+
<span className="rv-no" data-audience={root.audience} aria-hidden="true">
|
|
420
411
|
{root.status === 'resolved' ? <Icon name="check" size={12} /> : root.number || null}
|
|
421
412
|
</span>
|
|
422
|
-
<span className="rv-about rv-ellipsis">{about(root)}</span>
|
|
423
413
|
{mark && (
|
|
424
414
|
<span className="rv-aud" data-audience={root.audience}>
|
|
425
415
|
{AUDIENCE_LABEL[root.audience]}
|
|
426
416
|
</span>
|
|
427
417
|
)}
|
|
418
|
+
<span className="rv-spacer" />
|
|
428
419
|
<Stepper index={index} total={total} onStep={onStep} />
|
|
429
420
|
{canResolve && <ResolveButton store={store} root={root} />}
|
|
430
421
|
<ThreadMenu
|
|
@@ -477,7 +468,8 @@ export function ThreadCard({
|
|
|
477
468
|
}) {
|
|
478
469
|
const [confirming, setConfirming] = useState(false);
|
|
479
470
|
const resolved = root.status === 'resolved';
|
|
480
|
-
const
|
|
471
|
+
const label = threadLabel(root);
|
|
472
|
+
const words = [label ? `Comment ${label}` : 'Comment', mark && AUDIENCE_LABEL[root.audience]];
|
|
481
473
|
return (
|
|
482
474
|
<Card
|
|
483
475
|
at={at}
|
package/shell/review/client.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
// The review UI's one store
|
|
1
|
+
// The review UI's one store, and the one way to the API (`call`), which the
|
|
2
|
+
// index uses too: who is signed in, this prototype's comments and,
|
|
2
3
|
// for Studio, the people. Components read it with useSyncExternalStore and
|
|
3
4
|
// call its actions; every call goes to /api/review (server/api.ts), and each
|
|
4
5
|
// answer is merged in place, so a write never refetches the list. The list is
|
|
@@ -25,6 +26,8 @@ class ApiError extends Error {
|
|
|
25
26
|
problems: string[];
|
|
26
27
|
/** A 503 with Retry-After: the store did not answer, and review is on. */
|
|
27
28
|
retry: boolean;
|
|
29
|
+
/** The answer was not JSON: no review API answered (`vite preview` serves its page instead). */
|
|
30
|
+
notJson = false;
|
|
28
31
|
constructor(status: number, message: string, problems: string[] = [], retry = false) {
|
|
29
32
|
super(message);
|
|
30
33
|
this.status = status;
|
|
@@ -38,7 +41,7 @@ const API = '/api/review';
|
|
|
38
41
|
/** For a click handler: the store shows every failure in the panel, so the handler has nothing left to do with one. */
|
|
39
42
|
export const act = (pending: Promise<unknown>) => void pending.catch(() => {});
|
|
40
43
|
|
|
41
|
-
async function call<T>(
|
|
44
|
+
export async function call<T>(
|
|
42
45
|
op: string,
|
|
43
46
|
body?: Record<string, unknown>,
|
|
44
47
|
params: Record<string, string> = {},
|
|
@@ -56,8 +59,14 @@ async function call<T>(
|
|
|
56
59
|
| null;
|
|
57
60
|
if (response.status === 503 && response.headers.has('retry-after'))
|
|
58
61
|
throw new ApiError(503, 'The review store did not answer. Reload in a minute.', [], true);
|
|
59
|
-
if (!json)
|
|
60
|
-
|
|
62
|
+
if (!json) {
|
|
63
|
+
const error = new ApiError(
|
|
64
|
+
response.status,
|
|
65
|
+
`The review API did not answer with JSON (${response.status}).`,
|
|
66
|
+
);
|
|
67
|
+
error.notJson = true;
|
|
68
|
+
throw error;
|
|
69
|
+
}
|
|
61
70
|
if (!response.ok)
|
|
62
71
|
throw new ApiError(response.status, json.error ?? `Request failed (${response.status}).`, json.problems);
|
|
63
72
|
return json;
|
|
@@ -70,6 +79,9 @@ async function call<T>(
|
|
|
70
79
|
const isOff = (error: unknown) =>
|
|
71
80
|
error instanceof ApiError && !error.retry && (error.status === 503 || error.status === 404);
|
|
72
81
|
|
|
82
|
+
/** No review API at all: none set up (`isOff`), or an answer that is not the API's (a static preview's page). */
|
|
83
|
+
export const noApi = (error: unknown) => isOff(error) || (error instanceof ApiError && error.notJson);
|
|
84
|
+
|
|
73
85
|
export function createReviewStore(prototype: string) {
|
|
74
86
|
let state: State = { status: 'loading', me: null, comments: [], people: null, access: null, error: null };
|
|
75
87
|
const listeners = new Set<() => void>();
|
package/shell/review/review.css
CHANGED
|
@@ -20,7 +20,11 @@
|
|
|
20
20
|
--rv-on-accent: oklch(0.205 0 0);
|
|
21
21
|
--rv-mark: oklch(0.55 0 0); /* on the page: mid grey holds on light and dark */
|
|
22
22
|
--rv-pin: oklch(0.205 0 0);
|
|
23
|
-
--rv-done: oklch(0.8 0.13 155); /* resolved:
|
|
23
|
+
--rv-done: oklch(0.8 0.13 155); /* resolved: green, on its check alone */
|
|
24
|
+
--rv-internal: var(--sys-internal); /* internal: the amber of a support tool's internal note (system.css) */
|
|
25
|
+
--rv-on-internal: var(--sys-on-internal); /* the label on amber, 8:1 */
|
|
26
|
+
--rv-internal-chip: oklch(0.35 0.06 85); /* the Internal tag on the card: a solid low tint, not amber at low opacity */
|
|
27
|
+
--rv-internal-chip-fg: oklch(0.88 0.12 85); /* 8:1 on the chip */
|
|
24
28
|
--rv-danger: oklch(0.779 0.131 23.4);
|
|
25
29
|
--rv-raised: 0 0 0 1px oklch(1 0 0 / 0.09), 0 12px 32px -8px oklch(0 0 0 / 0.5), 0 2px 6px oklch(0 0 0 / 0.25);
|
|
26
30
|
|
|
@@ -77,7 +81,6 @@
|
|
|
77
81
|
.rv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
78
82
|
.rv-muted { color: var(--harness-fg-muted); }
|
|
79
83
|
.rv-spacer { flex: 1; }
|
|
80
|
-
.rv-ellipsis { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
81
84
|
.rv-title { margin: 0; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--rv-fg-strong); white-space: nowrap; }
|
|
82
85
|
|
|
83
86
|
/* ---------- the kit's controls, at the layer's size ---------- */
|
|
@@ -301,16 +304,16 @@
|
|
|
301
304
|
.rv-alert.rv-viewing .icon { flex: none; color: var(--harness-fg-muted); }
|
|
302
305
|
|
|
303
306
|
/* ---------- pins ---------- */
|
|
304
|
-
/* Open: solid and numbered. Internal (Studio only): numbered
|
|
305
|
-
|
|
306
|
-
pale, a check where the number was. The open card's pin
|
|
307
|
-
face, so it reads as selected. */
|
|
307
|
+
/* Open: solid and numbered. Internal (Studio only): numbered on amber,
|
|
308
|
+
far lighter than the open face so it reads apart without the hue too.
|
|
309
|
+
Resolved: smaller, pale, a check where the number was. The open card's pin
|
|
310
|
+
turns to its other face, so it reads as selected. */
|
|
308
311
|
.rv-pins { position: fixed; inset: 0; z-index: var(--rv-z-page); pointer-events: none; }
|
|
309
312
|
.rv-pin {
|
|
310
313
|
position: absolute;
|
|
311
314
|
top: -24px;
|
|
312
315
|
left: 0;
|
|
313
|
-
width: 24px;
|
|
316
|
+
min-width: 24px;
|
|
314
317
|
height: 24px;
|
|
315
318
|
padding: 0;
|
|
316
319
|
border: 0;
|
|
@@ -322,11 +325,14 @@
|
|
|
322
325
|
.rv-pin::before { content: ''; position: absolute; inset: -10px; }
|
|
323
326
|
.rv-pin[hidden] { display: none; }
|
|
324
327
|
.rv-pin:focus-visible { outline: none; }
|
|
328
|
+
/* Grows from its tip for a longer number (128), never shrinks below a circle. */
|
|
325
329
|
.rv-pin-face {
|
|
330
|
+
box-sizing: border-box;
|
|
326
331
|
display: grid;
|
|
327
332
|
place-items: center;
|
|
328
|
-
width:
|
|
333
|
+
min-width: 24px;
|
|
329
334
|
height: 100%;
|
|
335
|
+
padding: 0 5px;
|
|
330
336
|
border: 2px solid oklch(1 0 0);
|
|
331
337
|
border-radius: 12px 12px 12px 3px;
|
|
332
338
|
background: var(--rv-pin);
|
|
@@ -344,11 +350,14 @@
|
|
|
344
350
|
.rv-pin:active .rv-pin-face { scale: 0.94; }
|
|
345
351
|
.rv-pin:focus-visible .rv-pin-face { box-shadow: 0 2px 8px oklch(0 0 0 / 0.35), 0 0 0 2px oklch(1 0 0), 0 0 0 4px var(--rv-pin); }
|
|
346
352
|
.rv-pin[data-active] .rv-pin-face { background: oklch(1 0 0); color: var(--rv-pin); border-color: var(--rv-pin); }
|
|
347
|
-
.rv-pin[data-resolved] { width: 20px; height: 20px; top: -20px; }
|
|
353
|
+
.rv-pin[data-resolved] { min-width: 20px; height: 20px; top: -20px; }
|
|
354
|
+
.rv-pin[data-resolved] .rv-pin-face { min-width: 20px; padding: 0; }
|
|
348
355
|
.rv-pin[data-resolved] .rv-pin-face { border-color: oklch(1 0 0 / 0.9); background: oklch(0.88 0 0); color: oklch(0.42 0 0); box-shadow: 0 1px 4px oklch(0 0 0 / 0.25); }
|
|
349
356
|
.rv-pin[data-resolved][data-active] .rv-pin-face { background: var(--rv-pin); color: var(--rv-done); border-color: oklch(1 0 0); }
|
|
350
|
-
.rv-pin[data-internal]:not([data-resolved]) .rv-pin-face { background:
|
|
351
|
-
.rv-pin[data-internal]
|
|
357
|
+
.rv-pin[data-internal]:not([data-resolved]) .rv-pin-face { background: var(--rv-internal); color: var(--rv-on-internal); }
|
|
358
|
+
.rv-pin[data-internal]:not([data-resolved]):focus-visible .rv-pin-face { box-shadow: 0 2px 8px oklch(0 0 0 / 0.35), 0 0 0 2px oklch(1 0 0), 0 0 0 4px var(--rv-on-internal); }
|
|
359
|
+
/* Selected: the amber face turns over, as the open one does. */
|
|
360
|
+
.rv-pin[data-internal][data-active]:not([data-resolved]) .rv-pin-face { background: var(--rv-on-internal); color: var(--rv-internal); border-color: oklch(1 0 0); }
|
|
352
361
|
.rv-pin[data-new] { pointer-events: none; }
|
|
353
362
|
.rv-pin[data-new] .rv-pin-face { background: oklch(1 0 0); border-color: var(--rv-pin); }
|
|
354
363
|
|
|
@@ -369,7 +378,7 @@
|
|
|
369
378
|
}
|
|
370
379
|
@starting-style { .rv-card { opacity: 0; transform: scale(0.97); } }
|
|
371
380
|
|
|
372
|
-
/* The head:
|
|
381
|
+
/* The head: number and audience, then its one decision and the rest. 44px, no rule under it: the body's own air separates them. */
|
|
373
382
|
.rv-card-head {
|
|
374
383
|
display: flex;
|
|
375
384
|
flex: none;
|
|
@@ -378,14 +387,17 @@
|
|
|
378
387
|
min-height: 44px;
|
|
379
388
|
padding: 6px 6px 0 14px;
|
|
380
389
|
}
|
|
381
|
-
.rv-card-head .rv-title
|
|
382
|
-
.rv-about { flex: 1; min-width: 0; margin-left: 4px; color: var(--harness-fg-muted); font-size: 12px; }
|
|
390
|
+
.rv-card-head .rv-title { margin-right: 6px; }
|
|
383
391
|
.rv-step { margin: 0 2px; font-size: 12px; }
|
|
384
|
-
/* Who the thread is for, Studio only: a hairline tag, quieter than kind and state.
|
|
392
|
+
/* Who the thread is for, Studio only. Client-facing: a hairline tag, quieter than kind and state.
|
|
393
|
+
Internal: the pin's amber, as a solid chip. */
|
|
394
|
+
.rv-no + .rv-aud { margin-left: 4px; }
|
|
385
395
|
.rv-aud { flex: none; display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 6px; box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.14); color: var(--harness-fg-muted); font-size: 11px; font-weight: 500; white-space: nowrap; }
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
396
|
+
.rv-aud[data-audience="internal"] { box-shadow: none; background: var(--rv-internal-chip); color: var(--rv-internal-chip-fg); }
|
|
397
|
+
/* Studio's choice on a new thread: the bar's toggle, small, in the head beside the title.
|
|
398
|
+
A 28px track (radius 14), its halves 2px in (24px, radius 12). */
|
|
399
|
+
.rv-toggle.rv-audience { height: 28px; border-radius: 14px; }
|
|
400
|
+
.rv-toggle.rv-audience button { height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; }
|
|
389
401
|
.rv-no {
|
|
390
402
|
display: inline-grid;
|
|
391
403
|
flex: none;
|
|
@@ -400,7 +412,7 @@
|
|
|
400
412
|
font-weight: 700;
|
|
401
413
|
font-variant-numeric: tabular-nums;
|
|
402
414
|
}
|
|
403
|
-
/* Resolve: the head's one labelled control, quiet until the pointer finds it; done, its check turns
|
|
415
|
+
/* Resolve: the head's one labelled control, quiet until the pointer finds it; done, its check turns green. */
|
|
404
416
|
.rv .btn.rv-resolve { height: 28px; padding: 0 10px 0 8px; color: var(--harness-fg); background: var(--rv-fill); }
|
|
405
417
|
.rv .btn.rv-resolve .icon { color: var(--rv-done); }
|
|
406
418
|
.rv .btn.rv-resolve.is-done .icon { color: var(--harness-fg-muted); }
|
|
@@ -415,6 +427,7 @@
|
|
|
415
427
|
.rv-card-foot.rv-confirm { transition: opacity var(--dur-menu) var(--ease-out); }
|
|
416
428
|
|
|
417
429
|
/* Resolved: the badge becomes a check, a band names who closed it, the words step back. */
|
|
430
|
+
.rv-no[data-audience="internal"] { background: var(--rv-internal); color: var(--rv-on-internal); }
|
|
418
431
|
.rv-card[data-resolved] .rv-no { background: var(--rv-fill-open); color: var(--rv-done); }
|
|
419
432
|
.rv-band { display: flex; align-items: center; gap: 6px; margin: 8px 10px 0; padding: 8px 10px; border-radius: 10px; background: var(--rv-fill); color: var(--harness-fg-muted); transition: opacity var(--dur-dialog) var(--ease-out), translate var(--dur-dialog) var(--ease-out); }
|
|
420
433
|
@starting-style { .rv-band { opacity: 0; translate: 0 -4px; } }
|
|
@@ -571,8 +584,8 @@
|
|
|
571
584
|
.rv-card[data-sheet][data-dragging] { transition: none; }
|
|
572
585
|
.rv-card[data-sheet][data-leaving] { transition: transform 200ms var(--ease-out); }
|
|
573
586
|
.rv-card[data-sheet] .rv-card-head { touch-action: none; min-height: 44px; padding-top: 4px; }
|
|
574
|
-
|
|
575
|
-
.rv-card[data-sheet] .rv-
|
|
587
|
+
.rv-card[data-sheet] .rv-toggle.rv-audience { height: 36px; border-radius: 18px; }
|
|
588
|
+
.rv-card[data-sheet] .rv-toggle.rv-audience button { height: 32px; border-radius: 16px; }
|
|
576
589
|
.rv-grab { display: block; flex: none; width: 36px; height: 4px; margin: 8px auto 0; border-radius: 999px; background: oklch(1 0 0 / 0.25); touch-action: none; }
|
|
577
590
|
.rv-card[data-sheet] .rv-card-body { padding-inline: 16px; }
|
|
578
591
|
.rv-card[data-sheet] .rv-card-foot { padding: 0 12px 12px; }
|
|
@@ -589,9 +602,9 @@
|
|
|
589
602
|
}
|
|
590
603
|
@starting-style { .rv-bar { opacity: 1; transform: translateY(100%); } }
|
|
591
604
|
.rv-bar { transition: transform var(--dur-sheet, 320ms) var(--ease-drawer), opacity var(--dur-dialog) var(--ease-out); }
|
|
592
|
-
.rv-toggle { height: 40px; border-radius: 20px; margin-right: auto; }
|
|
605
|
+
.rv-bar .rv-toggle { height: 40px; border-radius: 20px; margin-right: auto; }
|
|
593
606
|
.rv-bar-rule { display: none; }
|
|
594
|
-
.rv-toggle button { height: 36px; border-radius: 18px; }
|
|
607
|
+
.rv-bar .rv-toggle button { height: 36px; border-radius: 18px; }
|
|
595
608
|
.rv-bar .btn { width: 40px; height: 40px; border-radius: 20px; }
|
|
596
609
|
.rv-stepper-count { min-width: 52px; }
|
|
597
610
|
.rv-alert { margin: 0 12px 8px; max-width: none; }
|
|
@@ -600,7 +613,7 @@
|
|
|
600
613
|
|
|
601
614
|
/* The narrowest phones: the toggle keeps its icons, its words go to the screen reader. */
|
|
602
615
|
@media (max-width: 400px) {
|
|
603
|
-
.rv-toggle button { width: 44px; padding: 0; justify-content: center; }
|
|
616
|
+
.rv-bar .rv-toggle button { width: 44px; padding: 0; justify-content: center; }
|
|
604
617
|
.rv-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
605
618
|
.rv-stepper-count { min-width: 44px; }
|
|
606
619
|
}
|