@jay-framework/compiler-jay-html 0.10.0 → 0.11.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/dist/index.d.cts +44 -1
- package/dist/index.js +1306 -231
- package/package.json +8 -8
package/dist/index.d.cts
CHANGED
|
@@ -97,6 +97,11 @@ interface JayHtmlSourceFile extends CompilerSourceFile {
|
|
|
97
97
|
headlessImports: JayHeadlessImports[];
|
|
98
98
|
headLinks: JayHtmlHeadLink[];
|
|
99
99
|
css?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Absolute paths to linked CSS files referenced via <link rel="stylesheet">.
|
|
102
|
+
* Used by the dev server to watch these files for changes.
|
|
103
|
+
*/
|
|
104
|
+
linkedCssFiles?: string[];
|
|
100
105
|
filename?: string;
|
|
101
106
|
contract?: Contract;
|
|
102
107
|
contractRef?: string;
|
|
@@ -133,4 +138,42 @@ declare function renderRefsType(refs: RefsTree, refsType: string, generateTarget
|
|
|
133
138
|
|
|
134
139
|
declare function generateTypes(types: JayType): string;
|
|
135
140
|
|
|
136
|
-
|
|
141
|
+
/**
|
|
142
|
+
* Input for slow render transformation
|
|
143
|
+
*/
|
|
144
|
+
interface SlowRenderInput {
|
|
145
|
+
/** Original jay-html content */
|
|
146
|
+
jayHtmlContent: string;
|
|
147
|
+
/** Slow phase view state data */
|
|
148
|
+
slowViewState: Record<string, unknown>;
|
|
149
|
+
/** Contract metadata for phase detection */
|
|
150
|
+
contract?: Contract;
|
|
151
|
+
/**
|
|
152
|
+
* Source directory of the original jay-html file.
|
|
153
|
+
* Used to resolve relative paths (contracts, CSS, components) to absolute paths
|
|
154
|
+
* so the pre-rendered file can be placed in a different directory.
|
|
155
|
+
*/
|
|
156
|
+
sourceDir?: string;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Output of slow render transformation
|
|
160
|
+
*/
|
|
161
|
+
interface SlowRenderOutput {
|
|
162
|
+
/** Pre-rendered jay-html content */
|
|
163
|
+
preRenderedJayHtml: string;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Transform a jay-html file by resolving slow-phase bindings
|
|
167
|
+
*
|
|
168
|
+
* This is the main entry point for slow rendering.
|
|
169
|
+
*
|
|
170
|
+
* @param input - The input containing jay-html content, slow view state, and contract
|
|
171
|
+
* @returns The pre-rendered jay-html with slow bindings resolved
|
|
172
|
+
*/
|
|
173
|
+
declare function slowRenderTransform(input: SlowRenderInput): WithValidations<SlowRenderOutput>;
|
|
174
|
+
/**
|
|
175
|
+
* Check if a jay-html file has any slow-phase properties that can be pre-rendered
|
|
176
|
+
*/
|
|
177
|
+
declare function hasSlowPhaseProperties(contract: Contract | undefined): boolean;
|
|
178
|
+
|
|
179
|
+
export { type Contract, type ContractTag, ContractTagType, type EnumToImport, JAY_IMPORT_RESOLVER, type JayContractImportLink, type JayHtmlSourceFile, type JayImportResolver, type PhaseViewStates, type RenderingPhase, type SlowRenderInput, type SlowRenderOutput, compileContract, contractToAllPhaseViewStates, contractToImportsViewStateAndRefs, contractToPhaseViewState, generateElementBridgeFile, generateElementDefinitionFile, generateElementFile, generateElementFileReactTarget, generateSandboxRootFile, generateTypes, getJayHtmlImports, hasSlowPhaseProperties, parseContract, parseEnumValues, parseIsEnum, parseJayFile, renderRefsType, slowRenderTransform };
|