akanjs 2.2.13-rc.0 → 2.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.
- package/client/csrTypes.ts +37 -6
- package/client/makePageProto.tsx +8 -8
- package/client/router.ts +5 -2
- package/fetch/requestStorage.ts +41 -11
- package/package.json +1 -1
- package/server/cachePolicy.ts +192 -0
- package/server/metadata.tsx +114 -0
- package/server/routeElementComposer.tsx +21 -1
- package/server/routeTreeBuilder.ts +44 -5
- package/server/rscClient.tsx +127 -50
- package/server/rscHttp.ts +120 -0
- package/server/rscNavigationState.ts +95 -0
- package/server/rscWorker.tsx +177 -86
- package/server/rscWorkerHost.ts +47 -1
- package/server/rscWorkerReplay.ts +5 -0
- package/server/ssrFromRscRenderer.tsx +18 -6
- package/server/ssrTypes.ts +2 -1
- package/server/webRouter.ts +114 -110
- package/types/client/csrTypes.d.ts +37 -6
- package/types/fetch/requestStorage.d.ts +16 -6
- package/types/server/cachePolicy.d.ts +55 -0
- package/types/server/metadata.d.ts +13 -0
- package/types/server/routeElementComposer.d.ts +6 -1
- package/types/server/rscHttp.d.ts +16 -0
- package/types/server/rscNavigationState.d.ts +35 -0
- package/types/server/rscWorkerHost.d.ts +9 -0
- package/types/server/rscWorkerReplay.d.ts +6 -0
- package/types/server/ssrFromRscRenderer.d.ts +2 -0
- package/types/server/ssrTypes.d.ts +2 -1
- package/types/server/webRouter.d.ts +22 -1
- package/types/ui/Button.d.ts +1 -1
- package/types/ui/ClientSide.d.ts +1 -1
- package/types/ui/Constant/Doc.d.ts +6 -6
- package/types/ui/Constant/Mermaid.d.ts +1 -1
- package/types/ui/Constant/index.d.ts +1 -1
- package/types/ui/Copy.d.ts +1 -1
- package/types/ui/CsrImage.d.ts +1 -1
- package/types/ui/Data/CardList.d.ts +1 -1
- package/types/ui/Data/Dashboard.d.ts +1 -1
- package/types/ui/Data/Insight.d.ts +1 -1
- package/types/ui/Data/Item.d.ts +6 -6
- package/types/ui/Data/ListContainer.d.ts +1 -1
- package/types/ui/Data/Pagination.d.ts +1 -1
- package/types/ui/Data/TableList.d.ts +1 -1
- package/types/ui/DatePicker.d.ts +3 -3
- package/types/ui/Dialog/Close.d.ts +1 -1
- package/types/ui/Dialog/Content.d.ts +1 -1
- package/types/ui/Dialog/Provider.d.ts +1 -1
- package/types/ui/Dialog/Trigger.d.ts +1 -1
- package/types/ui/Dialog/index.d.ts +3 -3
- package/types/ui/DragAction.d.ts +4 -4
- package/types/ui/DraggableList.d.ts +3 -3
- package/types/ui/Dropdown.d.ts +1 -1
- package/types/ui/Empty.d.ts +1 -1
- package/types/ui/Field.d.ts +22 -22
- package/types/ui/Image.d.ts +1 -1
- package/types/ui/InfiniteScroll.d.ts +1 -1
- package/types/ui/Input.d.ts +6 -6
- package/types/ui/KeyboardAvoiding.d.ts +1 -1
- package/types/ui/Layout/BottomAction.d.ts +1 -1
- package/types/ui/Layout/BottomInset.d.ts +1 -1
- package/types/ui/Layout/BottomTab.d.ts +1 -1
- package/types/ui/Layout/Header.d.ts +1 -1
- package/types/ui/Layout/LeftSider.d.ts +1 -1
- package/types/ui/Layout/Navbar.d.ts +1 -1
- package/types/ui/Layout/RightSider.d.ts +1 -1
- package/types/ui/Layout/Sider.d.ts +1 -1
- package/types/ui/Layout/Template.d.ts +1 -1
- package/types/ui/Layout/TopLeftAction.d.ts +1 -1
- package/types/ui/Layout/Unit.d.ts +1 -1
- package/types/ui/Layout/View.d.ts +1 -1
- package/types/ui/Layout/Zone.d.ts +1 -1
- package/types/ui/Layout/index.d.ts +12 -12
- package/types/ui/Link/Back.d.ts +1 -1
- package/types/ui/Link/Close.d.ts +1 -1
- package/types/ui/Link/CsrLink.d.ts +1 -1
- package/types/ui/Link/Lang.d.ts +1 -1
- package/types/ui/Link/SsrLink.d.ts +1 -1
- package/types/ui/Link/index.d.ts +1 -1
- package/types/ui/Load/Edit.d.ts +1 -1
- package/types/ui/Load/Edit_Client.d.ts +1 -1
- package/types/ui/Load/PageCSR.d.ts +1 -1
- package/types/ui/Load/Pagination.d.ts +1 -1
- package/types/ui/Load/Units.d.ts +1 -1
- package/types/ui/Load/View.d.ts +1 -1
- package/types/ui/Loading/Area.d.ts +1 -1
- package/types/ui/Loading/Button.d.ts +1 -1
- package/types/ui/Loading/Input.d.ts +1 -1
- package/types/ui/Loading/ProgressBar.d.ts +1 -1
- package/types/ui/Loading/Skeleton.d.ts +1 -1
- package/types/ui/Loading/Spin.d.ts +1 -1
- package/types/ui/Loading/index.d.ts +6 -6
- package/types/ui/Menu.d.ts +1 -1
- package/types/ui/Modal.d.ts +1 -1
- package/types/ui/Model/AdminPanel.d.ts +1 -1
- package/types/ui/Model/Edit.d.ts +1 -1
- package/types/ui/Model/EditModal.d.ts +1 -1
- package/types/ui/Model/EditWrapper.d.ts +1 -1
- package/types/ui/Model/LoadInit.d.ts +1 -1
- package/types/ui/Model/New.d.ts +1 -1
- package/types/ui/Model/NewWrapper.d.ts +1 -1
- package/types/ui/Model/NewWrapper_Client.d.ts +1 -1
- package/types/ui/Model/Remove.d.ts +1 -1
- package/types/ui/Model/RemoveWrapper.d.ts +1 -1
- package/types/ui/Model/SureToRemove.d.ts +1 -1
- package/types/ui/Model/View.d.ts +1 -1
- package/types/ui/Model/ViewEditModal.d.ts +1 -1
- package/types/ui/Model/ViewModal.d.ts +1 -1
- package/types/ui/Model/ViewWrapper.d.ts +1 -1
- package/types/ui/More.d.ts +1 -1
- package/types/ui/ObjectId.d.ts +1 -1
- package/types/ui/Popconfirm.d.ts +1 -1
- package/types/ui/Radio.d.ts +2 -2
- package/types/ui/RecentTime.d.ts +1 -1
- package/types/ui/Refresh.d.ts +1 -1
- package/types/ui/ScreenNavigator.d.ts +3 -3
- package/types/ui/Select.d.ts +1 -1
- package/types/ui/Signal/Arg.d.ts +13 -13
- package/types/ui/Signal/Doc.d.ts +6 -6
- package/types/ui/Signal/Listener.d.ts +2 -2
- package/types/ui/Signal/Message.d.ts +4 -4
- package/types/ui/Signal/Object.d.ts +4 -4
- package/types/ui/Signal/PubSub.d.ts +4 -4
- package/types/ui/Signal/Request.d.ts +2 -2
- package/types/ui/Signal/Response.d.ts +3 -3
- package/types/ui/Signal/RestApi.d.ts +5 -5
- package/types/ui/Signal/WebSocket.d.ts +2 -2
- package/types/ui/System/CSR.d.ts +5 -5
- package/types/ui/System/Client.d.ts +8 -8
- package/types/ui/System/Common.d.ts +2 -2
- package/types/ui/System/DevModeToggle.d.ts +1 -1
- package/types/ui/System/Gtag.d.ts +1 -1
- package/types/ui/System/Messages.d.ts +1 -1
- package/types/ui/System/Reconnect.d.ts +1 -1
- package/types/ui/System/Root.d.ts +1 -1
- package/types/ui/System/SSR.d.ts +4 -4
- package/types/ui/System/SelectLanguage.d.ts +1 -1
- package/types/ui/System/ThemeToggle.d.ts +1 -1
- package/types/ui/System/index.d.ts +7 -7
- package/types/ui/Tab/Menu.d.ts +1 -1
- package/types/ui/Tab/Menus.d.ts +1 -1
- package/types/ui/Tab/Panel.d.ts +1 -1
- package/types/ui/Tab/Provider.d.ts +1 -1
- package/types/ui/Tab/index.d.ts +4 -4
- package/types/ui/Table.d.ts +1 -1
- package/types/ui/ToggleSelect.d.ts +2 -2
- package/types/ui/Unauthorized.d.ts +1 -1
- package/types/webkit/useCsrValues.d.ts +1 -1
- package/webkit/bootCsr.tsx +16 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AkanMetadata, Head, ResolvedHead, ResolveHeadResult } from "akanjs/client";
|
|
2
|
+
export declare function isAkanMetadata(value: unknown): value is AkanMetadata;
|
|
3
|
+
export declare function renderMetadata(metadata: AkanMetadata): Head;
|
|
4
|
+
export declare function hasExplicitLanguageAlternates(metadata: AkanMetadata | null | undefined): boolean;
|
|
5
|
+
export declare function shouldRenderLocaleAlternates(options: {
|
|
6
|
+
isSpecialRoute?: boolean;
|
|
7
|
+
hasExplicitLanguageAlternates?: boolean;
|
|
8
|
+
}): boolean;
|
|
9
|
+
export declare function isResolvedHead(value: unknown): value is ResolvedHead;
|
|
10
|
+
export declare function resolveMetadataHead(metadata: AkanMetadata): ResolvedHead;
|
|
11
|
+
export declare function resolveHeadExport(value: Head | AkanMetadata | null | undefined): ResolvedHead;
|
|
12
|
+
export declare function resolveHeadResult(value: ResolveHeadResult): ResolvedHead;
|
|
13
|
+
export declare function normalizeHead(value: Head | AkanMetadata | null | undefined): Head | null | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Head, LayoutFallbackRoute, PathRoute, RouteRender } from "akanjs/client";
|
|
1
|
+
import type { Head, LayoutFallbackRoute, PathRoute, ResolvedHead, RouteRender } from "akanjs/client";
|
|
2
2
|
import { type ReactElement, type ReactNode } from "react";
|
|
3
3
|
export declare class RouteElementComposer {
|
|
4
4
|
#private;
|
|
@@ -12,6 +12,11 @@ export declare class RouteElementComposer {
|
|
|
12
12
|
params: Record<string, string>;
|
|
13
13
|
searchParams: Record<string, string | string[]>;
|
|
14
14
|
}): Promise<Head | null | undefined>;
|
|
15
|
+
static resolveHeadWithMetadata({ pathRoute, params, searchParams, }: {
|
|
16
|
+
pathRoute: PathRoute;
|
|
17
|
+
params: Record<string, string>;
|
|
18
|
+
searchParams: Record<string, string[] | string>;
|
|
19
|
+
}): Promise<ResolvedHead>;
|
|
15
20
|
static composeFallback({ kind, route, params, searchParams, pathname, error, digest, }: {
|
|
16
21
|
kind: "not-found" | "error";
|
|
17
22
|
route: PathRoute | LayoutFallbackRoute;
|
|
@@ -1,2 +1,18 @@
|
|
|
1
1
|
export declare const RSC_CONTENT_TYPE = "text/x-component; charset=utf-8";
|
|
2
|
+
export interface RscRedirectRow {
|
|
3
|
+
rowId: string;
|
|
4
|
+
location?: string;
|
|
5
|
+
method?: "replace" | "push";
|
|
6
|
+
status?: 303 | 307 | 308;
|
|
7
|
+
}
|
|
8
|
+
export declare function encodeAkanRedirectDigest(input: {
|
|
9
|
+
location: string;
|
|
10
|
+
method: "replace" | "push";
|
|
11
|
+
status: 303 | 307 | 308;
|
|
12
|
+
}): string;
|
|
13
|
+
export declare function decodeAkanRedirectDigest(digest: unknown): Omit<RscRedirectRow, "rowId">;
|
|
2
14
|
export declare function isRscPayloadResponse(res: Response): boolean;
|
|
15
|
+
export declare function getRscPayloadStream(res: Response): ReadableStream<Uint8Array> | null;
|
|
16
|
+
export declare function guardRscRedirectRows(stream: ReadableStream<Uint8Array>, options?: {
|
|
17
|
+
onRedirect?: (redirect: RscRedirectRow) => void;
|
|
18
|
+
}): ReadableStream<Uint8Array>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface RscNavigationCache<T> {
|
|
2
|
+
get(key: string): T | undefined;
|
|
3
|
+
set(key: string, value: T): void;
|
|
4
|
+
delete(key: string): boolean;
|
|
5
|
+
keys(): IterableIterator<string>;
|
|
6
|
+
readonly size: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function rememberRscCacheEntry<T>(cache: RscNavigationCache<T>, href: string, thenable: T, maxEntries: number): void;
|
|
9
|
+
export declare function deleteRscCacheEntryIfCurrent<T>(cache: RscNavigationCache<T>, href: string, thenable: T): boolean;
|
|
10
|
+
interface CommitRscNavigationInput<T> {
|
|
11
|
+
cache: RscNavigationCache<T>;
|
|
12
|
+
href: string;
|
|
13
|
+
thenable: T;
|
|
14
|
+
maxEntries: number;
|
|
15
|
+
startTransition: (callback: () => void) => void;
|
|
16
|
+
commitThenable: (thenable: T) => void;
|
|
17
|
+
updateHistory?: () => void;
|
|
18
|
+
scrollToTop?: boolean;
|
|
19
|
+
bumpScrollToTop?: () => void;
|
|
20
|
+
}
|
|
21
|
+
export declare function commitRscNavigation<T>({ cache, href, thenable, maxEntries, startTransition, commitThenable, updateHistory, scrollToTop, bumpScrollToTop, }: CommitRscNavigationInput<T>): void;
|
|
22
|
+
export declare function commitLatestRscNavigation<T>({ navId, getCurrentNavId, ...input }: CommitRscNavigationInput<T> & {
|
|
23
|
+
navId: number;
|
|
24
|
+
getCurrentNavId: () => number;
|
|
25
|
+
}): boolean;
|
|
26
|
+
export declare function observeRscNavigation<T extends PromiseLike<unknown>>({ cache, href, thenable, navId, getCurrentNavId, isExpectedNavigationError, onLatestError, }: {
|
|
27
|
+
cache: RscNavigationCache<T>;
|
|
28
|
+
href: string;
|
|
29
|
+
thenable: T;
|
|
30
|
+
navId: number;
|
|
31
|
+
getCurrentNavId: () => number;
|
|
32
|
+
isExpectedNavigationError?: (error: unknown) => boolean;
|
|
33
|
+
onLatestError: (error: unknown) => void;
|
|
34
|
+
}): void;
|
|
35
|
+
export {};
|
|
@@ -2,6 +2,7 @@ import { type AkanI18nConfig } from "akanjs/common";
|
|
|
2
2
|
import type { AkanTheme } from "akanjs/fetch";
|
|
3
3
|
import type { AkanMetricsReport } from "akanjs/service";
|
|
4
4
|
import type { ClientManifest } from "./artifact.d.ts";
|
|
5
|
+
import type { RouteCacheRenderState } from "./cachePolicy.d.ts";
|
|
5
6
|
import type { SsrLateRedirect } from "./ssrTypes.d.ts";
|
|
6
7
|
import type { BaseBuildArtifact, CssAsset } from "./types.d.ts";
|
|
7
8
|
export interface RscPending {
|
|
@@ -12,18 +13,24 @@ export interface RscPending {
|
|
|
12
13
|
theme?: AkanTheme;
|
|
13
14
|
status?: number;
|
|
14
15
|
}) => void;
|
|
16
|
+
onCacheState?: (state: RouteCacheRenderState) => void;
|
|
15
17
|
onRedirect?: (location: string, method: RscRedirectMethod, status: RscRedirectStatus) => void;
|
|
16
18
|
onLateRedirect?: (location: string, method: RscRedirectMethod, status: RscRedirectStatus) => void;
|
|
17
19
|
onNotFound?: () => void;
|
|
18
20
|
}
|
|
19
21
|
export type RscRedirectMethod = "replace" | "push";
|
|
20
22
|
export type RscRedirectStatus = 303 | 307 | 308;
|
|
23
|
+
export interface RscWorkerInvalidateCacheMessage {
|
|
24
|
+
type: "invalidate-cache";
|
|
25
|
+
reason?: string;
|
|
26
|
+
}
|
|
21
27
|
export type RscRenderResult = {
|
|
22
28
|
type: "stream";
|
|
23
29
|
stream: ReadableStream<Uint8Array>;
|
|
24
30
|
theme?: AkanTheme;
|
|
25
31
|
status?: number;
|
|
26
32
|
lateControl: Promise<SsrLateRedirect | null>;
|
|
33
|
+
cacheState: Promise<RouteCacheRenderState>;
|
|
27
34
|
cancel: (reason?: unknown) => void;
|
|
28
35
|
} | {
|
|
29
36
|
type: "redirect";
|
|
@@ -37,6 +44,7 @@ export declare function getRscHostMaxPendingChunks(value?: string | undefined):
|
|
|
37
44
|
export declare function nextRscHostPendingChunkCount(currentPendingChunks: number, desiredSize: number | null): number;
|
|
38
45
|
export declare function isRscHostPendingChunkOverflow(pendingChunks: number, maxPendingChunks: number): boolean;
|
|
39
46
|
export declare function createIdempotentRscRenderCancel(onCancel: (reason?: unknown) => void): (reason?: unknown) => void;
|
|
47
|
+
export declare function createRscWorkerInvalidateCacheMessage(reason?: string): RscWorkerInvalidateCacheMessage;
|
|
40
48
|
export declare function createRscHostRenderStream(input: {
|
|
41
49
|
setPending: (pending: RscPending) => void;
|
|
42
50
|
deletePending: () => void;
|
|
@@ -94,6 +102,7 @@ export declare class RscWorker {
|
|
|
94
102
|
clientManifest?: ClientManifest;
|
|
95
103
|
signal?: AbortSignal;
|
|
96
104
|
}): Promise<RscRenderResult>;
|
|
105
|
+
invalidateRouteResultCache(reason?: string): void;
|
|
97
106
|
kill(): void;
|
|
98
107
|
getMetrics(): AkanMetricsReport;
|
|
99
108
|
restartWhenIdle(reason: string): boolean;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import type { RouteCacheRenderState } from "./cachePolicy.d.ts";
|
|
1
2
|
export type CachedRscReplayMessage = {
|
|
2
3
|
type: "meta";
|
|
3
4
|
requestId: string;
|
|
4
5
|
theme?: string;
|
|
5
6
|
status?: number;
|
|
7
|
+
} | {
|
|
8
|
+
type: "cache-state";
|
|
9
|
+
requestId: string;
|
|
10
|
+
state: RouteCacheRenderState;
|
|
6
11
|
} | {
|
|
7
12
|
type: "chunk";
|
|
8
13
|
requestId: string;
|
|
@@ -16,6 +21,7 @@ export declare function replayCachedRscResult(input: {
|
|
|
16
21
|
chunks: readonly Uint8Array[];
|
|
17
22
|
theme?: string;
|
|
18
23
|
status?: number;
|
|
24
|
+
cacheState?: RouteCacheRenderState;
|
|
19
25
|
send: (message: CachedRscReplayMessage) => void;
|
|
20
26
|
isCancelled: () => boolean;
|
|
21
27
|
yieldEveryChunks?: number;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type AkanRequestStore } from "akanjs/fetch";
|
|
1
2
|
import type { SsrChunkRegistryStats, SsrFromRscInput, SsrLateRedirect } from "./ssrTypes.d.ts";
|
|
2
3
|
export declare class SsrChunkRegistry<T> {
|
|
3
4
|
#private;
|
|
@@ -28,6 +29,7 @@ export declare function interleaveRscScriptsWithHtml(htmlStream: ReadableStream<
|
|
|
28
29
|
onComplete?: () => void;
|
|
29
30
|
onCancel?: (reason?: unknown) => void;
|
|
30
31
|
request?: Request;
|
|
32
|
+
requestStore?: AkanRequestStore;
|
|
31
33
|
}): ReadableStream<Uint8Array>;
|
|
32
34
|
export declare class SsrFromRscRenderer {
|
|
33
35
|
#private;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AkanTheme } from "akanjs/fetch";
|
|
1
|
+
import type { AkanRequestStore, AkanTheme } from "akanjs/fetch";
|
|
2
2
|
export interface SsrManifestEntry {
|
|
3
3
|
id: string;
|
|
4
4
|
chunks: string[];
|
|
@@ -26,6 +26,7 @@ export interface SsrLateRedirect {
|
|
|
26
26
|
}
|
|
27
27
|
export interface SsrFromRscInput {
|
|
28
28
|
request?: Request;
|
|
29
|
+
requestStore?: AkanRequestStore;
|
|
29
30
|
rscStream: ReadableStream<Uint8Array>;
|
|
30
31
|
ssrManifest: SsrManifest;
|
|
31
32
|
bootstrapModules?: string[];
|
|
@@ -1,13 +1,32 @@
|
|
|
1
1
|
import { type AkanI18nConfig } from "akanjs/common";
|
|
2
|
+
import { type AkanRequestStore } from "akanjs/fetch";
|
|
2
3
|
import type { AkanMetricsReport } from "akanjs/service";
|
|
3
4
|
import { type BuilderRpc, type RouteSeedIndex } from "./artifact.d.ts";
|
|
5
|
+
import { type RouteCacheRenderState } from "./cachePolicy.d.ts";
|
|
4
6
|
import type { HmrWsData, HmrWsHub } from "./hmr/wsHub.d.ts";
|
|
5
7
|
import { type RscRedirectMethod, type RscRedirectStatus, type RscRenderResult, RscWorker } from "./rscWorkerHost.d.ts";
|
|
6
8
|
import type { BaseBuildArtifact, HttpRoutes, RenderState } from "./types.d.ts";
|
|
7
9
|
export declare function createRscRedirectResponse(location: string, method: RscRedirectMethod, status?: RscRedirectStatus): Response;
|
|
8
10
|
export declare function createRscStreamResponse(stream: BodyInit, status?: number): Response;
|
|
9
|
-
export declare function
|
|
11
|
+
export declare function createRscNotFoundFallbackResponse(): Response;
|
|
12
|
+
export declare function cacheHtmlWhileStreaming(stream: ReadableStream<Uint8Array>, onComplete: (html: string) => void, options?: {
|
|
13
|
+
shouldCache?: () => boolean | Promise<boolean>;
|
|
14
|
+
maxBodyBytes?: number | null;
|
|
15
|
+
}): ReadableStream<Uint8Array>;
|
|
10
16
|
export declare function cancelStreamForHeadResponse(stream: ReadableStream<Uint8Array>, reason: unknown): void;
|
|
17
|
+
export declare function resolveHtmlRouteCacheStoreTtl(input: {
|
|
18
|
+
baseTtl: number;
|
|
19
|
+
workerCacheState: RouteCacheRenderState;
|
|
20
|
+
hostRequestStore: AkanRequestStore;
|
|
21
|
+
lateControl?: {
|
|
22
|
+
type: "redirect";
|
|
23
|
+
} | null;
|
|
24
|
+
}): number | null;
|
|
25
|
+
export declare function isHtmlRouteCachePathAllowed(pathname: string, env?: {
|
|
26
|
+
[key: string]: string | undefined;
|
|
27
|
+
AKAN_HTML_RESULT_CACHE_PATHS?: string;
|
|
28
|
+
AKAN_HTML_RESULT_CACHE_EXCLUDE_PATHS?: string;
|
|
29
|
+
}): boolean;
|
|
11
30
|
export declare function createRscNavigationStreamResponse(result: Extract<RscRenderResult, {
|
|
12
31
|
type: "stream";
|
|
13
32
|
}>): Promise<Response>;
|
|
@@ -46,6 +65,8 @@ export declare class WebRouter {
|
|
|
46
65
|
}>;
|
|
47
66
|
dispose(): void;
|
|
48
67
|
getMetrics(): AkanMetricsReport;
|
|
68
|
+
/** @internal Clears local route result caches owned by the host and RSC worker. */
|
|
69
|
+
invalidateRouteCaches(reason?: string): void;
|
|
49
70
|
static create({ upgradeHmrWs }: SsrRoutesInputs): Promise<WebRouter>;
|
|
50
71
|
}
|
|
51
72
|
export {};
|
package/types/ui/Button.d.ts
CHANGED
|
@@ -8,4 +8,4 @@ export type ButtonProps<Result> = Omit<ButtonHTMLAttributes<HTMLButtonElement>,
|
|
|
8
8
|
/** Called after the button briefly enters success state. */
|
|
9
9
|
onSuccess?: (result: Result) => void;
|
|
10
10
|
};
|
|
11
|
-
export declare const Button: <Result = unknown>({ className, children, onClick, onSuccess, ...rest }: ButtonProps<Result>) =>
|
|
11
|
+
export declare const Button: <Result = unknown>({ className, children, onClick, onSuccess, ...rest }: ButtonProps<Result>) => React.JSX.Element;
|
package/types/ui/ClientSide.d.ts
CHANGED
|
@@ -5,4 +5,4 @@ export interface ClientSideProps {
|
|
|
5
5
|
/** Optional Suspense fallback. */
|
|
6
6
|
loading?: ReactNode;
|
|
7
7
|
}
|
|
8
|
-
export declare const ClientSide: ({ children, loading }: ClientSideProps) => import("react
|
|
8
|
+
export declare const ClientSide: ({ children, loading }: ClientSideProps) => import("react").JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type DatabaseSchema, getConstantSchemaDoc, type ScalarSchema } from "./schemaDoc.d.ts";
|
|
2
|
-
declare function Doc(): import("react
|
|
2
|
+
declare function Doc(): import("react").JSX.Element;
|
|
3
3
|
declare namespace Doc {
|
|
4
|
-
var Zone: ({ models, scalars, enums, openAll }: ZoneProps) => import("react
|
|
5
|
-
var Print: ({ models, scalars, enums }: ZoneProps) => import("react
|
|
6
|
-
var Model: ({ refName, database: databaseProp, openAll }: ModelProps) => import("react
|
|
7
|
-
var Scalar: ({ refName, scalar: scalarProp, openAll }: ScalarProps) => import("react
|
|
8
|
-
var Enum: ({ enums }: EnumProps) => import("react
|
|
4
|
+
var Zone: ({ models, scalars, enums, openAll }: ZoneProps) => import("react").JSX.Element;
|
|
5
|
+
var Print: ({ models, scalars, enums }: ZoneProps) => import("react").JSX.Element;
|
|
6
|
+
var Model: ({ refName, database: databaseProp, openAll }: ModelProps) => import("react").JSX.Element | null;
|
|
7
|
+
var Scalar: ({ refName, scalar: scalarProp, openAll }: ScalarProps) => import("react").JSX.Element | null;
|
|
8
|
+
var Enum: ({ enums }: EnumProps) => import("react").JSX.Element;
|
|
9
9
|
}
|
|
10
10
|
export default Doc;
|
|
11
11
|
interface ZoneProps {
|
|
@@ -5,4 +5,4 @@ export interface MermaidProps {
|
|
|
5
5
|
highlightNodes?: string[];
|
|
6
6
|
onSelectNode?: (nodeId: string) => void;
|
|
7
7
|
}
|
|
8
|
-
export declare const Mermaid: ({ chart, title, className, highlightNodes, onSelectNode }: MermaidProps) => import("react
|
|
8
|
+
export declare const Mermaid: ({ chart, title, className, highlightNodes, onSelectNode }: MermaidProps) => import("react").JSX.Element;
|
|
@@ -2,5 +2,5 @@ import Doc from "./Doc.d.ts";
|
|
|
2
2
|
export * from "./schemaDoc.d.ts";
|
|
3
3
|
export declare const Constant: {
|
|
4
4
|
Doc: typeof Doc;
|
|
5
|
-
Mermaid: ({ chart, title, className, highlightNodes, onSelectNode }: import("./Mermaid.d.ts").MermaidProps) => import("react
|
|
5
|
+
Mermaid: ({ chart, title, className, highlightNodes, onSelectNode }: import("./Mermaid.d.ts").MermaidProps) => import("react").JSX.Element;
|
|
6
6
|
};
|
package/types/ui/Copy.d.ts
CHANGED
|
@@ -7,4 +7,4 @@ export interface CopyProps {
|
|
|
7
7
|
/** Copy trigger element. */
|
|
8
8
|
children: ReactNode;
|
|
9
9
|
}
|
|
10
|
-
export declare const Copy: ({ text, copyMessage, children }: CopyProps) => import("react
|
|
10
|
+
export declare const Copy: ({ text, copyMessage, children }: CopyProps) => import("react").JSX.Element;
|
package/types/ui/CsrImage.d.ts
CHANGED
|
@@ -14,5 +14,5 @@ type CsrImageProps = Omit<ImgHTMLAttributes<HTMLImageElement>, "alt" | "src"> &
|
|
|
14
14
|
unoptimized?: boolean;
|
|
15
15
|
fill?: boolean;
|
|
16
16
|
};
|
|
17
|
-
export declare const CsrImage: ({ src, file, className, abstractData, ...props }: CsrImageProps) => import("react
|
|
17
|
+
export declare const CsrImage: ({ src, file, className, abstractData, ...props }: CsrImageProps) => import("react").JSX.Element;
|
|
18
18
|
export {};
|
|
@@ -32,5 +32,5 @@ export default function CardList<T extends string, Input, Full extends {
|
|
|
32
32
|
id: string;
|
|
33
33
|
}, Light extends {
|
|
34
34
|
id: string;
|
|
35
|
-
}, Filter extends FilterInstance>({ className, cardListClassName, init, slice, actions, columns, renderItem, renderLoading, renderTemplate, renderView, renderTitle, }: CardListProps<T, Input, Full, Light, Filter>): import("react
|
|
35
|
+
}, Filter extends FilterInstance>({ className, cardListClassName, init, slice, actions, columns, renderItem, renderLoading, renderTemplate, renderView, renderTitle, }: CardListProps<T, Input, Full, Light, Filter>): import("react").JSX.Element;
|
|
36
36
|
export {};
|
|
@@ -8,4 +8,4 @@ export interface DashboardProps<T extends string, State> {
|
|
|
8
8
|
presents?: string[];
|
|
9
9
|
hidePresents?: boolean;
|
|
10
10
|
}
|
|
11
|
-
export default function Dashboard<T extends string, State>({ className, summary, slice, queryMap, columns, presents, hidePresents, }: DashboardProps<T, State>): import("react
|
|
11
|
+
export default function Dashboard<T extends string, State>({ className, summary, slice, queryMap, columns, presents, hidePresents, }: DashboardProps<T, State>): import("react").JSX.Element;
|
|
@@ -5,5 +5,5 @@ interface InsightProps<T extends string, Insight> {
|
|
|
5
5
|
slice: SliceMeta;
|
|
6
6
|
columns?: (keyof Insight)[];
|
|
7
7
|
}
|
|
8
|
-
export default function Insight<T extends string, Insight>({ className, insight, slice, columns, }: InsightProps<T, Insight>): import("react
|
|
8
|
+
export default function Insight<T extends string, Insight>({ className, insight, slice, columns, }: InsightProps<T, Insight>): import("react").JSX.Element;
|
|
9
9
|
export {};
|
package/types/ui/Data/Item.d.ts
CHANGED
|
@@ -12,13 +12,13 @@ export declare const convToAntdColumn: (column: DataColumn<any>) => {
|
|
|
12
12
|
key: string;
|
|
13
13
|
dataIndex: string;
|
|
14
14
|
title: string;
|
|
15
|
-
render: (date: Dayjs) => import("react
|
|
15
|
+
render: (date: Dayjs) => import("react").JSX.Element;
|
|
16
16
|
responsive?: undefined;
|
|
17
17
|
} | {
|
|
18
18
|
key: string;
|
|
19
19
|
dataIndex: string;
|
|
20
20
|
title: string;
|
|
21
|
-
render: (status: string) => import("react
|
|
21
|
+
render: (status: string) => import("react").JSX.Element;
|
|
22
22
|
responsive?: undefined;
|
|
23
23
|
} | {
|
|
24
24
|
key: string;
|
|
@@ -46,15 +46,15 @@ declare function Item<T extends string, Full extends {
|
|
|
46
46
|
id: string;
|
|
47
47
|
}, Light extends {
|
|
48
48
|
id: string;
|
|
49
|
-
}>({ className, model, slice, onClick, title, actions, columns, children, }: ItemProps<T, Full, Light>): import("react
|
|
49
|
+
}>({ className, model, slice, onClick, title, actions, columns, children, }: ItemProps<T, Full, Light>): import("react").JSX.Element;
|
|
50
50
|
declare namespace Item {
|
|
51
51
|
var StatusTag: ({ status, className }: {
|
|
52
52
|
status: string;
|
|
53
53
|
className?: string;
|
|
54
|
-
}) => import("react
|
|
54
|
+
}) => import("react").JSX.Element;
|
|
55
55
|
var RoleTags: ({ role }: {
|
|
56
56
|
role: string | string[];
|
|
57
|
-
}) => import("react
|
|
57
|
+
}) => import("react").JSX.Element | import("react").JSX.Element[];
|
|
58
58
|
}
|
|
59
59
|
export default Item;
|
|
60
60
|
interface ActionProps<T extends string, M extends {
|
|
@@ -72,4 +72,4 @@ export declare const Action: <T extends string, M extends {
|
|
|
72
72
|
id: string;
|
|
73
73
|
}>({ action, model, slice, outline, }: ActionProps<T, M, L> & {
|
|
74
74
|
outline?: boolean;
|
|
75
|
-
}) => import("react
|
|
75
|
+
}) => import("react").JSX.Element | null | undefined;
|
|
@@ -46,4 +46,4 @@ export default function ListContainer<T extends string, State, Input, Full exten
|
|
|
46
46
|
id: string;
|
|
47
47
|
}, Light extends {
|
|
48
48
|
id: string;
|
|
49
|
-
}>({ className, cardListClassName, type, query, init, create, slice, title, sort, columns, actions, tools, renderDashboard, renderItem, renderTemplate, renderTitle, renderView, renderQueryMaker, renderInsight, renderLoading, }: ListContainerProps<T, State, Input, Full, Light>): import("react
|
|
49
|
+
}>({ className, cardListClassName, type, query, init, create, slice, title, sort, columns, actions, tools, renderDashboard, renderItem, renderTemplate, renderTitle, renderView, renderQueryMaker, renderInsight, renderLoading, }: ListContainerProps<T, State, Input, Full, Light>): import("react").JSX.Element;
|
|
@@ -5,5 +5,5 @@ interface PaginationProps<T extends string> {
|
|
|
5
5
|
/** Generated slice metadata used to read page state and dispatch page changes. */
|
|
6
6
|
slice: SliceMeta;
|
|
7
7
|
}
|
|
8
|
-
export default function Pagination<T extends string>({ className, slice }: PaginationProps<T>): import("react
|
|
8
|
+
export default function Pagination<T extends string>({ className, slice }: PaginationProps<T>): import("react").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -22,5 +22,5 @@ export default function TableList<T extends string, Input, Full extends {
|
|
|
22
22
|
id: string;
|
|
23
23
|
}, Light extends {
|
|
24
24
|
id: string;
|
|
25
|
-
}, Filter extends FilterInstance>({ className, init, queryArgs, slice, columns, actions, renderTemplate, renderTitle, renderView, onItemClick, }: TableListProps<T, Input, Full, Light, Filter>): import("react
|
|
25
|
+
}, Filter extends FilterInstance>({ className, init, queryArgs, slice, columns, actions, renderTemplate, renderTitle, renderView, onItemClick, }: TableListProps<T, Input, Full, Light, Filter>): import("react").JSX.Element;
|
|
26
26
|
export {};
|
package/types/ui/DatePicker.d.ts
CHANGED
|
@@ -11,9 +11,9 @@ interface DatePickerProps {
|
|
|
11
11
|
defaultValue?: Dayjs;
|
|
12
12
|
}
|
|
13
13
|
export declare const DatePicker: {
|
|
14
|
-
({ value, onChange, showTime, format, timeIntervals, disabledDate, placement, className, defaultValue, }: DatePickerProps): import("react
|
|
15
|
-
RangePicker: ({ value, onChange, format, showTime, timeIntervals, disabledDate, className, }: RangePickerProps) => import("react
|
|
16
|
-
TimePicker: ({ disabled, className, value, format, onChange, timeIntervals, }: TimePickerProps) => import("react
|
|
14
|
+
({ value, onChange, showTime, format, timeIntervals, disabledDate, placement, className, defaultValue, }: DatePickerProps): import("react").JSX.Element;
|
|
15
|
+
RangePicker: ({ value, onChange, format, showTime, timeIntervals, disabledDate, className, }: RangePickerProps) => import("react").JSX.Element;
|
|
16
|
+
TimePicker: ({ disabled, className, value, format, onChange, timeIntervals, }: TimePickerProps) => import("react").JSX.Element;
|
|
17
17
|
};
|
|
18
18
|
interface RangePickerProps {
|
|
19
19
|
value: [Dayjs | null, Dayjs | null];
|
|
@@ -3,4 +3,4 @@ export interface CloseProps {
|
|
|
3
3
|
className?: string;
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
}
|
|
6
|
-
export declare const Close: ({ className, children }: CloseProps) => import("react
|
|
6
|
+
export declare const Close: ({ className, children }: CloseProps) => import("react").JSX.Element;
|
|
@@ -3,4 +3,4 @@ export interface ContentProps {
|
|
|
3
3
|
className?: string;
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
}
|
|
6
|
-
export declare const Content: ({ className, children }: ContentProps) => import("react
|
|
6
|
+
export declare const Content: ({ className, children }: ContentProps) => import("react").JSX.Element;
|
|
@@ -8,4 +8,4 @@ export interface ProviderProps {
|
|
|
8
8
|
defaultOpen?: boolean;
|
|
9
9
|
children?: ReactNode;
|
|
10
10
|
}
|
|
11
|
-
export declare const Provider: ({ className, defaultOpen, open, children }: ProviderProps) => import("react
|
|
11
|
+
export declare const Provider: ({ className, defaultOpen, open, children }: ProviderProps) => import("react").JSX.Element;
|
|
@@ -3,4 +3,4 @@ export interface TriggerProps {
|
|
|
3
3
|
className?: string;
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
}
|
|
6
|
-
export declare const Trigger: ({ className, children }: TriggerProps) => import("react
|
|
6
|
+
export declare const Trigger: ({ className, children }: TriggerProps) => import("react").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type ProviderProps } from "./Provider.d.ts";
|
|
2
2
|
export declare const Dialog: {
|
|
3
|
-
({ children, ...props }: ProviderProps): import("react
|
|
3
|
+
({ children, ...props }: ProviderProps): import("react").JSX.Element;
|
|
4
4
|
Modal: ({ className, bodyClassName, confirmClose, children, onCancel }: import("./Modal.d.ts").ModalProps) => import("react").ReactPortal | null;
|
|
5
5
|
Title: ({ children }: import("./Title.d.ts").TitleProps) => null;
|
|
6
6
|
Action: ({ children }: import("./Action.d.ts").ActionProps) => null;
|
|
7
|
-
Trigger: ({ className, children }: import("./Trigger.d.ts").TriggerProps) => import("react
|
|
8
|
-
Content: ({ className, children }: import("./Content.d.ts").ContentProps) => import("react
|
|
7
|
+
Trigger: ({ className, children }: import("./Trigger.d.ts").TriggerProps) => import("react").JSX.Element;
|
|
8
|
+
Content: ({ className, children }: import("./Content.d.ts").ContentProps) => import("react").JSX.Element;
|
|
9
9
|
};
|
package/types/ui/DragAction.d.ts
CHANGED
|
@@ -7,10 +7,10 @@ interface DragActionProps {
|
|
|
7
7
|
onRight?: () => void;
|
|
8
8
|
}
|
|
9
9
|
export declare const DragAction: {
|
|
10
|
-
({ className, children, onClick, onLeft, onRight }: DragActionProps): import("react
|
|
11
|
-
Body: ({ children }: BodyProps) => import("react
|
|
12
|
-
Left: ({ children }: LeftProps) => import("react
|
|
13
|
-
Right: ({ children }: RightProps) => import("react
|
|
10
|
+
({ className, children, onClick, onLeft, onRight }: DragActionProps): import("react").JSX.Element;
|
|
11
|
+
Body: ({ children }: BodyProps) => import("react").JSX.Element;
|
|
12
|
+
Left: ({ children }: LeftProps) => import("react").JSX.Element;
|
|
13
|
+
Right: ({ children }: RightProps) => import("react").JSX.Element;
|
|
14
14
|
};
|
|
15
15
|
interface BodyProps {
|
|
16
16
|
children: ReactNode;
|
|
@@ -24,8 +24,8 @@ interface ItemProps {
|
|
|
24
24
|
removeClassName?: string;
|
|
25
25
|
}
|
|
26
26
|
export declare const DraggableList: {
|
|
27
|
-
<V>({ className, mode, children, onChange, onRemove }: DragListProps<V>): import("react
|
|
28
|
-
Cursor({ className, children }: Cursor): import("react
|
|
29
|
-
Item: ({ value, children, className, cursorClassName, cursor, removable, removeClassName, }: ItemProps) => import("react
|
|
27
|
+
<V>({ className, mode, children, onChange, onRemove }: DragListProps<V>): import("react").JSX.Element;
|
|
28
|
+
Cursor({ className, children }: Cursor): import("react").JSX.Element;
|
|
29
|
+
Item: ({ value, children, className, cursorClassName, cursor, removable, removeClassName, }: ItemProps) => import("react").JSX.Element;
|
|
30
30
|
};
|
|
31
31
|
export {};
|
package/types/ui/Dropdown.d.ts
CHANGED
|
@@ -11,4 +11,4 @@ export interface DropdownProps {
|
|
|
11
11
|
/** Additional classes for the dropdown content panel. */
|
|
12
12
|
dropdownClassName?: string;
|
|
13
13
|
}
|
|
14
|
-
export declare const Dropdown: ({ value, content, className, buttonClassName, dropdownClassName }: DropdownProps) => import("react
|
|
14
|
+
export declare const Dropdown: ({ value, content, className, buttonClassName, dropdownClassName }: DropdownProps) => import("react").JSX.Element;
|
package/types/ui/Empty.d.ts
CHANGED
|
@@ -9,4 +9,4 @@ export interface EmptyProps {
|
|
|
9
9
|
/** Minimum empty-state height in pixels. */
|
|
10
10
|
minHeight?: number;
|
|
11
11
|
}
|
|
12
|
-
export declare const Empty: ({ className, description, children, minHeight }: EmptyProps) => import("react
|
|
12
|
+
export declare const Empty: ({ className, description, children, minHeight }: EmptyProps) => import("react").JSX.Element;
|
package/types/ui/Field.d.ts
CHANGED
|
@@ -26,44 +26,44 @@ export interface FieldProps {
|
|
|
26
26
|
children?: ReactNode;
|
|
27
27
|
}
|
|
28
28
|
export declare const Field: {
|
|
29
|
-
({ className, containerClassName, labelClassName, label, desc, nullable, children, }: FieldProps): import("react
|
|
30
|
-
Label: ({ className, label, desc, unit, nullable, mode }: LabelProps) => import("react
|
|
31
|
-
List: <Item>({ className, labelClassName, label, desc, value, onChange, onAdd, nullable, renderItem, }: ListProps<Item>) => import("react
|
|
32
|
-
Text: import("react").MemoExoticComponent<({ label, desc, labelClassName, className, value, onChange, placeholder, nullable, disabled, minlength, maxlength, transform, validate, onPressEnter, cache, inputClassName, inputStyleType, }: TextProps) => import("react
|
|
33
|
-
Price: import("react").MemoExoticComponent<({ label, desc, labelClassName, className, value, onChange, placeholder, nullable, disabled, minlength, maxlength, transform, validate, onPressEnter, inputClassName, inputStyleType, }: PriceProps) => import("react
|
|
34
|
-
TextArea: import("react").MemoExoticComponent<({ label, desc, labelClassName, className, value, onChange, placeholder, nullable, disabled, rows, minlength, maxlength, transform, validate, onPressEnter, cache, inputClassName, }: TextAreaProps) => import("react
|
|
35
|
-
Switch: ({ label, desc, labelClassName, className, value, onChange, disabled, inputClassName, onDesc, offDesc, }: SwitchProps) => import("react
|
|
36
|
-
ToggleSelect: <I extends string | number | boolean | null>({ className, labelClassName, label, desc, items, value, validate, onChange, nullable, disabled, btnClassName, }: ToggleSelectProps<I>) => import("react
|
|
37
|
-
MultiToggleSelect: <I extends string | number | boolean>({ className, labelClassName, label, desc, items, value, minlength, maxlength, validate, onChange, disabled, }: MultiToggleSelectProps<I>) => import("react
|
|
38
|
-
TextList: ({ label, desc, labelClassName, className, value, onChange, placeholder, disabled, transform, minlength, maxlength, minTextlength, maxTextlength, cache, validate, inputClassName, }: TextListProps) => import("react
|
|
39
|
-
Tags: ({ label, desc, labelClassName, className, value, onChange, placeholder, disabled, transform, minlength, maxlength, minTextlength, maxTextlength, validate, inputClassName, }: TagsProps) => import("react
|
|
40
|
-
Date: <Nullable extends boolean>({ className, labelClassName, nullable, label, desc, value, min, max, onChange, showTime, dateClassName, }: DateProps<Nullable>) => import("react
|
|
41
|
-
DateRange: <Nullable extends boolean>({ className, labelClassName, nullable, label, desc, from, to, min, max, onChangeFrom, onChangeTo, onChange, showTime, }: DateRangeProps<Nullable>) => import("react
|
|
42
|
-
Number: ({ label, desc, labelClassName, className, value, onChange, placeholder, nullable, disabled, min, max, cache, transform, validate, onPressEnter, inputClassName, unit, formatter, parser, }: NumberProps) => import("react
|
|
43
|
-
DoubleNumber: ({ label, desc, labelClassName, className, value, placeholder, nullable, disabled, min, max, inputClassName, cache, separator, onChange, transform, validate, onPressEnter, }: DoubleNumberProps) => import("react
|
|
44
|
-
Email: ({ label, desc, labelClassName, className, value, onChange, cache, placeholder, nullable, disabled, minlength, maxlength, transform, validate, onPressEnter, inputClassName, inputStyleType, }: EmailProps) => import("react
|
|
45
|
-
Phone: ({ label, desc, labelClassName, className, value, onChange, placeholder, nullable, disabled, maxlength, cache, transform, validate, onPressEnter, inputClassName, }: PhoneProps) => import("react
|
|
46
|
-
Password: ({ label, desc, labelClassName, className, value, onChange, cache, confirmValue, onChangeConfirm, placeholder, nullable, disabled, minlength, maxlength, transform, validate, onPressEnter, inputClassName, showConfirm, }: PasswordProps) => import("react
|
|
29
|
+
({ className, containerClassName, labelClassName, label, desc, nullable, children, }: FieldProps): import("react").JSX.Element;
|
|
30
|
+
Label: ({ className, label, desc, unit, nullable, mode }: LabelProps) => import("react").JSX.Element;
|
|
31
|
+
List: <Item>({ className, labelClassName, label, desc, value, onChange, onAdd, nullable, renderItem, }: ListProps<Item>) => import("react").JSX.Element;
|
|
32
|
+
Text: import("react").MemoExoticComponent<({ label, desc, labelClassName, className, value, onChange, placeholder, nullable, disabled, minlength, maxlength, transform, validate, onPressEnter, cache, inputClassName, inputStyleType, }: TextProps) => import("react").JSX.Element>;
|
|
33
|
+
Price: import("react").MemoExoticComponent<({ label, desc, labelClassName, className, value, onChange, placeholder, nullable, disabled, minlength, maxlength, transform, validate, onPressEnter, inputClassName, inputStyleType, }: PriceProps) => import("react").JSX.Element>;
|
|
34
|
+
TextArea: import("react").MemoExoticComponent<({ label, desc, labelClassName, className, value, onChange, placeholder, nullable, disabled, rows, minlength, maxlength, transform, validate, onPressEnter, cache, inputClassName, }: TextAreaProps) => import("react").JSX.Element>;
|
|
35
|
+
Switch: ({ label, desc, labelClassName, className, value, onChange, disabled, inputClassName, onDesc, offDesc, }: SwitchProps) => import("react").JSX.Element;
|
|
36
|
+
ToggleSelect: <I extends string | number | boolean | null>({ className, labelClassName, label, desc, items, value, validate, onChange, nullable, disabled, btnClassName, }: ToggleSelectProps<I>) => import("react").JSX.Element;
|
|
37
|
+
MultiToggleSelect: <I extends string | number | boolean>({ className, labelClassName, label, desc, items, value, minlength, maxlength, validate, onChange, disabled, }: MultiToggleSelectProps<I>) => import("react").JSX.Element;
|
|
38
|
+
TextList: ({ label, desc, labelClassName, className, value, onChange, placeholder, disabled, transform, minlength, maxlength, minTextlength, maxTextlength, cache, validate, inputClassName, }: TextListProps) => import("react").JSX.Element;
|
|
39
|
+
Tags: ({ label, desc, labelClassName, className, value, onChange, placeholder, disabled, transform, minlength, maxlength, minTextlength, maxTextlength, validate, inputClassName, }: TagsProps) => import("react").JSX.Element;
|
|
40
|
+
Date: <Nullable extends boolean>({ className, labelClassName, nullable, label, desc, value, min, max, onChange, showTime, dateClassName, }: DateProps<Nullable>) => import("react").JSX.Element;
|
|
41
|
+
DateRange: <Nullable extends boolean>({ className, labelClassName, nullable, label, desc, from, to, min, max, onChangeFrom, onChangeTo, onChange, showTime, }: DateRangeProps<Nullable>) => import("react").JSX.Element;
|
|
42
|
+
Number: ({ label, desc, labelClassName, className, value, onChange, placeholder, nullable, disabled, min, max, cache, transform, validate, onPressEnter, inputClassName, unit, formatter, parser, }: NumberProps) => import("react").JSX.Element;
|
|
43
|
+
DoubleNumber: ({ label, desc, labelClassName, className, value, placeholder, nullable, disabled, min, max, inputClassName, cache, separator, onChange, transform, validate, onPressEnter, }: DoubleNumberProps) => import("react").JSX.Element;
|
|
44
|
+
Email: ({ label, desc, labelClassName, className, value, onChange, cache, placeholder, nullable, disabled, minlength, maxlength, transform, validate, onPressEnter, inputClassName, inputStyleType, }: EmailProps) => import("react").JSX.Element;
|
|
45
|
+
Phone: ({ label, desc, labelClassName, className, value, onChange, placeholder, nullable, disabled, maxlength, cache, transform, validate, onPressEnter, inputClassName, }: PhoneProps) => import("react").JSX.Element;
|
|
46
|
+
Password: ({ label, desc, labelClassName, className, value, onChange, cache, confirmValue, onChangeConfirm, placeholder, nullable, disabled, minlength, maxlength, transform, validate, onPressEnter, inputClassName, showConfirm, }: PasswordProps) => import("react").JSX.Element;
|
|
47
47
|
Parent: <T extends string, State, Input, Full extends {
|
|
48
48
|
id: string;
|
|
49
49
|
}, Light extends {
|
|
50
50
|
id: string;
|
|
51
|
-
}>({ label, desc, labelClassName, selectClassName, className, nullable, disabled, initArgs, slice, value, onChange, onSearch, sortOption, renderOption, renderSelected, }: ParentProps<T, State, Input, Full, Light>) => import("react
|
|
51
|
+
}>({ label, desc, labelClassName, selectClassName, className, nullable, disabled, initArgs, slice, value, onChange, onSearch, sortOption, renderOption, renderSelected, }: ParentProps<T, State, Input, Full, Light>) => import("react").JSX.Element;
|
|
52
52
|
ParentId: <T extends string, State, Input, Full extends {
|
|
53
53
|
id: string;
|
|
54
54
|
}, Light extends {
|
|
55
55
|
id: string;
|
|
56
|
-
}>({ label, desc, className, selectClassName, labelClassName, nullable, disabled, initArgs, slice, value, onChange, onSearch, sortOption, renderOption, renderSelected, }: ParentIdProps<T, State, Input, Full, Light>) => import("react
|
|
56
|
+
}>({ label, desc, className, selectClassName, labelClassName, nullable, disabled, initArgs, slice, value, onChange, onSearch, sortOption, renderOption, renderSelected, }: ParentIdProps<T, State, Input, Full, Light>) => import("react").JSX.Element;
|
|
57
57
|
Children: <T extends string, State, Input, Full extends {
|
|
58
58
|
id: string;
|
|
59
59
|
}, Light extends {
|
|
60
60
|
id: string;
|
|
61
|
-
}>({ label, desc, labelClassName, selectClassName, className, nullable, disabled, initArgs, slice, value, onChange, onSearch, sortOption, renderOption, renderSelected, }: ChildrenProps<T, State, Input, Full, Light>) => import("react
|
|
61
|
+
}>({ label, desc, labelClassName, selectClassName, className, nullable, disabled, initArgs, slice, value, onChange, onSearch, sortOption, renderOption, renderSelected, }: ChildrenProps<T, State, Input, Full, Light>) => import("react").JSX.Element;
|
|
62
62
|
ChildrenId: <T extends string, State, Input, Full extends {
|
|
63
63
|
id: string;
|
|
64
64
|
}, Light extends {
|
|
65
65
|
id: string;
|
|
66
|
-
}>({ label, desc, labelClassName, className, nullable, disabled, initArgs, slice, value, onChange, onSearch, sortOption, renderOption, }: ChildrenIdProps<T, State, Input, Full, Light>) => import("react
|
|
66
|
+
}>({ label, desc, labelClassName, className, nullable, disabled, initArgs, slice, value, onChange, onSearch, sortOption, renderOption, }: ChildrenIdProps<T, State, Input, Full, Light>) => import("react").JSX.Element;
|
|
67
67
|
};
|
|
68
68
|
interface ListProps<Item> {
|
|
69
69
|
className?: string;
|
package/types/ui/Image.d.ts
CHANGED
|
@@ -7,4 +7,4 @@ export interface InfiniteScrollProps {
|
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
reverse?: boolean;
|
|
9
9
|
}
|
|
10
|
-
export declare const InfiniteScroll: ({ itemsPerPage, currentPage, total, onPageSelect, onAddPage, children, reverse, }: InfiniteScrollProps) => import("react
|
|
10
|
+
export declare const InfiniteScroll: ({ itemsPerPage, currentPage, total, onPageSelect, onAddPage, children, reverse, }: InfiniteScrollProps) => import("react").JSX.Element;
|
package/types/ui/Input.d.ts
CHANGED
|
@@ -25,12 +25,12 @@ export type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "
|
|
|
25
25
|
onPressEscape?: (e: KeyboardEvent<HTMLInputElement>) => void;
|
|
26
26
|
};
|
|
27
27
|
export declare const Input: {
|
|
28
|
-
({ className, nullable, inputRef, value, cacheKey, inputStyleType, icon, iconClassName, inputClassName, inputWrapperClassName, onPressEnter, onPressEscape, onChange, validate, ...rest }: InputProps):
|
|
29
|
-
TextArea: ({ className, nullable, value, inputClassName, inputWrapperClassName, cacheKey, onPressEnter, onPressEscape, onChange, validate, ...rest }: TextAreaProps) =>
|
|
30
|
-
Password: ({ className, nullable, value, icon, iconClassName, inputClassName, inputWrapperClassName, cacheKey, onPressEnter, onPressEscape, onChange, validate, ...rest }: PasswordProps) =>
|
|
31
|
-
Email: ({ inputStyleType, className, nullable, value, cacheKey, onPressEnter, onPressEscape, onChange, validate, icon, iconClassName, inputClassName, inputWrapperClassName, ...rest }: EmailProps) =>
|
|
32
|
-
Number: ({ className, nullable, value, icon, cacheKey, iconClassName, inputClassName, inputWrapperClassName, numberFormat, onPressEnter, onPressEscape, validate, onChange, formatter, parser, ...rest }: NumberProps) =>
|
|
33
|
-
Checkbox: ({ checked, onChange, className, ...rest }: CheckboxProps) =>
|
|
28
|
+
({ className, nullable, inputRef, value, cacheKey, inputStyleType, icon, iconClassName, inputClassName, inputWrapperClassName, onPressEnter, onPressEscape, onChange, validate, ...rest }: InputProps): React.JSX.Element;
|
|
29
|
+
TextArea: ({ className, nullable, value, inputClassName, inputWrapperClassName, cacheKey, onPressEnter, onPressEscape, onChange, validate, ...rest }: TextAreaProps) => React.JSX.Element;
|
|
30
|
+
Password: ({ className, nullable, value, icon, iconClassName, inputClassName, inputWrapperClassName, cacheKey, onPressEnter, onPressEscape, onChange, validate, ...rest }: PasswordProps) => React.JSX.Element;
|
|
31
|
+
Email: ({ inputStyleType, className, nullable, value, cacheKey, onPressEnter, onPressEscape, onChange, validate, icon, iconClassName, inputClassName, inputWrapperClassName, ...rest }: EmailProps) => React.JSX.Element;
|
|
32
|
+
Number: ({ className, nullable, value, icon, cacheKey, iconClassName, inputClassName, inputWrapperClassName, numberFormat, onPressEnter, onPressEscape, validate, onChange, formatter, parser, ...rest }: NumberProps) => React.JSX.Element;
|
|
33
|
+
Checkbox: ({ checked, onChange, className, ...rest }: CheckboxProps) => React.JSX.Element;
|
|
34
34
|
};
|
|
35
35
|
export type TextAreaProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "value" | "type" | "onChange" | "onPressEnter"> & {
|
|
36
36
|
inputRef?: RefObject<HTMLTextAreaElement | null>;
|