solid-js 2.0.0-beta.5 → 2.0.0-beta.6
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/dist/dev.cjs +70 -48
- package/dist/dev.js +64 -51
- package/dist/server.cjs +124 -3
- package/dist/server.js +120 -5
- package/dist/solid.cjs +64 -34
- package/dist/solid.js +58 -37
- package/package.json +2 -2
- package/types/client/core.d.ts +1 -8
- package/types/client/flow.d.ts +22 -0
- package/types/index.d.ts +3 -6
- package/types/jsx.d.ts +156 -122
- package/types/server/flow.d.ts +9 -0
- package/types/server/hydration.d.ts +9 -0
- package/types/server/index.d.ts +1 -1
- package/types/server/shared.d.ts +5 -1
- package/types/server/signals.d.ts +5 -1
package/types/server/flow.d.ts
CHANGED
|
@@ -70,4 +70,13 @@ export declare function Loading(props: {
|
|
|
70
70
|
on?: any;
|
|
71
71
|
children: JSX.Element;
|
|
72
72
|
}): JSX.Element;
|
|
73
|
+
/**
|
|
74
|
+
* Coordinates the reveal timing of sibling `<Loading>` boundaries during SSR.
|
|
75
|
+
* @description https://docs.solidjs.com/reference/components/reveal
|
|
76
|
+
*/
|
|
77
|
+
export declare function Reveal(props: {
|
|
78
|
+
together?: boolean;
|
|
79
|
+
collapsed?: boolean;
|
|
80
|
+
children: JSX.Element;
|
|
81
|
+
}): JSX.Element;
|
|
73
82
|
export {};
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
import type { Context } from "./signals.js";
|
|
1
2
|
import type { JSX } from "../jsx.js";
|
|
2
3
|
export { sharedConfig, NoHydrateContext } from "./shared.js";
|
|
3
4
|
export type { HydrationContext, SSRTemplateObject } from "./shared.js";
|
|
5
|
+
export type ServerRevealGroup = {
|
|
6
|
+
id: string;
|
|
7
|
+
register(key: string, options?: {
|
|
8
|
+
onActivate?: () => void;
|
|
9
|
+
}): boolean;
|
|
10
|
+
onResolved(key: string): void;
|
|
11
|
+
};
|
|
12
|
+
export declare const RevealGroupContext: Context<ServerRevealGroup | null>;
|
|
4
13
|
/**
|
|
5
14
|
* Handles errors during SSR rendering.
|
|
6
15
|
* Returns the promise source for NotReadyError (for async handling),
|
package/types/server/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { $PROXY, $REFRESH, $TRACK, action, createEffect, createMemo, createOptimistic, createOptimisticStore, createErrorBoundary, createOwner, createProjection, createReaction, createRenderEffect, createRoot, createSignal, createStore, createTrackedEffect, deep, flatten, flush, getNextChildId, getObserver, getOwner, isEqual, isRefreshing, isPending, isWrappable, mapArray, merge, omit, onCleanup, onSettled, latest, reconcile, refresh, repeat, resolve, NotReadyError, runWithOwner, snapshot, storePath, createDeepProxy, enableExternalSource, enforceLoadingBoundary, untrack } from "./signals.js";
|
|
1
|
+
export { $PROXY, $REFRESH, $TRACK, action, createEffect, createMemo, createOptimistic, createOptimisticStore, createErrorBoundary, createOwner, createProjection, createReaction, createRenderEffect, createRevealOrder, createRoot, createSignal, createStore, createTrackedEffect, deep, flatten, flush, getNextChildId, getObserver, getOwner, isDisposed, isEqual, isRefreshing, isPending, isWrappable, mapArray, merge, omit, onCleanup, onSettled, latest, reconcile, refresh, repeat, resolve, NotReadyError, runWithOwner, snapshot, storePath, createDeepProxy, enableExternalSource, enforceLoadingBoundary, untrack } from "./signals.js";
|
|
2
2
|
export type { Accessor, ComputeFunction, EffectFunction, EffectOptions, ExternalSource, ExternalSourceConfig, ExternalSourceFactory, Merge, NoInfer, NotWrappable, Omit, Owner, Signal, SignalOptions, Setter, Store, SolidStore, StoreNode, StoreSetter, StorePathRange, ArrayFilterFn, CustomPartial, Part, PathSetter, PatchOp } from "./signals.js";
|
|
3
3
|
export { $DEVCOMP, children, createContext, useContext, ssrRunInScope } from "./core.js";
|
|
4
4
|
export type { ChildrenReturn, Context, ContextProviderComponent, ResolvedChildren, ResolvedJSXElement } from "./core.js";
|
package/types/server/shared.d.ts
CHANGED
|
@@ -19,7 +19,11 @@ export type HydrationContext = {
|
|
|
19
19
|
escape(value: any): string;
|
|
20
20
|
replace: (id: string, replacement: () => any) => void;
|
|
21
21
|
block: (p: Promise<any>) => void;
|
|
22
|
-
registerFragment: (v: string
|
|
22
|
+
registerFragment: (v: string, options?: {
|
|
23
|
+
revealGroup?: string;
|
|
24
|
+
}) => (v?: string, err?: any) => boolean;
|
|
25
|
+
revealFragments?: (groupOrKeys: string | string[]) => void;
|
|
26
|
+
revealFallbacks?: (groupOrKeys: string | string[]) => void;
|
|
23
27
|
/** Register a client-side asset URL discovered during SSR (e.g. from lazy()). */
|
|
24
28
|
registerAsset?: (type: "module" | "style", url: string) => void;
|
|
25
29
|
/** Register a moduleUrl-to-entryUrl mapping for the current boundary. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createRoot, createOwner, runWithOwner, getOwner, onCleanup, getNextChildId, createContext, setContext, getContext, NotReadyError, NoOwnerError, ContextNotFoundError, isEqual, isWrappable, SUPPORTS_PROXY, enableExternalSource, enforceLoadingBoundary } from "@solidjs/signals";
|
|
1
|
+
export { createRoot, createOwner, runWithOwner, getOwner, isDisposed, onCleanup, getNextChildId, createContext, setContext, getContext, NotReadyError, NoOwnerError, ContextNotFoundError, isEqual, isWrappable, SUPPORTS_PROXY, enableExternalSource, enforceLoadingBoundary } from "@solidjs/signals";
|
|
2
2
|
export { flatten } from "@solidjs/signals";
|
|
3
3
|
export { snapshot, merge, omit, storePath, $PROXY, $REFRESH, $TRACK } from "@solidjs/signals";
|
|
4
4
|
export type { Accessor, ComputeFunction, EffectFunction, EffectBundle, EffectOptions, ExternalSource, ExternalSourceConfig, ExternalSourceFactory, MemoOptions, NoInfer, SignalOptions, Setter, Signal, Owner, Maybe, Store, StoreSetter, StoreNode, NotWrappable, SolidStore, Merge, Omit, Context, ContextRecord, IQueue, StorePathRange, ArrayFilterFn, CustomPartial, Part, PathSetter } from "@solidjs/signals";
|
|
@@ -53,6 +53,10 @@ export declare function createErrorBoundary<U>(fn: () => any, fallback: (error:
|
|
|
53
53
|
export declare function createLoadingBoundary(fn: () => any, fallback: () => any, options?: {
|
|
54
54
|
on?: () => any;
|
|
55
55
|
}): () => unknown;
|
|
56
|
+
export declare function createRevealOrder<T>(fn: () => T, _options?: {
|
|
57
|
+
together?: () => boolean;
|
|
58
|
+
collapsed?: () => boolean;
|
|
59
|
+
}): T;
|
|
56
60
|
export declare function untrack<T>(fn: () => T): T;
|
|
57
61
|
export declare function flush(): void;
|
|
58
62
|
export declare function resolve<T>(fn: () => T): Promise<T>;
|