File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,10 +23,30 @@ const COMPONENT_LOAD_RETRY_MAX_DELAY_MS = 5_000
2323const COMPONENT_LOAD_RETRY_MAX_FAILURES = 5
2424
2525export interface ReactIslandsLoaderOptions {
26+ /**
27+ * Document to scan and observe.
28+ * @default global document
29+ */
2630 document ?: Document
31+ /**
32+ * CSS selector used to find island hosts.
33+ * @default '[data-fict-react]'
34+ */
2735 selector ?: string
36+ /**
37+ * Enable MutationObserver to auto-mount/dispose and refresh.
38+ * @default true
39+ */
2840 observe ?: boolean
41+ /**
42+ * Fallback client directive when host attribute is missing or invalid.
43+ * @default 'load'
44+ */
2945 defaultClient ?: ClientDirective
46+ /**
47+ * Root margin used by visible strategy observers.
48+ * @default '200px'
49+ */
3050 visibleRootMargin ?: string
3151}
3252
Original file line number Diff line number Diff line change 11import type { BaseProps } from '@fictjs/runtime'
22import type { ComponentType } from 'react'
33
4+ /**
5+ * Controls when the React island mounts on the client.
6+ */
47export type ClientDirective = 'load' | 'idle' | 'visible' | 'only'
58
69export interface ReactInteropOptions {
@@ -30,8 +33,14 @@ export interface ReactInteropOptions {
3033 actionProps ?: string [ ]
3134}
3235
36+ /**
37+ * Static value or lazy accessor used by Fict props.
38+ */
3339export type MaybeAccessor < T > = T | ( ( ) => T )
3440
41+ /**
42+ * Serializable marker payload used to represent a React action callback.
43+ */
3544export interface ReactActionRef {
3645 __fictReactActionMarker : 'fict.react.action.v1'
3746 __fictReactActionQrl : string
You can’t perform that action at this time.
0 commit comments