@fluojs/react 0.1.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/LICENSE +21 -0
- package/README.ko.md +715 -0
- package/README.md +729 -0
- package/dist/client/errors.d.ts +12 -0
- package/dist/client/errors.d.ts.map +1 -0
- package/dist/client/errors.js +19 -0
- package/dist/client/hooks.d.ts +38 -0
- package/dist/client/hooks.d.ts.map +1 -0
- package/dist/client/hooks.js +56 -0
- package/dist/client/link.d.ts +13 -0
- package/dist/client/link.d.ts.map +1 -0
- package/dist/client/link.js +39 -0
- package/dist/client/provider.d.ts +12 -0
- package/dist/client/provider.d.ts.map +1 -0
- package/dist/client/provider.js +54 -0
- package/dist/client/search-params.d.ts +17 -0
- package/dist/client/search-params.d.ts.map +1 -0
- package/dist/client/search-params.js +39 -0
- package/dist/client/snapshot.d.ts +15 -0
- package/dist/client/snapshot.d.ts.map +1 -0
- package/dist/client/snapshot.js +57 -0
- package/dist/client/store.d.ts +26 -0
- package/dist/client/store.d.ts.map +1 -0
- package/dist/client/store.js +138 -0
- package/dist/client/types.d.ts +63 -0
- package/dist/client/types.d.ts.map +1 -0
- package/dist/client/types.js +1 -0
- package/dist/client.d.ts +9 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +5 -0
- package/dist/decorators.d.ts +80 -0
- package/dist/decorators.d.ts.map +1 -0
- package/dist/decorators.js +194 -0
- package/dist/experimental/rsc-diagnostics.d.ts +13 -0
- package/dist/experimental/rsc-diagnostics.d.ts.map +1 -0
- package/dist/experimental/rsc-diagnostics.js +58 -0
- package/dist/experimental/rsc-flight-response.d.ts +15 -0
- package/dist/experimental/rsc-flight-response.d.ts.map +1 -0
- package/dist/experimental/rsc-flight-response.js +76 -0
- package/dist/experimental/rsc-manifest.d.ts +13 -0
- package/dist/experimental/rsc-manifest.d.ts.map +1 -0
- package/dist/experimental/rsc-manifest.js +88 -0
- package/dist/experimental/rsc-types.d.ts +118 -0
- package/dist/experimental/rsc-types.d.ts.map +1 -0
- package/dist/experimental/rsc-types.js +50 -0
- package/dist/experimental/rsc.d.ts +11 -0
- package/dist/experimental/rsc.d.ts.map +1 -0
- package/dist/experimental/rsc.js +8 -0
- package/dist/experimental/server-functions-client.d.ts +14 -0
- package/dist/experimental/server-functions-client.d.ts.map +1 -0
- package/dist/experimental/server-functions-client.js +120 -0
- package/dist/experimental/server-functions-configuration.d.ts +17 -0
- package/dist/experimental/server-functions-configuration.d.ts.map +1 -0
- package/dist/experimental/server-functions-configuration.js +68 -0
- package/dist/experimental/server-functions-errors.d.ts +19 -0
- package/dist/experimental/server-functions-errors.d.ts.map +1 -0
- package/dist/experimental/server-functions-errors.js +22 -0
- package/dist/experimental/server-functions-reference.d.ts +22 -0
- package/dist/experimental/server-functions-reference.d.ts.map +1 -0
- package/dist/experimental/server-functions-reference.js +76 -0
- package/dist/experimental/server-functions-serialization.d.ts +37 -0
- package/dist/experimental/server-functions-serialization.d.ts.map +1 -0
- package/dist/experimental/server-functions-serialization.js +158 -0
- package/dist/experimental/server-functions-server.d.ts +14 -0
- package/dist/experimental/server-functions-server.d.ts.map +1 -0
- package/dist/experimental/server-functions-server.js +176 -0
- package/dist/experimental/server-functions-types.d.ts +86 -0
- package/dist/experimental/server-functions-types.d.ts.map +1 -0
- package/dist/experimental/server-functions-types.js +35 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/module.d.ts +40 -0
- package/dist/module.d.ts.map +1 -0
- package/dist/module.js +58 -0
- package/dist/render-stream.d.ts +27 -0
- package/dist/render-stream.d.ts.map +1 -0
- package/dist/render-stream.js +135 -0
- package/dist/render.d.ts +50 -0
- package/dist/render.d.ts.map +1 -0
- package/dist/render.js +201 -0
- package/dist/server-entry.d.ts +87 -0
- package/dist/server-entry.d.ts.map +1 -0
- package/dist/server-entry.js +126 -0
- package/dist/types.d.ts +11 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/dist/vite/asset-utils.d.ts +57 -0
- package/dist/vite/asset-utils.d.ts.map +1 -0
- package/dist/vite/asset-utils.js +184 -0
- package/dist/vite/create-asset-manifest.d.ts +9 -0
- package/dist/vite/create-asset-manifest.d.ts.map +1 -0
- package/dist/vite/create-asset-manifest.js +127 -0
- package/dist/vite/diagnostics.d.ts +27 -0
- package/dist/vite/diagnostics.d.ts.map +1 -0
- package/dist/vite/diagnostics.js +47 -0
- package/dist/vite/parse-manifest.d.ts +18 -0
- package/dist/vite/parse-manifest.d.ts.map +1 -0
- package/dist/vite/parse-manifest.js +168 -0
- package/dist/vite/types.d.ts +187 -0
- package/dist/vite/types.d.ts.map +1 -0
- package/dist/vite/types.js +59 -0
- package/dist/vite.d.ts +3 -0
- package/dist/vite.d.ts.map +1 -0
- package/dist/vite.js +1 -0
- package/package.json +68 -0
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import type { ReactAssetMap, ReactBootstrapAsset, ReactServerEntryOptions } from '../server-entry.js';
|
|
2
|
+
/** Stable diagnostic code values emitted by the React Vite manifest parser. */
|
|
3
|
+
export declare const DIAGNOSTIC_CODES: {
|
|
4
|
+
readonly malformed: "react-vite-manifest-malformed";
|
|
5
|
+
readonly missingClientEntry: "react-vite-manifest-missing-client-entry";
|
|
6
|
+
readonly missingServerEntry: "react-vite-manifest-missing-server-entry";
|
|
7
|
+
readonly unsupportedOutputShape: "react-vite-manifest-unsupported-output-shape";
|
|
8
|
+
};
|
|
9
|
+
/** JavaScript extensions accepted for Vite SSR and hydration chunks. */
|
|
10
|
+
export declare const JAVASCRIPT_OUTPUT_EXTENSIONS: readonly [".js", ".mjs", ".cjs"];
|
|
11
|
+
/** URL protocol detector used before applying a Vite base path. */
|
|
12
|
+
export declare const ABSOLUTE_URL_PATTERN: RegExp;
|
|
13
|
+
/** Narrowed object record used while parsing untrusted manifests. */
|
|
14
|
+
export type UnknownRecord = Readonly<Record<string, unknown>>;
|
|
15
|
+
/** Entry role used in diagnostics for selected React server and client chunks. */
|
|
16
|
+
export type EntryRole = 'client' | 'server';
|
|
17
|
+
/** Parsed manifest entry with normalized optional fields. */
|
|
18
|
+
export type ParsedManifestEntry = {
|
|
19
|
+
readonly assets: readonly string[];
|
|
20
|
+
readonly css: readonly string[];
|
|
21
|
+
readonly file: string;
|
|
22
|
+
readonly id: string;
|
|
23
|
+
readonly imports: readonly string[];
|
|
24
|
+
readonly isDynamicEntry?: boolean;
|
|
25
|
+
readonly isEntry?: boolean;
|
|
26
|
+
readonly name?: string;
|
|
27
|
+
readonly src?: string;
|
|
28
|
+
};
|
|
29
|
+
/** Parsed manifest keyed by Vite manifest id. */
|
|
30
|
+
export type ParsedManifest = Readonly<Record<string, ParsedManifestEntry>>;
|
|
31
|
+
/** Result of parsing the untrusted manifest boundary. */
|
|
32
|
+
export type ManifestParseResult = {
|
|
33
|
+
readonly ok: true;
|
|
34
|
+
readonly manifest: ParsedManifest;
|
|
35
|
+
} | {
|
|
36
|
+
readonly ok: false;
|
|
37
|
+
readonly diagnostics: readonly ReactViteManifestDiagnostic[];
|
|
38
|
+
};
|
|
39
|
+
/** Result of parsing one Vite manifest entry. */
|
|
40
|
+
export type ManifestEntryParseResult = {
|
|
41
|
+
readonly diagnostics: readonly ReactViteManifestDiagnostic[];
|
|
42
|
+
readonly entry?: ParsedManifestEntry;
|
|
43
|
+
};
|
|
44
|
+
/** Result of resolving an explicit React entry selector. */
|
|
45
|
+
export type EntryResolveResult = {
|
|
46
|
+
readonly diagnostics: readonly ReactViteManifestDiagnostic[];
|
|
47
|
+
readonly entry?: ParsedManifestEntry;
|
|
48
|
+
};
|
|
49
|
+
/** Reader state shared by manifest entry field parsers. */
|
|
50
|
+
export type ManifestEntryReader = {
|
|
51
|
+
readonly diagnostics: ReactViteManifestDiagnostic[];
|
|
52
|
+
readonly entry: UnknownRecord;
|
|
53
|
+
readonly entryId: string;
|
|
54
|
+
};
|
|
55
|
+
/** Ordered client dependency graph plus graph-level diagnostics. */
|
|
56
|
+
export type DependencyGraph = {
|
|
57
|
+
readonly diagnostics: readonly ReactViteManifestDiagnostic[];
|
|
58
|
+
readonly entries: readonly ParsedManifestEntry[];
|
|
59
|
+
};
|
|
60
|
+
/** Input fields that form trusted bootstrap metadata. */
|
|
61
|
+
export type BootstrapDataInput = Pick<ReactViteManifestOptions, 'bootstrapScriptContent' | 'identifierPrefix' | 'nonce'>;
|
|
62
|
+
/** Inputs used to assemble stable root hydration options. */
|
|
63
|
+
export type HydrationOptionsInput = {
|
|
64
|
+
readonly assetMap: ReactAssetMap;
|
|
65
|
+
readonly bootstrap: ReactViteBootstrapData;
|
|
66
|
+
readonly modules: readonly ReactBootstrapAsset[];
|
|
67
|
+
readonly scripts: readonly ReactBootstrapAsset[];
|
|
68
|
+
};
|
|
69
|
+
/** Vite manifest chunk fields consumed by `@fluojs/react/vite`. */
|
|
70
|
+
export type ReactViteBuildManifestChunk = {
|
|
71
|
+
/** Emitted static assets referenced by this chunk. */
|
|
72
|
+
readonly assets?: readonly string[];
|
|
73
|
+
/** Stylesheets emitted for this chunk in Vite manifest order. */
|
|
74
|
+
readonly css?: readonly string[];
|
|
75
|
+
/** JavaScript output file for this chunk. */
|
|
76
|
+
readonly file: string;
|
|
77
|
+
/** Static chunk imports that should be ordered before this chunk. */
|
|
78
|
+
readonly imports?: readonly string[];
|
|
79
|
+
/** Whether Vite marks this chunk as a dynamic entry. */
|
|
80
|
+
readonly isDynamicEntry?: boolean;
|
|
81
|
+
/** Whether Vite marks this chunk as an entry. */
|
|
82
|
+
readonly isEntry?: boolean;
|
|
83
|
+
/** Optional Vite chunk name used as a secondary lookup key. */
|
|
84
|
+
readonly name?: string;
|
|
85
|
+
/** Optional original source path used as a secondary lookup key. */
|
|
86
|
+
readonly src?: string;
|
|
87
|
+
};
|
|
88
|
+
/** Vite manifest object keyed by source entry or generated chunk id. */
|
|
89
|
+
export type ReactViteBuildManifest = Readonly<Record<string, ReactViteBuildManifestChunk>>;
|
|
90
|
+
/** Explicit React server and client entry selectors for a Vite manifest. */
|
|
91
|
+
export type ReactViteManifestEntries = {
|
|
92
|
+
/** Manifest key, `src`, or `name` for the browser hydration entry. */
|
|
93
|
+
readonly client: string;
|
|
94
|
+
/** Manifest key, `src`, or `name` for the server SSR entry. */
|
|
95
|
+
readonly server: string;
|
|
96
|
+
};
|
|
97
|
+
/** Options accepted by `createReactViteAssetManifest(...)`. */
|
|
98
|
+
export type ReactViteManifestOptions = {
|
|
99
|
+
/** Public Vite base path used to turn relative manifest files into public URLs. Defaults to `/`. */
|
|
100
|
+
readonly base?: string;
|
|
101
|
+
/** Caller-provided module bootstrap assets appended after manifest-derived modules. */
|
|
102
|
+
readonly bootstrapModules?: readonly ReactBootstrapAsset[];
|
|
103
|
+
/** Trusted inline bootstrap script content forwarded to the root hydration contract. */
|
|
104
|
+
readonly bootstrapScriptContent?: string;
|
|
105
|
+
/** Caller-provided classic script bootstrap assets forwarded to the root hydration contract. */
|
|
106
|
+
readonly bootstrapScripts?: readonly ReactBootstrapAsset[];
|
|
107
|
+
/** Server and client React entry selectors. */
|
|
108
|
+
readonly entries: ReactViteManifestEntries;
|
|
109
|
+
/** Stable React `useId()` prefix forwarded to the root hydration contract. */
|
|
110
|
+
readonly identifierPrefix?: string;
|
|
111
|
+
/** Untrusted manifest value loaded from Vite output or provided by the caller. */
|
|
112
|
+
readonly manifest: unknown;
|
|
113
|
+
/** CSP nonce forwarded to emitted React bootstrap scripts. */
|
|
114
|
+
readonly nonce?: string;
|
|
115
|
+
};
|
|
116
|
+
/** Diagnostic code emitted while parsing React Vite assets. */
|
|
117
|
+
export type ReactViteManifestDiagnosticCode = (typeof DIAGNOSTIC_CODES)[keyof typeof DIAGNOSTIC_CODES];
|
|
118
|
+
/** Diagnostic emitted instead of throwing for expected manifest problems. */
|
|
119
|
+
export type ReactViteManifestDiagnostic = {
|
|
120
|
+
/** Stable machine-readable diagnostic code. */
|
|
121
|
+
readonly code: ReactViteManifestDiagnosticCode;
|
|
122
|
+
/** Requested manifest entry when the diagnostic is entry-specific. */
|
|
123
|
+
readonly entry?: string;
|
|
124
|
+
/** Human-readable diagnostic message. */
|
|
125
|
+
readonly message: string;
|
|
126
|
+
/** Manifest path for malformed field diagnostics. */
|
|
127
|
+
readonly path?: string;
|
|
128
|
+
};
|
|
129
|
+
/** JavaScript assets split by module and classic script bootstrap semantics. */
|
|
130
|
+
export type ReactViteJavaScriptAssets = {
|
|
131
|
+
/** Module scripts derived from the Vite client import graph plus caller-provided modules. */
|
|
132
|
+
readonly modules: readonly ReactBootstrapAsset[];
|
|
133
|
+
/** Classic scripts supplied by the caller for the root hydration contract. */
|
|
134
|
+
readonly scripts: readonly ReactBootstrapAsset[];
|
|
135
|
+
};
|
|
136
|
+
/** Trusted bootstrap data forwarded into the stable root hydration contract. */
|
|
137
|
+
export type ReactViteBootstrapData = {
|
|
138
|
+
/** Trusted inline bootstrap script content. */
|
|
139
|
+
readonly bootstrapScriptContent?: string;
|
|
140
|
+
/** Stable React `useId()` prefix. */
|
|
141
|
+
readonly identifierPrefix?: string;
|
|
142
|
+
/** CSP nonce for emitted React bootstrap scripts. */
|
|
143
|
+
readonly nonce?: string;
|
|
144
|
+
};
|
|
145
|
+
/** Hydration options that can be passed directly to `createReactServerEntry(...)`. */
|
|
146
|
+
export type ReactViteHydrationOptions = Pick<ReactServerEntryOptions, 'assetMap' | 'bootstrapModules' | 'bootstrapScriptContent' | 'bootstrapScripts' | 'identifierPrefix' | 'nonce'>;
|
|
147
|
+
/** Resolved Vite entry metadata with public URLs for assets owned by that entry. */
|
|
148
|
+
export type ReactViteResolvedEntry = {
|
|
149
|
+
/** Manifest entry id selected by key, `src`, or `name`. */
|
|
150
|
+
readonly id: string;
|
|
151
|
+
/** Public asset URLs referenced directly by this entry. */
|
|
152
|
+
readonly assets: readonly string[];
|
|
153
|
+
/** Public stylesheet URLs referenced directly by this entry. */
|
|
154
|
+
readonly css: readonly string[];
|
|
155
|
+
/** Manifest output file for this entry. */
|
|
156
|
+
readonly file: string;
|
|
157
|
+
/** Static import ids declared by this entry. */
|
|
158
|
+
readonly imports: readonly string[];
|
|
159
|
+
/** Public JavaScript URL for this entry. */
|
|
160
|
+
readonly publicUrl: string;
|
|
161
|
+
};
|
|
162
|
+
/** React Vite asset manifest produced for server rendering and client hydration. */
|
|
163
|
+
export type ReactViteAssetManifest = {
|
|
164
|
+
/** Defensive asset map snapshot shared by server markup and client hydration. */
|
|
165
|
+
readonly assetMap: ReactAssetMap;
|
|
166
|
+
/** Trusted bootstrap data forwarded to React DOM through the root package. */
|
|
167
|
+
readonly bootstrap: ReactViteBootstrapData;
|
|
168
|
+
/** Resolved browser hydration entry. */
|
|
169
|
+
readonly clientEntry: ReactViteResolvedEntry;
|
|
170
|
+
/** Stylesheet URLs ordered before hydration scripts. */
|
|
171
|
+
readonly css: readonly string[];
|
|
172
|
+
/** Existing stable root hydration options. */
|
|
173
|
+
readonly hydrationOptions: ReactViteHydrationOptions;
|
|
174
|
+
/** JavaScript bootstrap assets split by module and classic script semantics. */
|
|
175
|
+
readonly js: ReactViteJavaScriptAssets;
|
|
176
|
+
/** Resolved server SSR entry. */
|
|
177
|
+
readonly serverEntry: ReactViteResolvedEntry;
|
|
178
|
+
};
|
|
179
|
+
/** Result returned by `createReactViteAssetManifest(...)`. */
|
|
180
|
+
export type ReactViteAssetManifestResult = {
|
|
181
|
+
readonly ok: true;
|
|
182
|
+
readonly manifest: ReactViteAssetManifest;
|
|
183
|
+
} | {
|
|
184
|
+
readonly ok: false;
|
|
185
|
+
readonly diagnostics: readonly ReactViteManifestDiagnostic[];
|
|
186
|
+
};
|
|
187
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/vite/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAEtG,+EAA+E;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|
+
export const DIAGNOSTIC_CODES = {
|
|
3
|
+
malformed: 'react-vite-manifest-malformed',
|
|
4
|
+
missingClientEntry: 'react-vite-manifest-missing-client-entry',
|
|
5
|
+
missingServerEntry: 'react-vite-manifest-missing-server-entry',
|
|
6
|
+
unsupportedOutputShape: 'react-vite-manifest-unsupported-output-shape'
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
/** JavaScript extensions accepted for Vite SSR and hydration chunks. */
|
|
10
|
+
export const JAVASCRIPT_OUTPUT_EXTENSIONS = ['.js', '.mjs', '.cjs'];
|
|
11
|
+
|
|
12
|
+
/** URL protocol detector used before applying a Vite base path. */
|
|
13
|
+
export const ABSOLUTE_URL_PATTERN = /^[a-z][a-z\d+.-]*:/iu;
|
|
14
|
+
|
|
15
|
+
/** Narrowed object record used while parsing untrusted manifests. */
|
|
16
|
+
|
|
17
|
+
/** Entry role used in diagnostics for selected React server and client chunks. */
|
|
18
|
+
|
|
19
|
+
/** Parsed manifest entry with normalized optional fields. */
|
|
20
|
+
|
|
21
|
+
/** Parsed manifest keyed by Vite manifest id. */
|
|
22
|
+
|
|
23
|
+
/** Result of parsing the untrusted manifest boundary. */
|
|
24
|
+
|
|
25
|
+
/** Result of parsing one Vite manifest entry. */
|
|
26
|
+
|
|
27
|
+
/** Result of resolving an explicit React entry selector. */
|
|
28
|
+
|
|
29
|
+
/** Reader state shared by manifest entry field parsers. */
|
|
30
|
+
|
|
31
|
+
/** Ordered client dependency graph plus graph-level diagnostics. */
|
|
32
|
+
|
|
33
|
+
/** Input fields that form trusted bootstrap metadata. */
|
|
34
|
+
|
|
35
|
+
/** Inputs used to assemble stable root hydration options. */
|
|
36
|
+
|
|
37
|
+
/** Vite manifest chunk fields consumed by `@fluojs/react/vite`. */
|
|
38
|
+
|
|
39
|
+
/** Vite manifest object keyed by source entry or generated chunk id. */
|
|
40
|
+
|
|
41
|
+
/** Explicit React server and client entry selectors for a Vite manifest. */
|
|
42
|
+
|
|
43
|
+
/** Options accepted by `createReactViteAssetManifest(...)`. */
|
|
44
|
+
|
|
45
|
+
/** Diagnostic code emitted while parsing React Vite assets. */
|
|
46
|
+
|
|
47
|
+
/** Diagnostic emitted instead of throwing for expected manifest problems. */
|
|
48
|
+
|
|
49
|
+
/** JavaScript assets split by module and classic script bootstrap semantics. */
|
|
50
|
+
|
|
51
|
+
/** Trusted bootstrap data forwarded into the stable root hydration contract. */
|
|
52
|
+
|
|
53
|
+
/** Hydration options that can be passed directly to `createReactServerEntry(...)`. */
|
|
54
|
+
|
|
55
|
+
/** Resolved Vite entry metadata with public URLs for assets owned by that entry. */
|
|
56
|
+
|
|
57
|
+
/** React Vite asset manifest produced for server rendering and client hydration. */
|
|
58
|
+
|
|
59
|
+
/** Result returned by `createReactViteAssetManifest(...)`. */
|
package/dist/vite.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { createReactViteAssetManifest } from './vite/create-asset-manifest.js';
|
|
2
|
+
export type { ReactViteAssetManifest, ReactViteAssetManifestResult, ReactViteBootstrapData, ReactViteBuildManifest, ReactViteBuildManifestChunk, ReactViteHydrationOptions, ReactViteJavaScriptAssets, ReactViteManifestDiagnostic, ReactViteManifestDiagnosticCode, ReactViteManifestEntries, ReactViteManifestOptions, ReactViteResolvedEntry, } from './vite/types.js';
|
|
3
|
+
//# sourceMappingURL=vite.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vite.d.ts","sourceRoot":"","sources":["../src/vite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,iCAAiC,CAAC;AAC/E,YAAY,EACV,sBAAsB,EACtB,4BAA4B,EAC5B,sBAAsB,EACtB,sBAAsB,EACtB,2BAA2B,EAC3B,yBAAyB,EACzB,yBAAyB,EACzB,2BAA2B,EAC3B,+BAA+B,EAC/B,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,iBAAiB,CAAC"}
|
package/dist/vite.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createReactViteAssetManifest } from './vite/create-asset-manifest.js';
|
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fluojs/react",
|
|
3
|
+
"description": "Runtime-neutral React integration scaffold for fluo applications.",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"fluo",
|
|
6
|
+
"react",
|
|
7
|
+
"ssr",
|
|
8
|
+
"runtime-neutral",
|
|
9
|
+
"standard-decorators"
|
|
10
|
+
],
|
|
11
|
+
"version": "0.1.0",
|
|
12
|
+
"private": false,
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/fluojs/fluo.git",
|
|
17
|
+
"directory": "packages/react"
|
|
18
|
+
},
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"type": "module",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"import": "./dist/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./client": {
|
|
29
|
+
"types": "./dist/client.d.ts",
|
|
30
|
+
"import": "./dist/client.js"
|
|
31
|
+
},
|
|
32
|
+
"./experimental/rsc": {
|
|
33
|
+
"types": "./dist/experimental/rsc.d.ts",
|
|
34
|
+
"import": "./dist/experimental/rsc.js"
|
|
35
|
+
},
|
|
36
|
+
"./vite": {
|
|
37
|
+
"types": "./dist/vite.d.ts",
|
|
38
|
+
"import": "./dist/vite.js"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"main": "./dist/index.js",
|
|
42
|
+
"types": "./dist/index.d.ts",
|
|
43
|
+
"files": [
|
|
44
|
+
"dist"
|
|
45
|
+
],
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@fluojs/core": "^1.1.0",
|
|
48
|
+
"@fluojs/di": "^2.0.0",
|
|
49
|
+
"@fluojs/http": "^2.0.1",
|
|
50
|
+
"@fluojs/runtime": "^2.0.1"
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"react": "^18.3.0 || ^19.0.0",
|
|
54
|
+
"react-dom": "^18.3.0 || ^19.0.0"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@types/react": "^19.2.14",
|
|
58
|
+
"@types/react-dom": "^19.2.3",
|
|
59
|
+
"vitest": "^3.2.4"
|
|
60
|
+
},
|
|
61
|
+
"scripts": {
|
|
62
|
+
"prebuild": "node ../../tooling/scripts/clean-dist.mjs",
|
|
63
|
+
"build": "pnpm exec babel src --extensions .ts --ignore 'src/**/*.test.ts' --out-dir dist --config-file ../../tooling/babel/babel.config.cjs && pnpm exec tsc -p tsconfig.build.json",
|
|
64
|
+
"typecheck": "pnpm exec tsc -p tsconfig.json --noEmit",
|
|
65
|
+
"test": "pnpm exec vitest run -c vitest.config.ts",
|
|
66
|
+
"test:watch": "pnpm exec vitest -c vitest.config.ts"
|
|
67
|
+
}
|
|
68
|
+
}
|