@contentful/experience-design-system-types 2.42.1-dev-build-f69db6bf.0 → 2.43.0-alpha.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.
Files changed (94) hide show
  1. package/README.md +15 -0
  2. package/dist/package.json +1 -1
  3. package/dist/src/agent-process-lifecycle.d.ts +26 -0
  4. package/dist/src/agent-process-lifecycle.js +171 -0
  5. package/dist/src/agent-prompt-artifact.d.ts +8 -0
  6. package/dist/src/agent-prompt-artifact.js +37 -0
  7. package/dist/src/agent-prompt-transport.d.ts +1 -0
  8. package/dist/src/agent-prompt-transport.js +4 -0
  9. package/dist/src/cdf/build.d.ts +9 -2
  10. package/dist/src/cdf/build.js +134 -17
  11. package/dist/src/cdf/finite-values.d.ts +8 -0
  12. package/dist/src/cdf/finite-values.js +21 -0
  13. package/dist/src/cdf/index.d.ts +2 -1
  14. package/dist/src/cdf/index.js +1 -0
  15. package/dist/src/cdf/property-validation.d.ts +16 -0
  16. package/dist/src/cdf/property-validation.js +211 -0
  17. package/dist/src/cdf/representation-validation.d.ts +6 -0
  18. package/dist/src/cdf/representation-validation.js +182 -0
  19. package/dist/src/cdf/schema.d.ts +778 -20
  20. package/dist/src/cdf/schema.js +362 -5
  21. package/dist/src/cdf/types.d.ts +57 -59
  22. package/dist/src/cdf/types.js +72 -15
  23. package/dist/src/cdf/validate.js +31 -1
  24. package/dist/src/cdf/vocabularies.d.ts +1 -1
  25. package/dist/src/cdf/vocabularies.js +9 -1
  26. package/dist/src/config/index.js +6 -3
  27. package/dist/src/exploration/constants.d.ts +10 -0
  28. package/dist/src/exploration/constants.js +18 -0
  29. package/dist/src/exploration/index.d.ts +3 -0
  30. package/dist/src/exploration/index.js +3 -0
  31. package/dist/src/exploration/schemas.d.ts +201 -0
  32. package/dist/src/exploration/schemas.js +126 -0
  33. package/dist/src/exploration/types.d.ts +393 -0
  34. package/dist/src/exploration/types.js +1 -0
  35. package/dist/src/handoff/index.d.ts +1 -1
  36. package/dist/src/index.d.ts +15 -1
  37. package/dist/src/index.js +12 -4
  38. package/dist/src/property-contract/analysis-representation-candidates.d.ts +19 -0
  39. package/dist/src/property-contract/analysis-representation-candidates.js +45 -0
  40. package/dist/src/property-contract/classification.d.ts +38 -0
  41. package/dist/src/property-contract/classification.js +84 -0
  42. package/dist/src/property-contract/compact-model-components.d.ts +16 -0
  43. package/dist/src/property-contract/compact-model-components.js +113 -0
  44. package/dist/src/property-contract/content-digest.d.ts +2 -0
  45. package/dist/src/property-contract/content-digest.js +69 -0
  46. package/dist/src/property-contract/decision-protocol.d.ts +45 -0
  47. package/dist/src/property-contract/decision-protocol.js +251 -0
  48. package/dist/src/property-contract/definition-import-rules.d.ts +10 -0
  49. package/dist/src/property-contract/definition-import-rules.js +105 -0
  50. package/dist/src/property-contract/definition-import.d.ts +13 -0
  51. package/dist/src/property-contract/definition-import.js +52 -0
  52. package/dist/src/property-contract/discriminated-union-source.d.ts +17 -0
  53. package/dist/src/property-contract/discriminated-union-source.js +180 -0
  54. package/dist/src/property-contract/import-prerequisites.d.ts +70 -0
  55. package/dist/src/property-contract/import-prerequisites.js +208 -0
  56. package/dist/src/property-contract/index.d.ts +18 -1
  57. package/dist/src/property-contract/index.js +18 -6
  58. package/dist/src/property-contract/logical-source-graph.d.ts +36 -0
  59. package/dist/src/property-contract/logical-source-graph.js +240 -0
  60. package/dist/src/property-contract/mapper-readiness.d.ts +6 -0
  61. package/dist/src/property-contract/mapper-readiness.js +34 -0
  62. package/dist/src/property-contract/model-exploration.d.ts +42 -0
  63. package/dist/src/property-contract/model-exploration.js +94 -0
  64. package/dist/src/property-contract/native-source-region.d.ts +5 -0
  65. package/dist/src/property-contract/native-source-region.js +125 -0
  66. package/dist/src/property-contract/null-handling.d.ts +10 -0
  67. package/dist/src/property-contract/null-handling.js +45 -0
  68. package/dist/src/property-contract/physical-property-import.d.ts +6 -0
  69. package/dist/src/property-contract/physical-property-import.js +55 -0
  70. package/dist/src/property-contract/property-decision.d.ts +14 -0
  71. package/dist/src/property-contract/property-decision.js +155 -0
  72. package/dist/src/property-contract/property-model.d.ts +197 -0
  73. package/dist/src/property-contract/property-model.js +833 -0
  74. package/dist/src/property-contract/representation-plan.d.ts +133 -0
  75. package/dist/src/property-contract/representation-plan.js +756 -0
  76. package/dist/src/property-contract/representation-proposal.d.ts +65 -0
  77. package/dist/src/property-contract/representation-proposal.js +204 -0
  78. package/dist/src/property-contract/resource-link-schema.d.ts +55 -0
  79. package/dist/src/property-contract/resource-link-schema.js +28 -0
  80. package/dist/src/property-contract/source-representation.d.ts +9 -0
  81. package/dist/src/property-contract/source-representation.js +79 -0
  82. package/dist/src/property-contract/target-definition.d.ts +17 -16
  83. package/dist/src/property-contract/target-definition.js +4 -26
  84. package/dist/src/schema-export.d.ts +30 -0
  85. package/dist/src/schema-export.js +285 -0
  86. package/dist/src/shared-source.d.ts +105 -0
  87. package/dist/src/shared-source.js +1 -0
  88. package/dist/src/source-input-association.d.ts +23 -0
  89. package/dist/src/source-input-association.js +52 -0
  90. package/dist/src/sources-api/preview/index.d.ts +37 -3
  91. package/dist/src/sources-api/preview/index.js +39 -1
  92. package/dist/src/sources-api/preview/schema.d.ts +2 -0
  93. package/dist/src/sources-api/preview/schema.js +74 -0
  94. package/package.json +1 -1
@@ -0,0 +1,133 @@
1
+ import type { CDFComponentEntry, CDFPropertyDefinition, CDFSlotDefinition } from '../cdf/types.js';
2
+ import { type RepresentationProposalDraft } from './representation-proposal.js';
3
+ import { type JsonValue, type PropertyIssue } from './json-value.js';
4
+ import { type LogicalBranchCondition, type LogicalSourceGraph } from './logical-source-graph.js';
5
+ import { type ModelComponentExploration } from './model-exploration.js';
6
+ import { type DefaultIntent, type MapperAvailability, type PropertyModel, type SourceGraphNode } from './property-model.js';
7
+ export interface ModelBinding {
8
+ planId: string;
9
+ componentId: string;
10
+ propertyId: string;
11
+ nodeId: string;
12
+ sourceNodeId?: string;
13
+ }
14
+ export interface ModelCardinality {
15
+ min: number;
16
+ max: number | null;
17
+ ordered: boolean;
18
+ tuplePosition?: number;
19
+ rest?: boolean;
20
+ }
21
+ export type ModelReconstruction = {
22
+ kind: 'optional-value';
23
+ valueNodeId: string;
24
+ } | {
25
+ kind: 'object-envelope';
26
+ field: string;
27
+ valueNodeId: string;
28
+ } | {
29
+ kind: 'ordered-array';
30
+ itemNodeId: string;
31
+ } | {
32
+ kind: 'fixed-value';
33
+ value: JsonValue;
34
+ } | {
35
+ kind: 'empty-value';
36
+ state: 'null' | 'undefined' | 'never';
37
+ };
38
+ export interface LogicalPhysicalMapping {
39
+ nodeId: string;
40
+ sourceNodeId: string;
41
+ readonly: boolean;
42
+ occurrenceReadonly: boolean;
43
+ intrinsicReadonly: boolean;
44
+ defaultIntent?: DefaultIntent;
45
+ path: NonNullable<SourceGraphNode['path']>;
46
+ required: boolean;
47
+ nullable: boolean | null;
48
+ undefinable: boolean | null;
49
+ disposition: 'native-field' | 'model' | 'slot' | 'reference' | 'reconstruction' | 'held';
50
+ reconstruction?: ModelReconstruction;
51
+ componentKey?: string;
52
+ field?: string;
53
+ slot?: string;
54
+ targetNodeId?: string;
55
+ reason?: string;
56
+ withinValue?: {
57
+ ownerNodeId: string;
58
+ path: NonNullable<SourceGraphNode['path']>;
59
+ };
60
+ branchConditions?: LogicalBranchCondition[];
61
+ variant?: {
62
+ wrapperKey: string;
63
+ slot: string;
64
+ componentKey: string;
65
+ };
66
+ }
67
+ export interface ModelBranchSelection {
68
+ unionNodeId: string;
69
+ wrapperKey: string;
70
+ slot: string;
71
+ discriminator: string;
72
+ branches: Array<{
73
+ memberIndex: number;
74
+ nodeId: string;
75
+ sourceNodeId: string;
76
+ tag: string | number | boolean;
77
+ modelKey: string;
78
+ }>;
79
+ }
80
+ export interface RepresentationPlan {
81
+ schemaVersion: 1;
82
+ proposal?: RepresentationProposalDraft;
83
+ id: string;
84
+ kind: 'native' | 'component-model';
85
+ identity: PropertyModel['identity'];
86
+ sourceModel: PropertyModel;
87
+ contextSnapshot?: JsonValue;
88
+ logicalGraph: LogicalSourceGraph;
89
+ sourceDigest: string;
90
+ contextDigest: string;
91
+ category: NonNullable<PropertyModel['category']>;
92
+ defaultIntent: DefaultIntent;
93
+ sourceDefault?: NonNullable<PropertyModel['source']['default']>;
94
+ nativeDefinition?: CDFPropertyDefinition;
95
+ models: Array<{
96
+ key: string;
97
+ originalKey: string;
98
+ nodeId: string;
99
+ entry: CDFComponentEntry;
100
+ }>;
101
+ attachment?: {
102
+ slot: string;
103
+ definition: CDFSlotDefinition;
104
+ };
105
+ mappings: LogicalPhysicalMapping[];
106
+ issues: PropertyIssue[];
107
+ sdkValid: boolean;
108
+ requirements: Array<{
109
+ path: string;
110
+ capability: string;
111
+ }>;
112
+ branchSelections?: ModelBranchSelection[];
113
+ modelExplorations?: ModelComponentExploration[];
114
+ }
115
+ /** Attach a validated model plan without claiming an ordinary source composition slot. */
116
+ export declare function attachComponentModelPlan(entry: CDFComponentEntry, plan: RepresentationPlan): CDFComponentEntry;
117
+ export declare function deriveEditableRepresentationPlans(model: PropertyModel, options?: {
118
+ context?: JsonValue;
119
+ modelEdits?: Readonly<Record<string, CDFComponentEntry>>;
120
+ modelExplorations?: readonly ModelComponentExploration[];
121
+ modelRenames?: Readonly<Record<string, string>>;
122
+ defaultIntent?: DefaultIntent;
123
+ proposal?: RepresentationProposalDraft;
124
+ }): RepresentationPlan[];
125
+ export declare function validateRepresentationPlan(input: unknown, model: PropertyModel, context?: JsonValue): PropertyIssue[];
126
+ export declare function evaluateRepresentationReadiness(plan: RepresentationPlan, capabilities?: Readonly<Record<string, MapperAvailability>>): {
127
+ ready: boolean;
128
+ requirements: ReadonlyArray<{
129
+ path: string;
130
+ capability: string;
131
+ availability: MapperAvailability;
132
+ }>;
133
+ };