88 isDisposed ,
99 getNextChildId ,
1010 peekNextChildId ,
11+ createRevealOrder as coreRevealOrder ,
1112 createMemo as coreMemo ,
1213 createSignal as coreSignal ,
1314 createOptimistic as coreOptimistic ,
@@ -32,6 +33,7 @@ import {
3233 type SourceAccessor ,
3334 type Store ,
3435 type StoreSetter ,
36+ type RevealOrder ,
3537 createOwner ,
3638 getContext ,
3739 setContext ,
@@ -898,42 +900,40 @@ export const createSignal: {
898900} = ( ( ...args : any [ ] ) => ( _createSignal || coreSignal ) ( ...args ) ) as any ;
899901
900902/**
901- * Lower-level primitive that backs the `<Errored>` flow control.
903+ * Internal primitive that backs the `<Errored>` flow control.
902904 * Catches errors thrown inside `fn` and renders `fallback(error,
903905 * reset)` instead. `error` is an accessor for the latest captured error;
904906 * `reset()` recomputes the failing sources so the boundary can attempt to recover.
905907 *
906- * App code should use `<Errored fallback={...}>` directly — reach for
907- * this only when authoring a custom boundary component.
908+ * App code should use `<Errored fallback={...}>` directly. This primitive is
909+ * kept exported for renderer, test, and compatibility use, but it is not part
910+ * of the recommended application authoring surface.
908911 *
909912 * **Hydration:** if the server serialized an error for this boundary,
910913 * the client re-throws it on the first hydration pass so `fallback`
911914 * renders the same content the server emitted.
912915 *
913- * @example
914- * ```tsx
915- * // Custom boundary built on the primitive — adds telemetry around the
916- * // canonical `<Errored>` shape.
917- * function TracedErrored(props: {
918- * fallback: (e: () => unknown) => JSX.Element;
919- * children: JSX.Element;
920- * }): JSX.Element {
921- * return createErrorBoundary(
922- * () => props.children,
923- * (err, reset) => {
924- * reportError(err());
925- * return props.fallback(err);
926- * }
927- * ) as unknown as JSX.Element;
928- * }
929- * ```
916+ * @internal
930917 */
931918export const createErrorBoundary = ( ( ...args : any [ ] ) =>
932919 ( _createErrorBoundary || coreErrorBoundary ) ( ...args ) ) as < U > (
933920 fn : ( ) => any ,
934921 fallback : ( error : Accessor < unknown > , reset : ( ) => void ) => U
935922) => ( ) => unknown ;
936923
924+ /**
925+ * Internal primitive that backs `<Reveal>` coordination of sibling loading
926+ * boundaries. App code should use `<Reveal>` directly.
927+ *
928+ * @internal
929+ */
930+ export function createRevealOrder < T > (
931+ fn : ( ) => T ,
932+ options ?: { order ?: ( ) => RevealOrder ; collapsed ?: ( ) => boolean }
933+ ) : T {
934+ return coreRevealOrder ( fn , options ) ;
935+ }
936+
937937/**
938938 * Creates an optimistic signal — a `Signal<T>` whose writes are
939939 * tentative inside an `action` transition: they show up immediately,
@@ -1308,22 +1308,14 @@ function scheduleResumeAfterAssets(
13081308}
13091309
13101310/**
1311- * Lower-level primitive that backs the `<Loading>` component. Returns a
1311+ * Internal primitive that backs the `<Loading>` component. Returns a
13121312 * computation that yields `fallback()` while async reads inside `fn` are
1313- * pending, and `fn()` once they have settled. Most callers should use
1314- * `<Loading>` directly; this is exposed for renderers and library authors.
1313+ * pending, and `fn()` once they have settled. App code should use `<Loading>`
1314+ * directly. This primitive is kept exported for renderer, test, and
1315+ * compatibility use, but it is not part of the recommended application
1316+ * authoring surface.
13151317 *
1316- * @example
1317- * ```tsx
1318- * // Custom boundary component built on the primitive. App code uses
1319- * // `<Loading fallback={…}>` directly.
1320- * function MyLoading(props: { fallback: JSX.Element; children: JSX.Element }): JSX.Element {
1321- * return createLoadingBoundary(
1322- * () => props.children,
1323- * () => props.fallback
1324- * ) as unknown as JSX.Element;
1325- * }
1326- * ```
1318+ * @internal
13271319 */
13281320export function createLoadingBoundary (
13291321 fn : ( ) => any ,
0 commit comments