@peasant-labs/fairtrade 0.0.29 → 0.0.30

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.
@@ -0,0 +1,87 @@
1
+ /** Metadata-only observation browsing. No effects, storage, routing or network requests.
2
+ * @param {VillageObservationsProps} props
3
+ */
4
+ export default function VillageObservations({ accountLabel, villageLabel, domains, collectives, categories, view, categoryId, fetching, fetchDisabled, status, issue, onFetch, onTrack, onViewChange, onCategoryChange, onPageChange, onRestart, }: VillageObservationsProps): import("react").JSX.Element;
5
+ /**
6
+ * Cooked presentation models. Hosts own wire validation, scope, tokens and policy.
7
+ */
8
+ export type ObservationIssue = {
9
+ message: string;
10
+ retry: string;
11
+ };
12
+ /**
13
+ * Cooked presentation models. Hosts own wire validation, scope, tokens and policy.
14
+ */
15
+ export type ObservationDomain = {
16
+ id: string;
17
+ label: string;
18
+ result: string;
19
+ commit?: string;
20
+ lastCompletedAt?: string;
21
+ lastAttemptAt?: string;
22
+ issue?: ObservationIssue;
23
+ };
24
+ /**
25
+ * Cooked presentation models. Hosts own wire validation, scope, tokens and policy.
26
+ */
27
+ export type ObservedCollective = {
28
+ id: string;
29
+ name: string;
30
+ description?: string;
31
+ reasons: string[];
32
+ observedAt?: string;
33
+ state: string;
34
+ policy?: string;
35
+ tracking?: boolean;
36
+ };
37
+ /**
38
+ * Cooked presentation models. Hosts own wire validation, scope, tokens and policy.
39
+ */
40
+ export type ContributionEvidenceRow = {
41
+ id: string;
42
+ title: string;
43
+ description?: string;
44
+ outcome: string;
45
+ occurredAt?: string;
46
+ details?: Array<{
47
+ label: string;
48
+ value: string;
49
+ }>;
50
+ };
51
+ /**
52
+ * Cooked presentation models. Hosts own wire validation, scope, tokens and policy.
53
+ */
54
+ export type ContributionEvidenceCategory = {
55
+ id: string;
56
+ label: string;
57
+ rows: ContributionEvidenceRow[];
58
+ page: number;
59
+ pageCount: number;
60
+ total: number;
61
+ coverage: string;
62
+ issue?: ObservationIssue;
63
+ conflict?: boolean;
64
+ loading?: boolean;
65
+ };
66
+ /**
67
+ * Cooked presentation models. Hosts own wire validation, scope, tokens and policy.
68
+ */
69
+ export type VillageObservationsProps = {
70
+ accountLabel: string;
71
+ villageLabel: string;
72
+ domains: ObservationDomain[];
73
+ collectives: ObservedCollective[];
74
+ categories: ContributionEvidenceCategory[];
75
+ view?: "catalog" | "history";
76
+ categoryId?: string;
77
+ fetching?: boolean;
78
+ fetchDisabled?: boolean;
79
+ status?: string;
80
+ issue?: ObservationIssue;
81
+ onFetch?: () => void;
82
+ onTrack?: (id: string, tracking: boolean) => void;
83
+ onViewChange?: (view: "catalog" | "history") => void;
84
+ onCategoryChange?: (id: string) => void;
85
+ onPageChange?: (id: string, page: number) => void;
86
+ onRestart?: (id: string) => void;
87
+ };
@@ -2,6 +2,7 @@ export { default as Changes } from "./Changes.jsx";
2
2
  export { default as ChangeDetail } from "./ChangeDetail.jsx";
3
3
  export { default as CodeMapNavigator } from "./CodeMapNavigator.jsx";
4
4
  export { assertTimelineNavigationAction } from "./timelineNavigation.js";
5
+ export { default as VillageObservations } from "../VillageObservations.jsx";
5
6
  export { default as SessionLane } from "./SessionLane.jsx";
6
7
  export { default as GhostCommitNode } from "./GhostCommitNode.jsx";
7
8
  export { default as GhostGroup } from "./GhostGroup.jsx";
@@ -21,6 +22,11 @@ export type InsightKind = import("@peasant-labs/schema").InsightKind;
21
22
  export type InsightProvenance = import("@peasant-labs/schema").InsightProvenance;
22
23
  export type ReadAttributionState = import("@peasant-labs/schema").ReadAttributionState;
23
24
  export type ReadStateGrade = import("@peasant-labs/schema").ReadStateGrade;
25
+ export type VillageObservationsProps = import("../VillageObservations.jsx").VillageObservationsProps;
26
+ export type ObservationDomain = import("../VillageObservations.jsx").ObservationDomain;
27
+ export type ObservedCollective = import("../VillageObservations.jsx").ObservedCollective;
28
+ export type ContributionEvidenceCategory = import("../VillageObservations.jsx").ContributionEvidenceCategory;
29
+ export type ContributionEvidenceRow = import("../VillageObservations.jsx").ContributionEvidenceRow;
24
30
  export type CommitRefPayload = import("./types.js").CommitRefPayload;
25
31
  export type TimelineSessionPayload = import("./types.js").TimelineSessionPayload;
26
32
  export type MapEdgePayload = import("./types.js").MapEdgePayload;
@@ -27,9 +27,15 @@ export { default as StatsStrip } from "./StatsStrip.jsx";
27
27
  export { default as CopyIconButton } from "./CopyIconButton.jsx";
28
28
  export { default as OverflowList } from "./OverflowList.jsx";
29
29
  export { default as RepoPicker } from "./RepoPicker.jsx";
30
+ export { default as VillageObservations } from "./VillageObservations.jsx";
30
31
  export * from "./transcript/index.js";
31
32
  export * from "./transcript/graph/index.js";
32
33
  export type TimelineNavigationAction = import("./graph/timelineNavigation.js").TimelineNavigationAction;
34
+ export type VillageObservationsProps = import("./VillageObservations.jsx").VillageObservationsProps;
35
+ export type ObservationDomain = import("./VillageObservations.jsx").ObservationDomain;
36
+ export type ObservedCollective = import("./VillageObservations.jsx").ObservedCollective;
37
+ export type ContributionEvidenceCategory = import("./VillageObservations.jsx").ContributionEvidenceCategory;
38
+ export type ContributionEvidenceRow = import("./VillageObservations.jsx").ContributionEvidenceRow;
33
39
  export { default as Button, ButtonGroup, Segmented } from "./Button.jsx";
34
40
  export { default as Input, Textarea, Select, Field } from "./Input.jsx";
35
41
  export { default as Checkbox, Radio, RadioGroup } from "./Checkbox.jsx";