@jay-framework/compiler-shared 0.19.5 → 0.19.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 +37 -28
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -568,6 +568,10 @@ interface DynamicContractConfig {
|
|
|
568
568
|
* When the generator returns multiple contracts: used as prefix (e.g., "list" → "list/recipes").
|
|
569
569
|
* 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
570
|
prefix: string;
|
|
571
|
+
/** Head tags this component provides dynamically via phaseOutput (DL#148).
|
|
572
|
+
* Used by validators to suppress missing-title/description warnings.
|
|
573
|
+
* Values: "title", "meta:description", "meta:og:title", "link:canonical", etc. */
|
|
574
|
+
headTags?: string[];
|
|
571
575
|
}
|
|
572
576
|
/**
|
|
573
577
|
* Plugin manifest structure from plugin.yaml
|
|
@@ -584,6 +588,10 @@ interface PluginManifest {
|
|
|
584
588
|
contract: string;
|
|
585
589
|
component: string;
|
|
586
590
|
description?: string;
|
|
591
|
+
/** Head tags this component provides dynamically via phaseOutput (DL#148).
|
|
592
|
+
* Used by validators to suppress missing-title/description warnings.
|
|
593
|
+
* Values: "title", "meta:description", "meta:og:title", "link:canonical", etc. */
|
|
594
|
+
headTags?: string[];
|
|
587
595
|
}>;
|
|
588
596
|
dynamic_contracts?: DynamicContractConfig | DynamicContractConfig[];
|
|
589
597
|
/** Named exports from plugin backend bundle that are JayAction instances.
|
|
@@ -710,6 +718,30 @@ declare function resolvePluginComponent(projectRoot: string, pluginName: string,
|
|
|
710
718
|
*/
|
|
711
719
|
declare function resolvePluginManifest(projectRoot: string, pluginName: string): WithValidations<PluginManifest>;
|
|
712
720
|
|
|
721
|
+
interface TemplatePart {
|
|
722
|
+
kind: 'static' | 'binding';
|
|
723
|
+
value: string;
|
|
724
|
+
}
|
|
725
|
+
interface DataScope {
|
|
726
|
+
tags: Array<{
|
|
727
|
+
tag: string;
|
|
728
|
+
tags?: any[];
|
|
729
|
+
meta?: Record<string, string>;
|
|
730
|
+
[key: string]: any;
|
|
731
|
+
}>;
|
|
732
|
+
parent?: DataScope;
|
|
733
|
+
}
|
|
734
|
+
interface ResolvedBinding {
|
|
735
|
+
path: string;
|
|
736
|
+
tag?: {
|
|
737
|
+
tag: string;
|
|
738
|
+
meta?: Record<string, string>;
|
|
739
|
+
[key: string]: any;
|
|
740
|
+
};
|
|
741
|
+
}
|
|
742
|
+
declare function resolveBinding(bindingPath: string, scope: DataScope): ResolvedBinding;
|
|
743
|
+
declare function walkElements(root: any, ctx: JayHtmlValidationContext, visitor: (el: any, scope: DataScope) => void): void;
|
|
744
|
+
|
|
713
745
|
interface JayHtmlValidationFinding {
|
|
714
746
|
severity: 'error' | 'warning';
|
|
715
747
|
message: string;
|
|
@@ -718,16 +750,16 @@ interface JayHtmlValidationFinding {
|
|
|
718
750
|
attribute?: string;
|
|
719
751
|
}
|
|
720
752
|
interface JayHtmlHeadMeta {
|
|
721
|
-
title?:
|
|
753
|
+
title?: TemplatePart[];
|
|
722
754
|
meta: Array<{
|
|
723
755
|
name?: string;
|
|
724
756
|
property?: string;
|
|
725
|
-
content:
|
|
757
|
+
content: TemplatePart[];
|
|
726
758
|
}>;
|
|
727
759
|
links: Array<{
|
|
728
760
|
rel: string;
|
|
729
|
-
href:
|
|
730
|
-
[key: string]:
|
|
761
|
+
href: TemplatePart[];
|
|
762
|
+
[key: string]: any;
|
|
731
763
|
}>;
|
|
732
764
|
}
|
|
733
765
|
interface JayHtmlValidationContext {
|
|
@@ -759,34 +791,11 @@ interface JayHtmlValidationContext {
|
|
|
759
791
|
key?: string;
|
|
760
792
|
contractName: string;
|
|
761
793
|
contract?: JayHtmlValidationContext['contract'];
|
|
794
|
+
providedHeadTags?: string[];
|
|
762
795
|
}>;
|
|
763
796
|
}
|
|
764
797
|
type JayHtmlValidatorFn = (context: JayHtmlValidationContext) => JayHtmlValidationFinding[] | Promise<JayHtmlValidationFinding[]>;
|
|
765
798
|
|
|
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
799
|
/**
|
|
791
800
|
* Build-time utilities for coordinate template compilation.
|
|
792
801
|
*
|
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.6",
|
|
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.6",
|
|
29
|
+
"@jay-framework/runtime": "^0.19.6",
|
|
30
|
+
"@jay-framework/secure": "^0.19.6",
|
|
31
|
+
"@jay-framework/typescript-bridge": "^0.19.6",
|
|
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.6",
|
|
45
45
|
"@testing-library/jest-dom": "^6.2.0",
|
|
46
46
|
"@types/js-beautify": "^1",
|
|
47
47
|
"@types/node": "^20.11.5",
|