@jay-framework/compiler-shared 0.19.5 → 0.19.7
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 +41 -30
- package/dist/index.js +4 -1
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -114,6 +114,7 @@ declare const JAY_STACK_CLIENT_RUNTIME = "@jay-framework/stack-client-runtime";
|
|
|
114
114
|
declare const JAY_SSR_RUNTIME = "@jay-framework/ssr-runtime";
|
|
115
115
|
declare const REACT = "react";
|
|
116
116
|
declare const MAKE_JAY_COMPONENT = "makeJayComponent";
|
|
117
|
+
declare const MAKE_JAY_STACK_COMPONENT = "makeJayStackComponent";
|
|
117
118
|
declare const MAKE_JAY_TSX_COMPONENT = "makeJayTsxComponent";
|
|
118
119
|
declare const MAKE_JAY_4_REACT_COMPONENT = "jay4react";
|
|
119
120
|
|
|
@@ -194,7 +195,8 @@ declare class JayComponentApiMember {
|
|
|
194
195
|
declare class JayComponentType implements JayType {
|
|
195
196
|
readonly name: string;
|
|
196
197
|
readonly api: Array<JayComponentApiMember>;
|
|
197
|
-
|
|
198
|
+
readonly fullStack: boolean;
|
|
199
|
+
constructor(name: string, api: Array<JayComponentApiMember>, fullStack?: boolean);
|
|
198
200
|
readonly kind = JayTypeKind.component;
|
|
199
201
|
}
|
|
200
202
|
declare class JayObjectType implements JayType {
|
|
@@ -568,6 +570,10 @@ interface DynamicContractConfig {
|
|
|
568
570
|
* When the generator returns multiple contracts: used as prefix (e.g., "list" → "list/recipes").
|
|
569
571
|
* When the generator returns a single contract: the name can be omitted, using just the prefix as the contract name (e.g., "product-page"). */
|
|
570
572
|
prefix: string;
|
|
573
|
+
/** Head tags this component provides dynamically via phaseOutput (DL#148).
|
|
574
|
+
* Used by validators to suppress missing-title/description warnings.
|
|
575
|
+
* Values: "title", "meta:description", "meta:og:title", "link:canonical", etc. */
|
|
576
|
+
headTags?: string[];
|
|
571
577
|
}
|
|
572
578
|
/**
|
|
573
579
|
* Plugin manifest structure from plugin.yaml
|
|
@@ -584,6 +590,10 @@ interface PluginManifest {
|
|
|
584
590
|
contract: string;
|
|
585
591
|
component: string;
|
|
586
592
|
description?: string;
|
|
593
|
+
/** Head tags this component provides dynamically via phaseOutput (DL#148).
|
|
594
|
+
* Used by validators to suppress missing-title/description warnings.
|
|
595
|
+
* Values: "title", "meta:description", "meta:og:title", "link:canonical", etc. */
|
|
596
|
+
headTags?: string[];
|
|
587
597
|
}>;
|
|
588
598
|
dynamic_contracts?: DynamicContractConfig | DynamicContractConfig[];
|
|
589
599
|
/** Named exports from plugin backend bundle that are JayAction instances.
|
|
@@ -710,6 +720,30 @@ declare function resolvePluginComponent(projectRoot: string, pluginName: string,
|
|
|
710
720
|
*/
|
|
711
721
|
declare function resolvePluginManifest(projectRoot: string, pluginName: string): WithValidations<PluginManifest>;
|
|
712
722
|
|
|
723
|
+
interface TemplatePart {
|
|
724
|
+
kind: 'static' | 'binding';
|
|
725
|
+
value: string;
|
|
726
|
+
}
|
|
727
|
+
interface DataScope {
|
|
728
|
+
tags: Array<{
|
|
729
|
+
tag: string;
|
|
730
|
+
tags?: any[];
|
|
731
|
+
meta?: Record<string, string>;
|
|
732
|
+
[key: string]: any;
|
|
733
|
+
}>;
|
|
734
|
+
parent?: DataScope;
|
|
735
|
+
}
|
|
736
|
+
interface ResolvedBinding {
|
|
737
|
+
path: string;
|
|
738
|
+
tag?: {
|
|
739
|
+
tag: string;
|
|
740
|
+
meta?: Record<string, string>;
|
|
741
|
+
[key: string]: any;
|
|
742
|
+
};
|
|
743
|
+
}
|
|
744
|
+
declare function resolveBinding(bindingPath: string, scope: DataScope): ResolvedBinding;
|
|
745
|
+
declare function walkElements(root: any, ctx: JayHtmlValidationContext, visitor: (el: any, scope: DataScope) => void): void;
|
|
746
|
+
|
|
713
747
|
interface JayHtmlValidationFinding {
|
|
714
748
|
severity: 'error' | 'warning';
|
|
715
749
|
message: string;
|
|
@@ -718,16 +752,16 @@ interface JayHtmlValidationFinding {
|
|
|
718
752
|
attribute?: string;
|
|
719
753
|
}
|
|
720
754
|
interface JayHtmlHeadMeta {
|
|
721
|
-
title?:
|
|
755
|
+
title?: TemplatePart[];
|
|
722
756
|
meta: Array<{
|
|
723
757
|
name?: string;
|
|
724
758
|
property?: string;
|
|
725
|
-
content:
|
|
759
|
+
content: TemplatePart[];
|
|
726
760
|
}>;
|
|
727
761
|
links: Array<{
|
|
728
762
|
rel: string;
|
|
729
|
-
href:
|
|
730
|
-
[key: string]:
|
|
763
|
+
href: TemplatePart[];
|
|
764
|
+
[key: string]: any;
|
|
731
765
|
}>;
|
|
732
766
|
}
|
|
733
767
|
interface JayHtmlValidationContext {
|
|
@@ -759,34 +793,11 @@ interface JayHtmlValidationContext {
|
|
|
759
793
|
key?: string;
|
|
760
794
|
contractName: string;
|
|
761
795
|
contract?: JayHtmlValidationContext['contract'];
|
|
796
|
+
providedHeadTags?: string[];
|
|
762
797
|
}>;
|
|
763
798
|
}
|
|
764
799
|
type JayHtmlValidatorFn = (context: JayHtmlValidationContext) => JayHtmlValidationFinding[] | Promise<JayHtmlValidationFinding[]>;
|
|
765
800
|
|
|
766
|
-
interface TemplatePart {
|
|
767
|
-
kind: 'static' | 'binding';
|
|
768
|
-
value: string;
|
|
769
|
-
}
|
|
770
|
-
interface DataScope {
|
|
771
|
-
tags: Array<{
|
|
772
|
-
tag: string;
|
|
773
|
-
tags?: any[];
|
|
774
|
-
meta?: Record<string, string>;
|
|
775
|
-
[key: string]: any;
|
|
776
|
-
}>;
|
|
777
|
-
parent?: DataScope;
|
|
778
|
-
}
|
|
779
|
-
interface ResolvedBinding {
|
|
780
|
-
path: string;
|
|
781
|
-
tag?: {
|
|
782
|
-
tag: string;
|
|
783
|
-
meta?: Record<string, string>;
|
|
784
|
-
[key: string]: any;
|
|
785
|
-
};
|
|
786
|
-
}
|
|
787
|
-
declare function resolveBinding(bindingPath: string, scope: DataScope): ResolvedBinding;
|
|
788
|
-
declare function walkElements(root: any, ctx: JayHtmlValidationContext, visitor: (el: any, scope: DataScope) => void): void;
|
|
789
|
-
|
|
790
801
|
/**
|
|
791
802
|
* Build-time utilities for coordinate template compilation.
|
|
792
803
|
*
|
|
@@ -860,4 +871,4 @@ declare function compileForEachInstanceKeyExpr(coordinateSuffix: string, trackBy
|
|
|
860
871
|
*/
|
|
861
872
|
declare function computeForEachInstanceKey(trackByValue: string, coordinateSuffix: string): string;
|
|
862
873
|
|
|
863
|
-
export { type ActionManifestEntry, CSS_EXTENSION, type CompilerSourceFile, type DataScope, type DynamicContractConfig, GenerateTarget, type GenericTypescriptSourceFile, Import, type ImportName, type ImportedRefsTree, Imports, ImportsFor, JAY_4_REACT, JAY_ACTION_DTS_EXTENSION, JAY_ACTION_EXTENSION, JAY_COMPONENT, JAY_CONTRACT_DTS_EXTENSION, JAY_CONTRACT_EXTENSION, JAY_DTS_EXTENSION, JAY_EXTENSION, JAY_FULLSTACK_COMPONENTS, JAY_QUERY_CLIENT, JAY_QUERY_HYDRATE, JAY_QUERY_MAIN_SANDBOX, JAY_QUERY_MAIN_SANDBOX_TS, JAY_QUERY_PREFIX, JAY_QUERY_SERVER, JAY_QUERY_WORKER_SANDBOX, JAY_QUERY_WORKER_SANDBOX_TS, JAY_QUERY_WORKER_TRUSTED, JAY_QUERY_WORKER_TRUSTED_TS, JAY_RUNTIME, JAY_SECURE, JAY_SSR_RUNTIME, JAY_STACK_CLIENT_RUNTIME, JAY_TS_EXTENSION, JayArrayType, JayAtomicType, JayBoolean, JayBuildEnvironment, JayComponentApiMember, JayComponentType, JayDate, JayElementConstructorType, JayElementType, JayEnumType, type JayEnvironment, JayErrorType, JayFileType, JayHTMLType, type JayHtmlHeadMeta, JayHtmlString, type JayHtmlValidationContext, type JayHtmlValidationFinding, type JayHtmlValidatorFn, type JayImportLink, type JayImportName, JayImportedType, JayNumber, JayObjectType, JayOptionalType, JayPromiseType, JayRecordType, JayRecursiveType, JayString, type JayType, JayTypeAlias, JayTypeKind, JayUnionType, JayUnknown, type JayValidations, type JsonSchemaProperty, LOCAL_PLUGIN_PATH, MAKE_JAY_4_REACT_COMPONENT, MAKE_JAY_COMPONENT, MAKE_JAY_TSX_COMPONENT, type MainRuntimeModes, type ParsedJayModuleSpecifier, type PluginComponentResolution, type PluginInitConfig, type PluginManifest, REACT, type RecursiveRegion, type Ref, type RefsTree, RenderFragment, type ResolvedBinding, RuntimeMode, SourceFileFormat, TSX_EXTENSION, TS_EXTENSION, type TemplatePart, WithValidations, addBuildEnvironment, checkValidationErrors, compileCoordinateExpr, compileForEachInstanceKeyExpr, computeForEachInstanceKey, equalJayTypes, findDynamicContract, getBasePath, getBuildEnvironment, getJayTsFileSourcePath, getMode, getModeFileExtension, getModeFromExtension, hasBuildEnvironment, hasExtension, hasJayExtension, hasJayModeExtension, hasRefs, isArrayType, isAtomicType, isComponentType, isCurrencyType, isDateWithTimezoneType, isElementConstructorType, isElementType, isEnumType, isHTMLType, isHtmlStringType, isImportedType, isLocalModule, isObjectType, isOptionalType, isPromiseType, isRecordType, isRecursiveType, isStaticCoordinate, isTypeAliasType, isUnionType, jayTypeToJsonSchema, loadPluginManifest, mergeRefsTrees, mkRef, mkRefsTree, nestRefs, normalizeActionEntry, parseJayModuleSpecifier, prettify, prettifyHtml, removeComments, resolveBinding, resolvePluginComponent, resolvePluginManifest, resolvePrimitiveType, walkElements, withOriginalTrace, withoutExtension };
|
|
874
|
+
export { type ActionManifestEntry, CSS_EXTENSION, type CompilerSourceFile, type DataScope, type DynamicContractConfig, GenerateTarget, type GenericTypescriptSourceFile, Import, type ImportName, type ImportedRefsTree, Imports, ImportsFor, JAY_4_REACT, JAY_ACTION_DTS_EXTENSION, JAY_ACTION_EXTENSION, JAY_COMPONENT, JAY_CONTRACT_DTS_EXTENSION, JAY_CONTRACT_EXTENSION, JAY_DTS_EXTENSION, JAY_EXTENSION, JAY_FULLSTACK_COMPONENTS, JAY_QUERY_CLIENT, JAY_QUERY_HYDRATE, JAY_QUERY_MAIN_SANDBOX, JAY_QUERY_MAIN_SANDBOX_TS, JAY_QUERY_PREFIX, JAY_QUERY_SERVER, JAY_QUERY_WORKER_SANDBOX, JAY_QUERY_WORKER_SANDBOX_TS, JAY_QUERY_WORKER_TRUSTED, JAY_QUERY_WORKER_TRUSTED_TS, JAY_RUNTIME, JAY_SECURE, JAY_SSR_RUNTIME, JAY_STACK_CLIENT_RUNTIME, JAY_TS_EXTENSION, JayArrayType, JayAtomicType, JayBoolean, JayBuildEnvironment, JayComponentApiMember, JayComponentType, JayDate, JayElementConstructorType, JayElementType, JayEnumType, type JayEnvironment, JayErrorType, JayFileType, JayHTMLType, type JayHtmlHeadMeta, JayHtmlString, type JayHtmlValidationContext, type JayHtmlValidationFinding, type JayHtmlValidatorFn, type JayImportLink, type JayImportName, JayImportedType, JayNumber, JayObjectType, JayOptionalType, JayPromiseType, JayRecordType, JayRecursiveType, JayString, type JayType, JayTypeAlias, JayTypeKind, JayUnionType, JayUnknown, type JayValidations, type JsonSchemaProperty, LOCAL_PLUGIN_PATH, MAKE_JAY_4_REACT_COMPONENT, MAKE_JAY_COMPONENT, MAKE_JAY_STACK_COMPONENT, MAKE_JAY_TSX_COMPONENT, type MainRuntimeModes, type ParsedJayModuleSpecifier, type PluginComponentResolution, type PluginInitConfig, type PluginManifest, REACT, type RecursiveRegion, type Ref, type RefsTree, RenderFragment, type ResolvedBinding, RuntimeMode, SourceFileFormat, TSX_EXTENSION, TS_EXTENSION, type TemplatePart, WithValidations, addBuildEnvironment, checkValidationErrors, compileCoordinateExpr, compileForEachInstanceKeyExpr, computeForEachInstanceKey, equalJayTypes, findDynamicContract, getBasePath, getBuildEnvironment, getJayTsFileSourcePath, getMode, getModeFileExtension, getModeFromExtension, hasBuildEnvironment, hasExtension, hasJayExtension, hasJayModeExtension, hasRefs, isArrayType, isAtomicType, isComponentType, isCurrencyType, isDateWithTimezoneType, isElementConstructorType, isElementType, isEnumType, isHTMLType, isHtmlStringType, isImportedType, isLocalModule, isObjectType, isOptionalType, isPromiseType, isRecordType, isRecursiveType, isStaticCoordinate, isTypeAliasType, isUnionType, jayTypeToJsonSchema, loadPluginManifest, mergeRefsTrees, mkRef, mkRefsTree, nestRefs, normalizeActionEntry, parseJayModuleSpecifier, prettify, prettifyHtml, removeComments, resolveBinding, resolvePluginComponent, resolvePluginManifest, resolvePrimitiveType, walkElements, withOriginalTrace, withoutExtension };
|
package/dist/index.js
CHANGED
|
@@ -27,6 +27,7 @@ const JAY_STACK_CLIENT_RUNTIME = "@jay-framework/stack-client-runtime";
|
|
|
27
27
|
const JAY_SSR_RUNTIME = "@jay-framework/ssr-runtime";
|
|
28
28
|
const REACT = "react";
|
|
29
29
|
const MAKE_JAY_COMPONENT = "makeJayComponent";
|
|
30
|
+
const MAKE_JAY_STACK_COMPONENT = "makeJayStackComponent";
|
|
30
31
|
const MAKE_JAY_TSX_COMPONENT = "makeJayTsxComponent";
|
|
31
32
|
const MAKE_JAY_4_REACT_COMPONENT = "jay4react";
|
|
32
33
|
var ImportsFor = /* @__PURE__ */ ((ImportsFor2) => {
|
|
@@ -650,10 +651,11 @@ class JayComponentApiMember {
|
|
|
650
651
|
}
|
|
651
652
|
}
|
|
652
653
|
class JayComponentType {
|
|
653
|
-
constructor(name, api) {
|
|
654
|
+
constructor(name, api, fullStack = false) {
|
|
654
655
|
__publicField(this, "kind", 7);
|
|
655
656
|
this.name = name;
|
|
656
657
|
this.api = api;
|
|
658
|
+
this.fullStack = fullStack;
|
|
657
659
|
}
|
|
658
660
|
}
|
|
659
661
|
class JayObjectType {
|
|
@@ -1774,6 +1776,7 @@ export {
|
|
|
1774
1776
|
LOCAL_PLUGIN_PATH,
|
|
1775
1777
|
MAKE_JAY_4_REACT_COMPONENT,
|
|
1776
1778
|
MAKE_JAY_COMPONENT,
|
|
1779
|
+
MAKE_JAY_STACK_COMPONENT,
|
|
1777
1780
|
MAKE_JAY_TSX_COMPONENT,
|
|
1778
1781
|
REACT,
|
|
1779
1782
|
RenderFragment,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jay-framework/compiler-shared",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
},
|
|
26
26
|
"author": "",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@jay-framework/component": "^0.19.
|
|
29
|
-
"@jay-framework/runtime": "^0.19.
|
|
30
|
-
"@jay-framework/secure": "^0.19.
|
|
31
|
-
"@jay-framework/typescript-bridge": "^0.19.
|
|
28
|
+
"@jay-framework/component": "^0.19.7",
|
|
29
|
+
"@jay-framework/runtime": "^0.19.7",
|
|
30
|
+
"@jay-framework/secure": "^0.19.7",
|
|
31
|
+
"@jay-framework/typescript-bridge": "^0.19.7",
|
|
32
32
|
"@types/js-yaml": "^4.0.9",
|
|
33
33
|
"change-case": "^4.1.2",
|
|
34
34
|
"js-beautify": "^1.14.11",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@caiogondim/strip-margin": "^1.0.0",
|
|
44
|
-
"@jay-framework/dev-environment": "^0.19.
|
|
44
|
+
"@jay-framework/dev-environment": "^0.19.7",
|
|
45
45
|
"@testing-library/jest-dom": "^6.2.0",
|
|
46
46
|
"@types/js-beautify": "^1",
|
|
47
47
|
"@types/node": "^20.11.5",
|