@peasant-labs/fairtrade 0.0.4 → 0.0.6
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/{ChartLine-Dlp6-CLL.js → ChartLine-Cycmpjep.js} +45 -39
- package/dist/lib/{InUseShell-DZvmRdj-.js → InUseShell-CjtqHauP.js} +1 -1
- package/dist/lib/analytics.css +1 -1
- package/dist/lib/analytics.js +10 -10
- package/dist/lib/commons.js +1 -1
- package/dist/lib/components.css +1 -1
- package/dist/lib/graph.js +1 -1
- package/dist/lib/tokens.css +1 -1
- package/dist/lib/tokens.json +1 -1
- package/dist/lib/types/ChartBar.d.ts +3 -1
- package/dist/lib/types/ChartLine.d.ts +3 -1
- package/dist/lib/types/chart-shared.d.ts +1 -0
- package/dist/lib/types/transcript/TranscriptViewer.d.ts +1 -1
- package/dist/lib/types/transcript/TurnCard.d.ts +3 -1
- package/dist/lib/types/transcript/index.d.ts +1 -0
- package/dist/lib/types/transcript/state-capabilities.d.ts +31 -0
- package/dist/lib/{ui-oBFnHPFe.js → ui-TG4XLhWL.js} +3083 -3069
- package/dist/lib/ui.js +3 -3
- package/package.json +1 -1
package/dist/lib/graph.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as e, l as t, n, r, s as i, t as a, u as o } from "./InUseShell-
|
|
1
|
+
import { d as e, l as t, n, r, s as i, t as a, u as o } from "./InUseShell-CjtqHauP.js";
|
|
2
2
|
import { useMemo as s, useRef as c, useState as l } from "react";
|
|
3
3
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
4
4
|
import { Box as f, Check as p, ChevronDown as m, ChevronRight as h, Coins as g, CornerDownRight as _, FileDiff as v, FileText as y, GitMerge as b, Hash as x, MessageSquare as S, RotateCw as C, Share2 as w, Tag as T, TriangleAlert as E, X as D } from "lucide-react";
|
package/dist/lib/tokens.css
CHANGED
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
--chart-3: var(--clay);
|
|
106
106
|
--chart-4: var(--mauve);
|
|
107
107
|
--chart-amber: var(--amber);
|
|
108
|
-
--chart-grid: var(--rule);
|
|
108
|
+
--chart-grid: var(--rule-strong);
|
|
109
109
|
--chart-axis: var(--ink-3);
|
|
110
110
|
--chart-surface: var(--surface);
|
|
111
111
|
--chart-point-stroke: var(--surface);
|
package/dist/lib/tokens.json
CHANGED
|
@@ -17,10 +17,11 @@
|
|
|
17
17
|
* @param {number} [props.height=200] plot height in px.
|
|
18
18
|
* @param {number[]} [props.yTicks] explicit y ticks; omit to auto-pick integers.
|
|
19
19
|
* @param {(v:any)=>React.ReactNode} [props.xFormatter] format x tick + tooltip label.
|
|
20
|
+
* @param {(v:any)=>React.ReactNode} [props.yFormatter] format y ticks; defaults to thousands-compaction (3000 → 3k).
|
|
20
21
|
* @param {(v:any)=>React.ReactNode} [props.valueFormatter] format the tooltip value.
|
|
21
22
|
* @param {string} [props.className] extra class on the chart frame.
|
|
22
23
|
*/
|
|
23
|
-
export default function ChartBar({ data, xKey, series, stacked, icon, title, aside, sub, height, yTicks, xFormatter, valueFormatter, className, }: {
|
|
24
|
+
export default function ChartBar({ data, xKey, series, stacked, icon, title, aside, sub, height, yTicks, xFormatter, yFormatter, valueFormatter, className, }: {
|
|
24
25
|
data: any[];
|
|
25
26
|
xKey: string;
|
|
26
27
|
series: BarSeries[];
|
|
@@ -32,6 +33,7 @@ export default function ChartBar({ data, xKey, series, stacked, icon, title, asi
|
|
|
32
33
|
height?: number;
|
|
33
34
|
yTicks?: number[];
|
|
34
35
|
xFormatter?: (v: any) => React.ReactNode;
|
|
36
|
+
yFormatter?: (v: any) => React.ReactNode;
|
|
35
37
|
valueFormatter?: (v: any) => React.ReactNode;
|
|
36
38
|
className?: string;
|
|
37
39
|
}): any;
|
|
@@ -17,10 +17,11 @@
|
|
|
17
17
|
* @param {number} [props.height=200] plot height in px.
|
|
18
18
|
* @param {number[]} [props.yTicks] explicit y ticks; omit to auto-pick integers.
|
|
19
19
|
* @param {(v:any)=>React.ReactNode} [props.xFormatter] format x tick + tooltip label.
|
|
20
|
+
* @param {(v:any)=>React.ReactNode} [props.yFormatter] format y ticks; defaults to thousands-compaction (3000 → 3k).
|
|
20
21
|
* @param {(v:any)=>React.ReactNode} [props.valueFormatter] format the tooltip value.
|
|
21
22
|
* @param {string} [props.className] extra class on the chart frame.
|
|
22
23
|
*/
|
|
23
|
-
export default function ChartLine({ data, xKey, series, icon, title, aside, sub, height, yTicks, xFormatter, valueFormatter, className, }: {
|
|
24
|
+
export default function ChartLine({ data, xKey, series, icon, title, aside, sub, height, yTicks, xFormatter, yFormatter, valueFormatter, className, }: {
|
|
24
25
|
data: any[];
|
|
25
26
|
xKey: string;
|
|
26
27
|
series: LineSeries[];
|
|
@@ -31,6 +32,7 @@ export default function ChartLine({ data, xKey, series, icon, title, aside, sub,
|
|
|
31
32
|
height?: number;
|
|
32
33
|
yTicks?: number[];
|
|
33
34
|
xFormatter?: (v: any) => React.ReactNode;
|
|
35
|
+
yFormatter?: (v: any) => React.ReactNode;
|
|
34
36
|
valueFormatter?: (v: any) => React.ReactNode;
|
|
35
37
|
className?: string;
|
|
36
38
|
}): any;
|
|
@@ -1,6 +1,6 @@
|
|
|
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, leftRailOpen: leftRailOpenProp, onLeftRailOpenChange, rightRailOpen: rightRailOpenProp, onRightRailOpenChange, openTools: openToolsProp, onOpenToolsChange, activeTurn: activeTurnProp, onActiveTurnChange, search: searchProp, onSearchChange, filters: filtersProp, onFiltersChange, savedLabels: savedLabelsProp, onSavedLabelsChange, shareOpen: shareOpenProp, onShareOpenChange, moreOpen: moreOpenProp, onMoreOpenChange, }: TranscriptViewerProps): any;
|
|
4
|
+
export default function TranscriptViewer({ viewModel, capabilities, callbacks, theme: themeProp, onThemeChange, graphSlot, activeTab: activeTabProp, onTabChange, viewMode: viewModeProp, onViewModeChange, leftRailOpen: leftRailOpenProp, onLeftRailOpenChange, rightRailOpen: rightRailOpenProp, onRightRailOpenChange, openTools: openToolsProp, onOpenToolsChange, activeTurn: activeTurnProp, onActiveTurnChange, search: searchProp, onSearchChange, filters: filtersProp, onFiltersChange, savedLabels: savedLabelsProp, onSavedLabelsChange, shareOpen: shareOpenProp, onShareOpenChange, moreOpen: moreOpenProp, onMoreOpenChange, breadcrumb, LinkComponent, renderTurnPanel, renderTurnActions, anchorHref, headerActions, }: TranscriptViewerProps): any;
|
|
5
5
|
export type TranscriptViewerProps = import("./state-capabilities.js").TranscriptViewerProps;
|
|
6
6
|
export type TranscriptFilters = import("./state-capabilities.js").TranscriptFilters;
|
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
* @param {boolean} [props.copied]
|
|
9
9
|
* @param {(turnIndex: number, el: HTMLElement | null) => void} [props.registerRef]
|
|
10
10
|
* @param {(turnIndex: number) => void} [props.onLabel] omit to hide the "label" affordance
|
|
11
|
+
* @param {(turn: object) => unknown} [props.renderActions] host-owned per-turn actions; replaces the built-in label button (hosts with their own label models render their own popover)
|
|
11
12
|
* @param {{ outcome: string, flag?: string }} [props.savedLabel]
|
|
12
13
|
* @param {boolean} [props.compact]
|
|
13
14
|
* @param {boolean} [props.expandAll]
|
|
14
15
|
*/
|
|
15
|
-
export default function TurnCard({ turn, active, openTools, toggleTool, onCopyAnchor, copied, registerRef, onLabel, savedLabel, compact, expandAll, }: {
|
|
16
|
+
export default function TurnCard({ turn, active, openTools, toggleTool, onCopyAnchor, copied, registerRef, onLabel, renderActions, savedLabel, compact, expandAll, }: {
|
|
16
17
|
turn?: TurnVM;
|
|
17
18
|
active?: boolean;
|
|
18
19
|
openTools?: Record<string, boolean>;
|
|
@@ -21,6 +22,7 @@ export default function TurnCard({ turn, active, openTools, toggleTool, onCopyAn
|
|
|
21
22
|
copied?: boolean;
|
|
22
23
|
registerRef?: (turnIndex: number, el: HTMLElement | null) => void;
|
|
23
24
|
onLabel?: (turnIndex: number) => void;
|
|
25
|
+
renderActions?: (turn: object) => unknown;
|
|
24
26
|
savedLabel?: {
|
|
25
27
|
outcome: string;
|
|
26
28
|
flag?: string;
|
|
@@ -36,6 +36,7 @@ export type AnnotationSummary = import("./wire-types.js").AnnotationSummary;
|
|
|
36
36
|
export type SessionDetailPayload = import("./wire-types.js").SessionDetailPayload;
|
|
37
37
|
export type TranscriptWireInput = import("./wire-types.js").TranscriptWireInput;
|
|
38
38
|
export type TranscriptViewerProps = import("./state-capabilities.js").TranscriptViewerProps;
|
|
39
|
+
export type BreadcrumbItem = import("./state-capabilities.js").BreadcrumbItem;
|
|
39
40
|
export type ViewerCapabilities = import("./state-capabilities.js").ViewerCapabilities;
|
|
40
41
|
export type ViewerCallbacks = import("./state-capabilities.js").ViewerCallbacks;
|
|
41
42
|
export type GraphSlotContext = import("./state-capabilities.js").GraphSlotContext;
|
|
@@ -158,4 +158,35 @@ export type TranscriptViewerProps = {
|
|
|
158
158
|
*/
|
|
159
159
|
moreOpen?: boolean;
|
|
160
160
|
onMoreOpenChange?: (open: boolean) => void;
|
|
161
|
+
/**
|
|
162
|
+
* host-routable trail; omit for the demo's static crumb
|
|
163
|
+
*/
|
|
164
|
+
breadcrumb?: BreadcrumbItem[];
|
|
165
|
+
/**
|
|
166
|
+
* router link for crumb items (e.g. next/link); defaults to 'a'
|
|
167
|
+
*/
|
|
168
|
+
LinkComponent?: any;
|
|
169
|
+
/**
|
|
170
|
+
* host per-turn extension rendered under each turn card
|
|
171
|
+
*/
|
|
172
|
+
renderTurnPanel?: (turn: import("./view-model.js").TurnVM) => unknown;
|
|
173
|
+
/**
|
|
174
|
+
* host-owned per-turn actions; replaces the built-in label affordance (hosts with typed label models keep their own popovers)
|
|
175
|
+
*/
|
|
176
|
+
renderTurnActions?: (turn: import("./view-model.js").TurnVM) => unknown;
|
|
177
|
+
/**
|
|
178
|
+
* host permalink for a turn's copy-anchor action; a root-relative return is absolutized against the page origin. Omitted, the demo copies its bare '#turn-N' placeholder
|
|
179
|
+
*/
|
|
180
|
+
anchorHref?: (turnIndex: number) => string;
|
|
181
|
+
/**
|
|
182
|
+
* host session-level actions rendered at the head of the hero action row (attest etc.); the composite's own actions stay the shared tail
|
|
183
|
+
*/
|
|
184
|
+
headerActions?: unknown;
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* One breadcrumb segment. The last item renders as the current page (no link).
|
|
188
|
+
*/
|
|
189
|
+
export type BreadcrumbItem = {
|
|
190
|
+
label: string;
|
|
191
|
+
href?: string;
|
|
161
192
|
};
|