@affectively/aeon-pages-react 0.2.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.
@@ -0,0 +1,50 @@
1
+ /**
2
+ * @affectively/aeon-pages/react
3
+ *
4
+ * React bindings for Aeon Pages - collaborative editing with hooks.
5
+ *
6
+ * The Aeon architecture is recursive (fractal):
7
+ * - Component = Aeon entity
8
+ * - Page = Aeon session
9
+ * - Site = Aeon of sessions (routes are collaborative)
10
+ * - Federation = Aeon of Aeons (cross-site sync)
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * 'use aeon';
15
+ *
16
+ * import { Link, useAeonPage, usePresence, useAeonData } from '@affectively/aeon-pages/react';
17
+ *
18
+ * export default function Page() {
19
+ * const { presence, localUser, updateCursor } = usePresence();
20
+ * const [title, setTitle] = useAeonData<string>('title');
21
+ *
22
+ * return (
23
+ * <div onMouseMove={(e) => updateCursor({ x: e.clientX, y: e.clientY })}>
24
+ * <h1 contentEditable onInput={(e) => setTitle(e.currentTarget.textContent)}>
25
+ * {title || 'Untitled'}
26
+ * </h1>
27
+ *
28
+ * <Link href="/about" prefetch="visible" showPresence>
29
+ * About (3 viewing)
30
+ * </Link>
31
+ *
32
+ * {presence.map((user) => (
33
+ * <Cursor key={user.userId} user={user} />
34
+ * ))}
35
+ * </div>
36
+ * );
37
+ * }
38
+ * ```
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';
42
+ export { usePresence, useAeonSync, useAeonData } from './provider';
43
+ export { useAeonNavigation, useNavigationPrediction, useLinkObserver, useTotalPreload, useRoutePresence, AeonNavigationContext, type AeonNavigationContextValue, } from './hooks/useAeonNavigation';
44
+ export { useAeonServiceWorker, usePreloadProgress, useCacheStatus, useManualPreload, usePrefetchRoute, useClearCache, type PreloadProgress, type CacheStatus, } from './hooks/useServiceWorker';
45
+ export { usePilotNavigation, parseNavigationTags, stripNavigationTags, type PilotNavigationIntent, type PilotNavigationOptions, type PilotNavigationState, } from './hooks/usePilotNavigation';
46
+ export { useNetworkState, type NetworkState, type BandwidthProfile, type NetworkStateResult, } from './hooks/useNetworkState';
47
+ export { useConflicts, addConflict, getAllConflicts, clearAllConflicts, type Conflict, type ConflictStats, type ResolutionStrategy, type UseConflictsResult, } from './hooks/useConflicts';
48
+ export { InstallPrompt, useInstallPrompt, type InstallPromptProps, type InstallPromptState, } from './components/InstallPrompt';
49
+ export { PushNotifications, usePushNotifications, type PushNotificationsProps, type PushSubscriptionData, type PushNotificationState, type UsePushNotificationsConfig, } from './components/PushNotifications';
50
+ export { OfflineDiagnostics, NetworkStatusPanel, ServiceWorkerPanel, CacheManagementPanel, QueueStatsPanel, ConflictsPanel, type OfflineDiagnosticsProps, type ServiceWorkerState, type CacheInfo, type QueueStats, } from './components/OfflineDiagnostics';