@vistagenic/vista 0.2.16 → 0.3.2
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/bin/vista.js +184 -177
- package/dist/ai/agent.d.ts +37 -0
- package/dist/ai/agent.js +385 -0
- package/dist/ai/embeddings.d.ts +11 -0
- package/dist/ai/embeddings.js +71 -0
- package/dist/ai/index.d.ts +10 -0
- package/dist/ai/index.js +26 -0
- package/dist/ai/memory.d.ts +16 -0
- package/dist/ai/memory.js +39 -0
- package/dist/ai/observability.d.ts +21 -0
- package/dist/ai/observability.js +69 -0
- package/dist/ai/providers/anthropic.d.ts +2 -0
- package/dist/ai/providers/anthropic.js +190 -0
- package/dist/ai/providers/base.d.ts +7 -0
- package/dist/ai/providers/base.js +85 -0
- package/dist/ai/providers/gemini.d.ts +2 -0
- package/dist/ai/providers/gemini.js +194 -0
- package/dist/ai/providers/index.d.ts +5 -0
- package/dist/ai/providers/index.js +21 -0
- package/dist/ai/providers/mock.d.ts +8 -0
- package/dist/ai/providers/mock.js +77 -0
- package/dist/ai/providers/openai.d.ts +2 -0
- package/dist/ai/providers/openai.js +211 -0
- package/dist/ai/rag.d.ts +35 -0
- package/dist/ai/rag.js +110 -0
- package/dist/ai/react/index.d.ts +1 -0
- package/dist/ai/react/index.js +17 -0
- package/dist/ai/react/react-server.d.ts +1 -0
- package/dist/ai/react/react-server.js +17 -0
- package/dist/ai/react/use-agent.d.ts +23 -0
- package/dist/ai/react/use-agent.js +138 -0
- package/dist/ai/stream.d.ts +24 -0
- package/dist/ai/stream.js +109 -0
- package/dist/ai/tool.d.ts +11 -0
- package/dist/ai/tool.js +47 -0
- package/dist/ai/types.d.ts +117 -0
- package/dist/ai/types.js +5 -0
- package/dist/auth/core.d.ts +140 -0
- package/dist/auth/core.js +165 -0
- package/dist/auth/index.d.ts +20 -8
- package/dist/auth/index.js +369 -16
- package/dist/auth/react-server.d.ts +1 -0
- package/dist/auth/react-server.js +10 -0
- package/dist/auth/react.d.ts +18 -0
- package/dist/auth/react.js +71 -0
- package/dist/bin/build-rsc.js +602 -604
- package/dist/bin/build.js +389 -388
- package/dist/bin/deploy-output.d.ts +2 -7
- package/dist/bin/deploy-output.js +3 -76
- package/dist/bin/deploy.d.ts +7 -0
- package/dist/bin/deploy.js +102 -0
- package/dist/bin/dev-error-overlay-snippet.js +778 -552
- package/dist/bin/devtools-indicator-snippet.js +387 -387
- package/dist/bin/generate.js +510 -248
- package/dist/build/manifest.d.ts +169 -139
- package/dist/build/manifest.js +423 -367
- package/dist/build/rsc/client-manifest.d.ts +62 -52
- package/dist/build/rsc/client-manifest.js +295 -193
- package/dist/build/rsc/client-reference-plugin.d.ts +37 -37
- package/dist/build/rsc/client-reference-plugin.js +160 -160
- package/dist/build/rsc/native-scanner.d.ts +135 -123
- package/dist/build/rsc/native-scanner.js +203 -170
- package/dist/build/rsc/react-client-reference-manifest.d.ts +28 -22
- package/dist/build/rsc/react-client-reference-manifest.js +240 -219
- package/dist/build/rsc/rsc-renderer.d.ts +99 -99
- package/dist/build/rsc/rsc-renderer.js +263 -263
- package/dist/build/rsc/server-component-loader.d.ts +19 -19
- package/dist/build/rsc/server-component-loader.js +91 -91
- package/dist/build/rsc/server-manifest.d.ts +17 -0
- package/dist/build/rsc/server-manifest.js +20 -0
- package/dist/build/standalone.js +337 -334
- package/dist/build/webpack/plugins/vista-flight-plugin.js +5 -5
- package/dist/client/dynamic.react-server.d.ts +2 -0
- package/dist/client/dynamic.react-server.js +23 -0
- package/dist/client/link.react-server.d.ts +2 -0
- package/dist/client/link.react-server.js +11 -0
- package/dist/client/navigation.react-server.d.ts +1 -0
- package/dist/client/navigation.react-server.js +17 -0
- package/dist/client/router.react-server.d.ts +1 -0
- package/dist/client/router.react-server.js +17 -0
- package/dist/client/rsc-router.react-server.d.ts +1 -0
- package/dist/client/rsc-router.react-server.js +17 -0
- package/dist/client/script.react-server.d.ts +2 -0
- package/dist/client/script.react-server.js +23 -0
- package/dist/components/client-island.d.ts +34 -34
- package/dist/components/client-island.js +75 -75
- package/dist/config.d.ts +17 -0
- package/dist/config.js +60 -1
- package/dist/deploy/adapters/cloudflare.d.ts +2 -0
- package/dist/deploy/adapters/cloudflare.js +124 -0
- package/dist/deploy/adapters/docker.d.ts +2 -0
- package/dist/deploy/adapters/docker.js +112 -0
- package/dist/deploy/adapters/index.d.ts +15 -0
- package/dist/deploy/adapters/index.js +24 -0
- package/dist/deploy/adapters/netlify.d.ts +2 -0
- package/dist/deploy/adapters/netlify.js +115 -0
- package/dist/deploy/adapters/render.d.ts +2 -0
- package/dist/deploy/adapters/render.js +95 -0
- package/dist/deploy/adapters/vercel.d.ts +7 -0
- package/dist/deploy/adapters/vercel.js +164 -0
- package/dist/deploy/cli-runner.d.ts +8 -0
- package/dist/deploy/cli-runner.js +58 -0
- package/dist/deploy/detect.d.ts +6 -0
- package/dist/deploy/detect.js +77 -0
- package/dist/deploy/index.d.ts +24 -0
- package/dist/deploy/index.js +112 -0
- package/dist/deploy/preflight.d.ts +8 -0
- package/dist/deploy/preflight.js +80 -0
- package/dist/deploy/types.d.ts +48 -0
- package/dist/deploy/types.js +2 -0
- package/dist/deploy/utils.d.ts +18 -0
- package/dist/deploy/utils.js +70 -0
- package/dist/dev-error.d.ts +14 -0
- package/dist/dev-error.js +1763 -705
- package/dist/index.d.ts +23 -21
- package/dist/index.js +61 -57
- package/dist/server/cookie-parse.d.ts +4 -0
- package/dist/server/cookie-parse.js +14 -0
- package/dist/server/engine.js +7 -26
- package/dist/server/index.d.ts +109 -102
- package/dist/server/index.js +315 -286
- package/dist/server/middleware-runner.d.ts +125 -57
- package/dist/server/middleware-runner.js +615 -218
- package/dist/server/middleware-security.d.ts +36 -0
- package/dist/server/middleware-security.js +183 -0
- package/dist/server/module-compile-hook.js +695 -662
- package/dist/server/route-handler-registry.d.ts +65 -0
- package/dist/server/route-handler-registry.js +195 -0
- package/dist/server/route-patterns.d.ts +67 -0
- package/dist/server/route-patterns.js +186 -0
- package/dist/server/rsc-engine.js +75 -92
- package/dist/server/rsc-module-system.d.ts +33 -33
- package/dist/server/rsc-module-system.js +87 -87
- package/dist/server/rsc-upstream.js +892 -888
- package/dist/server/static-generator.js +10 -10
- package/dist/server/typed-api-runtime.d.ts +18 -0
- package/dist/server/typed-api-runtime.js +635 -507
- package/dist/server/vista-import-map.js +134 -123
- package/dist/stack/index.d.ts +34 -32
- package/dist/stack/index.js +49 -45
- package/dist/stack/server/caller.d.ts +13 -0
- package/dist/stack/server/caller.js +42 -0
- package/dist/stack/server/executor.d.ts +40 -36
- package/dist/stack/server/executor.js +222 -174
- package/dist/stack/server/index.d.ts +11 -10
- package/dist/stack/server/index.js +24 -23
- package/dist/stack/server/procedure.d.ts +20 -18
- package/dist/stack/server/procedure.js +66 -58
- package/dist/stack/server/types.d.ts +113 -100
- package/dist/theme/react-server.d.ts +10 -0
- package/dist/theme/react-server.js +16 -0
- package/package.json +28 -3
- package/LICENSE +0 -21
|
@@ -1,58 +1,66 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createProcedureBuilder = createProcedureBuilder;
|
|
4
|
-
exports.isOperation = isOperation;
|
|
5
|
-
function cloneState(state) {
|
|
6
|
-
return {
|
|
7
|
-
schema: state?.schema,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createProcedureBuilder = createProcedureBuilder;
|
|
4
|
+
exports.isOperation = isOperation;
|
|
5
|
+
function cloneState(state) {
|
|
6
|
+
return {
|
|
7
|
+
schema: state?.schema,
|
|
8
|
+
outputSchema: state?.outputSchema,
|
|
9
|
+
middlewares: [...(state?.middlewares ?? [])],
|
|
10
|
+
outputFormat: state?.outputFormat ?? 'json',
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
function createOperation(type, state, handler) {
|
|
14
|
+
return {
|
|
15
|
+
type,
|
|
16
|
+
schema: state.schema,
|
|
17
|
+
outputSchema: state.outputSchema,
|
|
18
|
+
handler,
|
|
19
|
+
middlewares: [...state.middlewares],
|
|
20
|
+
outputFormat: state.outputFormat,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function createProcedureBuilder(state) {
|
|
24
|
+
const currentState = cloneState(state);
|
|
25
|
+
return {
|
|
26
|
+
use(middleware) {
|
|
27
|
+
return createProcedureBuilder({
|
|
28
|
+
...currentState,
|
|
29
|
+
middlewares: [...currentState.middlewares, middleware],
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
input(schema) {
|
|
33
|
+
return createProcedureBuilder({
|
|
34
|
+
...currentState,
|
|
35
|
+
schema,
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
output(schema) {
|
|
39
|
+
return createProcedureBuilder({
|
|
40
|
+
...currentState,
|
|
41
|
+
outputSchema: schema,
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
query(handler) {
|
|
45
|
+
return createOperation('get', currentState, handler);
|
|
46
|
+
},
|
|
47
|
+
mutation(handler) {
|
|
48
|
+
return createOperation('post', currentState, handler);
|
|
49
|
+
},
|
|
50
|
+
get(handler) {
|
|
51
|
+
return createOperation('get', currentState, handler);
|
|
52
|
+
},
|
|
53
|
+
post(handler) {
|
|
54
|
+
return createOperation('post', currentState, handler);
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function isOperation(value) {
|
|
59
|
+
if (!value || typeof value !== 'object') {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
const candidate = value;
|
|
63
|
+
return ((candidate.type === 'get' || candidate.type === 'post') &&
|
|
64
|
+
typeof candidate.handler === 'function' &&
|
|
65
|
+
Array.isArray(candidate.middlewares));
|
|
66
|
+
}
|
|
@@ -1,100 +1,113 @@
|
|
|
1
|
-
export type MaybePromise<T> = T | Promise<T>;
|
|
2
|
-
export type StackSerializationMode = 'json' | 'superjson';
|
|
3
|
-
export interface SchemaLike<T = unknown> {
|
|
4
|
-
parse(value: unknown): T;
|
|
5
|
-
}
|
|
6
|
-
export type InferSchemaInput<TSchema> = TSchema extends SchemaLike<infer T> ? T : void;
|
|
7
|
-
export type Prettify<T> = {
|
|
8
|
-
[K in keyof T]: T[K];
|
|
9
|
-
} & {};
|
|
10
|
-
export type UnionToIntersection<TUnion> = (TUnion extends unknown ? (value: TUnion) => void : never) extends (value: infer TIntersection) => void ? TIntersection : never;
|
|
11
|
-
type JoinPath<TLeft extends string, TRight extends string> = TLeft extends '' ? TRight : `${TLeft}/${TRight}`;
|
|
12
|
-
export interface
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
export
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
export
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
export type
|
|
68
|
-
export
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
1
|
+
export type MaybePromise<T> = T | Promise<T>;
|
|
2
|
+
export type StackSerializationMode = 'json' | 'superjson';
|
|
3
|
+
export interface SchemaLike<T = unknown> {
|
|
4
|
+
parse(value: unknown): T;
|
|
5
|
+
}
|
|
6
|
+
export type InferSchemaInput<TSchema> = TSchema extends SchemaLike<infer T> ? T : void;
|
|
7
|
+
export type Prettify<T> = {
|
|
8
|
+
[K in keyof T]: T[K];
|
|
9
|
+
} & {};
|
|
10
|
+
export type UnionToIntersection<TUnion> = (TUnion extends unknown ? (value: TUnion) => void : never) extends (value: infer TIntersection) => void ? TIntersection : never;
|
|
11
|
+
type JoinPath<TLeft extends string, TRight extends string> = TLeft extends '' ? TRight : `${TLeft}/${TRight}`;
|
|
12
|
+
export interface StackCookieStore {
|
|
13
|
+
get(name: string): {
|
|
14
|
+
name: string;
|
|
15
|
+
value: string;
|
|
16
|
+
} | undefined;
|
|
17
|
+
getAll(): Array<{
|
|
18
|
+
name: string;
|
|
19
|
+
value: string;
|
|
20
|
+
}>;
|
|
21
|
+
has(name: string): boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface StackRequestLike {
|
|
24
|
+
method?: string;
|
|
25
|
+
path?: string;
|
|
26
|
+
query?: Record<string, unknown>;
|
|
27
|
+
body?: unknown;
|
|
28
|
+
headers?: Record<string, string | string[] | undefined>;
|
|
29
|
+
cookies?: StackCookieStore;
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
}
|
|
32
|
+
export interface StackResponseToolkit {
|
|
33
|
+
json<T>(data: T, init?: number | ResponseInit): Response;
|
|
34
|
+
text(data: string, init?: number | ResponseInit): Response;
|
|
35
|
+
superjson<T>(data: T, init?: number | ResponseInit): Response;
|
|
36
|
+
}
|
|
37
|
+
export interface ProcedureHandlerParams<TCtx, TInput, TEnv> {
|
|
38
|
+
ctx: TCtx;
|
|
39
|
+
input: TInput;
|
|
40
|
+
env: TEnv;
|
|
41
|
+
req: StackRequestLike;
|
|
42
|
+
c: StackResponseToolkit;
|
|
43
|
+
}
|
|
44
|
+
export type ProcedureHandler<TCtx, TInput, TEnv, TOutput> = (params: ProcedureHandlerParams<TCtx, TInput, TEnv>) => MaybePromise<TOutput>;
|
|
45
|
+
export interface MiddlewareParams<TCtx, TEnv> {
|
|
46
|
+
ctx: TCtx;
|
|
47
|
+
env: TEnv;
|
|
48
|
+
req: StackRequestLike;
|
|
49
|
+
c: StackResponseToolkit;
|
|
50
|
+
next<TAdded extends Record<string, unknown> = {}>(extension?: TAdded): Promise<TCtx & TAdded>;
|
|
51
|
+
}
|
|
52
|
+
export type MiddlewareFunction<TCtx = {}, TReturn = void, TEnv = unknown> = (params: MiddlewareParams<TCtx, TEnv>) => MaybePromise<TReturn | void>;
|
|
53
|
+
export type NormalizeMiddlewareResult<TValue> = TValue extends void | undefined ? {} : TValue extends Record<string, unknown> ? TValue : {};
|
|
54
|
+
export interface OperationBase<TInput, TOutput, TCtx, TEnv> {
|
|
55
|
+
schema?: SchemaLike<TInput>;
|
|
56
|
+
outputSchema?: SchemaLike<TOutput>;
|
|
57
|
+
handler: ProcedureHandler<TCtx, TInput, TEnv, TOutput>;
|
|
58
|
+
middlewares: MiddlewareFunction<any, any, TEnv>[];
|
|
59
|
+
outputFormat: 'json';
|
|
60
|
+
}
|
|
61
|
+
export interface GetOperation<TInput = void, TOutput = unknown, TCtx = {}, TEnv = unknown> extends OperationBase<TInput, TOutput, TCtx, TEnv> {
|
|
62
|
+
type: 'get';
|
|
63
|
+
}
|
|
64
|
+
export interface PostOperation<TInput = void, TOutput = unknown, TCtx = {}, TEnv = unknown> extends OperationBase<TInput, TOutput, TCtx, TEnv> {
|
|
65
|
+
type: 'post';
|
|
66
|
+
}
|
|
67
|
+
export type OperationType<TInput = unknown, TOutput = unknown, TCtx = {}, TEnv = unknown> = GetOperation<TInput, TOutput, TCtx, TEnv> | PostOperation<TInput, TOutput, TCtx, TEnv>;
|
|
68
|
+
export interface ProcedureRecord {
|
|
69
|
+
[key: string]: ProcedureNode;
|
|
70
|
+
}
|
|
71
|
+
export type ProcedureNode = OperationType<any, any, any, any> | ProcedureRecord;
|
|
72
|
+
type FlatRouteMapUnion<TRecord extends Record<string, any>, TPrefix extends string> = {
|
|
73
|
+
[TKey in Extract<keyof TRecord, string>]: TRecord[TKey] extends OperationType<any, any, any, any> ? {
|
|
74
|
+
[TPath in JoinPath<TPrefix, TKey>]: TRecord[TKey];
|
|
75
|
+
} : TRecord[TKey] extends Record<string, any> ? FlatRouteMapUnion<TRecord[TKey], JoinPath<TPrefix, TKey>> : never;
|
|
76
|
+
}[Extract<keyof TRecord, string>];
|
|
77
|
+
type FlatRouteMapInternal<TRecord extends Record<string, any>> = [
|
|
78
|
+
FlatRouteMapUnion<TRecord, ''>
|
|
79
|
+
] extends [never] ? {} : UnionToIntersection<FlatRouteMapUnion<TRecord, ''>>;
|
|
80
|
+
export type FlatRouteMap<TRecord extends Record<string, any>> = Prettify<FlatRouteMapInternal<TRecord>>;
|
|
81
|
+
export type InferMiddlewareOutput<TMiddleware> = TMiddleware extends MiddlewareFunction<any, infer TOutput, any> ? NormalizeMiddlewareResult<TOutput> : {};
|
|
82
|
+
export interface StackErrorWithStatus {
|
|
83
|
+
status?: number;
|
|
84
|
+
message?: string;
|
|
85
|
+
}
|
|
86
|
+
export type StackErrorHandler = (error: unknown, req?: StackRequestLike) => Response;
|
|
87
|
+
export interface ResolvedRoute<TEnv = unknown> {
|
|
88
|
+
path: string;
|
|
89
|
+
operation: OperationType<any, any, any, TEnv>;
|
|
90
|
+
}
|
|
91
|
+
export interface RouterMetadata {
|
|
92
|
+
basePath: string;
|
|
93
|
+
globalMiddlewares: unknown[];
|
|
94
|
+
procedures: Record<string, {
|
|
95
|
+
type: 'get' | 'post';
|
|
96
|
+
}>;
|
|
97
|
+
registeredPaths: string[];
|
|
98
|
+
errorHandler?: StackErrorHandler;
|
|
99
|
+
config?: Record<string, unknown>;
|
|
100
|
+
}
|
|
101
|
+
export interface StackRouter<TProcedures extends ProcedureRecord, TCtx = {}, TEnv = unknown> {
|
|
102
|
+
procedures: TProcedures;
|
|
103
|
+
routes: FlatRouteMap<TProcedures>;
|
|
104
|
+
metadata: RouterMetadata;
|
|
105
|
+
resolve(path: string, method: string): ResolvedRoute<TEnv> | null;
|
|
106
|
+
}
|
|
107
|
+
export interface StackExecutionContext<TCtx, TEnv> {
|
|
108
|
+
ctx: TCtx;
|
|
109
|
+
env: TEnv;
|
|
110
|
+
req: StackRequestLike;
|
|
111
|
+
c: StackResponseToolkit;
|
|
112
|
+
}
|
|
113
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React-server entry for `vista/theme`.
|
|
3
|
+
*
|
|
4
|
+
* ThemeScript is a real Server Component (inline blocking script).
|
|
5
|
+
* ThemeProvider/useTheme are Client Components; the compile hook turns
|
|
6
|
+
* `theme-provider` into a Flight client proxy under `--conditions react-server`.
|
|
7
|
+
*/
|
|
8
|
+
export { ThemeScript } from './theme-script';
|
|
9
|
+
export { ThemeProvider, applyTheme, useTheme } from './theme-provider';
|
|
10
|
+
export type { ResolvedTheme, ThemeMode } from './theme-provider';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useTheme = exports.applyTheme = exports.ThemeProvider = exports.ThemeScript = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* React-server entry for `vista/theme`.
|
|
6
|
+
*
|
|
7
|
+
* ThemeScript is a real Server Component (inline blocking script).
|
|
8
|
+
* ThemeProvider/useTheme are Client Components; the compile hook turns
|
|
9
|
+
* `theme-provider` into a Flight client proxy under `--conditions react-server`.
|
|
10
|
+
*/
|
|
11
|
+
var theme_script_1 = require("./theme-script");
|
|
12
|
+
Object.defineProperty(exports, "ThemeScript", { enumerable: true, get: function () { return theme_script_1.ThemeScript; } });
|
|
13
|
+
var theme_provider_1 = require("./theme-provider");
|
|
14
|
+
Object.defineProperty(exports, "ThemeProvider", { enumerable: true, get: function () { return theme_provider_1.ThemeProvider; } });
|
|
15
|
+
Object.defineProperty(exports, "applyTheme", { enumerable: true, get: function () { return theme_provider_1.applyTheme; } });
|
|
16
|
+
Object.defineProperty(exports, "useTheme", { enumerable: true, get: function () { return theme_provider_1.useTheme; } });
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vistagenic/vista",
|
|
3
|
-
"version": "0.2
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "The React Framework for Visionaries - Rust-powered SSR with Server Components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/
|
|
9
|
+
"url": "git+https://github.com/Mantitup-Org/vista.git",
|
|
10
10
|
"directory": "packages/vista"
|
|
11
11
|
},
|
|
12
12
|
"author": "Vista Team",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"default": "./dist/index.js"
|
|
33
33
|
},
|
|
34
34
|
"./link": {
|
|
35
|
+
"react-server": "./dist/client/link.react-server.js",
|
|
35
36
|
"types": "./dist/client/link.d.ts",
|
|
36
37
|
"default": "./dist/client/link.js"
|
|
37
38
|
},
|
|
@@ -41,18 +42,22 @@
|
|
|
41
42
|
"default": "./dist/image/index.js"
|
|
42
43
|
},
|
|
43
44
|
"./router": {
|
|
45
|
+
"react-server": "./dist/client/router.react-server.js",
|
|
44
46
|
"types": "./dist/client/router.d.ts",
|
|
45
47
|
"default": "./dist/client/router.js"
|
|
46
48
|
},
|
|
47
49
|
"./navigation": {
|
|
50
|
+
"react-server": "./dist/client/navigation.react-server.js",
|
|
48
51
|
"types": "./dist/client/navigation.d.ts",
|
|
49
52
|
"default": "./dist/client/navigation.js"
|
|
50
53
|
},
|
|
51
54
|
"./dynamic": {
|
|
55
|
+
"react-server": "./dist/client/dynamic.react-server.js",
|
|
52
56
|
"types": "./dist/client/dynamic.d.ts",
|
|
53
57
|
"default": "./dist/client/dynamic.js"
|
|
54
58
|
},
|
|
55
59
|
"./script": {
|
|
60
|
+
"react-server": "./dist/client/script.react-server.js",
|
|
56
61
|
"types": "./dist/client/script.d.ts",
|
|
57
62
|
"default": "./dist/client/script.js"
|
|
58
63
|
},
|
|
@@ -69,6 +74,7 @@
|
|
|
69
74
|
"default": "./dist/font/local.js"
|
|
70
75
|
},
|
|
71
76
|
"./theme": {
|
|
77
|
+
"react-server": "./dist/theme/react-server.js",
|
|
72
78
|
"types": "./dist/theme/index.d.ts",
|
|
73
79
|
"default": "./dist/theme/index.js"
|
|
74
80
|
},
|
|
@@ -81,6 +87,24 @@
|
|
|
81
87
|
"types": "./dist/config.d.ts",
|
|
82
88
|
"default": "./dist/config.js"
|
|
83
89
|
},
|
|
90
|
+
"./auth": {
|
|
91
|
+
"types": "./dist/auth/index.d.ts",
|
|
92
|
+
"default": "./dist/auth/index.js"
|
|
93
|
+
},
|
|
94
|
+
"./auth/react": {
|
|
95
|
+
"react-server": "./dist/auth/react-server.js",
|
|
96
|
+
"types": "./dist/auth/react.d.ts",
|
|
97
|
+
"default": "./dist/auth/react.js"
|
|
98
|
+
},
|
|
99
|
+
"./ai": {
|
|
100
|
+
"types": "./dist/ai/index.d.ts",
|
|
101
|
+
"default": "./dist/ai/index.js"
|
|
102
|
+
},
|
|
103
|
+
"./ai/react": {
|
|
104
|
+
"react-server": "./dist/ai/react/react-server.js",
|
|
105
|
+
"types": "./dist/ai/react/index.d.ts",
|
|
106
|
+
"default": "./dist/ai/react/index.js"
|
|
107
|
+
},
|
|
84
108
|
"./stack": {
|
|
85
109
|
"types": "./dist/stack/index.d.ts",
|
|
86
110
|
"default": "./dist/stack/index.js"
|
|
@@ -90,6 +114,7 @@
|
|
|
90
114
|
"default": "./dist/stack/client/index.js"
|
|
91
115
|
},
|
|
92
116
|
"./client/rsc-router": {
|
|
117
|
+
"react-server": "./dist/client/rsc-router.react-server.js",
|
|
93
118
|
"types": "./dist/client/rsc-router.d.ts",
|
|
94
119
|
"default": "./dist/client/rsc-router.js"
|
|
95
120
|
},
|
|
@@ -149,5 +174,5 @@
|
|
|
149
174
|
"@types/webpack-hot-middleware": "^2.25.9",
|
|
150
175
|
"typescript": "^5.7.2"
|
|
151
176
|
},
|
|
152
|
-
"gitHead": "
|
|
177
|
+
"gitHead": "d1b9f715d6365d8e1f553e96b752fbce8d98df7c"
|
|
153
178
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Vista.js contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|