@burdenoff/planmagnet-fe-sdk 2026.703.1 → 2026.703.3

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/index.d.ts CHANGED
@@ -1,11 +1,38 @@
1
1
  import * as react from 'react';
2
- import { ReactNode, HTMLAttributes } from 'react';
2
+ import { HTMLAttributes, ReactNode, ComponentType, DragEvent } from 'react';
3
3
  import { ApolloClient } from '@apollo/client/core';
4
4
  import * as graphql from 'graphql';
5
5
  import * as class_variance_authority_types from 'class-variance-authority/types';
6
6
  import { VariantProps } from 'class-variance-authority';
7
+ import { LucideProps } from 'lucide-react';
7
8
  import { ClassValue } from 'clsx';
8
9
 
10
+ declare const badgeVariants: (props?: ({
11
+ variant?: "default" | "muted" | "secondary" | "accent" | "destructive" | null | undefined;
12
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
13
+ interface BadgeProps extends HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
14
+ }
15
+ /**
16
+ * Badge — a small owned pill primitive used for task status/priority/type.
17
+ * Semantic-token only.
18
+ */
19
+ declare function Badge({ className, variant, ...props }: BadgeProps): react.JSX.Element;
20
+
21
+ declare const SIZES: {
22
+ readonly sm: "h-5 w-5 text-[9px]";
23
+ readonly md: "h-6 w-6 text-[10px]";
24
+ readonly lg: "h-8 w-8 text-xs";
25
+ };
26
+ interface AvatarProps {
27
+ /** Assignee actor id (used for the deterministic tint + fallback initials). */
28
+ id?: string | null;
29
+ /** Resolved display name, if the host has a directory. */
30
+ name?: string | null;
31
+ size?: keyof typeof SIZES;
32
+ className?: string;
33
+ }
34
+ declare function Avatar({ id, name, size, className }: AvatarProps): react.JSX.Element;
35
+
9
36
  /**
10
37
  * Domain types for the PlanMagnet task SDK.
11
38
  *
@@ -154,6 +181,58 @@ interface ProjectList {
154
181
  pageInfo: TaskPageInfo;
155
182
  totalCount: number;
156
183
  }
184
+ /**
185
+ * A link between a work item and an external entity owned by another product
186
+ * (`WorkItemLink`). HealthyBowl pins a task to a Field/Crop/Animal/Pest record
187
+ * via `sourceProduct: "healthybowl"` + `entityType`/`entityId`, snapshotting a
188
+ * label + deep-link so a deleted record degrades gracefully. The OUTPUT type is
189
+ * bare `WorkItemLink`; server-side all ids except `id` are `String`.
190
+ */
191
+ interface WorkItemLink {
192
+ id: string;
193
+ workspaceId: string;
194
+ workItemId: string;
195
+ sourceProduct: string;
196
+ entityType: string;
197
+ entityId: string;
198
+ relationType: WorkItemLinkRelation;
199
+ displayNameSnapshot?: string | null;
200
+ deepLinkSnapshot?: string | null;
201
+ metadata?: unknown;
202
+ createdBy: string;
203
+ onBehalfOf?: string | null;
204
+ createdAt: string;
205
+ updatedAt: string;
206
+ }
207
+ /**
208
+ * Input for `planmagnetLinkWorkItem` (PlanmagnetCreateWorkItemLinkInput).
209
+ * Required: workItemId, sourceProduct, entityType, entityId. `relationType` is
210
+ * optional (server defaults to RELATED_TO).
211
+ */
212
+ interface CreateWorkItemLinkInput {
213
+ workItemId: string;
214
+ sourceProduct: string;
215
+ entityType: string;
216
+ entityId: string;
217
+ relationType?: WorkItemLinkRelation;
218
+ displayNameSnapshot?: string;
219
+ deepLinkSnapshot?: string;
220
+ metadata?: unknown;
221
+ }
222
+ /** Filter for `planmagnetWorkItemLinks` (PlanmagnetWorkItemLinkFilter). */
223
+ interface ListWorkItemLinksInput {
224
+ workItemId?: string;
225
+ sourceProduct?: string;
226
+ entityType?: string;
227
+ entityId?: string;
228
+ relationType?: WorkItemLinkRelation;
229
+ }
230
+ /** Shape returned by the ListWorkItemLinks query (PlanmagnetWorkItemLinkList). */
231
+ interface WorkItemLinkList {
232
+ items: WorkItemLink[];
233
+ pageInfo: TaskPageInfo;
234
+ totalCount: number;
235
+ }
157
236
  /** Board column definition. */
158
237
  interface BoardColumn {
159
238
  status: TaskStatus;
@@ -178,25 +257,178 @@ declare const TASK_STATUSES: TaskStatus[];
178
257
  */
179
258
  declare function enumLabel(value: string): string;
180
259
 
260
+ /**
261
+ * Optional host hook to render an icon for a linked entity type (e.g. a leaf
262
+ * for FIELD, a cow for ANIMAL). The SDK is farm-free, so it renders a generic
263
+ * link glyph unless the host supplies one.
264
+ */
265
+ type RenderLinkIcon = (entityType: string) => ReactNode;
266
+ interface LinkChipProps {
267
+ link: WorkItemLink;
268
+ renderIcon?: RenderLinkIcon;
269
+ className?: string;
270
+ }
271
+ /**
272
+ * LinkChip — a compact chip for a WorkItemLink (the task's linked farm record).
273
+ * Shows the snapshotted label (falls back to the entity type), tinted with the
274
+ * primary token so it reads as the mockup's green linked-record chip in the
275
+ * forest theme. Deep-links via `deepLinkSnapshot` when present; the click is
276
+ * stopped from bubbling so it doesn't also open the task.
277
+ */
278
+ declare function LinkChip({ link, renderIcon, className }: LinkChipProps): react.JSX.Element;
279
+
280
+ /**
281
+ * Linear-style task indicators — status, priority, type.
282
+ *
283
+ * A hard rule of the codebase is "semantic tokens only, never raw colors". The
284
+ * default token palette only exposes a handful of hues (primary / secondary /
285
+ * muted / accent / destructive), which is not enough to give each of the six
286
+ * statuses its own distinct color like a raw-palette design would.
287
+ *
288
+ * So — exactly like Linear — status is differentiated primarily by icon SHAPE
289
+ * (dashed → empty → dotted → filled → check), with a subtle muted→primary tone
290
+ * progression, and priority by a filled-BAR count. This reads as a polished PM
291
+ * tool while staying 100% within the semantic-token contract.
292
+ */
293
+ interface StatusMeta {
294
+ icon: ComponentType<LucideProps>;
295
+ /** Icon tone (semantic token). */
296
+ tone: string;
297
+ }
298
+ /**
299
+ * Per-status icon + tone. Shape carries the meaning; tone progresses from muted
300
+ * (not started) toward primary (in flight / done). Overridable by hosts only
301
+ * via the column labels, never by raw color.
302
+ */
303
+ declare const STATUS_META: Record<TaskStatus, StatusMeta>;
304
+ interface StatusIconProps {
305
+ status: TaskStatus;
306
+ className?: string;
307
+ }
308
+ /** A single status glyph — shape-differentiated, token-toned. */
309
+ declare function StatusIcon({ status, className }: StatusIconProps): react.JSX.Element;
310
+ interface StatusPillProps {
311
+ status: TaskStatus;
312
+ className?: string;
313
+ }
314
+ /** Status as a compact bordered pill (icon + label) — used in the list view. */
315
+ declare function StatusPill({ status, className }: StatusPillProps): react.JSX.Element;
316
+ interface PriorityMeta {
317
+ /** Number of filled bars (0–3). */
318
+ level: number;
319
+ /** Fill tone (semantic token) applied to the filled bars + label. */
320
+ tone: string;
321
+ }
322
+ declare const PRIORITY_META: Record<TaskPriority, PriorityMeta>;
323
+ interface PriorityIndicatorProps {
324
+ priority: TaskPriority;
325
+ /** Show the text label next to the bars. */
326
+ showLabel?: boolean;
327
+ className?: string;
328
+ }
329
+ /**
330
+ * Linear-style priority signal — three bars, filled by level. NONE renders all
331
+ * bars faint (its own recognizable "no priority" look).
332
+ */
333
+ declare function PriorityIndicator({ priority, showLabel, className, }: PriorityIndicatorProps): react.JSX.Element;
334
+ interface TypeBadgeProps {
335
+ type: TaskType;
336
+ className?: string;
337
+ }
338
+ /** Work-item type as a subtle badge. */
339
+ declare function TypeBadge({ type, className }: TypeBadgeProps): react.JSX.Element;
340
+
341
+ interface ModalProps {
342
+ open: boolean;
343
+ onClose: () => void;
344
+ children: ReactNode;
345
+ ariaLabel?: string;
346
+ className?: string;
347
+ }
348
+ /** Centered modal card overlay (owned, semantic-token only). */
349
+ declare function Modal(props: ModalProps): react.JSX.Element;
350
+ interface DrawerProps {
351
+ open: boolean;
352
+ onClose: () => void;
353
+ children: ReactNode;
354
+ ariaLabel?: string;
355
+ className?: string;
356
+ }
357
+ /** Right-anchored slide-over drawer overlay (owned, semantic-token only). */
358
+ declare function Drawer(props: DrawerProps): react.JSX.Element;
359
+
360
+ /**
361
+ * Optional host hook: resolve an assignee id to a display name (the SDK has no
362
+ * user directory). When omitted the avatar falls back to id-initials.
363
+ */
364
+ type ResolveAssignee = (assigneeId: string) => {
365
+ name?: string | null;
366
+ } | null | undefined;
367
+ interface TaskCardProps {
368
+ task: Task;
369
+ /** Field names to hide (key/type/priority/labels/storyPoints/assignee/dueDate). */
370
+ hidden?: ReadonlySet<string>;
371
+ onClick?: (task: Task) => void;
372
+ /** Enable native drag (board wires this to move-between-columns). */
373
+ draggable?: boolean;
374
+ onDragStart?: (task: Task, e: DragEvent<HTMLDivElement>) => void;
375
+ onDragEnd?: (task: Task, e: DragEvent<HTMLDivElement>) => void;
376
+ /** True while this card is the one being dragged. */
377
+ dragging?: boolean;
378
+ resolveAssignee?: ResolveAssignee;
379
+ /** Linked farm records for this task (rendered as chips). */
380
+ links?: WorkItemLink[];
381
+ /** Optional host hook to render an icon per linked-entity type. */
382
+ renderLinkIcon?: RenderLinkIcon;
383
+ className?: string;
384
+ }
385
+ /**
386
+ * TaskCard — a Linear-style board card. Presentational + prop-driven; renders
387
+ * only real fields (no invented assignee names or entity links). Semantic
388
+ * tokens only.
389
+ */
390
+ declare function TaskCard({ task, hidden, onClick, draggable, onDragStart, onDragEnd, dragging, resolveAssignee, links, renderLinkIcon, className, }: TaskCardProps): react.JSX.Element;
391
+
181
392
  interface TaskBoardCoreProps {
182
393
  /** Scope the board to one project (client-side filter for Phase 1). */
183
394
  projectId?: string;
184
395
  /** Board columns to render (defaults to DEFAULT_BOARD_COLUMNS). */
185
396
  columns?: BoardColumn[];
186
- /** Read-only mode — hides interactive affordances (no create/drag in Phase 1 either way). */
397
+ /** Read-only mode — disables drag-to-move. */
187
398
  readonly?: boolean;
188
- /** Hide the board header (title + count). */
399
+ /** Hide the board's own header (title + count). */
189
400
  hideHeader?: boolean;
190
- /** Hide the priority/type filter bar. */
401
+ /**
402
+ * @deprecated Filtering is now controlled by the parent toolbar via the
403
+ * `priority`/`type`/`search` props. Accepted for backward compatibility; the
404
+ * board no longer renders its own filter chips.
405
+ */
191
406
  hideFilters?: boolean;
407
+ /** Controlled priority filter ("ALL" or a specific priority). */
408
+ priority?: TaskPriority | "ALL";
409
+ /** Controlled type filter ("ALL" or a specific type). */
410
+ type?: TaskType | "ALL";
411
+ /** Controlled free-text search (matches title/key/labels). */
412
+ search?: string;
413
+ /** Controlled assignee filter (actor id). */
414
+ assigneeId?: string;
192
415
  /**
193
- * Field names to hide on each task card. Product-agnostic hook so hosts can
194
- * suppress fields that don't apply. Supported: 'key' | 'priority' | 'type' |
195
- * 'labels' | 'storyPoints' | 'assignee' | 'dueDate'.
416
+ * Field names to hide on each task card. Supported: 'key' | 'priority' |
417
+ * 'type' | 'labels' | 'storyPoints' | 'assignee' | 'dueDate'.
196
418
  */
197
419
  hiddenFields?: string[];
420
+ /** Optional host hook to resolve an assignee id → display name. */
421
+ resolveAssignee?: ResolveAssignee;
198
422
  /** Called when a task card is clicked. */
199
423
  onTaskClick?: (task: Task) => void;
424
+ /**
425
+ * When set, the board fetches WorkItemLinks for this `sourceProduct` (e.g.
426
+ * "healthybowl") and renders a linked-record chip on each card. Omitted → no
427
+ * link fetch (SDK stays farm-free).
428
+ */
429
+ linkSourceProduct?: string;
430
+ /** Optional host hook to render an icon per linked-entity type. */
431
+ renderLinkIcon?: RenderLinkIcon;
200
432
  /** Extra classes on the root container. */
201
433
  className?: string;
202
434
  /**
@@ -208,12 +440,14 @@ interface TaskBoardCoreProps {
208
440
  /**
209
441
  * TaskBoardCore — provider-less, prop-driven, product-agnostic Kanban board.
210
442
  *
211
- * - Reads Apollo via the ambient `<ApolloProvider>` (BYO). It never creates a
212
- * client and never assumes a router.
443
+ * - Reads Apollo via the ambient `<ApolloProvider>` (BYO). Never creates a
444
+ * client, never assumes a router.
213
445
  * - `workspaceId` comes from a prop or the PlanMagnetProvider context.
214
- * - Read-only in Phase 1 (no drag/create). Farm-free: no Field/Crop logic.
446
+ * - Linear-style columns + cards, with native drag-to-move between columns
447
+ * (optimistic cache update + `UPDATE_WORK_ITEM`; reverts on error). Filtering
448
+ * is controlled by the parent toolbar. Farm-free, semantic-token only.
215
449
  */
216
- declare function TaskBoardCore({ projectId, columns, readonly: _readonly, hideHeader, hideFilters, hiddenFields, onTaskClick, className, workspaceId: workspaceIdProp, }: TaskBoardCoreProps): react.JSX.Element;
450
+ declare function TaskBoardCore({ projectId, columns, readonly, hideHeader, priority, type, search, assigneeId, hiddenFields, resolveAssignee, linkSourceProduct, renderLinkIcon, onTaskClick, className, workspaceId: workspaceIdProp, }: TaskBoardCoreProps): react.JSX.Element;
217
451
 
218
452
  interface TaskBoardProps extends TaskBoardCoreProps {
219
453
  /** Workspace API gateway URL (URL mode). */
@@ -350,7 +584,7 @@ interface CreateTaskProps extends CreateTaskCoreProps {
350
584
  declare function CreateTask({ apiGatewayUrl, authToken, workspaceToken, workspaceId, tenantId, organizationId, trustedOrigins, onAuthError, workspaceClient, ...coreProps }: CreateTaskProps): react.JSX.Element;
351
585
 
352
586
  /** Columns available in the compact list. */
353
- type TaskListColumn = "key" | "title" | "type" | "status" | "priority" | "assignee" | "dueDate" | "storyPoints" | "labels";
587
+ type TaskListColumn = "key" | "title" | "type" | "status" | "priority" | "assignee" | "dueDate" | "storyPoints" | "linkedRecord" | "labels";
354
588
  /** Sort keys for the list. */
355
589
  type TaskListSort = "priority" | "status" | "title" | "type" | "dueDate" | "storyPoints";
356
590
  interface TaskListCoreProps {
@@ -368,14 +602,23 @@ interface TaskListCoreProps {
368
602
  search?: string;
369
603
  /** Columns to render (order preserved). */
370
604
  columns?: TaskListColumn[];
371
- /** Sort key (client-side). */
605
+ /** Initial sort key. */
372
606
  sortBy?: TaskListSort;
373
- /** Sort direction. Defaults to ascending. */
607
+ /** Initial sort direction. Defaults to ascending. */
374
608
  sortDir?: "asc" | "desc";
375
609
  /** Hide the header (title + count). */
376
610
  hideHeader?: boolean;
377
611
  /** Called with the work-item id when a row is clicked. */
378
612
  onSelect?: (id: string) => void;
613
+ /** Optional host hook to resolve an assignee id → display name. */
614
+ resolveAssignee?: ResolveAssignee;
615
+ /**
616
+ * When set, fetch WorkItemLinks for this `sourceProduct` and populate the
617
+ * "linkedRecord" column. Omitted → no link fetch.
618
+ */
619
+ linkSourceProduct?: string;
620
+ /** Optional host hook to render an icon per linked-entity type. */
621
+ renderLinkIcon?: RenderLinkIcon;
379
622
  /** Max items to fetch (pagination.first). Defaults to 200. */
380
623
  limit?: number;
381
624
  /** Extra classes on the root container. */
@@ -386,11 +629,12 @@ interface TaskListCoreProps {
386
629
  /**
387
630
  * TaskListCore — provider-less, prop-driven compact list/table of work items.
388
631
  *
389
- * Same data source as TaskBoardCore (`LIST_WORK_ITEMS`) but a dense table
390
- * layout instead of a kanban. Filters map to the server-side `WorkItemFilter`;
391
- * sort is applied client-side. BYO-Apollo, semantic-token only, farm-free.
632
+ * Same data source as TaskBoardCore (`LIST_WORK_ITEMS`) but a dense, Linear-style
633
+ * table: status pills, priority signal bars, assignee avatars, click-to-sort
634
+ * headers. Filters map to the server-side filter; sort is client-side.
635
+ * BYO-Apollo, semantic-token only, farm-free.
392
636
  */
393
- declare function TaskListCore({ projectId, status, type, priority, assigneeId, search, columns, sortBy, sortDir, hideHeader, onSelect, limit, className, workspaceId: workspaceIdProp, }: TaskListCoreProps): react.JSX.Element;
637
+ declare function TaskListCore({ projectId, status, type, priority, assigneeId, search, columns, sortBy, sortDir, hideHeader, onSelect, resolveAssignee, linkSourceProduct, renderLinkIcon, limit, className, workspaceId: workspaceIdProp, }: TaskListCoreProps): react.JSX.Element;
394
638
 
395
639
  interface TaskListProps extends TaskListCoreProps {
396
640
  /** Workspace API gateway URL (URL mode). */
@@ -431,6 +675,62 @@ interface TaskListProps extends TaskListCoreProps {
431
675
  */
432
676
  declare function TaskList({ apiGatewayUrl, authToken, workspaceToken, workspaceId, tenantId, organizationId, trustedOrigins, onAuthError, workspaceClient, ...coreProps }: TaskListProps): react.JSX.Element;
433
677
 
678
+ type TimelineMode = "week" | "month";
679
+ interface TaskTimelineCoreProps {
680
+ /** Scope the timeline to one project (client-side filter). */
681
+ projectId?: string;
682
+ /** Controlled priority filter ("ALL" or a specific priority). */
683
+ priority?: TaskPriority | "ALL";
684
+ /** Controlled type filter ("ALL" or a specific type). */
685
+ type?: TaskType | "ALL";
686
+ /** Controlled free-text search (matches title/key/labels). */
687
+ search?: string;
688
+ /** Controlled assignee filter (actor id). */
689
+ assigneeId?: string;
690
+ /** Default mode. */
691
+ defaultMode?: TimelineMode;
692
+ /** Called with the work-item id when a task chip is clicked. */
693
+ onSelect?: (id: string) => void;
694
+ /** Optional host hook to resolve an assignee id → display name. */
695
+ resolveAssignee?: ResolveAssignee;
696
+ className?: string;
697
+ workspaceId?: string;
698
+ }
699
+ /**
700
+ * TaskTimelineCore — a week/month schedule of work items by due date.
701
+ *
702
+ * The spec's "week/month timeline that shows when work is scheduled and what's
703
+ * due". We only have a single `dueDate` per work item (no start/end), so this is
704
+ * an agenda-style schedule (chip on its due day) rather than a span Gantt —
705
+ * honest to the data. Overdue and undated work is surfaced explicitly so nothing
706
+ * hides. BYO-Apollo, semantic-token only, farm-free.
707
+ */
708
+ declare function TaskTimelineCore({ projectId, priority, type, search, assigneeId, defaultMode, onSelect, resolveAssignee, className, workspaceId: workspaceIdProp, }: TaskTimelineCoreProps): react.JSX.Element;
709
+
710
+ /** The three task views the toolbar can switch between. */
711
+ type TaskView = "board" | "list" | "timeline";
712
+ interface TaskToolbarProps {
713
+ view: TaskView;
714
+ onViewChange: (view: TaskView) => void;
715
+ /** Which views to offer (order preserved). Defaults to all three. */
716
+ views?: TaskView[];
717
+ search: string;
718
+ onSearchChange: (search: string) => void;
719
+ priority: TaskPriority | "ALL";
720
+ onPriorityChange: (priority: TaskPriority | "ALL") => void;
721
+ type: TaskType | "ALL";
722
+ onTypeChange: (type: TaskType | "ALL") => void;
723
+ onNewTask?: () => void;
724
+ canCreate?: boolean;
725
+ className?: string;
726
+ }
727
+ /**
728
+ * TaskToolbar — the single Linear-style control bar for the Tasks experience:
729
+ * view tabs (Board / List / Timeline) + search + priority/type filters + a
730
+ * "New task" action. Fully controlled; semantic-token only.
731
+ */
732
+ declare function TaskToolbar({ view, onViewChange, views, search, onSearchChange, priority, onPriorityChange, type, onTypeChange, onNewTask, canCreate, className, }: TaskToolbarProps): react.JSX.Element;
733
+
434
734
  /** Fields that can be hidden / suppressed on the detail view + edit form. */
435
735
  type TaskDetailField = "description" | "type" | "status" | "priority" | "assignee" | "dueDate" | "labels" | "storyPoints";
436
736
  interface TaskDetailCoreProps {
@@ -519,22 +819,35 @@ interface TasksPageCoreProps {
519
819
  * omitted the board still renders read-only-ish (create is disabled).
520
820
  */
521
821
  projectId?: string;
522
- /** Scope the board to a single project (client-side filter). */
822
+ /** Scope the views to a single project (client-side filter). */
523
823
  boardProjectId?: string;
524
824
  /** Board columns to render (defaults to DEFAULT_BOARD_COLUMNS). */
525
825
  columns?: BoardColumn[];
526
- /** Read-only — hides the "New task" button and disables detail editing. */
826
+ /** Read-only — hides the "New task" button, disables drag + detail editing. */
527
827
  readonly?: boolean;
528
828
  /**
529
829
  * Field names to hide across the board cards, create form, and detail view.
530
830
  * A product-agnostic hook so hosts can suppress fields that don't apply.
531
831
  */
532
832
  hiddenFields?: TasksPageField[];
533
- /** Hide the board's priority/type filter bar. */
534
- hideFilters?: boolean;
833
+ /** Which views to offer (order preserved). Defaults to all three. */
834
+ views?: TaskView[];
835
+ /** Initial view. Defaults to "board". */
836
+ defaultView?: TaskView;
837
+ /** Optional host hook to resolve an assignee id → display name. */
838
+ resolveAssignee?: ResolveAssignee;
535
839
  /**
536
- * Header/title slot. Pass a string for the default heading, or any node to
537
- * fully own the header area. Omit for no header.
840
+ * When set, the board + list fetch WorkItemLinks for this `sourceProduct`
841
+ * (e.g. "healthybowl") and render linked-record chips / a "Linked Record"
842
+ * column. Omitted → no link fetch (SDK stays farm-free).
843
+ */
844
+ linkSourceProduct?: string;
845
+ /** Optional host hook to render an icon per linked-entity type. */
846
+ renderLinkIcon?: RenderLinkIcon;
847
+ /**
848
+ * Header/title slot rendered ABOVE the toolbar. Pass a string for the default
849
+ * heading, or any node to fully own the title area. Omit for no title (e.g.
850
+ * when the host shell already renders the page title).
538
851
  */
539
852
  header?: ReactNode;
540
853
  /** Called after a successful create OR update (board is refetched first). */
@@ -548,20 +861,14 @@ interface TasksPageCoreProps {
548
861
  }
549
862
  /**
550
863
  * TasksPageCore — a complete, provider-less, BYO-Apollo Tasks experience in a
551
- * single mount. Composes the existing `TaskBoardCore`, `CreateTaskCore`, and
552
- * `TaskDetailCore` so a host app (e.g. HealthyBowl) doesn't have to wire the
553
- * three together itself:
554
- *
555
- * - renders the kanban `TaskBoardCore`,
556
- * - a "New task" button opens `CreateTaskCore` (modal or inline),
557
- * - clicking a card opens `TaskDetailCore` (drawer or inline) with inline edit,
558
- * - `CreateTaskCore.onCreated` + `TaskDetailCore.onUpdated` refetch the board.
864
+ * single mount. A Linear-style shell: one toolbar (Board / List / Timeline tabs
865
+ * + search + priority/type filters + "New task"), the selected view, a create
866
+ * modal, and a click-to-open detail drawer.
559
867
  *
560
- * BYO-Apollo like the sibling cores: reads the ambient `<ApolloProvider>` and
561
- * takes `workspaceId` from a prop or the PlanMagnetProvider context. Semantic
562
- * tokens only, farm-free, strict TS.
868
+ * BYO-Apollo: reads the ambient `<ApolloProvider>` and takes `workspaceId` from
869
+ * a prop or the PlanMagnetProvider context. Semantic tokens only, farm-free.
563
870
  */
564
- declare function TasksPageCore({ workspaceId: workspaceIdProp, projectId, boardProjectId, columns, readonly, hiddenFields, hideFilters, header, onTaskSaved, createSurface, detailSurface, className, }: TasksPageCoreProps): react.JSX.Element;
871
+ declare function TasksPageCore({ workspaceId: workspaceIdProp, projectId, boardProjectId, columns, readonly, hiddenFields, views, defaultView, resolveAssignee, linkSourceProduct, renderLinkIcon, header, onTaskSaved, createSurface, detailSurface, className, }: TasksPageCoreProps): react.JSX.Element;
565
872
 
566
873
  interface TasksPageProps extends TasksPageCoreProps {
567
874
  /** Workspace API gateway URL (URL mode). */
@@ -665,6 +972,20 @@ declare function usePlanMagnetContext(): PlanMagnetContextValue;
665
972
  */
666
973
  declare function usePlanMagnetContextSafe(): PlanMagnetContextValue | null;
667
974
 
975
+ interface UseWorkItemLinksResult {
976
+ /** Links grouped by the work item they belong to. */
977
+ linksByItem: Map<string, WorkItemLink[]>;
978
+ loading: boolean;
979
+ }
980
+ /**
981
+ * useWorkItemLinks — batch-fetch WorkItemLinks for a workspace (scoped to one
982
+ * `sourceProduct`, e.g. "healthybowl") in ONE query and group them by
983
+ * `workItemId`. WorkItem has no `links` field, so the board/list join links to
984
+ * items client-side. Skips entirely when no `sourceProduct` is provided, so the
985
+ * SDK stays farm-free and link-fetching is opt-in per host.
986
+ */
987
+ declare function useWorkItemLinks(workspaceId: string | undefined, sourceProduct: string | undefined, limit?: number): UseWorkItemLinksResult;
988
+
668
989
  interface PlanMagnetClientConfig {
669
990
  /** Workspace API gateway base URL (e.g. https://graphqlworkspaces.burdenoff.com). */
670
991
  apiGatewayUrl: string;
@@ -738,6 +1059,10 @@ declare const GET_PROJECTS: graphql.DocumentNode;
738
1059
  declare const CREATE_WORK_ITEM: graphql.DocumentNode;
739
1060
  declare const UPDATE_WORK_ITEM: graphql.DocumentNode;
740
1061
  declare const MOVE_WORK_ITEM: graphql.DocumentNode;
1062
+ declare const WORK_ITEM_LINK_FIELDS: graphql.DocumentNode;
1063
+ declare const LIST_WORK_ITEM_LINKS: graphql.DocumentNode;
1064
+ declare const CREATE_WORK_ITEM_LINK: graphql.DocumentNode;
1065
+ declare const DELETE_WORK_ITEM_LINK: graphql.DocumentNode;
741
1066
 
742
1067
  /**
743
1068
  * Configuration module for the PlanMagnet SDK.
@@ -805,36 +1130,6 @@ declare function validateTrustedOrigin(trustedOrigins?: string[]): void;
805
1130
  */
806
1131
  declare function getGraphQLEndpoint(baseUrl?: string): string;
807
1132
 
808
- declare const badgeVariants: (props?: ({
809
- variant?: "default" | "muted" | "secondary" | "accent" | "destructive" | null | undefined;
810
- } & class_variance_authority_types.ClassProp) | undefined) => string;
811
- interface BadgeProps extends HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
812
- }
813
- /**
814
- * Badge — a small owned pill primitive used for task status/priority/type.
815
- * Semantic-token only.
816
- */
817
- declare function Badge({ className, variant, ...props }: BadgeProps): react.JSX.Element;
818
-
819
- interface ModalProps {
820
- open: boolean;
821
- onClose: () => void;
822
- children: ReactNode;
823
- ariaLabel?: string;
824
- className?: string;
825
- }
826
- /** Centered modal card overlay (owned, semantic-token only). */
827
- declare function Modal(props: ModalProps): react.JSX.Element;
828
- interface DrawerProps {
829
- open: boolean;
830
- onClose: () => void;
831
- children: ReactNode;
832
- ariaLabel?: string;
833
- className?: string;
834
- }
835
- /** Right-anchored slide-over drawer overlay (owned, semantic-token only). */
836
- declare function Drawer(props: DrawerProps): react.JSX.Element;
837
-
838
1133
  declare function cn(...inputs: ClassValue[]): string;
839
1134
 
840
- export { Badge, type BadgeProps, type BoardColumn, CREATE_WORK_ITEM, CreateTask, CreateTaskCore, type CreateTaskCoreProps, type CreateTaskField, type CreateTaskInput, type CreateTaskProps, DEFAULT_BOARD_COLUMNS, Drawer, type DrawerProps, GET_PROJECTS, GET_WORK_ITEM, LIST_WORK_ITEMS, type ListTasksInput, MOVE_WORK_ITEM, Modal, type ModalProps, PROJECT_SUMMARY_FIELDS, type PlanMagnetClientConfig, type PlanMagnetConfig, PlanMagnetProvider, type PlanMagnetProviderProps, type Project, type ProjectList, TASK_PRIORITIES, TASK_STATUSES, TASK_TYPES, type Task, TaskBoard, TaskBoardCore, type TaskBoardCoreProps, type TaskBoardProps, TaskDetail, TaskDetailCore, type TaskDetailCoreProps, type TaskDetailField, type TaskDetailProps, TaskList, type TaskListColumn, TaskListCore, type TaskListCoreProps, type TaskListProps, type TaskListSort, type TaskPageInfo, type TaskPaginationInput, type TaskPriority, type TaskSavedResult, type TaskStatus, type TaskType, TasksPage, TasksPageCore, type TasksPageCoreProps, type TasksPageField, type TasksPageProps, type TasksPageSaved, UPDATE_WORK_ITEM, type UpdateTaskInput, WORK_ITEM_FIELDS, WORK_ITEM_SUMMARY_FIELDS, type WorkItemDetail, type WorkItemLinkRelation, type WorkItemList, badgeVariants, cn, config, createPlanMagnetClient, enumLabel, getGraphQLEndpoint, getPlanMagnetClient, getPlanMagnetClientSafe, getPlanMagnetConfig, isPlanMagnetClientReady, resetPlanMagnetClient, resetPlanMagnetConfig, setPlanMagnetClient, setPlanMagnetConfig, usePlanMagnetContext, usePlanMagnetContextSafe, validateTrustedOrigin, waitForPlanMagnetClient };
1135
+ export { Avatar, type AvatarProps, Badge, type BadgeProps, type BoardColumn, CREATE_WORK_ITEM, CREATE_WORK_ITEM_LINK, CreateTask, CreateTaskCore, type CreateTaskCoreProps, type CreateTaskField, type CreateTaskInput, type CreateTaskProps, type CreateWorkItemLinkInput, DEFAULT_BOARD_COLUMNS, DELETE_WORK_ITEM_LINK, Drawer, type DrawerProps, GET_PROJECTS, GET_WORK_ITEM, LIST_WORK_ITEMS, LIST_WORK_ITEM_LINKS, LinkChip, type LinkChipProps, type ListTasksInput, type ListWorkItemLinksInput, MOVE_WORK_ITEM, Modal, type ModalProps, PRIORITY_META, PROJECT_SUMMARY_FIELDS, type PlanMagnetClientConfig, type PlanMagnetConfig, PlanMagnetProvider, type PlanMagnetProviderProps, PriorityIndicator, type PriorityIndicatorProps, type Project, type ProjectList, type RenderLinkIcon, type ResolveAssignee, STATUS_META, StatusIcon, type StatusIconProps, StatusPill, type StatusPillProps, TASK_PRIORITIES, TASK_STATUSES, TASK_TYPES, type Task, TaskBoard, TaskBoardCore, type TaskBoardCoreProps, type TaskBoardProps, TaskCard, type TaskCardProps, TaskDetail, TaskDetailCore, type TaskDetailCoreProps, type TaskDetailField, type TaskDetailProps, TaskList, type TaskListColumn, TaskListCore, type TaskListCoreProps, type TaskListProps, type TaskListSort, type TaskPageInfo, type TaskPaginationInput, type TaskPriority, type TaskSavedResult, type TaskStatus, TaskTimelineCore, type TaskTimelineCoreProps, TaskToolbar, type TaskToolbarProps, type TaskType, type TaskView, TasksPage, TasksPageCore, type TasksPageCoreProps, type TasksPageField, type TasksPageProps, type TasksPageSaved, TypeBadge, type TypeBadgeProps, UPDATE_WORK_ITEM, type UpdateTaskInput, type UseWorkItemLinksResult, WORK_ITEM_FIELDS, WORK_ITEM_LINK_FIELDS, WORK_ITEM_SUMMARY_FIELDS, type WorkItemDetail, type WorkItemLink, type WorkItemLinkList, type WorkItemLinkRelation, type WorkItemList, badgeVariants, cn, config, createPlanMagnetClient, enumLabel, getGraphQLEndpoint, getPlanMagnetClient, getPlanMagnetClientSafe, getPlanMagnetConfig, isPlanMagnetClientReady, resetPlanMagnetClient, resetPlanMagnetConfig, setPlanMagnetClient, setPlanMagnetConfig, usePlanMagnetContext, usePlanMagnetContextSafe, useWorkItemLinks, validateTrustedOrigin, waitForPlanMagnetClient };