@pokit/tabs-core 0.0.1

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/src/index.ts ADDED
@@ -0,0 +1,87 @@
1
+ /**
2
+ * @pokit/tabs-core
3
+ *
4
+ * Shared logic for CLI tabs adapters (Ink, OpenTUI).
5
+ * Framework-agnostic types, state management, and process handling.
6
+ */
7
+
8
+ // =============================================================================
9
+ // Types
10
+ // =============================================================================
11
+
12
+ export type {
13
+ TabStatus,
14
+ TabProcess,
15
+ StatusIndicator,
16
+ ActivityNode,
17
+ GroupNode,
18
+ EventDrivenState,
19
+ } from './types.js';
20
+
21
+ export {
22
+ MAX_OUTPUT_LINES,
23
+ MAX_LINE_LENGTH,
24
+ BUFFER_WARNING_THRESHOLD,
25
+ STATUS_INDICATORS,
26
+ getStatusIndicator,
27
+ } from './types.js';
28
+
29
+ // =============================================================================
30
+ // Ring Buffer
31
+ // =============================================================================
32
+
33
+ export type { RingBufferOptions, OutputBufferOptions } from './ring-buffer.js';
34
+
35
+ export { RingBuffer, OutputBuffer } from './ring-buffer.js';
36
+
37
+ // =============================================================================
38
+ // State Reducer
39
+ // =============================================================================
40
+
41
+ export {
42
+ createInitialState,
43
+ reducer,
44
+ getTabsGroupActivities,
45
+ findTabsGroup,
46
+ } from './state-reducer.js';
47
+
48
+ // =============================================================================
49
+ // Process Manager
50
+ // =============================================================================
51
+
52
+ export type { TabSpec, ProcessManagerCallbacks, ProcessManagerOptions } from './process-manager.js';
53
+
54
+ export { ProcessManager, OUTPUT_BATCH_MS } from './process-manager.js';
55
+
56
+ // =============================================================================
57
+ // Constants
58
+ // =============================================================================
59
+
60
+ export type { Shortcut, ShortcutGroup } from './constants/index.js';
61
+ export {
62
+ HELP_CONTENT,
63
+ KEY_SEQUENCES,
64
+ ctrlKeyToSequence,
65
+ HELP_HINT_DURATION_MS,
66
+ } from './constants/index.js';
67
+
68
+ // =============================================================================
69
+ // Hooks
70
+ // =============================================================================
71
+
72
+ export type {
73
+ UseTabsStateOptions,
74
+ TabsState,
75
+ TabsActions,
76
+ KeyboardCallbacks,
77
+ KeyboardState,
78
+ NormalizedKeyEvent,
79
+ KeyboardAction,
80
+ } from './hooks/index.js';
81
+
82
+ export {
83
+ useTabsState,
84
+ processKeyEvent,
85
+ useKeyboardCallbackRefs,
86
+ executeKeyboardAction,
87
+ } from './hooks/index.js';