@affectively/aeon-pages-react 0.2.0 → 0.3.0

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.
@@ -64,7 +64,7 @@ export declare function CacheManagementPanel({ onClearCache, }: {
64
64
  /**
65
65
  * Queue Stats Panel
66
66
  */
67
- export declare function QueueStatsPanel({ stats, }: {
67
+ export declare function QueueStatsPanel({ stats }: {
68
68
  stats?: QueueStats;
69
69
  }): ReactNode;
70
70
  /**
@@ -0,0 +1,84 @@
1
+ import { type CSSProperties, type ReactNode } from 'react';
2
+ import type { PresenceScroll, PresenceUser } from '../provider';
3
+ export interface PresenceCursorLayerProps {
4
+ presence: PresenceUser[];
5
+ localUserId?: string;
6
+ width?: number | string;
7
+ height?: number | string;
8
+ className?: string;
9
+ }
10
+ export declare function PresenceCursorLayer({ presence, localUserId, width, height, className, }: PresenceCursorLayerProps): import("react/jsx-runtime").JSX.Element;
11
+ export interface PresenceFocusListProps {
12
+ presence: PresenceUser[];
13
+ localUserId?: string;
14
+ maxItems?: number;
15
+ className?: string;
16
+ }
17
+ export declare function PresenceFocusList({ presence, localUserId, maxItems, className, }: PresenceFocusListProps): import("react/jsx-runtime").JSX.Element;
18
+ export interface PresenceTypingListProps {
19
+ presence: PresenceUser[];
20
+ localUserId?: string;
21
+ className?: string;
22
+ }
23
+ export declare function PresenceTypingList({ presence, localUserId, className, }: PresenceTypingListProps): import("react/jsx-runtime").JSX.Element;
24
+ export interface PresenceSelectionListProps {
25
+ presence: PresenceUser[];
26
+ localUserId?: string;
27
+ className?: string;
28
+ }
29
+ export declare function PresenceSelectionList({ presence, localUserId, className, }: PresenceSelectionListProps): import("react/jsx-runtime").JSX.Element;
30
+ export interface PresenceScrollBarProps {
31
+ presence: PresenceUser[];
32
+ localUserId?: string;
33
+ height?: number;
34
+ className?: string;
35
+ }
36
+ export declare function PresenceScrollBar({ presence, localUserId, height, className, }: PresenceScrollBarProps): import("react/jsx-runtime").JSX.Element;
37
+ export interface PresenceViewportListProps {
38
+ presence: PresenceUser[];
39
+ localUserId?: string;
40
+ className?: string;
41
+ }
42
+ export declare function PresenceViewportList({ presence, localUserId, className, }: PresenceViewportListProps): import("react/jsx-runtime").JSX.Element;
43
+ export interface PresenceInputStateListProps {
44
+ presence: PresenceUser[];
45
+ localUserId?: string;
46
+ className?: string;
47
+ }
48
+ export declare function PresenceInputStateList({ presence, localUserId, className, }: PresenceInputStateListProps): import("react/jsx-runtime").JSX.Element;
49
+ export interface PresenceEmotionListProps {
50
+ presence: PresenceUser[];
51
+ localUserId?: string;
52
+ className?: string;
53
+ }
54
+ export declare function PresenceEmotionList({ presence, localUserId, className, }: PresenceEmotionListProps): import("react/jsx-runtime").JSX.Element;
55
+ export interface PresenceEditingListProps {
56
+ presence: PresenceUser[];
57
+ localUserId?: string;
58
+ className?: string;
59
+ }
60
+ export declare function PresenceEditingList({ presence, localUserId, className, }: PresenceEditingListProps): import("react/jsx-runtime").JSX.Element;
61
+ export interface PresenceStatusListProps {
62
+ presence: PresenceUser[];
63
+ localUserId?: string;
64
+ className?: string;
65
+ }
66
+ export declare function PresenceStatusList({ presence, localUserId, className, }: PresenceStatusListProps): import("react/jsx-runtime").JSX.Element;
67
+ export interface PresenceElementsPanelProps {
68
+ presence: PresenceUser[];
69
+ localUserId?: string;
70
+ className?: string;
71
+ showCursorLayer?: boolean;
72
+ cursorLayerHeight?: number | string;
73
+ }
74
+ export declare function PresenceElementsPanel({ presence, localUserId, className, showCursorLayer, cursorLayerHeight, }: PresenceElementsPanelProps): import("react/jsx-runtime").JSX.Element;
75
+ export interface CollaborativePresenceScrollContainerProps {
76
+ children: ReactNode;
77
+ presence: PresenceUser[];
78
+ localUserId?: string;
79
+ height?: number | string;
80
+ className?: string;
81
+ style?: CSSProperties;
82
+ onScrollStateChange?: (scroll: PresenceScroll) => void;
83
+ }
84
+ export declare function CollaborativePresenceScrollContainer({ children, presence, localUserId, height, className, style, onScrollStateChange, }: CollaborativePresenceScrollContainerProps): import("react/jsx-runtime").JSX.Element;
@@ -10,7 +10,7 @@
10
10
  * - Site = Aeon of sessions (routes are collaborative)
11
11
  * - Federation = Aeon of Aeons (cross-site sync)
12
12
  */
13
- import type { AeonNavigationEngine, NavigationOptions, PrefetchOptions, NavigationState, RoutePresenceInfo } from '@affectively/aeon-pages-runtime';
13
+ import { type AeonNavigationEngine, type NavigationOptions, type PrefetchOptions, type RoutePresenceInfo } from '@affectively/aeon-pages-runtime';
14
14
  export interface NavigationPrediction {
15
15
  route: string;
16
16
  probability: number;
@@ -70,4 +70,3 @@ export declare function useTotalPreload(): {
70
70
  startPreload: (onProgress?: (loaded: number, total: number) => void) => Promise<void>;
71
71
  getStats: () => import("@affectively/aeon-pages-runtime").CacheStats;
72
72
  };
73
- export type { NavigationOptions, PrefetchOptions, NavigationState, RoutePresenceInfo };
@@ -16,7 +16,7 @@
16
16
  * - History API integration (smooth client-side navigation)
17
17
  * - Navigation analytics/tracking
18
18
  */
19
- import { type NavigationOptions } from './useAeonNavigation';
19
+ import type { NavigationOptions } from '@affectively/aeon-pages-runtime';
20
20
  export interface PilotNavigationIntent {
21
21
  id: string;
22
22
  destination: string;
package/dist/hooks.d.ts CHANGED
@@ -45,6 +45,14 @@ export declare function useOfflineStatus(): {
45
45
  pendingOperations: number;
46
46
  lastSyncAt: string | undefined;
47
47
  };
48
+ /**
49
+ * useEmotionPresence - Local + remote optional emotional state channel
50
+ */
51
+ export declare function useEmotionPresence(): {
52
+ localEmotion: import("./provider").PresenceEmotion | undefined;
53
+ others: PresenceUser[];
54
+ updateEmotionState: (emotion: import("./provider").PresenceEmotion) => void;
55
+ };
48
56
  /**
49
57
  * useCollaborativeInput - Hook for collaborative text input
50
58
  *
@@ -70,9 +78,32 @@ export declare function useCollaborativeInput(key: string): {
70
78
  onChange: (newValue: string) => void;
71
79
  onFocus: () => void;
72
80
  onBlur: () => void;
81
+ onSelect: (eventOrTarget: {
82
+ currentTarget: {
83
+ selectionStart: number | null;
84
+ selectionEnd: number | null;
85
+ selectionDirection?: "forward" | "backward" | "none" | null;
86
+ value?: string;
87
+ };
88
+ } | {
89
+ selectionStart: number | null;
90
+ selectionEnd: number | null;
91
+ selectionDirection?: "forward" | "backward" | "none" | null;
92
+ value?: string;
93
+ }) => void;
94
+ onCompositionStart: () => void;
95
+ onCompositionEnd: () => void;
73
96
  isEditing: boolean;
74
97
  editingBy: PresenceUser | undefined;
75
98
  };
99
+ /**
100
+ * useScrollPresenceTracking - Track scroll depth and position
101
+ */
102
+ export declare function useScrollPresenceTracking(enabled?: boolean): void;
103
+ /**
104
+ * useViewportPresenceTracking - Track viewport changes
105
+ */
106
+ export declare function useViewportPresenceTracking(enabled?: boolean): void;
76
107
  /**
77
108
  * useAeonEffect - Run effect when Aeon data changes
78
109
  */
package/dist/index.d.ts CHANGED
@@ -37,9 +37,10 @@
37
37
  * }
38
38
  * ```
39
39
  */
40
- export { Link, type LinkProps, type TransitionType, type PrefetchStrategy, type PresenceRenderProps } from './Link';
41
- export { AeonPageProvider, useAeonPage, type AeonPageProviderProps, type AeonPageContextValue, type PresenceUser, type SyncState, type VersionInfo, } from './provider';
40
+ export { Link, type LinkProps, type TransitionType, type PrefetchStrategy, type PresenceRenderProps, } from './Link';
41
+ export { AeonPageProvider, useAeonPage, type AeonPageProviderProps, type AeonPageContextValue, type PresenceUser, type PresenceSelection, type PresenceTyping, type PresenceScroll, type PresenceViewport, type PresenceInputState, type PresenceEmotion, type SyncState, type VersionInfo, } from './provider';
42
42
  export { usePresence, useAeonSync, useAeonData } from './provider';
43
+ export { useAeonVersion, useAeonTree, useCursorTracking, useEditableElement, useOtherCursors, useOfflineStatus, useEmotionPresence, useCollaborativeInput, useScrollPresenceTracking, useViewportPresenceTracking, useAeonEffect, useSessionId, useRoute, } from './hooks';
43
44
  export { useAeonNavigation, useNavigationPrediction, useLinkObserver, useTotalPreload, useRoutePresence, AeonNavigationContext, type AeonNavigationContextValue, } from './hooks/useAeonNavigation';
44
45
  export { useAeonServiceWorker, usePreloadProgress, useCacheStatus, useManualPreload, usePrefetchRoute, useClearCache, type PreloadProgress, type CacheStatus, } from './hooks/useServiceWorker';
45
46
  export { usePilotNavigation, parseNavigationTags, stripNavigationTags, type PilotNavigationIntent, type PilotNavigationOptions, type PilotNavigationState, } from './hooks/usePilotNavigation';
@@ -48,3 +49,4 @@ export { useConflicts, addConflict, getAllConflicts, clearAllConflicts, type Con
48
49
  export { InstallPrompt, useInstallPrompt, type InstallPromptProps, type InstallPromptState, } from './components/InstallPrompt';
49
50
  export { PushNotifications, usePushNotifications, type PushNotificationsProps, type PushSubscriptionData, type PushNotificationState, type UsePushNotificationsConfig, } from './components/PushNotifications';
50
51
  export { OfflineDiagnostics, NetworkStatusPanel, ServiceWorkerPanel, CacheManagementPanel, QueueStatsPanel, ConflictsPanel, type OfflineDiagnosticsProps, type ServiceWorkerState, type CacheInfo, type QueueStats, } from './components/OfflineDiagnostics';
52
+ export { PresenceCursorLayer, PresenceFocusList, PresenceTypingList, PresenceSelectionList, PresenceScrollBar, PresenceViewportList, PresenceInputStateList, PresenceEmotionList, PresenceEditingList, PresenceStatusList, PresenceElementsPanel, CollaborativePresenceScrollContainer, type PresenceCursorLayerProps, type PresenceFocusListProps, type PresenceTypingListProps, type PresenceSelectionListProps, type PresenceScrollBarProps, type PresenceViewportListProps, type PresenceInputStateListProps, type PresenceEmotionListProps, type PresenceEditingListProps, type PresenceStatusListProps, type PresenceElementsPanelProps, type CollaborativePresenceScrollContainerProps, } from './components/PresenceKit';