@gamflaz/opencode-todolist 1.0.4 → 1.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.
Files changed (38) hide show
  1. package/README.md +32 -31
  2. package/dist/icons/{capabilities.d.ts → image-capabilities.d.ts} +1 -1
  3. package/dist/icons/{convert.js → svg-icon.js} +1 -1
  4. package/dist/icons/{icons.d.ts → svg-icons.d.ts} +1 -0
  5. package/dist/icons/{icons.js → svg-icons.js} +1 -0
  6. package/dist/index.d.ts +1 -1
  7. package/dist/index.js +6 -6
  8. package/dist/{schema/store.schema.d.ts → schemas/platform.d.ts} +1 -0
  9. package/dist/{schema/store.schema.js → schemas/platform.js} +1 -0
  10. package/dist/{schema/status.schema.d.ts → schemas/status.d.ts} +2 -0
  11. package/dist/{schema/status.schema.js → schemas/status.js} +8 -0
  12. package/dist/{schema/todo.schema.js → schemas/todo.js} +1 -1
  13. package/dist/{store → storage}/errors.d.ts +1 -0
  14. package/dist/{store → storage}/errors.js +1 -0
  15. package/dist/{store/store.d.ts → storage/todo-store.d.ts} +1 -1
  16. package/dist/{store/store.js → storage/todo-store.js} +2 -2
  17. package/dist/{todo → todos}/display.d.ts +2 -2
  18. package/dist/{todo → todos}/display.js +1 -1
  19. package/dist/{todo → todos}/hint.d.ts +1 -1
  20. package/dist/{todo → todos}/hint.js +2 -2
  21. package/dist/{todo/todo.d.ts → todos/todo-tree.d.ts} +2 -2
  22. package/dist/{todo/todo.js → todos/todo-tree.js} +1 -1
  23. package/dist/{todo → todos}/update.d.ts +2 -2
  24. package/dist/tui/layout.d.ts +18 -0
  25. package/dist/tui/layout.js +22 -0
  26. package/dist/tui/text.d.ts +2 -0
  27. package/dist/tui/text.js +4 -0
  28. package/dist/tui/todo-panel.d.ts +77 -0
  29. package/dist/tui/todo-panel.js +742 -0
  30. package/dist/tui.d.ts +0 -97
  31. package/dist/tui.js +16 -776
  32. package/package.json +7 -2
  33. /package/dist/icons/{capabilities.js → image-capabilities.js} +0 -0
  34. /package/dist/icons/{convert.d.ts → svg-icon.d.ts} +0 -0
  35. /package/dist/{schema/todo.schema.d.ts → schemas/todo.d.ts} +0 -0
  36. /package/dist/skills/{skill.d.ts → loader.d.ts} +0 -0
  37. /package/dist/skills/{skill.js → loader.js} +0 -0
  38. /package/dist/{todo → todos}/update.js +0 -0
package/dist/tui.d.ts CHANGED
@@ -1,100 +1,3 @@
1
1
  import { Plugin } from "@opencode/plugin/tui";
2
- import type { ColorInput, ScrollBoxRenderable } from "@opentui/core";
3
- import type { TodoStatus } from "./schema/status.schema";
4
- import { type TodoDisplaySummary } from "./todo/display";
5
- /** How many open items the Continue prompt lists before collapsing the rest. */
6
- export declare const CONTINUE_PROMPT_MAX_ITEMS = 3;
7
- /** Per-field caps so one long note cannot flood the prompt. */
8
- export declare const CONTINUE_PROMPT_MAX_CONTENT = 60;
9
- export declare const CONTINUE_PROMPT_MAX_NOTE = 60;
10
- export declare function buildContinuePrompt(summary: TodoDisplaySummary | null): string;
11
- /**
12
- * Maximum number of todo rows the panel shows before it starts scrolling.
13
- * Keeping the panel compact protects the composer; scrolling guarantees no
14
- * row is ever silently dropped.
15
- */
16
- export declare const TODO_PANEL_MAX_ROWS = 8;
17
- export interface TodoListRow {
18
- id: number;
19
- content: string;
20
- icon: string;
21
- iconColor: ColorInput;
22
- textColor: ColorInput;
23
- depth: number;
24
- status: TodoStatus;
25
- }
26
- /** Rendered prefix of an error detail row. */
27
- export declare const ERROR_PREFIX = "\u21B3 error: ";
28
- /** A renderable line: either a task row or its on-demand note row. */
29
- export type TodoListEntry = {
30
- kind: "row";
31
- row: TodoListRow;
32
- } | {
33
- kind: "error";
34
- row: TodoListRow;
35
- };
36
- /**
37
- * Flattens rows into renderable lines, inserting an error detail right below
38
- * an expanded error row (click to toggle).
39
- */
40
- export declare function buildTodoListEntries(rows: TodoListRow[], expandedIds: readonly number[]): TodoListEntry[];
41
- /**
42
- * Follow the most advanced active row: the last `in_progress` entry is the
43
- * task currently being executed. Note lines are skipped, they follow their
44
- * own row.
45
- */
46
- export declare function findActiveEntryIndex(entries: TodoListEntry[]): number;
47
- /**
48
- * Rendered width of a row: the indentation, the icon cell and the title.
49
- *
50
- * Rows must be sized explicitly, otherwise the scroll content never grows
51
- * wider than the viewport and horizontal scrolling has nothing to move.
52
- */
53
- export declare function rowWidth(row: {
54
- id?: number;
55
- content: string;
56
- depth: number;
57
- }): number;
58
- /** Rendered width of an expanded error line under its row. */
59
- export declare function errorRowWidth(row: {
60
- error: string;
61
- depth: number;
62
- }): number;
63
- export interface FollowScrollInput {
64
- currentTop: number;
65
- activeIndex: number;
66
- rowCount: number;
67
- viewportHeight: number;
68
- }
69
- /**
70
- * Scroll offset needed to reveal the active row, or `undefined` when nothing
71
- * should move (no active row, already visible, or the list fits).
72
- *
73
- * Kept pure so the follow behaviour is testable without a live renderer.
74
- */
75
- export declare function nextFollowScrollTop(input: FollowScrollInput): number | undefined;
76
- /**
77
- * Follow the most advanced active row: the last `in_progress` entry is the
78
- * task currently being executed.
79
- */
80
- export declare function findActiveRowIndex(rows: {
81
- status: TodoStatus;
82
- }[]): number;
83
- /**
84
- * Presentational, context-free todo list.
85
- *
86
- * The panel is deliberately chrome-free: no indicator row, and the horizontal
87
- * scrollbar stays hidden. Long titles never wrap (that would break the
88
- * one-line-per-row layout) — they are reached by scrolling left/right, and the
89
- * vertical list scrolls when it exceeds `TODO_PANEL_MAX_ROWS`. When a row is
90
- * `in_progress` the panel follows it so the active task is never out of sight.
91
- */
92
- export declare function TodoList(props: {
93
- rows: TodoListRow[];
94
- expandedIds?: readonly number[];
95
- scrollbarColor?: ColorInput;
96
- onToggleRow?: (id: number) => void;
97
- ref?: (el: ScrollBoxRenderable) => void;
98
- }): import("solid-js").JSX.Element;
99
2
  declare const _default: Plugin.Definition;
100
3
  export default _default;