@constela/compiler 0.14.5 → 0.14.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -15
- package/dist/index.js +0 -20
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -102,7 +102,7 @@ interface CompiledAction {
|
|
|
102
102
|
name: string;
|
|
103
103
|
steps: CompiledActionStep[];
|
|
104
104
|
}
|
|
105
|
-
type CompiledActionStep = CompiledSetStep | CompiledUpdateStep | CompiledSetPathStep | CompiledFetchStep | CompiledStorageStep | CompiledClipboardStep | CompiledNavigateStep | CompiledImportStep | CompiledCallStep | CompiledSubscribeStep | CompiledDisposeStep | CompiledDomStep | CompiledIfStep | CompiledSendStep | CompiledCloseStep | CompiledDelayStep | CompiledIntervalStep | CompiledClearTimerStep | CompiledFocusStep
|
|
105
|
+
type CompiledActionStep = CompiledSetStep | CompiledUpdateStep | CompiledSetPathStep | CompiledFetchStep | CompiledStorageStep | CompiledClipboardStep | CompiledNavigateStep | CompiledImportStep | CompiledCallStep | CompiledSubscribeStep | CompiledDisposeStep | CompiledDomStep | CompiledIfStep | CompiledSendStep | CompiledCloseStep | CompiledDelayStep | CompiledIntervalStep | CompiledClearTimerStep | CompiledFocusStep;
|
|
106
106
|
interface CompiledSetStep {
|
|
107
107
|
do: 'set';
|
|
108
108
|
target: string;
|
|
@@ -265,19 +265,6 @@ interface CompiledFocusStep {
|
|
|
265
265
|
onSuccess?: CompiledActionStep[];
|
|
266
266
|
onError?: CompiledActionStep[];
|
|
267
267
|
}
|
|
268
|
-
/**
|
|
269
|
-
* Compiled generate step for AI generation
|
|
270
|
-
*/
|
|
271
|
-
interface CompiledGenerateStep {
|
|
272
|
-
do: 'generate';
|
|
273
|
-
provider: 'anthropic' | 'openai';
|
|
274
|
-
prompt: CompiledExpression;
|
|
275
|
-
output: 'component' | 'view';
|
|
276
|
-
result: string;
|
|
277
|
-
model?: string;
|
|
278
|
-
onSuccess?: CompiledActionStep[];
|
|
279
|
-
onError?: CompiledActionStep[];
|
|
280
|
-
}
|
|
281
268
|
/**
|
|
282
269
|
* Compiled local action
|
|
283
270
|
*/
|
|
@@ -576,4 +563,4 @@ declare function transformLayoutPass(layout: LayoutProgram, _context: LayoutAnal
|
|
|
576
563
|
*/
|
|
577
564
|
declare function composeLayoutWithPage(layout: CompiledProgram, page: CompiledProgram, layoutParams?: Record<string, Expression>, slots?: Record<string, ViewNode>): CompiledProgram;
|
|
578
565
|
|
|
579
|
-
export { type AnalysisContext, type AnalyzePassFailure, type AnalyzePassResult, type AnalyzePassSuccess, type CompileFailure, type CompileResult, type CompileSuccess, type CompiledAction, type CompiledActionStep, type CompiledArrayExpr, type CompiledBinExpr, type CompiledCallExpr, type CompiledCallStep, type CompiledClearTimerStep, type CompiledClipboardStep, type CompiledCloseStep, type CompiledCodeNode, type CompiledConcatExpr, type CompiledCondExpr, type CompiledDataExpr, type CompiledDelayStep, type CompiledDisposeStep, type CompiledDomStep, type CompiledEachNode, type CompiledElementNode, type CompiledEventHandler, type CompiledEventHandlerOptions, type CompiledExpression, type CompiledFetchStep, type CompiledFocusStep, type
|
|
566
|
+
export { type AnalysisContext, type AnalyzePassFailure, type AnalyzePassResult, type AnalyzePassSuccess, type CompileFailure, type CompileResult, type CompileSuccess, type CompiledAction, type CompiledActionStep, type CompiledArrayExpr, type CompiledBinExpr, type CompiledCallExpr, type CompiledCallStep, type CompiledClearTimerStep, type CompiledClipboardStep, type CompiledCloseStep, type CompiledCodeNode, type CompiledConcatExpr, type CompiledCondExpr, type CompiledDataExpr, type CompiledDelayStep, type CompiledDisposeStep, type CompiledDomStep, type CompiledEachNode, type CompiledElementNode, type CompiledEventHandler, type CompiledEventHandlerOptions, type CompiledExpression, type CompiledFetchStep, type CompiledFocusStep, type CompiledGetExpr, type CompiledIfNode, type CompiledIfStep, type CompiledImportExpr, type CompiledImportStep, type CompiledIndexExpr, type CompiledIntervalStep, type CompiledLambdaExpr, type CompiledLayoutProgram, type CompiledLifecycleHooks, type CompiledLitExpr, type CompiledLocalAction, type CompiledLocalStateNode, type CompiledMarkdownNode, type CompiledNavigateStep, type CompiledNode, type CompiledNotExpr, type CompiledParamExpr, type CompiledPortalNode, type CompiledProgram, type CompiledRefExpr, type CompiledRouteDefinition, type CompiledRouteExpr, type CompiledSendStep, type CompiledSetPathStep, type CompiledSetStep, type CompiledSlotNode, type CompiledStateExpr, type CompiledStorageStep, type CompiledStyleExpr, type CompiledSubscribeStep, type CompiledTextNode, type CompiledUpdateStep, type CompiledValidityExpr, type CompiledVarExpr, type LayoutAnalysisContext, type LayoutAnalysisFailure, type LayoutAnalysisResult, type LayoutAnalysisSuccess, type ValidatePassFailure, type ValidatePassResult, type ValidatePassSuccess, analyzeLayoutPass, analyzePass, compile, composeLayoutWithPage, transformLayoutPass, transformPass, validatePass };
|
package/dist/index.js
CHANGED
|
@@ -1667,26 +1667,6 @@ function transformActionStep(step) {
|
|
|
1667
1667
|
}
|
|
1668
1668
|
return compiledIfStep;
|
|
1669
1669
|
}
|
|
1670
|
-
case "generate": {
|
|
1671
|
-
const generateStep = step;
|
|
1672
|
-
const compiledGenerateStep = {
|
|
1673
|
-
do: "generate",
|
|
1674
|
-
provider: generateStep.provider,
|
|
1675
|
-
prompt: transformExpression(generateStep.prompt, emptyContext),
|
|
1676
|
-
output: generateStep.output,
|
|
1677
|
-
result: generateStep.result
|
|
1678
|
-
};
|
|
1679
|
-
if (generateStep.model) {
|
|
1680
|
-
compiledGenerateStep.model = generateStep.model;
|
|
1681
|
-
}
|
|
1682
|
-
if (generateStep.onSuccess) {
|
|
1683
|
-
compiledGenerateStep.onSuccess = generateStep.onSuccess.map(transformActionStep);
|
|
1684
|
-
}
|
|
1685
|
-
if (generateStep.onError) {
|
|
1686
|
-
compiledGenerateStep.onError = generateStep.onError.map(transformActionStep);
|
|
1687
|
-
}
|
|
1688
|
-
return compiledGenerateStep;
|
|
1689
|
-
}
|
|
1690
1670
|
}
|
|
1691
1671
|
}
|
|
1692
1672
|
function flattenSlotChildren(children, ctx) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constela/compiler",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.6",
|
|
4
4
|
"description": "Compiler for Constela UI framework - AST to Program transformation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@constela/core": "0.16.
|
|
18
|
+
"@constela/core": "0.16.1"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/node": "^20.10.0",
|