@peasant-labs/fairtrade 0.0.50 → 0.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/{adapter-CVKibszh.js → adapter-VlAohr64.js} +107 -102
- package/dist/lib/commons.js +544 -522
- package/dist/lib/components.css +1 -1
- package/dist/lib/share.js +3 -3
- package/dist/lib/tokens.css +2 -2
- package/dist/lib/tokens.json +2 -2
- package/dist/lib/types/AppSidebar.d.ts +9 -11
- package/dist/lib/types/Avatar.d.ts +2 -2
- package/dist/lib/types/Dialog.d.ts +1 -1
- package/dist/lib/types/Input.d.ts +3 -3
- package/dist/lib/types/OverflowList.d.ts +1 -1
- package/dist/lib/types/RepoPicker.d.ts +3 -1
- package/dist/lib/types/Switch.d.ts +1 -1
- package/dist/lib/types/commons/Explore.d.ts +1 -1
- package/dist/lib/types/commons/types.d.ts +12 -0
- package/dist/lib/types/transcript/IntegrityBadge.d.ts +21 -0
- package/dist/lib/types/transcript/TranscriptViewer.d.ts +1 -1
- package/dist/lib/types/transcript/TurnCard.d.ts +7 -1
- package/dist/lib/types/transcript/WorkGroup.d.ts +3 -1
- package/dist/lib/types/transcript/integrity.d.ts +36 -0
- package/dist/lib/types/transcript/state-capabilities.d.ts +12 -0
- package/dist/lib/types/transcript/view-model.d.ts +4 -0
- package/dist/lib/types/transcript/work-summary.d.ts +9 -0
- package/dist/lib/types/ui/transcript/view-model.d.ts +4 -0
- package/dist/lib/{ui-BOGaFxV-.js → ui-BVkbnMN5.js} +2573 -2341
- package/dist/lib/ui.js +2 -2
- package/package.json +8 -4
- package/dist/lib/abnfDiagram-WEYOIA3C-D4LMNFIJ.js +0 -89
- package/dist/lib/arc-1xTxsoRi.js +0 -80
- package/dist/lib/architecture-WOLXFQ4H-c6RsZuzu.js +0 -3
- package/dist/lib/architectureDiagram-ZHVYKT53-DTINqD5R.js +0 -4145
- package/dist/lib/array-CApNbSU9.js +0 -6
- package/dist/lib/blockDiagram-RJAE7QA3-CUYHoR3g.js +0 -1946
- package/dist/lib/c4Diagram-XDPPPE54-Cdx6_DsI.js +0 -2990
- package/dist/lib/channel-DagAO2vE.js +0 -5
- package/dist/lib/chunk-2E7WHVMD-BzhgXW3b.js +0 -490
- package/dist/lib/chunk-2Q5K7J3B-DWNwIK5Y.js +0 -15
- package/dist/lib/chunk-4EMNKR2T-DhFrQz9k.js +0 -236
- package/dist/lib/chunk-55XCU76K-CI0GXDkJ.js +0 -61
- package/dist/lib/chunk-5VM5RSS4-BAQ-46g4.js +0 -5
- package/dist/lib/chunk-7S6XSTFO-CMt_p-O6.js +0 -1373
- package/dist/lib/chunk-AQDTSKZB-DrZccIQa.js +0 -1847
- package/dist/lib/chunk-DSNLSHJZ-CpA9d2CJ.js +0 -4044
- package/dist/lib/chunk-DUW6YSOI-C-tN4Kiv.js +0 -10
- package/dist/lib/chunk-EJLWFMJV-B30MNYvY.js +0 -75
- package/dist/lib/chunk-HAGFOTED-DMU2JNZM.js +0 -4487
- package/dist/lib/chunk-HNE4Q36P-BIA0n2gA.js +0 -363
- package/dist/lib/chunk-J5ZVWO5B-CA_-jk8G.js +0 -12
- package/dist/lib/chunk-JWPE2WC7-KRpHbrIX.js +0 -8
- package/dist/lib/chunk-LNGE3PJU-CMGaAEAh.js +0 -1513
- package/dist/lib/chunk-NGNAAXSQ-D7Dvct7J.js +0 -19774
- package/dist/lib/chunk-NQOKRVIF-MK9F46y3.js +0 -4258
- package/dist/lib/chunk-OYAV6JZA-B1yICcbU.js +0 -10
- package/dist/lib/chunk-UHW7PFBP-CLrOaA0y.js +0 -67
- package/dist/lib/chunk-VQ5W62QI-_ZR3gKe4.js +0 -26
- package/dist/lib/chunk-WQQL4CDK-DFtyhYZq.js +0 -693
- package/dist/lib/chunk-XXDRQBXY-uzyNBbgx.js +0 -9
- package/dist/lib/chunk-Y2CYZVJY-BYzrzvCI.js +0 -12
- package/dist/lib/chunk-YZO67HFG-D1jKt78p.js +0 -275
- package/dist/lib/chunk-ZAUX2LTX-7XO0Yj1z.js +0 -37
- package/dist/lib/chunk-ZCHMQSOR-CxoKltfF.js +0 -349
- package/dist/lib/classDiagram-v2-4MYWR3UA-BPvwhZqw.js +0 -3397
- package/dist/lib/cose-bilkent-JH36ORCC-Oj79uOIQ.js +0 -2250
- package/dist/lib/cynefin-EF2NZ3EQ-COX3NRum.js +0 -3
- package/dist/lib/cynefinDiagram-WF24UDRP-UzTptNAX.js +0 -349
- package/dist/lib/cytoscape.esm-0ojxgO9x.js +0 -18161
- package/dist/lib/dagre-NK4GIZVX-DWZr-NGm.js +0 -2356
- package/dist/lib/defaultLocale-BbgDuMnp.js +0 -201
- package/dist/lib/diagram-CBK3MWTC-CsyKuv-w.js +0 -525
- package/dist/lib/diagram-I5XIIV2D-DWY2JSPC.js +0 -134
- package/dist/lib/diagram-ODIL2UCW-DUptj0JZ.js +0 -301
- package/dist/lib/diagram-PFBEJUXE-N5XnIBqM.js +0 -447
- package/dist/lib/diagram-RJA3I4VV-B9XgohYo.js +0 -214
- package/dist/lib/diagram-TYUNFSNR-XnsJIeAd.js +0 -5084
- package/dist/lib/dist-AMlsjiDX.js +0 -59
- package/dist/lib/ebnfDiagram-V4P3TTPT-BssHqFox.js +0 -100
- package/dist/lib/elk-QONTBCTQ-DwmwqYgP.js +0 -47944
- package/dist/lib/erDiagram-KYQIGQAA-BQiXw1Tw.js +0 -1970
- package/dist/lib/eventmodeling-K75KTNOO-DDb--yMc.js +0 -3
- package/dist/lib/flowDiagram-IUGLLWBU-BEqqF1y2.js +0 -17
- package/dist/lib/ganttDiagram-R7GPNTJY-BWtGXxEF.js +0 -3094
- package/dist/lib/gitGraph-VSP46ZUC-BSwOaak_.js +0 -3
- package/dist/lib/gitGraphDiagram-PDYL7XHY-CHGNuGbk.js +0 -729
- package/dist/lib/graphlib-Dndp26xU.js +0 -1267
- package/dist/lib/info-OHQRW6UA-Dk06sZRe.js +0 -3
- package/dist/lib/infoDiagram-MVDRKAX5-Cdhxnjmi.js +0 -20
- package/dist/lib/init-Bwwdo3M6.js +0 -15
- package/dist/lib/ishikawaDiagram-HPEHV2GE-Dzhti-GJ.js +0 -719
- package/dist/lib/journeyDiagram-BOSHW7O7-C3_vsSjw.js +0 -884
- package/dist/lib/kanban-definition-FNSA4HC5-XsfCEsjn.js +0 -976
- package/dist/lib/katex-Dw0PnoPU.js +0 -21850
- package/dist/lib/line-C9krU3Sv.js +0 -34
- package/dist/lib/linear-Cvilv3OA.js +0 -289
- package/dist/lib/mermaid-parser.core-I7qQ_fxz.js +0 -638
- package/dist/lib/mermaid.core-UNHMAbBP.js +0 -1126
- package/dist/lib/mindmap-definition-6OY57UG3-CAua-JvB.js +0 -1011
- package/dist/lib/ordinal-C55HfHHp.js +0 -65
- package/dist/lib/packet-JDAUHWVQ-DZ-MKx4I.js +0 -3
- package/dist/lib/path-DNvJyUE8.js +0 -85
- package/dist/lib/pegDiagram-ECIUJNBX-BCxa_IO0.js +0 -94
- package/dist/lib/pie-XZMESJXO-DpCa-Nnq.js +0 -3
- package/dist/lib/pieDiagram-GNMPY74T-CE_C3dCB.js +0 -205
- package/dist/lib/quadrantDiagram-D57K4MC3-CDgzdMoL.js +0 -2001
- package/dist/lib/radar-ABXABTNO-BOVK7L9p.js +0 -3
- package/dist/lib/railroad-I3PHUGI6-B6spKM0Z.js +0 -3
- package/dist/lib/railroad-abnf-LNEFI6M7-DEWqfByZ.js +0 -3
- package/dist/lib/railroad-ebnf-DWYD2UWJ-CWRLtxHB.js +0 -3
- package/dist/lib/railroad-peg-JR7BVNR7-C-3NHSsk.js +0 -3
- package/dist/lib/railroadDiagram-Y72NRBL7-a8YVk8LT.js +0 -76
- package/dist/lib/requirementDiagram-EQYSW5RA-B9HolqxU.js +0 -2228
- package/dist/lib/rough.esm-a8mysczE.js +0 -1352
- package/dist/lib/sankeyDiagram-SY24JHO5-CLFMtMJG.js +0 -970
- package/dist/lib/sequenceDiagram-BLEHNHQU-B5wfSV85.js +0 -4253
- package/dist/lib/sizeCapture-INFHLROL-BWGCc9aa.js +0 -46
- package/dist/lib/src-Dcy0zUZH.js +0 -2153
- package/dist/lib/stateDiagram-v2-A6IESKWZ-C92vye4N.js +0 -2143
- package/dist/lib/swimlanes-B3ENRKFQ-B6-i-tPc.js +0 -4764
- package/dist/lib/swimlanesDiagram-AYQRV4AK-CbkBeql-.js +0 -28
- package/dist/lib/timeline-definition-JXYKGLGB-D2Ip4r72.js +0 -1073
- package/dist/lib/treeView-D4JQ5SDB-CFaKQ_2T.js +0 -3
- package/dist/lib/treemap-SAJKECNS-BQ6z7Z3g.js +0 -3
- package/dist/lib/usecaseDiagram-WPOLBNNX-BK1Anch1.js +0 -7190
- package/dist/lib/vennDiagram-Q3Y3IDCW-B6YTBqTS.js +0 -1880
- package/dist/lib/wardley-7MLQ67FV-DChYwu4i.js +0 -3
- package/dist/lib/wardleyDiagram-IVAIDKWA-D5I1qLUK.js +0 -645
- package/dist/lib/xychartDiagram-4URNHDU4-B6RXyhTO.js +0 -2218
package/dist/lib/share.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as e, c as t, g as n, h as r, m as i, p as a, v as o } from "./time-CpVBzcqQ.js";
|
|
2
2
|
import { r as s } from "./format-B3uT2wzU.js";
|
|
3
|
-
import { c, l, t as u } from "./adapter-
|
|
3
|
+
import { c, l, t as u } from "./adapter-VlAohr64.js";
|
|
4
4
|
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
5
5
|
//#region public/tokens.json
|
|
6
6
|
var p = {
|
|
@@ -61,12 +61,12 @@ var p = {
|
|
|
61
61
|
},
|
|
62
62
|
rule: {
|
|
63
63
|
$type: "color",
|
|
64
|
-
$value: "#
|
|
64
|
+
$value: "#403d35",
|
|
65
65
|
$extensions: { "fairtrade.theme": { light: "#b3ab96" } }
|
|
66
66
|
},
|
|
67
67
|
"rule-strong": {
|
|
68
68
|
$type: "color",
|
|
69
|
-
$value: "#
|
|
69
|
+
$value: "#767165",
|
|
70
70
|
$extensions: { "fairtrade.theme": { light: "#7f7762" } }
|
|
71
71
|
},
|
|
72
72
|
"focus-ring": {
|
package/dist/lib/tokens.css
CHANGED
package/dist/lib/tokens.json
CHANGED
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
},
|
|
104
104
|
"rule": {
|
|
105
105
|
"$type": "color",
|
|
106
|
-
"$value": "#
|
|
106
|
+
"$value": "#403d35",
|
|
107
107
|
"$extensions": {
|
|
108
108
|
"fairtrade.theme": {
|
|
109
109
|
"light": "#b3ab96"
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
},
|
|
113
113
|
"rule-strong": {
|
|
114
114
|
"$type": "color",
|
|
115
|
-
"$value": "#
|
|
115
|
+
"$value": "#767165",
|
|
116
116
|
"$extensions": {
|
|
117
117
|
"fairtrade.theme": {
|
|
118
118
|
"light": "#7f7762"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The shared app sidebar, in one order for every app: the brand mark with a collapse handle on the
|
|
3
|
-
* column's edge, the shortcuts (search, the docs and
|
|
4
|
-
*
|
|
3
|
+
* column's edge, the app's own pages, then shortcuts (search, the docs and outside links)
|
|
4
|
+
* above the footer row (the account on the left, the settings gear and the theme
|
|
5
5
|
* toggle on the right). A sticky resizable column on desktop
|
|
6
6
|
* that collapses to an icon rail; a top bar plus an opaque drawer below 768px.
|
|
7
7
|
* @param {AppSidebarProps} props
|
|
@@ -27,8 +27,7 @@ export function AppPage({ children, as: Tag, className, ...rest }: AppPageProps)
|
|
|
27
27
|
* @property {string} [href] where the app lives. An app without an href is omitted, unless it has a tag.
|
|
28
28
|
* @property {string} [tag] a short note after the label. With no href the entry is shown as text, not a link.
|
|
29
29
|
* @property {boolean} [soon] a place that does not exist yet: shown as text, aria-disabled, with a 'soon' note
|
|
30
|
-
* and no hover or press.
|
|
31
|
-
* `apps` names a community entry of its own.
|
|
30
|
+
* and no hover or press. Community entries are hidden until that surface is available.
|
|
32
31
|
* @property {string} [target] default '_blank': another app opens in a new tab.
|
|
33
32
|
* @property {string} [rel] default 'noopener noreferrer' when the target is '_blank'.
|
|
34
33
|
*/
|
|
@@ -79,9 +78,9 @@ export function AppPage({ children, as: Tag, className, ...rest }: AppPageProps)
|
|
|
79
78
|
* @property {string} [currentId] the id of the current item (aria-current="page").
|
|
80
79
|
* @property {string} [homeHref] the brand links here.
|
|
81
80
|
* @property {string} [brand] the brand's accessible name and tooltip, default 'peasant'.
|
|
82
|
-
* @property {AppSidebarSearch} [search] the app's search, the first shortcut
|
|
81
|
+
* @property {AppSidebarSearch} [search] the app's search, the first shortcut above the footer.
|
|
83
82
|
* @property {AppSidebarItem[]} [elsewhere] the app's links that leave it (collectives online, from the local app),
|
|
84
|
-
* listed in the shortcuts after the docs
|
|
83
|
+
* listed in the shortcuts after the docs. An `external`
|
|
85
84
|
* item in `groups` moves there too.
|
|
86
85
|
* @property {string} [settingsHref] the app's settings: a gear in the footer, current when currentId is
|
|
87
86
|
* 'settings'. A `settings` item in `groups` becomes the gear instead.
|
|
@@ -117,7 +116,7 @@ export function AppPage({ children, as: Tag, className, ...rest }: AppPageProps)
|
|
|
117
116
|
* @property {import('react').ElementType} [as] the element, default 'div'.
|
|
118
117
|
* @property {string} [className]
|
|
119
118
|
*/
|
|
120
|
-
/** The app switcher's default entries, in order: the docs
|
|
119
|
+
/** The app switcher's default entries, in order: the docs.
|
|
121
120
|
* Online and local are never in a switcher, in any app. Consumers map their hrefs in.
|
|
122
121
|
* @type {ReadonlyArray<Readonly<AppSidebarApp>>} */
|
|
123
122
|
export const APP_SIDEBAR_APPS: ReadonlyArray<Readonly<AppSidebarApp>>;
|
|
@@ -140,8 +139,7 @@ export type AppSidebarApp = {
|
|
|
140
139
|
tag?: string;
|
|
141
140
|
/**
|
|
142
141
|
* a place that does not exist yet: shown as text, aria-disabled, with a 'soon' note
|
|
143
|
-
* and no hover or press.
|
|
144
|
-
* `apps` names a community entry of its own.
|
|
142
|
+
* and no hover or press. Community entries are hidden until that surface is available.
|
|
145
143
|
*/
|
|
146
144
|
soon?: boolean;
|
|
147
145
|
/**
|
|
@@ -265,12 +263,12 @@ export type AppSidebarProps = {
|
|
|
265
263
|
*/
|
|
266
264
|
brand?: string;
|
|
267
265
|
/**
|
|
268
|
-
* the app's search, the first shortcut
|
|
266
|
+
* the app's search, the first shortcut above the footer.
|
|
269
267
|
*/
|
|
270
268
|
search?: AppSidebarSearch;
|
|
271
269
|
/**
|
|
272
270
|
* the app's links that leave it (collectives online, from the local app),
|
|
273
|
-
* listed in the shortcuts after the docs
|
|
271
|
+
* listed in the shortcuts after the docs. An `external`
|
|
274
272
|
* item in `groups` moves there too.
|
|
275
273
|
*/
|
|
276
274
|
elsewhere?: AppSidebarItem[];
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* a single avatar tile: initials, or a photo with the initials as the fallback beneath it.
|
|
6
|
-
* the base .avatar is
|
|
6
|
+
* the base .avatar is 24px (inline identity); size scales it up for standalone use.
|
|
7
7
|
*
|
|
8
8
|
* @param {object} props
|
|
9
9
|
* @param {string} props.name - the person's name; used as the accessible label and to derive initials when none are given.
|
|
10
10
|
* @param {string} [props.initials] - explicit initials to render; defaults to the first letters of `name`.
|
|
11
|
-
* @param {AvatarSize} [props.size] - one of 'sm' | 'md' | 'lg' (24 / 32 / 44px). omit for the
|
|
11
|
+
* @param {AvatarSize} [props.size] - one of 'sm' | 'md' | 'lg' (24 / 32 / 44px). omit for the 24px base.
|
|
12
12
|
* @param {string} [props.src] - optional photo url; when set the tile becomes an .av-img with the photo over the initials.
|
|
13
13
|
* @param {boolean} [props.more] - render the amber "+N overflow" tile (.av-more); `initials` carries the "+5" text.
|
|
14
14
|
* @param {string} [props.className] - extra class names appended after the avatar classes.
|
|
@@ -59,7 +59,7 @@ export function Field({ label, lock: LockIcon, hint, error, id, children }: {
|
|
|
59
59
|
* @param {string} [props.id] - input id; auto-generated + associated with the label when omitted.
|
|
60
60
|
* @returns {JSX.Element}
|
|
61
61
|
*/
|
|
62
|
-
export default function Input({ label, lock, hint, error, invalid, iconLeft: IconLeft, type, readOnly, disabled, value, defaultValue, onChange, id, ...rest }: {
|
|
62
|
+
export default function Input({ label, lock, hint, error, invalid, iconLeft: IconLeft, type, readOnly, disabled, value, defaultValue, onChange, id, className, ...rest }: {
|
|
63
63
|
label?: React.ReactNode;
|
|
64
64
|
lock?: React.ComponentType<{
|
|
65
65
|
size?: number;
|
|
@@ -98,7 +98,7 @@ export default function Input({ label, lock, hint, error, invalid, iconLeft: Ico
|
|
|
98
98
|
* @param {string} [props.id] - id; auto-generated + associated with the label when omitted.
|
|
99
99
|
* @returns {JSX.Element}
|
|
100
100
|
*/
|
|
101
|
-
export function Textarea({ label, lock, hint, error, invalid, rows, readOnly, disabled, value, defaultValue, onChange, id, ...rest }: {
|
|
101
|
+
export function Textarea({ label, lock, hint, error, invalid, rows, readOnly, disabled, value, defaultValue, onChange, id, className, ...rest }: {
|
|
102
102
|
label?: React.ReactNode;
|
|
103
103
|
lock?: React.ComponentType<{
|
|
104
104
|
size?: number;
|
|
@@ -137,7 +137,7 @@ export function Textarea({ label, lock, hint, error, invalid, rows, readOnly, di
|
|
|
137
137
|
* @param {string} [props.id] - id; auto-generated + associated with the label when omitted.
|
|
138
138
|
* @returns {JSX.Element}
|
|
139
139
|
*/
|
|
140
|
-
export function Select({ label, lock, hint, error, invalid, options, children, disabled, value, defaultValue, onChange, id, ...rest }: {
|
|
140
|
+
export function Select({ label, lock, hint, error, invalid, options, children, disabled, value, defaultValue, onChange, id, className, ...rest }: {
|
|
141
141
|
label?: React.ReactNode;
|
|
142
142
|
lock?: React.ComponentType<{
|
|
143
143
|
size?: number;
|
|
@@ -14,4 +14,4 @@ export default function OverflowList({ items, limit, label, noun, empty, classNa
|
|
|
14
14
|
noun?: [string, string];
|
|
15
15
|
empty?: import("react").ReactNode;
|
|
16
16
|
className?: string;
|
|
17
|
-
}): string | number | bigint | boolean |
|
|
17
|
+
}): string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode>> | import("react").JSX.Element;
|
|
@@ -7,10 +7,11 @@
|
|
|
7
7
|
* @param {(diff: { add: string[], remove: string[] }) => void} props.onSave
|
|
8
8
|
* @param {string} [props.title='link repositories']
|
|
9
9
|
* @param {import('react').ReactNode} [props.description] - one line under the title.
|
|
10
|
+
* @param {boolean} [props.inline=false] - show the repository controls directly in the containing page.
|
|
10
11
|
* @param {boolean} [props.saving=false] - the host's write is in flight.
|
|
11
12
|
* @param {string} [props.error] - the host's write failed; shown in a role="alert" line.
|
|
12
13
|
*/
|
|
13
|
-
export default function RepoPicker({ open, onClose, owners, initialSelected, onSave, title, description, saving, error }: {
|
|
14
|
+
export default function RepoPicker({ open, onClose, owners, initialSelected, onSave, title, description, saving, error, inline }: {
|
|
14
15
|
open: boolean;
|
|
15
16
|
onClose: () => void;
|
|
16
17
|
owners: RepoPickerOwner[];
|
|
@@ -21,6 +22,7 @@ export default function RepoPicker({ open, onClose, owners, initialSelected, onS
|
|
|
21
22
|
}) => void;
|
|
22
23
|
title?: string;
|
|
23
24
|
description?: import("react").ReactNode;
|
|
25
|
+
inline?: boolean;
|
|
24
26
|
saving?: boolean;
|
|
25
27
|
error?: string;
|
|
26
28
|
}): import("react").JSX.Element;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* @property {React.ComponentType<{size?: number}>} [stateIcon] override icon for the
|
|
12
12
|
* .sw-state marker; defaults to CircleCheck (on) / Circle (off).
|
|
13
13
|
* @property {string} [id] id for the control; links the label's `for`.
|
|
14
|
-
* @property {boolean} [stateMarker=
|
|
14
|
+
* @property {boolean} [stateMarker=false] show the on/off word beside the switch; off where the
|
|
15
15
|
* host already says the state (a settings row).
|
|
16
16
|
*/
|
|
17
17
|
/**
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* @typedef {import('./types.js').ExploreSurfaceProps} ExploreSurfaceProps
|
|
3
3
|
*/
|
|
4
4
|
/** @param {ExploreSurfaceProps} props */
|
|
5
|
-
export default function Explore({ data, className, onFiltersChange, onOpenTranscript, onOpenProfile, onOpenCollective, transcriptHref, profileHref, collectiveHref, headingLevel, }: ExploreSurfaceProps): import("react").JSX.Element;
|
|
5
|
+
export default function Explore({ data, className, title, resultsFooter, defaultLayout, onFiltersChange, onOpenTranscript, onOpenProfile, onOpenCollective, transcriptHref, profileHref, collectiveHref, headingLevel, }: ExploreSurfaceProps): import("react").JSX.Element;
|
|
6
6
|
export type ExploreSurfaceProps = import("./types.js").ExploreSurfaceProps;
|
|
@@ -88,6 +88,18 @@ export type ExploreFilters = {
|
|
|
88
88
|
export type ExploreSurfaceProps = {
|
|
89
89
|
data: ExplorePayload;
|
|
90
90
|
className?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Browse title; null when the host already supplies its heading.
|
|
93
|
+
*/
|
|
94
|
+
title?: import("react").ReactNode;
|
|
95
|
+
/**
|
|
96
|
+
* Additional session groups after the results and pagination, inside the result column.
|
|
97
|
+
*/
|
|
98
|
+
resultsFooter?: import("react").ReactNode;
|
|
99
|
+
/**
|
|
100
|
+
* Initial result layout; grid by default. Users can still switch views.
|
|
101
|
+
*/
|
|
102
|
+
defaultLayout?: "grid" | "list";
|
|
91
103
|
onFiltersChange?: (filters: ExploreFilters) => void;
|
|
92
104
|
onOpenTranscript?: (transcript: ExploreTranscriptPayload) => void;
|
|
93
105
|
onOpenProfile?: (owner: ExploreOwnerPayload) => void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {object} props
|
|
3
|
+
* @param {number} [props.headingLevel=2] the panel heading's level, one under the viewer title
|
|
4
|
+
* @param {boolean} [props.folded=false] the host has folded the badge out of view; an open panel closes
|
|
5
|
+
*/
|
|
6
|
+
export default function IntegrityBadge({ headingLevel, folded }: {
|
|
7
|
+
headingLevel?: number;
|
|
8
|
+
folded?: boolean;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
/**
|
|
11
|
+
* The flagged-turn mark: the warning glyph and a word. On a turn head or a system row the heading
|
|
12
|
+
* carries the accessible name, so the mark is `aria-hidden`; in a work group, which has no heading
|
|
13
|
+
* of its own, it stays readable.
|
|
14
|
+
* @param {object} props
|
|
15
|
+
* @param {string} [props.text] the word beside the glyph
|
|
16
|
+
* @param {boolean} [props.decorative=true] hide the whole mark from assistive technology
|
|
17
|
+
*/
|
|
18
|
+
export function IntegrityMark({ text, decorative }: {
|
|
19
|
+
text?: string;
|
|
20
|
+
decorative?: boolean;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @param {TranscriptViewerProps} props
|
|
3
3
|
*/
|
|
4
|
-
export default function TranscriptViewer({ viewModel, capabilities, callbacks, theme: themeProp, onThemeChange, graphSlot, activeTab: activeTabProp, onTabChange, viewMode: viewModeProp, onViewModeChange, sidebarLayout: sidebarLayoutProp, onSidebarLayoutChange, zen: zenProp, onZenChange, readerWidth: readerWidthProp, onReaderWidthChange, leftRailOpen: leftRailOpenProp, onLeftRailOpenChange, rightRailOpen: rightRailOpenProp, onRightRailOpenChange, openTools: openToolsProp, onOpenToolsChange, earlierHistoryOpen: earlierHistoryOpenProp, onEarlierHistoryOpenChange, initialPosition: initialPositionProp, activeTurn: activeTurnProp, onActiveTurnChange, search: searchProp, onSearchChange, filters: filtersProp, onFiltersChange, savedLabels: savedLabelsProp, onSavedLabelsChange, shareOpen: shareOpenProp, onShareOpenChange, moreOpen: moreOpenProp, onMoreOpenChange, breadcrumb, breadcrumbContext, beforeHeader, LinkComponent, renderTurnPanel, renderTurnActions, anchorHref, headerActions, utilityActions, streamPrelude, showTail, showOutcome, showSearchTrigger, footer, presentation, subtitle, pullRequests, headingLevel, }: TranscriptViewerProps): import("react").JSX.Element;
|
|
4
|
+
export default function TranscriptViewer({ viewModel, capabilities, callbacks, theme: themeProp, onThemeChange, graphSlot, activeTab: activeTabProp, onTabChange, viewMode: viewModeProp, onViewModeChange, sidebarLayout: sidebarLayoutProp, onSidebarLayoutChange, zen: zenProp, onZenChange, readerWidth: readerWidthProp, onReaderWidthChange, leftRailOpen: leftRailOpenProp, onLeftRailOpenChange, rightRailOpen: rightRailOpenProp, onRightRailOpenChange, openTools: openToolsProp, onOpenToolsChange, earlierHistoryOpen: earlierHistoryOpenProp, onEarlierHistoryOpenChange, initialPosition: initialPositionProp, activeTurn: activeTurnProp, onActiveTurnChange, search: searchProp, onSearchChange, filters: filtersProp, onFiltersChange, savedLabels: savedLabelsProp, onSavedLabelsChange, shareOpen: shareOpenProp, onShareOpenChange, moreOpen: moreOpenProp, onMoreOpenChange, breadcrumb, breadcrumbContext, beforeHeader, LinkComponent, renderTurnPanel, renderTurnActions, anchorHref, headerActions, utilityActions, streamPrelude, showTail, showOutcome, showSearchTrigger, footer, presentation, subtitle, pullRequests, headingLevel, integrity, transcriptContentHash, contentHash, }: TranscriptViewerProps): import("react").JSX.Element;
|
|
5
5
|
export const READER_FULL: "full";
|
|
6
6
|
export type TranscriptViewerProps = import("./state-capabilities.js").TranscriptViewerProps;
|
|
7
7
|
export type TranscriptFilters = import("./state-capabilities.js").TranscriptFilters;
|
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
* @param {number} [props.revealRequest] explicit search navigation sequence
|
|
17
17
|
* @param {number} [props.headingLevel=4] the turn heading's level: h4 under a viewer whose title is an h2, h3 under one
|
|
18
18
|
* whose title is the page's h1
|
|
19
|
+
* @param {boolean} [props.flagged=false] the integrity check marked this turn: the article takes `is-flagged`, the
|
|
20
|
+
* heading gains a hidden suffix naming the flag, and a visible mark shows in the head (or the system row's
|
|
21
|
+
* trailing cluster, or the start of a ledger detail turn's work block)
|
|
22
|
+
* @param {ReadonlySet<number>} [props.flaggedPositions] source positions marked in a work group this card renders
|
|
19
23
|
* @param {'classic' | 'ledger'} [props.presentation='classic'] chrome presentation. `ledger` leads with a
|
|
20
24
|
* square role well and the role word, groups the turn's tool calls into one work panel, and renders a
|
|
21
25
|
* system turn as a compact row; absent, the classic card renders exactly as before. In ledger the head
|
|
@@ -25,7 +29,7 @@
|
|
|
25
29
|
* `renderActions` and `renderTurnPanel` keep rendering on every role, so a host extension is never
|
|
26
30
|
* dropped by the presentation switch.
|
|
27
31
|
*/
|
|
28
|
-
export default function TurnCard({ turn, active, onSelect, openTools, toggleTool, onCopyAnchor, copied, registerRef, onLabel, renderActions, savedLabel, compact, expandAll, revealRequest, headingLevel, modelActions, actionReveal, registerActionRef, suppressWork, presentation, }: {
|
|
32
|
+
export default function TurnCard({ turn, active, onSelect, openTools, toggleTool, onCopyAnchor, copied, registerRef, onLabel, renderActions, savedLabel, compact, expandAll, revealRequest, headingLevel, modelActions, actionReveal, registerActionRef, suppressWork, presentation, flagged, flaggedPositions, }: {
|
|
29
33
|
turn?: TurnVM;
|
|
30
34
|
active?: boolean;
|
|
31
35
|
onSelect?: (turnIndex: number) => void;
|
|
@@ -44,6 +48,8 @@ export default function TurnCard({ turn, active, onSelect, openTools, toggleTool
|
|
|
44
48
|
expandAll?: boolean;
|
|
45
49
|
revealRequest?: number;
|
|
46
50
|
headingLevel?: number;
|
|
51
|
+
flagged?: boolean;
|
|
52
|
+
flaggedPositions?: ReadonlySet<number>;
|
|
47
53
|
presentation?: "classic" | "ledger";
|
|
48
54
|
}): import("react").JSX.Element;
|
|
49
55
|
export type TurnVM = import("./view-model.js").TurnVM;
|
|
@@ -12,12 +12,14 @@ export default function TranscriptWorkGroup({ tools, thinking, openTools, onTogg
|
|
|
12
12
|
onToggle?: (id: string) => void;
|
|
13
13
|
expandAll?: boolean;
|
|
14
14
|
}): import("react").JSX.Element;
|
|
15
|
-
export function ModelActions({ turns, openTools, onToggle, expandAll, compact, reveal, registerActionRef }: {
|
|
15
|
+
export function ModelActions({ turns, openTools, onToggle, expandAll, compact, flaggedPositions, cardTurn, reveal, registerActionRef }: {
|
|
16
16
|
turns?: any[];
|
|
17
17
|
openTools?: {};
|
|
18
18
|
onToggle?: () => void;
|
|
19
19
|
expandAll?: boolean;
|
|
20
20
|
compact?: boolean;
|
|
21
|
+
flaggedPositions: any;
|
|
22
|
+
cardTurn: any;
|
|
21
23
|
reveal: any;
|
|
22
24
|
registerActionRef?: () => void;
|
|
23
25
|
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {unknown} integrity the served integrity value; its presence is the flag
|
|
3
|
+
* @param {unknown} transcriptContentHash the detail response's transcript content hash
|
|
4
|
+
* @param {unknown} contentHash the hash of the rendered content, when the host has one
|
|
5
|
+
* @returns {{ positions: ReadonlySet<number> } | null} null draws nothing; otherwise the badge
|
|
6
|
+
* draws, and positions are marked only when both hashes are non-empty and equal
|
|
7
|
+
*/
|
|
8
|
+
export function integrityView(integrity: unknown, transcriptContentHash: unknown, contentHash: unknown): {
|
|
9
|
+
positions: ReadonlySet<number>;
|
|
10
|
+
} | null;
|
|
11
|
+
/**
|
|
12
|
+
* Pure view of a transcript's served integrity flag. The host passes the served value as it
|
|
13
|
+
* arrived, the detail response's content hash, and the content hash of the rendered content.
|
|
14
|
+
* Nothing here knows how the flag was decided.
|
|
15
|
+
*/
|
|
16
|
+
/** @typedef {import('@peasant-labs/schema').VillageTranscriptIntegrity} VillageTranscriptIntegrity */
|
|
17
|
+
/**
|
|
18
|
+
* Every string the integrity badge, its help panel and the flagged-turn mark show. This object is
|
|
19
|
+
* the single place to edit that wording: change a value here and every surface follows. The tests
|
|
20
|
+
* read the strings from this object rather than repeating them, so a reworded value needs no test
|
|
21
|
+
* edit. They do guard that the key set stays the same, that no value names a rule, a field or the
|
|
22
|
+
* service behind the check, and that no value uses an em dash or a middle dot. The badge's
|
|
23
|
+
* accessible name (helpName) must contain its visible label (badgeLabel).
|
|
24
|
+
*/
|
|
25
|
+
export const INTEGRITY_COPY: Readonly<{
|
|
26
|
+
badgeLabel: "suspicious transcript";
|
|
27
|
+
helpName: "what does suspicious transcript mean?";
|
|
28
|
+
panelHeading: "about this flag";
|
|
29
|
+
panelBody: "This transcript has likely been edited after it was recorded, according to our automated detection systems.";
|
|
30
|
+
panelOtherTools: "Custom tools, plugins or hooks used during the session can create false positives.";
|
|
31
|
+
statusText: "This transcript has been flagged by an automated check and was likely modified after initially recorded.";
|
|
32
|
+
turnMark: "flagged";
|
|
33
|
+
turnName: ", flagged by an automated check";
|
|
34
|
+
groupMark: "includes a flagged turn";
|
|
35
|
+
}>;
|
|
36
|
+
export type VillageTranscriptIntegrity = import("@peasant-labs/schema").VillageTranscriptIntegrity;
|
|
@@ -323,6 +323,18 @@ export type TranscriptViewerBaseProps = {
|
|
|
323
323
|
* host-owned node rendered under the meta row (a pull request list and its own "show all" control); omitted renders nothing
|
|
324
324
|
*/
|
|
325
325
|
pullRequests?: unknown;
|
|
326
|
+
/**
|
|
327
|
+
* the served integrity value, passed through untouched. Present and well formed means flagged: the header shows the badge in every presentation and width. Absent, null or malformed renders nothing
|
|
328
|
+
*/
|
|
329
|
+
integrity?: import("@peasant-labs/schema").VillageTranscriptIntegrity | null;
|
|
330
|
+
/**
|
|
331
|
+
* the detail response's `transcript.content_hash`, the content `integrity.flagged_turns` refer to
|
|
332
|
+
*/
|
|
333
|
+
transcriptContentHash?: string | null;
|
|
334
|
+
/**
|
|
335
|
+
* the bare hash of the content `viewModel` was cooked from (the content route's `Village-Content-Hash` header). Turns are marked only when it equals `transcriptContentHash` and both are non-empty
|
|
336
|
+
*/
|
|
337
|
+
contentHash?: string | null;
|
|
326
338
|
};
|
|
327
339
|
/**
|
|
328
340
|
* The full legacy trail and the ancestor-only context are alternative contracts.
|
|
@@ -311,6 +311,10 @@ export type TurnVM = {
|
|
|
311
311
|
* whether this index is unambiguous in its partition
|
|
312
312
|
*/
|
|
313
313
|
sourceIndexUnique?: boolean;
|
|
314
|
+
/**
|
|
315
|
+
* position in payload.turns, the value VillageTranscriptIntegrity.flagged_turns refers to; main turns only
|
|
316
|
+
*/
|
|
317
|
+
sourcePosition?: number;
|
|
314
318
|
/**
|
|
315
319
|
* partition-scoped stable rendering key
|
|
316
320
|
*/
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* True when a turn has words of its own, so it draws a card (a turn that is only work is inline detail).
|
|
3
|
+
* @param {{ displayContent?: unknown, content?: unknown } | null | undefined} turn
|
|
4
|
+
* @returns {boolean}
|
|
5
|
+
*/
|
|
6
|
+
export function turnHasProse(turn: {
|
|
7
|
+
displayContent?: unknown;
|
|
8
|
+
content?: unknown;
|
|
9
|
+
} | null | undefined): boolean;
|
|
1
10
|
/**
|
|
2
11
|
* Summarize one turn's tool calls.
|
|
3
12
|
* @param {ToolCallVM[]} [tools]
|
|
@@ -311,6 +311,10 @@ export type TurnVM = {
|
|
|
311
311
|
* whether this index is unambiguous in its partition
|
|
312
312
|
*/
|
|
313
313
|
sourceIndexUnique?: boolean;
|
|
314
|
+
/**
|
|
315
|
+
* position in payload.turns, the value VillageTranscriptIntegrity.flagged_turns refers to; main turns only
|
|
316
|
+
*/
|
|
317
|
+
sourcePosition?: number;
|
|
314
318
|
/**
|
|
315
319
|
* partition-scoped stable rendering key
|
|
316
320
|
*/
|