@cratis/showrunner.playbill.react 0.0.0-stage → 2.20.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/Badge/PlaybillBadge.tsx +45 -0
- package/Badge/index.ts +4 -0
- package/Client/PlaybillClient.ts +78 -0
- package/Client/index.ts +5 -0
- package/Client/models.ts +64 -0
- package/Configuration/PlaybillProvider.tsx +38 -0
- package/Configuration/index.ts +4 -0
- package/Dialog/PlaybillDialog.tsx +83 -0
- package/Dialog/index.ts +4 -0
- package/Icons.tsx +14 -0
- package/Labels/PlaybillLabels.ts +46 -0
- package/Labels/defaultPlaybillLabels.ts +29 -0
- package/Labels/index.ts +6 -0
- package/Labels/resolveLabels.ts +20 -0
- package/Markdown/PlaybillLink.tsx +14 -0
- package/Markdown/PlaybillMarkdown.tsx +41 -0
- package/Markdown/assetUrl.ts +28 -0
- package/Markdown/index.ts +6 -0
- package/Markdown/safeLink.ts +25 -0
- package/Playbill.tsx +121 -0
- package/README.md +54 -2
- package/Release/ReleaseNoteView.tsx +79 -0
- package/Release/formatReleaseDate.ts +22 -0
- package/Release/index.ts +6 -0
- package/Release/sectionPresentation.ts +35 -0
- package/dist/cjs/Badge/PlaybillBadge.d.ts +10 -0
- package/dist/cjs/Badge/PlaybillBadge.d.ts.map +1 -0
- package/dist/cjs/Badge/PlaybillBadge.js +38 -0
- package/dist/cjs/Badge/PlaybillBadge.js.map +1 -0
- package/dist/cjs/Badge/index.d.ts +2 -0
- package/dist/cjs/Badge/index.d.ts.map +1 -0
- package/dist/cjs/Client/PlaybillClient.d.ts +13 -0
- package/dist/cjs/Client/PlaybillClient.d.ts.map +1 -0
- package/dist/cjs/Client/PlaybillClient.js +71 -0
- package/dist/cjs/Client/PlaybillClient.js.map +1 -0
- package/dist/cjs/Client/index.d.ts +3 -0
- package/dist/cjs/Client/index.d.ts.map +1 -0
- package/dist/cjs/Client/models.d.ts +27 -0
- package/dist/cjs/Client/models.d.ts.map +1 -0
- package/dist/cjs/Configuration/PlaybillProvider.d.ts +11 -0
- package/dist/cjs/Configuration/PlaybillProvider.d.ts.map +1 -0
- package/dist/cjs/Configuration/PlaybillProvider.js +30 -0
- package/dist/cjs/Configuration/PlaybillProvider.js.map +1 -0
- package/dist/cjs/Configuration/index.d.ts +2 -0
- package/dist/cjs/Configuration/index.d.ts.map +1 -0
- package/dist/cjs/Dialog/PlaybillDialog.d.ts +13 -0
- package/dist/cjs/Dialog/PlaybillDialog.d.ts.map +1 -0
- package/dist/cjs/Dialog/PlaybillDialog.js +79 -0
- package/dist/cjs/Dialog/PlaybillDialog.js.map +1 -0
- package/dist/cjs/Dialog/index.d.ts +2 -0
- package/dist/cjs/Dialog/index.d.ts.map +1 -0
- package/dist/cjs/Examples/AppShell.d.ts +5 -0
- package/dist/cjs/Examples/AppShell.d.ts.map +1 -0
- package/dist/cjs/Examples/LocalizedPlaybill.d.ts +2 -0
- package/dist/cjs/Examples/LocalizedPlaybill.d.ts.map +1 -0
- package/dist/cjs/Examples/OwnEndpoint.d.ts +2 -0
- package/dist/cjs/Examples/OwnEndpoint.d.ts.map +1 -0
- package/dist/cjs/Examples/OwnMarkdown.d.ts +2 -0
- package/dist/cjs/Examples/OwnMarkdown.d.ts.map +1 -0
- package/dist/cjs/Examples/OwnRelease.d.ts +2 -0
- package/dist/cjs/Examples/OwnRelease.d.ts.map +1 -0
- package/dist/cjs/Examples/OwnSurface.d.ts +2 -0
- package/dist/cjs/Examples/OwnSurface.d.ts.map +1 -0
- package/dist/cjs/Examples/ReleaseNotesPage.d.ts +2 -0
- package/dist/cjs/Examples/ReleaseNotesPage.d.ts.map +1 -0
- package/dist/cjs/Icons.d.ts +2 -0
- package/dist/cjs/Icons.d.ts.map +1 -0
- package/dist/cjs/Icons.js +36 -0
- package/dist/cjs/Icons.js.map +1 -0
- package/dist/cjs/Labels/PlaybillLabels.d.ts +22 -0
- package/dist/cjs/Labels/PlaybillLabels.d.ts.map +1 -0
- package/dist/cjs/Labels/defaultPlaybillLabels.d.ts +3 -0
- package/dist/cjs/Labels/defaultPlaybillLabels.d.ts.map +1 -0
- package/dist/cjs/Labels/defaultPlaybillLabels.js +30 -0
- package/dist/cjs/Labels/defaultPlaybillLabels.js.map +1 -0
- package/dist/cjs/Labels/index.d.ts +4 -0
- package/dist/cjs/Labels/index.d.ts.map +1 -0
- package/dist/cjs/Labels/resolveLabels.d.ts +4 -0
- package/dist/cjs/Labels/resolveLabels.d.ts.map +1 -0
- package/dist/cjs/Labels/resolveLabels.js +24 -0
- package/dist/cjs/Labels/resolveLabels.js.map +1 -0
- package/dist/cjs/Markdown/PlaybillLink.d.ts +5 -0
- package/dist/cjs/Markdown/PlaybillLink.d.ts.map +1 -0
- package/dist/cjs/Markdown/PlaybillLink.js +21 -0
- package/dist/cjs/Markdown/PlaybillLink.js.map +1 -0
- package/dist/cjs/Markdown/PlaybillMarkdown.d.ts +7 -0
- package/dist/cjs/Markdown/PlaybillMarkdown.d.ts.map +1 -0
- package/dist/cjs/Markdown/PlaybillMarkdown.js +34 -0
- package/dist/cjs/Markdown/PlaybillMarkdown.js.map +1 -0
- package/dist/cjs/Markdown/assetUrl.d.ts +2 -0
- package/dist/cjs/Markdown/assetUrl.d.ts.map +1 -0
- package/dist/cjs/Markdown/assetUrl.js +29 -0
- package/dist/cjs/Markdown/assetUrl.js.map +1 -0
- package/dist/cjs/Markdown/index.d.ts +4 -0
- package/dist/cjs/Markdown/index.d.ts.map +1 -0
- package/dist/cjs/Markdown/safeLink.d.ts +3 -0
- package/dist/cjs/Markdown/safeLink.d.ts.map +1 -0
- package/dist/cjs/Markdown/safeLink.js +30 -0
- package/dist/cjs/Markdown/safeLink.js.map +1 -0
- package/dist/cjs/Playbill.d.ts +15 -0
- package/dist/cjs/Playbill.d.ts.map +1 -0
- package/dist/cjs/Playbill.js +135 -0
- package/dist/cjs/Playbill.js.map +1 -0
- package/dist/cjs/Release/ReleaseNoteView.d.ts +16 -0
- package/dist/cjs/Release/ReleaseNoteView.d.ts.map +1 -0
- package/dist/cjs/Release/ReleaseNoteView.js +75 -0
- package/dist/cjs/Release/ReleaseNoteView.js.map +1 -0
- package/dist/cjs/Release/formatReleaseDate.d.ts +2 -0
- package/dist/cjs/Release/formatReleaseDate.d.ts.map +1 -0
- package/dist/cjs/Release/formatReleaseDate.js +26 -0
- package/dist/cjs/Release/formatReleaseDate.js.map +1 -0
- package/dist/cjs/Release/index.d.ts +4 -0
- package/dist/cjs/Release/index.d.ts.map +1 -0
- package/dist/cjs/Release/sectionPresentation.d.ts +7 -0
- package/dist/cjs/Release/sectionPresentation.d.ts.map +1 -0
- package/dist/cjs/Release/sectionPresentation.js +31 -0
- package/dist/cjs/Release/sectionPresentation.js.map +1 -0
- package/dist/cjs/index.d.ts +13 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +46 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/useLoaded.d.ts +7 -0
- package/dist/cjs/useLoaded.d.ts.map +1 -0
- package/dist/cjs/useLoaded.js +45 -0
- package/dist/cjs/useLoaded.js.map +1 -0
- package/dist/cjs/usePlaybill.d.ts +5 -0
- package/dist/cjs/usePlaybill.d.ts.map +1 -0
- package/dist/cjs/usePlaybill.js +18 -0
- package/dist/cjs/usePlaybill.js.map +1 -0
- package/dist/cjs/usePlaybillStatus.d.ts +8 -0
- package/dist/cjs/usePlaybillStatus.d.ts.map +1 -0
- package/dist/cjs/usePlaybillStatus.js +34 -0
- package/dist/cjs/usePlaybillStatus.js.map +1 -0
- package/dist/cjs/useReleases.d.ts +12 -0
- package/dist/cjs/useReleases.d.ts.map +1 -0
- package/dist/cjs/useReleases.js +58 -0
- package/dist/cjs/useReleases.js.map +1 -0
- package/dist/esm/Badge/PlaybillBadge.d.ts +10 -0
- package/dist/esm/Badge/PlaybillBadge.d.ts.map +1 -0
- package/dist/esm/Badge/PlaybillBadge.js +36 -0
- package/dist/esm/Badge/PlaybillBadge.js.map +1 -0
- package/dist/esm/Badge/index.d.ts +2 -0
- package/dist/esm/Badge/index.d.ts.map +1 -0
- package/dist/esm/Badge/index.js +2 -0
- package/dist/esm/Badge/index.js.map +1 -0
- package/dist/esm/Client/PlaybillClient.d.ts +13 -0
- package/dist/esm/Client/PlaybillClient.d.ts.map +1 -0
- package/dist/esm/Client/PlaybillClient.js +68 -0
- package/dist/esm/Client/PlaybillClient.js.map +1 -0
- package/dist/esm/Client/index.d.ts +3 -0
- package/dist/esm/Client/index.d.ts.map +1 -0
- package/dist/esm/Client/index.js +3 -0
- package/dist/esm/Client/index.js.map +1 -0
- package/dist/esm/Client/models.d.ts +27 -0
- package/dist/esm/Client/models.d.ts.map +1 -0
- package/dist/esm/Client/models.js +2 -0
- package/dist/esm/Client/models.js.map +1 -0
- package/dist/esm/Configuration/PlaybillProvider.d.ts +11 -0
- package/dist/esm/Configuration/PlaybillProvider.d.ts.map +1 -0
- package/dist/esm/Configuration/PlaybillProvider.js +27 -0
- package/dist/esm/Configuration/PlaybillProvider.js.map +1 -0
- package/dist/esm/Configuration/index.d.ts +2 -0
- package/dist/esm/Configuration/index.d.ts.map +1 -0
- package/dist/esm/Configuration/index.js +2 -0
- package/dist/esm/Configuration/index.js.map +1 -0
- package/dist/esm/Dialog/PlaybillDialog.d.ts +13 -0
- package/dist/esm/Dialog/PlaybillDialog.d.ts.map +1 -0
- package/dist/esm/Dialog/PlaybillDialog.js +77 -0
- package/dist/esm/Dialog/PlaybillDialog.js.map +1 -0
- package/dist/esm/Dialog/index.d.ts +2 -0
- package/dist/esm/Dialog/index.d.ts.map +1 -0
- package/dist/esm/Dialog/index.js +2 -0
- package/dist/esm/Dialog/index.js.map +1 -0
- package/dist/esm/Examples/AppShell.d.ts +5 -0
- package/dist/esm/Examples/AppShell.d.ts.map +1 -0
- package/dist/esm/Examples/AppShell.js +6 -0
- package/dist/esm/Examples/AppShell.js.map +1 -0
- package/dist/esm/Examples/LocalizedPlaybill.d.ts +2 -0
- package/dist/esm/Examples/LocalizedPlaybill.d.ts.map +1 -0
- package/dist/esm/Examples/LocalizedPlaybill.js +13 -0
- package/dist/esm/Examples/LocalizedPlaybill.js.map +1 -0
- package/dist/esm/Examples/OwnEndpoint.d.ts +2 -0
- package/dist/esm/Examples/OwnEndpoint.d.ts.map +1 -0
- package/dist/esm/Examples/OwnEndpoint.js +8 -0
- package/dist/esm/Examples/OwnEndpoint.js.map +1 -0
- package/dist/esm/Examples/OwnMarkdown.d.ts +2 -0
- package/dist/esm/Examples/OwnMarkdown.d.ts.map +1 -0
- package/dist/esm/Examples/OwnMarkdown.js +5 -0
- package/dist/esm/Examples/OwnMarkdown.js.map +1 -0
- package/dist/esm/Examples/OwnRelease.d.ts +2 -0
- package/dist/esm/Examples/OwnRelease.d.ts.map +1 -0
- package/dist/esm/Examples/OwnRelease.js +5 -0
- package/dist/esm/Examples/OwnRelease.js.map +1 -0
- package/dist/esm/Examples/OwnSurface.d.ts +2 -0
- package/dist/esm/Examples/OwnSurface.d.ts.map +1 -0
- package/dist/esm/Examples/OwnSurface.js +8 -0
- package/dist/esm/Examples/OwnSurface.js.map +1 -0
- package/dist/esm/Examples/ReleaseNotesPage.d.ts +2 -0
- package/dist/esm/Examples/ReleaseNotesPage.d.ts.map +1 -0
- package/dist/esm/Examples/ReleaseNotesPage.js +4 -0
- package/dist/esm/Examples/ReleaseNotesPage.js.map +1 -0
- package/dist/esm/Icons.d.ts +2 -0
- package/dist/esm/Icons.d.ts.map +1 -0
- package/dist/esm/Icons.js +34 -0
- package/dist/esm/Icons.js.map +1 -0
- package/dist/esm/Labels/PlaybillLabels.d.ts +22 -0
- package/dist/esm/Labels/PlaybillLabels.d.ts.map +1 -0
- package/dist/esm/Labels/PlaybillLabels.js +2 -0
- package/dist/esm/Labels/PlaybillLabels.js.map +1 -0
- package/dist/esm/Labels/defaultPlaybillLabels.d.ts +3 -0
- package/dist/esm/Labels/defaultPlaybillLabels.d.ts.map +1 -0
- package/dist/esm/Labels/defaultPlaybillLabels.js +28 -0
- package/dist/esm/Labels/defaultPlaybillLabels.js.map +1 -0
- package/dist/esm/Labels/index.d.ts +4 -0
- package/dist/esm/Labels/index.d.ts.map +1 -0
- package/dist/esm/Labels/index.js +4 -0
- package/dist/esm/Labels/index.js.map +1 -0
- package/dist/esm/Labels/resolveLabels.d.ts +4 -0
- package/dist/esm/Labels/resolveLabels.d.ts.map +1 -0
- package/dist/esm/Labels/resolveLabels.js +21 -0
- package/dist/esm/Labels/resolveLabels.js.map +1 -0
- package/dist/esm/Markdown/PlaybillLink.d.ts +5 -0
- package/dist/esm/Markdown/PlaybillLink.d.ts.map +1 -0
- package/dist/esm/Markdown/PlaybillLink.js +19 -0
- package/dist/esm/Markdown/PlaybillLink.js.map +1 -0
- package/dist/esm/Markdown/PlaybillMarkdown.d.ts +7 -0
- package/dist/esm/Markdown/PlaybillMarkdown.d.ts.map +1 -0
- package/dist/esm/Markdown/PlaybillMarkdown.js +32 -0
- package/dist/esm/Markdown/PlaybillMarkdown.js.map +1 -0
- package/dist/esm/Markdown/assetUrl.d.ts +2 -0
- package/dist/esm/Markdown/assetUrl.d.ts.map +1 -0
- package/dist/esm/Markdown/assetUrl.js +27 -0
- package/dist/esm/Markdown/assetUrl.js.map +1 -0
- package/dist/esm/Markdown/index.d.ts +4 -0
- package/dist/esm/Markdown/index.d.ts.map +1 -0
- package/dist/esm/Markdown/index.js +4 -0
- package/dist/esm/Markdown/index.js.map +1 -0
- package/dist/esm/Markdown/safeLink.d.ts +3 -0
- package/dist/esm/Markdown/safeLink.d.ts.map +1 -0
- package/dist/esm/Markdown/safeLink.js +27 -0
- package/dist/esm/Markdown/safeLink.js.map +1 -0
- package/dist/esm/Playbill.d.ts +15 -0
- package/dist/esm/Playbill.d.ts.map +1 -0
- package/dist/esm/Playbill.js +133 -0
- package/dist/esm/Playbill.js.map +1 -0
- package/dist/esm/Release/ReleaseNoteView.d.ts +16 -0
- package/dist/esm/Release/ReleaseNoteView.d.ts.map +1 -0
- package/dist/esm/Release/ReleaseNoteView.js +73 -0
- package/dist/esm/Release/ReleaseNoteView.js.map +1 -0
- package/dist/esm/Release/formatReleaseDate.d.ts +2 -0
- package/dist/esm/Release/formatReleaseDate.d.ts.map +1 -0
- package/dist/esm/Release/formatReleaseDate.js +24 -0
- package/dist/esm/Release/formatReleaseDate.js.map +1 -0
- package/dist/esm/Release/index.d.ts +4 -0
- package/dist/esm/Release/index.d.ts.map +1 -0
- package/dist/esm/Release/index.js +4 -0
- package/dist/esm/Release/index.js.map +1 -0
- package/dist/esm/Release/sectionPresentation.d.ts +7 -0
- package/dist/esm/Release/sectionPresentation.d.ts.map +1 -0
- package/dist/esm/Release/sectionPresentation.js +29 -0
- package/dist/esm/Release/sectionPresentation.js.map +1 -0
- package/dist/esm/index.d.ts +13 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +18 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/useLoaded.d.ts +7 -0
- package/dist/esm/useLoaded.d.ts.map +1 -0
- package/dist/esm/useLoaded.js +43 -0
- package/dist/esm/useLoaded.js.map +1 -0
- package/dist/esm/usePlaybill.d.ts +5 -0
- package/dist/esm/usePlaybill.d.ts.map +1 -0
- package/dist/esm/usePlaybill.js +16 -0
- package/dist/esm/usePlaybill.js.map +1 -0
- package/dist/esm/usePlaybillStatus.d.ts +8 -0
- package/dist/esm/usePlaybillStatus.d.ts.map +1 -0
- package/dist/esm/usePlaybillStatus.js +32 -0
- package/dist/esm/usePlaybillStatus.js.map +1 -0
- package/dist/esm/useReleases.d.ts +12 -0
- package/dist/esm/useReleases.d.ts.map +1 -0
- package/dist/esm/useReleases.js +54 -0
- package/dist/esm/useReleases.js.map +1 -0
- package/index.ts +15 -0
- package/package.json +87 -4
- package/styles.css +298 -0
- package/useLoaded.ts +45 -0
- package/usePlaybill.ts +17 -0
- package/usePlaybillStatus.ts +48 -0
- package/useReleases.ts +59 -0
package/Playbill.tsx
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { ComponentType, useEffect, useMemo, useState } from 'react';
|
|
5
|
+
import { usePlaybillClient } from './Configuration/index.js';
|
|
6
|
+
import { PlaybillLabels, resolveLabels } from './Labels/index.js';
|
|
7
|
+
import { PlaybillMarkdown, PlaybillMarkdownProps } from './Markdown/index.js';
|
|
8
|
+
import { formatReleaseDate, ReleaseNoteView, ReleaseNoteViewProps } from './Release/index.js';
|
|
9
|
+
import { usePlaybill } from './usePlaybill.js';
|
|
10
|
+
import { useRelease } from './useReleases.js';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Props for {@link Playbill}.
|
|
14
|
+
*/
|
|
15
|
+
export interface PlaybillProps {
|
|
16
|
+
/** Replaces how the selected release is drawn. */
|
|
17
|
+
release?: ComponentType<ReleaseNoteViewProps>;
|
|
18
|
+
/** Replaces the Markdown renderer the default release view uses, and that a custom one is given. */
|
|
19
|
+
markdown?: ComponentType<PlaybillMarkdownProps>;
|
|
20
|
+
/** The texts to replace; the rest stay English. */
|
|
21
|
+
labels?: Partial<PlaybillLabels>;
|
|
22
|
+
/** The locale to write the dates in; the browser's when not given. */
|
|
23
|
+
locale?: string | string[];
|
|
24
|
+
/** The version to show. Give it, with `onSelect`, to keep the selection in the address; by default the newest is selected. */
|
|
25
|
+
selected?: string;
|
|
26
|
+
/** Called when the person picks another release. */
|
|
27
|
+
onSelect?: (version: string) => void;
|
|
28
|
+
/** Records that the person has seen a release when it is shown. On by default; turn it off to leave what is unread to a dialog. */
|
|
29
|
+
markSeenWhenShown?: boolean;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The release notes of the application as a page: the releases newest first on one side and the selected release on the
|
|
34
|
+
* other. It marks what the person has not seen with a tag, and records a release as seen when it is shown. Place it
|
|
35
|
+
* where the application has room for a page, inside Arc's context. It draws no heading of its own.
|
|
36
|
+
*/
|
|
37
|
+
export const Playbill = ({
|
|
38
|
+
release: Release = ReleaseNoteView,
|
|
39
|
+
markdown,
|
|
40
|
+
labels,
|
|
41
|
+
locale,
|
|
42
|
+
selected,
|
|
43
|
+
onSelect,
|
|
44
|
+
markSeenWhenShown = true
|
|
45
|
+
}: PlaybillProps) => {
|
|
46
|
+
const client = usePlaybillClient();
|
|
47
|
+
const { releases, current, isLoading, error, unreadVersions, markSeen } = usePlaybill();
|
|
48
|
+
const resolved = useMemo(() => resolveLabels(labels), [labels]);
|
|
49
|
+
const [picked, setPicked] = useState<string>();
|
|
50
|
+
const version = selected ?? picked ?? releases[0]?.version;
|
|
51
|
+
const { data: note, isLoading: isLoadingNote, error: noteError } = useRelease(version);
|
|
52
|
+
const isUnread = (candidate?: string) => candidate !== undefined && unreadVersions.includes(candidate);
|
|
53
|
+
const selectedIsUnread = isUnread(version);
|
|
54
|
+
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
if (markSeenWhenShown && note && selectedIsUnread) {
|
|
57
|
+
// Failing to remember it must not keep a person from reading on.
|
|
58
|
+
markSeen(note.version).catch(() => undefined);
|
|
59
|
+
}
|
|
60
|
+
}, [markSeenWhenShown, note, selectedIsUnread, markSeen]);
|
|
61
|
+
|
|
62
|
+
const select = (next: string) => {
|
|
63
|
+
setPicked(next);
|
|
64
|
+
onSelect?.(next);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
if (error || noteError) {
|
|
68
|
+
return <p className='playbill-status playbill-status--failed' role='alert'>{resolved.failed}</p>;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (isLoading) {
|
|
72
|
+
return <p className='playbill-status' role='status'>{resolved.loading}</p>;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (releases.length === 0) {
|
|
76
|
+
return <p className='playbill-status'>{resolved.empty}</p>;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return (
|
|
80
|
+
<div className='playbill'>
|
|
81
|
+
<nav className='playbill__list' aria-label={resolved.releases}>
|
|
82
|
+
<ul>
|
|
83
|
+
{releases.map(summary => {
|
|
84
|
+
const date = formatReleaseDate(summary.releasedAt, locale);
|
|
85
|
+
const isSelected = summary.version === version;
|
|
86
|
+
return (
|
|
87
|
+
<li key={summary.version}>
|
|
88
|
+
<button
|
|
89
|
+
type='button'
|
|
90
|
+
className={isSelected ? 'playbill-item playbill-item--selected' : 'playbill-item'}
|
|
91
|
+
aria-current={isSelected ? 'true' : undefined}
|
|
92
|
+
onClick={() => select(summary.version)}>
|
|
93
|
+
<span className='playbill-item__heading'>
|
|
94
|
+
<span className='playbill-item__version'>{summary.version}</span>
|
|
95
|
+
{summary.version === current && <span className='playbill-tag playbill-tag--current'>{resolved.current}</span>}
|
|
96
|
+
{isUnread(summary.version) && <span className='playbill-tag playbill-tag--unread'>{resolved.unread}</span>}
|
|
97
|
+
</span>
|
|
98
|
+
{date && <span className='playbill-item__date'>{date}</span>}
|
|
99
|
+
{summary.summary && <span className='playbill-item__summary'>{summary.summary}</span>}
|
|
100
|
+
</button>
|
|
101
|
+
</li>
|
|
102
|
+
);
|
|
103
|
+
})}
|
|
104
|
+
</ul>
|
|
105
|
+
</nav>
|
|
106
|
+
<div className='playbill__content'>
|
|
107
|
+
{isLoadingNote && <p className='playbill-status' role='status'>{resolved.loading}</p>}
|
|
108
|
+
{!isLoadingNote && note && (
|
|
109
|
+
<Release
|
|
110
|
+
release={note}
|
|
111
|
+
assetBase={client.assetBase(note.version)}
|
|
112
|
+
labels={resolved}
|
|
113
|
+
markdown={markdown ?? PlaybillMarkdown}
|
|
114
|
+
locale={locale}
|
|
115
|
+
isUnread={selectedIsUnread}
|
|
116
|
+
isCurrent={note.version === current} />
|
|
117
|
+
)}
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
);
|
|
121
|
+
};
|
package/README.md
CHANGED
|
@@ -1,3 +1,55 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @cratis/showrunner.playbill.react
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The Playbill release-notes experience for React, the Showrunner release-notes part: `<Playbill />` is a releases page,
|
|
4
|
+
`<PlaybillDialog />` opens by itself with what is new, and `<PlaybillBadge />` is the unread count for a header. Built on
|
|
5
|
+
`@cratis/components` and the generated proxies in `@cratis/showrunner.playbill`. How to use it:
|
|
6
|
+
[Documentation/Playbill](../../../Documentation/Playbill/index.md).
|
|
7
|
+
|
|
8
|
+
## Component hierarchy
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
Playbill usePlaybill, then the list and the selected release
|
|
12
|
+
├── nav.playbill__list one button for each release: version, tags, date and summary
|
|
13
|
+
└── ReleaseNoteView one release: header, lead and a section for each heading
|
|
14
|
+
└── PlaybillMarkdown the lead and each section
|
|
15
|
+
|
|
16
|
+
PlaybillDialog Cratis Components Dialog, the notes of every unread release
|
|
17
|
+
└── ReleaseNoteView one for each release, one heading level down
|
|
18
|
+
|
|
19
|
+
PlaybillBadge a button with the unread count and an accessible name that says it in words
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`release` and `markdown` are slots: a product replaces either. `usePlaybill` gives a product the releases and the status
|
|
23
|
+
to draw a surface of its own.
|
|
24
|
+
|
|
25
|
+
## Architecture decisions
|
|
26
|
+
|
|
27
|
+
- **Reading the history and remembering what was seen are separate.** The history comes over plain HTTP from the
|
|
28
|
+
endpoints `MapPlaybill` maps (`Client/PlaybillClient.ts`, reached through `PlaybillProvider`), so it needs no Arc and
|
|
29
|
+
works for a public page. What a person has seen is the generated command and observable query, so it needs Arc.
|
|
30
|
+
`useReleases` is the first, `usePlaybillStatus` the second, `usePlaybill` both.
|
|
31
|
+
- **Decisions live in pure, specified modules; the components render and wire events.**
|
|
32
|
+
| Module | Decides |
|
|
33
|
+
| --- | --- |
|
|
34
|
+
| `Markdown/assetUrl.ts` | where an image of a note is loaded from, and which are refused |
|
|
35
|
+
| `Markdown/safeLink.ts` | which links may be followed |
|
|
36
|
+
| `Release/sectionPresentation.ts` | the title and the style of a section, known or not |
|
|
37
|
+
| `Release/formatReleaseDate.ts` | the date of a release, read in UTC so everybody sees the same day |
|
|
38
|
+
| `Labels/` | English defaults, overrides and the number in a text |
|
|
39
|
+
- **A note is data from a pull request, not markup.** `react-markdown` with `skipHtml`; only `https`, `mailto` and `tel`
|
|
40
|
+
links, opened in a new tab with `noopener noreferrer`; an image only when it is a file captured with the release, loaded
|
|
41
|
+
from its own folder, or an `https` image the capture could not download. A relative path that climbs out of the folder
|
|
42
|
+
is not an image.
|
|
43
|
+
- **Seeing is recorded when it was read, not when it was shown.** The dialog records the newest release it showed when it
|
|
44
|
+
is closed. The page records a release when it is shown, and can be told not to. A failure to record never keeps a
|
|
45
|
+
person from reading on; the release is simply unread again next time.
|
|
46
|
+
- **A release draws no frame of its own,** so the page, the dialog or a product's surface can hold it. Its heading level is
|
|
47
|
+
a prop, so the heading structure stays right wherever it sits.
|
|
48
|
+
- **Styling is tokens, custom properties and stable classes.** Every color falls back to a `--cratis-*` token, and a
|
|
49
|
+
`--playbill-*` property overrides it. A specification fails when a part the components draw has no style.
|
|
50
|
+
- **No MVVM.** The components keep no state beyond the selected release and the dismissed dialog, in the component.
|
|
51
|
+
|
|
52
|
+
## Examples
|
|
53
|
+
|
|
54
|
+
`Examples/` holds the code shown in the documentation. It is compiled with the package, and a specification fails when a
|
|
55
|
+
documentation page no longer contains an example exactly as it builds.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { ComponentType } from 'react';
|
|
5
|
+
import { Release } from '../Client/index.js';
|
|
6
|
+
import { PlaybillLabels } from '../Labels/index.js';
|
|
7
|
+
import { PlaybillMarkdown, PlaybillMarkdownProps } from '../Markdown/index.js';
|
|
8
|
+
import { formatReleaseDate } from './formatReleaseDate.js';
|
|
9
|
+
import { sectionPresentation } from './sectionPresentation.js';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Props for {@link ReleaseNoteView}, and for the component given to the `release` slot of {@link Playbill} and
|
|
13
|
+
* {@link PlaybillDialog}.
|
|
14
|
+
*/
|
|
15
|
+
export interface ReleaseNoteViewProps {
|
|
16
|
+
/** The release to show. */
|
|
17
|
+
release: Release;
|
|
18
|
+
/** Where the files of the release are served from; given to the Markdown renderer so its images load. */
|
|
19
|
+
assetBase?: string;
|
|
20
|
+
/** The texts to show. */
|
|
21
|
+
labels: PlaybillLabels;
|
|
22
|
+
/** Renders the Markdown of the note; the `markdown` slot of {@link Playbill}. */
|
|
23
|
+
markdown?: ComponentType<PlaybillMarkdownProps>;
|
|
24
|
+
/** The locale to write the date in; the browser's when not given. */
|
|
25
|
+
locale?: string | string[];
|
|
26
|
+
/** Whether the person has not seen this release yet; it is marked with the `unread` text. */
|
|
27
|
+
isUnread?: boolean;
|
|
28
|
+
/** Whether this is the version the application is running; it is marked with the `current` text. */
|
|
29
|
+
isCurrent?: boolean;
|
|
30
|
+
/** The level of the heading of the version, so the release fits under the heading of the page or dialog around it. Defaults to 2. */
|
|
31
|
+
headingLevel?: 2 | 3 | 4;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* One release: its version and date, what its note says before the first section, and each section under its heading.
|
|
36
|
+
* It draws no frame of its own, so a page, a dialog or a product's own surface can hold it.
|
|
37
|
+
*/
|
|
38
|
+
export const ReleaseNoteView = ({
|
|
39
|
+
release,
|
|
40
|
+
assetBase,
|
|
41
|
+
labels,
|
|
42
|
+
markdown: Markdown = PlaybillMarkdown,
|
|
43
|
+
locale,
|
|
44
|
+
isUnread = false,
|
|
45
|
+
isCurrent = false,
|
|
46
|
+
headingLevel = 2
|
|
47
|
+
}: ReleaseNoteViewProps) => {
|
|
48
|
+
const Heading = `h${headingLevel}` as 'h2';
|
|
49
|
+
const SectionHeading = `h${headingLevel + 1}` as 'h3';
|
|
50
|
+
const date = formatReleaseDate(release.releasedAt, locale);
|
|
51
|
+
return (
|
|
52
|
+
<article className='playbill-release' data-version={release.version}>
|
|
53
|
+
<header className='playbill-release__header'>
|
|
54
|
+
<Heading className='playbill-release__version'>{release.version}</Heading>
|
|
55
|
+
{isCurrent && <span className='playbill-tag playbill-tag--current'>{labels.current}</span>}
|
|
56
|
+
{isUnread && <span className='playbill-tag playbill-tag--unread'>{labels.unread}</span>}
|
|
57
|
+
{date && (
|
|
58
|
+
<time className='playbill-release__date' dateTime={release.releasedAt ?? undefined}>
|
|
59
|
+
{labels.released} {date}
|
|
60
|
+
</time>
|
|
61
|
+
)}
|
|
62
|
+
</header>
|
|
63
|
+
{release.lead.trim() !== '' && (
|
|
64
|
+
<div className='playbill-release__lead'>
|
|
65
|
+
<Markdown source={release.lead} assetBase={assetBase} />
|
|
66
|
+
</div>
|
|
67
|
+
)}
|
|
68
|
+
{release.sections.map(section => {
|
|
69
|
+
const presentation = sectionPresentation(section.name, labels);
|
|
70
|
+
return (
|
|
71
|
+
<section key={section.name} className={`playbill-section playbill-section--${presentation.modifier}`}>
|
|
72
|
+
<SectionHeading className='playbill-section__title'>{presentation.title}</SectionHeading>
|
|
73
|
+
<Markdown source={section.markdown} assetBase={assetBase} />
|
|
74
|
+
</section>
|
|
75
|
+
);
|
|
76
|
+
})}
|
|
77
|
+
</article>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Formats the date a release was made. The date is the one in UTC, so every person reads the same day whatever time
|
|
6
|
+
* zone they are in.
|
|
7
|
+
* @param releasedAt The ISO date the release was made; absent when it was not recorded.
|
|
8
|
+
* @param locale The locale to write it in; the browser's when not given.
|
|
9
|
+
* @returns The date, or an empty string when there is none or it cannot be read.
|
|
10
|
+
*/
|
|
11
|
+
export const formatReleaseDate = (releasedAt?: string | null, locale?: string | string[]): string => {
|
|
12
|
+
if (!releasedAt) {
|
|
13
|
+
return '';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const date = new Date(releasedAt);
|
|
17
|
+
if (Number.isNaN(date.getTime())) {
|
|
18
|
+
return '';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return new Intl.DateTimeFormat(locale, { dateStyle: 'long', timeZone: 'UTC' }).format(date);
|
|
22
|
+
};
|
package/Release/index.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
export * from './formatReleaseDate.js';
|
|
5
|
+
export * from './ReleaseNoteView.js';
|
|
6
|
+
export * from './sectionPresentation.js';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { PlaybillLabels } from '../Labels/index.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* How a section of a release note is drawn.
|
|
8
|
+
*/
|
|
9
|
+
export interface SectionPresentation {
|
|
10
|
+
/** The heading to show; the text the product gave for a known section, and the heading as written for any other. */
|
|
11
|
+
title: string;
|
|
12
|
+
/** The modifier of the `playbill-section` class, such as `added`; `other` for a heading that is not a known one. */
|
|
13
|
+
modifier: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const known: Record<string, keyof PlaybillLabels> = {
|
|
17
|
+
added: 'added',
|
|
18
|
+
changed: 'changed',
|
|
19
|
+
fixed: 'fixed',
|
|
20
|
+
removed: 'removed',
|
|
21
|
+
security: 'security',
|
|
22
|
+
deprecated: 'deprecated'
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Works out how a section of a release note is drawn. The sections of a release note are the six the release notes of
|
|
27
|
+
* every Cratis repository use; a heading written any other way is shown as it was written.
|
|
28
|
+
* @param name The heading of the section.
|
|
29
|
+
* @param labels The texts to show.
|
|
30
|
+
* @returns The title and the style of the section.
|
|
31
|
+
*/
|
|
32
|
+
export const sectionPresentation = (name: string, labels: PlaybillLabels): SectionPresentation => {
|
|
33
|
+
const key = known[name.trim().toLowerCase()];
|
|
34
|
+
return key ? { title: labels[key], modifier: key } : { title: name, modifier: 'other' };
|
|
35
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PlaybillLabels } from '../Labels/index.js';
|
|
3
|
+
export interface PlaybillBadgeProps {
|
|
4
|
+
onClick?: () => void;
|
|
5
|
+
labels?: Partial<PlaybillLabels>;
|
|
6
|
+
hideWhenRead?: boolean;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const PlaybillBadge: ({ onClick, labels, hideWhenRead, children }: PlaybillBadgeProps) => import("react").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=PlaybillBadge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlaybillBadge.d.ts","sourceRoot":"","sources":["../../../Badge/PlaybillBadge.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,cAAc,EAA4B,MAAM,oBAAoB,CAAC;AAM9E,MAAM,WAAW,kBAAkB;IAE/B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAEjC,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAOD,eAAO,MAAM,aAAa,GAAI,6CAAqD,kBAAkB,gCAiBpG,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var Icons = require('../Icons.js');
|
|
6
|
+
var resolveLabels = require('../Labels/resolveLabels.js');
|
|
7
|
+
var usePlaybillStatus = require('../usePlaybillStatus.js');
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A button for the application's header that tells the person how many releases they have not seen the notes of. It
|
|
11
|
+
* updates on every device when the notes are seen on one of them. The count is a number on the button; its accessible
|
|
12
|
+
* name says it in words.
|
|
13
|
+
*/ const PlaybillBadge = ({ onClick, labels, hideWhenRead = false, children })=>{
|
|
14
|
+
const { unread } = usePlaybillStatus.usePlaybillStatus();
|
|
15
|
+
const resolved = react.useMemo(()=>resolveLabels.resolveLabels(labels), [
|
|
16
|
+
labels
|
|
17
|
+
]);
|
|
18
|
+
if (unread === 0 && hideWhenRead) {
|
|
19
|
+
return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
20
|
+
}
|
|
21
|
+
return /*#__PURE__*/ jsxRuntime.jsxs("button", {
|
|
22
|
+
type: "button",
|
|
23
|
+
className: unread > 0 ? 'playbill-badge playbill-badge--unread' : 'playbill-badge',
|
|
24
|
+
"aria-label": unread > 0 ? resolveLabels.withCount(resolved.badgeUnread, unread) : resolved.badge,
|
|
25
|
+
onClick: onClick,
|
|
26
|
+
children: [
|
|
27
|
+
children ?? /*#__PURE__*/ jsxRuntime.jsx(Icons.PlaybillIcon, {}),
|
|
28
|
+
unread > 0 && /*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
29
|
+
className: "playbill-badge__count",
|
|
30
|
+
"aria-hidden": "true",
|
|
31
|
+
children: unread
|
|
32
|
+
})
|
|
33
|
+
]
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
exports.PlaybillBadge = PlaybillBadge;
|
|
38
|
+
//# sourceMappingURL=PlaybillBadge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlaybillBadge.js","sources":["../../../Badge/PlaybillBadge.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ReactNode, useMemo } from 'react';\nimport { PlaybillIcon } from '../Icons.js';\nimport { PlaybillLabels, resolveLabels, withCount } from '../Labels/index.js';\nimport { usePlaybillStatus } from '../usePlaybillStatus.js';\n\n/**\n * Props for {@link PlaybillBadge}.\n */\nexport interface PlaybillBadgeProps {\n /** Called when the badge is pressed; open the release notes page or dialog from it. */\n onClick?: () => void;\n /** The texts to replace; the rest stay English. */\n labels?: Partial<PlaybillLabels>;\n /** Leaves the badge out when nothing is unread. By default it stays, so the history is always one press away. */\n hideWhenRead?: boolean;\n /** Replaces the icon. */\n children?: ReactNode;\n}\n\n/**\n * A button for the application's header that tells the person how many releases they have not seen the notes of. It\n * updates on every device when the notes are seen on one of them. The count is a number on the button; its accessible\n * name says it in words.\n */\nexport const PlaybillBadge = ({ onClick, labels, hideWhenRead = false, children }: PlaybillBadgeProps) => {\n const { unread } = usePlaybillStatus();\n const resolved = useMemo(() => resolveLabels(labels), [labels]);\n if (unread === 0 && hideWhenRead) {\n return <></>;\n }\n\n return (\n <button\n type='button'\n className={unread > 0 ? 'playbill-badge playbill-badge--unread' : 'playbill-badge'}\n aria-label={unread > 0 ? withCount(resolved.badgeUnread, unread) : resolved.badge}\n onClick={onClick}>\n {children ?? <PlaybillIcon />}\n {unread > 0 && <span className='playbill-badge__count' aria-hidden='true'>{unread}</span>}\n </button>\n );\n};\n"],"names":["PlaybillBadge","onClick","labels","hideWhenRead","children","unread","usePlaybillStatus","resolved","useMemo","resolveLabels","_jsx","_Fragment","_jsxs","button","type","className","aria-label","withCount","badgeUnread","badge","PlaybillIcon","span","aria-hidden"],"mappings":";;;;;;;;AAsBA;;;;AAIC,IACM,MAAMA,aAAAA,GAAgB,CAAC,EAAEC,OAAO,EAAEC,MAAM,EAAEC,YAAAA,GAAe,KAAK,EAAEC,QAAQ,EAAsB,GAAA;IACjG,MAAM,EAAEC,MAAM,EAAE,GAAGC,mCAAAA,EAAAA;AACnB,IAAA,MAAMC,QAAAA,GAAWC,aAAAA,CAAQ,IAAMC,2BAAAA,CAAcP,MAAAA,CAAAA,EAAS;AAACA,QAAAA;AAAO,KAAA,CAAA;IAC9D,IAAIG,MAAAA,KAAW,KAAKF,YAAAA,EAAc;QAC9B,qBAAOO,cAAA,CAAAC,mBAAA,EAAA,EAAA,CAAA;AACX,IAAA;AAEA,IAAA,qBACIC,eAAA,CAACC,QAAAA,EAAAA;QACGC,IAAAA,EAAK,QAAA;QACLC,SAAAA,EAAWV,MAAAA,GAAS,IAAI,uCAAA,GAA0C,gBAAA;QAClEW,YAAAA,EAAYX,MAAAA,GAAS,IAAIY,uBAAAA,CAAUV,QAAAA,CAASW,WAAW,EAAEb,MAAAA,CAAAA,GAAUE,SAASY,KAAK;QACjFlB,OAAAA,EAASA,OAAAA;;AACRG,YAAAA,QAAAA,kBAAYM,cAAA,CAACU,kBAAAA,EAAAA,EAAAA,CAAAA;AACbf,YAAAA,MAAAA,GAAS,mBAAKK,cAAA,CAACW,MAAAA,EAAAA;gBAAKN,SAAAA,EAAU,uBAAA;gBAAwBO,aAAAA,EAAY,MAAA;AAAQjB,gBAAAA,QAAAA,EAAAA;;;;AAGvF;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../Badge/index.ts"],"names":[],"mappings":"AAGA,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CurrentRelease, Release, ReleaseList } from './models.js';
|
|
2
|
+
export declare const defaultBasePath = "/.cratis/playbill/v1";
|
|
3
|
+
export declare class PlaybillClient {
|
|
4
|
+
readonly basePath: string;
|
|
5
|
+
private readonly fetcher;
|
|
6
|
+
constructor(basePath?: string, fetcher?: typeof fetch);
|
|
7
|
+
list(since?: string, signal?: AbortSignal): Promise<ReleaseList>;
|
|
8
|
+
get(version: string, signal?: AbortSignal): Promise<Release>;
|
|
9
|
+
current(signal?: AbortSignal): Promise<CurrentRelease>;
|
|
10
|
+
assetBase(version: string): string;
|
|
11
|
+
private read;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=PlaybillClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlaybillClient.d.ts","sourceRoot":"","sources":["../../../Client/PlaybillClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAKnE,eAAO,MAAM,eAAe,yBAAyB,CAAC;AAMtD,qBAAa,cAAc;IAOnB,QAAQ,CAAC,QAAQ,EAAE,MAAM;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBADf,QAAQ,GAAE,MAAwB,EAC1B,OAAO,GAAE,OAAO,KAA2C;IAShF,IAAI,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IAWhE,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;IAS5D,OAAO,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC;IAUtD,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;YAIpB,IAAI;CAYrB"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
/**
|
|
6
|
+
* Where Playbill serves the release history from, relative to the origin of the application.
|
|
7
|
+
*/ const defaultBasePath = '/.cratis/playbill/v1';
|
|
8
|
+
/**
|
|
9
|
+
* Reads the release history an application serves with `MapPlaybill`. Give your own to {@link PlaybillProvider} to change
|
|
10
|
+
* where the history is read from or how the request is made.
|
|
11
|
+
*/ class PlaybillClient {
|
|
12
|
+
basePath;
|
|
13
|
+
fetcher;
|
|
14
|
+
/**
|
|
15
|
+
* Initializes a new instance of the {@link PlaybillClient} class.
|
|
16
|
+
* @param basePath Where the history is served from. Defaults to `/.cratis/playbill/v1`.
|
|
17
|
+
* @param fetcher Makes the request. Defaults to `fetch`; give one to add headers or point at another origin.
|
|
18
|
+
*/ constructor(basePath = defaultBasePath, fetcher = (input, init)=>fetch(input, init)){
|
|
19
|
+
this.basePath = basePath;
|
|
20
|
+
this.fetcher = fetcher;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Lists the releases, the newest first.
|
|
24
|
+
* @param since When set, only the releases newer than this version.
|
|
25
|
+
* @param signal Cancels the request.
|
|
26
|
+
* @returns The list.
|
|
27
|
+
*/ list(since, signal) {
|
|
28
|
+
const query = since ? `?since=${encodeURIComponent(since)}` : '';
|
|
29
|
+
return this.read(`/releases${query}`, signal);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Gets one release with its note.
|
|
33
|
+
* @param version The version of the release.
|
|
34
|
+
* @param signal Cancels the request.
|
|
35
|
+
* @returns The release.
|
|
36
|
+
*/ get(version, signal) {
|
|
37
|
+
return this.read(`/releases/${encodeURIComponent(version)}`, signal);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Gets the version the application is running and the newest release that has a note.
|
|
41
|
+
* @param signal Cancels the request.
|
|
42
|
+
* @returns The current release.
|
|
43
|
+
*/ current(signal) {
|
|
44
|
+
return this.read('/current', signal);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Gets the address the files of a release are served from: an image the note refers to as `hero.png` is at
|
|
48
|
+
* `<this address>/hero.png`.
|
|
49
|
+
* @param version The version of the release.
|
|
50
|
+
* @returns The address, without a trailing slash.
|
|
51
|
+
*/ assetBase(version) {
|
|
52
|
+
return `${this.basePath}/releases/${encodeURIComponent(version)}`;
|
|
53
|
+
}
|
|
54
|
+
async read(path, signal) {
|
|
55
|
+
const response = await this.fetcher(`${this.basePath}${path}`, {
|
|
56
|
+
headers: {
|
|
57
|
+
Accept: 'application/json'
|
|
58
|
+
},
|
|
59
|
+
credentials: 'same-origin',
|
|
60
|
+
signal
|
|
61
|
+
});
|
|
62
|
+
if (!response.ok) {
|
|
63
|
+
throw new Error(`Playbill could not read ${path}: ${response.status} ${response.statusText}`.trim());
|
|
64
|
+
}
|
|
65
|
+
return await response.json();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
exports.PlaybillClient = PlaybillClient;
|
|
70
|
+
exports.defaultBasePath = defaultBasePath;
|
|
71
|
+
//# sourceMappingURL=PlaybillClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlaybillClient.js","sources":["../../../Client/PlaybillClient.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { CurrentRelease, Release, ReleaseList } from './models.js';\n\n/**\n * Where Playbill serves the release history from, relative to the origin of the application.\n */\nexport const defaultBasePath = '/.cratis/playbill/v1';\n\n/**\n * Reads the release history an application serves with `MapPlaybill`. Give your own to {@link PlaybillProvider} to change\n * where the history is read from or how the request is made.\n */\nexport class PlaybillClient {\n /**\n * Initializes a new instance of the {@link PlaybillClient} class.\n * @param basePath Where the history is served from. Defaults to `/.cratis/playbill/v1`.\n * @param fetcher Makes the request. Defaults to `fetch`; give one to add headers or point at another origin.\n */\n constructor(\n readonly basePath: string = defaultBasePath,\n private readonly fetcher: typeof fetch = (input, init) => fetch(input, init)) {\n }\n\n /**\n * Lists the releases, the newest first.\n * @param since When set, only the releases newer than this version.\n * @param signal Cancels the request.\n * @returns The list.\n */\n list(since?: string, signal?: AbortSignal): Promise<ReleaseList> {\n const query = since ? `?since=${encodeURIComponent(since)}` : '';\n return this.read<ReleaseList>(`/releases${query}`, signal);\n }\n\n /**\n * Gets one release with its note.\n * @param version The version of the release.\n * @param signal Cancels the request.\n * @returns The release.\n */\n get(version: string, signal?: AbortSignal): Promise<Release> {\n return this.read<Release>(`/releases/${encodeURIComponent(version)}`, signal);\n }\n\n /**\n * Gets the version the application is running and the newest release that has a note.\n * @param signal Cancels the request.\n * @returns The current release.\n */\n current(signal?: AbortSignal): Promise<CurrentRelease> {\n return this.read<CurrentRelease>('/current', signal);\n }\n\n /**\n * Gets the address the files of a release are served from: an image the note refers to as `hero.png` is at\n * `<this address>/hero.png`.\n * @param version The version of the release.\n * @returns The address, without a trailing slash.\n */\n assetBase(version: string): string {\n return `${this.basePath}/releases/${encodeURIComponent(version)}`;\n }\n\n private async read<TResult>(path: string, signal?: AbortSignal): Promise<TResult> {\n const response = await this.fetcher(`${this.basePath}${path}`, {\n headers: { Accept: 'application/json' },\n credentials: 'same-origin',\n signal\n });\n if (!response.ok) {\n throw new Error(`Playbill could not read ${path}: ${response.status} ${response.statusText}`.trim());\n }\n\n return await response.json() as TResult;\n }\n}\n"],"names":["defaultBasePath","PlaybillClient","basePath","fetcher","input","init","fetch","list","since","signal","query","encodeURIComponent","read","get","version","current","assetBase","path","response","headers","Accept","credentials","ok","Error","status","statusText","trim","json"],"mappings":";;AAAA;AACA;AAIA;;IAGO,MAAMA,eAAAA,GAAkB;AAE/B;;;AAGC,IACM,MAAMC,cAAAA,CAAAA;;;AACT;;;;AAIC,QACD,WAAA,CACaC,QAAAA,GAAmBF,eAAe,EAC1BG,OAAAA,GAAwB,CAACC,KAAAA,EAAOC,IAAAA,GAASC,KAAAA,CAAMF,KAAAA,EAAOC,KAAK,CAAE;aADrEH,QAAAA,GAAAA,QAAAA;aACQC,OAAAA,GAAAA,OAAAA;AACrB,IAAA;AAEA;;;;;AAKC,QACDI,IAAAA,CAAKC,KAAc,EAAEC,MAAoB,EAAwB;AAC7D,QAAA,MAAMC,QAAQF,KAAAA,GAAQ,CAAC,OAAO,EAAEG,kBAAAA,CAAmBH,QAAQ,GAAG,EAAA;QAC9D,OAAO,IAAI,CAACI,IAAI,CAAc,CAAC,SAAS,EAAEF,OAAO,EAAED,MAAAA,CAAAA;AACvD,IAAA;AAEA;;;;;AAKC,QACDI,GAAAA,CAAIC,OAAe,EAAEL,MAAoB,EAAoB;QACzD,OAAO,IAAI,CAACG,IAAI,CAAU,CAAC,UAAU,EAAED,kBAAAA,CAAmBG,OAAAA,CAAAA,CAAAA,CAAU,EAAEL,MAAAA,CAAAA;AAC1E,IAAA;AAEA;;;;QAKAM,OAAAA,CAAQN,MAAoB,EAA2B;AACnD,QAAA,OAAO,IAAI,CAACG,IAAI,CAAiB,UAAA,EAAYH,MAAAA,CAAAA;AACjD,IAAA;AAEA;;;;;QAMAO,SAAAA,CAAUF,OAAe,EAAU;QAC/B,OAAO,CAAA,EAAG,IAAI,CAACZ,QAAQ,CAAC,UAAU,EAAES,mBAAmBG,OAAAA,CAAAA,CAAAA,CAAU;AACrE,IAAA;AAEA,IAAA,MAAcF,IAAAA,CAAcK,IAAY,EAAER,MAAoB,EAAoB;AAC9E,QAAA,MAAMS,QAAAA,GAAW,MAAM,IAAI,CAACf,OAAO,CAAC,CAAA,EAAG,IAAI,CAACD,QAAQ,CAAA,EAAGe,IAAAA,CAAAA,CAAM,EAAE;YAC3DE,OAAAA,EAAS;gBAAEC,MAAAA,EAAQ;AAAmB,aAAA;YACtCC,WAAAA,EAAa,aAAA;AACbZ,YAAAA;AACJ,SAAA,CAAA;QACA,IAAI,CAACS,QAAAA,CAASI,EAAE,EAAE;AACd,YAAA,MAAM,IAAIC,KAAAA,CAAM,CAAC,wBAAwB,EAAEN,KAAK,EAAE,EAAEC,QAAAA,CAASM,MAAM,CAAC,CAAC,EAAEN,SAASO,UAAU,CAAA,CAAE,CAACC,IAAI,EAAA,CAAA;AACrG,QAAA;QAEA,OAAO,MAAMR,SAASS,IAAI,EAAA;AAC9B,IAAA;AACJ;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../Client/index.ts"],"names":[],"mappings":"AAGA,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface ReleaseSummary {
|
|
2
|
+
version: string;
|
|
3
|
+
releasedAt?: string | null;
|
|
4
|
+
pull?: string | null;
|
|
5
|
+
summary: string;
|
|
6
|
+
sections: string[];
|
|
7
|
+
assets: string[];
|
|
8
|
+
}
|
|
9
|
+
export interface ReleaseSection {
|
|
10
|
+
name: string;
|
|
11
|
+
markdown: string;
|
|
12
|
+
}
|
|
13
|
+
export interface Release extends Omit<ReleaseSummary, 'sections'> {
|
|
14
|
+
lead: string;
|
|
15
|
+
sections: ReleaseSection[];
|
|
16
|
+
markdown: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ReleaseList {
|
|
19
|
+
current?: string | null;
|
|
20
|
+
releases: ReleaseSummary[];
|
|
21
|
+
}
|
|
22
|
+
export interface CurrentRelease {
|
|
23
|
+
version?: string | null;
|
|
24
|
+
release?: ReleaseSummary | null;
|
|
25
|
+
newest?: string | null;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../Client/models.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,cAAc;IAE3B,OAAO,EAAE,MAAM,CAAC;IAEhB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB,OAAO,EAAE,MAAM,CAAC;IAEhB,QAAQ,EAAE,MAAM,EAAE,CAAC;IAEnB,MAAM,EAAE,MAAM,EAAE,CAAC;CACpB;AAKD,MAAM,WAAW,cAAc;IAE3B,IAAI,EAAE,MAAM,CAAC;IAEb,QAAQ,EAAE,MAAM,CAAC;CACpB;AAKD,MAAM,WAAW,OAAQ,SAAQ,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC;IAE7D,IAAI,EAAE,MAAM,CAAC;IAEb,QAAQ,EAAE,cAAc,EAAE,CAAC;IAE3B,QAAQ,EAAE,MAAM,CAAC;CACpB;AAKD,MAAM,WAAW,WAAW;IAExB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,QAAQ,EAAE,cAAc,EAAE,CAAC;CAC9B;AAKD,MAAM,WAAW,cAAc;IAE3B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IAEhC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PlaybillClient } from '../Client/index.js';
|
|
3
|
+
export interface PlaybillProviderProps {
|
|
4
|
+
basePath?: string;
|
|
5
|
+
fetcher?: typeof fetch;
|
|
6
|
+
client?: PlaybillClient;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const PlaybillProvider: ({ basePath, fetcher, client, children }: PlaybillProviderProps) => import("react").JSX.Element;
|
|
10
|
+
export declare const usePlaybillClient: () => PlaybillClient;
|
|
11
|
+
//# sourceMappingURL=PlaybillProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlaybillProvider.d.ts","sourceRoot":"","sources":["../../../Configuration/PlaybillProvider.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAiB,SAAS,EAAuB,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AASpD,MAAM,WAAW,qBAAqB;IAElC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,OAAO,CAAC,EAAE,OAAO,KAAK,CAAC;IAEvB,MAAM,CAAC,EAAE,cAAc,CAAC;IAExB,QAAQ,EAAE,SAAS,CAAC;CACvB;AAMD,eAAO,MAAM,gBAAgB,GAAI,yCAAyC,qBAAqB,gCAG9F,CAAC;AAMF,eAAO,MAAM,iBAAiB,QAAO,cAA6C,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var PlaybillClient = require('../Client/PlaybillClient.js');
|
|
6
|
+
|
|
7
|
+
const defaultClient = new PlaybillClient.PlaybillClient();
|
|
8
|
+
const PlaybillContext = /*#__PURE__*/ react.createContext(defaultClient);
|
|
9
|
+
/**
|
|
10
|
+
* Tells the Playbill components where to read the release history from. It is optional: without it they read
|
|
11
|
+
* `/.cratis/playbill/v1` of the page's own origin, which is where `MapPlaybill` serves it.
|
|
12
|
+
*/ const PlaybillProvider = ({ basePath, fetcher, client, children })=>{
|
|
13
|
+
const value = react.useMemo(()=>client ?? new PlaybillClient.PlaybillClient(basePath, fetcher), [
|
|
14
|
+
client,
|
|
15
|
+
basePath,
|
|
16
|
+
fetcher
|
|
17
|
+
]);
|
|
18
|
+
return /*#__PURE__*/ jsxRuntime.jsx(PlaybillContext.Provider, {
|
|
19
|
+
value: value,
|
|
20
|
+
children: children
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Gets the client that reads the release history.
|
|
25
|
+
* @returns The client of the nearest {@link PlaybillProvider}, or the default one.
|
|
26
|
+
*/ const usePlaybillClient = ()=>react.useContext(PlaybillContext);
|
|
27
|
+
|
|
28
|
+
exports.PlaybillProvider = PlaybillProvider;
|
|
29
|
+
exports.usePlaybillClient = usePlaybillClient;
|
|
30
|
+
//# sourceMappingURL=PlaybillProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlaybillProvider.js","sources":["../../../Configuration/PlaybillProvider.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { createContext, ReactNode, useContext, useMemo } from 'react';\nimport { PlaybillClient } from '../Client/index.js';\n\nconst defaultClient = new PlaybillClient();\n\nconst PlaybillContext = createContext<PlaybillClient>(defaultClient);\n\n/**\n * Props for {@link PlaybillProvider}.\n */\nexport interface PlaybillProviderProps {\n /** Where the history is served from. Defaults to `/.cratis/playbill/v1`. Ignored when a `client` is given. */\n basePath?: string;\n /** Makes the requests, for adding headers or reading another origin. Defaults to `fetch`. Ignored when a `client` is given. */\n fetcher?: typeof fetch;\n /** Reads the history instead of the default client. */\n client?: PlaybillClient;\n /** What reads the history. */\n children: ReactNode;\n}\n\n/**\n * Tells the Playbill components where to read the release history from. It is optional: without it they read\n * `/.cratis/playbill/v1` of the page's own origin, which is where `MapPlaybill` serves it.\n */\nexport const PlaybillProvider = ({ basePath, fetcher, client, children }: PlaybillProviderProps) => {\n const value = useMemo(() => client ?? new PlaybillClient(basePath, fetcher), [client, basePath, fetcher]);\n return <PlaybillContext.Provider value={value}>{children}</PlaybillContext.Provider>;\n};\n\n/**\n * Gets the client that reads the release history.\n * @returns The client of the nearest {@link PlaybillProvider}, or the default one.\n */\nexport const usePlaybillClient = (): PlaybillClient => useContext(PlaybillContext);\n"],"names":["defaultClient","PlaybillClient","PlaybillContext","createContext","PlaybillProvider","basePath","fetcher","client","children","value","useMemo","_jsx","Provider","usePlaybillClient","useContext"],"mappings":";;;;;;AAMA,MAAMA,gBAAgB,IAAIC,6BAAAA,EAAAA;AAE1B,MAAMC,gCAAkBC,mBAAAA,CAA8BH,aAAAA,CAAAA;AAgBtD;;;AAGC,IACM,MAAMI,gBAAAA,GAAmB,CAAC,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,EAAyB,GAAA;AAC3F,IAAA,MAAMC,QAAQC,aAAAA,CAAQ,IAAMH,UAAU,IAAIN,6BAAAA,CAAeI,UAAUC,OAAAA,CAAAA,EAAU;AAACC,QAAAA,MAAAA;AAAQF,QAAAA,QAAAA;AAAUC,QAAAA;AAAQ,KAAA,CAAA;IACxG,qBAAOK,cAAA,CAACT,gBAAgBU,QAAQ,EAAA;QAACH,KAAAA,EAAOA,KAAAA;AAAQD,QAAAA,QAAAA,EAAAA;;AACpD;AAEA;;;AAGC,IACM,MAAMK,iBAAAA,GAAoB,IAAsBC,iBAAWZ,eAAAA;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../Configuration/index.ts"],"names":[],"mappings":"AAGA,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { PlaybillLabels } from '../Labels/index.js';
|
|
3
|
+
import { PlaybillMarkdownProps } from '../Markdown/index.js';
|
|
4
|
+
import { ReleaseNoteViewProps } from '../Release/index.js';
|
|
5
|
+
export interface PlaybillDialogProps {
|
|
6
|
+
release?: ComponentType<ReleaseNoteViewProps>;
|
|
7
|
+
markdown?: ComponentType<PlaybillMarkdownProps>;
|
|
8
|
+
labels?: Partial<PlaybillLabels>;
|
|
9
|
+
locale?: string | string[];
|
|
10
|
+
maxReleases?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare const PlaybillDialog: ({ release: Release, markdown, labels, locale, maxReleases }: PlaybillDialogProps) => import("react").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=PlaybillDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlaybillDialog.d.ts","sourceRoot":"","sources":["../../../Dialog/PlaybillDialog.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAqB,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,cAAc,EAA4B,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAoB,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAAmB,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAO5E,MAAM,WAAW,mBAAmB;IAEhC,OAAO,CAAC,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;IAE9C,QAAQ,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAEhD,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAEjC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE3B,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAOD,eAAO,MAAM,cAAc,GAAI,6DAAmF,mBAAmB,gCAgDpI,CAAC"}
|